@aurodesignsystem/auro-formkit 5.2.3 → 5.3.1

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 (55) hide show
  1. package/CHANGELOG.md +2 -10
  2. package/components/bibtemplate/dist/buttonVersion.d.ts +1 -1
  3. package/components/bibtemplate/dist/index.js +44 -88
  4. package/components/bibtemplate/dist/registered.js +44 -88
  5. package/components/checkbox/demo/api.min.js +14 -3
  6. package/components/checkbox/demo/index.min.js +14 -3
  7. package/components/checkbox/dist/index.js +14 -3
  8. package/components/checkbox/dist/registered.js +14 -3
  9. package/components/combobox/demo/api.js +2 -0
  10. package/components/combobox/demo/api.md +115 -1
  11. package/components/combobox/demo/api.min.js +350 -282
  12. package/components/combobox/demo/index.min.js +253 -204
  13. package/components/combobox/dist/auro-combobox.d.ts +9 -0
  14. package/components/combobox/dist/index.js +246 -200
  15. package/components/combobox/dist/registered.js +246 -200
  16. package/components/counter/demo/api.md +29 -1
  17. package/components/counter/demo/api.min.js +219 -185
  18. package/components/counter/demo/index.min.js +219 -185
  19. package/components/counter/dist/auro-counter-group.d.ts +9 -0
  20. package/components/counter/dist/index.js +219 -185
  21. package/components/counter/dist/registered.js +219 -185
  22. package/components/datepicker/demo/api.md +23 -1
  23. package/components/datepicker/demo/api.min.js +304 -294
  24. package/components/datepicker/demo/index.md +6 -6
  25. package/components/datepicker/demo/index.min.js +304 -294
  26. package/components/datepicker/dist/auro-datepicker.d.ts +9 -0
  27. package/components/datepicker/dist/buttonVersion.d.ts +1 -1
  28. package/components/datepicker/dist/index.js +304 -294
  29. package/components/datepicker/dist/registered.js +304 -294
  30. package/components/dropdown/demo/api.md +46 -2
  31. package/components/dropdown/demo/api.min.js +101 -1
  32. package/components/dropdown/demo/index.min.js +101 -1
  33. package/components/dropdown/dist/auro-dropdown.d.ts +10 -0
  34. package/components/dropdown/dist/index.js +101 -1
  35. package/components/dropdown/dist/registered.js +101 -1
  36. package/components/input/demo/api.min.js +62 -95
  37. package/components/input/demo/index.min.js +62 -95
  38. package/components/input/dist/buttonVersion.d.ts +1 -1
  39. package/components/input/dist/index.js +62 -95
  40. package/components/input/dist/registered.js +62 -95
  41. package/components/menu/demo/api.min.js +3 -0
  42. package/components/menu/demo/index.min.js +3 -0
  43. package/components/menu/dist/index.js +3 -0
  44. package/components/menu/dist/registered.js +3 -0
  45. package/components/radio/demo/api.min.js +14 -3
  46. package/components/radio/demo/index.min.js +14 -3
  47. package/components/radio/dist/index.js +14 -3
  48. package/components/radio/dist/registered.js +14 -3
  49. package/components/select/demo/api.md +29 -1
  50. package/components/select/demo/api.min.js +188 -107
  51. package/components/select/demo/index.min.js +188 -107
  52. package/components/select/dist/auro-select.d.ts +9 -0
  53. package/components/select/dist/index.js +181 -103
  54. package/components/select/dist/registered.js +181 -103
  55. package/package.json +5 -5
