@nova-design-system/nova-webcomponents 3.2.0 → 3.3.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/{index-108ddff0.js → index-c56424e5.js} +16 -184
- package/dist/cjs/index-c56424e5.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/native.cjs.js +2 -23
- package/dist/cjs/native.cjs.js.map +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +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 +371 -138
- 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 +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +45 -11
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +75 -44
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +2 -2
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldslider.cjs.entry.js +25 -20
- package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +2 -2
- 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 +1 -1
- 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 +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 +1 -1
- package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.js +235 -136
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js +12 -3
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -1
- package/dist/collection/components/nv-calendar/partials/calendar-actions.js +11 -0
- package/dist/collection/components/nv-calendar/partials/calendar-actions.js.map +1 -0
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js +24 -0
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js.map +1 -0
- package/dist/collection/components/nv-calendar/partials/calendar-header.js +38 -0
- package/dist/collection/components/nv-calendar/partials/calendar-header.js.map +1 -0
- package/dist/collection/components/nv-calendar/partials/calendar-shortcuts.js +22 -0
- package/dist/collection/components/nv-calendar/partials/calendar-shortcuts.js.map +1 -0
- package/dist/collection/components/nv-calendar/partials/day-cell.js +31 -0
- package/dist/collection/components/nv-calendar/partials/day-cell.js.map +1 -0
- package/dist/collection/components/nv-calendar/partials/index.js +7 -0
- package/dist/collection/components/nv-calendar/partials/index.js.map +1 -0
- package/dist/collection/components/nv-calendar/partials/week-numbers.js +36 -0
- package/dist/collection/components/nv-calendar/partials/week-numbers.js.map +1 -0
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +692 -651
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -1
- package/dist/collection/components/nv-calendar/test/partials/calendar-actions.logic.test.js +169 -0
- package/dist/collection/components/nv-calendar/test/partials/calendar-actions.logic.test.js.map +1 -0
- package/dist/collection/components/nv-calendar/test/partials/calendar-grid.logic.test.js +262 -0
- package/dist/collection/components/nv-calendar/test/partials/calendar-grid.logic.test.js.map +1 -0
- package/dist/collection/components/nv-calendar/test/partials/calendar-header.logic.test.js +208 -0
- package/dist/collection/components/nv-calendar/test/partials/calendar-header.logic.test.js.map +1 -0
- package/dist/collection/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.js +355 -0
- package/dist/collection/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.js.map +1 -0
- package/dist/collection/components/nv-calendar/test/partials/day-cell.logic.test.js +250 -0
- package/dist/collection/components/nv-calendar/test/partials/day-cell.logic.test.js.map +1 -0
- package/dist/collection/components/nv-calendar/test/partials/week-numbers.logic.test.js +217 -0
- package/dist/collection/components/nv-calendar/test/partials/week-numbers.logic.test.js.map +1 -0
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +56 -16
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +44 -0
- package/dist/collection/components/nv-fielddate/test/nv-fielddate.logic.test.js +196 -0
- package/dist/collection/components/nv-fielddate/test/nv-fielddate.logic.test.js.map +1 -0
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +99 -43
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +44 -0
- package/dist/collection/components/nv-fielddaterange/test/nv-fielddaterange.logic.test.js +137 -0
- package/dist/collection/components/nv-fielddaterange/test/nv-fielddaterange.logic.test.js.map +1 -0
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +46 -0
- package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +46 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +44 -0
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +44 -0
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +44 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +22 -22
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +30 -29
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +91 -20
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +44 -0
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +38 -0
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +44 -0
- package/dist/components/index.js +1 -1
- package/dist/components/nv-alert.js +2 -2
- 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 +3 -3
- package/dist/components/nv-datagridcolumn.js +1 -1
- package/dist/components/nv-dialog.js +6 -6
- 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 +53 -25
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +85 -61
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +7 -7
- package/dist/components/nv-fielddropdown.js.map +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +9 -9
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +5 -5
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +5 -5
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +1 -1
- package/dist/components/nv-fieldselect.js +5 -5
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldslider.js +27 -22
- package/dist/components/nv-fieldslider.js.map +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +2 -2
- package/dist/components/nv-fieldtextarea.js.map +1 -1
- package/dist/components/nv-fieldtime.js +6 -6
- 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 +1 -1
- package/dist/components/nv-tablecolumn.js +1 -1
- package/dist/components/nv-toggle.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-d63f1cbe.js → p-2ae214d2.js} +3 -3
- package/dist/components/{p-d63f1cbe.js.map → p-2ae214d2.js.map} +1 -1
- package/dist/components/{p-c0a91091.js → p-3e32b5a1.js} +3 -3
- package/dist/components/{p-c0a91091.js.map → p-3e32b5a1.js.map} +1 -1
- package/dist/components/{p-4656efae.js → p-5e90b9b8.js} +376 -165
- package/dist/components/p-5e90b9b8.js.map +1 -0
- package/dist/components/{p-cbe9521f.js → p-5ee4015d.js} +3 -3
- package/dist/components/{p-cbe9521f.js.map → p-5ee4015d.js.map} +1 -1
- package/dist/components/{p-33e231f4.js → p-6277f746.js} +2 -2
- package/dist/components/{p-33e231f4.js.map → p-6277f746.js.map} +1 -1
- package/dist/components/{p-f0a5e7e4.js → p-7935c1cb.js} +4 -4
- package/dist/components/{p-f0a5e7e4.js.map → p-7935c1cb.js.map} +1 -1
- package/dist/components/{p-f1859ddc.js → p-8d92f0e1.js} +3 -3
- package/dist/components/{p-f1859ddc.js.map → p-8d92f0e1.js.map} +1 -1
- package/dist/components/{p-cbdc2c8b.js → p-95a7581c.js} +5 -5
- package/dist/components/{p-cbdc2c8b.js.map → p-95a7581c.js.map} +1 -1
- package/dist/components/{p-dd2273a3.js → p-9e6e26cb.js} +2 -2
- package/dist/components/{p-dd2273a3.js.map → p-9e6e26cb.js.map} +1 -1
- package/dist/components/{p-76a30bf1.js → p-9fa0de38.js} +2 -2
- package/dist/components/{p-76a30bf1.js.map → p-9fa0de38.js.map} +1 -1
- package/dist/components/{p-679e0fa9.js → p-aff3ed68.js} +10 -175
- package/dist/components/p-aff3ed68.js.map +1 -0
- package/dist/components/{p-d19b41d2.js → p-b6d858b2.js} +2 -2
- package/dist/components/{p-d19b41d2.js.map → p-b6d858b2.js.map} +1 -1
- package/dist/components/{p-83c8873a.js → p-bb6d1e4e.js} +2 -2
- package/dist/components/{p-83c8873a.js.map → p-bb6d1e4e.js.map} +1 -1
- package/dist/components/{p-581e67cc.js → p-c07c32d2.js} +3 -3
- package/dist/components/{p-581e67cc.js.map → p-c07c32d2.js.map} +1 -1
- package/dist/components/{p-04cb3a6f.js → p-c9006520.js} +4 -4
- package/dist/components/{p-04cb3a6f.js.map → p-c9006520.js.map} +1 -1
- package/dist/components/{p-07a89754.js → p-e28c4707.js} +3 -3
- package/dist/components/{p-07a89754.js.map → p-e28c4707.js.map} +1 -1
- package/dist/components/{p-0ab80d95.js → p-eabbc885.js} +2 -2
- package/dist/components/{p-0ab80d95.js.map → p-eabbc885.js.map} +1 -1
- package/dist/esm/{constants-b97e736d.js → constants-4faa1fae.js} +2 -2
- package/dist/esm/{constants-b97e736d.js.map → constants-4faa1fae.js.map} +1 -1
- package/dist/esm/{index-8f0e5f19.js → index-a1936cd0.js} +17 -184
- package/dist/esm/index-a1936cd0.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/native.js +3 -24
- package/dist/esm/native.js.map +1 -1
- package/dist/esm/nv-alert.entry.js +2 -2
- package/dist/esm/nv-avatar.entry.js +2 -2
- package/dist/esm/nv-badge_2.entry.js +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 +2 -2
- package/dist/esm/nv-calendar.entry.js +372 -139
- 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 +2 -2
- package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
- package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fielddate.entry.js +45 -11
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +75 -44
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +2 -2
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +2 -2
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +2 -2
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +2 -2
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +1 -1
- package/dist/esm/nv-fieldselect.entry.js +2 -2
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldslider.entry.js +25 -20
- package/dist/esm/nv-fieldslider.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +2 -2
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +2 -2
- package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +3 -3
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-iconbutton_2.entry.js +1 -1
- 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 +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 +1 -1
- package/dist/esm/nv-tablecolumn.entry.js +1 -1
- package/dist/esm/nv-toggle.entry.js +1 -1
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/index.esm.js +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-050d6c6c.entry.js +2 -0
- package/dist/native/{p-adc96c3a.entry.js.map → p-050d6c6c.entry.js.map} +1 -1
- package/dist/native/{p-519b4819.entry.js → p-08ca678c.entry.js} +2 -2
- package/dist/native/p-1a5d3b87.entry.js +2 -0
- package/dist/native/{p-7c676f2c.entry.js.map → p-1a5d3b87.entry.js.map} +1 -1
- package/dist/native/{p-0323daf6.entry.js → p-1c1ecd38.entry.js} +2 -2
- package/dist/native/{p-16a4cdf3.entry.js → p-1d98477d.entry.js} +2 -2
- package/dist/native/{p-19fb0fd0.entry.js → p-2006f5d4.entry.js} +2 -2
- package/dist/native/p-26cf4938.entry.js +2 -0
- package/dist/native/p-26cf4938.entry.js.map +1 -0
- package/dist/native/p-3817efb2.entry.js +2 -0
- package/dist/native/{p-fb897f7d.entry.js.map → p-3817efb2.entry.js.map} +1 -1
- package/dist/native/p-45459dbb.entry.js +2 -0
- package/dist/native/{p-5382eab2.entry.js.map → p-45459dbb.entry.js.map} +1 -1
- package/dist/native/p-45cbe6e4.entry.js +2 -0
- package/dist/native/p-46428304.entry.js +2 -0
- package/dist/native/p-46428304.entry.js.map +1 -0
- package/dist/native/{p-7092a675.entry.js → p-4f9cdf0b.entry.js} +2 -2
- package/dist/native/{p-cfe0a6c6.entry.js → p-58bb90ad.entry.js} +2 -2
- package/dist/native/p-59b07b36.entry.js +2 -0
- package/dist/native/{p-987c79d8.entry.js.map → p-59b07b36.entry.js.map} +1 -1
- package/dist/native/{p-4c0d81b0.entry.js → p-5b6c59e0.entry.js} +2 -2
- package/dist/native/p-6029e51b.entry.js +2 -0
- package/dist/native/{p-fc3bea07.entry.js.map → p-6029e51b.entry.js.map} +1 -1
- package/dist/native/{p-a2c0f1a7.entry.js → p-60c64f2b.entry.js} +2 -2
- package/dist/native/{p-3f2b6a22.entry.js → p-64a76565.entry.js} +2 -2
- package/dist/native/{p-c930adb7.entry.js → p-83288db0.entry.js} +2 -2
- package/dist/native/p-838f7842.entry.js +2 -0
- package/dist/native/{p-b0fc08e7.entry.js.map → p-838f7842.entry.js.map} +1 -1
- package/dist/native/{p-407fc32d.entry.js → p-86ab23ea.entry.js} +2 -2
- package/dist/native/p-87784622.entry.js +2 -0
- package/dist/native/p-8fb4e5c0.entry.js +2 -0
- package/dist/native/{p-5ba3fc3c.entry.js.map → p-8fb4e5c0.entry.js.map} +1 -1
- package/dist/native/{p-05d95d4d.entry.js → p-914da1e1.entry.js} +2 -2
- package/dist/native/p-abbe5d69.entry.js +2 -0
- package/dist/native/{p-7c6edd1c.entry.js.map → p-abbe5d69.entry.js.map} +1 -1
- package/dist/native/p-abc251aa.entry.js +2 -0
- package/dist/native/p-abc251aa.entry.js.map +1 -0
- package/dist/native/{p-221b8f72.entry.js → p-ad128108.entry.js} +2 -2
- package/dist/native/{p-f0ddf60b.entry.js → p-b5b9190a.entry.js} +2 -2
- package/dist/native/{p-de2c07a6.entry.js → p-b8f2c1e7.entry.js} +2 -2
- package/dist/native/{p-9fba8663.entry.js → p-d040bd61.entry.js} +2 -2
- package/dist/native/p-d0a33e64.js +3 -0
- package/dist/native/p-d0a33e64.js.map +1 -0
- package/dist/native/{p-ed488498.entry.js → p-d21b2da2.entry.js} +3 -3
- package/dist/native/{p-0ec1e2e3.entry.js → p-d53e8795.entry.js} +2 -2
- package/dist/native/p-dc7dd7f3.entry.js +2 -0
- package/dist/native/{p-21e7132f.entry.js.map → p-dc7dd7f3.entry.js.map} +1 -1
- package/dist/native/p-e2c1992e.entry.js +2 -0
- package/dist/native/{p-60b204ac.entry.js.map → p-e2c1992e.entry.js.map} +1 -1
- package/dist/native/{p-f85c08f1.js → p-e2d0a77d.js} +2 -2
- package/dist/native/p-ed6019fe.entry.js +2 -0
- package/dist/native/p-ed6019fe.entry.js.map +1 -0
- package/dist/native/p-f94d7054.entry.js +2 -0
- package/dist/native/{p-aa86af25.entry.js.map → p-f94d7054.entry.js.map} +1 -1
- package/dist/native/p-fdea17ce.entry.js +2 -0
- package/dist/native/{p-ef76178b.entry.js.map → p-fdea17ce.entry.js.map} +1 -1
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +25 -45
- package/dist/types/components/nv-calendar/partials/calendar-actions.d.ts +19 -0
- package/dist/types/components/nv-calendar/partials/calendar-grid.d.ts +46 -0
- package/dist/types/components/nv-calendar/partials/calendar-header.d.ts +38 -0
- package/dist/types/components/nv-calendar/partials/calendar-shortcuts.d.ts +35 -0
- package/dist/types/components/nv-calendar/partials/day-cell.d.ts +35 -0
- package/dist/types/components/nv-calendar/partials/index.d.ts +6 -0
- package/dist/types/components/nv-calendar/partials/week-numbers.d.ts +30 -0
- package/dist/types/components/nv-calendar/test/partials/calendar-actions.logic.test.d.ts +1 -0
- package/dist/types/components/nv-calendar/test/partials/calendar-grid.logic.test.d.ts +1 -0
- package/dist/types/components/nv-calendar/test/partials/calendar-header.logic.test.d.ts +1 -0
- package/dist/types/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.d.ts +1 -0
- package/dist/types/components/nv-calendar/test/partials/day-cell.logic.test.d.ts +1 -0
- package/dist/types/components/nv-calendar/test/partials/week-numbers.logic.test.d.ts +1 -0
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +21 -9
- package/dist/types/components/nv-fielddate/test/nv-fielddate.logic.test.d.ts +1 -0
- package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +17 -6
- package/dist/types/components/nv-fielddaterange/test/nv-fielddaterange.logic.test.d.ts +1 -0
- package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +5 -6
- package/dist/types/components.d.ts +37 -38
- package/dist/vscode-data.json +4 -4
- package/hydrate/index.js +530 -229
- package/hydrate/index.mjs +530 -229
- package/package.json +1 -1
- package/dist/cjs/index-108ddff0.js.map +0 -1
- package/dist/components/p-4656efae.js.map +0 -1
- package/dist/components/p-679e0fa9.js.map +0 -1
- package/dist/esm/index-8f0e5f19.js.map +0 -1
- package/dist/native/p-1e3d3374.entry.js +0 -2
- package/dist/native/p-21e7132f.entry.js +0 -2
- package/dist/native/p-2805f9f2.entry.js +0 -2
- package/dist/native/p-2805f9f2.entry.js.map +0 -1
- package/dist/native/p-5382eab2.entry.js +0 -2
- package/dist/native/p-5ba3fc3c.entry.js +0 -2
- package/dist/native/p-60b204ac.entry.js +0 -2
- package/dist/native/p-711a7778.js +0 -3
- package/dist/native/p-711a7778.js.map +0 -1
- package/dist/native/p-759c9ce4.entry.js +0 -2
- package/dist/native/p-759c9ce4.entry.js.map +0 -1
- package/dist/native/p-7c676f2c.entry.js +0 -2
- package/dist/native/p-7c6edd1c.entry.js +0 -2
- package/dist/native/p-987c79d8.entry.js +0 -2
- package/dist/native/p-aa86af25.entry.js +0 -2
- package/dist/native/p-adc96c3a.entry.js +0 -2
- package/dist/native/p-b0fc08e7.entry.js +0 -2
- package/dist/native/p-d07ab618.entry.js +0 -2
- package/dist/native/p-dac0089b.entry.js +0 -2
- package/dist/native/p-dac0089b.entry.js.map +0 -1
- package/dist/native/p-ef76178b.entry.js +0 -2
- package/dist/native/p-f39803d9.entry.js +0 -2
- package/dist/native/p-f39803d9.entry.js.map +0 -1
- package/dist/native/p-fb897f7d.entry.js +0 -2
- package/dist/native/p-fc3bea07.entry.js +0 -2
- /package/dist/native/{p-519b4819.entry.js.map → p-08ca678c.entry.js.map} +0 -0
- /package/dist/native/{p-0323daf6.entry.js.map → p-1c1ecd38.entry.js.map} +0 -0
- /package/dist/native/{p-16a4cdf3.entry.js.map → p-1d98477d.entry.js.map} +0 -0
- /package/dist/native/{p-19fb0fd0.entry.js.map → p-2006f5d4.entry.js.map} +0 -0
- /package/dist/native/{p-1e3d3374.entry.js.map → p-45cbe6e4.entry.js.map} +0 -0
- /package/dist/native/{p-7092a675.entry.js.map → p-4f9cdf0b.entry.js.map} +0 -0
- /package/dist/native/{p-cfe0a6c6.entry.js.map → p-58bb90ad.entry.js.map} +0 -0
- /package/dist/native/{p-4c0d81b0.entry.js.map → p-5b6c59e0.entry.js.map} +0 -0
- /package/dist/native/{p-a2c0f1a7.entry.js.map → p-60c64f2b.entry.js.map} +0 -0
- /package/dist/native/{p-3f2b6a22.entry.js.map → p-64a76565.entry.js.map} +0 -0
- /package/dist/native/{p-c930adb7.entry.js.map → p-83288db0.entry.js.map} +0 -0
- /package/dist/native/{p-407fc32d.entry.js.map → p-86ab23ea.entry.js.map} +0 -0
- /package/dist/native/{p-d07ab618.entry.js.map → p-87784622.entry.js.map} +0 -0
- /package/dist/native/{p-05d95d4d.entry.js.map → p-914da1e1.entry.js.map} +0 -0
- /package/dist/native/{p-221b8f72.entry.js.map → p-ad128108.entry.js.map} +0 -0
- /package/dist/native/{p-f0ddf60b.entry.js.map → p-b5b9190a.entry.js.map} +0 -0
- /package/dist/native/{p-de2c07a6.entry.js.map → p-b8f2c1e7.entry.js.map} +0 -0
- /package/dist/native/{p-9fba8663.entry.js.map → p-d040bd61.entry.js.map} +0 -0
- /package/dist/native/{p-ed488498.entry.js.map → p-d21b2da2.entry.js.map} +0 -0
- /package/dist/native/{p-0ec1e2e3.entry.js.map → p-d53e8795.entry.js.map} +0 -0
- /package/dist/native/{p-f85c08f1.js.map → p-e2d0a77d.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as a,
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as a,H as s}from"./p-d0a33e64.js";import{c as n}from"./p-8a1a6e56.js";const c="nv-stack{display:flex;align-items:center;justify-content:flex-start;flex-direction:row}nv-stack nv-col{display:flex}nv-stack:not(nv-row){flex-wrap:nowrap}nv-stack>.nv-stack-item-flex{flex-shrink:1;flex-grow:1}nv-stack>.nv-stack-item-lead{margin-right:auto}nv-stack>.nv-stack-item-lead+*{margin-left:0}nv-stack>.nv-stack-item-center{margin-right:auto;margin-left:auto}nv-stack>.nv-stack-item-tail{margin-left:auto}nv-stack>.nv-stack-nowrap{white-space:nowrap}nv-stack.nv-stack-vertical{align-items:stretch;flex-direction:column}nv-stack.nv-stack-vertical>.nv-stack-item-lead{margin-right:0;margin-bottom:auto}nv-stack.nv-stack-vertical>.nv-stack-item-lead+*{margin-top:0}nv-stack.nv-stack-vertical>.nv-stack-item-tail{margin-left:0;margin-top:auto}nv-stack.nv-stack-vertical>.nv-stack-item-center{margin:auto 0}nv-stack.nv-stack-flex>*{flex-shrink:1;flex-grow:1}nv-stack.nv-stack-fill>*{height:100%}nv-stack.nv-stack-fill.nv-stack-vertical>*{height:auto;width:100%}";const i=c;const e=class{constructor(a){t(this,a);this.gutter=2}render(){return a(s,{key:"bc18faae4116df9b3a2f944b97c5e5cf096654ae",class:n(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")},a("slot",{key:"fe3a07a01bd3a5898bcd1533c7966241cff21b44"}))}};e.style=i;export{e as nv_stack};
|
|
2
|
+
//# sourceMappingURL=p-83288db0.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as t,H as a,g as e}from"./p-d0a33e64.js";const r="nv-tooltip{display:inline-block;position:relative;user-select:none}nv-tooltip:has([fluid]:not([fluid=false])){display:block}nv-tooltip [data-scope=popover]{background:var(--components-tooltip-background);color:var(--components-tooltip-text);font-weight:var(--font-weight-medium-emphasis);padding:var(--tooltip-padding-y) var(--tooltip-padding-x);font-size:var(--tooltip-font-size);border-radius:var(--tooltip-radius);border:none;box-shadow:0px var(--shadow-y-axis-lg-1) var(--shadow-blur-lg-1) var(--shadow-spread-lg-1) var(--shadow-color-opacity-1), 0px var(--shadow-y-axis-lg-2) var(--shadow-blur-lg-2) var(--shadow-spread-lg-2) var(--shadow-color-opacity-2)}nv-tooltip [data-scope=popover] [data-scope=arrow]{background:var(--components-tooltip-background);box-shadow:none;border:none}";const s=r;const i=class{constructor(t){o(this,t);this.placement="bottom";this.enterDelay=0}componentWillLoad(){if(!this.triggerElement)this.triggerElement=Array.from(this.el.children).find((o=>o.getAttribute("slot")===null))}render(){return t(a,{key:"893071a64f973b33dccbf3acec95db46e592b717"},t("slot",{key:"010776550ed5f942c02540b12756f0c0f64e31c4"}),t("nv-popover",{key:"21a669333da9e55b697f8a0b0962a8328beac55a",triggerMode:"hover",hasArrow:true,placement:this.placement,triggerElement:this.triggerElement,groupName:"tooltip",enterDelay:this.enterDelay},t("p",{key:"ed89d0bfe1e9e8d12e33e3d7fb0f5b7f2685bbb9",slot:"content"},this.message),t("slot",{key:"fa2d9602e003f1da5c3d23156db7b2ac482966bd",name:"content"})))}get el(){return e(this)}};i.style=s;export{i as nv_tooltip};
|
|
2
|
+
//# sourceMappingURL=p-838f7842.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["nvTooltipCss","NvTooltipStyle0","NvTooltip","constructor","hostRef","this","placement","enterDelay","componentWillLoad","triggerElement","Array","from","el","children","find","child","getAttribute","render","h","Host","key","triggerMode","hasArrow","groupName","slot","message","name"],"sources":["src/components/nv-tooltip/nv-tooltip.scss?tag=nv-tooltip","src/components/nv-tooltip/nv-tooltip.tsx"],"sourcesContent":["@mixin root-styles() {\n display: inline-block;\n position: relative;\n user-select: none;\n &:has([fluid]:not([fluid='false'])) {\n display: block;\n }\n}\n\n@mixin tooltip-styles() {\n background: var(--components-tooltip-background);\n color: var(--components-tooltip-text);\n font-weight: var(--font-weight-medium-emphasis);\n padding: var(--tooltip-padding-y) var(--tooltip-padding-x);\n font-size: var(--tooltip-font-size);\n border-radius: var(--tooltip-radius);\n border: none;\n box-shadow:\n 0px var(--shadow-y-axis-lg-1) var(--shadow-blur-lg-1)\n var(--shadow-spread-lg-1) var(--shadow-color-opacity-1),\n 0px var(--shadow-y-axis-lg-2) var(--shadow-blur-lg-2)\n var(--shadow-spread-lg-2) var(--shadow-color-opacity-2);\n}\n\n@mixin arrow-styles() {\n background: var(--components-tooltip-background);\n box-shadow: none;\n border: none;\n}\n\nnv-tooltip {\n @include root-styles();\n\n [data-scope='popover'] {\n @include tooltip-styles();\n\n [data-scope='arrow'] {\n @include arrow-styles();\n }\n }\n}\n","import { Component, Host, h, Element, Prop } from '@stencil/core';\nimport type { Placement } from '@floating-ui/dom';\n\n/**\n * @slot default - Content to be placed as the trigger.\n * @slot content - Content to be placed within the popover. Use for custom html, will render under the message.\n */\n@Component({\n tag: 'nv-tooltip',\n styleUrl: 'nv-tooltip.scss',\n shadow: false,\n})\nexport class NvTooltip {\n @Element() el: HTMLNvTooltipElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the popover trigger. This\n * should be used when the slot for the trigger is not defined.\n */\n @Prop({ reflect: false, mutable: true })\n triggerElement: Element;\n\n /**\n * A string representing the text to be displayed inside the tooltip. This\n * content is shown when the tooltip is activated by the user, such as on\n * hover or focus events.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Decides where the tooltip shows up next to the element it’s linked to\n * (above, below, to the sides). If there isn’t enough room, it will adjust\n * it's position on the axis to fit on the screen, so users can always see it.\n */\n @Prop({ reflect: true })\n readonly placement: Placement = 'bottom';\n\n /**\n * Controls how long (in milliseconds) the tooltip waits to show after you\n * hover over or focus on an element. If you move away before the delay is up,\n * the tooltip won’t appear.\n */\n @Prop({ reflect: true })\n readonly enterDelay: number = 0;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (!this.triggerElement)\n this.triggerElement = Array.from(this.el.children).find(child => {\n return child.getAttribute('slot') === null;\n });\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n <slot></slot>\n\n <nv-popover\n triggerMode=\"hover\"\n hasArrow\n placement={this.placement}\n triggerElement={this.triggerElement}\n groupName={'tooltip'}\n enterDelay={this.enterDelay}\n >\n <p slot=\"content\">{this.message}</p>\n <slot name=\"content\"></slot>\n </nv-popover>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["nvTooltipCss","NvTooltipStyle0","NvTooltip","constructor","hostRef","this","placement","enterDelay","componentWillLoad","triggerElement","Array","from","el","children","find","child","getAttribute","render","h","Host","key","triggerMode","hasArrow","groupName","slot","message","name"],"sources":["src/components/nv-tooltip/nv-tooltip.scss?tag=nv-tooltip","src/components/nv-tooltip/nv-tooltip.tsx"],"sourcesContent":["@mixin root-styles() {\n display: inline-block;\n position: relative;\n user-select: none;\n &:has([fluid]:not([fluid='false'])) {\n display: block;\n }\n}\n\n@mixin tooltip-styles() {\n background: var(--components-tooltip-background);\n color: var(--components-tooltip-text);\n font-weight: var(--font-weight-medium-emphasis);\n padding: var(--tooltip-padding-y) var(--tooltip-padding-x);\n font-size: var(--tooltip-font-size);\n border-radius: var(--tooltip-radius);\n border: none;\n box-shadow:\n 0px var(--shadow-y-axis-lg-1) var(--shadow-blur-lg-1)\n var(--shadow-spread-lg-1) var(--shadow-color-opacity-1),\n 0px var(--shadow-y-axis-lg-2) var(--shadow-blur-lg-2)\n var(--shadow-spread-lg-2) var(--shadow-color-opacity-2);\n}\n\n@mixin arrow-styles() {\n background: var(--components-tooltip-background);\n box-shadow: none;\n border: none;\n}\n\nnv-tooltip {\n @include root-styles();\n\n [data-scope='popover'] {\n @include tooltip-styles();\n\n [data-scope='arrow'] {\n @include arrow-styles();\n }\n }\n}\n","import { Component, Host, h, Element, Prop } from '@stencil/core';\nimport type { Placement } from '@floating-ui/dom';\n\n/**\n * @slot default - Content to be placed as the trigger.\n * @slot content - Content to be placed within the popover. Use for custom html, will render under the message.\n */\n@Component({\n tag: 'nv-tooltip',\n styleUrl: 'nv-tooltip.scss',\n shadow: false,\n})\nexport class NvTooltip {\n @Element() el: HTMLNvTooltipElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the popover trigger. This\n * should be used when the slot for the trigger is not defined.\n */\n @Prop({ reflect: false, mutable: true })\n triggerElement: Element;\n\n /**\n * A string representing the text to be displayed inside the tooltip. This\n * content is shown when the tooltip is activated by the user, such as on\n * hover or focus events.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Decides where the tooltip shows up next to the element it’s linked to\n * (above, below, to the sides). If there isn’t enough room, it will adjust\n * it's position on the axis to fit on the screen, so users can always see it.\n */\n @Prop({ reflect: true })\n readonly placement: Placement = 'bottom';\n\n /**\n * Controls how long (in milliseconds) the tooltip waits to show after you\n * hover over or focus on an element. If you move away before the delay is up,\n * the tooltip won’t appear.\n */\n @Prop({ reflect: true })\n readonly enterDelay: number = 0;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (!this.triggerElement)\n this.triggerElement = Array.from(this.el.children).find(child => {\n return child.getAttribute('slot') === null;\n });\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n <slot></slot>\n\n <nv-popover\n triggerMode=\"hover\"\n hasArrow\n placement={this.placement}\n triggerElement={this.triggerElement}\n groupName={'tooltip'}\n enterDelay={this.enterDelay}\n >\n <p slot=\"content\">{this.message}</p>\n <slot name=\"content\"></slot>\n </nv-popover>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"mappings":"yDAAA,MAAMA,EAAe,uxBACrB,MAAAC,EAAeD,E,MCWFE,EAAS,MALtB,WAAAC,CAAAC,G,UAiCWC,KAAAC,UAAuB,SAQvBD,KAAAE,WAAqB,C,CAM9B,iBAAAC,GACE,IAAKH,KAAKI,eACRJ,KAAKI,eAAiBC,MAAMC,KAAKN,KAAKO,GAAGC,UAAUC,MAAKC,GAC/CA,EAAMC,aAAa,UAAY,M,CAQ5C,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,QAAAE,IAAA,6CAEAF,EAAA,cAAAE,IAAA,2CACEC,YAAY,QACZC,SAAQ,KACRhB,UAAWD,KAAKC,UAChBG,eAAgBJ,KAAKI,eACrBc,UAAW,UACXhB,WAAYF,KAAKE,YAEjBW,EAAA,KAAAE,IAAA,2CAAGI,KAAK,WAAWnB,KAAKoB,SACxBP,EAAA,QAAAE,IAAA,2CAAMM,KAAK,a","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as a,h as r,
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as a,h as r,H as b}from"./p-d0a33e64.js";const e="nv-breadcrumbs{display:block}nv-breadcrumbs>ol{display:flex;flex-wrap:wrap;align-items:center;gap:var(--breadcrumb-padding-y)}nv-breadcrumbs nv-breadcrumb:last-child [data-scope=separator],nv-breadcrumbs nv-breadcrumb:last-child [slot=separator]{display:none}";const c=e;const s=class{constructor(r){a(this,r)}render(){return r(b,{key:"19ad2bb41f4254a98a571cbadb50ba5ed7d29f62",role:"navigation","aria-label":"breadcrumbs"},r("ol",{key:"11b77f0f11c6b1dc2ce5ab3f4f7b23e8ec728b61"},r("slot",{key:"c0c683f93c6874aa5f84fb735d13c1b5eabcd951"})))}};s.style=c;export{s as nv_breadcrumbs};
|
|
2
|
+
//# sourceMappingURL=p-86ab23ea.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as r,h as o,H as i,g as a}from"./p-d0a33e64.js";import{v as n}from"./p-f5ff676c.js";const t='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-fieldpassword{--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-fieldpassword[fluid]:not([fluid=false]){max-width:unset}nv-fieldpassword[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-fieldpassword[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-fieldpassword[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-fieldpassword[required]:not([required=false]) label::after{content:"*";color:var(--components-form-text-required);font-weight:700}nv-fieldpassword 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-fieldpassword .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldpassword .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;position:relative}nv-fieldpassword .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldpassword .input-wrapper .input-container:focus-within,nv-fieldpassword .input-wrapper .input-container:focus-within:hover,nv-fieldpassword .input-wrapper .input-container:focus,nv-fieldpassword .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-fieldpassword .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-fieldpassword .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-fieldpassword .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-fieldpassword .input-wrapper .input-container input:focus{outline:none}nv-fieldpassword .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-fieldpassword .input-wrapper .input-container input[type=password]::-ms-clear,nv-fieldpassword .input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldpassword .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldpassword .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-fieldpassword .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)}';const d=t;const s=class{constructor(o){e(this,o);this.valueChanged=r(this,"valueChanged",7);this.inputId=n();this.disabled=false;this.readonly=false;this.required=false;this.error=false;this.success=false;this.mode="text";this.autocomplete="off";this.hidePasswordIcon=false;this.showPassword=false;this.autofocus=false;this.fluid=false;this.handleInputContainerClick=()=>{this.inputElement.focus()};this.togglePasswordVisibility=()=>{this.showPasswordState=!this.showPasswordState};this.handleInput=e=>{const r=e.target;this.value=r.value;this.valueChanged.emit(r.value)}}handleShowPasswordChange(e){this.showPasswordState=e}componentWillLoad(){this.showPasswordState=this.showPassword}render(){return o(i,{key:"79c3035769b9053d53d62526b2e0d430d5f944ae"},(this.label||this.el.querySelector('[slot="label"]'))&&o("label",{key:"2341f2b9ae8c5acb8ce48e15caae8a629a1c0333",htmlFor:this.inputId},o("slot",{key:"ad2301f92adf58c460d4ca76681330b133db2f33",name:"label"},this.label)),o("div",{key:"c12f8401a41c6761686b74e725dd91911eaafbb0",class:"input-wrapper"},o("slot",{key:"badd6d65663029bc3252ef0818bb1c6220d01ddf",name:"before-input"}),o("div",{key:"0ffb2332657f893c00fe2ca68f4bbbd622bb31f1",class:"input-container",onClick:this.handleInputContainerClick},o("slot",{key:"afa1daa6fab0f2a46ab46f0c99e4e4cf10d7a1fe",name:"leading-input"}),o("input",{key:"cc567c4a7fe51a24a99c7a471294d7f6086d8b2d",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)&&o("nv-icon",{key:"7087d6e35b30de786f3ded46fc74dc9987af6afa",name:this.success?"circle-check":"alert-circle",class:"validation",size:"md"}),!this.hidePasswordIcon&&o("nv-iconbutton",{key:"6fe5e3936ef42c79ed8a5b8a959a22ecbbe52fd6",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()})),o("slot",{key:"eab04665ad3394860ad30e366eaf18ae4aee445a",name:"after-input"})),(this.description||this.el.querySelector('[slot="description"]'))&&o("div",{key:"5bc5bd055301bf5fe1b801c2091cd3307c79104f",class:"description"},o("slot",{key:"133ebfcb219aaa0c5fd64e4442c1125b26c623b4",name:"description"},this.description)),(this.errorDescription||this.el.querySelector('[slot="error-description"]'))&&o("div",{key:"2a319732006d29becaa602ae16f2d8e885214931",hidden:!this.error,class:"error-description"},o("slot",{key:"e6e75fe487745820b1b8d3de1ed52df8aa9652d4",name:"error-description"},this.errorDescription)))}static get formAssociated(){return true}get el(){return a(this)}static get watchers(){return{showPassword:["handleShowPasswordChange"]}}};s.style=d;export{s as nv_fieldpassword};
|
|
2
|
+
//# sourceMappingURL=p-8fb4e5c0.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["nvFieldpasswordCss","NvFieldpasswordStyle0","NvFieldpassword","constructor","hostRef","this","inputId","uuidv4","disabled","readonly","required","error","success","mode","autocomplete","hidePasswordIcon","showPassword","autofocus","fluid","handleInputContainerClick","inputElement","focus","togglePasswordVisibility","showPasswordState","handleInput","event","input","target","value","valueChanged","emit","handleShowPasswordChange","newValue","componentWillLoad","render","h","Host","key","label","el","querySelector","htmlFor","name","class","onClick","id","ref","e","placeholder","type","inputMode","maxlength","minlength","pattern","readOnly","onInput","size","emphasis","toString","description","errorDescription","hidden"],"sources":["src/components/nv-fieldpassword/nv-fieldpassword.scss?tag=nv-fieldpassword","src/components/nv-fieldpassword/nv-fieldpassword.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\nnv-fieldpassword {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n\n position: relative;\n\n input {\n @include form-field-input();\n }\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n State,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldpassword',\n styleUrl: 'nv-fieldpassword.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldpassword {\n @Element() el: HTMLNvFieldpasswordElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the password\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input on form submission.\n * the rules are applied to the input value via regexes.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * Defines the type of the input.\n * @default 'text'\n */\n @Prop({ reflect: true })\n readonly mode: 'text' | 'number' = 'text';\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they’ve used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Hide the button to show/hide the password.\n */\n @Prop({ reflect: true })\n readonly hidePasswordIcon: boolean = false;\n\n /**\n * Show/hide the password programmatically.\n */\n @Prop({ reflect: true })\n readonly showPassword: boolean = false;\n\n /**\n * Defines whether the password is visible or not.\n */\n @State()\n showPasswordState: boolean;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n @Watch('showPassword')\n handleShowPasswordChange(newValue: boolean) {\n this.showPasswordState = newValue;\n }\n\n private togglePasswordVisibility = () => {\n this.showPasswordState = !this.showPasswordState;\n };\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value; // Update the input value without worrying about the space\n this.valueChanged.emit(input.value);\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.showPasswordState = this.showPassword;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n type={this.showPasswordState ? 'text' : 'password'}\n inputMode={this.mode}\n value={this.value}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n {(this.success || this.error) && (\n <nv-icon\n name={this.success ? 'circle-check' : 'alert-circle'}\n class=\"validation\"\n size=\"md\"\n />\n )}\n\n {!this.hidePasswordIcon && (\n <nv-iconbutton\n name={this.showPasswordState ? 'eye' : 'eye-off'}\n size=\"md\"\n emphasis=\"lower\"\n onClick={this.togglePasswordVisibility}\n aria-label={\n this.showPasswordState ? 'Hide password' : 'Show password'\n }\n aria-pressed={this.showPasswordState.toString()}\n />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"mappings":"oGAAA,MAAMA,EAAqB,41KAC3B,MAAAC,EAAeD,E,MC2BFE,EAAe,MAN5B,WAAAC,CAAAC,G,qDAoBWC,KAAAC,QAAkBC,IAkDlBF,KAAAG,SAAoB,MAQpBH,KAAAI,SAAoB,MAOpBJ,KAAAK,SAAoB,MAQpBL,KAAAM,MAAiB,MAejBN,KAAAO,QAAmB,MAiCnBP,KAAAQ,KAA0B,OAS1BR,KAAAS,aAA2C,MAM3CT,KAAAU,iBAA4B,MAM5BV,KAAAW,aAAwB,MAexBX,KAAAY,UAAqB,MAMrBZ,KAAAa,MAAiB,MAiBlBb,KAAAc,0BAA4B,KAClCd,KAAKe,aAAaC,OAAO,EAQnBhB,KAAAiB,yBAA2B,KACjCjB,KAAKkB,mBAAqBlB,KAAKkB,iBAAiB,EAG1ClB,KAAAmB,YAAeC,IACrB,MAAMC,EAAQD,EAAME,OACpBtB,KAAKuB,MAAQF,EAAME,MACnBvB,KAAKwB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AEpCjB,KAAKkB,kBAAoB,gBAAkB,gBAAe,eAE9ClB,KAAKkB,kBAAkBmC,cAK3CvB,EAAA,QAAAE,IAAA,2CAAMK,KAAK,kBAGXrC,KAAKsD,aACLtD,KAAKkC,GAAGC,cAAc,0BACtBL,EAAA,OAAAE,IAAA,2CAAKM,MAAM,eACTR,EAAA,QAAAE,IAAA,2CAAMK,KAAK,eAAerC,KAAKsD,eAIjCtD,KAAKuD,kBACLvD,KAAKkC,GAAGC,cAAc,gCACtBL,EAAA,OAAAE,IAAA,2CAAKwB,QAASxD,KAAKM,MAAOgC,MAAM,qBAC9BR,EAAA,QAAAE,IAAA,2CAAMK,KAAK,qBAAqBrC,KAAKuD,mB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["nvFieldpasswordCss","NvFieldpasswordStyle0","NvFieldpassword","constructor","hostRef","this","inputId","uuidv4","disabled","readonly","required","error","success","mode","autocomplete","hidePasswordIcon","showPassword","autofocus","fluid","handleInputContainerClick","inputElement","focus","togglePasswordVisibility","showPasswordState","handleInput","event","input","target","value","valueChanged","emit","handleShowPasswordChange","newValue","componentWillLoad","render","h","Host","key","label","el","querySelector","htmlFor","name","class","onClick","id","ref","e","placeholder","type","inputMode","maxlength","minlength","pattern","readOnly","onInput","size","emphasis","toString","description","errorDescription","hidden"],"sources":["src/components/nv-fieldpassword/nv-fieldpassword.scss?tag=nv-fieldpassword","src/components/nv-fieldpassword/nv-fieldpassword.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\nnv-fieldpassword {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n\n position: relative;\n\n input {\n @include form-field-input();\n }\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n State,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldpassword',\n styleUrl: 'nv-fieldpassword.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldpassword {\n @Element() el: HTMLNvFieldpasswordElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the password\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input on form submission.\n * the rules are applied to the input value via regexes.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * Defines the type of the input.\n * @default 'text'\n */\n @Prop({ reflect: true })\n readonly mode: 'text' | 'number' = 'text';\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they’ve used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Hide the button to show/hide the password.\n */\n @Prop({ reflect: true })\n readonly hidePasswordIcon: boolean = false;\n\n /**\n * Show/hide the password programmatically.\n */\n @Prop({ reflect: true })\n readonly showPassword: boolean = false;\n\n /**\n * Defines whether the password is visible or not.\n */\n @State()\n showPasswordState: boolean;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n @Watch('showPassword')\n handleShowPasswordChange(newValue: boolean) {\n this.showPasswordState = newValue;\n }\n\n private togglePasswordVisibility = () => {\n this.showPasswordState = !this.showPasswordState;\n };\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value; // Update the input value without worrying about the space\n this.valueChanged.emit(input.value);\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.showPasswordState = this.showPassword;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n type={this.showPasswordState ? 'text' : 'password'}\n inputMode={this.mode}\n value={this.value}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n {(this.success || this.error) && (\n <nv-icon\n name={this.success ? 'circle-check' : 'alert-circle'}\n class=\"validation\"\n size=\"md\"\n />\n )}\n\n {!this.hidePasswordIcon && (\n <nv-iconbutton\n name={this.showPasswordState ? 'eye' : 'eye-off'}\n size=\"md\"\n emphasis=\"lower\"\n onClick={this.togglePasswordVisibility}\n aria-label={\n this.showPasswordState ? 'Hide password' : 'Show password'\n }\n aria-pressed={this.showPasswordState.toString()}\n />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"mappings":"oGAAA,MAAMA,EAAqB,0wOAC3B,MAAAC,EAAeD,E,MC2BFE,EAAe,MAN5B,WAAAC,CAAAC,G,qDAoBWC,KAAAC,QAAkBC,IAkDlBF,KAAAG,SAAoB,MAQpBH,KAAAI,SAAoB,MAOpBJ,KAAAK,SAAoB,MAQpBL,KAAAM,MAAiB,MAejBN,KAAAO,QAAmB,MAiCnBP,KAAAQ,KAA0B,OAS1BR,KAAAS,aAA2C,MAM3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,SACf8C,SAAUjD,KAAKI,SACf8C,QAASlD,KAAKmB,eAGdnB,KAAKO,SAAWP,KAAKM,QACrBwB,EAAA,WAAAE,IAAA,2CACEK,KAAMrC,KAAKO,QAAU,eAAiB,eACtC+B,MAAM,aACNa,KAAK,QAIPnD,KAAKU,kBACLoB,EAAA,iBAAAE,IAAA,2CACEK,KAAMrC,KAAKkB,kBAAoB,MAAQ,UACvCiC,KAAK,KACLC,SAAS,QACTb,QAASvC,KAAKiB,yBAAwB,aAEpCjB,KAAKkB,kBAAoB,gBAAkB,gBAAe,eAE9ClB,KAAKkB,kBAAkBmC,cAK3CvB,EAAA,QAAAE,IAAA,2CAAMK,KAAK,kBAGXrC,KAAKsD,aACLtD,KAAKkC,GAAGC,cAAc,0BACtBL,EAAA,OAAAE,IAAA,2CAAKM,MAAM,eACTR,EAAA,QAAAE,IAAA,2CAAMK,KAAK,eAAerC,KAAKsD,eAIjCtD,KAAKuD,kBACLvD,KAAKkC,GAAGC,cAAc,gCACtBL,EAAA,OAAAE,IAAA,2CAAKwB,QAASxD,KAAKM,MAAOgC,MAAM,qBAC9BR,EAAA,QAAAE,IAAA,2CAAMK,KAAK,qBAAqBrC,KAAKuD,mB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as a,h as t,
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as a,h as t,H as r}from"./p-d0a33e64.js";import{c as o}from"./p-8a1a6e56.js";import{S as n}from"./p-e2d0a77d.js";const v='nv-avatar{align-items:center !important;background-color:var(--components-avatar-background-1);border-radius:var(--radius-rounded-full) !important;display:flex !important;flex-shrink:0 !important;font-family:"TT Norms Pro", sans-serif;font-style:normal;font-weight:var(--font-weight-medium-emphasis);justify-content:center !important;leading-trim:both;line-height:1 !important;text-align:center;text-edge:cap;text-transform:uppercase}nv-avatar.avatar-color-1{background-color:var(--components-avatar-background-1);color:var(--components-avatar-content-1)}nv-avatar.avatar-color-2{background-color:var(--components-avatar-background-2);color:var(--components-avatar-content-2)}nv-avatar.avatar-color-3{background-color:var(--components-avatar-background-3);color:var(--components-avatar-content-3)}nv-avatar.avatar-color-4{background-color:var(--components-avatar-background-4);color:var(--components-avatar-content-4)}nv-avatar.avatar-color-5{background-color:var(--components-avatar-background-5);color:var(--components-avatar-content-5)}nv-avatar.avatar-color-6{background-color:var(--components-avatar-background-6);color:var(--components-avatar-content-6)}nv-avatar.avatar-color-7{background-color:var(--components-avatar-background-7);color:var(--components-avatar-content-7)}nv-avatar.avatar-color-8{background-color:var(--components-avatar-background-8);color:var(--components-avatar-content-8)}nv-avatar.avatar-color-9{background-color:var(--components-avatar-background-9);color:var(--components-avatar-content-9)}nv-avatar.avatar-color-10{background-color:var(--components-avatar-background-10);color:var(--components-avatar-content-10)}nv-avatar img{height:100%;width:100%;object-fit:cover;object-position:center;border-radius:50%}nv-avatar.avatar-xs{width:var(--avatar-xs-size);height:var(--avatar-xs-size);font-size:var(--avatar-xs-font-size);line-height:var(--avatar-xs-font-size)}nv-avatar.avatar-xs nv-icon>svg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-avatar.avatar-sm{width:var(--avatar-sm-size);height:var(--avatar-sm-size);font-size:var(--avatar-sm-font-size);line-height:var(--avatar-sm-font-size)}nv-avatar.avatar-sm nv-icon>svg{width:var(--spacing-4);height:var(--spacing-4);stroke-width:1.5px}nv-avatar.avatar-md{width:var(--avatar-md-size);height:var(--avatar-md-size);font-size:var(--avatar-md-font-size);line-height:var(--avatar-md-font-size)}nv-avatar.avatar-md nv-icon>svg{width:var(--spacing-5);height:var(--spacing-5);stroke-width:1.6px}nv-avatar.avatar-lg{width:var(--avatar-lg-size);height:var(--avatar-lg-size);font-size:var(--avatar-lg-font-size);line-height:var(--avatar-lg-font-size)}nv-avatar.avatar-lg nv-icon>svg{width:var(--spacing-6);height:var(--spacing-6);stroke-width:1.8px}nv-avatar.avatar-xl{width:var(--avatar-xl-size);height:var(--avatar-xl-size);font-size:var(--avatar-xl-font-size);line-height:var(--avatar-xl-font-size)}nv-avatar.avatar-xl nv-icon>svg{width:var(--spacing-7);height:var(--spacing-7);stroke-width:1.9px}';const i=v;const s=class{constructor(t){a(this,t);this.size="md";this.color="1"}componentWillRender(){if(this.xsmall){this.size=n.ExtraSmall}if(this.small){this.size=n.Small}if(this.medium){this.size=n.Medium}if(this.large){this.size=n.Large}if(this.xlarge){this.size=n.ExtraLarge}if(this.text){this.initials=this.text}if(this.url){this.src=this.url}}trimInitials(a){return a.trim().substring(0,2)}render(){return t(r,{key:"aa00ea05df513c899c6ed43fd0307178e98b6145",class:o(`avatar-${this.size}`,`avatar-color-${this.color}`),"aria-label":this.alt},this.src?t("img",{src:this.src,alt:this.alt}):this.initials?this.trimInitials(this.initials):t("slot",{name:"icon"},t("nv-icon",{name:"user"})))}};s.style=i;export{s as nv_avatar};
|
|
2
|
+
//# sourceMappingURL=p-914da1e1.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as o,h as r,H as i,g as t}from"./p-d0a33e64.js";import{v as n}from"./p-f5ff676c.js";const d='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-fielddropdown{--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-fielddropdown[fluid]:not([fluid=false]){max-width:unset}nv-fielddropdown[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-fielddropdown[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-fielddropdown[required]:not([required=false]) label::after{content:"*";color:var(--components-form-text-required);font-weight:700}nv-fielddropdown[hidden]:not([hidden=false]) label{display:none}nv-fielddropdown 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-fielddropdown nv-popover{width:100%;display:block}nv-fielddropdown nv-popover [data-scope=popover]{width:100%;padding:var(--list-dropdown-padding);border-radius:var(--list-dropdown-radius);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border)}nv-fielddropdown nv-popover [slot=content]{gap:var(--list-dropdown-gap-y);display:flex;flex-direction:column}nv-fielddropdown nv-popover hr{color:var(--components-list-dropdown-separator)}nv-fielddropdown nv-popover div[slot=content]{max-height:calc(90vh - var(--list-dropdown-padding) * 2);overflow-y:auto;position:relative}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar{width:6px;height:6px}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fielddropdown .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fielddropdown .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;position:relative;width:100%;min-height:40px}nv-fielddropdown .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddropdown .input-container:focus-within,nv-fielddropdown .input-container:focus-within:hover,nv-fielddropdown .input-container:focus,nv-fielddropdown .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-fielddropdown .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-fielddropdown .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddropdown .input-container input[type=search]::-webkit-search-decoration,nv-fielddropdown .input-container input[type=search]::-webkit-search-cancel-button,nv-fielddropdown .input-container input[type=search]::-webkit-search-results-button,nv-fielddropdown .input-container input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}nv-fielddropdown .input-container input,nv-fielddropdown .input-container p.non-filterable-text{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-fielddropdown .input-container input:focus,nv-fielddropdown .input-container p.non-filterable-text:focus{outline:none}nv-fielddropdown .input-container input::placeholder,nv-fielddropdown .input-container p.non-filterable-text::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-fielddropdown .input-container input[type=password]::-ms-clear,nv-fielddropdown .input-container input[type=password]::-ms-reveal,nv-fielddropdown .input-container p.non-filterable-text[type=password]::-ms-clear,nv-fielddropdown .input-container p.non-filterable-text[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fielddropdown .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fielddropdown .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fielddropdown .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fielddropdown .non-filterable-text{display:block;border-radius:var(--form-field-radius);background-color:var(--nv-field-background);color:var(--components-form-field-content-text);font-size:var(--form-field-font-size);font-weight:500;line-height:var(--form-field-line-height);box-sizing:border-box;cursor:pointer;height:100%;min-height:40px}nv-fielddropdown .non-filterable-text span{display:inline-block;width:100%;overflow:hidden;text-overflow:ellipsis}nv-fielddropdown .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-fielddropdown .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)}';const l=d;const s=class{constructor(r){e(this,r);this.valueChanged=o(this,"valueChanged",7);this.dropdownItemSelected=o(this,"dropdownItemSelected",7);this.inputId=n();this.autocomplete="off";this.required=false;this.readonly=false;this.disabled=false;this.error=false;this.maxHeight="";this.open=false;this.emptyResult="No results found";this.filterable=false;this.debounceDelay=300;this.autofocus=false;this.fluid=false;this.filterText="";this.selectedValues=new Set;this.handleInputContainerClick=e=>{if(this.disabled||this.readonly){return}const o=e.target;if(o.tagName==="P"||o.tagName==="SPAN"){this.open=true;const e=this.el.querySelector(".input-container");if(e){e.classList.add("focus-within");const o=()=>{e.classList.remove("focus-within")};this.popoverElement.addEventListener("hide",o)}}};this.handleInput=e=>{if(!this.filterable)return;if(this.disabled||this.readonly){return}const o=e.target;this.open=true;if(this.debounceTimer){window.clearTimeout(this.debounceTimer)}this.debounceTimer=window.setTimeout((()=>{this.filterText=o.value.toLowerCase();this.filterItems()}),this.debounceDelay)};this.handleInputFocus=()=>{if(this.disabled||this.readonly)return;this.open=true};this.togglePopover=()=>{if(this.disabled||this.readonly)return;this.open=!this.open};this.getSelectedLabel=()=>{var e,o,r,i,t,n;if(!this.value)return"";if(((e=this.options)===null||e===void 0?void 0:e.length)>1){const e=this.options.find((e=>e.value===this.value));return(r=(o=e===null||e===void 0?void 0:e.label)!==null&&o!==void 0?o:e===null||e===void 0?void 0:e.value)!==null&&r!==void 0?r:this.value}const d=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const l=d.find((e=>e.value===this.value));const s=l?(n=(i=l.label)!==null&&i!==void 0?i:(t=l.textContent)===null||t===void 0?void 0:t.trim())!==null&&n!==void 0?n:l.value:"";return s};this.clearFilter=()=>{if(!this.filterable)return;this.filterText="";this.inputElement.value=this.getSelectedLabel();this.inputElement.focus();this.filterItems()}}handleOptionsChange(e){var o;if(!e)return;if(!this.value){const r=e.find((e=>e.selected));this.value=(o=r===null||r===void 0?void 0:r.value)!==null&&o!==void 0?o:"";this.updateSelectedItem(this.value)}}watchValueHandler(e){this.valueChanged.emit(e)}handleOpenChanged(e){e.stopPropagation();this.open=e.detail}handleDropdownItemSelected(e){if(this.disabled||this.readonly)return;const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));o.forEach((o=>{if(o!==e.target){o.removeAttribute("selected")}else{o.setAttribute("selected","true")}}));this.clearFilter();this.value=e.detail.value;this.open=false}handleBlur(e){const o=e.relatedTarget;if(!(o instanceof Node)||!this.el.contains(o)){this.open=false;if(this.inputElement){this.filterText="";this.inputElement.value=this.getSelectedLabel();setTimeout((()=>{this.filterItems()}),200)}}}handleKeyDown(e){if(!this.el)return;if(!this.open){if(e.key==="ArrowDown"){this.open=true;e.preventDefault();return}return}const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem:not([disabled]):not([hidden])"));let r=o.findIndex((e=>e.classList.contains("highlighted")));if(e.key==="ArrowDown"){e.preventDefault();r=(r+1)%o.length;this.updateHighlightedItem(o,r)}else if(e.key==="ArrowUp"){e.preventDefault();r=(r-1+o.length)%o.length;this.updateHighlightedItem(o,r)}else if(e.key==="Escape"){e.preventDefault();this.open=false}}componentWillLoad(){this.resetFilter();if(this.filterable&&this.filterText){this.filterItems()}if(this.options){this.handleOptionsChange(this.options)}}componentDidLoad(){if(this.value){this.updateSelectedItem(this.value)}if(this.inputElement){this.inputElement.value=this.getSelectedLabel()}}async getFilterText(){return this.filterText}filterItems(){var e;const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const r=this.el.querySelector("nv-fielddropdownitem[data-empty]");if(r){r.remove()}let i=false;o.forEach((e=>{var o,r;const t=((o=e.textContent)===null||o===void 0?void 0:o.toLowerCase())||"";const n=((r=e.value)===null||r===void 0?void 0:r.toLowerCase())||"";const d=n.includes(this.filterText)||t.includes(this.filterText);if(d)e.removeAttribute("hidden");else e.setAttribute("hidden","");if(d){i=true}}));if(!i){const o=document.createElement("nv-fielddropdownitem");o.setAttribute("data-empty","true");o.setAttribute("disabled","true");o.textContent=this.emptyResult;(e=this.el.querySelector('ul[slot="content"]'))===null||e===void 0?void 0:e.appendChild(o)}}resetFilter(){const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));e.forEach((e=>{e.style.display=""}))}updateHighlightedItem(e,o){e.forEach(((e,r)=>{if(r===o){e.classList.add("highlighted");e.focus();e.scrollIntoView({block:"nearest"})}else{e.classList.remove("highlighted")}}))}updateSelectedItem(e){if(!e)return;const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const r=o.find((o=>{var r;const i=o.getAttribute("label");const t=o.getAttribute("value");const n=(r=o.textContent)===null||r===void 0?void 0:r.trim();return i===e||t===e||n===e}));o.forEach((e=>{if(e===r){e.setAttribute("selected","")}else{e.removeAttribute("selected")}}))}render(){var e;return r(i,{key:"3864f366575665c4730dde8fd0d8e37c4ee11d82",role:"combobox","aria-expanded":this.open.toString(),"aria-haspopup":"listbox","aria-label":this.label},(this.label||this.el.querySelector('[slot="label"]'))&&r("label",{key:"8ce42f691251468c6c054464ee3695e2bea90bd5",htmlFor:this.inputId},r("slot",{key:"7e779704e1c3f9f6ee71455679c0e1d5d4ee8795",name:"label"},this.label)),r("nv-popover",{key:"82cdd318e195ef44513684afba0e9c9772cad448",ref:e=>this.popoverElement=e,triggerMode:"controlled",placement:"bottom-start",open:this.open},r("div",{key:"1189c8fd06db511cb51721ac14cdc54ef286691c",class:"input-wrapper",slot:"trigger"},r("slot",{key:"9069907e055d77a19c30c045e29eaf4bf998f9a0",name:"before-input"}),r("div",{key:"2c57f017b25754d4b5baf44e3457e95256dfdccf",class:"input-container",onClick:this.handleInputContainerClick},r("slot",{key:"939e749473e4df95a28fcf98e8b6d455408bff71",name:"leading-input"}),this.filterable||this.disabled||this.readonly?r("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}):r("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&&r("nv-iconbutton",{key:"dcf54042b261665e5317ac122a93ca12fcedd9bc",name:"x",size:"md",emphasis:"lower",class:"clear-button",onClick:this.clearFilter,"aria-label":"Clear input"}),this.error&&r("nv-icon",{key:"3551957d94021648d731f97c1ba7ecdc8a325c15",name:"alert-circle",class:"validation",size:"md"}),r("nv-iconbutton",{key:"e8576d20f760219f236aa9ba52a34f762cc8d23e","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})),r("slot",{key:"48e9ae570e34cde3d20594a3f6518298ebbad02e",name:"after-input"})),r("div",{key:"cec0a670f4158ca91aa45dcee7a5c25a584226f9",slot:"content",style:this.maxHeight?{maxHeight:this.maxHeight}:{}},((e=this.options)===null||e===void 0?void 0:e.length)>0?r("ul",null,this.options.map((e=>r("nv-fielddropdownitem",{label:e.label,value:e.value,disabled:e.disabled,selected:e.value===this.value})))):r("slot",{name:"content"}))),(this.description||this.el.querySelector('[slot="description"]'))&&r("div",{key:"e24dbfc170fb20e48ca2a474508a7c9beac6b87e",class:"description"},r("slot",{key:"3b4429e2dd0b4f070309b00c6cba94cd343e7165",name:"description"},this.description)),(this.errorDescription||this.el.querySelector('[slot="error-description"]'))&&r("div",{key:"b59ecbf446b142840f5c5933c505900abf126378",hidden:!this.error,class:"error-description"},r("slot",{key:"bf3c16d6a9fdc7a10741518153465a736eff808c",name:"error-description"},this.errorDescription)))}static get formAssociated(){return true}get el(){return t(this)}static get watchers(){return{options:["handleOptionsChange"],value:["watchValueHandler"]}}};s.style=l;export{s as nv_fielddropdown};
|
|
2
|
+
//# sourceMappingURL=p-abbe5d69.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["nvFielddropdownCss","NvFielddropdownStyle0","NvFielddropdown","constructor","hostRef","this","inputId","uuidv4","autocomplete","required","readonly","disabled","error","maxHeight","open","emptyResult","filterable","debounceDelay","autofocus","fluid","filterText","selectedValues","Set","handleInputContainerClick","event","target","tagName","inputContainer","el","querySelector","classList","add","removeFocusWithin","remove","popoverElement","addEventListener","handleInput","input","debounceTimer","window","clearTimeout","setTimeout","value","toLowerCase","filterItems","handleInputFocus","togglePopover","getSelectedLabel","_a","options","length","matchingItem","find","option","_c","_b","label","items","Array","from","querySelectorAll","item","selectedLabel","_f","_d","_e","textContent","trim","clearFilter","inputElement","focus","handleOptionsChange","newValue","defaultValue","selected","updateSelectedItem","watchValueHandler","valueChanged","emit","handleOpenChanged","stopPropagation","detail","handleDropdownItemSelected","forEach","removeAttribute","setAttribute","handleBlur","relatedTarget","Node","contains","handleKeyDown","key","preventDefault","currentIndex","findIndex","updateHighlightedItem","componentWillLoad","resetFilter","componentDidLoad","getFilterText","existingEmptyItem","hasVisibleItems","shouldShow","includes","emptyItem","document","createElement","appendChild","style","display","index","i","scrollIntoView","block","itemLabel","getAttribute","itemValue","itemText","render","h","Host","role","toString","htmlFor","name","ref","triggerMode","placement","class","slot","onClick","id","type","e","placeholder","readOnly","onInput","onFocus","onKeyDown","tabIndex","size","emphasis","map","description","errorDescription","hidden"],"sources":["src/components/nv-fielddropdown/styles/nv-fielddropdown.scss?tag=nv-fielddropdown","src/components/nv-fielddropdown/nv-fielddropdown.tsx"],"sourcesContent":["@use './mixins' as *;\n@import '../../../styles/form-field';\n@import '../../../styles/scrollbar';\n\nnv-fielddropdown {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n &[hidden]:not([hidden='false']) label {\n display: none;\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n @include form-field-popover();\n\n div[slot='content'] {\n @include scrollbar();\n max-height: calc(90vh - var(--list-dropdown-padding) * 2);\n overflow-y: auto;\n position: relative;\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n @include input-wrapper-styles();\n }\n\n .input-container {\n @include form-field-input-container();\n @include input-container-styles();\n\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n input,\n p.non-filterable-text {\n @include form-field-input();\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n\n .non-filterable-text {\n @include non-filterable-text-styles();\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n Method,\n} from '@stencil/core';\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot content - Use a <ul></ul> tag for the slot, and place <nv-dropdownitem> elements inside.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddropdown',\n styleUrl: 'styles/nv-fielddropdown.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFielddropdown {\n @Element() el: HTMLNvFielddropdownElement;\n private inputElement!: HTMLInputElement;\n private popoverElement!: HTMLNvPopoverElement;\n /**\n * Timer for debouncing input events.\n * Private property preferred over @State as it:\n * - Doesn't need to trigger re-renders\n * - Is purely for internal logic\n * - Improves performance by avoiding Stencil's reactivity system\n */\n private debounceTimer: number;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input's data in form submissions. It should be\n * unique within the form to avoid conflicts.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It's a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It's a great way to provide examples or suggestions directly\n * in the field before they start typing.\n * The placeholder is displayed only when the filterable option is enabled.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they've used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input's value is managed by the component's state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Display the input field's content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won't be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * The disabled prop lets you turn off the input field so that users can't\n * type in it. When disabled, the field is grayed out and won't respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Alters the input field's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the dropdown\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Defines the maximum height of the multiselect list when open.\n */\n @Prop({ reflect: true })\n readonly maxHeight: string = '';\n\n /**\n * State of the dropdown popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * The text to display when no items match the filter.\n */\n @Prop({ reflect: true })\n readonly emptyResult: string = 'No results found';\n\n /**\n * Enables or disables the filtering feature for the dropdown items.\n */\n @Prop({ reflect: true })\n readonly filterable: boolean = false;\n\n /**\n * List of options used to automatically generate dropdown items. This\n * provides an alternative to using the slot manually.\n *\n * @example\n * options=[{\n * \"label\": \"Option 1\",\n * \"value\": \"option1\",\n * \"selected\": true,\n * },\n * {\n * \"label\": \"Option 2\",\n * \"value\": \"option2\",\n * }]\n */\n @Prop({ reflect: false })\n readonly options?: {\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Whether this option is pre-selected */\n selected?: boolean;\n }[];\n\n /**\n * Delay in milliseconds before the search is triggered when typing in the filter input.\n * @default 300\n */\n @Prop({ reflect: true })\n readonly debounceDelay: number = 300;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n /**\n * The text entered by the user for filtering dropdown items.\n */\n @State()\n filterText: string = '';\n\n @State()\n selectedValues: Set<string> = new Set();\n\n //#endregion STATE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when an item is clicked.\n */\n @Event()\n dropdownItemSelected: EventEmitter<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('options')\n handleOptionsChange(newValue: typeof this.options) {\n if (!newValue) return;\n\n if (!this.value) {\n const defaultValue = newValue.find(option => option.selected);\n this.value = defaultValue?.value ?? '';\n this.updateSelectedItem(this.value);\n }\n }\n\n @Watch('value')\n watchValueHandler(newValue: typeof this.value) {\n this.valueChanged.emit(newValue);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LISTENERS\n\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n // Stop propagation to prevent the event from affecting parent components like dialogs\n event.stopPropagation();\n\n // Update `open` based on the popover state\n this.open = event.detail;\n }\n\n @Listen('dropdownItemSelected')\n handleDropdownItemSelected(\n event: CustomEvent<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >,\n ) {\n if (this.disabled || this.readonly) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n if (item !== event.target) {\n item.removeAttribute('selected');\n } else {\n item.setAttribute('selected', 'true');\n }\n });\n\n this.clearFilter();\n this.value = event.detail.value;\n this.open = false;\n }\n\n @Listen('blur', { capture: true })\n handleBlur(event: FocusEvent) {\n const target = event.relatedTarget;\n if (!(target instanceof Node) || !this.el.contains(target)) {\n this.open = false;\n\n if (this.inputElement) {\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n setTimeout(() => {\n this.filterItems();\n }, 200);\n }\n }\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.el) return;\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n const items = Array.from(\n this.el.querySelectorAll(\n 'nv-fielddropdownitem:not([disabled]):not([hidden])',\n ),\n ) as HTMLNvFielddropdownitemElement[];\n\n let currentIndex = items.findIndex(item =>\n item.classList.contains('highlighted'),\n );\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n currentIndex = (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex = (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.open = false;\n }\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.resetFilter();\n\n if (this.filterable && this.filterText) {\n this.filterItems();\n }\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n componentDidLoad() {\n if (this.value) {\n this.updateSelectedItem(this.value);\n }\n if (this.inputElement) {\n this.inputElement.value = this.getSelectedLabel();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Retrieves the current filter text entered by the user.\n * @returns {string} The filter text.\n */\n @Method()\n async getFilterText(): Promise<string> {\n return this.filterText;\n }\n\n private handleInputContainerClick = (event: MouseEvent) => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'P' || target.tagName === 'SPAN') {\n this.open = true;\n\n // Simulate focus to trigger \"focus-within\" style\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n // Remove the \"focus-within\" class after a delay or when the popover is closed\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n // Or remove the class when the popover is closed\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n private handleInput = (event: Event) => {\n if (!this.filterable) return;\n if (this.disabled || this.readonly) {\n return;\n }\n\n const input = event.target as HTMLInputElement;\n this.open = true;\n\n // Clear any existing timer\n if (this.debounceTimer) {\n window.clearTimeout(this.debounceTimer);\n }\n\n // Set a new timer for filtering\n this.debounceTimer = window.setTimeout(() => {\n this.filterText = input.value.toLowerCase();\n this.filterItems();\n }, this.debounceDelay);\n };\n\n /**\n * Filter dropdown items based on the text entered by the user.\n * If no items are found, display a message indicating no results.\n */\n private filterItems() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n // Remove the \"no results found\" item if it exists\n const existingEmptyItem = this.el.querySelector(\n 'nv-fielddropdownitem[data-empty]',\n );\n if (existingEmptyItem) {\n existingEmptyItem.remove();\n }\n\n let hasVisibleItems = false;\n\n // Iterate over all items and adjust their visibility\n items.forEach(item => {\n const textContent = item.textContent?.toLowerCase() || ''; // Get the textual content of the slot\n const value = item.value?.toLowerCase() || ''; // Get the value of the `value` attribute\n\n // Check if the filtered text is present either in the value or in the textual content\n const shouldShow =\n value.includes(this.filterText) ||\n textContent.includes(this.filterText);\n\n if (shouldShow) item.removeAttribute('hidden');\n else item.setAttribute('hidden', '');\n\n if (shouldShow) {\n hasVisibleItems = true;\n }\n });\n\n // If no items are visible, add the \"no results found\" item\n if (!hasVisibleItems) {\n const emptyItem = document.createElement('nv-fielddropdownitem');\n emptyItem.setAttribute('data-empty', 'true');\n emptyItem.setAttribute('disabled', 'true');\n emptyItem.textContent = this.emptyResult;\n this.el.querySelector('ul[slot=\"content\"]')?.appendChild(emptyItem);\n }\n }\n\n /** Reset the filter and make all items visible. */\n private resetFilter() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n item.style.display = '';\n });\n }\n\n private handleInputFocus = () => {\n if (this.disabled || this.readonly) return;\n this.open = true;\n };\n\n private togglePopover = () => {\n if (this.disabled || this.readonly) return;\n this.open = !this.open;\n };\n\n private updateHighlightedItem(\n items: HTMLNvFielddropdownitemElement[],\n index: number,\n ) {\n items.forEach((item, i) => {\n if (i === index) {\n item.classList.add('highlighted');\n item.focus();\n item.scrollIntoView({ block: 'nearest' });\n } else {\n item.classList.remove('highlighted');\n }\n });\n }\n\n private getSelectedLabel = (): string => {\n if (!this.value) return '';\n\n if (this.options?.length > 1) {\n const matchingItem = this.options.find(\n option => option.value === this.value,\n );\n return matchingItem?.label ?? matchingItem?.value ?? this.value;\n }\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => item.value === this.value);\n\n const selectedLabel = matchingItem\n ? matchingItem.label ??\n matchingItem.textContent?.trim() ??\n matchingItem.value\n : '';\n\n return selectedLabel;\n };\n\n private clearFilter = () => {\n if (!this.filterable) return;\n\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n this.inputElement.focus();\n this.filterItems();\n };\n\n private updateSelectedItem(value: string) {\n if (!value) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => {\n const itemLabel = item.getAttribute('label');\n const itemValue = item.getAttribute('value');\n const itemText = item.textContent?.trim();\n return itemLabel === value || itemValue === value || itemText === value;\n });\n\n items.forEach(item => {\n if (item === matchingItem) {\n item.setAttribute('selected', '');\n } else {\n item.removeAttribute('selected');\n }\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"combobox\"\n aria-expanded={this.open.toString()}\n aria-haspopup=\"listbox\"\n aria-label={this.label}\n >\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.filterable || this.disabled || this.readonly ? (\n <input\n data-scope=\"focusable\"\n id={this.inputId}\n type=\"search\"\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n value={this.getSelectedLabel()}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n onFocus={this.handleInputFocus}\n onClick={this.handleInputFocus}\n onKeyDown={this.handleKeyDown}\n />\n ) : (\n <p\n data-scope=\"focusable\"\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClick}\n tabIndex={this.disabled ? -1 : 0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocus}\n >\n {this.getSelectedLabel() || this.value || this.placeholder}\n </p>\n )}\n\n {this.filterable && this.filterText && this.open && (\n <nv-iconbutton\n name=\"x\"\n size=\"md\"\n emphasis=\"lower\"\n class=\"clear-button\"\n onClick={this.clearFilter}\n aria-label=\"Clear input\"\n />\n )}\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n data-scope=\"toggle-dropdown\"\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide dropdown' : 'Show dropdown'}\n aria-pressed={this.open.toString()}\n onClick={this.togglePopover}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div\n slot=\"content\"\n style={this.maxHeight ? { maxHeight: this.maxHeight } : {}}\n >\n {this.options?.length > 0 ? (\n <ul>\n {this.options.map(option => (\n <nv-fielddropdownitem\n label={option.label}\n value={option.value}\n disabled={option.disabled}\n selected={option.value === this.value}\n />\n ))}\n </ul>\n ) : (\n <slot name=\"content\"></slot>\n )}\n </div>\n </nv-popover>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n /****************************************************************************/\n}\n"],"mappings":"oGAAA,MAAMA,EAAqB,8yNAC3B,MAAAC,EAAeD,E,MC+BFE,EAAe,MAN5B,WAAAC,CAAAC,G,gHA6BWC,KAAAC,QAAkBC,IA2ClBF,KAAAG,aAA2C,MAe3CH,KAAAI,SAAoB,MAQpBJ,KAAAK,SAAoB,MAQpBL,KAAAM,SAAoB,MAQpBN,KAAAO,MAAiB,MAcjBP,KAAAQ,UAAoB,GAM7BR,KAAAS,KAAgB,MAMPT,KAAAU,YAAsB,mBAMtBV,KAAAW,WAAsB,MAkCtBX,KAAAY,cAAwB,IASxBZ,KAAAa,UAAqB,MAMrBb,KAAAc,MAAiB,MAU1Bd,KAAAe,WAAqB,GAGrBf,KAAAgB,eAA8B,IAAIC,IAyK1BjB,KAAAkB,0BAA6BC,IACnC,GAAInB,KAAKM,UAAYN,KAAKK,SAAU,CAClC,M,CAGF,MAAMe,EAASD,EAAMC,OAErB,GAAIA,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OX,MACd/B,SAAU0C,EAAO1C,SACjB+D,SAAUrB,EAAOX,QAAUrC,KAAKqC,WAKtC6E,EAAA,QAAMK,KAAK,eAKfvH,KAAK0I,aACL1I,KAAKuB,GAAGC,cAAc,0BACtB0F,EAAA,OAAA5B,IAAA,2CAAKqC,MAAM,eACTT,EAAA,QAAA5B,IAAA,2CAAMiC,KAAK,eAAevH,KAAK0I,eAIjC1I,KAAK2I,kBACL3I,KAAKuB,GAAGC,cAAc,gCACtB0F,EAAA,OAAA5B,IAAA,2CAAKsD,QAAS5I,KAAKO,MAAOoH,MAAM,qBAC9BT,EAAA,QAAA5B,IAAA,2CAAMiC,KAAK,qBAAqBvH,KAAK2I,mB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["nvFielddropdownCss","NvFielddropdownStyle0","NvFielddropdown","constructor","hostRef","this","inputId","uuidv4","autocomplete","required","readonly","disabled","error","maxHeight","open","emptyResult","filterable","debounceDelay","autofocus","fluid","filterText","selectedValues","Set","handleInputContainerClick","event","target","tagName","inputContainer","el","querySelector","classList","add","removeFocusWithin","remove","popoverElement","addEventListener","handleInput","input","debounceTimer","window","clearTimeout","setTimeout","value","toLowerCase","filterItems","handleInputFocus","togglePopover","getSelectedLabel","_a","options","length","matchingItem","find","option","_c","_b","label","items","Array","from","querySelectorAll","item","selectedLabel","_f","_d","_e","textContent","trim","clearFilter","inputElement","focus","handleOptionsChange","newValue","defaultValue","selected","updateSelectedItem","watchValueHandler","valueChanged","emit","handleOpenChanged","stopPropagation","detail","handleDropdownItemSelected","forEach","removeAttribute","setAttribute","handleBlur","relatedTarget","Node","contains","handleKeyDown","key","preventDefault","currentIndex","findIndex","updateHighlightedItem","componentWillLoad","resetFilter","componentDidLoad","getFilterText","existingEmptyItem","hasVisibleItems","shouldShow","includes","emptyItem","document","createElement","appendChild","style","display","index","i","scrollIntoView","block","itemLabel","getAttribute","itemValue","itemText","render","h","Host","role","toString","htmlFor","name","ref","triggerMode","placement","class","slot","onClick","id","type","e","placeholder","readOnly","onInput","onFocus","onKeyDown","tabIndex","size","emphasis","map","description","errorDescription","hidden"],"sources":["src/components/nv-fielddropdown/styles/nv-fielddropdown.scss?tag=nv-fielddropdown","src/components/nv-fielddropdown/nv-fielddropdown.tsx"],"sourcesContent":["@use './mixins' as *;\n@import '../../../styles/form-field';\n@import '../../../styles/scrollbar';\n\nnv-fielddropdown {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n &[hidden]:not([hidden='false']) label {\n display: none;\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n @include form-field-popover();\n\n div[slot='content'] {\n @include scrollbar();\n max-height: calc(90vh - var(--list-dropdown-padding) * 2);\n overflow-y: auto;\n position: relative;\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n @include input-wrapper-styles();\n }\n\n .input-container {\n @include form-field-input-container();\n @include input-container-styles();\n\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n input,\n p.non-filterable-text {\n @include form-field-input();\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n\n .non-filterable-text {\n @include non-filterable-text-styles();\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n Method,\n} from '@stencil/core';\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot content - Use a <ul></ul> tag for the slot, and place <nv-dropdownitem> elements inside.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fielddropdown',\n styleUrl: 'styles/nv-fielddropdown.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFielddropdown {\n @Element() el: HTMLNvFielddropdownElement;\n private inputElement!: HTMLInputElement;\n private popoverElement!: HTMLNvPopoverElement;\n /**\n * Timer for debouncing input events.\n * Private property preferred over @State as it:\n * - Doesn't need to trigger re-renders\n * - Is purely for internal logic\n * - Improves performance by avoiding Stencil's reactivity system\n */\n private debounceTimer: number;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input's data in form submissions. It should be\n * unique within the form to avoid conflicts.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It's a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It's a great way to provide examples or suggestions directly\n * in the field before they start typing.\n * The placeholder is displayed only when the filterable option is enabled.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they've used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input's value is managed by the component's state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Display the input field's content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won't be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * The disabled prop lets you turn off the input field so that users can't\n * type in it. When disabled, the field is grayed out and won't respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Alters the input field's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the dropdown\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Defines the maximum height of the multiselect list when open.\n */\n @Prop({ reflect: true })\n readonly maxHeight: string = '';\n\n /**\n * State of the dropdown popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * The text to display when no items match the filter.\n */\n @Prop({ reflect: true })\n readonly emptyResult: string = 'No results found';\n\n /**\n * Enables or disables the filtering feature for the dropdown items.\n */\n @Prop({ reflect: true })\n readonly filterable: boolean = false;\n\n /**\n * List of options used to automatically generate dropdown items. This\n * provides an alternative to using the slot manually.\n *\n * @example\n * options=[{\n * \"label\": \"Option 1\",\n * \"value\": \"option1\",\n * \"selected\": true,\n * },\n * {\n * \"label\": \"Option 2\",\n * \"value\": \"option2\",\n * }]\n */\n @Prop({ reflect: false })\n readonly options?: {\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Whether this option is pre-selected */\n selected?: boolean;\n }[];\n\n /**\n * Delay in milliseconds before the search is triggered when typing in the filter input.\n * @default 300\n */\n @Prop({ reflect: true })\n readonly debounceDelay: number = 300;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n /**\n * The text entered by the user for filtering dropdown items.\n */\n @State()\n filterText: string = '';\n\n @State()\n selectedValues: Set<string> = new Set();\n\n //#endregion STATE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when an item is clicked.\n */\n @Event()\n dropdownItemSelected: EventEmitter<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('options')\n handleOptionsChange(newValue: typeof this.options) {\n if (!newValue) return;\n\n if (!this.value) {\n const defaultValue = newValue.find(option => option.selected);\n this.value = defaultValue?.value ?? '';\n this.updateSelectedItem(this.value);\n }\n }\n\n @Watch('value')\n watchValueHandler(newValue: typeof this.value) {\n this.valueChanged.emit(newValue);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LISTENERS\n\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n // Stop propagation to prevent the event from affecting parent components like dialogs\n event.stopPropagation();\n\n // Update `open` based on the popover state\n this.open = event.detail;\n }\n\n @Listen('dropdownItemSelected')\n handleDropdownItemSelected(\n event: CustomEvent<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >,\n ) {\n if (this.disabled || this.readonly) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n if (item !== event.target) {\n item.removeAttribute('selected');\n } else {\n item.setAttribute('selected', 'true');\n }\n });\n\n this.clearFilter();\n this.value = event.detail.value;\n this.open = false;\n }\n\n @Listen('blur', { capture: true })\n handleBlur(event: FocusEvent) {\n const target = event.relatedTarget;\n if (!(target instanceof Node) || !this.el.contains(target)) {\n this.open = false;\n\n if (this.inputElement) {\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n setTimeout(() => {\n this.filterItems();\n }, 200);\n }\n }\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.el) return;\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n const items = Array.from(\n this.el.querySelectorAll(\n 'nv-fielddropdownitem:not([disabled]):not([hidden])',\n ),\n ) as HTMLNvFielddropdownitemElement[];\n\n let currentIndex = items.findIndex(item =>\n item.classList.contains('highlighted'),\n );\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n currentIndex = (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex = (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.open = false;\n }\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.resetFilter();\n\n if (this.filterable && this.filterText) {\n this.filterItems();\n }\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n componentDidLoad() {\n if (this.value) {\n this.updateSelectedItem(this.value);\n }\n if (this.inputElement) {\n this.inputElement.value = this.getSelectedLabel();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Retrieves the current filter text entered by the user.\n * @returns {string} The filter text.\n */\n @Method()\n async getFilterText(): Promise<string> {\n return this.filterText;\n }\n\n private handleInputContainerClick = (event: MouseEvent) => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'P' || target.tagName === 'SPAN') {\n this.open = true;\n\n // Simulate focus to trigger \"focus-within\" style\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n // Remove the \"focus-within\" class after a delay or when the popover is closed\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n // Or remove the class when the popover is closed\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n private handleInput = (event: Event) => {\n if (!this.filterable) return;\n if (this.disabled || this.readonly) {\n return;\n }\n\n const input = event.target as HTMLInputElement;\n this.open = true;\n\n // Clear any existing timer\n if (this.debounceTimer) {\n window.clearTimeout(this.debounceTimer);\n }\n\n // Set a new timer for filtering\n this.debounceTimer = window.setTimeout(() => {\n this.filterText = input.value.toLowerCase();\n this.filterItems();\n }, this.debounceDelay);\n };\n\n /**\n * Filter dropdown items based on the text entered by the user.\n * If no items are found, display a message indicating no results.\n */\n private filterItems() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n // Remove the \"no results found\" item if it exists\n const existingEmptyItem = this.el.querySelector(\n 'nv-fielddropdownitem[data-empty]',\n );\n if (existingEmptyItem) {\n existingEmptyItem.remove();\n }\n\n let hasVisibleItems = false;\n\n // Iterate over all items and adjust their visibility\n items.forEach(item => {\n const textContent = item.textContent?.toLowerCase() || ''; // Get the textual content of the slot\n const value = item.value?.toLowerCase() || ''; // Get the value of the `value` attribute\n\n // Check if the filtered text is present either in the value or in the textual content\n const shouldShow =\n value.includes(this.filterText) ||\n textContent.includes(this.filterText);\n\n if (shouldShow) item.removeAttribute('hidden');\n else item.setAttribute('hidden', '');\n\n if (shouldShow) {\n hasVisibleItems = true;\n }\n });\n\n // If no items are visible, add the \"no results found\" item\n if (!hasVisibleItems) {\n const emptyItem = document.createElement('nv-fielddropdownitem');\n emptyItem.setAttribute('data-empty', 'true');\n emptyItem.setAttribute('disabled', 'true');\n emptyItem.textContent = this.emptyResult;\n this.el.querySelector('ul[slot=\"content\"]')?.appendChild(emptyItem);\n }\n }\n\n /** Reset the filter and make all items visible. */\n private resetFilter() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n item.style.display = '';\n });\n }\n\n private handleInputFocus = () => {\n if (this.disabled || this.readonly) return;\n this.open = true;\n };\n\n private togglePopover = () => {\n if (this.disabled || this.readonly) return;\n this.open = !this.open;\n };\n\n private updateHighlightedItem(\n items: HTMLNvFielddropdownitemElement[],\n index: number,\n ) {\n items.forEach((item, i) => {\n if (i === index) {\n item.classList.add('highlighted');\n item.focus();\n item.scrollIntoView({ block: 'nearest' });\n } else {\n item.classList.remove('highlighted');\n }\n });\n }\n\n private getSelectedLabel = (): string => {\n if (!this.value) return '';\n\n if (this.options?.length > 1) {\n const matchingItem = this.options.find(\n option => option.value === this.value,\n );\n return matchingItem?.label ?? matchingItem?.value ?? this.value;\n }\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => item.value === this.value);\n\n const selectedLabel = matchingItem\n ? matchingItem.label ??\n matchingItem.textContent?.trim() ??\n matchingItem.value\n : '';\n\n return selectedLabel;\n };\n\n private clearFilter = () => {\n if (!this.filterable) return;\n\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n this.inputElement.focus();\n this.filterItems();\n };\n\n private updateSelectedItem(value: string) {\n if (!value) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => {\n const itemLabel = item.getAttribute('label');\n const itemValue = item.getAttribute('value');\n const itemText = item.textContent?.trim();\n return itemLabel === value || itemValue === value || itemText === value;\n });\n\n items.forEach(item => {\n if (item === matchingItem) {\n item.setAttribute('selected', '');\n } else {\n item.removeAttribute('selected');\n }\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"combobox\"\n aria-expanded={this.open.toString()}\n aria-haspopup=\"listbox\"\n aria-label={this.label}\n >\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.filterable || this.disabled || this.readonly ? (\n <input\n data-scope=\"focusable\"\n id={this.inputId}\n type=\"search\"\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n value={this.getSelectedLabel()}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n onFocus={this.handleInputFocus}\n onClick={this.handleInputFocus}\n onKeyDown={this.handleKeyDown}\n />\n ) : (\n <p\n data-scope=\"focusable\"\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClick}\n tabIndex={this.disabled ? -1 : 0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocus}\n >\n {this.getSelectedLabel() || this.value || this.placeholder}\n </p>\n )}\n\n {this.filterable && this.filterText && this.open && (\n <nv-iconbutton\n name=\"x\"\n size=\"md\"\n emphasis=\"lower\"\n class=\"clear-button\"\n onClick={this.clearFilter}\n aria-label=\"Clear input\"\n />\n )}\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n data-scope=\"toggle-dropdown\"\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide dropdown' : 'Show dropdown'}\n aria-pressed={this.open.toString()}\n onClick={this.togglePopover}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div\n slot=\"content\"\n style={this.maxHeight ? { maxHeight: this.maxHeight } : {}}\n >\n {this.options?.length > 0 ? (\n <ul>\n {this.options.map(option => (\n <nv-fielddropdownitem\n label={option.label}\n value={option.value}\n disabled={option.disabled}\n selected={option.value === this.value}\n />\n ))}\n </ul>\n ) : (\n <slot name=\"content\"></slot>\n )}\n </div>\n </nv-popover>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n /****************************************************************************/\n}\n"],"mappings":"oGAAA,MAAMA,EAAqB,m2RAC3B,MAAAC,EAAeD,E,MC+BFE,EAAe,MAN5B,WAAAC,CAAAC,G,gHA6BWC,KAAAC,QAAkBC,IA2ClBF,KAAAG,aAA2C,MAe3CH,KAAAI,SAAoB,MAQpBJ,KAAAK,SAAoB,MAQpBL,KAAAM,SAAoB,MAQpBN,KAAAO,MAAiB,MAcjBP,KAAAQ,UAAoB,GAM7BR,KAAAS,KAAgB,MAMPT,KAAAU,YAAsB,mBAMtBV,KAAAW,WAAsB,MAkCtBX,KAAAY,cAAwB,IASxBZ,KAAAa,UAAqB,MAMrBb,KAAAc,MA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Q,WAAc,MAEvDmC,EAAA3C,KAAK4C,WAAO,MAAAD,SAAA,SAAAA,EAAEE,QAAS,EACtBqE,EAAA,UACGlH,KAAK4C,QAAQ6F,KAAIzF,GAChBkE,EAAA,wBACE/D,MAAOH,EAAOG,MACdd,MAAOW,EAAOX,MACd/B,SAAU0C,EAAO1C,SACjB+D,SAAUrB,EAAOX,QAAUrC,KAAKqC,WAKtC6E,EAAA,QAAMK,KAAK,eAKfvH,KAAK0I,aACL1I,KAAKuB,GAAGC,cAAc,0BACtB0F,EAAA,OAAA5B,IAAA,2CAAKqC,MAAM,eACTT,EAAA,QAAA5B,IAAA,2CAAMiC,KAAK,eAAevH,KAAK0I,eAIjC1I,KAAK2I,kBACL3I,KAAKuB,GAAGC,cAAc,gCACtB0F,EAAA,OAAA5B,IAAA,2CAAKsD,QAAS5I,KAAKO,MAAOoH,MAAM,qBAC9BT,EAAA,QAAA5B,IAAA,2CAAMiC,KAAK,qBAAqBvH,KAAK2I,mB","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h as t,r as e,c as n,H as r,g as s}from"./p-d0a33e64.js";import{C as a,d as i,W as o}from"./p-e2d0a77d.js";import{c}from"./p-0462f723.js";var d={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(c,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",s="second",a="minute",i="hour",o="day",c="week",d="month",h="quarter",l="year",u="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},g=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},y={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),s=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(s,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),s=e.clone().add(r,d),a=n-s<0,i=e.clone().add(r+(a?-1:1),d);return+(-(r+(n-s)/(a?s-i:i-s))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:d,y:l,w:c,d:o,D:u,h:i,m:a,s,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=m;var k="$isDayjsObject",D=function(t){return t instanceof Y||!(!t||!t[k])},M=function t(e,n,r){var s;if(!e)return b;if("string"==typeof e){var a=e.toLowerCase();w[a]&&(s=a),n&&(w[a]=n,s=a);var i=e.split("-");if(!s&&i.length>1)return t(i[0])}else{var o=e.name;w[o]=e,s=o}return!r&&s&&(b=s),s||!r&&b},x=function(t,e){if(D(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new Y(n)},C=y;C.l=M,C.i=D,C.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var Y=function(){function m(t){this.$L=M(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var g=m.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(C.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var s=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],s,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],s,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(e)}(t),this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===f)},g.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},g.isAfter=function(t,e){return x(t)<this.startOf(e)},g.isBefore=function(t,e){return this.endOf(e)<x(t)},g.$g=function(t,e,n){return C.u(t)?this[e]:this.set(n,t)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(t,e){var n=this,r=!!C.u(e)||e,h=C.p(t),f=function(t,e){var s=C.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?s:s.endOf(o)},p=function(t,e){return C.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},v=this.$W,m=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(h){case l:return r?f(1,0):f(31,11);case d:return r?f(1,m):f(0,m+1);case c:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return f(r?g-w:g+(6-w),m);case o:case u:return p(y+"Hours",0);case i:return p(y+"Minutes",1);case a:return p(y+"Seconds",2);case s:return p(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(t){return this.startOf(t,!1)},g.$set=function(t,e){var n,c=C.p(t),h="set"+(this.$u?"UTC":""),f=(n={},n[o]=h+"Date",n[u]=h+"Date",n[d]=h+"Month",n[l]=h+"FullYear",n[i]=h+"Hours",n[a]=h+"Minutes",n[s]=h+"Seconds",n[r]=h+"Milliseconds",n)[c],p=c===o?this.$D+(e-this.$W):e;if(c===d||c===l){var v=this.clone().set(u,1);v.$d[f](p),v.init(),this.$d=v.set(u,Math.min(this.$D,v.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},g.set=function(t,e){return this.clone().$set(t,e)},g.get=function(t){return this[C.p(t)]()},g.add=function(r,h){var u,f=this;r=Number(r);var p=C.p(h),v=function(t){var e=x(f);return C.w(e.date(e.date()+Math.round(t*r)),f)};if(p===d)return this.set(d,this.$M+r);if(p===l)return this.set(l,this.$y+r);if(p===o)return v(1);if(p===c)return v(7);var m=(u={},u[a]=e,u[i]=n,u[s]=t,u)[p]||1,g=this.$d.getTime()+r*m;return C.w(g,this)},g.subtract=function(t,e){return this.add(-1*t,e)},g.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",s=C.z(this),a=this.$H,i=this.$m,o=this.$M,c=n.weekdays,d=n.months,h=n.meridiem,l=function(t,n,s,a){return t&&(t[n]||t(e,r))||s[n].slice(0,a)},u=function(t){return C.s(a%12||12,t,"0")},p=h||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(v,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return C.s(e.$y,4,"0");case"M":return o+1;case"MM":return C.s(o+1,2,"0");case"MMM":return l(n.monthsShort,o,d,3);case"MMMM":return l(d,o);case"D":return e.$D;case"DD":return C.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return l(n.weekdaysMin,e.$W,c,2);case"ddd":return l(n.weekdaysShort,e.$W,c,3);case"dddd":return c[e.$W];case"H":return String(a);case"HH":return C.s(a,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return p(a,i,!0);case"A":return p(a,i,!1);case"m":return String(i);case"mm":return C.s(i,2,"0");case"s":return String(e.$s);case"ss":return C.s(e.$s,2,"0");case"SSS":return C.s(e.$ms,3,"0");case"Z":return s}return null}(t)||s.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,u,f){var p,v=this,m=C.p(u),g=x(r),y=(g.utcOffset()-this.utcOffset())*e,b=this-g,w=function(){return C.m(v,g)};switch(m){case l:p=w()/12;break;case d:p=w();break;case h:p=w()/3;break;case c:p=(b-y)/6048e5;break;case o:p=(b-y)/864e5;break;case i:p=b/n;break;case a:p=b/e;break;case s:p=b/t;break;default:p=b}return f?p:C.a(p)},g.daysInMonth=function(){return this.endOf(d).$D},g.$locale=function(){return w[this.$L]},g.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=M(t,e,!0);return r&&(n.$L=r),n},g.clone=function(){return C.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),S=Y.prototype;return x.prototype=S,[["$ms",r],["$s",s],["$m",a],["$H",i],["$W",o],["$M",d],["$y",l],["$D",u]].forEach((function(t){S[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,Y,x),t.$i=!0),x},x.locale=M,x.isDayjs=D,x.unix=function(t){return x(1e3*t)},x.en=w[b],x.Ls=w,x.p={},x}))})(d);const h=d.exports;var l={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(c,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},o=function(t){return(t=+t)+(t>68?1900:2e3)};var c=function(t){return function(e){this[t]=+e}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],h=function(t){var e=i[t];return e&&(e.indexOf?e:e.s.concat(e.f))},l=function(t,e){var n,r=i.meridiem;if(r){for(var s=1;s<=24;s+=1)if(t.indexOf(r(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},u={A:[a,function(t){this.afternoon=l(t,!1)}],a:[a,function(t){this.afternoon=l(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[r,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[r,c("day")],Do:[a,function(t){var e=i.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r)}],w:[s,c("week")],ww:[r,c("week")],M:[s,c("month")],MM:[r,c("month")],MMM:[a,function(t){var e=h("months"),n=(h("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[a,function(t){var e=h("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[r,function(t){this.year=o(t)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function f(n){var r,s;r=n,s=i&&i.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var a=r&&r.toUpperCase();return n||s[r]||t[r]||s[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=a.length,c=0;c<o;c+=1){var d=a[c],h=u[d],l=h&&h[0],f=h&&h[1];a[c]=f?{regex:l,parser:f}:d.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,r=0;n<o;n+=1){var s=a[n];if("string"==typeof s)r+=s.length;else{var i=s.regex,c=s.parser,d=t.slice(r),h=i.exec(d)[0];c.call(e,h),t=t.replace(h,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(o=t.parseTwoDigitYear);var r=e.prototype,s=r.parse;r.parse=function(t){var e=t.date,r=t.utc,a=t.args;this.$u=r;var o=a[1];if("string"==typeof o){var c=!0===a[2],d=!0===a[3],h=c||d,l=a[2];d&&(l=a[2]),i=this.$locale(),!c&&l&&(i=n.Ls[l]),this.$d=function(t,e,n,r){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var s=f(e)(t),a=s.year,i=s.month,o=s.day,c=s.hours,d=s.minutes,h=s.seconds,l=s.milliseconds,u=s.zone,p=s.week,v=new Date,m=o||(a||i?1:v.getDate()),g=a||v.getFullYear(),y=0;a&&!i||(y=i>0?i-1:v.getMonth());var b,w=c||0,k=d||0,D=h||0,M=l||0;return u?new Date(Date.UTC(g,y,m,w,k,D,M+60*u.offset*1e3)):n?new Date(Date.UTC(g,y,m,w,k,D,M)):(b=new Date(g,y,m,w,k,D,M),p&&(b=r(b).week(p).toDate()),b)}catch(t){return new Date("")}}(e,o,r,n),this.init(),l&&!0!==l&&(this.$L=this.locale(l).$L),h&&e!=this.format(o)&&(this.$d=new Date("")),i={}}else if(o instanceof Array)for(var u=o.length,p=1;p<=u;p+=1){a[1]=o[p-1];var v=n.apply(this,a);if(v.isValid()){this.$d=v.$d,this.$L=v.$L,this.init();break}p===u&&(this.$d=new Date(""))}else s.call(this,t)}}}))})(l);const u=l.exports;var f={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(c,(function(){var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,s,a){var i=s.prototype;a.utc=function(t){var e={date:t,utc:!0,args:arguments};return new s(e)},i.utc=function(e){var n=a(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var o=i.parse;i.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var c=i.init;i.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var d=i.utcOffset;i.utcOffset=function(r,s){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?d.call(this):this.$offset;if("string"==typeof r&&(r=function(t){void 0===t&&(t="");var r=t.match(e);if(!r)return null;var s=(""+r[0]).match(n)||["-",0,0],a=s[0],i=60*+s[1]+ +s[2];return 0===i?0:"+"===a?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r,o=this;if(s)return o.$offset=i,o.$u=0===r,o;if(0!==r){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(i+c,t)).$offset=i,o.$x.$localOffset=c}else o=this.utc();return o};var h=i.format;i.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,e)},i.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var l=i.toDate;i.toDate=function(t){return"s"===t&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var u=i.diff;i.diff=function(t,e,n){if(t&&this.$u===t.$u)return u.call(this,t,e,n);var r=this.local(),s=a(t).local();return u.call(r,s,e,n)}}}))})(f);const p=f.exports;var v={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(c,(function(){var t="week",e="year";return function(n,r,s){var a=r.prototype;a.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var r=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var a=s(this).startOf(e).add(1,e).date(r),i=s(this).endOf(t);if(a.isBefore(i))return 1}var o=s(this).startOf(e).date(r).startOf(t).subtract(1,"millisecond"),c=this.diff(o,t,!0);return c<0?s(this).startOf("week").week():Math.ceil(c)},a.weeks=function(t){return void 0===t&&(t=null),this.week(t)}}}))})(v);const m=v.exports;h.extend(u);h.extend(p);h.extend(m);function g(t,e){if(!t)return"";const n=e.dateFormat.includes("Z");const r=e.dateFormat==="YYYY-MM-DD[T]HH:mm:ss[Z]";if(r){return t.toISOString()}if(e.dateFormat==="Ticks"){const e=t.getTime()*1e4+621355968e9;return e.toString()}if(e.dateFormat==="X"){return h(t).unix().toString()}if(e.dateFormat==="x"){return t.getTime().toString()}return n?h(t).utc().format(e.dateFormat):h(t).format(e.dateFormat)}function y(t,e,n){if(!t||!e)return false;if(n.isUTCMode){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}else{return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}}function b(t,e,n){if(!t||!e)return false;if(n.isUTCMode){return t.getUTCFullYear()<e.getUTCFullYear()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()<e.getUTCMonth()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()<=e.getUTCDate()}else{return t.getFullYear()<e.getFullYear()||t.getFullYear()===e.getFullYear()&&t.getMonth()<e.getMonth()||t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()<=e.getDate()}}function w(t,e,n){if(!t||!e)return false;if(n.isUTCMode){return t.getUTCFullYear()>e.getUTCFullYear()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()>e.getUTCMonth()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()>=e.getUTCDate()}else{return t.getFullYear()>e.getFullYear()||t.getFullYear()===e.getFullYear()&&t.getMonth()>e.getMonth()||t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()>=e.getDate()}}function k(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()));e.setUTCDate(e.getUTCDate()+3-(e.getUTCDay()+6)%7);const n=new Date(Date.UTC(e.getUTCFullYear(),0,4));return 1+Math.round(((e.getTime()-n.getTime())/864e5-3+(n.getUTCDay()+6)%7)/7)}function D(t,e){if(t instanceof Date)return t;const n=e.includes("Z");if(typeof t==="string"&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/.test(t)){try{const e=new Date(t);if(!isNaN(e.getTime())){return e}}catch(t){console.error("Error parsing ISO date:",t)}}if(e==="X"){const e=Number(t);if(isNaN(e))return null;return n?h.unix(e).utc().toDate():h.unix(e).toDate()}if(e==="x"){const e=Number(t);if(isNaN(e))return null;return n?h(e).utc().toDate():h(e).toDate()}if(e==="Ticks"){const e=Number(t);if(isNaN(e))return null;const r=(e-621355968e9)/1e4;return n?h(r).utc().toDate():h(r).toDate()}let r;if(n){r=h.utc(t,e,true)}else{r=h(t,e,true)}if(!r.isValid()){console.error(`Parsing error:`,{dateInput:t,dateFormat:e});return null}return r.toDate()}const M=e=>{const{date:n,dayOfMonth:r,isCurrentMonth:s,isSelected:a,isInRange:i,isStart:o,isEnd:c,isToday:d,isDisabled:h,onClick:l}=e;const u=["day",a?"selected":"",o?"range-start":"",c?"range-end":"",i?"in-range":"",h?"disabled":"",!s?"outside-month":"",d?"is-today":""].filter(Boolean).join(" ");const f=()=>{if(!h&&l){l(n)}};return t("div",{class:u,onClick:f,"aria-disabled":h},r)};const x=e=>{const{onReset:n,onConfirm:r,useSlot:s=false}=e;return t("div",{class:"datepicker-actions"},s?t("slot",{name:"actions"},t("nv-button",{emphasis:"low",size:"xs",onClick:n},"Cancel"),t("nv-button",{size:"xs",onClick:r},"OK")):t("div",null,t("nv-button",{emphasis:"low",size:"xs",onClick:n},"Cancel"),t("nv-button",{size:"xs",onClick:r},"OK")))};const C=e=>{const{weeks:n,localizedWeekText:r,selectionType:s,onWeekSelect:a,calendarIndex:i}=e;const o=t=>{if(s==="range"){const e=t.map((t=>t.date));a(e,i)}};const c=t=>()=>o(t);return t("div",{class:"week-numbers"},t("div",{class:"week-header"},r),n.map(((e,n)=>{var r;const a=((r=e.find((t=>t.date)))===null||r===void 0?void 0:r.date)||new Date;const i=k(a);const o=s==="range";return t("div",{class:`week-number ${o?"clickable":""}`,onClick:c(e),key:`week-${n}`,role:o?"button":undefined,tabindex:o?0:undefined},i)})))};const Y=e=>{const{shortcuts:n,placement:r,onShortcutClick:s}=e;if(!n||n.length===0){return null}const a=t=>()=>s(t);return t("div",{class:`shortcuts-container shortcuts-placement-${r}`},n.map(((e,n)=>t("nv-button",{key:`shortcut-${n}`,emphasis:"lower",size:"xs","aria-label":e.label,onClick:a(e)},e.label))))};const S=e=>{const{currentDate:n,months:r,numberOfCalendars:s,calendarIndex:a,monthOffset:i,onMonthChange:o,onMonthSelect:c,onYearChange:d}=e;const h=t=>()=>o(t);const l=t=>e=>c(e,t);const u=t=>e=>d(e,t);const f=(n.getUTCMonth()+i)%12;const p=n.getUTCFullYear()+Math.floor((n.getUTCMonth()+i)/12);return t("div",{class:"header"},s>1&&a===0&&t("nv-iconbutton",{class:"nav-left",emphasis:"lower",name:"chevron-left",onClick:h(-1)}),t("div",{class:"date-controls"},t("select",{class:"month-select mr-4",onChange:l(i)},r.map((e=>t("option",{key:e.value,value:e.value,selected:e.value===f},e.label)))),t("input",{type:"number",class:"year-input",min:"1950",max:"2100",value:p,onChange:u(i)})),s===1&&t("div",{class:"nav-buttons"},t("nv-iconbutton",{emphasis:"lower",name:"chevron-left",onClick:h(-1)}),t("nv-iconbutton",{emphasis:"lower",name:"chevron-right",onClick:h(1)})),s>1&&a===s-1&&t("nv-iconbutton",{emphasis:"lower",name:"chevron-right",onClick:h(1),class:"nav-right"}))};const T=e=>{const{days:n,dayNames:r,selectionType:s,selectedDate:a,startDate:i,endDate:o,isUTCMode:c,onDayClick:d,isDateInRange:h,isToday:l}=e;return t("div",{class:"days-container"},t("div",{class:"days-header"},r.map(((e,n)=>t("div",{class:"day-header",key:`day-header-${n}`},e)))),t("div",{class:"days-grid"},n.map((e=>{const n=e.date;if(!n)return null;const r=s==="single"&&y(n,a,{isUTCMode:c});const u=h(n);const f=y(n,i,{isUTCMode:c});const p=y(n,o,{isUTCMode:c});const v=l(n);return t(M,{date:n,dayOfMonth:e.dayOfMonth,isCurrentMonth:e.isCurrentMonth,isSelected:r,isInRange:u,isStart:f,isEnd:p,isToday:v,isDisabled:e.isDisabled,selectionType:s,onClick:d})}))))};const $='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)}}';const z=$;const N=class{constructor(r){e(this,r);this.singleDateChange=n(this,"singleDateChange",7);this.rangeDateChange=n(this,"rangeDateChange",7);this.valueChanged=n(this,"valueChanged",7);this.firstDayOfWeek=1;this.numberOfCalendars=1;this.value="";this.locale="en-BE";this.dateFormat="YYYY-MM-DD";this.shortcutsPlacement="bottom";this.selectionType="single";this.showActions=false;this.parsedDisabledDates=[];this.currentDate=null;this.selectedDate=null;this.startDate=null;this.endDate=null;this.months=[];this.parseUnifiedValue=t=>{if(!t){this.selectedDate=null;this.startDate=null;this.endDate=null;return}const e=t.split(",").map((t=>t.trim())).filter(Boolean);if(this.selectionType==="single"&&e.length>=1){const t=D(e[0],this.dateFormat);if(t){this.selectedDate=t;if(!this.showActions){this.singleValue=e[0]}const n=this.el.getAttribute("data-prevent-navigation")==="true";if(!n){this.currentDate=t}}else{console.warn(`Invalid date format: ${e[0]}`);this.selectedDate=null;if(!this.showActions){this.singleValue=""}}}else if(this.selectionType==="range"&&e.length>=2){const t=D(e[0],this.dateFormat);const n=D(e[1],this.dateFormat);if(t&&n){this.startDate=t;this.endDate=n;if(!this.showActions){this.rangeValue={start:e[0],end:e[1]}}const r=this.el.getAttribute("data-prevent-navigation")==="true";if(!r){this.currentDate=t}}else{console.warn(`Invalid date range format: ${e[0]}, ${e[1]}`);this.startDate=null;this.endDate=null;if(!this.showActions){this.rangeValue={start:"",end:""}}}}};this.changeMonth=t=>{const e=new Date(this.currentDate);e.setUTCMonth(e.getUTCMonth()+t);const n=this.el.querySelectorAll(".calendar-grid");n.forEach((e=>{e.classList.remove("slide-left","slide-right");const n=t>0?"slide-left":"slide-right";e.classList.add(n);setTimeout((()=>{e.classList.remove(n)}),300)}));this.currentDate=e};this.handleDateSelection=t=>{if(this.isDateDisabled(t)){return}if(this.selectionType==="single"){this.handleSingleSelection(t)}else{this.handleRangeSelection(t)}};this.handleSingleSelection=t=>{if(!t)return;const e=g(t,{dateFormat:this.dateFormat});this.selectedDate=t;this.value=e;this.valueChanged.emit(e);if(!this.showActions){this.singleValue=e;this.singleDateChange.emit(e)}};this.handleRangeSelection=t=>{if(!this.startDate||this.startDate&&this.endDate){this.startDate=t;this.endDate=null}else{this.endDate=t;if(this.startDate>this.endDate){[this.startDate,this.endDate]=[this.endDate,this.startDate]}const e=g(this.startDate,{dateFormat:this.dateFormat});const n=g(this.endDate,{dateFormat:this.dateFormat});this.value=`${e},${n}`;this.valueChanged.emit(this.value);if(!this.showActions){const t={start:e,end:n};this.rangeDateChange.emit(t);this.rangeValue=t}}};this.isDateDisabled=t=>{if(!t)return true;if(this.min){const e=D(this.min,this.dateFormat);if(e&&t<e){return true}}if(this.max){const e=D(this.max,this.dateFormat);if(e&&t>e){return true}}return this.parsedDisabledDates.some((e=>y(t,e,{isUTCMode:this.isUTCMode})))};this.isDateInRange=t=>{if(!t||!this.startDate||!this.endDate)return false;const e=D(t,this.dateFormat);const n=D(this.startDate,this.dateFormat);const r=D(this.endDate,this.dateFormat);if(isNaN(n.getTime())||isNaN(r.getTime())){return false}if(n>r)return false;return w(e,n,{isUTCMode:this.isUTCMode})&&b(e,r,{isUTCMode:this.isUTCMode})};this.getDayNames=()=>{let t;if(a[this.locale]){t=[...a[this.locale]]}else{const e=new Intl.DateTimeFormat(this.locale,{weekday:"short"});t=[...Array(7)].map(((t,n)=>e.format(new Date(2023,0,n+2)).toUpperCase()))}if(this.firstDayOfWeek===0){return[t[6],...t.slice(0,6)]}else if(this.firstDayOfWeek===1){return t}else{const e=this.firstDayOfWeek-1;return[...t.slice(e),...t.slice(0,e)]}};this.getDaysInMonth=(t=0,e=1)=>{const n=this.currentDate.getUTCFullYear();const r=this.currentDate.getUTCMonth()+t;const s=new Date(Date.UTC(n,r,1));const a=new Date(Date.UTC(n,r+1,0));const i=[];const o=s.getUTCDay();const c=(o-this.firstDayOfWeek+7)%7;if(t===0&&c>0){const t=new Date(Date.UTC(n,r,0)).getUTCDate();for(let e=c;e>0;e--){const s=new Date(Date.UTC(n,r-1,t-e+1));i.push({dayOfMonth:s.getUTCDate(),date:s,isCurrentMonth:false,isDisabled:this.isDateDisabled(s)})}}for(let t=1;t<=a.getUTCDate();t++){const e=new Date(Date.UTC(n,r,t));i.push({dayOfMonth:t,date:e,isCurrentMonth:true,isDisabled:this.isDateDisabled(e)})}if(t===e-1){const t=7-(i.length%7||7);for(let e=1;e<=t;e++){const t=new Date(Date.UTC(n,r+1,e));i.push({dayOfMonth:e,date:t,isCurrentMonth:false,isDisabled:this.isDateDisabled(t)})}}return i};this.initializeMonths=()=>{if(i[this.locale]){this.months=i[this.locale].map(((t,e)=>({value:e,label:t})));return}const t=new Intl.DateTimeFormat(this.locale,{month:"short"});this.months=Array.from({length:12},((e,n)=>({value:n,label:t.format(new Date(2e3,n,1)).toUpperCase()})))};this.getLocalizedWeekText=()=>o[this.locale]||"W";this.handleMonthChange=(t,e=0)=>{const n=t.target;const r=parseInt(n.value,10);const s=this.currentDate.getUTCMonth();const a=r-(s+e)%12;const i=new Date(this.currentDate);i.setUTCMonth(i.getUTCMonth()+a);this.currentDate=i};this.handleYearChange=(t,e=0)=>{const n=t.target;const r=parseInt(n.value,10);if(!isNaN(r)&&r>=1900&&r<=2100){const t=new Date(this.currentDate);t.setUTCFullYear(r);t.setUTCMonth(t.getUTCMonth()+e);this.currentDate=t}};this.handleWeekSelection=(t,e)=>{if(this.selectionType!=="range")return;const n=this.getDaysInMonth(e,this.numberOfCalendars);const r=t[0];const s=t[t.length-1];if(!r||!s)return;const a=n.filter((t=>t.date&&t.date>=r&&t.date<=s));const i=a.filter((t=>!this.isDateDisabled(t.date)));if(i.length>0){this.startDate=i[0].date;this.endDate=i[i.length-1].date;this.rangeDateChange.emit({start:g(this.startDate,{dateFormat:this.dateFormat}),end:g(this.endDate,{dateFormat:this.dateFormat})})}};this.isToday=t=>{const e=new Date;return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()};this.parseDisabledDates=()=>{if(!this.disabledDates){this.parsedDisabledDates=[];return}try{this.parsedDisabledDates=this.disabledDates.map((t=>D(t,this.dateFormat))).filter((t=>t!==null))}catch(t){console.error("Error parsing disabled dates:",t);this.parsedDisabledDates=[]}};this.applyShortcut=t=>{this.selectedDate=null;this.startDate=null;this.endDate=null;if(t.singleValue){const e=D(t.singleValue,this.dateFormat);this.selectedDate=e;const n=g(e,{dateFormat:this.dateFormat});this.value=n;this.valueChanged.emit(n);this.singleValue=n;this.singleDateChange.emit(n);if(!this.showActions){const t=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(t)}this.forceCalendarUpdate(e)}else{const e=D(t.rangeValue.start,this.dateFormat);const n=D(t.rangeValue.end,this.dateFormat);this.startDate=e;this.endDate=n;const r=g(e,{dateFormat:this.dateFormat});const s=g(n,{dateFormat:this.dateFormat});this.value=`${r},${s}`;this.valueChanged.emit(this.value);const a={start:r,end:s};this.rangeDateChange.emit(a);this.rangeValue=a;if(!this.showActions){const t=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(t)}this.currentDate=e}};this.forceCalendarUpdate=t=>{this.currentDate=new Date(t)};this.resetSelection=()=>{if(this.selectionType==="single"){this.selectedDate=null;this.singleValue=null;this.value="";this.singleDateChange.emit("");this.valueChanged.emit("")}else{this.startDate=null;this.endDate=null;this.rangeValue=null;this.value="";this.rangeDateChange.emit({start:"",end:""});this.valueChanged.emit("")}};this.confirmSelection=()=>{if(this.selectionType==="single"&&this.selectedDate){const t=g(this.selectedDate,{dateFormat:this.dateFormat});this.singleDateChange.emit(t);this.singleValue=t;const e=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(e)}else if(this.selectionType==="range"&&this.startDate&&this.endDate){this.rangeDateChange.emit({start:g(this.startDate,{dateFormat:this.dateFormat}),end:g(this.endDate,{dateFormat:this.dateFormat})});this.rangeValue={start:g(this.startDate,{dateFormat:this.dateFormat}),end:g(this.endDate,{dateFormat:this.dateFormat})};const t=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(t)}};this.renderHeader=(e,n)=>t(S,{currentDate:this.currentDate,months:this.months,numberOfCalendars:this.numberOfCalendars,calendarIndex:n,monthOffset:e,onMonthChange:this.changeMonth,onMonthSelect:this.handleMonthChange,onYearChange:this.handleYearChange});this.renderWeekNumbers=(e,n)=>t(C,{weeks:e,localizedWeekText:this.getLocalizedWeekText(),selectionType:this.selectionType,onWeekSelect:this.handleWeekSelection,calendarIndex:n});this.renderCalendar=(e,n)=>{const r=this.getDaysInMonth(n,this.numberOfCalendars);const s=[];for(let t=0;t<r.length;t+=7){s.push(r.slice(t,t+7))}return t("div",{class:"calendar-wrapper"},t("div",{class:"calendar-container",key:`calendar-${e}`},this.renderHeader(n,e),t("div",{class:"calendar-grid"},this.showWeekNumbers&&this.renderWeekNumbers(s,e),t(T,{days:r,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}))),e<this.numberOfCalendars-1&&t("div",{class:"calendar-separator"}))};this.renderShortcuts=()=>{if(!this.hasShortcuts){return null}return t(Y,{shortcuts:this.shortcuts,placement:this.shortcutsPlacement,onShortcutClick:this.applyShortcut})};this.renderActions=()=>t("div",{class:"datepicker-actions"},t("slot",{name:"actions"},t(x,{onReset:this.resetSelection,onConfirm:this.confirmSelection,useSlot:false})))}validateNumberOfCalendars(t){if(t<1||t>4){console.warn("numberOfCalendars must be between 1 and 4. Defaulting to 1.");this.numberOfCalendars=1}}onRangeValueChange(t){if(t&&t.start&&t.end){try{const{startDate:e,endDate:n}=this.validateDateRange(t.start,t.end);this.startDate=e;this.endDate=n;const r=this.el.getAttribute("data-prevent-navigation")==="true";if(!r){this.currentDate=e}}catch(t){console.error("Invalid rangeValue:",t)}}}handleDisabledDatesChange(){this.parseDisabledDates()}onSingleValueChange(t,e){if(this.selectionType==="single"&&t!==e&&t){const e=D(t,this.dateFormat);if(e){this.selectedDate=e;const t=this.el.getAttribute("data-prevent-navigation")==="true";if(!t){this.currentDate=e}}}}onValueChange(t,e){if(t!==e){this.parseUnifiedValue(t)}}componentWillLoad(){this.parseDisabledDates();if(this.value){this.parseUnifiedValue(this.value)}else if(this.selectionType==="single"&&this.singleValue){this.selectedDate=D(this.singleValue,this.dateFormat);this.currentDate=this.selectedDate}else if(this.selectionType==="range"&&this.rangeValue){try{if(this.rangeValue.start&&this.rangeValue.end){const{startDate:t,endDate:e,swapped:n}=this.validateDateRange(this.rangeValue.start,this.rangeValue.end);this.startDate=t;this.endDate=e;this.currentDate=t;if(n){this.rangeValue={start:g(t,{dateFormat:this.dateFormat}),end:g(e,{dateFormat:this.dateFormat})}}}}catch(t){console.error("Invalid rangeValue:",t)}}if(!this.currentDate){this.currentDate=new Date}this.initializeMonths()}get hasShortcuts(){return Boolean(this.shortcutsPlacement&&this.shortcuts)}get hasActions(){return this.showActions}get isUTCMode(){return this.dateFormat.includes("Z")}validateDateRange(t,e){try{const n=D(t,this.dateFormat);const r=D(e,this.dateFormat);if(n&&r&&n>r){console.warn(`Warning: startDate (${g(n,{dateFormat:this.dateFormat})}) is after endDate (${g(r,{dateFormat:this.dateFormat})})`);return{startDate:r,endDate:n,swapped:true}}return{startDate:n,endDate:r,swapped:false}}catch(t){console.error("Invalid date range:",t);throw t}}render(){return t(r,{key:"43d4f3ab9199e9c5f15e853f15283fa59e4a436d"},t("div",{key:"b9956225cb2c16d997aa44266af8f8c8222ea968",class:"datepicker-root"},t("div",{key:"05b63935bc5ebf500bb52d10688385f994b47fb4",class:`datepicker-container ${this.numberOfCalendars===1?"datepicker-container-single":""}`},t("div",{key:"d7af15b9ce051026cf841b3be361b32d8db41fc1",class:`datepicker-wrapper ${this.numberOfCalendars===1?"single":""}`},this.shortcutsPlacement==="left"&&this.renderShortcuts(),Array.from({length:this.numberOfCalendars},((t,e)=>this.renderCalendar(e,e))),this.shortcutsPlacement==="right"&&this.renderShortcuts()),(this.hasShortcuts&&this.shortcutsPlacement==="bottom"||this.hasActions)&&t("div",{key:"1765334bf15564bc9886b210c54bddba64c7042e",class:"datepicker-controls"},this.shortcutsPlacement==="bottom"&&this.renderShortcuts(),this.hasActions&&this.renderActions()))),t("slot",{key:"0ac3446394b8c23b859e5f0065370b95b6fd05d2"}))}get el(){return s(this)}static get watchers(){return{numberOfCalendars:["validateNumberOfCalendars"],rangeValue:["onRangeValueChange"],disabledDates:["handleDisabledDatesChange"],singleValue:["onSingleValueChange"],value:["onValueChange"]}}};N.style=z;export{N as nv_calendar};
|
|
2
|
+
//# sourceMappingURL=p-abc251aa.entry.js.map
|