@aurodesignsystem/auro-formkit 5.8.1 → 5.9.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +7 -15
  2. package/components/checkbox/demo/api.min.js +1 -1
  3. package/components/checkbox/demo/index.min.js +1 -1
  4. package/components/checkbox/dist/index.js +1 -1
  5. package/components/checkbox/dist/registered.js +1 -1
  6. package/components/combobox/demo/api.md +7 -6
  7. package/components/combobox/demo/api.min.js +1651 -987
  8. package/components/combobox/demo/index.min.js +1651 -987
  9. package/components/combobox/dist/auro-combobox.d.ts +9 -8
  10. package/components/combobox/dist/index.js +86 -85
  11. package/components/combobox/dist/registered.js +86 -85
  12. package/components/counter/demo/api.min.js +2 -2
  13. package/components/counter/demo/index.min.js +2 -2
  14. package/components/counter/dist/index.js +2 -2
  15. package/components/counter/dist/registered.js +2 -2
  16. package/components/datepicker/demo/api.min.js +4 -3
  17. package/components/datepicker/demo/index.min.js +4 -3
  18. package/components/datepicker/dist/index.js +4 -3
  19. package/components/datepicker/dist/registered.js +4 -3
  20. package/components/dropdown/demo/api.min.js +1 -1
  21. package/components/dropdown/demo/index.min.js +1 -1
  22. package/components/dropdown/dist/index.js +1 -1
  23. package/components/dropdown/dist/registered.js +1 -1
  24. package/components/input/demo/api.min.js +2 -1
  25. package/components/input/demo/index.min.js +2 -1
  26. package/components/input/dist/index.js +2 -1
  27. package/components/input/dist/registered.js +2 -1
  28. package/components/menu/demo/api.js +4 -0
  29. package/components/menu/demo/api.md +271 -26
  30. package/components/menu/demo/api.min.js +1591 -863
  31. package/components/menu/demo/index.html +1 -0
  32. package/components/menu/demo/index.js +2 -0
  33. package/components/menu/demo/index.md +95 -1
  34. package/components/menu/demo/index.min.js +1524 -810
  35. package/components/menu/dist/auro-menu.context.d.ts +222 -0
  36. package/components/menu/dist/auro-menu.d.ts +93 -53
  37. package/components/menu/dist/auro-menuoption.d.ts +115 -13
  38. package/components/menu/dist/index.js +1441 -798
  39. package/components/menu/dist/registered.js +1440 -809
  40. package/components/radio/demo/api.min.js +1 -1
  41. package/components/radio/demo/index.min.js +1 -1
  42. package/components/radio/dist/index.js +1 -1
  43. package/components/radio/dist/registered.js +1 -1
  44. package/components/select/demo/api.md +8 -7
  45. package/components/select/demo/api.min.js +1573 -1006
  46. package/components/select/demo/index.min.js +1573 -1006
  47. package/components/select/dist/auro-select.d.ts +11 -35
  48. package/components/select/dist/index.js +64 -160
  49. package/components/select/dist/registered.js +64 -160
  50. package/package.json +2 -1
@@ -3,34 +3,34 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$3=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$3)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$4&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$3("string"==typeof t?t:t+"",void 0,s$3),i$5=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$3(o,t,s$3)},S$1=(s,o)=>{if(e$4)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
6
+ const t$2=globalThis,e$5=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$6=Symbol(),o$5=new WeakMap;let n$4 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$6)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$5&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$4("string"==typeof t?t:t+"",void 0,s$6),i$6=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$4(o,t,s$6)},S$1=(s,o)=>{if(e$5)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$5?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
7
7
 
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
- */const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$2=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$3={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$2=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$3,reflect:false,useDefault:false,hasChanged:f$2};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$2 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$3).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$3;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$2)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$2.elementStyles=[],y$2.shadowRootOptions={mode:"open"},y$2[d$1("elementProperties")]=new Map,y$2[d$1("finalized")]=new Map,p$2?.({ReactiveElement:y$2}),(a$2.reactiveElementVersions??=[]).push("2.1.1");
12
+ */const{is:i$5,defineProperty:e$4,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$3}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$2=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$3={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$2=(t,s)=>!i$5(t,s),b={attribute:true,type:String,converter:u$3,reflect:false,useDefault:false,hasChanged:f$2};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$2 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$4(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$3(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$3).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$3;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$2)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$2.elementStyles=[],y$2.shadowRootOptions={mode:"open"},y$2[d$1("elementProperties")]=new Map,y$2[d$1("finalized")]=new Map,p$2?.({ReactiveElement:y$2}),(a$2.reactiveElementVersions??=[]).push("2.1.1");
13
13
 
14
14
  /**
15
15
  * @license
16
16
  * Copyright 2017 Google LLC
17
17
  * SPDX-License-Identifier: BSD-3-Clause
18
18
  */
19
- const t$1=globalThis,i$3=t$1.trustedTypes,s$2=i$3?i$3.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$2="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$1=`<${o$3}>`,r=document,l$1=()=>r.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$1=Array.isArray,u$2=t=>a$1(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m$1=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$1=/'/g,g$1=/"/g,$=/^(?:script|style|textarea|title)$/i,y$1=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x$1=y$1(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a$1(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$2?s$2.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$1;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f$1?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$1):void 0!==u[3]&&(c=m$1):c===m$1?">"===u[0]?(c=r??f$1,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m$1:'"'===u[3]?g$1:p$1):c===g$1||c===p$1?c=m$1:c===v||c===_?c=f$1:(c=m$1,r=void 0);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$1?s+n$1:d>=0?(o.push(a),s.slice(0,d)+e$2+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$2)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k$1}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$3?i$3.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$1()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$1());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,true);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z$1(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$2(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a$1(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$1()),this.O(l$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}let k$1 = class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};class H extends k$1{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k$1{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k$1{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}let z$1 = class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t);}};const j=t$1.litHtmlPolyfillSupport;j?.(N,R),(t$1.litHtmlVersions??=[]).push("3.3.1");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l$1(),t),t,void 0,s??{});}return h._$AI(t),h};
19
+ const t$1=globalThis,i$4=t$1.trustedTypes,s$5=i$4?i$4.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$3="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$2=`<${o$3}>`,r=document,l$1=()=>r.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$1=Array.isArray,u$2=t=>a$1(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m$1=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$1=/'/g,g$1=/"/g,$=/^(?:script|style|textarea|title)$/i,y$1=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x$1=y$1(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a$1(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$5?s$5.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$1;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f$1?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$1):void 0!==u[3]&&(c=m$1):c===m$1?">"===u[0]?(c=r??f$1,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m$1:'"'===u[3]?g$1:p$1):c===g$1||c===p$1?c=m$1:c===v||c===_?c=f$1:(c=m$1,r=void 0);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$1?s+n$2:d>=0?(o.push(a),s.slice(0,d)+e$3+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$3)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k$1}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$4?i$4.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$1()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$1());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,true);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z$1(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$2(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a$1(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$1()),this.O(l$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}let k$1 = class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};class H extends k$1{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k$1{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k$1{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}let z$1 = class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t);}};const j=t$1.litHtmlPolyfillSupport;j?.(N,R),(t$1.litHtmlVersions??=[]).push("3.3.1");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l$1(),t),t,void 0,s??{});}return h._$AI(t),h};
20
20
 
21
21
  /**
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
24
24
  * SPDX-License-Identifier: BSD-3-Clause
25
- */const s$1=globalThis;let i$2 = class i extends y$2{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T}};i$2._$litElement$=true,i$2["finalized"]=true,s$1.litElementHydrateSupport?.({LitElement:i$2});const o$2=s$1.litElementPolyfillSupport;o$2?.({LitElement:i$2});(s$1.litElementVersions??=[]).push("4.2.1");
25
+ */const s$4=globalThis;let i$3 = class i extends y$2{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T}};i$3._$litElement$=true,i$3["finalized"]=true,s$4.litElementHydrateSupport?.({LitElement:i$3});const o$2=s$4.litElementPolyfillSupport;o$2?.({LitElement:i$3});(s$4.litElementVersions??=[]).push("4.2.1");
26
26
 
27
- var styleCss$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{display:block;vertical-align:middle;line-height:0}:host .menuWrapper{box-sizing:border-box;display:flex;flex-direction:column;width:100%;margin:0;padding:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host [loadingplaceholder].empty{opacity:0;position:absolute}:host [loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;display:inline-block;margin-bottom:var(--ds-size-25, 0.125rem)}:host [loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}:host([root]){overflow-y:auto}:host([root]) .menuWrapper.lg{padding:var(--ds-size-150, 0.75rem);gap:var(--ds-size-50, 0.25rem)}:host([root]) .menuWrapper.xl{padding:var(--ds-size-200, 1rem);gap:var(--ds-size-100, 0.5rem)}`;
27
+ var styleCss$1 = i$6`:focus:not(:focus-visible){outline:3px solid transparent}.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{display:block;vertical-align:middle;line-height:0}:host .menuWrapper{box-sizing:border-box;display:flex;flex-direction:column;width:100%;margin:0;padding:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host [loadingplaceholder].empty{opacity:0;position:absolute}:host [loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;display:inline-block;margin-bottom:var(--ds-size-25, 0.125rem)}:host [loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}:host([root]){overflow-y:auto}:host([root]) .menuWrapper.lg{padding:var(--ds-size-150, 0.75rem);gap:var(--ds-size-50, 0.25rem)}:host([root]) .menuWrapper.xl{padding:var(--ds-size-200, 1rem);gap:var(--ds-size-100, 0.5rem)}`;
28
28
 
29
- var colorCss$1 = i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
29
+ var colorCss$1 = i$6`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
30
30
 
31
- var tokensCss = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-container-border-color: var(--ds-auro-menuoption-container-color);--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
31
+ var tokensCss = i$6`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-container-border-color: var(--ds-auro-menuoption-container-color);--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
32
32
 
33
- class AuroElement extends i$2 {
33
+ class AuroElement extends i$3 {
34
34
  static get properties() {
35
35
  return {
36
36
 
@@ -134,6 +134,50 @@ class AuroElement extends i$2 {
134
134
  }
135
135
  }
136
136
 
137
+ /**
138
+ * @license
139
+ * Copyright 2021 Google LLC
140
+ * SPDX-License-Identifier: BSD-3-Clause
141
+ */
142
+ let s$3 = class s extends Event{constructor(s,t,e,o){super("context-request",{bubbles:true,composed:true}),this.context=s,this.contextTarget=t,this.callback=e,this.subscribe=o??false;}};
143
+
144
+ /**
145
+ * @license
146
+ * Copyright 2021 Google LLC
147
+ * SPDX-License-Identifier: BSD-3-Clause
148
+ */
149
+ function n$1(n){return n}
150
+
151
+ /**
152
+ * @license
153
+ * Copyright 2021 Google LLC
154
+ * SPDX-License-Identifier: BSD-3-Clause
155
+ */let s$2 = class s{constructor(t,s,i,h){if(this.subscribe=false,this.provided=false,this.value=void 0,this.t=(t,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=false,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=true,this.callback&&this.callback(t,s)),this.unsubscribe=s;},this.host=t,void 0!==s.context){const t=s;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??false;}else this.context=s,this.callback=i,this.subscribe=h??false;this.host.addController(this);}hostConnected(){this.dispatchRequest();}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0);}dispatchRequest(){this.host.dispatchEvent(new s$3(this.context,this.host,this.t,this.subscribe));}};
156
+
157
+ /**
158
+ * @license
159
+ * Copyright 2021 Google LLC
160
+ * SPDX-License-Identifier: BSD-3-Clause
161
+ */
162
+ let s$1 = class s{get value(){return this.o}set value(s){this.setValue(s);}setValue(s,t=false){const i=t||!Object.is(s,this.o);this.o=s,i&&this.updateObservers();}constructor(s){this.subscriptions=new Map,this.updateObservers=()=>{for(const[s,{disposer:t}]of this.subscriptions)s(this.o,t);},void 0!==s&&(this.value=s);}addCallback(s,t,i){if(!i)return void s(this.value);this.subscriptions.has(s)||this.subscriptions.set(s,{disposer:()=>{this.subscriptions.delete(s);},consumerHost:t});const{disposer:h}=this.subscriptions.get(s);s(this.value,h);}clearCallbacks(){this.subscriptions.clear();}};
163
+
164
+ /**
165
+ * @license
166
+ * Copyright 2021 Google LLC
167
+ * SPDX-License-Identifier: BSD-3-Clause
168
+ */let e$2 = class e extends Event{constructor(t,s){super("context-provider",{bubbles:true,composed:true}),this.context=t,this.contextTarget=s;}};let i$2 = class i extends s$1{constructor(s,e,i){super(void 0!==e.context?e.initialValue:i),this.onContextRequest=t=>{if(t.context!==this.context)return;const s=t.contextTarget??t.composedPath()[0];s!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,s,t.subscribe));},this.onProviderRequest=s=>{if(s.context!==this.context)return;if((s.contextTarget??s.composedPath()[0])===this.host)return;const e=new Set;for(const[s,{consumerHost:i}]of this.subscriptions)e.has(s)||(e.add(s),i.dispatchEvent(new s$3(this.context,i,s,true)));s.stopPropagation();},this.host=s,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this);}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest);}hostConnected(){this.host.dispatchEvent(new e$2(this.context,this.host));}};
169
+
170
+ /**
171
+ * @license
172
+ * Copyright 2020 Google LLC
173
+ * SPDX-License-Identifier: BSD-3-Clause
174
+ */
175
+ const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u$1=n(x$1);
176
+
177
+ var styleCss = i$6`.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{cursor:pointer;user-select:none;text-overflow:ellipsis;max-width:100dvw}:host .wrapper{display:flex;align-items:center;padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);border-radius:var(--ds-size-100, 0.5rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box]{border-radius:unset}:host .wrapper[class*=shape-snowflake]{border-radius:unset;line-height:24px}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem);line-height:26px}:host .wrapper[class*=-xl]{padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem);line-height:26px}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}[slot=displayValue]{display:none}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
178
+
179
+ var colorCss = i$6`:host .wrapper{background-color:var(--ds-auro-menuoption-container-color, transparent);box-shadow:inset 0 0 0 1px var(--ds-auro-menuoption-container-border-color, transparent);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}:host(:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([selected]:hover),:host([selected].active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}:host([selected]:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host(:focus:hover),:host(:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([selected]:focus:hover),:host([selected]:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}`;
180
+
137
181
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
138
182
  // See LICENSE in the project root for license information.
