@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
@@ -350,20 +350,20 @@ let AuroFormValidation$1 = class AuroFormValidation {
350
350
  const pattern = new RegExp(`^${elem.pattern}$`, 'u');
351
351
 
352
352
  if (!pattern.test(elem.value)) {
353
- elem.validity = 'badInput';
354
- elem.setCustomValidity = elem.setCustomValidityBadInput || '';
353
+ elem.validity = 'patternMismatch';
354
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
355
355
  }
356
356
  }
357
357
 
358
358
  // Length > 0 is required to prevent the error message from showing when the input is empty
359
359
  if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
360
360
  elem.validity = 'tooShort';
361
- elem.setCustomValidity = elem.setCustomValidityTooShort || '';
361
+ elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
362
362
  }
363
363
 
364
364
  if (elem.value?.length > elem.maxLength) {
365
365
  elem.validity = 'tooLong';
366
- elem.setCustomValidity = elem.setCustomValidityTooLong || '';
366
+ elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
367
367
  }
368
368
  }
369
369
 
@@ -379,33 +379,32 @@ let AuroFormValidation$1 = class AuroFormValidation {
379
379
  const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
380
380
 
381
381
  if (!elem.value.match(emailRegex)) {
382
- elem.validity = 'badInput';
383
- elem.setCustomValidity = elem.setCustomValidityForType || '';
382
+ elem.validity = 'patternMismatch';
383
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
384
384
  }
385
385
  } else if (elem.type === 'credit-card') {
386
386
  if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
387
387
  elem.validity = 'tooShort';
388
- elem.setCustomValidity = elem.setCustomValidityForType || '';
388
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
389
389
  }
390
390
  } else if (elem.type === 'number') {
391
391
  if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
392
392
  elem.validity = 'rangeOverflow';
393
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
393
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
394
394
  }
395
395
 
396
- if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
396
+ if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
397
397
  elem.validity = 'rangeUnderflow';
398
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
398
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
399
399
  }
400
-
401
400
  } else if (elem.type === 'month-day-year' ||
402
401
  elem.type === 'month-year' ||
403
402
  elem.type === 'month-fullYear' ||
404
403
  elem.type === 'year-month-day'
405
404
  ) {
406
- if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
405
+ if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
407
406
  elem.validity = 'tooShort';
408
- elem.setCustomValidity = elem.setCustomValidityForType || '';
407
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
409
408
  } else {
410
409
  const valueDate = new Date(elem.value);
411
410
 
@@ -415,7 +414,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
415
414
 
416
415
  if (valueDate > maxDate) {
417
416
  elem.validity = 'rangeOverflow';
418
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
417
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
419
418
  }
420
419
  }
421
420
 
@@ -425,7 +424,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
425
424
 
426
425
  if (valueDate < minDate) {
427
426
  elem.validity = 'rangeUnderflow';
428
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
427
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
429
428
  }
430
429
  }
431
430
  }
@@ -448,10 +447,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
448
447
 
