@aurodesignsystem/auro-formkit 2.0.0-beta.2 → 2.0.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 (257) hide show
  1. package/.turbo/cache/013a48308b893dac-meta.json +1 -1
  2. package/.turbo/cache/02244170c798a2bd-meta.json +1 -0
  3. package/.turbo/cache/02244170c798a2bd.tar.zst +0 -0
  4. package/.turbo/cache/051ff97a20add0e2-meta.json +1 -0
  5. package/.turbo/cache/051ff97a20add0e2.tar.zst +0 -0
  6. package/.turbo/cache/07ca42419b9f050c-meta.json +1 -1
  7. package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -1
  8. package/.turbo/cache/0ea853339c064fa1-meta.json +1 -0
  9. package/.turbo/cache/0ea853339c064fa1.tar.zst +0 -0
  10. package/.turbo/cache/16658beec9f4a809-meta.json +1 -0
  11. package/.turbo/cache/16658beec9f4a809.tar.zst +0 -0
  12. package/.turbo/cache/17259cf94d8f8925-meta.json +1 -1
  13. package/.turbo/cache/1b9818717e4bdf9f-meta.json +1 -0
  14. package/.turbo/cache/1b9818717e4bdf9f.tar.zst +0 -0
  15. package/.turbo/cache/1c0f580d37370ba2-meta.json +1 -0
  16. package/.turbo/cache/1c0f580d37370ba2.tar.zst +0 -0
  17. package/.turbo/cache/1c99a949ec63ab35-meta.json +1 -1
  18. package/.turbo/cache/1df4710eef8ed00d-meta.json +1 -0
  19. package/.turbo/cache/1df4710eef8ed00d.tar.zst +0 -0
  20. package/.turbo/cache/204b66d1b253e9cc-meta.json +1 -0
  21. package/.turbo/cache/204b66d1b253e9cc.tar.zst +0 -0
  22. package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -1
  23. package/.turbo/cache/2a5d0939d6fc1052-meta.json +1 -0
  24. package/.turbo/cache/2a5d0939d6fc1052.tar.zst +0 -0
  25. package/.turbo/cache/2e3b829fcf75c836-meta.json +1 -0
  26. package/.turbo/cache/2e3b829fcf75c836.tar.zst +0 -0
  27. package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -1
  28. package/.turbo/cache/3d380d0d40404cac-meta.json +1 -0
  29. package/.turbo/cache/3d380d0d40404cac.tar.zst +0 -0
  30. package/.turbo/cache/3e12285c614db539-meta.json +1 -0
  31. package/.turbo/cache/3e12285c614db539.tar.zst +0 -0
  32. package/.turbo/cache/45035bf5c4147ccd-meta.json +1 -1
  33. package/.turbo/cache/5bf2d3f7ba5891e0-meta.json +1 -0
  34. package/.turbo/cache/5bf2d3f7ba5891e0.tar.zst +0 -0
  35. package/.turbo/cache/5f304c0f37ef25f3-meta.json +1 -1
  36. package/.turbo/cache/64de7a53e02db647-meta.json +1 -1
  37. package/.turbo/cache/691a74627ec57993-meta.json +1 -1
  38. package/.turbo/cache/69aae513b7ec6c7d-meta.json +1 -1
  39. package/.turbo/cache/6dd67d179191bda8-meta.json +1 -0
  40. package/.turbo/cache/6dd67d179191bda8.tar.zst +0 -0
  41. package/.turbo/cache/6dd7058e6703cb35-meta.json +1 -1
  42. package/.turbo/cache/73e9073a5274616d-meta.json +1 -1
  43. package/.turbo/cache/773edc0f83c8c5a5-meta.json +1 -1
  44. package/.turbo/cache/786a822763403879-meta.json +1 -1
  45. package/.turbo/cache/7e1043cffa69f327-meta.json +1 -0
  46. package/.turbo/cache/7e1043cffa69f327.tar.zst +0 -0
  47. package/.turbo/cache/7ffd501e81790676-meta.json +1 -0
  48. package/.turbo/cache/7ffd501e81790676.tar.zst +0 -0
  49. package/.turbo/cache/80a13352066a9801-meta.json +1 -0
  50. package/.turbo/cache/80a13352066a9801.tar.zst +0 -0
  51. package/.turbo/cache/80b5d974184a01df-meta.json +1 -1
  52. package/.turbo/cache/8954c6073396fadd-meta.json +1 -1
  53. package/.turbo/cache/8e79bd5c3a16a72e-meta.json +1 -0
  54. package/.turbo/cache/8e9ebc3df0e18de0-meta.json +1 -0
  55. package/.turbo/cache/8e9ebc3df0e18de0.tar.zst +0 -0
  56. package/.turbo/cache/92daa6d7c389d548-meta.json +1 -1
  57. package/.turbo/cache/973d0eea26083f4b-meta.json +1 -0
  58. package/.turbo/cache/973d0eea26083f4b.tar.zst +0 -0
  59. package/.turbo/cache/9c6ad42729c7b2d8-meta.json +1 -0
  60. package/.turbo/cache/9c6ad42729c7b2d8.tar.zst +0 -0
  61. package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -1
  62. package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
  63. package/.turbo/cache/a9a9d012c83882d8-meta.json +1 -0
  64. package/.turbo/cache/a9a9d012c83882d8.tar.zst +0 -0
  65. package/.turbo/cache/b54fc4f664a7a5a0-meta.json +1 -1
  66. package/.turbo/cache/ba4418918621fbcd-meta.json +1 -1
  67. package/.turbo/cache/be7c23c37b8ec74b-meta.json +1 -1
  68. package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
  69. package/.turbo/cache/bffc7582905c2a5e-meta.json +1 -0
  70. package/.turbo/cache/bffc7582905c2a5e.tar.zst +0 -0
  71. package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +1 -1
  72. package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
  73. package/.turbo/cache/cc81de9c0b452a7c-meta.json +1 -1
  74. package/.turbo/cache/d572ebb3c833e8f4-meta.json +1 -0
  75. package/.turbo/cache/d572ebb3c833e8f4.tar.zst +0 -0
  76. package/.turbo/cache/d61543843c932504-meta.json +1 -0
  77. package/.turbo/cache/d61543843c932504.tar.zst +0 -0
  78. package/.turbo/cache/dad1301ac69bcb85-meta.json +1 -1
  79. package/.turbo/cache/db361cb6578dca84-meta.json +1 -0
  80. package/.turbo/cache/db361cb6578dca84.tar.zst +0 -0
  81. package/.turbo/cache/dea5945f55c6aba5-meta.json +1 -0
  82. package/.turbo/cache/dea5945f55c6aba5.tar.zst +0 -0
  83. package/.turbo/cache/e992dab20aeefbaf-meta.json +1 -1
  84. package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
  85. package/.turbo/cache/f3ff9040a2196834-meta.json +1 -0
  86. package/.turbo/cache/f3ff9040a2196834.tar.zst +0 -0
  87. package/.turbo/cache/f817d89688cefca8-meta.json +1 -0
  88. package/.turbo/cache/f817d89688cefca8.tar.zst +0 -0
  89. package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -1
  90. package/.turbo/cache/fc57c17867dcac3d-meta.json +1 -0
  91. package/.turbo/cache/fc57c17867dcac3d.tar.zst +0 -0
  92. package/CHANGELOG.md +44 -0
  93. package/components/checkbox/.turbo/turbo-build.log +3 -3
  94. package/components/checkbox/.turbo/turbo-bundler.log +3 -3
  95. package/components/checkbox/demo/api.md +4 -2
  96. package/components/checkbox/demo/api.min.js +31 -36
  97. package/components/checkbox/demo/index.min.js +31 -36
  98. package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
  99. package/components/checkbox/dist/index.js +31 -36
  100. package/components/checkbox/src/auro-checkbox-group.js +2 -2
  101. package/components/combobox/.turbo/turbo-build.log +3 -3
  102. package/components/combobox/demo/api.md +17 -15
  103. package/components/combobox/demo/api.min.js +500 -218
  104. package/components/combobox/demo/index.min.js +500 -218
  105. package/components/combobox/dist/auro-combobox.d.ts +11 -4
  106. package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
  107. package/components/combobox/dist/index.js +499 -217
  108. package/components/combobox/src/auro-combobox.js +22 -20
  109. package/components/counter/.turbo/turbo-build.log +3 -3
  110. package/components/counter/.turbo/turbo-bundler.log +3 -3
  111. package/components/datepicker/.turbo/turbo-build.log +9 -8
  112. package/components/datepicker/demo/api.md +107 -87
  113. package/components/datepicker/demo/api.min.js +492 -232
  114. package/components/datepicker/demo/index.min.js +492 -232
  115. package/components/datepicker/dist/auro-datepicker.d.ts +6 -13
  116. package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
  117. package/components/datepicker/dist/index.js +492 -232
  118. package/components/datepicker/src/auro-datepicker.js +15 -35
  119. package/components/dropdown/.turbo/turbo-build.log +3 -3
  120. package/components/dropdown/.turbo/turbo-bundler.log +2 -2
  121. package/components/dropdown/demo/api.md +4 -4
  122. package/components/dropdown/demo/api.min.js +166 -42
  123. package/components/dropdown/demo/index.min.js +166 -42
  124. package/components/dropdown/dist/auro-dropdown.d.ts +93 -34
  125. package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -1
  126. package/components/dropdown/dist/auro-dropdownBib.d.ts +9 -3
  127. package/components/dropdown/dist/auro-dropdownBib.d.ts.map +1 -1
  128. package/components/dropdown/dist/index.js +166 -42
  129. package/components/dropdown/src/auro-dropdown.js +154 -39
  130. package/components/dropdown/src/auro-dropdownBib.js +12 -3
  131. package/components/dropdown/src/styles/style-css.js +1 -1
  132. package/components/dropdown/src/styles/style.css +4 -0
  133. package/components/dropdown/src/styles/style.scss +5 -0
  134. package/components/form/.turbo/turbo-build.log +3 -3
  135. package/components/form/.turbo/turbo-bundler.log +3 -3
  136. package/components/input/.turbo/turbo-build$colon$sass.log +51 -1
  137. package/components/input/.turbo/turbo-build.log +56 -6
  138. package/components/input/.turbo/turbo-bundler.log +3 -3
  139. package/components/input/.turbo/turbo-sass$colon$render.log +6 -0
  140. package/components/input/demo/api.md +83 -81
  141. package/components/input/demo/api.min.js +282 -121
  142. package/components/input/demo/index.md +6 -6
  143. package/components/input/demo/index.min.js +282 -121
  144. package/components/input/dist/auro-input.d.ts.map +1 -1
  145. package/components/input/dist/base-input.d.ts +155 -84
  146. package/components/input/dist/base-input.d.ts.map +1 -1
  147. package/components/input/dist/index.js +282 -121
  148. package/components/input/dist/styles/mixins-css.d.ts +3 -0
  149. package/components/input/dist/styles/mixins-css.d.ts.map +1 -0
  150. package/components/input/src/auro-input.js +0 -1
  151. package/components/input/src/base-input.js +252 -85
  152. package/components/input/src/styles/borders.scss +3 -19
  153. package/components/input/src/styles/color.css +1 -2
  154. package/components/input/src/styles/color.scss +3 -10
  155. package/components/input/src/styles/input-css.js +1 -1
  156. package/components/input/src/styles/input.css +1 -1
  157. package/components/input/src/styles/input.scss +4 -1
  158. package/components/input/src/styles/label-css.js +1 -1
  159. package/components/input/src/styles/label.css +1 -1
  160. package/components/input/src/styles/label.scss +4 -7
  161. package/components/input/src/styles/mixins-css.js +2 -0
  162. package/components/input/src/styles/mixins.css +1 -0
  163. package/components/input/src/styles/mixins.scss +45 -0
  164. package/components/input/src/styles/notificationIcons-css.js +1 -1
  165. package/components/input/src/styles/notificationIcons.css +13 -12
  166. package/components/input/src/styles/notificationIcons.scss +17 -25
  167. package/components/input/src/styles/style-css.js +1 -1
  168. package/components/input/src/styles/style.css +15 -17
  169. package/components/input/src/styles/style.scss +0 -4
  170. package/components/menu/.turbo/turbo-build.log +3 -3
  171. package/components/menu/.turbo/turbo-bundler.log +3 -3
  172. package/components/menu/demo/api.min.js +1 -1
  173. package/components/menu/demo/index.min.js +1 -1
  174. package/components/menu/dist/auro-menu.d.ts +1 -1
  175. package/components/menu/dist/index.js +1 -1
  176. package/components/menu/src/auro-menu.js +1 -1
  177. package/components/radio/.turbo/turbo-build.log +3 -3
  178. package/components/radio/.turbo/turbo-bundler.log +3 -3
  179. package/components/radio/demo/api.md +3 -1
  180. package/components/radio/demo/api.min.js +30 -35
  181. package/components/radio/demo/index.min.js +30 -35
  182. package/components/radio/dist/index.js +30 -35
  183. package/components/radio/src/auro-radio-group.js +1 -1
  184. package/components/select/.turbo/turbo-build.log +7 -9
  185. package/components/select/demo/api.md +45 -110
  186. package/components/select/demo/api.min.js +320 -224
  187. package/components/select/demo/index.md +100 -43
  188. package/components/select/demo/index.min.js +320 -220
  189. package/components/select/dist/auro-select.d.ts +64 -51
  190. package/components/select/dist/auro-select.d.ts.map +1 -1
  191. package/components/select/dist/index.js +314 -201
  192. package/components/select/src/auro-select.js +100 -118
  193. package/components/select/src/styles/style-css.js +1 -1
  194. package/components/select/src/styles/style.css +7 -0
  195. package/components/select/src/styles/style.scss +11 -1
  196. package/package.json +1 -1
  197. package/packages/form-validation/src/validation.js +29 -34
  198. package/.turbo/cache/0663fcbb1d711029-meta.json +0 -1
  199. package/.turbo/cache/0663fcbb1d711029.tar.zst +0 -0
  200. package/.turbo/cache/0a2b0a4df8a0443f-meta.json +0 -1
  201. package/.turbo/cache/120c8e207aa1ba35-meta.json +0 -1
  202. package/.turbo/cache/120c8e207aa1ba35.tar.zst +0 -0
  203. package/.turbo/cache/17dd4bdef6550a07-meta.json +0 -1
  204. package/.turbo/cache/17dd4bdef6550a07.tar.zst +0 -0
  205. package/.turbo/cache/1de15d89eed2d760-meta.json +0 -1
  206. package/.turbo/cache/1de15d89eed2d760.tar.zst +0 -0
  207. package/.turbo/cache/2990aaa7ebc5b967-meta.json +0 -1
  208. package/.turbo/cache/2990aaa7ebc5b967.tar.zst +0 -0
  209. package/.turbo/cache/32c0b9995fb5f8dd-meta.json +0 -1
  210. package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
  211. package/.turbo/cache/47ba2b5ebdb579e9-meta.json +0 -1
  212. package/.turbo/cache/47ba2b5ebdb579e9.tar.zst +0 -0
  213. package/.turbo/cache/4f92cea2d8c63de2-meta.json +0 -1
  214. package/.turbo/cache/4f92cea2d8c63de2.tar.zst +0 -0
  215. package/.turbo/cache/56cb35d4c7473a23-meta.json +0 -1
  216. package/.turbo/cache/56cb35d4c7473a23.tar.zst +0 -0
  217. package/.turbo/cache/5c16ce3cff5c9dff-meta.json +0 -1
  218. package/.turbo/cache/5c16ce3cff5c9dff.tar.zst +0 -0
  219. package/.turbo/cache/626afdc67e0cb540-meta.json +0 -1
  220. package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
  221. package/.turbo/cache/6ef81cf9a66f982a-meta.json +0 -1
  222. package/.turbo/cache/6ef81cf9a66f982a.tar.zst +0 -0
  223. package/.turbo/cache/784c03fe9fd5ac05-meta.json +0 -1
  224. package/.turbo/cache/784c03fe9fd5ac05.tar.zst +0 -0
  225. package/.turbo/cache/87219c41a4ace9cd-meta.json +0 -1
  226. package/.turbo/cache/87219c41a4ace9cd.tar.zst +0 -0
  227. package/.turbo/cache/8b735250fa5a62bf-meta.json +0 -1
  228. package/.turbo/cache/8b735250fa5a62bf.tar.zst +0 -0
  229. package/.turbo/cache/9154e8fe6ab767ea-meta.json +0 -1
  230. package/.turbo/cache/9154e8fe6ab767ea.tar.zst +0 -0
  231. package/.turbo/cache/993dff2edb7b6766-meta.json +0 -1
  232. package/.turbo/cache/993dff2edb7b6766.tar.zst +0 -0
  233. package/.turbo/cache/9a097d6576dadd64-meta.json +0 -1
  234. package/.turbo/cache/9a097d6576dadd64.tar.zst +0 -0
  235. package/.turbo/cache/a49cc58242467fdc-meta.json +0 -1
  236. package/.turbo/cache/a49cc58242467fdc.tar.zst +0 -0
  237. package/.turbo/cache/a6a56bb802e1c20f-meta.json +0 -1
  238. package/.turbo/cache/a6a56bb802e1c20f.tar.zst +0 -0
  239. package/.turbo/cache/af061e7a077a9ba5-meta.json +0 -1
  240. package/.turbo/cache/af061e7a077a9ba5.tar.zst +0 -0
  241. package/.turbo/cache/b50f1b283b4b81cd-meta.json +0 -1
  242. package/.turbo/cache/b50f1b283b4b81cd.tar.zst +0 -0
  243. package/.turbo/cache/bf85bc040b7e64db-meta.json +0 -1
  244. package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
  245. package/.turbo/cache/cd5f6987783fb56d-meta.json +0 -1
  246. package/.turbo/cache/cd5f6987783fb56d.tar.zst +0 -0
  247. package/.turbo/cache/ce67b6522dd09e64-meta.json +0 -1
  248. package/.turbo/cache/ce67b6522dd09e64.tar.zst +0 -0
  249. package/.turbo/cache/d716cb7a08152beb-meta.json +0 -1
  250. package/.turbo/cache/d716cb7a08152beb.tar.zst +0 -0
  251. package/.turbo/cache/d7a47b77deb3d9a4-meta.json +0 -1
  252. package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
  253. package/.turbo/cache/fbbe2704bf9cb90b-meta.json +0 -1
  254. package/.turbo/cache/fbbe2704bf9cb90b.tar.zst +0 -0
  255. package/.turbo/cache/ff58f630c9d69af4-meta.json +0 -1
  256. package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
  257. /package/.turbo/cache/{0a2b0a4df8a0443f.tar.zst → 8e79bd5c3a16a72e.tar.zst} +0 -0