139
183
 
@@ -217,21 +261,96 @@ class AuroLibraryRuntimeUtils {
217
261
  }
218
262
  }
219
263
 
220
- // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
264
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
221
265
  // See LICENSE in the project root for license information.
222
266
 
223
267
 
268
+ class AuroDependencyVersioning {
269
+
270
+ /**
271
+ * Generates a unique string to be used for child auro element naming.
272
+ * @private
273
+ * @param {string} baseName - Defines the first part of the unique element name.
274
+ * @param {string} version - Version of the component that will be appended to the baseName.
275
+ * @returns {string} - Unique string to be used for naming.
276
+ */
277
+ generateElementName(baseName, version) {
278
+ let result = baseName;
279
+
280
+ result += '-';
281
+ result += version.replace(/[.]/g, '_');
282
+
283
+ return result;
284
+ }
285
+
286
+ /**
287
+ * Generates a unique string to be used for child auro element naming.
288
+ * @param {string} baseName - Defines the first part of the unique element name.
289
+ * @param {string} version - Version of the component that will be appended to the baseName.
290
+ * @returns {string} - Unique string to be used for naming.
291
+ */
292
+ generateTag(baseName, version, tagClass) {
293
+ const elementName = this.generateElementName(baseName, version);
294
+ const tag = i$1`${s(elementName)}`;
295
+
296
+ if (!customElements.get(elementName)) {
297
+ customElements.define(elementName, class extends tagClass {});
298
+ }
299
+
300
+ return tag;
301
+ }
302
+ }
303
+
224
304
  /**
225
- * Validates if an option can be interacted with.
226
- * @private
227
- * @param {HTMLElement} option - The option to check.
228
- * @returns {boolean} True if option is interactive.
305
+ * @license
306
+ * Copyright 2017 Google LLC
307
+ * SPDX-License-Identifier: BSD-3-Clause
229
308
  */
230
- function isOptionInteractive(option) {
231
- return !option.hasAttribute('hidden') &&
232
- !option.hasAttribute('disabled') &&
233
- !option.hasAttribute('static');
234
- }
309
+ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
310
+
311
+ /**
312
+ * @license
313
+ * Copyright 2018 Google LLC
314
+ * SPDX-License-Identifier: BSD-3-Clause
315
+ */const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T}});
316
+
317
+ /**
318
+ * @license
319
+ * Copyright 2018 Google LLC
320
+ * SPDX-License-Identifier: BSD-3-Clause
321
+ */const o=o=>o??E;
322
+
323
+ class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,class extends a{});}closestElement(t,a=this,e=(a,s=a&&a.closest(t))=>a&&a!==document&&a!==window?s||e(a.getRootNode().host):null){return e(a)}handleComponentTagRename(t,a){const e=a.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,a){const e=a.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}}var u='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>';class m extends i$3{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}}const g=new Map,f=(t,a={})=>{const e=a.responseParser||(t=>t.text());return g.has(t)||g.set(t,fetch(t).then(e)),g.get(t)};var w=i$6`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem)!important;width:var(--ds-auro-icon-size, 1.5rem)!important;height:var(--ds-auro-icon-size, 1.5rem)!important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, .25rem);line-height:1.8}
324
+ `;class z extends m{constructor(){super(),this.onDark=false,this.appearance="default";}static get properties(){return {...m.properties,onDark:{type:Boolean,reflect:true},appearance:{type:String,reflect:true},svg:{attribute:false,reflect:true}}}static get styles(){return w}async fetchIcon(t,a){let e="";e="logos"===t?await f(`${this.uri}/${t}/${a}.svg`):await f(`${this.uri}/icons/${t}/${a}.svg`);return (new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const t=await this.fetchIcon(this.category,this.name);if(t)this.svg=t;else if(!t){const t=(new DOMParser).parseFromString(u,"text/html");this.svg=t.body.firstChild;}}}catch(t){this.svg=void 0;}}}i$6`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:inline-block;--ds-auro-icon-size: 100%;width:100%;height:100%}:host .logo{color:var(--ds-auro-alaska-color)}:host([onDark]),:host([appearance=inverse]){--ds-auro-alaska-color: #FFF}
325
+ `;var y=i$6`:host{--ds-auro-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color: #02426D;--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}
326
+ `;var k=i$6`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]),:host(:not([appearance=inverse])[variant=accent1]){--ds-auro-icon-color: var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]),:host(:not([appearance=inverse])[variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]),:host(:not([appearance=inverse])[variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]),:host(:not([appearance=inverse])[variant=statusDefault]){--ds-auro-icon-color: var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]),:host(:not([appearance=inverse])[variant=statusInfo]){--ds-auro-icon-color: var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]),:host(:not([appearance=inverse])[variant=statusSuccess]){--ds-auro-icon-color: var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]),:host(:not([appearance=inverse])[variant=statusWarning]){--ds-auro-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]),:host(:not([appearance=inverse])[variant=statusError]){--ds-auro-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]),:host(:not([appearance=inverse])[variant=statusInfoSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]),:host(:not([appearance=inverse])[variant=statusSuccessSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]),:host(:not([appearance=inverse])[variant=statusWarningSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]),:host(:not([appearance=inverse])[variant=statusErrorSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]),:host(:not([appearance=inverse])[variant=fareBasicEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]),:host(:not([appearance=inverse])[variant=fareBusiness]){--ds-auro-icon-color: var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]),:host(:not([appearance=inverse])[variant=fareEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]),:host(:not([appearance=inverse])[variant=fareFirst]){--ds-auro-icon-color: var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]),:host(:not([appearance=inverse])[variant=farePremiumEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]),:host(:not([appearance=inverse])[variant=tierOneWorldEmerald]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]),:host(:not([appearance=inverse])[variant=tierOneWorldSapphire]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]),:host(:not([appearance=inverse])[variant=tierOneWorldRuby]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]),:host([appearance=inverse][variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]),:host([appearance=inverse][variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]),:host([appearance=inverse][variant=statusError]){--ds-auro-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}
327
+ `;class x extends z{constructor(){super(),this.variant=void 0,this.privateDefaults();}privateDefaults(){this.uri="https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist",this.runtimeUtils=new p;}static get properties(){return {...z.properties,ariaHidden:{type:String,reflect:true},category:{type:String,reflect:true},customColor:{type:Boolean,reflect:true},customSvg:{type:Boolean},label:{type:Boolean,reflect:true},name:{type:String,reflect:true},variant:{type:String,reflect:true}}}static get styles(){return [z.styles,y,w,k]}static register(t="auro-icon"){p.prototype.registerComponent(t,x);}connectedCallback(){super.connectedCallback(),this.runtimeUtils.handleComponentTagRename(this,"auro-icon");}exposeCssParts(){this.setAttribute("exportparts","svg:iconSvg");}async firstUpdated(){if(await super.firstUpdated(),this.hasAttribute("ariaHidden")&&this.svg){const t=this.svg.querySelector("desc");t&&(t.remove(),this.svg.removeAttribute("aria-labelledby"));}}render(){const t={labelWrapper:true,util_displayHiddenVisually:!this.label};return x$1`
328
+ <div class="componentWrapper">
329
+ <div
330
+ class="${e({svgWrapper:true})}"
331
+ title="${o(this.title||void 0)}">
332
+ <span aria-hidden="${o(this.ariaHidden||true)}" part="svg">
333
+ ${this.customSvg?x$1`
334
+ <slot name="svg"></slot>
335
+ `:x$1`
336
+ ${this.svg}
337
+ `}
338
+ </span>
339
+ </div>
340
+
341
+ <div class="${e(t)}" part="label">
342
+ <slot></slot>
343
+ </div>
344
+ </div>
345
+ `}}
346
+
347
+ var iconVersion = '9.1.0';
348
+
349
+ var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
350
+
351
+ // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
352
+ // See LICENSE in the project root for license information.
353
+
235
354
 
236
355
  /**
237
356
  * Helper method to dispatch custom events.
@@ -253,164 +372,1208 @@ function dispatchMenuEvent(element, eventName, detail = null) {
253
372
  element.dispatchEvent(new CustomEvent(eventName, eventConfig));
254
373
  }
255
374
 
256
- /**
257
- * @license
258
- * Copyright 2017 Google LLC
259
- * SPDX-License-Identifier: BSD-3-Clause
260
- */
261
- const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
262
-
263
- /**
264
- * @license
265
- * Copyright 2018 Google LLC
266
- * SPDX-License-Identifier: BSD-3-Clause
267
- */const e=e$1(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T}});
268
-
269
- // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
375
+ // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
270
376
  // See LICENSE in the project root for license information.
271
377
 
272
378
 
273
-
274
- // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
275
379
  /**
276
- * The auro-menu element provides users a way to select from a list of options.
277
- * @attr {HTMLElement|Array<HTMLElement>} optionSelected - An array of currently selected menu options, type `HTMLElement` by default. In multi-select mode, `optionSelected` is an array of HTML elements.
278
- * @attr {object} optionactive - Specifies the current active menuOption.
279
- * @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
280
- * @attr {boolean} disabled - When true, the entire menu and all options are disabled;
281
- * @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
282
- * @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
283
- * @attr {boolean} multiselect - When true, the selected option can be multiple options.
284
- * @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
285
- * @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
286
- * @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
287
- * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Notifies when the loading attribute is changed.
288
- * @event {CustomEvent<any>} auroMenu-selectValueFailure - Notifies that an attempt to select a menuoption by matching a value has failed.
289
- * @event {CustomEvent<any>} auroMenu-selectValueReset - Notifies that the component value has been reset.
290
- * @event {CustomEvent<any>} auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
291
- * @slot loadingText - Text to show while loading attribute is set
292
- * @slot loadingIcon - Icon to show while loading attribute is set
293
- * @slot - Slot for insertion of menu options.
380
+ * The auro-menu element provides users a way to define a menu option.
381
+ *
382
+ * @attr {String} value - Specifies the value to be sent to a server.
383
+ * @attr {String} noCheckmark - When true, selected option will not show the checkmark.
384
+ * @attr {Boolean} disabled - When true specifies that the menuoption is disabled.
385
+ * @attr {Boolean} selected - Specifies that an option is selected.
386
+ * @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
387
+ * @slot - Specifies text for an option, but is not the value.
294
388
  */
389
+ class AuroMenuOption extends AuroElement {
295
390
 
296
- /* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
391
+ /**
392
+ * This will register this element with the browser.
393
+ * @param {string} [name="auro-menuoption"] - The name of element that you want to register to.
394
+ *
395
+ * @example
396
+ * AuroMenuOption.register("custom-menuoption") // this will register this element to <custom-menuoption/>
397
+ *
398
+ */
399
+ static register(name = "auro-menuoption") {
400
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenuOption);
401
+ }
402
+
403
+ /**
404
+ * Returns whether the menu option is currently active and selectable.
405
+ * An option is considered active if it is not hidden, not disabled, and not static.
406
+ * @returns {boolean} True if the option is active, false otherwise.
407
+ */
408
+ get isActive() {
409
+ return !this.hasAttribute('hidden') &&
410
+ !this.disabled &&
411
+ !this.hasAttribute('static');
412
+ }
297
413
 
298
- class AuroMenu extends AuroElement {
299
414
  constructor() {
300
415
  super();
301
416
 
302
- // State properties (reactive)
303
-
304
- /**
305
- * @private
306
- */
307
- this.shape = "box";
417
+ this.bindEvents();
308
418
 
309
419
  /**
310
420
  * @private
311
421
  */
312
- this.size = "sm";
313
-
314
- // Value of the selected options
315
- this.value = undefined;
316
- // Currently selected option
317
- this.optionSelected = undefined;
318
- // String used for highlighting/filtering
319
- this.matchWord = undefined;
320
- // Hide the checkmark icon on selected options
321
- this.noCheckmark = false;
322
- // Currently active option
323
- this.optionActive = undefined;
324
- // Loading state
325
- this.loading = false;
326
- // Multi-select mode
327
- this.multiSelect = false;
328
-
329
- // Event Bindings
422
+ this.shape = undefined;
330
423
 
331
424
  /**
332
425
  * @private
333
426
  */
334
- this.handleKeyDown = this.handleKeyDown.bind(this);
427
+ this.size = undefined;
335
428
 
336
429
  /**
337
- * @private
430
+ * Generate unique names for dependency components.
338
431
  */
339
- this.handleMouseSelect = this.handleMouseSelect.bind(this);
432
+ const versioning = new AuroDependencyVersioning();
433
+ this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, x);
340
434
 
341
- /**
342
- * @private
343
- */
344
- this.handleOptionHover = this.handleOptionHover.bind(this);
435
+ this.selected = false;
436
+ this.nocheckmark = false;
437
+ this.disabled = false;
345
438
 
346
439
  /**
347
440
  * @private
348
441
  */
349
- this.handleSlotChange = this.handleSlotChange.bind(this);
442
+ this.runtimeUtils = new AuroLibraryRuntimeUtils();
350
443
 
351
- // Instance properties (non-reactive)
444
+ // Initialize context-related properties
445
+ this.menuService = null;
446
+ this.unsubscribe = null;
352
447
 
353
448
  /**
354
449
  * @private
355
450
  */
356
- Object.assign(this, {
357
- // Root-level menu (true) or a nested submenu (false)
358
- rootMenu: true,
359
- // Currently focused/active menu item index
360
- index: -1,
361
- // Nested menu spacer
362
- nestingSpacer: '<span class="nestingSpacer"></span>',
363
- // Loading indicator for slot elements
364
- loadingSlots: null,
365
- // Store for menu items
366
- items: [],
367
- });
451
+ this.handleMenuChange = this.handleMenuChange.bind(this);
368
452
  }
