@aurodesignsystem-dev/auro-formkit 0.0.0-pr1408.8 → 0.0.0-pr1411.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +121 -144
- package/components/combobox/demo/index.min.js +121 -144
- package/components/combobox/demo/keyboardBehavior.html +1 -0
- package/components/combobox/demo/keyboardBehavior.md +21 -22
- package/components/combobox/dist/index.js +87 -117
- package/components/combobox/dist/registered.js +87 -117
- package/components/counter/demo/api.md +1 -1
- package/components/counter/demo/api.min.js +184 -148
- package/components/counter/demo/index.min.js +184 -148
- 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 +184 -148
- package/components/counter/dist/keyboardStrategy.d.ts +4 -0
- package/components/counter/dist/registered.js +184 -148
- package/components/datepicker/demo/api.min.js +89 -120
- package/components/datepicker/demo/index.min.js +89 -120
- package/components/datepicker/demo/keyboardBehavior.html +1 -0
- package/components/datepicker/demo/keyboardBehavior.md +14 -13
- package/components/datepicker/dist/index.js +84 -115
- package/components/datepicker/dist/registered.js +84 -115
- package/components/dropdown/demo/api.md +0 -1
- package/components/dropdown/demo/api.min.js +99 -123
- package/components/dropdown/demo/index.md +2 -2
- package/components/dropdown/demo/index.min.js +99 -123
- package/components/dropdown/demo/keyboardBehavior.html +1 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -8
- 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 +83 -111
- package/components/dropdown/dist/registered.js +83 -111
- package/components/form/demo/api.min.js +542 -564
- package/components/form/demo/index.min.js +542 -564
- 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 +181 -178
- package/components/select/demo/index.min.js +181 -178
- package/components/select/demo/keyboardBehavior.html +1 -0
- package/components/select/demo/keyboardBehavior.md +240 -239
- package/components/select/dist/index.js +147 -151
- package/components/select/dist/registered.js +147 -151
- package/components/select/dist/selectKeyboardStrategy.d.ts +3 -1
- package/custom-elements.json +1521 -1503
- package/package.json +5 -3
|
@@ -1233,7 +1233,7 @@ function restoreTriggerAfterClose(dropdown, focusTarget) {
|
|
|
1233
1233
|
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
1234
1234
|
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
1235
1235
|
*/
|
|
1236
|
-
function createDisplayContext(component, options = {}) {
|
|
1236
|
+
function createDisplayContext$1(component, options = {}) {
|
|
1237
1237
|
const dd = options.dropdown || component.dropdown;
|
|
1238
1238
|
// isPopoverVisible reflects as the `open` attribute.
|
|
1239
1239
|
// It reports whether the bib is open in any mode (popover or modal).
|
|
@@ -1263,11 +1263,11 @@ function createDisplayContext(component, options = {}) {
|
|
|
1263
1263
|
* @param {Object} strategy - Map of key names to handler functions.
|
|
1264
1264
|
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
1265
1265
|
*/
|
|
1266
|
-
function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
1266
|
+
function applyKeyboardStrategy$1(component, strategy, options = {}) {
|
|
1267
1267
|
component.addEventListener('keydown', async (evt) => {
|
|
1268
1268
|
const handler = strategy[evt.key] || strategy.default;
|
|
1269
1269
|
if (typeof handler === 'function') {
|
|
1270
|
-
const ctx = createDisplayContext(component, options);
|
|
1270
|
+
const ctx = createDisplayContext$1(component, options);
|
|
1271
1271
|
await handler(component, evt, ctx);
|
|
1272
1272
|
}
|
|
1273
1273
|
});
|
|
@@ -1293,24 +1293,39 @@ function navigateArrow(component, direction, options = {}) {
|
|
|
1293
1293
|
|
|
1294
1294
|
const selectKeyboardStrategy = {
|
|
1295
1295
|
ArrowUp(component, evt, ctx) {
|
|
1296
|
+
// Navigate menu only if the bib is open, otherwise open the bib
|
|
1296
1297
|
evt.preventDefault();
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1298
|
+
if (evt.altKey || evt.metaKey) ; else if (component.dropdown.isPopoverVisible) {
|
|
1299
|
+
navigateArrow(component, 'up', {
|
|
1300
|
+
ctx,
|
|
1301
|
+
showFn: () => component.dropdown.show(),
|
|
1302
|
+
});
|
|
1303
|
+
} else {
|
|
1304
|
+
component.dropdown.show();
|
|
1305
|
+
}
|
|
1301
1306
|
},
|
|
1302
1307
|
|
|
1303
1308
|
ArrowDown(component, evt, ctx) {
|
|
1309
|
+
// Navigate menu only if the bib is open, otherwise open the bib
|
|
1304
1310
|
evt.preventDefault();
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1311
|
+
if (evt.altKey || evt.metaKey) ; else if (component.dropdown.isPopoverVisible) {
|
|
1312
|
+
navigateArrow(component, 'down', {
|
|
1313
|
+
ctx,
|
|
1314
|
+
showFn: () => component.dropdown.show(),
|
|
1315
|
+
});
|
|
1316
|
+
} else {
|
|
1317
|
+
component.dropdown.show();
|
|
1318
|
+
}
|
|
1309
1319
|
},
|
|
1310
1320
|
|
|
1311
|
-
Enter(component, evt) {
|
|
1312
|
-
|
|
1313
|
-
|
|
1321
|
+
Enter(component, evt, ctx) {
|
|
1322
|
+
if (!ctx.isExpanded && ctx.isPopover) {
|
|
1323
|
+
component.menu.makeSelection();
|
|
1324
|
+
} else if (ctx.isModal && !evt.defaultPrevented) {
|
|
1325
|
+
// for modal, isExpanded is always true
|
|
1326
|
+
// defaultPrevented will be true if Floating UI has already handled the event to open the dropdown
|
|
1327
|
+
component.menu.makeSelection();
|
|
1328
|
+
}
|
|
1314
1329
|
},
|
|
1315
1330
|
|
|
1316
1331
|
Tab(component, evt, ctx) {
|
|
@@ -1318,17 +1333,6 @@ const selectKeyboardStrategy = {
|
|
|
1318
1333
|
return;
|
|
1319
1334
|
}
|
|
1320
1335
|
|
|
1321
|
-
// Shift+Tab moves the highlight to the first non-disabled option
|
|
1322
|
-
// without making a selection or closing the bib.
|
|
1323
|
-
if (evt.shiftKey) {
|
|
1324
|
-
evt.preventDefault();
|
|
1325
|
-
const firstActive = component.menu.menuService.menuOptions.find((option) => option.isActive);
|
|
1326
|
-
if (firstActive) {
|
|
1327
|
-
component.menu.updateActiveOption(firstActive);
|
|
1328
|
-
}
|
|
1329
|
-
return;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
1336
|
// Tab selects the focused option and closes the popup per the
|
|
1333
1337
|
// WAI-ARIA APG select-only combobox / listbox pattern.
|
|
1334
1338
|
if (component.optionActive && !component.multiSelect) {
|
|
@@ -1336,6 +1340,23 @@ const selectKeyboardStrategy = {
|
|
|
1336
1340
|
}
|
|
1337
1341
|
component.dropdown.hide();
|
|
1338
1342
|
},
|
|
1343
|
+
Home(component, evt) {
|
|
1344
|
+
evt.preventDefault();
|
|
1345
|
+
evt.stopPropagation();
|
|
1346
|
+
const firstOption = component.menu.menuService.menuOptions.find((option) => !option.disabled);
|
|
1347
|
+
if (firstOption) {
|
|
1348
|
+
component.menu.updateActiveOption(firstOption);
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
|
|
1352
|
+
End(component, evt) {
|
|
1353
|
+
evt.preventDefault();
|
|
1354
|
+
evt.stopPropagation();
|
|
1355
|
+
const lastOption = [...component.menu.menuService.menuOptions].reverse().find((option) => !option.disabled);
|
|
1356
|
+
if (lastOption) {
|
|
1357
|
+
component.menu.updateActiveOption(lastOption);
|
|
1358
|
+
}
|
|
1359
|
+
},
|
|
1339
1360
|
|
|
1340
1361
|
default(component, evt) {
|
|
1341
1362
|
component.updateActiveOptionBasedOnKey(evt.key);
|
|
@@ -3455,11 +3476,10 @@ class AuroFloatingUI {
|
|
|
3455
3476
|
return;
|
|
3456
3477
|
}
|
|
3457
3478
|
|
|
3458
|
-
const { activeElement } = document;
|
|
3459
3479
|
// if focus is still inside of trigger or bib, do not close
|
|
3460
3480
|
if (
|
|
3461
|
-
this.element.
|
|
3462
|
-
this.element.
|
|
3481
|
+
this.element.matches(":focus") ||
|
|
3482
|
+
this.element.matches(":focus-within")
|
|
3463
3483
|
) {
|
|
3464
3484
|
return;
|
|
3465
3485
|
}
|
|
@@ -4298,12 +4318,83 @@ let p$3 = class p{registerComponent(t,a){customElements.get(t)||customElements.d
|
|
|
4298
4318
|
|
|
4299
4319
|
var iconVersion$2 = '9.1.2';
|
|
4300
4320
|
|
|
4321
|
+
/**
|
|
4322
|
+
* Computes display state once per keydown event.
|
|
4323
|
+
* Centralizes null-safety checks and makes the shared/modal/popover branching explicit.
|
|
4324
|
+
*
|
|
4325
|
+
* @param {HTMLElement} component - The component with a dropdown reference.
|
|
4326
|
+
* @param {Object} [options] - Optional config.
|
|
4327
|
+
* @param {HTMLElement} [options.dropdown] - Explicit dropdown reference. Falls back to component.dropdown.
|
|
4328
|
+
* @param {Function} [options.inputResolver] - Called with (component, ctx) to resolve the active input element.
|
|
4329
|
+
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
4330
|
+
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
4331
|
+
*/
|
|
4332
|
+
function createDisplayContext(component, options = {}) {
|
|
4333
|
+
const dd = options.dropdown || component.dropdown;
|
|
4334
|
+
// isPopoverVisible reflects as the `open` attribute.
|
|
4335
|
+
// It reports whether the bib is open in any mode (popover or modal).
|
|
4336
|
+
const isExpanded = Boolean(dd && dd.isPopoverVisible);
|
|
4337
|
+
const isFullscreen = Boolean(dd && dd.isBibFullscreen);
|
|
4338
|
+
|
|
4339
|
+
const ctx = {
|
|
4340
|
+
isExpanded,
|
|
4341
|
+
isModal: isFullscreen,
|
|
4342
|
+
isPopover: !isFullscreen,
|
|
4343
|
+
activeInput: null,
|
|
4344
|
+
};
|
|
4345
|
+
|
|
4346
|
+
if (options.inputResolver) {
|
|
4347
|
+
const resolvedInput = options.inputResolver(component, ctx);
|
|
4348
|
+
// Guard against resolvers returning undefined or non-HTMLElement values.
|
|
4349
|
+
ctx.activeInput = resolvedInput instanceof HTMLElement ? resolvedInput : null;
|
|
4350
|
+
}
|
|
4351
|
+
|
|
4352
|
+
return ctx;
|
|
4353
|
+
}
|
|
4354
|
+
|
|
4355
|
+
/**
|
|
4356
|
+
* Wires up a keydown listener that dispatches to strategy[evt.key] or strategy.default.
|
|
4357
|
+
* Handles both sync and async handlers.
|
|
4358
|
+
* @param {HTMLElement} component - The component to attach the listener to.
|
|
4359
|
+
* @param {Object} strategy - Map of key names to handler functions.
|
|
4360
|
+
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
4361
|
+
*/
|
|
4362
|
+
function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
4363
|
+
component.addEventListener('keydown', async (evt) => {
|
|
4364
|
+
const handler = strategy[evt.key] || strategy.default;
|
|
4365
|
+
if (typeof handler === 'function') {
|
|
4366
|
+
const ctx = createDisplayContext(component, options);
|
|
4367
|
+
await handler(component, evt, ctx);
|
|
4368
|
+
}
|
|
4369
|
+
});
|
|
4370
|
+
}
|
|
4371
|
+
|
|
4301
4372
|
var styleCss$2$1 = i$6`: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
4373
|
|
|
4303
4374
|
var colorCss$2$1 = i$6`.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
4375
|
|
|
4305
4376
|
var tokensCss$1$1 = i$6`: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
4377
|
|
|
4378
|
+
/**
|
|
4379
|
+
* Creates a keyboard strategy for dialog-specific key handling.
|
|
4380
|
+
* All other keydown behavior is left to the browser's native bubbling path.
|
|
4381
|
+
* @param {HTMLElement} bib - The dropdown bib element.
|
|
4382
|
+
* @returns {Object} Keyboard handlers keyed by `event.key`.
|
|
4383
|
+
*/
|
|
4384
|
+
// eslint-disable-next-line no-unused-vars
|
|
4385
|
+
function createDropdownBibKeyboardStrategy(bib) {
|
|
4386
|
+
return {
|
|
4387
|
+
// eslint-disable-next-line no-unused-vars
|
|
4388
|
+
Enter(_dialog, event) {
|
|
4389
|
+
// Floating UI handles Enter key to open the dropdown
|
|
4390
|
+
},
|
|
4391
|
+
// eslint-disable-next-line no-unused-vars
|
|
4392
|
+
Escape(_dialog, event) {
|
|
4393
|
+
// Floating UI handles Escape key to close the dropdown
|
|
4394
|
+
}
|
|
4395
|
+
};
|
|
4396
|
+
}
|
|
4397
|
+
|
|
4307
4398
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4308
4399
|
// See LICENSE in the project root for license information.
|
|
4309
4400
|
/* eslint-disable max-lines */
|
|
@@ -4428,11 +4519,7 @@ class AuroDropdownBib extends i$3 {
|
|
|
4428
4519
|
},
|
|
4429
4520
|
|
|
4430
4521
|
/**
|
|
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).
|
|
4522
|
+
* Tracks whether a menu option is currently highlighted.
|
|
4436
4523
|
* @private
|
|
4437
4524
|
*/
|
|
4438
4525
|
hasActiveDescendant: {
|
|
@@ -4506,7 +4593,7 @@ class AuroDropdownBib extends i$3 {
|
|
|
4506
4593
|
|
|
4507
4594
|
const dialog = this.shadowRoot.querySelector('dialog');
|
|
4508
4595
|
this._setupCancelHandler(dialog);
|
|
4509
|
-
|
|
4596
|
+
applyKeyboardStrategy(dialog, createDropdownBibKeyboardStrategy());
|
|
4510
4597
|
|
|
4511
4598
|
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
4512
4599
|
bubbles: true,
|
|
@@ -4533,92 +4620,6 @@ class AuroDropdownBib extends i$3 {
|
|
|
4533
4620
|
});
|
|
4534
4621
|
}
|
|
4535
4622
|
|
|
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
4623
|
|
|
4623
4624
|
/**
|
|
4624
4625
|
* Blocks touch-driven page scroll while a fullscreen modal dialog is open.
|
|
@@ -4993,7 +4994,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
4993
4994
|
}
|
|
4994
4995
|
};
|
|
4995
4996
|
|
|
4996
|
-
var formkitVersion$1 = '
|
|
4997
|
+
var formkitVersion$1 = '202604021512';
|
|
4997
4998
|
|
|
4998
4999
|
class AuroElement extends i$3 {
|
|
4999
5000
|
static get properties() {
|
|
@@ -5174,7 +5175,6 @@ class AuroDropdown extends AuroElement {
|
|
|
5174
5175
|
this.appearance = 'default';
|
|
5175
5176
|
this.chevron = false;
|
|
5176
5177
|
this.disabled = false;
|
|
5177
|
-
this.disableFocusTrap = false;
|
|
5178
5178
|
this.error = false;
|
|
5179
5179
|
this.tabIndex = 0;
|
|
5180
5180
|
this.noToggle = false;
|
|
@@ -5272,9 +5272,8 @@ class AuroDropdown extends AuroElement {
|
|
|
5272
5272
|
// showModal() fires asynchronously via Lit's update cycle, which
|
|
5273
5273
|
// falls outside the user activation window and causes iOS to
|
|
5274
5274
|
// dismiss the keyboard.
|
|
5275
|
-
if (this.
|
|
5276
|
-
|
|
5277
|
-
this.bibElement.value.open(useModal);
|
|
5275
|
+
if (this.bibElement && this.bibElement.value) {
|
|
5276
|
+
this.bibElement.value.open(this.isBibFullscreen);
|
|
5278
5277
|
}
|
|
5279
5278
|
}
|
|
5280
5279
|
|
|
@@ -5387,14 +5386,6 @@ class AuroDropdown extends AuroElement {
|
|
|
5387
5386
|
reflect: true
|
|
5388
5387
|
},
|
|
5389
5388
|
|
|
5390
|
-
/**
|
|
5391
|
-
* If declared, the focus trap inside of bib will be turned off.
|
|
5392
|
-
*/
|
|
5393
|
-
disableFocusTrap: {
|
|
5394
|
-
type: Boolean,
|
|
5395
|
-
reflect: true
|
|
5396
|
-
},
|
|
5397
|
-
|
|
5398
5389
|
/**
|
|
5399
5390
|
* @private
|
|
5400
5391
|
*/
|
|
@@ -5668,7 +5659,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5668
5659
|
if (this.isPopoverVisible) {
|
|
5669
5660
|
// Fullscreen: use showModal() for native accessibility (inert outside, focus trap)
|
|
5670
5661
|
// Desktop: use show() for Floating UI positioning + FocusTrap for focus management
|
|
5671
|
-
const useModal = this.isBibFullscreen
|
|
5662
|
+
const useModal = this.isBibFullscreen;
|
|
5672
5663
|
this.bibElement.value.open(useModal);
|
|
5673
5664
|
} else {
|
|
5674
5665
|
this.bibElement.value.close();
|
|
@@ -5678,7 +5669,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5678
5669
|
// When fullscreen strategy changes while open, re-open dialog with correct mode
|
|
5679
5670
|
// (e.g. resizing from desktop → mobile while dropdown is open)
|
|
5680
5671
|
if (changedProperties.has('isBibFullscreen') && this.isPopoverVisible && this.bibElement.value) {
|
|
5681
|
-
const useModal = this.isBibFullscreen
|
|
5672
|
+
const useModal = this.isBibFullscreen;
|
|
5682
5673
|
this.bibElement.value.close();
|
|
5683
5674
|
this.bibElement.value.open(useModal);
|
|
5684
5675
|
}
|
|
@@ -5790,7 +5781,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5790
5781
|
* @private
|
|
5791
5782
|
*/
|
|
5792
5783
|
updateFocusTrap() {
|
|
5793
|
-
if (this.isPopoverVisible
|
|
5784
|
+
if (this.isPopoverVisible) {
|
|
5794
5785
|
if (!this.isBibFullscreen) {
|
|
5795
5786
|
// Desktop: show() doesn't trap focus, so use FocusTrap
|
|
5796
5787
|
this.focusTrap = new FocusTrap(this.bibContent);
|
|
@@ -6746,7 +6737,7 @@ class AuroHelpText extends i$3 {
|
|
|
6746
6737
|
}
|
|
6747
6738
|
}
|
|
6748
6739
|
|
|
6749
|
-
var formkitVersion = '
|
|
6740
|
+
var formkitVersion = '202604021512';
|
|
6750
6741
|
|
|
6751
6742
|
var styleCss$2 = i$6`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-outline-color: var(--ds-auro-select-outline-color)}:host{display:inline-block;text-align:left;vertical-align:top}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.mainContent{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-100, 0.5rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-200, 1rem)}:host([layout*=snowflake]) label{padding-block:var(--ds-size-25, 0.125rem)}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) .value{height:auto}label{color:var(--ds-auro-select-label-text-color)}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown],:host([appearance=inverse]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([fluid]){width:100%}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown],:host([disabled]:not([appearance=inverse])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown],:host(:not([layout*=classic])[disabled][appearance=inverse]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
|
|
6752
6743
|
|
|
@@ -7268,7 +7259,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7268
7259
|
|
|
7269
7260
|
// Prevent dropdown from closing on focus loss since menu content is slotted
|
|
7270
7261
|
// from select's light DOM and won't be detected by dropdown's contains() check.
|
|
7271
|
-
// Select handles Tab key closing explicitly,
|
|
7262
|
+
// Select handles Tab key closing explicitly, `Escape` key via dialog cancel, and
|
|
7272
7263
|
// click outside works correctly via composedPath().
|
|
7273
7264
|
this.dropdown.noHideOnThisFocusLoss = true;
|
|
7274
7265
|
|
|
@@ -7281,12 +7272,28 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7281
7272
|
this.dropdown.setActiveDescendant(null);
|
|
7282
7273
|
this.optionActive = null;
|
|
7283
7274
|
|
|
7284
|
-
|
|
7275
|
+
if (this.dropdown.isBibFullscreen) {
|
|
7276
|
+
restoreTriggerAfterClose(this.dropdown, this.dropdown.trigger);
|
|
7277
|
+
}
|
|
7285
7278
|
}
|
|
7286
7279
|
|
|
7287
7280
|
if (this.dropdown.isPopoverVisible) {
|
|
7288
7281
|
this.updateMenuShapeSize();
|
|
7289
7282
|
|
|
7283
|
+
// If there's a selected option, highlight it (per W3C APG combobox-select-only pattern)
|
|
7284
|
+
// No selection → first enabled option gets highlighted
|
|
7285
|
+
if (this.optionSelected && !Array.isArray(this.optionSelected)) {
|
|
7286
|
+
this.menu.updateActiveOption(this.optionSelected);
|
|
7287
|
+
} else if (this.multiSelect && Array.isArray(this.optionSelected) && this.optionSelected.length > 0) {
|
|
7288
|
+
this.menu.updateActiveOption(this.optionSelected[0]);
|
|
7289
|
+
} else if (!this.menu.optionActive) {
|
|
7290
|
+
// If no activeOption has yet to be set, then make the first enabled option active by default
|
|
7291
|
+
const firstActive = this.menu.menuService.menuOptions.find((option) => !option.disabled);
|
|
7292
|
+
this.menu.updateActiveOption(firstActive);
|
|
7293
|
+
}
|
|
7294
|
+
|
|
7295
|
+
// Scroll the selected option into view when dropdown opens
|
|
7296
|
+
this.scrollSelectedOptionIntoView();
|
|
7290
7297
|
if (this.dropdown.isBibFullscreen) {
|
|
7291
7298
|
// Hide the trigger from assistive technology so VoiceOver cannot reach it
|
|
7292
7299
|
// behind the fullscreen dialog
|
|
@@ -7298,17 +7305,6 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7298
7305
|
// multiple Lit update cycles before moving focus into the bib
|
|
7299
7306
|
doubleRaf(() => {
|
|
7300
7307
|
this.bibtemplate.focusCloseButton();
|
|
7301
|
-
|
|
7302
|
-
// If there's a selected option, highlight it (per W3C APG combobox-select-only pattern)
|
|
7303
|
-
// No selection → no highlight
|
|
7304
|
-
if (this.optionSelected && !Array.isArray(this.optionSelected)) {
|
|
7305
|
-
this.menu.updateActiveOption(this.optionSelected);
|
|
7306
|
-
} else if (this.multiSelect && Array.isArray(this.optionSelected) && this.optionSelected.length > 0) {
|
|
7307
|
-
this.menu.updateActiveOption(this.optionSelected[0]);
|
|
7308
|
-
}
|
|
7309
|
-
|
|
7310
|
-
// Scroll the selected option into view when dropdown opens
|
|
7311
|
-
this.scrollSelectedOptionIntoView();
|
|
7312
7308
|
});
|
|
7313
7309
|
} else {
|
|
7314
7310
|
// wait til the bib gets fully rendered
|
|
@@ -7555,7 +7551,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7555
7551
|
configureSelect() {
|
|
7556
7552
|
this.nativeSelect = this.shadowRoot.querySelector('select');
|
|
7557
7553
|
|
|
7558
|
-
applyKeyboardStrategy(this, selectKeyboardStrategy);
|
|
7554
|
+
applyKeyboardStrategy$1(this, selectKeyboardStrategy);
|
|
7559
7555
|
|
|
7560
7556
|
this.addEventListener('focusin', this.handleFocusin);
|
|
7561
7557
|
|
|
@@ -8835,7 +8831,7 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
8835
8831
|
});
|
|
8836
8832
|
|
|
8837
8833
|
return u$4`
|
|
8838
|
-
<div class="${classes}">
|
|
8834
|
+
<div class="${classes}" aria-disabled="${this.disabled ? 'true' : 'false'}">
|
|
8839
8835
|
${this.selected && !this.noCheckmark
|
|
8840
8836
|
? this.generateIconHtml(checkmarkIcon.svg)
|
|
8841
8837
|
: undefined}
|
|
@@ -9606,10 +9602,10 @@ class AuroMenu extends AuroElement$1 {
|
|
|
9606
9602
|
|
|
9607
9603
|
// Event Bindings
|
|
9608
9604
|
|
|
9609
|
-
/**
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
9605
|
+
// /**
|
|
9606
|
+
// * @private
|
|
9607
|
+
// */
|
|
9608
|
+
// this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
9613
9609
|
|
|
9614
9610
|
|
|
9615
9611
|
/**
|
|
@@ -9958,7 +9954,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
9958
9954
|
|
|
9959
9955
|
this.provideContext();
|
|
9960
9956
|
|
|
9961
|
-
this.addEventListener('keydown', this.handleKeyDown);
|
|
9957
|
+
// this.addEventListener('keydown', this.handleKeyDown);
|
|
9962
9958
|
this.addEventListener('auroMenuOption-click', this.handleMouseSelect);
|
|
9963
9959
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
9964
9960
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
@@ -9966,7 +9962,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
9966
9962
|
}
|
|
9967
9963
|
|
|
9968
9964
|
disconnectedCallback() {
|
|
9969
|
-
this.removeEventListener('keydown', this.handleKeyDown);
|
|
9965
|
+
// this.removeEventListener('keydown', this.handleKeyDown);
|
|
9970
9966
|
this.removeEventListener('auroMenuOption-click', this.handleMouseSelect);
|
|
9971
9967
|
this.removeEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
9972
9968
|
this.removeEventListener('slotchange', this.handleSlotChange);
|
|
@@ -10107,26 +10103,33 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10107
10103
|
|
|
10108
10104
|
// Event Handlers
|
|
10109
10105
|
|
|
10110
|
-
/**
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
handleKeyDown(event) {
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10106
|
+
// /**
|
|
10107
|
+
// * Handles keyboard navigation.
|
|
10108
|
+
// * @private
|
|
10109
|
+
// * @param {KeyboardEvent} event - Event object from the browser.
|
|
10110
|
+
// */
|
|
10111
|
+
// handleKeyDown(event) {
|
|
10112
|
+
// // Update to Chris keyboard handler
|
|
10113
|
+
// // We have a new "navigateArrow" function in that handler, maybe that replaces those keys here?
|
|
10114
|
+
// event.preventDefault();
|
|
10115
|
+
// switch (event.key) {
|
|
10116
|
+
// case "ArrowDown":
|
|
10117
|
+
// console.warn("ArrowDown key is pressed and heard from menu");
|
|
10118
|
+
// this.menuService.highlightNext();
|
|
10119
|
+
// break;
|
|
10120
|
+
// case "ArrowUp":
|
|
10121
|
+
// console.warn("ArrowUp key is pressed and heard from menu");
|
|
10122
|
+
// this.menuService.highlightPrevious();
|
|
10123
|
+
// break;
|
|
10124
|
+
// case "Tab":
|
|
10125
|
+
// case "Enter":
|
|
10126
|
+
// this.menuService.selectHighlightedOption();
|
|
10127
|
+
// // Does this need to get separated into two cases to handle the different expected behavior of tab vs enter?
|
|
10128
|
+
// break;
|
|
10129
|
+
// default:
|
|
10130
|
+
// break;
|
|
10131
|
+
// }
|
|
10132
|
+
// }
|
|
10130
10133
|
|
|
10131
10134
|
/**
|
|
10132
10135
|
* Navigates the menu options in the specified direction.
|
|
@@ -76,5 +76,6 @@
|
|
|
76
76
|
|
|
77
77
|
<!-- If additional elements are needed for the demo, add them here. -->
|
|
78
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>
|
|
79
80
|
</body>
|
|
80
81
|
</html>
|