@aurodesignsystem-dev/auro-formkit 0.0.0-pr593.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 (268) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +201 -0
  3. package/NOTICE +2 -0
  4. package/README.md +314 -0
  5. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +39 -0
  6. package/components/bibtemplate/dist/headerVersion.d.ts +2 -0
  7. package/components/bibtemplate/dist/iconVersion.d.ts +2 -0
  8. package/components/bibtemplate/dist/index.d.ts +2 -0
  9. package/components/bibtemplate/dist/index.js +709 -0
  10. package/components/bibtemplate/dist/registered.js +709 -0
  11. package/components/bibtemplate/dist/styles/color-css.d.ts +2 -0
  12. package/components/bibtemplate/dist/styles/style-css.d.ts +2 -0
  13. package/components/bibtemplate/dist/styles/tokens-css.d.ts +2 -0
  14. package/components/checkbox/README.md +142 -0
  15. package/components/checkbox/demo/api.html +55 -0
  16. package/components/checkbox/demo/api.js +17 -0
  17. package/components/checkbox/demo/api.md +401 -0
  18. package/components/checkbox/demo/api.min.js +1833 -0
  19. package/components/checkbox/demo/index.html +51 -0
  20. package/components/checkbox/demo/index.js +8 -0
  21. package/components/checkbox/demo/index.md +327 -0
  22. package/components/checkbox/demo/index.min.js +1808 -0
  23. package/components/checkbox/demo/readme.html +50 -0
  24. package/components/checkbox/demo/readme.md +142 -0
  25. package/components/checkbox/dist/auro-checkbox-group.d.ts +166 -0
  26. package/components/checkbox/dist/auro-checkbox.d.ts +129 -0
  27. package/components/checkbox/dist/helptextVersion.d.ts +2 -0
  28. package/components/checkbox/dist/index.d.ts +3 -0
  29. package/components/checkbox/dist/index.js +1757 -0
  30. package/components/checkbox/dist/registered.js +1758 -0
  31. package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +2 -0
  32. package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +2 -0
  33. package/components/checkbox/dist/styles/color-css.d.ts +2 -0
  34. package/components/checkbox/dist/styles/colorGroup-css.d.ts +2 -0
  35. package/components/checkbox/dist/styles/tokens-css.d.ts +2 -0
  36. package/components/combobox/README.md +152 -0
  37. package/components/combobox/demo/api.html +57 -0
  38. package/components/combobox/demo/api.js +36 -0
  39. package/components/combobox/demo/api.md +1209 -0
  40. package/components/combobox/demo/api.min.js +15117 -0
  41. package/components/combobox/demo/index.html +56 -0
  42. package/components/combobox/demo/index.js +26 -0
  43. package/components/combobox/demo/index.md +621 -0
  44. package/components/combobox/demo/index.min.js +14971 -0
  45. package/components/combobox/demo/readme.html +50 -0
  46. package/components/combobox/demo/readme.md +152 -0
  47. package/components/combobox/dist/auro-combobox.d.ts +384 -0
  48. package/components/combobox/dist/bibtemplateVersion.d.ts +2 -0
  49. package/components/combobox/dist/dropdownVersion.d.ts +2 -0
  50. package/components/combobox/dist/index.d.ts +2 -0
  51. package/components/combobox/dist/index.js +13554 -0
  52. package/components/combobox/dist/inputVersion.d.ts +2 -0
  53. package/components/combobox/dist/registered.js +13556 -0
  54. package/components/combobox/dist/styles/style-css.d.ts +2 -0
  55. package/components/counter/README.md +146 -0
  56. package/components/counter/demo/api.html +54 -0
  57. package/components/counter/demo/api.js +20 -0
  58. package/components/counter/demo/api.md +584 -0
  59. package/components/counter/demo/api.min.js +7111 -0
  60. package/components/counter/demo/index.html +54 -0
  61. package/components/counter/demo/index.js +21 -0
  62. package/components/counter/demo/index.md +244 -0
  63. package/components/counter/demo/index.min.js +7075 -0
  64. package/components/counter/demo/readme.html +50 -0
  65. package/components/counter/demo/readme.md +146 -0
  66. package/components/counter/dist/auro-counter-button.d.ts +12 -0
  67. package/components/counter/dist/auro-counter-group.d.ts +235 -0
  68. package/components/counter/dist/auro-counter-wrapper.d.ts +22 -0
  69. package/components/counter/dist/auro-counter.d.ts +97 -0
  70. package/components/counter/dist/bibtemplateVersion.d.ts +2 -0
  71. package/components/counter/dist/dropdownVersion.d.ts +2 -0
  72. package/components/counter/dist/iconVersion.d.ts +2 -0
  73. package/components/counter/dist/index.d.ts +3 -0
  74. package/components/counter/dist/index.js +7018 -0
  75. package/components/counter/dist/registered.js +7019 -0
  76. package/components/counter/dist/styles/color-css.d.ts +2 -0
  77. package/components/counter/dist/styles/counter-button-color-css.d.ts +2 -0
  78. package/components/counter/dist/styles/counter-button-css.d.ts +2 -0
  79. package/components/counter/dist/styles/counter-group-css.d.ts +2 -0
  80. package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +2 -0
  81. package/components/counter/dist/styles/counter-wrapper-css.d.ts +2 -0
  82. package/components/counter/dist/styles/style-css.d.ts +2 -0
  83. package/components/counter/dist/styles/tokens-css.d.ts +2 -0
  84. package/components/datepicker/README.md +140 -0
  85. package/components/datepicker/demo/api.html +57 -0
  86. package/components/datepicker/demo/api.js +35 -0
  87. package/components/datepicker/demo/api.md +1479 -0
  88. package/components/datepicker/demo/api.min.js +24534 -0
  89. package/components/datepicker/demo/index.html +56 -0
  90. package/components/datepicker/demo/index.js +19 -0
  91. package/components/datepicker/demo/index.md +112 -0
  92. package/components/datepicker/demo/index.min.js +24255 -0
  93. package/components/datepicker/demo/readme.html +50 -0
  94. package/components/datepicker/demo/readme.md +140 -0
  95. package/components/datepicker/dist/auro-calendar-cell.d.ts +163 -0
  96. package/components/datepicker/dist/auro-calendar-month.d.ts +20 -0
  97. package/components/datepicker/dist/auro-calendar.d.ts +133 -0
  98. package/components/datepicker/dist/auro-datepicker.d.ts +466 -0
  99. package/components/datepicker/dist/bibtemplateVersion.d.ts +2 -0
  100. package/components/datepicker/dist/buttonVersion.d.ts +2 -0
  101. package/components/datepicker/dist/dropdownVersion.d.ts +2 -0
  102. package/components/datepicker/dist/index.d.ts +2 -0
  103. package/components/datepicker/dist/index.js +24185 -0
  104. package/components/datepicker/dist/inputVersion.d.ts +2 -0
  105. package/components/datepicker/dist/popoverVersion.d.ts +2 -0
  106. package/components/datepicker/dist/registered.js +24185 -0
  107. package/components/datepicker/dist/styles/color-calendar-css.d.ts +2 -0
  108. package/components/datepicker/dist/styles/color-cell-css.d.ts +2 -0
  109. package/components/datepicker/dist/styles/color-css.d.ts +2 -0
  110. package/components/datepicker/dist/styles/color-month-css.d.ts +2 -0
  111. package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +2 -0
  112. package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +2 -0
  113. package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +2 -0
  114. package/components/datepicker/dist/styles/style-css.d.ts +2 -0
  115. package/components/datepicker/dist/styles/tokens-css.d.ts +2 -0
  116. package/components/datepicker/dist/utilities.d.ts +78 -0
  117. package/components/datepicker/dist/utilitiesCalendar.d.ts +38 -0
  118. package/components/datepicker/dist/utilitiesCalendarRender.d.ts +50 -0
  119. package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +5 -0
  120. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +60 -0
  121. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +1 -0
  122. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +57 -0
  123. package/components/dropdown/README.md +144 -0
  124. package/components/dropdown/demo/api.html +57 -0
  125. package/components/dropdown/demo/api.js +21 -0
  126. package/components/dropdown/demo/api.md +1434 -0
  127. package/components/dropdown/demo/api.min.js +3826 -0
  128. package/components/dropdown/demo/index.html +55 -0
  129. package/components/dropdown/demo/index.js +19 -0
  130. package/components/dropdown/demo/index.md +510 -0
  131. package/components/dropdown/demo/index.min.js +3789 -0
  132. package/components/dropdown/demo/readme.html +50 -0
  133. package/components/dropdown/demo/readme.md +144 -0
  134. package/components/dropdown/dist/auro-dropdown.d.ts +406 -0
  135. package/components/dropdown/dist/auro-dropdownBib.d.ts +46 -0
  136. package/components/dropdown/dist/dropdownVersion.d.ts +2 -0
  137. package/components/dropdown/dist/helptextVersion.d.ts +2 -0
  138. package/components/dropdown/dist/iconVersion.d.ts +2 -0
  139. package/components/dropdown/dist/index.d.ts +2 -0
  140. package/components/dropdown/dist/index.js +3734 -0
  141. package/components/dropdown/dist/registered.js +3734 -0
  142. package/components/dropdown/dist/styles/bibColors-css.d.ts +2 -0
  143. package/components/dropdown/dist/styles/bibStyles-css.d.ts +2 -0
  144. package/components/dropdown/dist/styles/color-css.d.ts +2 -0
  145. package/components/dropdown/dist/styles/style-css.d.ts +2 -0
  146. package/components/dropdown/dist/styles/tokens-css.d.ts +2 -0
  147. package/components/form/README.md +142 -0
  148. package/components/form/demo/api.html +49 -0
  149. package/components/form/demo/api.js +3 -0
  150. package/components/form/demo/api.md +51 -0
  151. package/components/form/demo/api.min.js +638 -0
  152. package/components/form/demo/autocomplete.html +15 -0
  153. package/components/form/demo/index.html +50 -0
  154. package/components/form/demo/index.js +4 -0
  155. package/components/form/demo/index.md +403 -0
  156. package/components/form/demo/index.min.js +639 -0
  157. package/components/form/demo/readme.html +50 -0
  158. package/components/form/demo/readme.md +142 -0
  159. package/components/form/demo/registerDemoDeps.js +23 -0
  160. package/components/form/demo/working.html +118 -0
  161. package/components/form/dist/auro-form.d.ts +223 -0
  162. package/components/form/dist/index.d.ts +2 -0
  163. package/components/form/dist/index.js +614 -0
  164. package/components/form/dist/registered.d.ts +1 -0
  165. package/components/form/dist/registered.js +614 -0
  166. package/components/form/dist/styles/style-css.d.ts +2 -0
  167. package/components/helptext/dist/auro-helptext.d.ts +61 -0
  168. package/components/helptext/dist/index.d.ts +2 -0
  169. package/components/helptext/dist/index.js +209 -0
  170. package/components/helptext/dist/registered.js +209 -0
  171. package/components/helptext/dist/styles/color-css.d.ts +2 -0
  172. package/components/helptext/dist/styles/style-css.d.ts +2 -0
  173. package/components/helptext/dist/styles/tokens-css.d.ts +2 -0
  174. package/components/input/README.md +135 -0
  175. package/components/input/demo/api.html +42 -0
  176. package/components/input/demo/api.js +29 -0
  177. package/components/input/demo/api.md +1252 -0
  178. package/components/input/demo/api.min.js +7238 -0
  179. package/components/input/demo/index.html +43 -0
  180. package/components/input/demo/index.js +20 -0
  181. package/components/input/demo/index.md +202 -0
  182. package/components/input/demo/index.min.js +7157 -0
  183. package/components/input/demo/readme.html +50 -0
  184. package/components/input/demo/readme.md +135 -0
  185. package/components/input/dist/auro-input.d.ts +31 -0
  186. package/components/input/dist/base-input.d.ts +512 -0
  187. package/components/input/dist/buttonVersion.d.ts +2 -0
  188. package/components/input/dist/helptextVersion.d.ts +2 -0
  189. package/components/input/dist/i18n.d.ts +18 -0
  190. package/components/input/dist/iconVersion.d.ts +2 -0
  191. package/components/input/dist/index.d.ts +2 -0
  192. package/components/input/dist/index.js +7063 -0
  193. package/components/input/dist/registered.js +7063 -0
  194. package/components/input/dist/styles/borders-css.d.ts +2 -0
  195. package/components/input/dist/styles/color-css.d.ts +2 -0
  196. package/components/input/dist/styles/input-css.d.ts +2 -0
  197. package/components/input/dist/styles/label-css.d.ts +2 -0
  198. package/components/input/dist/styles/mixins-css.d.ts +2 -0
  199. package/components/input/dist/styles/notificationIcons-css.d.ts +2 -0
  200. package/components/input/dist/styles/style-css.d.ts +2 -0
  201. package/components/input/dist/styles/tokens-css.d.ts +2 -0
  202. package/components/input/dist/utilities.d.ts +25 -0
  203. package/components/menu/README.md +145 -0
  204. package/components/menu/demo/api.html +55 -0
  205. package/components/menu/demo/api.js +27 -0
  206. package/components/menu/demo/api.md +954 -0
  207. package/components/menu/demo/api.min.js +1538 -0
  208. package/components/menu/demo/index.html +52 -0
  209. package/components/menu/demo/index.js +28 -0
  210. package/components/menu/demo/index.md +61 -0
  211. package/components/menu/demo/index.min.js +1484 -0
  212. package/components/menu/demo/readme.html +50 -0
  213. package/components/menu/demo/readme.md +145 -0
  214. package/components/menu/dist/auro-menu-utils.d.ts +42 -0
  215. package/components/menu/dist/auro-menu.d.ts +205 -0
  216. package/components/menu/dist/auro-menuoption.d.ts +63 -0
  217. package/components/menu/dist/dropdownVersion.d.ts +2 -0
  218. package/components/menu/dist/iconVersion.d.ts +2 -0
  219. package/components/menu/dist/index.d.ts +4 -0
  220. package/components/menu/dist/index.js +1426 -0
  221. package/components/menu/dist/registered.js +1427 -0
  222. package/components/menu/dist/styles/color-menu-css.d.ts +2 -0
  223. package/components/menu/dist/styles/color-menuoption-css.d.ts +2 -0
  224. package/components/menu/dist/styles/style-menu-css.d.ts +2 -0
  225. package/components/menu/dist/styles/style-menuoption-css.d.ts +2 -0
  226. package/components/menu/dist/styles/tokens-css.d.ts +2 -0
  227. package/components/radio/README.md +137 -0
  228. package/components/radio/demo/api.html +53 -0
  229. package/components/radio/demo/api.js +19 -0
  230. package/components/radio/demo/api.md +562 -0
  231. package/components/radio/demo/api.min.js +1944 -0
  232. package/components/radio/demo/index.html +50 -0
  233. package/components/radio/demo/index.js +8 -0
  234. package/components/radio/demo/index.md +150 -0
  235. package/components/radio/demo/index.min.js +1901 -0
  236. package/components/radio/demo/readme.html +50 -0
  237. package/components/radio/demo/readme.md +137 -0
  238. package/components/radio/dist/auro-radio-group.d.ts +194 -0
  239. package/components/radio/dist/auro-radio.d.ts +144 -0
  240. package/components/radio/dist/helptextVersion.d.ts +2 -0
  241. package/components/radio/dist/index.d.ts +3 -0
  242. package/components/radio/dist/index.js +1850 -0
  243. package/components/radio/dist/registered.js +1851 -0
  244. package/components/radio/dist/styles/auro-radio-group-css.d.ts +2 -0
  245. package/components/radio/dist/styles/color-css.d.ts +2 -0
  246. package/components/radio/dist/styles/groupColor-css.d.ts +2 -0
  247. package/components/radio/dist/styles/style-css.d.ts +2 -0
  248. package/components/radio/dist/styles/tokens-css.d.ts +2 -0
  249. package/components/select/README.md +144 -0
  250. package/components/select/demo/api.html +71 -0
  251. package/components/select/demo/api.js +35 -0
  252. package/components/select/demo/api.md +1313 -0
  253. package/components/select/demo/api.min.js +7763 -0
  254. package/components/select/demo/index.html +66 -0
  255. package/components/select/demo/index.js +9 -0
  256. package/components/select/demo/index.md +815 -0
  257. package/components/select/demo/index.min.js +7651 -0
  258. package/components/select/demo/readme.html +50 -0
  259. package/components/select/demo/readme.md +144 -0
  260. package/components/select/dist/auro-select.d.ts +359 -0
  261. package/components/select/dist/bibtemplateVersion.d.ts +2 -0
  262. package/components/select/dist/dropdownVersion.d.ts +2 -0
  263. package/components/select/dist/index.d.ts +2 -0
  264. package/components/select/dist/index.js +6300 -0
  265. package/components/select/dist/registered.js +6300 -0
  266. package/components/select/dist/styles/style-css.d.ts +2 -0
  267. package/package.json +217 -0
  268. package/packages/build-tools/src/postinstall.mjs +12 -0
