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

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 (211) 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/07ca42419b9f050c-meta.json +1 -1
  5. package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -1
  6. package/.turbo/cache/17259cf94d8f8925-meta.json +1 -1
  7. package/.turbo/cache/1ab37ce15d9be440-meta.json +1 -0
  8. package/.turbo/cache/1ab37ce15d9be440.tar.zst +0 -0
  9. package/.turbo/cache/1b9818717e4bdf9f-meta.json +1 -0
  10. package/.turbo/cache/1b9818717e4bdf9f.tar.zst +0 -0
  11. package/.turbo/cache/1c0f580d37370ba2-meta.json +1 -0
  12. package/.turbo/cache/1c0f580d37370ba2.tar.zst +0 -0
  13. package/.turbo/cache/1c99a949ec63ab35-meta.json +1 -1
  14. package/.turbo/cache/1de15d89eed2d760-meta.json +1 -1
  15. package/.turbo/cache/2110a4d14e0d11b2-meta.json +1 -0
  16. package/.turbo/cache/2110a4d14e0d11b2.tar.zst +0 -0
  17. package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -1
  18. package/.turbo/cache/2990aaa7ebc5b967-meta.json +1 -1
  19. package/.turbo/cache/2990aaa7ebc5b967.tar.zst +0 -0
  20. package/.turbo/cache/2fd056afdf4eb39d-meta.json +1 -0
  21. package/.turbo/cache/2fd056afdf4eb39d.tar.zst +0 -0
  22. package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -1
  23. package/.turbo/cache/3e12285c614db539-meta.json +1 -0
  24. package/.turbo/cache/3e12285c614db539.tar.zst +0 -0
  25. package/.turbo/cache/45035bf5c4147ccd-meta.json +1 -1
  26. package/.turbo/cache/4f92cea2d8c63de2-meta.json +1 -1
  27. package/.turbo/cache/5bf2d3f7ba5891e0-meta.json +1 -0
  28. package/.turbo/cache/5bf2d3f7ba5891e0.tar.zst +0 -0
  29. package/.turbo/cache/5c16ce3cff5c9dff-meta.json +1 -1
  30. package/.turbo/cache/5f304c0f37ef25f3-meta.json +1 -1
  31. package/.turbo/cache/64de7a53e02db647-meta.json +1 -1
  32. package/.turbo/cache/691a74627ec57993-meta.json +1 -1
  33. package/.turbo/cache/69aae513b7ec6c7d-meta.json +1 -1
  34. package/.turbo/cache/6dd67d179191bda8-meta.json +1 -0
  35. package/.turbo/cache/6dd67d179191bda8.tar.zst +0 -0
  36. package/.turbo/cache/6dd7058e6703cb35-meta.json +1 -1
  37. package/.turbo/cache/73e9073a5274616d-meta.json +1 -1
  38. package/.turbo/cache/773edc0f83c8c5a5-meta.json +1 -1
  39. package/.turbo/cache/784c03fe9fd5ac05-meta.json +1 -1
  40. package/.turbo/cache/786a822763403879-meta.json +1 -1
  41. package/.turbo/cache/7e1043cffa69f327-meta.json +1 -0
  42. package/.turbo/cache/7e1043cffa69f327.tar.zst +0 -0
  43. package/.turbo/cache/80a13352066a9801-meta.json +1 -0
  44. package/.turbo/cache/80a13352066a9801.tar.zst +0 -0
  45. package/.turbo/cache/80b5d974184a01df-meta.json +1 -1
  46. package/.turbo/cache/87219c41a4ace9cd-meta.json +1 -1
  47. package/.turbo/cache/87219c41a4ace9cd.tar.zst +0 -0
  48. package/.turbo/cache/8954c6073396fadd-meta.json +1 -1
  49. package/.turbo/cache/8e79bd5c3a16a72e-meta.json +1 -0
  50. package/.turbo/cache/92daa6d7c389d548-meta.json +1 -1
  51. package/.turbo/cache/993dff2edb7b6766-meta.json +1 -1
  52. package/.turbo/cache/9a097d6576dadd64-meta.json +1 -1
  53. package/.turbo/cache/a63cbfecf0f78586-meta.json +1 -0
  54. package/.turbo/cache/{ce67b6522dd09e64.tar.zst → a63cbfecf0f78586.tar.zst} +0 -0
  55. package/.turbo/cache/a6a56bb802e1c20f-meta.json +1 -1
  56. package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -1
  57. package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
  58. package/.turbo/cache/b2c66328fdd78093-meta.json +1 -0
  59. package/.turbo/cache/b2c66328fdd78093.tar.zst +0 -0
  60. package/.turbo/cache/b54fc4f664a7a5a0-meta.json +1 -1
  61. package/.turbo/cache/ba4418918621fbcd-meta.json +1 -1
  62. package/.turbo/cache/be7c23c37b8ec74b-meta.json +1 -1
  63. package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
  64. package/.turbo/cache/bffc7582905c2a5e-meta.json +1 -0
  65. package/.turbo/cache/bffc7582905c2a5e.tar.zst +0 -0
  66. package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +1 -1
  67. package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
  68. package/.turbo/cache/cc81de9c0b452a7c-meta.json +1 -1
  69. package/.turbo/cache/d39e6ef95ebc4cc0-meta.json +1 -0
  70. package/.turbo/cache/d39e6ef95ebc4cc0.tar.zst +0 -0
  71. package/.turbo/cache/d572ebb3c833e8f4-meta.json +1 -0
  72. package/.turbo/cache/d572ebb3c833e8f4.tar.zst +0 -0
  73. package/.turbo/cache/d61543843c932504-meta.json +1 -0
  74. package/.turbo/cache/d61543843c932504.tar.zst +0 -0
  75. package/.turbo/cache/dad1301ac69bcb85-meta.json +1 -1
  76. package/.turbo/cache/dea5945f55c6aba5-meta.json +1 -0
  77. package/.turbo/cache/dea5945f55c6aba5.tar.zst +0 -0
  78. package/.turbo/cache/e992dab20aeefbaf-meta.json +1 -1
  79. package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
  80. package/.turbo/cache/f411e2deb0676959-meta.json +1 -0
  81. package/.turbo/cache/f411e2deb0676959.tar.zst +0 -0
  82. package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -1
  83. package/.turbo/cache/fbbe2704bf9cb90b-meta.json +1 -1
  84. package/CHANGELOG.md +26 -0
  85. package/components/checkbox/.turbo/turbo-build.log +3 -3
  86. package/components/checkbox/.turbo/turbo-bundler.log +3 -3
  87. package/components/checkbox/demo/api.md +4 -2
  88. package/components/checkbox/demo/api.min.js +31 -36
  89. package/components/checkbox/demo/index.min.js +31 -36
  90. package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
  91. package/components/checkbox/dist/index.js +31 -36
  92. package/components/checkbox/src/auro-checkbox-group.js +2 -2
  93. package/components/combobox/.turbo/turbo-build.log +3 -3
  94. package/components/combobox/demo/api.md +17 -15
  95. package/components/combobox/demo/api.min.js +104 -116
  96. package/components/combobox/demo/index.min.js +104 -116
  97. package/components/combobox/dist/auro-combobox.d.ts +11 -4
  98. package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
  99. package/components/combobox/dist/index.js +103 -115
  100. package/components/combobox/src/auro-combobox.js +22 -20
  101. package/components/counter/.turbo/turbo-build.log +3 -3
  102. package/components/counter/.turbo/turbo-bundler.log +3 -3
  103. package/components/datepicker/.turbo/turbo-build.log +9 -8
  104. package/components/datepicker/demo/api.md +107 -87
  105. package/components/datepicker/demo/api.min.js +96 -130
  106. package/components/datepicker/demo/index.min.js +96 -130
  107. package/components/datepicker/dist/auro-datepicker.d.ts +6 -13
  108. package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
  109. package/components/datepicker/dist/index.js +96 -130
  110. package/components/datepicker/src/auro-datepicker.js +15 -35
  111. package/components/dropdown/.turbo/turbo-build.log +3 -3
  112. package/components/dropdown/.turbo/turbo-bundler.log +2 -2
  113. package/components/form/.turbo/turbo-build.log +3 -3
  114. package/components/form/.turbo/turbo-bundler.log +3 -3
  115. package/components/input/.turbo/turbo-build$colon$sass.log +51 -1
  116. package/components/input/.turbo/turbo-build.log +56 -6
  117. package/components/input/.turbo/turbo-bundler.log +3 -3
  118. package/components/input/.turbo/turbo-sass$colon$render.log +6 -0
  119. package/components/input/demo/api.md +83 -83
  120. package/components/input/demo/api.min.js +52 -61
  121. package/components/input/demo/index.md +6 -6
  122. package/components/input/demo/index.min.js +52 -61
  123. package/components/input/dist/auro-input.d.ts.map +1 -1
  124. package/components/input/dist/base-input.d.ts +5 -12
  125. package/components/input/dist/base-input.d.ts.map +1 -1
  126. package/components/input/dist/index.js +52 -61
  127. package/components/input/dist/styles/mixins-css.d.ts +3 -0
  128. package/components/input/dist/styles/mixins-css.d.ts.map +1 -0
  129. package/components/input/src/auro-input.js +0 -1
  130. package/components/input/src/base-input.js +22 -25
  131. package/components/input/src/styles/borders.scss +3 -19
  132. package/components/input/src/styles/color.css +1 -2
  133. package/components/input/src/styles/color.scss +3 -10
  134. package/components/input/src/styles/input-css.js +1 -1
  135. package/components/input/src/styles/input.css +1 -1
  136. package/components/input/src/styles/input.scss +4 -1
  137. package/components/input/src/styles/label-css.js +1 -1
  138. package/components/input/src/styles/label.css +1 -1
  139. package/components/input/src/styles/label.scss +4 -7
  140. package/components/input/src/styles/mixins-css.js +2 -0
  141. package/components/input/src/styles/mixins.css +1 -0
  142. package/components/input/src/styles/mixins.scss +45 -0
  143. package/components/input/src/styles/notificationIcons-css.js +1 -1
  144. package/components/input/src/styles/notificationIcons.css +13 -12
  145. package/components/input/src/styles/notificationIcons.scss +17 -25
  146. package/components/input/src/styles/style-css.js +1 -1
  147. package/components/input/src/styles/style.css +15 -17
  148. package/components/input/src/styles/style.scss +0 -4
  149. package/components/menu/.turbo/turbo-build.log +3 -3
  150. package/components/menu/.turbo/turbo-bundler.log +3 -3
  151. package/components/menu/demo/api.min.js +1 -1
  152. package/components/menu/demo/index.min.js +1 -1
  153. package/components/menu/dist/auro-menu.d.ts +1 -1
  154. package/components/menu/dist/index.js +1 -1
  155. package/components/menu/src/auro-menu.js +1 -1
  156. package/components/radio/.turbo/turbo-build.log +3 -3
  157. package/components/radio/.turbo/turbo-bundler.log +3 -3
  158. package/components/radio/demo/api.md +3 -1
  159. package/components/radio/demo/api.min.js +30 -35
  160. package/components/radio/demo/index.min.js +30 -35
  161. package/components/radio/dist/index.js +30 -35
  162. package/components/radio/src/auro-radio-group.js +1 -1
  163. package/components/select/.turbo/turbo-build.log +3 -3
  164. package/components/select/demo/api.md +7 -11
  165. package/components/select/demo/api.min.js +33 -60
  166. package/components/select/demo/index.min.js +33 -56
  167. package/components/select/dist/auro-select.d.ts +2 -2
  168. package/components/select/dist/auro-select.d.ts.map +1 -1
  169. package/components/select/dist/index.js +32 -55
  170. package/components/select/src/auro-select.js +3 -21
  171. package/package.json +1 -1
  172. package/packages/form-validation/src/validation.js +29 -34
  173. package/.turbo/cache/0663fcbb1d711029-meta.json +0 -1
  174. package/.turbo/cache/0663fcbb1d711029.tar.zst +0 -0
  175. package/.turbo/cache/0a2b0a4df8a0443f-meta.json +0 -1
  176. package/.turbo/cache/120c8e207aa1ba35-meta.json +0 -1
  177. package/.turbo/cache/120c8e207aa1ba35.tar.zst +0 -0
  178. package/.turbo/cache/17dd4bdef6550a07-meta.json +0 -1
  179. package/.turbo/cache/17dd4bdef6550a07.tar.zst +0 -0
  180. package/.turbo/cache/32c0b9995fb5f8dd-meta.json +0 -1
  181. package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
  182. package/.turbo/cache/47ba2b5ebdb579e9-meta.json +0 -1
  183. package/.turbo/cache/47ba2b5ebdb579e9.tar.zst +0 -0
  184. package/.turbo/cache/56cb35d4c7473a23-meta.json +0 -1
  185. package/.turbo/cache/56cb35d4c7473a23.tar.zst +0 -0
  186. package/.turbo/cache/626afdc67e0cb540-meta.json +0 -1
  187. package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
  188. package/.turbo/cache/6ef81cf9a66f982a-meta.json +0 -1
  189. package/.turbo/cache/6ef81cf9a66f982a.tar.zst +0 -0
  190. package/.turbo/cache/8b735250fa5a62bf-meta.json +0 -1
  191. package/.turbo/cache/8b735250fa5a62bf.tar.zst +0 -0
  192. package/.turbo/cache/9154e8fe6ab767ea-meta.json +0 -1
  193. package/.turbo/cache/9154e8fe6ab767ea.tar.zst +0 -0
  194. package/.turbo/cache/a49cc58242467fdc-meta.json +0 -1
  195. package/.turbo/cache/a49cc58242467fdc.tar.zst +0 -0
  196. package/.turbo/cache/af061e7a077a9ba5-meta.json +0 -1
  197. package/.turbo/cache/af061e7a077a9ba5.tar.zst +0 -0
  198. package/.turbo/cache/b50f1b283b4b81cd-meta.json +0 -1
  199. package/.turbo/cache/b50f1b283b4b81cd.tar.zst +0 -0
  200. package/.turbo/cache/bf85bc040b7e64db-meta.json +0 -1
  201. package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
  202. package/.turbo/cache/cd5f6987783fb56d-meta.json +0 -1
  203. package/.turbo/cache/cd5f6987783fb56d.tar.zst +0 -0
  204. package/.turbo/cache/ce67b6522dd09e64-meta.json +0 -1
  205. package/.turbo/cache/d716cb7a08152beb-meta.json +0 -1
  206. package/.turbo/cache/d716cb7a08152beb.tar.zst +0 -0
  207. package/.turbo/cache/d7a47b77deb3d9a4-meta.json +0 -1
  208. package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
  209. package/.turbo/cache/ff58f630c9d69af4-meta.json +0 -1
  210. package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
  211. /package/.turbo/cache/{0a2b0a4df8a0443f.tar.zst → 8e79bd5c3a16a72e.tar.zst} +0 -0
