@nova-design-system/nova-webcomponents 3.0.0-beta.30 → 3.0.0-beta.31
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 +944 -1609
- package/dist/cjs/{app-globals-d8cbb987.js → app-globals-69764290.js} +2 -2
- package/dist/cjs/{app-globals-d8cbb987.js.map → app-globals-69764290.js.map} +1 -1
- package/dist/cjs/{index-c50face0.js → index-72b8a9ad.js} +856 -497
- package/dist/cjs/index-72b8a9ad.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/native.cjs.js +4 -4
- package/dist/cjs/native.cjs.js.map +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +22 -9
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +8 -11
- package/dist/cjs/nv-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-badge.cjs.entry.js +145 -0
- package/dist/cjs/nv-badge.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-base.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +40 -8
- package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +1 -2
- package/dist/cjs/nv-col.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +31 -5
- 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 -3
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagriddatacell.cjs.entry.js +1 -2
- package/dist/cjs/nv-datagriddatacell.cjs.entry.js.map +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-fieldcheckbox.cjs.entry.js +40 -9
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +59 -20
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +13 -7
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +48 -22
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +65 -24
- package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +29 -11
- package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +65 -24
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +55 -25
- package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +61 -23
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtoggle.cjs.entry.js +21 -8
- package/dist/cjs/nv-fieldtoggle.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +5 -10
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/{nv-iconbutton_2.cjs.entry.js → nv-iconbutton.cjs.entry.js} +44 -31
- package/dist/cjs/nv-iconbutton.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-loader.cjs.entry.js +35 -0
- package/dist/cjs/nv-loader.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-menu.cjs.entry.js +21 -2
- package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +7 -3
- package/dist/cjs/nv-menuitem.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +49 -13
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +2 -2
- package/dist/cjs/nv-stack.cjs.entry.js +8 -6
- package/dist/cjs/nv-stack.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +28 -7
- package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-tablebody.cjs.entry.js +2 -2
- package/dist/cjs/nv-tablecolumn.cjs.entry.js +16 -5
- package/dist/cjs/nv-tablecolumn.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-tabledatacell.cjs.entry.js +18 -3
- package/dist/cjs/nv-tabledatacell.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-tablehead.cjs.entry.js +2 -2
- package/dist/cjs/nv-tablerow.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +12 -3
- package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -3
- package/dist/collection/components/nv-alert/nv-alert.js +37 -8
- package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
- package/dist/collection/components/nv-avatar/nv-avatar.js +31 -10
- package/dist/collection/components/nv-avatar/nv-avatar.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.css +20 -20
- package/dist/collection/components/nv-badge/nv-badge.js +54 -10
- package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
- package/dist/collection/components/nv-button/nv-button.js +53 -7
- package/dist/collection/components/nv-button/nv-button.js.map +1 -1
- package/dist/collection/components/nv-col/nv-col.js +2 -3
- package/dist/collection/components/nv-col/nv-col.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +42 -4
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +4 -4
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js.map +1 -1
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.js +2 -3
- package/dist/collection/components/nv-datagriddatacell/nv-datagriddatacell.js.map +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +73 -8
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.css +17 -6
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +87 -18
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.css +9 -17
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +19 -5
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +80 -20
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +102 -23
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +52 -10
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +93 -22
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +96 -24
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +101 -25
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
- package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.js +40 -7
- package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.js.map +1 -1
- package/dist/collection/components/nv-icon/nv-icon.js +20 -9
- package/dist/collection/components/nv-icon/nv-icon.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +58 -9
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js.map +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +12 -2
- package/dist/collection/components/nv-loader/nv-loader.js.map +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +28 -1
- package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +14 -2
- package/dist/collection/components/nv-menuitem/nv-menuitem.js.map +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +72 -14
- package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +17 -5
- package/dist/collection/components/nv-stack/nv-stack.js.map +1 -1
- package/dist/collection/components/nv-table/nv-table.js +39 -6
- 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 +25 -4
- package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js.map +1 -1
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.js +23 -2
- package/dist/collection/components/nv-tabledatacell/nv-tabledatacell.js.map +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-tooltip/nv-tooltip.js +17 -2
- package/dist/collection/components/nv-tooltip/nv-tooltip.js.map +1 -1
- package/dist/components/index.js +3 -3
- package/dist/components/nv-alert.js +23 -10
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +9 -12
- package/dist/components/nv-avatar.js.map +1 -1
- package/dist/components/nv-badge.js +173 -1
- package/dist/components/nv-badge.js.map +1 -1
- package/dist/components/nv-base.js +1 -1
- package/dist/components/nv-button.js +41 -9
- package/dist/components/nv-button.js.map +1 -1
- package/dist/components/nv-col.js +1 -2
- package/dist/components/nv-col.js.map +1 -1
- package/dist/components/nv-datagrid.js +31 -5
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-datagridbody.js +1 -1
- package/dist/components/nv-datagridcolumn.js +1 -3
- package/dist/components/nv-datagridcolumn.js.map +1 -1
- package/dist/components/nv-datagriddatacell.js +1 -2
- package/dist/components/nv-datagriddatacell.js.map +1 -1
- package/dist/components/nv-datagridhead.js +1 -1
- package/dist/components/nv-datagridrow.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +152 -1
- package/dist/components/nv-fieldcheckbox.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +64 -25
- package/dist/components/nv-fielddropdown.js.map +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fieldnumber.js +49 -23
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +68 -27
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +29 -11
- package/dist/components/nv-fieldradio.js.map +1 -1
- package/dist/components/nv-fieldselect.js +66 -25
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldtext.js +56 -26
- package/dist/components/nv-fieldtext.js.map +1 -1
- package/dist/components/nv-fieldtextarea.js +62 -24
- package/dist/components/nv-fieldtextarea.js.map +1 -1
- package/dist/components/nv-fieldtoggle.js +21 -8
- package/dist/components/nv-fieldtoggle.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 +22 -3
- package/dist/components/nv-menu.js.map +1 -1
- package/dist/components/nv-menuitem.js +8 -4
- package/dist/components/nv-menuitem.js.map +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +2 -2
- package/dist/components/nv-stack.js +8 -6
- package/dist/components/nv-stack.js.map +1 -1
- package/dist/components/nv-table.js +28 -7
- package/dist/components/nv-table.js.map +1 -1
- package/dist/components/nv-tablebody.js +2 -2
- package/dist/components/nv-tablecolumn.js +16 -5
- package/dist/components/nv-tablecolumn.js.map +1 -1
- package/dist/components/nv-tabledatacell.js +18 -3
- package/dist/components/nv-tabledatacell.js.map +1 -1
- package/dist/components/nv-tablehead.js +2 -2
- package/dist/components/nv-tablerow.js +2 -2
- package/dist/components/nv-tooltip.js +13 -4
- package/dist/components/nv-tooltip.js.map +1 -1
- package/dist/components/{p-d506ae63.js → p-0caa4741.js} +836 -491
- package/dist/components/p-0caa4741.js.map +1 -0
- package/dist/components/{p-d5dd3def.js → p-1fa35ae5.js} +51 -15
- package/dist/components/p-1fa35ae5.js.map +1 -0
- package/dist/components/{p-d70df149.js → p-39e93e5b.js} +6 -11
- package/dist/components/p-39e93e5b.js.map +1 -0
- package/dist/components/{p-a1aa8970.js → p-3ef4ded9.js} +10 -4
- package/dist/components/p-3ef4ded9.js.map +1 -0
- package/dist/components/{p-ae6a0d80.js → p-c08a278d.js} +207 -172
- package/dist/components/p-c08a278d.js.map +1 -0
- package/dist/components/{p-b12abc99.js → p-ca5c171f.js} +15 -9
- package/dist/components/p-ca5c171f.js.map +1 -0
- package/dist/components/{p-8bec002e.js → p-f0d5586a.js} +46 -13
- package/dist/components/p-f0d5586a.js.map +1 -0
- package/dist/docs.d.ts +8 -0
- package/dist/docs.json +941 -1590
- package/dist/esm/{app-globals-eea8674a.js → app-globals-c5484a00.js} +2 -2
- package/dist/esm/{app-globals-eea8674a.js.map → app-globals-c5484a00.js.map} +1 -1
- package/dist/esm/{index-e7b35c14.js → index-b6f70e4a.js} +856 -497
- package/dist/esm/index-b6f70e4a.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/native.js +5 -5
- package/dist/esm/native.js.map +1 -1
- package/dist/esm/nv-alert.entry.js +22 -9
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +8 -11
- package/dist/esm/nv-avatar.entry.js.map +1 -1
- package/dist/esm/nv-badge.entry.js +141 -0
- package/dist/esm/nv-badge.entry.js.map +1 -0
- package/dist/esm/nv-base.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +40 -8
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-col.entry.js +1 -2
- package/dist/esm/nv-col.entry.js.map +1 -1
- package/dist/esm/nv-datagrid.entry.js +31 -5
- 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 -3
- package/dist/esm/nv-datagridcolumn.entry.js.map +1 -1
- package/dist/esm/nv-datagriddatacell.entry.js +1 -2
- package/dist/esm/nv-datagriddatacell.entry.js.map +1 -1
- package/dist/esm/nv-datagridhead.entry.js +1 -1
- package/dist/esm/nv-datagridrow.entry.js +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +40 -9
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +59 -20
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +13 -7
- package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +48 -22
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +65 -24
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +29 -11
- package/dist/esm/nv-fieldradio.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +65 -24
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +55 -25
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +61 -23
- package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
- package/dist/esm/nv-fieldtoggle.entry.js +21 -8
- package/dist/esm/nv-fieldtoggle.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +5 -10
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/{nv-iconbutton_2.entry.js → nv-iconbutton.entry.js} +45 -31
- package/dist/esm/nv-iconbutton.entry.js.map +1 -0
- package/dist/esm/nv-loader.entry.js +31 -0
- package/dist/esm/nv-loader.entry.js.map +1 -0
- package/dist/esm/nv-menu.entry.js +21 -2
- package/dist/esm/nv-menu.entry.js.map +1 -1
- package/dist/esm/nv-menuitem.entry.js +7 -3
- package/dist/esm/nv-menuitem.entry.js.map +1 -1
- package/dist/esm/nv-popover.entry.js +49 -13
- package/dist/esm/nv-popover.entry.js.map +1 -1
- package/dist/esm/nv-row.entry.js +2 -2
- package/dist/esm/nv-stack.entry.js +8 -6
- package/dist/esm/nv-stack.entry.js.map +1 -1
- package/dist/esm/nv-table.entry.js +28 -7
- package/dist/esm/nv-table.entry.js.map +1 -1
- package/dist/esm/nv-tablebody.entry.js +2 -2
- package/dist/esm/nv-tablecolumn.entry.js +16 -5
- package/dist/esm/nv-tablecolumn.entry.js.map +1 -1
- package/dist/esm/nv-tabledatacell.entry.js +18 -3
- package/dist/esm/nv-tabledatacell.entry.js.map +1 -1
- package/dist/esm/nv-tablehead.entry.js +2 -2
- package/dist/esm/nv-tablerow.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +12 -3
- package/dist/esm/nv-tooltip.entry.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-01262eaf.entry.js +2 -0
- package/dist/native/p-01262eaf.entry.js.map +1 -0
- package/dist/native/p-0bf2007c.entry.js +2 -0
- package/dist/native/p-0bf2007c.entry.js.map +1 -0
- package/dist/native/{p-69ca8c88.entry.js → p-11faaf31.entry.js} +2 -2
- package/dist/native/p-11faaf31.entry.js.map +1 -0
- package/dist/native/p-17dba26d.entry.js +2 -0
- package/dist/native/{p-c8f36510.entry.js → p-2a6ca749.entry.js} +2 -2
- package/dist/native/p-2a6ca749.entry.js.map +1 -0
- package/dist/native/{p-91d30cd7.entry.js → p-31367928.entry.js} +2 -2
- package/dist/native/p-31367928.entry.js.map +1 -0
- package/dist/native/p-327fa1a0.entry.js +2 -0
- package/dist/native/{p-dbade286.entry.js → p-380bcc2b.entry.js} +2 -2
- package/dist/native/p-380bcc2b.entry.js.map +1 -0
- package/dist/native/p-47c78fe4.entry.js +2 -0
- package/dist/native/p-47c78fe4.entry.js.map +1 -0
- package/dist/native/{p-305951e4.entry.js → p-4a64f5b0.entry.js} +2 -2
- package/dist/native/p-4a64f5b0.entry.js.map +1 -0
- package/dist/native/{p-13070761.entry.js → p-50c31094.entry.js} +2 -2
- package/dist/native/p-50c31094.entry.js.map +1 -0
- package/dist/native/{p-a59ec107.entry.js → p-605f8b3d.entry.js} +2 -2
- package/dist/native/p-605f8b3d.entry.js.map +1 -0
- package/dist/native/p-64ae9a21.entry.js +2 -0
- package/dist/native/p-64ae9a21.entry.js.map +1 -0
- package/dist/native/{p-20c7fc4d.entry.js → p-6e8bcd5b.entry.js} +2 -2
- package/dist/native/p-6e8bcd5b.entry.js.map +1 -0
- package/dist/native/{p-92e3e334.entry.js → p-6eb50254.entry.js} +2 -2
- package/dist/native/p-6eb50254.entry.js.map +1 -0
- package/dist/native/p-6ef216c4.js +3 -0
- package/dist/native/p-6ef216c4.js.map +1 -0
- package/dist/native/{p-1aaee302.entry.js → p-7701e4cc.entry.js} +2 -2
- package/dist/native/p-7701e4cc.entry.js.map +1 -0
- package/dist/native/p-86947929.entry.js +2 -0
- package/dist/native/{p-982e474f.entry.js.map → p-86947929.entry.js.map} +1 -1
- package/dist/native/p-8f95f4fa.entry.js +2 -0
- package/dist/native/p-8f95f4fa.entry.js.map +1 -0
- package/dist/native/{p-12eaebd6.entry.js → p-919cf3ec.entry.js} +2 -2
- package/dist/native/p-919cf3ec.entry.js.map +1 -0
- package/dist/native/p-93eea6e1.entry.js +2 -0
- package/dist/native/{p-e842220b.entry.js.map → p-93eea6e1.entry.js.map} +1 -1
- package/dist/native/p-95714583.js +2 -0
- package/dist/native/p-9f89229b.entry.js +2 -0
- package/dist/native/{p-2fca31c0.entry.js.map → p-9f89229b.entry.js.map} +1 -1
- package/dist/native/p-9fe47948.entry.js +2 -0
- package/dist/native/p-9fe47948.entry.js.map +1 -0
- package/dist/native/{p-7b2d8b8c.entry.js → p-a89f5542.entry.js} +2 -2
- package/dist/native/p-a89f5542.entry.js.map +1 -0
- package/dist/native/p-afbc5259.entry.js +2 -0
- package/dist/native/p-afbc5259.entry.js.map +1 -0
- package/dist/native/p-b3ec71c9.entry.js +2 -0
- package/dist/native/p-bbe9a373.entry.js +2 -0
- package/dist/native/p-c2dfee1a.entry.js +2 -0
- package/dist/native/p-c5e3e234.entry.js +2 -0
- package/dist/native/p-c5e3e234.entry.js.map +1 -0
- package/dist/native/{p-36d5158c.entry.js → p-c85d031d.entry.js} +3 -3
- package/dist/native/p-c85d031d.entry.js.map +1 -0
- package/dist/native/{p-5b4bdbe2.entry.js → p-d4277c50.entry.js} +2 -2
- package/dist/native/p-d4277c50.entry.js.map +1 -0
- package/dist/native/p-dacd68ab.entry.js +2 -0
- package/dist/native/p-dacd68ab.entry.js.map +1 -0
- package/dist/native/p-de9d0b05.entry.js +2 -0
- package/dist/native/p-de9d0b05.entry.js.map +1 -0
- package/dist/native/{p-65ad60eb.entry.js → p-df6c9137.entry.js} +2 -2
- package/dist/native/p-df6c9137.entry.js.map +1 -0
- package/dist/native/p-e05b0c4a.entry.js +2 -0
- package/dist/native/p-e05b0c4a.entry.js.map +1 -0
- package/dist/native/{p-330c929d.entry.js → p-e71fc762.entry.js} +2 -2
- package/dist/native/p-ef7f605a.entry.js +2 -0
- package/dist/native/p-f2e31579.entry.js +2 -0
- package/dist/native/{p-671699bf.entry.js.map → p-f2e31579.entry.js.map} +1 -1
- package/dist/types/components/nv-fieldtextarea/nv-fieldtextarea.d.ts +2 -2
- package/dist/types/components.d.ts +8 -337
- package/dist/vscode-data.json +4 -328
- package/hydrate/index.js +1858 -2215
- package/hydrate/index.mjs +1858 -2215
- package/package.json +1 -1
- package/dist/cjs/index-c50face0.js.map +0 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +0 -159
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +0 -1038
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +0 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +0 -12
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js +0 -6
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js.map +0 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +0 -171
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +0 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +0 -201
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +0 -257
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +0 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +0 -1578
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +0 -1
- package/dist/components/nv-fielddropdownitemcheck.d.ts +0 -11
- package/dist/components/nv-fielddropdownitemcheck.js +0 -8
- package/dist/components/nv-fielddropdownitemcheck.js.map +0 -1
- package/dist/components/nv-fieldmultiselect.d.ts +0 -11
- package/dist/components/nv-fieldmultiselect.js +0 -1129
- package/dist/components/nv-fieldmultiselect.js.map +0 -1
- package/dist/components/p-5ce661bd.js +0 -125
- package/dist/components/p-5ce661bd.js.map +0 -1
- package/dist/components/p-8bec002e.js.map +0 -1
- package/dist/components/p-a1aa8970.js.map +0 -1
- package/dist/components/p-a4802979.js +0 -151
- package/dist/components/p-a4802979.js.map +0 -1
- package/dist/components/p-ae6a0d80.js.map +0 -1
- package/dist/components/p-b12abc99.js.map +0 -1
- package/dist/components/p-d506ae63.js.map +0 -1
- package/dist/components/p-d5dd3def.js.map +0 -1
- package/dist/components/p-d70df149.js.map +0 -1
- package/dist/components/p-e4641c41.js +0 -72
- package/dist/components/p-e4641c41.js.map +0 -1
- package/dist/esm/index-e7b35c14.js.map +0 -1
- package/dist/esm/nv-badge_2.entry.js +0 -154
- package/dist/esm/nv-badge_2.entry.js.map +0 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +0 -1034
- package/dist/esm/nv-fieldmultiselect.entry.js.map +0 -1
- package/dist/esm/nv-iconbutton_2.entry.js.map +0 -1
- package/dist/native/p-0fbb962b.entry.js +0 -2
- package/dist/native/p-0fbb962b.entry.js.map +0 -1
- package/dist/native/p-12eaebd6.entry.js.map +0 -1
- package/dist/native/p-13070761.entry.js.map +0 -1
- package/dist/native/p-1aaee302.entry.js.map +0 -1
- package/dist/native/p-1c689ec7.entry.js +0 -2
- package/dist/native/p-1c689ec7.entry.js.map +0 -1
- package/dist/native/p-20c7fc4d.entry.js.map +0 -1
- package/dist/native/p-2fca31c0.entry.js +0 -2
- package/dist/native/p-305951e4.entry.js.map +0 -1
- package/dist/native/p-306d1f04.entry.js +0 -2
- package/dist/native/p-306d1f04.entry.js.map +0 -1
- package/dist/native/p-36d5158c.entry.js.map +0 -1
- package/dist/native/p-39dbb15b.entry.js +0 -2
- package/dist/native/p-39dbb15b.entry.js.map +0 -1
- package/dist/native/p-3f912745.entry.js +0 -2
- package/dist/native/p-3f912745.entry.js.map +0 -1
- package/dist/native/p-4e351d8e.entry.js +0 -2
- package/dist/native/p-4e351d8e.entry.js.map +0 -1
- package/dist/native/p-589eb477.entry.js +0 -2
- package/dist/native/p-5b4bdbe2.entry.js.map +0 -1
- package/dist/native/p-65ad60eb.entry.js.map +0 -1
- package/dist/native/p-671699bf.entry.js +0 -2
- package/dist/native/p-69ca8c88.entry.js.map +0 -1
- package/dist/native/p-7a7b9b95.entry.js +0 -2
- package/dist/native/p-7b2d8b8c.entry.js.map +0 -1
- package/dist/native/p-7b3a4cbf.entry.js +0 -2
- package/dist/native/p-7b3a4cbf.entry.js.map +0 -1
- package/dist/native/p-91d30cd7.entry.js.map +0 -1
- package/dist/native/p-92e3e334.entry.js.map +0 -1
- package/dist/native/p-982e474f.entry.js +0 -2
- package/dist/native/p-a03df637.entry.js +0 -2
- package/dist/native/p-a03df637.entry.js.map +0 -1
- package/dist/native/p-a5582014.entry.js +0 -2
- package/dist/native/p-a5582014.entry.js.map +0 -1
- package/dist/native/p-a59ec107.entry.js.map +0 -1
- package/dist/native/p-a7a3c45f.entry.js +0 -2
- package/dist/native/p-a7be7540.entry.js +0 -2
- package/dist/native/p-a7be7540.entry.js.map +0 -1
- package/dist/native/p-a8c0fefa.entry.js +0 -2
- package/dist/native/p-a8c0fefa.entry.js.map +0 -1
- package/dist/native/p-b4aea326.js +0 -3
- package/dist/native/p-b4aea326.js.map +0 -1
- package/dist/native/p-c8f36510.entry.js.map +0 -1
- package/dist/native/p-d3d682a7.entry.js +0 -2
- package/dist/native/p-d4c0a1e0.entry.js +0 -2
- package/dist/native/p-dbade286.entry.js.map +0 -1
- package/dist/native/p-e842220b.entry.js +0 -2
- package/dist/native/p-eeb6a3dc.js +0 -2
- package/dist/native/p-f7b96c42.entry.js +0 -2
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +0 -52
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.d.ts +0 -4
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +0 -405
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.d.ts +0 -4
- /package/dist/native/{p-a7a3c45f.entry.js.map → p-17dba26d.entry.js.map} +0 -0
- /package/dist/native/{p-d4c0a1e0.entry.js.map → p-327fa1a0.entry.js.map} +0 -0
- /package/dist/native/{p-eeb6a3dc.js.map → p-95714583.js.map} +0 -0
- /package/dist/native/{p-589eb477.entry.js.map → p-b3ec71c9.entry.js.map} +0 -0
- /package/dist/native/{p-7a7b9b95.entry.js.map → p-bbe9a373.entry.js.map} +0 -0
- /package/dist/native/{p-d3d682a7.entry.js.map → p-c2dfee1a.entry.js.map} +0 -0
- /package/dist/native/{p-330c929d.entry.js.map → p-e71fc762.entry.js.map} +0 -0
- /package/dist/native/{p-f7b96c42.entry.js.map → p-ef7f605a.entry.js.map} +0 -0
|
@@ -8,6 +8,63 @@ import clsx from "clsx";
|
|
|
8
8
|
*/
|
|
9
9
|
export class NvFieldtextarea {
|
|
10
10
|
constructor() {
|
|
11
|
+
//#endregion DEPRECATED
|
|
12
|
+
/****************************************************************************/
|
|
13
|
+
//#region PROPERTIES
|
|
14
|
+
/**
|
|
15
|
+
* Sets the ID for the input element and the for attribute of the associated
|
|
16
|
+
* label. If no ID is provided, a random one will be automatically generated
|
|
17
|
+
* to ensure unique identification, facilitating proper label association and
|
|
18
|
+
* accessibility.
|
|
19
|
+
*/
|
|
20
|
+
this.inputId = uuidv4();
|
|
21
|
+
/**
|
|
22
|
+
* The disabled prop lets you turn off the textarea field so that users can’t
|
|
23
|
+
* type in it. When disabled, the field is grayed out and won’t respond to#
|
|
24
|
+
* clicks or touches.
|
|
25
|
+
*/
|
|
26
|
+
this.disabled = false;
|
|
27
|
+
/**
|
|
28
|
+
* Display the textarea field’s content without allowing users to change it.
|
|
29
|
+
* Users can still click on it, select, and copy the text, but they won’t be
|
|
30
|
+
* able to type or delete anything.
|
|
31
|
+
*/
|
|
32
|
+
this.readonly = false;
|
|
33
|
+
/**
|
|
34
|
+
* Marks the textarea field as required, ensuring that the user must fill it out
|
|
35
|
+
* before submitting the form.
|
|
36
|
+
*/
|
|
37
|
+
this.required = false;
|
|
38
|
+
/**
|
|
39
|
+
* Alters the textarea field’s appearance to indicate an error, helping users
|
|
40
|
+
* identify fields that need correction.
|
|
41
|
+
* @validator error
|
|
42
|
+
*/
|
|
43
|
+
this.error = false;
|
|
44
|
+
/**
|
|
45
|
+
* Changes the textarea field’s appearance to indicate successful textarea or
|
|
46
|
+
* validation.
|
|
47
|
+
*/
|
|
48
|
+
this.success = false;
|
|
49
|
+
/**
|
|
50
|
+
* The number of visible text lines for the control. The default is 3. This
|
|
51
|
+
* can be useful when you want to limit the size of the textarea field or when
|
|
52
|
+
* you want to make the textarea field smaller to fit a specific layout. The
|
|
53
|
+
* textarea field will expand vertically to fit the text as the user types.
|
|
54
|
+
*/
|
|
55
|
+
this.rows = 3;
|
|
56
|
+
/**
|
|
57
|
+
* Controls the resize property of a textarea. It can be set to none, both,
|
|
58
|
+
* horizontal, or vertical. The default is vertical.
|
|
59
|
+
*/
|
|
60
|
+
this.resize = 'vertical';
|
|
61
|
+
/**
|
|
62
|
+
* Enable this to make the textarea automatically resize as the user types,
|
|
63
|
+
* adjusting the height to fit the content. For the best experience, avoid
|
|
64
|
+
* vertical resizing, as it’s controlled by this feature. Horizontal resizing
|
|
65
|
+
* can still be allowed if desired.
|
|
66
|
+
*/
|
|
67
|
+
this.autosize = false;
|
|
11
68
|
//#endregion WATCHERS
|
|
12
69
|
/****************************************************************************/
|
|
13
70
|
//#region METHODS
|
|
@@ -22,25 +79,6 @@ export class NvFieldtextarea {
|
|
|
22
79
|
this.handleTextareaContainerClick = () => {
|
|
23
80
|
this.textareaElement.focus();
|
|
24
81
|
};
|
|
25
|
-
this.message = undefined;
|
|
26
|
-
this.validation = undefined;
|
|
27
|
-
this.textareaId = uuidv4();
|
|
28
|
-
this.label = undefined;
|
|
29
|
-
this.description = undefined;
|
|
30
|
-
this.placeholder = undefined;
|
|
31
|
-
this.name = undefined;
|
|
32
|
-
this.value = undefined;
|
|
33
|
-
this.disabled = false;
|
|
34
|
-
this.readonly = false;
|
|
35
|
-
this.required = false;
|
|
36
|
-
this.error = false;
|
|
37
|
-
this.errorDescription = undefined;
|
|
38
|
-
this.success = false;
|
|
39
|
-
this.maxlength = undefined;
|
|
40
|
-
this.minlength = undefined;
|
|
41
|
-
this.rows = 3;
|
|
42
|
-
this.resize = 'vertical';
|
|
43
|
-
this.autosize = false;
|
|
44
82
|
}
|
|
45
83
|
componentWillRender() {
|
|
46
84
|
if (this.message) {
|
|
@@ -128,9 +166,9 @@ export class NvFieldtextarea {
|
|
|
128
166
|
/****************************************************************************/
|
|
129
167
|
//#region RENDER
|
|
130
168
|
render() {
|
|
131
|
-
return (h(Host, { key: '
|
|
132
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
133
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
169
|
+
return (h(Host, { key: '373b828a0b311ba52dbfb666fe27e1ec22c7a8b2' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'ad9a79413e380c3213d1090a9b8677f24789b966', htmlFor: this.inputId }, h("slot", { key: 'be3b38804bfee6eb258b904700a06f0031644329', name: "label" }, this.label))), h("div", { key: '9053d8e74cb27c6296b9de27627cb954ae0fe4bc', class: "textarea-wrapper" }, h("div", { key: '870cbaff23359bc7677ecf48cd01610c14c209ed', class: "textarea-container", onClick: this.handleTextareaContainerClick }, h("textarea", { key: '7efb8560969ece9527c5617c1300feabf5490f00', id: this.inputId, ref: e => (this.textareaElement = e), placeholder: this.placeholder, 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.getResize()) }))), (this.description ||
|
|
170
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: 'd6920a2ce734349a88d671d8c2a92d301d80171e', class: "description" }, h("slot", { key: '087138569e3f0b5dc327aa6525233fe366ec9126', name: "description" }, this.description))), (this.errorDescription ||
|
|
171
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'a7ef3bc71412e23af7d20a4938ab0f4fd1f101a2', hidden: !this.error, class: "error-description" }, h("slot", { key: 'cd448427a41d917cb9d32358b3e1efc01297dbd5', name: "error-description" }, this.errorDescription)))));
|
|
134
172
|
}
|
|
135
173
|
static get is() { return "nv-fieldtextarea"; }
|
|
136
174
|
static get formAssociated() { return true; }
|
|
@@ -163,6 +201,8 @@ export class NvFieldtextarea {
|
|
|
163
201
|
}],
|
|
164
202
|
"text": "Message defines a 'hint ' message for the Text Field."
|
|
165
203
|
},
|
|
204
|
+
"getter": false,
|
|
205
|
+
"setter": false,
|
|
166
206
|
"attribute": "message",
|
|
167
207
|
"reflect": false
|
|
168
208
|
},
|
|
@@ -183,10 +223,12 @@ export class NvFieldtextarea {
|
|
|
183
223
|
}],
|
|
184
224
|
"text": "Add the message to the validation state."
|
|
185
225
|
},
|
|
226
|
+
"getter": false,
|
|
227
|
+
"setter": false,
|
|
186
228
|
"attribute": "validation",
|
|
187
229
|
"reflect": false
|
|
188
230
|
},
|
|
189
|
-
"
|
|
231
|
+
"inputId": {
|
|
190
232
|
"type": "string",
|
|
191
233
|
"mutable": false,
|
|
192
234
|
"complexType": {
|
|
@@ -198,9 +240,11 @@ export class NvFieldtextarea {
|
|
|
198
240
|
"optional": false,
|
|
199
241
|
"docs": {
|
|
200
242
|
"tags": [],
|
|
201
|
-
"text": "Sets the ID for the
|
|
243
|
+
"text": "Sets the ID for the input element and the for attribute of the associated\nlabel. If no ID is provided, a random one will be automatically generated\nto ensure unique identification, facilitating proper label association and\naccessibility."
|
|
202
244
|
},
|
|
203
|
-
"
|
|
245
|
+
"getter": false,
|
|
246
|
+
"setter": false,
|
|
247
|
+
"attribute": "input-id",
|
|
204
248
|
"reflect": true,
|
|
205
249
|
"defaultValue": "uuidv4()"
|
|
206
250
|
},
|
|
@@ -218,6 +262,8 @@ export class NvFieldtextarea {
|
|
|
218
262
|
"tags": [],
|
|
219
263
|
"text": "Lets you define the text that explains what users should enter in the text\ntextarea field. It\u2019s a crucial element for making forms clear and\nuser-friendly."
|
|
220
264
|
},
|
|
265
|
+
"getter": false,
|
|
266
|
+
"setter": false,
|
|
221
267
|
"attribute": "label",
|
|
222
268
|
"reflect": true
|
|
223
269
|
},
|
|
@@ -235,6 +281,8 @@ export class NvFieldtextarea {
|
|
|
235
281
|
"tags": [],
|
|
236
282
|
"text": "Add helpful hints or extra information under the text textarea field. This is\nwhere you can clarify what users should enter or provide additional\ninstructions, making the form easier to fill out correctly."
|
|
237
283
|
},
|
|
284
|
+
"getter": false,
|
|
285
|
+
"setter": false,
|
|
238
286
|
"attribute": "description",
|
|
239
287
|
"reflect": true
|
|
240
288
|
},
|
|
@@ -252,6 +300,8 @@ export class NvFieldtextarea {
|
|
|
252
300
|
"tags": [],
|
|
253
301
|
"text": "Display temporary text inside the textarea field to give users a hint about\nwhat to type. It\u2019s a great way to provide examples or suggestions directly\nin the field before they start typing."
|
|
254
302
|
},
|
|
303
|
+
"getter": false,
|
|
304
|
+
"setter": false,
|
|
255
305
|
"attribute": "placeholder",
|
|
256
306
|
"reflect": true
|
|
257
307
|
},
|
|
@@ -269,6 +319,8 @@ export class NvFieldtextarea {
|
|
|
269
319
|
"tags": [],
|
|
270
320
|
"text": "Defines the name attribute of the textarea field, which is crucial for form\nsubmission. This value is used as the key in the key-value pair sent to\nthe server, representing the textarea\u2019s data in form submissions. It should be\nunique within the form to avoid conflicts"
|
|
271
321
|
},
|
|
322
|
+
"getter": false,
|
|
323
|
+
"setter": false,
|
|
272
324
|
"attribute": "name",
|
|
273
325
|
"reflect": true
|
|
274
326
|
},
|
|
@@ -286,6 +338,8 @@ export class NvFieldtextarea {
|
|
|
286
338
|
"tags": [],
|
|
287
339
|
"text": "Specifies the value of the textarea field, which determines the text displayed\nwithin the field. This prop is typically used in controlled components\nwhere the textarea\u2019s value is managed by the component\u2019s state."
|
|
288
340
|
},
|
|
341
|
+
"getter": false,
|
|
342
|
+
"setter": false,
|
|
289
343
|
"attribute": "value",
|
|
290
344
|
"reflect": true
|
|
291
345
|
},
|
|
@@ -303,6 +357,8 @@ export class NvFieldtextarea {
|
|
|
303
357
|
"tags": [],
|
|
304
358
|
"text": "The disabled prop lets you turn off the textarea field so that users can\u2019t\ntype in it. When disabled, the field is grayed out and won\u2019t respond to#\nclicks or touches."
|
|
305
359
|
},
|
|
360
|
+
"getter": false,
|
|
361
|
+
"setter": false,
|
|
306
362
|
"attribute": "disabled",
|
|
307
363
|
"reflect": true,
|
|
308
364
|
"defaultValue": "false"
|
|
@@ -321,6 +377,8 @@ export class NvFieldtextarea {
|
|
|
321
377
|
"tags": [],
|
|
322
378
|
"text": "Display the textarea field\u2019s content without allowing users to change it.\nUsers can still click on it, select, and copy the text, but they won\u2019t be\nable to type or delete anything."
|
|
323
379
|
},
|
|
380
|
+
"getter": false,
|
|
381
|
+
"setter": false,
|
|
324
382
|
"attribute": "readonly",
|
|
325
383
|
"reflect": true,
|
|
326
384
|
"defaultValue": "false"
|
|
@@ -339,6 +397,8 @@ export class NvFieldtextarea {
|
|
|
339
397
|
"tags": [],
|
|
340
398
|
"text": "Marks the textarea field as required, ensuring that the user must fill it out\nbefore submitting the form."
|
|
341
399
|
},
|
|
400
|
+
"getter": false,
|
|
401
|
+
"setter": false,
|
|
342
402
|
"attribute": "required",
|
|
343
403
|
"reflect": true,
|
|
344
404
|
"defaultValue": "false"
|
|
@@ -360,6 +420,8 @@ export class NvFieldtextarea {
|
|
|
360
420
|
}],
|
|
361
421
|
"text": "Alters the textarea field\u2019s appearance to indicate an error, helping users\nidentify fields that need correction."
|
|
362
422
|
},
|
|
423
|
+
"getter": false,
|
|
424
|
+
"setter": false,
|
|
363
425
|
"attribute": "error",
|
|
364
426
|
"reflect": true,
|
|
365
427
|
"defaultValue": "false"
|
|
@@ -381,6 +443,8 @@ export class NvFieldtextarea {
|
|
|
381
443
|
}],
|
|
382
444
|
"text": "Show a helpful message under the textarea field when there\u2019s a problem. It\nexplains what\u2019s wrong and how users can fix it, making the error easier to\nunderstand and resolve."
|
|
383
445
|
},
|
|
446
|
+
"getter": false,
|
|
447
|
+
"setter": false,
|
|
384
448
|
"attribute": "error-description",
|
|
385
449
|
"reflect": true
|
|
386
450
|
},
|
|
@@ -398,6 +462,8 @@ export class NvFieldtextarea {
|
|
|
398
462
|
"tags": [],
|
|
399
463
|
"text": "Changes the textarea field\u2019s appearance to indicate successful textarea or\nvalidation."
|
|
400
464
|
},
|
|
465
|
+
"getter": false,
|
|
466
|
+
"setter": false,
|
|
401
467
|
"attribute": "success",
|
|
402
468
|
"reflect": true,
|
|
403
469
|
"defaultValue": "false"
|
|
@@ -416,6 +482,8 @@ export class NvFieldtextarea {
|
|
|
416
482
|
"tags": [],
|
|
417
483
|
"text": "Limits how many characters users can type into the textarea field. It\u2019s\nhelpful for making sure users don\u2019t enter too much information, keeping\ntheir textarea within the allowed limit."
|
|
418
484
|
},
|
|
485
|
+
"getter": false,
|
|
486
|
+
"setter": false,
|
|
419
487
|
"attribute": "maxlength",
|
|
420
488
|
"reflect": true
|
|
421
489
|
},
|
|
@@ -433,6 +501,8 @@ export class NvFieldtextarea {
|
|
|
433
501
|
"tags": [],
|
|
434
502
|
"text": "Ensures that users type at least a certain number of characters into the\ntextarea field. It\u2019s a way to make sure users provide enough information\nbefore moving on."
|
|
435
503
|
},
|
|
504
|
+
"getter": false,
|
|
505
|
+
"setter": false,
|
|
436
506
|
"attribute": "minlength",
|
|
437
507
|
"reflect": true
|
|
438
508
|
},
|
|
@@ -450,6 +520,8 @@ export class NvFieldtextarea {
|
|
|
450
520
|
"tags": [],
|
|
451
521
|
"text": "The number of visible text lines for the control. The default is 3. This\ncan be useful when you want to limit the size of the textarea field or when\nyou want to make the textarea field smaller to fit a specific layout. The\ntextarea field will expand vertically to fit the text as the user types."
|
|
452
522
|
},
|
|
523
|
+
"getter": false,
|
|
524
|
+
"setter": false,
|
|
453
525
|
"attribute": "rows",
|
|
454
526
|
"reflect": true,
|
|
455
527
|
"defaultValue": "3"
|
|
@@ -468,6 +540,8 @@ export class NvFieldtextarea {
|
|
|
468
540
|
"tags": [],
|
|
469
541
|
"text": "Controls the resize property of a textarea. It can be set to none, both,\nhorizontal, or vertical. The default is vertical."
|
|
470
542
|
},
|
|
543
|
+
"getter": false,
|
|
544
|
+
"setter": false,
|
|
471
545
|
"attribute": "resize",
|
|
472
546
|
"reflect": true,
|
|
473
547
|
"defaultValue": "'vertical'"
|
|
@@ -486,6 +560,8 @@ export class NvFieldtextarea {
|
|
|
486
560
|
"tags": [],
|
|
487
561
|
"text": "Enable this to make the textarea automatically resize as the user types,\nadjusting the height to fit the content. For the best experience, avoid\nvertical resizing, as it\u2019s controlled by this feature. Horizontal resizing\ncan still be allowed if desired."
|
|
488
562
|
},
|
|
563
|
+
"getter": false,
|
|
564
|
+
"setter": false,
|
|
489
565
|
"attribute": "autosize",
|
|
490
566
|
"reflect": true,
|
|
491
567
|
"defaultValue": "false"
|
|
@@ -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;;QAqN1B,qBAAqB;QACrB,8EAA8E;QAC9E,iBAAiB;QAET,mBAAc,GAAG,CAAC,KAAY,EAAE,EAAE;YACxC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAA6B,CAAC;YACrD,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;YAC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AAM,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 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 componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the textarea 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 textareaId: 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 //#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 if (this.autosize) {\n this.adjustTextareaHeight();\n }\n };\n\n private handleTextareaContainerClick = () => {\n this.textareaElement.focus();\n };\n\n private adjustTextareaHeight() {\n if (this.textareaElement && this.autosize) {\n this.textareaElement.style.height = 'auto';\n\n // Get computed styles\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 * Class Properties\n * resize-none\tresize: none;\n * resize-y\t resize: vertical;\n * resize-x\t resize: horizontal;\n * resize\t resize: both;\n * @returns {string} The resize class.\n */\n private getResize() {\n if (this.resize === 'none') return 'resize-none';\n if (this.resize === 'vertical') return 'resize-y';\n if (this.resize === 'horizontal') return 'resize-x';\n if (this.resize === 'both') return 'resize';\n return 'resize-none';\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\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.textareaId}>\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.textareaId}\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(this.getResize())}\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;QAsCE,uBAAuB;QACvB,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,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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 componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion 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 //#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 if (this.autosize) {\n this.adjustTextareaHeight();\n }\n };\n\n private handleTextareaContainerClick = () => {\n this.textareaElement.focus();\n };\n\n private adjustTextareaHeight() {\n if (this.textareaElement && this.autosize) {\n this.textareaElement.style.height = 'auto';\n\n // Get computed styles\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 * Class Properties\n * resize-none\tresize: none;\n * resize-y\t resize: vertical;\n * resize-x\t resize: horizontal;\n * resize\t resize: both;\n * @returns {string} The resize class.\n */\n private getResize() {\n if (this.resize === 'none') return 'resize-none';\n if (this.resize === 'vertical') return 'resize-y';\n if (this.resize === 'horizontal') return 'resize-x';\n if (this.resize === 'both') return 'resize';\n return 'resize-none';\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\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(this.getResize())}\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"]}
|
|
@@ -7,15 +7,28 @@ import { v4 as uuidv4 } from "uuid";
|
|
|
7
7
|
*/
|
|
8
8
|
export class NvFieldtoggle {
|
|
9
9
|
constructor() {
|
|
10
|
+
/****************************************************************************/
|
|
11
|
+
//#region PROPERTIES
|
|
12
|
+
/**
|
|
13
|
+
* Sets the ID for the radio button’s input element and the for attribute of
|
|
14
|
+
* the associated label. If no ID is provided, a random one will be
|
|
15
|
+
* automatically generated to ensure unique identification, facilitating
|
|
16
|
+
* proper label association and accessibility.
|
|
17
|
+
*/
|
|
10
18
|
this.inputId = uuidv4();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Hides the label visually while still keeping it available for screen
|
|
21
|
+
* readers.
|
|
22
|
+
*/
|
|
15
23
|
this.hideLabel = false;
|
|
16
|
-
|
|
24
|
+
/** Indicates whether the toggle is checked or not. */
|
|
17
25
|
this.checked = false;
|
|
26
|
+
/** Disables the toggle, preventing user interaction. */
|
|
18
27
|
this.disabled = false;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the toggle to read-only, preventing user changes but still allowing
|
|
30
|
+
* focus and selection of text.
|
|
31
|
+
*/
|
|
19
32
|
this.readonly = false;
|
|
20
33
|
}
|
|
21
34
|
//#endregion EVENTS
|
|
@@ -47,8 +60,8 @@ export class NvFieldtoggle {
|
|
|
47
60
|
/****************************************************************************/
|
|
48
61
|
//#region RENDER
|
|
49
62
|
render() {
|
|
50
|
-
return (h(Host, { key: '
|
|
51
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
63
|
+
return (h(Host, { key: '18603a99c814b19f77a3e78f4a7dd3960bdc0841', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, h("div", { key: '3fb419bde30424ee2abdb63d75ef8ef3c78754c8', class: "input-container" }, h("input", { key: '2c6d98d5c1e05bb33832c48fbe4b2e68f133a70f', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), h("div", { key: 'cc81c4e259750d75fb4e799365da64cedb71304c', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '44177bd0153a833d5b5ef7a4e2e1d6dedfea3c91', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, h("slot", { key: '05719cf662559b26b3074e4b9bd67ed908e4c9bf', name: "label" }, this.label))), (this.description ||
|
|
64
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: 'db2e5122431af687ce42c85476bb38bca868ee26', class: "description" }, h("slot", { key: '68256d968071f13d7441b1801d17162b91021a8b', name: "description" }, this.description))))));
|
|
52
65
|
}
|
|
53
66
|
static get is() { return "nv-fieldtoggle"; }
|
|
54
67
|
static get originalStyleUrls() {
|
|
@@ -77,6 +90,8 @@ export class NvFieldtoggle {
|
|
|
77
90
|
"tags": [],
|
|
78
91
|
"text": "Sets the ID for the radio button\u2019s input element and the for attribute of\nthe associated label. If no ID is provided, a random one will be\nautomatically generated to ensure unique identification, facilitating\nproper label association and accessibility."
|
|
79
92
|
},
|
|
93
|
+
"getter": false,
|
|
94
|
+
"setter": false,
|
|
80
95
|
"attribute": "input-id",
|
|
81
96
|
"reflect": false,
|
|
82
97
|
"defaultValue": "uuidv4()"
|
|
@@ -95,6 +110,8 @@ export class NvFieldtoggle {
|
|
|
95
110
|
"tags": [],
|
|
96
111
|
"text": "The name attribute for the toggle input, used to reference the form data\nafter submission."
|
|
97
112
|
},
|
|
113
|
+
"getter": false,
|
|
114
|
+
"setter": false,
|
|
98
115
|
"attribute": "name",
|
|
99
116
|
"reflect": false
|
|
100
117
|
},
|
|
@@ -112,6 +129,8 @@ export class NvFieldtoggle {
|
|
|
112
129
|
"tags": [],
|
|
113
130
|
"text": "The value attribute of the toggle input, representing the value sent on\nform submission when the toggle is checked."
|
|
114
131
|
},
|
|
132
|
+
"getter": false,
|
|
133
|
+
"setter": false,
|
|
115
134
|
"attribute": "value",
|
|
116
135
|
"reflect": false
|
|
117
136
|
},
|
|
@@ -129,6 +148,8 @@ export class NvFieldtoggle {
|
|
|
129
148
|
"tags": [],
|
|
130
149
|
"text": "The label displayed next to the toggle."
|
|
131
150
|
},
|
|
151
|
+
"getter": false,
|
|
152
|
+
"setter": false,
|
|
132
153
|
"attribute": "label",
|
|
133
154
|
"reflect": false
|
|
134
155
|
},
|
|
@@ -152,6 +173,8 @@ export class NvFieldtoggle {
|
|
|
152
173
|
"tags": [],
|
|
153
174
|
"text": "Determines the position of the label relative to the toggle, either\n'start' (before) or 'end' (after)."
|
|
154
175
|
},
|
|
176
|
+
"getter": false,
|
|
177
|
+
"setter": false,
|
|
155
178
|
"attribute": "label-placement",
|
|
156
179
|
"reflect": true
|
|
157
180
|
},
|
|
@@ -169,6 +192,8 @@ export class NvFieldtoggle {
|
|
|
169
192
|
"tags": [],
|
|
170
193
|
"text": "Hides the label visually while still keeping it available for screen\nreaders."
|
|
171
194
|
},
|
|
195
|
+
"getter": false,
|
|
196
|
+
"setter": false,
|
|
172
197
|
"attribute": "hide-label",
|
|
173
198
|
"reflect": false,
|
|
174
199
|
"defaultValue": "false"
|
|
@@ -187,6 +212,8 @@ export class NvFieldtoggle {
|
|
|
187
212
|
"tags": [],
|
|
188
213
|
"text": "A description providing additional context or information about the\ntoggle."
|
|
189
214
|
},
|
|
215
|
+
"getter": false,
|
|
216
|
+
"setter": false,
|
|
190
217
|
"attribute": "description",
|
|
191
218
|
"reflect": true
|
|
192
219
|
},
|
|
@@ -204,6 +231,8 @@ export class NvFieldtoggle {
|
|
|
204
231
|
"tags": [],
|
|
205
232
|
"text": "Indicates whether the toggle is checked or not."
|
|
206
233
|
},
|
|
234
|
+
"getter": false,
|
|
235
|
+
"setter": false,
|
|
207
236
|
"attribute": "checked",
|
|
208
237
|
"reflect": true,
|
|
209
238
|
"defaultValue": "false"
|
|
@@ -222,6 +251,8 @@ export class NvFieldtoggle {
|
|
|
222
251
|
"tags": [],
|
|
223
252
|
"text": "Disables the toggle, preventing user interaction."
|
|
224
253
|
},
|
|
254
|
+
"getter": false,
|
|
255
|
+
"setter": false,
|
|
225
256
|
"attribute": "disabled",
|
|
226
257
|
"reflect": false,
|
|
227
258
|
"defaultValue": "false"
|
|
@@ -240,6 +271,8 @@ export class NvFieldtoggle {
|
|
|
240
271
|
"tags": [],
|
|
241
272
|
"text": "Sets the toggle to read-only, preventing user changes but still allowing\nfocus and selection of text."
|
|
242
273
|
},
|
|
274
|
+
"getter": false,
|
|
275
|
+
"setter": false,
|
|
243
276
|
"attribute": "readonly",
|
|
244
277
|
"reflect": false,
|
|
245
278
|
"defaultValue": "false"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fieldtoggle.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtoggle/nv-fieldtoggle.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,OAAO,EACP,KAAK,EACL,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAIpC;;;GAGG;AAMH,MAAM,OAAO,aAAa
|
|
1
|
+
{"version":3,"file":"nv-fieldtoggle.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtoggle/nv-fieldtoggle.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,OAAO,EACP,KAAK,EACL,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAIpC;;;GAGG;AAMH,MAAM,OAAO,aAAa;IAL1B;QAQE,8EAA8E;QA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,CAAC,EAC9B,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,EACxC,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACvB,CACE;YAEN,4DAAK,KAAK,EAAC,gBAAgB;gBACxB,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAC1D,8DACE,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,iBAAiB,CAAC;oBAEhD,6DAAM,IAAI,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ,CAChC,CACT;gBAEA,CAAC,IAAI,CAAC,WAAW;oBAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAClD,4DAAK,KAAK,EAAC,aAAa;oBACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Watch,\n Event,\n EventEmitter,\n Listen,\n} from '@stencil/core';\nimport clsx from 'clsx';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { type FieldLabelPlacement } from '../../utils/constants';\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 */\n@Component({\n tag: 'nv-fieldtoggle',\n styleUrl: 'nv-fieldtoggle.scss',\n shadow: false,\n})\nexport class NvFieldtoggle {\n @Element() el!: HTMLNvFieldtoggleElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the radio button’s input element and the for attribute of\n * the associated label. If no ID is provided, a random one will be\n * automatically generated to ensure unique identification, facilitating\n * proper label association and accessibility.\n */\n @Prop()\n readonly inputId: string = uuidv4();\n\n /**\n * The name attribute for the toggle input, used to reference the form data\n * after submission.\n */\n @Prop()\n readonly name?: string;\n\n /**\n * The value attribute of the toggle input, representing the value sent on\n * form submission when the toggle is checked.\n */\n @Prop()\n readonly value?: string;\n\n /** The label displayed next to the toggle.*/\n @Prop()\n readonly label?: string;\n\n /**\n * Determines the position of the label relative to the toggle, either\n * 'start' (before) or 'end' (after).\n */\n @Prop({ reflect: true })\n readonly labelPlacement: `${FieldLabelPlacement}`;\n\n /**\n * Hides the label visually while still keeping it available for screen\n * readers.\n */\n @Prop()\n readonly hideLabel: boolean = false;\n\n /**\n * A description providing additional context or information about the\n * toggle.\n */\n @Prop({ reflect: true })\n readonly description?: string;\n\n /** Indicates whether the toggle is checked or not. */\n @Prop({ reflect: true, mutable: true })\n checked: boolean = false;\n\n /** Disables the toggle, preventing user interaction. */\n @Prop()\n readonly disabled: boolean = false;\n\n /**\n * Sets the toggle to read-only, preventing user changes but still allowing\n * focus and selection of text.\n */\n @Prop()\n readonly readonly: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emits when the checked state changes.\n * @bind checked\n */\n @Event()\n checkedChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Watches for changes to the checked state and emits the new value.\n * @param {boolean} checked - The new value of the checked state.\n */\n @Watch('checked')\n onCheckedChanged(checked: boolean) {\n this.checkedChanged.emit(checked);\n }\n\n /**\n * Listens for the change event on the toggle input element and updates the checked state.\n * the checked state of the host elements.\n * @param {Event} event - The change event.\n */\n @Listen('change')\n handleChange(event: Event) {\n const target = event.target as HTMLInputElement;\n\n if (target.type === 'checkbox' && target.id === this.inputId) {\n if (this.readonly || this.disabled) {\n event.preventDefault();\n return;\n }\n\n this.checked = target.checked;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n class={clsx(\n this.labelPlacement === 'before' && 'label-placement-before',\n )}\n >\n <div class=\"input-container\">\n <input\n type=\"checkbox\"\n id={this.inputId}\n name={this.name}\n autocomplete=\"off\"\n value={this.value}\n checked={Boolean(this.checked)}\n disabled={this.disabled || this.readonly}\n readonly={this.readonly}\n />\n </div>\n\n <div class=\"text-container\">\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label\n htmlFor={this.inputId}\n class={clsx(this.hideLabel && 'visually-hidden')}\n >\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\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 </div>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
|
|
@@ -4,15 +4,10 @@ import { SemanticSizes } from "../../utils/constants";
|
|
|
4
4
|
import iconSprite from "@nova-design-system/nova-base/assets/icons/icon-sprite.svg";
|
|
5
5
|
export class NvIcon {
|
|
6
6
|
constructor() {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
this.large = undefined;
|
|
11
|
-
this.xlarge = undefined;
|
|
12
|
-
this.color = undefined;
|
|
13
|
-
this.name = undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Adjust the size of the icon to fit your design needs.
|
|
9
|
+
*/
|
|
14
10
|
this.size = SemanticSizes.Medium;
|
|
15
|
-
this.spriteUrl = undefined;
|
|
16
11
|
}
|
|
17
12
|
componentWillRender() {
|
|
18
13
|
if (this.xsmall) {
|
|
@@ -46,7 +41,7 @@ export class NvIcon {
|
|
|
46
41
|
//#region RENDER
|
|
47
42
|
render() {
|
|
48
43
|
//const iconSprite = getAssetPath('assets/icon-sprite.svg');
|
|
49
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: '1862efaf5cb956c36b1dad264518f7eb37a10c34', class: clsx(this.color && `${this.color}`), role: "img", "aria-label": `${this.name}-icon` }, h("svg", { key: '7beb3a4697c73a42e28b8d59128cea93978ba282', stroke: "currentColor", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: `nv-icon-${this.size}` }, h("use", { key: '50e901a1dc92fb8ada8489e9be15c1bf069df5e6', href: `${this.spriteUrl}#${this.name}` }))));
|
|
50
45
|
}
|
|
51
46
|
static get is() { return "nv-icon"; }
|
|
52
47
|
static get originalStyleUrls() {
|
|
@@ -78,6 +73,8 @@ export class NvIcon {
|
|
|
78
73
|
}],
|
|
79
74
|
"text": "Set size to ExtraSmall."
|
|
80
75
|
},
|
|
76
|
+
"getter": false,
|
|
77
|
+
"setter": false,
|
|
81
78
|
"attribute": "xsmall",
|
|
82
79
|
"reflect": false
|
|
83
80
|
},
|
|
@@ -98,6 +95,8 @@ export class NvIcon {
|
|
|
98
95
|
}],
|
|
99
96
|
"text": "Set size to Small."
|
|
100
97
|
},
|
|
98
|
+
"getter": false,
|
|
99
|
+
"setter": false,
|
|
101
100
|
"attribute": "small",
|
|
102
101
|
"reflect": false
|
|
103
102
|
},
|
|
@@ -118,6 +117,8 @@ export class NvIcon {
|
|
|
118
117
|
}],
|
|
119
118
|
"text": "Set size to Medium."
|
|
120
119
|
},
|
|
120
|
+
"getter": false,
|
|
121
|
+
"setter": false,
|
|
121
122
|
"attribute": "medium",
|
|
122
123
|
"reflect": false
|
|
123
124
|
},
|
|
@@ -138,6 +139,8 @@ export class NvIcon {
|
|
|
138
139
|
}],
|
|
139
140
|
"text": "Set size to Large."
|
|
140
141
|
},
|
|
142
|
+
"getter": false,
|
|
143
|
+
"setter": false,
|
|
141
144
|
"attribute": "large",
|
|
142
145
|
"reflect": false
|
|
143
146
|
},
|
|
@@ -158,6 +161,8 @@ export class NvIcon {
|
|
|
158
161
|
}],
|
|
159
162
|
"text": "Set size to ExtraLarge."
|
|
160
163
|
},
|
|
164
|
+
"getter": false,
|
|
165
|
+
"setter": false,
|
|
161
166
|
"attribute": "xlarge",
|
|
162
167
|
"reflect": false
|
|
163
168
|
},
|
|
@@ -184,6 +189,8 @@ export class NvIcon {
|
|
|
184
189
|
}],
|
|
185
190
|
"text": "Set color of the icon."
|
|
186
191
|
},
|
|
192
|
+
"getter": false,
|
|
193
|
+
"setter": false,
|
|
187
194
|
"attribute": "color",
|
|
188
195
|
"reflect": false
|
|
189
196
|
},
|
|
@@ -207,6 +214,8 @@ export class NvIcon {
|
|
|
207
214
|
"tags": [],
|
|
208
215
|
"text": "Choose the icon you want to display. This also sets the aria-label for\nimproved accessibility, helping users who rely on screen readers."
|
|
209
216
|
},
|
|
217
|
+
"getter": false,
|
|
218
|
+
"setter": false,
|
|
210
219
|
"attribute": "name",
|
|
211
220
|
"reflect": true
|
|
212
221
|
},
|
|
@@ -230,6 +239,8 @@ export class NvIcon {
|
|
|
230
239
|
"tags": [],
|
|
231
240
|
"text": "Adjust the size of the icon to fit your design needs."
|
|
232
241
|
},
|
|
242
|
+
"getter": false,
|
|
243
|
+
"setter": false,
|
|
233
244
|
"attribute": "size",
|
|
234
245
|
"reflect": true,
|
|
235
246
|
"defaultValue": "SemanticSizes.Medium"
|