@aurodesignsystem-dev/auro-formkit 0.0.0-pr783.1 → 0.0.0-pr784.0

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 (40) hide show
  1. package/components/checkbox/demo/api.min.js +16 -5
  2. package/components/checkbox/demo/index.min.js +16 -5
  3. package/components/checkbox/dist/index.js +16 -5
  4. package/components/checkbox/dist/registered.js +16 -5
  5. package/components/combobox/demo/api.md +1 -0
  6. package/components/combobox/demo/api.min.js +69 -48
  7. package/components/combobox/demo/index.min.js +69 -48
  8. package/components/combobox/dist/auro-combobox.d.ts +5 -0
  9. package/components/combobox/dist/index.js +69 -48
  10. package/components/combobox/dist/registered.js +69 -48
  11. package/components/counter/demo/api.min.js +32 -39
  12. package/components/counter/demo/index.min.js +32 -39
  13. package/components/counter/dist/index.js +32 -39
  14. package/components/counter/dist/registered.js +32 -39
  15. package/components/datepicker/demo/api.md +2 -0
  16. package/components/datepicker/demo/api.min.js +69 -107
  17. package/components/datepicker/demo/index.min.js +69 -107
  18. package/components/datepicker/dist/auro-datepicker.d.ts +6 -19
  19. package/components/datepicker/dist/index.js +69 -107
  20. package/components/datepicker/dist/registered.js +69 -107
  21. package/components/dropdown/demo/api.min.js +16 -33
  22. package/components/dropdown/demo/index.min.js +16 -33
  23. package/components/dropdown/dist/auro-dropdown.d.ts +0 -6
  24. package/components/dropdown/dist/index.js +16 -33
  25. package/components/dropdown/dist/registered.js +16 -33
  26. package/components/input/demo/api.md +2 -1
  27. package/components/input/demo/api.min.js +25 -7
  28. package/components/input/demo/index.min.js +25 -7
  29. package/components/input/dist/base-input.d.ts +5 -1
  30. package/components/input/dist/index.js +25 -7
  31. package/components/input/dist/registered.js +25 -7
  32. package/components/radio/demo/api.min.js +16 -5
  33. package/components/radio/demo/index.min.js +16 -5
  34. package/components/radio/dist/index.js +16 -5
  35. package/components/radio/dist/registered.js +16 -5
  36. package/components/select/demo/api.min.js +32 -38
  37. package/components/select/demo/index.min.js +32 -38
  38. package/components/select/dist/index.js +32 -38
  39. package/components/select/dist/registered.js +32 -38
  40. package/package.json +2 -2
