@metaliq/elements
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.125 • Public • Published

@metaliq/elements

This package is part of the metaliq/ui collection of User/Human Interface mechanisms, and contains a number of standards compliant Web Components - a.k.a Custom Elements - which extend the HTML element syntax in useful ways, along with MetaViews based on these components allowing them to be easily integrated with MetaModels.

The components are:

AnimatedHideShow

The <animated-hide-show> element has a property called mq-hidden. When this changes, the element changes its height between zero and auto, but there is a short transition period (defined by mq-duration) during which auto is replaced by a specific value, equal to the sum of all its childrens' heights, hence giving a smooth transition.

The animatedHideShow MetaView wrapper links the mq-hidden property to the hidden term from the MetaModel.

Unlike expander, animated-hide-show retains its descendant DOM structure when hidden. This may be useful for fields such as dropdowns and date-pickers using 3rd party libraries which need to be re-instantiated when removed and added to the DOM.

Expander

The <expander> element automatically expands and contracts, with a transition on height over a given period (mq-duration), whenever its child content changes.

The expander MetaView wrapper

Whilst the behaviour of expander is automatic and unlike like animated-hide-show doesn't require a linked property, it doesn't allow for the retention of inner content during the contraction phase.

Readme

Keywords

none

Package Sidebar

Install

npm i @metaliq/elements

Weekly Downloads

131

Version

1.0.0-beta.125

License

MIT

Unpacked Size

49.4 kB

Total Files

19

Last publish

Collaborators

  • tstewart-klaudhaus