369
453
 
370
454
  static get properties() {
371
455
  return {
372
456
  ...super.properties,
373
- noCheckmark: {
374
- type: Boolean,
375
- reflect: true,
376
- attribute: 'nocheckmark'
377
- },
378
457
  disabled: {
379
458
  type: Boolean,
380
459
  reflect: true
381
460
  },
382
- loading: {
383
- type: Boolean,
461
+ event: {
462
+ type: String,
384
463
  reflect: true
385
464
  },
386
- optionSelected: {
387
- // Allow HTMLElement, HTMLElement[] arrays and undefined
388
- type: Object
465
+ key: {
466
+ type: String,
467
+ reflect: true
389
468
  },
390
- optionActive: {
469
+ menuService: {
391
470
  type: Object,
392
- attribute: 'optionactive'
471
+ state: true
393
472
  },
394
473
  matchWord: {
395
474
  type: String,
396
- attribute: 'matchword'
475
+ state: true
397
476
  },
398
- multiSelect: {
477
+ nocheckmark: {
399
478
  type: Boolean,
400
- reflect: true,
401
- attribute: 'multiselect'
479
+ reflect: true
480
+ },
481
+ selected: {
482
+ type: Boolean,
483
+ reflect: true
484
+ },
485
+ tabIndex: {
486
+ type: Number,
487
+ reflect: true
402
488
  },
403
-
404
- /**
405
- * Value selected for the component.
406
- */
407
489
  value: {
408
490
  type: String,
409
- reflect: true,
410
- attribute: 'value'
491
+ reflect: true
411
492
  },
493
+ };
494
+ }
412
495
 
413
- /**
496
+ static get styles() {
497
+ return [
498
+ styleCss,
499
+ colorCss,
500
+ tokensCss
501
+ ];
502
+ }
503
+
504
+ connectedCallback() {
505
+ super.connectedCallback();
506
+
507
+ // Add the tag name as an attribute if it is different than the component name
508
+ // Add this step soon as this node gets attached to the DOM to avoid racing condition with menu's value setting logic.
509
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
510
+
511
+ // Set up context consumption in connectedCallback
512
+ this._contextConsumer = new s$2(this, {
513
+ context: MenuContext,
514
+ callback: this.attachTo.bind(this),
515
+ subscribe: true
516
+ });
517
+
518
+ // Establish the key property as early as possible
519
+ const valueAttr = this.getAttribute('value');
520
+ const keyAttr = this.getAttribute('key');
521
+ this.key = keyAttr !== null ? keyAttr : valueAttr;
522
+ }
523
+
524
+ firstUpdated() {
525
+ // Add the tag name as an attribute if it is different than the component name
526
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
527
+
528
+ this.setAttribute('role', 'option');
529
+ this.setAttribute('aria-selected', 'false');
530
+
531
+ this.addEventListener('mouseover', () => {
532
+ this.dispatchEvent(new CustomEvent('auroMenuOption-mouseover', {
533
+ bubbles: true,
534
+ cancelable: false,
535
+ composed: true,
536
+ detail: this
537
+ }));
538
+ });
539
+ }
540
+
541
+ updated(changedProperties) {
542
+ super.updated(changedProperties);
543
+
544
+ // Update aria-selected attribute if selected changed
545
+ if (changedProperties.has('selected')) {
546
+
547
+ // Update aria-selected attribute
548
+ this.setAttribute('aria-selected', this.selected.toString());
549
+
550
+ // Update menu service selection state if this isn't an internal update
551
+ if (this.internalUpdateInProgress !== true) {
552
+ this.menuService[this.selected ? 'selectOption' : 'deselectOption'](this);
553
+ }
554
+ }
555
+
556
+ if (changedProperties.has('active')) {
557
+ this.updateActiveClasses();
558
+ }
559
+
560
+ // Update text highlight if matchWord changed
561
+ if (changedProperties.has('matchWord')) {
562
+ this.updateTextHighlight();
563
+ }
564
+
565
+ // Set the key to be the passed value if no key is provided
566
+ if (changedProperties.has('value') && this.key === undefined) {
567
+ this.key = this.value;
568
+ }
569
+ }
570
+
571
+ disconnectedCallback() {
572
+ if (this.menuService) {
573
+ this.menuService.unsubscribe(this.handleMenuChange);
574
+ this.menuService.removeMenuOption(this);
575
+ }
576
+ }
577
+
578
+ /**
579
+ * Sets up event listeners for user interaction with the menu option.
580
+ * This function enables click and mouse enter events to trigger selection and highlighting logic.
581
+ */
582
+ bindEvents() {
583
+ this.addEventListener('click', this.handleClick.bind(this));
584
+ this.addEventListener('mouseenter', this.handleMouseEnter.bind(this));
585
+ }
586
+
587
+ /**
588
+ * Attaches this menu option to a menu service and subscribes to its events.
589
+ * This method enables the option to participate in menu selection and highlighting logic.
590
+ * @param {Object} service - The menu service instance to attach to.
591
+ */
592
+ attachTo(service) {
593
+ if (!service) {
594
+ return;
595
+ }
596
+ this.menuService = service;
597
+ this.menuService.addMenuOption(this);
598
+ this.menuService.subscribe(this.handleMenuChange);
599
+ }
600
+
601
+ /**
602
+ * Handles changes from the menu service and updates the option's state.
603
+ * This function synchronizes the option's properties and selection/highlight state with menu events.
604
+ * @param {Object} event - The event object from the menu service.
605
+ */
606
+ handleMenuChange(event) {
607
+
608
+ // Ignore events without a type or property
609
+ if (!event || (!event.type && !event.property)) {
610
+ return;
611
+ }
612
+
613
+ // Update reactive properties based on event type
614
+ if (event.property && Object.keys(AuroMenuOption.properties).includes(event.property)) {
615
+ this[event.property] = event.value;
616
+ }
617
+
618
+ // Handle highlight changes
619
+ if (event.type === 'highlightChange') {
620
+ const isActive = event.option === this;
621
+ this.active = isActive;
622
+ this.updateActiveClasses();
623
+ }
624
+
625
+ if (event.type === 'stateChange') {
626
+ const isSelected = event.selectedOptions.includes(this);
627
+ this.setInternalSelected(isSelected);
628
+ }
629
+ }
630
+
631
+ /**
632
+ * Updates the internal selected state of the menu option bypassing 'updated' and triggers custom events if selected.
633
+ * This function ensures the option's selection state is synchronized with menu logic and notifies listeners.
634
+ * @param {boolean} isSelected - Whether the option should be marked as selected.
635
+ */
636
+ setInternalSelected(isSelected) {
637
+ this.internalUpdateInProgress = true;
638
+ this.selected = isSelected;
639
+
640
+ // Fire custom event if selected
641
+ if (isSelected) {
642
+ this.handleCustomEvent();
643
+ }
644
+
645
+ setTimeout(() => {
646
+ this.internalUpdateInProgress = false;
647
+ }, 0);
648
+ }
649
+
650
+ /**
651
+ * Sets the selected state of the menu option.
652
+ * This function updates whether the option is currently selected.
653
+ * @param {boolean} isSelected - Whether the option should be marked as selected.
654
+ * @deprecated Simply modify the `selected` property directly instead.
655
+ */
656
+ setSelected(isSelected) {
657
+ this.selected = isSelected;
658
+ }
659
+
660
+ /**
661
+ * Updates the active state and visual highlighting of the menu option.
662
+ * This function toggles the option's active status and applies or removes the active CSS class.
663
+ * @param {boolean} isActive - Whether the option should be marked as active.
664
+ * @deprecated Simply modify the `active` property directly instead.
665
+ */
666
+ updateActive(isActive) {
667
+
668
+ // Set active state
669
+ this.active = isActive;
670
+ this.updateActiveClasses();
671
+ }
672
+
673
+ /**
674
+ * Updates the CSS class for the menu option based on its active state.
675
+ * This function adds or removes the 'active' class to visually indicate the option's active status.
676
+ * @private
677
+ */
678
+ updateActiveClasses() {
679
+ // Update class based on active state
680
+ if (this.active) this.classList.add('active');
681
+ else this.classList.remove('active');
682
+ }
683
+
684
+
685
+ /**
686
+ * Updates the visual highlighting of text within the menu option based on the current match word.
687
+ * This function highlights matching text segments and manages nested spacers for display formatting.
688
+ * @private
689
+ */
690
+ updateTextHighlight() {
691
+
692
+ // Regex for matchWord if needed
693
+ let regexWord = null;
694
+
695
+ if (this.matchWord && this.matchWord.length) {
696
+ const escapedWord = this.matchWord.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
697
+ regexWord = new RegExp(escapedWord, 'giu');
698
+ }
699
+
700
+ // Update text highlighting if matchWord changed
701
+ if (regexWord &&
702
+ this.isActive && !this.hasAttribute('persistent')) {
703
+ const nested = this.querySelectorAll('.nestingSpacer');
704
+
705
+ const displayValueEl = this.querySelector('[slot="displayValue"]');
706
+ if (displayValueEl) {
707
+ this.removeChild(displayValueEl);
708
+ }
709
+
710
+ // Create nested spacers
711
+ const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
712
+
713
+ // Update with spacers and matchWord
714
+ this.innerHTML = nestingSpacerBundle +
715
+ this.textContent.replace(
716
+ regexWord,
717
+ (match) => `<strong>${match}</strong>`
718
+ );
719
+ if (displayValueEl) {
720
+ this.append(displayValueEl);
721
+ }
722
+ }
723
+ }
724
+
725
+ /**
726
+ * Handles click events on the menu option, toggling its selected state.
727
+ * This function dispatches a click event and updates selection if the option is not disabled.
728
+ * @private
729
+ */
730
+ handleClick() {
731
+ if (!this.disabled) {
732
+ this.dispatchClickEvent();
733
+ this.selected = !this.selected;
734
+ }
735
+ }
736
+
737
+ /**
738
+ * Handles mouse enter events to highlight the menu option.
739
+ * This function updates the menu service to set this option as the currently highlighted item if not disabled.
740
+ * @private
741
+ */
742
+ handleMouseEnter() {
743
+ if (!this.disabled) {
744
+ this.menuService.setHighlightedOption(this);
745
+ }
746
+ }
747
+
748
+ /**
749
+ * Dispatches custom events defined for this menu option.
750
+ * This function notifies listeners when a custom event is triggered by the option.
751
+ * @private
752
+ */
753
+ handleCustomEvent() {
754
+ if (this.event) {
755
+ dispatchMenuEvent(this, this.event, { option: this });
756
+ dispatchMenuEvent(this, 'auroMenu-customEventFired', { option: this });
757
+ }
758
+ }
759
+
760
+ /**
761
+ * Dispatches a click event for this menu option.
762
+ * This function notifies listeners that the option has been clicked.
763
+ * @private
764
+ */
765
+ dispatchClickEvent() {
766
+ this.dispatchEvent(new CustomEvent('auroMenuOption-click', {
767
+ bubbles: true,
768
+ cancelable: false,
769
+ composed: true,
770
+ detail: this
771
+ }));
772
+ }
773
+
774
+ /**
775
+ * Generates an HTML element containing an SVG icon based on the provided `svgContent`.
776
+ *
777
+ * @private
778
+ * @param {string} svgContent - The SVG content to be embedded.
779
+ * @returns {Element} The HTML element containing the SVG icon.
780
+ */
781
+ generateIconHtml(svgContent) {
782
+ const dom = new DOMParser().parseFromString(svgContent, 'text/html');
783
+ const svg = dom.body.firstChild;
784
+
785
+ svg.setAttribute('slot', 'svg');
786
+
787
+ return u$1`<${this.iconTag} customColor customSvg>${svg}</${this.iconTag}>`;
788
+ }
789
+
790
+ /**
791
+ * Logic to determine the layout of the component.
792
+ * @protected
793
+ * @returns {void}
794
+ */
795
+ renderLayout() {
796
+
797
+ const fontClassMap = {
798
+ xs: 'body-sm',
799
+ sm: 'body-default',
800
+ md: 'body-default',
801
+ lg: 'body-lg',
802
+ xl: 'body-lg'
803
+ };
804
+
805
+ const classes = e({
806
+ 'wrapper': true,
807
+ [this.size ? fontClassMap[this.size] : 'body-sm']: true,
808
+ });
809
+
810
+ return u$1`
811
+ <div class="${classes}">
812
+ ${this.selected && !this.nocheckmark
813
+ ? this.generateIconHtml(checkmarkIcon.svg)
814
+ : undefined}
815
+ <slot></slot>
816
+ </div>
817
+ `;
818
+ }
819
+ }
820
+
821
+ /* eslint-disable */
822
+
823
+ class MenuService {
824
+
825
+ /**
826
+ * PROPERTIES AND GETTERS
827
+ */
828
+
829
+ /**
830
+ * Gets the list of registered menu options.
831
+ * @returns {AuroMenuOption[]}
832
+ */
833
+ get menuOptions() {
834
+ return this._menuOptions;
835
+ }
836
+
837
+ /**
838
+ * Gets the currently highlighted option.
839
+ * @returns {AuroMenuOption|null}
840
+ */
841
+ get highlightedOption() {
842
+ return this._menuOptions[this.highlightedIndex] || null;
843
+ }
844
+
845
+ /**
846
+ * Gets the current value(s) of the selected option(s).
847
+ * @returns {string|string[]|undefined}
848
+ */
849
+ get currentValue() {
850
+ const values = (this.selectedOptions || []).map(option => option.value);
851
+ return this.multiSelect ? values : values[0];
852
+ }
853
+
854
+ /**
855
+ * Gets the string representation of the current value(s).
856
+ * For multi-select, this is a JSON stringified array.
857
+ * @returns {string|undefined}
858
+ */
859
+ get stringValue() {
860
+ const { currentValue } = this;
861
+
862
+ if (Array.isArray(currentValue)) {
863
+ if (currentValue.length > 0) {
864
+ return JSON.stringify(currentValue);
865
+ }
866
+ return undefined;
867
+ }
868
+
869
+ if (typeof currentValue === 'string') {
870
+ if (currentValue.length > 0) {
871
+ return currentValue;
872
+ }
873
+ return undefined;
874
+ }
875
+
876
+ // Future: handle other types here (e.g., number, object, etc.)
877
+ return undefined;
878
+ }
879
+
880
+ /**
881
+ * Gets the key(s) of the currently selected option(s).
882
+ * @returns {string|string[]|undefined}
883
+ */
884
+ get currentKeys() {
885
+ const keys = (this.selectedOptions || []).map(option => option.key);
886
+ return this.multiSelect ? keys : keys[0];
887
+ }
888
+
889
+ /**
890
+ * CONSTRUCTOR
891
+ */
892
+
893
+ /**
894
+ * Creates a new MenuService instance.
895
+ * @param {Object} options - The options object.
896
+ * @param {AuroMenu} options.host - The host element that this service will control. Required.
897
+ * @throws {Error} If the host is not provided.
898
+ */
899
+ constructor({ host } = {}) {
900
+
901
+ // Ensure a host was passed
902
+ if (!host) {
903
+ throw new Error("MenuService requires a host element.");
904
+ }
905
+
906
+ // Attach the service to the host
907
+ this.host = host;
908
+ this.host.addController(this);
909
+
910
+ // Set default properties
911
+ this.size = undefined;
912
+ this.shape = undefined;
913
+ this.noCheckmark = undefined;
914
+ this.disabled = undefined;
915
+ this.matchWord = undefined;
916
+ this.multiSelect = undefined;
917
+ this.allowDeselect = undefined;
918
+ this.selectAllMatchingOptions = undefined;
919
+
920
+ this.highlightedIndex = -1;
921
+
922
+ this._menuOptions = [];
923
+ this._subscribers = [];
924
+ this.internalUpdateInProgress = false;
925
+ this.selectedOptions = [];
926
+ }
927
+
928
+ /**
929
+ * PROPERTY SYNCING
930
+ */
931
+
932
+ /**
933
+ * Handles host updates.
934
+ * This is a lit reactive lifecycle method.
935
+ * This comes from the Lit controller interface provided by adding this service as a controller to the host.
936
+ * See constructor for `this.host.addController(this)`
937
+ * You can read more about Lit reactive controllers here: https://lit.dev/docs/composition/controllers/
938
+ */
939
+ hostUpdated() {
940
+
941
+ // Reset selection if multiSelect mode changes
942
+ if (this.host.multiSelect !== this.multiSelect) {
943
+ this.selectedOptions = [];
944
+ }
945
+
946
+ // Update properties on host update
947
+ this.setProperties({
948
+ size: this.host.size,
949
+ shape: this.host.shape,
950
+ noCheckmark: this.host.noCheckmark,
951
+ disabled: this.host.disabled,
952
+ matchWord: this.host.matchWord,
953
+ multiSelect: this.host.multiSelect,
954
+ allowDeselect: this.host.allowDeselect,
955
+ selectAllMatchingOptions: this.host.selectAllMatchingOptions
956
+ });
957
+ }
958
+
959
+ /**
960
+ * Handles host disconnection and memory cleanup.
961
+ */
962
+ hostDisconnected() {
963
+ this._subscribers = [];
964
+ this._menuOptions = [];
965
+ }
966
+
967
+ /**
968
+ * Sets a property value if it exists on the instance and the value has changed.
969
+ * @param {string} property
970
+ * @param {any} value
971
+ */
972
+ setProperty(property, value) {
973
+
974
+ // Only update if we are tracking the property in this service
975
+ if (this.hasOwnProperty(property)) {
976
+
977
+ // Check if the value has changed
978
+ const valueChanged = this[property] !== value;
979
+
980
+ // Update and notify if changed
981
+ if (valueChanged) {
982
+ this[property] = value;
983
+ this.notify({ property, value });
984
+ }
985
+ }
986
+ }
987
+
988
+ /**
989
+ * Sets multiple properties on the instance.
990
+ * @param {Object} properties - Key-value pairs of properties to set.
991
+ */
992
+ setProperties(properties) {
993
+ for (const [key, value] of Object.entries(properties)) {
994
+ this.setProperty(key, value);
995
+ }
996
+ }
997
+
998
+ /**
999
+ * MENU OPTION HIGHLIGHTING
1000
+ */
1001
+
1002
+ /**
1003
+ * Highlights the next active option in the menu.
1004
+ */
1005
+ highlightNext() {
1006
+ this.moveHighlightedOption("next");
1007
+ }
1008
+
1009
+ /**
1010
+ * Highlights the previous active option in the menu.
1011
+ */
1012
+ highlightPrevious() {
1013
+ this.moveHighlightedOption("previous");
1014
+ }
1015
+
1016
+ /**
1017
+ * Moves the highlighted option in the specified direction.
1018
+ * @param {string} direction - The direction to move the highlight ("next" or "previous").
1019
+ */
1020
+ moveHighlightedOption(direction) {
1021
+
1022
+ // Get the active options
1023
+ const activeOptions = this._menuOptions.filter(option => option.isActive);
1024
+
1025
+ // Get the currently active option
1026
+ const currentActiveOption = activeOptions[activeOptions.indexOf(this.highlightedOption)];
1027
+
1028
+ // Determine the new index based on the currently active option and direction
1029
+ let newIndex = currentActiveOption
1030
+ ? direction === "previous"
1031
+ ? activeOptions.indexOf(currentActiveOption) - 1
1032
+ : activeOptions.indexOf(currentActiveOption) + 1
1033
+ : direction === "previous"
1034
+ ? activeOptions.length - 1
1035
+ : 0;
1036
+
1037
+ // Wrap around the index if needed
1038
+ newIndex = newIndex < 0 ? activeOptions.length - 1 : newIndex >= activeOptions.length ? 0 : newIndex;
1039
+
1040
+ // Get the new active option and set it as highlighted
1041
+ const newActiveOption = activeOptions[newIndex];
1042
+ this.setHighlightedOption(newActiveOption);
1043
+ }
1044
+
1045
+ /**
1046
+ * Sets the highlighted index to the specified option.
1047
+ * @param {AuroMenuOption} option - The option to highlight.
1048
+ */
1049
+ setHighlightedOption(option) {
1050
+
1051
+ if (!option) return;
1052
+
1053
+ // Get the index of the option to highlight
1054
+ const index = this._menuOptions.indexOf(option);
1055
+
1056
+ // Update highlighted index
1057
+ this.highlightedIndex = index;
1058
+
1059
+ // Notify subscribers of highlight change
1060
+ this.notify({ type: 'highlightChange', option, index: this.highlightedIndex });
1061
+
1062
+ // Dispatch the change event
1063
+ this.dispatchChangeEvent('auroMenu-activatedOption', option);
1064
+ }
1065
+
1066
+ /**
1067
+ * Sets the highlighted option to the option at the specified index if it exists.
1068
+ * @param {number} index
1069
+ */
1070
+ setHighlightedIndex(index) {
1071
+ const option = this._menuOptions[index] || null;
1072
+ this.setHighlightedOption(option);
1073
+ }
1074
+
1075
+ /**
1076
+ * Selects the currently highlighted option.
1077
+ */
1078
+ selectHighlightedOption() {
1079
+ if (this.highlightedOption) {
1080
+ this.toggleOption(this.highlightedOption);
1081
+ }
1082
+ }
1083
+
1084
+ /**
1085
+ * SELECTION AND DESELECTION METHODS
1086
+ */
1087
+
1088
+ /**
1089
+ * Selects one or more options in a batch operation
1090
+ * @param {AuroMenuOption|AuroMenuOption[]} options - Single option or array of options to select
1091
+ */
1092
+ selectOptions(options) {
1093
+ let optionsToSelect = Array.isArray(options) ? options : [options];
1094
+
1095
+ // Filter out options that are inactive
1096
+ optionsToSelect = optionsToSelect.filter(option => option.isActive);
1097
+
1098
+ if (!optionsToSelect.length) return;
1099
+
1100
+ if (this.multiSelect) {
1101
+ this.selectedOptions = [...(this.selectedOptions || []), ...optionsToSelect];
1102
+ } else {
1103
+ // In single select mode, only take the last option
1104
+ this.selectedOptions = [optionsToSelect[optionsToSelect.length - 1]];
1105
+ }
1106
+
1107
+ this.stageUpdate();
1108
+ }
1109
+
1110
+ /**
1111
+ * Deselects one or more options in a batch operation
1112
+ * @param {AuroMenuOption|AuroMenuOption[]} options - Single option or array of options to deselect
1113
+ */
1114
+ deselectOptions(options) {
1115
+ const optionsToDeselect = Array.isArray(options) ? options : [options];
1116
+
1117
+ if (!optionsToDeselect.length) return;
1118
+
1119
+ // Check if deselection should be prevented
1120
+ const shouldPreventDeselect = !this.allowDeselect && !this.multiSelect;
1121
+ const isOnlySelectedOption = this.selectedOptions.length === 1 && optionsToDeselect.includes(this.selectedOptions[0]);
1122
+
1123
+ // Prevent deselecting the only selected option if not allowed
1124
+ if (shouldPreventDeselect && isOnlySelectedOption) return;
1125
+
1126
+ const optionsSet = new Set(optionsToDeselect);
1127
+ this.selectedOptions = (this.selectedOptions || [])
1128
+ .filter(opt => !optionsSet.has(opt));
1129
+
1130
+ this.stageUpdate();
1131
+ }
1132
+
1133
+ /**
1134
+ * Selects a single option.
1135
+ * @param {AuroMenuOption} option
1136
+ */
1137
+ selectOption(option) {
1138
+ this.selectOptions(option);
1139
+ }
1140
+
1141
+ /**
1142
+ * Deselects a single option.
1143
+ * @param {AuroMenuOption} option
1144
+ */
1145
+ deselectOption(option) {
1146
+ this.deselectOptions(option);
1147
+ }
1148
+
1149
+ /**
1150
+ * Toggles the selection state of a single option.
1151
+ * @param {AuroMenuOption} option
1152
+ */
1153
+ toggleOption(option) {
1154
+ if (option.selected) {
1155
+ this.deselectOption(option);
1156
+ } else {
1157
+ this.selectOption(option);
1158
+ }
1159
+ }
1160
+
1161
+ /**
1162
+ * Selects options based on their value(s) when compared to a passed value or values.
1163
+ * Value or values are normalized to an array of strings that can be matched to option keys.
1164
+ * @param {string|number|Array<string|number>} value - The value(s) to select.
1165
+ */
1166
+ selectByValue(value) {
1167
+ // Early exit for invalid/empty values or internal updates
1168
+ if (this.internalUpdateInProgress ||
1169
+ this.host.internalUpdateInProgress ||
1170
+ value === undefined ||
1171
+ value === null ||
1172
+ (Array.isArray(value) && value.length === 0) ||
1173
+ (typeof value === 'string' && value.trim() === '')) {
1174
+ return;
1175
+ }
1176
+
1177
+ this.reset();
1178
+
1179
+ // Normalize values to array of strings
1180
+ const normalizedValues = this._getNormalizedValues(value);
1181
+
1182
+ // Validate for single-select mode
1183
+ let validatedValues = normalizedValues;
1184
+ if (normalizedValues.length > 1 && !this.multiSelect) {
1185
+ console.warn("MenuService - Multiple values provided for single-select menu. Only the first value will be selected.");
1186
+ validatedValues = [normalizedValues[0]];
1187
+ }
1188
+
1189
+ // Find matching options by comparing available options to validated values
1190
+ const trackedKeys = new Set();
1191
+ const optionsToSelect = this._menuOptions.filter(option => {
1192
+ const passesFilter = validatedValues.includes(option.key);
1193
+ const alreadyTracked = trackedKeys.has(option.key);
1194
+
1195
+ trackedKeys.add(option.key);
1196
+
1197
+ // Include the option in the options to be selected if it passes the filter check and
1198
+ // either hasn't been tracked yet or selectAllMatchingOptions is true
1199
+ return passesFilter && (!alreadyTracked || (alreadyTracked && this.selectAllMatchingOptions));
1200
+ });
1201
+
1202
+ // Handle selection result
1203
+ if (optionsToSelect.length && !this.optionsArraysMatch(optionsToSelect, this.selectedOptions)) {
1204
+ this.selectOptions(optionsToSelect);
1205
+ } else {
1206
+ this.stageUpdate();
1207
+ }
1208
+
1209
+ // Dispatch failure event if no matches found
1210
+ if (!optionsToSelect.length && validatedValues.length) {
1211
+ this.dispatchChangeEvent('auroMenu-selectValueFailure', {
1212
+ message: 'No matching options found for the provided value(s).',
1213
+ values: validatedValues
1214
+ });
1215
+ }
1216
+ }
1217
+
1218
+ /**
1219
+ * Resets the selected options to an empty array.
1220
+ */
1221
+ reset() {
1222
+ const previousOptions = [...this.selectedOptions];
1223
+ this.selectedOptions = [];
1224
+
1225
+ // Single update after clearing all
1226
+ if (previousOptions.length) {
1227
+ this.stageUpdate();
1228
+ }
1229
+ }
1230
+
1231
+ /**
1232
+ * SUBSCRIPTION, NOTIFICATION AND EVENT DISPATCH METHODS
1233
+ */
1234
+
1235
+ /**
1236
+ * Subscribes a callback to menu service events.
1237
+ * @param {Function} callback - The callback to invoke on events.
1238
+ */
1239
+ subscribe(callback) {
1240
+ this._subscribers.push(callback);
1241
+ }
1242
+
1243
+ /**
1244
+ * Remove a previously subscribed callback from menu service events.
1245
+ * @param {Function} callback
1246
+ */
1247
+ unsubscribe(callback) {
1248
+ this._subscribers = this._subscribers.filter(cb => cb !== callback);
1249
+ }
1250
+
1251
+ /**
1252
+ * Stages an update to notify subscribers of state and value changes.
1253
+ */
1254
+ stageUpdate() {
1255
+ this.notifyStateChange();
1256
+ this.notifyValueChange();
1257
+ }
1258
+
1259
+ /**
1260
+ * Notifies subscribers of a menu service event.
1261
+ * All notifications are sent to all subscribers.
1262
+ * @param {string} event - The event to send to subscribers.
1263
+ */
1264
+ notify(event) {
1265
+ this._subscribers.forEach(callback => callback(event));
1266
+ }
1267
+
1268
+ /**
1269
+ * Notifies subscribers of a state change (selected options has changed).
1270
+ */
1271
+ notifyStateChange() {
1272
+ this.notify({ type: 'stateChange', selectedOptions: this.selectedOptions });
1273
+ }
1274
+
1275
+ /**
1276
+ * Notifies subscribers of a value change (current value has changed).
1277
+ */
1278
+ notifyValueChange() {
1279
+
1280
+ // Prepare details for the event
1281
+ const details = {
1282
+ value: this.currentValue,
1283
+ stringValue: this.stringValue,
1284
+ keys: this.currentKeys,
1285
+ options: this.selectedOptions
1286
+ };
1287
+
1288
+ // If only one option is selected, include its index
1289
+ if (this.selectedOptions.length === 1) details.index = this._menuOptions.indexOf(this.selectedOptions[0]);
1290
+
1291
+ this.notify({
1292
+ type: 'valueChange',
1293
+ ...details
1294
+ });
1295
+
1296
+ this.dispatchChangeEvent('auroMenu-selectedOption', details);
1297
+ }
1298
+
1299
+ /**
1300
+ * Dispatches a custom event from the host element.
1301
+ * @param {string} eventName
1302
+ * @param {any} detail
1303
+ */
1304
+ dispatchChangeEvent(eventName, detail) {
1305
+ this.host.dispatchEvent(new CustomEvent(eventName, {
1306
+ bubbles: true,
1307
+ cancelable: false,
1308
+ composed: true,
1309
+ detail
1310
+ }));
1311
+ }
1312
+
1313
+ /**
1314
+ * MENU OPTION MANAGEMENT METHODS
1315
+ */
1316
+
1317
+ /**
1318
+ * Adds a menu option to the service's list.
1319
+ * @param {AuroMenuOption} option - the option to track
1320
+ */
1321
+ addMenuOption(option) {
1322
+ this._menuOptions.push(option);
1323
+ this.notify({ type: 'optionsChange', options: this._menuOptions });
1324
+ }
1325
+
1326
+ /**
1327
+ * Removes a menu option from the service's list.
1328
+ * @param {AuroMenuOption} option - the option to remove
1329
+ */
1330
+ removeMenuOption(option) {
1331
+ this._menuOptions = this._menuOptions.filter(opt => opt !== option);
1332
+ this.notify({ type: 'optionsChange', options: this._menuOptions });
1333
+ }
1334
+
1335
+ /**
1336
+ * UTILITIES
1337
+ */
1338
+
1339
+ /**
1340
+ * Normalizes a value or array of values into an array of strings for option selection.
1341
+ * This function ensures that input values are consistently formatted for matching menu options.
1342
+ *
1343
+ * @param {string|number|Array<string|number>} value - The value(s) to normalize.
1344
+ * @returns {Array<string>} An array of string values suitable for option matching.
1345
+ * @throws {Error} If any value is not a string or number.
1346
+ */
1347
+ _getNormalizedValues(value) {
1348
+ let values = value;
1349
+
1350
+ // Handle JSON string and single value string input
1351
+ if (!Array.isArray(values) && typeof values === 'string') {
1352
+
1353
+ // Attempt to parse as JSON array
1354
+ try {
1355
+
1356
+ // Normalize single quotes to double quotes for JSON parsing
1357
+ // This will not handle complex cases but will cover basic usage
1358
+ const parseValue = values.replace(/'([^']*?)'/g, '"$1"');
1359
+
1360
+ // Attempt parse
1361
+ const parsed = JSON.parse(parseValue);
1362
+
1363
+ // Ensure parsed value is an array
1364
+ if (!Array.isArray(parsed)) throw new Error('Not an array');
1365
+
1366
+ // Set values to parsed array
1367
+ values = parsed;
1368
+ } catch (err) {
1369
+
1370
+ // If parsing fails, treat as single value
1371
+ values = [value];
1372
+ }
1373
+ }
1374
+
1375
+ // Handle a single number being passed
1376
+ if (typeof values === 'number') {
1377
+ values = [String(values)];
1378
+ }
1379
+
1380
+ // Coerce each value to string and validate types
1381
+ values.forEach((val, index) => {
1382
+
1383
+ // Throw an error for invalid value types
1384
+ if (typeof val !== 'string' && typeof val !== 'number') {
1385
+ throw new Error('Value contains invalid value type. Supported types are string and number.');
1386
+ }
1387
+
1388
+ // Convert numbers to strings for consistency
1389
+ if (typeof val === 'number') {
1390
+ values[index] = String(val);
1391
+ }
1392
+ });
1393
+
1394
+ // Return the resulting array of string values
1395
+ return values;
1396
+ }
1397
+
1398
+ /**
1399
+ * Returns whether two arrays of options contain the same elements.
1400
+ * @param {AuroMenuOption[]} arr1 - First array of options.
1401
+ * @param {AuroMenuOption[]} arr2 - Second array of options.
1402
+ * @returns {boolean} True if arrays match, false otherwise.
1403
+ */
1404
+ optionsArraysMatch(arr1, arr2) {
1405
+ if (arr1.length !== arr2.length) return false;
1406
+
1407
+ const set1 = new Set(arr1);
1408
+ const set2 = new Set(arr2);
1409
+
1410
+ for (let item of set1) {
1411
+ if (!set2.has(item)) {
1412
+ return false;
1413
+ }
1414
+ }
1415
+
1416
+ return true;
1417
+ }
1418
+ }
1419
+
1420
+ const MenuContext = n$1('menu-context');
1421
+
1422
+ /* eslint-disable no-underscore-dangle, curly */
1423
+ // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1424
+ // See LICENSE in the project root for license information.
1425
+
1426
+
1427
+
1428
+ /**
1429
+ * The auro-menu element provides users a way to select from a list of options.
1430
+ * @attr {HTMLElement|Array<HTMLElement>} optionSelected - An array of currently selected menu options, type `HTMLElement` by default. In multi-select mode, `optionSelected` is an array of HTML elements.
1431
+ * @attr {object} optionactive - Specifies the current active menuOption.
1432
+ * @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
1433
+ * @attr {boolean} disabled - When true, the entire menu and all options are disabled;
1434
+ * @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
1435
+ * @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
1436
+ * @attr {boolean} multiselect - When true, the selected option can be multiple options.
1437
+ * @attr {boolean} selectAllMatchingOptions - When true, selects all options that match the provided value/key when setting value and multiselect is enabled.
1438
+ * @attr {string} value - The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.
1439
+ * @prop {string} size - Sets the size of the menu. Accepted values are 'sm' and 'md'. Default is 'sm'.
1440
+ * @prop {string} shape - Sets the shape of the menu options. Accepted values are 'box' and 'round'. Default is 'box'.
1441
+ * @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
1442
+ * @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
1443
+ * @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
1444
+ * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Notifies when the loading attribute is changed.
1445
+ * @event {CustomEvent<any>} auroMenu-selectValueFailure - Notifies that an attempt to select a menuoption by matching a value has failed.
1446
+ * @event {CustomEvent<any>} auroMenu-selectValueReset - Notifies that the component value has been reset.
1447
+ * @event {CustomEvent<any>} auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
1448
+ * @slot loadingText - Text to show while loading attribute is set
1449
+ * @slot loadingIcon - Icon to show while loading attribute is set
1450
+ * @slot - Slot for insertion of menu options.
1451
+ */
1452
+
1453
+ /* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
1454
+
1455
+ class AuroMenu extends AuroElement {
1456
+
1457
+ constructor() {
1458
+ super();
1459
+
1460
+ // State properties (reactive)
1461
+
1462
+ /**
1463
+ * @private
1464
+ */
1465
+ this.shape = "box";
1466
+
1467
+ /**
1468
+ * @private
1469
+ */
1470
+ this.size = "sm";
1471
+
1472
+ // Value of the selected options
1473
+ this.value = undefined;
1474
+ // Currently selected option
1475
+ this.optionSelected = undefined;
1476
+ // String used for highlighting/filtering
1477
+ this.matchWord = undefined;
1478
+ // Hide the checkmark icon on selected options
1479
+ this.noCheckmark = false;
1480
+ // Currently active option
1481
+ this.optionActive = undefined;
1482
+ // Loading state
1483
+ this.loading = false;
1484
+ // Multi-select mode
1485
+ this.multiSelect = false;
1486
+ // Allow deselecting of menu options
1487
+ this.allowDeselect = false;
1488
+ // Select all matching options when setting value in multi-select mode
1489
+ this.selectAllMatchingOptions = false;
1490
+
1491
+ // Event Bindings
1492
+
1493
+ /**
1494
+ * @private
1495
+ */
1496
+ this.handleKeyDown = this.handleKeyDown.bind(this);
1497
+
1498
+
1499
+ /**
1500
+ * @private
1501
+ */
1502
+ this.handleSlotChange = this.handleSlotChange.bind(this);
1503
+
1504
+ // Instance properties (non-reactive)
1505
+
1506
+ /**
1507
+ * @private
1508
+ */
1509
+ Object.assign(this, {
1510
+ // Root-level menu (true) or a nested submenu (false)
1511
+ rootMenu: true,
1512
+ // Currently focused/active menu item index
1513
+ _index: -1,
1514
+ // Nested menu spacer
1515
+ nestingSpacer: '<span class="nestingSpacer"></span>',
1516
+ // Loading indicator for slot elements
1517
+ loadingSlots: null,
1518
+ });
1519
+ }
1520
+
1521
+ static get properties() {
1522
+ return {
1523
+ ...super.properties,
1524
+
1525
+ /**
1526
+ * Allows deselecting an already selected option when clicked again in single-select mode.
1527
+ */
1528
+ allowDeselect: {
1529
+ type: Boolean,
1530
+ reflect: true,
1531
+ },
1532
+ noCheckmark: {
1533
+ type: Boolean,
1534
+ reflect: true,
1535
+ attribute: 'nocheckmark'
1536
+ },
1537
+ disabled: {
1538
+ type: Boolean,
1539
+ reflect: true
1540
+ },
1541
+ loading: {
1542
+ type: Boolean,
1543
+ reflect: true
1544
+ },
1545
+ optionSelected: {
1546
+ // Allow HTMLElement, HTMLElement[] arrays and undefined
1547
+ type: Object
1548
+ },
1549
+ optionActive: {
1550
+ type: Object,
1551
+ attribute: 'optionactive'
1552
+ },
1553
+ matchWord: {
1554
+ type: String,
1555
+ attribute: 'matchword'
1556
+ },
1557
+ multiSelect: {
1558
+ type: Boolean,
1559
+ reflect: true,
1560
+ attribute: 'multiselect'
1561
+ },
1562
+ selectAllMatchingOptions: {
1563
+ type: Boolean,
1564
+ reflect: true,
1565
+ },
1566
+
1567
+ /**
1568
+ * Value selected for the component.
1569
+ */
1570
+ value: {
1571
+ type: String,
1572
+ reflect: true,
1573
+ attribute: 'value'
1574
+ },
1575
+
1576
+ /**
414
1577
  * Indent level for submenus.
415
1578
  * @private
416
1579
  */
@@ -418,6 +1581,16 @@ class AuroMenu extends AuroElement {
418
1581
  type: Number,
419
1582
  reflect: false,
420
1583
  attribute: false
1584
+ },
1585
+
1586
+ /**
1587
+ * Available menu options
1588
+ * @readonly
1589
+ */
1590
+ options: {
1591
+ type: Array,
1592
+ reflect: false,
1593
+ attribute: false
421
1594
  }
422
1595
  };
423
1596
  }
@@ -430,6 +1603,29 @@ class AuroMenu extends AuroElement {
430
1603
  ];
431
1604
  }
