@aurodesignsystem-dev/auro-formkit 0.0.0-pr1398.2 → 0.0.0-pr1398.3
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 +129 -166
- package/components/combobox/demo/index.min.js +129 -166
- package/components/combobox/demo/keyboardBehavior.html +81 -0
- package/components/combobox/demo/keyboardBehavior.md +308 -0
- package/components/combobox/dist/index.js +87 -134
- package/components/combobox/dist/registered.js +87 -134
- package/components/counter/demo/api.min.js +157 -160
- package/components/counter/demo/index.min.js +157 -160
- package/components/counter/demo/keyboardBehavior.html +81 -0
- package/components/counter/demo/keyboardBehavior.md +127 -0
- package/components/counter/dist/auro-counter.d.ts +0 -7
- package/components/counter/dist/index.js +157 -160
- package/components/counter/dist/keyboardStrategy.d.ts +4 -0
- package/components/counter/dist/registered.js +157 -160
- package/components/datepicker/demo/api.min.js +89 -137
- package/components/datepicker/demo/index.min.js +89 -137
- package/components/datepicker/demo/keyboardBehavior.html +81 -0
- package/components/datepicker/demo/keyboardBehavior.md +24 -0
- package/components/datepicker/dist/index.js +84 -132
- package/components/datepicker/dist/registered.js +84 -132
- package/components/dropdown/demo/api.md +0 -1
- package/components/dropdown/demo/api.min.js +99 -140
- package/components/dropdown/demo/index.md +2 -2
- package/components/dropdown/demo/index.min.js +99 -140
- package/components/dropdown/demo/keyboardBehavior.html +81 -0
- package/components/dropdown/demo/keyboardBehavior.md +77 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -8
- package/components/dropdown/dist/auro-dropdownBib.d.ts +1 -50
- package/components/dropdown/dist/dropdownBibKeyboardStrategy.d.ts +7 -0
- package/components/dropdown/dist/index.js +83 -128
- package/components/dropdown/dist/registered.js +83 -128
- package/components/form/demo/api.min.js +466 -599
- package/components/form/demo/index.min.js +466 -599
- 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 +42 -32
- package/components/menu/demo/index.min.js +42 -32
- package/components/menu/dist/auro-menu.d.ts +3 -11
- package/components/menu/dist/index.js +42 -32
- package/components/menu/dist/registered.js +42 -32
- 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 +132 -167
- package/components/select/demo/index.min.js +132 -167
- package/components/select/demo/keyboardBehavior.html +81 -0
- package/components/select/demo/keyboardBehavior.md +246 -0
- package/components/select/dist/index.js +90 -135
- package/components/select/dist/registered.js +90 -135
- package/custom-elements.json +61 -89
- package/package.json +2 -2
|
@@ -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
|
});
|
|
@@ -3455,11 +3455,10 @@ class AuroFloatingUI {
|
|
|
3455
3455
|
return;
|
|
3456
3456
|
}
|
|
3457
3457
|
|
|
3458
|
-
const { activeElement } = document;
|
|
3459
3458
|
// if focus is still inside of trigger or bib, do not close
|
|
3460
3459
|
if (
|
|
3461
|
-
this.element.
|
|
3462
|
-
this.element.
|
|
3460
|
+
this.element.matches(":focus") ||
|
|
3461
|
+
this.element.matches(":focus-within")
|
|
3463
3462
|
) {
|
|
3464
3463
|
return;
|
|
3465
3464
|
}
|
|
@@ -4298,12 +4297,83 @@ let p$4 = class p{registerComponent(t,a){customElements.get(t)||customElements.d
|
|
|
4298
4297
|
|
|
4299
4298
|
var iconVersion$3 = '9.1.2';
|
|
4300
4299
|
|
|
4300
|
+
/**
|
|
4301
|
+
* Computes display state once per keydown event.
|
|
4302
|
+
* Centralizes null-safety checks and makes the shared/modal/popover branching explicit.
|
|
4303
|
+
*
|
|
4304
|
+
* @param {HTMLElement} component - The component with a dropdown reference.
|
|
4305
|
+
* @param {Object} [options] - Optional config.
|
|
4306
|
+
* @param {HTMLElement} [options.dropdown] - Explicit dropdown reference. Falls back to component.dropdown.
|
|
4307
|
+
* @param {Function} [options.inputResolver] - Called with (component, ctx) to resolve the active input element.
|
|
4308
|
+
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
4309
|
+
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
4310
|
+
*/
|
|
4311
|
+
function createDisplayContext(component, options = {}) {
|
|
4312
|
+
const dd = options.dropdown || component.dropdown;
|
|
4313
|
+
// isPopoverVisible reflects as the `open` attribute.
|
|
4314
|
+
// It reports whether the bib is open in any mode (popover or modal).
|
|
4315
|
+
const isExpanded = Boolean(dd && dd.isPopoverVisible);
|
|
4316
|
+
const isFullscreen = Boolean(dd && dd.isBibFullscreen);
|
|
4317
|
+
|
|
4318
|
+
const ctx = {
|
|
4319
|
+
isExpanded,
|
|
4320
|
+
isModal: isFullscreen,
|
|
4321
|
+
isPopover: !isFullscreen,
|
|
4322
|
+
activeInput: null,
|
|
4323
|
+
};
|
|
4324
|
+
|
|
4325
|
+
if (options.inputResolver) {
|
|
4326
|
+
const resolvedInput = options.inputResolver(component, ctx);
|
|
4327
|
+
// Guard against resolvers returning undefined or non-HTMLElement values.
|
|
4328
|
+
ctx.activeInput = resolvedInput instanceof HTMLElement ? resolvedInput : null;
|
|
4329
|
+
}
|
|
4330
|
+
|
|
4331
|
+
return ctx;
|
|
4332
|
+
}
|
|
4333
|
+
|
|
4334
|
+
/**
|
|
4335
|
+
* Wires up a keydown listener that dispatches to strategy[evt.key] or strategy.default.
|
|
4336
|
+
* Handles both sync and async handlers.
|
|
4337
|
+
* @param {HTMLElement} component - The component to attach the listener to.
|
|
4338
|
+
* @param {Object} strategy - Map of key names to handler functions.
|
|
4339
|
+
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
4340
|
+
*/
|
|
4341
|
+
function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
4342
|
+
component.addEventListener('keydown', async (evt) => {
|
|
4343
|
+
const handler = strategy[evt.key] || strategy.default;
|
|
4344
|
+
if (typeof handler === 'function') {
|
|
4345
|
+
const ctx = createDisplayContext(component, options);
|
|
4346
|
+
await handler(component, evt, ctx);
|
|
4347
|
+
}
|
|
4348
|
+
});
|
|
4349
|
+
}
|
|
4350
|
+
|
|
4301
4351
|
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
4352
|
|
|
4303
4353
|
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
4354
|
|
|
4305
4355
|
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
4356
|
|
|
4357
|
+
/**
|
|
4358
|
+
* Creates a keyboard strategy for dialog-specific key handling.
|
|
4359
|
+
* All other keydown behavior is left to the browser's native bubbling path.
|
|
4360
|
+
* @param {HTMLElement} bib - The dropdown bib element.
|
|
4361
|
+
* @returns {Object} Keyboard handlers keyed by `event.key`.
|
|
4362
|
+
*/
|
|
4363
|
+
// eslint-disable-next-line no-unused-vars
|
|
4364
|
+
function createDropdownBibKeyboardStrategy(bib) {
|
|
4365
|
+
return {
|
|
4366
|
+
// eslint-disable-next-line no-unused-vars
|
|
4367
|
+
Enter(_dialog, event) {
|
|
4368
|
+
// Floating UI handles Enter key to open the dropdown
|
|
4369
|
+
},
|
|
4370
|
+
// eslint-disable-next-line no-unused-vars
|
|
4371
|
+
Escape(_dialog, event) {
|
|
4372
|
+
// Floating UI handles Escape key to close the dropdown
|
|
4373
|
+
}
|
|
4374
|
+
};
|
|
4375
|
+
}
|
|
4376
|
+
|
|
4307
4377
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4308
4378
|
// See LICENSE in the project root for license information.
|
|
4309
4379
|
/* eslint-disable max-lines */
|
|
@@ -4428,26 +4498,11 @@ class AuroDropdownBib extends i$4 {
|
|
|
4428
4498
|
},
|
|
4429
4499
|
|
|
4430
4500
|
/**
|
|
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).
|
|
4501
|
+
* Tracks whether a menu option is currently highlighted.
|
|
4436
4502
|
* @private
|
|
4437
4503
|
*/
|
|
4438
4504
|
hasActiveDescendant: {
|
|
4439
4505
|
type: Boolean
|
|
4440
|
-
},
|
|
4441
|
-
|
|
4442
|
-
/**
|
|
4443
|
-
* When true, the keyboard bridge allows native Tab behavior
|
|
4444
|
-
* instead of intercepting it. Set this for bib consumers
|
|
4445
|
-
* (e.g. counter) whose content contains real focusable elements
|
|
4446
|
-
* that need native Tab navigation.
|
|
4447
|
-
* @private
|
|
4448
|
-
*/
|
|
4449
|
-
nativeFocusableContent: {
|
|
4450
|
-
type: Boolean
|
|
4451
4506
|
}
|
|
4452
4507
|
};
|
|
4453
4508
|
}
|
|
@@ -4517,7 +4572,7 @@ class AuroDropdownBib extends i$4 {
|
|
|
4517
4572
|
|
|
4518
4573
|
const dialog = this.shadowRoot.querySelector('dialog');
|
|
4519
4574
|
this._setupCancelHandler(dialog);
|
|
4520
|
-
|
|
4575
|
+
applyKeyboardStrategy(dialog, createDropdownBibKeyboardStrategy());
|
|
4521
4576
|
|
|
4522
4577
|
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
4523
4578
|
bubbles: true,
|
|
@@ -4544,98 +4599,6 @@ class AuroDropdownBib extends i$4 {
|
|
|
4544
4599
|
});
|
|
4545
4600
|
}
|
|
4546
4601
|
|
|
4547
|
-
/**
|
|
4548
|
-
* showModal() creates a closed focus scope — keyboard events inside
|
|
4549
|
-
* the dialog's shadow DOM do NOT bubble out to the combobox/select
|
|
4550
|
-
* keydown handlers in the parent shadow DOM. This handler bridges
|
|
4551
|
-
* that gap by re-dispatching navigation keys so they cross the
|
|
4552
|
-
* shadow boundary and reach the menu navigation logic in the parent
|
|
4553
|
-
* component.
|
|
4554
|
-
*
|
|
4555
|
-
* The trade-off: intercepting these keys means native keyboard
|
|
4556
|
-
* behaviors that would normally "just work" must be manually
|
|
4557
|
-
* re-implemented here:
|
|
4558
|
-
*
|
|
4559
|
-
* - Enter on buttons: Custom elements (auro-button) don't get the
|
|
4560
|
-
* native Enter→click that <button> provides, so we call .click()
|
|
4561
|
-
* directly when Enter is pressed on a button-like element.
|
|
4562
|
-
*
|
|
4563
|
-
* - Tab: Intercepted and re-dispatched so parent components
|
|
4564
|
-
* (select/combobox) can select the active option and close the
|
|
4565
|
-
* dialog. The <dialog> provides containment and isolation
|
|
4566
|
-
* (inert background, VoiceOver focus trapping, top layer), while
|
|
4567
|
-
* the content inside is a role="listbox" navigated via
|
|
4568
|
-
* aria-activedescendant (options are not focusable). Tab keyboard
|
|
4569
|
-
* behavior follows listbox conventions (select + close) because
|
|
4570
|
-
* the dialog's native Tab trap only cycles between the close
|
|
4571
|
-
* button and browser chrome.
|
|
4572
|
-
*
|
|
4573
|
-
* - Escape: The native <dialog> fires a `cancel` event on ESC
|
|
4574
|
-
* (handled by _setupCancelHandler), so the re-dispatched Escape
|
|
4575
|
-
* is a secondary path for parent components that also listen for
|
|
4576
|
-
* Escape keydown.
|
|
4577
|
-
*
|
|
4578
|
-
* @param {HTMLDialogElement} dialog - The dialog element to attach the keyboard bridge to.
|
|
4579
|
-
* @private
|
|
4580
|
-
*/
|
|
4581
|
-
_setupKeyboardBridge(dialog) {
|
|
4582
|
-
const navKeys = new Set([
|
|
4583
|
-
'ArrowUp',
|
|
4584
|
-
'ArrowDown',
|
|
4585
|
-
'Enter',
|
|
4586
|
-
'Escape',
|
|
4587
|
-
'Tab'
|
|
4588
|
-
]);
|
|
4589
|
-
|
|
4590
|
-
dialog.addEventListener('keydown', (event) => {
|
|
4591
|
-
if (!navKeys.has(event.key)) {
|
|
4592
|
-
return;
|
|
4593
|
-
}
|
|
4594
|
-
|
|
4595
|
-
// Custom elements (auro-button) don't get the native Enter→click
|
|
4596
|
-
// behavior that <button> has. Find the button in the composed path
|
|
4597
|
-
// and click it directly — but only when no menu option is
|
|
4598
|
-
// highlighted. In fullscreen mode focus stays on the close button
|
|
4599
|
-
// while arrow keys move the active-descendant highlight through
|
|
4600
|
-
// the listbox. If the user presses Enter with an option
|
|
4601
|
-
// highlighted, the intent is to select that option, not to click
|
|
4602
|
-
// the close button. In that case we fall through and bridge the
|
|
4603
|
-
// Enter key to the parent component's keyboard strategy.
|
|
4604
|
-
if (event.key === 'Enter') {
|
|
4605
|
-
if (!this.hasActiveDescendant) {
|
|
4606
|
-
const buttonSelector = 'button, [role="button"], auro-button, [auro-button]';
|
|
4607
|
-
const btn = event.composedPath().find((el) => el.matches && el.matches(buttonSelector));
|
|
4608
|
-
if (btn) {
|
|
4609
|
-
event.preventDefault();
|
|
4610
|
-
event.stopPropagation();
|
|
4611
|
-
btn.click();
|
|
4612
|
-
return;
|
|
4613
|
-
}
|
|
4614
|
-
}
|
|
4615
|
-
}
|
|
4616
|
-
|
|
4617
|
-
// Allow native Tab when the bib contains focusable content
|
|
4618
|
-
// (e.g. counter buttons) that needs normal Tab navigation.
|
|
4619
|
-
if (event.key === 'Tab' && this.nativeFocusableContent) {
|
|
4620
|
-
return;
|
|
4621
|
-
}
|
|
4622
|
-
|
|
4623
|
-
event.preventDefault();
|
|
4624
|
-
event.stopPropagation();
|
|
4625
|
-
const newEvent = new KeyboardEvent('keydown', {
|
|
4626
|
-
key: event.key,
|
|
4627
|
-
code: event.code,
|
|
4628
|
-
shiftKey: event.shiftKey,
|
|
4629
|
-
altKey: event.altKey,
|
|
4630
|
-
ctrlKey: event.ctrlKey,
|
|
4631
|
-
metaKey: event.metaKey,
|
|
4632
|
-
bubbles: true,
|
|
4633
|
-
composed: true,
|
|
4634
|
-
cancelable: true
|
|
4635
|
-
});
|
|
4636
|
-
this.dispatchEvent(newEvent);
|
|
4637
|
-
});
|
|
4638
|
-
}
|
|
4639
4602
|
|
|
4640
4603
|
/**
|
|
4641
4604
|
* Blocks touch-driven page scroll while a fullscreen modal dialog is open.
|
|
@@ -5010,7 +4973,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
|
|
|
5010
4973
|
}
|
|
5011
4974
|
};
|
|
5012
4975
|
|
|
5013
|
-
var formkitVersion$2 = '
|
|
4976
|
+
var formkitVersion$2 = '202604012043';
|
|
5014
4977
|
|
|
5015
4978
|
let AuroElement$2 = class AuroElement extends i$4 {
|
|
5016
4979
|
static get properties() {
|
|
@@ -5191,7 +5154,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5191
5154
|
this.appearance = 'default';
|
|
5192
5155
|
this.chevron = false;
|
|
5193
5156
|
this.disabled = false;
|
|
5194
|
-
this.disableFocusTrap = false;
|
|
5195
5157
|
this.error = false;
|
|
5196
5158
|
this.tabIndex = 0;
|
|
5197
5159
|
this.noToggle = false;
|
|
@@ -5289,9 +5251,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5289
5251
|
// showModal() fires asynchronously via Lit's update cycle, which
|
|
5290
5252
|
// falls outside the user activation window and causes iOS to
|
|
5291
5253
|
// dismiss the keyboard.
|
|
5292
|
-
if (this.
|
|
5293
|
-
|
|
5294
|
-
this.bibElement.value.open(useModal);
|
|
5254
|
+
if (this.bibElement && this.bibElement.value) {
|
|
5255
|
+
this.bibElement.value.open(this.isBibFullscreen);
|
|
5295
5256
|
}
|
|
5296
5257
|
}
|
|
5297
5258
|
|
|
@@ -5404,14 +5365,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5404
5365
|
reflect: true
|
|
5405
5366
|
},
|
|
5406
5367
|
|
|
5407
|
-
/**
|
|
5408
|
-
* If declared, the focus trap inside of bib will be turned off.
|
|
5409
|
-
*/
|
|
5410
|
-
disableFocusTrap: {
|
|
5411
|
-
type: Boolean,
|
|
5412
|
-
reflect: true
|
|
5413
|
-
},
|
|
5414
|
-
|
|
5415
5368
|
/**
|
|
5416
5369
|
* @private
|
|
5417
5370
|
*/
|
|
@@ -5685,7 +5638,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5685
5638
|
if (this.isPopoverVisible) {
|
|
5686
5639
|
// Fullscreen: use showModal() for native accessibility (inert outside, focus trap)
|
|
5687
5640
|
// Desktop: use show() for Floating UI positioning + FocusTrap for focus management
|
|
5688
|
-
const useModal = this.isBibFullscreen
|
|
5641
|
+
const useModal = this.isBibFullscreen;
|
|
5689
5642
|
this.bibElement.value.open(useModal);
|
|
5690
5643
|
} else {
|
|
5691
5644
|
this.bibElement.value.close();
|
|
@@ -5695,7 +5648,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5695
5648
|
// When fullscreen strategy changes while open, re-open dialog with correct mode
|
|
5696
5649
|
// (e.g. resizing from desktop → mobile while dropdown is open)
|
|
5697
5650
|
if (changedProperties.has('isBibFullscreen') && this.isPopoverVisible && this.bibElement.value) {
|
|
5698
|
-
const useModal = this.isBibFullscreen
|
|
5651
|
+
const useModal = this.isBibFullscreen;
|
|
5699
5652
|
this.bibElement.value.close();
|
|
5700
5653
|
this.bibElement.value.open(useModal);
|
|
5701
5654
|
}
|
|
@@ -5807,7 +5760,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5807
5760
|
* @private
|
|
5808
5761
|
*/
|
|
5809
5762
|
updateFocusTrap() {
|
|
5810
|
-
if (this.isPopoverVisible
|
|
5763
|
+
if (this.isPopoverVisible) {
|
|
5811
5764
|
if (!this.isBibFullscreen) {
|
|
5812
5765
|
// Desktop: show() doesn't trap focus, so use FocusTrap
|
|
5813
5766
|
this.focusTrap = new FocusTrap(this.bibContent);
|
|
@@ -12774,7 +12727,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
|
|
|
12774
12727
|
}
|
|
12775
12728
|
};
|
|
12776
12729
|
|
|
12777
|
-
var formkitVersion$1 = '
|
|
12730
|
+
var formkitVersion$1 = '202604012043';
|
|
12778
12731
|
|
|
12779
12732
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12780
12733
|
// See LICENSE in the project root for license information.
|
|
@@ -13813,7 +13766,7 @@ class AuroBibtemplate extends i$4 {
|
|
|
13813
13766
|
}
|
|
13814
13767
|
}
|
|
13815
13768
|
|
|
13816
|
-
var formkitVersion = '
|
|
13769
|
+
var formkitVersion = '202604012043';
|
|
13817
13770
|
|
|
13818
13771
|
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}`;
|
|
13819
13772
|
|
|
@@ -15307,7 +15260,7 @@ class AuroCombobox extends AuroElement {
|
|
|
15307
15260
|
* @returns {void}
|
|
15308
15261
|
*/
|
|
15309
15262
|
configureCombobox() {
|
|
15310
|
-
applyKeyboardStrategy(this, comboboxKeyboardStrategy, {
|
|
15263
|
+
applyKeyboardStrategy$1(this, comboboxKeyboardStrategy, {
|
|
15311
15264
|
// In modal mode the input moves into the bib; route keyboard events to that element instead.
|
|
15312
15265
|
inputResolver: (comp, ctx) => (ctx.isModal && comp.inputInBib ? comp.inputInBib : comp.input),
|
|
15313
15266
|
});
|
|
@@ -17087,10 +17040,10 @@ class AuroMenu extends AuroElement {
|
|
|
17087
17040
|
|
|
17088
17041
|
// Event Bindings
|
|
17089
17042
|
|
|
17090
|
-
/**
|
|
17091
|
-
|
|
17092
|
-
|
|
17093
|
-
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
17043
|
+
// /**
|
|
17044
|
+
// * @private
|
|
17045
|
+
// */
|
|
17046
|
+
// this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
17094
17047
|
|
|
17095
17048
|
|
|
17096
17049
|
/**
|
|
@@ -17339,6 +17292,13 @@ class AuroMenu extends AuroElement {
|
|
|
17339
17292
|
* @protected
|
|
17340
17293
|
*/
|
|
17341
17294
|
provideContext() {
|
|
17295
|
+
if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
|
|
17296
|
+
this.rootMenu = false;
|
|
17297
|
+
this.menuService = this.parentElement.menuService;
|
|
17298
|
+
this._contextProvider = this.parentElement._contextProvider;
|
|
17299
|
+
return;
|
|
17300
|
+
}
|
|
17301
|
+
|
|
17342
17302
|
this.menuService = new MenuService({host: this});
|
|
17343
17303
|
this.menuService.setProperties(this.propertyValues);
|
|
17344
17304
|
this.menuService.subscribe(this.handleMenuChange.bind(this));
|
|
@@ -17432,7 +17392,7 @@ class AuroMenu extends AuroElement {
|
|
|
17432
17392
|
|
|
17433
17393
|
this.provideContext();
|
|
17434
17394
|
|
|
17435
|
-
this.addEventListener('keydown', this.handleKeyDown);
|
|
17395
|
+
// this.addEventListener('keydown', this.handleKeyDown);
|
|
17436
17396
|
this.addEventListener('auroMenuOption-click', this.handleMouseSelect);
|
|
17437
17397
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
17438
17398
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
@@ -17440,7 +17400,7 @@ class AuroMenu extends AuroElement {
|
|
|
17440
17400
|
}
|
|
17441
17401
|
|
|
17442
17402
|
disconnectedCallback() {
|
|
17443
|
-
this.removeEventListener('keydown', this.handleKeyDown);
|
|
17403
|
+
// this.removeEventListener('keydown', this.handleKeyDown);
|
|
17444
17404
|
this.removeEventListener('auroMenuOption-click', this.handleMouseSelect);
|
|
17445
17405
|
this.removeEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
17446
17406
|
this.removeEventListener('slotchange', this.handleSlotChange);
|
|
@@ -17521,9 +17481,9 @@ class AuroMenu extends AuroElement {
|
|
|
17521
17481
|
if (this.multiSelect) {
|
|
17522
17482
|
this.setAttribute('aria-multiselectable', 'true');
|
|
17523
17483
|
}
|
|
17524
|
-
|
|
17525
|
-
this.handleNestedMenus(this);
|
|
17526
17484
|
}
|
|
17485
|
+
|
|
17486
|
+
this.handleNestedMenus(this);
|
|
17527
17487
|
}
|
|
17528
17488
|
|
|
17529
17489
|
/**
|
|
@@ -17581,26 +17541,33 @@ class AuroMenu extends AuroElement {
|
|
|
17581
17541
|
|
|
17582
17542
|
// Event Handlers
|
|
17583
17543
|
|
|
17584
|
-
/**
|
|
17585
|
-
|
|
17586
|
-
|
|
17587
|
-
|
|
17588
|
-
|
|
17589
|
-
handleKeyDown(event) {
|
|
17590
|
-
|
|
17591
|
-
|
|
17592
|
-
|
|
17593
|
-
|
|
17594
|
-
|
|
17595
|
-
|
|
17596
|
-
|
|
17597
|
-
|
|
17598
|
-
|
|
17599
|
-
|
|
17600
|
-
|
|
17601
|
-
|
|
17602
|
-
|
|
17603
|
-
|
|
17544
|
+
// /**
|
|
17545
|
+
// * Handles keyboard navigation.
|
|
17546
|
+
// * @private
|
|
17547
|
+
// * @param {KeyboardEvent} event - Event object from the browser.
|
|
17548
|
+
// */
|
|
17549
|
+
// handleKeyDown(event) {
|
|
17550
|
+
// // Update to Chris keyboard handler
|
|
17551
|
+
// // We have a new "navigateArrow" function in that handler, maybe that replaces those keys here?
|
|
17552
|
+
// event.preventDefault();
|
|
17553
|
+
// switch (event.key) {
|
|
17554
|
+
// case "ArrowDown":
|
|
17555
|
+
// console.warn("ArrowDown key is pressed and heard from menu");
|
|
17556
|
+
// this.menuService.highlightNext();
|
|
17557
|
+
// break;
|
|
17558
|
+
// case "ArrowUp":
|
|
17559
|
+
// console.warn("ArrowUp key is pressed and heard from menu");
|
|
17560
|
+
// this.menuService.highlightPrevious();
|
|
17561
|
+
// break;
|
|
17562
|
+
// case "Tab":
|
|
17563
|
+
// case "Enter":
|
|
17564
|
+
// this.menuService.selectHighlightedOption();
|
|
17565
|
+
// // Does this need to get separated into two cases to handle the different expected behavior of tab vs enter?
|
|
17566
|
+
// break;
|
|
17567
|
+
// default:
|
|
17568
|
+
// break;
|
|
17569
|
+
// }
|
|
17570
|
+
// }
|
|
17604
17571
|
|
|
17605
17572
|
/**
|
|
17606
17573
|
* Navigates the menu options in the specified direction.
|
|
@@ -17620,10 +17587,6 @@ class AuroMenu extends AuroElement {
|
|
|
17620
17587
|
* @private
|
|
17621
17588
|
*/
|
|
17622
17589
|
handleSlotChange() {
|
|
17623
|
-
if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
|
|
17624
|
-
this.rootMenu = false;
|
|
17625
|
-
}
|
|
17626
|
-
|
|
17627
17590
|
if (this.rootMenu) {
|
|
17628
17591
|
this.initializeMenu();
|
|
17629
17592
|
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3
|
+
See LICENSE in the project root for license information.
|
|
4
|
+
|
|
5
|
+
HTML in this document is standardized and NOT to be edited.
|
|
6
|
+
All demo code should be added/edited in ./demo/index.md
|
|
7
|
+
|
|
8
|
+
With the exception of adding custom elements if needed for the demo.
|
|
9
|
+
|
|
10
|
+
----------------------- DO NOT EDIT -----------------------------
|
|
11
|
+
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
<!DOCTYPE html>
|
|
15
|
+
<html lang="en">
|
|
16
|
+
<head>
|
|
17
|
+
<meta charset="UTF-8" />
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
|
+
<title>Auro Web Component Demo | auro-combobox</title>
|
|
20
|
+
|
|
21
|
+
<!-- Prism.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
|
|
23
|
+
|
|
24
|
+
<!-- Legacy reference is still needed to support auro-combobox's use of legacy token values at this time -->
|
|
25
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
26
|
+
|
|
27
|
+
<!-- Design Token Alaska Theme -->
|
|
28
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
29
|
+
|
|
30
|
+
<!-- Webcore Stylesheet Alaska Theme -->
|
|
31
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
32
|
+
|
|
33
|
+
<!-- Demo Specific Styles -->
|
|
34
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
35
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
36
|
+
<style>
|
|
37
|
+
table {
|
|
38
|
+
--ds-color-container-secondary-default: transparent;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
tr:not(:last-of-type) {
|
|
42
|
+
border-bottom: 1px solid var(--ds-color-border-tertiary-default);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
sup {
|
|
46
|
+
font-size: 60%;
|
|
47
|
+
font-style: italic;
|
|
48
|
+
opacity: 0.6;
|
|
49
|
+
top: -.5rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.note {
|
|
53
|
+
margin: 10px 0;
|
|
54
|
+
padding: 10px;
|
|
55
|
+
border-radius: 6px;
|
|
56
|
+
font-style: italic;
|
|
57
|
+
color: var(--ds-basic-color-texticon-muted);
|
|
58
|
+
background-color: var(--ds-basic-color-surface-neutral-subtle);
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
61
|
+
</head>
|
|
62
|
+
<body class="auro-markdown">
|
|
63
|
+
<main></main>
|
|
64
|
+
|
|
65
|
+
<script type="module">
|
|
66
|
+
import 'https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js';
|
|
67
|
+
import 'https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js';
|
|
68
|
+
fetch('./keyboardBehavior.md')
|
|
69
|
+
.then((response) => response.text())
|
|
70
|
+
.then((text) => {
|
|
71
|
+
const rawHtml = marked.parse(text);
|
|
72
|
+
document.querySelector('main').innerHTML = rawHtml;
|
|
73
|
+
Prism.highlightAll();
|
|
74
|
+
})
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<!-- If additional elements are needed for the demo, add them here. -->
|
|
78
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/+esm" type="module"></script>
|
|
79
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/+esm" type="module"></script>
|
|
80
|
+
</body>
|
|
81
|
+
</html>
|