@nova-design-system/nova-webcomponents 3.0.0-beta.37 → 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 +996 -164
- 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 +24 -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 +2 -2
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +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-datagrid.cjs.entry.js.map +1 -1
- 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 +17 -4
- 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 +10 -4
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +10 -4
- 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 +10 -4
- 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 +20 -13
- 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-table.cjs.entry.js.map +1 -1
- 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-breadcrumbs/nv-breadcrumbs.docs.js +1 -0
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js.map +1 -1
- 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 +5 -2
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- 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.docs.js +6 -6
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +16 -3
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +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} +10 -28
- 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} +12 -9
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +7 -7
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +34 -17
- 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.css +2 -2
- 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.css +2 -2
- 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.css +2 -2
- 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 +27 -24
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +9 -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 +21 -0
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
- package/dist/collection/components/nv-popover/nv-popover.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 +5 -2
- package/dist/collection/components/nv-table/nv-table.js.map +1 -1
- 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 +6 -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 +24 -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-datagrid.js.map +1 -1
- 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 +22 -9
- 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 +13 -6
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +14 -7
- 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 +13 -6
- 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-table.js.map +1 -1
- 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-de8411ee.js → p-17b6705f.js} +5 -5
- package/dist/components/{p-de8411ee.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-3859dc5c.js → p-48317c2c.js} +4 -4
- package/dist/components/p-48317c2c.js.map +1 -0
- package/dist/components/{p-a9a52105.js → p-492ad81d.js} +1178 -5
- package/dist/components/p-492ad81d.js.map +1 -0
- package/dist/components/p-5f5e2bf2.js +88 -0
- package/dist/components/p-5f5e2bf2.js.map +1 -0
- package/dist/components/{p-e431a0ad.js → p-659a5ae4.js} +4 -4
- package/dist/components/{p-e431a0ad.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-2baea6ba.js → p-842afd9a.js} +3 -3
- package/dist/components/{p-2baea6ba.js.map → p-842afd9a.js.map} +1 -1
- package/dist/components/{p-4938572a.js → p-88165c0e.js} +2 -2
- package/dist/components/{p-4938572a.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 +972 -147
- 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 +23 -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 +2 -2
- package/dist/esm/nv-badge_2.entry.js.map +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-datagrid.entry.js.map +1 -1
- 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 +17 -4
- 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 +10 -4
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +10 -4
- 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 +10 -4
- 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 +20 -13
- 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-table.entry.js.map +1 -1
- 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-4d0caf4a.entry.js → p-1bae8cdd.entry.js} +2 -2
- package/dist/native/{p-4d0caf4a.entry.js.map → p-1bae8cdd.entry.js.map} +1 -1
- 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-9ac790b3.entry.js → p-3b2c7871.entry.js} +2 -2
- package/dist/native/{p-9ac790b3.entry.js.map → p-3b2c7871.entry.js.map} +1 -1
- 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-6acbf729.entry.js +2 -0
- package/dist/native/p-6acbf729.entry.js.map +1 -0
- package/dist/native/p-7211a3cb.entry.js +7 -0
- package/dist/native/p-7211a3cb.entry.js.map +1 -0
- 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-6d68f133.entry.js → p-9c8eadde.entry.js} +2 -2
- package/dist/native/p-9c8eadde.entry.js.map +1 -0
- 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-b13b2663.entry.js +2 -0
- 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-cba14168.entry.js +2 -0
- 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-datagrid/nv-datagrid.d.ts +3 -0
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +8 -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/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-table/nv-table.d.ts +3 -0
- package/dist/types/components.d.ts +316 -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/nova-docs.d.ts +1 -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 +243 -56
- package/hydrate/index.js +2545 -1507
- package/hydrate/index.mjs +2545 -1507
- package/package.json +11 -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-11fcdad9.js +0 -90
- package/dist/components/p-11fcdad9.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-3859dc5c.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-a01bdf02.js +0 -82
- package/dist/components/p-a01bdf02.js.map +0 -1
- package/dist/components/p-a9a52105.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-10ba289c.entry.js +0 -2
- package/dist/native/p-208accf0.entry.js +0 -2
- package/dist/native/p-208accf0.entry.js.map +0 -1
- package/dist/native/p-2aebf31b.entry.js +0 -2
- package/dist/native/p-3a8a9371.entry.js +0 -2
- package/dist/native/p-3a8a9371.entry.js.map +0 -1
- package/dist/native/p-3c004551.entry.js.map +0 -1
- package/dist/native/p-51ad8bcd.entry.js.map +0 -1
- package/dist/native/p-56f71851.js.map +0 -1
- package/dist/native/p-6d68f133.entry.js.map +0 -1
- package/dist/native/p-724ed8d7.entry.js +0 -7
- package/dist/native/p-724ed8d7.entry.js.map +0 -1
- package/dist/native/p-75b1ea9f.entry.js +0 -2
- package/dist/native/p-75b1ea9f.entry.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-9fb5db20.entry.js +0 -2
- package/dist/native/p-9fb5db20.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-bfeda21c.entry.js +0 -2
- package/dist/native/p-bfeda21c.entry.js.map +0 -1
- package/dist/native/p-c51ee6dc.entry.js +0 -2
- package/dist/native/p-c51ee6dc.entry.js.map +0 -1
- package/dist/native/p-d4e56727.entry.js +0 -2
- package/dist/native/p-d4e56727.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/native/p-fd2955dd.entry.js +0 -2
- package/dist/native/p-fd2955dd.entry.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-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-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-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
|
@@ -61,6 +61,12 @@ export class NvFieldtext {
|
|
|
61
61
|
* each one with a comma, allowing the form to handle multiple recipients.
|
|
62
62
|
*/
|
|
63
63
|
this.multiple = false;
|
|
64
|
+
/**
|
|
65
|
+
* Applies focus to the input field as soon as the component is mounted. This
|
|
66
|
+
* is equivalent to setting the native autofocus attribute on an <input>
|
|
67
|
+
* element.
|
|
68
|
+
*/
|
|
69
|
+
this.autofocus = false;
|
|
64
70
|
//#endregion EVENTS
|
|
65
71
|
/****************************************************************************/
|
|
66
72
|
//#region METHODS
|
|
@@ -100,9 +106,9 @@ export class NvFieldtext {
|
|
|
100
106
|
/****************************************************************************/
|
|
101
107
|
//#region RENDER
|
|
102
108
|
render() {
|
|
103
|
-
return (h(Host, { key: '
|
|
104
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
105
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
109
|
+
return (h(Host, { key: '23efa0e56d020cce567f970f342bb0512ae3dd83' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '1ffe8dfcd0eb29232f3f4e2a39f0b18e92acced0', htmlFor: this.inputId }, h("slot", { key: '95625aebb5e3464ff2afc1d9c947db28fe7b0ddd', name: "label" }, this.label))), h("div", { key: 'a0754ba8ac030290cc354cbbc287049b890c92da', class: "input-wrapper" }, h("slot", { key: '761147017de57353a2d52bac615330b6bb09401d', name: "before-input" }), h("div", { key: '5e2bc20105f6a4587e1f39a81a04527e36b51e4e', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '96d2c58b85692f5a184b8086d048876e1b5b8c28', name: "leading-input" }), h("input", { key: '40e3d073b307dcd09c3b4f5c07f82e06aa1f6b11', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: this.type, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, autofocus: this.autofocus, autocomplete: this.autocomplete, multiple: this.multiple, value: this.value, onInput: this.handleInput }), this.error && (h("nv-icon", { key: '62e3ae1bf3147ccd2869cd8d47b63bedcf3c8739', name: "alert-circle", class: "validation", size: "sm" })), this.success && (h("nv-icon", { key: '9fabf9beb89950a67b67b3fb98878faae431a633', name: "circle-check", class: "validation", size: "sm" }))), h("slot", { key: '18c99b85da3243c1cf0c58aa8e53d54fb70aae42', name: "after-input" })), (this.description ||
|
|
110
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: 'ec83f041aacae7255c7008fc2f842ef7423bb84a', class: "description" }, h("slot", { key: '8051ac72735b0d53dee7a1eac3fee70c87bbd6ef', name: "description" }, this.description))), (this.errorDescription ||
|
|
111
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'd04500341a2a0845476d1fd2bcfdd2da1f930272', hidden: !this.error, class: "error-description" }, h("slot", { key: '3e3063574e7a8efa37150c69e1cbd44641229e20', name: "error-description" }, this.errorDescription)))));
|
|
106
112
|
}
|
|
107
113
|
static get is() { return "nv-fieldtext"; }
|
|
108
114
|
static get formAssociated() { return true; }
|
|
@@ -506,7 +512,7 @@ export class NvFieldtext {
|
|
|
506
512
|
"mutable": false,
|
|
507
513
|
"complexType": {
|
|
508
514
|
"original": "`${TextInputAutocomplete}`",
|
|
509
|
-
"resolved": "\"on\" | \"off\" | \"
|
|
515
|
+
"resolved": "\"on\" | \"off\" | \"section-*\" | \"shipping\" | \"billing\" | \"home\" | \"work\" | \"mobile\" | \"fax\" | \"pager\" | \"tel\" | \"tel-country-code\" | \"tel-national\" | \"tel-area-code\" | \"tel-local\" | \"tel-local-prefix\" | \"tel-local-suffix\" | \"tel-extension\" | \"email\" | \"impp\" | \"name\" | \"honorific-prefix\" | \"given-name\" | \"additional-name\" | \"family-name\" | \"honorific-suffix\" | \"nickname\" | \"username\" | \"new-password\" | \"current-password\" | \"one-time-code\" | \"organization-title\" | \"organization\" | \"street-address\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"address-level4\" | \"address-level3\" | \"address-level2\" | \"address-level1\" | \"country\" | \"country-name\" | \"postal-code\" | \"cc-name\" | \"cc-given-name\" | \"cc-additional-name\" | \"cc-family-name\" | \"cc-number\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-csc\" | \"cc-type\" | \"transaction-currency\" | \"transaction-amount\" | \"language\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"sex\" | \"url\" | \"photo\"",
|
|
510
516
|
"references": {
|
|
511
517
|
"TextInputAutocomplete": {
|
|
512
518
|
"location": "import",
|
|
@@ -545,6 +551,26 @@ export class NvFieldtext {
|
|
|
545
551
|
"attribute": "multiple",
|
|
546
552
|
"reflect": true,
|
|
547
553
|
"defaultValue": "false"
|
|
554
|
+
},
|
|
555
|
+
"autofocus": {
|
|
556
|
+
"type": "boolean",
|
|
557
|
+
"mutable": false,
|
|
558
|
+
"complexType": {
|
|
559
|
+
"original": "boolean",
|
|
560
|
+
"resolved": "boolean",
|
|
561
|
+
"references": {}
|
|
562
|
+
},
|
|
563
|
+
"required": false,
|
|
564
|
+
"optional": false,
|
|
565
|
+
"docs": {
|
|
566
|
+
"tags": [],
|
|
567
|
+
"text": "Applies focus to the input field as soon as the component is mounted. This\nis equivalent to setting the native autofocus attribute on an <input>\nelement."
|
|
568
|
+
},
|
|
569
|
+
"getter": false,
|
|
570
|
+
"setter": false,
|
|
571
|
+
"attribute": "autofocus",
|
|
572
|
+
"reflect": true,
|
|
573
|
+
"defaultValue": "false"
|
|
548
574
|
}
|
|
549
575
|
};
|
|
550
576
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fieldtext.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtext/nv-fieldtext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAIpC;;;;;;;GAOG;AAOH,MAAM,OAAO,WAAW;IANxB;QAkCE,uBAAuB;QACvB,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QA2CpC;;;;;WAKG;QAEH,SAAI,GAA6B,MAAM,CAAC;QAExC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;WAGG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEn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sB,CAAC,CAAC,IAAI,CAClD,4DAAK,KAAK,EAAC,aAAa;gBACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP;YAEA,CAAC,IAAI,CAAC,gBAAgB;gBACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,IAAI,CACxD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB;gBACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldtext',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtext.scss',\n})\nexport class NvFieldtext {\n @Element() el: HTMLNvFieldtextElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text 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 /**\n * Type of the input.\n * @deprecated use type instead.\n */\n @Prop()\n readonly textInputType: 'text' | 'tel' | 'email';\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The type prop lets you specify what kind of information the input field\n * should accept. Choose 'text' for general words or sentences, 'tel' for\n * phone numbers, or 'email' for email addresses. This makes sure users get\n * the right keyboard and validation for what they need to enter.\n */\n @Prop({ reflect: true, mutable: true })\n type: 'text' | 'tel' | 'email' = 'text';\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the textfield\n * field.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription?: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input after the form is submitted.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they’ve used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}`;\n\n /**\n * When used with the email input type, this prop enables the field to accept\n * multiple email addresses. Users can enter several addresses, separating\n * each one with a comma, allowing the form to handle multiple recipients.\n */\n @Prop({ reflect: true })\n readonly multiple: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the input event on the input element.\n * Emits the inputChanged event with the new value.\n * @param {Event} event - Event object of the input event.\n */\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(input.value);\n };\n\n /**\n * Handles focus when the input container is clicked.\n */\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.textInputType) {\n this.type = this.textInputType;\n }\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 //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n autocomplete={this.autocomplete}\n multiple={this.multiple}\n value={this.value}\n onInput={this.handleInput}\n />\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\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nv-fieldtext.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtext/nv-fieldtext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAIpC;;;;;;;GAOG;AAOH,MAAM,OAAO,WAAW;IANxB;QAkCE,uBAAuB;QACvB,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QA2CpC;;;;;WAKG;QAEH,SAAI,GAA6B,MAAM,CAAC;QAExC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;WAGG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEH,UAAK,GAAY,KAAK,CAAC;QAUvB;;;WAGG;QAEM,YAAO,GAAY,KAAK,CAAC;QAoClC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAGM,cAAS,GAAY,KAAK,CAAC;QAapC,mBAAmB;QACnB,8EAA8E;QAC9E,iBAAiB;QAEjB;;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,gBAAgB;gBACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,IAAI,CACxD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB;gBACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldtext',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtext.scss',\n})\nexport class NvFieldtext {\n @Element() el: HTMLNvFieldtextElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text 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 /**\n * Type of the input.\n * @deprecated use type instead.\n */\n @Prop()\n readonly textInputType: 'text' | 'tel' | 'email';\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The type prop lets you specify what kind of information the input field\n * should accept. Choose 'text' for general words or sentences, 'tel' for\n * phone numbers, or 'email' for email addresses. This makes sure users get\n * the right keyboard and validation for what they need to enter.\n */\n @Prop({ reflect: true, mutable: true })\n type: 'text' | 'tel' | 'email' = 'text';\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the textfield\n * field.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription?: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input after the form is submitted.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they’ve used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}`;\n\n /**\n * When used with the email input type, this prop enables the field to accept\n * multiple email addresses. Users can enter several addresses, separating\n * each one with a comma, allowing the form to handle multiple recipients.\n */\n @Prop({ reflect: true })\n readonly multiple: 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 an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the input event on the input element.\n * Emits the inputChanged event with the new value.\n * @param {Event} event - Event object of the input event.\n */\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(input.value);\n };\n\n /**\n * Handles focus when the input container is clicked.\n */\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.textInputType) {\n this.type = this.textInputType;\n }\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 //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n multiple={this.multiple}\n value={this.value}\n onInput={this.handleInput}\n />\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\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
|
|
@@ -142,6 +142,14 @@ const NvFieldtextareaDocs = {
|
|
|
142
142
|
},
|
|
143
143
|
template: h("nv-fieldtextarea", { "data-storybook-args": true }),
|
|
144
144
|
},
|
|
145
|
+
{
|
|
146
|
+
name: nameof(x => x.autofocus),
|
|
147
|
+
args: {
|
|
148
|
+
label: 'Autofocus',
|
|
149
|
+
autofocus: true,
|
|
150
|
+
},
|
|
151
|
+
template: h("nv-fieldtextarea", { "data-storybook-args": true }),
|
|
152
|
+
},
|
|
145
153
|
{
|
|
146
154
|
name: 'labelSlot',
|
|
147
155
|
description: 'Content to be placed as the label, will override the label prop.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fieldtextarea.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtextarea/nv-fieldtextarea.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,mBAAmB,GAAyC;IAChE,SAAS,EAAE,kBAAkB;IAC7B,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;IACxC,OAAO,EAAE;QACP;YACE,IAAI,EAA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jC,CACpB;SACF;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EACT,yFAAyF;YAC3F,IAAI,EAAE;gBACJ,KAAK,EAAE,wBAAwB;gBAC/B,gBAAgB,EAAE,4BAA4B;gBAC9C,KAAK,EAAE,IAAI;aACZ;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,mBAAmB,+BAAgC,CAC7C,CACpB;SACF;KACF;CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\nimport { nameof } from '../../utils/class.utils';\nimport { faker } from '@faker-js/faker';\n\nconst NvFieldtextareaDocs: NovaDocs<Components.NvFieldtextarea> = {\n component: 'nv-fieldtextarea',\n subcomponents: ['nv-badge', 'nv-button'],\n stories: [\n {\n name: 'Default',\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.label),\n args: {\n label: 'Textfield Label',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.description),\n args: {\n label: 'Textfield Description',\n description: 'Description will show here',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.placeholder),\n args: {\n label: 'Textfield Placeholder',\n placeholder: 'Type something...',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.name),\n args: {\n label: 'Textfield Name',\n name: 'name',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.value),\n args: {\n label: 'Textfield Value',\n value: 'value',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.disabled),\n args: {\n label: 'Textfield Disabled',\n disabled: true,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.readonly),\n args: {\n label: 'Textfield Readonly',\n readonly: true,\n value: 'This textarea is readonly',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.required),\n args: {\n label: 'Textfield Required',\n required: true,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.error),\n args: {\n label: 'Textfield Error',\n error: true,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.errorDescription),\n args: {\n label: 'Textfield Error Description',\n description: 'Make sure to be valid.',\n error: true,\n errorDescription: 'This textarea has an error.',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.success),\n args: {\n label: 'Textfield Success',\n success: true,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.maxlength),\n args: {\n label: 'Textfield Max Length',\n maxlength: 10,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.minlength),\n args: {\n label: 'Textfield Min Length',\n minlength: 10,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.rows),\n args: {\n label: 'Textarea Rows',\n rows: 4,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.resize),\n args: {\n label: 'Textarea Resize',\n resize: 'horizontal',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.autosize),\n args: {\n label: 'Textarea Autosize',\n autosize: true,\n rows: 4,\n value: faker.lorem.paragraph(30),\n resize: 'none',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\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-fieldtextarea data-storybook-args>\n <span slot=\"label\">Label Slot</span>\n </nv-fieldtextarea>\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-fieldtextarea data-storybook-args>\n <span slot=\"description\">Custom Description</span>\n </nv-fieldtextarea>\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-fieldtextarea data-storybook-args>\n <span slot=\"error-description\">Custom Error Description</span>\n </nv-fieldtextarea>\n ),\n },\n ],\n};\n\nexport default NvFieldtextareaDocs;\n"]}
|
|
1
|
+
{"version":3,"file":"nv-fieldtextarea.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtextarea/nv-fieldtextarea.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,mBAAmB,GAAyC;IAChE,SAAS,EAAE,kBAAkB;IAC7B,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;IACxC,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,sDAAyD;SACpE;QACD;YACE,IAAI,EAAE,MAAM,CAA6B,CAAC,CAAC,EAAE,CAAC,CAAC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W,EAAE,sBAAsB;aACpC;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,aAAa,yBAA0B,CACjC,CACpB;SACF;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EACT,yFAAyF;YAC3F,IAAI,EAAE;gBACJ,KAAK,EAAE,wBAAwB;gBAC/B,gBAAgB,EAAE,4BAA4B;gBAC9C,KAAK,EAAE,IAAI;aACZ;YACD,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,mBAAmB,+BAAgC,CAC7C,CACpB;SACF;KACF;CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\nimport { nameof } from '../../utils/class.utils';\nimport { faker } from '@faker-js/faker';\n\nconst NvFieldtextareaDocs: NovaDocs<Components.NvFieldtextarea> = {\n component: 'nv-fieldtextarea',\n subcomponents: ['nv-badge', 'nv-button'],\n stories: [\n {\n name: 'Default',\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.label),\n args: {\n label: 'Textfield Label',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.description),\n args: {\n label: 'Textfield Description',\n description: 'Description will show here',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.placeholder),\n args: {\n label: 'Textfield Placeholder',\n placeholder: 'Type something...',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.name),\n args: {\n label: 'Textfield Name',\n name: 'name',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.value),\n args: {\n label: 'Textfield Value',\n value: 'value',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.disabled),\n args: {\n label: 'Textfield Disabled',\n disabled: true,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.readonly),\n args: {\n label: 'Textfield Readonly',\n readonly: true,\n value: 'This textarea is readonly',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.required),\n args: {\n label: 'Textfield Required',\n required: true,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.error),\n args: {\n label: 'Textfield Error',\n error: true,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.errorDescription),\n args: {\n label: 'Textfield Error Description',\n description: 'Make sure to be valid.',\n error: true,\n errorDescription: 'This textarea has an error.',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.success),\n args: {\n label: 'Textfield Success',\n success: true,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.maxlength),\n args: {\n label: 'Textfield Max Length',\n maxlength: 10,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.minlength),\n args: {\n label: 'Textfield Min Length',\n minlength: 10,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.rows),\n args: {\n label: 'Textarea Rows',\n rows: 4,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.resize),\n args: {\n label: 'Textarea Resize',\n resize: 'horizontal',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.autosize),\n args: {\n label: 'Textarea Autosize',\n autosize: true,\n rows: 4,\n value: faker.lorem.paragraph(30),\n resize: 'none',\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\n },\n {\n name: nameof<Components.NvFieldtextarea>(x => x.autofocus),\n args: {\n label: 'Autofocus',\n autofocus: true,\n },\n template: <nv-fieldtextarea data-storybook-args></nv-fieldtextarea>,\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-fieldtextarea data-storybook-args>\n <span slot=\"label\">Label Slot</span>\n </nv-fieldtextarea>\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-fieldtextarea data-storybook-args>\n <span slot=\"description\">Custom Description</span>\n </nv-fieldtextarea>\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-fieldtextarea data-storybook-args>\n <span slot=\"error-description\">Custom Error Description</span>\n </nv-fieldtextarea>\n ),\n },\n ],\n};\n\nexport default NvFieldtextareaDocs;\n"]}
|
|
@@ -65,6 +65,12 @@ export class NvFieldtextarea {
|
|
|
65
65
|
* can still be allowed if desired.
|
|
66
66
|
*/
|
|
67
67
|
this.autosize = false;
|
|
68
|
+
/**
|
|
69
|
+
* Applies focus to the input field as soon as the component is mounted. This
|
|
70
|
+
* is equivalent to setting the native autofocus attribute on a <textarea>
|
|
71
|
+
* element.
|
|
72
|
+
*/
|
|
73
|
+
this.autofocus = false;
|
|
68
74
|
//#endregion WATCHERS
|
|
69
75
|
/****************************************************************************/
|
|
70
76
|
//#region METHODS
|
|
@@ -167,9 +173,9 @@ export class NvFieldtextarea {
|
|
|
167
173
|
/****************************************************************************/
|
|
168
174
|
//#region RENDER
|
|
169
175
|
render() {
|
|
170
|
-
return (h(Host, { key: '
|
|
171
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
172
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
176
|
+
return (h(Host, { key: '331d328227b95cd763286de8919e514d836bb084' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'a6513b1dad621ba2d9bd1fcec79900393ec1adb7', htmlFor: this.inputId }, h("slot", { key: '8c8ce8a47093b6353ece69bae4b7203765a4fb36', name: "label" }, this.label))), h("div", { key: 'a283ef8642118b2fb0aed16b745928be4079cea6', class: "textarea-wrapper" }, h("div", { key: 'a40abe6cda9712052c0203aef387f4d4feed4832', class: "textarea-container", onClick: this.handleTextareaContainerClick }, h("textarea", { key: '67dc245ba0abefad9d1c23aad454c5bb4f72b609', id: this.inputId, ref: e => (this.textareaElement = e), placeholder: this.placeholder, autofocus: this.autofocus, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, autocomplete: "off", value: this.value, onInput: this.handleTextarea, rows: this.rows, class: clsx(this.resize === 'none' && 'resize-none', this.resize === 'vertical' && 'resize-y', this.resize === 'horizontal' && 'resize-x', this.resize === 'both' && 'resize') }))), (this.description ||
|
|
177
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '7b5676446b1152bacb9ecabbed9d807474141726', class: "description" }, h("slot", { key: 'cd59404bf0cecbc7da8a0e6d80f97b23fd28c869', name: "description" }, this.description))), (this.errorDescription ||
|
|
178
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '9ccbb4d29eca26eee0118fa329cac63c552b2656', hidden: !this.error, class: "error-description" }, h("slot", { key: '5295afeb285a7479b6813c29f0097c8a81ca919a', name: "error-description" }, this.errorDescription)))));
|
|
173
179
|
}
|
|
174
180
|
static get is() { return "nv-fieldtextarea"; }
|
|
175
181
|
static get formAssociated() { return true; }
|
|
@@ -566,6 +572,26 @@ export class NvFieldtextarea {
|
|
|
566
572
|
"attribute": "autosize",
|
|
567
573
|
"reflect": true,
|
|
568
574
|
"defaultValue": "false"
|
|
575
|
+
},
|
|
576
|
+
"autofocus": {
|
|
577
|
+
"type": "boolean",
|
|
578
|
+
"mutable": false,
|
|
579
|
+
"complexType": {
|
|
580
|
+
"original": "boolean",
|
|
581
|
+
"resolved": "boolean",
|
|
582
|
+
"references": {}
|
|
583
|
+
},
|
|
584
|
+
"required": false,
|
|
585
|
+
"optional": false,
|
|
586
|
+
"docs": {
|
|
587
|
+
"tags": [],
|
|
588
|
+
"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 <textarea>\nelement."
|
|
589
|
+
},
|
|
590
|
+
"getter": false,
|
|
591
|
+
"setter": false,
|
|
592
|
+
"attribute": "autofocus",
|
|
593
|
+
"reflect": true,
|
|
594
|
+
"defaultValue": "false"
|
|
569
595
|
}
|
|
570
596
|
};
|
|
571
597
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fieldtextarea.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtextarea/nv-fieldtextarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,OAAO,EACP,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;GAIG;AAOH,MAAM,OAAO,eAAe;IAN5B;QA2BE,uBAAuB;QACvB,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QA2CpC;;;;WAIG;QAEM,aAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport clsx from 'clsx';\n\n/**\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldtextarea',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtextarea.scss',\n})\nexport class NvFieldtextarea {\n @Element() el: HTMLNvFieldtextareaElement;\n private textareaElement!: HTMLTextAreaElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text 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 PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * textarea field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text textarea field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the textarea field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the textarea 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 textarea’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the textarea field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the textarea’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The disabled prop lets you turn off the textarea field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the textarea field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the textarea 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 textarea 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 textarea 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 textarea field’s appearance to indicate successful textarea or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the textarea field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their textarea within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * textarea field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * The number of visible text lines for the control. The default is 3. This\n * can be useful when you want to limit the size of the textarea field or when\n * you want to make the textarea field smaller to fit a specific layout. The\n * textarea field will expand vertically to fit the text as the user types.\n */\n @Prop({ reflect: true })\n readonly rows: number = 3;\n\n /**\n * Controls the resize property of a textarea. It can be set to none, both,\n * horizontal, or vertical. The default is vertical.\n */\n @Prop({ reflect: true })\n readonly resize: 'none' | 'both' | 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Enable this to make the textarea automatically resize as the user types,\n * adjusting the height to fit the content. For the best experience, avoid\n * vertical resizing, as it’s controlled by this feature. Horizontal resizing\n * can still be allowed if desired.\n */\n @Prop({ reflect: true })\n readonly autosize: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the textarea value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * If autosize is true, we need to make sure to update the min-height when\n * the rows change.\n */\n @Watch('rows')\n rowsChanged() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n /**\n * If autosize is true, we need to make sure to update the height and\n * min-height, if false, we need to remove the height property.\n */\n @Watch('autosize')\n autosizeChanged() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n } else {\n this.textareaElement?.style.removeProperty('height');\n }\n }\n\n /**\n * Make sure to adjust the height of the textarea when the value changes\n * programmatically or by typing when autosize is on.\n */\n @Watch('value')\n handleValueChange() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleTextarea = (event: Event) => {\n const textarea = event.target as HTMLTextAreaElement;\n this.value = textarea.value;\n this.valueChanged.emit(textarea.value);\n };\n\n private handleTextareaContainerClick = () => {\n this.textareaElement.focus();\n };\n\n private adjustTextareaHeight() {\n if (this.textareaElement && this.autosize) {\n /**\n * The first requestAnimationFrame ensures that the DOM has applied any\n * pending changes (e.g., value updates or attribute changes) before\n * proceeding to the next frame.\n */\n requestAnimationFrame(() => {\n /**\n * The second requestAnimationFrame ensures that the browser has fully\n * recalculated layout and styles based on the updated DOM, such as\n * recalculating scrollHeight for the textarea after the new value is\n * rendered.\n */\n requestAnimationFrame(() => {\n this.textareaElement.style.height = 'auto';\n\n const computedStyle = window.getComputedStyle(this.textareaElement);\n const lineHeight = parseFloat(computedStyle.lineHeight);\n const paddingTop = parseFloat(computedStyle.paddingTop);\n const paddingBottom = parseFloat(computedStyle.paddingBottom);\n const borderTopWidth = parseFloat(computedStyle.borderTopWidth);\n const borderBottomWidth = parseFloat(computedStyle.borderBottomWidth);\n\n // Calculate min-height based on rows\n const minHeight =\n lineHeight * this.rows +\n paddingTop +\n paddingBottom +\n borderTopWidth +\n borderBottomWidth;\n\n this.textareaElement.style.minHeight = `${minHeight}px`;\n this.textareaElement.style.height =\n this.textareaElement.scrollHeight + 'px';\n });\n });\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n componentDidLoad() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"textarea-wrapper\">\n <div\n class=\"textarea-container\"\n onClick={this.handleTextareaContainerClick}\n >\n <textarea\n id={this.inputId}\n ref={e => (this.textareaElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n autocomplete=\"off\"\n value={this.value}\n onInput={this.handleTextarea}\n rows={this.rows}\n class={clsx(\n this.resize === 'none' && 'resize-none',\n this.resize === 'vertical' && 'resize-y',\n this.resize === 'horizontal' && 'resize-x',\n this.resize === 'both' && 'resize',\n )}\n />\n </div>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nv-fieldtextarea.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtextarea/nv-fieldtextarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,OAAO,EACP,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;GAIG;AAOH,MAAM,OAAO,eAAe;IAN5B;QA2BE,uBAAuB;QACvB,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QA2CpC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;WAGG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEH,UAAK,GAAY,KAAK,CAAC;QAWvB;;;WAGG;QAEM,YAAO,GAAY,KAAK,CAAC;QAkBlC;;;;;WAKG;QAEM,SAAI,GAAW,CAAC,CAAC;QAE1B;;;WAGG;QAEM,WAAM,GAAgD,UAAU,CAAC;QAE1E;;;;;WAKG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAGM,cAAS,GAAY,KAAK,CAAC;QAoDpC,qBAAqB;QACrB,8EAA8E;QAC9E,iBAAiB;QAET,mBAAc,GAAG,CAAC,KAAY,EAAE,EAAE;YACxC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAA6B,CAAC;YACrD,IAAI,CAAC,KAAK,GA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;YAEA,CAAC,IAAI,CAAC,gBAAgB;gBACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,IAAI,CACxD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB;gBACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport clsx from 'clsx';\n\n/**\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldtextarea',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtextarea.scss',\n})\nexport class NvFieldtextarea {\n @Element() el: HTMLNvFieldtextareaElement;\n private textareaElement!: HTMLTextAreaElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text 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 PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * textarea field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text textarea field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the textarea field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the textarea 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 textarea’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the textarea field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the textarea’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The disabled prop lets you turn off the textarea field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the textarea field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the textarea 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 textarea 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 textarea 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 textarea field’s appearance to indicate successful textarea or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the textarea field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their textarea within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * textarea field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * The number of visible text lines for the control. The default is 3. This\n * can be useful when you want to limit the size of the textarea field or when\n * you want to make the textarea field smaller to fit a specific layout. The\n * textarea field will expand vertically to fit the text as the user types.\n */\n @Prop({ reflect: true })\n readonly rows: number = 3;\n\n /**\n * Controls the resize property of a textarea. It can be set to none, both,\n * horizontal, or vertical. The default is vertical.\n */\n @Prop({ reflect: true })\n readonly resize: 'none' | 'both' | 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Enable this to make the textarea automatically resize as the user types,\n * adjusting the height to fit the content. For the best experience, avoid\n * vertical resizing, as it’s controlled by this feature. Horizontal resizing\n * can still be allowed if desired.\n */\n @Prop({ reflect: true })\n readonly autosize: 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 <textarea>\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 textarea value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * If autosize is true, we need to make sure to update the min-height when\n * the rows change.\n */\n @Watch('rows')\n rowsChanged() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n /**\n * If autosize is true, we need to make sure to update the height and\n * min-height, if false, we need to remove the height property.\n */\n @Watch('autosize')\n autosizeChanged() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n } else {\n this.textareaElement?.style.removeProperty('height');\n }\n }\n\n /**\n * Make sure to adjust the height of the textarea when the value changes\n * programmatically or by typing when autosize is on.\n */\n @Watch('value')\n handleValueChange() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleTextarea = (event: Event) => {\n const textarea = event.target as HTMLTextAreaElement;\n this.value = textarea.value;\n this.valueChanged.emit(textarea.value);\n };\n\n private handleTextareaContainerClick = () => {\n this.textareaElement.focus();\n };\n\n private adjustTextareaHeight() {\n if (this.textareaElement && this.autosize) {\n /**\n * The first requestAnimationFrame ensures that the DOM has applied any\n * pending changes (e.g., value updates or attribute changes) before\n * proceeding to the next frame.\n */\n requestAnimationFrame(() => {\n /**\n * The second requestAnimationFrame ensures that the browser has fully\n * recalculated layout and styles based on the updated DOM, such as\n * recalculating scrollHeight for the textarea after the new value is\n * rendered.\n */\n requestAnimationFrame(() => {\n this.textareaElement.style.height = 'auto';\n\n const computedStyle = window.getComputedStyle(this.textareaElement);\n const lineHeight = parseFloat(computedStyle.lineHeight);\n const paddingTop = parseFloat(computedStyle.paddingTop);\n const paddingBottom = parseFloat(computedStyle.paddingBottom);\n const borderTopWidth = parseFloat(computedStyle.borderTopWidth);\n const borderBottomWidth = parseFloat(computedStyle.borderBottomWidth);\n\n // Calculate min-height based on rows\n const minHeight =\n lineHeight * this.rows +\n paddingTop +\n paddingBottom +\n borderTopWidth +\n borderBottomWidth;\n\n this.textareaElement.style.minHeight = `${minHeight}px`;\n this.textareaElement.style.height =\n this.textareaElement.scrollHeight + 'px';\n });\n });\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n componentDidLoad() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"textarea-wrapper\">\n <div\n class=\"textarea-container\"\n onClick={this.handleTextareaContainerClick}\n >\n <textarea\n id={this.inputId}\n ref={e => (this.textareaElement = e)}\n placeholder={this.placeholder}\n autofocus={this.autofocus}\n name={this.name}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n autocomplete=\"off\"\n value={this.value}\n onInput={this.handleTextarea}\n rows={this.rows}\n class={clsx(\n this.resize === 'none' && 'resize-none',\n this.resize === 'vertical' && 'resize-y',\n this.resize === 'horizontal' && 'resize-x',\n this.resize === 'both' && 'resize',\n )}\n />\n </div>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
|
|
@@ -58,9 +58,9 @@ nv-fieldtime nv-popover {
|
|
|
58
58
|
display: block;
|
|
59
59
|
}
|
|
60
60
|
nv-fieldtime nv-popover [data-scope=popover] {
|
|
61
|
-
padding: var(--list-
|
|
62
|
-
background-color: var(--components-list-
|
|
63
|
-
border: 1px solid var(--components-list-
|
|
61
|
+
padding: var(--list-dropdown-padding);
|
|
62
|
+
background-color: var(--components-list-dropdown-background);
|
|
63
|
+
border: 1px solid var(--components-list-dropdown-border);
|
|
64
64
|
width: 100%;
|
|
65
65
|
}
|
|
66
66
|
nv-fieldtime .input-wrapper {
|
|
@@ -83,7 +83,7 @@ nv-fieldtime .input-container {
|
|
|
83
83
|
border-width: 1px;
|
|
84
84
|
border-style: solid;
|
|
85
85
|
border-color: var(--nv-field-border-default);
|
|
86
|
-
opacity: var(--components-form-opacity-default);
|
|
86
|
+
opacity: var(--components-form-opacity-default, 1);
|
|
87
87
|
background: var(--nv-field-background);
|
|
88
88
|
transition: all 150ms ease-out;
|
|
89
89
|
display: flex;
|
|
@@ -97,7 +97,7 @@ nv-fieldtime .input-container {
|
|
|
97
97
|
nv-fieldtime .input-container:hover {
|
|
98
98
|
border-color: var(--nv-field-border-hover);
|
|
99
99
|
}
|
|
100
|
-
nv-fieldtime .input-container:focus-within {
|
|
100
|
+
nv-fieldtime .input-container:focus-within, nv-fieldtime .input-container:focus-within:hover, nv-fieldtime .input-container:focus, nv-fieldtime .input-container:focus:hover {
|
|
101
101
|
border-color: var(--nv-field-border-focus);
|
|
102
102
|
box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow);
|
|
103
103
|
}
|
|
@@ -169,9 +169,9 @@ nv-fieldtime .input-container nv-icon.validation {
|
|
|
169
169
|
top: 50%;
|
|
170
170
|
transform: translateY(-50%);
|
|
171
171
|
}
|
|
172
|
-
nv-fieldtime .input-container
|
|
173
|
-
border-color: var(--
|
|
174
|
-
box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--
|
|
172
|
+
nv-fieldtime .input-container:focus, nv-fieldtime .input-container:focus-within {
|
|
173
|
+
border-color: var(--color-focus-brand);
|
|
174
|
+
box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--color-focus-brand);
|
|
175
175
|
}
|
|
176
176
|
nv-fieldtime .description {
|
|
177
177
|
align-self: stretch;
|
|
@@ -196,10 +196,10 @@ nv-fieldtime hr {
|
|
|
196
196
|
margin: 0.5rem 0;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
.input-container
|
|
200
|
-
.input-container:
|
|
201
|
-
border-color: var(--
|
|
202
|
-
box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--
|
|
199
|
+
.input-container:focus-within,
|
|
200
|
+
.input-container:focus {
|
|
201
|
+
border-color: var(--color-focus-brand);
|
|
202
|
+
box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--color-focus-brand);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
.time-dropdown {
|
|
@@ -207,8 +207,8 @@ nv-fieldtime hr {
|
|
|
207
207
|
top: calc(100% + 4px);
|
|
208
208
|
left: 0;
|
|
209
209
|
width: 100%;
|
|
210
|
-
border-radius: 4px;
|
|
211
|
-
|
|
210
|
+
/* border-radius: 4px;
|
|
211
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
|
|
212
212
|
z-index: 1000;
|
|
213
213
|
}
|
|
214
214
|
.time-dropdown .time-columns {
|
|
@@ -233,29 +233,32 @@ nv-fieldtime hr {
|
|
|
233
233
|
border-right: none;
|
|
234
234
|
}
|
|
235
235
|
.time-dropdown .time-columns .time-column .time-option {
|
|
236
|
-
padding:
|
|
236
|
+
padding: var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);
|
|
237
237
|
text-align: center;
|
|
238
238
|
cursor: pointer;
|
|
239
239
|
transition: background-color 0.2s;
|
|
240
240
|
height: 40px;
|
|
241
|
+
border-radius: var(--list-dropdown-item-radius);
|
|
241
242
|
display: flex;
|
|
242
243
|
justify-content: center;
|
|
243
244
|
align-items: center;
|
|
244
245
|
}
|
|
245
246
|
.time-dropdown .time-columns .time-column .time-option:hover {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
border-color: var(--color-rainbow-10-background);
|
|
247
|
+
background-color: var(--components-list-dropdown-item-background-hover);
|
|
248
|
+
color: var(--components-list-dropdown-item-label-hover);
|
|
249
249
|
}
|
|
250
|
-
.time-dropdown .time-columns .time-column .time-option:
|
|
251
|
-
background-color: var(--components-list-
|
|
252
|
-
color: var(--components-
|
|
250
|
+
.time-dropdown .time-columns .time-column .time-option:focus, .time-dropdown .time-columns .time-column .time-option:focus-within {
|
|
251
|
+
background-color: var(--components-list-dropdown-item-background-hover);
|
|
252
|
+
color: var(--components-list-dropdown-item-label-hover);
|
|
253
253
|
}
|
|
254
254
|
.time-dropdown .time-columns .time-column .time-option.selected {
|
|
255
|
-
background: var(--
|
|
256
|
-
color: var(--
|
|
255
|
+
background-color: var(--components-list-dropdown-item-background-active);
|
|
256
|
+
color: var(--components-list-dropdown-item-label-active);
|
|
257
|
+
border-width: 1px;
|
|
258
|
+
border-style: solid;
|
|
259
|
+
border-color: var(--components-list-dropdown-item-border-active);
|
|
257
260
|
}
|
|
258
261
|
.time-dropdown .time-columns .time-column .time-option.highlighted {
|
|
259
|
-
background-color: var(--components-list-
|
|
262
|
+
background-color: var(--components-list-dropdown-item-background-hover);
|
|
260
263
|
color: var(--components-menu-contextual-item-content-hover);
|
|
261
264
|
}
|
|
@@ -2,6 +2,7 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { nameof } from "../../utils/class.utils";
|
|
3
3
|
const NvFieldtimeDocs = {
|
|
4
4
|
component: 'nv-fieldtime',
|
|
5
|
+
badge: 'beta',
|
|
5
6
|
subcomponents: ['nv-icon'],
|
|
6
7
|
stories: [
|
|
7
8
|
{
|
|
@@ -83,6 +84,14 @@ const NvFieldtimeDocs = {
|
|
|
83
84
|
args: { step: 7200000 },
|
|
84
85
|
template: h("nv-fieldtime", { "data-storybook-args": true }),
|
|
85
86
|
},
|
|
87
|
+
{
|
|
88
|
+
name: nameof(x => x.autofocus),
|
|
89
|
+
args: {
|
|
90
|
+
label: 'Autofocus',
|
|
91
|
+
autofocus: true,
|
|
92
|
+
},
|
|
93
|
+
template: h("nv-fieldtime", { "data-storybook-args": true }),
|
|
94
|
+
},
|
|
86
95
|
{
|
|
87
96
|
name: 'SlotLabel',
|
|
88
97
|
template: (h("nv-fieldtime", { "data-storybook-args": true }, h("span", { slot: "label" }, "Label Slot"))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fieldtime.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtime/nv-fieldtime.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,SAAS,CAAC;IAC1B,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,kDAAoC;SAC/C;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;YAClD,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE;YAC3B,QAAQ,EAAE,kDAAoC;SAC/C;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;YAClD,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;YACxB,QAAQ,EAAE,kDAAoC;SAC/C;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YACrD,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YACxB,QAAQ,EAAE,kDAAoC;SAC/C;QACD;YACE,IAAI,EAAE,MAAM,CAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YACrD,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,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;YACjD,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;YACvB,QAAQ,EAAE,kDAAoC;SAC/C;QACD;YACE,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,OAAO,iBAAkB,CACvB,CAChB;SACF;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,cAAc,wBAAyB,CACrC,CAChB;SACF;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,aAAa,uBAAwB,CACnC,CAChB;SACF;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,QAAQ,EAAE,CACR;gBACE,eAAS,IAAI,EAAC,eAAe,EAAC,IAAI,EAAC,OAAO,GAAG,CAChC,CAChB;SACF;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;YACrB,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,mBAAmB,6BAA8B,CAC/C,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 NvFieldtimeDocs: NovaDocs<Components.NvFieldtime> = {\n component: 'nv-fieldtime',\n subcomponents: ['nv-icon'],\n stories: [\n {\n name: 'Default',\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.value),\n args: { value: '12:34:56' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.label),\n args: { label: 'Label' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.readonly),\n args: { readonly: true },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.disabled),\n args: { disabled: true },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.required),\n args: { required: true, label: 'Required' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.name),\n args: { name: 'name' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.success),\n args: { success: true },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.error),\n args: { error: true },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.errorDescription),\n args: { error: true, errorDescription: 'Error Description' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.max),\n args: { max: '20:59:59' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.min),\n args: { min: '01:00:00' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.format),\n args: { format: 'HH:mm:ss' },\n template: (\n <div data-class=\"flex flex-col gap-4 items-center w-full\">\n <nv-fieldtime\n data-class=\"w-full\"\n label=\"format\"\n data-storybook-args\n />\n\n <div data-class=\"flex flex-row gap-4 items-center w-full\">\n <nv-fieldtime data-class=\"w-full\" label=\"hh\" format=\"hh\" />\n <nv-fieldtime data-class=\"w-full\" label=\"HH\" format=\"HH\" />\n </div>\n <div data-class=\"flex flex-row gap-4 items-center w-full\">\n <nv-fieldtime data-class=\"w-full\" label=\"hh:mm\" format=\"hh:mm\" />\n <nv-fieldtime data-class=\"w-full\" label=\"HH:mm\" format=\"HH:mm\" />\n </div>\n <div data-class=\"flex flex-row gap-4 items-center w-full\">\n <nv-fieldtime\n data-class=\"w-full\"\n label=\"hh:mm:ss\"\n format=\"hh:mm:ss\"\n />\n <nv-fieldtime\n data-class=\"w-full\"\n label=\"HH:mm:ss\"\n format=\"HH:mm:ss\"\n />\n </div>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.description),\n args: { description: 'Description' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.open),\n args: { open: true },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.step),\n args: { step: 7200000 },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: 'SlotLabel',\n template: (\n <nv-fieldtime data-storybook-args>\n <span slot=\"label\">Label Slot</span>\n </nv-fieldtime>\n ),\n },\n {\n name: 'SlotBeforeInput',\n template: (\n <nv-fieldtime data-storybook-args>\n <span slot=\"before-input\">Before Input Slot</span>\n </nv-fieldtime>\n ),\n },\n {\n name: 'SlotAfterInput',\n template: (\n <nv-fieldtime data-storybook-args>\n <span slot=\"after-input\">After Input Slot</span>\n </nv-fieldtime>\n ),\n },\n {\n name: 'SlotLeadingInput',\n template: (\n <nv-fieldtime data-storybook-args>\n <nv-icon slot=\"leading-input\" name=\"clock\" />\n </nv-fieldtime>\n ),\n },\n {\n name: 'SlotErrorDescription',\n args: { error: true },\n template: (\n <nv-fieldtime data-storybook-args>\n <span slot=\"error-description\">Error Description Slot</span>\n </nv-fieldtime>\n ),\n },\n ],\n};\n\nexport default NvFieldtimeDocs;\n"]}
|
|
1
|
+
{"version":3,"file":"nv-fieldtime.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtime/nv-fieldtime.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,KAAK,EAAE,MAAM;IACb,aAAa,EAAE,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE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ACnC,CAChB;SACF;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,QAAQ,EAAE,CACR;gBACE,eAAS,IAAI,EAAC,eAAe,EAAC,IAAI,EAAC,OAAO,GAAG,CAChC,CAChB;SACF;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;YACrB,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,mBAAmB,6BAA8B,CAC/C,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 NvFieldtimeDocs: NovaDocs<Components.NvFieldtime> = {\n component: 'nv-fieldtime',\n badge: 'beta',\n subcomponents: ['nv-icon'],\n stories: [\n {\n name: 'Default',\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.value),\n args: { value: '12:34:56' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.label),\n args: { label: 'Label' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.readonly),\n args: { readonly: true },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.disabled),\n args: { disabled: true },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.required),\n args: { required: true, label: 'Required' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.name),\n args: { name: 'name' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.success),\n args: { success: true },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.error),\n args: { error: true },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.errorDescription),\n args: { error: true, errorDescription: 'Error Description' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.max),\n args: { max: '20:59:59' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.min),\n args: { min: '01:00:00' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.format),\n args: { format: 'HH:mm:ss' },\n template: (\n <div data-class=\"flex flex-col gap-4 items-center w-full\">\n <nv-fieldtime\n data-class=\"w-full\"\n label=\"format\"\n data-storybook-args\n />\n\n <div data-class=\"flex flex-row gap-4 items-center w-full\">\n <nv-fieldtime data-class=\"w-full\" label=\"hh\" format=\"hh\" />\n <nv-fieldtime data-class=\"w-full\" label=\"HH\" format=\"HH\" />\n </div>\n <div data-class=\"flex flex-row gap-4 items-center w-full\">\n <nv-fieldtime data-class=\"w-full\" label=\"hh:mm\" format=\"hh:mm\" />\n <nv-fieldtime data-class=\"w-full\" label=\"HH:mm\" format=\"HH:mm\" />\n </div>\n <div data-class=\"flex flex-row gap-4 items-center w-full\">\n <nv-fieldtime\n data-class=\"w-full\"\n label=\"hh:mm:ss\"\n format=\"hh:mm:ss\"\n />\n <nv-fieldtime\n data-class=\"w-full\"\n label=\"HH:mm:ss\"\n format=\"HH:mm:ss\"\n />\n </div>\n </div>\n ),\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.description),\n args: { description: 'Description' },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.open),\n args: { open: true },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.step),\n args: { step: 7200000 },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: nameof<Components.NvFieldtime>(x => x.autofocus),\n args: {\n label: 'Autofocus',\n autofocus: true,\n },\n template: <nv-fieldtime data-storybook-args />,\n },\n {\n name: 'SlotLabel',\n template: (\n <nv-fieldtime data-storybook-args>\n <span slot=\"label\">Label Slot</span>\n </nv-fieldtime>\n ),\n },\n {\n name: 'SlotBeforeInput',\n template: (\n <nv-fieldtime data-storybook-args>\n <span slot=\"before-input\">Before Input Slot</span>\n </nv-fieldtime>\n ),\n },\n {\n name: 'SlotAfterInput',\n template: (\n <nv-fieldtime data-storybook-args>\n <span slot=\"after-input\">After Input Slot</span>\n </nv-fieldtime>\n ),\n },\n {\n name: 'SlotLeadingInput',\n template: (\n <nv-fieldtime data-storybook-args>\n <nv-icon slot=\"leading-input\" name=\"clock\" />\n </nv-fieldtime>\n ),\n },\n {\n name: 'SlotErrorDescription',\n args: { error: true },\n template: (\n <nv-fieldtime data-storybook-args>\n <span slot=\"error-description\">Error Description Slot</span>\n </nv-fieldtime>\n ),\n },\n ],\n};\n\nexport default NvFieldtimeDocs;\n"]}
|