@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
package/hydrate/index.js
CHANGED
|
@@ -2725,263 +2725,181 @@ var registerHost = (elm, cmpMeta) => {
|
|
|
2725
2725
|
};
|
|
2726
2726
|
var styles = /* @__PURE__ */ new Map();
|
|
2727
2727
|
|
|
2728
|
-
|
|
2728
|
+
const nvAccordionCss = "nv-accordion{display:block;border:var(--spacing-px) solid var(--color-content-low-border);border-radius:var(--radius-rounded-lg)}nv-accordion .nv-accordion__footer{padding:var(--spacing-3);background:var(--color-level-05-background);border-radius:0 0 var(--radius-rounded-lg) var(--radius-rounded-lg);margin-top:calc(var(--spacing-px) * -1);border-top:var(--spacing-px) solid var(--color-content-low-border)}nv-accordion .nv-accordion__footer:empty{display:none}";
|
|
2729
|
+
var NvAccordionStyle0 = nvAccordionCss;
|
|
2729
2730
|
|
|
2730
|
-
|
|
2731
|
-
(
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
}
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
(
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
(
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
}
|
|
2789
|
-
|
|
2790
|
-
(
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
'Fev',
|
|
2903
|
-
'Mar',
|
|
2904
|
-
'Avr',
|
|
2905
|
-
'Mai',
|
|
2906
|
-
'Jun',
|
|
2907
|
-
'Jul',
|
|
2908
|
-
'Aou',
|
|
2909
|
-
'Sep',
|
|
2910
|
-
'Oct',
|
|
2911
|
-
'Nov',
|
|
2912
|
-
'Dec',
|
|
2913
|
-
],
|
|
2914
|
-
'nl-BE': [
|
|
2915
|
-
'Jan',
|
|
2916
|
-
'Feb',
|
|
2917
|
-
'Maa',
|
|
2918
|
-
'Apr',
|
|
2919
|
-
'Mei',
|
|
2920
|
-
'Jun',
|
|
2921
|
-
'Jul',
|
|
2922
|
-
'Aug',
|
|
2923
|
-
'Sep',
|
|
2924
|
-
'Okt',
|
|
2925
|
-
'Nov',
|
|
2926
|
-
'Dec',
|
|
2927
|
-
],
|
|
2928
|
-
'de-DE': [
|
|
2929
|
-
'Jan',
|
|
2930
|
-
'Feb',
|
|
2931
|
-
'Mär',
|
|
2932
|
-
'Apr',
|
|
2933
|
-
'Mai',
|
|
2934
|
-
'Jun',
|
|
2935
|
-
'Jul',
|
|
2936
|
-
'Aug',
|
|
2937
|
-
'Sep',
|
|
2938
|
-
'Okt',
|
|
2939
|
-
'Nov',
|
|
2940
|
-
'Dez',
|
|
2941
|
-
],
|
|
2942
|
-
'en-BE': [
|
|
2943
|
-
'Jan',
|
|
2944
|
-
'Feb',
|
|
2945
|
-
'Mar',
|
|
2946
|
-
'Apr',
|
|
2947
|
-
'May',
|
|
2948
|
-
'Jun',
|
|
2949
|
-
'Jul',
|
|
2950
|
-
'Aug',
|
|
2951
|
-
'Sep',
|
|
2952
|
-
'Oct',
|
|
2953
|
-
'Nov',
|
|
2954
|
-
'Dec',
|
|
2955
|
-
],
|
|
2956
|
-
'en-US': [
|
|
2957
|
-
'Jan',
|
|
2958
|
-
'Feb',
|
|
2959
|
-
'Mar',
|
|
2960
|
-
'Apr',
|
|
2961
|
-
'May',
|
|
2962
|
-
'Jun',
|
|
2963
|
-
'Jul',
|
|
2964
|
-
'Aug',
|
|
2965
|
-
'Sep',
|
|
2966
|
-
'Oct',
|
|
2967
|
-
'Nov',
|
|
2968
|
-
'Dec',
|
|
2969
|
-
],
|
|
2970
|
-
'en-GB': [
|
|
2971
|
-
'Jan',
|
|
2972
|
-
'Feb',
|
|
2973
|
-
'Mar',
|
|
2974
|
-
'Apr',
|
|
2975
|
-
'May',
|
|
2976
|
-
'Jun',
|
|
2977
|
-
'Jul',
|
|
2978
|
-
'Aug',
|
|
2979
|
-
'Sep',
|
|
2980
|
-
'Oct',
|
|
2981
|
-
'Nov',
|
|
2982
|
-
'Dec',
|
|
2983
|
-
],
|
|
2984
|
-
};
|
|
2731
|
+
/**
|
|
2732
|
+
* @slot default - Slot for custom content (optional, ignored if data is provided)
|
|
2733
|
+
*/
|
|
2734
|
+
class NvAccordion {
|
|
2735
|
+
constructor(hostRef) {
|
|
2736
|
+
registerInstance(this, hostRef);
|
|
2737
|
+
this.openChanged = createEvent(this, "openChanged", 7);
|
|
2738
|
+
/****************************************************************************/
|
|
2739
|
+
//#region PROPERTIES
|
|
2740
|
+
/**
|
|
2741
|
+
* Data to display as a list of items (title, subtitle, content).
|
|
2742
|
+
*/
|
|
2743
|
+
this.data = [];
|
|
2744
|
+
/**
|
|
2745
|
+
* Expansion mode: 'accordion' (single open) or 'multi' (multiple open)
|
|
2746
|
+
*/
|
|
2747
|
+
this.mode = 'accordion';
|
|
2748
|
+
//#endregion PROPERTIES
|
|
2749
|
+
/****************************************************************************/
|
|
2750
|
+
//#region STATE
|
|
2751
|
+
/**
|
|
2752
|
+
* Internal index of open items (not exposed)
|
|
2753
|
+
*/
|
|
2754
|
+
this.internalOpenIndexes = [];
|
|
2755
|
+
}
|
|
2756
|
+
//#endregion EVENTS
|
|
2757
|
+
/****************************************************************************/
|
|
2758
|
+
//#region METHODS
|
|
2759
|
+
/**
|
|
2760
|
+
* Opens an item by its index (Public API)
|
|
2761
|
+
* @param {number} index Index of the item to open
|
|
2762
|
+
*/
|
|
2763
|
+
async open(index) {
|
|
2764
|
+
this.toggleItem(index, true);
|
|
2765
|
+
}
|
|
2766
|
+
/**
|
|
2767
|
+
* Closes an item by its index (Public API)
|
|
2768
|
+
* @param {number} index Index of the item to close
|
|
2769
|
+
*/
|
|
2770
|
+
async close(index) {
|
|
2771
|
+
this.toggleItem(index, false);
|
|
2772
|
+
}
|
|
2773
|
+
/**
|
|
2774
|
+
* Toggles an item's state (internal)
|
|
2775
|
+
* @param {number} index Item index
|
|
2776
|
+
* @param {boolean} [forceOpen] Force open (true) or close (false)
|
|
2777
|
+
*/
|
|
2778
|
+
toggleItem(index, forceOpen) {
|
|
2779
|
+
let openIndexes = this.openIndexes !== undefined
|
|
2780
|
+
? [...this.openIndexes]
|
|
2781
|
+
: [...(this.internalOpenIndexes || [])];
|
|
2782
|
+
const isOpen = openIndexes.includes(index);
|
|
2783
|
+
if (this.mode === 'accordion') {
|
|
2784
|
+
openIndexes = forceOpen === false || isOpen ? [] : [index];
|
|
2785
|
+
}
|
|
2786
|
+
else {
|
|
2787
|
+
if (forceOpen === false) {
|
|
2788
|
+
openIndexes = openIndexes.filter(i => i !== index);
|
|
2789
|
+
}
|
|
2790
|
+
else if (!isOpen) {
|
|
2791
|
+
openIndexes.push(index);
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
this.internalOpenIndexes = openIndexes;
|
|
2795
|
+
this.openChanged.emit({ openIndexes });
|
|
2796
|
+
if (this.openIndexes !== undefined) {
|
|
2797
|
+
this.openIndexes =
|
|
2798
|
+
this.mode === 'accordion'
|
|
2799
|
+
? [openIndexes[0]].filter(x => x !== undefined)
|
|
2800
|
+
: [...openIndexes];
|
|
2801
|
+
}
|
|
2802
|
+
// Update child elements state - for both data and slot usage
|
|
2803
|
+
this.updateChildrenState();
|
|
2804
|
+
}
|
|
2805
|
+
/**
|
|
2806
|
+
* Updates the open state of child elements based on internalOpenIndexes
|
|
2807
|
+
*/
|
|
2808
|
+
async updateChildrenState() {
|
|
2809
|
+
// Force a re-render by updating the state
|
|
2810
|
+
this.internalOpenIndexes = [...(this.internalOpenIndexes || [])];
|
|
2811
|
+
}
|
|
2812
|
+
/**
|
|
2813
|
+
* Listens to itemToggle events from nv-accordion-item elements
|
|
2814
|
+
* @param {CustomEvent<boolean>} event Event emitted by nv-accordion-item
|
|
2815
|
+
*/
|
|
2816
|
+
onItemToggle(event) {
|
|
2817
|
+
// Find the index of the item that emitted the event
|
|
2818
|
+
const items = Array.from(this.el.querySelectorAll('nv-accordion-item'));
|
|
2819
|
+
const targetItem = event.target;
|
|
2820
|
+
const index = items.indexOf(targetItem);
|
|
2821
|
+
if (index !== -1) {
|
|
2822
|
+
// If the event comes from an item that is opening, handle accordion mode
|
|
2823
|
+
if (event.detail === true) {
|
|
2824
|
+
if (this.mode === 'accordion') {
|
|
2825
|
+
// Close all other items
|
|
2826
|
+
items.forEach((item, i) => {
|
|
2827
|
+
if (i !== index && item.open) {
|
|
2828
|
+
item.open = false;
|
|
2829
|
+
}
|
|
2830
|
+
});
|
|
2831
|
+
this.internalOpenIndexes = [index];
|
|
2832
|
+
}
|
|
2833
|
+
else {
|
|
2834
|
+
// Add index to internalOpenIndexes if not already present
|
|
2835
|
+
if (!this.internalOpenIndexes.includes(index)) {
|
|
2836
|
+
this.internalOpenIndexes = [...this.internalOpenIndexes, index];
|
|
2837
|
+
}
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
else {
|
|
2841
|
+
// If the item is closing, remove it from internalOpenIndexes
|
|
2842
|
+
this.internalOpenIndexes = this.internalOpenIndexes.filter(i => i !== index);
|
|
2843
|
+
}
|
|
2844
|
+
// Emit openChanged event
|
|
2845
|
+
this.openChanged.emit({ openIndexes: this.internalOpenIndexes });
|
|
2846
|
+
if (this.openIndexes !== undefined) {
|
|
2847
|
+
this.openIndexes =
|
|
2848
|
+
this.mode === 'accordion'
|
|
2849
|
+
? [this.internalOpenIndexes[0]].filter(x => x !== undefined)
|
|
2850
|
+
: [...this.internalOpenIndexes];
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
}
|
|
2854
|
+
//#endregion METHODS
|
|
2855
|
+
/****************************************************************************/
|
|
2856
|
+
//#region WATCHERS
|
|
2857
|
+
//#endregion WATCHERS
|
|
2858
|
+
/****************************************************************************/
|
|
2859
|
+
//#region LIFECYCLE
|
|
2860
|
+
componentWillLoad() {
|
|
2861
|
+
if (this.openIndexes !== undefined) {
|
|
2862
|
+
this.internalOpenIndexes = [...this.openIndexes];
|
|
2863
|
+
}
|
|
2864
|
+
}
|
|
2865
|
+
componentDidLoad() {
|
|
2866
|
+
// If using direct child elements, initialize their state
|
|
2867
|
+
if (!this.data || this.data.length === 0) {
|
|
2868
|
+
this.updateChildrenState();
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
componentWillUpdate() {
|
|
2872
|
+
if (this.openIndexes !== undefined) {
|
|
2873
|
+
this.internalOpenIndexes = [...this.openIndexes];
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
//#endregion LIFECYCLE
|
|
2877
|
+
/****************************************************************************/
|
|
2878
|
+
//#region RENDER
|
|
2879
|
+
render() {
|
|
2880
|
+
return (hAsync(Host, { key: 'a6cb21b274024a00e60e0d0db780f25fab6e5bc2', role: "list", class: "nv-accordion" }, this.data && this.data.length > 0 ? (this.data.map((item, i) => {
|
|
2881
|
+
var _a;
|
|
2882
|
+
return (hAsync("nv-accordion-item", { key: (_a = item.id) !== null && _a !== void 0 ? _a : i, itemTitle: item.title, disabled: item.disabled, open: (this.internalOpenIndexes || []).includes(i) }, item.subtitle ? (hAsync("div", { slot: "header" }, hAsync("div", { class: "nv-accordion-item__header-content" }, hAsync("span", { class: "nv-accordion-item__title" }, item.title), hAsync("span", { class: "nv-accordion-item__subtitle" }, item.subtitle)))) : null, hAsync("div", { slot: "content" }, item.content), item.footer && hAsync("div", { slot: "footer" }, item.footer)));
|
|
2883
|
+
})) : (hAsync("slot", null))));
|
|
2884
|
+
}
|
|
2885
|
+
get el() { return getElement(this); }
|
|
2886
|
+
static get style() { return NvAccordionStyle0; }
|
|
2887
|
+
static get cmpMeta() { return {
|
|
2888
|
+
"$flags$": 4,
|
|
2889
|
+
"$tagName$": "nv-accordion",
|
|
2890
|
+
"$members$": {
|
|
2891
|
+
"data": [16],
|
|
2892
|
+
"mode": [513],
|
|
2893
|
+
"openIndexes": [1040],
|
|
2894
|
+
"internalOpenIndexes": [32],
|
|
2895
|
+
"open": [64],
|
|
2896
|
+
"close": [64]
|
|
2897
|
+
},
|
|
2898
|
+
"$listeners$": [[0, "itemToggle", "onItemToggle"]],
|
|
2899
|
+
"$lazyBundleId$": "-",
|
|
2900
|
+
"$attrsToReflect$": [["mode", "mode"]]
|
|
2901
|
+
}; }
|
|
2902
|
+
}
|
|
2985
2903
|
|
|
2986
2904
|
/******************************************************************************
|
|
2987
2905
|
Copyright (c) Microsoft Corporation.
|
|
@@ -4678,362 +4596,815 @@ function buildSVGAttrs(_a, dimensions, totalPathLength, cssBuilder, attrs, isDas
|
|
|
4678
4596
|
attrs[attrKey] = style[key];
|
|
4679
4597
|
}
|
|
4680
4598
|
}
|
|
4681
|
-
if (originX !== undefined || originY !== undefined || style.transform) {
|
|
4682
|
-
attrs.style.transformOrigin = calculateSVGTransformOrigin(dimensions, originX !== undefined ? originX : defaultOrigin, originY !== undefined ? originY : defaultOrigin);
|
|
4599
|
+
if (originX !== undefined || originY !== undefined || style.transform) {
|
|
4600
|
+
attrs.style.transformOrigin = calculateSVGTransformOrigin(dimensions, originX !== undefined ? originX : defaultOrigin, originY !== undefined ? originY : defaultOrigin);
|
|
4601
|
+
}
|
|
4602
|
+
if (attrX !== undefined) attrs.x = attrX;
|
|
4603
|
+
if (attrY !== undefined) attrs.y = attrY;
|
|
4604
|
+
if (totalPathLength !== undefined && pathLength !== undefined) {
|
|
4605
|
+
attrs[isDashCase ? 'stroke-dashoffset' : 'strokeDashoffset'] = progressToPixels(-pathOffset, totalPathLength);
|
|
4606
|
+
attrs[isDashCase ? 'stroke-dasharray' : 'strokeDasharray'] = progressToPixels(pathLength, totalPathLength) + " " + progressToPixels(pathSpacing, totalPathLength);
|
|
4607
|
+
}
|
|
4608
|
+
return attrs;
|
|
4609
|
+
}
|
|
4610
|
+
function createAttrBuilder(dimensions, totalPathLength, isDashCase) {
|
|
4611
|
+
if (isDashCase === void 0) {
|
|
4612
|
+
isDashCase = true;
|
|
4613
|
+
}
|
|
4614
|
+
var attrs = svgAttrsTemplate();
|
|
4615
|
+
var cssBuilder = createStyleBuilder(svgStyleConfig);
|
|
4616
|
+
return function (state) {
|
|
4617
|
+
return buildSVGAttrs(state, dimensions, totalPathLength, cssBuilder, attrs, isDashCase);
|
|
4618
|
+
};
|
|
4619
|
+
}
|
|
4620
|
+
|
|
4621
|
+
var getDimensions$1 = function (element) {
|
|
4622
|
+
return typeof element.getBBox === 'function' ? element.getBBox() : element.getBoundingClientRect();
|
|
4623
|
+
};
|
|
4624
|
+
var getSVGElementDimensions = function (element) {
|
|
4625
|
+
try {
|
|
4626
|
+
return getDimensions$1(element);
|
|
4627
|
+
} catch (e) {
|
|
4628
|
+
return { x: 0, y: 0, width: 0, height: 0 };
|
|
4629
|
+
}
|
|
4630
|
+
};
|
|
4631
|
+
|
|
4632
|
+
var isPath = function (element) {
|
|
4633
|
+
return element.tagName === 'path';
|
|
4634
|
+
};
|
|
4635
|
+
var svgStyler = /*#__PURE__*/createStyler({
|
|
4636
|
+
onRead: function (key, _a) {
|
|
4637
|
+
var element = _a.element;
|
|
4638
|
+
key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;
|
|
4639
|
+
if (!isTransformProp(key)) {
|
|
4640
|
+
return element.getAttribute(key);
|
|
4641
|
+
} else {
|
|
4642
|
+
var valueType = getValueType(key);
|
|
4643
|
+
return valueType ? valueType.default || 0 : 0;
|
|
4644
|
+
}
|
|
4645
|
+
},
|
|
4646
|
+
onRender: function (state, _a) {
|
|
4647
|
+
var element = _a.element,
|
|
4648
|
+
buildAttrs = _a.buildAttrs;
|
|
4649
|
+
var attrs = buildAttrs(state);
|
|
4650
|
+
for (var key in attrs) {
|
|
4651
|
+
if (key === 'style') {
|
|
4652
|
+
Object.assign(element.style, attrs.style);
|
|
4653
|
+
} else {
|
|
4654
|
+
element.setAttribute(key, attrs[key]);
|
|
4655
|
+
}
|
|
4656
|
+
}
|
|
4657
|
+
}
|
|
4658
|
+
});
|
|
4659
|
+
var svg = function (element) {
|
|
4660
|
+
var dimensions = getSVGElementDimensions(element);
|
|
4661
|
+
var pathLength = isPath(element) && element.getTotalLength ? element.getTotalLength() : undefined;
|
|
4662
|
+
return svgStyler({
|
|
4663
|
+
element: element,
|
|
4664
|
+
buildAttrs: createAttrBuilder(dimensions, pathLength)
|
|
4665
|
+
});
|
|
4666
|
+
};
|
|
4667
|
+
|
|
4668
|
+
var viewport = /*#__PURE__*/createStyler({
|
|
4669
|
+
useCache: false,
|
|
4670
|
+
onRead: function (key) {
|
|
4671
|
+
return key === 'scrollTop' ? window.pageYOffset : window.pageXOffset;
|
|
4672
|
+
},
|
|
4673
|
+
onRender: function (_a) {
|
|
4674
|
+
var _b = _a.scrollTop,
|
|
4675
|
+
scrollTop = _b === void 0 ? 0 : _b,
|
|
4676
|
+
_c = _a.scrollLeft,
|
|
4677
|
+
scrollLeft = _c === void 0 ? 0 : _c;
|
|
4678
|
+
return window.scrollTo(scrollLeft, scrollTop);
|
|
4679
|
+
}
|
|
4680
|
+
});
|
|
4681
|
+
|
|
4682
|
+
var cache = /*#__PURE__*/new WeakMap();
|
|
4683
|
+
var isHTMLElement$1 = function (node) {
|
|
4684
|
+
return node instanceof HTMLElement || typeof node.click === 'function';
|
|
4685
|
+
};
|
|
4686
|
+
var isSVGElement = function (node) {
|
|
4687
|
+
return node instanceof SVGElement || 'ownerSVGElement' in node;
|
|
4688
|
+
};
|
|
4689
|
+
var createDOMStyler = function (node, props) {
|
|
4690
|
+
var styler;
|
|
4691
|
+
if (node === window) {
|
|
4692
|
+
styler = viewport(node);
|
|
4693
|
+
} else if (isHTMLElement$1(node)) {
|
|
4694
|
+
styler = createCssStyler(node, props);
|
|
4695
|
+
} else if (isSVGElement(node)) {
|
|
4696
|
+
styler = svg(node);
|
|
4697
|
+
}
|
|
4698
|
+
cache.set(node, styler);
|
|
4699
|
+
return styler;
|
|
4700
|
+
};
|
|
4701
|
+
var getStyler = function (node, props) {
|
|
4702
|
+
return cache.has(node) ? cache.get(node) : createDOMStyler(node, props);
|
|
4703
|
+
};
|
|
4704
|
+
function index(nodeOrSelector, props) {
|
|
4705
|
+
var node = typeof nodeOrSelector === 'string' ? document.querySelector(nodeOrSelector) : nodeOrSelector;
|
|
4706
|
+
return getStyler(node, props);
|
|
4707
|
+
}
|
|
4708
|
+
|
|
4709
|
+
const useCollapse = (node, { duration } = { duration: 200 }) => {
|
|
4710
|
+
const nodeStyler = index(node);
|
|
4711
|
+
/**
|
|
4712
|
+
* Will set the overflow to hidden, and animate the max height to 0. Make sure
|
|
4713
|
+
* the element has no border or y padding set, otherwise the animation will
|
|
4714
|
+
* not work as expected.
|
|
4715
|
+
*/
|
|
4716
|
+
function collapse() {
|
|
4717
|
+
return new Promise(resolve => {
|
|
4718
|
+
const height = node.getBoundingClientRect().height;
|
|
4719
|
+
nodeStyler.set({ overflow: 'hidden' });
|
|
4720
|
+
animate({
|
|
4721
|
+
from: height,
|
|
4722
|
+
to: 0,
|
|
4723
|
+
duration,
|
|
4724
|
+
onUpdate: value => {
|
|
4725
|
+
nodeStyler.set({
|
|
4726
|
+
maxHeight: value,
|
|
4727
|
+
});
|
|
4728
|
+
},
|
|
4729
|
+
onComplete: () => {
|
|
4730
|
+
resolve();
|
|
4731
|
+
},
|
|
4732
|
+
});
|
|
4733
|
+
});
|
|
4734
|
+
}
|
|
4735
|
+
/**
|
|
4736
|
+
* Apply the collapsed styles without animating, useful when initial state
|
|
4737
|
+
* is collapsed.
|
|
4738
|
+
*/
|
|
4739
|
+
function setCollapsed() {
|
|
4740
|
+
node.style.maxHeight = '0';
|
|
4741
|
+
node.style.overflow = 'hidden';
|
|
4742
|
+
}
|
|
4743
|
+
/**
|
|
4744
|
+
* Apply the expanded styles without animating, useful when initial state
|
|
4745
|
+
* is expanded.
|
|
4746
|
+
*/
|
|
4747
|
+
function setExpanded() {
|
|
4748
|
+
node.style.maxHeight = '';
|
|
4749
|
+
node.style.overflow = '';
|
|
4750
|
+
}
|
|
4751
|
+
/**
|
|
4752
|
+
* Will set the overflow to hidden, and animate the max height to the value
|
|
4753
|
+
* of the scrollHeight. Make sure the element has no border or y padding set,
|
|
4754
|
+
* otherwise the animation will not work as expected. Once complete, the
|
|
4755
|
+
* max-height and overflow style properties will be removed.
|
|
4756
|
+
*/
|
|
4757
|
+
function expand() {
|
|
4758
|
+
return new Promise(resolve => {
|
|
4759
|
+
const scrollHeight = node.scrollHeight;
|
|
4760
|
+
nodeStyler.set({
|
|
4761
|
+
overflow: 'hidden',
|
|
4762
|
+
});
|
|
4763
|
+
animate({
|
|
4764
|
+
from: 0,
|
|
4765
|
+
to: scrollHeight,
|
|
4766
|
+
duration,
|
|
4767
|
+
onUpdate: value => {
|
|
4768
|
+
nodeStyler.set({
|
|
4769
|
+
maxHeight: value,
|
|
4770
|
+
});
|
|
4771
|
+
},
|
|
4772
|
+
onComplete: () => {
|
|
4773
|
+
node.style.removeProperty('max-height');
|
|
4774
|
+
node.style.removeProperty('overflow');
|
|
4775
|
+
resolve();
|
|
4776
|
+
},
|
|
4777
|
+
});
|
|
4778
|
+
});
|
|
4779
|
+
}
|
|
4780
|
+
return {
|
|
4781
|
+
collapse,
|
|
4782
|
+
expand,
|
|
4783
|
+
setCollapsed,
|
|
4784
|
+
setExpanded,
|
|
4785
|
+
};
|
|
4786
|
+
};
|
|
4787
|
+
|
|
4788
|
+
const useFade = (node, { duration } = { duration: 200 }) => {
|
|
4789
|
+
const nodeStyler = index(node);
|
|
4790
|
+
/**
|
|
4791
|
+
* Will animate the opacity to 1, and removes the opacity style attribute once
|
|
4792
|
+
* complete.
|
|
4793
|
+
*/
|
|
4794
|
+
function fadeIn() {
|
|
4795
|
+
return new Promise(resolve => {
|
|
4796
|
+
animate({
|
|
4797
|
+
from: { opacity: 0 },
|
|
4798
|
+
to: { opacity: 1 },
|
|
4799
|
+
duration,
|
|
4800
|
+
onUpdate(latest) {
|
|
4801
|
+
nodeStyler.set({ opacity: latest.opacity });
|
|
4802
|
+
},
|
|
4803
|
+
onComplete() {
|
|
4804
|
+
resolve();
|
|
4805
|
+
node.style.removeProperty('opacity');
|
|
4806
|
+
},
|
|
4807
|
+
});
|
|
4808
|
+
});
|
|
4809
|
+
}
|
|
4810
|
+
/**
|
|
4811
|
+
* Applies the fadeOut styles without animating, useful when initial state
|
|
4812
|
+
* is hidden.
|
|
4813
|
+
*/
|
|
4814
|
+
function setFadeOut() {
|
|
4815
|
+
node.style.opacity = '0';
|
|
4683
4816
|
}
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4817
|
+
/**
|
|
4818
|
+
* Applies the fadeIn styles without animating, useful when initial state
|
|
4819
|
+
* is visible.
|
|
4820
|
+
*/
|
|
4821
|
+
function setFadeIn() {
|
|
4822
|
+
node.style.opacity = '1';
|
|
4689
4823
|
}
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4824
|
+
/**
|
|
4825
|
+
* Will animate the opacity to 0, once complete, the opacity style attribute
|
|
4826
|
+
* will stay on the element.
|
|
4827
|
+
*/
|
|
4828
|
+
function fadeOut() {
|
|
4829
|
+
return new Promise(resolve => {
|
|
4830
|
+
animate({
|
|
4831
|
+
from: { opacity: 1 },
|
|
4832
|
+
to: { opacity: 0 },
|
|
4833
|
+
duration,
|
|
4834
|
+
onUpdate(latest) {
|
|
4835
|
+
nodeStyler.set({ opacity: latest.opacity });
|
|
4836
|
+
},
|
|
4837
|
+
onComplete() {
|
|
4838
|
+
resolve();
|
|
4839
|
+
},
|
|
4840
|
+
});
|
|
4841
|
+
});
|
|
4695
4842
|
}
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4843
|
+
return {
|
|
4844
|
+
fadeIn,
|
|
4845
|
+
fadeOut,
|
|
4846
|
+
setFadeOut,
|
|
4847
|
+
setFadeIn,
|
|
4700
4848
|
};
|
|
4701
|
-
}
|
|
4702
|
-
|
|
4703
|
-
var getDimensions$1 = function (element) {
|
|
4704
|
-
return typeof element.getBBox === 'function' ? element.getBBox() : element.getBoundingClientRect();
|
|
4705
|
-
};
|
|
4706
|
-
var getSVGElementDimensions = function (element) {
|
|
4707
|
-
try {
|
|
4708
|
-
return getDimensions$1(element);
|
|
4709
|
-
} catch (e) {
|
|
4710
|
-
return { x: 0, y: 0, width: 0, height: 0 };
|
|
4711
|
-
}
|
|
4712
4849
|
};
|
|
4713
4850
|
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4851
|
+
const useGrow = (node, { duration = 200, amount = 0.8, hasFade = true } = {}) => {
|
|
4852
|
+
const nodeStyler = index(node);
|
|
4853
|
+
/**
|
|
4854
|
+
* Will animate the scale and optionally the opacity to make the element grow and fade in,
|
|
4855
|
+
* and removes the scale and opacity style attributes once complete.
|
|
4856
|
+
*/
|
|
4857
|
+
function growIn() {
|
|
4858
|
+
return new Promise(resolve => {
|
|
4859
|
+
animate({
|
|
4860
|
+
from: { opacity: hasFade ? 0 : 1, scale: amount },
|
|
4861
|
+
to: { opacity: 1, scale: 1 },
|
|
4862
|
+
duration,
|
|
4863
|
+
onUpdate(latest) {
|
|
4864
|
+
const updates = {
|
|
4865
|
+
scale: latest.scale,
|
|
4866
|
+
};
|
|
4867
|
+
if (hasFade) {
|
|
4868
|
+
updates['opacity'] = latest.opacity;
|
|
4869
|
+
}
|
|
4870
|
+
nodeStyler.set(updates);
|
|
4871
|
+
},
|
|
4872
|
+
onComplete() {
|
|
4873
|
+
resolve();
|
|
4874
|
+
if (hasFade) {
|
|
4875
|
+
node.style.removeProperty('opacity');
|
|
4876
|
+
}
|
|
4877
|
+
node.style.removeProperty('transform');
|
|
4878
|
+
},
|
|
4879
|
+
});
|
|
4880
|
+
});
|
|
4881
|
+
}
|
|
4882
|
+
/**
|
|
4883
|
+
* Applies the growOut styles without animating, useful when the initial
|
|
4884
|
+
* state is hidden.
|
|
4885
|
+
*/
|
|
4886
|
+
function setGrowOut() {
|
|
4887
|
+
node.style.transform = `scale(${amount})`;
|
|
4888
|
+
if (hasFade) {
|
|
4889
|
+
node.style.opacity = '0';
|
|
4726
4890
|
}
|
|
4727
|
-
}
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
element.setAttribute(key, attrs[key]);
|
|
4737
|
-
}
|
|
4891
|
+
}
|
|
4892
|
+
/**
|
|
4893
|
+
* Applies the growIn styles without animating, useful when the initial
|
|
4894
|
+
* state is visible.
|
|
4895
|
+
*/
|
|
4896
|
+
function setGrowIn() {
|
|
4897
|
+
node.style.transform = `scale(1)`;
|
|
4898
|
+
if (hasFade) {
|
|
4899
|
+
node.style.opacity = '1';
|
|
4738
4900
|
}
|
|
4739
4901
|
}
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4902
|
+
/**
|
|
4903
|
+
* Will animate the scale and optionally the opacity to make the element shrink and fade out,
|
|
4904
|
+
* leaving the scale and opacity styles on the element.
|
|
4905
|
+
*/
|
|
4906
|
+
function growOut() {
|
|
4907
|
+
return new Promise(resolve => {
|
|
4908
|
+
animate({
|
|
4909
|
+
from: { opacity: 1, scale: 1 },
|
|
4910
|
+
to: { opacity: hasFade ? 0 : 1, scale: amount },
|
|
4911
|
+
duration,
|
|
4912
|
+
onUpdate(latest) {
|
|
4913
|
+
const updates = {
|
|
4914
|
+
scale: latest.scale,
|
|
4915
|
+
};
|
|
4916
|
+
if (hasFade) {
|
|
4917
|
+
updates['opacity'] = latest.opacity;
|
|
4918
|
+
}
|
|
4919
|
+
nodeStyler.set(updates);
|
|
4920
|
+
},
|
|
4921
|
+
onComplete() {
|
|
4922
|
+
resolve();
|
|
4923
|
+
},
|
|
4924
|
+
});
|
|
4925
|
+
});
|
|
4926
|
+
}
|
|
4927
|
+
return {
|
|
4928
|
+
growIn,
|
|
4929
|
+
growOut,
|
|
4930
|
+
setGrowOut,
|
|
4931
|
+
setGrowIn,
|
|
4932
|
+
};
|
|
4748
4933
|
};
|
|
4749
4934
|
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4935
|
+
/**
|
|
4936
|
+
* Will execute a series of animation promises in sequence.
|
|
4937
|
+
* This is useful for chaining animations where each step depends on the
|
|
4938
|
+
* previous one completing before starting the next.
|
|
4939
|
+
*
|
|
4940
|
+
* @param {Array<() => Promise<void>>} animations - The array of animation functions.
|
|
4941
|
+
* @returns {Object} - An object with a `start` method to begin the timeline.
|
|
4942
|
+
*
|
|
4943
|
+
* @example
|
|
4944
|
+
* const { fadeOut } = useFade(this.ref);
|
|
4945
|
+
* const { collapse } = useCollapse(this.ref);
|
|
4946
|
+
*
|
|
4947
|
+
* timeline(fadeOut, collapse).start();
|
|
4948
|
+
*/
|
|
4949
|
+
const timeline = (...animations) => ({
|
|
4950
|
+
start: () => {
|
|
4951
|
+
return animations.reduce((promise, animation) => promise.then(() => animation()), Promise.resolve());
|
|
4754
4952
|
},
|
|
4755
|
-
onRender: function (_a) {
|
|
4756
|
-
var _b = _a.scrollTop,
|
|
4757
|
-
scrollTop = _b === void 0 ? 0 : _b,
|
|
4758
|
-
_c = _a.scrollLeft,
|
|
4759
|
-
scrollLeft = _c === void 0 ? 0 : _c;
|
|
4760
|
-
return window.scrollTo(scrollLeft, scrollTop);
|
|
4761
|
-
}
|
|
4762
4953
|
});
|
|
4763
4954
|
|
|
4764
|
-
|
|
4765
|
-
var
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4955
|
+
const nvAccordionItemCss = "nv-accordion-item{display:block;border-bottom:var(--spacing-px) solid var(--color-content-low-border)}nv-accordion-item:last-child{border-bottom:none}nv-accordion-item .nv-accordion-item__header{cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding:var(--spacing-4)}nv-accordion-item .nv-accordion-item__header .nv-accordion-item__chevron{margin-left:var(--spacing-2);flex-shrink:0}nv-accordion-item .nv-accordion-item__header .nv-accordion-item__header-content{display:flex;flex-direction:column;gap:var(--spacing-0-5);flex:1;min-width:0}nv-accordion-item .nv-accordion-item__header .nv-accordion-item__title{color:var(--color-content-high-text);font-size:var(--font-size-lg);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--line-height-lg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nv-accordion-item .nv-accordion-item__header .nv-accordion-item__subtitle{color:var(--color-content-low-text);font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--line-height-base);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nv-accordion-item .nv-accordion-item__content{background:var(--color-level-10-background)}nv-accordion-item .nv-accordion-item__content .nv-accordion-item__content-inner{padding:var(--spacing-4);color:var(--color-content-low-text);font-size:var(--font-size-md);font-style:normal;font-weight:500;line-height:var(--line-height-base);}nv-accordion-item.is-disabled{opacity:var(--opacity-disabled);pointer-events:none}nv-accordion-item.is-open .nv-accordion-item__header{border-bottom:var(--spacing-px) solid var(--color-content-low-border)}";
|
|
4956
|
+
var NvAccordionItemStyle0 = nvAccordionItemCss;
|
|
4957
|
+
|
|
4958
|
+
/**
|
|
4959
|
+
* Accordion item element for nv-accordion.
|
|
4960
|
+
*
|
|
4961
|
+
* @slot header - Custom header (replaces itemTitle/subtitle)
|
|
4962
|
+
* @slot content - Main content (expandable area)
|
|
4963
|
+
*/
|
|
4964
|
+
class NvAccordionItem {
|
|
4965
|
+
constructor(hostRef) {
|
|
4966
|
+
registerInstance(this, hostRef);
|
|
4967
|
+
this.itemToggle = createEvent(this, "itemToggle", 7);
|
|
4968
|
+
/** Open or closed */
|
|
4969
|
+
this.open = false;
|
|
4970
|
+
/** Disables the item */
|
|
4971
|
+
this.disabled = false;
|
|
4972
|
+
/** Parent expansion mode (accordion or multi) */
|
|
4973
|
+
this.mode = 'accordion';
|
|
4974
|
+
//#endregion EVENTS
|
|
4975
|
+
/****************************************************************************/
|
|
4976
|
+
//#region STATE
|
|
4977
|
+
/** Internal state for open/close rendering */
|
|
4978
|
+
this.currentOpenState = false;
|
|
4979
|
+
/**
|
|
4980
|
+
* Controls if the panel has been initialized for animations
|
|
4981
|
+
*/
|
|
4982
|
+
this.isInitialized = false;
|
|
4983
|
+
/**
|
|
4984
|
+
* Animation in progress
|
|
4985
|
+
*/
|
|
4986
|
+
this.isAnimating = false;
|
|
4987
|
+
/**
|
|
4988
|
+
* Handler for header click
|
|
4989
|
+
*/
|
|
4990
|
+
this.handleHeaderClick = () => {
|
|
4991
|
+
this.toggle();
|
|
4992
|
+
};
|
|
4993
|
+
/**
|
|
4994
|
+
* Handler for iconbutton click
|
|
4995
|
+
* @param {Event} e - Click event
|
|
4996
|
+
*/
|
|
4997
|
+
this.handleIconClick = (e) => {
|
|
4998
|
+
e.stopPropagation(); // Prevent header click from triggering
|
|
4999
|
+
this.toggle();
|
|
5000
|
+
};
|
|
5001
|
+
/**
|
|
5002
|
+
* Handler for keyboard events on iconbutton
|
|
5003
|
+
* @param {KeyboardEvent} e - Keyboard event
|
|
5004
|
+
*/
|
|
5005
|
+
this.handleHeaderKeyDown = (e) => {
|
|
5006
|
+
if (this.disabled)
|
|
5007
|
+
return;
|
|
5008
|
+
switch (e.key) {
|
|
5009
|
+
case 'Enter':
|
|
5010
|
+
case ' ':
|
|
5011
|
+
e.preventDefault();
|
|
5012
|
+
this.toggle();
|
|
5013
|
+
break;
|
|
5014
|
+
case 'ArrowDown':
|
|
5015
|
+
e.preventDefault();
|
|
5016
|
+
if (!this.open) {
|
|
5017
|
+
this.open = true;
|
|
5018
|
+
this.itemToggle.emit(this.open);
|
|
5019
|
+
this.updateVisibility(this.open);
|
|
5020
|
+
}
|
|
5021
|
+
break;
|
|
5022
|
+
case 'ArrowUp':
|
|
5023
|
+
e.preventDefault();
|
|
5024
|
+
if (this.open) {
|
|
5025
|
+
this.open = false;
|
|
5026
|
+
this.itemToggle.emit(this.open);
|
|
5027
|
+
this.updateVisibility(this.open);
|
|
5028
|
+
}
|
|
5029
|
+
break;
|
|
5030
|
+
}
|
|
5031
|
+
};
|
|
4779
5032
|
}
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
5033
|
+
//#endregion STATE
|
|
5034
|
+
/****************************************************************************/
|
|
5035
|
+
//#region WATCHERS
|
|
5036
|
+
async onOpenChanged(newValue, oldValue) {
|
|
5037
|
+
this.currentOpenState = newValue; // Synchronize internal state
|
|
5038
|
+
// Skip initial render
|
|
5039
|
+
if (oldValue === undefined) {
|
|
5040
|
+
return;
|
|
5041
|
+
}
|
|
5042
|
+
await this.updateVisibility(newValue);
|
|
5043
|
+
}
|
|
5044
|
+
//#endregion WATCHERS
|
|
5045
|
+
/****************************************************************************/
|
|
5046
|
+
//#region ANIMATIONS
|
|
4793
5047
|
/**
|
|
4794
|
-
*
|
|
4795
|
-
*
|
|
4796
|
-
* not work as expected.
|
|
5048
|
+
* Updates the visibility state with Nova animation system
|
|
5049
|
+
* @param {boolean} open - Whether the accordion item should be open
|
|
4797
5050
|
*/
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
to: 0,
|
|
4805
|
-
duration,
|
|
4806
|
-
onUpdate: value => {
|
|
4807
|
-
nodeStyler.set({
|
|
4808
|
-
maxHeight: value,
|
|
4809
|
-
});
|
|
4810
|
-
},
|
|
4811
|
-
onComplete: () => {
|
|
4812
|
-
resolve();
|
|
4813
|
-
},
|
|
4814
|
-
});
|
|
5051
|
+
async updateVisibility(open) {
|
|
5052
|
+
if (!this.contentRef)
|
|
5053
|
+
return;
|
|
5054
|
+
this.isAnimating = true;
|
|
5055
|
+
const { collapse, expand } = useCollapse(this.contentRef, {
|
|
5056
|
+
duration: 200,
|
|
4815
5057
|
});
|
|
5058
|
+
if (open) {
|
|
5059
|
+
// Expand with animation
|
|
5060
|
+
await expand();
|
|
5061
|
+
}
|
|
5062
|
+
else {
|
|
5063
|
+
// Collapse with animation
|
|
5064
|
+
await collapse();
|
|
5065
|
+
}
|
|
5066
|
+
this.isAnimating = false;
|
|
4816
5067
|
}
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
5068
|
+
//#endregion ANIMATIONS
|
|
5069
|
+
/****************************************************************************/
|
|
5070
|
+
//#region LIFECYCLE
|
|
5071
|
+
componentWillLoad() {
|
|
5072
|
+
this.currentOpenState = this.open; // Initial synchronization
|
|
5073
|
+
}
|
|
5074
|
+
componentDidLoad() {
|
|
5075
|
+
if (this.contentRef) {
|
|
5076
|
+
const { setExpanded, setCollapsed } = useCollapse(this.contentRef);
|
|
5077
|
+
if (this.open) {
|
|
5078
|
+
// If open by default on initial load, set expanded state without animation
|
|
5079
|
+
setExpanded();
|
|
5080
|
+
}
|
|
5081
|
+
else {
|
|
5082
|
+
// If closed by default, set collapsed state without animation
|
|
5083
|
+
setCollapsed();
|
|
5084
|
+
}
|
|
5085
|
+
}
|
|
5086
|
+
}
|
|
5087
|
+
disconnectedCallback() {
|
|
5088
|
+
if (this.mutationObserver) {
|
|
5089
|
+
this.mutationObserver.disconnect();
|
|
5090
|
+
}
|
|
4824
5091
|
}
|
|
5092
|
+
//#endregion LIFECYCLE
|
|
5093
|
+
/****************************************************************************/
|
|
5094
|
+
//#region METHODS
|
|
4825
5095
|
/**
|
|
4826
|
-
*
|
|
4827
|
-
* is expanded.
|
|
5096
|
+
* Toggle open/close (Public API)
|
|
4828
5097
|
*/
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
5098
|
+
async toggle() {
|
|
5099
|
+
if (!this.disabled && !this.isAnimating) {
|
|
5100
|
+
this.open = !this.open;
|
|
5101
|
+
this.itemToggle.emit(this.open);
|
|
5102
|
+
// Force animation update directly instead of relying on watcher
|
|
5103
|
+
await this.updateVisibility(this.open);
|
|
5104
|
+
}
|
|
4832
5105
|
}
|
|
4833
5106
|
/**
|
|
4834
|
-
*
|
|
4835
|
-
*
|
|
4836
|
-
* otherwise the animation will not work as expected. Once complete, the
|
|
4837
|
-
* max-height and overflow style properties will be removed.
|
|
5107
|
+
* Get the chevron icon name based on open state
|
|
5108
|
+
* @returns {string} The icon name to display in the chevron button
|
|
4838
5109
|
*/
|
|
4839
|
-
|
|
4840
|
-
return
|
|
4841
|
-
const scrollHeight = node.scrollHeight;
|
|
4842
|
-
nodeStyler.set({
|
|
4843
|
-
overflow: 'hidden',
|
|
4844
|
-
});
|
|
4845
|
-
animate({
|
|
4846
|
-
from: 0,
|
|
4847
|
-
to: scrollHeight,
|
|
4848
|
-
duration,
|
|
4849
|
-
onUpdate: value => {
|
|
4850
|
-
nodeStyler.set({
|
|
4851
|
-
maxHeight: value,
|
|
4852
|
-
});
|
|
4853
|
-
},
|
|
4854
|
-
onComplete: () => {
|
|
4855
|
-
node.style.removeProperty('max-height');
|
|
4856
|
-
node.style.removeProperty('overflow');
|
|
4857
|
-
resolve();
|
|
4858
|
-
},
|
|
4859
|
-
});
|
|
4860
|
-
});
|
|
5110
|
+
get chevronIconName() {
|
|
5111
|
+
return this.open ? 'chevron-top' : 'chevron-down';
|
|
4861
5112
|
}
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
5113
|
+
//#endregion METHODS
|
|
5114
|
+
/****************************************************************************/
|
|
5115
|
+
//#region RENDER
|
|
5116
|
+
render() {
|
|
5117
|
+
return (hAsync(Host, { key: 'dfb8ca76f8ac40c938323be1ccba4353ea33a616', class: {
|
|
5118
|
+
'nv-accordion-item': true,
|
|
5119
|
+
'is-open': this.open,
|
|
5120
|
+
'is-disabled': this.disabled,
|
|
5121
|
+
'is-animating': this.isAnimating,
|
|
5122
|
+
}, role: "listitem", "aria-expanded": this.open ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, hAsync("div", { key: '258efe0502a39d963a9e75c16285ee9cbc65cb9f', class: "nv-accordion-item__header", onClick: this.handleHeaderClick, "aria-controls": "content" }, hAsync("slot", { key: 'bb4dae743f06e3d41d1f7b8c17793b668df9347b', name: "header" }, hAsync("div", { key: 'f3142a81c6be776d95ab9292101b889db6e35805', class: "nv-accordion-item__header-content" }, this.itemTitle && (hAsync("span", { key: 'e897d8b4d414ba4e93b2853c152059579063335e', class: "nv-accordion-item__title" }, this.itemTitle)), this.subtitle && (hAsync("span", { key: 'b8e03ceb1ca0e4c0b0fe24398f0e1c592ac077ab', class: "nv-accordion-item__subtitle" }, this.subtitle)))), hAsync("nv-iconbutton", { key: '8d90711a96f5ce2e7d6f5ebcf3922cd0fedd69bd', emphasis: "low", size: "sm", shape: "square", name: this.chevronIconName, tabindex: this.disabled ? -1 : 0, onClick: this.handleIconClick, onKeyDown: this.handleHeaderKeyDown, "aria-expanded": this.open ? 'true' : 'false', "aria-controls": "content", "aria-label": this.open ? 'Fermer la section' : 'Ouvrir la section' })), hAsync("div", { key: '171b5165f3663fa5f0fa28ef84145dfc998e9f10', id: "content", class: "nv-accordion-item__content", "aria-hidden": !this.open ? 'true' : 'false', ref: el => (this.contentRef = el) }, hAsync("div", { key: 'dcf753f23cec073a036d8137f1299dcf4ca4af78', class: "nv-accordion-item__content-inner" }, hAsync("slot", { key: '3dc85def21aace19f3d211262b6cf66ccb9438fa', name: "content" })))));
|
|
5123
|
+
}
|
|
5124
|
+
get el() { return getElement(this); }
|
|
5125
|
+
static get watchers() { return {
|
|
5126
|
+
"open": ["onOpenChanged"]
|
|
5127
|
+
}; }
|
|
5128
|
+
static get style() { return NvAccordionItemStyle0; }
|
|
5129
|
+
static get cmpMeta() { return {
|
|
5130
|
+
"$flags$": 4,
|
|
5131
|
+
"$tagName$": "nv-accordion-item",
|
|
5132
|
+
"$members$": {
|
|
5133
|
+
"itemTitle": [513, "item-title"],
|
|
5134
|
+
"subtitle": [513],
|
|
5135
|
+
"open": [1540],
|
|
5136
|
+
"disabled": [516],
|
|
5137
|
+
"maxContentHeight": [514, "max-content-height"],
|
|
5138
|
+
"mode": [513],
|
|
5139
|
+
"currentOpenState": [32],
|
|
5140
|
+
"isInitialized": [32],
|
|
5141
|
+
"isAnimating": [32],
|
|
5142
|
+
"toggle": [64]
|
|
5143
|
+
},
|
|
5144
|
+
"$listeners$": undefined,
|
|
5145
|
+
"$lazyBundleId$": "-",
|
|
5146
|
+
"$attrsToReflect$": [["itemTitle", "item-title"], ["subtitle", "subtitle"], ["open", "open"], ["disabled", "disabled"], ["maxContentHeight", "max-content-height"], ["mode", "mode"]]
|
|
5147
|
+
}; }
|
|
5148
|
+
}
|
|
5149
|
+
|
|
5150
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
5151
|
+
|
|
5152
|
+
var FeedbackColors;
|
|
5153
|
+
(function (FeedbackColors) {
|
|
5154
|
+
FeedbackColors["Information"] = "information";
|
|
5155
|
+
FeedbackColors["Warning"] = "warning";
|
|
5156
|
+
FeedbackColors["Success"] = "success";
|
|
5157
|
+
FeedbackColors["Error"] = "error";
|
|
5158
|
+
FeedbackColors["Neutral"] = "neutral";
|
|
5159
|
+
})(FeedbackColors || (FeedbackColors = {}));
|
|
5160
|
+
var DeprecatedSemanticColors;
|
|
5161
|
+
(function (DeprecatedSemanticColors) {
|
|
5162
|
+
DeprecatedSemanticColors["Neutral"] = "neutral";
|
|
5163
|
+
DeprecatedSemanticColors["Primary"] = "primary";
|
|
5164
|
+
DeprecatedSemanticColors["Secondary"] = "secondary";
|
|
5165
|
+
DeprecatedSemanticColors["Success"] = "success";
|
|
5166
|
+
DeprecatedSemanticColors["Error"] = "error";
|
|
5167
|
+
})(DeprecatedSemanticColors || (DeprecatedSemanticColors = {}));
|
|
5168
|
+
var SemanticSizes;
|
|
5169
|
+
(function (SemanticSizes) {
|
|
5170
|
+
SemanticSizes["ExtraSmall"] = "xs";
|
|
5171
|
+
SemanticSizes["Small"] = "sm";
|
|
5172
|
+
SemanticSizes["Medium"] = "md";
|
|
5173
|
+
SemanticSizes["Large"] = "lg";
|
|
5174
|
+
SemanticSizes["ExtraLarge"] = "xl";
|
|
5175
|
+
})(SemanticSizes || (SemanticSizes = {}));
|
|
5176
|
+
var ButtonSize;
|
|
5177
|
+
(function (ButtonSize) {
|
|
5178
|
+
ButtonSize["ExtraSmall"] = "xs";
|
|
5179
|
+
ButtonSize["Small"] = "sm";
|
|
5180
|
+
ButtonSize["Medium"] = "md";
|
|
5181
|
+
ButtonSize["Large"] = "lg";
|
|
5182
|
+
})(ButtonSize || (ButtonSize = {}));
|
|
5183
|
+
var ButtonEmphasis;
|
|
5184
|
+
(function (ButtonEmphasis) {
|
|
5185
|
+
ButtonEmphasis["High"] = "high";
|
|
5186
|
+
ButtonEmphasis["Medium"] = "medium";
|
|
5187
|
+
ButtonEmphasis["Low"] = "low";
|
|
5188
|
+
ButtonEmphasis["Lower"] = "lower";
|
|
5189
|
+
})(ButtonEmphasis || (ButtonEmphasis = {}));
|
|
5190
|
+
var ButtonType;
|
|
5191
|
+
(function (ButtonType) {
|
|
5192
|
+
ButtonType["Submit"] = "submit";
|
|
5193
|
+
ButtonType["Reset"] = "reset";
|
|
5194
|
+
ButtonType["Button"] = "button";
|
|
5195
|
+
})(ButtonType || (ButtonType = {}));
|
|
5196
|
+
var IconButtonShape;
|
|
5197
|
+
(function (IconButtonShape) {
|
|
5198
|
+
IconButtonShape["Square"] = "square";
|
|
5199
|
+
IconButtonShape["Rounded"] = "rounded";
|
|
5200
|
+
})(IconButtonShape || (IconButtonShape = {}));
|
|
5201
|
+
var LoaderColors;
|
|
5202
|
+
(function (LoaderColors) {
|
|
5203
|
+
LoaderColors["High"] = "brand";
|
|
5204
|
+
LoaderColors["Low"] = "white";
|
|
5205
|
+
})(LoaderColors || (LoaderColors = {}));
|
|
5206
|
+
var LabelPlacement;
|
|
5207
|
+
(function (LabelPlacement) {
|
|
5208
|
+
LabelPlacement["Before"] = "before";
|
|
5209
|
+
LabelPlacement["After"] = "after";
|
|
5210
|
+
})(LabelPlacement || (LabelPlacement = {}));
|
|
5211
|
+
var TextInputAutocomplete;
|
|
5212
|
+
(function (TextInputAutocomplete) {
|
|
5213
|
+
TextInputAutocomplete["On"] = "on";
|
|
5214
|
+
TextInputAutocomplete["Off"] = "off";
|
|
5215
|
+
TextInputAutocomplete["Section"] = "section-*";
|
|
5216
|
+
TextInputAutocomplete["Shipping"] = "shipping";
|
|
5217
|
+
TextInputAutocomplete["Billing"] = "billing";
|
|
5218
|
+
TextInputAutocomplete["Home"] = "home";
|
|
5219
|
+
TextInputAutocomplete["Work"] = "work";
|
|
5220
|
+
TextInputAutocomplete["Mobile"] = "mobile";
|
|
5221
|
+
TextInputAutocomplete["Fax"] = "fax";
|
|
5222
|
+
TextInputAutocomplete["Pager"] = "pager";
|
|
5223
|
+
TextInputAutocomplete["Tel"] = "tel";
|
|
5224
|
+
TextInputAutocomplete["TelCountryCode"] = "tel-country-code";
|
|
5225
|
+
TextInputAutocomplete["TelNational"] = "tel-national";
|
|
5226
|
+
TextInputAutocomplete["TelAreaCode"] = "tel-area-code";
|
|
5227
|
+
TextInputAutocomplete["TelLocal"] = "tel-local";
|
|
5228
|
+
TextInputAutocomplete["TelLocalPrefix"] = "tel-local-prefix";
|
|
5229
|
+
TextInputAutocomplete["TelLocalSuffix"] = "tel-local-suffix";
|
|
5230
|
+
TextInputAutocomplete["TelExtension"] = "tel-extension";
|
|
5231
|
+
TextInputAutocomplete["Email"] = "email";
|
|
5232
|
+
TextInputAutocomplete["IMProtocol"] = "impp";
|
|
5233
|
+
TextInputAutocomplete["Name"] = "name";
|
|
5234
|
+
TextInputAutocomplete["HonorificPrefix"] = "honorific-prefix";
|
|
5235
|
+
TextInputAutocomplete["GivenName"] = "given-name";
|
|
5236
|
+
TextInputAutocomplete["AdditionalName"] = "additional-name";
|
|
5237
|
+
TextInputAutocomplete["FamilyName"] = "family-name";
|
|
5238
|
+
TextInputAutocomplete["HonorificSuffix"] = "honorific-suffix";
|
|
5239
|
+
TextInputAutocomplete["Nickname"] = "nickname";
|
|
5240
|
+
TextInputAutocomplete["Username"] = "username";
|
|
5241
|
+
TextInputAutocomplete["NewPassword"] = "new-password";
|
|
5242
|
+
TextInputAutocomplete["CurrentPassword"] = "current-password";
|
|
5243
|
+
TextInputAutocomplete["OneTimeCode"] = "one-time-code";
|
|
5244
|
+
TextInputAutocomplete["OrganizationTitle"] = "organization-title";
|
|
5245
|
+
TextInputAutocomplete["Organization"] = "organization";
|
|
5246
|
+
TextInputAutocomplete["StreetAddress"] = "street-address";
|
|
5247
|
+
TextInputAutocomplete["AddressLine1"] = "address-line1";
|
|
5248
|
+
TextInputAutocomplete["AddressLine2"] = "address-line2";
|
|
5249
|
+
TextInputAutocomplete["AddressLine3"] = "address-line3";
|
|
5250
|
+
TextInputAutocomplete["AddressLevel4"] = "address-level4";
|
|
5251
|
+
TextInputAutocomplete["AddressLevel3"] = "address-level3";
|
|
5252
|
+
TextInputAutocomplete["AddressLevel2"] = "address-level2";
|
|
5253
|
+
TextInputAutocomplete["AddressLevel1"] = "address-level1";
|
|
5254
|
+
TextInputAutocomplete["Country"] = "country";
|
|
5255
|
+
TextInputAutocomplete["CountryName"] = "country-name";
|
|
5256
|
+
TextInputAutocomplete["PostalCode"] = "postal-code";
|
|
5257
|
+
TextInputAutocomplete["CCName"] = "cc-name";
|
|
5258
|
+
TextInputAutocomplete["CCGivenName"] = "cc-given-name";
|
|
5259
|
+
TextInputAutocomplete["CCAdditionalName"] = "cc-additional-name";
|
|
5260
|
+
TextInputAutocomplete["CCFamilyName"] = "cc-family-name";
|
|
5261
|
+
TextInputAutocomplete["CCNumber"] = "cc-number";
|
|
5262
|
+
TextInputAutocomplete["CCExp"] = "cc-exp";
|
|
5263
|
+
TextInputAutocomplete["CCExpMonth"] = "cc-exp-month";
|
|
5264
|
+
TextInputAutocomplete["CCExpYear"] = "cc-exp-year";
|
|
5265
|
+
TextInputAutocomplete["CCCSC"] = "cc-csc";
|
|
5266
|
+
TextInputAutocomplete["CCType"] = "cc-type";
|
|
5267
|
+
TextInputAutocomplete["TransactionCurrency"] = "transaction-currency";
|
|
5268
|
+
TextInputAutocomplete["TransactionAmount"] = "transaction-amount";
|
|
5269
|
+
TextInputAutocomplete["Language"] = "language";
|
|
5270
|
+
TextInputAutocomplete["Bday"] = "bday";
|
|
5271
|
+
TextInputAutocomplete["BdayDay"] = "bday-day";
|
|
5272
|
+
TextInputAutocomplete["BdayMonth"] = "bday-month";
|
|
5273
|
+
TextInputAutocomplete["BdayYear"] = "bday-year";
|
|
5274
|
+
TextInputAutocomplete["Sex"] = "sex";
|
|
5275
|
+
TextInputAutocomplete["Url"] = "url";
|
|
5276
|
+
TextInputAutocomplete["Photo"] = "photo";
|
|
5277
|
+
})(TextInputAutocomplete || (TextInputAutocomplete = {}));
|
|
5278
|
+
var TimeType;
|
|
5279
|
+
(function (TimeType) {
|
|
5280
|
+
TimeType["Hours"] = "hours";
|
|
5281
|
+
TimeType["Minutes"] = "minutes";
|
|
5282
|
+
TimeType["Seconds"] = "seconds";
|
|
5283
|
+
})(TimeType || (TimeType = {}));
|
|
5284
|
+
var GlobalFilterPosition;
|
|
5285
|
+
(function (GlobalFilterPosition) {
|
|
5286
|
+
GlobalFilterPosition["End"] = "end";
|
|
5287
|
+
GlobalFilterPosition["Start"] = "start";
|
|
5288
|
+
GlobalFilterPosition["Center"] = "center";
|
|
5289
|
+
})(GlobalFilterPosition || (GlobalFilterPosition = {}));
|
|
5290
|
+
var SortingPossibility;
|
|
5291
|
+
(function (SortingPossibility) {
|
|
5292
|
+
SortingPossibility["Asc"] = "asc";
|
|
5293
|
+
SortingPossibility["Desc"] = "desc";
|
|
5294
|
+
})(SortingPossibility || (SortingPossibility = {}));
|
|
5295
|
+
const WEEK_ABBREVIATIONS = {
|
|
5296
|
+
'fr-FR': 'Sem', // Semaine
|
|
5297
|
+
'fr-BE': 'Sem', // Semaine
|
|
5298
|
+
'nl-BE': 'W', // Week
|
|
5299
|
+
'en-BE': 'W', // Week
|
|
5300
|
+
'en-US': 'W', // Week
|
|
5301
|
+
'en-GB': 'W', // Week
|
|
5302
|
+
'es-ES': 'Sem', // Semana
|
|
5303
|
+
'de-DE': 'KW', // Kalenderwoche
|
|
5304
|
+
'it-IT': 'Set', // Settimana
|
|
5305
|
+
'pt-PT': 'Sem', // Semana
|
|
5306
|
+
'nl-NL': 'W', // Week
|
|
5307
|
+
'pl-PL': 'Tyd', // Tydzień
|
|
5308
|
+
'ru-RU': 'Нед', // Неделя
|
|
5309
|
+
'ja-JP': '週', // Shū
|
|
5310
|
+
'zh-CN': '周', // Zhōu
|
|
5311
|
+
'ko-KR': '주', // Ju
|
|
4868
5312
|
};
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
function fadeIn() {
|
|
4877
|
-
return new Promise(resolve => {
|
|
4878
|
-
animate({
|
|
4879
|
-
from: { opacity: 0 },
|
|
4880
|
-
to: { opacity: 1 },
|
|
4881
|
-
duration,
|
|
4882
|
-
onUpdate(latest) {
|
|
4883
|
-
nodeStyler.set({ opacity: latest.opacity });
|
|
4884
|
-
},
|
|
4885
|
-
onComplete() {
|
|
4886
|
-
resolve();
|
|
4887
|
-
node.style.removeProperty('opacity');
|
|
4888
|
-
},
|
|
4889
|
-
});
|
|
4890
|
-
});
|
|
4891
|
-
}
|
|
4892
|
-
/**
|
|
4893
|
-
* Applies the fadeOut styles without animating, useful when initial state
|
|
4894
|
-
* is hidden.
|
|
4895
|
-
*/
|
|
4896
|
-
function setFadeOut() {
|
|
4897
|
-
node.style.opacity = '0';
|
|
4898
|
-
}
|
|
4899
|
-
/**
|
|
4900
|
-
* Applies the fadeIn styles without animating, useful when initial state
|
|
4901
|
-
* is visible.
|
|
4902
|
-
*/
|
|
4903
|
-
function setFadeIn() {
|
|
4904
|
-
node.style.opacity = '1';
|
|
4905
|
-
}
|
|
4906
|
-
/**
|
|
4907
|
-
* Will animate the opacity to 0, once complete, the opacity style attribute
|
|
4908
|
-
* will stay on the element.
|
|
4909
|
-
*/
|
|
4910
|
-
function fadeOut() {
|
|
4911
|
-
return new Promise(resolve => {
|
|
4912
|
-
animate({
|
|
4913
|
-
from: { opacity: 1 },
|
|
4914
|
-
to: { opacity: 0 },
|
|
4915
|
-
duration,
|
|
4916
|
-
onUpdate(latest) {
|
|
4917
|
-
nodeStyler.set({ opacity: latest.opacity });
|
|
4918
|
-
},
|
|
4919
|
-
onComplete() {
|
|
4920
|
-
resolve();
|
|
4921
|
-
},
|
|
4922
|
-
});
|
|
4923
|
-
});
|
|
4924
|
-
}
|
|
4925
|
-
return {
|
|
4926
|
-
fadeIn,
|
|
4927
|
-
fadeOut,
|
|
4928
|
-
setFadeOut,
|
|
4929
|
-
setFadeIn,
|
|
4930
|
-
};
|
|
5313
|
+
const CUSTOM_DAY_NAMES = {
|
|
5314
|
+
'fr-BE': ['Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa', 'Di'],
|
|
5315
|
+
'nl-BE': ['Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za', 'Zo'],
|
|
5316
|
+
'de-DE': ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'],
|
|
5317
|
+
'en-BE': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
5318
|
+
'en-US': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
5319
|
+
'en-GB': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
4931
5320
|
};
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5321
|
+
const CUSTOM_MONTH_NAMES = {
|
|
5322
|
+
'fr-BE': [
|
|
5323
|
+
'Jan',
|
|
5324
|
+
'Fev',
|
|
5325
|
+
'Mar',
|
|
5326
|
+
'Avr',
|
|
5327
|
+
'Mai',
|
|
5328
|
+
'Jun',
|
|
5329
|
+
'Jul',
|
|
5330
|
+
'Aou',
|
|
5331
|
+
'Sep',
|
|
5332
|
+
'Oct',
|
|
5333
|
+
'Nov',
|
|
5334
|
+
'Dec',
|
|
5335
|
+
],
|
|
5336
|
+
'nl-BE': [
|
|
5337
|
+
'Jan',
|
|
5338
|
+
'Feb',
|
|
5339
|
+
'Maa',
|
|
5340
|
+
'Apr',
|
|
5341
|
+
'Mei',
|
|
5342
|
+
'Jun',
|
|
5343
|
+
'Jul',
|
|
5344
|
+
'Aug',
|
|
5345
|
+
'Sep',
|
|
5346
|
+
'Okt',
|
|
5347
|
+
'Nov',
|
|
5348
|
+
'Dec',
|
|
5349
|
+
],
|
|
5350
|
+
'de-DE': [
|
|
5351
|
+
'Jan',
|
|
5352
|
+
'Feb',
|
|
5353
|
+
'Mär',
|
|
5354
|
+
'Apr',
|
|
5355
|
+
'Mai',
|
|
5356
|
+
'Jun',
|
|
5357
|
+
'Jul',
|
|
5358
|
+
'Aug',
|
|
5359
|
+
'Sep',
|
|
5360
|
+
'Okt',
|
|
5361
|
+
'Nov',
|
|
5362
|
+
'Dez',
|
|
5363
|
+
],
|
|
5364
|
+
'en-BE': [
|
|
5365
|
+
'Jan',
|
|
5366
|
+
'Feb',
|
|
5367
|
+
'Mar',
|
|
5368
|
+
'Apr',
|
|
5369
|
+
'May',
|
|
5370
|
+
'Jun',
|
|
5371
|
+
'Jul',
|
|
5372
|
+
'Aug',
|
|
5373
|
+
'Sep',
|
|
5374
|
+
'Oct',
|
|
5375
|
+
'Nov',
|
|
5376
|
+
'Dec',
|
|
5377
|
+
],
|
|
5378
|
+
'en-US': [
|
|
5379
|
+
'Jan',
|
|
5380
|
+
'Feb',
|
|
5381
|
+
'Mar',
|
|
5382
|
+
'Apr',
|
|
5383
|
+
'May',
|
|
5384
|
+
'Jun',
|
|
5385
|
+
'Jul',
|
|
5386
|
+
'Aug',
|
|
5387
|
+
'Sep',
|
|
5388
|
+
'Oct',
|
|
5389
|
+
'Nov',
|
|
5390
|
+
'Dec',
|
|
5391
|
+
],
|
|
5392
|
+
'en-GB': [
|
|
5393
|
+
'Jan',
|
|
5394
|
+
'Feb',
|
|
5395
|
+
'Mar',
|
|
5396
|
+
'Apr',
|
|
5397
|
+
'May',
|
|
5398
|
+
'Jun',
|
|
5399
|
+
'Jul',
|
|
5400
|
+
'Aug',
|
|
5401
|
+
'Sep',
|
|
5402
|
+
'Oct',
|
|
5403
|
+
'Nov',
|
|
5404
|
+
'Dec',
|
|
5405
|
+
],
|
|
5015
5406
|
};
|
|
5016
5407
|
|
|
5017
|
-
/**
|
|
5018
|
-
* Will execute a series of animation promises in sequence.
|
|
5019
|
-
* This is useful for chaining animations where each step depends on the
|
|
5020
|
-
* previous one completing before starting the next.
|
|
5021
|
-
*
|
|
5022
|
-
* @param {Array<() => Promise<void>>} animations - The array of animation functions.
|
|
5023
|
-
* @returns {Object} - An object with a `start` method to begin the timeline.
|
|
5024
|
-
*
|
|
5025
|
-
* @example
|
|
5026
|
-
* const { fadeOut } = useFade(this.ref);
|
|
5027
|
-
* const { collapse } = useCollapse(this.ref);
|
|
5028
|
-
*
|
|
5029
|
-
* timeline(fadeOut, collapse).start();
|
|
5030
|
-
*/
|
|
5031
|
-
const timeline = (...animations) => ({
|
|
5032
|
-
start: () => {
|
|
5033
|
-
return animations.reduce((promise, animation) => promise.then(() => animation()), Promise.resolve());
|
|
5034
|
-
},
|
|
5035
|
-
});
|
|
5036
|
-
|
|
5037
5408
|
const nvAlertCss = "nv-alert{display:flex !important;align-items:flex-start;position:relative;gap:var(--alert-gap-x);border-radius:var(--alert-radius);font-family:\"TT Norms Pro\", \"Montserrat\", sans-serif}nv-alert>nv-icon{margin-left:var(--alert-icon-position-x);margin-top:var(--alert-icon-position-y)}nv-alert.hidden{display:none !important}nv-alert.feedback-information{background-color:var(--components-alert-information-background);border:1px solid var(--components-alert-information-border) !important}nv-alert.feedback-information>.close:focus,nv-alert.feedback-information>.close:focus-within{outline:none}nv-alert.feedback-information>.close:focus-visible,nv-alert.feedback-information>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-information-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-warning{background-color:var(--components-alert-warning-background);border:1px solid var(--components-alert-warning-border) !important}nv-alert.feedback-warning>.close:focus,nv-alert.feedback-warning>.close:focus-within{outline:none}nv-alert.feedback-warning>.close:focus-visible,nv-alert.feedback-warning>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-warning-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-error{background-color:var(--components-alert-error-background);border:1px solid var(--components-alert-error-border) !important}nv-alert.feedback-error>.close:focus,nv-alert.feedback-error>.close:focus-within{outline:none}nv-alert.feedback-error>.close:focus-visible,nv-alert.feedback-error>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-error-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-success{background-color:var(--components-alert-success-background);border:1px solid var(--components-alert-success-border) !important}nv-alert.feedback-success>.close:focus,nv-alert.feedback-success>.close:focus-within{outline:none}nv-alert.feedback-success>.close:focus-visible,nv-alert.feedback-success>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-success-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert.feedback-neutral{background-color:var(--components-alert-neutral-background);border:1px solid var(--components-alert-neutral-border) !important}nv-alert.feedback-neutral>.close:focus,nv-alert.feedback-neutral>.close:focus-within{outline:none}nv-alert.feedback-neutral>.close:focus-visible,nv-alert.feedback-neutral>.close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-alert-neutral-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-alert>nv-icon.icon-information{color:var(--components-alert-information-icon)}nv-alert>nv-icon.icon-warning{color:var(--components-alert-warning-icon)}nv-alert>nv-icon.icon-error{color:var(--components-alert-error-icon)}nv-alert>nv-icon.icon-success{color:var(--components-alert-success-icon)}nv-alert>nv-icon.icon-neutral{color:var(--components-alert-neutral-icon)}nv-alert>.content{display:flex;padding:var(--alert-padding);padding-left:0;flex-direction:column;gap:var(--alert-gap-y)}nv-alert>.content>.heading{color:var(--components-alert-content-title);font-size:var(--alert-heading-font-size);line-height:var(--alert-heading-line-height);font-weight:var(--alert-heading-font-weight)}nv-alert>.content>.message{color:var(--components-alert-content-description);font-size:var(--alert-message-font-size);line-height:var(--alert-message-line-height)}nv-alert>.close{border-radius:var(--alert-radius);position:absolute;display:flex;top:var(--alert-icon-position-y);right:var(--alert-icon-position-x);padding:0;border:none;background:none;cursor:pointer}";
|
|
5038
5409
|
var NvAlertStyle0 = nvAlertCss;
|
|
5039
5410
|
|
|
@@ -5191,7 +5562,7 @@ class NvAlert {
|
|
|
5191
5562
|
//#region RENDER
|
|
5192
5563
|
render() {
|
|
5193
5564
|
var _a;
|
|
5194
|
-
return (hAsync(Host, { key: '
|
|
5565
|
+
return (hAsync(Host, { key: 'f0e75ac2c38aced1dcf76cb1d5f03becefbee71d', role: "alert", class: clsx('root', `feedback-${this.feedback}`) }, hAsync("nv-icon", { key: '19f7fcf452d62277ab436acd20c285f44fbaecd4', name: (_a = this.icon) !== null && _a !== void 0 ? _a : this.getDefaultIcon(), class: `icon-${this.feedback}`, size: "md" }), hAsync("div", { key: '8e656ffd0bce63bd33d92b97df21389af265e182', class: "content" }, this.heading && hAsync("p", { key: '0aa928e8ee8605d735f890bc67128563ce3ad379', class: "heading" }, this.heading), this.message && hAsync("p", { key: '690d9928646d25a636b2bb04eb65eee40c402f52', class: "message" }, this.message), hAsync("slot", { key: '86309f093688dbb81ff805f1c9137b200541e905' })), this.dismissible && (hAsync("button", { key: '387695ff1e23a7e289cf58c51042ccc561d451ad', class: "close", type: "button", onClick: this.handleDismiss }, hAsync("nv-icon", { key: '788b99b4c56fc8c936a67ac48d2db37fdcca7631', name: "x", size: "sm" })))));
|
|
5195
5566
|
}
|
|
5196
5567
|
get ref() { return getElement(this); }
|
|
5197
5568
|
static get watchers() { return {
|
|
@@ -5275,7 +5646,7 @@ class NvAvatar {
|
|
|
5275
5646
|
/****************************************************************************/
|
|
5276
5647
|
//#region RENDER
|
|
5277
5648
|
render() {
|
|
5278
|
-
return (hAsync(Host, { key: '
|
|
5649
|
+
return (hAsync(Host, { key: '127d470eb9121f611f9e18f029ab9ef15a4a49df', class: clsx(`avatar-${this.size}`, `avatar-color-${this.color}`), "aria-label": this.alt }, this.src ? (hAsync("img", { src: this.src, alt: this.alt })) : this.initials ? (this.trimInitials(this.initials)) : (hAsync("slot", { name: "icon" }, hAsync("nv-icon", { name: "user" })))));
|
|
5279
5650
|
}
|
|
5280
5651
|
static get style() { return NvAvatarStyle0; }
|
|
5281
5652
|
static get cmpMeta() { return {
|
|
@@ -5431,12 +5802,12 @@ class NvBadge {
|
|
|
5431
5802
|
/****************************************************************************/
|
|
5432
5803
|
//#region RENDER
|
|
5433
5804
|
render() {
|
|
5434
|
-
return (hAsync(Host, { key: '
|
|
5805
|
+
return (hAsync(Host, { key: '435c5bb1f565c8bd95cca5c6828157c80f60aa39', class: clsx(`badge-${this.color}`, {
|
|
5435
5806
|
'has-close': this.dismissible,
|
|
5436
5807
|
'with-gap': this.dismissible || this.label,
|
|
5437
5808
|
'visually-hidden': this._isHidden,
|
|
5438
5809
|
'is-icon-only': this.isIconOnly,
|
|
5439
|
-
}) }, hAsync("slot", { key: '
|
|
5810
|
+
}) }, hAsync("slot", { key: '271dc833471e026af5088f48227639682e661e97', name: "leading-icon" }, this.leadIcon && hAsync("nv-icon", { key: 'e578eabf4c5a09e61e28c3839b943804acdf88e8', name: this.leadIcon, size: "sm" })), hAsync("span", { key: '24d16a21b2b4499be712f9b747c9ab63c5e6ca0c', class: clsx({ 'visually-hidden': this.isIconOnly }) }, this.label, hAsync("slot", { key: '3e3827620e6ade8be256ce7dd0b8bb949f36f2d5' })), this.dismissible && (hAsync("button", { key: '90ed9ec1b71815554b963b0eafeb5536578700cf', onClick: this.handleClose, class: "close", type: "button" }, hAsync("nv-icon", { key: 'df426e5d88c2bf02e7aa83c179c05db4795f03db', name: "x", size: "sm" })))));
|
|
5440
5811
|
}
|
|
5441
5812
|
get ref() { return getElement(this); }
|
|
5442
5813
|
static get watchers() { return {
|
|
@@ -5499,7 +5870,7 @@ class NvBreadcrumb {
|
|
|
5499
5870
|
/****************************************************************************/
|
|
5500
5871
|
//#region RENDER
|
|
5501
5872
|
render() {
|
|
5502
|
-
return (hAsync(Host, { key: '
|
|
5873
|
+
return (hAsync(Host, { key: 'b0cfdee987585488bd49734900ee421b081e6df4', role: "listitem", "aria-current": this.current ? 'location' : undefined, class: clsx({ 'visually-hidden': this.current }) }, this.type === 'collapsed' ? (hAsync("button", { ref: el => (this.popoverTrigger = el) }, "...")) : (hAsync("slot", null)), this.tooltip && (hAsync("nv-tooltip", { key: '970d9552c3f81bffd86889fc2ff169f73810507b', message: this.tooltip, triggerElement: this.popoverTrigger, placement: "top" })), this.type === 'collapsed' && (hAsync("nv-popover", { key: '1b14ce172db49aaeb199d6801978f96204ba05a1', triggerMode: "click", groupName: "breadcrumbs", triggerElement: this.popoverTrigger }, hAsync("ul", { key: 'b984309f9290bb4bcfed796200ffaad6e52a2b93', slot: "content" }, hAsync("slot", { key: '189408f75e689b98b4cf9397074dbaefaecece9a' })))), hAsync("span", { key: '62a4bed098620043b69f1e7dcf51db7de035f5fc', "data-scope": "separator" }, "/")));
|
|
5503
5874
|
}
|
|
5504
5875
|
get el() { return getElement(this); }
|
|
5505
5876
|
static get style() { return NvBreadcrumbStyle0; }
|
|
@@ -5529,7 +5900,7 @@ class NvBreadcrumbs {
|
|
|
5529
5900
|
}
|
|
5530
5901
|
//#region RENDER
|
|
5531
5902
|
render() {
|
|
5532
|
-
return (hAsync(Host, { key: '
|
|
5903
|
+
return (hAsync(Host, { key: '4337fe5161c0ce444001e1b92221f3adac26e4bf', role: "navigation", "aria-label": "breadcrumbs" }, hAsync("ol", { key: '00d470eadfe879be525a4a4b7ec3368601a0697c' }, hAsync("slot", { key: '2d012f152b49f33f399aa14dfb18a4c39265128c' }))));
|
|
5533
5904
|
}
|
|
5534
5905
|
static get style() { return NvBreadcrumbsStyle0; }
|
|
5535
5906
|
static get cmpMeta() { return {
|
|
@@ -5693,7 +6064,7 @@ class NvButton {
|
|
|
5693
6064
|
/****************************************************************************/
|
|
5694
6065
|
//#region RENDER
|
|
5695
6066
|
render() {
|
|
5696
|
-
return (hAsync(Host, { key: '
|
|
6067
|
+
return (hAsync(Host, { key: '54c0b3351f4d8a180058a03e61a562882fb98498', role: "button", tabindex: "0", onClick: this.handleButtonClick }, this.loading && (hAsync("nv-loader", { key: '21315e4af4111bcf47c67e65a9a58a1d7121a43e', size: this.size === ButtonSize.Large ? 'sm' : 'xs' })), hAsync("slot", { key: 'f37683ddaa2c11c5b7accfc99429c930f5a3dcf6', name: "leading-icon" }), hAsync("slot", { key: 'd17ebe7505d9027c6c58f930a8ea9b097561cead' }), hAsync("slot", { key: '2cd6c9756cc7540417041adf5830b734291b2ab5', name: "trailing-icon" })));
|
|
5697
6068
|
}
|
|
5698
6069
|
static get formAssociated() { return true; }
|
|
5699
6070
|
get el() { return getElement(this); }
|
|
@@ -5958,26 +6329,6 @@ function parseDate(dateInput, dateFormat) {
|
|
|
5958
6329
|
parsed = dayjs(dateInput, dateFormat, true);
|
|
5959
6330
|
}
|
|
5960
6331
|
if (!parsed.isValid()) {
|
|
5961
|
-
// Check if the date input contains placeholder characters (incomplete input from Inputmask)
|
|
5962
|
-
// This specifically targets partial dates being typed with placeholder characters
|
|
5963
|
-
const hasPlaceholderChars = typeof dateInput === 'string' &&
|
|
5964
|
-
(dateInput.includes('_') ||
|
|
5965
|
-
dateInput.includes('-_') ||
|
|
5966
|
-
dateInput.includes('/_') ||
|
|
5967
|
-
dateInput.includes('._'));
|
|
5968
|
-
// Check if it looks like a partial date being typed (starts with valid pattern)
|
|
5969
|
-
const looksLikePartialDate = typeof dateInput === 'string' &&
|
|
5970
|
-
dateInput.length < dateFormat.length &&
|
|
5971
|
-
/^[\d\-/.]*$/.test(dateInput) && // Only contains digits and date separators
|
|
5972
|
-
dateInput.length > 0;
|
|
5973
|
-
const isIncompleteInput = hasPlaceholderChars || looksLikePartialDate;
|
|
5974
|
-
// Only log error if it's not an incomplete input (to avoid spam during typing)
|
|
5975
|
-
if (!isIncompleteInput) {
|
|
5976
|
-
console.error(`Parsing error:`, {
|
|
5977
|
-
dateInput,
|
|
5978
|
-
dateFormat: dateFormat,
|
|
5979
|
-
});
|
|
5980
|
-
}
|
|
5981
6332
|
return null;
|
|
5982
6333
|
}
|
|
5983
6334
|
return parsed.toDate();
|
|
@@ -6139,9 +6490,13 @@ const CalendarGrid = props => {
|
|
|
6139
6490
|
return (hAsync("div", { class: "days-container" },
|
|
6140
6491
|
hAsync("div", { class: "days-header" }, dayNames.map((day, index) => (hAsync("div", { class: "day-header", key: `day-header-${index}` }, day)))),
|
|
6141
6492
|
hAsync("div", { class: "days-grid" }, days.map(day => {
|
|
6493
|
+
if (day.isBlank) {
|
|
6494
|
+
return hAsync("div", { class: "day day-blank" });
|
|
6495
|
+
}
|
|
6142
6496
|
const date = day.date;
|
|
6143
|
-
if (!date)
|
|
6144
|
-
return
|
|
6497
|
+
if (!date || !day.dayOfMonth) {
|
|
6498
|
+
return hAsync("div", { class: "day-cell is-disabled is-empty" });
|
|
6499
|
+
}
|
|
6145
6500
|
const isSelected = selectionType === 'single' &&
|
|
6146
6501
|
isSameDate(date, selectedDate, { isUTCMode });
|
|
6147
6502
|
const isInRange = isDateInRange(date);
|
|
@@ -6152,7 +6507,7 @@ const CalendarGrid = props => {
|
|
|
6152
6507
|
}))));
|
|
6153
6508
|
};
|
|
6154
6509
|
|
|
6155
|
-
const nvCalendarCss = "nv-calendar{display:block}.datepicker-root{display:flex;justify-content:center;align-items:flex-start;width:auto}.datepicker-container{font-family:system-ui, sans-serif;display:flex;flex-direction:column;align-items:stretch;background:var(--components-calendar-background);border-radius:var(--calendar-radius);padding:var(--calendar-padding);box-shadow:0px var(--shadow-y-axis-md-1) var(--shadow-blur-md-1) var(--shadow-spread-md, 0) var(--shadow-color-opacity-0), 0px var(--shadow-y-axis-md-2) var(--shadow-blur-md-2) var(--shadow-spread-md, 0) var(--shadow-color-opacity-2);border:1px solid var(--components-calendar-border);width:auto;max-width:100%}.datepicker-container-single{max-width:300px}.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-left),.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-container-single:has(.shortcuts-placement-left),.datepicker-container-single:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-wrapper{display:flex;justify-content:center;align-items:flex-start;gap:var(--calendar-gap-x);width:auto;overflow-x:hidden}.datepicker-wrapper::-webkit-scrollbar{width:6px;height:6px}.datepicker-wrapper::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}.datepicker-wrapper::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}.datepicker-wrapper.single{justify-content:center}.calendar-container{display:flex;flex-direction:column;align-items:center;padding:var(--calendar-padding);width:auto;position:relative}.calendar-separator{width:1px;background:var(--components-calendar-border);height:auto;min-height:100%;margin:0 10px}.header{display:flex;justify-content:start;align-items:center;margin-bottom:var(--calendar-header-margin-bottom);width:100%}.header nv-iconbutton{width:var(--calendar-header-button-size);height:var(--calendar-header-button-size)}.nav-buttons{display:flex;gap:var(--spacing-0);margin-left:auto}.nav-left{order:-1}.date-controls{display:flex;gap:var(--spacing-1);align-items:center;min-height:34px;justify-content:center}.datepicker-container-single .date-controls{justify-content:flex-start}.datepicker-container:not(.datepicker-container-single) .date-controls{justify-content:start;flex-grow:1}.date-controls .month-select,.date-controls .year-input{background:transparent !important}.calendar-wrapper:nth-child(n+2) .datepicker-container{margin-left:42px}.calendar-grid{display:grid;grid-template-columns:auto 1fr;column-gap:var(--calendar-weeks-calendar-gap-x);position:relative}.calendar-grid.slide-left{animation:slideLeft 0.3s ease-out}.calendar-grid.slide-right{animation:slideRight 0.3s ease-out}.week-numbers{display:grid;grid-template-rows:var(--calendar-cell-size) repeat(6, var(--calendar-cell-size));background:var(--components-calendar-weeks-background);color:var(--components-calendar-weeks-text);border-radius:var(--calendar-weeks-radius);width:var(--calendar-weeks-size);row-gap:var(--calendar-grid-gap-y)}.week-numbers .clickable{cursor:pointer}.week-numbers .clickable:hover{background-color:var(--components-calendar-weeks-background-hover);color:var(--components-calendar-weeks-text-hover);border-radius:var(--calendar-radius)}.week-header,.week-number{display:grid;place-items:center;font-size:var(--calendar-cell-font-size)}.week-header{font-weight:700;color:var(--components-calendar-weeks-text)}.week-number{color:var(--components-calendar-cell-text)}.days-container{display:grid;grid-template-rows:auto 1fr;row-gap:var(--calendar-grid-gap-y)}.days-header{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));height:var(--calendar-cell-size)}.day-header{display:grid;place-items:center;font-size:var(--calendar-cell-font-size);color:var(--components-calendar-cell-text)}.days-grid{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));grid-template-rows:repeat(6, var(--calendar-cell-size));animation:fadeIn 0.2s ease-in;row-gap:var(--calendar-grid-gap-y);z-index:0}.day{display:grid;place-items:center;width:var(--calendar-cell-size);height:var(--calendar-cell-size);font-size:var(--calendar-cell-font-size);border-radius:var(--calendar-cell-radius);cursor:pointer;border:none;background:transparent;transition:all 0.2s ease;text-align:center;animation:scaleIn 0.2s ease-out}.day:hover:not(.disabled,.empty,.selected){background:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}.day.selected,.day.selected:hover .day.is-today.selected,.day.is-today.selected:hover{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected) !important}.day.disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.day.outside-month{color:var(--components-calendar-cell-text);opacity:var(--opacity-disabled)}.day.outside-month.selected{opacity:1 !important;color:var(--components-calendar-cell-text-selected)}.day.outside-month.in-range{opacity:0.5 !important;background-color:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range)}.day.outside-month.in-range:hover{opacity:0.7 !important;background-color:var(--components-calendar-cell-background-in-range)}.day.in-range{background:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range);border-radius:0;position:relative}.day.range-start,.day.range-start:focus,.day.range-start:hover,.day.range-end,.day.range-end:focus,.day.range-end:hover{background-color:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected) !important}.day.range-start,.day.range-end,.day.range-start.is-today,.day.range-end.is-today{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected);position:relative;border-radius:var(--radius-rounded-full)}.day.range-start:hover,.day.range-end:hover,.day.range-start.is-today:hover,.day.range-end.is-today:hover{color:var(--components-calendar-cell-text-today)}.day.range-start:before,.day.range-end:before,.day.range-start.is-today:before,.day.range-end.is-today:before{content:\"\";position:absolute;bottom:0;left:0;right:0;top:0;z-index:-1;background-color:var(--components-calendar-cell-background-in-range);border-radius:var(--radius-rounded-full);width:auto;height:auto}.day.range-start:has(~.range-end):before,.day.range-start:has(+.in-range):before{border-top-right-radius:0;border-bottom-right-radius:0}.day.range-end:before{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.day.outside-month.range-start,.day.outside-month.range-end{opacity:1 !important;background:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected)}.day.is-today{font-weight:700;position:relative;color:var(--components-calendar-cell-text-today)}.day.is-today.range-start,.day.is-today.range-end{color:var(--components-calendar-cell-text-selected)}.day.is-today.range-start:hover,.day.is-today.range-end:hover{color:var(--components-calendar-cell-text-today)}.day.is-today::after{content:\"\";position:absolute;bottom:var(--spacing-1);left:50%;transform:translateX(-50%);width:var(--calendar-cell-dot-size);height:var(--calendar-cell-dot-size);background-color:currentColor;border-radius:50%}.day.is-today.selected::after{color:var(--components-calendar-cell-text-selected)}.day.is-today.selected::after::after{background-color:var(--components-calendar-cell-dot-selected)}.calendar-footer{display:flex;gap:var(--spacing-1);justify-content:flex-start;width:100%;flex-wrap:wrap}.footer-placement-left{justify-content:flex-start}.footer-placement-right{justify-content:flex-end}.footer-placement-center{justify-content:center}.datepicker-controls{display:flex;flex-direction:column;border-top:1px solid var(--components-calendar-border);padding:var(--calendar-controls-padding-top) var(--calendar-padding) var(--calendar-padding);gap:var(--calendar-grid-gap-y);margin-top:var(--calendar-controls-margin-top)}.datepicker-actions{display:flex;justify-content:flex-end;gap:var(--spacing-1);width:100%}.datepicker-actions slot-fb{display:contents !important}.calendar-footer+.datepicker-actions{margin-top:0}.shortcuts-placement-left,.shortcuts-placement-right{display:flex;flex-direction:column;gap:var(--spacing-1);margin-top:var(--spacing-4)}.shortcuts-placement-left{align-items:flex-end}.shortcuts-placement-right{align-items:flex-start}@keyframes slideLeft{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}";
|
|
6510
|
+
const nvCalendarCss = "nv-calendar{display:block}.datepicker-root{display:flex;justify-content:center;align-items:flex-start;width:auto}.datepicker-container{font-family:system-ui, sans-serif;display:flex;flex-direction:column;align-items:stretch;background:var(--components-calendar-background);border-radius:var(--calendar-radius);padding:var(--calendar-padding);box-shadow:0px var(--shadow-y-axis-md-1) var(--shadow-blur-md-1) var(--shadow-spread-md, 0) var(--shadow-color-opacity-0), 0px var(--shadow-y-axis-md-2) var(--shadow-blur-md-2) var(--shadow-spread-md, 0) var(--shadow-color-opacity-2);border:1px solid var(--components-calendar-border);width:auto;max-width:100%}.datepicker-container-single{max-width:300px}.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-left),.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-container-single:has(.shortcuts-placement-left),.datepicker-container-single:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-wrapper{display:flex;justify-content:center;align-items:flex-start;gap:var(--calendar-gap-x);width:auto;overflow-x:hidden}.datepicker-wrapper::-webkit-scrollbar{width:6px;height:6px}.datepicker-wrapper::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}.datepicker-wrapper::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}.datepicker-wrapper.single{justify-content:center}.calendar-container{display:flex;flex-direction:column;align-items:center;padding:var(--calendar-padding);width:auto;position:relative}.calendar-separator{width:1px;background:var(--components-calendar-border);height:auto;min-height:100%;margin:0 10px}.header{display:flex;justify-content:start;align-items:center;margin-bottom:var(--calendar-header-margin-bottom);width:100%}.header nv-iconbutton{width:var(--calendar-header-button-size);height:var(--calendar-header-button-size)}.nav-buttons{display:flex;gap:var(--spacing-0);margin-left:auto}.nav-left{order:-1}.date-controls{display:flex;gap:var(--spacing-1);align-items:center;min-height:34px;justify-content:center}.datepicker-container-single .date-controls{justify-content:flex-start}.datepicker-container:not(.datepicker-container-single) .date-controls{justify-content:start;flex-grow:1}.date-controls .month-select,.date-controls .year-input{background:transparent !important}.calendar-wrapper:nth-child(n+2) .datepicker-container{margin-left:42px}.calendar-grid{display:grid;grid-template-columns:auto 1fr;column-gap:var(--calendar-weeks-calendar-gap-x);position:relative}.calendar-grid.slide-left{animation:slideLeft 0.3s ease-out}.calendar-grid.slide-right{animation:slideRight 0.3s ease-out}.week-numbers{display:grid;grid-template-rows:var(--calendar-cell-size) repeat(6, var(--calendar-cell-size));background:var(--components-calendar-weeks-background);color:var(--components-calendar-weeks-text);border-radius:var(--calendar-weeks-radius);width:var(--calendar-weeks-size);row-gap:var(--calendar-grid-gap-y)}.week-numbers .clickable{cursor:pointer}.week-numbers .clickable:hover{background-color:var(--components-calendar-weeks-background-hover);color:var(--components-calendar-weeks-text-hover);border-radius:var(--calendar-radius)}.week-header,.week-number{display:grid;place-items:center;font-size:var(--calendar-cell-font-size)}.week-header{font-weight:700;color:var(--components-calendar-weeks-text)}.week-number{color:var(--components-calendar-cell-text)}.days-container{display:grid;grid-template-rows:auto 1fr;row-gap:var(--calendar-grid-gap-y)}.days-header{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));height:var(--calendar-cell-size)}.day-header{display:grid;place-items:center;font-size:var(--calendar-cell-font-size);color:var(--components-calendar-cell-text)}.days-grid{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));grid-template-rows:repeat(6, var(--calendar-cell-size));animation:fadeIn 0.2s ease-in;row-gap:var(--calendar-grid-gap-y);z-index:0}.day{display:grid;place-items:center;width:var(--calendar-cell-size);height:var(--calendar-cell-size);font-size:var(--calendar-cell-font-size);border-radius:var(--calendar-cell-radius);cursor:pointer;border:none;background:transparent;transition:all 0.2s ease;text-align:center;animation:scaleIn 0.2s ease-out}.day:hover:not(.disabled,.empty,.selected){background:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}.day.selected,.day.selected:hover .day.is-today.selected,.day.is-today.selected:hover{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected) !important}.day.disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.day.is-empty{pointer-events:none;background-color:transparent;border-color:transparent}.day.day-blank{pointer-events:none;background-color:transparent;border-color:transparent}.day.outside-month{color:var(--components-calendar-cell-text);opacity:var(--opacity-disabled)}.day.outside-month.selected{opacity:1 !important;color:var(--components-calendar-cell-text-selected)}.day.outside-month.in-range{opacity:0.5 !important;background-color:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range)}.day.outside-month.in-range:hover{opacity:0.7 !important;background-color:var(--components-calendar-cell-background-in-range)}.day.in-range{background:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range);border-radius:0;position:relative}.day.range-start,.day.range-start:focus,.day.range-start:hover,.day.range-end,.day.range-end:focus,.day.range-end:hover{background-color:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected) !important}.day.range-start,.day.range-end,.day.range-start.is-today,.day.range-end.is-today{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected);position:relative;border-radius:var(--radius-rounded-full)}.day.range-start:hover,.day.range-end:hover,.day.range-start.is-today:hover,.day.range-end.is-today:hover{color:var(--components-calendar-cell-text-today)}.day.range-start:before,.day.range-end:before,.day.range-start.is-today:before,.day.range-end.is-today:before{content:\"\";position:absolute;bottom:0;left:0;right:0;top:0;z-index:-1;background-color:var(--components-calendar-cell-background-in-range);border-radius:var(--radius-rounded-full);width:auto;height:auto}.day.range-start:has(~.range-end):before,.day.range-start:has(+.in-range):before{border-top-right-radius:0;border-bottom-right-radius:0}.day.range-end:before{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.day.outside-month.range-start,.day.outside-month.range-end{opacity:1 !important;background:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected)}.day.is-today{font-weight:700;position:relative;color:var(--components-calendar-cell-text-today)}.day.is-today.range-start,.day.is-today.range-end{color:var(--components-calendar-cell-text-selected)}.day.is-today.range-start:hover,.day.is-today.range-end:hover{color:var(--components-calendar-cell-text-today)}.day.is-today::after{content:\"\";position:absolute;bottom:var(--spacing-1);left:50%;transform:translateX(-50%);width:var(--calendar-cell-dot-size);height:var(--calendar-cell-dot-size);background-color:currentColor;border-radius:50%}.day.is-today.selected::after{color:var(--components-calendar-cell-text-selected)}.day.is-today.selected::after::after{background-color:var(--components-calendar-cell-dot-selected)}.calendar-footer{display:flex;gap:var(--spacing-1);justify-content:flex-start;width:100%;flex-wrap:wrap}.footer-placement-left{justify-content:flex-start}.footer-placement-right{justify-content:flex-end}.footer-placement-center{justify-content:center}.datepicker-controls{display:flex;flex-direction:column;border-top:1px solid var(--components-calendar-border);padding:var(--calendar-controls-padding-top) var(--calendar-padding) var(--calendar-padding);gap:var(--calendar-grid-gap-y);margin-top:var(--calendar-controls-margin-top)}.datepicker-actions{display:flex;justify-content:flex-end;gap:var(--spacing-1);width:100%}.datepicker-actions slot-fb{display:contents !important}.calendar-footer+.datepicker-actions{margin-top:0}.shortcuts-placement-left,.shortcuts-placement-right{display:flex;flex-direction:column;gap:var(--spacing-1);margin-top:var(--spacing-4)}.shortcuts-placement-left{align-items:flex-end}.shortcuts-placement-right{align-items:flex-start}@keyframes slideLeft{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}";
|
|
6156
6511
|
var NvCalendarStyle0 = nvCalendarCss;
|
|
6157
6512
|
|
|
6158
6513
|
/**
|
|
@@ -6214,6 +6569,8 @@ class NvCalendar {
|
|
|
6214
6569
|
this.showActions = false;
|
|
6215
6570
|
/** Cache for parsed disabled dates */
|
|
6216
6571
|
this.parsedDisabledDates = [];
|
|
6572
|
+
/** Flag to indicate a user click for selection */
|
|
6573
|
+
this.isUserClick = false;
|
|
6217
6574
|
//#endregion PROPERTIES
|
|
6218
6575
|
/****************************************************************************/
|
|
6219
6576
|
//#region STATE
|
|
@@ -6249,7 +6606,7 @@ class NvCalendar {
|
|
|
6249
6606
|
}
|
|
6250
6607
|
// Navigate to the date if not prevented
|
|
6251
6608
|
const preventNavigation = this.el.getAttribute('data-prevent-navigation') === 'true';
|
|
6252
|
-
if (!preventNavigation) {
|
|
6609
|
+
if (!preventNavigation && !this.isUserClick) {
|
|
6253
6610
|
this.currentDate = parsedDate;
|
|
6254
6611
|
}
|
|
6255
6612
|
}
|
|
@@ -6277,7 +6634,7 @@ class NvCalendar {
|
|
|
6277
6634
|
}
|
|
6278
6635
|
// Navigate to start date if not prevented
|
|
6279
6636
|
const preventNavigation = this.el.getAttribute('data-prevent-navigation') === 'true';
|
|
6280
|
-
if (!preventNavigation) {
|
|
6637
|
+
if (!preventNavigation && !this.isUserClick) {
|
|
6281
6638
|
this.currentDate = startDate;
|
|
6282
6639
|
}
|
|
6283
6640
|
}
|
|
@@ -6298,20 +6655,14 @@ class NvCalendar {
|
|
|
6298
6655
|
*/
|
|
6299
6656
|
this.changeMonth = (offset) => {
|
|
6300
6657
|
const newDate = new Date(this.currentDate);
|
|
6301
|
-
//
|
|
6658
|
+
newDate.setUTCDate(1); // Set to the first of the month to avoid day-of-month issues
|
|
6302
6659
|
newDate.setUTCMonth(newDate.getUTCMonth() + offset);
|
|
6303
|
-
// Add the appropriate animation class
|
|
6304
6660
|
const containers = this.el.querySelectorAll('.calendar-grid');
|
|
6305
6661
|
containers.forEach(container => {
|
|
6306
|
-
// Remove existing animation classes
|
|
6307
6662
|
container.classList.remove('slide-left', 'slide-right');
|
|
6308
|
-
// Add the new animation class
|
|
6309
6663
|
const animationClass = offset > 0 ? 'slide-left' : 'slide-right';
|
|
6310
6664
|
container.classList.add(animationClass);
|
|
6311
|
-
|
|
6312
|
-
setTimeout(() => {
|
|
6313
|
-
container.classList.remove(animationClass);
|
|
6314
|
-
}, 300); // 300ms corresponds to $slide-duration in the SCSS
|
|
6665
|
+
setTimeout(() => container.classList.remove(animationClass), 300);
|
|
6315
6666
|
});
|
|
6316
6667
|
this.currentDate = newDate;
|
|
6317
6668
|
};
|
|
@@ -6323,12 +6674,16 @@ class NvCalendar {
|
|
|
6323
6674
|
if (this.isDateDisabled(date)) {
|
|
6324
6675
|
return;
|
|
6325
6676
|
}
|
|
6677
|
+
this.isUserClick = true;
|
|
6326
6678
|
if (this.selectionType === 'single') {
|
|
6327
6679
|
this.handleSingleSelection(date);
|
|
6328
6680
|
}
|
|
6329
6681
|
else {
|
|
6330
6682
|
this.handleRangeSelection(date);
|
|
6331
6683
|
}
|
|
6684
|
+
requestAnimationFrame(() => {
|
|
6685
|
+
this.isUserClick = false;
|
|
6686
|
+
});
|
|
6332
6687
|
};
|
|
6333
6688
|
/**
|
|
6334
6689
|
* Handles single date selection
|
|
@@ -6471,12 +6826,15 @@ class NvCalendar {
|
|
|
6471
6826
|
/**
|
|
6472
6827
|
* Generates the days of the current month
|
|
6473
6828
|
* @param {number} offset - Month offset (0 by default)
|
|
6474
|
-
* @param {number} totalCalendars - Number of calendars to display (1 by default)
|
|
6475
6829
|
* @returns {Array<{ dayOfMonth: number | null, date: Date | null, isSelected: boolean, isDisabled: boolean }>} Array of formatted days
|
|
6476
6830
|
*/
|
|
6477
|
-
this.getDaysInMonth = (offset = 0
|
|
6478
|
-
const
|
|
6479
|
-
|
|
6831
|
+
this.getDaysInMonth = (offset = 0) => {
|
|
6832
|
+
const baseMonth = this.currentDate.getUTCMonth();
|
|
6833
|
+
// Correctly calculate the year and month for the given offset
|
|
6834
|
+
const targetDate = new Date(this.currentDate);
|
|
6835
|
+
targetDate.setUTCMonth(baseMonth + offset);
|
|
6836
|
+
const year = targetDate.getUTCFullYear();
|
|
6837
|
+
const month = targetDate.getUTCMonth();
|
|
6480
6838
|
const firstDay = new Date(Date.UTC(year, month, 1));
|
|
6481
6839
|
const lastDay = new Date(Date.UTC(year, month + 1, 0));
|
|
6482
6840
|
const days = [];
|
|
@@ -6485,18 +6843,18 @@ class NvCalendar {
|
|
|
6485
6843
|
const dayOfWeekIndex = firstDay.getUTCDay(); // 0 = Sunday, 1 = Monday, etc.
|
|
6486
6844
|
// Adjust based on firstDayOfWeek (if week starts on Monday, offset is different)
|
|
6487
6845
|
const offsetDays = (dayOfWeekIndex - this.firstDayOfWeek + 7) % 7;
|
|
6488
|
-
// Add
|
|
6489
|
-
|
|
6490
|
-
const
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
}
|
|
6846
|
+
// Add padding days from the previous month
|
|
6847
|
+
for (let i = 0; i < offsetDays; i++) {
|
|
6848
|
+
const prevMonthDay = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
6849
|
+
const date = new Date(Date.UTC(year, month - 1, prevMonthDay - offsetDays + 1 + i));
|
|
6850
|
+
days.push({
|
|
6851
|
+
dayOfMonth: date.getUTCDate(),
|
|
6852
|
+
date,
|
|
6853
|
+
isCurrentMonth: false,
|
|
6854
|
+
isDisabled: this.isDateDisabled(date),
|
|
6855
|
+
// Days from previous month are blank if not the first calendar
|
|
6856
|
+
isBlank: offset > 0,
|
|
6857
|
+
});
|
|
6500
6858
|
}
|
|
6501
6859
|
// Add the days of the current month
|
|
6502
6860
|
for (let i = 1; i <= lastDay.getUTCDate(); i++) {
|
|
@@ -6506,11 +6864,12 @@ class NvCalendar {
|
|
|
6506
6864
|
date,
|
|
6507
6865
|
isCurrentMonth: true,
|
|
6508
6866
|
isDisabled: this.isDateDisabled(date),
|
|
6867
|
+
isBlank: false,
|
|
6509
6868
|
});
|
|
6510
6869
|
}
|
|
6511
|
-
// Add
|
|
6512
|
-
|
|
6513
|
-
|
|
6870
|
+
// Add padding days to fill the last week
|
|
6871
|
+
const nextMonthDaysNeeded = 7 - (days.length % 7 || 7);
|
|
6872
|
+
if (nextMonthDaysNeeded < 7) {
|
|
6514
6873
|
for (let i = 1; i <= nextMonthDaysNeeded; i++) {
|
|
6515
6874
|
const date = new Date(Date.UTC(year, month + 1, i));
|
|
6516
6875
|
days.push({
|
|
@@ -6518,6 +6877,8 @@ class NvCalendar {
|
|
|
6518
6877
|
date,
|
|
6519
6878
|
isCurrentMonth: false,
|
|
6520
6879
|
isDisabled: this.isDateDisabled(date),
|
|
6880
|
+
// Days from next month are blank if not the last calendar
|
|
6881
|
+
isBlank: offset < this.numberOfCalendars - 1,
|
|
6521
6882
|
});
|
|
6522
6883
|
}
|
|
6523
6884
|
}
|
|
@@ -6555,12 +6916,25 @@ class NvCalendar {
|
|
|
6555
6916
|
this.handleMonthChange = (event, calendarOffset = 0) => {
|
|
6556
6917
|
const select = event.target;
|
|
6557
6918
|
const selectedMonth = parseInt(select.value, 10);
|
|
6558
|
-
const currentMonth = this.currentDate.getUTCMonth();
|
|
6559
|
-
// Calculate the difference considering the calendar offset
|
|
6560
|
-
const monthDiff = selectedMonth - ((currentMonth + calendarOffset) % 12);
|
|
6561
6919
|
const newDate = new Date(this.currentDate);
|
|
6562
|
-
|
|
6563
|
-
|
|
6920
|
+
// Date for the calendar being changed
|
|
6921
|
+
const targetCalendarDate = new Date(newDate.toUTCString());
|
|
6922
|
+
targetCalendarDate.setUTCMonth(targetCalendarDate.getUTCMonth() + calendarOffset);
|
|
6923
|
+
const currentMonth = targetCalendarDate.getUTCMonth();
|
|
6924
|
+
let monthDiff = selectedMonth - currentMonth;
|
|
6925
|
+
// Smartly adjust for year change
|
|
6926
|
+
if (monthDiff > 6) {
|
|
6927
|
+
// e.g. from Jan to Dec, go back 1 month
|
|
6928
|
+
monthDiff -= 12;
|
|
6929
|
+
}
|
|
6930
|
+
if (monthDiff < -6) {
|
|
6931
|
+
// e.g. from Dec to Jan, go forward 1 month
|
|
6932
|
+
monthDiff += 12;
|
|
6933
|
+
}
|
|
6934
|
+
// Apply the diff to the original `currentDate`
|
|
6935
|
+
const finalDate = new Date(this.currentDate);
|
|
6936
|
+
finalDate.setUTCMonth(finalDate.getUTCMonth() + monthDiff);
|
|
6937
|
+
this.currentDate = finalDate;
|
|
6564
6938
|
};
|
|
6565
6939
|
/**
|
|
6566
6940
|
* Handles year change in the numeric entry
|
|
@@ -6572,9 +6946,10 @@ class NvCalendar {
|
|
|
6572
6946
|
const year = parseInt(input.value, 10);
|
|
6573
6947
|
if (!isNaN(year) && year >= 1900 && year <= 2100) {
|
|
6574
6948
|
const newDate = new Date(this.currentDate);
|
|
6575
|
-
newDate.setUTCFullYear(year);
|
|
6576
6949
|
newDate.setUTCMonth(newDate.getUTCMonth() + calendarOffset);
|
|
6577
|
-
|
|
6950
|
+
newDate.setUTCFullYear(year);
|
|
6951
|
+
newDate.setUTCMonth(newDate.getUTCMonth() - calendarOffset);
|
|
6952
|
+
this.currentDate = new Date(newDate);
|
|
6578
6953
|
}
|
|
6579
6954
|
};
|
|
6580
6955
|
/**
|
|
@@ -6585,7 +6960,7 @@ class NvCalendar {
|
|
|
6585
6960
|
this.handleWeekSelection = (weekDays, calendarIndex) => {
|
|
6586
6961
|
if (this.selectionType !== 'range')
|
|
6587
6962
|
return;
|
|
6588
|
-
const allDays = this.getDaysInMonth(calendarIndex
|
|
6963
|
+
const allDays = this.getDaysInMonth(calendarIndex);
|
|
6589
6964
|
const weekStart = weekDays[0];
|
|
6590
6965
|
const weekEnd = weekDays[weekDays.length - 1];
|
|
6591
6966
|
if (!weekStart || !weekEnd)
|
|
@@ -6798,12 +7173,17 @@ class NvCalendar {
|
|
|
6798
7173
|
index,
|
|
6799
7174
|
/** Month offset */
|
|
6800
7175
|
offset) => {
|
|
6801
|
-
const days = this.getDaysInMonth(offset
|
|
7176
|
+
const days = this.getDaysInMonth(offset);
|
|
6802
7177
|
const weeks = [];
|
|
6803
7178
|
for (let i = 0; i < days.length; i += 7) {
|
|
6804
7179
|
weeks.push(days.slice(i, i + 7));
|
|
6805
7180
|
}
|
|
6806
|
-
|
|
7181
|
+
// Add year and month to the key to force re-render on date change
|
|
7182
|
+
const targetDate = new Date(this.currentDate);
|
|
7183
|
+
targetDate.setUTCMonth(targetDate.getUTCMonth() + offset);
|
|
7184
|
+
const year = targetDate.getUTCFullYear();
|
|
7185
|
+
const month = targetDate.getUTCMonth();
|
|
7186
|
+
return (hAsync("div", { class: "calendar-wrapper" }, hAsync("div", { class: "calendar-container", key: `calendar-${index}-${year}-${month}` }, this.renderHeader(offset, index), hAsync("div", { class: "calendar-grid" }, this.showWeekNumbers && this.renderWeekNumbers(weeks, index), hAsync(CalendarGrid, { days: days, dayNames: this.getDayNames(), selectionType: this.selectionType, selectedDate: this.selectedDate, startDate: this.startDate, endDate: this.endDate, isUTCMode: this.isUTCMode, onDayClick: this.handleDateSelection, isDateInRange: this.isDateInRange, isToday: this.isToday }))), index < this.numberOfCalendars - 1 && (hAsync("div", { class: "calendar-separator" }))));
|
|
6807
7187
|
};
|
|
6808
7188
|
/**
|
|
6809
7189
|
* Renders the shortcuts
|
|
@@ -6853,7 +7233,7 @@ class NvCalendar {
|
|
|
6853
7233
|
this.endDate = endDate;
|
|
6854
7234
|
// Do not navigate to the start date if data-prevent-navigation attribute is present
|
|
6855
7235
|
const preventNavigation = this.el.getAttribute('data-prevent-navigation') === 'true';
|
|
6856
|
-
if (!preventNavigation) {
|
|
7236
|
+
if (!preventNavigation && !this.isUserClick) {
|
|
6857
7237
|
this.currentDate = startDate;
|
|
6858
7238
|
}
|
|
6859
7239
|
}
|
|
@@ -6881,7 +7261,7 @@ class NvCalendar {
|
|
|
6881
7261
|
this.selectedDate = parsedDate;
|
|
6882
7262
|
// Do not navigate to the selected date if data-prevent-navigation attribute is present
|
|
6883
7263
|
const preventNavigation = this.el.getAttribute('data-prevent-navigation') === 'true';
|
|
6884
|
-
if (!preventNavigation) {
|
|
7264
|
+
if (!preventNavigation && !this.isUserClick) {
|
|
6885
7265
|
this.currentDate = parsedDate;
|
|
6886
7266
|
}
|
|
6887
7267
|
}
|
|
@@ -6995,6 +7375,27 @@ class NvCalendar {
|
|
|
6995
7375
|
throw error; // Re-throw to let the caller handle it
|
|
6996
7376
|
}
|
|
6997
7377
|
}
|
|
7378
|
+
/**
|
|
7379
|
+
* Clears the current selection and resets the calendar to its initial state.
|
|
7380
|
+
* This method can be called programmatically to reset the calendar.
|
|
7381
|
+
*/
|
|
7382
|
+
async clear() {
|
|
7383
|
+
if (this.selectionType === 'single') {
|
|
7384
|
+
this.selectedDate = null;
|
|
7385
|
+
this.singleValue = '';
|
|
7386
|
+
this.value = '';
|
|
7387
|
+
this.singleDateChange.emit('');
|
|
7388
|
+
this.valueChanged.emit('');
|
|
7389
|
+
}
|
|
7390
|
+
else {
|
|
7391
|
+
this.startDate = null;
|
|
7392
|
+
this.endDate = null;
|
|
7393
|
+
this.rangeValue = { start: '', end: '' };
|
|
7394
|
+
this.value = '';
|
|
7395
|
+
this.rangeDateChange.emit({ start: '', end: '' });
|
|
7396
|
+
this.valueChanged.emit('');
|
|
7397
|
+
}
|
|
7398
|
+
}
|
|
6998
7399
|
/**
|
|
6999
7400
|
* Renders the datepicker
|
|
7000
7401
|
* @returns {JSX.Element} Datepicker
|
|
@@ -7002,8 +7403,8 @@ class NvCalendar {
|
|
|
7002
7403
|
* @slot default - Child content of the component.
|
|
7003
7404
|
*/
|
|
7004
7405
|
render() {
|
|
7005
|
-
return (hAsync(Host, { key: '
|
|
7006
|
-
this.hasActions) && (hAsync("div", { key: '
|
|
7406
|
+
return (hAsync(Host, { key: '7abeb96312f2bcf26eed3a133ef59d5d3b5b528f' }, hAsync("div", { key: 'e0b2db720853551e3b6445e92b39b418123cb83e', class: "datepicker-root" }, hAsync("div", { key: '1a83c285278c440c4e33ae770a033974e4924830', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, hAsync("div", { key: '3481fe780a3e1d8f0c1e22ffc82c3b7830721055', class: `datepicker-wrapper ${this.numberOfCalendars === 1 ? 'single' : ''}` }, this.shortcutsPlacement === 'left' && this.renderShortcuts(), Array.from({ length: this.numberOfCalendars }, (_, index) => this.renderCalendar(index, index)), this.shortcutsPlacement === 'right' && this.renderShortcuts()), ((this.hasShortcuts && this.shortcutsPlacement === 'bottom') ||
|
|
7407
|
+
this.hasActions) && (hAsync("div", { key: '3a644bdc993142c181c45173756e362025d4a23a', class: "datepicker-controls" }, this.shortcutsPlacement === 'bottom' && this.renderShortcuts(), this.hasActions && this.renderActions())))), hAsync("slot", { key: '4a4290ccf63429a9a88cfd95a33b4fdc34c8ef74' })));
|
|
7007
7408
|
}
|
|
7008
7409
|
get el() { return getElement(this); }
|
|
7009
7410
|
static get watchers() { return {
|
|
@@ -7037,7 +7438,8 @@ class NvCalendar {
|
|
|
7037
7438
|
"selectedDate": [32],
|
|
7038
7439
|
"startDate": [32],
|
|
7039
7440
|
"endDate": [32],
|
|
7040
|
-
"months": [32]
|
|
7441
|
+
"months": [32],
|
|
7442
|
+
"clear": [64]
|
|
7041
7443
|
},
|
|
7042
7444
|
"$listeners$": undefined,
|
|
7043
7445
|
"$lazyBundleId$": "-",
|
|
@@ -7073,7 +7475,7 @@ class NvCol {
|
|
|
7073
7475
|
/****************************************************************************/
|
|
7074
7476
|
//#region RENDER
|
|
7075
7477
|
render() {
|
|
7076
|
-
return (hAsync(Host, { key: '
|
|
7478
|
+
return (hAsync(Host, { key: 'e258bc3e01d3bd35bf64f14241c70ae044fac132', class: clsx(this.getColSize()) }, hAsync("slot", { key: 'd36caf0fde38eae6cd37b62fb4c02e3de6b7225e' })));
|
|
7077
7479
|
}
|
|
7078
7480
|
static get style() { return NvColStyle0; }
|
|
7079
7481
|
static get cmpMeta() { return {
|
|
@@ -11574,7 +11976,7 @@ class NvDatagrid {
|
|
|
11574
11976
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
11575
11977
|
? []
|
|
11576
11978
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
11577
|
-
return (hAsync(Host, { key: '
|
|
11979
|
+
return (hAsync(Host, { key: 'b149279b85a3138e5be62b2f431a82fe5056b996' }, hAsync("div", { key: '84ffd6a613a7e51539f0bc7e5ddff16a1769af5a', class: "hidden" }, hAsync("slot", { key: 'cabafd2aab117816742972bd4eb6e7122c333ee9' })), hAsync("slot", { key: '17a26ba154ddc2dea82f7576878107ede55a2043', name: "before" }), this.enableGlobalFilter && this.table && (hAsync("div", { key: '822bb793cad6266810571dbb2c087c9e2b68958d', class: `search-container justify-${this.globalFilterPosition}` }, hAsync("nv-fieldtext", { key: 'b9fd668a09b602ded195e4d10b79ae3d06c9a0f6', value: this.globalFilterSearchTerm, onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns..." }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (hAsync("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (hAsync("div", null, hAsync("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (hAsync("thead", null, this.parsedColumns.length > 0 && headerGroups
|
|
11578
11980
|
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (hAsync("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
11579
11981
|
return this.getHeaderCell(header);
|
|
11580
11982
|
}))))
|
|
@@ -11585,7 +11987,7 @@ class NvDatagrid {
|
|
|
11585
11987
|
return (hAsync("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
|
|
11586
11988
|
})));
|
|
11587
11989
|
}))), this.table && this.enableRowSelection ? (hAsync("tfoot", null, hAsync("tr", null, hAsync("td", { colSpan: 20 }, this.enableRowSelection && this.table ? (hAsync("div", null, this.rowSelectionState &&
|
|
11588
|
-
Object.keys(this.rowSelectionState).length > 0 ? (hAsync("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', ((_e = (_d = this.table.getPreFilteredRowModel()) === null || _d === void 0 ? void 0 : _d.rows) === null || _e === void 0 ? void 0 : _e.length) || 0, ' ', "Total Rows Selected")) : (hAsync("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), hAsync("slot", { key: '
|
|
11990
|
+
Object.keys(this.rowSelectionState).length > 0 ? (hAsync("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', ((_e = (_d = this.table.getPreFilteredRowModel()) === null || _d === void 0 ? void 0 : _d.rows) === null || _e === void 0 ? void 0 : _e.length) || 0, ' ', "Total Rows Selected")) : (hAsync("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), hAsync("slot", { key: 'f509745423857527f2983c5cce1289441cc1f7c7', name: "after" })));
|
|
11589
11991
|
}
|
|
11590
11992
|
get el() { return getElement(this); }
|
|
11591
11993
|
static get watchers() { return {
|
|
@@ -11650,7 +12052,7 @@ class NvDatagridcolumn {
|
|
|
11650
12052
|
/****************************************************************************/
|
|
11651
12053
|
//#region RENDER
|
|
11652
12054
|
render() {
|
|
11653
|
-
return (hAsync(Host, { key: '
|
|
12055
|
+
return (hAsync(Host, { key: '49c4b8807b26a76cf26e9ac9567a5bca7de0aee7' }, hAsync("slot", { key: '9e6c8b69a92fe4caec10025c941e39f1266b4f93', name: "header" }), hAsync("slot", { key: '992fa9c1d00fe8ed65df5ad2157b78140d2794a0', name: "cell" })));
|
|
11654
12056
|
}
|
|
11655
12057
|
static get cmpMeta() { return {
|
|
11656
12058
|
"$flags$": 4,
|
|
@@ -12282,7 +12684,7 @@ function v4(options, buf, offset) {
|
|
|
12282
12684
|
return unsafeStringify(rnds);
|
|
12283
12685
|
}
|
|
12284
12686
|
|
|
12285
|
-
const nvDialogCss = "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}";
|
|
12687
|
+
const nvDialogCss = "dialog{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:min(90vw, 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}";
|
|
12286
12688
|
var NvDialogStyle0 = nvDialogCss;
|
|
12287
12689
|
|
|
12288
12690
|
/**
|
|
@@ -12317,6 +12719,11 @@ class NvDialog {
|
|
|
12317
12719
|
* If true, the dialog takes full width styling.
|
|
12318
12720
|
*/
|
|
12319
12721
|
this.full = false;
|
|
12722
|
+
/**
|
|
12723
|
+
* Controls whether the dialog should automatically focus the first focusable element when opened.
|
|
12724
|
+
* When disabled, prevents unwanted tooltip triggers on dialog open.
|
|
12725
|
+
*/
|
|
12726
|
+
this.autofocus = false;
|
|
12320
12727
|
/**
|
|
12321
12728
|
* Handles the close button click.
|
|
12322
12729
|
*/
|
|
@@ -12424,15 +12831,23 @@ class NvDialog {
|
|
|
12424
12831
|
}
|
|
12425
12832
|
/**
|
|
12426
12833
|
* Prevents the body from scrolling when the dialog is open.
|
|
12834
|
+
* Compensates for scrollbar width to prevent layout shift.
|
|
12427
12835
|
*/
|
|
12428
12836
|
preventScroll() {
|
|
12429
|
-
|
|
12837
|
+
// Calculate scrollbar width
|
|
12838
|
+
const scrollBarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
12839
|
+
// Apply overflow hidden and padding compensation
|
|
12840
|
+
document.documentElement.style.overflow = 'hidden';
|
|
12841
|
+
document.documentElement.style.paddingRight = `${scrollBarWidth}px`;
|
|
12430
12842
|
}
|
|
12431
12843
|
/**
|
|
12432
12844
|
* Allows the body to scroll when the dialog is closed.
|
|
12845
|
+
* Removes the applied overflow and padding styles.
|
|
12433
12846
|
*/
|
|
12434
12847
|
allowScroll() {
|
|
12435
|
-
|
|
12848
|
+
// Remove the applied styles
|
|
12849
|
+
document.documentElement.style.removeProperty('overflow');
|
|
12850
|
+
document.documentElement.style.removeProperty('padding-right');
|
|
12436
12851
|
}
|
|
12437
12852
|
ensureFormId(formElement) {
|
|
12438
12853
|
if (!formElement.id) {
|
|
@@ -12509,8 +12924,8 @@ class NvDialog {
|
|
|
12509
12924
|
if (this.open) {
|
|
12510
12925
|
this.show();
|
|
12511
12926
|
}
|
|
12512
|
-
//
|
|
12513
|
-
if (!this.dialogElement.querySelector('[autofocus]')) {
|
|
12927
|
+
// Only set autofocus if the prop is true and no element already has autofocus
|
|
12928
|
+
if (this.autofocus && !this.dialogElement.querySelector('[autofocus]')) {
|
|
12514
12929
|
this.setAutofocus();
|
|
12515
12930
|
}
|
|
12516
12931
|
this.attachEventListeners();
|
|
@@ -12529,7 +12944,7 @@ class NvDialog {
|
|
|
12529
12944
|
//#region RENDER
|
|
12530
12945
|
render() {
|
|
12531
12946
|
const hasForm = this.form || this.el.querySelector('form');
|
|
12532
|
-
return (hAsync(Host, { key: '
|
|
12947
|
+
return (hAsync(Host, { key: '8e4a46dd7749656670d5b8eb167aae2108644375' }, hAsync("slot", { key: '954980e2b451c9f5c0e4f09df76c62c1f04ab01e', name: "trigger" }), hAsync("dialog", { key: '8541ad521ae348d26764756e45c668f7aab5c278', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsx({ full: this.full }) }, hAsync("div", { key: 'cd07e78da6f5cb3abd14640b941629bff034ec63', class: "content" }, !this.undismissable && (hAsync("nv-button", { key: '5b610a9d30acd450a273e9dc10a4a29bdf85d58c', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleCloseButton, "aria-label": "Close dialog" }, hAsync("nv-icon", { key: '4e5841c525221c6c23c699deaeefa7492f57e091', name: "x", size: "sm" }))), this.headerElement ? (hAsync("slot", { name: "header" })) : (hAsync("nv-dialogheader", { id: "dialog-header" })), hAsync("div", { key: 'f09fd0f7013b1c2c912ed7958a8a9cab0016858b', class: "content-body", id: "dialog-content" }, hAsync("slot", { key: 'c3c196c3e8f40acbb29f3fa89d1620e7beaad10c' })), this.footerElement ? (hAsync("slot", { name: "footer" })) : (hAsync("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? ButtonType.Submit : ButtonType.Button, onDialogCanceled: this.handleCancelButton, undismissable: this.undismissable }))))));
|
|
12533
12948
|
}
|
|
12534
12949
|
get el() { return getElement(this); }
|
|
12535
12950
|
static get watchers() { return {
|
|
@@ -12548,12 +12963,13 @@ class NvDialog {
|
|
|
12548
12963
|
"clickOutside": [516, "click-outside"],
|
|
12549
12964
|
"controlled": [516],
|
|
12550
12965
|
"full": [516],
|
|
12966
|
+
"autofocus": [516],
|
|
12551
12967
|
"show": [64],
|
|
12552
12968
|
"close": [64]
|
|
12553
12969
|
},
|
|
12554
12970
|
"$listeners$": [[4, "keydown", "handleKeyDown"], [4, "click", "handleDocumentClick"], [5, "touchstart", "handleDocumentTouch"]],
|
|
12555
12971
|
"$lazyBundleId$": "-",
|
|
12556
|
-
"$attrsToReflect$": [["open", "open"], ["undismissable", "undismissable"], ["clickOutside", "click-outside"], ["controlled", "controlled"], ["full", "full"]]
|
|
12972
|
+
"$attrsToReflect$": [["open", "open"], ["undismissable", "undismissable"], ["clickOutside", "click-outside"], ["controlled", "controlled"], ["full", "full"], ["autofocus", "autofocus"]]
|
|
12557
12973
|
}; }
|
|
12558
12974
|
}
|
|
12559
12975
|
|
|
@@ -12645,7 +13061,7 @@ class NvDialogfooter {
|
|
|
12645
13061
|
/****************************************************************************/
|
|
12646
13062
|
//#region RENDER
|
|
12647
13063
|
render() {
|
|
12648
|
-
return (hAsync(Host, { key: '
|
|
13064
|
+
return (hAsync(Host, { key: '278895398ddd9fd6aaf6da3d0cbcad12d628f908' }, !this.hasSlot ? (hAsync(Fragment, null, !this.undismissable && (hAsync("nv-button", { onClick: this.handleCancel, emphasis: "low", size: "sm" }, this.cancelLabel)), hAsync("nv-button", { onClick: this.handlePrimary, disabled: this.disabled, danger: this.danger, size: "sm", emphasis: "high", form: this.form, type: this.primaryButtonType }, this.leadingIcon && (hAsync("nv-icon", { slot: "leading-icon", name: this.leadingIcon, size: "sm" })), this.primaryLabel, this.trailingIcon && (hAsync("nv-icon", { slot: "trailing-icon", name: this.trailingIcon, size: "sm" }))))) : (hAsync("slot", null))));
|
|
12649
13065
|
}
|
|
12650
13066
|
static get formAssociated() { return true; }
|
|
12651
13067
|
get el() { return getElement(this); }
|
|
@@ -12701,7 +13117,7 @@ class NvDialogheader {
|
|
|
12701
13117
|
/****************************************************************************/
|
|
12702
13118
|
//#region RENDER
|
|
12703
13119
|
render() {
|
|
12704
|
-
return (hAsync(Host, { key: '
|
|
13120
|
+
return (hAsync(Host, { key: '2ace10c91041456a36909763b62a2adeede183c7' }, !this.hasSlot ? (hAsync(Fragment, null, hAsync("div", { class: "heading" }, this.heading), hAsync("div", { class: "subheading" }, this.subheading))) : (hAsync("slot", null))));
|
|
12705
13121
|
}
|
|
12706
13122
|
get el() { return getElement(this); }
|
|
12707
13123
|
static get style() { return NvDialogheaderStyle0; }
|
|
@@ -12722,6 +13138,8 @@ const nvFieldcheckboxCss = "nv-fieldcheckbox{--nv-fieldcheckbox-border-default:v
|
|
|
12722
13138
|
var NvFieldcheckboxStyle0 = nvFieldcheckboxCss;
|
|
12723
13139
|
|
|
12724
13140
|
/**
|
|
13141
|
+
* @slot default - Next to the label and description.
|
|
13142
|
+
* @slot main - Replaces the label and description.
|
|
12725
13143
|
* @slot label - Content to be placed as the label, will override the label prop.
|
|
12726
13144
|
* @slot description - Content to be placed as the description, will override the description prop.
|
|
12727
13145
|
* @slot error-description - Content to be placed as the error description, will override the errorDescription prop.
|
|
@@ -12838,13 +13256,13 @@ class NvFieldcheckbox {
|
|
|
12838
13256
|
/****************************************************************************/
|
|
12839
13257
|
//#region RENDER
|
|
12840
13258
|
render() {
|
|
12841
|
-
return (hAsync(Host, { key: '
|
|
13259
|
+
return (hAsync(Host, { key: '46e0688340e1cda23f1fdbefb349fbaa8bb188f2', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, hAsync("div", { key: '5769e3e61f69b7a9821864aab6338b13b46db4cc', class: "input-container" }, hAsync("input", { key: '0acc841c8583ca1d0781135b95a038703b3be516', type: "checkbox", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly && !this.required, required: this.required, indeterminate: this.indeterminate, ref: el => {
|
|
12842
13260
|
if (el) {
|
|
12843
13261
|
el.indeterminate = this.indeterminate;
|
|
12844
13262
|
}
|
|
12845
|
-
} }), hAsync("span", { key: '
|
|
12846
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
12847
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
13263
|
+
} }), hAsync("span", { key: 'a2bdc7fa16b4cb5e266c1666746f88b462ef6bbc', class: "icon" }, this.checked && !this.indeterminate && (hAsync("slot", { key: 'aa00b58bb2fb2132b4b355568bbecafbf14d9536', name: "checked-icon" }, hAsync("svg", { key: '3d7e92b03fc0ebc0676a5f5a011e0a5f16bb06d9', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, hAsync("path", { key: '28170c912acd9442af03c889afc10d348657a84b', d: "M11.6667 3.5L5.25004 9.91667L2.33337 7", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.indeterminate && (hAsync("slot", { key: '790eca10b1eea865ecde7be45c00ae3bbf65132b', name: "indeterminate-icon" }, hAsync("svg", { key: 'a00b2e00c2e2038dd1d67c43aef4f30e5d7a27e7', class: "indeterminate-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none" }, hAsync("path", { key: '6e7eb5f117a0244594392a52f932a91056093168', d: "M2.9165 7H11.0832", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), hAsync("slot", { key: '4c11bb2b8078adc0d7d5f3c52c2525bc836ad075' }), hAsync("div", { key: '323cab79ca6e047df5482d75490ba7288eef5e27', class: "text-container" }, hAsync("slot", { key: '5bc6845d98ee06117b97588e71467ce106e1ab60', name: "main" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'ce639cb27b8ea446f2a0d73a36c3c9541bde9ab8', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, hAsync("slot", { key: 'cd4b650b2f1b064b65211e90fdddff15b0d6f1f4', name: "label" }, this.label))), (this.description ||
|
|
13264
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '7de730e025d5eeae626bbe64125479dc9ebb4332', class: "description" }, hAsync("slot", { key: '2c2f6343838ffff29e1e920ae927d89e9a63f02e', name: "description" }, this.description)))), (this.errorDescription ||
|
|
13265
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'b49fd559c3bf84e814da0093f9af64e62510725d', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'b15a968201d8ef5ea5e764beac553cf8ca0b87d3', name: "error-description" }, this.errorDescription))))));
|
|
12848
13266
|
}
|
|
12849
13267
|
static get formAssociated() { return true; }
|
|
12850
13268
|
get el() { return getElement(this); }
|
|
@@ -16637,10 +17055,12 @@ var inputmask = {exports: {}};
|
|
|
16637
17055
|
|
|
16638
17056
|
var Inputmask = /*@__PURE__*/getDefaultExportFromCjs(inputmask.exports);
|
|
16639
17057
|
|
|
16640
|
-
const nvFielddateCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fielddate{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fielddate[fluid]:not([fluid=false]){max-width:unset}nv-fielddate[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fielddate[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fielddate[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fielddate[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fielddate label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fielddate nv-popover{width:100%;display:block}nv-fielddate nv-popover [data-scope=popover]{padding:0;background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:auto}nv-fielddate nv-popover [slot=content]{display:block;width:100%}nv-fielddate nv-popover .datepicker-container{border:none}nv-fielddate .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;display:flex;align-items:center;gap:8px}nv-fielddate .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fielddate .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddate .input-wrapper .input-container:focus-within,nv-fielddate .input-wrapper .input-container:focus-within:hover,nv-fielddate .input-wrapper .input-container:focus,nv-fielddate .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fielddate .input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fielddate .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddate .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;}nv-fielddate .input-wrapper .input-container input:focus{outline:none}nv-fielddate .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fielddate .input-wrapper .input-container input[type=password]::-ms-clear,nv-fielddate .input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fielddate .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fielddate .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fielddate .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fielddate .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fielddate .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
17058
|
+
const nvFielddateCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fielddate{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fielddate[fluid]:not([fluid=false]){max-width:unset}nv-fielddate[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fielddate[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fielddate[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fielddate[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fielddate label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fielddate nv-popover{width:100%;display:block}nv-fielddate nv-popover [data-scope=popover]{padding:0;background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:auto}nv-fielddate nv-popover [slot=content]{display:block;width:100%}nv-fielddate nv-popover .datepicker-container{border:none}nv-fielddate .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;display:flex;align-items:center;gap:8px}nv-fielddate .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fielddate .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddate .input-wrapper .input-container:focus-within,nv-fielddate .input-wrapper .input-container:focus-within:hover,nv-fielddate .input-wrapper .input-container:focus,nv-fielddate .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fielddate .input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fielddate .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddate .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;font-feature-settings:\"tnum\";font-family:\"TTNorms Pro Mono\", monospace}nv-fielddate .input-wrapper .input-container input:focus{outline:none}nv-fielddate .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fielddate .input-wrapper .input-container input[type=password]::-ms-clear,nv-fielddate .input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fielddate .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fielddate .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fielddate .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fielddate .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fielddate .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
16641
17059
|
var NvFielddateStyle0 = nvFielddateCss;
|
|
16642
17060
|
|
|
16643
17061
|
/**
|
|
17062
|
+
* A field date component that combines an input with a calendar popover.
|
|
17063
|
+
*
|
|
16644
17064
|
* @slot default - Child content of the component.
|
|
16645
17065
|
* @slot leading-input - Content to be placed before the input text, within the input container.
|
|
16646
17066
|
* @slot before-input - Content to be placed before the input text, outside the input container.
|
|
@@ -16764,10 +17184,7 @@ class NvFielddate {
|
|
|
16764
17184
|
this.inputElement.focus();
|
|
16765
17185
|
// Select the first characters based on the date format
|
|
16766
17186
|
const format = this.dateFormat;
|
|
16767
|
-
if (format.startsWith('DD')) {
|
|
16768
|
-
this.inputElement.setSelectionRange(0, 2);
|
|
16769
|
-
}
|
|
16770
|
-
else if (format.startsWith('MM')) {
|
|
17187
|
+
if (format.startsWith('DD') || format.startsWith('MM')) {
|
|
16771
17188
|
this.inputElement.setSelectionRange(0, 2);
|
|
16772
17189
|
}
|
|
16773
17190
|
else if (format.startsWith('YYYY')) {
|
|
@@ -16794,13 +17211,66 @@ class NvFielddate {
|
|
|
16794
17211
|
}
|
|
16795
17212
|
};
|
|
16796
17213
|
/**
|
|
16797
|
-
*
|
|
17214
|
+
* Initializes the input mask.
|
|
16798
17215
|
*/
|
|
16799
|
-
this.
|
|
16800
|
-
|
|
17216
|
+
this.initializeInputMask = () => {
|
|
17217
|
+
this.currentPlaceholder = '';
|
|
17218
|
+
if (this.inputElement.inputmask) {
|
|
16801
17219
|
return;
|
|
16802
17220
|
}
|
|
16803
|
-
|
|
17221
|
+
const inputMask = new Inputmask({
|
|
17222
|
+
alias: 'datetime',
|
|
17223
|
+
inputFormat: this.convertToInputmaskFormat(this.dateFormat),
|
|
17224
|
+
placeholder: ' ',
|
|
17225
|
+
prefillYear: false,
|
|
17226
|
+
clearIncomplete: false,
|
|
17227
|
+
showMaskOnHover: false,
|
|
17228
|
+
showMaskOnFocus: false,
|
|
17229
|
+
clearMaskOnLostFocus: false,
|
|
17230
|
+
insertMode: true,
|
|
17231
|
+
rightAlign: false,
|
|
17232
|
+
oncomplete: function (e) {
|
|
17233
|
+
const input = e.target;
|
|
17234
|
+
const event = new CustomEvent('input', { bubbles: true });
|
|
17235
|
+
input.dispatchEvent(event);
|
|
17236
|
+
},
|
|
17237
|
+
});
|
|
17238
|
+
inputMask.mask(this.inputElement);
|
|
17239
|
+
// Set the value after applying the mask
|
|
17240
|
+
if (this.inputElement.name === this.name && this.singleValue) {
|
|
17241
|
+
requestAnimationFrame(() => {
|
|
17242
|
+
this.inputElement.value = this.singleValue;
|
|
17243
|
+
const event = new CustomEvent('input', { bubbles: true });
|
|
17244
|
+
this.inputElement.dispatchEvent(event);
|
|
17245
|
+
});
|
|
17246
|
+
}
|
|
17247
|
+
};
|
|
17248
|
+
/**
|
|
17249
|
+
* Handles keydown events on the input before the mask is initialized.
|
|
17250
|
+
* Initializes the mask on the first number input.
|
|
17251
|
+
* @param {KeyboardEvent} event - The keyboard event.
|
|
17252
|
+
*/
|
|
17253
|
+
this.handleKeydownBeforeMask = (event) => {
|
|
17254
|
+
const allowedKeys = [
|
|
17255
|
+
'Backspace',
|
|
17256
|
+
'Delete',
|
|
17257
|
+
'Tab',
|
|
17258
|
+
'ArrowLeft',
|
|
17259
|
+
'ArrowRight',
|
|
17260
|
+
'ArrowUp',
|
|
17261
|
+
'ArrowDown',
|
|
17262
|
+
'Home',
|
|
17263
|
+
'End',
|
|
17264
|
+
];
|
|
17265
|
+
if (/\d/.test(event.key)) {
|
|
17266
|
+
this.initializeInputMask();
|
|
17267
|
+
this.inputElement.removeEventListener('keydown', this.handleKeydownBeforeMask);
|
|
17268
|
+
}
|
|
17269
|
+
else if (!allowedKeys.includes(event.key) &&
|
|
17270
|
+
!event.metaKey &&
|
|
17271
|
+
!event.ctrlKey) {
|
|
17272
|
+
event.preventDefault();
|
|
17273
|
+
}
|
|
16804
17274
|
};
|
|
16805
17275
|
/**
|
|
16806
17276
|
* Handles focus events on the input element.
|
|
@@ -16812,6 +17282,16 @@ class NvFielddate {
|
|
|
16812
17282
|
event.target.blur();
|
|
16813
17283
|
return;
|
|
16814
17284
|
}
|
|
17285
|
+
if (!this.inputElement.inputmask) {
|
|
17286
|
+
this.inputElement.addEventListener('keydown', this.handleKeydownBeforeMask);
|
|
17287
|
+
}
|
|
17288
|
+
this.open = true;
|
|
17289
|
+
};
|
|
17290
|
+
/**
|
|
17291
|
+
* Handles blur events on the input element.
|
|
17292
|
+
*/
|
|
17293
|
+
this.handleBlur = () => {
|
|
17294
|
+
this.inputElement.removeEventListener('keydown', this.handleKeydownBeforeMask);
|
|
16815
17295
|
};
|
|
16816
17296
|
/**
|
|
16817
17297
|
* Prevents the valueChanged event from the calendar from propagating up.
|
|
@@ -16834,6 +17314,15 @@ class NvFielddate {
|
|
|
16834
17314
|
this.setInputRef = (el) => {
|
|
16835
17315
|
this.inputElement = el;
|
|
16836
17316
|
};
|
|
17317
|
+
/**
|
|
17318
|
+
* Toggles the opening/closing of the popover.
|
|
17319
|
+
*/
|
|
17320
|
+
this.toggleCalendar = () => {
|
|
17321
|
+
if (this.readonly || this.disabled) {
|
|
17322
|
+
return;
|
|
17323
|
+
}
|
|
17324
|
+
this.open = !this.open;
|
|
17325
|
+
};
|
|
16837
17326
|
}
|
|
16838
17327
|
//#endregion PROPERTIES
|
|
16839
17328
|
/****************************************************************************/
|
|
@@ -16844,20 +17333,39 @@ class NvFielddate {
|
|
|
16844
17333
|
* @returns {string} Format adapted for Inputmask.
|
|
16845
17334
|
*/
|
|
16846
17335
|
convertToInputmaskFormat(format) {
|
|
16847
|
-
|
|
16848
|
-
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
|
|
16853
|
-
|
|
16854
|
-
|
|
16855
|
-
|
|
16856
|
-
|
|
16857
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
17336
|
+
// If the format is not specified, use the default format
|
|
17337
|
+
if (!format) {
|
|
17338
|
+
return 'dd/mm/yyyy';
|
|
17339
|
+
}
|
|
17340
|
+
const formatMap = {
|
|
17341
|
+
'DD/MM/YYYY': 'dd/mm/yyyy',
|
|
17342
|
+
'MM/DD/YYYY': 'mm/dd/yyyy',
|
|
17343
|
+
'YYYY-MM-DD': 'yyyy-mm-dd',
|
|
17344
|
+
'DD.MM.YYYY': 'dd.mm.yyyy',
|
|
17345
|
+
'YYYYMMDD': 'yyyymmdd',
|
|
17346
|
+
};
|
|
17347
|
+
return formatMap[format] || 'dd/mm/yyyy';
|
|
17348
|
+
}
|
|
17349
|
+
/**
|
|
17350
|
+
* Clears the current selection and resets the field to its initial state.
|
|
17351
|
+
* This method can be called programmatically to reset the field.
|
|
17352
|
+
*/
|
|
17353
|
+
async clear() {
|
|
17354
|
+
// Reset internal state
|
|
17355
|
+
this.singleValue = '';
|
|
17356
|
+
this.value = '';
|
|
17357
|
+
// Reset the input element value
|
|
17358
|
+
if (this.inputElement) {
|
|
17359
|
+
this.inputElement.value = '';
|
|
17360
|
+
// Remove the input mask and reinitialize if needed
|
|
17361
|
+
if (this.inputElement.inputmask) {
|
|
17362
|
+
this.inputElement.inputmask.remove();
|
|
17363
|
+
}
|
|
16860
17364
|
}
|
|
17365
|
+
// Emit events to notify about the change
|
|
17366
|
+
this.valueChanged.emit('');
|
|
17367
|
+
// Close the popover if open
|
|
17368
|
+
this.open = false;
|
|
16861
17369
|
}
|
|
16862
17370
|
//#endregion METHODS
|
|
16863
17371
|
/****************************************************************************/
|
|
@@ -16869,19 +17377,17 @@ class NvFielddate {
|
|
|
16869
17377
|
if (this.value) {
|
|
16870
17378
|
this.singleValue = this.value;
|
|
16871
17379
|
}
|
|
17380
|
+
this.currentPlaceholder = this.placeholder || this.dateFormat;
|
|
16872
17381
|
}
|
|
16873
17382
|
componentDidLoad() {
|
|
16874
|
-
|
|
16875
|
-
inputs.forEach((input) => {
|
|
16876
|
-
Inputmask({
|
|
16877
|
-
alias: 'datetime',
|
|
16878
|
-
inputFormat: this.convertToInputmaskFormat(this.dateFormat),
|
|
16879
|
-
placeholder: '_'.repeat(this.dateFormat.length),
|
|
16880
|
-
}).mask(input);
|
|
16881
|
-
});
|
|
17383
|
+
// Inputmask is now initialized on the first keypress
|
|
16882
17384
|
}
|
|
16883
17385
|
disconnectedCallback() {
|
|
16884
17386
|
document.removeEventListener('click', this.handleClickOutside);
|
|
17387
|
+
if (this.inputElement &&
|
|
17388
|
+
this.inputElement.inputmask) {
|
|
17389
|
+
this.inputElement.inputmask.remove();
|
|
17390
|
+
}
|
|
16885
17391
|
}
|
|
16886
17392
|
/**
|
|
16887
17393
|
* Handles the single date selection event from nv-calendar.
|
|
@@ -16926,12 +17432,12 @@ class NvFielddate {
|
|
|
16926
17432
|
/****************************************************************************/
|
|
16927
17433
|
//#region RENDER
|
|
16928
17434
|
render() {
|
|
16929
|
-
return (hAsync(Host, { key: '
|
|
16930
|
-
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '
|
|
17435
|
+
return (hAsync(Host, { key: '45af13d8290479c8ec171c0702d9d695c5047610' }, ((this.label && this.label.length > 0) ||
|
|
17436
|
+
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'd30403c879f8ca0449d8d25d22bb401ece876758', htmlFor: this.inputId }, hAsync("slot", { key: 'aec155a914cff6b7ea8170dbd1f0d9ee4f35172e', name: "label" }, this.label))), hAsync("nv-popover", { key: '522969535f2b8340f1a9b425c4ea6291fc65cb7e', ref: this.setPopoverRef, id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: 'eb1d5ab314fe654b3642afb22d9e3fbc340de969', slot: "trigger", class: "input-wrapper" }, hAsync("slot", { key: '6c28354e914075c36db9bee659d140669a745cab', name: "before-input" }), hAsync("div", { key: '68d3aa4a8afcec4042a8930678cea7046f3e31d7', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: 'ed7ada6913a6735af622369236b5f521f2e96aad', name: "leading-input" }), hAsync("input", { key: '49607b25253233665544e8e85db3814734280fe0', id: this.inputId, ref: this.setInputRef, placeholder: this.currentPlaceholder, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.singleValue, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, "data-scope": "date" }), this.error && (hAsync("nv-icon", { key: '35d06926d78f7c653fbf0424b59802fb4489004a', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '17ca631dca201fb412c921619223c1abc8777d2b', name: "circle-check", class: "validation", size: "md" })), hAsync("nv-iconbutton", { key: 'e08d735115cde3d22a657b986f4a7a5a0347d1af', class: "toggle-calendar-icon", name: "calendar" //{this.open ? 'chevron-top' : 'chevron-down'}
|
|
16931
17437
|
,
|
|
16932
|
-
size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', "aria-pressed": this.open.toString(), onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), hAsync("slot", { key: '
|
|
16933
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
16934
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
17438
|
+
size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', "aria-pressed": this.open.toString(), onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), hAsync("slot", { key: '75cf593c7b9f2078f055522d6e43440dbe0cc522', name: "after-input" })), hAsync("div", { key: '0df8cd2360a17f5cc786e6b29c67ded308c18104', slot: "content" }, hAsync("nv-calendar", { key: '045a02370ef9dfe31ae3d0b2f702fafb25c7da8f', dateFormat: this.dateFormat, singleValue: this.singleValue, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, onValueChanged: this.handleCalendarValueChanged }))), ((this.description && this.description.length > 0) ||
|
|
17439
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'ecedbfe16857d9976349f3f3875be13f9ffc4b53', class: "description" }, hAsync("slot", { key: 'e848d9e03e169c9ac57ce2fb7cdb00466f658c61', name: "description" }, this.description))), (this.errorDescription ||
|
|
17440
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '028b4d496ba3ee5eefa0107da8a62c771709a3ed', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (hAsync("slot", { name: "error-description" })) : (this.errorDescription))), hAsync("slot", { key: 'd3b79a0ae56ec7eb444c28985b1ffcfd8a4e36a1' })));
|
|
16935
17441
|
}
|
|
16936
17442
|
get el() { return getElement(this); }
|
|
16937
17443
|
static get watchers() { return {
|
|
@@ -16968,7 +17474,9 @@ class NvFielddate {
|
|
|
16968
17474
|
"disabledDates": [16],
|
|
16969
17475
|
"fluid": [516],
|
|
16970
17476
|
"singleValue": [32],
|
|
16971
|
-
"
|
|
17477
|
+
"currentPlaceholder": [32],
|
|
17478
|
+
"open": [32],
|
|
17479
|
+
"clear": [64]
|
|
16972
17480
|
},
|
|
16973
17481
|
"$listeners$": [[0, "singleDateChange", "handleSingleDateChange"], [0, "closePopover", "handleClosePopover"], [0, "keydown", "handleKeyDown"]],
|
|
16974
17482
|
"$lazyBundleId$": "-",
|
|
@@ -17237,6 +17745,34 @@ class NvFielddaterange {
|
|
|
17237
17745
|
*/
|
|
17238
17746
|
updateCalendarValue() {
|
|
17239
17747
|
}
|
|
17748
|
+
/**
|
|
17749
|
+
* Clears the current selection and resets the date range field to its initial state.
|
|
17750
|
+
* This method can be called programmatically to reset the field.
|
|
17751
|
+
*/
|
|
17752
|
+
async clear() {
|
|
17753
|
+
// Reset internal state
|
|
17754
|
+
this.startValue = '';
|
|
17755
|
+
this.endValue = '';
|
|
17756
|
+
this.value = '';
|
|
17757
|
+
// Reset both input elements
|
|
17758
|
+
const inputs = this.el.querySelectorAll('.input-wrapper input');
|
|
17759
|
+
inputs.forEach((input) => {
|
|
17760
|
+
input.value = '';
|
|
17761
|
+
// Remove input mask if exists
|
|
17762
|
+
if (input.inputmask) {
|
|
17763
|
+
input.inputmask.remove();
|
|
17764
|
+
}
|
|
17765
|
+
});
|
|
17766
|
+
// Emit events to notify about the change
|
|
17767
|
+
this.valueChanged.emit('');
|
|
17768
|
+
this.dateRangeChange.emit({ start: '', end: '' });
|
|
17769
|
+
// Close the popover if open
|
|
17770
|
+
this.open = false;
|
|
17771
|
+
// Clear the calendar if it exists
|
|
17772
|
+
if (this.calendarElement) {
|
|
17773
|
+
this.calendarElement.clear();
|
|
17774
|
+
}
|
|
17775
|
+
}
|
|
17240
17776
|
//#endregion METHODS
|
|
17241
17777
|
/****************************************************************************/
|
|
17242
17778
|
//#region LIFECYCLE
|
|
@@ -17425,10 +17961,10 @@ class NvFielddaterange {
|
|
|
17425
17961
|
/****************************************************************************/
|
|
17426
17962
|
//#region RENDER
|
|
17427
17963
|
render() {
|
|
17428
|
-
return (hAsync(Host, { key: '
|
|
17429
|
-
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '
|
|
17430
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
17431
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
17964
|
+
return (hAsync(Host, { key: 'e2d5ce2c864dbc8ba478a1ce1353aa8e51e13ec1' }, ((this.label && this.label.length > 0) ||
|
|
17965
|
+
this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '6e171200b763f8e7a907d305475bb7d4faa27979', htmlFor: this.startInputId }, hAsync("slot", { key: '9f8b94e7491d4cd73e17f41ba290acda1fe73f3b', name: "label" }, this.label))), hAsync("nv-popover", { key: '9bf5539eeceadb960c3438ddc05fe986f800d33b', ref: el => (this.popoverElement = el), id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: '58f7625d27c2266429ddc4f653d61efefed5bc66', slot: "trigger", class: "input-wrapper" }, hAsync("slot", { key: '206064a5c1be74082202849b96e46a8207377098', name: "before-input" }), hAsync("div", { key: 'bd66fb676a5a749e17ede3f75c8a4404586c0c63', class: "input-container" }, hAsync("slot", { key: '7c78a037f5189143ea32ca843e1c27b52d8f2d4b', name: "leading-input" }), hAsync("div", { key: 'fbe89bc4502eca56e05029d65a45684484921433', class: "range-inputs" }, hAsync("input", { key: '397e572e87dd7f01977008b44847469cabd06494', id: this.startInputId, type: "text", placeholder: this.startPlaceholder, name: this.startName, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus, "data-scope": "date-range" }), hAsync("div", { key: '378d2755919eafc9f4edd8ee451c01e49dc70cfe', class: "range-separator" }), hAsync("input", { key: '2de8dcda3161667a543c04ae529a0f617f6598c6', id: this.endInputId, type: "text", placeholder: this.endPlaceholder, name: this.endName, disabled: this.disabled, readOnly: this.readonly, required: this.required, value: this.endValue, onInput: this.handleEndInput, onFocus: this.handleFocus, "data-scope": "date-range" })), this.error && (hAsync("nv-icon", { key: '5880e135764a7f9f87d92a4f7a84eba9f56b7d46', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '5d764360d3dbfc306962cb9e4b67d7d3c4bc09ed', name: "circle-check", class: "validation", size: "md" })), hAsync("nv-iconbutton", { key: '1b09d57633f8e115cc3d92a82d35399c53be265b', class: "toggle-calendar-icon", name: "calendar", size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', "aria-pressed": this.open.toString(), onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), hAsync("slot", { key: '7ec41f782b0343eeb427bee4d7f2ab1b549978b3', name: "after-input" })), hAsync("div", { key: 'ea714333fe596af8a10c6f8a1e6c72935f8e5c91', slot: "content" }, hAsync("nv-calendar", { key: 'ffaa70c5bc76c422396b233d3dc46fdeb2d06b10', ref: el => (this.calendarElement = el), dateFormat: this.dateFormat, value: this.value, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, selectionType: "range", "data-prevent-navigation": "true" }))), ((this.description && this.description.length > 0) ||
|
|
17966
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '7f4aa271c896234907d95cfe7660e1c41ab8ddf7', class: "description" }, hAsync("slot", { key: 'fce93594f7af4d054f886ce3caf48cfffb6809aa', name: "description" }, this.description))), (this.errorDescription ||
|
|
17967
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'f5a19b5d4c90c4319dc4eb09d1067f202ab229c9', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (hAsync("slot", { name: "error-description" })) : (this.errorDescription))), hAsync("slot", { key: '1d494e4c192b38c26e8cfe5482516382cacc13c6' })));
|
|
17432
17968
|
}
|
|
17433
17969
|
get el() { return getElement(this); }
|
|
17434
17970
|
static get watchers() { return {
|
|
@@ -17470,7 +18006,8 @@ class NvFielddaterange {
|
|
|
17470
18006
|
"fluid": [516],
|
|
17471
18007
|
"startValue": [32],
|
|
17472
18008
|
"endValue": [32],
|
|
17473
|
-
"open": [32]
|
|
18009
|
+
"open": [32],
|
|
18010
|
+
"clear": [64]
|
|
17474
18011
|
},
|
|
17475
18012
|
"$listeners$": [[0, "rangeDateChange", "handleRangeDateChange"], [0, "valueChanged", "handleCalendarValueChanged"], [0, "closePopover", "handleClosePopover"], [0, "applyDateRange", "handleApplyDateRange"], [0, "singleDateChange", "handleDateReset"], [0, "rangeDateChange", "handleDateReset"], [0, "keydown", "handleKeyDown"]],
|
|
17476
18013
|
"$lazyBundleId$": "-",
|
|
@@ -17839,9 +18376,9 @@ class NvFielddropdown {
|
|
|
17839
18376
|
//#region RENDER
|
|
17840
18377
|
render() {
|
|
17841
18378
|
var _a;
|
|
17842
|
-
return (hAsync(Host, { key: '
|
|
17843
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
17844
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
18379
|
+
return (hAsync(Host, { key: '39025d9624475fa633e36c3ba44feed7f34f42e1', role: "combobox", "aria-expanded": this.open.toString(), "aria-haspopup": "listbox", "aria-label": this.label }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '961a78a526a81e7fb0a219f1e46d6126880993db', htmlFor: this.inputId }, hAsync("slot", { key: '9d6b7d6fa1cc80393f0e85819a437e8193bdf672', name: "label" }, this.label))), hAsync("nv-popover", { key: '564fcf5fa2f263874b737fdf1bcc5a9aa9bc21d3', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: '415ed0ee145ce9253380baed4a026afa018c59b7', class: "input-wrapper", slot: "trigger" }, hAsync("slot", { key: 'ddbece3ddfa0bcd16a8587c4ee693f8c44b69356', name: "before-input" }), hAsync("div", { key: '546fbc02d2051f47aea2a369ae479658c3c1d8dc', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '95bb574eeb43285f73fd731581d1426095f7538a', name: "leading-input" }), this.filterable || this.disabled || this.readonly ? (hAsync("input", { "data-scope": "focusable", id: this.inputId, type: "search", ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.getSelectedLabel(), required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput, onFocus: this.handleInputFocus, onClick: this.handleInputFocus, onKeyDown: this.handleKeyDown })) : (hAsync("p", { "data-scope": "focusable", id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClick, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocus }, this.getSelectedLabel() || this.value || this.placeholder)), this.filterable && this.filterText && this.open && (hAsync("nv-iconbutton", { key: '669c6b2e93a85789e747e3f384dfd7b940cda9a7', name: "x", size: "md", emphasis: "lower", class: "clear-button", onClick: this.clearFilter, "aria-label": "Clear input" })), this.error && (hAsync("nv-icon", { key: '65f91d73115249ded5344e78f18ed7c37f8265b9', name: "alert-circle", class: "validation", size: "md" })), hAsync("nv-iconbutton", { key: '05644dcc1dfdbb0aa625b49484fab299b5b58894', "data-scope": "toggle-dropdown", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', "aria-pressed": this.open.toString(), onClick: this.togglePopover, tabIndex: this.disabled ? -1 : 0 })), hAsync("slot", { key: 'd84d1936300877825adc9c61cc7d9ba773b92194', name: "after-input" })), hAsync("div", { key: 'de5e6bb6f3b40fed39cf90d046e8361dcb2a4d8f', slot: "content", style: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (hAsync("ul", null, this.options.map(option => (hAsync("nv-fielddropdownitem", { label: option.label, value: option.value, disabled: option.disabled, selected: option.value === this.value }))))) : (hAsync("slot", { name: "content" })))), (this.description ||
|
|
18380
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '648b7fb9b7dade22d763f9afc468a4b48115a1a0', class: "description" }, hAsync("slot", { key: 'b560fb630a56c3d42363c1b8f0fa494faefd00d6', name: "description" }, this.description))), (this.errorDescription ||
|
|
18381
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'bcb614617bb1183f33d20d51304d8ff17d9c7381', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '5345cb01032f24b0527bf22d77116a77bb439969', name: "error-description" }, this.errorDescription)))));
|
|
17845
18382
|
}
|
|
17846
18383
|
static get formAssociated() { return true; }
|
|
17847
18384
|
get el() { return getElement(this); }
|
|
@@ -17943,7 +18480,7 @@ class NvFielddropdownitem {
|
|
|
17943
18480
|
/****************************************************************************/
|
|
17944
18481
|
//#region RENDER
|
|
17945
18482
|
render() {
|
|
17946
|
-
return (hAsync(Host, { key: '
|
|
18483
|
+
return (hAsync(Host, { key: '486800fafd79ee133a459521e84b06c538f5585e', role: "menuitem", tabindex: '-1', onClick: this.handleSelected }, hAsync("slot", { key: 'fd9c5c5aad8c585735ddbcaf0cb98ab26d89ec69' }), !this.composed && (hAsync("div", { key: '145a6e02b2338f47235c3616a1af63bf5b0ea465', class: "text-wrapper" }, hAsync("span", { key: 'bc013eaf7fe0d56c1d609c3fce846f25ef2cfbb3', "data-scope": "text" }, this.label))), this.selected && (hAsync("nv-icon", { key: 'f7f6a4b2b27753d54eb92a77364329a29a3d6f08', name: "check", "aria-hidden": "true", "data-scope": "selected" }))));
|
|
17947
18484
|
}
|
|
17948
18485
|
get el() { return getElement(this); }
|
|
17949
18486
|
static get style() { return NvFielddropdownitemStyle0; }
|
|
@@ -17965,6 +18502,12 @@ class NvFielddropdownitem {
|
|
|
17965
18502
|
const nvFielddropdownitemcheckCss = "nv-fielddropdownitemcheck{cursor:pointer;display:flex;padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);border-radius:var(--list-dropdown-item-radius)}nv-fielddropdownitemcheck slot-fb,nv-fielddropdownitemcheck span{all:unset}nv-fielddropdownitemcheck:hover{background-color:var(--components-list-dropdown-item-background-hover)}";
|
|
17966
18503
|
var NvFielddropdownitemcheckStyle0 = nvFielddropdownitemcheckCss;
|
|
17967
18504
|
|
|
18505
|
+
/**
|
|
18506
|
+
* @slot default - Next to the label and description.
|
|
18507
|
+
* @slot main - Replaces the label and description.
|
|
18508
|
+
* @slot label - Content to be placed as the label, will override the label prop.
|
|
18509
|
+
* @slot description - Content to be placed as the description, will override the description prop.
|
|
18510
|
+
*/
|
|
17968
18511
|
class NvFielddropdownitemcheck {
|
|
17969
18512
|
constructor(hostRef) {
|
|
17970
18513
|
registerInstance(this, hostRef);
|
|
@@ -18008,12 +18551,12 @@ class NvFielddropdownitemcheck {
|
|
|
18008
18551
|
};
|
|
18009
18552
|
}
|
|
18010
18553
|
render() {
|
|
18011
|
-
return (hAsync(Host, { key: '
|
|
18554
|
+
return (hAsync(Host, { key: '82abe79dd061f60e380f033027f799121769f89e', onClick: this.handleClick }, hAsync("nv-fieldcheckbox", { key: '505181c56faacb09e55c428d91287d96e1c3b72a', checked: this.checked, name: this.label || this.value, label: this.label || this.value, "label-placement": "after", description: this.description, disabled: this.disabled, tabindex: "-1", role: "option", onCheckedChanged: this.onFieldcheckboxChanged }, hAsync("slot", { key: '95a53b7d4ec735fd3256505b57e2a497b475f511' }), hAsync("slot", { key: '137d5e2b3046417bbc90c0bd2dd10b846d1dfd53', name: "main" }), hAsync("slot", { key: '47d4a73e401186b7bc7a18aaad82018f0ccc1e2f', name: "label" }), hAsync("slot", { key: 'ff5c752d386c282635a97ad2bcb8858571aff7e9', name: "description" }))));
|
|
18012
18555
|
}
|
|
18013
18556
|
get el() { return getElement(this); }
|
|
18014
18557
|
static get style() { return NvFielddropdownitemcheckStyle0; }
|
|
18015
18558
|
static get cmpMeta() { return {
|
|
18016
|
-
"$flags$":
|
|
18559
|
+
"$flags$": 4,
|
|
18017
18560
|
"$tagName$": "nv-fielddropdownitemcheck",
|
|
18018
18561
|
"$members$": {
|
|
18019
18562
|
"checked": [1540],
|
|
@@ -18045,7 +18588,7 @@ class NvFieldmultiselect {
|
|
|
18045
18588
|
constructor(hostRef) {
|
|
18046
18589
|
registerInstance(this, hostRef);
|
|
18047
18590
|
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
18048
|
-
this.
|
|
18591
|
+
this.filterTextChanged = createEvent(this, "filterTextChanged", 7);
|
|
18049
18592
|
/****************************************************************************/
|
|
18050
18593
|
//#region PROPERTIES
|
|
18051
18594
|
/**
|
|
@@ -18062,6 +18605,11 @@ class NvFieldmultiselect {
|
|
|
18062
18605
|
* always type in fresh data.
|
|
18063
18606
|
*/
|
|
18064
18607
|
this.autocomplete = 'off';
|
|
18608
|
+
/**
|
|
18609
|
+
* Specifies the selected values of the multiselect field.
|
|
18610
|
+
* This is the canonical value for the component and is used for form submission.
|
|
18611
|
+
*/
|
|
18612
|
+
this.value = [];
|
|
18065
18613
|
/**
|
|
18066
18614
|
* Marks the input field as required.
|
|
18067
18615
|
*/
|
|
@@ -18115,17 +18663,13 @@ class NvFieldmultiselect {
|
|
|
18115
18663
|
* Text for the badge showing the number of selected items.
|
|
18116
18664
|
*/
|
|
18117
18665
|
this.badgeLabel = '';
|
|
18118
|
-
//#endregion PROPERTIES
|
|
18119
|
-
/****************************************************************************/
|
|
18120
|
-
//#region STATE
|
|
18121
18666
|
/**
|
|
18122
18667
|
* The text entered by the user for filtering multiselect items.
|
|
18123
18668
|
*/
|
|
18124
18669
|
this.filterText = '';
|
|
18125
|
-
|
|
18126
|
-
|
|
18127
|
-
|
|
18128
|
-
this.selectedValues = [];
|
|
18670
|
+
//#endregion PROPERTIES
|
|
18671
|
+
/****************************************************************************/
|
|
18672
|
+
//#region STATE
|
|
18129
18673
|
/**
|
|
18130
18674
|
* Sorted options for display.
|
|
18131
18675
|
*/
|
|
@@ -18135,8 +18679,8 @@ class NvFieldmultiselect {
|
|
|
18135
18679
|
* Handle badge close for options mode.
|
|
18136
18680
|
*/
|
|
18137
18681
|
this.handleBadgeCloseOptions = () => {
|
|
18138
|
-
this.
|
|
18139
|
-
this.
|
|
18682
|
+
this.value = [];
|
|
18683
|
+
this.valueChanged.emit(this.value);
|
|
18140
18684
|
// Uncheck all elements
|
|
18141
18685
|
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
18142
18686
|
items.forEach(item => {
|
|
@@ -18152,8 +18696,8 @@ class NvFieldmultiselect {
|
|
|
18152
18696
|
* Handle badge close for slots mode.
|
|
18153
18697
|
*/
|
|
18154
18698
|
this.handleBadgeCloseSlots = () => {
|
|
18155
|
-
this.
|
|
18156
|
-
this.
|
|
18699
|
+
this.value = [];
|
|
18700
|
+
this.valueChanged.emit(this.value);
|
|
18157
18701
|
// Uncheck all elements
|
|
18158
18702
|
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
18159
18703
|
items.forEach(item => {
|
|
@@ -18171,12 +18715,19 @@ class NvFieldmultiselect {
|
|
|
18171
18715
|
if (this.isHandlingEscape) {
|
|
18172
18716
|
return;
|
|
18173
18717
|
}
|
|
18174
|
-
|
|
18175
|
-
// Reset filter if needed
|
|
18718
|
+
// Reset filter if needed, but preserve the filter text
|
|
18176
18719
|
if (this.filterable) {
|
|
18177
18720
|
this.resetFilter();
|
|
18178
18721
|
}
|
|
18179
18722
|
};
|
|
18723
|
+
/**
|
|
18724
|
+
* Clear the filter text
|
|
18725
|
+
*/
|
|
18726
|
+
this.clearFilterText = () => {
|
|
18727
|
+
this.filterText = '';
|
|
18728
|
+
this.filterTextChanged.emit('');
|
|
18729
|
+
this.resetFilter();
|
|
18730
|
+
};
|
|
18180
18731
|
/**
|
|
18181
18732
|
* Handle input blur for options mode.
|
|
18182
18733
|
*/
|
|
@@ -18185,10 +18736,9 @@ class NvFieldmultiselect {
|
|
|
18185
18736
|
if (!this.el.contains(document.activeElement)) {
|
|
18186
18737
|
// Close the popover without affecting the divider
|
|
18187
18738
|
this.open = false;
|
|
18188
|
-
//
|
|
18739
|
+
// Clear filter text when focus is lost
|
|
18189
18740
|
if (this.filterable) {
|
|
18190
|
-
this.
|
|
18191
|
-
this.resetFilter();
|
|
18741
|
+
this.clearFilterText();
|
|
18192
18742
|
}
|
|
18193
18743
|
}
|
|
18194
18744
|
}, 150);
|
|
@@ -18246,15 +18796,14 @@ class NvFieldmultiselect {
|
|
|
18246
18796
|
return;
|
|
18247
18797
|
}
|
|
18248
18798
|
const input = event.target;
|
|
18249
|
-
this.
|
|
18250
|
-
this.
|
|
18799
|
+
this.filterText = input.value;
|
|
18800
|
+
this.filterTextChanged.emit(this.filterText);
|
|
18251
18801
|
// Clear any existing timer
|
|
18252
18802
|
if (this.debounceTimer) {
|
|
18253
18803
|
window.clearTimeout(this.debounceTimer);
|
|
18254
18804
|
}
|
|
18255
18805
|
// Set a new timer for filtering
|
|
18256
18806
|
this.debounceTimer = window.setTimeout(() => {
|
|
18257
|
-
this.filterText = input.value.toLowerCase();
|
|
18258
18807
|
this.filterItemsOption();
|
|
18259
18808
|
}, this.debounceDelay);
|
|
18260
18809
|
};
|
|
@@ -18268,15 +18817,14 @@ class NvFieldmultiselect {
|
|
|
18268
18817
|
if (this.disabled || this.readonly)
|
|
18269
18818
|
return;
|
|
18270
18819
|
const input = event.target;
|
|
18271
|
-
this.
|
|
18272
|
-
this.
|
|
18820
|
+
this.filterText = input.value;
|
|
18821
|
+
this.filterTextChanged.emit(this.filterText);
|
|
18273
18822
|
// Clear any existing timer
|
|
18274
18823
|
if (this.debounceTimer) {
|
|
18275
18824
|
window.clearTimeout(this.debounceTimer);
|
|
18276
18825
|
}
|
|
18277
18826
|
// Set a new timer for filtering
|
|
18278
18827
|
this.debounceTimer = window.setTimeout(() => {
|
|
18279
|
-
this.filterText = input.value.toLowerCase();
|
|
18280
18828
|
this.filterSlotsItems();
|
|
18281
18829
|
}, this.debounceDelay);
|
|
18282
18830
|
};
|
|
@@ -18306,10 +18854,9 @@ class NvFieldmultiselect {
|
|
|
18306
18854
|
if (!this.el.contains(document.activeElement)) {
|
|
18307
18855
|
// Close the popover without affecting the divider
|
|
18308
18856
|
this.open = false;
|
|
18309
|
-
//
|
|
18857
|
+
// Clear filter text when focus is lost
|
|
18310
18858
|
if (this.filterable) {
|
|
18311
|
-
this.
|
|
18312
|
-
this.resetFilter();
|
|
18859
|
+
this.clearFilterText();
|
|
18313
18860
|
}
|
|
18314
18861
|
}
|
|
18315
18862
|
}, 150);
|
|
@@ -18340,14 +18887,14 @@ class NvFieldmultiselect {
|
|
|
18340
18887
|
* @returns {any} The JSX for options mode
|
|
18341
18888
|
*/
|
|
18342
18889
|
this.renderOptionsMode = () => {
|
|
18343
|
-
return (hAsync(Host, { "aria-label": this.label, "aria-expanded": this.open.toString() }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { htmlFor: this.inputId }, hAsync("slot", { name: "label" }, this.label))), hAsync("nv-popover", { ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { class: "input-wrapper-multiselect", slot: "trigger" }, hAsync("slot", { name: "before-input" }), hAsync("div", { class: "input-container-multiselect" }, hAsync("slot", { name: "leading-input" }), this.
|
|
18890
|
+
return (hAsync(Host, { "aria-label": this.label, "aria-expanded": this.open.toString() }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { htmlFor: this.inputId }, hAsync("slot", { name: "label" }, this.label))), hAsync("nv-popover", { ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { class: "input-wrapper-multiselect", slot: "trigger" }, hAsync("slot", { name: "before-input" }), hAsync("div", { class: "input-container-multiselect" }, hAsync("slot", { name: "leading-input" }), this.value.length > 0 && (hAsync("nv-badge", { slot: "leading-input", "prevent-auto-close": true, color: "10", dismissible: this.value.length > 0, label: `${this.value.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.value.length} ${this.badgeLabel} items`, onCloseClicked: this.handleBadgeCloseOptions })), this.filterable || this.disabled || this.readonly ? (hAsync("input", { type: "text", id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.filterText, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputOptions, onFocus: this.handleInputFocusOptions, onBlur: this.handleInputBlurOptions, onKeyDown: this.handleKeyDown, "data-scope": "focusable" })) : (hAsync("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClickOptions, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocusOptions, role: "combobox", "aria-expanded": this.open, "data-scope": "focusable" }, hAsync("span", null, this.placeholder))), this.error && (hAsync("nv-icon", { name: "alert-circle", class: "validation", size: "md" })), this.filterable && this.filterText.length > 0 && (hAsync("nv-iconbutton", { "data-scope": "clear-filter", name: "x", size: "md", emphasis: "lower", tabindex: "-1", onClick: this.clearFilterText, "aria-label": "Clear filter text" })), hAsync("nv-iconbutton", { "data-scope": "toggle-dropdown", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', "aria-pressed": this.open.toString(), onClick: this.togglePopoverOptions })), hAsync("slot", { name: "after-input" })), hAsync("div", { slot: "content", role: "listbox", "aria-multiselectable": "true", style: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, hAsync("ul", { role: "content" }, this.options.map(option => (hAsync("nv-fielddropdownitemcheck", { label: option.label, description: option.description, value: option.value, checked: this.value.includes(option.value), disabled: option.disabled }))), hAsync("hr", { class: "multiselect-divider", style: { display: 'none' } })))), this.renderDescriptions()));
|
|
18344
18891
|
};
|
|
18345
18892
|
/**
|
|
18346
18893
|
* Renders the component in slots mode
|
|
18347
18894
|
* @returns {any} The JSX for slots mode
|
|
18348
18895
|
*/
|
|
18349
18896
|
this.renderSlotsMode = () => {
|
|
18350
|
-
return (hAsync(Host, { "aria-label": this.label, "aria-expanded": this.open.toString() }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { htmlFor: this.inputId }, hAsync("slot", { name: "label" }, this.label))), hAsync("nv-popover", { ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { class: "input-wrapper-multiselect", slot: "trigger" }, hAsync("slot", { name: "before-input" }), hAsync("div", { class: "input-container-multiselect", onClick: this.handleInputContainerClickSlots }, hAsync("slot", { name: "leading-input" }), this.
|
|
18897
|
+
return (hAsync(Host, { "aria-label": this.label, "aria-expanded": this.open.toString() }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { htmlFor: this.inputId }, hAsync("slot", { name: "label" }, this.label))), hAsync("nv-popover", { ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { class: "input-wrapper-multiselect", slot: "trigger" }, hAsync("slot", { name: "before-input" }), hAsync("div", { class: "input-container-multiselect", onClick: this.handleInputContainerClickSlots }, hAsync("slot", { name: "leading-input" }), this.value.length > 0 && (hAsync("nv-badge", { slot: "leading-input", "prevent-auto-close": true, color: "10", dismissible: this.value.length > 0, label: `${this.value.length} ${this.badgeLabel}`, "aria-label": `Clear all ${this.value.length} ${this.badgeLabel} items`, onCloseClicked: this.handleBadgeCloseSlots })), this.filterable || this.disabled || this.readonly ? (hAsync("input", { id: this.inputId, ref: e => (this.inputElement = e), autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.filterText, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputSlots, onFocus: this.handleInputFocusSlots, onBlur: this.handleInputBlurSlots, onKeyDown: this.handleKeyDown, "data-scope": "focusable" })) : (hAsync("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClickSlots, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocusSlots, role: "combobox", "aria-expanded": this.open, "data-scope": "focusable" }, hAsync("span", null, this.placeholder))), this.error && (hAsync("nv-icon", { name: "alert-circle", class: "validation", size: "md" })), this.filterable && this.filterText.length > 0 && (hAsync("nv-iconbutton", { name: "x", size: "md", emphasis: "lower", tabindex: "-1", onClick: this.clearFilterText, "aria-label": "Clear filter text" })), hAsync("nv-iconbutton", { "data-scope": "toggle-dropdown", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', "aria-pressed": this.open.toString(), onClick: this.togglePopoverSlots })), hAsync("slot", { name: "after-input" })), hAsync("div", { slot: "content", role: "listbox", "aria-multiselectable": "true", style: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, hAsync("slot", { name: "content" }))), this.renderDescriptions()));
|
|
18351
18898
|
};
|
|
18352
18899
|
}
|
|
18353
18900
|
//#endregion EVENTS
|
|
@@ -18356,7 +18903,7 @@ class NvFieldmultiselect {
|
|
|
18356
18903
|
handleOptionsChange(newValue) {
|
|
18357
18904
|
if (!newValue)
|
|
18358
18905
|
return;
|
|
18359
|
-
this.
|
|
18906
|
+
this.value = newValue
|
|
18360
18907
|
.filter(option => option.checked)
|
|
18361
18908
|
.map(option => option.value);
|
|
18362
18909
|
this.reorderOptionsContent();
|
|
@@ -18365,8 +18912,10 @@ class NvFieldmultiselect {
|
|
|
18365
18912
|
* Emitted when the value changes.
|
|
18366
18913
|
*/
|
|
18367
18914
|
watchValueHandler() {
|
|
18368
|
-
//
|
|
18369
|
-
this.
|
|
18915
|
+
// Synchronize child components when value changes programmatically
|
|
18916
|
+
if (this.el && this.el.isConnected) {
|
|
18917
|
+
this.syncChildComponents();
|
|
18918
|
+
}
|
|
18370
18919
|
}
|
|
18371
18920
|
//#endregion WATCHERS
|
|
18372
18921
|
/****************************************************************************/
|
|
@@ -18406,22 +18955,23 @@ class NvFieldmultiselect {
|
|
|
18406
18955
|
}
|
|
18407
18956
|
const { value, checked } = event.detail;
|
|
18408
18957
|
if (value !== undefined && value !== null) {
|
|
18409
|
-
const
|
|
18410
|
-
const valueIndex =
|
|
18958
|
+
const newValue = [...this.value];
|
|
18959
|
+
const valueIndex = newValue.indexOf(value);
|
|
18411
18960
|
if (checked && valueIndex === -1) {
|
|
18412
|
-
|
|
18961
|
+
newValue.push(value);
|
|
18413
18962
|
}
|
|
18414
18963
|
else if (!checked && valueIndex > -1) {
|
|
18415
|
-
|
|
18964
|
+
newValue.splice(valueIndex, 1);
|
|
18416
18965
|
}
|
|
18417
|
-
//
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
|
|
18966
|
+
// Always update the state and emit the event when an item is checked/unchecked
|
|
18967
|
+
this.value = newValue;
|
|
18968
|
+
this.valueChanged.emit(this.value);
|
|
18969
|
+
// Update the checked state of all items to ensure consistency
|
|
18970
|
+
this.syncChildComponents();
|
|
18971
|
+
// Preserve the filter text in the input
|
|
18972
|
+
if (this.filterable && this.inputElement) {
|
|
18973
|
+
// Keep the current filter text in the input
|
|
18974
|
+
this.inputElement.value = this.filterText;
|
|
18425
18975
|
}
|
|
18426
18976
|
}
|
|
18427
18977
|
else {
|
|
@@ -18460,12 +19010,10 @@ class NvFieldmultiselect {
|
|
|
18460
19010
|
}
|
|
18461
19011
|
// Specific initialization for slots mode
|
|
18462
19012
|
if (!this.options) {
|
|
19013
|
+
// Use a microtask to ensure DOM is ready
|
|
18463
19014
|
Promise.resolve().then(() => {
|
|
18464
|
-
|
|
18465
|
-
|
|
18466
|
-
this.selectedValues = items
|
|
18467
|
-
.filter(item => item.hasAttribute('checked'))
|
|
18468
|
-
.map(item => item.getAttribute('value') || '');
|
|
19015
|
+
// Synchronize child components
|
|
19016
|
+
this.syncChildComponents();
|
|
18469
19017
|
// Force a reorder after initialization
|
|
18470
19018
|
requestAnimationFrame(() => {
|
|
18471
19019
|
this.reorderSlotContent();
|
|
@@ -18476,13 +19024,8 @@ class NvFieldmultiselect {
|
|
|
18476
19024
|
if (this.options) {
|
|
18477
19025
|
this.sortedOptions = [...((_a = this.options) !== null && _a !== void 0 ? _a : [])];
|
|
18478
19026
|
}
|
|
18479
|
-
//
|
|
18480
|
-
if (this.
|
|
18481
|
-
this.filterText = String(this.value).toLocaleLowerCase();
|
|
18482
|
-
this.filterItems();
|
|
18483
|
-
}
|
|
18484
|
-
else {
|
|
18485
|
-
// Reset visibility state of all dropdown items
|
|
19027
|
+
// Reset filter if needed
|
|
19028
|
+
if (!this.filterText) {
|
|
18486
19029
|
this.resetFilter();
|
|
18487
19030
|
}
|
|
18488
19031
|
}
|
|
@@ -18493,6 +19036,8 @@ class NvFieldmultiselect {
|
|
|
18493
19036
|
if (this.options) {
|
|
18494
19037
|
this.handleOptionsChange(this.options);
|
|
18495
19038
|
}
|
|
19039
|
+
// Final synchronization of child components after everything is loaded
|
|
19040
|
+
this.syncChildComponents();
|
|
18496
19041
|
}
|
|
18497
19042
|
/**
|
|
18498
19043
|
* Unsubscribe from click outside event.
|
|
@@ -18510,38 +19055,6 @@ class NvFieldmultiselect {
|
|
|
18510
19055
|
async getFilterText() {
|
|
18511
19056
|
return this.filterText;
|
|
18512
19057
|
}
|
|
18513
|
-
/**
|
|
18514
|
-
* Set the initial selection based on the current value and update the inputElement value.
|
|
18515
|
-
*/
|
|
18516
|
-
setInitialSelection() {
|
|
18517
|
-
var _a;
|
|
18518
|
-
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitem'));
|
|
18519
|
-
const selectedItem = items.find(item => {
|
|
18520
|
-
var _a;
|
|
18521
|
-
return item.getAttribute('label') === this.value ||
|
|
18522
|
-
item.getAttribute('value') === this.value ||
|
|
18523
|
-
((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === this.value;
|
|
18524
|
-
});
|
|
18525
|
-
// Remove 'selected' from all items first to reset the state
|
|
18526
|
-
items.forEach(item => {
|
|
18527
|
-
item.removeAttribute('selected');
|
|
18528
|
-
item.classList.remove('selected');
|
|
18529
|
-
});
|
|
18530
|
-
if (selectedItem) {
|
|
18531
|
-
// Add the `selected` attribute and `selected` class for visual styling
|
|
18532
|
-
selectedItem.setAttribute('selected', 'true');
|
|
18533
|
-
selectedItem.classList.add('selected');
|
|
18534
|
-
// Update the value and inputElement value to reflect the pre-selected item
|
|
18535
|
-
this.value =
|
|
18536
|
-
selectedItem.getAttribute('label') ||
|
|
18537
|
-
selectedItem.getAttribute('value') ||
|
|
18538
|
-
((_a = selectedItem.textContent) === null || _a === void 0 ? void 0 : _a.trim()) ||
|
|
18539
|
-
'';
|
|
18540
|
-
if (this.inputElement) {
|
|
18541
|
-
this.inputElement.value = this.value;
|
|
18542
|
-
}
|
|
18543
|
-
}
|
|
18544
|
-
}
|
|
18545
19058
|
/**
|
|
18546
19059
|
* Reset the filter and make all items visible.
|
|
18547
19060
|
*/
|
|
@@ -18558,8 +19071,8 @@ class NvFieldmultiselect {
|
|
|
18558
19071
|
if (emptyMessage)
|
|
18559
19072
|
emptyMessage.remove();
|
|
18560
19073
|
// Reorder with divider if needed
|
|
18561
|
-
const selectedItems = items.filter(item => this.
|
|
18562
|
-
const unselectedItems = items.filter(item => !this.
|
|
19074
|
+
const selectedItems = items.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19075
|
+
const unselectedItems = items.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18563
19076
|
if (selectedItems.length > 0) {
|
|
18564
19077
|
this.manageDivider(ul, selectedItems, unselectedItems);
|
|
18565
19078
|
}
|
|
@@ -18570,7 +19083,7 @@ class NvFieldmultiselect {
|
|
|
18570
19083
|
* @returns {string[]} The selected values.
|
|
18571
19084
|
*/
|
|
18572
19085
|
async getSelectedValues() {
|
|
18573
|
-
return this.
|
|
19086
|
+
return this.value;
|
|
18574
19087
|
}
|
|
18575
19088
|
/**
|
|
18576
19089
|
* Reorder the content of the slot.
|
|
@@ -18592,8 +19105,8 @@ class NvFieldmultiselect {
|
|
|
18592
19105
|
return;
|
|
18593
19106
|
}
|
|
18594
19107
|
// Separate checked vs unchecked
|
|
18595
|
-
const selectedItems = items.filter(item => this.
|
|
18596
|
-
const unselectedItems = items.filter(item => !this.
|
|
19108
|
+
const selectedItems = items.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19109
|
+
const unselectedItems = items.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18597
19110
|
// Reinsert CHECKED items FIRST
|
|
18598
19111
|
// appendChild() moves the element without recreating it
|
|
18599
19112
|
// this is not trigger a re-rendering of the component in the platforms
|
|
@@ -18619,8 +19132,8 @@ class NvFieldmultiselect {
|
|
|
18619
19132
|
if (!ul)
|
|
18620
19133
|
return;
|
|
18621
19134
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck')).filter(item => item.style.display !== 'none');
|
|
18622
|
-
const selectedItems = items.filter(item => this.
|
|
18623
|
-
const unselectedItems = items.filter(item => !this.
|
|
19135
|
+
const selectedItems = items.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19136
|
+
const unselectedItems = items.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18624
19137
|
// Reorder the elements
|
|
18625
19138
|
selectedItems.forEach(item => ul.appendChild(item));
|
|
18626
19139
|
unselectedItems.forEach(item => ul.appendChild(item));
|
|
@@ -18656,8 +19169,8 @@ class NvFieldmultiselect {
|
|
|
18656
19169
|
}
|
|
18657
19170
|
// Reorder with divider
|
|
18658
19171
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
18659
|
-
const selectedItems = items.filter(item => this.
|
|
18660
|
-
const unselectedItems = items.filter(item => !this.
|
|
19172
|
+
const selectedItems = items.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19173
|
+
const unselectedItems = items.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18661
19174
|
this.manageDivider(ul, selectedItems, unselectedItems);
|
|
18662
19175
|
return;
|
|
18663
19176
|
}
|
|
@@ -18678,8 +19191,8 @@ class NvFieldmultiselect {
|
|
|
18678
19191
|
});
|
|
18679
19192
|
// Manage the divider with the visible items
|
|
18680
19193
|
const visibleItems = items.filter(item => item.style.display !== 'none');
|
|
18681
|
-
const visibleSelected = visibleItems.filter(item => this.
|
|
18682
|
-
const visibleUnselected = visibleItems.filter(item => !this.
|
|
19194
|
+
const visibleSelected = visibleItems.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19195
|
+
const visibleUnselected = visibleItems.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18683
19196
|
this.manageDivider(ul, visibleSelected, visibleUnselected);
|
|
18684
19197
|
}
|
|
18685
19198
|
else {
|
|
@@ -18737,8 +19250,8 @@ class NvFieldmultiselect {
|
|
|
18737
19250
|
});
|
|
18738
19251
|
// Manage the divider with the visible items
|
|
18739
19252
|
const visibleItems = items.filter(item => item.style.display !== 'none');
|
|
18740
|
-
const visibleSelected = visibleItems.filter(item => this.
|
|
18741
|
-
const visibleUnselected = visibleItems.filter(item => !this.
|
|
19253
|
+
const visibleSelected = visibleItems.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19254
|
+
const visibleUnselected = visibleItems.filter(item => !this.value.includes(item.getAttribute('value') || ''));
|
|
18742
19255
|
this.manageDivider(ul, visibleSelected, visibleUnselected);
|
|
18743
19256
|
// Add or remove the empty message based on the case
|
|
18744
19257
|
if (!hasVisibleItems) {
|
|
@@ -18786,8 +19299,8 @@ class NvFieldmultiselect {
|
|
|
18786
19299
|
});
|
|
18787
19300
|
// Get visible items after filtering
|
|
18788
19301
|
const visibleItems = items.filter(item => item.style.display !== 'none');
|
|
18789
|
-
const visibleSelectedItems = visibleItems.filter(item => this.
|
|
18790
|
-
this.manageDivider(ul, visibleSelectedItems, visibleItems.filter(item => !this.
|
|
19302
|
+
const visibleSelectedItems = visibleItems.filter(item => this.value.includes(item.getAttribute('value') || ''));
|
|
19303
|
+
this.manageDivider(ul, visibleSelectedItems, visibleItems.filter(item => !this.value.includes(item.getAttribute('value') || '')));
|
|
18791
19304
|
// Add empty message if no items match the filter
|
|
18792
19305
|
if (!hasVisibleItems) {
|
|
18793
19306
|
const emptyMessage = document.createElement('li');
|
|
@@ -18984,6 +19497,29 @@ class NvFieldmultiselect {
|
|
|
18984
19497
|
divider.style.display = 'none';
|
|
18985
19498
|
}
|
|
18986
19499
|
}
|
|
19500
|
+
/**
|
|
19501
|
+
* Synchronizes the checked state of all child nv-fielddropdownitemcheck components
|
|
19502
|
+
* with the current selectedValues state.
|
|
19503
|
+
*/
|
|
19504
|
+
syncChildComponents() {
|
|
19505
|
+
// Early return if element is not ready
|
|
19506
|
+
if (!this.el || !this.el.isConnected) {
|
|
19507
|
+
return;
|
|
19508
|
+
}
|
|
19509
|
+
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
19510
|
+
items.forEach(item => {
|
|
19511
|
+
// Get the effective value: use explicit value if present, otherwise use label
|
|
19512
|
+
const itemValue = item.getAttribute('value') || item.getAttribute('label') || '';
|
|
19513
|
+
if (this.value.includes(itemValue)) {
|
|
19514
|
+
item.setAttribute('checked', '');
|
|
19515
|
+
item.checked = true;
|
|
19516
|
+
}
|
|
19517
|
+
else {
|
|
19518
|
+
item.removeAttribute('checked');
|
|
19519
|
+
item.checked = false;
|
|
19520
|
+
}
|
|
19521
|
+
});
|
|
19522
|
+
}
|
|
18987
19523
|
/**
|
|
18988
19524
|
* Renders description and error description sections
|
|
18989
19525
|
* @returns {any} The JSX for descriptions
|
|
@@ -19019,7 +19555,7 @@ class NvFieldmultiselect {
|
|
|
19019
19555
|
"description": [513],
|
|
19020
19556
|
"placeholder": [513],
|
|
19021
19557
|
"autocomplete": [513],
|
|
19022
|
-
"value": [
|
|
19558
|
+
"value": [1040],
|
|
19023
19559
|
"required": [516],
|
|
19024
19560
|
"readonly": [516],
|
|
19025
19561
|
"disabled": [516],
|
|
@@ -19034,8 +19570,7 @@ class NvFieldmultiselect {
|
|
|
19034
19570
|
"autofocus": [516],
|
|
19035
19571
|
"fluid": [516],
|
|
19036
19572
|
"badgeLabel": [513, "badge-label"],
|
|
19037
|
-
"filterText": [
|
|
19038
|
-
"selectedValues": [32],
|
|
19573
|
+
"filterText": [1537, "filter-text"],
|
|
19039
19574
|
"sortedOptions": [32],
|
|
19040
19575
|
"isHandlingEscape": [32],
|
|
19041
19576
|
"getFilterText": [64],
|
|
@@ -19044,7 +19579,7 @@ class NvFieldmultiselect {
|
|
|
19044
19579
|
},
|
|
19045
19580
|
"$listeners$": [[0, "openChanged", "handleOpenChanged"], [0, "itemChecked", "handleItemChecked"], [0, "slotchange", "handleSlotChange"], [0, "keydown", "handleKeyDown"]],
|
|
19046
19581
|
"$lazyBundleId$": "-",
|
|
19047
|
-
"$attrsToReflect$": [["inputId", "input-id"], ["name", "name"], ["label", "label"], ["description", "description"], ["placeholder", "placeholder"], ["autocomplete", "autocomplete"], ["
|
|
19582
|
+
"$attrsToReflect$": [["inputId", "input-id"], ["name", "name"], ["label", "label"], ["description", "description"], ["placeholder", "placeholder"], ["autocomplete", "autocomplete"], ["required", "required"], ["readonly", "readonly"], ["disabled", "disabled"], ["error", "error"], ["errorDescription", "error-description"], ["maxHeight", "max-height"], ["open", "open"], ["emptyResult", "empty-result"], ["filterable", "filterable"], ["debounceDelay", "debounce-delay"], ["autofocus", "autofocus"], ["fluid", "fluid"], ["badgeLabel", "badge-label"], ["filterText", "filter-text"]]
|
|
19048
19583
|
}; }
|
|
19049
19584
|
}
|
|
19050
19585
|
|
|
@@ -19168,9 +19703,9 @@ class NvFieldnumber {
|
|
|
19168
19703
|
/****************************************************************************/
|
|
19169
19704
|
//#region RENDER
|
|
19170
19705
|
render() {
|
|
19171
|
-
return (hAsync(Host, { key: '
|
|
19172
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19173
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19706
|
+
return (hAsync(Host, { key: '0fcd74073e1c3f2c8de00c21e1ff782d4ed2fbe8' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'c4dc1dc4efd2150fb897f0602b07ab22643756e6', htmlFor: this.inputId }, hAsync("slot", { key: 'a0aa360dd532e11fd0273c8ba8d5ded3adc45642', name: "label" }, this.label))), hAsync("div", { key: 'c2ffeb70a8e5ffe43ec5061e035add48fd0f09a2', class: "input-wrapper" }, hAsync("slot", { key: '62ef15b0961ae4af93940d3d2dd10fdb6a636d4d', name: "before-input" }), hAsync("div", { key: '07be430ad207b6023ee969b7ad290d4946f4b6fe', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '69978ac5971a25cc8c0515250d741ac8a658c3bd', name: "leading-input" }), hAsync("input", { key: '284f8da710438e470a26541b7cf72f89730ef3ab', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: "number", autofocus: this.autofocus, required: this.required, max: this.max, min: this.min, step: this.step, value: this.value, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), hAsync("slot", { key: 'd028cd632cff77f592429e97a81a1d45aeec621d', name: "trailing-input" }), this.error && (hAsync("nv-icon", { key: '7de629b71971559c647ba4ad4885815124bb63b3', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '135e609c2e568174db3503633f389c70a2fceaba', name: "circle-check", class: "validation", size: "md" })), hAsync("div", { key: '17a952157f55ff65911d852a4274de5db4241508', class: "stepper" }, hAsync("nv-iconbutton", { key: '33d0412ea6ed883d92b64363b404628d610e2339', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }), hAsync("nv-iconbutton", { key: '68bf536a5fe5bb0b3c2c3bd5508324c050cb8764', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }))), hAsync("slot", { key: '3922a559b4ca954bee9caea379c940e7b132f65f', name: "after-input" })), (this.description ||
|
|
19707
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '8844bf48e0251717549d4e0079370fe2f590c616', class: "description" }, hAsync("slot", { key: 'f35c77ffa2f01a66d72ef75a65c5c634b14bbdbc', name: "description" }, this.description))), (this.errorDescription ||
|
|
19708
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'ce407c77dd30a235c7691727480c911ad6128392', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '7ffb85e03e5a9a949f022398537c74a812b8a12f', name: "error-description" }, this.errorDescription)))));
|
|
19174
19709
|
}
|
|
19175
19710
|
static get formAssociated() { return true; }
|
|
19176
19711
|
get el() { return getElement(this); }
|
|
@@ -19318,9 +19853,9 @@ class NvFieldpassword {
|
|
|
19318
19853
|
/****************************************************************************/
|
|
19319
19854
|
//#region RENDER
|
|
19320
19855
|
render() {
|
|
19321
|
-
return (hAsync(Host, { key: '
|
|
19322
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19323
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19856
|
+
return (hAsync(Host, { key: 'b8d142f5a35087f977437af4d2094783e455d9a0' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'f26d2c14ee03d1ef80fe263a1849c0da03a39a8c', htmlFor: this.inputId }, hAsync("slot", { key: '13dfa9e681e1b5a7244e7debc7d1c1af36bedd37', name: "label" }, this.label))), hAsync("div", { key: '5a01c9cc4573543e0d6633f9b8fadfa1ad6b066a', class: "input-wrapper" }, hAsync("slot", { key: '2ff066ad5da2d3fe0885ccc1a0c97f9817ff4bbe', name: "before-input" }), hAsync("div", { key: '429535a2b55ea4af5374067948f5be1d16898694', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '00d8fa3cd0e8af41f1b9c46cefc256a29187db9d', name: "leading-input" }), hAsync("input", { key: '7aa5db4e17d62e3a9c10e8b5e2dabe224033b2da', id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, type: this.showPasswordState ? 'text' : 'password', inputMode: this.mode, value: this.value, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), (this.success || this.error) && (hAsync("nv-icon", { key: '0c919def4c580387d87a2f500a663f4dba5874cb', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" })), !this.hidePasswordIcon && (hAsync("nv-iconbutton", { key: '2b020de565c3311431c83c68a773731055c1c6c5', name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() }))), hAsync("slot", { key: '938de4d9c513e3aef3de1e9a108e69558843b466', name: "after-input" })), (this.description ||
|
|
19857
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '6150e4be7c79bf10a1a2db3b14334c4fd9d2396c', class: "description" }, hAsync("slot", { key: 'de557936e4ed9e0798cbbb95f832fa6a831d63a9', name: "description" }, this.description))), (this.errorDescription ||
|
|
19858
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '74e43aa5f463f8156d44d261d5641c0aafccc5fc', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '4956c95a870964a712524fb30d26e9fd500edef8', name: "error-description" }, this.errorDescription)))));
|
|
19324
19859
|
}
|
|
19325
19860
|
static get formAssociated() { return true; }
|
|
19326
19861
|
get el() { return getElement(this); }
|
|
@@ -19448,9 +19983,9 @@ class NvFieldradio {
|
|
|
19448
19983
|
/****************************************************************************/
|
|
19449
19984
|
//#region RENDER
|
|
19450
19985
|
render() {
|
|
19451
|
-
return (hAsync(Host, { key: '
|
|
19452
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19453
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
19986
|
+
return (hAsync(Host, { key: '5721fd4ffd6d8b1392e65d0b8eaea4dea241be63', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, hAsync("input", { key: 'c54d8952edb57e34016a85ba2b6b9c7fc2a20a37', type: "radio", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: this.checked, disabled: this.disabled }), hAsync("div", { key: 'e80c6c12fbf461776822185109e05aea5a6c954b', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '0f89b274c7ee7ea7d2e3116a004575176d044b5b', htmlFor: this.inputId }, hAsync("slot", { key: '04b04fbc8ad5a199def48e728c74f13e7230414d', name: "label" }, this.label))), (this.description ||
|
|
19987
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'e5c5048c50d0089393a29f12eb09f0ae26aedcfc', class: "description" }, hAsync("slot", { key: '6902044f273d508a79a66a3f185fc4a9ac48e94f', name: "description" }, this.description))), (this.errorDescription ||
|
|
19988
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '8d388b64deccd2f398485dfa0b83d70b8c50ae47', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'c5237272b97c754d2745eb62a85519f2c14dfb27', name: "error-description" }, this.errorDescription))))));
|
|
19454
19989
|
}
|
|
19455
19990
|
static get formAssociated() { return true; }
|
|
19456
19991
|
get el() { return getElement(this); }
|
|
@@ -19834,13 +20369,13 @@ class NvFieldselect {
|
|
|
19834
20369
|
* @returns {HTMLStencilElement} The HTML element to render.
|
|
19835
20370
|
*/
|
|
19836
20371
|
render() {
|
|
19837
|
-
return (hAsync(Host, { key: '
|
|
20372
|
+
return (hAsync(Host, { key: 'ff869c177289342a39ae292a530359af940a5669' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '10815f70059de9b1774ccc26b69d441d250e1833', htmlFor: this.inputId }, hAsync("slot", { key: 'afe78cd3671151060fd1e2a37b77c164767908fa', name: "label" }, this.label))), hAsync("div", { key: '064d8f512bc5f11831096d3a092afb00dcfeb1bc', class: "select-wrapper" }, hAsync("slot", { key: 'c12d375bc5a558d25f1eb34343e2ad5fce784558', name: "before-input" }), hAsync("div", { key: 'ffb39cfc0444edc49a4e2b6318990085009d7598', class: "select-container", onClick: this.handleSelectContainerClick }, hAsync("slot", { key: 'd5fccac0e92fe0553b8478a6f5dc9be4591e8c23', name: "leading-input" }), this.internalReadonly && (hAsync("input", { key: '94dc05d08de8120c78fa140df5eb3adc09ce97da', id: this.inputId + '-readonly', type: "text", value: this.computedDisplayValue, readonly: true, class: "readonly-input", "aria-readonly": "true", "aria-label": this.label, "aria-describedby": this.error
|
|
19838
20373
|
? `${this.inputId}-error`
|
|
19839
|
-
: `${this.inputId}-description` })), hAsync("select", { key: '
|
|
20374
|
+
: `${this.inputId}-description` })), hAsync("select", { key: '85ffba58429aaa393cc9178e0866a61f85d92103', id: this.inputId, ref: el => (this.selectElement = el), name: this.name, autofocus: this.autofocus, disabled: this.disabled, required: this.required, multiple: this.multiple, onChange: this.handleSelectChange, class: this.internalReadonly ? 'hidden' : '', "aria-label": this.label, "aria-describedby": this.error
|
|
19840
20375
|
? `${this.inputId}-error`
|
|
19841
|
-
: `${this.inputId}-description` }, this.parsedOptions.length > 0 ? (this.parsedOptions.map(option => (hAsync("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (hAsync("slot", null))), hAsync("div", { key: '
|
|
19842
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
19843
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
20376
|
+
: `${this.inputId}-description` }, this.parsedOptions.length > 0 ? (this.parsedOptions.map(option => (hAsync("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (hAsync("slot", null))), hAsync("div", { key: '694b0306ddaf671faea9dd863bb7f2917b567ffb', class: "select-icons" }, this.error && (hAsync("nv-icon", { key: '4f86b0916dcbfefb24af5e5e2c0ca009ece6193b', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: 'f99ba37d4a70b7c352b4abb0be0b5eb85b4cc947', name: "circle-check", class: "validation", size: "md" })), !this.multiple && (hAsync("nv-iconbutton", { key: 'b152a3b110b0f780b29adcf1efb4aadf98cf81be', name: "chevron-down", size: "md", emphasis: "lower", tabindex: -1 })))), hAsync("slot", { key: '63c6076165bae5d36732179c4a761d5b381076b5', name: "after-input" })), (this.description ||
|
|
20377
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'dd3e41b62290c580e050eb5a4742aabc7395cbda', class: "description", id: `${this.inputId}-description` }, hAsync("slot", { key: '87bedab511a8b3d07d6616e4937342b6d272c5f3', name: "description" }, this.description))), (this.errorDescription ||
|
|
20378
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'd4cf69f5f2446fbbf8ed36910d89c3aa7ac2c826', class: "error-description", id: `${this.inputId}-error` }, hAsync("slot", { key: '2fc8b58658bd406af834dcad378b3b00aca40b22', name: "error-description" }, this.errorDescription)))));
|
|
19844
20379
|
}
|
|
19845
20380
|
static get formAssociated() { return true; }
|
|
19846
20381
|
get el() { return getElement(this); }
|
|
@@ -19886,6 +20421,18 @@ class NvFieldselect {
|
|
|
19886
20421
|
/**
|
|
19887
20422
|
* Utility functions for nv-fieldslider.
|
|
19888
20423
|
*/
|
|
20424
|
+
/**
|
|
20425
|
+
* Gets the number of decimal places in a number.
|
|
20426
|
+
* @param {number} num - The number to check
|
|
20427
|
+
* @returns {number} The number of decimal places
|
|
20428
|
+
*/
|
|
20429
|
+
function getDecimalPlaces(num) {
|
|
20430
|
+
if (Number.isInteger(num))
|
|
20431
|
+
return 0;
|
|
20432
|
+
const str = num.toString();
|
|
20433
|
+
const decimalPart = str.split('.')[1];
|
|
20434
|
+
return decimalPart ? decimalPart.length : 0;
|
|
20435
|
+
}
|
|
19889
20436
|
/**
|
|
19890
20437
|
* Clamp a value between min and max.
|
|
19891
20438
|
* @param {number} value - The value to clamp
|
|
@@ -19918,7 +20465,26 @@ function valueToPercent(value, min, max) {
|
|
|
19918
20465
|
*/
|
|
19919
20466
|
function snapToStep(value, min, max, step) {
|
|
19920
20467
|
const clamped = clamp$1(value, min, max);
|
|
19921
|
-
const
|
|
20468
|
+
const decimalPlaces = getDecimalPlaces(step);
|
|
20469
|
+
// To avoid floating point issues in calculations, we can work with integers
|
|
20470
|
+
// by multiplying all values by a power of 10 based on decimal places
|
|
20471
|
+
if (decimalPlaces > 0) {
|
|
20472
|
+
const multiplier = Math.pow(10, decimalPlaces);
|
|
20473
|
+
// Convert to integer-based calculation
|
|
20474
|
+
const scaledValue = Math.round((clamped - min) * multiplier);
|
|
20475
|
+
const scaledStep = Math.round(step * multiplier);
|
|
20476
|
+
// Round to nearest step using integer math
|
|
20477
|
+
const roundedSteps = Math.round(scaledValue / scaledStep);
|
|
20478
|
+
// Calculate snapped value and scale back down
|
|
20479
|
+
const scaledSnapped = roundedSteps * scaledStep;
|
|
20480
|
+
const snapped = min + scaledSnapped / multiplier;
|
|
20481
|
+
// Format to correct decimal places to ensure precision
|
|
20482
|
+
return clamp$1(parseFloat(snapped.toFixed(decimalPlaces)), min, max);
|
|
20483
|
+
}
|
|
20484
|
+
// For integer steps, use the original method
|
|
20485
|
+
const stepsFromMin = (clamped - min) / step;
|
|
20486
|
+
const roundedSteps = Math.round(stepsFromMin);
|
|
20487
|
+
const snapped = min + roundedSteps * step;
|
|
19922
20488
|
return clamp$1(snapped, min, max);
|
|
19923
20489
|
}
|
|
19924
20490
|
/**
|
|
@@ -19959,6 +20525,19 @@ function snapToTicks(value, ticks) {
|
|
|
19959
20525
|
}
|
|
19960
20526
|
return closestTick;
|
|
19961
20527
|
}
|
|
20528
|
+
/**
|
|
20529
|
+
* Format a numeric value for display, preserving trailing zeros based on step precision
|
|
20530
|
+
* @param {number} value - The value to format
|
|
20531
|
+
* @param {number} step - The step size that determines decimal precision
|
|
20532
|
+
* @returns {string} Formatted value string with appropriate decimal places
|
|
20533
|
+
*/
|
|
20534
|
+
function formatValueForDisplay(value, step) {
|
|
20535
|
+
const decimalPlaces = getDecimalPlaces(step);
|
|
20536
|
+
if (decimalPlaces > 0) {
|
|
20537
|
+
return value.toFixed(decimalPlaces);
|
|
20538
|
+
}
|
|
20539
|
+
return String(value);
|
|
20540
|
+
}
|
|
19962
20541
|
|
|
19963
20542
|
/**
|
|
19964
20543
|
* Renders single thumb in standard mode.
|
|
@@ -19966,7 +20545,7 @@ function snapToTicks(value, ticks) {
|
|
|
19966
20545
|
* @returns {JSX.Element} JSX element representing the thumb
|
|
19967
20546
|
*/
|
|
19968
20547
|
const SingleThumb = props => {
|
|
19969
|
-
const { value, min, max, rawPosition, isDragging, snap, disabled, readonly, onKeyDown, labelBeforeValue, labelAfterValue, } = props;
|
|
20548
|
+
const { value, min, max, step, rawPosition, isDragging, snap, disabled, readonly, onKeyDown, labelBeforeValue, labelAfterValue, } = props;
|
|
19970
20549
|
// Use raw position for visual display during dragging, but the snapped value otherwise
|
|
19971
20550
|
let displayPosition = value;
|
|
19972
20551
|
if (isDragging && !snap) {
|
|
@@ -19976,7 +20555,7 @@ const SingleThumb = props => {
|
|
|
19976
20555
|
return (hAsync("div", { class: "thumb", style: { left: `${percent}%` }, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, "aria-disabled": disabled ? 'true' : undefined, "aria-readonly": readonly ? 'true' : undefined, tabindex: disabled ? -1 : 0, onKeyDown: onKeyDown },
|
|
19977
20556
|
hAsync("div", { class: "thumb-tooltip" },
|
|
19978
20557
|
labelBeforeValue && (hAsync("span", { class: "label-before" }, labelBeforeValue)),
|
|
19979
|
-
|
|
20558
|
+
formatValueForDisplay(value, step),
|
|
19980
20559
|
labelAfterValue && hAsync("span", { class: "label-after" }, labelAfterValue))));
|
|
19981
20560
|
};
|
|
19982
20561
|
|
|
@@ -19986,7 +20565,7 @@ const SingleThumb = props => {
|
|
|
19986
20565
|
* @returns {JSX.Element[]} Array of JSX elements representing the range slider thumbs
|
|
19987
20566
|
*/
|
|
19988
20567
|
const RangeThumb = props => {
|
|
19989
|
-
const { rangeValue, rawRangePosition, activeDragThumb, isDragging, snap, min, max, disabled, readonly, onKeyDown, labelBeforeValue, labelAfterValue, } = props;
|
|
20568
|
+
const { rangeValue, rawRangePosition, activeDragThumb, isDragging, snap, min, max, step, disabled, readonly, onKeyDown, labelBeforeValue, labelAfterValue, } = props;
|
|
19990
20569
|
const [leftValue, rightValue] = rangeValue;
|
|
19991
20570
|
// Use raw positions for visual display during dragging, but the snapped values otherwise
|
|
19992
20571
|
let displayLeftPosition = leftValue;
|
|
@@ -20010,12 +20589,12 @@ const RangeThumb = props => {
|
|
|
20010
20589
|
hAsync("div", { class: "thumb thumb-left", style: { left: `${leftPercent}%` }, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": leftValue, "aria-disabled": disabled ? 'true' : undefined, "aria-readonly": readonly ? 'true' : undefined, "data-thumb": "left", tabindex: disabled ? -1 : 0, onKeyDown: onKeyDown },
|
|
20011
20590
|
hAsync("div", { class: "thumb-tooltip" },
|
|
20012
20591
|
labelBeforeValue && (hAsync("span", { class: "label-before" }, labelBeforeValue)),
|
|
20013
|
-
|
|
20592
|
+
formatValueForDisplay(leftValue, step),
|
|
20014
20593
|
labelAfterValue && hAsync("span", { class: "label-after" }, labelAfterValue))),
|
|
20015
20594
|
hAsync("div", { class: "thumb thumb-right", style: { left: `${rightPercent}%` }, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": rightValue, "aria-disabled": disabled ? 'true' : undefined, "aria-readonly": readonly ? 'true' : undefined, "data-thumb": "right", tabindex: disabled ? -1 : 0, onKeyDown: onKeyDown },
|
|
20016
20595
|
hAsync("div", { class: "thumb-tooltip" },
|
|
20017
20596
|
labelBeforeValue && (hAsync("span", { class: "label-before" }, labelBeforeValue)),
|
|
20018
|
-
|
|
20597
|
+
formatValueForDisplay(rightValue, step),
|
|
20019
20598
|
labelAfterValue && hAsync("span", { class: "label-after" }, labelAfterValue))),
|
|
20020
20599
|
];
|
|
20021
20600
|
};
|
|
@@ -20524,11 +21103,11 @@ class NvFieldslider {
|
|
|
20524
21103
|
/****************************************************************************/
|
|
20525
21104
|
//#region RENDER
|
|
20526
21105
|
render() {
|
|
20527
|
-
return (hAsync(Host, { key: '
|
|
21106
|
+
return (hAsync(Host, { key: '688357b41179bb99a662b8ea22f2beb7454b0d8c' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '7628e9ac0f304aa792f7c68f3e0b9b96d84583e0', htmlFor: this.startInputId }, hAsync("slot", { key: 'd876dc0602df8badadcfdf435d68356d382c8b25', name: "label" }, this.label))), hAsync("div", { key: '4aedd7863c3d06e4ad7dec800b14f858568bcb79', class: "slider-container" }, this.range ? (hAsync(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 0, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : null, hAsync("div", { key: '74d455d904614092ed51daf34f73425571b7ca24', class: "track-container" }, hAsync("div", { key: 'a53a1e0f1770006fece64a87ca03a511d0e4dd9d', class: "track", onPointerDown: this.onTrackInteraction }, this.range ? (hAsync(RangeThumb, { rangeValue: this.rangeValueInternal, rawRangePosition: this.rawRangePosition, activeDragThumb: this.activeDragThumb, isDragging: this.isDragging, snap: this.snap, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue })) : (hAsync(SingleThumb, { value: this.valueInternal, min: this.min, max: this.max, step: this.step, rawPosition: this.rawPosition, isDragging: this.isDragging, snap: this.snap, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue }))), hAsync(TickMarks, { key: 'aafdd02a87071f214d8710d6a0678ee01668609d', ticks: this.internalTicks, min: this.min, max: this.max })), this.range ? (hAsync(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 1, inputId: this.endInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : (hAsync(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name }))), (this.success ||
|
|
20528
21107
|
this.description ||
|
|
20529
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
21108
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '10eb3eb2f7a903af08419df8476c11e27e9e575e', class: "description" }, this.success && (hAsync("nv-icon", { key: 'ee312f8f0563e6dc920e9cbf886784df8c57e719', name: "circle-check", class: "validation", size: "md" })), hAsync("slot", { key: '4ee31b6914ebae20404acd582c27b38b5ad64700', name: "description" }, this.description))), (this.error ||
|
|
20530
21109
|
this.errorDescription ||
|
|
20531
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
21110
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'e37e44dea94b691cbac98d16fb74c5c5cb280c5e', class: "error-description", hidden: !this.error }, this.error && (hAsync("nv-icon", { key: 'c1b403a4848fdcf0e9f51f37ec7454224562ed5c', name: "alert-circle", class: "validation", size: "md" })), hAsync("slot", { key: '87db18643f9473ae30e936fc1a316de95f06c107', name: "error-description" }, this.errorDescription)))));
|
|
20532
21111
|
}
|
|
20533
21112
|
static get formAssociated() { return true; }
|
|
20534
21113
|
get el() { return getElement(this); }
|
|
@@ -20703,9 +21282,9 @@ class NvFieldtext {
|
|
|
20703
21282
|
/****************************************************************************/
|
|
20704
21283
|
//#region RENDER
|
|
20705
21284
|
render() {
|
|
20706
|
-
return (hAsync(Host, { key: '
|
|
20707
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
20708
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
21285
|
+
return (hAsync(Host, { key: '35382ab52aa48116fbedc7683aff4729f06f5969' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '6f849db1b7603fc4de4fb23075fd7daa72438dd2', htmlFor: this.inputId }, hAsync("slot", { key: '24bc67fe3a8de24a8601a2cf3c5afd2532e17c4a', name: "label" }, this.label))), hAsync("div", { key: '8ffd2d0f048082c71a76054842fffd22452b9ad2', class: "input-wrapper" }, hAsync("slot", { key: '478020c16e29399dcc6566651f88acc8d88ef36d', name: "before-input" }), hAsync("div", { key: '1aa0bac3947bdff209268619202ccc38da691761', class: "input-container", onClick: this.handleInputContainerClick }, hAsync("slot", { key: '369b5f0a4c4d1d16217ad5de9221273ece41e1f0', name: "leading-input" }), hAsync("input", { key: '91446fe15f48f45693f56b3fd21926b8114c1dca', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: this.type, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, autofocus: this.autofocus, autocomplete: this.autocomplete, multiple: this.multiple, value: this.value, onInput: this.handleInput }), hAsync("slot", { key: '505a9ed004c4492f8daaef9a92bcaf344e2a10fb', name: "trailing-input" }), this.error && (hAsync("nv-icon", { key: 'c1e9ecd4f901862391daa6c9f5c75d3c1b81810f', name: "alert-circle", class: "validation", size: "md" })), this.success && (hAsync("nv-icon", { key: '15a452bdbbb386a51e4fe51370bd09521cc6f47f', name: "circle-check", class: "validation", size: "md" }))), hAsync("slot", { key: '7e7e3969dd6f3d1b80eab00ac966f7ba9f13895c', name: "after-input" })), (this.description ||
|
|
21286
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'b4ca95846a8fdf68e95d602968506bf009f9334f', class: "description" }, hAsync("slot", { key: 'fce329e819b837318b2d9bf9e16a8ef886aa940a', name: "description" }, this.description))), (this.errorDescription ||
|
|
21287
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: 'c3800ac457b5f0f87a3bdf9e9e37a36f5905786c', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'f77d02598ba261bf2b48b16ecfa3fc15fe221599', name: "error-description" }, this.errorDescription)))));
|
|
20709
21288
|
}
|
|
20710
21289
|
static get formAssociated() { return true; }
|
|
20711
21290
|
get el() { return getElement(this); }
|
|
@@ -20925,9 +21504,9 @@ class NvFieldtextarea {
|
|
|
20925
21504
|
/****************************************************************************/
|
|
20926
21505
|
//#region RENDER
|
|
20927
21506
|
render() {
|
|
20928
|
-
return (hAsync(Host, { key: '
|
|
20929
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
20930
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
21507
|
+
return (hAsync(Host, { key: '2b054e4460ac1532cb2006feaa3930abc8e21505' }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '5058a7c4a77a37336bcc58fd6b727f1f9564d7b2', htmlFor: this.inputId }, hAsync("slot", { key: '0c5abb11d0c2377b702ae1614134e28e53a6e1e2', name: "label" }, this.label))), hAsync("div", { key: 'e6d9981eaab913b3cf04fd99e0fbd07830fbebff', class: "textarea-wrapper" }, hAsync("div", { key: '23392da0e927d2eb5720fa98499afd2fcb33d840', class: "textarea-container", onClick: this.handleTextareaContainerClick }, hAsync("textarea", { key: '9b9521f4e033002ea346e3054118a114349dd7ee', id: this.inputId, ref: e => (this.textareaElement = e), placeholder: this.placeholder, autofocus: this.autofocus, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, autocomplete: "off", value: this.value, onInput: this.handleTextarea, rows: this.rows, class: clsx(this.resize === 'none' && 'resize-none', this.resize === 'vertical' && 'resize-y', this.resize === 'horizontal' && 'resize-x', this.resize === 'both' && 'resize') }))), (this.description ||
|
|
21508
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '27411a39625e1f03bbe23ae52ceadb04ab0afd4e', class: "description" }, hAsync("slot", { key: '56a5e1a95376899525911e096ded708a4987711d', name: "description" }, this.description))), (this.errorDescription ||
|
|
21509
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '2336848d28c0d67c95607da5bcab3348c4c15e0a', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: 'a200628a9ed75402395e415eab743afddf0a5d27', name: "error-description" }, this.errorDescription)))));
|
|
20931
21510
|
}
|
|
20932
21511
|
static get formAssociated() { return true; }
|
|
20933
21512
|
get el() { return getElement(this); }
|
|
@@ -20983,7 +21562,7 @@ function startsWithIgnoreCase(str, prefix) {
|
|
|
20983
21562
|
return str.toLowerCase().startsWith(prefix.toLowerCase());
|
|
20984
21563
|
}
|
|
20985
21564
|
|
|
20986
|
-
const nvFieldtimeCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldtime{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fieldtime[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldtime[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fieldtime[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldtime[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldtime label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldtime nv-popover{width:100%;display:block}nv-fieldtime nv-popover [data-scope=popover]{padding:var(--list-dropdown-padding);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:100%}nv-fieldtime .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldtime .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out;display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%;min-height:40px;gap:0;padding-left:var(--form-field-padding-x)}nv-fieldtime .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtime .input-container:focus-within,nv-fieldtime .input-container:focus-within:hover,nv-fieldtime .input-container:focus,nv-fieldtime .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldtime .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldtime .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldtime .input-container input.time-input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;width:100%;min-width:24px;flex:0 0 24px;text-align:center;padding:0;margin:0}nv-fieldtime .input-container input.time-input:focus{outline:none}nv-fieldtime .input-container input.time-input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldtime .input-container input.time-input[type=password]::-ms-clear,nv-fieldtime .input-container input.time-input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldtime .input-container input.time-input::-webkit-inner-spin-button,nv-fieldtime .input-container input.time-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}nv-fieldtime .input-container span{width:100%;text-align:center;min-width:24px;flex:0 0 24px;padding:0 4px;color:var(--components-form-field-content-text)}nv-fieldtime .input-container>nv-iconbutton{border:0px;border-radius:0px;margin-left:auto}nv-fieldtime .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldtime .input-container nv-icon.validation{color:var(--nv-field-border-default);position:absolute;right:50px;top:50%;transform:translateY(-50%)}nv-fieldtime .input-container:focus,nv-fieldtime .input-container:focus-within{border-color:var(--color-focus-brand);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--color-focus-brand)}nv-fieldtime .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtime .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}nv-fieldtime hr{border:none;border-top:1px solid var(--dropdown-divider-color, #ccc);margin:0.5rem 0}nv-fieldtime .time-dropdown{width:100%}nv-fieldtime .time-dropdown .time-columns{display:flex;justify-content:flex-start;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column{flex:1;text-align:center;padding-right:2px;max-height:200px;overflow-y:auto;scroll-behavior:smooth;scrollbar-gutter:stable both-edges}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar{width:6px;height:6px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column:last-child{border-right:none}nv-fieldtime .time-dropdown .time-columns .time-column .time-option{padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);text-align:center;cursor:pointer;transition:background-color 0.2s;height:40px;border-radius:var(--list-dropdown-item-radius);display:flex;justify-content:center;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:hover{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-list-dropdown-item-label-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus,nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus-within{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-list-dropdown-item-label-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.selected{background-color:var(--components-list-dropdown-item-background-active);color:var(--components-list-dropdown-item-label-active);border-width:1px;border-style:solid;border-color:var(--components-list-dropdown-item-border-active)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.highlighted{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}";
|
|
21565
|
+
const nvFieldtimeCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldtime{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fieldtime[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldtime[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fieldtime[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldtime[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldtime label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldtime nv-popover{width:100%;display:block}nv-fieldtime nv-popover [data-scope=popover]{padding:var(--list-dropdown-padding);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:100%}nv-fieldtime .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldtime .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out;display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%;min-height:40px;gap:0;padding-left:var(--form-field-padding-x)}nv-fieldtime .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtime .input-container:focus-within,nv-fieldtime .input-container:focus-within:hover,nv-fieldtime .input-container:focus,nv-fieldtime .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldtime .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldtime .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldtime .input-container input.time-input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;width:100%;min-width:24px;flex:0 0 24px;text-align:center;padding:0;margin:0}nv-fieldtime .input-container input.time-input:focus{outline:none}nv-fieldtime .input-container input.time-input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldtime .input-container input.time-input[type=password]::-ms-clear,nv-fieldtime .input-container input.time-input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldtime .input-container input.time-input::-webkit-inner-spin-button,nv-fieldtime .input-container input.time-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}nv-fieldtime .input-container span{width:100%;text-align:center;min-width:24px;flex:0 0 24px;padding:0 4px;color:var(--components-form-field-content-text)}nv-fieldtime .input-container>nv-iconbutton{border:0px;border-radius:0px;margin-left:auto}nv-fieldtime .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldtime .input-container nv-icon.validation{color:var(--nv-field-border-default);position:absolute;right:50px;top:50%;transform:translateY(-50%)}nv-fieldtime .input-container:focus,nv-fieldtime .input-container:focus-within{border-color:var(--color-focus-brand);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--color-focus-brand)}nv-fieldtime .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtime .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}nv-fieldtime hr{border:none;border-top:1px solid var(--dropdown-divider-color, #ccc);margin:0.5rem 0}nv-fieldtime .time-dropdown{width:100%}nv-fieldtime .time-dropdown .time-columns{display:flex;justify-content:flex-start;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column{flex:1;text-align:center;max-height:200px;overflow-y:auto;scroll-behavior:smooth;scrollbar-gutter:stable both-edges;scrollbar-gutter:auto}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar{width:6px;height:6px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column:last-child{border-right:none}nv-fieldtime .time-dropdown .time-columns .time-column .time-option{padding:var(--calendar-padding);text-align:center;cursor:pointer;transition:background-color 0.2s;border-radius:var(--list-dropdown-item-radius);color:var(--components-calendar-cell-text);font-size:var(--font-size-sm);display:flex;justify-content:center;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:hover{background-color:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus,nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus-within{background-color:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.selected{background-color:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.highlighted{background-color:var(--components-calendar-cell-background-hover);color:var(--components-menu-contextual-item-content-hover)}";
|
|
20987
21566
|
var NvFieldtimeStyle0 = nvFieldtimeCss;
|
|
20988
21567
|
|
|
20989
21568
|
/**
|
|
@@ -21955,26 +22534,26 @@ class NvFieldtime {
|
|
|
21955
22534
|
}, key: `${option}-${index}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
21956
22535
|
}
|
|
21957
22536
|
render() {
|
|
21958
|
-
return (hAsync(Host, { key: '
|
|
21959
|
-
hAsync("input", { key: '
|
|
22537
|
+
return (hAsync(Host, { key: 'a8d08a4dac97430398e3f769f353e91ef08de9c0', onclick: e => this.handleHostClick(e) }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'e7d4a858f6194f085144fd59894ad54220a17a03', htmlFor: this.inputId }, hAsync("slot", { key: '69901d62cdd32e3d7d1efe14066ef5ab42eed0d5', name: "label" }, this.label))), hAsync("nv-popover", { key: '2541a920b4ce7b98515c58867ab1ab25d9cace9d', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, hAsync("div", { key: '2f501df272714fd912b0d0981c27db89b46ae424', class: "input-wrapper", slot: "trigger" }, hAsync("slot", { key: '41ee670692e5facaa0ddd065a2a79a66825d207b', name: "before-input" }), hAsync("div", { key: '24e41277073946b78ae4d1f8f38173045e699845', class: "input-container" }, hAsync("slot", { key: '6db3ce5df588697b9183225be3b603a3b51a156f', name: "leading-input" }), startsWithIgnoreCase(this.format, 'HH') && [
|
|
22538
|
+
hAsync("input", { key: 'ee093f322342ac3572ad76c48ebc2ecbed63ac01', ref: el => (this.inputElements[TimeType.Hours] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.hours, onInput: e => this.handleInputChange(e, TimeType.Hours), placeholder: this.format.includes('hh') ? 'hh' : 'HH', inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Hours), name: this.name
|
|
21960
22539
|
? `${TimeType.Hours}-${this.name}`
|
|
21961
22540
|
: TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
21962
22541
|
], this.format.includes('mm') && [
|
|
21963
|
-
hAsync("span", { key: '
|
|
21964
|
-
hAsync("input", { key: '
|
|
22542
|
+
hAsync("span", { key: '9cec44d707277c298ba7a70934e1593a12207799' }, ":"),
|
|
22543
|
+
hAsync("input", { key: '2acaf3b143f0f5e9e04005213bdfe9ea5334bf53', ref: el => (this.inputElements[TimeType.Minutes] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.minutes, onInput: e => this.handleInputChange(e, TimeType.Minutes), placeholder: "mm", inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Minutes), name: this.name
|
|
21965
22544
|
? `${TimeType.Minutes}-${this.name}`
|
|
21966
22545
|
: TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
21967
22546
|
], this.format.includes('ss') && [
|
|
21968
|
-
hAsync("span", { key: '
|
|
21969
|
-
hAsync("input", { key: '
|
|
22547
|
+
hAsync("span", { key: '07e0b374bdcad92339c4ddc10d71cc963a8a71ff' }, ":"),
|
|
22548
|
+
hAsync("input", { key: '84838544717af0bc967258d91fbee2748072be4f', ref: el => (this.inputElements[TimeType.Seconds] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.seconds, onInput: e => this.handleInputChange(e, TimeType.Seconds), placeholder: "ss", inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Seconds), name: this.name
|
|
21970
22549
|
? `${TimeType.Seconds}-${this.name}`
|
|
21971
22550
|
: TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
21972
|
-
], hAsync("nv-iconbutton", { key: '
|
|
22551
|
+
], hAsync("nv-iconbutton", { key: 'ec8d0d5c7eb9aa720deef07f23c712287246f3a8', name: 'clock', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide time picker' : 'Show time picker', "aria-pressed": this.open.toString(), onClick: () => this.HandleDropdownIconClick() }), this.error && (hAsync("nv-icon", { key: 'dbef458469153ef93ad94903a2bcf439f6243d40', name: "alert-circle", class: "validation", size: "sm" })), this.success && (hAsync("nv-icon", { key: '3dfb5e5b32dc91ebe53502f9117f628ae79bf57c', name: "circle-check", class: "validation", size: "sm" }))), hAsync("slot", { key: '744e72f9c7828f8487f58265dac564670ba26329', name: "after-input" })), hAsync("div", { key: '72dc9823125b9109bc27e049936007e796a97a06', class: "time-dropdown", slot: "content" }, hAsync("div", { key: '1b1f8241a25500cf9ce22ebea20becd6882760cc', class: "time-columns" }, startsWithIgnoreCase(this.format, 'HH') &&
|
|
21973
22552
|
this.RenderTimeOptionsColumn(TimeType.Hours), this.format.includes('mm') &&
|
|
21974
22553
|
this.RenderTimeOptionsColumn(TimeType.Minutes), this.format.includes('ss') &&
|
|
21975
22554
|
this.RenderTimeOptionsColumn(TimeType.Seconds)))), (this.description ||
|
|
21976
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
21977
|
-
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '
|
|
22555
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '57985d7f2626853a24db80d56607b5453b00b6c9', class: "description" }, hAsync("slot", { key: 'ba3383c066c6bcac3b1e6183b84528723de9cddc', name: "description" }, this.description))), (this.errorDescription ||
|
|
22556
|
+
this.el.querySelector('[slot="error-description"]')) && (hAsync("div", { key: '6f02373e082fcc7e34e0d35441783122cd7c0266', hidden: !this.error, class: "error-description" }, hAsync("slot", { key: '43508d63829f53f5b5c718f1a112abbe5919b900', name: "error-description" }, this.errorDescription)))));
|
|
21978
22557
|
}
|
|
21979
22558
|
static get formAssociated() { return true; }
|
|
21980
22559
|
get el() { return getElement(this); }
|
|
@@ -22079,7 +22658,7 @@ class NvIcon {
|
|
|
22079
22658
|
/****************************************************************************/
|
|
22080
22659
|
//#region RENDER
|
|
22081
22660
|
render() {
|
|
22082
|
-
return (hAsync(Host, { key: '
|
|
22661
|
+
return (hAsync(Host, { key: '8cb4ada2454c7e9676cd088397eb4416ccab2d82', class: clsx(this.color && `${this.color}`), role: "img", "aria-label": `${this.name}-icon` }, hAsync("svg", { key: '4934c79fa096935be509ff6a641361dac44a4a9f', stroke: "currentColor", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: `nv-icon-${this.size}` }, hAsync("use", { key: '54e429910d5f9916f98e4cdef0be5f2f620df51e', href: `#${this.name}` }))));
|
|
22083
22662
|
}
|
|
22084
22663
|
static get style() { return NvIconStyle0; }
|
|
22085
22664
|
static get cmpMeta() { return {
|
|
@@ -22223,7 +22802,7 @@ class NvIconbutton {
|
|
|
22223
22802
|
/****************************************************************************/
|
|
22224
22803
|
//#region RENDER
|
|
22225
22804
|
render() {
|
|
22226
|
-
return (hAsync(Host, { key: '
|
|
22805
|
+
return (hAsync(Host, { key: 'a59a26804e97dfbacf40fae6678b3b3ba66440a9', role: "button", type: this.type, tabindex: "0", disabled: this.disabled ? true : undefined, class: clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && hAsync("nv-loader", { key: '7cbe3502ff1c6fd76f7a9ab68128f5d5a0bbf7fa', size: this.size }), !this.loading && hAsync("nv-icon", { key: '46cbb9c609991ea27316b8909551d303559652fc', name: this.name, size: this.size }), hAsync("slot", { key: 'd2ca8959b7be7600e56fe23437e5da07d58985c2' })));
|
|
22227
22806
|
}
|
|
22228
22807
|
static get formAssociated() { return true; }
|
|
22229
22808
|
get el() { return getElement(this); }
|
|
@@ -22271,7 +22850,7 @@ class NvLoader {
|
|
|
22271
22850
|
//#region RENDER
|
|
22272
22851
|
/* <slot> empty to force rendering change */
|
|
22273
22852
|
render() {
|
|
22274
|
-
return (hAsync(Host, { key: '
|
|
22853
|
+
return (hAsync(Host, { key: '049afa243c1ce99643408d86afa99e69c5468b8b', class: clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
|
|
22275
22854
|
}
|
|
22276
22855
|
static get style() { return NvLoaderStyle0; }
|
|
22277
22856
|
static get cmpMeta() { return {
|
|
@@ -22482,7 +23061,7 @@ class NvMenu {
|
|
|
22482
23061
|
});
|
|
22483
23062
|
}
|
|
22484
23063
|
render() {
|
|
22485
|
-
return (hAsync(Host, { key: '
|
|
23064
|
+
return (hAsync(Host, { key: '25e38953e8d6e4c591087f3964822eed76cd3775' }, hAsync("slot", { key: 'f6ad4e16d740129dc296a3e0b2c5dffdd063b182', name: "trigger" }), hAsync("nv-popover", { key: 'c355356a877bb0cedfd69bfaf4e724c06612c1e5', ref: el => (this.popoverElement = el), triggerMode: "click", triggerElement: this.triggerElement, placement: this.placement, nested: this.nested, open: this.open }, this.items ? (hAsync("ul", { slot: "content" }, this.renderMenuItems())) : (hAsync("slot", { name: "content" })))));
|
|
22486
23065
|
}
|
|
22487
23066
|
get el() { return getElement(this); }
|
|
22488
23067
|
static get style() { return NvMenuStyle0; }
|
|
@@ -22553,7 +23132,7 @@ class NvMenuitem {
|
|
|
22553
23132
|
/****************************************************************************/
|
|
22554
23133
|
//#region RENDER
|
|
22555
23134
|
render() {
|
|
22556
|
-
return (hAsync(Host, { key: '
|
|
23135
|
+
return (hAsync(Host, { key: '327165c89f4e5decf8dc4b7b28e18562e528056d', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && hAsync("nv-icon", { key: '4247d922bca3797dc3f2917218749a8d3c038df1', name: this.icon }), hAsync("slot", { key: '1f81464ccf47a5bd918873ef70d3d3385e870638' }), this.label && hAsync("span", { key: '113358a0cacfa53710ec0049a8e1c5e981de5b15', "data-scope": "text" }, this.label), this.shortcut && !this.hasSubmenu && hAsync("kbd", { key: 'ee7c773b89bf1f55876cf297600247883cd54937' }, this.shortcut), this.hasSubmenu && hAsync("nv-icon", { key: '70cbe2df51d9fbffe3b474b54e87aa06801acef7', name: "chevron-right" })));
|
|
22557
23136
|
}
|
|
22558
23137
|
get el() { return getElement(this); }
|
|
22559
23138
|
static get style() { return NvMenuitemStyle0; }
|
|
@@ -24938,7 +25517,7 @@ class NvPopover {
|
|
|
24938
25517
|
/****************************************************************************/
|
|
24939
25518
|
//#region RENDER
|
|
24940
25519
|
render() {
|
|
24941
|
-
return (hAsync(Host, { key: '
|
|
25520
|
+
return (hAsync(Host, { key: '27f6f8acc148b3dc2b16a391c54a4a1de0637a57' }, hAsync("slot", { key: 'd25614b3bfc5565d3729da11f6f83b4d92e83e19', name: "trigger" }), hAsync("div", { key: '3b777862573405b2bb2a377750d9bb859a4bb20b', "data-scope": "popover", hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (hAsync("div", { key: 'dda88155630bca69ec06a766e2999ed369d5d6c6', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), hAsync("slot", { key: '51eaf873fe239d3c4106e997f6cdd37b1bb29074', name: "content" }))));
|
|
24942
25521
|
}
|
|
24943
25522
|
get el() { return getElement(this); }
|
|
24944
25523
|
static get watchers() { return {
|
|
@@ -24983,7 +25562,7 @@ class NvRow {
|
|
|
24983
25562
|
/****************************************************************************/
|
|
24984
25563
|
//#region RENDER
|
|
24985
25564
|
render() {
|
|
24986
|
-
return (hAsync(Host, { key: '
|
|
25565
|
+
return (hAsync(Host, { key: 'daad5f10b72b95468ac50a3deab7faf87769be42' }, hAsync("slot", { key: '16509b69358739997fe97a45ea9476f30682de2b' })));
|
|
24987
25566
|
}
|
|
24988
25567
|
static get style() { return NvRowStyle0; }
|
|
24989
25568
|
static get cmpMeta() { return {
|
|
@@ -25018,7 +25597,7 @@ class NvStack {
|
|
|
25018
25597
|
/****************************************************************************/
|
|
25019
25598
|
//#region RENDER
|
|
25020
25599
|
render() {
|
|
25021
|
-
return (hAsync(Host, { key: '
|
|
25600
|
+
return (hAsync(Host, { key: '0a93c321e46c7e17ac0efe09556ee4447fec5f74', class: clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, hAsync("slot", { key: 'faf55f3f579311c333e1ea66f1a19ace98594377' })));
|
|
25022
25601
|
}
|
|
25023
25602
|
static get style() { return NvStackStyle0; }
|
|
25024
25603
|
static get cmpMeta() { return {
|
|
@@ -25355,14 +25934,14 @@ class NvTable {
|
|
|
25355
25934
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
25356
25935
|
? []
|
|
25357
25936
|
: this.table.data;
|
|
25358
|
-
return (hAsync(Host, { key: '
|
|
25937
|
+
return (hAsync(Host, { key: 'a389cee4e6b29cdb852b8b6c0f8fd39926474525' }, hAsync("div", { key: 'ea7629bc0cba0ec1cbe59f6f03ac2527095d9abb', class: "hidden" }, hAsync("slot", { key: 'b070a8e7f54fd3846744bb659447b97547d1c7cf' })), hAsync("slot", { key: 'b0eb0a2d7c98073e88282b1e2e513b9e6a335345', name: "before" }), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (hAsync("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (hAsync("table", { class: "table" }, this.parsedColumns.length > 0 && headerGroups.length > 0 && (hAsync("thead", { class: "table-header" }, hAsync("tr", null, headerGroups &&
|
|
25359
25938
|
headerGroups.map(col => {
|
|
25360
25939
|
return (hAsync("th", { key: col.name }, this.renderTemplate(this.headerTemplateCache.get(col.name), {}) || col.header));
|
|
25361
25940
|
})))), hAsync("tbody", { class: "table-body" }, !rows || rows.length === 0 ? (hAsync("tr", null, hAsync("td", { colSpan: headerGroups.length || 12, class: "no-data" }, this.noDataMessage))) : (rows.map(row => (hAsync("tr", { key: JSON.stringify(row) }, headerGroups.map(col => {
|
|
25362
25941
|
var _a;
|
|
25363
25942
|
return (hAsync("td", null, this.renderTemplate(this.templateCache.get(col.name), row) ||
|
|
25364
25943
|
((_a = row[col.name]) !== null && _a !== void 0 ? _a : this.fallbackValue)));
|
|
25365
|
-
})))))))), hAsync("slot", { key: '
|
|
25944
|
+
})))))))), hAsync("slot", { key: '599e4c1663c3a80375e3c511358be381b06eec2f', name: "after" })));
|
|
25366
25945
|
}
|
|
25367
25946
|
get el() { return getElement(this); }
|
|
25368
25947
|
static get watchers() { return {
|
|
@@ -25482,8 +26061,8 @@ class NvToggle {
|
|
|
25482
26061
|
/****************************************************************************/
|
|
25483
26062
|
//#region RENDER
|
|
25484
26063
|
render() {
|
|
25485
|
-
return (hAsync(Host, { key: '
|
|
25486
|
-
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '
|
|
26064
|
+
return (hAsync(Host, { key: '7aac2ef8519d5c033a0e74461755e2286420032a', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, hAsync("div", { key: 'fb0f560aff50b9d3c2b75ba2b59dd68012f5af10', class: "input-container" }, hAsync("input", { key: '61ff98c20dec0822979f04ad3b3316fc3caac31f', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), hAsync("div", { key: '543ad351428f6ae60e94bd31e3a7a6922c02e5d4', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '42f764c9c4454cf5b8b1fa88c2c43654170a5222', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, hAsync("slot", { key: '125247eeea72b68de829f36ad817a4381541ad07', name: "label" }, this.label))), (this.description ||
|
|
26065
|
+
this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'a2fcd0d39a8f555e7d6b64879e84ff7f011e4901', class: "description" }, hAsync("slot", { key: '4e7af6b6a0a25fcb4d9529dcb1a32cb7c928c7de', name: "description" }, this.description))))));
|
|
25487
26066
|
}
|
|
25488
26067
|
static get formAssociated() { return true; }
|
|
25489
26068
|
get el() { return getElement(this); }
|
|
@@ -25522,6 +26101,7 @@ var NvTooltipStyle0 = nvTooltipCss;
|
|
|
25522
26101
|
class NvTooltip {
|
|
25523
26102
|
constructor(hostRef) {
|
|
25524
26103
|
registerInstance(this, hostRef);
|
|
26104
|
+
this.openChanged = createEvent(this, "openChanged", 7);
|
|
25525
26105
|
/**
|
|
25526
26106
|
* Decides where the tooltip shows up next to the element it’s linked to
|
|
25527
26107
|
* (above, below, to the sides). If there isn’t enough room, it will adjust
|
|
@@ -25535,7 +26115,7 @@ class NvTooltip {
|
|
|
25535
26115
|
*/
|
|
25536
26116
|
this.enterDelay = 0;
|
|
25537
26117
|
}
|
|
25538
|
-
//#endregion
|
|
26118
|
+
//#endregion EVENTS
|
|
25539
26119
|
/****************************************************************************/
|
|
25540
26120
|
//#region LIFECYCLE
|
|
25541
26121
|
componentWillLoad() {
|
|
@@ -25548,7 +26128,7 @@ class NvTooltip {
|
|
|
25548
26128
|
/****************************************************************************/
|
|
25549
26129
|
//#region RENDER
|
|
25550
26130
|
render() {
|
|
25551
|
-
return (hAsync(Host, { key: '
|
|
26131
|
+
return (hAsync(Host, { key: 'ced39f0ebd3ee8eba520e6d6241728e95031dafc' }, hAsync("slot", { key: '2b65cb626604a29e1924e7eb2bbb4e937c1a9e9c' }), hAsync("nv-popover", { key: 'd4c91e52da651c1545b6d7af98c740e08eeaffbf', triggerMode: "hover", hasArrow: true, placement: this.placement, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, hAsync("p", { key: '45805ecf6ffee80f4f81acce2d921ad66585bf2b', slot: "content" }, this.message), hAsync("slot", { key: 'e6a7e80c35c3a87627a50b271c86783fab791338', name: "content" }))));
|
|
25552
26132
|
}
|
|
25553
26133
|
get el() { return getElement(this); }
|
|
25554
26134
|
static get style() { return NvTooltipStyle0; }
|
|
@@ -25568,6 +26148,8 @@ class NvTooltip {
|
|
|
25568
26148
|
}
|
|
25569
26149
|
|
|
25570
26150
|
registerComponents([
|
|
26151
|
+
NvAccordion,
|
|
26152
|
+
NvAccordionItem,
|
|
25571
26153
|
NvAlert,
|
|
25572
26154
|
NvAvatar,
|
|
25573
26155
|
NvBadge,
|