@aurodesignsystem/auro-formkit 2.0.0-beta.2 → 2.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/.turbo/cache/013a48308b893dac-meta.json +1 -1
  2. package/.turbo/cache/02244170c798a2bd-meta.json +1 -0
  3. package/.turbo/cache/02244170c798a2bd.tar.zst +0 -0
  4. package/.turbo/cache/051ff97a20add0e2-meta.json +1 -0
  5. package/.turbo/cache/051ff97a20add0e2.tar.zst +0 -0
  6. package/.turbo/cache/07ca42419b9f050c-meta.json +1 -1
  7. package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -1
  8. package/.turbo/cache/0ea853339c064fa1-meta.json +1 -0
  9. package/.turbo/cache/0ea853339c064fa1.tar.zst +0 -0
  10. package/.turbo/cache/16658beec9f4a809-meta.json +1 -0
  11. package/.turbo/cache/16658beec9f4a809.tar.zst +0 -0
  12. package/.turbo/cache/17259cf94d8f8925-meta.json +1 -1
  13. package/.turbo/cache/1b9818717e4bdf9f-meta.json +1 -0
  14. package/.turbo/cache/1b9818717e4bdf9f.tar.zst +0 -0
  15. package/.turbo/cache/1c0f580d37370ba2-meta.json +1 -0
  16. package/.turbo/cache/1c0f580d37370ba2.tar.zst +0 -0
  17. package/.turbo/cache/1c99a949ec63ab35-meta.json +1 -1
  18. package/.turbo/cache/1df4710eef8ed00d-meta.json +1 -0
  19. package/.turbo/cache/1df4710eef8ed00d.tar.zst +0 -0
  20. package/.turbo/cache/204b66d1b253e9cc-meta.json +1 -0
  21. package/.turbo/cache/204b66d1b253e9cc.tar.zst +0 -0
  22. package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -1
  23. package/.turbo/cache/2a5d0939d6fc1052-meta.json +1 -0
  24. package/.turbo/cache/2a5d0939d6fc1052.tar.zst +0 -0
  25. package/.turbo/cache/2e3b829fcf75c836-meta.json +1 -0
  26. package/.turbo/cache/2e3b829fcf75c836.tar.zst +0 -0
  27. package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -1
  28. package/.turbo/cache/3d380d0d40404cac-meta.json +1 -0
  29. package/.turbo/cache/3d380d0d40404cac.tar.zst +0 -0
  30. package/.turbo/cache/3e12285c614db539-meta.json +1 -0
  31. package/.turbo/cache/3e12285c614db539.tar.zst +0 -0
  32. package/.turbo/cache/45035bf5c4147ccd-meta.json +1 -1
  33. package/.turbo/cache/5bf2d3f7ba5891e0-meta.json +1 -0
  34. package/.turbo/cache/5bf2d3f7ba5891e0.tar.zst +0 -0
  35. package/.turbo/cache/5f304c0f37ef25f3-meta.json +1 -1
  36. package/.turbo/cache/64de7a53e02db647-meta.json +1 -1
  37. package/.turbo/cache/691a74627ec57993-meta.json +1 -1
  38. package/.turbo/cache/69aae513b7ec6c7d-meta.json +1 -1
  39. package/.turbo/cache/6dd67d179191bda8-meta.json +1 -0
  40. package/.turbo/cache/6dd67d179191bda8.tar.zst +0 -0
  41. package/.turbo/cache/6dd7058e6703cb35-meta.json +1 -1
  42. package/.turbo/cache/73e9073a5274616d-meta.json +1 -1
  43. package/.turbo/cache/773edc0f83c8c5a5-meta.json +1 -1
  44. package/.turbo/cache/786a822763403879-meta.json +1 -1
  45. package/.turbo/cache/7e1043cffa69f327-meta.json +1 -0
  46. package/.turbo/cache/7e1043cffa69f327.tar.zst +0 -0
  47. package/.turbo/cache/7ffd501e81790676-meta.json +1 -0
  48. package/.turbo/cache/7ffd501e81790676.tar.zst +0 -0
  49. package/.turbo/cache/80a13352066a9801-meta.json +1 -0
  50. package/.turbo/cache/80a13352066a9801.tar.zst +0 -0
  51. package/.turbo/cache/80b5d974184a01df-meta.json +1 -1
  52. package/.turbo/cache/8954c6073396fadd-meta.json +1 -1
  53. package/.turbo/cache/8e79bd5c3a16a72e-meta.json +1 -0
  54. package/.turbo/cache/8e9ebc3df0e18de0-meta.json +1 -0
  55. package/.turbo/cache/8e9ebc3df0e18de0.tar.zst +0 -0
  56. package/.turbo/cache/92daa6d7c389d548-meta.json +1 -1
  57. package/.turbo/cache/973d0eea26083f4b-meta.json +1 -0
  58. package/.turbo/cache/973d0eea26083f4b.tar.zst +0 -0
  59. package/.turbo/cache/9c6ad42729c7b2d8-meta.json +1 -0
  60. package/.turbo/cache/9c6ad42729c7b2d8.tar.zst +0 -0
  61. package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -1
  62. package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
  63. package/.turbo/cache/a9a9d012c83882d8-meta.json +1 -0
  64. package/.turbo/cache/a9a9d012c83882d8.tar.zst +0 -0
  65. package/.turbo/cache/b54fc4f664a7a5a0-meta.json +1 -1
  66. package/.turbo/cache/ba4418918621fbcd-meta.json +1 -1
  67. package/.turbo/cache/be7c23c37b8ec74b-meta.json +1 -1
  68. package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
  69. package/.turbo/cache/bffc7582905c2a5e-meta.json +1 -0
  70. package/.turbo/cache/bffc7582905c2a5e.tar.zst +0 -0
  71. package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +1 -1
  72. package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
  73. package/.turbo/cache/cc81de9c0b452a7c-meta.json +1 -1
  74. package/.turbo/cache/d572ebb3c833e8f4-meta.json +1 -0
  75. package/.turbo/cache/d572ebb3c833e8f4.tar.zst +0 -0
  76. package/.turbo/cache/d61543843c932504-meta.json +1 -0
  77. package/.turbo/cache/d61543843c932504.tar.zst +0 -0
  78. package/.turbo/cache/dad1301ac69bcb85-meta.json +1 -1
  79. package/.turbo/cache/db361cb6578dca84-meta.json +1 -0
  80. package/.turbo/cache/db361cb6578dca84.tar.zst +0 -0
  81. package/.turbo/cache/dea5945f55c6aba5-meta.json +1 -0
  82. package/.turbo/cache/dea5945f55c6aba5.tar.zst +0 -0
  83. package/.turbo/cache/e992dab20aeefbaf-meta.json +1 -1
  84. package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
  85. package/.turbo/cache/f3ff9040a2196834-meta.json +1 -0
  86. package/.turbo/cache/f3ff9040a2196834.tar.zst +0 -0
  87. package/.turbo/cache/f817d89688cefca8-meta.json +1 -0
  88. package/.turbo/cache/f817d89688cefca8.tar.zst +0 -0
  89. package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -1
  90. package/.turbo/cache/fc57c17867dcac3d-meta.json +1 -0
  91. package/.turbo/cache/fc57c17867dcac3d.tar.zst +0 -0
  92. package/CHANGELOG.md +44 -0
  93. package/components/checkbox/.turbo/turbo-build.log +3 -3
  94. package/components/checkbox/.turbo/turbo-bundler.log +3 -3
  95. package/components/checkbox/demo/api.md +4 -2
  96. package/components/checkbox/demo/api.min.js +31 -36
  97. package/components/checkbox/demo/index.min.js +31 -36
  98. package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
  99. package/components/checkbox/dist/index.js +31 -36
  100. package/components/checkbox/src/auro-checkbox-group.js +2 -2
  101. package/components/combobox/.turbo/turbo-build.log +3 -3
  102. package/components/combobox/demo/api.md +17 -15
  103. package/components/combobox/demo/api.min.js +500 -218
  104. package/components/combobox/demo/index.min.js +500 -218
  105. package/components/combobox/dist/auro-combobox.d.ts +11 -4
  106. package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
  107. package/components/combobox/dist/index.js +499 -217
  108. package/components/combobox/src/auro-combobox.js +22 -20
  109. package/components/counter/.turbo/turbo-build.log +3 -3
  110. package/components/counter/.turbo/turbo-bundler.log +3 -3
  111. package/components/datepicker/.turbo/turbo-build.log +9 -8
  112. package/components/datepicker/demo/api.md +107 -87
  113. package/components/datepicker/demo/api.min.js +492 -232
  114. package/components/datepicker/demo/index.min.js +492 -232
  115. package/components/datepicker/dist/auro-datepicker.d.ts +6 -13
  116. package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
  117. package/components/datepicker/dist/index.js +492 -232
  118. package/components/datepicker/src/auro-datepicker.js +15 -35
  119. package/components/dropdown/.turbo/turbo-build.log +3 -3
  120. package/components/dropdown/.turbo/turbo-bundler.log +2 -2
  121. package/components/dropdown/demo/api.md +4 -4
  122. package/components/dropdown/demo/api.min.js +166 -42
  123. package/components/dropdown/demo/index.min.js +166 -42
  124. package/components/dropdown/dist/auro-dropdown.d.ts +93 -34
  125. package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -1
  126. package/components/dropdown/dist/auro-dropdownBib.d.ts +9 -3
  127. package/components/dropdown/dist/auro-dropdownBib.d.ts.map +1 -1
  128. package/components/dropdown/dist/index.js +166 -42
  129. package/components/dropdown/src/auro-dropdown.js +154 -39
  130. package/components/dropdown/src/auro-dropdownBib.js +12 -3
  131. package/components/dropdown/src/styles/style-css.js +1 -1
  132. package/components/dropdown/src/styles/style.css +4 -0
  133. package/components/dropdown/src/styles/style.scss +5 -0
  134. package/components/form/.turbo/turbo-build.log +3 -3
  135. package/components/form/.turbo/turbo-bundler.log +3 -3
  136. package/components/input/.turbo/turbo-build$colon$sass.log +51 -1
  137. package/components/input/.turbo/turbo-build.log +56 -6
  138. package/components/input/.turbo/turbo-bundler.log +3 -3
  139. package/components/input/.turbo/turbo-sass$colon$render.log +6 -0
  140. package/components/input/demo/api.md +83 -81
  141. package/components/input/demo/api.min.js +282 -121
  142. package/components/input/demo/index.md +6 -6
  143. package/components/input/demo/index.min.js +282 -121
  144. package/components/input/dist/auro-input.d.ts.map +1 -1
  145. package/components/input/dist/base-input.d.ts +155 -84
  146. package/components/input/dist/base-input.d.ts.map +1 -1
  147. package/components/input/dist/index.js +282 -121
  148. package/components/input/dist/styles/mixins-css.d.ts +3 -0
  149. package/components/input/dist/styles/mixins-css.d.ts.map +1 -0
  150. package/components/input/src/auro-input.js +0 -1
  151. package/components/input/src/base-input.js +252 -85
  152. package/components/input/src/styles/borders.scss +3 -19
  153. package/components/input/src/styles/color.css +1 -2
  154. package/components/input/src/styles/color.scss +3 -10
  155. package/components/input/src/styles/input-css.js +1 -1
  156. package/components/input/src/styles/input.css +1 -1
  157. package/components/input/src/styles/input.scss +4 -1
  158. package/components/input/src/styles/label-css.js +1 -1
  159. package/components/input/src/styles/label.css +1 -1
  160. package/components/input/src/styles/label.scss +4 -7
  161. package/components/input/src/styles/mixins-css.js +2 -0
  162. package/components/input/src/styles/mixins.css +1 -0
  163. package/components/input/src/styles/mixins.scss +45 -0
  164. package/components/input/src/styles/notificationIcons-css.js +1 -1
  165. package/components/input/src/styles/notificationIcons.css +13 -12
  166. package/components/input/src/styles/notificationIcons.scss +17 -25
  167. package/components/input/src/styles/style-css.js +1 -1
  168. package/components/input/src/styles/style.css +15 -17
  169. package/components/input/src/styles/style.scss +0 -4
  170. package/components/menu/.turbo/turbo-build.log +3 -3
  171. package/components/menu/.turbo/turbo-bundler.log +3 -3
  172. package/components/menu/demo/api.min.js +1 -1
  173. package/components/menu/demo/index.min.js +1 -1
  174. package/components/menu/dist/auro-menu.d.ts +1 -1
  175. package/components/menu/dist/index.js +1 -1
  176. package/components/menu/src/auro-menu.js +1 -1
  177. package/components/radio/.turbo/turbo-build.log +3 -3
  178. package/components/radio/.turbo/turbo-bundler.log +3 -3
  179. package/components/radio/demo/api.md +3 -1
  180. package/components/radio/demo/api.min.js +30 -35
  181. package/components/radio/demo/index.min.js +30 -35
  182. package/components/radio/dist/index.js +30 -35
  183. package/components/radio/src/auro-radio-group.js +1 -1
  184. package/components/select/.turbo/turbo-build.log +7 -9
  185. package/components/select/demo/api.md +45 -110
  186. package/components/select/demo/api.min.js +320 -224
  187. package/components/select/demo/index.md +100 -43
  188. package/components/select/demo/index.min.js +320 -220
  189. package/components/select/dist/auro-select.d.ts +64 -51
  190. package/components/select/dist/auro-select.d.ts.map +1 -1
  191. package/components/select/dist/index.js +314 -201
  192. package/components/select/src/auro-select.js +100 -118
  193. package/components/select/src/styles/style-css.js +1 -1
  194. package/components/select/src/styles/style.css +7 -0
  195. package/components/select/src/styles/style.scss +11 -1
  196. package/package.json +1 -1
  197. package/packages/form-validation/src/validation.js +29 -34
  198. package/.turbo/cache/0663fcbb1d711029-meta.json +0 -1
  199. package/.turbo/cache/0663fcbb1d711029.tar.zst +0 -0
  200. package/.turbo/cache/0a2b0a4df8a0443f-meta.json +0 -1
  201. package/.turbo/cache/120c8e207aa1ba35-meta.json +0 -1
  202. package/.turbo/cache/120c8e207aa1ba35.tar.zst +0 -0
  203. package/.turbo/cache/17dd4bdef6550a07-meta.json +0 -1
  204. package/.turbo/cache/17dd4bdef6550a07.tar.zst +0 -0
  205. package/.turbo/cache/1de15d89eed2d760-meta.json +0 -1
  206. package/.turbo/cache/1de15d89eed2d760.tar.zst +0 -0
  207. package/.turbo/cache/2990aaa7ebc5b967-meta.json +0 -1
  208. package/.turbo/cache/2990aaa7ebc5b967.tar.zst +0 -0
  209. package/.turbo/cache/32c0b9995fb5f8dd-meta.json +0 -1
  210. package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
  211. package/.turbo/cache/47ba2b5ebdb579e9-meta.json +0 -1
  212. package/.turbo/cache/47ba2b5ebdb579e9.tar.zst +0 -0
  213. package/.turbo/cache/4f92cea2d8c63de2-meta.json +0 -1
  214. package/.turbo/cache/4f92cea2d8c63de2.tar.zst +0 -0
  215. package/.turbo/cache/56cb35d4c7473a23-meta.json +0 -1
  216. package/.turbo/cache/56cb35d4c7473a23.tar.zst +0 -0
  217. package/.turbo/cache/5c16ce3cff5c9dff-meta.json +0 -1
  218. package/.turbo/cache/5c16ce3cff5c9dff.tar.zst +0 -0
  219. package/.turbo/cache/626afdc67e0cb540-meta.json +0 -1
  220. package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
  221. package/.turbo/cache/6ef81cf9a66f982a-meta.json +0 -1
  222. package/.turbo/cache/6ef81cf9a66f982a.tar.zst +0 -0
  223. package/.turbo/cache/784c03fe9fd5ac05-meta.json +0 -1
  224. package/.turbo/cache/784c03fe9fd5ac05.tar.zst +0 -0
  225. package/.turbo/cache/87219c41a4ace9cd-meta.json +0 -1
  226. package/.turbo/cache/87219c41a4ace9cd.tar.zst +0 -0
  227. package/.turbo/cache/8b735250fa5a62bf-meta.json +0 -1
  228. package/.turbo/cache/8b735250fa5a62bf.tar.zst +0 -0
  229. package/.turbo/cache/9154e8fe6ab767ea-meta.json +0 -1
  230. package/.turbo/cache/9154e8fe6ab767ea.tar.zst +0 -0
  231. package/.turbo/cache/993dff2edb7b6766-meta.json +0 -1
  232. package/.turbo/cache/993dff2edb7b6766.tar.zst +0 -0
  233. package/.turbo/cache/9a097d6576dadd64-meta.json +0 -1
  234. package/.turbo/cache/9a097d6576dadd64.tar.zst +0 -0
  235. package/.turbo/cache/a49cc58242467fdc-meta.json +0 -1
  236. package/.turbo/cache/a49cc58242467fdc.tar.zst +0 -0
  237. package/.turbo/cache/a6a56bb802e1c20f-meta.json +0 -1
  238. package/.turbo/cache/a6a56bb802e1c20f.tar.zst +0 -0
  239. package/.turbo/cache/af061e7a077a9ba5-meta.json +0 -1
  240. package/.turbo/cache/af061e7a077a9ba5.tar.zst +0 -0
  241. package/.turbo/cache/b50f1b283b4b81cd-meta.json +0 -1
  242. package/.turbo/cache/b50f1b283b4b81cd.tar.zst +0 -0
  243. package/.turbo/cache/bf85bc040b7e64db-meta.json +0 -1
  244. package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
  245. package/.turbo/cache/cd5f6987783fb56d-meta.json +0 -1
  246. package/.turbo/cache/cd5f6987783fb56d.tar.zst +0 -0
  247. package/.turbo/cache/ce67b6522dd09e64-meta.json +0 -1
  248. package/.turbo/cache/ce67b6522dd09e64.tar.zst +0 -0
  249. package/.turbo/cache/d716cb7a08152beb-meta.json +0 -1
  250. package/.turbo/cache/d716cb7a08152beb.tar.zst +0 -0
  251. package/.turbo/cache/d7a47b77deb3d9a4-meta.json +0 -1
  252. package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
  253. package/.turbo/cache/fbbe2704bf9cb90b-meta.json +0 -1
  254. package/.turbo/cache/fbbe2704bf9cb90b.tar.zst +0 -0
  255. package/.turbo/cache/ff58f630c9d69af4-meta.json +0 -1
  256. package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
  257. /package/.turbo/cache/{0a2b0a4df8a0443f.tar.zst → 8e79bd5c3a16a72e.tar.zst} +0 -0
