@kyndryl-design-system/shidoka-applications 2.110.0 → 2.111.0

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.
@@ -66,6 +66,8 @@ export declare class Dropdown extends Dropdown_base {
66
66
  accessor disabled: boolean;
67
67
  /** Hide the tags below multi-select. */
68
68
  accessor hideTags: boolean;
69
+ /** Maximum number of selected tags to display before showing a "Show all" toggle. Set to `0` to disable limiting. */
70
+ accessor limitCount: number;
69
71
  /** Adds a "Select all" option to the top of a multi-select dropdown. */
70
72
  accessor selectAll: boolean;
71
73
  /** "Select all" text customization. */
@@ -94,6 +96,8 @@ export declare class Dropdown extends Dropdown_base {
94
96
  add: string;
95
97
  duplicateOption: string;
96
98
  addOptionInvalid: string;
99
+ showAll: string;
100
+ showLess: string;
97
101
  warning: string;
98
102
  };
99
103
  /** Enables the "Add New Option" feature. */
@@ -132,6 +136,8 @@ export declare class Dropdown extends Dropdown_base {
132
136
  add: string;
133
137
  duplicateOption: string;
134
138
  addOptionInvalid: string;
139
+ showAll: string;
140
+ showLess: string;
135
141
  warning: string;
136
142
  };
137
143
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/dropdown/dropdown.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAmB,MAAM,KAAK,CAAC;AAkBlE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,QAAQ,CAAC;AAChB,OAAO,WAAW,CAAC;AACnB,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;;AAqBlE;;;;;;;;;;;;;;;GAeG;AACH,qBACa,QAAS,SAAQ,aAAqB;IACjD,OAAgB,MAAM,0BAA2B;IAEjD,kBAAkB;IAElB,QAAQ,CAA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CAAC,sBAAsB;IAO9B;;OAEG;IACH,OAAO,KAAK,uBAAuB,GAElC;IAED,OAAO,CAAC,uBAAuB;YAcjB,kBAAkB;IA4ChC,OAAO,CAAC,yBAAyB;IASjC,OAAO,CAAC,0BAA0B;IAgBzB,iBAAiB;IAYjB,oBAAoB;IAa7B;;OAEG;IACH,OAAO,KAAK,UAAU,GAErB;IAED,OAAO,CAAC,WAAW;IAgCnB,OAAO,CAAC,SAAS;IA8BjB,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,WAAW;IASV,UAAU,CAAC,YAAY,EAAE,GAAG;IAM5B,OAAO,CAAC,YAAY,EAAE,cAAc;IAuH7C;;OAEG;IACH,OAAO,KAAK,SAAS,GAEpB;IAGD,OAAO,CAAC,WAAW;IA8BnB,OAAO,CAAC,cAAc;IAoBtB;;OAEG;IACH,OAAO,CAAC,gBAAgB,CAwCtB;IAEF,cAAc;IACd,OAAO,CAAC,qBAAqB,CAiC3B;IAEF,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,mBAAmB;CAoB5B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,QAAQ,CAAC;KAC1B;CACF"}
@@ -947,7 +947,7 @@ slot[name=add-option-button]::slotted(*) {
947
947
  height: 20px;
948
948
  min-height: 20px;
949
949
  padding: 2px;
950
- }`;const z={title:"Dropdown",selectedOptions:"List of selected options",requiredText:"Required",errorText:"Error",clearAll:"Clear all",clear:"Clear",addItem:"Add item...",add:"Add",duplicateOption:"Duplicate option. Please select a unique option.",addOptionInvalid:"Please check this value and try again.",warning:"Warning"};let C=(()=>{var o,C,I,M,P,D,W,N,V,B,L,q,j,R,U,F,K,Y,H,X,G,J,Q,Z,tt,et,it,st,lt,nt,ot,at,dt,rt,ht,ct,pt,ut,vt,mt,gt,ft,xt,bt,kt,yt;let wt,_t,Ot,St,At,Et,Tt,$t,zt,Ct,It,Mt,Pt,Dt,Wt,Nt,Vt,Bt,Lt,qt,jt,Rt,Ut,Ft,Kt,Yt,Ht,Xt,Gt,Jt,Qt,Zt,te,ee,ie,se,le,ne,oe,ae,de,re,he,ce,pe,ue,ve,me,ge=[c("kyn-dropdown")],fe=[],xe=_(a),be=[],ke=[],ye=[],we=[],_e=[],Oe=[],Se=[],Ae=[],Ee=[],Te=[],$e=[],ze=[],Ce=[],Ie=[],Me=[],Pe=[],De=[],We=[],Ne=[],Ve=[],Be=[],Le=[],qe=[],je=[],Re=[],Ue=[],Fe=[],Ke=[],Ye=[],He=[],Xe=[],Ge=[],Je=[],Qe=[],Ze=[],ti=[],ei=[],ii=[],si=[],li=[],ni=[],oi=[],ai=[],di=[],ri=[],hi=[],ci=[],pi=[],ui=[],vi=[],mi=[],gi=[],fi=[],xi=[],bi=[],ki=[],yi=[],wi=[],_i=[],Oi=[],Si=[],Ai=[],Ei=[],Ti=[],$i=[],zi=[],Ci=[],Ii=[],Mi=[],Pi=[],Di=[],Wi=[],Ni=[],Vi=[],Bi=[],Li=[],qi=[],ji=[],Ri=[],Ui=[],Fi=[],Ki=[],Yi=[],Hi=[],Xi=[],Gi=[],Ji=[],Qi=[],Zi=[],ts=[],es=[],is=[];return _t=class extends xe{constructor(){super(...arguments),o.set(this,i(this,be,"")),C.set(this,(i(this,ke),i(this,ye,"md"))),I.set(this,(i(this,we),i(this,_e,"default"))),M.set(this,(i(this,Oe),i(this,Se,!1))),P.set(this,(i(this,Ae),i(this,Ee,""))),D.set(this,(i(this,Te),i(this,$e,""))),W.set(this,(i(this,ze),i(this,Ce,!1))),N.set(this,(i(this,Ie),i(this,Me,!1))),V.set(this,(i(this,Pe),i(this,De,0))),B.set(this,(i(this,We),i(this,Ne,!1))),L.set(this,(i(this,Ve),i(this,Be,!1))),q.set(this,(i(this,Le),i(this,qe,!1))),j.set(this,(i(this,je),i(this,Re,!1))),R.set(this,(i(this,Ue),i(this,Fe,!1))),U.set(this,(i(this,Ke),i(this,Ye,!1))),F.set(this,(i(this,He),i(this,Xe,!1))),K.set(this,(i(this,Ge),i(this,Je,!1))),Y.set(this,(i(this,Qe),i(this,Ze,!1))),H.set(this,(i(this,ti),i(this,ei,"Select all"))),X.set(this,(i(this,ii),i(this,si,"120px"))),G.set(this,(i(this,li),i(this,ni,"auto"))),J.set(this,(i(this,oi),i(this,ai,!1))),Q.set(this,(i(this,di),i(this,ri,!1))),Z.set(this,(i(this,hi),i(this,ci,z))),tt.set(this,(i(this,pi),i(this,ui,!1))),et.set(this,(i(this,vi),i(this,mi,!1))),it.set(this,(i(this,gi),i(this,fi,!1))),st.set(this,(i(this,xi),i(this,bi,!1))),lt.set(this,(i(this,ki),i(this,yi,""))),nt.set(this,(i(this,wi),i(this,_i,!0))),ot.set(this,(i(this,Oi),i(this,Si,null))),at.set(this,(i(this,Ai),i(this,Ei,!0))),dt.set(this,(i(this,Ti),i(this,$i,z))),rt.set(this,(i(this,zi),i(this,Ci,""))),ht.set(this,(i(this,Ii),i(this,Mi,""))),ct.set(this,(i(this,Pi),i(this,Di,""))),pt.set(this,(i(this,Wi),i(this,Ni,"Dropdown menu options."))),ut.set(this,(i(this,Vi),i(this,Bi,void 0))),vt.set(this,(i(this,Li),i(this,qi,void 0))),mt.set(this,(i(this,ji),i(this,Ri,void 0))),gt.set(this,(i(this,Ui),i(this,Fi,void 0))),ft.set(this,(i(this,Ki),i(this,Yi,void 0))),xt.set(this,(i(this,Hi),i(this,Xi,void 0))),bt.set(this,(i(this,Gi),i(this,Ji,!1))),kt.set(this,(i(this,Qi),i(this,Zi,[]))),yt.set(this,(i(this,ts),i(this,es,!1))),this.searchTextEntered=(i(this,is),!1),this.prevSearchKeydownIndex=-1,this._onDocumentClick=t=>this._handleClickOut(t),this._onDropdownOpen=t=>this._handleDropdownOpen(t),this._onChildClick=t=>this._handleClick(t),this._onChildRemove=t=>this._handleRemoveOption(),this._onChildBlur=t=>this._handleBlur(t),this._onAddOptionInputFocus=()=>{this.assistiveText="Add new option input"},this._onAddOptionRowClick=t=>{var e,i;if(this.readonly||this.disabled)return;const s=null!==(i=null===(e=t.composedPath)||void 0===e?void 0:e.call(t))&&void 0!==i?i:[],l=s.some((t=>{var e,i;return null===(i=null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains)||void 0===i?void 0:i.call(e,"add-option-row")}));if(!l)return;const n=s.some((t=>{var e,i,s;const l=t;return!!l&&(!!(null===(i=null===(e=l.classList)||void 0===e?void 0:e.contains)||void 0===i?void 0:i.call(e,"add-option-button"))||"KYN-BUTTON"===(null!==(s=l.tagName)&&void 0!==s?s:"").toUpperCase())}));n&&(t.preventDefault(),t.stopPropagation(),this._handleAddOption())},this._handleAddOption=()=>{if(this.readonly||this.disabled)return;const{slottedEl:t,fallbackNative:e}=this._getAddOptionInputEls(),i="string"==typeof(null==t?void 0:t.value)?t.value:"string"==typeof(null==e?void 0:e.value)?e.value:"";i!==this.newOptionValue&&(this.newOptionValue=i);const s=this.newOptionValue.trim();if(!s)return;const{valid:l,message:n}=this._validateNewOptionValue(s);if(l)this.dispatchEvent(new CustomEvent("on-add-option",{detail:{value:s}})),this._clearAddOptionInput(),t&&"invalidText"in t&&(t.invalidText="",this._lastAddOptionInvalidText="");else{const e=n||this._textStrings.addOptionInvalid;t&&"invalidText"in t&&(t.invalidText=e,this._lastAddOptionInvalidText=e)}},this._handleInputNewOption=t=>{var e,i,s,l,n;const o=((null===(e=t.composedPath)||void 0===e?void 0:e.call(t))||[]).some((t=>{var e,i;return null===(i=null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains)||void 0===i?void 0:i.call(e,"add-option-row")}));if(!o)return;const a=t.target;this.newOptionValue="string"==typeof(null==a?void 0:a.value)?a.value:"string"==typeof(null===(i=null==a?void 0:a.detail)||void 0===i?void 0:i.value)?a.detail.value:"";const d=null!==(n=(null!==(l=null===(s=this.addOptionInputSlotEl)||void 0===s?void 0:s.assignedElements({flatten:!0}))&&void 0!==l?l:[])[0])&&void 0!==n?n:null;d&&"invalidText"in d&&"string"==typeof d.invalidText&&d.invalidText===this._lastAddOptionInvalidText&&(d.invalidText="",this._lastAddOptionInvalidText="")}}get label(){return s(this,o,"f")}set label(t){l(this,o,t,"f")}get size(){return s(this,C,"f")}set size(t){l(this,C,t,"f")}get kind(){return s(this,I,"f")}set kind(t){l(this,I,t,"f")}get inline(){return s(this,M,"f")}set inline(t){l(this,M,t,"f")}get caption(){return s(this,P,"f")}set caption(t){l(this,P,t,"f")}get placeholder(){return s(this,D,"f")}set placeholder(t){l(this,D,t,"f")}get open(){return s(this,W,"f")}set open(t){l(this,W,t,"f")}get searchable(){return s(this,N,"f")}set searchable(t){l(this,N,t,"f")}get searchThreshold(){return s(this,V,"f")}set searchThreshold(t){l(this,V,t,"f")}get enhanced(){return s(this,B,"f")}set enhanced(t){l(this,B,t,"f")}get readonly(){return s(this,L,"f")}set readonly(t){l(this,L,t,"f")}get filterSearch(){return s(this,q,"f")}set filterSearch(t){l(this,q,t,"f")}get multiple(){return s(this,j,"f")}set multiple(t){l(this,j,t,"f")}get required(){return s(this,R,"f")}set required(t){l(this,R,t,"f")}get hideLabel(){return s(this,U,"f")}set hideLabel(t){l(this,U,t,"f")}get disabled(){return s(this,F,"f")}set disabled(t){l(this,F,t,"f")}get hideTags(){return s(this,K,"f")}set hideTags(t){l(this,K,t,"f")}get selectAll(){return s(this,Y,"f")}set selectAll(t){l(this,Y,t,"f")}get selectAllText(){return s(this,H,"f")}set selectAllText(t){l(this,H,t,"f")}get menuMinWidth(){return s(this,X,"f")}set menuMinWidth(t){l(this,X,t,"f")}get openDirection(){return s(this,G,"f")}set openDirection(t){l(this,G,t,"f")}get selectAllChecked(){return s(this,J,"f")}set selectAllChecked(t){l(this,J,t,"f")}get selectAllIndeterminate(){return s(this,Q,"f")}set selectAllIndeterminate(t){l(this,Q,t,"f")}get textStrings(){return s(this,Z,"f")}set textStrings(t){l(this,Z,t,"f")}get allowAddOption(){return s(this,tt,"f")}set allowAddOption(t){l(this,tt,t,"f")}get fixedPosition(){return s(this,et,"f")}set fixedPosition(t){l(this,et,t,"f")}get _hasSlottedAddOptionInput(){return s(this,it,"f")}set _hasSlottedAddOptionInput(t){l(this,it,t,"f")}get _hasSlottedAddOptionButton(){return s(this,st,"f")}set _hasSlottedAddOptionButton(t){l(this,st,t,"f")}get _lastAddOptionInvalidText(){return s(this,lt,"f")}set _lastAddOptionInvalidText(t){l(this,lt,t,"f")}get preventDuplicateAddOption(){return s(this,nt,"f")}set preventDuplicateAddOption(t){l(this,nt,t,"f")}get addOptionValidator(){return s(this,ot,"f")}set addOptionValidator(t){l(this,ot,t,"f")}get allowDuplicateSelections(){return s(this,at,"f")}set allowDuplicateSelections(t){l(this,at,t,"f")}get _textStrings(){return s(this,dt,"f")}set _textStrings(t){l(this,dt,t,"f")}get newOptionValue(){return s(this,rt,"f")}set newOptionValue(t){l(this,rt,t,"f")}get text(){return s(this,ht,"f")}set text(t){l(this,ht,t,"f")}get searchText(){return s(this,ct,"f")}set searchText(t){l(this,ct,t,"f")}get assistiveText(){return s(this,pt,"f")}set assistiveText(t){l(this,pt,t,"f")}get options(){return Array.from(this.querySelectorAll("kyn-dropdown-option, kyn-enhanced-dropdown-option"))}get _isSearchVisible(){return!!(this.searchThreshold&&this.options.length>=this.searchThreshold)||!!this.searchable&&(!this.searchThreshold||this.options.length>=this.searchThreshold)}get selectedOptions(){return this.options.filter((t=>t.selected))}get searchEl(){return s(this,ut,"f")}set searchEl(t){l(this,ut,t,"f")}get buttonEl(){return s(this,vt,"f")}set buttonEl(t){l(this,vt,t,"f")}get listboxEl(){return s(this,mt,"f")}set listboxEl(t){l(this,mt,t,"f")}get clearMultipleEl(){return s(this,gt,"f")}set clearMultipleEl(t){l(this,gt,t,"f")}get addOptionInputSlotEl(){return s(this,ft,"f")}set addOptionInputSlotEl(t){l(this,ft,t,"f")}get addOptionButtonSlotEl(){return s(this,xt,"f")}set addOptionButtonSlotEl(t){l(this,xt,t,"f")}_getSlottedAddOptionInput(){var t,e,i;return null!==(i=(null!==(e=null===(t=this.addOptionInputSlotEl)||void 0===t?void 0:t.assignedElements({flatten:!0}))&&void 0!==e?e:[])[0])&&void 0!==i?i:null}_getAddOptionInputEls(){var t,e,i,s,l;const n=this._getSlottedAddOptionInput();return{slottedEl:n,slottedNative:"KYN-TEXT-INPUT"===(null==n?void 0:n.tagName)?null!==(i=null===(e=null===(t=n.shadowRoot)||void 0===t?void 0:t.querySelector)||void 0===e?void 0:e.call(t,"input"))&&void 0!==i?i:null:n,fallbackNative:null!==(l=null===(s=this.shadowRoot)||void 0===s?void 0:s.querySelector("kyn-text-input.add-option-input input, input.add-option-input, .add-option-input input"))&&void 0!==l?l:null}}_getOptionDisplayText(t){var e,i;if("KYN-ENHANCED-DROPDOWN-OPTION"===t.tagName){const i=t.querySelector('[slot="title"]');return((null===(e=null==i?void 0:i.textContent)||void 0===e?void 0:e.trim())||t.displayText||t.value||"").trim()}return(null!==(i=t.textContent)&&void 0!==i?i:"").trim()}get _openUpwards(){return s(this,bt,"f")}set _openUpwards(t){l(this,bt,t,"f")}get _tags(){return s(this,kt,"f")}set _tags(t){l(this,kt,t,"f")}get _fixedPosition(){return s(this,yt,"f")}set _fixedPosition(t){l(this,yt,t,"f")}_handleAddOptionSlotChange(){var t,e,i,s,l;const n=(null!==(e=null===(t=this.addOptionInputSlotEl)||void 0===t?void 0:t.assignedElements({flatten:!0}))&&void 0!==e?e:[]).length>0,o=(null!==(s=null===(i=this.addOptionButtonSlotEl)||void 0===i?void 0:i.assignedElements({flatten:!0}))&&void 0!==s?s:[]).length>0;this._hasSlottedAddOptionInput=n,this._hasSlottedAddOptionButton=o,!n&&!o||this.allowAddOption||(this.allowAddOption=!0),null===(l=this._addOptionInputCleanup)||void 0===l||l.call(this),this._attachAddOptionInputListener()}_attachAddOptionInputListener(){const t=this._getAddOptionTextInput();if(!t)return;const e=e=>{var i,s;this.newOptionValue=null!==(s=null===(i=e.detail)||void 0===i?void 0:i.value)&&void 0!==s?s:"",this._lastAddOptionInvalidText&&(t.invalidText="",this._lastAddOptionInvalidText="")};t.addEventListener("on-input",e),this._addOptionInputCleanup=()=>{t.removeEventListener("on-input",e)}}_getAddOptionTextInput(){var t,e;return(null!==(e=null===(t=this.addOptionInputSlotEl)||void 0===t?void 0:t.assignedElements({flatten:!0}))&&void 0!==e?e:[]).find((t=>{var e;return"kyn-text-input"===(null===(e=t.tagName)||void 0===e?void 0:e.toLowerCase())}))}get _addOptionBlocked(){const t=this.newOptionValue.trim();if(!t)return{blocked:!0,message:""};const{valid:e,message:i}=this._validateNewOptionValue(t);return e?{blocked:!1,message:""}:{blocked:!0,message:i||this._textStrings.addOptionInvalid}}render(){var t;const e={dropdown:!0,"ai-connected":"ai"===this.kind},i=this.multiple&&Array.isArray(this.value)?this.value.length:0,s=!!this.allowAddOption&&this._addOptionBlocked.blocked;return r`
950
+ }`;const C={title:"Dropdown",selectedOptions:"List of selected options",requiredText:"Required",errorText:"Error",clearAll:"Clear all",clear:"Clear",addItem:"Add item...",add:"Add",duplicateOption:"Duplicate option. Please select a unique option.",addOptionInvalid:"Please check this value and try again.",showAll:"Show all",showLess:"Show less",warning:"Warning"};let z=(()=>{var o,z,I,M,P,D,W,N,V,L,B,q,j,R,U,F,K,Y,H,X,G,J,Q,Z,tt,et,it,st,lt,nt,ot,at,dt,rt,ht,ct,pt,ut,vt,mt,gt,ft,xt,bt,kt,yt,wt;let _t,Ot,St,At,Et,Tt,$t,Ct,zt,It,Mt,Pt,Dt,Wt,Nt,Vt,Lt,Bt,qt,jt,Rt,Ut,Ft,Kt,Yt,Ht,Xt,Gt,Jt,Qt,Zt,te,ee,ie,se,le,ne,oe,ae,de,re,he,ce,pe,ue,ve,me,ge,fe,xe=[c("kyn-dropdown")],be=[],ke=_(a),ye=[],we=[],_e=[],Oe=[],Se=[],Ae=[],Ee=[],Te=[],$e=[],Ce=[],ze=[],Ie=[],Me=[],Pe=[],De=[],We=[],Ne=[],Ve=[],Le=[],Be=[],qe=[],je=[],Re=[],Ue=[],Fe=[],Ke=[],Ye=[],He=[],Xe=[],Ge=[],Je=[],Qe=[],Ze=[],ti=[],ei=[],ii=[],si=[],li=[],ni=[],oi=[],ai=[],di=[],ri=[],hi=[],ci=[],pi=[],ui=[],vi=[],mi=[],gi=[],fi=[],xi=[],bi=[],ki=[],yi=[],wi=[],_i=[],Oi=[],Si=[],Ai=[],Ei=[],Ti=[],$i=[],Ci=[],zi=[],Ii=[],Mi=[],Pi=[],Di=[],Wi=[],Ni=[],Vi=[],Li=[],Bi=[],qi=[],ji=[],Ri=[],Ui=[],Fi=[],Ki=[],Yi=[],Hi=[],Xi=[],Gi=[],Ji=[],Qi=[],Zi=[],ts=[],es=[],is=[],ss=[],ls=[],ns=[],os=[];return Ot=class extends ke{constructor(){super(...arguments),o.set(this,i(this,ye,"")),z.set(this,(i(this,we),i(this,_e,"md"))),I.set(this,(i(this,Oe),i(this,Se,"default"))),M.set(this,(i(this,Ae),i(this,Ee,!1))),P.set(this,(i(this,Te),i(this,$e,""))),D.set(this,(i(this,Ce),i(this,ze,""))),W.set(this,(i(this,Ie),i(this,Me,!1))),N.set(this,(i(this,Pe),i(this,De,!1))),V.set(this,(i(this,We),i(this,Ne,0))),L.set(this,(i(this,Ve),i(this,Le,!1))),B.set(this,(i(this,Be),i(this,qe,!1))),q.set(this,(i(this,je),i(this,Re,!1))),j.set(this,(i(this,Ue),i(this,Fe,!1))),R.set(this,(i(this,Ke),i(this,Ye,!1))),U.set(this,(i(this,He),i(this,Xe,!1))),F.set(this,(i(this,Ge),i(this,Je,!1))),K.set(this,(i(this,Qe),i(this,Ze,!1))),Y.set(this,(i(this,ti),i(this,ei,0))),H.set(this,(i(this,ii),i(this,si,!1))),X.set(this,(i(this,li),i(this,ni,"Select all"))),G.set(this,(i(this,oi),i(this,ai,"120px"))),J.set(this,(i(this,di),i(this,ri,"auto"))),Q.set(this,(i(this,hi),i(this,ci,!1))),Z.set(this,(i(this,pi),i(this,ui,!1))),tt.set(this,(i(this,vi),i(this,mi,C))),et.set(this,(i(this,gi),i(this,fi,!1))),it.set(this,(i(this,xi),i(this,bi,!1))),st.set(this,(i(this,ki),i(this,yi,!1))),lt.set(this,(i(this,wi),i(this,_i,!1))),nt.set(this,(i(this,Oi),i(this,Si,""))),ot.set(this,(i(this,Ai),i(this,Ei,!0))),at.set(this,(i(this,Ti),i(this,$i,null))),dt.set(this,(i(this,Ci),i(this,zi,!0))),rt.set(this,(i(this,Ii),i(this,Mi,C))),ht.set(this,(i(this,Pi),i(this,Di,""))),ct.set(this,(i(this,Wi),i(this,Ni,""))),pt.set(this,(i(this,Vi),i(this,Li,""))),ut.set(this,(i(this,Bi),i(this,qi,"Dropdown menu options."))),vt.set(this,(i(this,ji),i(this,Ri,void 0))),mt.set(this,(i(this,Ui),i(this,Fi,void 0))),gt.set(this,(i(this,Ki),i(this,Yi,void 0))),ft.set(this,(i(this,Hi),i(this,Xi,void 0))),xt.set(this,(i(this,Gi),i(this,Ji,void 0))),bt.set(this,(i(this,Qi),i(this,Zi,void 0))),kt.set(this,(i(this,ts),i(this,es,!1))),yt.set(this,(i(this,is),i(this,ss,[]))),wt.set(this,(i(this,ls),i(this,ns,!1))),this.searchTextEntered=(i(this,os),!1),this.prevSearchKeydownIndex=-1,this._onDocumentClick=t=>this._handleClickOut(t),this._onDropdownOpen=t=>this._handleDropdownOpen(t),this._onChildClick=t=>this._handleClick(t),this._onChildRemove=t=>this._handleRemoveOption(),this._onChildBlur=t=>this._handleBlur(t),this._onAddOptionInputFocus=()=>{this.assistiveText="Add new option input"},this._onAddOptionRowClick=t=>{var e,i;if(this.readonly||this.disabled)return;const s=null!==(i=null===(e=t.composedPath)||void 0===e?void 0:e.call(t))&&void 0!==i?i:[],l=s.some((t=>{var e,i;return null===(i=null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains)||void 0===i?void 0:i.call(e,"add-option-row")}));if(!l)return;const n=s.some((t=>{var e,i,s;const l=t;return!!l&&(!!(null===(i=null===(e=l.classList)||void 0===e?void 0:e.contains)||void 0===i?void 0:i.call(e,"add-option-button"))||"KYN-BUTTON"===(null!==(s=l.tagName)&&void 0!==s?s:"").toUpperCase())}));n&&(t.preventDefault(),t.stopPropagation(),this._handleAddOption())},this._handleAddOption=()=>{if(this.readonly||this.disabled)return;const{slottedEl:t,fallbackNative:e}=this._getAddOptionInputEls(),i="string"==typeof(null==t?void 0:t.value)?t.value:"string"==typeof(null==e?void 0:e.value)?e.value:"";i!==this.newOptionValue&&(this.newOptionValue=i);const s=this.newOptionValue.trim();if(!s)return;const{valid:l,message:n}=this._validateNewOptionValue(s);if(l)this.dispatchEvent(new CustomEvent("on-add-option",{detail:{value:s}})),this._clearAddOptionInput(),t&&"invalidText"in t&&(t.invalidText="",this._lastAddOptionInvalidText="");else{const e=n||this._textStrings.addOptionInvalid;t&&"invalidText"in t&&(t.invalidText=e,this._lastAddOptionInvalidText=e)}},this._handleInputNewOption=t=>{var e,i,s,l,n;const o=((null===(e=t.composedPath)||void 0===e?void 0:e.call(t))||[]).some((t=>{var e,i;return null===(i=null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains)||void 0===i?void 0:i.call(e,"add-option-row")}));if(!o)return;const a=t.target;this.newOptionValue="string"==typeof(null==a?void 0:a.value)?a.value:"string"==typeof(null===(i=null==a?void 0:a.detail)||void 0===i?void 0:i.value)?a.detail.value:"";const d=null!==(n=(null!==(l=null===(s=this.addOptionInputSlotEl)||void 0===s?void 0:s.assignedElements({flatten:!0}))&&void 0!==l?l:[])[0])&&void 0!==n?n:null;d&&"invalidText"in d&&"string"==typeof d.invalidText&&d.invalidText===this._lastAddOptionInvalidText&&(d.invalidText="",this._lastAddOptionInvalidText="")}}get label(){return s(this,o,"f")}set label(t){l(this,o,t,"f")}get size(){return s(this,z,"f")}set size(t){l(this,z,t,"f")}get kind(){return s(this,I,"f")}set kind(t){l(this,I,t,"f")}get inline(){return s(this,M,"f")}set inline(t){l(this,M,t,"f")}get caption(){return s(this,P,"f")}set caption(t){l(this,P,t,"f")}get placeholder(){return s(this,D,"f")}set placeholder(t){l(this,D,t,"f")}get open(){return s(this,W,"f")}set open(t){l(this,W,t,"f")}get searchable(){return s(this,N,"f")}set searchable(t){l(this,N,t,"f")}get searchThreshold(){return s(this,V,"f")}set searchThreshold(t){l(this,V,t,"f")}get enhanced(){return s(this,L,"f")}set enhanced(t){l(this,L,t,"f")}get readonly(){return s(this,B,"f")}set readonly(t){l(this,B,t,"f")}get filterSearch(){return s(this,q,"f")}set filterSearch(t){l(this,q,t,"f")}get multiple(){return s(this,j,"f")}set multiple(t){l(this,j,t,"f")}get required(){return s(this,R,"f")}set required(t){l(this,R,t,"f")}get hideLabel(){return s(this,U,"f")}set hideLabel(t){l(this,U,t,"f")}get disabled(){return s(this,F,"f")}set disabled(t){l(this,F,t,"f")}get hideTags(){return s(this,K,"f")}set hideTags(t){l(this,K,t,"f")}get limitCount(){return s(this,Y,"f")}set limitCount(t){l(this,Y,t,"f")}get selectAll(){return s(this,H,"f")}set selectAll(t){l(this,H,t,"f")}get selectAllText(){return s(this,X,"f")}set selectAllText(t){l(this,X,t,"f")}get menuMinWidth(){return s(this,G,"f")}set menuMinWidth(t){l(this,G,t,"f")}get openDirection(){return s(this,J,"f")}set openDirection(t){l(this,J,t,"f")}get selectAllChecked(){return s(this,Q,"f")}set selectAllChecked(t){l(this,Q,t,"f")}get selectAllIndeterminate(){return s(this,Z,"f")}set selectAllIndeterminate(t){l(this,Z,t,"f")}get textStrings(){return s(this,tt,"f")}set textStrings(t){l(this,tt,t,"f")}get allowAddOption(){return s(this,et,"f")}set allowAddOption(t){l(this,et,t,"f")}get fixedPosition(){return s(this,it,"f")}set fixedPosition(t){l(this,it,t,"f")}get _hasSlottedAddOptionInput(){return s(this,st,"f")}set _hasSlottedAddOptionInput(t){l(this,st,t,"f")}get _hasSlottedAddOptionButton(){return s(this,lt,"f")}set _hasSlottedAddOptionButton(t){l(this,lt,t,"f")}get _lastAddOptionInvalidText(){return s(this,nt,"f")}set _lastAddOptionInvalidText(t){l(this,nt,t,"f")}get preventDuplicateAddOption(){return s(this,ot,"f")}set preventDuplicateAddOption(t){l(this,ot,t,"f")}get addOptionValidator(){return s(this,at,"f")}set addOptionValidator(t){l(this,at,t,"f")}get allowDuplicateSelections(){return s(this,dt,"f")}set allowDuplicateSelections(t){l(this,dt,t,"f")}get _textStrings(){return s(this,rt,"f")}set _textStrings(t){l(this,rt,t,"f")}get newOptionValue(){return s(this,ht,"f")}set newOptionValue(t){l(this,ht,t,"f")}get text(){return s(this,ct,"f")}set text(t){l(this,ct,t,"f")}get searchText(){return s(this,pt,"f")}set searchText(t){l(this,pt,t,"f")}get assistiveText(){return s(this,ut,"f")}set assistiveText(t){l(this,ut,t,"f")}get options(){return Array.from(this.querySelectorAll("kyn-dropdown-option, kyn-enhanced-dropdown-option"))}get _isSearchVisible(){return!!(this.searchThreshold&&this.options.length>=this.searchThreshold)||!!this.searchable&&(!this.searchThreshold||this.options.length>=this.searchThreshold)}get selectedOptions(){return this.options.filter((t=>t.selected))}get searchEl(){return s(this,vt,"f")}set searchEl(t){l(this,vt,t,"f")}get buttonEl(){return s(this,mt,"f")}set buttonEl(t){l(this,mt,t,"f")}get listboxEl(){return s(this,gt,"f")}set listboxEl(t){l(this,gt,t,"f")}get clearMultipleEl(){return s(this,ft,"f")}set clearMultipleEl(t){l(this,ft,t,"f")}get addOptionInputSlotEl(){return s(this,xt,"f")}set addOptionInputSlotEl(t){l(this,xt,t,"f")}get addOptionButtonSlotEl(){return s(this,bt,"f")}set addOptionButtonSlotEl(t){l(this,bt,t,"f")}_getSlottedAddOptionInput(){var t,e,i;return null!==(i=(null!==(e=null===(t=this.addOptionInputSlotEl)||void 0===t?void 0:t.assignedElements({flatten:!0}))&&void 0!==e?e:[])[0])&&void 0!==i?i:null}_getAddOptionInputEls(){var t,e,i,s,l;const n=this._getSlottedAddOptionInput();return{slottedEl:n,slottedNative:"KYN-TEXT-INPUT"===(null==n?void 0:n.tagName)?null!==(i=null===(e=null===(t=n.shadowRoot)||void 0===t?void 0:t.querySelector)||void 0===e?void 0:e.call(t,"input"))&&void 0!==i?i:null:n,fallbackNative:null!==(l=null===(s=this.shadowRoot)||void 0===s?void 0:s.querySelector("kyn-text-input.add-option-input input, input.add-option-input, .add-option-input input"))&&void 0!==l?l:null}}_getOptionDisplayText(t){var e,i;if("KYN-ENHANCED-DROPDOWN-OPTION"===t.tagName){const i=t.querySelector('[slot="title"]');return((null===(e=null==i?void 0:i.textContent)||void 0===e?void 0:e.trim())||t.displayText||t.value||"").trim()}return(null!==(i=t.textContent)&&void 0!==i?i:"").trim()}get _openUpwards(){return s(this,kt,"f")}set _openUpwards(t){l(this,kt,t,"f")}get _tags(){return s(this,yt,"f")}set _tags(t){l(this,yt,t,"f")}get _fixedPosition(){return s(this,wt,"f")}set _fixedPosition(t){l(this,wt,t,"f")}_handleAddOptionSlotChange(){var t,e,i,s,l;const n=(null!==(e=null===(t=this.addOptionInputSlotEl)||void 0===t?void 0:t.assignedElements({flatten:!0}))&&void 0!==e?e:[]).length>0,o=(null!==(s=null===(i=this.addOptionButtonSlotEl)||void 0===i?void 0:i.assignedElements({flatten:!0}))&&void 0!==s?s:[]).length>0;this._hasSlottedAddOptionInput=n,this._hasSlottedAddOptionButton=o,!n&&!o||this.allowAddOption||(this.allowAddOption=!0),null===(l=this._addOptionInputCleanup)||void 0===l||l.call(this),this._attachAddOptionInputListener()}_attachAddOptionInputListener(){const t=this._getAddOptionTextInput();if(!t)return;const e=e=>{var i,s;this.newOptionValue=null!==(s=null===(i=e.detail)||void 0===i?void 0:i.value)&&void 0!==s?s:"",this._lastAddOptionInvalidText&&(t.invalidText="",this._lastAddOptionInvalidText="")};t.addEventListener("on-input",e),this._addOptionInputCleanup=()=>{t.removeEventListener("on-input",e)}}_getAddOptionTextInput(){var t,e;return(null!==(e=null===(t=this.addOptionInputSlotEl)||void 0===t?void 0:t.assignedElements({flatten:!0}))&&void 0!==e?e:[]).find((t=>{var e;return"kyn-text-input"===(null===(e=t.tagName)||void 0===e?void 0:e.toLowerCase())}))}get _addOptionBlocked(){const t=this.newOptionValue.trim();if(!t)return{blocked:!0,message:""};const{valid:e,message:i}=this._validateNewOptionValue(t);return e?{blocked:!1,message:""}:{blocked:!0,message:i||this._textStrings.addOptionInvalid}}render(){var t;const e={dropdown:!0,"ai-connected":"ai"===this.kind},i=this.multiple&&Array.isArray(this.value)?this.value.length:0,s=!!this.allowAddOption&&this._addOptionBlocked.blocked;return r`
951
951
  <div