@@ -185,20 +185,20 @@ let AuroFormValidation$1 = class AuroFormValidation {
185
185
  const pattern = new RegExp(`^${elem.pattern}$`, 'u');
186
186
 
187
187
  if (!pattern.test(elem.value)) {
188
- elem.validity = 'badInput';
189
- elem.setCustomValidity = elem.setCustomValidityBadInput || '';
188
+ elem.validity = 'patternMismatch';
189
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
190
190
  }
191
191
  }
192
192
 
193
193
  // Length > 0 is required to prevent the error message from showing when the input is empty
194
194
  if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
195
195
  elem.validity = 'tooShort';
196
- elem.setCustomValidity = elem.setCustomValidityTooShort || '';
196
+ elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
197
197
  }
198
198
 
199
199
  if (elem.value?.length > elem.maxLength) {
200
200
  elem.validity = 'tooLong';
201
- elem.setCustomValidity = elem.setCustomValidityTooLong || '';
201
+ elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
202
202
  }
203
203
  }
204
204
 
@@ -214,33 +214,32 @@ let AuroFormValidation$1 = class AuroFormValidation {
214
214
  const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
215
215
 
216
216
  if (!elem.value.match(emailRegex)) {
217
- elem.validity = 'badInput';
218
- elem.setCustomValidity = elem.setCustomValidityForType || '';
217
+ elem.validity = 'patternMismatch';
218
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
219
219
  }
220
220
  } else if (elem.type === 'credit-card') {
221
221
  if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
222
222
  elem.validity = 'tooShort';
223
- elem.setCustomValidity = elem.setCustomValidityForType || '';
223
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
224
224
  }