432
1605
 
1606
+ /**
1607
+ * @readonly
1608
+ * @returns {Array<HTMLElement>} - Returns the array of available menu options.
1609
+ * @deprecated use `options` property instead.
1610
+ */
1611
+ get items() {
1612
+ return this.options;
1613
+ }
1614
+
1615
+ /**
1616
+ * @returns {number} - Returns the index of the currently active option.
1617
+ */
1618
+ get index() {
1619
+ return this._index;
1620
+ }
1621
+
1622
+ /**
1623
+ * @param {number} value - Sets the index of the currently active option.
1624
+ */
1625
+ set index(value) {
1626
+ this.menuService.setHighlightedIndex(value);
1627
+ }
1628
+
433
1629
  /**
434
1630
  * This will register this element with the browser.
435
1631
  * @param {string} [name="auro-menu"] - The name of element that you want to register to.
@@ -449,16 +1645,113 @@ class AuroMenu extends AuroElement {
449
1645
  * @returns {String|Array<String>}
450
1646
  */
451
1647
  get formattedValue() {
452
- if (this.multiSelect) {
453
- if (!this.value) {
454
- return undefined;
455
- }
456
- if (this.value.startsWith("[")) {
457
- return JSON.parse(this.value);
1648
+ return this.menuService.currentValue;
1649
+ }
1650
+
1651
+ /**
1652
+ * Gets the current property values for the menu service.
1653
+ * @private
1654
+ * @returns {Object}
1655
+ */
1656
+ get propertyValues() {
1657
+ return {
1658
+ size: this.size,
1659
+ shape: this.shape,
1660
+ noCheckmark: this.nocheckmark,
1661
+ disabled: this.disabled
1662
+ };
1663
+ }
1664
+
1665
+ /**
1666
+ * Provides the menu context to child components.
1667
+ * Initializes the MenuService and subscribes to menu changes.
1668
+ * @protected
1669
+ */
1670
+ provideContext() {
1671
+ this.menuService = new MenuService({host: this});
1672
+ this.menuService.setProperties(this.propertyValues);
1673
+ this.menuService.subscribe(this.handleMenuChange.bind(this));
1674
+ this._contextProvider = new i$2(this, {
1675
+ context: MenuContext,
1676
+ initialValue: this.menuService
1677
+ });
1678
+ }
1679
+
1680
+ /**
1681
+ * Updates the currently active option in the menu.
1682
+ * @param {HTMLElement} option - The option to set as active.
1683
+ */
1684
+ updateActiveOption(option) {
1685
+ this.menuService.setHighlightedOption(option);
1686
+ }
1687
+
1688
+ /**
1689
+ * Sets the internal value and manages update state.
1690
+ * @param {String|Array<String>} value - The value to set.
1691
+ * @protected
1692
+ */
1693
+ setInternalValue(value) {
1694
+ if (this.value !== value) {
1695
+ this.internalUpdateInProgress = true;
1696
+ this.value = value;
1697
+
1698
+ setTimeout(() => {
1699
+ this.internalUpdateInProgress = false;
1700
+ });
1701
+ }
1702
+ }
1703
+
1704
+ /**
1705
+ * Handles changes from the menu service and updates component state.
1706
+ * @param {Object} event - The event object from the menu service.
1707
+ * @protected
1708
+ */
1709
+ handleMenuChange(event) {
1710
+ if (event.type === 'valueChange') {
1711
+
1712
+ // New option is array value or first option with fallback to undefined for empty array in all cases
1713
+ const newOption = this.multiSelect && event.options.length ? event.options : event.options[0] || undefined;
1714
+ const newValue = event.stringValue;
1715
+
1716
+ // Check if the option or value has actually changed
1717
+ if (newValue === undefined || (this.optionSelected !== newOption || this.stringValue !== newValue)) {
1718
+ this.optionSelected = newOption;
1719
+ this.setInternalValue(newValue);
458
1720
  }
459
- return [this.value];
1721
+
1722
+ // Notify components of selection change
1723
+ this.notifySelectionChange(event);
460
1724
  }
461
- return this.value;
1725
+
1726
+ if (event.type === 'highlightChange') {
1727
+ this.optionActive = event.option;
1728
+ this._index = event.index;
1729
+ }
1730
+
1731
+ if (event.type === 'optionsChange') {
1732
+ this.options = event.options;
1733
+ this.dispatchEvent(new CustomEvent('auroMenu-optionsChange', {
1734
+ detail: {
1735
+ options: event.options
1736
+ }
1737
+ }));
1738
+ }
1739
+ }
1740
+
1741
+ /**
1742
+ * Gets the currently selected options.
1743
+ * @returns {Array<HTMLElement>}
1744
+ */
1745
+ get selectedOptions() {
1746
+ return this.menuService ? this.menuService.selectedOptions : [];
1747
+ }
1748
+
1749
+ /**
1750
+ * Gets the first selected option, or null if none.
1751
+ * @returns {HTMLElement|null}
1752
+ */
1753
+ get selectedOption() {
1754
+ return this.menuService ? this.menuService.selectedOptions[0] : null;
462
1755
  }
463
1756
 
464
1757
  // Lifecycle Methods
@@ -466,8 +1759,10 @@ class AuroMenu extends AuroElement {
466
1759
  connectedCallback() {
467
1760
  super.connectedCallback();
468
1761
 
1762
+ this.provideContext();
1763
+
469
1764
  this.addEventListener('keydown', this.handleKeyDown);
470
- this.addEventListener('mousedown', this.handleMouseSelect);
1765
+ this.addEventListener('auroMenuOption-click', this.handleMouseSelect);
471
1766
  this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
472
1767
  this.addEventListener('slotchange', this.handleSlotChange);
473
1768
  this.setTagAttribute("auro-menu");
@@ -475,7 +1770,7 @@ class AuroMenu extends AuroElement {
475
1770
 
476
1771
  disconnectedCallback() {
477
1772
  this.removeEventListener('keydown', this.handleKeyDown);
478
- this.removeEventListener('mousedown', this.handleMouseSelect);
1773
+ this.removeEventListener('auroMenuOption-click', this.handleMouseSelect);
479
1774
  this.removeEventListener('auroMenuOption-mouseover', this.handleOptionHover);
480
1775
  this.removeEventListener('slotchange', this.handleSlotChange);
481
1776
 
@@ -489,177 +1784,43 @@ class AuroMenu extends AuroElement {
489
1784
  this.initializeMenu();
490
1785
  }
491
1786
 
492
- /**
493
- * Sets an attribute that matches the default tag name if the tag name is not the default.
494
- * @param {string} tagName - The tag name to set as an attribute.
495
- * @private
496
- */
497
- setTagAttribute(tagName) {
498
- if (this.tagName.toLowerCase() !== tagName) {
499
- this.setAttribute(tagName, true);
500
- }
501
- }
502
1787
 
503
- // eslint-disable-next-line complexity
504
1788
  updated(changedProperties) {
505
1789
  super.updated(changedProperties);
506
1790
 
507
- if (changedProperties.has('optionSelected')) {
508
- const old = changedProperties.get('optionSelected');
509
- if ((old && this.optionSelected && old.value !== this.optionSelected.value) ||
510
- (!old && this.optionSelected) ||
511
- (old && !this.optionSelected)) {
512
- this.notifySelectionChange();
513
- }
514
- }
515
-
516
- if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
517
- // Reset selection if multiSelect mode changes
518
- this.clearSelection();
1791
+ // Update menu service properties on host update
1792
+ if (changedProperties.has('value')) {
1793
+ this.menuService.selectByValue(this.value);
519
1794
  }
520
1795
 
521
-
522
- if (changedProperties.has("value")) {
523
- // Handle null/undefined case
524
- if (this.value === undefined || this.value === null) {
525
- this.clearSelection();
526
- } else {
527
- if (this.multiSelect) {
528
- // In multiselect mode, this.value should be an array of strings
529
- const valueArray = this.formattedValue;
530
- const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
531
-
532
- this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
533
- } else {
534
- // In single-select mode, this.value should be a string
535
- const matchingOptions = this.items.find((item) => item.value === this.value);
536
-
537
- if (matchingOptions) {
538
- this.optionSelected = matchingOptions;
539
- this.index = this.items.indexOf(matchingOptions);
540
- } else {
541
- // If no matching option found, reset selection
542
- this.optionSelected = undefined;
543
- this.index = -1;
544
- }
545
- }
546
-
547
- // If no matching options were found in either mode
548
- if (!this.optionSelected || (Array.isArray(this.optionSelected) && this.optionSelected.length === 0)) {
549
- dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
550
- this.optionSelected = undefined;
551
- this.index = -1;
552
- }
553
- }
554
-
555
- // Update UI state
556
- this.updateItemsState(new Map([
557
- [
558
- 'optionSelected',
559
- true
560
- ]
561
- ]));
562
-
563
- // Notify of changes
564
- if (this.optionSelected !== undefined) {
565
- this.notifySelectionChange();
566
- }
1796
+ // Handle loading state changes
1797
+ if (changedProperties.has('loading')) {
1798
+ this.setLoadingState(this.loading);
567
1799
  }
568
-
569
- // Process all other UI updates
570
- this.updateItemsState(changedProperties);
571
1800
  }
572
1801
 
573
1802
  /**
574
- * Updates the UI state and appearance of menu items based on changed properties.
1803
+ * Sets an attribute that matches the default tag name if the tag name is not the default.
1804
+ * @param {string} tagName - The tag name to set as an attribute.
575
1805
  * @private
576
- * @param {Map<string, boolean>} changedProperties - LitElement's changed properties map.
577
1806
  */
578
- updateItemsState(changedProperties) {
579
- if (!this.items) {
580
- return;
581
- }
582
-
583
- // Handle noCheckmark propagation to all menus and options
584
- if (changedProperties.has('noCheckmark') && this.noCheckmark) {
585
- // Update both menus and options
586
- this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
587
- }
588
-
589
- // Handle layout propagation to all menus and options
590
- const propagationTargets = this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]');
591
- [
592
- 'size',
593
- 'shape'
594
- ].forEach((prop) => {
595
- if (changedProperties.has(prop)) {
596
- propagationTargets.forEach((el) => {
597
- el.setAttribute(prop, this[prop]);
598
- });
599
- }
600
- });
601
-
602
- // Regex for matchWord if needed
603
- let regexWord = null;
604
-
605
- if (changedProperties.has('matchWord') && this.matchWord && this.matchWord.length) {
606
- const escapedWord = this.matchWord.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
607
- regexWord = new RegExp(escapedWord, 'giu');
1807
+ setTagAttribute(tagName) {
1808
+ if (this.tagName.toLowerCase() !== tagName) {
1809
+ this.setAttribute(tagName, true);
608
1810
  }
1811
+ }
609
1812
 
610
- // Handle direct item updates
611
- this.items.forEach((option) => {
612
- // Update selection if option or value changed
613
- if (changedProperties.has('optionSelected') || changedProperties.has('value')) {
614
- const isSelected = this.isOptionSelected(option);
615
- option.setAttribute('aria-selected', isSelected ? 'true' : 'false');
616
-
617
- // Add/remove selected attribute based on state
618
- if (isSelected) {
619
- option.setAttribute('selected', '');
620
- } else {
621
- option.removeAttribute('selected');
622
- }
623
- }
624
-
625
- // Update text highlighting if matchWord changed
626
- if (changedProperties.has('matchWord') && regexWord &&
627
- isOptionInteractive(option) && !option.hasAttribute('persistent')) {
628
- const nested = option.querySelectorAll('.nestingSpacer');
629
-
630
- const displayValueEl = option.querySelector('[slot="displayValue"]');
631
- if (displayValueEl) {
632
- option.removeChild(displayValueEl);
633
- }
634
-
635
- // Create nested spacers
636
- const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
637
-
638
- // Update with spacers and matchWord
639
- option.innerHTML = nestingSpacerBundle +
640
- option.textContent.replace(
641
- regexWord,
642
- (match) => `<strong>${match}</strong>`
643
- );
644
- if (displayValueEl) {
645
- option.append(displayValueEl);
646
- }
647
- }
648
-
649
- // Update disabled state
650
- if (changedProperties.has('disabled')) {
651
- option.disabled = this.disabled;
652
- }
1813
+ /**
1814
+ * Sets the loading state and dispatches a loading change event.
1815
+ * @param {boolean} isLoading - Whether the menu is loading.
1816
+ * @protected
1817
+ */
1818
+ setLoadingState(isLoading) {
1819
+ this.setAttribute("aria-busy", isLoading);
1820
+ dispatchMenuEvent(this, "auroMenu-loadingChange", {
1821
+ loading: isLoading,
1822
+ hasLoadingPlaceholder: this.hasLoadingPlaceholder
653
1823
  });
654
-
655
- // Handle loading state changes
656
- if (changedProperties.has('loading')) {
657
- this.setAttribute("aria-busy", this.loading);
658
- dispatchMenuEvent(this, "auroMenu-loadingChange", {
659
- loading: this.loading,
660
- hasLoadingPlaceholder: this.hasLoadingPlaceholder
661
- });
662
- }
663
1824
  }
664
1825
 
665
1826
  // Init Methods
@@ -669,7 +1830,6 @@ class AuroMenu extends AuroElement {
669
1830
  * @private
670
1831
  */
671
1832
  initializeMenu() {
672
- this.initItems();
673
1833
  if (this.rootMenu) {
674
1834
  this.setAttribute('role', 'listbox');
675
1835
  this.setAttribute('root', '');
@@ -678,94 +1838,11 @@ class AuroMenu extends AuroElement {
678
1838
  }
679
1839
 
680
1840
  /**
681
- * Initializes menu items and their attributes.
682
- * @private
683
- */
684
- initItems() {
685
- this.items = Array.from(this.querySelectorAll('auro-menuoption, [auro-menuoption]'));
686
- if (this.noCheckmark) {
687
- this.updateItemsState(new Map([
688
- [
689
- 'noCheckmark',
690
- true
691
- ]
692
- ]));
693
- }
694
- }
695
-
696
- // Logic Methods
697
-
698
- /**
699
- * Updates menu state when an option is selected.
700
- * @private
701
- * @param {HTMLElement} option - The option element to select.
702
- */
703
- handleSelectState(option) {
704
- if (this.multiSelect) {
705
- const currentValue = this.formattedValue || [];
706
- const currentSelected = this.optionSelected || [];
707
-
708
- if (!currentValue.includes(option.value)) {
709
- this.value = JSON.stringify([
710
- ...currentValue,
711
- option.value
712
- ]);
713
- }
714
- if (!currentSelected.includes(option)) {
715
- this.optionSelected = [
716
- ...currentSelected,
717
- option
718
- ];
719
- }
720
- } else {
721
- // Single select - use arrays with single values
722
- this.value = option.value;
723
- this.optionSelected = option;
724
- }
725
-
726
- this.index = this.items.indexOf(option);
727
- }
728
-
729
- /**
730
- * Deselects a menu option and updates related state.
731
- * @private
732
- * @param {HTMLElement} option - The menuoption to be deselected.
1841
+ * Selects the currently highlighted option.
1842
+ * @protected
733
1843
  */
734
- handleDeselectState(option) {
735
- if (this.multiSelect) {
736
- // Remove this option from array
737
- const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
738
-
739
- // If array is empty after removal, set back to undefined
740
- if (newFormattedValue && newFormattedValue.length === 0) {
741
- this.value = undefined;
742
- } else {
743
- this.value = JSON.stringify(newFormattedValue);
744
- }
745
-
746
- this.optionSelected = this.optionSelected.filter((val) => val !== option);
747
- if (this.optionSelected.length === 0) {
748
- this.optionSelected = undefined;
749
- }
750
- } else {
751
- // For single-select: Back to undefined when deselected
752
- this.value = undefined;
753
- this.optionSelected = undefined;
754
- }
755
-
756
- // Update the index tracking
757
- this.index = this.items.indexOf(option);
758
-
759
- // Update UI to reflect changes
760
- this.updateItemsState(new Map([
761
- [
762
- 'optionSelected',
763
- true
764
- ]
765
- ]));
766
-
767
- // Notify of selection change
768
- this.notifySelectionChange();
1844
+ makeSelection() {
1845
+ this.menuService.selectHighlightedOption();
769
1846
  }
770
1847
 
771
1848
  /**
@@ -775,7 +1852,7 @@ class AuroMenu extends AuroElement {
775
1852
  clearSelection() {
776
1853
  this.optionSelected = undefined;
777
1854
  this.value = undefined;
778
- this.index = -1;
1855
+ this._index = -1;
779
1856
  }
780
1857
 
781
1858
  /**
@@ -784,18 +1861,7 @@ class AuroMenu extends AuroElement {
784
1861
  * @public
785
1862
  */
786
1863
  reset() {
787
- // Reset to undefined - initial state
788
- this.value = undefined;
789
- this.optionSelected = undefined;
790
- this.index = -1;
791
-
792
- // Reset UI state
793
- this.updateItemsState(new Map([
794
- [
795
- 'optionSelected',
796
- true
797
- ]
798
- ]));
1864
+ this.menuService.reset();
799
1865
 
800
1866
  // Dispatch reset event
801
1867
  dispatchMenuEvent(this, 'auroMenu-selectValueReset');
@@ -835,186 +1901,43 @@ class AuroMenu extends AuroElement {
835
1901
  event.preventDefault();
836
1902
  switch (event.key) {
837
1903
  case "ArrowDown":
838
- this.navigateOptions('down');
1904
+ this.menuService.highlightNext();
839
1905
  break;
840
1906
  case "ArrowUp":
841
- this.navigateOptions('up');
1907
+ this.menuService.highlightPrevious();
842
1908
  break;
843
1909
  case "Tab":
844
- this.makeSelection();
845
- break;
846
1910
  case "Enter":
847
- this.makeSelection();
1911
+ this.menuService.selectHighlightedOption();
848
1912
  break;
849
1913
  }
850
1914
  }
851
1915
 
852
1916
  /**
853
- * Makes a selection based on the current index or clicked option.
854
- * @private
855
- */
856
- makeSelection() {
857
- if (!this.items) {
858
- this.initItems();
859
- }
860
-
861
- // Get currently selected menu option based on index
862
- const option = this.items[this.index];
863
-
864
- // Return early if option is not interactive
865
- if (!option || !isOptionInteractive(option)) {
866
- return;
867
- }
868
-
869
- // Handle custom events first
870
- if (option.hasAttribute('event')) {
871
- this.handleCustomEvent(option);
872
- return;
873
- }
874
-
875
- if (this.multiSelect) {
876
- // In multiselect, toggle individual selections
877
- this.toggleOption(option);
878
- // In single select, only handle selection of new options
879
- } else if (this.option !== this.optionSelected || !this.isOptionSelected(option)) {
880
- this.clearSelection();
881
- this.handleSelectState(option);
882
- }
883
-
884
- this.notifySelectionChange();
885
- }
886
-
887
- /**
888
- * Toggle the selection state of the menuoption.
889
- * @private
890
- * @param {HTMLElement} option - The menuoption to toggle.
891
- */
892
- toggleOption(option) {
893
- const isCurrentlySelected = this.isOptionSelected(option);
894
-
895
- if (isCurrentlySelected) {
896
- this.handleDeselectState(option);
897
- } else if (option.value === undefined || option.value === '') {
898
- dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
899
- } else {
900
- this.handleSelectState(option);
901
- }
902
- }
903
-
904
- /**
905
- * Handles option selection via mouse.
906
- * @private
907
- * @param {MouseEvent} event - Event object from the browser.
908
- */
909
- handleMouseSelect(event) {
910
- if (!this.rootMenu || event.target === this) {
911
- return;
912
- }
913
-
914
- const option = event.target.closest('auro-menuoption, [auro-menuoption]');
915
- if (option) {
916
- this.index = this.items.indexOf(option);
917
- this.makeSelection();
918
- }
919
- }
920
-
921
- /**
922
- * Handles option hover events.
923
- * @private
924
- * @param {CustomEvent} event - Event object from the browser.
925
- */
926
- handleOptionHover(event) {
927
- const option = event.target;
928
- this.index = this.items.indexOf(option);
929
- this.updateActiveOption(this.index);
930
- }
931
-
932
- /**
933
- * Handles slot change events.
934
- * @private
935
- */
936
- handleSlotChange() {
937
- if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
938
- this.rootMenu = false;
939
- }
940
-
941
- if (this.rootMenu) {
942
- this.initializeMenu();
943
- } else if (this.noCheckmark) {
944
- this.updateItemsState(new Map([
945
- [
946
- 'noCheckmark',
947
- true
948
- ]
949
- ]));
950
- }
951
- }
952
-
953
- /**
954
- * Navigates through options using keyboard.
955
- * @private
956
- * @param {string} direction - 'up' or 'down'.
1917
+ * Navigates the menu options in the specified direction.
1918
+ * @param {'up'|'down'} direction - The direction to navigate.
1919
+ * @protected
957
1920
  */
958
1921
  navigateOptions(direction) {
959
- // Return early if no items exist
960
- if (!this.items || !this.items.length) {
961
- return;
962
- }
963
-
964
- let newIndex = this.index;
965
- const increment = direction === 'down' ? 1 : -1;
966
- const maxIterations = this.items.length;
967
- let iterations = 0;
968
- let foundInteractiveOption = false;
969
-
970
- do {
971
- newIndex = (newIndex + increment + this.items.length) % this.items.length;
972
- iterations += 1;
973
-
974
- // Check if current option is interactive
975
- const currentOption = this.items[newIndex];
976
- if (isOptionInteractive(currentOption)) {
977
- foundInteractiveOption = true;
978
- break;
979
- }
980
-
981
- // Break if all options were checked
982
- if (iterations >= maxIterations) {
983
- break;
984
- }
985
- } while (iterations < maxIterations);
986
-
987
- // Handle the results of the search
988
- if (foundInteractiveOption) {
989
- // Update only if an interactive option was found
990
- this.index = newIndex;
991
- this.updateActiveOption(this.index);
992
- } else {
993
- // All options are disabled or non-interactive
994
- // Keep the current index unchanged
995
- dispatchMenuEvent(this, 'auroMenu-navigateFailure', {
996
- reason: 'No interactive options available',
997
- direction,
998
- currentIndex: this.index
999
- });
1922
+ if (direction === 'up') {
1923
+ this.menuService.highlightPrevious();
1924
+ } else if (direction === 'down') {
1925
+ this.menuService.highlightNext();
1000
1926
  }
1001
1927
  }
1002
1928
 
1003
1929
  /**
1004
- * Updates the active option state and dispatches events.
1005
- * @param {number} index - Index of the option to make active.
1930
+ * Handles slot change events.
1931
+ * @private
1006
1932
  */
1007
- updateActiveOption(index) {
1008
- if (!this.items || !this.items[index]) {
1009
- return;
1933
+ handleSlotChange() {
1934
+ if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
1935
+ this.rootMenu = false;
1010
1936
  }
1011
1937
 
1012
- this.items.forEach((item) => item.classList.remove('active'));
1013
- this.items[index].classList.add('active');
1014
- this.optionActive = this.items[index];
1015
- this.index = index;
1016
-
1017
- dispatchMenuEvent(this, 'auroMenu-activatedOption', this.items[index]);
1938
+ if (this.rootMenu) {
1939
+ this.initializeMenu();
1940
+ }
1018
1941
  }
1019
1942
 
1020
1943
  /**
@@ -1033,8 +1956,13 @@ class AuroMenu extends AuroElement {
1033
1956
  * @param {any} source - The source that triggers this event.
1034
1957
  * @private
1035
1958
  */
1036
- notifySelectionChange(source = undefined) {
1037
- dispatchMenuEvent(this, 'auroMenu-selectedOption', { source });
1959
+ notifySelectionChange({value, stringValue, keys, options} = {}) {
1960
+ dispatchMenuEvent(this, 'auroMenu-selectedOption', {
1961
+ value,
1962
+ stringValue,
1963
+ keys,
1964
+ options
1965
+ });
1038
1966
  }
1039
1967
 
1040
1968
  /**
@@ -1107,269 +2035,41 @@ class AuroMenu extends AuroElement {
1107
2035
  }
1108
2036
  }
1109
2037
 
1110
- /**
1111
- * @license
1112
- * Copyright 2020 Google LLC
1113
- * SPDX-License-Identifier: BSD-3-Clause
1114
- */
1115
- const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u$1=n(x$1);
1116
-
1117
- var styleCss = i$5`.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{cursor:pointer;user-select:none;text-overflow:ellipsis;max-width:100dvw}:host .wrapper{display:flex;align-items:center;padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);border-radius:var(--ds-size-100, 0.5rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box]{border-radius:unset}:host .wrapper[class*=shape-snowflake]{border-radius:unset;line-height:24px}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem);line-height:26px}:host .wrapper[class*=-xl]{padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem);line-height:26px}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}[slot=displayValue]{display:none}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
1118
-
1119
- var colorCss = i$5`:host .wrapper{background-color:var(--ds-auro-menuoption-container-color, transparent);box-shadow:inset 0 0 0 1px var(--ds-auro-menuoption-container-border-color, transparent);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}:host(:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([selected]:hover),:host([selected].active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}:host([selected]:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host(:focus:hover),:host(:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([selected]:focus:hover),:host([selected]:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}`;
1120
-
1121
- // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1122
- // See LICENSE in the project root for license information.
1123
-
1124
-
1125
- class AuroDependencyVersioning {
1126
-
1127
- /**
1128
- * Generates a unique string to be used for child auro element naming.
1129
- * @private
1130
- * @param {string} baseName - Defines the first part of the unique element name.
1131
- * @param {string} version - Version of the component that will be appended to the baseName.
1132
- * @returns {string} - Unique string to be used for naming.
1133
- */
1134
- generateElementName(baseName, version) {
1135
- let result = baseName;
1136
-
1137
- result += '-';
1138
- result += version.replace(/[.]/g, '_');
1139
-
1140
- return result;
1141
- }
1142
-
1143
- /**
1144
- * Generates a unique string to be used for child auro element naming.
1145
- * @param {string} baseName - Defines the first part of the unique element name.
1146
- * @param {string} version - Version of the component that will be appended to the baseName.
1147
- * @returns {string} - Unique string to be used for naming.
1148
- */
1149
- generateTag(baseName, version, tagClass) {
1150
- const elementName = this.generateElementName(baseName, version);
1151
- const tag = i`${s(elementName)}`;
1152
-
1153
- if (!customElements.get(elementName)) {
1154
- customElements.define(elementName, class extends tagClass {});
1155
- }
1156
-
1157
- return tag;
1158
- }
1159
- }
1160
-
1161
- /**
1162
- * @license
1163
- * Copyright 2018 Google LLC
1164
- * SPDX-License-Identifier: BSD-3-Clause
1165
- */const o=o=>o??E;
1166
-
1167
- class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,class extends a{});}closestElement(t,a=this,e=(a,s=a&&a.closest(t))=>a&&a!==document&&a!==window?s||e(a.getRootNode().host):null){return e(a)}handleComponentTagRename(t,a){const e=a.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,a){const e=a.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}}var u='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>';class m extends i$2{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}}const g=new Map,f=(t,a={})=>{const e=a.responseParser||(t=>t.text());return g.has(t)||g.set(t,fetch(t).then(e)),g.get(t)};var w=i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem)!important;width:var(--ds-auro-icon-size, 1.5rem)!important;height:var(--ds-auro-icon-size, 1.5rem)!important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, .25rem);line-height:1.8}
1168
- `;class z extends m{constructor(){super(),this.onDark=false,this.appearance="default";}static get properties(){return {...m.properties,onDark:{type:Boolean,reflect:true},appearance:{type:String,reflect:true},svg:{attribute:false,reflect:true}}}static get styles(){return w}async fetchIcon(t,a){let e="";e="logos"===t?await f(`${this.uri}/${t}/${a}.svg`):await f(`${this.uri}/icons/${t}/${a}.svg`);return (new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const t=await this.fetchIcon(this.category,this.name);if(t)this.svg=t;else if(!t){const t=(new DOMParser).parseFromString(u,"text/html");this.svg=t.body.firstChild;}}}catch(t){this.svg=void 0;}}}i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:inline-block;--ds-auro-icon-size: 100%;width:100%;height:100%}:host .logo{color:var(--ds-auro-alaska-color)}:host([onDark]),:host([appearance=inverse]){--ds-auro-alaska-color: #FFF}
1169
- `;var y=i$5`:host{--ds-auro-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color: #02426D;--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}
1170
- `;var k=i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]),:host(:not([appearance=inverse])[variant=accent1]){--ds-auro-icon-color: var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]),:host(:not([appearance=inverse])[variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]),:host(:not([appearance=inverse])[variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]),:host(:not([appearance=inverse])[variant=statusDefault]){--ds-auro-icon-color: var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]),:host(:not([appearance=inverse])[variant=statusInfo]){--ds-auro-icon-color: var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]),:host(:not([appearance=inverse])[variant=statusSuccess]){--ds-auro-icon-color: var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]),:host(:not([appearance=inverse])[variant=statusWarning]){--ds-auro-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]),:host(:not([appearance=inverse])[variant=statusError]){--ds-auro-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]),:host(:not([appearance=inverse])[variant=statusInfoSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]),:host(:not([appearance=inverse])[variant=statusSuccessSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]),:host(:not([appearance=inverse])[variant=statusWarningSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]),:host(:not([appearance=inverse])[variant=statusErrorSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]),:host(:not([appearance=inverse])[variant=fareBasicEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]),:host(:not([appearance=inverse])[variant=fareBusiness]){--ds-auro-icon-color: var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]),:host(:not([appearance=inverse])[variant=fareEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]),:host(:not([appearance=inverse])[variant=fareFirst]){--ds-auro-icon-color: var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]),:host(:not([appearance=inverse])[variant=farePremiumEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]),:host(:not([appearance=inverse])[variant=tierOneWorldEmerald]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]),:host(:not([appearance=inverse])[variant=tierOneWorldSapphire]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]),:host(:not([appearance=inverse])[variant=tierOneWorldRuby]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]),:host([appearance=inverse][variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]),:host([appearance=inverse][variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]),:host([appearance=inverse][variant=statusError]){--ds-auro-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}
1171
- `;class x extends z{constructor(){super(),this.variant=void 0,this.privateDefaults();}privateDefaults(){this.uri="https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist",this.runtimeUtils=new p;}static get properties(){return {...z.properties,ariaHidden:{type:String,reflect:true},category:{type:String,reflect:true},customColor:{type:Boolean,reflect:true},customSvg:{type:Boolean},label:{type:Boolean,reflect:true},name:{type:String,reflect:true},variant:{type:String,reflect:true}}}static get styles(){return [z.styles,y,w,k]}static register(t="auro-icon"){p.prototype.registerComponent(t,x);}connectedCallback(){super.connectedCallback(),this.runtimeUtils.handleComponentTagRename(this,"auro-icon");}exposeCssParts(){this.setAttribute("exportparts","svg:iconSvg");}async firstUpdated(){if(await super.firstUpdated(),this.hasAttribute("ariaHidden")&&this.svg){const t=this.svg.querySelector("desc");t&&(t.remove(),this.svg.removeAttribute("aria-labelledby"));}}render(){const t={labelWrapper:true,util_displayHiddenVisually:!this.label};return x$1`
1172
- <div class="componentWrapper">
1173
- <div
1174
- class="${e({svgWrapper:true})}"
1175
- title="${o(this.title||void 0)}">
1176
- <span aria-hidden="${o(this.ariaHidden||true)}" part="svg">
1177
- ${this.customSvg?x$1`
1178
- <slot name="svg"></slot>
1179
- `:x$1`
1180
- ${this.svg}
1181
- `}
1182
- </span>
1183
- </div>
1184
-
1185
- <div class="${e(t)}" part="label">
1186
- <slot></slot>
1187
- </div>
1188
- </div>
1189
- `}}
1190
-
1191
- var iconVersion = '9.1.0';
1192
-
1193
- var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
1194
-
1195
- // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1196
- // See LICENSE in the project root for license information.
1197
-
1198
-
1199
- /**
1200
- * The auro-menu element provides users a way to define a menu option.
1201
- *
1202
- * @attr {String} value - Specifies the value to be sent to a server.
1203
- * @attr {String} noCheckmark - When true, selected option will not show the checkmark.
1204
- * @attr {Boolean} disabled - When true specifies that the menuoption is disabled.
1205
- * @attr {Boolean} selected - Specifies that an option is selected.
1206
- * @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
1207
- * @slot - Specifies text for an option, but is not the value.
1208
- */
1209
- class AuroMenuOption extends AuroElement {
1210
- constructor() {
1211
- super();
1212
-
1213
- /**
1214
- * @private
1215
- */
1216
- this.shape = undefined;
1217
-
1218
- /**
1219
- * @private
1220
- */
1221
- this.size = undefined;
1222
-
1223
- /**
1224
- * Generate unique names for dependency components.
1225
- */
1226
- const versioning = new AuroDependencyVersioning();
1227
- this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, x);
1228
-
1229
- this.selected = false;
1230
- this.nocheckmark = false;
1231
- this.disabled = false;
1232
-
1233
- /**
1234
- * @private
1235
- */
1236
- this.tabIndex = -1;
1237
-
1238
- /**
1239
- * @private
1240
- */
1241
- this.runtimeUtils = new AuroLibraryRuntimeUtils();
1242
- }
1243
-
1244
- static get properties() {
1245
- return {
1246
- ...super.properties,
1247
- nocheckmark: {
1248
- type: Boolean,
1249
- reflect: true
1250
- },
1251
- selected: {
1252
- type: Boolean,
1253
- reflect: true
1254
- },
1255
- disabled: {
1256
- type: Boolean,
1257
- reflect: true
1258
- },
1259
- value: {
1260
- type: String,
1261
- reflect: true
1262
- },
1263
- tabIndex: {
1264
- type: Number,
1265
- reflect: true
1266
- }
1267
- };
1268
- }
1269
-
1270
- static get styles() {
1271
- return [
1272
- styleCss,
1273
- colorCss,
1274
- tokensCss
1275
- ];
1276
- }
1277
-
1278
- /**
1279
- * This will register this element with the browser.
1280
- * @param {string} [name="auro-menuoption"] - The name of element that you want to register to.
1281
- *
1282
- * @example
1283
- * AuroMenuOption.register("custom-menuoption") // this will register this element to <custom-menuoption/>
1284
- *
1285
- */
1286
- static register(name = "auro-menuoption") {
1287
- AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenuOption);
1288
- }
1289
-
1290
- connectedCallback() {
1291
- super.connectedCallback();
1292
-
1293
- // Add the tag name as an attribute if it is different than the component name
1294
- // Add this step soon as this node gets attached to the DOM to avoid racing condition with menu's value setting logic.
1295
- this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
1296
- }
1297
-
1298
- firstUpdated() {
1299
- if (!this.hasAttribute('size')) {
1300
- this.size = this.parentElement.getAttribute('size') || 'sm';
1301
- }
1302
- if (!this.hasAttribute('shape')) {
1303
- this.shape = this.parentElement.getAttribute('shape') || 'box';
1304
- }
2038
+ function initKeysExample() {
2039
+ const menu = document.getElementById('keys-menu');
2040
+ const stopsButton = document.getElementById('stopsButton');
2041
+ const stopsTopButton = document.getElementById('stopsTopButton');
2042
+ const output = document.getElementById('output');
2043
+
2044
+ const createConsoleEntry = (message) => {
2045
+ const node = document.createElement('span');
2046
+ node.innerHTML = message;
2047
+ output.appendChild(node);
2048
+ output.appendChild(document.createElement('br'));
2049
+ };
1305
2050
 
1306
- this.setAttribute('role', 'option');
1307
- this.setAttribute('aria-selected', 'false');
2051
+ const resetConsole = () => {
2052
+ output.innerHTML = '';
2053
+ };
1308
2054
 
1309
- this.addEventListener('mouseover', () => {
1310
- this.dispatchEvent(new CustomEvent('auroMenuOption-mouseover', {
1311
- bubbles: true,
1312
- cancelable: false,
1313
- composed: true,
1314
- detail: this
1315
- }));
2055
+ const updateMenuValue = (value) => {
2056
+ resetConsole();
2057
+ createConsoleEntry(`Setting menu.value: <em>"${value}"</em>`);
2058
+ menu.value = '';
2059
+ menu.value = value;
2060
+ createConsoleEntry(`menu.value before next lifecycle: <em>"${menu.value}"</em>`);
2061
+ setTimeout(() => {
2062
+ createConsoleEntry(`menu.value after lifecycle: <em>"${menu.value}"</em>`);
1316
2063
  });
1317
- }
1318
-
1319
- // observer for selected property changes
1320
- updated(changedProperties) {
1321
- super.updated(changedProperties);
1322
-
1323
- if (changedProperties.has('selected')) {
1324
- this.setAttribute('aria-selected', this.selected.toString());
1325
- }
1326
- }
1327
-
1328
- /**
1329
- * Generates an HTML element containing an SVG icon based on the provided `svgContent`.
1330
- *
1331
- * @private
1332
- * @param {string} svgContent - The SVG content to be embedded.
1333
- * @returns {Element} The HTML element containing the SVG icon.
1334
- */
1335
- generateIconHtml(svgContent) {
1336
- const dom = new DOMParser().parseFromString(svgContent, 'text/html');
1337
- const svg = dom.body.firstChild;
1338
-
1339
- svg.setAttribute('slot', 'svg');
1340
-
1341
- return u$1`<${this.iconTag} customColor customSvg>${svg}</${this.iconTag}>`;
1342
- }
1343
-
1344
- /**
1345
- * Logic to determine the layout of the component.
1346
- * @protected
1347
- * @returns {void}
1348
- */
1349
- renderLayout() {
1350
-
1351
- const fontClassMap = {
1352
- xs: 'body-sm',
1353
- sm: 'body-default',
1354
- md: 'body-default',
1355
- lg: 'body-lg',
1356
- xl: 'body-lg'
1357
- };
2064
+ };
1358
2065
 
1359
- const classes = e({
1360
- 'wrapper': true,
1361
- [this.size ? fontClassMap[this.size] : 'body-sm']: true,
1362
- });
2066
+ stopsButton.addEventListener('click', () => {
2067
+ updateMenuValue('stops');
2068
+ });
1363
2069
 
1364
- return u$1`
1365
- <div class="${classes}">
1366
- ${this.selected && !this.nocheckmark
1367
- ? this.generateIconHtml(checkmarkIcon.svg)
1368
- : undefined}
1369
- <slot></slot>
1370
- </div>
1371
- `;
1372
- }
2070
+ stopsTopButton.addEventListener('click', () => {
2071
+ updateMenuValue('stops-top');
2072
+ });
1373
2073
  }
1374
2074
 
1375
2075
  /* eslint-disable jsdoc/require-jsdoc, no-magic-numbers, no-param-reassign */
@@ -1381,6 +2081,20 @@ AuroMenu.register('custom-menu');
1381
2081
  AuroMenuOption.register('custom-menuoption');
1382
2082
 
1383
2083
  function initExamples(initCount) {
2084
+ initCount = initCount || 0;
2085
+
2086
+ try {
2087
+ // javascript example function calls to be added here upon creation to test examples
2088
+ // auroMenuResetExample();
2089
+ initKeysExample();
2090
+ } catch (err) {
2091
+ if (initCount <= 20) {
2092
+ // setTimeout handles issue where content is sometimes loaded after the functions get called
2093
+ setTimeout(() => {
2094
+ initExamples(initCount + 1);
2095
+ }, 100);
2096
+ }
2097
+ }
1384
2098
  }
1385
2099
 
1386
2100
  export { initExamples };