@aurodesignsystem/auro-formkit 1.6.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (818) hide show
  1. package/.husky/commit-msg +4 -0
  2. package/.husky/pre-commit +3 -0
  3. package/.turbo/cache/06e8fe5b2ddad186-meta.json +1 -0
  4. package/.turbo/cache/06e8fe5b2ddad186.tar.zst +0 -0
  5. package/.turbo/cache/10feda0f037804bb-meta.json +1 -0
  6. package/.turbo/cache/10feda0f037804bb.tar.zst +0 -0
  7. package/.turbo/cache/12f223ca7c12a587-meta.json +1 -0
  8. package/.turbo/cache/12f223ca7c12a587.tar.zst +0 -0
  9. package/.turbo/cache/144e8e78657bf800-meta.json +1 -0
  10. package/.turbo/cache/144e8e78657bf800.tar.zst +0 -0
  11. package/.turbo/cache/18939b2c7c83b163-meta.json +1 -0
  12. package/.turbo/cache/18939b2c7c83b163.tar.zst +0 -0
  13. package/.turbo/cache/1de685df0eaa39c8-meta.json +1 -0
  14. package/.turbo/cache/1de685df0eaa39c8.tar.zst +0 -0
  15. package/.turbo/cache/1f3b6e5b310ff590-meta.json +1 -0
  16. package/.turbo/cache/1f3b6e5b310ff590.tar.zst +0 -0
  17. package/.turbo/cache/1f53ce3a28c56cdf-meta.json +1 -0
  18. package/.turbo/cache/1f53ce3a28c56cdf.tar.zst +0 -0
  19. package/.turbo/cache/235d3af66386f827-meta.json +1 -0
  20. package/.turbo/cache/235d3af66386f827.tar.zst +0 -0
  21. package/.turbo/cache/23bf100310bd9f5a-meta.json +1 -0
  22. package/.turbo/cache/23bf100310bd9f5a.tar.zst +0 -0
  23. package/.turbo/cache/2900e7ec28e1488f-meta.json +1 -0
  24. package/.turbo/cache/2900e7ec28e1488f.tar.zst +0 -0
  25. package/.turbo/cache/2dd00eb6e255bd02-meta.json +1 -0
  26. package/.turbo/cache/2dd00eb6e255bd02.tar.zst +0 -0
  27. package/.turbo/cache/33466ea2930c3714-meta.json +1 -0
  28. package/.turbo/cache/33466ea2930c3714.tar.zst +0 -0
  29. package/.turbo/cache/451e562c76f74ec6-meta.json +1 -0
  30. package/.turbo/cache/451e562c76f74ec6.tar.zst +0 -0
  31. package/.turbo/cache/4520919609c97850-meta.json +1 -0
  32. package/.turbo/cache/4520919609c97850.tar.zst +0 -0
  33. package/.turbo/cache/45542e8beda9bb05-meta.json +1 -0
  34. package/.turbo/cache/45542e8beda9bb05.tar.zst +0 -0
  35. package/.turbo/cache/4a510678a1fcfe5c-meta.json +1 -0
  36. package/.turbo/cache/4a510678a1fcfe5c.tar.zst +0 -0
  37. package/.turbo/cache/5058ecc7f1e34496-meta.json +1 -0
  38. package/.turbo/cache/5058ecc7f1e34496.tar.zst +0 -0
  39. package/.turbo/cache/5e689c61e1109b98-meta.json +1 -0
  40. package/.turbo/cache/5e689c61e1109b98.tar.zst +0 -0
  41. package/.turbo/cache/62519d73b891d83c-meta.json +1 -0
  42. package/.turbo/cache/62519d73b891d83c.tar.zst +0 -0
  43. package/.turbo/cache/65511706643c4a44-meta.json +1 -0
  44. package/.turbo/cache/65511706643c4a44.tar.zst +0 -0
  45. package/.turbo/cache/6992d7134a39e43e-meta.json +1 -0
  46. package/.turbo/cache/6992d7134a39e43e.tar.zst +0 -0
  47. package/.turbo/cache/6bbc14e82dbe2dab-meta.json +1 -0
  48. package/.turbo/cache/6bbc14e82dbe2dab.tar.zst +0 -0
  49. package/.turbo/cache/706d4f762cc8061c-meta.json +1 -0
  50. package/.turbo/cache/706d4f762cc8061c.tar.zst +0 -0
  51. package/.turbo/cache/70d7b72f15ee97a4-meta.json +1 -0
  52. package/.turbo/cache/70d7b72f15ee97a4.tar.zst +0 -0
  53. package/.turbo/cache/7255686674920f97-meta.json +1 -0
  54. package/.turbo/cache/7255686674920f97.tar.zst +0 -0
  55. package/.turbo/cache/73572172d84713cd-meta.json +1 -0
  56. package/.turbo/cache/73572172d84713cd.tar.zst +0 -0
  57. package/.turbo/cache/7ddb7ace73fe6ec2-meta.json +1 -0
  58. package/.turbo/cache/7ddb7ace73fe6ec2.tar.zst +0 -0
  59. package/.turbo/cache/7e901cc4235b7051-meta.json +1 -0
  60. package/.turbo/cache/7e901cc4235b7051.tar.zst +0 -0
  61. package/.turbo/cache/821d931bf082b7de-meta.json +1 -0
  62. package/.turbo/cache/821d931bf082b7de.tar.zst +0 -0
  63. package/.turbo/cache/897b0d8a0c301207-meta.json +1 -0
  64. package/.turbo/cache/897b0d8a0c301207.tar.zst +0 -0
  65. package/.turbo/cache/8b7cdb9a0d4c3112-meta.json +1 -0
  66. package/.turbo/cache/8b7cdb9a0d4c3112.tar.zst +0 -0
  67. package/.turbo/cache/9135f474c69d1b3c-meta.json +1 -0
  68. package/.turbo/cache/9135f474c69d1b3c.tar.zst +0 -0
  69. package/.turbo/cache/9a7ab914e08ce75f-meta.json +1 -0
  70. package/.turbo/cache/9a7ab914e08ce75f.tar.zst +0 -0
  71. package/.turbo/cache/a174f9409e2dbb04-meta.json +1 -0
  72. package/.turbo/cache/a174f9409e2dbb04.tar.zst +0 -0
  73. package/.turbo/cache/a7bf477bbdabc7bc-meta.json +1 -0
  74. package/.turbo/cache/a7bf477bbdabc7bc.tar.zst +0 -0
  75. package/.turbo/cache/a90aa34f427a2f62-meta.json +1 -0
  76. package/.turbo/cache/a90aa34f427a2f62.tar.zst +0 -0
  77. package/.turbo/cache/aeee74f29106cab5-meta.json +1 -0
  78. package/.turbo/cache/aeee74f29106cab5.tar.zst +0 -0
  79. package/.turbo/cache/b61416daf63fbaad-meta.json +1 -0
  80. package/.turbo/cache/b61416daf63fbaad.tar.zst +0 -0
  81. package/.turbo/cache/b9463532618cdc61-meta.json +1 -0
  82. package/.turbo/cache/b9463532618cdc61.tar.zst +0 -0
  83. package/.turbo/cache/bb3afea40c91e8ba-meta.json +1 -0
  84. package/.turbo/cache/bb3afea40c91e8ba.tar.zst +0 -0
  85. package/.turbo/cache/c2e5da6599ac51c9-meta.json +1 -0
  86. package/.turbo/cache/c2e5da6599ac51c9.tar.zst +0 -0
  87. package/.turbo/cache/c53689c4c8b7448c-meta.json +1 -0
  88. package/.turbo/cache/c53689c4c8b7448c.tar.zst +0 -0
  89. package/.turbo/cache/c63dc7b6157da70b-meta.json +1 -0
  90. package/.turbo/cache/c63dc7b6157da70b.tar.zst +0 -0
  91. package/.turbo/cache/c7bb3445b71ead45-meta.json +1 -0
  92. package/.turbo/cache/c7bb3445b71ead45.tar.zst +0 -0
  93. package/.turbo/cache/c8b63b6e8a190eb9-meta.json +1 -0
  94. package/.turbo/cache/c8b63b6e8a190eb9.tar.zst +0 -0
  95. package/.turbo/cache/cd8bab87240a17ed-meta.json +1 -0
  96. package/.turbo/cache/cd8bab87240a17ed.tar.zst +0 -0
  97. package/.turbo/cache/d35b1eee9f2881af-meta.json +1 -0
  98. package/.turbo/cache/d35b1eee9f2881af.tar.zst +0 -0
  99. package/.turbo/cache/d641ace8fafc5cd2-meta.json +1 -0
  100. package/.turbo/cache/d641ace8fafc5cd2.tar.zst +0 -0
  101. package/.turbo/cache/d8bd6f80733c28af-meta.json +1 -0
  102. package/.turbo/cache/d8bd6f80733c28af.tar.zst +0 -0
  103. package/.turbo/cache/e4b3ec56d4ae56ba-meta.json +1 -0
  104. package/.turbo/cache/e4b3ec56d4ae56ba.tar.zst +0 -0
  105. package/.turbo/cache/e6f030eddf6fbf4e-meta.json +1 -0
  106. package/.turbo/cache/e6f030eddf6fbf4e.tar.zst +0 -0
  107. package/.turbo/cache/e81d7d64333b17e4-meta.json +1 -0
  108. package/.turbo/cache/e81d7d64333b17e4.tar.zst +0 -0
  109. package/.turbo/cache/ec4e1a5bd603f7ef-meta.json +1 -0
  110. package/.turbo/cache/ec4e1a5bd603f7ef.tar.zst +0 -0
  111. package/.turbo/cache/f6ee0c1e3e6753e1-meta.json +1 -0
  112. package/.turbo/cache/f6ee0c1e3e6753e1.tar.zst +0 -0
  113. package/.turbo/cache/f88563bd8d462bf1-meta.json +1 -0
  114. package/.turbo/cache/f88563bd8d462bf1.tar.zst +0 -0
  115. package/.turbo/cache/fdce614efad05760-meta.json +1 -0
  116. package/.turbo/cache/fdce614efad05760.tar.zst +0 -0
  117. package/.turbo/cache/fdd1bdd173a4185c-meta.json +1 -0
  118. package/.turbo/cache/fdd1bdd173a4185c.tar.zst +0 -0
  119. package/CHANGELOG.md +367 -0
  120. package/LICENSE +201 -0
  121. package/README.md +225 -0
  122. package/components/checkbox/.stylelintrc.json +3 -0
  123. package/components/checkbox/.turbo/turbo-build$colon$sass.log +98 -0
  124. package/components/checkbox/.turbo/turbo-build.log +182 -0
  125. package/components/checkbox/.turbo/turbo-bundler.log +13 -0
  126. package/components/checkbox/.turbo/turbo-postCss$colon$component.log +5 -0
  127. package/components/checkbox/.turbo/turbo-sass$colon$render.log +34 -0
  128. package/components/checkbox/.turbo/turbo-types.log +4 -0
  129. package/components/checkbox/README.md +187 -0
  130. package/components/checkbox/demo/api.html +48 -0
  131. package/components/checkbox/demo/api.js +1 -0
  132. package/components/checkbox/demo/api.md +272 -0
  133. package/components/checkbox/demo/api.min.js +845 -0
  134. package/components/checkbox/demo/index.js +8 -0
  135. package/components/checkbox/demo/index.md +306 -0
  136. package/components/checkbox/demo/index.min.js +845 -0
  137. package/components/checkbox/dist/auro-checkbox-group.d.ts +119 -0
  138. package/components/checkbox/dist/auro-checkbox-group.d.ts.map +1 -0
  139. package/components/checkbox/dist/auro-checkbox.d.ts +75 -0
  140. package/components/checkbox/dist/auro-checkbox.d.ts.map +1 -0
  141. package/components/checkbox/dist/index.d.ts +4 -0
  142. package/components/checkbox/dist/index.d.ts.map +1 -0
  143. package/components/checkbox/dist/index.js +844 -0
  144. package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +3 -0
  145. package/components/checkbox/dist/styles/auro-checkbox-css.d.ts.map +1 -0
  146. package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +3 -0
  147. package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts.map +1 -0
  148. package/components/checkbox/dist/styles/color-css.d.ts +3 -0
  149. package/components/checkbox/dist/styles/color-css.d.ts.map +1 -0
  150. package/components/checkbox/dist/styles/colorGroup-css.d.ts +3 -0
  151. package/components/checkbox/dist/styles/colorGroup-css.d.ts.map +1 -0
  152. package/components/checkbox/dist/styles/tokens-css.d.ts +3 -0
  153. package/components/checkbox/dist/styles/tokens-css.d.ts.map +1 -0
  154. package/components/checkbox/node_modules/chalk/package.json +83 -0
  155. package/components/checkbox/node_modules/chalk/readme.md +325 -0
  156. package/components/checkbox/node_modules/chalk/source/index.d.ts +320 -0
  157. package/components/checkbox/node_modules/chalk/source/index.js +225 -0
  158. package/components/checkbox/node_modules/chalk/source/utilities.js +33 -0
  159. package/components/checkbox/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  160. package/components/checkbox/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  161. package/components/checkbox/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  162. package/components/checkbox/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  163. package/components/checkbox/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  164. package/components/checkbox/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  165. package/components/checkbox/package.json +68 -0
  166. package/components/checkbox/src/auro-checkbox-group.js +319 -0
  167. package/components/checkbox/src/auro-checkbox.js +184 -0
  168. package/components/checkbox/src/index.js +8 -0
  169. package/components/checkbox/src/styles/auro-checkbox-css.js +2 -0
  170. package/components/checkbox/src/styles/auro-checkbox-group-css.js +2 -0
  171. package/components/checkbox/src/styles/auro-checkbox-group.css +26 -0
  172. package/components/checkbox/src/styles/auro-checkbox-group.scss +38 -0
  173. package/components/checkbox/src/styles/auro-checkbox.css +123 -0
  174. package/components/checkbox/src/styles/auro-checkbox.scss +100 -0
  175. package/components/checkbox/src/styles/color-css.js +2 -0
  176. package/components/checkbox/src/styles/color.css +84 -0
  177. package/components/checkbox/src/styles/color.scss +118 -0
  178. package/components/checkbox/src/styles/colorGroup-css.js +2 -0
  179. package/components/checkbox/src/styles/colorGroup.css +16 -0
  180. package/components/checkbox/src/styles/colorGroup.scss +24 -0
  181. package/components/checkbox/src/styles/tokens-css.js +2 -0
  182. package/components/checkbox/src/styles/tokens.css +9 -0
  183. package/components/checkbox/src/styles/tokens.scss +11 -0
  184. package/components/combobox/.stylelintrc.json +3 -0
  185. package/components/combobox/.turbo/turbo-build$colon$sass.log +46 -0
  186. package/components/combobox/.turbo/turbo-build.log +157 -0
  187. package/components/combobox/.turbo/turbo-postCss$colon$component.log +5 -0
  188. package/components/combobox/.turbo/turbo-sass$colon$render.log +10 -0
  189. package/components/combobox/README.md +200 -0
  190. package/components/combobox/demo/api.html +54 -0
  191. package/components/combobox/demo/api.js +32 -0
  192. package/components/combobox/demo/api.md +743 -0
  193. package/components/combobox/demo/api.min.js +9017 -0
  194. package/components/combobox/demo/index.js +26 -0
  195. package/components/combobox/demo/index.md +626 -0
  196. package/components/combobox/demo/index.min.js +8919 -0
  197. package/components/combobox/dist/auro-combobox.d.ts +221 -0
  198. package/components/combobox/dist/auro-combobox.d.ts.map +1 -0
  199. package/components/combobox/dist/formkit/auro-dropdownVersion.d.ts +3 -0
  200. package/components/combobox/dist/formkit/auro-dropdownVersion.d.ts.map +1 -0
  201. package/components/combobox/dist/formkit/auro-inputVersion.d.ts +3 -0
  202. package/components/combobox/dist/formkit/auro-inputVersion.d.ts.map +1 -0
  203. package/components/combobox/dist/index.d.ts +3 -0
  204. package/components/combobox/dist/index.d.ts.map +1 -0
  205. package/components/combobox/dist/index.js +7842 -0
  206. package/components/combobox/dist/styles/style-css.d.ts +3 -0
  207. package/components/combobox/dist/styles/style-css.d.ts.map +1 -0
  208. package/components/combobox/node_modules/chalk/package.json +83 -0
  209. package/components/combobox/node_modules/chalk/readme.md +325 -0
  210. package/components/combobox/node_modules/chalk/source/index.d.ts +320 -0
  211. package/components/combobox/node_modules/chalk/source/index.js +225 -0
  212. package/components/combobox/node_modules/chalk/source/utilities.js +33 -0
  213. package/components/combobox/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  214. package/components/combobox/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  215. package/components/combobox/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  216. package/components/combobox/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  217. package/components/combobox/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  218. package/components/combobox/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  219. package/components/combobox/package.json +67 -0
  220. package/components/combobox/src/auro-combobox.js +674 -0
  221. package/components/combobox/src/formkit/auro-dropdownVersion.js +1 -0
  222. package/components/combobox/src/formkit/auro-inputVersion.js +1 -0
  223. package/components/combobox/src/index.js +6 -0
  224. package/components/combobox/src/styles/style-css.js +2 -0
  225. package/components/combobox/src/styles/style.css +60 -0
  226. package/components/combobox/src/styles/style.scss +46 -0
  227. package/components/counter/.stylelintrc.json +3 -0
  228. package/components/counter/.turbo/turbo-build$colon$sass.log +66 -0
  229. package/components/counter/.turbo/turbo-build.log +87 -0
  230. package/components/counter/.turbo/turbo-bundler.log +13 -0
  231. package/components/counter/.turbo/turbo-postCss$colon$component.log +5 -0
  232. package/components/counter/.turbo/turbo-sass$colon$render.log +16 -0
  233. package/components/counter/.turbo/turbo-types.log +4 -0
  234. package/components/counter/demo/api.html +52 -0
  235. package/components/counter/demo/api.js +16 -0
  236. package/components/counter/demo/api.md +1053 -0
  237. package/components/counter/demo/api.min.js +115 -0
  238. package/components/counter/demo/index.js +20 -0
  239. package/components/counter/demo/index.md +12 -0
  240. package/components/counter/demo/index.min.js +71 -0
  241. package/components/counter/dist/auro-counter-group.d.ts +20 -0
  242. package/components/counter/dist/auro-counter-group.d.ts.map +1 -0
  243. package/components/counter/dist/auro-counter.d.ts +6 -0
  244. package/components/counter/dist/auro-counter.d.ts.map +1 -0
  245. package/components/counter/dist/index.d.ts +4 -0
  246. package/components/counter/dist/index.d.ts.map +1 -0
  247. package/components/counter/dist/index.js +110 -0
  248. package/components/counter/dist/styles/counter-group-css.d.ts +3 -0
  249. package/components/counter/dist/styles/counter-group-css.d.ts.map +1 -0
  250. package/components/counter/dist/styles/style-css.d.ts +3 -0
  251. package/components/counter/dist/styles/style-css.d.ts.map +1 -0
  252. package/components/counter/node_modules/chalk/package.json +83 -0
  253. package/components/counter/node_modules/chalk/readme.md +325 -0
  254. package/components/counter/node_modules/chalk/source/index.d.ts +320 -0
  255. package/components/counter/node_modules/chalk/source/index.js +225 -0
  256. package/components/counter/node_modules/chalk/source/utilities.js +33 -0
  257. package/components/counter/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  258. package/components/counter/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  259. package/components/counter/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  260. package/components/counter/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  261. package/components/counter/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  262. package/components/counter/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  263. package/components/counter/package.json +50 -0
  264. package/components/counter/src/auro-counter-group.js +48 -0
  265. package/components/counter/src/auro-counter.js +29 -0
  266. package/components/counter/src/index.js +8 -0
  267. package/components/counter/src/styles/counter-group-css.js +2 -0
  268. package/components/counter/src/styles/counter-group.css +4 -0
  269. package/components/counter/src/styles/counter-group.scss +17 -0
  270. package/components/counter/src/styles/style-css.js +2 -0
  271. package/components/counter/src/styles/style.css +4 -0
  272. package/components/counter/src/styles/style.scss +17 -0
  273. package/components/datepicker/.stylelintrc.json +3 -0
  274. package/components/datepicker/.turbo/turbo-build$colon$sass.log +352 -0
  275. package/components/datepicker/.turbo/turbo-build.log +489 -0
  276. package/components/datepicker/.turbo/turbo-postCss$colon$component.log +5 -0
  277. package/components/datepicker/.turbo/turbo-sass$colon$render.log +58 -0
  278. package/components/datepicker/README.md +181 -0
  279. package/components/datepicker/demo/api.html +58 -0
  280. package/components/datepicker/demo/api.js +33 -0
  281. package/components/datepicker/demo/api.md +1172 -0
  282. package/components/datepicker/demo/api.min.js +18446 -0
  283. package/components/datepicker/demo/index.js +19 -0
  284. package/components/datepicker/demo/index.md +107 -0
  285. package/components/datepicker/demo/index.min.js +18175 -0
  286. package/components/datepicker/dist/auro-calendar-cell.d.ts +163 -0
  287. package/components/datepicker/dist/auro-calendar-cell.d.ts.map +1 -0
  288. package/components/datepicker/dist/auro-calendar-month.d.ts +5 -0
  289. package/components/datepicker/dist/auro-calendar-month.d.ts.map +1 -0
  290. package/components/datepicker/dist/auro-calendar.d.ts +105 -0
  291. package/components/datepicker/dist/auro-calendar.d.ts.map +1 -0
  292. package/components/datepicker/dist/auro-datepicker.d.ts +336 -0
  293. package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -0
  294. package/components/datepicker/dist/dropdownVersion.d.ts +1 -0
  295. package/components/datepicker/dist/dropdownVersion.d.ts.map +1 -0
  296. package/components/datepicker/dist/formkit/auro-dropdownVersion.d.ts +3 -0
  297. package/components/datepicker/dist/formkit/auro-dropdownVersion.d.ts.map +1 -0
  298. package/components/datepicker/dist/formkit/auro-inputVersion.d.ts +3 -0
  299. package/components/datepicker/dist/formkit/auro-inputVersion.d.ts.map +1 -0
  300. package/components/datepicker/dist/index.d.ts +3 -0
  301. package/components/datepicker/dist/index.d.ts.map +1 -0
  302. package/components/datepicker/dist/index.js +18171 -0
  303. package/components/datepicker/dist/popoverVersion.d.ts +3 -0
  304. package/components/datepicker/dist/popoverVersion.d.ts.map +1 -0
  305. package/components/datepicker/dist/styles/color-calendar-css.d.ts +3 -0
  306. package/components/datepicker/dist/styles/color-calendar-css.d.ts.map +1 -0
  307. package/components/datepicker/dist/styles/color-cell-css.d.ts +3 -0
  308. package/components/datepicker/dist/styles/color-cell-css.d.ts.map +1 -0
  309. package/components/datepicker/dist/styles/color-css.d.ts +3 -0
  310. package/components/datepicker/dist/styles/color-css.d.ts.map +1 -0
  311. package/components/datepicker/dist/styles/color-month-css.d.ts +3 -0
  312. package/components/datepicker/dist/styles/color-month-css.d.ts.map +1 -0
  313. package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +3 -0
  314. package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts.map +1 -0
  315. package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +3 -0
  316. package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts.map +1 -0
  317. package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +3 -0
  318. package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts.map +1 -0
  319. package/components/datepicker/dist/styles/style-css.d.ts +3 -0
  320. package/components/datepicker/dist/styles/style-css.d.ts.map +1 -0
  321. package/components/datepicker/dist/styles/tokens-css.d.ts +3 -0
  322. package/components/datepicker/dist/styles/tokens-css.d.ts.map +1 -0
  323. package/components/datepicker/dist/utilities.d.ts +47 -0
  324. package/components/datepicker/dist/utilities.d.ts.map +1 -0
  325. package/components/datepicker/dist/utilitiesCalendar.d.ts +39 -0
  326. package/components/datepicker/dist/utilitiesCalendar.d.ts.map +1 -0
  327. package/components/datepicker/dist/utilitiesCalendarRender.d.ts +51 -0
  328. package/components/datepicker/dist/utilitiesCalendarRender.d.ts.map +1 -0
  329. package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +6 -0
  330. package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts.map +1 -0
  331. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +61 -0
  332. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts.map +1 -0
  333. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +2 -0
  334. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts.map +1 -0
  335. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +58 -0
  336. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts.map +1 -0
  337. package/components/datepicker/node_modules/chalk/package.json +83 -0
  338. package/components/datepicker/node_modules/chalk/readme.md +325 -0
  339. package/components/datepicker/node_modules/chalk/source/index.d.ts +320 -0
  340. package/components/datepicker/node_modules/chalk/source/index.js +225 -0
  341. package/components/datepicker/node_modules/chalk/source/utilities.js +33 -0
  342. package/components/datepicker/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  343. package/components/datepicker/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  344. package/components/datepicker/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  345. package/components/datepicker/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  346. package/components/datepicker/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  347. package/components/datepicker/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  348. package/components/datepicker/node_modules/rollup-plugin-serve/LICENSE.md +21 -0
  349. package/components/datepicker/node_modules/rollup-plugin-serve/README.md +137 -0
  350. package/components/datepicker/node_modules/rollup-plugin-serve/dist/index.cjs +181 -0
  351. package/components/datepicker/node_modules/rollup-plugin-serve/dist/index.mjs +173 -0
  352. package/components/datepicker/node_modules/rollup-plugin-serve/index.d.ts +75 -0
  353. package/components/datepicker/node_modules/rollup-plugin-serve/package.json +51 -0
  354. package/components/datepicker/package.json +79 -0
  355. package/components/datepicker/src/auro-calendar-cell.js +381 -0
  356. package/components/datepicker/src/auro-calendar-month.js +128 -0
  357. package/components/datepicker/src/auro-calendar.js +328 -0
  358. package/components/datepicker/src/auro-datepicker.js +968 -0
  359. package/components/datepicker/src/dropdownVersion.js +0 -0
  360. package/components/datepicker/src/formkit/auro-dropdownVersion.js +1 -0
  361. package/components/datepicker/src/formkit/auro-inputVersion.js +1 -0
  362. package/components/datepicker/src/index.js +6 -0
  363. package/components/datepicker/src/popoverVersion.js +1 -0
  364. package/components/datepicker/src/styles/color-calendar-css.js +2 -0
  365. package/components/datepicker/src/styles/color-calendar.css +35 -0
  366. package/components/datepicker/src/styles/color-calendar.scss +51 -0
  367. package/components/datepicker/src/styles/color-cell-css.js +2 -0
  368. package/components/datepicker/src/styles/color-cell.css +45 -0
  369. package/components/datepicker/src/styles/color-cell.scss +73 -0
  370. package/components/datepicker/src/styles/color-css.js +2 -0
  371. package/components/datepicker/src/styles/color-month-css.js +2 -0
  372. package/components/datepicker/src/styles/color-month.css +34 -0
  373. package/components/datepicker/src/styles/color-month.scss +27 -0
  374. package/components/datepicker/src/styles/color.css +43 -0
  375. package/components/datepicker/src/styles/color.scss +30 -0
  376. package/components/datepicker/src/styles/style-auro-calendar-cell-css.js +2 -0
  377. package/components/datepicker/src/styles/style-auro-calendar-cell.css +123 -0
  378. package/components/datepicker/src/styles/style-auro-calendar-cell.scss +147 -0
  379. package/components/datepicker/src/styles/style-auro-calendar-css.js +2 -0
  380. package/components/datepicker/src/styles/style-auro-calendar-month-css.js +2 -0
  381. package/components/datepicker/src/styles/style-auro-calendar-month.css +121 -0
  382. package/components/datepicker/src/styles/style-auro-calendar-month.scss +141 -0
  383. package/components/datepicker/src/styles/style-auro-calendar.css +152 -0
  384. package/components/datepicker/src/styles/style-auro-calendar.scss +191 -0
  385. package/components/datepicker/src/styles/style-css.js +2 -0
  386. package/components/datepicker/src/styles/style.css +111 -0
  387. package/components/datepicker/src/styles/style.scss +107 -0
  388. package/components/datepicker/src/styles/tokens-css.js +2 -0
  389. package/components/datepicker/src/styles/tokens.css +22 -0
  390. package/components/datepicker/src/styles/tokens.scss +25 -0
  391. package/components/datepicker/src/utilities.js +87 -0
  392. package/components/datepicker/src/utilitiesCalendar.js +139 -0
  393. package/components/datepicker/src/utilitiesCalendarRender.js +156 -0
  394. package/components/datepicker/src/vendor/wc-range-datepicker/day.js +8 -0
  395. package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker-calendar.js +521 -0
  396. package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker-cell.js +211 -0
  397. package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker.js +254 -0
  398. package/components/dropdown/.stylelintrc.json +3 -0
  399. package/components/dropdown/.turbo/turbo-build$colon$sass.log +75 -0
  400. package/components/dropdown/.turbo/turbo-build$colon$version.log +7 -0
  401. package/components/dropdown/.turbo/turbo-build.log +206 -0
  402. package/components/dropdown/.turbo/turbo-bundler.log +13 -0
  403. package/components/dropdown/.turbo/turbo-postCss$colon$component.log +5 -0
  404. package/components/dropdown/.turbo/turbo-sass$colon$render.log +34 -0
  405. package/components/dropdown/.turbo/turbo-types.log +4 -0
  406. package/components/dropdown/README.md +188 -0
  407. package/components/dropdown/demo/api.html +53 -0
  408. package/components/dropdown/demo/api.js +21 -0
  409. package/components/dropdown/demo/api.md +1173 -0
  410. package/components/dropdown/demo/api.min.js +2868 -0
  411. package/components/dropdown/demo/index.js +22 -0
  412. package/components/dropdown/demo/index.md +360 -0
  413. package/components/dropdown/demo/index.min.js +2834 -0
  414. package/components/dropdown/dist/auro-dropdown.d.ts +189 -0
  415. package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -0
  416. package/components/dropdown/dist/auro-dropdownBib.d.ts +33 -0
  417. package/components/dropdown/dist/auro-dropdownBib.d.ts.map +1 -0
  418. package/components/dropdown/dist/floatingUI.d.mts +68 -0
  419. package/components/dropdown/dist/floatingUI.d.mts.map +1 -0
  420. package/components/dropdown/dist/iconVersion.d.ts +3 -0
  421. package/components/dropdown/dist/iconVersion.d.ts.map +1 -0
  422. package/components/dropdown/dist/index.d.ts +3 -0
  423. package/components/dropdown/dist/index.d.ts.map +1 -0
  424. package/components/dropdown/dist/index.js +2825 -0
  425. package/components/dropdown/dist/styles/bibColors-css.d.ts +3 -0
  426. package/components/dropdown/dist/styles/bibColors-css.d.ts.map +1 -0
  427. package/components/dropdown/dist/styles/bibStyles-css.d.ts +3 -0
  428. package/components/dropdown/dist/styles/bibStyles-css.d.ts.map +1 -0
  429. package/components/dropdown/dist/styles/color-css.d.ts +3 -0
  430. package/components/dropdown/dist/styles/color-css.d.ts.map +1 -0
  431. package/components/dropdown/dist/styles/style-css.d.ts +3 -0
  432. package/components/dropdown/dist/styles/style-css.d.ts.map +1 -0
  433. package/components/dropdown/dist/styles/tokens-css.d.ts +3 -0
  434. package/components/dropdown/dist/styles/tokens-css.d.ts.map +1 -0
  435. package/components/dropdown/node_modules/chalk/package.json +83 -0
  436. package/components/dropdown/node_modules/chalk/readme.md +325 -0
  437. package/components/dropdown/node_modules/chalk/source/index.d.ts +320 -0
  438. package/components/dropdown/node_modules/chalk/source/index.js +225 -0
  439. package/components/dropdown/node_modules/chalk/source/utilities.js +33 -0
  440. package/components/dropdown/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  441. package/components/dropdown/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  442. package/components/dropdown/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  443. package/components/dropdown/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  444. package/components/dropdown/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  445. package/components/dropdown/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  446. package/components/dropdown/package.json +57 -0
  447. package/components/dropdown/src/auro-dropdown.js +354 -0
  448. package/components/dropdown/src/auro-dropdownBib.js +97 -0
  449. package/components/dropdown/src/floatingUI.mjs +381 -0
  450. package/components/dropdown/src/iconVersion.js +1 -0
  451. package/components/dropdown/src/index.js +6 -0
  452. package/components/dropdown/src/styles/bibColors-css.js +2 -0
  453. package/components/dropdown/src/styles/bibColors.css +6 -0
  454. package/components/dropdown/src/styles/bibColors.scss +18 -0
  455. package/components/dropdown/src/styles/bibStyles-css.js +2 -0
  456. package/components/dropdown/src/styles/bibStyles.css +48 -0
  457. package/components/dropdown/src/styles/bibStyles.scss +67 -0
  458. package/components/dropdown/src/styles/color-css.js +2 -0
  459. package/components/dropdown/src/styles/color.css +60 -0
  460. package/components/dropdown/src/styles/color.scss +79 -0
  461. package/components/dropdown/src/styles/style-css.js +2 -0
  462. package/components/dropdown/src/styles/style.css +81 -0
  463. package/components/dropdown/src/styles/style.scss +110 -0
  464. package/components/dropdown/src/styles/tokens-css.js +2 -0
  465. package/components/dropdown/src/styles/tokens.css +13 -0
  466. package/components/dropdown/src/styles/tokens.scss +15 -0
  467. package/components/form/.stylelintrc.json +3 -0
  468. package/components/form/.turbo/turbo-build$colon$sass.log +57 -0
  469. package/components/form/.turbo/turbo-build$colon$version.log +4 -0
  470. package/components/form/.turbo/turbo-build.log +113 -0
  471. package/components/form/.turbo/turbo-bundler.log +13 -0
  472. package/components/form/.turbo/turbo-postCss$colon$component.log +5 -0
  473. package/components/form/.turbo/turbo-sass$colon$render.log +10 -0
  474. package/components/form/.turbo/turbo-types.log +4 -0
  475. package/components/form/README.md +186 -0
  476. package/components/form/demo/api.html +48 -0
  477. package/components/form/demo/api.js +3 -0
  478. package/components/form/demo/api.md +0 -0
  479. package/components/form/demo/api.min.js +160 -0
  480. package/components/form/demo/index.js +4 -0
  481. package/components/form/demo/index.md +40 -0
  482. package/components/form/demo/index.min.js +161 -0
  483. package/components/form/dist/auro-form.d.ts +26 -0
  484. package/components/form/dist/auro-form.d.ts.map +1 -0
  485. package/components/form/dist/index.d.ts +3 -0
  486. package/components/form/dist/index.d.ts.map +1 -0
  487. package/components/form/dist/index.js +162 -0
  488. package/components/form/dist/styles/style-css.d.ts +3 -0
  489. package/components/form/dist/styles/style-css.d.ts.map +1 -0
  490. package/components/form/node_modules/chalk/package.json +83 -0
  491. package/components/form/node_modules/chalk/readme.md +325 -0
  492. package/components/form/node_modules/chalk/source/index.d.ts +320 -0
  493. package/components/form/node_modules/chalk/source/index.js +225 -0
  494. package/components/form/node_modules/chalk/source/utilities.js +33 -0
  495. package/components/form/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  496. package/components/form/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  497. package/components/form/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  498. package/components/form/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  499. package/components/form/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  500. package/components/form/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  501. package/components/form/package.json +72 -0
  502. package/components/form/src/auro-form.js +74 -0
  503. package/components/form/src/index.js +6 -0
  504. package/components/form/src/styles/style-css.js +2 -0
  505. package/components/form/src/styles/style.css +36 -0
  506. package/components/form/src/styles/style.scss +37 -0
  507. package/components/input/.stylelintrc.json +3 -0
  508. package/components/input/.turbo/turbo-build$colon$sass.log +148 -0
  509. package/components/input/.turbo/turbo-build$colon$version.log +10 -0
  510. package/components/input/.turbo/turbo-build.log +300 -0
  511. package/components/input/.turbo/turbo-bundler.log +13 -0
  512. package/components/input/.turbo/turbo-postCss$colon$component.log +5 -0
  513. package/components/input/.turbo/turbo-sass$colon$render.log +52 -0
  514. package/components/input/.turbo/turbo-types.log +4 -0
  515. package/components/input/README.md +176 -0
  516. package/components/input/demo/api.html +40 -0
  517. package/components/input/demo/api.js +25 -0
  518. package/components/input/demo/api.md +1251 -0
  519. package/components/input/demo/api.min.js +4068 -0
  520. package/components/input/demo/index.js +20 -0
  521. package/components/input/demo/index.md +253 -0
  522. package/components/input/demo/index.min.js +4010 -0
  523. package/components/input/dist/auro-input.d.ts +29 -0
  524. package/components/input/dist/auro-input.d.ts.map +1 -0
  525. package/components/input/dist/base-input.d.ts +359 -0
  526. package/components/input/dist/base-input.d.ts.map +1 -0
  527. package/components/input/dist/buttonVersion.d.ts +3 -0
  528. package/components/input/dist/buttonVersion.d.ts.map +1 -0
  529. package/components/input/dist/i18n.d.ts +19 -0
  530. package/components/input/dist/i18n.d.ts.map +1 -0
  531. package/components/input/dist/iconVersion.d.ts +3 -0
  532. package/components/input/dist/iconVersion.d.ts.map +1 -0
  533. package/components/input/dist/index.d.ts +3 -0
  534. package/components/input/dist/index.d.ts.map +1 -0
  535. package/components/input/dist/index.js +3977 -0
  536. package/components/input/dist/styles/borders-css.d.ts +3 -0
  537. package/components/input/dist/styles/borders-css.d.ts.map +1 -0
  538. package/components/input/dist/styles/color-css.d.ts +3 -0
  539. package/components/input/dist/styles/color-css.d.ts.map +1 -0
  540. package/components/input/dist/styles/helpText-css.d.ts +3 -0
  541. package/components/input/dist/styles/helpText-css.d.ts.map +1 -0
  542. package/components/input/dist/styles/input-css.d.ts +3 -0
  543. package/components/input/dist/styles/input-css.d.ts.map +1 -0
  544. package/components/input/dist/styles/label-css.d.ts +3 -0
  545. package/components/input/dist/styles/label-css.d.ts.map +1 -0
  546. package/components/input/dist/styles/notificationIcons-css.d.ts +3 -0
  547. package/components/input/dist/styles/notificationIcons-css.d.ts.map +1 -0
  548. package/components/input/dist/styles/style-css.d.ts +3 -0
  549. package/components/input/dist/styles/style-css.d.ts.map +1 -0
  550. package/components/input/dist/styles/tokens-css.d.ts +3 -0
  551. package/components/input/dist/styles/tokens-css.d.ts.map +1 -0
  552. package/components/input/node_modules/chalk/package.json +83 -0
  553. package/components/input/node_modules/chalk/readme.md +325 -0
  554. package/components/input/node_modules/chalk/source/index.d.ts +320 -0
  555. package/components/input/node_modules/chalk/source/index.js +225 -0
  556. package/components/input/node_modules/chalk/source/utilities.js +33 -0
  557. package/components/input/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  558. package/components/input/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  559. package/components/input/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  560. package/components/input/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  561. package/components/input/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  562. package/components/input/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  563. package/components/input/package.json +75 -0
  564. package/components/input/src/auro-input.js +242 -0
  565. package/components/input/src/base-input.js +942 -0
  566. package/components/input/src/buttonVersion.js +1 -0
  567. package/components/input/src/i18n.js +102 -0
  568. package/components/input/src/iconVersion.js +1 -0
  569. package/components/input/src/index.js +6 -0
  570. package/components/input/src/styles/@aurodesignsystem/webcorestylesheets/src/breakpoints +0 -0
  571. package/components/input/src/styles/borders-css.js +2 -0
  572. package/components/input/src/styles/borders.css +35 -0
  573. package/components/input/src/styles/borders.scss +65 -0
  574. package/components/input/src/styles/color-css.js +2 -0
  575. package/components/input/src/styles/color.css +63 -0
  576. package/components/input/src/styles/color.scss +96 -0
  577. package/components/input/src/styles/helpText-css.js +2 -0
  578. package/components/input/src/styles/helpText.css +6 -0
  579. package/components/input/src/styles/helpText.scss +9 -0
  580. package/components/input/src/styles/input-css.js +2 -0
  581. package/components/input/src/styles/input.css +22 -0
  582. package/components/input/src/styles/input.scss +29 -0
  583. package/components/input/src/styles/label-css.js +2 -0
  584. package/components/input/src/styles/label.css +45 -0
  585. package/components/input/src/styles/label.scss +75 -0
  586. package/components/input/src/styles/notificationIcons-css.js +2 -0
  587. package/components/input/src/styles/notificationIcons.css +76 -0
  588. package/components/input/src/styles/notificationIcons.scss +103 -0
  589. package/components/input/src/styles/style-css.js +2 -0
  590. package/components/input/src/styles/style.css +272 -0
  591. package/components/input/src/styles/style.scss +57 -0
  592. package/components/input/src/styles/tokens-css.js +2 -0
  593. package/components/input/src/styles/tokens.css +9 -0
  594. package/components/input/src/styles/tokens.scss +11 -0
  595. package/components/menu/.stylelintrc.json +3 -0
  596. package/components/menu/.turbo/turbo-build$colon$sass.log +86 -0
  597. package/components/menu/.turbo/turbo-build$colon$version.log +7 -0
  598. package/components/menu/.turbo/turbo-build.log +181 -0
  599. package/components/menu/.turbo/turbo-bundler.log +13 -0
  600. package/components/menu/.turbo/turbo-postCss$colon$component.log +5 -0
  601. package/components/menu/.turbo/turbo-sass$colon$render.log +34 -0
  602. package/components/menu/.turbo/turbo-types.log +4 -0
  603. package/components/menu/README.md +190 -0
  604. package/components/menu/demo/api.html +51 -0
  605. package/components/menu/demo/api.js +25 -0
  606. package/components/menu/demo/api.md +781 -0
  607. package/components/menu/demo/api.min.js +1233 -0
  608. package/components/menu/demo/index.js +28 -0
  609. package/components/menu/demo/index.md +104 -0
  610. package/components/menu/demo/index.min.js +1186 -0
  611. package/components/menu/dist/auro-menu.d.ts +168 -0
  612. package/components/menu/dist/auro-menu.d.ts.map +1 -0
  613. package/components/menu/dist/auro-menuoption.d.ts +65 -0
  614. package/components/menu/dist/auro-menuoption.d.ts.map +1 -0
  615. package/components/menu/dist/iconVersion.d.ts +3 -0
  616. package/components/menu/dist/iconVersion.d.ts.map +1 -0
  617. package/components/menu/dist/index.d.ts +4 -0
  618. package/components/menu/dist/index.d.ts.map +1 -0
  619. package/components/menu/dist/index.js +1178 -0
  620. package/components/menu/dist/styles/color-menu-css.d.ts +3 -0
  621. package/components/menu/dist/styles/color-menu-css.d.ts.map +1 -0
  622. package/components/menu/dist/styles/color-menuoption-css.d.ts +3 -0
  623. package/components/menu/dist/styles/color-menuoption-css.d.ts.map +1 -0
  624. package/components/menu/dist/styles/style-menu-css.d.ts +3 -0
  625. package/components/menu/dist/styles/style-menu-css.d.ts.map +1 -0
  626. package/components/menu/dist/styles/style-menuoption-css.d.ts +3 -0
  627. package/components/menu/dist/styles/style-menuoption-css.d.ts.map +1 -0
  628. package/components/menu/dist/styles/tokens-css.d.ts +3 -0
  629. package/components/menu/dist/styles/tokens-css.d.ts.map +1 -0
  630. package/components/menu/node_modules/chalk/package.json +83 -0
  631. package/components/menu/node_modules/chalk/readme.md +325 -0
  632. package/components/menu/node_modules/chalk/source/index.d.ts +320 -0
  633. package/components/menu/node_modules/chalk/source/index.js +225 -0
  634. package/components/menu/node_modules/chalk/source/utilities.js +33 -0
  635. package/components/menu/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  636. package/components/menu/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  637. package/components/menu/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  638. package/components/menu/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  639. package/components/menu/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  640. package/components/menu/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  641. package/components/menu/node_modules/mime/CHANGELOG.md +296 -0
  642. package/components/menu/node_modules/mime/Mime.js +97 -0
  643. package/components/menu/node_modules/mime/README.md +187 -0
  644. package/components/menu/node_modules/mime/cli.js +46 -0
  645. package/components/menu/node_modules/mime/index.js +4 -0
  646. package/components/menu/node_modules/mime/lite.js +4 -0
  647. package/components/menu/node_modules/mime/package.json +52 -0
  648. package/components/menu/node_modules/mime/types/other.js +1 -0
  649. package/components/menu/node_modules/mime/types/standard.js +1 -0
  650. package/components/menu/node_modules/rollup-plugin-serve/LICENSE.md +21 -0
  651. package/components/menu/node_modules/rollup-plugin-serve/README.md +135 -0
  652. package/components/menu/node_modules/rollup-plugin-serve/dist/index.cjs +181 -0
  653. package/components/menu/node_modules/rollup-plugin-serve/dist/index.cjs.js +197 -0
  654. package/components/menu/node_modules/rollup-plugin-serve/dist/index.es.js +193 -0
  655. package/components/menu/node_modules/rollup-plugin-serve/dist/index.mjs +173 -0
  656. package/components/menu/node_modules/rollup-plugin-serve/package.json +44 -0
  657. package/components/menu/package.json +70 -0
  658. package/components/menu/src/auro-menu.js +521 -0
  659. package/components/menu/src/auro-menuoption.js +148 -0
  660. package/components/menu/src/iconVersion.js +1 -0
  661. package/components/menu/src/index.js +8 -0
  662. package/components/menu/src/styles/color-menu-css.js +2 -0
  663. package/components/menu/src/styles/color-menu.css +4 -0
  664. package/components/menu/src/styles/color-menu.scss +12 -0
  665. package/components/menu/src/styles/color-menuoption-css.js +2 -0
  666. package/components/menu/src/styles/color-menuoption.css +23 -0
  667. package/components/menu/src/styles/color-menuoption.scss +33 -0
  668. package/components/menu/src/styles/style-menu-css.js +2 -0
  669. package/components/menu/src/styles/style-menu.css +2043 -0
  670. package/components/menu/src/styles/style-menu.scss +58 -0
  671. package/components/menu/src/styles/style-menuoption-css.js +2 -0
  672. package/components/menu/src/styles/style-menuoption.css +45 -0
  673. package/components/menu/src/styles/style-menuoption.scss +66 -0
  674. package/components/menu/src/styles/tokens-css.js +2 -0
  675. package/components/menu/src/styles/tokens.css +6 -0
  676. package/components/menu/src/styles/tokens.scss +6 -0
  677. package/components/radio/.stylelintrc.json +3 -0
  678. package/components/radio/.turbo/turbo-build$colon$sass.log +130 -0
  679. package/components/radio/.turbo/turbo-build.log +213 -0
  680. package/components/radio/.turbo/turbo-bundler.log +13 -0
  681. package/components/radio/.turbo/turbo-postCss$colon$component.log +5 -0
  682. package/components/radio/.turbo/turbo-sass$colon$render.log +34 -0
  683. package/components/radio/.turbo/turbo-types.log +4 -0
  684. package/components/radio/README.md +176 -0
  685. package/components/radio/demo/api.html +50 -0
  686. package/components/radio/demo/api.js +17 -0
  687. package/components/radio/demo/api.md +401 -0
  688. package/components/radio/demo/api.min.js +1050 -0
  689. package/components/radio/demo/index.js +8 -0
  690. package/components/radio/demo/index.md +122 -0
  691. package/components/radio/demo/index.min.js +1016 -0
  692. package/components/radio/dist/auro-radio-group.d.ts +171 -0
  693. package/components/radio/dist/auro-radio-group.d.ts.map +1 -0
  694. package/components/radio/dist/auro-radio.d.ts +113 -0
  695. package/components/radio/dist/auro-radio.d.ts.map +1 -0
  696. package/components/radio/dist/index.d.ts +4 -0
  697. package/components/radio/dist/index.d.ts.map +1 -0
  698. package/components/radio/dist/index.js +1015 -0
  699. package/components/radio/dist/styles/auro-radio-group-css.d.ts +3 -0
  700. package/components/radio/dist/styles/auro-radio-group-css.d.ts.map +1 -0
  701. package/components/radio/dist/styles/color-css.d.ts +3 -0
  702. package/components/radio/dist/styles/color-css.d.ts.map +1 -0
  703. package/components/radio/dist/styles/groupColor-css.d.ts +3 -0
  704. package/components/radio/dist/styles/groupColor-css.d.ts.map +1 -0
  705. package/components/radio/dist/styles/style-css.d.ts +3 -0
  706. package/components/radio/dist/styles/style-css.d.ts.map +1 -0
  707. package/components/radio/dist/styles/tokens-css.d.ts +3 -0
  708. package/components/radio/dist/styles/tokens-css.d.ts.map +1 -0
  709. package/components/radio/node_modules/chalk/package.json +83 -0
  710. package/components/radio/node_modules/chalk/readme.md +325 -0
  711. package/components/radio/node_modules/chalk/source/index.d.ts +320 -0
  712. package/components/radio/node_modules/chalk/source/index.js +225 -0
  713. package/components/radio/node_modules/chalk/source/utilities.js +33 -0
  714. package/components/radio/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  715. package/components/radio/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  716. package/components/radio/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  717. package/components/radio/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  718. package/components/radio/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  719. package/components/radio/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  720. package/components/radio/package.json +69 -0
  721. package/components/radio/src/auro-radio-group.js +433 -0
  722. package/components/radio/src/auro-radio.js +247 -0
  723. package/components/radio/src/index.js +8 -0
  724. package/components/radio/src/styles/auro-radio-group-css.js +2 -0
  725. package/components/radio/src/styles/auro-radio-group.css +23 -0
  726. package/components/radio/src/styles/auro-radio-group.scss +36 -0
  727. package/components/radio/src/styles/color-css.js +2 -0
  728. package/components/radio/src/styles/color.css +45 -0
  729. package/components/radio/src/styles/color.scss +56 -0
  730. package/components/radio/src/styles/groupColor-css.js +2 -0
  731. package/components/radio/src/styles/groupColor.css +21 -0
  732. package/components/radio/src/styles/groupColor.scss +33 -0
  733. package/components/radio/src/styles/style-css.js +2 -0
  734. package/components/radio/src/styles/style.css +113 -0
  735. package/components/radio/src/styles/style.scss +99 -0
  736. package/components/radio/src/styles/tokens-css.js +2 -0
  737. package/components/radio/src/styles/tokens.css +9 -0
  738. package/components/radio/src/styles/tokens.scss +12 -0
  739. package/components/select/.stylelintrc.json +3 -0
  740. package/components/select/.turbo/turbo-build$colon$sass.log +122 -0
  741. package/components/select/.turbo/turbo-build.log +237 -0
  742. package/components/select/.turbo/turbo-postCss$colon$component.log +5 -0
  743. package/components/select/.turbo/turbo-sass$colon$render.log +22 -0
  744. package/components/select/README.md +205 -0
  745. package/components/select/demo/alertValue.js +6 -0
  746. package/components/select/demo/api.html +53 -0
  747. package/components/select/demo/api.js +31 -0
  748. package/components/select/demo/api.md +748 -0
  749. package/components/select/demo/api.min.js +4845 -0
  750. package/components/select/demo/index.js +9 -0
  751. package/components/select/demo/index.md +470 -0
  752. package/components/select/demo/index.min.js +4768 -0
  753. package/components/select/dist/auro-select.d.ts +174 -0
  754. package/components/select/dist/auro-select.d.ts.map +1 -0
  755. package/components/select/dist/formkit/auro-dropdownVersion.d.ts +3 -0
  756. package/components/select/dist/formkit/auro-dropdownVersion.d.ts.map +1 -0
  757. package/components/select/dist/index.d.ts +3 -0
  758. package/components/select/dist/index.d.ts.map +1 -0
  759. package/components/select/dist/index.js +3732 -0
  760. package/components/select/dist/styles/color-css.d.ts +3 -0
  761. package/components/select/dist/styles/color-css.d.ts.map +1 -0
  762. package/components/select/dist/styles/style-css.d.ts +3 -0
  763. package/components/select/dist/styles/style-css.d.ts.map +1 -0
  764. package/components/select/dist/styles/tokens-css.d.ts +3 -0
  765. package/components/select/dist/styles/tokens-css.d.ts.map +1 -0
  766. package/components/select/node_modules/chalk/package.json +83 -0
  767. package/components/select/node_modules/chalk/readme.md +325 -0
  768. package/components/select/node_modules/chalk/source/index.d.ts +320 -0
  769. package/components/select/node_modules/chalk/source/index.js +225 -0
  770. package/components/select/node_modules/chalk/source/utilities.js +33 -0
  771. package/components/select/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  772. package/components/select/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  773. package/components/select/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  774. package/components/select/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  775. package/components/select/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  776. package/components/select/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  777. package/components/select/node_modules/mime/CHANGELOG.md +296 -0
  778. package/components/select/node_modules/mime/Mime.js +97 -0
  779. package/components/select/node_modules/mime/README.md +187 -0
  780. package/components/select/node_modules/mime/cli.js +46 -0
  781. package/components/select/node_modules/mime/index.js +4 -0
  782. package/components/select/node_modules/mime/lite.js +4 -0
  783. package/components/select/node_modules/mime/package.json +52 -0
  784. package/components/select/node_modules/mime/types/other.js +1 -0
  785. package/components/select/node_modules/mime/types/standard.js +1 -0
  786. package/components/select/node_modules/rollup-plugin-serve/LICENSE.md +21 -0
  787. package/components/select/node_modules/rollup-plugin-serve/README.md +135 -0
  788. package/components/select/node_modules/rollup-plugin-serve/dist/index.cjs +181 -0
  789. package/components/select/node_modules/rollup-plugin-serve/dist/index.cjs.js +197 -0
  790. package/components/select/node_modules/rollup-plugin-serve/dist/index.es.js +193 -0
  791. package/components/select/node_modules/rollup-plugin-serve/dist/index.mjs +173 -0
  792. package/components/select/node_modules/rollup-plugin-serve/package.json +44 -0
  793. package/components/select/package.json +70 -0
  794. package/components/select/packageScripts/postinstall.mjs +28 -0
  795. package/components/select/src/auro-select.js +537 -0
  796. package/components/select/src/formkit/auro-dropdownVersion.js +1 -0
  797. package/components/select/src/index.js +6 -0
  798. package/components/select/src/styles/color-css.js +2 -0
  799. package/components/select/src/styles/color.css +63 -0
  800. package/components/select/src/styles/color.scss +33 -0
  801. package/components/select/src/styles/style-css.js +2 -0
  802. package/components/select/src/styles/style.css +97 -0
  803. package/components/select/src/styles/style.scss +66 -0
  804. package/components/select/src/styles/tokens-css.js +2 -0
  805. package/components/select/src/styles/tokens.css +3 -0
  806. package/components/select/src/styles/tokens.scss +5 -0
  807. package/package.json +142 -0
  808. package/packages/build-tools/package.json +18 -0
  809. package/packages/build-tools/src/docProcessor.mjs +104 -0
  810. package/packages/build-tools/src/formVersionWriter.mjs +75 -0
  811. package/packages/build-tools/src/index.js +1 -0
  812. package/packages/build-tools/src/kitDocProcessor.mjs +66 -0
  813. package/packages/form-validation/package.json +12 -0
  814. package/packages/form-validation/src/index.js +1 -0
  815. package/packages/form-validation/src/validation.js +239 -0
  816. package/packages/typescript/base.json +19 -0
  817. package/packages/typescript/package.json +20 -0
  818. package/turbo.json +100 -0