@@ -405,20 +405,20 @@ let AuroFormValidation$1 = class AuroFormValidation {
405
405
  const pattern = new RegExp(`^${elem.pattern}$`, 'u');
406
406
 
407
407
  if (!pattern.test(elem.value)) {
408
- elem.validity = 'badInput';
409
- elem.setCustomValidity = elem.setCustomValidityBadInput || '';
408
+ elem.validity = 'patternMismatch';
409
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
410
410
  }
411
411
  }
412
412
 
413
413
  // Length > 0 is required to prevent the error message from showing when the input is empty
414
414
  if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
415
415
  elem.validity = 'tooShort';
416
- elem.setCustomValidity = elem.setCustomValidityTooShort || '';
416
+ elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
417
417
  }
418
418
 
419
419
  if (elem.value?.length > elem.maxLength) {
420
420
  elem.validity = 'tooLong';
421
- elem.setCustomValidity = elem.setCustomValidityTooLong || '';
421
+ elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
422
422
  }
423
423
  }
424
424
 
@@ -434,33 +434,32 @@ let AuroFormValidation$1 = class AuroFormValidation {
434
434
  const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
435
435
 
436
436
  if (!elem.value.match(emailRegex)) {
437
- elem.validity = 'badInput';
438
- elem.setCustomValidity = elem.setCustomValidityForType || '';
437
+ elem.validity = 'patternMismatch';
438
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
439
439
  }
440
440
  } else if (elem.type === 'credit-card') {
441
441
  if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
442
442
  elem.validity = 'tooShort';
443
- elem.setCustomValidity = elem.setCustomValidityForType || '';
443
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
444
444
  }
