@nova-design-system/nova-webcomponents 3.0.0-beta.17 → 3.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-2ceecab2.js → app-globals-8dbc03be.js} +2 -2
- package/dist/cjs/{app-globals-2ceecab2.js.map → app-globals-8dbc03be.js.map} +1 -1
- package/dist/cjs/{index-5d1f2412.js → index-b925c7f5.js} +20 -6
- package/dist/cjs/index-b925c7f5.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/native.cjs.js +3 -3
- 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.cjs.entry.js +1 -1
- package/dist/cjs/nv-base.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddropdownitemcheck.cjs.entry.js +48 -0
- package/dist/cjs/nv-fielddropdownitemcheck.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +368 -0
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldselect.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldtext.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldtoggle.cjs.entry.js +3 -3
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton.cjs.entry.js +2 -2
- package/dist/cjs/nv-loader.cjs.entry.js +2 -2
- package/dist/cjs/nv-menu.cjs.entry.js +2 -2
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +2 -2
- package/dist/cjs/nv-row.cjs.entry.js +2 -2
- package/dist/cjs/nv-stack.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +12 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js +6 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js.map +1 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +190 -0
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +195 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +169 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +822 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.js +2 -2
- package/dist/collection/components/nv-icon/nv-icon.js +2 -2
- package/dist/collection/components/nv-icon/nv-icon.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-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-tooltip/nv-tooltip.js +1 -1
- package/dist/components/index.js +3 -3
- package/dist/components/nv-alert.js +2 -2
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +2 -2
- package/dist/components/nv-base.js +1 -1
- package/dist/components/nv-button.js +2 -2
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -121
- package/dist/components/nv-fieldcheckbox.js.map +1 -1
- package/dist/components/nv-fielddropdownitemcheck.d.ts +11 -0
- package/dist/components/nv-fielddropdownitemcheck.js +8 -0
- package/dist/components/nv-fielddropdownitemcheck.js.map +1 -0
- package/dist/components/nv-fieldmultiselect.d.ts +11 -0
- package/dist/components/nv-fieldmultiselect.js +445 -0
- package/dist/components/nv-fieldmultiselect.js.map +1 -0
- package/dist/components/nv-fieldnumber.js +5 -5
- package/dist/components/nv-fieldpassword.js +7 -7
- package/dist/components/nv-fieldradio.js +4 -4
- package/dist/components/nv-fieldselect.js +7 -7
- package/dist/components/nv-fieldtext.js +5 -5
- package/dist/components/nv-fieldtextarea.js +4 -4
- package/dist/components/nv-fieldtoggle.js +3 -3
- 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 +3 -3
- package/dist/components/nv-menuitem.js +2 -2
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +2 -2
- package/dist/components/nv-stack.js +2 -2
- package/dist/components/nv-tooltip.js +3 -3
- package/dist/components/p-1079b972.js +125 -0
- package/dist/components/p-1079b972.js.map +1 -0
- package/dist/components/{p-50bd2808.js → p-45ffa910.js} +2 -2
- package/dist/components/{p-50bd2808.js.map → p-45ffa910.js.map} +1 -1
- package/dist/components/{p-be79e7bc.js → p-813b38b1.js} +5 -5
- package/dist/components/{p-be79e7bc.js.map → p-813b38b1.js.map} +1 -1
- package/dist/components/{p-6146d4b0.js → p-9cbeeff9.js} +3 -3
- package/dist/components/{p-6146d4b0.js.map → p-9cbeeff9.js.map} +1 -1
- package/dist/components/{p-632bedb8.js → p-c434f2e5.js} +6 -2
- package/dist/components/p-c434f2e5.js.map +1 -0
- package/dist/components/{p-8da6d9a3.js → p-d8a41fbe.js} +3 -3
- package/dist/components/{p-8da6d9a3.js.map → p-d8a41fbe.js.map} +1 -1
- package/dist/components/{p-c711fe67.js → p-d9d56e06.js} +4 -4
- package/dist/components/{p-c711fe67.js.map → p-d9d56e06.js.map} +1 -1
- package/dist/components/p-dbbda3ac.js +72 -0
- package/dist/components/p-dbbda3ac.js.map +1 -0
- package/dist/docs.json +1049 -3
- package/dist/esm/{app-globals-df0a3c8d.js → app-globals-ec286266.js} +2 -2
- package/dist/esm/{app-globals-df0a3c8d.js.map → app-globals-ec286266.js.map} +1 -1
- package/dist/esm/{index-179dfba2.js → index-3762ddc4.js} +20 -6
- package/dist/esm/index-3762ddc4.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/native.js +4 -4
- package/dist/esm/nv-alert.entry.js +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge.entry.js +1 -1
- package/dist/esm/nv-base.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-col.entry.js +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fielddropdownitemcheck.entry.js +44 -0
- package/dist/esm/nv-fielddropdownitemcheck.entry.js.map +1 -0
- package/dist/esm/nv-fieldmultiselect.entry.js +364 -0
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -0
- package/dist/esm/nv-fieldnumber.entry.js +4 -4
- package/dist/esm/nv-fieldpassword.entry.js +4 -4
- package/dist/esm/nv-fieldradio.entry.js +4 -4
- package/dist/esm/nv-fieldselect.entry.js +6 -6
- package/dist/esm/nv-fieldtext.entry.js +4 -4
- package/dist/esm/nv-fieldtextarea.entry.js +4 -4
- package/dist/esm/nv-fieldtoggle.entry.js +3 -3
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton.entry.js +2 -2
- package/dist/esm/nv-loader.entry.js +2 -2
- package/dist/esm/nv-menu.entry.js +2 -2
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +2 -2
- package/dist/esm/nv-row.entry.js +2 -2
- package/dist/esm/nv-stack.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +2 -2
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-db2a68f3.js → p-006006b6.js} +3 -3
- package/dist/native/p-006006b6.js.map +1 -0
- package/dist/native/p-056455a2.entry.js +2 -0
- package/dist/native/p-068965e9.entry.js +2 -0
- package/dist/native/{p-6f762ec2.entry.js.map → p-068965e9.entry.js.map} +1 -1
- package/dist/native/{p-89accab1.entry.js → p-09d57171.entry.js} +2 -2
- package/dist/native/p-1392b30f.entry.js +2 -0
- package/dist/native/p-1392b30f.entry.js.map +1 -0
- package/dist/native/{p-8b65b16f.entry.js → p-1adc83f5.entry.js} +2 -2
- package/dist/native/{p-71d6aad8.entry.js → p-1e575590.entry.js} +2 -2
- package/dist/native/{p-b5e4a9e7.entry.js → p-21bc1cf9.entry.js} +2 -2
- package/dist/native/p-21cdc57d.entry.js +2 -0
- package/dist/native/p-21cdc57d.entry.js.map +1 -0
- package/dist/native/{p-43cd42ca.entry.js → p-3935c952.entry.js} +2 -2
- package/dist/native/{p-14c08510.entry.js → p-3bb76528.entry.js} +2 -2
- package/dist/native/{p-830ec54a.entry.js → p-5c0e7fda.entry.js} +2 -2
- package/dist/native/{p-f5acea50.entry.js → p-60679799.entry.js} +2 -2
- package/dist/native/{p-06f64d05.entry.js → p-60f027d4.entry.js} +2 -2
- package/dist/native/p-70c73c72.entry.js +2 -0
- package/dist/native/{p-29d482cd.entry.js.map → p-70c73c72.entry.js.map} +1 -1
- package/dist/native/{p-519e0f59.entry.js → p-8d472724.entry.js} +2 -2
- package/dist/native/{p-124a7067.entry.js → p-95a054ed.entry.js} +2 -2
- package/dist/native/{p-fb6f42b7.entry.js → p-99e17032.entry.js} +2 -2
- package/dist/native/{p-0aa0193b.entry.js → p-a8fe9493.entry.js} +2 -2
- package/dist/native/p-b0955577.js +2 -0
- package/dist/native/{p-b8eb4c31.entry.js → p-c3c9444e.entry.js} +2 -2
- package/dist/native/{p-617d6a09.entry.js → p-c749aafd.entry.js} +2 -2
- package/dist/native/{p-1ceee367.entry.js → p-ce6ff56c.entry.js} +2 -2
- package/dist/native/{p-d5a8b6c4.entry.js → p-e4d12abd.entry.js} +2 -2
- package/dist/native/{p-13d0ab5b.entry.js → p-ee23e820.entry.js} +2 -2
- package/dist/native/{p-13d0ab5b.entry.js.map → p-ee23e820.entry.js.map} +1 -1
- package/dist/native/{p-f9aac71a.entry.js → p-f215822a.entry.js} +2 -2
- package/dist/native/{p-7ce1b712.entry.js → p-fd8ee23e.entry.js} +2 -2
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +43 -0
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.d.ts +4 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +215 -0
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.d.ts +4 -0
- package/dist/types/components.d.ts +287 -0
- package/hydrate/index.js +495 -33
- package/hydrate/index.mjs +495 -33
- package/hydrate/package.json +1 -1
- package/package.json +1 -1
- package/dist/blazor-docs.json +0 -9342
- package/dist/cjs/index-5d1f2412.js.map +0 -1
- package/dist/components/p-632bedb8.js.map +0 -1
- package/dist/esm/index-179dfba2.js.map +0 -1
- package/dist/native/p-29d482cd.entry.js +0 -2
- package/dist/native/p-6f762ec2.entry.js +0 -2
- package/dist/native/p-80788ddf.js +0 -2
- package/dist/native/p-b99aa075.entry.js +0 -2
- package/dist/native/p-db2a68f3.js.map +0 -1
- package/dist/vscode-data.json +0 -3179
- /package/dist/native/{p-b99aa075.entry.js.map → p-056455a2.entry.js.map} +0 -0
- /package/dist/native/{p-89accab1.entry.js.map → p-09d57171.entry.js.map} +0 -0
- /package/dist/native/{p-8b65b16f.entry.js.map → p-1adc83f5.entry.js.map} +0 -0
- /package/dist/native/{p-71d6aad8.entry.js.map → p-1e575590.entry.js.map} +0 -0
- /package/dist/native/{p-b5e4a9e7.entry.js.map → p-21bc1cf9.entry.js.map} +0 -0
- /package/dist/native/{p-43cd42ca.entry.js.map → p-3935c952.entry.js.map} +0 -0
- /package/dist/native/{p-14c08510.entry.js.map → p-3bb76528.entry.js.map} +0 -0
- /package/dist/native/{p-830ec54a.entry.js.map → p-5c0e7fda.entry.js.map} +0 -0
- /package/dist/native/{p-f5acea50.entry.js.map → p-60679799.entry.js.map} +0 -0
- /package/dist/native/{p-06f64d05.entry.js.map → p-60f027d4.entry.js.map} +0 -0
- /package/dist/native/{p-519e0f59.entry.js.map → p-8d472724.entry.js.map} +0 -0
- /package/dist/native/{p-124a7067.entry.js.map → p-95a054ed.entry.js.map} +0 -0
- /package/dist/native/{p-fb6f42b7.entry.js.map → p-99e17032.entry.js.map} +0 -0
- /package/dist/native/{p-0aa0193b.entry.js.map → p-a8fe9493.entry.js.map} +0 -0
- /package/dist/native/{p-80788ddf.js.map → p-b0955577.js.map} +0 -0
- /package/dist/native/{p-b8eb4c31.entry.js.map → p-c3c9444e.entry.js.map} +0 -0
- /package/dist/native/{p-617d6a09.entry.js.map → p-c749aafd.entry.js.map} +0 -0
- /package/dist/native/{p-1ceee367.entry.js.map → p-ce6ff56c.entry.js.map} +0 -0
- /package/dist/native/{p-d5a8b6c4.entry.js.map → p-e4d12abd.entry.js.map} +0 -0
- /package/dist/native/{p-f9aac71a.entry.js.map → p-f215822a.entry.js.map} +0 -0
- /package/dist/native/{p-7ce1b712.entry.js.map → p-fd8ee23e.entry.js.map} +0 -0
|
@@ -1,124 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as clsx } from './p-8a1a6e56.js';
|
|
3
|
-
import { v as v4 } from './p-f5ff676c.js';
|
|
4
|
-
|
|
5
|
-
const nvFieldcheckboxCss = "nv-fieldcheckbox{--nv-fieldcheckbox-border-default:var(--components-form-field-border-default);--nv-fieldcheckbox-border-hover:var(--components-form-field-border-hover);--nv-fieldcheckbox-border-focus:var(--components-form-field-border-default);--nv-fieldcheckbox-background-default:var(--components-form-field-background-default);--nv-fieldcheckbox-background-checked:var(--components-form-field-background-checked);--nv-fieldcheckbox-background-disabled:var(--components-form-field-background-disabled);--nv-fieldcheckbox-focus-box-shadow:var(--color-focus-brand);--nv-fieldcheckbox-color-checked:var(--components-form-shape-foreground-default);--nv-fieldcheckbox-color-disabled:var(--components-form-shape-foreground-disabled);--nv-fieldcheckbox-outline-color:var(--color-focus-brand);display:inline-flex;align-items:flex-start;gap:var(--form-gap-x);position:relative}nv-fieldcheckbox:not([disabled],[readonly]) input,nv-fieldcheckbox:not([disabled],[readonly]) label{cursor:pointer}nv-fieldcheckbox.error .input-container{--nv-fieldcheckbox-border-default:var(--components-form-field-border-error);--nv-fieldcheckbox-border-hover:var(--nv-fieldcheckbox-border-default);--nv-fieldcheckbox-border-focus:var(--components-form-field-border-error);--nv-fieldcheckbox-focus-box-shadow:var(--color-focus-destructive);--nv-fieldcheckbox-color-disabled:var(--components-form-shape-foreground-disabled-error);--nv-fieldcheckbox-background-checked:var(--components-form-field-background-error);--nv-fieldcheckbox-outline-color:var(--color-focus-destructive)}nv-fieldcheckbox.label-placement-before{flex-direction:row-reverse}nv-fieldcheckbox[disabled]{opacity:0.5}nv-fieldcheckbox label{align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--form-label-font-weight);line-height:var(--form-label-line-height)}nv-fieldcheckbox .input-container{position:relative;color:var(--nv-fieldcheckbox-color-checked)}nv-fieldcheckbox .input-container input[type=checkbox][readonly]{opacity:0.5}nv-fieldcheckbox .input-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--nv-fieldcheckbox-color-disabled)}nv-fieldcheckbox .input-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-checkbox-size);height:var(--form-checkbox-size);flex-direction:column;align-items:flex-start;border-radius:var(--form-checkbox-radius);border-width:var(--form-checkbox-border-width);border-style:solid;border-color:var(--nv-fieldcheckbox-border-default);background:var(--nv-fieldcheckbox-background-default)}nv-fieldcheckbox .input-container input[type=checkbox]:hover{border-color:var(--nv-fieldcheckbox-border-hover)}nv-fieldcheckbox .input-container input[type=checkbox]:focus{border-color:var(--nv-fieldcheckbox-border-focus)}nv-fieldcheckbox .input-container input[type=checkbox]:focus,nv-fieldcheckbox .input-container input[type=checkbox]:focus-within{outline:none}nv-fieldcheckbox .input-container input[type=checkbox]:focus-visible,nv-fieldcheckbox .input-container input[type=checkbox]:has(:focus-visible){outline:var(--focus-outline-stroke) solid var(--nv-fieldcheckbox-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-fieldcheckbox .input-container input[type=checkbox]:checked,nv-fieldcheckbox .input-container input[type=checkbox]:indeterminate{background:var(--nv-fieldcheckbox-background-checked);border-color:var(--nv-fieldcheckbox-background-checked)}nv-fieldcheckbox .input-container input[type=checkbox]:disabled:not([readonly]){background:var(--nv-fieldcheckbox-background-disabled);border-color:var(--nv-fieldcheckbox-border-default)}nv-fieldcheckbox .input-container input[type=checkbox][readonly]{opacity:0.5}nv-fieldcheckbox .input-container .icon{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}nv-fieldcheckbox .input-container .icon svg{width:var(--form-checkbox-icon-size);height:var(--form-checkbox-icon-size);fill:none;stroke:currentcolor;stroke-width:var(--form-checkbox-icon-stroke);flex-shrink:0}nv-fieldcheckbox .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:var(--form-description-font-weight);line-height:var(--form-description-line-height)}nv-fieldcheckbox .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:var(--form-description-font-weight);line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}nv-fieldcheckbox .text-container{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}";
|
|
6
|
-
const NvFieldcheckboxStyle0 = nvFieldcheckboxCss;
|
|
7
|
-
|
|
8
|
-
const NvFieldcheckbox$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldcheckbox extends H {
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
this.__registerHost();
|
|
12
|
-
this.checkedChanged = createEvent(this, "checkedChanged", 7);
|
|
13
|
-
this.message = undefined;
|
|
14
|
-
this.validation = undefined;
|
|
15
|
-
this.labelBefore = false;
|
|
16
|
-
this.inputId = v4();
|
|
17
|
-
this.name = undefined;
|
|
18
|
-
this.value = undefined;
|
|
19
|
-
this.label = undefined;
|
|
20
|
-
this.labelPlacement = undefined;
|
|
21
|
-
this.hideLabel = false;
|
|
22
|
-
this.description = undefined;
|
|
23
|
-
this.error = false;
|
|
24
|
-
this.errorDescription = undefined;
|
|
25
|
-
this.checked = false;
|
|
26
|
-
this.indeterminate = false;
|
|
27
|
-
this.disabled = false;
|
|
28
|
-
this.readonly = false;
|
|
29
|
-
this.required = false;
|
|
30
|
-
}
|
|
31
|
-
componentWillRender() {
|
|
32
|
-
if (this.message) {
|
|
33
|
-
this.description = this.message;
|
|
34
|
-
}
|
|
35
|
-
if (this.labelBefore) {
|
|
36
|
-
this.labelPlacement = 'before';
|
|
37
|
-
}
|
|
38
|
-
if (this.validation) {
|
|
39
|
-
this.errorDescription = this.validation;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
//#endregion EVENTS
|
|
43
|
-
/****************************************************************************/
|
|
44
|
-
//#region WATCHERS
|
|
45
|
-
/**
|
|
46
|
-
* Watches for changes to the checked state and emits the new value.
|
|
47
|
-
* @param {boolean} checked - The new value of the checked state.
|
|
48
|
-
*/
|
|
49
|
-
onCheckedChanged(checked) {
|
|
50
|
-
this.checkedChanged.emit(checked);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Listens for the change event on the checkbox input element and updates the
|
|
54
|
-
* checked state.
|
|
55
|
-
* @param {Event} event - The change event.
|
|
56
|
-
*/
|
|
57
|
-
handleChange(event) {
|
|
58
|
-
const target = event.target;
|
|
59
|
-
if (target.type === 'checkbox' && target.id === this.inputId) {
|
|
60
|
-
if (this.readonly || this.disabled) {
|
|
61
|
-
event.preventDefault();
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
if (this.indeterminate) {
|
|
65
|
-
this.indeterminate = false;
|
|
66
|
-
}
|
|
67
|
-
this.checked = target.checked;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
//#endregion WATCHERS
|
|
71
|
-
/****************************************************************************/
|
|
72
|
-
//#region RENDER
|
|
73
|
-
render() {
|
|
74
|
-
return (h(Host, { key: 'b927465541957ac5e40c6af190757ac44cf4a104', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, h("div", { key: 'a8a14a21f274f0ad1ebaecb4af0b6eeee73ad0bd', class: "input-container" }, h("input", { key: '1ca6af28c329360b9b919a65516b1f1573669881', 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 && !this.required, required: this.required, indeterminate: this.indeterminate, ref: el => {
|
|
75
|
-
if (el) {
|
|
76
|
-
el.indeterminate = this.indeterminate;
|
|
77
|
-
}
|
|
78
|
-
} }), h("span", { key: 'ebdf5ba1086be1fed6c4364557c8c78c1b226333', class: "icon" }, this.checked && !this.indeterminate && (h("slot", { key: '5722e106a2945a670ff93a49203f41dafafc230b', name: "checked-icon" }, h("svg", { key: 'ba9707c495766d7909f2f234f122a5eb1dd975a5', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, h("path", { key: 'dea34c4e8dd9857321c1f5625fbb3d5b02aa42ca', d: "M11.6667 3.5L5.25004 9.91667L2.33337 7", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.indeterminate && (h("slot", { key: 'd833f4c34381f2579a09049239b467e77f90ac45', name: "indeterminate-icon" }, h("svg", { key: 'c0555c3edaa8eaa841b36d90f2bbd7cee458007d', class: "indeterminate-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none" }, h("path", { key: 'c5f4f39e6a4ae2bead864a3945a5f7b6b737f724', d: "M2.9165 7H11.0832", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), h("div", { key: '986f1a08c34f548675cf6d9872514445a36a07af', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '8a4925c138bc779af8df218c7a4bfaa290e71142', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, h("slot", { key: '514f59b77e90d090b2459aaa65ffdab6e56158fc', name: "label" }, this.label))), (this.description ||
|
|
79
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '569e7989c59ffed32610f88a01e75074520884c0', class: "description" }, h("slot", { key: '53eb9d3836b74e99e27a7b0ae6b4e91e6d4b16c6', name: "description" }, this.description))), (this.errorDescription ||
|
|
80
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'ab1b17a3b93ec09021d16ece7d37bce578d20dcb', hidden: !this.error, class: "error-description" }, h("slot", { key: '7c183b11c038a45b8f5e4a78f268fefe1512b1eb', name: "error-description" }, this.errorDescription))))));
|
|
81
|
-
}
|
|
82
|
-
get el() { return this; }
|
|
83
|
-
static get watchers() { return {
|
|
84
|
-
"checked": ["onCheckedChanged"]
|
|
85
|
-
}; }
|
|
86
|
-
static get style() { return NvFieldcheckboxStyle0; }
|
|
87
|
-
}, [4, "nv-fieldcheckbox", {
|
|
88
|
-
"message": [1],
|
|
89
|
-
"validation": [1],
|
|
90
|
-
"labelBefore": [4, "label-before"],
|
|
91
|
-
"inputId": [513, "input-id"],
|
|
92
|
-
"name": [513],
|
|
93
|
-
"value": [513],
|
|
94
|
-
"label": [513],
|
|
95
|
-
"labelPlacement": [1537, "label-placement"],
|
|
96
|
-
"hideLabel": [516, "hide-label"],
|
|
97
|
-
"description": [1537],
|
|
98
|
-
"error": [516],
|
|
99
|
-
"errorDescription": [1537, "error-description"],
|
|
100
|
-
"checked": [1540],
|
|
101
|
-
"indeterminate": [1540],
|
|
102
|
-
"disabled": [516],
|
|
103
|
-
"readonly": [516],
|
|
104
|
-
"required": [516]
|
|
105
|
-
}, [[0, "change", "handleChange"]], {
|
|
106
|
-
"checked": ["onCheckedChanged"]
|
|
107
|
-
}]);
|
|
108
|
-
function defineCustomElement$1() {
|
|
109
|
-
if (typeof customElements === "undefined") {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
const components = ["nv-fieldcheckbox"];
|
|
113
|
-
components.forEach(tagName => { switch (tagName) {
|
|
114
|
-
case "nv-fieldcheckbox":
|
|
115
|
-
if (!customElements.get(tagName)) {
|
|
116
|
-
customElements.define(tagName, NvFieldcheckbox$1);
|
|
117
|
-
}
|
|
118
|
-
break;
|
|
119
|
-
} });
|
|
120
|
-
}
|
|
121
|
-
defineCustomElement$1();
|
|
1
|
+
import { N as NvFieldcheckbox$1, d as defineCustomElement$1 } from './p-1079b972.js';
|
|
122
2
|
|
|
123
3
|
const NvFieldcheckbox = NvFieldcheckbox$1;
|
|
124
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nv-fieldcheckbox.js","mappings":"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","names":["NvFieldcheckbox","uuidv4"],"sources":["src/components/nv-fieldcheckbox/nv-fieldcheckbox.scss?tag=nv-fieldcheckbox","src/components/nv-fieldcheckbox/nv-fieldcheckbox.tsx"],"sourcesContent":["@import \"../../styles/focus-ring\";\n\n@mixin fieldcheckbox-variables() {\n --nv-fieldcheckbox-border-default: var(--components-form-field-border-default);\n --nv-fieldcheckbox-border-hover: var(--components-form-field-border-hover);\n --nv-fieldcheckbox-border-focus: var(--components-form-field-border-default);\n --nv-fieldcheckbox-background-default: var(--components-form-field-background-default);\n --nv-fieldcheckbox-background-checked: var(--components-form-field-background-checked);\n --nv-fieldcheckbox-background-disabled: var(--components-form-field-background-disabled);\n --nv-fieldcheckbox-focus-box-shadow: var(--color-focus-brand);\n --nv-fieldcheckbox-color-checked: var(--components-form-shape-foreground-default);\n --nv-fieldcheckbox-color-disabled: var(--components-form-shape-foreground-disabled);\n --nv-fieldcheckbox-outline-color: var(--color-focus-brand);\n}\n\n@mixin fieldcheckbox-error-variables() {\n --nv-fieldcheckbox-border-default: var(--components-form-field-border-error);\n --nv-fieldcheckbox-border-hover: var(--nv-fieldcheckbox-border-default);\n --nv-fieldcheckbox-border-focus: var(--components-form-field-border-error);\n --nv-fieldcheckbox-focus-box-shadow: var(--color-focus-destructive);\n --nv-fieldcheckbox-color-disabled: var(--components-form-shape-foreground-disabled-error);\n --nv-fieldcheckbox-background-checked: var(--components-form-field-background-error);\n --nv-fieldcheckbox-outline-color: var(--color-focus-destructive);\n}\n\n@mixin root-styles() {\n display: inline-flex;\n align-items: flex-start;\n gap: var(--form-gap-x);\n position: relative;\n\n &:not([disabled], [readonly]) {\n input,\n label {\n cursor: pointer;\n }\n }\n}\n\n@mixin label-before-styles() {\n flex-direction: row-reverse;\n}\n\n@mixin label-styles() {\n align-self: stretch;\n color: var(--components-form-text-label-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-label-font-size);\n font-style: normal;\n font-weight: var(--form-label-font-weight);\n line-height: var(--form-label-line-height);\n}\n\n@mixin description-styles() {\n align-self: stretch;\n color: var(--components-form-text-description-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n font-weight: var(--form-description-font-weight);\n line-height: var(--form-description-line-height);\n}\n\n@mixin error-description-styles() {\n @include description-styles();\n\n color: var(--components-form-text-description-error);\n}\n\n@mixin text-container-styles() {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex: 1 0 0;\n}\n\n@mixin input-container-styles() {\n position: relative;\n color: var(--nv-fieldcheckbox-color-checked);\n\n input[type=checkbox][readonly] {\n // TODO: Find a way to use the --components-form-opacity-disabled variable properly, right now it outputs a value of 50px instead of 0.5.\n opacity: 0.5;\n }\n\n &:has(input[type=\"checkbox\"]:disabled:not([readonly])) {\n color: var(--nv-fieldcheckbox-color-disabled);\n }\n}\n\n@mixin input-styles() {\n appearance: none;\n position: relative;\n display: flex;\n width: var(--form-checkbox-size);\n height: var(--form-checkbox-size);\n flex-direction: column;\n align-items: flex-start;\n border-radius: var(--form-checkbox-radius);\n border-width: var(--form-checkbox-border-width);\n border-style: solid;\n border-color: var(--nv-fieldcheckbox-border-default);\n background: var(--nv-fieldcheckbox-background-default);\n\n &:hover {\n border-color: var(--nv-fieldcheckbox-border-hover);\n }\n\n &:focus {\n border-color: var(--nv-fieldcheckbox-border-focus);\n }\n\n @include focus-ring(var(--nv-fieldcheckbox-outline-color));\n\n &:checked,\n &:indeterminate {\n background: var(--nv-fieldcheckbox-background-checked);\n border-color: var(--nv-fieldcheckbox-background-checked);\n }\n\n &:disabled:not([readonly]) {\n background: var(--nv-fieldcheckbox-background-disabled);\n border-color: var(--nv-fieldcheckbox-border-default);\n }\n\n &[readonly] {\n // TODO: Find a way to use the --components-form-opacity-disabled variable properly, right now it outputs a value of 50px instead of 0.5.\n opacity: 0.5;\n }\n}\n\n@mixin icon-styles() {\n pointer-events: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n\n svg {\n width: var(--form-checkbox-icon-size);\n height: var(--form-checkbox-icon-size);\n fill: none;\n stroke: currentcolor;\n stroke-width: var(--form-checkbox-icon-stroke);\n flex-shrink: 0;\n }\n}\n\nnv-fieldcheckbox {\n @include fieldcheckbox-variables();\n @include root-styles();\n\n &.error .input-container {\n @include fieldcheckbox-error-variables();\n }\n\n &.label-placement-before {\n @include label-before-styles();\n }\n &[disabled] {\n // TODO: Find a way to use the --components-form-opacity-disabled variable properly, right now it outputs a value of 50px instead of 0.5.\n opacity: 0.5;\n }\n label {\n @include label-styles();\n }\n\n .input-container {\n @include input-container-styles();\n\n input[type=\"checkbox\"] {\n @include input-styles();\n }\n\n .icon {\n @include icon-styles();\n }\n }\n\n .description {\n @include description-styles();\n }\n\n .error-description {\n @include error-description-styles();\n }\n\n .text-container {\n @include text-container-styles();\n }\n}\n","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 * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n * @slot checked-icon - Content to be placed as the checked icon, will override the checkedIcon prop.\n * @slot indeterminate-icon - Content to be placed as the indeterminate icon, will override the indeterminateIcon prop.\n */\n@Component({\n tag: 'nv-fieldcheckbox',\n styleUrl: 'nv-fieldcheckbox.scss',\n shadow: false,\n})\nexport class NvFieldcheckbox {\n @Element() el!: HTMLNvFieldcheckboxElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message define a 'hint ' message for the Field.\n * @deprecated Use `description` instead.\n * */\n @Prop()\n readonly message?: string;\n\n /**\n * The text for the validation message.\n * @deprecated Use `errorDescription` instead.\n * */\n @Prop()\n readonly validation?: string;\n\n /**\n * When true, the label will be placed before the checkbox.\n * @deprecated Use `labelPlacement = end` instead.\n * */\n @Prop()\n readonly labelBefore?: boolean = false;\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.labelBefore) {\n this.labelPlacement = 'before';\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n }\n }\n\n //#endregion DEPRECATED\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({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * The name attribute for the checkbox input, used to reference the form data\n * after submission.\n */\n @Prop({ reflect: true })\n readonly name?: string;\n\n /**\n * The value attribute of the checkbox input, representing the value sent on\n * form submission when the checkbox is checked. When the form is submitted,\n * the data will consist of a name=value pair.\n */\n @Prop({ reflect: true })\n readonly value?: string;\n\n /**\n * The label displayed next to the checkbox.\n */\n @Prop({ reflect: true })\n readonly label?: string;\n\n /**\n * Determines the position of the label relative to the checkbox, either\n * 'start' (before) or 'end' (after).\n */\n @Prop({ reflect: true, mutable: true })\n labelPlacement: `${FieldLabelPlacement}`;\n\n /**\n * Hides the label visually while still keeping it available for screen\n * readers.\n */\n @Prop({ reflect: true })\n readonly hideLabel: boolean = false;\n\n /**\n * A description providing additional context or information about the\n * checkbox.\n */\n @Prop({ reflect: true, mutable: true })\n description?: string;\n\n /**\n * Signals that there is an error associated with the checkbox, which can\n * trigger visual cues.\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the checkbox.\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription?: string;\n\n /**\n * Indicates whether the checkbox is checked or not.\n */\n @Prop({ reflect: true, mutable: true })\n checked: boolean = false;\n\n /**\n * Indicates whether the checkbox is in an indeterminate state, typically used\n * for hierarchical checkboxes.\n */\n @Prop({ reflect: true, mutable: true })\n indeterminate: boolean = false;\n\n /**\n * Disables the checkbox, preventing user interaction.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Sets the checkbox to read-only, preventing user changes but still allowing\n * focus and selection of text.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the checkbox as required, indicating that it must be checked for\n * form submission.\n */\n @Prop({ reflect: true })\n readonly required: 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 checkbox input element and updates the\n * checked state.\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 if (this.indeterminate) {\n this.indeterminate = false;\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 this.error && 'error',\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 && !this.required}\n required={this.required}\n indeterminate={this.indeterminate}\n ref={el => {\n if (el) {\n el.indeterminate = this.indeterminate;\n }\n }}\n />\n <span class=\"icon\">\n {this.checked && !this.indeterminate && (\n <slot name=\"checked-icon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n >\n <path\n d=\"M11.6667 3.5L5.25004 9.91667L2.33337 7\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </slot>\n )}\n {this.indeterminate && (\n <slot name=\"indeterminate-icon\">\n <svg\n class=\"indeterminate-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n >\n <path\n d=\"M2.9165 7H11.0832\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </slot>\n )}\n </span>\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\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 </div>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
|
|
1
|
+
{"file":"nv-fieldcheckbox.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface NvFielddropdownitemcheck extends Components.NvFielddropdownitemcheck, HTMLElement {}
|
|
4
|
+
export const NvFielddropdownitemcheck: {
|
|
5
|
+
prototype: NvFielddropdownitemcheck;
|
|
6
|
+
new (): NvFielddropdownitemcheck;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { N as NvFielddropdownitemcheck$1, d as defineCustomElement$1 } from './p-dbbda3ac.js';
|
|
2
|
+
|
|
3
|
+
const NvFielddropdownitemcheck = NvFielddropdownitemcheck$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { NvFielddropdownitemcheck, defineCustomElement };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=nv-fielddropdownitemcheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"nv-fielddropdownitemcheck.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface NvFieldmultiselect extends Components.NvFieldmultiselect, HTMLElement {}
|
|
4
|
+
export const NvFieldmultiselect: {
|
|
5
|
+
prototype: NvFieldmultiselect;
|
|
6
|
+
new (): NvFieldmultiselect;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|