@aurodesignsystem-dev/auro-formkit 0.0.0-pr1408.14 → 0.0.0-pr1408.16
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 +139 -142
- package/components/combobox/demo/index.min.js +139 -142
- package/components/combobox/demo/keyboardBehavior.md +1 -2
- package/components/combobox/dist/index.js +105 -115
- package/components/combobox/dist/registered.js +105 -115
- package/components/counter/demo/api.md +1 -1
- package/components/counter/demo/api.min.js +202 -146
- package/components/counter/demo/index.min.js +202 -146
- package/components/counter/dist/auro-counter.d.ts +11 -8
- package/components/counter/dist/index.js +202 -146
- package/components/counter/dist/keyboardStrategy.d.ts +4 -0
- package/components/counter/dist/registered.js +202 -146
- package/components/datepicker/demo/api.min.js +107 -118
- package/components/datepicker/demo/index.min.js +107 -118
- package/components/datepicker/dist/index.js +102 -113
- package/components/datepicker/dist/registered.js +102 -113
- package/components/dropdown/demo/api.md +29 -29
- package/components/dropdown/demo/api.min.js +117 -121
- package/components/dropdown/demo/index.min.js +117 -121
- 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 +101 -109
- package/components/dropdown/dist/registered.js +101 -109
- package/components/form/demo/api.min.js +629 -544
- package/components/form/demo/index.min.js +629 -544
- 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 +214 -164
- package/components/select/demo/index.min.js +214 -164
- package/components/select/demo/keyboardBehavior.md +3 -3
- package/components/select/dist/index.js +180 -137
- package/components/select/dist/registered.js +180 -137
- package/components/select/dist/selectKeyboardStrategy.d.ts +5 -2
- package/custom-elements.json +1518 -1481
- package/package.json +8 -6
|
@@ -1165,7 +1165,7 @@ function restoreTriggerAfterClose(dropdown, focusTarget) {
|
|
|
1165
1165
|
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
1166
1166
|
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
1167
1167
|
*/
|
|
1168
|
-
function createDisplayContext(component, options = {}) {
|
|
1168
|
+
function createDisplayContext$1(component, options = {}) {
|
|
1169
1169
|
const dd = options.dropdown || component.dropdown;
|
|
1170
1170
|
// isPopoverVisible reflects as the `open` attribute.
|
|
1171
1171
|
// It reports whether the bib is open in any mode (popover or modal).
|
|
@@ -1195,11 +1195,11 @@ function createDisplayContext(component, options = {}) {
|
|
|
1195
1195
|
* @param {Object} strategy - Map of key names to handler functions.
|
|
1196
1196
|
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
1197
1197
|
*/
|
|
1198
|
-
function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
1198
|
+
function applyKeyboardStrategy$1(component, strategy, options = {}) {
|
|
1199
1199
|
component.addEventListener('keydown', async (evt) => {
|
|
1200
1200
|
const handler = strategy[evt.key] || strategy.default;
|
|
1201
1201
|
if (typeof handler === 'function') {
|
|
1202
|
-
const ctx = createDisplayContext(component, options);
|
|
1202
|
+
const ctx = createDisplayContext$1(component, options);
|
|
1203
1203
|
await handler(component, evt, ctx);
|
|
1204
1204
|
}
|
|
1205
1205
|
});
|
|
@@ -3195,6 +3195,11 @@ class AuroFloatingUI {
|
|
|
3195
3195
|
this.clickHandler = null;
|
|
3196
3196
|
this.keyDownHandler = null;
|
|
3197
3197
|
|
|
3198
|
+
/**
|
|
3199
|
+
* @private
|
|
3200
|
+
*/
|
|
3201
|
+
this.enableKeyboardHandling = true;
|
|
3202
|
+
|
|
3198
3203
|
/**
|
|
3199
3204
|
* @private
|
|
3200
3205
|
*/
|
|
@@ -3455,11 +3460,10 @@ class AuroFloatingUI {
|
|
|
3455
3460
|
return;
|
|
3456
3461
|
}
|
|
3457
3462
|
|
|
3458
|
-
const { activeElement } = document;
|
|
3459
3463
|
// if focus is still inside of trigger or bib, do not close
|
|
3460
3464
|
if (
|
|
3461
|
-
this.element.
|
|
3462
|
-
this.element.
|
|
3465
|
+
this.element.matches(":focus") ||
|
|
3466
|
+
this.element.matches(":focus-within")
|
|
3463
3467
|
) {
|
|
3464
3468
|
return;
|
|
3465
3469
|
}
|
|
@@ -3530,7 +3534,9 @@ class AuroFloatingUI {
|
|
|
3530
3534
|
document.addEventListener("focusin", this.focusHandler);
|
|
3531
3535
|
}
|
|
3532
3536
|
|
|
3533
|
-
|
|
3537
|
+
if (this.enableKeyboardHandling) {
|
|
3538
|
+
document.addEventListener("keydown", this.keyDownHandler);
|
|
3539
|
+
}
|
|
3534
3540
|
|
|
3535
3541
|
// send this task to the end of queue to prevent conflicting
|
|
3536
3542
|
// it conflicts if showBib gets call from a button that's not this.element.trigger
|
|
@@ -3786,8 +3792,9 @@ class AuroFloatingUI {
|
|
|
3786
3792
|
this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
|
|
3787
3793
|
}
|
|
3788
3794
|
|
|
3789
|
-
configure(elem, eventPrefix) {
|
|
3795
|
+
configure(elem, eventPrefix, enableKeyboardHandling = true) {
|
|
3790
3796
|
AuroFloatingUI.setupMousePressChecker();
|
|
3797
|
+
this.enableKeyboardHandling = enableKeyboardHandling;
|
|
3791
3798
|
|
|
3792
3799
|
this.eventPrefix = eventPrefix;
|
|
3793
3800
|
if (this.element !== elem) {
|
|
@@ -3820,7 +3827,9 @@ class AuroFloatingUI {
|
|
|
3820
3827
|
|
|
3821
3828
|
this.handleEvent = this.handleEvent.bind(this);
|
|
3822
3829
|
if (this.element.trigger) {
|
|
3823
|
-
|
|
3830
|
+
if (this.enableKeyboardHandling) {
|
|
3831
|
+
this.element.trigger.addEventListener("keydown", this.handleEvent);
|
|
3832
|
+
}
|
|
3824
3833
|
this.element.trigger.addEventListener("click", this.handleEvent);
|
|
3825
3834
|
this.element.trigger.addEventListener("mouseenter", this.handleEvent);
|
|
3826
3835
|
this.element.trigger.addEventListener("mouseleave", this.handleEvent);
|
|
@@ -4298,12 +4307,83 @@ let p$4 = class p{registerComponent(t,a){customElements.get(t)||customElements.d
|
|
|
4298
4307
|
|
|
4299
4308
|
var iconVersion$3 = '9.1.2';
|
|
4300
4309
|
|
|
4310
|
+
/**
|
|
4311
|
+
* Computes display state once per keydown event.
|
|
4312
|
+
* Centralizes null-safety checks and makes the shared/modal/popover branching explicit.
|
|
4313
|
+
*
|
|
4314
|
+
* @param {HTMLElement} component - The component with a dropdown reference.
|
|
4315
|
+
* @param {Object} [options] - Optional config.
|
|
4316
|
+
* @param {HTMLElement} [options.dropdown] - Explicit dropdown reference. Falls back to component.dropdown.
|
|
4317
|
+
* @param {Function} [options.inputResolver] - Called with (component, ctx) to resolve the active input element.
|
|
4318
|
+
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
4319
|
+
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
4320
|
+
*/
|
|
4321
|
+
function createDisplayContext(component, options = {}) {
|
|
4322
|
+
const dd = options.dropdown || component.dropdown;
|
|
4323
|
+
// isPopoverVisible reflects as the `open` attribute.
|
|
4324
|
+
// It reports whether the bib is open in any mode (popover or modal).
|
|
4325
|
+
const isExpanded = Boolean(dd && dd.isPopoverVisible);
|
|
4326
|
+
const isFullscreen = Boolean(dd && dd.isBibFullscreen);
|
|
4327
|
+
|
|
4328
|
+
const ctx = {
|
|
4329
|
+
isExpanded,
|
|
4330
|
+
isModal: isFullscreen,
|
|
4331
|
+
isPopover: !isFullscreen,
|
|
4332
|
+
activeInput: null,
|
|
4333
|
+
};
|
|
4334
|
+
|
|
4335
|
+
if (options.inputResolver) {
|
|
4336
|
+
const resolvedInput = options.inputResolver(component, ctx);
|
|
4337
|
+
// Guard against resolvers returning undefined or non-HTMLElement values.
|
|
4338
|
+
ctx.activeInput = resolvedInput instanceof HTMLElement ? resolvedInput : null;
|
|
4339
|
+
}
|
|
4340
|
+
|
|
4341
|
+
return ctx;
|
|
4342
|
+
}
|
|
4343
|
+
|
|
4344
|
+
/**
|
|
4345
|
+
* Wires up a keydown listener that dispatches to strategy[evt.key] or strategy.default.
|
|
4346
|
+
* Handles both sync and async handlers.
|
|
4347
|
+
* @param {HTMLElement} component - The component to attach the listener to.
|
|
4348
|
+
* @param {Object} strategy - Map of key names to handler functions.
|
|
4349
|
+
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
4350
|
+
*/
|
|
4351
|
+
function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
4352
|
+
component.addEventListener('keydown', async (evt) => {
|
|
4353
|
+
const handler = strategy[evt.key] || strategy.default;
|
|
4354
|
+
if (typeof handler === 'function') {
|
|
4355
|
+
const ctx = createDisplayContext(component, options);
|
|
4356
|
+
await handler(component, evt, ctx);
|
|
4357
|
+
}
|
|
4358
|
+
});
|
|
4359
|
+
}
|
|
4360
|
+
|
|
4301
4361
|
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}`;
|
|
4302
4362
|
|
|
4303
4363
|
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)}`;
|
|
4304
4364
|
|
|
4305
4365
|
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)}`;
|
|
4306
4366
|
|
|
4367
|
+
/**
|
|
4368
|
+
* Creates a keyboard strategy for dialog-specific key handling.
|
|
4369
|
+
* All other keydown behavior is left to the browser's native bubbling path.
|
|
4370
|
+
* @param {HTMLElement} bib - The dropdown bib element.
|
|
4371
|
+
* @returns {Object} Keyboard handlers keyed by `event.key`.
|
|
4372
|
+
*/
|
|
4373
|
+
// eslint-disable-next-line no-unused-vars
|
|
4374
|
+
function createDropdownBibKeyboardStrategy(bib) {
|
|
4375
|
+
return {
|
|
4376
|
+
// eslint-disable-next-line no-unused-vars
|
|
4377
|
+
Enter(_dialog, event) {
|
|
4378
|
+
// Floating UI handles Enter key to open the dropdown
|
|
4379
|
+
},
|
|
4380
|
+
// eslint-disable-next-line no-unused-vars
|
|
4381
|
+
Escape(_dialog, event) {
|
|
4382
|
+
// Floating UI handles Escape key to close the dropdown
|
|
4383
|
+
}
|
|
4384
|
+
};
|
|
4385
|
+
}
|
|
4386
|
+
|
|
4307
4387
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4308
4388
|
// See LICENSE in the project root for license information.
|
|
4309
4389
|
/* eslint-disable max-lines */
|
|
@@ -4428,11 +4508,7 @@ class AuroDropdownBib extends i$4 {
|
|
|
4428
4508
|
},
|
|
4429
4509
|
|
|
4430
4510
|
/**
|
|
4431
|
-
*
|
|
4432
|
-
* aria-activedescendant. The dialog keyboard bridge checks this
|
|
4433
|
-
* flag so that Enter selects the highlighted option instead of
|
|
4434
|
-
* activating the focused interactive element (e.g. the trigger
|
|
4435
|
-
* button, or the bibtemplate close button in fullscreen).
|
|
4511
|
+
* Tracks whether a menu option is currently highlighted.
|
|
4436
4512
|
* @private
|
|
4437
4513
|
*/
|
|
4438
4514
|
hasActiveDescendant: {
|
|
@@ -4506,7 +4582,7 @@ class AuroDropdownBib extends i$4 {
|
|
|
4506
4582
|
|
|
4507
4583
|
const dialog = this.shadowRoot.querySelector('dialog');
|
|
4508
4584
|
this._setupCancelHandler(dialog);
|
|
4509
|
-
|
|
4585
|
+
applyKeyboardStrategy(dialog, createDropdownBibKeyboardStrategy());
|
|
4510
4586
|
|
|
4511
4587
|
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
4512
4588
|
bubbles: true,
|
|
@@ -4533,92 +4609,6 @@ class AuroDropdownBib extends i$4 {
|
|
|
4533
4609
|
});
|
|
4534
4610
|
}
|
|
4535
4611
|
|
|
4536
|
-
/**
|
|
4537
|
-
* showModal() creates a closed focus scope — keyboard events inside
|
|
4538
|
-
* the dialog's shadow DOM do NOT bubble out to the combobox/select
|
|
4539
|
-
* keydown handlers in the parent shadow DOM. This handler bridges
|
|
4540
|
-
* that gap by re-dispatching navigation keys so they cross the
|
|
4541
|
-
* shadow boundary and reach the menu navigation logic in the parent
|
|
4542
|
-
* component.
|
|
4543
|
-
*
|
|
4544
|
-
* The trade-off: intercepting these keys means native keyboard
|
|
4545
|
-
* behaviors that would normally "just work" must be manually
|
|
4546
|
-
* re-implemented here:
|
|
4547
|
-
*
|
|
4548
|
-
* - Enter on buttons: Custom elements (auro-button) don't get the
|
|
4549
|
-
* native Enter→click that <button> provides, so we call .click()
|
|
4550
|
-
* directly when Enter is pressed on a button-like element.
|
|
4551
|
-
*
|
|
4552
|
-
* - Tab: Intercepted and re-dispatched so parent components
|
|
4553
|
-
* (select/combobox) can select the active option and close the
|
|
4554
|
-
* dialog. The <dialog> provides containment and isolation
|
|
4555
|
-
* (inert background, VoiceOver focus trapping, top layer), while
|
|
4556
|
-
* the content inside is a role="listbox" navigated via
|
|
4557
|
-
* aria-activedescendant (options are not focusable). Tab keyboard
|
|
4558
|
-
* behavior follows listbox conventions (select + close) because
|
|
4559
|
-
* the dialog's native Tab trap only cycles between the close
|
|
4560
|
-
* button and browser chrome.
|
|
4561
|
-
*
|
|
4562
|
-
* - Escape: The native <dialog> fires a `cancel` event on ESC
|
|
4563
|
-
* (handled by _setupCancelHandler), so the re-dispatched Escape
|
|
4564
|
-
* is a secondary path for parent components that also listen for
|
|
4565
|
-
* Escape keydown.
|
|
4566
|
-
*
|
|
4567
|
-
* @param {HTMLDialogElement} dialog - The dialog element to attach the keyboard bridge to.
|
|
4568
|
-
* @private
|
|
4569
|
-
*/
|
|
4570
|
-
_setupKeyboardBridge(dialog) {
|
|
4571
|
-
const navKeys = new Set([
|
|
4572
|
-
'ArrowUp',
|
|
4573
|
-
'ArrowDown',
|
|
4574
|
-
'Enter',
|
|
4575
|
-
'Escape',
|
|
4576
|
-
'Tab'
|
|
4577
|
-
]);
|
|
4578
|
-
|
|
4579
|
-
dialog.addEventListener('keydown', (event) => {
|
|
4580
|
-
if (!navKeys.has(event.key)) {
|
|
4581
|
-
return;
|
|
4582
|
-
}
|
|
4583
|
-
|
|
4584
|
-
// Custom elements (auro-button) don't get the native Enter→click
|
|
4585
|
-
// behavior that <button> has. Find the button in the composed path
|
|
4586
|
-
// and click it directly — but only when no menu option is
|
|
4587
|
-
// highlighted. In fullscreen mode focus stays on the close button
|
|
4588
|
-
// while arrow keys move the active-descendant highlight through
|
|
4589
|
-
// the listbox. If the user presses Enter with an option
|
|
4590
|
-
// highlighted, the intent is to select that option, not to click
|
|
4591
|
-
// the close button. In that case we fall through and bridge the
|
|
4592
|
-
// Enter key to the parent component's keyboard strategy.
|
|
4593
|
-
if (event.key === 'Enter') {
|
|
4594
|
-
if (!this.hasActiveDescendant) {
|
|
4595
|
-
const buttonSelector = 'button, [role="button"], auro-button, [auro-button]';
|
|
4596
|
-
const btn = event.composedPath().find((el) => el.matches && el.matches(buttonSelector));
|
|
4597
|
-
if (btn) {
|
|
4598
|
-
event.preventDefault();
|
|
4599
|
-
event.stopPropagation();
|
|
4600
|
-
btn.click();
|
|
4601
|
-
return;
|
|
4602
|
-
}
|
|
4603
|
-
}
|
|
4604
|
-
}
|
|
4605
|
-
|
|
4606
|
-
event.preventDefault();
|
|
4607
|
-
event.stopPropagation();
|
|
4608
|
-
const newEvent = new KeyboardEvent('keydown', {
|
|
4609
|
-
key: event.key,
|
|
4610
|
-
code: event.code,
|
|
4611
|
-
shiftKey: event.shiftKey,
|
|
4612
|
-
altKey: event.altKey,
|
|
4613
|
-
ctrlKey: event.ctrlKey,
|
|
4614
|
-
metaKey: event.metaKey,
|
|
4615
|
-
bubbles: true,
|
|
4616
|
-
composed: true,
|
|
4617
|
-
cancelable: true
|
|
4618
|
-
});
|
|
4619
|
-
this.dispatchEvent(newEvent);
|
|
4620
|
-
});
|
|
4621
|
-
}
|
|
4622
4612
|
|
|
4623
4613
|
/**
|
|
4624
4614
|
* Blocks touch-driven page scroll while a fullscreen modal dialog is open.
|
|
@@ -4993,7 +4983,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
|
|
|
4993
4983
|
}
|
|
4994
4984
|
};
|
|
4995
4985
|
|
|
4996
|
-
var formkitVersion$2 = '
|
|
4986
|
+
var formkitVersion$2 = '202604022013';
|
|
4997
4987
|
|
|
4998
4988
|
let AuroElement$2 = class AuroElement extends i$4 {
|
|
4999
4989
|
static get properties() {
|
|
@@ -5174,7 +5164,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5174
5164
|
this.appearance = 'default';
|
|
5175
5165
|
this.chevron = false;
|
|
5176
5166
|
this.disabled = false;
|
|
5177
|
-
this.
|
|
5167
|
+
this.disableKeyboardHandling = false;
|
|
5178
5168
|
this.error = false;
|
|
5179
5169
|
this.tabIndex = 0;
|
|
5180
5170
|
this.noToggle = false;
|
|
@@ -5272,9 +5262,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5272
5262
|
// showModal() fires asynchronously via Lit's update cycle, which
|
|
5273
5263
|
// falls outside the user activation window and causes iOS to
|
|
5274
5264
|
// dismiss the keyboard.
|
|
5275
|
-
if (this.
|
|
5276
|
-
|
|
5277
|
-
this.bibElement.value.open(useModal);
|
|
5265
|
+
if (this.bibElement && this.bibElement.value) {
|
|
5266
|
+
this.bibElement.value.open(this.isBibFullscreen);
|
|
5278
5267
|
}
|
|
5279
5268
|
}
|
|
5280
5269
|
|
|
@@ -5388,9 +5377,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5388
5377
|
},
|
|
5389
5378
|
|
|
5390
5379
|
/**
|
|
5391
|
-
* If declared, the
|
|
5380
|
+
* If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior.
|
|
5392
5381
|
*/
|
|
5393
|
-
|
|
5382
|
+
disableKeyboardHandling: {
|
|
5394
5383
|
type: Boolean,
|
|
5395
5384
|
reflect: true
|
|
5396
5385
|
},
|
|
@@ -5668,7 +5657,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5668
5657
|
if (this.isPopoverVisible) {
|
|
5669
5658
|
// Fullscreen: use showModal() for native accessibility (inert outside, focus trap)
|
|
5670
5659
|
// Desktop: use show() for Floating UI positioning + FocusTrap for focus management
|
|
5671
|
-
const useModal = this.isBibFullscreen
|
|
5660
|
+
const useModal = this.isBibFullscreen;
|
|
5672
5661
|
this.bibElement.value.open(useModal);
|
|
5673
5662
|
} else {
|
|
5674
5663
|
this.bibElement.value.close();
|
|
@@ -5678,7 +5667,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5678
5667
|
// When fullscreen strategy changes while open, re-open dialog with correct mode
|
|
5679
5668
|
// (e.g. resizing from desktop → mobile while dropdown is open)
|
|
5680
5669
|
if (changedProperties.has('isBibFullscreen') && this.isPopoverVisible && this.bibElement.value) {
|
|
5681
|
-
const useModal = this.isBibFullscreen
|
|
5670
|
+
const useModal = this.isBibFullscreen;
|
|
5682
5671
|
this.bibElement.value.close();
|
|
5683
5672
|
this.bibElement.value.open(useModal);
|
|
5684
5673
|
}
|
|
@@ -5700,7 +5689,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5700
5689
|
|
|
5701
5690
|
firstUpdated() {
|
|
5702
5691
|
// Configure the floater to, this will generate the ID for the bib
|
|
5703
|
-
this.floater.configure(this, 'auroDropdown');
|
|
5692
|
+
this.floater.configure(this, 'auroDropdown', !this.disableKeyboardHandling);
|
|
5704
5693
|
|
|
5705
5694
|
// Prevent `contain: layout` on the dropdown host. Layout containment
|
|
5706
5695
|
// creates a containing block for position:fixed descendants (the bib),
|
|
@@ -5790,7 +5779,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5790
5779
|
* @private
|
|
5791
5780
|
*/
|
|
5792
5781
|
updateFocusTrap() {
|
|
5793
|
-
if (this.isPopoverVisible
|
|
5782
|
+
if (this.isPopoverVisible) {
|
|
5794
5783
|
if (!this.isBibFullscreen) {
|
|
5795
5784
|
// Desktop: show() doesn't trap focus, so use FocusTrap
|
|
5796
5785
|
this.focusTrap = new FocusTrap(this.bibContent);
|
|
@@ -6008,6 +5997,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6008
5997
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
6009
5998
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
6010
5999
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
6000
|
+
aria-disabled="${o(this.disabled ? 'true' : undefined)}"
|
|
6011
6001
|
@focusin="${this.handleFocusin}"
|
|
6012
6002
|
@blur="${this.handleFocusOut}">
|
|
6013
6003
|
<div class="triggerContentWrapper" id="triggerLabel">
|
|
@@ -12757,7 +12747,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
|
|
|
12757
12747
|
}
|
|
12758
12748
|
};
|
|
12759
12749
|
|
|
12760
|
-
var formkitVersion$1 = '
|
|
12750
|
+
var formkitVersion$1 = '202604022013';
|
|
12761
12751
|
|
|
12762
12752
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12763
12753
|
// See LICENSE in the project root for license information.
|
|
@@ -13796,7 +13786,7 @@ class AuroBibtemplate extends i$4 {
|
|
|
13796
13786
|
}
|
|
13797
13787
|
}
|
|
13798
13788
|
|
|
13799
|
-
var formkitVersion = '
|
|
13789
|
+
var formkitVersion = '202604022013';
|
|
13800
13790
|
|
|
13801
13791
|
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}`;
|
|
13802
13792
|
|
|
@@ -15290,7 +15280,7 @@ class AuroCombobox extends AuroElement {
|
|
|
15290
15280
|
* @returns {void}
|
|
15291
15281
|
*/
|
|
15292
15282
|
configureCombobox() {
|
|
15293
|
-
applyKeyboardStrategy(this, comboboxKeyboardStrategy, {
|
|
15283
|
+
applyKeyboardStrategy$1(this, comboboxKeyboardStrategy, {
|
|
15294
15284
|
// In modal mode the input moves into the bib; route keyboard events to that element instead.
|
|
15295
15285
|
inputResolver: (comp, ctx) => (ctx.isModal && comp.inputInBib ? comp.inputInBib : comp.input),
|
|
15296
15286
|
});
|
|
@@ -16299,7 +16289,7 @@ class AuroMenuOption extends AuroElement {
|
|
|
16299
16289
|
});
|
|
16300
16290
|
|
|
16301
16291
|
return u$7`
|
|
16302
|
-
<div class="${classes}">
|
|
16292
|
+
<div class="${classes}" aria-disabled="${this.disabled ? 'true' : 'false'}">
|
|
16303
16293
|
${this.selected && !this.noCheckmark
|
|
16304
16294
|
? this.generateIconHtml(checkmarkIcon.svg)
|
|
16305
16295
|
: undefined}
|
|
@@ -17070,10 +17060,10 @@ class AuroMenu extends AuroElement {
|
|
|
17070
17060
|
|
|
17071
17061
|
// Event Bindings
|
|
17072
17062
|
|
|
17073
|
-
/**
|
|
17074
|
-
|
|
17075
|
-
|
|
17076
|
-
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
17063
|
+
// /**
|
|
17064
|
+
// * @private
|
|
17065
|
+
// */
|
|
17066
|
+
// this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
17077
17067
|
|
|
17078
17068
|
|
|
17079
17069
|
/**
|
|
@@ -17422,7 +17412,7 @@ class AuroMenu extends AuroElement {
|
|
|
17422
17412
|
|
|
17423
17413
|
this.provideContext();
|
|
17424
17414
|
|
|
17425
|
-
this.addEventListener('keydown', this.handleKeyDown);
|
|
17415
|
+
// this.addEventListener('keydown', this.handleKeyDown);
|
|
17426
17416
|
this.addEventListener('auroMenuOption-click', this.handleMouseSelect);
|
|
17427
17417
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
17428
17418
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
@@ -17430,7 +17420,7 @@ class AuroMenu extends AuroElement {
|
|
|
17430
17420
|
}
|
|
17431
17421
|
|
|
17432
17422
|
disconnectedCallback() {
|
|
17433
|
-
this.removeEventListener('keydown', this.handleKeyDown);
|
|
17423
|
+
// this.removeEventListener('keydown', this.handleKeyDown);
|
|
17434
17424
|
this.removeEventListener('auroMenuOption-click', this.handleMouseSelect);
|
|
17435
17425
|
this.removeEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
17436
17426
|
this.removeEventListener('slotchange', this.handleSlotChange);
|
|
@@ -17571,26 +17561,33 @@ class AuroMenu extends AuroElement {
|
|
|
17571
17561
|
|
|
17572
17562
|
// Event Handlers
|
|
17573
17563
|
|
|
17574
|
-
/**
|
|
17575
|
-
|
|
17576
|
-
|
|
17577
|
-
|
|
17578
|
-
|
|
17579
|
-
handleKeyDown(event) {
|
|
17580
|
-
|
|
17581
|
-
|
|
17582
|
-
|
|
17583
|
-
|
|
17584
|
-
|
|
17585
|
-
|
|
17586
|
-
|
|
17587
|
-
|
|
17588
|
-
|
|
17589
|
-
|
|
17590
|
-
|
|
17591
|
-
|
|
17592
|
-
|
|
17593
|
-
|
|
17564
|
+
// /**
|
|
17565
|
+
// * Handles keyboard navigation.
|
|
17566
|
+
// * @private
|
|
17567
|
+
// * @param {KeyboardEvent} event - Event object from the browser.
|
|
17568
|
+
// */
|
|
17569
|
+
// handleKeyDown(event) {
|
|
17570
|
+
// // Update to Chris keyboard handler
|
|
17571
|
+
// // We have a new "navigateArrow" function in that handler, maybe that replaces those keys here?
|
|
17572
|
+
// event.preventDefault();
|
|
17573
|
+
// switch (event.key) {
|
|
17574
|
+
// case "ArrowDown":
|
|
17575
|
+
// console.warn("ArrowDown key is pressed and heard from menu");
|
|
17576
|
+
// this.menuService.highlightNext();
|
|
17577
|
+
// break;
|
|
17578
|
+
// case "ArrowUp":
|
|
17579
|
+
// console.warn("ArrowUp key is pressed and heard from menu");
|
|
17580
|
+
// this.menuService.highlightPrevious();
|
|
17581
|
+
// break;
|
|
17582
|
+
// case "Tab":
|
|
17583
|
+
// case "Enter":
|
|
17584
|
+
// this.menuService.selectHighlightedOption();
|
|
17585
|
+
// // Does this need to get separated into two cases to handle the different expected behavior of tab vs enter?
|
|
17586
|
+
// break;
|
|
17587
|
+
// default:
|
|
17588
|
+
// break;
|
|
17589
|
+
// }
|
|
17590
|
+
// }
|
|
17594
17591
|
|
|
17595
17592
|
/**
|
|
17596
17593
|
* Navigates the menu options in the specified direction.
|
|
@@ -259,7 +259,6 @@
|
|
|
259
259
|
</td>
|
|
260
260
|
<td>
|
|
261
261
|
The current <code>focused</code> option is selected, the bib is closed and <strong>focus</strong> is moved to the <strong>clear button</strong> in the component trigger.
|
|
262
|
-
</div>
|
|
263
262
|
</td>
|
|
264
263
|
</tr>
|
|
265
264
|
<tr>
|
|
@@ -285,7 +284,7 @@
|
|
|
285
284
|
<td>
|
|
286
285
|
Advances the <code>focused</code> option to the first enabled option in the list.
|
|
287
286
|
<div class="note">
|
|
288
|
-
<strong>Note:</strong> the bib will <strong>NOT</strong> close and the page will <strong>NOT</strong> navigate to the previous focusable element in the tabindex order
|
|
287
|
+
<strong>Note:</strong> the bib will <strong>NOT</strong> close and the page will <strong>NOT</strong> navigate to the previous focusable element in the tabindex order.
|
|
289
288
|
</div>
|
|
290
289
|
</td>
|
|
291
290
|
</tr>
|