@aurodesignsystem-dev/auro-formkit 0.0.0-pr784.0 → 0.0.0-pr785.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 (41) hide show
  1. package/components/checkbox/demo/api.min.js +5 -16
  2. package/components/checkbox/demo/index.min.js +5 -16
  3. package/components/checkbox/dist/index.js +5 -16
  4. package/components/checkbox/dist/registered.js +5 -16
  5. package/components/combobox/demo/api.md +0 -1
  6. package/components/combobox/demo/api.min.js +29 -61
  7. package/components/combobox/demo/index.min.js +29 -61
  8. package/components/combobox/dist/auro-combobox.d.ts +0 -5
  9. package/components/combobox/dist/index.js +29 -61
  10. package/components/combobox/dist/registered.js +29 -61
  11. package/components/counter/demo/api.min.js +19 -24
  12. package/components/counter/demo/index.min.js +19 -24
  13. package/components/counter/dist/index.js +19 -24
  14. package/components/counter/dist/registered.js +19 -24
  15. package/components/datepicker/demo/api.md +1 -2
  16. package/components/datepicker/demo/api.min.js +87 -61
  17. package/components/datepicker/demo/index.min.js +87 -61
  18. package/components/datepicker/dist/auro-datepicker.d.ts +18 -6
  19. package/components/datepicker/dist/index.js +87 -61
  20. package/components/datepicker/dist/registered.js +87 -61
  21. package/components/dropdown/demo/api.md +7 -6
  22. package/components/dropdown/demo/api.min.js +14 -8
  23. package/components/dropdown/demo/index.min.js +14 -8
  24. package/components/dropdown/dist/auro-dropdown.d.ts +1 -0
  25. package/components/dropdown/dist/index.js +14 -8
  26. package/components/dropdown/dist/registered.js +14 -8
  27. package/components/input/demo/api.md +1 -2
  28. package/components/input/demo/api.min.js +7 -25
  29. package/components/input/demo/index.min.js +7 -25
  30. package/components/input/dist/base-input.d.ts +1 -5
  31. package/components/input/dist/index.js +7 -25
  32. package/components/input/dist/registered.js +7 -25
  33. package/components/radio/demo/api.min.js +5 -16
  34. package/components/radio/demo/index.min.js +5 -16
  35. package/components/radio/dist/index.js +5 -16
  36. package/components/radio/dist/registered.js +5 -16
  37. package/components/select/demo/api.min.js +19 -24
  38. package/components/select/demo/index.min.js +19 -24
  39. package/components/select/dist/index.js +19 -24
  40. package/components/select/dist/registered.js +19 -24
  41. package/package.json +2 -2