225
225
  } else if (elem.type === 'number') {
226
226
  if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
227
227
  elem.validity = 'rangeOverflow';
228
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
228
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
229
229
  }
230
230
 
231
- if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
231
+ if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
232
232
  elem.validity = 'rangeUnderflow';
233
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
233
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
234
234
  }
235
-
236
235
  } else if (elem.type === 'month-day-year' ||
237
236
  elem.type === 'month-year' ||
238
237
  elem.type === 'month-fullYear' ||
239
238
  elem.type === 'year-month-day'
240
239
  ) {
241
- if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
240
+ if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
242
241
  elem.validity = 'tooShort';
243
- elem.setCustomValidity = elem.setCustomValidityForType || '';
242
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
244
243
  } else {
245
244
  const valueDate = new Date(elem.value);
246
245
 
@@ -250,7 +249,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
250
249
 
251
250
  if (valueDate > maxDate) {
252
251
  elem.validity = 'rangeOverflow';
253
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
252
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
254
253
  }
255
254
  }
256
255
 
@@ -260,7 +259,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
260
259
 
261
260
  if (valueDate < minDate) {
262
261
  elem.validity = 'rangeUnderflow';
263
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
262
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
264
263
  }
265
264
  }
266
265
  }
@@ -283,10 +282,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
283
282
 
