@aurodesignsystem-dev/auro-formkit 0.0.0-pr1104.0 → 0.0.0-pr1104.2

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 (30) hide show
  1. package/components/checkbox/demo/api.min.js +14 -3
  2. package/components/checkbox/demo/index.min.js +14 -3
  3. package/components/checkbox/dist/index.js +14 -3
  4. package/components/checkbox/dist/registered.js +14 -3
  5. package/components/combobox/demo/api.md +27 -2
  6. package/components/combobox/demo/api.min.js +30 -7
  7. package/components/combobox/demo/index.min.js +29 -6
  8. package/components/combobox/dist/index.js +29 -6
  9. package/components/combobox/dist/registered.js +29 -6
  10. package/components/counter/demo/api.min.js +14 -3
  11. package/components/counter/demo/index.min.js +14 -3
  12. package/components/counter/dist/index.js +14 -3
  13. package/components/counter/dist/registered.js +14 -3
  14. package/components/datepicker/demo/api.min.js +28 -6
  15. package/components/datepicker/demo/index.min.js +28 -6
  16. package/components/datepicker/dist/index.js +28 -6
  17. package/components/datepicker/dist/registered.js +28 -6
  18. package/components/input/demo/api.min.js +14 -3
  19. package/components/input/demo/index.min.js +14 -3
  20. package/components/input/dist/index.js +14 -3
  21. package/components/input/dist/registered.js +14 -3
  22. package/components/radio/demo/api.min.js +14 -3
  23. package/components/radio/demo/index.min.js +14 -3
  24. package/components/radio/dist/index.js +14 -3
  25. package/components/radio/dist/registered.js +14 -3
  26. package/components/select/demo/api.min.js +14 -3
  27. package/components/select/demo/index.min.js +14 -3
  28. package/components/select/dist/index.js +14 -3
  29. package/components/select/dist/registered.js +14 -3
  30. package/package.json +1 -1
@@ -1142,12 +1142,23 @@ class AuroFormValidation {
1142
1142
  }
1143
1143
 
1144
1144
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1145
- elem.validity = this.auroInputElements[0].validity;
1146
- elem.errorMessage = this.auroInputElements[0].errorMessage;
1145
+
1146
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
1147
+
1148
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
1149
+ if (!isCombobox || isCombobox && !elem.persistValue) {
1150
+
1151
+ // run validation on all inputs since we're going to use them to set the validity of this component
1152
+ this.auroInputElements.forEach(input => input.validate());
1153
+
1154
+ // Reset element validity to the validity of the input
1155
+ elem.validity = this.auroInputElements[0].validity;
1156
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1157
+ }
1147
1158
 
1148
1159
  // multiple input in one components (datepicker)
1149
1160
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1150
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1161
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
1151
1162
  elem.validity = this.auroInputElements[1].validity;
1152
1163
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1153
1164
  }
@@ -1134,12 +1134,23 @@ class AuroFormValidation {
1134
1134
  }
1135
1135
 
1136
1136
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1137
- elem.validity = this.auroInputElements[0].validity;
1138
- elem.errorMessage = this.auroInputElements[0].errorMessage;
1137
+
1138
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
1139
+
1140
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
1141
+ if (!isCombobox || isCombobox && !elem.persistValue) {
1142
+
1143
+ // run validation on all inputs since we're going to use them to set the validity of this component
1144
+ this.auroInputElements.forEach(input => input.validate());
1145
+
1146
+ // Reset element validity to the validity of the input
1147
+ elem.validity = this.auroInputElements[0].validity;
1148
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1149
+ }
1139
1150
 
1140
1151
  // multiple input in one components (datepicker)
1141
1152
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1142
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1153
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
1143
1154
  elem.validity = this.auroInputElements[1].validity;
1144
1155
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1145
1156
  }
@@ -1087,12 +1087,23 @@ class AuroFormValidation {
1087
1087
  }
1088
1088
 
1089
1089
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1090
- elem.validity = this.auroInputElements[0].validity;
1091
- elem.errorMessage = this.auroInputElements[0].errorMessage;
1090
+
1091
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
1092
+
1093
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
1094
+ if (!isCombobox || isCombobox && !elem.persistValue) {
1095
+
1096
+ // run validation on all inputs since we're going to use them to set the validity of this component
1097
+ this.auroInputElements.forEach(input => input.validate());
1098
+
1099
+ // Reset element validity to the validity of the input
1100
+ elem.validity = this.auroInputElements[0].validity;
1101
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1102
+ }
1092
1103
 
1093
1104
  // multiple input in one components (datepicker)
1094
1105
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1095
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1106
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
1096
1107
  elem.validity = this.auroInputElements[1].validity;
1097
1108
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1098
1109
  }
@@ -1087,12 +1087,23 @@ class AuroFormValidation {
1087
1087
  }
1088
1088
 
1089
1089
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1090
- elem.validity = this.auroInputElements[0].validity;
1091
- elem.errorMessage = this.auroInputElements[0].errorMessage;
1090
+
1091
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
1092
+
1093
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
1094
+ if (!isCombobox || isCombobox && !elem.persistValue) {
1095
+
1096
+ // run validation on all inputs since we're going to use them to set the validity of this component
1097
+ this.auroInputElements.forEach(input => input.validate());
1098
+
1099
+ // Reset element validity to the validity of the input
1100
+ elem.validity = this.auroInputElements[0].validity;
1101
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1102
+ }
1092
1103
 
