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