@nova-design-system/nova-webcomponents 3.11.0 → 3.13.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 +218 -0
- package/dist/cjs/collapse.animation-47397763.js.map +1 -0
- package/dist/cjs/{constants-3b6beb66.js → constants-52f6f8e9.js} +24 -42
- package/dist/cjs/constants-52f6f8e9.js.map +1 -0
- package/dist/cjs/fade.animation-cf6eba0d.js +726 -0
- package/dist/cjs/fade.animation-cf6eba0d.js.map +1 -0
- package/dist/cjs/{grow.animation-6d003803.js → grow.animation-9258ba63.js} +6 -5
- package/dist/cjs/grow.animation-9258ba63.js.map +1 -0
- package/dist/cjs/index-c56424e5.js +4 -0
- package/dist/cjs/index.cjs.js +114 -13
- 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 +72 -38
- package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-accordion.cjs.entry.js +79 -65
- package/dist/cjs/nv-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +12 -12
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +5 -5
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +2 -2
- package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +14 -10
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +9 -6
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +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-fielddate.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1 -31
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldslider.cjs.entry.js +24 -16
- package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +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-iconbutton_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-notification.cjs.entry.js +120 -0
- package/dist/cjs/nv-notification.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-popover.cjs.entry.js +24 -7
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- 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 +3 -3
- package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-togglebutton.cjs.entry.js +2 -2
- package/dist/cjs/nv-togglebutton.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +11 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/slide.animation-bedfc827.js +70 -0
- package/dist/cjs/slide.animation-bedfc827.js.map +1 -0
- package/dist/cjs/{stylefire.es-717e022a.js → style-value-types.es-eea2f16f.js} +51 -696
- package/dist/cjs/style-value-types.es-eea2f16f.js.map +1 -0
- package/dist/cjs/{timeline.animation-155e8839.js → timeline.animation-2878afb6.js} +20 -1
- package/dist/cjs/timeline.animation-2878afb6.js.map +1 -0
- package/dist/collection/animations/collapse.animation.js +110 -50
- package/dist/collection/animations/collapse.animation.js.map +1 -1
- package/dist/collection/animations/index.js +1 -0
- package/dist/collection/animations/index.js.map +1 -1
- package/dist/collection/animations/slide.animation.js +65 -0
- package/dist/collection/animations/slide.animation.js.map +1 -0
- package/dist/collection/animations/timeline.animation.js +19 -1
- package/dist/collection/animations/timeline.animation.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js +78 -20
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js.map +1 -1
- package/dist/collection/components/nv-accordion/nv-accordion.js +88 -68
- package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -1
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +70 -36
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -1
- package/dist/collection/components/nv-accordion-item/styles/nv-accordion-item.css +3 -0
- package/dist/collection/components/nv-alert/nv-alert.css +1 -6
- package/dist/collection/components/nv-alert/nv-alert.js +6 -6
- package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.css +0 -21
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.css +0 -2
- package/dist/collection/components/nv-button/styles/nv-button.css +0 -8
- package/dist/collection/components/nv-calendar/nv-calendar.css +4 -0
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js +14 -0
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.js +47 -3
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/partials/calendar-actions.js +2 -2
- package/dist/collection/components/nv-calendar/partials/calendar-actions.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.css +0 -1
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +8 -0
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +13 -11
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js.map +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +0 -1
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +4 -0
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +6 -0
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +4 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +0 -30
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +4 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +8 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +4 -0
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.css +0 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +6 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +0 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +10 -10
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/partials/field-input.js +13 -5
- package/dist/collection/components/nv-fieldslider/partials/field-input.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +27 -0
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +0 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +4 -0
- package/dist/collection/components/nv-icon/nv-icons.js +5 -5
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +0 -4
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- package/dist/collection/components/nv-notification/nv-notification.docs.js +72 -0
- package/dist/collection/components/nv-notification/nv-notification.docs.js.map +1 -0
- package/dist/collection/components/nv-notification/nv-notification.js +333 -0
- package/dist/collection/components/nv-notification/nv-notification.js.map +1 -0
- package/dist/collection/components/nv-notification/styles/nv-notification.css +155 -0
- package/dist/collection/components/nv-popover/nv-popover.css +7 -0
- package/dist/collection/components/nv-popover/nv-popover.docs.js +4 -0
- package/dist/collection/components/nv-popover/nv-popover.docs.js.map +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +47 -2
- package/dist/collection/components/nv-popover/nv-popover.js.map +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.css +0 -1
- 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-togglebutton/styles/nv-togglebutton.css +3 -2
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +0 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js +5 -0
- package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js.map +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +38 -3
- package/dist/collection/components/nv-tooltip/nv-tooltip.js.map +1 -1
- package/dist/collection/index.js +10 -2
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/constants.js +5 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/components/index.js +14 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +88 -71
- package/dist/components/nv-accordion.js.map +1 -1
- package/dist/components/nv-alert.js +13 -13
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +3 -3
- package/dist/components/nv-breadcrumb.js.map +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-datagrid.js +4 -4
- package/dist/components/nv-datagrid.js.map +1 -1
- 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 +6 -6
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +6 -6
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +5 -5
- package/dist/components/nv-fielddropdown.js.map +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +7 -37
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +3 -3
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +1 -1
- package/dist/components/nv-fieldradio.js.map +1 -1
- package/dist/components/nv-fieldselect.js +3 -3
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldslider.js +27 -19
- package/dist/components/nv-fieldslider.js.map +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtime.js +5 -5
- package/dist/components/nv-fieldtime.js.map +1 -1
- 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.d.ts +11 -0
- package/dist/components/nv-notification.js +150 -0
- package/dist/components/nv-notification.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 +3 -3
- package/dist/components/nv-toggle.js.map +1 -1
- package/dist/components/nv-togglebutton.js +2 -2
- package/dist/components/nv-togglebutton.js.map +1 -1
- package/dist/components/nv-togglebuttongroup.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-0ffb4785.js → p-0b5816f7.js} +2 -2
- package/dist/components/{p-0ffb4785.js.map → p-0b5816f7.js.map} +1 -1
- package/dist/components/{p-a5002d14.js → p-1172e9bb.js} +2 -2
- package/dist/components/{p-a5002d14.js.map → p-1172e9bb.js.map} +1 -1
- package/dist/components/{p-a3ddec4c.js → p-2277cfc8.js} +7 -24
- package/dist/components/p-2277cfc8.js.map +1 -0
- package/dist/components/{p-b659b999.js → p-2854cf01.js} +2 -2
- package/dist/components/{p-b659b999.js.map → p-2854cf01.js.map} +1 -1
- package/dist/components/{p-cf06032d.js → p-2de17259.js} +3 -3
- package/dist/components/{p-cf06032d.js.map → p-2de17259.js.map} +1 -1
- package/dist/components/p-31591941.js +216 -0
- package/dist/components/p-31591941.js.map +1 -0
- package/dist/components/{p-09cdd71f.js → p-42ea6b74.js} +34 -688
- package/dist/components/p-42ea6b74.js.map +1 -0
- package/dist/components/{p-50d0db7b.js → p-5073bfd6.js} +3 -3
- package/dist/components/{p-50d0db7b.js.map → p-5073bfd6.js.map} +1 -1
- package/dist/components/{p-195f46f3.js → p-60244646.js} +28 -9
- package/dist/components/p-60244646.js.map +1 -0
- package/dist/components/{p-8aee1010.js → p-68fa3890.js} +17 -11
- package/dist/components/p-68fa3890.js.map +1 -0
- package/dist/components/{p-2db5d1ab.js → p-89ac047e.js} +5 -5
- package/dist/components/p-89ac047e.js.map +1 -0
- package/dist/components/{p-1bb737fa.js → p-99a55bc4.js} +2 -2
- package/dist/components/{p-1bb737fa.js.map → p-99a55bc4.js.map} +1 -1
- package/dist/{esm/timeline.animation-adf35ecb.js → components/p-a52cd849.js} +20 -2
- package/dist/components/p-a52cd849.js.map +1 -0
- package/dist/components/{p-45a625fb.js → p-a9dc0824.js} +13 -10
- package/dist/components/p-a9dc0824.js.map +1 -0
- package/dist/components/{p-ec4558aa.js → p-ac91582e.js} +2 -2
- package/dist/components/{p-ec4558aa.js.map → p-ac91582e.js.map} +1 -1
- package/dist/components/p-ca38a8a9.js +88 -0
- package/dist/components/p-ca38a8a9.js.map +1 -0
- package/dist/components/{p-9fdaea9a.js → p-ddd0a394.js} +75 -41
- package/dist/components/p-ddd0a394.js.map +1 -0
- package/dist/components/p-e4ac8333.js +189 -0
- package/dist/components/{p-8011513c.js.map → p-e4ac8333.js.map} +1 -1
- package/dist/components/{p-32e8e42e.js → p-e6c04562.js} +2 -2
- package/dist/components/{p-32e8e42e.js.map → p-e6c04562.js.map} +1 -1
- package/dist/components/{p-f47a1e1e.js → p-eb443b26.js} +15 -5
- package/dist/components/p-eb443b26.js.map +1 -0
- package/dist/components/p-eda2f9f3.js +68 -0
- package/dist/components/p-eda2f9f3.js.map +1 -0
- package/dist/components/p-ee0df37f.js +723 -0
- package/dist/components/p-ee0df37f.js.map +1 -0
- package/dist/components/{p-8d45dbfe.js → p-fb560fa3.js} +3 -2
- package/dist/components/p-fb560fa3.js.map +1 -0
- package/dist/esm/collapse.animation-acda1bf5.js +216 -0
- package/dist/esm/collapse.animation-acda1bf5.js.map +1 -0
- package/dist/esm/{constants-23aaef7b.js → constants-d0f19e7b.js} +7 -24
- package/dist/esm/constants-d0f19e7b.js.map +1 -0
- package/dist/esm/fade.animation-eb454088.js +723 -0
- package/dist/esm/fade.animation-eb454088.js.map +1 -0
- package/dist/esm/{grow.animation-f7b26024.js → grow.animation-5b2abb3a.js} +3 -2
- package/dist/esm/grow.animation-5b2abb3a.js.map +1 -0
- package/dist/esm/index-a1936cd0.js +4 -0
- package/dist/esm/index.js +15 -12
- 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 +72 -38
- package/dist/esm/nv-accordion-item.entry.js.map +1 -1
- package/dist/esm/nv-accordion.entry.js +80 -66
- package/dist/esm/nv-accordion.entry.js.map +1 -1
- package/dist/esm/nv-alert.entry.js +12 -12
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +5 -5
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumb.entry.js.map +1 -1
- package/dist/esm/nv-button.entry.js +2 -2
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-calendar.entry.js +14 -10
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-datagrid.entry.js +2 -2
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +9 -6
- package/dist/esm/nv-dialogfooter_2.entry.js.map +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-fielddate.entry.js +1 -1
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +1 -1
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +1 -1
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +1 -31
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +2 -2
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +1 -1
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +1 -1
- package/dist/esm/nv-fieldradio.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +1 -1
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldslider.entry.js +24 -16
- package/dist/esm/nv-fieldslider.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +2 -2
- package/dist/esm/nv-fieldtime.entry.js.map +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-iconbutton_2.entry.js +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js.map +1 -1
- package/dist/esm/nv-notification.entry.js +116 -0
- package/dist/esm/nv-notification.entry.js.map +1 -0
- package/dist/esm/nv-popover.entry.js +24 -7
- package/dist/esm/nv-popover.entry.js.map +1 -1
- 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 +3 -3
- package/dist/esm/nv-toggle.entry.js.map +1 -1
- package/dist/esm/nv-togglebutton.entry.js +2 -2
- package/dist/esm/nv-togglebutton.entry.js.map +1 -1
- package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
- package/dist/esm/nv-tooltip.entry.js +11 -2
- package/dist/esm/nv-tooltip.entry.js.map +1 -1
- package/dist/esm/slide.animation-f444aa0b.js +68 -0
- package/dist/esm/slide.animation-f444aa0b.js.map +1 -0
- package/dist/esm/{stylefire.es-74da334a.js → style-value-types.es-f5d10b79.js} +34 -688
- package/dist/esm/style-value-types.es-f5d10b79.js.map +1 -0
- package/dist/esm/timeline.animation-79215cd4.js +41 -0
- package/dist/esm/timeline.animation-79215cd4.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.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/p-08582c21.entry.js +2 -0
- package/dist/native/p-08582c21.entry.js.map +1 -0
- package/dist/native/p-0a99c6fb.entry.js +2 -0
- package/dist/native/p-0a99c6fb.entry.js.map +1 -0
- package/dist/native/p-0e488b3d.entry.js +2 -0
- package/dist/native/p-0e488b3d.entry.js.map +1 -0
- package/dist/native/p-1ad1bff9.entry.js +2 -0
- package/dist/native/{p-0ef94dae.entry.js.map → p-1ad1bff9.entry.js.map} +1 -1
- package/dist/native/{p-aacd8789.entry.js → p-1f01fb64.entry.js} +2 -2
- package/dist/native/p-225a05bf.entry.js +2 -0
- package/dist/native/{p-fb672f90.entry.js.map → p-225a05bf.entry.js.map} +1 -1
- package/dist/native/p-2277cfc8.js +2 -0
- package/dist/native/p-2277cfc8.js.map +1 -0
- package/dist/native/p-25f2ce81.entry.js +2 -0
- package/dist/native/{p-7f0d576b.entry.js → p-2781637d.entry.js} +2 -2
- package/dist/native/{p-7f0d576b.entry.js.map → p-2781637d.entry.js.map} +1 -1
- package/dist/native/{p-681f2bac.entry.js → p-29f68e07.entry.js} +2 -2
- package/dist/native/p-29f68e07.entry.js.map +1 -0
- package/dist/native/p-31591941.js +2 -0
- package/dist/native/p-31591941.js.map +1 -0
- package/dist/native/p-33f503c5.entry.js +2 -0
- package/dist/native/p-33f503c5.entry.js.map +1 -0
- package/dist/native/{p-43071c3b.entry.js → p-3784efdc.entry.js} +2 -2
- package/dist/native/p-3f861ddc.entry.js +2 -0
- package/dist/native/p-3f861ddc.entry.js.map +1 -0
- package/dist/native/p-40c4a221.entry.js +2 -0
- package/dist/native/{p-9991116a.entry.js.map → p-40c4a221.entry.js.map} +1 -1
- package/dist/native/p-42ea6b74.js +16 -0
- package/dist/native/p-42ea6b74.js.map +1 -0
- package/dist/native/p-52b8c872.entry.js +2 -0
- package/dist/native/{p-397c0fca.entry.js.map → p-52b8c872.entry.js.map} +1 -1
- package/dist/native/{p-9f451b8a.entry.js → p-5a43fe48.entry.js} +3 -3
- package/dist/native/{p-9f451b8a.entry.js.map → p-5a43fe48.entry.js.map} +1 -1
- package/dist/native/{p-676447d7.entry.js → p-788e9ee5.entry.js} +3 -3
- package/dist/native/{p-f033c4ce.entry.js → p-7bbcf477.entry.js} +2 -2
- package/dist/native/p-8c823928.entry.js +2 -0
- package/dist/native/p-8c823928.entry.js.map +1 -0
- package/dist/native/p-9a46baa9.entry.js +2 -0
- package/dist/native/p-9a46baa9.entry.js.map +1 -0
- package/dist/native/p-a34beedf.entry.js +2 -0
- package/dist/native/p-a34beedf.entry.js.map +1 -0
- package/dist/native/p-a52cd849.js +2 -0
- package/dist/native/p-a52cd849.js.map +1 -0
- package/dist/native/p-bb71a17f.entry.js +2 -0
- package/dist/native/{p-ba9906b7.entry.js.map → p-bb71a17f.entry.js.map} +1 -1
- package/dist/native/p-bc01787b.entry.js +2 -0
- package/dist/native/{p-ad2cc829.entry.js.map → p-bc01787b.entry.js.map} +1 -1
- package/dist/native/p-cea942b9.entry.js +2 -0
- package/dist/native/{p-3ed84cd9.entry.js.map → p-cea942b9.entry.js.map} +1 -1
- package/dist/native/p-cfd5785e.entry.js +2 -0
- package/dist/native/p-cfd5785e.entry.js.map +1 -0
- package/dist/native/p-d0ef1bbb.entry.js +2 -0
- package/dist/native/p-d0ef1bbb.entry.js.map +1 -0
- package/dist/native/p-d88c416f.entry.js +2 -0
- package/dist/native/{p-2197ffdf.entry.js.map → p-d88c416f.entry.js.map} +1 -1
- package/dist/native/p-d95ee31e.entry.js +2 -0
- package/dist/native/{p-44dd9a4c.entry.js.map → p-d95ee31e.entry.js.map} +1 -1
- package/dist/native/p-da2c7d3c.entry.js +2 -0
- package/dist/native/p-da2c7d3c.entry.js.map +1 -0
- package/dist/native/p-e765a624.entry.js +2 -0
- package/dist/native/{p-184032cb.entry.js.map → p-e765a624.entry.js.map} +1 -1
- package/dist/native/p-eda2f9f3.js +2 -0
- package/dist/native/p-eda2f9f3.js.map +1 -0
- package/dist/native/p-ee0df37f.js +2 -0
- package/dist/native/p-ee0df37f.js.map +1 -0
- package/dist/native/p-ee516944.entry.js +2 -0
- package/dist/native/p-ee516944.entry.js.map +1 -0
- package/dist/native/p-f0cbfb3d.entry.js +2 -0
- package/dist/native/{p-b58fb522.entry.js.map → p-f0cbfb3d.entry.js.map} +1 -1
- package/dist/native/p-f5120223.entry.js +2 -0
- package/dist/native/p-f5120223.entry.js.map +1 -0
- package/dist/native/{p-2d647761.entry.js → p-f5eb047e.entry.js} +2 -2
- package/dist/native/p-fb560fa3.js +2 -0
- package/dist/native/{p-8d45dbfe.js.map → p-fb560fa3.js.map} +1 -1
- package/dist/types/animations/collapse.animation.d.ts +10 -2
- package/dist/types/animations/index.d.ts +1 -0
- package/dist/types/animations/slide.animation.d.ts +11 -0
- package/dist/types/animations/timeline.animation.d.ts +17 -1
- package/dist/types/components/nv-accordion/nv-accordion.d.ts +5 -7
- package/dist/types/components/nv-accordion-item/nv-accordion-item.d.ts +23 -8
- package/dist/types/components/nv-alert/nv-alert.d.ts +1 -1
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +4 -0
- package/dist/types/components/nv-calendar/partials/calendar-actions.d.ts +4 -0
- package/dist/types/components/nv-dialogfooter/nv-dialogfooter.d.ts +8 -4
- package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +3 -2
- package/dist/types/components/nv-fieldslider/partials/field-input.d.ts +7 -3
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-notification/nv-notification.d.ts +75 -0
- package/dist/types/components/nv-notification/nv-notification.docs.d.ts +4 -0
- package/dist/types/components/nv-popover/nv-popover.d.ts +11 -1
- package/dist/types/components/nv-tooltip/nv-tooltip.d.ts +11 -2
- package/dist/types/components.d.ts +162 -13
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nova-docs.d.ts +6 -0
- package/dist/types/utils/constants.d.ts +4 -0
- package/dist/vscode-data.json +117 -19
- package/hydrate/index.js +695 -288
- package/hydrate/index.mjs +695 -288
- package/package.json +9 -1
- package/readme.md +169 -42
- package/dist/cjs/collapse.animation-a129dc3f.js +0 -86
- package/dist/cjs/collapse.animation-a129dc3f.js.map +0 -1
- package/dist/cjs/constants-3b6beb66.js.map +0 -1
- package/dist/cjs/fade.animation-644b5c4d.js +0 -70
- package/dist/cjs/fade.animation-644b5c4d.js.map +0 -1
- package/dist/cjs/grow.animation-6d003803.js.map +0 -1
- package/dist/cjs/stylefire.es-717e022a.js.map +0 -1
- package/dist/cjs/timeline.animation-155e8839.js.map +0 -1
- package/dist/components/p-09cdd71f.js.map +0 -1
- package/dist/components/p-15aeab4d.js +0 -23
- package/dist/components/p-15aeab4d.js.map +0 -1
- package/dist/components/p-195f46f3.js.map +0 -1
- package/dist/components/p-1cbacdba.js +0 -68
- package/dist/components/p-1cbacdba.js.map +0 -1
- package/dist/components/p-2db5d1ab.js.map +0 -1
- package/dist/components/p-45a625fb.js.map +0 -1
- package/dist/components/p-8011513c.js +0 -189
- package/dist/components/p-8aee1010.js.map +0 -1
- package/dist/components/p-8d45dbfe.js.map +0 -1
- package/dist/components/p-9a263d0e.js +0 -84
- package/dist/components/p-9a263d0e.js.map +0 -1
- package/dist/components/p-9fdaea9a.js.map +0 -1
- package/dist/components/p-a1fe0a5d.js +0 -88
- package/dist/components/p-a1fe0a5d.js.map +0 -1
- package/dist/components/p-a3ddec4c.js.map +0 -1
- package/dist/components/p-f47a1e1e.js.map +0 -1
- package/dist/esm/collapse.animation-16e3af45.js +0 -84
- package/dist/esm/collapse.animation-16e3af45.js.map +0 -1
- package/dist/esm/constants-23aaef7b.js.map +0 -1
- package/dist/esm/fade.animation-71e8e34c.js +0 -68
- package/dist/esm/fade.animation-71e8e34c.js.map +0 -1
- package/dist/esm/grow.animation-f7b26024.js.map +0 -1
- package/dist/esm/stylefire.es-74da334a.js.map +0 -1
- package/dist/esm/timeline.animation-adf35ecb.js.map +0 -1
- package/dist/native/p-019d164d.entry.js +0 -2
- package/dist/native/p-019d164d.entry.js.map +0 -1
- package/dist/native/p-09cdd71f.js +0 -16
- package/dist/native/p-09cdd71f.js.map +0 -1
- package/dist/native/p-0da8f0d1.entry.js +0 -2
- package/dist/native/p-0da8f0d1.entry.js.map +0 -1
- package/dist/native/p-0ef94dae.entry.js +0 -2
- package/dist/native/p-15aeab4d.js +0 -2
- package/dist/native/p-15aeab4d.js.map +0 -1
- package/dist/native/p-184032cb.entry.js +0 -2
- package/dist/native/p-1cbacdba.js +0 -2
- package/dist/native/p-1cbacdba.js.map +0 -1
- package/dist/native/p-2197ffdf.entry.js +0 -2
- package/dist/native/p-348c6bb4.entry.js +0 -2
- package/dist/native/p-348c6bb4.entry.js.map +0 -1
- package/dist/native/p-397c0fca.entry.js +0 -2
- package/dist/native/p-3da64006.entry.js +0 -2
- package/dist/native/p-3da64006.entry.js.map +0 -1
- package/dist/native/p-3ed84cd9.entry.js +0 -2
- package/dist/native/p-3fcaac6d.entry.js +0 -2
- package/dist/native/p-3fcaac6d.entry.js.map +0 -1
- package/dist/native/p-4302824a.entry.js +0 -2
- package/dist/native/p-4302824a.entry.js.map +0 -1
- package/dist/native/p-44dd9a4c.entry.js +0 -2
- package/dist/native/p-4f4ed012.entry.js +0 -2
- package/dist/native/p-4f4ed012.entry.js.map +0 -1
- package/dist/native/p-553778e6.entry.js +0 -2
- package/dist/native/p-553778e6.entry.js.map +0 -1
- package/dist/native/p-62032cd9.entry.js +0 -2
- package/dist/native/p-62032cd9.entry.js.map +0 -1
- package/dist/native/p-681f2bac.entry.js.map +0 -1
- package/dist/native/p-7703c736.entry.js +0 -2
- package/dist/native/p-7703c736.entry.js.map +0 -1
- package/dist/native/p-888ad58e.entry.js +0 -2
- package/dist/native/p-888ad58e.entry.js.map +0 -1
- package/dist/native/p-8a577f91.entry.js +0 -2
- package/dist/native/p-8a577f91.entry.js.map +0 -1
- package/dist/native/p-8d45dbfe.js +0 -2
- package/dist/native/p-9991116a.entry.js +0 -2
- package/dist/native/p-9a263d0e.js +0 -2
- package/dist/native/p-9a263d0e.js.map +0 -1
- package/dist/native/p-ac5496e7.entry.js +0 -2
- package/dist/native/p-ad2cc829.entry.js +0 -2
- package/dist/native/p-b58fb522.entry.js +0 -2
- package/dist/native/p-ba9906b7.entry.js +0 -2
- package/dist/native/p-fb672f90.entry.js +0 -2
- package/dist/native/p-fc9564b3.js +0 -2
- package/dist/native/p-fc9564b3.js.map +0 -1
- /package/dist/native/{p-aacd8789.entry.js.map → p-1f01fb64.entry.js.map} +0 -0
- /package/dist/native/{p-ac5496e7.entry.js.map → p-25f2ce81.entry.js.map} +0 -0
- /package/dist/native/{p-43071c3b.entry.js.map → p-3784efdc.entry.js.map} +0 -0
- /package/dist/native/{p-676447d7.entry.js.map → p-788e9ee5.entry.js.map} +0 -0
- /package/dist/native/{p-f033c4ce.entry.js.map → p-7bbcf477.entry.js.map} +0 -0
- /package/dist/native/{p-2d647761.entry.js.map → p-f5eb047e.entry.js.map} +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { animate, easeOut } from "popmotion";
|
|
2
|
+
import styler from "stylefire";
|
|
3
|
+
const useSlide = (node, { duration } = { duration: 200 }) => {
|
|
4
|
+
const nodeStyler = styler(node);
|
|
5
|
+
/**
|
|
6
|
+
* Will animate the translateX to 100%, sliding the element to the right.
|
|
7
|
+
*/
|
|
8
|
+
function slideOut() {
|
|
9
|
+
return new Promise(resolve => {
|
|
10
|
+
animate({
|
|
11
|
+
from: { x: 0 },
|
|
12
|
+
to: { x: 100 },
|
|
13
|
+
ease: easeOut,
|
|
14
|
+
duration,
|
|
15
|
+
onUpdate(latest) {
|
|
16
|
+
nodeStyler.set({ transform: `translateX(${latest.x}%)` });
|
|
17
|
+
},
|
|
18
|
+
onComplete() {
|
|
19
|
+
resolve();
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Applies the slideOut styles without animating, useful when initial state
|
|
26
|
+
* is slid out.
|
|
27
|
+
*/
|
|
28
|
+
function setSlideOut() {
|
|
29
|
+
node.style.transform = 'translateX(100%)';
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Applies the slideIn styles without animating, useful when initial state
|
|
33
|
+
* is slid in.
|
|
34
|
+
*/
|
|
35
|
+
function setSlideIn() {
|
|
36
|
+
node.style.transform = '';
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Will animate the translateX from 100% to 0%, sliding the element in from the right.
|
|
40
|
+
*/
|
|
41
|
+
function slideIn() {
|
|
42
|
+
return new Promise(resolve => {
|
|
43
|
+
animate({
|
|
44
|
+
from: { x: 100 },
|
|
45
|
+
to: { x: 0 },
|
|
46
|
+
duration,
|
|
47
|
+
onUpdate(latest) {
|
|
48
|
+
nodeStyler.set({ transform: `translateX(${latest.x}%)` });
|
|
49
|
+
},
|
|
50
|
+
onComplete() {
|
|
51
|
+
resolve();
|
|
52
|
+
node.style.removeProperty('transform');
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
slideIn,
|
|
59
|
+
slideOut,
|
|
60
|
+
setSlideOut,
|
|
61
|
+
setSlideIn,
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export { useSlide };
|
|
65
|
+
//# sourceMappingURL=slide.animation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slide.animation.js","sourceRoot":"","sources":["../../src/animations/slide.animation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,MAAM,MAAM,WAAW,CAAC;AAO/B,MAAM,QAAQ,GAAG,CACf,IAAiB,EACjB,EAAE,QAAQ,KAAmB,EAAE,QAAQ,EAAE,GAAG,EAAE,EAC9C,EAAE;IACF,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAEhC;;OAEG;IACH,SAAS,QAAQ;QACf,OAAO,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;YACjC,OAAO,CAAC;gBACN,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE;gBACd,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE;gBACd,IAAI,EAAE,OAAO;gBACb,QAAQ;gBACR,QAAQ,CAAC,MAAM;oBACb,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC5D,CAAC;gBACD,UAAU;oBACR,OAAO,EAAE,CAAC;gBACZ,CAAC;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,SAAS,WAAW;QAClB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,kBAAkB,CAAC;IAC5C,CAAC;IAED;;;OAGG;IACH,SAAS,UAAU;QACjB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,SAAS,OAAO;QACd,OAAO,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;YACjC,OAAO,CAAC;gBACN,IAAI,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE;gBAChB,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE;gBACZ,QAAQ;gBACR,QAAQ,CAAC,MAAM;oBACb,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC5D,CAAC;gBACD,UAAU;oBACR,OAAO,EAAE,CAAC;oBACV,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;gBACzC,CAAC;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,OAAO;QACP,QAAQ;QACR,WAAW;QACX,UAAU;KACX,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC","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 to 100%, sliding the element to the right.\n */\n function slideOut() {\n return new Promise<void>(resolve => {\n animate({\n from: { x: 0 },\n to: { x: 100 },\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 * Applies the slideOut styles without animating, useful when initial state\n * is slid out.\n */\n function setSlideOut() {\n node.style.transform = 'translateX(100%)';\n }\n\n /**\n * Applies the slideIn styles without animating, useful when initial state\n * is slid in.\n */\n function setSlideIn() {\n node.style.transform = '';\n }\n\n /**\n * Will animate the translateX from 100% to 0%, sliding the element in from the right.\n */\n function slideIn() {\n return new Promise<void>(resolve => {\n animate({\n from: { x: 100 },\n to: { x: 0 },\n duration,\n onUpdate(latest) {\n nodeStyler.set({ transform: `translateX(${latest.x}%)` });\n },\n onComplete() {\n resolve();\n node.style.removeProperty('transform');\n },\n });\n });\n }\n\n return {\n slideIn,\n slideOut,\n setSlideOut,\n setSlideIn,\n };\n};\n\nexport { useSlide };\n"]}
|
|
@@ -17,5 +17,23 @@ const timeline = (...animations) => ({
|
|
|
17
17
|
return animations.reduce((promise, animation) => promise.then(() => animation()), Promise.resolve());
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Will execute a series of animation promises in parallel.
|
|
22
|
+
* This is useful for running multiple animations simultaneously.
|
|
23
|
+
*
|
|
24
|
+
* @param {Array<() => Promise<void>>} animations - The array of animation functions.
|
|
25
|
+
* @returns {Object} - An object with a `start` method to begin the parallel animations.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* const { fadeOut } = useFade(this.ref);
|
|
29
|
+
* const { slideOut } = useSlide(this.containerRef);
|
|
30
|
+
*
|
|
31
|
+
* parallel(fadeOut, slideOut).start();
|
|
32
|
+
*/
|
|
33
|
+
const parallel = (...animations) => ({
|
|
34
|
+
start: () => {
|
|
35
|
+
return Promise.all(animations.map(animation => animation()));
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
export { timeline, parallel };
|
|
21
39
|
//# sourceMappingURL=timeline.animation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline.animation.js","sourceRoot":"","sources":["../../src/animations/timeline.animation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,QAAQ,GAAG,CAAC,GAAG,UAAsC,EAAE,EAAE,CAAC,CAAC;IAC/D,KAAK,EAAE,GAAG,EAAE;QACV,OAAO,UAAU,CAAC,MAAM,CACtB,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC,EACvD,OAAO,CAAC,OAAO,EAAE,CAClB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/**\n * Will execute a series of animation promises in sequence.\n * This is useful for chaining animations where each step depends on the\n * previous one completing before starting the next.\n *\n * @param {Array<() => Promise<void>>} animations - The array of animation functions.\n * @returns {Object} - An object with a `start` method to begin the timeline.\n *\n * @example\n * const { fadeOut } = useFade(this.ref);\n * const { collapse } = useCollapse(this.ref);\n *\n * timeline(fadeOut, collapse).start();\n */\nconst timeline = (...animations: Array<() => Promise<void>>) => ({\n start: () => {\n return animations.reduce(\n (promise, animation) => promise.then(() => animation()),\n Promise.resolve(),\n );\n },\n});\n\nexport { timeline };\n"]}
|
|
1
|
+
{"version":3,"file":"timeline.animation.js","sourceRoot":"","sources":["../../src/animations/timeline.animation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,QAAQ,GAAG,CAAC,GAAG,UAAsC,EAAE,EAAE,CAAC,CAAC;IAC/D,KAAK,EAAE,GAAG,EAAE;QACV,OAAO,UAAU,CAAC,MAAM,CACtB,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC,EACvD,OAAO,CAAC,OAAO,EAAE,CAClB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,QAAQ,GAAG,CAAC,GAAG,UAAsC,EAAE,EAAE,CAAC,CAAC;IAC/D,KAAK,EAAE,GAAG,EAAE;QACV,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;CACF,CAAC,CAAC;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/**\n * Will execute a series of animation promises in sequence.\n * This is useful for chaining animations where each step depends on the\n * previous one completing before starting the next.\n *\n * @param {Array<() => Promise<void>>} animations - The array of animation functions.\n * @returns {Object} - An object with a `start` method to begin the timeline.\n *\n * @example\n * const { fadeOut } = useFade(this.ref);\n * const { collapse } = useCollapse(this.ref);\n *\n * timeline(fadeOut, collapse).start();\n */\nconst timeline = (...animations: Array<() => Promise<void>>) => ({\n start: () => {\n return animations.reduce(\n (promise, animation) => promise.then(() => animation()),\n Promise.resolve(),\n );\n },\n});\n\n/**\n * Will execute a series of animation promises in parallel.\n * This is useful for running multiple animations simultaneously.\n *\n * @param {Array<() => Promise<void>>} animations - The array of animation functions.\n * @returns {Object} - An object with a `start` method to begin the parallel animations.\n *\n * @example\n * const { fadeOut } = useFade(this.ref);\n * const { slideOut } = useSlide(this.containerRef);\n *\n * parallel(fadeOut, slideOut).start();\n */\nconst parallel = (...animations: Array<() => Promise<void>>) => ({\n start: () => {\n return Promise.all(animations.map(animation => animation()));\n },\n});\n\nexport { timeline, parallel };\n"]}
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"components/nv-loader/nv-loader.js",
|
|
37
37
|
"components/nv-menu/nv-menu.js",
|
|
38
38
|
"components/nv-menuitem/nv-menuitem.js",
|
|
39
|
+
"components/nv-notification/nv-notification.js",
|
|
39
40
|
"components/nv-popover/nv-popover.js",
|
|
40
41
|
"components/nv-row/nv-row.js",
|
|
41
42
|
"components/nv-stack/nv-stack.js",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { nameof } from "../../utils/class.utils";
|
|
2
3
|
const NvAccordionDocs = {
|
|
3
4
|
component: 'nv-accordion',
|
|
4
5
|
subcomponents: ['nv-accordion-item', 'nv-icon', 'nv-button', 'nv-badge'],
|
|
5
|
-
badge: 'beta',
|
|
6
6
|
stories: [
|
|
7
|
+
// Default
|
|
7
8
|
{
|
|
8
9
|
name: 'Default',
|
|
9
10
|
description: 'Accordion with simple items',
|
|
@@ -24,8 +25,9 @@ const NvAccordionDocs = {
|
|
|
24
25
|
},
|
|
25
26
|
template: h("nv-accordion", { "data-storybook-args": true }),
|
|
26
27
|
},
|
|
28
|
+
// Mode
|
|
27
29
|
{
|
|
28
|
-
name:
|
|
30
|
+
name: nameof(x => x.mode),
|
|
29
31
|
description: 'Accordion allowing multiple items to be open',
|
|
30
32
|
args: {
|
|
31
33
|
mode: 'multi',
|
|
@@ -44,25 +46,9 @@ const NvAccordionDocs = {
|
|
|
44
46
|
},
|
|
45
47
|
template: h("nv-accordion", { "data-storybook-args": true }),
|
|
46
48
|
},
|
|
49
|
+
// OpenIndexes
|
|
47
50
|
{
|
|
48
|
-
name:
|
|
49
|
-
description: 'Real-world example with TraXes Connection Points',
|
|
50
|
-
args: {
|
|
51
|
-
mode: 'accordion',
|
|
52
|
-
openIndexes: [0, 2],
|
|
53
|
-
},
|
|
54
|
-
template: (h("nv-accordion", { "data-storybook-args": true }, h("nv-accordion-item", null, h("div", { slot: "header" }, h("div", { "data-class": "flex items-center justify-between w-full" }, h("div", { "data-class": "flex flex-col border-r border-[#E3E3E3] pr-4 mr-4" }, h("span", { "data-class": "nv-accordion-item__title" }, "EC-308"), h("span", { "data-class": "nv-accordion-item__subtitle" }, "Connection point")), h("nv-badge", { color: "success", label: "Running" }, h("nv-icon", { slot: "leading-icon", name: "check", size: "sm" })))), h("div", { slot: "content", "data-class": "flex items-center justify-between" }, h("div", null, h("p", null, "Single accordion or accordion group"), h("p", null, "Use the accordion as a single instance, or in a group of accordions stacked vertically."), h("p", null, "The accordion title is wrapped in a heading tag by default. Alter it to fit the information architecture of the page.")))), h("nv-accordion-item", null, h("div", { slot: "header" }, h("div", { "data-class": "flex items-center justify-between w-full" }, h("div", { "data-class": "flex flex-col border-r border-[#E3E3E3] pr-4 mr-4" }, h("span", { "data-class": "nv-accordion-item__title" }, "EC-309"), h("span", { "data-class": "nv-accordion-item__subtitle" }, "Connection point")), h("nv-badge", { color: "success", label: "Running" }, h("nv-icon", { slot: "leading-icon", name: "check", size: "sm" })))), h("div", { slot: "content" }, h("p", null, "Content for EC-309 connection point"))), h("nv-accordion-item", null, h("div", { slot: "header" }, h("div", { "data-class": "flex items-center justify-between w-full" }, h("div", { "data-class": "flex flex-col border-r border-[#E3E3E3] pr-4 mr-4" }, h("span", { "data-class": "nv-accordion-item__title" }, "EC-310"), h("span", { "data-class": "nv-accordion-item__subtitle" }, "Connection point")), h("nv-badge", { color: "error", label: "Stopped" }, h("nv-icon", { slot: "leading-icon", name: "x", size: "sm" })))), h("div", { slot: "content" }, h("p", null, "Content for EC-310 connection point (stopped)"))))),
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: 'DisabledItem',
|
|
58
|
-
description: 'Accordion with a disabled item',
|
|
59
|
-
args: {
|
|
60
|
-
mode: 'accordion',
|
|
61
|
-
},
|
|
62
|
-
template: (h("nv-accordion", { "data-storybook-args": true }, h("nv-accordion-item", { itemTitle: "Active item", open: true }, h("div", { slot: "content" }, "This item is accessible")), h("nv-accordion-item", { itemTitle: "Disabled item", disabled: true }, h("div", { slot: "content" }, "This item is not accessible because it is disabled")))),
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: 'OpenIndexesDemo',
|
|
51
|
+
name: nameof(x => x.openIndexes),
|
|
66
52
|
description: 'Demonstration of openIndexes with multiple items and first item pre-opened',
|
|
67
53
|
args: {
|
|
68
54
|
mode: 'accordion',
|
|
@@ -122,6 +108,78 @@ const NvAccordionDocs = {
|
|
|
122
108
|
},
|
|
123
109
|
template: h("nv-accordion", { "data-storybook-args": true }),
|
|
124
110
|
},
|
|
111
|
+
// DisabledItem
|
|
112
|
+
{
|
|
113
|
+
name: 'DisabledItem',
|
|
114
|
+
description: 'Accordion allowing multiple items to be open',
|
|
115
|
+
args: {
|
|
116
|
+
data: [
|
|
117
|
+
{
|
|
118
|
+
id: '1',
|
|
119
|
+
title: 'Title 1',
|
|
120
|
+
content: 'Content of title 1',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: '2',
|
|
124
|
+
title: 'Title 2',
|
|
125
|
+
content: 'This item is not accessible because it is disabled',
|
|
126
|
+
disabled: true,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
template: h("nv-accordion", { "data-storybook-args": true }),
|
|
131
|
+
},
|
|
132
|
+
// Slot
|
|
133
|
+
{
|
|
134
|
+
name: 'Slot',
|
|
135
|
+
description: 'Accordion with a disabled item',
|
|
136
|
+
template: (h("nv-accordion", { "data-storybook-args": true }, h("nv-accordion-item", { "item-title": "Title item" }, h("div", { slot: "content" }, "This item is accessible")), h("nv-accordion-item", { "item-title": "Title second item" }, h("div", { slot: "content" }, "This second item is accessible")))),
|
|
137
|
+
},
|
|
138
|
+
// SlotWithMode
|
|
139
|
+
{
|
|
140
|
+
name: 'SlotWithMode',
|
|
141
|
+
description: 'Accordion with a disabled item',
|
|
142
|
+
args: {
|
|
143
|
+
mode: 'multi',
|
|
144
|
+
},
|
|
145
|
+
template: (h("nv-accordion", { "data-storybook-args": true }, h("nv-accordion-item", { "item-title": "Title item" }, h("div", { slot: "content" }, "This item is accessible")), h("nv-accordion-item", { "item-title": "Title second item" }, h("div", { slot: "content" }, "This second item is accessible")))),
|
|
146
|
+
},
|
|
147
|
+
// SlotWithOpenIndexes
|
|
148
|
+
{
|
|
149
|
+
name: 'SlotWithOpenIndexes',
|
|
150
|
+
description: 'Demonstration of openIndexes with multiple items and first item pre-opened',
|
|
151
|
+
args: {
|
|
152
|
+
mode: 'accordion',
|
|
153
|
+
openIndexes: [0],
|
|
154
|
+
},
|
|
155
|
+
template: (h("nv-accordion", { "data-storybook-args": true }, h("nv-accordion-item", { "item-title": "Active item" }, h("div", { slot: "content" }, "This item is accessible")), h("nv-accordion-item", { "item-title": "Title second item" }, h("div", { slot: "content" }, "This second item is accessible")))),
|
|
156
|
+
},
|
|
157
|
+
// SlotWithDisabledItem
|
|
158
|
+
{
|
|
159
|
+
name: 'SlotWithDisabledItem',
|
|
160
|
+
description: 'Accordion with a disabled item',
|
|
161
|
+
args: {
|
|
162
|
+
mode: 'accordion',
|
|
163
|
+
},
|
|
164
|
+
template: (h("nv-accordion", { "data-storybook-args": true }, h("nv-accordion-item", { "item-title": "Title item" }, h("div", { slot: "content" }, "This item is accessible")), h("nv-accordion-item", { "item-title": "Disabled item", disabled: true }, h("div", { slot: "content" }, "This item is not accessible because it is disabled")))),
|
|
165
|
+
},
|
|
166
|
+
// SlotWithOpenItem
|
|
167
|
+
{
|
|
168
|
+
name: 'SlotWithOpenItem',
|
|
169
|
+
description: 'Accordion with an open item',
|
|
170
|
+
template: (h("nv-accordion", { "data-storybook-args": true }, h("nv-accordion-item", { "item-title": "Active item", open: true }, h("div", { slot: "content" }, "This item is accessible")), h("nv-accordion-item", { "item-title": "Title second item" }, h("div", { slot: "content" }, "This second item is accessible")))),
|
|
171
|
+
},
|
|
172
|
+
// CustomHeader
|
|
173
|
+
{
|
|
174
|
+
name: 'CustomHeader',
|
|
175
|
+
description: 'Real-world example with TraXes Connection Points',
|
|
176
|
+
args: {
|
|
177
|
+
mode: 'multi',
|
|
178
|
+
openIndexes: [0, 2],
|
|
179
|
+
},
|
|
180
|
+
template: (h("nv-accordion", { "data-storybook-args": true }, h("nv-accordion-item", null, h("div", { slot: "header" }, h("div", { "data-class": "flex items-center justify-between w-full" }, h("div", { "data-class": "flex flex-col border-r border-[#E3E3E3] pr-4 mr-4" }, h("span", { "data-class": "nv-accordion-item__title" }, "EC-308"), h("span", { "data-class": "nv-accordion-item__subtitle" }, "Connection point")), h("nv-badge", { color: "success", label: "Running" }, h("nv-icon", { slot: "leading-icon", name: "check", size: "sm" })))), h("div", { slot: "content", "data-class": "flex items-center justify-between" }, h("div", null, h("p", null, "Single accordion or accordion group"), h("p", null, "Use the accordion as a single instance, or in a group of accordions stacked vertically."), h("p", null, "The accordion title is wrapped in a heading tag by default. Alter it to fit the information architecture of the page.")))), h("nv-accordion-item", null, h("div", { slot: "header" }, h("div", { "data-class": "flex items-center justify-between w-full" }, h("div", { "data-class": "flex flex-col border-r border-[#E3E3E3] pr-4 mr-4" }, h("span", { "data-class": "nv-accordion-item__title" }, "EC-309"), h("span", { "data-class": "nv-accordion-item__subtitle" }, "Connection point")), h("nv-badge", { color: "success", label: "Running" }, h("nv-icon", { slot: "leading-icon", name: "check", size: "sm" })))), h("div", { slot: "content" }, h("p", null, "Content for EC-309 connection point"))), h("nv-accordion-item", null, h("div", { slot: "header" }, h("div", { "data-class": "flex items-center justify-between w-full" }, h("div", { "data-class": "flex flex-col border-r border-[#E3E3E3] pr-4 mr-4" }, h("span", { "data-class": "nv-accordion-item__title" }, "EC-310"), h("span", { "data-class": "nv-accordion-item__subtitle" }, "Connection point")), h("nv-badge", { color: "error", label: "Stopped" }, h("nv-icon", { slot: "leading-icon", name: "x", size: "sm" })))), h("div", { slot: "content" }, h("p", null, "Content for EC-310 connection point (stopped)"))))),
|
|
181
|
+
},
|
|
182
|
+
// ComplexData
|
|
125
183
|
{
|
|
126
184
|
name: 'ComplexData',
|
|
127
185
|
description: 'Accordion with complex data including all possible attributes',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-accordion.docs.js","sourceRoot":"","sources":["../../../src/components/nv-accordion/nv-accordion.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIlC,MAAM,eAAe,GAAqC;IACxD,SAAS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AAE;oBACJ;wBACE,EAAE,EAAE,GAAG;wBACP,KAAK,EAAE,kBAAkB;wBACzB,QAAQ,EAAE,qBAAqB;wBAC/B,OAAO,EAAE,cAAc;wBACvB,QAAQ,EAAE,KAAK;qBAChB;oBACD;wBACE,EAAE,EAAE,GAAG;wBACP,KAAK,EAAE,kBAAkB;wBACzB,QAAQ,EAAE,gBAAgB;wBAC1B,OAAO,EAAE,sBAAsB;wBAC/B,QAAQ,EAAE,IAAI;qBACf;iBACF;gBACD,WAAW,EAAE,CAAC,CAAC,CAAC;aACjB;YACD,QAAQ,EAAE,kDAAiD;SAC5D;KACF;CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\n\nconst NvAccordionDocs: NovaDocs<Components.NvAccordion> = {\n component: 'nv-accordion',\n subcomponents: ['nv-accordion-item', 'nv-icon', 'nv-button', 'nv-badge'],\n badge: 'beta',\n stories: [\n {\n name: 'Default',\n description: 'Accordion with simple items',\n args: {\n mode: 'accordion',\n data: [\n {\n id: '1',\n title: 'Title 1',\n content: 'Content of title 1',\n },\n {\n id: '2',\n title: 'Title 2',\n content: 'Content of title 2',\n },\n ],\n },\n template: <nv-accordion data-storybook-args></nv-accordion>,\n },\n {\n name: 'MultiMode',\n description: 'Accordion allowing multiple items to be open',\n args: {\n mode: 'multi',\n data: [\n {\n id: '1',\n title: 'Title 1',\n content: 'Content of title 1',\n },\n {\n id: '2',\n title: 'Title 2',\n content: 'Content of title 2',\n },\n ],\n },\n template: <nv-accordion data-storybook-args></nv-accordion>,\n },\n {\n name: 'CustomHeader',\n description: 'Real-world example with TraXes Connection Points',\n args: {\n mode: 'accordion',\n openIndexes: [0, 2],\n },\n template: (\n <nv-accordion data-storybook-args>\n <nv-accordion-item>\n <div slot=\"header\">\n <div data-class=\"flex items-center justify-between w-full\">\n <div data-class=\"flex flex-col border-r border-[#E3E3E3] pr-4 mr-4\">\n <span data-class=\"nv-accordion-item__title\">EC-308</span>\n <span data-class=\"nv-accordion-item__subtitle\">\n Connection point\n </span>\n </div>\n <nv-badge color=\"success\" label=\"Running\">\n <nv-icon slot=\"leading-icon\" name=\"check\" size=\"sm\" />\n </nv-badge>\n </div>\n </div>\n <div slot=\"content\" data-class=\"flex items-center justify-between\">\n <div>\n <p>Single accordion or accordion group</p>\n <p>\n Use the accordion as a single instance, or in a group of\n accordions stacked vertically.\n </p>\n <p>\n The accordion title is wrapped in a heading tag by default.\n Alter it to fit the information architecture of the page.\n </p>\n </div>\n </div>\n </nv-accordion-item>\n <nv-accordion-item>\n <div slot=\"header\">\n <div data-class=\"flex items-center justify-between w-full\">\n <div data-class=\"flex flex-col border-r border-[#E3E3E3] pr-4 mr-4\">\n <span data-class=\"nv-accordion-item__title\">EC-309</span>\n <span data-class=\"nv-accordion-item__subtitle\">\n Connection point\n </span>\n </div>\n <nv-badge color=\"success\" label=\"Running\">\n <nv-icon slot=\"leading-icon\" name=\"check\" size=\"sm\" />\n </nv-badge>\n </div>\n </div>\n <div slot=\"content\">\n <p>Content for EC-309 connection point</p>\n </div>\n </nv-accordion-item>\n <nv-accordion-item>\n <div slot=\"header\">\n <div data-class=\"flex items-center justify-between w-full\">\n <div data-class=\"flex flex-col border-r border-[#E3E3E3] pr-4 mr-4\">\n <span data-class=\"nv-accordion-item__title\">EC-310</span>\n <span data-class=\"nv-accordion-item__subtitle\">\n Connection point\n </span>\n </div>\n <nv-badge color=\"error\" label=\"Stopped\">\n <nv-icon slot=\"leading-icon\" name=\"x\" size=\"sm\" />\n </nv-badge>\n </div>\n </div>\n <div slot=\"content\">\n <p>Content for EC-310 connection point (stopped)</p>\n </div>\n </nv-accordion-item>\n </nv-accordion>\n ),\n },\n {\n name: 'DisabledItem',\n description: 'Accordion with a disabled item',\n args: {\n mode: 'accordion',\n },\n template: (\n <nv-accordion data-storybook-args>\n <nv-accordion-item itemTitle=\"Active item\" open>\n <div slot=\"content\">This item is accessible</div>\n </nv-accordion-item>\n <nv-accordion-item itemTitle=\"Disabled item\" disabled>\n <div slot=\"content\">\n This item is not accessible because it is disabled\n </div>\n </nv-accordion-item>\n </nv-accordion>\n ),\n },\n {\n name: 'OpenIndexesDemo',\n description:\n 'Demonstration of openIndexes with multiple items and first item pre-opened',\n args: {\n mode: 'accordion',\n data: [\n {\n id: '1',\n title: 'Item 1 - Pre-opened',\n content:\n 'This is the first item that is opened by default using openIndexes.',\n },\n {\n id: '2',\n title: 'Item 2',\n content: 'Content of the second item.',\n },\n {\n id: '3',\n title: 'Item 3',\n content: 'Content of the third item.',\n },\n {\n id: '4',\n title: 'Item 4',\n content: 'Content of the fourth item.',\n },\n {\n id: '5',\n title: 'Item 5',\n content: 'Content of the fifth item.',\n },\n {\n id: '6',\n title: 'Item 6',\n content: 'Content of the sixth item.',\n },\n {\n id: '7',\n title: 'Item 7',\n content: 'Content of the seventh item.',\n },\n {\n id: '8',\n title: 'Item 8',\n content: 'Content of the eighth item.',\n },\n {\n id: '9',\n title: 'Item 9',\n content: 'Content of the ninth item.',\n },\n {\n id: '10',\n title: 'Item 10',\n content: 'Content of the tenth item.',\n },\n ],\n openIndexes: [0],\n },\n template: <nv-accordion data-storybook-args></nv-accordion>,\n },\n {\n name: 'ComplexData',\n description:\n 'Accordion with complex data including all possible attributes',\n args: {\n mode: 'accordion',\n data: [\n {\n id: '1',\n title: 'Complete section',\n subtitle: 'With all attributes',\n content: 'Main content',\n disabled: false,\n },\n {\n id: '2',\n title: 'Disabled section',\n subtitle: 'Not accessible',\n content: 'Inaccessible content',\n disabled: true,\n },\n ],\n openIndexes: [0],\n },\n template: <nv-accordion data-storybook-args></nv-accordion>,\n },\n ],\n};\n\nexport default NvAccordionDocs;\n"]}
|
|
1
|
+
{"version":3,"file":"nv-accordion.docs.js","sourceRoot":"","sources":["../../../src/components/nv-accordion/nv-accordion.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;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wBAChB,yBAAgB,0CAA0C;4BACxD,yBAAgB,mDAAmD;gCACjE,0BAAiB,0BAA0B,aAAc;gCACzD,0BAAiB,6BAA6B,uBAEvC,CACH;4BACN,gBAAU,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS;gCACrC,eAAS,IAAI,EAAC,cAAc,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,IAAI,GAAG,CACzC,CACP,CACF;oBACN,WAAK,IAAI,EAAC,SAAS;wBACjB,6DAAoD,CAChD,CACY,CACP,CAChB;SACF;QACD,cAAc;QACd;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EACT,+DAA+D;YACjE,IAAI,EAAE;gBACJ,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE;oBACJ;wBACE,EAAE,EAAE,GAAG;wBACP,KAAK,EAAE,kBAAkB;wBACzB,QAAQ,EAAE,qBAAqB;wBAC/B,OAAO,EAAE,cAAc;wBACvB,QAAQ,EAAE,KAAK;qBAChB;oBACD;wBACE,EAAE,EAAE,GAAG;wBACP,KAAK,EAAE,kBAAkB;wBACzB,QAAQ,EAAE,gBAAgB;wBAC1B,OAAO,EAAE,sBAAsB;wBAC/B,QAAQ,EAAE,IAAI;qBACf;iBACF;gBACD,WAAW,EAAE,CAAC,CAAC,CAAC;aACjB;YACD,QAAQ,EAAE,kDAAiD;SAC5D;KACF;CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\nimport { nameof } from '../../utils/class.utils';\n\nconst NvAccordionDocs: NovaDocs<Components.NvAccordion> = {\n component: 'nv-accordion',\n subcomponents: ['nv-accordion-item', 'nv-icon', 'nv-button', 'nv-badge'],\n stories: [\n // Default\n {\n name: 'Default',\n description: 'Accordion with simple items',\n args: {\n mode: 'accordion',\n data: [\n {\n id: '1',\n title: 'Title 1',\n content: 'Content of title 1',\n },\n {\n id: '2',\n title: 'Title 2',\n content: 'Content of title 2',\n },\n ],\n },\n template: <nv-accordion data-storybook-args></nv-accordion>,\n },\n // Mode\n {\n name: nameof<Components.NvAccordion>(x => x.mode),\n description: 'Accordion allowing multiple items to be open',\n args: {\n mode: 'multi',\n data: [\n {\n id: '1',\n title: 'Title 1',\n content: 'Content of title 1',\n },\n {\n id: '2',\n title: 'Title 2',\n content: 'Content of title 2',\n },\n ],\n },\n template: <nv-accordion data-storybook-args></nv-accordion>,\n },\n // OpenIndexes\n {\n name: nameof<Components.NvAccordion>(x => x.openIndexes),\n description:\n 'Demonstration of openIndexes with multiple items and first item pre-opened',\n args: {\n mode: 'accordion',\n data: [\n {\n id: '1',\n title: 'Item 1 - Pre-opened',\n content:\n 'This is the first item that is opened by default using openIndexes.',\n },\n {\n id: '2',\n title: 'Item 2',\n content: 'Content of the second item.',\n },\n {\n id: '3',\n title: 'Item 3',\n content: 'Content of the third item.',\n },\n {\n id: '4',\n title: 'Item 4',\n content: 'Content of the fourth item.',\n },\n {\n id: '5',\n title: 'Item 5',\n content: 'Content of the fifth item.',\n },\n {\n id: '6',\n title: 'Item 6',\n content: 'Content of the sixth item.',\n },\n {\n id: '7',\n title: 'Item 7',\n content: 'Content of the seventh item.',\n },\n {\n id: '8',\n title: 'Item 8',\n content: 'Content of the eighth item.',\n },\n {\n id: '9',\n title: 'Item 9',\n content: 'Content of the ninth item.',\n },\n {\n id: '10',\n title: 'Item 10',\n content: 'Content of the tenth item.',\n },\n ],\n openIndexes: [0],\n },\n template: <nv-accordion data-storybook-args></nv-accordion>,\n },\n // DisabledItem\n {\n name: 'DisabledItem',\n description: 'Accordion allowing multiple items to be open',\n args: {\n data: [\n {\n id: '1',\n title: 'Title 1',\n content: 'Content of title 1',\n },\n {\n id: '2',\n title: 'Title 2',\n content: 'This item is not accessible because it is disabled',\n disabled: true,\n },\n ],\n },\n template: <nv-accordion data-storybook-args></nv-accordion>,\n },\n // Slot\n {\n name: 'Slot',\n description: 'Accordion with a disabled item',\n template: (\n <nv-accordion data-storybook-args>\n <nv-accordion-item item-title=\"Title item\">\n <div slot=\"content\">This item is accessible</div>\n </nv-accordion-item>\n <nv-accordion-item item-title=\"Title second item\">\n <div slot=\"content\">This second item is accessible</div>\n </nv-accordion-item>\n </nv-accordion>\n ),\n },\n // SlotWithMode\n {\n name: 'SlotWithMode',\n description: 'Accordion with a disabled item',\n args: {\n mode: 'multi',\n },\n template: (\n <nv-accordion data-storybook-args>\n <nv-accordion-item item-title=\"Title item\">\n <div slot=\"content\">This item is accessible</div>\n </nv-accordion-item>\n <nv-accordion-item item-title=\"Title second item\">\n <div slot=\"content\">This second item is accessible</div>\n </nv-accordion-item>\n </nv-accordion>\n ),\n },\n // SlotWithOpenIndexes\n {\n name: 'SlotWithOpenIndexes',\n description:\n 'Demonstration of openIndexes with multiple items and first item pre-opened',\n args: {\n mode: 'accordion',\n openIndexes: [0],\n },\n template: (\n <nv-accordion data-storybook-args>\n <nv-accordion-item item-title=\"Active item\">\n <div slot=\"content\">This item is accessible</div>\n </nv-accordion-item>\n <nv-accordion-item item-title=\"Title second item\">\n <div slot=\"content\">This second item is accessible</div>\n </nv-accordion-item>\n </nv-accordion>\n ),\n },\n // SlotWithDisabledItem\n {\n name: 'SlotWithDisabledItem',\n description: 'Accordion with a disabled item',\n args: {\n mode: 'accordion',\n },\n template: (\n <nv-accordion data-storybook-args>\n <nv-accordion-item item-title=\"Title item\">\n <div slot=\"content\">This item is accessible</div>\n </nv-accordion-item>\n <nv-accordion-item item-title=\"Disabled item\" disabled>\n <div slot=\"content\">\n This item is not accessible because it is disabled\n </div>\n </nv-accordion-item>\n </nv-accordion>\n ),\n },\n // SlotWithOpenItem\n {\n name: 'SlotWithOpenItem',\n description: 'Accordion with an open item',\n template: (\n <nv-accordion data-storybook-args>\n <nv-accordion-item item-title=\"Active item\" open>\n <div slot=\"content\">This item is accessible</div>\n </nv-accordion-item>\n <nv-accordion-item item-title=\"Title second item\">\n <div slot=\"content\">This second item is accessible</div>\n </nv-accordion-item>\n </nv-accordion>\n ),\n },\n // CustomHeader\n {\n name: 'CustomHeader',\n description: 'Real-world example with TraXes Connection Points',\n args: {\n mode: 'multi',\n openIndexes: [0, 2],\n },\n template: (\n <nv-accordion data-storybook-args>\n <nv-accordion-item>\n <div slot=\"header\">\n <div data-class=\"flex items-center justify-between w-full\">\n <div data-class=\"flex flex-col border-r border-[#E3E3E3] pr-4 mr-4\">\n <span data-class=\"nv-accordion-item__title\">EC-308</span>\n <span data-class=\"nv-accordion-item__subtitle\">\n Connection point\n </span>\n </div>\n <nv-badge color=\"success\" label=\"Running\">\n <nv-icon slot=\"leading-icon\" name=\"check\" size=\"sm\" />\n </nv-badge>\n </div>\n </div>\n <div slot=\"content\" data-class=\"flex items-center justify-between\">\n <div>\n <p>Single accordion or accordion group</p>\n <p>\n Use the accordion as a single instance, or in a group of\n accordions stacked vertically.\n </p>\n <p>\n The accordion title is wrapped in a heading tag by default.\n Alter it to fit the information architecture of the page.\n </p>\n </div>\n </div>\n </nv-accordion-item>\n <nv-accordion-item>\n <div slot=\"header\">\n <div data-class=\"flex items-center justify-between w-full\">\n <div data-class=\"flex flex-col border-r border-[#E3E3E3] pr-4 mr-4\">\n <span data-class=\"nv-accordion-item__title\">EC-309</span>\n <span data-class=\"nv-accordion-item__subtitle\">\n Connection point\n </span>\n </div>\n <nv-badge color=\"success\" label=\"Running\">\n <nv-icon slot=\"leading-icon\" name=\"check\" size=\"sm\" />\n </nv-badge>\n </div>\n </div>\n <div slot=\"content\">\n <p>Content for EC-309 connection point</p>\n </div>\n </nv-accordion-item>\n <nv-accordion-item>\n <div slot=\"header\">\n <div data-class=\"flex items-center justify-between w-full\">\n <div data-class=\"flex flex-col border-r border-[#E3E3E3] pr-4 mr-4\">\n <span data-class=\"nv-accordion-item__title\">EC-310</span>\n <span data-class=\"nv-accordion-item__subtitle\">\n Connection point\n </span>\n </div>\n <nv-badge color=\"error\" label=\"Stopped\">\n <nv-icon slot=\"leading-icon\" name=\"x\" size=\"sm\" />\n </nv-badge>\n </div>\n </div>\n <div slot=\"content\">\n <p>Content for EC-310 connection point (stopped)</p>\n </div>\n </nv-accordion-item>\n </nv-accordion>\n ),\n },\n // ComplexData\n {\n name: 'ComplexData',\n description:\n 'Accordion with complex data including all possible attributes',\n args: {\n mode: 'accordion',\n data: [\n {\n id: '1',\n title: 'Complete section',\n subtitle: 'With all attributes',\n content: 'Main content',\n disabled: false,\n },\n {\n id: '2',\n title: 'Disabled section',\n subtitle: 'Not accessible',\n content: 'Inaccessible content',\n disabled: true,\n },\n ],\n openIndexes: [0],\n },\n template: <nv-accordion data-storybook-args></nv-accordion>,\n },\n ],\n};\n\nexport default NvAccordionDocs;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Host, h, } from "@stencil/core";
|
|
1
|
+
import { Host, h, forceUpdate, } from "@stencil/core";
|
|
2
2
|
/**
|
|
3
3
|
* @slot default - Slot for custom content (optional, ignored if data is provided)
|
|
4
4
|
*/
|
|
@@ -14,13 +14,14 @@ export class NvAccordion {
|
|
|
14
14
|
* Expansion mode: 'accordion' (single open) or 'multi' (multiple open)
|
|
15
15
|
*/
|
|
16
16
|
this.mode = 'accordion';
|
|
17
|
+
/**
|
|
18
|
+
* Index of open items (external control possible)
|
|
19
|
+
*/
|
|
20
|
+
this.openIndexes = [];
|
|
17
21
|
//#endregion PROPERTIES
|
|
18
22
|
/****************************************************************************/
|
|
19
23
|
//#region STATE
|
|
20
|
-
|
|
21
|
-
* Internal index of open items (not exposed)
|
|
22
|
-
*/
|
|
23
|
-
this.internalOpenIndexes = [];
|
|
24
|
+
this.updatingFromInternal = false;
|
|
24
25
|
}
|
|
25
26
|
//#endregion EVENTS
|
|
26
27
|
/****************************************************************************/
|
|
@@ -45,110 +46,119 @@ export class NvAccordion {
|
|
|
45
46
|
* @param {boolean} [forceOpen] Force open (true) or close (false)
|
|
46
47
|
*/
|
|
47
48
|
toggleItem(index, forceOpen) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
const items = Array.from(this.el.querySelectorAll('nv-accordion-item'));
|
|
50
|
+
const item = items[index];
|
|
51
|
+
if (!item || item.disabled) {
|
|
52
|
+
console.warn('[toggleItem] Item not found or disabled:', index);
|
|
53
|
+
this.openChanged.emit({ openIndexes: [...(this.openIndexes || [])] });
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
let openIndexes = [...(this.openIndexes || [])];
|
|
51
57
|
const isOpen = openIndexes.includes(index);
|
|
52
58
|
if (this.mode === 'accordion') {
|
|
53
|
-
openIndexes =
|
|
59
|
+
openIndexes =
|
|
60
|
+
forceOpen === false || (forceOpen === undefined && isOpen)
|
|
61
|
+
? []
|
|
62
|
+
: [index];
|
|
54
63
|
}
|
|
55
64
|
else {
|
|
56
65
|
if (forceOpen === false) {
|
|
57
66
|
openIndexes = openIndexes.filter(i => i !== index);
|
|
58
67
|
}
|
|
59
|
-
else if (!isOpen) {
|
|
68
|
+
else if (forceOpen === true && !isOpen) {
|
|
60
69
|
openIndexes.push(index);
|
|
61
70
|
}
|
|
71
|
+
else if (forceOpen === undefined) {
|
|
72
|
+
openIndexes = isOpen
|
|
73
|
+
? openIndexes.filter(i => i !== index)
|
|
74
|
+
: [...openIndexes, index];
|
|
75
|
+
}
|
|
62
76
|
}
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
65
|
-
if (this.openIndexes !== undefined) {
|
|
66
|
-
this.openIndexes =
|
|
67
|
-
this.mode === 'accordion'
|
|
68
|
-
? [openIndexes[0]].filter(x => x !== undefined)
|
|
69
|
-
: [...openIndexes];
|
|
70
|
-
}
|
|
71
|
-
// Update child elements state - for both data and slot usage
|
|
77
|
+
this.updatingFromInternal = true;
|
|
78
|
+
this.openIndexes = [...openIndexes];
|
|
72
79
|
this.updateChildrenState();
|
|
80
|
+
this.updatingFromInternal = false;
|
|
81
|
+
this.openChanged.emit({ openIndexes: [...openIndexes] });
|
|
73
82
|
}
|
|
74
83
|
/**
|
|
75
|
-
* Updates the open state of child elements based on
|
|
84
|
+
* Updates the open state of child elements based on openIndexes
|
|
76
85
|
*/
|
|
77
86
|
async updateChildrenState() {
|
|
78
|
-
|
|
79
|
-
|
|
87
|
+
const items = Array.from(this.el.querySelectorAll('nv-accordion-item'));
|
|
88
|
+
items.forEach((item, i) => {
|
|
89
|
+
const shouldBeOpen = (this.openIndexes || []).includes(i);
|
|
90
|
+
item.open = shouldBeOpen;
|
|
91
|
+
item.mode = this.mode;
|
|
92
|
+
item.setAttribute('aria-expanded', shouldBeOpen ? 'true' : 'false');
|
|
93
|
+
forceUpdate(item);
|
|
94
|
+
});
|
|
80
95
|
}
|
|
81
96
|
/**
|
|
82
97
|
* Listens to itemToggle events from nv-accordion-item elements
|
|
83
98
|
* @param {CustomEvent<boolean>} event Event emitted by nv-accordion-item
|
|
84
99
|
*/
|
|
85
100
|
onItemToggle(event) {
|
|
86
|
-
|
|
101
|
+
if (this.updatingFromInternal) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
87
104
|
const items = Array.from(this.el.querySelectorAll('nv-accordion-item'));
|
|
88
105
|
const targetItem = event.target;
|
|
89
106
|
const index = items.indexOf(targetItem);
|
|
90
107
|
if (index !== -1) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
items.forEach((item, i) => {
|
|
96
|
-
if (i !== index && item.open) {
|
|
97
|
-
item.open = false;
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
this.internalOpenIndexes = [index];
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
// Add index to internalOpenIndexes if not already present
|
|
104
|
-
if (!this.internalOpenIndexes.includes(index)) {
|
|
105
|
-
this.internalOpenIndexes = [...this.internalOpenIndexes, index];
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
// If the item is closing, remove it from internalOpenIndexes
|
|
111
|
-
this.internalOpenIndexes = this.internalOpenIndexes.filter(i => i !== index);
|
|
112
|
-
}
|
|
113
|
-
// Emit openChanged event
|
|
114
|
-
this.openChanged.emit({ openIndexes: this.internalOpenIndexes });
|
|
115
|
-
if (this.openIndexes !== undefined) {
|
|
116
|
-
this.openIndexes =
|
|
117
|
-
this.mode === 'accordion'
|
|
118
|
-
? [this.internalOpenIndexes[0]].filter(x => x !== undefined)
|
|
119
|
-
: [...this.internalOpenIndexes];
|
|
120
|
-
}
|
|
108
|
+
this.toggleItem(index, event.detail);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
console.warn('[onItemToggle] Target item not found in items list');
|
|
121
112
|
}
|
|
122
113
|
}
|
|
123
114
|
//#endregion METHODS
|
|
124
115
|
/****************************************************************************/
|
|
125
116
|
//#region WATCHERS
|
|
117
|
+
onOpenIndexesChange(newValue, oldValue) {
|
|
118
|
+
if (!this.updatingFromInternal &&
|
|
119
|
+
newValue !== undefined &&
|
|
120
|
+
newValue !== oldValue) {
|
|
121
|
+
this.updateChildrenState();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
onModeChange() {
|
|
125
|
+
this.updateChildrenState();
|
|
126
|
+
}
|
|
126
127
|
//#endregion WATCHERS
|
|
127
128
|
/****************************************************************************/
|
|
128
129
|
//#region LIFECYCLE
|
|
129
130
|
componentWillLoad() {
|
|
130
|
-
if (this.openIndexes
|
|
131
|
-
this.
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
componentDidLoad() {
|
|
135
|
-
// If using direct child elements, initialize their state
|
|
136
|
-
if (!this.data || this.data.length === 0) {
|
|
137
|
-
this.updateChildrenState();
|
|
131
|
+
if (this.openIndexes === undefined) {
|
|
132
|
+
this.openIndexes = [];
|
|
138
133
|
}
|
|
139
134
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
135
|
+
async componentDidLoad() {
|
|
136
|
+
var _a;
|
|
137
|
+
const items = Array.from(this.el.querySelectorAll('nv-accordion-item'));
|
|
138
|
+
// Only initialize openIndexes from child items if no data is provided and openIndexes is not explicitly set
|
|
139
|
+
if (!((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
140
|
+
(!this.openIndexes || this.openIndexes.length === 0)) {
|
|
141
|
+
const childOpenIndexes = items
|
|
142
|
+
.map((item, i) => (item.hasAttribute('open') || item.open ? i : -1))
|
|
143
|
+
.filter(i => i !== -1);
|
|
144
|
+
if (childOpenIndexes.length > 0) {
|
|
145
|
+
this.updatingFromInternal = true;
|
|
146
|
+
this.openIndexes = [...childOpenIndexes];
|
|
147
|
+
this.updatingFromInternal = false;
|
|
148
|
+
this.openChanged.emit({ openIndexes: [...this.openIndexes] });
|
|
149
|
+
}
|
|
143
150
|
}
|
|
151
|
+
// Ensure children are in sync with current openIndexes state
|
|
152
|
+
await this.updateChildrenState();
|
|
144
153
|
}
|
|
145
154
|
//#endregion LIFECYCLE
|
|
146
155
|
/****************************************************************************/
|
|
147
156
|
//#region RENDER
|
|
148
157
|
render() {
|
|
149
|
-
|
|
158
|
+
var _a;
|
|
159
|
+
return (h(Host, { key: 'b5c36f19bcbd0d06e9d924ae6f9630b8b6cae05a', role: "list", class: "nv-accordion" }, ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) ? (this.data.map((item, i) => {
|
|
150
160
|
var _a;
|
|
151
|
-
return (h("nv-accordion-item", { key: (_a = item.id) !== null && _a !== void 0 ? _a : i, itemTitle: item.title, disabled: item.disabled, open: (this.
|
|
161
|
+
return (h("nv-accordion-item", { key: (_a = item.id) !== null && _a !== void 0 ? _a : i, itemTitle: item.title, disabled: item.disabled, open: (this.openIndexes || []).includes(i), mode: this.mode }, item.subtitle ? (h("div", { slot: "header" }, h("div", { class: "nv-accordion-item__header-content" }, h("span", { class: "nv-accordion-item__title" }, item.title), h("span", { class: "nv-accordion-item__subtitle" }, item.subtitle)))) : null, h("div", { slot: "content" }, item.content), item.footer && h("div", { slot: "footer" }, item.footer)));
|
|
152
162
|
})) : (h("slot", null))));
|
|
153
163
|
}
|
|
154
164
|
static get is() { return "nv-accordion"; }
|
|
@@ -217,13 +227,14 @@ export class NvAccordion {
|
|
|
217
227
|
"text": "Index of open items (external control possible)"
|
|
218
228
|
},
|
|
219
229
|
"getter": false,
|
|
220
|
-
"setter": false
|
|
230
|
+
"setter": false,
|
|
231
|
+
"defaultValue": "[]"
|
|
221
232
|
}
|
|
222
233
|
};
|
|
223
234
|
}
|
|
224
235
|
static get states() {
|
|
225
236
|
return {
|
|
226
|
-
"
|
|
237
|
+
"updatingFromInternal": {}
|
|
227
238
|
};
|
|
228
239
|
}
|
|
229
240
|
static get events() {
|
|
@@ -297,6 +308,15 @@ export class NvAccordion {
|
|
|
297
308
|
};
|
|
298
309
|
}
|
|
299
310
|
static get elementRef() { return "el"; }
|
|
311
|
+
static get watchers() {
|
|
312
|
+
return [{
|
|
313
|
+
"propName": "openIndexes",
|
|
314
|
+
"methodName": "onOpenIndexesChange"
|
|
315
|
+
}, {
|
|
316
|
+
"propName": "mode",
|
|
317
|
+
"methodName": "onModeChange"
|
|
318
|
+
}];
|
|
319
|
+
}
|
|
300
320
|
static get listeners() {
|
|
301
321
|
return [{
|
|
302
322
|
"name": "itemToggle",
|