445
445
  } else if (elem.type === 'number') {
446
446
  if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
447
447
  elem.validity = 'rangeOverflow';
448
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
448
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
449
449
  }
450
450
 
451
- if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
451
+ if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
452
452
  elem.validity = 'rangeUnderflow';
453
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
453
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
454
454
  }
455
-
456
455
  } else if (elem.type === 'month-day-year' ||
457
456
  elem.type === 'month-year' ||
458
457
  elem.type === 'month-fullYear' ||
459
458
  elem.type === 'year-month-day'
460
459
  ) {
461
- if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
460
+ if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
462
461
  elem.validity = 'tooShort';
463
- elem.setCustomValidity = elem.setCustomValidityForType || '';
462
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
464
463
  } else {
465
464
  const valueDate = new Date(elem.value);
466
465
 
@@ -470,7 +469,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
470
469
 
471
470
  if (valueDate > maxDate) {
472
471
  elem.validity = 'rangeOverflow';
473
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
472
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
474
473
  }
475
474
  }
476
475
 
@@ -480,7 +479,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
480
479
 
481
480
  if (valueDate < minDate) {
482
481
  elem.validity = 'rangeUnderflow';
483
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
482
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
484
483
  }
485
484
  }
486
485
  }
@@ -503,10 +502,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
503
502
 
