@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,333 @@
|
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
import { v4 as uuidv4 } from "uuid";
|
|
3
|
+
import { FeedbackColors } from "../../utils/constants";
|
|
4
|
+
import { useCollapse, useFade, useSlide, parallel } from "../../animations";
|
|
5
|
+
/**
|
|
6
|
+
* @slot heading - Use this slot to insert HTML as the notification title.
|
|
7
|
+
* @slot content - Use this slot to insert HTML as the notification message.
|
|
8
|
+
* @slot actions - Use this slot for custom actions.
|
|
9
|
+
*/
|
|
10
|
+
export class NvNotification {
|
|
11
|
+
constructor() {
|
|
12
|
+
/****************************************************************************/
|
|
13
|
+
//#region PROPERTIES
|
|
14
|
+
/**
|
|
15
|
+
* Set a unique ID for the notification. Used for aria attributes and managing
|
|
16
|
+
* multiple notifications.
|
|
17
|
+
*/
|
|
18
|
+
this.uid = uuidv4();
|
|
19
|
+
/**
|
|
20
|
+
* Specifies the notification type which determines the color and default icon.
|
|
21
|
+
*/
|
|
22
|
+
this.feedback = 'information';
|
|
23
|
+
/**
|
|
24
|
+
* Adjusts the emphasis to make the notification more or less visually
|
|
25
|
+
* prominent to users. Use this to draw attention to important actions or
|
|
26
|
+
* reduce focus on less critical ones
|
|
27
|
+
*/
|
|
28
|
+
this.emphasis = 'medium';
|
|
29
|
+
/**
|
|
30
|
+
* Allows the notification to be dismissed via a close button (x). The
|
|
31
|
+
* notification is not dismissible unless explicitly enabled.
|
|
32
|
+
*/
|
|
33
|
+
this.dismissible = false;
|
|
34
|
+
/**
|
|
35
|
+
* Controls the visibility of the notification.
|
|
36
|
+
*/
|
|
37
|
+
this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
|
|
38
|
+
//#endregion EVENTS
|
|
39
|
+
/****************************************************************************/
|
|
40
|
+
//#region INTERNAL
|
|
41
|
+
this.iconByFeedback = {
|
|
42
|
+
[FeedbackColors.Warning]: 'alert-circle',
|
|
43
|
+
[FeedbackColors.Information]: 'info-circle',
|
|
44
|
+
[FeedbackColors.Success]: 'circle-check',
|
|
45
|
+
[FeedbackColors.Error]: 'alert-triangle',
|
|
46
|
+
[FeedbackColors.Neutral]: 'help',
|
|
47
|
+
};
|
|
48
|
+
this.roleByFeedback = {
|
|
49
|
+
[FeedbackColors.Error]: 'alert',
|
|
50
|
+
[FeedbackColors.Warning]: 'alert',
|
|
51
|
+
[FeedbackColors.Information]: 'status',
|
|
52
|
+
[FeedbackColors.Success]: 'status',
|
|
53
|
+
[FeedbackColors.Neutral]: 'status',
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//#endregion PROPERTIES
|
|
57
|
+
/****************************************************************************/
|
|
58
|
+
//#region METHODS
|
|
59
|
+
async dismiss() {
|
|
60
|
+
await this.dismissAnimation();
|
|
61
|
+
}
|
|
62
|
+
getDefaultIcon() {
|
|
63
|
+
var _a;
|
|
64
|
+
return (_a = this.iconByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'info-circle';
|
|
65
|
+
}
|
|
66
|
+
getAriaRole() {
|
|
67
|
+
var _a;
|
|
68
|
+
return (_a = this.roleByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'status';
|
|
69
|
+
}
|
|
70
|
+
getAriaLive() {
|
|
71
|
+
return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';
|
|
72
|
+
}
|
|
73
|
+
getHeadingId() {
|
|
74
|
+
return this.heading ? `nv-notification-${this.uid}-heading` : null;
|
|
75
|
+
}
|
|
76
|
+
getMessageId() {
|
|
77
|
+
return this.message ? `nv-notification-${this.uid}-message` : null;
|
|
78
|
+
}
|
|
79
|
+
async dismissAnimation() {
|
|
80
|
+
const { fadeOut } = useFade(this.container, { duration: 300 });
|
|
81
|
+
const { slideOut } = useSlide(this.container, { duration: 800 });
|
|
82
|
+
const { collapse } = useCollapse(this.el, {
|
|
83
|
+
duration: 800,
|
|
84
|
+
overflow: 'visible',
|
|
85
|
+
});
|
|
86
|
+
await parallel(fadeOut, slideOut, collapse).start();
|
|
87
|
+
this.hidden = true;
|
|
88
|
+
this.hiddenChanged.emit(true);
|
|
89
|
+
}
|
|
90
|
+
//#endregion INTERNAL
|
|
91
|
+
/****************************************************************************/
|
|
92
|
+
//#region LIFECYCLE
|
|
93
|
+
componentWillLoad() {
|
|
94
|
+
this.headingSlot = this.el.querySelector('[slot="heading"]');
|
|
95
|
+
this.messageSlot = this.el.querySelector('[slot="content"]');
|
|
96
|
+
this.actionsSlot = this.el.querySelector('[slot="actions"]');
|
|
97
|
+
}
|
|
98
|
+
//#endregion LIFECYCLE
|
|
99
|
+
/****************************************************************************/
|
|
100
|
+
//#region RENDER
|
|
101
|
+
render() {
|
|
102
|
+
var _a, _b, _c;
|
|
103
|
+
return (h(Host, { key: '9146cea4ed72801aadf2fb4b7e44895038c98437', role: this.getAriaRole(), "aria-live": this.getAriaLive(), "aria-atomic": true, "aria-labelledby": (_a = this.getHeadingId()) !== null && _a !== void 0 ? _a : null, "aria-describedby": (_b = this.getMessageId()) !== null && _b !== void 0 ? _b : null, tabindex: "-1" }, h("div", { key: 'beed9ae5f6fac1b0c6d103dd75a41e0aede84041', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (h("button", { key: '8e17f33867c2563de719dc1b0f0e2d4ae39ad1a6', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, h("nv-icon", { key: 'cb8850135bb2383e33a16671569547611b55e434', name: "x", size: "sm" }))), h("nv-icon", { key: 'f5f58e1c3a94d854841271eb12af047322b2f0b4', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md" }), h("div", { key: '9c6f6bb0315cd25260d483472a24832031ce45da', "data-scope": "content" }, (this.heading || this.headingSlot) && (h("p", { key: '1013d6b6790f75682a1db0e43293b61e614f1c07', id: this.getHeadingId(), "data-scope": "heading" }, h("slot", { key: '844a7bccf6f365d4e59dfdec9b3c9096cbeda798', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (h("p", { key: '6688e9dc927f6164ce60f27b84fdbeb257296504', id: this.getMessageId(), "data-scope": "message" }, h("slot", { key: 'f0c0790faa40411970575240a081f0f0bf0e9aff', name: "content" }, this.message))), this.actionsSlot && (h("div", { key: '0ba946edf5b3a8410da3b375e589613a2674fd15', "data-scope": "actions" }, h("slot", { key: '0360ab92db66957f0290569c39307ced2be5922d', name: "actions" })))))));
|
|
104
|
+
}
|
|
105
|
+
static get is() { return "nv-notification"; }
|
|
106
|
+
static get originalStyleUrls() {
|
|
107
|
+
return {
|
|
108
|
+
"$": ["styles/nv-notification.scss"]
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
static get styleUrls() {
|
|
112
|
+
return {
|
|
113
|
+
"$": ["styles/nv-notification.css"]
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
static get properties() {
|
|
117
|
+
return {
|
|
118
|
+
"uid": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "string",
|
|
123
|
+
"resolved": "string",
|
|
124
|
+
"references": {}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": false,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [],
|
|
130
|
+
"text": "Set a unique ID for the notification. Used for aria attributes and managing\nmultiple notifications."
|
|
131
|
+
},
|
|
132
|
+
"getter": false,
|
|
133
|
+
"setter": false,
|
|
134
|
+
"attribute": "uid",
|
|
135
|
+
"reflect": true,
|
|
136
|
+
"defaultValue": "uuidv4()"
|
|
137
|
+
},
|
|
138
|
+
"feedback": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"mutable": false,
|
|
141
|
+
"complexType": {
|
|
142
|
+
"original": "`${FeedbackColors}`",
|
|
143
|
+
"resolved": "\"error\" | \"information\" | \"neutral\" | \"success\" | \"warning\"",
|
|
144
|
+
"references": {
|
|
145
|
+
"FeedbackColors": {
|
|
146
|
+
"location": "import",
|
|
147
|
+
"path": "../../utils/constants",
|
|
148
|
+
"id": "src/utils/constants.ts::FeedbackColors"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"required": false,
|
|
153
|
+
"optional": false,
|
|
154
|
+
"docs": {
|
|
155
|
+
"tags": [],
|
|
156
|
+
"text": "Specifies the notification type which determines the color and default icon."
|
|
157
|
+
},
|
|
158
|
+
"getter": false,
|
|
159
|
+
"setter": false,
|
|
160
|
+
"attribute": "feedback",
|
|
161
|
+
"reflect": true,
|
|
162
|
+
"defaultValue": "'information'"
|
|
163
|
+
},
|
|
164
|
+
"emphasis": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"mutable": false,
|
|
167
|
+
"complexType": {
|
|
168
|
+
"original": "`${NotificationEmphasis}`",
|
|
169
|
+
"resolved": "\"high\" | \"medium\"",
|
|
170
|
+
"references": {
|
|
171
|
+
"NotificationEmphasis": {
|
|
172
|
+
"location": "import",
|
|
173
|
+
"path": "../../utils/constants",
|
|
174
|
+
"id": "src/utils/constants.ts::NotificationEmphasis"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"required": false,
|
|
179
|
+
"optional": false,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": "Adjusts the emphasis to make the notification more or less visually\nprominent to users. Use this to draw attention to important actions or\nreduce focus on less critical ones"
|
|
183
|
+
},
|
|
184
|
+
"getter": false,
|
|
185
|
+
"setter": false,
|
|
186
|
+
"attribute": "emphasis",
|
|
187
|
+
"reflect": true,
|
|
188
|
+
"defaultValue": "'medium'"
|
|
189
|
+
},
|
|
190
|
+
"heading": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"complexType": {
|
|
194
|
+
"original": "string",
|
|
195
|
+
"resolved": "string",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": false,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": "Short and concise text for the notification title."
|
|
203
|
+
},
|
|
204
|
+
"getter": false,
|
|
205
|
+
"setter": false,
|
|
206
|
+
"attribute": "heading",
|
|
207
|
+
"reflect": true
|
|
208
|
+
},
|
|
209
|
+
"message": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"mutable": false,
|
|
212
|
+
"complexType": {
|
|
213
|
+
"original": "string",
|
|
214
|
+
"resolved": "string",
|
|
215
|
+
"references": {}
|
|
216
|
+
},
|
|
217
|
+
"required": false,
|
|
218
|
+
"optional": false,
|
|
219
|
+
"docs": {
|
|
220
|
+
"tags": [],
|
|
221
|
+
"text": "Main content for the notification. For more complex content, use the\ncontent slot instead."
|
|
222
|
+
},
|
|
223
|
+
"getter": false,
|
|
224
|
+
"setter": false,
|
|
225
|
+
"attribute": "message",
|
|
226
|
+
"reflect": true
|
|
227
|
+
},
|
|
228
|
+
"icon": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"mutable": false,
|
|
231
|
+
"complexType": {
|
|
232
|
+
"original": "string",
|
|
233
|
+
"resolved": "string",
|
|
234
|
+
"references": {}
|
|
235
|
+
},
|
|
236
|
+
"required": false,
|
|
237
|
+
"optional": false,
|
|
238
|
+
"docs": {
|
|
239
|
+
"tags": [],
|
|
240
|
+
"text": "Icon associated with the notification, defaults vary based on the feedback\ntype."
|
|
241
|
+
},
|
|
242
|
+
"getter": false,
|
|
243
|
+
"setter": false,
|
|
244
|
+
"attribute": "icon",
|
|
245
|
+
"reflect": true
|
|
246
|
+
},
|
|
247
|
+
"dismissible": {
|
|
248
|
+
"type": "boolean",
|
|
249
|
+
"mutable": false,
|
|
250
|
+
"complexType": {
|
|
251
|
+
"original": "boolean",
|
|
252
|
+
"resolved": "boolean",
|
|
253
|
+
"references": {}
|
|
254
|
+
},
|
|
255
|
+
"required": false,
|
|
256
|
+
"optional": false,
|
|
257
|
+
"docs": {
|
|
258
|
+
"tags": [],
|
|
259
|
+
"text": "Allows the notification to be dismissed via a close button (x). The\nnotification is not dismissible unless explicitly enabled."
|
|
260
|
+
},
|
|
261
|
+
"getter": false,
|
|
262
|
+
"setter": false,
|
|
263
|
+
"attribute": "dismissible",
|
|
264
|
+
"reflect": true,
|
|
265
|
+
"defaultValue": "false"
|
|
266
|
+
},
|
|
267
|
+
"hidden": {
|
|
268
|
+
"type": "boolean",
|
|
269
|
+
"mutable": true,
|
|
270
|
+
"complexType": {
|
|
271
|
+
"original": "boolean",
|
|
272
|
+
"resolved": "boolean",
|
|
273
|
+
"references": {}
|
|
274
|
+
},
|
|
275
|
+
"required": false,
|
|
276
|
+
"optional": false,
|
|
277
|
+
"docs": {
|
|
278
|
+
"tags": [],
|
|
279
|
+
"text": "Controls the visibility of the notification."
|
|
280
|
+
},
|
|
281
|
+
"getter": false,
|
|
282
|
+
"setter": false,
|
|
283
|
+
"attribute": "hidden",
|
|
284
|
+
"reflect": true,
|
|
285
|
+
"defaultValue": "false"
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
static get events() {
|
|
290
|
+
return [{
|
|
291
|
+
"method": "hiddenChanged",
|
|
292
|
+
"name": "hiddenChanged",
|
|
293
|
+
"bubbles": true,
|
|
294
|
+
"cancelable": true,
|
|
295
|
+
"composed": true,
|
|
296
|
+
"docs": {
|
|
297
|
+
"tags": [{
|
|
298
|
+
"name": "bind",
|
|
299
|
+
"text": "hidden"
|
|
300
|
+
}],
|
|
301
|
+
"text": "Emits when the 'hidden' prop changes, reflecting a change in visibility.\nPasses hidden value to the detail."
|
|
302
|
+
},
|
|
303
|
+
"complexType": {
|
|
304
|
+
"original": "boolean",
|
|
305
|
+
"resolved": "boolean",
|
|
306
|
+
"references": {}
|
|
307
|
+
}
|
|
308
|
+
}];
|
|
309
|
+
}
|
|
310
|
+
static get methods() {
|
|
311
|
+
return {
|
|
312
|
+
"dismiss": {
|
|
313
|
+
"complexType": {
|
|
314
|
+
"signature": "() => Promise<void>",
|
|
315
|
+
"parameters": [],
|
|
316
|
+
"references": {
|
|
317
|
+
"Promise": {
|
|
318
|
+
"location": "global",
|
|
319
|
+
"id": "global::Promise"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"return": "Promise<void>"
|
|
323
|
+
},
|
|
324
|
+
"docs": {
|
|
325
|
+
"text": "*************************************************************************",
|
|
326
|
+
"tags": []
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
static get elementRef() { return "el"; }
|
|
332
|
+
}
|
|
333
|
+
//# sourceMappingURL=nv-notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nv-notification.js","sourceRoot":"","sources":["../../../src/components/nv-notification/nv-notification.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,GAEN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5E;;;;GAIG;AAMH,MAAM,OAAO,cAAc;IAL3B;QAYE,8EAA8E;QAC9E,oBAAoB;QAEpB;;;WAGG;QAEM,QAAG,GAAW,MAAM,EAAE,CAAC;QAEhC;;WAEG;QAEM,aAAQ,GAAwB,aAAa,CAAC;QAEvD;;;;WAIG;QAEM,aAAQ,GAA8B,QAAQ,CAAC;QAsBxD;;;WAGG;QAEM,gBAAW,GAAY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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Method,\n Element,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { FeedbackColors, NotificationEmphasis } from '../../utils/constants';\nimport { type IconName } from '../nv-icon/nv-icons';\nimport { useCollapse, useFade, useSlide, parallel } from '../../animations';\n\ntype AriaRole = 'status' | 'alert';\ntype AriaLive = 'polite' | 'assertive';\n\n/**\n * @slot heading - Use this slot to insert HTML as the notification title.\n * @slot content - Use this slot to insert HTML as the notification message.\n * @slot actions - Use this slot for custom actions.\n */\n@Component({\n tag: 'nv-notification',\n styleUrl: 'styles/nv-notification.scss',\n shadow: false,\n})\nexport class NvNotification {\n @Element() el: HTMLNvNotificationElement;\n private container: HTMLElement;\n private headingSlot: HTMLElement;\n private messageSlot: HTMLElement;\n private actionsSlot: HTMLElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Set a unique ID for the notification. Used for aria attributes and managing\n * multiple notifications.\n */\n @Prop({ reflect: true })\n readonly uid: string = uuidv4();\n\n /**\n * Specifies the notification type which determines the color and default icon.\n */\n @Prop({ reflect: true })\n readonly feedback: `${FeedbackColors}` = 'information';\n\n /**\n * Adjusts the emphasis to make the notification more or less visually\n * prominent to users. Use this to draw attention to important actions or\n * reduce focus on less critical ones\n */\n @Prop({ reflect: true })\n readonly emphasis: `${NotificationEmphasis}` = 'medium';\n\n /**\n * Short and concise text for the notification title.\n */\n @Prop({ reflect: true })\n readonly heading: string;\n\n /**\n * Main content for the notification. For more complex content, use the\n * content slot instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Icon associated with the notification, defaults vary based on the feedback\n * type.\n */\n @Prop({ reflect: true })\n readonly icon: string;\n\n /**\n * Allows the notification to be dismissed via a close button (x). The\n * notification is not dismissible unless explicitly enabled.\n */\n @Prop({ reflect: true })\n readonly dismissible: boolean = false;\n\n /**\n * Controls the visibility of the notification.\n */\n @Prop({ reflect: true, mutable: true })\n hidden: boolean = false; // eslint-disable-line @stencil-community/reserved-member-names\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n @Method()\n async dismiss() {\n await this.dismissAnimation();\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emits when the 'hidden' prop changes, reflecting a change in visibility.\n * Passes hidden value to the detail.\n * @bind hidden\n */\n @Event()\n hiddenChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region INTERNAL\n\n private iconByFeedback: Record<FeedbackColors, IconName> = {\n [FeedbackColors.Warning]: 'alert-circle',\n [FeedbackColors.Information]: 'info-circle',\n [FeedbackColors.Success]: 'circle-check',\n [FeedbackColors.Error]: 'alert-triangle',\n [FeedbackColors.Neutral]: 'help',\n };\n\n private roleByFeedback: Record<FeedbackColors, AriaRole> = {\n [FeedbackColors.Error]: 'alert',\n [FeedbackColors.Warning]: 'alert',\n [FeedbackColors.Information]: 'status',\n [FeedbackColors.Success]: 'status',\n [FeedbackColors.Neutral]: 'status',\n };\n\n private getDefaultIcon(): IconName {\n return this.iconByFeedback[this.feedback] ?? 'info-circle';\n }\n\n private getAriaRole(): AriaRole {\n return this.roleByFeedback[this.feedback] ?? 'status';\n }\n\n private getAriaLive(): AriaLive {\n return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';\n }\n\n private getHeadingId(): string | null {\n return this.heading ? `nv-notification-${this.uid}-heading` : null;\n }\n\n private getMessageId(): string | null {\n return this.message ? `nv-notification-${this.uid}-message` : null;\n }\n\n private async dismissAnimation() {\n const { fadeOut } = useFade(this.container, { duration: 300 });\n const { slideOut } = useSlide(this.container, { duration: 800 });\n const { collapse } = useCollapse(this.el, {\n duration: 800,\n overflow: 'visible',\n });\n\n await parallel(fadeOut, slideOut, collapse).start();\n this.hidden = true;\n this.hiddenChanged.emit(true);\n }\n\n //#endregion INTERNAL\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.headingSlot = this.el.querySelector('[slot=\"heading\"]');\n this.messageSlot = this.el.querySelector('[slot=\"content\"]');\n this.actionsSlot = this.el.querySelector('[slot=\"actions\"]');\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role={this.getAriaRole()}\n aria-live={this.getAriaLive()}\n aria-atomic\n aria-labelledby={this.getHeadingId() ?? null}\n aria-describedby={this.getMessageId() ?? null}\n tabindex=\"-1\"\n >\n <div data-scope=\"container\" ref={el => (this.container = el)}>\n {this.dismissible && (\n <button\n data-scope=\"dismiss\"\n type=\"button\"\n onClick={this.dismiss.bind(this)}\n >\n <nv-icon name=\"x\" size=\"sm\" />\n </button>\n )}\n\n <nv-icon\n name={this.icon ?? this.getDefaultIcon()}\n size=\"md\"\n ></nv-icon>\n\n <div data-scope=\"content\">\n {(this.heading || this.headingSlot) && (\n <p id={this.getHeadingId()} data-scope=\"heading\">\n <slot name=\"heading\">{this.heading}</slot>\n </p>\n )}\n {(this.message || this.messageSlot) && (\n <p id={this.getMessageId()} data-scope=\"message\">\n <slot name=\"content\">{this.message}</slot>\n </p>\n )}\n\n {this.actionsSlot && (\n <div data-scope=\"actions\">\n <slot name=\"actions\"></slot>\n </div>\n )}\n </div>\n </div>\n </Host>\n );\n }\n // #endregion RENDER\n}\n"]}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/* Colors */
|
|
2
|
+
/* Maps for feedback-related variables */
|
|
3
|
+
/* Spacing and Sizing */
|
|
4
|
+
nv-notification {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
nv-notification [data-scope=container] {
|
|
8
|
+
display: flex;
|
|
9
|
+
position: relative;
|
|
10
|
+
max-width: 512px;
|
|
11
|
+
width: 100%;
|
|
12
|
+
padding: var(--notification-padding);
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
gap: var(--notification-gap-x);
|
|
15
|
+
border-radius: var(--notification-radius);
|
|
16
|
+
border-style: solid;
|
|
17
|
+
/* shadow/lg */
|
|
18
|
+
box-shadow: 0 var(--shadow-y-axis-lg-1, 4px) var(--shadow-blur-lg-1, 6px) var(--shadow-spread-lg-1, -2px) var(--shadow-color-opacity-1, rgba(14, 14, 14, 0.06)), 0 var(--shadow-y-axis-lg-2, 10px) var(--shadow-blur-lg-2, 15px) var(--shadow-spread-lg-2, -3px) var(--shadow-color-opacity-2, rgba(14, 14, 14, 0.1));
|
|
19
|
+
}
|
|
20
|
+
nv-notification [data-scope=container] > nv-icon {
|
|
21
|
+
flex-shrink: 0;
|
|
22
|
+
}
|
|
23
|
+
nv-notification [data-scope=container] [data-scope=dismiss] {
|
|
24
|
+
padding: var(--button-sm-icon-button-padding, 8px);
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: var(--button-sm-gap, 6px);
|
|
28
|
+
display: flex;
|
|
29
|
+
position: absolute;
|
|
30
|
+
right: 8px;
|
|
31
|
+
top: 8px;
|
|
32
|
+
border-radius: var(--button-sm-border-radius, 4px);
|
|
33
|
+
background: var(--components-button-lower-background, rgba(255, 255, 255, 0));
|
|
34
|
+
color: var(--components-button-lower-icon);
|
|
35
|
+
}
|
|
36
|
+
nv-notification [data-scope=container] [data-scope=content] {
|
|
37
|
+
display: flex;
|
|
38
|
+
padding-right: var(--notification-padding-right);
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: flex-start;
|
|
41
|
+
gap: var(--notification-gap-y);
|
|
42
|
+
flex: 1 0 0;
|
|
43
|
+
}
|
|
44
|
+
nv-notification [data-scope=container] [data-scope=content] [data-scope=heading] {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: flex-start;
|
|
47
|
+
gap: var(--notification-gap-x);
|
|
48
|
+
align-self: stretch;
|
|
49
|
+
color: var(--components-notification-content-title);
|
|
50
|
+
font-size: var(--notification-title-font-size);
|
|
51
|
+
font-style: normal;
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
line-height: 20px; /* 142.857% */
|
|
54
|
+
}
|
|
55
|
+
nv-notification [data-scope=container] [data-scope=content] [data-scope=message] {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
align-items: flex-start;
|
|
59
|
+
gap: var(--notification-gap-y);
|
|
60
|
+
align-self: stretch;
|
|
61
|
+
color: var(--components-notification-content-description);
|
|
62
|
+
font-variant-numeric: lining-nums tabular-nums slashed-zero;
|
|
63
|
+
font-size: var(--font-size-sm, 14px);
|
|
64
|
+
font-style: normal;
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
line-height: var(--line-height-sm, 20px);
|
|
67
|
+
}
|
|
68
|
+
nv-notification [data-scope=container] [data-scope=content] [data-scope=actions] {
|
|
69
|
+
display: flex;
|
|
70
|
+
padding: var(--spacing-2, 8px) 0;
|
|
71
|
+
padding-bottom: 0px;
|
|
72
|
+
align-items: flex-start;
|
|
73
|
+
gap: var(--notification-gap-x);
|
|
74
|
+
align-self: stretch;
|
|
75
|
+
margin-left: calc(-1 * var(--button-sm-padding-x));
|
|
76
|
+
}
|
|
77
|
+
nv-notification[feedback=information] [data-scope=container] {
|
|
78
|
+
background-color: var(--components-notification-information-background);
|
|
79
|
+
border-color: var(--components-notification-information-border);
|
|
80
|
+
}
|
|
81
|
+
nv-notification[feedback=information] [data-scope=container] > nv-icon {
|
|
82
|
+
color: var(--components-notification-information-icon);
|
|
83
|
+
}
|
|
84
|
+
nv-notification[feedback=information] > [data-scope=close]:focus, nv-notification[feedback=information] > [data-scope=close]:focus-within {
|
|
85
|
+
outline: none;
|
|
86
|
+
}
|
|
87
|
+
nv-notification[feedback=information] > [data-scope=close]:focus-visible, nv-notification[feedback=information] > [data-scope=close]:has(:focus-visible) {
|
|
88
|
+
outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-information-border);
|
|
89
|
+
outline-offset: calc(var(--focus-outline-offset) * 1);
|
|
90
|
+
}
|
|
91
|
+
nv-notification[feedback=warning] [data-scope=container] {
|
|
92
|
+
background-color: var(--components-notification-warning-background);
|
|
93
|
+
border-color: var(--components-notification-warning-border);
|
|
94
|
+
}
|
|
95
|
+
nv-notification[feedback=warning] [data-scope=container] > nv-icon {
|
|
96
|
+
color: var(--components-notification-warning-icon);
|
|
97
|
+
}
|
|
98
|
+
nv-notification[feedback=warning] > [data-scope=close]:focus, nv-notification[feedback=warning] > [data-scope=close]:focus-within {
|
|
99
|
+
outline: none;
|
|
100
|
+
}
|
|
101
|
+
nv-notification[feedback=warning] > [data-scope=close]:focus-visible, nv-notification[feedback=warning] > [data-scope=close]:has(:focus-visible) {
|
|
102
|
+
outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-warning-border);
|
|
103
|
+
outline-offset: calc(var(--focus-outline-offset) * 1);
|
|
104
|
+
}
|
|
105
|
+
nv-notification[feedback=error] [data-scope=container] {
|
|
106
|
+
background-color: var(--components-notification-error-background);
|
|
107
|
+
border-color: var(--components-notification-error-border);
|
|
108
|
+
}
|
|
109
|
+
nv-notification[feedback=error] [data-scope=container] > nv-icon {
|
|
110
|
+
color: var(--components-notification-error-icon);
|
|
111
|
+
}
|
|
112
|
+
nv-notification[feedback=error] > [data-scope=close]:focus, nv-notification[feedback=error] > [data-scope=close]:focus-within {
|
|
113
|
+
outline: none;
|
|
114
|
+
}
|
|
115
|
+
nv-notification[feedback=error] > [data-scope=close]:focus-visible, nv-notification[feedback=error] > [data-scope=close]:has(:focus-visible) {
|
|
116
|
+
outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-error-border);
|
|
117
|
+
outline-offset: calc(var(--focus-outline-offset) * 1);
|
|
118
|
+
}
|
|
119
|
+
nv-notification[feedback=success] [data-scope=container] {
|
|
120
|
+
background-color: var(--components-notification-success-background);
|
|
121
|
+
border-color: var(--components-notification-success-border);
|
|
122
|
+
}
|
|
123
|
+
nv-notification[feedback=success] [data-scope=container] > nv-icon {
|
|
124
|
+
color: var(--components-notification-success-icon);
|
|
125
|
+
}
|
|
126
|
+
nv-notification[feedback=success] > [data-scope=close]:focus, nv-notification[feedback=success] > [data-scope=close]:focus-within {
|
|
127
|
+
outline: none;
|
|
128
|
+
}
|
|
129
|
+
nv-notification[feedback=success] > [data-scope=close]:focus-visible, nv-notification[feedback=success] > [data-scope=close]:has(:focus-visible) {
|
|
130
|
+
outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-success-border);
|
|
131
|
+
outline-offset: calc(var(--focus-outline-offset) * 1);
|
|
132
|
+
}
|
|
133
|
+
nv-notification[feedback=neutral] [data-scope=container] {
|
|
134
|
+
background-color: var(--components-notification-neutral-background);
|
|
135
|
+
border-color: var(--components-notification-neutral-border);
|
|
136
|
+
}
|
|
137
|
+
nv-notification[feedback=neutral] [data-scope=container] > nv-icon {
|
|
138
|
+
color: var(--components-notification-neutral-icon);
|
|
139
|
+
}
|
|
140
|
+
nv-notification[feedback=neutral] > [data-scope=close]:focus, nv-notification[feedback=neutral] > [data-scope=close]:focus-within {
|
|
141
|
+
outline: none;
|
|
142
|
+
}
|
|
143
|
+
nv-notification[feedback=neutral] > [data-scope=close]:focus-visible, nv-notification[feedback=neutral] > [data-scope=close]:has(:focus-visible) {
|
|
144
|
+
outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-neutral-border);
|
|
145
|
+
outline-offset: calc(var(--focus-outline-offset) * 1);
|
|
146
|
+
}
|
|
147
|
+
nv-notification[emphasis=high] [data-scope=container] {
|
|
148
|
+
border-width: 1px;
|
|
149
|
+
border-left-width: var(--notification-border-width-high-emphasis);
|
|
150
|
+
padding-left: calc(var(--notification-padding) - var(--notification-border-width-high-emphasis) + 1px);
|
|
151
|
+
}
|
|
152
|
+
nv-notification[emphasis=medium] [data-scope=container] {
|
|
153
|
+
border-width: var(--notification-border-width-low-emphasis);
|
|
154
|
+
border-color: var(--color-content-low-border, #E3E3E3);
|
|
155
|
+
}
|
|
@@ -5,6 +5,9 @@ nv-popover {
|
|
|
5
5
|
nv-popover:has([fluid]:not([fluid=false])) {
|
|
6
6
|
display: block;
|
|
7
7
|
}
|
|
8
|
+
nv-popover[strategy=fixed] {
|
|
9
|
+
position: static;
|
|
10
|
+
}
|
|
8
11
|
nv-popover > [data-scope=popover] {
|
|
9
12
|
width: max-content;
|
|
10
13
|
background-color: var(--components-popover-background);
|
|
@@ -23,6 +26,10 @@ nv-popover > [data-scope=popover] {
|
|
|
23
26
|
nv-popover > [data-scope=popover][hidden]:not([hidden=false]) {
|
|
24
27
|
display: none;
|
|
25
28
|
}
|
|
29
|
+
nv-popover > [data-scope=popover][data-strategy=fixed] {
|
|
30
|
+
position: fixed;
|
|
31
|
+
z-index: 9999;
|
|
32
|
+
}
|
|
26
33
|
nv-popover > [data-scope=popover] > [data-scope=arrow] {
|
|
27
34
|
background-color: var(--components-popover-background);
|
|
28
35
|
position: absolute;
|
|
@@ -68,6 +68,10 @@ const NvPopoverDocs = {
|
|
|
68
68
|
},
|
|
69
69
|
template: (h("nv-popover", { "data-storybook-args": true }, h("nv-button", { slot: "trigger" }, "Hover me and wait 1s"), h("p", { slot: "content" }, "This is a popover with a 1s enter delay."))),
|
|
70
70
|
},
|
|
71
|
+
{
|
|
72
|
+
name: nameof(x => x.strategy),
|
|
73
|
+
template: (h("div", { "data-class": "flex gap-8 items-start" }, h("div", { "data-class": "relative" }, h("h4", { "data-class": "mb-2 text-sm font-medium" }, "Absolute Strategy (Default)"), h("div", { "data-class": "w-48 h-32 overflow-hidden border border-gray-300 rounded p-4" }, h("p", { "data-class": "mb-2 text-xs" }, "Scroll container with overflow hidden"), h("nv-popover", { "data-storybook-args": true, strategy: "absolute", placement: "right" }, h("nv-button", { slot: "trigger" }, "Absolute"), h("p", { slot: "content" }, "This popover uses absolute positioning and may be clipped by overflow containers.")))), h("div", { "data-class": "relative" }, h("h4", { "data-class": "mb-2 text-sm font-medium" }, "Fixed Strategy"), h("div", { "data-class": "w-48 h-32 overflow-hidden border border-gray-300 rounded p-4" }, h("p", { "data-class": "mb-2 text-xs" }, "Scroll container with overflow hidden"), h("nv-popover", { "data-storybook-args": true, strategy: "fixed", placement: "right" }, h("nv-button", { slot: "trigger" }, "Fixed"), h("p", { slot: "content" }, "This popover uses fixed positioning and breaks out of overflow containers.")))))),
|
|
74
|
+
},
|
|
71
75
|
],
|
|
72
76
|
};
|
|
73
77
|
export default NvPopoverDocs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-popover.docs.js","sourceRoot":"","sources":["../../../src/components/nv-popover/nv-popover.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,aAAa,GAAmC;IACpD,SAAS,EAAE,YAAY;IACvB,aAAa,EAAE,CAAC,WAAW,CAAC;IAC5B,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,CACR;gBACE,iBAAW,IAAI,EAAC,SAAS,eAAqB;gBAC9C,SAAG,IAAI,EAAC,SAAS,+BAA6B,CACnC,CACd;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YAC/C,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;YACpB,QAAQ,EAAE,CACR;gBACE,iBAAW,IAAI,EAAC,SAAS,eAAqB;gBAC9C,SAAG,IAAI,EAAC,SAAS,oCAAkC,CACxC,CACd;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;YACtD,QAAQ,EAAE,CAC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I,EAAC,SAAS,qCAAmC,CACzC;gBACb,+CAAgC,SAAS,EAAC,QAAQ,gBAAY,MAAM;oBAClE,iBAAW,IAAI,EAAC,SAAS,+BAAqC;oBAC9D,SAAG,IAAI,EAAC,SAAS,kCAAgC,CACtC,CACT,CACP;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;YACvD,IAAI,EAAE;gBACJ,YAAY,EAAE,EAAE;aACjB;YACD,QAAQ,EAAE,CACR;gBACE,iBAAW,IAAI,EAAC,SAAS,oBAA0B;gBACnD,SAAG,IAAI,EAAC,SAAS,2CAAyC,CAC/C,CACd;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;YACrD,IAAI,EAAE;gBACJ,UAAU,EAAE,IAAI;gBAChB,WAAW,EAAE,OAAO;aACrB;YACD,QAAQ,EAAE,CACR;gBACE,iBAAW,IAAI,EAAC,SAAS,2BAAiC;gBAC1D,SAAG,IAAI,EAAC,SAAS,+CAA6C,CACnD,CACd;SACF;KACF;CACF,CAAC;AAEF,eAAe,aAAa,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 NvPopoverDocs: NovaDocs<Components.NvPopover> = {\n component: 'nv-popover',\n subcomponents: ['nv-button'],\n stories: [\n {\n name: 'Default',\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Click Me</nv-button>\n <p slot=\"content\">This is a Click popover.</p>\n </nv-popover>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.open),\n args: { open: true },\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Click Me</nv-button>\n <p slot=\"content\">This is a pre opened popover.</p>\n </nv-popover>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.triggerMode),\n template: (\n <div data-class=\"flex gap-4 items-start\">\n <nv-popover data-storybook-args trigger-mode=\"hover\">\n <nv-button slot=\"trigger\">Hover Me</nv-button>\n <p slot=\"content\">This is a Hover popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args trigger-mode=\"click\">\n <nv-button slot=\"trigger\">Click Me</nv-button>\n <p slot=\"content\">This is a Click popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args trigger-mode=\"controlled\" open>\n <nv-button slot=\"trigger\">Controlled</nv-button>\n <p slot=\"content\">This is a Controlled popover.</p>\n </nv-popover>\n </div>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.placement),\n args: {\n hasArrow: true,\n },\n template: (\n <div data-class=\"flex gap-4 items-start\">\n <nv-popover data-storybook-args placement=\"top\" data-class=\"py-6\">\n <nv-button slot=\"trigger\">Top</nv-button>\n <p slot=\"content\">This is a Top popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args placement=\"bottom\">\n <nv-button slot=\"trigger\">Bottom</nv-button>\n <p slot=\"content\">This is a Bottom popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args placement=\"left\">\n <nv-button slot=\"trigger\">Left</nv-button>\n <p slot=\"content\">This is a Left popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args placement=\"right\">\n <nv-button slot=\"trigger\">Right</nv-button>\n <p slot=\"content\">This is a Right popover.</p>\n </nv-popover>\n </div>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.groupName),\n args: {\n groupName: 'popover-group-1',\n },\n template: (\n <div data-class=\"flex gap-4 items-start\">\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Popover 1</nv-button>\n <p slot=\"content\">This is a popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Popover 2</nv-button>\n <p slot=\"content\">This is a popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Popover 3</nv-button>\n <p slot=\"content\">This is a popover.</p>\n </nv-popover>\n </div>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.offset),\n args: {\n offset: 30,\n placement: 'right',\n },\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Offset</nv-button>\n <p slot=\"content\">This is a popover with 30px offset.</p>\n </nv-popover>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.hasArrow),\n args: {\n hasArrow: true,\n },\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Arrow</nv-button>\n <p slot=\"content\">This is a popover with an arrow.</p>\n </nv-popover>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.disableFlip),\n args: {\n open: true,\n },\n template: (\n <div data-class=\"flex gap-4 items-start\">\n <nv-popover\n data-storybook-args\n disable-flip\n placement=\"bottom\"\n data-class=\"py-6\"\n >\n <nv-button slot=\"trigger\">Flip Off Placement Bottom</nv-button>\n <p slot=\"content\">This will always stay to the bottom.</p>\n </nv-popover>\n <nv-popover data-storybook-args placement=\"top\" data-class=\"py-6\">\n <nv-button slot=\"trigger\">Flip On Placement Top</nv-button>\n <p slot=\"content\">This could flip to the bottom.</p>\n </nv-popover>\n <nv-popover data-storybook-args placement=\"bottom\" data-class=\"py-6\">\n <nv-button slot=\"trigger\">Flip On Placement Bottom</nv-button>\n <p slot=\"content\">This could flip to the top.</p>\n </nv-popover>\n </div>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.shiftPadding),\n args: {\n shiftPadding: 40,\n },\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Shift Padding</nv-button>\n <p slot=\"content\">This is a popover with 40px padding.</p>\n </nv-popover>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.enterDelay),\n args: {\n enterDelay: 1000,\n triggerMode: 'hover',\n },\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Hover me and wait 1s</nv-button>\n <p slot=\"content\">This is a popover with a 1s enter delay.</p>\n </nv-popover>\n ),\n },\n ],\n};\n\nexport default NvPopoverDocs;\n"]}
|
|
1
|
+
{"version":3,"file":"nv-popover.docs.js","sourceRoot":"","sources":["../../../src/components/nv-popover/nv-popover.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,aAAa,GAAmC;IACpD,SAAS,EAAE,YAAY;IACvB,aAAa,EAAE,CAAC,WAAW,CAAC;IAC5B,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,CACR;gBACE,iBAAW,IAAI,EAAC,SAAS,eAAqB;gBAC9C,SAAG,IAAI,EAAC,SAAS,+BAA6B,CACnC,CACd;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YAC/C,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;YACpB,QAAQ,EAAE,CACR;gBACE,iBAAW,IAAI,EAAC,SAAS,eAAqB;gBAC9C,SAAG,IAAI,EAAC,SAAS,oCAAkC,CACxC,CACd;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;YACtD,QAAQ,EAAE,CACR,yBAAgB,wBAAwB;gBACtC,+DAA6C,OAAO;oBAClD,iBAAW,IAAI,EAAC,SAAS,eAAqB;oBAC9C,SAAG,IAAI,EAAC,SAAS,+BAA6B,CACnC;gBACb,+DAA6C,OAAO;oBAClD,iBAAW,IAAI,EAAC,SAAS,eAAqB;oBAC9C,SAAG,IAAI,EAAC,SAAS,+BAA6B,CACnC;gBACb,+DAA6C,YAAY,EAAC,IAAI;oBAC5D,iBAAW,IAAI,EAAC,SAAS,iBAAuB;oBAChD,SAAG,IAAI,EAAC,SAAS,oCAAkC,CACxC,CACT,CACP;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAu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S,2CAAyC,CAC/C,CACd;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;YACrD,IAAI,EAAE;gBACJ,UAAU,EAAE,IAAI;gBAChB,WAAW,EAAE,OAAO;aACrB;YACD,QAAQ,EAAE,CACR;gBACE,iBAAW,IAAI,EAAC,SAAS,2BAAiC;gBAC1D,SAAG,IAAI,EAAC,SAAS,+CAA6C,CACnD,CACd;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YACnD,QAAQ,EAAE,CACR,yBAAgB,wBAAwB;gBACtC,yBAAgB,UAAU;oBACxB,wBAAe,0BAA0B,kCAEpC;oBACL,yBAAgB,8DAA8D;wBAC5E,uBAAc,cAAc,4CAExB;wBACJ,+CAEE,QAAQ,EAAC,UAAU,EACnB,SAAS,EAAC,OAAO;4BAEjB,iBAAW,IAAI,EAAC,SAAS,eAAqB;4BAC9C,SAAG,IAAI,EAAC,SAAS,wFAGb,CACO,CACT,CACF;gBACN,yBAAgB,UAAU;oBACxB,wBAAe,0BAA0B,qBAAoB;oBAC7D,yBAAgB,8DAA8D;wBAC5E,uBAAc,cAAc,4CAExB;wBACJ,+CAEE,QAAQ,EAAC,OAAO,EAChB,SAAS,EAAC,OAAO;4BAEjB,iBAAW,IAAI,EAAC,SAAS,YAAkB;4BAC3C,SAAG,IAAI,EAAC,SAAS,iFAGb,CACO,CACT,CACF,CACF,CACP;SACF;KACF;CACF,CAAC;AAEF,eAAe,aAAa,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 NvPopoverDocs: NovaDocs<Components.NvPopover> = {\n component: 'nv-popover',\n subcomponents: ['nv-button'],\n stories: [\n {\n name: 'Default',\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Click Me</nv-button>\n <p slot=\"content\">This is a Click popover.</p>\n </nv-popover>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.open),\n args: { open: true },\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Click Me</nv-button>\n <p slot=\"content\">This is a pre opened popover.</p>\n </nv-popover>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.triggerMode),\n template: (\n <div data-class=\"flex gap-4 items-start\">\n <nv-popover data-storybook-args trigger-mode=\"hover\">\n <nv-button slot=\"trigger\">Hover Me</nv-button>\n <p slot=\"content\">This is a Hover popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args trigger-mode=\"click\">\n <nv-button slot=\"trigger\">Click Me</nv-button>\n <p slot=\"content\">This is a Click popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args trigger-mode=\"controlled\" open>\n <nv-button slot=\"trigger\">Controlled</nv-button>\n <p slot=\"content\">This is a Controlled popover.</p>\n </nv-popover>\n </div>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.placement),\n args: {\n hasArrow: true,\n },\n template: (\n <div data-class=\"flex gap-4 items-start\">\n <nv-popover data-storybook-args placement=\"top\" data-class=\"py-6\">\n <nv-button slot=\"trigger\">Top</nv-button>\n <p slot=\"content\">This is a Top popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args placement=\"bottom\">\n <nv-button slot=\"trigger\">Bottom</nv-button>\n <p slot=\"content\">This is a Bottom popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args placement=\"left\">\n <nv-button slot=\"trigger\">Left</nv-button>\n <p slot=\"content\">This is a Left popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args placement=\"right\">\n <nv-button slot=\"trigger\">Right</nv-button>\n <p slot=\"content\">This is a Right popover.</p>\n </nv-popover>\n </div>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.groupName),\n args: {\n groupName: 'popover-group-1',\n },\n template: (\n <div data-class=\"flex gap-4 items-start\">\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Popover 1</nv-button>\n <p slot=\"content\">This is a popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Popover 2</nv-button>\n <p slot=\"content\">This is a popover.</p>\n </nv-popover>\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Popover 3</nv-button>\n <p slot=\"content\">This is a popover.</p>\n </nv-popover>\n </div>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.offset),\n args: {\n offset: 30,\n placement: 'right',\n },\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Offset</nv-button>\n <p slot=\"content\">This is a popover with 30px offset.</p>\n </nv-popover>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.hasArrow),\n args: {\n hasArrow: true,\n },\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Arrow</nv-button>\n <p slot=\"content\">This is a popover with an arrow.</p>\n </nv-popover>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.disableFlip),\n args: {\n open: true,\n },\n template: (\n <div data-class=\"flex gap-4 items-start\">\n <nv-popover\n data-storybook-args\n disable-flip\n placement=\"bottom\"\n data-class=\"py-6\"\n >\n <nv-button slot=\"trigger\">Flip Off Placement Bottom</nv-button>\n <p slot=\"content\">This will always stay to the bottom.</p>\n </nv-popover>\n <nv-popover data-storybook-args placement=\"top\" data-class=\"py-6\">\n <nv-button slot=\"trigger\">Flip On Placement Top</nv-button>\n <p slot=\"content\">This could flip to the bottom.</p>\n </nv-popover>\n <nv-popover data-storybook-args placement=\"bottom\" data-class=\"py-6\">\n <nv-button slot=\"trigger\">Flip On Placement Bottom</nv-button>\n <p slot=\"content\">This could flip to the top.</p>\n </nv-popover>\n </div>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.shiftPadding),\n args: {\n shiftPadding: 40,\n },\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Shift Padding</nv-button>\n <p slot=\"content\">This is a popover with 40px padding.</p>\n </nv-popover>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.enterDelay),\n args: {\n enterDelay: 1000,\n triggerMode: 'hover',\n },\n template: (\n <nv-popover data-storybook-args>\n <nv-button slot=\"trigger\">Hover me and wait 1s</nv-button>\n <p slot=\"content\">This is a popover with a 1s enter delay.</p>\n </nv-popover>\n ),\n },\n {\n name: nameof<Components.NvPopover>(x => x.strategy),\n template: (\n <div data-class=\"flex gap-8 items-start\">\n <div data-class=\"relative\">\n <h4 data-class=\"mb-2 text-sm font-medium\">\n Absolute Strategy (Default)\n </h4>\n <div data-class=\"w-48 h-32 overflow-hidden border border-gray-300 rounded p-4\">\n <p data-class=\"mb-2 text-xs\">\n Scroll container with overflow hidden\n </p>\n <nv-popover\n data-storybook-args\n strategy=\"absolute\"\n placement=\"right\"\n >\n <nv-button slot=\"trigger\">Absolute</nv-button>\n <p slot=\"content\">\n This popover uses absolute positioning and may be clipped by\n overflow containers.\n </p>\n </nv-popover>\n </div>\n </div>\n <div data-class=\"relative\">\n <h4 data-class=\"mb-2 text-sm font-medium\">Fixed Strategy</h4>\n <div data-class=\"w-48 h-32 overflow-hidden border border-gray-300 rounded p-4\">\n <p data-class=\"mb-2 text-xs\">\n Scroll container with overflow hidden\n </p>\n <nv-popover\n data-storybook-args\n strategy=\"fixed\"\n placement=\"right\"\n >\n <nv-button slot=\"trigger\">Fixed</nv-button>\n <p slot=\"content\">\n This popover uses fixed positioning and breaks out of overflow\n containers.\n </p>\n </nv-popover>\n </div>\n </div>\n </div>\n ),\n },\n ],\n};\n\nexport default NvPopoverDocs;\n"]}
|