@@ -4772,24 +4772,13 @@ class AuroFormValidation {
4772
4772
  this.getInputElements(elem);
4773
4773
  this.getAuroInputs(elem);
4774
4774
 
4775
- // Check if validation should run
4775
+ // Validate only if noValidate is not true and the input does not have focus
4776
4776
  let validationShouldRun =
4777
-
4778
- // If the validation was forced
4779
4777
  force ||
4780
-
4781
- // If the validation should run on input
4782
- elem.validateOnInput ||
4783
-
4784
- // State-based checks
4785
- (
4786
- // Element is not currently focused
4787
- !elem.contains(document.activeElement) && // native input is not focused directly
4788
- !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
4789
-
4790
- // And element has been touched or is untouched but has a value
4791
- ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
4792
- );
4778
+ (!elem.contains(document.activeElement) &&
4779
+ (elem.touched ||
4780
+ (!elem.touched && typeof elem.value !== "undefined"))) ||
4781
+ elem.validateOnInput;
4793
4782
 
4794
4783
  if (elem.hasAttribute('error')) {
4795
4784
  elem.validity = 'customError';
@@ -5740,9 +5729,9 @@ class BaseInput extends AuroElement$2 {
5740
5729
  this.inputElement.value = "";
5741
5730
  this.value = "";
5742
5731
  this.labelElement.classList.remove('inputElement-label--sticky');
5743
- this.notifyValueChanged();
5744
5732
  this.focus();
5745
5733
  this.validation.validate(this);
5734
+ this.notifyValueChanged();
5746
5735
  }
5747
5736
 
5748
5737
  /**
@@ -5837,20 +5826,13 @@ class BaseInput extends AuroElement$2 {
5837
5826
  }
5838
5827
 
5839
5828
  /**
5840
- * Resets component to initial state, including resetting the touched state and validity.
5829
+ * Resets component to initial state.
5841
5830
  * @returns {void}
5842
5831
  */
5843
5832
  reset() {
5844
5833
  this.validation.reset(this);
5845
5834
  }
5846
5835
 
5847
- /**
5848
- * Clears the input value
5849
- */
5850
- clear() {
5851
- this.value = undefined;
5852
- }
5853
-
5854
5836
  /**
5855
5837
  * Sets configuration data used elsewhere based on the `type` attribute.
5856
5838
  * @private
@@ -486,14 +486,10 @@ export default class BaseInput extends AuroElement {
486
486
  */
487
487
  validate(force?: boolean): void;
488
488
  /**
489
- * Resets component to initial state, including resetting the touched state and validity.
489
+ * Resets component to initial state.
490
490
  * @returns {void}
491
491
  */
492
492
  reset(): void;
493
- /**
494
- * Clears the input value
495
- */
496
- clear(): void;
497
493
  /**
498
494
  * Sets configuration data used elsewhere based on the `type` attribute.
499
495
  * @private
@@ -4696,24 +4696,13 @@ class AuroFormValidation {
4696
4696
  this.getInputElements(elem);
4697
4697
  this.getAuroInputs(elem);
4698
4698
 
4699
- // Check if validation should run
4699
+ // Validate only if noValidate is not true and the input does not have focus
4700
4700
  let validationShouldRun =
4701
-
4702
- // If the validation was forced
4703
4701
  force ||
4704
-
4705
- // If the validation should run on input
4706
- elem.validateOnInput ||
4707
-
4708
- // State-based checks
4709
- (
4710
- // Element is not currently focused
4711
- !elem.contains(document.activeElement) && // native input is not focused directly
4712
- !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
4713
-
4714
- // And element has been touched or is untouched but has a value
4715
- ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
4716
- );
4702
+ (!elem.contains(document.activeElement) &&
4703
+ (elem.touched ||
4704
+ (!elem.touched && typeof elem.value !== "undefined"))) ||
4705
+ elem.validateOnInput;
4717
4706
 
4718
4707
  if (elem.hasAttribute('error')) {
4719
4708
  elem.validity = 'customError';
@@ -5664,9 +5653,9 @@ class BaseInput extends AuroElement$2 {
5664
5653
  this.inputElement.value = "";
5665
5654
  this.value = "";
5666
5655
  this.labelElement.classList.remove('inputElement-label--sticky');
5667
- this.notifyValueChanged();
5668
5656
  this.focus();
5669
5657
  this.validation.validate(this);
5658
+ this.notifyValueChanged();
5670
5659
  }
5671
5660
 
5672
5661
  /**
@@ -5761,20 +5750,13 @@ class BaseInput extends AuroElement$2 {
5761
5750
  }
5762
5751
 
5763
5752
  /**
5764
- * Resets component to initial state, including resetting the touched state and validity.
5753
+ * Resets component to initial state.
5765
5754
  * @returns {void}
5766
5755
  */
5767
5756
  reset() {
5768
5757
  this.validation.reset(this);
5769
5758
  }
5770
5759
 
5771
- /**
5772
- * Clears the input value
5773
- */
5774
- clear() {
5775
- this.value = undefined;
5776
- }
5777
-
5778
5760
  /**
5779
5761
  * Sets configuration data used elsewhere based on the `type` attribute.
5780
5762
  * @private
@@ -4696,24 +4696,13 @@ class AuroFormValidation {
4696
4696
  this.getInputElements(elem);
4697
4697
  this.getAuroInputs(elem);
4698
4698
 
4699
- // Check if validation should run
4699
+ // Validate only if noValidate is not true and the input does not have focus
4700
4700
  let validationShouldRun =
4701
-
4702
- // If the validation was forced
4703
4701
  force ||
4704
-
4705
- // If the validation should run on input
4706
- elem.validateOnInput ||
4707
-
4708
- // State-based checks
4709
- (
4710
- // Element is not currently focused
4711
- !elem.contains(document.activeElement) && // native input is not focused directly
4712
- !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
4713
-
4714
- // And element has been touched or is untouched but has a value
4715
- ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
4716
- );
4702
+ (!elem.contains(document.activeElement) &&
4703
+ (elem.touched ||
4704
+ (!elem.touched && typeof elem.value !== "undefined"))) ||
4705
+ elem.validateOnInput;
4717
4706
 
4718
4707
  if (elem.hasAttribute('error')) {
4719
4708
  elem.validity = 'customError';
@@ -5664,9 +5653,9 @@ class BaseInput extends AuroElement$2 {
5664
5653
  this.inputElement.value = "";
5665
5654
  this.value = "";
5666
5655
  this.labelElement.classList.remove('inputElement-label--sticky');
5667
- this.notifyValueChanged();
5668
5656
  this.focus();
5669
5657
  this.validation.validate(this);
5658
+ this.notifyValueChanged();
5670
5659
  }
5671
5660
 
5672
5661
  /**
@@ -5761,20 +5750,13 @@ class BaseInput extends AuroElement$2 {
5761
5750
  }
5762
5751
 
5763
5752
  /**
5764
- * Resets component to initial state, including resetting the touched state and validity.
5753
+ * Resets component to initial state.
5765
5754
  * @returns {void}
5766
5755
  */
5767
5756
  reset() {
5768
5757
  this.validation.reset(this);
5769
5758
  }
5770
5759
 
5771
- /**
5772
- * Clears the input value
5773
- */
5774
- clear() {
5775
- this.value = undefined;
5776
- }
5777
-
5778
5760
  /**
5779
5761
  * Sets configuration data used elsewhere based on the `type` attribute.
5780
5762
  * @private
@@ -1082,24 +1082,13 @@ class AuroFormValidation {
1082
1082
  this.getInputElements(elem);
1083
1083
  this.getAuroInputs(elem);
1084
1084
 
1085
- // Check if validation should run
1085
+ // Validate only if noValidate is not true and the input does not have focus
1086
1086
  let validationShouldRun =
1087
-
1088
- // If the validation was forced
1089
1087
  force ||
1090
-
1091
- // If the validation should run on input
1092
- elem.validateOnInput ||
1093
-
1094
- // State-based checks
1095
- (
1096
- // Element is not currently focused
1097
- !elem.contains(document.activeElement) && // native input is not focused directly
1098
- !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
1099
-
1100
- // And element has been touched or is untouched but has a value
1101
- ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
1102
- );
1088
+ (!elem.contains(document.activeElement) &&
1089
+ (elem.touched ||
1090
+ (!elem.touched && typeof elem.value !== "undefined"))) ||
1091
+ elem.validateOnInput;
1103
1092
 
1104
1093
  if (elem.hasAttribute('error')) {
1105
1094
  elem.validity = 'customError';
@@ -1057,24 +1057,13 @@ class AuroFormValidation {
1057
1057
  this.getInputElements(elem);
1058
1058
  this.getAuroInputs(elem);
1059
1059
 
1060
- // Check if validation should run
1060
+ // Validate only if noValidate is not true and the input does not have focus
1061
1061
  let validationShouldRun =
1062
-
1063
- // If the validation was forced
1064
1062
  force ||
1065
-
1066
- // If the validation should run on input
1067
- elem.validateOnInput ||
1068
-
1069
- // State-based checks
1070
- (
1071
- // Element is not currently focused
1072
- !elem.contains(document.activeElement) && // native input is not focused directly
1073
- !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
1074
-
1075
- // And element has been touched or is untouched but has a value
1076
- ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
1077
- );
1063
+ (!elem.contains(document.activeElement) &&
1064
+ (elem.touched ||
1065
+ (!elem.touched && typeof elem.value !== "undefined"))) ||
1066
+ elem.validateOnInput;
1078
1067
 
1079
1068
  if (elem.hasAttribute('error')) {
1080
1069
  elem.validity = 'customError';
@@ -1010,24 +1010,13 @@ class AuroFormValidation {
1010
1010
  this.getInputElements(elem);
1011
1011
  this.getAuroInputs(elem);
1012
1012
 
1013
- // Check if validation should run
1013
+ // Validate only if noValidate is not true and the input does not have focus
1014
1014
  let validationShouldRun =
1015
-
1016
- // If the validation was forced
1017
1015
  force ||
1018
-
1019
- // If the validation should run on input
1020
- elem.validateOnInput ||
1021
-
1022
- // State-based checks
1023
- (
1024
- // Element is not currently focused
1025
- !elem.contains(document.activeElement) && // native input is not focused directly
1026
- !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
1027
-
1028
- // And element has been touched or is untouched but has a value
1029
- ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
1030
- );
1016
+ (!elem.contains(document.activeElement) &&
1017
+ (elem.touched ||
1018
+ (!elem.touched && typeof elem.value !== "undefined"))) ||
1019
+ elem.validateOnInput;
1031
1020
 
1032
1021
  if (elem.hasAttribute('error')) {
1033
1022
  elem.validity = 'customError';
@@ -1010,24 +1010,13 @@ class AuroFormValidation {
1010
1010
  this.getInputElements(elem);
1011
1011
  this.getAuroInputs(elem);
1012
1012
 
1013
- // Check if validation should run
1013
+ // Validate only if noValidate is not true and the input does not have focus
1014
1014
  let validationShouldRun =
1015
-
1016
- // If the validation was forced
1017
1015
  force ||
1018
-
1019
- // If the validation should run on input
1020
- elem.validateOnInput ||
1021
-
1022
- // State-based checks
1023
- (
1024
- // Element is not currently focused
1025
- !elem.contains(document.activeElement) && // native input is not focused directly
1026
- !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
1027
-
1028
- // And element has been touched or is untouched but has a value
1029
- ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
1030
- );
1016
+ (!elem.contains(document.activeElement) &&
1017
+ (elem.touched ||
1018
+ (!elem.touched && typeof elem.value !== "undefined"))) ||
1019
+ elem.validateOnInput;
1031
1020
 
1032
1021
  if (elem.hasAttribute('error')) {
1033
1022
  elem.validity = 'customError';
@@ -940,24 +940,13 @@ class AuroFormValidation {
940
940
  this.getInputElements(elem);
941
941
  this.getAuroInputs(elem);
942
942
 
943
- // Check if validation should run
943
+ // Validate only if noValidate is not true and the input does not have focus
944
944
  let validationShouldRun =
945
-
946
- // If the validation was forced
947
945
  force ||
948
-
949
- // If the validation should run on input
950
- elem.validateOnInput ||
951
-
952
- // State-based checks
953
- (
954
- // Element is not currently focused
955
- !elem.contains(document.activeElement) && // native input is not focused directly
956
- !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
957
-
958
- // And element has been touched or is untouched but has a value
959
- ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
960
- );
946
+ (!elem.contains(document.activeElement) &&
947
+ (elem.touched ||
948
+ (!elem.touched && typeof elem.value !== "undefined"))) ||
949
+ elem.validateOnInput;
961
950
 
962
951
  if (elem.hasAttribute('error')) {
963
952
  elem.validity = 'customError';
@@ -2825,7 +2814,7 @@ class AuroFloatingUI {
2825
2814
  */
2826
2815
  mirrorSize() {
2827
2816
  // mirror the boxsize from bibSizer
2828
- if (this.element.bibSizer) {
2817
+ if (this.element.bibSizer && this.element.matchWidth) {
2829
2818
  const sizerStyle = window.getComputedStyle(this.element.bibSizer);
2830
2819
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
2831
2820
  if (sizerStyle.width !== '0px') {
@@ -3037,7 +3026,7 @@ class AuroFloatingUI {
3037
3026
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
3038
3027
  return;
3039
3028
  }
3040
-
3029
+
3041
3030
  // if fullscreen bib is in fullscreen mode, do not close
3042
3031
  if (this.element.bib.hasAttribute('isfullscreen')) {
3043
3032
  return;
@@ -3225,7 +3214,7 @@ class AuroFloatingUI {
3225
3214
 
3226
3215
  event.preventDefault();
3227
3216
  this.handleClick();
3228
- }
3217
+ }
3229
3218
  break;
3230
3219
  case 'mouseenter':
3231
3220
  if (this.element.hoverToggle) {
@@ -4622,6 +4611,9 @@ class AuroDropdown extends AuroElement$3 {
4622
4611
 
4623
4612
  this.parentBorder = false;
4624
4613
 
4614
+ /** @private */
4615
+ this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
4616
+
4625
4617
  this.privateDefaults();
4626
4618
  }
4627
4619
 
@@ -5055,12 +5047,14 @@ class AuroDropdown extends AuroElement$3 {
5055
5047
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
5056
5048
  this.handleTriggerContentSlotChange();
5057
5049
  }
5050
+ }
5058
5051
 
5059
- if (changedProperties.has('isPopoverVisible')) {
5060
- this.updateFocusTrap();
5061
- if (!this.isPopoverVisible && this.hasFocus) {
5062
- this.trigger.focus();
5063
- }
5052
+ handleDropdownToggle(event) {
5053
+ this.updateFocusTrap();
5054
+ this.isPopoverVisible = event.detail.expanded;
5055
+ const eventType = event.detail.eventType || "unknown";
5056
+ if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
5057
+ this.trigger.focus();
5064
5058
  }
5065
5059
  }
5066
5060
 
@@ -5068,6 +5062,7 @@ class AuroDropdown extends AuroElement$3 {
5068
5062
 
5069
5063
  // Configure the floater to, this will generate the ID for the bib
5070
5064
  this.floater.configure(this, 'auroDropdown');
5065
+ this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
5071
5066
 
5072
5067
  /**
5073
5068
  * @description Let subscribers know that the dropdown ID ha been generated and added.
@@ -848,24 +848,13 @@ class AuroFormValidation {
848
848
  this.getInputElements(elem);
849
849
  this.getAuroInputs(elem);
850
850
 
851
- // Check if validation should run
851
+ // Validate only if noValidate is not true and the input does not have focus
852
852
  let validationShouldRun =
853
-
854
- // If the validation was forced
855
853
  force ||
856
-
857
- // If the validation should run on input
858
- elem.validateOnInput ||
859
-
860
- // State-based checks
861
- (
862
- // Element is not currently focused
863
- !elem.contains(document.activeElement) && // native input is not focused directly
864
- !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
865
-
866
- // And element has been touched or is untouched but has a value
867
- ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
868
- );
854
+ (!elem.contains(document.activeElement) &&
855
+ (elem.touched ||
856
+ (!elem.touched && typeof elem.value !== "undefined"))) ||
857
+ elem.validateOnInput;
869
858
 
870
859
  if (elem.hasAttribute('error')) {
871
860
  elem.validity = 'customError';
@@ -2733,7 +2722,7 @@ class AuroFloatingUI {
2733
2722
  */
2734
2723
  mirrorSize() {
2735
2724
  // mirror the boxsize from bibSizer
2736
- if (this.element.bibSizer) {
2725
+ if (this.element.bibSizer && this.element.matchWidth) {
2737
2726
  const sizerStyle = window.getComputedStyle(this.element.bibSizer);
2738
2727
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
2739
2728
  if (sizerStyle.width !== '0px') {
@@ -2945,7 +2934,7 @@ class AuroFloatingUI {
2945
2934
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
2946
2935
  return;
2947
2936
  }
2948
-
2937
+
2949
2938
  // if fullscreen bib is in fullscreen mode, do not close
2950
2939
  if (this.element.bib.hasAttribute('isfullscreen')) {
2951
2940
  return;
@@ -3133,7 +3122,7 @@ class AuroFloatingUI {
3133
3122
 
3134
3123
  event.preventDefault();
3135
3124
  this.handleClick();
3136
- }
3125
+ }
3137
3126
  break;
3138
3127
  case 'mouseenter':
3139
3128
  if (this.element.hoverToggle) {
@@ -4530,6 +4519,9 @@ class AuroDropdown extends AuroElement$3 {
4530
4519
 
4531
4520
  this.parentBorder = false;
4532
4521
 
4522
+ /** @private */
4523
+ this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
4524
+
4533
4525
  this.privateDefaults();
4534
4526
  }
4535
4527
 
@@ -4963,12 +4955,14 @@ class AuroDropdown extends AuroElement$3 {
4963
4955
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
4964
4956
  this.handleTriggerContentSlotChange();
4965
4957
  }
4958
+ }
4966
4959
 
4967
- if (changedProperties.has('isPopoverVisible')) {
4968
- this.updateFocusTrap();
4969
- if (!this.isPopoverVisible && this.hasFocus) {
4970
- this.trigger.focus();
4971
- }
4960
+ handleDropdownToggle(event) {
4961
+ this.updateFocusTrap();
4962
+ this.isPopoverVisible = event.detail.expanded;
4963
+ const eventType = event.detail.eventType || "unknown";
4964
+ if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
4965
+ this.trigger.focus();
4972
4966
  }
4973
4967
  }
4974
4968
 
@@ -4976,6 +4970,7 @@ class AuroDropdown extends AuroElement$3 {
4976
4970
 
4977
4971
  // Configure the floater to, this will generate the ID for the bib
4978
4972
  this.floater.configure(this, 'auroDropdown');
4973
+ this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
4979
4974
 
4980
4975
  /**
4981
4976
  * @description Let subscribers know that the dropdown ID ha been generated and added.
@@ -808,24 +808,13 @@ class AuroFormValidation {
808
808
  this.getInputElements(elem);
809
809
  this.getAuroInputs(elem);
810
810
 
811
- // Check if validation should run
811
+ // Validate only if noValidate is not true and the input does not have focus
812
812
  let validationShouldRun =
813
-
814
- // If the validation was forced
815
813
  force ||
816
-
817
- // If the validation should run on input
818
- elem.validateOnInput ||
819
-
820
- // State-based checks
821
- (
822
- // Element is not currently focused
823
- !elem.contains(document.activeElement) && // native input is not focused directly
824
- !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
825
-
826
- // And element has been touched or is untouched but has a value
827
- ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
828
- );
814
+ (!elem.contains(document.activeElement) &&
815
+ (elem.touched ||
816
+ (!elem.touched && typeof elem.value !== "undefined"))) ||
817
+ elem.validateOnInput;
829
818
 
830
819
  if (elem.hasAttribute('error')) {
831
820
  elem.validity = 'customError';
@@ -2687,7 +2676,7 @@ class AuroFloatingUI {
2687
2676
  */
2688
2677
  mirrorSize() {
2689
2678
  // mirror the boxsize from bibSizer
2690
- if (this.element.bibSizer) {
2679
+ if (this.element.bibSizer && this.element.matchWidth) {
2691
2680
  const sizerStyle = window.getComputedStyle(this.element.bibSizer);
2692
2681
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
2693
2682
  if (sizerStyle.width !== '0px') {
@@ -2899,7 +2888,7 @@ class AuroFloatingUI {
2899
2888
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
2900
2889
  return;
2901
2890
  }
2902
-
2891
+
2903
2892
  // if fullscreen bib is in fullscreen mode, do not close
2904
2893
  if (this.element.bib.hasAttribute('isfullscreen')) {
2905
2894
  return;
@@ -3087,7 +3076,7 @@ class AuroFloatingUI {
3087
3076
 
3088
3077
  event.preventDefault();
3089
3078
  this.handleClick();
3090
- }
3079
+ }
3091
3080
  break;
3092
3081
  case 'mouseenter':
3093
3082
  if (this.element.hoverToggle) {
@@ -4484,6 +4473,9 @@ class AuroDropdown extends AuroElement$2 {
4484
4473
 
4485
4474
  this.parentBorder = false;
4486
4475
 
4476
+ /** @private */
4477
+ this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
4478
+
4487
4479
  this.privateDefaults();
4488
4480
  }
4489
4481
 
@@ -4917,12 +4909,14 @@ class AuroDropdown extends AuroElement$2 {
4917
4909
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
4918
4910
  this.handleTriggerContentSlotChange();
4919
4911
  }
4912
+ }
4920
4913
 
4921
- if (changedProperties.has('isPopoverVisible')) {
4922
- this.updateFocusTrap();
4923
- if (!this.isPopoverVisible && this.hasFocus) {
4924
- this.trigger.focus();
4925
- }
4914
+ handleDropdownToggle(event) {
4915
+ this.updateFocusTrap();
4916
+ this.isPopoverVisible = event.detail.expanded;
4917
+ const eventType = event.detail.eventType || "unknown";
4918
+ if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
4919
+ this.trigger.focus();
4926
4920
  }
4927
4921
  }
4928
4922
 
@@ -4930,6 +4924,7 @@ class AuroDropdown extends AuroElement$2 {
4930
4924
 
4931
4925
  // Configure the floater to, this will generate the ID for the bib
4932
4926
  this.floater.configure(this, 'auroDropdown');
4927
+ this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
4933
4928
 
4934
4929
  /**
4935
4930
  * @description Let subscribers know that the dropdown ID ha been generated and added.