@aurodesignsystem-dev/auro-formkit 0.0.0-pr1408.9 → 0.0.0-pr1411.1
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/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/keyboardBehavior.md +0 -0
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/api.min.js +138 -142
- package/components/combobox/demo/index.min.js +138 -142
- package/components/combobox/demo/keyboardBehavior.html +1 -0
- package/components/combobox/demo/keyboardBehavior.md +20 -21
- package/components/combobox/dist/index.js +104 -115
- package/components/combobox/dist/registered.js +104 -115
- package/components/counter/demo/api.md +1 -1
- package/components/counter/demo/api.min.js +201 -146
- package/components/counter/demo/index.min.js +201 -146
- package/components/counter/demo/keyboardBehavior.html +1 -0
- package/components/counter/demo/keyboardBehavior.md +1 -1
- package/components/counter/dist/auro-counter.d.ts +11 -8
- package/components/counter/dist/index.js +201 -146
- package/components/counter/dist/keyboardStrategy.d.ts +4 -0
- package/components/counter/dist/registered.js +201 -146
- package/components/datepicker/demo/api.min.js +106 -118
- package/components/datepicker/demo/index.min.js +106 -118
- package/components/datepicker/demo/keyboardBehavior.html +1 -0
- package/components/datepicker/demo/keyboardBehavior.md +14 -13
- package/components/datepicker/dist/index.js +101 -113
- package/components/datepicker/dist/registered.js +101 -113
- package/components/dropdown/demo/api.md +29 -29
- package/components/dropdown/demo/api.min.js +116 -121
- package/components/dropdown/demo/index.md +2 -2
- package/components/dropdown/demo/index.min.js +116 -121
- package/components/dropdown/demo/keyboardBehavior.html +1 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +3 -3
- package/components/dropdown/dist/auro-dropdownBib.d.ts +1 -40
- package/components/dropdown/dist/dropdownBibKeyboardStrategy.d.ts +7 -0
- package/components/dropdown/dist/index.js +100 -109
- package/components/dropdown/dist/registered.js +100 -109
- package/components/form/demo/api.min.js +625 -546
- package/components/form/demo/index.min.js +625 -546
- package/components/form/demo/keyboardBehavior.md +0 -0
- package/components/input/demo/api.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/demo/keyboardBehavior.md +0 -0
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/api.min.js +34 -27
- package/components/menu/demo/index.min.js +34 -27
- package/components/menu/dist/auro-menu.d.ts +0 -6
- package/components/menu/dist/index.js +34 -27
- package/components/menu/dist/registered.js +34 -27
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/api.min.js +213 -166
- package/components/select/demo/index.min.js +213 -166
- package/components/select/demo/keyboardBehavior.html +1 -0
- package/components/select/demo/keyboardBehavior.md +240 -239
- package/components/select/dist/index.js +179 -139
- package/components/select/dist/registered.js +179 -139
- package/components/select/dist/selectKeyboardStrategy.d.ts +5 -2
- package/custom-elements.json +1526 -1489
- package/package.json +8 -6
|
@@ -1687,7 +1687,7 @@ class AuroHelpText extends i$2 {
|
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
1689
|
|
|
1690
|
-
var formkitVersion = '
|
|
1690
|
+
var formkitVersion = '202604021632';
|
|
1691
1691
|
|
|
1692
1692
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1693
1693
|
// See LICENSE in the project root for license information.
|
|
@@ -1679,7 +1679,7 @@ class AuroHelpText extends i$2 {
|
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
1681
|
|
|
1682
|
-
var formkitVersion = '
|
|
1682
|
+
var formkitVersion = '202604021632';
|
|
1683
1683
|
|
|
1684
1684
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1685
1685
|
// See LICENSE in the project root for license information.
|
|
File without changes
|
|
@@ -1632,7 +1632,7 @@ class AuroHelpText extends LitElement {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
|
|
1635
|
-
var formkitVersion = '
|
|
1635
|
+
var formkitVersion = '202604021632';
|
|
1636
1636
|
|
|
1637
1637
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1638
1638
|
// See LICENSE in the project root for license information.
|
|
@@ -1632,7 +1632,7 @@ class AuroHelpText extends LitElement {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
|
|
1635
|
-
var formkitVersion = '
|
|
1635
|
+
var formkitVersion = '202604021632';
|
|
1636
1636
|
|
|
1637
1637
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1638
1638
|
// See LICENSE in the project root for license information.
|
|
@@ -1242,7 +1242,7 @@ function restoreTriggerAfterClose(dropdown, focusTarget) {
|
|
|
1242
1242
|
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
1243
1243
|
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
1244
1244
|
*/
|
|
1245
|
-
function createDisplayContext(component, options = {}) {
|
|
1245
|
+
function createDisplayContext$1(component, options = {}) {
|
|
1246
1246
|
const dd = options.dropdown || component.dropdown;
|
|
1247
1247
|
// isPopoverVisible reflects as the `open` attribute.
|
|
1248
1248
|
// It reports whether the bib is open in any mode (popover or modal).
|
|
@@ -1272,11 +1272,11 @@ function createDisplayContext(component, options = {}) {
|
|
|
1272
1272
|
* @param {Object} strategy - Map of key names to handler functions.
|
|
1273
1273
|
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
1274
1274
|
*/
|
|
1275
|
-
function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
1275
|
+
function applyKeyboardStrategy$1(component, strategy, options = {}) {
|
|
1276
1276
|
component.addEventListener('keydown', async (evt) => {
|
|
1277
1277
|
const handler = strategy[evt.key] || strategy.default;
|
|
1278
1278
|
if (typeof handler === 'function') {
|
|
1279
|
-
const ctx = createDisplayContext(component, options);
|
|
1279
|
+
const ctx = createDisplayContext$1(component, options);
|
|
1280
1280
|
await handler(component, evt, ctx);
|
|
1281
1281
|
}
|
|
1282
1282
|
});
|
|
@@ -3272,6 +3272,11 @@ class AuroFloatingUI {
|
|
|
3272
3272
|
this.clickHandler = null;
|
|
3273
3273
|
this.keyDownHandler = null;
|
|
3274
3274
|
|
|
3275
|
+
/**
|
|
3276
|
+
* @private
|
|
3277
|
+
*/
|
|
3278
|
+
this.enableKeyboardHandling = true;
|
|
3279
|
+
|
|
3275
3280
|
/**
|
|
3276
3281
|
* @private
|
|
3277
3282
|
*/
|
|
@@ -3532,11 +3537,10 @@ class AuroFloatingUI {
|
|
|
3532
3537
|
return;
|
|
3533
3538
|
}
|
|
3534
3539
|
|
|
3535
|
-
const { activeElement } = document;
|
|
3536
3540
|
// if focus is still inside of trigger or bib, do not close
|
|
3537
3541
|
if (
|
|
3538
|
-
this.element.
|
|
3539
|
-
this.element.
|
|
3542
|
+
this.element.matches(":focus") ||
|
|
3543
|
+
this.element.matches(":focus-within")
|
|
3540
3544
|
) {
|
|
3541
3545
|
return;
|
|
3542
3546
|
}
|
|
@@ -3607,7 +3611,9 @@ class AuroFloatingUI {
|
|
|
3607
3611
|
document.addEventListener("focusin", this.focusHandler);
|
|
3608
3612
|
}
|
|
3609
3613
|
|
|
3610
|
-
|
|
3614
|
+
if (this.enableKeyboardHandling) {
|
|
3615
|
+
document.addEventListener("keydown", this.keyDownHandler);
|
|
3616
|
+
}
|
|
3611
3617
|
|
|
3612
3618
|
// send this task to the end of queue to prevent conflicting
|
|
3613
3619
|
// it conflicts if showBib gets call from a button that's not this.element.trigger
|
|
@@ -3863,8 +3869,9 @@ class AuroFloatingUI {
|
|
|
3863
3869
|
this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
|
|
3864
3870
|
}
|
|
3865
3871
|
|
|
3866
|
-
configure(elem, eventPrefix) {
|
|
3872
|
+
configure(elem, eventPrefix, enableKeyboardHandling = true) {
|
|
3867
3873
|
AuroFloatingUI.setupMousePressChecker();
|
|
3874
|
+
this.enableKeyboardHandling = enableKeyboardHandling;
|
|
3868
3875
|
|
|
3869
3876
|
this.eventPrefix = eventPrefix;
|
|
3870
3877
|
if (this.element !== elem) {
|
|
@@ -3897,7 +3904,9 @@ class AuroFloatingUI {
|
|
|
3897
3904
|
|
|
3898
3905
|
this.handleEvent = this.handleEvent.bind(this);
|
|
3899
3906
|
if (this.element.trigger) {
|
|
3900
|
-
|
|
3907
|
+
if (this.enableKeyboardHandling) {
|
|
3908
|
+
this.element.trigger.addEventListener("keydown", this.handleEvent);
|
|
3909
|
+
}
|
|
3901
3910
|
this.element.trigger.addEventListener("click", this.handleEvent);
|
|
3902
3911
|
this.element.trigger.addEventListener("mouseenter", this.handleEvent);
|
|
3903
3912
|
this.element.trigger.addEventListener("mouseleave", this.handleEvent);
|
|
@@ -4375,12 +4384,83 @@ let p$4 = class p{registerComponent(t,a){customElements.get(t)||customElements.d
|
|
|
4375
4384
|
|
|
4376
4385
|
var iconVersion$3 = '9.1.2';
|
|
4377
4386
|
|
|
4387
|
+
/**
|
|
4388
|
+
* Computes display state once per keydown event.
|
|
4389
|
+
* Centralizes null-safety checks and makes the shared/modal/popover branching explicit.
|
|
4390
|
+
*
|
|
4391
|
+
* @param {HTMLElement} component - The component with a dropdown reference.
|
|
4392
|
+
* @param {Object} [options] - Optional config.
|
|
4393
|
+
* @param {HTMLElement} [options.dropdown] - Explicit dropdown reference. Falls back to component.dropdown.
|
|
4394
|
+
* @param {Function} [options.inputResolver] - Called with (component, ctx) to resolve the active input element.
|
|
4395
|
+
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
4396
|
+
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
4397
|
+
*/
|
|
4398
|
+
function createDisplayContext(component, options = {}) {
|
|
4399
|
+
const dd = options.dropdown || component.dropdown;
|
|
4400
|
+
// isPopoverVisible reflects as the `open` attribute.
|
|
4401
|
+
// It reports whether the bib is open in any mode (popover or modal).
|
|
4402
|
+
const isExpanded = Boolean(dd && dd.isPopoverVisible);
|
|
4403
|
+
const isFullscreen = Boolean(dd && dd.isBibFullscreen);
|
|
4404
|
+
|
|
4405
|
+
const ctx = {
|
|
4406
|
+
isExpanded,
|
|
4407
|
+
isModal: isFullscreen,
|
|
4408
|
+
isPopover: !isFullscreen,
|
|
4409
|
+
activeInput: null,
|
|
4410
|
+
};
|
|
4411
|
+
|
|
4412
|
+
if (options.inputResolver) {
|
|
4413
|
+
const resolvedInput = options.inputResolver(component, ctx);
|
|
4414
|
+
// Guard against resolvers returning undefined or non-HTMLElement values.
|
|
4415
|
+
ctx.activeInput = resolvedInput instanceof HTMLElement ? resolvedInput : null;
|
|
4416
|
+
}
|
|
4417
|
+
|
|
4418
|
+
return ctx;
|
|
4419
|
+
}
|
|
4420
|
+
|
|
4421
|
+
/**
|
|
4422
|
+
* Wires up a keydown listener that dispatches to strategy[evt.key] or strategy.default.
|
|
4423
|
+
* Handles both sync and async handlers.
|
|
4424
|
+
* @param {HTMLElement} component - The component to attach the listener to.
|
|
4425
|
+
* @param {Object} strategy - Map of key names to handler functions.
|
|
4426
|
+
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
4427
|
+
*/
|
|
4428
|
+
function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
4429
|
+
component.addEventListener('keydown', async (evt) => {
|
|
4430
|
+
const handler = strategy[evt.key] || strategy.default;
|
|
4431
|
+
if (typeof handler === 'function') {
|
|
4432
|
+
const ctx = createDisplayContext(component, options);
|
|
4433
|
+
await handler(component, evt, ctx);
|
|
4434
|
+
}
|
|
4435
|
+
});
|
|
4436
|
+
}
|
|
4437
|
+
|
|
4378
4438
|
var styleCss$2$1 = i$7`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host dialog{width:auto;max-width:none;height:auto;max-height:none;padding:0;border:none;margin:0;outline:none;transform:translateZ(0)}:host dialog::backdrop{background:transparent}:host(:not([isfullscreen])) dialog{position:relative;inset:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}:host(:not([isfullscreen])) .container[class*=shape-rounded]{border-radius:16px}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([isfullscreen]) .container::backdrop{background:var(--ds-color-background-primary, #fff)}:host(:popover-open){position:fixed;overflow:visible;padding:0;border:none;margin:0;background:transparent;inset:unset;outline:none}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}.util_displayHiddenVisually{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip-path:inset(50%);white-space:nowrap}`;
|
|
4379
4439
|
|
|
4380
4440
|
var colorCss$2$1 = i$7`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
4381
4441
|
|
|
4382
4442
|
var tokensCss$1$2 = i$7`:host(:not([ondark])),:host(:not([appearance=inverse])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-hover-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]),:host([appearance=inverse]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-hover-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
|
|
4383
4443
|
|
|
4444
|
+
/**
|
|
4445
|
+
* Creates a keyboard strategy for dialog-specific key handling.
|
|
4446
|
+
* All other keydown behavior is left to the browser's native bubbling path.
|
|
4447
|
+
* @param {HTMLElement} bib - The dropdown bib element.
|
|
4448
|
+
* @returns {Object} Keyboard handlers keyed by `event.key`.
|
|
4449
|
+
*/
|
|
4450
|
+
// eslint-disable-next-line no-unused-vars
|
|
4451
|
+
function createDropdownBibKeyboardStrategy(bib) {
|
|
4452
|
+
return {
|
|
4453
|
+
// eslint-disable-next-line no-unused-vars
|
|
4454
|
+
Enter(_dialog, event) {
|
|
4455
|
+
// Floating UI handles Enter key to open the dropdown
|
|
4456
|
+
},
|
|
4457
|
+
// eslint-disable-next-line no-unused-vars
|
|
4458
|
+
Escape(_dialog, event) {
|
|
4459
|
+
// Floating UI handles Escape key to close the dropdown
|
|
4460
|
+
}
|
|
4461
|
+
};
|
|
4462
|
+
}
|
|
4463
|
+
|
|
4384
4464
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4385
4465
|
// See LICENSE in the project root for license information.
|
|
4386
4466
|
/* eslint-disable max-lines */
|
|
@@ -4505,11 +4585,7 @@ class AuroDropdownBib extends i$4 {
|
|
|
4505
4585
|
},
|
|
4506
4586
|
|
|
4507
4587
|
/**
|
|
4508
|
-
*
|
|
4509
|
-
* aria-activedescendant. The dialog keyboard bridge checks this
|
|
4510
|
-
* flag so that Enter selects the highlighted option instead of
|
|
4511
|
-
* activating the focused interactive element (e.g. the trigger
|
|
4512
|
-
* button, or the bibtemplate close button in fullscreen).
|
|
4588
|
+
* Tracks whether a menu option is currently highlighted.
|
|
4513
4589
|
* @private
|
|
4514
4590
|
*/
|
|
4515
4591
|
hasActiveDescendant: {
|
|
@@ -4583,7 +4659,7 @@ class AuroDropdownBib extends i$4 {
|
|
|
4583
4659
|
|
|
4584
4660
|
const dialog = this.shadowRoot.querySelector('dialog');
|
|
4585
4661
|
this._setupCancelHandler(dialog);
|
|
4586
|
-
|
|
4662
|
+
applyKeyboardStrategy(dialog, createDropdownBibKeyboardStrategy());
|
|
4587
4663
|
|
|
4588
4664
|
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
4589
4665
|
bubbles: true,
|
|
@@ -4610,92 +4686,6 @@ class AuroDropdownBib extends i$4 {
|
|
|
4610
4686
|
});
|
|
4611
4687
|
}
|
|
4612
4688
|
|
|
4613
|
-
/**
|
|
4614
|
-
* showModal() creates a closed focus scope — keyboard events inside
|
|
4615
|
-
* the dialog's shadow DOM do NOT bubble out to the combobox/select
|
|
4616
|
-
* keydown handlers in the parent shadow DOM. This handler bridges
|
|
4617
|
-
* that gap by re-dispatching navigation keys so they cross the
|
|
4618
|
-
* shadow boundary and reach the menu navigation logic in the parent
|
|
4619
|
-
* component.
|
|
4620
|
-
*
|
|
4621
|
-
* The trade-off: intercepting these keys means native keyboard
|
|
4622
|
-
* behaviors that would normally "just work" must be manually
|
|
4623
|
-
* re-implemented here:
|
|
4624
|
-
*
|
|
4625
|
-
* - Enter on buttons: Custom elements (auro-button) don't get the
|
|
4626
|
-
* native Enter→click that <button> provides, so we call .click()
|
|
4627
|
-
* directly when Enter is pressed on a button-like element.
|
|
4628
|
-
*
|
|
4629
|
-
* - Tab: Intercepted and re-dispatched so parent components
|
|
4630
|
-
* (select/combobox) can select the active option and close the
|
|
4631
|
-
* dialog. The <dialog> provides containment and isolation
|
|
4632
|
-
* (inert background, VoiceOver focus trapping, top layer), while
|
|
4633
|
-
* the content inside is a role="listbox" navigated via
|
|
4634
|
-
* aria-activedescendant (options are not focusable). Tab keyboard
|
|
4635
|
-
* behavior follows listbox conventions (select + close) because
|
|
4636
|
-
* the dialog's native Tab trap only cycles between the close
|
|
4637
|
-
* button and browser chrome.
|
|
4638
|
-
*
|
|
4639
|
-
* - Escape: The native <dialog> fires a `cancel` event on ESC
|
|
4640
|
-
* (handled by _setupCancelHandler), so the re-dispatched Escape
|
|
4641
|
-
* is a secondary path for parent components that also listen for
|
|
4642
|
-
* Escape keydown.
|
|
4643
|
-
*
|
|
4644
|
-
* @param {HTMLDialogElement} dialog - The dialog element to attach the keyboard bridge to.
|
|
4645
|
-
* @private
|
|
4646
|
-
*/
|
|
4647
|
-
_setupKeyboardBridge(dialog) {
|
|
4648
|
-
const navKeys = new Set([
|
|
4649
|
-
'ArrowUp',
|
|
4650
|
-
'ArrowDown',
|
|
4651
|
-
'Enter',
|
|
4652
|
-
'Escape',
|
|
4653
|
-
'Tab'
|
|
4654
|
-
]);
|
|
4655
|
-
|
|
4656
|
-
dialog.addEventListener('keydown', (event) => {
|
|
4657
|
-
if (!navKeys.has(event.key)) {
|
|
4658
|
-
return;
|
|
4659
|
-
}
|
|
4660
|
-
|
|
4661
|
-
// Custom elements (auro-button) don't get the native Enter→click
|
|
4662
|
-
// behavior that <button> has. Find the button in the composed path
|
|
4663
|
-
// and click it directly — but only when no menu option is
|
|
4664
|
-
// highlighted. In fullscreen mode focus stays on the close button
|
|
4665
|
-
// while arrow keys move the active-descendant highlight through
|
|
4666
|
-
// the listbox. If the user presses Enter with an option
|
|
4667
|
-
// highlighted, the intent is to select that option, not to click
|
|
4668
|
-
// the close button. In that case we fall through and bridge the
|
|
4669
|
-
// Enter key to the parent component's keyboard strategy.
|
|
4670
|
-
if (event.key === 'Enter') {
|
|
4671
|
-
if (!this.hasActiveDescendant) {
|
|
4672
|
-
const buttonSelector = 'button, [role="button"], auro-button, [auro-button]';
|
|
4673
|
-
const btn = event.composedPath().find((el) => el.matches && el.matches(buttonSelector));
|
|
4674
|
-
if (btn) {
|
|
4675
|
-
event.preventDefault();
|
|
4676
|
-
event.stopPropagation();
|
|
4677
|
-
btn.click();
|
|
4678
|
-
return;
|
|
4679
|
-
}
|
|
4680
|
-
}
|
|
4681
|
-
}
|
|
4682
|
-
|
|
4683
|
-
event.preventDefault();
|
|
4684
|
-
event.stopPropagation();
|
|
4685
|
-
const newEvent = new KeyboardEvent('keydown', {
|
|
4686
|
-
key: event.key,
|
|
4687
|
-
code: event.code,
|
|
4688
|
-
shiftKey: event.shiftKey,
|
|
4689
|
-
altKey: event.altKey,
|
|
4690
|
-
ctrlKey: event.ctrlKey,
|
|
4691
|
-
metaKey: event.metaKey,
|
|
4692
|
-
bubbles: true,
|
|
4693
|
-
composed: true,
|
|
4694
|
-
cancelable: true
|
|
4695
|
-
});
|
|
4696
|
-
this.dispatchEvent(newEvent);
|
|
4697
|
-
});
|
|
4698
|
-
}
|
|
4699
4689
|
|
|
4700
4690
|
/**
|
|
4701
4691
|
* Blocks touch-driven page scroll while a fullscreen modal dialog is open.
|
|
@@ -5070,7 +5060,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
|
|
|
5070
5060
|
}
|
|
5071
5061
|
};
|
|
5072
5062
|
|
|
5073
|
-
var formkitVersion$2 = '
|
|
5063
|
+
var formkitVersion$2 = '202604021632';
|
|
5074
5064
|
|
|
5075
5065
|
let AuroElement$2 = class AuroElement extends i$4 {
|
|
5076
5066
|
static get properties() {
|
|
@@ -5251,7 +5241,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5251
5241
|
this.appearance = 'default';
|
|
5252
5242
|
this.chevron = false;
|
|
5253
5243
|
this.disabled = false;
|
|
5254
|
-
this.
|
|
5244
|
+
this.disableKeyboardHandling = false;
|
|
5255
5245
|
this.error = false;
|
|
5256
5246
|
this.tabIndex = 0;
|
|
5257
5247
|
this.noToggle = false;
|
|
@@ -5349,9 +5339,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5349
5339
|
// showModal() fires asynchronously via Lit's update cycle, which
|
|
5350
5340
|
// falls outside the user activation window and causes iOS to
|
|
5351
5341
|
// dismiss the keyboard.
|
|
5352
|
-
if (this.
|
|
5353
|
-
|
|
5354
|
-
this.bibElement.value.open(useModal);
|
|
5342
|
+
if (this.bibElement && this.bibElement.value) {
|
|
5343
|
+
this.bibElement.value.open(this.isBibFullscreen);
|
|
5355
5344
|
}
|
|
5356
5345
|
}
|
|
5357
5346
|
|
|
@@ -5465,9 +5454,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5465
5454
|
},
|
|
5466
5455
|
|
|
5467
5456
|
/**
|
|
5468
|
-
* If declared, the
|
|
5457
|
+
* If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior.
|
|
5469
5458
|
*/
|
|
5470
|
-
|
|
5459
|
+
disableKeyboardHandling: {
|
|
5471
5460
|
type: Boolean,
|
|
5472
5461
|
reflect: true
|
|
5473
5462
|
},
|
|
@@ -5745,7 +5734,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5745
5734
|
if (this.isPopoverVisible) {
|
|
5746
5735
|
// Fullscreen: use showModal() for native accessibility (inert outside, focus trap)
|
|
5747
5736
|
// Desktop: use show() for Floating UI positioning + FocusTrap for focus management
|
|
5748
|
-
const useModal = this.isBibFullscreen
|
|
5737
|
+
const useModal = this.isBibFullscreen;
|
|
5749
5738
|
this.bibElement.value.open(useModal);
|
|
5750
5739
|
} else {
|
|
5751
5740
|
this.bibElement.value.close();
|
|
@@ -5755,7 +5744,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5755
5744
|
// When fullscreen strategy changes while open, re-open dialog with correct mode
|
|
5756
5745
|
// (e.g. resizing from desktop → mobile while dropdown is open)
|
|
5757
5746
|
if (changedProperties.has('isBibFullscreen') && this.isPopoverVisible && this.bibElement.value) {
|
|
5758
|
-
const useModal = this.isBibFullscreen
|
|
5747
|
+
const useModal = this.isBibFullscreen;
|
|
5759
5748
|
this.bibElement.value.close();
|
|
5760
5749
|
this.bibElement.value.open(useModal);
|
|
5761
5750
|
}
|
|
@@ -5777,7 +5766,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5777
5766
|
|
|
5778
5767
|
firstUpdated() {
|
|
5779
5768
|
// Configure the floater to, this will generate the ID for the bib
|
|
5780
|
-
this.floater.configure(this, 'auroDropdown');
|
|
5769
|
+
this.floater.configure(this, 'auroDropdown', !this.disableKeyboardHandling);
|
|
5781
5770
|
|
|
5782
5771
|
// Prevent `contain: layout` on the dropdown host. Layout containment
|
|
5783
5772
|
// creates a containing block for position:fixed descendants (the bib),
|
|
@@ -5867,7 +5856,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5867
5856
|
* @private
|
|
5868
5857
|
*/
|
|
5869
5858
|
updateFocusTrap() {
|
|
5870
|
-
if (this.isPopoverVisible
|
|
5859
|
+
if (this.isPopoverVisible) {
|
|
5871
5860
|
if (!this.isBibFullscreen) {
|
|
5872
5861
|
// Desktop: show() doesn't trap focus, so use FocusTrap
|
|
5873
5862
|
this.focusTrap = new FocusTrap(this.bibContent);
|
|
@@ -12834,7 +12823,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
|
|
|
12834
12823
|
}
|
|
12835
12824
|
};
|
|
12836
12825
|
|
|
12837
|
-
var formkitVersion$1 = '
|
|
12826
|
+
var formkitVersion$1 = '202604021632';
|
|
12838
12827
|
|
|
12839
12828
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12840
12829
|
// See LICENSE in the project root for license information.
|
|
@@ -13873,7 +13862,7 @@ class AuroBibtemplate extends i$4 {
|
|
|
13873
13862
|
}
|
|
13874
13863
|
}
|
|
13875
13864
|
|
|
13876
|
-
var formkitVersion = '
|
|
13865
|
+
var formkitVersion = '202604021632';
|
|
13877
13866
|
|
|
13878
13867
|
var styleCss$3 = i$7`.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}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13879
13868
|
|
|
@@ -15367,7 +15356,7 @@ class AuroCombobox extends AuroElement {
|
|
|
15367
15356
|
* @returns {void}
|
|
15368
15357
|
*/
|
|
15369
15358
|
configureCombobox() {
|
|
15370
|
-
applyKeyboardStrategy(this, comboboxKeyboardStrategy, {
|
|
15359
|
+
applyKeyboardStrategy$1(this, comboboxKeyboardStrategy, {
|
|
15371
15360
|
// In modal mode the input moves into the bib; route keyboard events to that element instead.
|
|
15372
15361
|
inputResolver: (comp, ctx) => (ctx.isModal && comp.inputInBib ? comp.inputInBib : comp.input),
|
|
15373
15362
|
});
|
|
@@ -16376,7 +16365,7 @@ class AuroMenuOption extends AuroElement {
|
|
|
16376
16365
|
});
|
|
16377
16366
|
|
|
16378
16367
|
return u$7`
|
|
16379
|
-
<div class="${classes}">
|
|
16368
|
+
<div class="${classes}" aria-disabled="${this.disabled ? 'true' : 'false'}">
|
|
16380
16369
|
${this.selected && !this.noCheckmark
|
|
16381
16370
|
? this.generateIconHtml(checkmarkIcon.svg)
|
|
16382
16371
|
: undefined}
|
|
@@ -17147,10 +17136,10 @@ class AuroMenu extends AuroElement {
|
|
|
17147
17136
|
|
|
17148
17137
|
// Event Bindings
|
|
17149
17138
|
|
|
17150
|
-
/**
|
|
17151
|
-
|
|
17152
|
-
|
|
17153
|
-
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
17139
|
+
// /**
|
|
17140
|
+
// * @private
|
|
17141
|
+
// */
|
|
17142
|
+
// this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
17154
17143
|
|
|
17155
17144
|
|
|
17156
17145
|
/**
|
|
@@ -17499,7 +17488,7 @@ class AuroMenu extends AuroElement {
|
|
|
17499
17488
|
|
|
17500
17489
|
this.provideContext();
|
|
17501
17490
|
|
|
17502
|
-
this.addEventListener('keydown', this.handleKeyDown);
|
|
17491
|
+
// this.addEventListener('keydown', this.handleKeyDown);
|
|
17503
17492
|
this.addEventListener('auroMenuOption-click', this.handleMouseSelect);
|
|
17504
17493
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
17505
17494
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
@@ -17507,7 +17496,7 @@ class AuroMenu extends AuroElement {
|
|
|
17507
17496
|
}
|
|
17508
17497
|
|
|
17509
17498
|
disconnectedCallback() {
|
|
17510
|
-
this.removeEventListener('keydown', this.handleKeyDown);
|
|
17499
|
+
// this.removeEventListener('keydown', this.handleKeyDown);
|
|
17511
17500
|
this.removeEventListener('auroMenuOption-click', this.handleMouseSelect);
|
|
17512
17501
|
this.removeEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
17513
17502
|
this.removeEventListener('slotchange', this.handleSlotChange);
|
|
@@ -17648,26 +17637,33 @@ class AuroMenu extends AuroElement {
|
|
|
17648
17637
|
|
|
17649
17638
|
// Event Handlers
|
|
17650
17639
|
|
|
17651
|
-
/**
|
|
17652
|
-
|
|
17653
|
-
|
|
17654
|
-
|
|
17655
|
-
|
|
17656
|
-
handleKeyDown(event) {
|
|
17657
|
-
|
|
17658
|
-
|
|
17659
|
-
|
|
17660
|
-
|
|
17661
|
-
|
|
17662
|
-
|
|
17663
|
-
|
|
17664
|
-
|
|
17665
|
-
|
|
17666
|
-
|
|
17667
|
-
|
|
17668
|
-
|
|
17669
|
-
|
|
17670
|
-
|
|
17640
|
+
// /**
|
|
17641
|
+
// * Handles keyboard navigation.
|
|
17642
|
+
// * @private
|
|
17643
|
+
// * @param {KeyboardEvent} event - Event object from the browser.
|
|
17644
|
+
// */
|
|
17645
|
+
// handleKeyDown(event) {
|
|
17646
|
+
// // Update to Chris keyboard handler
|
|
17647
|
+
// // We have a new "navigateArrow" function in that handler, maybe that replaces those keys here?
|
|
17648
|
+
// event.preventDefault();
|
|
17649
|
+
// switch (event.key) {
|
|
17650
|
+
// case "ArrowDown":
|
|
17651
|
+
// console.warn("ArrowDown key is pressed and heard from menu");
|
|
17652
|
+
// this.menuService.highlightNext();
|
|
17653
|
+
// break;
|
|
17654
|
+
// case "ArrowUp":
|
|
17655
|
+
// console.warn("ArrowUp key is pressed and heard from menu");
|
|
17656
|
+
// this.menuService.highlightPrevious();
|
|
17657
|
+
// break;
|
|
17658
|
+
// case "Tab":
|
|
17659
|
+
// case "Enter":
|
|
17660
|
+
// this.menuService.selectHighlightedOption();
|
|
17661
|
+
// // Does this need to get separated into two cases to handle the different expected behavior of tab vs enter?
|
|
17662
|
+
// break;
|
|
17663
|
+
// default:
|
|
17664
|
+
// break;
|
|
17665
|
+
// }
|
|
17666
|
+
// }
|
|
17671
17667
|
|
|
17672
17668
|
/**
|
|
17673
17669
|
* Navigates the menu options in the specified direction.
|