@nova-design-system/nova-webcomponents 3.1.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-9bda5507.js → index-c56424e5.js} +34 -186
- package/dist/cjs/index-c56424e5.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- 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 +384 -172
- 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 +95 -103
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js.map +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 +128 -42
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +84 -60
- 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 +116 -104
- 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 +668 -0
- package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-fieldtext.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +11 -11
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +3 -3
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +3 -3
- package/dist/cjs/nv-menu.cjs.entry.js +2 -2
- package/dist/cjs/nv-menuitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-popover.cjs.entry.js +2 -2
- package/dist/cjs/nv-row.cjs.entry.js +2 -2
- package/dist/cjs/nv-stack.cjs.entry.js +2 -2
- package/dist/cjs/nv-table.cjs.entry.js +3 -3
- package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
- package/dist/cjs/nv-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/nv-calendar/nv-calendar.css +6 -2
- package/dist/collection/components/nv-calendar/nv-calendar.js +247 -169
- 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-datagrid/nv-datagrid.docs.js +131 -48
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +94 -152
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +20 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js.map +1 -1
- 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 +51 -1
- 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 +165 -41
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +51 -1
- 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/nv-fielddropdown.docs.js +8 -0
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +173 -106
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +77 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +202 -190
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/{nv-fieldmultiselect.css → styles/nv-fieldmultiselect.css} +61 -4
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +51 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +51 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +51 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +264 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +1036 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js +77 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/partials/field-input.js +33 -0
- package/dist/collection/components/nv-fieldslider/partials/field-input.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/partials/range-thumb.js +34 -0
- package/dist/collection/components/nv-fieldslider/partials/range-thumb.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/partials/single-thumb.js +18 -0
- package/dist/collection/components/nv-fieldslider/partials/single-thumb.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/partials/tick-marks.js +18 -0
- package/dist/collection/components/nv-fieldslider/partials/tick-marks.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +338 -0
- package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js +159 -0
- package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js.map +1 -0
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +59 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +9 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +4 -3
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +45 -1
- 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/styles/nv-fieldtime.css +51 -1
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js +1 -0
- 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.css +1 -0
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/interfaces/Column.js.map +1 -1
- package/dist/components/index.js +2 -1
- package/dist/components/index.js.map +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 +97 -109
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-datagridcolumn.js +4 -3
- package/dist/components/nv-datagridcolumn.js.map +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 +137 -57
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +98 -72
- 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 +132 -120
- 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.d.ts +11 -0
- package/dist/components/nv-fieldslider.js +731 -0
- package/dist/components/nv-fieldslider.js.map +1 -0
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +5 -5
- package/dist/components/nv-fieldtextarea.js.map +1 -1
- package/dist/components/nv-fieldtime.js +15 -15
- 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 +5 -5
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +2 -2
- package/dist/components/nv-stack.js +2 -2
- package/dist/components/nv-table.js +3 -3
- package/dist/components/nv-tablecolumn.js +1 -1
- package/dist/components/nv-toggle.js +3 -3
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-eb632278.js → p-2ae214d2.js} +3 -3
- package/dist/components/{p-eb632278.js.map → p-2ae214d2.js.map} +1 -1
- package/dist/components/{p-f76bb0c3.js → p-3e32b5a1.js} +5 -5
- package/dist/components/p-3e32b5a1.js.map +1 -0
- package/dist/components/{p-854c32dc.js → p-5e90b9b8.js} +389 -199
- package/dist/components/p-5e90b9b8.js.map +1 -0
- package/dist/components/{p-a2527411.js → p-5ee4015d.js} +3 -3
- package/dist/components/{p-a2527411.js.map → p-5ee4015d.js.map} +1 -1
- package/dist/components/{p-02752770.js → p-6277f746.js} +2 -2
- package/dist/components/{p-02752770.js.map → p-6277f746.js.map} +1 -1
- package/dist/components/p-7935c1cb.js +167 -0
- package/dist/components/p-7935c1cb.js.map +1 -0
- package/dist/components/{p-b48d5a94.js → p-8d92f0e1.js} +4 -4
- package/dist/components/{p-b48d5a94.js.map → p-8d92f0e1.js.map} +1 -1
- package/dist/components/{p-41c56ddc.js → p-95a7581c.js} +5 -5
- package/dist/components/{p-41c56ddc.js.map → p-95a7581c.js.map} +1 -1
- package/dist/components/{p-e00cbb8a.js → p-9e6e26cb.js} +2 -2
- package/dist/components/{p-e00cbb8a.js.map → p-9e6e26cb.js.map} +1 -1
- package/dist/components/p-9fa0de38.js +88 -0
- package/dist/components/p-9fa0de38.js.map +1 -0
- package/dist/components/{p-1c45c0f2.js → p-aff3ed68.js} +24 -177
- package/dist/components/p-aff3ed68.js.map +1 -0
- package/dist/components/{p-608eb9da.js → p-b6d858b2.js} +2 -2
- package/dist/components/{p-608eb9da.js.map → p-b6d858b2.js.map} +1 -1
- package/dist/components/{p-f5cb0a63.js → p-bb6d1e4e.js} +3 -3
- package/dist/components/{p-f5cb0a63.js.map → p-bb6d1e4e.js.map} +1 -1
- package/dist/components/{p-35a70c5e.js → p-c07c32d2.js} +3 -3
- package/dist/components/{p-35a70c5e.js.map → p-c07c32d2.js.map} +1 -1
- package/dist/components/{p-10faa938.js → p-c9006520.js} +5 -5
- package/dist/components/{p-10faa938.js.map → p-c9006520.js.map} +1 -1
- package/dist/components/{p-0a0f6daf.js → p-e28c4707.js} +3 -3
- package/dist/components/{p-0a0f6daf.js.map → p-e28c4707.js.map} +1 -1
- package/dist/components/{p-10b37876.js → p-eabbc885.js} +3 -3
- package/dist/components/{p-10b37876.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-1fb7a9a6.js → index-a1936cd0.js} +35 -186
- package/dist/esm/index-a1936cd0.js.map +1 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +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 +385 -173
- 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 +96 -104
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +2 -2
- package/dist/esm/nv-datagridcolumn.entry.js.map +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 +128 -42
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +84 -60
- 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 +116 -104
- 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 +664 -0
- package/dist/esm/nv-fieldslider.entry.js.map +1 -0
- package/dist/esm/nv-fieldtext.entry.js +5 -5
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +5 -5
- package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +12 -12
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +4 -4
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +3 -3
- package/dist/esm/nv-menu.entry.js +2 -2
- package/dist/esm/nv-menuitem.entry.js +2 -2
- package/dist/esm/nv-popover.entry.js +2 -2
- package/dist/esm/nv-row.entry.js +2 -2
- package/dist/esm/nv-stack.entry.js +2 -2
- package/dist/esm/nv-table.entry.js +3 -3
- package/dist/esm/nv-tablecolumn.entry.js +1 -1
- package/dist/esm/nv-toggle.entry.js +3 -3
- package/dist/esm/nv-tooltip.entry.js +3 -3
- package/dist/esm/nv-tooltip.entry.js.map +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-050d6c6c.entry.js +2 -0
- package/dist/native/{p-4d164ed6.entry.js.map → p-050d6c6c.entry.js.map} +1 -1
- package/dist/native/{p-615947e7.entry.js → p-08ca678c.entry.js} +2 -2
- package/dist/native/p-1a5d3b87.entry.js +2 -0
- package/dist/native/{p-efe6a46c.entry.js.map → p-1a5d3b87.entry.js.map} +1 -1
- package/dist/native/{p-7fd4d13d.entry.js → p-1c1ecd38.entry.js} +2 -2
- package/dist/native/{p-c7b201cd.entry.js → p-1d98477d.entry.js} +2 -2
- package/dist/native/{p-1da72182.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-fc97f071.entry.js.map → p-3817efb2.entry.js.map} +1 -1
- package/dist/native/p-45459dbb.entry.js +2 -0
- package/dist/native/{p-7042ba8a.entry.js.map → p-45459dbb.entry.js.map} +1 -1
- package/dist/native/p-45cbe6e4.entry.js +2 -0
- package/dist/native/{p-9135fdf5.entry.js.map → p-45cbe6e4.entry.js.map} +1 -1
- package/dist/native/p-46428304.entry.js +2 -0
- package/dist/native/p-46428304.entry.js.map +1 -0
- package/dist/native/p-4f9cdf0b.entry.js +2 -0
- package/dist/native/{p-3b7ef609.entry.js → p-58bb90ad.entry.js} +2 -2
- package/dist/native/p-59b07b36.entry.js +2 -0
- package/dist/native/p-59b07b36.entry.js.map +1 -0
- package/dist/native/{p-3cd77d82.entry.js → p-5b6c59e0.entry.js} +2 -2
- package/dist/native/p-6029e51b.entry.js +2 -0
- package/dist/native/{p-244f56ac.entry.js.map → p-6029e51b.entry.js.map} +1 -1
- package/dist/native/{p-08a75cfa.entry.js → p-60c64f2b.entry.js} +2 -2
- package/dist/native/p-64a76565.entry.js +2 -0
- package/dist/native/p-64a76565.entry.js.map +1 -0
- package/dist/native/{p-c67186f8.entry.js → p-83288db0.entry.js} +2 -2
- package/dist/native/p-838f7842.entry.js +2 -0
- package/dist/native/p-838f7842.entry.js.map +1 -0
- package/dist/native/{p-0245863d.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-b94d9f0b.entry.js.map → p-8fb4e5c0.entry.js.map} +1 -1
- package/dist/native/{p-14c07207.entry.js → p-914da1e1.entry.js} +2 -2
- package/dist/native/p-abbe5d69.entry.js +2 -0
- package/dist/native/p-abbe5d69.entry.js.map +1 -0
- package/dist/native/p-abc251aa.entry.js +2 -0
- package/dist/native/p-abc251aa.entry.js.map +1 -0
- package/dist/native/{p-c0f79bac.entry.js → p-ad128108.entry.js} +2 -2
- package/dist/native/{p-e5de64d5.entry.js → p-b5b9190a.entry.js} +2 -2
- package/dist/native/{p-470588c2.entry.js → p-b8f2c1e7.entry.js} +3 -3
- package/dist/native/p-b8f2c1e7.entry.js.map +1 -0
- package/dist/native/{p-b8b6875d.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-3953464e.entry.js → p-d21b2da2.entry.js} +3 -3
- package/dist/native/{p-90e6d9dd.entry.js → p-d53e8795.entry.js} +2 -2
- package/dist/native/p-dc7dd7f3.entry.js +2 -0
- package/dist/native/{p-ae7ab110.entry.js.map → p-dc7dd7f3.entry.js.map} +1 -1
- package/dist/native/p-e2c1992e.entry.js +2 -0
- package/dist/native/{p-656c56f0.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-49cac014.entry.js.map → p-f94d7054.entry.js.map} +1 -1
- package/dist/native/p-fdea17ce.entry.js +2 -0
- package/dist/native/p-fdea17ce.entry.js.map +1 -0
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +26 -50
- 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-datagrid/nv-datagrid.d.ts +0 -16
- package/dist/types/components/nv-datagridcolumn/nv-datagridcolumn.d.ts +4 -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 +24 -3
- package/dist/types/components/nv-fielddaterange/test/nv-fielddaterange.logic.test.d.ts +1 -0
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +47 -26
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +61 -55
- package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +229 -0
- package/dist/types/components/nv-fieldslider/nv-fieldslider.docs.d.ts +4 -0
- package/dist/types/components/nv-fieldslider/nv-fieldslider.utils.d.ts +46 -0
- package/dist/types/components/nv-fieldslider/partials/field-input.d.ts +45 -0
- package/dist/types/components/nv-fieldslider/partials/range-thumb.d.ts +37 -0
- package/dist/types/components/nv-fieldslider/partials/single-thumb.d.ts +35 -0
- package/dist/types/components/nv-fieldslider/partials/tick-marks.d.ts +28 -0
- package/dist/types/components/nv-fieldslider/test/nv-fieldslider.utils.test.d.ts +1 -0
- package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +1 -0
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components.d.ts +402 -54
- package/dist/types/interfaces/Column.d.ts +5 -1
- package/dist/vscode-data.json +121 -9
- package/hydrate/index.js +1664 -584
- package/hydrate/index.mjs +1664 -584
- package/package.json +6 -2
- package/dist/cjs/index-9bda5507.js.map +0 -1
- package/dist/components/p-1c45c0f2.js.map +0 -1
- package/dist/components/p-76646ce9.js +0 -88
- package/dist/components/p-76646ce9.js.map +0 -1
- package/dist/components/p-854c32dc.js.map +0 -1
- package/dist/components/p-9decffb6.js +0 -167
- package/dist/components/p-9decffb6.js.map +0 -1
- package/dist/components/p-f76bb0c3.js.map +0 -1
- package/dist/esm/index-1fb7a9a6.js.map +0 -1
- package/dist/native/p-244f56ac.entry.js +0 -2
- package/dist/native/p-2523eead.entry.js +0 -2
- package/dist/native/p-2523eead.entry.js.map +0 -1
- package/dist/native/p-470588c2.entry.js.map +0 -1
- package/dist/native/p-49cac014.entry.js +0 -2
- package/dist/native/p-4d164ed6.entry.js +0 -2
- package/dist/native/p-4dc1d036.entry.js +0 -2
- package/dist/native/p-4e635fa7.entry.js +0 -2
- package/dist/native/p-4e635fa7.entry.js.map +0 -1
- package/dist/native/p-5d21532a.entry.js +0 -2
- package/dist/native/p-5d21532a.entry.js.map +0 -1
- package/dist/native/p-656c56f0.entry.js +0 -2
- package/dist/native/p-7042ba8a.entry.js +0 -2
- package/dist/native/p-7e154bfd.entry.js +0 -2
- package/dist/native/p-7e154bfd.entry.js.map +0 -1
- package/dist/native/p-7eba904e.entry.js +0 -2
- package/dist/native/p-7eba904e.entry.js.map +0 -1
- package/dist/native/p-9135fdf5.entry.js +0 -2
- package/dist/native/p-ab002252.js +0 -3
- package/dist/native/p-ab002252.js.map +0 -1
- package/dist/native/p-ae7ab110.entry.js +0 -2
- package/dist/native/p-b94d9f0b.entry.js +0 -2
- package/dist/native/p-c71c6f23.entry.js +0 -2
- package/dist/native/p-c71c6f23.entry.js.map +0 -1
- package/dist/native/p-d9a52884.entry.js +0 -2
- package/dist/native/p-d9a52884.entry.js.map +0 -1
- package/dist/native/p-efe6a46c.entry.js +0 -2
- package/dist/native/p-f2ef6771.entry.js +0 -2
- package/dist/native/p-f5f68992.entry.js +0 -2
- package/dist/native/p-f5f68992.entry.js.map +0 -1
- package/dist/native/p-fc97f071.entry.js +0 -2
- /package/dist/native/{p-615947e7.entry.js.map → p-08ca678c.entry.js.map} +0 -0
- /package/dist/native/{p-7fd4d13d.entry.js.map → p-1c1ecd38.entry.js.map} +0 -0
- /package/dist/native/{p-c7b201cd.entry.js.map → p-1d98477d.entry.js.map} +0 -0
- /package/dist/native/{p-1da72182.entry.js.map → p-2006f5d4.entry.js.map} +0 -0
- /package/dist/native/{p-f2ef6771.entry.js.map → p-4f9cdf0b.entry.js.map} +0 -0
- /package/dist/native/{p-3b7ef609.entry.js.map → p-58bb90ad.entry.js.map} +0 -0
- /package/dist/native/{p-3cd77d82.entry.js.map → p-5b6c59e0.entry.js.map} +0 -0
- /package/dist/native/{p-08a75cfa.entry.js.map → p-60c64f2b.entry.js.map} +0 -0
- /package/dist/native/{p-c67186f8.entry.js.map → p-83288db0.entry.js.map} +0 -0
- /package/dist/native/{p-0245863d.entry.js.map → p-86ab23ea.entry.js.map} +0 -0
- /package/dist/native/{p-4dc1d036.entry.js.map → p-87784622.entry.js.map} +0 -0
- /package/dist/native/{p-14c07207.entry.js.map → p-914da1e1.entry.js.map} +0 -0
- /package/dist/native/{p-c0f79bac.entry.js.map → p-ad128108.entry.js.map} +0 -0
- /package/dist/native/{p-e5de64d5.entry.js.map → p-b5b9190a.entry.js.map} +0 -0
- /package/dist/native/{p-b8b6875d.entry.js.map → p-d040bd61.entry.js.map} +0 -0
- /package/dist/native/{p-3953464e.entry.js.map → p-d21b2da2.entry.js.map} +0 -0
- /package/dist/native/{p-90e6d9dd.entry.js.map → p-d53e8795.entry.js.map} +0 -0
- /package/dist/native/{p-f85c08f1.js.map → p-e2d0a77d.js.map} +0 -0
|
@@ -0,0 +1,1036 @@
|
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
import { v4 as uuidv4 } from "uuid";
|
|
3
|
+
import { clamp, valueToPercent, snapToStep, generateTicks, snapToTicks, } from "./nv-fieldslider.utils";
|
|
4
|
+
import { SingleThumb } from "./partials/single-thumb";
|
|
5
|
+
import { RangeThumb } from "./partials/range-thumb";
|
|
6
|
+
import { TickMarks } from "./partials/tick-marks";
|
|
7
|
+
import { FieldInput } from "./partials/field-input";
|
|
8
|
+
/**
|
|
9
|
+
* @slot label - Content to be placed as the label, will override the label prop.
|
|
10
|
+
* @slot description - Content to be placed as the description, will override the description prop.
|
|
11
|
+
* @slot error-description - Content to be placed as the error description, will override the errorDescription prop.
|
|
12
|
+
*/
|
|
13
|
+
export class NvFieldslider {
|
|
14
|
+
constructor() {
|
|
15
|
+
/****************************************************************************/
|
|
16
|
+
//#region PROPERTIES
|
|
17
|
+
/**
|
|
18
|
+
* Sets the ID for the start input element and the for attribute of the associated
|
|
19
|
+
* label. If no ID is provided, a random one will be automatically generated.
|
|
20
|
+
*/
|
|
21
|
+
this.startInputId = uuidv4();
|
|
22
|
+
/**
|
|
23
|
+
* Sets the ID for the end input element and the for attribute of the associated
|
|
24
|
+
* label. If no ID is provided, a random one will be automatically generated.
|
|
25
|
+
*/
|
|
26
|
+
this.endInputId = uuidv4();
|
|
27
|
+
/**
|
|
28
|
+
* Keeps the interface clean by removing visible labels, but still announces
|
|
29
|
+
* the label to screen readers so users relying on assistive tech aren't left
|
|
30
|
+
* guessing.
|
|
31
|
+
*/
|
|
32
|
+
this.hideLabel = false;
|
|
33
|
+
/**
|
|
34
|
+
* Enables an optional numeric input field alongside the slider, allowing
|
|
35
|
+
* users to type a value directly instead of—or in addition to—using the
|
|
36
|
+
* slider handle.
|
|
37
|
+
*/
|
|
38
|
+
this.hasField = false;
|
|
39
|
+
/**
|
|
40
|
+
* Allows the slider to display two thumbs, enabling users to select a
|
|
41
|
+
* continuous range between a minimum and maximum value. Ideal for use cases
|
|
42
|
+
* like filtering by price or time.
|
|
43
|
+
*/
|
|
44
|
+
this.range = false;
|
|
45
|
+
/**
|
|
46
|
+
* Disables user interaction with the slider and its associated input fields.
|
|
47
|
+
*/
|
|
48
|
+
this.disabled = false;
|
|
49
|
+
/**
|
|
50
|
+
* Makes the slider and input non-editable while keeping them focusable and
|
|
51
|
+
* included in form submissions.
|
|
52
|
+
*/
|
|
53
|
+
this.readonly = false;
|
|
54
|
+
/**
|
|
55
|
+
* Alters the slider's appearance to indicate an error, helping users
|
|
56
|
+
* identify fields that need correction.
|
|
57
|
+
* @validator error
|
|
58
|
+
*/
|
|
59
|
+
this.error = false;
|
|
60
|
+
/**
|
|
61
|
+
* Changes the slider's appearance to indicate successful input or validation.
|
|
62
|
+
*/
|
|
63
|
+
this.success = false;
|
|
64
|
+
/**
|
|
65
|
+
* Numeric value of the slider as an array of numbers. When in single mode,
|
|
66
|
+
* the value should be a an array of one number. When in range mode, the value
|
|
67
|
+
* should be an array of two numbers.
|
|
68
|
+
*/
|
|
69
|
+
this.value = [0, 0];
|
|
70
|
+
/**
|
|
71
|
+
* Defines the interval between selectable values on the slider. Controls how
|
|
72
|
+
* much the value increases or decreases with each keyboard interaction, drag
|
|
73
|
+
* movement, or direct input.
|
|
74
|
+
*/
|
|
75
|
+
this.step = 1;
|
|
76
|
+
/**
|
|
77
|
+
* Controls whether the slider handle should visually snap to step values
|
|
78
|
+
* during dragging. When false, the handle can be positioned at any point
|
|
79
|
+
* along the track while dragging, but the actual value will still snap to the
|
|
80
|
+
* nearest step value. When true, the handle will visually snap to the nearest
|
|
81
|
+
* step value during dragging.
|
|
82
|
+
*/
|
|
83
|
+
this.snap = false;
|
|
84
|
+
/**
|
|
85
|
+
* When true and custom ticks are provided, the slider will snap to the nearest
|
|
86
|
+
* tick value during dragging, instead of using the step value. This is useful
|
|
87
|
+
* when you have custom ticks at specific values that don't align with regular step intervals.
|
|
88
|
+
*/
|
|
89
|
+
this.snapTicks = false;
|
|
90
|
+
/**
|
|
91
|
+
* Defines the minimum allowed value for the slider. The thumb cannot move
|
|
92
|
+
* below this value, and manual input is also constrained accordingly.
|
|
93
|
+
*/
|
|
94
|
+
this.min = 0;
|
|
95
|
+
/**
|
|
96
|
+
* Defines the maximum allowed value for the slider. The thumb cannot move
|
|
97
|
+
* above this value, and manual input is also constrained accordingly.
|
|
98
|
+
*/
|
|
99
|
+
this.max = 100;
|
|
100
|
+
/**
|
|
101
|
+
* Controls the visibility of tick marks on the slider. When enabled, all
|
|
102
|
+
* visual ticks that indicate step points along the track are shown. If custom
|
|
103
|
+
* ticks are provided, they are always shown regardless of this setting.
|
|
104
|
+
*/
|
|
105
|
+
this.showTicks = false;
|
|
106
|
+
/**
|
|
107
|
+
* Allows the field to stretch and fill the entire width of its container.
|
|
108
|
+
*/
|
|
109
|
+
this.fluid = false;
|
|
110
|
+
//#endregion PROPERTIES
|
|
111
|
+
/****************************************************************************/
|
|
112
|
+
//#region STATE
|
|
113
|
+
this.isDragging = false;
|
|
114
|
+
this.activeDragThumb = 'single';
|
|
115
|
+
this.internalTicks = [];
|
|
116
|
+
// These track the raw slider positions for visual display
|
|
117
|
+
this.rawPosition = 0;
|
|
118
|
+
this.rawRangePosition = [0, 0];
|
|
119
|
+
this.valueInternal = 0;
|
|
120
|
+
this.rangeValueInternal = [0, 0];
|
|
121
|
+
/**
|
|
122
|
+
* Parses the value string into a number or array of numbers for internal use.
|
|
123
|
+
*/
|
|
124
|
+
this.parseValue = () => {
|
|
125
|
+
if (typeof this.value === 'string') {
|
|
126
|
+
console.error('Sliders require a number or array of numbers to be passed in the value prop.');
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (this.range && this.value.length !== 2) {
|
|
130
|
+
console.error('Range sliders require an array of two values to be passed in the value prop.');
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (!this.range && this.value.length !== 1) {
|
|
134
|
+
console.error('Single sliders require a single value as an array to be passed in the value prop.');
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
this.valueInternal = this.value[0];
|
|
138
|
+
this.rangeValueInternal = [this.value[0], this.value[1]];
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Handles pointer events on the track.
|
|
142
|
+
* @param {PointerEvent} event - The pointer event
|
|
143
|
+
*/
|
|
144
|
+
this.onTrackInteraction = (event) => {
|
|
145
|
+
if (this.disabled || this.readonly) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const trackRect = event.currentTarget.getBoundingClientRect();
|
|
149
|
+
const percentage = clamp(((event.clientX - trackRect.left) / trackRect.width) * 100, 0, 100);
|
|
150
|
+
const newValue = this.min + (percentage / 100) * (this.max - this.min);
|
|
151
|
+
// Store raw position for visual display
|
|
152
|
+
this.rawPosition = newValue;
|
|
153
|
+
if (this.range) {
|
|
154
|
+
// In range mode, determine which thumb to move based on proximity
|
|
155
|
+
const leftPct = valueToPercent(this.rangeValueInternal[0], this.min, this.max);
|
|
156
|
+
const rightPct = valueToPercent(this.rangeValueInternal[1], this.min, this.max);
|
|
157
|
+
const distanceToLeft = Math.abs(percentage - leftPct);
|
|
158
|
+
const distanceToRight = Math.abs(percentage - rightPct);
|
|
159
|
+
if (distanceToLeft <= distanceToRight) {
|
|
160
|
+
this.activeDragThumb = 'left';
|
|
161
|
+
this.rawRangePosition = [newValue, this.rawRangePosition[1]];
|
|
162
|
+
this.handleValueChange([newValue, this.rangeValueInternal[1]]);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
this.activeDragThumb = 'right';
|
|
166
|
+
this.rawRangePosition = [this.rawRangePosition[0], newValue];
|
|
167
|
+
this.handleValueChange([this.rangeValueInternal[0], newValue]);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.activeDragThumb = 'single';
|
|
172
|
+
this.rawPosition = newValue;
|
|
173
|
+
this.handleValueChange(newValue);
|
|
174
|
+
}
|
|
175
|
+
this.isDragging = true;
|
|
176
|
+
this.registerGlobalEvents();
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Handles pointer move events during drag.
|
|
180
|
+
* @param {PointerEvent} event - The pointer event
|
|
181
|
+
*/
|
|
182
|
+
this.onPointerMove = (event) => {
|
|
183
|
+
if (!this.isDragging || this.disabled || this.readonly) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const trackElement = this.el.querySelector('.track');
|
|
187
|
+
if (!trackElement)
|
|
188
|
+
return;
|
|
189
|
+
const trackRect = trackElement.getBoundingClientRect();
|
|
190
|
+
const percentage = clamp(((event.clientX - trackRect.left) / trackRect.width) * 100, 0, 100);
|
|
191
|
+
const newValue = this.min + (percentage / 100) * (this.max - this.min);
|
|
192
|
+
// Update visual position
|
|
193
|
+
if (this.range) {
|
|
194
|
+
if (this.activeDragThumb === 'left') {
|
|
195
|
+
this.rawRangePosition = [newValue, this.rawRangePosition[1]];
|
|
196
|
+
this.handleValueChange([newValue, this.rangeValueInternal[1]]);
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
this.rawRangePosition = [this.rawRangePosition[0], newValue];
|
|
200
|
+
this.handleValueChange([this.rangeValueInternal[0], newValue]);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
this.rawPosition = newValue;
|
|
205
|
+
this.handleValueChange(newValue);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* Handles the end of a drag operation.
|
|
210
|
+
*/
|
|
211
|
+
this.onPointerUp = () => {
|
|
212
|
+
this.isDragging = false;
|
|
213
|
+
this.removeGlobalEvents();
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* Handles keydown events for keyboard accessibility.
|
|
217
|
+
* @param {KeyboardEvent} event - The keyboard event
|
|
218
|
+
*/
|
|
219
|
+
this.onKeyDown = (event) => {
|
|
220
|
+
if (this.disabled || this.readonly) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
let newValue;
|
|
224
|
+
const stepMultiplier = event.shiftKey ? 10 : 1;
|
|
225
|
+
const singleStep = this.step * stepMultiplier;
|
|
226
|
+
if (this.range) {
|
|
227
|
+
const focusedThumb = event.target.getAttribute('data-thumb');
|
|
228
|
+
const idx = focusedThumb === 'left' ? 0 : 1;
|
|
229
|
+
const currentValue = [...this.rangeValueInternal];
|
|
230
|
+
switch (event.key) {
|
|
231
|
+
case 'ArrowRight':
|
|
232
|
+
case 'ArrowUp':
|
|
233
|
+
currentValue[idx] += singleStep;
|
|
234
|
+
break;
|
|
235
|
+
case 'ArrowLeft':
|
|
236
|
+
case 'ArrowDown':
|
|
237
|
+
currentValue[idx] -= singleStep;
|
|
238
|
+
break;
|
|
239
|
+
case 'Home':
|
|
240
|
+
currentValue[idx] = this.min;
|
|
241
|
+
break;
|
|
242
|
+
case 'End':
|
|
243
|
+
currentValue[idx] = this.max;
|
|
244
|
+
break;
|
|
245
|
+
case 'PageUp':
|
|
246
|
+
currentValue[idx] += singleStep * 10;
|
|
247
|
+
break;
|
|
248
|
+
case 'PageDown':
|
|
249
|
+
currentValue[idx] -= singleStep * 10;
|
|
250
|
+
break;
|
|
251
|
+
default:
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
newValue = currentValue;
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
switch (event.key) {
|
|
258
|
+
case 'ArrowRight':
|
|
259
|
+
case 'ArrowUp':
|
|
260
|
+
newValue = this.valueInternal + singleStep;
|
|
261
|
+
break;
|
|
262
|
+
case 'ArrowLeft':
|
|
263
|
+
case 'ArrowDown':
|
|
264
|
+
newValue = this.valueInternal - singleStep;
|
|
265
|
+
break;
|
|
266
|
+
case 'Home':
|
|
267
|
+
newValue = this.min;
|
|
268
|
+
break;
|
|
269
|
+
case 'End':
|
|
270
|
+
newValue = this.max;
|
|
271
|
+
break;
|
|
272
|
+
case 'PageUp':
|
|
273
|
+
newValue = this.valueInternal + singleStep * 10;
|
|
274
|
+
break;
|
|
275
|
+
case 'PageDown':
|
|
276
|
+
newValue = this.valueInternal - singleStep * 10;
|
|
277
|
+
break;
|
|
278
|
+
default:
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
event.preventDefault();
|
|
283
|
+
this.handleValueChange(newValue);
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* Handles field input value changes.
|
|
287
|
+
* @param {Event} event - The input event
|
|
288
|
+
*/
|
|
289
|
+
this.handleFieldChange = (event) => {
|
|
290
|
+
const input = event.target;
|
|
291
|
+
const newValue = parseFloat(input.value);
|
|
292
|
+
if (isNaN(newValue)) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
if (this.range) {
|
|
296
|
+
const fieldIndex = input.getAttribute('data-index') === '0' ? 0 : 1;
|
|
297
|
+
const updatedRange = [...this.rangeValueInternal];
|
|
298
|
+
updatedRange[fieldIndex] = newValue;
|
|
299
|
+
this.handleValueChange(updatedRange);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
this.handleValueChange(newValue);
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
//#endregion STATE
|
|
307
|
+
/****************************************************************************/
|
|
308
|
+
//#region METHODS
|
|
309
|
+
/**
|
|
310
|
+
* Ensures value is valid and within bounds.
|
|
311
|
+
* @param {number} val - The value to validate
|
|
312
|
+
* @returns {number} The validated and snapped value
|
|
313
|
+
*/
|
|
314
|
+
validateValue(val) {
|
|
315
|
+
// First ensure the value is within bounds
|
|
316
|
+
const clampedValue = clamp(val, this.min, this.max);
|
|
317
|
+
// If snapTicks is true and we have custom ticks, snap to the nearest tick
|
|
318
|
+
if (this.snapTicks && this.internalTicks && this.internalTicks.length > 0) {
|
|
319
|
+
return snapToTicks(clampedValue, this.internalTicks);
|
|
320
|
+
}
|
|
321
|
+
// Otherwise snap to step values
|
|
322
|
+
return snapToStep(clampedValue, this.min, this.max, this.step);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Handles value changes from slider interaction.
|
|
326
|
+
* @param {number | number[]} newValue - The new value or range values
|
|
327
|
+
*/
|
|
328
|
+
handleValueChange(newValue) {
|
|
329
|
+
if (this.disabled || this.readonly) {
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
if (this.range) {
|
|
333
|
+
// Handle range values
|
|
334
|
+
if (Array.isArray(newValue) && newValue.length === 2) {
|
|
335
|
+
// Ensure values are in order (left ≤ right)
|
|
336
|
+
const orderedValues = [
|
|
337
|
+
Math.min(newValue[0], newValue[1]),
|
|
338
|
+
Math.max(newValue[0], newValue[1]),
|
|
339
|
+
];
|
|
340
|
+
// Snap to steps and clamp
|
|
341
|
+
const validatedValues = [
|
|
342
|
+
this.validateValue(orderedValues[0]),
|
|
343
|
+
this.validateValue(orderedValues[1]),
|
|
344
|
+
];
|
|
345
|
+
if (validatedValues[0] !== this.rangeValueInternal[0] ||
|
|
346
|
+
validatedValues[1] !== this.rangeValueInternal[1]) {
|
|
347
|
+
this.rangeValueInternal = validatedValues;
|
|
348
|
+
this.value = this.rangeValueInternal;
|
|
349
|
+
this.valueChanged.emit(this.rangeValueInternal);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
// Handle single value
|
|
355
|
+
if (typeof newValue === 'number') {
|
|
356
|
+
const validatedValue = this.validateValue(newValue);
|
|
357
|
+
if (validatedValue !== this.valueInternal) {
|
|
358
|
+
this.valueInternal = validatedValue;
|
|
359
|
+
this.value = [this.valueInternal];
|
|
360
|
+
this.valueChanged.emit([this.valueInternal]);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Generates the ticks to display based on props and state.
|
|
367
|
+
*/
|
|
368
|
+
generateDisplayTicks() {
|
|
369
|
+
// If custom ticks are provided, always use them regardless of showTicks setting
|
|
370
|
+
if (this.ticks && this.ticks.length > 0) {
|
|
371
|
+
this.internalTicks = [...this.ticks].sort((a, b) => a.value - b.value);
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
// If showTicks is false and there are no custom ticks, hide all ticks
|
|
375
|
+
if (!this.showTicks) {
|
|
376
|
+
this.internalTicks = [];
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
// Generate all ticks at each step point
|
|
380
|
+
const autoTicks = generateTicks(this.min, this.max, this.step);
|
|
381
|
+
this.internalTicks = autoTicks.map(value => ({ value }));
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Registers global events for tracking pointer movement.
|
|
385
|
+
*/
|
|
386
|
+
registerGlobalEvents() {
|
|
387
|
+
document.addEventListener('pointermove', this.onPointerMove);
|
|
388
|
+
document.addEventListener('pointerup', this.onPointerUp);
|
|
389
|
+
document.addEventListener('pointercancel', this.onPointerUp);
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Removes global events when tracking ends.
|
|
393
|
+
*/
|
|
394
|
+
removeGlobalEvents() {
|
|
395
|
+
document.removeEventListener('pointermove', this.onPointerMove);
|
|
396
|
+
document.removeEventListener('pointerup', this.onPointerUp);
|
|
397
|
+
document.removeEventListener('pointercancel', this.onPointerUp);
|
|
398
|
+
}
|
|
399
|
+
//#endregion METHODS
|
|
400
|
+
/****************************************************************************/
|
|
401
|
+
//#region WATCHERS
|
|
402
|
+
onValueChange() {
|
|
403
|
+
this.parseValue();
|
|
404
|
+
}
|
|
405
|
+
onConfigChange() {
|
|
406
|
+
this.generateDisplayTicks();
|
|
407
|
+
if (this.range) {
|
|
408
|
+
this.handleValueChange(this.rangeValueInternal);
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
this.handleValueChange(this.valueInternal);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
onRangeChange(newValue) {
|
|
415
|
+
if (newValue) {
|
|
416
|
+
// Switching to range mode
|
|
417
|
+
this.rangeValueInternal = [this.min, this.valueInternal];
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
// Switching to single mode, take the higher value
|
|
421
|
+
this.valueInternal = this.rangeValueInternal[1];
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
//#endregion WATCHERS
|
|
425
|
+
/****************************************************************************/
|
|
426
|
+
//#region LIFECYCLE
|
|
427
|
+
connectedCallback() {
|
|
428
|
+
this.parseValue();
|
|
429
|
+
this.generateDisplayTicks();
|
|
430
|
+
// Initialize values and make sure they're valid
|
|
431
|
+
if (this.range) {
|
|
432
|
+
if (!Array.isArray(this.rangeValueInternal) ||
|
|
433
|
+
this.rangeValueInternal.length !== 2) {
|
|
434
|
+
this.rangeValueInternal = [this.min, this.max];
|
|
435
|
+
}
|
|
436
|
+
this.handleValueChange(this.rangeValueInternal);
|
|
437
|
+
// Initialize raw range position to match actual values
|
|
438
|
+
this.rawRangePosition = [
|
|
439
|
+
this.rangeValueInternal[0],
|
|
440
|
+
this.rangeValueInternal[1],
|
|
441
|
+
];
|
|
442
|
+
}
|
|
443
|
+
else {
|
|
444
|
+
this.handleValueChange(this.valueInternal);
|
|
445
|
+
// Initialize raw position to match actual value
|
|
446
|
+
this.rawPosition = this.valueInternal;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
disconnectedCallback() {
|
|
450
|
+
this.removeGlobalEvents();
|
|
451
|
+
}
|
|
452
|
+
//#endregion EVENTS
|
|
453
|
+
/****************************************************************************/
|
|
454
|
+
//#region RENDER
|
|
455
|
+
render() {
|
|
456
|
+
return (h(Host, { key: '5625de672648fc737a3c463241621c96e3f5678c' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'c9bb829857daf1f38a07ba8d851a126b8e1014d0', htmlFor: this.startInputId }, h("slot", { key: '86daceb63a9467395bd576ee8e2a1fd335dab8a9', name: "label" }, this.label))), h("div", { key: 'a2f9fcfd6f201926d59b1542cfb6aecb9995bfe6', 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: 'c217e21c05160391608196c689a506332cdd2c6a', class: "track-container" }, h("div", { key: 'eff5a66ed65ca210e66138dfcf345843e4947fe9', 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, 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, 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: 'a1168d80e444702014631c51770f81bc66c42c7e', 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
|
+
this.description ||
|
|
458
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: 'f92bc3bba0d12897563532d18873ed00cd01107c', class: "description" }, this.success && (h("nv-icon", { key: 'bbe9253cf1a560d1e5e398cece3bdc1dc65c5edc', name: "circle-check", class: "validation", size: "md" })), h("slot", { key: '52396d459eca326fd6e0e1587e79c5b1ab0f8e74', name: "description" }, this.description))), (this.error ||
|
|
459
|
+
this.errorDescription ||
|
|
460
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '2da1fec9cf6c1c5a2f5c0aa16c18d4b45f0758d9', class: "error-description", hidden: !this.error }, this.error && (h("nv-icon", { key: '9b97a3cc6d56971b6dda8263316f83ea4e35d257', name: "alert-circle", class: "validation", size: "md" })), h("slot", { key: 'f2a96d286c53529ebee99606bee0c43f9ff21b74', name: "error-description" }, this.errorDescription)))));
|
|
461
|
+
}
|
|
462
|
+
static get is() { return "nv-fieldslider"; }
|
|
463
|
+
static get formAssociated() { return true; }
|
|
464
|
+
static get originalStyleUrls() {
|
|
465
|
+
return {
|
|
466
|
+
"$": ["styles/nv-fieldslider.scss"]
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
static get styleUrls() {
|
|
470
|
+
return {
|
|
471
|
+
"$": ["styles/nv-fieldslider.css"]
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
static get properties() {
|
|
475
|
+
return {
|
|
476
|
+
"startInputId": {
|
|
477
|
+
"type": "string",
|
|
478
|
+
"mutable": false,
|
|
479
|
+
"complexType": {
|
|
480
|
+
"original": "string",
|
|
481
|
+
"resolved": "string",
|
|
482
|
+
"references": {}
|
|
483
|
+
},
|
|
484
|
+
"required": false,
|
|
485
|
+
"optional": false,
|
|
486
|
+
"docs": {
|
|
487
|
+
"tags": [],
|
|
488
|
+
"text": "Sets the ID for the start input element and the for attribute of the associated\nlabel. If no ID is provided, a random one will be automatically generated."
|
|
489
|
+
},
|
|
490
|
+
"getter": false,
|
|
491
|
+
"setter": false,
|
|
492
|
+
"attribute": "start-input-id",
|
|
493
|
+
"reflect": true,
|
|
494
|
+
"defaultValue": "uuidv4()"
|
|
495
|
+
},
|
|
496
|
+
"endInputId": {
|
|
497
|
+
"type": "string",
|
|
498
|
+
"mutable": false,
|
|
499
|
+
"complexType": {
|
|
500
|
+
"original": "string",
|
|
501
|
+
"resolved": "string",
|
|
502
|
+
"references": {}
|
|
503
|
+
},
|
|
504
|
+
"required": false,
|
|
505
|
+
"optional": false,
|
|
506
|
+
"docs": {
|
|
507
|
+
"tags": [],
|
|
508
|
+
"text": "Sets the ID for the end input element and the for attribute of the associated\nlabel. If no ID is provided, a random one will be automatically generated."
|
|
509
|
+
},
|
|
510
|
+
"getter": false,
|
|
511
|
+
"setter": false,
|
|
512
|
+
"attribute": "end-input-id",
|
|
513
|
+
"reflect": true,
|
|
514
|
+
"defaultValue": "uuidv4()"
|
|
515
|
+
},
|
|
516
|
+
"label": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"mutable": false,
|
|
519
|
+
"complexType": {
|
|
520
|
+
"original": "string",
|
|
521
|
+
"resolved": "string",
|
|
522
|
+
"references": {}
|
|
523
|
+
},
|
|
524
|
+
"required": false,
|
|
525
|
+
"optional": false,
|
|
526
|
+
"docs": {
|
|
527
|
+
"tags": [],
|
|
528
|
+
"text": "Provides a textual description of the slider's function, helping users\nunderstand what the control adjusts. It also supports accessibility by\nserving as the accessible name for the component."
|
|
529
|
+
},
|
|
530
|
+
"getter": false,
|
|
531
|
+
"setter": false,
|
|
532
|
+
"attribute": "label",
|
|
533
|
+
"reflect": true
|
|
534
|
+
},
|
|
535
|
+
"hideLabel": {
|
|
536
|
+
"type": "boolean",
|
|
537
|
+
"mutable": false,
|
|
538
|
+
"complexType": {
|
|
539
|
+
"original": "boolean",
|
|
540
|
+
"resolved": "boolean",
|
|
541
|
+
"references": {}
|
|
542
|
+
},
|
|
543
|
+
"required": false,
|
|
544
|
+
"optional": false,
|
|
545
|
+
"docs": {
|
|
546
|
+
"tags": [],
|
|
547
|
+
"text": "Keeps the interface clean by removing visible labels, but still announces\nthe label to screen readers so users relying on assistive tech aren't left\nguessing."
|
|
548
|
+
},
|
|
549
|
+
"getter": false,
|
|
550
|
+
"setter": false,
|
|
551
|
+
"attribute": "hide-label",
|
|
552
|
+
"reflect": true,
|
|
553
|
+
"defaultValue": "false"
|
|
554
|
+
},
|
|
555
|
+
"description": {
|
|
556
|
+
"type": "string",
|
|
557
|
+
"mutable": false,
|
|
558
|
+
"complexType": {
|
|
559
|
+
"original": "string",
|
|
560
|
+
"resolved": "string",
|
|
561
|
+
"references": {}
|
|
562
|
+
},
|
|
563
|
+
"required": false,
|
|
564
|
+
"optional": false,
|
|
565
|
+
"docs": {
|
|
566
|
+
"tags": [],
|
|
567
|
+
"text": "Add helpful hints or extra information under the slider. This is where you\ncan clarify what users should enter or provide additional instructions,\nmaking the form easier to fill out correctly."
|
|
568
|
+
},
|
|
569
|
+
"getter": false,
|
|
570
|
+
"setter": false,
|
|
571
|
+
"attribute": "description",
|
|
572
|
+
"reflect": true
|
|
573
|
+
},
|
|
574
|
+
"hasField": {
|
|
575
|
+
"type": "boolean",
|
|
576
|
+
"mutable": false,
|
|
577
|
+
"complexType": {
|
|
578
|
+
"original": "boolean",
|
|
579
|
+
"resolved": "boolean",
|
|
580
|
+
"references": {}
|
|
581
|
+
},
|
|
582
|
+
"required": false,
|
|
583
|
+
"optional": false,
|
|
584
|
+
"docs": {
|
|
585
|
+
"tags": [],
|
|
586
|
+
"text": "Enables an optional numeric input field alongside the slider, allowing\nusers to type a value directly instead of\u2014or in addition to\u2014using the\nslider handle."
|
|
587
|
+
},
|
|
588
|
+
"getter": false,
|
|
589
|
+
"setter": false,
|
|
590
|
+
"attribute": "has-field",
|
|
591
|
+
"reflect": true,
|
|
592
|
+
"defaultValue": "false"
|
|
593
|
+
},
|
|
594
|
+
"range": {
|
|
595
|
+
"type": "boolean",
|
|
596
|
+
"mutable": false,
|
|
597
|
+
"complexType": {
|
|
598
|
+
"original": "boolean",
|
|
599
|
+
"resolved": "boolean",
|
|
600
|
+
"references": {}
|
|
601
|
+
},
|
|
602
|
+
"required": false,
|
|
603
|
+
"optional": false,
|
|
604
|
+
"docs": {
|
|
605
|
+
"tags": [],
|
|
606
|
+
"text": "Allows the slider to display two thumbs, enabling users to select a\ncontinuous range between a minimum and maximum value. Ideal for use cases\nlike filtering by price or time."
|
|
607
|
+
},
|
|
608
|
+
"getter": false,
|
|
609
|
+
"setter": false,
|
|
610
|
+
"attribute": "range",
|
|
611
|
+
"reflect": true,
|
|
612
|
+
"defaultValue": "false"
|
|
613
|
+
},
|
|
614
|
+
"disabled": {
|
|
615
|
+
"type": "boolean",
|
|
616
|
+
"mutable": false,
|
|
617
|
+
"complexType": {
|
|
618
|
+
"original": "boolean",
|
|
619
|
+
"resolved": "boolean",
|
|
620
|
+
"references": {}
|
|
621
|
+
},
|
|
622
|
+
"required": false,
|
|
623
|
+
"optional": false,
|
|
624
|
+
"docs": {
|
|
625
|
+
"tags": [],
|
|
626
|
+
"text": "Disables user interaction with the slider and its associated input fields."
|
|
627
|
+
},
|
|
628
|
+
"getter": false,
|
|
629
|
+
"setter": false,
|
|
630
|
+
"attribute": "disabled",
|
|
631
|
+
"reflect": true,
|
|
632
|
+
"defaultValue": "false"
|
|
633
|
+
},
|
|
634
|
+
"readonly": {
|
|
635
|
+
"type": "boolean",
|
|
636
|
+
"mutable": false,
|
|
637
|
+
"complexType": {
|
|
638
|
+
"original": "boolean",
|
|
639
|
+
"resolved": "boolean",
|
|
640
|
+
"references": {}
|
|
641
|
+
},
|
|
642
|
+
"required": false,
|
|
643
|
+
"optional": false,
|
|
644
|
+
"docs": {
|
|
645
|
+
"tags": [],
|
|
646
|
+
"text": "Makes the slider and input non-editable while keeping them focusable and\nincluded in form submissions."
|
|
647
|
+
},
|
|
648
|
+
"getter": false,
|
|
649
|
+
"setter": false,
|
|
650
|
+
"attribute": "readonly",
|
|
651
|
+
"reflect": true,
|
|
652
|
+
"defaultValue": "false"
|
|
653
|
+
},
|
|
654
|
+
"error": {
|
|
655
|
+
"type": "boolean",
|
|
656
|
+
"mutable": false,
|
|
657
|
+
"complexType": {
|
|
658
|
+
"original": "boolean",
|
|
659
|
+
"resolved": "boolean",
|
|
660
|
+
"references": {}
|
|
661
|
+
},
|
|
662
|
+
"required": false,
|
|
663
|
+
"optional": false,
|
|
664
|
+
"docs": {
|
|
665
|
+
"tags": [{
|
|
666
|
+
"name": "validator",
|
|
667
|
+
"text": "error"
|
|
668
|
+
}],
|
|
669
|
+
"text": "Alters the slider's appearance to indicate an error, helping users\nidentify fields that need correction."
|
|
670
|
+
},
|
|
671
|
+
"getter": false,
|
|
672
|
+
"setter": false,
|
|
673
|
+
"attribute": "error",
|
|
674
|
+
"reflect": true,
|
|
675
|
+
"defaultValue": "false"
|
|
676
|
+
},
|
|
677
|
+
"errorDescription": {
|
|
678
|
+
"type": "string",
|
|
679
|
+
"mutable": false,
|
|
680
|
+
"complexType": {
|
|
681
|
+
"original": "string",
|
|
682
|
+
"resolved": "string",
|
|
683
|
+
"references": {}
|
|
684
|
+
},
|
|
685
|
+
"required": false,
|
|
686
|
+
"optional": false,
|
|
687
|
+
"docs": {
|
|
688
|
+
"tags": [{
|
|
689
|
+
"name": "validator",
|
|
690
|
+
"text": "message"
|
|
691
|
+
}],
|
|
692
|
+
"text": "A description that appears when there is an error related to the slider."
|
|
693
|
+
},
|
|
694
|
+
"getter": false,
|
|
695
|
+
"setter": false,
|
|
696
|
+
"attribute": "error-description",
|
|
697
|
+
"reflect": true
|
|
698
|
+
},
|
|
699
|
+
"success": {
|
|
700
|
+
"type": "boolean",
|
|
701
|
+
"mutable": false,
|
|
702
|
+
"complexType": {
|
|
703
|
+
"original": "boolean",
|
|
704
|
+
"resolved": "boolean",
|
|
705
|
+
"references": {}
|
|
706
|
+
},
|
|
707
|
+
"required": false,
|
|
708
|
+
"optional": false,
|
|
709
|
+
"docs": {
|
|
710
|
+
"tags": [],
|
|
711
|
+
"text": "Changes the slider's appearance to indicate successful input or validation."
|
|
712
|
+
},
|
|
713
|
+
"getter": false,
|
|
714
|
+
"setter": false,
|
|
715
|
+
"attribute": "success",
|
|
716
|
+
"reflect": true,
|
|
717
|
+
"defaultValue": "false"
|
|
718
|
+
},
|
|
719
|
+
"value": {
|
|
720
|
+
"type": "unknown",
|
|
721
|
+
"mutable": true,
|
|
722
|
+
"complexType": {
|
|
723
|
+
"original": "number[]",
|
|
724
|
+
"resolved": "number[]",
|
|
725
|
+
"references": {}
|
|
726
|
+
},
|
|
727
|
+
"required": false,
|
|
728
|
+
"optional": false,
|
|
729
|
+
"docs": {
|
|
730
|
+
"tags": [],
|
|
731
|
+
"text": "Numeric value of the slider as an array of numbers. When in single mode,\nthe value should be a an array of one number. When in range mode, the value\nshould be an array of two numbers."
|
|
732
|
+
},
|
|
733
|
+
"getter": false,
|
|
734
|
+
"setter": false,
|
|
735
|
+
"defaultValue": "[0, 0]"
|
|
736
|
+
},
|
|
737
|
+
"step": {
|
|
738
|
+
"type": "number",
|
|
739
|
+
"mutable": false,
|
|
740
|
+
"complexType": {
|
|
741
|
+
"original": "number",
|
|
742
|
+
"resolved": "number",
|
|
743
|
+
"references": {}
|
|
744
|
+
},
|
|
745
|
+
"required": false,
|
|
746
|
+
"optional": false,
|
|
747
|
+
"docs": {
|
|
748
|
+
"tags": [],
|
|
749
|
+
"text": "Defines the interval between selectable values on the slider. Controls how\nmuch the value increases or decreases with each keyboard interaction, drag\nmovement, or direct input."
|
|
750
|
+
},
|
|
751
|
+
"getter": false,
|
|
752
|
+
"setter": false,
|
|
753
|
+
"attribute": "step",
|
|
754
|
+
"reflect": true,
|
|
755
|
+
"defaultValue": "1"
|
|
756
|
+
},
|
|
757
|
+
"snap": {
|
|
758
|
+
"type": "boolean",
|
|
759
|
+
"mutable": false,
|
|
760
|
+
"complexType": {
|
|
761
|
+
"original": "boolean",
|
|
762
|
+
"resolved": "boolean",
|
|
763
|
+
"references": {}
|
|
764
|
+
},
|
|
765
|
+
"required": false,
|
|
766
|
+
"optional": false,
|
|
767
|
+
"docs": {
|
|
768
|
+
"tags": [],
|
|
769
|
+
"text": "Controls whether the slider handle should visually snap to step values\nduring dragging. When false, the handle can be positioned at any point\nalong the track while dragging, but the actual value will still snap to the\nnearest step value. When true, the handle will visually snap to the nearest\nstep value during dragging."
|
|
770
|
+
},
|
|
771
|
+
"getter": false,
|
|
772
|
+
"setter": false,
|
|
773
|
+
"attribute": "snap",
|
|
774
|
+
"reflect": true,
|
|
775
|
+
"defaultValue": "false"
|
|
776
|
+
},
|
|
777
|
+
"snapTicks": {
|
|
778
|
+
"type": "boolean",
|
|
779
|
+
"mutable": false,
|
|
780
|
+
"complexType": {
|
|
781
|
+
"original": "boolean",
|
|
782
|
+
"resolved": "boolean",
|
|
783
|
+
"references": {}
|
|
784
|
+
},
|
|
785
|
+
"required": false,
|
|
786
|
+
"optional": false,
|
|
787
|
+
"docs": {
|
|
788
|
+
"tags": [],
|
|
789
|
+
"text": "When true and custom ticks are provided, the slider will snap to the nearest\ntick value during dragging, instead of using the step value. This is useful\nwhen you have custom ticks at specific values that don't align with regular step intervals."
|
|
790
|
+
},
|
|
791
|
+
"getter": false,
|
|
792
|
+
"setter": false,
|
|
793
|
+
"attribute": "snap-ticks",
|
|
794
|
+
"reflect": true,
|
|
795
|
+
"defaultValue": "false"
|
|
796
|
+
},
|
|
797
|
+
"name": {
|
|
798
|
+
"type": "string",
|
|
799
|
+
"mutable": false,
|
|
800
|
+
"complexType": {
|
|
801
|
+
"original": "string",
|
|
802
|
+
"resolved": "string",
|
|
803
|
+
"references": {}
|
|
804
|
+
},
|
|
805
|
+
"required": false,
|
|
806
|
+
"optional": false,
|
|
807
|
+
"docs": {
|
|
808
|
+
"tags": [],
|
|
809
|
+
"text": "Name attribute for the form input element. Required for form submission.\nFor range sliders, this will be used for the start value input and add -end\nto the end input name."
|
|
810
|
+
},
|
|
811
|
+
"getter": false,
|
|
812
|
+
"setter": false,
|
|
813
|
+
"attribute": "name",
|
|
814
|
+
"reflect": true
|
|
815
|
+
},
|
|
816
|
+
"endName": {
|
|
817
|
+
"type": "string",
|
|
818
|
+
"mutable": false,
|
|
819
|
+
"complexType": {
|
|
820
|
+
"original": "string",
|
|
821
|
+
"resolved": "string",
|
|
822
|
+
"references": {}
|
|
823
|
+
},
|
|
824
|
+
"required": false,
|
|
825
|
+
"optional": false,
|
|
826
|
+
"docs": {
|
|
827
|
+
"tags": [],
|
|
828
|
+
"text": "Name attribute for the end value input when using range mode.\nIf not provided, the name attribute will be used with '-end' appended."
|
|
829
|
+
},
|
|
830
|
+
"getter": false,
|
|
831
|
+
"setter": false,
|
|
832
|
+
"attribute": "end-name",
|
|
833
|
+
"reflect": true
|
|
834
|
+
},
|
|
835
|
+
"min": {
|
|
836
|
+
"type": "number",
|
|
837
|
+
"mutable": false,
|
|
838
|
+
"complexType": {
|
|
839
|
+
"original": "number",
|
|
840
|
+
"resolved": "number",
|
|
841
|
+
"references": {}
|
|
842
|
+
},
|
|
843
|
+
"required": false,
|
|
844
|
+
"optional": false,
|
|
845
|
+
"docs": {
|
|
846
|
+
"tags": [],
|
|
847
|
+
"text": "Defines the minimum allowed value for the slider. The thumb cannot move\nbelow this value, and manual input is also constrained accordingly."
|
|
848
|
+
},
|
|
849
|
+
"getter": false,
|
|
850
|
+
"setter": false,
|
|
851
|
+
"attribute": "min",
|
|
852
|
+
"reflect": true,
|
|
853
|
+
"defaultValue": "0"
|
|
854
|
+
},
|
|
855
|
+
"max": {
|
|
856
|
+
"type": "number",
|
|
857
|
+
"mutable": false,
|
|
858
|
+
"complexType": {
|
|
859
|
+
"original": "number",
|
|
860
|
+
"resolved": "number",
|
|
861
|
+
"references": {}
|
|
862
|
+
},
|
|
863
|
+
"required": false,
|
|
864
|
+
"optional": false,
|
|
865
|
+
"docs": {
|
|
866
|
+
"tags": [],
|
|
867
|
+
"text": "Defines the maximum allowed value for the slider. The thumb cannot move\nabove this value, and manual input is also constrained accordingly."
|
|
868
|
+
},
|
|
869
|
+
"getter": false,
|
|
870
|
+
"setter": false,
|
|
871
|
+
"attribute": "max",
|
|
872
|
+
"reflect": true,
|
|
873
|
+
"defaultValue": "100"
|
|
874
|
+
},
|
|
875
|
+
"showTicks": {
|
|
876
|
+
"type": "boolean",
|
|
877
|
+
"mutable": false,
|
|
878
|
+
"complexType": {
|
|
879
|
+
"original": "boolean",
|
|
880
|
+
"resolved": "boolean",
|
|
881
|
+
"references": {}
|
|
882
|
+
},
|
|
883
|
+
"required": false,
|
|
884
|
+
"optional": false,
|
|
885
|
+
"docs": {
|
|
886
|
+
"tags": [],
|
|
887
|
+
"text": "Controls the visibility of tick marks on the slider. When enabled, all\nvisual ticks that indicate step points along the track are shown. If custom\nticks are provided, they are always shown regardless of this setting."
|
|
888
|
+
},
|
|
889
|
+
"getter": false,
|
|
890
|
+
"setter": false,
|
|
891
|
+
"attribute": "show-ticks",
|
|
892
|
+
"reflect": true,
|
|
893
|
+
"defaultValue": "false"
|
|
894
|
+
},
|
|
895
|
+
"ticks": {
|
|
896
|
+
"type": "unknown",
|
|
897
|
+
"mutable": false,
|
|
898
|
+
"complexType": {
|
|
899
|
+
"original": "{\n /** The numeric value of the tick */\n value: number;\n /** The label of the tick */\n label?: string;\n }[]",
|
|
900
|
+
"resolved": "{ value: number; label?: string; }[]",
|
|
901
|
+
"references": {}
|
|
902
|
+
},
|
|
903
|
+
"required": false,
|
|
904
|
+
"optional": false,
|
|
905
|
+
"docs": {
|
|
906
|
+
"tags": [],
|
|
907
|
+
"text": "Allows you to specify custom tick marks at specific values along the\nslider. Each tick can optionally display a label to provide additional\ncontext or guidance for users."
|
|
908
|
+
},
|
|
909
|
+
"getter": false,
|
|
910
|
+
"setter": false
|
|
911
|
+
},
|
|
912
|
+
"fluid": {
|
|
913
|
+
"type": "boolean",
|
|
914
|
+
"mutable": false,
|
|
915
|
+
"complexType": {
|
|
916
|
+
"original": "boolean",
|
|
917
|
+
"resolved": "boolean",
|
|
918
|
+
"references": {}
|
|
919
|
+
},
|
|
920
|
+
"required": false,
|
|
921
|
+
"optional": false,
|
|
922
|
+
"docs": {
|
|
923
|
+
"tags": [],
|
|
924
|
+
"text": "Allows the field to stretch and fill the entire width of its container."
|
|
925
|
+
},
|
|
926
|
+
"getter": false,
|
|
927
|
+
"setter": false,
|
|
928
|
+
"attribute": "fluid",
|
|
929
|
+
"reflect": true,
|
|
930
|
+
"defaultValue": "false"
|
|
931
|
+
},
|
|
932
|
+
"labelBeforeValue": {
|
|
933
|
+
"type": "string",
|
|
934
|
+
"mutable": false,
|
|
935
|
+
"complexType": {
|
|
936
|
+
"original": "string",
|
|
937
|
+
"resolved": "string",
|
|
938
|
+
"references": {}
|
|
939
|
+
},
|
|
940
|
+
"required": false,
|
|
941
|
+
"optional": false,
|
|
942
|
+
"docs": {
|
|
943
|
+
"tags": [],
|
|
944
|
+
"text": "Use this to automatically show a label, like \u201C~\u201D for approximate values,\nbefore the slider\u2019s value in the tooltip or input, giving users quick\ncontext about the number."
|
|
945
|
+
},
|
|
946
|
+
"getter": false,
|
|
947
|
+
"setter": false,
|
|
948
|
+
"attribute": "label-before-value",
|
|
949
|
+
"reflect": true
|
|
950
|
+
},
|
|
951
|
+
"labelAfterValue": {
|
|
952
|
+
"type": "string",
|
|
953
|
+
"mutable": false,
|
|
954
|
+
"complexType": {
|
|
955
|
+
"original": "string",
|
|
956
|
+
"resolved": "string",
|
|
957
|
+
"references": {}
|
|
958
|
+
},
|
|
959
|
+
"required": false,
|
|
960
|
+
"optional": false,
|
|
961
|
+
"docs": {
|
|
962
|
+
"tags": [],
|
|
963
|
+
"text": "Use this to automatically show a label, like \u201C$\u201D or \u201Ckg,\u201D after the value\non the slider\u2019s tooltip or input, helping users better understand the\nnumber."
|
|
964
|
+
},
|
|
965
|
+
"getter": false,
|
|
966
|
+
"setter": false,
|
|
967
|
+
"attribute": "label-after-value",
|
|
968
|
+
"reflect": true
|
|
969
|
+
}
|
|
970
|
+
};
|
|
971
|
+
}
|
|
972
|
+
static get states() {
|
|
973
|
+
return {
|
|
974
|
+
"isDragging": {},
|
|
975
|
+
"activeDragThumb": {},
|
|
976
|
+
"internalTicks": {},
|
|
977
|
+
"rawPosition": {},
|
|
978
|
+
"rawRangePosition": {},
|
|
979
|
+
"valueInternal": {},
|
|
980
|
+
"rangeValueInternal": {}
|
|
981
|
+
};
|
|
982
|
+
}
|
|
983
|
+
static get events() {
|
|
984
|
+
return [{
|
|
985
|
+
"method": "valueChanged",
|
|
986
|
+
"name": "valueChanged",
|
|
987
|
+
"bubbles": true,
|
|
988
|
+
"cancelable": true,
|
|
989
|
+
"composed": true,
|
|
990
|
+
"docs": {
|
|
991
|
+
"tags": [{
|
|
992
|
+
"name": "bind",
|
|
993
|
+
"text": "value"
|
|
994
|
+
}],
|
|
995
|
+
"text": "Emitted when the slider values change."
|
|
996
|
+
},
|
|
997
|
+
"complexType": {
|
|
998
|
+
"original": "number[]",
|
|
999
|
+
"resolved": "number[]",
|
|
1000
|
+
"references": {}
|
|
1001
|
+
}
|
|
1002
|
+
}];
|
|
1003
|
+
}
|
|
1004
|
+
static get elementRef() { return "el"; }
|
|
1005
|
+
static get watchers() {
|
|
1006
|
+
return [{
|
|
1007
|
+
"propName": "value",
|
|
1008
|
+
"methodName": "onValueChange"
|
|
1009
|
+
}, {
|
|
1010
|
+
"propName": "min",
|
|
1011
|
+
"methodName": "onConfigChange"
|
|
1012
|
+
}, {
|
|
1013
|
+
"propName": "max",
|
|
1014
|
+
"methodName": "onConfigChange"
|
|
1015
|
+
}, {
|
|
1016
|
+
"propName": "step",
|
|
1017
|
+
"methodName": "onConfigChange"
|
|
1018
|
+
}, {
|
|
1019
|
+
"propName": "ticks",
|
|
1020
|
+
"methodName": "onConfigChange"
|
|
1021
|
+
}, {
|
|
1022
|
+
"propName": "showTicks",
|
|
1023
|
+
"methodName": "onConfigChange"
|
|
1024
|
+
}, {
|
|
1025
|
+
"propName": "snap",
|
|
1026
|
+
"methodName": "onConfigChange"
|
|
1027
|
+
}, {
|
|
1028
|
+
"propName": "snapTicks",
|
|
1029
|
+
"methodName": "onConfigChange"
|
|
1030
|
+
}, {
|
|
1031
|
+
"propName": "range",
|
|
1032
|
+
"methodName": "onRangeChange"
|
|
1033
|
+
}];
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
//# sourceMappingURL=nv-fieldslider.js.map
|