284
283
  if (elem.hasAttribute('error')) {
285
284
  elem.validity = 'customError';
286
- elem.setCustomValidity = elem.error;
285
+ elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
287
286
  } else if (validationShouldRun) {
288
287
  elem.validity = 'valid';
289
- elem.setCustomValidity = '';
288
+ elem.errorMessage = '';
290
289
 
291
290
  /**
292
291
  * Only validate once we interact with the datepicker
@@ -298,7 +297,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
298
297
  let hasValue = elem.value && elem.value.length > 0;
299
298
 
300
299
  // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
301
- if (this.auroInputElements && this.auroInputElements.length === 2) {
300
+ if (this.auroInputElements?.length === 2) {
302
301
  if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
303
302
  hasValue = false;
304
303
  }
@@ -306,31 +305,27 @@ let AuroFormValidation$1 = class AuroFormValidation {
306
305
 
307
306
  if (!hasValue && elem.required) {
308
307
  elem.validity = 'valueMissing';
309
- elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
308
+ elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
310
309
  } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
311
310
  this.validateType(elem);
312
311
  this.validateAttributes(elem);
313
312
  }
314
313
  }
315
314
 
316
- if (this.auroInputElements && this.auroInputElements.length > 0) {
315
+ if (this.auroInputElements?.length > 0) {
317
316
  elem.validity = this.auroInputElements[0].validity;
318
- elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
317
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
319
318
 
320
- if (elem.validity === 'valid') {
321
- if (this.auroInputElements.length > 1) {
322
- elem.validity = this.auroInputElements[1].validity;
323
- elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
324
- }
319
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
320
+ elem.validity = this.auroInputElements[1].validity;
321
+ elem.errorMessage = this.auroInputElements[1].errorMessage;
325
322
  }
326
323
  }
327
324
 
328
325
  if (validationShouldRun || elem.hasAttribute('error')) {
329
- if (elem.validity && elem.validity !== 'valid') {
330
- // Use the validity message override if it is declared
331
- if (elem.ValidityMessageOverride) {
332
- elem.setCustomValidity = elem.ValidityMessageOverride;
333
- }
326
+ // Use the validity message override if it is declared
327
+ if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
328
+ elem.errorMessage = elem.ValidityMessageOverride;
334
329
  }
335
330
 
336
331
  this.getErrorMessage(elem);
@@ -376,18 +371,18 @@ let AuroFormValidation$1 = class AuroFormValidation {
376
371
  if (elem.validity !== 'valid') {
377
372
  if (elem.setCustomValidity) {
378
373
  elem.errorMessage = elem.setCustomValidity;
379
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
374
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
380
375
  const input = elem.renderRoot.querySelector('input');
381
376
 
382
377
  if (input.validationMessage.length > 0) {
383
378
  elem.errorMessage = input.validationMessage;
384
379
  }
385
- } else if (this.inputElements && this.inputElements.length > 0) {
380
+ } else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
386
381
  const firstInput = this.inputElements[0];
387
382
 
388
383
  if (firstInput.validationMessage.length > 0) {
389
384
  elem.errorMessage = firstInput.validationMessage;
390
- } else if (this.inputElements.length === 2) {
385
+ } else if (this.inputElements?.length === 2) {
391
386
  const secondInput = this.inputElements[1];
392
387
 
393
388
  if (secondInput.validationMessage.length > 0) {
@@ -3412,7 +3407,7 @@ const t=globalThis,e$1=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShad
3412
3407
  * SPDX-License-Identifier: BSD-3-Clause
3413
3408
  */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");
3414
3409
 
3415
- 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)}`;
3410
+ 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)}`;
3416
3411
 