952
952
  class=${m(e)}
953
953
  ?disabled=${this.disabled}
@@ -1153,7 +1153,11 @@ slot[name=add-option-button]::slotted(*) {
1153
1153
  `}_addOptionRowKeydown(t){var e,i;return"Enter"===t.key?(t.preventDefault(),t.stopPropagation(),void this._handleAddOption()):"Escape"===t.key?(t.preventDefault(),t.stopPropagation(),this._clearAddOptionInput(),this.open=!1,void(null===(i=null===(e=this.buttonEl)||void 0===e?void 0:e.focus)||void 0===i||i.call(e))):void t.stopPropagation()}canOpen(){return!this.disabled&&!this.readonly}handleAnchorClick(t){var e,i,s;if(!this.canOpen())return;const l=((null===(e=t.composedPath)||void 0===e?void 0:e.call(t))||[]).some((t=>{var e;return null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("options")}))||(null===(s=null===(i=t.target)||void 0===i?void 0:i.closest)||void 0===s?void 0:s.call(i,"kyn-dropdown-option, kyn-enhanced-dropdown-option, .add-option"));l||this.handleClick()}_clearAddOptionInput(){var t,e,i;this.newOptionValue="";const s=this._getSlottedAddOptionInput();if("KYN-TEXT-INPUT"===(null==s?void 0:s.tagName)){s.value="";const i=null===(e=null===(t=s.shadowRoot)||void 0===t?void 0:t.querySelector)||void 0===e?void 0:e.call(t,"input");i&&(i.value="")}const l=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".add-option-input");l&&(l.value="")}_validateNewOptionValue(t){var e,i,s,l,n,o;const a=t.trim();if(0===a.length)return{valid:!0,message:""};const{slottedEl:d,fallbackNative:r}=this._getAddOptionInputEls(),h=d,c="string"==typeof(null==h?void 0:h.pattern)?h.pattern:"string"==typeof(null===(e=null==d?void 0:d.getAttribute)||void 0===e?void 0:e.call(d,"pattern"))?d.getAttribute("pattern"):"string"==typeof(null===(i=null==r?void 0:r.getAttribute)||void 0===i?void 0:i.call(r,"pattern"))?r.getAttribute("pattern"):"",p=Number.isFinite(null==h?void 0:h.minLength)?Number(h.minLength):(null===(s=null==d?void 0:d.getAttribute)||void 0===s?void 0:s.call(d,"minlength"))?Number(d.getAttribute("minlength")):(null===(l=null==r?void 0:r.getAttribute)||void 0===l?void 0:l.call(r,"minlength"))?Number(r.getAttribute("minlength")):void 0,u=Number.isFinite(null==h?void 0:h.maxLength)?Number(h.maxLength):(null===(n=null==d?void 0:d.getAttribute)||void 0===n?void 0:n.call(d,"maxlength"))?Number(d.getAttribute("maxlength")):(null===(o=null==r?void 0:r.getAttribute)||void 0===o?void 0:o.call(r,"maxlength"))?Number(r.getAttribute("maxlength")):void 0,v=Number.isFinite(p)&&p>0?p:void 0,m=Number.isFinite(u)&&u>0?u:void 0;if("number"==typeof v&&a.length<v)return{valid:!1,message:""};if("number"==typeof m&&a.length>m)return{valid:!1,message:""};if(c)try{if(!new RegExp(c).test(a))return{valid:!1,message:""}}catch{}if(this.preventDuplicateAddOption){const t=a.toLowerCase();if(this.options.some((e=>e.value.trim().toLowerCase()===t)))return{valid:!1,message:this._textStrings.duplicateOption}}if(this.addOptionValidator){const t=this.addOptionValidator(a,{dropdown:this}),e="string"==typeof t?t:"";if(e)return{valid:!1,message:e}}return{valid:!0,message:""}}handleAnchorKeydown(t){if(this.canOpen())this.handleButtonKeydown(t);else{[" ","Enter","ArrowDown","ArrowUp"].includes(t.key)&&t.preventDefault()}}firstUpdated(){""===this.placeholder&&(this._isSearchVisible?this.placeholder="Search":this.placeholder=this.multiple?"Select items":"Select an option")}renderHelperContent(){return r`
1154
1154
  ${this.multiple&&!this.hideTags&&this._tags.length?r`
1155
1155
  <kyn-tag-group
1156
+ class="dropdown-tag-group"
1156
1157
  ?filter=${!this.disabled&&!this.readonly}
1158
+ ?limitTags=${this.limitCount>0}
1159
+ .limitCount=${this.limitCount}
1160
+ .textStrings=${{showAll:this._textStrings.showAll,showLess:this._textStrings.showLess}}
1157
1161
  role="list"
1158
1162
  aria-label=${this._textStrings.selectedOptions}
1159
1163
  data-readonly=${this.readonly?"":h}
@@ -1210,5 +1214,5 @@ slot[name=add-option-button]::slotted(*) {
1210
1214
  >
1211
1215
  ${this.assistiveText}
1212
1216
  </div>
1213
- `}handleSlotChange(){this.updateChildOptions(),this._updateOptions(),this._updateSelectedText()}updateChildOptions(){var t;(null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("#children")).assignedElements({flatten:!0}).forEach((t=>{const e=t.tagName;"KYN-DROPDOWN-OPTION"!==e&&"KYN-ENHANCED-DROPDOWN-OPTION"!==e||(t.allowAddOption=this.allowAddOption,t.multiple=this.multiple,t.readonly=this.readonly)}))}handleClick(){this.canOpen()&&(this.open=!this.open,this._isSearchVisible?this.searchEl.focus():this.buttonEl.focus())}handleButtonKeydown(t){var e;this.readonly?"Escape"===t.key&&(this.open=!1,null===(e=this.buttonEl)||void 0===e||e.focus()):this.handleKeyboard(t,t.keyCode,"button")}handleListKeydown(t){var e,i,s,l;const n=null!==(i=null===(e=t.composedPath)||void 0===e?void 0:e.call(t))&&void 0!==i?i:[],o=n.some((t=>{var e,i,s,l,n,o;const a=t;if(!a)return!1;const d=(null!==(e=a.tagName)&&void 0!==e?e:"").toUpperCase();return(null===(s=null===(i=a.classList)||void 0===i?void 0:i.contains)||void 0===s?void 0:s.call(i,"add-option-row"))||(null===(n=null===(l=a.classList)||void 0===l?void 0:l.contains)||void 0===n?void 0:n.call(l,"add-option-input"))||"KYN-TEXT-INPUT"===d||"INPUT"===d||Boolean(null===(o=a.closest)||void 0===o?void 0:o.call(a,".add-option"))}));if(o)return;const a=n.some((t=>{var e,i;const s=t;if(!s)return!1;const l=(null!==(e=s.tagName)&&void 0!==e?e:"").toUpperCase();return"KYN-DROPDOWN-OPTION"===l||"KYN-ENHANCED-DROPDOWN-OPTION"===l||Boolean(null===(i=s.closest)||void 0===i?void 0:i.call(s,"kyn-dropdown-option, kyn-enhanced-dropdown-option"))}));if(a)return;if(this.readonly)return void("Escape"===t.key&&(t.preventDefault(),this.open=!1,null===(l=null===(s=this.buttonEl)||void 0===s?void 0:s.focus)||void 0===l||l.call(s)));9!==t.keyCode&&t.preventDefault(),this.handleKeyboard(t,t.keyCode,"list")}_handleListFocus(){var t,e;const i=[...Array.from((null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".select-all"))||[]),...this.options.filter((t=>"none"!==t.style.display))],s=i.find((t=>!t.disabled));s&&(i.forEach((t=>t.highlighted=!1)),null===(e=s.focus)||void 0===e||e.call(s,{preventScroll:!0}),s.highlighted=!0,s.scrollIntoView({block:"nearest"}),this.assistiveText=s.text||"Option")}handleListBlur(t){if(this.multiple)return;this.options.forEach((t=>t.highlighted=!1));const e=t.relatedTarget;e&&(e.closest("kyn-dropdown-option")||e.closest("kyn-enhanced-dropdown-option")||e.classList.contains("search")||e.closest(".add-option"))||(this.open=!1,this.assistiveText="Dropdown menu options.")}handleKeyboard(t,e,i){var s,l,n,o,a,d,r,h,c,p,u,v,m,g,f,x,b,k,y,w,_,O,S;const A=[0,32],E=[...Array.from(null!==(l=null===(s=this.shadowRoot)||void 0===s?void 0:s.querySelectorAll(".select-all"))&&void 0!==l?l:[]),...this.options.filter((t=>"none"!==t.style.display))],T=E.find((t=>t.highlighted)),$=E.find((t=>t.selected));let z=T?E.indexOf(T):$?E.indexOf($):0;if(A.includes(e)&&t.preventDefault(),this.readonly){if(40===e||38===e){t.preventDefault();let i=40===e?(z+1)%E.length:(z-1+E.length)%E.length,s=0;for(;(null===(n=E[i])||void 0===n?void 0:n.disabled)&&s++<E.length;)i=40===e?(i+1)%E.length:(i-1+E.length)%E.length;const l=E[i],h=E[z];return void(l&&(h&&(h.highlighted=!1),null===(a=(o=l).focus)||void 0===a||a.call(o),l.highlighted=!0,null===(r=(d=l).scrollIntoView)||void 0===r||r.call(d,{block:"nearest"}),this.assistiveText=l.text||"Option"))}return A.includes(e)||13===e?void t.preventDefault():27===e?(this.open=!1,null===(c=null===(h=this._isSearchVisible?this.searchEl:this.buttonEl)||void 0===h?void 0:h.focus)||void 0===c||c.call(h),void(this.assistiveText="Dropdown menu options.")):void 0}const C=this.open;if("button"===i||"addOption"===i){let s=A.includes(e)||13===e||40===e||38===e;if(t.target===this.clearMultipleEl&&13===e){s=!1;const t=E[z];return t&&(t.highlighted=!1,t.selected=!t.selected),void(z=0)}s&&(this.open||(this.requestCloseOtherDropdowns(),this.open=!0),this.allowAddOption&&"button"===i&&13===e?setTimeout((()=>{var t,e,i;null===(i=null===(e=null===(t=this.addOptionInputSlotEl)||void 0===t?void 0:t.assignedElements({flatten:!0}))||void 0===e?void 0:e.find((t=>"function"==typeof(null==t?void 0:t.focus))))||void 0===i||i.focus()}),100):this.multiple||"string"!=typeof this.value||""===this.value||null===(u=null===(p=E[z])||void 0===p?void 0:p.scrollIntoView)||void 0===u||u.call(p,{block:"nearest"}))}switch(e){case 0:case 32:case 13:{const t=E[z];if(!t)return;return t.highlighted=!0,void(C&&(this.multiple?(t.selected=!t.selected,this._handleClick({detail:{value:t.value,selected:t.selected}})):(E.forEach((t=>{t.selected=!1})),t.selected=!0,this.updateValue(t.value,!0),this.emitValue(),this.open=!1,this.assistiveText=`Selected ${t.value}`)))}case 40:{let t=Boolean(T||$)?z===E.length-1?0:z+1:0;(null===(v=E[t])||void 0===v?void 0:v.disabled)&&(t=t===E.length-1?0:t+1);const e=E[t],i=E[z];return null===(m=null==e?void 0:e.focus)||void 0===m||m.call(e),i&&(i.tabIndex=-1),e&&(e.tabIndex=0),i&&(i.highlighted=!1),e&&(e.highlighted=!0),null===(g=null==e?void 0:e.scrollIntoView)||void 0===g||g.call(e,{block:"nearest"}),void(this.assistiveText=null!==(f=null==e?void 0:e.text)&&void 0!==f?f:"")}case 38:{let t=0===z?E.length-1:z-1;(null===(x=E[t])||void 0===x?void 0:x.disabled)&&(t=0===t?E.length-1:t-1);const e=E[t],i=E[z];return null===(b=null==e?void 0:e.focus)||void 0===b||b.call(e),i&&(i.tabIndex=-1),e&&(e.tabIndex=0),i&&(i.highlighted=!1),e&&(e.highlighted=!0),null===(k=null==e?void 0:e.scrollIntoView)||void 0===k||k.call(e,{block:"nearest"}),void(this.assistiveText=null!==(y=null==e?void 0:e.text)&&void 0!==y?y:"")}case 27:return this.open=!1,this._isSearchVisible?null===(_=null===(w=this.searchEl)||void 0===w?void 0:w.focus)||void 0===_||_.call(w):null===(S=null===(O=this.buttonEl)||void 0===O?void 0:O.focus)||void 0===S||S.call(O),void(this.assistiveText="Dropdown menu options.");default:return}}handleClearMultiple(t){var e;if(this.readonly)return;if(t.stopPropagation(),this.multiple){const t=(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot#children")).assignedElements().filter((t=>t.selected&&t.disabled)).map((t=>t.value));this.value=t.length?[...t]:[]}else this.value="";this._validate(!0,!1),this._updateSelectedOptions(),this.emitValue();const i=new CustomEvent("on-clear-all",{detail:{value:this.value}});this.dispatchEvent(i)}handleTagClear(t){this.readonly||(this.updateValue(t.value,!1),this._updateSelectedOptions(),this.emitValue())}handleClear(t){this.readonly||(t.stopPropagation(),this.text="",this.searchText="",this.searchEl.value="",this._emitSearch(),this.filterSearch&&this.options.map((t=>{t.style.display="block"})),this.multiple||(this.value="",this._validate(!0,!1),this._updateSelectedOptions(),this.emitValue()))}handleSearchClick(t){var e;this.readonly||(t.stopPropagation(),this.open||(this.requestCloseOtherDropdowns(),this.open=!0),""===(null!==(e=this.searchText)&&void 0!==e?e:"").trim()&&(this.searchText=""))}handleSearchKeydown(t){if(this.readonly)return"Escape"===t.key&&(this.open=!1,this.buttonEl.focus()),t.stopPropagation(),void t.preventDefault();t.stopPropagation();const e=this.options.find((t=>t.highlighted)),i=this.options.findIndex((t=>t.highlighted));this.searchTextEntered=!1,13===t.keyCode&&(this.searchTextEntered=!0,e?(this.prevSearchKeydownIndex!==i&&(this.multiple?e.selected=!e.selected:(this.options.forEach((t=>t.selected=!1)),e.selected=!0,this.open=!1),this.updateValue(e.value,e.selected)),e.selected?(this.assistiveText=`Selected ${e.innerHTML}`,this.prevSearchKeydownIndex=i):this.assistiveText=`Deselected ${e.innerHTML}`):this.assistiveText="No item matched."),27===t.keyCode&&(this.open=!1,this.buttonEl.focus())}handleSearchInput(t){if(this.readonly)return;const e=t.target.value;this.searchText=e,this.open||(this.requestCloseOtherDropdowns(),this.open=!0),this._emitSearch();const i=e.toLowerCase();if(this.filterSearch)return void this.options.forEach((t=>{const e=this._getOptionDisplayText(t).toLowerCase();t.style.display=e.includes(i)?"block":"none"}));const s=this.options.filter((t=>this._getOptionDisplayText(t).toLowerCase().startsWith(i)));this.options.forEach((t=>t.highlighted=!1)),""!==e&&s.length&&(s[0].highlighted=!0,s[0].scrollIntoView({block:"nearest"}),this.searchTextEntered&&(this.assistiveText="Option Matched"))}_updateSelectedOptions(){this.options.forEach((t=>{this.multiple?t.selected=this.valueArray.includes(t.value):t.selected=this.value===t.value}))}_handleClick(t){var e;if(!this.readonly){if("selectAll"===t.detail.value){this.selectAllChecked=t.detail.selected;const i=(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot#children")).assignedElements().filter((t=>t.selected&&t.disabled)).map((t=>t.value));t.detail.selected?(this.value=this.options.filter((t=>!t.disabled||t.disabled&&t.selected)).map((t=>t.value)),this.assistiveText="Selected all items."):(this.value=i.length?i:[],this.assistiveText="Deselected all items."),this._validate(!0,!1)}else this.updateValue(t.detail.value,t.detail.selected),this.assistiveText=t.detail.selected?`Selected ${t.detail.value}`:`Deselected ${t.detail.value}`;this._updateSelectedOptions(),this.multiple||(this.open=!1),this.emitValue()}}_handleBlur(t){var e,i,s;if(this.multiple)return;const l=null===(i=null===(e=t.detail)||void 0===e?void 0:e.origEvent)||void 0===i?void 0:i.relatedTarget;(null===(s=null==l?void 0:l.closest)||void 0===s?void 0:s.call(l,".remove-option"))||l&&(l.closest("kyn-dropdown-option")||l.closest("kyn-enhanced-dropdown-option")||"kyn-dropdown"===l.localName)||(this.open=!1)}_handleClickOut(t){t.composedPath().includes(this)||(this.open=!1)}requestCloseOtherDropdowns(){document.dispatchEvent(new CustomEvent("kyn-dropdown-open",{detail:{source:this}}))}_handleDropdownOpen(t){var e;(null===(e=t.detail)||void 0===e?void 0:e.source)!==this&&this.open&&(this.open=!1)}_getFixedMenuPlacement(){return"up"===this.openDirection?"top-start":"down"===this.openDirection?"bottom-start":this._openUpwards?"top-start":"bottom-start"}get _shouldUseFixedPosition(){return this.fixedPosition}_resetFixedMenuPosition(){const t=this.listboxEl;t&&(t.style.removeProperty("position"),t.style.removeProperty("top"),t.style.removeProperty("left"),t.style.removeProperty("right"),t.style.removeProperty("bottom"),t.style.removeProperty("width"),t.style.removeProperty("max-height"),t.style.removeProperty("z-index"))}async _positionFixedMenu(){const t=this.buttonEl,e=this.listboxEl;if(!t||!e)return;const i=t.getBoundingClientRect();e.style.width=`${i.width}px`;const s={boundary:document.body,rootBoundary:"viewport"},l=[f(4),..."auto"===this.openDirection?[x(s)]:[],b({padding:8,...s}),k({padding:8,...s,apply({availableHeight:t}){e.style.maxHeight=`${Math.max(120,t)}px`}})],{x:n,y:o,placement:a}=await y(t,e,{strategy:"fixed",placement:this._getFixedMenuPlacement(),middleware:l});this._openUpwards=a.startsWith("top"),Object.assign(e.style,{position:"fixed",left:`${n}px`,top:`${o}px`,right:"auto",bottom:"auto",zIndex:"var(--kd-z-overlay, 5000)"})}_stopFixedMenuPositioning(){var t;(this._fixedPositionCleanup||this._fixedPosition)&&(null===(t=this._fixedPositionCleanup)||void 0===t||t.call(this),this._fixedPositionCleanup=void 0,this._fixedPosition=!1,this._resetFixedMenuPosition())}_startFixedMenuPositioning(){var t;this._shouldUseFixedPosition&&(this._fixedPosition=!0,null===(t=this._fixedPositionCleanup)||void 0===t||t.call(this),this._fixedPositionCleanup=w(this.buttonEl,this.listboxEl,(()=>this._positionFixedMenu()),{elementResize:!1,layoutShift:!1}))}connectedCallback(){super.connectedCallback(),this._onConnected(),document.addEventListener("click",this._onDocumentClick),document.addEventListener("kyn-dropdown-open",this._onDropdownOpen),this.addEventListener("on-click",this._onChildClick),this.addEventListener("on-remove-option",this._onChildRemove),this.addEventListener("on-blur",this._onChildBlur)}disconnectedCallback(){var t;this._onDisconnected(),document.removeEventListener("click",this._onDocumentClick),document.removeEventListener("kyn-dropdown-open",this._onDropdownOpen),this.removeEventListener("on-click",this._onChildClick),this.removeEventListener("on-remove-option",this._onChildRemove),this.removeEventListener("on-blur",this._onChildBlur),this._stopFixedMenuPositioning(),null===(t=this._addOptionInputCleanup)||void 0===t||t.call(this),super.disconnectedCallback()}get valueArray(){return Array.isArray(this.value)?this.value:[]}updateValue(t,e=!1){if(!this.readonly){if(this.multiple){const i=[...this.valueArray];if(e)this.allowDuplicateSelections?i.push(t):i.includes(t)||i.push(t);else for(let e=i.length-1;e>=0;e--)i[e]===t&&i.splice(e,1);this.value=i}else this.value=t;this._validate(!0,!1),this.multiple||(this._isSearchVisible?this.searchEl:this.buttonEl).focus()}}_validate(t,e){const i=this.required&&!this.readonly&&(this.multiple?!Array.isArray(this.value)||0===this.value.length:""===this.value),s={customError:""!==this.invalidText,valueMissing:i},l=i?"Please fill out this field.":"",n=""!==this.invalidText?this.invalidText:l,o=this.buttonEl||this.listboxEl;this._internals.setValidity(s,n,null!=o?o:void 0),t&&(this._internalValidationMsg=l),e&&this._internals.reportValidity()}emitValue(){const t=new CustomEvent("on-change",{detail:{value:this.value}});this.dispatchEvent(t)}_emitSearch(){const t=new CustomEvent("on-search",{detail:{searchText:this.searchText}});this.dispatchEvent(t)}willUpdate(t){t.has("textStrings")&&(this._textStrings=O(z,this.textStrings))}updated(t){var e,i,s;super.updated(t),t.has("readonly")&&(null===(e=this.clearMultipleEl)||void 0===e||e.classList.toggle("is-readonly",this.readonly),null===(i=this.clearMultipleEl)||void 0===i||i.toggleAttribute("data-readonly",this.readonly)),t.has("kind")&&(this.dispatchEvent(new CustomEvent("kind-changed",{detail:this.kind,bubbles:!0,composed:!0})),this.classList.toggle("ai-connected","ai"===this.kind));const l=this.shadowRoot;if(l){if(t.has("open")){const t=l.querySelector('slot[name="anchor"]'),e=null==t?void 0:t.assignedElements({flatten:!0}),i=null==e?void 0:e.find((t=>!t.querySelector(".clear-multiple-icon"))),s=null==i?void 0:i.querySelector('span[slot="icon"]');s&&(s.style.transition="transform 0.2s ease-in-out",s.style.transform=this.open?"rotate(180deg)":"rotate(0deg)")}if(this._onUpdated(t),t.has("value")){this._updateOptions();const t=l.querySelector("slot#children").assignedElements().filter((t=>!t.disabled)),e=t.filter((t=>t.selected));this.selectAllChecked=e.length===t.length,this.selectAllIndeterminate=e.length>0&&e.length<t.length,this._updateTags(),this._updateSelectedText()}if(t.has("open")||t.has("openDirection")){if(this.open&&(this.options.forEach((t=>t.highlighted=!1)),!this._isSearchVisible&&this.listboxEl&&(this.listboxEl.focus({preventScroll:!0}),this.assistiveText="Selecting items. Use up and down arrow keys to navigate.")),"up"===this.openDirection)this._openUpwards=!0;else if("down"===this.openDirection)this._openUpwards=!1;else if(this.open){const t=this.buttonEl.getBoundingClientRect();this._openUpwards=t.top>.6*window.innerHeight}if(this.open&&!this.multiple){const t=this.options.find((t=>t.selected));null==t||t.scrollIntoView({block:"nearest"})}this.open&&this._shouldUseFixedPosition?this._startFixedMenuPositioning():!this.open&&this._fixedPosition&&this._stopFixedMenuPositioning()}t.has("fixedPosition")&&(this.open?this._startFixedMenuPositioning():this._shouldUseFixedPosition||this._stopFixedMenuPositioning()),t.has("multiple")&&this.options.forEach((t=>t.multiple=this.multiple)),t.has("searchText")&&this.searchEl&&(this.searchEl.value=this.searchText),(t.has("multiple")||t.has("allowAddOption")||t.has("readonly"))&&this.updateChildOptions(),t.has("open")&&this.open&&!this._isSearchVisible&&(null===(s=this.listboxEl)||void 0===s||s.focus({preventScroll:!0}))}}get hasSearch(){var t;return(null!==(t=this.searchText)&&void 0!==t?t:"").trim().length>0}_updateTags(){var t,e;if(!this.multiple)return;const i=new Map;for(const e of this.valueArray)i.set(e,(null!==(t=i.get(e))&&void 0!==t?t:0)+1);const s=this.options,l=[];for(const[t,n]of i.entries()){const i=s.find((e=>e.value===t));i&&l.push({value:t,text:this._getOptionDisplayText(i)||t,disabled:null!==(e=i.disabled)&&void 0!==e&&e,count:n})}this._tags=l}_updateOptions(){Array.from(this.querySelectorAll("kyn-dropdown-option, kyn-enhanced-dropdown-option")).forEach((t=>{t.multiple=this.multiple,this.multiple?t.selected=this.valueArray.includes(t.value):t.selected=this.value===t.value}))}_handleRemoveOption(){this.assistiveText="Option removed.",setTimeout((()=>{var t,e,i,s;this.open?null===(e=null===(t=this.listboxEl)||void 0===t?void 0:t.focus)||void 0===e||e.call(t,{preventScroll:!0}):null===(s=null===(i=this.buttonEl)||void 0===i?void 0:i.focus)||void 0===s||s.call(i)}),0)}_updateSelectedText(){if(!this.multiple){if(""!==this.value){const t=this.options.find((t=>t.value===this.value));t?this.text=this._getOptionDisplayText(t):(this.text="",console.warn(`No dropdown option found with value: ${this.value}`))}this._isSearchVisible&&this.text&&(this.searchText=this.text===this.placeholder?"":this.text,this.searchEl.value=this.searchText)}}},o=new WeakMap,C=new WeakMap,I=new WeakMap,M=new WeakMap,P=new WeakMap,D=new WeakMap,W=new WeakMap,N=new WeakMap,V=new WeakMap,B=new WeakMap,L=new WeakMap,q=new WeakMap,j=new WeakMap,R=new WeakMap,U=new WeakMap,F=new WeakMap,K=new WeakMap,Y=new WeakMap,H=new WeakMap,X=new WeakMap,G=new WeakMap,J=new WeakMap,Q=new WeakMap,Z=new WeakMap,tt=new WeakMap,et=new WeakMap,it=new WeakMap,st=new WeakMap,lt=new WeakMap,nt=new WeakMap,ot=new WeakMap,at=new WeakMap,dt=new WeakMap,rt=new WeakMap,ht=new WeakMap,ct=new WeakMap,pt=new WeakMap,ut=new WeakMap,vt=new WeakMap,mt=new WeakMap,gt=new WeakMap,ft=new WeakMap,xt=new WeakMap,bt=new WeakMap,kt=new WeakMap,yt=new WeakMap,t(_t,"Dropdown"),(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=xe[Symbol.metadata])&&void 0!==t?t:null):void 0;Ot=[p({type:String})],St=[p({type:String})],At=[p({type:String,attribute:"kind"})],Et=[p({type:Boolean})],Tt=[p({type:String})],$t=[p({type:String})],zt=[p({type:Boolean,reflect:!0})],Ct=[p({type:Boolean})],It=[p({type:Number})],Mt=[p({type:Boolean})],Pt=[p({type:Boolean,reflect:!0})],Dt=[p({type:Boolean})],Wt=[p({type:Boolean})],Nt=[p({type:Boolean})],Vt=[p({type:Boolean})],Bt=[p({type:Boolean})],Lt=[p({type:Boolean})],qt=[p({type:Boolean})],jt=[p({type:String})],Rt=[p({type:String})],Ut=[p({type:String})],Ft=[p({type:Boolean})],Kt=[p({type:Boolean})],Yt=[p({type:Object})],Ht=[p({type:Boolean})],Xt=[p({type:Boolean})],Gt=[u()],Jt=[u()],Qt=[u()],Zt=[p({type:Boolean})],te=[p({attribute:!1})],ee=[p({type:Boolean})],ie=[u()],se=[u()],le=[u()],ne=[p({type:String})],oe=[u()],ae=[v(".search")],de=[v(".select")],re=[v(".options")],he=[v(".clear-multiple")],ce=[v('slot[name="add-option-input"]')],pe=[v('slot[name="add-option-button"]')],ue=[u()],ve=[u()],me=[u()],e(_t,null,Ot,{kind:"accessor",name:"label",static:!1,private:!1,access:{has:t=>"label"in t,get:t=>t.label,set:(t,e)=>{t.label=e}},metadata:i},be,ke),e(_t,null,St,{kind:"accessor",name:"size",static:!1,private:!1,access:{has:t=>"size"in t,get:t=>t.size,set:(t,e)=>{t.size=e}},metadata:i},ye,we),e(_t,null,At,{kind:"accessor",name:"kind",static:!1,private:!1,access:{has:t=>"kind"in t,get:t=>t.kind,set:(t,e)=>{t.kind=e}},metadata:i},_e,Oe),e(_t,null,Et,{kind:"accessor",name:"inline",static:!1,private:!1,access:{has:t=>"inline"in t,get:t=>t.inline,set:(t,e)=>{t.inline=e}},metadata:i},Se,Ae),e(_t,null,Tt,{kind:"accessor",name:"caption",static:!1,private:!1,access:{has:t=>"caption"in t,get:t=>t.caption,set:(t,e)=>{t.caption=e}},metadata:i},Ee,Te),e(_t,null,$t,{kind:"accessor",name:"placeholder",static:!1,private:!1,access:{has:t=>"placeholder"in t,get:t=>t.placeholder,set:(t,e)=>{t.placeholder=e}},metadata:i},$e,ze),e(_t,null,zt,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:t=>"open"in t,get:t=>t.open,set:(t,e)=>{t.open=e}},metadata:i},Ce,Ie),e(_t,null,Ct,{kind:"accessor",name:"searchable",static:!1,private:!1,access:{has:t=>"searchable"in t,get:t=>t.searchable,set:(t,e)=>{t.searchable=e}},metadata:i},Me,Pe),e(_t,null,It,{kind:"accessor",name:"searchThreshold",static:!1,private:!1,access:{has:t=>"searchThreshold"in t,get:t=>t.searchThreshold,set:(t,e)=>{t.searchThreshold=e}},metadata:i},De,We),e(_t,null,Mt,{kind:"accessor",name:"enhanced",static:!1,private:!1,access:{has:t=>"enhanced"in t,get:t=>t.enhanced,set:(t,e)=>{t.enhanced=e}},metadata:i},Ne,Ve),e(_t,null,Pt,{kind:"accessor",name:"readonly",static:!1,private:!1,access:{has:t=>"readonly"in t,get:t=>t.readonly,set:(t,e)=>{t.readonly=e}},metadata:i},Be,Le),e(_t,null,Dt,{kind:"accessor",name:"filterSearch",static:!1,private:!1,access:{has:t=>"filterSearch"in t,get:t=>t.filterSearch,set:(t,e)=>{t.filterSearch=e}},metadata:i},qe,je),e(_t,null,Wt,{kind:"accessor",name:"multiple",static:!1,private:!1,access:{has:t=>"multiple"in t,get:t=>t.multiple,set:(t,e)=>{t.multiple=e}},metadata:i},Re,Ue),e(_t,null,Nt,{kind:"accessor",name:"required",static:!1,private:!1,access:{has:t=>"required"in t,get:t=>t.required,set:(t,e)=>{t.required=e}},metadata:i},Fe,Ke),e(_t,null,Vt,{kind:"accessor",name:"hideLabel",static:!1,private:!1,access:{has:t=>"hideLabel"in t,get:t=>t.hideLabel,set:(t,e)=>{t.hideLabel=e}},metadata:i},Ye,He),e(_t,null,Bt,{kind:"accessor",name:"disabled",static:!1,private:!1,access:{has:t=>"disabled"in t,get:t=>t.disabled,set:(t,e)=>{t.disabled=e}},metadata:i},Xe,Ge),e(_t,null,Lt,{kind:"accessor",name:"hideTags",static:!1,private:!1,access:{has:t=>"hideTags"in t,get:t=>t.hideTags,set:(t,e)=>{t.hideTags=e}},metadata:i},Je,Qe),e(_t,null,qt,{kind:"accessor",name:"selectAll",static:!1,private:!1,access:{has:t=>"selectAll"in t,get:t=>t.selectAll,set:(t,e)=>{t.selectAll=e}},metadata:i},Ze,ti),e(_t,null,jt,{kind:"accessor",name:"selectAllText",static:!1,private:!1,access:{has:t=>"selectAllText"in t,get:t=>t.selectAllText,set:(t,e)=>{t.selectAllText=e}},metadata:i},ei,ii),e(_t,null,Rt,{kind:"accessor",name:"menuMinWidth",static:!1,private:!1,access:{has:t=>"menuMinWidth"in t,get:t=>t.menuMinWidth,set:(t,e)=>{t.menuMinWidth=e}},metadata:i},si,li),e(_t,null,Ut,{kind:"accessor",name:"openDirection",static:!1,private:!1,access:{has:t=>"openDirection"in t,get:t=>t.openDirection,set:(t,e)=>{t.openDirection=e}},metadata:i},ni,oi),e(_t,null,Ft,{kind:"accessor",name:"selectAllChecked",static:!1,private:!1,access:{has:t=>"selectAllChecked"in t,get:t=>t.selectAllChecked,set:(t,e)=>{t.selectAllChecked=e}},metadata:i},ai,di),e(_t,null,Kt,{kind:"accessor",name:"selectAllIndeterminate",static:!1,private:!1,access:{has:t=>"selectAllIndeterminate"in t,get:t=>t.selectAllIndeterminate,set:(t,e)=>{t.selectAllIndeterminate=e}},metadata:i},ri,hi),e(_t,null,Yt,{kind:"accessor",name:"textStrings",static:!1,private:!1,access:{has:t=>"textStrings"in t,get:t=>t.textStrings,set:(t,e)=>{t.textStrings=e}},metadata:i},ci,pi),e(_t,null,Ht,{kind:"accessor",name:"allowAddOption",static:!1,private:!1,access:{has:t=>"allowAddOption"in t,get:t=>t.allowAddOption,set:(t,e)=>{t.allowAddOption=e}},metadata:i},ui,vi),e(_t,null,Xt,{kind:"accessor",name:"fixedPosition",static:!1,private:!1,access:{has:t=>"fixedPosition"in t,get:t=>t.fixedPosition,set:(t,e)=>{t.fixedPosition=e}},metadata:i},mi,gi),e(_t,null,Gt,{kind:"accessor",name:"_hasSlottedAddOptionInput",static:!1,private:!1,access:{has:t=>"_hasSlottedAddOptionInput"in t,get:t=>t._hasSlottedAddOptionInput,set:(t,e)=>{t._hasSlottedAddOptionInput=e}},metadata:i},fi,xi),e(_t,null,Jt,{kind:"accessor",name:"_hasSlottedAddOptionButton",static:!1,private:!1,access:{has:t=>"_hasSlottedAddOptionButton"in t,get:t=>t._hasSlottedAddOptionButton,set:(t,e)=>{t._hasSlottedAddOptionButton=e}},metadata:i},bi,ki),e(_t,null,Qt,{kind:"accessor",name:"_lastAddOptionInvalidText",static:!1,private:!1,access:{has:t=>"_lastAddOptionInvalidText"in t,get:t=>t._lastAddOptionInvalidText,set:(t,e)=>{t._lastAddOptionInvalidText=e}},metadata:i},yi,wi),e(_t,null,Zt,{kind:"accessor",name:"preventDuplicateAddOption",static:!1,private:!1,access:{has:t=>"preventDuplicateAddOption"in t,get:t=>t.preventDuplicateAddOption,set:(t,e)=>{t.preventDuplicateAddOption=e}},metadata:i},_i,Oi),e(_t,null,te,{kind:"accessor",name:"addOptionValidator",static:!1,private:!1,access:{has:t=>"addOptionValidator"in t,get:t=>t.addOptionValidator,set:(t,e)=>{t.addOptionValidator=e}},metadata:i},Si,Ai),e(_t,null,ee,{kind:"accessor",name:"allowDuplicateSelections",static:!1,private:!1,access:{has:t=>"allowDuplicateSelections"in t,get:t=>t.allowDuplicateSelections,set:(t,e)=>{t.allowDuplicateSelections=e}},metadata:i},Ei,Ti),e(_t,null,ie,{kind:"accessor",name:"_textStrings",static:!1,private:!1,access:{has:t=>"_textStrings"in t,get:t=>t._textStrings,set:(t,e)=>{t._textStrings=e}},metadata:i},$i,zi),e(_t,null,se,{kind:"accessor",name:"newOptionValue",static:!1,private:!1,access:{has:t=>"newOptionValue"in t,get:t=>t.newOptionValue,set:(t,e)=>{t.newOptionValue=e}},metadata:i},Ci,Ii),e(_t,null,le,{kind:"accessor",name:"text",static:!1,private:!1,access:{has:t=>"text"in t,get:t=>t.text,set:(t,e)=>{t.text=e}},metadata:i},Mi,Pi),e(_t,null,ne,{kind:"accessor",name:"searchText",static:!1,private:!1,access:{has:t=>"searchText"in t,get:t=>t.searchText,set:(t,e)=>{t.searchText=e}},metadata:i},Di,Wi),e(_t,null,oe,{kind:"accessor",name:"assistiveText",static:!1,private:!1,access:{has:t=>"assistiveText"in t,get:t=>t.assistiveText,set:(t,e)=>{t.assistiveText=e}},metadata:i},Ni,Vi),e(_t,null,ae,{kind:"accessor",name:"searchEl",static:!1,private:!1,access:{has:t=>"searchEl"in t,get:t=>t.searchEl,set:(t,e)=>{t.searchEl=e}},metadata:i},Bi,Li),e(_t,null,de,{kind:"accessor",name:"buttonEl",static:!1,private:!1,access:{has:t=>"buttonEl"in t,get:t=>t.buttonEl,set:(t,e)=>{t.buttonEl=e}},metadata:i},qi,ji),e(_t,null,re,{kind:"accessor",name:"listboxEl",static:!1,private:!1,access:{has:t=>"listboxEl"in t,get:t=>t.listboxEl,set:(t,e)=>{t.listboxEl=e}},metadata:i},Ri,Ui),e(_t,null,he,{kind:"accessor",name:"clearMultipleEl",static:!1,private:!1,access:{has:t=>"clearMultipleEl"in t,get:t=>t.clearMultipleEl,set:(t,e)=>{t.clearMultipleEl=e}},metadata:i},Fi,Ki),e(_t,null,ce,{kind:"accessor",name:"addOptionInputSlotEl",static:!1,private:!1,access:{has:t=>"addOptionInputSlotEl"in t,get:t=>t.addOptionInputSlotEl,set:(t,e)=>{t.addOptionInputSlotEl=e}},metadata:i},Yi,Hi),e(_t,null,pe,{kind:"accessor",name:"addOptionButtonSlotEl",static:!1,private:!1,access:{has:t=>"addOptionButtonSlotEl"in t,get:t=>t.addOptionButtonSlotEl,set:(t,e)=>{t.addOptionButtonSlotEl=e}},metadata:i},Xi,Gi),e(_t,null,ue,{kind:"accessor",name:"_openUpwards",static:!1,private:!1,access:{has:t=>"_openUpwards"in t,get:t=>t._openUpwards,set:(t,e)=>{t._openUpwards=e}},metadata:i},Ji,Qi),e(_t,null,ve,{kind:"accessor",name:"_tags",static:!1,private:!1,access:{has:t=>"_tags"in t,get:t=>t._tags,set:(t,e)=>{t._tags=e}},metadata:i},Zi,ts),e(_t,null,me,{kind:"accessor",name:"_fixedPosition",static:!1,private:!1,access:{has:t=>"_fixedPosition"in t,get:t=>t._fixedPosition,set:(t,e)=>{t._fixedPosition=e}},metadata:i},es,is),e(null,wt={value:_t},ge,{kind:"class",name:_t.name,metadata:i},null,fe),_t=wt.value,i&&Object.defineProperty(_t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),_t.styles=d($),i(_t,fe),_t})();export{C as Dropdown};
1217
+ `}handleSlotChange(){this.updateChildOptions(),this._updateOptions(),this._updateSelectedText()}updateChildOptions(){var t;(null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("#children")).assignedElements({flatten:!0}).forEach((t=>{const e=t.tagName;"KYN-DROPDOWN-OPTION"!==e&&"KYN-ENHANCED-DROPDOWN-OPTION"!==e||(t.allowAddOption=this.allowAddOption,t.multiple=this.multiple,t.readonly=this.readonly)}))}handleClick(){this.canOpen()&&(this.open=!this.open,this._isSearchVisible?this.searchEl.focus():this.buttonEl.focus())}handleButtonKeydown(t){var e;this.readonly?"Escape"===t.key&&(this.open=!1,null===(e=this.buttonEl)||void 0===e||e.focus()):this.handleKeyboard(t,t.keyCode,"button")}handleListKeydown(t){var e,i,s,l;const n=null!==(i=null===(e=t.composedPath)||void 0===e?void 0:e.call(t))&&void 0!==i?i:[],o=n.some((t=>{var e,i,s,l,n,o;const a=t;if(!a)return!1;const d=(null!==(e=a.tagName)&&void 0!==e?e:"").toUpperCase();return(null===(s=null===(i=a.classList)||void 0===i?void 0:i.contains)||void 0===s?void 0:s.call(i,"add-option-row"))||(null===(n=null===(l=a.classList)||void 0===l?void 0:l.contains)||void 0===n?void 0:n.call(l,"add-option-input"))||"KYN-TEXT-INPUT"===d||"INPUT"===d||Boolean(null===(o=a.closest)||void 0===o?void 0:o.call(a,".add-option"))}));if(o)return;const a=n.some((t=>{var e,i;const s=t;if(!s)return!1;const l=(null!==(e=s.tagName)&&void 0!==e?e:"").toUpperCase();return"KYN-DROPDOWN-OPTION"===l||"KYN-ENHANCED-DROPDOWN-OPTION"===l||Boolean(null===(i=s.closest)||void 0===i?void 0:i.call(s,"kyn-dropdown-option, kyn-enhanced-dropdown-option"))}));if(a)return;if(this.readonly)return void("Escape"===t.key&&(t.preventDefault(),this.open=!1,null===(l=null===(s=this.buttonEl)||void 0===s?void 0:s.focus)||void 0===l||l.call(s)));9!==t.keyCode&&t.preventDefault(),this.handleKeyboard(t,t.keyCode,"list")}_handleListFocus(){var t,e;const i=[...Array.from((null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".select-all"))||[]),...this.options.filter((t=>"none"!==t.style.display))],s=i.find((t=>!t.disabled));s&&(i.forEach((t=>t.highlighted=!1)),null===(e=s.focus)||void 0===e||e.call(s,{preventScroll:!0}),s.highlighted=!0,s.scrollIntoView({block:"nearest"}),this.assistiveText=s.text||"Option")}handleListBlur(t){if(this.multiple)return;this.options.forEach((t=>t.highlighted=!1));const e=t.relatedTarget;e&&(e.closest("kyn-dropdown-option")||e.closest("kyn-enhanced-dropdown-option")||e.classList.contains("search")||e.closest(".add-option"))||(this.open=!1,this.assistiveText="Dropdown menu options.")}handleKeyboard(t,e,i){var s,l,n,o,a,d,r,h,c,p,u,v,m,g,f,x,b,k,y,w,_,O,S;const A=[0,32],E=[...Array.from(null!==(l=null===(s=this.shadowRoot)||void 0===s?void 0:s.querySelectorAll(".select-all"))&&void 0!==l?l:[]),...this.options.filter((t=>"none"!==t.style.display))],T=E.find((t=>t.highlighted)),$=E.find((t=>t.selected));let C=T?E.indexOf(T):$?E.indexOf($):0;if(A.includes(e)&&t.preventDefault(),this.readonly){if(40===e||38===e){t.preventDefault();let i=40===e?(C+1)%E.length:(C-1+E.length)%E.length,s=0;for(;(null===(n=E[i])||void 0===n?void 0:n.disabled)&&s++<E.length;)i=40===e?(i+1)%E.length:(i-1+E.length)%E.length;const l=E[i],h=E[C];return void(l&&(h&&(h.highlighted=!1),null===(a=(o=l).focus)||void 0===a||a.call(o),l.highlighted=!0,null===(r=(d=l).scrollIntoView)||void 0===r||r.call(d,{block:"nearest"}),this.assistiveText=l.text||"Option"))}return A.includes(e)||13===e?void t.preventDefault():27===e?(this.open=!1,null===(c=null===(h=this._isSearchVisible?this.searchEl:this.buttonEl)||void 0===h?void 0:h.focus)||void 0===c||c.call(h),void(this.assistiveText="Dropdown menu options.")):void 0}const z=this.open;if("button"===i||"addOption"===i){let s=A.includes(e)||13===e||40===e||38===e;if(t.target===this.clearMultipleEl&&13===e){s=!1;const t=E[C];return t&&(t.highlighted=!1,t.selected=!t.selected),void(C=0)}s&&(this.open||(this.requestCloseOtherDropdowns(),this.open=!0),this.allowAddOption&&"button"===i&&13===e?setTimeout((()=>{var t,e,i;null===(i=null===(e=null===(t=this.addOptionInputSlotEl)||void 0===t?void 0:t.assignedElements({flatten:!0}))||void 0===e?void 0:e.find((t=>"function"==typeof(null==t?void 0:t.focus))))||void 0===i||i.focus()}),100):this.multiple||"string"!=typeof this.value||""===this.value||null===(u=null===(p=E[C])||void 0===p?void 0:p.scrollIntoView)||void 0===u||u.call(p,{block:"nearest"}))}switch(e){case 0:case 32:case 13:{const t=E[C];if(!t)return;return t.highlighted=!0,void(z&&(this.multiple?(t.selected=!t.selected,this._handleClick({detail:{value:t.value,selected:t.selected}})):(E.forEach((t=>{t.selected=!1})),t.selected=!0,this.updateValue(t.value,!0),this.emitValue(),this.open=!1,this.assistiveText=`Selected ${t.value}`)))}case 40:{let t=Boolean(T||$)?C===E.length-1?0:C+1:0;(null===(v=E[t])||void 0===v?void 0:v.disabled)&&(t=t===E.length-1?0:t+1);const e=E[t],i=E[C];return null===(m=null==e?void 0:e.focus)||void 0===m||m.call(e),i&&(i.tabIndex=-1),e&&(e.tabIndex=0),i&&(i.highlighted=!1),e&&(e.highlighted=!0),null===(g=null==e?void 0:e.scrollIntoView)||void 0===g||g.call(e,{block:"nearest"}),void(this.assistiveText=null!==(f=null==e?void 0:e.text)&&void 0!==f?f:"")}case 38:{let t=0===C?E.length-1:C-1;(null===(x=E[t])||void 0===x?void 0:x.disabled)&&(t=0===t?E.length-1:t-1);const e=E[t],i=E[C];return null===(b=null==e?void 0:e.focus)||void 0===b||b.call(e),i&&(i.tabIndex=-1),e&&(e.tabIndex=0),i&&(i.highlighted=!1),e&&(e.highlighted=!0),null===(k=null==e?void 0:e.scrollIntoView)||void 0===k||k.call(e,{block:"nearest"}),void(this.assistiveText=null!==(y=null==e?void 0:e.text)&&void 0!==y?y:"")}case 27:return this.open=!1,this._isSearchVisible?null===(_=null===(w=this.searchEl)||void 0===w?void 0:w.focus)||void 0===_||_.call(w):null===(S=null===(O=this.buttonEl)||void 0===O?void 0:O.focus)||void 0===S||S.call(O),void(this.assistiveText="Dropdown menu options.");default:return}}handleClearMultiple(t){var e;if(this.readonly)return;if(t.stopPropagation(),this.multiple){const t=(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot#children")).assignedElements().filter((t=>t.selected&&t.disabled)).map((t=>t.value));this.value=t.length?[...t]:[]}else this.value="";this._validate(!0,!1),this._updateSelectedOptions(),this.emitValue();const i=new CustomEvent("on-clear-all",{detail:{value:this.value}});this.dispatchEvent(i)}handleTagClear(t){this.readonly||(this.updateValue(t.value,!1),this._updateSelectedOptions(),this.emitValue())}handleClear(t){this.readonly||(t.stopPropagation(),this.text="",this.searchText="",this.searchEl.value="",this._emitSearch(),this.filterSearch&&this.options.map((t=>{t.style.display="block"})),this.multiple||(this.value="",this._validate(!0,!1),this._updateSelectedOptions(),this.emitValue()))}handleSearchClick(t){var e;this.readonly||(t.stopPropagation(),this.open||(this.requestCloseOtherDropdowns(),this.open=!0),""===(null!==(e=this.searchText)&&void 0!==e?e:"").trim()&&(this.searchText=""))}handleSearchKeydown(t){if(this.readonly)return"Escape"===t.key&&(this.open=!1,this.buttonEl.focus()),t.stopPropagation(),void t.preventDefault();t.stopPropagation();const e=this.options.find((t=>t.highlighted)),i=this.options.findIndex((t=>t.highlighted));this.searchTextEntered=!1,13===t.keyCode&&(this.searchTextEntered=!0,e?(this.prevSearchKeydownIndex!==i&&(this.multiple?e.selected=!e.selected:(this.options.forEach((t=>t.selected=!1)),e.selected=!0,this.open=!1),this.updateValue(e.value,e.selected)),e.selected?(this.assistiveText=`Selected ${e.innerHTML}`,this.prevSearchKeydownIndex=i):this.assistiveText=`Deselected ${e.innerHTML}`):this.assistiveText="No item matched."),27===t.keyCode&&(this.open=!1,this.buttonEl.focus())}handleSearchInput(t){if(this.readonly)return;const e=t.target.value;this.searchText=e,this.open||(this.requestCloseOtherDropdowns(),this.open=!0),this._emitSearch();const i=e.toLowerCase();if(this.filterSearch)return void this.options.forEach((t=>{const e=this._getOptionDisplayText(t).toLowerCase();t.style.display=e.includes(i)?"block":"none"}));const s=this.options.filter((t=>this._getOptionDisplayText(t).toLowerCase().startsWith(i)));this.options.forEach((t=>t.highlighted=!1)),""!==e&&s.length&&(s[0].highlighted=!0,s[0].scrollIntoView({block:"nearest"}),this.searchTextEntered&&(this.assistiveText="Option Matched"))}_updateSelectedOptions(){this.options.forEach((t=>{this.multiple?t.selected=this.valueArray.includes(t.value):t.selected=this.value===t.value}))}_handleClick(t){var e;if(!this.readonly){if("selectAll"===t.detail.value){this.selectAllChecked=t.detail.selected;const i=(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot#children")).assignedElements().filter((t=>t.selected&&t.disabled)).map((t=>t.value));t.detail.selected?(this.value=this.options.filter((t=>!t.disabled||t.disabled&&t.selected)).map((t=>t.value)),this.assistiveText="Selected all items."):(this.value=i.length?i:[],this.assistiveText="Deselected all items."),this._validate(!0,!1)}else this.updateValue(t.detail.value,t.detail.selected),this.assistiveText=t.detail.selected?`Selected ${t.detail.value}`:`Deselected ${t.detail.value}`;this._updateSelectedOptions(),this.multiple||(this.open=!1),this.emitValue()}}_handleBlur(t){var e,i,s;if(this.multiple)return;const l=null===(i=null===(e=t.detail)||void 0===e?void 0:e.origEvent)||void 0===i?void 0:i.relatedTarget;(null===(s=null==l?void 0:l.closest)||void 0===s?void 0:s.call(l,".remove-option"))||l&&(l.closest("kyn-dropdown-option")||l.closest("kyn-enhanced-dropdown-option")||"kyn-dropdown"===l.localName)||(this.open=!1)}_handleClickOut(t){t.composedPath().includes(this)||(this.open=!1)}requestCloseOtherDropdowns(){document.dispatchEvent(new CustomEvent("kyn-dropdown-open",{detail:{source:this}}))}_handleDropdownOpen(t){var e;(null===(e=t.detail)||void 0===e?void 0:e.source)!==this&&this.open&&(this.open=!1)}_getFixedMenuPlacement(){return"up"===this.openDirection?"top-start":"down"===this.openDirection?"bottom-start":this._openUpwards?"top-start":"bottom-start"}get _shouldUseFixedPosition(){return this.fixedPosition}_resetFixedMenuPosition(){const t=this.listboxEl;t&&(t.style.removeProperty("position"),t.style.removeProperty("top"),t.style.removeProperty("left"),t.style.removeProperty("right"),t.style.removeProperty("bottom"),t.style.removeProperty("width"),t.style.removeProperty("max-height"),t.style.removeProperty("z-index"))}async _positionFixedMenu(){const t=this.buttonEl,e=this.listboxEl;if(!t||!e)return;const i=t.getBoundingClientRect();e.style.width=`${i.width}px`;const s={boundary:document.body,rootBoundary:"viewport"},l=[f(4),..."auto"===this.openDirection?[x(s)]:[],b({padding:8,...s}),k({padding:8,...s,apply({availableHeight:t}){e.style.maxHeight=`${Math.max(120,t)}px`}})],{x:n,y:o,placement:a}=await y(t,e,{strategy:"fixed",placement:this._getFixedMenuPlacement(),middleware:l});this._openUpwards=a.startsWith("top"),Object.assign(e.style,{position:"fixed",left:`${n}px`,top:`${o}px`,right:"auto",bottom:"auto",zIndex:"var(--kd-z-overlay, 5000)"})}_stopFixedMenuPositioning(){var t;(this._fixedPositionCleanup||this._fixedPosition)&&(null===(t=this._fixedPositionCleanup)||void 0===t||t.call(this),this._fixedPositionCleanup=void 0,this._fixedPosition=!1,this._resetFixedMenuPosition())}_startFixedMenuPositioning(){var t;this._shouldUseFixedPosition&&(this._fixedPosition=!0,null===(t=this._fixedPositionCleanup)||void 0===t||t.call(this),this._fixedPositionCleanup=w(this.buttonEl,this.listboxEl,(()=>this._positionFixedMenu()),{elementResize:!1,layoutShift:!1}))}connectedCallback(){super.connectedCallback(),this._onConnected(),document.addEventListener("click",this._onDocumentClick),document.addEventListener("kyn-dropdown-open",this._onDropdownOpen),this.addEventListener("on-click",this._onChildClick),this.addEventListener("on-remove-option",this._onChildRemove),this.addEventListener("on-blur",this._onChildBlur)}disconnectedCallback(){var t;this._onDisconnected(),document.removeEventListener("click",this._onDocumentClick),document.removeEventListener("kyn-dropdown-open",this._onDropdownOpen),this.removeEventListener("on-click",this._onChildClick),this.removeEventListener("on-remove-option",this._onChildRemove),this.removeEventListener("on-blur",this._onChildBlur),this._stopFixedMenuPositioning(),null===(t=this._addOptionInputCleanup)||void 0===t||t.call(this),super.disconnectedCallback()}get valueArray(){return Array.isArray(this.value)?this.value:[]}updateValue(t,e=!1){if(!this.readonly){if(this.multiple){const i=[...this.valueArray];if(e)this.allowDuplicateSelections?i.push(t):i.includes(t)||i.push(t);else for(let e=i.length-1;e>=0;e--)i[e]===t&&i.splice(e,1);this.value=i}else this.value=t;this._validate(!0,!1),this.multiple||(this._isSearchVisible?this.searchEl:this.buttonEl).focus()}}_validate(t,e){const i=this.required&&!this.readonly&&(this.multiple?!Array.isArray(this.value)||0===this.value.length:""===this.value),s={customError:""!==this.invalidText,valueMissing:i},l=i?"Please fill out this field.":"",n=""!==this.invalidText?this.invalidText:l,o=this.buttonEl||this.listboxEl;this._internals.setValidity(s,n,null!=o?o:void 0),t&&(this._internalValidationMsg=l),e&&this._internals.reportValidity()}emitValue(){const t=new CustomEvent("on-change",{detail:{value:this.value}});this.dispatchEvent(t)}_emitSearch(){const t=new CustomEvent("on-search",{detail:{searchText:this.searchText}});this.dispatchEvent(t)}willUpdate(t){t.has("textStrings")&&(this._textStrings=O(C,this.textStrings))}updated(t){var e,i,s;super.updated(t),t.has("readonly")&&(null===(e=this.clearMultipleEl)||void 0===e||e.classList.toggle("is-readonly",this.readonly),null===(i=this.clearMultipleEl)||void 0===i||i.toggleAttribute("data-readonly",this.readonly)),t.has("kind")&&(this.dispatchEvent(new CustomEvent("kind-changed",{detail:this.kind,bubbles:!0,composed:!0})),this.classList.toggle("ai-connected","ai"===this.kind));const l=this.shadowRoot;if(l){if(t.has("open")){const t=l.querySelector('slot[name="anchor"]'),e=null==t?void 0:t.assignedElements({flatten:!0}),i=null==e?void 0:e.find((t=>!t.querySelector(".clear-multiple-icon"))),s=null==i?void 0:i.querySelector('span[slot="icon"]');s&&(s.style.transition="transform 0.2s ease-in-out",s.style.transform=this.open?"rotate(180deg)":"rotate(0deg)")}if(this._onUpdated(t),t.has("value")){this._updateOptions();const t=l.querySelector("slot#children").assignedElements().filter((t=>!t.disabled)),e=t.filter((t=>t.selected));this.selectAllChecked=e.length===t.length,this.selectAllIndeterminate=e.length>0&&e.length<t.length,this._updateTags(),this._updateSelectedText()}if(t.has("open")||t.has("openDirection")){if(this.open&&(this.options.forEach((t=>t.highlighted=!1)),!this._isSearchVisible&&this.listboxEl&&(this.listboxEl.focus({preventScroll:!0}),this.assistiveText="Selecting items. Use up and down arrow keys to navigate.")),"up"===this.openDirection)this._openUpwards=!0;else if("down"===this.openDirection)this._openUpwards=!1;else if(this.open){const t=this.buttonEl.getBoundingClientRect();this._openUpwards=t.top>.6*window.innerHeight}if(this.open&&!this.multiple){const t=this.options.find((t=>t.selected));null==t||t.scrollIntoView({block:"nearest"})}this.open&&this._shouldUseFixedPosition?this._startFixedMenuPositioning():!this.open&&this._fixedPosition&&this._stopFixedMenuPositioning()}t.has("fixedPosition")&&(this.open?this._startFixedMenuPositioning():this._shouldUseFixedPosition||this._stopFixedMenuPositioning()),t.has("multiple")&&this.options.forEach((t=>t.multiple=this.multiple)),t.has("searchText")&&this.searchEl&&(this.searchEl.value=this.searchText),(t.has("multiple")||t.has("allowAddOption")||t.has("readonly"))&&this.updateChildOptions(),t.has("open")&&this.open&&!this._isSearchVisible&&(null===(s=this.listboxEl)||void 0===s||s.focus({preventScroll:!0}))}}get hasSearch(){var t;return(null!==(t=this.searchText)&&void 0!==t?t:"").trim().length>0}_updateTags(){var t,e;if(!this.multiple)return;const i=new Map;for(const e of this.valueArray)i.set(e,(null!==(t=i.get(e))&&void 0!==t?t:0)+1);const s=this.options,l=[];for(const[t,n]of i.entries()){const i=s.find((e=>e.value===t));i&&l.push({value:t,text:this._getOptionDisplayText(i)||t,disabled:null!==(e=i.disabled)&&void 0!==e&&e,count:n})}this._tags=l}_updateOptions(){Array.from(this.querySelectorAll("kyn-dropdown-option, kyn-enhanced-dropdown-option")).forEach((t=>{t.multiple=this.multiple,this.multiple?t.selected=this.valueArray.includes(t.value):t.selected=this.value===t.value}))}_handleRemoveOption(){this.assistiveText="Option removed.",setTimeout((()=>{var t,e,i,s;this.open?null===(e=null===(t=this.listboxEl)||void 0===t?void 0:t.focus)||void 0===e||e.call(t,{preventScroll:!0}):null===(s=null===(i=this.buttonEl)||void 0===i?void 0:i.focus)||void 0===s||s.call(i)}),0)}_updateSelectedText(){if(!this.multiple){if(""!==this.value){const t=this.options.find((t=>t.value===this.value));t?this.text=this._getOptionDisplayText(t):(this.text="",console.warn(`No dropdown option found with value: ${this.value}`))}this._isSearchVisible&&this.text&&(this.searchText=this.text===this.placeholder?"":this.text,this.searchEl.value=this.searchText)}}},o=new WeakMap,z=new WeakMap,I=new WeakMap,M=new WeakMap,P=new WeakMap,D=new WeakMap,W=new WeakMap,N=new WeakMap,V=new WeakMap,L=new WeakMap,B=new WeakMap,q=new WeakMap,j=new WeakMap,R=new WeakMap,U=new WeakMap,F=new WeakMap,K=new WeakMap,Y=new WeakMap,H=new WeakMap,X=new WeakMap,G=new WeakMap,J=new WeakMap,Q=new WeakMap,Z=new WeakMap,tt=new WeakMap,et=new WeakMap,it=new WeakMap,st=new WeakMap,lt=new WeakMap,nt=new WeakMap,ot=new WeakMap,at=new WeakMap,dt=new WeakMap,rt=new WeakMap,ht=new WeakMap,ct=new WeakMap,pt=new WeakMap,ut=new WeakMap,vt=new WeakMap,mt=new WeakMap,gt=new WeakMap,ft=new WeakMap,xt=new WeakMap,bt=new WeakMap,kt=new WeakMap,yt=new WeakMap,wt=new WeakMap,t(Ot,"Dropdown"),(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=ke[Symbol.metadata])&&void 0!==t?t:null):void 0;St=[p({type:String})],At=[p({type:String})],Et=[p({type:String,attribute:"kind"})],Tt=[p({type:Boolean})],$t=[p({type:String})],Ct=[p({type:String})],zt=[p({type:Boolean,reflect:!0})],It=[p({type:Boolean})],Mt=[p({type:Number})],Pt=[p({type:Boolean})],Dt=[p({type:Boolean,reflect:!0})],Wt=[p({type:Boolean})],Nt=[p({type:Boolean})],Vt=[p({type:Boolean})],Lt=[p({type:Boolean})],Bt=[p({type:Boolean})],qt=[p({type:Boolean})],jt=[p({type:Number})],Rt=[p({type:Boolean})],Ut=[p({type:String})],Ft=[p({type:String})],Kt=[p({type:String})],Yt=[p({type:Boolean})],Ht=[p({type:Boolean})],Xt=[p({type:Object})],Gt=[p({type:Boolean})],Jt=[p({type:Boolean})],Qt=[u()],Zt=[u()],te=[u()],ee=[p({type:Boolean})],ie=[p({attribute:!1})],se=[p({type:Boolean})],le=[u()],ne=[u()],oe=[u()],ae=[p({type:String})],de=[u()],re=[v(".search")],he=[v(".select")],ce=[v(".options")],pe=[v(".clear-multiple")],ue=[v('slot[name="add-option-input"]')],ve=[v('slot[name="add-option-button"]')],me=[u()],ge=[u()],fe=[u()],e(Ot,null,St,{kind:"accessor",name:"label",static:!1,private:!1,access:{has:t=>"label"in t,get:t=>t.label,set:(t,e)=>{t.label=e}},metadata:i},ye,we),e(Ot,null,At,{kind:"accessor",name:"size",static:!1,private:!1,access:{has:t=>"size"in t,get:t=>t.size,set:(t,e)=>{t.size=e}},metadata:i},_e,Oe),e(Ot,null,Et,{kind:"accessor",name:"kind",static:!1,private:!1,access:{has:t=>"kind"in t,get:t=>t.kind,set:(t,e)=>{t.kind=e}},metadata:i},Se,Ae),e(Ot,null,Tt,{kind:"accessor",name:"inline",static:!1,private:!1,access:{has:t=>"inline"in t,get:t=>t.inline,set:(t,e)=>{t.inline=e}},metadata:i},Ee,Te),e(Ot,null,$t,{kind:"accessor",name:"caption",static:!1,private:!1,access:{has:t=>"caption"in t,get:t=>t.caption,set:(t,e)=>{t.caption=e}},metadata:i},$e,Ce),e(Ot,null,Ct,{kind:"accessor",name:"placeholder",static:!1,private:!1,access:{has:t=>"placeholder"in t,get:t=>t.placeholder,set:(t,e)=>{t.placeholder=e}},metadata:i},ze,Ie),e(Ot,null,zt,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:t=>"open"in t,get:t=>t.open,set:(t,e)=>{t.open=e}},metadata:i},Me,Pe),e(Ot,null,It,{kind:"accessor",name:"searchable",static:!1,private:!1,access:{has:t=>"searchable"in t,get:t=>t.searchable,set:(t,e)=>{t.searchable=e}},metadata:i},De,We),e(Ot,null,Mt,{kind:"accessor",name:"searchThreshold",static:!1,private:!1,access:{has:t=>"searchThreshold"in t,get:t=>t.searchThreshold,set:(t,e)=>{t.searchThreshold=e}},metadata:i},Ne,Ve),e(Ot,null,Pt,{kind:"accessor",name:"enhanced",static:!1,private:!1,access:{has:t=>"enhanced"in t,get:t=>t.enhanced,set:(t,e)=>{t.enhanced=e}},metadata:i},Le,Be),e(Ot,null,Dt,{kind:"accessor",name:"readonly",static:!1,private:!1,access:{has:t=>"readonly"in t,get:t=>t.readonly,set:(t,e)=>{t.readonly=e}},metadata:i},qe,je),e(Ot,null,Wt,{kind:"accessor",name:"filterSearch",static:!1,private:!1,access:{has:t=>"filterSearch"in t,get:t=>t.filterSearch,set:(t,e)=>{t.filterSearch=e}},metadata:i},Re,Ue),e(Ot,null,Nt,{kind:"accessor",name:"multiple",static:!1,private:!1,access:{has:t=>"multiple"in t,get:t=>t.multiple,set:(t,e)=>{t.multiple=e}},metadata:i},Fe,Ke),e(Ot,null,Vt,{kind:"accessor",name:"required",static:!1,private:!1,access:{has:t=>"required"in t,get:t=>t.required,set:(t,e)=>{t.required=e}},metadata:i},Ye,He),e(Ot,null,Lt,{kind:"accessor",name:"hideLabel",static:!1,private:!1,access:{has:t=>"hideLabel"in t,get:t=>t.hideLabel,set:(t,e)=>{t.hideLabel=e}},metadata:i},Xe,Ge),e(Ot,null,Bt,{kind:"accessor",name:"disabled",static:!1,private:!1,access:{has:t=>"disabled"in t,get:t=>t.disabled,set:(t,e)=>{t.disabled=e}},metadata:i},Je,Qe),e(Ot,null,qt,{kind:"accessor",name:"hideTags",static:!1,private:!1,access:{has:t=>"hideTags"in t,get:t=>t.hideTags,set:(t,e)=>{t.hideTags=e}},metadata:i},Ze,ti),e(Ot,null,jt,{kind:"accessor",name:"limitCount",static:!1,private:!1,access:{has:t=>"limitCount"in t,get:t=>t.limitCount,set:(t,e)=>{t.limitCount=e}},metadata:i},ei,ii),e(Ot,null,Rt,{kind:"accessor",name:"selectAll",static:!1,private:!1,access:{has:t=>"selectAll"in t,get:t=>t.selectAll,set:(t,e)=>{t.selectAll=e}},metadata:i},si,li),e(Ot,null,Ut,{kind:"accessor",name:"selectAllText",static:!1,private:!1,access:{has:t=>"selectAllText"in t,get:t=>t.selectAllText,set:(t,e)=>{t.selectAllText=e}},metadata:i},ni,oi),e(Ot,null,Ft,{kind:"accessor",name:"menuMinWidth",static:!1,private:!1,access:{has:t=>"menuMinWidth"in t,get:t=>t.menuMinWidth,set:(t,e)=>{t.menuMinWidth=e}},metadata:i},ai,di),e(Ot,null,Kt,{kind:"accessor",name:"openDirection",static:!1,private:!1,access:{has:t=>"openDirection"in t,get:t=>t.openDirection,set:(t,e)=>{t.openDirection=e}},metadata:i},ri,hi),e(Ot,null,Yt,{kind:"accessor",name:"selectAllChecked",static:!1,private:!1,access:{has:t=>"selectAllChecked"in t,get:t=>t.selectAllChecked,set:(t,e)=>{t.selectAllChecked=e}},metadata:i},ci,pi),e(Ot,null,Ht,{kind:"accessor",name:"selectAllIndeterminate",static:!1,private:!1,access:{has:t=>"selectAllIndeterminate"in t,get:t=>t.selectAllIndeterminate,set:(t,e)=>{t.selectAllIndeterminate=e}},metadata:i},ui,vi),e(Ot,null,Xt,{kind:"accessor",name:"textStrings",static:!1,private:!1,access:{has:t=>"textStrings"in t,get:t=>t.textStrings,set:(t,e)=>{t.textStrings=e}},metadata:i},mi,gi),e(Ot,null,Gt,{kind:"accessor",name:"allowAddOption",static:!1,private:!1,access:{has:t=>"allowAddOption"in t,get:t=>t.allowAddOption,set:(t,e)=>{t.allowAddOption=e}},metadata:i},fi,xi),e(Ot,null,Jt,{kind:"accessor",name:"fixedPosition",static:!1,private:!1,access:{has:t=>"fixedPosition"in t,get:t=>t.fixedPosition,set:(t,e)=>{t.fixedPosition=e}},metadata:i},bi,ki),e(Ot,null,Qt,{kind:"accessor",name:"_hasSlottedAddOptionInput",static:!1,private:!1,access:{has:t=>"_hasSlottedAddOptionInput"in t,get:t=>t._hasSlottedAddOptionInput,set:(t,e)=>{t._hasSlottedAddOptionInput=e}},metadata:i},yi,wi),e(Ot,null,Zt,{kind:"accessor",name:"_hasSlottedAddOptionButton",static:!1,private:!1,access:{has:t=>"_hasSlottedAddOptionButton"in t,get:t=>t._hasSlottedAddOptionButton,set:(t,e)=>{t._hasSlottedAddOptionButton=e}},metadata:i},_i,Oi),e(Ot,null,te,{kind:"accessor",name:"_lastAddOptionInvalidText",static:!1,private:!1,access:{has:t=>"_lastAddOptionInvalidText"in t,get:t=>t._lastAddOptionInvalidText,set:(t,e)=>{t._lastAddOptionInvalidText=e}},metadata:i},Si,Ai),e(Ot,null,ee,{kind:"accessor",name:"preventDuplicateAddOption",static:!1,private:!1,access:{has:t=>"preventDuplicateAddOption"in t,get:t=>t.preventDuplicateAddOption,set:(t,e)=>{t.preventDuplicateAddOption=e}},metadata:i},Ei,Ti),e(Ot,null,ie,{kind:"accessor",name:"addOptionValidator",static:!1,private:!1,access:{has:t=>"addOptionValidator"in t,get:t=>t.addOptionValidator,set:(t,e)=>{t.addOptionValidator=e}},metadata:i},$i,Ci),e(Ot,null,se,{kind:"accessor",name:"allowDuplicateSelections",static:!1,private:!1,access:{has:t=>"allowDuplicateSelections"in t,get:t=>t.allowDuplicateSelections,set:(t,e)=>{t.allowDuplicateSelections=e}},metadata:i},zi,Ii),e(Ot,null,le,{kind:"accessor",name:"_textStrings",static:!1,private:!1,access:{has:t=>"_textStrings"in t,get:t=>t._textStrings,set:(t,e)=>{t._textStrings=e}},metadata:i},Mi,Pi),e(Ot,null,ne,{kind:"accessor",name:"newOptionValue",static:!1,private:!1,access:{has:t=>"newOptionValue"in t,get:t=>t.newOptionValue,set:(t,e)=>{t.newOptionValue=e}},metadata:i},Di,Wi),e(Ot,null,oe,{kind:"accessor",name:"text",static:!1,private:!1,access:{has:t=>"text"in t,get:t=>t.text,set:(t,e)=>{t.text=e}},metadata:i},Ni,Vi),e(Ot,null,ae,{kind:"accessor",name:"searchText",static:!1,private:!1,access:{has:t=>"searchText"in t,get:t=>t.searchText,set:(t,e)=>{t.searchText=e}},metadata:i},Li,Bi),e(Ot,null,de,{kind:"accessor",name:"assistiveText",static:!1,private:!1,access:{has:t=>"assistiveText"in t,get:t=>t.assistiveText,set:(t,e)=>{t.assistiveText=e}},metadata:i},qi,ji),e(Ot,null,re,{kind:"accessor",name:"searchEl",static:!1,private:!1,access:{has:t=>"searchEl"in t,get:t=>t.searchEl,set:(t,e)=>{t.searchEl=e}},metadata:i},Ri,Ui),e(Ot,null,he,{kind:"accessor",name:"buttonEl",static:!1,private:!1,access:{has:t=>"buttonEl"in t,get:t=>t.buttonEl,set:(t,e)=>{t.buttonEl=e}},metadata:i},Fi,Ki),e(Ot,null,ce,{kind:"accessor",name:"listboxEl",static:!1,private:!1,access:{has:t=>"listboxEl"in t,get:t=>t.listboxEl,set:(t,e)=>{t.listboxEl=e}},metadata:i},Yi,Hi),e(Ot,null,pe,{kind:"accessor",name:"clearMultipleEl",static:!1,private:!1,access:{has:t=>"clearMultipleEl"in t,get:t=>t.clearMultipleEl,set:(t,e)=>{t.clearMultipleEl=e}},metadata:i},Xi,Gi),e(Ot,null,ue,{kind:"accessor",name:"addOptionInputSlotEl",static:!1,private:!1,access:{has:t=>"addOptionInputSlotEl"in t,get:t=>t.addOptionInputSlotEl,set:(t,e)=>{t.addOptionInputSlotEl=e}},metadata:i},Ji,Qi),e(Ot,null,ve,{kind:"accessor",name:"addOptionButtonSlotEl",static:!1,private:!1,access:{has:t=>"addOptionButtonSlotEl"in t,get:t=>t.addOptionButtonSlotEl,set:(t,e)=>{t.addOptionButtonSlotEl=e}},metadata:i},Zi,ts),e(Ot,null,me,{kind:"accessor",name:"_openUpwards",static:!1,private:!1,access:{has:t=>"_openUpwards"in t,get:t=>t._openUpwards,set:(t,e)=>{t._openUpwards=e}},metadata:i},es,is),e(Ot,null,ge,{kind:"accessor",name:"_tags",static:!1,private:!1,access:{has:t=>"_tags"in t,get:t=>t._tags,set:(t,e)=>{t._tags=e}},metadata:i},ss,ls),e(Ot,null,fe,{kind:"accessor",name:"_fixedPosition",static:!1,private:!1,access:{has:t=>"_fixedPosition"in t,get:t=>t._fixedPosition,set:(t,e)=>{t._fixedPosition=e}},metadata:i},ns,os),e(null,_t={value:Ot},xe,{kind:"class",name:Ot.name,metadata:i},null,be),Ot=_t.value,i&&Object.defineProperty(Ot,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),Ot.styles=d($),i(Ot,be),Ot})();export{z as Dropdown};
1214
1218
  //# sourceMappingURL=dropdown.js.map