1093
1104
  // multiple input in one components (datepicker)
1094
1105
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1095
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1106
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
1096
1107
  elem.validity = this.auroInputElements[1].validity;
1097
1108
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1098
1109
  }
@@ -393,7 +393,7 @@ This is useful for situations like matching IATA codes (sea -> SeaTac airport)
393
393
  <p style="color: white;">
394
394
  Type 'a' in the combobox for best testing results :)
395
395
  </p>
396
- <auro-combobox id="externalSelectionExample" layout="classic" shape="classic" size="lg" placeholder="Placeholder content" required style="width: 249px;">
396
+ <auro-combobox ondark id="externalSelectionExample" layout="classic" shape="classic" size="lg" placeholder="Placeholder content" required style="width: 249px;">
397
397
  <span slot="ariaLabel.bib.close">Close combobox</span>
398
398
  <span slot="ariaLabel.input.clear">Clear All</span>
399
399
  <span slot="bib.fullscreen.headline">Bib Header</span>
@@ -421,7 +421,7 @@ This is useful for situations like matching IATA codes (sea -> SeaTac airport)
421
421
  <p style="color: white;">
422
422
  Type 'a' in the combobox for best testing results :)
423
423
  </p>
424
- <auro-combobox id="externalSelectionExample" layout="classic" shape="classic" size="lg" placeholder="Placeholder content" required style="width: 249px;">
424
+ <auro-combobox ondark id="externalSelectionExample" layout="classic" shape="classic" size="lg" placeholder="Placeholder content" required style="width: 249px;">
425
425
  <span slot="ariaLabel.bib.close">Close combobox</span>
426
426
  <span slot="ariaLabel.input.clear">Clear All</span>
427
427
  <span slot="bib.fullscreen.headline">Bib Header</span>
@@ -440,6 +440,31 @@ This is useful for situations like matching IATA codes (sea -> SeaTac airport)
440
440
  </auro-combobox>