@@ -0,0 +1,4768 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const t$5=globalThis,e$8=t$5.ShadowRoot&&(void 0===t$5.ShadyCSS||t$5.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$5=Symbol(),o$9=new WeakMap;let n$7 = class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s$5)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$8&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$9.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$9.set(s,t));}return t}toString(){return this.cssText}};const r$7=t=>new n$7("string"==typeof t?t:t+"",void 0,s$5),i$b=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===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$7(o,t,s$5)},S$3=(s,o)=>{if(e$8)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$5.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$5=e$8?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$7(e)})(t):t;
7
+
8
+ /**
9
+ * @license
10
+ * Copyright 2017 Google LLC
11
+ * SPDX-License-Identifier: BSD-3-Clause
12
+ */const{is:i$a,defineProperty:e$7,getOwnPropertyDescriptor:r$6,getOwnPropertyNames:h$3,getOwnPropertySymbols:o$8,getPrototypeOf:n$6}=Object,a$5=globalThis,c$4=a$5.trustedTypes,l$5=c$4?c$4.emptyScript:"",p$3=a$5.reactiveElementPolyfillSupport,d$3=(t,s)=>t,u$5={toAttribute(t,s){switch(s){case Boolean:t=t?l$5: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$3=(t,s)=>!i$a(t,s),y$3={attribute:!0,type:String,converter:u$5,reflect:!1,hasChanged:f$3};Symbol.metadata??=Symbol("metadata"),a$5.litPropertyMetadata??=new WeakMap;let b$1 = class b 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=y$3){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$7(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$6(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$3}static _$Ei(){if(this.hasOwnProperty(d$3("elementProperties")))return;const t=n$6(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$3("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$3("properties"))){const t=this.properties,s=[...h$3(t),...o$8(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$5(s));}else void 0!==s&&i.push(c$5(s));return i}static _$Eu(t,s){const i=s.attribute;return !1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,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$3(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$5).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),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),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$5;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$3)(this[t],s))return;this.P(t,s,i);}!1===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=!0;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)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i);}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}};b$1.elementStyles=[],b$1.shadowRootOptions={mode:"open"},b$1[d$3("elementProperties")]=new Map,b$1[d$3("finalized")]=new Map,p$3?.({ReactiveElement:b$1}),(a$5.reactiveElementVersions??=[]).push("2.0.4");
13
+
14
+ /**
15
+ * @license
16
+ * Copyright 2017 Google LLC
17
+ * SPDX-License-Identifier: BSD-3-Clause
18
+ */
19
+ const t$4=globalThis,i$9=t$4.trustedTypes,s$4=i$9?i$9.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$6="$lit$",h$2=`lit$${Math.random().toFixed(9).slice(2)}$`,o$7="?"+h$2,n$5=`<${o$7}>`,r$5=document,l$4=()=>r$5.createComment(""),c$3=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$4=Array.isArray,u$4=t=>a$4(t)||"function"==typeof t?.[Symbol.iterator],d$2="[ \t\n\f\r]",f$2=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$1=/-->/g,_$1=/>/g,m$1=RegExp(`>|${d$2}(?:([^\\s"'>=/]+)(${d$2}*=${d$2}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$2=/'/g,g$1=/"/g,$$1=/^(?:script|style|textarea|title)$/i,y$2=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x$1=y$2(1),T$1=Symbol.for("lit-noChange"),E$1=Symbol.for("lit-nothing"),A$1=new WeakMap,C$1=r$5.createTreeWalker(r$5,129);function P$1(t,i){if(!a$4(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$4?s$4.createHTML(i):i}const V$1=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$2;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$2?"!--"===u[1]?c=v$1:void 0!==u[1]?c=_$1:void 0!==u[2]?($$1.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$2,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$2):c===g$1||c===p$2?c=m$1:c===v$1||c===_$1?c=f$2:(c=m$1,r=void 0);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$2?s+n$5:d>=0?(o.push(a),s.slice(0,d)+e$6+s.slice(d)+h$2+x):s+h$2+(-2===d?i:x);}return [P$1(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};let N$1 = 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$1(t,s);if(this.el=N.createElement(f,n),C$1.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C$1.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$6)){const i=v[a++],s=r.getAttribute(t).split(h$2),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H$1:"?"===e[1]?I$1:"@"===e[1]?L$1:k$1}),r.removeAttribute(t);}else t.startsWith(h$2)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($$1.test(r.tagName)){const t=r.textContent.split(h$2),s=t.length-1;if(s>0){r.textContent=i$9?i$9.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$4()),C$1.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$4());}}}else if(8===r.nodeType)if(r.data===o$7)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$2,t+1));)d.push({type:7,index:c}),t+=h$2.length-1;}c++;}}static createElement(t,i){const s=r$5.createElement("template");return s.innerHTML=t,s}};function S$2(t,i,s=t,e){if(i===T$1)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c$3(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),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$2(t,h._$AS(t,i.values),h,e)),i}let M$1 = 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$5).importNode(i,!0);C$1.currentNode=e;let h=C$1.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R$1(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$1.nextNode(),o++);}return C$1.currentNode=r$5,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++;}};let R$1 = class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E$1,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0;}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$2(this,t,i),c$3(t)?t===E$1||null==t||""===t?(this._$AH!==E$1&&this._$AR(),this._$AH=E$1):t!==this._$AH&&t!==T$1&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$4(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$1&&c$3(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$5.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$1.createElement(P$1(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M$1(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A$1.get(t.strings);return void 0===i&&A$1.set(t.strings,i=new N$1(t)),i}k(t){a$4(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$4()),this.O(l$4()),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?.(!1,!0,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));}};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$1,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$1;}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S$2(this,t,i,0),o=!c$3(t)||t!==this._$AH&&t!==T$1,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S$2(this,e[s+n],i,n),r===T$1&&(r=this._$AH[n]),o||=!c$3(r)||r!==this._$AH[n],r===E$1?t=E$1:t!==E$1&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E$1?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};let H$1 = class H extends k$1{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E$1?void 0:t;}};let I$1 = class I extends k$1{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E$1);}};let L$1 = 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$2(this,t,i,0)??E$1)===T$1)return;const s=this._$AH,e=t===E$1&&s!==E$1||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E$1&&(s===E$1||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$2(this,t);}};const j$1=t$4.litHtmlPolyfillSupport;j$1?.(N$1,R$1),(t$4.litHtmlVersions??=[]).push("3.2.1");const B$1=(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$1(i.insertBefore(l$4(),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
+ */let r$4 = class r extends b$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 s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B$1(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return T$1}};r$4._$litElement$=!0,r$4["finalized"]=!0,globalThis.litElementHydrateSupport?.({LitElement:r$4});const i$8=globalThis.litElementPolyfillSupport;i$8?.({LitElement:r$4});(globalThis.litElementVersions??=[]).push("4.1.1");
26
+
27
+ /**
28
+ * @license
29
+ * Copyright 2020 Google LLC
30
+ * SPDX-License-Identifier: BSD-3-Clause
31
+ */
32
+ const a$3=Symbol.for(""),o$6=t=>{if(t?.r===a$3)return t?._$litStatic$},s$3=t=>({_$litStatic$:t,r:a$3}),i$7=(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$3}),l$3=new Map,n$4=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=!1;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$6(i));)c+=s+r[++$],f=!0;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l$3.get(t))&&(n.raw=n,l$3.set(t,r=n)),e=u;}return t(r,...e)},u$3=n$4(x$1);
33
+
34
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
35
+ // See LICENSE in the project root for license information.
36
+
37
+ // ---------------------------------------------------------------------
38
+
39
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
40
+
41
+ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
42
+
43
+ /* eslint-disable jsdoc/require-param */
44
+
45
+ /**
46
+ * This will register a new custom element with the browser.
47
+ * @param {String} name - The name of the custom element.
48
+ * @param {Object} componentClass - The class to register as a custom element.
49
+ * @returns {void}
50
+ */
51
+ registerComponent(name, componentClass) {
52
+ if (!customElements.get(name)) {
53
+ customElements.define(name, class extends componentClass {});
54
+ }
55
+ }
56
+
57
+ /**
58
+ * Finds and returns the closest HTML Element based on a selector.
59
+ * @returns {void}
60
+ */
61
+ closestElement(
62
+ selector, // selector like in .closest()
63
+ base = this, // extra functionality to skip a parent
64
+ __Closest = (el, found = el && el.closest(selector)) =>
65
+ !el || el === document || el === window
66
+ ? null // standard .closest() returns null for non-found selectors also
67
+ : found
68
+ ? found // found a selector INside this element
69
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
70
+ ) {
71
+ return __Closest(base);
72
+ }
73
+ /* eslint-enable jsdoc/require-param */
74
+
75
+ /**
76
+ * 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.
77
+ * @param {Object} elem - The element to check.
78
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
79
+ * @returns {void}
80
+ */
81
+ handleComponentTagRename(elem, tagName) {
82
+ const tag = tagName.toLowerCase();
83
+ const elemTag = elem.tagName.toLowerCase();
84
+
85
+ if (elemTag !== tag) {
86
+ elem.setAttribute(tag, true);
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Validates if an element is a specific Auro component.
92
+ * @param {Object} elem - The element to validate.
93
+ * @param {String} tagName - The name of the Auro component to check against.
94
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
95
+ */
96
+ elementMatch(elem, tagName) {
97
+ const tag = tagName.toLowerCase();
98
+ const elemTag = elem.tagName.toLowerCase();
99
+
100
+ return elemTag === tag || elem.hasAttribute(tag);
101
+ }
102
+ };
103
+
104
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
105
+ // See LICENSE in the project root for license information.
106
+
107
+
108
+ class AuroFormValidation {
109
+ constructor() {
110
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
111
+ }
112
+
113
+ /**
114
+ * Determines the validity state of the element based on the common attribute restrictions (pattern).
115
+ * @private
116
+ * @param {object} elem - HTML element to validate.
117
+ * @returns {void}
118
+ */
119
+ validateAttributes(elem) {
120
+ if (elem.pattern) {
121
+ const pattern = new RegExp(`^${elem.pattern}$`, 'u');
122
+
123
+ if (!pattern.test(elem.value)) {
124
+ elem.validity = 'badInput';
125
+ elem.setCustomValidity = elem.setCustomValidityBadInput || '';
126
+ }
127
+ } else if (elem.value && elem.value.length > 0 && elem.value.length < elem.minLength) {
128
+ elem.validity = 'tooShort';
129
+ elem.setCustomValidity = elem.setCustomValidityTooShort || '';
130
+ } else if (elem.value && elem.value.length > elem.maxLength) {
131
+ elem.validity = 'tooLong';
132
+ elem.setCustomValidity = elem.setCustomValidityTooLong || '';
133
+ }
134
+ }
135
+
136
+ /**
137
+ * Determines the validity state of the element based on the type attribute.
138
+ * @private
139
+ * @param {object} elem - HTML element to validate.
140
+ * @returns {void}
141
+ */
142
+ validateType(elem) {
143
+ if (elem.hasAttribute('type')) {
144
+ if (elem.type === 'email') {
145
+ const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
146
+
147
+ if (!elem.value.match(emailRegex)) {
148
+ elem.validity = 'badInput';
149
+ elem.setCustomValidity = elem.setCustomValidityForType || '';
150
+ }
151
+ } else if (elem.type === 'credit-card') {
152
+ if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
153
+ elem.validity = 'tooShort';
154
+ elem.setCustomValidity = elem.setCustomValidityForType || '';
155
+ }
156
+ } else if (elem.type === 'number' || elem.type === 'numeric') { // 'numeric` is a deprecated alias for number'
157
+ if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
158
+ elem.validity = 'rangeOverflow';
159
+ elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
160
+ }
161
+
162
+ if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
163
+ elem.validity = 'rangeUnderflow';
164
+ elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
165
+ }
166
+
167
+ } else if (elem.type === 'month-day-year' ||
168
+ elem.type === 'month-year' ||
169
+ elem.type === 'month-fullYear' ||
170
+ elem.type === 'year-month-day'
171
+ ) {
172
+ if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
173
+ elem.validity = 'tooShort';
174
+ elem.setCustomValidity = elem.setCustomValidityForType || '';
175
+ } else {
176
+ const valueDate = new Date(elem.value);
177
+
178
+ // validate max
179
+ if (elem.max !== undefined) {
180
+ const maxDate = new Date(elem.max);
181
+
182
+ if (valueDate > maxDate) {
183
+ elem.validity = 'rangeOverflow';
184
+ elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
185
+ }
186
+ }
187
+
188
+ // validate min
189
+ if (elem.min) {
190
+ const minDate = new Date(elem.min);
191
+
192
+ if (valueDate < minDate) {
193
+ elem.validity = 'rangeUnderflow';
194
+ elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
200
+ }
201
+
202
+ /**
203
+ * Determines the validity state of the element.
204
+ * @param {object} elem - HTML element to validate.
205
+ * @param {boolean} force - Boolean that forces validation to run.
206
+ * @returns {void}
207
+ */
208
+ validate(elem, force) {
209
+ this.getInputElements(elem);
210
+ this.getAuroInputs(elem);
211
+
212
+ // Validate only if noValidate is not true and the input does not have focus
213
+ const validationShouldRun = force || (!elem.contains(document.activeElement) && elem.value !== undefined) || elem.validateOnInput;
214
+
215
+ if (elem.hasAttribute('error')) {
216
+ elem.validity = 'customError';
217
+ elem.setCustomValidity = elem.error;
218
+ } else if (validationShouldRun) {
219
+ elem.validity = 'valid';
220
+ elem.setCustomValidity = '';
221
+
222
+ /**
223
+ * Only validate once we interact with the datepicker
224
+ * elem.value === undefined is the initial state pre-interaction.
225
+ *
226
+ * The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
227
+ */
228
+
229
+ let hasValue = elem.value && elem.value.length > 0;
230
+
231
+ // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
232
+ if (this.auroInputElements && this.auroInputElements.length === 2) {
233
+ if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
234
+ hasValue = false;
235
+ }
236
+ }
237
+
238
+ if (!hasValue && elem.required) {
239
+ elem.validity = 'valueMissing';
240
+ elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
241
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
242
+ this.validateType(elem);
243
+ this.validateAttributes(elem);
244
+ }
245
+ }
246
+
247
+ if (this.auroInputElements && this.auroInputElements.length > 0) {
248
+ elem.validity = this.auroInputElements[0].validity;
249
+ elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
250
+
251
+ if (elem.validity === 'valid') {
252
+ if (this.auroInputElements.length > 1) {
253
+ elem.validity = this.auroInputElements[1].validity;
254
+ elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
255
+ }
256
+ }
257
+ }
258
+
259
+ if (validationShouldRun || elem.hasAttribute('error')) {
260
+ if (elem.validity && elem.validity !== 'valid') {
261
+ elem.isValid = false;
262
+
263
+ // Use the validity message override if it is declared
264
+ if (elem.ValidityMessageOverride) {
265
+ elem.setCustomValidity = elem.ValidityMessageOverride;
266
+ }
267
+ } else {
268
+ elem.isValid = true;
269
+ }
270
+
271
+ this.getErrorMessage(elem);
272
+
273
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
274
+ bubbles: true,
275
+ composed: true,
276
+ detail: {
277
+ validity: elem.validity,
278
+ message: elem.errorMessage
279
+ }
280
+ }));
281
+ }
282
+ }
283
+
284
+ /**
285
+ * Gets all the HTML5 `inputs` in the element shadow DOM.
286
+ * @private
287
+ * @param {object} elem - HTML element to validate.
288
+ * @returns {void}
289
+ */
290
+ getInputElements(elem) {
291
+ this.inputElements = elem.renderRoot.querySelectorAll('input');
292
+ }
293
+
294
+ /**
295
+ * Gets all the `auro-inputs` in the element shadow DOM.
296
+ * @private
297
+ * @param {object} elem - HTML element to validate.
298
+ * @returns {void}
299
+ */
300
+ getAuroInputs(elem) {
301
+ this.auroInputElements = elem.shadowRoot.querySelectorAll('auro-input, [auro-input]');
302
+ }
303
+
304
+ /**
305
+ * Return appropriate error message.
306
+ * @private
307
+ * @param {object} elem - HTML element to validate.
308
+ * @returns {void}
309
+ */
310
+ getErrorMessage(elem) {
311
+ if (elem.validity !== 'valid') {
312
+ if (elem.setCustomValidity) {
313
+ elem.errorMessage = elem.setCustomValidity;
314
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
315
+ const input = elem.renderRoot.querySelector('input');
316
+
317
+ if (input.validationMessage.length > 0) {
318
+ elem.errorMessage = input.validationMessage;
319
+ }
320
+ } else if (this.inputElements && this.inputElements.length > 0) {
321
+ const firstInput = this.inputElements[0];
322
+
323
+ if (firstInput.validationMessage.length > 0) {
324
+ elem.errorMessage = firstInput.validationMessage;
325
+ } else if (this.inputElements.length === 2) {
326
+ const secondInput = this.inputElements[1];
327
+
328
+ if (secondInput.validationMessage.length > 0) {
329
+ elem.errorMessage = secondInput.validationMessage;
330
+ }
331
+ }
332
+ }
333
+ } else {
334
+ elem.errorMessage = undefined;
335
+ }
336
+ }
337
+ }
338
+
339
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
340
+ // See LICENSE in the project root for license information.
341
+
342
+
343
+ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
344
+
345
+ /**
346
+ * Generates a unique string to be used for child auro element naming.
347
+ * @private
348
+ * @param {string} baseName - Defines the first part of the unique element name.
349
+ * @param {string} version - Version of the component that will be appended to the baseName.
350
+ * @returns {string} - Unique string to be used for naming.
351
+ */
352
+ generateElementName(baseName, version) {
353
+ let result = baseName;
354
+
355
+ result += '-';
356
+ result += version.replace(/[.]/g, '_');
357
+
358
+ return result;
359
+ }
360
+
361
+ /**
362
+ * Generates a unique string to be used for child auro element naming.
363
+ * @param {string} baseName - Defines the first part of the unique element name.
364
+ * @param {string} version - Version of the component that will be appended to the baseName.
365
+ * @returns {string} - Unique string to be used for naming.
366
+ */
367
+ generateTag(baseName, version, tagClass) {
368
+ const elementName = this.generateElementName(baseName, version);
369
+ const tag = i$7`${s$3(elementName)}`;
370
+
371
+ if (!customElements.get(elementName)) {
372
+ customElements.define(elementName, class extends tagClass {});
373
+ }
374
+
375
+ return tag;
376
+ }
377
+ };
378
+
379
+ /**
380
+ * @license
381
+ * Copyright 2017 Google LLC
382
+ * SPDX-License-Identifier: BSD-3-Clause
383
+ */
384
+ const t$2=globalThis,i$5=t$2.trustedTypes,s$2=i$5?i$5.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$4="$lit$",h$1=`lit$${Math.random().toFixed(9).slice(2)}$`,o$4="?"+h$1,n$3=`<${o$4}>`,r$3=document,l$2=()=>r$3.createComment(""),c$2=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$2=Array.isArray,u$2=t=>a$2(t)||"function"==typeof t?.[Symbol.iterator],d$1="[ \t\n\f\r]",f$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d$1}(?:([^\\s"'>=/]+)(${d$1}*=${d$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$1=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y$1=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y$1(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r$3.createTreeWalker(r$3,129);function P(t,i){if(!a$2(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):void 0!==u[3]&&(c=m):c===m?">"===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:'"'===u[3]?g:p$1):c===g||c===p$1?c=m:c===v||c===_?c=f$1:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f$1?s+n$3:d>=0?(o.push(a),s.slice(0,d)+e$4+s.slice(d)+h$1+x):s+h$1+(-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$4)){const i=v[a++],s=r.getAttribute(t).split(h$1),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$1)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h$1),s=t.length-1;if(s>0){r.textContent=i$5?i$5.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$2()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$2());}}}else if(8===r.nodeType)if(r.data===o$4)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$1,t+1));)d.push({type:7,index:c}),t+=h$1.length-1;}c++;}}static createElement(t,i){const s=r$3.createElement("template");return s.innerHTML=t,s}}function S$1(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c$2(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),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$1(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$3).importNode(i,!0);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$3,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??!0;}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$1(this,t,i),c$2(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$2(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$3.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$2(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$2()),this.O(l$2()),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?.(!1,!0,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=!1;if(void 0===h)t=S$1(this,t,i,0),o=!c$2(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$1(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c$2(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$1(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$1(this,t);}}const j=t$2.litHtmlPolyfillSupport;j?.(N,R),(t$2.litHtmlVersions??=[]).push("3.2.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$2(),t),t,void 0,s??{});}return h._$AI(t),h};
385
+
386
+ /**
387
+ * @license
388
+ * Copyright 2020 Google LLC
389
+ * SPDX-License-Identifier: BSD-3-Clause
390
+ */
391
+ const a$1=Symbol.for(""),o$3=t=>{if(t?.r===a$1)return t?._$litStatic$},s$1=t=>({_$litStatic$:t,r:a$1}),i$4=(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$1}),l$1=new Map,n$2=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=!1;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$3(i));)c+=s+r[++$],f=!0;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l$1.get(t))&&(n.raw=n,l$1.set(t,r=n)),e=u;}return t(r,...e)},u$1=n$2(x);
392
+
393
+ /**
394
+ * @license
395
+ * Copyright 2019 Google LLC
396
+ * SPDX-License-Identifier: BSD-3-Clause
397
+ */
398
+ const t$1=globalThis,e$3=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o$2=new WeakMap;let n$1 = class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)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$3&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$2.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$2.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$1("string"==typeof t?t:t+"",void 0,s),i$3=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===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$1(o,t,s)},S=(s,o)=>{if(e$3)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$1.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$1=e$3?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
399
+
400
+ /**
401
+ * @license
402
+ * Copyright 2017 Google LLC
403
+ * SPDX-License-Identifier: BSD-3-Clause
404
+ */const{is:i$2,defineProperty:e$2,getOwnPropertyDescriptor:r$1,getOwnPropertyNames:h,getOwnPropertySymbols:o$1,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l: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=(t,s)=>!i$2(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class b 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=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$2(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...h(t),...o$1(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$1(s));}else void 0!==s&&i.push(c$1(s));return i}static _$Eu(t,s){const i=s.attribute;return !1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,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(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),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),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(this[t],s))return;this.P(t,s,i);}!1===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=!0;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)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i);}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[d("elementProperties")]=new Map,b[d("finalized")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push("2.0.4");
405
+
406
+ /**
407
+ * @license
408
+ * Copyright 2017 Google LLC
409
+ * SPDX-License-Identifier: BSD-3-Clause
410
+ */class r extends b{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 s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return T}}r._$litElement$=!0,r["finalized"]=!0,globalThis.litElementHydrateSupport?.({LitElement:r});const i$1=globalThis.litElementPolyfillSupport;i$1?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
411
+
412
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
413
+ // See LICENSE in the project root for license information.
414
+
415
+ // ---------------------------------------------------------------------
416
+
417
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
418
+
419
+ class AuroLibraryRuntimeUtils {
420
+
421
+ /* eslint-disable jsdoc/require-param */
422
+
423
+ /**
424
+ * This will register a new custom element with the browser.
425
+ * @param {String} name - The name of the custom element.
426
+ * @param {Object} componentClass - The class to register as a custom element.
427
+ * @returns {void}
428
+ */
429
+ registerComponent(name, componentClass) {
430
+ if (!customElements.get(name)) {
431
+ customElements.define(name, class extends componentClass {});
432
+ }
433
+ }
434
+
435
+ /**
436
+ * Finds and returns the closest HTML Element based on a selector.
437
+ * @returns {void}
438
+ */
439
+ closestElement(
440
+ selector, // selector like in .closest()
441
+ base = this, // extra functionality to skip a parent
442
+ __Closest = (el, found = el && el.closest(selector)) =>
443
+ !el || el === document || el === window
444
+ ? null // standard .closest() returns null for non-found selectors also
445
+ : found
446
+ ? found // found a selector INside this element
447
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
448
+ ) {
449
+ return __Closest(base);
450
+ }
451
+ /* eslint-enable jsdoc/require-param */
452
+
453
+ /**
454
+ * 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.
455
+ * @param {Object} elem - The element to check.
456
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
457
+ * @returns {void}
458
+ */
459
+ handleComponentTagRename(elem, tagName) {
460
+ const tag = tagName.toLowerCase();
461
+ const elemTag = elem.tagName.toLowerCase();
462
+
463
+ if (elemTag !== tag) {
464
+ elem.setAttribute(tag, true);
465
+ }
466
+ }
467
+
468
+ /**
469
+ * Validates if an element is a specific Auro component.
470
+ * @param {Object} elem - The element to validate.
471
+ * @param {String} tagName - The name of the Auro component to check against.
472
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
473
+ */
474
+ elementMatch(elem, tagName) {
475
+ const tag = tagName.toLowerCase();
476
+ const elemTag = elem.tagName.toLowerCase();
477
+
478
+ return elemTag === tag || elem.hasAttribute(tag);
479
+ }
480
+ }
481
+
482
+ /**
483
+ * Custom positioning reference element.
484
+ * @see https://floating-ui.com/docs/virtual-elements
485
+ */
486
+
487
+ const sides = ['top', 'right', 'bottom', 'left'];
488
+ const alignments = ['start', 'end'];
489
+ const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
490
+ const min = Math.min;
491
+ const max = Math.max;
492
+ const round = Math.round;
493
+ const floor = Math.floor;
494
+ const createCoords = v => ({
495
+ x: v,
496
+ y: v
497
+ });
498
+ const oppositeSideMap = {
499
+ left: 'right',
500
+ right: 'left',
501
+ bottom: 'top',
502
+ top: 'bottom'
503
+ };
504
+ const oppositeAlignmentMap = {
505
+ start: 'end',
506
+ end: 'start'
507
+ };
508
+ function evaluate(value, param) {
509
+ return typeof value === 'function' ? value(param) : value;
510
+ }
511
+ function getSide(placement) {
512
+ return placement.split('-')[0];
513
+ }
514
+ function getAlignment(placement) {
515
+ return placement.split('-')[1];
516
+ }
517
+ function getOppositeAxis(axis) {
518
+ return axis === 'x' ? 'y' : 'x';
519
+ }
520
+ function getAxisLength(axis) {
521
+ return axis === 'y' ? 'height' : 'width';
522
+ }
523
+ function getSideAxis(placement) {
524
+ return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
525
+ }
526
+ function getAlignmentAxis(placement) {
527
+ return getOppositeAxis(getSideAxis(placement));
528
+ }
529
+ function getAlignmentSides(placement, rects, rtl) {
530
+ if (rtl === void 0) {
531
+ rtl = false;
532
+ }
533
+ const alignment = getAlignment(placement);
534
+ const alignmentAxis = getAlignmentAxis(placement);
535
+ const length = getAxisLength(alignmentAxis);
536
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
537
+ if (rects.reference[length] > rects.floating[length]) {
538
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
539
+ }
540
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
541
+ }
542
+ function getExpandedPlacements(placement) {
543
+ const oppositePlacement = getOppositePlacement(placement);
544
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
545
+ }
546
+ function getOppositeAlignmentPlacement(placement) {
547
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
548
+ }
549
+ function getSideList(side, isStart, rtl) {
550
+ const lr = ['left', 'right'];
551
+ const rl = ['right', 'left'];
552
+ const tb = ['top', 'bottom'];
553
+ const bt = ['bottom', 'top'];
554
+ switch (side) {
555
+ case 'top':
556
+ case 'bottom':
557
+ if (rtl) return isStart ? rl : lr;
558
+ return isStart ? lr : rl;
559
+ case 'left':
560
+ case 'right':
561
+ return isStart ? tb : bt;
562
+ default:
563
+ return [];
564
+ }
565
+ }
566
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
567
+ const alignment = getAlignment(placement);
568
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
569
+ if (alignment) {
570
+ list = list.map(side => side + "-" + alignment);
571
+ if (flipAlignment) {
572
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
573
+ }
574
+ }
575
+ return list;
576
+ }
577
+ function getOppositePlacement(placement) {
578
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
579
+ }
580
+ function expandPaddingObject(padding) {
581
+ return {
582
+ top: 0,
583
+ right: 0,
584
+ bottom: 0,
585
+ left: 0,
586
+ ...padding
587
+ };
588
+ }
589
+ function getPaddingObject(padding) {
590
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
591
+ top: padding,
592
+ right: padding,
593
+ bottom: padding,
594
+ left: padding
595
+ };
596
+ }
597
+ function rectToClientRect(rect) {
598
+ const {
599
+ x,
600
+ y,
601
+ width,
602
+ height
603
+ } = rect;
604
+ return {
605
+ width,
606
+ height,
607
+ top: y,
608
+ left: x,
609
+ right: x + width,
610
+ bottom: y + height,
611
+ x,
612
+ y
613
+ };
614
+ }
615
+
616
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
617
+ let {
618
+ reference,
619
+ floating
620
+ } = _ref;
621
+ const sideAxis = getSideAxis(placement);
622
+ const alignmentAxis = getAlignmentAxis(placement);
623
+ const alignLength = getAxisLength(alignmentAxis);
624
+ const side = getSide(placement);
625
+ const isVertical = sideAxis === 'y';
626
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
627
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
628
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
629
+ let coords;
630
+ switch (side) {
631
+ case 'top':
632
+ coords = {
633
+ x: commonX,
634
+ y: reference.y - floating.height
635
+ };
636
+ break;
637
+ case 'bottom':
638
+ coords = {
639
+ x: commonX,
640
+ y: reference.y + reference.height
641
+ };
642
+ break;
643
+ case 'right':
644
+ coords = {
645
+ x: reference.x + reference.width,
646
+ y: commonY
647
+ };
648
+ break;
649
+ case 'left':
650
+ coords = {
651
+ x: reference.x - floating.width,
652
+ y: commonY
653
+ };
654
+ break;
655
+ default:
656
+ coords = {
657
+ x: reference.x,
658
+ y: reference.y
659
+ };
660
+ }
661
+ switch (getAlignment(placement)) {
662
+ case 'start':
663
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
664
+ break;
665
+ case 'end':
666
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
667
+ break;
668
+ }
669
+ return coords;
670
+ }
671
+
672
+ /**
673
+ * Computes the `x` and `y` coordinates that will place the floating element
674
+ * next to a given reference element.
675
+ *
676
+ * This export does not have any `platform` interface logic. You will need to
677
+ * write one for the platform you are using Floating UI with.
678
+ */
679
+ const computePosition$1 = async (reference, floating, config) => {
680
+ const {
681
+ placement = 'bottom',
682
+ strategy = 'absolute',
683
+ middleware = [],
684
+ platform
685
+ } = config;
686
+ const validMiddleware = middleware.filter(Boolean);
687
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
688
+ let rects = await platform.getElementRects({
689
+ reference,
690
+ floating,
691
+ strategy
692
+ });
693
+ let {
694
+ x,
695
+ y
696
+ } = computeCoordsFromPlacement(rects, placement, rtl);
697
+ let statefulPlacement = placement;
698
+ let middlewareData = {};
699
+ let resetCount = 0;
700
+ for (let i = 0; i < validMiddleware.length; i++) {
701
+ const {
702
+ name,
703
+ fn
704
+ } = validMiddleware[i];
705
+ const {
706
+ x: nextX,
707
+ y: nextY,
708
+ data,
709
+ reset
710
+ } = await fn({
711
+ x,
712
+ y,
713
+ initialPlacement: placement,
714
+ placement: statefulPlacement,
715
+ strategy,
716
+ middlewareData,
717
+ rects,
718
+ platform,
719
+ elements: {
720
+ reference,
721
+ floating
722
+ }
723
+ });
724
+ x = nextX != null ? nextX : x;
725
+ y = nextY != null ? nextY : y;
726
+ middlewareData = {
727
+ ...middlewareData,
728
+ [name]: {
729
+ ...middlewareData[name],
730
+ ...data
731
+ }
732
+ };
733
+ if (reset && resetCount <= 50) {
734
+ resetCount++;
735
+ if (typeof reset === 'object') {
736
+ if (reset.placement) {
737
+ statefulPlacement = reset.placement;
738
+ }
739
+ if (reset.rects) {
740
+ rects = reset.rects === true ? await platform.getElementRects({
741
+ reference,
742
+ floating,
743
+ strategy
744
+ }) : reset.rects;
745
+ }
746
+ ({
747
+ x,
748
+ y
749
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
750
+ }
751
+ i = -1;
752
+ }
753
+ }
754
+ return {
755
+ x,
756
+ y,
757
+ placement: statefulPlacement,
758
+ strategy,
759
+ middlewareData
760
+ };
761
+ };
762
+
763
+ /**
764
+ * Resolves with an object of overflow side offsets that determine how much the
765
+ * element is overflowing a given clipping boundary on each side.
766
+ * - positive = overflowing the boundary by that number of pixels
767
+ * - negative = how many pixels left before it will overflow
768
+ * - 0 = lies flush with the boundary
769
+ * @see https://floating-ui.com/docs/detectOverflow
770
+ */
771
+ async function detectOverflow(state, options) {
772
+ var _await$platform$isEle;
773
+ if (options === void 0) {
774
+ options = {};
775
+ }
776
+ const {
777
+ x,
778
+ y,
779
+ platform,
780
+ rects,
781
+ elements,
782
+ strategy
783
+ } = state;
784
+ const {
785
+ boundary = 'clippingAncestors',
786
+ rootBoundary = 'viewport',
787
+ elementContext = 'floating',
788
+ altBoundary = false,
789
+ padding = 0
790
+ } = evaluate(options, state);
791
+ const paddingObject = getPaddingObject(padding);
792
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
793
+ const element = elements[altBoundary ? altContext : elementContext];
794
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
795
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
796
+ boundary,
797
+ rootBoundary,
798
+ strategy
799
+ }));
800
+ const rect = elementContext === 'floating' ? {
801
+ x,
802
+ y,
803
+ width: rects.floating.width,
804
+ height: rects.floating.height
805
+ } : rects.reference;
806
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
807
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
808
+ x: 1,
809
+ y: 1
810
+ } : {
811
+ x: 1,
812
+ y: 1
813
+ };
814
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
815
+ elements,
816
+ rect,
817
+ offsetParent,
818
+ strategy
819
+ }) : rect);
820
+ return {
821
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
822
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
823
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
824
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
825
+ };
826
+ }
827
+
828
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
829
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
830
+ return allowedPlacementsSortedByAlignment.filter(placement => {
831
+ if (alignment) {
832
+ return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
833
+ }
834
+ return true;
835
+ });
836
+ }
837
+ /**
838
+ * Optimizes the visibility of the floating element by choosing the placement
839
+ * that has the most space available automatically, without needing to specify a
840
+ * preferred placement. Alternative to `flip`.
841
+ * @see https://floating-ui.com/docs/autoPlacement
842
+ */
843
+ const autoPlacement$1 = function (options) {
844
+ if (options === void 0) {
845
+ options = {};
846
+ }
847
+ return {
848
+ name: 'autoPlacement',
849
+ options,
850
+ async fn(state) {
851
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
852
+ const {
853
+ rects,
854
+ middlewareData,
855
+ placement,
856
+ platform,
857
+ elements
858
+ } = state;
859
+ const {
860
+ crossAxis = false,
861
+ alignment,
862
+ allowedPlacements = placements,
863
+ autoAlignment = true,
864
+ ...detectOverflowOptions
865
+ } = evaluate(options, state);
866
+ const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
867
+ const overflow = await detectOverflow(state, detectOverflowOptions);
868
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
869
+ const currentPlacement = placements$1[currentIndex];
870
+ if (currentPlacement == null) {
871
+ return {};
872
+ }
873
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
874
+
875
+ // Make `computeCoords` start from the right place.
876
+ if (placement !== currentPlacement) {
877
+ return {
878
+ reset: {
879
+ placement: placements$1[0]
880
+ }
881
+ };
882
+ }
883
+ const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
884
+ const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
885
+ placement: currentPlacement,
886
+ overflows: currentOverflows
887
+ }];
888
+ const nextPlacement = placements$1[currentIndex + 1];
889
+
890
+ // There are more placements to check.
891
+ if (nextPlacement) {
892
+ return {
893
+ data: {
894
+ index: currentIndex + 1,
895
+ overflows: allOverflows
896
+ },
897
+ reset: {
898
+ placement: nextPlacement
899
+ }
900
+ };
901
+ }
902
+ const placementsSortedByMostSpace = allOverflows.map(d => {
903
+ const alignment = getAlignment(d.placement);
904
+ return [d.placement, alignment && crossAxis ?
905
+ // Check along the mainAxis and main crossAxis side.
906
+ d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
907
+ // Check only the mainAxis.
908
+ d.overflows[0], d.overflows];
909
+ }).sort((a, b) => a[1] - b[1]);
910
+ const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
911
+ // Aligned placements should not check their opposite crossAxis
912
+ // side.
913
+ getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
914
+ const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
915
+ if (resetPlacement !== placement) {
916
+ return {
917
+ data: {
918
+ index: currentIndex + 1,
919
+ overflows: allOverflows
920
+ },
921
+ reset: {
922
+ placement: resetPlacement
923
+ }
924
+ };
925
+ }
926
+ return {};
927
+ }
928
+ };
929
+ };
930
+
931
+ /**
932
+ * Optimizes the visibility of the floating element by flipping the `placement`
933
+ * in order to keep it in view when the preferred placement(s) will overflow the
934
+ * clipping boundary. Alternative to `autoPlacement`.
935
+ * @see https://floating-ui.com/docs/flip
936
+ */
937
+ const flip$1 = function (options) {
938
+ if (options === void 0) {
939
+ options = {};
940
+ }
941
+ return {
942
+ name: 'flip',
943
+ options,
944
+ async fn(state) {
945
+ var _middlewareData$arrow, _middlewareData$flip;
946
+ const {
947
+ placement,
948
+ middlewareData,
949
+ rects,
950
+ initialPlacement,
951
+ platform,
952
+ elements
953
+ } = state;
954
+ const {
955
+ mainAxis: checkMainAxis = true,
956
+ crossAxis: checkCrossAxis = true,
957
+ fallbackPlacements: specifiedFallbackPlacements,
958
+ fallbackStrategy = 'bestFit',
959
+ fallbackAxisSideDirection = 'none',
960
+ flipAlignment = true,
961
+ ...detectOverflowOptions
962
+ } = evaluate(options, state);
963
+
964
+ // If a reset by the arrow was caused due to an alignment offset being
965
+ // added, we should skip any logic now since `flip()` has already done its
966
+ // work.
967
+ // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
968
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
969
+ return {};
970
+ }
971
+ const side = getSide(placement);
972
+ const initialSideAxis = getSideAxis(initialPlacement);
973
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
974
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
975
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
976
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
977
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
978
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
979
+ }
980
+ const placements = [initialPlacement, ...fallbackPlacements];
981
+ const overflow = await detectOverflow(state, detectOverflowOptions);
982
+ const overflows = [];
983
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
984
+ if (checkMainAxis) {
985
+ overflows.push(overflow[side]);
986
+ }
987
+ if (checkCrossAxis) {
988
+ const sides = getAlignmentSides(placement, rects, rtl);
989
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
990
+ }
991
+ overflowsData = [...overflowsData, {
992
+ placement,
993
+ overflows
994
+ }];
995
+
996
+ // One or more sides is overflowing.
997
+ if (!overflows.every(side => side <= 0)) {
998
+ var _middlewareData$flip2, _overflowsData$filter;
999
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
1000
+ const nextPlacement = placements[nextIndex];
1001
+ if (nextPlacement) {
1002
+ // Try next placement and re-run the lifecycle.
1003
+ return {
1004
+ data: {
1005
+ index: nextIndex,
1006
+ overflows: overflowsData
1007
+ },
1008
+ reset: {
1009
+ placement: nextPlacement
1010
+ }
1011
+ };
1012
+ }
1013
+
1014
+ // First, find the candidates that fit on the mainAxis side of overflow,
1015
+ // then find the placement that fits the best on the main crossAxis side.
1016
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
1017
+
1018
+ // Otherwise fallback.
1019
+ if (!resetPlacement) {
1020
+ switch (fallbackStrategy) {
1021
+ case 'bestFit':
1022
+ {
1023
+ var _overflowsData$filter2;
1024
+ const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
1025
+ if (hasFallbackAxisSideDirection) {
1026
+ const currentSideAxis = getSideAxis(d.placement);
1027
+ return currentSideAxis === initialSideAxis ||
1028
+ // Create a bias to the `y` side axis due to horizontal
1029
+ // reading directions favoring greater width.
1030
+ currentSideAxis === 'y';
1031
+ }
1032
+ return true;
1033
+ }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
1034
+ if (placement) {
1035
+ resetPlacement = placement;
1036
+ }
1037
+ break;
1038
+ }
1039
+ case 'initialPlacement':
1040
+ resetPlacement = initialPlacement;
1041
+ break;
1042
+ }
1043
+ }
1044
+ if (placement !== resetPlacement) {
1045
+ return {
1046
+ reset: {
1047
+ placement: resetPlacement
1048
+ }
1049
+ };
1050
+ }
1051
+ }
1052
+ return {};
1053
+ }
1054
+ };
1055
+ };
1056
+
1057
+ // For type backwards-compatibility, the `OffsetOptions` type was also
1058
+ // Derivable.
1059
+
1060
+ async function convertValueToCoords(state, options) {
1061
+ const {
1062
+ placement,
1063
+ platform,
1064
+ elements
1065
+ } = state;
1066
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1067
+ const side = getSide(placement);
1068
+ const alignment = getAlignment(placement);
1069
+ const isVertical = getSideAxis(placement) === 'y';
1070
+ const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
1071
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
1072
+ const rawValue = evaluate(options, state);
1073
+
1074
+ // eslint-disable-next-line prefer-const
1075
+ let {
1076
+ mainAxis,
1077
+ crossAxis,
1078
+ alignmentAxis
1079
+ } = typeof rawValue === 'number' ? {
1080
+ mainAxis: rawValue,
1081
+ crossAxis: 0,
1082
+ alignmentAxis: null
1083
+ } : {
1084
+ mainAxis: rawValue.mainAxis || 0,
1085
+ crossAxis: rawValue.crossAxis || 0,
1086
+ alignmentAxis: rawValue.alignmentAxis
1087
+ };
1088
+ if (alignment && typeof alignmentAxis === 'number') {
1089
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
1090
+ }
1091
+ return isVertical ? {
1092
+ x: crossAxis * crossAxisMulti,
1093
+ y: mainAxis * mainAxisMulti
1094
+ } : {
1095
+ x: mainAxis * mainAxisMulti,
1096
+ y: crossAxis * crossAxisMulti
1097
+ };
1098
+ }
1099
+
1100
+ /**
1101
+ * Modifies the placement by translating the floating element along the
1102
+ * specified axes.
1103
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1104
+ * object may be passed.
1105
+ * @see https://floating-ui.com/docs/offset
1106
+ */
1107
+ const offset$1 = function (options) {
1108
+ if (options === void 0) {
1109
+ options = 0;
1110
+ }
1111
+ return {
1112
+ name: 'offset',
1113
+ options,
1114
+ async fn(state) {
1115
+ var _middlewareData$offse, _middlewareData$arrow;
1116
+ const {
1117
+ x,
1118
+ y,
1119
+ placement,
1120
+ middlewareData
1121
+ } = state;
1122
+ const diffCoords = await convertValueToCoords(state, options);
1123
+
1124
+ // If the placement is the same and the arrow caused an alignment offset
1125
+ // then we don't need to change the positioning coordinates.
1126
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
1127
+ return {};
1128
+ }
1129
+ return {
1130
+ x: x + diffCoords.x,
1131
+ y: y + diffCoords.y,
1132
+ data: {
1133
+ ...diffCoords,
1134
+ placement
1135
+ }
1136
+ };
1137
+ }
1138
+ };
1139
+ };
1140
+
1141
+ function hasWindow() {
1142
+ return typeof window !== 'undefined';
1143
+ }
1144
+ function getNodeName(node) {
1145
+ if (isNode(node)) {
1146
+ return (node.nodeName || '').toLowerCase();
1147
+ }
1148
+ // Mocked nodes in testing environments may not be instances of Node. By
1149
+ // returning `#document` an infinite loop won't occur.
1150
+ // https://github.com/floating-ui/floating-ui/issues/2317
1151
+ return '#document';
1152
+ }
1153
+ function getWindow(node) {
1154
+ var _node$ownerDocument;
1155
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1156
+ }
1157
+ function getDocumentElement(node) {
1158
+ var _ref;
1159
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1160
+ }
1161
+ function isNode(value) {
1162
+ if (!hasWindow()) {
1163
+ return false;
1164
+ }
1165
+ return value instanceof Node || value instanceof getWindow(value).Node;
1166
+ }
1167
+ function isElement(value) {
1168
+ if (!hasWindow()) {
1169
+ return false;
1170
+ }
1171
+ return value instanceof Element || value instanceof getWindow(value).Element;
1172
+ }
1173
+ function isHTMLElement(value) {
1174
+ if (!hasWindow()) {
1175
+ return false;
1176
+ }
1177
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1178
+ }
1179
+ function isShadowRoot(value) {
1180
+ if (!hasWindow() || typeof ShadowRoot === 'undefined') {
1181
+ return false;
1182
+ }
1183
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1184
+ }
1185
+ function isOverflowElement(element) {
1186
+ const {
1187
+ overflow,
1188
+ overflowX,
1189
+ overflowY,
1190
+ display
1191
+ } = getComputedStyle$1(element);
1192
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
1193
+ }
1194
+ function isTableElement(element) {
1195
+ return ['table', 'td', 'th'].includes(getNodeName(element));
1196
+ }
1197
+ function isTopLayer(element) {
1198
+ return [':popover-open', ':modal'].some(selector => {
1199
+ try {
1200
+ return element.matches(selector);
1201
+ } catch (e) {
1202
+ return false;
1203
+ }
1204
+ });
1205
+ }
1206
+ function isContainingBlock(elementOrCss) {
1207
+ const webkit = isWebKit();
1208
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
1209
+
1210
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1211
+ return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
1212
+ }
1213
+ function getContainingBlock(element) {
1214
+ let currentNode = getParentNode(element);
1215
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1216
+ if (isContainingBlock(currentNode)) {
1217
+ return currentNode;
1218
+ } else if (isTopLayer(currentNode)) {
1219
+ return null;
1220
+ }
1221
+ currentNode = getParentNode(currentNode);
1222
+ }
1223
+ return null;
1224
+ }
1225
+ function isWebKit() {
1226
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
1227
+ return CSS.supports('-webkit-backdrop-filter', 'none');
1228
+ }
1229
+ function isLastTraversableNode(node) {
1230
+ return ['html', 'body', '#document'].includes(getNodeName(node));
1231
+ }
1232
+ function getComputedStyle$1(element) {
1233
+ return getWindow(element).getComputedStyle(element);
1234
+ }
1235
+ function getNodeScroll(element) {
1236
+ if (isElement(element)) {
1237
+ return {
1238
+ scrollLeft: element.scrollLeft,
1239
+ scrollTop: element.scrollTop
1240
+ };
1241
+ }
1242
+ return {
1243
+ scrollLeft: element.scrollX,
1244
+ scrollTop: element.scrollY
1245
+ };
1246
+ }
1247
+ function getParentNode(node) {
1248
+ if (getNodeName(node) === 'html') {
1249
+ return node;
1250
+ }
1251
+ const result =
1252
+ // Step into the shadow DOM of the parent of a slotted node.
1253
+ node.assignedSlot ||
1254
+ // DOM Element detected.
1255
+ node.parentNode ||
1256
+ // ShadowRoot detected.
1257
+ isShadowRoot(node) && node.host ||
1258
+ // Fallback.
1259
+ getDocumentElement(node);
1260
+ return isShadowRoot(result) ? result.host : result;
1261
+ }
1262
+ function getNearestOverflowAncestor(node) {
1263
+ const parentNode = getParentNode(node);
1264
+ if (isLastTraversableNode(parentNode)) {
1265
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
1266
+ }
1267
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1268
+ return parentNode;
1269
+ }
1270
+ return getNearestOverflowAncestor(parentNode);
1271
+ }
1272
+ function getOverflowAncestors(node, list, traverseIframes) {
1273
+ var _node$ownerDocument2;
1274
+ if (list === void 0) {
1275
+ list = [];
1276
+ }
1277
+ if (traverseIframes === void 0) {
1278
+ traverseIframes = true;
1279
+ }
1280
+ const scrollableAncestor = getNearestOverflowAncestor(node);
1281
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1282
+ const win = getWindow(scrollableAncestor);
1283
+ if (isBody) {
1284
+ const frameElement = getFrameElement(win);
1285
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1286
+ }
1287
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1288
+ }
1289
+ function getFrameElement(win) {
1290
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1291
+ }
1292
+
1293
+ function getCssDimensions(element) {
1294
+ const css = getComputedStyle$1(element);
1295
+ // In testing environments, the `width` and `height` properties are empty
1296
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
1297
+ let width = parseFloat(css.width) || 0;
1298
+ let height = parseFloat(css.height) || 0;
1299
+ const hasOffset = isHTMLElement(element);
1300
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
1301
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
1302
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
1303
+ if (shouldFallback) {
1304
+ width = offsetWidth;
1305
+ height = offsetHeight;
1306
+ }
1307
+ return {
1308
+ width,
1309
+ height,
1310
+ $: shouldFallback
1311
+ };
1312
+ }
1313
+
1314
+ function unwrapElement(element) {
1315
+ return !isElement(element) ? element.contextElement : element;
1316
+ }
1317
+
1318
+ function getScale(element) {
1319
+ const domElement = unwrapElement(element);
1320
+ if (!isHTMLElement(domElement)) {
1321
+ return createCoords(1);
1322
+ }
1323
+ const rect = domElement.getBoundingClientRect();
1324
+ const {
1325
+ width,
1326
+ height,
1327
+ $
1328
+ } = getCssDimensions(domElement);
1329
+ let x = ($ ? round(rect.width) : rect.width) / width;
1330
+ let y = ($ ? round(rect.height) : rect.height) / height;
1331
+
1332
+ // 0, NaN, or Infinity should always fallback to 1.
1333
+
1334
+ if (!x || !Number.isFinite(x)) {
1335
+ x = 1;
1336
+ }
1337
+ if (!y || !Number.isFinite(y)) {
1338
+ y = 1;
1339
+ }
1340
+ return {
1341
+ x,
1342
+ y
1343
+ };
1344
+ }
1345
+
1346
+ const noOffsets = /*#__PURE__*/createCoords(0);
1347
+ function getVisualOffsets(element) {
1348
+ const win = getWindow(element);
1349
+ if (!isWebKit() || !win.visualViewport) {
1350
+ return noOffsets;
1351
+ }
1352
+ return {
1353
+ x: win.visualViewport.offsetLeft,
1354
+ y: win.visualViewport.offsetTop
1355
+ };
1356
+ }
1357
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
1358
+ if (isFixed === void 0) {
1359
+ isFixed = false;
1360
+ }
1361
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
1362
+ return false;
1363
+ }
1364
+ return isFixed;
1365
+ }
1366
+
1367
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1368
+ if (includeScale === void 0) {
1369
+ includeScale = false;
1370
+ }
1371
+ if (isFixedStrategy === void 0) {
1372
+ isFixedStrategy = false;
1373
+ }
1374
+ const clientRect = element.getBoundingClientRect();
1375
+ const domElement = unwrapElement(element);
1376
+ let scale = createCoords(1);
1377
+ if (includeScale) {
1378
+ if (offsetParent) {
1379
+ if (isElement(offsetParent)) {
1380
+ scale = getScale(offsetParent);
1381
+ }
1382
+ } else {
1383
+ scale = getScale(element);
1384
+ }
1385
+ }
1386
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
1387
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
1388
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
1389
+ let width = clientRect.width / scale.x;
1390
+ let height = clientRect.height / scale.y;
1391
+ if (domElement) {
1392
+ const win = getWindow(domElement);
1393
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1394
+ let currentWin = win;
1395
+ let currentIFrame = getFrameElement(currentWin);
1396
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
1397
+ const iframeScale = getScale(currentIFrame);
1398
+ const iframeRect = currentIFrame.getBoundingClientRect();
1399
+ const css = getComputedStyle$1(currentIFrame);
1400
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1401
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1402
+ x *= iframeScale.x;
1403
+ y *= iframeScale.y;
1404
+ width *= iframeScale.x;
1405
+ height *= iframeScale.y;
1406
+ x += left;
1407
+ y += top;
1408
+ currentWin = getWindow(currentIFrame);
1409
+ currentIFrame = getFrameElement(currentWin);
1410
+ }
1411
+ }
1412
+ return rectToClientRect({
1413
+ width,
1414
+ height,
1415
+ x,
1416
+ y
1417
+ });
1418
+ }
1419
+
1420
+ // If <html> has a CSS width greater than the viewport, then this will be
1421
+ // incorrect for RTL.
1422
+ function getWindowScrollBarX(element, rect) {
1423
+ const leftScroll = getNodeScroll(element).scrollLeft;
1424
+ if (!rect) {
1425
+ return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
1426
+ }
1427
+ return rect.left + leftScroll;
1428
+ }
1429
+
1430
+ function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
1431
+ if (ignoreScrollbarX === void 0) {
1432
+ ignoreScrollbarX = false;
1433
+ }
1434
+ const htmlRect = documentElement.getBoundingClientRect();
1435
+ const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
1436
+ // RTL <body> scrollbar.
1437
+ getWindowScrollBarX(documentElement, htmlRect));
1438
+ const y = htmlRect.top + scroll.scrollTop;
1439
+ return {
1440
+ x,
1441
+ y
1442
+ };
1443
+ }
1444
+
1445
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1446
+ let {
1447
+ elements,
1448
+ rect,
1449
+ offsetParent,
1450
+ strategy
1451
+ } = _ref;
1452
+ const isFixed = strategy === 'fixed';
1453
+ const documentElement = getDocumentElement(offsetParent);
1454
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
1455
+ if (offsetParent === documentElement || topLayer && isFixed) {
1456
+ return rect;
1457
+ }
1458
+ let scroll = {
1459
+ scrollLeft: 0,
1460
+ scrollTop: 0
1461
+ };
1462
+ let scale = createCoords(1);
1463
+ const offsets = createCoords(0);
1464
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1465
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1466
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1467
+ scroll = getNodeScroll(offsetParent);
1468
+ }
1469
+ if (isHTMLElement(offsetParent)) {
1470
+ const offsetRect = getBoundingClientRect(offsetParent);
1471
+ scale = getScale(offsetParent);
1472
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1473
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1474
+ }
1475
+ }
1476
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
1477
+ return {
1478
+ width: rect.width * scale.x,
1479
+ height: rect.height * scale.y,
1480
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
1481
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
1482
+ };
1483
+ }
1484
+
1485
+ function getClientRects(element) {
1486
+ return Array.from(element.getClientRects());
1487
+ }
1488
+
1489
+ // Gets the entire size of the scrollable document area, even extending outside
1490
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
1491
+ function getDocumentRect(element) {
1492
+ const html = getDocumentElement(element);
1493
+ const scroll = getNodeScroll(element);
1494
+ const body = element.ownerDocument.body;
1495
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1496
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1497
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1498
+ const y = -scroll.scrollTop;
1499
+ if (getComputedStyle$1(body).direction === 'rtl') {
1500
+ x += max(html.clientWidth, body.clientWidth) - width;
1501
+ }
1502
+ return {
1503
+ width,
1504
+ height,
1505
+ x,
1506
+ y
1507
+ };
1508
+ }
1509
+
1510
+ function getViewportRect(element, strategy) {
1511
+ const win = getWindow(element);
1512
+ const html = getDocumentElement(element);
1513
+ const visualViewport = win.visualViewport;
1514
+ let width = html.clientWidth;
1515
+ let height = html.clientHeight;
1516
+ let x = 0;
1517
+ let y = 0;
1518
+ if (visualViewport) {
1519
+ width = visualViewport.width;
1520
+ height = visualViewport.height;
1521
+ const visualViewportBased = isWebKit();
1522
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
1523
+ x = visualViewport.offsetLeft;
1524
+ y = visualViewport.offsetTop;
1525
+ }
1526
+ }
1527
+ return {
1528
+ width,
1529
+ height,
1530
+ x,
1531
+ y
1532
+ };
1533
+ }
1534
+
1535
+ // Returns the inner client rect, subtracting scrollbars if present.
1536
+ function getInnerBoundingClientRect(element, strategy) {
1537
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
1538
+ const top = clientRect.top + element.clientTop;
1539
+ const left = clientRect.left + element.clientLeft;
1540
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
1541
+ const width = element.clientWidth * scale.x;
1542
+ const height = element.clientHeight * scale.y;
1543
+ const x = left * scale.x;
1544
+ const y = top * scale.y;
1545
+ return {
1546
+ width,
1547
+ height,
1548
+ x,
1549
+ y
1550
+ };
1551
+ }
1552
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1553
+ let rect;
1554
+ if (clippingAncestor === 'viewport') {
1555
+ rect = getViewportRect(element, strategy);
1556
+ } else if (clippingAncestor === 'document') {
1557
+ rect = getDocumentRect(getDocumentElement(element));
1558
+ } else if (isElement(clippingAncestor)) {
1559
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
1560
+ } else {
1561
+ const visualOffsets = getVisualOffsets(element);
1562
+ rect = {
1563
+ x: clippingAncestor.x - visualOffsets.x,
1564
+ y: clippingAncestor.y - visualOffsets.y,
1565
+ width: clippingAncestor.width,
1566
+ height: clippingAncestor.height
1567
+ };
1568
+ }
1569
+ return rectToClientRect(rect);
1570
+ }
1571
+ function hasFixedPositionAncestor(element, stopNode) {
1572
+ const parentNode = getParentNode(element);
1573
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1574
+ return false;
1575
+ }
1576
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1577
+ }
1578
+
1579
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
1580
+ // clipping (or hiding) child elements. This returns all clipping ancestors
1581
+ // of the given element up the tree.
1582
+ function getClippingElementAncestors(element, cache) {
1583
+ const cachedResult = cache.get(element);
1584
+ if (cachedResult) {
1585
+ return cachedResult;
1586
+ }
1587
+ let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
1588
+ let currentContainingBlockComputedStyle = null;
1589
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1590
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1591
+
1592
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1593
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1594
+ const computedStyle = getComputedStyle$1(currentNode);
1595
+ const currentNodeIsContaining = isContainingBlock(currentNode);
1596
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
1597
+ currentContainingBlockComputedStyle = null;
1598
+ }
1599
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1600
+ if (shouldDropCurrentNode) {
1601
+ // Drop non-containing blocks.
1602
+ result = result.filter(ancestor => ancestor !== currentNode);
1603
+ } else {
1604
+ // Record last containing block for next iteration.
1605
+ currentContainingBlockComputedStyle = computedStyle;
1606
+ }
1607
+ currentNode = getParentNode(currentNode);
1608
+ }
1609
+ cache.set(element, result);
1610
+ return result;
1611
+ }
1612
+
1613
+ // Gets the maximum area that the element is visible in due to any number of
1614
+ // clipping ancestors.
1615
+ function getClippingRect(_ref) {
1616
+ let {
1617
+ element,
1618
+ boundary,
1619
+ rootBoundary,
1620
+ strategy
1621
+ } = _ref;
1622
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
1623
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1624
+ const firstClippingAncestor = clippingAncestors[0];
1625
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
1626
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1627
+ accRect.top = max(rect.top, accRect.top);
1628
+ accRect.right = min(rect.right, accRect.right);
1629
+ accRect.bottom = min(rect.bottom, accRect.bottom);
1630
+ accRect.left = max(rect.left, accRect.left);
1631
+ return accRect;
1632
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1633
+ return {
1634
+ width: clippingRect.right - clippingRect.left,
1635
+ height: clippingRect.bottom - clippingRect.top,
1636
+ x: clippingRect.left,
1637
+ y: clippingRect.top
1638
+ };
1639
+ }
1640
+
1641
+ function getDimensions(element) {
1642
+ const {
1643
+ width,
1644
+ height
1645
+ } = getCssDimensions(element);
1646
+ return {
1647
+ width,
1648
+ height
1649
+ };
1650
+ }
1651
+
1652
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1653
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1654
+ const documentElement = getDocumentElement(offsetParent);
1655
+ const isFixed = strategy === 'fixed';
1656
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1657
+ let scroll = {
1658
+ scrollLeft: 0,
1659
+ scrollTop: 0
1660
+ };
1661
+ const offsets = createCoords(0);
1662
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1663
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1664
+ scroll = getNodeScroll(offsetParent);
1665
+ }
1666
+ if (isOffsetParentAnElement) {
1667
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1668
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1669
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1670
+ } else if (documentElement) {
1671
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1672
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1673
+ offsets.x = getWindowScrollBarX(documentElement);
1674
+ }
1675
+ }
1676
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1677
+ const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1678
+ const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
1679
+ return {
1680
+ x,
1681
+ y,
1682
+ width: rect.width,
1683
+ height: rect.height
1684
+ };
1685
+ }
1686
+
1687
+ function isStaticPositioned(element) {
1688
+ return getComputedStyle$1(element).position === 'static';
1689
+ }
1690
+
1691
+ function getTrueOffsetParent(element, polyfill) {
1692
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
1693
+ return null;
1694
+ }
1695
+ if (polyfill) {
1696
+ return polyfill(element);
1697
+ }
1698
+ let rawOffsetParent = element.offsetParent;
1699
+
1700
+ // Firefox returns the <html> element as the offsetParent if it's non-static,
1701
+ // while Chrome and Safari return the <body> element. The <body> element must
1702
+ // be used to perform the correct calculations even if the <html> element is
1703
+ // non-static.
1704
+ if (getDocumentElement(element) === rawOffsetParent) {
1705
+ rawOffsetParent = rawOffsetParent.ownerDocument.body;
1706
+ }
1707
+ return rawOffsetParent;
1708
+ }
1709
+
1710
+ // Gets the closest ancestor positioned element. Handles some edge cases,
1711
+ // such as table ancestors and cross browser bugs.
1712
+ function getOffsetParent(element, polyfill) {
1713
+ const win = getWindow(element);
1714
+ if (isTopLayer(element)) {
1715
+ return win;
1716
+ }
1717
+ if (!isHTMLElement(element)) {
1718
+ let svgOffsetParent = getParentNode(element);
1719
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
1720
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
1721
+ return svgOffsetParent;
1722
+ }
1723
+ svgOffsetParent = getParentNode(svgOffsetParent);
1724
+ }
1725
+ return win;
1726
+ }
1727
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1728
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
1729
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1730
+ }
1731
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
1732
+ return win;
1733
+ }
1734
+ return offsetParent || getContainingBlock(element) || win;
1735
+ }
1736
+
1737
+ const getElementRects = async function (data) {
1738
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1739
+ const getDimensionsFn = this.getDimensions;
1740
+ const floatingDimensions = await getDimensionsFn(data.floating);
1741
+ return {
1742
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
1743
+ floating: {
1744
+ x: 0,
1745
+ y: 0,
1746
+ width: floatingDimensions.width,
1747
+ height: floatingDimensions.height
1748
+ }
1749
+ };
1750
+ };
1751
+
1752
+ function isRTL(element) {
1753
+ return getComputedStyle$1(element).direction === 'rtl';
1754
+ }
1755
+
1756
+ const platform = {
1757
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1758
+ getDocumentElement,
1759
+ getClippingRect,
1760
+ getOffsetParent,
1761
+ getElementRects,
1762
+ getClientRects,
1763
+ getDimensions,
1764
+ getScale,
1765
+ isElement,
1766
+ isRTL
1767
+ };
1768
+
1769
+ // https://samthor.au/2021/observing-dom/
1770
+ function observeMove(element, onMove) {
1771
+ let io = null;
1772
+ let timeoutId;
1773
+ const root = getDocumentElement(element);
1774
+ function cleanup() {
1775
+ var _io;
1776
+ clearTimeout(timeoutId);
1777
+ (_io = io) == null || _io.disconnect();
1778
+ io = null;
1779
+ }
1780
+ function refresh(skip, threshold) {
1781
+ if (skip === void 0) {
1782
+ skip = false;
1783
+ }
1784
+ if (threshold === void 0) {
1785
+ threshold = 1;
1786
+ }
1787
+ cleanup();
1788
+ const {
1789
+ left,
1790
+ top,
1791
+ width,
1792
+ height
1793
+ } = element.getBoundingClientRect();
1794
+ if (!skip) {
1795
+ onMove();
1796
+ }
1797
+ if (!width || !height) {
1798
+ return;
1799
+ }
1800
+ const insetTop = floor(top);
1801
+ const insetRight = floor(root.clientWidth - (left + width));
1802
+ const insetBottom = floor(root.clientHeight - (top + height));
1803
+ const insetLeft = floor(left);
1804
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
1805
+ const options = {
1806
+ rootMargin,
1807
+ threshold: max(0, min(1, threshold)) || 1
1808
+ };
1809
+ let isFirstUpdate = true;
1810
+ function handleObserve(entries) {
1811
+ const ratio = entries[0].intersectionRatio;
1812
+ if (ratio !== threshold) {
1813
+ if (!isFirstUpdate) {
1814
+ return refresh();
1815
+ }
1816
+ if (!ratio) {
1817
+ // If the reference is clipped, the ratio is 0. Throttle the refresh
1818
+ // to prevent an infinite loop of updates.
1819
+ timeoutId = setTimeout(() => {
1820
+ refresh(false, 1e-7);
1821
+ }, 1000);
1822
+ } else {
1823
+ refresh(false, ratio);
1824
+ }
1825
+ }
1826
+ isFirstUpdate = false;
1827
+ }
1828
+
1829
+ // Older browsers don't support a `document` as the root and will throw an
1830
+ // error.
1831
+ try {
1832
+ io = new IntersectionObserver(handleObserve, {
1833
+ ...options,
1834
+ // Handle <iframe>s
1835
+ root: root.ownerDocument
1836
+ });
1837
+ } catch (e) {
1838
+ io = new IntersectionObserver(handleObserve, options);
1839
+ }
1840
+ io.observe(element);
1841
+ }
1842
+ refresh(true);
1843
+ return cleanup;
1844
+ }
1845
+
1846
+ /**
1847
+ * Automatically updates the position of the floating element when necessary.
1848
+ * Should only be called when the floating element is mounted on the DOM or
1849
+ * visible on the screen.
1850
+ * @returns cleanup function that should be invoked when the floating element is
1851
+ * removed from the DOM or hidden from the screen.
1852
+ * @see https://floating-ui.com/docs/autoUpdate
1853
+ */
1854
+ function autoUpdate(reference, floating, update, options) {
1855
+ if (options === void 0) {
1856
+ options = {};
1857
+ }
1858
+ const {
1859
+ ancestorScroll = true,
1860
+ ancestorResize = true,
1861
+ elementResize = typeof ResizeObserver === 'function',
1862
+ layoutShift = typeof IntersectionObserver === 'function',
1863
+ animationFrame = false
1864
+ } = options;
1865
+ const referenceEl = unwrapElement(reference);
1866
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
1867
+ ancestors.forEach(ancestor => {
1868
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
1869
+ passive: true
1870
+ });
1871
+ ancestorResize && ancestor.addEventListener('resize', update);
1872
+ });
1873
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
1874
+ let reobserveFrame = -1;
1875
+ let resizeObserver = null;
1876
+ if (elementResize) {
1877
+ resizeObserver = new ResizeObserver(_ref => {
1878
+ let [firstEntry] = _ref;
1879
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
1880
+ // Prevent update loops when using the `size` middleware.
1881
+ // https://github.com/floating-ui/floating-ui/issues/1740
1882
+ resizeObserver.unobserve(floating);
1883
+ cancelAnimationFrame(reobserveFrame);
1884
+ reobserveFrame = requestAnimationFrame(() => {
1885
+ var _resizeObserver;
1886
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
1887
+ });
1888
+ }
1889
+ update();
1890
+ });
1891
+ if (referenceEl && !animationFrame) {
1892
+ resizeObserver.observe(referenceEl);
1893
+ }
1894
+ resizeObserver.observe(floating);
1895
+ }
1896
+ let frameId;
1897
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1898
+ if (animationFrame) {
1899
+ frameLoop();
1900
+ }
1901
+ function frameLoop() {
1902
+ const nextRefRect = getBoundingClientRect(reference);
1903
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
1904
+ update();
1905
+ }
1906
+ prevRefRect = nextRefRect;
1907
+ frameId = requestAnimationFrame(frameLoop);
1908
+ }
1909
+ update();
1910
+ return () => {
1911
+ var _resizeObserver2;
1912
+ ancestors.forEach(ancestor => {
1913
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
1914
+ ancestorResize && ancestor.removeEventListener('resize', update);
1915
+ });
1916
+ cleanupIo == null || cleanupIo();
1917
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
1918
+ resizeObserver = null;
1919
+ if (animationFrame) {
1920
+ cancelAnimationFrame(frameId);
1921
+ }
1922
+ };
1923
+ }
1924
+
1925
+ /**
1926
+ * Modifies the placement by translating the floating element along the
1927
+ * specified axes.
1928
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1929
+ * object may be passed.
1930
+ * @see https://floating-ui.com/docs/offset
1931
+ */
1932
+ const offset = offset$1;
1933
+
1934
+ /**
1935
+ * Optimizes the visibility of the floating element by choosing the placement
1936
+ * that has the most space available automatically, without needing to specify a
1937
+ * preferred placement. Alternative to `flip`.
1938
+ * @see https://floating-ui.com/docs/autoPlacement
1939
+ */
1940
+ const autoPlacement = autoPlacement$1;
1941
+
1942
+ /**
1943
+ * Optimizes the visibility of the floating element by flipping the `placement`
1944
+ * in order to keep it in view when the preferred placement(s) will overflow the
1945
+ * clipping boundary. Alternative to `autoPlacement`.
1946
+ * @see https://floating-ui.com/docs/flip
1947
+ */
1948
+ const flip = flip$1;
1949
+
1950
+ /**
1951
+ * Computes the `x` and `y` coordinates that will place the floating element
1952
+ * next to a given reference element.
1953
+ */
1954
+ const computePosition = (reference, floating, options) => {
1955
+ // This caches the expensive `getClippingElementAncestors` function so that
1956
+ // multiple lifecycle resets re-use the same result. It only lives for a
1957
+ // single call. If other functions become expensive, we can add them as well.
1958
+ const cache = new Map();
1959
+ const mergedOptions = {
1960
+ platform,
1961
+ ...options
1962
+ };
1963
+ const platformWithCache = {
1964
+ ...mergedOptions.platform,
1965
+ _c: cache
1966
+ };
1967
+ return computePosition$1(reference, floating, {
1968
+ ...mergedOptions,
1969
+ platform: platformWithCache
1970
+ });
1971
+ };
1972
+
1973
+ /* eslint-disable line-comment-position, no-inline-comments */
1974
+
1975
+
1976
+ class AuroFloatingUI {
1977
+ constructor() {
1978
+ // Store event listener references for cleanup
1979
+ this.focusHandler = null;
1980
+ this.clickHandler = null;
1981
+ this.keyDownHandler = null;
1982
+ }
1983
+
1984
+ /**
1985
+ * @private
1986
+ * Adjusts the size of the bib content based on the bibSizer dimensions.
1987
+ *
1988
+ * This method retrieves the computed styles of the bibSizer element and applies them to the bib content.
1989
+ * If the fullscreen parameter is true, it resets the dimensions to their default values. Otherwise, it
1990
+ * mirrors the width and height from the bibSizer, ensuring that they are not set to zero.
1991
+ *
1992
+ * @param {boolean} fullscreen - A flag indicating whether to reset the dimensions for fullscreen mode.
1993
+ * If true, the bib content dimensions are cleared; if false, they are set
1994
+ * based on the bibSizer's computed styles.
1995
+ */
1996
+ mirrorSize(fullscreen) {
1997
+ // mirror the boxsize from bibSizer
1998
+ const sizerStyle = window.getComputedStyle(this.element.bibSizer);
1999
+ const bibContent = this.element.bib.shadowRoot.querySelector(".container");
2000
+ if (fullscreen) {
2001
+ bibContent.style.width = '';
2002
+ bibContent.style.height = '';
2003
+ bibContent.style.maxWidth = '';
2004
+ bibContent.style.maxHeight = '';
2005
+ } else {
2006
+ if (sizerStyle.width !== '0px') {
2007
+ bibContent.style.width = sizerStyle.width;
2008
+ }
2009
+ if (sizerStyle.height !== '0px') {
2010
+ bibContent.style.height = sizerStyle.height;
2011
+ }
2012
+ bibContent.style.maxWidth = sizerStyle.maxWidth;
2013
+ bibContent.style.maxHeight = sizerStyle.maxHeight;
2014
+ }
2015
+ }
2016
+
2017
+ /**
2018
+ * @private
2019
+ * Determines the positioning strategy based on the current viewport size and mobile breakpoint.
2020
+ *
2021
+ * This method checks if the current viewport width is less than or equal to the specified mobile fullscreen breakpoint
2022
+ * defined in the bib element. If it is, the strategy is set to 'fullscreen'; otherwise, it defaults to 'floating'.
2023
+ *
2024
+ * @returns {String} The positioning strategy, either 'fullscreen' or 'floating'.
2025
+ */
2026
+ getPositioningStrategy() {
2027
+ let strategy = 'floating';
2028
+ if (this.element.bib.mobileFullscreenBreakpoint) {
2029
+ const isMobile = window.matchMedia(`(max-width: ${this.element.bib.mobileFullscreenBreakpoint})`).matches;
2030
+ if (isMobile) {
2031
+ strategy = 'fullscreen';
2032
+ }
2033
+ }
2034
+ return strategy;
2035
+ }
2036
+
2037
+ /**
2038
+ * @private
2039
+ * Positions the bib element based on the current configuration and positioning strategy.
2040
+ *
2041
+ * This method determines the appropriate positioning strategy (fullscreen or not) and configures the bib accordingly.
2042
+ * It also sets up middleware for the floater configuration, computes the position of the bib relative to the trigger element,
2043
+ * and applies the calculated position to the bib's style.
2044
+ */
2045
+ position() {
2046
+ const strategy = this.getPositioningStrategy();
2047
+ if (strategy === 'fullscreen') {
2048
+ this.configureBibFullscreen(true);
2049
+ this.mirrorSize(true);
2050
+ } else {
2051
+ this.configureBibFullscreen(false);
2052
+ this.mirrorSize(false);
2053
+
2054
+ // Define the middlware for the floater configuration
2055
+ const middleware = [
2056
+ offset(this.element.floaterConfig.offset || 0),
2057
+ ...(this.element.floaterConfig.flip ? [flip()] : []), // Add flip middleware if flip is enabled
2058
+ ...(this.element.floaterConfig.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled
2059
+ ];
2060
+
2061
+ // Compute the position of the bib
2062
+ computePosition(this.element.trigger, this.element.bib, {
2063
+ placement: this.element.floaterConfig.placement || 'bottom',
2064
+ middleware: middleware || []
2065
+ }).then(({x, y}) => { // eslint-disable-line id-length
2066
+ Object.assign(this.element.bib.style, {
2067
+ left: `${x}px`,
2068
+ top: `${y}px`,
2069
+ });
2070
+ });
2071
+ }
2072
+ }
2073
+
2074
+ /**
2075
+ * @private
2076
+ * Configures the bib element for fullscreen mode based on the mobile status.
2077
+ *
2078
+ * This method sets the 'isFullscreen' attribute on the bib element to "true" if the `isMobile` parameter is true,
2079
+ * and resets its position to the top-left corner of the viewport. If `isMobile` is false, it removes the
2080
+ * 'isFullscreen' attribute, indicating that the bib is not in fullscreen mode.
2081
+ *
2082
+ * @param {boolean} isMobile - A flag indicating whether the current device is mobile.
2083
+ */
2084
+ configureBibFullscreen(isMobile) {
2085
+ if (isMobile) {
2086
+ this.element.bib.setAttribute('isFullscreen', "true");
2087
+ // reset the prev position
2088
+ this.element.bib.style.top = "0px";
2089
+ this.element.bib.style.left = "0px";
2090
+ } else {
2091
+ this.element.bib.removeAttribute('isFullscreen');
2092
+ }
2093
+ }
2094
+
2095
+ updateState() {
2096
+ const isVisible = this.element.isPopoverVisible;
2097
+ this.element.trigger.setAttribute('aria-expanded', isVisible);
2098
+
2099
+ if (isVisible) {
2100
+ this.element.bib.setAttribute('data-show', true);
2101
+ } else {
2102
+ this.element.bib.removeAttribute('data-show');
2103
+ }
2104
+
2105
+ if (!isVisible) {
2106
+ this.cleanupHideHandlers();
2107
+ try {
2108
+ this.element.cleanup?.();
2109
+ } catch (error) {
2110
+ // Do nothing
2111
+ }
2112
+ }
2113
+ }
2114
+
2115
+ handleFocusLoss() {
2116
+ if (this.element.noHideOnThisFocusLoss ||
2117
+ this.element.hasAttribute('noHideOnThisFocusLoss')) {
2118
+ return;
2119
+ }
2120
+
2121
+ const {activeElement} = document;
2122
+ if (activeElement === document.querySelector('body') ||
2123
+ this.element.contains(activeElement) ||
2124
+ this.element.bibContent?.contains(activeElement)) {
2125
+ return;
2126
+ }
2127
+
2128
+ this.hideBib();
2129
+ }
2130
+
2131
+ setupHideHandlers() {
2132
+ // Define handlers & store references
2133
+ this.focusHandler = () => this.handleFocusLoss();
2134
+
2135
+ this.clickHandler = (evt) => {
2136
+ if (!evt.composedPath().includes(this.element.trigger) &&
2137
+ !evt.composedPath().includes(this.element.bibContent)) {
2138
+ this.hideBib();
2139
+ }
2140
+ };
2141
+
2142
+ // ESC key handler
2143
+ this.keyDownHandler = (evt) => {
2144
+ if (evt.key === 'Escape' && this.element.isPopoverVisible) {
2145
+ this.hideBib();
2146
+ }
2147
+ };
2148
+
2149
+ // Add event listeners using the stored references
2150
+ document.addEventListener('focusin', this.focusHandler);
2151
+ window.addEventListener('click', this.clickHandler);
2152
+ document.addEventListener('keydown', this.keyDownHandler);
2153
+ }
2154
+
2155
+ cleanupHideHandlers() {
2156
+ // Remove event listeners if they exist
2157
+ if (this.focusHandler) {
2158
+ document.removeEventListener('focusin', this.focusHandler);
2159
+ this.focusHandler = null;
2160
+ }
2161
+
2162
+ if (this.clickHandler) {
2163
+ window.removeEventListener('click', this.clickHandler);
2164
+ this.clickHandler = null;
2165
+ }
2166
+
2167
+ if (this.keyDownHandler) {
2168
+ document.removeEventListener('keydown', this.keyDownHandler);
2169
+ this.keyDownHandler = null;
2170
+ }
2171
+ }
2172
+
2173
+ handleUpdate(changedProperties) {
2174
+ if (changedProperties.has('isPopoverVisible')) {
2175
+ this.updateState();
2176
+ }
2177
+ }
2178
+
2179
+ updateCurrentExpandedDropdown() {
2180
+ // Close any other dropdown that is already open
2181
+ if (document.expandedAuroDropdown) {
2182
+ this.hideBib(document.expandedAuroDropdown);
2183
+ }
2184
+
2185
+ document.expandedAuroDropdown = this;
2186
+ }
2187
+
2188
+ showBib() {
2189
+ if (!this.element.disabled && !this.element.isPopoverVisible) {
2190
+ this.updateCurrentExpandedDropdown();
2191
+ this.element.isPopoverVisible = true;
2192
+ this.element.triggerChevron?.setAttribute('data-expanded', true);
2193
+ this.dispatchEventDropdownToggle();
2194
+ this.position();
2195
+
2196
+ // Clean up any existing handlers before setting up new ones
2197
+ this.cleanupHideHandlers();
2198
+ this.setupHideHandlers();
2199
+
2200
+ // Setup auto update to handle resize and scroll
2201
+ this.element.cleanup = autoUpdate(this.element.trigger, this.element.bib, () => {
2202
+ this.position();
2203
+ });
2204
+ }
2205
+ }
2206
+
2207
+ hideBib() {
2208
+ if (this.element.isPopoverVisible && !this.element.disabled && !this.element.noToggle) {
2209
+ this.element.isPopoverVisible = false;
2210
+ this.element.triggerChevron?.removeAttribute('data-expanded');
2211
+ this.dispatchEventDropdownToggle();
2212
+ }
2213
+ }
2214
+
2215
+ /**
2216
+ * @private
2217
+ * @returns {void} Dispatches event with an object showing the state of the dropdown.
2218
+ */
2219
+ dispatchEventDropdownToggle() {
2220
+ const event = new CustomEvent('auroDropdown-toggled', {
2221
+ detail: {
2222
+ expanded: this.isPopoverVisible,
2223
+ },
2224
+ composed: true
2225
+ });
2226
+
2227
+ this.element.dispatchEvent(event);
2228
+ }
2229
+
2230
+ handleClick() {
2231
+ if (this.element.isPopoverVisible) {
2232
+ this.hideBib();
2233
+ } else {
2234
+ this.showBib();
2235
+ }
2236
+
2237
+ const event = new CustomEvent('auroDropdown-triggerClick', {
2238
+ composed: true,
2239
+ details: {
2240
+ expanded: this.element.isPopoverVisible
2241
+ }
2242
+ });
2243
+
2244
+ this.element.dispatchEvent(event);
2245
+ }
2246
+
2247
+ handleEvent(event) {
2248
+ if (!this.element.disableEventShow) {
2249
+ switch (event.type) {
2250
+ case 'keydown':
2251
+ // Support both Enter and Space keys for accessibility
2252
+ // Space is included as it's expected behavior for interactive elements
2253
+ if (event.key === 'Enter' || event.key === ' ') {
2254
+ event.preventDefault(); // Prevent page scroll on space
2255
+ this.handleClick();
2256
+ }
2257
+ break;
2258
+ case 'mouseenter':
2259
+ if (this.element.hoverToggle) {
2260
+ this.showBib();
2261
+ }
2262
+ break;
2263
+ case 'mouseleave':
2264
+ if (this.element.hoverToggle) {
2265
+ this.hideBib();
2266
+ }
2267
+ break;
2268
+ case 'focus':
2269
+ if (this.element.focusShow) {
2270
+ /*
2271
+ This needs to better handle clicking that gives focus -
2272
+ currently it shows and then immediately hides the bib
2273
+ */
2274
+ this.showBib();
2275
+ }
2276
+ break;
2277
+ case 'blur':
2278
+ this.handleFocusLoss();
2279
+ break;
2280
+ case 'click':
2281
+ this.handleClick();
2282
+ break;
2283
+ // Do nothing
2284
+ }
2285
+ }
2286
+ }
2287
+
2288
+ handleTriggerTabIndex() {
2289
+ const focusableElementSelectors = [
2290
+ 'a',
2291
+ 'button',
2292
+ 'input:not([type="hidden"])',
2293
+ 'select',
2294
+ 'textarea',
2295
+ '[tabindex]:not([tabindex="-1"])',
2296
+ 'auro-button',
2297
+ 'auro-input',
2298
+ 'auro-hyperlink'
2299
+ ];
2300
+
2301
+ const triggerNode = this.element.querySelectorAll('[slot="trigger"]')[0];
2302
+ const triggerNodeTagName = triggerNode.tagName.toLowerCase();
2303
+
2304
+ focusableElementSelectors.forEach((selector) => {
2305
+ // Check if the trigger node element is focusable
2306
+ if (triggerNodeTagName === selector) {
2307
+ this.element.tabIndex = -1;
2308
+ return;
2309
+ }
2310
+
2311
+ // Check if any child is focusable
2312
+ if (triggerNode.querySelector(selector)) {
2313
+ this.element.tabIndex = -1;
2314
+ }
2315
+ });
2316
+ }
2317
+
2318
+ configure(elem) {
2319
+ this.element = elem;
2320
+ this.element.trigger = this.element.shadowRoot.querySelector('#trigger');
2321
+ this.element.bib = this.element.shadowRoot.querySelector('#bib');
2322
+ this.element.bibSizer = this.element.shadowRoot.querySelector('#bibSizer');
2323
+ this.element.triggerChevron = this.element.shadowRoot.querySelector('#showStateIcon');
2324
+
2325
+ document.body.append(this.element.bib);
2326
+
2327
+ this.handleTriggerTabIndex();
2328
+
2329
+ this.element.trigger.addEventListener('keydown', (event) => this.handleEvent(event));
2330
+ this.element.trigger.addEventListener('click', (event) => this.handleEvent(event));
2331
+ this.element.trigger.addEventListener('mouseenter', (event) => this.handleEvent(event));
2332
+ this.element.trigger.addEventListener('mouseleave', (event) => this.handleEvent(event));
2333
+ this.element.trigger.addEventListener('focus', (event) => this.handleEvent(event));
2334
+ this.element.trigger.addEventListener('blur', (event) => this.handleEvent(event));
2335
+ }
2336
+
2337
+ disconnect() {
2338
+ this.cleanupHideHandlers();
2339
+ this.element.cleanup?.();
2340
+
2341
+ // Remove event & keyboard listeners
2342
+ if (this.element?.trigger) {
2343
+ this.element.trigger.removeEventListener('keydown', (event) => this.handleEvent(event));
2344
+ this.element.trigger.removeEventListener('click', (event) => this.handleEvent(event));
2345
+ this.element.trigger.removeEventListener('mouseenter', (event) => this.handleEvent(event));
2346
+ this.element.trigger.removeEventListener('mouseleave', (event) => this.handleEvent(event));
2347
+ this.element.trigger.removeEventListener('focus', (event) => this.handleEvent(event));
2348
+ this.element.trigger.removeEventListener('blur', (event) => this.handleEvent(event));
2349
+ }
2350
+ }
2351
+ }
2352
+
2353
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
2354
+ // See LICENSE in the project root for license information.
2355
+
2356
+
2357
+ class AuroDependencyVersioning {
2358
+
2359
+ /**
2360
+ * Generates a unique string to be used for child auro element naming.
2361
+ * @private
2362
+ * @param {string} baseName - Defines the first part of the unique element name.
2363
+ * @param {string} version - Version of the component that will be appended to the baseName.
2364
+ * @returns {string} - Unique string to be used for naming.
2365
+ */
2366
+ generateElementName(baseName, version) {
2367
+ let result = baseName;
2368
+
2369
+ result += '-';
2370
+ result += version.replace(/[.]/g, '_');
2371
+
2372
+ return result;
2373
+ }
2374
+
2375
+ /**
2376
+ * Generates a unique string to be used for child auro element naming.
2377
+ * @param {string} baseName - Defines the first part of the unique element name.
2378
+ * @param {string} version - Version of the component that will be appended to the baseName.
2379
+ * @returns {string} - Unique string to be used for naming.
2380
+ */
2381
+ generateTag(baseName, version, tagClass) {
2382
+ const elementName = this.generateElementName(baseName, version);
2383
+ const tag = i$4`${s$1(elementName)}`;
2384
+
2385
+ if (!customElements.get(elementName)) {
2386
+ customElements.define(elementName, class extends tagClass {});
2387
+ }
2388
+
2389
+ return tag;
2390
+ }
2391
+ }
2392
+
2393
+ /**
2394
+ * @license
2395
+ * Copyright 2017 Google LLC
2396
+ * SPDX-License-Identifier: BSD-3-Clause
2397
+ */
2398
+ const t$3={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$1$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$6 = 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)}};
2399
+
2400
+ /**
2401
+ * @license
2402
+ * Copyright 2018 Google LLC
2403
+ * SPDX-License-Identifier: BSD-3-Clause
2404
+ */const e$5=e$1$1(class extends i$6{constructor(t$1){if(super(t$1),t$1.type!==t$3.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}});
2405
+
2406
+ /**
2407
+ * @license
2408
+ * Copyright 2018 Google LLC
2409
+ * SPDX-License-Identifier: BSD-3-Clause
2410
+ */const o$5=o=>o??E;
2411
+
2412
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2413
+ // See LICENSE in the project root for license information.
2414
+
2415
+
2416
+ /**
2417
+ * @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
2418
+ * @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
2419
+ * @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
2420
+ */
2421
+
2422
+ let AuroElement$1 = class AuroElement extends r {
2423
+
2424
+ // function to define props used within the scope of this component
2425
+ static get properties() {
2426
+ return {
2427
+ hidden: { type: Boolean,
2428
+ reflect: true },
2429
+ hiddenVisually: { type: Boolean,
2430
+ reflect: true },
2431
+ hiddenAudible: { type: Boolean,
2432
+ reflect: true },
2433
+ };
2434
+ }
2435
+
2436
+ /**
2437
+ * @private Function that determines state of aria-hidden
2438
+ */
2439
+ hideAudible(value) {
2440
+ if (value) {
2441
+ return 'true'
2442
+ }
2443
+
2444
+ return 'false'
2445
+ }
2446
+ };
2447
+
2448
+ var error$1 = {"role":"img","color":"currentColor","title":"","desc":"Error alert indicator.","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"error","category":"alert","deprecated":true,"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>"};
2449
+
2450
+ /* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
2451
+
2452
+ const _fetchMap$1 = new Map();
2453
+
2454
+ /**
2455
+ * A callback to parse Response body.
2456
+ *
2457
+ * @callback ResponseParser
2458
+ * @param {Fetch.Response} response
2459
+ * @returns {Promise}
2460
+ */
2461
+
2462
+ /**
2463
+ * A minimal in-memory map to de-duplicate Fetch API media requests.
2464
+ *
2465
+ * @param {String} uri
2466
+ * @param {Object} [options={}]
2467
+ * @param {ResponseParser} [options.responseParser=(response) => response.text()]
2468
+ * @returns {Promise}
2469
+ */
2470
+ const cacheFetch$1 = (uri, options = {}) => {
2471
+ const responseParser = options.responseParser || ((response) => response.text());
2472
+ if (!_fetchMap$1.has(uri)) {
2473
+ _fetchMap$1.set(uri, fetch(uri).then(responseParser));
2474
+ }
2475
+ return _fetchMap$1.get(uri);
2476
+ };
2477
+
2478
+ var styleCss$2$1 = i$3`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}: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}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}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}.label{display:flex;align-items:flex-start}.label svg{margin:0 var(--ds-size-50, 0.25rem)}.labelContainer{line-height:1.8}`;
2479
+
2480
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2481
+ // See LICENSE in the project root for license information.
2482
+
2483
+
2484
+ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
2485
+ /**
2486
+ * @attr {Boolean} onDark - Set value for on-dark version of auro-icon
2487
+ * @slot - Hidden from visibility, used for a11y if icon description is needed
2488
+ */
2489
+
2490
+ // build the component class
2491
+ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
2492
+ constructor() {
2493
+ super();
2494
+ this.onDark = false;
2495
+ }
2496
+
2497
+ // function to define props used within the scope of this component
2498
+ static get properties() {
2499
+ return {
2500
+ ...super.properties,
2501
+ onDark: {
2502
+ type: Boolean,
2503
+ reflect: true
2504
+ },
2505
+
2506
+ /**
2507
+ * @private
2508
+ */
2509
+ svg: {
2510
+ attribute: false,
2511
+ reflect: true
2512
+ }
2513
+ };
2514
+ }
2515
+
2516
+ static get styles() {
2517
+ return i$3`
2518
+ ${styleCss$2$1}
2519
+ `;
2520
+ }
2521
+
2522
+ /**
2523
+ * Async function to fetch requested icon from npm CDN.
2524
+ * @private
2525
+ * @param {string} category - Icon category.
2526
+ * @param {string} name - Icon name.
2527
+ * @returns {SVGElement} DOM - Ready HTML to be appended.
2528
+ */
2529
+ async fetchIcon(category, name) {
2530
+ let iconHTML = '';
2531
+
2532
+ if (category === 'logos') {
2533
+ iconHTML = await cacheFetch$1(`${this.uri}/${category}/${name}.svg`);
2534
+ } else {
2535
+ iconHTML = await cacheFetch$1(`${this.uri}/icons/${category}/${name}.svg`);
2536
+ }
2537
+
2538
+ const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
2539
+
2540
+ return dom.body.querySelector('svg');
2541
+ }
2542
+
2543
+ // lifecycle function
2544
+ async firstUpdated() {
2545
+ if (!this.customSvg) {
2546
+ const svg = await this.fetchIcon(this.category, this.name);
2547
+
2548
+ if (svg) {
2549
+ this.svg = svg;
2550
+ } else if (!svg) {
2551
+ const penDOM = new DOMParser().parseFromString(error$1.svg, 'text/html');
2552
+
2553
+ this.svg = penDOM.body.firstChild;
2554
+ }
2555
+ }
2556
+ }
2557
+ };
2558
+
2559
+ var tokensCss$1$1 = i$3`:host{--ds-auro-icon-color: var(--ds-color-icon-primary-default, $ds-color-icon-primary-default);--ds-auro-icon-size: var(--ds-size-300, $ds-size-300)}`;
2560
+
2561
+ var colorCss$2$1 = i$3`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color: var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color: var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color: var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color: var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color: var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color: var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color: var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-inverse, #f2c153)}`;
2562
+
2563
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2564
+ // See LICENSE in the project root for license information.
2565
+
2566
+
2567
+ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
2568
+ /**
2569
+ * auro-icon provides users a way to use the Auro Icons by simply passing in the category and name.
2570
+ *
2571
+ * @attr {String} category - The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
2572
+ * @attr {String} name - The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage
2573
+ * @attr {Boolean} customColor - Removes primary selector.
2574
+ * @attr {Boolean} customSvg - When true, auro-icon will render a custom SVG inside the default slot.
2575
+ * @attr {Boolean} label - Exposes content in slot as icon label.
2576
+ * @attr {Boolean} primary - DEPRECATED: Sets the icon to use the baseline primary icon style.
2577
+ * @attr {Boolean} accent - Sets the icon to use the accent style.
2578
+ * @attr {Boolean} emphasis - Sets the icon to use the emphasis style.
2579
+ * @attr {Boolean} disabled - Sets the icon to use the disabled style.
2580
+ * @attr {Boolean} error - Sets the icon to use the error style.
2581
+ * @attr {Boolean} info - Sets the icon to use the info style.
2582
+ * @attr {Boolean} secondary - Sets the icon to use the secondary style.
2583
+ * @attr {Boolean} tertiary - Sets the icon to use the tertiary style.
2584
+ * @attr {Boolean} subtle - Sets the icon to use the subtle style.
2585
+ * @attr {Boolean} success - Sets the icon to use the success style.
2586
+ * @attr {Boolean} warning - Sets the icon to use the warning style.
2587
+ * @attr {String} ariaHidden - Set aria-hidden value. Default is `true`. Option is `false`.
2588
+ * @attr {String} uri - Set the uri for CDN used when fetching icons
2589
+ * @slot - Hidden from visibility, used for a11y if icon description is needed.
2590
+ * @slot svg - Used for custom SVG content.
2591
+ */
2592
+
2593
+ // build the component class
2594
+ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
2595
+ constructor() {
2596
+ super();
2597
+
2598
+ this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
2599
+
2600
+ this.privateDefaults();
2601
+ }
2602
+
2603
+ /**
2604
+ * Internal Defaults.
2605
+ * @private
2606
+ * @returns {void}
2607
+ */
2608
+ privateDefaults() {
2609
+ this.accent = false;
2610
+ this.customColor = false;
2611
+ this.customSvg = false;
2612
+ this.disabled = false;
2613
+ this.emphasis = false;
2614
+ this.error = false;
2615
+ this.info = false;
2616
+ this.label = false;
2617
+ this.primary = false;
2618
+ this.secondary = false;
2619
+ this.subtle = false;
2620
+ this.success = false;
2621
+ this.tertiary = false;
2622
+ this.warning = false;
2623
+ this.runtimeUtils = new AuroLibraryRuntimeUtils();
2624
+ }
2625
+
2626
+ // function to define props used within the scope of this component
2627
+ static get properties() {
2628
+ return {
2629
+ ...super.properties,
2630
+ accent: {
2631
+ type: Boolean,
2632
+ reflect: true
2633
+ },
2634
+ ariaHidden: {
2635
+ type: String,
2636
+ reflect: true
2637
+ },
2638
+ category: {
2639
+ type: String,
2640
+ reflect: true
2641
+ },
2642
+ customColor: {
2643
+ type: Boolean
2644
+ },
2645
+ customSvg: {
2646
+ type: Boolean
2647
+ },
2648
+ disabled: {
2649
+ type: Boolean,
2650
+ reflect: true
2651
+ },
2652
+ emphasis: {
2653
+ type: Boolean,
2654
+ reflect: true
2655
+ },
2656
+ error: {
2657
+ type: Boolean,
2658
+ reflect: true
2659
+ },
2660
+ info: {
2661
+ type: Boolean,
2662
+ reflect: true
2663
+ },
2664
+ label: {
2665
+ type: Boolean,
2666
+ reflect: true
2667
+ },
2668
+ name: {
2669
+ type: String,
2670
+ reflect: true
2671
+ },
2672
+ primary: {
2673
+ type: Boolean,
2674
+ reflect: true
2675
+ },
2676
+ secondary: {
2677
+ type: Boolean,
2678
+ reflect: true
2679
+ },
2680
+ subtle: {
2681
+ type: Boolean,
2682
+ reflect: true
2683
+ },
2684
+ success: {
2685
+ type: Boolean,
2686
+ reflect: true
2687
+ },
2688
+ tertiary: {
2689
+ type: Boolean,
2690
+ reflect: true
2691
+ },
2692
+ uri: {
2693
+ type: String
2694
+ },
2695
+ warning: {
2696
+ type: Boolean,
2697
+ reflect: true
2698
+ }
2699
+ };
2700
+ }
2701
+
2702
+ static get styles() {
2703
+ return [
2704
+ super.styles,
2705
+ i$3`${tokensCss$1$1}`,
2706
+ i$3`${styleCss$2$1}`,
2707
+ i$3`${colorCss$2$1}`
2708
+ ];
2709
+ }
2710
+
2711
+ /**
2712
+ * This will register this element with the browser.
2713
+ * @param {string} [name="auro-icon"] - The name of element that you want to register to.
2714
+ *
2715
+ * @example
2716
+ * AuroIcon.register("custom-icon") // this will register this element to <custom-icon/>
2717
+ *
2718
+ */
2719
+ static register(name = "auro-icon") {
2720
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
2721
+ }
2722
+
2723
+ connectedCallback() {
2724
+ super.connectedCallback();
2725
+
2726
+ // Add the tag name as an attribute if it is different than the component name
2727
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-icon');
2728
+ }
2729
+
2730
+ /**
2731
+ * @returns {void} Exposes CSS parts for styling from parent components.
2732
+ */
2733
+ exposeCssParts() {
2734
+ this.setAttribute('exportparts', 'svg:iconSvg');
2735
+ }
2736
+
2737
+ // function that renders the HTML and CSS into the scope of the component
2738
+ render() {
2739
+ const a11y = {
2740
+ 'labelContainer': true,
2741
+ 'util_displayHiddenVisually': !this.label
2742
+ };
2743
+
2744
+ const classes = {
2745
+ 'label': this.label
2746
+ };
2747
+
2748
+ return x`
2749
+ <div
2750
+ class="${e$5(classes)}"
2751
+ title="${o$5(this.title || undefined)}">
2752
+ <span aria-hidden="${o$5(this.ariaHidden ? this.ariaHidden : true)}" part="svg">
2753
+ ${this.customSvg ? x`
2754
+ <slot name="svg"></slot>
2755
+ ` : x`
2756
+ ${this.svg}
2757
+ `
2758
+ }
2759
+ </span>
2760
+
2761
+ <div class="${e$5(a11y)}">
2762
+ <slot></slot>
2763
+ </div>
2764
+ </div>
2765
+ `;
2766
+ }
2767
+ };
2768
+
2769
+ var iconVersion$1 = '6.1.1';
2770
+
2771
+ var styleCss$1$1 = i$3`:host{position:relative}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);white-space:normal}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
2772
+
2773
+ var colorCss$1$1 = i$3`.label{color:var(--ds-auro-dropdown-label-text-color)}.trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}.trigger:focus-within:not(:active){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);box-shadow:inset 0 0 0 1px var(--ds-color-border-ui-focus-default, #2c67b5)}.trigger:hover{--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}.helpText{color:var(--ds-auro-dropdown-help-text-color)}:host([disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-ui-disabled-default, #adadad);--ds-auro-dropdown-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host([common]),:host([bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-primary-default, #585e67)}:host([common]) .trigger:active,:host([common]) .trigger:focus-within,:host([bordered]) .trigger:active,:host([bordered]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host([error]){--ds-auro-dropdown-help-text-color: var(--ds-color-text-error-default, #cc1816);--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-error-default, #cc1816)}:host([error]) .trigger{box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-border-color)}:host([error]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);box-shadow:none}:host([error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-border-color)}:host([disabled][common]),:host([disabled][bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}`;
2774
+
2775
+ var tokensCss$3 = i$3`:host{--ds-auro-dropdown-help-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-label-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-popover-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-popover-border-color: transparent;--ds-auro-dropdown-popover-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-trigger-border-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-color-text-primary-default, #2a2a2a)}`;
2776
+
2777
+ var styleCss$4 = i$3`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin-top:var(--ds-size-50, 0.25rem)}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset}:host([data-show]){display:block}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common]) .container,:host([inset]) .container{padding:var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
2778
+
2779
+ var colorCss$4 = i$3`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
2780
+
2781
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2782
+ // See LICENSE in the project root for license information.
2783
+
2784
+
2785
+
2786
+ const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
2787
+ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
2788
+ 'lg',
2789
+ 'md',
2790
+ 'sm',
2791
+ 'xs',
2792
+ ];
2793
+
2794
+ /**
2795
+ * @attr { Boolean } common - If declared, will apply all styles for the common theme.
2796
+ * @attr { Boolean } rounded - If declared, will apply border-radius to the bib.
2797
+ * @attr { Boolean } inset - If declared, will apply extra padding to bib content.
2798
+ * @prop { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
2799
+ * @csspart bibContainer - Apply css to the bib container.
2800
+ */
2801
+
2802
+ class AuroDropdownBib extends r {
2803
+
2804
+ constructor() {
2805
+ super();
2806
+
2807
+ /**
2808
+ * @private
2809
+ */
2810
+ this._mobileBreakpointValue = undefined;
2811
+ }
2812
+
2813
+ static get styles() {
2814
+ return [
2815
+ styleCss$4,
2816
+ colorCss$4,
2817
+ tokensCss$3
2818
+ ];
2819
+ }
2820
+
2821
+ static get properties() {
2822
+ return {
2823
+ common: {
2824
+ type: Boolean,
2825
+ reflect: true
2826
+ },
2827
+ inset: {
2828
+ type: Boolean,
2829
+ reflect: true
2830
+ },
2831
+ rounded: {
2832
+ type: Boolean,
2833
+ reflect: true
2834
+ },
2835
+ };
2836
+ }
2837
+
2838
+ set mobileFullscreenBreakpoint(value) {
2839
+ // verify the defined breakpoint is valid and exit out if not
2840
+ const validatedValue = DESIGN_TOKEN_BREAKPOINT_OPTIONS.includes(value) ? value : undefined;
2841
+ if (!validatedValue) {
2842
+ this._mobileBreakpointValue = undefined;
2843
+ } else {
2844
+ // get the pixel value for the defined breakpoint
2845
+ const docStyle = getComputedStyle(document.documentElement);
2846
+ this._mobileBreakpointValue = docStyle.getPropertyValue(DESIGN_TOKEN_BREAKPOINT_PREFIX + value);
2847
+ }
2848
+ }
2849
+
2850
+ get mobileFullscreenBreakpoint() {
2851
+ return this._mobileBreakpointValue;
2852
+ }
2853
+
2854
+ // function that renders the HTML and CSS into the scope of the component
2855
+ render() {
2856
+ return u$1`
2857
+ <div class="container" part="bibContainer">
2858
+ <slot></slot>
2859
+ </div>
2860
+ `;
2861
+ }
2862
+ }
2863
+
2864
+ // default internal definition
2865
+ if (!customElements.get("auro-dropdownbib")) {
2866
+ customElements.define("auro-dropdownbib", AuroDropdownBib);
2867
+ }
2868
+
2869
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2870
+ // See LICENSE in the project root for license information.
2871
+
2872
+
2873
+ /**
2874
+ * @attr { Boolean } bordered - If declared, applies a border around the trigger slot.
2875
+ * @attr { Boolean } common - If declared, the dropdown will be styled with the common theme.
2876
+ * @attr { Boolean } chevron - If declared, the dropdown displays an display state chevron on the right.
2877
+ * @attr { Boolean } disabled - If declared, the dropdown is not interactive.
2878
+ * @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
2879
+ * @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
2880
+ * @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
2881
+ * @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
2882
+ * @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
2883
+ * @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
2884
+ * @attr { Boolean } noToggle - If declared, the trigger will only show the the dropdown bib.
2885
+ * @attr { Boolean } focusShow - if declared, the the bib will display when focus is applied to the trigger.
2886
+ * @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
2887
+ * @attr { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
2888
+ * @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
2889
+ * @slot - Default slot for the popover content.
2890
+ * @slot label - Defines the content of the label.
2891
+ * @slot helpText - Defines the content of the helpText.
2892
+ * @slot trigger - Defines the content of the trigger.
2893
+ * @csspart trigger - The trigger content container.
2894
+ * @csspart chevron - The collapsed/expanded state icon container.
2895
+ * @csspart helpText - The helpText content container.
2896
+ * @csspart popover - The bib content container.
2897
+ * @event auroDropdown-triggerClick - Notifies that the trigger has been clicked.
2898
+ * @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
2899
+ */
2900
+ class AuroDropdown extends r {
2901
+ constructor() {
2902
+ super();
2903
+
2904
+ this.isPopoverVisible = false;
2905
+ this.matchWidth = false;
2906
+ this.noHideOnThisFocusLoss = false;
2907
+
2908
+ this.privateDefaults();
2909
+ }
2910
+
2911
+ /**
2912
+ * @private
2913
+ * @returns {void} Internal defaults.
2914
+ */
2915
+ privateDefaults() {
2916
+ this.bordered = false;
2917
+ this.chevron = false;
2918
+ this.disabled = false;
2919
+ this.error = false;
2920
+ this.inset = false;
2921
+ this.placement = 'bottom-start';
2922
+ this.rounded = false;
2923
+ this.tabIndex = 0;
2924
+ this.noToggle = false;
2925
+
2926
+ /**
2927
+ * @private
2928
+ */
2929
+ this.runtimeUtils = new AuroLibraryRuntimeUtils();
2930
+
2931
+ /**
2932
+ * @private
2933
+ */
2934
+ this.floater = new AuroFloatingUI();
2935
+
2936
+ /**
2937
+ * @private
2938
+ */
2939
+ this.floaterConfig = {
2940
+ placement: 'bottom-start',
2941
+ flip: true,
2942
+ autoPlacement: false,
2943
+ offset: 0,
2944
+ };
2945
+
2946
+ /**
2947
+ * Generate unique names for dependency components.
2948
+ */
2949
+ const versioning = new AuroDependencyVersioning();
2950
+ this.iconTag = versioning.generateTag('auro-icon', iconVersion$1, AuroIcon$1);
2951
+ }
2952
+
2953
+ /**
2954
+ * Public method to hide the dropdown.
2955
+ * @returns {void}
2956
+ */
2957
+ hide() {
2958
+ this.floater.hideBib();
2959
+ }
2960
+
2961
+ /**
2962
+ * Public method to show the dropdown.
2963
+ * @returns {void}
2964
+ */
2965
+ show() {
2966
+ this.floater.showBib();
2967
+ }
2968
+
2969
+ // function to define props used within the scope of this component
2970
+ static get properties() {
2971
+ return {
2972
+ bordered: {
2973
+ type: Boolean,
2974
+ reflect: true
2975
+ },
2976
+ chevron: {
2977
+ type: Boolean,
2978
+ reflect: true
2979
+ },
2980
+ disabled: {
2981
+ type: Boolean,
2982
+ reflect: true
2983
+ },
2984
+ error: {
2985
+ type: Boolean,
2986
+ reflect: true
2987
+ },
2988
+ focusShow: {
2989
+ type: Boolean,
2990
+ reflect: true
2991
+ },
2992
+ hoverToggle: {
2993
+ type: Boolean,
2994
+ reflect: true
2995
+ },
2996
+ inset: {
2997
+ type: Boolean,
2998
+ reflect: true
2999
+ },
3000
+ matchWidth: {
3001
+ type: Boolean,
3002
+ reflect: true
3003
+ },
3004
+ rounded: {
3005
+ type: Boolean,
3006
+ reflect: true
3007
+ },
3008
+ common: {
3009
+ type: Boolean,
3010
+ reflect: true
3011
+ },
3012
+ noToggle: {
3013
+ type: Boolean,
3014
+ reflect: true
3015
+ },
3016
+ noHideOnThisFocusLoss: {
3017
+ type: Boolean,
3018
+ reflect: true
3019
+ },
3020
+ isPopoverVisible: { type: Boolean },
3021
+ onSlotChange: {
3022
+ type: Function,
3023
+ reflect: false
3024
+ },
3025
+ mobileFullscreenBreakpoint: {
3026
+ type: String,
3027
+ reflect: true,
3028
+ },
3029
+
3030
+ /**
3031
+ * @private
3032
+ */
3033
+ dropdownWidth: { type: Number },
3034
+
3035
+ /**
3036
+ * @private
3037
+ */
3038
+ placement: { type: String },
3039
+
3040
+ /**
3041
+ * @private
3042
+ */
3043
+ tabIndex: { type: Number }
3044
+ };
3045
+ }
3046
+
3047
+ static get styles() {
3048
+ return [
3049
+ styleCss$1$1,
3050
+ colorCss$1$1,
3051
+ tokensCss$3
3052
+ ];
3053
+ }
3054
+
3055
+ /**
3056
+ * This will register this element with the browser.
3057
+ * @param {string} [name="auro-dropdown"] - The name of element that you want to register to.
3058
+ *
3059
+ * @example
3060
+ * AuroDropdown.register("custom-dropdown") // this will register this element to <custom-dropdown/>
3061
+ *
3062
+ */
3063
+ static register(name = "auro-dropdown") {
3064
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroDropdown);
3065
+ }
3066
+
3067
+ connectedCallback() {
3068
+ super.connectedCallback();
3069
+ }
3070
+
3071
+ disconnectedCallback() {
3072
+ super.disconnectedCallback();
3073
+ }
3074
+
3075
+ updated(changedProperties) {
3076
+ this.floater.handleUpdate(changedProperties);
3077
+
3078
+ if (changedProperties.has('mobileFullscreenBreakpoint')) {
3079
+ this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
3080
+ }
3081
+ }
3082
+
3083
+ firstUpdated() {
3084
+ this.floater.configure(this);
3085
+ this.bibContent = this.floater.element.bib;
3086
+
3087
+ // Add the tag name as an attribute if it is different than the component name
3088
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
3089
+ }
3090
+
3091
+ /**
3092
+ * Exposes CSS parts for styling from parent components.
3093
+ * @private
3094
+ * @returns {void}
3095
+ */
3096
+ exposeCssParts() {
3097
+ this.setAttribute('exportparts', 'trigger:dropdownTrigger, chevron:dropdownChevron, helpText:dropdownHelpText, size:dropdownSize');
3098
+ }
3099
+
3100
+ /**
3101
+ * Determines if content is within a custom slot.
3102
+ * @private
3103
+ * @param {HTMLElement} element - The element to check.
3104
+ * @returns {Boolean}
3105
+ */
3106
+ isCustomSlotContent(element) {
3107
+ let currentElement = element;
3108
+
3109
+ let inCustomSlot = false;
3110
+
3111
+ while (currentElement) {
3112
+ currentElement = currentElement.parentElement;
3113
+
3114
+ if (currentElement && currentElement.hasAttribute('slot')) {
3115
+ inCustomSlot = true;
3116
+ break;
3117
+ }
3118
+ }
3119
+
3120
+ return inCustomSlot;
3121
+ }
3122
+
3123
+ /**
3124
+ * Handles the default slot change event and updates the content.
3125
+ *
3126
+ * This method retrieves all nodes assigned to the default slot of the event target and appends them
3127
+ * to the `bibContent` element. If a callback function `onSlotChange` is defined, it is invoked to
3128
+ * notify about the slot change.
3129
+ *
3130
+ * @private
3131
+ * @method handleDefaultSlot
3132
+ * @param {Event} event - The event object representing the slot change.
3133
+ * @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
3134
+ */
3135
+ handleDefaultSlot(event) {
3136
+ [...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
3137
+
3138
+ if (this.onSlotChange) {
3139
+ this.onSlotChange();
3140
+ }
3141
+ }
3142
+
3143
+ // function that renders the HTML and CSS into the scope of the component
3144
+ render() {
3145
+ return u$1`
3146
+ <div>
3147
+ <div
3148
+ id="trigger"
3149
+ class="trigger"
3150
+ part="trigger"
3151
+ role="button"
3152
+ aria-labelledby="triggerLabel"
3153
+ aria-controls="popover"
3154
+ tabindex="${this.tabIndex}"
3155
+ >
3156
+ <div class="triggerContentWrapper">
3157
+ <label class="label" id="triggerLabel">
3158
+ <slot name="label"></slot>
3159
+ </label>
3160
+ <div class="triggerContent">
3161
+ <slot
3162
+ name="trigger"
3163
+ @slotchange="${() => {this.floater.handleTriggerTabIndex(); }}"></slot>
3164
+ </div>
3165
+ </div>
3166
+ ${this.chevron || this.common ? u$1`
3167
+ <div
3168
+ id="showStateIcon"
3169
+ part="chevron">
3170
+ <${this.iconTag}
3171
+ category="interface"
3172
+ name="chevron-down"
3173
+ customColor
3174
+ ?disabled=${this.disabled}
3175
+ >
3176
+ </${this.iconTag}>
3177
+ </div>
3178
+ ` : undefined }
3179
+ </div>
3180
+ <div
3181
+ class="helpText"
3182
+ part="helpText">
3183
+ <slot name="helpText"></slot>
3184
+ </div>
3185
+ <div class="slotContent">
3186
+ <slot @slotchange="${this.handleDefaultSlot}"></slot>
3187
+ </div>
3188
+ <div id="bibSizer" part="size"></div>
3189
+ <auro-dropdownbib
3190
+ id="bib"
3191
+ role="tooltip"
3192
+ ?common="${this.common}"
3193
+ ?rounded="${this.common || this.rounded}"
3194
+ ?inset="${this.common || this.inset}">
3195
+ </auro-dropdownbib>
3196
+ </div>
3197
+ `;
3198
+ }
3199
+ }
3200
+
3201
+ AuroDropdown.register();
3202
+
3203
+ var dropdownVersion = '3.0.0';
3204
+
3205
+ var styleCss$3 = i$b`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[slot=trigger]{width:100%;padding:0;border:0;cursor:pointer;font-family:inherit;font-size:inherit;text-align:left}[slot=trigger] .nestingSpacer{display:none}:host [auro-dropdown]{position:relative}:host [auro-dropdown]::part(trigger){max-height:var(--ds-size-300, 1.5rem)}:host [auro-dropdown]::part(popover){max-width:-webkit-fill-available;overflow-y:scroll}:host([disabled]) *{user-select:none}.outerWrapper{position:relative}auro-menuoption{pointer-events:none}.menuWrapper{padding:var(--ds-size-50, 0.25rem) 0}.selectElement-helpText{margin:var(--ds-size-50, 0.25rem) 0;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:1rem}`;
3206
+
3207
+ var colorCss$3 = i$b`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host [auro-dropdown]::part(trigger):hover{--ds-auro-dropdown-trigger-container-color: rgba(0 0 0 / 0.06)}:host([disabled]) *{color:var(--ds-color-text-ui-disabled-default, #adadad)}.placeholder{color:var(--ds-auro-select-placeholder-text-color)}`;
3208
+
3209
+ var tokensCss$2 = i$b`:host{--ds-auro-select-placeholder-text-color: var(--ds-color-text-secondary-default, $ds-color-text-secondary-default)}`;
3210
+
3211
+ // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3212
+ // See LICENSE in the project root for license information.
3213
+
3214
+
3215
+ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
3216
+ /**
3217
+ * The auro-select element is a wrapper for auro-dropdown and auro-menu to create a dropdown menu control.
3218
+ *
3219
+ * @attr {String} validity - Specifies the `validityState` this element is in.
3220
+ * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
3221
+ * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
3222
+ * @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
3223
+ * @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
3224
+ * @attr {Boolean} noValidate - If set, disables auto-validation on blur.
3225
+ * @attr {Boolean} required - Populates the `required` attribute on the element. Used for client-side validation.
3226
+ * @attr {Boolean} flexMenuWidth - If set, makes dropdown bib width match the size of the content, rather than the width of the trigger.
3227
+ * @prop {String} placeholder - Define placeholder text to display before a value is manually selected.
3228
+ * @prop {String} value - Value selected for the component.
3229
+ * @prop {Boolean} disabled - When attribute is present element shows disabled state.
3230
+ * @prop {Boolean} noCheckmark - When true, checkmark on selected option will no longer be present.
3231
+ * @attr {Object} optionSelected - Specifies the current selected menuOption.
3232
+ * @slot - Default slot for the menu content.
3233
+ * @slot label - Defines the content of the label.
3234
+ * @slot helpText - Defines the content of the helpText.
3235
+ * @event auroSelect-valueSet - Notifies that the component has a new value set.
3236
+ * @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
3237
+ * @csspart helpText - Apply CSS to the help text.
3238
+ */
3239
+
3240
+ // build the component class
3241
+ class AuroSelect extends r$4 {
3242
+ constructor() {
3243
+ super();
3244
+
3245
+ this.placeholder = 'Please select option';
3246
+ this.optionSelected = undefined;
3247
+ this.validity = undefined;
3248
+
3249
+ const idLength = 36;
3250
+ const idSubstrEnd = 8;
3251
+ const idSubstrStart = 2;
3252
+
3253
+ /**
3254
+ * @private
3255
+ */
3256
+ this.uniqueId = Math.random().
3257
+ toString(idLength).
3258
+ substring(idSubstrStart, idSubstrEnd);
3259
+
3260
+ /**
3261
+ * @private
3262
+ */
3263
+ this.validation = new AuroFormValidation();
3264
+
3265
+ /**
3266
+ * @private
3267
+ */
3268
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
3269
+
3270
+ /**
3271
+ * Generate unique names for dependency components.
3272
+ */
3273
+ const versioning = new AuroDependencyVersioning$1();
3274
+
3275
+ /**
3276
+ * @private
3277
+ */
3278
+ this.dropdownTag = versioning.generateTag('auro-dropdown', dropdownVersion, AuroDropdown);
3279
+ }
3280
+
3281
+ /**
3282
+ * @private
3283
+ * @returns {void} Internal defaults.
3284
+ */
3285
+ privateDefaults() {
3286
+ this.options = [];
3287
+ this.optionActive = null;
3288
+ }
3289
+
3290
+ // This function is to define props used within the scope of this component
3291
+ // Be sure to review https://lit-element.polymer-project.org/guide/properties#reflected-attributes
3292
+ // to understand how to use reflected attributes with your property settings.
3293
+ static get properties() {
3294
+ return {
3295
+ // ...super.properties,
3296
+ optionSelected: {
3297
+ type: Object
3298
+ },
3299
+ value: {
3300
+ type: String,
3301
+ reflect: true
3302
+ },
3303
+ noValidate: {
3304
+ type: Boolean,
3305
+ reflect: true
3306
+ },
3307
+ required: {
3308
+ type: Boolean,
3309
+ reflect: true
3310
+ },
3311
+ error: {
3312
+ type: String,
3313
+ reflect: true
3314
+ },
3315
+ setCustomValidity: {
3316
+ type: String
3317
+ },
3318
+ setCustomValidityCustomError: {
3319
+ type: String
3320
+ },
3321
+ setCustomValidityValueMissing: {
3322
+ type: String
3323
+ },
3324
+ validity: {
3325
+ type: String,
3326
+ reflect: true
3327
+ },
3328
+ disabled: {
3329
+ type: Boolean,
3330
+ reflect: true
3331
+ },
3332
+ noCheckmark: {
3333
+ type: Boolean,
3334
+ reflect: true
3335
+ },
3336
+ flexMenuWidth: {
3337
+ type: Boolean,
3338
+ reflect: true
3339
+ },
3340
+ placeholder: { type: String },
3341
+
3342
+ /**
3343
+ * @private
3344
+ */
3345
+ options: { type: Array },
3346
+
3347
+ /**
3348
+ * @private
3349
+ */
3350
+ optionActive: { type: Object },
3351
+ };
3352
+ }
3353
+
3354
+ static get styles() {
3355
+ return [
3356
+ styleCss$3,
3357
+ colorCss$3,
3358
+ tokensCss$2
3359
+ ];
3360
+ }
3361
+
3362
+ /**
3363
+ * Binds all behavior needed to the dropdown after rendering.
3364
+ * @private
3365
+ * @returns {void}
3366
+ */
3367
+ configureDropdown() {
3368
+ this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
3369
+ this.menuWrapper = this.dropdown.querySelector('.menuWrapper');
3370
+
3371
+ if (this.customBibWidth) {
3372
+ this.dropdown.dropdownWidth = this.customBibWidth;
3373
+ }
3374
+
3375
+ // Exposes the CSS parts from the dropdown for styling
3376
+ this.dropdown.exposeCssParts();
3377
+ }
3378
+
3379
+ /**
3380
+ * This will register this element with the browser.
3381
+ * @param {string} [name="auro-select"] - The name of element that you want to register to.
3382
+ *
3383
+ * @example
3384
+ * AuroSelect.register("custom-select") // this will register this element to <custom-select/>
3385
+ *
3386
+ */
3387
+ static register(name = "auro-select") {
3388
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroSelect);
3389
+ }
3390
+
3391
+ /**
3392
+ * Updates the displayed value in an Auro dropdown component based on the provided option.
3393
+ * @param {string|HTMLElement} option - The option to display. If a string, a new span element with the value string is created. If an HTMLElement, the selected option is cloned and non-styling attributes are removed.
3394
+ * @private
3395
+ * @returns {void}
3396
+ */
3397
+ updateDisplayedValue(option) {
3398
+ const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
3399
+
3400
+ // remove all existing rendered value(s)
3401
+ triggerContentEl.querySelectorAll('auro-menuoption, [valuestr], [auro-menuoption]').forEach((elm) => {
3402
+ elm.remove();
3403
+ });
3404
+
3405
+ if (typeof option === 'string' && option !== this.placeholder) {
3406
+ // create a new span element with the value string
3407
+ const valueElem = document.createElement('span');
3408
+ valueElem.setAttribute('valuestr', true);
3409
+ valueElem.textContent = option;
3410
+
3411
+ // append the new element into the trigger content
3412
+ triggerContentEl.appendChild(valueElem);
3413
+ } else if (typeof option === 'object') {
3414
+ // clone the selected option and remove attributes that style it
3415
+ const clone = option.cloneNode(true);
3416
+ clone.removeAttribute('selected');
3417
+ clone.removeAttribute('class');
3418
+
3419
+ // insert the non-styled clone into the trigger
3420
+ triggerContentEl.appendChild(clone);
3421
+ }
3422
+ }
3423
+
3424
+ /**
3425
+ * Binds all behavior needed to the menu after rendering.
3426
+ * @private
3427
+ * @returns {void}
3428
+ */
3429
+ configureMenu() {
3430
+ this.menu = this.querySelector('auro-menu, [auro-menu]');
3431
+ // racing condition on custom-select with custom-menu
3432
+ if (!this.menu) {
3433
+ setTimeout(() => {
3434
+ this.configureMenu();
3435
+ }, 0);
3436
+ return;
3437
+ }
3438
+
3439
+ this.menu.setAttribute('aria-hidden', 'true');
3440
+
3441
+ this.generateOptionsArray();
3442
+
3443
+ this.addEventListener('auroMenu-activatedOption', (evt) => {
3444
+ this.optionActive = evt.detail;
3445
+ });
3446
+
3447
+ this.menu.addEventListener('selectedOption', () => {
3448
+ this.optionSelected = this.menu.optionSelected;
3449
+ this.value = this.optionSelected.value;
3450
+
3451
+ this.updateDisplayedValue(this.optionSelected);
3452
+
3453
+ if (this.dropdown.isPopoverVisible) {
3454
+ this.dropdown.hide();
3455
+ }
3456
+ });
3457
+
3458
+ /**
3459
+ * When this.value is preset auro-menu.selectByValue(this.value) is called.
3460
+ * However, if this.value does not match one of the menu options,
3461
+ * auro-menu will notify via event. In this case, clear out this.value
3462
+ * so that it is not storing an invalid value which can then later be returned
3463
+ * with `auro-select.value`.
3464
+ */
3465
+ this.menu.addEventListener('auroMenu-selectValueFailure', () => {
3466
+ this.menu.optionSelected = undefined;
3467
+ this.optionSelected = this.menu.optionSelected;
3468
+
3469
+ this.validity = 'badInput';
3470
+
3471
+ // Capitalizes the first letter of each word in this.value string
3472
+ const valueStr = this.value.replace(/(^\w{1})|(\s+\w{1})/gu, (letter) => letter.toUpperCase());
3473
+
3474
+ // Pass the new string to the trigger content
3475
+ this.updateDisplayedValue(valueStr);
3476
+ });
3477
+
3478
+ this.menu.addEventListener('auroMenu-selectValueReset', () => {
3479
+ // set the trigger content back to the placeholder
3480
+ this.updateDisplayedValue(this.placeholder);
3481
+
3482
+ this.optionSelected = undefined;
3483
+ this.value = undefined;
3484
+
3485
+ this.validation.validate(this);
3486
+ });
3487
+ }
3488
+
3489
+ /**
3490
+ * Binds all behavior needed to the component after rendering.
3491
+ * @private
3492
+ * @returns {void}
3493
+ */
3494
+ configureSelect() {
3495
+ // inject menu into menuWrapper
3496
+ this.menuWrapper.append(this.menu);
3497
+
3498
+ this.addEventListener('keydown', (evt) => {
3499
+ if (evt.key === 'ArrowUp') {
3500
+ evt.preventDefault();
3501
+
3502
+ this.dropdown.show();
3503
+
3504
+ if (this.dropdown.isPopoverVisible) {
3505
+ this.menu.selectNextItem('up');
3506
+ }
3507
+ }
3508
+
3509
+ if (evt.key === 'ArrowDown') {
3510
+ evt.preventDefault();
3511
+
3512
+ this.dropdown.show();
3513
+
3514
+ if (this.dropdown.isPopoverVisible) {
3515
+ this.menu.selectNextItem('down');
3516
+ }
3517
+ }
3518
+
3519
+ if (evt.key === 'Enter') {
3520
+ if (!this.dropdown.isPopoverVisible) {
3521
+ evt.preventDefault();
3522
+ this.menu.makeSelection();
3523
+ }
3524
+ }
3525
+
3526
+ if (evt.key === 'Tab') {
3527
+ this.dropdown.hide();
3528
+ }
3529
+ });
3530
+
3531
+ this.addEventListener('focusin', this.handleFocusin);
3532
+
3533
+ this.addEventListener('blur', () => {
3534
+ this.validation.validate(this);
3535
+ });
3536
+
3537
+ this.labelForSr();
3538
+ }
3539
+
3540
+ /**
3541
+ * Function to support @focusin event.
3542
+ * @private
3543
+ * @return {void}
3544
+ */
3545
+ handleFocusin() {
3546
+
3547
+ /**
3548
+ * The input is considered to be in it's initial state based on
3549
+ * if this.value === undefined. The first time we interact with the
3550
+ * input manually, by applying focusin, we need to flag the
3551
+ * input as no longer in the initial state.
3552
+ */
3553
+ if (this.value === undefined) {
3554
+ this.value = '';
3555
+ this.removeEventListener('focusin', this.handleFocusin);
3556
+ }
3557
+ }
3558
+
3559
+ /**
3560
+ * Determines the element error state based on the `required` attribute and input value.
3561
+ * @private
3562
+ * @returns {void}
3563
+ */
3564
+ generateOptionsArray() {
3565
+ if (this.menu) {
3566
+ this.options = [...this.menu.querySelectorAll('auro-menuoption, [auro-menuoption]')];
3567
+ } else {
3568
+ this.options = [];
3569
+ }
3570
+ }
3571
+
3572
+ /**
3573
+ * Handle element attributes on update.
3574
+ * @private
3575
+ * @returns {void}
3576
+ */
3577
+ performUpdate() {
3578
+ super.performUpdate();
3579
+
3580
+ if (this.validity && this.validity !== 'valid') {
3581
+ this.dropdown.setAttribute('error', '');
3582
+ } else {
3583
+ this.dropdown.removeAttribute('error');
3584
+ }
3585
+
3586
+ if (this.disabled) {
3587
+ this.dropdown.setAttribute('disabled', '');
3588
+ } else if (!this.disabled) {
3589
+ this.dropdown.removeAttribute('disabled');
3590
+ }
3591
+
3592
+ if (this.noCheckmark) {
3593
+ this.menu.setAttribute('nocheckmark', '');
3594
+ }
3595
+ }
3596
+
3597
+ // lifecycle runs only after the element's DOM has been updated the first time
3598
+ firstUpdated() {
3599
+ // Add the tag name as an attribute if it is different than the component name
3600
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
3601
+
3602
+ this.configureMenu();
3603
+ this.configureDropdown();
3604
+ this.configureSelect();
3605
+
3606
+ // Set the initial value in auro-menu if defined
3607
+ if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
3608
+ this.menu.value = this.value;
3609
+ }
3610
+ }
3611
+
3612
+ updated(changedProperties) {
3613
+ // After the component is ready, send direct value changes to auro-menu.
3614
+ if (changedProperties.has('value')) {
3615
+ if (this.value) {
3616
+ this.menu.value = this.value;
3617
+ } else {
3618
+ this.menu.value = undefined;
3619
+ }
3620
+
3621
+ this.validation.validate(this);
3622
+
3623
+ this.dispatchEvent(new CustomEvent('auroSelect-valueSet', {
3624
+ bubbles: true,
3625
+ cancelable: false,
3626
+ composed: true,
3627
+ }));
3628
+ }
3629
+
3630
+ if (changedProperties.has('error')) {
3631
+ this.validation.validate(this, true);
3632
+ }
3633
+ }
3634
+
3635
+ /**
3636
+ * Handles reading of auro-select by screen readers.
3637
+ * @private
3638
+ * @returns {void}
3639
+ */
3640
+ labelForSr() {
3641
+ const placeholderLabel = document.createElement("div");
3642
+ const textId = "label";
3643
+
3644
+ placeholderLabel.setAttribute("id", textId);
3645
+ placeholderLabel.setAttribute("aria-live", "polite");
3646
+
3647
+ const styles = {
3648
+ position: 'absolute',
3649
+ overflow: 'hidden',
3650
+ clipPath: 'inset(1px, 1px, 1px, 1px)',
3651
+ width: '1px',
3652
+ height: '1px',
3653
+ padding: '0',
3654
+ border: '0'
3655
+ };
3656
+
3657
+ Object.assign(placeholderLabel.style, styles);
3658
+
3659
+ this.addEventListener('focus', () => {
3660
+ document.body.appendChild(placeholderLabel);
3661
+
3662
+ if (!this.optionSelected) {
3663
+ document.getElementById(textId).innerHTML = this.placeholder;
3664
+ } else {
3665
+ document.getElementById(textId).innerHTML = `${this.optionSelected.innerText}, ${this.placeholder}`;
3666
+ }
3667
+ });
3668
+
3669
+ this.addEventListener('blur', () => {
3670
+ if (document.contains(placeholderLabel)) {
3671
+ document.body.removeChild(placeholderLabel);
3672
+ }
3673
+ });
3674
+ }
3675
+
3676
+ // When using auroElement, use the following attribute and function when hiding content from screen readers.
3677
+ // aria-hidden="${this.hideAudible(this.hiddenAudible)}"
3678
+
3679
+ // function that renders the HTML and CSS into the scope of the component
3680
+ render() {
3681
+ return u$3`
3682
+ <div class="outerWrapper">
3683
+ <div aria-live="polite" class="util_displayHiddenVisually">
3684
+ ${this.optionActive && this.options.length > 0
3685
+ ? u$3`
3686
+ ${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
3687
+ `
3688
+ : undefined
3689
+ };
3690
+
3691
+ ${this.optionSelected && this.options.length > 0
3692
+ ? u$3`
3693
+ ${`${this.optionSelected.innerText} selected`}
3694
+ `
3695
+ : undefined
3696
+ };
3697
+ </div>
3698
+ <${this.dropdownTag}
3699
+ for="selectmenu"
3700
+ ?error="${this.validity !== undefined && this.validity !== 'valid'}"
3701
+ common
3702
+ ?matchWidth="${!this.flexMenuWidth}"
3703
+ chevron
3704
+ part="dropdown">
3705
+ <span slot="trigger" aria-haspopup="true" id="triggerFocus">
3706
+ ${this.value ? this.displayValue : u$3`<span class="placeholder">${this.placeholder}</span>`}
3707
+ </span>
3708
+ <div class="menuWrapper">
3709
+ </div>
3710
+ <slot name="label" slot="label"></slot>
3711
+ <span slot="helpText">
3712
+ ${!this.validity || this.validity === undefined || this.validity === 'valid'
3713
+ ? u$3`
3714
+ <p class="selectElement-helpText" id="${this.uniqueId}" part="helpText">
3715
+ <slot name="helpText"></slot>
3716
+ </p>`
3717
+ : u$3`
3718
+ <p class="selectElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
3719
+ ${this.setCustomValidity}
3720
+ </p>`
3721
+ }
3722
+ </span>
3723
+ </${this.dropdownTag}>
3724
+ <!-- Help text and error message template -->
3725
+ </div>
3726
+ `;
3727
+ }
3728
+ }
3729
+
3730
+ var styleCss$2 = i$b`:root{--ds-asset-font-circular-family-name: "AS Circular";--ds-asset-font-circular-filename: "ASCircularWeb";--ds-asset-font-circular-weight-light: "-Light";--ds-asset-font-circular-weight-medium: "-Medium";--ds-asset-font-circular-weight-book: "-Book";--ds-border-radius: 0.375rem;--ds-size-25: 0.125rem;--ds-size-50: 0.25rem;--ds-size-75: 0.375rem;--ds-size-100: 0.5rem;--ds-size-150: 0.75rem;--ds-size-200: 1rem;--ds-size-250: 1.25rem;--ds-size-300: 1.5rem;--ds-size-400: 2rem;--ds-size-500: 2.5rem;--ds-size-600: 3rem;--ds-size-700: 3.5rem;--ds-size-800: 4rem;--ds-size-900: 4.5rem;--ds-size-1000: 5rem;--ds-unitless-scale-20: 0.25;--ds-unitless-scale-50: 0.5;--ds-unitless-scale-100: 1;--ds-unitless-scale-140: 1.4;--ds-unitless-scale-150: 1.5;--ds-unitless-scale-200: 2;--ds-unitless-scale-300: 3;--ds-unitless-scale-350: 3.5;--ds-animation-default-property: all;--ds-animation-default-duration: 0.3s;--ds-animation-default-timing: ease-out;--ds-depth-overlay: 200;--ds-depth-modal: 300;--ds-depth-tooltip: 400;--ds-elevation-100: 0px 0px 5px rgba(0, 0, 0, 0.15);--ds-elevation-200: 0px 0px 10px rgba(0, 0, 0, 0.15);--ds-elevation-300: 0px 0px 15px rgba(0, 0, 0, 0.2);--ds-grid-breakpoint-xs: 320px;--ds-grid-breakpoint-sm: 576px;--ds-grid-breakpoint-md: 768px;--ds-grid-breakpoint-lg: 1024px;--ds-grid-breakpoint-xl: 1232px;--ds-grid-column-xs: 6;--ds-grid-column-sm: 12;--ds-grid-column-md: 12;--ds-grid-column-lg: 12;--ds-grid-column-xl: 12;--ds-grid-gutter-xs: 0.5rem;--ds-grid-gutter-sm: 1rem;--ds-grid-gutter-md: 1.5rem;--ds-grid-gutter-lg: 1.5rem;--ds-grid-gutter-xl: 2rem;--ds-grid-margin-xs: 1rem;--ds-grid-margin-sm: 1rem;--ds-grid-margin-md: 1.5rem;--ds-grid-margin-lg: 2rem;--ds-grid-margin-xl: 2rem;--ds-font-family-default: "AS Circular", Helvetica Neue, Arial, sans-serif;--ds-font-family-mono: Menlo, Monaco, Consolas, "Courier New", monospace;--ds-text-heading-300-weight: 300;--ds-text-heading-300-px: 18px;--ds-text-heading-300-size: 1.125rem;--ds-text-heading-300-height: 1.625rem;--ds-text-heading-300-height-px: 26px;--ds-text-heading-400-weight: 300;--ds-text-heading-400-px: 20px;--ds-text-heading-400-size: 1.25rem;--ds-text-heading-400-height: 1.625rem;--ds-text-heading-400-height-px: 26px;--ds-text-heading-500-weight: 300;--ds-text-heading-500-px-breakpoint-sm: 22px;--ds-text-heading-500-px-breakpoint-md: 24px;--ds-text-heading-500-px-breakpoint-lg: 24px;--ds-text-heading-500-size-breakpoint-sm: 1.375rem;--ds-text-heading-500-size-breakpoint-md: 1.5rem;--ds-text-heading-500-size-breakpoint-lg: 1.5rem;--ds-text-heading-500-height-breakpoint-sm: 1.625rem;--ds-text-heading-500-height-breakpoint-px-sm: 26px;--ds-text-heading-500-height-breakpoint-md: 1.875rem;--ds-text-heading-500-height-breakpoint-px-md: 30px;--ds-text-heading-500-height-breakpoint-lg: 2rem;--ds-text-heading-500-height-breakpoint-px-lg: 32px;--ds-text-heading-600-weight: 300;--ds-text-heading-600-px-breakpoint-sm: 26px;--ds-text-heading-600-px-breakpoint-md: 28px;--ds-text-heading-600-px-breakpoint-lg: 28px;--ds-text-heading-600-size-breakpoint-sm: 1.625rem;--ds-text-heading-600-size-breakpoint-md: 1.75rem;--ds-text-heading-600-size-breakpoint-lg: 1.75rem;--ds-text-heading-600-height-breakpoint-sm: 1.875rem;--ds-text-heading-600-height-breakpoint-px-sm: 30px;--ds-text-heading-600-height-breakpoint-md: 2.125rem;--ds-text-heading-600-height-breakpoint-px-md: 34px;--ds-text-heading-600-height-breakpoint-lg: 2.25rem;--ds-text-heading-600-height-breakpoint-px-lg: 36px;--ds-text-heading-700-weight: 500;--ds-text-heading-700-px-breakpoint-sm: 28px;--ds-text-heading-700-px-breakpoint-md: 32px;--ds-text-heading-700-px-breakpoint-lg: 36px;--ds-text-heading-700-size-breakpoint-sm: 1.75rem;--ds-text-heading-700-size-breakpoint-md: 2rem;--ds-text-heading-700-size-breakpoint-lg: 2.25rem;--ds-text-heading-700-height-breakpoint-sm: 2.125rem;--ds-text-heading-700-height-breakpoint-px-sm: 34px;--ds-text-heading-700-height-breakpoint-md: 2.375rem;--ds-text-heading-700-height-breakpoint-px-md: 38px;--ds-text-heading-700-height-breakpoint-lg: 2.75rem;--ds-text-heading-700-height-breakpoint-px-lg: 44px;--ds-text-heading-800-weight: 500;--ds-text-heading-800-px-breakpoint-sm: 32px;--ds-text-heading-800-px-breakpoint-md: 36px;--ds-text-heading-800-px-breakpoint-lg: 40px;--ds-text-heading-800-size-breakpoint-sm: 2rem;--ds-text-heading-800-size-breakpoint-md: 2.25rem;--ds-text-heading-800-size-breakpoint-lg: 2.5rem;--ds-text-heading-800-height-breakpoint-sm: 2.375rem;--ds-text-heading-800-height-breakpoint-px-sm: 38px;--ds-text-heading-800-height-breakpoint-md: 2.625rem;--ds-text-heading-800-height-breakpoint-px-md: 42px;--ds-text-heading-800-height-breakpoint-lg: 3rem;--ds-text-heading-800-height-breakpoint-px-lg: 48px;--ds-text-heading-default-weight: 500;--ds-text-heading-default-margin: 0;--ds-text-heading-default-spacing: -0.2px;--ds-text-heading-medium-weight: 300;--ds-text-heading-display-weight: 100;--ds-text-heading-display-px-breakpoint-sm: 44px;--ds-text-heading-display-px-breakpoint-md: 48px;--ds-text-heading-display-px-breakpoint-lg: 56px;--ds-text-heading-display-size-breakpoint-sm: 2.75rem;--ds-text-heading-display-size-breakpoint-md: 3rem;--ds-text-heading-display-size-breakpoint-lg: 3.5rem;--ds-text-heading-display-height-breakpoint-sm: 3.375rem;--ds-text-heading-display-height-breakpoint-px-sm: 54px;--ds-text-heading-display-height-breakpoint-md: 3.75rem;--ds-text-heading-display-height-breakpoint-px-md: 60px;--ds-text-heading-display-height-breakpoint-lg: 4.25rem;--ds-text-heading-display-height-breakpoint-px-lg: 68px;--ds-text-body-default-weight: 500;--ds-text-body-size-xxs: 0.625rem;--ds-text-body-size-xs: 0.75rem;--ds-text-body-size-sm: 0.875rem;--ds-text-body-size-default: 1rem;--ds-text-body-size-lg: 1.125rem;--ds-text-body-height-xs: 1rem;--ds-text-body-height-sm: 1.25rem;--ds-text-body-height-default: 1.5rem;--ds-text-body-height-lg: 1.625rem;--ds-color-alert-notification-default: #0074c8;--ds-color-alert-warning-default: #de750c;--ds-color-alert-error-default: #df0b37;--ds-color-alert-success-default: #00805d;--ds-color-alert-advisory-default: #fff0cd;--ds-color-alert-bkg-success-default: #ddf6e8;--ds-color-alert-bkg-error-default: #ffedf1;--ds-color-background-primary-100-default: #ffffff;--ds-color-background-primary-100-inverse: #0e2b4f;--ds-color-background-primary-200-default: #f7f7f7;--ds-color-background-primary-200-inverse: #194069;--ds-color-background-primary-300-default: #e4e8ec;--ds-color-background-primary-300-inverse: #265688;--ds-color-background-primary-400-default: #dddddd;--ds-color-background-primary-400-inverse: #326aa5;--ds-color-background-success-default: #eef8f5;--ds-color-background-success-inverse: #173c30;--ds-color-background-error-default: #fff4f4;--ds-color-background-error-inverse: #74110e;--ds-color-background-warning-default: #fef8e9;--ds-color-background-warning-inverse: #5d4514;--ds-color-background-info-default: #f0f7fd;--ds-color-background-info-inverse: #193d73;--ds-color-background-subtle-default: #f7f8fa;--ds-color-background-subtle-inverse: #2a2a2a;--ds-color-background-accent-default: #ebfafd;--ds-color-background-accent-inverse: #275b72;--ds-color-background-emphasis-default: #c9e0f7;--ds-color-background-emphasis-inverse: #225296;--ds-color-background-scrimmed-default: rgba(0, 0, 0, 0.5);--ds-color-background-lightest: #ffffff;--ds-color-background-lighter: #f7f7f7;--ds-color-background-darker: #01426a;--ds-color-background-darkest: #00274a;--ds-color-background-gradient-default: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5));--ds-color-base-white: #ffffff;--ds-color-base-white-100: rgba(255, 255, 255, 0.03);--ds-color-base-white-200: rgba(255, 255, 255, 0.06);--ds-color-base-white-300: rgba(255, 255, 255, 0.12);--ds-color-base-white-400: rgba(255, 255, 255, 0.25);--ds-color-base-white-500: rgba(255, 255, 255, 0.5);--ds-color-base-white-opacity-50: rgba(255, 255, 255, 0.5);--ds-color-base-white-opacity-40: rgba(255, 255, 255, 0.4);--ds-color-base-white-opacity-0: rgba(255, 255, 255, 0);--ds-color-base-black: #000000;--ds-color-base-black-100: rgba(0, 0, 0, 0.03);--ds-color-base-black-200: rgba(0, 0, 0, 0.06);--ds-color-base-black-300: rgba(0, 0, 0, 0.12);--ds-color-base-black-400: rgba(0, 0, 0, 0.25);--ds-color-base-black-500: rgba(0, 0, 0, 0.5);--ds-color-base-black-opacity-15: rgba(0, 0, 0, 0.15);--ds-color-base-blue-100: #f0f7fd;--ds-color-base-blue-200: #c9e0f7;--ds-color-base-blue-300: #a0c9f1;--ds-color-base-blue-400: #79b2ec;--ds-color-base-blue-500: #5398e6;--ds-color-base-blue-600: #3b7fd2;--ds-color-base-blue-700: #2c67b5;--ds-color-base-blue-800: #225296;--ds-color-base-blue-900: #193d73;--ds-color-base-blue-1000: #102a51;--ds-color-base-cyan-100: #ebfafd;--ds-color-base-cyan-200: #a8e9f7;--ds-color-base-cyan-300: #6ad5ef;--ds-color-base-cyan-400: #56bbde;--ds-color-base-cyan-500: #4aa2c7;--ds-color-base-cyan-600: #3e89aa;--ds-color-base-cyan-700: #32718e;--ds-color-base-cyan-800: #275b72;--ds-color-base-cyan-900: #1d4658;--ds-color-base-cyan-1000: #12303d;--ds-color-base-error-100: #fff4f4;--ds-color-base-error-200: #f9aca6;--ds-color-base-error-300: #f16359;--ds-color-base-error-400: #cc1816;--ds-color-base-error-500: #74110e;--ds-color-base-gray-100: #f7f7f7;--ds-color-base-gray-200: #d4d4d4;--ds-color-base-gray-300: #c5c5c5;--ds-color-base-gray-400: #adadad;--ds-color-base-gray-500: #959595;--ds-color-base-gray-600: #7e7e7e;--ds-color-base-gray-700: #676767;--ds-color-base-gray-800: #525252;--ds-color-base-gray-900: #3d3d3d;--ds-color-base-gray-1000: #2a2a2a;--ds-color-base-green-100: #f3faf7;--ds-color-base-green-200: #000000;--ds-color-base-green-300: #addbca;--ds-color-base-green-400: #7ec6ac;--ds-color-base-green-500: #51ae8c;--ds-color-base-green-600: #459578;--ds-color-base-green-700: #3a7d64;--ds-color-base-green-800: #306854;--ds-color-base-green-900: #285545;--ds-color-base-green-1000: #1f4436;--ds-color-base-lime-100: #f5fbeb;--ds-color-base-lime-200: #d8efb4;--ds-color-base-lime-300: #badd81;--ds-color-base-lime-400: #a2c270;--ds-color-base-lime-500: #8ca761;--ds-color-base-lime-600: #778f53;--ds-color-base-lime-700: #647845;--ds-color-base-lime-800: #53643a;--ds-color-base-lime-900: #44522f;--ds-color-base-lime-1000: #364126;--ds-color-base-navy-100: #f2f7fb;--ds-color-base-navy-200: #cfe0ef;--ds-color-base-navy-300: #acc9e2;--ds-color-base-navy-400: #89b2d4;--ds-color-base-navy-500: #6899c6;--ds-color-base-navy-600: #4a82b7;--ds-color-base-navy-700: #326aa5;--ds-color-base-navy-800: #265688;--ds-color-base-navy-900: #194069;--ds-color-base-navy-1000: #0e2b4f;--ds-color-base-neutral-100: #f7f8fa;--ds-color-base-neutral-200: #e4e8ec;--ds-color-base-neutral-300: #ccd2db;--ds-color-base-neutral-400: #afb9c6;--ds-color-base-neutral-500: #939fad;--ds-color-base-neutral-600: #7e8894;--ds-color-base-neutral-700: #6a717c;--ds-color-base-neutral-800: #585e67;--ds-color-base-neutral-900: #484d55;--ds-color-base-neutral-1000: #393d43;--ds-color-base-pink-100: #fff7f8;--ds-color-base-pink-200: #fde0e6;--ds-color-base-pink-300: #fcc2ce;--ds-color-base-pink-400: #fa9db0;--ds-color-base-pink-500: #f7738e;--ds-color-base-pink-600: #e45472;--ds-color-base-pink-700: #bf475f;--ds-color-base-pink-800: #a03b50;--ds-color-base-pink-900: #833142;--ds-color-base-pink-1000: #692734;--ds-color-base-purple-100: #fbf8fe;--ds-color-base-purple-200: #ede3fd;--ds-color-base-purple-300: #ddc9fb;--ds-color-base-purple-400: #c9a9f8;--ds-color-base-purple-500: #b588f5;--ds-color-base-purple-600: #a268f3;--ds-color-base-purple-700: #8d47f0;--ds-color-base-purple-800: #7633d7;--ds-color-base-purple-900: #622ab2;--ds-color-base-purple-1000: #4e228d;--ds-color-base-red-100: #fef7f5;--ds-color-base-red-200: #fae2da;--ds-color-base-red-300: #f5c7b8;--ds-color-base-red-400: #f0a68d;--ds-color-base-red-500: #e9815e;--ds-color-base-red-600: #e35c2f;--ds-color-base-red-700: #d03a08;--ds-color-base-red-800: #ae3007;--ds-color-base-red-900: #902806;--ds-color-base-red-1000: #732005;--ds-color-base-success-100: #eef8f5;--ds-color-base-success-200: #8eceb9;--ds-color-base-success-300: #40a080;--ds-color-base-success-400: #0b6f4d;--ds-color-base-success-500: #173c30;--ds-color-base-turquoise-100: #f7fafa;--ds-color-base-turquoise-200: #dfe9ea;--ds-color-base-turquoise-300: #c2d5d6;--ds-color-base-turquoise-400: #9fbdbe;--ds-color-base-turquoise-500: #7ba5a6;--ds-color-base-turquoise-600: #5c8f91;--ds-color-base-turquoise-700: #3d7a7d;--ds-color-base-turquoise-800: #21686a;--ds-color-base-turquoise-900: #085659;--ds-color-base-turquoise-1000: #004447;--ds-color-base-yellow-100: #fff9df;--ds-color-base-yellow-200: #ffe87e;--ds-color-base-yellow-300: #f9ce06;--ds-color-base-yellow-400: #d6b622;--ds-color-base-yellow-500: #b49d35;--ds-color-base-yellow-600: #96873e;--ds-color-base-yellow-700: #7c7140;--ds-color-base-yellow-800: #665e3d;--ds-color-base-yellow-900: #524e38;--ds-color-base-yellow-1000: #403d30;--ds-color-base-warning-100: #fef8e9;--ds-color-base-warning-200: #f2c153;--ds-color-base-warning-300: #c49432;--ds-color-base-warning-400: #8e6b22;--ds-color-base-warning-500: #5d4514;--ds-color-state-error-100: #ff999b;--ds-color-state-error-500: #df0b37;--ds-color-state-success-100: #69cf96;--ds-color-state-success-500: #00805d;--ds-color-state-warning-500: #de750c;--ds-color-border-primary-default: #585e67;--ds-color-border-primary-inverse: #afb9c6;--ds-color-border-secondary-default: #939fad;--ds-color-border-secondary-inverse: #7e8894;--ds-color-border-tertiary-default: #dddddd;--ds-color-border-tertiary-inverse: #676767;--ds-color-border-error-default: #cc1816;--ds-color-border-error-inverse: #f9aca6;--ds-color-border-divider-default: rgba(0, 0, 0, 0.12);--ds-color-border-divider-inverse: rgba(255, 255, 255, 0.25);--ds-color-border-subtle-default: #f0f7fd;--ds-color-border-subtle-inverse: #326aa5;--ds-color-border-emphasis-default: #194069;--ds-color-border-emphasis-inverse: #f2f7fb;--ds-color-border-accent-default: #badd81;--ds-color-border-accent-inverse: #a2c270;--ds-color-border-success-default: #0b6f4d;--ds-color-border-success-inverse: #8eceb9;--ds-color-border-warning-default: #c49432;--ds-color-border-warning-inverse: #f2c153;--ds-color-border-info-default: #326aa5;--ds-color-border-info-inverse: #89b2d4;--ds-color-border-ui-default-default: #2c67b5;--ds-color-border-ui-default-inverse: #56bbde;--ds-color-border-ui-hover-default: #193d73;--ds-color-border-ui-hover-inverse: #a8e9f7;--ds-color-border-ui-active-default: #225296;--ds-color-border-ui-active-inverse: #6ad5ef;--ds-color-border-ui-focus-default: #2c67b5;--ds-color-border-ui-focus-inverse: #56bbde;--ds-color-border-ui-disabled-default: #adadad;--ds-color-border-ui-disabled-inverse: #7e7e7e;--ds-color-border-active-default: #0074c8;--ds-color-border-active-inverse: #00cff0;--ds-color-border-disabled-default: #d4d4d4;--ds-color-border-focus-default: #959595;--ds-color-brand-neutral-100: #f7f8fa;--ds-color-brand-neutral-200: #e4e8ec;--ds-color-brand-neutral-300: #ccd2db;--ds-color-brand-neutral-400: #afb9c6;--ds-color-brand-neutral-500: #939fad;--ds-color-brand-neutral-600: #7e8894;--ds-color-brand-neutral-700: #6a717c;--ds-color-brand-neutral-800: #585e67;--ds-color-brand-neutral-900: #484d55;--ds-color-brand-neutral-1000: #393d43;--ds-color-brand-gray-100: #f7f7f7;--ds-color-brand-gray-200: #dddddd;--ds-color-brand-gray-300: #c5c5c5;--ds-color-brand-gray-400: #adadad;--ds-color-brand-gray-500: #959595;--ds-color-brand-gray-600: #7e7e7e;--ds-color-brand-gray-700: #676767;--ds-color-brand-gray-800: #525252;--ds-color-brand-gray-900: #3d3d3d;--ds-color-brand-gray-1000: #2a2a2a;--ds-color-brand-red-100: #fef7f5;--ds-color-brand-red-200: #fae2da;--ds-color-brand-red-300: #f5c7b8;--ds-color-brand-red-400: #f0a68d;--ds-color-brand-red-500: #e9815e;--ds-color-brand-red-600: #e35c2f;--ds-color-brand-red-700: #d03a08;--ds-color-brand-red-800: #ae3007;--ds-color-brand-red-900: #902806;--ds-color-brand-red-1000: #732005;--ds-color-brand-yellow-100: #fff9df;--ds-color-brand-yellow-200: #ffe87e;--ds-color-brand-yellow-300: #f9ce06;--ds-color-brand-yellow-400: #d6b622;--ds-color-brand-yellow-500: #b49d35;--ds-color-brand-yellow-600: #96873e;--ds-color-brand-yellow-700: #7c7140;--ds-color-brand-yellow-800: #665e3d;--ds-color-brand-yellow-900: #524e38;--ds-color-brand-yellow-1000: #403d30;--ds-color-brand-lime-100: #f5fbeb;--ds-color-brand-lime-200: #d8efb4;--ds-color-brand-lime-300: #badd81;--ds-color-brand-lime-400: #a2c270;--ds-color-brand-lime-500: #8ca761;--ds-color-brand-lime-600: #778f53;--ds-color-brand-lime-700: #647845;--ds-color-brand-lime-800: #53643a;--ds-color-brand-lime-900: #44522f;--ds-color-brand-lime-1000: #364126;--ds-color-brand-green-100: #f3faf7;--ds-color-brand-green-200: #d4ece4;--ds-color-brand-green-300: #addbca;--ds-color-brand-green-400: #7ec6ac;--ds-color-brand-green-500: #51ae8c;--ds-color-brand-green-600: #459578;--ds-color-brand-green-700: #3a7d64;--ds-color-brand-green-800: #306854;--ds-color-brand-green-900: #285545;--ds-color-brand-green-1000: #1f4436;--ds-color-brand-turquoise-100: #f7fafa;--ds-color-brand-turquoise-200: #dfe9ea;--ds-color-brand-turquoise-300: #c2d5d6;--ds-color-brand-turquoise-400: #9fbdbe;--ds-color-brand-turquoise-500: #7ba5a6;--ds-color-brand-turquoise-600: #5c8f91;--ds-color-brand-turquoise-700: #3d7a7d;--ds-color-brand-turquoise-800: #21686a;--ds-color-brand-turquoise-900: #085659;--ds-color-brand-turquoise-1000: #004447;--ds-color-brand-cyan-100: #ebfafd;--ds-color-brand-cyan-200: #a8e9f7;--ds-color-brand-cyan-300: #6ad5ef;--ds-color-brand-cyan-400: #56bbde;--ds-color-brand-cyan-500: #4aa2c7;--ds-color-brand-cyan-600: #3e89aa;--ds-color-brand-cyan-700: #32718e;--ds-color-brand-cyan-800: #275b72;--ds-color-brand-cyan-900: #1d4658;--ds-color-brand-cyan-1000: #12303d;--ds-color-brand-blue-100: #f0f7fd;--ds-color-brand-blue-200: #c9e0f7;--ds-color-brand-blue-300: #a0c9f1;--ds-color-brand-blue-400: #79b2ec;--ds-color-brand-blue-500: #5398e6;--ds-color-brand-blue-600: #3b7fd2;--ds-color-brand-blue-700: #2c67b5;--ds-color-brand-blue-800: #225296;--ds-color-brand-blue-900: #193d73;--ds-color-brand-blue-1000: #102a51;--ds-color-brand-navy-100: #f2f7fb;--ds-color-brand-navy-200: #cfe0ef;--ds-color-brand-navy-300: #acc9e2;--ds-color-brand-navy-400: #89b2d4;--ds-color-brand-navy-500: #6899c6;--ds-color-brand-navy-600: #4a82b7;--ds-color-brand-navy-700: #326aa5;--ds-color-brand-navy-800: #265688;--ds-color-brand-navy-900: #194069;--ds-color-brand-navy-1000: #0e2b4f;--ds-color-brand-purple-100: #fbf8fe;--ds-color-brand-purple-200: #ede3fd;--ds-color-brand-purple-300: #ddc9fb;--ds-color-brand-purple-400: #c9a9f8;--ds-color-brand-purple-500: #b588f5;--ds-color-brand-purple-600: #a268f3;--ds-color-brand-purple-700: #8d47f0;--ds-color-brand-purple-800: #7633d7;--ds-color-brand-purple-900: #622ab2;--ds-color-brand-purple-1000: #4e228d;--ds-color-brand-pink-100: #fff7f8;--ds-color-brand-pink-200: #fde0e6;--ds-color-brand-pink-300: #fcc2ce;--ds-color-brand-pink-400: #fa9db0;--ds-color-brand-pink-500: #f7738e;--ds-color-brand-pink-600: #e45472;--ds-color-brand-pink-700: #bf475f;--ds-color-brand-pink-800: #a03b50;--ds-color-brand-pink-900: #833142;--ds-color-brand-pink-1000: #692734;--ds-color-brand-midnight-100: #c1daf0;--ds-color-brand-midnight-200: #569ed7;--ds-color-brand-midnight-300: #156fad;--ds-color-brand-midnight-400: #01426a;--ds-color-brand-midnight-500: #00274a;--ds-color-brand-atlas-100: #cde6ff;--ds-color-brand-atlas-200: #6bb7fb;--ds-color-brand-atlas-300: #2492eb;--ds-color-brand-atlas-400: #0074c8;--ds-color-brand-atlas-500: #054687;--ds-color-brand-atlas-400-opacity-20: rgba(0, 116, 200, 0.2);--ds-color-brand-breeze-100: #c0f7ff;--ds-color-brand-breeze-200: #5de3f7;--ds-color-brand-breeze-300: #00cff0;--ds-color-brand-breeze-400: #099dc5;--ds-color-brand-breeze-500: #0b5575;--ds-color-brand-breeze-300-opacity-30: rgba(0, 207, 240, 0.3);--ds-color-brand-tropical-100: #e2ffcd;--ds-color-brand-tropical-200: #d0fba6;--ds-color-brand-tropical-300: #c0e585;--ds-color-brand-tropical-400: #91be62;--ds-color-brand-tropical-500: #5e8741;--ds-color-brand-alpine-100: #bcaae6;--ds-color-brand-alpine-200: #9e73ea;--ds-color-brand-alpine-300: #8439ef;--ds-color-brand-alpine-400: #631db8;--ds-color-brand-alpine-500: #39115c;--ds-color-brand-flamingo-100: #ffebee;--ds-color-brand-flamingo-200: #ffc0ca;--ds-color-brand-flamingo-300: #ff94a7;--ds-color-brand-flamingo-400: #f65b7b;--ds-color-brand-flamingo-500: #b82b47;--ds-color-brand-canyon-100: #ffcab6;--ds-color-brand-canyon-200: #f99574;--ds-color-brand-canyon-300: #f26135;--ds-color-brand-canyon-400: #de3e09;--ds-color-brand-canyon-500: #b83302;--ds-color-brand-goldcoast-100: #fff0cd;--ds-color-brand-goldcoast-200: #ffdb67;--ds-color-brand-goldcoast-300: #ffd200;--ds-color-brand-goldcoast-400: #e5ad07;--ds-color-brand-goldcoast-500: #b88624;--ds-color-brand-goldgray-100: #c5c1bf;--ds-color-brand-goldgray-200: #726e6c;--ds-color-brand-gold-100: #ccbc94;--ds-color-brand-gold-200: #7f682e;--ds-color-brand-emerald: #139142;--ds-color-brand-sapphire: #015daa;--ds-color-brand-ruby: #a41d4a;--ds-color-brand-lounge: #01426a;--ds-color-brand-loungeplus: #53b390;--ds-color-container-accent-default: #f5fbeb;--ds-color-container-accent-inverse: #badd81;--ds-color-container-emphasis-default: #ebfafd;--ds-color-container-emphasis-inverse: #6ad5ef;--ds-color-container-error-default: #fff4f4;--ds-color-container-error-inverse: #74110e;--ds-color-container-info-default: #f0f7fd;--ds-color-container-info-inverse: #193d73;--ds-color-container-primary-default: #ffffff;--ds-color-container-primary-inverse: #0e2b4f;--ds-color-container-secondary-default: #f7f7f7;--ds-color-container-secondary-inverse: #194069;--ds-color-container-subtle-default: #f7f8fa;--ds-color-container-subtle-inverse: #393d43;--ds-color-container-success-default: #eef8f5;--ds-color-container-success-inverse: #173c30;--ds-color-container-tertiary-default: rgba(0, 0, 0, 0.03);--ds-color-container-tertiary-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-warning-default: #fef8e9;--ds-color-container-warning-inverse: #5d4514;--ds-color-container-ui-primary-active-default: #225296;--ds-color-container-ui-primary-active-inverse: #6ad5ef;--ds-color-container-ui-primary-default-default: #2c67b5;--ds-color-container-ui-primary-default-inverse: #56bbde;--ds-color-container-ui-primary-disabled-default: #a0c9f1;--ds-color-container-ui-primary-disabled-inverse: #275b72;--ds-color-container-ui-primary-focus-default: #2c67b5;--ds-color-container-ui-primary-focus-inverse: #56bbde;--ds-color-container-ui-primary-hover-default: #193d73;--ds-color-container-ui-primary-hover-inverse: #a8e9f7;--ds-color-container-ui-secondary-active-default: #f0f7fd;--ds-color-container-ui-secondary-active-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-ui-secondary-default-default: #ffffff;--ds-color-container-ui-secondary-default-inverse: rgba(255, 255, 255, 0.03);--ds-color-container-ui-secondary-disabled-default: #f7f7f7;--ds-color-container-ui-secondary-disabled-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-secondary-focus-default: #ffffff;--ds-color-container-ui-secondary-focus-inverse: rgba(255, 255, 255, 0.03);--ds-color-container-ui-secondary-hover-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-secondary-hover-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-active-default: rgba(0, 0, 0, 0.06);--ds-color-container-ui-tertiary-active-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-ui-tertiary-default-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-default-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-disabled-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-disabled-inverse: rgba(255, 255, 255, 0.25);--ds-color-container-ui-tertiary-focus-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-focus-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-hover-default: rgba(0, 0, 0, 0.12);--ds-color-container-ui-tertiary-hover-inverse: rgba(255, 255, 255, 0.25);--ds-color-icon-primary-default: #676767;--ds-color-icon-primary-inverse: #f7f7f7;--ds-color-icon-secondary-default: #7e8894;--ds-color-icon-secondary-inverse: #ccd2db;--ds-color-icon-tertiary-default: #afb9c6;--ds-color-icon-tertiary-inverse: #939fad;--ds-color-icon-emphasis-default: #2a2a2a;--ds-color-icon-emphasis-inverse: #ffffff;--ds-color-icon-accent-default: #a2c270;--ds-color-icon-accent-inverse: #badd81;--ds-color-icon-info-default: #326aa5;--ds-color-icon-info-inverse: #89b2d4;--ds-color-icon-error-default: #cc1816;--ds-color-icon-error-inverse: #f9aca6;--ds-color-icon-warning-default: #c49432;--ds-color-icon-warning-inverse: #f2c153;--ds-color-icon-success-default: #40a080;--ds-color-icon-success-inverse: #8eceb9;--ds-color-icon-subtle-default: #a0c9f1;--ds-color-icon-subtle-inverse: #326aa5;--ds-color-icon-ui-primary-default-default: #2c67b5;--ds-color-icon-ui-primary-default-inverse: #56bbde;--ds-color-icon-ui-primary-hover-default: #193d73;--ds-color-icon-ui-primary-hover-inverse: #a8e9f7;--ds-color-icon-ui-primary-active-default: #225296;--ds-color-icon-ui-primary-active-inverse: #6ad5ef;--ds-color-icon-ui-primary-disabled-default: #adadad;--ds-color-icon-ui-primary-disabled-inverse: #7e7e7e;--ds-color-icon-ui-primary-focus-default: #2c67b5;--ds-color-icon-ui-primary-focus-inverse: #56bbde;--ds-color-icon-ui-secondary-active-default: #676767;--ds-color-icon-ui-secondary-active-inverse: #c5c5c5;--ds-color-icon-ui-secondary-default-default: #7e7e7e;--ds-color-icon-ui-secondary-default-inverse: #adadad;--ds-color-icon-ui-secondary-disabled-default: #adadad;--ds-color-icon-ui-secondary-disabled-inverse: #7e7e7e;--ds-color-icon-ui-secondary-focus-default: #7e7e7e;--ds-color-icon-ui-secondary-focus-inverse: #adadad;--ds-color-icon-ui-secondary-hover-default: #525252;--ds-color-icon-ui-secondary-hover-inverse: #dddddd;--ds-color-icon-brand-red-default: #d03a08;--ds-color-icon-brand-red-inverse: #e9815e;--ds-color-icon-brand-yellow-default: #7c7140;--ds-color-icon-brand-yellow-inverse: #f9ce06;--ds-color-icon-brand-pink-default: #bf475f;--ds-color-icon-brand-pink-inverse: #f7738e;--ds-color-icon-brand-purple-default: #8d47f0;--ds-color-icon-brand-purple-inverse: #b588f5;--ds-color-icon-brand-lime-default: #647845;--ds-color-icon-brand-lime-inverse: #badd81;--ds-color-icon-brand-green-default: #3a7d64;--ds-color-icon-brand-green-inverse: #51ae8c;--ds-color-icon-brand-turquoise-default: #3d7a7d;--ds-color-icon-brand-turquoise-inverse: #7ba5a6;--ds-color-icon-brand-navy-default: #265688;--ds-color-icon-brand-navy-inverse: #6899c6;--ds-color-icon-brand-blue-default: #2c67b5;--ds-color-icon-brand-blue-inverse: #5398e6;--ds-color-icon-brand-cyan-default: #32718e;--ds-color-icon-brand-cyan-inverse: #6ad5ef;--ds-color-icon-brand-gray-default: #676767;--ds-color-icon-brand-gray-inverse: #c5c5c5;--ds-color-icon-brand-neutral-default: #6a717c;--ds-color-icon-brand-neutral-inverse: #afb9c6;--ds-color-icon-disabled-default: rgba(0, 0, 0, 0.15);--ds-color-text-primary-default: #2a2a2a;--ds-color-text-primary-inverse: #ffffff;--ds-color-text-secondary-default: #525252;--ds-color-text-secondary-inverse: #dddddd;--ds-color-text-tertiary-default: #6a717c;--ds-color-text-tertiary-inverse: #adadad;--ds-color-text-error-default: #cc1816;--ds-color-text-error-inverse: #f9aca6;--ds-color-text-emphasis-default: #265688;--ds-color-text-emphasis-inverse: #cfe0ef;--ds-color-text-accent-default: #647845;--ds-color-text-accent-inverse: #badd81;--ds-color-text-info-default: #326aa5;--ds-color-text-info-inverse: #acc9e2;--ds-color-text-subtle-default: #32718e;--ds-color-text-subtle-inverse: #56bbde;--ds-color-text-success-default: #0b6f4d;--ds-color-text-success-inverse: #8eceb9;--ds-color-text-ui-active-default: #225296;--ds-color-text-ui-active-inverse: #6ad5ef;--ds-color-text-ui-default-default: #2c67b5;--ds-color-text-ui-default-inverse: #56bbde;--ds-color-text-ui-disabled-default: #adadad;--ds-color-text-ui-disabled-inverse: #7e7e7e;--ds-color-text-ui-focus-default: #2c67b5;--ds-color-text-ui-focus-inverse: #56bbde;--ds-color-text-ui-hover-default: #193d73;--ds-color-text-ui-hover-inverse: #a8e9f7;--ds-color-text-link-default: #0074c8;--ds-color-text-link-inverse: #00cff0;--ds-color-tier-alaska-mvp-default: #726e6c;--ds-color-tier-alaska-mvp-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold-default: #7f682e;--ds-color-tier-alaska-mvpgold-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold75k-default: #7f682e;--ds-color-tier-alaska-mvpgold75k-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold100k-default: #7f682e;--ds-color-tier-alaska-mvpgold100k-inverse: #c5c1bf;--ds-color-tier-alaska-lounge: #01426a;--ds-color-tier-alaska-loungeplus: #53b390;--ds-color-tier-fare-business-default: #005154;--ds-color-tier-fare-business-inverse: #9fbdbe;--ds-color-tier-fare-economy-default: #2c67b5;--ds-color-tier-fare-economy-inverse: #a0c9f1;--ds-color-tier-fare-first-class-default: #002c4e;--ds-color-tier-fare-first-class-inverse: #89b2d4;--ds-color-tier-fare-saver-default: #4aa2c7;--ds-color-tier-fare-saver-inverse: #a8e9f7;--ds-color-tier-oneworld-emerald: #139142;--ds-color-tier-oneworld-sapphire: #015daa;--ds-color-tier-oneworld-ruby: #a41d4a;--ds-color-ui-default-default: #0074c8;--ds-color-ui-default-inverse: #00cff0;--ds-color-ui-hover-default: #054687;--ds-color-ui-hover-inverse: #5de3f7;--ds-color-ui-active-default: #054687;--ds-color-ui-active-inverse: #5de3f7;--ds-color-ui-disabled-default: rgba(0, 116, 200, 0.2);--ds-color-ui-bkg-default-default: rgba(0, 0, 0, 0.03);--ds-color-ui-bkg-default-inverse: rgba(255, 255, 255, 0.03);--ds-color-ui-bkg-hover-default: rgba(0, 0, 0, 0.06);--ds-color-ui-bkg-hover-inverse: rgba(255, 255, 255, 0.06);--ds-color-utility-blue-default: #79b2ec;--ds-color-utility-blue-inverse: #c9e0f7;--ds-color-utility-cyan-default: #6ad5ef;--ds-color-utility-cyan-inverse: #a8e9f7;--ds-color-utility-green-default: #7ec6ac;--ds-color-utility-green-inverse: #addbca;--ds-color-utility-gray-default: #adadad;--ds-color-utility-gray-inverse: #dddddd;--ds-color-utility-lime-default: #badd81;--ds-color-utility-lime-inverse: #d8efb4;--ds-color-utility-navy-default: #265688;--ds-color-utility-navy-inverse: #acc9e2;--ds-color-utility-neutral-default: #7e8894;--ds-color-utility-neutral-inverse: #ccd2db;--ds-color-utility-pink-default: #f7738e;--ds-color-utility-pink-inverse: #fcc2ce;--ds-color-utility-purple-default: #8d47f0;--ds-color-utility-purple-inverse: #ddc9fb;--ds-color-utility-red-default: #e35c2f;--ds-color-utility-red-inverse: #f0a68d;--ds-color-utility-turquoise-default: #5c8f91;--ds-color-utility-turquoise-inverse: #9fbdbe;--ds-color-utility-yellow-default: #f9ce06;--ds-color-utility-yellow-inverse: #ffe87e;--ds-color-utility-error-default: #cc1816;--ds-color-utility-error-inverse: #f9aca6;--ds-color-utility-warning-default: #f2c153;--ds-color-utility-warning-inverse: #f2c153;--ds-color-utility-success-default: #0b6f4d;--ds-color-utility-success-inverse: #8eceb9}*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}: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]){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){padding-left:var(--ds-size-200, 1rem)}:host([root]){overflow-y:auto}`;
3731
+
3732
+ var colorCss$2 = i$b`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color) !important}`;
3733
+
3734
+ var tokensCss$1 = i$b`:host{--ds-auro-menu-divider-color: var(--ds-color-border-divider-default, $ds-color-border-divider-default);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-color-text-primary-default, $ds-color-text-primary-default)}`;
3735
+
3736
+ var styleCss$1 = i$b`: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}`;
3737
+
3738
+ var colorCss$1 = i$b`: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) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}`;
3739
+
3740
+ /**
3741
+ * @license
3742
+ * Copyright 2017 Google LLC
3743
+ * SPDX-License-Identifier: BSD-3-Clause
3744
+ */
3745
+ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},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)}}
3746
+
3747
+ /**
3748
+ * @license
3749
+ * Copyright 2018 Google LLC
3750
+ * SPDX-License-Identifier: BSD-3-Clause
3751
+ */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$1}});
3752
+
3753
+ /**
3754
+ * @license
3755
+ * Copyright 2018 Google LLC
3756
+ * SPDX-License-Identifier: BSD-3-Clause
3757
+ */const o=o=>o??E$1;
3758
+
3759
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3760
+ // See LICENSE in the project root for license information.
3761
+
3762
+
3763
+ /**
3764
+ * @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
3765
+ * @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
3766
+ * @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
3767
+ */
3768
+
3769
+ class AuroElement extends r$4 {
3770
+
3771
+ // function to define props used within the scope of this component
3772
+ static get properties() {
3773
+ return {
3774
+ hidden: { type: Boolean,
3775
+ reflect: true },
3776
+ hiddenVisually: { type: Boolean,
3777
+ reflect: true },
3778
+ hiddenAudible: { type: Boolean,
3779
+ reflect: true },
3780
+ };
3781
+ }
3782
+
3783
+ /**
3784
+ * @private Function that determines state of aria-hidden
3785
+ */
3786
+ hideAudible(value) {
3787
+ if (value) {
3788
+ return 'true'
3789
+ }
3790
+
3791
+ return 'false'
3792
+ }
3793
+ }
3794
+
3795
+ var error = {"role":"img","color":"currentColor","title":"","desc":"Error alert indicator.","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"error","category":"alert","deprecated":true,"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>"};
3796
+
3797
+ /* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
3798
+
3799
+ const _fetchMap = new Map();
3800
+
3801
+ /**
3802
+ * A callback to parse Response body.
3803
+ *
3804
+ * @callback ResponseParser
3805
+ * @param {Fetch.Response} response
3806
+ * @returns {Promise}
3807
+ */
3808
+
3809
+ /**
3810
+ * A minimal in-memory map to de-duplicate Fetch API media requests.
3811
+ *
3812
+ * @param {String} uri
3813
+ * @param {Object} [options={}]
3814
+ * @param {ResponseParser} [options.responseParser=(response) => response.text()]
3815
+ * @returns {Promise}
3816
+ */
3817
+ const cacheFetch = (uri, options = {}) => {
3818
+ const responseParser = options.responseParser || ((response) => response.text());
3819
+ if (!_fetchMap.has(uri)) {
3820
+ _fetchMap.set(uri, fetch(uri).then(responseParser));
3821
+ }
3822
+ return _fetchMap.get(uri);
3823
+ };
3824
+
3825
+ var styleCss = i$b`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}: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}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}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}.label{display:flex;align-items:flex-start}.label svg{margin:0 var(--ds-size-50, 0.25rem)}.labelContainer{line-height:1.8}`;
3826
+
3827
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3828
+ // See LICENSE in the project root for license information.
3829
+
3830
+
3831
+ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
3832
+ /**
3833
+ * @attr {Boolean} onDark - Set value for on-dark version of auro-icon
3834
+ * @slot - Hidden from visibility, used for a11y if icon description is needed
3835
+ */
3836
+
3837
+ // build the component class
3838
+ class BaseIcon extends AuroElement {
3839
+ constructor() {
3840
+ super();
3841
+ this.onDark = false;
3842
+ }
3843
+
3844
+ // function to define props used within the scope of this component
3845
+ static get properties() {
3846
+ return {
3847
+ ...super.properties,
3848
+ onDark: {
3849
+ type: Boolean,
3850
+ reflect: true
3851
+ },
3852
+
3853
+ /**
3854
+ * @private
3855
+ */
3856
+ svg: {
3857
+ attribute: false,
3858
+ reflect: true
3859
+ }
3860
+ };
3861
+ }
3862
+
3863
+ static get styles() {
3864
+ return i$b`
3865
+ ${styleCss}
3866
+ `;
3867
+ }
3868
+
3869
+ /**
3870
+ * Async function to fetch requested icon from npm CDN.
3871
+ * @private
3872
+ * @param {string} category - Icon category.
3873
+ * @param {string} name - Icon name.
3874
+ * @returns {SVGElement} DOM - Ready HTML to be appended.
3875
+ */
3876
+ async fetchIcon(category, name) {
3877
+ let iconHTML = '';
3878
+
3879
+ if (category === 'logos') {
3880
+ iconHTML = await cacheFetch(`${this.uri}/${category}/${name}.svg`);
3881
+ } else {
3882
+ iconHTML = await cacheFetch(`${this.uri}/icons/${category}/${name}.svg`);
3883
+ }
3884
+
3885
+ const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
3886
+
3887
+ return dom.body.querySelector('svg');
3888
+ }
3889
+
3890
+ // lifecycle function
3891
+ async firstUpdated() {
3892
+ if (!this.customSvg) {
3893
+ const svg = await this.fetchIcon(this.category, this.name);
3894
+
3895
+ if (svg) {
3896
+ this.svg = svg;
3897
+ } else if (!svg) {
3898
+ const penDOM = new DOMParser().parseFromString(error.svg, 'text/html');
3899
+
3900
+ this.svg = penDOM.body.firstChild;
3901
+ }
3902
+ }
3903
+ }
3904
+ }
3905
+
3906
+ var tokensCss = i$b`:host{--ds-auro-icon-color: var(--ds-color-icon-primary-default, $ds-color-icon-primary-default);--ds-auro-icon-size: var(--ds-size-300, $ds-size-300)}`;
3907
+
3908
+ var colorCss = i$b`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color: var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color: var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color: var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color: var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color: var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color: var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color: var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-inverse, #f2c153)}`;
3909
+
3910
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3911
+ // See LICENSE in the project root for license information.
3912
+
3913
+
3914
+ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
3915
+ /**
3916
+ * auro-icon provides users a way to use the Auro Icons by simply passing in the category and name.
3917
+ *
3918
+ * @attr {String} category - The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
3919
+ * @attr {String} name - The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage
3920
+ * @attr {Boolean} customColor - Removes primary selector.
3921
+ * @attr {Boolean} customSvg - When true, auro-icon will render a custom SVG inside the default slot.
3922
+ * @attr {Boolean} label - Exposes content in slot as icon label.
3923
+ * @attr {Boolean} primary - DEPRECATED: Sets the icon to use the baseline primary icon style.
3924
+ * @attr {Boolean} accent - Sets the icon to use the accent style.
3925
+ * @attr {Boolean} emphasis - Sets the icon to use the emphasis style.
3926
+ * @attr {Boolean} disabled - Sets the icon to use the disabled style.
3927
+ * @attr {Boolean} error - Sets the icon to use the error style.
3928
+ * @attr {Boolean} info - Sets the icon to use the info style.
3929
+ * @attr {Boolean} secondary - Sets the icon to use the secondary style.
3930
+ * @attr {Boolean} tertiary - Sets the icon to use the tertiary style.
3931
+ * @attr {Boolean} subtle - Sets the icon to use the subtle style.
3932
+ * @attr {Boolean} success - Sets the icon to use the success style.
3933
+ * @attr {Boolean} warning - Sets the icon to use the warning style.
3934
+ * @attr {String} ariaHidden - Set aria-hidden value. Default is `true`. Option is `false`.
3935
+ * @attr {String} uri - Set the uri for CDN used when fetching icons
3936
+ * @slot - Hidden from visibility, used for a11y if icon description is needed.
3937
+ * @slot svg - Used for custom SVG content.
3938
+ */
3939
+
3940
+ // build the component class
3941
+ class AuroIcon extends BaseIcon {
3942
+ constructor() {
3943
+ super();
3944
+
3945
+ this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
3946
+
3947
+ this.privateDefaults();
3948
+ }
3949
+
3950
+ /**
3951
+ * Internal Defaults.
3952
+ * @private
3953
+ * @returns {void}
3954
+ */
3955
+ privateDefaults() {
3956
+ this.accent = false;
3957
+ this.customColor = false;
3958
+ this.customSvg = false;
3959
+ this.disabled = false;
3960
+ this.emphasis = false;
3961
+ this.error = false;
3962
+ this.info = false;
3963
+ this.label = false;
3964
+ this.primary = false;
3965
+ this.secondary = false;
3966
+ this.subtle = false;
3967
+ this.success = false;
3968
+ this.tertiary = false;
3969
+ this.warning = false;
3970
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
3971
+ }
3972
+
3973
+ // function to define props used within the scope of this component
3974
+ static get properties() {
3975
+ return {
3976
+ ...super.properties,
3977
+ accent: {
3978
+ type: Boolean,
3979
+ reflect: true
3980
+ },
3981
+ ariaHidden: {
3982
+ type: String,
3983
+ reflect: true
3984
+ },
3985
+ category: {
3986
+ type: String,
3987
+ reflect: true
3988
+ },
3989
+ customColor: {
3990
+ type: Boolean
3991
+ },
3992
+ customSvg: {
3993
+ type: Boolean
3994
+ },
3995
+ disabled: {
3996
+ type: Boolean,
3997
+ reflect: true
3998
+ },
3999
+ emphasis: {
4000
+ type: Boolean,
4001
+ reflect: true
4002
+ },
4003
+ error: {
4004
+ type: Boolean,
4005
+ reflect: true
4006
+ },
4007
+ info: {
4008
+ type: Boolean,
4009
+ reflect: true
4010
+ },
4011
+ label: {
4012
+ type: Boolean,
4013
+ reflect: true
4014
+ },
4015
+ name: {
4016
+ type: String,
4017
+ reflect: true
4018
+ },
4019
+ primary: {
4020
+ type: Boolean,
4021
+ reflect: true
4022
+ },
4023
+ secondary: {
4024
+ type: Boolean,
4025
+ reflect: true
4026
+ },
4027
+ subtle: {
4028
+ type: Boolean,
4029
+ reflect: true
4030
+ },
4031
+ success: {
4032
+ type: Boolean,
4033
+ reflect: true
4034
+ },
4035
+ tertiary: {
4036
+ type: Boolean,
4037
+ reflect: true
4038
+ },
4039
+ uri: {
4040
+ type: String
4041
+ },
4042
+ warning: {
4043
+ type: Boolean,
4044
+ reflect: true
4045
+ }
4046
+ };
4047
+ }
4048
+
4049
+ static get styles() {
4050
+ return [
4051
+ super.styles,
4052
+ i$b`${tokensCss}`,
4053
+ i$b`${styleCss}`,
4054
+ i$b`${colorCss}`
4055
+ ];
4056
+ }
4057
+
4058
+ /**
4059
+ * This will register this element with the browser.
4060
+ * @param {string} [name="auro-icon"] - The name of element that you want to register to.
4061
+ *
4062
+ * @example
4063
+ * AuroIcon.register("custom-icon") // this will register this element to <custom-icon/>
4064
+ *
4065
+ */
4066
+ static register(name = "auro-icon") {
4067
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
4068
+ }
4069
+
4070
+ connectedCallback() {
4071
+ super.connectedCallback();
4072
+
4073
+ // Add the tag name as an attribute if it is different than the component name
4074
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-icon');
4075
+ }
4076
+
4077
+ /**
4078
+ * @returns {void} Exposes CSS parts for styling from parent components.
4079
+ */
4080
+ exposeCssParts() {
4081
+ this.setAttribute('exportparts', 'svg:iconSvg');
4082
+ }
4083
+
4084
+ // function that renders the HTML and CSS into the scope of the component
4085
+ render() {
4086
+ const a11y = {
4087
+ 'labelContainer': true,
4088
+ 'util_displayHiddenVisually': !this.label
4089
+ };
4090
+
4091
+ const classes = {
4092
+ 'label': this.label
4093
+ };
4094
+
4095
+ return x$1`
4096
+ <div
4097
+ class="${e(classes)}"
4098
+ title="${o(this.title || undefined)}">
4099
+ <span aria-hidden="${o(this.ariaHidden ? this.ariaHidden : true)}" part="svg">
4100
+ ${this.customSvg ? x$1`
4101
+ <slot name="svg"></slot>
4102
+ ` : x$1`
4103
+ ${this.svg}
4104
+ `
4105
+ }
4106
+ </span>
4107
+
4108
+ <div class="${e(a11y)}">
4109
+ <slot></slot>
4110
+ </div>
4111
+ </div>
4112
+ `;
4113
+ }
4114
+ }
4115
+
4116
+ var iconVersion = '6.1.1';
4117
+
4118
+ var checkmarkIcon = {"role":"img","color":"currentColor","title":"","desc":"a small check mark.","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"checkmark-sm","category":"interface","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>"};
4119
+
4120
+ // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
4121
+ // See LICENSE in the project root for license information.
4122
+
4123
+
4124
+ /**
4125
+ * The auro-menu element provides users a way to define a menu option.
4126
+ *
4127
+ * @attr {String} value - Specifies the value to be sent to a server.
4128
+ * @attr {String} noCheckmark - When true, selected option will not show the checkmark.
4129
+ * @attr {Boolean} disabled - When true specifies that the menuoption is disabled.
4130
+ * @attr {Boolean} selected - Specifies that an option is selected.
4131
+ * @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
4132
+ * @slot Specifies text for an option, but is not the value.
4133
+ */
4134
+ class AuroMenuOption extends r$4 {
4135
+ constructor() {
4136
+ super();
4137
+
4138
+ /**
4139
+ * Generate unique names for dependency components.
4140
+ */
4141
+ const versioning = new AuroDependencyVersioning$1();
4142
+ this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
4143
+
4144
+ this.selected = false;
4145
+ this.nocheckmark = false;
4146
+ this.disabled = false;
4147
+
4148
+ /**
4149
+ * @private
4150
+ */
4151
+ this.tabIndex = -1;
4152
+
4153
+ /**
4154
+ * @private
4155
+ */
4156
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
4157
+ }
4158
+
4159
+ static get properties() {
4160
+ return {
4161
+ nocheckmark: {
4162
+ type: Boolean,
4163
+ reflect: true
4164
+ },
4165
+ selected: {
4166
+ type: Boolean,
4167
+ reflect: true
4168
+ },
4169
+ disabled: {
4170
+ type: Boolean,
4171
+ reflect: true
4172
+ },
4173
+ value: {
4174
+ type: String,
4175
+ reflect: true
4176
+ },
4177
+ tabIndex: {
4178
+ type: Number,
4179
+ reflect: true
4180
+ }
4181
+ };
4182
+ }
4183
+
4184
+ static get styles() {
4185
+ return [
4186
+ styleCss$1,
4187
+ colorCss$1,
4188
+ tokensCss$1
4189
+ ];
4190
+ }
4191
+
4192
+ /**
4193
+ * This will register this element with the browser.
4194
+ * @param {string} [name="auro-menuoption"] - The name of element that you want to register to.
4195
+ *
4196
+ * @example
4197
+ * AuroMenuOption.register("custom-menuoption") // this will register this element to <custom-menuoption/>
4198
+ *
4199
+ */
4200
+ static register(name = "auro-menuoption") {
4201
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenuOption);
4202
+ }
4203
+
4204
+ firstUpdated() {
4205
+ // Add the tag name as an attribute if it is different than the component name
4206
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
4207
+
4208
+ this.setAttribute('role', 'option');
4209
+ this.setAttribute('aria-selected', 'false');
4210
+
4211
+ this.addEventListener('mouseover', () => {
4212
+ this.dispatchEvent(new CustomEvent('auroMenuOption-mouseover', {
4213
+ bubbles: true,
4214
+ cancelable: false,
4215
+ composed: true,
4216
+ detail: this
4217
+ }));
4218
+ });
4219
+ }
4220
+
4221
+ // observer for selected property changes
4222
+ updated(changedProperties) {
4223
+ if (changedProperties.has('selected')) {
4224
+ this.setAttribute('aria-selected', this.selected.toString());
4225
+ }
4226
+ }
4227
+
4228
+ /**
4229
+ * Generates an HTML element containing an SVG icon based on the provided `svgContent`.
4230
+ *
4231
+ * @private
4232
+ * @param {string} svgContent - The SVG content to be embedded.
4233
+ * @returns {Element} The HTML element containing the SVG icon.
4234
+ */
4235
+ generateIconHtml(svgContent) {
4236
+ const dom = new DOMParser().parseFromString(svgContent, 'text/html');
4237
+ const svg = dom.body.firstChild;
4238
+
4239
+ svg.setAttribute('slot', 'svg');
4240
+
4241
+ return u$3`<${this.iconTag} customColor customSvg slot="icon">${svg}</${this.iconTag}>`;
4242
+ }
4243
+
4244
+ render() {
4245
+ return u$3`
4246
+ ${this.selected && !this.nocheckmark ? this.generateIconHtml(checkmarkIcon.svg) : undefined}
4247
+ <slot></slot>
4248
+ `;
4249
+ }
4250
+ }
4251
+
4252
+ // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
4253
+ // See LICENSE in the project root for license information.
4254
+
4255
+
4256
+ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
4257
+ /**
4258
+ * The auro-menu element provides users a way to select from a list of options.
4259
+ * @attr {Object} optionSelected - Specifies the current selected menuOption.
4260
+ * @attr {String} matchWord - Specifies the a string used to highlight matched string parts in options.
4261
+ * @attr {Boolean} disabled - When true, the entire menu and all options are disabled;
4262
+ * @attr {Boolean} noCheckmark - When true, selected option will not show the checkmark.
4263
+ * @attr {String} value - Value selected for the menu.
4264
+ * @event auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
4265
+ * @event selectedOption - (DEPRECATED) Notifies that a new menuoption selection has been made.
4266
+ * @event auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
4267
+ * @event auroMenuActivatedOption - (DEPRECATED) Notifies that a menuoption has been made `active`.
4268
+ * @event auroMenu-selectValueFailure - Notifies that a an attempt to select a menuoption by matching a value has failed.
4269
+ * @event auroMenuSelectValueFailure - (DEPRECATED) Notifies that a an attempt to select a menuoption by matching a value has failed.
4270
+ * @event auroMenu-customEventFired - Notifies that a custom event has been fired.
4271
+ * @event auroMenuCustomEventFired - (DEPRECATED) Notifies that a custom event has been fired.
4272
+ * @event auroMenu-selectValueReset - Notifies that the component value has been reset.
4273
+ * @slot Slot for insertion of menu options.
4274
+ */
4275
+
4276
+ /* eslint-disable no-magic-numbers, max-lines */
4277
+
4278
+ class AuroMenu extends r$4 {
4279
+ constructor() {
4280
+ super();
4281
+ this.value = undefined;
4282
+ this.optionSelected = undefined;
4283
+ this.matchWord = undefined;
4284
+ this.noCheckmark = false;
4285
+ this.optionActive = undefined;
4286
+
4287
+ /**
4288
+ * @private
4289
+ */
4290
+ this.rootMenu = true;
4291
+
4292
+ /**
4293
+ * @private
4294
+ */
4295
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
4296
+
4297
+ /**
4298
+ * @private
4299
+ */
4300
+ this.nestingSpacer = '<span class="nestingSpacer"></span>';
4301
+ }
4302
+
4303
+ static get properties() {
4304
+ return {
4305
+ noCheckmark: {
4306
+ type: Boolean,
4307
+ reflect: true
4308
+ },
4309
+ disabled: {
4310
+ type: Boolean,
4311
+ reflect: true
4312
+ },
4313
+ optionSelected: { type: Object },
4314
+ optionActive: { type: Object },
4315
+ matchWord: { type: String },
4316
+ value: { type: String }
4317
+ };
4318
+ }
4319
+
4320
+ static get styles() {
4321
+ return [
4322
+ styleCss$2,
4323
+ colorCss$2,
4324
+ tokensCss$1
4325
+ ];
4326
+ }
4327
+
4328
+ /**
4329
+ * This will register this element with the browser.
4330
+ * @param {string} [name="auro-menu"] - The name of element that you want to register to.
4331
+ *
4332
+ * @example
4333
+ * AuroMenu.register("custom-menu") // this will register this element to <custom-menu/>
4334
+ *
4335
+ */
4336
+ static register(name = "auro-menu") {
4337
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenu);
4338
+ }
4339
+
4340
+ /**
4341
+ * Passes the noCheckmark attribute to all nested auro-menuoptions.
4342
+ * @private
4343
+ * @returns {void}
4344
+ */
4345
+ handleNoCheckmarkAttr() {
4346
+ if (this.noCheckmark) {
4347
+ const menus = this.querySelectorAll('auro-menu, [auro-menu]');
4348
+
4349
+ menus.forEach((menu) => {
4350
+ menu.setAttribute('noCheckmark', '');
4351
+ });
4352
+
4353
+ const options = this.querySelectorAll('auro-menuoption, [auro-menuoption]');
4354
+
4355
+ options.forEach((option) => {
4356
+ option.setAttribute('noCheckmark', '');
4357
+ });
4358
+ }
4359
+ }
4360
+
4361
+ firstUpdated() {
4362
+ // Add the tag name as an attribute if it is different than the component name
4363
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-menu');
4364
+
4365
+ this.addEventListener('keydown', this.handleKeyDown);
4366
+ }
4367
+
4368
+ updated(changedProperties) {
4369
+ if (changedProperties.has('matchWord')) {
4370
+ this.markOptions();
4371
+ }
4372
+
4373
+ if (changedProperties.has('value')) {
4374
+ this.selectByValue(this.value);
4375
+ }
4376
+
4377
+ if (changedProperties.has('disabled')) {
4378
+ const options = Array.from(this.querySelectorAll('auro-menuoption, [auro-menuoption]'));
4379
+
4380
+ for (const element of options) {
4381
+ element.disabled = this.disabled;
4382
+ }
4383
+ }
4384
+ }
4385
+
4386
+ /**
4387
+ * @private
4388
+ * @param {Object} option - The menuoption to check for interactive state.
4389
+ * @returns {Boolean} Returns true if the option is interactive.
4390
+ */
4391
+ optionInteractive(option) {
4392
+ return !option.hasAttribute('hidden') && !option.hasAttribute('disabled') && !option.hasAttribute('static');
4393
+ }
4394
+
4395
+ /**
4396
+ * @private
4397
+ * @returns {void} When called will update the DOM with visible suggest text matches.
4398
+ */
4399
+ markOptions() {
4400
+ if (this.items && this.items.length > 0 && (this.matchWord && this.matchWord.length > 0)) {
4401
+
4402
+ // Escape special regex characters
4403
+ const escapedWord = this.matchWord.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
4404
+
4405
+ // Global, case-insensitive, unicode matching regex pattern
4406
+ const regexWord = new RegExp(escapedWord, 'giu');
4407
+
4408
+ this.items.forEach((item) => {
4409
+ if (this.optionInteractive(item) && !item.hasAttribute('persistent')) {
4410
+ const nested = item.querySelectorAll('.nestingSpacer');
4411
+ const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
4412
+
4413
+ item.innerHTML = nestingSpacerBundle + item.textContent.replace(regexWord, (match) => `<strong>${match}</strong>`);
4414
+ }
4415
+ });
4416
+ }
4417
+ }
4418
+
4419
+ /**
4420
+ * Reset the menu and all options.
4421
+ */
4422
+ resetOptionsStates() {
4423
+ this.optionSelected = undefined;
4424
+ if (this.items) {
4425
+ this.items.forEach((item) => {
4426
+ item.classList.remove('active');
4427
+ item.removeAttribute('selected');
4428
+ });
4429
+ }
4430
+ }
4431
+
4432
+ /**
4433
+ * Set the attributes on the selected menuoption, the menu value and stored option.
4434
+ * @param {Object} option - The menuoption to be selected.
4435
+ * @private
4436
+ */
4437
+ handleLocalSelectState(option) {
4438
+ option.setAttribute('selected', '');
4439
+ option.classList.add('active');
4440
+ option.ariaSelected = true;
4441
+
4442
+ this.value = option.value;
4443
+ this.optionSelected = option;
4444
+ this.index = this.items.indexOf(option);
4445
+ }
4446
+
4447
+ /**
4448
+ * Notify selection change.
4449
+ * @private
4450
+ * @return {void}
4451
+ */
4452
+ notifySelectionChange() {
4453
+ // this event needs to be removed after select and combobox are updated to use the new standard name
4454
+ this.dispatchEvent(new CustomEvent('selectedOption', {
4455
+ bubbles: true,
4456
+ cancelable: false,
4457
+ composed: true,
4458
+ }));
4459
+
4460
+ this.dispatchEvent(new CustomEvent('auroMenu-selectedOption', {
4461
+ bubbles: true,
4462
+ cancelable: false,
4463
+ composed: true,
4464
+ }));
4465
+ }
4466
+
4467
+ /**
4468
+ * Process actions for making making a menuoption selection.
4469
+ */
4470
+ makeSelection() {
4471
+ if (!this.items) {
4472
+ this.initItems();
4473
+ }
4474
+
4475
+ if (this.items[this.index] && !this.items[this.index].hasAttribute('disabled')) {
4476
+ this.resetOptionsStates();
4477
+
4478
+ if (this.index >= 0) {
4479
+ const option = this.items[this.index];
4480
+
4481
+ // only handle options that are not disabled, hidden or static
4482
+ if (option && this.optionInteractive(option)) {
4483
+ // fire custom event if defined otherwise make selection
4484
+ if (option.hasAttribute('event')) {
4485
+ this.dispatchEvent(new CustomEvent(option.getAttribute('event'), {
4486
+ bubbles: true,
4487
+ cancelable: false,
4488
+ composed: true,
4489
+ }));
4490
+
4491
+ // this event needs to be removed after select and combobox are updated to use the new standard name
4492
+ this.dispatchEvent(new CustomEvent('auroMenuCustomEventFired', {
4493
+ bubbles: true,
4494
+ cancelable: false,
4495
+ composed: true,
4496
+ }));
4497
+
4498
+ this.dispatchEvent(new CustomEvent('auroMenu-customEventFired', {
4499
+ bubbles: true,
4500
+ cancelable: false,
4501
+ composed: true,
4502
+ }));
4503
+ } else {
4504
+ this.handleLocalSelectState(option);
4505
+ }
4506
+ }
4507
+ }
4508
+ }
4509
+
4510
+ this.notifySelectionChange();
4511
+ }
4512
+
4513
+ /**
4514
+ * Manage ArrowDown, ArrowUp and Enter keyboard events.
4515
+ * @private
4516
+ * @param {Object} event - Event object from the browser.
4517
+ */
4518
+ handleKeyDown(event) {
4519
+ event.preventDefault();
4520
+
4521
+ // With ArrowDown/ArrowUp events, pass new value to selectNextItem()
4522
+ // With Enter event, set value and apply attrs
4523
+ switch (event.key) {
4524
+ case "ArrowDown":
4525
+ this.selectNextItem('down');
4526
+ break;
4527
+
4528
+ case "ArrowUp":
4529
+ this.selectNextItem('up');
4530
+ break;
4531
+
4532
+ case "Enter":
4533
+ this.makeSelection();
4534
+ break;
4535
+ }
4536
+ }
4537
+
4538
+ /**
4539
+ * Initializes all menu options in the DOM. This must be re-run every time the options are changed.
4540
+ * @private
4541
+ */
4542
+ initItems() {
4543
+ this.items = Array.from(this.querySelectorAll('auro-menuoption, [auro-menuoption]'));
4544
+ this.handleNoCheckmarkAttr();
4545
+ }
4546
+
4547
+ /**
4548
+ * Sets the index value of the selected item or first non-disabled menuoption.
4549
+ * @private
4550
+ */
4551
+ getSelectedIndex() {
4552
+ // find the first `selected` and not `disabled`, `hidden` or `static` option
4553
+ const index = this.items.findIndex((option) => option.hasAttribute('selected') && this.optionInteractive(option));
4554
+
4555
+ if (index >= 0) {
4556
+ this.index = index;
4557
+ this.makeSelection();
4558
+ }
4559
+ }
4560
+
4561
+ /**
4562
+ * Using value of current this.index evaluates index
4563
+ * of next :focus to set based on array of this.items ignoring items
4564
+ * with disabled attr.
4565
+ *
4566
+ * The event.target is not used as the function needs to know where to go,
4567
+ * versus knowing where it is.
4568
+ * @param {String} moveDirection - Up or Down based on keyboard event.
4569
+ */
4570
+ selectNextItem(moveDirection) {
4571
+ if (this.index >= 0) {
4572
+ this.items[this.index].classList.remove('active');
4573
+
4574
+ // calculate which is the selection we should focus next
4575
+ let increment = 0;
4576
+
4577
+ if (moveDirection === 'down') {
4578
+ increment = 1;
4579
+ } else if (moveDirection === 'up') {
4580
+ increment = -1;
4581
+ }
4582
+
4583
+ this.index += increment;
4584
+
4585
+ // keep looping inside the array of options
4586
+ if (this.index > this.items.length - 1) {
4587
+ this.index = 0;
4588
+ } else if (this.index < 0) {
4589
+ this.index = this.items.length - 1;
4590
+ }
4591
+
4592
+ // check if new index is disabled, static or hidden, if so, execute again
4593
+ if (!this.optionInteractive(this.items[this.index])) {
4594
+ this.selectNextItem(moveDirection);
4595
+ } else {
4596
+ // apply focus to new index
4597
+ this.updateActiveOption(this.index);
4598
+ }
4599
+ } else {
4600
+ this.index = 0;
4601
+
4602
+ if (this.items[this.index].hasAttribute('hidden') || this.items[this.index].hasAttribute('disabled')) {
4603
+ this.selectNextItem(moveDirection);
4604
+ } else {
4605
+ this.updateActiveOption(this.index);
4606
+ }
4607
+ }
4608
+ }
4609
+
4610
+ /**
4611
+ * Used for applying indentation to each level of nested menu.
4612
+ * @private
4613
+ * @param {String} menu - Root level menu object.
4614
+ */
4615
+ handleNestedMenus(menu) {
4616
+ const nestedMenus = menu.querySelectorAll('auro-menu, [auro-menu');
4617
+
4618
+ if (nestedMenus.length === 0) {
4619
+ return;
4620
+ }
4621
+
4622
+ nestedMenus.forEach((nestedMenu) => {
4623
+ const options = nestedMenu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption');
4624
+
4625
+ options.forEach((option) => {
4626
+ option.innerHTML = this.nestingSpacer + option.innerHTML;
4627
+ });
4628
+
4629
+ this.handleNestedMenus(nestedMenu);
4630
+ });
4631
+ }
4632
+
4633
+ /**
4634
+ * Method to apply `selected` attribute to `menuoption` via `value`.
4635
+ * @private
4636
+ * @param {String} value - Must match a unique `menuoption` value.
4637
+ */
4638
+ selectByValue(value) {
4639
+ let valueMatch = false;
4640
+ if (!this.items) {
4641
+ this.initItems();
4642
+ }
4643
+
4644
+ this.index = undefined;
4645
+
4646
+ if (this.value && this.value.length > 0) {
4647
+ for (let index = 0; index < this.items.length; index += 1) {
4648
+ if (this.items[index].value === value) {
4649
+ valueMatch = true;
4650
+ this.index = index;
4651
+ }
4652
+ }
4653
+
4654
+ if (!valueMatch) {
4655
+ // reset the menu to no selection
4656
+ this.index = undefined;
4657
+
4658
+ // this event needs to be removed after select and combobox are updated to use the new standard name
4659
+ this.dispatchEvent(new CustomEvent('auroMenuSelectValueFailure', {
4660
+ bubbles: true,
4661
+ cancelable: false,
4662
+ composed: true,
4663
+ }));
4664
+
4665
+ this.dispatchEvent(new CustomEvent('auroMenu-selectValueFailure', {
4666
+ bubbles: true,
4667
+ cancelable: false,
4668
+ composed: true,
4669
+ }));
4670
+ } else {
4671
+ this.makeSelection();
4672
+ }
4673
+ } else {
4674
+ this.resetOptionsStates();
4675
+
4676
+ this.dispatchEvent(new CustomEvent('auroMenu-selectValueReset', {
4677
+ bubbles: true,
4678
+ cancelable: false,
4679
+ composed: true,
4680
+ }));
4681
+ }
4682
+ }
4683
+
4684
+ /**
4685
+ * Used to make the active state for options follow mouseover.
4686
+ * @param {Number} index - Index of the menuoption that will be made active.
4687
+ * @private
4688
+ */
4689
+ updateActiveOption(index) {
4690
+ this.items.forEach((item) => {
4691
+ item.classList.remove('active');
4692
+ });
4693
+ this.items[index].classList.add('active');
4694
+ this.optionActive = this.items[index];
4695
+
4696
+ this.dispatchEvent(new CustomEvent('auroMenuActivatedOption', {
4697
+ bubbles: true,
4698
+ cancelable: false,
4699
+ composed: true,
4700
+ detail: this.items[index]
4701
+ }));
4702
+
4703
+ this.dispatchEvent(new CustomEvent('auroMenu-activatedOption', {
4704
+ bubbles: true,
4705
+ cancelable: false,
4706
+ composed: true,
4707
+ detail: this.items[index]
4708
+ }));
4709
+ }
4710
+
4711
+ /**
4712
+ * Used to only make a selection when a menuoption is receiving a mousedown event.
4713
+ * @param {Event} evt - Mousedown event.
4714
+ * @private
4715
+ */
4716
+ handleMenuMouseDown(evt) {
4717
+ if (evt.target !== this) {
4718
+ this.makeSelection();
4719
+ }
4720
+ }
4721
+
4722
+ /**
4723
+ * Used for @slotchange event on slotted element.
4724
+ * @private
4725
+ */
4726
+ handleSlotItems() {
4727
+ // Determine if this is the root of the menu/submenu layout.
4728
+ if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
4729
+ this.rootMenu = false;
4730
+ }
4731
+
4732
+ // If this is the root menu (not a nested menu) handle events, states and styling.
4733
+ if (this.rootMenu) {
4734
+ this.initItems();
4735
+ this.setAttribute('role', 'listbox');
4736
+ this.setAttribute('root', '');
4737
+ this.handleNestedMenus(this);
4738
+ this.markOptions();
4739
+ this.index = -1;
4740
+ this.getSelectedIndex();
4741
+
4742
+ this.addEventListener('keydown', this.handleKeyDown);
4743
+ this.addEventListener('mousedown', this.handleMenuMouseDown);
4744
+ this.addEventListener('auroMenuOption-mouseover', (evt) => {
4745
+ this.index = this.items.indexOf(evt.target);
4746
+ this.updateActiveOption(this.index);
4747
+ });
4748
+ } else {
4749
+ // make sure to update all menuoption noCheckmark attributes when the menu is dynamically changed
4750
+ this.handleNoCheckmarkAttr();
4751
+ }
4752
+ }
4753
+
4754
+ render() {
4755
+ return x$1`
4756
+ <slot @slotchange=${this.handleSlotItems}></slot>
4757
+ `;
4758
+ }
4759
+ }
4760
+
4761
+ AuroMenu.register();
4762
+ AuroMenuOption.register();
4763
+
4764
+ // import { exampleFunction } from "exampleFile.js";
4765
+
4766
+
4767
+ AuroSelect.register(); // registering to `auro-select`
4768
+ AuroSelect.register('custom-select');