@aurodesignsystem/auro-formkit 5.1.0-rc-1014.1 → 5.1.0-rc-1044.1.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 (44) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/components/checkbox/demo/api.min.js +37 -9
  3. package/components/checkbox/demo/index.min.js +37 -9
  4. package/components/checkbox/dist/auro-checkbox.d.ts +7 -0
  5. package/components/checkbox/dist/index.js +37 -9
  6. package/components/checkbox/dist/registered.js +37 -9
  7. package/components/combobox/demo/api.min.js +51 -24
  8. package/components/combobox/demo/index.min.js +51 -24
  9. package/components/combobox/dist/index.js +51 -24
  10. package/components/combobox/dist/registered.js +51 -24
  11. package/components/counter/demo/api.min.js +25 -9
  12. package/components/counter/demo/index.min.js +25 -9
  13. package/components/counter/dist/index.js +25 -9
  14. package/components/counter/dist/registered.js +25 -9
  15. package/components/datepicker/demo/api.md +1 -0
  16. package/components/datepicker/demo/api.min.js +45 -19
  17. package/components/datepicker/demo/index.min.js +45 -19
  18. package/components/datepicker/dist/index.js +45 -19
  19. package/components/datepicker/dist/registered.js +45 -19
  20. package/components/dropdown/demo/api.min.js +8 -0
  21. package/components/dropdown/demo/index.min.js +8 -0
  22. package/components/dropdown/dist/index.js +8 -0
  23. package/components/dropdown/dist/registered.js +8 -0
  24. package/components/input/demo/api.min.js +17 -9
  25. package/components/input/demo/index.min.js +17 -9
  26. package/components/input/dist/index.js +17 -9
  27. package/components/input/dist/registered.js +17 -9
  28. package/components/layoutElement/dist/auroElement.d.ts +5 -0
  29. package/components/layoutElement/dist/index.js +8 -0
  30. package/components/layoutElement/dist/registered.js +8 -0
  31. package/components/menu/demo/api.min.js +8 -0
  32. package/components/menu/demo/index.min.js +8 -0
  33. package/components/menu/dist/index.js +8 -0
  34. package/components/menu/dist/registered.js +8 -0
  35. package/components/radio/demo/api.min.js +15 -13
  36. package/components/radio/demo/index.min.js +15 -13
  37. package/components/radio/dist/auro-radio.d.ts +1 -1
  38. package/components/radio/dist/index.js +15 -13
  39. package/components/radio/dist/registered.js +15 -13
  40. package/components/select/demo/api.min.js +25 -9
  41. package/components/select/demo/index.min.js +25 -9
  42. package/components/select/dist/index.js +25 -9
  43. package/components/select/dist/registered.js +25 -9
  44. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,12 +1,18 @@
