@gravionlabs/helix-core 22.1.1 → 22.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/gravionlabs-helix-core-accordion.mjs +994 -541
- package/fesm2022/gravionlabs-helix-core-accordion.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-animateonscroll.mjs +265 -166
- package/fesm2022/gravionlabs-helix-core-animateonscroll.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-api.mjs +926 -836
- package/fesm2022/gravionlabs-helix-core-api.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-autocomplete.mjs +2603 -1611
- package/fesm2022/gravionlabs-helix-core-autocomplete.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-autofocus.mjs +115 -79
- package/fesm2022/gravionlabs-helix-core-autofocus.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-avatar.mjs +356 -180
- package/fesm2022/gravionlabs-helix-core-avatar.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-avatargroup.mjs +200 -84
- package/fesm2022/gravionlabs-helix-core-avatargroup.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-badge.mjs +671 -390
- package/fesm2022/gravionlabs-helix-core-badge.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-base.mjs +113 -103
- package/fesm2022/gravionlabs-helix-core-base.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-basecomponent.mjs +498 -444
- package/fesm2022/gravionlabs-helix-core-basecomponent.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-baseeditableholder.mjs +131 -69
- package/fesm2022/gravionlabs-helix-core-baseeditableholder.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-baseinput.mjs +210 -94
- package/fesm2022/gravionlabs-helix-core-baseinput.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-basemodelholder.mjs +39 -26
- package/fesm2022/gravionlabs-helix-core-basemodelholder.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-bind.mjs +136 -98
- package/fesm2022/gravionlabs-helix-core-bind.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-blockui.mjs +390 -224
- package/fesm2022/gravionlabs-helix-core-blockui.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-breadcrumb.mjs +473 -212
- package/fesm2022/gravionlabs-helix-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-button.mjs +1739 -825
- package/fesm2022/gravionlabs-helix-core-button.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-buttongroup.mjs +116 -64
- package/fesm2022/gravionlabs-helix-core-buttongroup.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-card.mjs +454 -205
- package/fesm2022/gravionlabs-helix-core-card.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-carousel.mjs +1238 -898
- package/fesm2022/gravionlabs-helix-core-carousel.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-cascadeselect.mjs +2373 -1337
- package/fesm2022/gravionlabs-helix-core-cascadeselect.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-chart.mjs +407 -214
- package/fesm2022/gravionlabs-helix-core-chart.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-checkbox.mjs +704 -346
- package/fesm2022/gravionlabs-helix-core-checkbox.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-chip.mjs +489 -251
- package/fesm2022/gravionlabs-helix-core-chip.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-classnames.mjs +95 -48
- package/fesm2022/gravionlabs-helix-core-classnames.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-colorpicker.mjs +975 -667
- package/fesm2022/gravionlabs-helix-core-colorpicker.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-config.mjs +395 -306
- package/fesm2022/gravionlabs-helix-core-config.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-confirmdialog.mjs +1222 -546
- package/fesm2022/gravionlabs-helix-core-confirmdialog.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-confirmpopup.mjs +878 -524
- package/fesm2022/gravionlabs-helix-core-confirmpopup.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-contextmenu.mjs +1917 -1031
- package/fesm2022/gravionlabs-helix-core-contextmenu.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-dataview.mjs +1075 -522
- package/fesm2022/gravionlabs-helix-core-dataview.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-datepicker.mjs +3797 -3313
- package/fesm2022/gravionlabs-helix-core-datepicker.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-dialog.mjs +1852 -1047
- package/fesm2022/gravionlabs-helix-core-dialog.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-divider.mjs +288 -136
- package/fesm2022/gravionlabs-helix-core-divider.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-dock.mjs +655 -387
- package/fesm2022/gravionlabs-helix-core-dock.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-dom.mjs +589 -760
- package/fesm2022/gravionlabs-helix-core-dom.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-dragdrop.mjs +457 -302
- package/fesm2022/gravionlabs-helix-core-dragdrop.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-drawer.mjs +986 -507
- package/fesm2022/gravionlabs-helix-core-drawer.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-dynamicdialog.mjs +849 -923
- package/fesm2022/gravionlabs-helix-core-dynamicdialog.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-editor.mjs +578 -383
- package/fesm2022/gravionlabs-helix-core-editor.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-fieldset.mjs +593 -280
- package/fesm2022/gravionlabs-helix-core-fieldset.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-fileupload.mjs +1882 -994
- package/fesm2022/gravionlabs-helix-core-fileupload.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-firsterror.mjs +41 -23
- package/fesm2022/gravionlabs-helix-core-firsterror.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-floatlabel.mjs +197 -94
- package/fesm2022/gravionlabs-helix-core-floatlabel.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-fluid.mjs +149 -74
- package/fesm2022/gravionlabs-helix-core-fluid.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-focustrap.mjs +141 -104
- package/fesm2022/gravionlabs-helix-core-focustrap.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-galleria.mjs +2800 -1449
- package/fesm2022/gravionlabs-helix-core-galleria.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-iconfield.mjs +214 -98
- package/fesm2022/gravionlabs-helix-core-iconfield.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-angledoubledown.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-angledoubledown.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-angledoubleleft.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-angledoubleleft.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-angledoubleright.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-angledoubleright.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-angledoubleup.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-angledoubleup.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-angledown.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-angledown.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-angleleft.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-angleleft.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-angleright.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-angleright.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-angleup.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-angleup.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-arrowdown.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-arrowdown.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-arrowdownleft.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-arrowdownleft.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-arrowdownright.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-arrowdownright.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-arrowleft.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-arrowleft.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-arrowright.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-arrowright.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-arrowup.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-arrowup.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-ban.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-ban.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-bars.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-bars.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-baseicon.mjs +120 -64
- package/fesm2022/gravionlabs-helix-core-icons-baseicon.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-blank.mjs +42 -23
- package/fesm2022/gravionlabs-helix-core-icons-blank.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-calendar.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-calendar.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-caretleft.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-caretleft.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-caretright.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-caretright.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-check.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-check.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-chevrondown.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-chevrondown.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-chevronleft.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-chevronleft.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-chevronright.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-chevronright.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-chevronup.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-chevronup.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-exclamationtriangle.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-exclamationtriangle.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-eye.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-eye.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-eyeslash.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-eyeslash.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-filter.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-filter.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-filterfill.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-filterfill.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-filterslash.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-filterslash.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-home.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-home.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-infocircle.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-infocircle.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-minus.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-minus.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-pencil.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-pencil.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-plus.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-plus.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-refresh.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-refresh.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-search.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-search.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-searchminus.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-searchminus.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-searchplus.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-searchplus.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-sortalt.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-sortalt.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-sortamountdown.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-sortamountdown.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-sortamountupalt.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-sortamountupalt.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-spinner.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-spinner.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-star.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-star.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-starfill.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-starfill.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-thlarge.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-thlarge.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-times.mjs +43 -24
- package/fesm2022/gravionlabs-helix-core-icons-times.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-timescircle.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-timescircle.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-trash.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-trash.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-undo.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-undo.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-upload.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-upload.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-windowmaximize.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-windowmaximize.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons-windowminimize.mjs +48 -29
- package/fesm2022/gravionlabs-helix-core-icons-windowminimize.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-icons.mjs +53 -63
- package/fesm2022/gravionlabs-helix-core-iftalabel.mjs +175 -81
- package/fesm2022/gravionlabs-helix-core-iftalabel.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-image.mjs +1089 -552
- package/fesm2022/gravionlabs-helix-core-image.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-imagecompare.mjs +348 -165
- package/fesm2022/gravionlabs-helix-core-imagecompare.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-inplace.mjs +591 -249
- package/fesm2022/gravionlabs-helix-core-inplace.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-inputgroup.mjs +175 -91
- package/fesm2022/gravionlabs-helix-core-inputgroup.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-inputgroupaddon.mjs +196 -73
- package/fesm2022/gravionlabs-helix-core-inputgroupaddon.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-inputicon.mjs +207 -70
- package/fesm2022/gravionlabs-helix-core-inputicon.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-inputmask.mjs +1581 -1330
- package/fesm2022/gravionlabs-helix-core-inputmask.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-inputnumber.mjs +1696 -1294
- package/fesm2022/gravionlabs-helix-core-inputnumber.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-inputotp.mjs +576 -363
- package/fesm2022/gravionlabs-helix-core-inputotp.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-inputtext.mjs +344 -183
- package/fesm2022/gravionlabs-helix-core-inputtext.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-keyfilter.mjs +291 -252
- package/fesm2022/gravionlabs-helix-core-keyfilter.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-knob.mjs +642 -396
- package/fesm2022/gravionlabs-helix-core-knob.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-listbox.mjs +2354 -1401
- package/fesm2022/gravionlabs-helix-core-listbox.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-megamenu.mjs +1913 -1052
- package/fesm2022/gravionlabs-helix-core-megamenu.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-menu.mjs +1392 -767
- package/fesm2022/gravionlabs-helix-core-menu.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-menubar.mjs +1857 -984
- package/fesm2022/gravionlabs-helix-core-menubar.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-message.mjs +605 -288
- package/fesm2022/gravionlabs-helix-core-message.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-metergroup.mjs +719 -323
- package/fesm2022/gravionlabs-helix-core-metergroup.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-motion.mjs +1178 -694
- package/fesm2022/gravionlabs-helix-core-motion.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-multiselect.mjs +3437 -1839
- package/fesm2022/gravionlabs-helix-core-multiselect.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-orderlist.mjs +1426 -753
- package/fesm2022/gravionlabs-helix-core-orderlist.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-organizationchart.mjs +755 -371
- package/fesm2022/gravionlabs-helix-core-organizationchart.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-overlay.mjs +984 -600
- package/fesm2022/gravionlabs-helix-core-overlay.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-overlaybadge.mjs +310 -107
- package/fesm2022/gravionlabs-helix-core-overlaybadge.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-paginator.mjs +1076 -564
- package/fesm2022/gravionlabs-helix-core-paginator.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-panel.mjs +759 -364
- package/fesm2022/gravionlabs-helix-core-panel.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-panelmenu.mjs +1909 -888
- package/fesm2022/gravionlabs-helix-core-panelmenu.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-passthrough.mjs +10 -18
- package/fesm2022/gravionlabs-helix-core-passthrough.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-password.mjs +1624 -894
- package/fesm2022/gravionlabs-helix-core-password.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-picklist.mjs +2415 -1359
- package/fesm2022/gravionlabs-helix-core-picklist.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-popover.mjs +708 -442
- package/fesm2022/gravionlabs-helix-core-popover.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-progressbar.mjs +380 -170
- package/fesm2022/gravionlabs-helix-core-progressbar.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-progressspinner.mjs +276 -121
- package/fesm2022/gravionlabs-helix-core-progressspinner.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-radiobutton.mjs +525 -291
- package/fesm2022/gravionlabs-helix-core-radiobutton.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-rating.mjs +529 -286
- package/fesm2022/gravionlabs-helix-core-rating.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-ripple.mjs +194 -175
- package/fesm2022/gravionlabs-helix-core-ripple.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-scroller.mjs +1384 -977
- package/fesm2022/gravionlabs-helix-core-scroller.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-scrollpanel.mjs +605 -458
- package/fesm2022/gravionlabs-helix-core-scrollpanel.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-scrolltop.mjs +565 -261
- package/fesm2022/gravionlabs-helix-core-scrolltop.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-select.mjs +2959 -1644
- package/fesm2022/gravionlabs-helix-core-select.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-selectbutton.mjs +644 -335
- package/fesm2022/gravionlabs-helix-core-selectbutton.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-skeleton.mjs +315 -160
- package/fesm2022/gravionlabs-helix-core-skeleton.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-slider.mjs +839 -630
- package/fesm2022/gravionlabs-helix-core-slider.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-speeddial.mjs +1183 -700
- package/fesm2022/gravionlabs-helix-core-speeddial.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-splitbutton.mjs +977 -375
- package/fesm2022/gravionlabs-helix-core-splitbutton.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-splitter.mjs +737 -509
- package/fesm2022/gravionlabs-helix-core-splitter.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-stepper.mjs +1397 -628
- package/fesm2022/gravionlabs-helix-core-stepper.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-steps.mjs +457 -272
- package/fesm2022/gravionlabs-helix-core-steps.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-styleclass.mjs +466 -344
- package/fesm2022/gravionlabs-helix-core-styleclass.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-table.mjs +9728 -5590
- package/fesm2022/gravionlabs-helix-core-table.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-tabs.mjs +1350 -735
- package/fesm2022/gravionlabs-helix-core-tabs.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-tag.mjs +343 -154
- package/fesm2022/gravionlabs-helix-core-tag.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-terminal.mjs +384 -214
- package/fesm2022/gravionlabs-helix-core-terminal.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-textarea.mjs +347 -209
- package/fesm2022/gravionlabs-helix-core-textarea.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-themes-aura.mjs +4846 -5618
- package/fesm2022/gravionlabs-helix-core-themes-aura.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-themes-lara.mjs +4961 -5809
- package/fesm2022/gravionlabs-helix-core-themes-lara.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-themes-nora.mjs +4780 -5567
- package/fesm2022/gravionlabs-helix-core-themes-nora.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-themes-types.mjs +0 -700
- package/fesm2022/gravionlabs-helix-core-themes.mjs +4 -9
- package/fesm2022/gravionlabs-helix-core-themes.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-tieredmenu.mjs +1967 -1048
- package/fesm2022/gravionlabs-helix-core-tieredmenu.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-timeline.mjs +370 -185
- package/fesm2022/gravionlabs-helix-core-timeline.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-toast.mjs +1083 -526
- package/fesm2022/gravionlabs-helix-core-toast.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-togglebutton.mjs +609 -315
- package/fesm2022/gravionlabs-helix-core-togglebutton.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-toggleswitch.mjs +504 -246
- package/fesm2022/gravionlabs-helix-core-toggleswitch.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-toolbar.mjs +350 -149
- package/fesm2022/gravionlabs-helix-core-toolbar.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-tooltip.mjs +1035 -795
- package/fesm2022/gravionlabs-helix-core-tooltip.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-tree.mjs +2673 -1668
- package/fesm2022/gravionlabs-helix-core-tree.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-treeselect.mjs +1773 -976
- package/fesm2022/gravionlabs-helix-core-treeselect.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-treetable.mjs +5963 -3647
- package/fesm2022/gravionlabs-helix-core-treetable.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-ts-helpers.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-accordion.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-autocomplete.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-avatar.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-avatargroup.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-badge.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-blockui.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-breadcrumb.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-button.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-card.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-carousel.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-cascadeselect.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-chart.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-checkbox.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-chip.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-colorpicker.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-confirmdialog.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-confirmpopup.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-contextmenu.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-dataview.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-datepicker.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-dialog.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-divider.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-dock.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-drawer.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-editor.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-fieldset.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-fileupload.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-floatlabel.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-fluid.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-galleria.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-iconfield.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-iftalabel.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-image.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-imagecompare.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-inplace.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-inputgroup.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-inputgroupaddon.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-inputicon.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-inputmask.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-inputnumber.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-inputotp.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-inputtext.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-knob.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-listbox.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-megamenu.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-menu.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-menubar.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-message.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-metergroup.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-motion.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-multiselect.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-orderlist.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-organizationchart.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-overlay.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-overlaybadge.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-paginator.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-panel.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-panelmenu.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-password.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-picklist.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-popover.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-progressbar.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-progressspinner.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-radiobutton.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-rating.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-scroller.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-scrollpanel.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-scrolltop.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-select.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-selectbutton.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-skeleton.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-slider.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-speeddial.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-splitbutton.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-splitter.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-stepper.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-table.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-tabs.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-tag.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-terminal.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-textarea.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-tieredmenu.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-timeline.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-toast.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-togglebutton.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-toggleswitch.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-toolbar.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-tooltip.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-tree.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-treeselect.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-types-treetable.mjs +0 -4
- package/fesm2022/gravionlabs-helix-core-uix-motion.mjs +192 -282
- package/fesm2022/gravionlabs-helix-core-uix-motion.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-uix-styled.mjs +827 -813
- package/fesm2022/gravionlabs-helix-core-uix-styled.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-uix-utils.mjs +967 -1558
- package/fesm2022/gravionlabs-helix-core-uix-utils.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-usestyle.mjs +62 -52
- package/fesm2022/gravionlabs-helix-core-usestyle.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-utils.mjs +272 -366
- package/fesm2022/gravionlabs-helix-core-utils.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core-validators.mjs +86 -93
- package/fesm2022/gravionlabs-helix-core-validators.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-core.mjs +1 -5
- package/fesm2022/gravionlabs-helix-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/gravionlabs-helix-core-accordion.d.ts +317 -246
- package/types/gravionlabs-helix-core-animateonscroll.d.ts +89 -61
- package/types/gravionlabs-helix-core-api.d.ts +1743 -1777
- package/types/gravionlabs-helix-core-autocomplete.d.ts +1070 -750
- package/types/gravionlabs-helix-core-autofocus.d.ts +29 -26
- package/types/gravionlabs-helix-core-avatar.d.ts +165 -123
- package/types/gravionlabs-helix-core-avatargroup.d.ts +58 -48
- package/types/gravionlabs-helix-core-badge.d.ts +243 -162
- package/types/gravionlabs-helix-core-base.d.ts +46 -49
- package/types/gravionlabs-helix-core-basecomponent.d.ts +187 -170
- package/types/gravionlabs-helix-core-baseeditableholder.d.ts +63 -45
- package/types/gravionlabs-helix-core-baseinput.d.ts +121 -73
- package/types/gravionlabs-helix-core-basemodelholder.d.ts +9 -12
- package/types/gravionlabs-helix-core-bind.d.ts +36 -33
- package/types/gravionlabs-helix-core-blockui.d.ts +114 -90
- package/types/gravionlabs-helix-core-breadcrumb.d.ts +158 -132
- package/types/gravionlabs-helix-core-button.d.ts +716 -443
- package/types/gravionlabs-helix-core-buttongroup.d.ts +28 -33
- package/types/gravionlabs-helix-core-card.d.ts +156 -136
- package/types/gravionlabs-helix-core-carousel.d.ts +461 -361
- package/types/gravionlabs-helix-core-cascadeselect.d.ts +880 -604
- package/types/gravionlabs-helix-core-chart.d.ts +162 -115
- package/types/gravionlabs-helix-core-checkbox.d.ts +310 -211
- package/types/gravionlabs-helix-core-chip.d.ts +202 -147
- package/types/gravionlabs-helix-core-classnames.d.ts +23 -21
- package/types/gravionlabs-helix-core-colorpicker.d.ts +359 -290
- package/types/gravionlabs-helix-core-config.d.ts +249 -259
- package/types/gravionlabs-helix-core-confirmdialog.d.ts +498 -325
- package/types/gravionlabs-helix-core-confirmpopup.d.ts +273 -218
- package/types/gravionlabs-helix-core-contextmenu.d.ts +509 -351
- package/types/gravionlabs-helix-core-dataview.d.ts +507 -349
- package/types/gravionlabs-helix-core-datepicker.d.ts +1267 -954
- package/types/gravionlabs-helix-core-dialog.d.ts +758 -515
- package/types/gravionlabs-helix-core-divider.d.ts +126 -106
- package/types/gravionlabs-helix-core-dock.d.ts +219 -181
- package/types/gravionlabs-helix-core-dom.d.ts +97 -100
- package/types/gravionlabs-helix-core-dragdrop.d.ts +149 -107
- package/types/gravionlabs-helix-core-drawer.d.ts +382 -278
- package/types/gravionlabs-helix-core-dynamicdialog.d.ts +512 -519
- package/types/gravionlabs-helix-core-editor.d.ts +225 -173
- package/types/gravionlabs-helix-core-fieldset.d.ts +209 -170
- package/types/gravionlabs-helix-core-fileupload.d.ts +764 -533
- package/types/gravionlabs-helix-core-firsterror.d.ts +8 -11
- package/types/gravionlabs-helix-core-floatlabel.d.ts +57 -52
- package/types/gravionlabs-helix-core-fluid.d.ts +38 -39
- package/types/gravionlabs-helix-core-focustrap.d.ts +33 -30
- package/types/gravionlabs-helix-core-galleria.d.ts +957 -628
- package/types/gravionlabs-helix-core-iconfield.d.ts +72 -57
- package/types/gravionlabs-helix-core-icons-angledoubledown.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-angledoubleleft.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-angledoubleright.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-angledoubleup.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-angledown.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-angleleft.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-angleright.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-angleup.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-arrowdown.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-arrowdownleft.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-arrowdownright.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-arrowleft.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-arrowright.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-arrowup.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-ban.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-bars.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-baseicon.d.ts +25 -24
- package/types/gravionlabs-helix-core-icons-blank.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-calendar.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-caretleft.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-caretright.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-check.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-chevrondown.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-chevronleft.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-chevronright.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-chevronup.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-exclamationtriangle.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-eye.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-eyeslash.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-filter.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-filterfill.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-filterslash.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-home.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-infocircle.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-minus.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-pencil.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-plus.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-refresh.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-search.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-searchminus.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-searchplus.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-sortalt.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-sortamountdown.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-sortamountupalt.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-spinner.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-star.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-starfill.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-thlarge.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-times.d.ts +6 -9
- package/types/gravionlabs-helix-core-icons-timescircle.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-trash.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-undo.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-upload.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-windowmaximize.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons-windowminimize.d.ts +8 -11
- package/types/gravionlabs-helix-core-icons.d.ts +53 -53
- package/types/gravionlabs-helix-core-iftalabel.d.ts +42 -43
- package/types/gravionlabs-helix-core-image.d.ts +440 -331
- package/types/gravionlabs-helix-core-imagecompare.d.ts +99 -84
- package/types/gravionlabs-helix-core-inplace.d.ts +188 -149
- package/types/gravionlabs-helix-core-inputgroup.d.ts +55 -50
- package/types/gravionlabs-helix-core-inputgroupaddon.d.ts +54 -43
- package/types/gravionlabs-helix-core-inputicon.d.ts +49 -38
- package/types/gravionlabs-helix-core-inputmask.d.ts +499 -353
- package/types/gravionlabs-helix-core-inputnumber.d.ts +581 -410
- package/types/gravionlabs-helix-core-inputotp.d.ts +206 -158
- package/types/gravionlabs-helix-core-inputtext.d.ts +142 -102
- package/types/gravionlabs-helix-core-keyfilter.d.ts +62 -53
- package/types/gravionlabs-helix-core-knob.d.ts +265 -188
- package/types/gravionlabs-helix-core-listbox.d.ts +897 -638
- package/types/gravionlabs-helix-core-megamenu.d.ts +512 -365
- package/types/gravionlabs-helix-core-menu.d.ts +441 -343
- package/types/gravionlabs-helix-core-menubar.d.ts +499 -361
- package/types/gravionlabs-helix-core-message.d.ts +267 -195
- package/types/gravionlabs-helix-core-metergroup.d.ts +256 -190
- package/types/gravionlabs-helix-core-motion.d.ts +602 -385
- package/types/gravionlabs-helix-core-multiselect.d.ts +1256 -855
- package/types/gravionlabs-helix-core-orderlist.d.ts +504 -351
- package/types/gravionlabs-helix-core-organizationchart.d.ts +264 -203
- package/types/gravionlabs-helix-core-overlay.d.ts +417 -307
- package/types/gravionlabs-helix-core-overlaybadge.d.ts +107 -71
- package/types/gravionlabs-helix-core-paginator.d.ts +445 -336
- package/types/gravionlabs-helix-core-panel.d.ts +285 -225
- package/types/gravionlabs-helix-core-panelmenu.d.ts +499 -340
- package/types/gravionlabs-helix-core-passthrough.d.ts +5 -7
- package/types/gravionlabs-helix-core-password.d.ts +657 -463
- package/types/gravionlabs-helix-core-picklist.d.ts +938 -647
- package/types/gravionlabs-helix-core-popover.d.ts +259 -190
- package/types/gravionlabs-helix-core-progressbar.d.ts +141 -106
- package/types/gravionlabs-helix-core-progressspinner.d.ts +101 -76
- package/types/gravionlabs-helix-core-radiobutton.d.ts +228 -174
- package/types/gravionlabs-helix-core-rating.d.ts +217 -178
- package/types/gravionlabs-helix-core-ripple.d.ts +43 -48
- package/types/gravionlabs-helix-core-scroller.d.ts +505 -371
- package/types/gravionlabs-helix-core-scrollpanel.d.ts +151 -141
- package/types/gravionlabs-helix-core-scrolltop.d.ts +195 -140
- package/types/gravionlabs-helix-core-select.d.ts +1095 -749
- package/types/gravionlabs-helix-core-selectbutton.d.ts +238 -165
- package/types/gravionlabs-helix-core-skeleton.d.ts +123 -88
- package/types/gravionlabs-helix-core-slider.d.ts +259 -201
- package/types/gravionlabs-helix-core-speeddial.d.ts +511 -390
- package/types/gravionlabs-helix-core-splitbutton.d.ts +422 -267
- package/types/gravionlabs-helix-core-splitter.d.ts +246 -192
- package/types/gravionlabs-helix-core-stepper.d.ts +428 -269
- package/types/gravionlabs-helix-core-steps.d.ts +162 -134
- package/types/gravionlabs-helix-core-styleclass.d.ts +165 -107
- package/types/gravionlabs-helix-core-table.d.ts +2908 -1935
- package/types/gravionlabs-helix-core-tabs.d.ts +471 -311
- package/types/gravionlabs-helix-core-tag.d.ts +123 -98
- package/types/gravionlabs-helix-core-terminal.d.ts +142 -124
- package/types/gravionlabs-helix-core-textarea.d.ts +147 -110
- package/types/gravionlabs-helix-core-themes-aura.d.ts +957 -942
- package/types/gravionlabs-helix-core-themes-lara.d.ts +968 -953
- package/types/gravionlabs-helix-core-themes-nora.d.ts +954 -939
- package/types/gravionlabs-helix-core-themes-types.d.ts +17940 -18746
- package/types/gravionlabs-helix-core-themes.d.ts +8 -11
- package/types/gravionlabs-helix-core-tieredmenu.d.ts +583 -398
- package/types/gravionlabs-helix-core-timeline.d.ts +145 -125
- package/types/gravionlabs-helix-core-toast.d.ts +408 -275
- package/types/gravionlabs-helix-core-togglebutton.d.ts +264 -188
- package/types/gravionlabs-helix-core-toggleswitch.d.ts +202 -150
- package/types/gravionlabs-helix-core-toolbar.d.ts +100 -90
- package/types/gravionlabs-helix-core-tooltip.d.ts +362 -256
- package/types/gravionlabs-helix-core-tree.d.ts +902 -630
- package/types/gravionlabs-helix-core-treeselect.d.ts +770 -559
- package/types/gravionlabs-helix-core-treetable.d.ts +1715 -1205
- package/types/gravionlabs-helix-core-ts-helpers.d.ts +4 -6
- package/types/gravionlabs-helix-core-types-accordion.d.ts +42 -45
- package/types/gravionlabs-helix-core-types-autocomplete.d.ts +230 -233
- package/types/gravionlabs-helix-core-types-avatar.d.ts +23 -26
- package/types/gravionlabs-helix-core-types-avatargroup.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-badge.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-blockui.d.ts +18 -21
- package/types/gravionlabs-helix-core-types-breadcrumb.d.ts +65 -68
- package/types/gravionlabs-helix-core-types-button.d.ts +90 -93
- package/types/gravionlabs-helix-core-types-card.d.ts +54 -57
- package/types/gravionlabs-helix-core-types-carousel.d.ts +107 -110
- package/types/gravionlabs-helix-core-types-cascadeselect.d.ts +151 -157
- package/types/gravionlabs-helix-core-types-chart.d.ts +15 -18
- package/types/gravionlabs-helix-core-types-checkbox.d.ts +48 -51
- package/types/gravionlabs-helix-core-types-chip.d.ts +49 -52
- package/types/gravionlabs-helix-core-types-colorpicker.d.ts +58 -61
- package/types/gravionlabs-helix-core-types-confirmdialog.d.ts +116 -119
- package/types/gravionlabs-helix-core-types-confirmpopup.d.ts +74 -77
- package/types/gravionlabs-helix-core-types-contextmenu.d.ts +71 -74
- package/types/gravionlabs-helix-core-types-dataview.d.ts +178 -181
- package/types/gravionlabs-helix-core-types-datepicker.d.ts +436 -439
- package/types/gravionlabs-helix-core-types-dialog.d.ts +86 -89
- package/types/gravionlabs-helix-core-types-divider.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-dock.d.ts +44 -47
- package/types/gravionlabs-helix-core-types-drawer.d.ts +61 -64
- package/types/gravionlabs-helix-core-types-editor.d.ts +143 -146
- package/types/gravionlabs-helix-core-types-fieldset.d.ts +69 -73
- package/types/gravionlabs-helix-core-types-fileupload.d.ts +260 -265
- package/types/gravionlabs-helix-core-types-floatlabel.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-fluid.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-galleria.d.ts +204 -207
- package/types/gravionlabs-helix-core-types-iconfield.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-iftalabel.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-image.d.ts +113 -116
- package/types/gravionlabs-helix-core-types-imagecompare.d.ts +22 -25
- package/types/gravionlabs-helix-core-types-inplace.d.ts +46 -49
- package/types/gravionlabs-helix-core-types-inputgroup.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-inputgroupaddon.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-inputicon.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-inputmask.d.ts +30 -33
- package/types/gravionlabs-helix-core-types-inputnumber.d.ts +68 -71
- package/types/gravionlabs-helix-core-types-inputotp.d.ts +67 -70
- package/types/gravionlabs-helix-core-types-inputtext.d.ts +7 -10
- package/types/gravionlabs-helix-core-types-knob.d.ts +23 -26
- package/types/gravionlabs-helix-core-types-listbox.d.ts +262 -266
- package/types/gravionlabs-helix-core-types-megamenu.d.ts +112 -115
- package/types/gravionlabs-helix-core-types-menu.d.ts +83 -86
- package/types/gravionlabs-helix-core-types-menubar.d.ts +98 -101
- package/types/gravionlabs-helix-core-types-message.d.ts +61 -64
- package/types/gravionlabs-helix-core-types-metergroup.d.ts +135 -138
- package/types/gravionlabs-helix-core-types-motion.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-multiselect.d.ts +302 -306
- package/types/gravionlabs-helix-core-types-orderlist.d.ts +125 -128
- package/types/gravionlabs-helix-core-types-organizationchart.d.ts +90 -96
- package/types/gravionlabs-helix-core-types-overlay.d.ts +31 -34
- package/types/gravionlabs-helix-core-types-overlaybadge.d.ts +17 -20
- package/types/gravionlabs-helix-core-types-paginator.d.ts +131 -134
- package/types/gravionlabs-helix-core-types-panel.d.ts +89 -93
- package/types/gravionlabs-helix-core-types-panelmenu.d.ts +105 -108
- package/types/gravionlabs-helix-core-types-password.d.ts +94 -97
- package/types/gravionlabs-helix-core-types-picklist.d.ts +240 -250
- package/types/gravionlabs-helix-core-types-popover.d.ts +33 -36
- package/types/gravionlabs-helix-core-types-progressbar.d.ts +32 -35
- package/types/gravionlabs-helix-core-types-progressspinner.d.ts +19 -22
- package/types/gravionlabs-helix-core-types-radiobutton.d.ts +29 -32
- package/types/gravionlabs-helix-core-types-rating.d.ts +62 -65
- package/types/gravionlabs-helix-core-types-scroller.d.ts +142 -146
- package/types/gravionlabs-helix-core-types-scrollpanel.d.ts +30 -33
- package/types/gravionlabs-helix-core-types-scrolltop.d.ts +35 -38
- package/types/gravionlabs-helix-core-types-select.d.ts +245 -248
- package/types/gravionlabs-helix-core-types-selectbutton.d.ts +56 -59
- package/types/gravionlabs-helix-core-types-skeleton.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-slider.d.ts +50 -53
- package/types/gravionlabs-helix-core-types-speeddial.d.ts +69 -72
- package/types/gravionlabs-helix-core-types-splitbutton.d.ts +41 -44
- package/types/gravionlabs-helix-core-types-splitter.d.ts +36 -40
- package/types/gravionlabs-helix-core-types-stepper.d.ts +68 -71
- package/types/gravionlabs-helix-core-types-table.d.ts +721 -727
- package/types/gravionlabs-helix-core-types-tabs.d.ts +51 -54
- package/types/gravionlabs-helix-core-types-tag.d.ts +26 -29
- package/types/gravionlabs-helix-core-types-terminal.d.ts +43 -46
- package/types/gravionlabs-helix-core-types-textarea.d.ts +11 -14
- package/types/gravionlabs-helix-core-types-tieredmenu.d.ts +69 -72
- package/types/gravionlabs-helix-core-types-timeline.d.ts +58 -61
- package/types/gravionlabs-helix-core-types-toast.d.ts +86 -89
- package/types/gravionlabs-helix-core-types-togglebutton.d.ts +51 -54
- package/types/gravionlabs-helix-core-types-toggleswitch.d.ts +41 -44
- package/types/gravionlabs-helix-core-types-toolbar.d.ts +34 -37
- package/types/gravionlabs-helix-core-types-tooltip.d.ts +15 -18
- package/types/gravionlabs-helix-core-types-tree.d.ts +230 -239
- package/types/gravionlabs-helix-core-types-treeselect.d.ts +195 -199
- package/types/gravionlabs-helix-core-types-treetable.d.ts +486 -491
- package/types/gravionlabs-helix-core-uix-motion.d.ts +177 -190
- package/types/gravionlabs-helix-core-uix-styled.d.ts +254 -277
- package/types/gravionlabs-helix-core-uix-utils.d.ts +39 -176
- package/types/gravionlabs-helix-core-usestyle.d.ts +12 -15
- package/types/gravionlabs-helix-core-utils.d.ts +45 -50
- package/types/gravionlabs-helix-core-validators.d.ts +29 -34
- package/types/gravionlabs-helix-core.d.ts +2 -2
- package/fesm2022/gravionlabs-helix-core-icons.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-themes-types.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-ts-helpers.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-accordion.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-autocomplete.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-avatar.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-avatargroup.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-badge.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-blockui.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-breadcrumb.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-button.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-card.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-carousel.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-cascadeselect.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-chart.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-checkbox.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-chip.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-colorpicker.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-confirmdialog.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-confirmpopup.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-contextmenu.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-dataview.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-datepicker.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-dialog.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-divider.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-dock.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-drawer.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-editor.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-fieldset.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-fileupload.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-floatlabel.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-fluid.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-galleria.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-iconfield.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-iftalabel.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-image.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-imagecompare.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-inplace.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-inputgroup.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-inputgroupaddon.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-inputicon.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-inputmask.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-inputnumber.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-inputotp.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-inputtext.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-knob.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-listbox.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-megamenu.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-menu.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-menubar.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-message.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-metergroup.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-motion.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-multiselect.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-orderlist.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-organizationchart.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-overlay.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-overlaybadge.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-paginator.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-panel.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-panelmenu.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-password.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-picklist.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-popover.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-progressbar.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-progressspinner.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-radiobutton.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-rating.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-scroller.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-scrollpanel.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-scrolltop.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-select.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-selectbutton.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-skeleton.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-slider.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-speeddial.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-splitbutton.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-splitter.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-stepper.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-table.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-tabs.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-tag.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-terminal.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-textarea.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-tieredmenu.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-timeline.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-toast.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-togglebutton.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-toggleswitch.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-toolbar.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-tooltip.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-tree.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-treeselect.mjs.map +0 -1
- package/fesm2022/gravionlabs-helix-core-types-treetable.mjs.map +0 -1
|
@@ -1,304 +1,214 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const TRANSITION = 'transition';
|
|
5
|
-
/**
|
|
6
|
-
* Determines whether motion effects should be skipped based on the provided options.
|
|
7
|
-
* @param options - The motion options to evaluate.
|
|
8
|
-
* @returns A boolean indicating whether motion should be skipped.
|
|
9
|
-
*/
|
|
1
|
+
import { addClass, getHiddenElementDimensions, isPrefersReducedMotion, removeClass, setCSSProperty, toMs } from "@gravionlabs/helix-core/uix/utils";
|
|
2
|
+
const ANIMATION = "animation";
|
|
3
|
+
const TRANSITION = "transition";
|
|
10
4
|
function shouldSkipMotion(options) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
return options.disabled || !!(options.safe && isPrefersReducedMotion());
|
|
5
|
+
if (!options) return false;
|
|
6
|
+
return options.disabled || !!(options.safe && isPrefersReducedMotion());
|
|
15
7
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Merges the provided motion options with the default options.
|
|
18
|
-
* @param inOptions - The motion options to merge.
|
|
19
|
-
* @param defaultOptions - The default motion options.
|
|
20
|
-
* @returns The merged motion options.
|
|
21
|
-
*/
|
|
22
8
|
function mergeOptions(inOptions, defaultOptions) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}, {})
|
|
32
|
-
};
|
|
9
|
+
if (!inOptions) return defaultOptions;
|
|
10
|
+
return {
|
|
11
|
+
...inOptions,
|
|
12
|
+
...Object.entries(defaultOptions).reduce((acc, [key, value]) => {
|
|
13
|
+
acc[key] = inOptions[key] ?? value;
|
|
14
|
+
return acc;
|
|
15
|
+
}, {})
|
|
16
|
+
};
|
|
33
17
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Resolves class names for motion phases based on the provided options.
|
|
36
|
-
* @param options - The motion options containing class names and base name.
|
|
37
|
-
* @returns The resolved class names organized by motion phase.
|
|
38
|
-
*/
|
|
39
18
|
function resolveClassNames(options) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
19
|
+
const { name, enterClass, leaveClass } = options || {};
|
|
20
|
+
return {
|
|
21
|
+
enter: {
|
|
22
|
+
from: enterClass?.from || `${name}-enter-from`,
|
|
23
|
+
to: enterClass?.to || `${name}-enter-to`,
|
|
24
|
+
active: enterClass?.active || `${name}-enter-active`
|
|
25
|
+
},
|
|
26
|
+
leave: {
|
|
27
|
+
from: leaveClass?.from || `${name}-leave-from`,
|
|
28
|
+
to: leaveClass?.to || `${name}-leave-to`,
|
|
29
|
+
active: leaveClass?.active || `${name}-leave-active`
|
|
30
|
+
}
|
|
31
|
+
};
|
|
53
32
|
}
|
|
54
|
-
/**
|
|
55
|
-
* Retrieves the motion hooks organized by phase based on the provided options.
|
|
56
|
-
* @param options - The motion options containing hooks.
|
|
57
|
-
* @returns The motion hooks organized by phase.
|
|
58
|
-
*/
|
|
59
33
|
function getMotionHooks(options) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
34
|
+
return {
|
|
35
|
+
enter: {
|
|
36
|
+
onBefore: options?.onBeforeEnter,
|
|
37
|
+
onStart: options?.onEnter,
|
|
38
|
+
onAfter: options?.onAfterEnter,
|
|
39
|
+
onCancelled: options?.onEnterCancelled
|
|
40
|
+
},
|
|
41
|
+
leave: {
|
|
42
|
+
onBefore: options?.onBeforeLeave,
|
|
43
|
+
onStart: options?.onLeave,
|
|
44
|
+
onAfter: options?.onAfterLeave,
|
|
45
|
+
onCancelled: options?.onLeaveCancelled
|
|
46
|
+
}
|
|
47
|
+
};
|
|
74
48
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Retrieves motion metadata including type, timeout, and count for the given element.
|
|
77
|
-
* @param element - The target element to retrieve motion metadata from.
|
|
78
|
-
* @param expectedType - The expected type of motion ('transition' or 'animation').
|
|
79
|
-
* @returns The motion metadata including type, timeout, and count.
|
|
80
|
-
*/
|
|
81
49
|
function getMotionMetadata(element, expectedType) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
count
|
|
118
|
-
};
|
|
50
|
+
const styles = window.getComputedStyle(element);
|
|
51
|
+
const getDelaysAndDurations = (type) => {
|
|
52
|
+
const delays = styles[`${type}Delay`];
|
|
53
|
+
const durations = styles[`${type}Duration`];
|
|
54
|
+
return [delays.split(", ").map(toMs), durations.split(", ").map(toMs)];
|
|
55
|
+
};
|
|
56
|
+
const [transitionDelays, transitionDurations] = getDelaysAndDurations(TRANSITION);
|
|
57
|
+
const [animationDelays, animationDurations] = getDelaysAndDurations(ANIMATION);
|
|
58
|
+
const transitionTimeout = Math.max(...transitionDurations.map((d, i) => d + transitionDelays[i]));
|
|
59
|
+
const animationTimeout = Math.max(...animationDurations.map((d, i) => d + animationDelays[i]));
|
|
60
|
+
let type = void 0;
|
|
61
|
+
let timeout = 0;
|
|
62
|
+
let count = 0;
|
|
63
|
+
if (expectedType === "transition") {
|
|
64
|
+
if (transitionTimeout > 0) {
|
|
65
|
+
type = TRANSITION;
|
|
66
|
+
timeout = transitionTimeout;
|
|
67
|
+
count = transitionDurations.length;
|
|
68
|
+
}
|
|
69
|
+
} else if (expectedType === "animation") {
|
|
70
|
+
if (animationTimeout > 0) {
|
|
71
|
+
type = ANIMATION;
|
|
72
|
+
timeout = animationTimeout;
|
|
73
|
+
count = animationDurations.length;
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
77
|
+
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : void 0;
|
|
78
|
+
count = type ? type === "transition" ? transitionDurations.length : animationDurations.length : 0;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
type,
|
|
82
|
+
timeout,
|
|
83
|
+
count
|
|
84
|
+
};
|
|
119
85
|
}
|
|
120
|
-
/**
|
|
121
|
-
* Resolves the duration for a given animation phase.
|
|
122
|
-
* @param duration - The duration can be a number or an object with `enter` and `leave` properties.
|
|
123
|
-
* @param phase - The phase of the transition/animation, either 'enter' or 'leave'.
|
|
124
|
-
* @returns The resolved duration in milliseconds or null if not specified.
|
|
125
|
-
*/
|
|
126
86
|
function resolveDuration(duration, phase) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
else if (typeof duration === 'object' && duration[phase] != null) {
|
|
131
|
-
return duration[phase];
|
|
132
|
-
}
|
|
133
|
-
return null;
|
|
87
|
+
if (typeof duration === "number") return duration;
|
|
88
|
+
else if (typeof duration === "object" && duration[phase] != null) return duration[phase];
|
|
89
|
+
return null;
|
|
134
90
|
}
|
|
135
|
-
/**
|
|
136
|
-
* Sets CSS custom properties for auto height and/or width on the given element.
|
|
137
|
-
* @param element - The target HTML element.
|
|
138
|
-
* @param autoHeight - Whether to set the auto height CSS variable.
|
|
139
|
-
* @param autoWidth - Whether to set the auto width CSS variable.
|
|
140
|
-
* @returns
|
|
141
|
-
*/
|
|
142
91
|
function setAutoDimensionVariables(element, autoHeight = true, autoWidth = false) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
setCSSProperty(element, '--pui-motion-height', dimensions.height + 'px');
|
|
148
|
-
}
|
|
149
|
-
if (autoWidth) {
|
|
150
|
-
setCSSProperty(element, '--pui-motion-width', dimensions.width + 'px');
|
|
151
|
-
}
|
|
92
|
+
if (!autoHeight && !autoWidth) return;
|
|
93
|
+
const dimensions = getHiddenElementDimensions(element);
|
|
94
|
+
if (autoHeight) setCSSProperty(element, "--pui-motion-height", dimensions.height + "px");
|
|
95
|
+
if (autoWidth) setCSSProperty(element, "--pui-motion-width", dimensions.width + "px");
|
|
152
96
|
}
|
|
153
|
-
|
|
154
97
|
const DEFAULT_MOTION_OPTIONS = {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
98
|
+
name: "p",
|
|
99
|
+
safe: true,
|
|
100
|
+
disabled: false,
|
|
101
|
+
enter: true,
|
|
102
|
+
leave: true,
|
|
103
|
+
autoHeight: true,
|
|
104
|
+
autoWidth: false
|
|
162
105
|
};
|
|
163
|
-
/**
|
|
164
|
-
* Creates a MotionInstance for the given element with the specified options.
|
|
165
|
-
* @param element - The target element for motion effects.
|
|
166
|
-
* @param options - Configuration options for the motion instance.
|
|
167
|
-
* @returns A MotionInstance that can be used to control the motion.
|
|
168
|
-
*/
|
|
169
106
|
function createMotion(element, options) {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
instance.cancel();
|
|
246
|
-
init(newOptions);
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
if (opts.appear)
|
|
250
|
-
instance.enter();
|
|
251
|
-
return instance;
|
|
107
|
+
if (!element) throw new Error("Element is required.");
|
|
108
|
+
const opts = {};
|
|
109
|
+
let skipMotion = false;
|
|
110
|
+
let classNames = {};
|
|
111
|
+
let cancelCurrent = null;
|
|
112
|
+
let hooks = {};
|
|
113
|
+
const init = (newOpts) => {
|
|
114
|
+
Object.assign(opts, mergeOptions(newOpts, DEFAULT_MOTION_OPTIONS));
|
|
115
|
+
if (!opts.enter && !opts.leave) throw new Error("Enter or leave must be true.");
|
|
116
|
+
hooks = getMotionHooks(opts);
|
|
117
|
+
skipMotion = shouldSkipMotion(opts);
|
|
118
|
+
classNames = resolveClassNames(opts);
|
|
119
|
+
cancelCurrent = null;
|
|
120
|
+
};
|
|
121
|
+
const run = async (phase) => {
|
|
122
|
+
cancelCurrent?.();
|
|
123
|
+
const { onBefore, onStart, onAfter, onCancelled } = hooks[phase] || {};
|
|
124
|
+
const event = { element };
|
|
125
|
+
if (skipMotion) {
|
|
126
|
+
onBefore?.(event);
|
|
127
|
+
onStart?.(event);
|
|
128
|
+
onAfter?.(event);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const { from: fromClass, active: activeClass, to: toClass } = classNames[phase] || {};
|
|
132
|
+
setAutoDimensionVariables(element, opts.autoHeight, opts.autoWidth);
|
|
133
|
+
onBefore?.(event);
|
|
134
|
+
addClass(element, fromClass);
|
|
135
|
+
addClass(element, activeClass);
|
|
136
|
+
element.offsetHeight;
|
|
137
|
+
removeClass(element, fromClass);
|
|
138
|
+
addClass(element, toClass);
|
|
139
|
+
onStart?.(event);
|
|
140
|
+
return new Promise((resolve) => {
|
|
141
|
+
const duration = resolveDuration(opts.duration, phase);
|
|
142
|
+
const cleanup = () => {
|
|
143
|
+
removeClass(element, [toClass, activeClass]);
|
|
144
|
+
cancelCurrent = null;
|
|
145
|
+
};
|
|
146
|
+
const onDone = () => {
|
|
147
|
+
cleanup();
|
|
148
|
+
onAfter?.(event);
|
|
149
|
+
resolve();
|
|
150
|
+
};
|
|
151
|
+
cancelCurrent = () => {
|
|
152
|
+
cleanup();
|
|
153
|
+
onCancelled?.(event);
|
|
154
|
+
resolve();
|
|
155
|
+
};
|
|
156
|
+
whenEnd(element, opts.type, duration, onDone);
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
init(options);
|
|
160
|
+
const instance = {
|
|
161
|
+
enter: () => {
|
|
162
|
+
if (!opts.enter) return Promise.resolve();
|
|
163
|
+
return run("enter");
|
|
164
|
+
},
|
|
165
|
+
leave: () => {
|
|
166
|
+
if (!opts.leave) return Promise.resolve();
|
|
167
|
+
return run("leave");
|
|
168
|
+
},
|
|
169
|
+
cancel: () => {
|
|
170
|
+
cancelCurrent?.();
|
|
171
|
+
cancelCurrent = null;
|
|
172
|
+
},
|
|
173
|
+
update: (newElement, newOptions) => {
|
|
174
|
+
if (!newElement) throw new Error("Element is required.");
|
|
175
|
+
element = newElement;
|
|
176
|
+
instance.cancel();
|
|
177
|
+
init(newOptions);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
if (opts.appear) instance.enter();
|
|
181
|
+
return instance;
|
|
252
182
|
}
|
|
253
183
|
let endId = 0;
|
|
254
|
-
/**
|
|
255
|
-
* Ported from Vue.js Transition Component;
|
|
256
|
-
* @see https://github.com/vuejs/core/blob/main/packages/runtime-dom/src/components/Transition.ts#L348
|
|
257
|
-
*
|
|
258
|
-
* When the transition is triggered, it waits for the end of the motion (transition or animation)
|
|
259
|
-
* @param element - The element to wait for the motion end.
|
|
260
|
-
* @param expectedType - The expected type of motion (transition or animation).
|
|
261
|
-
* @param explicitTimeout - An optional explicit timeout in milliseconds.
|
|
262
|
-
* @param resolve - A function to call when the motion ends.
|
|
263
|
-
* @returns A timeout ID if an explicit timeout is provided, otherwise undefined.
|
|
264
|
-
*/
|
|
265
184
|
function whenEnd(element, expectedType, explicitTimeout, resolve) {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
setTimeout(() => {
|
|
293
|
-
if (ended < count) {
|
|
294
|
-
end();
|
|
295
|
-
}
|
|
296
|
-
}, timeout + 1);
|
|
185
|
+
const id = element._motionEndId = ++endId;
|
|
186
|
+
const resolveIfNotStale = () => {
|
|
187
|
+
if (id === element._motionEndId) resolve();
|
|
188
|
+
};
|
|
189
|
+
if (explicitTimeout != null) return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
190
|
+
const { type, timeout, count } = getMotionMetadata(element, expectedType);
|
|
191
|
+
if (!type) {
|
|
192
|
+
resolve();
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
const endEvent = type + "end";
|
|
196
|
+
let ended = 0;
|
|
197
|
+
const end = () => {
|
|
198
|
+
element.removeEventListener(endEvent, onEnd, true);
|
|
199
|
+
resolveIfNotStale();
|
|
200
|
+
};
|
|
201
|
+
const onEnd = (event) => {
|
|
202
|
+
if (event.target === element && ++ended >= count) end();
|
|
203
|
+
};
|
|
204
|
+
element.addEventListener(endEvent, onEnd, {
|
|
205
|
+
capture: true,
|
|
206
|
+
once: true
|
|
207
|
+
});
|
|
208
|
+
setTimeout(() => {
|
|
209
|
+
if (ended < count) end();
|
|
210
|
+
}, timeout + 1);
|
|
297
211
|
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Generated bundle index. Do not edit.
|
|
301
|
-
*/
|
|
302
|
-
|
|
303
212
|
export { ANIMATION, DEFAULT_MOTION_OPTIONS, TRANSITION, createMotion, getMotionHooks, getMotionMetadata, mergeOptions, resolveClassNames, resolveDuration, setAutoDimensionVariables, shouldSkipMotion };
|
|
304
|
-
|
|
213
|
+
|
|
214
|
+
//# sourceMappingURL=gravionlabs-helix-core-uix-motion.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gravionlabs-helix-core-uix-motion.mjs","sources":["../../../projects/core/uix/motion/utils/index.ts","../../../projects/core/uix/motion/config/index.ts","../../../projects/core/uix/motion/gravionlabs-helix-core-uix-motion.ts"],"sourcesContent":["import { getHiddenElementDimensions, isPrefersReducedMotion, setCSSProperty, toMs } from '@gravionlabs/helix-core/uix/utils';\nimport type { MotionClassNamesWithPhase, MotionHooksWithPhase, MotionMetadata, MotionOptions, MotionPhase, MotionType } from '../types';\n\nexport const ANIMATION = 'animation';\nexport const TRANSITION = 'transition';\n\n/**\n * Determines whether motion effects should be skipped based on the provided options.\n * @param options - The motion options to evaluate.\n * @returns A boolean indicating whether motion should be skipped.\n */\nexport function shouldSkipMotion(options: MotionOptions | undefined): boolean {\n if (!options) {\n return false;\n }\n\n return options.disabled || !!(options.safe && isPrefersReducedMotion());\n}\n\n/**\n * Merges the provided motion options with the default options.\n * @param inOptions - The motion options to merge.\n * @param defaultOptions - The default motion options.\n * @returns The merged motion options.\n */\nexport function mergeOptions(inOptions: MotionOptions | undefined, defaultOptions: MotionOptions): MotionOptions {\n if (!inOptions) {\n return defaultOptions;\n }\n\n return {\n ...inOptions,\n ...(Object.entries(defaultOptions).reduce((acc: Record<string, unknown>, [key, value]) => {\n acc[key] = (inOptions as Record<string, unknown>)[key] ?? value;\n\n return acc;\n }, {}) as MotionOptions)\n };\n}\n\n/**\n * Resolves class names for motion phases based on the provided options.\n * @param options - The motion options containing class names and base name.\n * @returns The resolved class names organized by motion phase.\n */\nexport function resolveClassNames(options: MotionOptions | undefined): MotionClassNamesWithPhase {\n const { name, enterClass, leaveClass } = options || {};\n\n return {\n enter: {\n from: enterClass?.from || `${name}-enter-from`,\n to: enterClass?.to || `${name}-enter-to`,\n active: enterClass?.active || `${name}-enter-active`\n },\n leave: {\n from: leaveClass?.from || `${name}-leave-from`,\n to: leaveClass?.to || `${name}-leave-to`,\n active: leaveClass?.active || `${name}-leave-active`\n }\n };\n}\n\n/**\n * Retrieves the motion hooks organized by phase based on the provided options.\n * @param options - The motion options containing hooks.\n * @returns The motion hooks organized by phase.\n */\nexport function getMotionHooks(options: MotionOptions | undefined): MotionHooksWithPhase {\n return {\n enter: {\n onBefore: options?.onBeforeEnter,\n onStart: options?.onEnter,\n onAfter: options?.onAfterEnter,\n onCancelled: options?.onEnterCancelled\n },\n leave: {\n onBefore: options?.onBeforeLeave,\n onStart: options?.onLeave,\n onAfter: options?.onAfterLeave,\n onCancelled: options?.onLeaveCancelled\n }\n };\n}\n\n/**\n * Retrieves motion metadata including type, timeout, and count for the given element.\n * @param element - The target element to retrieve motion metadata from.\n * @param expectedType - The expected type of motion ('transition' or 'animation').\n * @returns The motion metadata including type, timeout, and count.\n */\nexport function getMotionMetadata(element: Element, expectedType?: MotionMetadata['type']): MotionMetadata {\n const styles = window.getComputedStyle(element);\n\n const getDelaysAndDurations = (type: MotionType): [number[], number[]] => {\n const delays = styles[`${type}Delay`];\n const durations = styles[`${type}Duration`];\n\n return [delays.split(', ').map(toMs), durations.split(', ').map(toMs)];\n };\n\n const [transitionDelays, transitionDurations] = getDelaysAndDurations(TRANSITION);\n const [animationDelays, animationDurations] = getDelaysAndDurations(ANIMATION);\n\n const transitionTimeout = Math.max(...transitionDurations.map((d, i) => d + transitionDelays[i]));\n const animationTimeout = Math.max(...animationDurations.map((d, i) => d + animationDelays[i]));\n\n let type: MotionMetadata['type'] = undefined;\n let timeout = 0;\n let count = 0;\n\n if (expectedType === TRANSITION) {\n if (transitionTimeout > 0) {\n type = TRANSITION;\n timeout = transitionTimeout;\n count = transitionDurations.length;\n }\n } else if (expectedType === ANIMATION) {\n if (animationTimeout > 0) {\n type = ANIMATION;\n timeout = animationTimeout;\n count = animationDurations.length;\n }\n } else {\n timeout = Math.max(transitionTimeout, animationTimeout);\n type = timeout > 0 ? (transitionTimeout > animationTimeout ? TRANSITION : ANIMATION) : undefined;\n count = type ? (type === TRANSITION ? transitionDurations.length : animationDurations.length) : 0;\n }\n\n return {\n type,\n timeout,\n count\n };\n}\n\n/**\n * Resolves the duration for a given animation phase.\n * @param duration - The duration can be a number or an object with `enter` and `leave` properties.\n * @param phase - The phase of the transition/animation, either 'enter' or 'leave'.\n * @returns The resolved duration in milliseconds or null if not specified.\n */\nexport function resolveDuration(duration: MotionOptions['duration'], phase: MotionPhase): number | null {\n if (typeof duration === 'number') {\n return duration;\n } else if (typeof duration === 'object' && duration[phase] != null) {\n return duration[phase];\n }\n\n return null;\n}\n\n/**\n * Sets CSS custom properties for auto height and/or width on the given element.\n * @param element - The target HTML element.\n * @param autoHeight - Whether to set the auto height CSS variable.\n * @param autoWidth - Whether to set the auto width CSS variable.\n * @returns\n */\nexport function setAutoDimensionVariables(element: HTMLElement, autoHeight: boolean = true, autoWidth: boolean = false): void {\n if (!autoHeight && !autoWidth) return;\n\n const dimensions = getHiddenElementDimensions(element);\n\n if (autoHeight) {\n setCSSProperty(element, '--pui-motion-height', dimensions.height + 'px');\n }\n\n if (autoWidth) {\n setCSSProperty(element, '--pui-motion-width', dimensions.width + 'px');\n }\n}\n","import { addClass, removeClass } from '@gravionlabs/helix-core/uix/utils';\nimport type { MotionClassNamesWithPhase, MotionHooksWithPhase, MotionInstance, MotionOptions, MotionPhase, MotionType } from '../types';\nimport { getMotionHooks, getMotionMetadata, mergeOptions, resolveClassNames, resolveDuration, setAutoDimensionVariables, shouldSkipMotion } from '../utils';\n\nexport const DEFAULT_MOTION_OPTIONS: MotionOptions = {\n name: 'p',\n safe: true,\n disabled: false,\n enter: true,\n leave: true,\n autoHeight: true,\n autoWidth: false\n};\n\n/**\n * Creates a MotionInstance for the given element with the specified options.\n * @param element - The target element for motion effects.\n * @param options - Configuration options for the motion instance.\n * @returns A MotionInstance that can be used to control the motion.\n */\nexport function createMotion(element: Element, options?: MotionOptions): MotionInstance {\n if (!element) throw new Error('Element is required.');\n\n const opts: MotionOptions = {};\n let skipMotion = false;\n let classNames: MotionClassNamesWithPhase = {} as MotionClassNamesWithPhase;\n let cancelCurrent: (() => void) | null = null;\n let hooks: MotionHooksWithPhase = {};\n\n const init = (newOpts?: MotionOptions) => {\n Object.assign(opts, mergeOptions(newOpts, DEFAULT_MOTION_OPTIONS));\n if (!opts.enter && !opts.leave) throw new Error('Enter or leave must be true.');\n\n hooks = getMotionHooks(opts);\n skipMotion = shouldSkipMotion(opts);\n classNames = resolveClassNames(opts);\n cancelCurrent = null;\n };\n\n const run = async (phase: MotionPhase): Promise<void> => {\n cancelCurrent?.();\n\n const { onBefore, onStart, onAfter, onCancelled } = hooks[phase] || {};\n const event = { element };\n\n if (skipMotion) {\n onBefore?.(event);\n onStart?.(event);\n onAfter?.(event);\n\n return;\n }\n\n const { from: fromClass, active: activeClass, to: toClass } = classNames[phase] || {};\n\n setAutoDimensionVariables(element as HTMLElement, opts.autoHeight, opts.autoWidth);\n\n onBefore?.(event);\n addClass(element, fromClass);\n addClass(element, activeClass);\n\n //await nextFrame();\n void (element as HTMLElement).offsetHeight; // force reflow\n\n removeClass(element, fromClass);\n addClass(element, toClass);\n onStart?.(event);\n\n return new Promise((resolve) => {\n const duration = resolveDuration(opts.duration, phase);\n\n const cleanup = () => {\n removeClass(element, [toClass, activeClass]);\n cancelCurrent = null;\n };\n\n const onDone = () => {\n cleanup();\n onAfter?.(event);\n resolve();\n };\n\n cancelCurrent = () => {\n cleanup();\n onCancelled?.(event);\n resolve();\n };\n\n whenEnd(element, opts.type, duration, onDone);\n });\n };\n\n init(options);\n\n const instance: MotionInstance = {\n enter: () => {\n if (!opts.enter) return Promise.resolve();\n\n return run('enter');\n },\n leave: () => {\n if (!opts.leave) return Promise.resolve();\n\n return run('leave');\n },\n cancel: () => {\n cancelCurrent?.();\n cancelCurrent = null;\n },\n update: (newElement?: Element, newOptions?: MotionOptions) => {\n if (!newElement) throw new Error('Element is required.');\n\n element = newElement as HTMLElement;\n instance.cancel();\n init(newOptions);\n }\n };\n\n if (opts.appear) instance.enter();\n\n return instance;\n}\n\nlet endId = 0;\n\n/**\n * Ported from Vue.js Transition Component;\n * @see https://github.com/vuejs/core/blob/main/packages/runtime-dom/src/components/Transition.ts#L348\n *\n * When the transition is triggered, it waits for the end of the motion (transition or animation)\n * @param element - The element to wait for the motion end.\n * @param expectedType - The expected type of motion (transition or animation).\n * @param explicitTimeout - An optional explicit timeout in milliseconds.\n * @param resolve - A function to call when the motion ends.\n * @returns A timeout ID if an explicit timeout is provided, otherwise undefined.\n */\nfunction whenEnd(element: Element & { _motionEndId?: number }, expectedType: MotionType | undefined, explicitTimeout: number | null, resolve: () => void) {\n const id = (element._motionEndId = ++endId);\n\n const resolveIfNotStale = () => {\n if (id === element._motionEndId) {\n resolve();\n }\n };\n\n if (explicitTimeout != null) {\n return setTimeout(resolveIfNotStale, explicitTimeout);\n }\n\n const { type, timeout, count } = getMotionMetadata(element, expectedType);\n\n if (!type) {\n resolve();\n\n return;\n }\n\n const endEvent = type + 'end';\n let ended = 0;\n\n const end = () => {\n element.removeEventListener(endEvent, onEnd, true);\n resolveIfNotStale();\n };\n\n const onEnd = (event: Event) => {\n if (event.target === element && ++ended >= count) {\n end();\n }\n };\n\n element.addEventListener(endEvent, onEnd, { capture: true, once: true });\n setTimeout(() => {\n if (ended < count) {\n end();\n }\n }, timeout + 1);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"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AG,CAAC,KAAY,KAAI;QAC3B,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO,IAAI,EAAE,KAAK,IAAI,KAAK,EAAE;AAC9C,YAAA,GAAG,EAAE;QACT;AACJ,IAAA,CAAC;AAED,IAAA,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxE,UAAU,CAAC,MAAK;AACZ,QAAA,IAAI,KAAK,GAAG,KAAK,EAAE;AACf,YAAA,GAAG,EAAE;QACT;AACJ,IAAA,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC;AACnB;;ACjLA;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"gravionlabs-helix-core-uix-motion.mjs","names":[],"sources":["../../../projects/core/uix/motion/utils/index.ts","../../../projects/core/uix/motion/config/index.ts"],"sourcesContent":["import { getHiddenElementDimensions, isPrefersReducedMotion, setCSSProperty, toMs } from '@gravionlabs/helix-core/uix/utils';\nimport type { MotionClassNamesWithPhase, MotionHooksWithPhase, MotionMetadata, MotionOptions, MotionPhase, MotionType } from '../types';\n\nexport const ANIMATION = 'animation';\nexport const TRANSITION = 'transition';\n\n/**\n * Determines whether motion effects should be skipped based on the provided options.\n * @param options - The motion options to evaluate.\n * @returns A boolean indicating whether motion should be skipped.\n */\nexport function shouldSkipMotion(options: MotionOptions | undefined): boolean {\n if (!options) {\n return false;\n }\n\n return options.disabled || !!(options.safe && isPrefersReducedMotion());\n}\n\n/**\n * Merges the provided motion options with the default options.\n * @param inOptions - The motion options to merge.\n * @param defaultOptions - The default motion options.\n * @returns The merged motion options.\n */\nexport function mergeOptions(inOptions: MotionOptions | undefined, defaultOptions: MotionOptions): MotionOptions {\n if (!inOptions) {\n return defaultOptions;\n }\n\n return {\n ...inOptions,\n ...(Object.entries(defaultOptions).reduce((acc: Record<string, unknown>, [key, value]) => {\n acc[key] = (inOptions as Record<string, unknown>)[key] ?? value;\n\n return acc;\n }, {}) as MotionOptions)\n };\n}\n\n/**\n * Resolves class names for motion phases based on the provided options.\n * @param options - The motion options containing class names and base name.\n * @returns The resolved class names organized by motion phase.\n */\nexport function resolveClassNames(options: MotionOptions | undefined): MotionClassNamesWithPhase {\n const { name, enterClass, leaveClass } = options || {};\n\n return {\n enter: {\n from: enterClass?.from || `${name}-enter-from`,\n to: enterClass?.to || `${name}-enter-to`,\n active: enterClass?.active || `${name}-enter-active`\n },\n leave: {\n from: leaveClass?.from || `${name}-leave-from`,\n to: leaveClass?.to || `${name}-leave-to`,\n active: leaveClass?.active || `${name}-leave-active`\n }\n };\n}\n\n/**\n * Retrieves the motion hooks organized by phase based on the provided options.\n * @param options - The motion options containing hooks.\n * @returns The motion hooks organized by phase.\n */\nexport function getMotionHooks(options: MotionOptions | undefined): MotionHooksWithPhase {\n return {\n enter: {\n onBefore: options?.onBeforeEnter,\n onStart: options?.onEnter,\n onAfter: options?.onAfterEnter,\n onCancelled: options?.onEnterCancelled\n },\n leave: {\n onBefore: options?.onBeforeLeave,\n onStart: options?.onLeave,\n onAfter: options?.onAfterLeave,\n onCancelled: options?.onLeaveCancelled\n }\n };\n}\n\n/**\n * Retrieves motion metadata including type, timeout, and count for the given element.\n * @param element - The target element to retrieve motion metadata from.\n * @param expectedType - The expected type of motion ('transition' or 'animation').\n * @returns The motion metadata including type, timeout, and count.\n */\nexport function getMotionMetadata(element: Element, expectedType?: MotionMetadata['type']): MotionMetadata {\n const styles = window.getComputedStyle(element);\n\n const getDelaysAndDurations = (type: MotionType): [number[], number[]] => {\n const delays = styles[`${type}Delay`];\n const durations = styles[`${type}Duration`];\n\n return [delays.split(', ').map(toMs), durations.split(', ').map(toMs)];\n };\n\n const [transitionDelays, transitionDurations] = getDelaysAndDurations(TRANSITION);\n const [animationDelays, animationDurations] = getDelaysAndDurations(ANIMATION);\n\n const transitionTimeout = Math.max(...transitionDurations.map((d, i) => d + transitionDelays[i]));\n const animationTimeout = Math.max(...animationDurations.map((d, i) => d + animationDelays[i]));\n\n let type: MotionMetadata['type'] = undefined;\n let timeout = 0;\n let count = 0;\n\n if (expectedType === TRANSITION) {\n if (transitionTimeout > 0) {\n type = TRANSITION;\n timeout = transitionTimeout;\n count = transitionDurations.length;\n }\n } else if (expectedType === ANIMATION) {\n if (animationTimeout > 0) {\n type = ANIMATION;\n timeout = animationTimeout;\n count = animationDurations.length;\n }\n } else {\n timeout = Math.max(transitionTimeout, animationTimeout);\n type = timeout > 0 ? (transitionTimeout > animationTimeout ? TRANSITION : ANIMATION) : undefined;\n count = type ? (type === TRANSITION ? transitionDurations.length : animationDurations.length) : 0;\n }\n\n return {\n type,\n timeout,\n count\n };\n}\n\n/**\n * Resolves the duration for a given animation phase.\n * @param duration - The duration can be a number or an object with `enter` and `leave` properties.\n * @param phase - The phase of the transition/animation, either 'enter' or 'leave'.\n * @returns The resolved duration in milliseconds or null if not specified.\n */\nexport function resolveDuration(duration: MotionOptions['duration'], phase: MotionPhase): number | null {\n if (typeof duration === 'number') {\n return duration;\n } else if (typeof duration === 'object' && duration[phase] != null) {\n return duration[phase];\n }\n\n return null;\n}\n\n/**\n * Sets CSS custom properties for auto height and/or width on the given element.\n * @param element - The target HTML element.\n * @param autoHeight - Whether to set the auto height CSS variable.\n * @param autoWidth - Whether to set the auto width CSS variable.\n * @returns\n */\nexport function setAutoDimensionVariables(element: HTMLElement, autoHeight: boolean = true, autoWidth: boolean = false): void {\n if (!autoHeight && !autoWidth) return;\n\n const dimensions = getHiddenElementDimensions(element);\n\n if (autoHeight) {\n setCSSProperty(element, '--pui-motion-height', dimensions.height + 'px');\n }\n\n if (autoWidth) {\n setCSSProperty(element, '--pui-motion-width', dimensions.width + 'px');\n }\n}\n","import { addClass, removeClass } from '@gravionlabs/helix-core/uix/utils';\nimport type { MotionClassNamesWithPhase, MotionHooksWithPhase, MotionInstance, MotionOptions, MotionPhase, MotionType } from '../types';\nimport { getMotionHooks, getMotionMetadata, mergeOptions, resolveClassNames, resolveDuration, setAutoDimensionVariables, shouldSkipMotion } from '../utils';\n\nexport const DEFAULT_MOTION_OPTIONS: MotionOptions = {\n name: 'p',\n safe: true,\n disabled: false,\n enter: true,\n leave: true,\n autoHeight: true,\n autoWidth: false\n};\n\n/**\n * Creates a MotionInstance for the given element with the specified options.\n * @param element - The target element for motion effects.\n * @param options - Configuration options for the motion instance.\n * @returns A MotionInstance that can be used to control the motion.\n */\nexport function createMotion(element: Element, options?: MotionOptions): MotionInstance {\n if (!element) throw new Error('Element is required.');\n\n const opts: MotionOptions = {};\n let skipMotion = false;\n let classNames: MotionClassNamesWithPhase = {} as MotionClassNamesWithPhase;\n let cancelCurrent: (() => void) | null = null;\n let hooks: MotionHooksWithPhase = {};\n\n const init = (newOpts?: MotionOptions) => {\n Object.assign(opts, mergeOptions(newOpts, DEFAULT_MOTION_OPTIONS));\n if (!opts.enter && !opts.leave) throw new Error('Enter or leave must be true.');\n\n hooks = getMotionHooks(opts);\n skipMotion = shouldSkipMotion(opts);\n classNames = resolveClassNames(opts);\n cancelCurrent = null;\n };\n\n const run = async (phase: MotionPhase): Promise<void> => {\n cancelCurrent?.();\n\n const { onBefore, onStart, onAfter, onCancelled } = hooks[phase] || {};\n const event = { element };\n\n if (skipMotion) {\n onBefore?.(event);\n onStart?.(event);\n onAfter?.(event);\n\n return;\n }\n\n const { from: fromClass, active: activeClass, to: toClass } = classNames[phase] || {};\n\n setAutoDimensionVariables(element as HTMLElement, opts.autoHeight, opts.autoWidth);\n\n onBefore?.(event);\n addClass(element, fromClass);\n addClass(element, activeClass);\n\n //await nextFrame();\n void (element as HTMLElement).offsetHeight; // force reflow\n\n removeClass(element, fromClass);\n addClass(element, toClass);\n onStart?.(event);\n\n return new Promise((resolve) => {\n const duration = resolveDuration(opts.duration, phase);\n\n const cleanup = () => {\n removeClass(element, [toClass, activeClass]);\n cancelCurrent = null;\n };\n\n const onDone = () => {\n cleanup();\n onAfter?.(event);\n resolve();\n };\n\n cancelCurrent = () => {\n cleanup();\n onCancelled?.(event);\n resolve();\n };\n\n whenEnd(element, opts.type, duration, onDone);\n });\n };\n\n init(options);\n\n const instance: MotionInstance = {\n enter: () => {\n if (!opts.enter) return Promise.resolve();\n\n return run('enter');\n },\n leave: () => {\n if (!opts.leave) return Promise.resolve();\n\n return run('leave');\n },\n cancel: () => {\n cancelCurrent?.();\n cancelCurrent = null;\n },\n update: (newElement?: Element, newOptions?: MotionOptions) => {\n if (!newElement) throw new Error('Element is required.');\n\n element = newElement as HTMLElement;\n instance.cancel();\n init(newOptions);\n }\n };\n\n if (opts.appear) instance.enter();\n\n return instance;\n}\n\nlet endId = 0;\n\n/**\n * Ported from Vue.js Transition Component;\n * @see https://github.com/vuejs/core/blob/main/packages/runtime-dom/src/components/Transition.ts#L348\n *\n * When the transition is triggered, it waits for the end of the motion (transition or animation)\n * @param element - The element to wait for the motion end.\n * @param expectedType - The expected type of motion (transition or animation).\n * @param explicitTimeout - An optional explicit timeout in milliseconds.\n * @param resolve - A function to call when the motion ends.\n * @returns A timeout ID if an explicit timeout is provided, otherwise undefined.\n */\nfunction whenEnd(element: Element & { _motionEndId?: number }, expectedType: MotionType | undefined, explicitTimeout: number | null, resolve: () => void) {\n const id = (element._motionEndId = ++endId);\n\n const resolveIfNotStale = () => {\n if (id === element._motionEndId) {\n resolve();\n }\n };\n\n if (explicitTimeout != null) {\n return setTimeout(resolveIfNotStale, explicitTimeout);\n }\n\n const { type, timeout, count } = getMotionMetadata(element, expectedType);\n\n if (!type) {\n resolve();\n\n return;\n }\n\n const endEvent = type + 'end';\n let ended = 0;\n\n const end = () => {\n element.removeEventListener(endEvent, onEnd, true);\n resolveIfNotStale();\n };\n\n const onEnd = (event: Event) => {\n if (event.target === element && ++ended >= count) {\n end();\n }\n };\n\n element.addEventListener(endEvent, onEnd, { capture: true, once: true });\n setTimeout(() => {\n if (ended < count) {\n end();\n }\n }, timeout + 1);\n}\n"],"mappings":";AAGA,MAAa,YAAY;AACzB,MAAa,aAAa;AAO1B,SAAg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