3417
3412
  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)}`;
3418
3413
 
@@ -5089,20 +5084,20 @@ class AuroFormValidation {
5089
5084
  const pattern = new RegExp(`^${elem.pattern}$`, 'u');
5090
5085
 
5091
5086
  if (!pattern.test(elem.value)) {
5092
- elem.validity = 'badInput';
5093
- elem.setCustomValidity = elem.setCustomValidityBadInput || '';
5087
+ elem.validity = 'patternMismatch';
5088
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
5094
5089
  }
5095
5090
  }
5096
5091
 
5097
5092
  // Length > 0 is required to prevent the error message from showing when the input is empty
5098
5093
  if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
5099
5094
  elem.validity = 'tooShort';
5100
- elem.setCustomValidity = elem.setCustomValidityTooShort || '';
5095
+ elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
5101
5096
  }
5102
5097
 
5103
5098
  if (elem.value?.length > elem.maxLength) {
5104
5099
  elem.validity = 'tooLong';
5105
- elem.setCustomValidity = elem.setCustomValidityTooLong || '';
5100
+ elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
5106
5101
  }
5107
5102
  }
5108
5103
 
@@ -5118,33 +5113,32 @@ class AuroFormValidation {
5118
5113
  const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
5119
5114
 
5120
5115
  if (!elem.value.match(emailRegex)) {
5121
- elem.validity = 'badInput';
5122
- elem.setCustomValidity = elem.setCustomValidityForType || '';
5116
+ elem.validity = 'patternMismatch';
5117
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
5123
5118
  }
5124
5119
  } else if (elem.type === 'credit-card') {
5125
5120
  if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
5126
5121
  elem.validity = 'tooShort';
5127
- elem.setCustomValidity = elem.setCustomValidityForType || '';
5122
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
5128
5123
  }
5129
5124
  } else if (elem.type === 'number') {
5130
5125
  if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
5131
5126
  elem.validity = 'rangeOverflow';
5132
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
5127
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
5133
5128
  }
5134
5129
 
5135
- if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
5130
+ if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
5136
5131
  elem.validity = 'rangeUnderflow';
5137
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
5132
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
5138
5133
  }
5139
-
5140
5134
  } else if (elem.type === 'month-day-year' ||
5141
5135
  elem.type === 'month-year' ||
5142
5136
  elem.type === 'month-fullYear' ||
5143
5137
  elem.type === 'year-month-day'
5144
5138
  ) {
5145
- if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
5139
+ if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
5146
5140
  elem.validity = 'tooShort';
5147
- elem.setCustomValidity = elem.setCustomValidityForType || '';
5141
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
5148
5142
  } else {
5149
5143
  const valueDate = new Date(elem.value);
5150
5144
 
@@ -5154,7 +5148,7 @@ class AuroFormValidation {
5154
5148
 
5155
5149
  if (valueDate > maxDate) {
5156
5150
  elem.validity = 'rangeOverflow';
5157
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
5151
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
5158
5152
  }
5159
5153
  }
5160
5154
 
@@ -5164,7 +5158,7 @@ class AuroFormValidation {
5164
5158
 
5165
5159
  if (valueDate < minDate) {
5166
5160
  elem.validity = 'rangeUnderflow';
5167
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
5161
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
5168
5162
  }
5169
5163
  }
5170
5164
  }
@@ -5187,10 +5181,10 @@ class AuroFormValidation {
5187
5181
 
5188
5182
  if (elem.hasAttribute('error')) {
5189
5183
  elem.validity = 'customError';
5190
- elem.setCustomValidity = elem.error;
5184
+ elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
5191
5185
  } else if (validationShouldRun) {
5192
5186
  elem.validity = 'valid';
5193
- elem.setCustomValidity = '';
5187
+ elem.errorMessage = '';
5194
5188
 
5195
5189
  /**
5196
5190
  * Only validate once we interact with the datepicker
@@ -5202,7 +5196,7 @@ class AuroFormValidation {
5202
5196
  let hasValue = elem.value && elem.value.length > 0;
5203
5197
 
5204
5198
  // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
5205
- if (this.auroInputElements && this.auroInputElements.length === 2) {
5199
+ if (this.auroInputElements?.length === 2) {
5206
5200
  if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
5207
5201
  hasValue = false;
5208
5202
  }
@@ -5210,31 +5204,27 @@ class AuroFormValidation {
5210
5204
 
5211
5205
  if (!hasValue && elem.required) {
5212
5206
  elem.validity = 'valueMissing';
5213
- elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
5207
+ elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
5214
5208
  } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
5215
5209
  this.validateType(elem);
5216
5210
  this.validateAttributes(elem);
5217
5211
  }
5218
5212
  }
5219
5213
 
5220
- if (this.auroInputElements && this.auroInputElements.length > 0) {
5214
+ if (this.auroInputElements?.length > 0) {
5221
5215
  elem.validity = this.auroInputElements[0].validity;
5222
- elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
5216
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
5223
5217
 
5224
- if (elem.validity === 'valid') {
5225
- if (this.auroInputElements.length > 1) {
5226
- elem.validity = this.auroInputElements[1].validity;
5227
- elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
5228
- }
5218
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
5219
+ elem.validity = this.auroInputElements[1].validity;
5220
+ elem.errorMessage = this.auroInputElements[1].errorMessage;
5229
5221
  }
5230
5222
  }
5231
5223
 
5232
5224
  if (validationShouldRun || elem.hasAttribute('error')) {
5233
- if (elem.validity && elem.validity !== 'valid') {
5234
- // Use the validity message override if it is declared
5235
- if (elem.ValidityMessageOverride) {
5236
- elem.setCustomValidity = elem.ValidityMessageOverride;
5237
- }
5225
+ // Use the validity message override if it is declared
5226
+ if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
5227
+ elem.errorMessage = elem.ValidityMessageOverride;
5238
5228
  }
5239
5229
 
5240
5230
  this.getErrorMessage(elem);
@@ -5280,18 +5270,18 @@ class AuroFormValidation {
5280
5270
  if (elem.validity !== 'valid') {
5281
5271
  if (elem.setCustomValidity) {
5282
5272
  elem.errorMessage = elem.setCustomValidity;
5283
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
5273
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
5284
5274
  const input = elem.renderRoot.querySelector('input');
5285
5275
 
5286
5276
  if (input.validationMessage.length > 0) {
5287
5277
  elem.errorMessage = input.validationMessage;
5288
5278
  }
5289
- } else if (this.inputElements && this.inputElements.length > 0) {
5279
+ } else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
5290
5280
  const firstInput = this.inputElements[0];
5291
5281
 
5292
5282
  if (firstInput.validationMessage.length > 0) {
5293
5283
  elem.errorMessage = firstInput.validationMessage;
5294
- } else if (this.inputElements.length === 2) {
5284
+ } else if (this.inputElements?.length === 2) {
5295
5285
  const secondInput = this.inputElements[1];
5296
5286
 
5297
5287
  if (secondInput.validationMessage.length > 0) {
@@ -5319,8 +5309,7 @@ class AuroFormValidation {
5319
5309
  * @attr {Boolean} bordered - Applies bordered UI variant.
5320
5310
  * @attr {Boolean} borderless - Applies borderless UI variant.
5321
5311
  * @attr {Boolean} disabled - If set, disables the input.
5322
- * @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
5323
- * @prop {String} errorMessage - Contains the help text message for the current validity error.
5312
+ * @attr {String} error - When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
5324
5313
  * @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.
5325
5314
  * @attr {String} id - Sets the unique ID of the element.
5326
5315
  * @attr {String} lang - defines the language of an element.
@@ -5334,10 +5323,10 @@ class AuroFormValidation {
5334
5323
  * @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
5335
5324
  * @attr {String} pattern - Specifies a regular expression the form control's value should match.
5336
5325
  * @attr {String} placeholder - Define custom placeholder text, only supported by date input formats.
5337
- * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
5326
+ * @attr {String} setCustomValidity - Sets a custom help text message to display for all validity states.
5338
5327
  * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
5339
5328
  * @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
5340
- * @attr {String} setCustomValidityBadInput - Custom help text message to display when validity = `badInput`.
5329
+ * @attr {String} setCustomValidityPatternMismatch - Custom help text message to display when validity = `patternMismatch`.
5341
5330
  * @attr {String} setCustomValidityTooShort - Custom help text message to display when validity = `tooShort`.
5342
5331
  * @attr {String} setCustomValidityTooLong - Custom help text message to display when validity = `tooLong`.
5343
5332
  * @attr {String} setCustomValidityForType - Custom help text message to display for the declared element `type` and type validity fails.
@@ -5483,20 +5472,18 @@ class BaseInput extends r {
5483
5472
  type: String,
5484
5473
  reflect: true
5485
5474
  },
5486
- errorMessage: { type: String },
5487
5475
  validity: {
5488
5476
  type: String,
5489
5477
  reflect: true
5490
5478
  },
5491
- setCustomValidity: { type: String },
5492
- setCustomValidityCustomError: { type: String },
5493
- setCustomValidityValueMissing: { type: String },
5494
- setCustomValidityBadInput: { type: String },
5495
- setCustomValidityTooShort: { type: String },
5496
- setCustomValidityTooLong: { type: String },
5497
- setCustomValidityRangeOverflow: { type: String},
5498
- setCustomValidityRangeUnderflow: { type: String},
5499
- customValidityTypeEmail: { type: String }
5479
+ setCustomValidity: { type: String },
5480
+ setCustomValidityCustomError: { type: String },
5481
+ setCustomValidityValueMissing: { type: String },
5482
+ setCustomValidityPatternMismatch: { type: String },
5483
+ setCustomValidityTooShort: { type: String },
5484
+ setCustomValidityTooLong: { type: String },
5485
+ setCustomValidityRangeOverflow: { type: String },
5486
+ setCustomValidityRangeUnderflow: { type: String }
5500
5487
  };
5501
5488
  }
5502
5489
 
@@ -6124,7 +6111,7 @@ class BaseInput extends r {
6124
6111
  this.maxLength = card.formatLength;
6125
6112
  this.minLength = card.formatMinLength;
6126
6113
 
6127
- this.setCustomValidity = card.setCustomValidity;
6114
+ this.errorMessage = card.errorMessage;
6128
6115
 
6129
6116
  if (this.icon) {
6130
6117
  this.inputIconName = card.cardIcon;
@@ -6144,63 +6131,63 @@ class BaseInput extends r {
6144
6131
  name: 'Airlines',
6145
6132
  regex: /^(?<num>1|2)\d{0}/u,
6146
6133
  formatMinLength: 17,
6147
- setCustomValidity: CreditCardValidationMessage,
6134
+ errorMessage: CreditCardValidationMessage,
6148
6135
  cardIcon: 'credit-card'
6149
6136
  },
6150
6137
  {
6151
6138
  name: 'Commercial',
6152
6139
  regex: /^(?<num>2)\d{0}/u,
6153
6140
  formatMinLength: 8,
6154
- setCustomValidity: CreditCardValidationMessage,
6141
+ errorMessage: CreditCardValidationMessage,
6155
6142
  cardIcon: 'credit-card'
6156
6143
  },
6157
6144
  {
6158
6145
  name: 'Alaska Commercial',
6159
6146
  regex: /^(?<num>27)\d{0}/u,
6160
6147
  formatMinLength: 8,
6161
- setCustomValidity: CreditCardValidationMessage,
6148
+ errorMessage: CreditCardValidationMessage,
6162
6149
  cardIcon: 'cc-alaska'
6163
6150
  },
6164
6151
  {
6165
6152
  name: 'American Express',
6166
6153
  regex: /^(?<num>34|37)\d{0}/u,
6167
6154
  formatLength: 17,
6168
- setCustomValidity: CreditCardValidationMessage,
6155
+ errorMessage: CreditCardValidationMessage,
6169
6156
  cardIcon: 'cc-amex'
6170
6157
  },
6171
6158
  {
6172
6159
  name: 'Diners club',
6173
6160
  regex: /^(?<num>36|38)\d{0}/u,
6174
6161
  formatLength: 16,
6175
- setCustomValidity: CreditCardValidationMessage,
6162
+ errorMessage: CreditCardValidationMessage,
6176
6163
  cardIcon: 'credit-card'
6177
6164
  },
6178
6165
  {
6179
6166
  name: 'Visa',
6180
6167
  regex: /^(?<num>4)\d{0}/u,
6181
6168
  formatLength: 19,
6182
- setCustomValidity: CreditCardValidationMessage,
6169
+ errorMessage: CreditCardValidationMessage,
6183
6170
  cardIcon: 'cc-visa'
6184
6171
  },
6185
6172
  {
6186
6173
  name: 'Alaska Airlines Visa',
6187
6174
  regex: /^(?<num>4147\s34|4888\s93|4800\s11|4313\s51|4313\s07)\d{0}/u,
6188
6175
  formatLength: 19,
6189
- setCustomValidity: CreditCardValidationMessage,
6176
+ errorMessage: CreditCardValidationMessage,
6190
6177
  cardIcon: 'cc-alaska'
6191
6178
  },
6192
6179
  {
6193
6180
  name: 'Master Card',
6194
6181
  regex: /^(?<num>5)\d{0}/u,
6195
6182
  formatLength: 19,
6196
- setCustomValidity: CreditCardValidationMessage,
6183
+ errorMessage: CreditCardValidationMessage,
6197
6184
  cardIcon: 'cc-mastercard'
6198
6185
  },
6199
6186
  {
6200
6187
  name: 'Discover Card',
6201
6188
  regex: /^(?<num>6)\d{0}/u,
6202
6189
  formatLength: 19,
6203
- setCustomValidity: CreditCardValidationMessage,
6190
+ errorMessage: CreditCardValidationMessage,
6204
6191
  cardIcon: 'cc-discover'
6205
6192
  }
6206
6193
  ];
@@ -6208,7 +6195,7 @@ class BaseInput extends r {
6208
6195
  let type = {
6209
6196
  name: 'Default Card',
6210
6197
  formatLength: 19,
6211
- setCustomValidity: CreditCardValidationMessage,
6198
+ errorMessage: CreditCardValidationMessage,
6212
6199
  cardIcon: 'credit-card'
6213
6200
  };
6214
6201
 
@@ -7233,7 +7220,6 @@ class AuroInput extends BaseInput {
7233
7220
  <p class="inputElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
7234
7221
  ${this.errorMessage}
7235
7222
  </p>`