@@ -867,6 +867,9 @@ class AuroMenu extends AuroElement$1 {
867
867
  case "ArrowUp":
868
868
  this.navigateOptions('up');
869
869
  break;
870
+ case "Tab":
871
+ this.makeSelection();
872
+ break;
870
873
  case "Enter":
871
874
  this.makeSelection();
872
875
  break;
@@ -827,6 +827,9 @@ class AuroMenu extends AuroElement$1 {
827
827
  case "ArrowUp":
828
828
  this.navigateOptions('up');
829
829
  break;
830
+ case "Tab":
831
+ this.makeSelection();
832
+ break;
830
833
  case "Enter":
831
834
  this.makeSelection();
832
835
  break;
@@ -834,6 +834,9 @@ class AuroMenu extends AuroElement$1 {
834
834
  case "ArrowUp":
835
835
  this.navigateOptions('up');
836
836
  break;
837
+ case "Tab":
838
+ this.makeSelection();
839
+ break;
837
840
  case "Enter":
838
841
  this.makeSelection();
839
842
  break;
@@ -793,6 +793,9 @@ class AuroMenu extends AuroElement$1 {
793
793
  case "ArrowUp":
794
794
  this.navigateOptions('up');
795
795
  break;
796
+ case "Tab":
797
+ this.makeSelection();
798
+ break;
796
799
  case "Enter":
797
800
  this.makeSelection();
798
801
  break;
@@ -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
  }
@@ -40,6 +40,7 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
40
40
  | [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
41
41
  | [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
42
42
  | [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
43
+ | [shift](#shift) | `shift` | `boolean` | "false" | If set, the dropdown will shift its position to avoid being cut off by the viewport. |
43
44
  | [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
44
45
  | [value](#value) | `value` | `string` | | Value selected for the component. |
45
46
 
@@ -1130,12 +1131,13 @@ The label for selected option can be customized using `displayValue` slot under
1130
1131
  </auro-accordion>
1131
1132
 
1132
1133
  ### Customized bib position
1133
- The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement` attributes.
1134
+ The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement`, and `shift` attributes.
1134
1135
 
1135
1136
  - `placement` specifies the preferred position where the bib should appear relative to the trigger.
1136
1137
  - `offset` sets the distance between the trigger and the bib.
1137
1138
  - When `autoPlacement` is enabled, smart positioning logic is applied to determine the best placement for the bib. If all sides have sufficient space, the bib will appear in the position specified by `placement`.
1138
1139
  - Unless `noFlip` is enabled, if there isn't enough space for the preferred `placement`, the bib will automatically flip to an alternative position.
1140
+ - `shift` when enabled, adjusts the bib position when it would overflow the viewport boundaries, ensuring it remains visible.
1139
1141
 
1140
1142
  <div class="exampleWrapper">
1141
1143
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/floaterConfig.html) -->
@@ -1180,6 +1182,19 @@ The bib position can be customized with `placement`, `offset`, `flip`, `autoPlac
1180
1182
  <auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
1181
1183
  </auro-menu>
1182
1184
  </auro-select>
1185
+ <auro-select width="350px" offset="20" noFlip placement="bottom-start" shift noFlip >
1186
+ <span slot="bib.fullscreen.headline">Bib Headline</span>
1187
+ <span slot="label">Label</span>
1188
+ <span slot="helpText">bottom-start bib with 20px offset, noFlip and shift</span>
1189
+ <auro-menu>
1190
+ <auro-menuoption value="stops">Stops</auro-menuoption>
1191
+ <auro-menuoption value="price">Price</auro-menuoption>
1192
+ <auro-menuoption value="duration">Duration</auro-menuoption>
1193
+ <auro-menuoption value="departure">Departure</auro-menuoption>
1194
+ <auro-menuoption value="arrival">Arrival</auro-menuoption>
1195
+ <auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
1196
+ </auro-menu>
1197
+ </auro-select>
1183
1198
  </div>
1184
1199
  <!-- AURO-GENERATED-CONTENT:END -->
1185
1200
  </div>
@@ -1229,6 +1244,19 @@ The bib position can be customized with `placement`, `offset`, `flip`, `autoPlac
1229
1244
  <auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
1230
1245
  </auro-menu>
1231
1246
  </auro-select>
1247
+ <auro-select width="350px" offset="20" noFlip placement="bottom-start" shift noFlip >
1248
+ <span slot="bib.fullscreen.headline">Bib Headline</span>
1249
+ <span slot="label">Label</span>
1250
+ <span slot="helpText">bottom-start bib with 20px offset, noFlip and shift</span>
1251
+ <auro-menu>
1252
+ <auro-menuoption value="stops">Stops</auro-menuoption>
1253
+ <auro-menuoption value="price">Price</auro-menuoption>
1254
+ <auro-menuoption value="duration">Duration</auro-menuoption>
1255
+ <auro-menuoption value="departure">Departure</auro-menuoption>
1256
+ <auro-menuoption value="arrival">Arrival</auro-menuoption>
1257
+ <auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
1258
+ </auro-menu>
1259
+ </auro-select>
1232
1260
  </div>
1233
1261
  ```
1234
1262
  <!-- AURO-GENERATED-CONTENT:END -->