@nova-design-system/nova-webcomponents 3.12.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-aac59496.js → constants-52f6f8e9.js} +6 -1
- 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 +16 -7
- 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 +4 -4
- package/dist/cjs/nv-button.cjs.entry.js +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 +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-fieldmultiselect.cjs.entry.js +0 -30
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldnumber.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 +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +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 +4 -4
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/slide.animation-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 -1
- 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-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-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-fieldmultiselect/nv-fieldmultiselect.js +0 -30
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- 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-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-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.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.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.js +1 -1
- package/dist/collection/utils/constants.js +5 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/components/index.js +9 -6
- 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 +2 -2
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-datagrid.js +3 -3
- package/dist/components/nv-dialog.js +4 -4
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-fielddate.js +5 -5
- package/dist/components/nv-fielddaterange.js +5 -5
- package/dist/components/nv-fielddropdown.js +4 -4
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +4 -34
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +2 -2
- package/dist/components/nv-fieldselect.js +2 -2
- package/dist/components/nv-fieldslider.js +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 +4 -4
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-menu.js +3 -3
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-notification.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 +2 -2
- package/dist/components/nv-togglebutton.js +1 -1
- package/dist/components/nv-togglebuttongroup.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-2030d84d.js → p-0b5816f7.js} +2 -2
- package/dist/components/{p-2030d84d.js.map → p-0b5816f7.js.map} +1 -1
- package/dist/components/{p-5f594b35.js → p-2277cfc8.js} +7 -2
- package/dist/components/p-2277cfc8.js.map +1 -0
- package/dist/components/{p-57ae32bc.js → p-2854cf01.js} +2 -2
- package/dist/components/{p-57ae32bc.js.map → p-2854cf01.js.map} +1 -1
- package/dist/components/{p-095c8285.js → p-2de17259.js} +2 -2
- package/dist/components/{p-095c8285.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-0b015832.js → p-5073bfd6.js} +2 -2
- package/dist/components/{p-0b015832.js.map → p-5073bfd6.js.map} +1 -1
- package/dist/components/{p-2ad58e41.js → p-60244646.js} +5 -5
- package/dist/components/{p-2ad58e41.js.map → p-60244646.js.map} +1 -1
- package/dist/components/{p-b2c31970.js → p-68fa3890.js} +17 -11
- package/dist/components/p-68fa3890.js.map +1 -0
- package/dist/components/{p-b7629769.js → p-89ac047e.js} +4 -4
- package/dist/components/p-89ac047e.js.map +1 -0
- package/dist/components/{p-7372258e.js → p-99a55bc4.js} +2 -2
- package/dist/components/{p-7372258e.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-4c3dc7e4.js → p-a9dc0824.js} +13 -10
- package/dist/components/p-a9dc0824.js.map +1 -0
- package/dist/components/{p-b3035205.js → p-ca38a8a9.js} +2 -2
- package/dist/components/{p-b3035205.js.map → p-ca38a8a9.js.map} +1 -1
- package/dist/components/{p-84f4b071.js → p-ddd0a394.js} +75 -41
- package/dist/components/p-ddd0a394.js.map +1 -0
- package/dist/components/{p-ddb7aa4e.js → p-e4ac8333.js} +6 -6
- package/dist/components/{p-ddb7aa4e.js.map → p-e4ac8333.js.map} +1 -1
- package/dist/components/{p-dc5dad90.js → p-e6c04562.js} +2 -2
- package/dist/components/{p-dc5dad90.js.map → p-e6c04562.js.map} +1 -1
- package/dist/components/{p-87079346.js → p-eb443b26.js} +3 -3
- package/dist/components/{p-87079346.js.map → p-eb443b26.js.map} +1 -1
- 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-a857c476.js → constants-d0f19e7b.js} +7 -2
- 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 +10 -7
- 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 +4 -4
- package/dist/esm/nv-button.entry.js +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 +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-fieldmultiselect.entry.js +0 -30
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +1 -1
- package/dist/esm/nv-fieldnumber.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 +1 -1
- package/dist/esm/nv-icon.entry.js +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 +4 -4
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-togglebutton.entry.js +1 -1
- package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/esm/slide.animation-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-3a8f65a9.entry.js → p-1f01fb64.entry.js} +2 -2
- package/dist/native/{p-c3ad7617.entry.js → p-225a05bf.entry.js} +2 -2
- 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-29ee7b1c.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-63fea160.entry.js → p-33f503c5.entry.js} +2 -2
- package/dist/native/{p-43071c3b.entry.js → p-3784efdc.entry.js} +2 -2
- package/dist/native/{p-47901c83.entry.js → p-3f861ddc.entry.js} +2 -2
- package/dist/native/{p-ab1e1a96.entry.js → p-40c4a221.entry.js} +2 -2
- package/dist/native/p-42ea6b74.js +16 -0
- package/dist/native/p-42ea6b74.js.map +1 -0
- package/dist/native/{p-62aa0531.entry.js → p-52b8c872.entry.js} +2 -2
- package/dist/native/{p-e7a929e7.entry.js → p-5a43fe48.entry.js} +2 -2
- package/dist/native/{p-a63929db.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-9a46baa9.entry.js +2 -0
- package/dist/native/p-9a46baa9.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-48cf2457.entry.js → p-bb71a17f.entry.js} +2 -2
- package/dist/native/p-cfd5785e.entry.js +2 -0
- package/dist/native/p-cfd5785e.entry.js.map +1 -0
- package/dist/native/{p-bcff76ab.entry.js → p-d95ee31e.entry.js} +2 -2
- package/dist/native/p-da2c7d3c.entry.js +2 -0
- package/dist/native/p-da2c7d3c.entry.js.map +1 -0
- 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-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-notification/nv-notification.d.ts +75 -0
- package/dist/types/components/nv-notification/nv-notification.docs.d.ts +4 -0
- package/dist/types/components.d.ts +142 -9
- package/dist/types/nova-docs.d.ts +6 -0
- package/dist/types/utils/constants.d.ts +4 -0
- package/dist/vscode-data.json +77 -3
- package/hydrate/index.js +642 -263
- package/hydrate/index.mjs +642 -263
- package/package.json +5 -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-aac59496.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-1cbacdba.js +0 -68
- package/dist/components/p-1cbacdba.js.map +0 -1
- package/dist/components/p-4c3dc7e4.js.map +0 -1
- package/dist/components/p-5f594b35.js.map +0 -1
- package/dist/components/p-84f4b071.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-b2c31970.js.map +0 -1
- package/dist/components/p-b7629769.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-a857c476.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-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-15aeab4d.js +0 -2
- package/dist/native/p-15aeab4d.js.map +0 -1
- package/dist/native/p-1cbacdba.js +0 -2
- package/dist/native/p-1cbacdba.js.map +0 -1
- package/dist/native/p-29ee7b1c.entry.js.map +0 -1
- package/dist/native/p-38af3aaf.entry.js +0 -2
- package/dist/native/p-38af3aaf.entry.js.map +0 -1
- package/dist/native/p-3fcaac6d.entry.js +0 -2
- package/dist/native/p-3fcaac6d.entry.js.map +0 -1
- package/dist/native/p-5d352456.entry.js +0 -2
- package/dist/native/p-5f594b35.js +0 -2
- package/dist/native/p-5f594b35.js.map +0 -1
- package/dist/native/p-67d861e2.entry.js +0 -2
- package/dist/native/p-67d861e2.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-8d45dbfe.js +0 -2
- package/dist/native/p-9a263d0e.js +0 -2
- package/dist/native/p-9a263d0e.js.map +0 -1
- package/dist/native/p-9e0fe7e8.entry.js +0 -2
- package/dist/native/p-9e0fe7e8.entry.js.map +0 -1
- package/dist/native/p-ac5496e7.entry.js +0 -2
- package/dist/native/p-e603c6ed.entry.js +0 -2
- package/dist/native/p-e603c6ed.entry.js.map +0 -1
- /package/dist/native/{p-3a8f65a9.entry.js.map → p-1f01fb64.entry.js.map} +0 -0
- /package/dist/native/{p-c3ad7617.entry.js.map → p-225a05bf.entry.js.map} +0 -0
- /package/dist/native/{p-ac5496e7.entry.js.map → p-25f2ce81.entry.js.map} +0 -0
- /package/dist/native/{p-63fea160.entry.js.map → p-33f503c5.entry.js.map} +0 -0
- /package/dist/native/{p-43071c3b.entry.js.map → p-3784efdc.entry.js.map} +0 -0
- /package/dist/native/{p-47901c83.entry.js.map → p-3f861ddc.entry.js.map} +0 -0
- /package/dist/native/{p-ab1e1a96.entry.js.map → p-40c4a221.entry.js.map} +0 -0
- /package/dist/native/{p-62aa0531.entry.js.map → p-52b8c872.entry.js.map} +0 -0
- /package/dist/native/{p-e7a929e7.entry.js.map → p-5a43fe48.entry.js.map} +0 -0
- /package/dist/native/{p-a63929db.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-5d352456.entry.js.map → p-8c823928.entry.js.map} +0 -0
- /package/dist/native/{p-48cf2457.entry.js.map → p-bb71a17f.entry.js.map} +0 -0
- /package/dist/native/{p-bcff76ab.entry.js.map → p-d95ee31e.entry.js.map} +0 -0
- /package/dist/native/{p-2d647761.entry.js.map → p-f5eb047e.entry.js.map} +0 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-aff3ed68.js';
|
|
2
|
+
import { F as FeedbackColors } from './p-2277cfc8.js';
|
|
3
|
+
import { u as useCollapse } from './p-31591941.js';
|
|
4
|
+
import { u as useFade } from './p-ee0df37f.js';
|
|
5
|
+
import './p-42ea6b74.js';
|
|
6
|
+
import { u as useSlide } from './p-eda2f9f3.js';
|
|
7
|
+
import { p as parallel } from './p-a52cd849.js';
|
|
8
|
+
import { d as defineCustomElement$2 } from './p-ca38a8a9.js';
|
|
9
|
+
import { v as v4 } from './p-f5ff676c.js';
|
|
10
|
+
|
|
11
|
+
const nvNotificationCss = "nv-notification{display:block}nv-notification [data-scope=container]{display:flex;position:relative;max-width:512px;width:100%;padding:var(--notification-padding);align-items:flex-start;gap:var(--notification-gap-x);border-radius:var(--notification-radius);border-style:solid;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))}nv-notification [data-scope=container]>nv-icon{flex-shrink:0}nv-notification [data-scope=container] [data-scope=dismiss]{padding:var(--button-sm-icon-button-padding, 8px);justify-content:center;align-items:center;gap:var(--button-sm-gap, 6px);display:flex;position:absolute;right:8px;top:8px;border-radius:var(--button-sm-border-radius, 4px);background:var(--components-button-lower-background, rgba(255, 255, 255, 0));color:var(--components-button-lower-icon)}nv-notification [data-scope=container] [data-scope=content]{display:flex;padding-right:var(--notification-padding-right);flex-direction:column;align-items:flex-start;gap:var(--notification-gap-y);flex:1 0 0}nv-notification [data-scope=container] [data-scope=content] [data-scope=heading]{display:flex;align-items:flex-start;gap:var(--notification-gap-x);align-self:stretch;color:var(--components-notification-content-title);font-size:var(--notification-title-font-size);font-style:normal;font-weight:500;line-height:20px;}nv-notification [data-scope=container] [data-scope=content] [data-scope=message]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--notification-gap-y);align-self:stretch;color:var(--components-notification-content-description);font-variant-numeric:lining-nums tabular-nums slashed-zero;font-size:var(--font-size-sm, 14px);font-style:normal;font-weight:400;line-height:var(--line-height-sm, 20px)}nv-notification [data-scope=container] [data-scope=content] [data-scope=actions]{display:flex;padding:var(--spacing-2, 8px) 0;padding-bottom:0px;align-items:flex-start;gap:var(--notification-gap-x);align-self:stretch;margin-left:calc(-1 * var(--button-sm-padding-x))}nv-notification[feedback=information] [data-scope=container]{background-color:var(--components-notification-information-background);border-color:var(--components-notification-information-border)}nv-notification[feedback=information] [data-scope=container]>nv-icon{color:var(--components-notification-information-icon)}nv-notification[feedback=information]>[data-scope=close]:focus,nv-notification[feedback=information]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=information]>[data-scope=close]:focus-visible,nv-notification[feedback=information]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-information-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=warning] [data-scope=container]{background-color:var(--components-notification-warning-background);border-color:var(--components-notification-warning-border)}nv-notification[feedback=warning] [data-scope=container]>nv-icon{color:var(--components-notification-warning-icon)}nv-notification[feedback=warning]>[data-scope=close]:focus,nv-notification[feedback=warning]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=warning]>[data-scope=close]:focus-visible,nv-notification[feedback=warning]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-warning-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=error] [data-scope=container]{background-color:var(--components-notification-error-background);border-color:var(--components-notification-error-border)}nv-notification[feedback=error] [data-scope=container]>nv-icon{color:var(--components-notification-error-icon)}nv-notification[feedback=error]>[data-scope=close]:focus,nv-notification[feedback=error]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=error]>[data-scope=close]:focus-visible,nv-notification[feedback=error]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-error-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=success] [data-scope=container]{background-color:var(--components-notification-success-background);border-color:var(--components-notification-success-border)}nv-notification[feedback=success] [data-scope=container]>nv-icon{color:var(--components-notification-success-icon)}nv-notification[feedback=success]>[data-scope=close]:focus,nv-notification[feedback=success]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=success]>[data-scope=close]:focus-visible,nv-notification[feedback=success]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-success-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=neutral] [data-scope=container]{background-color:var(--components-notification-neutral-background);border-color:var(--components-notification-neutral-border)}nv-notification[feedback=neutral] [data-scope=container]>nv-icon{color:var(--components-notification-neutral-icon)}nv-notification[feedback=neutral]>[data-scope=close]:focus,nv-notification[feedback=neutral]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=neutral]>[data-scope=close]:focus-visible,nv-notification[feedback=neutral]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-neutral-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[emphasis=high] [data-scope=container]{border-width:1px;border-left-width:var(--notification-border-width-high-emphasis);padding-left:calc(var(--notification-padding) - var(--notification-border-width-high-emphasis) + 1px)}nv-notification[emphasis=medium] [data-scope=container]{border-width:var(--notification-border-width-low-emphasis);border-color:var(--color-content-low-border, #E3E3E3)}";
|
|
12
|
+
const NvNotificationStyle0 = nvNotificationCss;
|
|
13
|
+
|
|
14
|
+
const NvNotification$1 = /*@__PURE__*/ proxyCustomElement(class NvNotification extends H {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.__registerHost();
|
|
18
|
+
this.hiddenChanged = createEvent(this, "hiddenChanged", 7);
|
|
19
|
+
/****************************************************************************/
|
|
20
|
+
//#region PROPERTIES
|
|
21
|
+
/**
|
|
22
|
+
* Set a unique ID for the notification. Used for aria attributes and managing
|
|
23
|
+
* multiple notifications.
|
|
24
|
+
*/
|
|
25
|
+
this.uid = v4();
|
|
26
|
+
/**
|
|
27
|
+
* Specifies the notification type which determines the color and default icon.
|
|
28
|
+
*/
|
|
29
|
+
this.feedback = 'information';
|
|
30
|
+
/**
|
|
31
|
+
* Adjusts the emphasis to make the notification more or less visually
|
|
32
|
+
* prominent to users. Use this to draw attention to important actions or
|
|
33
|
+
* reduce focus on less critical ones
|
|
34
|
+
*/
|
|
35
|
+
this.emphasis = 'medium';
|
|
36
|
+
/**
|
|
37
|
+
* Allows the notification to be dismissed via a close button (x). The
|
|
38
|
+
* notification is not dismissible unless explicitly enabled.
|
|
39
|
+
*/
|
|
40
|
+
this.dismissible = false;
|
|
41
|
+
/**
|
|
42
|
+
* Controls the visibility of the notification.
|
|
43
|
+
*/
|
|
44
|
+
this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
|
|
45
|
+
//#endregion EVENTS
|
|
46
|
+
/****************************************************************************/
|
|
47
|
+
//#region INTERNAL
|
|
48
|
+
this.iconByFeedback = {
|
|
49
|
+
[FeedbackColors.Warning]: 'alert-circle',
|
|
50
|
+
[FeedbackColors.Information]: 'info-circle',
|
|
51
|
+
[FeedbackColors.Success]: 'circle-check',
|
|
52
|
+
[FeedbackColors.Error]: 'alert-triangle',
|
|
53
|
+
[FeedbackColors.Neutral]: 'help',
|
|
54
|
+
};
|
|
55
|
+
this.roleByFeedback = {
|
|
56
|
+
[FeedbackColors.Error]: 'alert',
|
|
57
|
+
[FeedbackColors.Warning]: 'alert',
|
|
58
|
+
[FeedbackColors.Information]: 'status',
|
|
59
|
+
[FeedbackColors.Success]: 'status',
|
|
60
|
+
[FeedbackColors.Neutral]: 'status',
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//#endregion PROPERTIES
|
|
64
|
+
/****************************************************************************/
|
|
65
|
+
//#region METHODS
|
|
66
|
+
async dismiss() {
|
|
67
|
+
await this.dismissAnimation();
|
|
68
|
+
}
|
|
69
|
+
getDefaultIcon() {
|
|
70
|
+
var _a;
|
|
71
|
+
return (_a = this.iconByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'info-circle';
|
|
72
|
+
}
|
|
73
|
+
getAriaRole() {
|
|
74
|
+
var _a;
|
|
75
|
+
return (_a = this.roleByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'status';
|
|
76
|
+
}
|
|
77
|
+
getAriaLive() {
|
|
78
|
+
return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';
|
|
79
|
+
}
|
|
80
|
+
getHeadingId() {
|
|
81
|
+
return this.heading ? `nv-notification-${this.uid}-heading` : null;
|
|
82
|
+
}
|
|
83
|
+
getMessageId() {
|
|
84
|
+
return this.message ? `nv-notification-${this.uid}-message` : null;
|
|
85
|
+
}
|
|
86
|
+
async dismissAnimation() {
|
|
87
|
+
const { fadeOut } = useFade(this.container, { duration: 300 });
|
|
88
|
+
const { slideOut } = useSlide(this.container, { duration: 800 });
|
|
89
|
+
const { collapse } = useCollapse(this.el, {
|
|
90
|
+
duration: 800,
|
|
91
|
+
overflow: 'visible',
|
|
92
|
+
});
|
|
93
|
+
await parallel(fadeOut, slideOut, collapse).start();
|
|
94
|
+
this.hidden = true;
|
|
95
|
+
this.hiddenChanged.emit(true);
|
|
96
|
+
}
|
|
97
|
+
//#endregion INTERNAL
|
|
98
|
+
/****************************************************************************/
|
|
99
|
+
//#region LIFECYCLE
|
|
100
|
+
componentWillLoad() {
|
|
101
|
+
this.headingSlot = this.el.querySelector('[slot="heading"]');
|
|
102
|
+
this.messageSlot = this.el.querySelector('[slot="content"]');
|
|
103
|
+
this.actionsSlot = this.el.querySelector('[slot="actions"]');
|
|
104
|
+
}
|
|
105
|
+
//#endregion LIFECYCLE
|
|
106
|
+
/****************************************************************************/
|
|
107
|
+
//#region RENDER
|
|
108
|
+
render() {
|
|
109
|
+
var _a, _b, _c;
|
|
110
|
+
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" })))))));
|
|
111
|
+
}
|
|
112
|
+
get el() { return this; }
|
|
113
|
+
static get style() { return NvNotificationStyle0; }
|
|
114
|
+
}, [4, "nv-notification", {
|
|
115
|
+
"uid": [513],
|
|
116
|
+
"feedback": [513],
|
|
117
|
+
"emphasis": [513],
|
|
118
|
+
"heading": [513],
|
|
119
|
+
"message": [513],
|
|
120
|
+
"icon": [513],
|
|
121
|
+
"dismissible": [516],
|
|
122
|
+
"hidden": [1540],
|
|
123
|
+
"dismiss": [64]
|
|
124
|
+
}]);
|
|
125
|
+
function defineCustomElement$1() {
|
|
126
|
+
if (typeof customElements === "undefined") {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const components = ["nv-notification", "nv-icon"];
|
|
130
|
+
components.forEach(tagName => { switch (tagName) {
|
|
131
|
+
case "nv-notification":
|
|
132
|
+
if (!customElements.get(tagName)) {
|
|
133
|
+
customElements.define(tagName, NvNotification$1);
|
|
134
|
+
}
|
|
135
|
+
break;
|
|
136
|
+
case "nv-icon":
|
|
137
|
+
if (!customElements.get(tagName)) {
|
|
138
|
+
defineCustomElement$2();
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
} });
|
|
142
|
+
}
|
|
143
|
+
defineCustomElement$1();
|
|
144
|
+
|
|
145
|
+
const NvNotification = NvNotification$1;
|
|
146
|
+
const defineCustomElement = defineCustomElement$1;
|
|
147
|
+
|
|
148
|
+
export { NvNotification, defineCustomElement };
|
|
149
|
+
|
|
150
|
+
//# sourceMappingURL=nv-notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"nv-notification.js","mappings":";;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,yqMAAyqM,CAAC;AACpsM,6BAAe,iBAAiB;;MC4BnBA,gBAAc;IAL3B;;;;;;;;;;QAoBW,QAAG,GAAWC,EAAM,EAAE,CAAC;;;;QAMvB,aAAQ,GAAwB,aAAa,CAAC;;;;;;QAQ9C,aAAQ,GAA8B,QAAQ,CAAC;;;;;QA2B/C,gBAAW,GAAY,KAAK,CAAC;;;;QAMtC,WAAM,GAAY,KAAK,CAAC;;;;QA2BhB,mBAAc,GAAqC;YACzD,CAAC,cAAc,CAAC,OAAO,GAAG,cAAc;YACxC,CAAC,cAAc,CAAC,WAAW,GAAG,aAAa;YAC3C,CAAC,cAAc,CAAC,OAAO,GAAG,cAAc;YACxC,CAAC,cAAc,CAAC,KAAK,GAAG,gBAAgB;YACxC,CAAC,cAAc,CAAC,OAAO,GAAG,MAAM;SACjC,CAAC;QAEM,mBAAc,GAA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YAAY,EAAE,gBAAa,SAAS,IAC9C,6DAAM,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,OAAO,CAAQ,CACxC,CACL,EACA,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW,MAChC,0DAAG,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAa,SAAS,IAC9C,6DAAM,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,OAAO,CAAQ,CACxC,CACL,EAEA,IAAI,CAAC,WAAW,KACf,0EAAgB,SAAS,IACvB,6DAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACP,CACG,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvNotification","uuidv4"],"sources":["src/components/nv-notification/styles/nv-notification.scss?tag=nv-notification","src/components/nv-notification/nv-notification.tsx"],"sourcesContent":["@use \"sass:map\";\n@use \"./mixins\" as *;\n@import \"../../../styles/focus-ring\";\n\nnv-notification {\n @include root-styles();\n\n [data-scope=\"container\"] {\n @include container-styles();\n & > nv-icon {\n @include icon-styles();\n }\n\n [data-scope=\"dismiss\"] {\n @include dismiss-btn-styles();\n }\n\n [data-scope=\"content\"] {\n @include content-styles();\n\n [data-scope=\"heading\"] {\n @include header-styles();\n }\n\n [data-scope=\"message\"] {\n @include message-styles();\n }\n\n [data-scope=\"actions\"] {\n @include actions-styles();\n }\n }\n }\n\n @each $feedback in $feedback-variants {\n &[feedback=\"#{$feedback}\"] {\n [data-scope=\"container\"] {\n @include feedback-color($feedback);\n & > nv-icon {\n @include icon-color($feedback);\n }\n }\n\n & > [data-scope=\"close\"] {\n @include focus-ring(map.get($border-color-map, $feedback));\n }\n }\n }\n\n @each $emphasis in $emphasis-variants {\n &[emphasis=\"#{$emphasis}\"] {\n [data-scope=\"container\"] {\n @include emphasis-styles($emphasis);\n }\n }\n }\n}","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"],"version":3}
|
|
@@ -11,7 +11,7 @@ const NvRow$1 = /*@__PURE__*/ proxyCustomElement(class NvRow extends H {
|
|
|
11
11
|
/****************************************************************************/
|
|
12
12
|
//#region RENDER
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '8415bdad0106bd3d836996c617a749294e0c19e2' }, h("slot", { key: '77c069ced0dc25c4169945877c388f30d27fdc4f' })));
|
|
15
15
|
}
|
|
16
16
|
static get style() { return NvRowStyle0; }
|
|
17
17
|
}, [4, "nv-row"]);
|
|
@@ -20,7 +20,7 @@ const NvStack$1 = /*@__PURE__*/ proxyCustomElement(class NvStack extends H {
|
|
|
20
20
|
/****************************************************************************/
|
|
21
21
|
//#region RENDER
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: '66123f22ad4a6ebefe8663c795274eb900d2c178', class: clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, h("slot", { key: '7b3d395c3490664f0e2f337a04f69cc717ed6c0e' })));
|
|
24
24
|
}
|
|
25
25
|
static get style() { return NvStackStyle0; }
|
|
26
26
|
}, [4, "nv-stack", {
|
|
@@ -312,14 +312,14 @@ const NvTable$1 = /*@__PURE__*/ proxyCustomElement(class NvTable extends H {
|
|
|
312
312
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
313
313
|
? []
|
|
314
314
|
: this.table.data;
|
|
315
|
-
return (h(Host, { key: '
|
|
315
|
+
return (h(Host, { key: 'ea0b3237145fbc199d356010f1e001797afc52d6' }, h("div", { key: 'd3bf41bad48e549d1799b2c8e55a308a7d767973', class: "hidden" }, h("slot", { key: '8263220ebd266240b16228b67f8d215d7d56afd7' })), h("slot", { key: '36d43d6870cf9a6021521579c0507afd1fe85081', name: "before" }), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (h("table", { class: "table" }, this.parsedColumns.length > 0 && headerGroups.length > 0 && (h("thead", { class: "table-header" }, h("tr", null, headerGroups &&
|
|
316
316
|
headerGroups.map(col => {
|
|
317
317
|
return (h("th", { key: col.name }, this.renderTemplate(this.headerTemplateCache.get(col.name), {}) || col.header));
|
|
318
318
|
})))), h("tbody", { class: "table-body" }, !rows || rows.length === 0 ? (h("tr", null, h("td", { colSpan: headerGroups.length || 12, class: "no-data" }, this.noDataMessage))) : (rows.map(row => (h("tr", { key: JSON.stringify(row) }, headerGroups.map(col => {
|
|
319
319
|
var _a;
|
|
320
320
|
return (h("td", null, this.renderTemplate(this.templateCache.get(col.name), row) ||
|
|
321
321
|
((_a = row[col.name]) !== null && _a !== void 0 ? _a : this.fallbackValue)));
|
|
322
|
-
})))))))), h("slot", { key: '
|
|
322
|
+
})))))))), h("slot", { key: '233b61e9099f58ca0eeeb7d0f7fdc7bd71bc9065', name: "after" })));
|
|
323
323
|
}
|
|
324
324
|
get el() { return this; }
|
|
325
325
|
static get watchers() { return {
|
|
@@ -63,8 +63,8 @@ const NvToggle$1 = /*@__PURE__*/ proxyCustomElement(class NvToggle extends H {
|
|
|
63
63
|
/****************************************************************************/
|
|
64
64
|
//#region RENDER
|
|
65
65
|
render() {
|
|
66
|
-
return (h(Host, { key: '
|
|
67
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
66
|
+
return (h(Host, { key: 'db161d2edfcf7f83381b6431c8bc70a22c04fbf3', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, h("div", { key: '086d6c429b4b7bcaa23093b13d30cf6ba21912f8', class: "input-container" }, h("input", { key: 'e83f407f2c3643c245198131a7991545b73dde78', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), h("div", { key: 'eb5af410d1c643c70a4364948bf8fad9d54e74df', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '54793fd81258bee7676801f23da4f5fb554242bf', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, h("slot", { key: '6af650d9677d1eb0f8cfa77cbcd6318f2d6f8aaf', name: "label" }, this.label))), (this.description ||
|
|
67
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '2c157429288779ad6cc18d4e318e64830a657c54', class: "description" }, h("slot", { key: 'fcfae2a0d7cdcc76d4b23c4b376c8e2496e11bb5', name: "description" }, this.description))))));
|
|
68
68
|
}
|
|
69
69
|
static get formAssociated() { return true; }
|
|
70
70
|
get el() { return this; }
|
|
@@ -45,7 +45,7 @@ const NvTogglebutton$1 = /*@__PURE__*/ proxyCustomElement(class NvTogglebutton e
|
|
|
45
45
|
/****************************************************************************/
|
|
46
46
|
//#region RENDER
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
48
|
+
return (h(Host, { key: 'cb15a84c7e7cc27a80773613f31b98168eee8475', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, h("slot", { key: '32d6b9394088d88c4671fb7809ad6aa85b240fff' })));
|
|
49
49
|
}
|
|
50
50
|
static get style() { return NvTogglebuttonStyle0; }
|
|
51
51
|
}, [4, "nv-togglebutton", {
|
|
@@ -153,7 +153,7 @@ const NvTogglebuttongroup$1 = /*@__PURE__*/ proxyCustomElement(class NvTogglebut
|
|
|
153
153
|
/****************************************************************************/
|
|
154
154
|
//#region RENDER
|
|
155
155
|
render() {
|
|
156
|
-
return (h(Host, { key: '
|
|
156
|
+
return (h(Host, { key: 'ce185699fabd71bb5c22e5a0d73df88067acb9d6' }, h("slot", { key: 'a1e375fb1e8660f3fdb75d96f18db20735a3a64d' })));
|
|
157
157
|
}
|
|
158
158
|
get el() { return this; }
|
|
159
159
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-aff3ed68.js';
|
|
2
|
-
import { d as defineCustomElement$1 } from './p-
|
|
2
|
+
import { d as defineCustomElement$1 } from './p-ca38a8a9.js';
|
|
3
3
|
import { v as v4 } from './p-f5ff676c.js';
|
|
4
4
|
|
|
5
5
|
const nvFieldtextCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldtext{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fieldtext[fluid]:not([fluid=false]){max-width:unset}nv-fieldtext[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldtext[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fieldtext[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldtext[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldtext>label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldtext>.input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldtext>.input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fieldtext>.input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtext>.input-wrapper .input-container:focus-within,nv-fieldtext>.input-wrapper .input-container:focus-within:hover,nv-fieldtext>.input-wrapper .input-container:focus,nv-fieldtext>.input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldtext>.input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldtext>.input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldtext>.input-wrapper .input-container>[slot=leading-input]{display:block;margin-left:var(--form-field-padding-x)}nv-fieldtext>.input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;}nv-fieldtext>.input-wrapper .input-container input:focus{outline:none}nv-fieldtext>.input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldtext>.input-wrapper .input-container input[type=password]::-ms-clear,nv-fieldtext>.input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldtext>.input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default);margin-right:var(--form-gap-x)}nv-fieldtext>.input-wrapper .input-container>[slot=trailing-input]{display:block;margin-right:var(--form-field-padding-x)}nv-fieldtext>.description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtext>.error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
@@ -164,4 +164,4 @@ defineCustomElement();
|
|
|
164
164
|
|
|
165
165
|
export { NvFieldtext as N, defineCustomElement as d };
|
|
166
166
|
|
|
167
|
-
//# sourceMappingURL=p-
|
|
167
|
+
//# sourceMappingURL=p-0b5816f7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-2030d84d.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,wsOAAwsO,CAAC;AAChuO,0BAAe,cAAc;;MC2BhB,WAAW;IANxB;;;;;;;;;;;;;QA6CW,YAAO,GAAWA,EAAM,EAAE,CAAC;;;;;;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sB,CAAC,MAC7C,4DAAK,KAAK,EAAC,aAAa,IACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["uuidv4"],"sources":["src/components/nv-fieldtext/nv-fieldtext.scss?tag=nv-fieldtext","src/components/nv-fieldtext/nv-fieldtext.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\nnv-fieldtext {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n > label {\n @include form-field-label();\n }\n\n > .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n > [slot='leading-input'] {\n @include form-field-inner-leading-slot();\n }\n\n input {\n @include form-field-input();\n }\n \n\n nv-icon.validation {\n @include form-field-icon();\n margin-right: var(--form-gap-x);\n }\n > [slot='trailing-input'] {\n @include form-field-inner-trailing-slot();\n }\n }\n }\n\n > .description {\n @include form-field-description();\n }\n\n > .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot trailing-input - Content to be placed after the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldtext',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtext.scss',\n})\nexport class NvFieldtext {\n @Element() el: HTMLNvFieldtextElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text Field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n /**\n * Type of the input.\n * @deprecated use type instead.\n */\n @Prop({ reflect: true })\n readonly textInputType: 'text' | 'tel' | 'email';\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The type prop lets you specify what kind of information the input field\n * should accept. Choose 'text' for general words or sentences, 'tel' for\n * phone numbers, or 'email' for email addresses. This makes sure users get\n * the right keyboard and validation for what they need to enter.\n */\n @Prop({ reflect: true, mutable: true })\n type: 'text' | 'tel' | 'email' = 'text';\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the textfield\n * field.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription?: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input after the form is submitted.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they’ve used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}`;\n\n /**\n * When used with the email input type, this prop enables the field to accept\n * multiple email addresses. Users can enter several addresses, separating\n * each one with a comma, allowing the form to handle multiple recipients.\n */\n @Prop({ reflect: true })\n readonly multiple: boolean = false;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the input event on the input element.\n * Emits the inputChanged event with the new value.\n * @param {Event} event - Event object of the input event.\n */\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(input.value);\n };\n\n /**\n * Handles focus when the input container is clicked.\n */\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.textInputType) {\n this.type = this.textInputType;\n }\n\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n multiple={this.multiple}\n value={this.value}\n onInput={this.handleInput}\n />\n\n <slot name=\"trailing-input\"></slot>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-0b5816f7.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,wsOAAwsO,CAAC;AAChuO,0BAAe,cAAc;;MC2BhB,WAAW;IANxB;;;;;;;;;;;;;QA6CW,YAAO,GAAWA,EAAM,EAAE,CAAC;;;;;;;QAkDpC,SAAI,GAA6B,MAAM,CAAC;;;;;;QAQ/B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQ1B,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQnC,UAAK,GAAY,KAAK,CAAC;;;;;QAed,YAAO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C,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["uuidv4"],"sources":["src/components/nv-fieldtext/nv-fieldtext.scss?tag=nv-fieldtext","src/components/nv-fieldtext/nv-fieldtext.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\nnv-fieldtext {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n > label {\n @include form-field-label();\n }\n\n > .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n > [slot='leading-input'] {\n @include form-field-inner-leading-slot();\n }\n\n input {\n @include form-field-input();\n }\n \n\n nv-icon.validation {\n @include form-field-icon();\n margin-right: var(--form-gap-x);\n }\n > [slot='trailing-input'] {\n @include form-field-inner-trailing-slot();\n }\n }\n }\n\n > .description {\n @include form-field-description();\n }\n\n > .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot trailing-input - Content to be placed after the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldtext',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtext.scss',\n})\nexport class NvFieldtext {\n @Element() el: HTMLNvFieldtextElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text Field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n /**\n * Type of the input.\n * @deprecated use type instead.\n */\n @Prop({ reflect: true })\n readonly textInputType: 'text' | 'tel' | 'email';\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The type prop lets you specify what kind of information the input field\n * should accept. Choose 'text' for general words or sentences, 'tel' for\n * phone numbers, or 'email' for email addresses. This makes sure users get\n * the right keyboard and validation for what they need to enter.\n */\n @Prop({ reflect: true, mutable: true })\n type: 'text' | 'tel' | 'email' = 'text';\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the textfield\n * field.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription?: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input after the form is submitted.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they’ve used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}`;\n\n /**\n * When used with the email input type, this prop enables the field to accept\n * multiple email addresses. Users can enter several addresses, separating\n * each one with a comma, allowing the form to handle multiple recipients.\n */\n @Prop({ reflect: true })\n readonly multiple: boolean = false;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the input event on the input element.\n * Emits the inputChanged event with the new value.\n * @param {Event} event - Event object of the input event.\n */\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(input.value);\n };\n\n /**\n * Handles focus when the input container is clicked.\n */\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.textInputType) {\n this.type = this.textInputType;\n }\n\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n multiple={this.multiple}\n value={this.value}\n onInput={this.handleInput}\n />\n\n <slot name=\"trailing-input\"></slot>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
|
|
@@ -42,6 +42,11 @@ var ButtonType;
|
|
|
42
42
|
ButtonType["Reset"] = "reset";
|
|
43
43
|
ButtonType["Button"] = "button";
|
|
44
44
|
})(ButtonType || (ButtonType = {}));
|
|
45
|
+
var NotificationEmphasis;
|
|
46
|
+
(function (NotificationEmphasis) {
|
|
47
|
+
NotificationEmphasis["Medium"] = "medium";
|
|
48
|
+
NotificationEmphasis["High"] = "high";
|
|
49
|
+
})(NotificationEmphasis || (NotificationEmphasis = {}));
|
|
45
50
|
var ToggleButtonEmphasis;
|
|
46
51
|
(function (ToggleButtonEmphasis) {
|
|
47
52
|
ToggleButtonEmphasis["High"] = "high";
|
|
@@ -266,6 +271,6 @@ const CUSTOM_MONTH_NAMES = {
|
|
|
266
271
|
],
|
|
267
272
|
};
|
|
268
273
|
|
|
269
|
-
export { ButtonSize as B, CUSTOM_DAY_NAMES as C, DeprecatedSemanticColors as D, FeedbackColors as F, GlobalFilterPosition as G, IconButtonShape as I, LoaderColors as L, SemanticSizes as S, ToggleButtonEmphasis as T, WEEK_ABBREVIATIONS as W, ButtonEmphasis as a, ButtonType as b, ToggleButtonSize as c, LabelPlacement as d, TextInputAutocomplete as e, TimeType as f, SortingPossibility as g, CUSTOM_MONTH_NAMES as h };
|
|
274
|
+
export { ButtonSize as B, CUSTOM_DAY_NAMES as C, DeprecatedSemanticColors as D, FeedbackColors as F, GlobalFilterPosition as G, IconButtonShape as I, LoaderColors as L, NotificationEmphasis as N, SemanticSizes as S, ToggleButtonEmphasis as T, WEEK_ABBREVIATIONS as W, ButtonEmphasis as a, ButtonType as b, ToggleButtonSize as c, LabelPlacement as d, TextInputAutocomplete as e, TimeType as f, SortingPossibility as g, CUSTOM_MONTH_NAMES as h };
|
|
270
275
|
|
|
271
|
-
//# sourceMappingURL=p-
|
|
276
|
+
//# sourceMappingURL=p-2277cfc8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-2277cfc8.js","mappings":"IAEY;AAAZ,WAAY,cAAc;IACxB,6CAA2B,CAAA;IAC3B,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;IACf,qCAAmB,CAAA;AACrB,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;IACW;AAAZ,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,+CAAmB,CAAA;IACnB,mDAAuB,CAAA;IACvB,+CAAmB,CAAA;IACnB,2CAAe,CAAA;AACjB,CAAC,EANW,wBAAwB,KAAxB,wBAAwB,QAMnC;IACW;AAAZ,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,6BAAY,CAAA;IACZ,8BAAa,CAAA;IACb,6BAAY,CAAA;IACZ,kCAAiB,CAAA;AACnB,CAAC,EANW,aAAa,KAAb,aAAa,QAMxB;IACW;AAAZ,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,0BAAY,CAAA;IACZ,2BAAa,CAAA;IACb,0BAAY,CAAA;A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K,EAAE,KAAK,EAAE,KAAK,CAAC;IAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;EAC1D;MAEW,kBAAkB,GAAgC;IAC7D,OAAO,EAAE;QACP,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN;IACD,OAAO,EAAE;QACP,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN;IACD,OAAO,EAAE;QACP,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN;IACD,OAAO,EAAE;QACP,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN;IACD,OAAO,EAAE;QACP,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN;IACD,OAAO,EAAE;QACP,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN;;;;;","names":[],"sources":["src/utils/constants.ts"],"sourcesContent":["import { WeekAbbreviations } from '../interfaces/localization';\n\nexport enum FeedbackColors {\n Information = 'information',\n Warning = 'warning',\n Success = 'success',\n Error = 'error',\n Neutral = 'neutral',\n}\nexport enum DeprecatedSemanticColors {\n Neutral = 'neutral',\n Primary = 'primary',\n Secondary = 'secondary',\n Success = 'success',\n Error = 'error',\n}\nexport enum SemanticSizes {\n ExtraSmall = 'xs',\n Small = 'sm',\n Medium = 'md',\n Large = 'lg',\n ExtraLarge = 'xl',\n}\nexport enum ButtonSize {\n ExtraSmall = 'xs',\n Small = 'sm',\n Medium = 'md',\n Large = 'lg',\n}\nexport enum ButtonEmphasis {\n High = 'high',\n Medium = 'medium',\n Low = 'low',\n Lower = 'lower',\n}\nexport enum ButtonType {\n Submit = 'submit',\n Reset = 'reset',\n Button = 'button',\n}\nexport enum NotificationEmphasis {\n Medium = 'medium',\n High = 'high',\n}\nexport enum ToggleButtonEmphasis {\n High = 'high',\n Low = 'low',\n}\nexport enum ToggleButtonSize {\n ExtraSmall = 'xs',\n Small = 'sm',\n Medium = 'md',\n Large = 'lg',\n}\nexport enum IconButtonShape {\n Square = 'square',\n Rounded = 'rounded',\n}\nexport enum LoaderColors {\n High = 'brand',\n Low = 'white',\n}\nexport enum LabelPlacement {\n Before = 'before',\n After = 'after',\n}\n\nexport enum TextInputAutocomplete {\n On = 'on',\n Off = 'off',\n Section = 'section-*',\n Shipping = 'shipping',\n Billing = 'billing',\n Home = 'home',\n Work = 'work',\n Mobile = 'mobile',\n Fax = 'fax',\n Pager = 'pager',\n Tel = 'tel',\n TelCountryCode = 'tel-country-code',\n TelNational = 'tel-national',\n TelAreaCode = 'tel-area-code',\n TelLocal = 'tel-local',\n TelLocalPrefix = 'tel-local-prefix',\n TelLocalSuffix = 'tel-local-suffix',\n TelExtension = 'tel-extension',\n Email = 'email',\n IMProtocol = 'impp',\n Name = 'name',\n HonorificPrefix = 'honorific-prefix',\n GivenName = 'given-name',\n AdditionalName = 'additional-name',\n FamilyName = 'family-name',\n HonorificSuffix = 'honorific-suffix',\n Nickname = 'nickname',\n Username = 'username',\n NewPassword = 'new-password',\n CurrentPassword = 'current-password',\n OneTimeCode = 'one-time-code',\n OrganizationTitle = 'organization-title',\n Organization = 'organization',\n StreetAddress = 'street-address',\n AddressLine1 = 'address-line1',\n AddressLine2 = 'address-line2',\n AddressLine3 = 'address-line3',\n AddressLevel4 = 'address-level4',\n AddressLevel3 = 'address-level3',\n AddressLevel2 = 'address-level2',\n AddressLevel1 = 'address-level1',\n Country = 'country',\n CountryName = 'country-name',\n PostalCode = 'postal-code',\n CCName = 'cc-name',\n CCGivenName = 'cc-given-name',\n CCAdditionalName = 'cc-additional-name',\n CCFamilyName = 'cc-family-name',\n CCNumber = 'cc-number',\n CCExp = 'cc-exp',\n CCExpMonth = 'cc-exp-month',\n CCExpYear = 'cc-exp-year',\n CCCSC = 'cc-csc',\n CCType = 'cc-type',\n TransactionCurrency = 'transaction-currency',\n TransactionAmount = 'transaction-amount',\n Language = 'language',\n Bday = 'bday',\n BdayDay = 'bday-day',\n BdayMonth = 'bday-month',\n BdayYear = 'bday-year',\n Sex = 'sex',\n Url = 'url',\n Photo = 'photo',\n}\n\nexport enum TimeType {\n Hours = 'hours',\n Minutes = 'minutes',\n Seconds = 'seconds',\n}\n\nexport enum GlobalFilterPosition {\n End = 'end',\n Start = 'start',\n Center = 'center',\n}\nexport enum SortingPossibility {\n Asc = 'asc',\n Desc = 'desc',\n}\n\nexport const WEEK_ABBREVIATIONS: WeekAbbreviations = {\n 'fr-FR': 'Sem', // Semaine\n 'fr-BE': 'Sem', // Semaine\n 'nl-BE': 'W', // Week\n 'en-BE': 'W', // Week\n 'en-US': 'W', // Week\n 'en-GB': 'W', // Week\n 'es-ES': 'Sem', // Semana\n 'de-DE': 'KW', // Kalenderwoche\n 'it-IT': 'Set', // Settimana\n 'pt-PT': 'Sem', // Semana\n 'nl-NL': 'W', // Week\n 'pl-PL': 'Tyd', // Tydzień\n 'ru-RU': 'Нед', // Неделя\n 'ja-JP': '週', // Shū\n 'zh-CN': '周', // Zhōu\n 'ko-KR': '주', // Ju\n};\n\nexport const CUSTOM_DAY_NAMES: { [key: string]: string[] } = {\n 'fr-BE': ['Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa', 'Di'],\n 'nl-BE': ['Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za', 'Zo'],\n 'de-DE': ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'],\n 'en-BE': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n 'en-US': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n 'en-GB': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n};\n\nexport const CUSTOM_MONTH_NAMES: { [key: string]: string[] } = {\n 'fr-BE': [\n 'Jan',\n 'Fev',\n 'Mar',\n 'Avr',\n 'Mai',\n 'Jun',\n 'Jul',\n 'Aou',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n ],\n 'nl-BE': [\n 'Jan',\n 'Feb',\n 'Maa',\n 'Apr',\n 'Mei',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Okt',\n 'Nov',\n 'Dec',\n ],\n 'de-DE': [\n 'Jan',\n 'Feb',\n 'Mär',\n 'Apr',\n 'Mai',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Okt',\n 'Nov',\n 'Dez',\n ],\n 'en-BE': [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n ],\n 'en-US': [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n ],\n 'en-GB': [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n ],\n};\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-aff3ed68.js';
|
|
2
|
-
import { d as defineCustomElement$1 } from './p-
|
|
2
|
+
import { d as defineCustomElement$1 } from './p-ca38a8a9.js';
|
|
3
3
|
|
|
4
4
|
const nvMenuitemCss = "nv-menuitem{display:flex;align-items:center;max-width:300px;width:100vw;font-size:var(--menu-contextual-item-font-size);font-weight:var(--menu-contextual-item-font-weight);color:var(--components-menu-contextual-item-content);border-radius:var(--menu-contextual-item-radius);gap:var(--menu-contextual-item-gap-x);padding:var(--menu-contextual-item-padding-y) var(--menu-contextual-item-padding-x);transition:background-color 150ms ease-out;cursor:pointer}nv-menuitem:hover,nv-menuitem:focus,nv-menuitem:focus-within{background-color:var(--components-menu-contextual-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-menuitem *{pointer-events:none}nv-menuitem kbd{color:var(--components-menu-contextual-item-shortcut)}nv-menuitem [data-scope=text]{margin-right:auto}nv-menuitem[disabled]:not([disabled=false]){cursor:unset;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}";
|
|
5
5
|
const NvMenuitemStyle0 = nvMenuitemCss;
|
|
@@ -82,4 +82,4 @@ defineCustomElement();
|
|
|
82
82
|
|
|
83
83
|
export { NvMenuitem as N, defineCustomElement as d };
|
|
84
84
|
|
|
85
|
-
//# sourceMappingURL=p-
|
|
85
|
+
//# sourceMappingURL=p-2854cf01.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-2854cf01.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,+6BAA+6B,CAAC;AACt8B,yBAAe,aAAa;;MCoBf,UAAU;IALvB;;;;;;;QA6BW,aAAQ,GAAY,KAAK,CAAC;;;;QAY1B,eAAU,GAAY,KAAK,CAAC;KAuFtC;IArDS,oBAAoB,CAAC,KAAY;;QAEvC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,KAAK,CAAC,eA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nv-menuitem/nv-menuitem.tsx"],"sourcesContent":["@mixin root-styles() {\n display: flex;\n align-items: center;\n max-width: 300px;\n width: 100vw;\n font-size: var(--menu-contextual-item-font-size);\n font-weight: var(--menu-contextual-item-font-weight);\n color: var(--components-menu-contextual-item-content);\n border-radius: var(--menu-contextual-item-radius);\n gap: var(--menu-contextual-item-gap-x);\n padding: var(--menu-contextual-item-padding-y) var(--menu-contextual-item-padding-x);\n transition: background-color 150ms ease-out;\n cursor: pointer;\n &:hover, &:focus, &:focus-within {\n @include focused-styles();\n }\n * {\n pointer-events: none;\n }\n}\n\n@mixin focused-styles() {\n background-color: var(--components-menu-contextual-item-background-hover);\n color: var(--components-menu-contextual-item-content-hover);\n}\n\n@mixin disabled-styles() {\n cursor: unset;\n background-color: unset;\n color: var(--components-menu-contextual-item-content-disabled);\n}\n\n@mixin text-styles() {\n margin-right: auto;\n}\n\n@mixin shortcut-styles() {\n color: var(--components-menu-contextual-item-shortcut);\n}\n\nnv-menuitem {\n @include root-styles();\n\n kbd {\n @include shortcut-styles();\n }\n\n [data-scope=\"text\"] {\n @include text-styles();\n }\n\n &[disabled]:not([disabled=\"false\"]) {\n @include disabled-styles();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n Listen,\n} from '@stencil/core';\n\nimport { IconName } from '../nv-icon/nv-icons';\n\n/**\n * @slot default - Use this slot to render custom content for the menu item.\n */\n@Component({\n tag: 'nv-menuitem',\n styleUrl: 'nv-menuitem.scss',\n shadow: false,\n})\nexport class NvMenuitem {\n @Element() el: HTMLNvMenuitemElement;\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Text content for the menu item. If a more custom approach is needed, use\n * the default slot instead.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Choose the icon you want to display. This also sets the aria-label for\n * improved accessibility, helping users who rely on screen readers.\n * The icon is not displayed when the button is loading.\n */\n @Prop({ reflect: true })\n readonly icon: `${IconName}`;\n\n /**\n * Disables the item, preventing user interaction.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Show a shortcut key for the action represented in the menu item.\n */\n @Prop({ reflect: true })\n readonly shortcut: string;\n\n /**\n * If the menu item has a submenu, the a caret icon will be displayed.\n */\n @Prop({ reflect: true })\n readonly hasSubmenu: boolean = false;\n\n /**\n * Represents the identifier or name associated with the menu item. This value\n * will be emitted as part of the event data when the menu item is selected,\n * enabling event handlers to identify the chosen item.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Fires when the menu item is selected (click or keypress). Will include the\n * id and name of the menu item.\n */\n @Event()\n menuitemSelected: EventEmitter<{\n /**\n * The id of the menu item that was selected.\n */\n id?: HTMLElement['id'];\n /**\n * The name of the menu item that was selected.\n */\n name?: string;\n /**\n * Indicates if the menu item has a nested submenu.\n */\n hasSubmenu?: boolean;\n }>;\n\n private handleMenuItemSelect(event: Event) {\n // If the element is disabled, stop propagation\n if (this.disabled) {\n event.stopPropagation();\n return;\n }\n\n this.menuitemSelected.emit({\n id: this.el.id,\n name: this.name,\n hasSubmenu: this.hasSubmenu,\n });\n }\n\n @Listen('click', { capture: true })\n handleClick(event: MouseEvent) {\n this.handleMenuItemSelect(event);\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n const activeElement = document.activeElement as HTMLNvMenuitemElement;\n if (\n activeElement &&\n activeElement.tagName === 'NV-MENUITEM' &&\n !activeElement.hasAttribute('has-submenu')\n ) {\n event.preventDefault();\n this.el.click();\n }\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host role=\"menuitem\" tabindex={this.disabled ? '-1' : '0'}>\n {this.icon && <nv-icon name={this.icon}></nv-icon>}\n\n <slot></slot>\n\n {this.label && <span data-scope=\"text\">{this.label}</span>}\n {this.shortcut && !this.hasSubmenu && <kbd>{this.shortcut}</kbd>}\n {this.hasSubmenu && <nv-icon name=\"chevron-right\"></nv-icon>}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, d as Host } from './p-aff3ed68.js';
|
|
2
|
-
import { b as ButtonType, B as ButtonSize } from './p-
|
|
2
|
+
import { b as ButtonType, B as ButtonSize } from './p-2277cfc8.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './p-fda58a76.js';
|
|
4
4
|
|
|
5
5
|
const nvButtonCss = "nv-button{text-decoration:none;display:inline-flex;justify-content:center;align-items:center;font-style:normal;font-weight:var(--font-weight-medium-emphasis);font-family:\"TT Norms Pro\", sans-serif;transition:background-color 150ms ease-out;user-select:none;cursor:pointer;height:fit-content;width:fit-content}nv-button[size=xs]{padding:var(--button-xs-padding-y) var(--button-xs-padding-x);gap:var(--button-xs-gap);border-radius:var(--button-xs-border-radius);line-height:var(--button-xs-line-height);font-size:var(--button-xs-font-size)}nv-button[size=xs] nv-icon>svg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-button[size=sm]{padding:var(--button-sm-padding-y) var(--button-sm-padding-x);gap:var(--button-sm-gap);border-radius:var(--button-sm-border-radius);line-height:var(--button-sm-line-height);font-size:var(--button-sm-font-size)}nv-button[size=sm] nv-icon>svg{width:var(--spacing-4);height:var(--spacing-4);stroke-width:1.5px}nv-button[size=md]{padding:var(--button-md-padding-y) var(--button-md-padding-x);gap:var(--button-md-gap);border-radius:var(--button-md-border-radius);line-height:var(--button-md-line-height);font-size:var(--button-md-font-size)}nv-button[size=md] nv-icon>svg{width:var(--spacing-5);height:var(--spacing-5);stroke-width:1.6px}nv-button[size=lg]{padding:var(--button-lg-padding-y) var(--button-lg-padding-x);gap:var(--button-lg-gap);border-radius:var(--button-lg-border-radius);line-height:var(--button-lg-line-height);font-size:var(--button-lg-font-size)}nv-button[size=lg] nv-icon>svg{width:var(--spacing-6);height:var(--spacing-6);stroke-width:1.8px}nv-button[emphasis=high]{background:var(--components-button-high-background);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text)}nv-button[emphasis=high]:hover{background:var(--components-button-high-background-hover);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text-hover)}nv-button[emphasis=high]:active{background:var(--components-button-high-background-active);border:1px solid var(--components-button-high-border-active);color:var(--components-button-high-text-active)}nv-button[emphasis=high]:focus,nv-button[emphasis=high]:focus-within{outline:none}nv-button[emphasis=high]:focus-visible,nv-button[emphasis=high]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=high]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=high][active]:not([active=false]){background:var(--components-button-high-background-active);border:1px solid var(--components-button-high-border-active);color:var(--components-button-high-text-active)}nv-button[emphasis=high][danger]:not([danger=false]){background:var(--components-button-destructive-high-background);border:1px solid transparent;color:var(--components-button-destructive-high-text)}nv-button[emphasis=high][danger]:not([danger=false]):hover{background:var(--components-button-destructive-high-background-hover);border:1px solid transparent;color:var(--components-button-destructive-high-text-hover)}nv-button[emphasis=high][danger]:not([danger=false]):focus,nv-button[emphasis=high][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=high][danger]:not([danger=false]):focus-visible,nv-button[emphasis=high][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=medium]{background:var(--components-button-medium-background);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text)}nv-button[emphasis=medium]:hover{background:var(--components-button-medium-background-hover);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text-hover)}nv-button[emphasis=medium]:active{background:var(--components-button-medium-background-active);border:1px solid var(--components-button-medium-border-active);color:var(--components-button-medium-text-active)}nv-button[emphasis=medium]:focus,nv-button[emphasis=medium]:focus-within{outline:none}nv-button[emphasis=medium]:focus-visible,nv-button[emphasis=medium]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=medium]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=medium][active]:not([active=false]){background:var(--components-button-medium-background-active);border:1px solid var(--components-button-medium-border-active);color:var(--components-button-medium-text-active)}nv-button[emphasis=medium][danger]:not([danger=false]){background:var(--components-button-destructive-medium-background);border:1px solid var(--components-button-destructive-medium-border);color:var(--components-button-destructive-medium-text)}nv-button[emphasis=medium][danger]:not([danger=false]):hover{background:var(--components-button-destructive-medium-background-hover);border:1px solid var(--components-button-destructive-medium-border);color:var(--components-button-destructive-medium-text-hover)}nv-button[emphasis=medium][danger]:not([danger=false]):focus,nv-button[emphasis=medium][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=medium][danger]:not([danger=false]):focus-visible,nv-button[emphasis=medium][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=low]{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-button[emphasis=low]:hover{background:var(--components-button-low-background-hover);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text-hover)}nv-button[emphasis=low]:active{background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-button[emphasis=low]:focus,nv-button[emphasis=low]:focus-within{outline:none}nv-button[emphasis=low]:focus-visible,nv-button[emphasis=low]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=low]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=low][active]:not([active=false]){background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-button[emphasis=low][danger]:not([danger=false]){background:var(--components-button-destructive-low-background);border:1px solid var(--components-button-destructive-low-border);color:var(--components-button-destructive-low-text)}nv-button[emphasis=low][danger]:not([danger=false]):hover{background:var(--components-button-destructive-low-background-hover);border:1px solid var(--components-button-destructive-low-border);color:var(--components-button-destructive-low-text-hover)}nv-button[emphasis=low][danger]:not([danger=false]):focus,nv-button[emphasis=low][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=low][danger]:not([danger=false]):focus-visible,nv-button[emphasis=low][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=lower]{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-button[emphasis=lower]:hover{background:var(--components-button-lower-background-hover);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text-hover)}nv-button[emphasis=lower]:active{background:var(--components-button-lower-background-active);border:1px solid var(--components-button-lower-border-active);color:var(--components-button-lower-text-active)}nv-button[emphasis=lower]:focus,nv-button[emphasis=lower]:focus-within{outline:none}nv-button[emphasis=lower]:focus-visible,nv-button[emphasis=lower]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=lower]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=lower][active]:not([active=false]){background:var(--components-button-lower-background-active);border:1px solid var(--components-button-lower-border-active);color:var(--components-button-lower-text-active)}nv-button[emphasis=lower][danger]:not([danger=false]){background:var(--components-button-destructive-lower-background);border:1px solid var(--components-button-destructive-lower-border);color:var(--components-button-destructive-lower-text)}nv-button[emphasis=lower][danger]:not([danger=false]):hover{background:var(--components-button-destructive-lower-background-hover);border:1px solid var(--components-button-destructive-lower-border);color:var(--components-button-destructive-lower-text-hover)}nv-button[emphasis=lower][danger]:not([danger=false]):focus,nv-button[emphasis=lower][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=lower][danger]:not([danger=false]):focus-visible,nv-button[emphasis=lower][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[fluid]:not([fluid=false]){width:100%}nv-button[loading]:not([loading=false]) [slot=leading-icon]{display:none}";
|
|
@@ -188,4 +188,4 @@ defineCustomElement();
|
|
|
188
188
|
|
|
189
189
|
export { NvButton as N, defineCustomElement as d };
|
|
190
190
|
|
|
191
|
-
//# sourceMappingURL=p-
|
|
191
|
+
//# sourceMappingURL=p-2de17259.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-2de17259.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,y1TAAy1T,CAAC;AAC92T,uBAAe,WAAW;;MCuBb,QAAQ;IANrB;;;;;;;;;;;QAmBW,SAAI,GAAoB,IAAI,CAAC;;;;;;QAQ7B,aAAQ,GAAwB,MAAM,CAAC;;;;;QAOvC,WAAM,GAAY,KAAK,CAAC;;;;;QAOxB,WAAM,GAAY,KAAK,CAAC;;;;;;QAQjC,YAAO,GAAY,KAAK,CAAC;;;;QAMzB,aAAQ,GAAY,KAAK,CAAC;;;;QAMjB,UAAK,GAAY,KAAK,CAAC;;;;;;QAQvB,SAAI,GAAoB,QAAQ,CAAC;;;;;;;;;;QAmBlC,sBAAiB,GAAG,CAAC,KAAY;;YACvC,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjC,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,OAAO;aACR;YAED,IACE,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,MAAM;iBAC9B,IAAI,CA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AAE,CAAC;QACvB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;KACjB;;;;IAOD,mBAAmB,CAAC,OAAgB;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;KACzB;IAGD,oBAAoB,CAAC,QAAiB;QACpC,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;SAC9B;aAAM;YACL,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;SAC1B;KACF;;;;IAMD,iBAAiB;QACf,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;SAC9B;KACF;;;;IAMD,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAC,GAAG,EAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,IAC7D,IAAI,CAAC,OAAO,KACX,kEACE,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI,GACvC,CACd,EAED,6DAAM,IAAI,EAAC,cAAc,GAAQ,EACjC,8DAAa,EACb,6DAAM,IAAI,EAAC,eAAe,GAAQ,CAC7B,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nv-button/styles/nv-button.scss?tag=nv-button","src/components/nv-button/nv-button.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n\n// Make sure to update nv-button class in the tailwind-components.scss file when\n// you add new styles or change the structure here.\nnv-button {\n @include root-styles();\n\n @each $size in $sizes {\n &[size=\"#{$size}\"] {\n @include size-styles($size);\n }\n }\n\n @each $emphasis in $emphases {\n &[emphasis=\"#{$emphasis}\"] {\n @include emphasis-styles($emphasis);\n\n &[active]:not([active=\"false\"]) {\n @include active-styles($emphasis);\n }\n\n &[danger]:not([danger=\"false\"]) {\n @include danger-styles($emphasis);\n }\n }\n }\n\n &[fluid]:not([fluid=\"false\"]) {\n @include fluid-styles();\n }\n\n &[loading]:not([loading=\"false\"]) {\n [slot=\"leading-icon\"] {\n display: none;\n }\n }\n}\n","import {\n Component,\n Listen,\n Host,\n h,\n Prop,\n AttachInternals,\n Element,\n Watch,\n} from '@stencil/core';\n\nimport { ButtonSize, ButtonEmphasis, ButtonType } from '../../utils/constants';\n\n/**\n * @slot default - Content of the button.\n * @slot leading-icon - Icon before the label.\n * @slot trailing-icon - Icon after the label.\n */\n@Component({\n tag: 'nv-button',\n shadow: false,\n formAssociated: true,\n styleUrl: 'styles/nv-button.scss',\n})\nexport class NvButton {\n @AttachInternals() internals: ElementInternals;\n @Element() el: HTMLNvButtonElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Determines how large or small the button appears, allowing for\n * customization of the button's dimensions to fit different design\n * specifications and user needs.\n */\n @Prop({ reflect: true })\n readonly size: `${ButtonSize}` = 'md';\n\n /**\n * Adjusts the button's emphasis to make it more or less visually prominent\n * to users. Use this to draw attention to important actions or reduce focus\n * on less critical ones\n */\n @Prop({ reflect: true })\n readonly emphasis: `${ButtonEmphasis}` = 'high';\n\n /**\n * Use this prop to highlight the button when it represents the current page\n * or active selection. This helps users understand their navigation context.\n */\n @Prop({ reflect: true })\n readonly active: boolean = false;\n\n /**\n * Applies styling that visually indicates the button represents a dangerous\n * action.\n */\n @Prop({ reflect: true })\n readonly danger: boolean = false;\n\n /**\n * Set this to true to show a spinner on the button, letting users know that\n * their action is being processed. It helps improve user experience by\n * indicating ongoing activities.\n */\n @Prop({ reflect: true, mutable: true })\n loading: boolean = false;\n\n /**\n * Disables the button, preventing user interaction.\n */\n @Prop({ reflect: true, mutable: true })\n disabled: boolean = false;\n\n /**\n * Allows the button to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n /**\n * Sets the button type to control its function in forms. Use 'submit' to send\n * form data, 'reset' to clear the form, or 'button' for a standard button\n * that doesn't interact with form submission by default.\n */\n @Prop({ reflect: true })\n readonly type: `${ButtonType}` = 'button';\n\n /**\n * Sets the form associated with the button in case the (submit) button is not a child of a form.\n * Matches the native HTML button 'form' attribute behavior.\n */\n @Prop({ reflect: true })\n readonly form: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles button click events, managing form actions and disabled states.\n * Prevents default behavior when button is disabled or loading, and\n * processes form submissions/resets when appropriate.\n * @param {Event} event - The click event.\n */\n private handleButtonClick = (event: Event): void => {\n if (this.loading || this.disabled) {\n event.preventDefault();\n return;\n }\n\n if (\n this.type !== ButtonType.Button &&\n (this.form || this.internals?.form)\n ) {\n this.processFormAction();\n } else if (this.form && this.type === ButtonType.Button) {\n console.warn(\n 'Button has a form id but is not of type submit or reset so no form action will be processed.',\n `Button:`,\n this.el,\n );\n }\n };\n\n /**\n * Processes form-related actions by finding the associated form element\n * and triggering the appropriate action (submit/reset) based on button type.\n * Falls back to ElementInternals form if no explicit form ID is provided.\n */\n private processFormAction = (): void => {\n const formElement = this.form\n ? (document.getElementById(this.form) as HTMLFormElement)\n : this.internals?.form;\n\n if (!formElement) {\n console.warn(\n 'No form element found.',\n `Form ID: ${this.form || 'Not provided'}`,\n `Internals form:`,\n this.internals?.form,\n );\n return;\n }\n\n switch (this.type) {\n case ButtonType.Submit:\n formElement.requestSubmit();\n break;\n case ButtonType.Reset:\n formElement.reset();\n break;\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.el.click();\n }\n }\n\n @Listen('touchstart', { passive: false })\n handleTouchStart(event: TouchEvent) {\n if (event.touches.length > 1) return;\n event.preventDefault();\n this.el.click();\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('loading')\n handleLoadingChange(loading: boolean) {\n this.loading = loading;\n this.disabled = loading;\n }\n\n @Watch('disabled')\n handleDisabledChange(disabled: boolean) {\n if (this.loading) {\n this.disabled = this.loading;\n } else {\n this.disabled = disabled;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (this.loading) {\n this.disabled = this.loading;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host role=\"button\" tabindex=\"0\" onClick={this.handleButtonClick}>\n {this.loading && (\n <nv-loader\n size={this.size === ButtonSize.Large ? 'sm' : 'xs'}\n ></nv-loader>\n )}\n\n <slot name=\"leading-icon\"></slot>\n <slot></slot>\n <slot name=\"trailing-icon\"></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
|