@nova-design-system/nova-webcomponents 3.12.0 → 3.14.0-beta.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-23b7d61b.js +221 -0
- package/dist/cjs/collapse.animation-23b7d61b.js.map +1 -0
- package/dist/cjs/{constants-aac59496.js → constants-f5633903.js} +15 -1
- package/dist/cjs/constants-f5633903.js.map +1 -0
- package/dist/cjs/fade.animation-9294e9ee.js +726 -0
- package/dist/cjs/fade.animation-9294e9ee.js.map +1 -0
- package/dist/cjs/{grow.animation-6d003803.js → grow.animation-f1cef0ad.js} +6 -5
- package/dist/cjs/grow.animation-f1cef0ad.js.map +1 -0
- package/dist/cjs/index-c56424e5.js +8 -0
- package/dist/cjs/index.cjs.js +24 -8
- 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 +11 -11
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +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-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldcheckbox.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 +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-notification.cjs.entry.js +181 -0
- package/dist/cjs/nv-notification.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-notificationcontainer.cjs.entry.js +43 -0
- package/dist/cjs/nv-notificationcontainer.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-popover.cjs.entry.js +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-8bc27ed6.js +92 -0
- package/dist/cjs/slide.animation-8bc27ed6.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 +114 -51
- package/dist/collection/animations/collapse.animation.js.map +1 -1
- package/dist/collection/animations/fade.animation.js +2 -2
- package/dist/collection/animations/fade.animation.js.map +1 -1
- package/dist/collection/animations/index.js +1 -0
- package/dist/collection/animations/index.js.map +1 -1
- package/dist/collection/animations/slide.animation.js +87 -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 +2 -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-badge/nv-badge.js +7 -7
- package/dist/collection/components/nv-badge/nv-badge.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-fieldcheckbox/nv-fieldcheckbox.css +1 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +0 -30
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-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-icon/nv-icons.js +2 -1
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- package/dist/collection/components/nv-notification/nv-notification.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 +431 -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-notificationcontainer/nv-notificationcontainer.css +61 -0
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.docs.js +7 -0
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.docs.js.map +1 -0
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js +76 -0
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js.map +1 -0
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.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 +14 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/components/index.js +11 -7
- 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-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +5 -5
- package/dist/components/nv-fielddaterange.js +5 -5
- package/dist/components/nv-fielddropdown.js +4 -4
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +6 -36
- 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 +213 -0
- package/dist/components/nv-notification.js.map +1 -0
- package/dist/components/nv-notificationcontainer.d.ts +11 -0
- package/dist/components/nv-notificationcontainer.js +59 -0
- package/dist/components/nv-notificationcontainer.js.map +1 -0
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-togglebutton.js +1 -1
- package/dist/components/nv-togglebuttongroup.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-1172e9bb.js → p-00cbf2a1.js} +2 -2
- package/dist/components/p-00cbf2a1.js.map +1 -0
- package/dist/components/{p-84f4b071.js → p-086a46af.js} +75 -41
- package/dist/components/p-086a46af.js.map +1 -0
- package/dist/components/{p-87079346.js → p-1af3591a.js} +3 -3
- package/dist/components/{p-87079346.js.map → p-1af3591a.js.map} +1 -1
- package/dist/components/{p-ddb7aa4e.js → p-368c8700.js} +13 -13
- package/dist/components/{p-ddb7aa4e.js.map → p-368c8700.js.map} +1 -1
- package/dist/components/p-3cd7a66f.js +219 -0
- package/dist/components/p-3cd7a66f.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-b7629769.js → p-44862b81.js} +4 -4
- package/dist/components/p-44862b81.js.map +1 -0
- package/dist/components/{p-8d45dbfe.js → p-4697bd56.js} +3 -2
- package/dist/components/p-4697bd56.js.map +1 -0
- package/dist/components/{p-5f594b35.js → p-51602221.js} +16 -2
- package/dist/components/p-51602221.js.map +1 -0
- package/dist/components/{p-4c3dc7e4.js → p-51a43ac6.js} +13 -10
- package/dist/components/p-51a43ac6.js.map +1 -0
- package/dist/components/{p-b2c31970.js → p-54161bad.js} +17 -11
- package/dist/components/p-54161bad.js.map +1 -0
- package/dist/components/{p-7372258e.js → p-6926e6f6.js} +2 -2
- package/dist/components/{p-7372258e.js.map → p-6926e6f6.js.map} +1 -1
- package/dist/components/{p-ac91582e.js → p-7426b20f.js} +2 -2
- package/dist/components/{p-ac91582e.js.map → p-7426b20f.js.map} +1 -1
- package/dist/components/{p-095c8285.js → p-95857e4f.js} +2 -2
- package/dist/components/{p-095c8285.js.map → p-95857e4f.js.map} +1 -1
- package/dist/components/p-a271e3be.js +723 -0
- package/dist/components/p-a271e3be.js.map +1 -0
- package/dist/components/{p-2030d84d.js → p-a45cacdf.js} +2 -2
- package/dist/components/{p-2030d84d.js.map → p-a45cacdf.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-dc5dad90.js → p-a823b8e9.js} +2 -2
- package/dist/components/{p-dc5dad90.js.map → p-a823b8e9.js.map} +1 -1
- package/dist/components/{p-0b015832.js → p-aaf0b787.js} +2 -2
- package/dist/components/{p-0b015832.js.map → p-aaf0b787.js.map} +1 -1
- package/dist/components/p-c7401a7d.js +90 -0
- package/dist/components/p-c7401a7d.js.map +1 -0
- package/dist/components/{p-57ae32bc.js → p-c8956181.js} +2 -2
- package/dist/components/{p-57ae32bc.js.map → p-c8956181.js.map} +1 -1
- package/dist/components/{p-2ad58e41.js → p-ee8944f3.js} +5 -5
- package/dist/components/{p-2ad58e41.js.map → p-ee8944f3.js.map} +1 -1
- package/dist/components/p-f4ae2239.js +88 -0
- package/dist/components/p-f4ae2239.js.map +1 -0
- package/dist/esm/collapse.animation-6e0b08df.js +219 -0
- package/dist/esm/collapse.animation-6e0b08df.js.map +1 -0
- package/dist/esm/{constants-a857c476.js → constants-69bafca2.js} +16 -2
- package/dist/esm/constants-69bafca2.js.map +1 -0
- package/dist/esm/fade.animation-9b939939.js +723 -0
- package/dist/esm/fade.animation-9b939939.js.map +1 -0
- package/dist/esm/{grow.animation-f7b26024.js → grow.animation-03fa5c19.js} +3 -2
- package/dist/esm/grow.animation-03fa5c19.js.map +1 -0
- package/dist/esm/index-a1936cd0.js +8 -0
- package/dist/esm/index.js +12 -8
- 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 +11 -11
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +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-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fieldcheckbox.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 +2 -2
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-notification.entry.js +177 -0
- package/dist/esm/nv-notification.entry.js.map +1 -0
- package/dist/esm/nv-notificationcontainer.entry.js +39 -0
- package/dist/esm/nv-notificationcontainer.entry.js.map +1 -0
- package/dist/esm/nv-popover.entry.js +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-f761030b.js +90 -0
- package/dist/esm/slide.animation-f761030b.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-47901c83.entry.js → p-08322093.entry.js} +2 -2
- package/dist/native/p-0a99c6fb.entry.js +2 -0
- package/dist/native/p-0a99c6fb.entry.js.map +1 -0
- package/dist/native/p-1504e28b.entry.js +2 -0
- package/dist/native/p-1504e28b.entry.js.map +1 -0
- package/dist/native/p-19090193.entry.js +2 -0
- package/dist/native/p-19090193.entry.js.map +1 -0
- package/dist/native/{p-3a8f65a9.entry.js → p-224b1a01.entry.js} +2 -2
- package/dist/native/p-29df974e.entry.js +2 -0
- package/dist/native/p-29df974e.entry.js.map +1 -0
- package/dist/native/{p-29ee7b1c.entry.js → p-29f68e07.entry.js} +2 -2
- package/dist/native/p-29f68e07.entry.js.map +1 -0
- package/dist/native/p-3cd7a66f.js +2 -0
- package/dist/native/p-3cd7a66f.js.map +1 -0
- package/dist/native/p-42ea6b74.js +16 -0
- package/dist/native/p-42ea6b74.js.map +1 -0
- package/dist/native/p-45506c37.entry.js +2 -0
- package/dist/native/p-45506c37.entry.js.map +1 -0
- package/dist/native/p-4697bd56.js +2 -0
- package/dist/native/{p-8d45dbfe.js.map → p-4697bd56.js.map} +1 -1
- package/dist/native/p-47da1926.entry.js +2 -0
- package/dist/native/p-47da1926.entry.js.map +1 -0
- package/dist/native/{p-e7a929e7.entry.js → p-48774d0c.entry.js} +2 -2
- package/dist/native/p-4ec61dec.entry.js +2 -0
- package/dist/native/p-4ec61dec.entry.js.map +1 -0
- package/dist/native/p-51602221.js +2 -0
- package/dist/native/p-51602221.js.map +1 -0
- package/dist/native/{p-ab1e1a96.entry.js → p-5c697133.entry.js} +2 -2
- package/dist/native/p-5c697133.entry.js.map +1 -0
- package/dist/native/{p-c3ad7617.entry.js → p-6c7a9a21.entry.js} +2 -2
- package/dist/native/p-6cb6679b.entry.js +2 -0
- package/dist/native/{p-62aa0531.entry.js → p-6d13a851.entry.js} +2 -2
- package/dist/native/p-74b129e9.entry.js +2 -0
- package/dist/native/{p-48cf2457.entry.js → p-758e0d4a.entry.js} +2 -2
- package/dist/native/p-9a46baa9.entry.js +2 -0
- package/dist/native/p-9a46baa9.entry.js.map +1 -0
- package/dist/native/p-a271e3be.js +2 -0
- package/dist/native/p-a271e3be.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-b32d0a5a.entry.js +2 -0
- package/dist/native/p-b32d0a5a.entry.js.map +1 -0
- package/dist/native/{p-bcff76ab.entry.js → p-c66565f8.entry.js} +2 -2
- package/dist/native/p-c7401a7d.js +2 -0
- package/dist/native/p-c7401a7d.js.map +1 -0
- package/dist/native/p-c7b7ffaf.entry.js +2 -0
- package/dist/native/p-c7b7ffaf.entry.js.map +1 -0
- package/dist/native/{p-a63929db.entry.js → p-d2c9247b.entry.js} +3 -3
- package/dist/native/{p-f033c4ce.entry.js → p-d882f417.entry.js} +2 -2
- package/dist/native/{p-2d647761.entry.js → p-e2c99ce2.entry.js} +2 -2
- package/dist/native/p-f5120223.entry.js +2 -0
- package/dist/native/p-f5120223.entry.js.map +1 -0
- package/dist/native/{p-43071c3b.entry.js → p-fa177c39.entry.js} +2 -2
- 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 +22 -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-badge/nv-badge.d.ts +1 -1
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +4 -0
- package/dist/types/components/nv-calendar/partials/calendar-actions.d.ts +4 -0
- package/dist/types/components/nv-dialogfooter/nv-dialogfooter.d.ts +8 -4
- package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +3 -2
- package/dist/types/components/nv-fieldslider/partials/field-input.d.ts +7 -3
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-notification/nv-notification.d.ts +93 -0
- package/dist/types/components/nv-notification/nv-notification.docs.d.ts +4 -0
- package/dist/types/components/nv-notificationcontainer/nv-notificationcontainer.d.ts +19 -0
- package/dist/types/components/nv-notificationcontainer/nv-notificationcontainer.docs.d.ts +4 -0
- package/dist/types/components.d.ts +199 -9
- package/dist/types/nova-docs.d.ts +6 -0
- package/dist/types/utils/constants.d.ts +12 -0
- package/dist/vscode-data.json +120 -6
- package/hydrate/index.js +800 -274
- package/hydrate/index.mjs +800 -274
- package/package.json +9 -1
- package/readme.md +169 -42
- package/dist/cjs/collapse.animation-a129dc3f.js +0 -86
- package/dist/cjs/collapse.animation-a129dc3f.js.map +0 -1
- package/dist/cjs/constants-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-1172e9bb.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-b3035205.js +0 -88
- package/dist/components/p-b3035205.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-63fea160.entry.js +0 -2
- package/dist/native/p-63fea160.entry.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-ab1e1a96.entry.js.map +0 -1
- package/dist/native/p-ac5496e7.entry.js +0 -2
- package/dist/native/p-d88c416f.entry.js +0 -2
- package/dist/native/p-d88c416f.entry.js.map +0 -1
- package/dist/native/p-e603c6ed.entry.js +0 -2
- package/dist/native/p-e603c6ed.entry.js.map +0 -1
- /package/dist/native/{p-47901c83.entry.js.map → p-08322093.entry.js.map} +0 -0
- /package/dist/native/{p-3a8f65a9.entry.js.map → p-224b1a01.entry.js.map} +0 -0
- /package/dist/native/{p-e7a929e7.entry.js.map → p-48774d0c.entry.js.map} +0 -0
- /package/dist/native/{p-c3ad7617.entry.js.map → p-6c7a9a21.entry.js.map} +0 -0
- /package/dist/native/{p-5d352456.entry.js.map → p-6cb6679b.entry.js.map} +0 -0
- /package/dist/native/{p-62aa0531.entry.js.map → p-6d13a851.entry.js.map} +0 -0
- /package/dist/native/{p-ac5496e7.entry.js.map → p-74b129e9.entry.js.map} +0 -0
- /package/dist/native/{p-48cf2457.entry.js.map → p-758e0d4a.entry.js.map} +0 -0
- /package/dist/native/{p-bcff76ab.entry.js.map → p-c66565f8.entry.js.map} +0 -0
- /package/dist/native/{p-a63929db.entry.js.map → p-d2c9247b.entry.js.map} +0 -0
- /package/dist/native/{p-f033c4ce.entry.js.map → p-d882f417.entry.js.map} +0 -0
- /package/dist/native/{p-2d647761.entry.js.map → p-e2c99ce2.entry.js.map} +0 -0
- /package/dist/native/{p-43071c3b.entry.js.map → p-fa177c39.entry.js.map} +0 -0
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
import { v4 as uuidv4 } from "uuid";
|
|
3
|
+
import { FeedbackColors, NotificationPosition, } from "../../utils/constants";
|
|
4
|
+
import { useCollapse, useFade, useSlide, parallel } from "../../animations";
|
|
5
|
+
/**
|
|
6
|
+
* @slot heading - Use this slot to insert HTML as the notification title.
|
|
7
|
+
* @slot content - Use this slot to insert HTML as the notification message.
|
|
8
|
+
* @slot actions - Use this slot for custom actions.
|
|
9
|
+
*/
|
|
10
|
+
export class NvNotification {
|
|
11
|
+
constructor() {
|
|
12
|
+
/****************************************************************************/
|
|
13
|
+
//#region PROPERTIES
|
|
14
|
+
/**
|
|
15
|
+
* Set a unique ID for the notification. Used for aria attributes and managing
|
|
16
|
+
* multiple notifications.
|
|
17
|
+
*/
|
|
18
|
+
this.uid = uuidv4();
|
|
19
|
+
/**
|
|
20
|
+
* Specifies the notification type which determines the color and default icon.
|
|
21
|
+
*/
|
|
22
|
+
this.feedback = 'information';
|
|
23
|
+
/**
|
|
24
|
+
* Adjusts the emphasis to make the notification more or less visually
|
|
25
|
+
* prominent to users. Use this to draw attention to important actions or
|
|
26
|
+
* reduce focus on less critical ones
|
|
27
|
+
*/
|
|
28
|
+
this.emphasis = 'medium';
|
|
29
|
+
/**
|
|
30
|
+
* Allows the notification to be dismissed via a close button (x). The
|
|
31
|
+
* notification is not dismissible unless explicitly enabled.
|
|
32
|
+
*/
|
|
33
|
+
this.dismissible = false;
|
|
34
|
+
/**
|
|
35
|
+
* Controls the visibility of the notification.
|
|
36
|
+
*/
|
|
37
|
+
this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
|
|
38
|
+
/**
|
|
39
|
+
* When true, the notification will be hidden initially, but internal changes
|
|
40
|
+
* will not be in a controlled state. Good for animating the notification in.
|
|
41
|
+
*/
|
|
42
|
+
this.initiallyHidden = false;
|
|
43
|
+
//#endregion EVENTS
|
|
44
|
+
/****************************************************************************/
|
|
45
|
+
//#region INTERNAL
|
|
46
|
+
this.iconByFeedback = {
|
|
47
|
+
[FeedbackColors.Warning]: 'alert-circle',
|
|
48
|
+
[FeedbackColors.Information]: 'info-circle',
|
|
49
|
+
[FeedbackColors.Success]: 'circle-check',
|
|
50
|
+
[FeedbackColors.Error]: 'alert-triangle',
|
|
51
|
+
[FeedbackColors.Neutral]: 'help',
|
|
52
|
+
};
|
|
53
|
+
this.roleByFeedback = {
|
|
54
|
+
[FeedbackColors.Error]: 'alert',
|
|
55
|
+
[FeedbackColors.Warning]: 'alert',
|
|
56
|
+
[FeedbackColors.Information]: 'status',
|
|
57
|
+
[FeedbackColors.Success]: 'status',
|
|
58
|
+
[FeedbackColors.Neutral]: 'status',
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
//#endregion PROPERTIES
|
|
62
|
+
/****************************************************************************/
|
|
63
|
+
//#region METHODS
|
|
64
|
+
/**
|
|
65
|
+
* Dismisses the notification with an animation, after the animation is
|
|
66
|
+
* complete, the hiddenChanged event will be emitted with the value of true,
|
|
67
|
+
* and the hidden prop will be set to true.
|
|
68
|
+
*/
|
|
69
|
+
async dismiss() {
|
|
70
|
+
await this.dismissAnimation();
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Sets the hidden prop to false, and shows the notification with an
|
|
74
|
+
* animation, after the animation is complete, the hiddenChanged event will be
|
|
75
|
+
* emitted with the value of false.
|
|
76
|
+
*/
|
|
77
|
+
async show() {
|
|
78
|
+
await this.showAnimation();
|
|
79
|
+
}
|
|
80
|
+
getDefaultIcon() {
|
|
81
|
+
var _a;
|
|
82
|
+
return (_a = this.iconByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'info-circle';
|
|
83
|
+
}
|
|
84
|
+
getAriaRole() {
|
|
85
|
+
var _a;
|
|
86
|
+
return (_a = this.roleByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'status';
|
|
87
|
+
}
|
|
88
|
+
getAriaLive() {
|
|
89
|
+
return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';
|
|
90
|
+
}
|
|
91
|
+
getHeadingId() {
|
|
92
|
+
return this.heading ? `nv-notification-${this.uid}-heading` : null;
|
|
93
|
+
}
|
|
94
|
+
getMessageId() {
|
|
95
|
+
return this.message ? `nv-notification-${this.uid}-message` : null;
|
|
96
|
+
}
|
|
97
|
+
async showAnimation() {
|
|
98
|
+
this.hidden = false;
|
|
99
|
+
const { setFadeIn } = useFade(this.container);
|
|
100
|
+
const { expand } = useCollapse(this.el, {
|
|
101
|
+
duration: 300,
|
|
102
|
+
overflow: 'visible',
|
|
103
|
+
});
|
|
104
|
+
const { slideY, setSlideY } = useSlide(this.container, {
|
|
105
|
+
duration: 300,
|
|
106
|
+
});
|
|
107
|
+
setSlideY(-100);
|
|
108
|
+
setFadeIn();
|
|
109
|
+
await parallel(slideY({ from: -100, to: 0 }), expand).start();
|
|
110
|
+
this.hiddenChanged.emit(false);
|
|
111
|
+
}
|
|
112
|
+
getSlideDestination(pos) {
|
|
113
|
+
switch (pos) {
|
|
114
|
+
case NotificationPosition.TopRight:
|
|
115
|
+
case NotificationPosition.BottomRight:
|
|
116
|
+
return { axis: 'x', to: 100 }; // right
|
|
117
|
+
case NotificationPosition.TopLeft:
|
|
118
|
+
case NotificationPosition.BottomLeft:
|
|
119
|
+
return { axis: 'x', to: -100 }; // left
|
|
120
|
+
case NotificationPosition.TopCenter:
|
|
121
|
+
return { axis: 'y', to: -100 }; // up
|
|
122
|
+
case NotificationPosition.BottomCenter:
|
|
123
|
+
return { axis: 'y', to: 100 }; // down
|
|
124
|
+
default:
|
|
125
|
+
return { axis: 'x', to: 100 }; // fallback
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
async dismissAnimation() {
|
|
129
|
+
var _a;
|
|
130
|
+
const position = (_a = this.el
|
|
131
|
+
.closest('nv-notificationcontainer')) === null || _a === void 0 ? void 0 : _a.getAttribute('position');
|
|
132
|
+
const destination = this.getSlideDestination(position);
|
|
133
|
+
const { fadeOut } = useFade(this.container, { duration: 300 });
|
|
134
|
+
const { slideX, slideY, setSlideReset } = useSlide(this.container, {
|
|
135
|
+
duration: 500,
|
|
136
|
+
});
|
|
137
|
+
const { collapse } = useCollapse(this.el, {
|
|
138
|
+
duration: 500,
|
|
139
|
+
overflow: 'visible',
|
|
140
|
+
});
|
|
141
|
+
const slide = destination.axis === 'x'
|
|
142
|
+
? slideX({ from: 0, to: destination.to })
|
|
143
|
+
: slideY({ from: 0, to: destination.to });
|
|
144
|
+
setSlideReset();
|
|
145
|
+
await parallel(fadeOut, slide, collapse).start();
|
|
146
|
+
this.hidden = true;
|
|
147
|
+
this.hiddenChanged.emit(true);
|
|
148
|
+
}
|
|
149
|
+
//#endregion INTERNAL
|
|
150
|
+
/****************************************************************************/
|
|
151
|
+
//#region LIFECYCLE
|
|
152
|
+
componentWillLoad() {
|
|
153
|
+
this.headingSlot = this.el.querySelector('[slot="heading"]');
|
|
154
|
+
this.messageSlot = this.el.querySelector('[slot="content"]');
|
|
155
|
+
this.actionsSlot = this.el.querySelector('[slot="actions"]');
|
|
156
|
+
if (this.initiallyHidden)
|
|
157
|
+
this.hidden = true;
|
|
158
|
+
}
|
|
159
|
+
//#endregion LIFECYCLE
|
|
160
|
+
/****************************************************************************/
|
|
161
|
+
//#region RENDER
|
|
162
|
+
render() {
|
|
163
|
+
var _a, _b, _c;
|
|
164
|
+
return (h(Host, { key: '6e0b8abd9cbcb62b0b133db77520aa5aaa4173c9', 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: '41b2ad35bf5220333e132d61f8843d1136cb1f40', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (h("button", { key: '63116f239f7108ae945845c247c712827d8ae8a6', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, h("nv-icon", { key: 'dc19bf166c6d2eccd3d40384d43206457f0d03f0', name: "x", size: "sm" }))), h("nv-icon", { key: 'e673ac1cc78300bc3425018a0cdfc4b90c679796', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md", "data-scope": "icon" }), h("div", { key: '95cb6ec06d89cda8e5170f9ff0f863b6b0b7e32d', "data-scope": "content" }, (this.heading || this.headingSlot) && (h("p", { key: 'ed654c0271d2ff8538295d8f7bf58a9754abb4c9', id: this.getHeadingId(), "data-scope": "heading" }, h("slot", { key: '00cc14a709059b9caf2117174ef7fcc310f5965f', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (h("p", { key: 'c7c0bcbc2b54fdfdf8280af6a377929bf17fd688', id: this.getMessageId(), "data-scope": "message" }, h("slot", { key: '946db5aeb667b67f52f51adbb1b8f600325f937e', name: "content" }, this.message))), this.actionsSlot && (h("div", { key: 'd94560b658507a515a1360057121e933b95e6fe6', "data-scope": "actions" }, h("slot", { key: 'db185d3924c7d1fbeb30578992f2375e92a0d4bc', name: "actions" })))))));
|
|
165
|
+
}
|
|
166
|
+
static get is() { return "nv-notification"; }
|
|
167
|
+
static get originalStyleUrls() {
|
|
168
|
+
return {
|
|
169
|
+
"$": ["styles/nv-notification.scss"]
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
static get styleUrls() {
|
|
173
|
+
return {
|
|
174
|
+
"$": ["styles/nv-notification.css"]
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
static get properties() {
|
|
178
|
+
return {
|
|
179
|
+
"uid": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"mutable": false,
|
|
182
|
+
"complexType": {
|
|
183
|
+
"original": "string",
|
|
184
|
+
"resolved": "string",
|
|
185
|
+
"references": {}
|
|
186
|
+
},
|
|
187
|
+
"required": false,
|
|
188
|
+
"optional": false,
|
|
189
|
+
"docs": {
|
|
190
|
+
"tags": [],
|
|
191
|
+
"text": "Set a unique ID for the notification. Used for aria attributes and managing\nmultiple notifications."
|
|
192
|
+
},
|
|
193
|
+
"getter": false,
|
|
194
|
+
"setter": false,
|
|
195
|
+
"attribute": "uid",
|
|
196
|
+
"reflect": true,
|
|
197
|
+
"defaultValue": "uuidv4()"
|
|
198
|
+
},
|
|
199
|
+
"feedback": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"mutable": false,
|
|
202
|
+
"complexType": {
|
|
203
|
+
"original": "`${FeedbackColors}`",
|
|
204
|
+
"resolved": "\"error\" | \"information\" | \"neutral\" | \"success\" | \"warning\"",
|
|
205
|
+
"references": {
|
|
206
|
+
"FeedbackColors": {
|
|
207
|
+
"location": "import",
|
|
208
|
+
"path": "../../utils/constants",
|
|
209
|
+
"id": "src/utils/constants.ts::FeedbackColors"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"required": false,
|
|
214
|
+
"optional": false,
|
|
215
|
+
"docs": {
|
|
216
|
+
"tags": [],
|
|
217
|
+
"text": "Specifies the notification type which determines the color and default icon."
|
|
218
|
+
},
|
|
219
|
+
"getter": false,
|
|
220
|
+
"setter": false,
|
|
221
|
+
"attribute": "feedback",
|
|
222
|
+
"reflect": true,
|
|
223
|
+
"defaultValue": "'information'"
|
|
224
|
+
},
|
|
225
|
+
"emphasis": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "`${NotificationEmphasis}`",
|
|
230
|
+
"resolved": "\"high\" | \"medium\"",
|
|
231
|
+
"references": {
|
|
232
|
+
"NotificationEmphasis": {
|
|
233
|
+
"location": "import",
|
|
234
|
+
"path": "../../utils/constants",
|
|
235
|
+
"id": "src/utils/constants.ts::NotificationEmphasis"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"required": false,
|
|
240
|
+
"optional": false,
|
|
241
|
+
"docs": {
|
|
242
|
+
"tags": [],
|
|
243
|
+
"text": "Adjusts the emphasis to make the notification more or less visually\nprominent to users. Use this to draw attention to important actions or\nreduce focus on less critical ones"
|
|
244
|
+
},
|
|
245
|
+
"getter": false,
|
|
246
|
+
"setter": false,
|
|
247
|
+
"attribute": "emphasis",
|
|
248
|
+
"reflect": true,
|
|
249
|
+
"defaultValue": "'medium'"
|
|
250
|
+
},
|
|
251
|
+
"heading": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"mutable": false,
|
|
254
|
+
"complexType": {
|
|
255
|
+
"original": "string",
|
|
256
|
+
"resolved": "string",
|
|
257
|
+
"references": {}
|
|
258
|
+
},
|
|
259
|
+
"required": false,
|
|
260
|
+
"optional": false,
|
|
261
|
+
"docs": {
|
|
262
|
+
"tags": [],
|
|
263
|
+
"text": "Short and concise text for the notification title."
|
|
264
|
+
},
|
|
265
|
+
"getter": false,
|
|
266
|
+
"setter": false,
|
|
267
|
+
"attribute": "heading",
|
|
268
|
+
"reflect": true
|
|
269
|
+
},
|
|
270
|
+
"message": {
|
|
271
|
+
"type": "string",
|
|
272
|
+
"mutable": false,
|
|
273
|
+
"complexType": {
|
|
274
|
+
"original": "string",
|
|
275
|
+
"resolved": "string",
|
|
276
|
+
"references": {}
|
|
277
|
+
},
|
|
278
|
+
"required": false,
|
|
279
|
+
"optional": false,
|
|
280
|
+
"docs": {
|
|
281
|
+
"tags": [],
|
|
282
|
+
"text": "Main content for the notification. For more complex content, use the\ncontent slot instead."
|
|
283
|
+
},
|
|
284
|
+
"getter": false,
|
|
285
|
+
"setter": false,
|
|
286
|
+
"attribute": "message",
|
|
287
|
+
"reflect": true
|
|
288
|
+
},
|
|
289
|
+
"icon": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"mutable": false,
|
|
292
|
+
"complexType": {
|
|
293
|
+
"original": "string",
|
|
294
|
+
"resolved": "string",
|
|
295
|
+
"references": {}
|
|
296
|
+
},
|
|
297
|
+
"required": false,
|
|
298
|
+
"optional": false,
|
|
299
|
+
"docs": {
|
|
300
|
+
"tags": [],
|
|
301
|
+
"text": "Icon associated with the notification, defaults vary based on the feedback\ntype."
|
|
302
|
+
},
|
|
303
|
+
"getter": false,
|
|
304
|
+
"setter": false,
|
|
305
|
+
"attribute": "icon",
|
|
306
|
+
"reflect": true
|
|
307
|
+
},
|
|
308
|
+
"dismissible": {
|
|
309
|
+
"type": "boolean",
|
|
310
|
+
"mutable": false,
|
|
311
|
+
"complexType": {
|
|
312
|
+
"original": "boolean",
|
|
313
|
+
"resolved": "boolean",
|
|
314
|
+
"references": {}
|
|
315
|
+
},
|
|
316
|
+
"required": false,
|
|
317
|
+
"optional": false,
|
|
318
|
+
"docs": {
|
|
319
|
+
"tags": [],
|
|
320
|
+
"text": "Allows the notification to be dismissed via a close button (x). The\nnotification is not dismissible unless explicitly enabled."
|
|
321
|
+
},
|
|
322
|
+
"getter": false,
|
|
323
|
+
"setter": false,
|
|
324
|
+
"attribute": "dismissible",
|
|
325
|
+
"reflect": true,
|
|
326
|
+
"defaultValue": "false"
|
|
327
|
+
},
|
|
328
|
+
"hidden": {
|
|
329
|
+
"type": "boolean",
|
|
330
|
+
"mutable": true,
|
|
331
|
+
"complexType": {
|
|
332
|
+
"original": "boolean",
|
|
333
|
+
"resolved": "boolean",
|
|
334
|
+
"references": {}
|
|
335
|
+
},
|
|
336
|
+
"required": false,
|
|
337
|
+
"optional": false,
|
|
338
|
+
"docs": {
|
|
339
|
+
"tags": [],
|
|
340
|
+
"text": "Controls the visibility of the notification."
|
|
341
|
+
},
|
|
342
|
+
"getter": false,
|
|
343
|
+
"setter": false,
|
|
344
|
+
"attribute": "hidden",
|
|
345
|
+
"reflect": true,
|
|
346
|
+
"defaultValue": "false"
|
|
347
|
+
},
|
|
348
|
+
"initiallyHidden": {
|
|
349
|
+
"type": "boolean",
|
|
350
|
+
"mutable": false,
|
|
351
|
+
"complexType": {
|
|
352
|
+
"original": "boolean",
|
|
353
|
+
"resolved": "boolean",
|
|
354
|
+
"references": {}
|
|
355
|
+
},
|
|
356
|
+
"required": false,
|
|
357
|
+
"optional": false,
|
|
358
|
+
"docs": {
|
|
359
|
+
"tags": [],
|
|
360
|
+
"text": "When true, the notification will be hidden initially, but internal changes\nwill not be in a controlled state. Good for animating the notification in."
|
|
361
|
+
},
|
|
362
|
+
"getter": false,
|
|
363
|
+
"setter": false,
|
|
364
|
+
"attribute": "initially-hidden",
|
|
365
|
+
"reflect": true,
|
|
366
|
+
"defaultValue": "false"
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
static get events() {
|
|
371
|
+
return [{
|
|
372
|
+
"method": "hiddenChanged",
|
|
373
|
+
"name": "hiddenChanged",
|
|
374
|
+
"bubbles": true,
|
|
375
|
+
"cancelable": true,
|
|
376
|
+
"composed": true,
|
|
377
|
+
"docs": {
|
|
378
|
+
"tags": [{
|
|
379
|
+
"name": "bind",
|
|
380
|
+
"text": "hidden"
|
|
381
|
+
}],
|
|
382
|
+
"text": "Emits when the 'hidden' prop changes, reflecting a change in visibility.\nPasses hidden value to the detail."
|
|
383
|
+
},
|
|
384
|
+
"complexType": {
|
|
385
|
+
"original": "boolean",
|
|
386
|
+
"resolved": "boolean",
|
|
387
|
+
"references": {}
|
|
388
|
+
}
|
|
389
|
+
}];
|
|
390
|
+
}
|
|
391
|
+
static get methods() {
|
|
392
|
+
return {
|
|
393
|
+
"dismiss": {
|
|
394
|
+
"complexType": {
|
|
395
|
+
"signature": "() => Promise<void>",
|
|
396
|
+
"parameters": [],
|
|
397
|
+
"references": {
|
|
398
|
+
"Promise": {
|
|
399
|
+
"location": "global",
|
|
400
|
+
"id": "global::Promise"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"return": "Promise<void>"
|
|
404
|
+
},
|
|
405
|
+
"docs": {
|
|
406
|
+
"text": "Dismisses the notification with an animation, after the animation is\ncomplete, the hiddenChanged event will be emitted with the value of true,\nand the hidden prop will be set to true.",
|
|
407
|
+
"tags": []
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"show": {
|
|
411
|
+
"complexType": {
|
|
412
|
+
"signature": "() => Promise<void>",
|
|
413
|
+
"parameters": [],
|
|
414
|
+
"references": {
|
|
415
|
+
"Promise": {
|
|
416
|
+
"location": "global",
|
|
417
|
+
"id": "global::Promise"
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"return": "Promise<void>"
|
|
421
|
+
},
|
|
422
|
+
"docs": {
|
|
423
|
+
"text": "Sets the hidden prop to false, and shows the notification with an\nanimation, after the animation is complete, the hiddenChanged event will be\nemitted with the value of false.",
|
|
424
|
+
"tags": []
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
static get elementRef() { return "el"; }
|
|
430
|
+
}
|
|
431
|
+
//# sourceMappingURL=nv-notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nv-notification.js","sourceRoot":"","sources":["../../../src/components/nv-notification/nv-notification.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,GAEN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EACL,cAAc,EAEd,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,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IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Method,\n Element,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport {\n FeedbackColors,\n NotificationEmphasis,\n NotificationPosition,\n} 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 /**\n * When true, the notification will be hidden initially, but internal changes\n * will not be in a controlled state. Good for animating the notification in.\n */\n @Prop({ reflect: true })\n readonly initiallyHidden: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Dismisses the notification with an animation, after the animation is\n * complete, the hiddenChanged event will be emitted with the value of true,\n * and the hidden prop will be set to true.\n */\n @Method()\n async dismiss() {\n await this.dismissAnimation();\n }\n\n /**\n * Sets the hidden prop to false, and shows the notification with an\n * animation, after the animation is complete, the hiddenChanged event will be\n * emitted with the value of false.\n */\n @Method()\n async show() {\n await this.showAnimation();\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 showAnimation() {\n this.hidden = false;\n\n const { setFadeIn } = useFade(this.container);\n const { expand } = useCollapse(this.el, {\n duration: 300,\n overflow: 'visible',\n });\n const { slideY, setSlideY } = useSlide(this.container, {\n duration: 300,\n });\n\n setSlideY(-100);\n setFadeIn();\n await parallel(slideY({ from: -100, to: 0 }), expand).start();\n\n this.hiddenChanged.emit(false);\n }\n\n private getSlideDestination(pos?: NotificationPosition): {\n /** The axis to slide. */\n axis: 'x' | 'y';\n /** The destination value. */\n to: number;\n } {\n switch (pos) {\n case NotificationPosition.TopRight:\n case NotificationPosition.BottomRight:\n return { axis: 'x', to: 100 }; // right\n case NotificationPosition.TopLeft:\n case NotificationPosition.BottomLeft:\n return { axis: 'x', to: -100 }; // left\n case NotificationPosition.TopCenter:\n return { axis: 'y', to: -100 }; // up\n case NotificationPosition.BottomCenter:\n return { axis: 'y', to: 100 }; // down\n default:\n return { axis: 'x', to: 100 }; // fallback\n }\n }\n\n private async dismissAnimation() {\n const position = this.el\n .closest('nv-notificationcontainer')\n ?.getAttribute('position') as NotificationPosition | undefined;\n\n const destination = this.getSlideDestination(position);\n\n const { fadeOut } = useFade(this.container, { duration: 300 });\n const { slideX, slideY, setSlideReset } = useSlide(this.container, {\n duration: 500,\n });\n const { collapse } = useCollapse(this.el, {\n duration: 500,\n overflow: 'visible',\n });\n const slide =\n destination.axis === 'x'\n ? slideX({ from: 0, to: destination.to })\n : slideY({ from: 0, to: destination.to });\n\n setSlideReset();\n await parallel(fadeOut, slide, collapse).start();\n\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 if (this.initiallyHidden) this.hidden = true;\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 data-scope=\"icon\"\n ></nv-icon>\n\n <div data-scope=\"content\">\n {(this.heading || this.headingSlot) && (\n <p id={this.getHeadingId()} data-scope=\"heading\">\n <slot name=\"heading\">{this.heading}</slot>\n </p>\n )}\n {(this.message || this.messageSlot) && (\n <p id={this.getMessageId()} data-scope=\"message\">\n <slot name=\"content\">{this.message}</slot>\n </p>\n )}\n\n {this.actionsSlot && (\n <div data-scope=\"actions\">\n <slot name=\"actions\"></slot>\n </div>\n )}\n </div>\n </div>\n </Host>\n );\n }\n // #endregion RENDER\n}\n"]}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/* Colors */
|
|
2
|
+
/* Maps for feedback-related variables */
|
|
3
|
+
/* Spacing and Sizing */
|
|
4
|
+
nv-notification {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
nv-notification [data-scope=container] {
|
|
8
|
+
display: flex;
|
|
9
|
+
position: relative;
|
|
10
|
+
max-width: 512px;
|
|
11
|
+
width: 100%;
|
|
12
|
+
padding: var(--notification-padding);
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
gap: var(--notification-gap-x);
|
|
15
|
+
border-radius: var(--notification-radius);
|
|
16
|
+
border-style: solid;
|
|
17
|
+
/* shadow/lg */
|
|
18
|
+
box-shadow: 0 var(--shadow-y-axis-lg-1, 4px) var(--shadow-blur-lg-1, 6px) var(--shadow-spread-lg-1, -2px) var(--shadow-color-opacity-1, rgba(14, 14, 14, 0.06)), 0 var(--shadow-y-axis-lg-2, 10px) var(--shadow-blur-lg-2, 15px) var(--shadow-spread-lg-2, -3px) var(--shadow-color-opacity-2, rgba(14, 14, 14, 0.1));
|
|
19
|
+
}
|
|
20
|
+
nv-notification [data-scope=container] [data-scope=icon] {
|
|
21
|
+
flex-shrink: 0;
|
|
22
|
+
}
|
|
23
|
+
nv-notification [data-scope=container] [data-scope=dismiss] {
|
|
24
|
+
padding: var(--button-sm-icon-button-padding, 8px);
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: var(--button-sm-gap, 6px);
|
|
28
|
+
display: flex;
|
|
29
|
+
position: absolute;
|
|
30
|
+
right: 8px;
|
|
31
|
+
top: 8px;
|
|
32
|
+
border-radius: var(--button-sm-border-radius, 4px);
|
|
33
|
+
background: var(--components-button-lower-background, rgba(255, 255, 255, 0));
|
|
34
|
+
color: var(--components-button-lower-icon);
|
|
35
|
+
}
|
|
36
|
+
nv-notification [data-scope=container] [data-scope=content] {
|
|
37
|
+
display: flex;
|
|
38
|
+
padding-right: var(--notification-padding-right);
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: flex-start;
|
|
41
|
+
gap: var(--notification-gap-y);
|
|
42
|
+
flex: 1 0 0;
|
|
43
|
+
}
|
|
44
|
+
nv-notification [data-scope=container] [data-scope=content] [data-scope=heading] {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: flex-start;
|
|
47
|
+
gap: var(--notification-gap-x);
|
|
48
|
+
align-self: stretch;
|
|
49
|
+
color: var(--components-notification-content-title);
|
|
50
|
+
font-size: var(--notification-title-font-size);
|
|
51
|
+
font-style: normal;
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
line-height: 20px; /* 142.857% */
|
|
54
|
+
}
|
|
55
|
+
nv-notification [data-scope=container] [data-scope=content] [data-scope=message] {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
align-items: flex-start;
|
|
59
|
+
gap: var(--notification-gap-y);
|
|
60
|
+
align-self: stretch;
|
|
61
|
+
color: var(--components-notification-content-description);
|
|
62
|
+
font-variant-numeric: lining-nums tabular-nums slashed-zero;
|
|
63
|
+
font-size: var(--font-size-sm, 14px);
|
|
64
|
+
font-style: normal;
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
line-height: var(--line-height-sm, 20px);
|
|
67
|
+
}
|
|
68
|
+
nv-notification [data-scope=container] [data-scope=content] [data-scope=actions] {
|
|
69
|
+
display: flex;
|
|
70
|
+
padding: var(--spacing-2, 8px) 0;
|
|
71
|
+
padding-bottom: 0px;
|
|
72
|
+
align-items: flex-start;
|
|
73
|
+
gap: var(--notification-gap-x);
|
|
74
|
+
align-self: stretch;
|
|
75
|
+
margin-left: calc(-1 * var(--button-sm-padding-x));
|
|
76
|
+
}
|
|
77
|
+
nv-notification[feedback=information] [data-scope=container] {
|
|
78
|
+
background-color: var(--components-notification-information-background);
|
|
79
|
+
border-color: var(--components-notification-information-border);
|
|
80
|
+
}
|
|
81
|
+
nv-notification[feedback=information] [data-scope=container] [data-scope=icon] {
|
|
82
|
+
color: var(--components-notification-information-icon);
|
|
83
|
+
}
|
|
84
|
+
nv-notification[feedback=information] > [data-scope=close]:focus, nv-notification[feedback=information] > [data-scope=close]:focus-within {
|
|
85
|
+
outline: none;
|
|
86
|
+
}
|
|
87
|
+
nv-notification[feedback=information] > [data-scope=close]:focus-visible, nv-notification[feedback=information] > [data-scope=close]:has(:focus-visible) {
|
|
88
|
+
outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-information-border);
|
|
89
|
+
outline-offset: calc(var(--focus-outline-offset) * 1);
|
|
90
|
+
}
|
|
91
|
+
nv-notification[feedback=warning] [data-scope=container] {
|
|
92
|
+
background-color: var(--components-notification-warning-background);
|
|
93
|
+
border-color: var(--components-notification-warning-border);
|
|
94
|
+
}
|
|
95
|
+
nv-notification[feedback=warning] [data-scope=container] [data-scope=icon] {
|
|
96
|
+
color: var(--components-notification-warning-icon);
|
|
97
|
+
}
|
|
98
|
+
nv-notification[feedback=warning] > [data-scope=close]:focus, nv-notification[feedback=warning] > [data-scope=close]:focus-within {
|
|
99
|
+
outline: none;
|
|
100
|
+
}
|
|
101
|
+
nv-notification[feedback=warning] > [data-scope=close]:focus-visible, nv-notification[feedback=warning] > [data-scope=close]:has(:focus-visible) {
|
|
102
|
+
outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-warning-border);
|
|
103
|
+
outline-offset: calc(var(--focus-outline-offset) * 1);
|
|
104
|
+
}
|
|
105
|
+
nv-notification[feedback=error] [data-scope=container] {
|
|
106
|
+
background-color: var(--components-notification-error-background);
|
|
107
|
+
border-color: var(--components-notification-error-border);
|
|
108
|
+
}
|
|
109
|
+
nv-notification[feedback=error] [data-scope=container] [data-scope=icon] {
|
|
110
|
+
color: var(--components-notification-error-icon);
|
|
111
|
+
}
|
|
112
|
+
nv-notification[feedback=error] > [data-scope=close]:focus, nv-notification[feedback=error] > [data-scope=close]:focus-within {
|
|
113
|
+
outline: none;
|
|
114
|
+
}
|
|
115
|
+
nv-notification[feedback=error] > [data-scope=close]:focus-visible, nv-notification[feedback=error] > [data-scope=close]:has(:focus-visible) {
|
|
116
|
+
outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-error-border);
|
|
117
|
+
outline-offset: calc(var(--focus-outline-offset) * 1);
|
|
118
|
+
}
|
|
119
|
+
nv-notification[feedback=success] [data-scope=container] {
|
|
120
|
+
background-color: var(--components-notification-success-background);
|
|
121
|
+
border-color: var(--components-notification-success-border);
|
|
122
|
+
}
|
|
123
|
+
nv-notification[feedback=success] [data-scope=container] [data-scope=icon] {
|
|
124
|
+
color: var(--components-notification-success-icon);
|
|
125
|
+
}
|
|
126
|
+
nv-notification[feedback=success] > [data-scope=close]:focus, nv-notification[feedback=success] > [data-scope=close]:focus-within {
|
|
127
|
+
outline: none;
|
|
128
|
+
}
|
|
129
|
+
nv-notification[feedback=success] > [data-scope=close]:focus-visible, nv-notification[feedback=success] > [data-scope=close]:has(:focus-visible) {
|
|
130
|
+
outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-success-border);
|
|
131
|
+
outline-offset: calc(var(--focus-outline-offset) * 1);
|
|
132
|
+
}
|
|
133
|
+
nv-notification[feedback=neutral] [data-scope=container] {
|
|
134
|
+
background-color: var(--components-notification-neutral-background);
|
|
135
|
+
border-color: var(--components-notification-neutral-border);
|
|
136
|
+
}
|
|
137
|
+
nv-notification[feedback=neutral] [data-scope=container] [data-scope=icon] {
|
|
138
|
+
color: var(--components-notification-neutral-icon);
|
|
139
|
+
}
|
|
140
|
+
nv-notification[feedback=neutral] > [data-scope=close]:focus, nv-notification[feedback=neutral] > [data-scope=close]:focus-within {
|
|
141
|
+
outline: none;
|
|
142
|
+
}
|
|
143
|
+
nv-notification[feedback=neutral] > [data-scope=close]:focus-visible, nv-notification[feedback=neutral] > [data-scope=close]:has(:focus-visible) {
|
|
144
|
+
outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-neutral-border);
|
|
145
|
+
outline-offset: calc(var(--focus-outline-offset) * 1);
|
|
146
|
+
}
|
|
147
|
+
nv-notification[emphasis=high] [data-scope=container] {
|
|
148
|
+
border-width: 1px;
|
|
149
|
+
border-left-width: var(--notification-border-width-high-emphasis);
|
|
150
|
+
padding-left: calc(var(--notification-padding) - var(--notification-border-width-high-emphasis) + 1px);
|
|
151
|
+
}
|
|
152
|
+
nv-notification[emphasis=medium] [data-scope=container] {
|
|
153
|
+
border-width: var(--notification-border-width-low-emphasis);
|
|
154
|
+
border-color: var(--color-content-low-border, #E3E3E3);
|
|
155
|
+
}
|