@nova-design-system/nova-webcomponents 3.0.0-beta.38 → 3.0.0-beta.39
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/blazor-docs.json +928 -198
- package/dist/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/{constants-69b40456.js → constants-2ae3d9eb.js} +22 -2
- package/dist/cjs/constants-2ae3d9eb.js.map +1 -0
- package/dist/cjs/index-5910ba06.js +8 -4
- package/dist/cjs/index.cjs.js +3 -1
- 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 +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +984 -0
- package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagridbody.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagriddatacell.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagridhead.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagridrow.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +2 -2
- 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 +10 -4
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +146 -223
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +37 -32
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +12 -11
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +9 -3
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +9 -3
- package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +9 -3
- package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +11 -5
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +9 -3
- package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +9 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +20 -12
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +19 -12
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton.cjs.entry.js +1 -1
- package/dist/cjs/nv-loader.cjs.entry.js +1 -1
- package/dist/cjs/nv-menu.cjs.entry.js +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +2 -2
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-tablebody.cjs.entry.js +1 -1
- package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-tabledatacell.cjs.entry.js +1 -1
- package/dist/cjs/nv-tablehead.cjs.entry.js +1 -1
- package/dist/cjs/nv-tablerow.cjs.entry.js +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/uri.utils-8523ad2b.js +26 -0
- package/dist/cjs/uri.utils-8523ad2b.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/nv-calendar/nv-calendar.css +341 -0
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js +401 -0
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -0
- package/dist/collection/components/nv-calendar/nv-calendar.js +1328 -0
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -0
- package/dist/collection/components/nv-col/nv-col.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +2 -2
- package/dist/collection/components/nv-datagridbody/nv-datagridbody.js +1 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.js +1 -1
- package/dist/collection/components/nv-datagridhead/nv-datagridhead.js +1 -1
- package/dist/collection/components/nv-datagridrow/nv-datagridrow.js +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.css +2 -0
- package/dist/collection/components/nv-dialog/nv-dialog.js +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.js +8 -0
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +30 -4
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +11 -3
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +197 -252
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/{nv-fielddropdown.css → styles/nv-fielddropdown.css} +0 -3
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +55 -47
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js.map +1 -1
- package/dist/collection/components/nv-fielddropdownitem/{nv-fielddropdownitem.css → styles/nv-fielddropdownitem.css} +5 -3
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +0 -2
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +10 -2
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +34 -33
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -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 +29 -3
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -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 +30 -4
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js +8 -0
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +29 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +8 -19
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +31 -5
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +8 -0
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +30 -4
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -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 +29 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.css +20 -17
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +8 -0
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +38 -10
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
- package/dist/collection/components/nv-icon/nv-icon.js +19 -17
- package/dist/collection/components/nv-icon/nv-icon.js.map +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
- package/dist/collection/components/nv-popover/nv-popover.css +3 -0
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +2 -2
- package/dist/collection/components/nv-tablebody/nv-tablebody.js +1 -1
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js +1 -1
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.js +1 -1
- package/dist/collection/components/nv-tablehead/nv-tablehead.js +1 -1
- package/dist/collection/components/nv-tablerow/nv-tablerow.js +1 -1
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/interfaces/calendarShortcut.js +2 -0
- package/dist/collection/interfaces/calendarShortcut.js.map +1 -0
- package/dist/collection/interfaces/dateRange.js +2 -0
- package/dist/collection/interfaces/dateRange.js.map +1 -0
- package/dist/collection/interfaces/localization.js +2 -0
- package/dist/collection/interfaces/localization.js.map +1 -0
- package/dist/collection/templates/navigation.docs.js +5 -0
- package/dist/collection/templates/navigation.docs.js.map +1 -1
- package/dist/collection/utils/constants.js +18 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/test/uri.utils.test.js +21 -0
- package/dist/collection/utils/test/uri.utils.test.js.map +1 -0
- package/dist/collection/utils/uri.utils.js +15 -0
- package/dist/collection/utils/uri.utils.js.map +1 -0
- package/dist/components/index.js +3 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-alert.js +2 -2
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +2 -2
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.d.ts +11 -0
- package/dist/components/nv-calendar.js +1046 -0
- package/dist/components/nv-calendar.js.map +1 -0
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +2 -2
- package/dist/components/nv-datagridbody.js +1 -1
- package/dist/components/nv-datagridcolumn.js +1 -1
- package/dist/components/nv-datagriddatacell.js +1 -1
- package/dist/components/nv-datagridhead.js +1 -1
- package/dist/components/nv-datagridrow.js +1 -1
- package/dist/components/nv-dialog.js +7 -7
- 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-fielddropdown.js +154 -230
- 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 +21 -19
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +12 -5
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +13 -6
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +11 -4
- package/dist/components/nv-fieldradio.js.map +1 -1
- package/dist/components/nv-fieldselect.js +13 -6
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldtext.js +12 -5
- package/dist/components/nv-fieldtext.js.map +1 -1
- package/dist/components/nv-fieldtextarea.js +11 -4
- package/dist/components/nv-fieldtextarea.js.map +1 -1
- package/dist/components/nv-fieldtime.js +25 -16
- package/dist/components/nv-fieldtime.js.map +1 -1
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +4 -4
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-tablebody.js +1 -1
- package/dist/components/nv-tablecolumn.js +1 -1
- package/dist/components/nv-tabledatacell.js +1 -1
- package/dist/components/nv-tablehead.js +1 -1
- package/dist/components/nv-tablerow.js +1 -1
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-802c9204.js → p-17b6705f.js} +5 -5
- package/dist/components/{p-802c9204.js.map → p-17b6705f.js.map} +1 -1
- package/dist/components/{p-2768d2c0.js → p-33e07c91.js} +2 -2
- package/dist/components/{p-2768d2c0.js.map → p-33e07c91.js.map} +1 -1
- package/dist/components/{p-b877a150.js → p-48317c2c.js} +3 -3
- package/dist/components/{p-b877a150.js.map → p-48317c2c.js.map} +1 -1
- package/dist/components/{p-a9a52105.js → p-492ad81d.js} +1178 -5
- package/dist/components/p-492ad81d.js.map +1 -0
- package/dist/components/{p-d20958c4.js → p-5f5e2bf2.js} +21 -15
- package/dist/components/p-5f5e2bf2.js.map +1 -0
- package/dist/components/{p-1c83f303.js → p-659a5ae4.js} +4 -4
- package/dist/components/{p-1c83f303.js.map → p-659a5ae4.js.map} +1 -1
- package/dist/components/{p-18d221e3.js → p-73e703a1.js} +2 -2
- package/dist/components/{p-18d221e3.js.map → p-73e703a1.js.map} +1 -1
- package/dist/components/p-7e58e7d1.js +23 -0
- package/dist/components/p-7e58e7d1.js.map +1 -0
- package/dist/components/{p-16badb3b.js → p-83e1177b.js} +3 -3
- package/dist/components/{p-16badb3b.js.map → p-83e1177b.js.map} +1 -1
- package/dist/components/{p-ab87be7f.js → p-842afd9a.js} +3 -3
- package/dist/components/{p-ab87be7f.js.map → p-842afd9a.js.map} +1 -1
- package/dist/components/{p-79bf6acb.js → p-88165c0e.js} +2 -2
- package/dist/components/{p-79bf6acb.js.map → p-88165c0e.js.map} +1 -1
- package/dist/components/{p-91bf0cb6.js → p-8d7a57d1.js} +3 -3
- package/dist/components/{p-91bf0cb6.js.map → p-8d7a57d1.js.map} +1 -1
- package/dist/components/p-c1765831.js +89 -0
- package/dist/components/p-c1765831.js.map +1 -0
- package/dist/components/p-f40a7e2f.js +95 -0
- package/dist/components/p-f40a7e2f.js.map +1 -0
- package/dist/{esm/constants-0181211f.js → components/p-fd65c51f.js} +22 -3
- package/dist/components/p-fd65c51f.js.map +1 -0
- package/dist/components/{p-98ff0e5f.js → p-fdf57d25.js} +13 -6
- package/dist/components/p-fdf57d25.js.map +1 -0
- package/dist/docs.json +868 -145
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/{components/p-56f71851.js → esm/constants-8243d2ea.js} +22 -3
- package/dist/esm/constants-8243d2ea.js.map +1 -0
- package/dist/esm/index-fac2d5d2.js +8 -4
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/native.js +2 -2
- package/dist/esm/nv-alert.entry.js +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +980 -0
- package/dist/esm/nv-calendar.entry.js.map +1 -0
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +2 -2
- package/dist/esm/nv-datagridbody.entry.js +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +1 -1
- package/dist/esm/nv-datagriddatacell.entry.js +1 -1
- package/dist/esm/nv-datagridhead.entry.js +1 -1
- package/dist/esm/nv-datagridrow.entry.js +1 -1
- package/dist/esm/nv-dialog.entry.js +2 -2
- 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 +10 -4
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +146 -223
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +37 -32
- package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +12 -11
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +9 -3
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +9 -3
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +9 -3
- package/dist/esm/nv-fieldradio.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +11 -5
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +9 -3
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +9 -3
- package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +20 -12
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +19 -12
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton.entry.js +1 -1
- package/dist/esm/nv-loader.entry.js +1 -1
- package/dist/esm/nv-menu.entry.js +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +2 -2
- package/dist/esm/nv-popover.entry.js.map +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-tablebody.entry.js +1 -1
- package/dist/esm/nv-tablecolumn.entry.js +1 -1
- package/dist/esm/nv-tabledatacell.entry.js +1 -1
- package/dist/esm/nv-tablehead.entry.js +1 -1
- package/dist/esm/nv-tablerow.entry.js +1 -1
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/esm/uri.utils-4c2a1e4c.js +23 -0
- package/dist/esm/uri.utils-4c2a1e4c.js.map +1 -0
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-8f4788b9.entry.js → p-1bae8cdd.entry.js} +2 -2
- package/dist/native/{p-8c1a6aa6.entry.js → p-1ca72f74.entry.js} +2 -2
- package/dist/native/{p-d67b7502.entry.js → p-2151f564.entry.js} +2 -2
- package/dist/native/{p-87083363.entry.js → p-2b99e720.entry.js} +2 -2
- package/dist/native/{p-87083363.entry.js.map → p-2b99e720.entry.js.map} +1 -1
- package/dist/native/p-3422397d.entry.js +2 -0
- package/dist/native/{p-e3827605.entry.js → p-39b4ec02.entry.js} +2 -2
- package/dist/native/p-39b4ec02.entry.js.map +1 -0
- package/dist/native/{p-a06bafad.entry.js → p-3b2c7871.entry.js} +2 -2
- package/dist/native/{p-51ad8bcd.entry.js → p-3bfd5a30.entry.js} +2 -2
- package/dist/native/p-3bfd5a30.entry.js.map +1 -0
- package/dist/native/p-44e7e3e8.entry.js +2 -0
- package/dist/native/p-44e7e3e8.entry.js.map +1 -0
- package/dist/native/p-46c9aa04.entry.js +2 -0
- package/dist/native/p-46c9aa04.entry.js.map +1 -0
- package/dist/native/p-4a7fa613.entry.js +2 -0
- package/dist/native/{p-96902bb3.entry.js.map → p-4a7fa613.entry.js.map} +1 -1
- package/dist/native/{p-e192c25c.entry.js → p-4db7add6.entry.js} +2 -2
- package/dist/native/{p-a998f8df.entry.js → p-4eacd598.entry.js} +2 -2
- package/dist/native/p-51e0c5d3.entry.js +2 -0
- package/dist/native/{p-2aebf31b.entry.js.map → p-51e0c5d3.entry.js.map} +1 -1
- package/dist/native/p-57513eb0.entry.js +2 -0
- package/dist/native/{p-ab5a8ce5.entry.js.map → p-57513eb0.entry.js.map} +1 -1
- package/dist/native/p-5851fbed.entry.js +2 -0
- package/dist/native/{p-61d2cb2e.entry.js → p-634b49fe.entry.js} +2 -2
- package/dist/native/{p-211f7b19.entry.js → p-63c894f0.entry.js} +2 -2
- package/dist/native/{p-130f6c47.entry.js → p-6acbf729.entry.js} +2 -2
- package/dist/native/p-6acbf729.entry.js.map +1 -0
- package/dist/native/{p-bd6d9237.entry.js → p-7211a3cb.entry.js} +2 -2
- package/dist/native/{p-bd6d9237.entry.js.map → p-7211a3cb.entry.js.map} +1 -1
- package/dist/native/p-79765c7d.entry.js +2 -0
- package/dist/native/p-7e58e7d1.js +2 -0
- package/dist/native/p-7e58e7d1.js.map +1 -0
- package/dist/native/{p-3c004551.entry.js → p-833af1bf.entry.js} +2 -2
- package/dist/native/p-833af1bf.entry.js.map +1 -0
- package/dist/native/p-87bd53df.entry.js +2 -0
- package/dist/native/p-87bd53df.entry.js.map +1 -0
- package/dist/native/p-8b323a15.entry.js +2 -0
- package/dist/native/{p-10ba289c.entry.js.map → p-8b323a15.entry.js.map} +1 -1
- package/dist/native/p-943a19a5.entry.js +2 -0
- package/dist/native/{p-8ee30013.entry.js.map → p-943a19a5.entry.js.map} +1 -1
- package/dist/native/{p-2f62f097.entry.js → p-9c8eadde.entry.js} +2 -2
- package/dist/native/p-ac81e143.entry.js +2 -0
- package/dist/native/p-ac81e143.entry.js.map +1 -0
- package/dist/native/{p-99e7a452.entry.js → p-afc16010.entry.js} +2 -2
- package/dist/native/p-afc16010.entry.js.map +1 -0
- package/dist/native/{p-54df2174.entry.js → p-b13b2663.entry.js} +2 -2
- package/dist/native/p-b13b2663.entry.js.map +1 -0
- package/dist/native/p-b2ace8e9.entry.js +2 -0
- package/dist/native/p-b2ace8e9.entry.js.map +1 -0
- package/dist/native/{p-4f11286d.entry.js → p-bac62e20.entry.js} +2 -2
- package/dist/native/{p-46553ffd.entry.js → p-bfb6e22c.entry.js} +2 -2
- package/dist/native/p-c29be15d.entry.js +2 -0
- package/dist/native/{p-aa2834e2.entry.js.map → p-c29be15d.entry.js.map} +1 -1
- package/dist/native/{p-1bb5a6bd.entry.js → p-cba14168.entry.js} +2 -2
- package/dist/native/p-cba14168.entry.js.map +1 -0
- package/dist/native/p-dbb89408.entry.js +2 -0
- package/dist/native/p-e1255160.js +2 -0
- package/dist/native/p-e1255160.js.map +1 -0
- package/dist/native/p-e1b22ca7.entry.js +2 -0
- package/dist/native/p-e1b22ca7.entry.js.map +1 -0
- package/dist/native/{p-d776ed48.entry.js → p-ef9b66d4.entry.js} +2 -2
- package/dist/native/p-f867541d.entry.js +2 -0
- package/dist/native/p-f954a077.entry.js +2 -0
- package/dist/native/{p-f30ce086.entry.js.map → p-f954a077.entry.js.map} +1 -1
- package/dist/native/{p-d24586ed.entry.js → p-fa33ec18.entry.js} +2 -2
- package/dist/native/{p-56f71851.js → p-fd65c51f.js} +2 -2
- package/dist/native/p-fd65c51f.js.map +1 -0
- package/dist/native/p-ff7eea0e.entry.js +2 -0
- package/dist/types/components/nv-calendar/nv-calendar.d.ts +383 -0
- package/dist/types/components/nv-calendar/nv-calendar.docs.d.ts +4 -0
- package/dist/types/components/nv-fieldcheckbox/nv-fieldcheckbox.d.ts +6 -0
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +45 -62
- package/dist/types/components/nv-fielddropdownitem/nv-fielddropdownitem.d.ts +27 -13
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +7 -10
- package/dist/types/components/nv-fieldnumber/nv-fieldnumber.d.ts +6 -0
- package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +6 -0
- package/dist/types/components/nv-fieldradio/nv-fieldradio.d.ts +6 -0
- package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +6 -0
- package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +6 -0
- package/dist/types/components/nv-fieldtextarea/nv-fieldtextarea.d.ts +6 -0
- package/dist/types/components/nv-fieldtime/nv-fieldtime.d.ts +6 -0
- package/dist/types/components/nv-icon/nv-icon.d.ts +6 -4
- package/dist/types/components.d.ts +292 -28
- package/dist/types/index.d.ts +4 -0
- package/dist/types/interfaces/calendarShortcut.d.ts +17 -0
- package/dist/types/interfaces/dateRange.d.ts +13 -0
- package/dist/types/interfaces/localization.d.ts +9 -0
- package/dist/types/utils/constants.d.ts +2 -0
- package/dist/types/utils/uri.utils.d.ts +6 -0
- package/dist/vscode-data.json +180 -56
- package/hydrate/index.js +2104 -1085
- package/hydrate/index.mjs +2104 -1085
- package/package.json +7 -3
- package/dist/cjs/app-globals-bd4d701e.js +0 -11
- package/dist/cjs/app-globals-bd4d701e.js.map +0 -1
- package/dist/cjs/constants-69b40456.js.map +0 -1
- package/dist/collection/components/nv-fielddropdownitem/DropdownItemSelectedEventDetail.js +0 -2
- package/dist/collection/components/nv-fielddropdownitem/DropdownItemSelectedEventDetail.js.map +0 -1
- package/dist/collection/dev/dev-components.js +0 -3
- package/dist/collection/dev/dev-components.js.map +0 -1
- package/dist/collection/dev/dev-forms.js +0 -3
- package/dist/collection/dev/dev-forms.js.map +0 -1
- package/dist/collection/dev/dev-root.js +0 -23
- package/dist/collection/dev/dev-root.js.map +0 -1
- package/dist/collection/dev/dev-utils.js +0 -54
- package/dist/collection/dev/dev-utils.js.map +0 -1
- package/dist/collection/global.js +0 -6
- package/dist/collection/global.js.map +0 -1
- package/dist/components/p-17714233.js +0 -1263
- package/dist/components/p-17714233.js.map +0 -1
- package/dist/components/p-56f71851.js.map +0 -1
- package/dist/components/p-98ff0e5f.js.map +0 -1
- package/dist/components/p-a9a52105.js.map +0 -1
- package/dist/components/p-d20958c4.js.map +0 -1
- package/dist/components/p-dd34b97d.js +0 -90
- package/dist/components/p-dd34b97d.js.map +0 -1
- package/dist/esm/app-globals-0a94217b.js +0 -9
- package/dist/esm/app-globals-0a94217b.js.map +0 -1
- package/dist/esm/constants-0181211f.js.map +0 -1
- package/dist/native/p-02bb8184.entry.js +0 -2
- package/dist/native/p-09850aa9.entry.js +0 -2
- package/dist/native/p-09850aa9.entry.js.map +0 -1
- package/dist/native/p-10ba289c.entry.js +0 -2
- package/dist/native/p-1208abf2.entry.js +0 -2
- package/dist/native/p-1208abf2.entry.js.map +0 -1
- package/dist/native/p-130f6c47.entry.js.map +0 -1
- package/dist/native/p-180c45ff.entry.js +0 -2
- package/dist/native/p-180c45ff.entry.js.map +0 -1
- package/dist/native/p-1bb5a6bd.entry.js.map +0 -1
- package/dist/native/p-273d55e5.entry.js +0 -2
- package/dist/native/p-273d55e5.entry.js.map +0 -1
- package/dist/native/p-2aebf31b.entry.js +0 -2
- package/dist/native/p-3c004551.entry.js.map +0 -1
- package/dist/native/p-51ad8bcd.entry.js.map +0 -1
- package/dist/native/p-54df2174.entry.js.map +0 -1
- package/dist/native/p-56f71851.js.map +0 -1
- package/dist/native/p-892052c2.entry.js +0 -2
- package/dist/native/p-8ee30013.entry.js +0 -2
- package/dist/native/p-96902bb3.entry.js +0 -2
- package/dist/native/p-99e7a452.entry.js.map +0 -1
- package/dist/native/p-aa2834e2.entry.js +0 -2
- package/dist/native/p-ab5a8ce5.entry.js +0 -2
- package/dist/native/p-c398cdb4.entry.js +0 -2
- package/dist/native/p-c398cdb4.entry.js.map +0 -1
- package/dist/native/p-dc9dd5a7.entry.js +0 -2
- package/dist/native/p-e3827605.entry.js.map +0 -1
- package/dist/native/p-e5a7596b.entry.js +0 -2
- package/dist/native/p-e6f45df2.entry.js +0 -2
- package/dist/native/p-ed47a702.entry.js +0 -2
- package/dist/native/p-f30ce086.entry.js +0 -2
- package/dist/native/p-f3fbdea6.js +0 -2
- package/dist/native/p-f3fbdea6.js.map +0 -1
- package/dist/types/components/nv-fielddropdownitem/DropdownItemSelectedEventDetail.d.ts +0 -21
- package/dist/types/dev/dev-components.d.ts +0 -2
- package/dist/types/dev/dev-forms.d.ts +0 -2
- package/dist/types/dev/dev-utils.d.ts +0 -17
- package/dist/types/global.d.ts +0 -1
- /package/dist/native/{p-8f4788b9.entry.js.map → p-1bae8cdd.entry.js.map} +0 -0
- /package/dist/native/{p-8c1a6aa6.entry.js.map → p-1ca72f74.entry.js.map} +0 -0
- /package/dist/native/{p-d67b7502.entry.js.map → p-2151f564.entry.js.map} +0 -0
- /package/dist/native/{p-dc9dd5a7.entry.js.map → p-3422397d.entry.js.map} +0 -0
- /package/dist/native/{p-a06bafad.entry.js.map → p-3b2c7871.entry.js.map} +0 -0
- /package/dist/native/{p-e192c25c.entry.js.map → p-4db7add6.entry.js.map} +0 -0
- /package/dist/native/{p-a998f8df.entry.js.map → p-4eacd598.entry.js.map} +0 -0
- /package/dist/native/{p-e5a7596b.entry.js.map → p-5851fbed.entry.js.map} +0 -0
- /package/dist/native/{p-61d2cb2e.entry.js.map → p-634b49fe.entry.js.map} +0 -0
- /package/dist/native/{p-211f7b19.entry.js.map → p-63c894f0.entry.js.map} +0 -0
- /package/dist/native/{p-e6f45df2.entry.js.map → p-79765c7d.entry.js.map} +0 -0
- /package/dist/native/{p-2f62f097.entry.js.map → p-9c8eadde.entry.js.map} +0 -0
- /package/dist/native/{p-4f11286d.entry.js.map → p-bac62e20.entry.js.map} +0 -0
- /package/dist/native/{p-46553ffd.entry.js.map → p-bfb6e22c.entry.js.map} +0 -0
- /package/dist/native/{p-02bb8184.entry.js.map → p-dbb89408.entry.js.map} +0 -0
- /package/dist/native/{p-d776ed48.entry.js.map → p-ef9b66d4.entry.js.map} +0 -0
- /package/dist/native/{p-ed47a702.entry.js.map → p-f867541d.entry.js.map} +0 -0
- /package/dist/native/{p-d24586ed.entry.js.map → p-fa33ec18.entry.js.map} +0 -0
- /package/dist/native/{p-892052c2.entry.js.map → p-ff7eea0e.entry.js.map} +0 -0
- /package/dist/types/{dev/dev-root.d.ts → utils/test/uri.utils.test.d.ts} +0 -0
|
@@ -4,13 +4,11 @@ const NvFieldselectDocs = {
|
|
|
4
4
|
component: 'nv-fieldselect',
|
|
5
5
|
subcomponents: ['nv-badge', 'nv-button'],
|
|
6
6
|
stories: [
|
|
7
|
-
// Default Story
|
|
8
7
|
{
|
|
9
8
|
name: 'Default',
|
|
10
9
|
description: 'A default nv-fieldselect with no specific props set.',
|
|
11
10
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
12
11
|
},
|
|
13
|
-
// Label Prop Story
|
|
14
12
|
{
|
|
15
13
|
name: nameof(x => x.label),
|
|
16
14
|
args: {
|
|
@@ -18,7 +16,6 @@ const NvFieldselectDocs = {
|
|
|
18
16
|
},
|
|
19
17
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
20
18
|
},
|
|
21
|
-
// Description Prop Story
|
|
22
19
|
{
|
|
23
20
|
name: nameof(x => x.description),
|
|
24
21
|
args: {
|
|
@@ -27,7 +24,6 @@ const NvFieldselectDocs = {
|
|
|
27
24
|
},
|
|
28
25
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
29
26
|
},
|
|
30
|
-
// Placeholder Prop Story
|
|
31
27
|
{
|
|
32
28
|
name: 'Placeholder',
|
|
33
29
|
description: 'Display temporary text inside the select field to give users a hint about what to choose.',
|
|
@@ -36,7 +32,6 @@ const NvFieldselectDocs = {
|
|
|
36
32
|
},
|
|
37
33
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "", disabled: true }, "Choose an option..."), h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
38
34
|
},
|
|
39
|
-
// Value Prop Story
|
|
40
35
|
{
|
|
41
36
|
name: nameof(x => x.value),
|
|
42
37
|
args: {
|
|
@@ -45,7 +40,6 @@ const NvFieldselectDocs = {
|
|
|
45
40
|
},
|
|
46
41
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
47
42
|
},
|
|
48
|
-
// Disabled Prop Story
|
|
49
43
|
{
|
|
50
44
|
name: nameof(x => x.disabled),
|
|
51
45
|
args: {
|
|
@@ -55,7 +49,6 @@ const NvFieldselectDocs = {
|
|
|
55
49
|
},
|
|
56
50
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
57
51
|
},
|
|
58
|
-
// Readonly Prop Story
|
|
59
52
|
{
|
|
60
53
|
name: nameof(x => x.readonly),
|
|
61
54
|
args: {
|
|
@@ -65,7 +58,6 @@ const NvFieldselectDocs = {
|
|
|
65
58
|
},
|
|
66
59
|
template: (h("div", { "data-class": "flex flex-col gap-2" }, h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4")), h("nv-fieldselect", { "data-storybook-args": true, multiple: true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4")))),
|
|
67
60
|
},
|
|
68
|
-
// Readonly Prop Story + Display Value
|
|
69
61
|
{
|
|
70
62
|
name: nameof(x => x.displayValue),
|
|
71
63
|
args: {
|
|
@@ -76,7 +68,6 @@ const NvFieldselectDocs = {
|
|
|
76
68
|
},
|
|
77
69
|
template: (h("div", { "data-class": "flex flex-col gap-2" }, h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2")), h("nv-fieldselect", { "data-storybook-args": true, multiple: true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2")))),
|
|
78
70
|
},
|
|
79
|
-
// Required Prop Story
|
|
80
71
|
{
|
|
81
72
|
name: nameof(x => x.required),
|
|
82
73
|
args: {
|
|
@@ -85,7 +76,6 @@ const NvFieldselectDocs = {
|
|
|
85
76
|
},
|
|
86
77
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
87
78
|
},
|
|
88
|
-
// Error Prop Story
|
|
89
79
|
{
|
|
90
80
|
name: nameof(x => x.error),
|
|
91
81
|
args: {
|
|
@@ -94,7 +84,6 @@ const NvFieldselectDocs = {
|
|
|
94
84
|
},
|
|
95
85
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
96
86
|
},
|
|
97
|
-
// Success Prop Story
|
|
98
87
|
{
|
|
99
88
|
name: nameof(x => x.success),
|
|
100
89
|
args: {
|
|
@@ -103,7 +92,6 @@ const NvFieldselectDocs = {
|
|
|
103
92
|
},
|
|
104
93
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
105
94
|
},
|
|
106
|
-
// Multiple Prop Story
|
|
107
95
|
{
|
|
108
96
|
name: nameof(x => x.multiple),
|
|
109
97
|
args: {
|
|
@@ -112,13 +100,19 @@ const NvFieldselectDocs = {
|
|
|
112
100
|
},
|
|
113
101
|
template: (h("div", { "data-class": "flex flex-col gap-2" }, h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4")), h("nv-fieldselect", { value: "1, 2", "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4")))),
|
|
114
102
|
},
|
|
115
|
-
|
|
103
|
+
{
|
|
104
|
+
name: nameof(x => x.autofocus),
|
|
105
|
+
args: {
|
|
106
|
+
label: 'Autofocus',
|
|
107
|
+
autofocus: true,
|
|
108
|
+
},
|
|
109
|
+
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
110
|
+
},
|
|
116
111
|
{
|
|
117
112
|
name: 'SlotLabel',
|
|
118
113
|
description: 'You can use the `label` slot to customize the content of the label.',
|
|
119
114
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("span", { slot: "label" }, "Label"), h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
120
115
|
},
|
|
121
|
-
// SlotDescription Story
|
|
122
116
|
{
|
|
123
117
|
name: 'SlotDescription',
|
|
124
118
|
description: 'You can use the `description` slot to customize the content of the description.',
|
|
@@ -128,19 +122,16 @@ const NvFieldselectDocs = {
|
|
|
128
122
|
},
|
|
129
123
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("span", { slot: "description" }, "Description"), h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
130
124
|
},
|
|
131
|
-
// SlotBefore Story
|
|
132
125
|
{
|
|
133
126
|
name: 'SlotBefore',
|
|
134
127
|
description: 'You can use the `before` slot to customize the content before the select.',
|
|
135
128
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("span", { slot: "before" }, "Before"), h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
136
129
|
},
|
|
137
|
-
// SlotAfter Story
|
|
138
130
|
{
|
|
139
131
|
name: 'SlotAfter',
|
|
140
132
|
description: 'You can use the `after` slot to customize the content after the select.',
|
|
141
133
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("span", { slot: "after" }, "After"), h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
142
134
|
},
|
|
143
|
-
// SlotErrorDescription Story
|
|
144
135
|
{
|
|
145
136
|
name: 'SlotErrorDescription',
|
|
146
137
|
description: 'You can use the `error-description` slot to customize the content of the error description.',
|
|
@@ -151,7 +142,6 @@ const NvFieldselectDocs = {
|
|
|
151
142
|
},
|
|
152
143
|
template: (h("nv-fieldselect", { "data-storybook-args": true }, h("span", { slot: "error-description" }, "Error Description"), h("option", { value: "1" }, "Option 1"), h("option", { value: "2" }, "Option 2"), h("option", { value: "3" }, "Option 3"), h("option", { value: "4" }, "Option 4"))),
|
|
153
144
|
},
|
|
154
|
-
// Options JSON Story
|
|
155
145
|
{
|
|
156
146
|
name: 'Options JSON',
|
|
157
147
|
args: {
|
|
@@ -166,7 +156,6 @@ const NvFieldselectDocs = {
|
|
|
166
156
|
},
|
|
167
157
|
template: h("nv-fieldselect", { "data-storybook-args": true }),
|
|
168
158
|
},
|
|
169
|
-
// Options JSON Preselected Story
|
|
170
159
|
{
|
|
171
160
|
name: 'Options JSON Preselected',
|
|
172
161
|
args: {
|
|
@@ -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,gBAA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AC;oBACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;oBAClC,EAAE,KAAK,EAAE,QAAQ,EAAE,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 // Default Story\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 // Label Prop Story\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 // Description Prop Story\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 // Placeholder Prop Story\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 // Value Prop Story\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 // Disabled Prop Story\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 // Readonly Prop Story\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 // Readonly Prop Story + Display Value\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 // Required Prop Story\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 // Error Prop Story\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 // Success Prop Story\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 // Multiple Prop Story\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 // SlotLabel Story\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 // SlotDescription Story\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 // SlotBefore Story\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 // SlotAfter Story\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 // SlotErrorDescription Story\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 // Options JSON Story\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 // Options JSON Preselected Story\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,EA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AI,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"]}
|
|
@@ -74,6 +74,12 @@ export class NvFieldselect {
|
|
|
74
74
|
* sets the component to readonly.
|
|
75
75
|
*/
|
|
76
76
|
this.displayValue = false;
|
|
77
|
+
/**
|
|
78
|
+
* Applies focus to the input field as soon as the component is mounted. This
|
|
79
|
+
* is equivalent to setting the native autofocus attribute on a <select>
|
|
80
|
+
* element.
|
|
81
|
+
*/
|
|
82
|
+
this.autofocus = false;
|
|
77
83
|
//#endregion WATCHERS
|
|
78
84
|
/****************************************************************************/
|
|
79
85
|
//#region METHODS
|
|
@@ -337,13 +343,13 @@ export class NvFieldselect {
|
|
|
337
343
|
* @returns {HTMLStencilElement} The HTML element to render.
|
|
338
344
|
*/
|
|
339
345
|
render() {
|
|
340
|
-
return (h(Host, { key: '
|
|
346
|
+
return (h(Host, { key: 'ec04f194be75e170699c357326154d7941fec6ce' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '0edc03d998e48060f9ceb0f164df1870226d8f7a', htmlFor: this.inputId }, h("slot", { key: '8a30ef1179797c99439e817d361e64eb7d5ad49e', name: "label" }, this.label))), h("div", { key: '06a59d0d207252a48a8a1b15592261c684eae329', class: "select-wrapper" }, h("slot", { key: '1a00c30cb8b3052e889dc15ba4581d58c88bb199', name: "before-input" }), h("div", { key: '5f405ab2666cf72dda3efa7a38d72d9d1febc964', class: "select-container", onClick: this.handleSelectContainerClick }, h("slot", { key: '711c23d7209a67a98c5b4915b02747e6c3dbaccf', name: "leading-input" }), this.internalReadonly && (h("input", { key: 'ab155f3f4fb064f9140f92a5d355388b2da38192', 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
|
|
341
347
|
? `${this.inputId}-error`
|
|
342
|
-
: `${this.inputId}-description` })), h("select", { key: '
|
|
348
|
+
: `${this.inputId}-description` })), h("select", { key: '59927b0fc45656c38e665fecfee870db6bfff228', 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
|
|
343
349
|
? `${this.inputId}-error`
|
|
344
|
-
: `${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))), this.internalReadonly && (h("nv-icon", { key: '
|
|
345
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
346
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
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))), this.internalReadonly && (h("nv-icon", { key: 'cf35aab9fe5c8d0f684f96de13264c11a86d2847', name: "chevron-down", class: "readonly-icon", size: "sm" })), this.error && (h("nv-icon", { key: '20dc8da6bfc7eeb8f458392d7cdacc94f27d594c', name: "alert-circle", class: "validation", size: "sm" })), this.success && (h("nv-icon", { key: 'a590386f8d19ada1b9aebe07cc4129a301bb4b50', name: "circle-check", class: "validation", size: "sm" }))), h("slot", { key: '063a1fdcf06ab8cff2890f932a04757f7a1b0eea', name: "after-input" })), (this.description ||
|
|
351
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '5a539edf1387e5fa5e6ff14e8739f42d1d1dd44a', class: "description", id: `${this.inputId}-description` }, h("slot", { key: '6fa1cbff90c6df1f2fdf77e86f762d7dd6ee1ba3', name: "description" }, this.description))), (this.errorDescription ||
|
|
352
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '57b89f5a7f9149fcd9c65f75defd25e2259f27d8', class: "error-description", id: `${this.inputId}-error` }, h("slot", { key: 'a3e85418965c828f241679d4b7359d04ac3801ac', name: "error-description" }, this.errorDescription)))));
|
|
347
353
|
}
|
|
348
354
|
static get is() { return "nv-fieldselect"; }
|
|
349
355
|
static get formAssociated() { return true; }
|
|
@@ -683,6 +689,26 @@ export class NvFieldselect {
|
|
|
683
689
|
"attribute": "display-value",
|
|
684
690
|
"reflect": true,
|
|
685
691
|
"defaultValue": "false"
|
|
692
|
+
},
|
|
693
|
+
"autofocus": {
|
|
694
|
+
"type": "boolean",
|
|
695
|
+
"mutable": false,
|
|
696
|
+
"complexType": {
|
|
697
|
+
"original": "boolean",
|
|
698
|
+
"resolved": "boolean",
|
|
699
|
+
"references": {}
|
|
700
|
+
},
|
|
701
|
+
"required": false,
|
|
702
|
+
"optional": false,
|
|
703
|
+
"docs": {
|
|
704
|
+
"tags": [],
|
|
705
|
+
"text": "Applies focus to the input field as soon as the component is mounted. This\nis equivalent to setting the native autofocus attribute on a <select>\nelement."
|
|
706
|
+
},
|
|
707
|
+
"getter": false,
|
|
708
|
+
"setter": false,
|
|
709
|
+
"attribute": "autofocus",
|
|
710
|
+
"reflect": true,
|
|
711
|
+
"defaultValue": "false"
|
|
686
712
|
}
|
|
687
713
|
};
|
|
688
714
|
}
|
|
@@ -1 +1 @@
|
|
|
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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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()\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()\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()\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 //#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 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\n {this.internalReadonly && (\n <nv-icon name=\"chevron-down\" class=\"readonly-icon\" size=\"sm\" />\n )}\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"sm\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"sm\" />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\" 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,gBA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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()\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()\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()\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\n {this.internalReadonly && (\n <nv-icon name=\"chevron-down\" class=\"readonly-icon\" size=\"sm\" />\n )}\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"sm\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"sm\" />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\" 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"]}
|
|
@@ -147,6 +147,14 @@ const NvFieldtextDocs = {
|
|
|
147
147
|
},
|
|
148
148
|
template: h("nv-fieldtext", { "data-storybook-args": true }),
|
|
149
149
|
},
|
|
150
|
+
{
|
|
151
|
+
name: nameof(x => x.autofocus),
|
|
152
|
+
args: {
|
|
153
|
+
label: 'Textfield Autofocus',
|
|
154
|
+
autofocus: true,
|
|
155
|
+
},
|
|
156
|
+
template: h("nv-fieldtext", { "data-storybook-args": true }),
|
|
157
|
+
},
|
|
150
158
|
{
|
|
151
159
|
name: 'leadingInputSlot',
|
|
152
160
|
description: 'Content to be placed before the input text, within the input container.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fieldtext.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtext/nv-fieldtext.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,eAAe,GAAqC;IACxD,SAAS,EAAE,cAAc;IACzB,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;IACxC,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,kDAAiD;SAC5D;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;YAClD,IAAI,EAAE;gBACJ,KAAK,EAAE,iBAAiB;aACzB;YACD,QAAQ,EAAE,kDAAiD;SAC5D;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;YACxD,IAAI,EAAE;gBACJ,KAAK,EAAE,uBAAuB;gBAC9B,WAAW,EAAE,4BAA4B;aAC1C;YACD,QAAQ,EAAE,kDAAiD;SAC5D;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;YACxD,IAAI,EAAE;gBACJ,KAAK,EAAE,uBAAuB;gBAC9B,WAAW,EAAE,mBAAmB;aACjC;YACD,QAAQ,EAAE,kDAAiD;SAC5D;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAA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,KAAK,EAAE,mBAAmB;gBAC1B,WAAW,EAAE,4BAA4B;aAC1C;YACD,QAAQ,EAAE,CACR;gBACE,iBAAW,IAAI,EAAC,cAAc,wBAA8B,CAC/C,CAChB;SACF;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,WAAW,EACT,yEAAyE;YAC3E,IAAI,EAAE;gBACJ,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,4BAA4B;aAC1C;YACD,QAAQ,EAAE,CACR;gBACE,iBAAW,IAAI,EAAC,aAAa,uBAA6B,CAC7C,CAChB;SACF;KACF;CACF,CAAC;AAEF,eAAe,eAAe,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 NvFieldtextDocs: NovaDocs<Components.NvFieldtext> = {\n component: 'nv-fieldtext',\n subcomponents: ['nv-badge', 'nv-button'],\n stories: [\n {\n name: 'Default',\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.label),\n args: {\n label: 'Textfield Label',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.description),\n args: {\n label: 'Textfield Description',\n description: 'Description will show here',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.placeholder),\n args: {\n label: 'Textfield Placeholder',\n placeholder: 'Type something...',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.name),\n args: {\n label: 'Textfield Name',\n name: 'name',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.value),\n args: {\n label: 'Textfield Value',\n value: 'value',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.type),\n args: {\n label: 'Textfield Type',\n type: 'email',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.disabled),\n args: {\n label: 'Textfield Disabled',\n disabled: true,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.readonly),\n args: {\n label: 'Textfield Readonly',\n readonly: true,\n value: 'This input is readonly',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.required),\n args: {\n label: 'Textfield Required',\n required: true,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.error),\n args: {\n label: 'Textfield Error',\n error: true,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.errorDescription),\n args: {\n label: 'Textfield Error Description',\n description: 'Make sure to be valid.',\n error: true,\n errorDescription: 'This input has an error.',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.success),\n args: {\n label: 'Textfield Success',\n success: true,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.maxlength),\n args: {\n label: 'Textfield Max Length',\n maxlength: 10,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.minlength),\n args: {\n label: 'Textfield Min Length',\n minlength: 10,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.pattern),\n args: {\n label: 'Textfield Pattern',\n pattern: '[0-9]+',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.autocomplete),\n args: {\n label: 'Textfield Autocomplete',\n autocomplete: 'on',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.multiple),\n args: {\n label: 'Textfield Multiple',\n type: 'email',\n multiple: true,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: 'leadingInputSlot',\n description:\n 'Content to be placed before the input text, within the input container.',\n args: {\n label: 'Leading Input',\n },\n template: (\n <nv-fieldtext data-storybook-args>\n <nv-badge slot=\"leading-input\" label=\"test\" dismissible></nv-badge>\n </nv-fieldtext>\n ),\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 },\n template: (\n <nv-fieldtext data-storybook-args>\n <span slot=\"label\">Label Slot</span>\n </nv-fieldtext>\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 Slot',\n description: 'Original description',\n },\n template: (\n <nv-fieldtext data-storybook-args>\n <span slot=\"description\">Custom Description</span>\n </nv-fieldtext>\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 Slot',\n errorDescription: 'Original error description',\n error: true,\n },\n template: (\n <nv-fieldtext data-storybook-args>\n <span slot=\"error-description\">Custom Error Description</span>\n </nv-fieldtext>\n ),\n },\n {\n name: 'beforeInputSlot',\n description:\n 'Content to be placed before the input text, outside the input container.',\n args: {\n label: 'Before Input Slot',\n description: 'Description will show here',\n },\n template: (\n <nv-fieldtext data-storybook-args>\n <nv-button slot=\"before-input\">Before Input Slot</nv-button>\n </nv-fieldtext>\n ),\n },\n {\n name: 'afterInputSlot',\n description:\n 'Content to be placed after the input text, outside the input container.',\n args: {\n label: 'After Input Slot',\n description: 'Description will show here',\n },\n template: (\n <nv-fieldtext data-storybook-args>\n <nv-button slot=\"after-input\">After Input Slot</nv-button>\n </nv-fieldtext>\n ),\n },\n ],\n};\n\nexport default NvFieldtextDocs;\n"]}
|
|
1
|
+
{"version":3,"file":"nv-fieldtext.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtext/nv-fieldtext.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,eAAe,GAAqC;IACxD,SAAS,EAAE,cAAc;IACzB,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;IACxC,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,kDAAiD;SAC5D;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;YAClD,IAAI,EAAE;gBACJ,KAAK,EAAE,iBAAiB;aACzB;YACD,QAAQ,EAAE,kDAAiD;SAC5D;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;YACxD,IAAI,EAAE;gBACJ,KAAK,EAAE,uBAAuB;gBAC9B,WAAW,EAAE,4BAA4B;aAC1C;YACD,QAAQ,EAAE,kDAAiD;SAC5D;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;YACxD,IAAI,EAAE;gBACJ,KAAK,EAAE,uBAAuB;gBAC9B,WAAW,EAAE,mBAAmB;aACjC;YACD,QAAQ,EAAE,kDAAiD;SAC5D;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YACjD,IAAI,EAAE;gBACJ,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,MAAM;aACb;YACD,QAAQ,EAAE,kDAAiD;SAC5D;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,C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A0E;YAC5E,IAAI,EAAE;gBACJ,KAAK,EAAE,mBAAmB;gBAC1B,WAAW,EAAE,4BAA4B;aAC1C;YACD,QAAQ,EAAE,CACR;gBACE,iBAAW,IAAI,EAAC,cAAc,wBAA8B,CAC/C,CAChB;SACF;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,WAAW,EACT,yEAAyE;YAC3E,IAAI,EAAE;gBACJ,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,4BAA4B;aAC1C;YACD,QAAQ,EAAE,CACR;gBACE,iBAAW,IAAI,EAAC,aAAa,uBAA6B,CAC7C,CAChB;SACF;KACF;CACF,CAAC;AAEF,eAAe,eAAe,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 NvFieldtextDocs: NovaDocs<Components.NvFieldtext> = {\n component: 'nv-fieldtext',\n subcomponents: ['nv-badge', 'nv-button'],\n stories: [\n {\n name: 'Default',\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.label),\n args: {\n label: 'Textfield Label',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.description),\n args: {\n label: 'Textfield Description',\n description: 'Description will show here',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.placeholder),\n args: {\n label: 'Textfield Placeholder',\n placeholder: 'Type something...',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.name),\n args: {\n label: 'Textfield Name',\n name: 'name',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.value),\n args: {\n label: 'Textfield Value',\n value: 'value',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.type),\n args: {\n label: 'Textfield Type',\n type: 'email',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.disabled),\n args: {\n label: 'Textfield Disabled',\n disabled: true,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.readonly),\n args: {\n label: 'Textfield Readonly',\n readonly: true,\n value: 'This input is readonly',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.required),\n args: {\n label: 'Textfield Required',\n required: true,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.error),\n args: {\n label: 'Textfield Error',\n error: true,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.errorDescription),\n args: {\n label: 'Textfield Error Description',\n description: 'Make sure to be valid.',\n error: true,\n errorDescription: 'This input has an error.',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.success),\n args: {\n label: 'Textfield Success',\n success: true,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.maxlength),\n args: {\n label: 'Textfield Max Length',\n maxlength: 10,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.minlength),\n args: {\n label: 'Textfield Min Length',\n minlength: 10,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.pattern),\n args: {\n label: 'Textfield Pattern',\n pattern: '[0-9]+',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.autocomplete),\n args: {\n label: 'Textfield Autocomplete',\n autocomplete: 'on',\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.multiple),\n args: {\n label: 'Textfield Multiple',\n type: 'email',\n multiple: true,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: nameof<Components.NvFieldtext>(x => x.autofocus),\n args: {\n label: 'Textfield Autofocus',\n autofocus: true,\n },\n template: <nv-fieldtext data-storybook-args></nv-fieldtext>,\n },\n {\n name: 'leadingInputSlot',\n description:\n 'Content to be placed before the input text, within the input container.',\n args: {\n label: 'Leading Input',\n },\n template: (\n <nv-fieldtext data-storybook-args>\n <nv-badge slot=\"leading-input\" label=\"test\" dismissible></nv-badge>\n </nv-fieldtext>\n ),\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 },\n template: (\n <nv-fieldtext data-storybook-args>\n <span slot=\"label\">Label Slot</span>\n </nv-fieldtext>\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 Slot',\n description: 'Original description',\n },\n template: (\n <nv-fieldtext data-storybook-args>\n <span slot=\"description\">Custom Description</span>\n </nv-fieldtext>\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 Slot',\n errorDescription: 'Original error description',\n error: true,\n },\n template: (\n <nv-fieldtext data-storybook-args>\n <span slot=\"error-description\">Custom Error Description</span>\n </nv-fieldtext>\n ),\n },\n {\n name: 'beforeInputSlot',\n description:\n 'Content to be placed before the input text, outside the input container.',\n args: {\n label: 'Before Input Slot',\n description: 'Description will show here',\n },\n template: (\n <nv-fieldtext data-storybook-args>\n <nv-button slot=\"before-input\">Before Input Slot</nv-button>\n </nv-fieldtext>\n ),\n },\n {\n name: 'afterInputSlot',\n description:\n 'Content to be placed after the input text, outside the input container.',\n args: {\n label: 'After Input Slot',\n description: 'Description will show here',\n },\n template: (\n <nv-fieldtext data-storybook-args>\n <nv-button slot=\"after-input\">After Input Slot</nv-button>\n </nv-fieldtext>\n ),\n },\n ],\n};\n\nexport default NvFieldtextDocs;\n"]}
|