@@ -3,26 +3,39 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const t$4=globalThis,e$7=t$4.ShadowRoot&&(void 0===t$4.ShadyCSS||t$4.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$5=Symbol(),o$8=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$7&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$8.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$8.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$a=(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$7)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$4.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$5=e$7?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$7(e)})(t):t;
6
+ const t$5=globalThis,e$9=t$5.ShadowRoot&&(void 0===t$5.ShadyCSS||t$5.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$5=Symbol(),o$8=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$9&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$8.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$8.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$9)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$9?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
7
 
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
- */const{is:i$9,defineProperty:e$6,getOwnPropertyDescriptor:r$6,getOwnPropertyNames:h$3,getOwnPropertySymbols:o$7,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$9(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$6(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$7(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");
12
+ */const{is:i$a,defineProperty:e$8,getOwnPropertyDescriptor:r$6,getOwnPropertyNames:h$3,getOwnPropertySymbols:o$7,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$8(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$7(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
13
 
14
14
  /**
15
15
  * @license
16
16
  * Copyright 2017 Google LLC
17
17
  * SPDX-License-Identifier: BSD-3-Clause
18
18
  */
19
- const t$3=globalThis,i$8=t$3.trustedTypes,s$4=i$8?i$8.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$5="$lit$",h$2=`lit$${Math.random().toFixed(9).slice(2)}$`,o$6="?"+h$2,n$5=`<${o$6}>`,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$5+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$5)){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$8?i$8.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$6)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$3.litHtmlPolyfillSupport;j$1?.(N$1,R$1),(t$3.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};
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$7="$lit$",h$2=`lit$${Math.random().toFixed(9).slice(2)}$`,o$6="?"+h$2,n$5=`<${o$6}>`,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$7+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$7)){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$6)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
20
 
21
21
  /**
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
24
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$7=globalThis.litElementPolyfillSupport;i$7?.({LitElement:r$4});(globalThis.litElementVersions??=[]).push("4.1.1");
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 2017 Google LLC
30
+ * SPDX-License-Identifier: BSD-3-Clause
31
+ */
32
+ const t$3={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$6=t=>(...e)=>({_$litDirective$:t,values:e});let i$7 = 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)}};
33
+
34
+ /**
35
+ * @license
36
+ * Copyright 2018 Google LLC
37
+ * SPDX-License-Identifier: BSD-3-Clause
38
+ */const e$5=e$6(class extends i$7{constructor(t){if(super(t),t.type!==t$3.ATTRIBUTE||"class"!==t.name||t.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}});
26
39
 
27
40
  /**
28
41
  * @license
@@ -145,20 +158,20 @@ class AuroFormValidation {
145
158
  const pattern = new RegExp(`^${elem.pattern}$`, 'u');
146
159
 
147
160
  if (!pattern.test(elem.value)) {
148
- elem.validity = 'badInput';
149
- elem.setCustomValidity = elem.setCustomValidityBadInput || '';
161
+ elem.validity = 'patternMismatch';
162
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
150
163
  }
151
164
  }
152
165
 
153
166
  // Length > 0 is required to prevent the error message from showing when the input is empty
154
167
  if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
155
168
  elem.validity = 'tooShort';
156
- elem.setCustomValidity = elem.setCustomValidityTooShort || '';
169
+ elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
157
170
  }
158
171
 
159
172
  if (elem.value?.length > elem.maxLength) {
160
173
  elem.validity = 'tooLong';
161
- elem.setCustomValidity = elem.setCustomValidityTooLong || '';
174
+ elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
162
175
  }
163
176
  }
164
177
 
@@ -174,33 +187,32 @@ class AuroFormValidation {
174
187
  const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
175
188
 
176
189
  if (!elem.value.match(emailRegex)) {
177
- elem.validity = 'badInput';
178
- elem.setCustomValidity = elem.setCustomValidityForType || '';
190
+ elem.validity = 'patternMismatch';
191
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
179
192
  }
180
193
  } else if (elem.type === 'credit-card') {
181
194
  if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
182
195
  elem.validity = 'tooShort';
183
- elem.setCustomValidity = elem.setCustomValidityForType || '';
196
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
184
197
  }
185
198
  } else if (elem.type === 'number') {
186
199
  if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
187
200
  elem.validity = 'rangeOverflow';
188
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
201
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
189
202
  }
190
203
 
191
- if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
204
+ if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
192
205
  elem.validity = 'rangeUnderflow';
193
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
206
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
194
207
  }
195
-
196
208
  } else if (elem.type === 'month-day-year' ||
197
209
  elem.type === 'month-year' ||
198
210
  elem.type === 'month-fullYear' ||
199
211
  elem.type === 'year-month-day'
200
212
  ) {
201
- if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
213
+ if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
202
214
  elem.validity = 'tooShort';
203
- elem.setCustomValidity = elem.setCustomValidityForType || '';
215
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
204
216
  } else {
205
217
  const valueDate = new Date(elem.value);
206
218
 
@@ -210,7 +222,7 @@ class AuroFormValidation {
210
222
 
211
223
  if (valueDate > maxDate) {
212
224
  elem.validity = 'rangeOverflow';
213
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
225
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
214
226
  }
215
227
  }
216
228
 
@@ -220,7 +232,7 @@ class AuroFormValidation {
220
232
 
221
233
  if (valueDate < minDate) {
222
234
  elem.validity = 'rangeUnderflow';
223
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
235
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
224
236
  }
225
237
  }
226
238
  }
@@ -243,10 +255,10 @@ class AuroFormValidation {
243
255
 
244
256
  if (elem.hasAttribute('error')) {
245
257
  elem.validity = 'customError';
246
- elem.setCustomValidity = elem.error;
258
+ elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
247
259
  } else if (validationShouldRun) {
248
260
  elem.validity = 'valid';
249
- elem.setCustomValidity = '';
261
+ elem.errorMessage = '';
250
262
 
251
263
  /**
252
264
  * Only validate once we interact with the datepicker
@@ -258,7 +270,7 @@ class AuroFormValidation {
258
270
  let hasValue = elem.value && elem.value.length > 0;
259
271
 
260
272
  // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
261
- if (this.auroInputElements && this.auroInputElements.length === 2) {
273
+ if (this.auroInputElements?.length === 2) {
262
274
  if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
263
275
  hasValue = false;
264
276
  }
@@ -266,31 +278,27 @@ class AuroFormValidation {
266
278
 
267
279
  if (!hasValue && elem.required) {
268
280
  elem.validity = 'valueMissing';
269
- elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
281
+ elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
270
282
  } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
271
283
  this.validateType(elem);
272
284
  this.validateAttributes(elem);
273
285
  }
274
286
  }
275
287
 
276
- if (this.auroInputElements && this.auroInputElements.length > 0) {
288
+ if (this.auroInputElements?.length > 0) {
277
289
  elem.validity = this.auroInputElements[0].validity;
278
- elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
290
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
279
291
 
280
- if (elem.validity === 'valid') {
281
- if (this.auroInputElements.length > 1) {
282
- elem.validity = this.auroInputElements[1].validity;
283
- elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
284
- }
292
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
293
+ elem.validity = this.auroInputElements[1].validity;
294
+ elem.errorMessage = this.auroInputElements[1].errorMessage;
285
295
  }
286
296
  }
287
297
 
288
298
  if (validationShouldRun || elem.hasAttribute('error')) {
289
- if (elem.validity && elem.validity !== 'valid') {
290
- // Use the validity message override if it is declared
291
- if (elem.ValidityMessageOverride) {
292
- elem.setCustomValidity = elem.ValidityMessageOverride;
293
- }
299
+ // Use the validity message override if it is declared
300
+ if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
301
+ elem.errorMessage = elem.ValidityMessageOverride;
294
302
  }
295
303
 
296
304
  this.getErrorMessage(elem);
@@ -336,18 +344,18 @@ class AuroFormValidation {
336
344
  if (elem.validity !== 'valid') {
337
345
  if (elem.setCustomValidity) {
338
346
  elem.errorMessage = elem.setCustomValidity;
339
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
347
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
340
348
  const input = elem.renderRoot.querySelector('input');
341
349
 
342
350
  if (input.validationMessage.length > 0) {
343
351
  elem.errorMessage = input.validationMessage;
344
352
  }
345
- } else if (this.inputElements && this.inputElements.length > 0) {
353
+ } else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
346
354
  const firstInput = this.inputElements[0];
347
355
 
348
356
  if (firstInput.validationMessage.length > 0) {
349
357
  elem.errorMessage = firstInput.validationMessage;
350
- } else if (this.inputElements.length === 2) {
358
+ } else if (this.inputElements?.length === 2) {
351
359
  const secondInput = this.inputElements[1];
352
360
 
353
361
  if (secondInput.validationMessage.length > 0) {
@@ -2805,7 +2813,7 @@ class AuroIcon extends BaseIcon {
2805
2813
 
2806
2814
  var iconVersion = '6.1.2';
2807
2815
 
2808
- var styleCss$1 = i$3`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#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;overflow:hidden;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)}`;
2816
+ var styleCss$1 = i$3`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#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);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}.label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}.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;overflow:hidden;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)}`;
2809
2817
 
2810
2818
  var colorCss$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);outline:1px solid 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{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([error]) .trigger:focus-within,:host([error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}:host([error]) .trigger:active{box-shadow:none;outline:none}:host([disabled][common]),:host([disabled][bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}`;
2811
2819
 
@@ -2829,9 +2837,6 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
2829
2837
  ];
2830
2838
 
2831
2839
  /**
2832
- * @attr { Boolean } common - If declared, will apply all styles for the common theme.
2833
- * @attr { Boolean } rounded - If declared, will apply border-radius to the bib.
2834
- * @attr { Boolean } inset - If declared, will apply extra padding to bib content.
2835
2840
  * @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.
2836
2841
  * @csspart bibContainer - Apply css to the bib container.
2837
2842
  */
@@ -2857,14 +2862,26 @@ class AuroDropdownBib extends r {
2857
2862
 
2858
2863
  static get properties() {
2859
2864
  return {
2865
+
2866
+ /**
2867
+ * If declared, will apply all styles for the common theme.
2868
+ */
2860
2869
  common: {
2861
2870
  type: Boolean,
2862
2871
  reflect: true
2863
2872
  },
2873
+
2874
+ /**
2875
+ * If declared, will apply extra padding to bib content.
2876
+ */
2864
2877
  inset: {
2865
2878
  type: Boolean,
2866
2879
  reflect: true
2867
2880
  },
2881
+
2882
+ /**
2883
+ * If declared, will apply border-radius to the bib.
2884
+ */
2868
2885
  rounded: {
2869
2886
  type: Boolean,
2870
2887
  reflect: true
@@ -2908,22 +2925,7 @@ if (!customElements.get("auro-dropdownbib")) {
2908
2925
 
2909
2926
 
2910
2927
  /**
2911
- * @attr { Boolean } bordered - If declared, applies a border around the trigger slot.
2912
- * @attr { Boolean } common - If declared, the dropdown will be styled with the common theme.
2913
- * @attr { Boolean } chevron - If declared, the dropdown displays an display state chevron on the right.
2914
- * @attr { Boolean } disabled - If declared, the dropdown is not interactive.
2915
2928
  * @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
2916
- * @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
2917
- * @attr {Boolean} fluid - Makes the trigger to be full width of its parent container
2918
- * @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
2919
- * @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
2920
- * @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
2921
- * @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
2922
- * @attr { Boolean } noToggle - If declared, the trigger will only show the dropdown bib.
2923
- * @attr { Boolean } focusShow - if declared, the bib will display when focus is applied to the trigger.
2924
- * @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
2925
- * @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.
2926
- * @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
2927
2929
  * @slot - Default slot for the popover content.
2928
2930
  * @slot label - Defines the content of the label.
2929
2931
  * @slot helpText - Defines the content of the helpText.
@@ -2961,6 +2963,16 @@ class AuroDropdown extends r {
2961
2963
  this.tabIndex = 0;
2962
2964
  this.noToggle = false;
2963
2965
 
2966
+ /**
2967
+ * @private
2968
+ */
2969
+ this.hasTriggerContent = false;
2970
+
2971
+ /**
2972
+ * @private
2973
+ */
2974
+ this.triggerContentSlot = undefined;
2975
+
2964
2976
  /**
2965
2977
  * @private
2966
2978
  */
@@ -3007,89 +3019,166 @@ class AuroDropdown extends r {
3007
3019
  // function to define props used within the scope of this component
3008
3020
  static get properties() {
3009
3021
  return {
3022
+
3023
+ /**
3024
+ * If declared, applies a border around the trigger slot.
3025
+ */
3010
3026
  bordered: {
3011
3027
  type: Boolean,
3012
3028
  reflect: true
3013
3029
  },
3030
+
3031
+ /**
3032
+ * If declared, the dropdown displays a chevron on the right.
3033
+ * @attr {Boolean} chevron
3034
+ */
3014
3035
  chevron: {
3015
3036
  type: Boolean,
3016
3037
  reflect: true
3017
3038
  },
3018
- disabled: {
3039
+
3040
+ /**
3041
+ * If declared, the dropdown will be styled with the common theme.
3042
+ */
3043
+ common: {
3019
3044
  type: Boolean,
3020
3045
  reflect: true
3021
3046
  },
3022
- error: {
3047
+
3048
+ /**
3049
+ * If declared, the dropdown is not interactive.
3050
+ */
3051
+ disabled: {
3023
3052
  type: Boolean,
3024
3053
  reflect: true
3025
3054
  },
3026
- fluid: {
3055
+
3056
+ /**
3057
+ * @private
3058
+ */
3059
+ dropdownWidth: {
3060
+ type: Number
3061
+ },
3062
+
3063
+ /**
3064
+ * If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
3065
+ */
3066
+ error: {
3027
3067
  type: Boolean,
3028
- reflect: true,
3068
+ reflect: true
3029
3069
  },
3070
+
3071
+ /**
3072
+ * If declared, the bib will display when focus is applied to the trigger.
3073
+ */
3030
3074
  focusShow: {
3031
3075
  type: Boolean,
3032
3076
  reflect: true
3033
3077
  },
3034
- hoverToggle: {
3078
+
3079
+ /**
3080
+ * Makes the trigger to be full width of its parent container.
3081
+ */
3082
+ fluid: {
3035
3083
  type: Boolean,
3036
3084
  reflect: true
3037
3085
  },
3086
+
3087
+ /**
3088
+ * If declared, will apply padding around trigger slot content.
3089
+ */
3038
3090
  inset: {
3039
3091
  type: Boolean,
3040
3092
  reflect: true
3041
3093
  },
3042
- matchWidth: {
3094
+
3095
+ /**
3096
+ * If true, the dropdown bib is displayed.
3097
+ */
3098
+ isPopoverVisible: {
3099
+ type: Boolean
3100
+ },
3101
+
3102
+ /**
3103
+ * If declared, the trigger will toggle the dropdown on mouseover/mouseout.
3104
+ */
3105
+ hoverToggle: {
3043
3106
  type: Boolean,
3044
3107
  reflect: true
3045
3108
  },
3046
- rounded: {
3047
- type: Boolean,
3109
+
3110
+ /**
3111
+ * @private
3112
+ */
3113
+ hasTriggerContent: {
3114
+ type: Boolean
3115
+ },
3116
+
3117
+ /**
3118
+ * 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.
3119
+ */
3120
+ mobileFullscreenBreakpoint: {
3121
+ type: String,
3048
3122
  reflect: true
3049
3123
  },
3050
- common: {
3124
+
3125
+ /**
3126
+ * If declared, the popover and trigger will be set to the same width.
3127
+ */
3128
+ matchWidth: {
3051
3129
  type: Boolean,
3052
3130
  reflect: true
3053
3131
  },
3054
- noToggle: {
3132
+
3133
+ /**
3134
+ * If declared, the dropdown will not hide when moving focus outside the element.
3135
+ */
3136
+ noHideOnThisFocusLoss: {
3055
3137
  type: Boolean,
3056
3138
  reflect: true
3057
3139
  },
3058
- noHideOnThisFocusLoss: {
3140
+
3141
+ /**
3142
+ * If declared, the trigger will only show the dropdown bib.
3143
+ */
3144
+ noToggle: {
3059
3145
  type: Boolean,
3060
3146
  reflect: true
3061
3147
  },
3062
- isPopoverVisible: { type: Boolean },
3148
+
3063
3149
  onSlotChange: {
3064
3150
  type: Function,
3065
3151
  reflect: false
3066
3152
  },
3067
- mobileFullscreenBreakpoint: {
3068
- type: String,
3069
- reflect: true,
3070
- },
3071
3153
 
3072
3154
  /**
3073
3155
  * @private
3074
3156
  */
3075
- dropdownWidth: { type: Number },
3157
+ placement: {
3158
+ type: String
3159
+ },
3076
3160
 
3077
3161
  /**
3078
- * @private
3162
+ * If declared, will apply border-radius to trigger and default slots.
3079
3163
  */
3080
- placement: { type: String },
3164
+ rounded: {
3165
+ type: Boolean,
3166
+ reflect: true
3167
+ },
3081
3168
 
3082
3169
  /**
3083
3170
  * @private
3084
3171
  */
3085
- tabIndex: { type: Number }
3172
+ tabIndex: {
3173
+ type: Number
3174
+ }
3086
3175
  };
3087
3176
  }
3088
3177
 
3089
3178
  static get styles() {
3090
3179
  return [
3091
- styleCss$1,
3092
3180
  colorCss$1,
3181
+ styleCss$1,
3093
3182
  tokensCss$2
3094
3183
  ];
3095
3184
  }
@@ -3120,6 +3209,12 @@ class AuroDropdown extends r {
3120
3209
  if (changedProperties.has('mobileFullscreenBreakpoint')) {
3121
3210
  this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
3122
3211
  }
3212
+
3213
+ // when trigger's content is changed without any attribute or node change,
3214
+ // `requestUpdate` needs to be called to update hasTriggerContnet
3215
+ if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
3216
+ this.handleTriggerContentSlotChange();
3217
+ }
3123
3218
  }
3124
3219
 
3125
3220
  firstUpdated() {
@@ -3162,6 +3257,43 @@ class AuroDropdown extends r {
3162
3257
  return inCustomSlot;
3163
3258
  }
3164
3259
 
3260
+ /**
3261
+ * Handles changes to the trigger content slot and updates related properties.
3262
+ *
3263
+ * It first updates the floater settings
3264
+ * Then, it retrieves the assigned nodes from the event target and checks if any of
3265
+ * the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
3266
+ *
3267
+ * @private
3268
+ * @method handleTriggerContentSlotChange
3269
+ * @param {Event} event - native slotchange event
3270
+ * @returns {void}
3271
+ */
3272
+ handleTriggerContentSlotChange(event) {
3273
+ this.floater.handleTriggerTabIndex();
3274
+
3275
+ if (event) {
3276
+ this.triggerNode = event.target;
3277
+ this.triggerContentSlot = event.target.assignedNodes();
3278
+ }
3279
+
3280
+ if (this.triggerContentSlot) {
3281
+ this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
3282
+ if (slot.textContent.trim()) {
3283
+ return true;
3284
+ }
3285
+ const slotInSlot = slot.querySelector('slot');
3286
+ if (!slotInSlot) {
3287
+ return false;
3288
+ }
3289
+ const slotsInSlotNodes = slotInSlot.assignedNodes();
3290
+ return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
3291
+ });
3292
+ } else {
3293
+ this.hasTriggerContent = false;
3294
+ }
3295
+ }
3296
+
3165
3297
  /**
3166
3298
  * Handles the default slot change event and updates the content.
3167
3299
  *
@@ -3196,13 +3328,13 @@ class AuroDropdown extends r {
3196
3328
  tabindex="${this.tabIndex}"
3197
3329
  >
3198
3330
  <div class="triggerContentWrapper">
3199
- <label class="label" id="triggerLabel">
3331
+ <label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
3200
3332
  <slot name="label"></slot>
3201
3333
  </label>
3202
3334
  <div class="triggerContent">
3203
3335
  <slot
3204
3336
  name="trigger"
3205
- @slotchange="${() => {this.floater.handleTriggerTabIndex(); }}"></slot>
3337
+ @slotchange="${(event) => this.handleTriggerContentSlotChange(event)}"></slot>
3206
3338
  </div>
3207
3339
  </div>
3208
3340
  ${this.chevron || this.common ? u$1`
@@ -3244,11 +3376,11 @@ AuroDropdown.register();
3244
3376
 
3245
3377
  var dropdownVersion = '3.0.0';
3246
3378
 
3247
- var styleCss = i$a`*,*: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}`;
3379
+ 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{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}[slot=trigger] #placeholder.hidden{position:absolute;z-index:-1;opacity:0;pointer-events: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{padding:0;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}`;
3248
3380
 
3249
- var colorCss = i$a`*,*: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)}`;
3381
+ var colorCss = 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)}`;
3250
3382
 
3251
- var tokensCss = i$a`:host{--ds-auro-select-placeholder-text-color: var(--ds-color-text-secondary-default, $ds-color-text-secondary-default)}`;
3383
+ var tokensCss = i$b`:host{--ds-auro-select-placeholder-text-color: var(--ds-color-text-secondary-default, $ds-color-text-secondary-default)}`;
3252
3384
 
3253
3385
  // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3254
3386
  // See LICENSE in the project root for license information.
@@ -3258,22 +3390,10 @@ var tokensCss = i$a`:host{--ds-auro-select-placeholder-text-color: var(--ds-colo
3258
3390
  /**
3259
3391
  * The auro-select element is a wrapper for auro-dropdown and auro-menu to create a dropdown menu control.
3260
3392
  *
3261
- * @attr {String} validity - Specifies the `validityState` this element is in.
3262
- * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
3263
- * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
3264
- * @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
3265
- * @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
3266
- * @attr {Boolean} noValidate - If set, disables auto-validation on blur.
3267
- * @attr {Boolean} required - Populates the `required` attribute on the element. Used for client-side validation.
3268
- * @attr {Boolean} flexMenuWidth - If set, makes dropdown bib width match the size of the content, rather than the width of the trigger.
3269
- * @prop {String} placeholder - Define placeholder text to display before a value is manually selected.
3270
- * @prop {String} value - Value selected for the component.
3271
- * @prop {Boolean} disabled - When attribute is present element shows disabled state.
3272
- * @prop {Boolean} noCheckmark - When true, checkmark on selected option will no longer be present.
3273
- * @attr {Object} optionSelected - Specifies the current selected menuOption.
3274
3393
  * @slot - Default slot for the menu content.
3275
3394
  * @slot label - Defines the content of the label.
3276
3395
  * @slot helpText - Defines the content of the helpText.
3396
+ * @slot placeholder - Defines the content of the placeholder to be shown when there is no value
3277
3397
  * @event auroSelect-valueSet - Notifies that the component has a new value set.
3278
3398
  * @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
3279
3399
  * @csspart helpText - Apply CSS to the help text.
@@ -3284,7 +3404,6 @@ class AuroSelect extends r$4 {
3284
3404
  constructor() {
3285
3405
  super();
3286
3406
 
3287
- this.placeholder = 'Please select option';
3288
3407
  this.optionSelected = undefined;
3289
3408
  this.validity = undefined;
3290
3409
 
@@ -3339,68 +3458,118 @@ class AuroSelect extends r$4 {
3339
3458
  // to understand how to use reflected attributes with your property settings.
3340
3459
  static get properties() {
3341
3460
  return {
3342
- // ...super.properties,
3343
- optionSelected: {
3344
- type: Object
3461
+
3462
+ /**
3463
+ * When attribute is present, element shows disabled state.
3464
+ */
3465
+ disabled: {
3466
+ type: Boolean,
3467
+ reflect: true
3345
3468
  },
3346
- value: {
3347
- type: String
3469
+
3470
+ /**
3471
+ * If set, makes dropdown width match the size of the content, rather than the width of the trigger.
3472
+ */
3473
+ flexMenuWidth: {
3474
+ type: Boolean,
3475
+ reflect: true
3348
3476
  },
3477
+
3478
+ /**
3479
+ * When true, checkmark on selected option will no longer be present.
3480
+ */
3481
+ noCheckmark: {
3482
+ type: Boolean,
3483
+ reflect: true
3484
+ },
3485
+
3486
+ /**
3487
+ * If set, disables auto-validation on blur.
3488
+ */
3349
3489
  noValidate: {
3350
3490
  type: Boolean,
3351
3491
  reflect: true
3352
3492
  },
3493
+
3494
+ /**
3495
+ * @private
3496
+ */
3497
+ optionActive: {
3498
+ type: Object
3499
+ },
3500
+
3501
+ /**
3502
+ * Specifies the current selected menuOption.
3503
+ */
3504
+ optionSelected: {
3505
+ type: Object
3506
+ },
3507
+
3508
+ /**
3509
+ * @private
3510
+ */
3511
+ options: {
3512
+ type: Array
3513
+ },
3514
+
3515
+ /**
3516
+ * Populates the `required` attribute on the element. Used for client-side validation.
3517
+ */
3353
3518
  required: {
3354
3519
  type: Boolean,
3355
3520
  reflect: true
3356
3521
  },
3522
+
3523
+ /**
3524
+ * When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
3525
+ */
3357
3526
  error: {
3358
3527
  type: String,
3359
3528
  reflect: true
3360
3529
  },
3530
+
3531
+ /**
3532
+ * Sets a custom help text message to display for all validityStates.
3533
+ */
3361
3534
  setCustomValidity: {
3362
3535
  type: String
3363
3536
  },
3537
+
3538
+ /**
3539
+ * Custom help text message to display when validity = `customError`.
3540
+ */
3364
3541
  setCustomValidityCustomError: {
3365
3542
  type: String
3366
3543
  },
3544
+
3545
+ /**
3546
+ * Custom help text message to display when validity = `valueMissing`.
3547
+ */
3367
3548
  setCustomValidityValueMissing: {
3368
3549
  type: String
3369
3550
  },
3551
+
3552
+ /**
3553
+ * Specifies the `validityState` this element is in.
3554
+ */
3370
3555
  validity: {
3371
3556
  type: String,
3372
3557
  reflect: true
3373
3558
  },
3374
- disabled: {
3375
- type: Boolean,
3376
- reflect: true
3377
- },
3378
- noCheckmark: {
3379
- type: Boolean,
3380
- reflect: true
3381
- },
3382
- flexMenuWidth: {
3383
- type: Boolean,
3384
- reflect: true
3385
- },
3386
- placeholder: { type: String },
3387
-
3388
- /**
3389
- * @private
3390
- */
3391
- options: { type: Array },
3392
3559
 
3393
3560
  /**
3394
- * @private
3561
+ * Value selected for the component.
3395
3562
  */
3396
- optionActive: { type: Object },
3563
+ value: {
3564
+ type: String
3565
+ }
3397
3566
  };
3398
3567
  }
3399
3568
 
3400
3569
  static get styles() {
3401
3570
  return [
3402
- styleCss,
3403
3571
  colorCss,
3572
+ styleCss,
3404
3573
  tokensCss
3405
3574
  ];
3406
3575
  }
@@ -3435,36 +3604,30 @@ class AuroSelect extends r$4 {
3435
3604
  }
3436
3605
 
3437
3606
  /**
3438
- * Updates the displayed value in an Auro dropdown component based on the provided option.
3439
- * @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.
3607
+ * Updates the displayed value in an Auro dropdown component based on optionSelected
3440
3608
  * @private
3441
3609
  * @returns {void}
3442
3610
  */
3443
- updateDisplayedValue(option) {
3611
+ updateDisplayedValue() {
3444
3612
  const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
3445
3613
 
3446
3614
  // remove all existing rendered value(s)
3447
- triggerContentEl.querySelectorAll('auro-menuoption, [valuestr], [auro-menuoption]').forEach((elm) => {
3615
+ triggerContentEl.querySelectorAll('auro-menuoption, [auro-menuoption]').forEach((elm) => {
3448
3616
  elm.remove();
3449
3617
  });
3450
3618
 
3451
- if (typeof option === 'string' && option !== this.placeholder) {
3452
- // create a new span element with the value string
3453
- const valueElem = document.createElement('span');
3454
- valueElem.setAttribute('valuestr', true);
3455
- valueElem.textContent = option;
3456
-
3457
- // append the new element into the trigger content
3458
- triggerContentEl.appendChild(valueElem);
3459
- } else if (typeof option === 'object') {
3619
+ if (this.optionSelected) {
3460
3620
  // clone the selected option and remove attributes that style it
3461
- const clone = option.cloneNode(true);
3621
+ const clone = this.optionSelected.cloneNode(true);
3462
3622
  clone.removeAttribute('selected');
3463
3623
  clone.removeAttribute('class');
3464
3624
 
3465
3625
  // insert the non-styled clone into the trigger
3466
3626
  triggerContentEl.appendChild(clone);
3467
3627
  }
3628
+
3629
+ // notify dropdown as trigger content is changed
3630
+ this.dropdown.requestUpdate();
3468
3631
  }
3469
3632
 
3470
3633
  /**
@@ -3474,7 +3637,7 @@ class AuroSelect extends r$4 {
3474
3637
  */
3475
3638
  configureMenu() {
3476
3639
  this.menu = this.querySelector('auro-menu, [auro-menu]');
3477
- this.menu.addEventListener("auroMenu-loadingChange", (event) => this.handleMenuLoadingChange(event));
3640
+
3478
3641
  // racing condition on custom-select with custom-menu
3479
3642
  if (!this.menu) {
3480
3643
  setTimeout(() => {
@@ -3483,6 +3646,7 @@ class AuroSelect extends r$4 {
3483
3646
  return;
3484
3647
  }
3485
3648
 
3649
+ this.menu.addEventListener("auroMenu-loadingChange", (event) => this.handleMenuLoadingChange(event));
3486
3650
  this.menu.setAttribute('aria-hidden', 'true');
3487
3651
 
3488
3652
  this.generateOptionsArray();
@@ -3495,8 +3659,6 @@ class AuroSelect extends r$4 {
3495
3659
  this.optionSelected = this.menu.optionSelected;
3496
3660
  this.value = this.optionSelected.value;
3497
3661
 
3498
- this.updateDisplayedValue(this.optionSelected);
3499
-
3500
3662
  if (this.dropdown.isPopoverVisible) {
3501
3663
  this.dropdown.hide();
3502
3664
  }
@@ -3510,25 +3672,11 @@ class AuroSelect extends r$4 {
3510
3672
  * with `auro-select.value`.
3511
3673
  */
3512
3674
  this.menu.addEventListener('auroMenu-selectValueFailure', () => {
3513
- this.menu.optionSelected = undefined;
3514
- this.optionSelected = this.menu.optionSelected;
3515
-
3516
- this.validity = 'badInput';
3517
-
3518
- // Capitalizes the first letter of each word in this.value string
3519
- const valueStr = this.value.replace(/(^\w{1})|(\s+\w{1})/gu, (letter) => letter.toUpperCase());
3520
-
3521
- // Pass the new string to the trigger content
3522
- this.updateDisplayedValue(valueStr);
3675
+ this.reset();
3523
3676
  });
3524
3677
 
3525
3678
  this.menu.addEventListener('auroMenu-selectValueReset', () => {
3526
- // set the trigger content back to the placeholder
3527
- this.updateDisplayedValue(this.placeholder);
3528
-
3529
- this.optionSelected = undefined;
3530
- this.value = undefined;
3531
-
3679
+ this.optionSelected = this.menu.optionSelected;
3532
3680
  this.validation.validate(this);
3533
3681
  });
3534
3682
  }
@@ -3580,8 +3728,6 @@ class AuroSelect extends r$4 {
3580
3728
  this.addEventListener('blur', () => {
3581
3729
  this.validation.validate(this);
3582
3730
  });
3583
-
3584
- this.labelForSr();
3585
3731
  }
3586
3732
 
3587
3733
  /**
@@ -3700,6 +3846,10 @@ class AuroSelect extends r$4 {
3700
3846
  }));
3701
3847
  }
3702
3848
 
3849
+ if (changedProperties.has('optionSelected')) {
3850
+ this.updateDisplayedValue();
3851
+ }
3852
+
3703
3853
  if (changedProperties.has('error')) {
3704
3854
  this.validation.validate(this, true);
3705
3855
  }
@@ -3713,52 +3863,15 @@ class AuroSelect extends r$4 {
3713
3863
  this.validation.reset(this);
3714
3864
  }
3715
3865
 
3716
- /**
3717
- * Handles reading of auro-select by screen readers.
3718
- * @private
3719
- * @returns {void}
3720
- */
3721
- labelForSr() {
3722
- const placeholderLabel = document.createElement("div");
3723
- const textId = "label";
3724
-
3725
- placeholderLabel.setAttribute("id", textId);
3726
- placeholderLabel.setAttribute("aria-live", "polite");
3727
-
3728
- const styles = {
3729
- position: 'absolute',
3730
- overflow: 'hidden',
3731
- clipPath: 'inset(1px, 1px, 1px, 1px)',
3732
- width: '1px',
3733
- height: '1px',
3734
- padding: '0',
3735
- border: '0'
3736
- };
3737
-
3738
- Object.assign(placeholderLabel.style, styles);
3739
-
3740
- this.addEventListener('focus', () => {
3741
- document.body.appendChild(placeholderLabel);
3742
-
3743
- if (!this.optionSelected) {
3744
- document.getElementById(textId).innerHTML = this.placeholder;
3745
- } else {
3746
- document.getElementById(textId).innerHTML = `${this.optionSelected.innerText}, ${this.placeholder}`;
3747
- }
3748
- });
3749
-
3750
- this.addEventListener('blur', () => {
3751
- if (document.contains(placeholderLabel)) {
3752
- document.body.removeChild(placeholderLabel);
3753
- }
3754
- });
3755
- }
3756
-
3757
3866
  // When using auroElement, use the following attribute and function when hiding content from screen readers.
3758
3867
  // aria-hidden="${this.hideAudible(this.hiddenAudible)}"
3759
3868
 
3760
3869
  // function that renders the HTML and CSS into the scope of the component
3761
3870
  render() {
3871
+ const placeholderClass = {
3872
+ hidden: this.value,
3873
+ };
3874
+
3762
3875
  return u$3`
3763
3876
  <div class="outerWrapper">
3764
3877
  <div aria-live="polite" class="util_displayHiddenVisually">
@@ -3785,7 +3898,7 @@ class AuroSelect extends r$4 {
3785
3898
  chevron
3786
3899
  part="dropdown">
3787
3900
  <span slot="trigger" aria-haspopup="true" id="triggerFocus">
3788
- ${this.value ? this.displayValue : u$3`<span class="placeholder">${this.placeholder}</span>`}
3901
+ <span id="placeholder" class="${e$5(placeholderClass)}"><slot name="placeholder"></slot></span>
3789
3902
  </span>
3790
3903
  <div class="menuWrapper">
3791
3904
  </div>
@@ -3798,7 +3911,7 @@ class AuroSelect extends r$4 {
3798
3911
  </p>`
3799
3912
  : u$3`
3800
3913
  <p class="selectElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
3801
- ${this.setCustomValidity}
3914
+ ${this.errorMessage}
3802
3915
  </p>`
3803
3916
  }
3804
3917
  </span>