@nova-design-system/nova-webcomponents 3.0.0-beta.37 → 3.0.0-beta.38
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 +103 -1
- package/dist/cjs/index.cjs.js +21 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +16 -3
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +2 -2
- package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js +1 -0
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +5 -2
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +6 -6
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +16 -3
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.css +13 -28
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.css +7 -6
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +7 -7
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.css +36 -17
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +2 -2
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +2 -2
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +2 -2
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.css +7 -7
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +1 -0
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js +21 -0
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- package/dist/collection/components/nv-table/nv-table.js +5 -2
- package/dist/collection/components/nv-table/nv-table.js.map +1 -1
- package/dist/collection/templates/navigation.docs.js +1 -0
- package/dist/collection/templates/navigation.docs.js.map +1 -1
- package/dist/components/index.js +21 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-datagrid.js +2 -2
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-dialog.js +18 -5
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-fielddropdown.js +4 -4
- package/dist/components/nv-fielddropdown.js.map +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +5 -5
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +2 -2
- package/dist/components/nv-fieldnumber.js.map +1 -1
- package/dist/components/nv-fieldpassword.js +3 -3
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldselect.js +1 -1
- package/dist/components/nv-fieldtext.js +2 -2
- package/dist/components/nv-fieldtext.js.map +1 -1
- package/dist/components/nv-fieldtime.js +3 -3
- package/dist/components/nv-fieldtime.js.map +1 -1
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-menu.js +2 -2
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-table.js +2 -2
- package/dist/components/nv-table.js.map +1 -1
- package/dist/components/{p-e431a0ad.js → p-1c83f303.js} +2 -2
- package/dist/components/{p-e431a0ad.js.map → p-1c83f303.js.map} +1 -1
- package/dist/components/{p-4938572a.js → p-79bf6acb.js} +2 -2
- package/dist/components/{p-4938572a.js.map → p-79bf6acb.js.map} +1 -1
- package/dist/components/{p-de8411ee.js → p-802c9204.js} +2 -2
- package/dist/components/{p-de8411ee.js.map → p-802c9204.js.map} +1 -1
- package/dist/components/{p-2baea6ba.js → p-ab87be7f.js} +2 -2
- package/dist/components/{p-2baea6ba.js.map → p-ab87be7f.js.map} +1 -1
- package/dist/components/{p-3859dc5c.js → p-b877a150.js} +2 -2
- package/dist/components/p-b877a150.js.map +1 -0
- package/dist/components/p-d20958c4.js +82 -0
- package/dist/components/p-d20958c4.js.map +1 -0
- package/dist/components/{p-11fcdad9.js → p-dd34b97d.js} +3 -3
- package/dist/components/p-dd34b97d.js.map +1 -0
- package/dist/docs.json +108 -6
- package/dist/esm/index.js +21 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/nv-badge_2.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-datagrid.entry.js +2 -2
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +16 -3
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +1 -1
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +1 -1
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +1 -1
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +1 -1
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +1 -1
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +1 -1
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-table.entry.js +2 -2
- package/dist/esm/nv-table.entry.js.map +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/p-09850aa9.entry.js +2 -0
- package/dist/native/p-09850aa9.entry.js.map +1 -0
- package/dist/native/p-1208abf2.entry.js +2 -0
- package/dist/native/p-1208abf2.entry.js.map +1 -0
- package/dist/native/p-130f6c47.entry.js +2 -0
- package/dist/native/{p-9fb5db20.entry.js.map → p-130f6c47.entry.js.map} +1 -1
- package/dist/native/p-180c45ff.entry.js +2 -0
- package/dist/native/p-180c45ff.entry.js.map +1 -0
- package/dist/native/p-1bb5a6bd.entry.js +2 -0
- package/dist/native/{p-c51ee6dc.entry.js.map → p-1bb5a6bd.entry.js.map} +1 -1
- package/dist/native/p-273d55e5.entry.js +2 -0
- package/dist/native/p-273d55e5.entry.js.map +1 -0
- package/dist/native/{p-6d68f133.entry.js → p-2f62f097.entry.js} +2 -2
- package/dist/native/p-2f62f097.entry.js.map +1 -0
- package/dist/native/p-54df2174.entry.js +2 -0
- package/dist/native/{p-fd2955dd.entry.js.map → p-54df2174.entry.js.map} +1 -1
- package/dist/native/{p-4d0caf4a.entry.js → p-8f4788b9.entry.js} +2 -2
- package/dist/native/{p-4d0caf4a.entry.js.map → p-8f4788b9.entry.js.map} +1 -1
- package/dist/native/{p-9ac790b3.entry.js → p-a06bafad.entry.js} +2 -2
- package/dist/native/{p-9ac790b3.entry.js.map → p-a06bafad.entry.js.map} +1 -1
- package/dist/native/p-bd6d9237.entry.js +7 -0
- package/dist/native/p-bd6d9237.entry.js.map +1 -0
- package/dist/native/p-c398cdb4.entry.js +2 -0
- package/dist/native/p-c398cdb4.entry.js.map +1 -0
- package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +3 -0
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +8 -0
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-table/nv-table.d.ts +3 -0
- package/dist/types/components.d.ts +24 -0
- package/dist/types/nova-docs.d.ts +1 -0
- package/dist/vscode-data.json +63 -0
- package/hydrate/index.js +35 -16
- package/hydrate/index.mjs +35 -16
- package/package.json +5 -1
- package/dist/components/p-11fcdad9.js.map +0 -1
- package/dist/components/p-3859dc5c.js.map +0 -1
- package/dist/components/p-a01bdf02.js +0 -82
- package/dist/components/p-a01bdf02.js.map +0 -1
- package/dist/native/p-208accf0.entry.js +0 -2
- package/dist/native/p-208accf0.entry.js.map +0 -1
- package/dist/native/p-3a8a9371.entry.js +0 -2
- package/dist/native/p-3a8a9371.entry.js.map +0 -1
- package/dist/native/p-6d68f133.entry.js.map +0 -1
- package/dist/native/p-724ed8d7.entry.js +0 -7
- package/dist/native/p-724ed8d7.entry.js.map +0 -1
- package/dist/native/p-75b1ea9f.entry.js +0 -2
- package/dist/native/p-75b1ea9f.entry.js.map +0 -1
- package/dist/native/p-9fb5db20.entry.js +0 -2
- package/dist/native/p-bfeda21c.entry.js +0 -2
- package/dist/native/p-bfeda21c.entry.js.map +0 -1
- package/dist/native/p-c51ee6dc.entry.js +0 -2
- package/dist/native/p-d4e56727.entry.js +0 -2
- package/dist/native/p-d4e56727.entry.js.map +0 -1
- package/dist/native/p-fd2955dd.entry.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as o,c as e,h as a,a as n,g as i}from"./p-5439afb8.js";import{c}from"./p-8a1a6e56.js";import{u as s,t}from"./p-42301d8f.js";import{u as d}from"./p-1daca48a.js";const
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as o,c as e,h as a,a as n,g as i}from"./p-5439afb8.js";import{c}from"./p-8a1a6e56.js";import{u as s,t}from"./p-42301d8f.js";import{u as d}from"./p-1daca48a.js";const r="nv-badge{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content}nv-badge.with-gap{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content;gap:var(--badge-gap-x)}nv-badge:not(.with-gap){padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content}nv-badge.badge-1{color:var(--color-rainbow-1-text);background-color:var(--color-rainbow-1-background)}nv-badge.badge-1 .close:focus,nv-badge.badge-1 .close:focus-within{outline:none}nv-badge.badge-1 .close:focus-visible,nv-badge.badge-1 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-1-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-1 nv-icon{color:var(--color-rainbow-1-icon)}nv-badge.badge-2{color:var(--color-rainbow-2-text);background-color:var(--color-rainbow-2-background)}nv-badge.badge-2 .close:focus,nv-badge.badge-2 .close:focus-within{outline:none}nv-badge.badge-2 .close:focus-visible,nv-badge.badge-2 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-2-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-2 nv-icon{color:var(--color-rainbow-2-icon)}nv-badge.badge-3{color:var(--color-rainbow-3-text);background-color:var(--color-rainbow-3-background)}nv-badge.badge-3 .close:focus,nv-badge.badge-3 .close:focus-within{outline:none}nv-badge.badge-3 .close:focus-visible,nv-badge.badge-3 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-3-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-3 nv-icon{color:var(--color-rainbow-3-icon)}nv-badge.badge-4{color:var(--color-rainbow-4-text);background-color:var(--color-rainbow-4-background)}nv-badge.badge-4 .close:focus,nv-badge.badge-4 .close:focus-within{outline:none}nv-badge.badge-4 .close:focus-visible,nv-badge.badge-4 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-4-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-4 nv-icon{color:var(--color-rainbow-4-icon)}nv-badge.badge-5{color:var(--color-rainbow-5-text);background-color:var(--color-rainbow-5-background)}nv-badge.badge-5 .close:focus,nv-badge.badge-5 .close:focus-within{outline:none}nv-badge.badge-5 .close:focus-visible,nv-badge.badge-5 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-5-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-5 nv-icon{color:var(--color-rainbow-5-icon)}nv-badge.badge-6{color:var(--color-rainbow-6-text);background-color:var(--color-rainbow-6-background)}nv-badge.badge-6 .close:focus,nv-badge.badge-6 .close:focus-within{outline:none}nv-badge.badge-6 .close:focus-visible,nv-badge.badge-6 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-6-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-6 nv-icon{color:var(--color-rainbow-6-icon)}nv-badge.badge-7{color:var(--color-rainbow-7-text);background-color:var(--color-rainbow-7-background)}nv-badge.badge-7 .close:focus,nv-badge.badge-7 .close:focus-within{outline:none}nv-badge.badge-7 .close:focus-visible,nv-badge.badge-7 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-7-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-7 nv-icon{color:var(--color-rainbow-7-icon)}nv-badge.badge-8{color:var(--color-rainbow-8-text);background-color:var(--color-rainbow-8-background)}nv-badge.badge-8 .close:focus,nv-badge.badge-8 .close:focus-within{outline:none}nv-badge.badge-8 .close:focus-visible,nv-badge.badge-8 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-8-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-8 nv-icon{color:var(--color-rainbow-8-icon)}nv-badge.badge-9{color:var(--color-rainbow-9-text);background-color:var(--color-rainbow-9-background)}nv-badge.badge-9 .close:focus,nv-badge.badge-9 .close:focus-within{outline:none}nv-badge.badge-9 .close:focus-visible,nv-badge.badge-9 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-9-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-9 nv-icon{color:var(--color-rainbow-9-icon)}nv-badge.badge-10{color:var(--color-rainbow-10-text);background-color:var(--color-rainbow-10-background)}nv-badge.badge-10 .close:focus,nv-badge.badge-10 .close:focus-within{outline:none}nv-badge.badge-10 .close:focus-visible,nv-badge.badge-10 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-10-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-10 nv-icon{color:var(--color-rainbow-10-icon)}nv-badge span{font-size:var(--font-size-xs);line-height:var(--line-height-xs) !important}nv-badge nv-icon>svg.icon-xs{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-sm{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-md{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-lg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-xl{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge .close{padding:0;line-height:0;border:none;background:none;cursor:pointer;color:inherit;display:inline-flex;align-items:center;aspect-ratio:1/1;border-radius:var(--radius-rounded-full)}";const l=r;const b=class{constructor(a){o(this,a);this.closeClicked=e(this,"closeClicked",7);this.hiddenChanged=e(this,"hiddenChanged",7);this.hiddenChangedComplete=e(this,"hiddenChangedComplete",7);this.dismissal=false;this.color="1";this.label=null;this.leadIcon=null;this.dismissible=false;this.hidden=false;this._isHidden=this.hidden;this.preventAutoClose=false;this.handleClose=o=>{if(!this.preventAutoClose){this.hidden=true}this.closeClicked.emit(o)}}handleDismissalChange(o){this.dismissible=o}handleIconChange(o){this.leadIcon=o}async handleHiddenChange(o){this.hiddenChanged.emit(o);if(this._isHidden===true)this._isHidden=o;const{fadeIn:e,fadeOut:a}=d(this.ref,{duration:150});const{collapse:n,expand:i}=s(this.ref,{duration:150});if(o===true)await t(a,n).start();if(o===false)await t(i,e).start();this.hiddenChangedComplete.emit(o);if(this._isHidden===false)this._isHidden=o}componentWillLoad(){if(this.dismissal){this.dismissible=this.dismissal}if(this.icon!=null&&this.icon!=""){this.leadIcon=this.icon}if(this.hidden){const{setCollapsed:o}=s(this.ref);const{setFadeOut:e}=d(this.ref);o();e()}}render(){return a(n,{key:"f0b9bf1d1a32c72f9d8176300d06875f0258f068",class:c(`badge-${this.color}`,{"has-close":this.dismissible,"with-gap":this.dismissible||this.label,"visually-hidden":this._isHidden})},a("slot",{key:"967f6cceadd13f1a7758696b0ddb9b77d256caac",name:"leading-icon"},this.leadIcon&&a("nv-icon",{key:"683ccf19e6281ab8fded9e217f61a67d835a7b37",slot:"leading-icon",name:this.leadIcon,size:"sm"})),this.label&&a("span",{key:"e01b6071da8bdc73d7708e91c67afe9bc2819095"},this.label),this.dismissible&&a("button",{key:"f8040e70acd910c63fa377837fc13316a321366c",onClick:this.handleClose,class:"close",type:"button"},a("nv-icon",{key:"405cee0cdcdab3a470086ccbd3aa5b46c5e0e2ea",name:"x",size:"sm"})))}get ref(){return i(this)}static get watchers(){return{dismissal:["handleDismissalChange"],icon:["handleIconChange"],hidden:["handleHiddenChange"]}}};b.style=l;const g="nv-fielddropdownitemcheck{display:flex;padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);border-radius:var(--list-dropdown-item-radius)}nv-fielddropdownitemcheck slot-fb,nv-fielddropdownitemcheck span{all:unset}nv-fielddropdownitemcheck:hover{background-color:var(--components-list-dropdown-item-background-hover)}";const v=g;const u=class{constructor(a){o(this,a);this.itemChecked=e(this,"itemChecked",7);this.checked=false;this.disabled=false;this.onFieldcheckboxChanged=o=>{if(this.disabled)return;this.checked=o.detail;this.itemChecked.emit({value:this.value,checked:this.checked,group:this.group})}}render(){return a(n,{key:"13160bb659ba6784bb179cfaab73760086ac4c86"},a("div",{key:"9b9d4138a1f6423aee8e68d4402024993e340e97"},a("nv-fieldcheckbox",{key:"a9721d01e8eddb29e989527d5410f377e69bc771",checked:this.checked,name:this.label||this.value,label:this.label||this.value,"label-placement":"after",description:this.description,disabled:this.disabled,tabindex:"-1",role:"option",onCheckedChanged:this.onFieldcheckboxChanged})))}get el(){return i(this)}};u.style=v;export{b as nv_badge,u as nv_fielddropdownitemcheck};
|
|
2
|
+
//# sourceMappingURL=p-a06bafad.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["nvBadgeCss","NvBadgeStyle0","NvBadge","constructor","hostRef","this","dismissal","color","label","leadIcon","dismissible","hidden","_isHidden","preventAutoClose","handleClose","originalEvent","closeClicked","emit","handleDismissalChange","handleIconChange","icon","handleHiddenChange","hiddenChanged","fadeIn","fadeOut","useFade","ref","duration","collapse","expand","useCollapse","timeline","start","hiddenChangedComplete","componentWillLoad","setCollapsed","setFadeOut","render","h","Host","key","class","clsx","name","slot","size","onClick","type","nvFielddropdownitemcheckCss","NvFielddropdownitemcheckStyle0","NvFielddropdownitemcheck","checked","disabled","onFieldcheckboxChanged","event","detail","itemChecked","value","group","description","tabindex","role","onCheckedChanged"],"sources":["src/components/nv-badge/nv-badge.scss?tag=nv-badge","src/components/nv-badge/nv-badge.tsx","src/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.scss?tag=nv-fielddropdownitemcheck","src/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.tsx"],"sourcesContent":["@use \"sass:map\";\n@use \"../nv-icon/styles/mixins\" as icon;\n@import \"../../styles/focus-ring\";\n\n/* Variants */\n$badge-colors: (\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\");\n\n/* Define maps for color-related variables */\n$color-rainbow-text: (\n \"1\": var(--color-rainbow-1-text),\n \"2\": var(--color-rainbow-2-text),\n \"3\": var(--color-rainbow-3-text),\n \"4\": var(--color-rainbow-4-text),\n \"5\": var(--color-rainbow-5-text),\n \"6\": var(--color-rainbow-6-text),\n \"7\": var(--color-rainbow-7-text),\n \"8\": var(--color-rainbow-8-text),\n \"9\": var(--color-rainbow-9-text),\n \"10\": var(--color-rainbow-10-text)\n);\n\n$color-rainbow-icon: (\n \"1\": var(--color-rainbow-1-icon),\n \"2\": var(--color-rainbow-2-icon),\n \"3\": var(--color-rainbow-3-icon),\n \"4\": var(--color-rainbow-4-icon),\n \"5\": var(--color-rainbow-5-icon),\n \"6\": var(--color-rainbow-6-icon),\n \"7\": var(--color-rainbow-7-icon),\n \"8\": var(--color-rainbow-8-icon),\n \"9\": var(--color-rainbow-9-icon),\n \"10\": var(--color-rainbow-10-icon)\n);\n\n$color-rainbow-background: (\n \"1\": var(--color-rainbow-1-background),\n \"2\": var(--color-rainbow-2-background),\n \"3\": var(--color-rainbow-3-background),\n \"4\": var(--color-rainbow-4-background),\n \"5\": var(--color-rainbow-5-background),\n \"6\": var(--color-rainbow-6-background),\n \"7\": var(--color-rainbow-7-background),\n \"8\": var(--color-rainbow-8-background),\n \"9\": var(--color-rainbow-9-background),\n \"10\": var(--color-rainbow-10-background)\n);\n\n@mixin root-styles() {\n padding: var(--badge-padding-y) var(--badge-padding-x);\n display: inline-flex !important; // override the display: none in [hidden] css\n vertical-align: middle;\n align-items: center;\n border-radius: var(--radius-rounded-full);\n height: fit-content;\n width: fit-content;\n}\n\n@mixin root-styles-with-gap() {\n @include root-styles();\n gap: var(--badge-gap-x);\n}\n\n@mixin badge-color($badge-number) {\n color: map.get($color-rainbow-text, $badge-number);\n background-color: map.get($color-rainbow-background, $badge-number);\n .close {\n @include focus-ring(var(--color-rainbow-#{$badge-number}-content), 0.2);\n }\n}\n\n@mixin icon-color($badge-number) {\n color: map.get($color-rainbow-icon, $badge-number);\n}\n\n@mixin type-settings($font-size, $line-height) {\n font-size: var(--font-size-xs);\n line-height: var(--line-height-xs) !important;\n}\n\nnv-badge {\n @include root-styles();\n\n //gap styles\n &.with-gap {\n @include root-styles-with-gap();\n }\n\n &:not(.with-gap) {\n @include root-styles();\n }\n\n // color styles\n @each $i in $badge-colors {\n &.badge-#{$i} {\n @include badge-color($i);\n nv-icon {\n @include icon-color($i);\n }\n }\n }\n\n //label styles\n & span {\n @include type-settings(xs, xs);\n }\n\n // nv-icon styles\n & nv-icon > svg {\n @each $size, $config in icon.$size-variants {\n &.icon-#{$size} {\n @include icon.icon-size-and-stroke(\n map.get(map.get(icon.$size-variants, \"xs\"), size),\n map.get(map.get(icon.$size-variants, \"xs\"), stroke)\n );\n }\n }\n }\n\n .close {\n padding: 0;\n line-height: 0;\n border: none;\n background: none;\n cursor: pointer;\n color: inherit;\n display: inline-flex;\n align-items: center;\n aspect-ratio: 1/1;\n border-radius: var(--radius-rounded-full);\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n Element,\n State,\n} from '@stencil/core';\nimport clsx from 'clsx';\nimport { useFade, useCollapse, timeline } from '../../animations';\n\n/**\n * @slot leading-icon - Icon before the label.\n */\n@Component({\n tag: 'nv-badge',\n styleUrl: 'nv-badge.scss',\n shadow: false,\n})\nexport class NvBadge {\n @Element() ref: HTMLNvBadgeElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Whether the badge is dismissible.\n * @deprecated use dismissible instead.\n */\n @Prop()\n readonly dismissal: boolean = false;\n\n /**\n * The icon to display in the badge.\n * @deprecated use leadIcon or slot=\"leading-icon\" instead.\n */\n @Prop()\n readonly icon: string;\n\n /**\n * The location of the icon in the badge.\n * @deprecated only leadIcon now.\n */\n @Prop({ reflect: true })\n readonly iconLocation: 'left' | 'right';\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * The color of the badge. Use a string between 1 to 10\n */\n @Prop({ reflect: true })\n readonly color?: string = '1';\n\n /**\n * Main content of the badge.\n */\n @Prop({ reflect: true })\n readonly label?: string | null = null;\n\n /**\n * The lead icon of the badge.\n */\n @Prop({ reflect: true, mutable: true })\n leadIcon?: string | null = null;\n\n /**\n * Whether the badge is dismissible.\n */\n @Prop({ reflect: true, mutable: true })\n dismissible: boolean = false;\n\n /**\n * Controls the visibility of the badge. Will animate with fade and collapse.\n */\n @Prop({ reflect: true, mutable: true })\n hidden: boolean = false; // eslint-disable-line @stencil-community/reserved-member-names\n @State()\n private _isHidden: boolean = this.hidden;\n\n /**\n * When true, the alert does not automatically close upon dismissing.\n * Useful for externally controlled component behavior.\n */\n @Prop({ reflect: true })\n readonly preventAutoClose: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the badge is dismissed.\n */\n @Event()\n closeClicked: EventEmitter<MouseEvent>;\n\n /**\n * Emits when the 'hidden' prop changes, reflecting a change in visibility.\n * Passes hidden value to the detail.\n */\n @Event()\n hiddenChanged: EventEmitter<boolean>;\n\n /**\n * Emitted when the animations complete, detail includes the hidden value.\n */\n @Event()\n hiddenChangedComplete: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Handles the dismissal prop change.\n * @param {boolean} dismissal - The new dismissal value.\n */\n @Watch('dismissal')\n handleDismissalChange(dismissal: boolean) {\n this.dismissible = dismissal;\n }\n\n /**\n * Handles the icon prop change.\n * @param {string} icon - The new icon value.\n */\n @Watch('icon')\n handleIconChange(icon: string) {\n this.leadIcon = icon;\n }\n\n /**\n * Handles the hidden prop change.\n * @param {boolean} hidden - The new hidden value.\n */\n @Watch('hidden')\n async handleHiddenChange(hidden: boolean) {\n this.hiddenChanged.emit(hidden);\n if (this._isHidden === true) this._isHidden = hidden;\n\n const { fadeIn, fadeOut } = useFade(this.ref, { duration: 150 });\n const { collapse, expand } = useCollapse(this.ref, { duration: 150 });\n\n if (hidden === true) await timeline(fadeOut, collapse).start();\n if (hidden === false) await timeline(expand, fadeIn).start();\n\n this.hiddenChangedComplete.emit(hidden);\n\n if (this._isHidden === false) this._isHidden = hidden;\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n /**\n * Component will load.\n */\n componentWillLoad() {\n if (this.dismissal) {\n this.dismissible = this.dismissal;\n }\n\n if (this.icon != null && this.icon != '') {\n this.leadIcon = this.icon;\n }\n\n if (this.hidden) {\n const { setCollapsed } = useCollapse(this.ref);\n const { setFadeOut } = useFade(this.ref);\n\n setCollapsed();\n setFadeOut();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the close button click.\n * @param {MouseEvent} originalEvent - The original event.\n */\n private readonly handleClose = (originalEvent?: MouseEvent) => {\n if (!this.preventAutoClose) {\n this.hidden = true;\n }\n\n this.closeClicked.emit(originalEvent);\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n class={clsx(`badge-${this.color}`, {\n 'has-close': this.dismissible,\n 'with-gap': this.dismissible || this.label,\n 'visually-hidden': this._isHidden,\n })}\n >\n <slot name=\"leading-icon\">\n {this.leadIcon && (\n <nv-icon\n slot=\"leading-icon\"\n name={this.leadIcon}\n size=\"sm\"\n ></nv-icon>\n )}\n </slot>\n {this.label && <span>{this.label}</span>}\n {this.dismissible && (\n <button onClick={this.handleClose} class=\"close\" type=\"button\">\n <nv-icon name=\"x\" size=\"sm\" />\n </button>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n","nv-fielddropdownitemcheck {\n slot-fb,\n span {\n all: unset;\n }\n\n nv-fieldcheckbox input[type='checkbox'] {\n all: unset;\n display: inline-block;\n margin: 0;\n padding: 0;\n width: 20px;\n height: 20px;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\n\n@Component({\n tag: 'nv-fielddropdownitemcheck',\n styleUrl: 'nv-fielddropdownitemcheck.scss',\n shadow: false,\n})\nexport class NvFielddropdownitemcheck {\n @Element() el: HTMLNvFielddropdownitemcheckElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Indicates whether the checkbox is selected.\n */\n @Prop({ reflect: true, mutable: true })\n checked: boolean = false;\n\n /**\n * The value associated with this item.\n */\n @Prop({ reflect: true })\n readonly value?: string;\n\n /**\n * The label displayed alongside the checkbox.\n */\n @Prop({ reflect: true })\n readonly label?: string;\n\n /**\n * A description providing additional context or information about the\n * checkbox.\n */\n @Prop({ reflect: true })\n readonly description?: string;\n\n /**\n * The group this item belongs to, if applicable.\n */\n @Prop({ reflect: true })\n readonly group?: string;\n\n /**\n * Disables the item, preventing any user interaction.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Event emitted when the checkbox is toggled.\n * It provides details about the current state of the item.\n */\n @Event()\n itemChecked: EventEmitter<{\n /**\n * The value associated with this item\n */\n value: string | undefined;\n /**\n * Whether the checkbox is currently checked\n */\n checked: boolean;\n /**\n * The group this item belongs to, if any\n */\n group?: string | undefined;\n }>;\n\n /**\n * when the child <nv-fieldcheckbox> change its `checked` state,\n * update `this.checked` and emit `itemChecked`.\n * @param {CustomEvent<boolean>} event - The event emitted by the <nv-fieldcheckbox> component.\n */\n private onFieldcheckboxChanged = (event: CustomEvent<boolean>) => {\n if (this.disabled) return;\n // NvFieldcheckbox has emitted checkedChanged\n this.checked = event.detail; // get the new state\n this.itemChecked.emit({\n value: this.value,\n checked: this.checked,\n group: this.group,\n });\n };\n\n render() {\n return (\n <Host>\n <div>\n <nv-fieldcheckbox\n checked={this.checked}\n name={this.label || this.value}\n label={this.label || this.value}\n label-placement=\"after\"\n description={this.description}\n disabled={this.disabled}\n tabindex=\"-1\"\n role=\"option\"\n onCheckedChanged={this.onFieldcheckboxChanged}\n ></nv-fieldcheckbox>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yKAAA,MAAMA,EAAa,m7LACnB,MAAAC,EAAeD,E,MCqBFE,EAAO,MALpB,WAAAC,CAAAC,G,+JAgBWC,KAAAC,UAAqB,MAwBrBD,KAAAE,MAAiB,IAMjBF,KAAAG,MAAwB,KAMjCH,KAAAI,SAA2B,KAM3BJ,KAAAK,YAAuB,MAMvBL,KAAAM,OAAkB,MAEVN,KAAAO,UAAqBP,K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AAA,WAAAE,IAAA,2CACEI,KAAK,eACLD,KAAMtC,KAAKI,SACXoC,KAAK,QAIVxC,KAAKG,OAAS8B,EAAA,QAAAE,IAAA,4CAAOnC,KAAKG,OAC1BH,KAAKK,aACJ4B,EAAA,UAAAE,IAAA,2CAAQM,QAASzC,KAAKS,YAAa2B,MAAM,QAAQM,KAAK,UACpDT,EAAA,WAAAE,IAAA,2CAASG,KAAK,IAAIE,KAAK,Q,gKC/NnC,MAAMG,EAA8B,uNACpC,MAAAC,EAAeD,E,MCcFE,EAAwB,MALrC,WAAA/C,CAAAC,G,mDAeEC,KAAA8C,QAAmB,MA+BV9C,KAAA+C,SAAoB,MA+BrB/C,KAAAgD,uBAA0BC,IAChC,GAAIjD,KAAK+C,SAAU,OAEnB/C,KAAK8C,QAAUG,EAAMC,OACrBlD,KAAKmD,YAAYvC,KAAK,CACpBwC,MAAOpD,KAAKoD,MACZN,QAAS9C,KAAK8C,QACdO,MAAOrD,KAAKqD,OACZ,C,CAGJ,MAAArB,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,OAAAE,IAAA,4CACEF,EAAA,oBAAAE,IAAA,2CACEW,QAAS9C,KAAK8C,QACdR,KAAMtC,KAAKG,OAASH,KAAKoD,MACzBjD,MAAOH,KAAKG,OAASH,KAAKoD,MAAK,kBACf,QAChBE,YAAatD,KAAKsD,YAClBP,SAAU/C,KAAK+C,SACfQ,SAAS,KACTC,KAAK,SACLC,iBAAkBzD,KAAKgD,0B","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["nvBadgeCss","NvBadgeStyle0","NvBadge","constructor","hostRef","this","dismissal","color","label","leadIcon","dismissible","hidden","_isHidden","preventAutoClose","handleClose","originalEvent","closeClicked","emit","handleDismissalChange","handleIconChange","icon","handleHiddenChange","hiddenChanged","fadeIn","fadeOut","useFade","ref","duration","collapse","expand","useCollapse","timeline","start","hiddenChangedComplete","componentWillLoad","setCollapsed","setFadeOut","render","h","Host","key","class","clsx","name","slot","size","onClick","type","nvFielddropdownitemcheckCss","NvFielddropdownitemcheckStyle0","NvFielddropdownitemcheck","checked","disabled","onFieldcheckboxChanged","event","detail","itemChecked","value","group","description","tabindex","role","onCheckedChanged"],"sources":["src/components/nv-badge/nv-badge.scss?tag=nv-badge","src/components/nv-badge/nv-badge.tsx","src/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.scss?tag=nv-fielddropdownitemcheck","src/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.tsx"],"sourcesContent":["@use \"sass:map\";\n@use \"../nv-icon/styles/mixins\" as icon;\n@import \"../../styles/focus-ring\";\n\n/* Variants */\n$badge-colors: (\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\");\n\n/* Define maps for color-related variables */\n$color-rainbow-text: (\n \"1\": var(--color-rainbow-1-text),\n \"2\": var(--color-rainbow-2-text),\n \"3\": var(--color-rainbow-3-text),\n \"4\": var(--color-rainbow-4-text),\n \"5\": var(--color-rainbow-5-text),\n \"6\": var(--color-rainbow-6-text),\n \"7\": var(--color-rainbow-7-text),\n \"8\": var(--color-rainbow-8-text),\n \"9\": var(--color-rainbow-9-text),\n \"10\": var(--color-rainbow-10-text)\n);\n\n$color-rainbow-icon: (\n \"1\": var(--color-rainbow-1-icon),\n \"2\": var(--color-rainbow-2-icon),\n \"3\": var(--color-rainbow-3-icon),\n \"4\": var(--color-rainbow-4-icon),\n \"5\": var(--color-rainbow-5-icon),\n \"6\": var(--color-rainbow-6-icon),\n \"7\": var(--color-rainbow-7-icon),\n \"8\": var(--color-rainbow-8-icon),\n \"9\": var(--color-rainbow-9-icon),\n \"10\": var(--color-rainbow-10-icon)\n);\n\n$color-rainbow-background: (\n \"1\": var(--color-rainbow-1-background),\n \"2\": var(--color-rainbow-2-background),\n \"3\": var(--color-rainbow-3-background),\n \"4\": var(--color-rainbow-4-background),\n \"5\": var(--color-rainbow-5-background),\n \"6\": var(--color-rainbow-6-background),\n \"7\": var(--color-rainbow-7-background),\n \"8\": var(--color-rainbow-8-background),\n \"9\": var(--color-rainbow-9-background),\n \"10\": var(--color-rainbow-10-background)\n);\n\n@mixin root-styles() {\n padding: var(--badge-padding-y) var(--badge-padding-x);\n display: inline-flex !important; // override the display: none in [hidden] css\n vertical-align: middle;\n align-items: center;\n border-radius: var(--radius-rounded-full);\n height: fit-content;\n width: fit-content;\n}\n\n@mixin root-styles-with-gap() {\n @include root-styles();\n gap: var(--badge-gap-x);\n}\n\n@mixin badge-color($badge-number) {\n color: map.get($color-rainbow-text, $badge-number);\n background-color: map.get($color-rainbow-background, $badge-number);\n .close {\n @include focus-ring(var(--color-rainbow-#{$badge-number}-content), 0.2);\n }\n}\n\n@mixin icon-color($badge-number) {\n color: map.get($color-rainbow-icon, $badge-number);\n}\n\n@mixin type-settings($font-size, $line-height) {\n font-size: var(--font-size-xs);\n line-height: var(--line-height-xs) !important;\n}\n\nnv-badge {\n @include root-styles();\n\n //gap styles\n &.with-gap {\n @include root-styles-with-gap();\n }\n\n &:not(.with-gap) {\n @include root-styles();\n }\n\n // color styles\n @each $i in $badge-colors {\n &.badge-#{$i} {\n @include badge-color($i);\n nv-icon {\n @include icon-color($i);\n }\n }\n }\n\n //label styles\n & span {\n @include type-settings(xs, xs);\n }\n\n // nv-icon styles\n & nv-icon > svg {\n @each $size, $config in icon.$size-variants {\n &.icon-#{$size} {\n @include icon.icon-size-and-stroke(\n map.get(map.get(icon.$size-variants, \"xs\"), size),\n map.get(map.get(icon.$size-variants, \"xs\"), stroke)\n );\n }\n }\n }\n\n .close {\n padding: 0;\n line-height: 0;\n border: none;\n background: none;\n cursor: pointer;\n color: inherit;\n display: inline-flex;\n align-items: center;\n aspect-ratio: 1/1;\n border-radius: var(--radius-rounded-full);\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n Element,\n State,\n} from '@stencil/core';\nimport clsx from 'clsx';\nimport { useFade, useCollapse, timeline } from '../../animations';\n\n/**\n * @slot leading-icon - Icon before the label.\n */\n@Component({\n tag: 'nv-badge',\n styleUrl: 'nv-badge.scss',\n shadow: false,\n})\nexport class NvBadge {\n @Element() ref: HTMLNvBadgeElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Whether the badge is dismissible.\n * @deprecated use dismissible instead.\n */\n @Prop()\n readonly dismissal: boolean = false;\n\n /**\n * The icon to display in the badge.\n * @deprecated use leadIcon or slot=\"leading-icon\" instead.\n */\n @Prop()\n readonly icon: string;\n\n /**\n * The location of the icon in the badge.\n * @deprecated only leadIcon now.\n */\n @Prop({ reflect: true })\n readonly iconLocation: 'left' | 'right';\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * The color of the badge. Use a string between 1 to 10\n */\n @Prop({ reflect: true })\n readonly color?: string = '1';\n\n /**\n * Main content of the badge.\n */\n @Prop({ reflect: true })\n readonly label?: string | null = null;\n\n /**\n * The lead icon of the badge.\n */\n @Prop({ reflect: true, mutable: true })\n leadIcon?: string | null = null;\n\n /**\n * Whether the badge is dismissible.\n */\n @Prop({ reflect: true, mutable: true })\n dismissible: boolean = false;\n\n /**\n * Controls the visibility of the badge. Will animate with fade and collapse.\n */\n @Prop({ reflect: true, mutable: true })\n hidden: boolean = false; // eslint-disable-line @stencil-community/reserved-member-names\n @State()\n private _isHidden: boolean = this.hidden;\n\n /**\n * When true, the alert does not automatically close upon dismissing.\n * Useful for externally controlled component behavior.\n */\n @Prop({ reflect: true })\n readonly preventAutoClose: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the badge is dismissed.\n */\n @Event()\n closeClicked: EventEmitter<MouseEvent>;\n\n /**\n * Emits when the 'hidden' prop changes, reflecting a change in visibility.\n * Passes hidden value to the detail.\n */\n @Event()\n hiddenChanged: EventEmitter<boolean>;\n\n /**\n * Emitted when the animations complete, detail includes the hidden value.\n */\n @Event()\n hiddenChangedComplete: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Handles the dismissal prop change.\n * @param {boolean} dismissal - The new dismissal value.\n */\n @Watch('dismissal')\n handleDismissalChange(dismissal: boolean) {\n this.dismissible = dismissal;\n }\n\n /**\n * Handles the icon prop change.\n * @param {string} icon - The new icon value.\n */\n @Watch('icon')\n handleIconChange(icon: string) {\n this.leadIcon = icon;\n }\n\n /**\n * Handles the hidden prop change.\n * @param {boolean} hidden - The new hidden value.\n */\n @Watch('hidden')\n async handleHiddenChange(hidden: boolean) {\n this.hiddenChanged.emit(hidden);\n if (this._isHidden === true) this._isHidden = hidden;\n\n const { fadeIn, fadeOut } = useFade(this.ref, { duration: 150 });\n const { collapse, expand } = useCollapse(this.ref, { duration: 150 });\n\n if (hidden === true) await timeline(fadeOut, collapse).start();\n if (hidden === false) await timeline(expand, fadeIn).start();\n\n this.hiddenChangedComplete.emit(hidden);\n\n if (this._isHidden === false) this._isHidden = hidden;\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n /**\n * Component will load.\n */\n componentWillLoad() {\n if (this.dismissal) {\n this.dismissible = this.dismissal;\n }\n\n if (this.icon != null && this.icon != '') {\n this.leadIcon = this.icon;\n }\n\n if (this.hidden) {\n const { setCollapsed } = useCollapse(this.ref);\n const { setFadeOut } = useFade(this.ref);\n\n setCollapsed();\n setFadeOut();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the close button click.\n * @param {MouseEvent} originalEvent - The original event.\n */\n private readonly handleClose = (originalEvent?: MouseEvent) => {\n if (!this.preventAutoClose) {\n this.hidden = true;\n }\n\n this.closeClicked.emit(originalEvent);\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n class={clsx(`badge-${this.color}`, {\n 'has-close': this.dismissible,\n 'with-gap': this.dismissible || this.label,\n 'visually-hidden': this._isHidden,\n })}\n >\n <slot name=\"leading-icon\">\n {this.leadIcon && (\n <nv-icon\n slot=\"leading-icon\"\n name={this.leadIcon}\n size=\"sm\"\n ></nv-icon>\n )}\n </slot>\n {this.label && <span>{this.label}</span>}\n {this.dismissible && (\n <button onClick={this.handleClose} class=\"close\" type=\"button\">\n <nv-icon name=\"x\" size=\"sm\" />\n </button>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n","nv-fielddropdownitemcheck {\n slot-fb,\n span {\n all: unset;\n }\n\n display: flex;\n padding: var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);\n border-radius: var(--list-dropdown-item-radius);\n\n &:hover {\n background-color: var(--components-list-dropdown-item-background-hover);\n }\n}","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\n\n@Component({\n tag: 'nv-fielddropdownitemcheck',\n styleUrl: 'nv-fielddropdownitemcheck.scss',\n shadow: false,\n})\nexport class NvFielddropdownitemcheck {\n @Element() el: HTMLNvFielddropdownitemcheckElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Indicates whether the checkbox is selected.\n */\n @Prop({ reflect: true, mutable: true })\n checked: boolean = false;\n\n /**\n * The value associated with this item.\n */\n @Prop({ reflect: true })\n readonly value?: string;\n\n /**\n * The label displayed alongside the checkbox.\n */\n @Prop({ reflect: true })\n readonly label?: string;\n\n /**\n * A description providing additional context or information about the\n * checkbox.\n */\n @Prop({ reflect: true })\n readonly description?: string;\n\n /**\n * The group this item belongs to, if applicable.\n */\n @Prop({ reflect: true })\n readonly group?: string;\n\n /**\n * Disables the item, preventing any user interaction.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Event emitted when the checkbox is toggled.\n * It provides details about the current state of the item.\n */\n @Event()\n itemChecked: EventEmitter<{\n /**\n * The value associated with this item\n */\n value: string | undefined;\n /**\n * Whether the checkbox is currently checked\n */\n checked: boolean;\n /**\n * The group this item belongs to, if any\n */\n group?: string | undefined;\n }>;\n\n /**\n * when the child <nv-fieldcheckbox> change its `checked` state,\n * update `this.checked` and emit `itemChecked`.\n * @param {CustomEvent<boolean>} event - The event emitted by the <nv-fieldcheckbox> component.\n */\n private onFieldcheckboxChanged = (event: CustomEvent<boolean>) => {\n if (this.disabled) return;\n // NvFieldcheckbox has emitted checkedChanged\n this.checked = event.detail; // get the new state\n this.itemChecked.emit({\n value: this.value,\n checked: this.checked,\n group: this.group,\n });\n };\n\n render() {\n return (\n <Host>\n <div>\n <nv-fieldcheckbox\n checked={this.checked}\n name={this.label || this.value}\n label={this.label || this.value}\n label-placement=\"after\"\n description={this.description}\n disabled={this.disabled}\n tabindex=\"-1\"\n role=\"option\"\n onCheckedChanged={this.onFieldcheckboxChanged}\n ></nv-fieldcheckbox>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yKAAA,MAAMA,EAAa,m7LACnB,MAAAC,EAAeD,E,MCqBFE,EAAO,MALpB,WAAAC,CAAAC,G,+JAgBWC,KAAAC,UAAqB,MAwBrBD,KAAAE,MAAiB,IAMjBF,KAAAG,MAAwB,KAMjCH,KAAAI,SAA2B,KAM3BJ,KAAAK,YAAuB,MAMvBL,KAAAM,OAAkB,MAEVN,KAAAO,UAAqBP,KAAKM,OAOzBN,KAAAQ,iBAA4B,MAoGpBR,KAAAS,YAAeC,IAC9B,IAAKV,KAAKQ,iBAAkB,CAC1BR,KAAKM,OAAS,I,CAGhBN,KAAKW,aAAaC,KAAKF,EAAc,C,CAvEvC,qBAAAG,CAAsBZ,GACpBD,KAAKK,YAAcJ,C,CAQrB,gBAAAa,CAAiBC,GACff,KAAKI,SAAWW,C,CAQlB,wBAAMC,CAAmBV,GACvBN,KAAKiB,cAAcL,KAAKN,GACxB,GAAIN,KAAKO,YAAc,KAAMP,KAAKO,UAAYD,EAE9C,MAAMY,OAAEA,EAAMC,QAAEA,GAAYC,EAAQpB,KAAKqB,IAAK,CAAEC,SA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AAAgD,uBAA0BC,IAChC,GAAIjD,KAAK+C,SAAU,OAEnB/C,KAAK8C,QAAUG,EAAMC,OACrBlD,KAAKmD,YAAYvC,KAAK,CACpBwC,MAAOpD,KAAKoD,MACZN,QAAS9C,KAAK8C,QACdO,MAAOrD,KAAKqD,OACZ,C,CAGJ,MAAArB,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,OAAAE,IAAA,4CACEF,EAAA,oBAAAE,IAAA,2CACEW,QAAS9C,KAAK8C,QACdR,KAAMtC,KAAKG,OAASH,KAAKoD,MACzBjD,MAAOH,KAAKG,OAASH,KAAKoD,MAAK,kBACf,QAChBE,YAAatD,KAAKsD,YAClBP,SAAU/C,KAAK+C,SACfQ,SAAS,KACTC,KAAK,SACLC,iBAAkBzD,KAAKgD,0B","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,a as r,g as n}from"./p-5439afb8.js";import{a,r as o}from"./p-d429a343.js";import{c as s}from"./p-8a1a6e56.js";
|
|
2
|
+
/*!
|
|
3
|
+
* tabbable 6.2.0
|
|
4
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
5
|
+
*/
|
|
6
|
+
var l=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"];var d=l.join(",");var f=typeof Element==="undefined";var u=f?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;var c=!f&&Element.prototype.getRootNode?function(t){var e;return t===null||t===void 0?void 0:(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t===null||t===void 0?void 0:t.ownerDocument};var v=function t(e,i){var r;if(i===void 0){i=true}var n=e===null||e===void 0?void 0:(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert");var a=n===""||n==="true";var o=a||i&&e&&t(e.parentNode);return o};var h=function t(e){var i;var r=e===null||e===void 0?void 0:(i=e.getAttribute)===null||i===void 0?void 0:i.call(e,"contenteditable");return r===""||r==="true"};var b=function t(e,i,r){if(v(e)){return[]}var n=Array.prototype.slice.apply(e.querySelectorAll(d));if(i&&u.call(e,d)){n.unshift(e)}n=n.filter(r);return n};var p=function t(e,i,r){var n=[];var a=Array.from(e);while(a.length){var o=a.shift();if(v(o,false)){continue}if(o.tagName==="SLOT"){var s=o.assignedElements();var l=s.length?s:o.children;var f=t(l,true,r);if(r.flatten){n.push.apply(n,f)}else{n.push({scopeParent:o,candidates:f})}}else{var c=u.call(o,d);if(c&&r.filter(o)&&(i||!e.includes(o))){n.push(o)}var h=o.shadowRoot||typeof r.getShadowRoot==="function"&&r.getShadowRoot(o);var b=!v(h,false)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(h&&b){var p=t(h===true?o.children:h.children,true,r);if(r.flatten){n.push.apply(n,p)}else{n.push({scopeParent:o,candidates:p})}}else{a.unshift.apply(a,o.children)}}}return n};var g=function t(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))};var y=function t(e){if(!e){throw new Error("No node provided")}if(e.tabIndex<0){if((/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||h(e))&&!g(e)){return 0}}return e.tabIndex};var m=function t(e,i){var r=y(e);if(r<0&&i&&!g(e)){return 0}return r};var w=function t(e,i){return e.tabIndex===i.tabIndex?e.documentOrder-i.documentOrder:e.tabIndex-i.tabIndex};var x=function t(e){return e.tagName==="INPUT"};var k=function t(e){return x(e)&&e.type==="hidden"};var E=function t(e){var i=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some((function(t){return t.tagName==="SUMMARY"}));return i};var S=function t(e,i){for(var r=0;r<e.length;r++){if(e[r].checked&&e[r].form===i){return e[r]}}};var T=function t(e){if(!e.name){return true}var i=e.form||c(e);var r=function t(e){return i.querySelectorAll('input[type="radio"][name="'+e+'"]')};var n;if(typeof window!=="undefined"&&typeof window.CSS!=="undefined"&&typeof window.CSS.escape==="function"){n=r(window.CSS.escape(e.name))}else{try{n=r(e.name)}catch(t){console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message);return false}}var a=S(n,e.form);return!a||a===e};var A=function t(e){return x(e)&&e.type==="radio"};var C=function t(e){return A(e)&&!T(e)};var D=function t(e){var i;var r=e&&c(e);var n=(i=r)===null||i===void 0?void 0:i.host;var a=false;if(r&&r!==e){var o,s,l;a=!!((o=n)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(n)||e!==null&&e!==void 0&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));while(!a&&n){var d,f,u;r=c(n);n=(d=r)===null||d===void 0?void 0:d.host;a=!!((f=n)!==null&&f!==void 0&&(u=f.ownerDocument)!==null&&u!==void 0&&u.contains(n))}}return a};var N=function t(e){var i=e.getBoundingClientRect(),r=i.width,n=i.height;return r===0&&n===0};var I=function t(e,i){var r=i.displayCheck,n=i.getShadowRoot;if(getComputedStyle(e).visibility==="hidden"){return true}var a=u.call(e,"details>summary:first-of-type");var o=a?e.parentElement:e;if(u.call(o,"details:not([open]) *")){return true}if(!r||r==="full"||r==="legacy-full"){if(typeof n==="function"){var s=e;while(e){var l=e.parentElement;var d=c(e);if(l&&!l.shadowRoot&&n(l)===true){return N(e)}else if(e.assignedSlot){e=e.assignedSlot}else if(!l&&d!==e.ownerDocument){e=d.host}else{e=l}}e=s}if(D(e)){return!e.getClientRects().length}if(r!=="legacy-full"){return true}}else if(r==="non-zero-area"){return N(e)}return false};var L=function t(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName)){var i=e.parentElement;while(i){if(i.tagName==="FIELDSET"&&i.disabled){for(var r=0;r<i.children.length;r++){var n=i.children.item(r);if(n.tagName==="LEGEND"){return u.call(i,"fieldset[disabled] *")?true:!n.contains(e)}}return true}i=i.parentElement}}return false};var O=function t(e,i){if(i.disabled||v(i)||k(i)||I(i,e)||E(i)||L(i)){return false}return true};var U=function t(e,i){if(C(i)||y(i)<0||!O(e,i)){return false}return true};var z=function t(e){var i=parseInt(e.getAttribute("tabindex"),10);if(isNaN(i)||i>=0){return true}return false};var P=function t(e){var i=[];var r=[];e.forEach((function(e,n){var a=!!e.scopeParent;var o=a?e.scopeParent:e;var s=m(o,a);var l=a?t(e.candidates):o;if(s===0){a?i.push.apply(i,l):i.push(o)}else{r.push({documentOrder:n,tabIndex:s,item:e,isScope:a,content:l})}}));return r.sort(w).reduce((function(t,e){e.isScope?t.push.apply(t,e.content):t.push(e.content);return t}),[]).concat(i)};var j=function t(e,i){i=i||{};var r;if(i.getShadowRoot){r=p([e],i.includeContainer,{filter:U.bind(null,i),flatten:false,getShadowRoot:i.getShadowRoot,shadowRootFilter:z})}else{r=b(e,i.includeContainer,U.bind(null,i))}return P(r)};const R='dialog{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:400px;width:fit-content;max-width:960px;box-shadow:0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3)}dialog.full{width:90vw}dialog::backdrop{opacity:var(--components-overlay-opacity);background:var(--components-overlay-background)}dialog .content{display:flex;flex-direction:column;align-items:flex-start}dialog .content nv-button.close-button{position:absolute;top:var(--dialog-dismissible-position-top);right:var(--dialog-dismissible-position-right);display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:10px}dialog .content .content-body{padding:var(--dialog-body-padding-y) var(--dialog-body-padding-x);align-items:flex-start;gap:8px;color:var(--color-content-medium-text);font-family:"TT Norms Pro", sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:400;line-height:var(--line-height-base);}';const F=R;const M=class{constructor(i){t(this,i);this.close=e(this,"close",7);this.eventsAttached=false;this.open=false;this.undismissable=false;this.clickOutside=false;this.manualFocus=false;this.controlled=false;this.full=false;this.handleCloseButton=()=>{this.hide()};this.handleCancelButton=()=>{this.hide()};this.handleDialogClose=()=>{this.close.emit()};this.handleClickOutside=t=>{if(t.target===this.dialogElement){this.hide();t.preventDefault();t.stopPropagation()}};this.triggerClickEvents=[["click",this.show],["touchstart",this.show],["keydown",t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();this.show()}}]]}async show(){this.preventScroll();this.dialogElement.showModal();this.open=true}async hide(){this.allowScroll();this.dialogElement.close();this.open=false}setAutofocus(){const t=j(this.dialogElement,{displayCheck:"none"});if(t.length>0){let e=t[0];let i=e.getBoundingClientRect();t.forEach((t=>{const r=t.getBoundingClientRect();if(r.top<i.top||r.left<i.left){e=t;i=r}}));e.setAttribute("autofocus","true")}}attachEventListeners(){if(this.triggerElement&&!this.eventsAttached&&!this.controlled){a(this.triggerClickEvents,this.triggerElement,this);this.eventsAttached=true}}preventScroll(){document.body.style.overflow="hidden"}allowScroll(){document.body.style.overflow=""}handleKeyDown(t){if(t.key==="Escape"&&this.undismissable){t.preventDefault();t.stopPropagation()}}handleDocumentClick(t){if(!this.clickOutside||this.undismissable)return;this.handleClickOutside(t)}handleDocumentTouch(t){if(!this.clickOutside||this.undismissable)return;this.handleClickOutside(t)}async handleDialogOpenChange(t){if(t){this.show()}else{this.hide()}}componentWillLoad(){this.triggerElement=Array.from(this.el.children).find((t=>t.getAttribute("slot")==="trigger"));this.headerElement=Array.from(this.el.children).find((t=>t.getAttribute("slot")==="header"||t.tagName.toLowerCase()==="nv-dialogheader"));this.footerElement=Array.from(this.el.children).find((t=>t.getAttribute("slot")==="footer"||t.tagName.toLowerCase()==="nv-dialogfooter"))}componentWillUpdate(){this.attachEventListeners()}componentDidLoad(){if(this.open){this.show()}if(!this.manualFocus){this.setAutofocus()}this.attachEventListeners()}disconnectedCallback(){o(this.triggerClickEvents,this.triggerElement,this);this.allowScroll()}render(){return i(r,{key:"8ebbae209535d0f67bbb4bcd66d65847b7d6c88d"},i("slot",{key:"6ceafd436a535b0e3025af6c765387e805f9318b",name:"trigger"}),i("dialog",{key:"4812712f88e213fe05c1b02aa30a156bd4f35af6",ref:t=>this.dialogElement=t,onClose:this.handleDialogClose,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-header","aria-describedby":"dialog-content",class:s({full:this.full})},i("div",{key:"7a0ab59bb51f94460f8e2aa556e1c5180a9dfc57",class:"content"},!this.undismissable&&i("nv-button",{key:"720933cd447620330a3e1efb1e062d113615dbdb",class:"close-button",emphasis:"lower",size:"sm",onClick:this.handleCloseButton,"aria-label":"Close dialog"},i("nv-icon",{key:"4185d97dc5d1d0f56a9e51934cf8831ef3e80ffd",name:"x",size:"sm"})),this.headerElement?i("slot",{name:"header"}):i("nv-dialogheader",{id:"dialog-header"}),i("div",{key:"6b5d8e40fcb1d6c983b0b1e6d6db1519b4b99c4d",class:"content-body",id:"dialog-content"},i("slot",{key:"1d8a1cacee29dd6df5b79336ccf5e9a53b46bc14"})),this.footerElement?i("slot",{name:"footer"}):i("nv-dialogfooter",{onNvDialogCanceled:this.handleCancelButton,undismissable:this.undismissable}))))}get el(){return n(this)}static get watchers(){return{open:["handleDialogOpenChange"]}}};M.style=F;export{M as nv_dialog};
|
|
7
|
+
//# sourceMappingURL=p-bd6d9237.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["candidateSelectors","candidateSelector","join","NoElement","Element","matches","prototype","msMatchesSelector","webkitMatchesSelector","getRootNode","element","_element$getRootNode","call","ownerDocument","isInert","node","lookUp","_node$getAttribute","inertAtt","getAttribute","inert","result","parentNode","isContentEditable","_node$getAttribute2","attValue","getCandidates","el","includeContainer","filter","candidates","Array","slice","apply","querySelectorAll","unshift","getCandidatesIteratively","elements","options","elementsToCheck","from","length","shift","tagName","assigned","assignedElements","content","children","nestedCandidates","flatten","push","scopeParent","validCandidate","includes","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","isNaN","parseInt","getTabIndex","Error","tabIndex","test","getSortOrderTabIndex","isScope","sortOrderedTabbables","a","b","documentOrder","isInput","isHiddenInput","type","isDetailsWithSummary","r","some","child","getCheckedRadio","nodes","form","i","checked","isTabbableRadio","name","radioScope","queryRadios","radioSet","window","CSS","escape","err","console","error","message","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","host","attached","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","contains","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","getBoundingClientRect","width","height","isHidden","_ref","displayCheck","getComputedStyle","visibility","isDirectSummary","nodeUnderDetails","parentElement","originalNode","rootNode","assignedSlot","getClientRects","isDisabledFromFieldset","disabled","item","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","forEach","candidateTabindex","sort","reduce","acc","sortable","concat","tabbable","container","bind","nvDialogCss","NvDialogStyle0","NvDialog","constructor","hostRef","this","eventsAttached","open","undismissable","clickOutside","manualFocus","controlled","full","handleCloseButton","hide","handleCancelButton","handleDialogClose","close","emit","handleClickOutside","event","target","dialogElement","preventDefault","stopPropagation","triggerClickEvents","show","e","key","preventScroll","showModal","allowScroll","setAutofocus","focusableElements","topLeftElement","topLeftRect","rect","top","left","setAttribute","attachEventListeners","triggerElement","addEventListeners","document","body","style","overflow","handleKeyDown","handleDocumentClick","handleDocumentTouch","handleDialogOpenChange","componentWillLoad","find","headerElement","toLowerCase","footerElement","componentWillUpdate","componentDidLoad","disconnectedCallback","removeEventListeners","render","h","Host","ref","onClose","role","class","clsx","emphasis","size","onClick","id","onNvDialogCanceled"],"sources":["../../node_modules/tabbable/dist/index.esm.js","src/components/nv-dialog/nv-dialog.scss?tag=nv-dialog","src/components/nv-dialog/nv-dialog.tsx"],"sourcesContent":["/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","dialog {\n border-radius: var(--radius-rounded-2xl);\n background: var(--color-level-00-background);\n min-width: 400px;\n width: fit-content;\n max-width: 960px;\n\n &.full {\n width: 90vw;\n }\n\n /* shadow/2xl */\n box-shadow: 0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl)\n var(--shadow-spread-2xl) var(--shadow-color-opacity-3)\n var(--shadow-color-opacity-3);\n\n &::backdrop {\n opacity: var(--components-overlay-opacity);\n background: var(--components-overlay-background);\n }\n\n .content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n nv-button.close-button {\n position: absolute;\n top: var(--dialog-dismissible-position-top);\n right: var(--dialog-dismissible-position-right);\n display: flex;\n padding: var(--button-sm-icon-button-padding);\n justify-content: flex-end;\n align-items: flex-start;\n gap: 10px;\n }\n\n .content-body {\n padding: var(--dialog-body-padding-y) var(--dialog-body-padding-x);\n align-items: flex-start;\n gap: 8px;\n\n color: var(--color-content-medium-text);\n\n /* text/md/regular */\n font-family: 'TT Norms Pro', sans-serif;\n font-size: var(--font-size-md);\n font-style: normal;\n font-weight: 400;\n line-height: var(--line-height-base); /* 150% */\n }\n }\n}\n","import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Method,\n Event,\n EventEmitter,\n Watch,\n Listen,\n} from '@stencil/core';\nimport { tabbable } from 'tabbable';\nimport {\n addEventListeners,\n removeEventListeners,\n type EventsAndListeners,\n} from '../../utils/events.utils';\nimport clsx from 'clsx';\n\n/**\n * @slot default - Body of the dialog.\n * @slot trigger - Content to be placed as the trigger, will override the trigger prop.\n * @slot header - Content to be placed as the header, will override the header prop.\n * @slot footer - Content to be placed as the footer, will override the footer prop.\n */\n@Component({\n tag: 'nv-dialog',\n styleUrl: 'nv-dialog.scss',\n shadow: false,\n})\nexport class NvDialog {\n @Element() el: HTMLNvDialogElement;\n private dialogElement!: HTMLDialogElement;\n private eventsAttached = false;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the popover trigger. This\n * should be used when the slot for the trigger is not defined.\n */\n @Prop({ mutable: true })\n triggerElement: Element;\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the header. This should\n * be used when the slot for the header is not defined.\n */\n @Prop({ mutable: true })\n headerElement: Element;\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the footer. This should\n * be used when the slot for the footer is not defined.\n */\n @Prop({ mutable: true })\n footerElement: Element;\n\n /**\n * Use this prop to toggle the visibility of the dialog. Set to true to show\n * the dialog and false to hide it.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * If true, the dialog cannot be closed by the user.\n */\n @Prop({ reflect: true })\n readonly undismissable: boolean = false;\n\n /**\n * If true, the dialog will be closed when the backdrop is clicked.\n */\n @Prop({ reflect: true })\n readonly clickOutside: boolean = false;\n\n /**\n * Controls the dialog's autofocus behavior. When false (default), the dialog will\n * automatically focus the first focusable element. When true, automatic focus is\n * disabled and you must manually set focus on an element for accessibility compliance.\n */\n @Prop({ reflect: true })\n readonly manualFocus: boolean = false;\n\n /**\n * If true, the dialog visibility is managed manually through methods or the open prop.\n */\n @Prop({ reflect: true })\n readonly controlled: boolean = false;\n\n /**\n * If true, the dialog takes full width styling.\n */\n @Prop({ reflect: true })\n readonly full: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Call this method to show the dialog, making it visible on the screen.\n */\n @Method()\n public async show() {\n this.preventScroll();\n this.dialogElement.showModal();\n this.open = true;\n }\n\n /**\n * Call this method to hide the dialog, making it disappear from view.\n */\n @Method()\n public async hide() {\n this.allowScroll();\n this.dialogElement.close();\n this.open = false;\n }\n\n /**\n * Handles the close button click.\n */\n private handleCloseButton = () => {\n this.hide();\n };\n\n /**\n * Handles the cancel button click.\n */\n private handleCancelButton = () => {\n this.hide();\n };\n\n /**\n * Sets the autofocus on the first focusable element in the dialog.\n */\n private setAutofocus() {\n const focusableElements = tabbable(this.dialogElement, {\n displayCheck: 'none',\n });\n\n if (focusableElements.length > 0) {\n // Convert to array and find element with smallest top and left position\n let topLeftElement = focusableElements[0];\n let topLeftRect = topLeftElement.getBoundingClientRect();\n\n focusableElements.forEach(element => {\n const rect = element.getBoundingClientRect();\n if (rect.top < topLeftRect.top || rect.left < topLeftRect.left) {\n topLeftElement = element;\n topLeftRect = rect;\n }\n });\n\n // Set autofocus attribute on the found element\n topLeftElement.setAttribute('autofocus', 'true');\n }\n }\n\n /**\n * Attaches event listeners to the dialog.\n */\n private attachEventListeners() {\n if (this.triggerElement && !this.eventsAttached && !this.controlled) {\n addEventListeners(this.triggerClickEvents, this.triggerElement, this);\n this.eventsAttached = true;\n }\n }\n\n /**\n * Prevents the body from scrolling when the dialog is open.\n */\n private preventScroll() {\n document.body.style.overflow = 'hidden';\n }\n\n /**\n * Allows the body to scroll when the dialog is closed.\n */\n\n private allowScroll() {\n document.body.style.overflow = '';\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the dialog is closing in order to allow for cleanup, data-capture, etc.\n */\n @Event()\n close: EventEmitter<void>;\n\n /**\n * Handles the dialog close event.\n */\n private handleDialogClose = () => {\n this.close.emit();\n };\n\n /**\n * Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.\n\n * @param {KeyboardEvent} event - The keydown event.\n */\n @Listen('keydown', { target: 'document' })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.undismissable) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /**\n * Handles the click event to close the dialog when clickOutside is true.\n * @param {MouseEvent} event - The click event.\n */\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: MouseEvent) {\n if (!this.clickOutside || this.undismissable) return;\n this.handleClickOutside(event);\n }\n\n /**\n * Handles the touchstart event to close the dialog when clickOutside is true.\n * @param {TouchEvent} event - The touchstart event.\n */\n @Listen('touchstart', { target: 'document' })\n handleDocumentTouch(event: TouchEvent) {\n if (!this.clickOutside || this.undismissable) return;\n this.handleClickOutside(event);\n }\n\n private handleClickOutside = (event: MouseEvent | TouchEvent) => {\n if (event.target === this.dialogElement) {\n this.hide();\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n private triggerClickEvents: EventsAndListeners = [\n ['click', this.show],\n ['touchstart', this.show],\n [\n 'keydown',\n (e: KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this.show();\n }\n },\n ],\n ];\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('open')\n async handleDialogOpenChange(open: boolean) {\n if (open) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n /**\n * Lifecycle method that runs before the component loads.\n * Initializes the trigger, header, and footer elements by finding them in the component's children.\n * Elements are found either by their slot attribute or by their tag name (for dialog header/footer)\n */\n componentWillLoad() {\n this.triggerElement = Array.from(this.el.children).find(child => {\n return child.getAttribute('slot') === 'trigger';\n }) as HTMLElement;\n\n this.headerElement = Array.from(this.el.children).find(child => {\n return (\n child.getAttribute('slot') === 'header' ||\n child.tagName.toLowerCase() === 'nv-dialogheader'\n );\n }) as HTMLElement;\n\n this.footerElement = Array.from(this.el.children).find(child => {\n return (\n child.getAttribute('slot') === 'footer' ||\n child.tagName.toLowerCase() === 'nv-dialogfooter'\n );\n }) as HTMLElement;\n }\n\n componentWillUpdate() {\n this.attachEventListeners();\n }\n\n componentDidLoad() {\n if (this.open) {\n this.show();\n }\n if (!this.manualFocus) {\n this.setAutofocus();\n }\n this.attachEventListeners();\n }\n\n disconnectedCallback() {\n removeEventListeners(this.triggerClickEvents, this.triggerElement, this);\n this.allowScroll();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n <slot name=\"trigger\"></slot>\n\n <dialog\n ref={el => (this.dialogElement = el)}\n onClose={this.handleDialogClose}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog-header\"\n aria-describedby=\"dialog-content\"\n class={clsx({ full: this.full })}\n >\n <div class=\"content\">\n {!this.undismissable && (\n <nv-button\n class=\"close-button\"\n emphasis=\"lower\"\n size=\"sm\"\n onClick={this.handleCloseButton}\n aria-label=\"Close dialog\"\n >\n <nv-icon name=\"x\" size=\"sm\" />\n </nv-button>\n )}\n\n {this.headerElement ? (\n <slot name=\"header\"></slot>\n ) : (\n <nv-dialogheader id=\"dialog-header\"></nv-dialogheader>\n )}\n\n <div class=\"content-body\" id=\"dialog-content\">\n <slot></slot>\n </div>\n\n {this.footerElement ? (\n <slot name=\"footer\"></slot>\n ) : (\n <nv-dialogfooter\n onNvDialogCanceled={this.handleCancelButton}\n undismissable={this.undismissable}\n ></nv-dialogfooter>\n )}\n </div>\n </dialog>\n </Host>\n );\n }\n}\n"],"mappings":";;;;;AASA,IAAIA,EAAqB,CAAC,qBAAsB,sBAAuB,wBAAyB,uBAAwB,sBAAuB,oCAAqC,+BAAgC,+BAAgC,gEAAiE,6CAA8C,wBACnW,IAAIC,EAAmCD,EAAmBE,KAAK,KAC/D,IAAIC,SAAmBC,UAAY,YACnC,IAAIC,EAAUF,EAAY,WAAY,EAAKC,QAAQE,UAAUD,SAAWD,QAAQE,UAAUC,mBAAqBH,QAAQE,UAAUE,sBACjI,IAAIC,GAAeN,GAAaC,QAAQE,UAAUG,YAAc,SAAUC,GACxE,IAAIC,EACJ,OAAOD,IAAY,MAAQA,SAAiB,OAAS,GAAKC,EAAuBD,EAAQD,eAAiB,MAAQE,SAA8B,OAAS,E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A,QAAM5H,KAAK,WAEX4H,EAAA,mBAAiBU,GAAG,kBAGtBV,EAAA,OAAAjC,IAAA,2CAAKsC,MAAM,eAAeK,GAAG,kBAC3BV,EAAA,QAAAjC,IAAA,8CAGDvB,KAAKkD,cACJM,EAAA,QAAM5H,KAAK,WAEX4H,EAAA,mBACEW,mBAAoBnE,KAAKU,mBACzBP,cAAeH,KAAKG,kB","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,a as s,g as o}from"./p-5439afb8.js";import{v as n}from"./p-f5ff676c.js";const r='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 nv-popover [data-scope=popover]{width:100%;display:flex;flex-direction:column;padding:var(--list-dropdown-padding);border-radius:var(--list-dropdown-radius);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border)}nv-fieldmultiselect nv-popover [slot=content]{gap:var(--list-dropdown-gap-y);display:flex;flex-direction:column}nv-fieldmultiselect nv-popover hr{color:var(--components-list-dropdown-separator)}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, 1);background:var(--nv-field-background);transition:all 150ms ease-out;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,nv-fieldmultiselect .input-container-multiselect:focus-within:hover,nv-fieldmultiselect .input-container-multiselect:focus,nv-fieldmultiselect .input-container-multiselect:focus: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 .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 .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)}.no-results-message{text-align:center;padding:10px;color:var(--components-form-text-description-error)}.multiselect-divider{display:block;width:100%;height:1px;background-color:var(--components-list-dropdown-separator);margin:var(--list-dropdown-item-padding-y) 0;border:0}';const l=r;const h=class{constructor(i){t(this,i);this.dropdownItemSelected=e(this,"dropdownItemSelected",7);this.valueChanged=e(this,"valueChanged",7);this.multiselectChange=e(this,"multiselectChange",7);this.inputId=n();this.maxHeight="200px";this.badgeLabel="";this.emptyresult="No results found";this.required=false;this.error=false;this.readonly=false;this.disabled=false;this.autocomplete="off";this.filterable=false;this.open=false;this.parsedOptions=[];this.selectedValues=[];this.sortedOptions=[];this.filterText="";this.isFilterable=this.filterable;this.debounceDelay=300;this.modeState="options";this.isHandlingEscape=false;this.handleBadgeCloseOptions=()=>{this.selectedValues=[];this.multiselectChange.emit(this.selectedValues);const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((t=>{t.checked=false;t.style.display=""}));this.parsedOptions=this.parsedOptions.filter((t=>!t.isDivider));this.reorderOptionsContent()};this.handleBadgeCloseSlots=()=>{this.selectedValues=[];this.multiselectChange.emit(this.selectedValues);const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((t=>{t.checked=false;t.style.display=""}));this.reorderSlotContent()};this.handlePopoverClose=()=>{if(this.isHandlingEscape){return}this.open=false;this.filterText="";if(this.modeState==="options"){this.reorderOptionsContent()}else{this.reorderSlotContent()}if(this.filterable){this.resetFilter()}};this.handleInputBlurOptions=()=>{setTimeout((()=>{if(!this.el.contains(document.activeElement)){this.open=false;this.popoverElement.hide();if(this.filterable){this.filterText="";this.resetFilter()}}}),150)};this.handleInputContainerClickOptions=t=>{if(this.disabled||this.readonly){return}const e=t.target;if(e.tagName==="P"||e.tagName==="SPAN"){this.open=true;this.popoverElement.show();const t=this.el.querySelector(".input-container");if(t){t.classList.add("focus-within");const e=()=>{t.classList.remove("focus-within")};this.popoverElement.addEventListener("hide",e)}}};this.handleInputContainerClickSlots=t=>{if(this.disabled||this.readonly){return}const e=t.target;if(e.tagName==="P"||e.tagName==="SPAN"){this.open=true;this.popoverElement.show();const t=this.el.querySelector(".input-container");if(t){t.classList.add("focus-within");const e=()=>{t.classList.remove("focus-within")};this.popoverElement.addEventListener("hide",e)}}};this.handleInputOptions=t=>{if(!this.filterable)return;if(this.disabled||this.readonly){return}const e=t.target;this.value=e.value;this.valueChanged.emit(this.value);if(this.debounceTimer){window.clearTimeout(this.debounceTimer)}this.debounceTimer=window.setTimeout((()=>{this.filterText=e.value.toLowerCase();this.filterItemsOption()}),this.debounceDelay)};this.handleInputSlots=t=>{if(!this.filterable)return;if(this.disabled||this.readonly)return;const e=t.target;this.value=e.value;this.valueChanged.emit(this.value);if(this.debounceTimer){window.clearTimeout(this.debounceTimer)}this.debounceTimer=window.setTimeout((()=>{this.filterText=e.value.toLowerCase();this.filterSlotsItems()}),this.debounceDelay)};this.handleInputFocusOptions=()=>{if(this.disabled||this.readonly){return}this.open=true};this.handleInputFocusSlots=()=>{if(this.disabled||this.readonly){return}this.open=true};this.handleInputBlurSlots=()=>{setTimeout((()=>{if(!this.el.contains(document.activeElement)){this.open=false;this.popoverElement.hide();if(this.filterable){this.filterText="";this.resetFilter()}}}),150)};this.togglePopoverOptions=()=>{if(this.disabled||this.readonly){return}if(this.open){this.handlePopoverClose()}else{this.open=true;this.popoverElement.show();if(!this.filterable){this.focusFirstItem()}}};this.togglePopoverSlots=()=>{if(this.disabled||this.readonly){return}if(this.open){this.handlePopoverClose()}else{this.open=true;this.popoverElement.show();if(!this.filterable){this.focusFirstItem()}}}}connectedCallback(){document.addEventListener("click",this.handleClickOutside.bind(this))}componentWillLoad(){this.modeState=this.mode;if(this.modeState==="options"){this.handleOptionsChange(this.options)}requestAnimationFrame((()=>{if(this.popoverElement){this.popoverElement.addEventListener("hide",(()=>{this.handlePopoverClose()}))}}));if(this.modeState==="slots"){Promise.resolve().then((()=>{const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));this.selectedValues=t.filter((t=>t.hasAttribute("checked"))).map((t=>t.getAttribute("value")||""));requestAnimationFrame((()=>{this.reorderSlotContent()}))}))}if(this.modeState==="options"){this.sortedOptions=[...this.parsedOptions]}if(this.filterable&&this.value){this.filterText=String(this.value).toLocaleLowerCase();this.filterItems()}else{this.resetFilter()}}componentDidLoad(){if(this.modeState==="options"){requestAnimationFrame((()=>{this.reorderOptionsContent()}))}}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside.bind(this));if(this.popoverElement){this.popoverElement.removeEventListener("hide",(()=>{this.handlePopoverClose()}))}}handleOpenChanged(t){this.open=t.detail;if(this.open){if(this.filterText){this.filterItems()}}else if(this.modeState==="options"){this.reorderOptionsContent()}else{this.reorderSlotContent()}}handleItemChecked(t){if(this.disabled||this.readonly){return}const{value:e,checked:i}=t.detail;if(e!==undefined&&e!==null){const t=[...this.selectedValues];const s=t.indexOf(e);if(i&&s===-1){t.push(e)}else if(!i&&s>-1){t.splice(s,1)}if(JSON.stringify(this.selectedValues)!==JSON.stringify(t)){this.selectedValues=t;requestAnimationFrame((()=>{this.multiselectChange.emit(this.selectedValues)}))}}else{console.warn("Received itemChecked event with undefined or null value")}}handleOptionsChange(t){if(typeof t==="string"){try{const e=JSON.parse(t);this.selectedValues=e.filter((t=>t.checked)).map((t=>t.value));this.parsedOptions=[...e]}catch(t){console.error("Error parsing options:",t);this.parsedOptions=[]}}else if(Array.isArray(t)){this.selectedValues=t.filter((t=>t.checked)).map((t=>t.value));this.parsedOptions=[...t]}else{this.parsedOptions=[]}Promise.resolve().then((()=>{requestAnimationFrame((()=>{if(this.modeState==="options"){this.reorderOptionsContent()}}))}))}watchValueHandler(){this.setInitialSelection()}watchFilterableHandler(t){this.isFilterable=t;this.filterable=t}handleSlotChange(t){const e=t.target;if(e&&e.name==="content"){requestAnimationFrame((()=>{this.reorderSlotContent()}))}}async getFilterText(){return this.filterText}setInitialSelection(){var t;const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const i=e.find((t=>{var e;return t.getAttribute("label")===this.value||t.getAttribute("value")===this.value||((e=t.textContent)===null||e===void 0?void 0:e.trim())===this.value}));e.forEach((t=>{t.removeAttribute("selected");t.classList.remove("selected")}));if(i){i.setAttribute("selected","true");i.classList.add("selected");this.value=i.getAttribute("label")||i.getAttribute("value")||((t=i.textContent)===null||t===void 0?void 0:t.trim())||"";if(this.inputElement){this.inputElement.value=this.value}}}async resetFilter(){const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((t=>{t.style.display=""}));const e=this.el.querySelector("ul");if(e){const i=e.querySelector("[data-empty]");if(i)i.remove();const s=t.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const o=t.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));if(s.length>0){this.manageDivider(e,s,o)}}}async getSelectedValues(){return this.selectedValues}reorderSlotContent(){if(this.modeState==="options")return;const t=this.el.querySelector("ul");if(!t)return;t.querySelectorAll("hr.multiselect-divider").forEach((t=>t.remove()));const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck")).filter((t=>t.style.display!=="none"));const i=t.querySelector("[data-empty]");if(i){return}const s=e.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const o=e.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));s.forEach((e=>{t.appendChild(e)}));if(s.length>0&&o.length>0){const e=document.createElement("hr");e.className="multiselect-divider";t.appendChild(e)}o.forEach((e=>{t.appendChild(e)}))}reorderOptionsContent(){const t=this.el.querySelector('ul[role="content"]');if(!t)return;const e=Array.from(t.querySelectorAll("nv-fielddropdownitemcheck")).filter((t=>t.style.display!=="none"));const i=e.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const s=e.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));i.forEach((e=>t.appendChild(e)));s.forEach((e=>t.appendChild(e)));this.manageDivider(t,i,s)}filterItems(){const t=this.el.querySelector("ul");if(!t)return;const e=t.querySelector("[data-empty]");if(e){e.remove()}if(!this.filterText.trim()){if(this.parsedOptions&&this.parsedOptions.length>0){const e=Array.from(t.querySelectorAll("nv-fielddropdownitemcheck"));e.forEach((t=>{t.style.display=""}))}else{const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((t=>{t.style.display=""}))}const e=Array.from(t.querySelectorAll("nv-fielddropdownitemcheck"));const i=e.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const s=e.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));this.manageDivider(t,i,s);return}const i=this.normalizeText(this.filterText);let s=false;if(this.parsedOptions&&this.parsedOptions.length>0){const e=Array.from(t.querySelectorAll("nv-fielddropdownitemcheck"));e.forEach((t=>{const e=this.parsedOptions.find((e=>e.value===t.getAttribute("value")));if(e&&!e.isDivider){const o=this.normalizeText(e.label).includes(i)||this.normalizeText(e.value).includes(i);t.style.display=o?"":"none";if(o)s=true}}));const o=e.filter((t=>t.style.display!=="none"));const n=o.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const r=o.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));this.manageDivider(t,n,r)}else{const t=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));t.forEach((t=>{const e=t.getAttribute("label")||"";const o=t.getAttribute("value")||"";const n=t.textContent||"";const r=this.normalizeText(e).includes(i)||this.normalizeText(o).includes(i)||this.normalizeText(n).includes(i);t.style.display=r?"":"none";if(r)s=true}))}if(!s){const e=document.createElement("li");e.setAttribute("data-empty","true");e.textContent=this.emptyresult;e.classList.add("no-results-message");t.appendChild(e)}this.reorderSlotContent()}filterItemsOption(){const t=this.el.querySelector("ul");if(!t)return;const e=this.normalizeText(this.filterText);let i=false;const s=Array.from(t.querySelectorAll("nv-fielddropdownitemcheck"));if(!this.filterText.trim()){this.removeEmptyMessageOption(t);s.forEach((t=>t.style.display=""));this.reorderOptionsContent();return}s.forEach((t=>{const s=t.getAttribute("label")||"";const o=t.getAttribute("value")||"";const n=this.normalizeText(s).includes(e)||this.normalizeText(o).includes(e);t.style.display=n?"":"none";if(n)i=true}));const o=s.filter((t=>t.style.display!=="none"));const n=o.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));const r=o.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||"")));this.manageDivider(t,n,r);if(!i){this.addEmptyMessageOption(t)}else{this.removeEmptyMessageOption(t)}}filterSlotsItems(){if(this.modeState==="options")return;const t=this.el.querySelector("ul");if(!t)return;const e=t.querySelector("[data-empty]");if(e){e.remove()}if(!this.filterText.trim()){this.resetFilter();return}const i=this.normalizeText(this.filterText);let s=false;const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitemcheck"));o.forEach((t=>{var e;const o=t.getAttribute("label")||"";const n=t.getAttribute("value")||"";const r=((e=t.textContent)===null||e===void 0?void 0:e.trim())||"";const l=this.normalizeText(o).includes(i)||this.normalizeText(n).includes(i)||this.normalizeText(r).includes(i);t.style.display=l?"":"none";if(l)s=true}));const n=o.filter((t=>t.style.display!=="none"));const r=n.filter((t=>this.selectedValues.includes(t.getAttribute("value")||"")));this.manageDivider(t,r,n.filter((t=>!this.selectedValues.includes(t.getAttribute("value")||""))));if(!s){const e=document.createElement("li");e.setAttribute("data-empty","true");e.textContent=this.emptyresult;e.classList.add("no-results-message");t.appendChild(e)}}normalizeText(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim()}handleClickOutside(t){if(this.el.contains(t.target)||this.inputElement&&this.inputElement.contains(t.target)){return}this.handlePopoverClose()}async handleKeyDown(t){if(!this.open){if(t.key==="ArrowDown"){this.open=true;this.popoverElement.show();if(!this.filterable){requestAnimationFrame((()=>{this.focusFirstItem()}))}t.preventDefault();return}return}const e=Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck:not([style*="display: none"])'));if(e.length===0){console.warn("No visible items found to navigate");return}let i=e.findIndex((t=>t.classList.contains("highlighted")));if(t.key==="ArrowDown"){t.preventDefault();i=i===-1?0:(i+1)%e.length;this.updateHighlightedItem(e,i)}else if(t.key==="ArrowUp"){t.preventDefault();i=i===-1?e.length-1:(i-1+e.length)%e.length;this.updateHighlightedItem(e,i)}else if(t.key==="Enter"&&i>=0){t.preventDefault();const s=e[i];const o=s.hasAttribute("checked");s.checked=!o;s.dispatchEvent(new MouseEvent("click",{view:window,bubbles:true,cancelable:true}))}else if(t.key==="Escape"){t.preventDefault();t.stopPropagation();const e=async()=>{this.isHandlingEscape=true;if(this.modeState==="options"){this.reorderOptionsContent()}else{this.reorderSlotContent()}await new Promise((t=>setTimeout(t,100)));setTimeout((()=>{this.isHandlingEscape=false;this.open=false;this.popoverElement.hide()}),150);if(this.inputElement){this.inputElement.blur()}};await e()}}updateHighlightedItem(t,e){t.forEach(((t,i)=>{if(i===e){t.classList.add("highlighted");t.setAttribute("tabindex","0");t.scrollIntoView({block:"nearest"});const e=t.querySelector("nv-fieldcheckbox");if(e){e.focus()}}else{t.classList.remove("highlighted");t.setAttribute("tabindex","-1")}}))}focusFirstItem(){const t=this.el.querySelector('nv-fielddropdownitemcheck:not([style*="display: none"])');if(t){t.setAttribute("tabindex","0");t.classList.add("highlighted");t.scrollIntoView({block:"nearest"});const e=t.querySelector("nv-fieldcheckbox");if(e){e.focus()}}else{console.warn("No visible first item found to focus")}}addEmptyMessageOption(t){const e=t.querySelector("[data-empty]");if(e)return;const i=document.createElement("li");i.setAttribute("data-empty","true");i.textContent=this.emptyresult;i.classList.add("no-results-message");t.appendChild(i)}removeEmptyMessageOption(t){const e=t.querySelector("[data-empty]");if(e)e.remove()}handleModeChange(t){this.modeState=t}manageDivider(t,e,i){let s=t.querySelector("hr.multiselect-divider");if(!s){s=document.createElement("hr");s.className="multiselect-divider";t.appendChild(s)}const o=e.length>0&&i.length>0;if(o){const t=e[e.length-1];t.after(s);s.style.display=""}else{s.style.display="none"}}renderOptionsMode(){return i(s,null,(this.label||this.el.querySelector('[slot="label"]'))&&i("label",{htmlFor:this.inputId},i("slot",{name:"label"},this.label)),i("nv-popover",{ref:t=>this.popoverElement=t,triggerMode:"controlled",placement:"bottom-start",open:this.open},i("div",{class:"input-wrapper-multiselect",slot:"trigger"},i("slot",{name:"before-input"}),i("div",{class:"input-container-multiselect"},i("slot",{name:"leading-input"}),i("nv-badge",{slot:"leading-input","prevent-auto-close":"true",color:"10",dismissible:this.selectedValues.length>0,hidden:this.selectedValues.length<=0,label:`${this.selectedValues.length} ${this.badgeLabel}`,"aria-label":`Clear all ${this.selectedValues.length} ${this.badgeLabel} items`,onCloseClicked:this.handleBadgeCloseOptions}),this.isFilterable||this.disabled||this.readonly?i("input",{id:this.inputId,ref:t=>this.inputElement=t,autocomplete:this.autocomplete,placeholder:this.placeholder,name:this.name,value:this.value,required:this.required,disabled:this.disabled,readOnly:this.readonly,onInput:this.handleInputOptions,onFocus:this.handleInputFocusOptions,onBlur:this.handleInputBlurOptions,onKeyDown:this.handleKeyDown}):i("p",{id:this.inputId,class:"non-filterable-text",onClick:this.handleInputContainerClickOptions,tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleInputFocusOptions,role:"combobox","aria-expanded":this.open},i("span",null,this.value||this.placeholder)),i("nv-iconbutton",{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.togglePopoverOptions})),i("slot",{name:"after-input"})),i("div",{slot:"content",role:"listbox","aria-multiselectable":"true",style:{"max-height":this.maxHeight,"overflow-y":"auto"}},i("ul",{role:"content"},this.parsedOptions.map((t=>i("nv-fielddropdownitemcheck",{label:t.label,description:t.description,value:t.value,checked:this.selectedValues.includes(t.value),disabled:t.disabled}))),i("hr",{class:"multiselect-divider",style:{display:"none"}})))),this.renderDescriptions())}renderSlotsMode(){return i(s,null,(this.label||this.el.querySelector('[slot="label"]'))&&i("label",{htmlFor:this.inputId},i("slot",{name:"label"},this.label)),i("nv-popover",{ref:t=>this.popoverElement=t,triggerMode:"controlled",placement:"bottom-start",open:this.open},i("div",{class:"input-wrapper-multiselect",slot:"trigger"},i("slot",{name:"before-input"}),i("div",{class:"input-container-multiselect",onClick:this.handleInputContainerClickSlots},i("slot",{name:"leading-input"},i("p",null,"No leading input")),i("nv-badge",{slot:"leading-input","prevent-auto-close":"true",color:"10",dismissible:this.selectedValues.length>0,hidden:this.selectedValues.length<=0,label:`${this.selectedValues.length} ${this.badgeLabel}`,"aria-label":`Clear all ${this.selectedValues.length} ${this.badgeLabel} items`,onCloseClicked:this.handleBadgeCloseSlots}),this.isFilterable||this.disabled||this.readonly?i("input",{id:this.inputId,ref:t=>this.inputElement=t,autocomplete:this.autocomplete,placeholder:this.placeholder,name:this.name,value:this.value,required:this.required,disabled:this.disabled,readOnly:this.readonly,onInput:this.handleInputSlots,onFocus:this.handleInputFocusSlots,onBlur:this.handleInputBlurSlots,onKeyDown:this.handleKeyDown}):i("p",{id:this.inputId,class:"non-filterable-text",onClick:this.handleInputContainerClickSlots,tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleInputFocusSlots,role:"combobox","aria-expanded":this.open},i("span",null,this.value||this.placeholder)),i("nv-iconbutton",{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.togglePopoverSlots})),i("slot",{name:"after-input"})),i("div",{slot:"content",role:"listbox","aria-multiselectable":"true",style:{"max-height":this.maxHeight,"overflow-y":"auto"}},i("slot",{name:"content"}))),this.renderDescriptions())}renderDescriptions(){return[(this.description||this.el.querySelector('[slot="description"]'))&&i("div",{class:"description"},i("slot",{name:"description"},this.description)),(this.errorDescription||this.el.querySelector('[slot="error-description"]'))&&i("div",{hidden:!this.error,class:"error-description"},i("slot",{name:"error-description"},this.errorDescription))]}render(){return this.modeState==="options"?this.renderOptionsMode():this.renderSlotsMode()}static get formAssociated(){return true}get el(){return o(this)}static get watchers(){return{options:["handleOptionsChange"],value:["watchValueHandler"],filterable:["watchFilterableHandler"],mode:["handleModeChange"]}}};h.style=l;export{h as nv_fieldmultiselect};
|
|
2
|
+
//# sourceMappingURL=p-c398cdb4.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["nvFieldmultiselectCss","NvFieldmultiselectStyle0","NvFieldmultiselect","constructor","hostRef","this","inputId","uuidv4","maxHeight","badgeLabel","emptyresult","required","error","readonly","disabled","autocomplete","filterable","open","parsedOptions","selectedValues","sortedOptions","filterText","isFilterable","debounceDelay","modeState","isHandlingEscape","handleBadgeCloseOptions","multiselectChange","emit","items","Array","from","el","querySelectorAll","forEach","item","checked","style","display","filter","option","isDivider","reorderOptionsContent","handleBadgeCloseSlots","reorderSlotContent","handlePopoverClose","resetFilter","handleInputBlurOptions","setTimeout","contains","document","activeElement","popoverElement","hide","handleInputContainerClickOptions","event","target","tagName","show","inputContainer","querySelector","classList","add","removeFocusWithin","remove","addEventListener","handleInputContainerClickSlots","handleInputOptions","input","value","valueChanged","debounceTimer","window","clearTimeout","toLowerCase","filterItemsOption","handleInputSlots","filterSlotsItems","handleInputFocusOptions","handleInputFocusSlots","handleInputBlurSlots","togglePopoverOptions","focusFirstItem","togglePopoverSlots","connectedCallback","handleClickOutside","bind","componentWillLoad","mode","handleOptionsChange","options","requestAnimationFrame","Promise","resolve","then","hasAttribute","map","getAttribute","String","toLocaleLowerCase","filterItems","componentDidLoad","disconnectedCallback","removeEventListener","handleOpenChanged","detail","handleItemChecked","undefined","newSelectedValues","valueIndex","indexOf","push","splice","JSON","stringify","console","warn","newValue","parsedOpts","parse","isArray","watchValueHandler","setInitialSelection","watchFilterableHandler","handleSlotChange","slot","name","getFilterText","selectedItem","find","_a","textContent","trim","removeAttribute","setAttribute","inputElement","ul","emptyMessage","selectedItems","includes","unselectedItems","length","manageDivider","getSelectedValues","divider","hasEmptyMessage","appendChild","createElement","className","existingEmptyMessage","normalizedFilter","normalizeText","hasVisibleItems","opt","matchesFilter","label","visibleItems","visibleSelected","visibleUnselected","removeEmptyMessageOption","addEmptyMessageOption","visibleSelectedItems","text","normalize","replace","handleKeyDown","key","preventDefault","currentIndex","findIndex","updateHighlightedItem","isCurrentlyChecked","dispatchEvent","MouseEvent","view","bubbles","cancelable","stopPropagation","handleEscape","async","blur","index","i","scrollIntoView","block","checkbox","focus","firstItem","existingMessage","handleModeChange","shouldShowDivider","lastSelectedItem","after","renderOptionsMode","h","Host","htmlFor","ref","triggerMode","placement","class","color","dismissible","hidden","onCloseClicked","id","e","placeholder","readOnly","onInput","onFocus","onBlur","onKeyDown","onClick","tabIndex","role","size","emphasis","toString","description","renderDescriptions","renderSlotsMode","errorDescription","render"],"sources":["src/components/nv-fieldmultiselect/nv-fieldmultiselect.scss?tag=nv-fieldmultiselect","src/components/nv-fieldmultiselect/nv-fieldmultiselect.tsx"],"sourcesContent":["@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']) {\n > label {\n @include form-field-label-required();\n }\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n @include form-field-popover();\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 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 &:hover{\n border-color: var(--components-form-field-border-hover);\n }\n\n &:focus-visible,\n &:focus-within,\n &:focus,\n &.focus-within {\n border-color: var(--components-form-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\n.no-results-message {\n text-align: center;\n padding: 10px;\n color: var(--components-form-text-description-error);\n}\n\n.multiselect-divider {\n display: block;\n width: 100%;\n height: 1px;\n background-color: var(--components-list-dropdown-separator);\n margin: var(--list-dropdown-item-padding-y) 0;\n border: 0;\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';\nimport { DropdownItemSelectedEventDetail } from '../nv-fielddropdownitem/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@Component({\n tag: 'nv-fieldmultiselect',\n styleUrl: 'nv-fieldmultiselect.scss',\n formAssociated: true,\n shadow: false,\n})\nexport class NvFieldmultiselect {\n @Element() el: HTMLNvFieldmultiselectElement;\n private inputElement!: HTMLInputElement;\n private popoverElement!: HTMLNvPopoverElement;\n /**\n * Timer for debouncing input events.\n * Private property preferred over @State as it:\n * - Doesn't need to trigger re-renders\n * - Is purely for internal logic\n * - Improves performance by avoiding Stencil's reactivity system\n */\n private debounceTimer: number;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * 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 * 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 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.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Display temporary text inside the input field.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the maximum height of the multiselect list when open.\n */\n @Prop({ reflect: true })\n readonly maxHeight: string = '200px';\n\n /**\n * Text for the badge showing the number of selected items.\n */\n @Prop({ reflect: true })\n readonly badgeLabel: string = '';\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 * Marks the input field as required.\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 multiselect\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 */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Disables the input field.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * The autocomplete prop for faster input filling.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Enables or disables the filtering feature for the multiselect items.\n */\n @Prop({ reflect: true, mutable: true })\n filterable: boolean = false;\n\n /**\n * Specifies the value of the input field.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * State of the multiselect popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * Multiselect mode: 'options' (JSON data) or 'slots' (custom items).\n * This property is now reflected in the modeState.\n */\n @Prop({ reflect: true })\n readonly mode: 'options' | 'slots';\n\n /**\n * List of options available in the multiselect.\n * @description The options are passed as a JSON string.\n * @example options='[{\"label\": \"Option 1\", \"value\": \"option1\"}, {\"label\": \"Option 2\", \"value\": \"option2\"}]'\n */\n @Prop({ reflect: true })\n readonly options?: string;\n\n /**\n * Options configuration for the multiselect items.\n */\n @State()\n parsedOptions: Array<{\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is a divider */\n isDivider?: boolean;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Additional description for the option */\n description?: string;\n /** Whether this option is pre-checked */\n checked?: boolean;\n }> = [];\n\n /**\n * List of selected values in the multiselect.\n */\n @State()\n selectedValues: string[] = [];\n\n /**\n * Sorted options for display.\n */\n @State()\n sortedOptions: Array<{\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is a divider */\n isDivider?: boolean;\n }> = [];\n\n /**\n * The text entered by the user for filtering multiselect items.\n */\n @State()\n filterText: string = '';\n\n /**\n * Determines whether the multiselect is filterable.\n */\n @State()\n isFilterable: boolean = this.filterable;\n\n /**\n * Delay in milliseconds before the search is triggered when typing in the filter input.\n * @default 300\n */\n @Prop({ reflect: true })\n readonly debounceDelay: number = 300;\n\n /**\n * State for the mode of the multiselect.\n * @type {'options' | 'slots'}\n * @default 'options'\n */\n @State()\n modeState: 'options' | 'slots' = 'options'; // Default value\n\n @State()\n private isHandlingEscape: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region LIFECYCLE\n\n /**\n * Subscribe to click outside event.\n */\n connectedCallback() {\n document.addEventListener('click', this.handleClickOutside.bind(this));\n }\n\n /**\n * Set the mode state and handle options change.\n */\n componentWillLoad() {\n this.modeState = this.mode;\n\n // Don't call handleOptionsChange if we are in slots mode\n if (this.modeState === 'options') {\n this.handleOptionsChange(this.options);\n }\n\n // Add the listener for the hide event\n requestAnimationFrame(() => {\n if (this.popoverElement) {\n this.popoverElement.addEventListener('hide', () => {\n this.handlePopoverClose();\n });\n }\n });\n\n // Specific initialization for slots mode\n if (this.modeState === 'slots') {\n Promise.resolve().then(() => {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n // Initialize selectedValues with checked items\n this.selectedValues = items\n .filter(item => item.hasAttribute('checked'))\n .map(item => item.getAttribute('value') || '');\n\n // Force a reorder after initialization\n requestAnimationFrame(() => {\n this.reorderSlotContent();\n });\n });\n }\n\n // Initialize the sorted options array with the parsed options for initial rendering\n if (this.modeState === 'options') {\n this.sortedOptions = [...this.parsedOptions];\n }\n\n // Apply filtering if the multiselect is filterable and there is a value\n if (this.filterable && this.value) {\n this.filterText = String(this.value).toLocaleLowerCase();\n this.filterItems();\n } else {\n // Reset visibility state of all dropdown items\n this.resetFilter();\n }\n }\n\n /**\n * Force reorder if options mode in componentDidLoad because of the initial render not trigger @watch\n */\n componentDidLoad() {\n if (this.modeState === 'options') {\n requestAnimationFrame(() => {\n this.reorderOptionsContent();\n });\n }\n }\n\n /**\n * Unsubscribe from click outside event.\n */\n disconnectedCallback() {\n document.removeEventListener('click', this.handleClickOutside.bind(this));\n\n // Remove the listener for the hide event\n if (this.popoverElement) {\n this.popoverElement.removeEventListener('hide', () => {\n this.handlePopoverClose();\n });\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Event emitted when an item is selected.\n */\n @Event()\n dropdownItemSelected: EventEmitter<DropdownItemSelectedEventDetail>;\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\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 * Emitted when the input loses focus.\n * @param {CustomEvent<boolean>} event - The event object containing the focus state.\n */\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n // Update the open state of popover\n this.open = event.detail;\n\n if (this.open) {\n if (this.filterText) {\n this.filterItems();\n }\n } else if (this.modeState === 'options') {\n this.reorderOptionsContent();\n } else {\n this.reorderSlotContent();\n }\n }\n\n /**\n * Listen for the `itemChecked` event emitted by child items.\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<{\n /** Value associated with the option */\n value: string;\n /** Whether this option is checked */\n checked: boolean;\n }>,\n ) {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const { value, checked } = event.detail;\n\n if (value !== undefined && value !== null) {\n const newSelectedValues = [...this.selectedValues];\n const valueIndex = newSelectedValues.indexOf(value);\n\n if (checked && valueIndex === -1) {\n newSelectedValues.push(value);\n } else if (!checked && valueIndex > -1) {\n newSelectedValues.splice(valueIndex, 1);\n }\n\n // Update the state and emit the event only if the selection has changed\n if (\n JSON.stringify(this.selectedValues) !==\n JSON.stringify(newSelectedValues)\n ) {\n this.selectedValues = newSelectedValues;\n\n // Use requestAnimationFrame to ensure the state is updated before emitting the event\n requestAnimationFrame(() => {\n this.multiselectChange.emit(this.selectedValues);\n });\n }\n } else {\n console.warn('Received itemChecked event with undefined or null value'); // Warning log\n }\n }\n\n /**\n * Emitted when the options change.\n * @param {string | Array<{label: string, value: string, isDivider?: boolean, disabled?: boolean, description?: string, checked?: boolean}>} newValue - The new value of the options.\n */\n @Watch('options')\n handleOptionsChange(\n newValue:\n | string\n | Array<{\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is a divider */\n isDivider?: boolean;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Additional description for the option */\n description?: string;\n /** Whether this option is pre-checked */\n checked?: boolean;\n }>,\n ) {\n if (typeof newValue === 'string') {\n try {\n const parsedOpts = JSON.parse(newValue);\n this.selectedValues = parsedOpts\n .filter(option => option.checked)\n .map(option => option.value);\n this.parsedOptions = [...parsedOpts];\n } catch (error) {\n console.error('Error parsing options:', error);\n this.parsedOptions = [];\n }\n } else if (Array.isArray(newValue)) {\n this.selectedValues = newValue\n .filter(option => option.checked)\n .map(option => option.value);\n this.parsedOptions = [...newValue];\n } else {\n this.parsedOptions = [];\n }\n\n // Wait for the options to be fully loaded\n Promise.resolve().then(() => {\n requestAnimationFrame(() => {\n if (this.modeState === 'options') {\n this.reorderOptionsContent();\n }\n });\n });\n }\n\n /**\n * Emitted when the value changes.\n */\n @Watch('value')\n watchValueHandler() {\n // Handle value change and update the corresponding multiselect item if it exists\n this.setInitialSelection();\n }\n\n /**\n * Emitted when the filterable property changes.\n * @param {boolean} newValue - The new value of the filterable property.\n */\n @Watch('filterable')\n watchFilterableHandler(newValue: boolean) {\n this.isFilterable = newValue;\n this.filterable = newValue;\n }\n\n // Add a listener for the slot content\n @Listen('slotchange')\n handleSlotChange(event: Event) {\n // Check: we only want to reorder if it's the \"content\" slot\n const slot = event.target as HTMLSlotElement;\n if (slot && slot.name === 'content') {\n // To give other platforms (VueJS, React, etc.) time to insert all their items,\n // we place the reorder in a requestAnimationFrame\n requestAnimationFrame(() => {\n this.reorderSlotContent();\n });\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\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 * Set the initial selection based on the current value and update the inputElement value.\n */\n private setInitialSelection() {\n const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitem'));\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 * Reset the filter and make all items visible.\n */\n @Method()\n async resetFilter(): Promise<void> {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n // Reset visibility state of all dropdown items\n items.forEach(item => {\n item.style.display = '';\n });\n\n // Clean up filter-related UI elements\n const ul = this.el.querySelector('ul');\n if (ul) {\n const emptyMessage = ul.querySelector('[data-empty]');\n if (emptyMessage) emptyMessage.remove();\n\n // Reorder with divider if needed\n const selectedItems = items.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const unselectedItems = items.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n\n if (selectedItems.length > 0) {\n this.manageDivider(ul as HTMLElement, selectedItems, unselectedItems);\n }\n }\n }\n\n /**\n * Returns the list of selected values.\n * @returns {string[]} The selected values.\n */\n @Method()\n async getSelectedValues(): Promise<string[]> {\n return this.selectedValues;\n }\n\n /**\n * Reorder the content of the slot.\n */\n private reorderSlotContent() {\n if (this.modeState === 'options') return;\n\n const ul = this.el.querySelector('ul');\n if (!ul) return;\n\n // Remove all existing <hr class=\"multiselect-divider\">\n ul.querySelectorAll('hr.multiselect-divider').forEach(divider =>\n divider.remove(),\n );\n\n // Retrieve all items (not hidden)\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n ).filter(item => item.style.display !== 'none');\n\n // If you possibly have a \"No results\" message:\n const hasEmptyMessage = ul.querySelector('[data-empty]');\n if (hasEmptyMessage) {\n // if there is a \"No results found\" message, do not reorder\n return;\n }\n\n // Separate checked vs unchecked\n const selectedItems = items.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const unselectedItems = items.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n\n // Reinsert CHECKED items FIRST\n // appendChild() moves the element without recreating it\n // this is not trigger a re-rendering of the component in the platforms\n selectedItems.forEach(item => {\n ul.appendChild(item); // <-- The <li> (or <nv-fielddropdownitemcheck>) is just \"moved\" to the end of the list\n });\n\n // Add a divider if needed\n if (selectedItems.length > 0 && unselectedItems.length > 0) {\n const divider = document.createElement('hr');\n divider.className = 'multiselect-divider';\n ul.appendChild(divider);\n }\n\n // Reinsert UNCHECKED items at the end\n unselectedItems.forEach(item => {\n ul.appendChild(item);\n });\n }\n\n /**\n * Reorder the content for options mode with async handling\n */\n private reorderOptionsContent() {\n const ul = this.el.querySelector('ul[role=\"content\"]') as HTMLElement;\n if (!ul) return;\n\n const items = Array.from(\n ul.querySelectorAll('nv-fielddropdownitemcheck'),\n ).filter(item => item.style.display !== 'none');\n\n const selectedItems = items.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const unselectedItems = items.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n\n // Reorder the elements\n selectedItems.forEach(item => ul.appendChild(item));\n unselectedItems.forEach(item => ul.appendChild(item));\n\n // Manage the divider after the reordering\n this.manageDivider(ul, selectedItems, unselectedItems);\n }\n\n /**\n * Filter multiselect items based on the text entered by the user.\n */\n private filterItems() {\n const ul = this.el.querySelector('ul');\n if (!ul) return;\n\n // Remove existing empty message if any\n const existingEmptyMessage = ul.querySelector('[data-empty]');\n if (existingEmptyMessage) {\n existingEmptyMessage.remove();\n }\n\n if (!this.filterText.trim()) {\n if (this.parsedOptions && this.parsedOptions.length > 0) {\n // Reset options display\n const items = Array.from(\n ul.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n items.forEach(item => {\n item.style.display = '';\n });\n } else {\n // Reset slot items display\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n items.forEach(item => {\n item.style.display = '';\n });\n }\n\n // Reorder with divider\n const items = Array.from(\n ul.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n const selectedItems = items.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const unselectedItems = items.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n this.manageDivider(ul, selectedItems, unselectedItems);\n return;\n }\n\n const normalizedFilter = this.normalizeText(this.filterText);\n let hasVisibleItems = false;\n\n if (this.parsedOptions && this.parsedOptions.length > 0) {\n // Filter options mode\n const items = Array.from(\n ul.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n items.forEach(item => {\n const option = this.parsedOptions.find(\n opt => opt.value === item.getAttribute('value'),\n );\n if (option && !option.isDivider) {\n const matchesFilter =\n this.normalizeText(option.label).includes(normalizedFilter) ||\n this.normalizeText(option.value).includes(normalizedFilter);\n\n item.style.display = matchesFilter ? '' : 'none';\n if (matchesFilter) hasVisibleItems = true;\n }\n });\n\n // Manage the divider with the visible items\n const visibleItems = items.filter(item => item.style.display !== 'none');\n const visibleSelected = visibleItems.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const visibleUnselected = visibleItems.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n this.manageDivider(ul, visibleSelected, visibleUnselected);\n } else {\n // Filter slot items mode\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n items.forEach(item => {\n const label = item.getAttribute('label') || '';\n const value = item.getAttribute('value') || '';\n const textContent = item.textContent || '';\n\n const matchesFilter =\n this.normalizeText(label).includes(normalizedFilter) ||\n this.normalizeText(value).includes(normalizedFilter) ||\n this.normalizeText(textContent).includes(normalizedFilter);\n\n item.style.display = matchesFilter ? '' : 'none';\n if (matchesFilter) hasVisibleItems = true;\n });\n }\n\n // Add empty message if no items match the filter\n if (!hasVisibleItems) {\n const emptyMessage = document.createElement('li');\n emptyMessage.setAttribute('data-empty', 'true');\n emptyMessage.textContent = this.emptyresult;\n emptyMessage.classList.add('no-results-message');\n ul.appendChild(emptyMessage);\n }\n\n this.reorderSlotContent();\n }\n\n /**\n * Filter multiselect items in options mode.\n */\n private filterItemsOption() {\n const ul = this.el.querySelector('ul');\n if (!ul) return;\n\n const normalizedFilter = this.normalizeText(this.filterText);\n let hasVisibleItems = false;\n\n const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck'));\n\n // Reset items if the filter text is empty\n if (!this.filterText.trim()) {\n // Remove the empty message if it exists\n this.removeEmptyMessageOption(ul);\n items.forEach(item => (item.style.display = ''));\n this.reorderOptionsContent(); // Reorder after reset\n return;\n }\n\n // Filter the items\n items.forEach(item => {\n const label = item.getAttribute('label') || '';\n const value = item.getAttribute('value') || '';\n\n const matchesFilter =\n this.normalizeText(label).includes(normalizedFilter) ||\n this.normalizeText(value).includes(normalizedFilter);\n\n item.style.display = matchesFilter ? '' : 'none';\n if (matchesFilter) hasVisibleItems = true;\n });\n\n // Manage the divider with the visible items\n const visibleItems = items.filter(item => item.style.display !== 'none');\n const visibleSelected = visibleItems.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n const visibleUnselected = visibleItems.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n\n this.manageDivider(ul, visibleSelected, visibleUnselected);\n\n // Add or remove the empty message based on the case\n if (!hasVisibleItems) {\n this.addEmptyMessageOption(ul);\n } else {\n this.removeEmptyMessageOption(ul);\n }\n }\n\n /**\n * Filter multiselect items in slots mode\n */\n private filterSlotsItems() {\n if (this.modeState === 'options') return;\n\n const ul = this.el.querySelector('ul');\n if (!ul) return;\n\n // Remove existing empty message if any\n const existingEmptyMessage = ul.querySelector('[data-empty]');\n if (existingEmptyMessage) {\n existingEmptyMessage.remove();\n }\n\n // If filter text is empty, reset all items visibility\n if (!this.filterText.trim()) {\n this.resetFilter();\n return;\n }\n\n const normalizedFilter = this.normalizeText(this.filterText);\n let hasVisibleItems = false;\n\n // Get all items and preserve them in the DOM\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n // Instead of removing/reordering, just hide/show items\n items.forEach(item => {\n const label = item.getAttribute('label') || '';\n const value = item.getAttribute('value') || '';\n const textContent = item.textContent?.trim() || '';\n\n const matchesFilter =\n this.normalizeText(label).includes(normalizedFilter) ||\n this.normalizeText(value).includes(normalizedFilter) ||\n this.normalizeText(textContent).includes(normalizedFilter);\n\n item.style.display = matchesFilter ? '' : 'none';\n if (matchesFilter) hasVisibleItems = true;\n });\n\n // Get visible items after filtering\n const visibleItems = items.filter(item => item.style.display !== 'none');\n const visibleSelectedItems = visibleItems.filter(item =>\n this.selectedValues.includes(item.getAttribute('value') || ''),\n );\n\n this.manageDivider(\n ul,\n visibleSelectedItems,\n visibleItems.filter(\n item => !this.selectedValues.includes(item.getAttribute('value') || ''),\n ),\n );\n\n // Add empty message if no items match the filter\n if (!hasVisibleItems) {\n const emptyMessage = document.createElement('li');\n emptyMessage.setAttribute('data-empty', 'true');\n emptyMessage.textContent = this.emptyresult;\n emptyMessage.classList.add('no-results-message');\n ul.appendChild(emptyMessage);\n }\n }\n\n /**x\n * Handle badge close for options mode.\n */\n private handleBadgeCloseOptions = (): void => {\n this.selectedValues = [];\n this.multiselectChange.emit(this.selectedValues);\n\n // Uncheck all elements\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n items.forEach(item => {\n item.checked = false;\n item.style.display = '';\n });\n\n // Reorder options without the divider since there are no selected elements\n this.parsedOptions = this.parsedOptions.filter(option => !option.isDivider);\n\n // Reorder options without the divider since there are no selected elements\n this.reorderOptionsContent();\n };\n\n /**\n * Handle badge close for slots mode.\n */\n private handleBadgeCloseSlots = (): void => {\n this.selectedValues = [];\n this.multiselectChange.emit(this.selectedValues);\n\n // Uncheck all elements\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitemcheck'),\n );\n\n items.forEach(item => {\n item.checked = false;\n item.style.display = '';\n });\n\n // Reorder slot content\n this.reorderSlotContent();\n };\n\n /**\n * Normalizes text by removing accents and converting to lowercase\n * @param {string} text - The text to normalize\n * @returns {string} The normalized text\n *\n * @example\n * normalizeText(\"Café Latte\") => \"cafe latte\"\n *\n * @description\n * This function performs text normalization in three steps:\n * 1. Decomposes characters into their base form and combining characters (NFD)\n * 2. Removes all diacritical marks (accents, umlauts, etc.)\n * 3. Converts to lowercase and trims whitespace\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize} - MDN documentation on String.normalize()\n * @see {@link https://en.wikipedia.org/wiki/Unicode_equivalence#Normal_forms} - More info about Unicode normalization forms\n */\n private normalizeText(text: string): string {\n return text\n .normalize('NFD') // Decompose characters into base + combining characters (e.g., é => e + ´)\n .replace(/[\\u0300-\\u036f]/g, '') // Remove all diacritical marks (Unicode range for combining characters)\n .toLowerCase() // Convert to lowercase\n .trim(); // Remove leading and trailing whitespace\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 return;\n }\n\n // Use handlePopoverClose for all cases\n this.handlePopoverClose();\n }\n\n /**\n * Handle popover close\n */\n private handlePopoverClose = () => {\n // If we are handling Escape, ignore this event\n if (this.isHandlingEscape) {\n return;\n }\n\n this.open = false;\n this.filterText = '';\n\n // Only reorder based on the mode\n if (this.modeState === 'options') {\n this.reorderOptionsContent();\n } else {\n this.reorderSlotContent();\n }\n\n // Reset filter if needed\n if (this.filterable) {\n this.resetFilter();\n }\n };\n\n /**\n * Handle input blur for options mode.\n */\n private handleInputBlurOptions = () => {\n setTimeout(() => {\n if (!this.el.contains(document.activeElement)) {\n // Close the popover without affecting the divider\n this.open = false;\n this.popoverElement.hide();\n\n // Reset filter if needed\n if (this.filterable) {\n this.filterText = '';\n this.resetFilter();\n }\n }\n }, 150);\n };\n\n /**\n * Handle keyboard events & arrow key navigation.\n * If the multiselect is not open, opens it and focuses on the first item if the list is not filterable.\n * If the multiselect is open, handles arrow key navigation and closes it if the focus is outside the component.\n * @param {KeyboardEvent} event - The keyboard event.\n */\n @Listen('keydown', { passive: false })\n async handleKeyDown(event: KeyboardEvent) {\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n this.popoverElement.show();\n\n // Focus on the first item if the list is not filterable\n if (!this.filterable) {\n requestAnimationFrame(() => {\n this.focusFirstItem();\n });\n }\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n const items = Array.from(\n this.el.querySelectorAll(\n 'nv-fielddropdownitemcheck:not([style*=\"display: none\"])',\n ),\n ) as HTMLNvFielddropdownitemcheckElement[];\n\n if (items.length === 0) {\n console.warn('No visible 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 =\n currentIndex === -1 ? 0 : (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex =\n currentIndex === -1\n ? items.length - 1\n : (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Enter' && currentIndex >= 0) {\n event.preventDefault();\n const selectedItem = items[currentIndex];\n\n // Toggle the checked state\n const isCurrentlyChecked = selectedItem.hasAttribute('checked');\n selectedItem.checked = !isCurrentlyChecked;\n\n // Trigger a click event to ensure proper event handling\n selectedItem.dispatchEvent(\n new MouseEvent('click', {\n view: window,\n bubbles: true,\n cancelable: true,\n }),\n );\n } else if (event.key === 'Escape') {\n event.preventDefault();\n event.stopPropagation(); // Prevent the event from propagating to the popover\n\n // Do the reorder and wait a bit before closing\n const handleEscape = async () => {\n this.isHandlingEscape = true; // Disable the hide listener\n\n if (this.modeState === 'options') {\n this.reorderOptionsContent();\n } else {\n this.reorderSlotContent();\n }\n\n // Wait for the reorder to be applied\n await new Promise(resolve => setTimeout(resolve, 100));\n\n // Reactivate the hide listener after a short delay\n setTimeout(() => {\n this.isHandlingEscape = false;\n this.open = false;\n this.popoverElement.hide();\n }, 150);\n\n if (this.inputElement) {\n this.inputElement.blur();\n }\n };\n\n await handleEscape();\n }\n }\n\n /**\n * Updates the highlighted item in the dropdown list.\n *\n * @param {(HTMLNvFielddropdownitemElement | HTMLNvFielddropdownitemcheckElement)[]} items - The items to update.\n * @param {number} index - The index of the item to highlight.\n */\n private updateHighlightedItem(\n items: (\n | HTMLNvFielddropdownitemElement\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.scrollIntoView({ block: 'nearest' });\n // Focus on the nv-fieldcheckbox inside\n const checkbox = item.querySelector('nv-fieldcheckbox');\n if (checkbox) {\n (checkbox as HTMLElement).focus();\n }\n } else {\n item.classList.remove('highlighted');\n item.setAttribute('tabindex', '-1');\n }\n });\n }\n\n /**\n * Focus on the first item in the dropdown list.\n */\n private focusFirstItem() {\n const firstItem = this.el.querySelector(\n 'nv-fielddropdownitemcheck:not([style*=\"display: none\"])',\n ) as HTMLNvFielddropdownitemcheckElement;\n\n if (firstItem) {\n firstItem.setAttribute('tabindex', '0');\n firstItem.classList.add('highlighted');\n firstItem.scrollIntoView({ block: 'nearest' });\n // Focus on the nv-fieldcheckbox inside\n const checkbox = firstItem.querySelector('nv-fieldcheckbox');\n if (checkbox) {\n (checkbox as HTMLElement).focus();\n }\n } else {\n console.warn('No visible first item found to focus');\n }\n }\n\n /**\n * Handle click on the input container for options mode.\n * @param {MouseEvent} event - The click event.\n */\n private handleInputContainerClickOptions = (event: MouseEvent) => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'P' || target.tagName === 'SPAN') {\n this.open = true;\n this.popoverElement.show();\n\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n /**\n * Handle click on the input container for slots mode.\n * @param {MouseEvent} event - The click event.\n */\n private handleInputContainerClickSlots = (event: MouseEvent) => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'P' || target.tagName === 'SPAN') {\n this.open = true;\n this.popoverElement.show();\n\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n /**\n * Handle input change for options mode.\n * @param {Event} event - The input event.\n */\n private readonly handleInputOptions = (event: Event) => {\n if (!this.filterable) return;\n if (this.disabled || this.readonly) {\n return;\n }\n\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(this.value);\n\n // Clear any existing timer\n if (this.debounceTimer) {\n window.clearTimeout(this.debounceTimer);\n }\n\n // Set a new timer for filtering\n this.debounceTimer = window.setTimeout(() => {\n this.filterText = input.value.toLowerCase();\n this.filterItemsOption();\n }, this.debounceDelay);\n };\n\n private addEmptyMessageOption(ul: HTMLElement) {\n const existingMessage = ul.querySelector('[data-empty]');\n if (existingMessage) return;\n\n const emptyMessage = document.createElement('li');\n emptyMessage.setAttribute('data-empty', 'true');\n emptyMessage.textContent = this.emptyresult;\n emptyMessage.classList.add('no-results-message');\n ul.appendChild(emptyMessage);\n }\n\n private removeEmptyMessageOption(ul: HTMLElement) {\n const existingMessage = ul.querySelector('[data-empty]');\n if (existingMessage) existingMessage.remove();\n }\n\n /**\n * Handle input change for slots mode\n * @param {Event} event - The input event.\n */\n private readonly handleInputSlots = (event: Event) => {\n if (!this.filterable) return;\n if (this.disabled || this.readonly) return;\n\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(this.value);\n\n // Clear any existing timer\n if (this.debounceTimer) {\n window.clearTimeout(this.debounceTimer);\n }\n\n // Set a new timer for filtering\n this.debounceTimer = window.setTimeout(() => {\n this.filterText = input.value.toLowerCase();\n this.filterSlotsItems();\n }, this.debounceDelay);\n };\n\n /**\n * Handle input focus for options mode.\n */\n private handleInputFocusOptions = () => {\n if (this.disabled || this.readonly) {\n return;\n }\n this.open = true;\n };\n\n /**\n * Handle input focus for slots mode.\n */\n private handleInputFocusSlots = () => {\n if (this.disabled || this.readonly) {\n return;\n }\n this.open = true;\n };\n\n /**\n * Handle input blur for slots mode.\n */\n private handleInputBlurSlots = () => {\n setTimeout(() => {\n if (!this.el.contains(document.activeElement)) {\n // Close the popover without affecting the divider\n this.open = false;\n this.popoverElement.hide();\n\n // Reset filter if needed\n if (this.filterable) {\n this.filterText = '';\n this.resetFilter();\n }\n }\n }, 150);\n };\n\n /**\n * Toggle the multiselect popover for options mode.\n */\n private togglePopoverOptions = (): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (this.open) {\n this.handlePopoverClose();\n } else {\n this.open = true;\n this.popoverElement.show();\n\n if (!this.filterable) {\n this.focusFirstItem();\n }\n }\n };\n\n /**\n * Toggle the multiselect popover for slots mode.\n */\n private togglePopoverSlots = (): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (this.open) {\n this.handlePopoverClose();\n } else {\n this.open = true;\n this.popoverElement.show();\n\n if (!this.filterable) {\n this.focusFirstItem();\n }\n }\n };\n\n /**\n * Watch for changes in the mode prop and update modeState accordingly\n * @param {string} newValue - The new mode value\n */\n @Watch('mode')\n handleModeChange(newValue: 'options' | 'slots') {\n this.modeState = newValue;\n }\n\n private manageDivider(\n ul: HTMLElement,\n selectedItems: Element[],\n unselectedItems: Element[],\n ) {\n let divider = ul.querySelector('hr.multiselect-divider') as HTMLElement;\n if (!divider) {\n divider = document.createElement('hr');\n divider.className = 'multiselect-divider';\n ul.appendChild(divider);\n }\n\n const shouldShowDivider =\n selectedItems.length > 0 && unselectedItems.length > 0;\n\n if (shouldShowDivider) {\n // Place the divider after the last selected item\n const lastSelectedItem = selectedItems[selectedItems.length - 1];\n lastSelectedItem.after(divider);\n divider.style.display = '';\n } else {\n divider.style.display = 'none';\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n\n /**\n * Renders the component in options mode\n * @returns {any} The JSX for options mode\n */\n private renderOptionsMode() {\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)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper-multiselect\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container-multiselect\">\n <slot name=\"leading-input\"></slot>\n\n <nv-badge\n slot=\"leading-input\"\n prevent-auto-close=\"true\"\n color=\"10\"\n dismissible={this.selectedValues.length > 0}\n hidden={this.selectedValues.length <= 0}\n label={`${this.selectedValues.length} ${this.badgeLabel}`}\n aria-label={`Clear all ${this.selectedValues.length} ${this.badgeLabel} items`}\n onCloseClicked={this.handleBadgeCloseOptions}\n ></nv-badge>\n\n {this.isFilterable || this.disabled || this.readonly ? (\n <input\n id={this.inputId}\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.handleInputOptions}\n onFocus={this.handleInputFocusOptions}\n onBlur={this.handleInputBlurOptions}\n onKeyDown={this.handleKeyDown}\n />\n ) : (\n <p\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClickOptions}\n tabIndex={0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocusOptions}\n role=\"combobox\"\n aria-expanded={this.open}\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.togglePopoverOptions}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div\n slot=\"content\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n style={{ 'max-height': this.maxHeight, 'overflow-y': 'auto' }}\n >\n <ul role=\"content\">\n {this.parsedOptions.map(option => (\n <nv-fielddropdownitemcheck\n label={option.label}\n description={option.description}\n value={option.value}\n checked={this.selectedValues.includes(option.value)}\n disabled={option.disabled}\n ></nv-fielddropdownitemcheck>\n ))}\n <hr class=\"multiselect-divider\" style={{ display: 'none' }} />\n </ul>\n </div>\n </nv-popover>\n\n {this.renderDescriptions()}\n </Host>\n );\n }\n\n /**\n * Renders the component in slots mode\n * @returns {any} The JSX for slots mode\n */\n private renderSlotsMode() {\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)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\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.handleInputContainerClickSlots}\n >\n <slot name=\"leading-input\">\n <p>No leading input</p>\n </slot>\n\n <nv-badge\n slot=\"leading-input\"\n prevent-auto-close=\"true\"\n color=\"10\"\n dismissible={this.selectedValues.length > 0}\n hidden={this.selectedValues.length <= 0}\n label={`${this.selectedValues.length} ${this.badgeLabel}`}\n aria-label={`Clear all ${this.selectedValues.length} ${this.badgeLabel} items`}\n onCloseClicked={this.handleBadgeCloseSlots}\n ></nv-badge>\n\n {this.isFilterable || this.disabled || this.readonly ? (\n <input\n id={this.inputId}\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.handleInputSlots}\n onFocus={this.handleInputFocusSlots}\n onBlur={this.handleInputBlurSlots}\n onKeyDown={this.handleKeyDown}\n />\n ) : (\n <p\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClickSlots}\n tabIndex={0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocusSlots}\n role=\"combobox\"\n aria-expanded={this.open}\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.togglePopoverSlots}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div\n slot=\"content\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n style={{ 'max-height': this.maxHeight, 'overflow-y': 'auto' }}\n >\n <slot name=\"content\"></slot>\n </div>\n </nv-popover>\n\n {this.renderDescriptions()}\n </Host>\n );\n }\n\n /**\n * Renders description and error description sections\n * @returns {any} The JSX for descriptions\n */\n private renderDescriptions() {\n return [\n (this.description || this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\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 ];\n }\n\n /**\n * Main render method that decides which mode to render\n * @returns {any} The JSX for the component\n */\n render() {\n return this.modeState === 'options'\n ? this.renderOptionsMode()\n : this.renderSlotsMode();\n }\n\n //#endregion REN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AAKM,SACfG,SAAUT,KAAKS,SACfkM,SAAU3M,KAAKQ,SACfoM,QAAS5M,KAAKuE,iBACdsI,QAAS7M,KAAK0E,sBACdoI,OAAQ9M,KAAK2E,qBACboI,UAAW/M,KAAKgK,gBAGlB6B,EAAA,KACEW,GAAIxM,KAAKC,QACTkM,MAAM,sBACNa,QAAShN,KAAK6D,+BACdoJ,SAAU,EACVF,UAAW/M,KAAKgK,cAChB6C,QAAS7M,KAAK0E,sBACdwI,KAAK,WAAU,gBACAlN,KAAKY,MAEpBiL,EAAA,YAAO7L,KAAKgE,OAAShE,KAAK0M,cAI9Bb,EAAA,iBACEM,MAAM,uBACN1E,KAAMzH,KAAKY,KAAO,cAAgB,eAClCuM,KAAK,KACLC,SAAS,QAAO,aACJpN,KAAKY,KAAO,gBAAkB,gBAAe,eAC3CZ,KAAKY,KAAKyM,WACxBL,QAAShN,KAAK8E,sBAIlB+G,EAAA,QAAMpE,KAAK,iBAGboE,EAAA,OACErE,KAAK,UACL0F,KAAK,UAAS,uBACO,OACrBlL,MAAO,CAAE,aAAchC,KAAKG,UAAW,aAAc,SAErD0L,EAAA,QAAMpE,KAAK,cAIdzH,KAAKuN,qB,CASJ,kBAAAA,GACN,MAAO,EACJvN,KAAKsN,aAAetN,KAAK2B,GAAG4B,cAAc,0BACzCsI,EAAA,OAAKM,MAAM,eACTN,EAAA,QAAMpE,KAAK,eAAezH,KAAKsN,eAGlCtN,KAAKyN,kBACJzN,KAAK2B,GAAG4B,cAAc,gCACtBsI,EAAA,OAAKS,QAAStM,KAAKO,MAAO4L,MAAM,qBAC9BN,EAAA,QAAMpE,KAAK,qBAAqBzH,KAAKyN,mB,CAU7C,MAAAC,GACE,OAAO1N,KAAKmB,YAAc,UACtBnB,KAAK4L,oBACL5L,KAAKwN,iB","ignoreList":[]}
|
|
@@ -6,6 +6,9 @@ import { Column } from '../../interfaces/Column';
|
|
|
6
6
|
* @slot before - Use this slot to insert HTML before the data grid.
|
|
7
7
|
* @slot after - Use this slot to insert HTML after the data grid.
|
|
8
8
|
* @slot body - Use this slot to insert HTML into the data grid body.
|
|
9
|
+
*
|
|
10
|
+
* @deprecated [EXPERIMENTAL]
|
|
11
|
+
* @experimental - This component is still under development and is not ready for use.
|
|
9
12
|
*/
|
|
10
13
|
export declare class NvDatagrid {
|
|
11
14
|
el: HTMLNvDatagridElement;
|