@@ -749,13 +749,24 @@ let AuroFormValidation$1 = class AuroFormValidation {
749
749
  this.getInputElements(elem);
750
750
  this.getAuroInputs(elem);
751
751
 
752
- // Validate only if noValidate is not true and the input does not have focus
752
+ // Check if validation should run
753
753
  let validationShouldRun =
754
+
755
+ // If the validation was forced
754
756
  force ||
755
- (!elem.contains(document.activeElement) &&
756
- (elem.touched ||
757
- (!elem.touched && typeof elem.value !== "undefined"))) ||
758
- elem.validateOnInput;
757
+
758
+ // If the validation should run on input
759
+ elem.validateOnInput ||
760
+
761
+ // State-based checks
762
+ (
763
+ // Element is not currently focused
764
+ !elem.contains(document.activeElement) && // native input is not focused directly
765
+ !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
766
+
767
+ // And element has been touched or is untouched but has a value
768
+ ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
769
+ );
759
770
 
760
771
  if (elem.hasAttribute('error')) {
761
772
  elem.validity = 'customError';
@@ -2577,7 +2588,7 @@ class AuroFloatingUI {
2577
2588
  */
2578
2589
  mirrorSize() {
2579
2590
  // mirror the boxsize from bibSizer
2580
- if (this.element.bibSizer && this.element.matchWidth) {
2591
+ if (this.element.bibSizer) {
2581
2592
  const sizerStyle = window.getComputedStyle(this.element.bibSizer);
2582
2593
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
2583
2594
  if (sizerStyle.width !== '0px') {
@@ -2789,13 +2800,13 @@ class AuroFloatingUI {
2789
2800
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
2790
2801
  return;
2791
2802
  }
2792
-
2803
+
2793
2804
  // if fullscreen bib is in fullscreen mode, do not close
2794
2805
  if (this.element.bib.hasAttribute('isfullscreen')) {
2795
2806
  return;
2796
2807
  }
2797
2808
 
2798
- this.hideBib("keydown");
2809
+ this.hideBib();
2799
2810
  }
2800
2811
 
2801
2812
  setupHideHandlers() {
@@ -2820,7 +2831,7 @@ class AuroFloatingUI {
2820
2831
  document.expandedAuroFormkitDropdown = null;
2821
2832
  document.expandedAuroFloater = this;
2822
2833
  } else {
2823
- this.hideBib("click");
2834
+ this.hideBib();
2824
2835
  }
2825
2836
  }
2826
2837
  };
@@ -2833,7 +2844,7 @@ class AuroFloatingUI {
2833
2844
  // if something else is open, let it handle itself
2834
2845
  return;
2835
2846
  }
2836
- this.hideBib("keydown");
2847
+ this.hideBib();
2837
2848
  }
2838
2849
  };
2839
2850
 
@@ -2916,11 +2927,7 @@ class AuroFloatingUI {
2916
2927
  }
2917
2928
  }
2918
2929
 
2919
- /**
2920
- * Hides the floating UI element.
2921
- * @param {String} eventType - The event type that triggered the hiding action.
2922
- */
2923
- hideBib(eventType = "unknown") {
2930
+ hideBib() {
2924
2931
  if (!this.element.disabled && !this.element.noToggle) {
2925
2932
  this.lockScroll(false);
2926
2933
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -2931,7 +2938,7 @@ class AuroFloatingUI {
2931
2938
  if (this.showing) {
2932
2939
  this.cleanupHideHandlers();
2933
2940
  this.showing = false;
2934
- this.dispatchEventDropdownToggle(eventType);
2941
+ this.dispatchEventDropdownToggle();
2935
2942
  }
2936
2943
  }
2937
2944
  document.expandedAuroFloater = null;
@@ -2940,13 +2947,11 @@ class AuroFloatingUI {
2940
2947
  /**
2941
2948
  * @private
2942
2949
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
2943
- * @param {String} eventType - The event type that triggered the toggle action.
2944
2950
  */
2945
- dispatchEventDropdownToggle(eventType) {
2951
+ dispatchEventDropdownToggle() {
2946
2952
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
2947
2953
  detail: {
2948
2954
  expanded: this.showing,
2949
- eventType: eventType || "unknown",
2950
2955
  },
2951
2956
  composed: true
2952
2957
  });
@@ -2956,7 +2961,7 @@ class AuroFloatingUI {
2956
2961
 
2957
2962
  handleClick() {
2958
2963
  if (this.element.isPopoverVisible) {
2959
- this.hideBib("click");
2964
+ this.hideBib();
2960
2965
  } else {
2961
2966
  this.showBib();
2962
2967
  }
@@ -2983,7 +2988,7 @@ class AuroFloatingUI {
2983
2988
 
2984
2989
  event.preventDefault();
2985
2990
  this.handleClick();
2986
- }
2991
+ }
2987
2992
  break;
2988
2993
  case 'mouseenter':
2989
2994
  if (this.element.hoverToggle) {
@@ -2992,7 +2997,7 @@ class AuroFloatingUI {
2992
2997
  break;
2993
2998
  case 'mouseleave':
2994
2999
  if (this.element.hoverToggle) {
2995
- this.hideBib("mouseleave");
3000
+ this.hideBib();
2996
3001
  }
2997
3002
  break;
2998
3003
  case 'focus':
@@ -4380,9 +4385,6 @@ class AuroDropdown extends AuroElement$4 {
4380
4385
 
4381
4386
  this.parentBorder = false;
4382
4387
 
4383
- /** @private */
4384
- this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
4385
-
4386
4388
  this.privateDefaults();
4387
4389
  }
4388
4390
 
@@ -4816,19 +4818,12 @@ class AuroDropdown extends AuroElement$4 {
4816
4818
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
4817
4819
  this.handleTriggerContentSlotChange();
4818
4820
  }
4819
- }
4820
4821
 
4821
- /**
4822
- * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
4823
- * @private
4824
- * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
4825
- */
4826
- handleDropdownToggle(event) {
4827
- this.updateFocusTrap();
4828
- this.isPopoverVisible = event.detail.expanded;
4829
- const eventType = event.detail.eventType || "unknown";
4830
- if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
4831
- this.trigger.focus();
4822
+ if (changedProperties.has('isPopoverVisible')) {
4823
+ this.updateFocusTrap();
4824
+ if (!this.isPopoverVisible && this.hasFocus) {
4825
+ this.trigger.focus();
4826
+ }
4832
4827
  }
4833
4828
  }
4834
4829
 
@@ -4836,7 +4831,6 @@ class AuroDropdown extends AuroElement$4 {
4836
4831
 
4837
4832
  // Configure the floater to, this will generate the ID for the bib
4838
4833
  this.floater.configure(this, 'auroDropdown');
4839
- this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
4840
4834
 
4841
4835
  /**
4842
4836
  * @description Let subscribers know that the dropdown ID ha been generated and added.
@@ -9983,13 +9977,24 @@ class AuroFormValidation {
9983
9977
  this.getInputElements(elem);
9984
9978
  this.getAuroInputs(elem);
9985
9979
 
9986
- // Validate only if noValidate is not true and the input does not have focus
9980
+ // Check if validation should run
9987
9981
  let validationShouldRun =
9982
+
9983
+ // If the validation was forced
9988
9984
  force ||
9989
- (!elem.contains(document.activeElement) &&
9990
- (elem.touched ||
9991
- (!elem.touched && typeof elem.value !== "undefined"))) ||
9992
- elem.validateOnInput;
9985
+
9986
+ // If the validation should run on input
9987
+ elem.validateOnInput ||
9988
+
9989
+ // State-based checks
9990
+ (
9991
+ // Element is not currently focused
9992
+ !elem.contains(document.activeElement) && // native input is not focused directly
9993
+ !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
9994
+
9995
+ // And element has been touched or is untouched but has a value
9996
+ ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
9997
+ );
9993
9998
 
9994
9999
  if (elem.hasAttribute('error')) {
9995
10000
  elem.validity = 'customError';
@@ -10940,9 +10945,9 @@ class BaseInput extends AuroElement$2$1 {
10940
10945
  this.inputElement.value = "";
10941
10946
  this.value = "";
10942
10947
  this.labelElement.classList.remove('inputElement-label--sticky');
10948
+ this.notifyValueChanged();
10943
10949
  this.focus();
10944
10950
  this.validation.validate(this);
10945
- this.notifyValueChanged();
10946
10951
  }
10947
10952
 
10948
10953
  /**
@@ -11037,13 +11042,20 @@ class BaseInput extends AuroElement$2$1 {
11037
11042
  }
11038
11043
 
11039
11044
  /**
11040
- * Resets component to initial state.
11045
+ * Resets component to initial state, including resetting the touched state and validity.
11041
11046
  * @returns {void}
11042
11047
  */
11043
11048
  reset() {
11044
11049
  this.validation.reset(this);
11045
11050
  }
11046
11051
 
11052
+ /**
11053
+ * Clears the input value
11054
+ */
11055
+ clear() {
11056
+ this.value = undefined;
11057
+ }
11058
+
11047
11059
  /**
11048
11060
  * Sets configuration data used elsewhere based on the `type` attribute.
11049
11061
  * @private
@@ -16387,7 +16399,7 @@ class AuroCombobox extends AuroElement {
16387
16399
  });
16388
16400
 
16389
16401
  this.menu.addEventListener('auroMenu-selectValueReset', () => {
16390
- this.reset();
16402
+ this.clear();
16391
16403
  });
16392
16404
  }
16393
16405
 
@@ -16407,7 +16419,7 @@ class AuroCombobox extends AuroElement {
16407
16419
  });
16408
16420
 
16409
16421
  /**
16410
- * Validate every time we remove focus from the datepicker.
16422
+ * Validate every time we remove focus from the combo box.
16411
16423
  */
16412
16424
  this.addEventListener('focusout', () => {
16413
16425
  if (document.activeElement !== this) {
@@ -16612,7 +16624,16 @@ class AuroCombobox extends AuroElement {
16612
16624
  */
16613
16625
  reset() {
16614
16626
  this.input.reset();
16627
+ this.menu.value = undefined;
16615
16628
  this.validation.reset(this);
16629
+ }
16630
+
16631
+ /**
16632
+ * Clears the current value of the combobox.
16633
+ * @returns {void}
16634
+ */
16635
+ clear() {
16636
+ this.input.clear();
16616
16637
  this.menu.value = undefined;
16617
16638
  }
16618
16639
 
@@ -16638,7 +16659,7 @@ class AuroCombobox extends AuroElement {
16638
16659
  this.hideBib();
16639
16660
  }
16640
16661
  } else {
16641
- this.reset();
16662
+ this.clear();
16642
16663
  }
16643
16664
  }
16644
16665
 
@@ -2281,13 +2281,24 @@ class AuroFormValidation {
2281
2281
  this.getInputElements(elem);
2282
2282
  this.getAuroInputs(elem);
2283
2283
 
2284
- // Validate only if noValidate is not true and the input does not have focus
2284
+ // Check if validation should run
2285
2285
  let validationShouldRun =
2286
+
2287
+ // If the validation was forced
2286
2288
  force ||
2287
- (!elem.contains(document.activeElement) &&
2288
- (elem.touched ||
2289
- (!elem.touched && typeof elem.value !== "undefined"))) ||
2290
- elem.validateOnInput;
2289
+
2290
+ // If the validation should run on input
2291
+ elem.validateOnInput ||
2292
+
2293
+ // State-based checks
2294
+ (
2295
+ // Element is not currently focused
2296
+ !elem.contains(document.activeElement) && // native input is not focused directly
2297
+ !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
2298
+
2299
+ // And element has been touched or is untouched but has a value
2300
+ ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
2301
+ );
2291
2302
 
2292
2303
  if (elem.hasAttribute('error')) {
2293
2304
  elem.validity = 'customError';
@@ -3020,7 +3031,6 @@ class AuroCounter extends i$2 {
3020
3031
  aria-describedby="counter-description"
3021
3032
  tabindex="${this.disabled ? '-1' : '0'}"
3022
3033
  role="spinbutton"
3023
- aria-disabled="${this.disabled ? 'true' : 'false'}"
3024
3034
  aria-valuemin="${this.min}"
3025
3035
  aria-valuemax="${this.max}"
3026
3036
  aria-valuenow="${this.value}"
@@ -4749,7 +4759,7 @@ class AuroFloatingUI {
4749
4759
  */
4750
4760
  mirrorSize() {
4751
4761
  // mirror the boxsize from bibSizer
4752
- if (this.element.bibSizer && this.element.matchWidth) {
4762
+ if (this.element.bibSizer) {
4753
4763
  const sizerStyle = window.getComputedStyle(this.element.bibSizer);
4754
4764
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
4755
4765
  if (sizerStyle.width !== '0px') {
@@ -4961,13 +4971,13 @@ class AuroFloatingUI {
4961
4971
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
4962
4972
  return;
4963
4973
  }
4964
-
4974
+
4965
4975
  // if fullscreen bib is in fullscreen mode, do not close
4966
4976
  if (this.element.bib.hasAttribute('isfullscreen')) {
4967
4977
  return;
4968
4978
  }
4969
4979
 
4970
- this.hideBib("keydown");
4980
+ this.hideBib();
4971
4981
  }
4972
4982
 
4973
4983
  setupHideHandlers() {
@@ -4992,7 +5002,7 @@ class AuroFloatingUI {
4992
5002
  document.expandedAuroFormkitDropdown = null;
4993
5003
  document.expandedAuroFloater = this;
4994
5004
  } else {
4995
- this.hideBib("click");
5005
+ this.hideBib();
4996
5006
  }
4997
5007
  }
4998
5008
  };
@@ -5005,7 +5015,7 @@ class AuroFloatingUI {
5005
5015
  // if something else is open, let it handle itself
5006
5016
  return;
5007
5017
  }
5008
- this.hideBib("keydown");
5018
+ this.hideBib();
5009
5019
  }
5010
5020
  };
5011
5021
 
@@ -5088,11 +5098,7 @@ class AuroFloatingUI {
5088
5098
  }
5089
5099
  }
5090
5100
 
5091
- /**
5092
- * Hides the floating UI element.
5093
- * @param {String} eventType - The event type that triggered the hiding action.
5094
- */
5095
- hideBib(eventType = "unknown") {
5101
+ hideBib() {
5096
5102
  if (!this.element.disabled && !this.element.noToggle) {
5097
5103
  this.lockScroll(false);
5098
5104
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -5103,7 +5109,7 @@ class AuroFloatingUI {
5103
5109
  if (this.showing) {
5104
5110
  this.cleanupHideHandlers();
5105
5111
  this.showing = false;
5106
- this.dispatchEventDropdownToggle(eventType);
5112
+ this.dispatchEventDropdownToggle();
5107
5113
  }
5108
5114
  }
5109
5115
  document.expandedAuroFloater = null;
@@ -5112,13 +5118,11 @@ class AuroFloatingUI {
5112
5118
  /**
5113
5119
  * @private
5114
5120
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
5115
- * @param {String} eventType - The event type that triggered the toggle action.
5116
5121
  */
5117
- dispatchEventDropdownToggle(eventType) {
5122
+ dispatchEventDropdownToggle() {
5118
5123
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
5119
5124
  detail: {
5120
5125
  expanded: this.showing,
5121
- eventType: eventType || "unknown",
5122
5126
  },
5123
5127
  composed: true
5124
5128
  });
@@ -5128,7 +5132,7 @@ class AuroFloatingUI {
5128
5132
 
5129
5133
  handleClick() {
5130
5134
  if (this.element.isPopoverVisible) {
5131
- this.hideBib("click");
5135
+ this.hideBib();
5132
5136
  } else {
5133
5137
  this.showBib();
5134
5138
  }
@@ -5155,7 +5159,7 @@ class AuroFloatingUI {
5155
5159
 
5156
5160
  event.preventDefault();
5157
5161
  this.handleClick();
5158
- }
5162
+ }
5159
5163
  break;
5160
5164
  case 'mouseenter':
5161
5165
  if (this.element.hoverToggle) {
@@ -5164,7 +5168,7 @@ class AuroFloatingUI {
5164
5168
  break;
5165
5169
  case 'mouseleave':
5166
5170
  if (this.element.hoverToggle) {
5167
- this.hideBib("mouseleave");
5171
+ this.hideBib();
5168
5172
  }
5169
5173
  break;
5170
5174
  case 'focus':
@@ -6552,9 +6556,6 @@ class AuroDropdown extends AuroElement$3 {
6552
6556
 
6553
6557
  this.parentBorder = false;
6554
6558
 
6555
- /** @private */
6556
- this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
6557
-
6558
6559
  this.privateDefaults();
6559
6560
  }
6560
6561
 
@@ -6988,19 +6989,12 @@ class AuroDropdown extends AuroElement$3 {
6988
6989
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
6989
6990
  this.handleTriggerContentSlotChange();
6990
6991
  }
6991
- }
6992
6992
 
6993
- /**
6994
- * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
6995
- * @private
6996
- * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
6997
- */
6998
- handleDropdownToggle(event) {
6999
- this.updateFocusTrap();
7000
- this.isPopoverVisible = event.detail.expanded;
7001
- const eventType = event.detail.eventType || "unknown";
7002
- if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
7003
- this.trigger.focus();
6993
+ if (changedProperties.has('isPopoverVisible')) {
6994
+ this.updateFocusTrap();
6995
+ if (!this.isPopoverVisible && this.hasFocus) {
6996
+ this.trigger.focus();
6997
+ }
7004
6998
  }
7005
6999
  }
7006
7000
 
@@ -7008,7 +7002,6 @@ class AuroDropdown extends AuroElement$3 {
7008
7002
 
7009
7003
  // Configure the floater to, this will generate the ID for the bib
7010
7004
  this.floater.configure(this, 'auroDropdown');
7011
- this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
7012
7005
 
7013
7006
  /**
7014
7007
  * @description Let subscribers know that the dropdown ID ha been generated and added.
@@ -2281,13 +2281,24 @@ class AuroFormValidation {
2281
2281
  this.getInputElements(elem);
2282
2282
  this.getAuroInputs(elem);
2283
2283
 
2284
- // Validate only if noValidate is not true and the input does not have focus
2284
+ // Check if validation should run
2285
2285
  let validationShouldRun =
2286
+
2287
+ // If the validation was forced
2286
2288
  force ||
2287
- (!elem.contains(document.activeElement) &&
2288
- (elem.touched ||
2289
- (!elem.touched && typeof elem.value !== "undefined"))) ||
2290
- elem.validateOnInput;
2289
+
2290
+ // If the validation should run on input
2291
+ elem.validateOnInput ||
2292
+
2293
+ // State-based checks
2294
+ (
2295
+ // Element is not currently focused
2296
+ !elem.contains(document.activeElement) && // native input is not focused directly
2297
+ !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
2298
+
2299
+ // And element has been touched or is untouched but has a value
2300
+ ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
2301
+ );
2291
2302
 
2292
2303
  if (elem.hasAttribute('error')) {
2293
2304
  elem.validity = 'customError';
@@ -3020,7 +3031,6 @@ class AuroCounter extends i$2 {
3020
3031
  aria-describedby="counter-description"
3021
3032
  tabindex="${this.disabled ? '-1' : '0'}"
3022
3033
  role="spinbutton"
3023
- aria-disabled="${this.disabled ? 'true' : 'false'}"
3024
3034
  aria-valuemin="${this.min}"
3025
3035
  aria-valuemax="${this.max}"
3026
3036
  aria-valuenow="${this.value}"
@@ -4749,7 +4759,7 @@ class AuroFloatingUI {
4749
4759
  */
4750
4760
  mirrorSize() {
4751
4761
  // mirror the boxsize from bibSizer
4752
- if (this.element.bibSizer && this.element.matchWidth) {
4762
+ if (this.element.bibSizer) {
4753
4763
  const sizerStyle = window.getComputedStyle(this.element.bibSizer);
4754
4764
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
4755
4765
  if (sizerStyle.width !== '0px') {
@@ -4961,13 +4971,13 @@ class AuroFloatingUI {
4961
4971
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
4962
4972
  return;
4963
4973
  }
4964
-
4974
+
4965
4975
  // if fullscreen bib is in fullscreen mode, do not close
4966
4976
  if (this.element.bib.hasAttribute('isfullscreen')) {
4967
4977
  return;
4968
4978
  }
4969
4979
 
4970
- this.hideBib("keydown");
4980
+ this.hideBib();
4971
4981
  }
4972
4982
 
4973
4983
  setupHideHandlers() {
@@ -4992,7 +5002,7 @@ class AuroFloatingUI {
4992
5002
  document.expandedAuroFormkitDropdown = null;
4993
5003
  document.expandedAuroFloater = this;
4994
5004
  } else {
4995
- this.hideBib("click");
5005
+ this.hideBib();
4996
5006
  }
4997
5007
  }
4998
5008
  };
@@ -5005,7 +5015,7 @@ class AuroFloatingUI {
5005
5015
  // if something else is open, let it handle itself
5006
5016
  return;
5007
5017
  }
5008
- this.hideBib("keydown");
5018
+ this.hideBib();
5009
5019
  }
5010
5020
  };
5011
5021
 
@@ -5088,11 +5098,7 @@ class AuroFloatingUI {
5088
5098
  }
5089
5099
  }
5090
5100
 
5091
- /**
5092
- * Hides the floating UI element.
5093
- * @param {String} eventType - The event type that triggered the hiding action.
5094
- */
5095
- hideBib(eventType = "unknown") {
5101
+ hideBib() {
5096
5102
  if (!this.element.disabled && !this.element.noToggle) {
5097
5103
  this.lockScroll(false);
5098
5104
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -5103,7 +5109,7 @@ class AuroFloatingUI {
5103
5109
  if (this.showing) {
5104
5110
  this.cleanupHideHandlers();
5105
5111
  this.showing = false;
5106
- this.dispatchEventDropdownToggle(eventType);
5112
+ this.dispatchEventDropdownToggle();
5107
5113
  }
5108
5114
  }
5109
5115
  document.expandedAuroFloater = null;
@@ -5112,13 +5118,11 @@ class AuroFloatingUI {
5112
5118
  /**
5113
5119
  * @private
5114
5120
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
5115
- * @param {String} eventType - The event type that triggered the toggle action.
5116
5121
  */
5117
- dispatchEventDropdownToggle(eventType) {
5122
+ dispatchEventDropdownToggle() {
5118
5123
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
5119
5124
  detail: {
5120
5125
  expanded: this.showing,
5121
- eventType: eventType || "unknown",
5122
5126
  },
5123
5127
  composed: true
5124
5128
  });
@@ -5128,7 +5132,7 @@ class AuroFloatingUI {
5128
5132
 
5129
5133
  handleClick() {
5130
5134
  if (this.element.isPopoverVisible) {
5131
- this.hideBib("click");
5135
+ this.hideBib();
5132
5136
  } else {
5133
5137
  this.showBib();
5134
5138
  }
@@ -5155,7 +5159,7 @@ class AuroFloatingUI {
5155
5159
 
5156
5160
  event.preventDefault();
5157
5161
  this.handleClick();
5158
- }
5162
+ }
5159
5163
  break;
5160
5164
  case 'mouseenter':
5161
5165
  if (this.element.hoverToggle) {
@@ -5164,7 +5168,7 @@ class AuroFloatingUI {
5164
5168
  break;
5165
5169
  case 'mouseleave':
5166
5170
  if (this.element.hoverToggle) {
5167
- this.hideBib("mouseleave");
5171
+ this.hideBib();
5168
5172
  }
5169
5173
  break;
5170
5174
  case 'focus':
@@ -6552,9 +6556,6 @@ class AuroDropdown extends AuroElement$3 {
6552
6556
 
6553
6557
  this.parentBorder = false;
6554
6558
 
6555
- /** @private */
6556
- this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
6557
-
6558
6559
  this.privateDefaults();
6559
6560
  }
6560
6561
 
@@ -6988,19 +6989,12 @@ class AuroDropdown extends AuroElement$3 {
6988
6989
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
6989
6990
  this.handleTriggerContentSlotChange();
6990
6991
  }
6991
- }
6992
6992
 
6993
- /**
6994
- * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
6995
- * @private
6996
- * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
6997
- */
6998
- handleDropdownToggle(event) {
6999
- this.updateFocusTrap();
7000
- this.isPopoverVisible = event.detail.expanded;
7001
- const eventType = event.detail.eventType || "unknown";
7002
- if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
7003
- this.trigger.focus();
6993
+ if (changedProperties.has('isPopoverVisible')) {
6994
+ this.updateFocusTrap();
6995
+ if (!this.isPopoverVisible && this.hasFocus) {
6996
+ this.trigger.focus();
6997
+ }
7004
6998
  }
7005
6999
  }
7006
7000
 
@@ -7008,7 +7002,6 @@ class AuroDropdown extends AuroElement$3 {
7008
7002
 
7009
7003
  // Configure the floater to, this will generate the ID for the bib
7010
7004
  this.floater.configure(this, 'auroDropdown');
7011
- this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
7012
7005
 
7013
7006
  /**
7014
7007
  * @description Let subscribers know that the dropdown ID ha been generated and added.