1
- # [5.1.0-rc-1014.1](https://github.com/AlaskaAirlines/auro-formkit/compare/v5.0.0...v5.1.0-rc-1014.1) (2025-07-28)
1
+ # [5.1.0-rc-1044.1.1](https://github.com/AlaskaAirlines/auro-formkit/compare/v5.0.0...v5.1.0-rc-1044.1.1) (2025-08-05)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
+ * correct token color for combobox background ([e9220a9](https://github.com/AlaskaAirlines/auro-formkit/commit/e9220a98edcca3c80f9c07f504fb4783b21e55e7))
7
+ * fire only one `auroFormElement-validated` per validation [#878](https://github.com/AlaskaAirlines/auro-formkit/issues/878) ([7894538](https://github.com/AlaskaAirlines/auro-formkit/commit/7894538dc18872c06565ddd7b4cdd978f628a995))
8
+ * handle empty radio groups [#1039](https://github.com/AlaskaAirlines/auro-formkit/issues/1039) ([d4effb9](https://github.com/AlaskaAirlines/auro-formkit/commit/d4effb999da791d22efa200ccd2a210b563425da))
6
9
  * menu doesn't show when typing character the first time ([b71f691](https://github.com/AlaskaAirlines/auro-formkit/commit/b71f691f0ca4dcc043d9fbdd37d462d4318e981e))
7
10
  * mis-alignment on checkmark with `text-align: center | right` ([6e1abc8](https://github.com/AlaskaAirlines/auro-formkit/commit/6e1abc8182ab8fbae63061a2e27c9ed4a88d2863))
8
11
  * prevent the alignment breakage from inherited text-align style [#880](https://github.com/AlaskaAirlines/auro-formkit/issues/880) ([3e14b4e](https://github.com/AlaskaAirlines/auro-formkit/commit/3e14b4e8a9c9e3ffb2d6f874fd80f6896b64a028))
12
+ * refactor focus detection to not rely on document.activeElement [#1042](https://github.com/AlaskaAirlines/auro-formkit/issues/1042) ([5d841ce](https://github.com/AlaskaAirlines/auro-formkit/commit/5d841ce1122f272d4b4b92af174b52441febe3fc))
13
+ * toggle checkbox with Space key [#1016](https://github.com/AlaskaAirlines/auro-formkit/issues/1016) ([2f2f339](https://github.com/AlaskaAirlines/auro-formkit/commit/2f2f339c72c6ac8d537da054309d8a6b0ad401ff))
9
14
  * try/catch DOMParser ([111bb76](https://github.com/AlaskaAirlines/auro-formkit/commit/111bb764d9a342d0d8c0b6627832f900d56cdb11))
15
+ * update combobox input background color ([82a21f0](https://github.com/AlaskaAirlines/auro-formkit/commit/82a21f08e7d6711d1ad2afd0b495c220caa3d7e3))
10
16
 
11
17
 
12
18
  ### Features
@@ -129,6 +129,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
129
129
  }
130
130
  };
131
131
 
132
+ /* eslint-disable max-lines */
132
133
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
133
134
  // See LICENSE in the project root for license information.
134
135
 
@@ -367,6 +368,33 @@ class AuroCheckbox extends i$2 {
367
368
  });
368
369
  }
369
370
 
371
+ connectedCallback() {
372
+ super.connectedCallback();
373
+
374
+ this.handleKeyDown = this.handleKeyDown.bind(this);
375
+ this.addEventListener('keydown', this.handleKeyDown);
376
+ }
377
+
378
+ disconnectedCallback() {
379
+ super.disconnectedCallback();
380
+
381
+ this.removeEventListener('keydown', this.handleKeyDown);
382
+ }
383
+
384
+ /**
385
+ * Handles keydown event to toggle the checkbox with Space key.
386
+ * @private
387
+ * @param {KeyboardEvent} event - The keydown event from the checkbox input.
388
+ * @returns {void}
389
+ */
390
+ handleKeyDown(event) {
391
+ if (event.key === ' ' && !this.disabled) {
392
+ event.preventDefault();
393
+
394
+ this.shadowRoot.querySelector('input').click();
395
+ }
396
+ }
397
+
370
398
  /**
371
399
  * @private
372
400
  * @returns {HTMLElement}
@@ -1132,16 +1160,16 @@ class AuroFormValidation {
1132
1160
  }
1133
1161
 
1134
1162
  this.getErrorMessage(elem);
1135
-
1136
- elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1137
- bubbles: true,
1138
- composed: true,
1139
- detail: {
1140
- validity: elem.validity,
1141
- message: elem.errorMessage
1142
- }
1143
- }));
1144
1163
  }
1164
+
1165
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1166
+ bubbles: true,
1167
+ composed: true,
1168
+ detail: {
1169
+ validity: elem.validity,
1170
+ message: elem.errorMessage
1171
+ }
1172
+ }));
1145
1173
  }
1146
1174
 
1147
1175
  /**
@@ -121,6 +121,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
121
121
  }
122
122
  };
123
123
 
124
+ /* eslint-disable max-lines */
124
125
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
125
126
  // See LICENSE in the project root for license information.
126
127
 
@@ -359,6 +360,33 @@ class AuroCheckbox extends i$2 {
359
360
  });
360
361
  }
361
362
 
363
+ connectedCallback() {
364
+ super.connectedCallback();
365
+
366
+ this.handleKeyDown = this.handleKeyDown.bind(this);
367
+ this.addEventListener('keydown', this.handleKeyDown);
368
+ }
369
+
370
+ disconnectedCallback() {
371
+ super.disconnectedCallback();
372
+
373
+ this.removeEventListener('keydown', this.handleKeyDown);
374
+ }
375
+
376
+ /**
377
+ * Handles keydown event to toggle the checkbox with Space key.
378
+ * @private
379
+ * @param {KeyboardEvent} event - The keydown event from the checkbox input.
380
+ * @returns {void}
381
+ */
382
+ handleKeyDown(event) {
383
+ if (event.key === ' ' && !this.disabled) {
384
+ event.preventDefault();
385
+
386
+ this.shadowRoot.querySelector('input').click();
387
+ }
388
+ }
389
+
362
390
  /**
363
391
  * @private
364
392
  * @returns {HTMLElement}
@@ -1124,16 +1152,16 @@ class AuroFormValidation {
1124
1152
  }
1125
1153
 
1126
1154
  this.getErrorMessage(elem);
1127
-
1128
- elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1129
- bubbles: true,
1130
- composed: true,
1131
- detail: {
1132
- validity: elem.validity,
1133
- message: elem.errorMessage
1134
- }
1135
- }));
1136
1155
  }
1156
+
1157
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1158
+ bubbles: true,
1159
+ composed: true,
1160
+ detail: {
1161
+ validity: elem.validity,
1162
+ message: elem.errorMessage
1163
+ }
1164
+ }));
1137
1165
  }
1138
1166
 
1139
1167
  /**
@@ -127,6 +127,13 @@ export class AuroCheckbox extends LitElement {
127
127
  reset(): void;
128
128
  firstUpdated(): void;
129
129
  inputId: string;
130
+ /**
131
+ * Handles keydown event to toggle the checkbox with Space key.
132
+ * @private
133
+ * @param {KeyboardEvent} event - The keydown event from the checkbox input.
134
+ * @returns {void}
135
+ */
136
+ private handleKeyDown;
130
137
  /**
131
138
  * @private
132
139
  * @returns {HTMLElement}
@@ -81,6 +81,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
81
81
  }
82
82
  };
83
83
 
84
+ /* eslint-disable max-lines */
84
85
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
85
86
  // See LICENSE in the project root for license information.
86
87
 
@@ -319,6 +320,33 @@ class AuroCheckbox extends LitElement {
319
320
  });
320
321
  }
321
322
 
323
+ connectedCallback() {
324
+ super.connectedCallback();
325
+
326
+ this.handleKeyDown = this.handleKeyDown.bind(this);
327
+ this.addEventListener('keydown', this.handleKeyDown);
328
+ }
329
+
330
+ disconnectedCallback() {
331
+ super.disconnectedCallback();
332
+
333
+ this.removeEventListener('keydown', this.handleKeyDown);
334
+ }
335
+
336
+ /**
337
+ * Handles keydown event to toggle the checkbox with Space key.
338
+ * @private
339
+ * @param {KeyboardEvent} event - The keydown event from the checkbox input.
340
+ * @returns {void}
341
+ */
342
+ handleKeyDown(event) {
343
+ if (event.key === ' ' && !this.disabled) {
344
+ event.preventDefault();
345
+
346
+ this.shadowRoot.querySelector('input').click();
347
+ }
348
+ }
349
+
322
350
  /**
323
351
  * @private
324
352
  * @returns {HTMLElement}
@@ -1077,16 +1105,16 @@ class AuroFormValidation {
1077
1105
  }
1078
1106
 
1079
1107
  this.getErrorMessage(elem);
1080
-
1081
- elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1082
- bubbles: true,
1083
- composed: true,
1084
- detail: {
1085
- validity: elem.validity,
1086
- message: elem.errorMessage
1087
- }
1088
- }));
1089
1108
  }
1109
+
1110
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1111
+ bubbles: true,
1112
+ composed: true,
1113
+ detail: {
1114
+ validity: elem.validity,
1115
+ message: elem.errorMessage
1116
+ }
1117
+ }));
1090
1118
  }
1091
1119
 
1092
1120
  /**
@@ -81,6 +81,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
81
81
  }
82
82
  };
83
83
 
84
+ /* eslint-disable max-lines */
84
85
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
85
86
  // See LICENSE in the project root for license information.
86
87
 
@@ -319,6 +320,33 @@ class AuroCheckbox extends LitElement {
319
320
  });
320
321
  }
321
322
 
323
+ connectedCallback() {
324
+ super.connectedCallback();
325
+
326
+ this.handleKeyDown = this.handleKeyDown.bind(this);
327
+ this.addEventListener('keydown', this.handleKeyDown);
328
+ }
329
+
330
+ disconnectedCallback() {
331
+ super.disconnectedCallback();
332
+
333
+ this.removeEventListener('keydown', this.handleKeyDown);
334
+ }
335
+
336
+ /**
337
+ * Handles keydown event to toggle the checkbox with Space key.
338
+ * @private
339
+ * @param {KeyboardEvent} event - The keydown event from the checkbox input.
340
+ * @returns {void}
341
+ */
342
+ handleKeyDown(event) {
343
+ if (event.key === ' ' && !this.disabled) {
344
+ event.preventDefault();
345
+
346
+ this.shadowRoot.querySelector('input').click();
347
+ }
348
+ }
349
+
322
350
  /**
323
351
  * @private
324
352
  * @returns {HTMLElement}
@@ -1077,16 +1105,16 @@ class AuroFormValidation {
1077
1105
  }
1078
1106
 
1079
1107
  this.getErrorMessage(elem);
1080
-
1081
- elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1082
- bubbles: true,
1083
- composed: true,
1084
- detail: {
1085
- validity: elem.validity,
1086
- message: elem.errorMessage
1087
- }
1088
- }));
1089
1108
  }
1109
+
1110
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1111
+ bubbles: true,
1112
+ composed: true,
1113
+ detail: {
1114
+ validity: elem.validity,
1115
+ message: elem.errorMessage
1116
+ }
1117
+ }));
1090
1118
  }
1091
1119
 
1092
1120
  /**
@@ -1040,16 +1040,16 @@ let AuroFormValidation$1 = class AuroFormValidation {
1040
1040
  }
1041
1041
 
1042
1042
  this.getErrorMessage(elem);
1043
-
1044
- elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1045
- bubbles: true,
1046
- composed: true,
1047
- detail: {
1048
- validity: elem.validity,
1049
- message: elem.errorMessage
1050
- }
1051
- }));
1052
1043
  }
1044
+
1045
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1046
+ bubbles: true,
1047
+ composed: true,
1048
+ detail: {
1049
+ validity: elem.validity,
1050
+ message: elem.errorMessage
1051
+ }
1052
+ }));
1053
1053
  }
1054
1054
 
1055
1055
  /**
@@ -4505,6 +4505,14 @@ let AuroElement$4 = class AuroElement extends i$2 {
4505
4505
  };
4506
4506
  }
4507
4507
 
4508
+ /**
4509
+ * Returns true if the element has focus.
4510
+ * @returns {boolean} - Returns true if the element has focus.
4511
+ */
4512
+ get componentHasFocus() {
4513
+ return this.matches(':focus');
4514
+ }
4515
+
4508
4516
  resetShapeClasses() {
4509
4517
  const wrapper = this.shadowRoot.querySelector('.wrapper');
4510
4518
 
@@ -10255,16 +10263,16 @@ class AuroFormValidation {
10255
10263
  }
10256
10264
 
10257
10265
  this.getErrorMessage(elem);
10258
-
10259
- elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
10260
- bubbles: true,
10261
- composed: true,
10262
- detail: {
10263
- validity: elem.validity,
10264
- message: elem.errorMessage
10265
- }
10266
- }));
10267
10266
  }
