@cas-smartdesign/token-selector 1.0.3 → 1.0.4

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.
@@ -96,7 +96,7 @@ const r=class s extends HTMLElement{memoizedTemplate(){const t=this.is();if(s.TE
96
96
  max-width: var(--sd-button-max-icon-size, 32px);
97
97
  }
98
98
  </style>
99
- <img class="icon" />
99
+ <img class="icon" src="data:," alt />
100
100
  <div class="content">
101
101
  <slot></slot>
102
102
  </div>
package/dist/docs/doc.mjs CHANGED
@@ -614,7 +614,7 @@ export function getItems(): ExtendedTokenData[] {
614
614
  ><div class="token-wrapper" slot="prefix"><slot name="items"></slot></div>
615
615
  </sd-lit-input>
616
616
  <slot class="additonal-content" name="additional-content" @focusin=${this.clearCheckedTokens}></slot>
617
- `}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","listbox"),this.setAttribute("aria-multiselectable","true"),!this.hasAttribute("tabIndex")&&!this.disabled&&(this.tabIndex=0),this.addEventListener("focusout",i=>{const s=i.relatedTarget;!this.contains(s)&&!this.shadowRoot.contains(s)&&this.clearCheckedTokens()}),this.addEventListener("focusin",()=>{this.selectionMode=="remove-only"&&this.activeTokenIndex==-1&&this.items.length>0&&!this.disabled&&(this.activeTokenIndex=0)}),new ic(this,()=>this.inputElement?.value,i=>this.selectOrAddItems(i)),new sc(this,i=>this.selectOrAddItems(i))}clearCheckedTokens(){this.querySelectorAll("[slot='items'][aria-checked='true']").forEach(i=>i.checked=!1);const e=this.inputElement;e&&(e.removeAttribute("focus-visible"),e.removeAttribute("focused"))}removeSelectionOrActiveToken(){if(!this.disabled){const e=this.querySelectorAll("[slot='items'][aria-checked='true']");if(e.length>0){const i=Array.from(e);this.removeTokens(i.filter(s=>!s.disabled).map(s=>s.index))}else if(this.activeTokenIndex!=-1){const i=this.activeTokenElement;i&&!i.disabled&&this.removeTokens([i.index])}}}updateActiveToken(e){if(this.disabled)return;const i=this.querySelectorAll("[slot='items']").length-1;if(this.activeTokenIndex==-1?e<0&&(this.activeTokenIndex=i):this.activeTokenIndex==i&&e>0&&this.selectionMode=="multi"?(this.activeTokenIndex=-1,this.focus()):this.activeTokenIndex=Math.max(0,Math.min(i,this.activeTokenIndex+e)),this.activeTokenIndex>-1&&(this.inputElement?.setAttribute("focus-visible",""),this.scrollHeight>this.offsetHeight)){const s=this.activeTokenElement;s.scrollIntoViewIfNeeded?s.scrollIntoViewIfNeeded():s.scrollIntoView()}}commitTokenValue(e){if(this.disabled)return;if(this.tokenSuggestPopover.isOpened){const s=this.tokenSuggestPopover.focusedSuggestToken;if(s){if(!s.disabled){const n=this.findIndex(s);this.handleTokenSelection([n]),this.tokenSuggestPopover.hide()}return}}if(!e?.trim())return;const i=this.items.findIndex(s=>this.caseSensitive?s.caption==e:s.caption.toLowerCase()==e.toLowerCase());this.selectedIndexes.includes(i)||(i>=0?this.handleTokenSelection([i]):this.handleTokenCreation(e)),this.requestUpdate("selectedIndexes"),this.tokenSuggestPopover.hide(),window.removeEventListener("pointerdown",this.handleWindowPointerDown)}updated(e){if(super.updated(e),this._tokenSuggestPopover&&(this.tokenSuggestPopover.list.className=this.suggestListClass||"",this.suggestionFilter&&(this.tokenSuggestPopover.filter=this.suggestionFilter)),e.has("selectionMode"))if(this.selectionMode=="multi"){this.setAttribute("aria-haspopup","listbox");const i=this.inputElement;i.addEventListener("immediate-value-change",s=>this.handleInputValueChange(s)),i.addEventListener("keydown",s=>this.handleInputKeyDown(s,i)),window.queueMicrotask(()=>this.tokenSuggestPopover)}else this.removeAttribute("aria-haspopup"),this.addEventListener("keydown",this.handleKeyDown),this._tokenSuggestPopover&&(this._tokenSuggestPopover.hide(),this._tokenSuggestPopover=null);(e.size==0||e.has("selectionMode")||e.has("items")||e.has("selectedIndexes")||e.has("disabled"))&&this.updateItems(),e.has("inputLabel")&&(this.inputLabel?this.setAttribute("aria-label",this.inputLabel):this.removeAttribute("aria-label"))}handleInputValueChange(e){e.detail.value?(this.activeTokenIndex=-1,this.cancelSearch=!1,this.debouncedShowTokenSuggestPopover(),window.addEventListener("pointerdown",this.handleWindowPointerDown)):(this.tokenSuggestPopover.hide(),this.cancelSearch=!0)}showFilteredTokenSuggestions(){!this.cancelSearch&&this.inputElement.value&&this.tokenSuggestPopover.show()}isTokenNotSelected(e){return!this.selectedIndexes.includes(e)}get tokenSuggestPopover(){return!this._tokenSuggestPopover&&this.inputElement&&(this._tokenSuggestPopover=new Zl(this.inputElement,()=>this.items.filter((e,i)=>!e.disabled&&this.isTokenNotSelected(i)),e=>{const i=this.findIndex(e);this.handleTokenSelection([i]),window.removeEventListener("pointerdown",this.handleWindowPointerDown)},e=>{this.appendChild(e.popover),this.inputElement.setAttribute("aria-controls",e.list.id),this.dispatchEvent(new CustomEvent("auto-suggest-initialized")),e.popover.addEventListener("close",()=>{this.inputElement.value&&!this.contains(document.activeElement)&&(this.inputElement.value="")})}),this._tokenSuggestPopover.list.itemGenerator=this._autoSuggestItemGenerator,this._tokenSuggestPopover.list.className=this.suggestListClass,this.suggestionFilter&&(this._tokenSuggestPopover.filter=this.suggestionFilter)),this._tokenSuggestPopover}updateItems(){if(!this.isConnected||!this.items)return;this.activeTokenIndex=-1;const e=this.inputElement;e&&(!this._tokenSuggestPopover||!this._tokenSuggestPopover.isOpened)&&(e.value=""),this.querySelectorAll("[slot='items']").forEach(n=>{this.removeChild(n)});const i=document.createDocumentFragment();let s=[];this.selectionMode=="remove-only"?s=this.items.map(n=>this.disableIfNeeded(n)):this.selectedIndexes.forEach(n=>{s.push(this.disableIfNeeded(this.items[n]))}),s.forEach(n=>{const r=this.tokenGenerator(n,this.findIndex(n));r.slot="items",i.appendChild(r),r.id||(r.id=window.crypto.getRandomValues(new Uint32Array(1))[0].toString(16)),r.setClickHandler((o,u)=>this.onTokenClick(r,!0,u)),r.addEventListener("click",()=>{this.inputElement?.removeAttribute("focus-visible");const o=window.getSelection();(!o||o.type!="Range")&&document.activeElement!=this&&this.focus()}),r.setDeleteHandler(o=>this.removeTokens([o]))}),this.appendChild(i),this._tokenSuggestPopover&&this._tokenSuggestPopover.refreshItems()}removeTokens(e){if(!(this.disabled||e==null||e.length==0))if(this.activeTokenIndex!=-1&&e.includes(this.activeTokenElement.index)&&(this.activeTokenIndex=-1),this.selectionMode=="remove-only")this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:e}}));else{const i=e.filter(s=>this.selectedIndexes.includes(s));i.length>0&&(this.selectedIndexes=this.selectedIndexes.filter(s=>!i.includes(s)),this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:i,selectedIndices:[...this.selectedIndexes]}})))}}onTokenClick(e,i,s){let n;this.querySelectorAll("[slot='items']").forEach((r,o)=>{e==r?n=o:s||r.setAttribute("aria-checked","false")}),this.activeTokenIndex=n,this.setAttribute("aria-activedescendant",this.activeTokenElement.id),this._tokenSuggestPopover&&this._tokenSuggestPopover.isOpened&&this._tokenSuggestPopover.hide(),s||this.dispatchEvent(new CustomEvent("token-clicked",{detail:{index:e.index,tokenElement:e,byPointerDevice:i}}))}disableIfNeeded(e){return this.disabled?{...e,disabled:!0}:e}handleTokenSelection(e){this.selectedIndexes=this.selectedIndexes.concat(e),this.dispatchEvent(new CustomEvent("tokens-selected",{detail:{newIndices:e,selectedIndices:[...this.selectedIndexes]}}))}handleTokenCreation(e){this.dispatchEvent(new CustomEvent("token-created",{detail:{value:e}}))}get inputElement(){return this.shadowRoot.querySelector(".input")}get activeTokenElement(){return this.getTokenElement(this.activeTokenIndex)}getTokenElement(e){return this.querySelector("[slot='items']:nth-of-type("+(e+1)+")")}findIndex(e){return this.items.findIndex(i=>i.caption===e.caption)}get activeTokenIndex(){return this._activeTokenIndex}set activeTokenIndex(e){if(this._activeTokenIndex!=-1){const i=this.activeTokenElement;i&&(i.current=!1)}if(this._activeTokenIndex=e,e==-1)this.removeAttribute("aria-activedescendant");else{const i=this.activeTokenElement;i.current=!0,this.setAttribute("aria-activedescendant",i.id)}}get hasInputValue(){return!!this.inputElement?.value}},Le.ID="sd-token-selector",Le.ensureDefined=()=>{Ci.ensureDefined(),customElements.get(Le.ID)||customElements.define(Le.ID,Le)},Le.shadowRootOptions={...Ie.shadowRootOptions,delegatesFocus:!0},Le);$e([$({type:String,attribute:"selection-mode",reflect:!0})],Ee.prototype,"selectionMode");$e([$({type:Array,attribute:!1})],Ee.prototype,"items");$e([$({type:Array,attribute:!1})],Ee.prototype,"selectedIndexes");$e([$({type:String,reflect:!0})],Ee.prototype,"placeholder");$e([$({type:String,reflect:!0,attribute:"suggest-list-class"})],Ee.prototype,"suggestListClass");$e([$({type:String,reflect:!0,attribute:"input-label"})],Ee.prototype,"inputLabel");$e([$({converter:{fromAttribute:t=>t=="true",toAttribute:t=>t},reflect:!0,attribute:"aria-disabled"})],Ee.prototype,"disabled");$e([$({type:String,attribute:!0})],Ee.prototype,"validationMessage");$e([$({type:String,attribute:!0})],Ee.prototype,"validationIconSrc");$e([$({converter:fi.levelConverter,attribute:!0,reflect:!0})],Ee.prototype,"validationLevel");$e([$({type:String,reflect:!0,attribute:"token-type"})],Ee.prototype,"tokenType");$e([$({type:Boolean,reflect:!0,attribute:"case-sensitive"})],Ee.prototype,"caseSensitive");let id=Ee;function Or(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ac(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var i=function s(){var n=!1;try{n=this instanceof s}catch{}return n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(i,s,n.get?n:{enumerable:!0,get:function(){return t[s]}})}),i}var di={exports:{}},Ps;function lc(){if(Ps)return di.exports;Ps=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return di.exports=e(),di.exports.createColors=e,di.exports}const cc={},dc=Object.freeze(Object.defineProperty({__proto__:null,default:cc},Symbol.toStringTag,{value:"Module"})),Pe=ac(dc);var Gi,Ms;function Wn(){if(Ms)return Gi;Ms=1;let t=lc(),e=Pe;class i extends Error{constructor(n,r,o,u,p,h){super(n),this.name="CssSyntaxError",this.reason=n,p&&(this.file=p),u&&(this.source=u),h&&(this.plugin=h),typeof r<"u"&&typeof o<"u"&&(typeof r=="number"?(this.line=r,this.column=o):(this.line=r.line,this.column=r.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(n){if(!this.source)return"";let r=this.source;n==null&&(n=t.isColorSupported);let o=l=>l,u=l=>l,p=l=>l;if(n){let{bold:l,gray:f,red:g}=t.createColors(!0);u=v=>l(g(v)),o=v=>f(v),e&&(p=v=>e(v))}let h=r.split(/\r?\n/),a=Math.max(this.line-3,0),d=Math.min(this.line+2,h.length),c=String(d).length;return h.slice(a,d).map((l,f)=>{let g=a+1+f,v=" "+(" "+g).slice(-c)+" | ";if(g===this.line){if(l.length>160){let k=20,w=Math.max(0,this.column-k),y=Math.max(this.column+k,this.endColumn+k),b=l.slice(w,y),E=o(v.replace(/\d/g," "))+l.slice(0,Math.min(this.column-1,k-1)).replace(/[^\t]/g," ");return u(">")+o(v)+p(b)+`
617
+ `}connectedCallback(){super.connectedCallback(),this.updateItemsOnConnect&&(this.updateItemsOnConnect=!1,this.updateItems())}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","listbox"),this.setAttribute("aria-multiselectable","true"),!this.hasAttribute("tabIndex")&&!this.disabled&&(this.tabIndex=0),this.addEventListener("focusout",i=>{const s=i.relatedTarget;!this.contains(s)&&!this.shadowRoot.contains(s)&&this.clearCheckedTokens()}),this.addEventListener("focusin",()=>{this.selectionMode=="remove-only"&&this.activeTokenIndex==-1&&this.items.length>0&&!this.disabled&&(this.activeTokenIndex=0)}),new ic(this,()=>this.inputElement?.value,i=>this.selectOrAddItems(i)),new sc(this,i=>this.selectOrAddItems(i))}clearCheckedTokens(){this.querySelectorAll("[slot='items'][aria-checked='true']").forEach(i=>i.checked=!1);const e=this.inputElement;e&&(e.removeAttribute("focus-visible"),e.removeAttribute("focused"))}removeSelectionOrActiveToken(){if(!this.disabled){const e=this.querySelectorAll("[slot='items'][aria-checked='true']");if(e.length>0){const i=Array.from(e);this.removeTokens(i.filter(s=>!s.disabled).map(s=>s.index))}else if(this.activeTokenIndex!=-1){const i=this.activeTokenElement;i&&!i.disabled&&this.removeTokens([i.index])}}}updateActiveToken(e){if(this.disabled)return;const i=this.querySelectorAll("[slot='items']").length-1;if(this.activeTokenIndex==-1?e<0&&(this.activeTokenIndex=i):this.activeTokenIndex==i&&e>0&&this.selectionMode=="multi"?(this.activeTokenIndex=-1,this.focus()):this.activeTokenIndex=Math.max(0,Math.min(i,this.activeTokenIndex+e)),this.activeTokenIndex>-1&&(this.inputElement?.setAttribute("focus-visible",""),this.scrollHeight>this.offsetHeight)){const s=this.activeTokenElement;s.scrollIntoViewIfNeeded?s.scrollIntoViewIfNeeded():s.scrollIntoView()}}commitTokenValue(e){if(this.disabled)return;if(this.tokenSuggestPopover.isOpened){const s=this.tokenSuggestPopover.focusedSuggestToken;if(s){if(!s.disabled){const n=this.findIndex(s);this.handleTokenSelection([n]),this.tokenSuggestPopover.hide()}return}}if(!e?.trim())return;const i=this.items.findIndex(s=>this.caseSensitive?s.caption==e:s.caption.toLowerCase()==e.toLowerCase());this.selectedIndexes.includes(i)||(i>=0?this.handleTokenSelection([i]):this.handleTokenCreation(e)),this.requestUpdate("selectedIndexes"),this.tokenSuggestPopover.hide(),window.removeEventListener("pointerdown",this.handleWindowPointerDown)}updated(e){if(super.updated(e),this._tokenSuggestPopover&&(this.tokenSuggestPopover.list.className=this.suggestListClass||"",this.suggestionFilter&&(this.tokenSuggestPopover.filter=this.suggestionFilter)),e.has("selectionMode"))if(this.selectionMode=="multi"){this.setAttribute("aria-haspopup","listbox");const i=this.inputElement;i.addEventListener("immediate-value-change",s=>this.handleInputValueChange(s)),i.addEventListener("keydown",s=>this.handleInputKeyDown(s,i)),window.queueMicrotask(()=>this.tokenSuggestPopover)}else this.removeAttribute("aria-haspopup"),this.addEventListener("keydown",this.handleKeyDown),this._tokenSuggestPopover&&(this._tokenSuggestPopover.hide(),this._tokenSuggestPopover=null);(e.size==0||e.has("selectionMode")||e.has("items")||e.has("selectedIndexes")||e.has("disabled"))&&this.updateItems(),e.has("inputLabel")&&(this.inputLabel?this.setAttribute("aria-label",this.inputLabel):this.removeAttribute("aria-label"))}handleInputValueChange(e){e.detail.value?(this.activeTokenIndex=-1,this.cancelSearch=!1,this.debouncedShowTokenSuggestPopover(),window.addEventListener("pointerdown",this.handleWindowPointerDown)):(this.tokenSuggestPopover.hide(),this.cancelSearch=!0)}showFilteredTokenSuggestions(){!this.cancelSearch&&this.inputElement.value&&this.tokenSuggestPopover.show()}isTokenNotSelected(e){return!this.selectedIndexes.includes(e)}get tokenSuggestPopover(){return!this._tokenSuggestPopover&&this.inputElement&&(this._tokenSuggestPopover=new Zl(this.inputElement,()=>this.items.filter((e,i)=>!e.disabled&&this.isTokenNotSelected(i)),e=>{const i=this.findIndex(e);this.handleTokenSelection([i]),window.removeEventListener("pointerdown",this.handleWindowPointerDown)},e=>{this.appendChild(e.popover),this.inputElement.setAttribute("aria-controls",e.list.id),this.dispatchEvent(new CustomEvent("auto-suggest-initialized")),e.popover.addEventListener("close",()=>{this.inputElement.value&&!this.contains(document.activeElement)&&(this.inputElement.value="")})}),this._tokenSuggestPopover.list.itemGenerator=this._autoSuggestItemGenerator,this._tokenSuggestPopover.list.className=this.suggestListClass,this.suggestionFilter&&(this._tokenSuggestPopover.filter=this.suggestionFilter)),this._tokenSuggestPopover}updateItems(){if(!this.items)return;if(!this.isConnected){this.updateItemsOnConnect=!0;return}this.activeTokenIndex=-1;const e=this.inputElement;e&&(!this._tokenSuggestPopover||!this._tokenSuggestPopover.isOpened)&&(e.value=""),this.querySelectorAll("[slot='items']").forEach(n=>{this.removeChild(n)});const i=document.createDocumentFragment();let s=[];this.selectionMode=="remove-only"?s=this.items.map(n=>this.disableIfNeeded(n)):this.selectedIndexes.forEach(n=>{s.push(this.disableIfNeeded(this.items[n]))}),s.forEach(n=>{const r=this.tokenGenerator(n,this.findIndex(n));r.slot="items",i.appendChild(r),r.id||(r.id=window.crypto.getRandomValues(new Uint32Array(1))[0].toString(16)),r.setClickHandler((o,u)=>this.onTokenClick(r,!0,u)),r.addEventListener("click",()=>{this.inputElement?.removeAttribute("focus-visible");const o=window.getSelection();(!o||o.type!="Range")&&document.activeElement!=this&&this.focus()}),r.setDeleteHandler(o=>this.removeTokens([o]))}),this.appendChild(i),this._tokenSuggestPopover&&this._tokenSuggestPopover.refreshItems()}removeTokens(e){if(!(this.disabled||e==null||e.length==0))if(this.activeTokenIndex!=-1&&e.includes(this.activeTokenElement.index)&&(this.activeTokenIndex=-1),this.selectionMode=="remove-only")this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:e}}));else{const i=e.filter(s=>this.selectedIndexes.includes(s));i.length>0&&(this.selectedIndexes=this.selectedIndexes.filter(s=>!i.includes(s)),this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:i,selectedIndices:[...this.selectedIndexes]}})))}}onTokenClick(e,i,s){let n;this.querySelectorAll("[slot='items']").forEach((r,o)=>{e==r?n=o:s||r.setAttribute("aria-checked","false")}),this.activeTokenIndex=n,this.setAttribute("aria-activedescendant",this.activeTokenElement.id),this._tokenSuggestPopover&&this._tokenSuggestPopover.isOpened&&this._tokenSuggestPopover.hide(),s||this.dispatchEvent(new CustomEvent("token-clicked",{detail:{index:e.index,tokenElement:e,byPointerDevice:i}}))}disableIfNeeded(e){return this.disabled?{...e,disabled:!0}:e}handleTokenSelection(e){this.selectedIndexes=this.selectedIndexes.concat(e),this.dispatchEvent(new CustomEvent("tokens-selected",{detail:{newIndices:e,selectedIndices:[...this.selectedIndexes]}}))}handleTokenCreation(e){this.dispatchEvent(new CustomEvent("token-created",{detail:{value:e}}))}get inputElement(){return this.shadowRoot.querySelector(".input")}get activeTokenElement(){return this.getTokenElement(this.activeTokenIndex)}getTokenElement(e){return this.querySelector("[slot='items']:nth-of-type("+(e+1)+")")}findIndex(e){return this.items.findIndex(i=>i.caption===e.caption)}get activeTokenIndex(){return this._activeTokenIndex}set activeTokenIndex(e){if(this._activeTokenIndex!=-1){const i=this.activeTokenElement;i&&(i.current=!1)}if(this._activeTokenIndex=e,e==-1)this.removeAttribute("aria-activedescendant");else{const i=this.activeTokenElement;i.current=!0,this.setAttribute("aria-activedescendant",i.id)}}get hasInputValue(){return!!this.inputElement?.value}},Le.ID="sd-token-selector",Le.ensureDefined=()=>{Ci.ensureDefined(),customElements.get(Le.ID)||customElements.define(Le.ID,Le)},Le.shadowRootOptions={...Ie.shadowRootOptions,delegatesFocus:!0},Le);$e([$({type:String,attribute:"selection-mode",reflect:!0})],Ee.prototype,"selectionMode");$e([$({type:Array,attribute:!1})],Ee.prototype,"items");$e([$({type:Array,attribute:!1})],Ee.prototype,"selectedIndexes");$e([$({type:String,reflect:!0})],Ee.prototype,"placeholder");$e([$({type:String,reflect:!0,attribute:"suggest-list-class"})],Ee.prototype,"suggestListClass");$e([$({type:String,reflect:!0,attribute:"input-label"})],Ee.prototype,"inputLabel");$e([$({converter:{fromAttribute:t=>t=="true",toAttribute:t=>t},reflect:!0,attribute:"aria-disabled"})],Ee.prototype,"disabled");$e([$({type:String,attribute:!0})],Ee.prototype,"validationMessage");$e([$({type:String,attribute:!0})],Ee.prototype,"validationIconSrc");$e([$({converter:fi.levelConverter,attribute:!0,reflect:!0})],Ee.prototype,"validationLevel");$e([$({type:String,reflect:!0,attribute:"token-type"})],Ee.prototype,"tokenType");$e([$({type:Boolean,reflect:!0,attribute:"case-sensitive"})],Ee.prototype,"caseSensitive");let id=Ee;function Or(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ac(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var i=function s(){var n=!1;try{n=this instanceof s}catch{}return n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(i,s,n.get?n:{enumerable:!0,get:function(){return t[s]}})}),i}var di={exports:{}},Ps;function lc(){if(Ps)return di.exports;Ps=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return di.exports=e(),di.exports.createColors=e,di.exports}const cc={},dc=Object.freeze(Object.defineProperty({__proto__:null,default:cc},Symbol.toStringTag,{value:"Module"})),Pe=ac(dc);var Gi,Ms;function Wn(){if(Ms)return Gi;Ms=1;let t=lc(),e=Pe;class i extends Error{constructor(n,r,o,u,p,h){super(n),this.name="CssSyntaxError",this.reason=n,p&&(this.file=p),u&&(this.source=u),h&&(this.plugin=h),typeof r<"u"&&typeof o<"u"&&(typeof r=="number"?(this.line=r,this.column=o):(this.line=r.line,this.column=r.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(n){if(!this.source)return"";let r=this.source;n==null&&(n=t.isColorSupported);let o=l=>l,u=l=>l,p=l=>l;if(n){let{bold:l,gray:f,red:g}=t.createColors(!0);u=v=>l(g(v)),o=v=>f(v),e&&(p=v=>e(v))}let h=r.split(/\r?\n/),a=Math.max(this.line-3,0),d=Math.min(this.line+2,h.length),c=String(d).length;return h.slice(a,d).map((l,f)=>{let g=a+1+f,v=" "+(" "+g).slice(-c)+" | ";if(g===this.line){if(l.length>160){let k=20,w=Math.max(0,this.column-k),y=Math.max(this.column+k,this.endColumn+k),b=l.slice(w,y),E=o(v.replace(/\d/g," "))+l.slice(0,Math.min(this.column-1,k-1)).replace(/[^\t]/g," ");return u(">")+o(v)+p(b)+`
618
618
  `+E+u("^")}let x=o(v.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+o(v)+p(l)+`
619
619
  `+x+u("^")}return" "+o(v)+p(l)}).join(`
620
620
  `)}toString(){let n=this.showSourceCode();return n&&(n=`
@@ -155,7 +155,7 @@ var window;(window||={})["@cas-smartdesign/token-selector"]=(()=>{var ii=Object.
155
155
  ><div class="token-wrapper" slot="prefix"><slot name="items"></slot></div>
156
156
  </sd-lit-input>
157
157
  <slot class="additonal-content" name="additional-content" @focusin=${this.clearCheckedTokens}></slot>
158
- `}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","listbox"),this.setAttribute("aria-multiselectable","true"),!this.hasAttribute("tabIndex")&&!this.disabled&&(this.tabIndex=0),this.addEventListener("focusout",t=>{let i=t.relatedTarget;!this.contains(i)&&!this.shadowRoot.contains(i)&&this.clearCheckedTokens()}),this.addEventListener("focusin",()=>{this.selectionMode=="remove-only"&&this.activeTokenIndex==-1&&this.items.length>0&&!this.disabled&&(this.activeTokenIndex=0)}),new Li(this,()=>this.inputElement?.value,t=>this.selectOrAddItems(t)),new Pi(this,t=>this.selectOrAddItems(t))}clearCheckedTokens(){this.querySelectorAll("[slot='items'][aria-checked='true']").forEach(t=>t.checked=!1);let e=this.inputElement;e&&(e.removeAttribute("focus-visible"),e.removeAttribute("focused"))}removeSelectionOrActiveToken(){if(!this.disabled){let e=this.querySelectorAll("[slot='items'][aria-checked='true']");if(e.length>0){let t=Array.from(e);this.removeTokens(t.filter(i=>!i.disabled).map(i=>i.index))}else if(this.activeTokenIndex!=-1){let t=this.activeTokenElement;t&&!t.disabled&&this.removeTokens([t.index])}}}updateActiveToken(e){if(this.disabled)return;let t=this.querySelectorAll("[slot='items']").length-1;if(this.activeTokenIndex==-1?e<0&&(this.activeTokenIndex=t):this.activeTokenIndex==t&&e>0&&this.selectionMode=="multi"?(this.activeTokenIndex=-1,this.focus()):this.activeTokenIndex=Math.max(0,Math.min(t,this.activeTokenIndex+e)),this.activeTokenIndex>-1&&(this.inputElement?.setAttribute("focus-visible",""),this.scrollHeight>this.offsetHeight)){let i=this.activeTokenElement;i.scrollIntoViewIfNeeded?i.scrollIntoViewIfNeeded():i.scrollIntoView()}}commitTokenValue(e){if(this.disabled)return;if(this.tokenSuggestPopover.isOpened){let i=this.tokenSuggestPopover.focusedSuggestToken;if(i){if(!i.disabled){let s=this.findIndex(i);this.handleTokenSelection([s]),this.tokenSuggestPopover.hide()}return}}if(!e?.trim())return;let t=this.items.findIndex(i=>this.caseSensitive?i.caption==e:i.caption.toLowerCase()==e.toLowerCase());this.selectedIndexes.includes(t)||(t>=0?this.handleTokenSelection([t]):this.handleTokenCreation(e)),this.requestUpdate("selectedIndexes"),this.tokenSuggestPopover.hide(),window.removeEventListener("pointerdown",this.handleWindowPointerDown)}updated(e){if(super.updated(e),this._tokenSuggestPopover&&(this.tokenSuggestPopover.list.className=this.suggestListClass||"",this.suggestionFilter&&(this.tokenSuggestPopover.filter=this.suggestionFilter)),e.has("selectionMode"))if(this.selectionMode=="multi"){this.setAttribute("aria-haspopup","listbox");let t=this.inputElement;t.addEventListener("immediate-value-change",i=>this.handleInputValueChange(i)),t.addEventListener("keydown",i=>this.handleInputKeyDown(i,t)),window.queueMicrotask(()=>this.tokenSuggestPopover)}else this.removeAttribute("aria-haspopup"),this.addEventListener("keydown",this.handleKeyDown),this._tokenSuggestPopover&&(this._tokenSuggestPopover.hide(),this._tokenSuggestPopover=null);(e.size==0||e.has("selectionMode")||e.has("items")||e.has("selectedIndexes")||e.has("disabled"))&&this.updateItems(),e.has("inputLabel")&&(this.inputLabel?this.setAttribute("aria-label",this.inputLabel):this.removeAttribute("aria-label"))}handleInputValueChange(e){e.detail.value?(this.activeTokenIndex=-1,this.cancelSearch=!1,this.debouncedShowTokenSuggestPopover(),window.addEventListener("pointerdown",this.handleWindowPointerDown)):(this.tokenSuggestPopover.hide(),this.cancelSearch=!0)}showFilteredTokenSuggestions(){!this.cancelSearch&&this.inputElement.value&&this.tokenSuggestPopover.show()}isTokenNotSelected(e){return!this.selectedIndexes.includes(e)}get tokenSuggestPopover(){return!this._tokenSuggestPopover&&this.inputElement&&(this._tokenSuggestPopover=new Ti(this.inputElement,()=>this.items.filter((e,t)=>!e.disabled&&this.isTokenNotSelected(t)),e=>{let t=this.findIndex(e);this.handleTokenSelection([t]),window.removeEventListener("pointerdown",this.handleWindowPointerDown)},e=>{this.appendChild(e.popover),this.inputElement.setAttribute("aria-controls",e.list.id),this.dispatchEvent(new CustomEvent("auto-suggest-initialized")),e.popover.addEventListener("close",()=>{this.inputElement.value&&!this.contains(document.activeElement)&&(this.inputElement.value="")})}),this._tokenSuggestPopover.list.itemGenerator=this._autoSuggestItemGenerator,this._tokenSuggestPopover.list.className=this.suggestListClass,this.suggestionFilter&&(this._tokenSuggestPopover.filter=this.suggestionFilter)),this._tokenSuggestPopover}updateItems(){if(!this.isConnected||!this.items)return;this.activeTokenIndex=-1;let e=this.inputElement;e&&(!this._tokenSuggestPopover||!this._tokenSuggestPopover.isOpened)&&(e.value=""),this.querySelectorAll("[slot='items']").forEach(s=>{this.removeChild(s)});let t=document.createDocumentFragment(),i=[];this.selectionMode=="remove-only"?i=this.items.map(s=>this.disableIfNeeded(s)):this.selectedIndexes.forEach(s=>{i.push(this.disableIfNeeded(this.items[s]))}),i.forEach(s=>{let o=this.tokenGenerator(s,this.findIndex(s));o.slot="items",t.appendChild(o),o.id||(o.id=window.crypto.getRandomValues(new Uint32Array(1))[0].toString(16)),o.setClickHandler((r,n)=>this.onTokenClick(o,!0,n)),o.addEventListener("click",()=>{this.inputElement?.removeAttribute("focus-visible");let r=window.getSelection();(!r||r.type!="Range")&&document.activeElement!=this&&this.focus()}),o.setDeleteHandler(r=>this.removeTokens([r]))}),this.appendChild(t),this._tokenSuggestPopover&&this._tokenSuggestPopover.refreshItems()}removeTokens(e){if(!(this.disabled||e==null||e.length==0))if(this.activeTokenIndex!=-1&&e.includes(this.activeTokenElement.index)&&(this.activeTokenIndex=-1),this.selectionMode=="remove-only")this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:e}}));else{let t=e.filter(i=>this.selectedIndexes.includes(i));t.length>0&&(this.selectedIndexes=this.selectedIndexes.filter(i=>!t.includes(i)),this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:t,selectedIndices:[...this.selectedIndexes]}})))}}onTokenClick(e,t,i){let s;this.querySelectorAll("[slot='items']").forEach((o,r)=>{e==o?s=r:i||o.setAttribute("aria-checked","false")}),this.activeTokenIndex=s,this.setAttribute("aria-activedescendant",this.activeTokenElement.id),this._tokenSuggestPopover&&this._tokenSuggestPopover.isOpened&&this._tokenSuggestPopover.hide(),i||this.dispatchEvent(new CustomEvent("token-clicked",{detail:{index:e.index,tokenElement:e,byPointerDevice:t}}))}disableIfNeeded(e){return this.disabled?{...e,disabled:!0}:e}handleTokenSelection(e){this.selectedIndexes=this.selectedIndexes.concat(e),this.dispatchEvent(new CustomEvent("tokens-selected",{detail:{newIndices:e,selectedIndices:[...this.selectedIndexes]}}))}handleTokenCreation(e){this.dispatchEvent(new CustomEvent("token-created",{detail:{value:e}}))}get inputElement(){return this.shadowRoot.querySelector(".input")}get activeTokenElement(){return this.getTokenElement(this.activeTokenIndex)}getTokenElement(e){return this.querySelector("[slot='items']:nth-of-type("+(e+1)+")")}findIndex(e){return this.items.findIndex(t=>t.caption===e.caption)}get activeTokenIndex(){return this._activeTokenIndex}set activeTokenIndex(e){if(this._activeTokenIndex!=-1){let t=this.activeTokenElement;t&&(t.current=!1)}if(this._activeTokenIndex=e,e==-1)this.removeAttribute("aria-activedescendant");else{let t=this.activeTokenElement;t.current=!0,this.setAttribute("aria-activedescendant",t.id)}}get hasInputValue(){return!!this.inputElement?.value}},wt.ID="sd-token-selector",wt.ensureDefined=()=>{Je.ensureDefined(),customElements.get(wt.ID)||customElements.define(wt.ID,wt)},wt.shadowRootOptions={...D.shadowRootOptions,delegatesFocus:!0},wt);tt([h({type:String,attribute:"selection-mode",reflect:!0})],Y.prototype,"selectionMode");tt([h({type:Array,attribute:!1})],Y.prototype,"items");tt([h({type:Array,attribute:!1})],Y.prototype,"selectedIndexes");tt([h({type:String,reflect:!0})],Y.prototype,"placeholder");tt([h({type:String,reflect:!0,attribute:"suggest-list-class"})],Y.prototype,"suggestListClass");tt([h({type:String,reflect:!0,attribute:"input-label"})],Y.prototype,"inputLabel");tt([h({converter:{fromAttribute:e=>e=="true",toAttribute:e=>e},reflect:!0,attribute:"aria-disabled"})],Y.prototype,"disabled");tt([h({type:String,attribute:!0})],Y.prototype,"validationMessage");tt([h({type:String,attribute:!0})],Y.prototype,"validationIconSrc");tt([h({converter:he.levelConverter,attribute:!0,reflect:!0})],Y.prototype,"validationLevel");tt([h({type:String,reflect:!0,attribute:"token-type"})],Y.prototype,"tokenType");tt([h({type:Boolean,reflect:!0,attribute:"case-sensitive"})],Y.prototype,"caseSensitive");var br=Y;return Gs(yr);})();
158
+ `}connectedCallback(){super.connectedCallback(),this.updateItemsOnConnect&&(this.updateItemsOnConnect=!1,this.updateItems())}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","listbox"),this.setAttribute("aria-multiselectable","true"),!this.hasAttribute("tabIndex")&&!this.disabled&&(this.tabIndex=0),this.addEventListener("focusout",t=>{let i=t.relatedTarget;!this.contains(i)&&!this.shadowRoot.contains(i)&&this.clearCheckedTokens()}),this.addEventListener("focusin",()=>{this.selectionMode=="remove-only"&&this.activeTokenIndex==-1&&this.items.length>0&&!this.disabled&&(this.activeTokenIndex=0)}),new Li(this,()=>this.inputElement?.value,t=>this.selectOrAddItems(t)),new Pi(this,t=>this.selectOrAddItems(t))}clearCheckedTokens(){this.querySelectorAll("[slot='items'][aria-checked='true']").forEach(t=>t.checked=!1);let e=this.inputElement;e&&(e.removeAttribute("focus-visible"),e.removeAttribute("focused"))}removeSelectionOrActiveToken(){if(!this.disabled){let e=this.querySelectorAll("[slot='items'][aria-checked='true']");if(e.length>0){let t=Array.from(e);this.removeTokens(t.filter(i=>!i.disabled).map(i=>i.index))}else if(this.activeTokenIndex!=-1){let t=this.activeTokenElement;t&&!t.disabled&&this.removeTokens([t.index])}}}updateActiveToken(e){if(this.disabled)return;let t=this.querySelectorAll("[slot='items']").length-1;if(this.activeTokenIndex==-1?e<0&&(this.activeTokenIndex=t):this.activeTokenIndex==t&&e>0&&this.selectionMode=="multi"?(this.activeTokenIndex=-1,this.focus()):this.activeTokenIndex=Math.max(0,Math.min(t,this.activeTokenIndex+e)),this.activeTokenIndex>-1&&(this.inputElement?.setAttribute("focus-visible",""),this.scrollHeight>this.offsetHeight)){let i=this.activeTokenElement;i.scrollIntoViewIfNeeded?i.scrollIntoViewIfNeeded():i.scrollIntoView()}}commitTokenValue(e){if(this.disabled)return;if(this.tokenSuggestPopover.isOpened){let i=this.tokenSuggestPopover.focusedSuggestToken;if(i){if(!i.disabled){let s=this.findIndex(i);this.handleTokenSelection([s]),this.tokenSuggestPopover.hide()}return}}if(!e?.trim())return;let t=this.items.findIndex(i=>this.caseSensitive?i.caption==e:i.caption.toLowerCase()==e.toLowerCase());this.selectedIndexes.includes(t)||(t>=0?this.handleTokenSelection([t]):this.handleTokenCreation(e)),this.requestUpdate("selectedIndexes"),this.tokenSuggestPopover.hide(),window.removeEventListener("pointerdown",this.handleWindowPointerDown)}updated(e){if(super.updated(e),this._tokenSuggestPopover&&(this.tokenSuggestPopover.list.className=this.suggestListClass||"",this.suggestionFilter&&(this.tokenSuggestPopover.filter=this.suggestionFilter)),e.has("selectionMode"))if(this.selectionMode=="multi"){this.setAttribute("aria-haspopup","listbox");let t=this.inputElement;t.addEventListener("immediate-value-change",i=>this.handleInputValueChange(i)),t.addEventListener("keydown",i=>this.handleInputKeyDown(i,t)),window.queueMicrotask(()=>this.tokenSuggestPopover)}else this.removeAttribute("aria-haspopup"),this.addEventListener("keydown",this.handleKeyDown),this._tokenSuggestPopover&&(this._tokenSuggestPopover.hide(),this._tokenSuggestPopover=null);(e.size==0||e.has("selectionMode")||e.has("items")||e.has("selectedIndexes")||e.has("disabled"))&&this.updateItems(),e.has("inputLabel")&&(this.inputLabel?this.setAttribute("aria-label",this.inputLabel):this.removeAttribute("aria-label"))}handleInputValueChange(e){e.detail.value?(this.activeTokenIndex=-1,this.cancelSearch=!1,this.debouncedShowTokenSuggestPopover(),window.addEventListener("pointerdown",this.handleWindowPointerDown)):(this.tokenSuggestPopover.hide(),this.cancelSearch=!0)}showFilteredTokenSuggestions(){!this.cancelSearch&&this.inputElement.value&&this.tokenSuggestPopover.show()}isTokenNotSelected(e){return!this.selectedIndexes.includes(e)}get tokenSuggestPopover(){return!this._tokenSuggestPopover&&this.inputElement&&(this._tokenSuggestPopover=new Ti(this.inputElement,()=>this.items.filter((e,t)=>!e.disabled&&this.isTokenNotSelected(t)),e=>{let t=this.findIndex(e);this.handleTokenSelection([t]),window.removeEventListener("pointerdown",this.handleWindowPointerDown)},e=>{this.appendChild(e.popover),this.inputElement.setAttribute("aria-controls",e.list.id),this.dispatchEvent(new CustomEvent("auto-suggest-initialized")),e.popover.addEventListener("close",()=>{this.inputElement.value&&!this.contains(document.activeElement)&&(this.inputElement.value="")})}),this._tokenSuggestPopover.list.itemGenerator=this._autoSuggestItemGenerator,this._tokenSuggestPopover.list.className=this.suggestListClass,this.suggestionFilter&&(this._tokenSuggestPopover.filter=this.suggestionFilter)),this._tokenSuggestPopover}updateItems(){if(!this.items)return;if(!this.isConnected){this.updateItemsOnConnect=!0;return}this.activeTokenIndex=-1;let e=this.inputElement;e&&(!this._tokenSuggestPopover||!this._tokenSuggestPopover.isOpened)&&(e.value=""),this.querySelectorAll("[slot='items']").forEach(s=>{this.removeChild(s)});let t=document.createDocumentFragment(),i=[];this.selectionMode=="remove-only"?i=this.items.map(s=>this.disableIfNeeded(s)):this.selectedIndexes.forEach(s=>{i.push(this.disableIfNeeded(this.items[s]))}),i.forEach(s=>{let o=this.tokenGenerator(s,this.findIndex(s));o.slot="items",t.appendChild(o),o.id||(o.id=window.crypto.getRandomValues(new Uint32Array(1))[0].toString(16)),o.setClickHandler((r,n)=>this.onTokenClick(o,!0,n)),o.addEventListener("click",()=>{this.inputElement?.removeAttribute("focus-visible");let r=window.getSelection();(!r||r.type!="Range")&&document.activeElement!=this&&this.focus()}),o.setDeleteHandler(r=>this.removeTokens([r]))}),this.appendChild(t),this._tokenSuggestPopover&&this._tokenSuggestPopover.refreshItems()}removeTokens(e){if(!(this.disabled||e==null||e.length==0))if(this.activeTokenIndex!=-1&&e.includes(this.activeTokenElement.index)&&(this.activeTokenIndex=-1),this.selectionMode=="remove-only")this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:e}}));else{let t=e.filter(i=>this.selectedIndexes.includes(i));t.length>0&&(this.selectedIndexes=this.selectedIndexes.filter(i=>!t.includes(i)),this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:t,selectedIndices:[...this.selectedIndexes]}})))}}onTokenClick(e,t,i){let s;this.querySelectorAll("[slot='items']").forEach((o,r)=>{e==o?s=r:i||o.setAttribute("aria-checked","false")}),this.activeTokenIndex=s,this.setAttribute("aria-activedescendant",this.activeTokenElement.id),this._tokenSuggestPopover&&this._tokenSuggestPopover.isOpened&&this._tokenSuggestPopover.hide(),i||this.dispatchEvent(new CustomEvent("token-clicked",{detail:{index:e.index,tokenElement:e,byPointerDevice:t}}))}disableIfNeeded(e){return this.disabled?{...e,disabled:!0}:e}handleTokenSelection(e){this.selectedIndexes=this.selectedIndexes.concat(e),this.dispatchEvent(new CustomEvent("tokens-selected",{detail:{newIndices:e,selectedIndices:[...this.selectedIndexes]}}))}handleTokenCreation(e){this.dispatchEvent(new CustomEvent("token-created",{detail:{value:e}}))}get inputElement(){return this.shadowRoot.querySelector(".input")}get activeTokenElement(){return this.getTokenElement(this.activeTokenIndex)}getTokenElement(e){return this.querySelector("[slot='items']:nth-of-type("+(e+1)+")")}findIndex(e){return this.items.findIndex(t=>t.caption===e.caption)}get activeTokenIndex(){return this._activeTokenIndex}set activeTokenIndex(e){if(this._activeTokenIndex!=-1){let t=this.activeTokenElement;t&&(t.current=!1)}if(this._activeTokenIndex=e,e==-1)this.removeAttribute("aria-activedescendant");else{let t=this.activeTokenElement;t.current=!0,this.setAttribute("aria-activedescendant",t.id)}}get hasInputValue(){return!!this.inputElement?.value}},wt.ID="sd-token-selector",wt.ensureDefined=()=>{Je.ensureDefined(),customElements.get(wt.ID)||customElements.define(wt.ID,wt)},wt.shadowRootOptions={...D.shadowRootOptions,delegatesFocus:!0},wt);tt([h({type:String,attribute:"selection-mode",reflect:!0})],Y.prototype,"selectionMode");tt([h({type:Array,attribute:!1})],Y.prototype,"items");tt([h({type:Array,attribute:!1})],Y.prototype,"selectedIndexes");tt([h({type:String,reflect:!0})],Y.prototype,"placeholder");tt([h({type:String,reflect:!0,attribute:"suggest-list-class"})],Y.prototype,"suggestListClass");tt([h({type:String,reflect:!0,attribute:"input-label"})],Y.prototype,"inputLabel");tt([h({converter:{fromAttribute:e=>e=="true",toAttribute:e=>e},reflect:!0,attribute:"aria-disabled"})],Y.prototype,"disabled");tt([h({type:String,attribute:!0})],Y.prototype,"validationMessage");tt([h({type:String,attribute:!0})],Y.prototype,"validationIconSrc");tt([h({converter:he.levelConverter,attribute:!0,reflect:!0})],Y.prototype,"validationLevel");tt([h({type:String,reflect:!0,attribute:"token-type"})],Y.prototype,"tokenType");tt([h({type:Boolean,reflect:!0,attribute:"case-sensitive"})],Y.prototype,"caseSensitive");var br=Y;return Gs(yr);})();
159
159
  /*! Bundled license information:
160
160
 
161
161
  @lit/reactive-element/css-tag.js: