@nova-design-system/nova-webcomponents 3.0.0 → 3.2.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/{constants-bcd6b2e2.js → constants-8fb8ccc0.js} +14 -1
- package/dist/cjs/constants-8fb8ccc0.js.map +1 -0
- package/dist/cjs/{index-9bda5507.js → index-108ddff0.js} +22 -6
- package/dist/cjs/index-108ddff0.js.map +1 -0
- package/dist/cjs/index.cjs.js +5 -471
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/native.cjs.js +2 -2
- package/dist/cjs/nv-alert.cjs.entry.js +6 -6
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +2 -2
- package/dist/cjs/nv-badge_2.cjs.entry.js +18 -9
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +2 -2
- package/dist/cjs/nv-calendar.cjs.entry.js +821 -843
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +423 -94
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +19 -13
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +9 -18
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +85 -32
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +88 -57
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +122 -104
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +9 -5
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +9 -5
- package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldselect.cjs.entry.js +11 -7
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldslider.cjs.entry.js +663 -0
- package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-fieldtext.cjs.entry.js +9 -5
- package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +9 -5
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +16 -13
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +4 -4
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +3 -3
- package/dist/cjs/nv-menu.cjs.entry.js +4 -2
- package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-popover.cjs.entry.js +2 -2
- package/dist/cjs/nv-row.cjs.entry.js +2 -2
- package/dist/cjs/nv-stack.cjs.entry.js +2 -2
- package/dist/cjs/nv-table.cjs.entry.js +3 -3
- package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
- package/dist/cjs/nv-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/nv-alert/nv-alert.css +3 -0
- package/dist/collection/components/nv-alert/nv-alert.js +6 -11
- package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.css +181 -1
- package/dist/collection/components/nv-badge/nv-badge.docs.js +20 -1
- package/dist/collection/components/nv-badge/nv-badge.docs.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.js +39 -15
- package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js +0 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.css +25 -2
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js +33 -38
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.js +659 -897
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js +202 -0
- package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -0
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +667 -0
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.css +98 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +232 -51
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +437 -160
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +20 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.css +29 -5
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +0 -1
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +16 -10
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js +16 -8
- package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +48 -39
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +14 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js +12 -15
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +147 -68
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +20 -12
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +16 -0
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +197 -103
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +36 -1
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +8 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +228 -190
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/{nv-fieldmultiselect.css → styles/nv-fieldmultiselect.css} +36 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +12 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +8 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +27 -3
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +12 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +8 -0
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +27 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +12 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +8 -0
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +29 -5
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +264 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +1035 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js +77 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/partials/field-input.js +33 -0
- package/dist/collection/components/nv-fieldslider/partials/field-input.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/partials/range-thumb.js +34 -0
- package/dist/collection/components/nv-fieldslider/partials/range-thumb.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/partials/single-thumb.js +18 -0
- package/dist/collection/components/nv-fieldslider/partials/single-thumb.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/partials/tick-marks.js +18 -0
- package/dist/collection/components/nv-fieldslider/partials/tick-marks.js.map +1 -0
- package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +267 -0
- package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js +159 -0
- package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js.map +1 -0
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +20 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +17 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +28 -3
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +30 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js +8 -0
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +27 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +13 -10
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +26 -3
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js +4 -470
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +3 -1
- package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +8 -11
- package/dist/collection/components/nv-table/nv-table.js.map +1 -1
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-tooltip/nv-tooltip.css +1 -0
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/interfaces/Column.js.map +1 -1
- package/dist/collection/templates/navigation.docs.js +0 -1
- package/dist/collection/templates/navigation.docs.js.map +1 -1
- package/dist/collection/utils/constants.js +11 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/components/index.js +6 -472
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-alert.js +7 -7
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +3 -3
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +3 -3
- package/dist/components/nv-breadcrumbs.js +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +447 -102
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-datagridcolumn.js +4 -3
- package/dist/components/nv-datagridcolumn.js.map +1 -1
- package/dist/components/nv-dialog.js +24 -18
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +19 -27
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +99 -44
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +103 -69
- 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 +139 -120
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +14 -9
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +13 -8
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +4 -4
- package/dist/components/nv-fieldselect.js +15 -10
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldslider.d.ts +11 -0
- package/dist/components/nv-fieldslider.js +726 -0
- package/dist/components/nv-fieldslider.js.map +1 -0
- package/dist/components/nv-fieldtext.js +1 -158
- package/dist/components/nv-fieldtext.js.map +1 -1
- package/dist/components/nv-fieldtextarea.js +11 -6
- package/dist/components/nv-fieldtextarea.js.map +1 -1
- package/dist/components/nv-fieldtime.js +20 -17
- package/dist/components/nv-fieldtime.js.map +1 -1
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +7 -5
- package/dist/components/nv-menu.js.map +1 -1
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +2 -2
- package/dist/components/nv-stack.js +2 -2
- package/dist/components/nv-table.js +3 -3
- package/dist/components/nv-table.js.map +1 -1
- package/dist/components/nv-tablecolumn.js +1 -1
- package/dist/components/nv-toggle.js +3 -3
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-dc3faba3.js → p-04cb3a6f.js} +5 -5
- package/dist/components/{p-dc3faba3.js.map → p-04cb3a6f.js.map} +1 -1
- package/dist/components/p-07a89754.js +187 -0
- package/dist/components/p-07a89754.js.map +1 -0
- package/dist/components/{p-b7b78e64.js → p-0ab80d95.js} +3 -3
- package/dist/components/{p-b7b78e64.js.map → p-0ab80d95.js.map} +1 -1
- package/dist/components/{p-8348db09.js → p-1f505531.js} +15 -2
- package/dist/components/p-1f505531.js.map +1 -0
- package/dist/components/{p-02752770.js → p-33e231f4.js} +2 -2
- package/dist/components/{p-02752770.js.map → p-33e231f4.js.map} +1 -1
- package/dist/components/p-4656efae.js +1111 -0
- package/dist/components/p-4656efae.js.map +1 -0
- package/dist/components/{p-2012b8ba.js → p-581e67cc.js} +4 -4
- package/dist/components/{p-2012b8ba.js.map → p-581e67cc.js.map} +1 -1
- package/dist/components/{p-1c45c0f2.js → p-679e0fa9.js} +16 -4
- package/dist/components/p-679e0fa9.js.map +1 -0
- package/dist/components/p-76a30bf1.js +88 -0
- package/dist/components/p-76a30bf1.js.map +1 -0
- package/dist/components/{p-150daf68.js → p-83c8873a.js} +3 -3
- package/dist/components/{p-150daf68.js.map → p-83c8873a.js.map} +1 -1
- package/dist/components/{p-c14f6b8e.js → p-c0a91091.js} +5 -5
- package/dist/components/p-c0a91091.js.map +1 -0
- package/dist/components/{p-6c364a23.js → p-cbdc2c8b.js} +6 -6
- package/dist/components/{p-6c364a23.js.map → p-cbdc2c8b.js.map} +1 -1
- package/dist/components/{p-2d9ba7d3.js → p-cbe9521f.js} +4 -4
- package/dist/components/{p-2d9ba7d3.js.map → p-cbe9521f.js.map} +1 -1
- package/dist/components/{p-a30b55fc.js → p-d19b41d2.js} +2 -2
- package/dist/components/{p-a30b55fc.js.map → p-d19b41d2.js.map} +1 -1
- package/dist/components/{p-4d3ec142.js → p-d63f1cbe.js} +4 -4
- package/dist/components/{p-4d3ec142.js.map → p-d63f1cbe.js.map} +1 -1
- package/dist/components/{p-e00cbb8a.js → p-dd2273a3.js} +2 -2
- package/dist/components/{p-e00cbb8a.js.map → p-dd2273a3.js.map} +1 -1
- package/dist/components/p-f0a5e7e4.js +167 -0
- package/dist/components/p-f0a5e7e4.js.map +1 -0
- package/dist/components/{p-f4d86795.js → p-f1859ddc.js} +4 -4
- package/dist/components/{p-f4d86795.js.map → p-f1859ddc.js.map} +1 -1
- package/dist/esm/{constants-98e2dcc2.js → constants-b97e736d.js} +15 -2
- package/dist/esm/constants-b97e736d.js.map +1 -0
- package/dist/esm/{index-1fb7a9a6.js → index-8f0e5f19.js} +22 -6
- package/dist/esm/index-8f0e5f19.js.map +1 -0
- package/dist/esm/index.js +5 -471
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/native.js +3 -3
- package/dist/esm/nv-alert.entry.js +6 -6
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +2 -2
- package/dist/esm/nv-badge_2.entry.js +18 -9
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumbs.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +2 -2
- package/dist/esm/nv-calendar.entry.js +821 -843
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +423 -94
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +2 -2
- package/dist/esm/nv-datagridcolumn.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +19 -13
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
- package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fielddate.entry.js +9 -18
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +85 -32
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +88 -57
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +2 -2
- package/dist/esm/nv-fieldmultiselect.entry.js +122 -104
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +9 -5
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +9 -5
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +4 -4
- package/dist/esm/nv-fieldselect.entry.js +11 -7
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldslider.entry.js +659 -0
- package/dist/esm/nv-fieldslider.entry.js.map +1 -0
- package/dist/esm/nv-fieldtext.entry.js +9 -5
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +9 -5
- package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +16 -13
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +4 -4
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +3 -3
- package/dist/esm/nv-menu.entry.js +4 -2
- package/dist/esm/nv-menu.entry.js.map +1 -1
- package/dist/esm/nv-menuitem.entry.js +2 -2
- package/dist/esm/nv-popover.entry.js +2 -2
- package/dist/esm/nv-row.entry.js +2 -2
- package/dist/esm/nv-stack.entry.js +2 -2
- package/dist/esm/nv-table.entry.js +3 -3
- package/dist/esm/nv-table.entry.js.map +1 -1
- package/dist/esm/nv-tablecolumn.entry.js +1 -1
- package/dist/esm/nv-toggle.entry.js +3 -3
- package/dist/esm/nv-tooltip.entry.js +3 -3
- package/dist/esm/nv-tooltip.entry.js.map +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-6b348684.entry.js → p-0323daf6.entry.js} +2 -2
- package/dist/native/{p-d5cbf5c8.entry.js → p-05d95d4d.entry.js} +2 -2
- package/dist/native/{p-fb5bddba.entry.js → p-0ec1e2e3.entry.js} +2 -2
- package/dist/native/{p-c7b201cd.entry.js → p-16a4cdf3.entry.js} +2 -2
- package/dist/native/p-19fb0fd0.entry.js +2 -0
- package/dist/native/p-19fb0fd0.entry.js.map +1 -0
- package/dist/native/p-1e3d3374.entry.js +2 -0
- package/dist/native/{p-9135fdf5.entry.js.map → p-1e3d3374.entry.js.map} +1 -1
- package/dist/native/p-21e7132f.entry.js +2 -0
- package/dist/native/p-21e7132f.entry.js.map +1 -0
- package/dist/native/p-221b8f72.entry.js +2 -0
- package/dist/native/p-221b8f72.entry.js.map +1 -0
- package/dist/native/p-2805f9f2.entry.js +2 -0
- package/dist/native/p-2805f9f2.entry.js.map +1 -0
- package/dist/native/p-3f2b6a22.entry.js +2 -0
- package/dist/native/p-3f2b6a22.entry.js.map +1 -0
- package/dist/native/{p-0245863d.entry.js → p-407fc32d.entry.js} +2 -2
- package/dist/native/{p-63e6aed3.entry.js → p-4c0d81b0.entry.js} +2 -2
- package/dist/native/p-4c0d81b0.entry.js.map +1 -0
- package/dist/native/{p-39bb95ff.entry.js → p-519b4819.entry.js} +2 -2
- package/dist/native/{p-fa77a591.entry.js → p-5382eab2.entry.js} +2 -2
- package/dist/native/p-5ba3fc3c.entry.js +2 -0
- package/dist/native/p-5ba3fc3c.entry.js.map +1 -0
- package/dist/native/{p-bad11367.entry.js → p-60b204ac.entry.js} +2 -2
- package/dist/native/p-60b204ac.entry.js.map +1 -0
- package/dist/native/p-7092a675.entry.js +2 -0
- package/dist/native/p-711a7778.js +3 -0
- package/dist/native/p-711a7778.js.map +1 -0
- package/dist/native/p-759c9ce4.entry.js +2 -0
- package/dist/native/p-759c9ce4.entry.js.map +1 -0
- package/dist/native/{p-d7a76400.entry.js → p-7c676f2c.entry.js} +2 -2
- package/dist/native/p-7c6edd1c.entry.js +2 -0
- package/dist/native/p-7c6edd1c.entry.js.map +1 -0
- package/dist/native/p-987c79d8.entry.js +2 -0
- package/dist/native/p-987c79d8.entry.js.map +1 -0
- package/dist/native/{p-f85aca27.entry.js → p-9fba8663.entry.js} +2 -2
- package/dist/native/{p-b094296d.entry.js → p-a2c0f1a7.entry.js} +2 -2
- package/dist/native/p-aa86af25.entry.js +2 -0
- package/dist/native/p-aa86af25.entry.js.map +1 -0
- package/dist/native/p-adc96c3a.entry.js +2 -0
- package/dist/native/p-adc96c3a.entry.js.map +1 -0
- package/dist/native/p-b0fc08e7.entry.js +2 -0
- package/dist/native/p-b0fc08e7.entry.js.map +1 -0
- package/dist/native/{p-6ff228da.entry.js → p-c930adb7.entry.js} +2 -2
- package/dist/native/{p-701b5557.entry.js → p-cfe0a6c6.entry.js} +2 -2
- package/dist/native/p-d07ab618.entry.js +2 -0
- package/dist/native/p-dac0089b.entry.js +2 -0
- package/dist/native/p-dac0089b.entry.js.map +1 -0
- package/dist/native/p-de2c07a6.entry.js +13 -0
- package/dist/native/p-de2c07a6.entry.js.map +1 -0
- package/dist/native/p-ed488498.entry.js +7 -0
- package/dist/native/p-ed488498.entry.js.map +1 -0
- package/dist/native/p-ef76178b.entry.js +2 -0
- package/dist/native/p-ef76178b.entry.js.map +1 -0
- package/dist/native/{p-e5de64d5.entry.js → p-f0ddf60b.entry.js} +2 -2
- package/dist/native/p-f39803d9.entry.js +2 -0
- package/dist/native/p-f39803d9.entry.js.map +1 -0
- package/dist/native/{p-59768ee5.js → p-f85c08f1.js} +2 -2
- package/dist/native/p-f85c08f1.js.map +1 -0
- package/dist/native/p-fb897f7d.entry.js +2 -0
- package/dist/native/p-fb897f7d.entry.js.map +1 -0
- package/dist/native/{p-244f56ac.entry.js → p-fc3bea07.entry.js} +2 -2
- package/dist/types/components/nv-alert/nv-alert.d.ts +1 -1
- package/dist/types/components/nv-badge/nv-badge.d.ts +11 -3
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +70 -112
- package/dist/types/components/nv-calendar/nv-calendar.utils.d.ts +60 -0
- package/dist/types/components/nv-calendar/test/nv-calendar.utils.test.d.ts +1 -0
- package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +47 -26
- package/dist/types/components/nv-datagridcolumn/nv-datagridcolumn.d.ts +4 -0
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +4 -0
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +6 -7
- package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +23 -12
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +51 -26
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +65 -55
- package/dist/types/components/nv-fieldnumber/nv-fieldnumber.d.ts +4 -0
- package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +4 -0
- package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +4 -0
- package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +230 -0
- package/dist/types/components/nv-fieldslider/nv-fieldslider.docs.d.ts +4 -0
- package/dist/types/components/nv-fieldslider/nv-fieldslider.utils.d.ts +46 -0
- package/dist/types/components/nv-fieldslider/partials/field-input.d.ts +45 -0
- package/dist/types/components/nv-fieldslider/partials/range-thumb.d.ts +37 -0
- package/dist/types/components/nv-fieldslider/partials/single-thumb.d.ts +35 -0
- package/dist/types/components/nv-fieldslider/partials/tick-marks.d.ts +28 -0
- package/dist/types/components/nv-fieldslider/test/nv-fieldslider.utils.test.d.ts +1 -0
- package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +5 -0
- package/dist/types/components/nv-fieldtextarea/nv-fieldtextarea.d.ts +4 -0
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-table/nv-table.d.ts +13 -2
- package/dist/types/components.d.ts +656 -154
- package/dist/types/index.d.ts +0 -2
- package/dist/types/interfaces/Column.d.ts +5 -1
- package/dist/types/utils/constants.d.ts +9 -0
- package/dist/vscode-data.json +292 -1546
- package/hydrate/index.js +2715 -1533
- package/hydrate/index.mjs +2715 -1533
- package/package.json +6 -2
- package/dist/cjs/constants-bcd6b2e2.js.map +0 -1
- package/dist/cjs/index-9bda5507.js.map +0 -1
- package/dist/collection/interfaces/actionEvent.js +0 -2
- package/dist/collection/interfaces/actionEvent.js.map +0 -1
- package/dist/collection/interfaces/calendarShortcut.js +0 -2
- package/dist/collection/interfaces/calendarShortcut.js.map +0 -1
- package/dist/collection/interfaces/dateRange.js +0 -2
- package/dist/collection/interfaces/dateRange.js.map +0 -1
- package/dist/components/p-1c45c0f2.js.map +0 -1
- package/dist/components/p-373926aa.js +0 -177
- package/dist/components/p-373926aa.js.map +0 -1
- package/dist/components/p-591730e7.js +0 -88
- package/dist/components/p-591730e7.js.map +0 -1
- package/dist/components/p-8348db09.js.map +0 -1
- package/dist/components/p-c14f6b8e.js.map +0 -1
- package/dist/components/p-f331117c.js +0 -1133
- package/dist/components/p-f331117c.js.map +0 -1
- package/dist/esm/constants-98e2dcc2.js.map +0 -1
- package/dist/esm/index-1fb7a9a6.js.map +0 -1
- package/dist/native/p-0ee428d5.entry.js +0 -2
- package/dist/native/p-0ee428d5.entry.js.map +0 -1
- package/dist/native/p-2691e02d.entry.js +0 -2
- package/dist/native/p-37f0210e.entry.js +0 -2
- package/dist/native/p-37f0210e.entry.js.map +0 -1
- package/dist/native/p-4a440970.entry.js +0 -2
- package/dist/native/p-4a440970.entry.js.map +0 -1
- package/dist/native/p-4ae26462.entry.js +0 -7
- package/dist/native/p-4ae26462.entry.js.map +0 -1
- package/dist/native/p-4d9c4618.entry.js +0 -2
- package/dist/native/p-4d9c4618.entry.js.map +0 -1
- package/dist/native/p-4dc1d036.entry.js +0 -2
- package/dist/native/p-59768ee5.js.map +0 -1
- package/dist/native/p-59e0bd2b.entry.js +0 -2
- package/dist/native/p-59e0bd2b.entry.js.map +0 -1
- package/dist/native/p-5c00f092.entry.js +0 -2
- package/dist/native/p-5c00f092.entry.js.map +0 -1
- package/dist/native/p-63e6aed3.entry.js.map +0 -1
- package/dist/native/p-7f5eb2ac.entry.js +0 -2
- package/dist/native/p-7f5eb2ac.entry.js.map +0 -1
- package/dist/native/p-84a73e2a.entry.js +0 -2
- package/dist/native/p-84a73e2a.entry.js.map +0 -1
- package/dist/native/p-9135fdf5.entry.js +0 -2
- package/dist/native/p-93dc2f47.entry.js +0 -2
- package/dist/native/p-93dc2f47.entry.js.map +0 -1
- package/dist/native/p-9a267f16.entry.js +0 -13
- package/dist/native/p-9a267f16.entry.js.map +0 -1
- package/dist/native/p-9d6431c7.entry.js +0 -2
- package/dist/native/p-9d6431c7.entry.js.map +0 -1
- package/dist/native/p-ab002252.js +0 -3
- package/dist/native/p-ab002252.js.map +0 -1
- package/dist/native/p-b2ce83ad.entry.js +0 -2
- package/dist/native/p-b2ce83ad.entry.js.map +0 -1
- package/dist/native/p-bad11367.entry.js.map +0 -1
- package/dist/native/p-e1a4f776.entry.js +0 -2
- package/dist/native/p-e1a4f776.entry.js.map +0 -1
- package/dist/native/p-e49bbd02.entry.js +0 -2
- package/dist/native/p-e49bbd02.entry.js.map +0 -1
- package/dist/native/p-eee01062.entry.js +0 -2
- package/dist/native/p-eee01062.entry.js.map +0 -1
- package/dist/native/p-f6bdc270.entry.js +0 -2
- package/dist/native/p-f6bdc270.entry.js.map +0 -1
- package/dist/types/interfaces/actionEvent.d.ts +0 -13
- package/dist/types/interfaces/calendarShortcut.d.ts +0 -17
- package/dist/types/interfaces/dateRange.d.ts +0 -13
- /package/dist/native/{p-6b348684.entry.js.map → p-0323daf6.entry.js.map} +0 -0
- /package/dist/native/{p-d5cbf5c8.entry.js.map → p-05d95d4d.entry.js.map} +0 -0
- /package/dist/native/{p-fb5bddba.entry.js.map → p-0ec1e2e3.entry.js.map} +0 -0
- /package/dist/native/{p-c7b201cd.entry.js.map → p-16a4cdf3.entry.js.map} +0 -0
- /package/dist/native/{p-0245863d.entry.js.map → p-407fc32d.entry.js.map} +0 -0
- /package/dist/native/{p-39bb95ff.entry.js.map → p-519b4819.entry.js.map} +0 -0
- /package/dist/native/{p-fa77a591.entry.js.map → p-5382eab2.entry.js.map} +0 -0
- /package/dist/native/{p-2691e02d.entry.js.map → p-7092a675.entry.js.map} +0 -0
- /package/dist/native/{p-d7a76400.entry.js.map → p-7c676f2c.entry.js.map} +0 -0
- /package/dist/native/{p-f85aca27.entry.js.map → p-9fba8663.entry.js.map} +0 -0
- /package/dist/native/{p-b094296d.entry.js.map → p-a2c0f1a7.entry.js.map} +0 -0
- /package/dist/native/{p-6ff228da.entry.js.map → p-c930adb7.entry.js.map} +0 -0
- /package/dist/native/{p-701b5557.entry.js.map → p-cfe0a6c6.entry.js.map} +0 -0
- /package/dist/native/{p-4dc1d036.entry.js.map → p-d07ab618.entry.js.map} +0 -0
- /package/dist/native/{p-e5de64d5.entry.js.map → p-f0ddf60b.entry.js.map} +0 -0
- /package/dist/native/{p-244f56ac.entry.js.map → p-fc3bea07.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fieldselect.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldselect/nv-fieldselect.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,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;IACxC,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,CACR;gBACE,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAA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AQ,EAAE,QAAQ,EAAE,IAAI,EAAE;oBACpD,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE;oBAClC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;oBAClD,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;iBACrC,CAAC;aACH;YACD,QAAQ,EAAE,oDAAqD;SAChE;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 NvFieldselectDocs: NovaDocs<Components.NvFieldselect> = {\n component: 'nv-fieldselect',\n subcomponents: ['nv-badge', 'nv-button'],\n stories: [\n {\n name: 'Default',\n description: 'A default nv-fieldselect with no specific props set.',\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.label),\n args: {\n label: 'Select Label',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.description),\n args: {\n label: 'Select with Description',\n description: 'This is a description.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'Placeholder',\n description:\n 'Display temporary text inside the select field to give users a hint about what to choose.',\n args: {\n label: 'Select with Placeholder',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"\" disabled>\n Choose an option...\n </option>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.value),\n args: {\n label: 'Select Value',\n value: '2',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.disabled),\n args: {\n label: 'Disabled Select',\n disabled: true,\n value: '3',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.readonly),\n args: {\n label: 'Readonly Select',\n readonly: true,\n value: '1',\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n <nv-fieldselect data-storybook-args multiple={true}>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.displayValue),\n args: {\n label: 'Readonly Select with Display Label',\n readonly: true,\n displayValue: true,\n value: '1',\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n </nv-fieldselect>\n <nv-fieldselect data-storybook-args multiple={true}>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.required),\n args: {\n label: 'Required Field',\n required: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.error),\n args: {\n label: 'Error State',\n error: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.success),\n args: {\n label: 'Success State',\n success: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.multiple),\n args: {\n label: 'Multiple Select',\n multiple: true,\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n <nv-fieldselect value=\"1, 2\" data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.autofocus),\n args: {\n label: 'Autofocus',\n autofocus: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotLabel',\n description:\n 'You can use the `label` slot to customize the content of the label.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"label\">Label</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotDescription',\n description:\n 'You can use the `description` slot to customize the content of the description.',\n args: {\n label: 'Select with Description',\n description: 'This is a description.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"description\">Description</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotBefore',\n description:\n 'You can use the `before` slot to customize the content before the select.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"before\">Before</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotAfter',\n description:\n 'You can use the `after` slot to customize the content after the select.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"after\">After</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotErrorDescription',\n description:\n 'You can use the `error-description` slot to customize the content of the error description.',\n args: {\n label: 'Select with Error',\n error: true,\n errorDescription: 'This is an error.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"error-description\">Error Description</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'Options JSON',\n args: {\n label: 'Select with JSON Options',\n options: JSON.stringify([\n { label: 'Paris', value: 'paris' },\n { label: 'London', value: 'london' },\n { label: 'New York', value: 'ny' },\n { label: 'Tokyo', value: 'tokyo', disabled: true },\n { label: 'Berlin', value: 'berlin' },\n ]),\n },\n template: <nv-fieldselect data-storybook-args></nv-fieldselect>,\n },\n {\n name: 'Options JSON Preselected',\n args: {\n label: 'Select with Preselected JSON Option',\n options: JSON.stringify([\n { label: 'Paris', value: 'paris' },\n { label: 'London', value: 'london', selected: true },\n { label: 'New York', value: 'ny' },\n { label: 'Tokyo', value: 'tokyo', disabled: true },\n { label: 'Berlin', value: 'berlin' },\n ]),\n },\n template: <nv-fieldselect data-storybook-args></nv-fieldselect>,\n },\n ],\n};\n\nexport default NvFieldselectDocs;\n"]}
|
|
1
|
+
{"version":3,"file":"nv-fieldselect.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldselect/nv-fieldselect.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,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;IACxC,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,CACR;gBACE,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAAQ,KAAK,EAAC,GAAG,eAAkB,CACpB,CAClB;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAA2B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;YACpD,IAAI,EAAE;gBACJ,KAAK,EAAE,cAAc;aACtB;YACD,QAAQ,EAAE,CACR;gBACE,cAAQ,KAAK,EAAC,GAAG,eAAkB;gBACnC,cAAQ,KAAK,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KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;oBACpD,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE;oBAClC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;oBAClD,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;iBACrC,CAAC;aACH;YACD,QAAQ,EAAE,oDAAqD;SAChE;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 NvFieldselectDocs: NovaDocs<Components.NvFieldselect> = {\n component: 'nv-fieldselect',\n subcomponents: ['nv-badge', 'nv-button'],\n stories: [\n {\n name: 'Default',\n description: 'A default nv-fieldselect with no specific props set.',\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.label),\n args: {\n label: 'Select Label',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.description),\n args: {\n label: 'Select with Description',\n description: 'This is a description.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'Placeholder',\n description:\n 'Display temporary text inside the select field to give users a hint about what to choose.',\n args: {\n label: 'Select with Placeholder',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"\" disabled>\n Choose an option...\n </option>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.value),\n args: {\n label: 'Select Value',\n value: '2',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.disabled),\n args: {\n label: 'Disabled Select',\n disabled: true,\n value: '3',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.readonly),\n args: {\n label: 'Readonly Select',\n readonly: true,\n value: '1',\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n <nv-fieldselect data-storybook-args multiple={true}>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.displayValue),\n args: {\n label: 'Readonly Select with Display Label',\n readonly: true,\n displayValue: true,\n value: '1',\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n </nv-fieldselect>\n <nv-fieldselect data-storybook-args multiple={true}>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.required),\n args: {\n label: 'Required Field',\n required: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.error),\n args: {\n label: 'Error State',\n error: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.success),\n args: {\n label: 'Success State',\n success: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.multiple),\n args: {\n label: 'Multiple Select',\n multiple: true,\n },\n template: (\n <div data-class=\"flex flex-col gap-2\">\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n <nv-fieldselect value=\"1, 2\" data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldselect>(x => x.autofocus),\n args: {\n label: 'Autofocus',\n autofocus: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotLabel',\n description:\n 'You can use the `label` slot to customize the content of the label.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"label\">Label</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.fluid),\n args: {\n label: 'Fluid',\n fluid: true,\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotDescription',\n description:\n 'You can use the `description` slot to customize the content of the description.',\n args: {\n label: 'Select with Description',\n description: 'This is a description.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"description\">Description</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotBefore',\n description:\n 'You can use the `before` slot to customize the content before the select.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"before\">Before</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotAfter',\n description:\n 'You can use the `after` slot to customize the content after the select.',\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"after\">After</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'SlotErrorDescription',\n description:\n 'You can use the `error-description` slot to customize the content of the error description.',\n args: {\n label: 'Select with Error',\n error: true,\n errorDescription: 'This is an error.',\n },\n template: (\n <nv-fieldselect data-storybook-args>\n <span slot=\"error-description\">Error Description</span>\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Option 2</option>\n <option value=\"3\">Option 3</option>\n <option value=\"4\">Option 4</option>\n </nv-fieldselect>\n ),\n },\n {\n name: 'Options JSON',\n args: {\n label: 'Select with JSON Options',\n options: JSON.stringify([\n { label: 'Paris', value: 'paris' },\n { label: 'London', value: 'london' },\n { label: 'New York', value: 'ny' },\n { label: 'Tokyo', value: 'tokyo', disabled: true },\n { label: 'Berlin', value: 'berlin' },\n ]),\n },\n template: <nv-fieldselect data-storybook-args></nv-fieldselect>,\n },\n {\n name: 'Options JSON Preselected',\n args: {\n label: 'Select with Preselected JSON Option',\n options: JSON.stringify([\n { label: 'Paris', value: 'paris' },\n { label: 'London', value: 'london', selected: true },\n { label: 'New York', value: 'ny' },\n { label: 'Tokyo', value: 'tokyo', disabled: true },\n { label: 'Berlin', value: 'berlin' },\n ]),\n },\n template: <nv-fieldselect data-storybook-args></nv-fieldselect>,\n },\n ],\n};\n\nexport default NvFieldselectDocs;\n"]}
|
|
@@ -80,6 +80,10 @@ export class NvFieldselect {
|
|
|
80
80
|
* element.
|
|
81
81
|
*/
|
|
82
82
|
this.autofocus = false;
|
|
83
|
+
/**
|
|
84
|
+
* Allows the field to stretch and fill the entire width of its container.
|
|
85
|
+
*/
|
|
86
|
+
this.fluid = false;
|
|
83
87
|
//#endregion WATCHERS
|
|
84
88
|
/****************************************************************************/
|
|
85
89
|
//#region METHODS
|
|
@@ -343,13 +347,13 @@ export class NvFieldselect {
|
|
|
343
347
|
* @returns {HTMLStencilElement} The HTML element to render.
|
|
344
348
|
*/
|
|
345
349
|
render() {
|
|
346
|
-
return (h(Host, { key: '
|
|
350
|
+
return (h(Host, { key: '06d38dd360011d4310d1c63851dc254e8ae47411' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'a0e46209c73e704d8d0f630baace2b1ce0eaed9c', htmlFor: this.inputId }, h("slot", { key: '6a43c979383647415044931d7a4e4d3a24f65921', name: "label" }, this.label))), h("div", { key: 'f2cee6021f85e64bd9d73d984e208903e3fda4c7', class: "select-wrapper" }, h("slot", { key: 'cae1c527e55c18f3e54d9c73390d6f17ccebce77', name: "before-input" }), h("div", { key: 'acb5dcbea269eb7dca558942f36b05c552924cbc', class: "select-container", onClick: this.handleSelectContainerClick }, h("slot", { key: 'e5c2a508a1297796f2693c76338c5b5f8e3e149e', name: "leading-input" }), this.internalReadonly && (h("input", { key: '28c38079050912f7d3b744de66ed48351dd890c3', id: this.inputId + '-readonly', type: "text", value: this.computedDisplayValue, readonly: true, class: "readonly-input", "aria-readonly": "true", "aria-label": this.label, "aria-describedby": this.error
|
|
347
351
|
? `${this.inputId}-error`
|
|
348
|
-
: `${this.inputId}-description` })), h("select", { key: '
|
|
352
|
+
: `${this.inputId}-description` })), h("select", { key: 'c409a9e0a26797981640092eb67b949c7d8f0cff', id: this.inputId, ref: el => (this.selectElement = el), name: this.name, autofocus: this.autofocus, disabled: this.disabled, required: this.required, multiple: this.multiple, onChange: this.handleSelectChange, class: this.internalReadonly ? 'hidden' : '', "aria-label": this.label, "aria-describedby": this.error
|
|
349
353
|
? `${this.inputId}-error`
|
|
350
|
-
: `${this.inputId}-description` }, this.parsedOptions.length > 0 ? (this.parsedOptions.map(option => (h("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (h("slot", null))), h("div", { key: '
|
|
351
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
352
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
354
|
+
: `${this.inputId}-description` }, this.parsedOptions.length > 0 ? (this.parsedOptions.map(option => (h("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (h("slot", null))), h("div", { key: 'a2402ea8d832e5612510dce7a3f50148b4edf39f', class: "select-icons" }, this.error && (h("nv-icon", { key: 'e291bff25fa6f06d3b27c3aaa805b46f674e1614', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: 'ce98cb12347722926677d9c3fc6f02e35a9c84e4', name: "circle-check", class: "validation", size: "md" })), !this.multiple && (h("nv-iconbutton", { key: 'e7fe760a5fa84ab0548ebd736a44da04908a4c07', name: "chevron-down", size: "md", emphasis: "lower", tabindex: -1 })))), h("slot", { key: 'd6253e2d56d4095bbe9ab12ca34ff28e06bd6b6d', name: "after-input" })), (this.description ||
|
|
355
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '703ad3ad8538ceab3c9eb03ae90c3552e1b6bf23', class: "description", id: `${this.inputId}-description` }, h("slot", { key: '010bbb23d2b947ed55c219ac64532f7dfd4f43cc', name: "description" }, this.description))), (this.errorDescription ||
|
|
356
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '70b696ec8f8badd4e064506eeba268755c9f2c09', class: "error-description", id: `${this.inputId}-error` }, h("slot", { key: '2ec5af60d2fca9a8f5baf59406a4661905aeab05', name: "error-description" }, this.errorDescription)))));
|
|
353
357
|
}
|
|
354
358
|
static get is() { return "nv-fieldselect"; }
|
|
355
359
|
static get formAssociated() { return true; }
|
|
@@ -709,6 +713,26 @@ export class NvFieldselect {
|
|
|
709
713
|
"attribute": "autofocus",
|
|
710
714
|
"reflect": true,
|
|
711
715
|
"defaultValue": "false"
|
|
716
|
+
},
|
|
717
|
+
"fluid": {
|
|
718
|
+
"type": "boolean",
|
|
719
|
+
"mutable": false,
|
|
720
|
+
"complexType": {
|
|
721
|
+
"original": "boolean",
|
|
722
|
+
"resolved": "boolean",
|
|
723
|
+
"references": {}
|
|
724
|
+
},
|
|
725
|
+
"required": false,
|
|
726
|
+
"optional": false,
|
|
727
|
+
"docs": {
|
|
728
|
+
"tags": [],
|
|
729
|
+
"text": "Allows the field to stretch and fill the entire width of its container."
|
|
730
|
+
},
|
|
731
|
+
"getter": false,
|
|
732
|
+
"setter": false,
|
|
733
|
+
"attribute": "fluid",
|
|
734
|
+
"reflect": true,
|
|
735
|
+
"defaultValue": "false"
|
|
712
736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EA,CAAC,IAAI,CAAC,gBAAgB;gBACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,IAAI,CACxD,4DAAK,KAAK,EAAC,mBAAmB,EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,QAAQ;gBACxD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n Element,\n State,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot default - Content to be placed inside the select element.\n * @slot leading-input - Content to be placed before the select input, within the select container.\n * @slot before-input - Content to be placed before the select input, outside the select container.\n * @slot after-input - Content to be placed after the select input, outside the select 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-fieldselect',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldselect.scss',\n})\nexport class NvFieldselect {\n @Element() el: HTMLNvFieldselectElement;\n private selectElement!: HTMLSelectElement;\n private internals: ElementInternals;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Select 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 STATES\n\n @State()\n private computedDisplayValue: string = '';\n\n @State()\n private internalReadonly: boolean = false;\n\n /**\n * Options to display in the select. Can be passed as a JSON string.\n * Format: [{ label: string, value: string, selected?: boolean, disabled?: boolean }]\n */\n @Prop({ reflect: true })\n readonly options?: string;\n\n /**\n * Parsed options stored internally\n */\n @State()\n private parsedOptions: Array<{\n /**\n * The label of the option\n */\n label: string;\n /**\n * The value of the option\n */\n value: string;\n /**\n * Whether the option is selected\n */\n selected?: boolean;\n /**\n * Whether the option is disabled\n */\n disabled?: boolean;\n }> = [];\n\n //#endregion STATES\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the select 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 choose in the\n * select 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 select field. This is\n * where you can clarify what users should choose 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 * Defines the name attribute of the select 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 selected 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 select field so that users can’t\n * choose something. 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 select 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 change or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the select 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 select 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 select 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 select field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * When enabled, allows the select to handle multiple selections.\n */\n @Prop({ reflect: true })\n readonly multiple: boolean = false;\n\n /**\n * The value of the select field.\n * - If `multiple` is `false`, it's a single string.\n * - If `multiple` is `true`, it's a comma-separated string of selected values.\n */\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * When enabled, displays the value element instead of the label when readonly.\n * By default, the label is displayed in readonly mode. Also it automatically\n * sets the component to readonly.\n */\n @Prop({ reflect: true })\n readonly displayValue: boolean = false;\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 a <select>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the selected value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>; // Emit as a string\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Updates the display value when the value property changes. This watcher is\n * used to update the display value when the selected value changes. This is\n * necessary for readonly select fields to display the selected value.\n * @internal This watcher is not intended to be called outside of the component.\n * @param {string} newValue - The new value of the select field.\n */\n @Watch('value')\n updateDisplayValueWatcher(newValue: string) {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n const selectedValues = newValue.split(',').map(val => val.trim());\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n\n if (!this.multiple) {\n this.selectElement.value = newValue; // Only set when not multiple\n }\n } else {\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Update form value\n this.setFormValue();\n }\n\n /**\n * Watcher for the displayValue prop to ensure internalReadonly is true when displayValue is true.\n * @param {boolean} newValue - The new value of displayValue.\n */\n @Watch('displayValue')\n handleDisplayValueChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.readonly) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Watcher for the readonly prop to ensure internalReadonly is true when readonly is true.\n * @param {boolean} newValue - The new value of readonly.\n */\n @Watch('readonly')\n handleReadonlyChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Parse options and update the internal state\n * @param {string} newValue - The new value of options\n */\n @Watch('options')\n handleOptionsChange(newValue: string) {\n if (typeof newValue === 'string') {\n try {\n const parsedOpts = JSON.parse(newValue);\n this.parsedOptions = [...parsedOpts];\n\n // Update the value if an option is pre-selected\n const selectedOption = parsedOpts.find(opt => opt.selected);\n if (selectedOption) {\n this.value = selectedOption.value;\n }\n } catch (error) {\n console.error('Error parsing options:', error);\n this.parsedOptions = [];\n }\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the change event on the select element. This method is used to\n * update the value property when the selected options change. It is also\n * used to emit the selectChanged event when the selected value changes.\n * @param {Event} event - The change event on the select element.\n * @emits selectChanged\n */\n private readonly handleSelectChange = (event: Event) => {\n const select = event.target as HTMLSelectElement;\n let selectedValues: string[] = Array.from(select.selectedOptions).map(\n option => option.value,\n );\n\n if (!this.multiple) {\n selectedValues = selectedValues.slice(0, 1);\n }\n\n this.value = this.multiple\n ? selectedValues.join(', ')\n : selectedValues[0] || '';\n this.valueChanged.emit(this.value);\n\n // Update form value\n this.setFormValue();\n };\n\n /**\n * Handles focus when the select container is clicked.\n */\n private readonly handleSelectContainerClick = () => {\n if (!this.internalReadonly && this.selectElement) {\n this.selectElement.focus();\n }\n };\n\n /**\n * Updates the display value of the select field. This method is used to\n * update the display value when the selected value changes. This is necessary\n * for readonly select fields to display the selected value. This method is\n * called in the componentDidLoad lifecycle hook and the updateDisplayValueWatcher\n * watcher.\n * @internal This method is not intended to be called outside of the component.\n */\n private updateDisplayValue(): void {\n if (this.internalReadonly && !this.displayValue) {\n if (this.multiple) {\n const selectedLabels = this.value\n .split(',')\n .map(key => key.trim())\n .map(key => this.getLabelFromId(key) || '')\n .filter(label => label !== '');\n this.computedDisplayValue = selectedLabels.join(', ') || '';\n } else {\n this.computedDisplayValue = this.getLabelFromId(this.value) || '';\n }\n } else if (this.internalReadonly && this.displayValue) {\n this.computedDisplayValue = this.value || '';\n }\n }\n\n /**\n * Retrieves the label from the <option> elements based on the provided key (value).\n * This method uses the id or value attribute directly from the <select> options.\n * @param {string} key - The key (value) for which to find the corresponding label.\n * @returns {string} The label if found; otherwise, an empty string.\n */\n private getLabelFromId(key: string): string {\n this.ensureSelectElement();\n if (!this.selectElement) {\n return '';\n }\n\n // Cache the option list\n const options = this.selectElement.options;\n\n if (options) {\n const option = Array.from(options).find(option => option.value === key);\n return option ? option.textContent.trim() || '' : '';\n } else {\n return '';\n }\n }\n\n /**\n * Sets the value of the form element for form submission. This method is\n * called when the selected value changes or when the value property is set.\n * @internal This method is not intended to be called outside of the component.\n */\n private setFormValue(): void {\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Ensures the select element is available. This method is used to ensure\n * the select element is available before attempting to access it.\n * @internal This method is not intended to be called outside of the component.\n */\n private ensureSelectElement(): void {\n if (!this.selectElement) {\n this.selectElement = this.el.querySelector('select') as HTMLSelectElement;\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n this.updateDisplayValue(); // Ensure display value is updated before render\n\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 /**\n * Lifecycle method that is called before the component is rendered. This is\n * where the internal state is set up before rendering occurs.\n */\n componentWillLoad() {\n // Set internalReadonly based on the readonly prop\n this.internalReadonly = this.readonly;\n\n // Ensure internalReadonly is true if displayValue is true during loading\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n\n if ('attachInternals' in this.el) {\n this.internals = (\n this.el as HTMLElement & {\n /**\n * Attach the element to the form internals.\n * @returns {ElementInternals} - The element internals object.\n */\n attachInternals: () => ElementInternals;\n }\n ).attachInternals();\n } else {\n // Fallback logic for browsers without attachInternals support\n this.internals = {\n setFormValue: (value: string) => {\n const formElement = this.el.closest('form');\n if (formElement) {\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = this.name;\n input.value = value;\n formElement.appendChild(input);\n }\n },\n } as ElementInternals;\n }\n\n // Initialize value as an empty string if multiple is true\n if (this.multiple && typeof this.value !== 'string') {\n this.value = '';\n }\n\n // Parse initial options if present\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n /**\n * Lifecycle method that is called after the component has been rendered.\n * This is where the display value is updated and the initial select element's\n * state is set.\n */\n componentDidLoad() {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n // Only set the value for single selection, skip for multiple\n if (!this.multiple) {\n this.selectElement.value = this.value;\n }\n\n const selectedValues = this.multiple\n ? this.value.split(',').map(v => v.trim())\n : [this.value];\n\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n } else {\n // Handle case where there are no options\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Set the initial form value\n this.setFormValue();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDERING\n\n /**\n * The render method creates the HTML structure for the component, including\n * the label, select element, and any error or description messages. It also\n * applies the appropriate CSS classes based on the readonly state and\n * displayValue prop. This method is called when the component is rendered.\n * @returns {HTMLStencilElement} The HTML element to 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=\"select-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"select-container\"\n onClick={this.handleSelectContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.internalReadonly && (\n <input\n id={this.inputId + '-readonly'}\n type=\"text\"\n value={this.computedDisplayValue}\n readonly\n class=\"readonly-input\"\n aria-readonly=\"true\"\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n />\n )}\n\n <select\n id={this.inputId}\n ref={el => (this.selectElement = el)}\n name={this.name}\n autofocus={this.autofocus}\n disabled={this.disabled}\n required={this.required}\n multiple={this.multiple}\n onChange={this.handleSelectChange}\n class={this.internalReadonly ? 'hidden' : ''}\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n >\n {this.parsedOptions.length > 0 ? (\n this.parsedOptions.map(option => (\n <option\n value={option.value}\n selected={option.selected}\n disabled={option.disabled}\n >\n {option.label}\n </option>\n ))\n ) : (\n <slot />\n )}\n </select>\n <div class=\"select-icons\">\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 {!this.multiple && (\n <nv-iconbutton\n name=\"chevron-down\"\n size=\"md\"\n emphasis=\"lower\"\n tabindex={-1}\n />\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\" id={`${this.inputId}-description`}>\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div class=\"error-description\" id={`${this.inputId}-error`}>\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDERING\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nv-fieldselect.js","sourceRoot":"","sources":["../../../src/components/nv-fieldselect/nv-fieldselect.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,OAAO,EACP,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC;;;;;;;;GAQG;AAOH,MAAM,OAAO,aAAa;IAN1B;QA4BE,uBAAuB;QACvB,8EAA8E;QAC9E,gBAAgB;QAGR,yBAAoB,GAAW,EAAE,CAAC;QAGlC,qBAAgB,GAAY,KAAK,CAAC;QAS1C;;WAEG;QAEK,kBAAa,GAiBhB,EAAE,CAAC;QAER,mBAAmB;QACnB,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QA2BpC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;WAGG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEH,UAAK,GAAY,KAAK,CAAC;QAWvB;;;WAGG;QAEM,YAAO,GAAY,KAAK,CAAC;QAElC;;WAEG;QAEM,aAAQ,G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/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot default - Content to be placed inside the select element.\n * @slot leading-input - Content to be placed before the select input, within the select container.\n * @slot before-input - Content to be placed before the select input, outside the select container.\n * @slot after-input - Content to be placed after the select input, outside the select 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-fieldselect',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldselect.scss',\n})\nexport class NvFieldselect {\n @Element() el: HTMLNvFieldselectElement;\n private selectElement!: HTMLSelectElement;\n private internals: ElementInternals;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Select 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 STATES\n\n @State()\n private computedDisplayValue: string = '';\n\n @State()\n private internalReadonly: boolean = false;\n\n /**\n * Options to display in the select. Can be passed as a JSON string.\n * Format: [{ label: string, value: string, selected?: boolean, disabled?: boolean }]\n */\n @Prop({ reflect: true })\n readonly options?: string;\n\n /**\n * Parsed options stored internally\n */\n @State()\n private parsedOptions: Array<{\n /**\n * The label of the option\n */\n label: string;\n /**\n * The value of the option\n */\n value: string;\n /**\n * Whether the option is selected\n */\n selected?: boolean;\n /**\n * Whether the option is disabled\n */\n disabled?: boolean;\n }> = [];\n\n //#endregion STATES\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the select 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 choose in the\n * select 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 select field. This is\n * where you can clarify what users should choose 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 * Defines the name attribute of the select 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 selected 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 select field so that users can’t\n * choose something. 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 select 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 change or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the select 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 select 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 select 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 select field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * When enabled, allows the select to handle multiple selections.\n */\n @Prop({ reflect: true })\n readonly multiple: boolean = false;\n\n /**\n * The value of the select field.\n * - If `multiple` is `false`, it's a single string.\n * - If `multiple` is `true`, it's a comma-separated string of selected values.\n */\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * When enabled, displays the value element instead of the label when readonly.\n * By default, the label is displayed in readonly mode. Also it automatically\n * sets the component to readonly.\n */\n @Prop({ reflect: true })\n readonly displayValue: boolean = false;\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 a <select>\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 selected value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>; // Emit as a string\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Updates the display value when the value property changes. This watcher is\n * used to update the display value when the selected value changes. This is\n * necessary for readonly select fields to display the selected value.\n * @internal This watcher is not intended to be called outside of the component.\n * @param {string} newValue - The new value of the select field.\n */\n @Watch('value')\n updateDisplayValueWatcher(newValue: string) {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n const selectedValues = newValue.split(',').map(val => val.trim());\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n\n if (!this.multiple) {\n this.selectElement.value = newValue; // Only set when not multiple\n }\n } else {\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Update form value\n this.setFormValue();\n }\n\n /**\n * Watcher for the displayValue prop to ensure internalReadonly is true when displayValue is true.\n * @param {boolean} newValue - The new value of displayValue.\n */\n @Watch('displayValue')\n handleDisplayValueChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.readonly) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Watcher for the readonly prop to ensure internalReadonly is true when readonly is true.\n * @param {boolean} newValue - The new value of readonly.\n */\n @Watch('readonly')\n handleReadonlyChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Parse options and update the internal state\n * @param {string} newValue - The new value of options\n */\n @Watch('options')\n handleOptionsChange(newValue: string) {\n if (typeof newValue === 'string') {\n try {\n const parsedOpts = JSON.parse(newValue);\n this.parsedOptions = [...parsedOpts];\n\n // Update the value if an option is pre-selected\n const selectedOption = parsedOpts.find(opt => opt.selected);\n if (selectedOption) {\n this.value = selectedOption.value;\n }\n } catch (error) {\n console.error('Error parsing options:', error);\n this.parsedOptions = [];\n }\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the change event on the select element. This method is used to\n * update the value property when the selected options change. It is also\n * used to emit the selectChanged event when the selected value changes.\n * @param {Event} event - The change event on the select element.\n * @emits selectChanged\n */\n private readonly handleSelectChange = (event: Event) => {\n const select = event.target as HTMLSelectElement;\n let selectedValues: string[] = Array.from(select.selectedOptions).map(\n option => option.value,\n );\n\n if (!this.multiple) {\n selectedValues = selectedValues.slice(0, 1);\n }\n\n this.value = this.multiple\n ? selectedValues.join(', ')\n : selectedValues[0] || '';\n this.valueChanged.emit(this.value);\n\n // Update form value\n this.setFormValue();\n };\n\n /**\n * Handles focus when the select container is clicked.\n */\n private readonly handleSelectContainerClick = () => {\n if (!this.internalReadonly && this.selectElement) {\n this.selectElement.focus();\n }\n };\n\n /**\n * Updates the display value of the select field. This method is used to\n * update the display value when the selected value changes. This is necessary\n * for readonly select fields to display the selected value. This method is\n * called in the componentDidLoad lifecycle hook and the updateDisplayValueWatcher\n * watcher.\n * @internal This method is not intended to be called outside of the component.\n */\n private updateDisplayValue(): void {\n if (this.internalReadonly && !this.displayValue) {\n if (this.multiple) {\n const selectedLabels = this.value\n .split(',')\n .map(key => key.trim())\n .map(key => this.getLabelFromId(key) || '')\n .filter(label => label !== '');\n this.computedDisplayValue = selectedLabels.join(', ') || '';\n } else {\n this.computedDisplayValue = this.getLabelFromId(this.value) || '';\n }\n } else if (this.internalReadonly && this.displayValue) {\n this.computedDisplayValue = this.value || '';\n }\n }\n\n /**\n * Retrieves the label from the <option> elements based on the provided key (value).\n * This method uses the id or value attribute directly from the <select> options.\n * @param {string} key - The key (value) for which to find the corresponding label.\n * @returns {string} The label if found; otherwise, an empty string.\n */\n private getLabelFromId(key: string): string {\n this.ensureSelectElement();\n if (!this.selectElement) {\n return '';\n }\n\n // Cache the option list\n const options = this.selectElement.options;\n\n if (options) {\n const option = Array.from(options).find(option => option.value === key);\n return option ? option.textContent.trim() || '' : '';\n } else {\n return '';\n }\n }\n\n /**\n * Sets the value of the form element for form submission. This method is\n * called when the selected value changes or when the value property is set.\n * @internal This method is not intended to be called outside of the component.\n */\n private setFormValue(): void {\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Ensures the select element is available. This method is used to ensure\n * the select element is available before attempting to access it.\n * @internal This method is not intended to be called outside of the component.\n */\n private ensureSelectElement(): void {\n if (!this.selectElement) {\n this.selectElement = this.el.querySelector('select') as HTMLSelectElement;\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n this.updateDisplayValue(); // Ensure display value is updated before render\n\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 /**\n * Lifecycle method that is called before the component is rendered. This is\n * where the internal state is set up before rendering occurs.\n */\n componentWillLoad() {\n // Set internalReadonly based on the readonly prop\n this.internalReadonly = this.readonly;\n\n // Ensure internalReadonly is true if displayValue is true during loading\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n\n if ('attachInternals' in this.el) {\n this.internals = (\n this.el as HTMLElement & {\n /**\n * Attach the element to the form internals.\n * @returns {ElementInternals} - The element internals object.\n */\n attachInternals: () => ElementInternals;\n }\n ).attachInternals();\n } else {\n // Fallback logic for browsers without attachInternals support\n this.internals = {\n setFormValue: (value: string) => {\n const formElement = this.el.closest('form');\n if (formElement) {\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = this.name;\n input.value = value;\n formElement.appendChild(input);\n }\n },\n } as ElementInternals;\n }\n\n // Initialize value as an empty string if multiple is true\n if (this.multiple && typeof this.value !== 'string') {\n this.value = '';\n }\n\n // Parse initial options if present\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n /**\n * Lifecycle method that is called after the component has been rendered.\n * This is where the display value is updated and the initial select element's\n * state is set.\n */\n componentDidLoad() {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n // Only set the value for single selection, skip for multiple\n if (!this.multiple) {\n this.selectElement.value = this.value;\n }\n\n const selectedValues = this.multiple\n ? this.value.split(',').map(v => v.trim())\n : [this.value];\n\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n } else {\n // Handle case where there are no options\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Set the initial form value\n this.setFormValue();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDERING\n\n /**\n * The render method creates the HTML structure for the component, including\n * the label, select element, and any error or description messages. It also\n * applies the appropriate CSS classes based on the readonly state and\n * displayValue prop. This method is called when the component is rendered.\n * @returns {HTMLStencilElement} The HTML element to 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=\"select-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"select-container\"\n onClick={this.handleSelectContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.internalReadonly && (\n <input\n id={this.inputId + '-readonly'}\n type=\"text\"\n value={this.computedDisplayValue}\n readonly\n class=\"readonly-input\"\n aria-readonly=\"true\"\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n />\n )}\n\n <select\n id={this.inputId}\n ref={el => (this.selectElement = el)}\n name={this.name}\n autofocus={this.autofocus}\n disabled={this.disabled}\n required={this.required}\n multiple={this.multiple}\n onChange={this.handleSelectChange}\n class={this.internalReadonly ? 'hidden' : ''}\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n >\n {this.parsedOptions.length > 0 ? (\n this.parsedOptions.map(option => (\n <option\n value={option.value}\n selected={option.selected}\n disabled={option.disabled}\n >\n {option.label}\n </option>\n ))\n ) : (\n <slot />\n )}\n </select>\n <div class=\"select-icons\">\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 {!this.multiple && (\n <nv-iconbutton\n name=\"chevron-down\"\n size=\"md\"\n emphasis=\"lower\"\n tabindex={-1}\n />\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\" id={`${this.inputId}-description`}>\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div class=\"error-description\" id={`${this.inputId}-error`}>\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDERING\n}\n"]}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { nameof } from "../../utils/class.utils";
|
|
3
|
+
const NvFieldsliderDocs = {
|
|
4
|
+
component: 'nv-fieldslider',
|
|
5
|
+
badge: 'danger',
|
|
6
|
+
stories: [
|
|
7
|
+
{
|
|
8
|
+
name: 'Default',
|
|
9
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: nameof(x => x.labelBeforeValue),
|
|
13
|
+
args: {
|
|
14
|
+
label: 'Price',
|
|
15
|
+
value: '50',
|
|
16
|
+
labelBeforeValue: '$',
|
|
17
|
+
},
|
|
18
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: nameof(x => x.labelAfterValue),
|
|
22
|
+
args: {
|
|
23
|
+
label: 'Distance',
|
|
24
|
+
value: '25',
|
|
25
|
+
labelAfterValue: 'km',
|
|
26
|
+
},
|
|
27
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'MinMax',
|
|
31
|
+
description: 'Slider with custom min/max range and initial value.',
|
|
32
|
+
args: {
|
|
33
|
+
label: 'Temperature (°C)',
|
|
34
|
+
min: -20,
|
|
35
|
+
max: 40,
|
|
36
|
+
value: '22',
|
|
37
|
+
labelAfterValue: '°C',
|
|
38
|
+
},
|
|
39
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: nameof(x => x.step),
|
|
43
|
+
args: {
|
|
44
|
+
label: 'Volume (increments of 5)',
|
|
45
|
+
min: 0,
|
|
46
|
+
max: 100,
|
|
47
|
+
value: '25',
|
|
48
|
+
step: 5,
|
|
49
|
+
},
|
|
50
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: nameof(x => x.snap),
|
|
54
|
+
args: {
|
|
55
|
+
label: 'Snapping Slider',
|
|
56
|
+
min: 0,
|
|
57
|
+
max: 100,
|
|
58
|
+
value: '35',
|
|
59
|
+
step: 5,
|
|
60
|
+
snap: true,
|
|
61
|
+
},
|
|
62
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: nameof(x => x.showTicks),
|
|
66
|
+
args: {
|
|
67
|
+
label: 'Volume',
|
|
68
|
+
min: 0,
|
|
69
|
+
max: 100,
|
|
70
|
+
value: '40',
|
|
71
|
+
step: 10,
|
|
72
|
+
snap: true,
|
|
73
|
+
showTicks: true,
|
|
74
|
+
},
|
|
75
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: nameof(x => x.ticks),
|
|
79
|
+
args: {
|
|
80
|
+
label: 'Temperature (°C)',
|
|
81
|
+
min: 0,
|
|
82
|
+
max: 100,
|
|
83
|
+
value: '7',
|
|
84
|
+
step: 1,
|
|
85
|
+
labelAfterValue: '°C',
|
|
86
|
+
ticks: [
|
|
87
|
+
{ value: 10, label: 'Cold' },
|
|
88
|
+
{ value: 80, label: 'Hot' },
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: nameof(x => x.snapTicks),
|
|
95
|
+
description: 'When snapTicks is true, the slider will snap to custom tick values rather than regular steps.',
|
|
96
|
+
args: {
|
|
97
|
+
label: 'Custom Pricing Tiers ($)',
|
|
98
|
+
min: 0,
|
|
99
|
+
max: 100,
|
|
100
|
+
value: '10',
|
|
101
|
+
step: 1,
|
|
102
|
+
snapTicks: true,
|
|
103
|
+
ticks: [
|
|
104
|
+
{ value: 0, label: 'Free' },
|
|
105
|
+
{ value: 10, label: 'Basic' },
|
|
106
|
+
{ value: 30, label: 'Pro' },
|
|
107
|
+
{ value: 75, label: 'Business' },
|
|
108
|
+
{ value: 100, label: 'Enterprise' },
|
|
109
|
+
],
|
|
110
|
+
labelAfterValue: '$',
|
|
111
|
+
},
|
|
112
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: nameof(x => x.hasField),
|
|
116
|
+
args: {
|
|
117
|
+
label: 'Price',
|
|
118
|
+
min: 0,
|
|
119
|
+
max: 1000,
|
|
120
|
+
value: '550',
|
|
121
|
+
step: 10,
|
|
122
|
+
hasField: true,
|
|
123
|
+
},
|
|
124
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: nameof(x => x.range),
|
|
128
|
+
args: {
|
|
129
|
+
label: 'Price Range ($)',
|
|
130
|
+
min: 0,
|
|
131
|
+
max: 1000,
|
|
132
|
+
value: '200,800',
|
|
133
|
+
step: 50,
|
|
134
|
+
range: true,
|
|
135
|
+
labelAfterValue: '$',
|
|
136
|
+
},
|
|
137
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'RangeFields',
|
|
141
|
+
description: 'Range slider with editable numeric fields for both values.',
|
|
142
|
+
args: {
|
|
143
|
+
label: 'Filter by Price ($)',
|
|
144
|
+
min: 0,
|
|
145
|
+
max: 1000,
|
|
146
|
+
value: '250,750',
|
|
147
|
+
step: 10,
|
|
148
|
+
range: true,
|
|
149
|
+
hasField: true,
|
|
150
|
+
labelAfterValue: '$',
|
|
151
|
+
},
|
|
152
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: nameof(x => x.hideLabel),
|
|
156
|
+
args: {
|
|
157
|
+
label: 'Volume Level',
|
|
158
|
+
hideLabel: true,
|
|
159
|
+
value: '75',
|
|
160
|
+
},
|
|
161
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: nameof(x => x.error),
|
|
165
|
+
args: {
|
|
166
|
+
label: 'Budget ($)',
|
|
167
|
+
value: '1500,20000',
|
|
168
|
+
min: 0,
|
|
169
|
+
max: 100000,
|
|
170
|
+
range: true,
|
|
171
|
+
error: true,
|
|
172
|
+
labelAfterValue: '$',
|
|
173
|
+
},
|
|
174
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: nameof(x => x.errorDescription),
|
|
178
|
+
args: {
|
|
179
|
+
label: 'Budget ($)',
|
|
180
|
+
value: '1500,20000',
|
|
181
|
+
min: 0,
|
|
182
|
+
max: 100000,
|
|
183
|
+
range: true,
|
|
184
|
+
error: true,
|
|
185
|
+
errorDescription: 'Not enough funds!',
|
|
186
|
+
labelAfterValue: '$',
|
|
187
|
+
},
|
|
188
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: nameof(x => x.success),
|
|
192
|
+
args: {
|
|
193
|
+
label: 'Target Achieved',
|
|
194
|
+
value: '30,70',
|
|
195
|
+
range: true,
|
|
196
|
+
min: 0,
|
|
197
|
+
max: 100,
|
|
198
|
+
success: true,
|
|
199
|
+
},
|
|
200
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: nameof(x => x.disabled),
|
|
204
|
+
args: {
|
|
205
|
+
label: 'Settings (Locked)',
|
|
206
|
+
value: '30',
|
|
207
|
+
disabled: true,
|
|
208
|
+
},
|
|
209
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: nameof(x => x.readonly),
|
|
213
|
+
args: {
|
|
214
|
+
label: 'Current Progress',
|
|
215
|
+
value: '65',
|
|
216
|
+
readonly: true,
|
|
217
|
+
},
|
|
218
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: nameof(x => x.fluid),
|
|
222
|
+
args: {
|
|
223
|
+
label: 'Full Width Slider',
|
|
224
|
+
value: '50',
|
|
225
|
+
fluid: true,
|
|
226
|
+
},
|
|
227
|
+
template: h("nv-fieldslider", { "data-storybook-args": true }),
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'labelSlot',
|
|
231
|
+
description: 'Content to be placed as the label, will override the label prop.',
|
|
232
|
+
args: {
|
|
233
|
+
label: 'Original Label',
|
|
234
|
+
value: '45',
|
|
235
|
+
},
|
|
236
|
+
template: (h("nv-fieldslider", { "data-storybook-args": true }, h("span", { slot: "label" }, "Custom Label"))),
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: 'descriptionSlot',
|
|
240
|
+
description: 'Content to be placed as the description, will override the description prop.',
|
|
241
|
+
args: {
|
|
242
|
+
label: 'Description Example',
|
|
243
|
+
description: 'Original description',
|
|
244
|
+
value: '60',
|
|
245
|
+
},
|
|
246
|
+
template: (h("nv-fieldslider", { "data-storybook-args": true }, h("span", { slot: "description" }, "Custom Description"))),
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: 'errorDescriptionSlot',
|
|
250
|
+
description: 'Content to be placed as the error description, will override the errorDescription prop.',
|
|
251
|
+
args: {
|
|
252
|
+
label: 'Error Description Example',
|
|
253
|
+
errorDescription: 'Original error description',
|
|
254
|
+
value: '150',
|
|
255
|
+
min: 0,
|
|
256
|
+
max: 100,
|
|
257
|
+
error: true,
|
|
258
|
+
},
|
|
259
|
+
template: (h("nv-fieldslider", { "data-storybook-args": true }, h("span", { slot: "error-description" }, "Custom Error Description"))),
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
};
|
|
263
|
+
export default NvFieldsliderDocs;
|
|
264
|
+
//# sourceMappingURL=nv-fieldslider.docs.js.map
|
|
@@ -0,0 +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,QAAQ;IACf,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,o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;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: 'danger',\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"]}
|