@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
@@ -145,20 +145,20 @@ let AuroFormValidation$1 = class AuroFormValidation {
145
145
  const pattern = new RegExp(`^${elem.pattern}$`, 'u');
146
146
 
147
147
  if (!pattern.test(elem.value)) {
148
- elem.validity = 'badInput';
149
- elem.setCustomValidity = elem.setCustomValidityBadInput || '';
148
+ elem.validity = 'patternMismatch';
149
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
150
150
  }
151
151
  }
152
152
 
153
153
  // Length > 0 is required to prevent the error message from showing when the input is empty
154
154
  if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
155
155
  elem.validity = 'tooShort';
156
- elem.setCustomValidity = elem.setCustomValidityTooShort || '';
156
+ elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
157
157
  }
158
158
 
159
159
  if (elem.value?.length > elem.maxLength) {
160
160
  elem.validity = 'tooLong';
161
- elem.setCustomValidity = elem.setCustomValidityTooLong || '';
161
+ elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
162
162
  }
163
163
  }
164
164
 
@@ -174,33 +174,32 @@ let AuroFormValidation$1 = class AuroFormValidation {
174
174
  const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
175
175
 
176
176
  if (!elem.value.match(emailRegex)) {
177
- elem.validity = 'badInput';
178
- elem.setCustomValidity = elem.setCustomValidityForType || '';
177
+ elem.validity = 'patternMismatch';
178
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
179
179
  }
180
180
  } else if (elem.type === 'credit-card') {
181
181
  if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
182
182
  elem.validity = 'tooShort';
183
- elem.setCustomValidity = elem.setCustomValidityForType || '';
183
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
184
184
  }
185
185
  } else if (elem.type === 'number') {
186
186
  if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
187
187
  elem.validity = 'rangeOverflow';
188
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
188
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
189
189
  }
190
190
 
191
- if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
191
+ if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
192
192
  elem.validity = 'rangeUnderflow';
193
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
193
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
194
194
  }
195
-
196
195
  } else if (elem.type === 'month-day-year' ||
197
196
  elem.type === 'month-year' ||
198
197
  elem.type === 'month-fullYear' ||
199
198
  elem.type === 'year-month-day'
200
199
  ) {
201
- if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
200
+ if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
202
201
  elem.validity = 'tooShort';
203
- elem.setCustomValidity = elem.setCustomValidityForType || '';
202
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
204
203
  } else {
205
204
  const valueDate = new Date(elem.value);
206
205
 
@@ -210,7 +209,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
210
209
 
211
210
  if (valueDate > maxDate) {
212
211
  elem.validity = 'rangeOverflow';
213
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
212
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
214
213
  }
215
214
  }
216
215
 
@@ -220,7 +219,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
220
219
 
221
220
  if (valueDate < minDate) {
222
221
  elem.validity = 'rangeUnderflow';
223
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
222
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
224
223
  }
225
224
  }
226
225
  }
