@nova-design-system/nova-webcomponents 3.0.0-beta.35 → 3.0.0-beta.37
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/blazor-docs.json +6242 -4908
- package/dist/cjs/{app-globals-6b0931bc.js → app-globals-bd4d701e.js} +2 -2
- package/dist/cjs/{app-globals-6b0931bc.js.map → app-globals-bd4d701e.js.map} +1 -1
- package/dist/cjs/{constants-9525a915.js → constants-69b40456.js} +15 -8
- package/dist/cjs/constants-69b40456.js.map +1 -0
- package/dist/cjs/events.utils-52846a7d.js +32 -0
- package/dist/cjs/events.utils-52846a7d.js.map +1 -0
- package/dist/cjs/{grow.animation-46e7ae4b.js → grow.animation-a1f0bc22.js} +1 -29
- package/dist/cjs/grow.animation-a1f0bc22.js.map +1 -0
- package/dist/cjs/{index-ddc37f87.js → index-5910ba06.js} +75 -18
- package/dist/{native/p-9b093b92.js.map → cjs/index-5910ba06.js.map} +1 -1
- package/dist/cjs/index.cjs.js +6 -3
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/native.cjs.js +3 -3
- package/dist/cjs/nv-alert.cjs.entry.js +3 -3
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +2 -2
- package/dist/cjs/nv-badge_2.cjs.entry.js +3 -3
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-base.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +4 -3
- package/dist/cjs/nv-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +3 -3
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +24 -4
- package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagrid.cjs.entry.js +3 -3
- package/dist/cjs/nv-datagridbody.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagriddatacell.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagridhead.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagridrow.cjs.entry.js +2 -2
- package/dist/cjs/nv-dialog.cjs.entry.js +758 -0
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +132 -0
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +34 -25
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +52 -15
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +6 -3
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +12 -12
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldradio.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +49 -18
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +8 -5
- package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +13 -13
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +994 -0
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-icon.cjs.entry.js +3 -3
- package/dist/cjs/nv-iconbutton.cjs.entry.js +125 -0
- package/dist/cjs/nv-iconbutton.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-loader.cjs.entry.js +35 -0
- package/dist/cjs/nv-loader.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-menu.cjs.entry.js +66 -7
- package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-popover.cjs.entry.js +11 -22
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +2 -2
- package/dist/cjs/nv-stack.cjs.entry.js +2 -2
- package/dist/cjs/nv-table.cjs.entry.js +3 -3
- package/dist/cjs/nv-tablebody.cjs.entry.js +2 -2
- package/dist/cjs/nv-tablecolumn.cjs.entry.js +2 -2
- package/dist/cjs/nv-tabledatacell.cjs.entry.js +2 -2
- package/dist/cjs/nv-tablehead.cjs.entry.js +2 -2
- package/dist/cjs/nv-tablerow.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +82 -0
- package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/string.utils-9c581350.js +25 -0
- package/dist/cjs/string.utils-9c581350.js.map +1 -0
- package/dist/collection/collection-manifest.json +5 -1
- package/dist/collection/components/nv-alert/nv-alert.css +5 -5
- package/dist/collection/components/nv-badge/nv-badge.css +10 -10
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.css +57 -4
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +2 -2
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js.map +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.css +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js +4 -14
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js.map +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
- package/dist/collection/components/nv-button/nv-button.docs.js +6 -1
- package/dist/collection/components/nv-button/nv-button.docs.js.map +1 -1
- package/dist/collection/components/nv-button/nv-button.js +56 -1
- package/dist/collection/components/nv-button/nv-button.js.map +1 -1
- package/dist/collection/components/nv-button/styles/nv-button.css +50 -10
- package/dist/collection/components/nv-col/nv-col.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +1 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +2 -2
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.js +1 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.js +1 -1
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.js +1 -1
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.js +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.css +43 -0
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +79 -0
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -0
- package/dist/collection/components/nv-dialog/nv-dialog.js +510 -0
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -0
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.css +8 -0
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.docs.js +6 -0
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.docs.js.map +1 -0
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +267 -0
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js.map +1 -0
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.css +25 -0
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.docs.js +6 -0
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.docs.js.map +1 -0
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +87 -0
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js.map +1 -0
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +45 -30
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +28 -0
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +87 -22
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +7 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +15 -6
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +15 -14
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +13 -13
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +1 -0
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.css +1 -1
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +6 -6
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +30 -0
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +72 -19
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +10 -7
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +14 -14
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.css +261 -0
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +110 -0
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -0
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +1366 -0
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -0
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +4 -4
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.docs.js +61 -0
- package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +92 -6
- package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- package/dist/collection/components/nv-popover/nv-popover.docs.js +9 -9
- package/dist/collection/components/nv-popover/nv-popover.docs.js.map +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +2 -14
- package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.docs.js +1 -0
- package/dist/collection/components/nv-table/nv-table.docs.js.map +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-tablebody/nv-tablebody.js +1 -1
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js +1 -1
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.js +1 -1
- package/dist/collection/components/nv-tablehead/nv-tablehead.js +1 -1
- package/dist/collection/components/nv-tablerow/nv-tablerow.js +1 -1
- package/dist/collection/components/{nv-fieldtoggle/nv-fieldtoggle.css → nv-toggle/nv-toggle.css} +22 -22
- package/dist/collection/components/{nv-fieldtoggle/nv-fieldtoggle.docs.js → nv-toggle/nv-toggle.docs.js} +14 -14
- package/dist/collection/components/nv-toggle/nv-toggle.docs.js.map +1 -0
- package/dist/collection/components/{nv-fieldtoggle/nv-fieldtoggle.js → nv-toggle/nv-toggle.js} +11 -10
- package/dist/collection/components/nv-toggle/nv-toggle.js.map +1 -0
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/dev/dev-components.js +1 -1
- package/dist/collection/dev/dev-components.js.map +1 -1
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/templates/navigation.docs.js +12 -2
- package/dist/collection/templates/navigation.docs.js.map +1 -1
- package/dist/collection/utils/constants.js +11 -5
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/string.utils.js +14 -0
- package/dist/collection/utils/string.utils.js.map +1 -0
- package/dist/components/index.js +5 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-alert.js +4 -4
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +3 -3
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-base.js +1 -1
- package/dist/components/nv-breadcrumb.js +7 -12
- package/dist/components/nv-breadcrumb.js.map +1 -1
- package/dist/components/nv-breadcrumbs.js +3 -3
- package/dist/components/nv-breadcrumbs.js.map +1 -1
- package/dist/components/nv-button.js +1 -141
- package/dist/components/nv-button.js.map +1 -1
- package/dist/components/nv-col.js +2 -2
- package/dist/components/nv-datagrid.js +3 -3
- package/dist/components/nv-datagridbody.js +2 -2
- package/dist/components/nv-datagridcolumn.js +2 -2
- package/dist/components/nv-datagriddatacell.js +2 -2
- package/dist/components/nv-datagridhead.js +2 -2
- package/dist/components/nv-datagridrow.js +2 -2
- package/dist/components/{nv-fieldtoggle.d.ts → nv-dialog.d.ts} +4 -4
- package/dist/components/nv-dialog.js +816 -0
- package/dist/components/nv-dialog.js.map +1 -0
- package/dist/components/nv-dialogfooter.d.ts +11 -0
- package/dist/components/nv-dialogfooter.js +8 -0
- package/dist/components/nv-dialogfooter.js.map +1 -0
- package/dist/components/nv-dialogheader.d.ts +11 -0
- package/dist/components/nv-dialogheader.js +8 -0
- package/dist/components/nv-dialogheader.js.map +1 -0
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddropdown.js +61 -21
- package/dist/components/nv-fielddropdown.js.map +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +14 -11
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +13 -13
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +7 -7
- package/dist/components/nv-fieldradio.js +5 -5
- package/dist/components/nv-fieldradio.js.map +1 -1
- package/dist/components/nv-fieldselect.js +55 -21
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldtext.js +9 -6
- package/dist/components/nv-fieldtext.js.map +1 -1
- package/dist/components/nv-fieldtextarea.js +13 -13
- package/dist/components/nv-fieldtextarea.js.map +1 -1
- package/dist/components/nv-fieldtime.d.ts +11 -0
- package/dist/components/nv-fieldtime.js +1054 -0
- package/dist/components/nv-fieldtime.js.map +1 -0
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +90 -10
- package/dist/components/nv-menu.js.map +1 -1
- package/dist/components/nv-menuitem.js +1 -80
- package/dist/components/nv-menuitem.js.map +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +2 -2
- package/dist/components/nv-stack.js +2 -2
- package/dist/components/nv-table.js +3 -3
- package/dist/components/nv-tablebody.js +2 -2
- package/dist/components/nv-tablecolumn.js +2 -2
- package/dist/components/nv-tabledatacell.js +2 -2
- package/dist/components/nv-tablehead.js +2 -2
- package/dist/components/nv-tablerow.js +2 -2
- package/dist/components/nv-toggle.d.ts +11 -0
- package/dist/components/nv-toggle.js +109 -0
- package/dist/components/nv-toggle.js.map +1 -0
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-7a19fef7.js → p-11fcdad9.js} +4 -4
- package/dist/components/{p-7a19fef7.js.map → p-11fcdad9.js.map} +1 -1
- package/dist/components/{p-7c0db67e.js → p-16badb3b.js} +4 -4
- package/dist/components/{p-7c0db67e.js.map → p-16badb3b.js.map} +1 -1
- package/dist/components/{p-3a65a05e.js → p-17714233.js} +40 -28
- package/dist/components/p-17714233.js.map +1 -0
- package/dist/components/{p-0b30dd1b.js → p-18d221e3.js} +3 -3
- package/dist/components/{p-0b30dd1b.js.map → p-18d221e3.js.map} +1 -1
- package/dist/components/p-2768d2c0.js +57 -0
- package/dist/components/p-2768d2c0.js.map +1 -0
- package/dist/components/p-2baea6ba.js +84 -0
- package/dist/components/p-2baea6ba.js.map +1 -0
- package/dist/components/{p-63afc71f.js → p-3859dc5c.js} +4 -4
- package/dist/components/{p-63afc71f.js.map → p-3859dc5c.js.map} +1 -1
- package/dist/components/{p-2abfadb8.js → p-4938572a.js} +4 -4
- package/dist/components/{p-2abfadb8.js.map → p-4938572a.js.map} +1 -1
- package/dist/components/{p-74407727.js → p-56f71851.js} +16 -9
- package/dist/components/p-56f71851.js.map +1 -0
- package/dist/components/{p-3b209e94.js → p-77d0fedc.js} +43 -3
- package/dist/components/p-77d0fedc.js.map +1 -0
- package/dist/components/p-91bf0cb6.js +166 -0
- package/dist/components/p-91bf0cb6.js.map +1 -0
- package/dist/components/{p-afa1c98e.js → p-98ff0e5f.js} +37 -28
- package/dist/components/p-98ff0e5f.js.map +1 -0
- package/dist/components/{p-5b98036c.js → p-a01bdf02.js} +4 -4
- package/dist/components/{p-5b98036c.js.map → p-a01bdf02.js.map} +1 -1
- package/dist/components/p-a5c8eee9.js +22 -0
- package/dist/components/p-a5c8eee9.js.map +1 -0
- package/dist/components/{p-78e7c594.js → p-a9a52105.js} +6 -17
- package/dist/components/p-a9a52105.js.map +1 -0
- package/dist/components/p-d429a343.js +28 -0
- package/dist/components/p-d429a343.js.map +1 -0
- package/dist/components/p-de8411ee.js +128 -0
- package/dist/components/p-de8411ee.js.map +1 -0
- package/dist/components/{p-d3b1c116.js → p-e431a0ad.js} +6 -6
- package/dist/components/{p-d3b1c116.js.map → p-e431a0ad.js.map} +1 -1
- package/dist/docs.json +2211 -911
- package/dist/esm/{app-globals-246d6b7c.js → app-globals-0a94217b.js} +2 -2
- package/dist/esm/{app-globals-246d6b7c.js.map → app-globals-0a94217b.js.map} +1 -1
- package/dist/esm/{constants-7b642e1d.js → constants-0181211f.js} +16 -9
- package/dist/esm/constants-0181211f.js.map +1 -0
- package/dist/esm/events.utils-fe1d907f.js +28 -0
- package/dist/esm/events.utils-fe1d907f.js.map +1 -0
- package/dist/esm/{grow.animation-88a8ee8f.js → grow.animation-cac164da.js} +2 -27
- package/dist/esm/grow.animation-cac164da.js.map +1 -0
- package/dist/esm/{index-cd557d0a.js → index-fac2d5d2.js} +75 -19
- package/dist/esm/index-fac2d5d2.js.map +1 -0
- package/dist/esm/index.js +4 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/native.js +4 -4
- package/dist/esm/nv-alert.entry.js +3 -3
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +2 -2
- package/dist/esm/nv-badge_2.entry.js +3 -3
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-base.entry.js +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +4 -3
- package/dist/esm/nv-breadcrumb.entry.js.map +1 -1
- package/dist/esm/nv-breadcrumbs.entry.js +3 -3
- package/dist/esm/nv-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/nv-button.entry.js +24 -4
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-col.entry.js +2 -2
- package/dist/esm/nv-datagrid.entry.js +3 -3
- package/dist/esm/nv-datagridbody.entry.js +2 -2
- package/dist/esm/nv-datagridcolumn.entry.js +2 -2
- package/dist/esm/nv-datagriddatacell.entry.js +2 -2
- package/dist/esm/nv-datagridhead.entry.js +2 -2
- package/dist/esm/nv-datagridrow.entry.js +2 -2
- package/dist/esm/nv-dialog.entry.js +754 -0
- package/dist/esm/nv-dialog.entry.js.map +1 -0
- package/dist/esm/nv-dialogfooter_2.entry.js +127 -0
- package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -0
- package/dist/esm/nv-fieldcheckbox.entry.js +34 -25
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +52 -15
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +2 -2
- package/dist/esm/nv-fieldmultiselect.entry.js +6 -3
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +12 -12
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +4 -4
- package/dist/esm/nv-fieldradio.entry.js +5 -5
- package/dist/esm/nv-fieldradio.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +49 -18
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +8 -5
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +13 -13
- package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +990 -0
- package/dist/esm/nv-fieldtime.entry.js.map +1 -0
- package/dist/esm/nv-icon.entry.js +3 -3
- package/dist/esm/nv-iconbutton.entry.js +121 -0
- package/dist/esm/nv-iconbutton.entry.js.map +1 -0
- package/dist/esm/nv-loader.entry.js +31 -0
- package/dist/esm/nv-loader.entry.js.map +1 -0
- package/dist/esm/nv-menu.entry.js +66 -7
- package/dist/esm/nv-menu.entry.js.map +1 -1
- package/dist/esm/nv-menuitem.entry.js +2 -2
- package/dist/esm/nv-popover.entry.js +5 -16
- package/dist/esm/nv-popover.entry.js.map +1 -1
- package/dist/esm/nv-row.entry.js +2 -2
- package/dist/esm/nv-stack.entry.js +2 -2
- package/dist/esm/nv-table.entry.js +3 -3
- package/dist/esm/nv-tablebody.entry.js +2 -2
- package/dist/esm/nv-tablecolumn.entry.js +2 -2
- package/dist/esm/nv-tabledatacell.entry.js +2 -2
- package/dist/esm/nv-tablehead.entry.js +2 -2
- package/dist/esm/nv-tablerow.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +78 -0
- package/dist/esm/nv-toggle.entry.js.map +1 -0
- package/dist/esm/nv-tooltip.entry.js +2 -2
- package/dist/esm/string.utils-16aed4a7.js +22 -0
- package/dist/esm/string.utils-16aed4a7.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-02bb8184.entry.js +2 -0
- package/dist/native/p-0bf35abc.entry.js +2 -0
- package/dist/native/p-0bf35abc.entry.js.map +1 -0
- package/dist/native/p-10ba289c.entry.js +2 -0
- package/dist/native/{p-826f1d28.entry.js → p-208accf0.entry.js} +2 -2
- package/dist/native/p-208accf0.entry.js.map +1 -0
- package/dist/native/p-211f7b19.entry.js +2 -0
- package/dist/native/p-211f7b19.entry.js.map +1 -0
- package/dist/native/p-2aebf31b.entry.js +2 -0
- package/dist/native/p-3a8a9371.entry.js +2 -0
- package/dist/native/p-3a8a9371.entry.js.map +1 -0
- package/dist/native/{p-6bb2c88f.entry.js → p-3c004551.entry.js} +2 -2
- package/dist/native/p-3c004551.entry.js.map +1 -0
- package/dist/native/p-46553ffd.entry.js +2 -0
- package/dist/native/p-46553ffd.entry.js.map +1 -0
- package/dist/native/{p-f7db0785.entry.js → p-4d0caf4a.entry.js} +3 -3
- package/dist/native/p-4f11286d.entry.js +2 -0
- package/dist/native/{p-40f4828a.entry.js.map → p-4f11286d.entry.js.map} +1 -1
- package/dist/native/p-51ad8bcd.entry.js +2 -0
- package/dist/native/p-51ad8bcd.entry.js.map +1 -0
- package/dist/native/p-5439afb8.js +3 -0
- package/dist/native/p-5439afb8.js.map +1 -0
- package/dist/native/{p-74407727.js → p-56f71851.js} +2 -2
- package/dist/native/p-56f71851.js.map +1 -0
- package/dist/native/p-5f1a7e6e.entry.js +2 -0
- package/dist/native/p-5f1a7e6e.entry.js.map +1 -0
- package/dist/native/{p-575ea40b.entry.js → p-61d2cb2e.entry.js} +2 -2
- package/dist/native/{p-cd251f91.entry.js → p-6d68f133.entry.js} +2 -2
- package/dist/native/p-724ed8d7.entry.js +7 -0
- package/dist/native/p-724ed8d7.entry.js.map +1 -0
- package/dist/native/{p-e5fbe545.entry.js → p-75b1ea9f.entry.js} +2 -2
- package/dist/native/p-87083363.entry.js +2 -0
- package/dist/native/p-87083363.entry.js.map +1 -0
- package/dist/native/p-892052c2.entry.js +2 -0
- package/dist/native/p-8c1a6aa6.entry.js +2 -0
- package/dist/native/p-8c1a6aa6.entry.js.map +1 -0
- package/dist/native/p-8ee30013.entry.js +2 -0
- package/dist/native/{p-9341cf9d.entry.js.map → p-8ee30013.entry.js.map} +1 -1
- package/dist/native/{p-788712dd.entry.js → p-96902bb3.entry.js} +2 -2
- package/dist/native/p-99e7a452.entry.js +2 -0
- package/dist/native/p-99e7a452.entry.js.map +1 -0
- package/dist/native/p-9ac790b3.entry.js +2 -0
- package/dist/native/{p-18b227b5.entry.js.map → p-9ac790b3.entry.js.map} +1 -1
- package/dist/native/{p-3283505f.entry.js → p-9fb5db20.entry.js} +2 -2
- package/dist/native/p-a5c8eee9.js +2 -0
- package/dist/native/p-a5c8eee9.js.map +1 -0
- package/dist/native/{p-552e7ea4.entry.js → p-a998f8df.entry.js} +2 -2
- package/dist/native/p-aa2834e2.entry.js +2 -0
- package/dist/native/p-ab5a8ce5.entry.js +2 -0
- package/dist/native/p-beab7cbd.entry.js +2 -0
- package/dist/native/p-bfeda21c.entry.js +2 -0
- package/dist/native/p-bfeda21c.entry.js.map +1 -0
- package/dist/native/p-c1765831.js +2 -0
- package/dist/native/p-c1765831.js.map +1 -0
- package/dist/native/{p-7dfb4a60.entry.js → p-c51ee6dc.entry.js} +2 -2
- package/dist/native/p-c51ee6dc.entry.js.map +1 -0
- package/dist/native/{p-2063c768.entry.js → p-d24586ed.entry.js} +2 -2
- package/dist/native/p-d429a343.js +2 -0
- package/dist/native/p-d429a343.js.map +1 -0
- package/dist/native/{p-1e2bd4e3.entry.js → p-d4e56727.entry.js} +2 -2
- package/dist/native/p-d67b7502.entry.js +2 -0
- package/dist/native/p-d67b7502.entry.js.map +1 -0
- package/dist/native/p-d776ed48.entry.js +2 -0
- package/dist/native/p-d776ed48.entry.js.map +1 -0
- package/dist/native/p-dc9dd5a7.entry.js +2 -0
- package/dist/native/p-e192c25c.entry.js +2 -0
- package/dist/native/p-e192c25c.entry.js.map +1 -0
- package/dist/native/p-e3827605.entry.js +2 -0
- package/dist/native/{p-5d0dc7c8.entry.js.map → p-e3827605.entry.js.map} +1 -1
- package/dist/native/p-e5a7596b.entry.js +2 -0
- package/dist/native/p-e6f45df2.entry.js +2 -0
- package/dist/native/p-ed47a702.entry.js +2 -0
- package/dist/native/p-f30ce086.entry.js +2 -0
- package/dist/native/{p-eda8cd9d.entry.js.map → p-f30ce086.entry.js.map} +1 -1
- package/dist/native/p-f3fbdea6.js +2 -0
- package/dist/native/{p-f79752ca.entry.js → p-fd2955dd.entry.js} +2 -2
- package/dist/native/p-fd2955dd.entry.js.map +1 -0
- package/dist/types/components/nv-breadcrumb/nv-breadcrumb.d.ts +0 -1
- package/dist/types/components/nv-button/nv-button.d.ts +8 -0
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +124 -0
- package/dist/types/components/nv-dialog/nv-dialog.docs.d.ts +4 -0
- package/dist/types/components/nv-dialogfooter/nv-dialogfooter.d.ts +63 -0
- package/dist/types/components/nv-dialogfooter/nv-dialogfooter.docs.d.ts +4 -0
- package/dist/types/components/nv-dialogheader/nv-dialogheader.d.ts +20 -0
- package/dist/types/components/nv-dialogheader/nv-dialogheader.docs.d.ts +4 -0
- package/dist/types/components/nv-fieldcheckbox/nv-fieldcheckbox.d.ts +14 -10
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +34 -10
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +6 -2
- package/dist/types/components/nv-fieldnumber/nv-fieldnumber.d.ts +4 -4
- package/dist/types/components/nv-fieldradio/nv-fieldradio.d.ts +2 -2
- package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +20 -6
- package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +5 -4
- package/dist/types/components/nv-fieldtextarea/nv-fieldtextarea.d.ts +3 -3
- package/dist/types/components/nv-fieldtime/nv-fieldtime.d.ts +156 -0
- package/dist/types/components/nv-fieldtime/nv-fieldtime.docs.d.ts +4 -0
- package/dist/types/components/nv-menu/nv-menu.d.ts +20 -0
- package/dist/types/components/{nv-fieldtoggle/nv-fieldtoggle.d.ts → nv-toggle/nv-toggle.d.ts} +4 -4
- package/dist/types/components/nv-toggle/nv-toggle.docs.d.ts +4 -0
- package/dist/types/components.d.ts +519 -98
- package/dist/types/index.d.ts +1 -0
- package/dist/types/nova-docs.d.ts +19 -0
- package/dist/types/utils/constants.d.ts +6 -1
- package/dist/types/utils/string.utils.d.ts +9 -0
- package/dist/vscode-data.json +230 -34
- package/hydrate/index.js +2609 -442
- package/hydrate/index.mjs +2609 -442
- package/package.json +22 -10
- package/dist/cjs/constants-9525a915.js.map +0 -1
- package/dist/cjs/grow.animation-46e7ae4b.js.map +0 -1
- package/dist/cjs/index-ddc37f87.js.map +0 -1
- package/dist/cjs/nv-fieldtoggle.cjs.entry.js +0 -81
- package/dist/cjs/nv-fieldtoggle.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +0 -151
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +0 -1
- package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.docs.js.map +0 -1
- package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.js.map +0 -1
- package/dist/components/nv-fieldtoggle.js +0 -108
- package/dist/components/nv-fieldtoggle.js.map +0 -1
- package/dist/components/p-3a65a05e.js.map +0 -1
- package/dist/components/p-3b209e94.js.map +0 -1
- package/dist/components/p-74407727.js.map +0 -1
- package/dist/components/p-78e7c594.js.map +0 -1
- package/dist/components/p-afa1c98e.js.map +0 -1
- package/dist/esm/constants-7b642e1d.js.map +0 -1
- package/dist/esm/grow.animation-88a8ee8f.js.map +0 -1
- package/dist/esm/index-cd557d0a.js.map +0 -1
- package/dist/esm/nv-fieldtoggle.entry.js +0 -77
- package/dist/esm/nv-fieldtoggle.entry.js.map +0 -1
- package/dist/esm/nv-iconbutton_2.entry.js +0 -146
- package/dist/esm/nv-iconbutton_2.entry.js.map +0 -1
- package/dist/native/p-0a9a738c.entry.js +0 -2
- package/dist/native/p-0a9a738c.entry.js.map +0 -1
- package/dist/native/p-0f9262ed.entry.js +0 -2
- package/dist/native/p-18b227b5.entry.js +0 -2
- package/dist/native/p-225962f2.entry.js +0 -2
- package/dist/native/p-2ac838b8.entry.js +0 -2
- package/dist/native/p-38d3eee3.js +0 -2
- package/dist/native/p-3adf0c45.entry.js +0 -2
- package/dist/native/p-3adf0c45.entry.js.map +0 -1
- package/dist/native/p-40f4828a.entry.js +0 -2
- package/dist/native/p-44cc8b59.entry.js +0 -2
- package/dist/native/p-44cc8b59.entry.js.map +0 -1
- package/dist/native/p-4e056cd8.entry.js +0 -2
- package/dist/native/p-4e056cd8.entry.js.map +0 -1
- package/dist/native/p-4f30312d.entry.js +0 -2
- package/dist/native/p-4f30312d.entry.js.map +0 -1
- package/dist/native/p-4ffd5c51.entry.js +0 -2
- package/dist/native/p-52a7f936.entry.js +0 -2
- package/dist/native/p-5d0dc7c8.entry.js +0 -2
- package/dist/native/p-5e467b49.entry.js +0 -2
- package/dist/native/p-5f160072.entry.js +0 -2
- package/dist/native/p-6bb2c88f.entry.js.map +0 -1
- package/dist/native/p-6ea62d17.entry.js +0 -2
- package/dist/native/p-6ea62d17.entry.js.map +0 -1
- package/dist/native/p-74407727.js.map +0 -1
- package/dist/native/p-7dfb4a60.entry.js.map +0 -1
- package/dist/native/p-826f1d28.entry.js.map +0 -1
- package/dist/native/p-87b93cc2.entry.js +0 -2
- package/dist/native/p-8ae9aaf1.entry.js +0 -2
- package/dist/native/p-8f0984b0.entry.js +0 -2
- package/dist/native/p-8f0984b0.entry.js.map +0 -1
- package/dist/native/p-9341cf9d.entry.js +0 -2
- package/dist/native/p-967f1aee.entry.js +0 -2
- package/dist/native/p-967f1aee.entry.js.map +0 -1
- package/dist/native/p-9b093b92.js +0 -3
- package/dist/native/p-a37c2ac2.js +0 -2
- package/dist/native/p-a37c2ac2.js.map +0 -1
- package/dist/native/p-e8d181e6.entry.js +0 -2
- package/dist/native/p-eade52d4.entry.js +0 -2
- package/dist/native/p-eade52d4.entry.js.map +0 -1
- package/dist/native/p-ed825c80.entry.js +0 -2
- package/dist/native/p-ed825c80.entry.js.map +0 -1
- package/dist/native/p-eda8cd9d.entry.js +0 -2
- package/dist/native/p-f79752ca.entry.js.map +0 -1
- package/dist/native/p-fc8cad13.entry.js +0 -2
- package/dist/types/components/nv-fieldtoggle/nv-fieldtoggle.docs.d.ts +0 -4
- /package/dist/native/{p-e8d181e6.entry.js.map → p-02bb8184.entry.js.map} +0 -0
- /package/dist/native/{p-4ffd5c51.entry.js.map → p-10ba289c.entry.js.map} +0 -0
- /package/dist/native/{p-52a7f936.entry.js.map → p-2aebf31b.entry.js.map} +0 -0
- /package/dist/native/{p-f7db0785.entry.js.map → p-4d0caf4a.entry.js.map} +0 -0
- /package/dist/native/{p-575ea40b.entry.js.map → p-61d2cb2e.entry.js.map} +0 -0
- /package/dist/native/{p-cd251f91.entry.js.map → p-6d68f133.entry.js.map} +0 -0
- /package/dist/native/{p-e5fbe545.entry.js.map → p-75b1ea9f.entry.js.map} +0 -0
- /package/dist/native/{p-fc8cad13.entry.js.map → p-892052c2.entry.js.map} +0 -0
- /package/dist/native/{p-788712dd.entry.js.map → p-96902bb3.entry.js.map} +0 -0
- /package/dist/native/{p-3283505f.entry.js.map → p-9fb5db20.entry.js.map} +0 -0
- /package/dist/native/{p-552e7ea4.entry.js.map → p-a998f8df.entry.js.map} +0 -0
- /package/dist/native/{p-5f160072.entry.js.map → p-aa2834e2.entry.js.map} +0 -0
- /package/dist/native/{p-225962f2.entry.js.map → p-ab5a8ce5.entry.js.map} +0 -0
- /package/dist/native/{p-2ac838b8.entry.js.map → p-beab7cbd.entry.js.map} +0 -0
- /package/dist/native/{p-2063c768.entry.js.map → p-d24586ed.entry.js.map} +0 -0
- /package/dist/native/{p-1e2bd4e3.entry.js.map → p-d4e56727.entry.js.map} +0 -0
- /package/dist/native/{p-5e467b49.entry.js.map → p-dc9dd5a7.entry.js.map} +0 -0
- /package/dist/native/{p-0f9262ed.entry.js.map → p-e5a7596b.entry.js.map} +0 -0
- /package/dist/native/{p-87b93cc2.entry.js.map → p-e6f45df2.entry.js.map} +0 -0
- /package/dist/native/{p-8ae9aaf1.entry.js.map → p-ed47a702.entry.js.map} +0 -0
- /package/dist/native/{p-38d3eee3.js.map → p-f3fbdea6.js.map} +0 -0
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
import { tabbable } from "tabbable";
|
|
3
|
+
import { addEventListeners, removeEventListeners, } from "../../utils/events.utils";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
/**
|
|
6
|
+
* @slot default - Body of the dialog.
|
|
7
|
+
* @slot trigger - Content to be placed as the trigger, will override the trigger prop.
|
|
8
|
+
* @slot header - Content to be placed as the header, will override the header prop.
|
|
9
|
+
* @slot footer - Content to be placed as the footer, will override the footer prop.
|
|
10
|
+
*/
|
|
11
|
+
export class NvDialog {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.eventsAttached = false;
|
|
14
|
+
/**
|
|
15
|
+
* Use this prop to toggle the visibility of the dialog. Set to true to show
|
|
16
|
+
* the dialog and false to hide it.
|
|
17
|
+
*/
|
|
18
|
+
this.open = false;
|
|
19
|
+
/**
|
|
20
|
+
* If true, the dialog cannot be closed by the user.
|
|
21
|
+
*/
|
|
22
|
+
this.undismissable = false;
|
|
23
|
+
/**
|
|
24
|
+
* If true, the dialog will be closed when the backdrop is clicked.
|
|
25
|
+
*/
|
|
26
|
+
this.clickOutside = false;
|
|
27
|
+
/**
|
|
28
|
+
* Controls the dialog's autofocus behavior. When false (default), the dialog will
|
|
29
|
+
* automatically focus the first focusable element. When true, automatic focus is
|
|
30
|
+
* disabled and you must manually set focus on an element for accessibility compliance.
|
|
31
|
+
*/
|
|
32
|
+
this.manualFocus = false;
|
|
33
|
+
/**
|
|
34
|
+
* If true, the dialog visibility is managed manually through methods or the open prop.
|
|
35
|
+
*/
|
|
36
|
+
this.controlled = false;
|
|
37
|
+
/**
|
|
38
|
+
* If true, the dialog takes full width styling.
|
|
39
|
+
*/
|
|
40
|
+
this.full = false;
|
|
41
|
+
/**
|
|
42
|
+
* Handles the close button click.
|
|
43
|
+
*/
|
|
44
|
+
this.handleCloseButton = () => {
|
|
45
|
+
this.hide();
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Handles the cancel button click.
|
|
49
|
+
*/
|
|
50
|
+
this.handleCancelButton = () => {
|
|
51
|
+
this.hide();
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Handles the dialog close event.
|
|
55
|
+
*/
|
|
56
|
+
this.handleDialogClose = () => {
|
|
57
|
+
this.close.emit();
|
|
58
|
+
};
|
|
59
|
+
this.handleClickOutside = (event) => {
|
|
60
|
+
if (event.target === this.dialogElement) {
|
|
61
|
+
this.hide();
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
event.stopPropagation();
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
this.triggerClickEvents = [
|
|
67
|
+
['click', this.show],
|
|
68
|
+
['touchstart', this.show],
|
|
69
|
+
[
|
|
70
|
+
'keydown',
|
|
71
|
+
(e) => {
|
|
72
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
this.show();
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
];
|
|
79
|
+
}
|
|
80
|
+
//#endregion PROPERTIES
|
|
81
|
+
/****************************************************************************/
|
|
82
|
+
//#region METHODS
|
|
83
|
+
/**
|
|
84
|
+
* Call this method to show the dialog, making it visible on the screen.
|
|
85
|
+
*/
|
|
86
|
+
async show() {
|
|
87
|
+
document.body.style.overflow = 'hidden'; // Prevent background scrolling
|
|
88
|
+
this.dialogElement.showModal();
|
|
89
|
+
this.open = true;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Call this method to hide the dialog, making it disappear from view.
|
|
93
|
+
*/
|
|
94
|
+
async hide() {
|
|
95
|
+
document.body.style.overflow = ''; // Restore scrolling
|
|
96
|
+
this.dialogElement.close();
|
|
97
|
+
this.open = false;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Sets the autofocus on the first focusable element in the dialog.
|
|
101
|
+
*/
|
|
102
|
+
setAutofocus() {
|
|
103
|
+
const focusableElements = tabbable(this.dialogElement, {
|
|
104
|
+
displayCheck: 'none',
|
|
105
|
+
});
|
|
106
|
+
if (focusableElements.length > 0) {
|
|
107
|
+
// Convert to array and find element with smallest top and left position
|
|
108
|
+
let topLeftElement = focusableElements[0];
|
|
109
|
+
let topLeftRect = topLeftElement.getBoundingClientRect();
|
|
110
|
+
focusableElements.forEach(element => {
|
|
111
|
+
const rect = element.getBoundingClientRect();
|
|
112
|
+
if (rect.top < topLeftRect.top || rect.left < topLeftRect.left) {
|
|
113
|
+
topLeftElement = element;
|
|
114
|
+
topLeftRect = rect;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
// Set autofocus attribute on the found element
|
|
118
|
+
topLeftElement.setAttribute('autofocus', 'true');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Attaches event listeners to the dialog.
|
|
123
|
+
*/
|
|
124
|
+
attachEventListeners() {
|
|
125
|
+
if (this.triggerElement && !this.eventsAttached && !this.controlled) {
|
|
126
|
+
addEventListeners(this.triggerClickEvents, this.triggerElement, this);
|
|
127
|
+
this.eventsAttached = true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.
|
|
132
|
+
|
|
133
|
+
* @param {KeyboardEvent} event - The keydown event.
|
|
134
|
+
*/
|
|
135
|
+
handleKeyDown(event) {
|
|
136
|
+
if (event.key === 'Escape' && this.undismissable) {
|
|
137
|
+
event.preventDefault();
|
|
138
|
+
event.stopPropagation();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Handles the click event to close the dialog when clickOutside is true.
|
|
143
|
+
* @param {MouseEvent} event - The click event.
|
|
144
|
+
*/
|
|
145
|
+
handleDocumentClick(event) {
|
|
146
|
+
if (!this.clickOutside || this.undismissable)
|
|
147
|
+
return;
|
|
148
|
+
this.handleClickOutside(event);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Handles the touchstart event to close the dialog when clickOutside is true.
|
|
152
|
+
* @param {TouchEvent} event - The touchstart event.
|
|
153
|
+
*/
|
|
154
|
+
handleDocumentTouch(event) {
|
|
155
|
+
if (!this.clickOutside || this.undismissable)
|
|
156
|
+
return;
|
|
157
|
+
this.handleClickOutside(event);
|
|
158
|
+
}
|
|
159
|
+
//#endregion EVENTS
|
|
160
|
+
/****************************************************************************/
|
|
161
|
+
//#region WATCHERS
|
|
162
|
+
async handleDialogOpenChange(open) {
|
|
163
|
+
if (open) {
|
|
164
|
+
this.show();
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
this.hide();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
//#endregion WATCHERS
|
|
171
|
+
/****************************************************************************/
|
|
172
|
+
//#region LIFECYCLE
|
|
173
|
+
/**
|
|
174
|
+
* Lifecycle method that runs before the component loads.
|
|
175
|
+
* Initializes the trigger, header, and footer elements by finding them in the component's children.
|
|
176
|
+
* Elements are found either by their slot attribute or by their tag name (for dialog header/footer)
|
|
177
|
+
*/
|
|
178
|
+
componentWillLoad() {
|
|
179
|
+
this.triggerElement = Array.from(this.el.children).find(child => {
|
|
180
|
+
return child.getAttribute('slot') === 'trigger';
|
|
181
|
+
});
|
|
182
|
+
this.headerElement = Array.from(this.el.children).find(child => {
|
|
183
|
+
return (child.getAttribute('slot') === 'header' ||
|
|
184
|
+
child.tagName.toLowerCase() === 'nv-dialogheader');
|
|
185
|
+
});
|
|
186
|
+
this.footerElement = Array.from(this.el.children).find(child => {
|
|
187
|
+
return (child.getAttribute('slot') === 'footer' ||
|
|
188
|
+
child.tagName.toLowerCase() === 'nv-dialogfooter');
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
componentWillUpdate() {
|
|
192
|
+
this.attachEventListeners();
|
|
193
|
+
}
|
|
194
|
+
componentDidLoad() {
|
|
195
|
+
if (this.open) {
|
|
196
|
+
this.show();
|
|
197
|
+
}
|
|
198
|
+
if (!this.manualFocus) {
|
|
199
|
+
this.setAutofocus();
|
|
200
|
+
}
|
|
201
|
+
this.attachEventListeners();
|
|
202
|
+
}
|
|
203
|
+
disconnectedCallback() {
|
|
204
|
+
removeEventListeners(this.triggerClickEvents, this.triggerElement, this);
|
|
205
|
+
}
|
|
206
|
+
//#endregion LIFECYCLE
|
|
207
|
+
/****************************************************************************/
|
|
208
|
+
//#region RENDER
|
|
209
|
+
render() {
|
|
210
|
+
return (h(Host, { key: '41efdb06fd00cc61dc85f057404cfe53aaebc6cd' }, h("slot", { key: 'dc72af729ac4157a942aa8cc81f778e37fe18248', name: "trigger" }), h("dialog", { key: '2d06731d33b555bae300ac761275fcb2789d9225', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsx({ full: this.full }) }, h("div", { key: 'be95c88ecc13b0772ce3532a23dc8b747b6a3305', class: "content" }, !this.undismissable && (h("nv-button", { key: '58d146e8343ebbc345185a53281bdd4856ff9cd6', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleCloseButton, "aria-label": "Close dialog" }, h("nv-icon", { key: '789e9783b08a5a5171b4f9173049a521d45947b3', name: "x", size: "sm" }))), this.headerElement ? (h("slot", { name: "header" })) : (h("nv-dialogheader", { id: "dialog-header" })), h("div", { key: '3c3e2f3200fd01df1290ec5ae987310bfeb1c3af', class: "content-body", id: "dialog-content" }, h("slot", { key: 'dd73f87ccf18439d744ce930e4c886bd29c9f2e8' })), this.footerElement ? (h("slot", { name: "footer" })) : (h("nv-dialogfooter", { onNvDialogCanceled: this.handleCancelButton, undismissable: this.undismissable }))))));
|
|
211
|
+
}
|
|
212
|
+
static get is() { return "nv-dialog"; }
|
|
213
|
+
static get originalStyleUrls() {
|
|
214
|
+
return {
|
|
215
|
+
"$": ["nv-dialog.scss"]
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
static get styleUrls() {
|
|
219
|
+
return {
|
|
220
|
+
"$": ["nv-dialog.css"]
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
static get properties() {
|
|
224
|
+
return {
|
|
225
|
+
"triggerElement": {
|
|
226
|
+
"type": "unknown",
|
|
227
|
+
"mutable": true,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "Element",
|
|
230
|
+
"resolved": "Element",
|
|
231
|
+
"references": {
|
|
232
|
+
"Element": {
|
|
233
|
+
"location": "import",
|
|
234
|
+
"path": "@stencil/core",
|
|
235
|
+
"id": "../../node_modules/@stencil/core/internal/stencil-core/index.d.ts::Element"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"required": false,
|
|
240
|
+
"optional": false,
|
|
241
|
+
"docs": {
|
|
242
|
+
"tags": [{
|
|
243
|
+
"name": "internal",
|
|
244
|
+
"text": "Accepts a reference to the DOM element acting as the popover trigger. This\nshould be used when the slot for the trigger is not defined."
|
|
245
|
+
}],
|
|
246
|
+
"text": ""
|
|
247
|
+
},
|
|
248
|
+
"getter": false,
|
|
249
|
+
"setter": false
|
|
250
|
+
},
|
|
251
|
+
"headerElement": {
|
|
252
|
+
"type": "unknown",
|
|
253
|
+
"mutable": true,
|
|
254
|
+
"complexType": {
|
|
255
|
+
"original": "Element",
|
|
256
|
+
"resolved": "Element",
|
|
257
|
+
"references": {
|
|
258
|
+
"Element": {
|
|
259
|
+
"location": "import",
|
|
260
|
+
"path": "@stencil/core",
|
|
261
|
+
"id": "../../node_modules/@stencil/core/internal/stencil-core/index.d.ts::Element"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"required": false,
|
|
266
|
+
"optional": false,
|
|
267
|
+
"docs": {
|
|
268
|
+
"tags": [{
|
|
269
|
+
"name": "internal",
|
|
270
|
+
"text": "Accepts a reference to the DOM element acting as the header. This should\nbe used when the slot for the header is not defined."
|
|
271
|
+
}],
|
|
272
|
+
"text": ""
|
|
273
|
+
},
|
|
274
|
+
"getter": false,
|
|
275
|
+
"setter": false
|
|
276
|
+
},
|
|
277
|
+
"footerElement": {
|
|
278
|
+
"type": "unknown",
|
|
279
|
+
"mutable": true,
|
|
280
|
+
"complexType": {
|
|
281
|
+
"original": "Element",
|
|
282
|
+
"resolved": "Element",
|
|
283
|
+
"references": {
|
|
284
|
+
"Element": {
|
|
285
|
+
"location": "import",
|
|
286
|
+
"path": "@stencil/core",
|
|
287
|
+
"id": "../../node_modules/@stencil/core/internal/stencil-core/index.d.ts::Element"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"required": false,
|
|
292
|
+
"optional": false,
|
|
293
|
+
"docs": {
|
|
294
|
+
"tags": [{
|
|
295
|
+
"name": "internal",
|
|
296
|
+
"text": "Accepts a reference to the DOM element acting as the footer. This should\nbe used when the slot for the footer is not defined."
|
|
297
|
+
}],
|
|
298
|
+
"text": ""
|
|
299
|
+
},
|
|
300
|
+
"getter": false,
|
|
301
|
+
"setter": false
|
|
302
|
+
},
|
|
303
|
+
"open": {
|
|
304
|
+
"type": "boolean",
|
|
305
|
+
"mutable": true,
|
|
306
|
+
"complexType": {
|
|
307
|
+
"original": "boolean",
|
|
308
|
+
"resolved": "boolean",
|
|
309
|
+
"references": {}
|
|
310
|
+
},
|
|
311
|
+
"required": false,
|
|
312
|
+
"optional": false,
|
|
313
|
+
"docs": {
|
|
314
|
+
"tags": [],
|
|
315
|
+
"text": "Use this prop to toggle the visibility of the dialog. Set to true to show\nthe dialog and false to hide it."
|
|
316
|
+
},
|
|
317
|
+
"getter": false,
|
|
318
|
+
"setter": false,
|
|
319
|
+
"attribute": "open",
|
|
320
|
+
"reflect": true,
|
|
321
|
+
"defaultValue": "false"
|
|
322
|
+
},
|
|
323
|
+
"undismissable": {
|
|
324
|
+
"type": "boolean",
|
|
325
|
+
"mutable": false,
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "boolean",
|
|
328
|
+
"resolved": "boolean",
|
|
329
|
+
"references": {}
|
|
330
|
+
},
|
|
331
|
+
"required": false,
|
|
332
|
+
"optional": false,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": "If true, the dialog cannot be closed by the user."
|
|
336
|
+
},
|
|
337
|
+
"getter": false,
|
|
338
|
+
"setter": false,
|
|
339
|
+
"attribute": "undismissable",
|
|
340
|
+
"reflect": true,
|
|
341
|
+
"defaultValue": "false"
|
|
342
|
+
},
|
|
343
|
+
"clickOutside": {
|
|
344
|
+
"type": "boolean",
|
|
345
|
+
"mutable": false,
|
|
346
|
+
"complexType": {
|
|
347
|
+
"original": "boolean",
|
|
348
|
+
"resolved": "boolean",
|
|
349
|
+
"references": {}
|
|
350
|
+
},
|
|
351
|
+
"required": false,
|
|
352
|
+
"optional": false,
|
|
353
|
+
"docs": {
|
|
354
|
+
"tags": [],
|
|
355
|
+
"text": "If true, the dialog will be closed when the backdrop is clicked."
|
|
356
|
+
},
|
|
357
|
+
"getter": false,
|
|
358
|
+
"setter": false,
|
|
359
|
+
"attribute": "click-outside",
|
|
360
|
+
"reflect": true,
|
|
361
|
+
"defaultValue": "false"
|
|
362
|
+
},
|
|
363
|
+
"manualFocus": {
|
|
364
|
+
"type": "boolean",
|
|
365
|
+
"mutable": false,
|
|
366
|
+
"complexType": {
|
|
367
|
+
"original": "boolean",
|
|
368
|
+
"resolved": "boolean",
|
|
369
|
+
"references": {}
|
|
370
|
+
},
|
|
371
|
+
"required": false,
|
|
372
|
+
"optional": false,
|
|
373
|
+
"docs": {
|
|
374
|
+
"tags": [],
|
|
375
|
+
"text": "Controls the dialog's autofocus behavior. When false (default), the dialog will\nautomatically focus the first focusable element. When true, automatic focus is\ndisabled and you must manually set focus on an element for accessibility compliance."
|
|
376
|
+
},
|
|
377
|
+
"getter": false,
|
|
378
|
+
"setter": false,
|
|
379
|
+
"attribute": "manual-focus",
|
|
380
|
+
"reflect": true,
|
|
381
|
+
"defaultValue": "false"
|
|
382
|
+
},
|
|
383
|
+
"controlled": {
|
|
384
|
+
"type": "boolean",
|
|
385
|
+
"mutable": false,
|
|
386
|
+
"complexType": {
|
|
387
|
+
"original": "boolean",
|
|
388
|
+
"resolved": "boolean",
|
|
389
|
+
"references": {}
|
|
390
|
+
},
|
|
391
|
+
"required": false,
|
|
392
|
+
"optional": false,
|
|
393
|
+
"docs": {
|
|
394
|
+
"tags": [],
|
|
395
|
+
"text": "If true, the dialog visibility is managed manually through methods or the open prop."
|
|
396
|
+
},
|
|
397
|
+
"getter": false,
|
|
398
|
+
"setter": false,
|
|
399
|
+
"attribute": "controlled",
|
|
400
|
+
"reflect": true,
|
|
401
|
+
"defaultValue": "false"
|
|
402
|
+
},
|
|
403
|
+
"full": {
|
|
404
|
+
"type": "boolean",
|
|
405
|
+
"mutable": false,
|
|
406
|
+
"complexType": {
|
|
407
|
+
"original": "boolean",
|
|
408
|
+
"resolved": "boolean",
|
|
409
|
+
"references": {}
|
|
410
|
+
},
|
|
411
|
+
"required": false,
|
|
412
|
+
"optional": false,
|
|
413
|
+
"docs": {
|
|
414
|
+
"tags": [],
|
|
415
|
+
"text": "If true, the dialog takes full width styling."
|
|
416
|
+
},
|
|
417
|
+
"getter": false,
|
|
418
|
+
"setter": false,
|
|
419
|
+
"attribute": "full",
|
|
420
|
+
"reflect": true,
|
|
421
|
+
"defaultValue": "false"
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
static get events() {
|
|
426
|
+
return [{
|
|
427
|
+
"method": "close",
|
|
428
|
+
"name": "close",
|
|
429
|
+
"bubbles": true,
|
|
430
|
+
"cancelable": true,
|
|
431
|
+
"composed": true,
|
|
432
|
+
"docs": {
|
|
433
|
+
"tags": [],
|
|
434
|
+
"text": "Emitted when the dialog is closing in order to allow for cleanup, data-capture, etc."
|
|
435
|
+
},
|
|
436
|
+
"complexType": {
|
|
437
|
+
"original": "void",
|
|
438
|
+
"resolved": "void",
|
|
439
|
+
"references": {}
|
|
440
|
+
}
|
|
441
|
+
}];
|
|
442
|
+
}
|
|
443
|
+
static get methods() {
|
|
444
|
+
return {
|
|
445
|
+
"show": {
|
|
446
|
+
"complexType": {
|
|
447
|
+
"signature": "() => Promise<void>",
|
|
448
|
+
"parameters": [],
|
|
449
|
+
"references": {
|
|
450
|
+
"Promise": {
|
|
451
|
+
"location": "global",
|
|
452
|
+
"id": "global::Promise"
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"return": "Promise<void>"
|
|
456
|
+
},
|
|
457
|
+
"docs": {
|
|
458
|
+
"text": "Call this method to show the dialog, making it visible on the screen.",
|
|
459
|
+
"tags": []
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
"hide": {
|
|
463
|
+
"complexType": {
|
|
464
|
+
"signature": "() => Promise<void>",
|
|
465
|
+
"parameters": [],
|
|
466
|
+
"references": {
|
|
467
|
+
"Promise": {
|
|
468
|
+
"location": "global",
|
|
469
|
+
"id": "global::Promise"
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
"return": "Promise<void>"
|
|
473
|
+
},
|
|
474
|
+
"docs": {
|
|
475
|
+
"text": "Call this method to hide the dialog, making it disappear from view.",
|
|
476
|
+
"tags": []
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
static get elementRef() { return "el"; }
|
|
482
|
+
static get watchers() {
|
|
483
|
+
return [{
|
|
484
|
+
"propName": "open",
|
|
485
|
+
"methodName": "handleDialogOpenChange"
|
|
486
|
+
}];
|
|
487
|
+
}
|
|
488
|
+
static get listeners() {
|
|
489
|
+
return [{
|
|
490
|
+
"name": "keydown",
|
|
491
|
+
"method": "handleKeyDown",
|
|
492
|
+
"target": "document",
|
|
493
|
+
"capture": false,
|
|
494
|
+
"passive": false
|
|
495
|
+
}, {
|
|
496
|
+
"name": "click",
|
|
497
|
+
"method": "handleDocumentClick",
|
|
498
|
+
"target": "document",
|
|
499
|
+
"capture": false,
|
|
500
|
+
"passive": false
|
|
501
|
+
}, {
|
|
502
|
+
"name": "touchstart",
|
|
503
|
+
"method": "handleDocumentTouch",
|
|
504
|
+
"target": "document",
|
|
505
|
+
"capture": false,
|
|
506
|
+
"passive": true
|
|
507
|
+
}];
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
//# sourceMappingURL=nv-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nv-dialog.js","sourceRoot":"","sources":["../../../src/components/nv-dialog/nv-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,CAAC,EACD,OAAO,EACP,MAAM,EACN,KAAK,EAEL,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GAErB,MAAM,0BAA0B,CAAC;AAClC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;;GAKG;AAMH,MAAM,OAAO,QAAQ;IALrB;QAQU,mBAAc,GAAG,KAAK,CAAC;QA6B/B;;;WAGG;QAEH,SAAI,GAAY,KAAK,CAAC;QAEtB;;WAEG;QAEM,kBAAa,GAAY,KAAK,CAAC;QAExC;;WAEG;QAEM,iBAAY,GAAY,KAAK,CAAC;QAEvC;;;;WAIG;QAEM,gBAAW,GAAY,KAAK,CAAC;QAEtC;;WAEG;QAEM,eAAU,GAAY,KAAK,CAAC;QAErC;;WAEG;QAEM,SAAI,GAAY,KAAK,CAAC;QA0B/B;;WAEG;QACK,sBAAiB,GAAG,GAAG,EAAE;YAC/B,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC;QAEF;;WAEG;QACK,uBAAkB,GAAG,GAAG,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Ac,EACpB,QAAQ,EAAC,OAAO,EAChB,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,IAAI,CAAC,iBAAiB,gBACpB,cAAc;wBAEzB,gEAAS,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,IAAI,GAAG,CACpB,CACb;oBAEA,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CACpB,YAAM,IAAI,EAAC,QAAQ,GAAQ,CAC5B,CAAC,CAAC,CAAC,CACF,uBAAiB,EAAE,EAAC,eAAe,GAAmB,CACvD;oBAED,4DAAK,KAAK,EAAC,cAAc,EAAC,EAAE,EAAC,gBAAgB;wBAC3C,8DAAa,CACT;oBAEL,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CACpB,YAAM,IAAI,EAAC,QAAQ,GAAQ,CAC5B,CAAC,CAAC,CAAC,CACF,uBACE,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,aAAa,EAAE,IAAI,CAAC,aAAa,GAChB,CACpB,CACG,CACC,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Method,\n Event,\n EventEmitter,\n Watch,\n Listen,\n} from '@stencil/core';\nimport { tabbable } from 'tabbable';\nimport {\n addEventListeners,\n removeEventListeners,\n type EventsAndListeners,\n} from '../../utils/events.utils';\nimport clsx from 'clsx';\n\n/**\n * @slot default - Body of the dialog.\n * @slot trigger - Content to be placed as the trigger, will override the trigger prop.\n * @slot header - Content to be placed as the header, will override the header prop.\n * @slot footer - Content to be placed as the footer, will override the footer prop.\n */\n@Component({\n tag: 'nv-dialog',\n styleUrl: 'nv-dialog.scss',\n shadow: false,\n})\nexport class NvDialog {\n @Element() el: HTMLNvDialogElement;\n private dialogElement!: HTMLDialogElement;\n private eventsAttached = false;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the popover trigger. This\n * should be used when the slot for the trigger is not defined.\n */\n @Prop({ mutable: true })\n triggerElement: Element;\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the header. This should\n * be used when the slot for the header is not defined.\n */\n @Prop({ mutable: true })\n headerElement: Element;\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the footer. This should\n * be used when the slot for the footer is not defined.\n */\n @Prop({ mutable: true })\n footerElement: Element;\n\n /**\n * Use this prop to toggle the visibility of the dialog. Set to true to show\n * the dialog and false to hide it.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * If true, the dialog cannot be closed by the user.\n */\n @Prop({ reflect: true })\n readonly undismissable: boolean = false;\n\n /**\n * If true, the dialog will be closed when the backdrop is clicked.\n */\n @Prop({ reflect: true })\n readonly clickOutside: boolean = false;\n\n /**\n * Controls the dialog's autofocus behavior. When false (default), the dialog will\n * automatically focus the first focusable element. When true, automatic focus is\n * disabled and you must manually set focus on an element for accessibility compliance.\n */\n @Prop({ reflect: true })\n readonly manualFocus: boolean = false;\n\n /**\n * If true, the dialog visibility is managed manually through methods or the open prop.\n */\n @Prop({ reflect: true })\n readonly controlled: boolean = false;\n\n /**\n * If true, the dialog takes full width styling.\n */\n @Prop({ reflect: true })\n readonly full: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Call this method to show the dialog, making it visible on the screen.\n */\n @Method()\n public async show() {\n document.body.style.overflow = 'hidden'; // Prevent background scrolling\n this.dialogElement.showModal();\n this.open = true;\n }\n\n /**\n * Call this method to hide the dialog, making it disappear from view.\n */\n @Method()\n public async hide() {\n document.body.style.overflow = ''; // Restore scrolling\n this.dialogElement.close();\n this.open = false;\n }\n\n /**\n * Handles the close button click.\n */\n private handleCloseButton = () => {\n this.hide();\n };\n\n /**\n * Handles the cancel button click.\n */\n private handleCancelButton = () => {\n this.hide();\n };\n\n /**\n * Sets the autofocus on the first focusable element in the dialog.\n */\n private setAutofocus() {\n const focusableElements = tabbable(this.dialogElement, {\n displayCheck: 'none',\n });\n\n if (focusableElements.length > 0) {\n // Convert to array and find element with smallest top and left position\n let topLeftElement = focusableElements[0];\n let topLeftRect = topLeftElement.getBoundingClientRect();\n\n focusableElements.forEach(element => {\n const rect = element.getBoundingClientRect();\n if (rect.top < topLeftRect.top || rect.left < topLeftRect.left) {\n topLeftElement = element;\n topLeftRect = rect;\n }\n });\n\n // Set autofocus attribute on the found element\n topLeftElement.setAttribute('autofocus', 'true');\n }\n }\n\n /**\n * Attaches event listeners to the dialog.\n */\n private attachEventListeners() {\n if (this.triggerElement && !this.eventsAttached && !this.controlled) {\n addEventListeners(this.triggerClickEvents, this.triggerElement, this);\n this.eventsAttached = true;\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the dialog is closing in order to allow for cleanup, data-capture, etc.\n */\n @Event()\n close: EventEmitter<void>;\n\n /**\n * Handles the dialog close event.\n */\n private handleDialogClose = () => {\n this.close.emit();\n };\n\n /**\n * Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.\n\n * @param {KeyboardEvent} event - The keydown event.\n */\n @Listen('keydown', { target: 'document' })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.undismissable) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /**\n * Handles the click event to close the dialog when clickOutside is true.\n * @param {MouseEvent} event - The click event.\n */\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: MouseEvent) {\n if (!this.clickOutside || this.undismissable) return;\n this.handleClickOutside(event);\n }\n\n /**\n * Handles the touchstart event to close the dialog when clickOutside is true.\n * @param {TouchEvent} event - The touchstart event.\n */\n @Listen('touchstart', { target: 'document' })\n handleDocumentTouch(event: TouchEvent) {\n if (!this.clickOutside || this.undismissable) return;\n this.handleClickOutside(event);\n }\n\n private handleClickOutside = (event: MouseEvent | TouchEvent) => {\n if (event.target === this.dialogElement) {\n this.hide();\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n private triggerClickEvents: EventsAndListeners = [\n ['click', this.show],\n ['touchstart', this.show],\n [\n 'keydown',\n (e: KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this.show();\n }\n },\n ],\n ];\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('open')\n async handleDialogOpenChange(open: boolean) {\n if (open) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n /**\n * Lifecycle method that runs before the component loads.\n * Initializes the trigger, header, and footer elements by finding them in the component's children.\n * Elements are found either by their slot attribute or by their tag name (for dialog header/footer)\n */\n componentWillLoad() {\n this.triggerElement = Array.from(this.el.children).find(child => {\n return child.getAttribute('slot') === 'trigger';\n }) as HTMLElement;\n\n this.headerElement = Array.from(this.el.children).find(child => {\n return (\n child.getAttribute('slot') === 'header' ||\n child.tagName.toLowerCase() === 'nv-dialogheader'\n );\n }) as HTMLElement;\n\n this.footerElement = Array.from(this.el.children).find(child => {\n return (\n child.getAttribute('slot') === 'footer' ||\n child.tagName.toLowerCase() === 'nv-dialogfooter'\n );\n }) as HTMLElement;\n }\n\n componentWillUpdate() {\n this.attachEventListeners();\n }\n\n componentDidLoad() {\n if (this.open) {\n this.show();\n }\n if (!this.manualFocus) {\n this.setAutofocus();\n }\n this.attachEventListeners();\n }\n\n disconnectedCallback() {\n removeEventListeners(this.triggerClickEvents, this.triggerElement, this);\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n <slot name=\"trigger\"></slot>\n\n <dialog\n ref={el => (this.dialogElement = el)}\n onClose={this.handleDialogClose}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog-header\"\n aria-describedby=\"dialog-content\"\n class={clsx({ full: this.full })}\n >\n <div class=\"content\">\n {!this.undismissable && (\n <nv-button\n class=\"close-button\"\n emphasis=\"lower\"\n size=\"sm\"\n onClick={this.handleCloseButton}\n aria-label=\"Close dialog\"\n >\n <nv-icon name=\"x\" size=\"sm\" />\n </nv-button>\n )}\n\n {this.headerElement ? (\n <slot name=\"header\"></slot>\n ) : (\n <nv-dialogheader id=\"dialog-header\"></nv-dialogheader>\n )}\n\n <div class=\"content-body\" id=\"dialog-content\">\n <slot></slot>\n </div>\n\n {this.footerElement ? (\n <slot name=\"footer\"></slot>\n ) : (\n <nv-dialogfooter\n onNvDialogCanceled={this.handleCancelButton}\n undismissable={this.undismissable}\n ></nv-dialogfooter>\n )}\n </div>\n </dialog>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
nv-dialogfooter {
|
|
2
|
+
display: flex;
|
|
3
|
+
padding: var(--dialog-footer-padding-top) var(--dialog-footer-padding-x) var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);
|
|
4
|
+
justify-content: flex-end;
|
|
5
|
+
align-items: flex-end;
|
|
6
|
+
gap: var(--dialog-footer-gap-y);
|
|
7
|
+
align-self: stretch;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nv-dialogfooter.docs.js","sourceRoot":"","sources":["../../../src/components/nv-dialogfooter/nv-dialogfooter.docs.tsx"],"names":[],"mappings":"AAGA,MAAM,kBAAkB,GAAwC;IAC9D,SAAS,EAAE,iBAAiB;IAC5B,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\n\nconst NvDialogfooterDocs: NovaDocs<Components.NvDialogfooter> = {\n component: 'nv-dialogfooter',\n skip: true,\n};\n\nexport default NvDialogfooterDocs;\n"]}
|