@nova-design-system/nova-webcomponents 3.0.0-beta.20 → 3.0.0-beta.21
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 +9342 -0
- package/dist/cjs/{app-globals-8dbc03be.js → app-globals-2ceecab2.js} +2 -2
- package/dist/cjs/{app-globals-8dbc03be.js.map → app-globals-2ceecab2.js.map} +1 -1
- package/dist/cjs/{index-b925c7f5.js → index-5d1f2412.js} +6 -20
- package/dist/cjs/index-5d1f2412.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-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 +0 -2
- 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 +121 -1
- package/dist/components/nv-fieldcheckbox.js.map +1 -1
- 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-45ffa910.js → p-50bd2808.js} +2 -2
- package/dist/components/{p-45ffa910.js.map → p-50bd2808.js.map} +1 -1
- package/dist/components/{p-9cbeeff9.js → p-6146d4b0.js} +3 -3
- package/dist/components/{p-9cbeeff9.js.map → p-6146d4b0.js.map} +1 -1
- package/dist/components/{p-c434f2e5.js → p-632bedb8.js} +2 -6
- package/dist/components/p-632bedb8.js.map +1 -0
- package/dist/components/{p-d8a41fbe.js → p-8da6d9a3.js} +3 -3
- package/dist/components/{p-d8a41fbe.js.map → p-8da6d9a3.js.map} +1 -1
- package/dist/components/{p-813b38b1.js → p-be79e7bc.js} +5 -5
- package/dist/components/{p-813b38b1.js.map → p-be79e7bc.js.map} +1 -1
- package/dist/components/{p-d9d56e06.js → p-c711fe67.js} +4 -4
- package/dist/components/{p-d9d56e06.js.map → p-c711fe67.js.map} +1 -1
- package/dist/docs.json +3 -1049
- package/dist/esm/{app-globals-ec286266.js → app-globals-df0a3c8d.js} +2 -2
- package/dist/esm/{app-globals-ec286266.js.map → app-globals-df0a3c8d.js.map} +1 -1
- package/dist/esm/{index-3762ddc4.js → index-179dfba2.js} +6 -20
- package/dist/esm/index-179dfba2.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-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-60f027d4.entry.js → p-06f64d05.entry.js} +2 -2
- package/dist/native/{p-a8fe9493.entry.js → p-0aa0193b.entry.js} +2 -2
- package/dist/native/{p-95a054ed.entry.js → p-124a7067.entry.js} +2 -2
- package/dist/native/{p-ee23e820.entry.js → p-13d0ab5b.entry.js} +2 -2
- package/dist/native/{p-ee23e820.entry.js.map → p-13d0ab5b.entry.js.map} +1 -1
- package/dist/native/{p-3bb76528.entry.js → p-14c08510.entry.js} +2 -2
- package/dist/native/{p-ce6ff56c.entry.js → p-1ceee367.entry.js} +2 -2
- package/dist/native/p-29d482cd.entry.js +2 -0
- package/dist/native/{p-70c73c72.entry.js.map → p-29d482cd.entry.js.map} +1 -1
- package/dist/native/{p-3935c952.entry.js → p-43cd42ca.entry.js} +2 -2
- package/dist/native/{p-8d472724.entry.js → p-519e0f59.entry.js} +2 -2
- package/dist/native/{p-c749aafd.entry.js → p-617d6a09.entry.js} +2 -2
- package/dist/native/p-6f762ec2.entry.js +2 -0
- package/dist/native/{p-068965e9.entry.js.map → p-6f762ec2.entry.js.map} +1 -1
- package/dist/native/{p-1e575590.entry.js → p-71d6aad8.entry.js} +2 -2
- package/dist/native/{p-fd8ee23e.entry.js → p-7ce1b712.entry.js} +2 -2
- package/dist/native/p-80788ddf.js +2 -0
- package/dist/native/{p-5c0e7fda.entry.js → p-830ec54a.entry.js} +2 -2
- package/dist/native/{p-09d57171.entry.js → p-89accab1.entry.js} +2 -2
- package/dist/native/{p-1adc83f5.entry.js → p-8b65b16f.entry.js} +2 -2
- package/dist/native/{p-21bc1cf9.entry.js → p-b5e4a9e7.entry.js} +2 -2
- package/dist/native/{p-c3c9444e.entry.js → p-b8eb4c31.entry.js} +2 -2
- package/dist/native/p-b99aa075.entry.js +2 -0
- package/dist/native/{p-e4d12abd.entry.js → p-d5a8b6c4.entry.js} +2 -2
- package/dist/native/{p-006006b6.js → p-db2a68f3.js} +3 -3
- package/dist/native/p-db2a68f3.js.map +1 -0
- package/dist/native/{p-60679799.entry.js → p-f5acea50.entry.js} +2 -2
- package/dist/native/{p-f215822a.entry.js → p-f9aac71a.entry.js} +2 -2
- package/dist/native/{p-99e17032.entry.js → p-fb6f42b7.entry.js} +2 -2
- package/dist/types/components.d.ts +0 -287
- package/dist/vscode-data.json +3179 -0
- package/hydrate/index.js +33 -495
- package/hydrate/index.mjs +33 -495
- package/hydrate/package.json +1 -1
- package/package.json +3 -2
- package/postinstall.js +15 -0
- package/dist/cjs/index-b925c7f5.js.map +0 -1
- package/dist/cjs/nv-fielddropdownitemcheck.cjs.entry.js +0 -48
- package/dist/cjs/nv-fielddropdownitemcheck.cjs.entry.js.map +0 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +0 -368
- package/dist/cjs/nv-fieldmultiselect.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 -190
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +0 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +0 -195
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +0 -169
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +0 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +0 -822
- 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 -445
- package/dist/components/nv-fieldmultiselect.js.map +0 -1
- package/dist/components/p-1079b972.js +0 -125
- package/dist/components/p-1079b972.js.map +0 -1
- package/dist/components/p-c434f2e5.js.map +0 -1
- package/dist/components/p-dbbda3ac.js +0 -72
- package/dist/components/p-dbbda3ac.js.map +0 -1
- package/dist/esm/index-3762ddc4.js.map +0 -1
- package/dist/esm/nv-fielddropdownitemcheck.entry.js +0 -44
- package/dist/esm/nv-fielddropdownitemcheck.entry.js.map +0 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +0 -364
- package/dist/esm/nv-fieldmultiselect.entry.js.map +0 -1
- package/dist/native/p-006006b6.js.map +0 -1
- package/dist/native/p-056455a2.entry.js +0 -2
- package/dist/native/p-068965e9.entry.js +0 -2
- package/dist/native/p-1392b30f.entry.js +0 -2
- package/dist/native/p-1392b30f.entry.js.map +0 -1
- package/dist/native/p-21cdc57d.entry.js +0 -2
- package/dist/native/p-21cdc57d.entry.js.map +0 -1
- package/dist/native/p-70c73c72.entry.js +0 -2
- package/dist/native/p-b0955577.js +0 -2
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.d.ts +0 -43
- package/dist/types/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.d.ts +0 -4
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +0 -215
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.d.ts +0 -4
- /package/dist/native/{p-60f027d4.entry.js.map → p-06f64d05.entry.js.map} +0 -0
- /package/dist/native/{p-a8fe9493.entry.js.map → p-0aa0193b.entry.js.map} +0 -0
- /package/dist/native/{p-95a054ed.entry.js.map → p-124a7067.entry.js.map} +0 -0
- /package/dist/native/{p-3bb76528.entry.js.map → p-14c08510.entry.js.map} +0 -0
- /package/dist/native/{p-ce6ff56c.entry.js.map → p-1ceee367.entry.js.map} +0 -0
- /package/dist/native/{p-3935c952.entry.js.map → p-43cd42ca.entry.js.map} +0 -0
- /package/dist/native/{p-8d472724.entry.js.map → p-519e0f59.entry.js.map} +0 -0
- /package/dist/native/{p-c749aafd.entry.js.map → p-617d6a09.entry.js.map} +0 -0
- /package/dist/native/{p-1e575590.entry.js.map → p-71d6aad8.entry.js.map} +0 -0
- /package/dist/native/{p-fd8ee23e.entry.js.map → p-7ce1b712.entry.js.map} +0 -0
- /package/dist/native/{p-b0955577.js.map → p-80788ddf.js.map} +0 -0
- /package/dist/native/{p-5c0e7fda.entry.js.map → p-830ec54a.entry.js.map} +0 -0
- /package/dist/native/{p-09d57171.entry.js.map → p-89accab1.entry.js.map} +0 -0
- /package/dist/native/{p-1adc83f5.entry.js.map → p-8b65b16f.entry.js.map} +0 -0
- /package/dist/native/{p-21bc1cf9.entry.js.map → p-b5e4a9e7.entry.js.map} +0 -0
- /package/dist/native/{p-c3c9444e.entry.js.map → p-b8eb4c31.entry.js.map} +0 -0
- /package/dist/native/{p-056455a2.entry.js.map → p-b99aa075.entry.js.map} +0 -0
- /package/dist/native/{p-e4d12abd.entry.js.map → p-d5a8b6c4.entry.js.map} +0 -0
- /package/dist/native/{p-60679799.entry.js.map → p-f5acea50.entry.js.map} +0 -0
- /package/dist/native/{p-f215822a.entry.js.map → p-f9aac71a.entry.js.map} +0 -0
- /package/dist/native/{p-99e17032.entry.js.map → p-fb6f42b7.entry.js.map} +0 -0
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-b925c7f5.js');
|
|
6
|
-
const v4 = require('./v4-7014b8b0.js');
|
|
7
|
-
|
|
8
|
-
const nvFieldmultiselectCss = "nv-fieldmultiselect{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box}nv-fieldmultiselect[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldmultiselect[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive)}nv-fieldmultiselect[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldmultiselect label{display:flex;align-items:center;gap:var(--form-label-gap);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:500;line-height:var(--form-label-line-height)}nv-fieldmultiselect nv-popover{width:100%;display:block}nv-fieldmultiselect .input-wrapper-multiselect{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldmultiselect .input-container-multiselect{display:flex;flex-grow:1;padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);justify-content:center;align-items:center;gap:var(--form-field-gap);align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default);background:var(--nv-field-background);transition:all 150ms ease-out;display:flex;align-items:center;position:relative;width:100%;min-height:40px}nv-fieldmultiselect .input-container-multiselect:hover{border-color:var(--nv-field-border-hover)}nv-fieldmultiselect .input-container-multiselect:focus-within{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldmultiselect .input-container-multiselect:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldmultiselect .input-container-multiselect:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldmultiselect .input-container-multiselect input,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);text-overflow:ellipsis;font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;padding-right:2rem;flex-grow:1;margin:0;min-height:100%;box-sizing:border-box}nv-fieldmultiselect .input-container-multiselect input:focus,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text:focus{outline:none}nv-fieldmultiselect .input-container-multiselect input::placeholder,nv-fieldmultiselect .input-container-multiselect p.non-filterable-text::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldmultiselect .input-container-multiselect .toggle-dropdown-icon{position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:2}nv-fieldmultiselect .input-container-multiselect nv-icon.validation{color:var(--nv-field-border-default);position:absolute;right:50px}nv-fieldmultiselect .input-container-multiselect.focus-within,nv-fieldmultiselect .input-container-multiselect:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldmultiselect .non-filterable-text{display:block;border-radius:var(--form-field-radius);background-color:var(--nv-field-background);color:var(--components-form-field-content-text);font-size:var(--form-field-font-size);font-weight:500;line-height:var(--form-field-line-height);box-sizing:border-box;cursor:pointer;height:100%;min-height:40px}nv-fieldmultiselect .non-filterable-text span{display:inline-block;width:100%;overflow:hidden;text-overflow:ellipsis}nv-fieldmultiselect .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;line-height:var(--form-description-line-height)}nv-fieldmultiselect .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;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}nv-fieldmultiselect hr{border:none;border-top:1px solid var(--dropdown-divider-color, #ccc);margin:0.5rem 0}.input-container-multiselect.focus-within,.input-container-multiselect:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}";
|
|
9
|
-
const NvFieldmultiselectStyle0 = nvFieldmultiselectCss;
|
|
10
|
-
|
|
11
|
-
const NvFieldmultiselect = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
15
|
-
this.multiselectChange = index.createEvent(this, "multiselectChange", 7);
|
|
16
|
-
/**
|
|
17
|
-
* Handle click on the input container.
|
|
18
|
-
* @param {MouseEvent} event - The click event.
|
|
19
|
-
*/
|
|
20
|
-
this.handleInputContainerClick = (event) => {
|
|
21
|
-
if (this.disabled || this.readonly) {
|
|
22
|
-
return; // Do nothing if the dropdown is disabled or read-only
|
|
23
|
-
}
|
|
24
|
-
const target = event.target;
|
|
25
|
-
// Check if it is the paragraph or another part of the container
|
|
26
|
-
if (target.tagName === 'P' || target.tagName === 'SPAN') {
|
|
27
|
-
this.open = true;
|
|
28
|
-
this.popoverElement.show();
|
|
29
|
-
// Simulate focus to trigger "focus-within" style
|
|
30
|
-
const inputContainer = this.el.querySelector('.input-container');
|
|
31
|
-
if (inputContainer) {
|
|
32
|
-
inputContainer.classList.add('focus-within');
|
|
33
|
-
// Remove the "focus-within" class after a delay or when the popover is closed
|
|
34
|
-
const removeFocusWithin = () => {
|
|
35
|
-
inputContainer.classList.remove('focus-within');
|
|
36
|
-
};
|
|
37
|
-
// Or remove the class when the popover is closed
|
|
38
|
-
this.popoverElement.addEventListener('hide', removeFocusWithin);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Handle input change.
|
|
44
|
-
* @param {Event} event - The input event.
|
|
45
|
-
*/
|
|
46
|
-
this.handleInput = (event) => {
|
|
47
|
-
if (!this.filterable)
|
|
48
|
-
return; // Do not filter if `filterable` is false
|
|
49
|
-
if (this.disabled || this.readonly) {
|
|
50
|
-
return; // Do not toggle the state if the dropdown is disabled or read-only
|
|
51
|
-
}
|
|
52
|
-
const input = event.target;
|
|
53
|
-
this.filterText = input.value.toLowerCase();
|
|
54
|
-
this.value = input.value; // Update the value
|
|
55
|
-
this.valueChanged.emit(input.value); // Emit an event if needed
|
|
56
|
-
this.filterItems(); // Update the visibility of items
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Handle input focus.
|
|
60
|
-
*/
|
|
61
|
-
this.handleInputFocus = () => {
|
|
62
|
-
if (this.disabled || this.readonly) {
|
|
63
|
-
return; // Do not toggle the state if the dropdown is disabled or read-only
|
|
64
|
-
}
|
|
65
|
-
this.open = true; // Force the popover to open
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Handle input blur.
|
|
69
|
-
*/
|
|
70
|
-
this.handleInputBlur = () => {
|
|
71
|
-
// Use a delay to check if the focus is still within the popover
|
|
72
|
-
setTimeout(() => {
|
|
73
|
-
if (!this.el.contains(document.activeElement)) {
|
|
74
|
-
this.open = false;
|
|
75
|
-
this.popoverElement.hide(); // Close the popover if the focus is outside the component
|
|
76
|
-
}
|
|
77
|
-
}, 150);
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* Toggle the dropdown popover.
|
|
81
|
-
* @returns {void}
|
|
82
|
-
*/
|
|
83
|
-
this.togglePopover = () => {
|
|
84
|
-
if (this.disabled || this.readonly) {
|
|
85
|
-
return; // Do not toggle if disabled or read-only
|
|
86
|
-
}
|
|
87
|
-
this.open = !this.open;
|
|
88
|
-
if (this.open) {
|
|
89
|
-
this.popoverElement.show();
|
|
90
|
-
// Si le dropdown n'est pas filtrable, focus sur le premier élément
|
|
91
|
-
if (!this.filterable) {
|
|
92
|
-
this.focusFirstItem();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
this.popoverElement.hide();
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
this.maxHeight = '200px';
|
|
100
|
-
this.selectedValues = [];
|
|
101
|
-
this.badgeLabel = 'selected';
|
|
102
|
-
this.options = [];
|
|
103
|
-
this.clearable = false;
|
|
104
|
-
this.inputId = v4.v4();
|
|
105
|
-
this.label = undefined;
|
|
106
|
-
this.description = undefined;
|
|
107
|
-
this.placeholder = undefined;
|
|
108
|
-
this.name = undefined;
|
|
109
|
-
this.open = false;
|
|
110
|
-
this.autocomplete = 'off';
|
|
111
|
-
this.value = undefined;
|
|
112
|
-
this.required = false;
|
|
113
|
-
this.error = false;
|
|
114
|
-
this.errorDescription = undefined;
|
|
115
|
-
this.readonly = false;
|
|
116
|
-
this.disabled = false;
|
|
117
|
-
this.emptyresult = 'No results found';
|
|
118
|
-
this.filterText = '';
|
|
119
|
-
this.filterable = false;
|
|
120
|
-
this.isFilterable = this.filterable;
|
|
121
|
-
}
|
|
122
|
-
handleOpenChanged(event) {
|
|
123
|
-
this.open = event.detail; // Update `open` based on the popover state
|
|
124
|
-
}
|
|
125
|
-
watchFilterableHandler(newValue) {
|
|
126
|
-
this.isFilterable = newValue;
|
|
127
|
-
this.filterable = newValue;
|
|
128
|
-
}
|
|
129
|
-
watchValueHandler() {
|
|
130
|
-
// Handle value change and update the corresponding dropdown item if it exists
|
|
131
|
-
this.setInitialSelection();
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Listen for the `itemChecked` event emitted by child items.
|
|
135
|
-
* Updates the selected values accordingly.
|
|
136
|
-
* @param {CustomEvent<{ value: string; checked: boolean }>} event - The event object containing the selected value and its checked state.
|
|
137
|
-
*/
|
|
138
|
-
handleItemChecked(event) {
|
|
139
|
-
if (this.disabled || this.readonly)
|
|
140
|
-
return;
|
|
141
|
-
const { value, checked } = event.detail;
|
|
142
|
-
// Si une valeur est définie, met à jour `selectedValues`.
|
|
143
|
-
if (value) {
|
|
144
|
-
if (checked) {
|
|
145
|
-
// Ajoute la valeur si elle est cochée
|
|
146
|
-
this.selectedValues = [...this.selectedValues, value];
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
// Retire la valeur si elle est décochée
|
|
150
|
-
this.selectedValues = this.selectedValues.filter(val => val !== value);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// Émet l'événement `multiselectChange` avec la nouvelle liste des valeurs sélectionnées
|
|
154
|
-
this.multiselectChange.emit(this.selectedValues);
|
|
155
|
-
}
|
|
156
|
-
//#endregion EVENTS
|
|
157
|
-
/****************************************************************************/
|
|
158
|
-
//#region METHODS
|
|
159
|
-
/**
|
|
160
|
-
* Subscribe to click outside event.
|
|
161
|
-
*/
|
|
162
|
-
connectedCallback() {
|
|
163
|
-
document.addEventListener('click', this.handleClickOutside.bind(this));
|
|
164
|
-
// Handle pre-selection during component initialization
|
|
165
|
-
this.setInitialSelection();
|
|
166
|
-
// Apply filtering if the dropdown is filterable and there is a value
|
|
167
|
-
if (this.filterable && this.value) {
|
|
168
|
-
this.filterText = this.value.toLowerCase();
|
|
169
|
-
this.filterItems(); // Update the visibility of items
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
// Ensure all items are visible if no filtering is applied
|
|
173
|
-
this.resetFilter();
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Set the initial selection based on the current value and update the inputElement value.
|
|
178
|
-
*/
|
|
179
|
-
setInitialSelection() {
|
|
180
|
-
var _a;
|
|
181
|
-
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
182
|
-
const selectedItem = items.find(item => {
|
|
183
|
-
var _a;
|
|
184
|
-
return item.getAttribute('label') === this.value ||
|
|
185
|
-
item.getAttribute('value') === this.value ||
|
|
186
|
-
((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === this.value;
|
|
187
|
-
});
|
|
188
|
-
// Remove 'selected' from all items first to reset the state
|
|
189
|
-
items.forEach(item => {
|
|
190
|
-
item.removeAttribute('selected');
|
|
191
|
-
item.classList.remove('selected');
|
|
192
|
-
});
|
|
193
|
-
if (selectedItem) {
|
|
194
|
-
// Add the `selected` attribute and `selected` class for visual styling
|
|
195
|
-
selectedItem.setAttribute('selected', 'true');
|
|
196
|
-
selectedItem.classList.add('selected');
|
|
197
|
-
// Update the value and inputElement value to reflect the pre-selected item
|
|
198
|
-
this.value =
|
|
199
|
-
selectedItem.getAttribute('label') ||
|
|
200
|
-
selectedItem.getAttribute('value') ||
|
|
201
|
-
((_a = selectedItem.textContent) === null || _a === void 0 ? void 0 : _a.trim()) ||
|
|
202
|
-
'';
|
|
203
|
-
if (this.inputElement) {
|
|
204
|
-
this.inputElement.value = this.value;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Unsubscribe from click outside event.
|
|
210
|
-
*/
|
|
211
|
-
disconnectedCallback() {
|
|
212
|
-
document.removeEventListener('click', this.handleClickOutside.bind(this));
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Filter dropdown items based on the text entered by the user.
|
|
216
|
-
* If no items are found, display a message indicating no results.
|
|
217
|
-
*/
|
|
218
|
-
filterItems() {
|
|
219
|
-
var _a;
|
|
220
|
-
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
221
|
-
// Remove the "no results found" item if it exists
|
|
222
|
-
const existingEmptyItem = this.el.querySelector('nv-fielddropdownitemcheck[data-empty]');
|
|
223
|
-
if (existingEmptyItem) {
|
|
224
|
-
existingEmptyItem.remove();
|
|
225
|
-
}
|
|
226
|
-
let hasVisibleItems = false;
|
|
227
|
-
// Iterate over all items and adjust their visibility
|
|
228
|
-
items.forEach(item => {
|
|
229
|
-
var _a, _b;
|
|
230
|
-
const textContent = ((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || ''; // Get the textual content of the slot
|
|
231
|
-
const value = ((_b = item.value) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || ''; // Get the value of the `value` attribute
|
|
232
|
-
// Check if the filtered text is present either in the value or in the textual content
|
|
233
|
-
const shouldShow = value.includes(this.filterText) ||
|
|
234
|
-
textContent.includes(this.filterText);
|
|
235
|
-
item.style.display = shouldShow ? '' : 'none'; // Hide or show the item
|
|
236
|
-
if (shouldShow) {
|
|
237
|
-
hasVisibleItems = true;
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
// If no items are visible, add the "no results found" item
|
|
241
|
-
if (!hasVisibleItems) {
|
|
242
|
-
const emptyItem = document.createElement('nv-fielddropdownitemcheck');
|
|
243
|
-
emptyItem.setAttribute('data-empty', 'true');
|
|
244
|
-
emptyItem.setAttribute('disabled', 'true');
|
|
245
|
-
emptyItem.textContent = this.emptyresult;
|
|
246
|
-
(_a = this.el.querySelector('ul[slot="content"]')) === null || _a === void 0 ? void 0 : _a.appendChild(emptyItem);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Reset the filter and make all items visible.
|
|
251
|
-
*/
|
|
252
|
-
resetFilter() {
|
|
253
|
-
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
254
|
-
items.forEach(item => {
|
|
255
|
-
item.style.display = '';
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Retrieves the current filter text entered by the user.
|
|
260
|
-
* @returns {string} The filter text.
|
|
261
|
-
*/
|
|
262
|
-
async getFilterText() {
|
|
263
|
-
return this.filterText;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Handle click outside the component.
|
|
267
|
-
* @param {MouseEvent} event - The click event.
|
|
268
|
-
*/
|
|
269
|
-
handleClickOutside(event) {
|
|
270
|
-
if (this.el.contains(event.target) ||
|
|
271
|
-
(this.inputElement && this.inputElement.contains(event.target))) {
|
|
272
|
-
// If the click is inside the component or on the input, do not close the popover
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
this.popoverElement.hide(); // Close the popover if the click is outside the component
|
|
276
|
-
}
|
|
277
|
-
handleKeyDown(event) {
|
|
278
|
-
if (!this.open) {
|
|
279
|
-
if (event.key === 'ArrowDown') {
|
|
280
|
-
this.open = true;
|
|
281
|
-
this.popoverElement.show();
|
|
282
|
-
// Focus sur le premier élément si la liste n'est pas filtrable
|
|
283
|
-
if (!this.filterable) {
|
|
284
|
-
this.focusFirstItem();
|
|
285
|
-
}
|
|
286
|
-
event.preventDefault();
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck'));
|
|
292
|
-
if (items.length === 0) {
|
|
293
|
-
console.warn('No dropdown items found to navigate');
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
let currentIndex = items.findIndex(item => item.classList.contains('highlighted'));
|
|
297
|
-
if (event.key === 'ArrowDown') {
|
|
298
|
-
event.preventDefault();
|
|
299
|
-
currentIndex = (currentIndex + 1) % items.length;
|
|
300
|
-
this.updateHighlightedItem(items, currentIndex);
|
|
301
|
-
}
|
|
302
|
-
else if (event.key === 'ArrowUp') {
|
|
303
|
-
event.preventDefault();
|
|
304
|
-
currentIndex = (currentIndex - 1 + items.length) % items.length;
|
|
305
|
-
this.updateHighlightedItem(items, currentIndex);
|
|
306
|
-
}
|
|
307
|
-
else if (event.key === 'Enter' && currentIndex >= 0) {
|
|
308
|
-
event.preventDefault();
|
|
309
|
-
items[currentIndex].click();
|
|
310
|
-
}
|
|
311
|
-
else if (event.key === 'Escape') {
|
|
312
|
-
event.preventDefault();
|
|
313
|
-
this.open = false;
|
|
314
|
-
this.popoverElement.hide();
|
|
315
|
-
if (this.inputElement) {
|
|
316
|
-
this.inputElement.blur();
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
updateHighlightedItem(items, index) {
|
|
321
|
-
items.forEach((item, i) => {
|
|
322
|
-
if (i === index) {
|
|
323
|
-
item.classList.add('highlighted');
|
|
324
|
-
item.setAttribute('tabindex', '0');
|
|
325
|
-
item.focus();
|
|
326
|
-
}
|
|
327
|
-
else {
|
|
328
|
-
item.classList.remove('highlighted');
|
|
329
|
-
item.setAttribute('tabindex', '-1');
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
focusFirstItem() {
|
|
334
|
-
const firstItem = this.el.querySelector('nv-fielddropdownitemcheck');
|
|
335
|
-
if (firstItem) {
|
|
336
|
-
firstItem.setAttribute('tabindex', '0');
|
|
337
|
-
firstItem.classList.add('highlighted');
|
|
338
|
-
firstItem.focus();
|
|
339
|
-
}
|
|
340
|
-
else {
|
|
341
|
-
console.warn('No first item found to focus');
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
//#endregion METHODS
|
|
345
|
-
/****************************************************************************/
|
|
346
|
-
//#region RENDER
|
|
347
|
-
render() {
|
|
348
|
-
return (index.h(index.Host, { key: '8491eef8fe6d3df7b6cc1992c2894e8dd2513a6c' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '79c49fdbcdf7ca404880d318c59afe5096bf4b9e', htmlFor: this.inputId }, index.h("slot", { key: 'f4eba554fc97e2ae1a24f01a20d3e37ab84acae4', name: "label" }, this.label))), index.h("nv-popover", { key: '46b5a94caa12e50b592de484b158ba67715cec14', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: '473a98f6c7636d65b1d9d35beb6f3c5ba012179f', class: "input-wrapper-multiselect", slot: "trigger" }, index.h("slot", { key: '4038e51342c18e735ea2c164a1658f0928f3f7e1', name: "before-input" }), index.h("div", { key: 'cb53b835fb716e20f79593cdf7874f64987a8cc5', class: "input-container-multiselect", onClick: this.handleInputContainerClick }, index.h("slot", { key: 'c5879628d28b7901bca1da93499ed83f661e1fe3', name: "leading-input" }), this.isFilterable || this.disabled || this.readonly ? (index.h("input", { id: this.inputId, type: "search", ref: e => (this.inputElement = e), autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, value: this.value, required: this.required, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onKeyDown: this.handleKeyDown })) : (index.h("p", { id: this.inputId, class: "non-filterable-text", onClick: this.handleInputContainerClick, tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocus }, index.h("span", null, this.value || this.placeholder))), index.h("nv-iconbutton", { key: '8459a377fbee5cebc457bcc53385a6e8832e4781', class: "toggle-dropdown-icon", name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', "aria-pressed": this.open.toString(), onClick: this.togglePopover })), index.h("slot", { key: 'f338a93f4eaac472817ce32f72695e8ea026b3d7', name: "after-input" })), index.h("slot", { key: 'e9c871135bbed4f64113ab6a7ff5342a3374860e', name: "content" }, index.h("ul", { key: 'd129ae2fcf0d84d7337b886fbd7a0b64dc6e0c3e' }, this.options.map(option => (index.h("li", { class: {
|
|
349
|
-
'dropdown-item': true,
|
|
350
|
-
'is-selected': this.selectedValues.includes(option.value),
|
|
351
|
-
}, "aria-selected": this.selectedValues
|
|
352
|
-
.includes(option.value)
|
|
353
|
-
.toString(), role: "option" }, index.h("nv-fielddropdownitemcheck", { value: option.value, label: option.label, checked: this.selectedValues.includes(option.value) }))))))), (this.description ||
|
|
354
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '66ce27f7c0ee316381c12664130518e84e080fd4', class: "description" }, index.h("slot", { key: '9a7bd32d04f2b451fff8d6546273097c7bf8b0cc', name: "description" }, this.description))), (this.errorDescription ||
|
|
355
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'ffcc1911fb6485e2b34dbb1dfb775d2800bfd940', hidden: !this.error, class: "error-description" }, index.h("slot", { key: 'd77fe0f486d0d0e9a905463f85fb91edbf7c0854', name: "error-description" }, this.errorDescription)))));
|
|
356
|
-
}
|
|
357
|
-
static get formAssociated() { return true; }
|
|
358
|
-
get el() { return index.getElement(this); }
|
|
359
|
-
static get watchers() { return {
|
|
360
|
-
"filterable": ["watchFilterableHandler"],
|
|
361
|
-
"value": ["watchValueHandler"]
|
|
362
|
-
}; }
|
|
363
|
-
};
|
|
364
|
-
NvFieldmultiselect.style = NvFieldmultiselectStyle0;
|
|
365
|
-
|
|
366
|
-
exports.nv_fieldmultiselect = NvFieldmultiselect;
|
|
367
|
-
|
|
368
|
-
//# sourceMapping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AAM,KACtBA,gBACE,KAAK,EAAE;gBACL,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;aAC1D,mBACc,IAAI,CAAC,cAAc;iBAC/B,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;iBACtB,QAAQ,EAAE,EACb,IAAI,EAAC,QAAQ,IAEbA,uCACE,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,GACnD,CACC,CACN,CAAC,CACC,CACA,CACI,EAGZ,CAAC,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7CA,kEAAK,KAAK,EAAC,aAAa,IACtBA,mEAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAGA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnDA,kEAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IACjDA,mEAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;","names":["uuidv4","h","Host"],"sources":["src/components/nv-fieldmultiselect/nv-fieldmultiselect.scss?tag=nv-fieldmultiselect","src/components/nv-fieldmultiselect/nv-fieldmultiselect.tsx"],"sourcesContent":["// // @import '../../styles/form-field';\n\n// // nv-fieldmultiselect {\n// // @include form-field-variables();\n// // @include form-field-root();\n\n// // &[readonly]:not([readonly='false']) {\n// // @include form-field-readonly-variables();\n// // }\n\n// // &[error]:not([error='false']) {\n// // @include form-field-error-variables();\n// // }\n\n// // &[required]:not([required='false']) label {\n// // @include form-field-label-required();\n// // }\n\n// // label {\n// // @include form-field-label();\n// // }\n\n// // nv-popover {\n// // width: 100%;\n// // display: block;\n// // }\n\n// // .input-wrapper {\n// // @include form-field-input-wrapper();\n// // width: 100%;\n// // }\n\n// // // .input-container {\n// // // @include form-field-input-container();\n// // // display: flex;\n// // // align-items: center;\n// // // position: relative;\n// // // width: 100%;\n// // // min-height: 40px;\n\n// // // input,\n// // // p.non-filterable-text {\n// // // @include form-field-input();\n// // // width: 100%;\n// // // padding-right: 2rem;\n// // // flex-grow: 1;\n// // // margin: 0;\n// // // min-height: 100%;\n// // // box-sizing: border-box;\n// // // }\n\n// // // .toggle-dropdown-icon {\n// // // position: absolute;\n// // // right: 0;\n// // // top: 50%;\n// // // transform: translateY(-50%);\n// // // z-index: 2;\n// // // }\n\n// // // nv-icon.validation {\n// // // @include form-field-icon();\n// // // position: absolute;\n// // // right: 50px;\n// // // }\n\n// // // &.focus-within,\n// // // &:hover {\n// // // border-color: var(--nv-field-border-focus);\n// // // box-shadow: 0px 0px 0px var(--focus-field-stroke)\n// // // var(--nv-field-focus-box-shadow);\n// // // }\n// // // }\n\n// // .non-filterable-text {\n// // display: block;\n// // border-radius: var(--form-field-radius);\n// // background-color: var(--nv-field-background);\n// // color: var(--components-form-field-content-text);\n// // font-size: var(--form-field-font-size);\n// // font-weight: 500;\n// // line-height: var(--form-field-line-height);\n// // box-sizing: border-box;\n// // cursor: pointer;\n// // height: 100%;\n// // min-height: 40px;\n\n// // span {\n// // display: inline-block;\n// // width: 100%;\n// // overflow: hidden;\n// // text-overflow: ellipsis;\n// // }\n// // }\n\n// // .dropdown-list {\n// // max-height: var(--dropdown-max-height, 200px);\n// // overflow-y: auto;\n// // list-style: none;\n// // margin: 0;\n// // padding: 0;\n// // background-color: var(--nv-field-background);\n// // border: 1px solid var(--nv-field-border);\n// // border-radius: var(--form-field-radius);\n\n// // li {\n// // padding: 0.5rem 1rem;\n// // display: flex;\n// // align-items: center;\n// // cursor: pointer;\n// // transition: background-color 0.2s ease;\n\n// // &.dropdown-item {\n// // &:hover {\n// // background-color: rgba(var(--nv-primary-rgb), 0.1);\n// // }\n\n// // &.is-selected {\n// // background-color: rgba(var(--nv-primary-rgb), 0.2);\n// // }\n\n// // // input[type='checkbox'] {\n// // // margin-right: 0.5rem;\n// // // }\n// // }\n\n// // &.disabled {\n// // color: var(--nv-field-disabled-text);\n// // cursor: not-allowed;\n// // }\n// // }\n// // }\n\n// // // .badge {\n// // // display: inline-flex;\n// // // align-items: center;\n// // // background-color: var(--nv-primary);\n// // // color: var(--nv-field-background);\n// // // padding: 0.25rem 0.5rem;\n// // // border-radius: 12px;\n// // // font-size: 0.75rem;\n\n// // // .close-icon {\n// // // margin-left: 0.25rem;\n// // // cursor: pointer;\n\n// // // &:hover {\n// // // color: rgba(var(--nv-primary-rgb), 0.8);\n// // // }\n// // // }\n// // // }\n\n// // .description {\n// // @include form-field-description();\n// // }\n\n// // .error-description {\n// // @include form-field-error-description();\n// // }\n\n// // hr {\n// // border: none;\n// // border-top: 1px solid var(--dropdown-divider-color, #ccc);\n// // margin: 0.5rem 0;\n// // }\n// // }\n\n// // .input-container.focus-within,\n// // .input-container:hover {\n// // border-color: var(--nv-field-border-focus);\n// // box-shadow: 0px 0px 0px var(--focus-field-stroke)\n// // var(--nv-field-focus-box-shadow);\n// // }\n\n// @import '../../styles/form-field';\n\n// nv-fieldmultiselect {\n// @include form-field-variables();\n// @include form-field-root();\n\n// &[readonly]:not([readonly='false']) {\n// @include form-field-readonly-variables();\n// }\n\n// &[error]:not([error='false']) {\n// @include form-field-error-variables();\n// }\n\n// &[required]:not([required='false']) label {\n// @include form-field-label-required();\n// }\n\n// label {\n// @include form-field-label();\n// }\n// // display: flex;\n// // align-items: center;\n// // justify-content: space-between;\n// // max-width: 300px;\n// // width: 100%;\n// // padding: var(--menu-contextual-item-padding-y)\n// // var(--menu-contextual-item-padding-x); //var(--components-list-custom-padding-y) var(--components-list-custom-padding-x);\n// // font-size: var(--menu-contextual-item-font-size);\n// // font-weight: var(--menu-contextual-item-font-weight);\n// // color: var(--components-menu-contextual-item-content);\n// // border-radius: var(--menu-contextual-item-radius);\n// // transition: background-color 150ms ease-out, color 150ms ease-out;\n// // cursor: pointer;\n\n// // &:hover,\n// // &:focus,\n// // &:focus-within {\n// // background-color: var(--components-menu-contextual-item-background-hover);\n// // color: var(--components-menu-contextual-item-content-hover);\n// // }\n\n// // &.selected {\n// // background-color: var(\n// // --components-menu-contextual-item-background-selected\n// // );\n// // color: var(--components-menu-contextual-item-content-selected);\n// // }\n\n// // &[disabled]:not([disabled='false']) {\n// // cursor: not-allowed;\n// // background-color: unset;\n// // color: var(--components-menu-contextual-item-content-disabled);\n// // }\n\n// // [data-scope='text'] {\n// // flex-grow: 1;\n// // overflow: hidden;\n// // text-overflow: ellipsis;\n// // white-space: nowrap;\n// // }\n\n// // .selection-icon {\n// // padding-left: 10px;\n// // color: var(--components-menu-contextual-item-icon-selected);\n// // align-self: center;\n// // }\n// }\n\n// :root {\n// --components-menu-contextual-item-background-selected: #f5f6f7; // Couleur de fond pour l'élément sélectionné\n// --components-menu-contextual-item-content-selected: #171f22; // Couleur du texte pour l'élément sélectionné\n// --components-menu-contextual-item-icon-selected: #007f00; // Couleur de l'icône (coche) pour l'élément sélectionné\n// --components-menu-contextual-item-background-hover: #f5f6f7; // Couleur de fond lors du hover\n// --components-menu-contextual-item-content-hover: #171f22; // Couleur du texte lors du hover\n// }\n\n\n@import '../../styles/form-field';\n\nnv-fieldmultiselect {\n @include form-field-variables();\n @include form-field-root();\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n width: 100%;\n display: block;\n }\n\n .input-wrapper-multiselect {\n @include form-field-input-wrapper();\n width: 100%;\n }\n\n .input-container-multiselect {\n @include form-field-input-container();\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n min-height: 40px;\n input,\n p.non-filterable-text {\n @include form-field-input();\n width: 100%;\n padding-right: 2rem;\n flex-grow: 1;\n margin: 0;\n min-height: 100%;\n box-sizing: border-box;\n }\n\n .toggle-dropdown-icon {\n position: absolute;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n z-index: 2;\n }\n\n nv-icon.validation {\n @include form-field-icon();\n position: absolute;\n right: 50px;\n }\n\n &.focus-within,\n &:hover {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0px 0px 0px var(--focus-field-stroke)\n var(--nv-field-focus-box-shadow);\n }\n }\n\n .non-filterable-text {\n display: block;\n border-radius: var(--form-field-radius);\n background-color: var(--nv-field-background);\n color: var(--components-form-field-content-text);\n font-size: var(--form-field-font-size);\n font-weight: 500;\n line-height: var(--form-field-line-height);\n box-sizing: border-box;\n cursor: pointer;\n height: 100%;\n min-height: 40px;\n\n span {\n display: inline-block;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n\n hr {\n border: none;\n border-top: 1px solid var(--dropdown-divider-color, #ccc);\n margin: 0.5rem 0;\n }\n}\n\n.input-container-multiselect.focus-within,\n.input-container-multiselect:hover {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0px 0px 0px var(--focus-field-stroke)\n var(--nv-field-focus-box-shadow);\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n Method,\n} from '@stencil/core';\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n// import { DropdownItemSelectedEventDetail } from '../nv-fielddropdownitemcheck/DropdownItemSelectedEventDetail';\n\n/**\n * @slot content - The content of the list.\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n\n@Component({\n tag: 'nv-fieldmultiselect',\n styleUrl: 'nv-fieldmultiselect.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldmultiselect {\n @Element() el: HTMLNvFieldmultiselectElement;\n private inputElement!: HTMLInputElement;\n private popoverElement!: HTMLNvPopoverElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Maximum height of the dropdown list when open.\n */\n @Prop({ reflect: true })\n readonly maxHeight: string = '200px';\n\n /**\n * List of selected values in the multiselect.\n */\n @State()\n selectedValues: string[] = [];\n\n /**\n * Text for the badge showing the number of selected items.\n */\n @Prop({ reflect: true })\n readonly badgeLabel: string = 'selected';\n\n /**\n * List of options available in the dropdown.\n */\n @Prop()\n readonly options: Array<{ label: string; value: string }> = [];\n\n /**\n * Enables a clear-all button for the selection.\n */\n @Prop({ reflect: true })\n readonly clearable: boolean = false;\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n * The placeholder is displayed only when the filterable option is enabled.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * State of the dropdown popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they’ve used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the dropdown\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * The text to display when no items match the filter.\n */\n @Prop({ reflect: true })\n readonly emptyresult: string = 'No results found';\n\n /**\n * The text entered by the user for filtering dropdown items.\n */\n @State()\n filterText: string = '';\n\n /**\n * Enables or disables the filtering feature for the dropdown items.\n */\n @Prop({ reflect: true, mutable: true })\n filterable: boolean = false;\n\n @State()\n isFilterable: boolean = this.filterable;\n\n // @State()\n // selectedValues: Set<string> = new Set();\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n this.open = event.detail; // Update `open` based on the popover state\n }\n\n @Watch('filterable')\n watchFilterableHandler(newValue: boolean) {\n this.isFilterable = newValue;\n this.filterable = newValue;\n }\n\n @Watch('value')\n watchValueHandler() {\n // Handle value change and update the corresponding dropdown item if it exists\n this.setInitialSelection();\n }\n\n /**\n * Event emitted when the selection changes in the multiselect.\n * Emits the current list of selected values.\n */\n @Event()\n multiselectChange: EventEmitter<string[]>;\n\n /**\n * Listen for the `itemChecked` event emitted by child items.\n * Updates the selected values accordingly.\n * @param {CustomEvent<{ value: string; checked: boolean }>} event - The event object containing the selected value and its checked state.\n */\n @Listen('itemChecked')\n handleItemChecked(\n event: CustomEvent<{ value: string | undefined; checked: boolean }>,\n ) {\n if (this.disabled || this.readonly) return;\n\n const { value, checked } = event.detail;\n\n // Si une valeur est définie, met à jour `selectedValues`.\n if (value) {\n if (checked) {\n // Ajoute la valeur si elle est cochée\n this.selectedValues = [...this.selectedValues, value];\n } else {\n // Retire la valeur si elle est décochée\n this.selectedValues = this.selectedValues.filter(val => val !== value);\n }\n }\n\n // Émet l'événement `multiselectChange` avec la nouvelle liste des valeurs sélectionnées\n this.multiselectChange.emit(this.selectedValues);\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Subscribe to click outside event.\n */\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside.bind(this));\n\n // Handle pre-selection during component initialization\n this.setInitialSelection();\n\n // Apply filtering if the dropdown is filterable and there is a value\n if (this.filterable && this.value) {\n this.filterText = this.value.toLowerCase();\n this.filterItems(); // Update the visibility of items\n } else {\n // Ensure all items are visible if no filtering is applied\n this.resetFilter();\n }\n }\n\n /**\n * Set the initial selection based on the current value and update the inputElement value.\n */\n private setInitialSelection() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n ) as HTMLNvFielddropdownitemcheckElement[];\n\n const selectedItem = items.find(\n item =>\n item.getAttribute('label') === this.value ||\n item.getAttribute('value') === this.value ||\n item.textContent?.trim() === this.value,\n );\n\n // Remove 'selected' from all items first to reset the state\n items.forEach(item => {\n item.removeAttribute('selected');\n item.classList.remove('selected');\n });\n\n if (selectedItem) {\n // Add the `selected` attribute and `selected` class for visual styling\n selectedItem.setAttribute('selected', 'true');\n selectedItem.classList.add('selected');\n\n // Update the value and inputElement value to reflect the pre-selected item\n this.value =\n selectedItem.getAttribute('label') ||\n selectedItem.getAttribute('value') ||\n selectedItem.textContent?.trim() ||\n '';\n if (this.inputElement) {\n this.inputElement.value = this.value;\n }\n }\n }\n\n /**\n * Unsubscribe from click outside event.\n */\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside.bind(this));\n }\n\n /**\n * Handle click on the input container.\n * @param {MouseEvent} event - The click event.\n */\n private handleInputContainerClick = (event: MouseEvent) => {\n if (this.disabled || this.readonly) {\n return; // Do nothing if the dropdown is disabled or read-only\n }\n\n const target = event.target as HTMLElement;\n\n // Check if it is the paragraph or another part of the container\n if (target.tagName === 'P' || target.tagName === 'SPAN') {\n this.open = true;\n this.popoverElement.show();\n\n // Simulate focus to trigger \"focus-within\" style\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n // Remove the \"focus-within\" class after a delay or when the popover is closed\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n // Or remove the class when the popover is closed\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n /**\n * Handle input change.\n * @param {Event} event - The input event.\n */\n private handleInput = (event: Event) => {\n if (!this.filterable) return; // Do not filter if `filterable` is false\n if (this.disabled || this.readonly) {\n return; // Do not toggle the state if the dropdown is disabled or read-only\n }\n const input = event.target as HTMLInputElement;\n this.filterText = input.value.toLowerCase();\n this.value = input.value; // Update the value\n this.valueChanged.emit(input.value); // Emit an event if needed\n this.filterItems(); // Update the visibility of items\n };\n\n /**\n * Filter dropdown items based on the text entered by the user.\n * If no items are found, display a message indicating no results.\n */\n private filterItems() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n ) as HTMLNvFielddropdownitemcheckElement[];\n\n // Remove the \"no results found\" item if it exists\n const existingEmptyItem = this.el.querySelector(\n 'nv-fielddropdownitemcheck[data-empty]',\n );\n if (existingEmptyItem) {\n existingEmptyItem.remove();\n }\n\n let hasVisibleItems = false;\n\n // Iterate over all items and adjust their visibility\n items.forEach(item => {\n const textContent = item.textContent?.toLowerCase() || ''; // Get the textual content of the slot\n const value = item.value?.toLowerCase() || ''; // Get the value of the `value` attribute\n\n // Check if the filtered text is present either in the value or in the textual content\n const shouldShow =\n value.includes(this.filterText) ||\n textContent.includes(this.filterText);\n\n item.style.display = shouldShow ? '' : 'none'; // Hide or show the item\n\n if (shouldShow) {\n hasVisibleItems = true;\n }\n });\n\n // If no items are visible, add the \"no results found\" item\n if (!hasVisibleItems) {\n const emptyItem = document.createElement('nv-fielddropdownitemcheck');\n emptyItem.setAttribute('data-empty', 'true');\n emptyItem.setAttribute('disabled', 'true');\n emptyItem.textContent = this.emptyresult;\n this.el.querySelector('ul[slot=\"content\"]')?.appendChild(emptyItem);\n }\n }\n\n /**\n * Reset the filter and make all items visible.\n */\n private resetFilter() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n ) as HTMLNvFielddropdownitemcheckElement[];\n\n items.forEach(item => {\n item.style.display = '';\n });\n }\n\n /**\n * Retrieves the current filter text entered by the user.\n * @returns {string} The filter text.\n */\n @Method()\n async getFilterText(): Promise<string> {\n return this.filterText;\n }\n\n /**\n * Handle click outside the component.\n * @param {MouseEvent} event - The click event.\n */\n private handleClickOutside(event: MouseEvent) {\n if (\n this.el.contains(event.target as Node) ||\n (this.inputElement && this.inputElement.contains(event.target as Node))\n ) {\n // If the click is inside the component or on the input, do not close the popover\n return;\n }\n\n this.popoverElement.hide(); // Close the popover if the click is outside the component\n }\n\n /**\n * Handle input focus.\n */\n private handleInputFocus = () => {\n if (this.disabled || this.readonly) {\n return; // Do not toggle the state if the dropdown is disabled or read-only\n }\n this.open = true; // Force the popover to open\n };\n\n /**\n * Handle input blur.\n */\n private handleInputBlur = () => {\n // Use a delay to check if the focus is still within the popover\n setTimeout(() => {\n if (!this.el.contains(document.activeElement)) {\n this.open = false;\n this.popoverElement.hide(); // Close the popover if the focus is outside the component\n }\n }, 150);\n };\n\n /**\n * Toggle the dropdown popover.\n * @returns {void}\n */\n private togglePopover = (): void => {\n if (this.disabled || this.readonly) {\n return; // Do not toggle if disabled or read-only\n }\n\n this.open = !this.open;\n if (this.open) {\n this.popoverElement.show();\n\n // Si le dropdown n'est pas filtrable, focus sur le premier élément\n if (!this.filterable) {\n this.focusFirstItem();\n }\n } else {\n this.popoverElement.hide();\n }\n };\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n this.popoverElement.show();\n\n // Focus sur le premier élément si la liste n'est pas filtrable\n if (!this.filterable) {\n this.focusFirstItem();\n }\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n ) as HTMLNvFielddropdownitemcheckElement[];\n\n if (items.length === 0) {\n console.warn('No dropdown items found to navigate');\n return;\n }\n\n let currentIndex = items.findIndex(item =>\n item.classList.contains('highlighted'),\n );\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n currentIndex = (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex = (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Enter' && currentIndex >= 0) {\n event.preventDefault();\n items[currentIndex].click();\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.open = false;\n this.popoverElement.hide();\n if (this.inputElement) {\n this.inputElement.blur();\n }\n }\n }\n\n private updateHighlightedItem(\n items: (\n | HTMLNvFielddropdownitemcheckElement\n | HTMLNvFielddropdownitemcheckElement\n )[],\n index: number,\n ) {\n items.forEach((item, i) => {\n if (i === index) {\n item.classList.add('highlighted');\n item.setAttribute('tabindex', '0');\n (item as HTMLElement).focus();\n } else {\n item.classList.remove('highlighted');\n item.setAttribute('tabindex', '-1');\n }\n });\n }\n\n private focusFirstItem() {\n const firstItem = this.el.querySelector(\n 'nv-fielddropdownitemcheck',\n ) as HTMLNvFielddropdownitemcheckElement;\n\n if (firstItem) {\n firstItem.setAttribute('tabindex', '0');\n firstItem.classList.add('highlighted');\n firstItem.focus();\n } else {\n console.warn('No first item found to focus');\n }\n }\n\n //#endregion METHODS\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 <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n {/* <div class=\"input-wrapper\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.isFilterable ? (\n <input\n id={this.inputId}\n type=\"search\"\n ref={e => (this.inputElement = e)}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n value={this.filterText}\n onInput={this.handleInput}\n onFocus={this.handleInputFocus}\n onBlur={this.handleInputBlur}\n onKeyDown={this.handleKeyDown}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n />\n ) : (\n <p\n id={this.inputId}\n class=\"non-filterable-text\"\n tabIndex={0}\n onClick={this.handleInputContainerClick}\n onFocus={this.handleInputFocus}\n onKeyDown={this.handleKeyDown}\n >\n <span>\n {this.selectedValues.length > 0\n ? `${this.selectedValues.length} ${this.badgeLabel}`\n : this.placeholder}\n </span>\n </p>\n )}\n\n <nv-iconbutton\n class=\"toggle-dropdown-icon\"\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide dropdown' : 'Show dropdown'}\n aria-pressed={this.open.toString()}\n onClick={this.togglePopover}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div> */}\n\n <div class=\"input-wrapper-multiselect\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container-multiselect\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.isFilterable || this.disabled || this.readonly ? (\n <input\n id={this.inputId}\n type=\"search\"\n ref={e => (this.inputElement = e)}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n value={this.value}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n onFocus={this.handleInputFocus}\n onBlur={this.handleInputBlur}\n onKeyDown={this.handleKeyDown}\n />\n ) : (\n <p\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClick}\n tabIndex={0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocus}\n >\n <span>{this.value || this.placeholder}</span>\n </p>\n )}\n\n <nv-iconbutton\n class=\"toggle-dropdown-icon\"\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide dropdown' : 'Show dropdown'}\n aria-pressed={this.open.toString()}\n onClick={this.togglePopover}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <slot name=\"content\">\n <ul>\n {this.options.map(option => (\n <li\n class={{\n 'dropdown-item': true,\n 'is-selected': this.selectedValues.includes(option.value),\n }}\n aria-selected={this.selectedValues\n .includes(option.value)\n .toString()}\n role=\"option\"\n >\n <nv-fielddropdownitemcheck\n value={option.value}\n label={option.label}\n checked={this.selectedValues.includes(option.value)}\n />\n </li>\n ))}\n </ul>\n </slot>\n </nv-popover>\n\n {/* Description */}\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 {/* Message d'erreur */}\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"],"version":3}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
|
-
nv-fielddropdownitemcheck slot-fb {
|
|
3
|
-
all: unset; /* Réinitialise tous les styles hérités */
|
|
4
|
-
}
|
|
5
|
-
nv-fielddropdownitemcheck nv-fieldcheckbox input[type=checkbox] {
|
|
6
|
-
all: unset; /* Réinitialise tous les styles hérités */
|
|
7
|
-
display: inline-block; /* Assurez-vous qu'il s'affiche correctement */
|
|
8
|
-
margin: 0; /* Supprime les marges */
|
|
9
|
-
padding: 0; /* Supprime les espaces internes */
|
|
10
|
-
width: 20px;
|
|
11
|
-
height: 20px;
|
|
12
|
-
}
|
package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fielddropdownitemcheck.docs.js","sourceRoot":"","sources":["../../../src/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.tsx"],"names":[],"mappings":"AAGA,MAAM,4BAA4B,GAChC;IACE,SAAS,EAAE,2BAA2B;IACtC,IAAI,EAAE,IAAI;CACX,CAAC;AAEJ,eAAe,4BAA4B,CAAC","sourcesContent":["import type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\n\nconst NvFielddropdownitemcheckDocs: NovaDocs<Components.NvFielddropdownitemcheck> =\n {\n component: 'nv-fielddropdownitemcheck',\n skip: true,\n };\n\nexport default NvFielddropdownitemcheckDocs;\n"]}
|