@@ -243,10 +242,10 @@ let AuroFormValidation$1 = class AuroFormValidation {
243
242
 
244
243
  if (elem.hasAttribute('error')) {
245
244
  elem.validity = 'customError';
246
- elem.setCustomValidity = elem.error;
245
+ elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
247
246
  } else if (validationShouldRun) {
248
247
  elem.validity = 'valid';
249
- elem.setCustomValidity = '';
248
+ elem.errorMessage = '';
250
249
 
251
250
  /**
252
251
  * Only validate once we interact with the datepicker
@@ -258,7 +257,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
258
257
  let hasValue = elem.value && elem.value.length > 0;
259
258
 
260
259
  // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
261
- if (this.auroInputElements && this.auroInputElements.length === 2) {
260
+ if (this.auroInputElements?.length === 2) {
262
261
  if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
263
262
  hasValue = false;
264
263
  }
@@ -266,31 +265,27 @@ let AuroFormValidation$1 = class AuroFormValidation {
266
265
 
267
266
  if (!hasValue && elem.required) {
268
267
  elem.validity = 'valueMissing';
269
- elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
268
+ elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
270
269
  } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
271
270
  this.validateType(elem);
272
271
  this.validateAttributes(elem);
273
272
  }
274
273
  }
275
274
 
276
- if (this.auroInputElements && this.auroInputElements.length > 0) {
275
+ if (this.auroInputElements?.length > 0) {
277
276
  elem.validity = this.auroInputElements[0].validity;
278
- elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
277
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
279
278
 
280
- if (elem.validity === 'valid') {
281
- if (this.auroInputElements.length > 1) {
282
- elem.validity = this.auroInputElements[1].validity;
283
- elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
284
- }
279
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
280
+ elem.validity = this.auroInputElements[1].validity;
281
+ elem.errorMessage = this.auroInputElements[1].errorMessage;
285
282
  }
286
283
  }
287
284
 
288
285
  if (validationShouldRun || elem.hasAttribute('error')) {
289
- if (elem.validity && elem.validity !== 'valid') {
290
- // Use the validity message override if it is declared
291
- if (elem.ValidityMessageOverride) {
292
- elem.setCustomValidity = elem.ValidityMessageOverride;
293
- }
286
+ // Use the validity message override if it is declared
287
+ if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
288
+ elem.errorMessage = elem.ValidityMessageOverride;
294
289
  }
295
290
 
296
291
  this.getErrorMessage(elem);
@@ -336,18 +331,18 @@ let AuroFormValidation$1 = class AuroFormValidation {
336
331
  if (elem.validity !== 'valid') {
337
332
  if (elem.setCustomValidity) {
338
333
  elem.errorMessage = elem.setCustomValidity;
339
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
334
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
340
335
  const input = elem.renderRoot.querySelector('input');
341
336
 
342
337
  if (input.validationMessage.length > 0) {
343
338
  elem.errorMessage = input.validationMessage;
344
339
  }
345
- } else if (this.inputElements && this.inputElements.length > 0) {
340
+ } else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
346
341
  const firstInput = this.inputElements[0];
347
342
 
348
343
  if (firstInput.validationMessage.length > 0) {
349
344
  elem.errorMessage = firstInput.validationMessage;
350
- } else if (this.inputElements.length === 2) {
345
+ } else if (this.inputElements?.length === 2) {
351
346
  const secondInput = this.inputElements[1];
352
347
 
353
348
  if (secondInput.validationMessage.length > 0) {
@@ -12851,7 +12846,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
12851
12846
 
12852
12847
  var iconVersion$1 = '6.1.2';
12853
12848
 
12854
- var styleCss$1$1 = i$3$1`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);white-space:normal}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
12849
+ var styleCss$1$1 = i$3$1`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}.label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
12855
12850
 
12856
12851
  var colorCss$1$1 = i$3$1`.label{color:var(--ds-auro-dropdown-label-text-color)}.trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}.trigger:focus-within:not(:active){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);outline:1px solid var(--ds-color-border-ui-focus-default, #2c67b5)}.trigger:hover{--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}.helpText{color:var(--ds-auro-dropdown-help-text-color)}:host([disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-ui-disabled-default, #adadad);--ds-auro-dropdown-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host([common]),:host([bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-primary-default, #585e67)}:host([common]) .trigger:active,:host([common]) .trigger:focus-within,:host([bordered]) .trigger:active,:host([bordered]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host([error]){--ds-auro-dropdown-help-text-color: var(--ds-color-text-error-default, #cc1816);--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-error-default, #cc1816)}:host([error]) .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([error]) .trigger:focus-within,:host([error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}:host([error]) .trigger:active{box-shadow:none;outline:none}:host([disabled][common]),:host([disabled][bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}`;
12857
12852
 
@@ -12875,9 +12870,6 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
12875
12870
  ];
12876
12871
 
12877
12872
  /**
12878
- * @attr { Boolean } common - If declared, will apply all styles for the common theme.
12879
- * @attr { Boolean } rounded - If declared, will apply border-radius to the bib.
12880
- * @attr { Boolean } inset - If declared, will apply extra padding to bib content.
12881
12873
  * @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.
12882
12874
  * @csspart bibContainer - Apply css to the bib container.
12883
12875
  */
@@ -12903,14 +12895,26 @@ class AuroDropdownBib extends r$5 {
12903
12895
 
12904
12896
  static get properties() {
12905
12897
  return {
12898
+
12899
+ /**
12900
+ * If declared, will apply all styles for the common theme.
12901
+ */
12906
12902
  common: {
12907
12903
  type: Boolean,
12908
12904
  reflect: true
12909
12905
  },
12906
+
12907
+ /**
12908
+ * If declared, will apply extra padding to bib content.
12909
+ */
12910
12910
  inset: {
12911
12911
  type: Boolean,
12912
12912
  reflect: true
12913
12913
  },
12914
+
12915
+ /**
12916
+ * If declared, will apply border-radius to the bib.
12917
+ */
12914
12918
  rounded: {
12915
12919
  type: Boolean,
12916
12920
  reflect: true
@@ -12954,22 +12958,7 @@ if (!customElements.get("auro-dropdownbib")) {
12954
12958
 
12955
12959
 
12956
12960
  /**
12957
- * @attr { Boolean } bordered - If declared, applies a border around the trigger slot.
12958
- * @attr { Boolean } common - If declared, the dropdown will be styled with the common theme.
12959
- * @attr { Boolean } chevron - If declared, the dropdown displays an display state chevron on the right.
12960
- * @attr { Boolean } disabled - If declared, the dropdown is not interactive.
12961
12961
  * @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
12962
- * @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
12963
- * @attr {Boolean} fluid - Makes the trigger to be full width of its parent container
12964
- * @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
12965
- * @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
12966
- * @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
12967
- * @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
12968
- * @attr { Boolean } noToggle - If declared, the trigger will only show the dropdown bib.
12969
- * @attr { Boolean } focusShow - if declared, the bib will display when focus is applied to the trigger.
12970
- * @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
12971
- * @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.
12972
- * @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
12973
12962
  * @slot - Default slot for the popover content.
12974
12963
  * @slot label - Defines the content of the label.
12975
12964
  * @slot helpText - Defines the content of the helpText.
@@ -13007,6 +12996,16 @@ class AuroDropdown extends r$5 {
13007
12996
  this.tabIndex = 0;
13008
12997
  this.noToggle = false;
13009
12998
 
12999
+ /**
13000
+ * @private
13001
+ */
13002
+ this.hasTriggerContent = false;
13003
+
13004
+ /**
13005
+ * @private
13006
+ */
13007
+ this.triggerContentSlot = undefined;
13008
+
13010
13009
  /**
13011
13010
  * @private
13012
13011
  */
@@ -13053,89 +13052,166 @@ class AuroDropdown extends r$5 {
13053
13052
  // function to define props used within the scope of this component
13054
13053
  static get properties() {
13055
13054
  return {
13055
+
13056
+ /**
13057
+ * If declared, applies a border around the trigger slot.
13058
+ */
13056
13059
  bordered: {
13057
13060
  type: Boolean,
13058
13061
  reflect: true
13059
13062
  },
13063
+
13064
+ /**
13065
+ * If declared, the dropdown displays a chevron on the right.
13066
+ * @attr {Boolean} chevron
13067
+ */
13060
13068
  chevron: {
13061
13069
  type: Boolean,
13062
13070
  reflect: true
13063
13071
  },
13064
- disabled: {
13072
+
13073
+ /**
13074
+ * If declared, the dropdown will be styled with the common theme.
13075
+ */
13076
+ common: {
13065
13077
  type: Boolean,
13066
13078
  reflect: true
13067
13079
  },
13068
- error: {
13080
+
13081
+ /**
13082
+ * If declared, the dropdown is not interactive.
13083
+ */
13084
+ disabled: {
13069
13085
  type: Boolean,
13070
13086
  reflect: true
13071
13087
  },
13072
- fluid: {
13088
+
13089
+ /**
13090
+ * @private
13091
+ */
13092
+ dropdownWidth: {
13093
+ type: Number
13094
+ },
13095
+
13096
+ /**
13097
+ * If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
13098
+ */
13099
+ error: {
13073
13100
  type: Boolean,
13074
- reflect: true,
13101
+ reflect: true
13075
13102
  },
13103
+
13104
+ /**
13105
+ * If declared, the bib will display when focus is applied to the trigger.
13106
+ */
13076
13107
  focusShow: {
13077
13108
  type: Boolean,
13078
13109
  reflect: true
13079
13110
  },
13080
- hoverToggle: {
13111
+
13112
+ /**
13113
+ * Makes the trigger to be full width of its parent container.
13114
+ */
13115
+ fluid: {
13081
13116
  type: Boolean,
13082
13117
  reflect: true
13083
13118
  },
13119
+
13120
+ /**
13121
+ * If declared, will apply padding around trigger slot content.
13122
+ */
13084
13123
  inset: {
13085
13124
  type: Boolean,
13086
13125
  reflect: true
13087
13126
  },
13088
- matchWidth: {
13127
+
13128
+ /**
13129
+ * If true, the dropdown bib is displayed.
13130
+ */
13131
+ isPopoverVisible: {
13132
+ type: Boolean
13133
+ },
13134
+
13135
+ /**
13136
+ * If declared, the trigger will toggle the dropdown on mouseover/mouseout.
13137
+ */
13138
+ hoverToggle: {
13089
13139
  type: Boolean,
13090
13140
  reflect: true
13091
13141
  },
13092
- rounded: {
13093
- type: Boolean,
13142
+
13143
+ /**
13144
+ * @private
13145
+ */
13146
+ hasTriggerContent: {
13147
+ type: Boolean
13148
+ },
13149
+
13150
+ /**
13151
+ * 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.
13152
+ */
13153
+ mobileFullscreenBreakpoint: {
13154
+ type: String,
13094
13155
  reflect: true
13095
13156
  },
13096
- common: {
13157
+
13158
+ /**
13159
+ * If declared, the popover and trigger will be set to the same width.
13160
+ */
13161
+ matchWidth: {
13097
13162
  type: Boolean,
13098
13163
  reflect: true
13099
13164
  },
13100
- noToggle: {
13165
+
13166
+ /**
13167
+ * If declared, the dropdown will not hide when moving focus outside the element.
13168
+ */
13169
+ noHideOnThisFocusLoss: {
13101
13170
  type: Boolean,
13102
13171
  reflect: true
13103
13172
  },
13104
- noHideOnThisFocusLoss: {
13173
+
13174
+ /**
13175
+ * If declared, the trigger will only show the dropdown bib.
13176
+ */
13177
+ noToggle: {
13105
13178
  type: Boolean,
13106
13179
  reflect: true
13107
13180
  },
13108
- isPopoverVisible: { type: Boolean },
13181
+
13109
13182
  onSlotChange: {
13110
13183
  type: Function,
13111
13184
  reflect: false
13112
13185
  },
13113
- mobileFullscreenBreakpoint: {
13114
- type: String,
13115
- reflect: true,
13116
- },
13117
13186
 
13118
13187
  /**
13119
13188
  * @private
13120
13189
  */
13121
- dropdownWidth: { type: Number },
13190
+ placement: {
13191
+ type: String
13192
+ },
13122
13193
 
13123
13194
  /**
13124
- * @private
13195
+ * If declared, will apply border-radius to trigger and default slots.
13125
13196
  */
13126
- placement: { type: String },
13197
+ rounded: {
13198
+ type: Boolean,
13199
+ reflect: true
13200
+ },
13127
13201
 
13128
13202
  /**
13129
13203
  * @private
13130
13204
  */
13131
- tabIndex: { type: Number }
13205
+ tabIndex: {
13206
+ type: Number
13207
+ }
13132
13208
  };
13133
13209
  }
13134
13210
 
13135
13211
  static get styles() {
13136
13212
  return [
13137
- styleCss$1$1,
13138
13213
  colorCss$1$1,
13214
+ styleCss$1$1,
13139
13215
  tokensCss$4
13140
13216
  ];
13141
13217
  }
@@ -13166,6 +13242,12 @@ class AuroDropdown extends r$5 {
13166
13242
  if (changedProperties.has('mobileFullscreenBreakpoint')) {
13167
13243
  this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
13168
13244
  }
13245
+
13246
+ // when trigger's content is changed without any attribute or node change,
13247
+ // `requestUpdate` needs to be called to update hasTriggerContnet
13248
+ if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
13249
+ this.handleTriggerContentSlotChange();
13250
+ }
13169
13251
  }
13170
13252
 
13171
13253
  firstUpdated() {
@@ -13208,6 +13290,43 @@ class AuroDropdown extends r$5 {
13208
13290
  return inCustomSlot;
13209
13291
  }
13210
13292
 
13293
+ /**
13294
+ * Handles changes to the trigger content slot and updates related properties.
13295
+ *
13296
+ * It first updates the floater settings
13297
+ * Then, it retrieves the assigned nodes from the event target and checks if any of
13298
+ * the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
13299
+ *
13300
+ * @private
13301
+ * @method handleTriggerContentSlotChange
13302
+ * @param {Event} event - native slotchange event
13303
+ * @returns {void}
13304
+ */
13305
+ handleTriggerContentSlotChange(event) {
13306
+ this.floater.handleTriggerTabIndex();
13307
+
13308
+ if (event) {
13309
+ this.triggerNode = event.target;
13310
+ this.triggerContentSlot = event.target.assignedNodes();
13311
+ }
13312
+
13313
+ if (this.triggerContentSlot) {
13314
+ this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
13315
+ if (slot.textContent.trim()) {
13316
+ return true;
13317
+ }
13318
+ const slotInSlot = slot.querySelector('slot');
13319
+ if (!slotInSlot) {
13320
+ return false;
13321
+ }
13322
+ const slotsInSlotNodes = slotInSlot.assignedNodes();
13323
+ return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
13324
+ });
13325
+ } else {
13326
+ this.hasTriggerContent = false;
13327
+ }
13328
+ }
13329
+
13211
13330
  /**
13212
13331
  * Handles the default slot change event and updates the content.
13213
13332
  *
@@ -13242,13 +13361,13 @@ class AuroDropdown extends r$5 {
13242
13361
  tabindex="${this.tabIndex}"
13243
13362
  >
13244
13363
  <div class="triggerContentWrapper">
13245
- <label class="label" id="triggerLabel">
13364
+ <label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
13246
13365
  <slot name="label"></slot>
13247
13366
  </label>
13248
13367
  <div class="triggerContent">
13249
13368
  <slot
13250
13369
  name="trigger"
13251
- @slotchange="${() => {this.floater.handleTriggerTabIndex(); }}"></slot>
13370
+ @slotchange="${(event) => this.handleTriggerContentSlotChange(event)}"></slot>
13252
13371
  </div>
13253
13372
  </div>
13254
13373
  ${this.chevron || this.common ? u$1$1`
@@ -13458,7 +13577,7 @@ const t=globalThis,e$1=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShad
13458
13577
  * SPDX-License-Identifier: BSD-3-Clause
13459
13578
  */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");
13460
13579
 
13461
- 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)}`;
13580
+ 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)}`;
13462
13581
 
13463
13582
  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)}`;
13464
13583
 
@@ -15135,20 +15254,20 @@ class AuroFormValidation {
15135
15254
  const pattern = new RegExp(`^${elem.pattern}$`, 'u');
15136
15255
 
15137
15256
  if (!pattern.test(elem.value)) {
15138
- elem.validity = 'badInput';
15139
- elem.setCustomValidity = elem.setCustomValidityBadInput || '';
15257
+ elem.validity = 'patternMismatch';
15258
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
15140
15259
  }
15141
15260
  }
15142
15261
 
15143
15262
  // Length > 0 is required to prevent the error message from showing when the input is empty
15144
15263
  if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
15145
15264
  elem.validity = 'tooShort';
15146
- elem.setCustomValidity = elem.setCustomValidityTooShort || '';
15265
+ elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
15147
15266
  }
15148
15267
 
15149
15268
  if (elem.value?.length > elem.maxLength) {
15150
15269
  elem.validity = 'tooLong';
15151
- elem.setCustomValidity = elem.setCustomValidityTooLong || '';
15270
+ elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
15152
15271
  }
15153
15272
  }
15154
15273
 
@@ -15164,33 +15283,32 @@ class AuroFormValidation {
15164
15283
  const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
15165
15284
 
15166
15285
  if (!elem.value.match(emailRegex)) {
15167
- elem.validity = 'badInput';
15168
- elem.setCustomValidity = elem.setCustomValidityForType || '';
15286
+ elem.validity = 'patternMismatch';
15287
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
15169
15288
  }
15170
15289
  } else if (elem.type === 'credit-card') {
15171
15290
  if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
15172
15291
  elem.validity = 'tooShort';
15173
- elem.setCustomValidity = elem.setCustomValidityForType || '';
15292
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
15174
15293
  }
15175
15294
  } else if (elem.type === 'number') {
15176
15295
  if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
15177
15296
  elem.validity = 'rangeOverflow';
15178
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
15297
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
15179
15298
  }
15180
15299
 
15181
- if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
15300
+ if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
15182
15301
  elem.validity = 'rangeUnderflow';
15183
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
15302
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
15184
15303
  }
15185
-
15186
15304
  } else if (elem.type === 'month-day-year' ||
15187
15305
  elem.type === 'month-year' ||
15188
15306
  elem.type === 'month-fullYear' ||
15189
15307
  elem.type === 'year-month-day'
15190
15308
  ) {
15191
- if (elem.value && elem.value.length > 0 && elem.value.length < elem.dateStrLength) {
15309
+ if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
15192
15310
  elem.validity = 'tooShort';
15193
- elem.setCustomValidity = elem.setCustomValidityForType || '';
15311
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
15194
15312
  } else {
15195
15313
  const valueDate = new Date(elem.value);
15196
15314
 
@@ -15200,7 +15318,7 @@ class AuroFormValidation {
15200
15318
 
15201
15319
  if (valueDate > maxDate) {
15202
15320
  elem.validity = 'rangeOverflow';
15203
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeOverflow') || '';
15321
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
15204
15322
  }
15205
15323
  }
15206
15324
 
@@ -15210,7 +15328,7 @@ class AuroFormValidation {
15210
15328
 
15211
15329
  if (valueDate < minDate) {
15212
15330
  elem.validity = 'rangeUnderflow';
15213
- elem.setCustomValidity = elem.getAttribute('setCustomValidityRangeUnderflow') || '';
15331
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
15214
15332
  }
15215
15333
  }
15216
15334
  }
@@ -15233,10 +15351,10 @@ class AuroFormValidation {
15233
15351
 
15234
15352
  if (elem.hasAttribute('error')) {
15235
15353
  elem.validity = 'customError';
15236
- elem.setCustomValidity = elem.error;
15354
+ elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
15237
15355
  } else if (validationShouldRun) {
15238
15356
  elem.validity = 'valid';
15239
- elem.setCustomValidity = '';
15357
+ elem.errorMessage = '';
15240
15358
 
15241
15359
  /**
15242
15360
  * Only validate once we interact with the datepicker
@@ -15248,7 +15366,7 @@ class AuroFormValidation {
15248
15366
  let hasValue = elem.value && elem.value.length > 0;
15249
15367
 
15250
15368
  // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
15251
- if (this.auroInputElements && this.auroInputElements.length === 2) {
15369
+ if (this.auroInputElements?.length === 2) {
15252
15370
  if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
15253
15371
  hasValue = false;
15254
15372
  }
@@ -15256,31 +15374,27 @@ class AuroFormValidation {
15256
15374
 
15257
15375
  if (!hasValue && elem.required) {
15258
15376
  elem.validity = 'valueMissing';
15259
- elem.setCustomValidity = elem.setCustomValidityValueMissing || '';
15377
+ elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
15260
15378
  } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
15261
15379
  this.validateType(elem);
15262
15380
  this.validateAttributes(elem);
15263
15381
  }
15264
15382
  }
15265
15383
 
15266
- if (this.auroInputElements && this.auroInputElements.length > 0) {
15384
+ if (this.auroInputElements?.length > 0) {
15267
15385
  elem.validity = this.auroInputElements[0].validity;
15268
- elem.setCustomValidity = this.auroInputElements[0].setCustomValidity;
15386
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
15269
15387
 
15270
- if (elem.validity === 'valid') {
15271
- if (this.auroInputElements.length > 1) {
15272
- elem.validity = this.auroInputElements[1].validity;
15273
- elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
15274
- }
15388
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
15389
+ elem.validity = this.auroInputElements[1].validity;
15390
+ elem.errorMessage = this.auroInputElements[1].errorMessage;
15275
15391
  }
15276
15392
  }
15277
15393
 
15278
15394
  if (validationShouldRun || elem.hasAttribute('error')) {
15279
- if (elem.validity && elem.validity !== 'valid') {
15280
- // Use the validity message override if it is declared
15281
- if (elem.ValidityMessageOverride) {
15282
- elem.setCustomValidity = elem.ValidityMessageOverride;
15283
- }
15395
+ // Use the validity message override if it is declared
15396
+ if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
15397
+ elem.errorMessage = elem.ValidityMessageOverride;
15284
15398
  }
15285
15399
 
15286
15400
  this.getErrorMessage(elem);
@@ -15326,18 +15440,18 @@ class AuroFormValidation {
15326
15440
  if (elem.validity !== 'valid') {
15327
15441
  if (elem.setCustomValidity) {
15328
15442
  elem.errorMessage = elem.setCustomValidity;
15329
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
15443
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
15330
15444
  const input = elem.renderRoot.querySelector('input');
15331
15445
 
15332
15446
  if (input.validationMessage.length > 0) {
15333
15447
  elem.errorMessage = input.validationMessage;
15334
15448
  }
15335
- } else if (this.inputElements && this.inputElements.length > 0) {
15449
+ } else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
15336
15450
  const firstInput = this.inputElements[0];
15337
15451
 
15338
15452
  if (firstInput.validationMessage.length > 0) {
15339
15453
  elem.errorMessage = firstInput.validationMessage;
15340
- } else if (this.inputElements.length === 2) {
15454
+ } else if (this.inputElements?.length === 2) {
15341
15455
  const secondInput = this.inputElements[1];
15342
15456
 
15343
15457
  if (secondInput.validationMessage.length > 0) {
@@ -15358,42 +15472,8 @@ class AuroFormValidation {
15358
15472
  /**
15359
15473
  * Auro-input provides users a way to enter data into a text field.
15360
15474
  *
15361
- * @attr {Boolean} activeLabel - If set, the label will remain fixed in the active position.
15362
- * @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]
15363
- * @attr {String} autocomplete - An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
15364
- * @attr {String} autocorrect - When set to `off`, stops iOS from auto correcting words when typed into a text box.
15365
15475
  * @attr {Boolean} bordered - Applies bordered UI variant.
15366
15476
  * @attr {Boolean} borderless - Applies borderless UI variant.
15367
- * @attr {Boolean} disabled - If set, disables the input.
15368
- * @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
15369
- * @prop {String} errorMessage - Contains the help text message for the current validity error.
15370
- * @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.
15371
- * @attr {String} id - Sets the unique ID of the element.
15372
- * @attr {String} lang - defines the language of an element.
15373
- * @attr {String} max - The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
15374
- * @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.
15375
- * @attr {String} min - The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
15376
- * @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`.
15377
- * @attr {String} name - Populates the `name` attribute on the input.
15378
- * @attr {Boolean} noValidate - If set, disables auto-validation on blur.
15379
- * @attr {Boolean} readonly - Makes the input read-only, but can be set programmatically.
15380
- * @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
15381
- * @attr {String} pattern - Specifies a regular expression the form control's value should match.
15382
- * @attr {String} placeholder - Define custom placeholder text, only supported by date input formats.
15383
- * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
15384
- * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
15385
- * @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
15386
- * @attr {String} setCustomValidityBadInput - Custom help text message to display when validity = `badInput`.
15387
- * @attr {String} setCustomValidityTooShort - Custom help text message to display when validity = `tooShort`.
15388
- * @attr {String} setCustomValidityTooLong - Custom help text message to display when validity = `tooLong`.
15389
- * @attr {String} setCustomValidityForType - Custom help text message to display for the declared element `type` and type validity fails.
15390
- * @attr {String} setCustomValidityRangeOverflow - Custom help text message to display when validity = `rangeOverflow`.
15391
- * @attr {String} setCustomValidityRangeUnderflow - Custom help text message to display when validity = `rangeUnderflow`.
15392
- * @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`.
15393
- * @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`.
15394
- * @attr {Boolean} validateOnInput - Sets validation mode to re-eval with each input.
15395
- * @attr {String} validity - Specifies the `validityState` this element is in.
15396
- * @attr {String} value - Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
15397
15477
  *
15398
15478
  * @slot helptext - Sets the help text displayed below the input.
15399
15479
  * @slot label - Sets the label text for the input.
@@ -15485,71 +15565,272 @@ class BaseInput extends r {
15485
15565
  .substring(idSubstrStart, idSubstrEnd);
15486
15566
  }
15487
15567
 
15488
- // function to define props used within the scope of this component
15568
+ // function to define props used within the scope of this componentstatic
15489
15569
  static get properties() {
15490
15570
  return {
15491
- id: { type: String },
15492
- name: { type: String },
15493
- type: { type: String,
15494
- reflect: true },
15495
- value: { type: String },
15496
- lang: { type: String },
15497
- pattern: {
15571
+
15572
+ /**
15573
+ * If set, the label will remain fixed in the active position.
15574
+ */
15575
+ activeLabel: {
15576
+ type: Boolean,
15577
+ reflect: true
15578
+ },
15579
+
15580
+ /**
15581
+ * 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]
15582
+ */
15583
+ autocapitalize: {
15584
+ type: String
15585
+ },
15586
+
15587
+ /**
15588
+ * An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
15589
+ */
15590
+ autocomplete: {
15498
15591
  type: String,
15499
15592
  reflect: true
15500
15593
  },
15501
- icon: { type: Boolean },
15502
- disabled: { type: Boolean },
15503
- required: { type: Boolean },
15504
- noValidate: { type: Boolean },
15505
- spellcheck: { type: String },
15506
- autocorrect: { type: String },
15507
- autocapitalize: { type: String },
15508
- autocomplete: {
15594
+
15595
+ /**
15596
+ * When set to `off`, stops iOS from auto-correcting words when typed into a text box.
15597
+ */
15598
+ autocorrect: {
15599
+ type: String
15600
+ },
15601
+
15602
+ /**
15603
+ * If set, disables the input.
15604
+ */
15605
+ disabled: {
15606
+ type: Boolean
15607
+ },
15608
+
15609
+ error: {
15509
15610
  type: String,
15510
15611
  reflect: true
15511
15612
  },
15512
- placeholder: { type: String },
15513
- activeLabel: {
15514
- type: Boolean,
15613
+
15614
+ /**
15615
+ * Contains the help text message for the current validity error.
15616
+ */
15617
+ errorMessage: {
15618
+ type: String
15619
+ },
15620
+
15621
+ /**
15622
+ * 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.
15623
+ */
15624
+ icon: {
15625
+ type: Boolean
15626
+ },
15627
+
15628
+ /**
15629
+ * Sets the unique ID of the element.
15630
+ */
15631
+ id: {
15632
+ type: String
15633
+ },
15634
+
15635
+ /**
15636
+ * Defines the language of an element.
15637
+ */
15638
+ lang: {
15639
+ type: String
15640
+ },
15641
+
15642
+ /**
15643
+ * The maximum value allowed. This only applies for inputs with a type of `number` and all date formats.
15644
+ */
15645
+ max: {
15646
+ type: String
15647
+ },
15648
+
15649
+ /**
15650
+ * The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
15651
+ */
15652
+ maxLength: {
15653
+ type: Number
15654
+ },
15655
+
15656
+ /**
15657
+ * The minimum value allowed. This only applies for inputs with a type of `number` and all date formats.
15658
+ */
15659
+ min: {
15660
+ type: String
15661
+ },
15662
+
15663
+ /**
15664
+ * 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`.
15665
+ */
15666
+ minLength: {
15667
+ type: Number
15668
+ },
15669
+
15670
+ /**
15671
+ * Populates the `name` attribute on the input.
15672
+ */
15673
+ name: {
15674
+ type: String
15675
+ },
15676
+
15677
+ /**
15678
+ * If set, disables auto-validation on blur.
15679
+ */
15680
+ noValidate: {
15681
+ type: Boolean
15682
+ },
15683
+
15684
+ /**
15685
+ * Specifies a regular expression the form control's value should match.
15686
+ */
15687
+ pattern: {
15688
+ type: String,
15515
15689
  reflect: true
15516
15690
  },
15517
- max: { type: String },
15518
- min: { type: String },
15519
- maxLength: { type: Number },
15520
- minLength: { type: Number },
15691
+
15692
+ /**
15693
+ * Define custom placeholder text, only supported by date input formats.
15694
+ */
15695
+ placeholder: {
15696
+ type: String
15697
+ },
15698
+
15699
+ /**
15700
+ * Makes the input read-only, but can be set programmatically.
15701
+ */
15702
+ readonly: {
15703
+ type: Boolean
15704
+ },
15705
+
15706
+ /**
15707
+ * Populates the `required` attribute on the input. Used for client-side validation.
15708
+ */
15709
+ required: {
15710
+ type: Boolean
15711
+ },
15521
15712
 
15522
15713
  /**
15523
15714
  * @ignore
15524
15715
  */
15525
- showPassword: { state: true },
15526
- validateOnInput: { type: Boolean },
15527
- readonly: { type: Boolean },
15528
- error: {
15716
+ showPassword: {
15717
+ state: true
15718
+ },
15719
+
15720
+ /**
15721
+ * Sets a custom help text message to display for all validityStates.
15722
+ */
15723
+ setCustomValidity: {
15724
+ type: String
15725
+ },
15726
+
15727
+ /**
15728
+ * Custom help text message to display when validity = `badInput`.
15729
+ */
15730
+ setCustomValidityBadInput: {
15731
+ type: String
15732
+ },
15733
+
15734
+ /**
15735
+ * Custom help text message to display when validity = `customError`.
15736
+ */
15737
+ setCustomValidityCustomError: {
15738
+ type: String
15739
+ },
15740
+
15741
+ /**
15742
+ * Custom help text message to display for the declared element `type` and type validity fails.
15743
+ */
15744
+ setCustomValidityForType: {
15745
+ type: String
15746
+ },
15747
+
15748
+ /**
15749
+ * Custom help text message to display when validity = `rangeOverflow`.
15750
+ */
15751
+ setCustomValidityRangeOverflow: {
15752
+ type: String
15753
+ },
15754
+
15755
+ /**
15756
+ * Custom help text message to display when validity = `rangeUnderflow`.
15757
+ */
15758
+ setCustomValidityRangeUnderflow: {
15759
+ type: String
15760
+ },
15761
+
15762
+ /**
15763
+ * Custom help text message to display when validity = `tooLong`.
15764
+ */
15765
+ setCustomValidityTooLong: {
15766
+ type: String
15767
+ },
15768
+
15769
+ /**
15770
+ * Custom help text message to display when validity = `tooShort`.
15771
+ */
15772
+ setCustomValidityTooShort: {
15773
+ type: String
15774
+ },
15775
+
15776
+ /**
15777
+ * Custom help text message to display when validity = `valueMissing`.
15778
+ */
15779
+ setCustomValidityValueMissing: {
15780
+ type: String
15781
+ },
15782
+
15783
+ /**
15784
+ * Custom help text message for email type validity.
15785
+ */
15786
+ customValidityTypeEmail: {
15787
+ type: String
15788
+ },
15789
+
15790
+ /**
15791
+ * 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`.
15792
+ */
15793
+ spellcheck: {
15794
+ type: String
15795
+ },
15796
+
15797
+ /**
15798
+ * 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`.
15799
+ */
15800
+ type: {
15529
15801
  type: String,
15530
15802
  reflect: true
15531
15803
  },
15532
- errorMessage: { type: String },
15533
- validity: {
15804
+
15805
+ /**
15806
+ * Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
15807
+ */
15808
+ value: {
15809
+ type: String
15810
+ },
15811
+
15812
+ /**
15813
+ * Sets validation mode to re-eval with each input.
15814
+ */
15815
+ validateOnInput: {
15816
+ type: Boolean
15817
+ },
15818
+
15819
+ /**
15820
+ * Specifies the `validityState` this element is in.
15821
+ */
15822
+ validity: {
15534
15823
  type: String,
15535
15824
  reflect: true
15536
- },
15537
- setCustomValidity: { type: String },
15538
- setCustomValidityCustomError: { type: String },
15539
- setCustomValidityValueMissing: { type: String },
15540
- setCustomValidityBadInput: { type: String },
15541
- setCustomValidityTooShort: { type: String },
15542
- setCustomValidityTooLong: { type: String },
15543
- setCustomValidityRangeOverflow: { type: String},
15544
- setCustomValidityRangeUnderflow: { type: String},
15545
- customValidityTypeEmail: { type: String }
15825
+ }
15546
15826
  };
15547
15827
  }
15548
15828
 
15829
+
15549
15830
  static get styles() {
15550
15831
  return [
15551
- i$2`${styleCss$3}`,
15552
15832
  i$2`${colorCss$3}`,
15833
+ i$2`${styleCss$3}`,
15553
15834
  i$2`${tokensCss$3}`
15554
15835
  ];
15555
15836
  }
@@ -16170,7 +16451,7 @@ class BaseInput extends r {
16170
16451
  this.maxLength = card.formatLength;
16171
16452
  this.minLength = card.formatMinLength;
16172
16453
 
16173
- this.setCustomValidity = card.setCustomValidity;
16454
+ this.errorMessage = card.errorMessage;
16174
16455
 
16175
16456
  if (this.icon) {
16176
16457
  this.inputIconName = card.cardIcon;
@@ -16190,63 +16471,63 @@ class BaseInput extends r {
16190
16471
  name: 'Airlines',
16191
16472
  regex: /^(?<num>1|2)\d{0}/u,
16192
16473
  formatMinLength: 17,
16193
- setCustomValidity: CreditCardValidationMessage,
16474
+ errorMessage: CreditCardValidationMessage,
16194
16475
  cardIcon: 'credit-card'
16195
16476
  },
16196
16477
  {
16197
16478
  name: 'Commercial',
16198
16479
  regex: /^(?<num>2)\d{0}/u,
16199
16480
  formatMinLength: 8,
16200
- setCustomValidity: CreditCardValidationMessage,
16481
+ errorMessage: CreditCardValidationMessage,
16201
16482
  cardIcon: 'credit-card'
16202
16483
  },
16203
16484
  {
16204
16485
  name: 'Alaska Commercial',
16205
16486
  regex: /^(?<num>27)\d{0}/u,
16206
16487
  formatMinLength: 8,
16207
- setCustomValidity: CreditCardValidationMessage,
16488
+ errorMessage: CreditCardValidationMessage,
16208
16489
  cardIcon: 'cc-alaska'
16209
16490
  },
16210
16491
  {
16211
16492
  name: 'American Express',
16212
16493
  regex: /^(?<num>34|37)\d{0}/u,
16213
16494
  formatLength: 17,
16214
- setCustomValidity: CreditCardValidationMessage,
16495
+ errorMessage: CreditCardValidationMessage,
16215
16496
  cardIcon: 'cc-amex'
16216
16497
  },
16217
16498
  {
16218
16499
  name: 'Diners club',
16219
16500
  regex: /^(?<num>36|38)\d{0}/u,
16220
16501
  formatLength: 16,
16221
- setCustomValidity: CreditCardValidationMessage,
16502
+ errorMessage: CreditCardValidationMessage,
16222
16503
  cardIcon: 'credit-card'
16223
16504
  },
16224
16505
  {
16225
16506
  name: 'Visa',
16226
16507
  regex: /^(?<num>4)\d{0}/u,
16227
16508
  formatLength: 19,
16228
- setCustomValidity: CreditCardValidationMessage,
16509
+ errorMessage: CreditCardValidationMessage,
16229
16510
  cardIcon: 'cc-visa'
16230
16511
  },
16231
16512
  {
16232
16513
  name: 'Alaska Airlines Visa',
16233
16514
  regex: /^(?<num>4147\s34|4888\s93|4800\s11|4313\s51|4313\s07)\d{0}/u,
16234
16515
  formatLength: 19,
16235
- setCustomValidity: CreditCardValidationMessage,
16516
+ errorMessage: CreditCardValidationMessage,
16236
16517
  cardIcon: 'cc-alaska'
16237
16518
  },
16238
16519
  {
16239
16520
  name: 'Master Card',
16240
16521
  regex: /^(?<num>5)\d{0}/u,
16241
16522
  formatLength: 19,
16242
- setCustomValidity: CreditCardValidationMessage,
16523
+ errorMessage: CreditCardValidationMessage,
16243
16524
  cardIcon: 'cc-mastercard'
16244
16525
  },
16245
16526
  {
16246
16527
  name: 'Discover Card',
16247
16528
  regex: /^(?<num>6)\d{0}/u,
16248
16529
  formatLength: 19,
16249
- setCustomValidity: CreditCardValidationMessage,
16530
+ errorMessage: CreditCardValidationMessage,
16250
16531
  cardIcon: 'cc-discover'
16251
16532
  }
16252
16533
  ];
@@ -16254,7 +16535,7 @@ class BaseInput extends r {
16254
16535
  let type = {
16255
16536
  name: 'Default Card',
16256
16537
  formatLength: 19,
16257
- setCustomValidity: CreditCardValidationMessage,
16538
+ errorMessage: CreditCardValidationMessage,
16258
16539
  cardIcon: 'credit-card'
16259
16540
  };
16260
16541
 
@@ -17279,7 +17560,6 @@ class AuroInput extends BaseInput {
17279
17560
  <p class="inputElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
17280
17561
  ${this.errorMessage}
17281
17562
  </p>`
17282
-
17283
17563
  }
17284
17564
  `;
17285
17565
  }
@@ -17297,9 +17577,10 @@ var inputVersion = '4.2.0';
17297
17577
  /**
17298
17578
  * @prop {String} value - Value selected for the date picker.
17299
17579
  * @prop {String} valueEnd - Value selected for the second date picker when using date range.
17300
- * @attr {String} error - When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
17580
+ * @attr {String} error - When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
17301
17581
  * @attr {String} validity - Specifies the `validityState` this element is in.
17302
17582
  * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
17583
+ * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
17303
17584
  * @attr {String} setCustomValidityRangeUnderflow - Custom help text message to display when validity = `rangeUnderflow`.
17304
17585
  * @attr {String} setCustomValidityRangeOverflow - Custom help text message to display when validity = `rangeOverflow`.
17305
17586
  * @attr {String} setCustomValidityValueMissing - Help text message to display when validity = `valueMissing`.
@@ -17429,19 +17710,18 @@ class AuroDatePicker extends r$7 {
17429
17710
  },
17430
17711
  setCustomValidity: {
17431
17712
  type: String,
17432
- reflect: true
17713
+ },
17714
+ setCustomValidityCustomError: {
17715
+ type: String,
17433
17716
  },
17434
17717
  setCustomValidityRangeUnderflow: {
17435
17718
  type: String,
17436
- reflect: true
17437
17719
  },
17438
17720
  setCustomValidityRangeOverflow: {
17439
17721
  type: String,
17440
- reflect: true
17441
17722
  },
17442
17723
  setCustomValidityValueMissing: {
17443
17724
  type: String,
17444
- reflect: true
17445
17725
  },
17446
17726
  validity: {
17447
17727
  type: String,
@@ -17636,30 +17916,6 @@ class AuroDatePicker extends r$7 {
17636
17916
  return dateStr;
17637
17917
  }
17638
17918
 
17639
- /**
17640
- * Return appropriate error message.
17641
- * @param {Object} evt - Event passed in from auro-input when the event triggered this function.
17642
- * @private
17643
- */
17644
- getErrorMessage(evt) {
17645
- if (evt) {
17646
- const inputClass = evt.target.getAttribute('class');
17647
- if (inputClass === 'dateFrom') {
17648
- if (this.inputList[0].validity && this.inputList[0].validity !== 'valid') {
17649
- this.errorMessage = evt.target.errorMessage;
17650
- } else {
17651
- this.errorMessage = undefined;
17652
- }
17653
- }
17654
-
17655
- if (inputClass === 'dateTo') {
17656
- if (!this.errorMessage && this.inputList[1].validity && this.inputList[1].validity !== 'valid') {
17657
- this.errorMessage = evt.target.errorMessage;
17658
- }
17659
- }
17660
- }
17661
- }
17662
-
17663
17919
  /**
17664
17920
  * Changes the calendar's visibility to reflect the value of the central date attribute.
17665
17921
  * @private
@@ -17768,13 +18024,13 @@ class AuroDatePicker extends r$7 {
17768
18024
  input.addEventListener('auroFormElement-validated', (evt) => {
17769
18025
  if (evt.detail.validity === 'customError') {
17770
18026
  this.validity = evt.detail.validity;
17771
- this.setCustomValidity = evt.detail.message;
18027
+ this.errorMessage = evt.detail.message;
17772
18028
  } else if (evt.target === this.inputList[0]) {
17773
18029
  this.validity = evt.detail.validity;
17774
- this.setCustomValidity = evt.detail.message;
18030
+ this.errorMessage = evt.detail.message;
17775
18031
  } else if (this.inputList.length > 1 && evt.target === this.inputList[1] && (this.inputList[0].validity === 'valid' || this.inputList[0].validity === undefined)) {
17776
18032
  this.validity = evt.detail.validity;
17777
- this.setCustomValidity = evt.detail.message;
18033
+ this.errorMessage = evt.detail.message;
17778
18034
  }
17779
18035
  });
17780
18036
  });
@@ -18064,7 +18320,7 @@ class AuroDatePicker extends r$7 {
18064
18320
  // This is done to prevent error icon from displaying on both inputs in range support
18065
18321
  const lastInput = this.inputList[this.inputList.length - 1];
18066
18322
 
18067
- if (this.error) {
18323
+ if (this.hasAttribute('error')) {
18068
18324
  // Set the error attribute on the last input
18069
18325
  lastInput.setAttribute('error', this.getAttribute('error'));
18070
18326
  } else {
@@ -18182,6 +18438,8 @@ class AuroDatePicker extends r$7 {
18182
18438
  noValidate
18183
18439
  .max="${this.maxDate}"
18184
18440
  .min="${this.minDate}"
18441
+ setCustomValidity="${this.setCustomValidity}"
18442
+ setCustomValidityCustomError="${this.setCustomValidityCustomError}"
18185
18443
  setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
18186
18444
  setCustomValidityRangeOverflow="${this.setCustomValidityRangeOverflow}"
18187
18445
  setCustomValidityRangeUnderflow="${this.setCustomValidityRangeUnderflow}"
@@ -18199,6 +18457,8 @@ class AuroDatePicker extends r$7 {
18199
18457
  noValidate
18200
18458
  .max="${this.maxDate}"
18201
18459
  .min="${this.minDate}"
18460
+ setCustomValidity="${this.setCustomValidity}"
18461
+ setCustomValidityCustomError="${this.setCustomValidityCustomError}"
18202
18462
  setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
18203
18463
  setCustomValidityRangeOverflow="${this.setCustomValidityRangeOverflow}"
18204
18464
  setCustomValidityRangeUnderflow="${this.setCustomValidityRangeUnderflow}"
@@ -18229,8 +18489,8 @@ class AuroDatePicker extends r$7 {
18229
18489
  ? u$6`
18230
18490
  <slot name="helpText"></slot>
18231
18491
  ` : u$6`
18232
- <p class="datepickerElement-helpText" id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
18233
- ${this.setCustomValidity}
18492
+ <p class="datepickerElement-helpText" role="alert" aria-live="assertive" part="helpText">
18493
+ ${this.errorMessage}
18234
18494
  </p>`
18235
18495
  }
18236
18496
  </span>