@@ -0,0 +1,1484 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
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;
7
+
8
+ /**
9
+ * @license
10
+ * Copyright 2017 Google LLC
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$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={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$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = 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$2).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$2;this._$Em=e,this[e]=h.fromAttribute(s,t.type)??this._$Ej?.get(e)??null,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$1)(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$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$2.reactiveElementVersions??=[]).push("2.1.0");
13
+
14
+ /**
15
+ * @license
16
+ * Copyright 2017 Google LLC
17
+ * SPDX-License-Identifier: BSD-3-Clause
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$1=t=>a$1(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(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;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?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?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}),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(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$1(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&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}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{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k{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);}}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.0");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
+
21
+ /**
22
+ * @license
23
+ * Copyright 2017 Google LLC
24
+ * SPDX-License-Identifier: BSD-3-Clause
25
+ */const s$1=globalThis;let i$2 = class i extends y$1{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.0");
26
+
27
+ var styleCss$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:inline-block;width:100%;margin:0;padding:0;vertical-align:middle}:host ::slotted(auro-menuoption),:host ::slotted([auro-menuoption]),:host auro-menuoption[loadingplaceholder]{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host ::slotted([selected]){padding-left: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([nocheckmark]) ::slotted(auro-menuoption),:host([nocheckmark]) auro-menuoption[loadingplaceholder]{padding-left:var(--ds-size-200, 1rem)}:host([root]){overflow-y:auto}[loadingplaceholder].empty{opacity:0;position:absolute}[loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}[loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}`;
28
+
29
+ var colorCss$2 = 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)}`;
30
+
31
+ var tokensCss$1 = 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-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
32
+
33
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
34
+ // See LICENSE in the project root for license information.
35
+
36
+ // ---------------------------------------------------------------------
37
+
38
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
39
+
40
+ class AuroLibraryRuntimeUtils {
41
+
42
+ /* eslint-disable jsdoc/require-param */
43
+
44
+ /**
45
+ * This will register a new custom element with the browser.
46
+ * @param {String} name - The name of the custom element.
47
+ * @param {Object} componentClass - The class to register as a custom element.
48
+ * @returns {void}
49
+ */
50
+ registerComponent(name, componentClass) {
51
+ if (!customElements.get(name)) {
52
+ customElements.define(name, class extends componentClass {});
53
+ }
54
+ }
55
+
56
+ /**
57
+ * Finds and returns the closest HTML Element based on a selector.
58
+ * @returns {void}
59
+ */
60
+ closestElement(
61
+ selector, // selector like in .closest()
62
+ base = this, // extra functionality to skip a parent
63
+ __Closest = (el, found = el && el.closest(selector)) =>
64
+ !el || el === document || el === window
65
+ ? null // standard .closest() returns null for non-found selectors also
66
+ : found
67
+ ? found // found a selector INside this element
68
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
69
+ ) {
70
+ return __Closest(base);
71
+ }
72
+ /* eslint-enable jsdoc/require-param */
73
+
74
+ /**
75
+ * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
76
+ * @param {Object} elem - The element to check.
77
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
78
+ * @returns {void}
79
+ */
80
+ handleComponentTagRename(elem, tagName) {
81
+ const tag = tagName.toLowerCase();
82
+ const elemTag = elem.tagName.toLowerCase();
83
+
84
+ if (elemTag !== tag) {
85
+ elem.setAttribute(tag, true);
86
+ }
87
+ }
88
+
89
+ /**
90
+ * Validates if an element is a specific Auro component.
91
+ * @param {Object} elem - The element to validate.
92
+ * @param {String} tagName - The name of the Auro component to check against.
93
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
94
+ */
95
+ elementMatch(elem, tagName) {
96
+ const tag = tagName.toLowerCase();
97
+ const elemTag = elem.tagName.toLowerCase();
98
+
99
+ return elemTag === tag || elem.hasAttribute(tag);
100
+ }
101
+ }
102
+
103
+ // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
104
+ // See LICENSE in the project root for license information.
105
+
106
+ // ---------------------------------------------------------------------
107
+
108
+ /**
109
+ * Converts value to an array.
110
+ * If the value is a JSON string representing an array, it will be parsed.
111
+ * If the value is already an array, it is returned.
112
+ * If the value is undefined, it returns undefined.
113
+ * @private
114
+ * @param {any} value - The value to be converted. Can be a string, array, or undefined.
115
+ * @returns {Array|undefined} - The converted array or undefined.
116
+ * @throws {Error} - Throws an error if the value is not an array, undefined,
117
+ * or if the value cannot be parsed into an array from a JSON string.
118
+ */
119
+ function arrayConverter(value) {
120
+ // Allow undefined
121
+ if (value === undefined) {
122
+ return undefined;
123
+ }
124
+
125
+ // Return the value if it is already an array
126
+ if (Array.isArray(value)) {
127
+ return value;
128
+ }
129
+
130
+ try {
131
+ // If value is a JSON string, parse it
132
+ const parsed = typeof value === 'string' ? JSON.parse(value) : value;
133
+
134
+ // Check if the parsed value is an array
135
+ if (Array.isArray(parsed)) {
136
+ return parsed;
137
+ }
138
+ } catch (error) {
139
+ // If JSON parsing fails, continue to throw an error below
140
+ /* eslint-disable no-console */
141
+ console.error('JSON parsing failed:', error);
142
+ }
143
+
144
+ // Throw error if the input is not an array or undefined
145
+ throw new Error('Invalid value: Input must be an array or undefined');
146
+ }
147
+
148
+ /**
149
+ * Compare two arrays for equality.
150
+ * @private
151
+ * @param {Array} arr1 - First array to compare.
152
+ * @param {Array} arr2 - Second array to compare.
153
+ * @returns {boolean} True if arrays are equal.
154
+ */
155
+ function arraysAreEqual(arr1, arr2) {
156
+ // If both arrays undefined, they are equal (true)
157
+ if (arr1 === undefined || arr2 === undefined) {
158
+ return arr1 === arr2;
159
+ }
160
+
161
+ // If arrays have different lengths, they are not equal
162
+ if (arr1.length !== arr2.length) {
163
+ return false;
164
+ }
165
+
166
+ // If every item at each index is the same, return true
167
+ for (let index = 0; index < arr1.length; index += 1) {
168
+ if (arr1[index] !== arr2[index]) {
169
+ return false;
170
+ }
171
+ }
172
+ return true;
173
+ }
174
+
175
+ /**
176
+ * Compares array for changes.
177
+ * @private
178
+ * @param {Array|any} newVal - New value to compare.
179
+ * @param {Array|any} oldVal - Old value to compare.
180
+ * @returns {boolean} True if arrays have changed.
181
+ */
182
+ function arrayOrUndefinedHasChanged(newVal, oldVal) {
183
+ try {
184
+ // Check if values are undefined or arrays
185
+ const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
186
+
187
+ // If non-array or non-undefined, throw error
188
+ if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
189
+ const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
190
+ throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
191
+ }
192
+
193
+ // Return true if arrays have changed, false if they are the same
194
+ return !arraysAreEqual(newVal, oldVal);
195
+ } catch (error) {
196
+ /* eslint-disable no-console */
197
+ console.error(error);
198
+ // If validation fails, it has changed
199
+ return true;
200
+ }
201
+ }
202
+
203
+ /**
204
+ * Validates if an option can be interacted with.
205
+ * @private
206
+ * @param {HTMLElement} option - The option to check.
207
+ * @returns {boolean} True if option is interactive.
208
+ */
209
+ function isOptionInteractive(option) {
210
+ return !option.hasAttribute('hidden') &&
211
+ !option.hasAttribute('disabled') &&
212
+ !option.hasAttribute('static');
213
+ }
214
+
215
+ /**
216
+ * Helper method to dispatch custom events.
217
+ * @param {HTMLElement} element - Element to dispatch event from.
218
+ * @param {string} eventName - Name of the event to dispatch.
219
+ * @param {Object} [detail] - Optional detail object to include with the event.
220
+ */
221
+ function dispatchMenuEvent(element, eventName, detail = null) {
222
+ const eventConfig = {
223
+ bubbles: true,
224
+ cancelable: false,
225
+ composed: true
226
+ };
227
+
228
+ if (detail !== null) {
229
+ eventConfig.detail = detail;
230
+ }
231
+
232
+ element.dispatchEvent(new CustomEvent(eventName, eventConfig));
233
+ }
234
+
235
+ // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
236
+ // See LICENSE in the project root for license information.
237
+
238
+
239
+
240
+ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
241
+ /**
242
+ * The auro-menu element provides users a way to select from a list of options.
243
+ * @attr {Array<HTMLElement>|undefined} optionSelected - An array of currently selected menu options. In single-select mode, the array will contain only one HTMLElement. `undefined` when no options are selected.
244
+ * @attr {object} optionactive - Specifies the current active menuOption.
245
+ * @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
246
+ * @attr {boolean} disabled - When true, the entire menu and all options are disabled;
247
+ * @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
248
+ * @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
249
+ * @attr {boolean} multiselect - When true, the selected option can be multiple options.
250
+ * @attr {Array<string>|undefined} value - Value selected for the menu. `undefined` when no selection has been made, otherwise an array of strings. In single-select mode, the array will contain only one value.
251
+ * @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
252
+ * @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
253
+ * @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
254
+ * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Notifies when the loading attribute is changed.
255
+ * @event {CustomEvent<any>} auroMenu-selectValueFailure - Notifies that an attempt to select a menuoption by matching a value has failed.
256
+ * @event {CustomEvent<any>} auroMenu-selectValueReset - Notifies that the component value has been reset.
257
+ * @event {CustomEvent<any>} auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
258
+ * @slot loadingText - Text to show while loading attribute is set
259
+ * @slot loadingIcon - Icon to show while loading attribute is set
260
+ * @slot - Slot for insertion of menu options.
261
+ */
262
+
263
+ /* eslint-disable no-magic-numbers, max-lines */
264
+
265
+ class AuroMenu extends i$2 {
266
+ constructor() {
267
+ super();
268
+
269
+ // State properties (reactive)
270
+
271
+ // Value of the selected options
272
+ this.value = undefined;
273
+ // Currently selected option
274
+ this.optionSelected = undefined;
275
+ // String used for highlighting/filtering
276
+ this.matchWord = undefined;
277
+ // Hide the checkmark icon on selected options
278
+ this.noCheckmark = false;
279
+ // Currently active option
280
+ this.optionActive = undefined;
281
+ // Loading state
282
+ this.loading = false;
283
+ // Multi-select mode
284
+ this.multiSelect = false;
285
+
286
+ // Event Bindings
287
+
288
+ /**
289
+ * @private
290
+ */
291
+ this.handleKeyDown = this.handleKeyDown.bind(this);
292
+
293
+ /**
294
+ * @private
295
+ */
296
+ this.handleMouseSelect = this.handleMouseSelect.bind(this);
297
+
298
+ /**
299
+ * @private
300
+ */
301
+ this.handleOptionHover = this.handleOptionHover.bind(this);
302
+
303
+ /**
304
+ * @private
305
+ */
306
+ this.handleSlotChange = this.handleSlotChange.bind(this);
307
+
308
+ // Instance properties (non-reactive)
309
+
310
+ /**
311
+ * @private
312
+ */
313
+ Object.assign(this, {
314
+ // Root-level menu (true) or a nested submenu (false)
315
+ rootMenu: true,
316
+ // Currently focused/active menu item index
317
+ index: -1,
318
+ // Nested menu spacer
319
+ nestingSpacer: '<span class="nestingSpacer"></span>',
320
+ // Loading indicator for slot elements
321
+ loadingSlots: null,
322
+ // Store for menu items
323
+ items: [],
324
+ });
325
+ }
326
+
327
+ static get properties() {
328
+ return {
329
+ noCheckmark: {
330
+ type: Boolean,
331
+ reflect: true,
332
+ attribute: 'nocheckmark'
333
+ },
334
+ disabled: {
335
+ type: Boolean,
336
+ reflect: true
337
+ },
338
+ loading: {
339
+ type: Boolean,
340
+ reflect: true
341
+ },
342
+ optionSelected: {
343
+ // Allow HTMLElement[] arrays and undefined
344
+ converter: arrayConverter,
345
+ hasChanged: arrayOrUndefinedHasChanged
346
+ },
347
+ optionActive: {
348
+ type: Object,
349
+ attribute: 'optionactive'
350
+ },
351
+ matchWord: {
352
+ type: String,
353
+ attribute: 'matchword'
354
+ },
355
+ multiSelect: {
356
+ type: Boolean,
357
+ reflect: true,
358
+ attribute: 'multiselect'
359
+ },
360
+ value: {
361
+ // Allow string[] arrays and undefined
362
+ type: Object,
363
+ converter: arrayConverter,
364
+ hasChanged: arrayOrUndefinedHasChanged
365
+ }
366
+ };
367
+ }
368
+
369
+ static get styles() {
370
+ return [
371
+ styleCss$2,
372
+ colorCss$2,
373
+ tokensCss$1
374
+ ];
375
+ }
376
+
377
+ /**
378
+ * This will register this element with the browser.
379
+ * @param {string} [name="auro-menu"] - The name of element that you want to register to.
380
+ *
381
+ * @example
382
+ * AuroMenu.register("custom-menu") // this will register this element to <custom-menu/>
383
+ *
384
+ */
385
+ static register(name = "auro-menu") {
386
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenu);
387
+ }
388
+
389
+ // Lifecycle Methods
390
+
391
+ connectedCallback() {
392
+ super.connectedCallback();
393
+
394
+ this.addEventListener('keydown', this.handleKeyDown);
395
+ this.addEventListener('mousedown', this.handleMouseSelect);
396
+ this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
397
+ this.addEventListener('slotchange', this.handleSlotChange);
398
+ }
399
+
400
+ disconnectedCallback() {
401
+ this.removeEventListener('keydown', this.handleKeyDown);
402
+ this.removeEventListener('mousedown', this.handleMouseSelect);
403
+ this.removeEventListener('auroMenuOption-mouseover', this.handleOptionHover);
404
+ this.removeEventListener('slotchange', this.handleSlotChange);
405
+
406
+ super.disconnectedCallback();
407
+ }
408
+
409
+ firstUpdated() {
410
+ AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-menu');
411
+
412
+ this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
413
+ this.initializeMenu();
414
+ }
415
+
416
+ updated(changedProperties) {
417
+ if (changedProperties.has('value')) {
418
+ // Handle null/undefined case
419
+ if (this.value === undefined || this.value === null) {
420
+ this.optionSelected = undefined;
421
+ // Reset index tracking
422
+ this.index = -1;
423
+ } else {
424
+ // Convert single values to arrays
425
+ const valueArray = Array.isArray(this.value) ? this.value : [this.value];
426
+
427
+ // Find all matching options
428
+ const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
429
+
430
+ if (matchingOptions.length > 0) {
431
+ if (this.multiSelect) {
432
+ // For multiselect, keep all matching options
433
+ this.optionSelected = matchingOptions;
434
+ } else {
435
+ // For single select, only use the first match
436
+ this.optionSelected = [matchingOptions[0]];
437
+ this.index = this.items.indexOf(matchingOptions[0]);
438
+ }
439
+ } else {
440
+ // No matches found - trigger failure event
441
+ dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
442
+ this.optionSelected = undefined;
443
+ this.index = -1;
444
+ }
445
+ }
446
+
447
+ // Update UI state
448
+ this.updateItemsState(new Map([
449
+ [
450
+ 'optionSelected',
451
+ true
452
+ ]
453
+ ]));
454
+
455
+ // Notify of changes
456
+ if (this.optionSelected !== undefined) {
457
+ this.notifySelectionChange();
458
+ }
459
+ }
460
+
461
+ // Process all other UI updates
462
+ this.updateItemsState(changedProperties);
463
+ }
464
+
465
+ /**
466
+ * Updates the UI state and appearance of menu items based on changed properties.
467
+ * @private
468
+ * @param {Map<string, boolean>} changedProperties - LitElement's changed properties map.
469
+ */
470
+ updateItemsState(changedProperties) {
471
+ if (!this.items) {
472
+ return;
473
+ }
474
+
475
+ // Handle noCheckmark propagation to all menus and options
476
+ if (changedProperties.has('noCheckmark') && this.noCheckmark) {
477
+ // Update both menus and options
478
+ this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
479
+ }
480
+
481
+ // Regex for matchWord if needed
482
+ let regexWord = null;
483
+
484
+ if (changedProperties.has('matchWord') && this.matchWord && this.matchWord.length) {
485
+ const escapedWord = this.matchWord.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
486
+ regexWord = new RegExp(escapedWord, 'giu');
487
+ }
488
+
489
+ // Handle direct item updates
490
+ this.items.forEach((option) => {
491
+ // Update selection if option or value changed
492
+ if (changedProperties.has('optionSelected') || changedProperties.has('value')) {
493
+ const isSelected = this.isOptionSelected(option);
494
+ option.setAttribute('aria-selected', isSelected ? 'true' : 'false');
495
+
496
+ // Add/remove selected attribute based on state
497
+ if (isSelected) {
498
+ option.setAttribute('selected', '');
499
+ } else {
500
+ option.removeAttribute('selected');
501
+ }
502
+ }
503
+
504
+ // Update text highlighting if matchWord changed
505
+ if (changedProperties.has('matchWord') && regexWord &&
506
+ isOptionInteractive(option) && !option.hasAttribute('persistent')) {
507
+ const nested = option.querySelectorAll('.nestingSpacer');
508
+ // Create nested spacers
509
+ const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
510
+
511
+ // Update with spacers and matchWord
512
+ option.innerHTML = nestingSpacerBundle +
513
+ option.textContent.replace(
514
+ regexWord,
515
+ (match) => `<strong>${match}</strong>`
516
+ );
517
+ }
518
+
519
+ // Update disabled state
520
+ if (changedProperties.has('disabled')) {
521
+ option.disabled = this.disabled;
522
+ }
523
+ });
524
+
525
+ // Handle loading state changes
526
+ if (changedProperties.has('loading')) {
527
+ this.setAttribute("aria-busy", this.loading);
528
+ dispatchMenuEvent(this, "auroMenu-loadingChange", {
529
+ loading: this.loading,
530
+ hasLoadingPlaceholder: this.hasLoadingPlaceholder
531
+ });
532
+ }
533
+ }
534
+
535
+ // Init Methods
536
+
537
+ /**
538
+ * Initializes the menu's state and structure.
539
+ * @private
540
+ */
541
+ initializeMenu() {
542
+ this.initItems();
543
+ if (this.rootMenu) {
544
+ this.setAttribute('role', 'listbox');
545
+ this.setAttribute('root', '');
546
+ this.handleNestedMenus(this);
547
+ }
548
+ }
549
+
550
+ /**
551
+ * Initializes menu items and their attributes.
552
+ * @private
553
+ */
554
+ initItems() {
555
+ this.items = Array.from(this.querySelectorAll('auro-menuoption, [auro-menuoption]'));
556
+ if (this.noCheckmark) {
557
+ this.updateItemsState(new Map([
558
+ [
559
+ 'noCheckmark',
560
+ true
561
+ ]
562
+ ]));
563
+ }
564
+ }
565
+
566
+ // Logic Methods
567
+
568
+ /**
569
+ * Updates menu state when an option is selected.
570
+ * @private
571
+ * @param {HTMLElement} option - The option element to select.
572
+ */
573
+ handleSelectState(option) {
574
+ if (this.multiSelect) {
575
+ const currentValue = this.value || [];
576
+ const currentSelected = this.optionSelected || [];
577
+
578
+ if (!currentValue.includes(option.value)) {
579
+ this.value = [
580
+ ...currentValue,
581
+ option.value
582
+ ];
583
+ }
584
+ if (!currentSelected.includes(option)) {
585
+ this.optionSelected = [
586
+ ...currentSelected,
587
+ option
588
+ ];
589
+ }
590
+ } else {
591
+ // Single select - use arrays with single values
592
+ this.value = [option.value];
593
+ this.optionSelected = [option];
594
+ }
595
+
596
+ this.index = this.items.indexOf(option);
597
+ }
598
+
599
+ /**
600
+ * Deselects a menu option and updates related state.
601
+ * @private
602
+ * @param {HTMLElement} option - The menuoption to be deselected.
603
+ */
604
+ handleDeselectState(option) {
605
+ if (this.multiSelect && Array.isArray(this.value)) {
606
+ // Remove this option from array
607
+ this.value = this.value.filter((val) => val !== option.value);
608
+
609
+ // If array is empty after removal, set back to undefined
610
+ if (this.value.length === 0) {
611
+ this.value = undefined;
612
+ }
613
+
614
+ this.optionSelected = this.optionSelected.filter((val) => val !== option);
615
+ if (this.optionSelected.length === 0) {
616
+ this.optionSelected = undefined;
617
+ }
618
+ } else {
619
+ // For single-select: Back to undefined when deselected
620
+ this.value = undefined;
621
+ this.optionSelected = undefined;
622
+ }
623
+
624
+ // Update the index tracking
625
+ this.index = this.items.indexOf(option);
626
+
627
+ // Update UI to reflect changes
628
+ this.updateItemsState(new Map([
629
+ [
630
+ 'optionSelected',
631
+ true
632
+ ]
633
+ ]));
634
+
635
+ // Notify of selection change
636
+ this.notifySelectionChange();
637
+ }
638
+
639
+ /**
640
+ * Resets all options to their default state.
641
+ * @private
642
+ */
643
+ clearSelection() {
644
+ this.optionSelected = undefined;
645
+ this.value = undefined;
646
+ }
647
+
648
+ /**
649
+ * Resets the menu to its initial state.
650
+ * This is the only way to return value to undefined.
651
+ * @public
652
+ */
653
+ reset() {
654
+ // Reset to undefined - initial state
655
+ this.value = undefined;
656
+ this.optionSelected = undefined;
657
+ this.index = -1;
658
+
659
+ // Reset UI state
660
+ this.updateItemsState(new Map([
661
+ [
662
+ 'optionSelected',
663
+ true
664
+ ]
665
+ ]));
666
+
667
+ // Dispatch reset event
668
+ dispatchMenuEvent(this, 'auroMenu-selectValueReset');
669
+ }
670
+
671
+ /**
672
+ * Handles nested menu structure.
673
+ * @private
674
+ * @param {HTMLElement} menu - Root menu element.
675
+ */
676
+ handleNestedMenus(menu) {
677
+ const nestedMenus = menu.querySelectorAll('auro-menu, [auro-menu]');
678
+
679
+ nestedMenus.forEach((nestedMenu) => {
680
+ // role="listbox" only allows "role=group" for children.
681
+ nestedMenu.setAttribute('role', 'group');
682
+ if (!nestedMenu.hasAttribute('aria-label')) {
683
+ nestedMenu.setAttribute('aria-label', 'submenu');
684
+ }
685
+
686
+ const options = nestedMenu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
687
+ options.forEach((option) => {
688
+ option.innerHTML = this.nestingSpacer + option.innerHTML;
689
+ });
690
+
691
+ this.handleNestedMenus(nestedMenu);
692
+ });
693
+ }
694
+
695
+ // Event Handlers
696
+
697
+ /**
698
+ * Handles keyboard navigation.
699
+ * @private
700
+ * @param {KeyboardEvent} event - Event object from the browser.
701
+ */
702
+ handleKeyDown(event) {
703
+ event.preventDefault();
704
+ switch (event.key) {
705
+ case "ArrowDown":
706
+ this.navigateOptions('down');
707
+ break;
708
+ case "ArrowUp":
709
+ this.navigateOptions('up');
710
+ break;
711
+ case "Enter":
712
+ this.makeSelection();
713
+ break;
714
+ }
715
+ }
716
+
717
+ /**
718
+ * Makes a selection based on the current index or clicked option.
719
+ * @private
720
+ */
721
+ makeSelection() {
722
+ if (!this.items) {
723
+ this.initItems();
724
+ }
725
+
726
+ // Get currently selected menu option based on index
727
+ const option = this.items[this.index];
728
+
729
+ // Return early if option is not interactive
730
+ if (!option || !isOptionInteractive(option)) {
731
+ return;
732
+ }
733
+
734
+ // Handle custom events first
735
+ if (option.hasAttribute('event')) {
736
+ this.handleCustomEvent(option);
737
+ return;
738
+ }
739
+
740
+ if (this.multiSelect) {
741
+ // In multiselect, toggle individual selections
742
+ this.toggleOption(option);
743
+ // In single select, only handle selection of new options
744
+ } else if (!this.isOptionSelected(option)) {
745
+ this.clearSelection();
746
+ this.handleSelectState(option);
747
+ }
748
+
749
+ this.notifySelectionChange();
750
+ }
751
+
752
+ /**
753
+ * Toggle the selection state of the menuoption.
754
+ * @private
755
+ * @param {HTMLElement} option - The menuoption to toggle.
756
+ */
757
+ toggleOption(option) {
758
+ const isCurrentlySelected = this.isOptionSelected(option);
759
+
760
+ if (isCurrentlySelected) {
761
+ this.handleDeselectState(option);
762
+ } else if (option.value === undefined || option.value === '') {
763
+ dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
764
+ } else {
765
+ this.handleSelectState(option);
766
+ }
767
+ }
768
+
769
+ /**
770
+ * Handles option selection via mouse.
771
+ * @private
772
+ * @param {MouseEvent} event - Event object from the browser.
773
+ */
774
+ handleMouseSelect(event) {
775
+ if (event.target === this) {
776
+ return;
777
+ }
778
+
779
+ const option = event.target.closest('auro-menuoption, [auro-menuoption]');
780
+ if (option) {
781
+ this.index = this.items.indexOf(option);
782
+ this.makeSelection();
783
+ }
784
+ }
785
+
786
+ /**
787
+ * Handles option hover events.
788
+ * @private
789
+ * @param {CustomEvent} event - Event object from the browser.
790
+ */
791
+ handleOptionHover(event) {
792
+ const option = event.target;
793
+ this.index = this.items.indexOf(option);
794
+ this.updateActiveOption(this.index);
795
+ }
796
+
797
+ /**
798
+ * Handles slot change events.
799
+ * @private
800
+ */
801
+ handleSlotChange() {
802
+ if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
803
+ this.rootMenu = false;
804
+ }
805
+
806
+ if (this.rootMenu) {
807
+ this.initializeMenu();
808
+ } else if (this.noCheckmark) {
809
+ this.updateItemsState(new Map([
810
+ [
811
+ 'noCheckmark',
812
+ true
813
+ ]
814
+ ]));
815
+ }
816
+ }
817
+
818
+ /**
819
+ * Navigates through options using keyboard.
820
+ * @private
821
+ * @param {string} direction - 'up' or 'down'.
822
+ */
823
+ navigateOptions(direction) {
824
+ // Return early if no items exist
825
+ if (!this.items || !this.items.length) {
826
+ return;
827
+ }
828
+
829
+ let newIndex = this.index;
830
+ const increment = direction === 'down' ? 1 : -1;
831
+ const maxIterations = this.items.length;
832
+ let iterations = 0;
833
+ let foundInteractiveOption = false;
834
+
835
+ do {
836
+ newIndex = (newIndex + increment + this.items.length) % this.items.length;
837
+ iterations += 1;
838
+
839
+ // Check if current option is interactive
840
+ const currentOption = this.items[newIndex];
841
+ if (isOptionInteractive(currentOption)) {
842
+ foundInteractiveOption = true;
843
+ break;
844
+ }
845
+
846
+ // Break if all options were checked
847
+ if (iterations >= maxIterations) {
848
+ break;
849
+ }
850
+ } while (iterations < maxIterations);
851
+
852
+ // Handle the results of the search
853
+ if (foundInteractiveOption) {
854
+ // Update only if an interactive option was found
855
+ this.index = newIndex;
856
+ this.updateActiveOption(this.index);
857
+ } else {
858
+ // All options are disabled or non-interactive
859
+ // Keep the current index unchanged
860
+ dispatchMenuEvent(this, 'auroMenu-navigateFailure', {
861
+ reason: 'No interactive options available',
862
+ direction,
863
+ currentIndex: this.index
864
+ });
865
+ }
866
+ }
867
+
868
+ /**
869
+ * Updates the active option state and dispatches events.
870
+ * @private
871
+ * @param {number} index - Index of the option to make active.
872
+ */
873
+ updateActiveOption(index) {
874
+ if (!this.items || !this.items[index]) {
875
+ return;
876
+ }
877
+
878
+ this.items.forEach((item) => item.classList.remove('active'));
879
+ this.items[index].classList.add('active');
880
+ this.optionActive = this.items[index];
881
+ this.index = index;
882
+
883
+ dispatchMenuEvent(this, 'auroMenu-activatedOption', this.items[index]);
884
+ }
885
+
886
+ /**
887
+ * Handles custom events defined on options.
888
+ * @private
889
+ * @param {HTMLElement} option - Option with custom event.
890
+ */
891
+ handleCustomEvent(option) {
892
+ const eventName = option.getAttribute('event');
893
+ dispatchMenuEvent(this, eventName);
894
+ dispatchMenuEvent(this, 'auroMenu-customEventFired');
895
+ }
896
+
897
+ /**
898
+ * Notifies selection change to parent components.
899
+ * @private
900
+ */
901
+ notifySelectionChange() {
902
+ dispatchMenuEvent(this, 'auroMenu-selectedOption');
903
+ }
904
+
905
+ /**
906
+ * Checks if an option is currently selected.
907
+ * @private
908
+ * @param {HTMLElement} option - The option to check.
909
+ * @returns {boolean}
910
+ */
911
+ isOptionSelected(option) {
912
+ if (!this.optionSelected) {
913
+ return false;
914
+ }
915
+ // Always treat as array for both single and multi-select
916
+ return Array.isArray(this.optionSelected) && this.optionSelected.includes(option);
917
+ }
918
+
919
+ /**
920
+ * Getter for loading placeholder state.
921
+ * @returns {boolean} - True if loading slots are present and non-empty.
922
+ */
923
+ get hasLoadingPlaceholder() {
924
+ return this.loadingSlots && this.loadingSlots.length > 0;
925
+ }
926
+
927
+ /**
928
+ * Renders the component.
929
+ * @returns {boolean} - True if loading slots are present and non-empty.
930
+ */
931
+ render() {
932
+ if (this.loading) {
933
+ return x`
934
+ <auro-menuoption disabled loadingplaceholder class="${this.hasLoadingPlaceholder ? '' : 'empty'}">
935
+ <div>
936
+ <slot name="loadingIcon"></slot>
937
+ <slot name="loadingText"></slot>
938
+ </div>
939
+ </auro-menuoption>
940
+ `;
941
+ }
942
+
943
+ return x`<slot @slotchange=${this.handleSlotChange}></slot>`;
944
+ }
945
+ }
946
+
947
+ /**
948
+ * @license
949
+ * Copyright 2020 Google LLC
950
+ * SPDX-License-Identifier: BSD-3-Clause
951
+ */
952
+ 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=n(x);
953
+
954
+ var styleCss$1 = i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}: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)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
955
+
956
+ var colorCss$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
957
+
958
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
959
+ // See LICENSE in the project root for license information.
960
+
961
+
962
+ class AuroDependencyVersioning {
963
+
964
+ /**
965
+ * Generates a unique string to be used for child auro element naming.
966
+ * @private
967
+ * @param {string} baseName - Defines the first part of the unique element name.
968
+ * @param {string} version - Version of the component that will be appended to the baseName.
969
+ * @returns {string} - Unique string to be used for naming.
970
+ */
971
+ generateElementName(baseName, version) {
972
+ let result = baseName;
973
+
974
+ result += '-';
975
+ result += version.replace(/[.]/g, '_');
976
+
977
+ return result;
978
+ }
979
+
980
+ /**
981
+ * Generates a unique string to be used for child auro element naming.
982
+ * @param {string} baseName - Defines the first part of the unique element name.
983
+ * @param {string} version - Version of the component that will be appended to the baseName.
984
+ * @returns {string} - Unique string to be used for naming.
985
+ */
986
+ generateTag(baseName, version, tagClass) {
987
+ const elementName = this.generateElementName(baseName, version);
988
+ const tag = i$1`${s(elementName)}`;
989
+
990
+ if (!customElements.get(elementName)) {
991
+ customElements.define(elementName, class extends tagClass {});
992
+ }
993
+
994
+ return tag;
995
+ }
996
+ }
997
+
998
+ /**
999
+ * @license
1000
+ * Copyright 2017 Google LLC
1001
+ * SPDX-License-Identifier: BSD-3-Clause
1002
+ */
1003
+ 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)}}
1004
+
1005
+ /**
1006
+ * @license
1007
+ * Copyright 2018 Google LLC
1008
+ * SPDX-License-Identifier: BSD-3-Clause
1009
+ */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}});
1010
+
1011
+ /**
1012
+ * @license
1013
+ * Copyright 2018 Google LLC
1014
+ * SPDX-License-Identifier: BSD-3-Clause
1015
+ */const o=o=>o??E;
1016
+
1017
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1018
+ // See LICENSE in the project root for license information.
1019
+
1020
+
1021
+ /**
1022
+ * @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
1023
+ * @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
1024
+ * @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
1025
+ */
1026
+
1027
+ class AuroElement extends i$2 {
1028
+
1029
+ // function to define props used within the scope of this component
1030
+ static get properties() {
1031
+ return {
1032
+ hidden: { type: Boolean,
1033
+ reflect: true },
1034
+ hiddenVisually: { type: Boolean,
1035
+ reflect: true },
1036
+ hiddenAudible: { type: Boolean,
1037
+ reflect: true },
1038
+ };
1039
+ }
1040
+
1041
+ /**
1042
+ * @private Function that determines state of aria-hidden
1043
+ */
1044
+ hideAudible(value) {
1045
+ if (value) {
1046
+ return 'true'
1047
+ }
1048
+
1049
+ return 'false'
1050
+ }
1051
+ }
1052
+
1053
+ var error = {"svg":"<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>"};
1054
+
1055
+ /* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
1056
+
1057
+ const _fetchMap = new Map();
1058
+
1059
+ /**
1060
+ * A callback to parse Response body.
1061
+ *
1062
+ * @callback ResponseParser
1063
+ * @param {Fetch.Response} response
1064
+ * @returns {Promise}
1065
+ */
1066
+
1067
+ /**
1068
+ * A minimal in-memory map to de-duplicate Fetch API media requests.
1069
+ *
1070
+ * @param {String} uri
1071
+ * @param {Object} [options={}]
1072
+ * @param {ResponseParser} [options.responseParser=(response) => response.text()]
1073
+ * @returns {Promise}
1074
+ */
1075
+ const cacheFetch = (uri, options = {}) => {
1076
+ const responseParser = options.responseParser || ((response) => response.text());
1077
+ if (!_fetchMap.has(uri)) {
1078
+ _fetchMap.set(uri, fetch(uri).then(responseParser));
1079
+ }
1080
+ return _fetchMap.get(uri);
1081
+ };
1082
+
1083
+ var styleCss = 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, 0.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, 0.25rem);line-height:1.8}`;
1084
+
1085
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1086
+ // See LICENSE in the project root for license information.
1087
+
1088
+
1089
+ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
1090
+ /**
1091
+ * @slot - Hidden from visibility, used for a11y if icon description is needed
1092
+ */
1093
+
1094
+ // build the component class
1095
+ class BaseIcon extends AuroElement {
1096
+ constructor() {
1097
+ super();
1098
+ this.onDark = false;
1099
+ }
1100
+
1101
+ // function to define props used within the scope of this component
1102
+ static get properties() {
1103
+ return {
1104
+ ...super.properties,
1105
+
1106
+ /**
1107
+ * Set value for on-dark version of auro-icon.
1108
+ */
1109
+ onDark: {
1110
+ type: Boolean,
1111
+ reflect: true
1112
+ },
1113
+
1114
+ /**
1115
+ * @private
1116
+ */
1117
+ svg: {
1118
+ attribute: false,
1119
+ reflect: true
1120
+ }
1121
+ };
1122
+ }
1123
+
1124
+ static get styles() {
1125
+ return i$5`
1126
+ ${styleCss}
1127
+ `;
1128
+ }
1129
+
1130
+ /**
1131
+ * Async function to fetch requested icon from npm CDN.
1132
+ * @private
1133
+ * @param {string} category - Icon category.
1134
+ * @param {string} name - Icon name.
1135
+ * @returns {SVGElement} DOM - Ready HTML to be appended.
1136
+ */
1137
+ async fetchIcon(category, name) {
1138
+ let iconHTML = '';
1139
+
1140
+ if (category === 'logos') {
1141
+ iconHTML = await cacheFetch(`${this.uri}/${category}/${name}.svg`);
1142
+ } else {
1143
+ iconHTML = await cacheFetch(`${this.uri}/icons/${category}/${name}.svg`);
1144
+ }
1145
+
1146
+ const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
1147
+
1148
+ return dom.body.querySelector('svg');
1149
+ }
1150
+
1151
+ // lifecycle function
1152
+ async firstUpdated() {
1153
+ if (!this.customSvg) {
1154
+ const svg = await this.fetchIcon(this.category, this.name);
1155
+
1156
+ if (svg) {
1157
+ this.svg = svg;
1158
+ } else if (!svg) {
1159
+ const penDOM = new DOMParser().parseFromString(error.svg, 'text/html');
1160
+
1161
+ this.svg = penDOM.body.firstChild;
1162
+ }
1163
+ }
1164
+ }
1165
+ }
1166
+
1167
+ var tokensCss = 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)}`;
1168
+
1169
+ var colorCss = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}`;
1170
+
1171
+ // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1172
+ // See LICENSE in the project root for license information.
1173
+
1174
+
1175
+ class AuroIcon extends BaseIcon {
1176
+ constructor() {
1177
+ super();
1178
+
1179
+ this.variant = undefined;
1180
+ this.privateDefaults();
1181
+ }
1182
+
1183
+ /**
1184
+ * Internal Defaults.
1185
+ * @private
1186
+ * @returns {void}
1187
+ */
1188
+ privateDefaults() {
1189
+ this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
1190
+ this.runtimeUtils = new AuroLibraryRuntimeUtils();
1191
+ }
1192
+
1193
+ // function to define props used within the scope of this component
1194
+ static get properties() {
1195
+ return {
1196
+ ...super.properties,
1197
+
1198
+ /**
1199
+ * Set aria-hidden value. Default is `true`. Option is `false`.
1200
+ */
1201
+ ariaHidden: {
1202
+ type: String,
1203
+ reflect: true
1204
+ },
1205
+
1206
+ /**
1207
+ * The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
1208
+ */
1209
+ category: {
1210
+ type: String,
1211
+ reflect: true
1212
+ },
1213
+
1214
+ /**
1215
+ * Allows custom color to be set.
1216
+ */
1217
+ customColor: {
1218
+ type: Boolean
1219
+ },
1220
+
1221
+ /**
1222
+ * When true, auro-icon will render a custom SVG inside the default slot.
1223
+ */
1224
+ customSvg: {
1225
+ type: Boolean
1226
+ },
1227
+
1228
+ /**
1229
+ * Exposes content in slot as icon label.
1230
+ */
1231
+ label: {
1232
+ type: Boolean,
1233
+ reflect: true
1234
+ },
1235
+
1236
+ /**
1237
+ * The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage.
1238
+ */
1239
+ name: {
1240
+ type: String,
1241
+ reflect: true
1242
+ },
1243
+
1244
+ /**
1245
+ * The style of the icon. The accepted variants are `accent1`, `disabled`, `muted`, `statusDefault`, `statusInfo`, `statusSuccess`, `statusWarning`, `statusError`, `statusInfoSubtle`, `statusSuccessSubtle`, `statusWarningSubtle`, `statusErrorSubtle`, `fareBasicEconomy`, `fareBusiness`, `fareEconomy`, `fareFirst`, `farePremiumEconomy`, `tierOneWorldEmerald`, `tierOneWorldSapphire`, `tierOneWorldRuby`.
1246
+ */
1247
+ variant: {
1248
+ type: String,
1249
+ reflect: true
1250
+ }
1251
+ };
1252
+ }
1253
+
1254
+ static get styles() {
1255
+ return [
1256
+ super.styles,
1257
+ i$5`${tokensCss}`,
1258
+ i$5`${styleCss}`,
1259
+ i$5`${colorCss}`
1260
+ ];
1261
+ }
1262
+
1263
+ /**
1264
+ * This will register this element with the browser.
1265
+ * @param {string} [name="auro-icon"] - The name of element that you want to register to.
1266
+ *
1267
+ * @example
1268
+ * AuroIcon.register("custom-icon") // this will register this element to <custom-icon/>
1269
+ *
1270
+ */
1271
+ static register(name = "auro-icon") {
1272
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
1273
+ }
1274
+
1275
+ connectedCallback() {
1276
+ super.connectedCallback();
1277
+
1278
+ // Add the tag name as an attribute if it is different than the component name
1279
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-icon');
1280
+ }
1281
+
1282
+ /**
1283
+ * @private
1284
+ * @returns {void} Exposes CSS parts for styling from parent components.
1285
+ */
1286
+ exposeCssParts() {
1287
+ this.setAttribute('exportparts', 'svg:iconSvg');
1288
+ }
1289
+
1290
+ async firstUpdated() {
1291
+ await super.firstUpdated();
1292
+
1293
+ // Removes the SVG description for screenreader if ariaHidden is set to true
1294
+ if (!this.hasAttribute('ariaHidden') && this.svg) {
1295
+ const svgDesc = this.svg.querySelector('desc');
1296
+
1297
+ if (svgDesc) {
1298
+ svgDesc.remove();
1299
+ this.svg.removeAttribute('aria-labelledby');
1300
+ }
1301
+ }
1302
+ }
1303
+
1304
+ // function that renders the HTML and CSS into the scope of the component
1305
+ render() {
1306
+ const labelClasses = {
1307
+ 'labelWrapper': true,
1308
+ 'util_displayHiddenVisually': !this.label
1309
+ };
1310
+
1311
+ const svgClasses = {
1312
+ 'svgWrapper': true,
1313
+ };
1314
+
1315
+ return x`
1316
+ <div class="componentWrapper">
1317
+ <div
1318
+ class="${e(svgClasses)}"
1319
+ title="${o(this.title || undefined)}">
1320
+ <span aria-hidden="${o(this.ariaHidden || true)}" part="svg">
1321
+ ${this.customSvg ? x`
1322
+ <slot name="svg"></slot>
1323
+ ` : x`
1324
+ ${this.svg}
1325
+ `
1326
+ }
1327
+ </span>
1328
+ </div>
1329
+
1330
+ <div class="${e(labelClasses)}">
1331
+ <slot></slot>
1332
+ </div>
1333
+ </div>
1334
+ `;
1335
+ }
1336
+ }
1337
+
1338
+ var iconVersion = '8.0.2';
1339
+
1340
+ 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>"};
1341
+
1342
+ // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1343
+ // See LICENSE in the project root for license information.
1344
+
1345
+
1346
+ /**
1347
+ * The auro-menu element provides users a way to define a menu option.
1348
+ *
1349
+ * @attr {String} value - Specifies the value to be sent to a server.
1350
+ * @attr {String} noCheckmark - When true, selected option will not show the checkmark.
1351
+ * @attr {Boolean} disabled - When true specifies that the menuoption is disabled.
1352
+ * @attr {Boolean} selected - Specifies that an option is selected.
1353
+ * @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
1354
+ * @slot - Specifies text for an option, but is not the value.
1355
+ */
1356
+ class AuroMenuOption extends i$2 {
1357
+ constructor() {
1358
+ super();
1359
+
1360
+ /**
1361
+ * Generate unique names for dependency components.
1362
+ */
1363
+ const versioning = new AuroDependencyVersioning();
1364
+ this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, AuroIcon);
1365
+
1366
+ this.selected = false;
1367
+ this.nocheckmark = false;
1368
+ this.disabled = false;
1369
+
1370
+ /**
1371
+ * @private
1372
+ */
1373
+ this.tabIndex = -1;
1374
+
1375
+ /**
1376
+ * @private
1377
+ */
1378
+ this.runtimeUtils = new AuroLibraryRuntimeUtils();
1379
+ }
1380
+
1381
+ static get properties() {
1382
+ return {
1383
+ nocheckmark: {
1384
+ type: Boolean,
1385
+ reflect: true
1386
+ },
1387
+ selected: {
1388
+ type: Boolean,
1389
+ reflect: true
1390
+ },
1391
+ disabled: {
1392
+ type: Boolean,
1393
+ reflect: true
1394
+ },
1395
+ value: {
1396
+ type: String
1397
+ },
1398
+ tabIndex: {
1399
+ type: Number,
1400
+ reflect: true
1401
+ }
1402
+ };
1403
+ }
1404
+
1405
+ static get styles() {
1406
+ return [
1407
+ styleCss$1,
1408
+ colorCss$1,
1409
+ tokensCss$1
1410
+ ];
1411
+ }
1412
+
1413
+ /**
1414
+ * This will register this element with the browser.
1415
+ * @param {string} [name="auro-menuoption"] - The name of element that you want to register to.
1416
+ *
1417
+ * @example
1418
+ * AuroMenuOption.register("custom-menuoption") // this will register this element to <custom-menuoption/>
1419
+ *
1420
+ */
1421
+ static register(name = "auro-menuoption") {
1422
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenuOption);
1423
+ }
1424
+
1425
+ firstUpdated() {
1426
+ // Add the tag name as an attribute if it is different than the component name
1427
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
1428
+
1429
+ this.setAttribute('role', 'option');
1430
+ this.setAttribute('aria-selected', 'false');
1431
+
1432
+ this.addEventListener('mouseover', () => {
1433
+ this.dispatchEvent(new CustomEvent('auroMenuOption-mouseover', {
1434
+ bubbles: true,
1435
+ cancelable: false,
1436
+ composed: true,
1437
+ detail: this
1438
+ }));
1439
+ });
1440
+ }
1441
+
1442
+ // observer for selected property changes
1443
+ updated(changedProperties) {
1444
+ if (changedProperties.has('selected')) {
1445
+ this.setAttribute('aria-selected', this.selected.toString());
1446
+ }
1447
+ }
1448
+
1449
+ /**
1450
+ * Generates an HTML element containing an SVG icon based on the provided `svgContent`.
1451
+ *
1452
+ * @private
1453
+ * @param {string} svgContent - The SVG content to be embedded.
1454
+ * @returns {Element} The HTML element containing the SVG icon.
1455
+ */
1456
+ generateIconHtml(svgContent) {
1457
+ const dom = new DOMParser().parseFromString(svgContent, 'text/html');
1458
+ const svg = dom.body.firstChild;
1459
+
1460
+ svg.setAttribute('slot', 'svg');
1461
+
1462
+ return u`<${this.iconTag} customColor customSvg slot="icon">${svg}</${this.iconTag}>`;
1463
+ }
1464
+
1465
+ render() {
1466
+ return u`
1467
+ ${this.selected && !this.nocheckmark ? this.generateIconHtml(checkmarkIcon.svg) : undefined}
1468
+ <slot></slot>
1469
+ `;
1470
+ }
1471
+ }
1472
+
1473
+ /* eslint-disable jsdoc/require-jsdoc, no-magic-numbers, no-param-reassign */
1474
+
1475
+
1476
+ AuroMenu.register();
1477
+ AuroMenuOption.register();
1478
+ AuroMenu.register('custom-menu');
1479
+ AuroMenuOption.register('custom-menuoption');
1480
+
1481
+ function initExamples(initCount) {
1482
+ }
1483
+
1484
+ export { initExamples };