7236
-
7237
7223
  }
7238
7224
  `;
7239
7225
  }
@@ -7254,9 +7240,11 @@ var styleCss = i$b`.util_displayInline{display:inline}.util_displayInlineBlock{d
7254
7240
  * @prop {Object} optionSelected - Specifies the current selected option.
7255
7241
  * @prop {String} value - Value selected for the dropdown menu.
7256
7242
  * @prop {Boolean} checkmark - When attribute is present auro-menu will apply checkmarks to selected options.
7257
- * @attr {Boolean} error - Sets a persistent error state (e.g. an error state returned from the server).
7243
+ * @attr {String} error - When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
7258
7244
  * @attr {String} validity - Specifies the `validityState` this element is in.
7259
7245
  * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
7246
+ * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
7247
+ * @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
7260
7248
  * @attr {Boolean} disabled - If set, disables the combobox.
7261
7249
  * @attr {Boolean} noFilter - If set, combobox will not filter menuoptions based in input.
7262
7250
  * @attr {Boolean} noValidate - If set, disables auto-validation on blur.
@@ -7322,12 +7310,17 @@ class AuroCombobox extends r$6 {
7322
7310
  return {
7323
7311
  // ...super.properties,
7324
7312
  error: {
7325
- type: Boolean,
7313
+ type: String,
7326
7314
  reflect: true
7327
7315
  },
7328
7316
  setCustomValidity: {
7329
- type: String,
7330
- reflect: true
7317
+ type: String
7318
+ },
7319
+ setCustomValidityCustomError: {
7320
+ type: String
7321
+ },
7322
+ setCustomValidityValueMissing: {
7323
+ type: String
7331
7324
  },
7332
7325
  validity: {
7333
7326
  type: String,
@@ -7611,9 +7604,7 @@ class AuroCombobox extends r$6 {
7611
7604
  });
7612
7605
 
7613
7606
  this.menu.addEventListener('auroMenu-selectValueReset', () => {
7614
- this.optionSelected = undefined;
7615
- this.value = undefined;
7616
- this.validation.validate(this);
7607
+ this.reset();
7617
7608
  });
7618
7609
  }
7619
7610
 
@@ -7691,7 +7682,7 @@ class AuroCombobox extends r$6 {
7691
7682
  });
7692
7683
 
7693
7684
  this.input.addEventListener('auroFormElement-validated', (evt) => {
7694
- this.auroInputHelpText = evt.detail.message;
7685
+ this.errorMessage = evt.detail.message;
7695
7686
  });
7696
7687
  }
