@aurodesignsystem/auro-library 5.2.3 → 5.3.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.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/scripts/runtime/floatingUI.mjs +14 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Semantic Release Automated Changelog
|
|
2
2
|
|
|
3
|
+
# [5.3.0](https://github.com/AlaskaAirlines/auro-library/compare/v5.2.3...v5.3.0) (2025-07-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add event type to auroDropdown-toggled for keyboard detection ([d7ec5b7](https://github.com/AlaskaAirlines/auro-library/commit/d7ec5b755cee75d0371bf3202d5a382ce20cd47c))
|
|
9
|
+
|
|
3
10
|
## [5.2.3](https://github.com/AlaskaAirlines/auro-library/compare/v5.2.2...v5.2.3) (2025-07-02)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
|
@@ -313,7 +313,7 @@ export default class AuroFloatingUI {
|
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
this.hideBib();
|
|
316
|
+
this.hideBib("keydown");
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
setupHideHandlers() {
|
|
@@ -338,7 +338,7 @@ export default class AuroFloatingUI {
|
|
|
338
338
|
document.expandedAuroFormkitDropdown = null;
|
|
339
339
|
document.expandedAuroFloater = this;
|
|
340
340
|
} else {
|
|
341
|
-
this.hideBib();
|
|
341
|
+
this.hideBib("click");
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
};
|
|
@@ -351,7 +351,7 @@ export default class AuroFloatingUI {
|
|
|
351
351
|
// if something else is open, let it handle itself
|
|
352
352
|
return;
|
|
353
353
|
}
|
|
354
|
-
this.hideBib();
|
|
354
|
+
this.hideBib("keydown");
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
357
|
|
|
@@ -434,7 +434,11 @@ export default class AuroFloatingUI {
|
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
-
|
|
437
|
+
/**
|
|
438
|
+
* Hides the floating UI element.
|
|
439
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
440
|
+
*/
|
|
441
|
+
hideBib(eventType = "unknown") {
|
|
438
442
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
439
443
|
this.lockScroll(false);
|
|
440
444
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -445,7 +449,7 @@ export default class AuroFloatingUI {
|
|
|
445
449
|
if (this.showing) {
|
|
446
450
|
this.cleanupHideHandlers();
|
|
447
451
|
this.showing = false;
|
|
448
|
-
this.dispatchEventDropdownToggle();
|
|
452
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
449
453
|
}
|
|
450
454
|
}
|
|
451
455
|
document.expandedAuroFloater = null;
|
|
@@ -454,11 +458,13 @@ export default class AuroFloatingUI {
|
|
|
454
458
|
/**
|
|
455
459
|
* @private
|
|
456
460
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
461
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
457
462
|
*/
|
|
458
|
-
dispatchEventDropdownToggle() {
|
|
463
|
+
dispatchEventDropdownToggle(eventType) {
|
|
459
464
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
460
465
|
detail: {
|
|
461
466
|
expanded: this.showing,
|
|
467
|
+
eventType: eventType || "unknown",
|
|
462
468
|
},
|
|
463
469
|
composed: true
|
|
464
470
|
});
|
|
@@ -468,7 +474,7 @@ export default class AuroFloatingUI {
|
|
|
468
474
|
|
|
469
475
|
handleClick() {
|
|
470
476
|
if (this.element.isPopoverVisible) {
|
|
471
|
-
this.hideBib();
|
|
477
|
+
this.hideBib("click");
|
|
472
478
|
} else {
|
|
473
479
|
this.showBib();
|
|
474
480
|
}
|
|
@@ -504,7 +510,7 @@ export default class AuroFloatingUI {
|
|
|
504
510
|
break;
|
|
505
511
|
case 'mouseleave':
|
|
506
512
|
if (this.element.hoverToggle) {
|
|
507
|
-
this.hideBib();
|
|
513
|
+
this.hideBib("mouseleave");
|
|
508
514
|
}
|
|
509
515
|
break;
|
|
510
516
|
case 'focus':
|