@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
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
<td>
|
|
164
164
|
The current <code>focused</code> option is selected.
|
|
165
165
|
<div class="note">
|
|
166
|
-
<strong>Note:</strong> the page will also navigate to the next focusable element in the tabindex
|
|
166
|
+
<strong>Note:</strong> the page will also navigate to the next focusable element in the tabindex sequence.
|
|
167
167
|
</div>
|
|
168
168
|
</td>
|
|
169
169
|
</tr>
|
|
@@ -172,9 +172,9 @@
|
|
|
172
172
|
<td>Expanded</td>
|
|
173
173
|
<td>Trigger element</td>
|
|
174
174
|
<td>
|
|
175
|
-
|
|
175
|
+
The current <code>focused</code> option is selected.
|
|
176
176
|
<div class="note">
|
|
177
|
-
<strong>Note:</strong> the page will
|
|
177
|
+
<strong>Note:</strong> the page will also navigate to the previous focusable element in the tabindex sequence.
|
|
178
178
|
</div>
|
|
179
179
|
</td>
|
|
180
180
|
</tr>
|
|
@@ -1190,7 +1190,7 @@ function restoreTriggerAfterClose(dropdown, focusTarget) {
|
|
|
1190
1190
|
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
1191
1191
|
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
1192
1192
|
*/
|
|
1193
|
-
function createDisplayContext(component, options = {}) {
|
|
1193
|
+
function createDisplayContext$1(component, options = {}) {
|
|
1194
1194
|
const dd = options.dropdown || component.dropdown;
|
|
1195
1195
|
// isPopoverVisible reflects as the `open` attribute.
|
|
1196
1196
|
// It reports whether the bib is open in any mode (popover or modal).
|
|
@@ -1220,11 +1220,11 @@ function createDisplayContext(component, options = {}) {
|
|
|
1220
1220
|
* @param {Object} strategy - Map of key names to handler functions.
|
|
1221
1221
|
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
1222
1222
|
*/
|
|
1223
|
-
function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
1223
|
+
function applyKeyboardStrategy$1(component, strategy, options = {}) {
|
|
1224
1224
|
component.addEventListener('keydown', async (evt) => {
|
|
1225
1225
|
const handler = strategy[evt.key] || strategy.default;
|
|
1226
1226
|
if (typeof handler === 'function') {
|
|
1227
|
-
const ctx = createDisplayContext(component, options);
|
|
1227
|
+
const ctx = createDisplayContext$1(component, options);
|
|
1228
1228
|
await handler(component, evt, ctx);
|
|
1229
1229
|
}
|
|
1230
1230
|
});
|
|
@@ -1248,9 +1248,16 @@ function navigateArrow(component, direction, options = {}) {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
1250
|
|
|
1251
|
+
/* eslint-disable new-cap */
|
|
1252
|
+
|
|
1251
1253
|
const selectKeyboardStrategy = {
|
|
1252
1254
|
ArrowUp(component, evt, ctx) {
|
|
1253
1255
|
evt.preventDefault();
|
|
1256
|
+
if (evt.altKey || evt.metaKey) {
|
|
1257
|
+
// navigate to first enabled option
|
|
1258
|
+
selectKeyboardStrategy.Home(component, evt, ctx);
|
|
1259
|
+
return;
|
|
1260
|
+
}
|
|
1254
1261
|
navigateArrow(component, 'up', {
|
|
1255
1262
|
ctx,
|
|
1256
1263
|
showFn: () => component.dropdown.show(),
|
|
@@ -1259,30 +1266,36 @@ const selectKeyboardStrategy = {
|
|
|
1259
1266
|
|
|
1260
1267
|
ArrowDown(component, evt, ctx) {
|
|
1261
1268
|
evt.preventDefault();
|
|
1269
|
+
if (evt.altKey || evt.metaKey) {
|
|
1270
|
+
// navigate to last enabled option
|
|
1271
|
+
selectKeyboardStrategy.End(component, evt, ctx);
|
|
1272
|
+
return;
|
|
1273
|
+
}
|
|
1262
1274
|
navigateArrow(component, 'down', {
|
|
1263
1275
|
ctx,
|
|
1264
1276
|
showFn: () => component.dropdown.show(),
|
|
1265
1277
|
});
|
|
1266
1278
|
},
|
|
1267
1279
|
|
|
1268
|
-
Enter(component, evt) {
|
|
1280
|
+
Enter(component, evt, ctx) {
|
|
1269
1281
|
evt.preventDefault();
|
|
1282
|
+
evt.stopPropagation();
|
|
1283
|
+
if (!ctx.isExpanded) {
|
|
1284
|
+
component.dropdown.show();
|
|
1285
|
+
return;
|
|
1286
|
+
}
|
|
1270
1287
|
component.menu.makeSelection();
|
|
1271
1288
|
},
|
|
1272
1289
|
|
|
1273
|
-
|
|
1290
|
+
Escape(component, evt, ctx) {
|
|
1274
1291
|
if (!ctx.isExpanded) {
|
|
1275
1292
|
return;
|
|
1276
1293
|
}
|
|
1294
|
+
component.dropdown.hide();
|
|
1295
|
+
},
|
|
1277
1296
|
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
if (evt.shiftKey) {
|
|
1281
|
-
evt.preventDefault();
|
|
1282
|
-
const firstActive = component.menu.menuService.menuOptions.find((option) => option.isActive);
|
|
1283
|
-
if (firstActive) {
|
|
1284
|
-
component.menu.updateActiveOption(firstActive);
|
|
1285
|
-
}
|
|
1297
|
+
Tab(component, evt, ctx) {
|
|
1298
|
+
if (!ctx.isExpanded) {
|
|
1286
1299
|
return;
|
|
1287
1300
|
}
|
|
1288
1301
|
|
|
@@ -1293,9 +1306,41 @@ const selectKeyboardStrategy = {
|
|
|
1293
1306
|
}
|
|
1294
1307
|
component.dropdown.hide();
|
|
1295
1308
|
},
|
|
1309
|
+
Home(component, evt, ctx) {
|
|
1310
|
+
if (!ctx.isExpanded) {
|
|
1311
|
+
return;
|
|
1312
|
+
}
|
|
1313
|
+
evt.preventDefault();
|
|
1314
|
+
evt.stopPropagation();
|
|
1315
|
+
const firstOption = component.menu.menuService.menuOptions.find((option) => !option.disabled);
|
|
1316
|
+
if (firstOption) {
|
|
1317
|
+
component.menu.updateActiveOption(firstOption);
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
|
|
1321
|
+
End(component, evt, ctx) {
|
|
1322
|
+
if (!ctx.isExpanded) {
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
evt.preventDefault();
|
|
1326
|
+
evt.stopPropagation();
|
|
1327
|
+
const lastOption = [...component.menu.menuService.menuOptions].reverse().find((option) => !option.disabled);
|
|
1328
|
+
if (lastOption) {
|
|
1329
|
+
component.menu.updateActiveOption(lastOption);
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1296
1332
|
|
|
1297
|
-
default(component, evt) {
|
|
1333
|
+
default(component, evt, ctx) {
|
|
1298
1334
|
component.updateActiveOptionBasedOnKey(evt.key);
|
|
1335
|
+
if (evt.key === ' ') {
|
|
1336
|
+
evt.preventDefault();
|
|
1337
|
+
evt.stopPropagation();
|
|
1338
|
+
if (ctx.isExpanded) {
|
|
1339
|
+
component.dropdown.hide();
|
|
1340
|
+
return;
|
|
1341
|
+
}
|
|
1342
|
+
component.dropdown.show();
|
|
1343
|
+
}
|
|
1299
1344
|
},
|
|
1300
1345
|
};
|
|
1301
1346
|
|
|
@@ -3128,6 +3173,11 @@ class AuroFloatingUI {
|
|
|
3128
3173
|
this.clickHandler = null;
|
|
3129
3174
|
this.keyDownHandler = null;
|
|
3130
3175
|
|
|
3176
|
+
/**
|
|
3177
|
+
* @private
|
|
3178
|
+
*/
|
|
3179
|
+
this.enableKeyboardHandling = true;
|
|
3180
|
+
|
|
3131
3181
|
/**
|
|
3132
3182
|
* @private
|
|
3133
3183
|
*/
|
|
@@ -3388,11 +3438,10 @@ class AuroFloatingUI {
|
|
|
3388
3438
|
return;
|
|
3389
3439
|
}
|
|
3390
3440
|
|
|
3391
|
-
const { activeElement } = document;
|
|
3392
3441
|
// if focus is still inside of trigger or bib, do not close
|
|
3393
3442
|
if (
|
|
3394
|
-
this.element.
|
|
3395
|
-
this.element.
|
|
3443
|
+
this.element.matches(":focus") ||
|
|
3444
|
+
this.element.matches(":focus-within")
|
|
3396
3445
|
) {
|
|
3397
3446
|
return;
|
|
3398
3447
|
}
|
|
@@ -3463,7 +3512,9 @@ class AuroFloatingUI {
|
|
|
3463
3512
|
document.addEventListener("focusin", this.focusHandler);
|
|
3464
3513
|
}
|
|
3465
3514
|
|
|
3466
|
-
|
|
3515
|
+
if (this.enableKeyboardHandling) {
|
|
3516
|
+
document.addEventListener("keydown", this.keyDownHandler);
|
|
3517
|
+
}
|
|
3467
3518
|
|
|
3468
3519
|
// send this task to the end of queue to prevent conflicting
|
|
3469
3520
|
// it conflicts if showBib gets call from a button that's not this.element.trigger
|
|
@@ -3719,8 +3770,9 @@ class AuroFloatingUI {
|
|
|
3719
3770
|
this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
|
|
3720
3771
|
}
|
|
3721
3772
|
|
|
3722
|
-
configure(elem, eventPrefix) {
|
|
3773
|
+
configure(elem, eventPrefix, enableKeyboardHandling = true) {
|
|
3723
3774
|
AuroFloatingUI.setupMousePressChecker();
|
|
3775
|
+
this.enableKeyboardHandling = enableKeyboardHandling;
|
|
3724
3776
|
|
|
3725
3777
|
this.eventPrefix = eventPrefix;
|
|
3726
3778
|
if (this.element !== elem) {
|
|
@@ -3753,7 +3805,9 @@ class AuroFloatingUI {
|
|
|
3753
3805
|
|
|
3754
3806
|
this.handleEvent = this.handleEvent.bind(this);
|
|
3755
3807
|
if (this.element.trigger) {
|
|
3756
|
-
|
|
3808
|
+
if (this.enableKeyboardHandling) {
|
|
3809
|
+
this.element.trigger.addEventListener("keydown", this.handleEvent);
|
|
3810
|
+
}
|
|
3757
3811
|
this.element.trigger.addEventListener("click", this.handleEvent);
|
|
3758
3812
|
this.element.trigger.addEventListener("mouseenter", this.handleEvent);
|
|
3759
3813
|
this.element.trigger.addEventListener("mouseleave", this.handleEvent);
|
|
@@ -4231,12 +4285,83 @@ let p$2 = class p{registerComponent(t,a){customElements.get(t)||customElements.d
|
|
|
4231
4285
|
|
|
4232
4286
|
var iconVersion$1 = '9.1.2';
|
|
4233
4287
|
|
|
4288
|
+
/**
|
|
4289
|
+
* Computes display state once per keydown event.
|
|
4290
|
+
* Centralizes null-safety checks and makes the shared/modal/popover branching explicit.
|
|
4291
|
+
*
|
|
4292
|
+
* @param {HTMLElement} component - The component with a dropdown reference.
|
|
4293
|
+
* @param {Object} [options] - Optional config.
|
|
4294
|
+
* @param {HTMLElement} [options.dropdown] - Explicit dropdown reference. Falls back to component.dropdown.
|
|
4295
|
+
* @param {Function} [options.inputResolver] - Called with (component, ctx) to resolve the active input element.
|
|
4296
|
+
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
4297
|
+
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
4298
|
+
*/
|
|
4299
|
+
function createDisplayContext(component, options = {}) {
|
|
4300
|
+
const dd = options.dropdown || component.dropdown;
|
|
4301
|
+
// isPopoverVisible reflects as the `open` attribute.
|
|
4302
|
+
// It reports whether the bib is open in any mode (popover or modal).
|
|
4303
|
+
const isExpanded = Boolean(dd && dd.isPopoverVisible);
|
|
4304
|
+
const isFullscreen = Boolean(dd && dd.isBibFullscreen);
|
|
4305
|
+
|
|
4306
|
+
const ctx = {
|
|
4307
|
+
isExpanded,
|
|
4308
|
+
isModal: isFullscreen,
|
|
4309
|
+
isPopover: !isFullscreen,
|
|
4310
|
+
activeInput: null,
|
|
4311
|
+
};
|
|
4312
|
+
|
|
4313
|
+
if (options.inputResolver) {
|
|
4314
|
+
const resolvedInput = options.inputResolver(component, ctx);
|
|
4315
|
+
// Guard against resolvers returning undefined or non-HTMLElement values.
|
|
4316
|
+
ctx.activeInput = resolvedInput instanceof HTMLElement ? resolvedInput : null;
|
|
4317
|
+
}
|
|
4318
|
+
|
|
4319
|
+
return ctx;
|
|
4320
|
+
}
|
|
4321
|
+
|
|
4322
|
+
/**
|
|
4323
|
+
* Wires up a keydown listener that dispatches to strategy[evt.key] or strategy.default.
|
|
4324
|
+
* Handles both sync and async handlers.
|
|
4325
|
+
* @param {HTMLElement} component - The component to attach the listener to.
|
|
4326
|
+
* @param {Object} strategy - Map of key names to handler functions.
|
|
4327
|
+
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
4328
|
+
*/
|
|
4329
|
+
function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
4330
|
+
component.addEventListener('keydown', async (evt) => {
|
|
4331
|
+
const handler = strategy[evt.key] || strategy.default;
|
|
4332
|
+
if (typeof handler === 'function') {
|
|
4333
|
+
const ctx = createDisplayContext(component, options);
|
|
4334
|
+
await handler(component, evt, ctx);
|
|
4335
|
+
}
|
|
4336
|
+
});
|
|
4337
|
+
}
|
|
4338
|
+
|
|
4234
4339
|
var styleCss$2$1 = css`: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}`;
|
|
4235
4340
|
|
|
4236
4341
|
var colorCss$2 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
4237
4342
|
|
|
4238
4343
|
var tokensCss$1 = css`: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)}`;
|
|
4239
4344
|
|
|
4345
|
+
/**
|
|
4346
|
+
* Creates a keyboard strategy for dialog-specific key handling.
|
|
4347
|
+
* All other keydown behavior is left to the browser's native bubbling path.
|
|
4348
|
+
* @param {HTMLElement} bib - The dropdown bib element.
|
|
4349
|
+
* @returns {Object} Keyboard handlers keyed by `event.key`.
|
|
4350
|
+
*/
|
|
4351
|
+
// eslint-disable-next-line no-unused-vars
|
|
4352
|
+
function createDropdownBibKeyboardStrategy(bib) {
|
|
4353
|
+
return {
|
|
4354
|
+
// eslint-disable-next-line no-unused-vars
|
|
4355
|
+
Enter(_dialog, event) {
|
|
4356
|
+
// Floating UI handles Enter key to open the dropdown
|
|
4357
|
+
},
|
|
4358
|
+
// eslint-disable-next-line no-unused-vars
|
|
4359
|
+
Escape(_dialog, event) {
|
|
4360
|
+
// Floating UI handles Escape key to close the dropdown
|
|
4361
|
+
}
|
|
4362
|
+
};
|
|
4363
|
+
}
|
|
4364
|
+
|
|
4240
4365
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4241
4366
|
// See LICENSE in the project root for license information.
|
|
4242
4367
|
/* eslint-disable max-lines */
|
|
@@ -4361,11 +4486,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
4361
4486
|
},
|
|
4362
4487
|
|
|
4363
4488
|
/**
|
|
4364
|
-
*
|
|
4365
|
-
* aria-activedescendant. The dialog keyboard bridge checks this
|
|
4366
|
-
* flag so that Enter selects the highlighted option instead of
|
|
4367
|
-
* activating the focused interactive element (e.g. the trigger
|
|
4368
|
-
* button, or the bibtemplate close button in fullscreen).
|
|
4489
|
+
* Tracks whether a menu option is currently highlighted.
|
|
4369
4490
|
* @private
|
|
4370
4491
|
*/
|
|
4371
4492
|
hasActiveDescendant: {
|
|
@@ -4439,7 +4560,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
4439
4560
|
|
|
4440
4561
|
const dialog = this.shadowRoot.querySelector('dialog');
|
|
4441
4562
|
this._setupCancelHandler(dialog);
|
|
4442
|
-
|
|
4563
|
+
applyKeyboardStrategy(dialog, createDropdownBibKeyboardStrategy());
|
|
4443
4564
|
|
|
4444
4565
|
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
4445
4566
|
bubbles: true,
|
|
@@ -4466,92 +4587,6 @@ class AuroDropdownBib extends LitElement {
|
|
|
4466
4587
|
});
|
|
4467
4588
|
}
|
|
4468
4589
|
|
|
4469
|
-
/**
|
|
4470
|
-
* showModal() creates a closed focus scope — keyboard events inside
|
|
4471
|
-
* the dialog's shadow DOM do NOT bubble out to the combobox/select
|
|
4472
|
-
* keydown handlers in the parent shadow DOM. This handler bridges
|
|
4473
|
-
* that gap by re-dispatching navigation keys so they cross the
|
|
4474
|
-
* shadow boundary and reach the menu navigation logic in the parent
|
|
4475
|
-
* component.
|
|
4476
|
-
*
|
|
4477
|
-
* The trade-off: intercepting these keys means native keyboard
|
|
4478
|
-
* behaviors that would normally "just work" must be manually
|
|
4479
|
-
* re-implemented here:
|
|
4480
|
-
*
|
|
4481
|
-
* - Enter on buttons: Custom elements (auro-button) don't get the
|
|
4482
|
-
* native Enter→click that <button> provides, so we call .click()
|
|
4483
|
-
* directly when Enter is pressed on a button-like element.
|
|
4484
|
-
*
|
|
4485
|
-
* - Tab: Intercepted and re-dispatched so parent components
|
|
4486
|
-
* (select/combobox) can select the active option and close the
|
|
4487
|
-
* dialog. The <dialog> provides containment and isolation
|
|
4488
|
-
* (inert background, VoiceOver focus trapping, top layer), while
|
|
4489
|
-
* the content inside is a role="listbox" navigated via
|
|
4490
|
-
* aria-activedescendant (options are not focusable). Tab keyboard
|
|
4491
|
-
* behavior follows listbox conventions (select + close) because
|
|
4492
|
-
* the dialog's native Tab trap only cycles between the close
|
|
4493
|
-
* button and browser chrome.
|
|
4494
|
-
*
|
|
4495
|
-
* - Escape: The native <dialog> fires a `cancel` event on ESC
|
|
4496
|
-
* (handled by _setupCancelHandler), so the re-dispatched Escape
|
|
4497
|
-
* is a secondary path for parent components that also listen for
|
|
4498
|
-
* Escape keydown.
|
|
4499
|
-
*
|
|
4500
|
-
* @param {HTMLDialogElement} dialog - The dialog element to attach the keyboard bridge to.
|
|
4501
|
-
* @private
|
|
4502
|
-
*/
|
|
4503
|
-
_setupKeyboardBridge(dialog) {
|
|
4504
|
-
const navKeys = new Set([
|
|
4505
|
-
'ArrowUp',
|
|
4506
|
-
'ArrowDown',
|
|
4507
|
-
'Enter',
|
|
4508
|
-
'Escape',
|
|
4509
|
-
'Tab'
|
|
4510
|
-
]);
|
|
4511
|
-
|
|
4512
|
-
dialog.addEventListener('keydown', (event) => {
|
|
4513
|
-
if (!navKeys.has(event.key)) {
|
|
4514
|
-
return;
|
|
4515
|
-
}
|
|
4516
|
-
|
|
4517
|
-
// Custom elements (auro-button) don't get the native Enter→click
|
|
4518
|
-
// behavior that <button> has. Find the button in the composed path
|
|
4519
|
-
// and click it directly — but only when no menu option is
|
|
4520
|
-
// highlighted. In fullscreen mode focus stays on the close button
|
|
4521
|
-
// while arrow keys move the active-descendant highlight through
|
|
4522
|
-
// the listbox. If the user presses Enter with an option
|
|
4523
|
-
// highlighted, the intent is to select that option, not to click
|
|
4524
|
-
// the close button. In that case we fall through and bridge the
|
|
4525
|
-
// Enter key to the parent component's keyboard strategy.
|
|
4526
|
-
if (event.key === 'Enter') {
|
|
4527
|
-
if (!this.hasActiveDescendant) {
|
|
4528
|
-
const buttonSelector = 'button, [role="button"], auro-button, [auro-button]';
|
|
4529
|
-
const btn = event.composedPath().find((el) => el.matches && el.matches(buttonSelector));
|
|
4530
|
-
if (btn) {
|
|
4531
|
-
event.preventDefault();
|
|
4532
|
-
event.stopPropagation();
|
|
4533
|
-
btn.click();
|
|
4534
|
-
return;
|
|
4535
|
-
}
|
|
4536
|
-
}
|
|
4537
|
-
}
|
|
4538
|
-
|
|
4539
|
-
event.preventDefault();
|
|
4540
|
-
event.stopPropagation();
|
|
4541
|
-
const newEvent = new KeyboardEvent('keydown', {
|
|
4542
|
-
key: event.key,
|
|
4543
|
-
code: event.code,
|
|
4544
|
-
shiftKey: event.shiftKey,
|
|
4545
|
-
altKey: event.altKey,
|
|
4546
|
-
ctrlKey: event.ctrlKey,
|
|
4547
|
-
metaKey: event.metaKey,
|
|
4548
|
-
bubbles: true,
|
|
4549
|
-
composed: true,
|
|
4550
|
-
cancelable: true
|
|
4551
|
-
});
|
|
4552
|
-
this.dispatchEvent(newEvent);
|
|
4553
|
-
});
|
|
4554
|
-
}
|
|
4555
4590
|
|
|
4556
4591
|
/**
|
|
4557
4592
|
* Blocks touch-driven page scroll while a fullscreen modal dialog is open.
|
|
@@ -4926,7 +4961,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
4926
4961
|
}
|
|
4927
4962
|
};
|
|
4928
4963
|
|
|
4929
|
-
var formkitVersion$1 = '
|
|
4964
|
+
var formkitVersion$1 = '202604022013';
|
|
4930
4965
|
|
|
4931
4966
|
class AuroElement extends LitElement {
|
|
4932
4967
|
static get properties() {
|
|
@@ -5107,7 +5142,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5107
5142
|
this.appearance = 'default';
|
|
5108
5143
|
this.chevron = false;
|
|
5109
5144
|
this.disabled = false;
|
|
5110
|
-
this.
|
|
5145
|
+
this.disableKeyboardHandling = false;
|
|
5111
5146
|
this.error = false;
|
|
5112
5147
|
this.tabIndex = 0;
|
|
5113
5148
|
this.noToggle = false;
|
|
@@ -5205,9 +5240,8 @@ class AuroDropdown extends AuroElement {
|
|
|
5205
5240
|
// showModal() fires asynchronously via Lit's update cycle, which
|
|
5206
5241
|
// falls outside the user activation window and causes iOS to
|
|
5207
5242
|
// dismiss the keyboard.
|
|
5208
|
-
if (this.
|
|
5209
|
-
|
|
5210
|
-
this.bibElement.value.open(useModal);
|
|
5243
|
+
if (this.bibElement && this.bibElement.value) {
|
|
5244
|
+
this.bibElement.value.open(this.isBibFullscreen);
|
|
5211
5245
|
}
|
|
5212
5246
|
}
|
|
5213
5247
|
|
|
@@ -5321,9 +5355,9 @@ class AuroDropdown extends AuroElement {
|
|
|
5321
5355
|
},
|
|
5322
5356
|
|
|
5323
5357
|
/**
|
|
5324
|
-
* If declared, the
|
|
5358
|
+
* If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior.
|
|
5325
5359
|
*/
|
|
5326
|
-
|
|
5360
|
+
disableKeyboardHandling: {
|
|
5327
5361
|
type: Boolean,
|
|
5328
5362
|
reflect: true
|
|
5329
5363
|
},
|
|
@@ -5601,7 +5635,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5601
5635
|
if (this.isPopoverVisible) {
|
|
5602
5636
|
// Fullscreen: use showModal() for native accessibility (inert outside, focus trap)
|
|
5603
5637
|
// Desktop: use show() for Floating UI positioning + FocusTrap for focus management
|
|
5604
|
-
const useModal = this.isBibFullscreen
|
|
5638
|
+
const useModal = this.isBibFullscreen;
|
|
5605
5639
|
this.bibElement.value.open(useModal);
|
|
5606
5640
|
} else {
|
|
5607
5641
|
this.bibElement.value.close();
|
|
@@ -5611,7 +5645,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5611
5645
|
// When fullscreen strategy changes while open, re-open dialog with correct mode
|
|
5612
5646
|
// (e.g. resizing from desktop → mobile while dropdown is open)
|
|
5613
5647
|
if (changedProperties.has('isBibFullscreen') && this.isPopoverVisible && this.bibElement.value) {
|
|
5614
|
-
const useModal = this.isBibFullscreen
|
|
5648
|
+
const useModal = this.isBibFullscreen;
|
|
5615
5649
|
this.bibElement.value.close();
|
|
5616
5650
|
this.bibElement.value.open(useModal);
|
|
5617
5651
|
}
|
|
@@ -5633,7 +5667,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5633
5667
|
|
|
5634
5668
|
firstUpdated() {
|
|
5635
5669
|
// Configure the floater to, this will generate the ID for the bib
|
|
5636
|
-
this.floater.configure(this, 'auroDropdown');
|
|
5670
|
+
this.floater.configure(this, 'auroDropdown', !this.disableKeyboardHandling);
|
|
5637
5671
|
|
|
5638
5672
|
// Prevent `contain: layout` on the dropdown host. Layout containment
|
|
5639
5673
|
// creates a containing block for position:fixed descendants (the bib),
|
|
@@ -5723,7 +5757,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5723
5757
|
* @private
|
|
5724
5758
|
*/
|
|
5725
5759
|
updateFocusTrap() {
|
|
5726
|
-
if (this.isPopoverVisible
|
|
5760
|
+
if (this.isPopoverVisible) {
|
|
5727
5761
|
if (!this.isBibFullscreen) {
|
|
5728
5762
|
// Desktop: show() doesn't trap focus, so use FocusTrap
|
|
5729
5763
|
this.focusTrap = new FocusTrap(this.bibContent);
|
|
@@ -5941,6 +5975,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5941
5975
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5942
5976
|
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5943
5977
|
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5978
|
+
aria-disabled="${ifDefined(this.disabled ? 'true' : undefined)}"
|
|
5944
5979
|
@focusin="${this.handleFocusin}"
|
|
5945
5980
|
@blur="${this.handleFocusOut}">
|
|
5946
5981
|
<div class="triggerContentWrapper" id="triggerLabel">
|
|
@@ -6679,7 +6714,7 @@ class AuroHelpText extends LitElement {
|
|
|
6679
6714
|
}
|
|
6680
6715
|
}
|
|
6681
6716
|
|
|
6682
|
-
var formkitVersion = '
|
|
6717
|
+
var formkitVersion = '202604022013';
|
|
6683
6718
|
|
|
6684
6719
|
var styleCss = css`.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}`;
|
|
6685
6720
|
|
|
@@ -7214,12 +7249,28 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7214
7249
|
this.dropdown.setActiveDescendant(null);
|
|
7215
7250
|
this.optionActive = null;
|
|
7216
7251
|
|
|
7217
|
-
|
|
7252
|
+
if (this.dropdown.isBibFullscreen) {
|
|
7253
|
+
restoreTriggerAfterClose(this.dropdown, this.dropdown.trigger);
|
|
7254
|
+
}
|
|
7218
7255
|
}
|
|
7219
7256
|
|
|
7220
7257
|
if (this.dropdown.isPopoverVisible) {
|
|
7221
7258
|
this.updateMenuShapeSize();
|
|
7222
7259
|
|
|
7260
|
+
// If there's a selected option, highlight it (per W3C APG combobox-select-only pattern)
|
|
7261
|
+
// No selection → first enabled option gets highlighted
|
|
7262
|
+
if (this.optionSelected && !Array.isArray(this.optionSelected)) {
|
|
7263
|
+
this.menu.updateActiveOption(this.optionSelected);
|
|
7264
|
+
} else if (this.multiSelect && Array.isArray(this.optionSelected) && this.optionSelected.length > 0) {
|
|
7265
|
+
this.menu.updateActiveOption(this.optionSelected[0]);
|
|
7266
|
+
} else if (!this.menu.optionActive) {
|
|
7267
|
+
// If no activeOption has yet to be set, then make the first enabled option active by default
|
|
7268
|
+
const firstActive = this.menu.menuService.menuOptions.find((option) => !option.disabled);
|
|
7269
|
+
this.menu.updateActiveOption(firstActive);
|
|
7270
|
+
}
|
|
7271
|
+
|
|
7272
|
+
// Scroll the selected option into view when dropdown opens
|
|
7273
|
+
this.scrollSelectedOptionIntoView();
|
|
7223
7274
|
if (this.dropdown.isBibFullscreen) {
|
|
7224
7275
|
// Hide the trigger from assistive technology so VoiceOver cannot reach it
|
|
7225
7276
|
// behind the fullscreen dialog
|
|
@@ -7231,17 +7282,6 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7231
7282
|
// multiple Lit update cycles before moving focus into the bib
|
|
7232
7283
|
doubleRaf(() => {
|
|
7233
7284
|
this.bibtemplate.focusCloseButton();
|
|
7234
|
-
|
|
7235
|
-
// If there's a selected option, highlight it (per W3C APG combobox-select-only pattern)
|
|
7236
|
-
// No selection → no highlight
|
|
7237
|
-
if (this.optionSelected && !Array.isArray(this.optionSelected)) {
|
|
7238
|
-
this.menu.updateActiveOption(this.optionSelected);
|
|
7239
|
-
} else if (this.multiSelect && Array.isArray(this.optionSelected) && this.optionSelected.length > 0) {
|
|
7240
|
-
this.menu.updateActiveOption(this.optionSelected[0]);
|
|
7241
|
-
}
|
|
7242
|
-
|
|
7243
|
-
// Scroll the selected option into view when dropdown opens
|
|
7244
|
-
this.scrollSelectedOptionIntoView();
|
|
7245
7285
|
});
|
|
7246
7286
|
} else {
|
|
7247
7287
|
// wait til the bib gets fully rendered
|
|
@@ -7488,7 +7528,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7488
7528
|
configureSelect() {
|
|
7489
7529
|
this.nativeSelect = this.shadowRoot.querySelector('select');
|
|
7490
7530
|
|
|
7491
|
-
applyKeyboardStrategy(this, selectKeyboardStrategy);
|
|
7531
|
+
applyKeyboardStrategy$1(this, selectKeyboardStrategy);
|
|
7492
7532
|
|
|
7493
7533
|
this.addEventListener('focusin', this.handleFocusin);
|
|
7494
7534
|
|
|
@@ -7927,6 +7967,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7927
7967
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7928
7968
|
</div>
|
|
7929
7969
|
<${this.dropdownTag}
|
|
7970
|
+
disableKeyboardHandling
|
|
7930
7971
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
7931
7972
|
.a11yRole=${"combobox"}
|
|
7932
7973
|
?autoPlacement="${this.autoPlacement}"
|
|
@@ -8006,6 +8047,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
8006
8047
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8007
8048
|
</div>
|
|
8008
8049
|
<${this.dropdownTag}
|
|
8050
|
+
disableKeyboardHandling
|
|
8009
8051
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
8010
8052
|
.a11yRole=${"combobox"}
|
|
8011
8053
|
?autoPlacement="${this.autoPlacement}"
|
|
@@ -8091,6 +8133,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
8091
8133
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8092
8134
|
</div>
|
|
8093
8135
|
<${this.dropdownTag}
|
|
8136
|
+
disableKeyboardHandling
|
|
8094
8137
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
8095
8138
|
.a11yRole=${"combobox"}
|
|
8096
8139
|
?autoPlacement="${this.autoPlacement}"
|