10267
+
10268
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
10269
+ bubbles: true,
10270
+ composed: true,
10271
+ detail: {
10272
+ validity: elem.validity,
10273
+ message: elem.errorMessage
10274
+ }
10275
+ }));
10268
10276
  }
10269
10277
 
10270
10278
  /**
@@ -10356,6 +10364,14 @@ let AuroElement$2$1 = class AuroElement extends i$2 {
10356
10364
  };
10357
10365
  }
10358
10366
 
10367
+ /**
10368
+ * Returns true if the element has focus.
10369
+ * @returns {boolean} - Returns true if the element has focus.
10370
+ */
10371
+ get componentHasFocus() {
10372
+ return this.matches(':focus');
10373
+ }
10374
+
10359
10375
  resetShapeClasses() {
10360
10376
  const wrapper = this.shadowRoot.querySelector('.wrapper');
10361
10377
 
@@ -15785,7 +15801,7 @@ class AuroBibtemplate extends i$2 {
15785
15801
 
15786
15802
  var bibTemplateVersion = '1.0.0';
15787
15803
 
15788
- var styleCss$4 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-input]{--ds-auro-input-container-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host #inputInBib::part(accent-right){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
15804
+ var styleCss$4 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-input]{--ds-auro-input-background-color: transparent;--ds-auro-input-container-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host #inputInBib::part(accent-right){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
15789
15805
 
15790
15806
  var styleEmphasizedCss = i$5`:host([layout*=emphasized][shape*=pill]) [auro-input]{width:100%}:host([layout*=emphasized][shape*=pill]) [auro-input]::part(inputHelpText){display:none}`;
15791
15807
 
@@ -15825,6 +15841,14 @@ let AuroElement$1 = class AuroElement extends i$2 {
15825
15841
  };
15826
15842
  }
15827
15843
 
15844
+ /**
15845
+ * Returns true if the element has focus.
15846
+ * @returns {boolean} - Returns true if the element has focus.
15847
+ */
15848
+ get componentHasFocus() {
15849
+ return this.matches(':focus');
15850
+ }
15851
+
15828
15852
  resetShapeClasses() {
15829
15853
  const wrapper = this.shadowRoot.querySelector('.wrapper');
15830
15854
 
@@ -16650,7 +16674,7 @@ class AuroCombobox extends AuroElement$1 {
16650
16674
 
16651
16675
  // wait a frame in case the bib gets hide immediately after showing because there is no value
16652
16676
  setTimeout(() => {
16653
- if (document.activeElement === this) {
16677
+ if (this.componentHasFocus) {
16654
16678
  this.setInputFocus();
16655
16679
  }
16656
16680
  }, 0);
@@ -16815,13 +16839,16 @@ class AuroCombobox extends AuroElement$1 {
16815
16839
  * Validate every time we remove focus from the combo box.
16816
16840
  */
16817
16841
  this.addEventListener('focusout', () => {
16818
- if (document.activeElement !== this) {
16842
+ if (!this.componentHasFocus) {
16819
16843
  this.validate();
16820
16844
  }
16821
16845
  });
16822
16846
 
16823
16847
  // Handle validation messages from auroFormElement-validated event
16824
16848
  this.input.addEventListener('auroFormElement-validated', (evt) => {
16849
+ // not to bubble up input's validated event.
16850
+ evt.stopPropagation();
16851
+
16825
16852
  this.errorMessage = evt.detail.message;
16826
16853
  });
16827
16854
  }
@@ -16892,7 +16919,7 @@ class AuroCombobox extends AuroElement$1 {
16892
16919
  this.handleMenuOptions();
16893
16920
 
16894
16921
  // Validate only if the value was set programmatically
16895
- if (document.activeElement !== this) {
16922
+ if (!this.componentHasFocus) {
16896
16923
  this.validate();
16897
16924
  }
16898
16925
 
@@ -16932,7 +16959,7 @@ class AuroCombobox extends AuroElement$1 {
16932
16959
  }
16933
16960
  } else {
16934
16961
  setTimeout(() => {
16935
- if (document.activeElement !== this) {
16962
+ if (!this.componentHasFocus) {
16936
16963
  this.hideBib();
16937
16964
  }
16938
16965
  }, 0);
@@ -17053,7 +17080,7 @@ class AuroCombobox extends AuroElement$1 {
17053
17080
  }
17054
17081
 
17055
17082
  if (changedProperties.has('availableOptions')) {
17056
- if (this.availableOptions && this.availableOptions.length > 0 && document.activeElement === this) {
17083
+ if (this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) {
17057
17084
  this.showBib();
17058
17085
  } else {
17059
17086
  this.hideBib();
@@ -898,16 +898,16 @@ let AuroFormValidation$1 = class AuroFormValidation {
898
898
  }
899
899
 
900
900
  this.getErrorMessage(elem);
901
-
902
- elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
903
- bubbles: true,
904
- composed: true,
905
- detail: {
906
- validity: elem.validity,
907
- message: elem.errorMessage
908
- }
909
- }));
910
901
  }
902
+
903
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
904
+ bubbles: true,
905
+ composed: true,
906
+ detail: {
907
+ validity: elem.validity,
908
+ message: elem.errorMessage
909
+ }
910
+ }));
911
911
  }
912
912
 
913
913
  /**
@@ -4363,6 +4363,14 @@ let AuroElement$4 = class AuroElement extends i$2 {
4363
4363
  };
4364
4364
  }
4365
4365
 
4366
+ /**
4367
+ * Returns true if the element has focus.
4368
+ * @returns {boolean} - Returns true if the element has focus.
4369
+ */
4370
+ get componentHasFocus() {
4371
+ return this.matches(':focus');
4372
+ }
4373
+
4366
4374
  resetShapeClasses() {
4367
4375
  const wrapper = this.shadowRoot.querySelector('.wrapper');
4368
4376
 
@@ -10113,16 +10121,16 @@ class AuroFormValidation {
10113
10121
  }
10114
10122
 
10115
10123
  this.getErrorMessage(elem);
10116
-
10117
- elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
10118
- bubbles: true,
10119
- composed: true,
10120
- detail: {
10121
- validity: elem.validity,
10122
- message: elem.errorMessage
10123
- }
10124
- }));
10125
10124
  }
