@aurodesignsystem-dev/auro-formkit 0.0.0-pr785.1 → 0.0.0-pr785.2
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.
- package/components/combobox/demo/api.min.js +14 -8
- package/components/combobox/demo/index.min.js +14 -8
- package/components/combobox/dist/index.js +14 -8
- package/components/combobox/dist/registered.js +14 -8
- package/components/counter/demo/api.min.js +14 -8
- package/components/counter/demo/index.min.js +14 -8
- package/components/counter/dist/index.js +14 -8
- package/components/counter/dist/registered.js +14 -8
- package/components/datepicker/demo/api.min.js +14 -8
- package/components/datepicker/demo/index.min.js +14 -8
- package/components/datepicker/dist/index.js +14 -8
- package/components/datepicker/dist/registered.js +14 -8
- package/components/dropdown/demo/api.min.js +14 -8
- package/components/dropdown/demo/index.min.js +14 -8
- package/components/dropdown/dist/index.js +14 -8
- package/components/dropdown/dist/registered.js +14 -8
- package/components/select/demo/api.min.js +14 -8
- package/components/select/demo/index.min.js +14 -8
- package/components/select/dist/index.js +14 -8
- package/components/select/dist/registered.js +14 -8
- package/package.json +2 -2
|
@@ -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
|
-
|
|
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':
|
|
@@ -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
|
-
|
|
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':
|
|
@@ -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
|
-
|
|
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':
|
|
@@ -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
|
-
|
|
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':
|
|
@@ -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
|
-
|
|
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':
|
|
@@ -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
|
-
|
|
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':
|
|
@@ -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
|
-
|
|
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':
|
|
@@ -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
|
-
|
|
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':
|