504
503
  if (elem.hasAttribute('error')) {
505
504
  elem.validity = 'customError';
506
- elem.setCustomValidity = elem.error;
505
+ elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
507
506
  } else if (validationShouldRun) {
508
507
  elem.validity = 'valid';
509
- elem.setCustomValidity = '';
508
+ elem.errorMessage = '';
510
509
 
511
510
  /**
512
511
  * Only validate once we interact with the datepicker
@@ -518,7 +517,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
518
517
  let hasValue = elem.value && elem.value.length > 0;
519
518
 
520
519
  // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
521
- if (this.auroInputElements && this.auroInputElements.length === 2) {
520
+ if (this.auroInputElements?.length === 2) {
522
521
  if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
523
522
  hasValue = false;
524
523
  }
@@ -526,31 +525,27 @@ let AuroFormValidation$1 = class AuroFormValidation {
526
525
 
527
526
  if (!hasValue && elem.required) {
528
527
  elem.validity = 'valueMissing';
529
- elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
528
+ elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
530
529
  } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
531
530
  this.validateType(elem);
532
531
  this.validateAttributes(elem);
533
532
  }
534
533
  }
535
534
 
536
- if (this.auroInputElements && this.auroInputElements.length > 0) {
535
+ if (this.auroInputElements?.length > 0) {
537
536
  elem.validity = this.auroInputElements[0].validity;
538
- elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
537
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
539
538
 
540
- if (elem.validity === 'valid') {
541
- if (this.auroInputElements.length > 1) {
542
- elem.validity = this.auroInputElements[1].validity;
543
- elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
544
- }
539
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
540
+ elem.validity = this.auroInputElements[1].validity;
541
+ elem.errorMessage = this.auroInputElements[1].errorMessage;
545
542
  }
546
543
  }
547
544
 
548
545
  if (validationShouldRun || elem.hasAttribute('error')) {
549
- if (elem.validity && elem.validity !== 'valid') {
550
- // Use the validity message override if it is declared
551
- if (elem.ValidityMessageOverride) {
552
- elem.setCustomValidity = elem.ValidityMessageOverride;
553
- }
546
+ // Use the validity message override if it is declared
547
+ if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
548
+ elem.errorMessage = elem.ValidityMessageOverride;
554
549
  }
555
550
 
556
551
  this.getErrorMessage(elem);
@@ -596,18 +591,18 @@ let AuroFormValidation$1 = class AuroFormValidation {
596
591
  if (elem.validity !== 'valid') {
597
592
  if (elem.setCustomValidity) {
598
593
  elem.errorMessage = elem.setCustomValidity;
599
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
594
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
600
595
  const input = elem.renderRoot.querySelector('input');
601
596
 
602
597
  if (input.validationMessage.length > 0) {
603
598
  elem.errorMessage = input.validationMessage;
604
599
  }
605
- } else if (this.inputElements && this.inputElements.length > 0) {
600
+ } else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
606
601
  const firstInput = this.inputElements[0];
607
602
 
608
603
  if (firstInput.validationMessage.length > 0) {
609
604
  elem.errorMessage = firstInput.validationMessage;
610
- } else if (this.inputElements.length === 2) {
605
+ } else if (this.inputElements?.length === 2) {
611
606
  const secondInput = this.inputElements[1];
612
607
 
613
608
  if (secondInput.validationMessage.length > 0) {
@@ -13111,7 +13106,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
13111
13106
 
13112
13107
  var iconVersion$1 = '6.1.2';
13113
13108
 
13114
- var styleCss$1$1 = i$3$1`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);white-space:normal}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
13109
+ var styleCss$1$1 = i$3$1`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}.label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
13115
13110
 
13116
13111
  var colorCss$1$1 = i$3$1`.label{color:var(--ds-auro-dropdown-label-text-color)}.trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}.trigger:focus-within:not(:active){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);outline:1px solid var(--ds-color-border-ui-focus-default, #2c67b5)}.trigger:hover{--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}.helpText{color:var(--ds-auro-dropdown-help-text-color)}:host([disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-ui-disabled-default, #adadad);--ds-auro-dropdown-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host([common]),:host([bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-primary-default, #585e67)}:host([common]) .trigger:active,:host([common]) .trigger:focus-within,:host([bordered]) .trigger:active,:host([bordered]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host([error]){--ds-auro-dropdown-help-text-color: var(--ds-color-text-error-default, #cc1816);--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-error-default, #cc1816)}:host([error]) .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([error]) .trigger:focus-within,:host([error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}:host([error]) .trigger:active{box-shadow:none;outline:none}:host([disabled][common]),:host([disabled][bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}`;
13117
13112
 
@@ -13135,9 +13130,6 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
13135
13130
  ];
13136
13131
 
13137
13132
  /**
13138
- * @attr { Boolean } common - If declared, will apply all styles for the common theme.
13139
- * @attr { Boolean } rounded - If declared, will apply border-radius to the bib.
13140
- * @attr { Boolean } inset - If declared, will apply extra padding to bib content.
13141
13133
  * @prop { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
13142
13134
  * @csspart bibContainer - Apply css to the bib container.
13143
13135
  */
@@ -13163,14 +13155,26 @@ class AuroDropdownBib extends r$5 {
13163
13155
 
13164
13156
  static get properties() {
13165
13157
  return {
13158
+
13159
+ /**
13160
+ * If declared, will apply all styles for the common theme.
13161
+ */
13166
13162
  common: {
13167
13163
  type: Boolean,
13168
13164
  reflect: true
13169
13165
  },
13166
+
13167
+ /**
13168
+ * If declared, will apply extra padding to bib content.
13169
+ */
13170
13170
  inset: {
13171
13171
  type: Boolean,
13172
13172
  reflect: true
13173
13173
  },
13174
+
13175
+ /**
13176
+ * If declared, will apply border-radius to the bib.
13177
+ */
13174
13178
  rounded: {
13175
13179
  type: Boolean,
13176
13180
  reflect: true
@@ -13214,22 +13218,7 @@ if (!customElements.get("auro-dropdownbib")) {
13214
13218
 
13215
13219
 
13216
13220
  /**
13217
- * @attr { Boolean } bordered - If declared, applies a border around the trigger slot.
13218
- * @attr { Boolean } common - If declared, the dropdown will be styled with the common theme.
13219
- * @attr { Boolean } chevron - If declared, the dropdown displays an display state chevron on the right.
13220
- * @attr { Boolean } disabled - If declared, the dropdown is not interactive.
13221
13221
  * @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
13222
- * @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
13223
- * @attr {Boolean} fluid - Makes the trigger to be full width of its parent container
13224
- * @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
13225
- * @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
13226
- * @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
13227
- * @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
13228
- * @attr { Boolean } noToggle - If declared, the trigger will only show the dropdown bib.
13229
- * @attr { Boolean } focusShow - if declared, the bib will display when focus is applied to the trigger.
13230
- * @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
13231
- * @attr { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
13232
- * @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
13233
13222
  * @slot - Default slot for the popover content.
13234
13223
  * @slot label - Defines the content of the label.
13235
13224
  * @slot helpText - Defines the content of the helpText.
@@ -13267,6 +13256,16 @@ class AuroDropdown extends r$5 {
13267
13256
  this.tabIndex = 0;
13268
13257
  this.noToggle = false;
13269
13258
 
13259
+ /**
13260
+ * @private
13261
+ */
13262
+ this.hasTriggerContent = false;
13263
+
13264
+ /**
13265
+ * @private
13266
+ */
13267
+ this.triggerContentSlot = undefined;
13268
+
13270
13269
  /**
13271
13270
  * @private
13272
13271
  */
@@ -13313,89 +13312,166 @@ class AuroDropdown extends r$5 {
13313
13312
  // function to define props used within the scope of this component
13314
13313
  static get properties() {
13315
13314
  return {
13315
+
13316
+ /**
13317
+ * If declared, applies a border around the trigger slot.
13318
+ */
13316
13319
  bordered: {
13317
13320
  type: Boolean,
13318
13321
  reflect: true
13319
13322
  },
13323
+
13324
+ /**
13325
+ * If declared, the dropdown displays a chevron on the right.
13326
+ * @attr {Boolean} chevron
13327
+ */
13320
13328
  chevron: {
13321
13329
  type: Boolean,
13322
13330
  reflect: true
13323
13331
  },
13324
- disabled: {
13332
+
13333
+ /**
13334
+ * If declared, the dropdown will be styled with the common theme.
13335
+ */
13336
+ common: {
13325
13337
  type: Boolean,
13326
13338
  reflect: true
13327
13339
  },
13328
- error: {
13340
+
13341
+ /**
13342
+ * If declared, the dropdown is not interactive.
13343
+ */
13344
+ disabled: {
13329
13345
  type: Boolean,
13330
13346
  reflect: true
13331
13347
  },
13332
- fluid: {
13348
+
13349
+ /**
13350
+ * @private
13351
+ */
13352
+ dropdownWidth: {
13353
+ type: Number
13354
+ },
13355
+
13356
+ /**
13357
+ * If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
13358
+ */
13359
+ error: {
13333
13360
  type: Boolean,
13334
- reflect: true,
13361
+ reflect: true
13335
13362
  },
13363
+
13364
+ /**
13365
+ * If declared, the bib will display when focus is applied to the trigger.
13366
+ */
13336
13367
  focusShow: {
13337
13368
  type: Boolean,
13338
13369
  reflect: true
13339
13370
  },
13340
- hoverToggle: {
13371
+
13372
+ /**
13373
+ * Makes the trigger to be full width of its parent container.
13374
+ */
13375
+ fluid: {
13341
13376
  type: Boolean,
13342
13377
  reflect: true
13343
13378
  },
13379
+
13380
+ /**
13381
+ * If declared, will apply padding around trigger slot content.
13382
+ */
13344
13383
  inset: {
13345
13384
  type: Boolean,
13346
13385
  reflect: true
13347
13386
  },
13348
- matchWidth: {
13387
+
13388
+ /**
13389
+ * If true, the dropdown bib is displayed.
13390
+ */
13391
+ isPopoverVisible: {
13392
+ type: Boolean
13393
+ },
13394
+
13395
+ /**
13396
+ * If declared, the trigger will toggle the dropdown on mouseover/mouseout.
13397
+ */
13398
+ hoverToggle: {
13349
13399
  type: Boolean,
13350
13400
  reflect: true
13351
13401
  },
13352
- rounded: {
13353
- type: Boolean,
13402
+
13403
+ /**
13404
+ * @private
13405
+ */
13406
+ hasTriggerContent: {
13407
+ type: Boolean
13408
+ },
13409
+
13410
+ /**
13411
+ * Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
13412
+ */
13413
+ mobileFullscreenBreakpoint: {
13414
+ type: String,
13354
13415
  reflect: true
13355
13416
  },
13356
- common: {
13417
+
13418
+ /**
13419
+ * If declared, the popover and trigger will be set to the same width.
13420
+ */
13421
+ matchWidth: {
13357
13422
  type: Boolean,
13358
13423
  reflect: true
13359
13424
  },
13360
- noToggle: {
13425
+
13426
+ /**
13427
+ * If declared, the dropdown will not hide when moving focus outside the element.
13428
+ */
13429
+ noHideOnThisFocusLoss: {
13361
13430
  type: Boolean,
13362
13431
  reflect: true
13363
13432
  },
13364
- noHideOnThisFocusLoss: {
13433
+
13434
+ /**
13435
+ * If declared, the trigger will only show the dropdown bib.
13436
+ */
13437
+ noToggle: {
13365
13438
  type: Boolean,
13366
13439
  reflect: true
13367
13440
  },
13368
- isPopoverVisible: { type: Boolean },
13441
+
13369
13442
  onSlotChange: {
13370
13443
  type: Function,
13371
13444
  reflect: false
13372
13445
  },
13373
- mobileFullscreenBreakpoint: {
13374
- type: String,
13375
- reflect: true,
13376
- },
13377
13446
 
13378
13447
  /**
13379
13448
  * @private
13380
13449
  */
13381
- dropdownWidth: { type: Number },
13450
+ placement: {
13451
+ type: String
13452
+ },
13382
13453
 
13383
13454
  /**
13384
- * @private
13455
+ * If declared, will apply border-radius to trigger and default slots.
13385
13456
  */
13386
- placement: { type: String },
13457
+ rounded: {
13458
+ type: Boolean,
13459
+ reflect: true
13460
+ },
13387
13461
 
13388
13462
  /**
13389
13463
  * @private
13390
13464
  */
13391
- tabIndex: { type: Number }
13465
+ tabIndex: {
13466
+ type: Number
13467
+ }
13392
13468
  };
13393
13469
  }
13394
13470
 
13395
13471
  static get styles() {
13396
13472
  return [
13397
- styleCss$1$1,
13398
13473
  colorCss$1$1,
13474
+ styleCss$1$1,
13399
13475
  tokensCss$4
13400
13476
  ];
13401
13477
  }
@@ -13426,6 +13502,12 @@ class AuroDropdown extends r$5 {
13426
13502
  if (changedProperties.has('mobileFullscreenBreakpoint')) {
13427
13503
  this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
13428
13504
  }
13505
+
13506
+ // when trigger's content is changed without any attribute or node change,
13507
+ // `requestUpdate` needs to be called to update hasTriggerContnet
13508
+ if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
13509
+ this.handleTriggerContentSlotChange();
13510
+ }
13429
13511
  }
13430
13512
 
13431
13513
  firstUpdated() {
@@ -13468,6 +13550,43 @@ class AuroDropdown extends r$5 {
13468
13550
  return inCustomSlot;
13469
13551
  }
13470
13552
 
13553
+ /**
13554
+ * Handles changes to the trigger content slot and updates related properties.
13555
+ *
13556
+ * It first updates the floater settings
13557
+ * Then, it retrieves the assigned nodes from the event target and checks if any of
13558
+ * the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
13559
+ *
13560
+ * @private
13561
+ * @method handleTriggerContentSlotChange
13562
+ * @param {Event} event - native slotchange event
13563
+ * @returns {void}
13564
+ */
13565
+ handleTriggerContentSlotChange(event) {
13566
+ this.floater.handleTriggerTabIndex();
13567
+
13568
+ if (event) {
13569
+ this.triggerNode = event.target;
13570
+ this.triggerContentSlot = event.target.assignedNodes();
13571
+ }
13572
+
13573
+ if (this.triggerContentSlot) {
13574
+ this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
13575
+ if (slot.textContent.trim()) {
13576
+ return true;
13577
+ }
13578
+ const slotInSlot = slot.querySelector('slot');
13579
+ if (!slotInSlot) {
13580
+ return false;
13581
+ }
13582
+ const slotsInSlotNodes = slotInSlot.assignedNodes();
13583
+ return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
13584
+ });
13585
+ } else {
13586
+ this.hasTriggerContent = false;
13587
+ }
13588
+ }
13589
+
13471
13590
  /**
13472
13591
  * Handles the default slot change event and updates the content.
13473
13592
  *
@@ -13502,13 +13621,13 @@ class AuroDropdown extends r$5 {
13502
13621
  tabindex="${this.tabIndex}"
13503
13622
  >
13504
13623
  <div class="triggerContentWrapper">
13505
- <label class="label" id="triggerLabel">
13624
+ <label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
13506
13625
  <slot name="label"></slot>
13507
13626
  </label>
13508
13627
  <div class="triggerContent">
13509
13628
  <slot
13510
13629
  name="trigger"
13511
- @slotchange="${() => {this.floater.handleTriggerTabIndex(); }}"></slot>
13630
+ @slotchange="${(event) => this.handleTriggerContentSlotChange(event)}"></slot>
13512
13631
  </div>
13513
13632
  </div>
13514
13633
  ${this.chevron || this.common ? u$1$1`
@@ -13718,7 +13837,7 @@ const t=globalThis,e$1=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShad
13718
13837
  * SPDX-License-Identifier: BSD-3-Clause
13719
13838
  */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");
13720
13839
 
13721
- 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));opacity:0;pointer-events:none}:host .wrapper:hover .clearBtn,:host .wrapper:focus-within .clearBtn{opacity:1;pointer-events:auto}.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-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host([activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);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::-webkit-outer-spin-button,input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}input[type=number]{-moz-appearance:textfield;appearance:textfield}input:disabled{background:none;pointer-events:none}:host([bordered]) input{padding:var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem)}`;
13840
+ 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))}.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)}.clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}:host .wrapper:hover .clearBtn,:host .wrapper:focus-within .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));opacity:1}: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{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;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-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host([activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-text-body-size-xs, 0.75rem);transform:unset}:host{position:relative;display:block}.wrapper{display:flex;flex-direction:row}.main{display:flex;flex-direction:row;position:relative;flex:1}input{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);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;white-space:nowrap}input::-ms-reveal,input::-ms-clear{display:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}input[type=number]{-moz-appearance:textfield;appearance:textfield}input:disabled{background:none;pointer-events:none}:host([bordered]) input{padding:var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem)}`;
13722
13841
 
13723
13842
  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)}`;
13724
13843
 
@@ -15395,20 +15514,20 @@ class AuroFormValidation {
15395
15514
  const pattern = new RegExp(`^${elem.pattern}$`, 'u');
15396
15515
 
15397
15516
  if (!pattern.test(elem.value)) {
15398
- elem.validity = 'badInput';
15399
- elem.setCustomValidity = elem.setCustomValidityBadInput || '';
15517
+ elem.validity = 'patternMismatch';
15518
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
15400
15519
  }
15401
15520
  }
15402
15521
 
15403
15522
  // Length > 0 is required to prevent the error message from showing when the input is empty
15404
15523
  if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
15405
15524
  elem.validity = 'tooShort';
15406
- elem.setCustomValidity = elem.setCustomValidityTooShort || '';
15525
+ elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
15407
15526
  }
15408
15527
 
15409
15528
  if (elem.value?.length > elem.maxLength) {
15410
15529
  elem.validity = 'tooLong';
15411
- elem.setCustomValidity = elem.setCustomValidityTooLong || '';
15530
+ elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
15412
15531
  }
15413
15532
  }
15414
15533
 
@@ -15424,33 +15543,32 @@ class AuroFormValidation {
15424
15543
  const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
15425
15544
 
15426
15545
  if (!elem.value.match(emailRegex)) {
15427
- elem.validity = 'badInput';
15428
- elem.setCustomValidity = elem.setCustomValidityForType || '';
15546
+ elem.validity = 'patternMismatch';
15547
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
15429
15548
  }
15430
15549
  } else if (elem.type === 'credit-card') {
15431
15550
  if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
15432
15551
  elem.validity = 'tooShort';
15433
- elem.setCustomValidity = elem.setCustomValidityForType || '';
15552
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
15434
15553
  }
15435
15554
  } else if (elem.type === 'number') {
15436
15555
  if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
15437
15556
  elem.validity = 'rangeOverflow';
15438
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
15557
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
15439
15558
  }
15440
15559
 
15441
- if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
15560
+ if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
15442
15561
  elem.validity = 'rangeUnderflow';
15443
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
15562
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
15444
15563
  }
15445
-
15446
15564
  } else if (elem.type === 'month-day-year' ||
15447
15565
  elem.type === 'month-year' ||
15448
15566
  elem.type === 'month-fullYear' ||
15449
15567
  elem.type === 'year-month-day'
15450
15568
  ) {
15451
- if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
15569
+ if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
15452
15570
  elem.validity = 'tooShort';
15453
- elem.setCustomValidity = elem.setCustomValidityForType || '';
15571
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
15454
15572
  } else {
15455
15573
  const valueDate = new Date(elem.value);
15456
15574
 
@@ -15460,7 +15578,7 @@ class AuroFormValidation {
15460
15578
 
15461
15579
  if (valueDate > maxDate) {
15462
15580
  elem.validity = 'rangeOverflow';
15463
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
15581
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
15464
15582
  }
15465
15583
  }
15466
15584
 
@@ -15470,7 +15588,7 @@ class AuroFormValidation {
15470
15588
 
15471
15589
  if (valueDate < minDate) {
15472
15590
  elem.validity = 'rangeUnderflow';
15473
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
15591
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
15474
15592
  }
15475
15593
  }
15476
15594
  }
@@ -15493,10 +15611,10 @@ class AuroFormValidation {
15493
15611
 
15494
15612
  if (elem.hasAttribute('error')) {
15495
15613
  elem.validity = 'customError';
15496
- elem.setCustomValidity = elem.error;
15614
+ elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
15497
15615
  } else if (validationShouldRun) {
15498
15616
  elem.validity = 'valid';
15499
- elem.setCustomValidity = '';
15617
+ elem.errorMessage = '';
15500
15618
 
15501
15619
  /**
15502
15620
  * Only validate once we interact with the datepicker
@@ -15508,7 +15626,7 @@ class AuroFormValidation {
15508
15626
  let hasValue = elem.value && elem.value.length > 0;
15509
15627
 
15510
15628
  // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
15511
- if (this.auroInputElements && this.auroInputElements.length === 2) {
15629
+ if (this.auroInputElements?.length === 2) {
15512
15630
  if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
15513
15631
  hasValue = false;
15514
15632
  }
@@ -15516,31 +15634,27 @@ class AuroFormValidation {
15516
15634
 
15517
15635
  if (!hasValue && elem.required) {
15518
15636
  elem.validity = 'valueMissing';
15519
- elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
15637
+ elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
15520
15638
  } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
15521
15639
  this.validateType(elem);
15522
15640
  this.validateAttributes(elem);
15523
15641
  }
15524
15642
  }
15525
15643
 
15526
- if (this.auroInputElements && this.auroInputElements.length > 0) {
15644
+ if (this.auroInputElements?.length > 0) {
15527
15645
  elem.validity = this.auroInputElements[0].validity;
15528
- elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
15646
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
15529
15647
 
15530
- if (elem.validity === 'valid') {
15531
- if (this.auroInputElements.length > 1) {
15532
- elem.validity = this.auroInputElements[1].validity;
15533
- elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
15534
- }
15648
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
15649
+ elem.validity = this.auroInputElements[1].validity;
15650
+ elem.errorMessage = this.auroInputElements[1].errorMessage;
15535
15651
  }
15536
15652
  }
15537
15653
 
15538
15654
  if (validationShouldRun || elem.hasAttribute('error')) {
15539
- if (elem.validity && elem.validity !== 'valid') {
15540
- // Use the validity message override if it is declared
15541
- if (elem.ValidityMessageOverride) {
15542
- elem.setCustomValidity = elem.ValidityMessageOverride;
15543
- }
15655
+ // Use the validity message override if it is declared
15656
+ if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
15657
+ elem.errorMessage = elem.ValidityMessageOverride;
15544
15658
  }
15545
15659
 
15546
15660
  this.getErrorMessage(elem);
@@ -15586,18 +15700,18 @@ class AuroFormValidation {
15586
15700
  if (elem.validity !== 'valid') {
15587
15701
  if (elem.setCustomValidity) {
15588
15702
  elem.errorMessage = elem.setCustomValidity;
15589
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
15703
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
15590
15704
  const input = elem.renderRoot.querySelector('input');
15591
15705
 
15592
15706
  if (input.validationMessage.length > 0) {
15593
15707
  elem.errorMessage = input.validationMessage;
15594
15708
  }
15595
- } else if (this.inputElements && this.inputElements.length > 0) {
15709
+ } else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
15596
15710
  const firstInput = this.inputElements[0];
15597
15711
 
15598
15712
  if (firstInput.validationMessage.length > 0) {
15599
15713
  elem.errorMessage = firstInput.validationMessage;
15600
- } else if (this.inputElements.length === 2) {
15714
+ } else if (this.inputElements?.length === 2) {
15601
15715
  const secondInput = this.inputElements[1];
15602
15716
 
15603
15717
  if (secondInput.validationMessage.length > 0) {
@@ -15618,42 +15732,8 @@ class AuroFormValidation {
15618
15732
  /**
15619
15733
  * Auro-input provides users a way to enter data into a text field.
15620
15734
  *
15621
- * @attr {Boolean} activeLabel - If set, the label will remain fixed in the active position.
15622
- * @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]
15623
- * @attr {String} autocomplete - An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
15624
- * @attr {String} autocorrect - When set to `off`, stops iOS from auto correcting words when typed into a text box.
15625
15735
  * @attr {Boolean} bordered - Applies bordered UI variant.
15626
15736
  * @attr {Boolean} borderless - Applies borderless UI variant.
15627
- * @attr {Boolean} disabled - If set, disables the input.
15628
- * @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
15629
- * @prop {String} errorMessage - Contains the help text message for the current validity error.
15630
- * @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.
15631
- * @attr {String} id - Sets the unique ID of the element.
15632
- * @attr {String} lang - defines the language of an element.
15633
- * @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
15634
- * @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.
15635
- * @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
15636
- * @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`.
15637
- * @attr {String} name - Populates the `name` attribute on the input.
15638
- * @attr {Boolean} noValidate - If set, disables auto-validation on blur.
15639
- * @attr {Boolean} readonly - Makes the input read-only, but can be set programmatically.
15640
- * @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
15641
- * @attr {String} pattern - Specifies a regular expression the form control's value should match.
15642
- * @attr {String} placeholder - Define custom placeholder text, only supported by date input formats.
15643
- * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
15644
- * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
15645
- * @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
15646
- * @attr {String} setCustomValidityBadInput - Custom help text message to display when validity = `badInput`.
15647
- * @attr {String} setCustomValidityTooShort - Custom help text message to display when validity = `tooShort`.
15648
- * @attr {String} setCustomValidityTooLong - Custom help text message to display when validity = `tooLong`.
15649
- * @attr {String} setCustomValidityForType - Custom help text message to display for the declared element `type` and type validity fails.
15650
- * @attr {String} setCustomValidityRangeOverflow - Custom help text message to display when validity = `rangeOverflow`.
15651
- * @attr {String} setCustomValidityRangeUnderflow - Custom help text message to display when validity = `rangeUnderflow`.
15652
- * @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`.
15653
- * @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`.
15654
- * @attr {Boolean} validateOnInput - Sets validation mode to re-eval with each input.
15655
- * @attr {String} validity - Specifies the `validityState` this element is in.
15656
- * @attr {String} value - Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
15657
15737
  *
15658
15738
  * @slot helptext - Sets the help text displayed below the input.
15659
15739
  * @slot label - Sets the label text for the input.
@@ -15745,71 +15825,272 @@ class BaseInput extends r {
15745
15825
  .substring(idSubstrStart, idSubstrEnd);
15746
15826
  }
15747
15827
 
15748
- // function to define props used within the scope of this component
15828
+ // function to define props used within the scope of this componentstatic
15749
15829
  static get properties() {
15750
15830
  return {
15751
- id: { type: String },
15752
- name: { type: String },
15753
- type: { type: String,
15754
- reflect: true },
15755
- value: { type: String },
15756
- lang: { type: String },
15757
- pattern: {
15831
+
15832
+ /**
15833
+ * If set, the label will remain fixed in the active position.
15834
+ */
15835
+ activeLabel: {
15836
+ type: Boolean,
15837
+ reflect: true
15838
+ },
15839
+
15840
+ /**
15841
+ * 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]
15842
+ */
15843
+ autocapitalize: {
15844
+ type: String
15845
+ },
15846
+
15847
+ /**
15848
+ * An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
15849
+ */
15850
+ autocomplete: {
15758
15851
  type: String,
15759
15852
  reflect: true
15760
15853
  },
15761
- icon: { type: Boolean },
15762
- disabled: { type: Boolean },
15763
- required: { type: Boolean },
15764
- noValidate: { type: Boolean },
15765
- spellcheck: { type: String },
15766
- autocorrect: { type: String },
15767
- autocapitalize: { type: String },
15768
- autocomplete: {
15854
+
15855
+ /**
15856
+ * When set to `off`, stops iOS from auto-correcting words when typed into a text box.
15857
+ */
15858
+ autocorrect: {
15859
+ type: String
15860
+ },
15861
+
15862
+ /**
15863
+ * If set, disables the input.
15864
+ */
15865
+ disabled: {
15866
+ type: Boolean
15867
+ },
15868
+
15869
+ error: {
15769
15870
  type: String,
15770
15871
  reflect: true
15771
15872
  },
15772
- placeholder: { type: String },
15773
- activeLabel: {
15774
- type: Boolean,
15873
+
15874
+ /**
15875
+ * Contains the help text message for the current validity error.
15876
+ */
15877
+ errorMessage: {
15878
+ type: String
15879
+ },
15880
+
15881
+ /**
15882
+ * 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.
15883
+ */
15884
+ icon: {
15885
+ type: Boolean
15886
+ },
15887
+
15888
+ /**
15889
+ * Sets the unique ID of the element.
15890
+ */
15891
+ id: {
15892
+ type: String
15893
+ },
15894
+
15895
+ /**
15896
+ * Defines the language of an element.
15897
+ */
15898
+ lang: {
15899
+ type: String
15900
+ },
15901
+
15902
+ /**
15903
+ * The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
15904
+ */
15905
+ max: {
15906
+ type: String
15907
+ },
15908
+
15909
+ /**
15910
+ * The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
15911
+ */
15912
+ maxLength: {
15913
+ type: Number
15914
+ },
15915
+
15916
+ /**
15917
+ * The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
15918
+ */
15919
+ min: {
15920
+ type: String
15921
+ },
15922
+
15923
+ /**
15924
+ * The minimum number of characters the user can enter into the text input. This must be a non-negative integer value smaller than or equal to the value specified by `maxlength`.
15925
+ */
15926
+ minLength: {
15927
+ type: Number
15928
+ },
15929
+
15930
+ /**
15931
+ * Populates the `name` attribute on the input.
15932
+ */
15933
+ name: {
15934
+ type: String
15935
+ },
15936
+
15937
+ /**
15938
+ * If set, disables auto-validation on blur.
15939
+ */
15940
+ noValidate: {
15941
+ type: Boolean
15942
+ },
15943
+
15944
+ /**
15945
+ * Specifies a regular expression the form control's value should match.
15946
+ */
15947
+ pattern: {
15948
+ type: String,
15775
15949
  reflect: true
15776
15950
  },
15777
- max: { type: String },
15778
- min: { type: String },
15779
- maxLength: { type: Number },
15780
- minLength: { type: Number },
15951
+
15952
+ /**
15953
+ * Define custom placeholder text, only supported by date input formats.
15954
+ */
15955
+ placeholder: {
15956
+ type: String
15957
+ },
15958
+
15959
+ /**
15960
+ * Makes the input read-only, but can be set programmatically.
15961
+ */
15962
+ readonly: {
15963
+ type: Boolean
15964
+ },
15965
+
15966
+ /**
15967
+ * Populates the `required` attribute on the input. Used for client-side validation.
15968
+ */
15969
+ required: {
15970
+ type: Boolean
15971
+ },
15781
15972
 
15782
15973
  /**
15783
15974
  * @ignore
15784
15975
  */
15785
- showPassword: { state: true },
15786
- validateOnInput: { type: Boolean },
15787
- readonly: { type: Boolean },
15788
- error: {
15976
+ showPassword: {
15977
+ state: true
15978
+ },
15979
+
15980
+ /**
15981
+ * Sets a custom help text message to display for all validityStates.
15982
+ */
15983
+ setCustomValidity: {
15984
+ type: String
15985
+ },
15986
+
15987
+ /**
15988
+ * Custom help text message to display when validity = `badInput`.
15989
+ */
15990
+ setCustomValidityBadInput: {
15991
+ type: String
15992
+ },
15993
+
15994
+ /**
15995
+ * Custom help text message to display when validity = `customError`.
15996
+ */
15997
+ setCustomValidityCustomError: {
15998
+ type: String
15999
+ },
16000
+
16001
+ /**
16002
+ * Custom help text message to display for the declared element `type` and type validity fails.
16003
+ */
16004
+ setCustomValidityForType: {
16005
+ type: String
16006
+ },
16007
+
16008
+ /**
16009
+ * Custom help text message to display when validity = `rangeOverflow`.
16010
+ */
16011
+ setCustomValidityRangeOverflow: {
16012
+ type: String
16013
+ },
16014
+
16015
+ /**
16016
+ * Custom help text message to display when validity = `rangeUnderflow`.
16017
+ */
16018
+ setCustomValidityRangeUnderflow: {
16019
+ type: String
16020
+ },
16021
+
16022
+ /**
16023
+ * Custom help text message to display when validity = `tooLong`.
16024
+ */
16025
+ setCustomValidityTooLong: {
16026
+ type: String
16027
+ },
16028
+
16029
+ /**
16030
+ * Custom help text message to display when validity = `tooShort`.
16031
+ */
16032
+ setCustomValidityTooShort: {
16033
+ type: String
16034
+ },
16035
+
16036
+ /**
16037
+ * Custom help text message to display when validity = `valueMissing`.
16038
+ */
16039
+ setCustomValidityValueMissing: {
16040
+ type: String
16041
+ },
16042
+
16043
+ /**
16044
+ * Custom help text message for email type validity.
16045
+ */
16046
+ customValidityTypeEmail: {
16047
+ type: String
16048
+ },
16049
+
16050
+ /**
16051
+ * 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`.
16052
+ */
16053
+ spellcheck: {
16054
+ type: String
16055
+ },
16056
+
16057
+ /**
16058
+ * 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`.
16059
+ */
16060
+ type: {
15789
16061
  type: String,
15790
16062
  reflect: true
15791
16063
  },
15792
- errorMessage: { type: String },
15793
- validity: {
16064
+
16065
+ /**
16066
+ * Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
16067
+ */
16068
+ value: {
16069
+ type: String
16070
+ },
16071
+
16072
+ /**
16073
+ * Sets validation mode to re-eval with each input.
16074
+ */
16075
+ validateOnInput: {
16076
+ type: Boolean
16077
+ },
16078
+
16079
+ /**
16080
+ * Specifies the `validityState` this element is in.
16081
+ */
16082
+ validity: {
15794
16083
  type: String,
15795
16084
  reflect: true
15796
- },
15797
- setCustomValidity: { type: String },
15798
- setCustomValidityCustomError: { type: String },
15799
- setCustomValidityValueMissing: { type: String },
15800
- setCustomValidityBadInput: { type: String },
15801
- setCustomValidityTooShort: { type: String },
15802
- setCustomValidityTooLong: { type: String },
15803
- setCustomValidityRangeOverflow: { type: String},
15804
- setCustomValidityRangeUnderflow: { type: String},
15805
- customValidityTypeEmail: { type: String }
16085
+ }
15806
16086
  };
15807
16087
  }
15808
16088
 
16089
+
15809
16090
  static get styles() {
15810
16091
  return [
15811
- i$2`${styleCss$3}`,
15812
16092
  i$2`${colorCss$3}`,
16093
+ i$2`${styleCss$3}`,
15813
16094
  i$2`${tokensCss$3}`
15814
16095
  ];
15815
16096
  }
@@ -16430,7 +16711,7 @@ class BaseInput extends r {
16430
16711
  this.maxLength = card.formatLength;
16431
16712
  this.minLength = card.formatMinLength;
16432
16713
 
16433
- this.setCustomValidity = card.setCustomValidity;
16714
+ this.errorMessage = card.errorMessage;
16434
16715
 
16435
16716
  if (this.icon) {
16436
16717
  this.inputIconName = card.cardIcon;
@@ -16450,63 +16731,63 @@ class BaseInput extends r {
16450
16731
  name: 'Airlines',
16451
16732
  regex: /^(?<num>1|2)\d{0}/u,
16452
16733
  formatMinLength: 17,
16453
- setCustomValidity: CreditCardValidationMessage,
16734
+ errorMessage: CreditCardValidationMessage,
16454
16735
  cardIcon: 'credit-card'
16455
16736
  },
16456
16737
  {
16457
16738
  name: 'Commercial',
16458
16739
  regex: /^(?<num>2)\d{0}/u,
16459
16740
  formatMinLength: 8,
16460
- setCustomValidity: CreditCardValidationMessage,
16741
+ errorMessage: CreditCardValidationMessage,
16461
16742
  cardIcon: 'credit-card'
16462
16743
  },
16463
16744
  {
16464
16745
  name: 'Alaska Commercial',
16465
16746
  regex: /^(?<num>27)\d{0}/u,
16466
16747
  formatMinLength: 8,
16467
- setCustomValidity: CreditCardValidationMessage,
16748
+ errorMessage: CreditCardValidationMessage,
16468
16749
  cardIcon: 'cc-alaska'
16469
16750
  },
16470
16751
  {
16471
16752
  name: 'American Express',
16472
16753
  regex: /^(?<num>34|37)\d{0}/u,
16473
16754
  formatLength: 17,
16474
- setCustomValidity: CreditCardValidationMessage,
16755
+ errorMessage: CreditCardValidationMessage,
16475
16756
  cardIcon: 'cc-amex'
16476
16757
  },
16477
16758
  {
16478
16759
  name: 'Diners club',
16479
16760
  regex: /^(?<num>36|38)\d{0}/u,
16480
16761
  formatLength: 16,
16481
- setCustomValidity: CreditCardValidationMessage,
16762
+ errorMessage: CreditCardValidationMessage,
16482
16763
  cardIcon: 'credit-card'
16483
16764
  },
16484
16765
  {
16485
16766
  name: 'Visa',
16486
16767
  regex: /^(?<num>4)\d{0}/u,
16487
16768
  formatLength: 19,
16488
- setCustomValidity: CreditCardValidationMessage,
16769
+ errorMessage: CreditCardValidationMessage,
16489
16770
  cardIcon: 'cc-visa'
16490
16771
  },
16491
16772
  {
16492
16773
  name: 'Alaska Airlines Visa',
16493
16774
  regex: /^(?<num>4147\s34|4888\s93|4800\s11|4313\s51|4313\s07)\d{0}/u,
16494
16775
  formatLength: 19,
16495
- setCustomValidity: CreditCardValidationMessage,
16776
+ errorMessage: CreditCardValidationMessage,
16496
16777
  cardIcon: 'cc-alaska'
16497
16778
  },
16498
16779
  {
16499
16780
  name: 'Master Card',
16500
16781
  regex: /^(?<num>5)\d{0}/u,
16501
16782
  formatLength: 19,
16502
- setCustomValidity: CreditCardValidationMessage,
16783
+ errorMessage: CreditCardValidationMessage,
16503
16784
  cardIcon: 'cc-mastercard'
16504
16785
  },
16505
16786
  {
16506
16787
  name: 'Discover Card',
16507
16788
  regex: /^(?<num>6)\d{0}/u,
16508
16789
  formatLength: 19,
16509
- setCustomValidity: CreditCardValidationMessage,
16790
+ errorMessage: CreditCardValidationMessage,
16510
16791
  cardIcon: 'cc-discover'
16511
16792
  }
16512
16793
  ];
@@ -16514,7 +16795,7 @@ class BaseInput extends r {
16514
16795
  let type = {
16515
16796
  name: 'Default Card',
16516
16797
  formatLength: 19,
16517
- setCustomValidity: CreditCardValidationMessage,
16798
+ errorMessage: CreditCardValidationMessage,
16518
16799
  cardIcon: 'credit-card'
16519
16800
  };
16520
16801
 
@@ -17539,7 +17820,6 @@ class AuroInput extends BaseInput {
17539
17820
  <p class="inputElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
17540
17821
  ${this.errorMessage}
17541
17822
  </p>`
17542
-
17543
17823
  }
17544
17824
  `;
17545
17825
  }
@@ -17557,9 +17837,10 @@ var inputVersion = '4.2.0';
17557
17837
  /**
17558
17838
  * @prop {String} value - Value selected for the date picker.
17559
17839
  * @prop {String} valueEnd - Value selected for the second date picker when using date range.
17560
- * @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
17840
+ * @attr {String} error - When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
17561
17841
  * @attr {String} validity - Specifies the `validityState` this element is in.
17562
17842
  * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
17843
+ * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
17563
17844
  * @attr {String} setCustomValidityRangeUnderflow - Custom help text message to display when validity = `rangeUnderflow`.
17564
17845
  * @attr {String} setCustomValidityRangeOverflow - Custom help text message to display when validity = `rangeOverflow`.
17565
17846
  * @attr {String} setCustomValidityValueMissing - Help text message to display when validity = `valueMissing`.
@@ -17689,19 +17970,18 @@ class AuroDatePicker extends r$7 {
17689
17970
  },
17690
17971
  setCustomValidity: {
17691
17972
  type: String,
17692
- reflect: true
17973
+ },
17974
+ setCustomValidityCustomError: {
17975
+ type: String,
17693
17976
  },
17694
17977
  setCustomValidityRangeUnderflow: {
17695
17978
  type: String,
17696
- reflect: true
17697
17979
  },
17698
17980
  setCustomValidityRangeOverflow: {
17699
17981
  type: String,
17700
- reflect: true
17701
17982
  },
17702
17983
  setCustomValidityValueMissing: {
17703
17984
  type: String,
17704
- reflect: true
17705
17985
  },
17706
17986
  validity: {
17707
17987
  type: String,
@@ -17896,30 +18176,6 @@ class AuroDatePicker extends r$7 {
17896
18176
  return dateStr;
17897
18177
  }
17898
18178
 
17899
- /**
17900
- * Return appropriate error message.
17901
- * @param {Object} evt - Event passed in from auro-input when the event triggered this function.
17902
- * @private
17903
- */
17904
- getErrorMessage(evt) {
17905
- if (evt) {
17906
- const inputClass = evt.target.getAttribute('class');
17907
- if (inputClass === 'dateFrom') {
17908
- if (this.inputList[0].validity && this.inputList[0].validity !== 'valid') {
17909
- this.errorMessage = evt.target.errorMessage;
17910
- } else {
17911
- this.errorMessage = undefined;
17912
- }
17913
- }
17914
-
17915
- if (inputClass === 'dateTo') {
17916
- if (!this.errorMessage && this.inputList[1].validity && this.inputList[1].validity !== 'valid') {
17917
- this.errorMessage = evt.target.errorMessage;
17918
- }
17919
- }
17920
- }
17921
- }
17922
-
17923
18179
  /**
17924
18180
  * Changes the calendar's visibility to reflect the value of the central date attribute.
17925
18181
  * @private
@@ -18028,13 +18284,13 @@ class AuroDatePicker extends r$7 {
18028
18284
  input.addEventListener('auroFormElement-validated', (evt) => {
18029
18285
  if (evt.detail.validity === 'customError') {
18030
18286
  this.validity = evt.detail.validity;
18031
- this.setCustomValidity = evt.detail.message;
18287
+ this.errorMessage = evt.detail.message;
18032
18288
  } else if (evt.target === this.inputList[0]) {
18033
18289
  this.validity = evt.detail.validity;
18034
- this.setCustomValidity = evt.detail.message;
18290
+ this.errorMessage = evt.detail.message;
18035
18291
  } else if (this.inputList.length > 1 && evt.target === this.inputList[1] && (this.inputList[0].validity === 'valid' || this.inputList[0].validity === undefined)) {
18036
18292
  this.validity = evt.detail.validity;
18037
- this.setCustomValidity = evt.detail.message;
18293
+ this.errorMessage = evt.detail.message;
18038
18294
  }
18039
18295
  });
18040
18296
  });
@@ -18324,7 +18580,7 @@ class AuroDatePicker extends r$7 {
18324
18580
  // This is done to prevent error icon from displaying on both inputs in range support
18325
18581
  const lastInput = this.inputList[this.inputList.length - 1];
18326
18582
 
18327
- if (this.error) {
18583
+ if (this.hasAttribute('error')) {
18328
18584
  // Set the error attribute on the last input
18329
18585
  lastInput.setAttribute('error', this.getAttribute('error'));
18330
18586
  } else {
@@ -18442,6 +18698,8 @@ class AuroDatePicker extends r$7 {
18442
18698
  noValidate
18443
18699
  .max="${this.maxDate}"
18444
18700
  .min="${this.minDate}"
18701
+ setCustomValidity="${this.setCustomValidity}"
18702
+ setCustomValidityCustomError="${this.setCustomValidityCustomError}"
18445
18703
  setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
18446
18704
  setCustomValidityRangeOverflow="${this.setCustomValidityRangeOverflow}"
18447
18705
  setCustomValidityRangeUnderflow="${this.setCustomValidityRangeUnderflow}"
@@ -18459,6 +18717,8 @@ class AuroDatePicker extends r$7 {
18459
18717
  noValidate
18460
18718
  .max="${this.maxDate}"
18461
18719
  .min="${this.minDate}"
18720
+ setCustomValidity="${this.setCustomValidity}"
18721
+ setCustomValidityCustomError="${this.setCustomValidityCustomError}"
18462
18722
  setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
18463
18723
  setCustomValidityRangeOverflow="${this.setCustomValidityRangeOverflow}"
18464
18724
  setCustomValidityRangeUnderflow="${this.setCustomValidityRangeUnderflow}"
@@ -18489,8 +18749,8 @@ class AuroDatePicker extends r$7 {
18489
18749
  ? u$6`
18490
18750
  <slot name="helpText"></slot>
18491
18751
  ` : u$6`
18492
- <p class="datepickerElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
18493
- ${this.setCustomValidity}
18752
+ <p class="datepickerElement-helpText" role="alert" aria-live="assertive" part="helpText">
18753
+ ${this.errorMessage}
18494
18754
  </p>`
18495
18755
  }
18496
18756
  </span>