@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.
@@ -4919,7 +4919,7 @@ class AuroFloatingUI {
4919
4919
  return;
4920
4920
  }
4921
4921
 
4922
- this.hideBib();
4922
+ this.hideBib("keydown");
4923
4923
  }
4924
4924
 
4925
4925
  setupHideHandlers() {
@@ -4944,7 +4944,7 @@ class AuroFloatingUI {
4944
4944
  document.expandedAuroFormkitDropdown = null;
4945
4945
  document.expandedAuroFloater = this;
4946
4946
  } else {
4947
- this.hideBib();
4947
+ this.hideBib("click");
4948
4948
  }
4949
4949
  }
4950
4950
  };
@@ -4957,7 +4957,7 @@ class AuroFloatingUI {
4957
4957
  // if something else is open, let it handle itself
4958
4958
  return;
4959
4959
  }
4960
- this.hideBib();
4960
+ this.hideBib("keydown");
4961
4961
  }
4962
4962
  };
4963
4963
 
@@ -5040,7 +5040,11 @@ class AuroFloatingUI {
5040
5040
  }
5041
5041
  }
5042
5042
 
5043
- hideBib() {
5043
+ /**
5044
+ * Hides the floating UI element.
5045
+ * @param {String} eventType - The event type that triggered the hiding action.
5046
+ */
5047
+ hideBib(eventType = "unknown") {
5044
5048
  if (!this.element.disabled && !this.element.noToggle) {
5045
5049
  this.lockScroll(false);
5046
5050
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -5051,7 +5055,7 @@ class AuroFloatingUI {
5051
5055
  if (this.showing) {
5052
5056
  this.cleanupHideHandlers();
5053
5057
  this.showing = false;
5054
- this.dispatchEventDropdownToggle();
5058
+ this.dispatchEventDropdownToggle(eventType);
5055
5059
  }
5056
5060
  }
5057
5061
  document.expandedAuroFloater = null;
@@ -5060,11 +5064,13 @@ class AuroFloatingUI {
5060
5064
  /**
5061
5065
  * @private
5062
5066
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
5067
+ * @param {String} eventType - The event type that triggered the toggle action.
5063
5068
  */
5064
- dispatchEventDropdownToggle() {
5069
+ dispatchEventDropdownToggle(eventType) {
5065
5070
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
5066
5071
  detail: {
5067
5072
  expanded: this.showing,
5073
+ eventType: eventType || "unknown",
5068
5074
  },
5069
5075
  composed: true
5070
5076
  });
@@ -5074,7 +5080,7 @@ class AuroFloatingUI {
5074
5080
 
5075
5081
  handleClick() {
5076
5082
  if (this.element.isPopoverVisible) {
5077
- this.hideBib();
5083
+ this.hideBib("click");
5078
5084
  } else {
5079
5085
  this.showBib();
5080
5086
  }
@@ -5110,7 +5116,7 @@ class AuroFloatingUI {
5110
5116
  break;
5111
5117
  case 'mouseleave':
5112
5118
  if (this.element.hoverToggle) {
5113
- this.hideBib();
5119
+ this.hideBib("mouseleave");
5114
5120
  }
5115
5121
  break;
5116
5122
  case 'focus':
@@ -6936,6 +6942,11 @@ class AuroDropdown extends AuroElement$3 {
6936
6942
  }
6937
6943
  }
6938
6944
 
6945
+ /**
6946
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
6947
+ * @private
6948
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
6949
+ */
6939
6950
  handleDropdownToggle(event) {
6940
6951
  this.updateFocusTrap();
6941
6952
  this.isPopoverVisible = event.detail.expanded;
@@ -51,7 +51,6 @@
51
51
  | Method | Type | Description |
52
52
  |-------------------------------|----------------------------------------|--------------------------------------------------|
53
53
  | [focus](#focus) | `(focusInput: string): void` | Focuses the datepicker trigger input.<br /><br />**focusInput**: Pass in `endDate` to focus on the return input. No parameter is needed to focus on the depart input. |
54
- | [formatShortDate](#formatShortDate) | `(date: any): string` | Simple formatter that ONLY WORKS FOR US DATES.<br />Returns formatted date like Apr 21 or Dec 25.<br /><br />**date**: undefined |
55
54
  | [renderHtmlActionClear](#renderHtmlActionClear) | `(): TemplateResult` | |
56
55
  | [renderHtmlIconCalendar](#renderHtmlIconCalendar) | `(): TemplateResult` | |
57
56
  | [renderHtmlIconError](#renderHtmlIconError) | `(): TemplateResult` | |
@@ -16323,7 +16323,7 @@ class AuroFloatingUI {
16323
16323
  return;
16324
16324
  }
16325
16325
 
16326
- this.hideBib();
16326
+ this.hideBib("keydown");
16327
16327
  }
16328
16328
 
16329
16329
  setupHideHandlers() {
@@ -16348,7 +16348,7 @@ class AuroFloatingUI {
16348
16348
  document.expandedAuroFormkitDropdown = null;
16349
16349
  document.expandedAuroFloater = this;
16350
16350
  } else {
16351
- this.hideBib();
16351
+ this.hideBib("click");
16352
16352
  }
16353
16353
  }
16354
16354
  };
@@ -16361,7 +16361,7 @@ class AuroFloatingUI {
16361
16361
  // if something else is open, let it handle itself
16362
16362
  return;
16363
16363
  }
16364
- this.hideBib();
16364
+ this.hideBib("keydown");
16365
16365
  }
16366
16366
  };
16367
16367
 
@@ -16444,7 +16444,11 @@ class AuroFloatingUI {
16444
16444
  }
16445
16445
  }
16446
16446
 
16447
- hideBib() {
16447
+ /**
16448
+ * Hides the floating UI element.
16449
+ * @param {String} eventType - The event type that triggered the hiding action.
16450
+ */
16451
+ hideBib(eventType = "unknown") {
16448
16452
  if (!this.element.disabled && !this.element.noToggle) {
16449
16453
  this.lockScroll(false);
16450
16454
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -16455,7 +16459,7 @@ class AuroFloatingUI {
16455
16459
  if (this.showing) {
16456
16460
  this.cleanupHideHandlers();
16457
16461
  this.showing = false;
16458
- this.dispatchEventDropdownToggle();
16462
+ this.dispatchEventDropdownToggle(eventType);
16459
16463
  }
16460
16464
  }
16461
16465
  document.expandedAuroFloater = null;
@@ -16464,11 +16468,13 @@ class AuroFloatingUI {
16464
16468
  /**
16465
16469
  * @private
16466
16470
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
16471
+ * @param {String} eventType - The event type that triggered the toggle action.
16467
16472
  */
16468
- dispatchEventDropdownToggle() {
16473
+ dispatchEventDropdownToggle(eventType) {
16469
16474
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
16470
16475
  detail: {
16471
16476
  expanded: this.showing,
16477
+ eventType: eventType || "unknown",
16472
16478
  },
16473
16479
  composed: true
16474
16480
  });
@@ -16478,7 +16484,7 @@ class AuroFloatingUI {
16478
16484
 
16479
16485
  handleClick() {
16480
16486
  if (this.element.isPopoverVisible) {
16481
- this.hideBib();
16487
+ this.hideBib("click");
16482
16488
  } else {
16483
16489
  this.showBib();
16484
16490
  }
@@ -16514,7 +16520,7 @@ class AuroFloatingUI {
16514
16520
  break;
16515
16521
  case 'mouseleave':
16516
16522
  if (this.element.hoverToggle) {
16517
- this.hideBib();
16523
+ this.hideBib("mouseleave");
16518
16524
  }
16519
16525
  break;
16520
16526
  case 'focus':
@@ -18340,6 +18346,11 @@ class AuroDropdown extends AuroElement$4 {
18340
18346
  }
18341
18347
  }
18342
18348
 
18349
+ /**
18350
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
18351
+ * @private
18352
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
18353
+ */
18343
18354
  handleDropdownToggle(event) {
18344
18355
  this.updateFocusTrap();
18345
18356
  this.isPopoverVisible = event.detail.expanded;
@@ -29069,7 +29080,8 @@ class AuroDatePicker extends AuroElement$1 {
29069
29080
  /**
29070
29081
  * Simple formatter that ONLY WORKS FOR US DATES.
29071
29082
  * Returns formatted date like Apr 21 or Dec 25.
29072
- * @param date
29083
+ * @private
29084
+ * @param {string} date - Date format should be in a format Date constructor accepts, like '2023-04-21' or '2023/04/21'.
29073
29085
  * @return {string}
29074
29086
  */
29075
29087
  formatShortDate(date) {
@@ -16064,7 +16064,7 @@ class AuroFloatingUI {
16064
16064
  return;
16065
16065
  }
16066
16066
 
16067
- this.hideBib();
16067
+ this.hideBib("keydown");
16068
16068
  }
16069
16069
 
16070
16070
  setupHideHandlers() {
@@ -16089,7 +16089,7 @@ class AuroFloatingUI {
16089
16089
  document.expandedAuroFormkitDropdown = null;
16090
16090
  document.expandedAuroFloater = this;
16091
16091
  } else {
16092
- this.hideBib();
16092
+ this.hideBib("click");
16093
16093
  }
16094
16094
  }
16095
16095
  };
@@ -16102,7 +16102,7 @@ class AuroFloatingUI {
16102
16102
  // if something else is open, let it handle itself
16103
16103
  return;
16104
16104
  }
16105
- this.hideBib();
16105
+ this.hideBib("keydown");
16106
16106
  }
16107
16107
  };
16108
16108
 
@@ -16185,7 +16185,11 @@ class AuroFloatingUI {
16185
16185
  }
16186
16186
  }
16187
16187
 
16188
- hideBib() {
16188
+ /**
16189
+ * Hides the floating UI element.
16190
+ * @param {String} eventType - The event type that triggered the hiding action.
16191
+ */
16192
+ hideBib(eventType = "unknown") {
16189
16193
  if (!this.element.disabled && !this.element.noToggle) {
16190
16194
  this.lockScroll(false);
16191
16195
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -16196,7 +16200,7 @@ class AuroFloatingUI {
16196
16200
  if (this.showing) {
16197
16201
  this.cleanupHideHandlers();
16198
16202
  this.showing = false;
16199
- this.dispatchEventDropdownToggle();
16203
+ this.dispatchEventDropdownToggle(eventType);
16200
16204
  }
16201
16205
  }
16202
16206
  document.expandedAuroFloater = null;
@@ -16205,11 +16209,13 @@ class AuroFloatingUI {
16205
16209
  /**
16206
16210
  * @private
16207
16211
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
16212
+ * @param {String} eventType - The event type that triggered the toggle action.
16208
16213
  */
16209
- dispatchEventDropdownToggle() {
16214
+ dispatchEventDropdownToggle(eventType) {
16210
16215
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
16211
16216
  detail: {
16212
16217
  expanded: this.showing,
16218
+ eventType: eventType || "unknown",
16213
16219
  },
16214
16220
  composed: true
16215
16221
  });
@@ -16219,7 +16225,7 @@ class AuroFloatingUI {
16219
16225
 
16220
16226
  handleClick() {
16221
16227
  if (this.element.isPopoverVisible) {
16222
- this.hideBib();
16228
+ this.hideBib("click");
16223
16229
  } else {
16224
16230
  this.showBib();
16225
16231
  }
@@ -16255,7 +16261,7 @@ class AuroFloatingUI {
16255
16261
  break;
16256
16262
  case 'mouseleave':
16257
16263
  if (this.element.hoverToggle) {
16258
- this.hideBib();
16264
+ this.hideBib("mouseleave");
16259
16265
  }
16260
16266
  break;
16261
16267
  case 'focus':
@@ -18081,6 +18087,11 @@ class AuroDropdown extends AuroElement$4 {
18081
18087
  }
18082
18088
  }
18083
18089
 
18090
+ /**
18091
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
18092
+ * @private
18093
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
18094
+ */
18084
18095
  handleDropdownToggle(event) {
18085
18096
  this.updateFocusTrap();
18086
18097
  this.isPopoverVisible = event.detail.expanded;
@@ -28810,7 +28821,8 @@ class AuroDatePicker extends AuroElement$1 {
28810
28821
  /**
28811
28822
  * Simple formatter that ONLY WORKS FOR US DATES.
28812
28823
  * Returns formatted date like Apr 21 or Dec 25.
28813
- * @param date
28824
+ * @private
28825
+ * @param {string} date - Date format should be in a format Date constructor accepts, like '2023-04-21' or '2023/04/21'.
28814
28826
  * @return {string}
28815
28827
  */
28816
28828
  formatShortDate(date) {
@@ -531,10 +531,11 @@ export class AuroDatePicker extends AuroElement {
531
531
  /**
532
532
  * Simple formatter that ONLY WORKS FOR US DATES.
533
533
  * Returns formatted date like Apr 21 or Dec 25.
534
- * @param date
534
+ * @private
535
+ * @param {string} date - Date format should be in a format Date constructor accepts, like '2023-04-21' or '2023/04/21'.
535
536
  * @return {string}
536
537
  */
537
- formatShortDate(date: any): string;
538
+ private formatShortDate;
538
539
  /**
539
540
  * Format and render the provided date value.
540
541
  * @private
@@ -16013,7 +16013,7 @@ class AuroFloatingUI {
16013
16013
  return;
16014
16014
  }
16015
16015
 
16016
- this.hideBib();
16016
+ this.hideBib("keydown");
16017
16017
  }
16018
16018
 
16019
16019
  setupHideHandlers() {
@@ -16038,7 +16038,7 @@ class AuroFloatingUI {
16038
16038
  document.expandedAuroFormkitDropdown = null;
16039
16039
  document.expandedAuroFloater = this;
16040
16040
  } else {
16041
- this.hideBib();
16041
+ this.hideBib("click");
16042
16042
  }
16043
16043
  }
16044
16044
  };
@@ -16051,7 +16051,7 @@ class AuroFloatingUI {
16051
16051
  // if something else is open, let it handle itself
16052
16052
  return;
16053
16053
  }
16054
- this.hideBib();
16054
+ this.hideBib("keydown");
16055
16055
  }
16056
16056
  };
16057
16057
 
@@ -16134,7 +16134,11 @@ class AuroFloatingUI {
16134
16134
  }
16135
16135
  }
16136
16136
 
16137
- hideBib() {
16137
+ /**
16138
+ * Hides the floating UI element.
16139
+ * @param {String} eventType - The event type that triggered the hiding action.
16140
+ */
16141
+ hideBib(eventType = "unknown") {
16138
16142
  if (!this.element.disabled && !this.element.noToggle) {
16139
16143
  this.lockScroll(false);
16140
16144
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -16145,7 +16149,7 @@ class AuroFloatingUI {
16145
16149
  if (this.showing) {
16146
16150
  this.cleanupHideHandlers();
16147
16151
  this.showing = false;
16148
- this.dispatchEventDropdownToggle();
16152
+ this.dispatchEventDropdownToggle(eventType);
16149
16153
  }
16150
16154
  }
16151
16155
  document.expandedAuroFloater = null;
@@ -16154,11 +16158,13 @@ class AuroFloatingUI {
16154
16158
  /**
16155
16159
  * @private
16156
16160
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
16161
+ * @param {String} eventType - The event type that triggered the toggle action.
16157
16162
  */
16158
- dispatchEventDropdownToggle() {
16163
+ dispatchEventDropdownToggle(eventType) {
16159
16164
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
16160
16165
  detail: {
16161
16166
  expanded: this.showing,
16167
+ eventType: eventType || "unknown",
16162
16168
  },
16163
16169
  composed: true
16164
16170
  });
@@ -16168,7 +16174,7 @@ class AuroFloatingUI {
16168
16174
 
16169
16175
  handleClick() {
16170
16176
  if (this.element.isPopoverVisible) {
16171
- this.hideBib();
16177
+ this.hideBib("click");
16172
16178
  } else {
16173
16179
  this.showBib();
16174
16180
  }
@@ -16204,7 +16210,7 @@ class AuroFloatingUI {
16204
16210
  break;
16205
16211
  case 'mouseleave':
16206
16212
  if (this.element.hoverToggle) {
16207
- this.hideBib();
16213
+ this.hideBib("mouseleave");
16208
16214
  }
16209
16215
  break;
16210
16216
  case 'focus':
@@ -18030,6 +18036,11 @@ class AuroDropdown extends AuroElement$4 {
18030
18036
  }
18031
18037
  }
18032
18038
 
18039
+ /**
18040
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
18041
+ * @private
18042
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
18043
+ */
18033
18044
  handleDropdownToggle(event) {
18034
18045
  this.updateFocusTrap();
18035
18046
  this.isPopoverVisible = event.detail.expanded;
@@ -28746,7 +28757,8 @@ class AuroDatePicker extends AuroElement$1 {
28746
28757
  /**
28747
28758
  * Simple formatter that ONLY WORKS FOR US DATES.
28748
28759
  * Returns formatted date like Apr 21 or Dec 25.
28749
- * @param date
28760
+ * @private
28761
+ * @param {string} date - Date format should be in a format Date constructor accepts, like '2023-04-21' or '2023/04/21'.
28750
28762
  * @return {string}
28751
28763
  */
28752
28764
  formatShortDate(date) {
@@ -16013,7 +16013,7 @@ class AuroFloatingUI {
16013
16013
  return;
16014
16014
  }
16015
16015
 
16016
- this.hideBib();
16016
+ this.hideBib("keydown");
16017
16017
  }
16018
16018
 
16019
16019
  setupHideHandlers() {
@@ -16038,7 +16038,7 @@ class AuroFloatingUI {
16038
16038
  document.expandedAuroFormkitDropdown = null;
16039
16039
  document.expandedAuroFloater = this;
16040
16040
  } else {
16041
- this.hideBib();
16041
+ this.hideBib("click");
16042
16042
  }
16043
16043
  }
16044
16044
  };
@@ -16051,7 +16051,7 @@ class AuroFloatingUI {
16051
16051
  // if something else is open, let it handle itself
16052
16052
  return;
16053
16053
  }
16054
- this.hideBib();
16054
+ this.hideBib("keydown");
16055
16055
  }
16056
16056
  };
16057
16057
 
@@ -16134,7 +16134,11 @@ class AuroFloatingUI {
16134
16134
  }
16135
16135
  }
16136
16136
 
16137
- hideBib() {
16137
+ /**
16138
+ * Hides the floating UI element.
16139
+ * @param {String} eventType - The event type that triggered the hiding action.
16140
+ */
16141
+ hideBib(eventType = "unknown") {
16138
16142
  if (!this.element.disabled && !this.element.noToggle) {
16139
16143
  this.lockScroll(false);
16140
16144
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -16145,7 +16149,7 @@ class AuroFloatingUI {
16145
16149
  if (this.showing) {
16146
16150
  this.cleanupHideHandlers();
16147
16151
  this.showing = false;
16148
- this.dispatchEventDropdownToggle();
16152
+ this.dispatchEventDropdownToggle(eventType);
16149
16153
  }
16150
16154
  }
16151
16155
  document.expandedAuroFloater = null;
@@ -16154,11 +16158,13 @@ class AuroFloatingUI {
16154
16158
  /**
16155
16159
  * @private
16156
16160
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
16161
+ * @param {String} eventType - The event type that triggered the toggle action.
16157
16162
  */
16158
- dispatchEventDropdownToggle() {
16163
+ dispatchEventDropdownToggle(eventType) {
16159
16164
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
16160
16165
  detail: {
16161
16166
  expanded: this.showing,
16167
+ eventType: eventType || "unknown",
16162
16168
  },
16163
16169
  composed: true
16164
16170
  });
@@ -16168,7 +16174,7 @@ class AuroFloatingUI {
16168
16174
 
16169
16175
  handleClick() {
16170
16176
  if (this.element.isPopoverVisible) {
16171
- this.hideBib();
16177
+ this.hideBib("click");
16172
16178
  } else {
16173
16179
  this.showBib();
16174
16180
  }
@@ -16204,7 +16210,7 @@ class AuroFloatingUI {
16204
16210
  break;
16205
16211
  case 'mouseleave':
16206
16212
  if (this.element.hoverToggle) {
16207
- this.hideBib();
16213
+ this.hideBib("mouseleave");
16208
16214
  }
16209
16215
  break;
16210
16216
  case 'focus':
@@ -18030,6 +18036,11 @@ class AuroDropdown extends AuroElement$4 {
18030
18036
  }
18031
18037
  }
18032
18038
 
18039
+ /**
18040
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
18041
+ * @private
18042
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
18043
+ */
18033
18044
  handleDropdownToggle(event) {
18034
18045
  this.updateFocusTrap();
18035
18046
  this.isPopoverVisible = event.detail.expanded;
@@ -28746,7 +28757,8 @@ class AuroDatePicker extends AuroElement$1 {
28746
28757
  /**
28747
28758
  * Simple formatter that ONLY WORKS FOR US DATES.
28748
28759
  * Returns formatted date like Apr 21 or Dec 25.
28749
- * @param date
28760
+ * @private
28761
+ * @param {string} date - Date format should be in a format Date constructor accepts, like '2023-04-21' or '2023/04/21'.
28750
28762
  * @return {string}
28751
28763
  */
28752
28764
  formatShortDate(date) {
@@ -35,13 +35,12 @@
35
35
 
36
36
  ## Methods
37
37
 
38
- | Method | Type | Description |
39
- |------------------------|----------------------|--------------------------------------------------|
40
- | [exposeCssParts](#exposeCssParts) | `(): void` | Exposes CSS parts for styling from parent components. |
41
- | [focus](#focus) | `(): void` | When bib is open, focus on the first element inside of bib.<br />If not, trigger element will get focus. |
42
- | [handleDropdownToggle](#handleDropdownToggle) | `(event: any): void` | |
43
- | [hide](#hide) | `(): void` | Public method to hide the dropdown. |
44
- | [show](#show) | `(): void` | Public method to show the dropdown. |
38
+ | Method | Type | Description |
39
+ |------------------|------------|--------------------------------------------------|
40
+ | [exposeCssParts](#exposeCssParts) | `(): void` | Exposes CSS parts for styling from parent components. |
41
+ | [focus](#focus) | `(): void` | When bib is open, focus on the first element inside of bib.<br />If not, trigger element will get focus. |
42
+ | [hide](#hide) | `(): void` | Public method to hide the dropdown. |
43
+ | [show](#show) | `(): void` | Public method to show the dropdown. |
45
44
 
46
45
  ## Events
47
46
 
@@ -1973,7 +1973,7 @@ class AuroFloatingUI {
1973
1973
  return;
1974
1974
  }
1975
1975
 
1976
- this.hideBib();
1976
+ this.hideBib("keydown");
1977
1977
  }
1978
1978
 
1979
1979
  setupHideHandlers() {
@@ -1998,7 +1998,7 @@ class AuroFloatingUI {
1998
1998
  document.expandedAuroFormkitDropdown = null;
1999
1999
  document.expandedAuroFloater = this;
2000
2000
  } else {
2001
- this.hideBib();
2001
+ this.hideBib("click");
2002
2002
  }
2003
2003
  }
2004
2004
  };
@@ -2011,7 +2011,7 @@ class AuroFloatingUI {
2011
2011
  // if something else is open, let it handle itself
2012
2012
  return;
2013
2013
  }
2014
- this.hideBib();
2014
+ this.hideBib("keydown");
2015
2015
  }
2016
2016
  };
2017
2017
 
@@ -2094,7 +2094,11 @@ class AuroFloatingUI {
2094
2094
  }
2095
2095
  }
2096
2096
 
2097
- hideBib() {
2097
+ /**
2098
+ * Hides the floating UI element.
2099
+ * @param {String} eventType - The event type that triggered the hiding action.
2100
+ */
2101
+ hideBib(eventType = "unknown") {
2098
2102
  if (!this.element.disabled && !this.element.noToggle) {
2099
2103
  this.lockScroll(false);
2100
2104
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -2105,7 +2109,7 @@ class AuroFloatingUI {
2105
2109
  if (this.showing) {
2106
2110
  this.cleanupHideHandlers();
2107
2111
  this.showing = false;
2108
- this.dispatchEventDropdownToggle();
2112
+ this.dispatchEventDropdownToggle(eventType);
2109
2113
  }
2110
2114
  }
2111
2115
  document.expandedAuroFloater = null;
@@ -2114,11 +2118,13 @@ class AuroFloatingUI {
2114
2118
  /**
2115
2119
  * @private
2116
2120
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
2121
+ * @param {String} eventType - The event type that triggered the toggle action.
2117
2122
  */
2118
- dispatchEventDropdownToggle() {
2123
+ dispatchEventDropdownToggle(eventType) {
2119
2124
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
2120
2125
  detail: {
2121
2126
  expanded: this.showing,
2127
+ eventType: eventType || "unknown",
2122
2128
  },
2123
2129
  composed: true
2124
2130
  });
@@ -2128,7 +2134,7 @@ class AuroFloatingUI {
2128
2134
 
2129
2135
  handleClick() {
2130
2136
  if (this.element.isPopoverVisible) {
2131
- this.hideBib();
2137
+ this.hideBib("click");
2132
2138
  } else {
2133
2139
  this.showBib();
2134
2140
  }
@@ -2164,7 +2170,7 @@ class AuroFloatingUI {
2164
2170
  break;
2165
2171
  case 'mouseleave':
2166
2172
  if (this.element.hoverToggle) {
2167
- this.hideBib();
2173
+ this.hideBib("mouseleave");
2168
2174
  }
2169
2175
  break;
2170
2176
  case 'focus':
@@ -3996,6 +4002,11 @@ class AuroDropdown extends AuroElement {
3996
4002
  }
3997
4003
  }
3998
4004
 
4005
+ /**
4006
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
4007
+ * @private
4008
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
4009
+ */
3999
4010
  handleDropdownToggle(event) {
4000
4011
  this.updateFocusTrap();
4001
4012
  this.isPopoverVisible = event.detail.expanded;