10125
+
10126
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
10127
+ bubbles: true,
10128
+ composed: true,
10129
+ detail: {
10130
+ validity: elem.validity,
10131
+ message: elem.errorMessage
10132
+ }
10133
+ }));
10126
10134
  }
10127
10135
 
10128
10136
  /**
@@ -10214,6 +10222,14 @@ let AuroElement$2$1 = class AuroElement extends i$2 {
10214
10222
  };
10215
10223
  }
10216
10224
 
10225
+ /**
10226
+ * Returns true if the element has focus.
10227
+ * @returns {boolean} - Returns true if the element has focus.
10228
+ */
10229
+ get componentHasFocus() {
10230
+ return this.matches(':focus');
10231
+ }
10232
+
10217
10233
  resetShapeClasses() {
10218
10234
  const wrapper = this.shadowRoot.querySelector('.wrapper');
10219
10235
 
@@ -15643,7 +15659,7 @@ class AuroBibtemplate extends i$2 {
15643
15659
 
15644
15660
  var bibTemplateVersion = '1.0.0';
15645
15661
 
15646
- var styleCss$4 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-input]{--ds-auro-input-container-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host #inputInBib::part(accent-right){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
15662
+ var styleCss$4 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-input]{--ds-auro-input-background-color: transparent;--ds-auro-input-container-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host #inputInBib::part(accent-right){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
15647
15663
 
15648
15664
  var styleEmphasizedCss = i$5`:host([layout*=emphasized][shape*=pill]) [auro-input]{width:100%}:host([layout*=emphasized][shape*=pill]) [auro-input]::part(inputHelpText){display:none}`;
15649
15665
 
@@ -15683,6 +15699,14 @@ let AuroElement$1 = class AuroElement extends i$2 {
15683
15699
  };
15684
15700
  }
15685
15701
 
15702
+ /**
15703
+ * Returns true if the element has focus.
15704
+ * @returns {boolean} - Returns true if the element has focus.
15705
+ */
15706
+ get componentHasFocus() {
15707
+ return this.matches(':focus');
15708
+ }
15709
+
15686
15710
  resetShapeClasses() {
15687
15711
  const wrapper = this.shadowRoot.querySelector('.wrapper');
15688
15712
 
@@ -16508,7 +16532,7 @@ class AuroCombobox extends AuroElement$1 {
16508
16532
 
16509
16533
  // wait a frame in case the bib gets hide immediately after showing because there is no value
16510
16534
  setTimeout(() => {
16511
- if (document.activeElement === this) {
16535
+ if (this.componentHasFocus) {
16512
16536
  this.setInputFocus();
16513
16537
  }
16514
16538
  }, 0);
@@ -16673,13 +16697,16 @@ class AuroCombobox extends AuroElement$1 {
16673
16697
  * Validate every time we remove focus from the combo box.
16674
16698
  */
16675
16699
  this.addEventListener('focusout', () => {
16676
- if (document.activeElement !== this) {
16700
+ if (!this.componentHasFocus) {
16677
16701
  this.validate();
16678
16702
  }
16679
16703
  });
16680
16704
 
16681
16705
  // Handle validation messages from auroFormElement-validated event
16682
16706
  this.input.addEventListener('auroFormElement-validated', (evt) => {
16707
+ // not to bubble up input's validated event.
16708
+ evt.stopPropagation();
16709
+
16683
16710
  this.errorMessage = evt.detail.message;
16684
16711
  });
16685
16712
  }
@@ -16750,7 +16777,7 @@ class AuroCombobox extends AuroElement$1 {
16750
16777
  this.handleMenuOptions();
16751
16778
 
16752
16779
  // Validate only if the value was set programmatically
16753
- if (document.activeElement !== this) {
16780
+ if (!this.componentHasFocus) {
16754
16781
  this.validate();
16755
16782
  }
16756
16783
 
@@ -16790,7 +16817,7 @@ class AuroCombobox extends AuroElement$1 {
16790
16817
  }
16791
16818
  } else {
16792
16819
  setTimeout(() => {
16793
- if (document.activeElement !== this) {
16820
+ if (!this.componentHasFocus) {
16794
16821
  this.hideBib();
16795
16822
  }
16796
16823
  }, 0);
@@ -16911,7 +16938,7 @@ class AuroCombobox extends AuroElement$1 {
16911
16938
  }
16912
16939
 
16913
16940
  if (changedProperties.has('availableOptions')) {
16914
- if (this.availableOptions && this.availableOptions.length > 0 && document.activeElement === this) {
16941
+ if (this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) {
16915
16942
  this.showBib();
16916
16943
  } else {
16917
16944
  this.hideBib();