@nova-design-system/nova-webcomponents 3.11.0 → 3.13.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/collapse.animation-47397763.js +218 -0
- package/dist/cjs/collapse.animation-47397763.js.map +1 -0
- package/dist/cjs/{constants-3b6beb66.js → constants-52f6f8e9.js} +24 -42
- package/dist/cjs/constants-52f6f8e9.js.map +1 -0
- package/dist/cjs/fade.animation-cf6eba0d.js +726 -0
- package/dist/cjs/fade.animation-cf6eba0d.js.map +1 -0
- package/dist/cjs/{grow.animation-6d003803.js → grow.animation-9258ba63.js} +6 -5
- package/dist/cjs/grow.animation-9258ba63.js.map +1 -0
- package/dist/cjs/index-c56424e5.js +4 -0
- package/dist/cjs/index.cjs.js +114 -13
- 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 +72 -38
- package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-accordion.cjs.entry.js +79 -65
- package/dist/cjs/nv-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +12 -12
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +5 -5
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +2 -2
- package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +14 -10
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagrid.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 +9 -6
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1 -31
- 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 +1 -1
- 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-fieldradio.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldslider.cjs.entry.js +24 -16
- package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-notification.cjs.entry.js +120 -0
- package/dist/cjs/nv-notification.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-popover.cjs.entry.js +24 -7
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
- package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-togglebutton.cjs.entry.js +2 -2
- package/dist/cjs/nv-togglebutton.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +11 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/slide.animation-bedfc827.js +70 -0
- package/dist/cjs/slide.animation-bedfc827.js.map +1 -0
- package/dist/cjs/{stylefire.es-717e022a.js → style-value-types.es-eea2f16f.js} +51 -696
- package/dist/cjs/style-value-types.es-eea2f16f.js.map +1 -0
- package/dist/cjs/{timeline.animation-155e8839.js → timeline.animation-2878afb6.js} +20 -1
- package/dist/cjs/timeline.animation-2878afb6.js.map +1 -0
- package/dist/collection/animations/collapse.animation.js +110 -50
- package/dist/collection/animations/collapse.animation.js.map +1 -1
- package/dist/collection/animations/index.js +1 -0
- package/dist/collection/animations/index.js.map +1 -1
- package/dist/collection/animations/slide.animation.js +65 -0
- package/dist/collection/animations/slide.animation.js.map +1 -0
- package/dist/collection/animations/timeline.animation.js +19 -1
- package/dist/collection/animations/timeline.animation.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js +78 -20
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js.map +1 -1
- package/dist/collection/components/nv-accordion/nv-accordion.js +88 -68
- package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -1
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +70 -36
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -1
- package/dist/collection/components/nv-accordion-item/styles/nv-accordion-item.css +3 -0
- package/dist/collection/components/nv-alert/nv-alert.css +1 -6
- package/dist/collection/components/nv-alert/nv-alert.js +6 -6
- package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.css +0 -21
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.css +0 -2
- package/dist/collection/components/nv-button/styles/nv-button.css +0 -8
- package/dist/collection/components/nv-calendar/nv-calendar.css +4 -0
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js +14 -0
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.js +47 -3
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/partials/calendar-actions.js +2 -2
- package/dist/collection/components/nv-calendar/partials/calendar-actions.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.css +0 -1
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +8 -0
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +13 -11
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js.map +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +0 -1
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +4 -0
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +6 -0
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +4 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +0 -30
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +4 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +8 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +4 -0
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.css +0 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +6 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +0 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +10 -10
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/partials/field-input.js +13 -5
- package/dist/collection/components/nv-fieldslider/partials/field-input.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +27 -0
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +0 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +4 -0
- package/dist/collection/components/nv-icon/nv-icons.js +5 -5
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +0 -4
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- package/dist/collection/components/nv-notification/nv-notification.docs.js +72 -0
- package/dist/collection/components/nv-notification/nv-notification.docs.js.map +1 -0
- package/dist/collection/components/nv-notification/nv-notification.js +333 -0
- package/dist/collection/components/nv-notification/nv-notification.js.map +1 -0
- package/dist/collection/components/nv-notification/styles/nv-notification.css +155 -0
- package/dist/collection/components/nv-popover/nv-popover.css +7 -0
- package/dist/collection/components/nv-popover/nv-popover.docs.js +4 -0
- package/dist/collection/components/nv-popover/nv-popover.docs.js.map +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +47 -2
- package/dist/collection/components/nv-popover/nv-popover.js.map +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.css +0 -1
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
- package/dist/collection/components/nv-togglebutton/styles/nv-togglebutton.css +3 -2
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +0 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js +5 -0
- package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js.map +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +38 -3
- package/dist/collection/components/nv-tooltip/nv-tooltip.js.map +1 -1
- package/dist/collection/index.js +10 -2
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/constants.js +5 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/components/index.js +14 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +88 -71
- package/dist/components/nv-accordion.js.map +1 -1
- package/dist/components/nv-alert.js +13 -13
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +3 -3
- package/dist/components/nv-breadcrumb.js.map +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-datagrid.js +4 -4
- package/dist/components/nv-datagrid.js.map +1 -1
- 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 +6 -6
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +6 -6
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +5 -5
- 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 +7 -37
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +3 -3
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +1 -1
- package/dist/components/nv-fieldradio.js.map +1 -1
- package/dist/components/nv-fieldselect.js +3 -3
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldslider.js +27 -19
- package/dist/components/nv-fieldslider.js.map +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtime.js +5 -5
- 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-menu.js +3 -3
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-notification.d.ts +11 -0
- package/dist/components/nv-notification.js +150 -0
- package/dist/components/nv-notification.js.map +1 -0
- 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 +3 -3
- package/dist/components/nv-toggle.js.map +1 -1
- package/dist/components/nv-togglebutton.js +2 -2
- package/dist/components/nv-togglebutton.js.map +1 -1
- package/dist/components/nv-togglebuttongroup.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-0ffb4785.js → p-0b5816f7.js} +2 -2
- package/dist/components/{p-0ffb4785.js.map → p-0b5816f7.js.map} +1 -1
- package/dist/components/{p-a5002d14.js → p-1172e9bb.js} +2 -2
- package/dist/components/{p-a5002d14.js.map → p-1172e9bb.js.map} +1 -1
- package/dist/components/{p-a3ddec4c.js → p-2277cfc8.js} +7 -24
- package/dist/components/p-2277cfc8.js.map +1 -0
- package/dist/components/{p-b659b999.js → p-2854cf01.js} +2 -2
- package/dist/components/{p-b659b999.js.map → p-2854cf01.js.map} +1 -1
- package/dist/components/{p-cf06032d.js → p-2de17259.js} +3 -3
- package/dist/components/{p-cf06032d.js.map → p-2de17259.js.map} +1 -1
- package/dist/components/p-31591941.js +216 -0
- package/dist/components/p-31591941.js.map +1 -0
- package/dist/components/{p-09cdd71f.js → p-42ea6b74.js} +34 -688
- package/dist/components/p-42ea6b74.js.map +1 -0
- package/dist/components/{p-50d0db7b.js → p-5073bfd6.js} +3 -3
- package/dist/components/{p-50d0db7b.js.map → p-5073bfd6.js.map} +1 -1
- package/dist/components/{p-195f46f3.js → p-60244646.js} +28 -9
- package/dist/components/p-60244646.js.map +1 -0
- package/dist/components/{p-8aee1010.js → p-68fa3890.js} +17 -11
- package/dist/components/p-68fa3890.js.map +1 -0
- package/dist/components/{p-2db5d1ab.js → p-89ac047e.js} +5 -5
- package/dist/components/p-89ac047e.js.map +1 -0
- package/dist/components/{p-1bb737fa.js → p-99a55bc4.js} +2 -2
- package/dist/components/{p-1bb737fa.js.map → p-99a55bc4.js.map} +1 -1
- package/dist/{esm/timeline.animation-adf35ecb.js → components/p-a52cd849.js} +20 -2
- package/dist/components/p-a52cd849.js.map +1 -0
- package/dist/components/{p-45a625fb.js → p-a9dc0824.js} +13 -10
- package/dist/components/p-a9dc0824.js.map +1 -0
- package/dist/components/{p-ec4558aa.js → p-ac91582e.js} +2 -2
- package/dist/components/{p-ec4558aa.js.map → p-ac91582e.js.map} +1 -1
- package/dist/components/p-ca38a8a9.js +88 -0
- package/dist/components/p-ca38a8a9.js.map +1 -0
- package/dist/components/{p-9fdaea9a.js → p-ddd0a394.js} +75 -41
- package/dist/components/p-ddd0a394.js.map +1 -0
- package/dist/components/p-e4ac8333.js +189 -0
- package/dist/components/{p-8011513c.js.map → p-e4ac8333.js.map} +1 -1
- package/dist/components/{p-32e8e42e.js → p-e6c04562.js} +2 -2
- package/dist/components/{p-32e8e42e.js.map → p-e6c04562.js.map} +1 -1
- package/dist/components/{p-f47a1e1e.js → p-eb443b26.js} +15 -5
- package/dist/components/p-eb443b26.js.map +1 -0
- package/dist/components/p-eda2f9f3.js +68 -0
- package/dist/components/p-eda2f9f3.js.map +1 -0
- package/dist/components/p-ee0df37f.js +723 -0
- package/dist/components/p-ee0df37f.js.map +1 -0
- package/dist/components/{p-8d45dbfe.js → p-fb560fa3.js} +3 -2
- package/dist/components/p-fb560fa3.js.map +1 -0
- package/dist/esm/collapse.animation-acda1bf5.js +216 -0
- package/dist/esm/collapse.animation-acda1bf5.js.map +1 -0
- package/dist/esm/{constants-23aaef7b.js → constants-d0f19e7b.js} +7 -24
- package/dist/esm/constants-d0f19e7b.js.map +1 -0
- package/dist/esm/fade.animation-eb454088.js +723 -0
- package/dist/esm/fade.animation-eb454088.js.map +1 -0
- package/dist/esm/{grow.animation-f7b26024.js → grow.animation-5b2abb3a.js} +3 -2
- package/dist/esm/grow.animation-5b2abb3a.js.map +1 -0
- package/dist/esm/index-a1936cd0.js +4 -0
- package/dist/esm/index.js +15 -12
- 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 +72 -38
- package/dist/esm/nv-accordion-item.entry.js.map +1 -1
- package/dist/esm/nv-accordion.entry.js +80 -66
- package/dist/esm/nv-accordion.entry.js.map +1 -1
- package/dist/esm/nv-alert.entry.js +12 -12
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +5 -5
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumb.entry.js.map +1 -1
- package/dist/esm/nv-button.entry.js +2 -2
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-calendar.entry.js +14 -10
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-datagrid.entry.js +2 -2
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +9 -6
- package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddate.entry.js +1 -1
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +1 -1
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +1 -1
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +1 -31
- 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 +1 -1
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +1 -1
- package/dist/esm/nv-fieldradio.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +1 -1
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldslider.entry.js +24 -16
- package/dist/esm/nv-fieldslider.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js.map +1 -1
- package/dist/esm/nv-notification.entry.js +116 -0
- package/dist/esm/nv-notification.entry.js.map +1 -0
- package/dist/esm/nv-popover.entry.js +24 -7
- package/dist/esm/nv-popover.entry.js.map +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-toggle.entry.js +3 -3
- package/dist/esm/nv-toggle.entry.js.map +1 -1
- package/dist/esm/nv-togglebutton.entry.js +2 -2
- package/dist/esm/nv-togglebutton.entry.js.map +1 -1
- package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
- package/dist/esm/nv-tooltip.entry.js +11 -2
- package/dist/esm/nv-tooltip.entry.js.map +1 -1
- package/dist/esm/slide.animation-f444aa0b.js +68 -0
- package/dist/esm/slide.animation-f444aa0b.js.map +1 -0
- package/dist/esm/{stylefire.es-74da334a.js → style-value-types.es-f5d10b79.js} +34 -688
- package/dist/esm/style-value-types.es-f5d10b79.js.map +1 -0
- package/dist/esm/timeline.animation-79215cd4.js +41 -0
- package/dist/esm/timeline.animation-79215cd4.js.map +1 -0
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/p-08582c21.entry.js +2 -0
- package/dist/native/p-08582c21.entry.js.map +1 -0
- package/dist/native/p-0a99c6fb.entry.js +2 -0
- package/dist/native/p-0a99c6fb.entry.js.map +1 -0
- package/dist/native/p-0e488b3d.entry.js +2 -0
- package/dist/native/p-0e488b3d.entry.js.map +1 -0
- package/dist/native/p-1ad1bff9.entry.js +2 -0
- package/dist/native/{p-0ef94dae.entry.js.map → p-1ad1bff9.entry.js.map} +1 -1
- package/dist/native/{p-aacd8789.entry.js → p-1f01fb64.entry.js} +2 -2
- package/dist/native/p-225a05bf.entry.js +2 -0
- package/dist/native/{p-fb672f90.entry.js.map → p-225a05bf.entry.js.map} +1 -1
- package/dist/native/p-2277cfc8.js +2 -0
- package/dist/native/p-2277cfc8.js.map +1 -0
- package/dist/native/p-25f2ce81.entry.js +2 -0
- package/dist/native/{p-7f0d576b.entry.js → p-2781637d.entry.js} +2 -2
- package/dist/native/{p-7f0d576b.entry.js.map → p-2781637d.entry.js.map} +1 -1
- package/dist/native/{p-681f2bac.entry.js → p-29f68e07.entry.js} +2 -2
- package/dist/native/p-29f68e07.entry.js.map +1 -0
- package/dist/native/p-31591941.js +2 -0
- package/dist/native/p-31591941.js.map +1 -0
- package/dist/native/p-33f503c5.entry.js +2 -0
- package/dist/native/p-33f503c5.entry.js.map +1 -0
- package/dist/native/{p-43071c3b.entry.js → p-3784efdc.entry.js} +2 -2
- package/dist/native/p-3f861ddc.entry.js +2 -0
- package/dist/native/p-3f861ddc.entry.js.map +1 -0
- package/dist/native/p-40c4a221.entry.js +2 -0
- package/dist/native/{p-9991116a.entry.js.map → p-40c4a221.entry.js.map} +1 -1
- package/dist/native/p-42ea6b74.js +16 -0
- package/dist/native/p-42ea6b74.js.map +1 -0
- package/dist/native/p-52b8c872.entry.js +2 -0
- package/dist/native/{p-397c0fca.entry.js.map → p-52b8c872.entry.js.map} +1 -1
- package/dist/native/{p-9f451b8a.entry.js → p-5a43fe48.entry.js} +3 -3
- package/dist/native/{p-9f451b8a.entry.js.map → p-5a43fe48.entry.js.map} +1 -1
- package/dist/native/{p-676447d7.entry.js → p-788e9ee5.entry.js} +3 -3
- package/dist/native/{p-f033c4ce.entry.js → p-7bbcf477.entry.js} +2 -2
- package/dist/native/p-8c823928.entry.js +2 -0
- package/dist/native/p-8c823928.entry.js.map +1 -0
- package/dist/native/p-9a46baa9.entry.js +2 -0
- package/dist/native/p-9a46baa9.entry.js.map +1 -0
- package/dist/native/p-a34beedf.entry.js +2 -0
- package/dist/native/p-a34beedf.entry.js.map +1 -0
- package/dist/native/p-a52cd849.js +2 -0
- package/dist/native/p-a52cd849.js.map +1 -0
- package/dist/native/p-bb71a17f.entry.js +2 -0
- package/dist/native/{p-ba9906b7.entry.js.map → p-bb71a17f.entry.js.map} +1 -1
- package/dist/native/p-bc01787b.entry.js +2 -0
- package/dist/native/{p-ad2cc829.entry.js.map → p-bc01787b.entry.js.map} +1 -1
- package/dist/native/p-cea942b9.entry.js +2 -0
- package/dist/native/{p-3ed84cd9.entry.js.map → p-cea942b9.entry.js.map} +1 -1
- package/dist/native/p-cfd5785e.entry.js +2 -0
- package/dist/native/p-cfd5785e.entry.js.map +1 -0
- package/dist/native/p-d0ef1bbb.entry.js +2 -0
- package/dist/native/p-d0ef1bbb.entry.js.map +1 -0
- package/dist/native/p-d88c416f.entry.js +2 -0
- package/dist/native/{p-2197ffdf.entry.js.map → p-d88c416f.entry.js.map} +1 -1
- package/dist/native/p-d95ee31e.entry.js +2 -0
- package/dist/native/{p-44dd9a4c.entry.js.map → p-d95ee31e.entry.js.map} +1 -1
- package/dist/native/p-da2c7d3c.entry.js +2 -0
- package/dist/native/p-da2c7d3c.entry.js.map +1 -0
- package/dist/native/p-e765a624.entry.js +2 -0
- package/dist/native/{p-184032cb.entry.js.map → p-e765a624.entry.js.map} +1 -1
- package/dist/native/p-eda2f9f3.js +2 -0
- package/dist/native/p-eda2f9f3.js.map +1 -0
- package/dist/native/p-ee0df37f.js +2 -0
- package/dist/native/p-ee0df37f.js.map +1 -0
- package/dist/native/p-ee516944.entry.js +2 -0
- package/dist/native/p-ee516944.entry.js.map +1 -0
- package/dist/native/p-f0cbfb3d.entry.js +2 -0
- package/dist/native/{p-b58fb522.entry.js.map → p-f0cbfb3d.entry.js.map} +1 -1
- package/dist/native/p-f5120223.entry.js +2 -0
- package/dist/native/p-f5120223.entry.js.map +1 -0
- package/dist/native/{p-2d647761.entry.js → p-f5eb047e.entry.js} +2 -2
- package/dist/native/p-fb560fa3.js +2 -0
- package/dist/native/{p-8d45dbfe.js.map → p-fb560fa3.js.map} +1 -1
- package/dist/types/animations/collapse.animation.d.ts +10 -2
- package/dist/types/animations/index.d.ts +1 -0
- package/dist/types/animations/slide.animation.d.ts +11 -0
- package/dist/types/animations/timeline.animation.d.ts +17 -1
- package/dist/types/components/nv-accordion/nv-accordion.d.ts +5 -7
- package/dist/types/components/nv-accordion-item/nv-accordion-item.d.ts +23 -8
- package/dist/types/components/nv-alert/nv-alert.d.ts +1 -1
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +4 -0
- package/dist/types/components/nv-calendar/partials/calendar-actions.d.ts +4 -0
- package/dist/types/components/nv-dialogfooter/nv-dialogfooter.d.ts +8 -4
- package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +3 -2
- package/dist/types/components/nv-fieldslider/partials/field-input.d.ts +7 -3
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-notification/nv-notification.d.ts +75 -0
- package/dist/types/components/nv-notification/nv-notification.docs.d.ts +4 -0
- package/dist/types/components/nv-popover/nv-popover.d.ts +11 -1
- package/dist/types/components/nv-tooltip/nv-tooltip.d.ts +11 -2
- package/dist/types/components.d.ts +162 -13
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nova-docs.d.ts +6 -0
- package/dist/types/utils/constants.d.ts +4 -0
- package/dist/vscode-data.json +117 -19
- package/hydrate/index.js +695 -288
- package/hydrate/index.mjs +695 -288
- package/package.json +9 -1
- package/readme.md +169 -42
- package/dist/cjs/collapse.animation-a129dc3f.js +0 -86
- package/dist/cjs/collapse.animation-a129dc3f.js.map +0 -1
- package/dist/cjs/constants-3b6beb66.js.map +0 -1
- package/dist/cjs/fade.animation-644b5c4d.js +0 -70
- package/dist/cjs/fade.animation-644b5c4d.js.map +0 -1
- package/dist/cjs/grow.animation-6d003803.js.map +0 -1
- package/dist/cjs/stylefire.es-717e022a.js.map +0 -1
- package/dist/cjs/timeline.animation-155e8839.js.map +0 -1
- package/dist/components/p-09cdd71f.js.map +0 -1
- package/dist/components/p-15aeab4d.js +0 -23
- package/dist/components/p-15aeab4d.js.map +0 -1
- package/dist/components/p-195f46f3.js.map +0 -1
- package/dist/components/p-1cbacdba.js +0 -68
- package/dist/components/p-1cbacdba.js.map +0 -1
- package/dist/components/p-2db5d1ab.js.map +0 -1
- package/dist/components/p-45a625fb.js.map +0 -1
- package/dist/components/p-8011513c.js +0 -189
- package/dist/components/p-8aee1010.js.map +0 -1
- package/dist/components/p-8d45dbfe.js.map +0 -1
- package/dist/components/p-9a263d0e.js +0 -84
- package/dist/components/p-9a263d0e.js.map +0 -1
- package/dist/components/p-9fdaea9a.js.map +0 -1
- package/dist/components/p-a1fe0a5d.js +0 -88
- package/dist/components/p-a1fe0a5d.js.map +0 -1
- package/dist/components/p-a3ddec4c.js.map +0 -1
- package/dist/components/p-f47a1e1e.js.map +0 -1
- package/dist/esm/collapse.animation-16e3af45.js +0 -84
- package/dist/esm/collapse.animation-16e3af45.js.map +0 -1
- package/dist/esm/constants-23aaef7b.js.map +0 -1
- package/dist/esm/fade.animation-71e8e34c.js +0 -68
- package/dist/esm/fade.animation-71e8e34c.js.map +0 -1
- package/dist/esm/grow.animation-f7b26024.js.map +0 -1
- package/dist/esm/stylefire.es-74da334a.js.map +0 -1
- package/dist/esm/timeline.animation-adf35ecb.js.map +0 -1
- package/dist/native/p-019d164d.entry.js +0 -2
- package/dist/native/p-019d164d.entry.js.map +0 -1
- package/dist/native/p-09cdd71f.js +0 -16
- package/dist/native/p-09cdd71f.js.map +0 -1
- package/dist/native/p-0da8f0d1.entry.js +0 -2
- package/dist/native/p-0da8f0d1.entry.js.map +0 -1
- package/dist/native/p-0ef94dae.entry.js +0 -2
- package/dist/native/p-15aeab4d.js +0 -2
- package/dist/native/p-15aeab4d.js.map +0 -1
- package/dist/native/p-184032cb.entry.js +0 -2
- package/dist/native/p-1cbacdba.js +0 -2
- package/dist/native/p-1cbacdba.js.map +0 -1
- package/dist/native/p-2197ffdf.entry.js +0 -2
- package/dist/native/p-348c6bb4.entry.js +0 -2
- package/dist/native/p-348c6bb4.entry.js.map +0 -1
- package/dist/native/p-397c0fca.entry.js +0 -2
- package/dist/native/p-3da64006.entry.js +0 -2
- package/dist/native/p-3da64006.entry.js.map +0 -1
- package/dist/native/p-3ed84cd9.entry.js +0 -2
- package/dist/native/p-3fcaac6d.entry.js +0 -2
- package/dist/native/p-3fcaac6d.entry.js.map +0 -1
- package/dist/native/p-4302824a.entry.js +0 -2
- package/dist/native/p-4302824a.entry.js.map +0 -1
- package/dist/native/p-44dd9a4c.entry.js +0 -2
- package/dist/native/p-4f4ed012.entry.js +0 -2
- package/dist/native/p-4f4ed012.entry.js.map +0 -1
- package/dist/native/p-553778e6.entry.js +0 -2
- package/dist/native/p-553778e6.entry.js.map +0 -1
- package/dist/native/p-62032cd9.entry.js +0 -2
- package/dist/native/p-62032cd9.entry.js.map +0 -1
- package/dist/native/p-681f2bac.entry.js.map +0 -1
- package/dist/native/p-7703c736.entry.js +0 -2
- package/dist/native/p-7703c736.entry.js.map +0 -1
- package/dist/native/p-888ad58e.entry.js +0 -2
- package/dist/native/p-888ad58e.entry.js.map +0 -1
- package/dist/native/p-8a577f91.entry.js +0 -2
- package/dist/native/p-8a577f91.entry.js.map +0 -1
- package/dist/native/p-8d45dbfe.js +0 -2
- package/dist/native/p-9991116a.entry.js +0 -2
- package/dist/native/p-9a263d0e.js +0 -2
- package/dist/native/p-9a263d0e.js.map +0 -1
- package/dist/native/p-ac5496e7.entry.js +0 -2
- package/dist/native/p-ad2cc829.entry.js +0 -2
- package/dist/native/p-b58fb522.entry.js +0 -2
- package/dist/native/p-ba9906b7.entry.js +0 -2
- package/dist/native/p-fb672f90.entry.js +0 -2
- package/dist/native/p-fc9564b3.js +0 -2
- package/dist/native/p-fc9564b3.js.map +0 -1
- /package/dist/native/{p-aacd8789.entry.js.map → p-1f01fb64.entry.js.map} +0 -0
- /package/dist/native/{p-ac5496e7.entry.js.map → p-25f2ce81.entry.js.map} +0 -0
- /package/dist/native/{p-43071c3b.entry.js.map → p-3784efdc.entry.js.map} +0 -0
- /package/dist/native/{p-676447d7.entry.js.map → p-788e9ee5.entry.js.map} +0 -0
- /package/dist/native/{p-f033c4ce.entry.js.map → p-7bbcf477.entry.js.map} +0 -0
- /package/dist/native/{p-2d647761.entry.js.map → p-f5eb047e.entry.js.map} +0 -0
|
@@ -188,6 +188,10 @@ nv-fieldnumber .input-wrapper .input-container > nv-iconbutton:focus-visible {
|
|
|
188
188
|
border-radius: var(--button-md-border-radius);
|
|
189
189
|
outline-offset: -3px;
|
|
190
190
|
}
|
|
191
|
+
nv-fieldnumber .input-wrapper .input-container > nv-iconbutton:last-of-type {
|
|
192
|
+
border-top-right-radius: var(--form-field-radius);
|
|
193
|
+
border-bottom-right-radius: var(--form-field-radius);
|
|
194
|
+
}
|
|
191
195
|
nv-fieldnumber .input-wrapper .input-container .stepper {
|
|
192
196
|
display: flex;
|
|
193
197
|
border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);
|
|
@@ -201,6 +205,10 @@ nv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:focus-vi
|
|
|
201
205
|
border-radius: var(--button-md-border-radius);
|
|
202
206
|
outline-offset: -3px;
|
|
203
207
|
}
|
|
208
|
+
nv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:last-of-type {
|
|
209
|
+
border-top-right-radius: var(--form-field-radius);
|
|
210
|
+
border-bottom-right-radius: var(--form-field-radius);
|
|
211
|
+
}
|
|
204
212
|
@container field-number-input-container (width < 150px) {
|
|
205
213
|
nv-fieldnumber .input-wrapper .input-container .stepper-spacer {
|
|
206
214
|
display: none;
|
|
@@ -69,7 +69,7 @@ export class NvFieldnumber {
|
|
|
69
69
|
//#region METHODS
|
|
70
70
|
this.handleInput = (event) => {
|
|
71
71
|
const input = event.target;
|
|
72
|
-
this.value =
|
|
72
|
+
this.value = input.valueAsNumber;
|
|
73
73
|
};
|
|
74
74
|
this.handleInputContainerClick = () => {
|
|
75
75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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot trailing-input - Content to be placed after the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldnumber',\n styleUrl: 'nv-fieldnumber.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldnumber {\n @Element() el: HTMLNvFieldnumberElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the number field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * Show a helpful message under the input field when there’s a problem. It\n * explains what’s wrong and how users can fix it, making the error easier to\n * understand and resolve.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * The maximum value that the input field can accept. Use this in combination\n * with min to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly max: number;\n\n /**\n * The minimum value that the input field can accept. Use this in combination\n * with max to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly min: number;\n\n /**\n * Define the increment value for the input field. It determines how much the\n * value will increase or decrease when the user clicks the stepper buttons.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * The value of the input field. It’s the text that users type in or the value\n * that you set programmatically. This is the main way to interact with the\n * input field, and it’s essential for creating forms that users can fill out.\n */\n @Prop({ reflect: true, mutable: true })\n value: number;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<number>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n watchValueHandler(newValue: number) {\n this.valueChanged.emit(newValue);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = Number(input.value);\n };\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n private handlePlus = () => {\n this.inputElement.stepUp();\n this.value = Number(this.inputElement.value);\n };\n\n private handleMinus = () => {\n this.inputElement.stepDown();\n this.value = Number(this.inputElement.value);\n };\n\n // prevents text selection when clicking the buttons multiple times\n private preventSelection = (event: Event) => {\n event.preventDefault();\n };\n\n private isMinValueReached = (): boolean => {\n return this.min !== undefined && this.value <= this.min;\n };\n\n private isMaxValueReached = (): boolean => {\n return this.max !== undefined && this.value >= this.max;\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type=\"number\"\n autofocus={this.autofocus}\n required={this.required}\n max={this.max}\n min={this.min}\n step={this.step}\n value={this.value}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n <slot name=\"trailing-input\"></slot>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <div class=\"stepper\">\n <nv-iconbutton\n size=\"md\"\n name=\"minus\"\n emphasis=\"lower\"\n onClick={this.handleMinus}\n disabled={this.isMinValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n ></nv-iconbutton>\n <nv-iconbutton\n size=\"md\"\n name=\"plus\"\n emphasis=\"lower\"\n onClick={this.handlePlus}\n disabled={this.isMaxValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n />\n </div>\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
|
|
1
|
+
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot trailing-input - Content to be placed after the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldnumber',\n styleUrl: 'nv-fieldnumber.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldnumber {\n @Element() el: HTMLNvFieldnumberElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the number field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * Show a helpful message under the input field when there’s a problem. It\n * explains what’s wrong and how users can fix it, making the error easier to\n * understand and resolve.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * The maximum value that the input field can accept. Use this in combination\n * with min to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly max: number;\n\n /**\n * The minimum value that the input field can accept. Use this in combination\n * with max to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly min: number;\n\n /**\n * Define the increment value for the input field. It determines how much the\n * value will increase or decrease when the user clicks the stepper buttons.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * The value of the input field. It’s the text that users type in or the value\n * that you set programmatically. This is the main way to interact with the\n * input field, and it’s essential for creating forms that users can fill out.\n */\n @Prop({ reflect: true, mutable: true })\n value: number;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<number>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n watchValueHandler(newValue: number) {\n this.valueChanged.emit(newValue);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.valueAsNumber;\n };\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n private handlePlus = () => {\n this.inputElement.stepUp();\n this.value = Number(this.inputElement.value);\n };\n\n private handleMinus = () => {\n this.inputElement.stepDown();\n this.value = Number(this.inputElement.value);\n };\n\n // prevents text selection when clicking the buttons multiple times\n private preventSelection = (event: Event) => {\n event.preventDefault();\n };\n\n private isMinValueReached = (): boolean => {\n return this.min !== undefined && this.value <= this.min;\n };\n\n private isMaxValueReached = (): boolean => {\n return this.max !== undefined && this.value >= this.max;\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type=\"number\"\n autofocus={this.autofocus}\n required={this.required}\n max={this.max}\n min={this.min}\n step={this.step}\n value={this.value}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n <slot name=\"trailing-input\"></slot>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <div class=\"stepper\">\n <nv-iconbutton\n size=\"md\"\n name=\"minus\"\n emphasis=\"lower\"\n onClick={this.handleMinus}\n disabled={this.isMinValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n ></nv-iconbutton>\n <nv-iconbutton\n size=\"md\"\n name=\"plus\"\n emphasis=\"lower\"\n onClick={this.handlePlus}\n disabled={this.isMaxValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n />\n </div>\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
|
|
@@ -175,6 +175,10 @@ nv-fieldpassword .input-wrapper .input-container > nv-iconbutton:focus-visible {
|
|
|
175
175
|
border-radius: var(--button-md-border-radius);
|
|
176
176
|
outline-offset: -3px;
|
|
177
177
|
}
|
|
178
|
+
nv-fieldpassword .input-wrapper .input-container > nv-iconbutton:last-of-type {
|
|
179
|
+
border-top-right-radius: var(--form-field-radius);
|
|
180
|
+
border-bottom-right-radius: var(--form-field-radius);
|
|
181
|
+
}
|
|
178
182
|
nv-fieldpassword .input-wrapper .input-container nv-icon.validation {
|
|
179
183
|
color: var(--nv-field-border-default);
|
|
180
184
|
}
|
|
@@ -70,7 +70,6 @@ nv-fieldradio input[type=radio]:focus, nv-fieldradio input[type=radio]:focus-wit
|
|
|
70
70
|
nv-fieldradio input[type=radio]:focus-visible, nv-fieldradio input[type=radio]:has(:focus-visible) {
|
|
71
71
|
outline: calc(var(--focus-outline-stroke) * 1) solid var(--nv-fieldradio-outline-color);
|
|
72
72
|
outline-offset: calc(var(--focus-outline-offset) * 1);
|
|
73
|
-
z-index: 111;
|
|
74
73
|
}
|
|
75
74
|
nv-fieldradio input[type=radio]:checked {
|
|
76
75
|
background: var(--nv-fieldradio-background-checked);
|
|
@@ -98,6 +98,8 @@ nv-fieldselect[multiple]:not([multiple=false]) .select-wrapper > .select-contain
|
|
|
98
98
|
nv-fieldselect[multiple]:not([multiple=false]) .select-wrapper > .select-container > select {
|
|
99
99
|
height: 100%;
|
|
100
100
|
box-sizing: border-box;
|
|
101
|
+
background-color: var(--color-level-05-background);
|
|
102
|
+
border-radius: var(--form-field-radius);
|
|
101
103
|
}
|
|
102
104
|
nv-fieldselect label {
|
|
103
105
|
display: flex;
|
|
@@ -158,6 +160,10 @@ nv-fieldselect .select-wrapper .select-container > .select-icons > nv-iconbutton
|
|
|
158
160
|
border-radius: var(--button-md-border-radius);
|
|
159
161
|
outline-offset: -3px;
|
|
160
162
|
}
|
|
163
|
+
nv-fieldselect .select-wrapper .select-container > .select-icons > nv-iconbutton:last-of-type {
|
|
164
|
+
border-top-right-radius: var(--form-field-radius);
|
|
165
|
+
border-bottom-right-radius: var(--form-field-radius);
|
|
166
|
+
}
|
|
161
167
|
nv-fieldselect .select-wrapper .select-container input {
|
|
162
168
|
display: flex;
|
|
163
169
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fieldslider.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldslider/nv-fieldslider.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,iBAAiB,GAAuC;IAC5D,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,MAAM;IACb,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,oDAAsC;SACjD;QACD;YACE,IAAI,EAAE,MAAM,CAA2B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC;YAC/D,IAAI,EAAE;gBACJ,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,CAAC,EAAE,CAAC;gBACX,gBAAgB,EAAE,GAAG;aACtB;YACD,QAAQ,EAAE,oDAAsC;SACjD;QACD;YACE,IAAI,EAAE,MAAM,CAA2B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC;YAC9D,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU;gBACjB,KAAK,EAAE,CAAC,EAAE,CAAC;gBACX,eAAe,EAAE,IAAI;aACtB;YACD,QAAQ,EAAE,oDAAsC;SACjD;QACD;YACE,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qDAAqD;YAClE,IAAI,EAAE;gBACJ,KAAK,EAAE,kBAAkB;gBACzB,GAAG,EAAE,CAAC,EAAE;gBACR,GAAG,EAAE,EAAE;gBACP,KAAK,EAAE,CAAC,EAAE,CAAC;gBACX,eAAe,EAAE,IAAI;aACtB;YACD,QAAQ,EAAE,oDAAsC;SACjD;QACD;YACE,IAAI,EAAE,MAA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,EAAE,WAAW;YACjB,WAAW,EACT,kEAAkE;YACpE,IAAI,EAAE;gBACJ,KAAK,EAAE,gBAAgB;gBACvB,KAAK,EAAE,CAAC,EAAE,CAAC;aACZ;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,OAAO,mBAAoB,CACvB,CAClB;SACF;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,WAAW,EACT,8EAA8E;YAChF,IAAI,EAAE;gBACJ,KAAK,EAAE,qBAAqB;gBAC5B,WAAW,EAAE,sBAAsB;gBACnC,KAAK,EAAE,CAAC,EAAE,CAAC;aACZ;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,aAAa,yBAA0B,CACnC,CAClB;SACF;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EACT,yFAAyF;YAC3F,IAAI,EAAE;gBACJ,KAAK,EAAE,2BAA2B;gBAClC,gBAAgB,EAAE,4BAA4B;gBAC9C,KAAK,EAAE,CAAC,GAAG,CAAC;gBACZ,GAAG,EAAE,CAAC;gBACN,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,IAAI;aACZ;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,mBAAmB,+BAAgC,CAC/C,CAClB;SACF;KACF;CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\nimport { nameof } from '../../utils/class.utils';\n\nconst NvFieldsliderDocs: NovaDocs<Components.NvFieldslider> = {\n component: 'nv-fieldslider',\n badge: 'beta',\n stories: [\n {\n name: 'Default',\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.labelBeforeValue),\n args: {\n label: 'Price',\n value: [50],\n labelBeforeValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.labelAfterValue),\n args: {\n label: 'Distance',\n value: [25],\n labelAfterValue: 'km',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: 'MinMax',\n description: 'Slider with custom min/max range and initial value.',\n args: {\n label: 'Temperature (°C)',\n min: -20,\n max: 40,\n value: [22],\n labelAfterValue: '°C',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.step),\n args: {\n label: 'Volume (increments of 5)',\n min: 0,\n max: 100,\n value: [25],\n step: 5,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.snap),\n args: {\n label: 'Snapping Slider',\n min: 0,\n max: 100,\n value: [35],\n step: 5,\n snap: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.showTicks),\n args: {\n label: 'Volume',\n min: 0,\n max: 100,\n value: [40],\n step: 10,\n snap: true,\n showTicks: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.ticks),\n args: {\n label: 'Temperature (°C)',\n min: 0,\n max: 100,\n value: [7],\n step: 1,\n labelAfterValue: '°C',\n ticks: [\n { value: 10, label: 'Cold' },\n { value: 80, label: 'Hot' },\n ],\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.snapTicks),\n description:\n 'When snapTicks is true, the slider will snap to custom tick values rather than regular steps.',\n args: {\n label: 'Custom Pricing Tiers ($)',\n min: 0,\n max: 100,\n value: [10],\n step: 1,\n snapTicks: true,\n ticks: [\n { value: 0, label: 'Free' },\n { value: 10, label: 'Basic' },\n { value: 30, label: 'Pro' },\n { value: 75, label: 'Business' },\n { value: 100, label: 'Enterprise' },\n ],\n labelAfterValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.hasField),\n args: {\n label: 'Price',\n min: 0,\n max: 1000,\n value: [550],\n step: 10,\n hasField: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.range),\n args: {\n label: 'Price Range ($)',\n min: 0,\n max: 1000,\n value: [200, 800],\n step: 50,\n range: true,\n labelAfterValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: 'RangeFields',\n description: 'Range slider with editable numeric fields for both values.',\n args: {\n label: 'Filter by Price ($)',\n min: 0,\n max: 1000,\n value: [250, 750],\n step: 10,\n range: true,\n hasField: true,\n labelAfterValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.hideLabel),\n args: {\n label: 'Volume Level',\n hideLabel: true,\n value: [75],\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.error),\n args: {\n label: 'Budget ($)',\n value: [1500, 20000],\n min: 0,\n max: 100000,\n range: true,\n error: true,\n labelAfterValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.errorDescription),\n args: {\n label: 'Budget ($)',\n value: [1500, 20000],\n min: 0,\n max: 100000,\n range: true,\n error: true,\n errorDescription: 'Not enough funds!',\n labelAfterValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.success),\n args: {\n label: 'Target Achieved',\n value: [30, 70],\n range: true,\n min: 0,\n max: 100,\n success: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.disabled),\n args: {\n label: 'Settings (Locked)',\n value: [30],\n disabled: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.readonly),\n args: {\n label: 'Current Progress',\n value: [65],\n readonly: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.fluid),\n args: {\n label: 'Full Width Slider',\n value: [50],\n fluid: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: 'labelSlot',\n description:\n 'Content to be placed as the label, will override the label prop.',\n args: {\n label: 'Original Label',\n value: [45],\n },\n template: (\n <nv-fieldslider data-storybook-args>\n <span slot=\"label\">Custom Label</span>\n </nv-fieldslider>\n ),\n },\n {\n name: 'descriptionSlot',\n description:\n 'Content to be placed as the description, will override the description prop.',\n args: {\n label: 'Description Example',\n description: 'Original description',\n value: [60],\n },\n template: (\n <nv-fieldslider data-storybook-args>\n <span slot=\"description\">Custom Description</span>\n </nv-fieldslider>\n ),\n },\n {\n name: 'errorDescriptionSlot',\n description:\n 'Content to be placed as the error description, will override the errorDescription prop.',\n args: {\n label: 'Error Description Example',\n errorDescription: 'Original error description',\n value: [150],\n min: 0,\n max: 100,\n error: true,\n },\n template: (\n <nv-fieldslider data-storybook-args>\n <span slot=\"error-description\">Custom Error Description</span>\n </nv-fieldslider>\n ),\n },\n ],\n};\n\nexport default NvFieldsliderDocs;\n"]}
|
|
1
|
+
{"version":3,"file":"nv-fieldslider.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldslider/nv-fieldslider.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,iBAAiB,GAAuC;IAC5D,SAAS,EAAE,gBAAgB;IAC3B,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,oDAAsC;SACjD;QACD;YACE,IAAI,EAAE,MAAM,CAA2B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC;YAC/D,IAAI,EAAE;gBACJ,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,CAAC,EAAE,CAAC;gBACX,gBAAgB,EAAE,GAAG;aACtB;YACD,QAAQ,EAAE,oDAAsC;SACjD;QACD;YACE,IAAI,EAAE,M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,EAAC,mBAAmB,+BAAgC,CAC/C,CAClB;SACF;KACF;CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\nimport { nameof } from '../../utils/class.utils';\n\nconst NvFieldsliderDocs: NovaDocs<Components.NvFieldslider> = {\n component: 'nv-fieldslider',\n stories: [\n {\n name: 'Default',\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.labelBeforeValue),\n args: {\n label: 'Price',\n value: [50],\n labelBeforeValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.labelAfterValue),\n args: {\n label: 'Distance',\n value: [25],\n labelAfterValue: 'km',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: 'MinMax',\n description: 'Slider with custom min/max range and initial value.',\n args: {\n label: 'Temperature (°C)',\n min: -20,\n max: 40,\n value: [22],\n labelAfterValue: '°C',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.step),\n args: {\n label: 'Volume (increments of 5)',\n min: 0,\n max: 100,\n value: [25],\n step: 5,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.snap),\n args: {\n label: 'Snapping Slider',\n min: 0,\n max: 100,\n value: [35],\n step: 5,\n snap: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.showTicks),\n args: {\n label: 'Volume',\n min: 0,\n max: 100,\n value: [40],\n step: 10,\n snap: true,\n showTicks: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.ticks),\n args: {\n label: 'Temperature (°C)',\n min: 0,\n max: 100,\n value: [7],\n step: 1,\n labelAfterValue: '°C',\n ticks: [\n { value: 10, label: 'Cold' },\n { value: 80, label: 'Hot' },\n ],\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.snapTicks),\n description:\n 'When snapTicks is true, the slider will snap to custom tick values rather than regular steps.',\n args: {\n label: 'Custom Pricing Tiers ($)',\n min: 0,\n max: 100,\n value: [10],\n step: 1,\n snapTicks: true,\n ticks: [\n { value: 0, label: 'Free' },\n { value: 10, label: 'Basic' },\n { value: 30, label: 'Pro' },\n { value: 75, label: 'Business' },\n { value: 100, label: 'Enterprise' },\n ],\n labelAfterValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.hasField),\n args: {\n label: 'Price',\n min: 0,\n max: 1000,\n value: [550],\n step: 10,\n hasField: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.range),\n args: {\n label: 'Price Range ($)',\n min: 0,\n max: 1000,\n value: [200, 800],\n step: 50,\n range: true,\n labelAfterValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: 'RangeFields',\n description: 'Range slider with editable numeric fields for both values.',\n args: {\n label: 'Filter by Price ($)',\n min: 0,\n max: 1000,\n value: [250, 750],\n step: 10,\n range: true,\n hasField: true,\n labelAfterValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.hideLabel),\n args: {\n label: 'Volume Level',\n hideLabel: true,\n value: [75],\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.error),\n args: {\n label: 'Budget ($)',\n value: [1500, 20000],\n min: 0,\n max: 100000,\n range: true,\n error: true,\n labelAfterValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.errorDescription),\n args: {\n label: 'Budget ($)',\n value: [1500, 20000],\n min: 0,\n max: 100000,\n range: true,\n error: true,\n errorDescription: 'Not enough funds!',\n labelAfterValue: '$',\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.success),\n args: {\n label: 'Target Achieved',\n value: [30, 70],\n range: true,\n min: 0,\n max: 100,\n success: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.disabled),\n args: {\n label: 'Settings (Locked)',\n value: [30],\n disabled: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.readonly),\n args: {\n label: 'Current Progress',\n value: [65],\n readonly: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldslider>(x => x.fluid),\n args: {\n label: 'Full Width Slider',\n value: [50],\n fluid: true,\n },\n template: <nv-fieldslider data-storybook-args />,\n },\n {\n name: 'labelSlot',\n description:\n 'Content to be placed as the label, will override the label prop.',\n args: {\n label: 'Original Label',\n value: [45],\n },\n template: (\n <nv-fieldslider data-storybook-args>\n <span slot=\"label\">Custom Label</span>\n </nv-fieldslider>\n ),\n },\n {\n name: 'descriptionSlot',\n description:\n 'Content to be placed as the description, will override the description prop.',\n args: {\n label: 'Description Example',\n description: 'Original description',\n value: [60],\n },\n template: (\n <nv-fieldslider data-storybook-args>\n <span slot=\"description\">Custom Description</span>\n </nv-fieldslider>\n ),\n },\n {\n name: 'errorDescriptionSlot',\n description:\n 'Content to be placed as the error description, will override the errorDescription prop.',\n args: {\n label: 'Error Description Example',\n errorDescription: 'Original error description',\n value: [150],\n min: 0,\n max: 100,\n error: true,\n },\n template: (\n <nv-fieldslider data-storybook-args>\n <span slot=\"error-description\">Custom Error Description</span>\n </nv-fieldslider>\n ),\n },\n ],\n};\n\nexport default NvFieldsliderDocs;\n"]}
|
|
@@ -33,7 +33,8 @@ export class NvFieldslider {
|
|
|
33
33
|
/**
|
|
34
34
|
* Enables an optional numeric input field alongside the slider, allowing
|
|
35
35
|
* users to type a value directly instead of—or in addition to—using the
|
|
36
|
-
* slider handle.
|
|
36
|
+
* slider handle. The field accepts numeric values in the format based on
|
|
37
|
+
* client-side local settings.
|
|
37
38
|
*/
|
|
38
39
|
this.hasField = false;
|
|
39
40
|
/**
|
|
@@ -284,16 +285,15 @@ export class NvFieldslider {
|
|
|
284
285
|
};
|
|
285
286
|
/**
|
|
286
287
|
* Handles field input value changes.
|
|
287
|
-
* @param {
|
|
288
|
+
* @param {FieldInputProps['onInput']} details - The parsed value and index
|
|
288
289
|
*/
|
|
289
|
-
this.handleFieldChange = (
|
|
290
|
-
const
|
|
291
|
-
const newValue = parseFloat(input.value);
|
|
290
|
+
this.handleFieldChange = (details) => {
|
|
291
|
+
const newValue = details.value;
|
|
292
292
|
if (isNaN(newValue)) {
|
|
293
293
|
return;
|
|
294
294
|
}
|
|
295
295
|
if (this.range) {
|
|
296
|
-
const fieldIndex =
|
|
296
|
+
const fieldIndex = details.index === 0 ? 0 : 1;
|
|
297
297
|
const updatedRange = [...this.rangeValueInternal];
|
|
298
298
|
updatedRange[fieldIndex] = newValue;
|
|
299
299
|
this.handleValueChange(updatedRange);
|
|
@@ -464,11 +464,11 @@ export class NvFieldslider {
|
|
|
464
464
|
/****************************************************************************/
|
|
465
465
|
//#region RENDER
|
|
466
466
|
render() {
|
|
467
|
-
return (h(Host, { key: '
|
|
467
|
+
return (h(Host, { key: '5256401116f099a480f35552c3a38072c60d74ed' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'ae1c59b2561f0b007d3f6da3ef379a32fe2ff449', htmlFor: this.startInputId }, h("slot", { key: '6d0b7e287276082ea680fc7fdfaabe428648df03', name: "label" }, this.label))), h("div", { key: '3c09727930e4d7bbde1f1ad578fb87e18f04c8dc', 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: 'db7e57716f9fc13e9ecd2e81c4126ccd8ceade9f', class: "track-container" }, h("div", { key: '8b5cc8d661b8179fa71c6729291e72bc743dcb13', 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: '4f7ee0f6eccff4a2539b9f33c9f1dd68e0e8afa1', 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 ||
|
|
468
468
|
this.description ||
|
|
469
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
469
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '40b921d84578b1d7ae18fa5f1ebcc34cc1678df2', class: "description" }, this.success && (h("nv-icon", { key: 'c0c7e52eb9118154f18280fdcb09ca4a5db63c74', name: "circle-check", class: "validation", size: "md" })), h("slot", { key: '2d764e1dabf08abb3271de1f8c2cf6f8418d9d5d', name: "description" }, this.description))), (this.error ||
|
|
470
470
|
this.errorDescription ||
|
|
471
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
471
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '96f9424431a2adcca98f4619350e6d34c2037bc2', class: "error-description", hidden: !this.error }, this.error && (h("nv-icon", { key: 'b77e2b14a5f4e9cdf49c173f5fbf24d6a3f081ff', name: "alert-circle", class: "validation", size: "md" })), h("slot", { key: 'f04a20c146d54c405669109436b28bf9ad99ebd8', name: "error-description" }, this.errorDescription)))));
|
|
472
472
|
}
|
|
473
473
|
static get is() { return "nv-fieldslider"; }
|
|
474
474
|
static get formAssociated() { return true; }
|
|
@@ -594,7 +594,7 @@ export class NvFieldslider {
|
|
|
594
594
|
"optional": false,
|
|
595
595
|
"docs": {
|
|
596
596
|
"tags": [],
|
|
597
|
-
"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."
|
|
597
|
+
"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. The field accepts numeric values in the format based on\nclient-side local settings."
|
|
598
598
|
},
|
|
599
599
|
"getter": false,
|
|
600
600
|
"setter": false,
|
|
@@ -1 +1 @@
|
|
|
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,EAA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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];\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"]}
|
|
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,UA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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, type FieldInputProps } 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. The field accepts numeric values in the format based on\n * client-side local settings.\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 {FieldInputProps['onInput']} details - The parsed value and index\n */\n private handleFieldChange: FieldInputProps['onInput'] = (details): void => {\n const newValue = details.value;\n\n if (isNaN(newValue)) {\n return;\n }\n\n if (this.range) {\n const fieldIndex = details.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"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import clsx from "clsx";
|
|
2
3
|
/**
|
|
3
4
|
* Renders field input for direct value entry
|
|
4
5
|
* @param {FieldInputProps} props - Component properties
|
|
@@ -24,10 +25,17 @@ export const FieldInput = props => {
|
|
|
24
25
|
else {
|
|
25
26
|
inputName = name || '';
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const handleValueChanged = (event) => {
|
|
29
|
+
event.stopPropagation();
|
|
30
|
+
const newValue = event.detail;
|
|
31
|
+
if (isNaN(newValue)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
onInput({
|
|
35
|
+
value: newValue,
|
|
36
|
+
index,
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
return hasField ? (h("div", { class: clsx(!hasField && 'hidden-input') }, h("nv-fieldnumber", Object.assign({ id: inputId, value: fieldValue, min: min, max: max, step: step, disabled: disabled, readonly: readonly, name: inputName }, dataAttrs, { onInput: e => e.stopPropagation(), onValueChanged: handleValueChanged }), labelBeforeValue && (h("span", { class: "label-before", slot: "leading-input" }, labelBeforeValue)), labelAfterValue && (h("span", { class: "label-after", slot: "trailing-input" }, labelAfterValue))))) : (h("input", { id: inputId, type: "hidden", value: fieldValue, disabled: disabled, readonly: readonly, name: inputName }));
|
|
32
40
|
};
|
|
33
41
|
//# sourceMappingURL=field-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-input.js","sourceRoot":"","sources":["../../../../src/components/nv-fieldslider/partials/field-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"field-input.js","sourceRoot":"","sources":["../../../../src/components/nv-fieldslider/partials/field-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,IAAI,MAAM,MAAM,CAAC;AA6CxB;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAyC,KAAK,CAAC,EAAE;IACtE,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,KAAK,EACL,UAAU,EACV,KAAK,EACL,OAAO,EACP,GAAG,EACH,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,eAAe,EACf,IAAI,EACJ,OAAO,GACR,GAAG,KAAK,CAAC;IAEV,0DAA0D;IAC1D,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAErD,uDAAuD;IACvD,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAElE,yDAAyD;IACzD,IAAI,SAAiB,CAAC;IACtB,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YAChB,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,+DAA+D;YAC/D,SAAS,GAAG,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CA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alComponent, h } from '@stencil/core';\nimport clsx from 'clsx';\n\n/**\n * Props for the FieldInput component\n */\nexport interface FieldInputProps {\n /** Whether this is a range slider */\n range: boolean;\n /** Whether to show the input field */\n hasField: boolean;\n /** The value for single mode */\n value: number;\n /** The values for range mode [min, max] */\n rangeValue: number[];\n /** Index (0 or 1) for range mode, ignored in single mode */\n index?: number;\n /** ID for the input field */\n inputId: string;\n /** Minimum allowed value */\n min: number;\n /** Maximum allowed value */\n max: number;\n /** Step size */\n step: number;\n /** Whether the slider is disabled */\n disabled: boolean;\n /** Whether the slider is readonly */\n readonly: boolean;\n /** Handler for input changes */\n onInput: (details: {\n /** Parsed value */\n value: number;\n /** Index (0 or 1) for range mode, ignored in single mode */\n index?: number;\n }) => void;\n /** Label to display before the value */\n labelBeforeValue?: string;\n /** Label to display after the value */\n labelAfterValue?: string;\n /** Name attribute for the input field (for form submission) */\n name?: string;\n /** Name attribute for the end input field (when in range mode) */\n endName?: string;\n}\n\n/**\n * Renders field input for direct value entry\n * @param {FieldInputProps} props - Component properties\n * @returns {JSX.Element} JSX element representing the field input\n */\nexport const FieldInput: FunctionalComponent<FieldInputProps> = props => {\n const {\n range,\n hasField,\n value,\n rangeValue,\n index,\n inputId,\n min,\n max,\n step,\n disabled,\n readonly,\n onInput,\n labelBeforeValue,\n labelAfterValue,\n name,\n endName,\n } = props;\n\n // Determine the appropriate value based on mode and index\n const fieldValue = range ? rangeValue[index] : value;\n\n // In range mode, we need data-index for event handling\n const dataAttrs = range ? { 'data-index': index.toString() } : {};\n\n // Determine the appropriate name based on mode and index\n let inputName: string;\n if (range) {\n if (index === 0) {\n inputName = name || '';\n } else {\n // Use endName if provided, otherwise append \"-end\" to the name\n inputName = endName || (name ? `${name}-end` : '');\n }\n } else {\n inputName = name || '';\n }\n\n const handleValueChanged = (\n event: CustomEvent<HTMLNvFieldnumberElementEventMap['valueChanged']>,\n ): void => {\n event.stopPropagation();\n const newValue = event.detail;\n\n if (isNaN(newValue)) {\n return;\n }\n\n onInput({\n value: newValue,\n index,\n });\n };\n\n return hasField ? (\n <div class={clsx(!hasField && 'hidden-input')}>\n <nv-fieldnumber\n id={inputId}\n value={fieldValue}\n min={min}\n max={max}\n step={step}\n disabled={disabled}\n readonly={readonly}\n name={inputName}\n {...dataAttrs}\n onInput={e => e.stopPropagation()}\n onValueChanged={handleValueChanged}\n >\n {labelBeforeValue && (\n <span class=\"label-before\" slot=\"leading-input\">\n {labelBeforeValue}\n </span>\n )}\n {labelAfterValue && (\n <span class=\"label-after\" slot=\"trailing-input\">\n {labelAfterValue}\n </span>\n )}\n </nv-fieldnumber>\n </div>\n ) : (\n <input\n id={inputId}\n type=\"hidden\"\n value={fieldValue}\n disabled={disabled}\n readonly={readonly}\n name={inputName}\n />\n );\n};\n"]}
|