@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
|
@@ -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
|
});
|
|
@@ -1291,9 +1291,16 @@ function navigateArrow(component, direction, options = {}) {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
1293
|
|
|
1294
|
+
/* eslint-disable new-cap */
|
|
1295
|
+
|
|
1294
1296
|
const selectKeyboardStrategy = {
|
|
1295
1297
|
ArrowUp(component, evt, ctx) {
|
|
1296
1298
|
evt.preventDefault();
|
|
1299
|
+
if (evt.altKey || evt.metaKey) {
|
|
1300
|
+
// navigate to first enabled option
|
|
1301
|
+
selectKeyboardStrategy.Home(component, evt, ctx);
|
|
1302
|
+
return;
|
|
1303
|
+
}
|
|
1297
1304
|
navigateArrow(component, 'up', {
|
|
1298
1305
|
ctx,
|
|
1299
1306
|
showFn: () => component.dropdown.show(),
|
|
@@ -1302,30 +1309,36 @@ const selectKeyboardStrategy = {
|
|
|
1302
1309
|
|
|
1303
1310
|
ArrowDown(component, evt, ctx) {
|
|
1304
1311
|
evt.preventDefault();
|
|
1312
|
+
if (evt.altKey || evt.metaKey) {
|
|
1313
|
+
// navigate to last enabled option
|
|
1314
|
+
selectKeyboardStrategy.End(component, evt, ctx);
|
|
1315
|
+
return;
|
|
1316
|
+
}
|
|
1305
1317
|
navigateArrow(component, 'down', {
|
|
1306
1318
|
ctx,
|
|
1307
1319
|
showFn: () => component.dropdown.show(),
|
|
1308
1320
|
});
|
|
1309
1321
|
},
|
|
1310
1322
|
|
|
1311
|
-
Enter(component, evt) {
|
|
1323
|
+
Enter(component, evt, ctx) {
|
|
1312
1324
|
evt.preventDefault();
|
|
1325
|
+
evt.stopPropagation();
|
|
1326
|
+
if (!ctx.isExpanded) {
|
|
1327
|
+
component.dropdown.show();
|
|
1328
|
+
return;
|
|
1329
|
+
}
|
|
1313
1330
|
component.menu.makeSelection();
|
|
1314
1331
|
},
|
|
1315
1332
|
|
|
1316
|
-
|
|
1333
|
+
Escape(component, evt, ctx) {
|
|
1317
1334
|
if (!ctx.isExpanded) {
|
|
1318
1335
|
return;
|
|
1319
1336
|
}
|
|
1337
|
+
component.dropdown.hide();
|
|
1338
|
+
},
|
|
1320
1339
|
|
|
1321
|
-
|
|
1322
|
-
|
|
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
|
-
}
|
|
1340
|
+
Tab(component, evt, ctx) {
|
|
1341
|
+
if (!ctx.isExpanded) {
|
|
1329
1342
|
return;
|
|
1330
1343
|
}
|
|
1331
1344
|
|
|
@@ -1336,9 +1349,41 @@ const selectKeyboardStrategy = {
|
|
|
1336
1349
|
}
|
|
1337
1350
|
component.dropdown.hide();
|
|
1338
1351
|
},
|
|
1352
|
+
Home(component, evt, ctx) {
|
|
1353
|
+
if (!ctx.isExpanded) {
|
|
1354
|
+
return;
|
|
1355
|
+
}
|
|
1356
|
+
evt.preventDefault();
|
|
1357
|
+
evt.stopPropagation();
|
|
1358
|
+
const firstOption = component.menu.menuService.menuOptions.find((option) => !option.disabled);
|
|
1359
|
+
if (firstOption) {
|
|
1360
|
+
component.menu.updateActiveOption(firstOption);
|
|
1361
|
+
}
|
|
1362
|
+
},
|
|
1363
|
+
|
|
1364
|
+
End(component, evt, ctx) {
|
|
1365
|
+
if (!ctx.isExpanded) {
|
|
1366
|
+
return;
|
|
1367
|
+
}
|
|
1368
|
+
evt.preventDefault();
|
|
1369
|
+
evt.stopPropagation();
|
|
1370
|
+
const lastOption = [...component.menu.menuService.menuOptions].reverse().find((option) => !option.disabled);
|
|
1371
|
+
if (lastOption) {
|
|
1372
|
+
component.menu.updateActiveOption(lastOption);
|
|
1373
|
+
}
|
|
1374
|
+
},
|
|
1339
1375
|
|
|
1340
|
-
default(component, evt) {
|
|
1376
|
+
default(component, evt, ctx) {
|
|
1341
1377
|
component.updateActiveOptionBasedOnKey(evt.key);
|
|
1378
|
+
if (evt.key === ' ') {
|
|
1379
|
+
evt.preventDefault();
|
|
1380
|
+
evt.stopPropagation();
|
|
1381
|
+
if (ctx.isExpanded) {
|
|
1382
|
+
component.dropdown.hide();
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
component.dropdown.show();
|
|
1386
|
+
}
|
|
1342
1387
|
},
|
|
1343
1388
|
};
|
|
1344
1389
|
|
|
@@ -3195,6 +3240,11 @@ class AuroFloatingUI {
|
|
|
3195
3240
|
this.clickHandler = null;
|
|
3196
3241
|
this.keyDownHandler = null;
|
|
3197
3242
|
|
|
3243
|
+
/**
|
|
3244
|
+
* @private
|
|
3245
|
+
*/
|
|
3246
|
+
this.enableKeyboardHandling = true;
|
|
3247
|
+
|
|
3198
3248
|
/**
|
|
3199
3249
|
* @private
|
|
3200
3250
|
*/
|
|
@@ -3455,11 +3505,10 @@ class AuroFloatingUI {
|
|
|
3455
3505
|
return;
|
|
3456
3506
|
}
|
|
3457
3507
|
|
|
3458
|
-
const { activeElement } = document;
|
|
3459
3508
|
// if focus is still inside of trigger or bib, do not close
|
|
3460
3509
|
if (
|
|
3461
|
-
this.element.
|
|
3462
|
-
this.element.
|
|
3510
|
+
this.element.matches(":focus") ||
|
|
3511
|
+
this.element.matches(":focus-within")
|
|
3463
3512
|
) {
|
|
3464
3513
|
return;
|
|
3465
3514
|
}
|
|
@@ -3530,7 +3579,9 @@ class AuroFloatingUI {
|
|
|
3530
3579
|
document.addEventListener("focusin", this.focusHandler);
|
|
3531
3580
|
}
|
|
3532
3581
|
|
|
3533
|
-
|
|
3582
|
+
if (this.enableKeyboardHandling) {
|
|
3583
|
+
document.addEventListener("keydown", this.keyDownHandler);
|
|
3584
|
+
}
|
|
3534
3585
|
|
|
3535
3586
|
// send this task to the end of queue to prevent conflicting
|
|
3536
3587
|
// it conflicts if showBib gets call from a button that's not this.element.trigger
|
|
@@ -3786,8 +3837,9 @@ class AuroFloatingUI {
|
|
|
3786
3837
|
this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
|
|
3787
3838
|
}
|
|
3788
3839
|
|
|
3789
|
-
configure(elem, eventPrefix) {
|
|
3840
|
+
configure(elem, eventPrefix, enableKeyboardHandling = true) {
|
|
3790
3841
|
AuroFloatingUI.setupMousePressChecker();
|
|
3842
|
+
this.enableKeyboardHandling = enableKeyboardHandling;
|
|
3791
3843
|
|
|
3792
3844
|
this.eventPrefix = eventPrefix;
|
|
3793
3845
|
if (this.element !== elem) {
|
|
@@ -3820,7 +3872,9 @@ class AuroFloatingUI {
|
|
|
3820
3872
|
|
|
3821
3873
|
this.handleEvent = this.handleEvent.bind(this);
|
|
3822
3874
|
if (this.element.trigger) {
|
|
3823
|
-
|
|
3875
|
+
if (this.enableKeyboardHandling) {
|
|
3876
|
+
this.element.trigger.addEventListener("keydown", this.handleEvent);
|
|
3877
|
+
}
|
|
3824
3878
|
this.element.trigger.addEventListener("click", this.handleEvent);
|
|
3825
3879
|
this.element.trigger.addEventListener("mouseenter", this.handleEvent);
|
|
3826
3880
|
this.element.trigger.addEventListener("mouseleave", this.handleEvent);
|
|
@@ -4298,12 +4352,83 @@ let p$3 = class p{registerComponent(t,a){customElements.get(t)||customElements.d
|
|
|
4298
4352
|
|
|
4299
4353
|
var iconVersion$2 = '9.1.2';
|
|
4300
4354
|
|
|
4355
|
+
/**
|
|
4356
|
+
* Computes display state once per keydown event.
|
|
4357
|
+
* Centralizes null-safety checks and makes the shared/modal/popover branching explicit.
|
|
4358
|
+
*
|
|
4359
|
+
* @param {HTMLElement} component - The component with a dropdown reference.
|
|
4360
|
+
* @param {Object} [options] - Optional config.
|
|
4361
|
+
* @param {HTMLElement} [options.dropdown] - Explicit dropdown reference. Falls back to component.dropdown.
|
|
4362
|
+
* @param {Function} [options.inputResolver] - Called with (component, ctx) to resolve the active input element.
|
|
4363
|
+
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
4364
|
+
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
4365
|
+
*/
|
|
4366
|
+
function createDisplayContext(component, options = {}) {
|
|
4367
|
+
const dd = options.dropdown || component.dropdown;
|
|
4368
|
+
// isPopoverVisible reflects as the `open` attribute.
|
|
4369
|
+
// It reports whether the bib is open in any mode (popover or modal).
|
|
4370
|
+
const isExpanded = Boolean(dd && dd.isPopoverVisible);
|
|
4371
|
+
const isFullscreen = Boolean(dd && dd.isBibFullscreen);
|
|
4372
|
+
|
|
4373
|
+
const ctx = {
|
|
4374
|
+
isExpanded,
|
|
4375
|
+
isModal: isFullscreen,
|
|
4376
|
+
isPopover: !isFullscreen,
|
|
4377
|
+
activeInput: null,
|
|
4378
|
+
};
|
|
4379
|
+
|
|
4380
|
+
if (options.inputResolver) {
|
|
4381
|
+
const resolvedInput = options.inputResolver(component, ctx);
|
|
4382
|
+
// Guard against resolvers returning undefined or non-HTMLElement values.
|
|
4383
|
+
ctx.activeInput = resolvedInput instanceof HTMLElement ? resolvedInput : null;
|
|
4384
|
+
}
|
|
4385
|
+
|
|
4386
|
+
return ctx;
|
|
4387
|
+
}
|
|
4388
|
+
|
|
4389
|
+
/**
|
|
4390
|
+
* Wires up a keydown listener that dispatches to strategy[evt.key] or strategy.default.
|
|
4391
|
+
* Handles both sync and async handlers.
|
|
4392
|
+
* @param {HTMLElement} component - The component to attach the listener to.
|
|
4393
|
+
* @param {Object} strategy - Map of key names to handler functions.
|
|
4394
|
+
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
4395
|
+
*/
|
|
4396
|
+
function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
4397
|
+
component.addEventListener('keydown', async (evt) => {
|
|
4398
|
+
const handler = strategy[evt.key] || strategy.default;
|
|
4399
|
+
if (typeof handler === 'function') {
|
|
4400
|
+
const ctx = createDisplayContext(component, options);
|
|
4401
|
+
await handler(component, evt, ctx);
|
|
4402
|
+
}
|
|
4403
|
+
});
|
|
4404
|
+
}
|
|
4405
|
+
|
|
4301
4406
|
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
4407
|
|
|
4303
4408
|
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
4409
|
|
|
4305
4410
|
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
4411
|
|
|
4412
|
+
/**
|
|
4413
|
+
* Creates a keyboard strategy for dialog-specific key handling.
|
|
4414
|
+
* All other keydown behavior is left to the browser's native bubbling path.
|
|
4415
|
+
* @param {HTMLElement} bib - The dropdown bib element.
|
|
4416
|
+
* @returns {Object} Keyboard handlers keyed by `event.key`.
|
|
4417
|
+
*/
|
|
4418
|
+
// eslint-disable-next-line no-unused-vars
|
|
4419
|
+
function createDropdownBibKeyboardStrategy(bib) {
|
|
4420
|
+
return {
|
|
4421
|
+
// eslint-disable-next-line no-unused-vars
|
|
4422
|
+
Enter(_dialog, event) {
|
|
4423
|
+
// Floating UI handles Enter key to open the dropdown
|
|
4424
|
+
},
|
|
4425
|
+
// eslint-disable-next-line no-unused-vars
|
|
4426
|
+
Escape(_dialog, event) {
|
|
4427
|
+
// Floating UI handles Escape key to close the dropdown
|
|
4428
|
+
}
|
|
4429
|
+
};
|
|
4430
|
+
}
|
|
4431
|
+
|
|
4307
4432
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4308
4433
|
// See LICENSE in the project root for license information.
|
|
4309
4434
|
/* eslint-disable max-lines */
|
|
@@ -4428,11 +4553,7 @@ class AuroDropdownBib extends i$3 {
|
|
|
4428
4553
|
},
|
|
4429
4554
|
|
|
4430
4555
|
/**
|
|
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).
|
|
4556
|
+
* Tracks whether a menu option is currently highlighted.
|
|
4436
4557
|
* @private
|
|
4437
4558
|
*/
|
|
4438
4559
|
hasActiveDescendant: {
|
|
@@ -4506,7 +4627,7 @@ class AuroDropdownBib extends i$3 {
|
|
|
4506
4627
|
|
|
4507
4628
|
const dialog = this.shadowRoot.querySelector('dialog');
|
|
4508
4629
|
this._setupCancelHandler(dialog);
|
|
4509
|
-
|
|
4630
|
+
applyKeyboardStrategy(dialog, createDropdownBibKeyboardStrategy());
|
|
4510
4631
|
|
|
4511
4632
|
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
4512
4633
|
bubbles: true,
|
|
@@ -4533,92 +4654,6 @@ class AuroDropdownBib extends i$3 {
|
|
|
4533
4654
|
});
|
|
4534
4655
|
}
|
|
4535
4656
|
|
|
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
4657
|
|
|
4623
4658
|
/**
|
|
4624
4659
|
* Blocks touch-driven page scroll while a fullscreen modal dialog is open.
|
|
@@ -4993,7 +5028,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
4993
5028
|
}
|
|
4994
5029
|
};
|
|
4995
5030
|
|
|
4996
|
-
var formkitVersion$1 = '
|
|
5031
|
+
var formkitVersion$1 = '202604022013';
|
|
4997
5032
|
|
|
4998
5033
|
class AuroElement extends i$3 {
|
|
4999
5034
|
static get properties() {
|
|
@@ -5174,7 +5209,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5174
5209
|
this.appearance = 'default';
|
|
5175
5210
|
this.chevron = false;
|
|
5176
5211
|
this.disabled = false;
|
|
5177
|
-
this.
|
|
5212
|
+
this.disableKeyboardHandling = false;
|
|
5178
5213
|
this.error = false;
|
|
5179
5214
|
this.tabIndex = 0;
|
|
5180
5215
|
this.noToggle = false;
|
|
@@ -5272,9 +5307,8 @@ class AuroDropdown extends AuroElement {
|
|
|
5272
5307
|
// showModal() fires asynchronously via Lit's update cycle, which
|
|
5273
5308
|
// falls outside the user activation window and causes iOS to
|
|
5274
5309
|
// dismiss the keyboard.
|
|
5275
|
-
if (this.
|
|
5276
|
-
|
|
5277
|
-
this.bibElement.value.open(useModal);
|
|
5310
|
+
if (this.bibElement && this.bibElement.value) {
|
|
5311
|
+
this.bibElement.value.open(this.isBibFullscreen);
|
|
5278
5312
|
}
|
|
5279
5313
|
}
|
|
5280
5314
|
|
|
@@ -5388,9 +5422,9 @@ class AuroDropdown extends AuroElement {
|
|
|
5388
5422
|
},
|
|
5389
5423
|
|
|
5390
5424
|
/**
|
|
5391
|
-
* If declared, the
|
|
5425
|
+
* If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior.
|
|
5392
5426
|
*/
|
|
5393
|
-
|
|
5427
|
+
disableKeyboardHandling: {
|
|
5394
5428
|
type: Boolean,
|
|
5395
5429
|
reflect: true
|
|
5396
5430
|
},
|
|
@@ -5668,7 +5702,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5668
5702
|
if (this.isPopoverVisible) {
|
|
5669
5703
|
// Fullscreen: use showModal() for native accessibility (inert outside, focus trap)
|
|
5670
5704
|
// Desktop: use show() for Floating UI positioning + FocusTrap for focus management
|
|
5671
|
-
const useModal = this.isBibFullscreen
|
|
5705
|
+
const useModal = this.isBibFullscreen;
|
|
5672
5706
|
this.bibElement.value.open(useModal);
|
|
5673
5707
|
} else {
|
|
5674
5708
|
this.bibElement.value.close();
|
|
@@ -5678,7 +5712,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5678
5712
|
// When fullscreen strategy changes while open, re-open dialog with correct mode
|
|
5679
5713
|
// (e.g. resizing from desktop → mobile while dropdown is open)
|
|
5680
5714
|
if (changedProperties.has('isBibFullscreen') && this.isPopoverVisible && this.bibElement.value) {
|
|
5681
|
-
const useModal = this.isBibFullscreen
|
|
5715
|
+
const useModal = this.isBibFullscreen;
|
|
5682
5716
|
this.bibElement.value.close();
|
|
5683
5717
|
this.bibElement.value.open(useModal);
|
|
5684
5718
|
}
|
|
@@ -5700,7 +5734,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5700
5734
|
|
|
5701
5735
|
firstUpdated() {
|
|
5702
5736
|
// Configure the floater to, this will generate the ID for the bib
|
|
5703
|
-
this.floater.configure(this, 'auroDropdown');
|
|
5737
|
+
this.floater.configure(this, 'auroDropdown', !this.disableKeyboardHandling);
|
|
5704
5738
|
|
|
5705
5739
|
// Prevent `contain: layout` on the dropdown host. Layout containment
|
|
5706
5740
|
// creates a containing block for position:fixed descendants (the bib),
|
|
@@ -5790,7 +5824,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5790
5824
|
* @private
|
|
5791
5825
|
*/
|
|
5792
5826
|
updateFocusTrap() {
|
|
5793
|
-
if (this.isPopoverVisible
|
|
5827
|
+
if (this.isPopoverVisible) {
|
|
5794
5828
|
if (!this.isBibFullscreen) {
|
|
5795
5829
|
// Desktop: show() doesn't trap focus, so use FocusTrap
|
|
5796
5830
|
this.focusTrap = new FocusTrap(this.bibContent);
|
|
@@ -6008,6 +6042,7 @@ class AuroDropdown extends AuroElement {
|
|
|
6008
6042
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
6009
6043
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
6010
6044
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
6045
|
+
aria-disabled="${o(this.disabled ? 'true' : undefined)}"
|
|
6011
6046
|
@focusin="${this.handleFocusin}"
|
|
6012
6047
|
@blur="${this.handleFocusOut}">
|
|
6013
6048
|
<div class="triggerContentWrapper" id="triggerLabel">
|
|
@@ -6746,7 +6781,7 @@ class AuroHelpText extends i$3 {
|
|
|
6746
6781
|
}
|
|
6747
6782
|
}
|
|
6748
6783
|
|
|
6749
|
-
var formkitVersion = '
|
|
6784
|
+
var formkitVersion = '202604022013';
|
|
6750
6785
|
|
|
6751
6786
|
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
6787
|
|
|
@@ -7281,12 +7316,28 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7281
7316
|
this.dropdown.setActiveDescendant(null);
|
|
7282
7317
|
this.optionActive = null;
|
|
7283
7318
|
|
|
7284
|
-
|
|
7319
|
+
if (this.dropdown.isBibFullscreen) {
|
|
7320
|
+
restoreTriggerAfterClose(this.dropdown, this.dropdown.trigger);
|
|
7321
|
+
}
|
|
7285
7322
|
}
|
|
7286
7323
|
|
|
7287
7324
|
if (this.dropdown.isPopoverVisible) {
|
|
7288
7325
|
this.updateMenuShapeSize();
|
|
7289
7326
|
|
|
7327
|
+
// If there's a selected option, highlight it (per W3C APG combobox-select-only pattern)
|
|
7328
|
+
// No selection → first enabled option gets highlighted
|
|
7329
|
+
if (this.optionSelected && !Array.isArray(this.optionSelected)) {
|
|
7330
|
+
this.menu.updateActiveOption(this.optionSelected);
|
|
7331
|
+
} else if (this.multiSelect && Array.isArray(this.optionSelected) && this.optionSelected.length > 0) {
|
|
7332
|
+
this.menu.updateActiveOption(this.optionSelected[0]);
|
|
7333
|
+
} else if (!this.menu.optionActive) {
|
|
7334
|
+
// If no activeOption has yet to be set, then make the first enabled option active by default
|
|
7335
|
+
const firstActive = this.menu.menuService.menuOptions.find((option) => !option.disabled);
|
|
7336
|
+
this.menu.updateActiveOption(firstActive);
|
|
7337
|
+
}
|
|
7338
|
+
|
|
7339
|
+
// Scroll the selected option into view when dropdown opens
|
|
7340
|
+
this.scrollSelectedOptionIntoView();
|
|
7290
7341
|
if (this.dropdown.isBibFullscreen) {
|
|
7291
7342
|
// Hide the trigger from assistive technology so VoiceOver cannot reach it
|
|
7292
7343
|
// behind the fullscreen dialog
|
|
@@ -7298,17 +7349,6 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7298
7349
|
// multiple Lit update cycles before moving focus into the bib
|
|
7299
7350
|
doubleRaf(() => {
|
|
7300
7351
|
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
7352
|
});
|
|
7313
7353
|
} else {
|
|
7314
7354
|
// wait til the bib gets fully rendered
|
|
@@ -7555,7 +7595,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7555
7595
|
configureSelect() {
|
|
7556
7596
|
this.nativeSelect = this.shadowRoot.querySelector('select');
|
|
7557
7597
|
|
|
7558
|
-
applyKeyboardStrategy(this, selectKeyboardStrategy);
|
|
7598
|
+
applyKeyboardStrategy$1(this, selectKeyboardStrategy);
|
|
7559
7599
|
|
|
7560
7600
|
this.addEventListener('focusin', this.handleFocusin);
|
|
7561
7601
|
|
|
@@ -7994,6 +8034,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7994
8034
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7995
8035
|
</div>
|
|
7996
8036
|
<${this.dropdownTag}
|
|
8037
|
+
disableKeyboardHandling
|
|
7997
8038
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
7998
8039
|
.a11yRole=${"combobox"}
|
|
7999
8040
|
?autoPlacement="${this.autoPlacement}"
|
|
@@ -8073,6 +8114,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
8073
8114
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8074
8115
|
</div>
|
|
8075
8116
|
<${this.dropdownTag}
|
|
8117
|
+
disableKeyboardHandling
|
|
8076
8118
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
8077
8119
|
.a11yRole=${"combobox"}
|
|
8078
8120
|
?autoPlacement="${this.autoPlacement}"
|
|
@@ -8158,6 +8200,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
8158
8200
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8159
8201
|
</div>
|
|
8160
8202
|
<${this.dropdownTag}
|
|
8203
|
+
disableKeyboardHandling
|
|
8161
8204
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
8162
8205
|
.a11yRole=${"combobox"}
|
|
8163
8206
|
?autoPlacement="${this.autoPlacement}"
|
|
@@ -8835,7 +8878,7 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
8835
8878
|
});
|
|
8836
8879
|
|
|
8837
8880
|
return u$4`
|
|
8838
|
-
<div class="${classes}">
|
|
8881
|
+
<div class="${classes}" aria-disabled="${this.disabled ? 'true' : 'false'}">
|
|
8839
8882
|
${this.selected && !this.noCheckmark
|
|
8840
8883
|
? this.generateIconHtml(checkmarkIcon.svg)
|
|
8841
8884
|
: undefined}
|
|
@@ -9606,10 +9649,10 @@ class AuroMenu extends AuroElement$1 {
|
|
|
9606
9649
|
|
|
9607
9650
|
// Event Bindings
|
|
9608
9651
|
|
|
9609
|
-
/**
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
9652
|
+
// /**
|
|
9653
|
+
// * @private
|
|
9654
|
+
// */
|
|
9655
|
+
// this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
9613
9656
|
|
|
9614
9657
|
|
|
9615
9658
|
/**
|
|
@@ -9958,7 +10001,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
9958
10001
|
|
|
9959
10002
|
this.provideContext();
|
|
9960
10003
|
|
|
9961
|
-
this.addEventListener('keydown', this.handleKeyDown);
|
|
10004
|
+
// this.addEventListener('keydown', this.handleKeyDown);
|
|
9962
10005
|
this.addEventListener('auroMenuOption-click', this.handleMouseSelect);
|
|
9963
10006
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
9964
10007
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
@@ -9966,7 +10009,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
9966
10009
|
}
|
|
9967
10010
|
|
|
9968
10011
|
disconnectedCallback() {
|
|
9969
|
-
this.removeEventListener('keydown', this.handleKeyDown);
|
|
10012
|
+
// this.removeEventListener('keydown', this.handleKeyDown);
|
|
9970
10013
|
this.removeEventListener('auroMenuOption-click', this.handleMouseSelect);
|
|
9971
10014
|
this.removeEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
9972
10015
|
this.removeEventListener('slotchange', this.handleSlotChange);
|
|
@@ -10107,26 +10150,33 @@ class AuroMenu extends AuroElement$1 {
|
|
|
10107
10150
|
|
|
10108
10151
|
// Event Handlers
|
|
10109
10152
|
|
|
10110
|
-
/**
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
handleKeyDown(event) {
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10153
|
+
// /**
|
|
10154
|
+
// * Handles keyboard navigation.
|
|
10155
|
+
// * @private
|
|
10156
|
+
// * @param {KeyboardEvent} event - Event object from the browser.
|
|
10157
|
+
// */
|
|
10158
|
+
// handleKeyDown(event) {
|
|
10159
|
+
// // Update to Chris keyboard handler
|
|
10160
|
+
// // We have a new "navigateArrow" function in that handler, maybe that replaces those keys here?
|
|
10161
|
+
// event.preventDefault();
|
|
10162
|
+
// switch (event.key) {
|
|
10163
|
+
// case "ArrowDown":
|
|
10164
|
+
// console.warn("ArrowDown key is pressed and heard from menu");
|
|
10165
|
+
// this.menuService.highlightNext();
|
|
10166
|
+
// break;
|
|
10167
|
+
// case "ArrowUp":
|
|
10168
|
+
// console.warn("ArrowUp key is pressed and heard from menu");
|
|
10169
|
+
// this.menuService.highlightPrevious();
|
|
10170
|
+
// break;
|
|
10171
|
+
// case "Tab":
|
|
10172
|
+
// case "Enter":
|
|
10173
|
+
// this.menuService.selectHighlightedOption();
|
|
10174
|
+
// // Does this need to get separated into two cases to handle the different expected behavior of tab vs enter?
|
|
10175
|
+
// break;
|
|
10176
|
+
// default:
|
|
10177
|
+
// break;
|
|
10178
|
+
// }
|
|
10179
|
+
// }
|
|
10130
10180
|
|
|
10131
10181
|
/**
|
|
10132
10182
|
* Navigates the menu options in the specified direction.
|