@nova-design-system/nova-webcomponents 3.14.0 → 3.15.0
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/dist/cjs/{collapse.animation-47397763.js → collapse.animation-23b7d61b.js} +5 -2
- package/dist/cjs/collapse.animation-23b7d61b.js.map +1 -0
- package/dist/cjs/{constants-52f6f8e9.js → constants-f5633903.js} +10 -1
- package/dist/cjs/constants-f5633903.js.map +1 -0
- package/dist/cjs/{fade.animation-cf6eba0d.js → fade.animation-9294e9ee.js} +3 -3
- package/dist/cjs/fade.animation-9294e9ee.js.map +1 -0
- package/dist/cjs/{grow.animation-9258ba63.js → grow.animation-f1cef0ad.js} +2 -2
- package/dist/cjs/{grow.animation-9258ba63.js.map → grow.animation-f1cef0ad.js.map} +1 -1
- package/dist/cjs/index-c56424e5.js +4 -0
- package/dist/cjs/index.cjs.js +22 -6
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +3 -3
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +9 -9
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-notification.cjs.entry.js +70 -9
- package/dist/cjs/nv-notification.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-notificationcontainer.cjs.entry.js +43 -0
- package/dist/cjs/nv-notificationcontainer.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-popover.cjs.entry.js +3 -3
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/slide.animation-8bc27ed6.js +92 -0
- package/dist/cjs/slide.animation-8bc27ed6.js.map +1 -0
- package/dist/collection/animations/collapse.animation.js +4 -1
- package/dist/collection/animations/collapse.animation.js.map +1 -1
- package/dist/collection/animations/fade.animation.js +2 -2
- package/dist/collection/animations/fade.animation.js.map +1 -1
- package/dist/collection/animations/slide.animation.js +51 -29
- package/dist/collection/animations/slide.animation.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/nv-badge/nv-badge.js +7 -7
- package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +1 -0
- package/dist/collection/components/nv-icon/nv-icons.js +11 -1
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- package/dist/collection/components/nv-notification/nv-notification.js +104 -6
- package/dist/collection/components/nv-notification/nv-notification.js.map +1 -1
- package/dist/collection/components/nv-notification/styles/nv-notification.css +6 -6
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.css +61 -0
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.docs.js +7 -0
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.docs.js.map +1 -0
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js +76 -0
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js.map +1 -0
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/utils/constants.js +9 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/components/index.js +16 -6
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +3 -3
- package/dist/components/nv-alert.js +4 -4
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +2 -2
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-datagrid.js +3 -3
- package/dist/components/nv-dialog.js +4 -4
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +5 -5
- package/dist/components/nv-fielddaterange.js +5 -5
- package/dist/components/nv-fielddropdown.js +4 -4
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +6 -6
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +2 -2
- package/dist/components/nv-fieldselect.js +2 -2
- package/dist/components/nv-fieldslider.js +3 -3
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtime.js +4 -4
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-menu.js +3 -3
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-notification.js +74 -11
- package/dist/components/nv-notification.js.map +1 -1
- package/dist/components/nv-notificationcontainer.d.ts +11 -0
- package/dist/components/nv-notificationcontainer.js +59 -0
- package/dist/components/nv-notificationcontainer.js.map +1 -0
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-togglebutton.js +1 -1
- package/dist/components/nv-togglebuttongroup.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-1172e9bb.js → p-00cbf2a1.js} +2 -2
- package/dist/components/p-00cbf2a1.js.map +1 -0
- package/dist/components/{p-c59eccf1.js → p-0c42fafb.js} +3 -3
- package/dist/components/{p-c59eccf1.js.map → p-0c42fafb.js.map} +1 -1
- package/dist/components/{p-85825688.js → p-178fa27e.js} +4 -4
- package/dist/components/{p-85825688.js.map → p-178fa27e.js.map} +1 -1
- package/dist/components/{p-eb443b26.js → p-1af3591a.js} +3 -3
- package/dist/components/{p-eb443b26.js.map → p-1af3591a.js.map} +1 -1
- package/dist/components/{p-930caa42.js → p-31e262bd.js} +4 -4
- package/dist/components/{p-930caa42.js.map → p-31e262bd.js.map} +1 -1
- package/dist/components/{p-e5dff125.js → p-3763c9c4.js} +11 -11
- package/dist/components/{p-e5dff125.js.map → p-3763c9c4.js.map} +1 -1
- package/dist/components/{p-31591941.js → p-3cd7a66f.js} +5 -2
- package/dist/components/p-3cd7a66f.js.map +1 -0
- package/dist/components/{p-fb560fa3.js → p-4697bd56.js} +2 -2
- package/dist/components/{p-fb560fa3.js.map → p-4697bd56.js.map} +1 -1
- package/dist/components/{p-8439219d.js → p-4fc01a78.js} +2 -2
- package/dist/components/{p-8439219d.js.map → p-4fc01a78.js.map} +1 -1
- package/dist/components/{p-6ffba98c.js → p-51459a44.js} +2 -2
- package/dist/components/{p-6ffba98c.js.map → p-51459a44.js.map} +1 -1
- package/dist/components/{p-2277cfc8.js → p-51602221.js} +11 -2
- package/dist/components/p-51602221.js.map +1 -0
- package/dist/components/{p-68fa3890.js → p-54161bad.js} +2 -2
- package/dist/components/{p-68fa3890.js.map → p-54161bad.js.map} +1 -1
- package/dist/components/p-5d14ba3f.js +88 -0
- package/dist/components/p-5d14ba3f.js.map +1 -0
- package/dist/components/{p-ac91582e.js → p-7426b20f.js} +2 -2
- package/dist/components/{p-ac91582e.js.map → p-7426b20f.js.map} +1 -1
- package/dist/components/{p-942f6619.js → p-75200cc0.js} +2 -2
- package/dist/components/{p-942f6619.js.map → p-75200cc0.js.map} +1 -1
- package/dist/components/{p-2de17259.js → p-95857e4f.js} +2 -2
- package/dist/components/{p-2de17259.js.map → p-95857e4f.js.map} +1 -1
- package/dist/components/{p-ee0df37f.js → p-a271e3be.js} +3 -3
- package/dist/components/p-a271e3be.js.map +1 -0
- package/dist/components/{p-e6c04562.js → p-a823b8e9.js} +2 -2
- package/dist/components/{p-e6c04562.js.map → p-a823b8e9.js.map} +1 -1
- package/dist/components/p-c7401a7d.js +90 -0
- package/dist/components/p-c7401a7d.js.map +1 -0
- package/dist/components/{p-d4d310dd.js → p-e5c62ea8.js} +2 -2
- package/dist/components/{p-d4d310dd.js.map → p-e5c62ea8.js.map} +1 -1
- package/dist/components/{p-60244646.js → p-ee8944f3.js} +4 -4
- package/dist/components/{p-60244646.js.map → p-ee8944f3.js.map} +1 -1
- package/dist/esm/{collapse.animation-acda1bf5.js → collapse.animation-6e0b08df.js} +5 -2
- package/dist/esm/collapse.animation-6e0b08df.js.map +1 -0
- package/dist/esm/{constants-d0f19e7b.js → constants-69bafca2.js} +11 -2
- package/dist/esm/constants-69bafca2.js.map +1 -0
- package/dist/esm/{fade.animation-eb454088.js → fade.animation-9b939939.js} +3 -3
- package/dist/esm/{fade.animation-eb454088.js.map → fade.animation-9b939939.js.map} +1 -1
- package/dist/esm/{grow.animation-5b2abb3a.js → grow.animation-03fa5c19.js} +2 -2
- package/dist/esm/{grow.animation-5b2abb3a.js.map → grow.animation-03fa5c19.js.map} +1 -1
- package/dist/esm/index-a1936cd0.js +4 -0
- package/dist/esm/index.js +16 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-accordion-item.entry.js +1 -1
- package/dist/esm/nv-alert.entry.js +3 -3
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +9 -9
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +1 -1
- package/dist/esm/nv-dialog.entry.js +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +1 -1
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-notification.entry.js +70 -9
- package/dist/esm/nv-notification.entry.js.map +1 -1
- package/dist/esm/nv-notificationcontainer.entry.js +39 -0
- package/dist/esm/nv-notificationcontainer.entry.js.map +1 -0
- package/dist/esm/nv-popover.entry.js +3 -3
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-togglebutton.entry.js +1 -1
- package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/esm/slide.animation-f761030b.js +90 -0
- package/dist/esm/slide.animation-f761030b.js.map +1 -0
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-3f861ddc.entry.js → p-08322093.entry.js} +2 -2
- package/dist/native/p-1504e28b.entry.js +2 -0
- package/dist/native/{p-da2c7d3c.entry.js.map → p-1504e28b.entry.js.map} +1 -1
- package/dist/native/p-19090193.entry.js +2 -0
- package/dist/native/p-19090193.entry.js.map +1 -0
- package/dist/native/p-1c83f540.entry.js +2 -0
- package/dist/native/p-1c83f540.entry.js.map +1 -0
- package/dist/native/{p-1f01fb64.entry.js → p-224b1a01.entry.js} +2 -2
- package/dist/native/p-29df974e.entry.js +2 -0
- package/dist/native/p-29df974e.entry.js.map +1 -0
- package/dist/native/p-3cd7a66f.js +2 -0
- package/dist/native/p-3cd7a66f.js.map +1 -0
- package/dist/native/p-45506c37.entry.js +2 -0
- package/dist/native/p-45506c37.entry.js.map +1 -0
- package/dist/native/p-4697bd56.js +2 -0
- package/dist/native/{p-5a43fe48.entry.js → p-48774d0c.entry.js} +2 -2
- package/dist/native/{p-08582c21.entry.js → p-4ec61dec.entry.js} +2 -2
- package/dist/native/p-51602221.js +2 -0
- package/dist/{cjs/constants-52f6f8e9.js.map → native/p-51602221.js.map} +1 -1
- package/dist/native/{p-40c4a221.entry.js → p-5c697133.entry.js} +2 -2
- package/dist/native/p-5c697133.entry.js.map +1 -0
- package/dist/native/{p-225a05bf.entry.js → p-6c7a9a21.entry.js} +2 -2
- package/dist/native/{p-8c823928.entry.js → p-6cb6679b.entry.js} +2 -2
- package/dist/native/{p-52b8c872.entry.js → p-6d13a851.entry.js} +2 -2
- package/dist/native/p-74b129e9.entry.js +2 -0
- package/dist/native/{p-ee0df37f.js → p-a271e3be.js} +2 -2
- package/dist/native/{p-ee0df37f.js.map → p-a271e3be.js.map} +1 -1
- package/dist/native/{p-6290951d.entry.js → p-a69dbcef.entry.js} +2 -2
- package/dist/native/{p-ee516944.entry.js → p-b32d0a5a.entry.js} +2 -2
- package/dist/native/{p-d95ee31e.entry.js → p-c66565f8.entry.js} +2 -2
- package/dist/native/p-c7401a7d.js +2 -0
- package/dist/native/p-c7401a7d.js.map +1 -0
- package/dist/native/{p-cfd5785e.entry.js → p-c7b7ffaf.entry.js} +2 -2
- package/dist/native/{p-788e9ee5.entry.js → p-d2c9247b.entry.js} +2 -2
- package/dist/native/{p-7bbcf477.entry.js → p-d882f417.entry.js} +2 -2
- package/dist/native/{p-f5eb047e.entry.js → p-e2c99ce2.entry.js} +2 -2
- package/dist/native/{p-3784efdc.entry.js → p-fa177c39.entry.js} +2 -2
- package/dist/types/animations/slide.animation.d.ts +15 -4
- package/dist/types/components/nv-badge/nv-badge.d.ts +1 -1
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-notification/nv-notification.d.ts +18 -0
- package/dist/types/components/nv-notificationcontainer/nv-notificationcontainer.d.ts +19 -0
- package/dist/types/components/nv-notificationcontainer/nv-notificationcontainer.docs.d.ts +4 -0
- package/dist/types/components.d.ts +60 -3
- package/dist/types/utils/constants.d.ts +8 -0
- package/dist/vscode-data.json +70 -3
- package/hydrate/index.js +205 -58
- package/hydrate/index.mjs +205 -58
- package/package.json +5 -1
- package/dist/cjs/collapse.animation-47397763.js.map +0 -1
- package/dist/cjs/fade.animation-cf6eba0d.js.map +0 -1
- package/dist/cjs/slide.animation-bedfc827.js +0 -70
- package/dist/cjs/slide.animation-bedfc827.js.map +0 -1
- package/dist/components/p-1172e9bb.js.map +0 -1
- package/dist/components/p-2277cfc8.js.map +0 -1
- package/dist/components/p-31591941.js.map +0 -1
- package/dist/components/p-e0cd7e3a.js +0 -88
- package/dist/components/p-e0cd7e3a.js.map +0 -1
- package/dist/components/p-eda2f9f3.js +0 -68
- package/dist/components/p-eda2f9f3.js.map +0 -1
- package/dist/components/p-ee0df37f.js.map +0 -1
- package/dist/esm/collapse.animation-acda1bf5.js.map +0 -1
- package/dist/esm/constants-d0f19e7b.js.map +0 -1
- package/dist/esm/slide.animation-f444aa0b.js +0 -68
- package/dist/esm/slide.animation-f444aa0b.js.map +0 -1
- package/dist/native/p-0e488b3d.entry.js +0 -2
- package/dist/native/p-0e488b3d.entry.js.map +0 -1
- package/dist/native/p-2277cfc8.js +0 -2
- package/dist/native/p-2277cfc8.js.map +0 -1
- package/dist/native/p-25f2ce81.entry.js +0 -2
- package/dist/native/p-31591941.js +0 -2
- package/dist/native/p-31591941.js.map +0 -1
- package/dist/native/p-40c4a221.entry.js.map +0 -1
- package/dist/native/p-81952a3c.entry.js +0 -2
- package/dist/native/p-81952a3c.entry.js.map +0 -1
- package/dist/native/p-d88c416f.entry.js +0 -2
- package/dist/native/p-d88c416f.entry.js.map +0 -1
- package/dist/native/p-da2c7d3c.entry.js +0 -2
- package/dist/native/p-eda2f9f3.js +0 -2
- package/dist/native/p-eda2f9f3.js.map +0 -1
- package/dist/native/p-fb560fa3.js +0 -2
- /package/dist/native/{p-3f861ddc.entry.js.map → p-08322093.entry.js.map} +0 -0
- /package/dist/native/{p-1f01fb64.entry.js.map → p-224b1a01.entry.js.map} +0 -0
- /package/dist/native/{p-fb560fa3.js.map → p-4697bd56.js.map} +0 -0
- /package/dist/native/{p-5a43fe48.entry.js.map → p-48774d0c.entry.js.map} +0 -0
- /package/dist/native/{p-08582c21.entry.js.map → p-4ec61dec.entry.js.map} +0 -0
- /package/dist/native/{p-225a05bf.entry.js.map → p-6c7a9a21.entry.js.map} +0 -0
- /package/dist/native/{p-8c823928.entry.js.map → p-6cb6679b.entry.js.map} +0 -0
- /package/dist/native/{p-52b8c872.entry.js.map → p-6d13a851.entry.js.map} +0 -0
- /package/dist/native/{p-25f2ce81.entry.js.map → p-74b129e9.entry.js.map} +0 -0
- /package/dist/native/{p-6290951d.entry.js.map → p-a69dbcef.entry.js.map} +0 -0
- /package/dist/native/{p-ee516944.entry.js.map → p-b32d0a5a.entry.js.map} +0 -0
- /package/dist/native/{p-d95ee31e.entry.js.map → p-c66565f8.entry.js.map} +0 -0
- /package/dist/native/{p-cfd5785e.entry.js.map → p-c7b7ffaf.entry.js.map} +0 -0
- /package/dist/native/{p-788e9ee5.entry.js.map → p-d2c9247b.entry.js.map} +0 -0
- /package/dist/native/{p-7bbcf477.entry.js.map → p-d882f417.entry.js.map} +0 -0
- /package/dist/native/{p-f5eb047e.entry.js.map → p-e2c99ce2.entry.js.map} +0 -0
- /package/dist/native/{p-3784efdc.entry.js.map → p-fa177c39.entry.js.map} +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { i as index } from './p-a271e3be.js';
|
|
2
|
+
import { a as animate, g as easeOut } from './p-42ea6b74.js';
|
|
3
|
+
|
|
4
|
+
const useSlide = (node, { duration } = { duration: 200 }) => {
|
|
5
|
+
const nodeStyler = index(node);
|
|
6
|
+
/**
|
|
7
|
+
* Will animate the translateX property.
|
|
8
|
+
*
|
|
9
|
+
* @param {object} options - The options for the animation.
|
|
10
|
+
* @param {number} options.from - The starting value for the translateX property.
|
|
11
|
+
* @param {number} options.to - The ending value for the translateX property.
|
|
12
|
+
* @returns {Promise<void>} - A promise that resolves when the animation is
|
|
13
|
+
* complete.
|
|
14
|
+
*/
|
|
15
|
+
const slideX = (options = { from: 0, to: 100 }) => () => {
|
|
16
|
+
return new Promise(resolve => {
|
|
17
|
+
animate({
|
|
18
|
+
from: { x: options.from },
|
|
19
|
+
to: { x: options.to },
|
|
20
|
+
ease: easeOut,
|
|
21
|
+
duration,
|
|
22
|
+
onUpdate(latest) {
|
|
23
|
+
nodeStyler.set({ transform: `translateX(${latest.x}%)` });
|
|
24
|
+
},
|
|
25
|
+
onComplete() {
|
|
26
|
+
resolve();
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Will animate the translateY property.
|
|
33
|
+
*
|
|
34
|
+
* @param {object} options - The options for the animation.
|
|
35
|
+
* @param {number} options.from - The starting value for the translateY property.
|
|
36
|
+
* @param {number} options.to - The ending value for the translateY property.
|
|
37
|
+
* @returns {Promise<void>} - A promise that resolves when the animation is
|
|
38
|
+
* complete.
|
|
39
|
+
*/
|
|
40
|
+
const slideY = (options = { from: 0, to: 100 }) => () => {
|
|
41
|
+
return new Promise(resolve => {
|
|
42
|
+
animate({
|
|
43
|
+
from: { y: options.from },
|
|
44
|
+
to: { y: options.to },
|
|
45
|
+
ease: easeOut,
|
|
46
|
+
duration,
|
|
47
|
+
onUpdate(latest) {
|
|
48
|
+
nodeStyler.set({ transform: `translateY(${latest.y}%)` });
|
|
49
|
+
},
|
|
50
|
+
onComplete() {
|
|
51
|
+
resolve();
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Applies the slideX styles without animating, useful when initial state
|
|
58
|
+
* is slid out.
|
|
59
|
+
*
|
|
60
|
+
* @param {number} amount - The amount to translate the element by.
|
|
61
|
+
* @returns {function} - A function that applies the slideX styles.
|
|
62
|
+
*/
|
|
63
|
+
const setSlideX = (amount = 100) => nodeStyler.set({ transform: `translateX(${amount}%)` });
|
|
64
|
+
/**
|
|
65
|
+
* Applies the slideY styles without animating, useful when initial state
|
|
66
|
+
* is slid out.
|
|
67
|
+
*
|
|
68
|
+
* @param {number} amount - The amount to translate the element by.
|
|
69
|
+
* @returns {function} - A function that applies the slideY styles.
|
|
70
|
+
*/
|
|
71
|
+
const setSlideY = (amount = 100) => nodeStyler.set({ transform: `translateY(${amount}%)` });
|
|
72
|
+
/**
|
|
73
|
+
* Applies the slideIn styles without animating, useful when initial state
|
|
74
|
+
* is slid in.
|
|
75
|
+
*/
|
|
76
|
+
function setSlideReset() {
|
|
77
|
+
nodeStyler.set({ transform: `translateX(${0}%) translateY(${0}%)` });
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
slideX,
|
|
81
|
+
slideY,
|
|
82
|
+
setSlideX,
|
|
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QAAQ,CAAC,MAAM;oBACb,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;iBAC3D;gBACD,UAAU;oBACR,OAAO,EAAE,CAAC;iBACX;aACF,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ,CAAC;;;;;;;;IASJ,MAAM,SAAS,GAAG,CAAC,MAAM,GAAG,GAAG,KAC7B,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,MAAM,IAAI,EAAE,CAAC,CAAC;;;;;;;;IAS1D,MAAM,SAAS,GAAG,CAAC,MAAM,GAAG,GAAG,KAC7B,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,MAAM,IAAI,EAAE,CAAC,CAAC;;;;;IAM1D,SAAS,aAAa;QACpB,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC;KACtE;IAED,OAAO;QACL,MAAM;QACN,MAAM;QACN,SAAS;QACT,SAAS;QACT,aAAa;KACd,CAAC;AACJ;;;;","names":["styler"],"sources":["src/animations/slide.animation.ts"],"sourcesContent":["import { animate, easeOut } from 'popmotion';\nimport styler from 'stylefire';\n\nexport type SlideOptions = {\n /** How long the animation should take in ms @default 200 */\n duration?: number;\n};\n\nconst useSlide = (\n node: HTMLElement,\n { duration }: SlideOptions = { duration: 200 },\n) => {\n const nodeStyler = styler(node);\n\n /**\n * Will animate the translateX property.\n *\n * @param {object} options - The options for the animation.\n * @param {number} options.from - The starting value for the translateX property.\n * @param {number} options.to - The ending value for the translateX property.\n * @returns {Promise<void>} - A promise that resolves when the animation is\n * complete.\n */\n const slideX =\n (\n options: {\n /** The starting percentage for the translateX property. */\n from: number;\n /** The ending percentage for the translateX property. */\n to: number;\n } = { from: 0, to: 100 },\n ) =>\n () => {\n return new Promise<void>(resolve => {\n animate({\n from: { x: options.from },\n to: { x: options.to },\n ease: easeOut,\n duration,\n onUpdate(latest) {\n nodeStyler.set({ transform: `translateX(${latest.x}%)` });\n },\n onComplete() {\n resolve();\n },\n });\n });\n };\n\n /**\n * Will animate the translateY property.\n *\n * @param {object} options - The options for the animation.\n * @param {number} options.from - The starting value for the translateY property.\n * @param {number} options.to - The ending value for the translateY property.\n * @returns {Promise<void>} - A promise that resolves when the animation is\n * complete.\n */\n const slideY =\n (\n options: {\n /** The starting percentage for the translateY property. */\n from: number;\n /** The ending percentage for the translateY property. */\n to: number;\n } = { from: 0, to: 100 },\n ) =>\n () => {\n return new Promise<void>(resolve => {\n animate({\n from: { y: options.from },\n to: { y: options.to },\n ease: easeOut,\n duration,\n onUpdate(latest) {\n nodeStyler.set({ transform: `translateY(${latest.y}%)` });\n },\n onComplete() {\n resolve();\n },\n });\n });\n };\n\n /**\n * Applies the slideX styles without animating, useful when initial state\n * is slid out.\n *\n * @param {number} amount - The amount to translate the element by.\n * @returns {function} - A function that applies the slideX styles.\n */\n const setSlideX = (amount = 100) =>\n nodeStyler.set({ transform: `translateX(${amount}%)` });\n\n /**\n * Applies the slideY styles without animating, useful when initial state\n * is slid out.\n *\n * @param {number} amount - The amount to translate the element by.\n * @returns {function} - A function that applies the slideY styles.\n */\n const setSlideY = (amount = 100) =>\n nodeStyler.set({ transform: `translateY(${amount}%)` });\n\n /**\n * Applies the slideIn styles without animating, useful when initial state\n * is slid in.\n */\n function setSlideReset() {\n nodeStyler.set({ transform: `translateX(${0}%) translateY(${0}%)` });\n }\n\n return {\n slideX,\n slideY,\n setSlideX,\n setSlideY,\n setSlideReset,\n };\n};\n\nexport { useSlide };\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-aff3ed68.js';
|
|
2
|
-
import { d as defineCustomElement$1 } from './p-
|
|
2
|
+
import { d as defineCustomElement$1 } from './p-5d14ba3f.js';
|
|
3
3
|
|
|
4
4
|
const nvFielddropdownitemCss = "nv-fielddropdownitem{display:flex;gap:var(--spacing-2);flex-wrap:wrap;align-items:center;width:100%;padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);font-weight:var(--menu-contextual-item-font-weight);font-size:var(--list-dropdown-font-size);line-height:var(--list-dropdown-line-height);color:var(--components-list-dropdown-item-label-default);border-radius:var(--list-dropdown-item-radius);transition:background-color 150ms ease-out, color 150ms ease-out;cursor:pointer}nv-fielddropdownitem:hover,nv-fielddropdownitem:focus,nv-fielddropdownitem:focus-within{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-fielddropdownitem[disabled]:not([disabled=false]){cursor:not-allowed;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}nv-fielddropdownitem .text-wrapper{display:flex;flex-grow:1;align-items:center;justify-content:space-between}nv-fielddropdownitem [data-scope=text]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nv-fielddropdownitem nv-icon[data-scope=selected]{color:var(--components-list-dropdown-item-label-default);align-self:center;margin-left:auto}";
|
|
5
5
|
const NvFielddropdownitemStyle0 = nvFielddropdownitemCss;
|
|
@@ -90,4 +90,4 @@ defineCustomElement();
|
|
|
90
90
|
|
|
91
91
|
export { NvFielddropdownitem as N, defineCustomElement as d };
|
|
92
92
|
|
|
93
|
-
//# sourceMappingURL=p-
|
|
93
|
+
//# sourceMappingURL=p-e5c62ea8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-e5c62ea8.js","mappings":";;;AAAA,MAAM,sBAAsB,GAAG,utCAAutC,CAAC;AACvvC,kCAAe,sBAAsB;;MCkBxB,mBAAmB;IALhC;;;;QAOU,aAAQ,GAAG,KAAK,CAAC;;;;;;QAShB,aAAQ,GAAY,KAAK,CAAC;;;;QAM1B,aAAQ,GAAY,KAAK,CAAC;;;;QAuD3B,mBAAc,GAAG;YACvB,IAAI,IAAI,CAAC,QAAQ;gBAAE,O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MAAM,gBAAY,UAAU,GAAG,CAClE,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nv-fielddropdownitem/styles/nv-fielddropdownitem.scss?tag=nv-fielddropdownitem","src/components/nv-fielddropdownitem/nv-fielddropdownitem.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n\nnv-fielddropdownitem {\n @include root-styles();\n\n &[disabled]:not([disabled='false']) {\n @include disabled-styles();\n }\n\n .text-wrapper {\n @include text-wrapper-styles();\n }\n\n [data-scope='text'] {\n @include text-styles();\n }\n\n nv-icon[data-scope='selected'] {\n @include selected-icon-styles();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n Listen,\n} from '@stencil/core';\n\n/**\n * @slot default - The content to be displayed inside the dropdown item.\n */\n@Component({\n tag: 'nv-fielddropdownitem',\n styleUrl: 'styles/nv-fielddropdownitem.scss',\n shadow: false,\n})\nexport class NvFielddropdownitem {\n @Element() el: HTMLNvFielddropdownitemElement;\n private composed = false;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Disables the item, preventing any user interaction.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Indicates if the item is selected.\n */\n @Prop({ reflect: true })\n readonly selected: boolean = false;\n\n /**\n * Value associated with the item. This is recommended and required for proper\n * form management.\n */\n @Prop({ reflect: true, mutable: true })\n value?: string;\n\n /**\n * Specifies the text label for the dropdown item.\n *\n * When no default slot is provided, this label is rendered as the item's\n * visible text. If the default slot is supplied, the label isn’t directly\n * displayed but is used as the selected text (on the dropdown trigger). If\n * no label is explicitly set, the component will automatically derive the\n * label from the text content of the default slot.\n */\n @Prop({ reflect: true })\n readonly label?: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Event emitted when the dropdown item is selected.\n */\n @Event()\n dropdownItemSelected: EventEmitter<{\n /** The value associated with the item. */\n label?: string;\n /** The value associated with the item. */\n value: string;\n }>;\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.target !== this.el) return;\n\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.handleSelected();\n\n this.el\n .closest('nv-fielddropdown')\n ?.querySelector<HTMLElement>(\"[data-scope='focusable']\")\n ?.focus();\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n private handleSelected = () => {\n if (this.disabled) return;\n\n this.dropdownItemSelected.emit({\n label: this.label,\n value: this.value,\n });\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.composed = Boolean(this.el.children.length);\n if (!this.value) {\n const fallback = this.label ?? this.el.textContent;\n this.value = fallback.replace(/\\W+/g, ''); // Remove non-word characters\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host role=\"menuitem\" tabindex={'-1'} onClick={this.handleSelected}>\n <slot />\n\n {!this.composed && (\n <div class=\"text-wrapper\">\n <span data-scope=\"text\">{this.label}</span>\n </div>\n )}\n\n {this.selected && (\n <nv-icon name=\"check\" aria-hidden=\"true\" data-scope=\"selected\" />\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { e as getRenderingRef, f as forceUpdate, p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-aff3ed68.js';
|
|
2
|
-
import { u as useFade } from './p-
|
|
3
|
-
import { u as useGrow } from './p-
|
|
2
|
+
import { u as useFade } from './p-a271e3be.js';
|
|
3
|
+
import { u as useGrow } from './p-4697bd56.js';
|
|
4
4
|
import './p-42ea6b74.js';
|
|
5
5
|
import { a as addEventListeners, r as removeEventListeners } from './p-d429a343.js';
|
|
6
6
|
|
|
@@ -2381,7 +2381,7 @@ const NvPopover = /*@__PURE__*/ proxyCustomElement(class NvPopover extends H {
|
|
|
2381
2381
|
/****************************************************************************/
|
|
2382
2382
|
//#region RENDER
|
|
2383
2383
|
render() {
|
|
2384
|
-
return (h(Host, { key: '
|
|
2384
|
+
return (h(Host, { key: '1af6f61d4b3d87e30d2311708fcd61979170aa96' }, h("slot", { key: '113813292e083fa4b188f3e5750549a08fc8c3aa', name: "trigger" }), h("div", { key: '7687d6ae12b24ed575843f0d171d911eb0994675', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (h("div", { key: '162f1f50be23da7fadac8f76507e6d8d058fb58b', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), h("slot", { key: '57ecf69ef395a045cb35e7db9f380027dfceff6e', name: "content" }))));
|
|
2385
2385
|
}
|
|
2386
2386
|
get el() { return this; }
|
|
2387
2387
|
static get watchers() { return {
|
|
@@ -2426,4 +2426,4 @@ defineCustomElement();
|
|
|
2426
2426
|
|
|
2427
2427
|
export { NvPopover as N, defineCustomElement as d };
|
|
2428
2428
|
|
|
2429
|
-
//# sourceMappingURL=p-
|
|
2429
|
+
//# sourceMappingURL=p-ee8944f3.js.map
|