@nova-design-system/nova-webcomponents 3.5.0 → 3.7.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/{timeline.animation-dbb9c5ea.js → collapse.animation-a129dc3f.js} +5 -26
- package/dist/cjs/collapse.animation-a129dc3f.js.map +1 -0
- package/dist/cjs/fade.animation-644b5c4d.js +70 -0
- package/dist/cjs/fade.animation-644b5c4d.js.map +1 -0
- package/dist/cjs/{grow.animation-a1f0bc22.js → grow.animation-6d003803.js} +5 -5
- package/dist/cjs/{grow.animation-a1f0bc22.js.map → grow.animation-6d003803.js.map} +1 -1
- package/dist/cjs/index-c56424e5.js +8 -0
- package/dist/cjs/index.cjs.js +6 -4
- 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 +181 -0
- package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-accordion.cjs.entry.js +167 -0
- package/dist/cjs/nv-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-alert.cjs.entry.js +6 -4
- 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 +9 -7
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +96 -66
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +19 -6
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +121 -35
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +32 -4
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +3 -3
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +95 -102
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldslider.cjs.entry.js +53 -9
- package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtime.cjs.entry.js +10 -10
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +4 -3
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +3 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/{fade.animation-0d33d198.js → stylefire.es-717e022a.js} +1 -65
- package/dist/cjs/stylefire.es-717e022a.js.map +1 -0
- package/dist/cjs/timeline.animation-155e8839.js +25 -0
- package/dist/cjs/timeline.animation-155e8839.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js +153 -0
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js.map +1 -0
- package/dist/collection/components/nv-accordion/nv-accordion.js +310 -0
- package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -0
- package/dist/collection/components/nv-accordion/styles/nv-accordion.css +15 -0
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.docs.js +6 -0
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.docs.js.map +1 -0
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +353 -0
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -0
- package/dist/collection/components/nv-accordion-item/styles/nv-accordion-item.css +66 -0
- package/dist/collection/components/nv-alert/nv-alert.js +1 -1
- package/dist/collection/components/nv-avatar/nv-avatar.js +1 -1
- package/dist/collection/components/nv-badge/nv-badge.js +2 -2
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
- package/dist/collection/components/nv-button/nv-button.js +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.css +10 -0
- package/dist/collection/components/nv-calendar/nv-calendar.js +110 -43
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js +0 -20
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -1
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js +6 -2
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js.map +1 -1
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +5 -31
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -1
- package/dist/collection/components/nv-col/nv-col.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +2 -2
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.css +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +38 -5
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +6 -4
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js.map +1 -1
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +148 -34
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +2 -0
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +61 -4
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +3 -3
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +7 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +44 -34
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +127 -117
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js +45 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/partials/range-thumb.js +4 -4
- package/dist/collection/components/nv-fieldslider/partials/range-thumb.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/partials/single-thumb.js +3 -3
- package/dist/collection/components/nv-fieldslider/partials/single-thumb.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js +42 -1
- package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +11 -13
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- 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.js +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- 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-tooltip/nv-tooltip.js +21 -3
- package/dist/collection/components/nv-tooltip/nv-tooltip.js.map +1 -1
- package/dist/components/index.js +4 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.d.ts +11 -0
- package/dist/components/nv-accordion-item.js +8 -0
- package/dist/components/nv-accordion-item.js.map +1 -0
- package/dist/components/nv-accordion.d.ts +11 -0
- package/dist/components/nv-accordion.js +212 -0
- package/dist/components/nv-accordion.js.map +1 -0
- package/dist/components/nv-alert.js +6 -4
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +3 -3
- package/dist/components/nv-breadcrumbs.js +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +4 -4
- package/dist/components/nv-datagridcolumn.js +1 -1
- package/dist/components/nv-dialog.js +25 -11
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +130 -42
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +40 -11
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +8 -8
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +104 -112
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +6 -6
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +8 -8
- package/dist/components/nv-fieldslider.js +57 -13
- package/dist/components/nv-fieldslider.js.map +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtime.js +14 -14
- package/dist/components/nv-fieldtime.js.map +1 -1
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +4 -4
- package/dist/components/nv-menuitem.js +1 -1
- 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-tooltip.js +1 -1
- package/dist/components/{p-9e6e26cb.js → p-0143cee0.js} +5 -5
- package/dist/components/p-0143cee0.js.map +1 -0
- package/dist/components/{p-e8c083e3.js → p-07550eac.js} +3 -3
- package/dist/components/{p-e8c083e3.js.map → p-07550eac.js.map} +1 -1
- package/dist/components/{p-1daca48a.js → p-09cdd71f.js} +2 -65
- package/dist/components/p-09cdd71f.js.map +1 -0
- package/dist/components/{p-919b5237.js → p-12258eef.js} +5 -5
- package/dist/components/{p-919b5237.js.map → p-12258eef.js.map} +1 -1
- package/dist/components/{p-05c19c9a.js → p-144e80f0.js} +4 -4
- package/dist/components/{p-05c19c9a.js.map → p-144e80f0.js.map} +1 -1
- package/dist/components/p-15aeab4d.js +23 -0
- package/dist/components/p-15aeab4d.js.map +1 -0
- package/dist/components/p-1cbacdba.js +68 -0
- package/dist/components/p-1cbacdba.js.map +1 -0
- package/dist/components/p-44df0d22.js +223 -0
- package/dist/components/p-44df0d22.js.map +1 -0
- package/dist/components/{p-cebdbb40.js → p-5d5668f0.js} +3 -3
- package/dist/components/{p-cebdbb40.js.map → p-5d5668f0.js.map} +1 -1
- package/dist/components/{p-001c888b.js → p-8067d283.js} +5 -4
- package/dist/components/p-8067d283.js.map +1 -0
- package/dist/components/{p-4badc1d2.js → p-8b82a6f4.js} +7 -7
- package/dist/components/{p-4badc1d2.js.map → p-8b82a6f4.js.map} +1 -1
- package/dist/components/{p-c1765831.js → p-8d45dbfe.js} +2 -2
- package/dist/components/{p-c1765831.js.map → p-8d45dbfe.js.map} +1 -1
- package/dist/components/{p-9f1e8ef3.js → p-91a558eb.js} +2 -2
- package/dist/components/{p-9f1e8ef3.js.map → p-91a558eb.js.map} +1 -1
- package/dist/components/{p-42301d8f.js → p-9a263d0e.js} +3 -23
- package/dist/components/p-9a263d0e.js.map +1 -0
- package/dist/components/{p-5bee0141.js → p-ba87d9d5.js} +6 -5
- package/dist/components/p-ba87d9d5.js.map +1 -0
- package/dist/components/{p-6277f746.js → p-ca130ad2.js} +2 -2
- package/dist/components/{p-6277f746.js.map → p-ca130ad2.js.map} +1 -1
- package/dist/components/{p-a0d7e0cd.js → p-d32b75ac.js} +99 -68
- package/dist/components/p-d32b75ac.js.map +1 -0
- package/dist/components/{p-970cd9b1.js → p-d576d64f.js} +5 -5
- package/dist/components/{p-970cd9b1.js.map → p-d576d64f.js.map} +1 -1
- package/dist/components/{p-e072f051.js → p-dd7ff995.js} +2 -2
- package/dist/components/{p-e072f051.js.map → p-dd7ff995.js.map} +1 -1
- package/dist/components/{p-918bb719.js → p-dfd2d4f0.js} +2 -2
- package/dist/components/{p-918bb719.js.map → p-dfd2d4f0.js.map} +1 -1
- package/dist/components/{p-44f0039b.js → p-e104c58a.js} +4 -4
- package/dist/components/p-e104c58a.js.map +1 -0
- package/dist/components/{p-00ac701f.js → p-e8e6f88a.js} +8 -6
- package/dist/components/p-e8e6f88a.js.map +1 -0
- package/dist/components/{p-d56b30ab.js → p-f97d1cb1.js} +3 -3
- package/dist/components/{p-d56b30ab.js.map → p-f97d1cb1.js.map} +1 -1
- package/dist/esm/{timeline.animation-1b88f052.js → collapse.animation-16e3af45.js} +3 -23
- package/dist/esm/collapse.animation-16e3af45.js.map +1 -0
- package/dist/esm/fade.animation-71e8e34c.js +68 -0
- package/dist/esm/fade.animation-71e8e34c.js.map +1 -0
- package/dist/esm/{grow.animation-cac164da.js → grow.animation-f7b26024.js} +2 -2
- package/dist/esm/{grow.animation-cac164da.js.map → grow.animation-f7b26024.js.map} +1 -1
- package/dist/esm/index-a1936cd0.js +8 -0
- package/dist/esm/index.js +5 -3
- 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 +177 -0
- package/dist/esm/nv-accordion-item.entry.js.map +1 -0
- package/dist/esm/nv-accordion.entry.js +163 -0
- package/dist/esm/nv-accordion.entry.js.map +1 -0
- package/dist/esm/nv-alert.entry.js +5 -3
- 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 +7 -5
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumbs.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +96 -66
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +2 -2
- package/dist/esm/nv-datagridcolumn.entry.js +1 -1
- package/dist/esm/nv-dialog.entry.js +19 -6
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
- package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddate.entry.js +121 -35
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +32 -4
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +3 -3
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +95 -102
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldpassword.entry.js +3 -3
- package/dist/esm/nv-fieldradio.entry.js +3 -3
- package/dist/esm/nv-fieldselect.entry.js +5 -5
- package/dist/esm/nv-fieldslider.entry.js +53 -9
- package/dist/esm/nv-fieldslider.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +3 -3
- package/dist/esm/nv-fieldtextarea.entry.js +3 -3
- package/dist/esm/nv-fieldtime.entry.js +10 -10
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +4 -3
- package/dist/esm/nv-popover.entry.js.map +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +4 -3
- package/dist/esm/nv-tooltip.entry.js.map +1 -1
- package/dist/esm/{fade.animation-2a077983.js → stylefire.es-74da334a.js} +2 -65
- package/dist/esm/stylefire.es-74da334a.js.map +1 -0
- package/dist/esm/timeline.animation-adf35ecb.js +23 -0
- package/dist/esm/timeline.animation-adf35ecb.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-051db87c.entry.js +2 -0
- package/dist/native/p-051db87c.entry.js.map +1 -0
- package/dist/native/{p-a0505695.entry.js → p-08452012.entry.js} +2 -2
- package/dist/native/p-09cdd71f.js +16 -0
- package/dist/native/p-09cdd71f.js.map +1 -0
- package/dist/native/p-0e005d95.entry.js +2 -0
- package/dist/native/{p-d4bf2587.entry.js.map → p-0e005d95.entry.js.map} +1 -1
- package/dist/native/p-10ce53ea.entry.js +2 -0
- package/dist/native/{p-54198779.entry.js → p-12039da4.entry.js} +2 -2
- package/dist/native/p-1235c007.entry.js +2 -0
- package/dist/native/p-15aeab4d.js +2 -0
- package/dist/native/p-15aeab4d.js.map +1 -0
- package/dist/native/{p-003b6377.entry.js → p-16ef7dd4.entry.js} +2 -2
- package/dist/native/{p-1d98477d.entry.js → p-1ad1bff9.entry.js} +2 -2
- package/dist/native/p-1cbacdba.js +2 -0
- package/dist/native/p-1cbacdba.js.map +1 -0
- package/dist/native/{p-914da1e1.entry.js → p-1f932a4b.entry.js} +2 -2
- package/dist/native/p-2a6783ca.entry.js +2 -0
- package/dist/native/p-2a6783ca.entry.js.map +1 -0
- package/dist/native/{p-a5c72bd3.entry.js → p-34bf336f.entry.js} +2 -2
- package/dist/native/{p-e293b3fe.entry.js → p-3f139780.entry.js} +2 -2
- package/dist/native/{p-dd256ea3.entry.js → p-40fa3328.entry.js} +2 -2
- package/dist/native/{p-a983e6a0.entry.js → p-4b15cff3.entry.js} +2 -2
- package/dist/native/p-516da423.entry.js +2 -0
- package/dist/native/p-516da423.entry.js.map +1 -0
- package/dist/native/{p-08ca678c.entry.js → p-51a57a3a.entry.js} +2 -2
- package/dist/native/{p-5b06f4b5.entry.js → p-64cb38e6.entry.js} +2 -2
- package/dist/native/{p-af1e6035.entry.js → p-67c34b8c.entry.js} +2 -2
- package/dist/native/{p-e9962dac.entry.js → p-68edb2e8.entry.js} +2 -2
- package/dist/native/p-73c08f3b.entry.js +2 -0
- package/dist/native/p-73c08f3b.entry.js.map +1 -0
- package/dist/native/p-7703c736.entry.js +2 -0
- package/dist/native/p-7703c736.entry.js.map +1 -0
- package/dist/native/{p-6029e51b.entry.js → p-85a54ef2.entry.js} +2 -2
- package/dist/native/p-8d45dbfe.js +2 -0
- package/dist/native/p-916acbd3.entry.js +2 -0
- package/dist/native/p-916acbd3.entry.js.map +1 -0
- package/dist/native/p-9a263d0e.js +2 -0
- package/dist/native/p-9a263d0e.js.map +1 -0
- package/dist/native/{p-1a5d3b87.entry.js → p-9dc1c3e7.entry.js} +2 -2
- package/dist/native/p-a36dc25a.entry.js +2 -0
- package/dist/native/{p-ad128108.entry.js.map → p-a36dc25a.entry.js.map} +1 -1
- package/dist/native/p-a50f3850.entry.js +2 -0
- package/dist/native/{p-19f484a0.entry.js → p-a73fa60a.entry.js} +2 -2
- package/dist/native/p-b3f9db23.entry.js +2 -0
- package/dist/native/{p-82568ec7.entry.js.map → p-b3f9db23.entry.js.map} +1 -1
- package/dist/native/p-baddee4c.entry.js +7 -0
- package/dist/native/p-baddee4c.entry.js.map +1 -0
- package/dist/native/p-bba5cc9b.entry.js +2 -0
- package/dist/native/p-bba5cc9b.entry.js.map +1 -0
- package/dist/native/{p-1e0df2d3.entry.js → p-bee62b2b.entry.js} +2 -2
- package/dist/native/p-dc34da69.entry.js +2 -0
- package/dist/native/p-dc34da69.entry.js.map +1 -0
- package/dist/native/p-ec92ee7a.entry.js +2 -0
- package/dist/native/{p-6ea1c78b.entry.js → p-f00a4552.entry.js} +2 -2
- package/dist/native/{p-dd6b1d79.entry.js → p-f540db71.entry.js} +2 -2
- package/dist/native/{p-be9aeed4.entry.js → p-f687e05c.entry.js} +2 -2
- package/dist/native/p-f687e05c.entry.js.map +1 -0
- package/dist/native/{p-b5b9190a.entry.js → p-fa81b77f.entry.js} +2 -2
- package/dist/native/p-fa81b77f.entry.js.map +1 -0
- package/dist/native/{p-2d98d4f0.entry.js → p-fcd52432.entry.js} +2 -2
- package/dist/types/components/nv-accordion/nv-accordion.d.ts +82 -0
- package/dist/types/components/nv-accordion/nv-accordion.docs.d.ts +4 -0
- package/dist/types/components/nv-accordion-item/nv-accordion-item.d.ts +79 -0
- package/dist/types/components/nv-accordion-item/nv-accordion-item.docs.d.ts +4 -0
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +7 -1
- package/dist/types/components/nv-calendar/partials/calendar-grid.d.ts +6 -2
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +7 -0
- package/dist/types/components/nv-fieldcheckbox/nv-fieldcheckbox.d.ts +2 -0
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +27 -2
- package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +5 -0
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +6 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +17 -16
- package/dist/types/components/nv-fieldslider/nv-fieldslider.utils.d.ts +13 -0
- package/dist/types/components/nv-fieldslider/partials/range-thumb.d.ts +2 -0
- package/dist/types/components/nv-fieldslider/partials/single-thumb.d.ts +2 -0
- package/dist/types/components/nv-tooltip/nv-tooltip.d.ts +7 -0
- package/dist/types/components.d.ts +287 -10
- package/dist/vscode-data.json +71 -5
- package/hydrate/index.js +1461 -879
- package/hydrate/index.mjs +1461 -879
- package/package.json +1 -1
- package/readme.md +6 -0
- package/dist/cjs/fade.animation-0d33d198.js.map +0 -1
- package/dist/cjs/timeline.animation-dbb9c5ea.js.map +0 -1
- package/dist/components/p-001c888b.js.map +0 -1
- package/dist/components/p-00ac701f.js.map +0 -1
- package/dist/components/p-1daca48a.js.map +0 -1
- package/dist/components/p-42301d8f.js.map +0 -1
- package/dist/components/p-44f0039b.js.map +0 -1
- package/dist/components/p-5bee0141.js.map +0 -1
- package/dist/components/p-9e6e26cb.js.map +0 -1
- package/dist/components/p-a0d7e0cd.js.map +0 -1
- package/dist/esm/fade.animation-2a077983.js.map +0 -1
- package/dist/esm/timeline.animation-1b88f052.js.map +0 -1
- package/dist/native/p-0493c51a.entry.js +0 -2
- package/dist/native/p-1daca48a.js +0 -16
- package/dist/native/p-1daca48a.js.map +0 -1
- package/dist/native/p-42301d8f.js +0 -2
- package/dist/native/p-42301d8f.js.map +0 -1
- package/dist/native/p-45cbe6e4.entry.js +0 -2
- package/dist/native/p-46428304.entry.js +0 -2
- package/dist/native/p-46428304.entry.js.map +0 -1
- package/dist/native/p-58f4dc0e.entry.js +0 -2
- package/dist/native/p-58f4dc0e.entry.js.map +0 -1
- package/dist/native/p-59b07b36.entry.js +0 -2
- package/dist/native/p-59b07b36.entry.js.map +0 -1
- package/dist/native/p-82568ec7.entry.js +0 -2
- package/dist/native/p-82c4bf56.entry.js +0 -2
- package/dist/native/p-82c4bf56.entry.js.map +0 -1
- package/dist/native/p-86ab23ea.entry.js +0 -2
- package/dist/native/p-ad128108.entry.js +0 -2
- package/dist/native/p-b5b9190a.entry.js.map +0 -1
- package/dist/native/p-b9c7b644.entry.js +0 -2
- package/dist/native/p-b9c7b644.entry.js.map +0 -1
- package/dist/native/p-be9aeed4.entry.js.map +0 -1
- package/dist/native/p-bee972c7.entry.js +0 -2
- package/dist/native/p-c1765831.js +0 -2
- package/dist/native/p-d21b2da2.entry.js +0 -7
- package/dist/native/p-d21b2da2.entry.js.map +0 -1
- package/dist/native/p-d4bf2587.entry.js +0 -2
- package/dist/native/p-eaf51f2c.entry.js +0 -2
- package/dist/native/p-eaf51f2c.entry.js.map +0 -1
- /package/dist/native/{p-a0505695.entry.js.map → p-08452012.entry.js.map} +0 -0
- /package/dist/native/{p-0493c51a.entry.js.map → p-10ce53ea.entry.js.map} +0 -0
- /package/dist/native/{p-54198779.entry.js.map → p-12039da4.entry.js.map} +0 -0
- /package/dist/native/{p-86ab23ea.entry.js.map → p-1235c007.entry.js.map} +0 -0
- /package/dist/native/{p-003b6377.entry.js.map → p-16ef7dd4.entry.js.map} +0 -0
- /package/dist/native/{p-1d98477d.entry.js.map → p-1ad1bff9.entry.js.map} +0 -0
- /package/dist/native/{p-914da1e1.entry.js.map → p-1f932a4b.entry.js.map} +0 -0
- /package/dist/native/{p-a5c72bd3.entry.js.map → p-34bf336f.entry.js.map} +0 -0
- /package/dist/native/{p-e293b3fe.entry.js.map → p-3f139780.entry.js.map} +0 -0
- /package/dist/native/{p-dd256ea3.entry.js.map → p-40fa3328.entry.js.map} +0 -0
- /package/dist/native/{p-a983e6a0.entry.js.map → p-4b15cff3.entry.js.map} +0 -0
- /package/dist/native/{p-08ca678c.entry.js.map → p-51a57a3a.entry.js.map} +0 -0
- /package/dist/native/{p-5b06f4b5.entry.js.map → p-64cb38e6.entry.js.map} +0 -0
- /package/dist/native/{p-af1e6035.entry.js.map → p-67c34b8c.entry.js.map} +0 -0
- /package/dist/native/{p-e9962dac.entry.js.map → p-68edb2e8.entry.js.map} +0 -0
- /package/dist/native/{p-6029e51b.entry.js.map → p-85a54ef2.entry.js.map} +0 -0
- /package/dist/native/{p-c1765831.js.map → p-8d45dbfe.js.map} +0 -0
- /package/dist/native/{p-1a5d3b87.entry.js.map → p-9dc1c3e7.entry.js.map} +0 -0
- /package/dist/native/{p-bee972c7.entry.js.map → p-a50f3850.entry.js.map} +0 -0
- /package/dist/native/{p-19f484a0.entry.js.map → p-a73fa60a.entry.js.map} +0 -0
- /package/dist/native/{p-1e0df2d3.entry.js.map → p-bee62b2b.entry.js.map} +0 -0
- /package/dist/native/{p-45cbe6e4.entry.js.map → p-ec92ee7a.entry.js.map} +0 -0
- /package/dist/native/{p-6ea1c78b.entry.js.map → p-f00a4552.entry.js.map} +0 -0
- /package/dist/native/{p-dd6b1d79.entry.js.map → p-f540db71.entry.js.map} +0 -0
- /package/dist/native/{p-2d98d4f0.entry.js.map → p-fcd52432.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["nvFieldtimeCss","NvFieldtimeStyle0","NvFieldtime","constructor","hostRef","this","inputElements","inputZeroAdded","typeFocused","TimeType","Hours","hours","minutes","seconds","inputId","uuidv4","readonly","disabled","required","success","error","format","open","step","autofocus","handleOpenChanged","event","stopPropagation","detail","handleKeyDown","key","preventDefault","popoverElement","console","warn","stringSelector","items","Array","from","el","querySelectorAll","length","currentIndex","findIndex","item","classList","contains","updateHighlightedItem","click","_a","Minutes","focus","_b","select","Seconds","_c","_d","blur","handleValueChange","newValue","valueChanged","emit","handleInputChange","e","type","inputElement","target","inputValue","value","replace","handleHoursChange","handleMinutesChange","handleSecondsChange","currentValue","reconstructTime","isHHFormat","startsWith","maxHours","reputedToZero","maxHour","parseHour","max","minHour","min","newInputValue","padStart","parseInt","slice","parsedNewInputValue","toString","maxMinutes","minMinute","parseMinute","maxMinute","_e","_f","maxSeconds","minSecond","parseSecond","maxSecond","parseTime","timeString","cleanedTime","hour","minute","second","handleFocus","HandleDropdownIconClick","index","forEach","i","add","setAttribute","scrollIntoView","block","remove","handleTimeOptionClick","option","textContent","handleInputBlur","setTimeout","document","activeElement","handleClickOutside","Object","values","some","input","handleScroll","scrollTop","containerHeight","clientHeight","scrollHeight","itemHeight","options","generateTimeOptions","singleSetHeight","stepInSeconds","generateHourOptions","generateMinuteOptions","generateSecondOptions","hourStep","Math","floor","maxHourValue","minHourValue","push","hourStr","split","isNaN","minuteStep","parts","secondStep","generateInfiniteTimeOptions","totalOptions","repetitions","ceil","fill","flat","getCurrentTime","currentTime","Date","toLocaleTimeString","updateColumnHighlight","selector","x","handleHostClick","targetElement","closest","componentWillLoad","addEventListener","bind","connectedCallback","disconnectedCallback","removeEventListener","componentDidLoad","secondAmPm","amPm","includes","parsedHour","hourSelector","minuteSelector","secondSelector","RenderTimeOptionsColumn","h","class","onScroll","map","selected","onClick","render","Host","onclick","label","querySelector","htmlFor","name","ref","triggerMode","placement","slot","startsWithIgnoreCase","pattern","maxlength","onInput","placeholder","inputMode","onFocus","id","onKeyDown","onBlur","size","emphasis","description","errorDescription","hidden"],"sources":["src/components/nv-fieldtime/styles/nv-fieldtime.scss?tag=nv-fieldtime","src/components/nv-fieldtime/nv-fieldtime.tsx"],"sourcesContent":["@use './mixins' as *;\n@import '../../../styles/form-field';\n\nnv-fieldtime {\n @include form-field-variables();\n @include form-field-root();\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n @include apply-popover-style;\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n width: 100%;\n }\n\n .input-container {\n @include form-field-input-container();\n @include flex-container(flex-start);\n position: relative;\n width: 100%;\n min-height: 40px;\n gap: 0;\n padding-left: var(--form-field-padding-x);\n\n input.time-input {\n @include form-field-input();\n @include apply-input-styles();\n }\n\n span {\n width: 100%;\n text-align: center;\n min-width: 24px;\n flex: 0 0 24px;\n padding: 0 4px;\n color: var(--components-form-field-content-text);\n }\n\n > nv-iconbutton {\n @include form-field-action();\n margin-left: auto;\n }\n\n nv-icon.validation {\n @include form-field-icon();\n @include icon-position(50px);\n }\n\n &:focus,\n &:focus-within {\n @include apply-focus-styles;\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n\n hr {\n border: none;\n border-top: 1px solid var(--dropdown-divider-color, #ccc);\n margin: 0.5rem 0;\n }\n\n .time-dropdown {\n width: 100%;\n\n .time-columns {\n @include flex-container;\n\n .time-column {\n flex: 1;\n text-align: center;\n padding-right: 2px;\n @include scrollable(200px);\n\n &:last-child {\n border-right: none;\n }\n\n .time-option {\n padding: var(--list-dropdown-item-padding-y)\n var(--list-dropdown-item-padding-x);\n text-align: center;\n cursor: pointer;\n transition: background-color 0.2s;\n height: 40px;\n border-radius: var(--list-dropdown-item-radius);\n @include flex-container(center);\n\n &:hover {\n background-color: var(\n --components-list-dropdown-item-background-hover\n );\n color: var(--components-list-dropdown-item-label-hover);\n }\n\n @include state-focus(\n var(--components-list-dropdown-item-background-hover),\n var(--components-list-dropdown-item-label-hover)\n );\n\n &.selected {\n background-color: var(\n --components-list-dropdown-item-background-active\n );\n color: var(--components-list-dropdown-item-label-active);\n @include bordered-element(\n 1px,\n var(--components-list-dropdown-item-border-active)\n );\n }\n\n &.highlighted {\n background-color: var(\n --components-list-dropdown-item-background-hover\n );\n color: var(--components-menu-contextual-item-content-hover);\n }\n }\n }\n }\n }\n}\n","/* eslint-disable react/jsx-no-bind */\nimport {\n Component,\n Host,\n h,\n State,\n Element,\n Event,\n EventEmitter,\n Prop,\n Watch,\n Listen,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { startsWithIgnoreCase } from '../../utils/string.utils';\nimport { TimeType } from '../../utils/constants';\n\n/**\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n */\n@Component({\n tag: 'nv-fieldtime',\n styleUrl: 'styles/nv-fieldtime.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldtime {\n @Element() el: HTMLNvFieldtimeElement;\n\n // Input elements for hours, minutes, and seconds\n private inputElements: { [key: string]: HTMLInputElement } = {};\n\n private inputZeroAdded: { [key: string]: boolean } = {};\n\n private popoverElement!: HTMLNvPopoverElement;\n\n private typeFocused: TimeType = TimeType.Hours;\n\n /****************************************************************************/\n //#region STATES\n\n @State()\n hours: string = '00';\n @State()\n minutes: string = '00';\n @State()\n seconds: string = '00';\n\n //#endregion STATES\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * The current value of the time input in the specified format.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * Lets you define the text that explains what users should enter in the time\n * input field. It's a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Display the input field's content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won't be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * The disabled prop lets you turn off the input field so that users can't\n * interact with it. When disabled, the field is grayed out and won't respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input's data in form submissions.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Alters the input field's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the time\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Specifies the time format to be used.\n * Available formats:\n * - HH: 24-hour format (00-23)\n * - HH:mm: 24-hour format with minutes (00:00-23:59)\n * - HH:mm:ss: 24-hour format with minutes and seconds (00:00:00-23:59:59)\n * - hh: 12-hour format (01-12)\n * - hh:mm: 12-hour format with minutes (01:00-12:59)\n * - hh:mm:ss: 12-hour format with minutes and seconds (01:00:00-12:59:59)\n */\n @Prop({ reflect: true })\n readonly format: 'HH' | 'HH:mm' | 'HH:mm:ss' | 'hh' | 'hh:mm' | 'hh:mm:ss' =\n 'HH:mm:ss';\n\n /**\n * Add helpful hints or extra information under the time input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * State of the time picker popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * The step interval in milliseconds for time increments/decrements.\n * This affects how the time changes when using arrow keys or spinners.\n */\n @Prop({ reflect: true })\n readonly step: number = 60000; // In secondes\n\n /**\n * The maximum time value that can be selected.\n */\n @Prop({ reflect: true })\n readonly max: string;\n\n /**\n * The minimum time value that can be selected.\n */\n @Prop({ reflect: true })\n readonly min: string;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emit an event when the time value changes.\n * The event detail contains the new time value (HH, HH:mm or HH:mm:ss).\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region LISTENERS\n\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n // Stop propagation to prevent the event from affecting parent components like dialogs\n event.stopPropagation();\n\n // Update `open` based on the popover state\n this.open = event.detail;\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n // Verify if the popover element is defined\n if (!this.popoverElement) {\n console.warn('nv-fieldtime -> Popover element is not defined');\n return;\n }\n\n const stringSelector = `.time-column.time-column-${this.typeFocused} div`;\n const items = Array.from(\n this.el.querySelectorAll<HTMLElement>(stringSelector),\n );\n\n // Verify if there are items to navigate\n if (items.length === 0) {\n console.warn('nv-fieldtime -> No dropdown items found to navigate');\n return;\n }\n\n let currentIndex = items.findIndex(item =>\n item.classList.contains('highlighted'),\n );\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n currentIndex = (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex = (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Enter' && currentIndex >= 0) {\n event.preventDefault();\n items[currentIndex].click();\n\n if (this.typeFocused === TimeType.Hours) {\n this.inputElements[TimeType.Minutes]?.focus();\n this.inputElements[TimeType.Minutes]?.select();\n } else if (\n this.typeFocused === TimeType.Minutes ||\n this.typeFocused === TimeType.Seconds\n ) {\n this.inputElements[TimeType.Seconds]?.focus();\n this.inputElements[TimeType.Seconds]?.select();\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n\n if (this.inputElements[TimeType.Hours]) {\n this.inputElements[TimeType.Hours].blur();\n }\n }\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n handleValueChange(newValue: string) {\n this.valueChanged.emit(newValue);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleInputChange(e: InputEvent, type: TimeType): void {\n const inputElement = e.target as HTMLInputElement;\n const inputValue = inputElement.value.replace(/[^0-9]/g, ''); // Only keep numeric input\n\n // Update the time value based on the type\n switch (type) {\n case TimeType.Hours:\n this.handleHoursChange(inputValue, type);\n break;\n case TimeType.Minutes:\n this.handleMinutesChange(inputValue, type);\n break;\n case TimeType.Seconds:\n this.handleSecondsChange(inputValue, type);\n break;\n }\n\n // Reconstruct time from inputs\n const currentValue = this.reconstructTime();\n\n this.value = currentValue;\n }\n\n private handleHoursChange(inputValue: string, type: TimeType): void {\n const isHHFormat = this.format.startsWith('HH');\n const maxHours = isHHFormat ? 24 : 12;\n let reputedToZero = false;\n const maxHour =\n this.parseHour(this.max, this.format) ||\n (this.format.startsWith('hh') ? '12' : '24');\n const minHour = this.parseHour(this.min, this.format) || '00';\n\n if (inputValue.length === 1) {\n this.inputZeroAdded[type] = true;\n\n const newInputValue = inputValue.padStart(2, '0');\n\n if (maxHour && parseInt(newInputValue, 10) > parseInt(maxHour, 10)) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = newInputValue;\n }\n }\n } else if (this.inputZeroAdded[type]) {\n this.inputZeroAdded[type] = false;\n\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxHours) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (maxHour && parseInt(newInputValue, 10) > parseInt(maxHour, 10)) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = newInputValue;\n }\n }\n }\n } else if (inputValue.length > 2) {\n if (inputValue.startsWith('00')) {\n this.inputZeroAdded[type] = true;\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n\n if (maxHour && parseInt(newInputValue, 10) > parseInt(maxHour, 10)) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = newInputValue;\n }\n }\n } else {\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxHours) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n reputedToZero = true;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (maxHour && parsedNewInputValue > parseInt(maxHour, 10)) {\n if (\n minHour &&\n parseInt(newInputValue, 10) < parseInt(minHour, 10)\n ) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (minHour && parsedNewInputValue < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = parsedNewInputValue.toString();\n }\n }\n }\n }\n } else {\n const newInputValue = inputValue.padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxHours) {\n if (minHour && parseInt(newInputValue, 10) < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = '00';\n reputedToZero = true;\n }\n } else {\n if (maxHour && parsedNewInputValue > parseInt(maxHour, 10)) {\n this.hours = '00';\n reputedToZero = true;\n } else {\n if (minHour && parsedNewInputValue < parseInt(minHour, 10)) {\n this.hours = minHour;\n } else {\n this.hours = parsedNewInputValue.toString();\n }\n }\n }\n }\n\n if (\n this.hours.length === 2 &&\n !this.inputZeroAdded[type] &&\n !reputedToZero\n ) {\n this.inputElements[TimeType.Minutes]?.focus();\n this.inputElements[TimeType.Minutes]?.select();\n } else if (reputedToZero) {\n this.inputElements[TimeType.Hours]?.focus();\n this.inputElements[TimeType.Hours]?.select();\n }\n }\n\n private handleMinutesChange(inputValue: string, type: TimeType): void {\n const maxMinutes = 60;\n let reputedToZero = false;\n const minMinute = this.parseMinute(this.min) ?? 0;\n const maxMinute = this.parseMinute(this.max) ?? 59;\n\n if (inputValue.length === 1) {\n this.inputZeroAdded[type] = true;\n\n const newInputValue = inputValue.padStart(2, '0');\n\n if (maxMinute && parseInt(newInputValue, 10) > maxMinute) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = newInputValue;\n }\n }\n } else if (this.inputZeroAdded[type]) {\n this.inputZeroAdded[type] = false;\n\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxMinutes) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (maxMinute && parsedNewInputValue > maxMinute) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (minMinute && parsedNewInputValue < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = newInputValue;\n }\n }\n }\n } else if (inputValue.length > 2) {\n if (inputValue.startsWith('00')) {\n this.inputZeroAdded[type] = true;\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n\n if (maxMinute && parseInt(newInputValue, 10) > maxMinute) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = newInputValue;\n }\n }\n } else {\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxMinutes) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (maxMinute && parsedNewInputValue > maxMinute) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (minMinute && parsedNewInputValue < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = parsedNewInputValue.toString();\n }\n }\n }\n }\n } else {\n const newInputValue = inputValue.padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxMinutes) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (maxMinute && parsedNewInputValue > maxMinute) {\n if (minMinute && parseInt(newInputValue, 10) < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = '00';\n reputedToZero = true;\n }\n } else {\n if (minMinute && parsedNewInputValue < minMinute) {\n this.minutes = minMinute.toString().padStart(2, '0');\n } else {\n this.minutes = parsedNewInputValue.toString();\n }\n }\n }\n }\n\n if (\n this.minutes.length === 2 &&\n !this.inputZeroAdded[type] &&\n !reputedToZero\n ) {\n this.inputElements[TimeType.Seconds]?.focus();\n this.inputElements[TimeType.Seconds]?.select();\n } else if (reputedToZero) {\n this.inputElements[TimeType.Minutes]?.focus();\n this.inputElements[TimeType.Minutes]?.select();\n }\n }\n\n private handleSecondsChange(inputValue: string, type: TimeType): void {\n const maxSeconds = 60;\n let reputedToZero = false;\n const minSecond = this.parseSecond(this.min) ?? 0;\n const maxSecond = this.parseSecond(this.max) ?? 59;\n\n if (inputValue.length === 1) {\n this.inputZeroAdded[type] = true;\n const newInputValue = inputValue.padStart(2, '0');\n\n if (maxSecond && parseInt(newInputValue, 10) > maxSecond) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = newInputValue;\n }\n }\n } else if (this.inputZeroAdded[type]) {\n this.inputZeroAdded[type] = false;\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxSeconds) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (maxSecond && parsedNewInputValue > maxSecond) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (minSecond && parsedNewInputValue < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = newInputValue;\n }\n }\n }\n } else if (inputValue.length > 2) {\n const newInputValue = inputValue.slice(1, 3).padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxSeconds) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (maxSecond && parsedNewInputValue > maxSecond) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (minSecond && parsedNewInputValue < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = parsedNewInputValue.toString();\n }\n }\n }\n } else {\n const newInputValue = inputValue.padStart(2, '0');\n const parsedNewInputValue = parseInt(newInputValue, 10) || 0;\n\n if (parsedNewInputValue >= maxSeconds) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (maxSecond && parsedNewInputValue > maxSecond) {\n if (minSecond && parseInt(newInputValue, 10) < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = '00';\n reputedToZero = true;\n }\n } else {\n if (minSecond && parsedNewInputValue < minSecond) {\n this.seconds = minSecond.toString().padStart(2, '0');\n } else {\n this.seconds = parsedNewInputValue.toString();\n }\n }\n }\n }\n\n if (reputedToZero) {\n this.inputElements[TimeType.Seconds]?.focus();\n this.inputElements[TimeType.Seconds]?.select();\n }\n }\n\n // Parse a continuous time string (e.g., \"123456\") into hours, minutes, and seconds\n private parseTime(timeString: string): void {\n if (!timeString) {\n return;\n }\n\n const cleanedTime = timeString.replace(/[^0-9]/g, '').padStart(6, '0');\n const hour = cleanedTime.slice(0, 2);\n const minute = cleanedTime.slice(2, 4);\n const second = cleanedTime.slice(4, 6);\n\n const minHour = this.parseHour(this.min, this.format) || hour;\n const minMinute = this.parseMinute(this.min) || minute;\n const minSecond = this.parseSecond(this.min) || second;\n\n this.hours = minHour.padStart(2, '0');\n this.minutes = minMinute.toString().padStart(2, '0');\n this.seconds = minSecond.toString().padStart(2, '0');\n }\n\n private reconstructTime(): string {\n if (this.format === 'HH' || this.format === 'hh') {\n return this.hours;\n } else if (this.format === 'HH:mm' || this.format === 'hh:mm') {\n return `${this.hours}:${this.minutes}`;\n } else if (this.format === 'HH:mm:ss' || this.format === 'hh:mm:ss') {\n return `${this.hours}:${this.minutes}:${this.seconds}`;\n } else {\n return `${this.hours}:${this.minutes}:${this.seconds}`;\n }\n }\n\n private handleFocus(type: TimeType): void {\n if (this.readonly || this.disabled) {\n return;\n }\n\n if (!this.open) {\n this.open = true; // Force the popover to open\n }\n\n // Refocus on the input if it loses focus and is empty\n if (\n this.inputElements[type]?.value.length === 0 ||\n this.inputElements[type]?.value === '00'\n ) {\n this.inputElements[type]?.focus();\n this.inputElements[type]?.select();\n }\n\n this.typeFocused = type;\n }\n\n private HandleDropdownIconClick(): void {\n if (this.disabled || this.readonly) {\n return; // Do not toggle if disabled or read-only\n }\n\n if (this.open && this.inputElements[TimeType.Hours]) {\n this.open = false; // Close the popover if it is open\n } else if (this.open && this.inputElements[TimeType.Minutes]) {\n this.open = false; // Close the popover if it is open\n } else if (this.open && this.inputElements[TimeType.Seconds]) {\n this.open = false; // Close the popover if it is open\n } else if (!this.open && this.inputElements[TimeType.Hours]) {\n this.inputElements[TimeType.Hours]?.focus(); // Focus will open the popover\n this.inputElements[TimeType.Hours]?.select();\n } else if (!this.open && this.inputElements[TimeType.Minutes]) {\n this.inputElements[TimeType.Minutes]?.focus(); // Focus will open the popover\n this.inputElements[TimeType.Minutes]?.select();\n } else if (!this.open && this.inputElements[TimeType.Seconds]) {\n this.inputElements[TimeType.Seconds]?.focus(); // Focus will open the popover\n this.inputElements[TimeType.Seconds]?.select();\n } else {\n console.warn(\n 'nv-fieldtime -> No input elements found to focus or to blur',\n );\n }\n }\n\n private updateHighlightedItem(items: HTMLElement[], index: number) {\n items.forEach((item, i) => {\n if (i === index) {\n item.classList.add('highlighted');\n item.setAttribute('tabindex', '0');\n item.focus(); // Forcer le focus ici\n item.scrollIntoView({ block: 'nearest' });\n } else {\n item.classList.remove('highlighted');\n item.setAttribute('tabindex', '-1');\n }\n });\n }\n\n private handleTimeOptionClick(event: MouseEvent, type: TimeType): void {\n const option = parseInt(\n (event.target as HTMLElement).textContent || '0',\n 10,\n );\n\n if (type === TimeType.Hours) {\n this.hours = option.toString().padStart(2, '0');\n } else if (type === TimeType.Minutes) {\n this.minutes = option.toString().padStart(2, '0');\n } else if (type === TimeType.Seconds) {\n this.seconds = option.toString().padStart(2, '0');\n }\n\n const reconstructTime = this.reconstructTime();\n this.value = reconstructTime;\n }\n\n private handleInputBlur(): void {\n // Use a delay to check if the focus is still within the popover\n setTimeout(() => {\n if (!this.el.contains(document.activeElement)) {\n if (this.open) {\n this.open = false; // Close the popover if the focus is outside the component\n }\n }\n }, 150);\n }\n\n private handleClickOutside(event: MouseEvent) {\n const target = event.target as Node;\n\n // Check if the click is inside the component or any of the input elements\n if (\n this.el.contains(target) ||\n Object.values(this.inputElements).some(input => input.contains(target))\n ) {\n return;\n }\n\n if (this.open) {\n this.open = false; // Close the popover if the click is outside\n }\n }\n\n private handleScroll(e: Event, type: TimeType): void {\n const target = e.target as HTMLElement;\n const scrollTop = target.scrollTop;\n const containerHeight = target.clientHeight;\n const scrollHeight = target.scrollHeight;\n\n // Define the height of each item, this could be dynamic if the height varies\n const itemHeight = 40; // Consider making this configurable or dynamic\n const options = this.generateTimeOptions(type); // Generates the list of time options\n const singleSetHeight = options.length * itemHeight;\n\n // Check if the scroll is near the bottom or top and reset to the first set\n if (\n scrollTop + containerHeight >= scrollHeight - itemHeight ||\n scrollTop <= 0\n ) {\n target.scrollTop = singleSetHeight; // Reset to the first set from the bottom\n }\n }\n\n private generateTimeOptions(type: TimeType) {\n // Convert the step in seconds\n const stepInSeconds = this.step / 1000;\n\n // Handle edge case for zero step\n if (stepInSeconds === 0) {\n return ['00']; // Just return the default value\n }\n\n // Generate the time options based on the type\n switch (type) {\n case TimeType.Hours:\n return this.generateHourOptions(stepInSeconds);\n\n case TimeType.Minutes:\n return this.generateMinuteOptions(stepInSeconds);\n\n case TimeType.Seconds:\n return this.generateSecondOptions(stepInSeconds);\n\n default:\n return [];\n }\n }\n\n private generateHourOptions(stepInSeconds: number): string[] {\n const hourStep = Math.max(1, Math.floor(stepInSeconds / 3600)); // Prevent step < 1\n const maxHour =\n this.parseHour(this.max, this.format) ||\n (this.format.startsWith('hh') ? '12' : '24');\n const minHour = this.parseHour(this.min, this.format) || '00';\n\n const maxHourValue = parseInt(maxHour, 10);\n const minHourValue = parseInt(minHour, 10);\n const values: string[] = [];\n\n for (let i = minHourValue; i < maxHourValue; i += hourStep) {\n values.push(i.toString().padStart(2, '0'));\n }\n\n return values;\n }\n\n private parseHour(value: string | null, format: string): string | null {\n if (!value) return null;\n const [hourStr] = value.split(':');\n const hour = parseInt(hourStr, 10);\n if (isNaN(hour)) return null;\n if (format.startsWith('hh'))\n return hour > 0 && hour <= 12 ? hourStr.padStart(2, '0') : null;\n return hour >= 0 && hour <= 24 ? hourStr.padStart(2, '0') : null;\n }\n\n private generateMinuteOptions(stepInSeconds: number): string[] {\n const minuteStep = Math.max(1, Math.floor((stepInSeconds % 3600) / 60)); // Ensure step >= 1\n const minMinute = this.parseMinute(this.min) ?? 0;\n const maxMinute = this.parseMinute(this.max) ?? 59;\n\n if (minMinute === 0 && maxMinute === 0) return ['00']; // Handle edge case for zero seconds\n\n const values: string[] = [];\n\n for (let i = minMinute; i <= maxMinute; i += minuteStep) {\n values.push(i.toString().padStart(2, '0'));\n }\n\n return values;\n }\n\n private parseMinute(value: string | null): number | null {\n if (!value) return null;\n const parts = value.split(':');\n if (parts.length < 2) return null; // Expect at least \"hh:mm\"\n const minute = parseInt(parts[1], 10);\n return isNaN(minute) || minute < 0 || minute >= 60 ? null : minute;\n }\n\n private generateSecondOptions(stepInSeconds: number): string[] {\n const secondStep = Math.max(1, stepInSeconds % 60); // Ensure step >= 1\n const minSecond = this.parseSecond(this.min) ?? 0;\n const maxSecond = this.parseSecond(this.max) ?? 59;\n\n if (minSecond === 0 && maxSecond === 0) return ['00']; // Handle edge case for zero seconds\n\n const values: string[] = [];\n\n for (let i = minSecond; i <= maxSecond; i += secondStep) {\n values.push(i.toString().padStart(2, '0'));\n }\n\n return values;\n }\n\n private parseSecond(value: string | null): number | null {\n if (!value) return null;\n const parts = value.split(':');\n if (parts.length < 3) return null; // Expect \"hh:mm:ss\" or \"HH:mm:ss\"\n const second = parseInt(parts[2], 10);\n return isNaN(second) || second < 0 || second >= 60 ? null : second;\n }\n\n private generateInfiniteTimeOptions(type: TimeType): string[] {\n const options = this.generateTimeOptions(type);\n const totalOptions = options.length;\n\n // Dynamically calculate repetitions based on a target number of items (e.g., 300 items)\n const repetitions = Math.ceil(300 / totalOptions);\n return Array(repetitions).fill(options).flat();\n }\n\n private getCurrentTime(): string {\n const currentTime = new Date();\n return currentTime.toLocaleTimeString(); // Returns the time in the locale's format\n }\n\n private updateColumnHighlight(selector, value): void {\n const items = Array.from(this.el.querySelectorAll<HTMLElement>(selector));\n\n const index = items.findIndex(x => x.textContent === value);\n this.updateHighlightedItem(items, index);\n }\n\n private handleHostClick(event: MouseEvent): void {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const targetElement = event.target as HTMLElement;\n\n // Check if the click target or its ancestors are inside an nv-iconbutton element\n if (targetElement.closest('nv-iconbutton')) {\n return; // Handle icon button click separately\n }\n\n if (!this.open) {\n if (this.inputElements) {\n this.inputElements[TimeType.Hours]?.focus();\n this.inputElements[TimeType.Hours]?.select();\n }\n\n event.preventDefault();\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n document.addEventListener('click', this.handleClickOutside.bind(this));\n\n // If an initial value is passed, parse it\n if (this.value) {\n this.parseTime(this.value);\n } else {\n const minHour = this.parseHour(this.min, this.format) || '00';\n const minMinute = this.parseMinute(this.min) || 0;\n const minSecond = this.parseSecond(this.min) || 0;\n\n this.hours = minHour.padStart(2, '0');\n this.minutes = minMinute.toString().padStart(2, '0');\n this.seconds = minSecond.toString().padStart(2, '0');\n }\n }\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside.bind(this));\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside.bind(this));\n }\n\n componentDidLoad() {\n if (!this.value) {\n const currentTime = this.getCurrentTime();\n\n // Split time into components\n // eslint-disable-next-line prefer-const\n let [hour, minute, secondAmPm] = currentTime.split(':');\n let second, amPm;\n\n // Check if AM/PM is present and split accordingly\n if (secondAmPm.includes(' ')) {\n [second, amPm] = secondAmPm.split(' ');\n } else {\n second = secondAmPm;\n }\n\n // Parse hour as integer for calculations\n let parsedHour = parseInt(hour, 10);\n\n // Convert hour to 24-hour format based on AM/PM (if present)\n if (amPm) {\n if (amPm === 'PM' && parsedHour < 12) {\n parsedHour += 12; // Convert PM to 24-hour\n } else if (amPm === 'AM' && parsedHour === 12) {\n parsedHour = 0; // Midnight in 24-hour format\n }\n }\n\n // Adjust for 12-hour format if necessary\n if (this.format.startsWith('hh')) {\n if (parsedHour === 0) {\n hour = '12'; // Midnight in 12-hour format\n } else if (parsedHour > 12) {\n hour = (parsedHour - 12).toString(); // Convert 24-hour to 12-hour\n } else {\n hour = parsedHour.toString();\n }\n } else {\n hour = parsedHour.toString(); // Use 24-hour format directly\n }\n\n // Pad hour, minute, and second to ensure two digits\n hour = hour.padStart(2, '0');\n minute = minute.padStart(2, '0');\n second = second.padStart(2, '0');\n\n // Update highlighted items for hours\n const hourSelector = `.time-column.time-column-hours div`;\n this.updateColumnHighlight(hourSelector, hour);\n\n // Update highlighted items for minutes\n const minuteSelector = `.time-column.time-column-minutes div`;\n this.updateColumnHighlight(minuteSelector, minute);\n\n // Update highlighted items for seconds\n const secondSelector = `.time-column.time-column-seconds div`;\n this.updateColumnHighlight(secondSelector, second);\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n private RenderTimeOptionsColumn(type: TimeType): HTMLElement {\n return (\n <div\n class={`time-column time-column-${type}`}\n onScroll={e => this.handleScroll(e, type)}\n >\n {/* Hours */}\n {this.generateInfiniteTimeOptions(type).map((option, index) => (\n <div\n class={{\n 'time-option': true,\n 'selected':\n (type === TimeType.Hours && option === this.hours) ||\n (type === TimeType.Minutes && option === this.minutes) ||\n (type === TimeType.Seconds && option === this.seconds),\n }}\n key={`${option}-${index}`}\n onClick={e => this.handleTimeOptionClick(e, type)}\n >\n {option}\n </div>\n ))}\n </div>\n );\n }\n\n render() {\n return (\n <Host onclick={e => this.handleHostClick(e)}>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\">\n <slot name=\"leading-input\"></slot>\n {/* Input fields for hours, minutes, and seconds */}\n {/* Hours */}\n {startsWithIgnoreCase(this.format, 'HH') && [\n <input\n ref={el => (this.inputElements[TimeType.Hours] = el)}\n type=\"number\"\n autofocus={this.autofocus}\n class=\"time-input\"\n pattern=\"[0-9]*\"\n maxlength=\"3\"\n value={this.hours}\n onInput={e => this.handleInputChange(e, TimeType.Hours)}\n placeholder={this.format.includes('hh') ? 'hh' : 'HH'}\n inputMode=\"numeric\"\n onFocus={() => this.handleFocus(TimeType.Hours)}\n name={\n this.name\n ? `${TimeType.Hours}-${this.name}`\n : TimeType.Hours\n }\n id={this.inputId}\n readonly={this.readonly}\n disabled={this.disabled}\n required={this.required}\n onKeyDown={e => this.handleKeyDown(e)} // Handle arrow keys\n onBlur={() => this.handleInputBlur()}\n />,\n ]}\n {/* Minutes */}\n {this.format.includes('mm') && [\n <span>:</span>,\n <input\n ref={el => (this.inputElements[TimeType.Minutes] = el)}\n type=\"number\"\n autofocus={this.autofocus}\n class=\"time-input\"\n pattern=\"[0-9]*\"\n maxlength=\"3\"\n value={this.minutes}\n onInput={e => this.handleInputChange(e, TimeType.Minutes)}\n placeholder=\"mm\"\n inputMode=\"numeric\"\n onFocus={() => this.handleFocus(TimeType.Minutes)}\n name={\n this.name\n ? `${TimeType.Minutes}-${this.name}`\n : TimeType.Minutes\n }\n id={`${this.inputId}-minutes`}\n readonly={this.readonly}\n disabled={this.disabled}\n required={this.required}\n onKeyDown={e => this.handleKeyDown(e)} // Handle arrow keys\n onBlur={() => this.handleInputBlur()}\n />,\n ]}\n {/* Seconds */}\n {this.format.includes('ss') && [\n <span>:</span>,\n\n <input\n ref={el => (this.inputElements[TimeType.Seconds] = el)}\n type=\"number\"\n autofocus={this.autofocus}\n class=\"time-input\"\n pattern=\"[0-9]*\"\n maxlength=\"3\"\n value={this.seconds}\n onInput={e => this.handleInputChange(e, TimeType.Seconds)}\n placeholder=\"ss\"\n inputMode=\"numeric\"\n onFocus={() => this.handleFocus(TimeType.Seconds)}\n name={\n this.name\n ? `${TimeType.Seconds}-${this.name}`\n : TimeType.Seconds\n }\n id={`${this.inputId}-seconds`}\n readonly={this.readonly}\n disabled={this.disabled}\n required={this.required}\n onKeyDown={e => this.handleKeyDown(e)} // Handle arrow keys\n onBlur={() => this.handleInputBlur()}\n />,\n ]}\n\n <nv-iconbutton\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide time picker' : 'Show time picker'}\n aria-pressed={this.open.toString()}\n onClick={() => this.HandleDropdownIconClick()}\n />\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"sm\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"sm\" />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div class=\"time-dropdown\" slot=\"content\">\n <div class=\"time-columns\">\n {startsWithIgnoreCase(this.format, 'HH') &&\n this.RenderTimeOptionsColumn(TimeType.Hours)}\n {this.format.includes('mm') &&\n this.RenderTimeOptionsColumn(TimeType.Minutes)}\n {this.format.includes('ss') &&\n this.RenderTimeOptionsColumn(TimeType.Seconds)}\n </div>\n </div>\n </nv-popover>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"mappings":"4KAAA,MAAMA,EAAiB,gqUACvB,MAAAC,EAAeD,E,MC8BFE,EAAW,MANxB,WAAAC,CAAAC,G,qDAUUC,KAAAC,cAAqD,GAErDD,KAAAE,eAA6C,GAI7CF,KAAAG,YAAwBC,EAASC,MAMzCL,KAAAM,MAAgB,KAEhBN,KAAAO,QAAkB,KAElBP,KAAAQ,QAAkB,KA2BTR,KAAAS,QAAkBC,IAQlBV,KAAAW,SAAoB,MAQpBX,KAAAY,SAAoB,MAOpBZ,KAAAa,S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D9M,KAAKc,SACJqK,EAAA,WAAA1J,IAAA,2CAASsK,KAAK,eAAeX,MAAM,aAAa0B,KAAK,QAIzD3B,EAAA,QAAA1J,IAAA,2CAAMsK,KAAK,iBAGbZ,EAAA,OAAA1J,IAAA,2CAAK2J,MAAM,gBAAgBe,KAAK,WAC9BhB,EAAA,OAAA1J,IAAA,2CAAK2J,MAAM,gBACRgB,EAAqBpM,KAAKgB,OAAQ,OACjChB,KAAKkL,wBAAwB9K,EAASC,OACvCL,KAAKgB,OAAO6J,SAAS,OACpB7K,KAAKkL,wBAAwB9K,EAASyC,SACvC7C,KAAKgB,OAAO6J,SAAS,OACpB7K,KAAKkL,wBAAwB9K,EAAS6C,aAK5CjD,KAAKgN,aACLhN,KAAKkC,GAAG2J,cAAc,0BACtBV,EAAA,OAAA1J,IAAA,2CAAK2J,MAAM,eACTD,EAAA,QAAA1J,IAAA,2CAAMsK,KAAK,eAAe/L,KAAKgN,eAIjChN,KAAKiN,kBACLjN,KAAKkC,GAAG2J,cAAc,gCACtBV,EAAA,OAAA1J,IAAA,2CAAKyL,QAASlN,KAAKe,MAAOqK,MAAM,qBAC9BD,EAAA,QAAA1J,IAAA,2CAAMsK,KAAK,qBAAqB/L,KAAKiN,mB","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["nvFielddaterangeCss","NvFielddaterangeStyle0","NvFielddaterange","constructor","hostRef","this","popoverId","uuidv4","startInputId","endInputId","disabled","readonly","required","error","success","autofocus","value","startValue","endValue","open","firstDayOfWeek","numberOfCalendars","min","max","locale","dateFormat","shortcutsPlacement","showActions","fluid","parseUnifiedValue","values","split","map","v","trim","filter","Boolean","length","console","warn","handleClickOutside","event","el","contains","target","handleStartInput","preventDefault","input","valueChanged","emit","dateRangeChange","start","end","calendarElement","removeAttribute","updateCalendarValue","setTimeout","setAttribute","handleEndInput","handleFocus","blur","toggleCalendar","convertToInputmaskFormat","format","formatMap","YYYYMMDD","connectedCallback","document","addEventListener","componentWillLoad","componentDidLoad","inputs","querySelectorAll","forEach","inputMask","Inputmask","alias","inputFormat","placeholder","clearIncomplete","showMaskOnHover","showMaskOnFocus","clearMaskOnLostFocus","insertMode","rightAlign","oncomplete","e","CustomEvent","bubbles","dispatchEvent","mask","name","startName","requestAnimationFrame","endName","componentDidRender","disconnectedCallback","removeEventListener","handleRangeDateChange","detail","handleCalendarValueChanged","newValue","handleClosePopover","handleApplyDateRange","handleDateReset","isResetSingle","type","isResetRange","handleKeyDown","key","popoverElement","handleValueChange","onOpenChanged","contentRef","style","transition","maxHeight","scrollHeight","render","h","Host","label","querySelector","htmlFor","ref","id","triggerMode","placement","slot","class","startPlaceholder","readOnly","onInput","onFocus","endPlaceholder","size","emphasis","toString","onClick","tabIndex","shortcuts","showWeekNumbers","disabledDates","selectionType","description","errorDescription","hidden"],"sources":["src/components/nv-fielddaterange/styles/nv-fielddaterange.scss?tag=nv-fielddaterange","src/components/nv-fielddaterange/nv-fielddaterange.tsx"],"sourcesContent":["@import '../../../styles/form-field';\n@import './mixins';\n\nnv-fielddaterange {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n width: 100%;\n display: block;\n\n [data-scope='popover'] {\n padding: 0;\n background-color: var(--components-list-dropdown-background);\n border: 1px solid var(--components-list-dropdown-border);\n width: auto;\n }\n\n [slot='content'] {\n display: block;\n width: 100%;\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n display: flex;\n align-items: center;\n gap: 8px;\n\n .input-container {\n @include form-field-input-container();\n\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n box-shadow: none;\n border-color: var(--nv-field-border-default);\n }\n\n input {\n @include form-field-input();\n width: 100%;\n &:focus-within,\n &:focus-within:hover,\n &:focus,\n &:focus:hover {\n outline: var(--focus-outline-stroke) solid var(--nv-field-border-focus);\n outline-offset: 0px;\n & ~ .range-separator {\n background-color: transparent;\n }\n }\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n\n .range-inputs {\n display: flex;\n align-items: center;\n gap: 0;\n width: 100%;\n\n input {\n flex: 1;\n border: none;\n outline: none;\n padding: 0;\n font-size: var(--form-field-font-size);\n color: var(--components-form-field-content-text);\n background: transparent;\n min-width: 0; // to avoid overflow\n\n &::placeholder {\n color: var(--components-form-field-content-placeholder);\n }\n\n &:disabled {\n cursor: not-allowed;\n color: var(--components-form-field-content-text);\n background-color: var(--components-form-field-background-disabled);\n }\n }\n\n .range-separator {\n @include range-separator();\n }\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Host,\n Watch,\n} from '@stencil/core';\nimport Inputmask from 'inputmask';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot default - Child content of the component.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddaterange',\n styleUrl: 'styles/nv-fielddaterange.scss',\n shadow: false,\n})\nexport class NvFielddaterange {\n @Element() el!: HTMLNvFielddaterangeElement;\n private popoverElement!: HTMLNvPopoverElement;\n private calendarElement!: HTMLNvCalendarElement;\n private popoverId: string = uuidv4();\n private contentRef?: HTMLDivElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Text displayed as label. A slot label can override this prop.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Description displayed below the input. A slot description can override this prop.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Placeholder for the start input field.\n */\n @Prop({ reflect: true })\n readonly startPlaceholder: string;\n\n /**\n * Placeholder for the end input field.\n */\n @Prop({ reflect: true })\n readonly endPlaceholder: string;\n\n /**\n * Name attribute for the start input.\n */\n @Prop({ reflect: true })\n readonly startName: string;\n\n /**\n * Name attribute for the end input.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Disables both input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets both input fields as read-only.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks both input fields as required.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Indicates an error state.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * Error description. A slot error-description can override this prop.\n */\n @Prop({ reflect: true })\n readonly errorDescription?: string;\n\n /**\n * Indicates a success state.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Autofocus the start input when the component is mounted.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * The initial value of the date range (in string format).\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * The current value of the start date in string format.\n */\n @State()\n startValue: string = '';\n\n /**\n * The current value of the end date in string format.\n */\n @State()\n endValue: string = '';\n\n /**\n * Controls the opening of the popover.\n */\n @State()\n open: boolean = false;\n\n /**\n * First day of the week 0 = Sunday, 1 = Monday, etc.\n * @default 1\n */\n @Prop({ reflect: true })\n readonly firstDayOfWeek: number = 1;\n\n /**\n * Number of calendars to display\n * @default 2\n */\n @Prop({ reflect: true })\n readonly numberOfCalendars: number = 2;\n\n /**\n * Minimum date for selection ISO string format, ex: 2025-01-01\n */\n @Prop({ reflect: true })\n readonly min?: string = '';\n\n /**\n * Maximum date for selection ISO string format, ex: 2025-12-31\n */\n @Prop({ reflect: true })\n readonly max?: string = '';\n\n /** Locale for date formatting\n * @default 'en-BE'\n */\n @Prop({ reflect: true })\n readonly locale: string = 'en-BE';\n\n /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.\n * @default 'YYYY-MM-DD'\n */\n @Prop({ reflect: true })\n readonly dateFormat: string = 'YYYY-MM-DD';\n\n /**\n * Footer placement\n * @default 'bottom'\n */\n @Prop({ reflect: true })\n readonly shortcutsPlacement: 'bottom' | 'left' | 'right' = 'bottom';\n\n /**\n * Show action buttons\n * @default false\n */\n @Prop({ reflect: true })\n readonly showActions: boolean = false;\n\n /**\n * Custom actions to display in the footer\n */\n @Prop({ reflect: true })\n readonly shortcuts: HTMLNvCalendarElement['shortcuts'];\n\n /**\n * Show week numbers\n */\n @Prop({ reflect: true })\n readonly showWeekNumbers: boolean;\n\n /**\n * Disabled dates ISO string array\n */\n @Prop({ reflect: true })\n readonly disabledDates: Array<string>;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Parses the unified value prop and synchronizes with internal state\n * @param {string} value - Value to parse\n */\n private parseUnifiedValue = (value: string): void => {\n if (!value) {\n // Reset all selections\n this.startValue = '';\n this.endValue = '';\n return;\n }\n\n const values = value\n .split(',')\n .map(v => v.trim())\n .filter(Boolean);\n\n if (values.length >= 2) {\n this.startValue = values[0];\n this.endValue = values[1];\n } else {\n // Handle malformed value gracefully\n console.warn(`Invalid date range format: ${value}`);\n this.startValue = '';\n this.endValue = '';\n }\n };\n\n /**\n * Converts the nv-calendar date format to the format expected by Inputmask.\n * @param {string} format - The date format to convert\n * @returns {string} The converted format for Inputmask\n */\n private convertToInputmaskFormat(format: string): string {\n // If the format is not specified, use the default format YYYY-MM-DD\n if (!format) {\n return 'dd/mm/yyyy';\n }\n\n const formatMap = {\n 'YYYY-MM-DD': 'yyyy-mm-dd',\n 'DD/MM/YYYY': 'dd/mm/yyyy',\n 'MM/DD/YYYY': 'mm/dd/yyyy',\n 'DD.MM.YYYY': 'dd.mm.yyyy',\n 'YYYYMMDD': 'yyyymmdd',\n };\n\n return formatMap[format] || 'dd/mm/yyyy';\n }\n\n /**\n * Closes the popover when a click is detected outside the component.\n * @param {MouseEvent} event - The mouse event\n */\n private handleClickOutside = (event: MouseEvent) => {\n if (this.open && this.el && !this.el.contains(event.target as Node)) {\n this.open = false;\n }\n };\n\n /**\n * Handles the input event on the start input element.\n * @param {Event} event - The input event\n */\n private handleStartInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n this.startValue = input.value;\n\n // Update unified value prop\n this.value = `${input.value},${this.endValue}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: input.value, end: this.endValue });\n\n // Temporarily enable navigation for keyboard input\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n this.updateCalendarValue();\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Handles the input event on the end input element.\n * @param {Event} event - The input event\n */\n private handleEndInput = (event: Event) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n const input = event.target as HTMLInputElement;\n this.endValue = input.value;\n\n // Update unified value prop\n this.value = `${this.startValue},${input.value}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: this.startValue, end: input.value });\n\n // Temporarily enable navigation for keyboard input\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n this.updateCalendarValue();\n // Restore navigation prevention after update\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 100);\n }\n };\n\n /**\n * Update the calendar's rangeValue property without forcing month change\n */\n private updateCalendarValue() {\n if (this.calendarElement && this.startValue && this.endValue) {\n // Store the current calendar state\n }\n }\n\n /**\n * Handles focus events on the input elements.\n * @param {FocusEvent} event - The focus event\n */\n private handleFocus = (event: FocusEvent) => {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n (event.target as HTMLElement).blur();\n return;\n }\n\n // Enable navigation on focus\n if (this.calendarElement) {\n this.calendarElement.removeAttribute('data-prevent-navigation');\n }\n\n this.open = true;\n\n // Restore navigation prevention after opening\n setTimeout(() => {\n if (this.calendarElement) {\n this.calendarElement.setAttribute('data-prevent-navigation', 'true');\n }\n }, 300);\n };\n\n /**\n * Toggles the opening/closing of the popover.\n */\n private toggleCalendar = () => {\n if (this.readonly || this.disabled) {\n return;\n }\n this.open = !this.open;\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n componentWillLoad() {\n if (this.value) {\n // Use the unified parsing method\n this.parseUnifiedValue(this.value);\n }\n }\n\n componentDidLoad() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n const inputMask = new Inputmask({\n alias: 'datetime',\n inputFormat: this.convertToInputmaskFormat(this.dateFormat),\n placeholder: this.convertToInputmaskFormat(this.dateFormat),\n clearIncomplete: false,\n showMaskOnHover: false,\n showMaskOnFocus: false,\n clearMaskOnLostFocus: false,\n insertMode: true,\n rightAlign: false,\n oncomplete: function (e) {\n const input = e.target as HTMLInputElement;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n },\n });\n inputMask.mask(input);\n\n // Set the value after applying the mask\n if (input.name === this.startName && this.startValue) {\n requestAnimationFrame(() => {\n input.value = this.startValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n } else if (input.name === this.endName && this.endValue) {\n requestAnimationFrame(() => {\n input.value = this.endValue;\n const event = new CustomEvent('input', { bubbles: true });\n input.dispatchEvent(event);\n });\n }\n });\n }\n\n componentDidRender() {\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n const value =\n input.name === this.startName\n ? this.startValue\n : this.endName\n ? this.endValue\n : '';\n if (value) {\n // Make sure the value is defined both as a property and attribute\n requestAnimationFrame(() => {\n input.value = value;\n input.setAttribute('value', value);\n });\n }\n });\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the date range changes.\n */\n @Event()\n dateRangeChange: EventEmitter<\n HTMLNvCalendarElementEventMap['rangeDateChange']\n >;\n\n /**\n * Emitted when the unified value changes\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Handles the range date selection event from nv-calendar.\n * @param {CustomEvent<DateRange>} event - The custom event\n */\n @Listen('rangeDateChange')\n handleRangeDateChange(\n event: CustomEvent<HTMLNvCalendarElementEventMap['rangeDateChange']>,\n ) {\n const { start, end } = event.detail || {};\n\n // Check that both dates are defined\n if (start && end) {\n this.startValue = start;\n this.endValue = end;\n\n // Update unified value prop (like nv-calendar)\n this.value = `${start},${end}`;\n this.valueChanged.emit(this.value);\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n\n if (!this.showActions) {\n this.open = false;\n }\n }\n }\n\n /**\n * Handles the unified value change event from nv-calendar\n * @param {CustomEvent<string>} event - The custom event\n */\n @Listen('valueChanged')\n handleCalendarValueChanged(event: CustomEvent<string>) {\n const newValue = event.detail || '';\n\n if (newValue !== this.value) {\n this.value = newValue;\n this.valueChanged.emit(newValue);\n\n // Parse and update internal state\n this.parseUnifiedValue(newValue);\n\n // Legacy support - emit dateRangeChange\n this.dateRangeChange.emit({\n start: this.startValue,\n end: this.endValue,\n });\n }\n }\n\n @Listen('closePopover')\n handleClosePopover() {\n this.open = false;\n }\n\n @Listen('applyDateRange')\n handleApplyDateRange() {\n this.open = false;\n }\n\n /**\n * Handles the reset event from the calendar's cancel button\n * @param {CustomEvent} event - The event emitted by the calendar\n */\n @Listen('singleDateChange')\n @Listen('rangeDateChange')\n handleDateReset(event: CustomEvent) {\n const isResetSingle =\n event.type === 'singleDateChange' && event.detail === '';\n const isResetRange =\n event.type === 'rangeDateChange' &&\n event.detail &&\n event.detail.start === '' &&\n event.detail.end === '';\n\n if (isResetSingle || isResetRange) {\n this.startValue = '';\n this.endValue = '';\n\n // Update unified value prop\n this.value = '';\n this.valueChanged.emit('');\n\n const inputs = this.el.querySelectorAll('.input-wrapper input');\n inputs.forEach((input: HTMLInputElement) => {\n input.value = '';\n });\n\n // Legacy support (deprecated)\n this.dateRangeChange.emit({ start: '', end: '' });\n }\n }\n\n /**\n * Handles keyboard events.\n * @param {KeyboardEvent} event - The keyboard event\n */\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n event.preventDefault();\n return;\n }\n return;\n }\n\n if (!this.popoverElement) {\n console.warn('nv-fielddaterange -> Popover element is not defined');\n return;\n }\n }\n\n @Watch('value')\n handleValueChange(newValue: string) {\n // Use the unified parsing method instead of JSON.parse\n this.parseUnifiedValue(newValue);\n }\n\n @Watch('open')\n onOpenChanged(newValue: boolean) {\n if (this.contentRef) {\n if (newValue) {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = '0px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n });\n } else {\n this.contentRef.style.transition = 'none';\n this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';\n void this.contentRef.offsetHeight;\n requestAnimationFrame(() => {\n this.contentRef.style.transition =\n 'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';\n this.contentRef.style.maxHeight = '0px';\n });\n }\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {((this.label && this.label.length > 0) ||\n this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n id={this.popoverId}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div slot=\"trigger\" class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\">\n <slot name=\"leading-input\"></slot>\n\n <div class=\"range-inputs\">\n <input\n id={this.startInputId}\n type=\"text\"\n placeholder={this.startPlaceholder}\n name={this.startName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n autofocus={this.autofocus}\n value={this.startValue}\n onInput={this.handleStartInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n\n <div class=\"range-separator\"></div>\n\n <input\n id={this.endInputId}\n type=\"text\"\n placeholder={this.endPlaceholder}\n name={this.endName}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n value={this.endValue}\n onInput={this.handleEndInput}\n onFocus={this.handleFocus}\n data-scope=\"date-range\"\n />\n </div>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n class=\"toggle-calendar-icon\"\n name=\"calendar\"\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide calendar' : 'Show calendar'}\n aria-pressed={this.open.toString()}\n onClick={this.toggleCalendar}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div slot=\"content\">\n <nv-calendar\n ref={el => (this.calendarElement = el as HTMLNvCalendarElement)}\n dateFormat={this.dateFormat}\n value={this.value}\n firstDayOfWeek={this.firstDayOfWeek}\n numberOfCalendars={this.numberOfCalendars}\n min={this.min}\n max={this.max}\n locale={this.locale}\n shortcutsPlacement={this.shortcutsPlacement}\n showActions={this.showActions}\n shortcuts={this.shortcuts}\n showWeekNumbers={this.showWeekNumbers}\n disabledDates={this.disabledDates}\n selectionType=\"range\"\n data-prevent-navigation=\"true\"\n ></nv-calendar>\n </div>\n </nv-popover>\n\n {((this.description && this.description.length > 0) ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n {this.el.querySelector('[slot=\"error-description\"]') ? (\n <slot name=\"error-description\"></slot>\n ) : (\n this.errorDescription\n )}\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n //#endregion RENDER\n}\n"],"mappings":"gKAAA,MAAMA,EAAsB,o0SAC5B,MAAAC,EAAeD,E,MC4BFE,EAAgB,MAL7B,WAAAC,CAAAC,G,sGASUC,KAAAC,UAAoBC,IAWnBF,KAAAG,aAAuBD,IAOvBF,KAAAI,WAAqBF,IA0CrBF,KAAAK,SAAoB,MAMpBL,KAAAM,SAAoB,MAMpBN,KAAAO,SAAoB,MAMpBP,KAAAQ,MAAiB,MAYjBR,KAAAS,QAAmB,MAOnBT,KAAAU,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YpB,KAAKoB,WACjBT,MAAOX,KAAKW,MACZI,eAAgBf,KAAKe,eACrBC,kBAAmBhB,KAAKgB,kBACxBC,IAAKjB,KAAKiB,IACVC,IAAKlB,KAAKkB,IACVC,OAAQnB,KAAKmB,OACbE,mBAAoBrB,KAAKqB,mBACzBC,YAAatB,KAAKsB,YAClBiH,UAAWvI,KAAKuI,UAChBC,gBAAiBxI,KAAKwI,gBACtBC,cAAezI,KAAKyI,cACpBC,cAAc,QAAO,0BACG,YAK3B1I,KAAK2I,aAAe3I,KAAK2I,YAAY3G,OAAS,GAC/ChC,KAAKqC,GAAGgF,cAAc,0BACtBH,EAAA,OAAAV,IAAA,2CAAKoB,MAAM,eACTV,EAAA,QAAAV,IAAA,2CAAMlB,KAAK,eAAetF,KAAK2I,eAIjC3I,KAAK4I,kBACL5I,KAAKqC,GAAGgF,cAAc,gCACtBH,EAAA,OAAAV,IAAA,2CAAKqC,QAAS7I,KAAKQ,MAAOoH,MAAM,qBAC7B5H,KAAKqC,GAAGgF,cAAc,8BACrBH,EAAA,QAAM5B,KAAK,sBAEXtF,KAAqB,kBAK3BkH,EAAA,QAAAV,IAAA,6C","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as a,h as r,H as c}from"./p-d0a33e64.js";const s="nv-row{display:flex;flex-wrap:wrap;margin-right:calc(var(--spacing-4) * -1);margin-left:calc(var(--spacing-4) * -1);row-gap:var(--spacing-4)}";const e=s;const n=class{constructor(r){a(this,r)}render(){return r(c,{key:"7a41dce9acbfdc42b66a032f1d20437ebf3d79a1"},r("slot",{key:"570d2bc95ad3ab2502a1e87699cdcb5818743b7b"}))}};n.style=e;export{n as nv_row};
|
|
2
|
-
//# sourceMappingURL=p-bee972c7.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as o,a as t}from"./p-1daca48a.js";const a=(a,{duration:n=200,amount:e=.8,hasFade:r=true}={})=>{const c=o(a);function s(){return new Promise((o=>{t({from:{opacity:r?0:1,scale:e},to:{opacity:1,scale:1},duration:n,onUpdate(o){const t={scale:o.scale};if(r){t["opacity"]=o.opacity}c.set(t)},onComplete(){o();if(r){a.style.removeProperty("opacity")}a.style.removeProperty("transform")}})}))}function i(){a.style.transform=`scale(${e})`;if(r){a.style.opacity="0"}}function u(){a.style.transform=`scale(1)`;if(r){a.style.opacity="1"}}function f(){return new Promise((o=>{t({from:{opacity:1,scale:1},to:{opacity:r?0:1,scale:e},duration:n,onUpdate(o){const t={scale:o.scale};if(r){t["opacity"]=o.opacity}c.set(t)},onComplete(){o()}})}))}return{growIn:s,growOut:f,setGrowOut:i,setGrowIn:u}};export{a as u};
|
|
2
|
-
//# sourceMappingURL=p-c1765831.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as r,g as n}from"./p-d0a33e64.js";import{a as o,r as a}from"./p-d429a343.js";import{c as s}from"./p-8a1a6e56.js";import{B as l}from"./p-e2d0a77d.js";import{v as d}from"./p-f5ff676c.js";
|
|
2
|
-
/*!
|
|
3
|
-
* tabbable 6.2.0
|
|
4
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
5
|
-
*/
|
|
6
|
-
var u=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"];var c=u.join(",");var f=typeof Element==="undefined";var h=f?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;var v=!f&&Element.prototype.getRootNode?function(t){var e;return t===null||t===void 0?void 0:(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t===null||t===void 0?void 0:t.ownerDocument};var b=function t(e,i){var r;if(i===void 0){i=true}var n=e===null||e===void 0?void 0:(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert");var o=n===""||n==="true";var a=o||i&&e&&t(e.parentNode);return a};var p=function t(e){var i;var r=e===null||e===void 0?void 0:(i=e.getAttribute)===null||i===void 0?void 0:i.call(e,"contenteditable");return r===""||r==="true"};var g=function t(e,i,r){if(b(e)){return[]}var n=Array.prototype.slice.apply(e.querySelectorAll(c));if(i&&h.call(e,c)){n.unshift(e)}n=n.filter(r);return n};var m=function t(e,i,r){var n=[];var o=Array.from(e);while(o.length){var a=o.shift();if(b(a,false)){continue}if(a.tagName==="SLOT"){var s=a.assignedElements();var l=s.length?s:a.children;var d=t(l,true,r);if(r.flatten){n.push.apply(n,d)}else{n.push({scopeParent:a,candidates:d})}}else{var u=h.call(a,c);if(u&&r.filter(a)&&(i||!e.includes(a))){n.push(a)}var f=a.shadowRoot||typeof r.getShadowRoot==="function"&&r.getShadowRoot(a);var v=!b(f,false)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&v){var p=t(f===true?a.children:f.children,true,r);if(r.flatten){n.push.apply(n,p)}else{n.push({scopeParent:a,candidates:p})}}else{o.unshift.apply(o,a.children)}}}return n};var y=function t(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))};var w=function t(e){if(!e){throw new Error("No node provided")}if(e.tabIndex<0){if((/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||p(e))&&!y(e)){return 0}}return e.tabIndex};var x=function t(e,i){var r=w(e);if(r<0&&i&&!y(e)){return 0}return r};var k=function t(e,i){return e.tabIndex===i.tabIndex?e.documentOrder-i.documentOrder:e.tabIndex-i.tabIndex};var E=function t(e){return e.tagName==="INPUT"};var S=function t(e){return E(e)&&e.type==="hidden"};var T=function t(e){var i=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some((function(t){return t.tagName==="SUMMARY"}));return i};var C=function t(e,i){for(var r=0;r<e.length;r++){if(e[r].checked&&e[r].form===i){return e[r]}}};var A=function t(e){if(!e.name){return true}var i=e.form||v(e);var r=function t(e){return i.querySelectorAll('input[type="radio"][name="'+e+'"]')};var n;if(typeof window!=="undefined"&&typeof window.CSS!=="undefined"&&typeof window.CSS.escape==="function"){n=r(window.CSS.escape(e.name))}else{try{n=r(e.name)}catch(t){console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message);return false}}var o=C(n,e.form);return!o||o===e};var D=function t(e){return E(e)&&e.type==="radio"};var I=function t(e){return D(e)&&!A(e)};var L=function t(e){var i;var r=e&&v(e);var n=(i=r)===null||i===void 0?void 0:i.host;var o=false;if(r&&r!==e){var a,s,l;o=!!((a=n)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(n)||e!==null&&e!==void 0&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));while(!o&&n){var d,u,c;r=v(n);n=(d=r)===null||d===void 0?void 0:d.host;o=!!((u=n)!==null&&u!==void 0&&(c=u.ownerDocument)!==null&&c!==void 0&&c.contains(n))}}return o};var N=function t(e){var i=e.getBoundingClientRect(),r=i.width,n=i.height;return r===0&&n===0};var O=function t(e,i){var r=i.displayCheck,n=i.getShadowRoot;if(getComputedStyle(e).visibility==="hidden"){return true}var o=h.call(e,"details>summary:first-of-type");var a=o?e.parentElement:e;if(h.call(a,"details:not([open]) *")){return true}if(!r||r==="full"||r==="legacy-full"){if(typeof n==="function"){var s=e;while(e){var l=e.parentElement;var d=v(e);if(l&&!l.shadowRoot&&n(l)===true){return N(e)}else if(e.assignedSlot){e=e.assignedSlot}else if(!l&&d!==e.ownerDocument){e=d.host}else{e=l}}e=s}if(L(e)){return!e.getClientRects().length}if(r!=="legacy-full"){return true}}else if(r==="non-zero-area"){return N(e)}return false};var j=function t(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName)){var i=e.parentElement;while(i){if(i.tagName==="FIELDSET"&&i.disabled){for(var r=0;r<i.children.length;r++){var n=i.children.item(r);if(n.tagName==="LEGEND"){return h.call(i,"fieldset[disabled] *")?true:!n.contains(e)}}return true}i=i.parentElement}}return false};var z=function t(e,i){if(i.disabled||b(i)||S(i)||O(i,e)||T(i)||j(i)){return false}return true};var U=function t(e,i){if(I(i)||w(i)<0||!z(e,i)){return false}return true};var P=function t(e){var i=parseInt(e.getAttribute("tabindex"),10);if(isNaN(i)||i>=0){return true}return false};var R=function t(e){var i=[];var r=[];e.forEach((function(e,n){var o=!!e.scopeParent;var a=o?e.scopeParent:e;var s=x(a,o);var l=o?t(e.candidates):a;if(s===0){o?i.push.apply(i,l):i.push(a)}else{r.push({documentOrder:n,tabIndex:s,item:e,isScope:o,content:l})}}));return r.sort(k).reduce((function(t,e){e.isScope?t.push.apply(t,e.content):t.push(e.content);return t}),[]).concat(i)};var B=function t(e,i){i=i||{};var r;if(i.getShadowRoot){r=m([e],i.includeContainer,{filter:U.bind(null,i),flatten:false,getShadowRoot:i.getShadowRoot,shadowRootFilter:P})}else{r=g(e,i.includeContainer,U.bind(null,i))}return R(r)};const F='dialog{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:400px;width:fit-content;max-width:clamp(90vw, min(90vw, 960px), 960px);margin:auto;max-height:90vh;overflow:hidden;box-shadow:0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3)}dialog.full{width:90vw}dialog::backdrop{opacity:var(--components-overlay-opacity);background:var(--components-overlay-background)}dialog .content{display:flex;flex-direction:column;align-items:flex-start;height:fit-content;max-height:90vh;overflow:hidden}dialog .content nv-button.close-button{position:absolute;top:var(--dialog-dismissible-position-top);right:var(--dialog-dismissible-position-right);display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:10px}dialog .content .content-body{overflow:auto;box-sizing:border-box;padding:var(--dialog-body-padding-y) var(--dialog-body-padding-x);scrollbar-gutter:stable both-edges;font-family:"TT Norms Pro", sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:400;line-height:var(--line-height-base);color:var(--color-content-medium-text)}dialog .content .content-body::-webkit-scrollbar{width:6px;height:6px}dialog .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}dialog .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}';const $=F;const M=class{constructor(i){t(this,i);this.openChanged=e(this,"openChanged",7);this.eventsAttached=false;this.open=false;this.undismissable=false;this.clickOutside=false;this.controlled=false;this.full=false;this.handleCloseButton=()=>{this.close()};this.handleCancelButton=()=>{this.close()};this.checkForForm=()=>{if(!this.form){const t=this.el.querySelector("form");if(t){this.form=this.ensureFormId(t)}}};this.handleDialogClose=()=>{if(this.open){this.close()}};this.handleClickOutside=t=>{if(t.target===this.dialogElement){this.close();t.preventDefault();t.stopPropagation()}};this.triggerClickEvents=[["click",this.show],["touchstart",this.show],["keydown",t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();this.show()}}]]}async show(){this.open=true;this.preventScroll();this.dialogElement.showModal();this.openChanged.emit(this.open)}async close(){this.open=false;this.allowScroll();this.dialogElement.close();this.openChanged.emit(this.open)}setAutofocus(){const t=B(this.dialogElement,{displayCheck:"none"});if(t.length>0){let e=t[0];let i=e.getBoundingClientRect();t.forEach((t=>{const r=t.getBoundingClientRect();if(r.top<i.top||r.left<i.left){e=t;i=r}}));e.setAttribute("autofocus","true")}}attachEventListeners(){if(this.triggerElement&&!this.eventsAttached&&!this.controlled){o(this.triggerClickEvents,this.triggerElement,this);this.eventsAttached=true}}preventScroll(){document.body.style.overflow="hidden"}allowScroll(){document.body.style.overflow=""}ensureFormId(t){if(!t.id){t.id=`dialog-form-${d()}`}return t.id}handleKeyDown(t){if(t.key==="Escape"&&this.undismissable){t.preventDefault();t.stopPropagation()}}handleDocumentClick(t){if(!this.clickOutside||this.undismissable)return;this.handleClickOutside(t)}handleDocumentTouch(t){if(!this.clickOutside||this.undismissable)return;this.handleClickOutside(t)}async handleDialogOpenChange(t){if(t){this.show()}else{this.close()}}componentWillLoad(){this.triggerElement=Array.from(this.el.children).find((t=>t.getAttribute("slot")==="trigger"));this.headerElement=Array.from(this.el.children).find((t=>t.getAttribute("slot")==="header"||t.tagName.toLowerCase()==="nv-dialogheader"));this.footerElement=Array.from(this.el.children).find((t=>t.getAttribute("slot")==="footer"||t.tagName.toLowerCase()==="nv-dialogfooter"));this.checkForForm()}componentWillUpdate(){this.attachEventListeners()}componentDidLoad(){if(this.open){this.show()}if(!this.dialogElement.querySelector("[autofocus]")){this.setAutofocus()}this.attachEventListeners();this.checkForForm()}disconnectedCallback(){if(this.triggerElement&&!this.eventsAttached&&!this.controlled){a(this.triggerClickEvents,this.triggerElement,this);this.eventsAttached=false}this.allowScroll()}render(){const t=this.form||this.el.querySelector("form");return i(r,{key:"c1eb9b79f52028c3ef7a57bad99260a45b678eb5"},i("slot",{key:"65a624853aa7242dc849a1196c6b5b8c331d426f",name:"trigger"}),i("dialog",{key:"17369b9be014e9136d77f99628b4bc8184d36370",ref:t=>this.dialogElement=t,onClose:this.handleDialogClose,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-header","aria-describedby":"dialog-content",class:s({full:this.full})},i("div",{key:"8a17cd8deff162b333e2ac90c487454743d76f3d",class:"content"},!this.undismissable&&i("nv-button",{key:"d61a63785ce284ce2039be5c62d6e2bcce2a9b44",class:"close-button",emphasis:"lower",size:"sm",onClick:this.handleCloseButton,"aria-label":"Close dialog"},i("nv-icon",{key:"5a0adb449785bc684c41d0e35aad08ccb725386a",name:"x",size:"sm"})),this.headerElement?i("slot",{name:"header"}):i("nv-dialogheader",{id:"dialog-header"}),i("div",{key:"7c39e52d8fe6fc9ab2fdc2574a0c105d790bbfbe",class:"content-body",id:"dialog-content"},i("slot",{key:"038d9f3623177af5d996631dd9ae25fec49fd778"})),this.footerElement?i("slot",{name:"footer"}):i("nv-dialogfooter",{form:this.form,primaryButtonType:t?l.Submit:l.Button,onDialogCanceled:this.handleCancelButton,undismissable:this.undismissable}))))}get el(){return n(this)}static get watchers(){return{open:["handleDialogOpenChange"]}}};M.style=$;export{M as nv_dialog};
|
|
7
|
-
//# sourceMappingURL=p-d21b2da2.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["candidateSelectors","candidateSelector","join","NoElement","Element","matches","prototype","msMatchesSelector","webkitMatchesSelector","getRootNode","element","_element$getRootNode","call","ownerDocument","isInert","node","lookUp","_node$getAttribute","inertAtt","getAttribute","inert","result","parentNode","isContentEditable","_node$getAttribute2","attValue","getCandidates","el","includeContainer","filter","candidates","Array","slice","apply","querySelectorAll","unshift","getCandidatesIteratively","elements","options","elementsToCheck","from","length","shift","tagName","assigned","assignedElements","content","children","nestedCandidates","flatten","push","scopeParent","validCandidate","includes","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","isNaN","parseInt","getTabIndex","Error","tabIndex","test","getSortOrderTabIndex","isScope","sortOrderedTabbables","a","b","documentOrder","isInput","isHiddenInput","type","isDetailsWithSummary","r","some","child","getCheckedRadio","nodes","form","i","checked","isTabbableRadio","name","radioScope","queryRadios","radioSet","window","CSS","escape","err","console","error","message","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","host","attached","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","contains","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","getBoundingClientRect","width","height","isHidden","_ref","displayCheck","getComputedStyle","visibility","isDirectSummary","nodeUnderDetails","parentElement","originalNode","rootNode","assignedSlot","getClientRects","isDisabledFromFieldset","disabled","item","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","forEach","candidateTabindex","sort","reduce","acc","sortable","concat","tabbable","container","bind","nvDialogCss","NvDialogStyle0","NvDialog","constructor","hostRef","this","eventsAttached","open","undismissable","clickOutside","controlled","full","handleCloseButton","close","handleCancelButton","checkForForm","formElement","querySelector","ensureFormId","handleDialogClose","handleClickOutside","event","target","dialogElement","preventDefault","stopPropagation","triggerClickEvents","show","e","key","preventScroll","showModal","openChanged","emit","allowScroll","setAutofocus","focusableElements","topLeftElement","topLeftRect","rect","top","left","setAttribute","attachEventListeners","triggerElement","addEventListeners","document","body","style","overflow","id","uuidv4","handleKeyDown","handleDocumentClick","handleDocumentTouch","handleDialogOpenChange","componentWillLoad","find","headerElement","toLowerCase","footerElement","componentWillUpdate","componentDidLoad","disconnectedCallback","removeEventListeners","render","hasForm","h","Host","ref","onClose","role","class","clsx","emphasis","size","onClick","primaryButtonType","ButtonType","Submit","Button","onDialogCanceled"],"sources":["../../node_modules/tabbable/dist/index.esm.js","src/components/nv-dialog/nv-dialog.scss?tag=nv-dialog","src/components/nv-dialog/nv-dialog.tsx"],"sourcesContent":["/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","@import '../../styles/scrollbar';\n\ndialog {\n border-radius: var(--radius-rounded-2xl);\n background: var(--color-level-00-background);\n min-width: 400px;\n width: fit-content;\n max-width: clamp(90vw, min(90vw, 960px), 960px);\n margin: auto;\n max-height: 90vh;\n overflow: hidden;\n\n &.full {\n width: 90vw;\n }\n\n /* shadow/2xl */\n box-shadow: 0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl)\n var(--shadow-spread-2xl) var(--shadow-color-opacity-3)\n var(--shadow-color-opacity-3);\n\n &::backdrop {\n opacity: var(--components-overlay-opacity);\n background: var(--components-overlay-background);\n }\n\n .content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n height: fit-content;\n max-height: 90vh;\n overflow: hidden;\n\n nv-button.close-button {\n position: absolute;\n top: var(--dialog-dismissible-position-top);\n right: var(--dialog-dismissible-position-right);\n display: flex;\n padding: var(--button-sm-icon-button-padding);\n justify-content: flex-end;\n align-items: flex-start;\n gap: 10px;\n }\n\n .content-body {\n @include scrollbar();\n\n overflow: auto;\n box-sizing: border-box;\n padding: var(--dialog-body-padding-y) var(--dialog-body-padding-x);\n scrollbar-gutter: stable both-edges;\n\n /* text/md/regular */\n font-family: 'TT Norms Pro', sans-serif;\n font-size: var(--font-size-md);\n font-style: normal;\n font-weight: 400;\n line-height: var(--line-height-base); /* 150% */\n\n\n color: var(--color-content-medium-text);\n }\n }\n}\n","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';\nimport { ButtonType } from '../../utils/constants';\nimport { v4 as uuidv4 } from 'uuid';\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 private form: string;\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({ reflect: false, 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({ reflect: false, 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({ reflect: false, 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 * 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 this.open = true;\n this.preventScroll();\n // It is recommended to use the .show() or .showModal() method to render dialogs, rather than the open attribute. If a <dialog> is opened using the open attribute, it is non-modal.\n this.dialogElement.showModal();\n this.openChanged.emit(this.open);\n }\n\n /**\n * Call this method to hide the dialog, making it disappear from view.\n */\n @Method()\n public async close() {\n this.open = false;\n this.allowScroll();\n this.dialogElement.close();\n this.openChanged.emit(this.open);\n }\n\n /**\n * Handles the close button click.\n */\n private handleCloseButton = () => {\n this.close();\n };\n\n /**\n * Handles the cancel button click.\n */\n private handleCancelButton = () => {\n this.close();\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 /**\n * Prevents the body from scrolling when the dialog is open.\n */\n private preventScroll() {\n document.body.style.overflow = 'hidden';\n }\n\n /**\n * Allows the body to scroll when the dialog is closed.\n */\n\n private allowScroll() {\n document.body.style.overflow = '';\n }\n\n private ensureFormId(formElement: HTMLFormElement): string {\n if (!formElement.id) {\n formElement.id = `dialog-form-${uuidv4()}`;\n }\n return formElement.id;\n }\n\n /**\n * Checks for and sets up form ID if a form is present\n */\n private checkForForm = () => {\n if (!this.form) {\n const formElement = this.el.querySelector('form') as HTMLFormElement;\n if (formElement) {\n this.form = this.ensureFormId(formElement);\n }\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 * @bind open\n */\n @Event()\n openChanged: EventEmitter<boolean>;\n\n /**\n * Handles the native dialog close event.\n */\n private handleDialogClose = () => {\n if (this.open) {\n this.close();\n }\n };\n\n /**\n * Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.\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.close();\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.close();\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 // Initial form check\n this.checkForForm();\n }\n\n componentWillUpdate() {\n this.attachEventListeners();\n }\n\n componentDidLoad() {\n if (this.open) {\n this.show();\n }\n // Check if any element already has autofocus before setting it automatically\n if (!this.dialogElement.querySelector('[autofocus]')) {\n this.setAutofocus();\n }\n this.attachEventListeners();\n\n // Additional form check in case form was added after initial load\n this.checkForForm();\n }\n\n disconnectedCallback() {\n if (this.triggerElement && !this.eventsAttached && !this.controlled) {\n removeEventListeners(this.triggerClickEvents, this.triggerElement, this);\n this.eventsAttached = false;\n }\n this.allowScroll();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n const hasForm = this.form || this.el.querySelector('form');\n\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 form={this.form}\n primaryButtonType={\n hasForm ? ButtonType.Submit : ButtonType.Button\n }\n onDialogCanceled={this.handleCancelButton}\n undismissable={this.undismissable}\n ></nv-dialogfooter>\n )}\n </div>\n </dialog>\n </Host>\n );\n }\n}\n"],"mappings":";;;;;AASA,IAAIA,EAAqB,CAAC,qBAAsB,sBAAuB,wBAAyB,uBAAwB,sBAAuB,oCAAqC,+BAAgC,+BAAgC,gEAAiE,6CAA8C,wBACnW,IAAIC,EAAmCD,EAAmBE,KAAK,KAC/D,IAAIC,SAAmBC,UAAY,YACnC,IAAIC,EAAUF,EAAY,WAAY,EAAKC,QAAQE,UAAUD,SAAWD,QAAQE,UAAUC,mBAAqBH,QAAQE,UAAUE,sBACjI,IAAIC,GAAeN,GAAaC,QAAQE,UAAUG,YAAc,SAAUC,GACxE,IAAIC,EACJ,OAAOD,IAAY,MAAQA,SAAiB,OAAS,GAAKC,EAAuBD,EAAQD,eAAi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,KAAK9H,GAAG0I,cAAc,QAEnD,OACEkD,EAACC,EAAI,CAAAvC,IAAA,4CACHsC,EAAA,QAAAtC,IAAA,2CAAM5F,KAAK,YAEXkI,EAAA,UAAAtC,IAAA,2CACEwC,IAAK9L,GAAO8H,KAAKkB,cAAgBhJ,EACjC+L,QAASjE,KAAKc,kBACdoD,KAAK,SAAQ,aACF,OAAM,kBACD,gBAAe,mBACd,iBACjBC,MAAOC,EAAK,CAAE9D,KAAMN,KAAKM,QAEzBwD,EAAA,OAAAtC,IAAA,2CAAK2C,MAAM,YACPnE,KAAKG,eACL2D,EAAA,aAAAtC,IAAA,2CACE2C,MAAM,eACNE,SAAS,QACTC,KAAK,KACLC,QAASvE,KAAKO,kBAAiB,aACpB,gBAEXuD,EAAA,WAAAtC,IAAA,2CAAS5F,KAAK,IAAI0I,KAAK,QAI1BtE,KAAKqD,cACJS,EAAA,QAAMlI,KAAK,WAEXkI,EAAA,mBAAiBjB,GAAG,kBAGtBiB,EAAA,OAAAtC,IAAA,2CAAK2C,MAAM,eAAetB,GAAG,kBAC3BiB,EAAA,QAAAtC,IAAA,8CAGDxB,KAAKuD,cACJO,EAAA,QAAMlI,KAAK,WAEXkI,EAAA,mBACEtI,KAAMwE,KAAKxE,KACXgJ,kBACEX,EAAUY,EAAWC,OAASD,EAAWE,OAE3CC,iBAAkB5E,KAAKS,mBACvBN,cAAeH,KAAKG,kB","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as t,f as n,r as e,c as o,h as s,H as i,g as r}from"./p-d0a33e64.js";import{u as c}from"./p-1daca48a.js";import{u as a}from"./p-c1765831.js";import{a as l,r as f}from"./p-d429a343.js";const u=["top","right","bottom","left"];const d=["start","end"];const h=u.reduce(((t,n)=>t.concat(n,n+"-"+d[0],n+"-"+d[1])),[]);const p=Math.min;const m=Math.max;const y=Math.round;const v=t=>({x:t,y:t});const g={left:"right",right:"left",bottom:"top",top:"bottom"};const w={start:"end",end:"start"};function b(t,n,e){return m(t,p(n,e))}function x(t,n){return typeof t==="function"?t(n):t}function k(t){return t.split("-")[0]}function A(t){return t.split("-")[1]}function T(t){return t==="x"?"y":"x"}function O(t){return t==="y"?"height":"width"}function P(t){return["top","bottom"].includes(k(t))?"y":"x"}function C(t){return T(P(t))}function D(t,n,e){if(e===void 0){e=false}const o=A(t);const s=C(t);const i=O(s);let r=s==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";if(n.reference[i]>n.floating[i]){r=M(r)}return[r,M(r)]}function S(t){const n=M(t);return[R(t),n,R(n)]}function R(t){return t.replace(/start|end/g,(t=>w[t]))}function j(t,n,e){const o=["left","right"];const s=["right","left"];const i=["top","bottom"];const r=["bottom","top"];switch(t){case"top":case"bottom":if(e)return n?s:o;return n?o:s;case"left":case"right":return n?i:r;default:return[]}}function L(t,n,e,o){const s=A(t);let i=j(k(t),e==="start",o);if(s){i=i.map((t=>t+"-"+s));if(n){i=i.concat(i.map(R))}}return i}function M(t){return t.replace(/left|right|bottom|top/g,(t=>g[t]))}function B(t){return{top:0,right:0,bottom:0,left:0,...t}}function F(t){return typeof t!=="number"?B(t):{top:t,right:t,bottom:t,left:t}}function H(t){const{x:n,y:e,width:o,height:s}=t;return{width:o,height:s,top:e,left:n,right:n+o,bottom:e+s,x:n,y:e}}function E(t,n,e){let{reference:o,floating:s}=t;const i=P(n);const r=C(n);const c=O(r);const a=k(n);const l=i==="y";const f=o.x+o.width/2-s.width/2;const u=o.y+o.height/2-s.height/2;const d=o[c]/2-s[c]/2;let h;switch(a){case"top":h={x:f,y:o.y-s.height};break;case"bottom":h={x:f,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-s.width,y:u};break;default:h={x:o.x,y:o.y}}switch(A(n)){case"start":h[r]-=d*(e&&l?-1:1);break;case"end":h[r]+=d*(e&&l?-1:1);break}return h}const $=async(t,n,e)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:r}=e;const c=i.filter(Boolean);const a=await(r.isRTL==null?void 0:r.isRTL(n));let l=await r.getElementRects({reference:t,floating:n,strategy:s});let{x:f,y:u}=E(l,o,a);let d=o;let h={};let p=0;for(let e=0;e<c.length;e++){const{name:i,fn:m}=c[e];const{x:y,y:v,data:g,reset:w}=await m({x:f,y:u,initialPlacement:o,placement:d,strategy:s,middlewareData:h,rects:l,platform:r,elements:{reference:t,floating:n}});f=y!=null?y:f;u=v!=null?v:u;h={...h,[i]:{...h[i],...g}};if(w&&p<=50){p++;if(typeof w==="object"){if(w.placement){d=w.placement}if(w.rects){l=w.rects===true?await r.getElementRects({reference:t,floating:n,strategy:s}):w.rects}({x:f,y:u}=E(l,d,a))}e=-1}}return{x:f,y:u,placement:d,strategy:s,middlewareData:h}};async function W(t,n){var e;if(n===void 0){n={}}const{x:o,y:s,platform:i,rects:r,elements:c,strategy:a}=t;const{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=false,padding:h=0}=x(n,t);const p=F(h);const m=u==="floating"?"reference":"floating";const y=c[d?m:u];const v=H(await i.getClippingRect({element:((e=await(i.isElement==null?void 0:i.isElement(y)))!=null?e:true)?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:f,strategy:a}));const g=u==="floating"?{x:o,y:s,width:r.floating.width,height:r.floating.height}:r.reference;const w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating));const b=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1};const k=H(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:g,offsetParent:w,strategy:a}):g);return{top:(v.top-k.top+p.top)/b.y,bottom:(k.bottom-v.bottom+p.bottom)/b.y,left:(v.left-k.left+p.left)/b.x,right:(k.right-v.right+p.right)/b.x}}const z=t=>({name:"arrow",options:t,async fn(n){const{x:e,y:o,placement:s,rects:i,platform:r,elements:c,middlewareData:a}=n;const{element:l,padding:f=0}=x(t,n)||{};if(l==null){return{}}const u=F(f);const d={x:e,y:o};const h=C(s);const m=O(h);const y=await r.getDimensions(l);const v=h==="y";const g=v?"top":"left";const w=v?"bottom":"right";const k=v?"clientHeight":"clientWidth";const T=i.reference[m]+i.reference[h]-d[h]-i.floating[m];const P=d[h]-i.reference[h];const D=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l));let S=D?D[k]:0;if(!S||!await(r.isElement==null?void 0:r.isElement(D))){S=c.floating[k]||i.floating[m]}const R=T/2-P/2;const j=S/2-y[m]/2-1;const L=p(u[g],j);const M=p(u[w],j);const B=L;const H=S-y[m]-M;const E=S/2-y[m]/2+R;const $=b(B,E,H);const W=!a.arrow&&A(s)!=null&&E!==$&&i.reference[m]/2-(E<B?L:M)-y[m]/2<0;const z=W?E<B?E-B:E-H:0;return{[h]:d[h]+z,data:{[h]:$,centerOffset:E-$-z,...W&&{alignmentOffset:z}},reset:W}}});function N(t,n,e){const o=t?[...e.filter((n=>A(n)===t)),...e.filter((n=>A(n)!==t))]:e.filter((t=>k(t)===t));return o.filter((e=>{if(t){return A(e)===t||(n?R(e)!==e:false)}return true}))}const I=function(t){if(t===void 0){t={}}return{name:"autoPlacement",options:t,async fn(n){var e,o,s;const{rects:i,middlewareData:r,placement:c,platform:a,elements:l}=n;const{crossAxis:f=false,alignment:u,allowedPlacements:d=h,autoAlignment:p=true,...m}=x(t,n);const y=u!==undefined||d===h?N(u||null,p,d):d;const v=await W(n,m);const g=((e=r.autoPlacement)==null?void 0:e.index)||0;const w=y[g];if(w==null){return{}}const b=D(w,i,await(a.isRTL==null?void 0:a.isRTL(l.floating)));if(c!==w){return{reset:{placement:y[0]}}}const T=[v[k(w)],v[b[0]],v[b[1]]];const O=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:w,overflows:T}];const P=y[g+1];if(P){return{data:{index:g+1,overflows:O},reset:{placement:P}}}const C=O.map((t=>{const n=A(t.placement);return[t.placement,n&&f?t.overflows.slice(0,2).reduce(((t,n)=>t+n),0):t.overflows[0],t.overflows]})).sort(((t,n)=>t[1]-n[1]));const S=C.filter((t=>t[2].slice(0,A(t[0])?2:3).every((t=>t<=0))));const R=((s=S[0])==null?void 0:s[0])||C[0][0];if(R!==c){return{data:{index:g+1,overflows:O},reset:{placement:R}}}return{}}}};const U=function(t){if(t===void 0){t={}}return{name:"flip",options:t,async fn(n){var e,o;const{placement:s,middlewareData:i,rects:r,initialPlacement:c,platform:a,elements:l}=n;const{mainAxis:f=true,crossAxis:u=true,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=true,...y}=x(t,n);if((e=i.arrow)!=null&&e.alignmentOffset){return{}}const v=k(s);const g=k(c)===c;const w=await(a.isRTL==null?void 0:a.isRTL(l.floating));const b=d||(g||!m?[M(c)]:S(c));if(!d&&p!=="none"){b.push(...L(c,m,p,w))}const A=[c,...b];const T=await W(n,y);const O=[];let P=((o=i.flip)==null?void 0:o.overflows)||[];if(f){O.push(T[v])}if(u){const t=D(s,r,w);O.push(T[t[0]],T[t[1]])}P=[...P,{placement:s,overflows:O}];if(!O.every((t=>t<=0))){var C,R;const t=(((C=i.flip)==null?void 0:C.index)||0)+1;const n=A[t];if(n){return{data:{index:t,overflows:P},reset:{placement:n}}}let e=(R=P.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])==null?void 0:R.placement;if(!e){switch(h){case"bestFit":{var j;const t=(j=P.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])==null?void 0:j[0];if(t){e=t}break}case"initialPlacement":e=c;break}}if(s!==e){return{reset:{placement:e}}}}return{}}}};function _(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function G(t){return u.some((n=>t[n]>=0))}const K=function(t){if(t===void 0){t={}}return{name:"hide",options:t,async fn(n){const{rects:e}=n;const{strategy:o="referenceHidden",...s}=x(t,n);switch(o){case"referenceHidden":{const t=await W(n,{...s,elementContext:"reference"});const o=_(t,e.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:G(o)}}}case"escaped":{const t=await W(n,{...s,altBoundary:true});const o=_(t,e.floating);return{data:{escapedOffsets:o,escaped:G(o)}}}default:{return{}}}}}};function V(t){const n=p(...t.map((t=>t.left)));const e=p(...t.map((t=>t.top)));const o=m(...t.map((t=>t.right)));const s=m(...t.map((t=>t.bottom)));return{x:n,y:e,width:o-n,height:s-e}}function X(t){const n=t.slice().sort(((t,n)=>t.y-n.y));const e=[];let o=null;for(let t=0;t<n.length;t++){const s=n[t];if(!o||s.y-o.y>o.height/2){e.push([s])}else{e[e.length-1].push(s)}o=s}return e.map((t=>H(V(t))))}const Y=function(t){if(t===void 0){t={}}return{name:"inline",options:t,async fn(n){const{placement:e,elements:o,rects:s,platform:i,strategy:r}=n;const{padding:c=2,x:a,y:l}=x(t,n);const f=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(o.reference))||[]);const u=X(f);const d=H(V(f));const h=F(c);function y(){if(u.length===2&&u[0].left>u[1].right&&a!=null&&l!=null){return u.find((t=>a>t.left-h.left&&a<t.right+h.right&&l>t.top-h.top&&l<t.bottom+h.bottom))||d}if(u.length>=2){if(P(e)==="y"){const t=u[0];const n=u[u.length-1];const o=k(e)==="top";const s=t.top;const i=n.bottom;const r=o?t.left:n.left;const c=o?t.right:n.right;const a=c-r;const l=i-s;return{top:s,bottom:i,left:r,right:c,width:a,height:l,x:r,y:s}}const t=k(e)==="left";const n=m(...u.map((t=>t.right)));const o=p(...u.map((t=>t.left)));const s=u.filter((e=>t?e.left===o:e.right===n));const i=s[0].top;const r=s[s.length-1].bottom;const c=o;const a=n;const l=a-c;const f=r-i;return{top:i,bottom:r,left:c,right:a,width:l,height:f,x:c,y:i}}return d}const v=await i.getElementRects({reference:{getBoundingClientRect:y},floating:o.floating,strategy:r});if(s.reference.x!==v.reference.x||s.reference.y!==v.reference.y||s.reference.width!==v.reference.width||s.reference.height!==v.reference.height){return{reset:{rects:v}}}return{}}}};async function q(t,n){const{placement:e,platform:o,elements:s}=t;const i=await(o.isRTL==null?void 0:o.isRTL(s.floating));const r=k(e);const c=A(e);const a=P(e)==="y";const l=["left","top"].includes(r)?-1:1;const f=i&&a?-1:1;const u=x(n,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof u==="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};if(c&&typeof p==="number"){h=c==="end"?p*-1:p}return a?{x:h*f,y:d*l}:{x:d*l,y:h*f}}const J=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(n){var e,o;const{x:s,y:i,placement:r,middlewareData:c}=n;const a=await q(n,t);if(r===((e=c.offset)==null?void 0:e.placement)&&(o=c.arrow)!=null&&o.alignmentOffset){return{}}return{x:s+a.x,y:i+a.y,data:{...a,placement:r}}}}};const Q=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:s}=n;const{mainAxis:i=true,crossAxis:r=false,limiter:c={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...a}=x(t,n);const l={x:e,y:o};const f=await W(n,a);const u=P(k(s));const d=T(u);let h=l[d];let p=l[u];if(i){const t=d==="y"?"top":"left";const n=d==="y"?"bottom":"right";const e=h+f[t];const o=h-f[n];h=b(e,h,o)}if(r){const t=u==="y"?"top":"left";const n=u==="y"?"bottom":"right";const e=p+f[t];const o=p-f[n];p=b(e,p,o)}const m=c.fn({...n,[d]:h,[u]:p});return{...m,data:{x:m.x-e,y:m.y-o}}}}};const Z=function(t){if(t===void 0){t={}}return{options:t,fn(n){const{x:e,y:o,placement:s,rects:i,middlewareData:r}=n;const{offset:c=0,mainAxis:a=true,crossAxis:l=true}=x(t,n);const f={x:e,y:o};const u=P(s);const d=T(u);let h=f[d];let p=f[u];const m=x(c,n);const y=typeof m==="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(a){const t=d==="y"?"height":"width";const n=i.reference[d]-i.floating[t]+y.mainAxis;const e=i.reference[d]+i.reference[t]-y.mainAxis;if(h<n){h=n}else if(h>e){h=e}}if(l){var v,g;const t=d==="y"?"width":"height";const n=["top","left"].includes(k(s));const e=i.reference[u]-i.floating[t]+(n?((v=r.offset)==null?void 0:v[u])||0:0)+(n?0:y.crossAxis);const o=i.reference[u]+i.reference[t]+(n?0:((g=r.offset)==null?void 0:g[u])||0)-(n?y.crossAxis:0);if(p<e){p=e}else if(p>o){p=o}}return{[d]:h,[u]:p}}}};const tt=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(n){const{placement:e,rects:o,platform:s,elements:i}=n;const{apply:r=(()=>{}),...c}=x(t,n);const a=await W(n,c);const l=k(e);const f=A(e);const u=P(e)==="y";const{width:d,height:h}=o.floating;let y;let v;if(l==="top"||l==="bottom"){y=l;v=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"}else{v=l;y=f==="end"?"top":"bottom"}const g=h-a.top-a.bottom;const w=d-a.left-a.right;const b=p(h-a[y],g);const T=p(d-a[v],w);const O=!n.middlewareData.shift;let C=b;let D=T;if(u){D=f||O?p(T,w):w}else{C=f||O?p(b,g):g}if(O&&!f){const t=m(a.left,0);const n=m(a.right,0);const e=m(a.top,0);const o=m(a.bottom,0);if(u){D=d-2*(t!==0||n!==0?t+n:m(a.left,a.right))}else{C=h-2*(e!==0||o!==0?e+o:m(a.top,a.bottom))}}await r({...n,availableWidth:D,availableHeight:C});const S=await s.getDimensions(i.floating);if(d!==S.width||h!==S.height){return{reset:{rects:true}}}return{}}}};function nt(){return typeof window!=="undefined"}function et(t){if(it(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function ot(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function st(t){var n;return(n=(it(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function it(t){if(!nt()){return false}return t instanceof Node||t instanceof ot(t).Node}function rt(t){if(!nt()){return false}return t instanceof Element||t instanceof ot(t).Element}function ct(t){if(!nt()){return false}return t instanceof HTMLElement||t instanceof ot(t).HTMLElement}function at(t){if(!nt()||typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof ot(t).ShadowRoot}function lt(t){const{overflow:n,overflowX:e,overflowY:o,display:s}=yt(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(s)}function ft(t){return["table","td","th"].includes(et(t))}function ut(t){return[":popover-open",":modal"].some((n=>{try{return t.matches(n)}catch(t){return false}}))}function dt(t){const n=pt();const e=rt(t)?yt(t):t;return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":false)||!n&&(e.backdropFilter?e.backdropFilter!=="none":false)||!n&&(e.filter?e.filter!=="none":false)||["transform","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function ht(t){let n=gt(t);while(ct(n)&&!mt(n)){if(dt(n)){return n}else if(ut(n)){return null}n=gt(n)}return null}function pt(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function mt(t){return["html","body","#document"].includes(et(t))}function yt(t){return ot(t).getComputedStyle(t)}function vt(t){if(rt(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function gt(t){if(et(t)==="html"){return t}const n=t.assignedSlot||t.parentNode||at(t)&&t.host||st(t);return at(n)?n.host:n}function wt(t){const n=gt(t);if(mt(n)){return t.ownerDocument?t.ownerDocument.body:t.body}if(ct(n)&<(n)){return n}return wt(n)}function bt(t,n,e){var o;if(n===void 0){n=[]}if(e===void 0){e=true}const s=wt(t);const i=s===((o=t.ownerDocument)==null?void 0:o.body);const r=ot(s);if(i){const t=xt(r);return n.concat(r,r.visualViewport||[],lt(s)?s:[],t&&e?bt(t):[])}return n.concat(s,bt(s,[],e))}function xt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function kt(t){const n=yt(t);let e=parseFloat(n.width)||0;let o=parseFloat(n.height)||0;const s=ct(t);const i=s?t.offsetWidth:e;const r=s?t.offsetHeight:o;const c=y(e)!==i||y(o)!==r;if(c){e=i;o=r}return{width:e,height:o,$:c}}function At(t){return!rt(t)?t.contextElement:t}function Tt(t){const n=At(t);if(!ct(n)){return v(1)}const e=n.getBoundingClientRect();const{width:o,height:s,$:i}=kt(n);let r=(i?y(e.width):e.width)/o;let c=(i?y(e.height):e.height)/s;if(!r||!Number.isFinite(r)){r=1}if(!c||!Number.isFinite(c)){c=1}return{x:r,y:c}}const Ot=v(0);function Pt(t){const n=ot(t);if(!pt()||!n.visualViewport){return Ot}return{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Ct(t,n,e){if(n===void 0){n=false}if(!e||n&&e!==ot(t)){return false}return n}function Dt(t,n,e,o){if(n===void 0){n=false}if(e===void 0){e=false}const s=t.getBoundingClientRect();const i=At(t);let r=v(1);if(n){if(o){if(rt(o)){r=Tt(o)}}else{r=Tt(t)}}const c=Ct(i,e,o)?Pt(i):v(0);let a=(s.left+c.x)/r.x;let l=(s.top+c.y)/r.y;let f=s.width/r.x;let u=s.height/r.y;if(i){const t=ot(i);const n=o&&rt(o)?ot(o):o;let e=t;let s=xt(e);while(s&&o&&n!==e){const t=Tt(s);const n=s.getBoundingClientRect();const o=yt(s);const i=n.left+(s.clientLeft+parseFloat(o.paddingLeft))*t.x;const r=n.top+(s.clientTop+parseFloat(o.paddingTop))*t.y;a*=t.x;l*=t.y;f*=t.x;u*=t.y;a+=i;l+=r;e=ot(s);s=xt(e)}}return H({width:f,height:u,x:a,y:l})}function St(t){let{elements:n,rect:e,offsetParent:o,strategy:s}=t;const i=s==="fixed";const r=st(o);const c=n?ut(n.floating):false;if(o===r||c&&i){return e}let a={scrollLeft:0,scrollTop:0};let l=v(1);const f=v(0);const u=ct(o);if(u||!u&&!i){if(et(o)!=="body"||lt(r)){a=vt(o)}if(ct(o)){const t=Dt(o);l=Tt(o);f.x=t.x+o.clientLeft;f.y=t.y+o.clientTop}}return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-a.scrollLeft*l.x+f.x,y:e.y*l.y-a.scrollTop*l.y+f.y}}function Rt(t){return Array.from(t.getClientRects())}function jt(t,n){const e=vt(t).scrollLeft;if(!n){return Dt(st(t)).left+e}return n.left+e}function Lt(t){const n=st(t);const e=vt(t);const o=t.ownerDocument.body;const s=m(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth);const i=m(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let r=-e.scrollLeft+jt(t);const c=-e.scrollTop;if(yt(o).direction==="rtl"){r+=m(n.clientWidth,o.clientWidth)-s}return{width:s,height:i,x:r,y:c}}function Mt(t,n){const e=ot(t);const o=st(t);const s=e.visualViewport;let i=o.clientWidth;let r=o.clientHeight;let c=0;let a=0;if(s){i=s.width;r=s.height;const t=pt();if(!t||t&&n==="fixed"){c=s.offsetLeft;a=s.offsetTop}}return{width:i,height:r,x:c,y:a}}function Bt(t,n){const e=Dt(t,true,n==="fixed");const o=e.top+t.clientTop;const s=e.left+t.clientLeft;const i=ct(t)?Tt(t):v(1);const r=t.clientWidth*i.x;const c=t.clientHeight*i.y;const a=s*i.x;const l=o*i.y;return{width:r,height:c,x:a,y:l}}function Ft(t,n,e){let o;if(n==="viewport"){o=Mt(t,e)}else if(n==="document"){o=Lt(st(t))}else if(rt(n)){o=Bt(n,e)}else{const e=Pt(t);o={...n,x:n.x-e.x,y:n.y-e.y}}return H(o)}function Ht(t,n){const e=gt(t);if(e===n||!rt(e)||mt(e)){return false}return yt(e).position==="fixed"||Ht(e,n)}function Et(t,n){const e=n.get(t);if(e){return e}let o=bt(t,[],false).filter((t=>rt(t)&&et(t)!=="body"));let s=null;const i=yt(t).position==="fixed";let r=i?gt(t):t;while(rt(r)&&!mt(r)){const n=yt(r);const e=dt(r);if(!e&&n.position==="fixed"){s=null}const c=i?!e&&!s:!e&&n.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||lt(r)&&!e&&Ht(t,r);if(c){o=o.filter((t=>t!==r))}else{s=n}r=gt(r)}n.set(t,o);return o}function $t(t){let{element:n,boundary:e,rootBoundary:o,strategy:s}=t;const i=e==="clippingAncestors"?ut(n)?[]:Et(n,this._c):[].concat(e);const r=[...i,o];const c=r[0];const a=r.reduce(((t,e)=>{const o=Ft(n,e,s);t.top=m(o.top,t.top);t.right=p(o.right,t.right);t.bottom=p(o.bottom,t.bottom);t.left=m(o.left,t.left);return t}),Ft(n,c,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Wt(t){const{width:n,height:e}=kt(t);return{width:n,height:e}}function zt(t,n,e){const o=ct(n);const s=st(n);const i=e==="fixed";const r=Dt(t,true,i,n);let c={scrollLeft:0,scrollTop:0};const a=v(0);if(o||!o&&!i){if(et(n)!=="body"||lt(s)){c=vt(n)}if(o){const t=Dt(n,true,i,n);a.x=t.x+n.clientLeft;a.y=t.y+n.clientTop}else if(s){a.x=jt(s)}}let l=0;let f=0;if(s&&!o&&!i){const t=s.getBoundingClientRect();f=t.top+c.scrollTop;l=t.left+c.scrollLeft-jt(s,t)}const u=r.left+c.scrollLeft-a.x-l;const d=r.top+c.scrollTop-a.y-f;return{x:u,y:d,width:r.width,height:r.height}}function Nt(t){return yt(t).position==="static"}function It(t,n){if(!ct(t)||yt(t).position==="fixed"){return null}if(n){return n(t)}let e=t.offsetParent;if(st(t)===e){e=e.ownerDocument.body}return e}function Ut(t,n){const e=ot(t);if(ut(t)){return e}if(!ct(t)){let n=gt(t);while(n&&!mt(n)){if(rt(n)&&!Nt(n)){return n}n=gt(n)}return e}let o=It(t,n);while(o&&ft(o)&&Nt(o)){o=It(o,n)}if(o&&mt(o)&&Nt(o)&&!dt(o)){return e}return o||ht(t)||e}const _t=async function(t){const n=this.getOffsetParent||Ut;const e=this.getDimensions;const o=await e(t.floating);return{reference:zt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Gt(t){return yt(t).direction==="rtl"}const Kt={convertOffsetParentRelativeRectToViewportRelativeRect:St,getDocumentElement:st,getClippingRect:$t,getOffsetParent:Ut,getElementRects:_t,getClientRects:Rt,getDimensions:Wt,getScale:Tt,isElement:rt,isRTL:Gt};const Vt=J;I;const Xt=Q;const Yt=U;tt;K;const qt=z;Y;Z;const Jt=(t,n,e)=>{const o=new Map;const s={platform:Kt,...e};const i={...s.platform,_c:o};return $(t,n,{...s,platform:i})};const Qt=(t,n,e)=>{const o=t.get(n);if(!o){t.set(n,[e])}else if(!o.includes(e)){o.push(e)}};const Zt=(t,n)=>{let e;return(...o)=>{if(e){clearTimeout(e)}e=setTimeout((()=>{e=0;t(...o)}),n)}};const tn=t=>!("isConnected"in t)||t.isConnected;const nn=Zt((t=>{for(let n of t.keys()){t.set(n,t.get(n).filter(tn))}}),2e3);const en=()=>{if(typeof t!=="function"){return{}}const e=new Map;return{dispose:()=>e.clear(),get:n=>{const o=t();if(o){Qt(e,n,o)}},set:t=>{const o=e.get(t);if(o){e.set(t,o.filter(n))}nn(e)},reset:()=>{e.forEach((t=>t.forEach(n)));nn(e)}}};const on=t=>typeof t==="function"?t():t;const sn=(t,n=((t,n)=>t!==n))=>{const e=on(t);let o=new Map(Object.entries(e!==null&&e!==void 0?e:{}));const s={dispose:[],get:[],set:[],reset:[]};const i=()=>{var n;o=new Map(Object.entries((n=on(t))!==null&&n!==void 0?n:{}));s.reset.forEach((t=>t()))};const r=()=>{s.dispose.forEach((t=>t()));i()};const c=t=>{s.get.forEach((n=>n(t)));return o.get(t)};const a=(t,e)=>{const i=o.get(t);if(n(e,i,t)){o.set(t,e);s.set.forEach((n=>n(t,e,i)))}};const l=typeof Proxy==="undefined"?{}:new Proxy(e,{get(t,n){return c(n)},ownKeys(t){return Array.from(o.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,n){return o.has(n)},set(t,n,e){a(n,e);return true}});const f=(t,n)=>{s[t].push(n);return()=>{rn(s[t],n)}};const u=(n,e)=>{const o=f("set",((t,o)=>{if(t===n){e(o)}}));const s=f("reset",(()=>e(on(t)[n])));return()=>{o();s()}};const d=(...t)=>{const n=t.reduce(((t,n)=>{if(n.set){t.push(f("set",n.set))}if(n.get){t.push(f("get",n.get))}if(n.reset){t.push(f("reset",n.reset))}if(n.dispose){t.push(f("dispose",n.dispose))}return t}),[]);return()=>n.forEach((t=>t()))};const h=t=>{const n=o.get(t);s.set.forEach((e=>e(t,n,n)))};return{state:l,get:c,set:a,on:f,onChange:u,use:d,dispose:r,reset:i,forceUpdate:h}};const rn=(t,n)=>{const e=t.indexOf(n);if(e>=0){t[e]=t[t.length-1];t.length--}};const cn=(t,n)=>{const e=sn(t,n);e.use(en());return e};const an="nv-popover{display:inline-block;position:relative}nv-popover:has([fluid]:not([fluid=false])){display:block}nv-popover>[data-scope=popover]{width:max-content;background-color:var(--components-popover-background);border-color:var(--components-popover-border);font-weight:var(--font-weight-medium-emphasis);border-width:1px;border-style:solid;border-radius:var(--popover-radius);padding:var(--popover-padding-y) var(--popover-padding-x);position:absolute;top:0;left:0;z-index:1;box-shadow:var(--popover-shadow-1-x) var(--popover-shadow-1-y) var(--popover-shadow-1-blur) -2px var(--popover-shadow-1-opacity), var(--popover-shadow-2-x) var(--popover-shadow-2-y) var(--popover-shadow-2-blur) var(--shadow-spread-lg-2) var(--popover-shadow-2-opacity)}nv-popover>[data-scope=popover][hidden]:not([hidden=false]){display:none}nv-popover>[data-scope=popover]>[data-scope=arrow]{background-color:var(--components-popover-background);position:absolute;border-color:var(--components-popover-border);border-width:1px;border-style:solid;border-bottom-color:transparent;border-right-color:transparent;width:8px;height:8px;transform:rotate(45deg);border-radius:1px}nv-popover>[data-scope=popover]>[slot=content]{position:relative;z-index:1}nv-popover>slot-fb{display:none}";const ln=an;const{state:fn}=cn({groups:new Map});const un=class{constructor(t){e(this,t);this.openChanged=o(this,"openChanged",7);this.eventsAttached=false;this.open=false;this.triggerMode="click";this.placement="bottom";this.offset=6;this.hasArrow=false;this.disableFlip=false;this.shiftPadding=0;this.enterDelay=0;this.nested=false;this.handleClickOutside=t=>{var n;if(this.el.contains(t.target))return;if((n=this.triggerElement)===null||n===void 0?void 0:n.contains(t.target))return;this.open=false};this.clickEvents=[["click",()=>this.open=!this.open]];this.outsideClickEvents=[["click",this.handleClickOutside],["touchstart",this.handleClickOutside]];this.hoverEvents=[["focus",()=>{clearTimeout(this.hideTimeout);this.showTimeout=setTimeout((()=>this.open=true),this.enterDelay)}],["blur",()=>{clearTimeout(this.showTimeout);this.hideTimeout=setTimeout((()=>this.open=false),50)}],["mouseenter",()=>{clearTimeout(this.hideTimeout);this.showTimeout=setTimeout((()=>this.open=true),this.enterDelay)}],["mouseleave",()=>{clearTimeout(this.showTimeout);this.hideTimeout=setTimeout((()=>this.open=false),100)}]];this.closeEvents=[["keydown",t=>{if(t.key==="Escape"){this.open=false}}]];this.isAnimating=false}async show(){this.open=true}async hide(){this.open=false}async toggle(){this.open=!this.open}attachEventListeners(){if(this.triggerElement&&!this.eventsAttached){l(this.closeEvents,document,this);if(this.triggerMode==="click"){l(this.clickEvents,this.triggerElement,this);l(this.outsideClickEvents,document,this)}if(this.triggerMode==="hover"){l(this.hoverEvents,this.triggerElement,this)}this.eventsAttached=true}}positionPopover(){if(!this.triggerElement)return;Jt(this.triggerElement,this.popoverElement,{placement:this.placement,middleware:[Vt(this.offset),!this.disableFlip&&Yt({fallbackStrategy:"bestFit",crossAxis:true,fallbackPlacements:["bottom"]}),Xt({padding:this.shiftPadding}),this.hasArrow&&qt({element:this.arrowElement})]}).then((({x:t,y:n,placement:e,middlewareData:o})=>{Object.assign(this.popoverElement.style,{left:`${t}px`,top:`${n}px`});if(this.hasArrow){const t={top:"bottom",right:"left",bottom:"top",left:"right"}[e.split("-")[0]];const n={top:"rotate(225deg)",right:"rotate(315deg)",bottom:"rotate(45deg)",left:"rotate(135deg)"}[e.split("-")[0]];const{x:s,y:i}=o.arrow;Object.assign(this.arrowElement.style,{left:s!=null?`${s}px`:"",top:i!=null?`${i}px`:"",right:"",bottom:"",transform:n,[t]:"-4px"})}}))}handleOpenChanged(t){var n;if(this.triggerMode==="controlled")return;if(this.nested)return;if((n=t.target)===null||n===void 0?void 0:n.hasAttribute("nested"))return;if(t.target!==this.el&&t.detail===true)this.open=false}async handleOpenChange(t){while(this.isAnimating){await new Promise((t=>setTimeout(t,50)))}this.isAnimating=true;const n=fn.groups.get(this.groupName);const e=n&&n.openedBy!==this.el;const o=n&&n.openedBy===this.el;if(t)this.popoverElement.style.removeProperty("display");if(o&&!t)fn.groups.delete(this.groupName);if(this.groupName&&t)fn.groups.set(this.groupName,{openedBy:this.el});const{growIn:s}=a(this.popoverElement,{duration:e?0:100,amount:.85});const{fadeOut:i}=c(this.popoverElement,{duration:e?0:100});if(t===true){this.popoverElement.removeAttribute("hidden");this.positionPopover();await s()}if(t===false){await i();this.popoverElement.setAttribute("hidden","")}this.isAnimating=false;this.openChanged.emit(t)}componentWillLoad(){if(!this.triggerElement)this.triggerElement=Array.from(this.el.children).find((t=>t.getAttribute("slot")==="trigger"))}componentWillUpdate(){this.attachEventListeners()}componentDidLoad(){if(!this.open){const{setGrowOut:t}=a(this.popoverElement);t()}else{const{setFadeIn:t}=c(this.popoverElement);t();this.popoverElement.removeAttribute("hidden")}this.positionPopover();this.attachEventListeners()}disconnectedCallback(){f(this.closeEvents,document,this);if(this.triggerMode==="click"){f(this.clickEvents,this.triggerElement,this);f(this.outsideClickEvents,document,this)}if(this.triggerMode==="hover")f(this.hoverEvents,this.triggerElement,this);this.eventsAttached=false;if(this.hideTimeout)clearTimeout(this.hideTimeout);if(this.showTimeout)clearTimeout(this.showTimeout)}render(){return s(i,{key:"dd1a09e6df99069395fff7bb1a1b5d5e52331755"},s("slot",{key:"998460dcac1e6cae6e420413c2e9bef460ed7d76",name:"trigger"}),s("div",{key:"36a4bad082087b073e1f26b997f902611f6b7265","data-scope":"popover",hidden:true,ref:t=>this.popoverElement=t},this.hasArrow&&s("div",{key:"7734847121f62b2233c0d99baa05c9c71ba9d6e4","data-scope":"arrow",ref:t=>this.arrowElement=t}),s("slot",{key:"29d5e8860f9ccdf2382f61c4276019a36983b0ff",name:"content"})))}get el(){return r(this)}static get watchers(){return{open:["handleOpenChange"]}}};un.style=ln;export{un as nv_popover};
|
|
2
|
-
//# sourceMappingURL=p-d4bf2587.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as o,h as t,H as a,g as e}from"./p-d0a33e64.js";const r="nv-tooltip{display:inline-block;position:relative;user-select:none}nv-tooltip:has([fluid]:not([fluid=false])){display:block}nv-tooltip [data-scope=popover]{background:var(--components-tooltip-background);color:var(--components-tooltip-text);font-weight:var(--font-weight-medium-emphasis);padding:var(--tooltip-padding-y) var(--tooltip-padding-x);font-size:var(--tooltip-font-size);border-radius:var(--tooltip-radius);border:none;box-shadow:0px var(--shadow-y-axis-lg-1) var(--shadow-blur-lg-1) var(--shadow-spread-lg-1) var(--shadow-color-opacity-1), 0px var(--shadow-y-axis-lg-2) var(--shadow-blur-lg-2) var(--shadow-spread-lg-2) var(--shadow-color-opacity-2)}nv-tooltip [data-scope=popover] [data-scope=arrow]{background:var(--components-tooltip-background);box-shadow:none;border:none}";const s=r;const d=class{constructor(t){o(this,t);this.placement="bottom";this.enterDelay=0}componentWillLoad(){if(!this.triggerElement)this.triggerElement=Array.from(this.el.children).find((o=>o.getAttribute("slot")===null))}render(){return t(a,{key:"a5ac533aff7f1dbeb92fdea0b512418a05ed39d1"},t("slot",{key:"5c96133df21b7fdc7cf2d9eb73766dc88d4bdc2e"}),t("nv-popover",{key:"e80cb8ebb57f57940e9a32bb00499a5a35e1e547",triggerMode:"hover",hasArrow:true,placement:this.placement,triggerElement:this.triggerElement,groupName:"tooltip",enterDelay:this.enterDelay},t("p",{key:"180dedb4dcf838271ea48986f5c8183fd8772af4",slot:"content"},this.message),t("slot",{key:"b5a026e8a446e08a1a50fc3838757e4b4264b07a",name:"content"})))}get el(){return e(this)}};d.style=s;export{d as nv_tooltip};
|
|
2
|
-
//# sourceMappingURL=p-eaf51f2c.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["nvTooltipCss","NvTooltipStyle0","NvTooltip","constructor","hostRef","this","placement","enterDelay","componentWillLoad","triggerElement","Array","from","el","children","find","child","getAttribute","render","h","Host","key","triggerMode","hasArrow","groupName","slot","message","name"],"sources":["src/components/nv-tooltip/nv-tooltip.scss?tag=nv-tooltip","src/components/nv-tooltip/nv-tooltip.tsx"],"sourcesContent":["@mixin root-styles() {\n display: inline-block;\n position: relative;\n user-select: none;\n &:has([fluid]:not([fluid='false'])) {\n display: block;\n }\n}\n\n@mixin tooltip-styles() {\n background: var(--components-tooltip-background);\n color: var(--components-tooltip-text);\n font-weight: var(--font-weight-medium-emphasis);\n padding: var(--tooltip-padding-y) var(--tooltip-padding-x);\n font-size: var(--tooltip-font-size);\n border-radius: var(--tooltip-radius);\n border: none;\n box-shadow:\n 0px var(--shadow-y-axis-lg-1) var(--shadow-blur-lg-1)\n var(--shadow-spread-lg-1) var(--shadow-color-opacity-1),\n 0px var(--shadow-y-axis-lg-2) var(--shadow-blur-lg-2)\n var(--shadow-spread-lg-2) var(--shadow-color-opacity-2);\n}\n\n@mixin arrow-styles() {\n background: var(--components-tooltip-background);\n box-shadow: none;\n border: none;\n}\n\nnv-tooltip {\n @include root-styles();\n\n [data-scope='popover'] {\n @include tooltip-styles();\n\n [data-scope='arrow'] {\n @include arrow-styles();\n }\n }\n}\n","import { Component, Host, h, Element, Prop } from '@stencil/core';\nimport type { Placement } from '@floating-ui/dom';\n\n/**\n * @slot default - Content to be placed as the trigger.\n * @slot content - Content to be placed within the popover. Use for custom html, will render under the message.\n */\n@Component({\n tag: 'nv-tooltip',\n styleUrl: 'nv-tooltip.scss',\n shadow: false,\n})\nexport class NvTooltip {\n @Element() el: HTMLNvTooltipElement;\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({ reflect: false, mutable: true })\n triggerElement: Element;\n\n /**\n * A string representing the text to be displayed inside the tooltip. This\n * content is shown when the tooltip is activated by the user, such as on\n * hover or focus events.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Decides where the tooltip shows up next to the element it’s linked to\n * (above, below, to the sides). If there isn’t enough room, it will adjust\n * it's position on the axis to fit on the screen, so users can always see it.\n */\n @Prop({ reflect: true })\n readonly placement: Placement = 'bottom';\n\n /**\n * Controls how long (in milliseconds) the tooltip waits to show after you\n * hover over or focus on an element. If you move away before the delay is up,\n * the tooltip won’t appear.\n */\n @Prop({ reflect: true })\n readonly enterDelay: number = 0;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (!this.triggerElement)\n this.triggerElement = Array.from(this.el.children).find(child => {\n return child.getAttribute('slot') === null;\n });\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n <slot></slot>\n\n <nv-popover\n triggerMode=\"hover\"\n hasArrow\n placement={this.placement}\n triggerElement={this.triggerElement}\n groupName={'tooltip'}\n enterDelay={this.enterDelay}\n >\n <p slot=\"content\">{this.message}</p>\n <slot name=\"content\"></slot>\n </nv-popover>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"mappings":"yDAAA,MAAMA,EAAe,uxBACrB,MAAAC,EAAeD,E,MCWFE,EAAS,MALtB,WAAAC,CAAAC,G,UAiCWC,KAAAC,UAAuB,SAQvBD,KAAAE,WAAqB,C,CAM9B,iBAAAC,GACE,IAAKH,KAAKI,eACRJ,KAAKI,eAAiBC,MAAMC,KAAKN,KAAKO,GAAGC,UAAUC,MAAKC,GAC/CA,EAAMC,aAAa,UAAY,M,CAQ5C,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,QAAAE,IAAA,6CAEAF,EAAA,cAAAE,IAAA,2CACEC,YAAY,QACZC,SAAQ,KACRhB,UAAWD,KAAKC,UAChBG,eAAgBJ,KAAKI,eACrBc,UAAW,UACXhB,WAAYF,KAAKE,YAEjBW,EAAA,KAAAE,IAAA,2CAAGI,KAAK,WAAWnB,KAAKoB,SACxBP,EAAA,QAAAE,IAAA,2CAAMM,KAAK,a","ignoreList":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|