449
448
  if (elem.hasAttribute('error')) {
450
449
  elem.validity = 'customError';
451
- elem.setCustomValidity = elem.error;
450
+ elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
452
451
  } else if (validationShouldRun) {
453
452
  elem.validity = 'valid';
454
- elem.setCustomValidity = '';
453
+ elem.errorMessage = '';
455
454
 
456
455
  /**
457
456
  * Only validate once we interact with the datepicker
@@ -463,7 +462,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
463
462
  let hasValue = elem.value && elem.value.length > 0;
464
463
 
465
464
  // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
466
- if (this.auroInputElements && this.auroInputElements.length === 2) {
465
+ if (this.auroInputElements?.length === 2) {
467
466
  if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
468
467
  hasValue = false;
469
468
  }
@@ -471,31 +470,27 @@ let AuroFormValidation$1 = class AuroFormValidation {
471
470
 
472
471
  if (!hasValue && elem.required) {
473
472
  elem.validity = 'valueMissing';
474
- elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
473
+ elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
475
474
  } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
476
475
  this.validateType(elem);
477
476
  this.validateAttributes(elem);
478
477
  }
479
478
  }
480
479
 
481
- if (this.auroInputElements && this.auroInputElements.length > 0) {
480
+ if (this.auroInputElements?.length > 0) {
482
481
  elem.validity = this.auroInputElements[0].validity;
483
- elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
482
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
484
483
 
485
- if (elem.validity === 'valid') {
486
- if (this.auroInputElements.length > 1) {
487
- elem.validity = this.auroInputElements[1].validity;
488
- elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
489
- }
484
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
485
+ elem.validity = this.auroInputElements[1].validity;
486
+ elem.errorMessage = this.auroInputElements[1].errorMessage;
490
487
  }
491
488
  }
492
489
 
493
490
  if (validationShouldRun || elem.hasAttribute('error')) {
494
- if (elem.validity && elem.validity !== 'valid') {
495
- // Use the validity message override if it is declared
496
- if (elem.ValidityMessageOverride) {
497
- elem.setCustomValidity = elem.ValidityMessageOverride;
498
- }
491
+ // Use the validity message override if it is declared
492
+ if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
493
+ elem.errorMessage = elem.ValidityMessageOverride;
499
494
  }
500
495
 
501
496
  this.getErrorMessage(elem);
@@ -541,18 +536,18 @@ let AuroFormValidation$1 = class AuroFormValidation {
541
536
  if (elem.validity !== 'valid') {
542
537
  if (elem.setCustomValidity) {
543
538
  elem.errorMessage = elem.setCustomValidity;
544
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
539
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
545
540
  const input = elem.renderRoot.querySelector('input');
546
541
 
547
542
  if (input.validationMessage.length > 0) {
548
543
  elem.errorMessage = input.validationMessage;
549
544
  }
550
- } else if (this.inputElements && this.inputElements.length > 0) {
545
+ } else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
551
546
  const firstInput = this.inputElements[0];
552
547
 
553
548
  if (firstInput.validationMessage.length > 0) {
554
549
  elem.errorMessage = firstInput.validationMessage;
555
- } else if (this.inputElements.length === 2) {
550
+ } else if (this.inputElements?.length === 2) {
556
551
  const secondInput = this.inputElements[1];
557
552
 
558
553
  if (secondInput.validationMessage.length > 0) {
@@ -2970,7 +2965,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
2970
2965
 
2971
2966
  var iconVersion$2 = '6.1.2';
2972
2967
 
2973
- var styleCss$1$2 = 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)}`;
2968
+ var styleCss$1$2 = 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)}`;
2974
2969
 
2975
2970
  var colorCss$1$2 = 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)}`;
2976
2971
 
@@ -2994,9 +2989,6 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
2994
2989
  ];
2995
2990
 
2996
2991
  /**
2997
- * @attr { Boolean } common - If declared, will apply all styles for the common theme.
2998
- * @attr { Boolean } rounded - If declared, will apply border-radius to the bib.
2999
- * @attr { Boolean } inset - If declared, will apply extra padding to bib content.
3000
2992
  * @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.
3001
2993
  * @csspart bibContainer - Apply css to the bib container.
3002
2994
  */
@@ -3022,14 +3014,26 @@ class AuroDropdownBib extends r$5 {
3022
3014
 
3023
3015
  static get properties() {
3024
3016
  return {
3017
+
3018
+ /**
3019
+ * If declared, will apply all styles for the common theme.
3020
+ */
3025
3021
  common: {
3026
3022
  type: Boolean,
3027
3023
  reflect: true
3028
3024
  },
3025
+
3026
+ /**
3027
+ * If declared, will apply extra padding to bib content.
3028
+ */
3029
3029
  inset: {
3030
3030
  type: Boolean,
3031
3031
  reflect: true
3032
3032
  },
3033
+
3034
+ /**
3035
+ * If declared, will apply border-radius to the bib.
3036
+ */
3033
3037
  rounded: {
3034
3038
  type: Boolean,
3035
3039
  reflect: true
@@ -3073,22 +3077,7 @@ if (!customElements.get("auro-dropdownbib")) {
3073
3077
 
3074
3078
 
3075
3079
  /**
3076
- * @attr { Boolean } bordered - If declared, applies a border around the trigger slot.
3077
- * @attr { Boolean } common - If declared, the dropdown will be styled with the common theme.
3078
- * @attr { Boolean } chevron - If declared, the dropdown displays an display state chevron on the right.
3079
- * @attr { Boolean } disabled - If declared, the dropdown is not interactive.
3080
3080
  * @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
3081
- * @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
3082
- * @attr {Boolean} fluid - Makes the trigger to be full width of its parent container
3083
- * @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
3084
- * @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
3085
- * @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
3086
- * @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
3087
- * @attr { Boolean } noToggle - If declared, the trigger will only show the dropdown bib.
3088
- * @attr { Boolean } focusShow - if declared, the bib will display when focus is applied to the trigger.
3089
- * @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
3090
- * @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.
3091
- * @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
3092
3081
  * @slot - Default slot for the popover content.
3093
3082
  * @slot label - Defines the content of the label.
3094
3083
  * @slot helpText - Defines the content of the helpText.
@@ -3126,6 +3115,16 @@ class AuroDropdown extends r$5 {
3126
3115
  this.tabIndex = 0;
3127
3116
  this.noToggle = false;
3128
3117
 
3118
+ /**
3119
+ * @private
3120
+ */
3121
+ this.hasTriggerContent = false;
3122
+
3123
+ /**
3124
+ * @private
3125
+ */
3126
+ this.triggerContentSlot = undefined;
3127
+
3129
3128
  /**
3130
3129
  * @private
3131
3130
  */
@@ -3172,89 +3171,166 @@ class AuroDropdown extends r$5 {
3172
3171
  // function to define props used within the scope of this component
3173
3172
  static get properties() {
3174
3173
  return {
3174
+
3175
+ /**
3176
+ * If declared, applies a border around the trigger slot.
3177
+ */
3175
3178
  bordered: {
3176
3179
  type: Boolean,
3177
3180
  reflect: true
3178
3181
  },
3182
+
3183
+ /**
3184
+ * If declared, the dropdown displays a chevron on the right.
3185
+ * @attr {Boolean} chevron
3186
+ */
3179
3187
  chevron: {
3180
3188
  type: Boolean,
3181
3189
  reflect: true
3182
3190
  },
3183
- disabled: {
3191
+
3192
+ /**
3193
+ * If declared, the dropdown will be styled with the common theme.
3194
+ */
3195
+ common: {
3184
3196
  type: Boolean,
3185
3197
  reflect: true
3186
3198
  },
3187
- error: {
3199
+
3200
+ /**
3201
+ * If declared, the dropdown is not interactive.
3202
+ */
3203
+ disabled: {
3188
3204
  type: Boolean,
3189
3205
  reflect: true
3190
3206
  },
3191
- fluid: {
3207
+
3208
+ /**
3209
+ * @private
3210
+ */
3211
+ dropdownWidth: {
3212
+ type: Number
3213
+ },
3214
+
3215
+ /**
3216
+ * If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
3217
+ */
3218
+ error: {
3192
3219
  type: Boolean,
3193
- reflect: true,
3220
+ reflect: true
3194
3221
  },
3222
+
3223
+ /**
3224
+ * If declared, the bib will display when focus is applied to the trigger.
3225
+ */
3195
3226
  focusShow: {
3196
3227
  type: Boolean,
3197
3228
  reflect: true
3198
3229
  },
3199
- hoverToggle: {
3230
+
3231
+ /**
3232
+ * Makes the trigger to be full width of its parent container.
3233
+ */
3234
+ fluid: {
3200
3235
  type: Boolean,
3201
3236
  reflect: true
3202
3237
  },
3238
+
3239
+ /**
3240
+ * If declared, will apply padding around trigger slot content.
3241
+ */
3203
3242
  inset: {
3204
3243
  type: Boolean,
3205
3244
  reflect: true
3206
3245
  },
3207
- matchWidth: {
3246
+
3247
+ /**
3248
+ * If true, the dropdown bib is displayed.
3249
+ */
3250
+ isPopoverVisible: {
3251
+ type: Boolean
3252
+ },
3253
+
3254
+ /**
3255
+ * If declared, the trigger will toggle the dropdown on mouseover/mouseout.
3256
+ */
3257
+ hoverToggle: {
3208
3258
  type: Boolean,
3209
3259
  reflect: true
3210
3260
  },
3211
- rounded: {
3212
- type: Boolean,
3261
+
3262
+ /**
3263
+ * @private
3264
+ */
3265
+ hasTriggerContent: {
3266
+ type: Boolean
3267
+ },
3268
+
3269
+ /**
3270
+ * 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.
3271
+ */
3272
+ mobileFullscreenBreakpoint: {
3273
+ type: String,
3213
3274
  reflect: true
3214
3275
  },
3215
- common: {
3276
+
3277
+ /**
3278
+ * If declared, the popover and trigger will be set to the same width.
3279
+ */
3280
+ matchWidth: {
3216
3281
  type: Boolean,
3217
3282
  reflect: true
3218
3283
  },
3219
- noToggle: {
3284
+
3285
+ /**
3286
+ * If declared, the dropdown will not hide when moving focus outside the element.
3287
+ */
3288
+ noHideOnThisFocusLoss: {
3220
3289
  type: Boolean,
3221
3290
  reflect: true
3222
3291
  },
3223
- noHideOnThisFocusLoss: {
3292
+
3293
+ /**
3294
+ * If declared, the trigger will only show the dropdown bib.
3295
+ */
3296
+ noToggle: {
3224
3297
  type: Boolean,
3225
3298
  reflect: true
3226
3299
  },
3227
- isPopoverVisible: { type: Boolean },
3300
+
3228
3301
  onSlotChange: {
3229
3302
  type: Function,
3230
3303
  reflect: false
3231
3304
  },
3232
- mobileFullscreenBreakpoint: {
3233
- type: String,
3234
- reflect: true,
3235
- },
3236
3305
 
3237
3306
  /**
3238
3307
  * @private
3239
3308
  */
3240
- dropdownWidth: { type: Number },
3309
+ placement: {
3310
+ type: String
3311
+ },
3241
3312
 
3242
3313
  /**
3243
- * @private
3314
+ * If declared, will apply border-radius to trigger and default slots.
3244
3315
  */
3245
- placement: { type: String },
3316
+ rounded: {
3317
+ type: Boolean,
3318
+ reflect: true
3319
+ },
3246
3320
 
3247
3321
  /**
3248
3322
  * @private
3249
3323
  */
3250
- tabIndex: { type: Number }
3324
+ tabIndex: {
3325
+ type: Number
3326
+ }
3251
3327
  };
3252
3328
  }
3253
3329
 
3254
3330
  static get styles() {
3255
3331
  return [
3256
- styleCss$1$2,
3257
3332
  colorCss$1$2,
3333
+ styleCss$1$2,
3258
3334
  tokensCss$5
3259
3335
  ];
3260
3336
  }
@@ -3285,6 +3361,12 @@ class AuroDropdown extends r$5 {
3285
3361
  if (changedProperties.has('mobileFullscreenBreakpoint')) {
3286
3362
  this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
3287
3363
  }
3364
+
3365
+ // when trigger's content is changed without any attribute or node change,
3366
+ // `requestUpdate` needs to be called to update hasTriggerContnet
3367
+ if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
3368
+ this.handleTriggerContentSlotChange();
3369
+ }
3288
3370
  }
3289
3371
 
3290
3372
  firstUpdated() {
@@ -3327,6 +3409,43 @@ class AuroDropdown extends r$5 {
3327
3409
  return inCustomSlot;
3328
3410
  }
3329
3411
 
3412
+ /**
3413
+ * Handles changes to the trigger content slot and updates related properties.
3414
+ *
3415
+ * It first updates the floater settings
3416
+ * Then, it retrieves the assigned nodes from the event target and checks if any of
3417
+ * the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
3418
+ *
3419
+ * @private
3420
+ * @method handleTriggerContentSlotChange
3421
+ * @param {Event} event - native slotchange event
3422
+ * @returns {void}
3423
+ */
3424
+ handleTriggerContentSlotChange(event) {
3425
+ this.floater.handleTriggerTabIndex();
3426
+
3427
+ if (event) {
3428
+ this.triggerNode = event.target;
3429
+ this.triggerContentSlot = event.target.assignedNodes();
3430
+ }
3431
+
3432
+ if (this.triggerContentSlot) {
3433
+ this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
3434
+ if (slot.textContent.trim()) {
3435
+ return true;
3436
+ }
3437
+ const slotInSlot = slot.querySelector('slot');
3438
+ if (!slotInSlot) {
3439
+ return false;
3440
+ }
3441
+ const slotsInSlotNodes = slotInSlot.assignedNodes();
3442
+ return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
3443
+ });
3444
+ } else {
3445
+ this.hasTriggerContent = false;
3446
+ }
3447
+ }
3448
+
3330
3449
  /**
3331
3450
  * Handles the default slot change event and updates the content.
3332
3451
  *
@@ -3361,13 +3480,13 @@ class AuroDropdown extends r$5 {
3361
3480
  tabindex="${this.tabIndex}"
3362
3481
  >
3363
3482
  <div class="triggerContentWrapper">
3364
- <label class="label" id="triggerLabel">
3483
+ <label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
3365
3484
  <slot name="label"></slot>
3366
3485
  </label>
3367
3486
  <div class="triggerContent">
3368
3487
  <slot
3369
3488
  name="trigger"
3370
- @slotchange="${() => {this.floater.handleTriggerTabIndex(); }}"></slot>
3489
+ @slotchange="${(event) => this.handleTriggerContentSlotChange(event)}"></slot>
3371
3490
  </div>
3372
3491
  </div>
3373
3492
  ${this.chevron || this.common ? u$1$1`
@@ -3577,7 +3696,7 @@ const t$4=globalThis,e$1$1=t$4.ShadowRoot&&(void 0===t$4.ShadyCSS||t$4.ShadyCSS.
3577
3696
  * SPDX-License-Identifier: BSD-3-Clause
3578
3697
  */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$6=globalThis.litElementPolyfillSupport;i$6?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1");
3579
3698
 
3580
- var styleCss$3$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_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)}`;
3699
+ var styleCss$3$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_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)}`;
3581
3700
 
3582
3701
  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)}`;
3583
3702
 
@@ -5254,20 +5373,20 @@ class AuroFormValidation {
5254
5373
  const pattern = new RegExp(`^${elem.pattern}$`, 'u');
5255
5374
 
5256
5375
  if (!pattern.test(elem.value)) {
5257
- elem.validity = 'badInput';
5258
- elem.setCustomValidity = elem.setCustomValidityBadInput || '';
5376
+ elem.validity = 'patternMismatch';
5377
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
5259
5378
  }
5260
5379
  }
5261
5380
 
5262
5381
  // Length > 0 is required to prevent the error message from showing when the input is empty
5263
5382
  if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
5264
5383
  elem.validity = 'tooShort';
5265
- elem.setCustomValidity = elem.setCustomValidityTooShort || '';
5384
+ elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
5266
5385
  }
5267
5386
 
5268
5387
  if (elem.value?.length > elem.maxLength) {
5269
5388
  elem.validity = 'tooLong';
5270
- elem.setCustomValidity = elem.setCustomValidityTooLong || '';
5389
+ elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
5271
5390
  }
5272
5391
  }
5273
5392
 
@@ -5283,33 +5402,32 @@ class AuroFormValidation {
5283
5402
  const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
5284
5403
 
5285
5404
  if (!elem.value.match(emailRegex)) {
5286
- elem.validity = 'badInput';
5287
- elem.setCustomValidity = elem.setCustomValidityForType || '';
5405
+ elem.validity = 'patternMismatch';
5406
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
5288
5407
  }
5289
5408
  } else if (elem.type === 'credit-card') {
5290
5409
  if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
5291
5410
  elem.validity = 'tooShort';
5292
- elem.setCustomValidity = elem.setCustomValidityForType || '';
5411
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
5293
5412
  }
5294
5413
  } else if (elem.type === 'number') {
5295
5414
  if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
5296
5415
  elem.validity = 'rangeOverflow';
5297
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
5416
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
5298
5417
  }
5299
5418
 
5300
- if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
5419
+ if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
5301
5420
  elem.validity = 'rangeUnderflow';
5302
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
5421
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
5303
5422
  }
5304
-
5305
5423
  } else if (elem.type === 'month-day-year' ||
5306
5424
  elem.type === 'month-year' ||
5307
5425
  elem.type === 'month-fullYear' ||
5308
5426
  elem.type === 'year-month-day'
5309
5427
  ) {
5310
- if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
5428
+ if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
5311
5429
  elem.validity = 'tooShort';
5312
- elem.setCustomValidity = elem.setCustomValidityForType || '';
5430
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
5313
5431
  } else {
5314
5432
  const valueDate = new Date(elem.value);
5315
5433
 
@@ -5319,7 +5437,7 @@ class AuroFormValidation {
5319
5437
 
5320
5438
  if (valueDate > maxDate) {
5321
5439
  elem.validity = 'rangeOverflow';
5322
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
5440
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
5323
5441
  }
5324
5442
  }
5325
5443
 
@@ -5329,7 +5447,7 @@ class AuroFormValidation {
5329
5447
 
5330
5448
  if (valueDate < minDate) {
5331
5449
  elem.validity = 'rangeUnderflow';
5332
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
5450
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
5333
5451
  }
5334
5452
  }
5335
5453
  }
@@ -5352,10 +5470,10 @@ class AuroFormValidation {
5352
5470
 
5353
5471
  if (elem.hasAttribute('error')) {
5354
5472
  elem.validity = 'customError';
5355
- elem.setCustomValidity = elem.error;
5473
+ elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
5356
5474
  } else if (validationShouldRun) {
5357
5475
  elem.validity = 'valid';
5358
- elem.setCustomValidity = '';
5476
+ elem.errorMessage = '';
5359
5477
 
5360
5478
  /**
5361
5479
  * Only validate once we interact with the datepicker
@@ -5367,7 +5485,7 @@ class AuroFormValidation {
5367
5485
  let hasValue = elem.value && elem.value.length > 0;
5368
5486
 
5369
5487
  // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
5370
- if (this.auroInputElements && this.auroInputElements.length === 2) {
5488
+ if (this.auroInputElements?.length === 2) {
5371
5489
  if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
5372
5490
  hasValue = false;
5373
5491
  }
@@ -5375,31 +5493,27 @@ class AuroFormValidation {
5375
5493
 
5376
5494
  if (!hasValue && elem.required) {
5377
5495
  elem.validity = 'valueMissing';
5378
- elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
5496
+ elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
5379
5497
  } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
5380
5498
  this.validateType(elem);
5381
5499
  this.validateAttributes(elem);
5382
5500
  }
5383
5501
  }
5384
5502
 
5385
- if (this.auroInputElements && this.auroInputElements.length > 0) {
5503
+ if (this.auroInputElements?.length > 0) {
5386
5504
  elem.validity = this.auroInputElements[0].validity;
5387
- elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
5505
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
5388
5506
 
5389
- if (elem.validity === 'valid') {
5390
- if (this.auroInputElements.length > 1) {
5391
- elem.validity = this.auroInputElements[1].validity;
5392
- elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
5393
- }
5507
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
5508
+ elem.validity = this.auroInputElements[1].validity;
5509
+ elem.errorMessage = this.auroInputElements[1].errorMessage;
5394
5510
  }
5395
5511
  }
5396
5512
 
5397
5513
  if (validationShouldRun || elem.hasAttribute('error')) {
5398
- if (elem.validity && elem.validity !== 'valid') {
5399
- // Use the validity message override if it is declared
5400
- if (elem.ValidityMessageOverride) {
5401
- elem.setCustomValidity = elem.ValidityMessageOverride;
5402
- }
5514
+ // Use the validity message override if it is declared
5515
+ if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
5516
+ elem.errorMessage = elem.ValidityMessageOverride;
5403
5517
  }
5404
5518
 
5405
5519
  this.getErrorMessage(elem);
@@ -5445,18 +5559,18 @@ class AuroFormValidation {
5445
5559
  if (elem.validity !== 'valid') {
5446
5560
  if (elem.setCustomValidity) {
5447
5561
  elem.errorMessage = elem.setCustomValidity;
5448
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
5562
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
5449
5563
  const input = elem.renderRoot.querySelector('input');
5450
5564
 
5451
5565
  if (input.validationMessage.length > 0) {
5452
5566
  elem.errorMessage = input.validationMessage;
5453
5567
  }
5454
- } else if (this.inputElements && this.inputElements.length > 0) {
5568
+ } else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
5455
5569
  const firstInput = this.inputElements[0];
5456
5570
 
5457
5571
  if (firstInput.validationMessage.length > 0) {
5458
5572
  elem.errorMessage = firstInput.validationMessage;
5459
- } else if (this.inputElements.length === 2) {
5573
+ } else if (this.inputElements?.length === 2) {
5460
5574
  const secondInput = this.inputElements[1];
5461
5575
 
5462
5576
  if (secondInput.validationMessage.length > 0) {
@@ -5477,42 +5591,8 @@ class AuroFormValidation {
5477
5591
  /**
5478
5592
  * Auro-input provides users a way to enter data into a text field.
5479
5593
  *
5480
- * @attr {Boolean} activeLabel - If set, the label will remain fixed in the active position.
5481
- * @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]
5482
- * @attr {String} autocomplete - An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
5483
- * @attr {String} autocorrect - When set to `off`, stops iOS from auto correcting words when typed into a text box.
5484
5594
  * @attr {Boolean} bordered - Applies bordered UI variant.
5485
5595
  * @attr {Boolean} borderless - Applies borderless UI variant.
5486
- * @attr {Boolean} disabled - If set, disables the input.
5487
- * @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
5488
- * @prop {String} errorMessage - Contains the help text message for the current validity error.
5489
- * @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.
5490
- * @attr {String} id - Sets the unique ID of the element.
5491
- * @attr {String} lang - defines the language of an element.
5492
- * @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
5493
- * @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.
5494
- * @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
5495
- * @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`.
5496
- * @attr {String} name - Populates the `name` attribute on the input.
5497
- * @attr {Boolean} noValidate - If set, disables auto-validation on blur.
5498
- * @attr {Boolean} readonly - Makes the input read-only, but can be set programmatically.
5499
- * @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
5500
- * @attr {String} pattern - Specifies a regular expression the form control's value should match.
5501
- * @attr {String} placeholder - Define custom placeholder text, only supported by date input formats.
5502
- * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
5503
- * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
5504
- * @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
5505
- * @attr {String} setCustomValidityBadInput - Custom help text message to display when validity = `badInput`.
5506
- * @attr {String} setCustomValidityTooShort - Custom help text message to display when validity = `tooShort`.
5507
- * @attr {String} setCustomValidityTooLong - Custom help text message to display when validity = `tooLong`.
5508
- * @attr {String} setCustomValidityForType - Custom help text message to display for the declared element `type` and type validity fails.
5509
- * @attr {String} setCustomValidityRangeOverflow - Custom help text message to display when validity = `rangeOverflow`.
5510
- * @attr {String} setCustomValidityRangeUnderflow - Custom help text message to display when validity = `rangeUnderflow`.
5511
- * @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`.
5512
- * @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`.
5513
- * @attr {Boolean} validateOnInput - Sets validation mode to re-eval with each input.
5514
- * @attr {String} validity - Specifies the `validityState` this element is in.
5515
- * @attr {String} value - Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
5516
5596
  *
5517
5597
  * @slot helptext - Sets the help text displayed below the input.
5518
5598
  * @slot label - Sets the label text for the input.
@@ -5604,71 +5684,272 @@ class BaseInput extends r {
5604
5684
  .substring(idSubstrStart, idSubstrEnd);
5605
5685
  }
5606
5686
 
5607
- // function to define props used within the scope of this component
5687
+ // function to define props used within the scope of this componentstatic
5608
5688
  static get properties() {
5609
5689
  return {
5610
- id: { type: String },
5611
- name: { type: String },
5612
- type: { type: String,
5613
- reflect: true },
5614
- value: { type: String },
5615
- lang: { type: String },
5616
- pattern: {
5690
+
5691
+ /**
5692
+ * If set, the label will remain fixed in the active position.
5693
+ */
5694
+ activeLabel: {
5695
+ type: Boolean,
5696
+ reflect: true
5697
+ },
5698
+
5699
+ /**
5700
+ * 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]
5701
+ */
5702
+ autocapitalize: {
5703
+ type: String
5704
+ },
5705
+
5706
+ /**
5707
+ * An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
5708
+ */
5709
+ autocomplete: {
5617
5710
  type: String,
5618
5711
  reflect: true
5619
5712
  },
5620
- icon: { type: Boolean },
5621
- disabled: { type: Boolean },
5622
- required: { type: Boolean },
5623
- noValidate: { type: Boolean },
5624
- spellcheck: { type: String },
5625
- autocorrect: { type: String },
5626
- autocapitalize: { type: String },
5627
- autocomplete: {
5713
+
5714
+ /**
5715
+ * When set to `off`, stops iOS from auto-correcting words when typed into a text box.
5716
+ */
5717
+ autocorrect: {
5718
+ type: String
5719
+ },
5720
+
5721
+ /**
5722
+ * If set, disables the input.
5723
+ */
5724
+ disabled: {
5725
+ type: Boolean
5726
+ },
5727
+
5728
+ error: {
5628
5729
  type: String,
5629
5730
  reflect: true
5630
5731
  },
5631
- placeholder: { type: String },
5632
- activeLabel: {
5633
- type: Boolean,
5732
+
5733
+ /**
5734
+ * Contains the help text message for the current validity error.
5735
+ */
5736
+ errorMessage: {
5737
+ type: String
5738
+ },
5739
+
5740
+ /**
5741
+ * 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.
5742
+ */
5743
+ icon: {
5744
+ type: Boolean
5745
+ },
5746
+
5747
+ /**
5748
+ * Sets the unique ID of the element.
5749
+ */
5750
+ id: {
5751
+ type: String
5752
+ },
5753
+
5754
+ /**
5755
+ * Defines the language of an element.
5756
+ */
5757
+ lang: {
5758
+ type: String
5759
+ },
5760
+
5761
+ /**
5762
+ * The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
5763
+ */
5764
+ max: {
5765
+ type: String
5766
+ },
5767
+
5768
+ /**
5769
+ * The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
5770
+ */
5771
+ maxLength: {
5772
+ type: Number
5773
+ },
5774
+
5775
+ /**
5776
+ * The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
5777
+ */
5778
+ min: {
5779
+ type: String
5780
+ },
5781
+
5782
+ /**
5783
+ * 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`.
5784
+ */
5785
+ minLength: {
5786
+ type: Number
5787
+ },
5788
+
5789
+ /**
5790
+ * Populates the `name` attribute on the input.
5791
+ */
5792
+ name: {
5793
+ type: String
5794
+ },
5795
+
5796
+ /**
5797
+ * If set, disables auto-validation on blur.
5798
+ */
5799
+ noValidate: {
5800
+ type: Boolean
5801
+ },
5802
+
5803
+ /**
5804
+ * Specifies a regular expression the form control's value should match.
5805
+ */
5806
+ pattern: {
5807
+ type: String,
5634
5808
  reflect: true
5635
5809
  },
5636
- max: { type: String },
5637
- min: { type: String },
5638
- maxLength: { type: Number },
5639
- minLength: { type: Number },
5810
+
5811
+ /**
5812
+ * Define custom placeholder text, only supported by date input formats.
5813
+ */
5814
+ placeholder: {
5815
+ type: String
5816
+ },
5817
+
5818
+ /**
5819
+ * Makes the input read-only, but can be set programmatically.
5820
+ */
5821
+ readonly: {
5822
+ type: Boolean
5823
+ },
5824
+
5825
+ /**
5826
+ * Populates the `required` attribute on the input. Used for client-side validation.
5827
+ */
5828
+ required: {
5829
+ type: Boolean
5830
+ },
5640
5831
 
5641
5832
  /**
5642
5833
  * @ignore
5643
5834
  */
5644
- showPassword: { state: true },
5645
- validateOnInput: { type: Boolean },
5646
- readonly: { type: Boolean },
5647
- error: {
5835
+ showPassword: {
5836
+ state: true
5837
+ },
5838
+
5839
+ /**
5840
+ * Sets a custom help text message to display for all validityStates.
5841
+ */
5842
+ setCustomValidity: {
5843
+ type: String
5844
+ },
5845
+
5846
+ /**
5847
+ * Custom help text message to display when validity = `badInput`.
5848
+ */
5849
+ setCustomValidityBadInput: {
5850
+ type: String
5851
+ },
5852
+
5853
+ /**
5854
+ * Custom help text message to display when validity = `customError`.
5855
+ */
5856
+ setCustomValidityCustomError: {
5857
+ type: String
5858
+ },
5859
+
5860
+ /**
5861
+ * Custom help text message to display for the declared element `type` and type validity fails.
5862
+ */
5863
+ setCustomValidityForType: {
5864
+ type: String
5865
+ },
5866
+
5867
+ /**
5868
+ * Custom help text message to display when validity = `rangeOverflow`.
5869
+ */
5870
+ setCustomValidityRangeOverflow: {
5871
+ type: String
5872
+ },
5873
+
5874
+ /**
5875
+ * Custom help text message to display when validity = `rangeUnderflow`.
5876
+ */
5877
+ setCustomValidityRangeUnderflow: {
5878
+ type: String
5879
+ },
5880
+
5881
+ /**
5882
+ * Custom help text message to display when validity = `tooLong`.
5883
+ */
5884
+ setCustomValidityTooLong: {
5885
+ type: String
5886
+ },
5887
+
5888
+ /**
5889
+ * Custom help text message to display when validity = `tooShort`.
5890
+ */
5891
+ setCustomValidityTooShort: {
5892
+ type: String
5893
+ },
5894
+
5895
+ /**
5896
+ * Custom help text message to display when validity = `valueMissing`.
5897
+ */
5898
+ setCustomValidityValueMissing: {
5899
+ type: String
5900
+ },
5901
+
5902
+ /**
5903
+ * Custom help text message for email type validity.
5904
+ */
5905
+ customValidityTypeEmail: {
5906
+ type: String
5907
+ },
5908
+
5909
+ /**
5910
+ * 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`.
5911
+ */
5912
+ spellcheck: {
5913
+ type: String
5914
+ },
5915
+
5916
+ /**
5917
+ * 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`.
5918
+ */
5919
+ type: {
5648
5920
  type: String,
5649
5921
  reflect: true
5650
5922
  },
5651
- errorMessage: { type: String },
5652
- validity: {
5923
+
5924
+ /**
5925
+ * Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
5926
+ */
5927
+ value: {
5928
+ type: String
5929
+ },
5930
+
5931
+ /**
5932
+ * Sets validation mode to re-eval with each input.
5933
+ */
5934
+ validateOnInput: {
5935
+ type: Boolean
5936
+ },
5937
+
5938
+ /**
5939
+ * Specifies the `validityState` this element is in.
5940
+ */
5941
+ validity: {
5653
5942
  type: String,
5654
5943
  reflect: true
5655
- },
5656
- setCustomValidity: { type: String },
5657
- setCustomValidityCustomError: { type: String },
5658
- setCustomValidityValueMissing: { type: String },
5659
- setCustomValidityBadInput: { type: String },
5660
- setCustomValidityTooShort: { type: String },
5661
- setCustomValidityTooLong: { type: String },
5662
- setCustomValidityRangeOverflow: { type: String},
5663
- setCustomValidityRangeUnderflow: { type: String},
5664
- customValidityTypeEmail: { type: String }
5944
+ }
5665
5945
  };
5666
5946
  }
5667
5947
 
5948
+
5668
5949
  static get styles() {
5669
5950
  return [
5670
- i$2`${styleCss$3$1}`,
5671
5951
  i$2`${colorCss$3}`,
5952
+ i$2`${styleCss$3$1}`,
5672
5953
  i$2`${tokensCss$3}`
5673
5954
  ];
5674
5955
  }
@@ -6289,7 +6570,7 @@ class BaseInput extends r {
6289
6570
  this.maxLength = card.formatLength;
6290
6571
  this.minLength = card.formatMinLength;
6291
6572
 
6292
- this.setCustomValidity = card.setCustomValidity;
6573
+ this.errorMessage = card.errorMessage;
6293
6574
 
6294
6575
  if (this.icon) {
6295
6576
  this.inputIconName = card.cardIcon;
@@ -6309,63 +6590,63 @@ class BaseInput extends r {
6309
6590
  name: 'Airlines',
6310
6591
  regex: /^(?<num>1|2)\d{0}/u,
6311
6592
  formatMinLength: 17,
6312
- setCustomValidity: CreditCardValidationMessage,
6593
+ errorMessage: CreditCardValidationMessage,
6313
6594
  cardIcon: 'credit-card'
6314
6595
  },
6315
6596
  {
6316
6597
  name: 'Commercial',
6317
6598
  regex: /^(?<num>2)\d{0}/u,
6318
6599
  formatMinLength: 8,
6319
- setCustomValidity: CreditCardValidationMessage,
6600
+ errorMessage: CreditCardValidationMessage,
6320
6601
  cardIcon: 'credit-card'
6321
6602
  },
6322
6603
  {
6323
6604
  name: 'Alaska Commercial',
6324
6605
  regex: /^(?<num>27)\d{0}/u,
6325
6606
  formatMinLength: 8,
6326
- setCustomValidity: CreditCardValidationMessage,
6607
+ errorMessage: CreditCardValidationMessage,
6327
6608
  cardIcon: 'cc-alaska'
6328
6609
  },
6329
6610
  {
6330
6611
  name: 'American Express',
6331
6612
  regex: /^(?<num>34|37)\d{0}/u,
6332
6613
  formatLength: 17,
6333
- setCustomValidity: CreditCardValidationMessage,
6614
+ errorMessage: CreditCardValidationMessage,
6334
6615
  cardIcon: 'cc-amex'
6335
6616
  },
6336
6617
  {
6337
6618
  name: 'Diners club',
6338
6619
  regex: /^(?<num>36|38)\d{0}/u,
6339
6620
  formatLength: 16,
6340
- setCustomValidity: CreditCardValidationMessage,
6621
+ errorMessage: CreditCardValidationMessage,
6341
6622
  cardIcon: 'credit-card'
6342
6623
  },
6343
6624
  {
6344
6625
  name: 'Visa',
6345
6626
  regex: /^(?<num>4)\d{0}/u,
6346
6627
  formatLength: 19,
6347
- setCustomValidity: CreditCardValidationMessage,
6628
+ errorMessage: CreditCardValidationMessage,
6348
6629
  cardIcon: 'cc-visa'
6349
6630
  },
6350
6631
  {
6351
6632
  name: 'Alaska Airlines Visa',
6352
6633
  regex: /^(?<num>4147\s34|4888\s93|4800\s11|4313\s51|4313\s07)\d{0}/u,
6353
6634
  formatLength: 19,
6354
- setCustomValidity: CreditCardValidationMessage,
6635
+ errorMessage: CreditCardValidationMessage,
6355
6636
  cardIcon: 'cc-alaska'
6356
6637
  },
6357
6638
  {
6358
6639
  name: 'Master Card',
6359
6640
  regex: /^(?<num>5)\d{0}/u,
6360
6641
  formatLength: 19,
6361
- setCustomValidity: CreditCardValidationMessage,
6642
+ errorMessage: CreditCardValidationMessage,
6362
6643
  cardIcon: 'cc-mastercard'
6363
6644
  },
6364
6645
  {
6365
6646
  name: 'Discover Card',
6366
6647
  regex: /^(?<num>6)\d{0}/u,
6367
6648
  formatLength: 19,
6368
- setCustomValidity: CreditCardValidationMessage,
6649
+ errorMessage: CreditCardValidationMessage,
6369
6650
  cardIcon: 'cc-discover'
6370
6651
  }
6371
6652
  ];
@@ -6373,7 +6654,7 @@ class BaseInput extends r {
6373
6654
  let type = {
6374
6655
  name: 'Default Card',
6375
6656
  formatLength: 19,
6376
- setCustomValidity: CreditCardValidationMessage,
6657
+ errorMessage: CreditCardValidationMessage,
6377
6658
  cardIcon: 'credit-card'
6378
6659
  };
6379
6660
 
@@ -7398,7 +7679,6 @@ class AuroInput extends BaseInput {
7398
7679
  <p class="inputElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
7399
7680
  ${this.errorMessage}
7400
7681
  </p>`
7401
-
7402
7682
  }
7403
7683
  `;
7404
7684
  }
@@ -7419,9 +7699,11 @@ var styleCss$3 = i$c`.util_displayInline{display:inline}.util_displayInlineBlock
7419
7699
  * @prop {Object} optionSelected - Specifies the current selected option.
7420
7700
  * @prop {String} value - Value selected for the dropdown menu.
7421
7701
  * @prop {Boolean} checkmark - When attribute is present auro-menu will apply checkmarks to selected options.
7422
- * @attr {Boolean} error - Sets a persistent error state (e.g. an error state returned from the server).
7702
+ * @attr {String} error - When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
7423
7703
  * @attr {String} validity - Specifies the `validityState` this element is in.
7424
7704
  * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
7705
+ * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
7706
+ * @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
7425
7707
  * @attr {Boolean} disabled - If set, disables the combobox.
7426
7708
  * @attr {Boolean} noFilter - If set, combobox will not filter menuoptions based in input.
7427
7709
  * @attr {Boolean} noValidate - If set, disables auto-validation on blur.
@@ -7487,12 +7769,17 @@ class AuroCombobox extends r$6 {
7487
7769
  return {
7488
7770
  // ...super.properties,
7489
7771
  error: {
7490
- type: Boolean,
7772
+ type: String,
7491
7773
  reflect: true
7492
7774
  },
7493
7775
  setCustomValidity: {
7494
- type: String,
7495
- reflect: true
7776
+ type: String
7777
+ },
7778
+ setCustomValidityCustomError: {
7779
+ type: String
7780
+ },
7781
+ setCustomValidityValueMissing: {
7782
+ type: String
7496
7783
  },
7497
7784
  validity: {
7498
7785
  type: String,
@@ -7776,9 +8063,7 @@ class AuroCombobox extends r$6 {
7776
8063
  });
7777
8064
 
7778
8065
  this.menu.addEventListener('auroMenu-selectValueReset', () => {
7779
- this.optionSelected = undefined;
7780
- this.value = undefined;
7781
- this.validation.validate(this);
8066
+ this.reset();
7782
8067
  });
7783
8068
  }
7784
8069
 
@@ -7856,7 +8141,7 @@ class AuroCombobox extends r$6 {
7856
8141
  });
7857
8142
 
7858
8143
  this.input.addEventListener('auroFormElement-validated', (evt) => {
7859
- this.auroInputHelpText = evt.detail.message;
8144
+ this.errorMessage = evt.detail.message;
7860
8145
  });
7861
8146
  }
7862
8147
 
@@ -8000,9 +8285,6 @@ class AuroCombobox extends r$6 {
8000
8285
  * @returns {void}
8001
8286
  */
8002
8287
  reset() {
8003
- // Resets the help text of the combobox
8004
- this.auroInputHelpText = undefined;
8005
-
8006
8288
  this.input.reset();
8007
8289
  this.validation.reset(this);
8008
8290
  }
@@ -8035,10 +8317,6 @@ class AuroCombobox extends r$6 {
8035
8317
  this.input.setAttribute('error', this.getAttribute('error'));
8036
8318
  this.validation.validate(this);
8037
8319
  }
8038
-
8039
- if (changedProperties.has('setCustomValidity')) {
8040
- this.input.setAttribute('setCustomValidity', this.setCustomValidity);
8041
- }
8042
8320
  }
8043
8321
 
8044
8322
  /**
@@ -8092,19 +8370,23 @@ class AuroCombobox extends r$6 {
8092
8370
  ?noValidate="${this.noValidate}"
8093
8371
  ?disabled="${this.disabled}"
8094
8372
  ?icon="${this.triggerIcon}"
8373
+ setCustomValidity="${this.setCustomValidity}"
8374
+ setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
8375
+ setCustomValidityCustomError="${this.setCustomValidityCustomError}"
8095
8376
  .type="${this.type}">
8096
8377
  <slot name="label" slot="label"></slot>
8097
8378
  </${this.inputTag}>
8098
8379
  <div class="menuWrapper">
8099
8380
  </div>
8100
8381
  <span slot="helpText">
8101
- ${this.auroInputHelpText
8382
+ <!-- Help text and error message template -->
8383
+ ${!this.validity || this.validity === undefined || this.validity === 'valid'
8102
8384
  ? u$6`
8103
- ${this.auroInputHelpText}
8104
- `
8105
- : u$6`
8106
8385
  <slot name="helpText"></slot>
8107
- `
8386
+ ` : u$6`
8387
+ <p role="alert" aria-live="assertive" part="helpText">
8388
+ ${this.errorMessage}
8389
+ </p>`
8108
8390
  }
8109
8391
  </span>
8110
8392
  </${this.dropdownTag}>
@@ -8136,8 +8418,8 @@ var tokensCss$1 = i$c`:host{--ds-auro-menu-divider-color: var(--ds-color-border-
8136
8418
  * @event auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
8137
8419
  * @event auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
8138
8420
  * @event auroMenu-selectValueFailure - Notifies that a an attempt to select a menuoption by matching a value has failed.
8139
- * @event auroMenu-customEventFired - Notifies that a custom event has been fired.
8140
8421
  * @event auroMenu-selectValueReset - Notifies that the component value has been reset.
8422
+ * @event auroMenu-customEventFired - Notifies that a custom event has been fired.
8141
8423
  * @event auroMenu-loadingChange - Notifies when the loading attribute is changed.
8142
8424
  * @slot loadingText - Text to show while loading attribute is set
8143
8425
  * @slot loadingIcon - Icon to show while loading attribute is set