@aurodesignsystem/auro-formkit 1.6.0-beta.10

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 (814) hide show
  1. package/.husky/commit-msg +4 -0
  2. package/.husky/pre-commit +3 -0
  3. package/.turbo/cache/013a48308b893dac-meta.json +1 -0
  4. package/.turbo/cache/013a48308b893dac.tar.zst +0 -0
  5. package/.turbo/cache/049b9083252d38be-meta.json +1 -0
  6. package/.turbo/cache/049b9083252d38be.tar.zst +0 -0
  7. package/.turbo/cache/07ca42419b9f050c-meta.json +1 -0
  8. package/.turbo/cache/07ca42419b9f050c.tar.zst +0 -0
  9. package/.turbo/cache/0a1dd4481355cb0b-meta.json +1 -0
  10. package/.turbo/cache/0a1dd4481355cb0b.tar.zst +0 -0
  11. package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -0
  12. package/.turbo/cache/0cea4c1f34f3683b.tar.zst +0 -0
  13. package/.turbo/cache/13cf37c850bd8cf4-meta.json +1 -0
  14. package/.turbo/cache/13cf37c850bd8cf4.tar.zst +0 -0
  15. package/.turbo/cache/17259cf94d8f8925-meta.json +1 -0
  16. package/.turbo/cache/17259cf94d8f8925.tar.zst +0 -0
  17. package/.turbo/cache/1c99a949ec63ab35-meta.json +1 -0
  18. package/.turbo/cache/1c99a949ec63ab35.tar.zst +0 -0
  19. package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -0
  20. package/.turbo/cache/257a7a26ea72dbc5.tar.zst +0 -0
  21. package/.turbo/cache/3323eb841acb9c4e-meta.json +1 -0
  22. package/.turbo/cache/3323eb841acb9c4e.tar.zst +0 -0
  23. package/.turbo/cache/34ba23e2e2d652ad-meta.json +1 -0
  24. package/.turbo/cache/34ba23e2e2d652ad.tar.zst +0 -0
  25. package/.turbo/cache/368cd6fed7975ad2-meta.json +1 -0
  26. package/.turbo/cache/368cd6fed7975ad2.tar.zst +0 -0
  27. package/.turbo/cache/3924bce8e51f0ffa-meta.json +1 -0
  28. package/.turbo/cache/3924bce8e51f0ffa.tar.zst +0 -0
  29. package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -0
  30. package/.turbo/cache/3bf45120d0cc9bd8.tar.zst +0 -0
  31. package/.turbo/cache/45035bf5c4147ccd-meta.json +1 -0
  32. package/.turbo/cache/45035bf5c4147ccd.tar.zst +0 -0
  33. package/.turbo/cache/4567487084a055b7-meta.json +1 -0
  34. package/.turbo/cache/4567487084a055b7.tar.zst +0 -0
  35. package/.turbo/cache/4763278a7d3dbc16-meta.json +1 -0
  36. package/.turbo/cache/4763278a7d3dbc16.tar.zst +0 -0
  37. package/.turbo/cache/549e6ef9f9ffd9a8-meta.json +1 -0
  38. package/.turbo/cache/549e6ef9f9ffd9a8.tar.zst +0 -0
  39. package/.turbo/cache/59ccd8430174883c-meta.json +1 -0
  40. package/.turbo/cache/59ccd8430174883c.tar.zst +0 -0
  41. package/.turbo/cache/5c16ce3cff5c9dff-meta.json +1 -0
  42. package/.turbo/cache/5c16ce3cff5c9dff.tar.zst +0 -0
  43. package/.turbo/cache/5f304c0f37ef25f3-meta.json +1 -0
  44. package/.turbo/cache/5f304c0f37ef25f3.tar.zst +0 -0
  45. package/.turbo/cache/64de7a53e02db647-meta.json +1 -0
  46. package/.turbo/cache/64de7a53e02db647.tar.zst +0 -0
  47. package/.turbo/cache/683d4c0e20c077a9-meta.json +1 -0
  48. package/.turbo/cache/683d4c0e20c077a9.tar.zst +0 -0
  49. package/.turbo/cache/691a74627ec57993-meta.json +1 -0
  50. package/.turbo/cache/691a74627ec57993.tar.zst +0 -0
  51. package/.turbo/cache/69aae513b7ec6c7d-meta.json +1 -0
  52. package/.turbo/cache/69aae513b7ec6c7d.tar.zst +0 -0
  53. package/.turbo/cache/6dd7058e6703cb35-meta.json +1 -0
  54. package/.turbo/cache/6dd7058e6703cb35.tar.zst +0 -0
  55. package/.turbo/cache/73e9073a5274616d-meta.json +1 -0
  56. package/.turbo/cache/73e9073a5274616d.tar.zst +0 -0
  57. package/.turbo/cache/773edc0f83c8c5a5-meta.json +1 -0
  58. package/.turbo/cache/773edc0f83c8c5a5.tar.zst +0 -0
  59. package/.turbo/cache/786a822763403879-meta.json +1 -0
  60. package/.turbo/cache/786a822763403879.tar.zst +0 -0
  61. package/.turbo/cache/80b5d974184a01df-meta.json +1 -0
  62. package/.turbo/cache/80b5d974184a01df.tar.zst +0 -0
  63. package/.turbo/cache/8954c6073396fadd-meta.json +1 -0
  64. package/.turbo/cache/8954c6073396fadd.tar.zst +0 -0
  65. package/.turbo/cache/8f8ffe35cc79d1a9-meta.json +1 -0
  66. package/.turbo/cache/8f8ffe35cc79d1a9.tar.zst +0 -0
  67. package/.turbo/cache/926d632729ca6536-meta.json +1 -0
  68. package/.turbo/cache/926d632729ca6536.tar.zst +0 -0
  69. package/.turbo/cache/92daa6d7c389d548-meta.json +1 -0
  70. package/.turbo/cache/92daa6d7c389d548.tar.zst +0 -0
  71. package/.turbo/cache/9a097d6576dadd64-meta.json +1 -0
  72. package/.turbo/cache/9a097d6576dadd64.tar.zst +0 -0
  73. package/.turbo/cache/9e7be41cc3a7ef43-meta.json +1 -0
  74. package/.turbo/cache/9e7be41cc3a7ef43.tar.zst +0 -0
  75. package/.turbo/cache/9ee793063ea89126-meta.json +1 -0
  76. package/.turbo/cache/9ee793063ea89126.tar.zst +0 -0
  77. package/.turbo/cache/a1558cef51c034da-meta.json +1 -0
  78. package/.turbo/cache/a1558cef51c034da.tar.zst +0 -0
  79. package/.turbo/cache/a24f2ff8e94e56e8-meta.json +1 -0
  80. package/.turbo/cache/a24f2ff8e94e56e8.tar.zst +0 -0
  81. package/.turbo/cache/a2705cf095a2ceb0-meta.json +1 -0
  82. package/.turbo/cache/a2705cf095a2ceb0.tar.zst +0 -0
  83. package/.turbo/cache/a33c0749886a41b5-meta.json +1 -0
  84. package/.turbo/cache/a33c0749886a41b5.tar.zst +0 -0
  85. package/.turbo/cache/a66b465385a30a2b-meta.json +1 -0
  86. package/.turbo/cache/a66b465385a30a2b.tar.zst +0 -0
  87. package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -0
  88. package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
  89. package/.turbo/cache/b54fc4f664a7a5a0-meta.json +1 -0
  90. package/.turbo/cache/b54fc4f664a7a5a0.tar.zst +0 -0
  91. package/.turbo/cache/ba4418918621fbcd-meta.json +1 -0
  92. package/.turbo/cache/ba4418918621fbcd.tar.zst +0 -0
  93. package/.turbo/cache/be7c23c37b8ec74b-meta.json +1 -0
  94. package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
  95. package/.turbo/cache/c1b72a92dec4fe37-meta.json +1 -0
  96. package/.turbo/cache/c1b72a92dec4fe37.tar.zst +0 -0
  97. package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +1 -0
  98. package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
  99. package/.turbo/cache/cc81de9c0b452a7c-meta.json +1 -0
  100. package/.turbo/cache/cc81de9c0b452a7c.tar.zst +0 -0
  101. package/.turbo/cache/dad1301ac69bcb85-meta.json +1 -0
  102. package/.turbo/cache/dad1301ac69bcb85.tar.zst +0 -0
  103. package/.turbo/cache/e25ac25a8a0ad126-meta.json +1 -0
  104. package/.turbo/cache/e25ac25a8a0ad126.tar.zst +0 -0
  105. package/.turbo/cache/e671573e4ef02c47-meta.json +1 -0
  106. package/.turbo/cache/e671573e4ef02c47.tar.zst +0 -0
  107. package/.turbo/cache/e86cee22dff5e281-meta.json +1 -0
  108. package/.turbo/cache/e86cee22dff5e281.tar.zst +0 -0
  109. package/.turbo/cache/e992dab20aeefbaf-meta.json +1 -0
  110. package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
  111. package/.turbo/cache/f680556a8e954eac-meta.json +1 -0
  112. package/.turbo/cache/f680556a8e954eac.tar.zst +0 -0
  113. package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -0
  114. package/.turbo/cache/fa132b5b5f0e75f8.tar.zst +0 -0
  115. package/.turbo/cache/fbbe2704bf9cb90b-meta.json +1 -0
  116. package/.turbo/cache/fbbe2704bf9cb90b.tar.zst +0 -0
  117. package/.turbo/cache/ffec4500b911b85a-meta.json +1 -0
  118. package/.turbo/cache/ffec4500b911b85a.tar.zst +0 -0
  119. package/CHANGELOG.md +430 -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 +160 -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 +55 -0
  191. package/components/combobox/demo/api.js +34 -0
  192. package/components/combobox/demo/api.md +816 -0
  193. package/components/combobox/demo/api.min.js +9165 -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 +9028 -0
  197. package/components/combobox/dist/auro-combobox.d.ts +241 -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 +7898 -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 +711 -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.min.js +71 -0
  240. package/components/counter/dist/auro-counter-group.d.ts +20 -0
  241. package/components/counter/dist/auro-counter-group.d.ts.map +1 -0
  242. package/components/counter/dist/auro-counter.d.ts +6 -0
  243. package/components/counter/dist/auro-counter.d.ts.map +1 -0
  244. package/components/counter/dist/index.d.ts +4 -0
  245. package/components/counter/dist/index.d.ts.map +1 -0
  246. package/components/counter/dist/index.js +110 -0
  247. package/components/counter/dist/styles/counter-group-css.d.ts +3 -0
  248. package/components/counter/dist/styles/counter-group-css.d.ts.map +1 -0
  249. package/components/counter/dist/styles/style-css.d.ts +3 -0
  250. package/components/counter/dist/styles/style-css.d.ts.map +1 -0
  251. package/components/counter/node_modules/chalk/package.json +83 -0
  252. package/components/counter/node_modules/chalk/readme.md +325 -0
  253. package/components/counter/node_modules/chalk/source/index.d.ts +320 -0
  254. package/components/counter/node_modules/chalk/source/index.js +225 -0
  255. package/components/counter/node_modules/chalk/source/utilities.js +33 -0
  256. package/components/counter/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  257. package/components/counter/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  258. package/components/counter/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  259. package/components/counter/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  260. package/components/counter/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  261. package/components/counter/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  262. package/components/counter/package.json +50 -0
  263. package/components/counter/src/auro-counter-group.js +48 -0
  264. package/components/counter/src/auro-counter.js +29 -0
  265. package/components/counter/src/index.js +8 -0
  266. package/components/counter/src/styles/counter-group-css.js +2 -0
  267. package/components/counter/src/styles/counter-group.css +4 -0
  268. package/components/counter/src/styles/counter-group.scss +17 -0
  269. package/components/counter/src/styles/style-css.js +2 -0
  270. package/components/counter/src/styles/style.css +4 -0
  271. package/components/counter/src/styles/style.scss +17 -0
  272. package/components/datepicker/.stylelintrc.json +3 -0
  273. package/components/datepicker/.turbo/turbo-build$colon$sass.log +352 -0
  274. package/components/datepicker/.turbo/turbo-build.log +489 -0
  275. package/components/datepicker/.turbo/turbo-postCss$colon$component.log +5 -0
  276. package/components/datepicker/.turbo/turbo-sass$colon$render.log +58 -0
  277. package/components/datepicker/README.md +181 -0
  278. package/components/datepicker/demo/api.html +58 -0
  279. package/components/datepicker/demo/api.js +33 -0
  280. package/components/datepicker/demo/api.md +1172 -0
  281. package/components/datepicker/demo/api.min.js +18466 -0
  282. package/components/datepicker/demo/index.js +19 -0
  283. package/components/datepicker/demo/index.md +107 -0
  284. package/components/datepicker/demo/index.min.js +18195 -0
  285. package/components/datepicker/dist/auro-calendar-cell.d.ts +163 -0
  286. package/components/datepicker/dist/auro-calendar-cell.d.ts.map +1 -0
  287. package/components/datepicker/dist/auro-calendar-month.d.ts +5 -0
  288. package/components/datepicker/dist/auro-calendar-month.d.ts.map +1 -0
  289. package/components/datepicker/dist/auro-calendar.d.ts +105 -0
  290. package/components/datepicker/dist/auro-calendar.d.ts.map +1 -0
  291. package/components/datepicker/dist/auro-datepicker.d.ts +336 -0
  292. package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -0
  293. package/components/datepicker/dist/dropdownVersion.d.ts +1 -0
  294. package/components/datepicker/dist/dropdownVersion.d.ts.map +1 -0
  295. package/components/datepicker/dist/formkit/auro-dropdownVersion.d.ts +3 -0
  296. package/components/datepicker/dist/formkit/auro-dropdownVersion.d.ts.map +1 -0
  297. package/components/datepicker/dist/formkit/auro-inputVersion.d.ts +3 -0
  298. package/components/datepicker/dist/formkit/auro-inputVersion.d.ts.map +1 -0
  299. package/components/datepicker/dist/index.d.ts +3 -0
  300. package/components/datepicker/dist/index.d.ts.map +1 -0
  301. package/components/datepicker/dist/index.js +18191 -0
  302. package/components/datepicker/dist/popoverVersion.d.ts +3 -0
  303. package/components/datepicker/dist/popoverVersion.d.ts.map +1 -0
  304. package/components/datepicker/dist/styles/color-calendar-css.d.ts +3 -0
  305. package/components/datepicker/dist/styles/color-calendar-css.d.ts.map +1 -0
  306. package/components/datepicker/dist/styles/color-cell-css.d.ts +3 -0
  307. package/components/datepicker/dist/styles/color-cell-css.d.ts.map +1 -0
  308. package/components/datepicker/dist/styles/color-css.d.ts +3 -0
  309. package/components/datepicker/dist/styles/color-css.d.ts.map +1 -0
  310. package/components/datepicker/dist/styles/color-month-css.d.ts +3 -0
  311. package/components/datepicker/dist/styles/color-month-css.d.ts.map +1 -0
  312. package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +3 -0
  313. package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts.map +1 -0
  314. package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +3 -0
  315. package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts.map +1 -0
  316. package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +3 -0
  317. package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts.map +1 -0
  318. package/components/datepicker/dist/styles/style-css.d.ts +3 -0
  319. package/components/datepicker/dist/styles/style-css.d.ts.map +1 -0
  320. package/components/datepicker/dist/styles/tokens-css.d.ts +3 -0
  321. package/components/datepicker/dist/styles/tokens-css.d.ts.map +1 -0
  322. package/components/datepicker/dist/utilities.d.ts +47 -0
  323. package/components/datepicker/dist/utilities.d.ts.map +1 -0
  324. package/components/datepicker/dist/utilitiesCalendar.d.ts +38 -0
  325. package/components/datepicker/dist/utilitiesCalendar.d.ts.map +1 -0
  326. package/components/datepicker/dist/utilitiesCalendarRender.d.ts +51 -0
  327. package/components/datepicker/dist/utilitiesCalendarRender.d.ts.map +1 -0
  328. package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +6 -0
  329. package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts.map +1 -0
  330. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +61 -0
  331. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts.map +1 -0
  332. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +2 -0
  333. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts.map +1 -0
  334. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +58 -0
  335. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts.map +1 -0
  336. package/components/datepicker/node_modules/chalk/package.json +83 -0
  337. package/components/datepicker/node_modules/chalk/readme.md +325 -0
  338. package/components/datepicker/node_modules/chalk/source/index.d.ts +320 -0
  339. package/components/datepicker/node_modules/chalk/source/index.js +225 -0
  340. package/components/datepicker/node_modules/chalk/source/utilities.js +33 -0
  341. package/components/datepicker/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  342. package/components/datepicker/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  343. package/components/datepicker/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  344. package/components/datepicker/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  345. package/components/datepicker/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  346. package/components/datepicker/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  347. package/components/datepicker/node_modules/rollup-plugin-serve/LICENSE.md +21 -0
  348. package/components/datepicker/node_modules/rollup-plugin-serve/README.md +137 -0
  349. package/components/datepicker/node_modules/rollup-plugin-serve/dist/index.cjs +181 -0
  350. package/components/datepicker/node_modules/rollup-plugin-serve/dist/index.mjs +173 -0
  351. package/components/datepicker/node_modules/rollup-plugin-serve/index.d.ts +75 -0
  352. package/components/datepicker/node_modules/rollup-plugin-serve/package.json +51 -0
  353. package/components/datepicker/package.json +79 -0
  354. package/components/datepicker/src/auro-calendar-cell.js +381 -0
  355. package/components/datepicker/src/auro-calendar-month.js +128 -0
  356. package/components/datepicker/src/auro-calendar.js +329 -0
  357. package/components/datepicker/src/auro-datepicker.js +969 -0
  358. package/components/datepicker/src/dropdownVersion.js +0 -0
  359. package/components/datepicker/src/formkit/auro-dropdownVersion.js +1 -0
  360. package/components/datepicker/src/formkit/auro-inputVersion.js +1 -0
  361. package/components/datepicker/src/index.js +6 -0
  362. package/components/datepicker/src/popoverVersion.js +1 -0
  363. package/components/datepicker/src/styles/color-calendar-css.js +2 -0
  364. package/components/datepicker/src/styles/color-calendar.css +35 -0
  365. package/components/datepicker/src/styles/color-calendar.scss +51 -0
  366. package/components/datepicker/src/styles/color-cell-css.js +2 -0
  367. package/components/datepicker/src/styles/color-cell.css +45 -0
  368. package/components/datepicker/src/styles/color-cell.scss +73 -0
  369. package/components/datepicker/src/styles/color-css.js +2 -0
  370. package/components/datepicker/src/styles/color-month-css.js +2 -0
  371. package/components/datepicker/src/styles/color-month.css +34 -0
  372. package/components/datepicker/src/styles/color-month.scss +27 -0
  373. package/components/datepicker/src/styles/color.css +43 -0
  374. package/components/datepicker/src/styles/color.scss +30 -0
  375. package/components/datepicker/src/styles/style-auro-calendar-cell-css.js +2 -0
  376. package/components/datepicker/src/styles/style-auro-calendar-cell.css +123 -0
  377. package/components/datepicker/src/styles/style-auro-calendar-cell.scss +147 -0
  378. package/components/datepicker/src/styles/style-auro-calendar-css.js +2 -0
  379. package/components/datepicker/src/styles/style-auro-calendar-month-css.js +2 -0
  380. package/components/datepicker/src/styles/style-auro-calendar-month.css +121 -0
  381. package/components/datepicker/src/styles/style-auro-calendar-month.scss +141 -0
  382. package/components/datepicker/src/styles/style-auro-calendar.css +152 -0
  383. package/components/datepicker/src/styles/style-auro-calendar.scss +191 -0
  384. package/components/datepicker/src/styles/style-css.js +2 -0
  385. package/components/datepicker/src/styles/style.css +111 -0
  386. package/components/datepicker/src/styles/style.scss +107 -0
  387. package/components/datepicker/src/styles/tokens-css.js +2 -0
  388. package/components/datepicker/src/styles/tokens.css +22 -0
  389. package/components/datepicker/src/styles/tokens.scss +25 -0
  390. package/components/datepicker/src/utilities.js +87 -0
  391. package/components/datepicker/src/utilitiesCalendar.js +138 -0
  392. package/components/datepicker/src/utilitiesCalendarRender.js +156 -0
  393. package/components/datepicker/src/vendor/wc-range-datepicker/day.js +8 -0
  394. package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker-calendar.js +521 -0
  395. package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker-cell.js +211 -0
  396. package/components/datepicker/src/vendor/wc-range-datepicker/range-datepicker.js +254 -0
  397. package/components/dropdown/.stylelintrc.json +3 -0
  398. package/components/dropdown/.turbo/turbo-build$colon$sass.log +75 -0
  399. package/components/dropdown/.turbo/turbo-build$colon$version.log +7 -0
  400. package/components/dropdown/.turbo/turbo-build.log +206 -0
  401. package/components/dropdown/.turbo/turbo-bundler.log +13 -0
  402. package/components/dropdown/.turbo/turbo-postCss$colon$component.log +5 -0
  403. package/components/dropdown/.turbo/turbo-sass$colon$render.log +34 -0
  404. package/components/dropdown/.turbo/turbo-types.log +4 -0
  405. package/components/dropdown/README.md +188 -0
  406. package/components/dropdown/demo/api.html +55 -0
  407. package/components/dropdown/demo/api.js +21 -0
  408. package/components/dropdown/demo/api.md +1179 -0
  409. package/components/dropdown/demo/api.min.js +2885 -0
  410. package/components/dropdown/demo/index.js +22 -0
  411. package/components/dropdown/demo/index.md +404 -0
  412. package/components/dropdown/demo/index.min.js +2851 -0
  413. package/components/dropdown/dist/auro-dropdown.d.ts +194 -0
  414. package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -0
  415. package/components/dropdown/dist/auro-dropdownBib.d.ts +33 -0
  416. package/components/dropdown/dist/auro-dropdownBib.d.ts.map +1 -0
  417. package/components/dropdown/dist/iconVersion.d.ts +3 -0
  418. package/components/dropdown/dist/iconVersion.d.ts.map +1 -0
  419. package/components/dropdown/dist/index.d.ts +3 -0
  420. package/components/dropdown/dist/index.d.ts.map +1 -0
  421. package/components/dropdown/dist/index.js +2842 -0
  422. package/components/dropdown/dist/styles/bibColors-css.d.ts +3 -0
  423. package/components/dropdown/dist/styles/bibColors-css.d.ts.map +1 -0
  424. package/components/dropdown/dist/styles/bibStyles-css.d.ts +3 -0
  425. package/components/dropdown/dist/styles/bibStyles-css.d.ts.map +1 -0
  426. package/components/dropdown/dist/styles/color-css.d.ts +3 -0
  427. package/components/dropdown/dist/styles/color-css.d.ts.map +1 -0
  428. package/components/dropdown/dist/styles/style-css.d.ts +3 -0
  429. package/components/dropdown/dist/styles/style-css.d.ts.map +1 -0
  430. package/components/dropdown/dist/styles/tokens-css.d.ts +3 -0
  431. package/components/dropdown/dist/styles/tokens-css.d.ts.map +1 -0
  432. package/components/dropdown/node_modules/chalk/package.json +83 -0
  433. package/components/dropdown/node_modules/chalk/readme.md +325 -0
  434. package/components/dropdown/node_modules/chalk/source/index.d.ts +320 -0
  435. package/components/dropdown/node_modules/chalk/source/index.js +225 -0
  436. package/components/dropdown/node_modules/chalk/source/utilities.js +33 -0
  437. package/components/dropdown/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  438. package/components/dropdown/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  439. package/components/dropdown/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  440. package/components/dropdown/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  441. package/components/dropdown/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  442. package/components/dropdown/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  443. package/components/dropdown/package.json +57 -0
  444. package/components/dropdown/src/auro-dropdown.js +359 -0
  445. package/components/dropdown/src/auro-dropdownBib.js +97 -0
  446. package/components/dropdown/src/iconVersion.js +1 -0
  447. package/components/dropdown/src/index.js +6 -0
  448. package/components/dropdown/src/styles/bibColors-css.js +2 -0
  449. package/components/dropdown/src/styles/bibColors.css +6 -0
  450. package/components/dropdown/src/styles/bibColors.scss +18 -0
  451. package/components/dropdown/src/styles/bibStyles-css.js +2 -0
  452. package/components/dropdown/src/styles/bibStyles.css +48 -0
  453. package/components/dropdown/src/styles/bibStyles.scss +67 -0
  454. package/components/dropdown/src/styles/color-css.js +2 -0
  455. package/components/dropdown/src/styles/color.css +59 -0
  456. package/components/dropdown/src/styles/color.scss +79 -0
  457. package/components/dropdown/src/styles/style-css.js +2 -0
  458. package/components/dropdown/src/styles/style.css +88 -0
  459. package/components/dropdown/src/styles/style.scss +117 -0
  460. package/components/dropdown/src/styles/tokens-css.js +2 -0
  461. package/components/dropdown/src/styles/tokens.css +13 -0
  462. package/components/dropdown/src/styles/tokens.scss +15 -0
  463. package/components/form/.stylelintrc.json +3 -0
  464. package/components/form/.turbo/turbo-build$colon$sass.log +57 -0
  465. package/components/form/.turbo/turbo-build$colon$version.log +4 -0
  466. package/components/form/.turbo/turbo-build.log +113 -0
  467. package/components/form/.turbo/turbo-bundler.log +13 -0
  468. package/components/form/.turbo/turbo-postCss$colon$component.log +5 -0
  469. package/components/form/.turbo/turbo-sass$colon$render.log +10 -0
  470. package/components/form/.turbo/turbo-types.log +4 -0
  471. package/components/form/README.md +186 -0
  472. package/components/form/demo/api.html +48 -0
  473. package/components/form/demo/api.js +3 -0
  474. package/components/form/demo/api.md +0 -0
  475. package/components/form/demo/api.min.js +160 -0
  476. package/components/form/demo/index.js +4 -0
  477. package/components/form/demo/index.md +40 -0
  478. package/components/form/demo/index.min.js +161 -0
  479. package/components/form/dist/auro-form.d.ts +26 -0
  480. package/components/form/dist/auro-form.d.ts.map +1 -0
  481. package/components/form/dist/index.d.ts +3 -0
  482. package/components/form/dist/index.d.ts.map +1 -0
  483. package/components/form/dist/index.js +162 -0
  484. package/components/form/dist/styles/style-css.d.ts +3 -0
  485. package/components/form/dist/styles/style-css.d.ts.map +1 -0
  486. package/components/form/node_modules/chalk/package.json +83 -0
  487. package/components/form/node_modules/chalk/readme.md +325 -0
  488. package/components/form/node_modules/chalk/source/index.d.ts +320 -0
  489. package/components/form/node_modules/chalk/source/index.js +225 -0
  490. package/components/form/node_modules/chalk/source/utilities.js +33 -0
  491. package/components/form/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  492. package/components/form/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  493. package/components/form/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  494. package/components/form/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  495. package/components/form/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  496. package/components/form/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  497. package/components/form/package.json +72 -0
  498. package/components/form/src/auro-form.js +74 -0
  499. package/components/form/src/index.js +6 -0
  500. package/components/form/src/styles/style-css.js +2 -0
  501. package/components/form/src/styles/style.css +36 -0
  502. package/components/form/src/styles/style.scss +37 -0
  503. package/components/input/.stylelintrc.json +3 -0
  504. package/components/input/.turbo/turbo-build$colon$sass.log +148 -0
  505. package/components/input/.turbo/turbo-build$colon$version.log +10 -0
  506. package/components/input/.turbo/turbo-build.log +300 -0
  507. package/components/input/.turbo/turbo-bundler.log +13 -0
  508. package/components/input/.turbo/turbo-postCss$colon$component.log +5 -0
  509. package/components/input/.turbo/turbo-sass$colon$render.log +52 -0
  510. package/components/input/.turbo/turbo-types.log +4 -0
  511. package/components/input/README.md +176 -0
  512. package/components/input/demo/api.html +40 -0
  513. package/components/input/demo/api.js +25 -0
  514. package/components/input/demo/api.md +1251 -0
  515. package/components/input/demo/api.min.js +4070 -0
  516. package/components/input/demo/index.js +20 -0
  517. package/components/input/demo/index.md +253 -0
  518. package/components/input/demo/index.min.js +4012 -0
  519. package/components/input/dist/auro-input.d.ts +29 -0
  520. package/components/input/dist/auro-input.d.ts.map +1 -0
  521. package/components/input/dist/base-input.d.ts +359 -0
  522. package/components/input/dist/base-input.d.ts.map +1 -0
  523. package/components/input/dist/buttonVersion.d.ts +3 -0
  524. package/components/input/dist/buttonVersion.d.ts.map +1 -0
  525. package/components/input/dist/i18n.d.ts +19 -0
  526. package/components/input/dist/i18n.d.ts.map +1 -0
  527. package/components/input/dist/iconVersion.d.ts +3 -0
  528. package/components/input/dist/iconVersion.d.ts.map +1 -0
  529. package/components/input/dist/index.d.ts +3 -0
  530. package/components/input/dist/index.d.ts.map +1 -0
  531. package/components/input/dist/index.js +3979 -0
  532. package/components/input/dist/styles/borders-css.d.ts +3 -0
  533. package/components/input/dist/styles/borders-css.d.ts.map +1 -0
  534. package/components/input/dist/styles/color-css.d.ts +3 -0
  535. package/components/input/dist/styles/color-css.d.ts.map +1 -0
  536. package/components/input/dist/styles/helpText-css.d.ts +3 -0
  537. package/components/input/dist/styles/helpText-css.d.ts.map +1 -0
  538. package/components/input/dist/styles/input-css.d.ts +3 -0
  539. package/components/input/dist/styles/input-css.d.ts.map +1 -0
  540. package/components/input/dist/styles/label-css.d.ts +3 -0
  541. package/components/input/dist/styles/label-css.d.ts.map +1 -0
  542. package/components/input/dist/styles/notificationIcons-css.d.ts +3 -0
  543. package/components/input/dist/styles/notificationIcons-css.d.ts.map +1 -0
  544. package/components/input/dist/styles/style-css.d.ts +3 -0
  545. package/components/input/dist/styles/style-css.d.ts.map +1 -0
  546. package/components/input/dist/styles/tokens-css.d.ts +3 -0
  547. package/components/input/dist/styles/tokens-css.d.ts.map +1 -0
  548. package/components/input/node_modules/chalk/package.json +83 -0
  549. package/components/input/node_modules/chalk/readme.md +325 -0
  550. package/components/input/node_modules/chalk/source/index.d.ts +320 -0
  551. package/components/input/node_modules/chalk/source/index.js +225 -0
  552. package/components/input/node_modules/chalk/source/utilities.js +33 -0
  553. package/components/input/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  554. package/components/input/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  555. package/components/input/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  556. package/components/input/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  557. package/components/input/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  558. package/components/input/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  559. package/components/input/package.json +75 -0
  560. package/components/input/src/auro-input.js +242 -0
  561. package/components/input/src/base-input.js +942 -0
  562. package/components/input/src/buttonVersion.js +1 -0
  563. package/components/input/src/i18n.js +102 -0
  564. package/components/input/src/iconVersion.js +1 -0
  565. package/components/input/src/index.js +6 -0
  566. package/components/input/src/styles/@aurodesignsystem/webcorestylesheets/src/breakpoints +0 -0
  567. package/components/input/src/styles/borders-css.js +2 -0
  568. package/components/input/src/styles/borders.css +35 -0
  569. package/components/input/src/styles/borders.scss +65 -0
  570. package/components/input/src/styles/color-css.js +2 -0
  571. package/components/input/src/styles/color.css +63 -0
  572. package/components/input/src/styles/color.scss +96 -0
  573. package/components/input/src/styles/helpText-css.js +2 -0
  574. package/components/input/src/styles/helpText.css +6 -0
  575. package/components/input/src/styles/helpText.scss +9 -0
  576. package/components/input/src/styles/input-css.js +2 -0
  577. package/components/input/src/styles/input.css +22 -0
  578. package/components/input/src/styles/input.scss +29 -0
  579. package/components/input/src/styles/label-css.js +2 -0
  580. package/components/input/src/styles/label.css +45 -0
  581. package/components/input/src/styles/label.scss +75 -0
  582. package/components/input/src/styles/notificationIcons-css.js +2 -0
  583. package/components/input/src/styles/notificationIcons.css +76 -0
  584. package/components/input/src/styles/notificationIcons.scss +103 -0
  585. package/components/input/src/styles/style-css.js +2 -0
  586. package/components/input/src/styles/style.css +272 -0
  587. package/components/input/src/styles/style.scss +57 -0
  588. package/components/input/src/styles/tokens-css.js +2 -0
  589. package/components/input/src/styles/tokens.css +9 -0
  590. package/components/input/src/styles/tokens.scss +11 -0
  591. package/components/menu/.stylelintrc.json +3 -0
  592. package/components/menu/.turbo/turbo-build$colon$sass.log +86 -0
  593. package/components/menu/.turbo/turbo-build$colon$version.log +7 -0
  594. package/components/menu/.turbo/turbo-build.log +184 -0
  595. package/components/menu/.turbo/turbo-bundler.log +13 -0
  596. package/components/menu/.turbo/turbo-postCss$colon$component.log +5 -0
  597. package/components/menu/.turbo/turbo-sass$colon$render.log +34 -0
  598. package/components/menu/.turbo/turbo-types.log +4 -0
  599. package/components/menu/README.md +190 -0
  600. package/components/menu/demo/api.html +53 -0
  601. package/components/menu/demo/api.js +27 -0
  602. package/components/menu/demo/api.md +923 -0
  603. package/components/menu/demo/api.min.js +1293 -0
  604. package/components/menu/demo/index.js +28 -0
  605. package/components/menu/demo/index.md +104 -0
  606. package/components/menu/demo/index.min.js +1239 -0
  607. package/components/menu/dist/auro-menu.d.ts +194 -0
  608. package/components/menu/dist/auro-menu.d.ts.map +1 -0
  609. package/components/menu/dist/auro-menuoption.d.ts +65 -0
  610. package/components/menu/dist/auro-menuoption.d.ts.map +1 -0
  611. package/components/menu/dist/iconVersion.d.ts +3 -0
  612. package/components/menu/dist/iconVersion.d.ts.map +1 -0
  613. package/components/menu/dist/index.d.ts +4 -0
  614. package/components/menu/dist/index.d.ts.map +1 -0
  615. package/components/menu/dist/index.js +1231 -0
  616. package/components/menu/dist/styles/color-menu-css.d.ts +3 -0
  617. package/components/menu/dist/styles/color-menu-css.d.ts.map +1 -0
  618. package/components/menu/dist/styles/color-menuoption-css.d.ts +3 -0
  619. package/components/menu/dist/styles/color-menuoption-css.d.ts.map +1 -0
  620. package/components/menu/dist/styles/style-menu-css.d.ts +3 -0
  621. package/components/menu/dist/styles/style-menu-css.d.ts.map +1 -0
  622. package/components/menu/dist/styles/style-menuoption-css.d.ts +3 -0
  623. package/components/menu/dist/styles/style-menuoption-css.d.ts.map +1 -0
  624. package/components/menu/dist/styles/tokens-css.d.ts +3 -0
  625. package/components/menu/dist/styles/tokens-css.d.ts.map +1 -0
  626. package/components/menu/node_modules/chalk/package.json +83 -0
  627. package/components/menu/node_modules/chalk/readme.md +325 -0
  628. package/components/menu/node_modules/chalk/source/index.d.ts +320 -0
  629. package/components/menu/node_modules/chalk/source/index.js +225 -0
  630. package/components/menu/node_modules/chalk/source/utilities.js +33 -0
  631. package/components/menu/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  632. package/components/menu/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  633. package/components/menu/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  634. package/components/menu/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  635. package/components/menu/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  636. package/components/menu/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  637. package/components/menu/node_modules/mime/CHANGELOG.md +296 -0
  638. package/components/menu/node_modules/mime/Mime.js +97 -0
  639. package/components/menu/node_modules/mime/README.md +187 -0
  640. package/components/menu/node_modules/mime/cli.js +46 -0
  641. package/components/menu/node_modules/mime/index.js +4 -0
  642. package/components/menu/node_modules/mime/lite.js +4 -0
  643. package/components/menu/node_modules/mime/package.json +52 -0
  644. package/components/menu/node_modules/mime/types/other.js +1 -0
  645. package/components/menu/node_modules/mime/types/standard.js +1 -0
  646. package/components/menu/node_modules/rollup-plugin-serve/LICENSE.md +21 -0
  647. package/components/menu/node_modules/rollup-plugin-serve/README.md +135 -0
  648. package/components/menu/node_modules/rollup-plugin-serve/dist/index.cjs +181 -0
  649. package/components/menu/node_modules/rollup-plugin-serve/dist/index.cjs.js +197 -0
  650. package/components/menu/node_modules/rollup-plugin-serve/dist/index.es.js +193 -0
  651. package/components/menu/node_modules/rollup-plugin-serve/dist/index.mjs +173 -0
  652. package/components/menu/node_modules/rollup-plugin-serve/package.json +44 -0
  653. package/components/menu/package.json +70 -0
  654. package/components/menu/src/auro-menu.js +571 -0
  655. package/components/menu/src/auro-menuoption.js +148 -0
  656. package/components/menu/src/iconVersion.js +1 -0
  657. package/components/menu/src/index.js +8 -0
  658. package/components/menu/src/styles/color-menu-css.js +2 -0
  659. package/components/menu/src/styles/color-menu.css +4 -0
  660. package/components/menu/src/styles/color-menu.scss +12 -0
  661. package/components/menu/src/styles/color-menuoption-css.js +2 -0
  662. package/components/menu/src/styles/color-menuoption.css +23 -0
  663. package/components/menu/src/styles/color-menuoption.scss +33 -0
  664. package/components/menu/src/styles/style-menu-css.js +2 -0
  665. package/components/menu/src/styles/style-menu.css +2061 -0
  666. package/components/menu/src/styles/style-menu.scss +80 -0
  667. package/components/menu/src/styles/style-menuoption-css.js +2 -0
  668. package/components/menu/src/styles/style-menuoption.css +45 -0
  669. package/components/menu/src/styles/style-menuoption.scss +66 -0
  670. package/components/menu/src/styles/tokens-css.js +2 -0
  671. package/components/menu/src/styles/tokens.css +6 -0
  672. package/components/menu/src/styles/tokens.scss +6 -0
  673. package/components/radio/.stylelintrc.json +3 -0
  674. package/components/radio/.turbo/turbo-build$colon$sass.log +130 -0
  675. package/components/radio/.turbo/turbo-build.log +213 -0
  676. package/components/radio/.turbo/turbo-bundler.log +13 -0
  677. package/components/radio/.turbo/turbo-postCss$colon$component.log +5 -0
  678. package/components/radio/.turbo/turbo-sass$colon$render.log +34 -0
  679. package/components/radio/.turbo/turbo-types.log +4 -0
  680. package/components/radio/README.md +176 -0
  681. package/components/radio/demo/api.html +50 -0
  682. package/components/radio/demo/api.js +17 -0
  683. package/components/radio/demo/api.md +401 -0
  684. package/components/radio/demo/api.min.js +1050 -0
  685. package/components/radio/demo/index.js +8 -0
  686. package/components/radio/demo/index.md +122 -0
  687. package/components/radio/demo/index.min.js +1016 -0
  688. package/components/radio/dist/auro-radio-group.d.ts +171 -0
  689. package/components/radio/dist/auro-radio-group.d.ts.map +1 -0
  690. package/components/radio/dist/auro-radio.d.ts +113 -0
  691. package/components/radio/dist/auro-radio.d.ts.map +1 -0
  692. package/components/radio/dist/index.d.ts +4 -0
  693. package/components/radio/dist/index.d.ts.map +1 -0
  694. package/components/radio/dist/index.js +1015 -0
  695. package/components/radio/dist/styles/auro-radio-group-css.d.ts +3 -0
  696. package/components/radio/dist/styles/auro-radio-group-css.d.ts.map +1 -0
  697. package/components/radio/dist/styles/color-css.d.ts +3 -0
  698. package/components/radio/dist/styles/color-css.d.ts.map +1 -0
  699. package/components/radio/dist/styles/groupColor-css.d.ts +3 -0
  700. package/components/radio/dist/styles/groupColor-css.d.ts.map +1 -0
  701. package/components/radio/dist/styles/style-css.d.ts +3 -0
  702. package/components/radio/dist/styles/style-css.d.ts.map +1 -0
  703. package/components/radio/dist/styles/tokens-css.d.ts +3 -0
  704. package/components/radio/dist/styles/tokens-css.d.ts.map +1 -0
  705. package/components/radio/node_modules/chalk/package.json +83 -0
  706. package/components/radio/node_modules/chalk/readme.md +325 -0
  707. package/components/radio/node_modules/chalk/source/index.d.ts +320 -0
  708. package/components/radio/node_modules/chalk/source/index.js +225 -0
  709. package/components/radio/node_modules/chalk/source/utilities.js +33 -0
  710. package/components/radio/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  711. package/components/radio/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  712. package/components/radio/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  713. package/components/radio/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  714. package/components/radio/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  715. package/components/radio/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  716. package/components/radio/package.json +69 -0
  717. package/components/radio/src/auro-radio-group.js +433 -0
  718. package/components/radio/src/auro-radio.js +247 -0
  719. package/components/radio/src/index.js +8 -0
  720. package/components/radio/src/styles/auro-radio-group-css.js +2 -0
  721. package/components/radio/src/styles/auro-radio-group.css +23 -0
  722. package/components/radio/src/styles/auro-radio-group.scss +36 -0
  723. package/components/radio/src/styles/color-css.js +2 -0
  724. package/components/radio/src/styles/color.css +45 -0
  725. package/components/radio/src/styles/color.scss +56 -0
  726. package/components/radio/src/styles/groupColor-css.js +2 -0
  727. package/components/radio/src/styles/groupColor.css +21 -0
  728. package/components/radio/src/styles/groupColor.scss +33 -0
  729. package/components/radio/src/styles/style-css.js +2 -0
  730. package/components/radio/src/styles/style.css +113 -0
  731. package/components/radio/src/styles/style.scss +99 -0
  732. package/components/radio/src/styles/tokens-css.js +2 -0
  733. package/components/radio/src/styles/tokens.css +9 -0
  734. package/components/radio/src/styles/tokens.scss +12 -0
  735. package/components/select/.stylelintrc.json +3 -0
  736. package/components/select/.turbo/turbo-build$colon$sass.log +122 -0
  737. package/components/select/.turbo/turbo-build.log +240 -0
  738. package/components/select/.turbo/turbo-postCss$colon$component.log +5 -0
  739. package/components/select/.turbo/turbo-sass$colon$render.log +22 -0
  740. package/components/select/README.md +205 -0
  741. package/components/select/demo/alertValue.js +6 -0
  742. package/components/select/demo/api.html +54 -0
  743. package/components/select/demo/api.js +33 -0
  744. package/components/select/demo/api.md +814 -0
  745. package/components/select/demo/api.min.js +4980 -0
  746. package/components/select/demo/index.js +9 -0
  747. package/components/select/demo/index.md +470 -0
  748. package/components/select/demo/index.min.js +4871 -0
  749. package/components/select/dist/auro-select.d.ts +193 -0
  750. package/components/select/dist/auro-select.d.ts.map +1 -0
  751. package/components/select/dist/formkit/auro-dropdownVersion.d.ts +3 -0
  752. package/components/select/dist/formkit/auro-dropdownVersion.d.ts.map +1 -0
  753. package/components/select/dist/index.d.ts +3 -0
  754. package/components/select/dist/index.d.ts.map +1 -0
  755. package/components/select/dist/index.js +3782 -0
  756. package/components/select/dist/styles/color-css.d.ts +3 -0
  757. package/components/select/dist/styles/color-css.d.ts.map +1 -0
  758. package/components/select/dist/styles/style-css.d.ts +3 -0
  759. package/components/select/dist/styles/style-css.d.ts.map +1 -0
  760. package/components/select/dist/styles/tokens-css.d.ts +3 -0
  761. package/components/select/dist/styles/tokens-css.d.ts.map +1 -0
  762. package/components/select/node_modules/chalk/package.json +83 -0
  763. package/components/select/node_modules/chalk/readme.md +325 -0
  764. package/components/select/node_modules/chalk/source/index.d.ts +320 -0
  765. package/components/select/node_modules/chalk/source/index.js +225 -0
  766. package/components/select/node_modules/chalk/source/utilities.js +33 -0
  767. package/components/select/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  768. package/components/select/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  769. package/components/select/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  770. package/components/select/node_modules/chalk/source/vendor/supports-color/browser.js +30 -0
  771. package/components/select/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  772. package/components/select/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
  773. package/components/select/node_modules/mime/CHANGELOG.md +296 -0
  774. package/components/select/node_modules/mime/Mime.js +97 -0
  775. package/components/select/node_modules/mime/README.md +187 -0
  776. package/components/select/node_modules/mime/cli.js +46 -0
  777. package/components/select/node_modules/mime/index.js +4 -0
  778. package/components/select/node_modules/mime/lite.js +4 -0
  779. package/components/select/node_modules/mime/package.json +52 -0
  780. package/components/select/node_modules/mime/types/other.js +1 -0
  781. package/components/select/node_modules/mime/types/standard.js +1 -0
  782. package/components/select/node_modules/rollup-plugin-serve/LICENSE.md +21 -0
  783. package/components/select/node_modules/rollup-plugin-serve/README.md +135 -0
  784. package/components/select/node_modules/rollup-plugin-serve/dist/index.cjs +181 -0
  785. package/components/select/node_modules/rollup-plugin-serve/dist/index.cjs.js +197 -0
  786. package/components/select/node_modules/rollup-plugin-serve/dist/index.es.js +193 -0
  787. package/components/select/node_modules/rollup-plugin-serve/dist/index.mjs +173 -0
  788. package/components/select/node_modules/rollup-plugin-serve/package.json +44 -0
  789. package/components/select/package.json +70 -0
  790. package/components/select/packageScripts/postinstall.mjs +28 -0
  791. package/components/select/src/auro-select.js +570 -0
  792. package/components/select/src/formkit/auro-dropdownVersion.js +1 -0
  793. package/components/select/src/index.js +6 -0
  794. package/components/select/src/styles/color-css.js +2 -0
  795. package/components/select/src/styles/color.css +63 -0
  796. package/components/select/src/styles/color.scss +33 -0
  797. package/components/select/src/styles/style-css.js +2 -0
  798. package/components/select/src/styles/style.css +97 -0
  799. package/components/select/src/styles/style.scss +66 -0
  800. package/components/select/src/styles/tokens-css.js +2 -0
  801. package/components/select/src/styles/tokens.css +3 -0
  802. package/components/select/src/styles/tokens.scss +5 -0
  803. package/package.json +142 -0
  804. package/packages/build-tools/package.json +15 -0
  805. package/packages/build-tools/src/docProcessor.mjs +104 -0
  806. package/packages/build-tools/src/formVersionWriter.mjs +75 -0
  807. package/packages/build-tools/src/index.js +1 -0
  808. package/packages/build-tools/src/kitDocProcessor.mjs +66 -0
  809. package/packages/form-validation/package.json +12 -0
  810. package/packages/form-validation/src/index.js +1 -0
  811. package/packages/form-validation/src/validation.js +239 -0
  812. package/packages/typescript/base.json +19 -0
  813. package/packages/typescript/package.json +20 -0
  814. package/turbo.json +100 -0
