@aurodesignsystem-dev/auro-formkit 0.0.0-pr1424.2 → 0.0.0-pr1424.4
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 +2 -2
- package/README.md +133 -183
- package/components/checkbox/demo/api.min.js +3 -3
- package/components/checkbox/demo/index.min.js +3 -3
- package/components/checkbox/dist/index.js +3 -3
- package/components/checkbox/dist/registered.js +3 -3
- package/components/combobox/demo/api.html +1 -0
- package/components/combobox/demo/api.js +3 -1
- package/components/combobox/demo/api.md +75 -0
- package/components/combobox/demo/api.min.js +314 -172
- package/components/combobox/demo/index.min.js +301 -171
- package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +1 -1
- package/components/combobox/dist/index.js +291 -171
- package/components/combobox/dist/registered.js +291 -171
- package/components/counter/demo/api.html +3 -0
- package/components/counter/demo/api.js +4 -0
- package/components/counter/demo/api.md +130 -0
- package/components/counter/demo/api.min.js +320 -167
- package/components/counter/demo/index.min.js +300 -167
- package/components/counter/dist/counterGroupKeyboardStrategy.d.ts +3 -0
- package/components/counter/dist/index.js +300 -167
- package/components/counter/dist/registered.js +300 -167
- package/components/datepicker/demo/api.html +1 -0
- package/components/datepicker/demo/api.js +2 -0
- package/components/datepicker/demo/api.md +57 -0
- package/components/datepicker/demo/api.min.js +376 -171
- package/components/datepicker/demo/index.min.js +364 -171
- package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +3 -1
- package/components/datepicker/dist/index.js +364 -171
- package/components/datepicker/dist/registered.js +364 -171
- package/components/dropdown/demo/api.html +1 -0
- package/components/dropdown/demo/api.js +2 -0
- package/components/dropdown/demo/api.md +95 -0
- package/components/dropdown/demo/api.min.js +296 -165
- package/components/dropdown/demo/index.min.js +276 -165
- package/components/dropdown/dist/index.js +276 -165
- package/components/dropdown/dist/registered.js +276 -165
- package/components/form/demo/api.min.js +1254 -684
- package/components/form/demo/index.min.js +1254 -684
- package/components/input/demo/api.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/api.md +1 -0
- package/components/menu/demo/api.min.js +10 -0
- package/components/menu/demo/index.min.js +10 -0
- package/components/menu/dist/auro-menuoption.d.ts +9 -0
- package/components/menu/dist/index.js +10 -0
- package/components/menu/dist/registered.js +10 -0
- package/components/radio/demo/api.min.js +2 -2
- package/components/radio/demo/index.min.js +2 -2
- package/components/radio/dist/index.js +2 -2
- package/components/radio/dist/registered.js +2 -2
- package/components/select/demo/api.html +1 -0
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +76 -0
- package/components/select/demo/api.min.js +306 -169
- package/components/select/demo/index.min.js +293 -169
- package/components/select/dist/index.js +283 -169
- package/components/select/dist/registered.js +283 -169
- package/custom-elements.json +48 -3
- package/package.json +5 -3
|
@@ -51,6 +51,18 @@ function inDialogExample() {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
function inDrawerExample() {
|
|
55
|
+
document.querySelector("#select-drawer-opener").addEventListener("click", () => {
|
|
56
|
+
const drawer = document.querySelector("#select-drawer");
|
|
57
|
+
|
|
58
|
+
if (drawer.hasAttribute('open')) {
|
|
59
|
+
drawer.removeAttribute('open');
|
|
60
|
+
} else {
|
|
61
|
+
drawer.setAttribute('open', true);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
54
66
|
function resetStateExample() {
|
|
55
67
|
const elem = document.querySelector('#resetStateExample');
|
|
56
68
|
|
|
@@ -1405,6 +1417,10 @@ const selectKeyboardStrategy = {
|
|
|
1405
1417
|
if (!ctx.isExpanded) {
|
|
1406
1418
|
return;
|
|
1407
1419
|
}
|
|
1420
|
+
|
|
1421
|
+
// Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups
|
|
1422
|
+
evt.stopPropagation();
|
|
1423
|
+
|
|
1408
1424
|
component.dropdown.hide();
|
|
1409
1425
|
},
|
|
1410
1426
|
|
|
@@ -3367,11 +3383,19 @@ class AuroFloatingUI {
|
|
|
3367
3383
|
* This ensures that the bib content has the same dimensions as the sizer element.
|
|
3368
3384
|
*/
|
|
3369
3385
|
mirrorSize() {
|
|
3386
|
+
const element = this.element;
|
|
3387
|
+
if (!element) {
|
|
3388
|
+
return;
|
|
3389
|
+
}
|
|
3390
|
+
|
|
3370
3391
|
// mirror the boxsize from bibSizer
|
|
3371
|
-
if (
|
|
3372
|
-
const sizerStyle = window.getComputedStyle(
|
|
3373
|
-
const bibContent =
|
|
3374
|
-
|
|
3392
|
+
if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
|
|
3393
|
+
const sizerStyle = window.getComputedStyle(element.bibSizer);
|
|
3394
|
+
const bibContent = element.bib.shadowRoot.querySelector(".container");
|
|
3395
|
+
if (!bibContent) {
|
|
3396
|
+
return;
|
|
3397
|
+
}
|
|
3398
|
+
|
|
3375
3399
|
if (sizerStyle.width !== "0px") {
|
|
3376
3400
|
bibContent.style.width = sizerStyle.width;
|
|
3377
3401
|
}
|
|
@@ -3393,9 +3417,14 @@ class AuroFloatingUI {
|
|
|
3393
3417
|
* @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
|
|
3394
3418
|
*/
|
|
3395
3419
|
getPositioningStrategy() {
|
|
3420
|
+
const element = this.element;
|
|
3421
|
+
if (!element) {
|
|
3422
|
+
return "floating";
|
|
3423
|
+
}
|
|
3424
|
+
|
|
3396
3425
|
const breakpoint =
|
|
3397
|
-
|
|
3398
|
-
|
|
3426
|
+
element.bib?.mobileFullscreenBreakpoint ||
|
|
3427
|
+
element.floaterConfig?.fullscreenBreakpoint;
|
|
3399
3428
|
switch (this.behavior) {
|
|
3400
3429
|
case "tooltip":
|
|
3401
3430
|
return "floating";
|
|
@@ -3406,9 +3435,9 @@ class AuroFloatingUI {
|
|
|
3406
3435
|
`(max-width: ${breakpoint})`,
|
|
3407
3436
|
).matches;
|
|
3408
3437
|
|
|
3409
|
-
|
|
3438
|
+
element.expanded = smallerThanBreakpoint;
|
|
3410
3439
|
}
|
|
3411
|
-
if (
|
|
3440
|
+
if (element.nested) {
|
|
3412
3441
|
return "cover";
|
|
3413
3442
|
}
|
|
3414
3443
|
return "fullscreen";
|
|
@@ -3438,42 +3467,65 @@ class AuroFloatingUI {
|
|
|
3438
3467
|
* and applies the calculated position to the bib's style.
|
|
3439
3468
|
*/
|
|
3440
3469
|
position() {
|
|
3470
|
+
const element = this.element;
|
|
3471
|
+
if (!element) {
|
|
3472
|
+
return;
|
|
3473
|
+
}
|
|
3474
|
+
|
|
3441
3475
|
const strategy = this.getPositioningStrategy();
|
|
3442
3476
|
this.configureBibStrategy(strategy);
|
|
3443
3477
|
|
|
3444
3478
|
if (strategy === "floating") {
|
|
3479
|
+
if (!element.trigger || !element.bib) {
|
|
3480
|
+
return;
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3445
3483
|
this.mirrorSize();
|
|
3446
3484
|
// Define the middlware for the floater configuration
|
|
3447
3485
|
const middleware = [
|
|
3448
|
-
offset(
|
|
3449
|
-
...(
|
|
3450
|
-
...(
|
|
3451
|
-
...(
|
|
3486
|
+
offset(element.floaterConfig?.offset || 0),
|
|
3487
|
+
...(element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
|
|
3488
|
+
...(element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
|
|
3489
|
+
...(element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
|
|
3452
3490
|
];
|
|
3453
3491
|
|
|
3454
3492
|
// Compute the position of the bib
|
|
3455
|
-
computePosition(
|
|
3456
|
-
strategy:
|
|
3457
|
-
placement:
|
|
3493
|
+
computePosition(element.trigger, element.bib, {
|
|
3494
|
+
strategy: element.floaterConfig?.strategy || "fixed",
|
|
3495
|
+
placement: element.floaterConfig?.placement,
|
|
3458
3496
|
middleware: middleware || [],
|
|
3459
3497
|
}).then(({ x, y }) => {
|
|
3460
3498
|
// eslint-disable-line id-length
|
|
3461
|
-
|
|
3499
|
+
const currentElement = this.element;
|
|
3500
|
+
if (!currentElement?.bib) {
|
|
3501
|
+
return;
|
|
3502
|
+
}
|
|
3503
|
+
|
|
3504
|
+
Object.assign(currentElement.bib.style, {
|
|
3462
3505
|
left: `${x}px`,
|
|
3463
3506
|
top: `${y}px`,
|
|
3464
3507
|
});
|
|
3465
3508
|
});
|
|
3466
3509
|
} else if (strategy === "cover") {
|
|
3510
|
+
if (!element.parentNode || !element.bib) {
|
|
3511
|
+
return;
|
|
3512
|
+
}
|
|
3513
|
+
|
|
3467
3514
|
// Compute the position of the bib
|
|
3468
|
-
computePosition(
|
|
3515
|
+
computePosition(element.parentNode, element.bib, {
|
|
3469
3516
|
placement: "bottom-start",
|
|
3470
3517
|
}).then(({ x, y }) => {
|
|
3471
3518
|
// eslint-disable-line id-length
|
|
3472
|
-
|
|
3519
|
+
const currentElement = this.element;
|
|
3520
|
+
if (!currentElement?.bib || !currentElement.parentNode) {
|
|
3521
|
+
return;
|
|
3522
|
+
}
|
|
3523
|
+
|
|
3524
|
+
Object.assign(currentElement.bib.style, {
|
|
3473
3525
|
left: `${x}px`,
|
|
3474
|
-
top: `${y -
|
|
3475
|
-
width: `${
|
|
3476
|
-
height: `${
|
|
3526
|
+
top: `${y - currentElement.parentNode.offsetHeight}px`,
|
|
3527
|
+
width: `${currentElement.parentNode.offsetWidth}px`,
|
|
3528
|
+
height: `${currentElement.parentNode.offsetHeight}px`,
|
|
3477
3529
|
});
|
|
3478
3530
|
});
|
|
3479
3531
|
}
|
|
@@ -3485,11 +3537,17 @@ class AuroFloatingUI {
|
|
|
3485
3537
|
* @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
|
|
3486
3538
|
*/
|
|
3487
3539
|
lockScroll(lock = true) {
|
|
3540
|
+
const element = this.element;
|
|
3541
|
+
|
|
3488
3542
|
if (lock) {
|
|
3543
|
+
if (!element?.bib) {
|
|
3544
|
+
return;
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3489
3547
|
document.body.style.overflow = "hidden"; // hide body's scrollbar
|
|
3490
3548
|
|
|
3491
3549
|
// Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
|
|
3492
|
-
|
|
3550
|
+
element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
|
|
3493
3551
|
} else {
|
|
3494
3552
|
document.body.style.overflow = "";
|
|
3495
3553
|
}
|
|
@@ -3505,20 +3563,24 @@ class AuroFloatingUI {
|
|
|
3505
3563
|
* @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
|
|
3506
3564
|
*/
|
|
3507
3565
|
configureBibStrategy(value) {
|
|
3566
|
+
const element = this.element;
|
|
3567
|
+
if (!element?.bib) {
|
|
3568
|
+
return;
|
|
3569
|
+
}
|
|
3570
|
+
|
|
3508
3571
|
if (value === "fullscreen") {
|
|
3509
|
-
|
|
3572
|
+
element.isBibFullscreen = true;
|
|
3510
3573
|
// reset the prev position
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3574
|
+
element.bib.setAttribute("isfullscreen", "");
|
|
3575
|
+
element.bib.style.position = "fixed";
|
|
3576
|
+
element.bib.style.top = "0px";
|
|
3577
|
+
element.bib.style.left = "0px";
|
|
3578
|
+
element.bib.style.width = "";
|
|
3579
|
+
element.bib.style.height = "";
|
|
3580
|
+
element.style.contain = "";
|
|
3518
3581
|
|
|
3519
3582
|
// reset the size that was mirroring `size` css-part
|
|
3520
|
-
const bibContent =
|
|
3521
|
-
this.element.bib.shadowRoot.querySelector(".container");
|
|
3583
|
+
const bibContent = element.bib.shadowRoot?.querySelector(".container");
|
|
3522
3584
|
if (bibContent) {
|
|
3523
3585
|
bibContent.style.width = "";
|
|
3524
3586
|
bibContent.style.height = "";
|
|
@@ -3533,14 +3595,14 @@ class AuroFloatingUI {
|
|
|
3533
3595
|
}, 0);
|
|
3534
3596
|
}
|
|
3535
3597
|
|
|
3536
|
-
if (
|
|
3598
|
+
if (element.isPopoverVisible) {
|
|
3537
3599
|
this.lockScroll(true);
|
|
3538
3600
|
}
|
|
3539
3601
|
} else {
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3602
|
+
element.bib.style.position = "";
|
|
3603
|
+
element.bib.removeAttribute("isfullscreen");
|
|
3604
|
+
element.isBibFullscreen = false;
|
|
3605
|
+
element.style.contain = "layout";
|
|
3544
3606
|
}
|
|
3545
3607
|
|
|
3546
3608
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -3558,16 +3620,21 @@ class AuroFloatingUI {
|
|
|
3558
3620
|
},
|
|
3559
3621
|
);
|
|
3560
3622
|
|
|
3561
|
-
|
|
3623
|
+
element.dispatchEvent(event);
|
|
3562
3624
|
}
|
|
3563
3625
|
}
|
|
3564
3626
|
|
|
3565
3627
|
updateState() {
|
|
3566
|
-
const
|
|
3628
|
+
const element = this.element;
|
|
3629
|
+
if (!element) {
|
|
3630
|
+
return;
|
|
3631
|
+
}
|
|
3632
|
+
|
|
3633
|
+
const isVisible = element.isPopoverVisible;
|
|
3567
3634
|
if (!isVisible) {
|
|
3568
3635
|
this.cleanupHideHandlers();
|
|
3569
3636
|
try {
|
|
3570
|
-
|
|
3637
|
+
element.cleanup?.();
|
|
3571
3638
|
} catch (error) {
|
|
3572
3639
|
// Do nothing
|
|
3573
3640
|
}
|
|
@@ -3583,28 +3650,30 @@ class AuroFloatingUI {
|
|
|
3583
3650
|
* If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
|
|
3584
3651
|
*/
|
|
3585
3652
|
handleFocusLoss() {
|
|
3653
|
+
const element = this.element;
|
|
3654
|
+
if (!element?.bib) {
|
|
3655
|
+
return;
|
|
3656
|
+
}
|
|
3657
|
+
|
|
3586
3658
|
// if mouse is being pressed, skip and let click event to handle the action
|
|
3587
3659
|
if (AuroFloatingUI.isMousePressed) {
|
|
3588
3660
|
return;
|
|
3589
3661
|
}
|
|
3590
3662
|
|
|
3591
3663
|
if (
|
|
3592
|
-
|
|
3593
|
-
|
|
3664
|
+
element.noHideOnThisFocusLoss ||
|
|
3665
|
+
element.hasAttribute("noHideOnThisFocusLoss")
|
|
3594
3666
|
) {
|
|
3595
3667
|
return;
|
|
3596
3668
|
}
|
|
3597
3669
|
|
|
3598
3670
|
// if focus is still inside of trigger or bib, do not close
|
|
3599
|
-
if (
|
|
3600
|
-
this.element.matches(":focus") ||
|
|
3601
|
-
this.element.matches(":focus-within")
|
|
3602
|
-
) {
|
|
3671
|
+
if (element.matches(":focus") || element.matches(":focus-within")) {
|
|
3603
3672
|
return;
|
|
3604
3673
|
}
|
|
3605
3674
|
|
|
3606
3675
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
3607
|
-
if (
|
|
3676
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
3608
3677
|
return;
|
|
3609
3678
|
}
|
|
3610
3679
|
|
|
@@ -3612,23 +3681,33 @@ class AuroFloatingUI {
|
|
|
3612
3681
|
}
|
|
3613
3682
|
|
|
3614
3683
|
setupHideHandlers() {
|
|
3684
|
+
const element = this.element;
|
|
3685
|
+
if (!element) {
|
|
3686
|
+
return;
|
|
3687
|
+
}
|
|
3688
|
+
|
|
3615
3689
|
// Define handlers & store references
|
|
3616
3690
|
this.focusHandler = () => this.handleFocusLoss();
|
|
3617
3691
|
|
|
3618
3692
|
this.clickHandler = (evt) => {
|
|
3693
|
+
const element = this.element;
|
|
3694
|
+
if (!element?.bib) {
|
|
3695
|
+
return;
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3619
3698
|
// When the bib is fullscreen (modal dialog), don't close on outside
|
|
3620
3699
|
// clicks. VoiceOver's synthetic click events inside a top-layer modal
|
|
3621
3700
|
// <dialog> may not include the bib in composedPath(), causing false
|
|
3622
3701
|
// positives. This mirrors the fullscreen guard in handleFocusLoss().
|
|
3623
|
-
if (
|
|
3702
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
3624
3703
|
return;
|
|
3625
3704
|
}
|
|
3626
3705
|
|
|
3627
3706
|
if (
|
|
3628
|
-
(!evt.composedPath().includes(
|
|
3629
|
-
!evt.composedPath().includes(
|
|
3630
|
-
(
|
|
3631
|
-
evt.composedPath().includes(
|
|
3707
|
+
(!evt.composedPath().includes(element.trigger) &&
|
|
3708
|
+
!evt.composedPath().includes(element.bib)) ||
|
|
3709
|
+
(element.bib.backdrop &&
|
|
3710
|
+
evt.composedPath().includes(element.bib.backdrop))
|
|
3632
3711
|
) {
|
|
3633
3712
|
const existedVisibleFloatingUI =
|
|
3634
3713
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -3649,7 +3728,12 @@ class AuroFloatingUI {
|
|
|
3649
3728
|
|
|
3650
3729
|
// ESC key handler
|
|
3651
3730
|
this.keyDownHandler = (evt) => {
|
|
3652
|
-
|
|
3731
|
+
const element = this.element;
|
|
3732
|
+
if (!element) {
|
|
3733
|
+
return;
|
|
3734
|
+
}
|
|
3735
|
+
|
|
3736
|
+
if (evt.key === "Escape" && element.isPopoverVisible) {
|
|
3653
3737
|
const existedVisibleFloatingUI =
|
|
3654
3738
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
3655
3739
|
if (
|
|
@@ -3706,6 +3790,10 @@ class AuroFloatingUI {
|
|
|
3706
3790
|
}
|
|
3707
3791
|
|
|
3708
3792
|
updateCurrentExpandedDropdown() {
|
|
3793
|
+
if (!this.element) {
|
|
3794
|
+
return;
|
|
3795
|
+
}
|
|
3796
|
+
|
|
3709
3797
|
// Close any other dropdown that is already open
|
|
3710
3798
|
const existedVisibleFloatingUI =
|
|
3711
3799
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -3722,25 +3810,34 @@ class AuroFloatingUI {
|
|
|
3722
3810
|
}
|
|
3723
3811
|
|
|
3724
3812
|
showBib() {
|
|
3725
|
-
|
|
3813
|
+
const element = this.element;
|
|
3814
|
+
if (!element) {
|
|
3815
|
+
return;
|
|
3816
|
+
}
|
|
3817
|
+
|
|
3818
|
+
if (!element.bib || (!element.trigger && !element.parentNode)) {
|
|
3819
|
+
return;
|
|
3820
|
+
}
|
|
3821
|
+
|
|
3822
|
+
if (!element.disabled && !this.showing) {
|
|
3726
3823
|
this.updateCurrentExpandedDropdown();
|
|
3727
|
-
|
|
3824
|
+
element.triggerChevron?.setAttribute("data-expanded", true);
|
|
3728
3825
|
|
|
3729
3826
|
// prevent double showing: isPopovervisible gets first and showBib gets called later
|
|
3730
3827
|
if (!this.showing) {
|
|
3731
|
-
if (!
|
|
3828
|
+
if (!element.modal) {
|
|
3732
3829
|
this.setupHideHandlers();
|
|
3733
3830
|
}
|
|
3734
3831
|
this.showing = true;
|
|
3735
|
-
|
|
3832
|
+
element.isPopoverVisible = true;
|
|
3736
3833
|
this.position();
|
|
3737
3834
|
this.dispatchEventDropdownToggle();
|
|
3738
3835
|
}
|
|
3739
3836
|
|
|
3740
3837
|
// Setup auto update to handle resize and scroll
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3838
|
+
element.cleanup = autoUpdate(
|
|
3839
|
+
element.trigger || element.parentNode,
|
|
3840
|
+
element.bib,
|
|
3744
3841
|
() => {
|
|
3745
3842
|
this.position();
|
|
3746
3843
|
},
|
|
@@ -3753,22 +3850,27 @@ class AuroFloatingUI {
|
|
|
3753
3850
|
* @param {String} eventType - The event type that triggered the hiding action.
|
|
3754
3851
|
*/
|
|
3755
3852
|
hideBib(eventType = "unknown") {
|
|
3756
|
-
|
|
3853
|
+
const element = this.element;
|
|
3854
|
+
if (!element) {
|
|
3855
|
+
return;
|
|
3856
|
+
}
|
|
3857
|
+
|
|
3858
|
+
if (element.disabled) {
|
|
3757
3859
|
return;
|
|
3758
3860
|
}
|
|
3759
3861
|
|
|
3760
3862
|
// noToggle dropdowns should not close when the trigger is clicked (the
|
|
3761
3863
|
// "toggle" behavior), but they CAN still close via other interactions like
|
|
3762
3864
|
// Escape key or focus loss.
|
|
3763
|
-
if (
|
|
3865
|
+
if (element.noToggle && eventType === "click") {
|
|
3764
3866
|
return;
|
|
3765
3867
|
}
|
|
3766
3868
|
|
|
3767
3869
|
this.lockScroll(false);
|
|
3768
|
-
|
|
3870
|
+
element.triggerChevron?.removeAttribute("data-expanded");
|
|
3769
3871
|
|
|
3770
|
-
if (
|
|
3771
|
-
|
|
3872
|
+
if (element.isPopoverVisible) {
|
|
3873
|
+
element.isPopoverVisible = false;
|
|
3772
3874
|
}
|
|
3773
3875
|
if (this.showing) {
|
|
3774
3876
|
this.cleanupHideHandlers();
|
|
@@ -3788,6 +3890,11 @@ class AuroFloatingUI {
|
|
|
3788
3890
|
* @param {String} eventType - The event type that triggered the toggle action.
|
|
3789
3891
|
*/
|
|
3790
3892
|
dispatchEventDropdownToggle(eventType) {
|
|
3893
|
+
const element = this.element;
|
|
3894
|
+
if (!element) {
|
|
3895
|
+
return;
|
|
3896
|
+
}
|
|
3897
|
+
|
|
3791
3898
|
const event = new CustomEvent(
|
|
3792
3899
|
this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
|
|
3793
3900
|
{
|
|
@@ -3799,11 +3906,16 @@ class AuroFloatingUI {
|
|
|
3799
3906
|
},
|
|
3800
3907
|
);
|
|
3801
3908
|
|
|
3802
|
-
|
|
3909
|
+
element.dispatchEvent(event);
|
|
3803
3910
|
}
|
|
3804
3911
|
|
|
3805
3912
|
handleClick() {
|
|
3806
|
-
|
|
3913
|
+
const element = this.element;
|
|
3914
|
+
if (!element) {
|
|
3915
|
+
return;
|
|
3916
|
+
}
|
|
3917
|
+
|
|
3918
|
+
if (element.isPopoverVisible) {
|
|
3807
3919
|
this.hideBib("click");
|
|
3808
3920
|
} else {
|
|
3809
3921
|
this.showBib();
|
|
@@ -3814,63 +3926,66 @@ class AuroFloatingUI {
|
|
|
3814
3926
|
{
|
|
3815
3927
|
composed: true,
|
|
3816
3928
|
detail: {
|
|
3817
|
-
expanded:
|
|
3929
|
+
expanded: element.isPopoverVisible,
|
|
3818
3930
|
},
|
|
3819
3931
|
},
|
|
3820
3932
|
);
|
|
3821
3933
|
|
|
3822
|
-
|
|
3934
|
+
element.dispatchEvent(event);
|
|
3823
3935
|
}
|
|
3824
3936
|
|
|
3825
3937
|
handleEvent(event) {
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
case "mouseenter":
|
|
3843
|
-
if (this.element.hoverToggle) {
|
|
3844
|
-
this.showBib();
|
|
3845
|
-
}
|
|
3846
|
-
break;
|
|
3847
|
-
case "mouseleave":
|
|
3848
|
-
if (this.element.hoverToggle) {
|
|
3849
|
-
this.hideBib("mouseleave");
|
|
3850
|
-
}
|
|
3851
|
-
break;
|
|
3852
|
-
case "focus":
|
|
3853
|
-
if (this.element.focusShow) {
|
|
3854
|
-
/*
|
|
3855
|
-
This needs to better handle clicking that gives focus -
|
|
3856
|
-
currently it shows and then immediately hides the bib
|
|
3857
|
-
*/
|
|
3858
|
-
this.showBib();
|
|
3859
|
-
}
|
|
3860
|
-
break;
|
|
3861
|
-
case "blur":
|
|
3862
|
-
// send this task 100ms later queue to
|
|
3863
|
-
// wait a frame in case focus moves within the floating element/bib
|
|
3864
|
-
setTimeout(() => this.handleFocusLoss(), 0);
|
|
3865
|
-
break;
|
|
3866
|
-
case "click":
|
|
3867
|
-
if (document.activeElement === document.body) {
|
|
3868
|
-
event.currentTarget.focus();
|
|
3869
|
-
}
|
|
3938
|
+
const element = this.element;
|
|
3939
|
+
if (!element || element.disableEventShow) {
|
|
3940
|
+
return;
|
|
3941
|
+
}
|
|
3942
|
+
|
|
3943
|
+
switch (event.type) {
|
|
3944
|
+
case "keydown": {
|
|
3945
|
+
// Support both Enter and Space keys for accessibility
|
|
3946
|
+
// Space is included as it's expected behavior for interactive elements
|
|
3947
|
+
|
|
3948
|
+
const origin = event.composedPath()[0];
|
|
3949
|
+
if (
|
|
3950
|
+
event.key === "Enter" ||
|
|
3951
|
+
(event.key === " " && (!origin || origin.tagName !== "INPUT"))
|
|
3952
|
+
) {
|
|
3953
|
+
event.preventDefault();
|
|
3870
3954
|
this.handleClick();
|
|
3871
|
-
|
|
3872
|
-
|
|
3955
|
+
}
|
|
3956
|
+
break;
|
|
3873
3957
|
}
|
|
3958
|
+
case "mouseenter":
|
|
3959
|
+
if (element.hoverToggle) {
|
|
3960
|
+
this.showBib();
|
|
3961
|
+
}
|
|
3962
|
+
break;
|
|
3963
|
+
case "mouseleave":
|
|
3964
|
+
if (element.hoverToggle) {
|
|
3965
|
+
this.hideBib("mouseleave");
|
|
3966
|
+
}
|
|
3967
|
+
break;
|
|
3968
|
+
case "focus":
|
|
3969
|
+
if (element.focusShow) {
|
|
3970
|
+
/*
|
|
3971
|
+
This needs to better handle clicking that gives focus -
|
|
3972
|
+
currently it shows and then immediately hides the bib
|
|
3973
|
+
*/
|
|
3974
|
+
this.showBib();
|
|
3975
|
+
}
|
|
3976
|
+
break;
|
|
3977
|
+
case "blur":
|
|
3978
|
+
// send this task 100ms later queue to
|
|
3979
|
+
// wait a frame in case focus moves within the floating element/bib
|
|
3980
|
+
setTimeout(() => this.handleFocusLoss(), 0);
|
|
3981
|
+
break;
|
|
3982
|
+
case "click":
|
|
3983
|
+
if (document.activeElement === document.body) {
|
|
3984
|
+
event.currentTarget.focus();
|
|
3985
|
+
}
|
|
3986
|
+
this.handleClick();
|
|
3987
|
+
break;
|
|
3988
|
+
// Do nothing
|
|
3874
3989
|
}
|
|
3875
3990
|
}
|
|
3876
3991
|
|
|
@@ -3881,6 +3996,11 @@ class AuroFloatingUI {
|
|
|
3881
3996
|
* This prevents the component itself from being focusable when the trigger element already handles focus.
|
|
3882
3997
|
*/
|
|
3883
3998
|
handleTriggerTabIndex() {
|
|
3999
|
+
const element = this.element;
|
|
4000
|
+
if (!element) {
|
|
4001
|
+
return;
|
|
4002
|
+
}
|
|
4003
|
+
|
|
3884
4004
|
const focusableElementSelectors = [
|
|
3885
4005
|
"a",
|
|
3886
4006
|
"button",
|
|
@@ -3893,7 +4013,7 @@ class AuroFloatingUI {
|
|
|
3893
4013
|
"auro-hyperlink",
|
|
3894
4014
|
];
|
|
3895
4015
|
|
|
3896
|
-
const triggerNode =
|
|
4016
|
+
const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
|
|
3897
4017
|
if (!triggerNode) {
|
|
3898
4018
|
return;
|
|
3899
4019
|
}
|
|
@@ -3902,13 +4022,13 @@ class AuroFloatingUI {
|
|
|
3902
4022
|
focusableElementSelectors.forEach((selector) => {
|
|
3903
4023
|
// Check if the trigger node element is focusable
|
|
3904
4024
|
if (triggerNodeTagName === selector) {
|
|
3905
|
-
|
|
4025
|
+
element.tabIndex = -1;
|
|
3906
4026
|
return;
|
|
3907
4027
|
}
|
|
3908
4028
|
|
|
3909
4029
|
// Check if any child is focusable
|
|
3910
4030
|
if (triggerNode.querySelector(selector)) {
|
|
3911
|
-
|
|
4031
|
+
element.tabIndex = -1;
|
|
3912
4032
|
}
|
|
3913
4033
|
});
|
|
3914
4034
|
}
|
|
@@ -3918,13 +4038,18 @@ class AuroFloatingUI {
|
|
|
3918
4038
|
* @param {*} eventPrefix
|
|
3919
4039
|
*/
|
|
3920
4040
|
regenerateBibId() {
|
|
3921
|
-
|
|
4041
|
+
const element = this.element;
|
|
4042
|
+
if (!element) {
|
|
4043
|
+
return;
|
|
4044
|
+
}
|
|
4045
|
+
|
|
4046
|
+
this.id = element.getAttribute("id");
|
|
3922
4047
|
if (!this.id) {
|
|
3923
4048
|
this.id = window.crypto.randomUUID();
|
|
3924
|
-
|
|
4049
|
+
element.setAttribute("id", this.id);
|
|
3925
4050
|
}
|
|
3926
4051
|
|
|
3927
|
-
|
|
4052
|
+
element.bib?.setAttribute("id", `${this.id}-floater-bib`);
|
|
3928
4053
|
}
|
|
3929
4054
|
|
|
3930
4055
|
configure(elem, eventPrefix, enableKeyboardHandling = true) {
|
|
@@ -3936,67 +4061,69 @@ class AuroFloatingUI {
|
|
|
3936
4061
|
this.element = elem;
|
|
3937
4062
|
}
|
|
3938
4063
|
|
|
3939
|
-
|
|
3940
|
-
|
|
4064
|
+
const element = this.element;
|
|
4065
|
+
if (!element) {
|
|
4066
|
+
return;
|
|
4067
|
+
}
|
|
4068
|
+
|
|
4069
|
+
if (this.behavior !== element.behavior) {
|
|
4070
|
+
this.behavior = element.behavior;
|
|
3941
4071
|
}
|
|
3942
4072
|
|
|
3943
|
-
if (
|
|
4073
|
+
if (element.trigger) {
|
|
3944
4074
|
this.disconnect();
|
|
3945
4075
|
}
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
this.element.shadowRoot.querySelector("#showStateIcon");
|
|
4076
|
+
element.trigger =
|
|
4077
|
+
element.triggerElement ||
|
|
4078
|
+
element.shadowRoot?.querySelector("#trigger") ||
|
|
4079
|
+
element.trigger;
|
|
4080
|
+
element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
|
|
4081
|
+
element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
|
|
4082
|
+
element.triggerChevron =
|
|
4083
|
+
element.shadowRoot?.querySelector("#showStateIcon");
|
|
3955
4084
|
|
|
3956
|
-
if (
|
|
3957
|
-
|
|
4085
|
+
if (element.floaterConfig) {
|
|
4086
|
+
element.hoverToggle = element.floaterConfig.hoverToggle;
|
|
3958
4087
|
}
|
|
3959
4088
|
|
|
3960
4089
|
this.regenerateBibId();
|
|
3961
4090
|
this.handleTriggerTabIndex();
|
|
3962
4091
|
|
|
3963
4092
|
this.handleEvent = this.handleEvent.bind(this);
|
|
3964
|
-
if (
|
|
4093
|
+
if (element.trigger) {
|
|
3965
4094
|
if (this.enableKeyboardHandling) {
|
|
3966
|
-
|
|
4095
|
+
element.trigger.addEventListener("keydown", this.handleEvent);
|
|
3967
4096
|
}
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
4097
|
+
element.trigger.addEventListener("click", this.handleEvent);
|
|
4098
|
+
element.trigger.addEventListener("mouseenter", this.handleEvent);
|
|
4099
|
+
element.trigger.addEventListener("mouseleave", this.handleEvent);
|
|
4100
|
+
element.trigger.addEventListener("focus", this.handleEvent);
|
|
4101
|
+
element.trigger.addEventListener("blur", this.handleEvent);
|
|
3973
4102
|
}
|
|
3974
4103
|
}
|
|
3975
4104
|
|
|
3976
4105
|
disconnect() {
|
|
3977
4106
|
this.cleanupHideHandlers();
|
|
3978
|
-
if (this.element) {
|
|
3979
|
-
this.element.cleanup?.();
|
|
3980
4107
|
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
4108
|
+
const element = this.element;
|
|
4109
|
+
if (!element) {
|
|
4110
|
+
return;
|
|
4111
|
+
}
|
|
3984
4112
|
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
}
|
|
4113
|
+
element.cleanup?.();
|
|
4114
|
+
|
|
4115
|
+
if (element.bib && element.shadowRoot) {
|
|
4116
|
+
element.shadowRoot.append(element.bib);
|
|
4117
|
+
}
|
|
4118
|
+
|
|
4119
|
+
// Remove event & keyboard listeners
|
|
4120
|
+
if (element.trigger) {
|
|
4121
|
+
element.trigger.removeEventListener("keydown", this.handleEvent);
|
|
4122
|
+
element.trigger.removeEventListener("click", this.handleEvent);
|
|
4123
|
+
element.trigger.removeEventListener("mouseenter", this.handleEvent);
|
|
4124
|
+
element.trigger.removeEventListener("mouseleave", this.handleEvent);
|
|
4125
|
+
element.trigger.removeEventListener("focus", this.handleEvent);
|
|
4126
|
+
element.trigger.removeEventListener("blur", this.handleEvent);
|
|
4000
4127
|
}
|
|
4001
4128
|
}
|
|
4002
4129
|
}
|
|
@@ -5124,7 +5251,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
5124
5251
|
}
|
|
5125
5252
|
};
|
|
5126
5253
|
|
|
5127
|
-
var formkitVersion$1 = '
|
|
5254
|
+
var formkitVersion$1 = '202604091759';
|
|
5128
5255
|
|
|
5129
5256
|
class AuroElement extends i$3 {
|
|
5130
5257
|
static get properties() {
|
|
@@ -5230,7 +5357,7 @@ class AuroElement extends i$3 {
|
|
|
5230
5357
|
}
|
|
5231
5358
|
}
|
|
5232
5359
|
|
|
5233
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
5360
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
5234
5361
|
// See LICENSE in the project root for license information.
|
|
5235
5362
|
|
|
5236
5363
|
|
|
@@ -6869,13 +6996,13 @@ class AuroHelpText extends i$3 {
|
|
|
6869
6996
|
}
|
|
6870
6997
|
}
|
|
6871
6998
|
|
|
6872
|
-
var formkitVersion = '
|
|
6999
|
+
var formkitVersion = '202604091759';
|
|
6873
7000
|
|
|
6874
7001
|
var styleCss$2 = i$6`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-outline-color: var(--ds-auro-select-outline-color)}:host{display:inline-block;text-align:left;vertical-align:top}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.mainContent{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-100, 0.5rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-200, 1rem)}:host([layout*=snowflake]) label{padding-block:var(--ds-size-25, 0.125rem)}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) .value{height:auto}label{color:var(--ds-auro-select-label-text-color)}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown],:host([appearance=inverse]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([fluid]){width:100%}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown],:host([disabled]:not([appearance=inverse])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown],:host(:not([layout*=classic])[disabled][appearance=inverse]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
|
|
6875
7002
|
|
|
6876
7003
|
var emphasizedColorCss = i$6`:host([layout=emphasized]) [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-dropdown-emphasized-background, rgba(0, 39, 74, 0.1019607843))}:host([layout=emphasized]) [auro-dropdown]:hover{--ds-auro-dropdown-trigger-hover-background-color: var(--ds-advanced-color-dropdown-emphasized-background, rgba(0, 39, 74, 0.1019607843))}:host([layout=emphasized]) [auro-dropdown][layout*=emphasized]::part(wrapper){--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-dropdown-emphasized-background, rgba(0, 39, 74, 0.1019607843))}`;
|
|
6877
7004
|
|
|
6878
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
7005
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
6879
7006
|
// See LICENSE in the project root for license information.
|
|
6880
7007
|
|
|
6881
7008
|
|
|
@@ -7670,6 +7797,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7670
7797
|
this.scrollActiveOptionIntoView();
|
|
7671
7798
|
}
|
|
7672
7799
|
});
|
|
7800
|
+
|
|
7673
7801
|
this.menu.addEventListener('auroMenu-selectedOption', (event) => {
|
|
7674
7802
|
|
|
7675
7803
|
// Update the displayed value
|
|
@@ -7683,6 +7811,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7683
7811
|
|
|
7684
7812
|
if (this.dropdown.isPopoverVisible && !this.multiSelect) {
|
|
7685
7813
|
this.dropdown.hide();
|
|
7814
|
+
this.dropdown.trigger.focus();
|
|
7686
7815
|
}
|
|
7687
7816
|
|
|
7688
7817
|
// Announce the selection after the dropdown closes so it isn't
|
|
@@ -7944,9 +8073,6 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7944
8073
|
if (!this.multiSelect) {
|
|
7945
8074
|
this.hideBib();
|
|
7946
8075
|
}
|
|
7947
|
-
if (this.dropdown && this.dropdown.trigger) {
|
|
7948
|
-
this.dropdown.trigger.focus();
|
|
7949
|
-
}
|
|
7950
8076
|
|
|
7951
8077
|
// LEGACY EVENT
|
|
7952
8078
|
this.dispatchEvent(new CustomEvent('auroSelect-valueSet', {
|
|
@@ -8551,6 +8677,7 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
8551
8677
|
this.selected = false;
|
|
8552
8678
|
this.noCheckmark = false;
|
|
8553
8679
|
this.disabled = false;
|
|
8680
|
+
this.noMatch = false;
|
|
8554
8681
|
|
|
8555
8682
|
/**
|
|
8556
8683
|
* @private
|
|
@@ -8626,6 +8753,15 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
8626
8753
|
reflect: true
|
|
8627
8754
|
},
|
|
8628
8755
|
|
|
8756
|
+
/**
|
|
8757
|
+
* When true, marks this option as the "no matching results" placeholder shown by combobox when the user's input does not match any available options. Enables distinct styling and prevents the option from being treated as a selectable match.
|
|
8758
|
+
*/
|
|
8759
|
+
noMatch: {
|
|
8760
|
+
type: Boolean,
|
|
8761
|
+
reflect: true,
|
|
8762
|
+
attribute: 'nomatch'
|
|
8763
|
+
},
|
|
8764
|
+
|
|
8629
8765
|
/**
|
|
8630
8766
|
* Specifies that an option is selected.
|
|
8631
8767
|
*/
|
|
@@ -10407,6 +10543,7 @@ function initExamples(initCount) {
|
|
|
10407
10543
|
valueExtractionExample();
|
|
10408
10544
|
valueAlertExample();
|
|
10409
10545
|
inDialogExample();
|
|
10546
|
+
inDrawerExample();
|
|
10410
10547
|
resetStateExample();
|
|
10411
10548
|
updateActiveOptionExample();
|
|
10412
10549
|
// auroMenuLoadingExample();
|