441
441
  ```
442
442
  <!-- AURO-GENERATED-CONTENT:END -->
443
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/externalSelection.js) -->
444
+ <!-- The below code snippet is automatically added from ./../apiExamples/externalSelection.js -->
445
+
446
+ ```js
447
+ import { AuroCombobox } from "../src/auro-combobox";
448
+
449
+ /**
450
+ * Demonstrates how to make external selection in the combobox.
451
+ */
452
+ export function setupExternalSelectionExample() {
453
+
454
+ /** @type {AuroCombobox} */
455
+ const combobox = document.getElementById('externalSelectionExample');
456
+
457
+ combobox.addEventListener('input', () => {
458
+ // Perform whatever matching logic you need here
459
+
460
+ // This comes from your custom code, for example matching SEA to SeaTac IATA code.
461
+ // This matches "peaches" as configured.
462
+ const matchingMenuOption = 2;
463
+ combobox.updateActiveOption(matchingMenuOption);
464
+ });
465
+ }
466
+ ```
467
+ <!-- AURO-GENERATED-CONTENT:END -->
443
468
  </auro-accordion>
444
469
 
445
470
  ### Property Examples
@@ -1000,12 +1000,23 @@ let AuroFormValidation$1 = class AuroFormValidation {
1000
1000
  }
1001
1001
 
1002
1002
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1003
- elem.validity = this.auroInputElements[0].validity;
1004
- elem.errorMessage = this.auroInputElements[0].errorMessage;
1003
+
1004
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
1005
+
1006
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
1007
+ if (!isCombobox || isCombobox && !elem.persistValue) {
1008
+
1009
+ // run validation on all inputs since we're going to use them to set the validity of this component
1010
+ this.auroInputElements.forEach(input => input.validate());
1011
+
1012
+ // Reset element validity to the validity of the input
1013
+ elem.validity = this.auroInputElements[0].validity;
1014
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1015
+ }
1005
1016
 
1006
1017
  // multiple input in one components (datepicker)
1007
1018
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1008
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1019
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
1009
1020
  elem.validity = this.auroInputElements[1].validity;
1010
1021
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1011
1022
  }
@@ -10266,12 +10277,23 @@ class AuroFormValidation {
10266
10277
  }
10267
10278
 
10268
10279
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
10269
- elem.validity = this.auroInputElements[0].validity;
10270
- elem.errorMessage = this.auroInputElements[0].errorMessage;
10280
+
10281
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
10282
+
10283
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
10284
+ if (!isCombobox || isCombobox && !elem.persistValue) {
10285
+
10286
+ // run validation on all inputs since we're going to use them to set the validity of this component
10287
+ this.auroInputElements.forEach(input => input.validate());
10288
+
10289
+ // Reset element validity to the validity of the input
10290
+ elem.validity = this.auroInputElements[0].validity;
10291
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
10292
+ }
10271
10293
 
10272
10294
  // multiple input in one components (datepicker)
10273
10295
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
10274
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
10296
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
10275
10297
  elem.validity = this.auroInputElements[1].validity;
10276
10298
  elem.errorMessage = this.auroInputElements[1].errorMessage;
10277
10299
  }
@@ -16912,6 +16934,7 @@ class AuroCombobox extends AuroElement$1 {
16912
16934
  // current focus is on a menuoption, after clicking on it.
16913
16935
  if (this.persistInput && focusedEl && (focusedEl.tagName.toLowerCase() === 'auro-menuoption' || focusedEl.hasAttribute('auro-menuoption'))) {
16914
16936
  this.setClearBtnFocus();
16937
+ this.validate(true);
16915
16938
  }
16916
16939
  }
16917
16940
  }
@@ -17535,7 +17558,7 @@ class AuroCombobox extends AuroElement$1 {
17535
17558
  }
17536
17559
 
17537
17560
  /**
17538
- * Sets up demo external selection in the combobox.
17561
+ * Demonstrates how to make external selection in the combobox.
17539
17562
  */
17540
17563
  function setupExternalSelectionExample() {
17541
17564
 
@@ -880,12 +880,23 @@ let AuroFormValidation$1 = class AuroFormValidation {
880
880
  }
881
881
 
882
882
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
883
- elem.validity = this.auroInputElements[0].validity;
884
- elem.errorMessage = this.auroInputElements[0].errorMessage;
883
+
884
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
885
+
886
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
887
+ if (!isCombobox || isCombobox && !elem.persistValue) {
888
+
889
+ // run validation on all inputs since we're going to use them to set the validity of this component
890
+ this.auroInputElements.forEach(input => input.validate());
891
+
892
+ // Reset element validity to the validity of the input
893
+ elem.validity = this.auroInputElements[0].validity;
894
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
895
+ }
885
896
 
886
897
  // multiple input in one components (datepicker)
887
898
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
888
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
899
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
889
900
  elem.validity = this.auroInputElements[1].validity;
890
901
  elem.errorMessage = this.auroInputElements[1].errorMessage;
891
902
  }
@@ -10146,12 +10157,23 @@ class AuroFormValidation {
10146
10157
  }
10147
10158
 
10148
10159
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
10149
- elem.validity = this.auroInputElements[0].validity;
10150
- elem.errorMessage = this.auroInputElements[0].errorMessage;
10160
+
10161
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
10162
+
10163
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
10164
+ if (!isCombobox || isCombobox && !elem.persistValue) {
10165
+
10166
+ // run validation on all inputs since we're going to use them to set the validity of this component
10167
+ this.auroInputElements.forEach(input => input.validate());
10168
+
10169
+ // Reset element validity to the validity of the input
10170
+ elem.validity = this.auroInputElements[0].validity;
10171
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
10172
+ }
10151
10173
 
10152
10174
  // multiple input in one components (datepicker)
10153
10175
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
10154
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
10176
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
10155
10177
  elem.validity = this.auroInputElements[1].validity;
10156
10178
  elem.errorMessage = this.auroInputElements[1].errorMessage;
10157
10179
  }
@@ -16792,6 +16814,7 @@ class AuroCombobox extends AuroElement$1 {
16792
16814
  // current focus is on a menuoption, after clicking on it.
16793
16815
  if (this.persistInput && focusedEl && (focusedEl.tagName.toLowerCase() === 'auro-menuoption' || focusedEl.hasAttribute('auro-menuoption'))) {
16794
16816
  this.setClearBtnFocus();
16817
+ this.validate(true);
16795
16818
  }
16796
16819
  }
16797
16820
  }
@@ -818,12 +818,23 @@ let AuroFormValidation$1 = class AuroFormValidation {
818
818
  }
819
819
 
820
820
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
821
- elem.validity = this.auroInputElements[0].validity;
822
- elem.errorMessage = this.auroInputElements[0].errorMessage;
821
+
822
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
823
+
824
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
825
+ if (!isCombobox || isCombobox && !elem.persistValue) {
826
+
827
+ // run validation on all inputs since we're going to use them to set the validity of this component
828
+ this.auroInputElements.forEach(input => input.validate());
829
+
830
+ // Reset element validity to the validity of the input
831
+ elem.validity = this.auroInputElements[0].validity;
832
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
833
+ }
823
834
 
824
835
  // multiple input in one components (datepicker)
825
836
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
826
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
837
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
827
838
  elem.validity = this.auroInputElements[1].validity;
828
839
  elem.errorMessage = this.auroInputElements[1].errorMessage;
829
840
  }
@@ -10053,12 +10064,23 @@ class AuroFormValidation {
10053
10064
  }
10054
10065
 
10055
10066
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
10056
- elem.validity = this.auroInputElements[0].validity;
10057
- elem.errorMessage = this.auroInputElements[0].errorMessage;
10067
+
10068
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
10069
+
10070
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
10071
+ if (!isCombobox || isCombobox && !elem.persistValue) {
10072
+
10073
+ // run validation on all inputs since we're going to use them to set the validity of this component
10074
+ this.auroInputElements.forEach(input => input.validate());
10075
+
10076
+ // Reset element validity to the validity of the input
10077
+ elem.validity = this.auroInputElements[0].validity;
10078
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
10079
+ }
10058
10080
 
10059
10081
  // multiple input in one components (datepicker)
10060
10082
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
10061
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
10083
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
10062
10084
  elem.validity = this.auroInputElements[1].validity;
10063
10085
  elem.errorMessage = this.auroInputElements[1].errorMessage;
10064
10086
  }
@@ -16699,6 +16721,7 @@ class AuroCombobox extends AuroElement {
16699
16721
  // current focus is on a menuoption, after clicking on it.
16700
16722
  if (this.persistInput && focusedEl && (focusedEl.tagName.toLowerCase() === 'auro-menuoption' || focusedEl.hasAttribute('auro-menuoption'))) {
16701
16723
  this.setClearBtnFocus();
16724
+ this.validate(true);
16702
16725
  }
16703
16726
  }
16704
16727
  }
@@ -818,12 +818,23 @@ let AuroFormValidation$1 = class AuroFormValidation {
818
818
  }
819
819
 
820
820
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
821
- elem.validity = this.auroInputElements[0].validity;
822
- elem.errorMessage = this.auroInputElements[0].errorMessage;
821
+
822
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
823
+
824
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
825
+ if (!isCombobox || isCombobox && !elem.persistValue) {
826
+
827
+ // run validation on all inputs since we're going to use them to set the validity of this component
828
+ this.auroInputElements.forEach(input => input.validate());
829
+
830
+ // Reset element validity to the validity of the input
831
+ elem.validity = this.auroInputElements[0].validity;
832
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
833
+ }
823
834
 
824
835
  // multiple input in one components (datepicker)
825
836
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
826
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
837
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
827
838
  elem.validity = this.auroInputElements[1].validity;
828
839
  elem.errorMessage = this.auroInputElements[1].errorMessage;
829
840
  }
@@ -10053,12 +10064,23 @@ class AuroFormValidation {
10053
10064
  }
10054
10065
 
10055
10066
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
10056
- elem.validity = this.auroInputElements[0].validity;
10057
- elem.errorMessage = this.auroInputElements[0].errorMessage;
10067
+
10068
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
10069
+
10070
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
10071
+ if (!isCombobox || isCombobox && !elem.persistValue) {
10072
+
10073
+ // run validation on all inputs since we're going to use them to set the validity of this component
10074
+ this.auroInputElements.forEach(input => input.validate());
10075
+
10076
+ // Reset element validity to the validity of the input
10077
+ elem.validity = this.auroInputElements[0].validity;
10078
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
10079
+ }
10058
10080
 
10059
10081
  // multiple input in one components (datepicker)
10060
10082
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
10061
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
10083
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
10062
10084
  elem.validity = this.auroInputElements[1].validity;
10063
10085
  elem.errorMessage = this.auroInputElements[1].errorMessage;
10064
10086
  }
@@ -16699,6 +16721,7 @@ class AuroCombobox extends AuroElement {
16699
16721
  // current focus is on a menuoption, after clicking on it.
16700
16722
  if (this.persistInput && focusedEl && (focusedEl.tagName.toLowerCase() === 'auro-menuoption' || focusedEl.hasAttribute('auro-menuoption'))) {
16701
16723
  this.setClearBtnFocus();
16724
+ this.validate(true);
16702
16725
  }
16703
16726
  }
16704
16727
  }
@@ -2416,12 +2416,23 @@ class AuroFormValidation {
2416
2416
  }
2417
2417
 
2418
2418
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
2419
- elem.validity = this.auroInputElements[0].validity;
2420
- elem.errorMessage = this.auroInputElements[0].errorMessage;
2419
+
2420
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
2421
+
2422
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
2423
+ if (!isCombobox || isCombobox && !elem.persistValue) {
2424
+
2425
+ // run validation on all inputs since we're going to use them to set the validity of this component
2426
+ this.auroInputElements.forEach(input => input.validate());
2427
+
2428
+ // Reset element validity to the validity of the input
2429
+ elem.validity = this.auroInputElements[0].validity;
2430
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
2431
+ }
2421
2432
 
2422
2433
  // multiple input in one components (datepicker)
2423
2434
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
2424
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
2435
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
2425
2436
  elem.validity = this.auroInputElements[1].validity;
2426
2437
  elem.errorMessage = this.auroInputElements[1].errorMessage;
2427
2438
  }
@@ -2416,12 +2416,23 @@ class AuroFormValidation {
2416
2416
  }
2417
2417
 
2418
2418
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
2419
- elem.validity = this.auroInputElements[0].validity;
2420
- elem.errorMessage = this.auroInputElements[0].errorMessage;
2419
+
2420
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
2421
+
2422
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
2423
+ if (!isCombobox || isCombobox && !elem.persistValue) {
2424
+
2425
+ // run validation on all inputs since we're going to use them to set the validity of this component
2426
+ this.auroInputElements.forEach(input => input.validate());
2427
+
2428
+ // Reset element validity to the validity of the input
2429
+ elem.validity = this.auroInputElements[0].validity;
2430
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
2431
+ }
2421
2432
 
2422
2433
  // multiple input in one components (datepicker)
2423
2434
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
2424
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
2435
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
2425
2436
  elem.validity = this.auroInputElements[1].validity;
2426
2437
  elem.errorMessage = this.auroInputElements[1].errorMessage;
2427
2438
  }
@@ -2370,12 +2370,23 @@ class AuroFormValidation {
2370
2370
  }
2371
2371
 
2372
2372
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
2373
- elem.validity = this.auroInputElements[0].validity;
2374
- elem.errorMessage = this.auroInputElements[0].errorMessage;
2373
+
2374
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
2375
+
2376
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
2377
+ if (!isCombobox || isCombobox && !elem.persistValue) {
2378
+
2379
+ // run validation on all inputs since we're going to use them to set the validity of this component
2380
+ this.auroInputElements.forEach(input => input.validate());
2381
+
2382
+ // Reset element validity to the validity of the input
2383
+ elem.validity = this.auroInputElements[0].validity;
2384
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
2385
+ }
2375
2386
 
2376
2387
  // multiple input in one components (datepicker)
2377
2388
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
2378
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
2389
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
2379
2390
  elem.validity = this.auroInputElements[1].validity;
2380
2391
  elem.errorMessage = this.auroInputElements[1].errorMessage;
2381
2392
  }
@@ -2370,12 +2370,23 @@ class AuroFormValidation {
2370
2370
  }
2371
2371
 
2372
2372
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
2373
- elem.validity = this.auroInputElements[0].validity;
2374
- elem.errorMessage = this.auroInputElements[0].errorMessage;
2373
+
2374
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
2375
+
2376
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
2377
+ if (!isCombobox || isCombobox && !elem.persistValue) {
2378
+
2379
+ // run validation on all inputs since we're going to use them to set the validity of this component
2380
+ this.auroInputElements.forEach(input => input.validate());
2381
+
2382
+ // Reset element validity to the validity of the input
2383
+ elem.validity = this.auroInputElements[0].validity;
2384
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
2385
+ }
2375
2386
 
2376
2387
  // multiple input in one components (datepicker)
2377
2388
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
2378
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
2389
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
2379
2390
  elem.validity = this.auroInputElements[1].validity;
2380
2391
  elem.errorMessage = this.auroInputElements[1].errorMessage;
2381
2392
  }
@@ -1057,12 +1057,23 @@ let AuroFormValidation$1 = class AuroFormValidation {
1057
1057
  }
1058
1058
 
1059
1059
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1060
- elem.validity = this.auroInputElements[0].validity;
1061
- elem.errorMessage = this.auroInputElements[0].errorMessage;
1060
+
1061
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
1062
+
1063
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
1064
+ if (!isCombobox || isCombobox && !elem.persistValue) {
1065
+
1066
+ // run validation on all inputs since we're going to use them to set the validity of this component
1067
+ this.auroInputElements.forEach(input => input.validate());
1068
+
1069
+ // Reset element validity to the validity of the input
1070
+ elem.validity = this.auroInputElements[0].validity;
1071
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1072
+ }
1062
1073
 
1063
1074
  // multiple input in one components (datepicker)
1064
1075
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1065
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1076
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
1066
1077
  elem.validity = this.auroInputElements[1].validity;
1067
1078
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1068
1079
  }
@@ -23752,12 +23763,23 @@ class AuroFormValidation {
23752
23763
  }
23753
23764
 
23754
23765
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
23755
- elem.validity = this.auroInputElements[0].validity;
23756
- elem.errorMessage = this.auroInputElements[0].errorMessage;
23766
+
23767
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
23768
+
23769
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
23770
+ if (!isCombobox || isCombobox && !elem.persistValue) {
23771
+
23772
+ // run validation on all inputs since we're going to use them to set the validity of this component
23773
+ this.auroInputElements.forEach(input => input.validate());
23774
+
23775
+ // Reset element validity to the validity of the input
23776
+ elem.validity = this.auroInputElements[0].validity;
23777
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
23778
+ }
23757
23779
 
23758
23780
  // multiple input in one components (datepicker)
23759
23781
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
23760
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
23782
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
23761
23783
  elem.validity = this.auroInputElements[1].validity;
23762
23784
  elem.errorMessage = this.auroInputElements[1].errorMessage;
23763
23785
  }
@@ -798,12 +798,23 @@ let AuroFormValidation$1 = class AuroFormValidation {
798
798
  }
799
799
 
800
800
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
801
- elem.validity = this.auroInputElements[0].validity;
802
- elem.errorMessage = this.auroInputElements[0].errorMessage;
801
+
802
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
803
+
804
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
805
+ if (!isCombobox || isCombobox && !elem.persistValue) {
806
+
807
+ // run validation on all inputs since we're going to use them to set the validity of this component
808
+ this.auroInputElements.forEach(input => input.validate());
809
+
810
+ // Reset element validity to the validity of the input
811
+ elem.validity = this.auroInputElements[0].validity;
812
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
813
+ }
803
814
 
804
815
  // multiple input in one components (datepicker)
805
816
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
806
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
817
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
807
818
  elem.validity = this.auroInputElements[1].validity;
808
819
  elem.errorMessage = this.auroInputElements[1].errorMessage;
809
820
  }
@@ -23493,12 +23504,23 @@ class AuroFormValidation {
23493
23504
  }
23494
23505
 
23495
23506
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
23496
- elem.validity = this.auroInputElements[0].validity;
23497
- elem.errorMessage = this.auroInputElements[0].errorMessage;
23507
+
23508
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
23509
+
23510
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
23511
+ if (!isCombobox || isCombobox && !elem.persistValue) {
23512
+
23513
+ // run validation on all inputs since we're going to use them to set the validity of this component
23514
+ this.auroInputElements.forEach(input => input.validate());
23515
+
23516
+ // Reset element validity to the validity of the input
23517
+ elem.validity = this.auroInputElements[0].validity;
23518
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
23519
+ }
23498
23520
 
23499
23521
  // multiple input in one components (datepicker)
23500
23522
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
23501
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
23523
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
23502
23524
  elem.validity = this.auroInputElements[1].validity;
23503
23525
  elem.errorMessage = this.auroInputElements[1].errorMessage;
23504
23526
  }
@@ -779,12 +779,23 @@ let AuroFormValidation$1 = class AuroFormValidation {
779
779
  }
780
780
 
781
781
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
782
- elem.validity = this.auroInputElements[0].validity;
783
- elem.errorMessage = this.auroInputElements[0].errorMessage;
782
+
783
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
784
+
785
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
786
+ if (!isCombobox || isCombobox && !elem.persistValue) {
787
+
788
+ // run validation on all inputs since we're going to use them to set the validity of this component
789
+ this.auroInputElements.forEach(input => input.validate());
790
+
791
+ // Reset element validity to the validity of the input
792
+ elem.validity = this.auroInputElements[0].validity;
793
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
794
+ }
784
795
 
785
796
  // multiple input in one components (datepicker)
786
797
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
787
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
798
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
788
799
  elem.validity = this.auroInputElements[1].validity;
789
800
  elem.errorMessage = this.auroInputElements[1].errorMessage;
790
801
  }
@@ -23418,12 +23429,23 @@ class AuroFormValidation {
23418
23429
  }
23419
23430
 
23420
23431
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
23421
- elem.validity = this.auroInputElements[0].validity;
23422
- elem.errorMessage = this.auroInputElements[0].errorMessage;
23432
+
23433
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
23434
+
23435
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
23436
+ if (!isCombobox || isCombobox && !elem.persistValue) {
23437
+
23438
+ // run validation on all inputs since we're going to use them to set the validity of this component
23439
+ this.auroInputElements.forEach(input => input.validate());
23440
+
23441
+ // Reset element validity to the validity of the input
23442
+ elem.validity = this.auroInputElements[0].validity;
23443
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
23444
+ }
23423
23445
 
23424
23446
  // multiple input in one components (datepicker)
23425
23447
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
23426
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
23448
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
23427
23449
  elem.validity = this.auroInputElements[1].validity;
23428
23450
  elem.errorMessage = this.auroInputElements[1].errorMessage;
23429
23451
  }
@@ -779,12 +779,23 @@ let AuroFormValidation$1 = class AuroFormValidation {
779
779
  }
780
780
 
781
781
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
782
- elem.validity = this.auroInputElements[0].validity;
783
- elem.errorMessage = this.auroInputElements[0].errorMessage;
782
+
783
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
784
+
785
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
786
+ if (!isCombobox || isCombobox && !elem.persistValue) {
787
+
788
+ // run validation on all inputs since we're going to use them to set the validity of this component
789
+ this.auroInputElements.forEach(input => input.validate());
790
+
791
+ // Reset element validity to the validity of the input
792
+ elem.validity = this.auroInputElements[0].validity;
793
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
794
+ }
784
795
 
785
796
  // multiple input in one components (datepicker)
786
797
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
787
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
798
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
788
799
  elem.validity = this.auroInputElements[1].validity;
789
800
  elem.errorMessage = this.auroInputElements[1].errorMessage;
790
801
  }
@@ -23418,12 +23429,23 @@ class AuroFormValidation {
23418
23429
  }
23419
23430
 
23420
23431
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
23421
- elem.validity = this.auroInputElements[0].validity;
23422
- elem.errorMessage = this.auroInputElements[0].errorMessage;
23432
+
23433
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
23434
+
23435
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
23436
+ if (!isCombobox || isCombobox && !elem.persistValue) {
23437
+
23438
+ // run validation on all inputs since we're going to use them to set the validity of this component
23439
+ this.auroInputElements.forEach(input => input.validate());
23440
+
23441
+ // Reset element validity to the validity of the input
23442
+ elem.validity = this.auroInputElements[0].validity;
23443
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
23444
+ }
23423
23445
 
23424
23446
  // multiple input in one components (datepicker)
23425
23447
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
23426
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
23448
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
23427
23449
  elem.validity = this.auroInputElements[1].validity;
23428
23450
  elem.errorMessage = this.auroInputElements[1].errorMessage;
23429
23451
  }
@@ -4915,12 +4915,23 @@ class AuroFormValidation {
4915
4915
  }
4916
4916
 
4917
4917
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
4918
- elem.validity = this.auroInputElements[0].validity;
4919
- elem.errorMessage = this.auroInputElements[0].errorMessage;
4918
+
4919
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
4920
+
4921
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
4922
+ if (!isCombobox || isCombobox && !elem.persistValue) {
4923
+
4924
+ // run validation on all inputs since we're going to use them to set the validity of this component
4925
+ this.auroInputElements.forEach(input => input.validate());
4926
+
4927
+ // Reset element validity to the validity of the input
4928
+ elem.validity = this.auroInputElements[0].validity;
4929
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
4930
+ }
4920
4931
 
4921
4932
  // multiple input in one components (datepicker)
4922
4933
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
4923
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
4934
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
4924
4935
  elem.validity = this.auroInputElements[1].validity;
4925
4936
  elem.errorMessage = this.auroInputElements[1].errorMessage;
4926
4937
  }
@@ -4840,12 +4840,23 @@ class AuroFormValidation {
4840
4840
  }
4841
4841
 
4842
4842
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
4843
- elem.validity = this.auroInputElements[0].validity;
4844
- elem.errorMessage = this.auroInputElements[0].errorMessage;
4843
+
4844
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
4845
+
4846
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
4847
+ if (!isCombobox || isCombobox && !elem.persistValue) {
4848
+
4849
+ // run validation on all inputs since we're going to use them to set the validity of this component
4850
+ this.auroInputElements.forEach(input => input.validate());
4851
+
4852
+ // Reset element validity to the validity of the input
4853
+ elem.validity = this.auroInputElements[0].validity;
4854
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
4855
+ }
4845
4856
 
4846
4857
  // multiple input in one components (datepicker)
4847
4858
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
4848
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
4859
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
4849
4860
  elem.validity = this.auroInputElements[1].validity;
4850
4861
  elem.errorMessage = this.auroInputElements[1].errorMessage;
4851
4862
  }
@@ -4764,12 +4764,23 @@ class AuroFormValidation {
4764
4764
  }
4765
4765
 
4766
4766
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
4767
- elem.validity = this.auroInputElements[0].validity;
4768
- elem.errorMessage = this.auroInputElements[0].errorMessage;
4767
+
4768
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
4769
+
4770
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
4771
+ if (!isCombobox || isCombobox && !elem.persistValue) {
4772
+
4773
+ // run validation on all inputs since we're going to use them to set the validity of this component
4774
+ this.auroInputElements.forEach(input => input.validate());
4775
+
4776
+ // Reset element validity to the validity of the input
4777
+ elem.validity = this.auroInputElements[0].validity;
4778
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
4779
+ }
4769
4780
 
4770
4781
  // multiple input in one components (datepicker)
4771
4782
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
4772
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
4783
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
4773
4784
  elem.validity = this.auroInputElements[1].validity;
4774
4785
  elem.errorMessage = this.auroInputElements[1].errorMessage;
4775
4786
  }
@@ -4764,12 +4764,23 @@ class AuroFormValidation {
4764
4764
  }
4765
4765
 
4766
4766
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
4767
- elem.validity = this.auroInputElements[0].validity;
4768
- elem.errorMessage = this.auroInputElements[0].errorMessage;
4767
+
4768
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
4769
+
4770
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
4771
+ if (!isCombobox || isCombobox && !elem.persistValue) {
4772
+
4773
+ // run validation on all inputs since we're going to use them to set the validity of this component
4774
+ this.auroInputElements.forEach(input => input.validate());
4775
+
4776
+ // Reset element validity to the validity of the input
4777
+ elem.validity = this.auroInputElements[0].validity;
4778
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
4779
+ }
4769
4780
 
4770
4781
  // multiple input in one components (datepicker)
4771
4782
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
4772
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
4783
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
4773
4784
  elem.validity = this.auroInputElements[1].validity;
4774
4785
  elem.errorMessage = this.auroInputElements[1].errorMessage;
4775
4786
  }
@@ -1148,12 +1148,23 @@ class AuroFormValidation {
1148
1148
  }
1149
1149
 
1150
1150
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1151
- elem.validity = this.auroInputElements[0].validity;
1152
- elem.errorMessage = this.auroInputElements[0].errorMessage;
1151
+
1152
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
1153
+
1154
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
1155
+ if (!isCombobox || isCombobox && !elem.persistValue) {
1156
+
1157
+ // run validation on all inputs since we're going to use them to set the validity of this component
1158
+ this.auroInputElements.forEach(input => input.validate());
1159
+
1160
+ // Reset element validity to the validity of the input
1161
+ elem.validity = this.auroInputElements[0].validity;
1162
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1163
+ }
1153
1164
 
1154
1165
  // multiple input in one components (datepicker)
1155
1166
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1156
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1167
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
1157
1168
  elem.validity = this.auroInputElements[1].validity;
1158
1169
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1159
1170
  }
@@ -1123,12 +1123,23 @@ class AuroFormValidation {
1123
1123
  }
1124
1124
 
1125
1125
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1126
- elem.validity = this.auroInputElements[0].validity;
1127
- elem.errorMessage = this.auroInputElements[0].errorMessage;
1126
+
1127
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
1128
+
1129
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
1130
+ if (!isCombobox || isCombobox && !elem.persistValue) {
1131
+
1132
+ // run validation on all inputs since we're going to use them to set the validity of this component
1133
+ this.auroInputElements.forEach(input => input.validate());
1134
+
1135
+ // Reset element validity to the validity of the input
1136
+ elem.validity = this.auroInputElements[0].validity;
1137
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1138
+ }
1128
1139
 
1129
1140
  // multiple input in one components (datepicker)
1130
1141
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1131
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1142
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
1132
1143
  elem.validity = this.auroInputElements[1].validity;
1133
1144
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1134
1145
  }
@@ -1076,12 +1076,23 @@ class AuroFormValidation {
1076
1076
  }
1077
1077
 
1078
1078
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1079
- elem.validity = this.auroInputElements[0].validity;
1080
- elem.errorMessage = this.auroInputElements[0].errorMessage;
1079
+
1080
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
1081
+
1082
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
1083
+ if (!isCombobox || isCombobox && !elem.persistValue) {
1084
+
1085
+ // run validation on all inputs since we're going to use them to set the validity of this component
1086
+ this.auroInputElements.forEach(input => input.validate());
1087
+
1088
+ // Reset element validity to the validity of the input
1089
+ elem.validity = this.auroInputElements[0].validity;
1090
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1091
+ }
1081
1092
 
1082
1093
  // multiple input in one components (datepicker)
1083
1094
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1084
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1095
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
1085
1096
  elem.validity = this.auroInputElements[1].validity;
1086
1097
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1087
1098
  }
@@ -1076,12 +1076,23 @@ class AuroFormValidation {
1076
1076
  }
1077
1077
 
1078
1078
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1079
- elem.validity = this.auroInputElements[0].validity;
1080
- elem.errorMessage = this.auroInputElements[0].errorMessage;
1079
+
1080
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
1081
+
1082
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
1083
+ if (!isCombobox || isCombobox && !elem.persistValue) {
1084
+
1085
+ // run validation on all inputs since we're going to use them to set the validity of this component
1086
+ this.auroInputElements.forEach(input => input.validate());
1087
+
1088
+ // Reset element validity to the validity of the input
1089
+ elem.validity = this.auroInputElements[0].validity;
1090
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1091
+ }
1081
1092
 
1082
1093
  // multiple input in one components (datepicker)
1083
1094
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1084
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1095
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
1085
1096
  elem.validity = this.auroInputElements[1].validity;
1086
1097
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1087
1098
  }
@@ -1017,12 +1017,23 @@ class AuroFormValidation {
1017
1017
  }
1018
1018
 
1019
1019
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1020
- elem.validity = this.auroInputElements[0].validity;
1021
- elem.errorMessage = this.auroInputElements[0].errorMessage;
1020
+
1021
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
1022
+
1023
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
1024
+ if (!isCombobox || isCombobox && !elem.persistValue) {
1025
+
1026
+ // run validation on all inputs since we're going to use them to set the validity of this component
1027
+ this.auroInputElements.forEach(input => input.validate());
1028
+
1029
+ // Reset element validity to the validity of the input
1030
+ elem.validity = this.auroInputElements[0].validity;
1031
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1032
+ }
1022
1033
 
1023
1034
  // multiple input in one components (datepicker)
1024
1035
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1025
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1036
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
1026
1037
  elem.validity = this.auroInputElements[1].validity;
1027
1038
  elem.errorMessage = this.auroInputElements[1].errorMessage;
1028
1039
  }
@@ -925,12 +925,23 @@ class AuroFormValidation {
925
925
  }
926
926
 
927
927
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
928
- elem.validity = this.auroInputElements[0].validity;
929
- elem.errorMessage = this.auroInputElements[0].errorMessage;
928
+
929
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
930
+
931
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
932
+ if (!isCombobox || isCombobox && !elem.persistValue) {
933
+
934
+ // run validation on all inputs since we're going to use them to set the validity of this component
935
+ this.auroInputElements.forEach(input => input.validate());
936
+
937
+ // Reset element validity to the validity of the input
938
+ elem.validity = this.auroInputElements[0].validity;
939
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
940
+ }
930
941
 
931
942
  // multiple input in one components (datepicker)
932
943
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
933
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
944
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
934
945
  elem.validity = this.auroInputElements[1].validity;
935
946
  elem.errorMessage = this.auroInputElements[1].errorMessage;
936
947
  }
@@ -886,12 +886,23 @@ class AuroFormValidation {
886
886
  }
887
887
 
888
888
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
889
- elem.validity = this.auroInputElements[0].validity;
890
- elem.errorMessage = this.auroInputElements[0].errorMessage;
889
+
890
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
891
+
892
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
893
+ if (!isCombobox || isCombobox && !elem.persistValue) {
894
+
895
+ // run validation on all inputs since we're going to use them to set the validity of this component
896
+ this.auroInputElements.forEach(input => input.validate());
897
+
898
+ // Reset element validity to the validity of the input
899
+ elem.validity = this.auroInputElements[0].validity;
900
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
901
+ }
891
902
 
892
903
  // multiple input in one components (datepicker)
893
904
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
894
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
905
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
895
906
  elem.validity = this.auroInputElements[1].validity;
896
907
  elem.errorMessage = this.auroInputElements[1].errorMessage;
897
908
  }
@@ -886,12 +886,23 @@ class AuroFormValidation {
886
886
  }
887
887
 
888
888
  if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
889
- elem.validity = this.auroInputElements[0].validity;
890
- elem.errorMessage = this.auroInputElements[0].errorMessage;
889
+
890
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
891
+
892
+ // Don't reset combobox validity if persistValue is set since we can't use the input value to validate
893
+ if (!isCombobox || isCombobox && !elem.persistValue) {
894
+
895
+ // run validation on all inputs since we're going to use them to set the validity of this component
896
+ this.auroInputElements.forEach(input => input.validate());
897
+
898
+ // Reset element validity to the validity of the input
899
+ elem.validity = this.auroInputElements[0].validity;
900
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
901
+ }
891
902
 
892
903
  // multiple input in one components (datepicker)
893
904
  // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
894
- if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
905
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
895
906
  elem.validity = this.auroInputElements[1].validity;
896
907
  elem.errorMessage = this.auroInputElements[1].errorMessage;
897
908
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem-dev/auro-formkit",
3
- "version": "0.0.0-pr1104.0",
3
+ "version": "0.0.0-pr1104.2",
4
4
  "description": "A collection of web components used to build forms.",
5
5
  "homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
6
6
  "bugs": {