@@ -0,0 +1,4012 @@
1
+ /**
2
+ * Function used for the lang switch demo
3
+ * @private
4
+ */
5
+ const changeLang = () => {
6
+ const englishButton = document.getElementById("enButton");
7
+ const spanishButton = document.getElementById("esButton");
8
+
9
+ englishButton.addEventListener("click", () => {
10
+ document.documentElement.setAttribute("lang", "en");
11
+ });
12
+
13
+ spanishButton.addEventListener("click", () => {
14
+ document.documentElement.setAttribute("lang", "es");
15
+ });
16
+ };
17
+
18
+ /**
19
+ * @license
20
+ * Copyright 2017 Google LLC
21
+ * SPDX-License-Identifier: BSD-3-Clause
22
+ */
23
+ const t$3=globalThis,i$5=t$3.trustedTypes,s$3=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$4=document,l$2=()=>r$4.createComment(""),c$3=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$2=Array.isArray,u$4=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$1=/-->/g,_=/>/g,m$1=RegExp(`>|${d$1}(?:([^\\s"'>=/]+)(${d$1}*=${d$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$2=/'/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$4.createTreeWalker(r$4,129);function P(t,i){if(!a$2(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$3?s$3.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$1:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$1):void 0!==u[3]&&(c=m$1):c===m$1?">"===u[0]?(c=r??f$1,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m$1:'"'===u[3]?g:p$2):c===g||c===p$2?c=m$1:c===v$1||c===_?c=f$1:(c=m$1,r=void 0);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$1?s+n$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$4.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$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$1(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$4).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$4,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$3(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$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&&c$3(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$4.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$1(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$3(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$3(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 Z={M:e$4,P:h$1,A:o$4,C:1,L:V,R:M$1,D:u$4,V:S$1,I:R,H:k,N:I,U:L,B:H,F:z},j=t$3.litHtmlPolyfillSupport;j?.(N,R),(t$3.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};
24
+
25
+ /**
26
+ * @license
27
+ * Copyright 2020 Google LLC
28
+ * SPDX-License-Identifier: BSD-3-Clause
29
+ */
30
+ const a$1=Symbol.for(""),o$3=t=>{if(t?.r===a$1)return t?._$litStatic$},s$2=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$3=n$2(x);
31
+
32
+ /**
33
+ * @license
34
+ * Copyright 2017 Google LLC
35
+ * SPDX-License-Identifier: BSD-3-Clause
36
+ */
37
+ const t$2={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$3=t=>(...e)=>({_$litDirective$:t,values:e});let i$3 = 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)}};
38
+
39
+ /**
40
+ * @license
41
+ * Copyright 2020 Google LLC
42
+ * SPDX-License-Identifier: BSD-3-Clause
43
+ */const {I:t$1}=Z,s$1=()=>document.createComment(""),r$3=(o,i,n)=>{const e=o._$AA.parentNode,l=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=e.insertBefore(s$1(),l),c=e.insertBefore(s$1(),l);n=new t$1(i,c,o,o.options);}else {const t=n._$AB.nextSibling,i=n._$AM,c=i!==o;if(c){let t;n._$AQ?.(o),n._$AM=o,void 0!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t);}if(t!==l||c){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t;}}}return n},v=(o,t,i=o)=>(o._$AI(t,i),o),u$2={},m=(o,t=u$2)=>o._$AH=t,p$1=o=>o._$AH,M=o=>{o._$AP?.(!1,!0);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o;}};
44
+
45
+ /**
46
+ * @license
47
+ * Copyright 2017 Google LLC
48
+ * SPDX-License-Identifier: BSD-3-Clause
49
+ */
50
+ const u$1=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c$2=e$3(class extends i$3{constructor(e){if(super(e),e.type!==t$2.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return {values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r,c]){const d=p$1(s),{values:p,keys:a}=this.dt(t,r,c);if(!Array.isArray(d))return this.ut=a,p;const h=this.ut??=[],v$1=[];let m$1,y,x=0,j=d.length-1,k=0,w=p.length-1;for(;x<=j&&k<=w;)if(null===d[x])x++;else if(null===d[j])j--;else if(h[x]===a[k])v$1[k]=v(d[x],p[k]),x++,k++;else if(h[j]===a[w])v$1[w]=v(d[j],p[w]),j--,w--;else if(h[x]===a[w])v$1[w]=v(d[x],p[w]),r$3(s,v$1[w+1],d[x]),x++,w--;else if(h[j]===a[k])v$1[k]=v(d[j],p[k]),r$3(s,d[x],d[j]),j--,k++;else if(void 0===m$1&&(m$1=u$1(a,k,w),y=u$1(h,x,j)),m$1.has(h[x]))if(m$1.has(h[j])){const e=y.get(a[k]),t=void 0!==e?d[e]:null;if(null===t){const e=r$3(s,d[x]);v(e,p[k]),v$1[k]=e;}else v$1[k]=v(t,p[k]),r$3(s,d[x],t),d[e]=null;k++;}else M(d[j]),j--;else M(d[x]),x++;for(;k<=w;){const e=r$3(s,v$1[w+1]);v(e,p[k]),v$1[k++]=e;}for(;x<=j;){const e=d[x++];null!==e&&M(e);}return this.ut=a,m(s,v$1),T}});
51
+
52
+ /**
53
+ * @license
54
+ * Copyright 2018 Google LLC
55
+ * SPDX-License-Identifier: BSD-3-Clause
56
+ */const e$2=e$3(class extends i$3{constructor(t){if(super(t),t.type!==t$2.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}});
57
+
58
+ /**
59
+ * @license
60
+ * Copyright 2018 Google LLC
61
+ * SPDX-License-Identifier: BSD-3-Clause
62
+ */const o$2=o=>o??E;
63
+
64
+ const watchedItems = new Set();
65
+
66
+
67
+ /**
68
+ * Function for setting the value of the lang attribute.
69
+ * @private
70
+ * @param {object} item - Individual DOM node from set of watchedItems.
71
+ * @param {string} lang - Current language set for the document.
72
+ */
73
+ function setLang(item, lang) {
74
+
75
+ /**
76
+ * It is desired that if the lang is `en` to maintain `undefined` as not to
77
+ * add the `lang` attribute to the individual element.
78
+ */
79
+ item.lang = lang === 'en' ? undefined : lang;
80
+ }
81
+
82
+ /**
83
+ * Change handler for MutationObserver() callback.
84
+ * @private
85
+ * @param {MutationRecord[]} mutationList - Observed list of mutations.
86
+ */
87
+ function handleChange(mutationList) {
88
+ const [mutation] = mutationList;
89
+ const lang = mutation.target.getAttribute('lang');
90
+ watchedItems.forEach((item) => {
91
+ setLang(item, lang);
92
+ });
93
+ }
94
+
95
+ if (typeof window !== "undefined") {
96
+ if (window.MutationObserver) {
97
+ const observer = new MutationObserver(handleChange);
98
+ observer.observe(document.documentElement, { attributes: true,
99
+ attributeFilter: ['lang'] });
100
+ }
101
+ }
102
+
103
+ const stringsES = {
104
+ 'optional': 'opcional',
105
+ 'validCard': 'Por favor, introduzca un número de tarjeta de crédito válida.',
106
+ 'email': 'Introduzca una dirección de correo electrónico válida (nombre@dominio.com).',
107
+ 'password': `Las contraseñas válidas deben constar de al menos 8 caracteres, incluyendo al menos una letra mayúscula, una letra minúscula y un número.`,
108
+ 'creditcard': 'Por favor, introduzca un número de tarjeta de crédito válida.',
109
+ 'dateMMDDYYYY': 'Ingrese una fecha completa en el formato MM/DD/AAAA',
110
+ 'dateMMYY': 'Ingrese una fecha completa en el formato MM/AA',
111
+ 'dateMMYYYY': 'Ingrese una fecha completa en el formato MM/AAAA',
112
+ 'dateYYYYMMDD': 'Ingrese una fecha completa en el formato AAAA/MM/DD',
113
+ 'dateYY': 'Ingrese una fecha completa en el formato AA',
114
+ 'dateYYYY': 'Ingrese una fecha completa en el formato AAAA',
115
+ 'dateMM': 'Ingrese una fecha completa en el formato MM',
116
+ };
117
+
118
+ const stringsEN = {
119
+ 'optional': 'optional',
120
+ 'validCard': 'Please enter a valid credit card number.',
121
+ 'email': 'Please enter a valid email address (name@domain.com).',
122
+ 'password': 'Valid passwords must consist of at least 8 characters, including at least one uppercase letter, one lowercase letter, and one number.',
123
+ 'creditcard': 'Please enter a valid credit card number.',
124
+ 'dateMMDDYYYY': 'Please enter a complete date in the format MM/DD/YYYY',
125
+ 'dateMMYY': 'Please enter a complete date in the format MM/YY',
126
+ 'dateMMYYYY': 'Please enter a complete date in the format MM/YYYY',
127
+ 'dateYYYYMMDD': 'Please enter a complete date in the format YYYY/MM/DD',
128
+ 'dateYYY': 'Please enter a complete date in the format YY',
129
+ 'dateYYYYY': 'Please enter a complete date in the format YYYY',
130
+ 'dateMM': 'Please enter a complete date in the format MM'
131
+ };
132
+
133
+ /**
134
+ * Function to support the selected of a string in the set lang.
135
+ * @param {string} lang - Requested lang for content return.
136
+ * @param {string} requestedString - String requested in context.
137
+ * @private
138
+ * @returns {string} Value of string request.
139
+ */
140
+ function i18n(lang, requestedString) {
141
+ if (lang === 'es') {
142
+ return stringsES[requestedString];
143
+ }
144
+
145
+ return stringsEN[requestedString];
146
+ }
147
+
148
+ /**
149
+ * @private
150
+ * @param {object} element - Pass in the scope of the element in use.
151
+ */
152
+ function notifyOnLangChange(element) {
153
+ if (!element.lang) {
154
+ setLang(element, document.documentElement.lang);
155
+ }
156
+ watchedItems.add(element);
157
+ }
158
+
159
+ /**
160
+ * @private
161
+ * @param {object} element - Pass in the scope of the element in use.
162
+ */
163
+ function stopNotifyingOnLangChange(element) {
164
+ watchedItems.delete(element);
165
+ }
166
+
167
+ /**
168
+ * @license
169
+ * Copyright 2019 Google LLC
170
+ * SPDX-License-Identifier: BSD-3-Clause
171
+ */
172
+ const t=globalThis,e$1=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o$1=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$1&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$1.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$1.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$2=(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$1)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$1=e$1?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
173
+
174
+ /**
175
+ * @license
176
+ * Copyright 2017 Google LLC
177
+ * SPDX-License-Identifier: BSD-3-Clause
178
+ */const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:r$1,getOwnPropertyNames:h,getOwnPropertySymbols:o,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$1(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(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(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");
179
+
180
+ /**
181
+ * @license
182
+ * Copyright 2017 Google LLC
183
+ * SPDX-License-Identifier: BSD-3-Clause
184
+ */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=globalThis.litElementPolyfillSupport;i?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
185
+
186
+ var styleCss$3 = i$2`*,*: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}.typeIcon{display:flex;flex-direction:row;align-items:center}.typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([bordered]) .notificationIcons{align-items:center}.notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}.alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}.clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem))}.passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}.notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}.notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.notificationBtn [auro-icon][hidden]{display:none}:host(:not([bordered])) .typeIcon,:host(:not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host(:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.inputElement-helpText{margin:var(--ds-size-50, 0.25rem) 0;font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-size-200, 1rem)}input{border:unset}.wrapper{position:relative;overflow:hidden;border-style:solid}:host(:not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host(:not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([validity]:not([validity=valid])) .wrapper:before{border-bottom:0}label{position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:nowrap}:host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}:host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([bordered]) label{top:50%;transform:translateY(-50%)}:host([bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}:host .wrapper:focus-within label{top:var(--ds-size-25, 0.125rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host label.withValue{top:var(--ds-size-25, 0.125rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host([activeLabel]) .wrapper label{top:var(--ds-size-25, 0.125rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host{--size-lgsm: 1.875rem;--size-xlsm: 2.75rem;--size-mdxxs: 1.2rem;position:relative;display:block}.wrapper{display:flex;flex-direction:row}.main{display:flex;flex-direction:row;position:relative;flex:1}input{position:relative;overflow:hidden;min-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));max-height:calc(var(--ds-size-700, 3.5rem) + var(--ds-size-25, 0.125rem));flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-size-200, 1rem);outline:none;text-overflow:ellipsis;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:nowrap}input::-ms-reveal,input::-ms-clear{display:none}input:disabled{background:none;pointer-events:none}`;
187
+
188
+ var colorCss$3 = i$2`.wrapper{border-color:transparent}.inputElement-helpText{color:var(--ds-auro-input-help-text-color)}input{background-color:transparent;caret-color:var(--ds-auro-input-caret-color);color:var(--ds-auro-input-text-color)}input::placeholder{color:transparent}input:focus::placeholder{color:var(--ds-auro-input-placeholder-text-color)}input:disabled{--ds-auro-input-input-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}label{color:var(--ds-auro-input-label-text-color)}:host(:not([bordered],[borderless])) .wrapper{border-bottom-color:var(--ds-auro-input-border-color)}:host([bordered]) .wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-container-color)}:host([bordered]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host(:not([borderless])) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host(:not([borderless])) .wrapper:focus-within:before{border-bottom-color:transparent}:host([validity]:not([validity=valid])){--ds-auro-input-border-color: var(--ds-color-border-error-default, #cc1816);--ds-auro-input-help-text-color: var(--ds-color-text-error-default, #cc1816)}:host([validity]:not([validity=valid])[bordered]) .wrapper{--ds-auro-input-border-color: var(--ds-color-border-error-default, #cc1816);box-shadow:inset 0 0 0 1px var(--ds-auro-input-border-color)}:host([disabled]){--ds-auro-input-border-color: var(--ds-color-border-ui-disabled-default, #adadad);--ds-auro-input-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}`;
189
+
190
+ var tokensCss$3 = i$2`:host{--ds-auro-input-border-color: var(--ds-color-border-secondary-default, #939fad);--ds-auro-input-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-input-caret-color: var(--ds-color-text-ui-focus-default, #2c67b5);--ds-auro-input-help-text-color: var(--ds-color-text-tertiary-default, #6a717c);--ds-auro-input-label-text-color: var(--ds-color-text-tertiary-default, #6a717c);--ds-auro-input-placeholder-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-input-text-color: var(--ds-color-text-primary-default, #2a2a2a)}`;
191
+
192
+ var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
193
+
194
+ var NumeralFormatter = function (numeralDecimalMark,
195
+ numeralIntegerScale,
196
+ numeralDecimalScale,
197
+ numeralThousandsGroupStyle,
198
+ numeralPositiveOnly,
199
+ stripLeadingZeroes,
200
+ prefix,
201
+ signBeforePrefix,
202
+ tailPrefix,
203
+ delimiter) {
204
+ var owner = this;
205
+
206
+ owner.numeralDecimalMark = numeralDecimalMark || '.';
207
+ owner.numeralIntegerScale = numeralIntegerScale > 0 ? numeralIntegerScale : 0;
208
+ owner.numeralDecimalScale = numeralDecimalScale >= 0 ? numeralDecimalScale : 2;
209
+ owner.numeralThousandsGroupStyle = numeralThousandsGroupStyle || NumeralFormatter.groupStyle.thousand;
210
+ owner.numeralPositiveOnly = !!numeralPositiveOnly;
211
+ owner.stripLeadingZeroes = stripLeadingZeroes !== false;
212
+ owner.prefix = (prefix || prefix === '') ? prefix : '';
213
+ owner.signBeforePrefix = !!signBeforePrefix;
214
+ owner.tailPrefix = !!tailPrefix;
215
+ owner.delimiter = (delimiter || delimiter === '') ? delimiter : ',';
216
+ owner.delimiterRE = delimiter ? new RegExp('\\' + delimiter, 'g') : '';
217
+ };
218
+
219
+ NumeralFormatter.groupStyle = {
220
+ thousand: 'thousand',
221
+ lakh: 'lakh',
222
+ wan: 'wan',
223
+ none: 'none'
224
+ };
225
+
226
+ NumeralFormatter.prototype = {
227
+ getRawValue: function (value) {
228
+ return value.replace(this.delimiterRE, '').replace(this.numeralDecimalMark, '.');
229
+ },
230
+
231
+ format: function (value) {
232
+ var owner = this, parts, partSign, partSignAndPrefix, partInteger, partDecimal = '';
233
+
234
+ // strip alphabet letters
235
+ value = value.replace(/[A-Za-z]/g, '')
236
+ // replace the first decimal mark with reserved placeholder
237
+ .replace(owner.numeralDecimalMark, 'M')
238
+
239
+ // strip non numeric letters except minus and "M"
240
+ // this is to ensure prefix has been stripped
241
+ .replace(/[^\dM-]/g, '')
242
+
243
+ // replace the leading minus with reserved placeholder
244
+ .replace(/^\-/, 'N')
245
+
246
+ // strip the other minus sign (if present)
247
+ .replace(/\-/g, '')
248
+
249
+ // replace the minus sign (if present)
250
+ .replace('N', owner.numeralPositiveOnly ? '' : '-')
251
+
252
+ // replace decimal mark
253
+ .replace('M', owner.numeralDecimalMark);
254
+
255
+ // strip any leading zeros
256
+ if (owner.stripLeadingZeroes) {
257
+ value = value.replace(/^(-)?0+(?=\d)/, '$1');
258
+ }
259
+
260
+ partSign = value.slice(0, 1) === '-' ? '-' : '';
261
+ if (typeof owner.prefix != 'undefined') {
262
+ if (owner.signBeforePrefix) {
263
+ partSignAndPrefix = partSign + owner.prefix;
264
+ } else {
265
+ partSignAndPrefix = owner.prefix + partSign;
266
+ }
267
+ } else {
268
+ partSignAndPrefix = partSign;
269
+ }
270
+
271
+ partInteger = value;
272
+
273
+ if (value.indexOf(owner.numeralDecimalMark) >= 0) {
274
+ parts = value.split(owner.numeralDecimalMark);
275
+ partInteger = parts[0];
276
+ partDecimal = owner.numeralDecimalMark + parts[1].slice(0, owner.numeralDecimalScale);
277
+ }
278
+
279
+ if(partSign === '-') {
280
+ partInteger = partInteger.slice(1);
281
+ }
282
+
283
+ if (owner.numeralIntegerScale > 0) {
284
+ partInteger = partInteger.slice(0, owner.numeralIntegerScale);
285
+ }
286
+
287
+ switch (owner.numeralThousandsGroupStyle) {
288
+ case NumeralFormatter.groupStyle.lakh:
289
+ partInteger = partInteger.replace(/(\d)(?=(\d\d)+\d$)/g, '$1' + owner.delimiter);
290
+
291
+ break;
292
+
293
+ case NumeralFormatter.groupStyle.wan:
294
+ partInteger = partInteger.replace(/(\d)(?=(\d{4})+$)/g, '$1' + owner.delimiter);
295
+
296
+ break;
297
+
298
+ case NumeralFormatter.groupStyle.thousand:
299
+ partInteger = partInteger.replace(/(\d)(?=(\d{3})+$)/g, '$1' + owner.delimiter);
300
+
301
+ break;
302
+ }
303
+
304
+ if (owner.tailPrefix) {
305
+ return partSign + partInteger.toString() + (owner.numeralDecimalScale > 0 ? partDecimal.toString() : '') + owner.prefix;
306
+ }
307
+
308
+ return partSignAndPrefix + partInteger.toString() + (owner.numeralDecimalScale > 0 ? partDecimal.toString() : '');
309
+ }
310
+ };
311
+
312
+ var NumeralFormatter_1 = NumeralFormatter;
313
+
314
+ var DateFormatter = function (datePattern, dateMin, dateMax) {
315
+ var owner = this;
316
+
317
+ owner.date = [];
318
+ owner.blocks = [];
319
+ owner.datePattern = datePattern;
320
+ owner.dateMin = dateMin
321
+ .split('-')
322
+ .reverse()
323
+ .map(function(x) {
324
+ return parseInt(x, 10);
325
+ });
326
+ if (owner.dateMin.length === 2) owner.dateMin.unshift(0);
327
+
328
+ owner.dateMax = dateMax
329
+ .split('-')
330
+ .reverse()
331
+ .map(function(x) {
332
+ return parseInt(x, 10);
333
+ });
334
+ if (owner.dateMax.length === 2) owner.dateMax.unshift(0);
335
+
336
+ owner.initBlocks();
337
+ };
338
+
339
+ DateFormatter.prototype = {
340
+ initBlocks: function () {
341
+ var owner = this;
342
+ owner.datePattern.forEach(function (value) {
343
+ if (value === 'Y') {
344
+ owner.blocks.push(4);
345
+ } else {
346
+ owner.blocks.push(2);
347
+ }
348
+ });
349
+ },
350
+
351
+ getISOFormatDate: function () {
352
+ var owner = this,
353
+ date = owner.date;
354
+
355
+ return date[2] ? (
356
+ date[2] + '-' + owner.addLeadingZero(date[1]) + '-' + owner.addLeadingZero(date[0])
357
+ ) : '';
358
+ },
359
+
360
+ getBlocks: function () {
361
+ return this.blocks;
362
+ },
363
+
364
+ getValidatedDate: function (value) {
365
+ var owner = this, result = '';
366
+
367
+ value = value.replace(/[^\d]/g, '');
368
+
369
+ owner.blocks.forEach(function (length, index) {
370
+ if (value.length > 0) {
371
+ var sub = value.slice(0, length),
372
+ sub0 = sub.slice(0, 1),
373
+ rest = value.slice(length);
374
+
375
+ switch (owner.datePattern[index]) {
376
+ case 'd':
377
+ if (sub === '00') {
378
+ sub = '01';
379
+ } else if (parseInt(sub0, 10) > 3) {
380
+ sub = '0' + sub0;
381
+ } else if (parseInt(sub, 10) > 31) {
382
+ sub = '31';
383
+ }
384
+
385
+ break;
386
+
387
+ case 'm':
388
+ if (sub === '00') {
389
+ sub = '01';
390
+ } else if (parseInt(sub0, 10) > 1) {
391
+ sub = '0' + sub0;
392
+ } else if (parseInt(sub, 10) > 12) {
393
+ sub = '12';
394
+ }
395
+
396
+ break;
397
+ }
398
+
399
+ result += sub;
400
+
401
+ // update remaining string
402
+ value = rest;
403
+ }
404
+ });
405
+
406
+ return this.getFixedDateString(result);
407
+ },
408
+
409
+ getFixedDateString: function (value) {
410
+ var owner = this, datePattern = owner.datePattern, date = [],
411
+ dayIndex = 0, monthIndex = 0, yearIndex = 0,
412
+ dayStartIndex = 0, monthStartIndex = 0, yearStartIndex = 0,
413
+ day, month, year, fullYearDone = false;
414
+
415
+ // mm-dd || dd-mm
416
+ if (value.length === 4 && datePattern[0].toLowerCase() !== 'y' && datePattern[1].toLowerCase() !== 'y') {
417
+ dayStartIndex = datePattern[0] === 'd' ? 0 : 2;
418
+ monthStartIndex = 2 - dayStartIndex;
419
+ day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10);
420
+ month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);
421
+
422
+ date = this.getFixedDate(day, month, 0);
423
+ }
424
+
425
+ // yyyy-mm-dd || yyyy-dd-mm || mm-dd-yyyy || dd-mm-yyyy || dd-yyyy-mm || mm-yyyy-dd
426
+ if (value.length === 8) {
427
+ datePattern.forEach(function (type, index) {
428
+ switch (type) {
429
+ case 'd':
430
+ dayIndex = index;
431
+ break;
432
+ case 'm':
433
+ monthIndex = index;
434
+ break;
435
+ default:
436
+ yearIndex = index;
437
+ break;
438
+ }
439
+ });
440
+
441
+ yearStartIndex = yearIndex * 2;
442
+ dayStartIndex = (dayIndex <= yearIndex) ? dayIndex * 2 : (dayIndex * 2 + 2);
443
+ monthStartIndex = (monthIndex <= yearIndex) ? monthIndex * 2 : (monthIndex * 2 + 2);
444
+
445
+ day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10);
446
+ month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);
447
+ year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10);
448
+
449
+ fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4;
450
+
451
+ date = this.getFixedDate(day, month, year);
452
+ }
453
+
454
+ // mm-yy || yy-mm
455
+ if (value.length === 4 && (datePattern[0] === 'y' || datePattern[1] === 'y')) {
456
+ monthStartIndex = datePattern[0] === 'm' ? 0 : 2;
457
+ yearStartIndex = 2 - monthStartIndex;
458
+ month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);
459
+ year = parseInt(value.slice(yearStartIndex, yearStartIndex + 2), 10);
460
+
461
+ fullYearDone = value.slice(yearStartIndex, yearStartIndex + 2).length === 2;
462
+
463
+ date = [0, month, year];
464
+ }
465
+
466
+ // mm-yyyy || yyyy-mm
467
+ if (value.length === 6 && (datePattern[0] === 'Y' || datePattern[1] === 'Y')) {
468
+ monthStartIndex = datePattern[0] === 'm' ? 0 : 4;
469
+ yearStartIndex = 2 - 0.5 * monthStartIndex;
470
+ month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);
471
+ year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10);
472
+
473
+ fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4;
474
+
475
+ date = [0, month, year];
476
+ }
477
+
478
+ date = owner.getRangeFixedDate(date);
479
+ owner.date = date;
480
+
481
+ var result = date.length === 0 ? value : datePattern.reduce(function (previous, current) {
482
+ switch (current) {
483
+ case 'd':
484
+ return previous + (date[0] === 0 ? '' : owner.addLeadingZero(date[0]));
485
+ case 'm':
486
+ return previous + (date[1] === 0 ? '' : owner.addLeadingZero(date[1]));
487
+ case 'y':
488
+ return previous + (fullYearDone ? owner.addLeadingZeroForYear(date[2], false) : '');
489
+ case 'Y':
490
+ return previous + (fullYearDone ? owner.addLeadingZeroForYear(date[2], true) : '');
491
+ }
492
+ }, '');
493
+
494
+ return result;
495
+ },
496
+
497
+ getRangeFixedDate: function (date) {
498
+ var owner = this,
499
+ datePattern = owner.datePattern,
500
+ dateMin = owner.dateMin || [],
501
+ dateMax = owner.dateMax || [];
502
+
503
+ if (!date.length || (dateMin.length < 3 && dateMax.length < 3)) return date;
504
+
505
+ if (
506
+ datePattern.find(function(x) {
507
+ return x.toLowerCase() === 'y';
508
+ }) &&
509
+ date[2] === 0
510
+ ) return date;
511
+
512
+ if (dateMax.length && (dateMax[2] < date[2] || (
513
+ dateMax[2] === date[2] && (dateMax[1] < date[1] || (
514
+ dateMax[1] === date[1] && dateMax[0] < date[0]
515
+ ))
516
+ ))) return dateMax;
517
+
518
+ if (dateMin.length && (dateMin[2] > date[2] || (
519
+ dateMin[2] === date[2] && (dateMin[1] > date[1] || (
520
+ dateMin[1] === date[1] && dateMin[0] > date[0]
521
+ ))
522
+ ))) return dateMin;
523
+
524
+ return date;
525
+ },
526
+
527
+ getFixedDate: function (day, month, year) {
528
+ day = Math.min(day, 31);
529
+ month = Math.min(month, 12);
530
+ year = parseInt((year || 0), 10);
531
+
532
+ if ((month < 7 && month % 2 === 0) || (month > 8 && month % 2 === 1)) {
533
+ day = Math.min(day, month === 2 ? (this.isLeapYear(year) ? 29 : 28) : 30);
534
+ }
535
+
536
+ return [day, month, year];
537
+ },
538
+
539
+ isLeapYear: function (year) {
540
+ return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0);
541
+ },
542
+
543
+ addLeadingZero: function (number) {
544
+ return (number < 10 ? '0' : '') + number;
545
+ },
546
+
547
+ addLeadingZeroForYear: function (number, fullYearMode) {
548
+ if (fullYearMode) {
549
+ return (number < 10 ? '000' : (number < 100 ? '00' : (number < 1000 ? '0' : ''))) + number;
550
+ }
551
+
552
+ return (number < 10 ? '0' : '') + number;
553
+ }
554
+ };
555
+
556
+ var DateFormatter_1 = DateFormatter;
557
+
558
+ var TimeFormatter = function (timePattern, timeFormat) {
559
+ var owner = this;
560
+
561
+ owner.time = [];
562
+ owner.blocks = [];
563
+ owner.timePattern = timePattern;
564
+ owner.timeFormat = timeFormat;
565
+ owner.initBlocks();
566
+ };
567
+
568
+ TimeFormatter.prototype = {
569
+ initBlocks: function () {
570
+ var owner = this;
571
+ owner.timePattern.forEach(function () {
572
+ owner.blocks.push(2);
573
+ });
574
+ },
575
+
576
+ getISOFormatTime: function () {
577
+ var owner = this,
578
+ time = owner.time;
579
+
580
+ return time[2] ? (
581
+ owner.addLeadingZero(time[0]) + ':' + owner.addLeadingZero(time[1]) + ':' + owner.addLeadingZero(time[2])
582
+ ) : '';
583
+ },
584
+
585
+ getBlocks: function () {
586
+ return this.blocks;
587
+ },
588
+
589
+ getTimeFormatOptions: function () {
590
+ var owner = this;
591
+ if (String(owner.timeFormat) === '12') {
592
+ return {
593
+ maxHourFirstDigit: 1,
594
+ maxHours: 12,
595
+ maxMinutesFirstDigit: 5,
596
+ maxMinutes: 60
597
+ };
598
+ }
599
+
600
+ return {
601
+ maxHourFirstDigit: 2,
602
+ maxHours: 23,
603
+ maxMinutesFirstDigit: 5,
604
+ maxMinutes: 60
605
+ };
606
+ },
607
+
608
+ getValidatedTime: function (value) {
609
+ var owner = this, result = '';
610
+
611
+ value = value.replace(/[^\d]/g, '');
612
+
613
+ var timeFormatOptions = owner.getTimeFormatOptions();
614
+
615
+ owner.blocks.forEach(function (length, index) {
616
+ if (value.length > 0) {
617
+ var sub = value.slice(0, length),
618
+ sub0 = sub.slice(0, 1),
619
+ rest = value.slice(length);
620
+
621
+ switch (owner.timePattern[index]) {
622
+
623
+ case 'h':
624
+ if (parseInt(sub0, 10) > timeFormatOptions.maxHourFirstDigit) {
625
+ sub = '0' + sub0;
626
+ } else if (parseInt(sub, 10) > timeFormatOptions.maxHours) {
627
+ sub = timeFormatOptions.maxHours + '';
628
+ }
629
+
630
+ break;
631
+
632
+ case 'm':
633
+ case 's':
634
+ if (parseInt(sub0, 10) > timeFormatOptions.maxMinutesFirstDigit) {
635
+ sub = '0' + sub0;
636
+ } else if (parseInt(sub, 10) > timeFormatOptions.maxMinutes) {
637
+ sub = timeFormatOptions.maxMinutes + '';
638
+ }
639
+ break;
640
+ }
641
+
642
+ result += sub;
643
+
644
+ // update remaining string
645
+ value = rest;
646
+ }
647
+ });
648
+
649
+ return this.getFixedTimeString(result);
650
+ },
651
+
652
+ getFixedTimeString: function (value) {
653
+ var owner = this, timePattern = owner.timePattern, time = [],
654
+ secondIndex = 0, minuteIndex = 0, hourIndex = 0,
655
+ secondStartIndex = 0, minuteStartIndex = 0, hourStartIndex = 0,
656
+ second, minute, hour;
657
+
658
+ if (value.length === 6) {
659
+ timePattern.forEach(function (type, index) {
660
+ switch (type) {
661
+ case 's':
662
+ secondIndex = index * 2;
663
+ break;
664
+ case 'm':
665
+ minuteIndex = index * 2;
666
+ break;
667
+ case 'h':
668
+ hourIndex = index * 2;
669
+ break;
670
+ }
671
+ });
672
+
673
+ hourStartIndex = hourIndex;
674
+ minuteStartIndex = minuteIndex;
675
+ secondStartIndex = secondIndex;
676
+
677
+ second = parseInt(value.slice(secondStartIndex, secondStartIndex + 2), 10);
678
+ minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10);
679
+ hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10);
680
+
681
+ time = this.getFixedTime(hour, minute, second);
682
+ }
683
+
684
+ if (value.length === 4 && owner.timePattern.indexOf('s') < 0) {
685
+ timePattern.forEach(function (type, index) {
686
+ switch (type) {
687
+ case 'm':
688
+ minuteIndex = index * 2;
689
+ break;
690
+ case 'h':
691
+ hourIndex = index * 2;
692
+ break;
693
+ }
694
+ });
695
+
696
+ hourStartIndex = hourIndex;
697
+ minuteStartIndex = minuteIndex;
698
+
699
+ second = 0;
700
+ minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10);
701
+ hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10);
702
+
703
+ time = this.getFixedTime(hour, minute, second);
704
+ }
705
+
706
+ owner.time = time;
707
+
708
+ return time.length === 0 ? value : timePattern.reduce(function (previous, current) {
709
+ switch (current) {
710
+ case 's':
711
+ return previous + owner.addLeadingZero(time[2]);
712
+ case 'm':
713
+ return previous + owner.addLeadingZero(time[1]);
714
+ case 'h':
715
+ return previous + owner.addLeadingZero(time[0]);
716
+ }
717
+ }, '');
718
+ },
719
+
720
+ getFixedTime: function (hour, minute, second) {
721
+ second = Math.min(parseInt(second || 0, 10), 60);
722
+ minute = Math.min(minute, 60);
723
+ hour = Math.min(hour, 60);
724
+
725
+ return [hour, minute, second];
726
+ },
727
+
728
+ addLeadingZero: function (number) {
729
+ return (number < 10 ? '0' : '') + number;
730
+ }
731
+ };
732
+
733
+ var TimeFormatter_1 = TimeFormatter;
734
+
735
+ var PhoneFormatter = function (formatter, delimiter) {
736
+ var owner = this;
737
+
738
+ owner.delimiter = (delimiter || delimiter === '') ? delimiter : ' ';
739
+ owner.delimiterRE = delimiter ? new RegExp('\\' + delimiter, 'g') : '';
740
+
741
+ owner.formatter = formatter;
742
+ };
743
+
744
+ PhoneFormatter.prototype = {
745
+ setFormatter: function (formatter) {
746
+ this.formatter = formatter;
747
+ },
748
+
749
+ format: function (phoneNumber) {
750
+ var owner = this;
751
+
752
+ owner.formatter.clear();
753
+
754
+ // only keep number and +
755
+ phoneNumber = phoneNumber.replace(/[^\d+]/g, '');
756
+
757
+ // strip non-leading +
758
+ phoneNumber = phoneNumber.replace(/^\+/, 'B').replace(/\+/g, '').replace('B', '+');
759
+
760
+ // strip delimiter
761
+ phoneNumber = phoneNumber.replace(owner.delimiterRE, '');
762
+
763
+ var result = '', current, validated = false;
764
+
765
+ for (var i = 0, iMax = phoneNumber.length; i < iMax; i++) {
766
+ current = owner.formatter.inputDigit(phoneNumber.charAt(i));
767
+
768
+ // has ()- or space inside
769
+ if (/[\s()-]/g.test(current)) {
770
+ result = current;
771
+
772
+ validated = true;
773
+ } else {
774
+ if (!validated) {
775
+ result = current;
776
+ }
777
+ // else: over length input
778
+ // it turns to invalid number again
779
+ }
780
+ }
781
+
782
+ // strip ()
783
+ // e.g. US: 7161234567 returns (716) 123-4567
784
+ result = result.replace(/[()]/g, '');
785
+ // replace library delimiter with user customized delimiter
786
+ result = result.replace(/[\s-]/g, owner.delimiter);
787
+
788
+ return result;
789
+ }
790
+ };
791
+
792
+ var PhoneFormatter_1 = PhoneFormatter;
793
+
794
+ var CreditCardDetector = {
795
+ blocks: {
796
+ uatp: [4, 5, 6],
797
+ amex: [4, 6, 5],
798
+ diners: [4, 6, 4],
799
+ discover: [4, 4, 4, 4],
800
+ mastercard: [4, 4, 4, 4],
801
+ dankort: [4, 4, 4, 4],
802
+ instapayment: [4, 4, 4, 4],
803
+ jcb15: [4, 6, 5],
804
+ jcb: [4, 4, 4, 4],
805
+ maestro: [4, 4, 4, 4],
806
+ visa: [4, 4, 4, 4],
807
+ mir: [4, 4, 4, 4],
808
+ unionPay: [4, 4, 4, 4],
809
+ general: [4, 4, 4, 4]
810
+ },
811
+
812
+ re: {
813
+ // starts with 1; 15 digits, not starts with 1800 (jcb card)
814
+ uatp: /^(?!1800)1\d{0,14}/,
815
+
816
+ // starts with 34/37; 15 digits
817
+ amex: /^3[47]\d{0,13}/,
818
+
819
+ // starts with 6011/65/644-649; 16 digits
820
+ discover: /^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,
821
+
822
+ // starts with 300-305/309 or 36/38/39; 14 digits
823
+ diners: /^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,
824
+
825
+ // starts with 51-55/2221–2720; 16 digits
826
+ mastercard: /^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,
827
+
828
+ // starts with 5019/4175/4571; 16 digits
829
+ dankort: /^(5019|4175|4571)\d{0,12}/,
830
+
831
+ // starts with 637-639; 16 digits
832
+ instapayment: /^63[7-9]\d{0,13}/,
833
+
834
+ // starts with 2131/1800; 15 digits
835
+ jcb15: /^(?:2131|1800)\d{0,11}/,
836
+
837
+ // starts with 2131/1800/35; 16 digits
838
+ jcb: /^(?:35\d{0,2})\d{0,12}/,
839
+
840
+ // starts with 50/56-58/6304/67; 16 digits
841
+ maestro: /^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,
842
+
843
+ // starts with 22; 16 digits
844
+ mir: /^220[0-4]\d{0,12}/,
845
+
846
+ // starts with 4; 16 digits
847
+ visa: /^4\d{0,15}/,
848
+
849
+ // starts with 62/81; 16 digits
850
+ unionPay: /^(62|81)\d{0,14}/
851
+ },
852
+
853
+ getStrictBlocks: function (block) {
854
+ var total = block.reduce(function (prev, current) {
855
+ return prev + current;
856
+ }, 0);
857
+
858
+ return block.concat(19 - total);
859
+ },
860
+
861
+ getInfo: function (value, strictMode) {
862
+ var blocks = CreditCardDetector.blocks,
863
+ re = CreditCardDetector.re;
864
+
865
+ // Some credit card can have up to 19 digits number.
866
+ // Set strictMode to true will remove the 16 max-length restrain,
867
+ // however, I never found any website validate card number like
868
+ // this, hence probably you don't want to enable this option.
869
+ strictMode = !!strictMode;
870
+
871
+ for (var key in re) {
872
+ if (re[key].test(value)) {
873
+ var matchedBlocks = blocks[key];
874
+ return {
875
+ type: key,
876
+ blocks: strictMode ? this.getStrictBlocks(matchedBlocks) : matchedBlocks
877
+ };
878
+ }
879
+ }
880
+
881
+ return {
882
+ type: 'unknown',
883
+ blocks: strictMode ? this.getStrictBlocks(blocks.general) : blocks.general
884
+ };
885
+ }
886
+ };
887
+
888
+ var CreditCardDetector_1 = CreditCardDetector;
889
+
890
+ var Util = {
891
+ noop: function () {
892
+ },
893
+
894
+ strip: function (value, re) {
895
+ return value.replace(re, '');
896
+ },
897
+
898
+ getPostDelimiter: function (value, delimiter, delimiters) {
899
+ // single delimiter
900
+ if (delimiters.length === 0) {
901
+ return value.slice(-delimiter.length) === delimiter ? delimiter : '';
902
+ }
903
+
904
+ // multiple delimiters
905
+ var matchedDelimiter = '';
906
+ delimiters.forEach(function (current) {
907
+ if (value.slice(-current.length) === current) {
908
+ matchedDelimiter = current;
909
+ }
910
+ });
911
+
912
+ return matchedDelimiter;
913
+ },
914
+
915
+ getDelimiterREByDelimiter: function (delimiter) {
916
+ return new RegExp(delimiter.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'), 'g');
917
+ },
918
+
919
+ getNextCursorPosition: function (prevPos, oldValue, newValue, delimiter, delimiters) {
920
+ // If cursor was at the end of value, just place it back.
921
+ // Because new value could contain additional chars.
922
+ if (oldValue.length === prevPos) {
923
+ return newValue.length;
924
+ }
925
+
926
+ return prevPos + this.getPositionOffset(prevPos, oldValue, newValue, delimiter ,delimiters);
927
+ },
928
+
929
+ getPositionOffset: function (prevPos, oldValue, newValue, delimiter, delimiters) {
930
+ var oldRawValue, newRawValue, lengthOffset;
931
+
932
+ oldRawValue = this.stripDelimiters(oldValue.slice(0, prevPos), delimiter, delimiters);
933
+ newRawValue = this.stripDelimiters(newValue.slice(0, prevPos), delimiter, delimiters);
934
+ lengthOffset = oldRawValue.length - newRawValue.length;
935
+
936
+ return (lengthOffset !== 0) ? (lengthOffset / Math.abs(lengthOffset)) : 0;
937
+ },
938
+
939
+ stripDelimiters: function (value, delimiter, delimiters) {
940
+ var owner = this;
941
+
942
+ // single delimiter
943
+ if (delimiters.length === 0) {
944
+ var delimiterRE = delimiter ? owner.getDelimiterREByDelimiter(delimiter) : '';
945
+
946
+ return value.replace(delimiterRE, '');
947
+ }
948
+
949
+ // multiple delimiters
950
+ delimiters.forEach(function (current) {
951
+ current.split('').forEach(function (letter) {
952
+ value = value.replace(owner.getDelimiterREByDelimiter(letter), '');
953
+ });
954
+ });
955
+
956
+ return value;
957
+ },
958
+
959
+ headStr: function (str, length) {
960
+ return str.slice(0, length);
961
+ },
962
+
963
+ getMaxLength: function (blocks) {
964
+ return blocks.reduce(function (previous, current) {
965
+ return previous + current;
966
+ }, 0);
967
+ },
968
+
969
+ // strip prefix
970
+ // Before type | After type | Return value
971
+ // PEFIX-... | PEFIX-... | ''
972
+ // PREFIX-123 | PEFIX-123 | 123
973
+ // PREFIX-123 | PREFIX-23 | 23
974
+ // PREFIX-123 | PREFIX-1234 | 1234
975
+ getPrefixStrippedValue: function (value, prefix, prefixLength, prevResult, delimiter, delimiters, noImmediatePrefix, tailPrefix, signBeforePrefix) {
976
+ // No prefix
977
+ if (prefixLength === 0) {
978
+ return value;
979
+ }
980
+
981
+ // Value is prefix
982
+ if (value === prefix && value !== '') {
983
+ return '';
984
+ }
985
+
986
+ if (signBeforePrefix && (value.slice(0, 1) == '-')) {
987
+ var prev = (prevResult.slice(0, 1) == '-') ? prevResult.slice(1) : prevResult;
988
+ return '-' + this.getPrefixStrippedValue(value.slice(1), prefix, prefixLength, prev, delimiter, delimiters, noImmediatePrefix, tailPrefix, signBeforePrefix);
989
+ }
990
+
991
+ // Pre result prefix string does not match pre-defined prefix
992
+ if (prevResult.slice(0, prefixLength) !== prefix && !tailPrefix) {
993
+ // Check if the first time user entered something
994
+ if (noImmediatePrefix && !prevResult && value) return value;
995
+ return '';
996
+ } else if (prevResult.slice(-prefixLength) !== prefix && tailPrefix) {
997
+ // Check if the first time user entered something
998
+ if (noImmediatePrefix && !prevResult && value) return value;
999
+ return '';
1000
+ }
1001
+
1002
+ var prevValue = this.stripDelimiters(prevResult, delimiter, delimiters);
1003
+
1004
+ // New value has issue, someone typed in between prefix letters
1005
+ // Revert to pre value
1006
+ if (value.slice(0, prefixLength) !== prefix && !tailPrefix) {
1007
+ return prevValue.slice(prefixLength);
1008
+ } else if (value.slice(-prefixLength) !== prefix && tailPrefix) {
1009
+ return prevValue.slice(0, -prefixLength - 1);
1010
+ }
1011
+
1012
+ // No issue, strip prefix for new value
1013
+ return tailPrefix ? value.slice(0, -prefixLength) : value.slice(prefixLength);
1014
+ },
1015
+
1016
+ getFirstDiffIndex: function (prev, current) {
1017
+ var index = 0;
1018
+
1019
+ while (prev.charAt(index) === current.charAt(index)) {
1020
+ if (prev.charAt(index++) === '') {
1021
+ return -1;
1022
+ }
1023
+ }
1024
+
1025
+ return index;
1026
+ },
1027
+
1028
+ getFormattedValue: function (value, blocks, blocksLength, delimiter, delimiters, delimiterLazyShow) {
1029
+ var result = '',
1030
+ multipleDelimiters = delimiters.length > 0,
1031
+ currentDelimiter = '';
1032
+
1033
+ // no options, normal input
1034
+ if (blocksLength === 0) {
1035
+ return value;
1036
+ }
1037
+
1038
+ blocks.forEach(function (length, index) {
1039
+ if (value.length > 0) {
1040
+ var sub = value.slice(0, length),
1041
+ rest = value.slice(length);
1042
+
1043
+ if (multipleDelimiters) {
1044
+ currentDelimiter = delimiters[delimiterLazyShow ? (index - 1) : index] || currentDelimiter;
1045
+ } else {
1046
+ currentDelimiter = delimiter;
1047
+ }
1048
+
1049
+ if (delimiterLazyShow) {
1050
+ if (index > 0) {
1051
+ result += currentDelimiter;
1052
+ }
1053
+
1054
+ result += sub;
1055
+ } else {
1056
+ result += sub;
1057
+
1058
+ if (sub.length === length && index < blocksLength - 1) {
1059
+ result += currentDelimiter;
1060
+ }
1061
+ }
1062
+
1063
+ // update remaining string
1064
+ value = rest;
1065
+ }
1066
+ });
1067
+
1068
+ return result;
1069
+ },
1070
+
1071
+ // move cursor to the end
1072
+ // the first time user focuses on an input with prefix
1073
+ fixPrefixCursor: function (el, prefix, delimiter, delimiters) {
1074
+ if (!el) {
1075
+ return;
1076
+ }
1077
+
1078
+ var val = el.value,
1079
+ appendix = delimiter || (delimiters[0] || ' ');
1080
+
1081
+ if (!el.setSelectionRange || !prefix || (prefix.length + appendix.length) <= val.length) {
1082
+ return;
1083
+ }
1084
+
1085
+ var len = val.length * 2;
1086
+
1087
+ // set timeout to avoid blink
1088
+ setTimeout(function () {
1089
+ el.setSelectionRange(len, len);
1090
+ }, 1);
1091
+ },
1092
+
1093
+ // Check if input field is fully selected
1094
+ checkFullSelection: function(value) {
1095
+ try {
1096
+ var selection = window.getSelection() || document.getSelection() || {};
1097
+ return selection.toString().length === value.length;
1098
+ } catch (ex) {
1099
+ // Ignore
1100
+ }
1101
+
1102
+ return false;
1103
+ },
1104
+
1105
+ setSelection: function (element, position, doc) {
1106
+ if (element !== this.getActiveElement(doc)) {
1107
+ return;
1108
+ }
1109
+
1110
+ // cursor is already in the end
1111
+ if (element && element.value.length <= position) {
1112
+ return;
1113
+ }
1114
+
1115
+ if (element.createTextRange) {
1116
+ var range = element.createTextRange();
1117
+
1118
+ range.move('character', position);
1119
+ range.select();
1120
+ } else {
1121
+ try {
1122
+ element.setSelectionRange(position, position);
1123
+ } catch (e) {
1124
+ // eslint-disable-next-line
1125
+ console.warn('The input element type does not support selection');
1126
+ }
1127
+ }
1128
+ },
1129
+
1130
+ getActiveElement: function(parent) {
1131
+ var activeElement = parent.activeElement;
1132
+ if (activeElement && activeElement.shadowRoot) {
1133
+ return this.getActiveElement(activeElement.shadowRoot);
1134
+ }
1135
+ return activeElement;
1136
+ },
1137
+
1138
+ isAndroid: function () {
1139
+ return navigator && /android/i.test(navigator.userAgent);
1140
+ },
1141
+
1142
+ // On Android chrome, the keyup and keydown events
1143
+ // always return key code 229 as a composition that
1144
+ // buffers the user’s keystrokes
1145
+ // see https://github.com/nosir/cleave.js/issues/147
1146
+ isAndroidBackspaceKeydown: function (lastInputValue, currentInputValue) {
1147
+ if (!this.isAndroid() || !lastInputValue || !currentInputValue) {
1148
+ return false;
1149
+ }
1150
+
1151
+ return currentInputValue === lastInputValue.slice(0, -1);
1152
+ }
1153
+ };
1154
+
1155
+ var Util_1 = Util;
1156
+
1157
+ /**
1158
+ * Props Assignment
1159
+ *
1160
+ * Separate this, so react module can share the usage
1161
+ */
1162
+ var DefaultProperties = {
1163
+ // Maybe change to object-assign
1164
+ // for now just keep it as simple
1165
+ assign: function (target, opts) {
1166
+ target = target || {};
1167
+ opts = opts || {};
1168
+
1169
+ // credit card
1170
+ target.creditCard = !!opts.creditCard;
1171
+ target.creditCardStrictMode = !!opts.creditCardStrictMode;
1172
+ target.creditCardType = '';
1173
+ target.onCreditCardTypeChanged = opts.onCreditCardTypeChanged || (function () {});
1174
+
1175
+ // phone
1176
+ target.phone = !!opts.phone;
1177
+ target.phoneRegionCode = opts.phoneRegionCode || 'AU';
1178
+ target.phoneFormatter = {};
1179
+
1180
+ // time
1181
+ target.time = !!opts.time;
1182
+ target.timePattern = opts.timePattern || ['h', 'm', 's'];
1183
+ target.timeFormat = opts.timeFormat || '24';
1184
+ target.timeFormatter = {};
1185
+
1186
+ // date
1187
+ target.date = !!opts.date;
1188
+ target.datePattern = opts.datePattern || ['d', 'm', 'Y'];
1189
+ target.dateMin = opts.dateMin || '';
1190
+ target.dateMax = opts.dateMax || '';
1191
+ target.dateFormatter = {};
1192
+
1193
+ // numeral
1194
+ target.numeral = !!opts.numeral;
1195
+ target.numeralIntegerScale = opts.numeralIntegerScale > 0 ? opts.numeralIntegerScale : 0;
1196
+ target.numeralDecimalScale = opts.numeralDecimalScale >= 0 ? opts.numeralDecimalScale : 2;
1197
+ target.numeralDecimalMark = opts.numeralDecimalMark || '.';
1198
+ target.numeralThousandsGroupStyle = opts.numeralThousandsGroupStyle || 'thousand';
1199
+ target.numeralPositiveOnly = !!opts.numeralPositiveOnly;
1200
+ target.stripLeadingZeroes = opts.stripLeadingZeroes !== false;
1201
+ target.signBeforePrefix = !!opts.signBeforePrefix;
1202
+ target.tailPrefix = !!opts.tailPrefix;
1203
+
1204
+ // others
1205
+ target.swapHiddenInput = !!opts.swapHiddenInput;
1206
+
1207
+ target.numericOnly = target.creditCard || target.date || !!opts.numericOnly;
1208
+
1209
+ target.uppercase = !!opts.uppercase;
1210
+ target.lowercase = !!opts.lowercase;
1211
+
1212
+ target.prefix = (target.creditCard || target.date) ? '' : (opts.prefix || '');
1213
+ target.noImmediatePrefix = !!opts.noImmediatePrefix;
1214
+ target.prefixLength = target.prefix.length;
1215
+ target.rawValueTrimPrefix = !!opts.rawValueTrimPrefix;
1216
+ target.copyDelimiter = !!opts.copyDelimiter;
1217
+
1218
+ target.initValue = (opts.initValue !== undefined && opts.initValue !== null) ? opts.initValue.toString() : '';
1219
+
1220
+ target.delimiter =
1221
+ (opts.delimiter || opts.delimiter === '') ? opts.delimiter :
1222
+ (opts.date ? '/' :
1223
+ (opts.time ? ':' :
1224
+ (opts.numeral ? ',' :
1225
+ (opts.phone ? ' ' :
1226
+ ' '))));
1227
+ target.delimiterLength = target.delimiter.length;
1228
+ target.delimiterLazyShow = !!opts.delimiterLazyShow;
1229
+ target.delimiters = opts.delimiters || [];
1230
+
1231
+ target.blocks = opts.blocks || [];
1232
+ target.blocksLength = target.blocks.length;
1233
+
1234
+ target.root = (typeof commonjsGlobal === 'object' && commonjsGlobal) ? commonjsGlobal : window;
1235
+ target.document = opts.document || target.root.document;
1236
+
1237
+ target.maxLength = 0;
1238
+
1239
+ target.backspace = false;
1240
+ target.result = '';
1241
+
1242
+ target.onValueChanged = opts.onValueChanged || (function () {});
1243
+
1244
+ return target;
1245
+ }
1246
+ };
1247
+
1248
+ var DefaultProperties_1 = DefaultProperties;
1249
+
1250
+ /**
1251
+ * Construct a new Cleave instance by passing the configuration object
1252
+ *
1253
+ * @param {String | HTMLElement} element
1254
+ * @param {Object} opts
1255
+ */
1256
+ var Cleave = function (element, opts) {
1257
+ var owner = this;
1258
+ var hasMultipleElements = false;
1259
+
1260
+ if (typeof element === 'string') {
1261
+ owner.element = document.querySelector(element);
1262
+ hasMultipleElements = document.querySelectorAll(element).length > 1;
1263
+ } else {
1264
+ if (typeof element.length !== 'undefined' && element.length > 0) {
1265
+ owner.element = element[0];
1266
+ hasMultipleElements = element.length > 1;
1267
+ } else {
1268
+ owner.element = element;
1269
+ }
1270
+ }
1271
+
1272
+ if (!owner.element) {
1273
+ throw new Error('[cleave.js] Please check the element');
1274
+ }
1275
+
1276
+ if (hasMultipleElements) {
1277
+ try {
1278
+ // eslint-disable-next-line
1279
+ console.warn('[cleave.js] Multiple input fields matched, cleave.js will only take the first one.');
1280
+ } catch (e) {
1281
+ // Old IE
1282
+ }
1283
+ }
1284
+
1285
+ opts.initValue = owner.element.value;
1286
+
1287
+ owner.properties = Cleave.DefaultProperties.assign({}, opts);
1288
+
1289
+ owner.init();
1290
+ };
1291
+
1292
+ Cleave.prototype = {
1293
+ init: function () {
1294
+ var owner = this, pps = owner.properties;
1295
+
1296
+ // no need to use this lib
1297
+ if (!pps.numeral && !pps.phone && !pps.creditCard && !pps.time && !pps.date && (pps.blocksLength === 0 && !pps.prefix)) {
1298
+ owner.onInput(pps.initValue);
1299
+
1300
+ return;
1301
+ }
1302
+
1303
+ pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);
1304
+
1305
+ owner.isAndroid = Cleave.Util.isAndroid();
1306
+ owner.lastInputValue = '';
1307
+ owner.isBackward = '';
1308
+
1309
+ owner.onChangeListener = owner.onChange.bind(owner);
1310
+ owner.onKeyDownListener = owner.onKeyDown.bind(owner);
1311
+ owner.onFocusListener = owner.onFocus.bind(owner);
1312
+ owner.onCutListener = owner.onCut.bind(owner);
1313
+ owner.onCopyListener = owner.onCopy.bind(owner);
1314
+
1315
+ owner.initSwapHiddenInput();
1316
+
1317
+ owner.element.addEventListener('input', owner.onChangeListener);
1318
+ owner.element.addEventListener('keydown', owner.onKeyDownListener);
1319
+ owner.element.addEventListener('focus', owner.onFocusListener);
1320
+ owner.element.addEventListener('cut', owner.onCutListener);
1321
+ owner.element.addEventListener('copy', owner.onCopyListener);
1322
+
1323
+
1324
+ owner.initPhoneFormatter();
1325
+ owner.initDateFormatter();
1326
+ owner.initTimeFormatter();
1327
+ owner.initNumeralFormatter();
1328
+
1329
+ // avoid touch input field if value is null
1330
+ // otherwise Firefox will add red box-shadow for <input required />
1331
+ if (pps.initValue || (pps.prefix && !pps.noImmediatePrefix)) {
1332
+ owner.onInput(pps.initValue);
1333
+ }
1334
+ },
1335
+
1336
+ initSwapHiddenInput: function () {
1337
+ var owner = this, pps = owner.properties;
1338
+ if (!pps.swapHiddenInput) return;
1339
+
1340
+ var inputFormatter = owner.element.cloneNode(true);
1341
+ owner.element.parentNode.insertBefore(inputFormatter, owner.element);
1342
+
1343
+ owner.elementSwapHidden = owner.element;
1344
+ owner.elementSwapHidden.type = 'hidden';
1345
+
1346
+ owner.element = inputFormatter;
1347
+ owner.element.id = '';
1348
+ },
1349
+
1350
+ initNumeralFormatter: function () {
1351
+ var owner = this, pps = owner.properties;
1352
+
1353
+ if (!pps.numeral) {
1354
+ return;
1355
+ }
1356
+
1357
+ pps.numeralFormatter = new Cleave.NumeralFormatter(
1358
+ pps.numeralDecimalMark,
1359
+ pps.numeralIntegerScale,
1360
+ pps.numeralDecimalScale,
1361
+ pps.numeralThousandsGroupStyle,
1362
+ pps.numeralPositiveOnly,
1363
+ pps.stripLeadingZeroes,
1364
+ pps.prefix,
1365
+ pps.signBeforePrefix,
1366
+ pps.tailPrefix,
1367
+ pps.delimiter
1368
+ );
1369
+ },
1370
+
1371
+ initTimeFormatter: function() {
1372
+ var owner = this, pps = owner.properties;
1373
+
1374
+ if (!pps.time) {
1375
+ return;
1376
+ }
1377
+
1378
+ pps.timeFormatter = new Cleave.TimeFormatter(pps.timePattern, pps.timeFormat);
1379
+ pps.blocks = pps.timeFormatter.getBlocks();
1380
+ pps.blocksLength = pps.blocks.length;
1381
+ pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);
1382
+ },
1383
+
1384
+ initDateFormatter: function () {
1385
+ var owner = this, pps = owner.properties;
1386
+
1387
+ if (!pps.date) {
1388
+ return;
1389
+ }
1390
+
1391
+ pps.dateFormatter = new Cleave.DateFormatter(pps.datePattern, pps.dateMin, pps.dateMax);
1392
+ pps.blocks = pps.dateFormatter.getBlocks();
1393
+ pps.blocksLength = pps.blocks.length;
1394
+ pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);
1395
+ },
1396
+
1397
+ initPhoneFormatter: function () {
1398
+ var owner = this, pps = owner.properties;
1399
+
1400
+ if (!pps.phone) {
1401
+ return;
1402
+ }
1403
+
1404
+ // Cleave.AsYouTypeFormatter should be provided by
1405
+ // external google closure lib
1406
+ try {
1407
+ pps.phoneFormatter = new Cleave.PhoneFormatter(
1408
+ new pps.root.Cleave.AsYouTypeFormatter(pps.phoneRegionCode),
1409
+ pps.delimiter
1410
+ );
1411
+ } catch (ex) {
1412
+ throw new Error('[cleave.js] Please include phone-type-formatter.{country}.js lib');
1413
+ }
1414
+ },
1415
+
1416
+ onKeyDown: function (event) {
1417
+ var owner = this,
1418
+ charCode = event.which || event.keyCode;
1419
+
1420
+ owner.lastInputValue = owner.element.value;
1421
+ owner.isBackward = charCode === 8;
1422
+ },
1423
+
1424
+ onChange: function (event) {
1425
+ var owner = this, pps = owner.properties,
1426
+ Util = Cleave.Util;
1427
+
1428
+ owner.isBackward = owner.isBackward || event.inputType === 'deleteContentBackward';
1429
+
1430
+ var postDelimiter = Util.getPostDelimiter(owner.lastInputValue, pps.delimiter, pps.delimiters);
1431
+
1432
+ if (owner.isBackward && postDelimiter) {
1433
+ pps.postDelimiterBackspace = postDelimiter;
1434
+ } else {
1435
+ pps.postDelimiterBackspace = false;
1436
+ }
1437
+
1438
+ this.onInput(this.element.value);
1439
+ },
1440
+
1441
+ onFocus: function () {
1442
+ var owner = this,
1443
+ pps = owner.properties;
1444
+ owner.lastInputValue = owner.element.value;
1445
+
1446
+ if (pps.prefix && pps.noImmediatePrefix && !owner.element.value) {
1447
+ this.onInput(pps.prefix);
1448
+ }
1449
+
1450
+ Cleave.Util.fixPrefixCursor(owner.element, pps.prefix, pps.delimiter, pps.delimiters);
1451
+ },
1452
+
1453
+ onCut: function (e) {
1454
+ if (!Cleave.Util.checkFullSelection(this.element.value)) return;
1455
+ this.copyClipboardData(e);
1456
+ this.onInput('');
1457
+ },
1458
+
1459
+ onCopy: function (e) {
1460
+ if (!Cleave.Util.checkFullSelection(this.element.value)) return;
1461
+ this.copyClipboardData(e);
1462
+ },
1463
+
1464
+ copyClipboardData: function (e) {
1465
+ var owner = this,
1466
+ pps = owner.properties,
1467
+ Util = Cleave.Util,
1468
+ inputValue = owner.element.value,
1469
+ textToCopy = '';
1470
+
1471
+ if (!pps.copyDelimiter) {
1472
+ textToCopy = Util.stripDelimiters(inputValue, pps.delimiter, pps.delimiters);
1473
+ } else {
1474
+ textToCopy = inputValue;
1475
+ }
1476
+
1477
+ try {
1478
+ if (e.clipboardData) {
1479
+ e.clipboardData.setData('Text', textToCopy);
1480
+ } else {
1481
+ window.clipboardData.setData('Text', textToCopy);
1482
+ }
1483
+
1484
+ e.preventDefault();
1485
+ } catch (ex) {
1486
+ // empty
1487
+ }
1488
+ },
1489
+
1490
+ onInput: function (value) {
1491
+ var owner = this, pps = owner.properties,
1492
+ Util = Cleave.Util;
1493
+
1494
+ // case 1: delete one more character "4"
1495
+ // 1234*| -> hit backspace -> 123|
1496
+ // case 2: last character is not delimiter which is:
1497
+ // 12|34* -> hit backspace -> 1|34*
1498
+ // note: no need to apply this for numeral mode
1499
+ var postDelimiterAfter = Util.getPostDelimiter(value, pps.delimiter, pps.delimiters);
1500
+ if (!pps.numeral && pps.postDelimiterBackspace && !postDelimiterAfter) {
1501
+ value = Util.headStr(value, value.length - pps.postDelimiterBackspace.length);
1502
+ }
1503
+
1504
+ // phone formatter
1505
+ if (pps.phone) {
1506
+ if (pps.prefix && (!pps.noImmediatePrefix || value.length)) {
1507
+ pps.result = pps.prefix + pps.phoneFormatter.format(value).slice(pps.prefix.length);
1508
+ } else {
1509
+ pps.result = pps.phoneFormatter.format(value);
1510
+ }
1511
+ owner.updateValueState();
1512
+
1513
+ return;
1514
+ }
1515
+
1516
+ // numeral formatter
1517
+ if (pps.numeral) {
1518
+ // Do not show prefix when noImmediatePrefix is specified
1519
+ // This mostly because we need to show user the native input placeholder
1520
+ if (pps.prefix && pps.noImmediatePrefix && value.length === 0) {
1521
+ pps.result = '';
1522
+ } else {
1523
+ pps.result = pps.numeralFormatter.format(value);
1524
+ }
1525
+ owner.updateValueState();
1526
+
1527
+ return;
1528
+ }
1529
+
1530
+ // date
1531
+ if (pps.date) {
1532
+ value = pps.dateFormatter.getValidatedDate(value);
1533
+ }
1534
+
1535
+ // time
1536
+ if (pps.time) {
1537
+ value = pps.timeFormatter.getValidatedTime(value);
1538
+ }
1539
+
1540
+ // strip delimiters
1541
+ value = Util.stripDelimiters(value, pps.delimiter, pps.delimiters);
1542
+
1543
+ // strip prefix
1544
+ value = Util.getPrefixStrippedValue(value, pps.prefix, pps.prefixLength, pps.result, pps.delimiter, pps.delimiters, pps.noImmediatePrefix, pps.tailPrefix, pps.signBeforePrefix);
1545
+
1546
+ // strip non-numeric characters
1547
+ value = pps.numericOnly ? Util.strip(value, /[^\d]/g) : value;
1548
+
1549
+ // convert case
1550
+ value = pps.uppercase ? value.toUpperCase() : value;
1551
+ value = pps.lowercase ? value.toLowerCase() : value;
1552
+
1553
+ // prevent from showing prefix when no immediate option enabled with empty input value
1554
+ if (pps.prefix) {
1555
+ if (pps.tailPrefix) {
1556
+ value = value + pps.prefix;
1557
+ } else {
1558
+ value = pps.prefix + value;
1559
+ }
1560
+
1561
+
1562
+ // no blocks specified, no need to do formatting
1563
+ if (pps.blocksLength === 0) {
1564
+ pps.result = value;
1565
+ owner.updateValueState();
1566
+
1567
+ return;
1568
+ }
1569
+ }
1570
+
1571
+ // update credit card props
1572
+ if (pps.creditCard) {
1573
+ owner.updateCreditCardPropsByValue(value);
1574
+ }
1575
+
1576
+ // strip over length characters
1577
+ value = Util.headStr(value, pps.maxLength);
1578
+
1579
+ // apply blocks
1580
+ pps.result = Util.getFormattedValue(
1581
+ value,
1582
+ pps.blocks, pps.blocksLength,
1583
+ pps.delimiter, pps.delimiters, pps.delimiterLazyShow
1584
+ );
1585
+
1586
+ owner.updateValueState();
1587
+ },
1588
+
1589
+ updateCreditCardPropsByValue: function (value) {
1590
+ var owner = this, pps = owner.properties,
1591
+ Util = Cleave.Util,
1592
+ creditCardInfo;
1593
+
1594
+ // At least one of the first 4 characters has changed
1595
+ if (Util.headStr(pps.result, 4) === Util.headStr(value, 4)) {
1596
+ return;
1597
+ }
1598
+
1599
+ creditCardInfo = Cleave.CreditCardDetector.getInfo(value, pps.creditCardStrictMode);
1600
+
1601
+ pps.blocks = creditCardInfo.blocks;
1602
+ pps.blocksLength = pps.blocks.length;
1603
+ pps.maxLength = Util.getMaxLength(pps.blocks);
1604
+
1605
+ // credit card type changed
1606
+ if (pps.creditCardType !== creditCardInfo.type) {
1607
+ pps.creditCardType = creditCardInfo.type;
1608
+
1609
+ pps.onCreditCardTypeChanged.call(owner, pps.creditCardType);
1610
+ }
1611
+ },
1612
+
1613
+ updateValueState: function () {
1614
+ var owner = this,
1615
+ Util = Cleave.Util,
1616
+ pps = owner.properties;
1617
+
1618
+ if (!owner.element) {
1619
+ return;
1620
+ }
1621
+
1622
+ var endPos = owner.element.selectionEnd;
1623
+ var oldValue = owner.element.value;
1624
+ var newValue = pps.result;
1625
+
1626
+ endPos = Util.getNextCursorPosition(endPos, oldValue, newValue, pps.delimiter, pps.delimiters);
1627
+
1628
+ // fix Android browser type="text" input field
1629
+ // cursor not jumping issue
1630
+ if (owner.isAndroid) {
1631
+ window.setTimeout(function () {
1632
+ owner.element.value = newValue;
1633
+ Util.setSelection(owner.element, endPos, pps.document, false);
1634
+ owner.callOnValueChanged();
1635
+ }, 1);
1636
+
1637
+ return;
1638
+ }
1639
+
1640
+ owner.element.value = newValue;
1641
+ if (pps.swapHiddenInput) owner.elementSwapHidden.value = owner.getRawValue();
1642
+
1643
+ Util.setSelection(owner.element, endPos, pps.document, false);
1644
+ owner.callOnValueChanged();
1645
+ },
1646
+
1647
+ callOnValueChanged: function () {
1648
+ var owner = this,
1649
+ pps = owner.properties;
1650
+
1651
+ pps.onValueChanged.call(owner, {
1652
+ target: {
1653
+ name: owner.element.name,
1654
+ value: pps.result,
1655
+ rawValue: owner.getRawValue()
1656
+ }
1657
+ });
1658
+ },
1659
+
1660
+ setPhoneRegionCode: function (phoneRegionCode) {
1661
+ var owner = this, pps = owner.properties;
1662
+
1663
+ pps.phoneRegionCode = phoneRegionCode;
1664
+ owner.initPhoneFormatter();
1665
+ owner.onChange();
1666
+ },
1667
+
1668
+ setRawValue: function (value) {
1669
+ var owner = this, pps = owner.properties;
1670
+
1671
+ value = value !== undefined && value !== null ? value.toString() : '';
1672
+
1673
+ if (pps.numeral) {
1674
+ value = value.replace('.', pps.numeralDecimalMark);
1675
+ }
1676
+
1677
+ pps.postDelimiterBackspace = false;
1678
+
1679
+ owner.element.value = value;
1680
+ owner.onInput(value);
1681
+ },
1682
+
1683
+ getRawValue: function () {
1684
+ var owner = this,
1685
+ pps = owner.properties,
1686
+ Util = Cleave.Util,
1687
+ rawValue = owner.element.value;
1688
+
1689
+ if (pps.rawValueTrimPrefix) {
1690
+ rawValue = Util.getPrefixStrippedValue(rawValue, pps.prefix, pps.prefixLength, pps.result, pps.delimiter, pps.delimiters, pps.noImmediatePrefix, pps.tailPrefix, pps.signBeforePrefix);
1691
+ }
1692
+
1693
+ if (pps.numeral) {
1694
+ rawValue = pps.numeralFormatter.getRawValue(rawValue);
1695
+ } else {
1696
+ rawValue = Util.stripDelimiters(rawValue, pps.delimiter, pps.delimiters);
1697
+ }
1698
+
1699
+ return rawValue;
1700
+ },
1701
+
1702
+ getISOFormatDate: function () {
1703
+ var owner = this,
1704
+ pps = owner.properties;
1705
+
1706
+ return pps.date ? pps.dateFormatter.getISOFormatDate() : '';
1707
+ },
1708
+
1709
+ getISOFormatTime: function () {
1710
+ var owner = this,
1711
+ pps = owner.properties;
1712
+
1713
+ return pps.time ? pps.timeFormatter.getISOFormatTime() : '';
1714
+ },
1715
+
1716
+ getFormattedValue: function () {
1717
+ return this.element.value;
1718
+ },
1719
+
1720
+ destroy: function () {
1721
+ var owner = this;
1722
+
1723
+ owner.element.removeEventListener('input', owner.onChangeListener);
1724
+ owner.element.removeEventListener('keydown', owner.onKeyDownListener);
1725
+ owner.element.removeEventListener('focus', owner.onFocusListener);
1726
+ owner.element.removeEventListener('cut', owner.onCutListener);
1727
+ owner.element.removeEventListener('copy', owner.onCopyListener);
1728
+ },
1729
+
1730
+ toString: function () {
1731
+ return '[Cleave Object]';
1732
+ }
1733
+ };
1734
+
1735
+ Cleave.NumeralFormatter = NumeralFormatter_1;
1736
+ Cleave.DateFormatter = DateFormatter_1;
1737
+ Cleave.TimeFormatter = TimeFormatter_1;
1738
+ Cleave.PhoneFormatter = PhoneFormatter_1;
1739
+ Cleave.CreditCardDetector = CreditCardDetector_1;
1740
+ Cleave.Util = Util_1;
1741
+ Cleave.DefaultProperties = DefaultProperties_1;
1742
+
1743
+ // for angular directive
1744
+ ((typeof commonjsGlobal === 'object' && commonjsGlobal) ? commonjsGlobal : window)['Cleave'] = Cleave;
1745
+
1746
+ // CommonJS
1747
+ var Cleave_1 = Cleave;
1748
+
1749
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1750
+ // See LICENSE in the project root for license information.
1751
+
1752
+ // ---------------------------------------------------------------------
1753
+
1754
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
1755
+
1756
+ class AuroLibraryRuntimeUtils {
1757
+
1758
+ /* eslint-disable jsdoc/require-param */
1759
+
1760
+ /**
1761
+ * This will register a new custom element with the browser.
1762
+ * @param {String} name - The name of the custom element.
1763
+ * @param {Object} componentClass - The class to register as a custom element.
1764
+ * @returns {void}
1765
+ */
1766
+ registerComponent(name, componentClass) {
1767
+ if (!customElements.get(name)) {
1768
+ customElements.define(name, class extends componentClass {});
1769
+ }
1770
+ }
1771
+
1772
+ /**
1773
+ * Finds and returns the closest HTML Element based on a selector.
1774
+ * @returns {void}
1775
+ */
1776
+ closestElement(
1777
+ selector, // selector like in .closest()
1778
+ base = this, // extra functionality to skip a parent
1779
+ __Closest = (el, found = el && el.closest(selector)) =>
1780
+ !el || el === document || el === window
1781
+ ? null // standard .closest() returns null for non-found selectors also
1782
+ : found
1783
+ ? found // found a selector INside this element
1784
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
1785
+ ) {
1786
+ return __Closest(base);
1787
+ }
1788
+ /* eslint-enable jsdoc/require-param */
1789
+
1790
+ /**
1791
+ * 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.
1792
+ * @param {Object} elem - The element to check.
1793
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
1794
+ * @returns {void}
1795
+ */
1796
+ handleComponentTagRename(elem, tagName) {
1797
+ const tag = tagName.toLowerCase();
1798
+ const elemTag = elem.tagName.toLowerCase();
1799
+
1800
+ if (elemTag !== tag) {
1801
+ elem.setAttribute(tag, true);
1802
+ }
1803
+ }
1804
+
1805
+ /**
1806
+ * Validates if an element is a specific Auro component.
1807
+ * @param {Object} elem - The element to validate.
1808
+ * @param {String} tagName - The name of the Auro component to check against.
1809
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
1810
+ */
1811
+ elementMatch(elem, tagName) {
1812
+ const tag = tagName.toLowerCase();
1813
+ const elemTag = elem.tagName.toLowerCase();
1814
+
1815
+ return elemTag === tag || elem.hasAttribute(tag);
1816
+ }
1817
+ }
1818
+
1819
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1820
+ // See LICENSE in the project root for license information.
1821
+
1822
+
1823
+ class AuroFormValidation {
1824
+ constructor() {
1825
+ this.runtimeUtils = new AuroLibraryRuntimeUtils();
1826
+ }
1827
+
1828
+ /**
1829
+ * Determines the validity state of the element based on the common attribute restrictions (pattern).
1830
+ * @private
1831
+ * @param {object} elem - HTML element to validate.
1832
+ * @returns {void}
1833
+ */
1834
+ validateAttributes(elem) {
1835
+ if (elem.pattern) {
1836
+ const pattern = new RegExp(`^${elem.pattern}$`, 'u');
1837
+
1838
+ if (!pattern.test(elem.value)) {
1839
+ elem.validity = 'badInput';
1840
+ elem.setCustomValidity = elem.setCustomValidityBadInput || '';
1841
+ }
1842
+ } else if (elem.value && elem.value.length > 0 && elem.value.length < elem.minLength) {
1843
+ elem.validity = 'tooShort';
1844
+ elem.setCustomValidity = elem.setCustomValidityTooShort || '';
1845
+ } else if (elem.value && elem.value.length > elem.maxLength) {
1846
+ elem.validity = 'tooLong';
1847
+ elem.setCustomValidity = elem.setCustomValidityTooLong || '';
1848
+ }
1849
+ }
1850
+
1851
+ /**
1852
+ * Determines the validity state of the element based on the type attribute.
1853
+ * @private
1854
+ * @param {object} elem - HTML element to validate.
1855
+ * @returns {void}
1856
+ */
1857
+ validateType(elem) {
1858
+ if (elem.hasAttribute('type')) {
1859
+ if (elem.type === 'email') {
1860
+ const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
1861
+
1862
+ if (!elem.value.match(emailRegex)) {
1863
+ elem.validity = 'badInput';
1864
+ elem.setCustomValidity = elem.setCustomValidityForType || '';
1865
+ }
1866
+ } else if (elem.type === 'credit-card') {
1867
+ if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
1868
+ elem.validity = 'tooShort';
1869
+ elem.setCustomValidity = elem.setCustomValidityForType || '';
1870
+ }
1871
+ } else if (elem.type === 'number' || elem.type === 'numeric') { // 'numeric` is a deprecated alias for number'
1872
+ if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
1873
+ elem.validity = 'rangeOverflow';
1874
+ elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
1875
+ }
1876
+
1877
+ if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
1878
+ elem.validity = 'rangeUnderflow';
1879
+ elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
1880
+ }
1881
+
1882
+ } else if (elem.type === 'month-day-year' ||
1883
+ elem.type === 'month-year' ||
1884
+ elem.type === 'month-fullYear' ||
1885
+ elem.type === 'year-month-day'
1886
+ ) {
1887
+ if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
1888
+ elem.validity = 'tooShort';
1889
+ elem.setCustomValidity = elem.setCustomValidityForType || '';
1890
+ } else {
1891
+ const valueDate = new Date(elem.value);
1892
+
1893
+ // validate max
1894
+ if (elem.max !== undefined) {
1895
+ const maxDate = new Date(elem.max);
1896
+
1897
+ if (valueDate > maxDate) {
1898
+ elem.validity = 'rangeOverflow';
1899
+ elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
1900
+ }
1901
+ }
1902
+
1903
+ // validate min
1904
+ if (elem.min) {
1905
+ const minDate = new Date(elem.min);
1906
+
1907
+ if (valueDate < minDate) {
1908
+ elem.validity = 'rangeUnderflow';
1909
+ elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
1910
+ }
1911
+ }
1912
+ }
1913
+ }
1914
+ }
1915
+ }
1916
+
1917
+ /**
1918
+ * Determines the validity state of the element.
1919
+ * @param {object} elem - HTML element to validate.
1920
+ * @param {boolean} force - Boolean that forces validation to run.
1921
+ * @returns {void}
1922
+ */
1923
+ validate(elem, force) {
1924
+ this.getInputElements(elem);
1925
+ this.getAuroInputs(elem);
1926
+
1927
+ // Validate only if noValidate is not true and the input does not have focus
1928
+ const validationShouldRun = force || (!elem.contains(document.activeElement) && elem.value !== undefined) || elem.validateOnInput;
1929
+
1930
+ if (elem.hasAttribute('error')) {
1931
+ elem.validity = 'customError';
1932
+ elem.setCustomValidity = elem.error;
1933
+ } else if (validationShouldRun) {
1934
+ elem.validity = 'valid';
1935
+ elem.setCustomValidity = '';
1936
+
1937
+ /**
1938
+ * Only validate once we interact with the datepicker
1939
+ * elem.value === undefined is the initial state pre-interaction.
1940
+ *
1941
+ * The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
1942
+ */
1943
+
1944
+ let hasValue = elem.value && elem.value.length > 0;
1945
+
1946
+ // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
1947
+ if (this.auroInputElements && this.auroInputElements.length === 2) {
1948
+ if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
1949
+ hasValue = false;
1950
+ }
1951
+ }
1952
+
1953
+ if (!hasValue && elem.required) {
1954
+ elem.validity = 'valueMissing';
1955
+ elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
1956
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
1957
+ this.validateType(elem);
1958
+ this.validateAttributes(elem);
1959
+ }
1960
+ }
1961
+
1962
+ if (this.auroInputElements && this.auroInputElements.length > 0) {
1963
+ elem.validity = this.auroInputElements[0].validity;
1964
+ elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
1965
+
1966
+ if (elem.validity === 'valid') {
1967
+ if (this.auroInputElements.length > 1) {
1968
+ elem.validity = this.auroInputElements[1].validity;
1969
+ elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
1970
+ }
1971
+ }
1972
+ }
1973
+
1974
+ if (validationShouldRun || elem.hasAttribute('error')) {
1975
+ if (elem.validity && elem.validity !== 'valid') {
1976
+ elem.isValid = false;
1977
+
1978
+ // Use the validity message override if it is declared
1979
+ if (elem.ValidityMessageOverride) {
1980
+ elem.setCustomValidity = elem.ValidityMessageOverride;
1981
+ }
1982
+ } else {
1983
+ elem.isValid = true;
1984
+ }
1985
+
1986
+ this.getErrorMessage(elem);
1987
+
1988
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1989
+ bubbles: true,
1990
+ composed: true,
1991
+ detail: {
1992
+ validity: elem.validity,
1993
+ message: elem.errorMessage
1994
+ }
1995
+ }));
1996
+ }
1997
+ }
1998
+
1999
+ /**
2000
+ * Gets all the HTML5 `inputs` in the element shadow DOM.
2001
+ * @private
2002
+ * @param {object} elem - HTML element to validate.
2003
+ * @returns {void}
2004
+ */
2005
+ getInputElements(elem) {
2006
+ this.inputElements = elem.renderRoot.querySelectorAll('input');
2007
+ }
2008
+
2009
+ /**
2010
+ * Gets all the `auro-inputs` in the element shadow DOM.
2011
+ * @private
2012
+ * @param {object} elem - HTML element to validate.
2013
+ * @returns {void}
2014
+ */
2015
+ getAuroInputs(elem) {
2016
+ this.auroInputElements = elem.shadowRoot.querySelectorAll('auro-input, [auro-input]');
2017
+ }
2018
+
2019
+ /**
2020
+ * Return appropriate error message.
2021
+ * @private
2022
+ * @param {object} elem - HTML element to validate.
2023
+ * @returns {void}
2024
+ */
2025
+ getErrorMessage(elem) {
2026
+ if (elem.validity !== 'valid') {
2027
+ if (elem.setCustomValidity) {
2028
+ elem.errorMessage = elem.setCustomValidity;
2029
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
2030
+ const input = elem.renderRoot.querySelector('input');
2031
+
2032
+ if (input.validationMessage.length > 0) {
2033
+ elem.errorMessage = input.validationMessage;
2034
+ }
2035
+ } else if (this.inputElements && this.inputElements.length > 0) {
2036
+ const firstInput = this.inputElements[0];
2037
+
2038
+ if (firstInput.validationMessage.length > 0) {
2039
+ elem.errorMessage = firstInput.validationMessage;
2040
+ } else if (this.inputElements.length === 2) {
2041
+ const secondInput = this.inputElements[1];
2042
+
2043
+ if (secondInput.validationMessage.length > 0) {
2044
+ elem.errorMessage = secondInput.validationMessage;
2045
+ }
2046
+ }
2047
+ }
2048
+ } else {
2049
+ elem.errorMessage = undefined;
2050
+ }
2051
+ }
2052
+ }
2053
+
2054
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2055
+ // See LICENSE in the project root for license information.
2056
+
2057
+
2058
+ /**
2059
+ * Auro-input provides users a way to enter data into a text field.
2060
+ *
2061
+ * @attr {Boolean} activeLabel - If set, the label will remain fixed in the active position.
2062
+ * @attr {String} autocapitalize - An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. [off/none, on/sentences, words, characters]
2063
+ * @attr {String} autocomplete - An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
2064
+ * @attr {String} autocorrect - When set to `off`, stops iOS from auto correcting words when typed into a text box.
2065
+ * @attr {Boolean} bordered - Applies bordered UI variant.
2066
+ * @attr {Boolean} borderless - Applies borderless UI variant.
2067
+ * @attr {Boolean} disabled - If set, disables the input.
2068
+ * @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
2069
+ * @prop {String} errorMessage - Contains the help text message for the current validity error.
2070
+ * @attr {String} helpText - Deprecated, see `slot`.
2071
+ * @attr {Boolean} icon - If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
2072
+ * @attr {String} id - Sets the unique ID of the element.
2073
+ * @attr {String} isValid - (DEPRECATED - Please use validity) Can be accessed to determine if the input validity. Returns true when validity has not yet been checked or validity = 'valid', all other cases return false. Not intended to be set by the consumer.
2074
+ * @attr {String} label - Deprecated, see `slot`.
2075
+ * @attr {String} lang - defines the language of an element.
2076
+ * @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `numeric` and all date formats.
2077
+ * @attr {Number} maxLength - The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
2078
+ * @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `numeric` and all date formats.
2079
+ * @attr {Number} minLength - The minimum number of characters the user can enter into the text input. This must be an non-negative integer value smaller than or equal to the value specified by `maxlength`.
2080
+ * @attr {String} name - Populates the `name` attribute on the input.
2081
+ * @attr {Boolean} noValidate - If set, disables auto-validation on blur.
2082
+ * @attr {Boolean} readonly - Makes the input read-only, but can be set programmatically.
2083
+ * @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
2084
+ * @attr {String} pattern - Specifies a regular expression the form control's value should match.
2085
+ * @attr {String} placeholder - Define custom placeholder text, only supported by date input formats.
2086
+ * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
2087
+ * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
2088
+ * @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
2089
+ * @attr {String} setCustomValidityBadInput - Custom help text message to display when validity = `badInput`.
2090
+ * @attr {String} setCustomValidityTooShort - Custom help text message to display when validity = `tooShort`.
2091
+ * @attr {String} setCustomValidityTooLong - Custom help text message to display when validity = `tooLong`.
2092
+ * @attr {String} setCustomValidityForType - Custom help text message to display for the declared element `type` and type validity fails.
2093
+ * @attr {String} setCustomValidityRangeOverflow - Custom help text message to display when validity = `rangeOverflow`.
2094
+ * @attr {String} setCustomValidityRangeUnderflow - Custom help text message to display when validity = `rangeUnderflow`.
2095
+ * @attr {String} spellcheck - An enumerated attribute defines whether the element may be checked for spelling errors. [true, false]. When set to `false` the attribute `autocorrect` is set to `off` and `autocapitalize` is set to `none`.
2096
+ * @attr {String} type - Populates the `type` attribute on the input. Allowed values are `password`, `email`, `credit-card`, `month-day-year`, `month-year`, `year-month-day` or `text`. If given value is not allowed or set, defaults to `text`.
2097
+ * @attr {Boolean} validateOnInput - Sets validation mode to re-eval with each input.
2098
+ * @attr {String} validity - Specifies the `validityState` this element is in.
2099
+ * @attr {String} value - Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
2100
+ *
2101
+ * @slot helptext - Sets the help text displayed below the input.
2102
+ * @slot label - Sets the label text for the input.
2103
+ *
2104
+ * @csspart wrapper - Use for customizing the style of the root element
2105
+ * @csspart label - Use for customizing the style of the label element
2106
+ * @csspart helpText - Use for customizing the style of the helpText element
2107
+ * @csspart accentIcon - Use for customizing the style of the accentIcon element (e.g. credit card icon, calendar icon)
2108
+ * @csspart iconContainer - Use for customizing the style of the iconContainer (e.g. X icon for clearing input value)
2109
+ * @event input - Event fires when the value of an `auro-input` has been changed.
2110
+ * @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
2111
+ */
2112
+
2113
+ class BaseInput extends r {
2114
+
2115
+ constructor() {
2116
+ super();
2117
+
2118
+ this.isValid = false;
2119
+
2120
+ this.icon = false;
2121
+ this.disabled = false;
2122
+ this.required = false;
2123
+ this.noValidate = false;
2124
+ this.max = undefined;
2125
+ this.min = undefined;
2126
+ this.maxLength = undefined;
2127
+ this.minLength = undefined;
2128
+ this.label = 'Input label is undefined';
2129
+ this.activeLabel = false;
2130
+
2131
+ this.setCustomValidityForType = undefined;
2132
+ }
2133
+
2134
+ /**
2135
+ * Internal Defaults.
2136
+ * @private
2137
+ * @returns {void}
2138
+ */
2139
+ privateDefaults() {
2140
+ this.validation = new AuroFormValidation();
2141
+ this.inputIconName = undefined;
2142
+ this.showPassword = false;
2143
+ this.validationCCLength = undefined;
2144
+ this.hasValue = false;
2145
+
2146
+ this.allowedInputTypes = [
2147
+ "text",
2148
+ "email",
2149
+ "password",
2150
+ "credit-card",
2151
+ "month-day-year",
2152
+ "year-month-day",
2153
+ "month-year"
2154
+ ];
2155
+
2156
+ this.dateInputTypes = [
2157
+ "month-day-year",
2158
+ "year-month-day",
2159
+ "month-year",
2160
+ "month-fullYear",
2161
+ "month",
2162
+ "year",
2163
+ "fullYear"
2164
+ ];
2165
+
2166
+ this.autoFormattingTypes = [
2167
+ 'credit-card',
2168
+ 'month-day-year',
2169
+ 'month-year',
2170
+ 'month-fullyear',
2171
+ 'year-month-day'
2172
+ ];
2173
+
2174
+ /**
2175
+ * Credit Card is not included as this caused cursor placement issues.
2176
+ * The Safari issue.
2177
+ */
2178
+ this.setSelectionInputTypes = [
2179
+ "text",
2180
+ "password",
2181
+ "email",
2182
+ ];
2183
+
2184
+ const idLength = 36;
2185
+ const idSubstrEnd = 8;
2186
+ const idSubstrStart = 2;
2187
+
2188
+ this.uniqueId = Math.random()
2189
+ .toString(idLength)
2190
+ .substring(idSubstrStart, idSubstrEnd);
2191
+ }
2192
+
2193
+ // function to define props used within the scope of this component
2194
+ static get properties() {
2195
+ return {
2196
+ id: { type: String },
2197
+ label: { type: String },
2198
+ name: { type: String },
2199
+ type: { type: String,
2200
+ reflect: true },
2201
+ value: { type: String },
2202
+ lang: { type: String },
2203
+ pattern: {
2204
+ type: String,
2205
+ reflect: true
2206
+ },
2207
+ icon: { type: Boolean },
2208
+ disabled: { type: Boolean },
2209
+ required: { type: Boolean },
2210
+ noValidate: { type: Boolean },
2211
+ helpText: { type: String },
2212
+ spellcheck: { type: String },
2213
+ autocorrect: { type: String },
2214
+ autocapitalize: { type: String },
2215
+ autocomplete: {
2216
+ type: String,
2217
+ reflect: true
2218
+ },
2219
+ placeholder: { type: String },
2220
+ activeLabel: {
2221
+ type: Boolean,
2222
+ reflect: true
2223
+ },
2224
+ max: { type: String },
2225
+ min: { type: String },
2226
+ maxLength: { type: Number },
2227
+ minLength: { type: Number },
2228
+
2229
+ /**
2230
+ * @ignore
2231
+ */
2232
+ showPassword: { state: true },
2233
+ validateOnInput: { type: Boolean },
2234
+ readonly: { type: Boolean },
2235
+ error: {
2236
+ type: String,
2237
+ reflect: true
2238
+ },
2239
+ errorMessage: { type: String },
2240
+ isValid: {
2241
+ type: String,
2242
+ reflect: true
2243
+ },
2244
+ validity: {
2245
+ type: String,
2246
+ reflect: true
2247
+ },
2248
+ setCustomValidity: { type: String },
2249
+ setCustomValidityCustomError: { type: String },
2250
+ setCustomValidityValueMissing: { type: String },
2251
+ setCustomValidityBadInput: { type: String },
2252
+ setCustomValidityTooShort: { type: String },
2253
+ setCustomValidityTooLong: { type: String },
2254
+ setCustomValidityRangeOverflow: { type: String},
2255
+ setCustomValidityRangeUnderflow: { type: String},
2256
+ customValidityTypeEmail: { type: String }
2257
+ };
2258
+ }
2259
+
2260
+ static get styles() {
2261
+ return [
2262
+ i$2`${styleCss$3}`,
2263
+ i$2`${colorCss$3}`,
2264
+ i$2`${tokensCss$3}`
2265
+ ];
2266
+ }
2267
+
2268
+ connectedCallback() {
2269
+ super.connectedCallback();
2270
+
2271
+ this.privateDefaults();
2272
+
2273
+ notifyOnLangChange(this);
2274
+
2275
+ // Process auto-formatting if defined for CleaveJS
2276
+ if (this.type) {
2277
+ let config = null;
2278
+
2279
+ // Set config for credit card
2280
+ switch (this.type) {
2281
+ case 'number':
2282
+ config = {
2283
+ numeral: true,
2284
+ delimiter: ''
2285
+ };
2286
+
2287
+ this.inputMode = 'numeric';
2288
+
2289
+ break;
2290
+
2291
+ case 'credit-card':
2292
+ config = {
2293
+ creditCard: true
2294
+ };
2295
+
2296
+ this.inputMode = 'numeric';
2297
+
2298
+ break;
2299
+
2300
+ case 'month-day-year':
2301
+ config = {
2302
+ date: true,
2303
+ delimiter: '/',
2304
+ datePattern: [
2305
+ 'm',
2306
+ 'd',
2307
+ 'Y'
2308
+ ]
2309
+ };
2310
+
2311
+ this.inputMode = 'numeric';
2312
+
2313
+ break;
2314
+
2315
+ case 'year-month-day':
2316
+ config = {
2317
+ date: true,
2318
+ delimiter: '/',
2319
+ datePattern: [
2320
+ 'Y',
2321
+ 'm',
2322
+ 'd'
2323
+ ]
2324
+ };
2325
+
2326
+ this.inputMode = 'numeric';
2327
+
2328
+ break;
2329
+
2330
+ case 'month-year':
2331
+ config = {
2332
+ date: true,
2333
+ datePattern: [
2334
+ 'm',
2335
+ 'y'
2336
+ ]
2337
+ };
2338
+
2339
+ this.inputMode = 'numeric';
2340
+
2341
+ break;
2342
+
2343
+ case 'month-fullYear':
2344
+ config = {
2345
+ date: true,
2346
+ datePattern: [
2347
+ 'm',
2348
+ 'Y'
2349
+ ]
2350
+ };
2351
+
2352
+ this.inputMode = 'numeric';
2353
+
2354
+ break;
2355
+
2356
+ case 'fullYear':
2357
+ config = {
2358
+ date: true,
2359
+ datePattern: ['Y']
2360
+ };
2361
+
2362
+ this.inputMode = 'numeric';
2363
+
2364
+ break;
2365
+
2366
+ case 'year':
2367
+ config = {
2368
+ date: true,
2369
+ datePattern: ['y']
2370
+ };
2371
+
2372
+ this.inputMode = 'numeric';
2373
+
2374
+ break;
2375
+
2376
+ case 'month':
2377
+ config = {
2378
+ date: true,
2379
+ datePattern: ['m']
2380
+ };
2381
+
2382
+ this.inputMode = 'numeric';
2383
+
2384
+ break;
2385
+ // Do nothing
2386
+ }
2387
+
2388
+ // initialize CleaveJS if we have a defined config for the requested format
2389
+ if (config) {
2390
+ // eslint-disable-next-line no-unused-vars
2391
+ new Cleave_1(this, config);
2392
+ }
2393
+ }
2394
+ }
2395
+
2396
+ disconnectedCallback() {
2397
+ super.disconnectedCallback();
2398
+ stopNotifyingOnLangChange(this);
2399
+ }
2400
+
2401
+ firstUpdated() {
2402
+ // add attribute for query selectors when auro-input is registered under a custom name
2403
+ if (this.tagName.toLowerCase() !== 'auro-input') {
2404
+ this.setAttribute('auro-input', true);
2405
+ }
2406
+
2407
+ this.inputElement = this.renderRoot.querySelector('input');
2408
+ this.labelElement = this.shadowRoot.querySelector('label');
2409
+
2410
+ // use validity message override if declared when initializing the component
2411
+ if (this.hasAttribute('setCustomValidity')) {
2412
+ this.ValidityMessageOverride = this.setCustomValidity;
2413
+ }
2414
+
2415
+ // if setCustomValidityForType is not set, use our default
2416
+ if (!this.setCustomValidityForType) {
2417
+ if (this.type === 'password') {
2418
+ this.setCustomValidityForType = i18n(this.lang, 'password');
2419
+ } else if (this.type === 'credit-card') {
2420
+ this.setCustomValidityForType = i18n(this.lang, 'creditcard');
2421
+ } else if (this.type === 'email') {
2422
+ this.setCustomValidityForType = i18n(this.lang, 'email');
2423
+ } else if (this.type === 'month-day-year') {
2424
+ this.setCustomValidityForType = i18n(this.lang, 'dateMMDDYYYY');
2425
+ } else if (this.type === 'month-year') {
2426
+ this.setCustomValidityForType = i18n(this.lang, 'dateMMYY');
2427
+ } else if (this.type === 'month-fullyear') {
2428
+ this.setCustomValidityForType = i18n(this.lang, 'dateMMYYYY');
2429
+ } else if (this.type === 'year-month-day') {
2430
+ this.setCustomValidityForType = i18n(this.lang, 'dateYYYYMMDD');
2431
+ } else if (this.type === 'year') {
2432
+ this.setCustomValidityForType = i18n(this.lang, 'dateYY');
2433
+ } else if (this.type === 'fullYear') {
2434
+ this.setCustomValidityForType = i18n(this.lang, 'dateYYYY');
2435
+ } else if (this.type === 'month') {
2436
+ this.setCustomValidityForType = i18n(this.lang, 'dateMM');
2437
+ }
2438
+ }
2439
+
2440
+ this.addEventListener('keydown', (evt) => {
2441
+ if (this.autoFormattingTypes.includes(this.type)) {
2442
+ if (evt.key.length === 1 || evt.key === 'Backspace' || evt.key === 'Delete') {
2443
+ if (evt.key.length === 1) {
2444
+ const numCharSelected = this.inputElement.selectionEnd - this.inputElement.selectionStart;
2445
+
2446
+ if (numCharSelected > 1) {
2447
+ this.cursorPosition = this.inputElement.selectionStart + 1;
2448
+ } else if (numCharSelected === 1) {
2449
+ this.cursorPosition = this.inputElement.selectionEnd;
2450
+ } else {
2451
+ this.cursorPosition = this.inputElement.selectionEnd + 1;
2452
+ }
2453
+ } else if (evt.key === 'Backspace') {
2454
+ this.cursorPosition = this.inputElement.selectionEnd - 1;
2455
+ } else if (evt.key === 'Delete') {
2456
+ this.cursorPosition = this.inputElement.selectionEnd;
2457
+ }
2458
+ }
2459
+
2460
+ if (evt.key === "ArrowUp" || evt.key === "ArrowDown" || evt.key === "ArrowLeft" || evt.key === "ArrowRight") {
2461
+ if (evt.key === 'ArrowUp') {
2462
+ this.cursorPosition = 0;
2463
+ } else if (evt.key === 'ArrowDown') {
2464
+ this.cursorPosition = this.value.length;
2465
+ } else if (evt.key === 'ArrowLeft') {
2466
+ this.cursorPosition = this.inputElement.selectionEnd - 1;
2467
+ } else if (evt.key === 'ArrowRight') {
2468
+ this.cursorPosition = this.inputElement.selectionEnd + 1;
2469
+ }
2470
+ }
2471
+ }
2472
+ });
2473
+ }
2474
+
2475
+ /**
2476
+ * LitElement lifecycle method. Called after the DOM has been updated.
2477
+ * @param {Map<string, any>} changedProperties - Keys are the names of changed properties, values are the corresponding previous values.
2478
+ * @returns {void}
2479
+ */
2480
+ updated(changedProperties) {
2481
+ if (this.type === 'password') {
2482
+ this.spellcheck = 'false';
2483
+ }
2484
+
2485
+ if (this.spellcheck === 'false') {
2486
+ this.autocorrect = 'off';
2487
+ this.autocapitalize = 'none';
2488
+ } else {
2489
+ this.autocorrect = this.autocorrect ? this.autocorrect : undefined;
2490
+ this.autocapitalize = undefined;
2491
+ }
2492
+
2493
+ if (changedProperties.has('readonly')) {
2494
+ if (this.readonly) {
2495
+ this.inputElement.setAttribute('readonly', true);
2496
+ this.inputElement.setAttribute('aria-readonly', true);
2497
+ } else {
2498
+ this.inputElement.removeAttribute('readonly');
2499
+ this.inputElement.removeAttribute('aria-readonly');
2500
+ }
2501
+ }
2502
+
2503
+ if (changedProperties.has('type')) {
2504
+ this.configureDataForType();
2505
+ }
2506
+
2507
+ if (changedProperties.has('value')) {
2508
+ if (this.value && this.value.length > 0) {
2509
+ this.hasValue = true;
2510
+ this.requestUpdate();
2511
+ } else {
2512
+ this.hasValue = false;
2513
+ this.requestUpdate();
2514
+ }
2515
+
2516
+ if (this.value !== this.inputElement.value) {
2517
+ if (this.value) {
2518
+ this.inputElement.value = this.value;
2519
+ } else {
2520
+ this.inputElement.value = '';
2521
+ }
2522
+
2523
+ if (!this.shadowRoot.contains(this.getActiveElement())) {
2524
+ this.validation.validate(this);
2525
+ }
2526
+
2527
+ this.notifyValueChanged();
2528
+ }
2529
+ this.autoFormatHandling();
2530
+ }
2531
+
2532
+ if (changedProperties.has('error')) {
2533
+ this.validation.validate(this, true);
2534
+ }
2535
+
2536
+ if (changedProperties.has('validity')) {
2537
+ this.notifyValidityChange();
2538
+ }
2539
+ }
2540
+
2541
+ /**
2542
+ * @private
2543
+ * @returns {void} Handles cursor position when input auto-formats.
2544
+ */
2545
+ autoFormatHandling() {
2546
+ if (this.cursorPosition >= 0 && this.autoFormattingTypes.includes(this.type)) {
2547
+ if (this.type === 'credit-card' && this.inputElement.value.charAt(this.cursorPosition) === ' ') {
2548
+ this.cursorPosition += 1;
2549
+ } else if (this.dateInputTypes.includes(this.type)) {
2550
+ const divider = '/';
2551
+ const dividerNextChar = this.inputElement.value.charAt(this.cursorPosition) === divider;
2552
+
2553
+ if (this.cursorPosition > 1 && dividerNextChar && this.inputElement.value.charAt(this.cursorPosition - 2) !== divider) {
2554
+ this.cursorPosition += 1;
2555
+ } else if (this.cursorPosition > 0 && this.inputElement.value.charAt(this.cursorPosition + 1) === divider
2556
+ && this.inputElement.value.charAt(this.cursorPosition - 1) === '0') { // eslint-disable-line operator-linebreak
2557
+ this.cursorPosition += 2;
2558
+ }
2559
+ }
2560
+
2561
+ this.inputElement.setSelectionRange(this.cursorPosition, this.cursorPosition);
2562
+ }
2563
+ }
2564
+
2565
+ /**
2566
+ * @private
2567
+ * @returns {void} Notify validity state changed via event.
2568
+ */
2569
+ notifyValidityChange() {
2570
+ this.dispatchEvent(new CustomEvent('auroInput-validityChange', {
2571
+ bubbles: true,
2572
+ cancelable: false,
2573
+ composed: true,
2574
+ }));
2575
+ }
2576
+
2577
+ /**
2578
+ * @private
2579
+ * @returns {string}
2580
+ */
2581
+ definePattern() {
2582
+ if (this.type === 'credit-card' && !this.noValidate && this.maxLength) {
2583
+ return `.{${this.maxLength},${this.maxLength}}`;
2584
+ }
2585
+
2586
+ return this.pattern;
2587
+ }
2588
+
2589
+ /**
2590
+ * Function to set element focus.
2591
+ * @private
2592
+ * @return {void}
2593
+ */
2594
+ focus() {
2595
+ this.inputElement.focus();
2596
+ }
2597
+
2598
+ /**
2599
+ * Required to convert SVG icons from data to HTML string.
2600
+ * @private
2601
+ * @param {string} icon HTML string for requested icon.
2602
+ * @returns {object} Appended HTML for SVG.
2603
+ */
2604
+ getIconAsHtml(icon) {
2605
+ const dom = new DOMParser().parseFromString(icon.svg, 'text/html');
2606
+
2607
+ return dom.body.firstChild;
2608
+ }
2609
+
2610
+ /**
2611
+ * Sends event notifying that the input has changed it's value.
2612
+ * @private
2613
+ * @returns {void}
2614
+ */
2615
+ notifyValueChanged() {
2616
+ let inputEvent = null;
2617
+
2618
+ inputEvent = new Event('input', {
2619
+ bubbles: true,
2620
+ composed: true,
2621
+ });
2622
+
2623
+ // Dispatched event to alert outside shadow DOM context of event firing.
2624
+ this.dispatchEvent(inputEvent);
2625
+ }
2626
+
2627
+ /**
2628
+ * Handles event of clearing input content by clicking the X icon.
2629
+ * @private
2630
+ * @return {void}
2631
+ */
2632
+ handleClickClear() {
2633
+ this.inputElement.value = "";
2634
+ this.value = "";
2635
+ this.labelElement.classList.remove('inputElement-label--sticky');
2636
+ this.focus();
2637
+ this.validation.validate(this);
2638
+ this.notifyValueChanged();
2639
+ }
2640
+
2641
+ /**
2642
+ * @private
2643
+ * @return {void}
2644
+ */
2645
+ handleInput() {
2646
+ // Prevent non-numeric characters from being entered on credit card fields.
2647
+ if (this.type === 'credit-card') {
2648
+ this.inputElement.value = this.inputElement.value.replace(/[\D]/gu, '');
2649
+ }
2650
+
2651
+ // Sets value property to value of element value (el.value).
2652
+ this.value = this.inputElement.value;
2653
+
2654
+ // Validation on blur or input.
2655
+ if (this.validateOnInput) {
2656
+ this.validation.validate(this);
2657
+ }
2658
+
2659
+ // Prevents cursor jumping in Safari.
2660
+ const { selectionStart } = this.inputElement;
2661
+
2662
+ if (this.setSelectionInputTypes.includes(this.type)) {
2663
+ this.updateComplete.then(() => {
2664
+ try {
2665
+ this.inputElement.setSelectionRange(selectionStart, selectionStart);
2666
+ } catch (error) { // eslint-disable-line
2667
+ // do nothing
2668
+ }
2669
+ });
2670
+ }
2671
+ }
2672
+
2673
+ /**
2674
+ * Function to support @focusin event.
2675
+ * @private
2676
+ * @return {void}
2677
+ */
2678
+ handleFocusin() {
2679
+
2680
+ /**
2681
+ * The input is considered to be in it's initial state based on
2682
+ * if this.value === undefined. The first time we interact with the
2683
+ * input manually, by applying focusin, we need to flag the
2684
+ * input as no longer in the initial state.
2685
+ */
2686
+ if (this.value === undefined) {
2687
+ this.value = '';
2688
+ }
2689
+ }
2690
+
2691
+ /**
2692
+ * Function to support @blur event.
2693
+ * @private
2694
+ * @return {void}
2695
+ */
2696
+ handleBlur() {
2697
+ this.inputElement.scrollLeft = 100;
2698
+
2699
+ if (!this.noValidate) {
2700
+ this.validation.validate(this);
2701
+ }
2702
+ }
2703
+
2704
+ /**
2705
+ * Returns focused element, even if it's in the shadow DOM.
2706
+ * @private
2707
+ * @param {Object} root - Element to check for focus.
2708
+ * @returns {Object}
2709
+ */
2710
+ getActiveElement(root = document) {
2711
+ const activeEl = root.activeElement;
2712
+
2713
+ if (!activeEl) {
2714
+ return null;
2715
+ }
2716
+
2717
+ if (activeEl.shadowRoot) {
2718
+ return this.getActiveElement(activeEl.shadowRoot);
2719
+ }
2720
+
2721
+ return activeEl;
2722
+ }
2723
+
2724
+ /**
2725
+ * Public method force validation of input.
2726
+ * @returns {void}
2727
+ */
2728
+ validate() {
2729
+ this.validation.validate(this);
2730
+ }
2731
+
2732
+
2733
+ /**
2734
+ * Sets configuration data used elsewhere based on the `type` attribute.
2735
+ * @private
2736
+ * @returns {void}
2737
+ */
2738
+ configureDataForType() {
2739
+ if (this.type === 'month-day-year' || this.type === 'year-month-day') {
2740
+ this.dateStrLength = 10;
2741
+ } else if (this.type === 'month-year') {
2742
+ this.dateStrLength = 5;
2743
+ } else if (this.type === 'month-fullYear') {
2744
+ this.dateStrLength = 7;
2745
+ } else if (this.type === 'month' || this.type === 'year') {
2746
+ this.dateStrLength = 2;
2747
+ } else if (this.type === 'fullYear') {
2748
+ this.dateStrLength = 4;
2749
+ }
2750
+ }
2751
+
2752
+ /**
2753
+ * Validates against list of supported this.allowedInputTypes; return type=text if invalid request.
2754
+ * @private
2755
+ * @param {string} type Value entered into component prop.
2756
+ * @returns {string} Iterates over allowed types array.
2757
+ */
2758
+ getInputType(type) {
2759
+ if (this.allowedInputTypes.includes(type)) {
2760
+ return type;
2761
+ }
2762
+
2763
+ return "text";
2764
+ }
2765
+
2766
+ /**
2767
+ * Determines default help text string.
2768
+ * @private
2769
+ * @param {string} type Value entered into component prop.
2770
+ * @returns {string} Evaluates pre-determined help text.
2771
+ */
2772
+ getHelpText(type) {
2773
+ if (type === 'password') {
2774
+ this.helpText = i18n(this.lang, 'password');
2775
+ } else if (type === 'email') {
2776
+ this.helpText = i18n(this.lang, 'email');
2777
+ } else if (type === 'credit-card') {
2778
+ this.helpText = i18n(this.lang, 'creditcard');
2779
+ } else if (type === 'month-day-year') {
2780
+ this.helpText = i18n(this.lang, 'dateMMDDYYYY');
2781
+ } else if (type === 'month-year') {
2782
+ this.helpText = i18n(this.lang, 'dateMMYY');
2783
+ } else if (type === 'month-fullyear') {
2784
+ this.helpText = i18n(this.lang, 'dateMMYYYY');
2785
+ } else if (type === 'year-month-day') {
2786
+ this.helpText = i18n(this.lang, 'dateYYYYMMDD');
2787
+ } else if (type === 'month') {
2788
+ this.helpText = i18n(this.lang, 'dateMM');
2789
+ } else if (type === 'year') {
2790
+ this.helpText = i18n(this.lang, 'dateYY');
2791
+ } else if (type === 'fullYear') {
2792
+ this.helpText = i18n(this.lang, 'dateYYYY');
2793
+ } else {
2794
+ this.helpText = '';
2795
+ }
2796
+
2797
+ return this.helpText;
2798
+ }
2799
+
2800
+ /**
2801
+ * Function to support show-password feature.
2802
+ * @private
2803
+ * @returns {void}
2804
+ */
2805
+ handleClickShowPassword() {
2806
+ this.showPassword = !this.showPassword;
2807
+ this.focus();
2808
+ }
2809
+
2810
+ /**
2811
+ * Support placeholder text.
2812
+ * @private
2813
+ * @returns {string}
2814
+ */
2815
+ getPlaceholder() {
2816
+ if (this.type === 'month-day-year') {
2817
+ return !this.placeholder ? 'MM/DD/YYYY' : this.placeholder;
2818
+ } else if (this.type === 'month-year') {
2819
+ return !this.placeholder ? 'MM/YY' : this.placeholder;
2820
+ } else if (this.type === 'month-fullYear') {
2821
+ return !this.placeholder ? 'MM/YYYY' : this.placeholder;
2822
+ } else if (this.type === 'year-month-day') {
2823
+ return !this.placeholder ? 'YYYY/MM/DD' : this.placeholder;
2824
+ } else if (this.type === 'year') {
2825
+ return !this.placeholder ? 'YY' : this.placeholder;
2826
+ } else if (this.type === 'fullYear') {
2827
+ return !this.placeholder ? 'YYYY' : this.placeholder;
2828
+ } else if (this.type === 'month') {
2829
+ return !this.placeholder ? 'MM' : this.placeholder;
2830
+ }
2831
+
2832
+ return o$2(this.placeholder);
2833
+ }
2834
+
2835
+ /**
2836
+ * Defines placement of input icon based on type, used with classMap.
2837
+ * @private
2838
+ * @returns {boolean}
2839
+ */
2840
+ defineInputIcon() {
2841
+ if (this.icon && this.type === 'credit-card') {
2842
+ return true;
2843
+ } else if (this.dateInputTypes.includes(this.type)) {
2844
+ return true;
2845
+ }
2846
+
2847
+ return false;
2848
+ }
2849
+
2850
+ /**
2851
+ * Defines padding of input label based on type, used with classMap.
2852
+ * @private
2853
+ * @returns {boolean}
2854
+ */
2855
+ defineLabelPadding() {
2856
+ if (this.icon && this.type === 'credit-card' && (this.value === "" || this.value === undefined)) {
2857
+ return true;
2858
+ } else if (this.dateInputTypes.includes(this.type)) {
2859
+ return true;
2860
+ }
2861
+
2862
+ return false;
2863
+ }
2864
+
2865
+ // Functions specific to Credit Card component support
2866
+ // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2867
+
2868
+ /**
2869
+ * Function to support credit-card feature type.
2870
+ * @private
2871
+ * @returns {void}
2872
+ */
2873
+ processCreditCard() {
2874
+ const card = this.matchInputValueToCreditCard();
2875
+
2876
+ this.maxLength = card.formatLength;
2877
+ this.minLength = card.formatMinLength;
2878
+
2879
+ this.setCustomValidity = card.setCustomValidity;
2880
+
2881
+ if (this.icon) {
2882
+ this.inputIconName = card.cardIcon;
2883
+ }
2884
+ }
2885
+
2886
+ /**
2887
+ * Function to support credit-card feature type.
2888
+ * @private
2889
+ * @returns {object} JSON with data for credit card formatting.
2890
+ */
2891
+ matchInputValueToCreditCard() {
2892
+ const CreditCardValidationMessage = `${i18n(this.lang, 'validCard')}`;
2893
+
2894
+ const creditCardTypes = [
2895
+ {
2896
+ name: 'Airlines',
2897
+ regex: /^(?<num>1|2)\d{0}/u,
2898
+ formatMinLength: 17,
2899
+ setCustomValidity: CreditCardValidationMessage,
2900
+ cardIcon: 'credit-card'
2901
+ },
2902
+ {
2903
+ name: 'Commercial',
2904
+ regex: /^(?<num>2)\d{0}/u,
2905
+ formatMinLength: 8,
2906
+ setCustomValidity: CreditCardValidationMessage,
2907
+ cardIcon: 'credit-card'
2908
+ },
2909
+ {
2910
+ name: 'Alaska Commercial',
2911
+ regex: /^(?<num>27)\d{0}/u,
2912
+ formatMinLength: 8,
2913
+ setCustomValidity: CreditCardValidationMessage,
2914
+ cardIcon: 'cc-alaska'
2915
+ },
2916
+ {
2917
+ name: 'American Express',
2918
+ regex: /^(?<num>34|37)\d{0}/u,
2919
+ formatLength: 17,
2920
+ setCustomValidity: CreditCardValidationMessage,
2921
+ cardIcon: 'cc-amex'
2922
+ },
2923
+ {
2924
+ name: 'Diners club',
2925
+ regex: /^(?<num>36|38)\d{0}/u,
2926
+ formatLength: 16,
2927
+ setCustomValidity: CreditCardValidationMessage,
2928
+ cardIcon: 'credit-card'
2929
+ },
2930
+ {
2931
+ name: 'Visa',
2932
+ regex: /^(?<num>4)\d{0}/u,
2933
+ formatLength: 19,
2934
+ setCustomValidity: CreditCardValidationMessage,
2935
+ cardIcon: 'cc-visa'
2936
+ },
2937
+ {
2938
+ name: 'Alaska Airlines Visa',
2939
+ regex: /^(?<num>4147\s34|4888\s93|4800\s11|4313\s51|4313\s07)\d{0}/u,
2940
+ formatLength: 19,
2941
+ setCustomValidity: CreditCardValidationMessage,
2942
+ cardIcon: 'cc-alaska'
2943
+ },
2944
+ {
2945
+ name: 'Master Card',
2946
+ regex: /^(?<num>5)\d{0}/u,
2947
+ formatLength: 19,
2948
+ setCustomValidity: CreditCardValidationMessage,
2949
+ cardIcon: 'cc-mastercard'
2950
+ },
2951
+ {
2952
+ name: 'Discover Card',
2953
+ regex: /^(?<num>6)\d{0}/u,
2954
+ formatLength: 19,
2955
+ setCustomValidity: CreditCardValidationMessage,
2956
+ cardIcon: 'cc-discover'
2957
+ }
2958
+ ];
2959
+
2960
+ let type = {
2961
+ name: 'Default Card',
2962
+ formatLength: 19,
2963
+ setCustomValidity: CreditCardValidationMessage,
2964
+ cardIcon: 'credit-card'
2965
+ };
2966
+
2967
+ creditCardTypes.forEach((cardType) => {
2968
+ if (cardType.regex.exec(this.value)) {
2969
+ type = cardType;
2970
+ }
2971
+ });
2972
+
2973
+ this.validationCCLength = type.formatLength;
2974
+
2975
+ return type;
2976
+ }
2977
+ }
2978
+
2979
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
2980
+ // See LICENSE in the project root for license information.
2981
+
2982
+
2983
+ class AuroDependencyVersioning {
2984
+
2985
+ /**
2986
+ * Generates a unique string to be used for child auro element naming.
2987
+ * @private
2988
+ * @param {string} baseName - Defines the first part of the unique element name.
2989
+ * @param {string} version - Version of the component that will be appended to the baseName.
2990
+ * @returns {string} - Unique string to be used for naming.
2991
+ */
2992
+ generateElementName(baseName, version) {
2993
+ let result = baseName;
2994
+
2995
+ result += '-';
2996
+ result += version.replace(/[.]/g, '_');
2997
+
2998
+ return result;
2999
+ }
3000
+
3001
+ /**
3002
+ * Generates a unique string to be used for child auro element naming.
3003
+ * @param {string} baseName - Defines the first part of the unique element name.
3004
+ * @param {string} version - Version of the component that will be appended to the baseName.
3005
+ * @returns {string} - Unique string to be used for naming.
3006
+ */
3007
+ generateTag(baseName, version, tagClass) {
3008
+ const elementName = this.generateElementName(baseName, version);
3009
+ const tag = i$4`${s$2(elementName)}`;
3010
+
3011
+ if (!customElements.get(elementName)) {
3012
+ customElements.define(elementName, class extends tagClass {});
3013
+ }
3014
+
3015
+ return tag;
3016
+ }
3017
+ }
3018
+
3019
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3020
+ // See LICENSE in the project root for license information.
3021
+
3022
+
3023
+ /**
3024
+ * @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
3025
+ * @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
3026
+ * @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
3027
+ */
3028
+
3029
+ class AuroElement extends r {
3030
+
3031
+ // function to define props used within the scope of this component
3032
+ static get properties() {
3033
+ return {
3034
+ hidden: { type: Boolean,
3035
+ reflect: true },
3036
+ hiddenVisually: { type: Boolean,
3037
+ reflect: true },
3038
+ hiddenAudible: { type: Boolean,
3039
+ reflect: true },
3040
+ };
3041
+ }
3042
+
3043
+ /**
3044
+ * @private Function that determines state of aria-hidden
3045
+ */
3046
+ hideAudible(value) {
3047
+ if (value) {
3048
+ return 'true'
3049
+ }
3050
+
3051
+ return 'false'
3052
+ }
3053
+ }
3054
+
3055
+ 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>"};
3056
+
3057
+ /* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
3058
+
3059
+ const _fetchMap = new Map();
3060
+
3061
+ /**
3062
+ * A callback to parse Response body.
3063
+ *
3064
+ * @callback ResponseParser
3065
+ * @param {Fetch.Response} response
3066
+ * @returns {Promise}
3067
+ */
3068
+
3069
+ /**
3070
+ * A minimal in-memory map to de-duplicate Fetch API media requests.
3071
+ *
3072
+ * @param {String} uri
3073
+ * @param {Object} [options={}]
3074
+ * @param {ResponseParser} [options.responseParser=(response) => response.text()]
3075
+ * @returns {Promise}
3076
+ */
3077
+ const cacheFetch = (uri, options = {}) => {
3078
+ const responseParser = options.responseParser || ((response) => response.text());
3079
+ if (!_fetchMap.has(uri)) {
3080
+ _fetchMap.set(uri, fetch(uri).then(responseParser));
3081
+ }
3082
+ return _fetchMap.get(uri);
3083
+ };
3084
+
3085
+ var styleCss$2 = i$2`*,*: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)}.wrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelContainer{line-height:1.8}`;
3086
+
3087
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3088
+ // See LICENSE in the project root for license information.
3089
+
3090
+
3091
+ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
3092
+ /**
3093
+ * @attr {Boolean} onDark - Set value for on-dark version of auro-icon
3094
+ * @slot - Hidden from visibility, used for a11y if icon description is needed
3095
+ */
3096
+
3097
+ // build the component class
3098
+ class BaseIcon extends AuroElement {
3099
+ constructor() {
3100
+ super();
3101
+ this.onDark = false;
3102
+ }
3103
+
3104
+ // function to define props used within the scope of this component
3105
+ static get properties() {
3106
+ return {
3107
+ ...super.properties,
3108
+ onDark: {
3109
+ type: Boolean,
3110
+ reflect: true
3111
+ },
3112
+
3113
+ /**
3114
+ * @private
3115
+ */
3116
+ svg: {
3117
+ attribute: false,
3118
+ reflect: true
3119
+ }
3120
+ };
3121
+ }
3122
+
3123
+ static get styles() {
3124
+ return i$2`
3125
+ ${styleCss$2}
3126
+ `;
3127
+ }
3128
+
3129
+ /**
3130
+ * Async function to fetch requested icon from npm CDN.
3131
+ * @private
3132
+ * @param {string} category - Icon category.
3133
+ * @param {string} name - Icon name.
3134
+ * @returns {SVGElement} DOM - Ready HTML to be appended.
3135
+ */
3136
+ async fetchIcon(category, name) {
3137
+ let iconHTML = '';
3138
+
3139
+ if (category === 'logos') {
3140
+ iconHTML = await cacheFetch(`${this.uri}/${category}/${name}.svg`);
3141
+ } else {
3142
+ iconHTML = await cacheFetch(`${this.uri}/icons/${category}/${name}.svg`);
3143
+ }
3144
+
3145
+ const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
3146
+
3147
+ return dom.body.querySelector('svg');
3148
+ }
3149
+
3150
+ // lifecycle function
3151
+ async firstUpdated() {
3152
+ if (!this.customSvg) {
3153
+ const svg = await this.fetchIcon(this.category, this.name);
3154
+
3155
+ if (svg) {
3156
+ this.svg = svg;
3157
+ } else if (!svg) {
3158
+ const penDOM = new DOMParser().parseFromString(error.svg, 'text/html');
3159
+
3160
+ this.svg = penDOM.body.firstChild;
3161
+ }
3162
+ }
3163
+ }
3164
+ }
3165
+
3166
+ var tokensCss$2 = i$2`: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)}`;
3167
+
3168
+ var colorCss$2 = i$2`: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)}`;
3169
+
3170
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3171
+ // See LICENSE in the project root for license information.
3172
+
3173
+
3174
+ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
3175
+ /**
3176
+ * auro-icon provides users a way to use the Auro Icons by simply passing in the category and name.
3177
+ *
3178
+ * @attr {String} category - The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
3179
+ * @attr {String} name - The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage
3180
+ * @attr {Boolean} customColor - Removes primary selector.
3181
+ * @attr {Boolean} customSvg - When true, auro-icon will render a custom SVG inside the default slot.
3182
+ * @attr {Boolean} label - Exposes content in slot as icon label.
3183
+ * @attr {Boolean} primary - DEPRECATED: Sets the icon to use the baseline primary icon style.
3184
+ * @attr {Boolean} accent - Sets the icon to use the accent style.
3185
+ * @attr {Boolean} emphasis - Sets the icon to use the emphasis style.
3186
+ * @attr {Boolean} disabled - Sets the icon to use the disabled style.
3187
+ * @attr {Boolean} error - Sets the icon to use the error style.
3188
+ * @attr {Boolean} info - Sets the icon to use the info style.
3189
+ * @attr {Boolean} secondary - Sets the icon to use the secondary style.
3190
+ * @attr {Boolean} tertiary - Sets the icon to use the tertiary style.
3191
+ * @attr {Boolean} subtle - Sets the icon to use the subtle style.
3192
+ * @attr {Boolean} success - Sets the icon to use the success style.
3193
+ * @attr {Boolean} warning - Sets the icon to use the warning style.
3194
+ * @attr {String} ariaHidden - Set aria-hidden value. Default is `true`. Option is `false`.
3195
+ * @attr {String} uri - Set the uri for CDN used when fetching icons
3196
+ * @slot - Hidden from visibility, used for a11y if icon description is needed.
3197
+ * @slot svg - Used for custom SVG content.
3198
+ */
3199
+
3200
+ // build the component class
3201
+ class AuroIcon extends BaseIcon {
3202
+ constructor() {
3203
+ super();
3204
+
3205
+ this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
3206
+
3207
+ this.privateDefaults();
3208
+ }
3209
+
3210
+ /**
3211
+ * Internal Defaults.
3212
+ * @private
3213
+ * @returns {void}
3214
+ */
3215
+ privateDefaults() {
3216
+ this.accent = false;
3217
+ this.customColor = false;
3218
+ this.customSvg = false;
3219
+ this.disabled = false;
3220
+ this.emphasis = false;
3221
+ this.error = false;
3222
+ this.info = false;
3223
+ this.label = false;
3224
+ this.primary = false;
3225
+ this.secondary = false;
3226
+ this.subtle = false;
3227
+ this.success = false;
3228
+ this.tertiary = false;
3229
+ this.warning = false;
3230
+ this.runtimeUtils = new AuroLibraryRuntimeUtils();
3231
+ }
3232
+
3233
+ // function to define props used within the scope of this component
3234
+ static get properties() {
3235
+ return {
3236
+ ...super.properties,
3237
+ accent: {
3238
+ type: Boolean,
3239
+ reflect: true
3240
+ },
3241
+ ariaHidden: {
3242
+ type: String,
3243
+ reflect: true
3244
+ },
3245
+ category: {
3246
+ type: String,
3247
+ reflect: true
3248
+ },
3249
+ customColor: {
3250
+ type: Boolean
3251
+ },
3252
+ customSvg: {
3253
+ type: Boolean
3254
+ },
3255
+ disabled: {
3256
+ type: Boolean,
3257
+ reflect: true
3258
+ },
3259
+ emphasis: {
3260
+ type: Boolean,
3261
+ reflect: true
3262
+ },
3263
+ error: {
3264
+ type: Boolean,
3265
+ reflect: true
3266
+ },
3267
+ info: {
3268
+ type: Boolean,
3269
+ reflect: true
3270
+ },
3271
+ label: {
3272
+ type: Boolean,
3273
+ reflect: true
3274
+ },
3275
+ name: {
3276
+ type: String,
3277
+ reflect: true
3278
+ },
3279
+ primary: {
3280
+ type: Boolean,
3281
+ reflect: true
3282
+ },
3283
+ secondary: {
3284
+ type: Boolean,
3285
+ reflect: true
3286
+ },
3287
+ subtle: {
3288
+ type: Boolean,
3289
+ reflect: true
3290
+ },
3291
+ success: {
3292
+ type: Boolean,
3293
+ reflect: true
3294
+ },
3295
+ tertiary: {
3296
+ type: Boolean,
3297
+ reflect: true
3298
+ },
3299
+ uri: {
3300
+ type: String
3301
+ },
3302
+ warning: {
3303
+ type: Boolean,
3304
+ reflect: true
3305
+ }
3306
+ };
3307
+ }
3308
+
3309
+ static get styles() {
3310
+ return [
3311
+ super.styles,
3312
+ i$2`${tokensCss$2}`,
3313
+ i$2`${styleCss$2}`,
3314
+ i$2`${colorCss$2}`
3315
+ ];
3316
+ }
3317
+
3318
+ /**
3319
+ * This will register this element with the browser.
3320
+ * @param {string} [name="auro-icon"] - The name of element that you want to register to.
3321
+ *
3322
+ * @example
3323
+ * AuroIcon.register("custom-icon") // this will register this element to <custom-icon/>
3324
+ *
3325
+ */
3326
+ static register(name = "auro-icon") {
3327
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
3328
+ }
3329
+
3330
+ connectedCallback() {
3331
+ super.connectedCallback();
3332
+
3333
+ // Add the tag name as an attribute if it is different than the component name
3334
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-icon');
3335
+ }
3336
+
3337
+ /**
3338
+ * @returns {void} Exposes CSS parts for styling from parent components.
3339
+ */
3340
+ exposeCssParts() {
3341
+ this.setAttribute('exportparts', 'svg:iconSvg');
3342
+ }
3343
+
3344
+ // function that renders the HTML and CSS into the scope of the component
3345
+ render() {
3346
+ const a11y = {
3347
+ 'labelContainer': true,
3348
+ 'util_displayHiddenVisually': !this.label
3349
+ };
3350
+
3351
+ const classes = {
3352
+ 'label': this.label,
3353
+ 'wrapper': true,
3354
+ };
3355
+
3356
+ return x`
3357
+ <div
3358
+ class="${e$2(classes)}"
3359
+ title="${o$2(this.title || undefined)}">
3360
+ <span aria-hidden="${o$2(this.ariaHidden ? this.ariaHidden : true)}" part="svg">
3361
+ ${this.customSvg ? x`
3362
+ <slot name="svg"></slot>
3363
+ ` : x`
3364
+ ${this.svg}
3365
+ `
3366
+ }
3367
+ </span>
3368
+
3369
+ <div class="${e$2(a11y)}">
3370
+ <slot></slot>
3371
+ </div>
3372
+ </div>
3373
+ `;
3374
+ }
3375
+ }
3376
+
3377
+ var iconVersion = '6.1.2';
3378
+
3379
+ var styleCss$1 = i$2`*,*: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_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block;height:var(--ds-size-300, 1.5rem);width:var(--ds-size-300, 1.5rem)}:host([variant=flat]) .auro-button{height:100%;width:100%}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);font-family:var(--ds-font-family-default, "AS Circular", Helvetica Neue, Arial, sans-serif);font-size:var(--ds-text-body-size-default, 1rem);font-weight:var(--ds-text-body-default-weight, 500);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]):after{display:block;content:"";height:calc(100% - 2px);width:calc(100% - 2px);position:absolute;top:1px;left:1px;border-radius:4px;border-style:solid;border-width:2px}.auro-button:focus-visible[variant=secondary]:after,.auro-button:focus-visible[variant=tertiary]:after{display:block;content:"";height:100%;width:100%;position:absolute;top:0;left:0;border-radius:var(--ds-border-radius, 0.375rem);border-style:solid;border-width:2px}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=flat]{height:unset;width:unset;min-height:unset;max-height:unset;min-width:unset;max-width:unset;border:0;border-radius:unset;gap:unset;padding:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button--slim{padding:var(--ds-size-100, 0.5rem) var(--ds-size-200, 1rem);font-size:var(--ds-text-body-size-sm, 0.875rem);min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, $ds-size-300)}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-200, $ds-size-200) + var(--ds-size-50, $ds-size-50))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:all 300ms ease-out}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, $ds-size-300)}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
3380
+
3381
+ var colorCss$1 = i$2`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible:after{border-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active{--ds-auro-button-container-color: var(--ds-color-container-ui-primary-active-default, #225296);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-active-default, #225296);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-active-default, #225296)}.auro-button:not([ondark])[disabled]{--ds-auro-button-container-color: var(--ds-color-container-ui-primary-disabled-default, #a0c9f1);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-disabled-default, #a0c9f1);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-disabled-default, #a0c9f1)}@media(hover: hover){.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color: var(--ds-color-container-ui-primary-hover-default, #193d73);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-hover-default, #193d73);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-hover-default, #193d73)}}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-default-default, #ffffff);--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-default-default, #ffffff);--ds-auro-button-border-color: var(--ds-color-border-ui-default-default, #2c67b5);--ds-auro-button-text-color: var(--ds-color-text-ui-default-default, #2c67b5)}@media(hover: hover){.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03));--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03));--ds-auro-button-border-color: var(--ds-color-border-ui-hover-default, #193d73);--ds-auro-button-text-color: var(--ds-color-text-ui-hover-default, #193d73)}}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color: var(--ds-color-border-ui-focus-default, #2c67b5)}.auro-button:not([ondark])[variant=secondary]:active{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-active-default, #f0f7fd);--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-active-default, #f0f7fd);--ds-auro-button-border-color: var(--ds-color-border-ui-active-default, #225296);--ds-auro-button-text-color: var(--ds-color-text-ui-active-default, #225296)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-disabled-default, #f7f7f7);--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-disabled-default, #f7f7f7);--ds-auro-button-border-color: var(--ds-color-border-ui-disabled-default, #adadad);--ds-auro-button-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-default-default, rgba(0, 0, 0, 0.03));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-default-default, rgba(0, 0, 0, 0.03));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-default-default, #2c67b5)}@media(hover: hover){.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-hover-default, rgba(0, 0, 0, 0.12));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-hover-default, rgba(0, 0, 0, 0.12));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-hover-default, #193d73)}}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color: var(--ds-color-border-ui-default-default, #2c67b5);--ds-auro-button-border-inset-color: var(--ds-color-border-ui-default-default, #2c67b5)}.auro-button:not([ondark])[variant=tertiary]:active{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-active-default, rgba(0, 0, 0, 0.06));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-active-default, rgba(0, 0, 0, 0.06));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-active-default, #225296)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-disabled-default, rgba(0, 0, 0, 0.03));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-disabled-default, rgba(0, 0, 0, 0.03));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-color-icon-ui-secondary-default-default);background-color:transparent;background-image:none;border-color:transparent}@media(hover: hover){.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-color-icon-ui-secondary-hover-default);background-color:transparent;background-image:none;border-color:transparent}}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-color-icon-ui-secondary-disabled-default);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark]{--ds-auro-button-container-color: var(--ds-color-container-ui-primary-default-inverse, #56bbde);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-default-inverse, #56bbde);--ds-auro-button-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-button-loader-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-default-inverse, #56bbde)}@media(hover: hover){.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-color-container-ui-primary-hover-inverse, #a8e9f7);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-hover-inverse, #a8e9f7);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-hover-inverse, #a8e9f7)}}.auro-button[ondark]:active{--ds-auro-button-container-color: var(--ds-color-container-ui-primary-active-inverse, #6ad5ef);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-active-inverse, #6ad5ef);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-active-inverse, #6ad5ef)}.auro-button[ondark][disabled]{--ds-auro-button-container-color: var(--ds-color-container-ui-primary-disabled-inverse, #275b72);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-disabled-inverse, #275b72);--ds-auro-button-text-color: var(--ds-color-text-ui-disabled-inverse, #7e7e7e);--ds-auro-button-border-color: var(--ds-color-container-ui-primary-disabled-inverse, #275b72)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-default-inverse, rgba(255, 255, 255, 0.03));--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-default-inverse, rgba(255, 255, 255, 0.03));--ds-auro-button-border-color: var(--ds-color-border-ui-default-inverse, #56bbde);--ds-auro-button-text-color: var(--ds-color-text-ui-default-inverse, #56bbde)}@media(hover: hover){.auro-button[ondark][variant=secondary]:hover{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-hover-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-hover-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-border-color: var(--ds-color-border-ui-hover-inverse, #a8e9f7);--ds-auro-button-text-color: var(--ds-color-text-ui-hover-inverse, #a8e9f7)}}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color: var(--ds-color-border-ui-focus-inverse, #56bbde)}.auro-button[ondark][variant=secondary]:active{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-border-color: var(--ds-color-border-ui-active-inverse, #6ad5ef);--ds-auro-button-text-color: var(--ds-color-text-ui-active-inverse, #6ad5ef)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-container-color: var(--ds-color-container-ui-secondary-disabled-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-container-image: var(--ds-color-container-ui-secondary-disabled-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-border-color: var(--ds-color-border-ui-disabled-inverse, #7e7e7e);--ds-auro-button-text-color: var(--ds-color-text-ui-disabled-inverse, #7e7e7e)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-default-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-default-inverse, rgba(255, 255, 255, 0.12));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-default-inverse, #56bbde)}@media(hover: hover){.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-hover-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-hover-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-hover-inverse, #a8e9f7)}}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color: var(--ds-color-border-ui-default-inverse, #56bbde);--ds-auro-button-border-inset-color: var(--ds-color-border-ui-default-inverse, #56bbde)}.auro-button[ondark][variant=tertiary]:active{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-active-inverse, rgba(255, 255, 255, 0.06));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-active-inverse, #6ad5ef)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-container-color: var(--ds-color-container-ui-tertiary-disabled-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-container-image: var(--ds-color-container-ui-tertiary-disabled-inverse, rgba(255, 255, 255, 0.25));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-color-text-ui-disabled-inverse, #7e7e7e)}.auro-button[ondark][variant=flat]{color:var(--ds-color-icon-ui-secondary-default-inverse);background-color:transparent;background-image:none;border-color:transparent}@media(hover: hover){.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-color-icon-ui-secondary-hover-inverse);background-color:transparent;background-image:none;border-color:transparent}}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-color-icon-ui-disabled-default);background-color:transparent;background-image:none;border-color:transparent}`;
3382
+
3383
+ var tokensCss$1 = i$2`:host{--ds-auro-button-border-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-button-border-inset-color: var(--ds-color-border-emphasis-inverse, #f2f7fb);--ds-auro-button-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-button-container-image: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-button-loader-color: var(--ds-color-utility-navy-default, #265688);--ds-auro-button-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-button-tap-color: transparent}`;
3384
+
3385
+ var styleCss = i$2`*,*: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,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin: 0.375rem;--margin-xs: 0.2rem;--margin-sm: 0.5rem;--margin-md: 0.75rem;--margin-lg: 1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
3386
+
3387
+ var colorCss = i$2`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]){--ds-auro-loader-color: var(--ds-color-utility-navy-default, #265688)}:host([ondark]){--ds-auro-loader-color: var(--ds-color-utility-cyan-inverse, #a8e9f7)}:host([white]){--ds-auro-loader-color: var(--ds-color-utility-neutral-inverse, #ccd2db)}:host([orbit])>span{--ds-auro-loader-background-color: transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color: currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color: currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}`;
3388
+
3389
+ var tokensCss = i$2`:host{--ds-auro-loader-background-color: currentcolor;--ds-auro-loader-border-color: currentcolor;--ds-auro-loader-color: currentcolor}`;
3390
+
3391
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3392
+ // See LICENSE in the project root for license information.
3393
+
3394
+
3395
+ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
3396
+ /**
3397
+ * The auro-loader element is an easy to use animated loader component.
3398
+ *
3399
+ * @attr {Boolean} pulse - sets loader type
3400
+ * @attr {Boolean} ringworm - sets loader type
3401
+ * @attr {Boolean} laser - sets loader type
3402
+ * @attr {Boolean} orbit - sets loader type
3403
+ * @attr {Boolean} white - sets color of loader to white
3404
+ * @attr {Boolean} ondark - sets color of loader to auro-color-ui-default-on-dark
3405
+ * @attr {Boolean} onlight - sets color of loader to auro-color-ui-default-on-light
3406
+ * @attr {Boolean} xs - sets size to extra small
3407
+ * @attr {Boolean} sm - sets size to small
3408
+ * @attr {Boolean} md - sets size to medium
3409
+ * @attr {Boolean} lg - sets size to large
3410
+ * @csspart element - apply style to adjust speed of animation
3411
+ */
3412
+
3413
+ // build the component class
3414
+ class AuroLoader extends r {
3415
+ constructor() {
3416
+ super();
3417
+
3418
+ /**
3419
+ * @private
3420
+ */
3421
+ this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
3422
+
3423
+ /**
3424
+ * @private
3425
+ */
3426
+ this.mdCount = 3;
3427
+
3428
+ /**
3429
+ * @private
3430
+ */
3431
+ this.smCount = 2;
3432
+
3433
+ /**
3434
+ * @private
3435
+ */
3436
+ this.runtimeUtils = new AuroLibraryRuntimeUtils();
3437
+
3438
+ this.orbit = false;
3439
+ this.ringworm = false;
3440
+ this.laser = false;
3441
+ this.pulse = false;
3442
+ }
3443
+
3444
+ // function to define props used within the scope of this component
3445
+ static get properties() {
3446
+ return {
3447
+ pulse: {
3448
+ type: Boolean,
3449
+ reflect: true
3450
+ },
3451
+ orbit: {
3452
+ type: Boolean,
3453
+ reflect: true
3454
+ },
3455
+ ringworm: {
3456
+ type: Boolean,
3457
+ reflect: true
3458
+ },
3459
+ laser: {
3460
+ type: Boolean,
3461
+ reflect: true
3462
+ }
3463
+ };
3464
+ }
3465
+
3466
+ static get styles() {
3467
+ return [
3468
+ i$2`${styleCss}`,
3469
+ i$2`${colorCss}`,
3470
+ i$2`${tokensCss}`
3471
+ ];
3472
+ }
3473
+
3474
+ /**
3475
+ * This will register this element with the browser.
3476
+ * @param {string} [name="auro-loader"] - The name of element that you want to register to.
3477
+ *
3478
+ * @example
3479
+ * AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
3480
+ *
3481
+ */
3482
+ static register(name = "auro-loader") {
3483
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroLoader);
3484
+ }
3485
+
3486
+ firstUpdated() {
3487
+ // Add the tag name as an attribute if it is different than the component name
3488
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
3489
+ }
3490
+
3491
+ connectedCallback() {
3492
+ super.connectedCallback();
3493
+ }
3494
+
3495
+ /**
3496
+ * @private
3497
+ * @returns {Array} Numbered array for template map.
3498
+ */
3499
+ defineTemplate() {
3500
+ let nodes = Array.from(Array(this.mdCount).keys());
3501
+
3502
+ if (this.orbit || this.laser) {
3503
+ nodes = Array.from(Array(this.smCount).keys());
3504
+ } else if (this.ringworm) {
3505
+ nodes = Array.from(Array(0).keys());
3506
+ }
3507
+
3508
+ return nodes;
3509
+ }
3510
+
3511
+ // When using auroElement, use the following attribute and function when hiding content from screen readers.
3512
+ // aria-hidden="${this.hideAudible(this.hiddenAudible)}"
3513
+
3514
+ // function that renders the HTML and CSS into the scope of the component
3515
+ render() {
3516
+ return x`
3517
+ ${this.defineTemplate().map((idx) => x`
3518
+ <span part="element" class="loader node-${idx}"></span>
3519
+ `)}
3520
+
3521
+ <div class="no-animation">Loading...</div>
3522
+
3523
+ ${this.ringworm ? x`
3524
+ <svg part="element" class="circular" viewBox="25 25 50 50">
3525
+ <circle class="path" cx="50" cy="50" r="20" fill="none"/>
3526
+ </svg>`
3527
+ : ``
3528
+ }
3529
+ `;
3530
+ }
3531
+ }
3532
+
3533
+ var loaderVersion = '3.1.1';
3534
+
3535
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
3536
+ // See LICENSE in the project root for license information.
3537
+
3538
+
3539
+ /**
3540
+ * @attr {Boolean} autofocus - This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user
3541
+ * @attr {Boolean} disabled - If set to true button will become disabled and not allow for interactions
3542
+ * @attr {Boolean} iconOnly - If set to true, the button will contain an icon with no additional content
3543
+ * @attr {Boolean} loading - If set to true button text will be replaced with `auro-loader` and become disabled
3544
+ * @attr {Boolean} onDark - Set value for on-dark version of auro-button
3545
+ * @attr {Boolean} rounded - If set to true, the button will have a rounded shape
3546
+ * @attr {Boolean} slim - Set value for slim version of auro-button
3547
+ * @attr {Boolean} fluid - Alters the shape of the button to be full width of its parent container
3548
+ * @attr {String} arialabel - Populates the `aria-label` attribute that is used to define a string that labels the current element. Use it in cases where a text label is not visible on the screen. If there is visible text labeling the element, use `aria-labelledby` instead.
3549
+ * @attr {String} arialabelledby - Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s), and its value should be one or more element IDs, which refer to elements that have the text needed for labeling. List multiple element IDs in a space delimited fashion.
3550
+ * @attr {String} id - Set the unique ID of an element.
3551
+ * @attr {String} title - Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
3552
+ * @attr {String} type - The type of the button. Possible values are: `submit`, `reset`, `button`
3553
+ * @attr {String} value - Defines the value associated with the button which is submitted with the form data.
3554
+ * @attr {String} variant - Sets button variant option. Possible values are: `secondary`, `tertiary`
3555
+ * @attr {Boolean} secondary - DEPRECATED
3556
+ * @attr {Boolean} tertiary - DEPRECATED
3557
+ * @prop {Boolean} ready - When false the component API should not be called.
3558
+ * @event auroButton-ready - Notifies that the component has finished initializing.
3559
+ * @slot - Default slot for the text of the button.
3560
+ * @slot icon - Slot to provide auro-icon for the button.
3561
+ * @csspart button - Apply CSS to HTML5 button.
3562
+ * @csspart loader - Apply CSS to auro-loader.
3563
+ * @csspart text - Apply CSS to text slot.
3564
+ * @csspart icon - Apply CSS to icon slot.
3565
+ */
3566
+
3567
+ /* eslint-disable lit/no-invalid-html, lit/binding-positions */
3568
+
3569
+ class AuroButton extends r {
3570
+
3571
+ constructor() {
3572
+ super();
3573
+ this.autofocus = false;
3574
+ this.disabled = false;
3575
+ this.iconOnly = false;
3576
+ this.loading = false;
3577
+ this.onDark = false;
3578
+ this.ready = false;
3579
+ this.secondary = false;
3580
+ this.tertiary = false;
3581
+ this.rounded = false;
3582
+ this.slim = false;
3583
+ this.fluid = false;
3584
+
3585
+ /**
3586
+ * Generate unique names for dependency components.
3587
+ */
3588
+ const versioning = new AuroDependencyVersioning();
3589
+
3590
+ /**
3591
+ * @private
3592
+ */
3593
+ this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
3594
+ }
3595
+
3596
+ static get styles() {
3597
+ return [
3598
+ tokensCss$1,
3599
+ styleCss$1,
3600
+ colorCss$1
3601
+ ];
3602
+ }
3603
+
3604
+ static get properties() {
3605
+ return {
3606
+ autofocus: {
3607
+ type: Boolean,
3608
+ reflect: true
3609
+ },
3610
+ disabled: {
3611
+ type: Boolean,
3612
+ reflect: true
3613
+ },
3614
+ secondary: {
3615
+ type: Boolean,
3616
+ reflect: true
3617
+ },
3618
+ tertiary: {
3619
+ type: Boolean,
3620
+ reflect: true
3621
+ },
3622
+ fluid: {
3623
+ type: Boolean,
3624
+ reflect: true
3625
+ },
3626
+ iconOnly: {
3627
+ type: Boolean,
3628
+ reflect: true
3629
+ },
3630
+ loading: {
3631
+ type: Boolean,
3632
+ reflect: true
3633
+ },
3634
+ onDark: {
3635
+ type: Boolean,
3636
+ reflect: true
3637
+ },
3638
+ rounded: {
3639
+ type: Boolean,
3640
+ reflect: true
3641
+ },
3642
+ slim: {
3643
+ type: Boolean,
3644
+ reflect: true
3645
+ },
3646
+ arialabel: {
3647
+ type: String,
3648
+ reflect: true
3649
+ },
3650
+ arialabelledby: {
3651
+ type: String,
3652
+ reflect: true
3653
+ },
3654
+ title: {
3655
+ type: String,
3656
+ reflect: true
3657
+ },
3658
+ type: {
3659
+ type: String,
3660
+ reflect: true
3661
+ },
3662
+ value: {
3663
+ type: String,
3664
+ reflect: true
3665
+ },
3666
+ variant: {
3667
+ type: String,
3668
+ reflect: true
3669
+ },
3670
+ ready: { type: Boolean },
3671
+ };
3672
+ }
3673
+
3674
+ /**
3675
+ * This will register this element with the browser.
3676
+ * @param {string} [name="auro-button"] - The name of element that you want to register to.
3677
+ *
3678
+ * @example
3679
+ * AuroButton.register("custom-button") // this will register this element to <custom-button/>
3680
+ *
3681
+ */
3682
+ static register(name = "auro-button") {
3683
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroButton);
3684
+ }
3685
+
3686
+ /**
3687
+ * Internal method to apply focus to the HTML5 button.
3688
+ * @private
3689
+ * @returns {void}
3690
+ */
3691
+ focus() {
3692
+ this.renderRoot.querySelector('button').focus();
3693
+ }
3694
+
3695
+ /**
3696
+ * Marks the component as ready and sends event.
3697
+ * @private
3698
+ * @returns {void}
3699
+ */
3700
+ notifyReady() {
3701
+ this.ready = true;
3702
+
3703
+ this.dispatchEvent(new CustomEvent('auroButton-ready', {
3704
+ bubbles: true,
3705
+ cancelable: false,
3706
+ composed: true,
3707
+ }));
3708
+ }
3709
+
3710
+ updated() {
3711
+ // support the old `secondary` and `tertiary` attributes` that are deprecated
3712
+ if (this.secondary) {
3713
+ this.setAttribute('variant', 'secondary');
3714
+ }
3715
+
3716
+ if (this.tertiary) {
3717
+ this.setAttribute('variant', 'tertiary');
3718
+ }
3719
+ }
3720
+
3721
+ firstUpdated() {
3722
+ this.notifyReady();
3723
+ }
3724
+
3725
+ render() {
3726
+ const classes = {
3727
+ 'util_insetLg--squish': true,
3728
+ 'auro-button': true,
3729
+ 'auroButton': true,
3730
+ 'auro-button--rounded': this.rounded,
3731
+ 'auro-button--slim': this.slim,
3732
+ 'auro-button--iconOnly': this.iconOnly,
3733
+ 'auro-button--iconOnlySlim': this.iconOnly && this.slim,
3734
+ 'loading': this.loading
3735
+ };
3736
+
3737
+ return u$3`
3738
+ <button
3739
+ part="button"
3740
+ aria-label="${o$2(this.arialabel ? this.arialabel : undefined)}"
3741
+ aria-labelledby="${o$2(this.arialabelledby ? this.arialabelledby : undefined)}"
3742
+ ?autofocus="${this.autofocus}"
3743
+ class="${e$2(classes)}"
3744
+ ?disabled="${this.disabled || this.loading}"
3745
+ ?onDark="${this.onDark}"
3746
+ title="${o$2(this.title ? this.title : undefined)}"
3747
+ name="${o$2(this.name ? this.name : undefined)}"
3748
+ type="${o$2(this.type ? this.type : undefined)}"
3749
+ variant="${o$2(this.variant ? this.variant : undefined)}"
3750
+ .value="${o$2(this.value ? this.value : undefined)}"
3751
+ @click="${() => {}}"
3752
+ >
3753
+ ${o$2(this.loading ? u$3`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
3754
+
3755
+ <span class="contentWrapper">
3756
+ <span class="textSlot" part="text">
3757
+ ${this.iconOnly ? undefined : u$3`<slot></slot>`}
3758
+ </span>
3759
+
3760
+ <span part="icon">
3761
+ <slot name="icon"></slot>
3762
+ </span>
3763
+ </span>
3764
+ </button>
3765
+ `;
3766
+ }
3767
+ }
3768
+
3769
+ var buttonVersion = '8.2.2';
3770
+
3771
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3772
+ // See LICENSE in the project root for license information.
3773
+
3774
+
3775
+ // build the component class
3776
+ class AuroInput extends BaseInput {
3777
+ constructor() {
3778
+ super();
3779
+
3780
+ /**
3781
+ * Generate unique names for dependency components.
3782
+ */
3783
+ const versioning = new AuroDependencyVersioning();
3784
+
3785
+ /**
3786
+ * @private
3787
+ */
3788
+ this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
3789
+
3790
+ /**
3791
+ * @private
3792
+ */
3793
+ this.buttonTag = versioning.generateTag('auro-button', buttonVersion, AuroButton);
3794
+ }
3795
+
3796
+ /**
3797
+ * This will register this element with the browser.
3798
+ * @param {string} [name="auro-input"] - The name of element that you want to register to.
3799
+ *
3800
+ * @example
3801
+ * AuroInput.register("custom-input") // this will register this element to <custom-input/>
3802
+ *
3803
+ */
3804
+ static register(name = "auro-input") {
3805
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroInput);
3806
+ }
3807
+
3808
+ /**
3809
+ * Function to determine if the input is meant to render an icon visualizing the input type.
3810
+ * @private
3811
+ * @returns {boolean} - Returns true if the input type is meant to render an icon.
3812
+ */
3813
+ hasTypeIcon() {
3814
+ const typesWithIcons = [
3815
+ 'month-day-year',
3816
+ 'month-year',
3817
+ 'year-month-day',
3818
+ 'month-fullYear',
3819
+ 'month',
3820
+ 'year',
3821
+ 'fullYear'
3822
+ ];
3823
+
3824
+ if (this.icon || typesWithIcons.includes(this.type)) {
3825
+ return true;
3826
+ }
3827
+
3828
+ return false;
3829
+ }
3830
+
3831
+ isDateType() {
3832
+ let isDateType = false;
3833
+
3834
+ switch (this.type) {
3835
+ case 'month-day-year':
3836
+ case 'month-year':
3837
+ case 'year-month-day':
3838
+ case 'month-fullYear':
3839
+ case 'month':
3840
+ case 'year':
3841
+ case 'fullYear':
3842
+ isDateType = true;
3843
+ break;
3844
+ }
3845
+
3846
+ return isDateType;
3847
+ }
3848
+
3849
+ // function that renders the HTML and CSS into the scope of the component
3850
+ render() {
3851
+ // is-disabled class - THIS IS ONLY HERE TO MAKE A TEST PASS AS FAR AS I CAN TELL
3852
+ const labelClasses = {
3853
+ 'is-disabled': this.disabled,
3854
+ 'withIcon': this.hasTypeIcon(),
3855
+ 'withValue': this.value && this.value.length > 0
3856
+ };
3857
+
3858
+ return u$3`
3859
+ <div class="wrapper" part="wrapper">
3860
+ <div class="main">
3861
+ <div class="typeIcon">
3862
+ ${this.type === 'credit-card' ? this.processCreditCard() : undefined}
3863
+
3864
+ <!-- The repeat() method is used below in order to force auro-icon to re-render when the name value is updated.
3865
+ This should be cleaned up when auro-icon issue #31 is resolved. -->
3866
+ ${this.inputIconName
3867
+ ? c$2([this.inputIconName], (val) => val, (name) => u$3`
3868
+ <${this.iconTag}
3869
+ class="accentIcon"
3870
+ category="payment"
3871
+ name="${name}"
3872
+ part="accentIcon"
3873
+ ?disabled="${this.disabled}">
3874
+ </${this.iconTag}>
3875
+ `) : undefined
3876
+ }
3877
+
3878
+ ${this.isDateType()
3879
+ ? u$3`
3880
+ <${this.iconTag}
3881
+ class="accentIcon"
3882
+ category="interface"
3883
+ name="calendar"
3884
+ part="accentIcon"
3885
+ ?disabled="${this.disabled}">
3886
+ </${this.iconTag}>`
3887
+ : undefined
3888
+ }
3889
+ </div>
3890
+ <label for=${this.id} class="${e$2(labelClasses)}" part="label">
3891
+ <slot name="label">
3892
+ ${this.label}
3893
+ </slot>
3894
+ ${this.required ? '' : ` (${i18n(this.lang, 'optional')})`}
3895
+ </label>
3896
+ <input
3897
+ @input="${this.handleInput}"
3898
+ @focusin="${this.handleFocusin}"
3899
+ @blur="${this.handleBlur}"
3900
+ id="${this.id}"
3901
+ name="${o$2(this.name)}"
3902
+ type="${this.type === 'password' && this.showPassword ? 'text' : this.getInputType(this.type)}"
3903
+ pattern="${o$2(this.definePattern())}"
3904
+ maxlength="${o$2(this.maxLength ? this.maxLength : undefined)}"
3905
+ minlength="${o$2(this.minLength ? this.minLength : undefined)}"
3906
+ inputMode="${o$2(this.inputMode ? this.inputMode : undefined)}"
3907
+ ?required="${this.required}"
3908
+ ?disabled="${this.disabled}"
3909
+ aria-describedby="${this.uniqueId}"
3910
+ aria-invalid="${this.validity !== 'valid'}"
3911
+ placeholder=${this.getPlaceholder()}
3912
+ lang="${o$2(this.lang)}"
3913
+ ?activeLabel="${this.activeLabel}"
3914
+ spellcheck="${o$2(this.spellcheck ? this.spellcheck : undefined)}"
3915
+ autocorrect="${o$2(this.autocorrect ? this.autocorrect : undefined)}"
3916
+ autocapitalize="${o$2(this.autocapitalize ? this.autocapitalize : undefined)}"
3917
+ autocomplete="${o$2(this.autocomplete ? this.autocomplete : undefined)}"
3918
+ part="input"
3919
+ />
3920
+ </div>
3921
+ <div
3922
+ class="notificationIcons"
3923
+ part="notificationIcons"
3924
+ ?hasValue="${this.hasValue}">
3925
+ ${this.validity && this.validity !== 'valid' ? u$3`
3926
+ <div class="notification alertNotification">
3927
+ <${this.iconTag}
3928
+ category="alert"
3929
+ name="error-stroke"
3930
+ error>
3931
+ </${this.iconTag}>
3932
+ </div>
3933
+ ` : undefined}
3934
+ ${this.hasValue ? u$3`
3935
+ ${this.type === 'password' ? u$3`
3936
+ <div class="notification">
3937
+ <${this.buttonTag}
3938
+ variant="flat"
3939
+ aria-hidden="true"
3940
+ tabindex="-1"
3941
+ @click="${this.handleClickShowPassword}"
3942
+ class="notificationBtn passwordBtn">
3943
+ <${this.iconTag}
3944
+ category="interface"
3945
+ name="hide-password-stroke"
3946
+ customColor
3947
+ ?hidden=${!this.showPassword}>
3948
+ </${this.iconTag}>
3949
+ <${this.iconTag}
3950
+ category="interface"
3951
+ name="view-password-stroke"
3952
+ customColor
3953
+ ?hidden=${this.showPassword}>
3954
+ </${this.iconTag}>
3955
+ </${this.buttonTag}>
3956
+ </div>
3957
+ ` : undefined}
3958
+ ${!this.disabled && !this.readonly ? u$3`
3959
+ <div class="notification">
3960
+ <${this.buttonTag}
3961
+ variant="flat"
3962
+ class="notificationBtn clearBtn"
3963
+ aria-hidden="true"
3964
+ tabindex="-1"
3965
+ @click="${this.handleClickClear}">
3966
+ <${this.iconTag}
3967
+ customColor
3968
+ category="interface"
3969
+ name="x-lg"
3970
+ >
3971
+ </${this.iconTag}>
3972
+ </${this.buttonTag}>
3973
+ </div>
3974
+ ` : undefined}
3975
+ ` : undefined}
3976
+ </div>
3977
+ </div>
3978
+ <!-- Help text and error message template -->
3979
+ ${!this.validity || this.validity === undefined || this.validity === 'valid'
3980
+ ? u$3`
3981
+ <p class="inputElement-helpText" id="${this.uniqueId}" part="helpText">
3982
+ <slot name="helptext">${this.getHelpText(this.type)}</slot>
3983
+ </p>`
3984
+ : u$3`
3985
+ <p class="inputElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
3986
+ ${this.errorMessage}
3987
+ </p>`
3988
+
3989
+ }
3990
+ `;
3991
+ }
3992
+ }
3993
+
3994
+ AuroInput.register();
3995
+ AuroInput.register('custom-input');
3996
+
3997
+ function initExamples(initCount) {
3998
+ initCount = initCount || 0;
3999
+
4000
+ try {
4001
+ changeLang();
4002
+ } catch (error) {
4003
+ if (initCount <= 20) {
4004
+ // setTimeout handles issue where content is sometimes loaded after the functions get called
4005
+ setTimeout(() => {
4006
+ initExamples(initCount + 1);
4007
+ }, 100);
4008
+ }
4009
+ }
4010
+ }
4011
+
4012
+ export { initExamples };