@nova-design-system/nova-webcomponents 3.6.0 → 3.8.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.cjs.js +5 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-accordion.cjs.entry.js +16 -43
- package/dist/cjs/nv-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +96 -75
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +26 -5
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +32 -4
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +3 -3
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +14 -6
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldslider.cjs.entry.js +15 -4
- package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtime.cjs.entry.js +10 -10
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js +17 -10
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js.map +1 -1
- package/dist/collection/components/nv-accordion/nv-accordion.js +23 -55
- package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -1
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +5 -5
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.css +5 -0
- package/dist/collection/components/nv-calendar/nv-calendar.js +113 -74
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js +3 -0
- package/dist/collection/components/nv-calendar/partials/calendar-grid.js.map +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +6 -4
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js.map +1 -1
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +51 -5
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +61 -4
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +3 -3
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +7 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +8 -8
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +14 -6
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +18 -7
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +11 -13
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js +5 -1
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/components/index.js +5 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +22 -52
- package/dist/components/nv-accordion.js.map +1 -1
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +2 -2
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-datagrid.js +2 -2
- package/dist/components/nv-dialog.js +4 -4
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +34 -12
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +40 -11
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +8 -8
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +21 -13
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +6 -6
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +8 -8
- package/dist/components/nv-fieldslider.js +19 -8
- package/dist/components/nv-fieldslider.js.map +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtime.js +14 -14
- package/dist/components/nv-fieldtime.js.map +1 -1
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +4 -4
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-9ed7a440.js → p-0143cee0.js} +5 -5
- package/dist/components/p-0143cee0.js.map +1 -0
- package/dist/components/{p-8a5b0f74.js → p-5d5668f0.js} +2 -2
- package/dist/components/{p-8a5b0f74.js.map → p-5d5668f0.js.map} +1 -1
- package/dist/components/{p-316ae8e3.js → p-6e2f91ae.js} +4 -4
- package/dist/components/{p-316ae8e3.js.map → p-6e2f91ae.js.map} +1 -1
- package/dist/components/{p-5e89eb9d.js → p-7bc65e46.js} +7 -7
- package/dist/components/{p-5e89eb9d.js.map → p-7bc65e46.js.map} +1 -1
- package/dist/components/{p-618ae85a.js → p-8067d283.js} +2 -2
- package/dist/components/{p-618ae85a.js.map → p-8067d283.js.map} +1 -1
- package/dist/components/{p-d2b4441a.js → p-865725bf.js} +3 -3
- package/dist/components/{p-d2b4441a.js.map → p-865725bf.js.map} +1 -1
- package/dist/components/{p-9cff2fd1.js → p-91a558eb.js} +2 -2
- package/dist/components/{p-9cff2fd1.js.map → p-91a558eb.js.map} +1 -1
- package/dist/components/p-9232d306.js +88 -0
- package/dist/components/p-9232d306.js.map +1 -0
- package/dist/components/{p-f266b533.js → p-9a209ac7.js} +5 -5
- package/dist/components/{p-f266b533.js.map → p-9a209ac7.js.map} +1 -1
- package/dist/components/{p-ac76a11c.js → p-abb8f5ae.js} +4 -4
- package/dist/components/{p-ac76a11c.js.map → p-abb8f5ae.js.map} +1 -1
- package/dist/components/{p-436a0f99.js → p-ba87d9d5.js} +3 -3
- package/dist/components/{p-436a0f99.js.map → p-ba87d9d5.js.map} +1 -1
- package/dist/components/{p-840858ed.js → p-d32b75ac.js} +99 -77
- package/dist/components/p-d32b75ac.js.map +1 -0
- package/dist/components/{p-4864a690.js → p-dfd2d4f0.js} +2 -2
- package/dist/components/{p-4864a690.js.map → p-dfd2d4f0.js.map} +1 -1
- package/dist/components/{p-190c8f60.js → p-e104c58a.js} +4 -4
- package/dist/components/p-e104c58a.js.map +1 -0
- package/dist/components/{p-4069966e.js → p-f0371d98.js} +2 -2
- package/dist/components/{p-4069966e.js.map → p-f0371d98.js.map} +1 -1
- package/dist/components/{p-230ad6c5.js → p-f927f771.js} +7 -7
- package/dist/components/p-f927f771.js.map +1 -0
- package/dist/components/{p-79b38dfb.js → p-fa1988d9.js} +3 -3
- package/dist/components/{p-79b38dfb.js.map → p-fa1988d9.js.map} +1 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-accordion-item.entry.js +2 -2
- package/dist/esm/nv-accordion-item.entry.js.map +1 -1
- package/dist/esm/nv-accordion.entry.js +16 -43
- package/dist/esm/nv-accordion.entry.js.map +1 -1
- package/dist/esm/nv-badge_2.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-calendar.entry.js +96 -75
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddate.entry.js +26 -5
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +32 -4
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +3 -3
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +14 -6
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldpassword.entry.js +3 -3
- package/dist/esm/nv-fieldradio.entry.js +3 -3
- package/dist/esm/nv-fieldselect.entry.js +5 -5
- package/dist/esm/nv-fieldslider.entry.js +15 -4
- package/dist/esm/nv-fieldslider.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +3 -3
- package/dist/esm/nv-fieldtextarea.entry.js +3 -3
- package/dist/esm/nv-fieldtime.entry.js +10 -10
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/p-051db87c.entry.js +2 -0
- package/dist/native/p-051db87c.entry.js.map +1 -0
- package/dist/native/{p-c9cde996.entry.js → p-0e005d95.entry.js} +2 -2
- package/dist/native/{p-33e5037d.entry.js → p-10ce53ea.entry.js} +2 -2
- package/dist/native/{p-cf468c67.entry.js → p-12039da4.entry.js} +2 -2
- package/dist/native/{p-b829383a.entry.js → p-16ef7dd4.entry.js} +2 -2
- package/dist/native/{p-0ada0382.entry.js → p-2a6783ca.entry.js} +2 -2
- package/dist/native/p-2a6783ca.entry.js.map +1 -0
- package/dist/native/{p-ddb0b9f6.entry.js → p-34bf336f.entry.js} +2 -2
- package/dist/native/{p-625be06b.entry.js → p-3f139780.entry.js} +2 -2
- package/dist/native/p-3ff7a912.entry.js +2 -0
- package/dist/native/p-3ff7a912.entry.js.map +1 -0
- package/dist/native/{p-8030c16b.entry.js → p-4b15cff3.entry.js} +2 -2
- package/dist/native/{p-0ac03708.entry.js → p-516da423.entry.js} +2 -2
- package/dist/native/p-516da423.entry.js.map +1 -0
- package/dist/native/{p-f9aa4900.entry.js → p-64cb38e6.entry.js} +2 -2
- package/dist/native/{p-bab6d0a5.entry.js → p-67c34b8c.entry.js} +2 -2
- package/dist/native/{p-31e72603.entry.js → p-68edb2e8.entry.js} +2 -2
- package/dist/native/p-73c08f3b.entry.js +2 -0
- package/dist/native/p-73c08f3b.entry.js.map +1 -0
- package/dist/native/p-7703c736.entry.js +2 -0
- package/dist/native/p-7703c736.entry.js.map +1 -0
- package/dist/native/{p-1cce9b24.entry.js → p-916acbd3.entry.js} +2 -2
- package/dist/native/p-a50f3850.entry.js +2 -0
- package/dist/native/{p-2d23fcea.entry.js → p-a73fa60a.entry.js} +2 -2
- package/dist/native/{p-5eca22c7.entry.js → p-b3f9db23.entry.js} +2 -2
- package/dist/native/{p-5eca22c7.entry.js.map → p-b3f9db23.entry.js.map} +1 -1
- package/dist/native/{p-e802fbb8.entry.js → p-bee62b2b.entry.js} +2 -2
- package/dist/native/p-c65a79a9.entry.js +2 -0
- package/dist/native/p-c65a79a9.entry.js.map +1 -0
- package/dist/native/p-dc34da69.entry.js +2 -0
- package/dist/native/p-dc34da69.entry.js.map +1 -0
- package/dist/native/{p-2576c1a0.entry.js → p-f00a4552.entry.js} +2 -2
- package/dist/native/{p-609b3822.entry.js → p-f540db71.entry.js} +2 -2
- package/dist/native/{p-fca3e27d.entry.js → p-f687e05c.entry.js} +2 -2
- package/dist/native/p-f687e05c.entry.js.map +1 -0
- package/dist/native/{p-18831490.entry.js → p-fa81b77f.entry.js} +2 -2
- package/dist/native/p-fa81b77f.entry.js.map +1 -0
- package/dist/native/{p-e19a8885.entry.js → p-fcd52432.entry.js} +2 -2
- package/dist/types/components/nv-accordion/nv-accordion.d.ts +16 -49
- package/dist/types/components/nv-accordion-item/nv-accordion-item.d.ts +2 -2
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +7 -1
- package/dist/types/components/nv-calendar/partials/calendar-grid.d.ts +2 -0
- package/dist/types/components/nv-fieldcheckbox/nv-fieldcheckbox.d.ts +2 -0
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +5 -0
- package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +5 -0
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +6 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +4 -0
- package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +5 -4
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components.d.ts +60 -14
- package/dist/vscode-data.json +18 -10
- package/hydrate/index.js +274 -202
- package/hydrate/index.mjs +274 -202
- package/package.json +1 -1
- package/readme.md +6 -0
- package/dist/components/p-190c8f60.js.map +0 -1
- package/dist/components/p-230ad6c5.js.map +0 -1
- package/dist/components/p-840858ed.js.map +0 -1
- package/dist/components/p-9ed7a440.js.map +0 -1
- package/dist/components/p-f1bbb9e8.js +0 -88
- package/dist/components/p-f1bbb9e8.js.map +0 -1
- package/dist/native/p-0ac03708.entry.js.map +0 -1
- package/dist/native/p-0ada0382.entry.js.map +0 -1
- package/dist/native/p-12963ae4.entry.js +0 -2
- package/dist/native/p-12963ae4.entry.js.map +0 -1
- package/dist/native/p-18831490.entry.js.map +0 -1
- package/dist/native/p-4cf00884.entry.js +0 -2
- package/dist/native/p-4cf00884.entry.js.map +0 -1
- package/dist/native/p-5172f17a.entry.js +0 -2
- package/dist/native/p-a6dc9b59.entry.js +0 -2
- package/dist/native/p-a6dc9b59.entry.js.map +0 -1
- package/dist/native/p-be67545e.entry.js +0 -2
- package/dist/native/p-be67545e.entry.js.map +0 -1
- package/dist/native/p-c2826f22.entry.js +0 -2
- package/dist/native/p-c2826f22.entry.js.map +0 -1
- package/dist/native/p-fca3e27d.entry.js.map +0 -1
- package/dist/native/p-fe4e516b.entry.js +0 -2
- package/dist/native/p-fe4e516b.entry.js.map +0 -1
- /package/dist/native/{p-c9cde996.entry.js.map → p-0e005d95.entry.js.map} +0 -0
- /package/dist/native/{p-33e5037d.entry.js.map → p-10ce53ea.entry.js.map} +0 -0
- /package/dist/native/{p-cf468c67.entry.js.map → p-12039da4.entry.js.map} +0 -0
- /package/dist/native/{p-b829383a.entry.js.map → p-16ef7dd4.entry.js.map} +0 -0
- /package/dist/native/{p-ddb0b9f6.entry.js.map → p-34bf336f.entry.js.map} +0 -0
- /package/dist/native/{p-625be06b.entry.js.map → p-3f139780.entry.js.map} +0 -0
- /package/dist/native/{p-8030c16b.entry.js.map → p-4b15cff3.entry.js.map} +0 -0
- /package/dist/native/{p-f9aa4900.entry.js.map → p-64cb38e6.entry.js.map} +0 -0
- /package/dist/native/{p-bab6d0a5.entry.js.map → p-67c34b8c.entry.js.map} +0 -0
- /package/dist/native/{p-31e72603.entry.js.map → p-68edb2e8.entry.js.map} +0 -0
- /package/dist/native/{p-1cce9b24.entry.js.map → p-916acbd3.entry.js.map} +0 -0
- /package/dist/native/{p-5172f17a.entry.js.map → p-a50f3850.entry.js.map} +0 -0
- /package/dist/native/{p-2d23fcea.entry.js.map → p-a73fa60a.entry.js.map} +0 -0
- /package/dist/native/{p-e802fbb8.entry.js.map → p-bee62b2b.entry.js.map} +0 -0
- /package/dist/native/{p-2576c1a0.entry.js.map → p-f00a4552.entry.js.map} +0 -0
- /package/dist/native/{p-609b3822.entry.js.map → p-f540db71.entry.js.map} +0 -0
- /package/dist/native/{p-e19a8885.entry.js.map → p-fcd52432.entry.js.map} +0 -0
|
@@ -66,7 +66,7 @@ export class NvFieldslider {
|
|
|
66
66
|
* the value should be a an array of one number. When in range mode, the value
|
|
67
67
|
* should be an array of two numbers.
|
|
68
68
|
*/
|
|
69
|
-
this.value = [0
|
|
69
|
+
this.value = [0];
|
|
70
70
|
/**
|
|
71
71
|
* Defines the interval between selectable values on the slider. Controls how
|
|
72
72
|
* much the value increases or decreases with each keyboard interaction, drag
|
|
@@ -446,6 +446,17 @@ export class NvFieldslider {
|
|
|
446
446
|
this.rawPosition = this.valueInternal;
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
+
componentWillLoad() {
|
|
450
|
+
// Initialize value array based on range mode when props are available
|
|
451
|
+
if (this.value.length === 1 && this.range) {
|
|
452
|
+
// If range mode but only one value provided, duplicate it
|
|
453
|
+
this.value = [this.value[0], this.value[0]];
|
|
454
|
+
}
|
|
455
|
+
else if (this.value.length === 2 && !this.range) {
|
|
456
|
+
// If single mode but two values provided, take the first
|
|
457
|
+
this.value = [this.value[0]];
|
|
458
|
+
}
|
|
459
|
+
}
|
|
449
460
|
disconnectedCallback() {
|
|
450
461
|
this.removeGlobalEvents();
|
|
451
462
|
}
|
|
@@ -453,11 +464,11 @@ export class NvFieldslider {
|
|
|
453
464
|
/****************************************************************************/
|
|
454
465
|
//#region RENDER
|
|
455
466
|
render() {
|
|
456
|
-
return (h(Host, { key: '
|
|
467
|
+
return (h(Host, { key: 'd255ebffd908e0b64a9d80316de351c5a35fc230' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'e618f586707865f67d4008855299d4983b2bbb9d', htmlFor: this.startInputId }, h("slot", { key: 'fb9131f051ad669a797b5784f1cceee2169f8b8f', name: "label" }, this.label))), h("div", { key: '37147af53e7e0a0145f543c2a1070378e41e6605', class: "slider-container" }, this.range ? (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 0, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : null, h("div", { key: '64a7232e46499efb355deea683113042bc745ae0', class: "track-container" }, h("div", { key: 'b9f5f5dc7f5e98aaa44b6e361786804af1a9798c', class: "track", onPointerDown: this.onTrackInteraction }, this.range ? (h(RangeThumb, { rangeValue: this.rangeValueInternal, rawRangePosition: this.rawRangePosition, activeDragThumb: this.activeDragThumb, isDragging: this.isDragging, snap: this.snap, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue })) : (h(SingleThumb, { value: this.valueInternal, min: this.min, max: this.max, step: this.step, rawPosition: this.rawPosition, isDragging: this.isDragging, snap: this.snap, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue }))), h(TickMarks, { key: '40e2bc4b91cf40a1d0c7e1f126b092f9d149912b', ticks: this.internalTicks, min: this.min, max: this.max })), this.range ? (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 1, inputId: this.endInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name }))), (this.success ||
|
|
457
468
|
this.description ||
|
|
458
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
469
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '830b5921d75ee627002ef19ddc7946948d1bb6a7', class: "description" }, this.success && (h("nv-icon", { key: '451d013f7a3ffa19cb12df406187ec4001bbad2a', name: "circle-check", class: "validation", size: "md" })), h("slot", { key: '59f84a04d635db6ceb465a642d8584167bd0cd9d', name: "description" }, this.description))), (this.error ||
|
|
459
470
|
this.errorDescription ||
|
|
460
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
471
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '10a5a273b0feeb9c0248b8aadcb801d7e832dcab', class: "error-description", hidden: !this.error }, this.error && (h("nv-icon", { key: '7540ff563068f83701d82a8a948473b20351021f', name: "alert-circle", class: "validation", size: "md" })), h("slot", { key: 'b76bfbbd817b15faf4f963f9c93c7d04cbbdade4', name: "error-description" }, this.errorDescription)))));
|
|
461
472
|
}
|
|
462
473
|
static get is() { return "nv-fieldslider"; }
|
|
463
474
|
static get formAssociated() { return true; }
|
|
@@ -732,7 +743,7 @@ export class NvFieldslider {
|
|
|
732
743
|
},
|
|
733
744
|
"getter": false,
|
|
734
745
|
"setter": false,
|
|
735
|
-
"defaultValue": "[0
|
|
746
|
+
"defaultValue": "[0]"
|
|
736
747
|
},
|
|
737
748
|
"step": {
|
|
738
749
|
"type": "number",
|
|
@@ -941,7 +952,7 @@ export class NvFieldslider {
|
|
|
941
952
|
"optional": false,
|
|
942
953
|
"docs": {
|
|
943
954
|
"tags": [],
|
|
944
|
-
"text": "Use this to automatically show a label, like \
|
|
955
|
+
"text": "Use this to automatically show a label, like \"~\" for approximate values,\nbefore the slider's value in the tooltip or input, giving users quick\ncontext about the number."
|
|
945
956
|
},
|
|
946
957
|
"getter": false,
|
|
947
958
|
"setter": false,
|
|
@@ -960,7 +971,7 @@ export class NvFieldslider {
|
|
|
960
971
|
"optional": false,
|
|
961
972
|
"docs": {
|
|
962
973
|
"tags": [],
|
|
963
|
-
"text": "Use this to automatically show a label, like \
|
|
974
|
+
"text": "Use this to automatically show a label, like \"$\" or \"kg,\" after the value\non the slider's tooltip or input, helping users better understand the\nnumber."
|
|
964
975
|
},
|
|
965
976
|
"getter": false,
|
|
966
977
|
"setter": false,
|
|
@@ -1 +1 @@
|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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n State,\n Watch,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport {\n clamp,\n valueToPercent,\n snapToStep,\n generateTicks,\n snapToTicks,\n} from './nv-fieldslider.utils';\n\nimport { SingleThumb } from './partials/single-thumb';\nimport { RangeThumb } from './partials/range-thumb';\nimport { TickMarks } from './partials/tick-marks';\nimport { FieldInput } from './partials/field-input';\n\n/**\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-fieldslider',\n styleUrl: 'styles/nv-fieldslider.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldslider {\n @Element() el: HTMLNvFieldsliderElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Provides a textual description of the slider's function, helping users\n * understand what the control adjusts. It also supports accessibility by\n * serving as the accessible name for the component.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Keeps the interface clean by removing visible labels, but still announces\n * the label to screen readers so users relying on assistive tech aren't left\n * guessing.\n */\n @Prop({ reflect: true })\n readonly hideLabel: boolean = false;\n\n /**\n * Add helpful hints or extra information under the slider. This is where you\n * can clarify what users should enter or provide additional instructions,\n * making the form easier to fill out correctly.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Enables an optional numeric input field alongside the slider, allowing\n * users to type a value directly instead of—or in addition to—using the\n * slider handle.\n */\n @Prop({ reflect: true })\n readonly hasField: boolean = false;\n\n /**\n * Allows the slider to display two thumbs, enabling users to select a\n * continuous range between a minimum and maximum value. Ideal for use cases\n * like filtering by price or time.\n */\n @Prop({ reflect: true })\n readonly range: boolean = false;\n\n /**\n * Disables user interaction with the slider and its associated input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Makes the slider and input non-editable while keeping them focusable and\n * included in form submissions.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Alters the slider'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 slider.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the slider's appearance to indicate successful input or validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Numeric value of the slider as an array of numbers. When in single mode,\n * the value should be a an array of one number. When in range mode, the value\n * should be an array of two numbers.\n */\n @Prop({ reflect: true, mutable: true })\n value: number[] = [0, 0];\n\n /**\n * Defines the interval between selectable values on the slider. Controls how\n * much the value increases or decreases with each keyboard interaction, drag\n * movement, or direct input.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * Controls whether the slider handle should visually snap to step values\n * during dragging. When false, the handle can be positioned at any point\n * along the track while dragging, but the actual value will still snap to the\n * nearest step value. When true, the handle will visually snap to the nearest\n * step value during dragging.\n */\n @Prop({ reflect: true })\n readonly snap: boolean = false;\n\n /**\n * When true and custom ticks are provided, the slider will snap to the nearest\n * tick value during dragging, instead of using the step value. This is useful\n * when you have custom ticks at specific values that don't align with regular step intervals.\n */\n @Prop({ reflect: true })\n readonly snapTicks: boolean = false;\n\n /**\n * Name attribute for the form input element. Required for form submission.\n * For range sliders, this will be used for the start value input and add -end\n * to the end input name.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Name attribute for the end value input when using range mode.\n * If not provided, the name attribute will be used with '-end' appended.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Defines the minimum allowed value for the slider. The thumb cannot move\n * below this value, and manual input is also constrained accordingly.\n */\n @Prop({ reflect: true })\n readonly min: number = 0;\n\n /**\n * Defines the maximum allowed value for the slider. The thumb cannot move\n * above this value, and manual input is also constrained accordingly.\n */\n @Prop({ reflect: true })\n readonly max: number = 100;\n\n /**\n * Controls the visibility of tick marks on the slider. When enabled, all\n * visual ticks that indicate step points along the track are shown. If custom\n * ticks are provided, they are always shown regardless of this setting.\n */\n @Prop({ reflect: true })\n readonly showTicks: boolean = false;\n\n /**\n * Allows you to specify custom tick marks at specific values along the\n * slider. Each tick can optionally display a label to provide additional\n * context or guidance for users.\n */\n @Prop({ reflect: false })\n readonly ticks: {\n /** The numeric value of the tick */\n value: number;\n /** The label of the tick */\n label?: string;\n }[];\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 /**\n * Use this to automatically show a label, like “~” for approximate values,\n * before the slider’s value in the tooltip or input, giving users quick\n * context about the number.\n */\n @Prop({ reflect: true })\n readonly labelBeforeValue: string;\n\n /**\n * Use this to automatically show a label, like “$” or “kg,” after the value\n * on the slider’s tooltip or input, helping users better understand the\n * number.\n */\n @Prop({ reflect: true })\n readonly labelAfterValue: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n @State()\n isDragging = false;\n\n @State()\n activeDragThumb: 'left' | 'right' | 'single' = 'single';\n\n @State()\n internalTicks: typeof this.ticks = [];\n\n // These track the raw slider positions for visual display\n @State()\n rawPosition = 0;\n\n @State()\n rawRangePosition: [number, number] = [0, 0];\n\n @State()\n valueInternal: number = 0;\n\n @State()\n rangeValueInternal: [number, number] = [0, 0];\n\n //#endregion STATE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Ensures value is valid and within bounds.\n * @param {number} val - The value to validate\n * @returns {number} The validated and snapped value\n */\n private validateValue(val: number): number {\n // First ensure the value is within bounds\n const clampedValue = clamp(val, this.min, this.max);\n\n // If snapTicks is true and we have custom ticks, snap to the nearest tick\n if (this.snapTicks && this.internalTicks && this.internalTicks.length > 0) {\n return snapToTicks(clampedValue, this.internalTicks);\n }\n\n // Otherwise snap to step values\n return snapToStep(clampedValue, this.min, this.max, this.step);\n }\n\n /**\n * Parses the value string into a number or array of numbers for internal use.\n */\n private parseValue = (): void => {\n if (typeof this.value === 'string') {\n console.error(\n 'Sliders require a number or array of numbers to be passed in the value prop.',\n );\n return;\n }\n if (this.range && this.value.length !== 2) {\n console.error(\n 'Range sliders require an array of two values to be passed in the value prop.',\n );\n return;\n }\n\n if (!this.range && this.value.length !== 1) {\n console.error(\n 'Single sliders require a single value as an array to be passed in the value prop.',\n );\n return;\n }\n this.valueInternal = this.value[0];\n this.rangeValueInternal = [this.value[0], this.value[1]];\n };\n\n /**\n * Handles value changes from slider interaction.\n * @param {number | number[]} newValue - The new value or range values\n */\n private handleValueChange(newValue: number | number[]): void {\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (this.range) {\n // Handle range values\n if (Array.isArray(newValue) && newValue.length === 2) {\n // Ensure values are in order (left ≤ right)\n const orderedValues = [\n Math.min(newValue[0], newValue[1]),\n Math.max(newValue[0], newValue[1]),\n ];\n\n // Snap to steps and clamp\n const validatedValues: [number, number] = [\n this.validateValue(orderedValues[0]),\n this.validateValue(orderedValues[1]),\n ];\n\n if (\n validatedValues[0] !== this.rangeValueInternal[0] ||\n validatedValues[1] !== this.rangeValueInternal[1]\n ) {\n this.rangeValueInternal = validatedValues;\n this.value = this.rangeValueInternal;\n this.valueChanged.emit(this.rangeValueInternal);\n }\n }\n } else {\n // Handle single value\n if (typeof newValue === 'number') {\n const validatedValue = this.validateValue(newValue);\n\n if (validatedValue !== this.valueInternal) {\n this.valueInternal = validatedValue;\n this.value = [this.valueInternal];\n this.valueChanged.emit([this.valueInternal]);\n }\n }\n }\n }\n\n /**\n * Generates the ticks to display based on props and state.\n */\n private generateDisplayTicks(): void {\n // If custom ticks are provided, always use them regardless of showTicks setting\n if (this.ticks && this.ticks.length > 0) {\n this.internalTicks = [...this.ticks].sort((a, b) => a.value - b.value);\n return;\n }\n\n // If showTicks is false and there are no custom ticks, hide all ticks\n if (!this.showTicks) {\n this.internalTicks = [];\n return;\n }\n\n // Generate all ticks at each step point\n const autoTicks = generateTicks(this.min, this.max, this.step);\n this.internalTicks = autoTicks.map(value => ({ value }));\n }\n\n /**\n * Handles pointer events on the track.\n * @param {PointerEvent} event - The pointer event\n */\n private onTrackInteraction = (event: PointerEvent): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const trackRect = (\n event.currentTarget as HTMLElement\n ).getBoundingClientRect();\n const percentage = clamp(\n ((event.clientX - trackRect.left) / trackRect.width) * 100,\n 0,\n 100,\n );\n\n const newValue = this.min + (percentage / 100) * (this.max - this.min);\n\n // Store raw position for visual display\n this.rawPosition = newValue;\n\n if (this.range) {\n // In range mode, determine which thumb to move based on proximity\n const leftPct = valueToPercent(\n this.rangeValueInternal[0],\n this.min,\n this.max,\n );\n const rightPct = valueToPercent(\n this.rangeValueInternal[1],\n this.min,\n this.max,\n );\n\n const distanceToLeft = Math.abs(percentage - leftPct);\n const distanceToRight = Math.abs(percentage - rightPct);\n\n if (distanceToLeft <= distanceToRight) {\n this.activeDragThumb = 'left';\n this.rawRangePosition = [newValue, this.rawRangePosition[1]];\n this.handleValueChange([newValue, this.rangeValueInternal[1]]);\n } else {\n this.activeDragThumb = 'right';\n this.rawRangePosition = [this.rawRangePosition[0], newValue];\n this.handleValueChange([this.rangeValueInternal[0], newValue]);\n }\n } else {\n this.activeDragThumb = 'single';\n this.rawPosition = newValue;\n this.handleValueChange(newValue);\n }\n\n this.isDragging = true;\n this.registerGlobalEvents();\n };\n\n /**\n * Handles pointer move events during drag.\n * @param {PointerEvent} event - The pointer event\n */\n private onPointerMove = (event: PointerEvent): void => {\n if (!this.isDragging || this.disabled || this.readonly) {\n return;\n }\n\n const trackElement = this.el.querySelector('.track') as HTMLElement;\n if (!trackElement) return;\n\n const trackRect = trackElement.getBoundingClientRect();\n const percentage = clamp(\n ((event.clientX - trackRect.left) / trackRect.width) * 100,\n 0,\n 100,\n );\n\n const newValue = this.min + (percentage / 100) * (this.max - this.min);\n\n // Update visual position\n if (this.range) {\n if (this.activeDragThumb === 'left') {\n this.rawRangePosition = [newValue, this.rawRangePosition[1]];\n this.handleValueChange([newValue, this.rangeValueInternal[1]]);\n } else {\n this.rawRangePosition = [this.rawRangePosition[0], newValue];\n this.handleValueChange([this.rangeValueInternal[0], newValue]);\n }\n } else {\n this.rawPosition = newValue;\n this.handleValueChange(newValue);\n }\n };\n\n /**\n * Handles the end of a drag operation.\n */\n private onPointerUp = (): void => {\n this.isDragging = false;\n this.removeGlobalEvents();\n };\n\n /**\n * Registers global events for tracking pointer movement.\n */\n private registerGlobalEvents(): void {\n document.addEventListener('pointermove', this.onPointerMove);\n document.addEventListener('pointerup', this.onPointerUp);\n document.addEventListener('pointercancel', this.onPointerUp);\n }\n\n /**\n * Removes global events when tracking ends.\n */\n private removeGlobalEvents(): void {\n document.removeEventListener('pointermove', this.onPointerMove);\n document.removeEventListener('pointerup', this.onPointerUp);\n document.removeEventListener('pointercancel', this.onPointerUp);\n }\n\n /**\n * Handles keydown events for keyboard accessibility.\n * @param {KeyboardEvent} event - The keyboard event\n */\n private onKeyDown = (event: KeyboardEvent): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n let newValue: number | number[];\n const stepMultiplier = event.shiftKey ? 10 : 1;\n const singleStep = this.step * stepMultiplier;\n\n if (this.range) {\n const focusedThumb = (event.target as HTMLElement).getAttribute(\n 'data-thumb',\n );\n const idx = focusedThumb === 'left' ? 0 : 1;\n const currentValue = [...this.rangeValueInternal];\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n currentValue[idx] += singleStep;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n currentValue[idx] -= singleStep;\n break;\n case 'Home':\n currentValue[idx] = this.min;\n break;\n case 'End':\n currentValue[idx] = this.max;\n break;\n case 'PageUp':\n currentValue[idx] += singleStep * 10;\n break;\n case 'PageDown':\n currentValue[idx] -= singleStep * 10;\n break;\n default:\n return;\n }\n\n newValue = currentValue;\n } else {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n newValue = this.valueInternal + singleStep;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n newValue = this.valueInternal - singleStep;\n break;\n case 'Home':\n newValue = this.min;\n break;\n case 'End':\n newValue = this.max;\n break;\n case 'PageUp':\n newValue = this.valueInternal + singleStep * 10;\n break;\n case 'PageDown':\n newValue = this.valueInternal - singleStep * 10;\n break;\n default:\n return;\n }\n }\n\n event.preventDefault();\n this.handleValueChange(newValue);\n };\n\n /**\n * Handles field input value changes.\n * @param {Event} event - The input event\n */\n private handleFieldChange = (event: Event): void => {\n const input = event.target as HTMLInputElement;\n const newValue = parseFloat(input.value);\n\n if (isNaN(newValue)) {\n return;\n }\n\n if (this.range) {\n const fieldIndex = input.getAttribute('data-index') === '0' ? 0 : 1;\n const updatedRange = [...this.rangeValueInternal];\n updatedRange[fieldIndex] = newValue;\n this.handleValueChange(updatedRange);\n } else {\n this.handleValueChange(newValue);\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n onValueChange() {\n this.parseValue();\n }\n\n @Watch('min')\n @Watch('max')\n @Watch('step')\n @Watch('ticks')\n @Watch('showTicks')\n @Watch('snap')\n @Watch('snapTicks')\n onConfigChange() {\n this.generateDisplayTicks();\n\n if (this.range) {\n this.handleValueChange(this.rangeValueInternal);\n } else {\n this.handleValueChange(this.valueInternal);\n }\n }\n\n @Watch('range')\n onRangeChange(newValue: boolean) {\n if (newValue) {\n // Switching to range mode\n this.rangeValueInternal = [this.min, this.valueInternal];\n } else {\n // Switching to single mode, take the higher value\n this.valueInternal = this.rangeValueInternal[1];\n }\n }\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n connectedCallback() {\n this.parseValue();\n this.generateDisplayTicks();\n\n // Initialize values and make sure they're valid\n if (this.range) {\n if (\n !Array.isArray(this.rangeValueInternal) ||\n this.rangeValueInternal.length !== 2\n ) {\n this.rangeValueInternal = [this.min, this.max];\n }\n this.handleValueChange(this.rangeValueInternal);\n // Initialize raw range position to match actual values\n this.rawRangePosition = [\n this.rangeValueInternal[0],\n this.rangeValueInternal[1],\n ];\n } else {\n this.handleValueChange(this.valueInternal);\n // Initialize raw position to match actual value\n this.rawPosition = this.valueInternal;\n }\n }\n\n disconnectedCallback() {\n this.removeGlobalEvents();\n }\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the slider values change.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<number[]>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"slider-container\">\n {/* First input (always render for the start value, but may be hidden) */}\n {this.range ? (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n index={0}\n inputId={this.startInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n endName={this.endName}\n />\n ) : null}\n\n <div class=\"track-container\">\n <div class=\"track\" onPointerDown={this.onTrackInteraction}>\n {this.range ? (\n <RangeThumb\n rangeValue={this.rangeValueInternal}\n rawRangePosition={this.rawRangePosition}\n activeDragThumb={this.activeDragThumb}\n isDragging={this.isDragging}\n snap={this.snap}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onKeyDown={this.onKeyDown}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n />\n ) : (\n <SingleThumb\n value={this.valueInternal}\n min={this.min}\n max={this.max}\n step={this.step}\n rawPosition={this.rawPosition}\n isDragging={this.isDragging}\n snap={this.snap}\n disabled={this.disabled}\n readonly={this.readonly}\n onKeyDown={this.onKeyDown}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n />\n )}\n </div>\n\n <TickMarks\n ticks={this.internalTicks}\n min={this.min}\n max={this.max}\n />\n </div>\n\n {/* Second input (for range mode, or for single value if not already rendered) */}\n {this.range ? (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n index={1}\n inputId={this.endInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n endName={this.endName}\n />\n ) : (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n inputId={this.startInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n />\n )}\n </div>\n\n {(this.success ||\n this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.error ||\n this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div class=\"error-description\" hidden={!this.error}>\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n // #endregion RENDER\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nv-fieldslider.js","sourceRoot":"","sources":["../../../src/components/nv-fieldslider/nv-fieldslider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,KAAK,EACL,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EACL,KAAK,EACL,cAAc,EACd,UAAU,EACV,aAAa,EACb,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;;;GAIG;AAOH,MAAM,OAAO,aAAa;IAN1B;QASE,8EAA8E;QAC9E,oBAAoB;QAEpB;;;WAGG;QAEM,iBAAY,GAAW,MAAM,EAAE,CAAC;QAEzC;;;WAGG;QAEM,eAAU,GAAW,MAAM,EAAE,CAAC;QAUvC;;;;WAIG;QAEM,cAAS,GAAY,KAAK,CAAC;QAUpC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEM,UAAK,GAAY,KAAK,CAAC;QAEhC;;WAEG;QAEM,aAAQ,GAAY,KA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gB;gBACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,IAAI,CACxD,4DAAK,KAAK,EAAC,mBAAmB,EAAC,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK;gBAC/C,IAAI,CAAC,KAAK,IAAI,CACb,gEAAS,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAG,CAC7D;gBACD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n State,\n Watch,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport {\n clamp,\n valueToPercent,\n snapToStep,\n generateTicks,\n snapToTicks,\n} from './nv-fieldslider.utils';\n\nimport { SingleThumb } from './partials/single-thumb';\nimport { RangeThumb } from './partials/range-thumb';\nimport { TickMarks } from './partials/tick-marks';\nimport { FieldInput } from './partials/field-input';\n\n/**\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-fieldslider',\n styleUrl: 'styles/nv-fieldslider.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldslider {\n @Element() el: HTMLNvFieldsliderElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Provides a textual description of the slider's function, helping users\n * understand what the control adjusts. It also supports accessibility by\n * serving as the accessible name for the component.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Keeps the interface clean by removing visible labels, but still announces\n * the label to screen readers so users relying on assistive tech aren't left\n * guessing.\n */\n @Prop({ reflect: true })\n readonly hideLabel: boolean = false;\n\n /**\n * Add helpful hints or extra information under the slider. This is where you\n * can clarify what users should enter or provide additional instructions,\n * making the form easier to fill out correctly.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Enables an optional numeric input field alongside the slider, allowing\n * users to type a value directly instead of—or in addition to—using the\n * slider handle.\n */\n @Prop({ reflect: true })\n readonly hasField: boolean = false;\n\n /**\n * Allows the slider to display two thumbs, enabling users to select a\n * continuous range between a minimum and maximum value. Ideal for use cases\n * like filtering by price or time.\n */\n @Prop({ reflect: true })\n readonly range: boolean = false;\n\n /**\n * Disables user interaction with the slider and its associated input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Makes the slider and input non-editable while keeping them focusable and\n * included in form submissions.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Alters the slider'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 slider.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the slider's appearance to indicate successful input or validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Numeric value of the slider as an array of numbers. When in single mode,\n * the value should be a an array of one number. When in range mode, the value\n * should be an array of two numbers.\n */\n @Prop({ reflect: true, mutable: true })\n value: number[] = [0];\n\n /**\n * Defines the interval between selectable values on the slider. Controls how\n * much the value increases or decreases with each keyboard interaction, drag\n * movement, or direct input.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * Controls whether the slider handle should visually snap to step values\n * during dragging. When false, the handle can be positioned at any point\n * along the track while dragging, but the actual value will still snap to the\n * nearest step value. When true, the handle will visually snap to the nearest\n * step value during dragging.\n */\n @Prop({ reflect: true })\n readonly snap: boolean = false;\n\n /**\n * When true and custom ticks are provided, the slider will snap to the nearest\n * tick value during dragging, instead of using the step value. This is useful\n * when you have custom ticks at specific values that don't align with regular step intervals.\n */\n @Prop({ reflect: true })\n readonly snapTicks: boolean = false;\n\n /**\n * Name attribute for the form input element. Required for form submission.\n * For range sliders, this will be used for the start value input and add -end\n * to the end input name.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Name attribute for the end value input when using range mode.\n * If not provided, the name attribute will be used with '-end' appended.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Defines the minimum allowed value for the slider. The thumb cannot move\n * below this value, and manual input is also constrained accordingly.\n */\n @Prop({ reflect: true })\n readonly min: number = 0;\n\n /**\n * Defines the maximum allowed value for the slider. The thumb cannot move\n * above this value, and manual input is also constrained accordingly.\n */\n @Prop({ reflect: true })\n readonly max: number = 100;\n\n /**\n * Controls the visibility of tick marks on the slider. When enabled, all\n * visual ticks that indicate step points along the track are shown. If custom\n * ticks are provided, they are always shown regardless of this setting.\n */\n @Prop({ reflect: true })\n readonly showTicks: boolean = false;\n\n /**\n * Allows you to specify custom tick marks at specific values along the\n * slider. Each tick can optionally display a label to provide additional\n * context or guidance for users.\n */\n @Prop({ reflect: false })\n readonly ticks: {\n /** The numeric value of the tick */\n value: number;\n /** The label of the tick */\n label?: string;\n }[];\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 /**\n * Use this to automatically show a label, like \"~\" for approximate values,\n * before the slider's value in the tooltip or input, giving users quick\n * context about the number.\n */\n @Prop({ reflect: true })\n readonly labelBeforeValue: string;\n\n /**\n * Use this to automatically show a label, like \"$\" or \"kg,\" after the value\n * on the slider's tooltip or input, helping users better understand the\n * number.\n */\n @Prop({ reflect: true })\n readonly labelAfterValue: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n @State()\n isDragging = false;\n\n @State()\n activeDragThumb: 'left' | 'right' | 'single' = 'single';\n\n @State()\n internalTicks: typeof this.ticks = [];\n\n // These track the raw slider positions for visual display\n @State()\n rawPosition = 0;\n\n @State()\n rawRangePosition: [number, number] = [0, 0];\n\n @State()\n valueInternal: number = 0;\n\n @State()\n rangeValueInternal: [number, number] = [0, 0];\n\n //#endregion STATE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Ensures value is valid and within bounds.\n * @param {number} val - The value to validate\n * @returns {number} The validated and snapped value\n */\n private validateValue(val: number): number {\n // First ensure the value is within bounds\n const clampedValue = clamp(val, this.min, this.max);\n\n // If snapTicks is true and we have custom ticks, snap to the nearest tick\n if (this.snapTicks && this.internalTicks && this.internalTicks.length > 0) {\n return snapToTicks(clampedValue, this.internalTicks);\n }\n\n // Otherwise snap to step values\n return snapToStep(clampedValue, this.min, this.max, this.step);\n }\n\n /**\n * Parses the value string into a number or array of numbers for internal use.\n */\n private parseValue = (): void => {\n if (typeof this.value === 'string') {\n console.error(\n 'Sliders require a number or array of numbers to be passed in the value prop.',\n );\n return;\n }\n if (this.range && this.value.length !== 2) {\n console.error(\n 'Range sliders require an array of two values to be passed in the value prop.',\n );\n return;\n }\n\n if (!this.range && this.value.length !== 1) {\n console.error(\n 'Single sliders require a single value as an array to be passed in the value prop.',\n );\n return;\n }\n this.valueInternal = this.value[0];\n this.rangeValueInternal = [this.value[0], this.value[1]];\n };\n\n /**\n * Handles value changes from slider interaction.\n * @param {number | number[]} newValue - The new value or range values\n */\n private handleValueChange(newValue: number | number[]): void {\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (this.range) {\n // Handle range values\n if (Array.isArray(newValue) && newValue.length === 2) {\n // Ensure values are in order (left ≤ right)\n const orderedValues = [\n Math.min(newValue[0], newValue[1]),\n Math.max(newValue[0], newValue[1]),\n ];\n\n // Snap to steps and clamp\n const validatedValues: [number, number] = [\n this.validateValue(orderedValues[0]),\n this.validateValue(orderedValues[1]),\n ];\n\n if (\n validatedValues[0] !== this.rangeValueInternal[0] ||\n validatedValues[1] !== this.rangeValueInternal[1]\n ) {\n this.rangeValueInternal = validatedValues;\n this.value = this.rangeValueInternal;\n this.valueChanged.emit(this.rangeValueInternal);\n }\n }\n } else {\n // Handle single value\n if (typeof newValue === 'number') {\n const validatedValue = this.validateValue(newValue);\n\n if (validatedValue !== this.valueInternal) {\n this.valueInternal = validatedValue;\n this.value = [this.valueInternal];\n this.valueChanged.emit([this.valueInternal]);\n }\n }\n }\n }\n\n /**\n * Generates the ticks to display based on props and state.\n */\n private generateDisplayTicks(): void {\n // If custom ticks are provided, always use them regardless of showTicks setting\n if (this.ticks && this.ticks.length > 0) {\n this.internalTicks = [...this.ticks].sort((a, b) => a.value - b.value);\n return;\n }\n\n // If showTicks is false and there are no custom ticks, hide all ticks\n if (!this.showTicks) {\n this.internalTicks = [];\n return;\n }\n\n // Generate all ticks at each step point\n const autoTicks = generateTicks(this.min, this.max, this.step);\n this.internalTicks = autoTicks.map(value => ({ value }));\n }\n\n /**\n * Handles pointer events on the track.\n * @param {PointerEvent} event - The pointer event\n */\n private onTrackInteraction = (event: PointerEvent): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const trackRect = (\n event.currentTarget as HTMLElement\n ).getBoundingClientRect();\n const percentage = clamp(\n ((event.clientX - trackRect.left) / trackRect.width) * 100,\n 0,\n 100,\n );\n\n const newValue = this.min + (percentage / 100) * (this.max - this.min);\n\n // Store raw position for visual display\n this.rawPosition = newValue;\n\n if (this.range) {\n // In range mode, determine which thumb to move based on proximity\n const leftPct = valueToPercent(\n this.rangeValueInternal[0],\n this.min,\n this.max,\n );\n const rightPct = valueToPercent(\n this.rangeValueInternal[1],\n this.min,\n this.max,\n );\n\n const distanceToLeft = Math.abs(percentage - leftPct);\n const distanceToRight = Math.abs(percentage - rightPct);\n\n if (distanceToLeft <= distanceToRight) {\n this.activeDragThumb = 'left';\n this.rawRangePosition = [newValue, this.rawRangePosition[1]];\n this.handleValueChange([newValue, this.rangeValueInternal[1]]);\n } else {\n this.activeDragThumb = 'right';\n this.rawRangePosition = [this.rawRangePosition[0], newValue];\n this.handleValueChange([this.rangeValueInternal[0], newValue]);\n }\n } else {\n this.activeDragThumb = 'single';\n this.rawPosition = newValue;\n this.handleValueChange(newValue);\n }\n\n this.isDragging = true;\n this.registerGlobalEvents();\n };\n\n /**\n * Handles pointer move events during drag.\n * @param {PointerEvent} event - The pointer event\n */\n private onPointerMove = (event: PointerEvent): void => {\n if (!this.isDragging || this.disabled || this.readonly) {\n return;\n }\n\n const trackElement = this.el.querySelector('.track') as HTMLElement;\n if (!trackElement) return;\n\n const trackRect = trackElement.getBoundingClientRect();\n const percentage = clamp(\n ((event.clientX - trackRect.left) / trackRect.width) * 100,\n 0,\n 100,\n );\n\n const newValue = this.min + (percentage / 100) * (this.max - this.min);\n\n // Update visual position\n if (this.range) {\n if (this.activeDragThumb === 'left') {\n this.rawRangePosition = [newValue, this.rawRangePosition[1]];\n this.handleValueChange([newValue, this.rangeValueInternal[1]]);\n } else {\n this.rawRangePosition = [this.rawRangePosition[0], newValue];\n this.handleValueChange([this.rangeValueInternal[0], newValue]);\n }\n } else {\n this.rawPosition = newValue;\n this.handleValueChange(newValue);\n }\n };\n\n /**\n * Handles the end of a drag operation.\n */\n private onPointerUp = (): void => {\n this.isDragging = false;\n this.removeGlobalEvents();\n };\n\n /**\n * Registers global events for tracking pointer movement.\n */\n private registerGlobalEvents(): void {\n document.addEventListener('pointermove', this.onPointerMove);\n document.addEventListener('pointerup', this.onPointerUp);\n document.addEventListener('pointercancel', this.onPointerUp);\n }\n\n /**\n * Removes global events when tracking ends.\n */\n private removeGlobalEvents(): void {\n document.removeEventListener('pointermove', this.onPointerMove);\n document.removeEventListener('pointerup', this.onPointerUp);\n document.removeEventListener('pointercancel', this.onPointerUp);\n }\n\n /**\n * Handles keydown events for keyboard accessibility.\n * @param {KeyboardEvent} event - The keyboard event\n */\n private onKeyDown = (event: KeyboardEvent): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n let newValue: number | number[];\n const stepMultiplier = event.shiftKey ? 10 : 1;\n const singleStep = this.step * stepMultiplier;\n\n if (this.range) {\n const focusedThumb = (event.target as HTMLElement).getAttribute(\n 'data-thumb',\n );\n const idx = focusedThumb === 'left' ? 0 : 1;\n const currentValue = [...this.rangeValueInternal];\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n currentValue[idx] += singleStep;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n currentValue[idx] -= singleStep;\n break;\n case 'Home':\n currentValue[idx] = this.min;\n break;\n case 'End':\n currentValue[idx] = this.max;\n break;\n case 'PageUp':\n currentValue[idx] += singleStep * 10;\n break;\n case 'PageDown':\n currentValue[idx] -= singleStep * 10;\n break;\n default:\n return;\n }\n\n newValue = currentValue;\n } else {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n newValue = this.valueInternal + singleStep;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n newValue = this.valueInternal - singleStep;\n break;\n case 'Home':\n newValue = this.min;\n break;\n case 'End':\n newValue = this.max;\n break;\n case 'PageUp':\n newValue = this.valueInternal + singleStep * 10;\n break;\n case 'PageDown':\n newValue = this.valueInternal - singleStep * 10;\n break;\n default:\n return;\n }\n }\n\n event.preventDefault();\n this.handleValueChange(newValue);\n };\n\n /**\n * Handles field input value changes.\n * @param {Event} event - The input event\n */\n private handleFieldChange = (event: Event): void => {\n const input = event.target as HTMLInputElement;\n const newValue = parseFloat(input.value);\n\n if (isNaN(newValue)) {\n return;\n }\n\n if (this.range) {\n const fieldIndex = input.getAttribute('data-index') === '0' ? 0 : 1;\n const updatedRange = [...this.rangeValueInternal];\n updatedRange[fieldIndex] = newValue;\n this.handleValueChange(updatedRange);\n } else {\n this.handleValueChange(newValue);\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n onValueChange() {\n this.parseValue();\n }\n\n @Watch('min')\n @Watch('max')\n @Watch('step')\n @Watch('ticks')\n @Watch('showTicks')\n @Watch('snap')\n @Watch('snapTicks')\n onConfigChange() {\n this.generateDisplayTicks();\n\n if (this.range) {\n this.handleValueChange(this.rangeValueInternal);\n } else {\n this.handleValueChange(this.valueInternal);\n }\n }\n\n @Watch('range')\n onRangeChange(newValue: boolean) {\n if (newValue) {\n // Switching to range mode\n this.rangeValueInternal = [this.min, this.valueInternal];\n } else {\n // Switching to single mode, take the higher value\n this.valueInternal = this.rangeValueInternal[1];\n }\n }\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n connectedCallback() {\n this.parseValue();\n this.generateDisplayTicks();\n\n // Initialize values and make sure they're valid\n if (this.range) {\n if (\n !Array.isArray(this.rangeValueInternal) ||\n this.rangeValueInternal.length !== 2\n ) {\n this.rangeValueInternal = [this.min, this.max];\n }\n this.handleValueChange(this.rangeValueInternal);\n // Initialize raw range position to match actual values\n this.rawRangePosition = [\n this.rangeValueInternal[0],\n this.rangeValueInternal[1],\n ];\n } else {\n this.handleValueChange(this.valueInternal);\n // Initialize raw position to match actual value\n this.rawPosition = this.valueInternal;\n }\n }\n\n componentWillLoad() {\n // Initialize value array based on range mode when props are available\n if (this.value.length === 1 && this.range) {\n // If range mode but only one value provided, duplicate it\n this.value = [this.value[0], this.value[0]];\n } else if (this.value.length === 2 && !this.range) {\n // If single mode but two values provided, take the first\n this.value = [this.value[0]];\n }\n }\n\n disconnectedCallback() {\n this.removeGlobalEvents();\n }\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the slider values change.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<number[]>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"slider-container\">\n {/* First input (always render for the start value, but may be hidden) */}\n {this.range ? (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n index={0}\n inputId={this.startInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n endName={this.endName}\n />\n ) : null}\n\n <div class=\"track-container\">\n <div class=\"track\" onPointerDown={this.onTrackInteraction}>\n {this.range ? (\n <RangeThumb\n rangeValue={this.rangeValueInternal}\n rawRangePosition={this.rawRangePosition}\n activeDragThumb={this.activeDragThumb}\n isDragging={this.isDragging}\n snap={this.snap}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onKeyDown={this.onKeyDown}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n />\n ) : (\n <SingleThumb\n value={this.valueInternal}\n min={this.min}\n max={this.max}\n step={this.step}\n rawPosition={this.rawPosition}\n isDragging={this.isDragging}\n snap={this.snap}\n disabled={this.disabled}\n readonly={this.readonly}\n onKeyDown={this.onKeyDown}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n />\n )}\n </div>\n\n <TickMarks\n ticks={this.internalTicks}\n min={this.min}\n max={this.max}\n />\n </div>\n\n {/* Second input (for range mode, or for single value if not already rendered) */}\n {this.range ? (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n index={1}\n inputId={this.endInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n endName={this.endName}\n />\n ) : (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n inputId={this.startInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n />\n )}\n </div>\n\n {(this.success ||\n this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.error ||\n this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div class=\"error-description\" hidden={!this.error}>\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n // #endregion RENDER\n}\n"]}
|
|
@@ -111,9 +111,9 @@ export class NvFieldtext {
|
|
|
111
111
|
/****************************************************************************/
|
|
112
112
|
//#region RENDER
|
|
113
113
|
render() {
|
|
114
|
-
return (h(Host, { key: '
|
|
115
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
116
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
114
|
+
return (h(Host, { key: '35382ab52aa48116fbedc7683aff4729f06f5969' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '6f849db1b7603fc4de4fb23075fd7daa72438dd2', htmlFor: this.inputId }, h("slot", { key: '24bc67fe3a8de24a8601a2cf3c5afd2532e17c4a', name: "label" }, this.label))), h("div", { key: '8ffd2d0f048082c71a76054842fffd22452b9ad2', class: "input-wrapper" }, h("slot", { key: '478020c16e29399dcc6566651f88acc8d88ef36d', name: "before-input" }), h("div", { key: '1aa0bac3947bdff209268619202ccc38da691761', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '369b5f0a4c4d1d16217ad5de9221273ece41e1f0', name: "leading-input" }), h("input", { key: '91446fe15f48f45693f56b3fd21926b8114c1dca', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: this.type, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, autofocus: this.autofocus, autocomplete: this.autocomplete, multiple: this.multiple, value: this.value, onInput: this.handleInput }), h("slot", { key: '505a9ed004c4492f8daaef9a92bcaf344e2a10fb', name: "trailing-input" }), this.error && (h("nv-icon", { key: 'c1e9ecd4f901862391daa6c9f5c75d3c1b81810f', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: '15a452bdbbb386a51e4fe51370bd09521cc6f47f', name: "circle-check", class: "validation", size: "md" }))), h("slot", { key: '7e7e3969dd6f3d1b80eab00ac966f7ba9f13895c', name: "after-input" })), (this.description ||
|
|
115
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: 'b4ca95846a8fdf68e95d602968506bf009f9334f', class: "description" }, h("slot", { key: 'fce329e819b837318b2d9bf9e16a8ef886aa940a', name: "description" }, this.description))), (this.errorDescription ||
|
|
116
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'c3800ac457b5f0f87a3bdf9e9e37a36f5905786c', hidden: !this.error, class: "error-description" }, h("slot", { key: 'f77d02598ba261bf2b48b16ecfa3fc15fe221599', name: "error-description" }, this.errorDescription)))));
|
|
117
117
|
}
|
|
118
118
|
static get is() { return "nv-fieldtext"; }
|
|
119
119
|
static get formAssociated() { return true; }
|
|
@@ -177,9 +177,9 @@ export class NvFieldtextarea {
|
|
|
177
177
|
/****************************************************************************/
|
|
178
178
|
//#region RENDER
|
|
179
179
|
render() {
|
|
180
|
-
return (h(Host, { key: '
|
|
181
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
182
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
180
|
+
return (h(Host, { key: '2b054e4460ac1532cb2006feaa3930abc8e21505' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '5058a7c4a77a37336bcc58fd6b727f1f9564d7b2', htmlFor: this.inputId }, h("slot", { key: '0c5abb11d0c2377b702ae1614134e28e53a6e1e2', name: "label" }, this.label))), h("div", { key: 'e6d9981eaab913b3cf04fd99e0fbd07830fbebff', class: "textarea-wrapper" }, h("div", { key: '23392da0e927d2eb5720fa98499afd2fcb33d840', class: "textarea-container", onClick: this.handleTextareaContainerClick }, h("textarea", { key: '9b9521f4e033002ea346e3054118a114349dd7ee', id: this.inputId, ref: e => (this.textareaElement = e), placeholder: this.placeholder, autofocus: this.autofocus, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, autocomplete: "off", value: this.value, onInput: this.handleTextarea, rows: this.rows, class: clsx(this.resize === 'none' && 'resize-none', this.resize === 'vertical' && 'resize-y', this.resize === 'horizontal' && 'resize-x', this.resize === 'both' && 'resize') }))), (this.description ||
|
|
181
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '27411a39625e1f03bbe23ae52ceadb04ab0afd4e', class: "description" }, h("slot", { key: '56a5e1a95376899525911e096ded708a4987711d', name: "description" }, this.description))), (this.errorDescription ||
|
|
182
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '2336848d28c0d67c95607da5bcab3348c4c15e0a', hidden: !this.error, class: "error-description" }, h("slot", { key: 'a200628a9ed75402395e415eab743afddf0a5d27', name: "error-description" }, this.errorDescription)))));
|
|
183
183
|
}
|
|
184
184
|
static get is() { return "nv-fieldtextarea"; }
|
|
185
185
|
static get formAssociated() { return true; }
|
|
@@ -970,26 +970,26 @@ export class NvFieldtime {
|
|
|
970
970
|
}, key: `${option}-${index}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
971
971
|
}
|
|
972
972
|
render() {
|
|
973
|
-
return (h(Host, { key: '
|
|
974
|
-
h("input", { key: '
|
|
973
|
+
return (h(Host, { key: 'a8d08a4dac97430398e3f769f353e91ef08de9c0', onclick: e => this.handleHostClick(e) }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'e7d4a858f6194f085144fd59894ad54220a17a03', htmlFor: this.inputId }, h("slot", { key: '69901d62cdd32e3d7d1efe14066ef5ab42eed0d5', name: "label" }, this.label))), h("nv-popover", { key: '2541a920b4ce7b98515c58867ab1ab25d9cace9d', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, h("div", { key: '2f501df272714fd912b0d0981c27db89b46ae424', class: "input-wrapper", slot: "trigger" }, h("slot", { key: '41ee670692e5facaa0ddd065a2a79a66825d207b', name: "before-input" }), h("div", { key: '24e41277073946b78ae4d1f8f38173045e699845', class: "input-container" }, h("slot", { key: '6db3ce5df588697b9183225be3b603a3b51a156f', name: "leading-input" }), startsWithIgnoreCase(this.format, 'HH') && [
|
|
974
|
+
h("input", { key: 'ee093f322342ac3572ad76c48ebc2ecbed63ac01', ref: el => (this.inputElements[TimeType.Hours] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.hours, onInput: e => this.handleInputChange(e, TimeType.Hours), placeholder: this.format.includes('hh') ? 'hh' : 'HH', inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Hours), name: this.name
|
|
975
975
|
? `${TimeType.Hours}-${this.name}`
|
|
976
976
|
: TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
977
977
|
], this.format.includes('mm') && [
|
|
978
|
-
h("span", { key: '
|
|
979
|
-
h("input", { key: '
|
|
978
|
+
h("span", { key: '9cec44d707277c298ba7a70934e1593a12207799' }, ":"),
|
|
979
|
+
h("input", { key: '2acaf3b143f0f5e9e04005213bdfe9ea5334bf53', ref: el => (this.inputElements[TimeType.Minutes] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.minutes, onInput: e => this.handleInputChange(e, TimeType.Minutes), placeholder: "mm", inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Minutes), name: this.name
|
|
980
980
|
? `${TimeType.Minutes}-${this.name}`
|
|
981
981
|
: TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
982
982
|
], this.format.includes('ss') && [
|
|
983
|
-
h("span", { key: '
|
|
984
|
-
h("input", { key: '
|
|
983
|
+
h("span", { key: '07e0b374bdcad92339c4ddc10d71cc963a8a71ff' }, ":"),
|
|
984
|
+
h("input", { key: '84838544717af0bc967258d91fbee2748072be4f', ref: el => (this.inputElements[TimeType.Seconds] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.seconds, onInput: e => this.handleInputChange(e, TimeType.Seconds), placeholder: "ss", inputMode: "numeric", onFocus: () => this.handleFocus(TimeType.Seconds), name: this.name
|
|
985
985
|
? `${TimeType.Seconds}-${this.name}`
|
|
986
986
|
: TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
987
|
-
], h("nv-iconbutton", { key: '
|
|
987
|
+
], h("nv-iconbutton", { key: 'ec8d0d5c7eb9aa720deef07f23c712287246f3a8', name: 'clock', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide time picker' : 'Show time picker', "aria-pressed": this.open.toString(), onClick: () => this.HandleDropdownIconClick() }), this.error && (h("nv-icon", { key: 'dbef458469153ef93ad94903a2bcf439f6243d40', name: "alert-circle", class: "validation", size: "sm" })), this.success && (h("nv-icon", { key: '3dfb5e5b32dc91ebe53502f9117f628ae79bf57c', name: "circle-check", class: "validation", size: "sm" }))), h("slot", { key: '744e72f9c7828f8487f58265dac564670ba26329', name: "after-input" })), h("div", { key: '72dc9823125b9109bc27e049936007e796a97a06', class: "time-dropdown", slot: "content" }, h("div", { key: '1b1f8241a25500cf9ce22ebea20becd6882760cc', class: "time-columns" }, startsWithIgnoreCase(this.format, 'HH') &&
|
|
988
988
|
this.RenderTimeOptionsColumn(TimeType.Hours), this.format.includes('mm') &&
|
|
989
989
|
this.RenderTimeOptionsColumn(TimeType.Minutes), this.format.includes('ss') &&
|
|
990
990
|
this.RenderTimeOptionsColumn(TimeType.Seconds)))), (this.description ||
|
|
991
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
992
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
991
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '57985d7f2626853a24db80d56607b5453b00b6c9', class: "description" }, h("slot", { key: 'ba3383c066c6bcac3b1e6183b84528723de9cddc', name: "description" }, this.description))), (this.errorDescription ||
|
|
992
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '6f02373e082fcc7e34e0d35441783122cd7c0266', hidden: !this.error, class: "error-description" }, h("slot", { key: '43508d63829f53f5b5c718f1a112abbe5919b900', name: "error-description" }, this.errorDescription)))));
|
|
993
993
|
}
|
|
994
994
|
static get is() { return "nv-fieldtime"; }
|
|
995
995
|
static get formAssociated() { return true; }
|