@aurodesignsystem-dev/auro-formkit 0.0.0-pr785.1 → 0.0.0-pr785.3

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.
@@ -1948,7 +1948,7 @@ class AuroFloatingUI {
1948
1948
  return;
1949
1949
  }
1950
1950
 
1951
- this.hideBib();
1951
+ this.hideBib("keydown");
1952
1952
  }
1953
1953
 
1954
1954
  setupHideHandlers() {
@@ -1973,7 +1973,7 @@ class AuroFloatingUI {
1973
1973
  document.expandedAuroFormkitDropdown = null;
1974
1974
  document.expandedAuroFloater = this;
1975
1975
  } else {
1976
- this.hideBib();
1976
+ this.hideBib("click");
1977
1977
  }
1978
1978
  }
1979
1979
  };
@@ -1986,7 +1986,7 @@ class AuroFloatingUI {
1986
1986
  // if something else is open, let it handle itself
1987
1987
  return;
1988
1988
  }
1989
- this.hideBib();
1989
+ this.hideBib("keydown");
1990
1990
  }
1991
1991
  };
1992
1992
 
@@ -2069,7 +2069,11 @@ class AuroFloatingUI {
2069
2069
  }
2070
2070
  }
2071
2071
 
2072
- hideBib() {
2072
+ /**
2073
+ * Hides the floating UI element.
2074
+ * @param {String} eventType - The event type that triggered the hiding action.
2075
+ */
2076
+ hideBib(eventType = "unknown") {
2073
2077
  if (!this.element.disabled && !this.element.noToggle) {
2074
2078
  this.lockScroll(false);
2075
2079
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -2080,7 +2084,7 @@ class AuroFloatingUI {
2080
2084
  if (this.showing) {
2081
2085
  this.cleanupHideHandlers();
2082
2086
  this.showing = false;
2083
- this.dispatchEventDropdownToggle();
2087
+ this.dispatchEventDropdownToggle(eventType);
2084
2088
  }
2085
2089
  }
2086
2090
  document.expandedAuroFloater = null;
@@ -2089,11 +2093,13 @@ class AuroFloatingUI {
2089
2093
  /**
2090
2094
  * @private
2091
2095
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
2096
+ * @param {String} eventType - The event type that triggered the toggle action.
2092
2097
  */
2093
- dispatchEventDropdownToggle() {
2098
+ dispatchEventDropdownToggle(eventType) {
2094
2099
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
2095
2100
  detail: {
2096
2101
  expanded: this.showing,
2102
+ eventType: eventType || "unknown",
2097
2103
  },
2098
2104
  composed: true
2099
2105
  });
@@ -2103,7 +2109,7 @@ class AuroFloatingUI {
2103
2109
 
2104
2110
  handleClick() {
2105
2111
  if (this.element.isPopoverVisible) {
2106
- this.hideBib();
2112
+ this.hideBib("click");
2107
2113
  } else {
2108
2114
  this.showBib();
2109
2115
  }
@@ -2139,7 +2145,7 @@ class AuroFloatingUI {
2139
2145
  break;
2140
2146
  case 'mouseleave':
2141
2147
  if (this.element.hoverToggle) {
2142
- this.hideBib();
2148
+ this.hideBib("mouseleave");
2143
2149
  }
2144
2150
  break;
2145
2151
  case 'focus':
@@ -3971,6 +3977,11 @@ class AuroDropdown extends AuroElement {
3971
3977
  }
3972
3978
  }
3973
3979
 
3980
+ /**
3981
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
3982
+ * @private
3983
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
3984
+ */
3974
3985
  handleDropdownToggle(event) {
3975
3986
  this.updateFocusTrap();
3976
3987
  this.isPopoverVisible = event.detail.expanded;
@@ -220,7 +220,12 @@ export class AuroDropdown extends AuroElement {
220
220
  shape: any;
221
221
  size: any;
222
222
  parentBorder: boolean;
223
- handleDropdownToggle(event: any): void;
223
+ /**
224
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
225
+ * @private
226
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
227
+ */
228
+ private handleDropdownToggle;
224
229
  /**
225
230
  * @private
226
231
  * @returns {object} Class definition for the wrapper element.
@@ -1907,7 +1907,7 @@ class AuroFloatingUI {
1907
1907
  return;
1908
1908
  }
1909
1909
 
1910
- this.hideBib();
1910
+ this.hideBib("keydown");
1911
1911
  }
1912
1912
 
1913
1913
  setupHideHandlers() {
@@ -1932,7 +1932,7 @@ class AuroFloatingUI {
1932
1932
  document.expandedAuroFormkitDropdown = null;
1933
1933
  document.expandedAuroFloater = this;
1934
1934
  } else {
1935
- this.hideBib();
1935
+ this.hideBib("click");
1936
1936
  }
1937
1937
  }
1938
1938
  };
@@ -1945,7 +1945,7 @@ class AuroFloatingUI {
1945
1945
  // if something else is open, let it handle itself
1946
1946
  return;
1947
1947
  }
1948
- this.hideBib();
1948
+ this.hideBib("keydown");
1949
1949
  }
1950
1950
  };
1951
1951
 
@@ -2028,7 +2028,11 @@ class AuroFloatingUI {
2028
2028
  }
2029
2029
  }
2030
2030
 
2031
- hideBib() {
2031
+ /**
2032
+ * Hides the floating UI element.
2033
+ * @param {String} eventType - The event type that triggered the hiding action.
2034
+ */
2035
+ hideBib(eventType = "unknown") {
2032
2036
  if (!this.element.disabled && !this.element.noToggle) {
2033
2037
  this.lockScroll(false);
2034
2038
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -2039,7 +2043,7 @@ class AuroFloatingUI {
2039
2043
  if (this.showing) {
2040
2044
  this.cleanupHideHandlers();
2041
2045
  this.showing = false;
2042
- this.dispatchEventDropdownToggle();
2046
+ this.dispatchEventDropdownToggle(eventType);
2043
2047
  }
2044
2048
  }
2045
2049
  document.expandedAuroFloater = null;
@@ -2048,11 +2052,13 @@ class AuroFloatingUI {
2048
2052
  /**
2049
2053
  * @private
2050
2054
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
2055
+ * @param {String} eventType - The event type that triggered the toggle action.
2051
2056
  */
2052
- dispatchEventDropdownToggle() {
2057
+ dispatchEventDropdownToggle(eventType) {
2053
2058
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
2054
2059
  detail: {
2055
2060
  expanded: this.showing,
2061
+ eventType: eventType || "unknown",
2056
2062
  },
2057
2063
  composed: true
2058
2064
  });
@@ -2062,7 +2068,7 @@ class AuroFloatingUI {
2062
2068
 
2063
2069
  handleClick() {
2064
2070
  if (this.element.isPopoverVisible) {
2065
- this.hideBib();
2071
+ this.hideBib("click");
2066
2072
  } else {
2067
2073
  this.showBib();
2068
2074
  }
@@ -2098,7 +2104,7 @@ class AuroFloatingUI {
2098
2104
  break;
2099
2105
  case 'mouseleave':
2100
2106
  if (this.element.hoverToggle) {
2101
- this.hideBib();
2107
+ this.hideBib("mouseleave");
2102
2108
  }
2103
2109
  break;
2104
2110
  case 'focus':
@@ -3924,6 +3930,11 @@ class AuroDropdown extends AuroElement {
3924
3930
  }
3925
3931
  }
3926
3932
 
3933
+ /**
3934
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
3935
+ * @private
3936
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
3937
+ */
3927
3938
  handleDropdownToggle(event) {
3928
3939
  this.updateFocusTrap();
3929
3940
  this.isPopoverVisible = event.detail.expanded;
@@ -1907,7 +1907,7 @@ class AuroFloatingUI {
1907
1907
  return;
1908
1908
  }
1909
1909
 
1910
- this.hideBib();
1910
+ this.hideBib("keydown");
1911
1911
  }
1912
1912
 
1913
1913
  setupHideHandlers() {
@@ -1932,7 +1932,7 @@ class AuroFloatingUI {
1932
1932
  document.expandedAuroFormkitDropdown = null;
1933
1933
  document.expandedAuroFloater = this;
1934
1934
  } else {
1935
- this.hideBib();
1935
+ this.hideBib("click");
1936
1936
  }
1937
1937
  }
1938
1938
  };
@@ -1945,7 +1945,7 @@ class AuroFloatingUI {
1945
1945
  // if something else is open, let it handle itself
1946
1946
  return;
1947
1947
  }
1948
- this.hideBib();
1948
+ this.hideBib("keydown");
1949
1949
  }
1950
1950
  };
1951
1951
 
@@ -2028,7 +2028,11 @@ class AuroFloatingUI {
2028
2028
  }
2029
2029
  }
2030
2030
 
2031
- hideBib() {
2031
+ /**
2032
+ * Hides the floating UI element.
2033
+ * @param {String} eventType - The event type that triggered the hiding action.
2034
+ */
2035
+ hideBib(eventType = "unknown") {
2032
2036
  if (!this.element.disabled && !this.element.noToggle) {
2033
2037
  this.lockScroll(false);
2034
2038
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -2039,7 +2043,7 @@ class AuroFloatingUI {
2039
2043
  if (this.showing) {
2040
2044
  this.cleanupHideHandlers();
2041
2045
  this.showing = false;
2042
- this.dispatchEventDropdownToggle();
2046
+ this.dispatchEventDropdownToggle(eventType);
2043
2047
  }
2044
2048
  }
2045
2049
  document.expandedAuroFloater = null;
@@ -2048,11 +2052,13 @@ class AuroFloatingUI {
2048
2052
  /**
2049
2053
  * @private
2050
2054
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
2055
+ * @param {String} eventType - The event type that triggered the toggle action.
2051
2056
  */
2052
- dispatchEventDropdownToggle() {
2057
+ dispatchEventDropdownToggle(eventType) {
2053
2058
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
2054
2059
  detail: {
2055
2060
  expanded: this.showing,
2061
+ eventType: eventType || "unknown",
2056
2062
  },
2057
2063
  composed: true
2058
2064
  });
@@ -2062,7 +2068,7 @@ class AuroFloatingUI {
2062
2068
 
2063
2069
  handleClick() {
2064
2070
  if (this.element.isPopoverVisible) {
2065
- this.hideBib();
2071
+ this.hideBib("click");
2066
2072
  } else {
2067
2073
  this.showBib();
2068
2074
  }
@@ -2098,7 +2104,7 @@ class AuroFloatingUI {
2098
2104
  break;
2099
2105
  case 'mouseleave':
2100
2106
  if (this.element.hoverToggle) {
2101
- this.hideBib();
2107
+ this.hideBib("mouseleave");
2102
2108
  }
2103
2109
  break;
2104
2110
  case 'focus':
@@ -3924,6 +3930,11 @@ class AuroDropdown extends AuroElement {
3924
3930
  }
3925
3931
  }
3926
3932
 
3933
+ /**
3934
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
3935
+ * @private
3936
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
3937
+ */
3927
3938
  handleDropdownToggle(event) {
3928
3939
  this.updateFocusTrap();
3929
3940
  this.isPopoverVisible = event.detail.expanded;
@@ -3032,7 +3032,7 @@ class AuroFloatingUI {
3032
3032
  return;
3033
3033
  }
3034
3034
 
3035
- this.hideBib();
3035
+ this.hideBib("keydown");
3036
3036
  }
3037
3037
 
3038
3038
  setupHideHandlers() {
@@ -3057,7 +3057,7 @@ class AuroFloatingUI {
3057
3057
  document.expandedAuroFormkitDropdown = null;
3058
3058
  document.expandedAuroFloater = this;
3059
3059
  } else {
3060
- this.hideBib();
3060
+ this.hideBib("click");
3061
3061
  }
3062
3062
  }
3063
3063
  };
@@ -3070,7 +3070,7 @@ class AuroFloatingUI {
3070
3070
  // if something else is open, let it handle itself
3071
3071
  return;
3072
3072
  }
3073
- this.hideBib();
3073
+ this.hideBib("keydown");
3074
3074
  }
3075
3075
  };
3076
3076
 
@@ -3153,7 +3153,11 @@ class AuroFloatingUI {
3153
3153
  }
3154
3154
  }
3155
3155
 
3156
- hideBib() {
3156
+ /**
3157
+ * Hides the floating UI element.
3158
+ * @param {String} eventType - The event type that triggered the hiding action.
3159
+ */
3160
+ hideBib(eventType = "unknown") {
3157
3161
  if (!this.element.disabled && !this.element.noToggle) {
3158
3162
  this.lockScroll(false);
3159
3163
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -3164,7 +3168,7 @@ class AuroFloatingUI {
3164
3168
  if (this.showing) {
3165
3169
  this.cleanupHideHandlers();
3166
3170
  this.showing = false;
3167
- this.dispatchEventDropdownToggle();
3171
+ this.dispatchEventDropdownToggle(eventType);
3168
3172
  }
3169
3173
  }
3170
3174
  document.expandedAuroFloater = null;
@@ -3173,11 +3177,13 @@ class AuroFloatingUI {
3173
3177
  /**
3174
3178
  * @private
3175
3179
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
3180
+ * @param {String} eventType - The event type that triggered the toggle action.
3176
3181
  */
3177
- dispatchEventDropdownToggle() {
3182
+ dispatchEventDropdownToggle(eventType) {
3178
3183
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
3179
3184
  detail: {
3180
3185
  expanded: this.showing,
3186
+ eventType: eventType || "unknown",
3181
3187
  },
3182
3188
  composed: true
3183
3189
  });
@@ -3187,7 +3193,7 @@ class AuroFloatingUI {
3187
3193
 
3188
3194
  handleClick() {
3189
3195
  if (this.element.isPopoverVisible) {
3190
- this.hideBib();
3196
+ this.hideBib("click");
3191
3197
  } else {
3192
3198
  this.showBib();
3193
3199
  }
@@ -3223,7 +3229,7 @@ class AuroFloatingUI {
3223
3229
  break;
3224
3230
  case 'mouseleave':
3225
3231
  if (this.element.hoverToggle) {
3226
- this.hideBib();
3232
+ this.hideBib("mouseleave");
3227
3233
  }
3228
3234
  break;
3229
3235
  case 'focus':
@@ -5049,6 +5055,11 @@ class AuroDropdown extends AuroElement$3 {
5049
5055
  }
5050
5056
  }
5051
5057
 
5058
+ /**
5059
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
5060
+ * @private
5061
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
5062
+ */
5052
5063
  handleDropdownToggle(event) {
5053
5064
  this.updateFocusTrap();
5054
5065
  this.isPopoverVisible = event.detail.expanded;
@@ -2940,7 +2940,7 @@ class AuroFloatingUI {
2940
2940
  return;
2941
2941
  }
2942
2942
 
2943
- this.hideBib();
2943
+ this.hideBib("keydown");
2944
2944
  }
2945
2945
 
2946
2946
  setupHideHandlers() {
@@ -2965,7 +2965,7 @@ class AuroFloatingUI {
2965
2965
  document.expandedAuroFormkitDropdown = null;
2966
2966
  document.expandedAuroFloater = this;
2967
2967
  } else {
2968
- this.hideBib();
2968
+ this.hideBib("click");
2969
2969
  }
2970
2970
  }
2971
2971
  };
@@ -2978,7 +2978,7 @@ class AuroFloatingUI {
2978
2978
  // if something else is open, let it handle itself
2979
2979
  return;
2980
2980
  }
2981
- this.hideBib();
2981
+ this.hideBib("keydown");
2982
2982
  }
2983
2983
  };
2984
2984
 
@@ -3061,7 +3061,11 @@ class AuroFloatingUI {
3061
3061
  }
3062
3062
  }
3063
3063
 
3064
- hideBib() {
3064
+ /**
3065
+ * Hides the floating UI element.
3066
+ * @param {String} eventType - The event type that triggered the hiding action.
3067
+ */
3068
+ hideBib(eventType = "unknown") {
3065
3069
  if (!this.element.disabled && !this.element.noToggle) {
3066
3070
  this.lockScroll(false);
3067
3071
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -3072,7 +3076,7 @@ class AuroFloatingUI {
3072
3076
  if (this.showing) {
3073
3077
  this.cleanupHideHandlers();
3074
3078
  this.showing = false;
3075
- this.dispatchEventDropdownToggle();
3079
+ this.dispatchEventDropdownToggle(eventType);
3076
3080
  }
3077
3081
  }
3078
3082
  document.expandedAuroFloater = null;
@@ -3081,11 +3085,13 @@ class AuroFloatingUI {
3081
3085
  /**
3082
3086
  * @private
3083
3087
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
3088
+ * @param {String} eventType - The event type that triggered the toggle action.
3084
3089
  */
3085
- dispatchEventDropdownToggle() {
3090
+ dispatchEventDropdownToggle(eventType) {
3086
3091
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
3087
3092
  detail: {
3088
3093
  expanded: this.showing,
3094
+ eventType: eventType || "unknown",
3089
3095
  },
3090
3096
  composed: true
3091
3097
  });
@@ -3095,7 +3101,7 @@ class AuroFloatingUI {
3095
3101
 
3096
3102
  handleClick() {
3097
3103
  if (this.element.isPopoverVisible) {
3098
- this.hideBib();
3104
+ this.hideBib("click");
3099
3105
  } else {
3100
3106
  this.showBib();
3101
3107
  }
@@ -3131,7 +3137,7 @@ class AuroFloatingUI {
3131
3137
  break;
3132
3138
  case 'mouseleave':
3133
3139
  if (this.element.hoverToggle) {
3134
- this.hideBib();
3140
+ this.hideBib("mouseleave");
3135
3141
  }
3136
3142
  break;
3137
3143
  case 'focus':
@@ -4957,6 +4963,11 @@ class AuroDropdown extends AuroElement$3 {
4957
4963
  }
4958
4964
  }
4959
4965
 
4966
+ /**
4967
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
4968
+ * @private
4969
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
4970
+ */
4960
4971
  handleDropdownToggle(event) {
4961
4972
  this.updateFocusTrap();
4962
4973
  this.isPopoverVisible = event.detail.expanded;
@@ -2894,7 +2894,7 @@ class AuroFloatingUI {
2894
2894
  return;
2895
2895
  }
2896
2896
 
2897
- this.hideBib();
2897
+ this.hideBib("keydown");
2898
2898
  }
2899
2899
 
2900
2900
  setupHideHandlers() {
@@ -2919,7 +2919,7 @@ class AuroFloatingUI {
2919
2919
  document.expandedAuroFormkitDropdown = null;
2920
2920
  document.expandedAuroFloater = this;
2921
2921
  } else {
2922
- this.hideBib();
2922
+ this.hideBib("click");
2923
2923
  }
2924
2924
  }
2925
2925
  };
@@ -2932,7 +2932,7 @@ class AuroFloatingUI {
2932
2932
  // if something else is open, let it handle itself
2933
2933
  return;
2934
2934
  }
2935
- this.hideBib();
2935
+ this.hideBib("keydown");
2936
2936
  }
2937
2937
  };
2938
2938
 
@@ -3015,7 +3015,11 @@ class AuroFloatingUI {
3015
3015
  }
3016
3016
  }
3017
3017
 
3018
- hideBib() {
3018
+ /**
3019
+ * Hides the floating UI element.
3020
+ * @param {String} eventType - The event type that triggered the hiding action.
3021
+ */
3022
+ hideBib(eventType = "unknown") {
3019
3023
  if (!this.element.disabled && !this.element.noToggle) {
3020
3024
  this.lockScroll(false);
3021
3025
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -3026,7 +3030,7 @@ class AuroFloatingUI {
3026
3030
  if (this.showing) {
3027
3031
  this.cleanupHideHandlers();
3028
3032
  this.showing = false;
3029
- this.dispatchEventDropdownToggle();
3033
+ this.dispatchEventDropdownToggle(eventType);
3030
3034
  }
3031
3035
  }
3032
3036
  document.expandedAuroFloater = null;
@@ -3035,11 +3039,13 @@ class AuroFloatingUI {
3035
3039
  /**
3036
3040
  * @private
3037
3041
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
3042
+ * @param {String} eventType - The event type that triggered the toggle action.
3038
3043
  */
3039
- dispatchEventDropdownToggle() {
3044
+ dispatchEventDropdownToggle(eventType) {
3040
3045
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
3041
3046
  detail: {
3042
3047
  expanded: this.showing,
3048
+ eventType: eventType || "unknown",
3043
3049
  },
3044
3050
  composed: true
3045
3051
  });
@@ -3049,7 +3055,7 @@ class AuroFloatingUI {
3049
3055
 
3050
3056
  handleClick() {
3051
3057
  if (this.element.isPopoverVisible) {
3052
- this.hideBib();
3058
+ this.hideBib("click");
3053
3059
  } else {
3054
3060
  this.showBib();
3055
3061
  }
@@ -3085,7 +3091,7 @@ class AuroFloatingUI {
3085
3091
  break;
3086
3092
  case 'mouseleave':
3087
3093
  if (this.element.hoverToggle) {
3088
- this.hideBib();
3094
+ this.hideBib("mouseleave");
3089
3095
  }
3090
3096
  break;
3091
3097
  case 'focus':
@@ -4911,6 +4917,11 @@ class AuroDropdown extends AuroElement$2 {
4911
4917
  }
4912
4918
  }
4913
4919
 
4920
+ /**
4921
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
4922
+ * @private
4923
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
4924
+ */
4914
4925
  handleDropdownToggle(event) {
4915
4926
  this.updateFocusTrap();
4916
4927
  this.isPopoverVisible = event.detail.expanded;
@@ -2894,7 +2894,7 @@ class AuroFloatingUI {
2894
2894
  return;
2895
2895
  }
2896
2896
 
2897
- this.hideBib();
2897
+ this.hideBib("keydown");
2898
2898
  }
2899
2899
 
2900
2900
  setupHideHandlers() {
@@ -2919,7 +2919,7 @@ class AuroFloatingUI {
2919
2919
  document.expandedAuroFormkitDropdown = null;
2920
2920
  document.expandedAuroFloater = this;
2921
2921
  } else {
2922
- this.hideBib();
2922
+ this.hideBib("click");
2923
2923
  }
2924
2924
  }
2925
2925
  };
@@ -2932,7 +2932,7 @@ class AuroFloatingUI {
2932
2932
  // if something else is open, let it handle itself
2933
2933
  return;
2934
2934
  }
2935
- this.hideBib();
2935
+ this.hideBib("keydown");
2936
2936
  }
2937
2937
  };
2938
2938
 
@@ -3015,7 +3015,11 @@ class AuroFloatingUI {
3015
3015
  }
3016
3016
  }
3017
3017
 
3018
- hideBib() {
3018
+ /**
3019
+ * Hides the floating UI element.
3020
+ * @param {String} eventType - The event type that triggered the hiding action.
3021
+ */
3022
+ hideBib(eventType = "unknown") {
3019
3023
  if (!this.element.disabled && !this.element.noToggle) {
3020
3024
  this.lockScroll(false);
3021
3025
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -3026,7 +3030,7 @@ class AuroFloatingUI {
3026
3030
  if (this.showing) {
3027
3031
  this.cleanupHideHandlers();
3028
3032
  this.showing = false;
3029
- this.dispatchEventDropdownToggle();
3033
+ this.dispatchEventDropdownToggle(eventType);
3030
3034
  }
3031
3035
  }
3032
3036
  document.expandedAuroFloater = null;
@@ -3035,11 +3039,13 @@ class AuroFloatingUI {
3035
3039
  /**
3036
3040
  * @private
3037
3041
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
3042
+ * @param {String} eventType - The event type that triggered the toggle action.
3038
3043
  */
3039
- dispatchEventDropdownToggle() {
3044
+ dispatchEventDropdownToggle(eventType) {
3040
3045
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
3041
3046
  detail: {
3042
3047
  expanded: this.showing,
3048
+ eventType: eventType || "unknown",
3043
3049
  },
3044
3050
  composed: true
3045
3051
  });
@@ -3049,7 +3055,7 @@ class AuroFloatingUI {
3049
3055
 
3050
3056
  handleClick() {
3051
3057
  if (this.element.isPopoverVisible) {
3052
- this.hideBib();
3058
+ this.hideBib("click");
3053
3059
  } else {
3054
3060
  this.showBib();
3055
3061
  }
@@ -3085,7 +3091,7 @@ class AuroFloatingUI {
3085
3091
  break;
3086
3092
  case 'mouseleave':
3087
3093
  if (this.element.hoverToggle) {
3088
- this.hideBib();
3094
+ this.hideBib("mouseleave");
3089
3095
  }
3090
3096
  break;
3091
3097
  case 'focus':
@@ -4911,6 +4917,11 @@ class AuroDropdown extends AuroElement$2 {
4911
4917
  }
4912
4918
  }
4913
4919
 
4920
+ /**
4921
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
4922
+ * @private
4923
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
4924
+ */
4914
4925
  handleDropdownToggle(event) {
4915
4926
  this.updateFocusTrap();
4916
4927
  this.isPopoverVisible = event.detail.expanded;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem-dev/auro-formkit",
3
- "version": "0.0.0-pr785.1",
3
+ "version": "0.0.0-pr785.3",
4
4
  "description": "A collection of web components used to build forms.",
5
5
  "homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
6
6
  "bugs": {
@@ -53,7 +53,7 @@
53
53
  "local-demo": "npm run build && sh ./local-demo.sh --zip"
54
54
  },
55
55
  "dependencies": {
56
- "@aurodesignsystem/auro-library": "^5.2.3",
56
+ "@aurodesignsystem/auro-library": "^5.3.0",
57
57
  "@lit/reactive-element": "^2.1.0",
58
58
  "lit": "^3.2.1"
59
59
  },