7697
7688
 
@@ -7835,9 +7826,6 @@ class AuroCombobox extends r$6 {
7835
7826
  * @returns {void}
7836
7827
  */
7837
7828
  reset() {
7838
- // Resets the help text of the combobox
7839
- this.auroInputHelpText = undefined;
7840
-
7841
7829
  this.input.reset();
7842
7830
  this.validation.reset(this);
7843
7831
  }
@@ -7870,10 +7858,6 @@ class AuroCombobox extends r$6 {
7870
7858
  this.input.setAttribute('error', this.getAttribute('error'));
7871
7859
  this.validation.validate(this);
7872
7860
  }
7873
-
7874
- if (changedProperties.has('setCustomValidity')) {
7875
- this.input.setAttribute('setCustomValidity', this.setCustomValidity);
7876
- }
7877
7861
  }
7878
7862
 
7879
7863
  /**
@@ -7927,19 +7911,23 @@ class AuroCombobox extends r$6 {
7927
7911
  ?noValidate="${this.noValidate}"
7928
7912
  ?disabled="${this.disabled}"
7929
7913
  ?icon="${this.triggerIcon}"
7914
+ setCustomValidity="${this.setCustomValidity}"
7915
+ setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
7916
+ setCustomValidityCustomError="${this.setCustomValidityCustomError}"
7930
7917
  .type="${this.type}">
7931
7918
  <slot name="label" slot="label"></slot>
7932
7919
  </${this.inputTag}>
7933
7920
  <div class="menuWrapper">
7934
7921
  </div>
7935
7922
  <span slot="helpText">
7936
- ${this.auroInputHelpText
7923
+ <!-- Help text and error message template -->
7924
+ ${!this.validity || this.validity === undefined || this.validity === 'valid'
7937
7925
  ? u$6`
7938
- ${this.auroInputHelpText}
7939
- `
7940
- : u$6`
7941
7926
  <slot name="helpText"></slot>
7942
- `
7927
+ ` : u$6`
7928
+ <p role="alert" aria-live="assertive" part="helpText">
7929
+ ${this.errorMessage}
7930
+ </p>`
7943
7931
  }
7944
7932
  </span>
7945
7933
  </${this.dropdownTag}>