@aurodesignsystem-dev/auro-formkit 0.0.0-pr1413.0 → 0.0.0-pr1413.2
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/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/api.min.js +121 -129
- package/components/combobox/demo/index.min.js +121 -129
- package/components/combobox/demo/keyboardBehavior.md +9 -36
- package/components/combobox/dist/auro-combobox.d.ts +13 -0
- package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +4 -2
- package/components/combobox/dist/index.js +120 -128
- package/components/combobox/dist/registered.js +120 -128
- package/components/counter/demo/api.min.js +13 -3
- package/components/counter/demo/index.min.js +13 -3
- package/components/counter/dist/index.js +13 -3
- package/components/counter/dist/registered.js +13 -3
- package/components/datepicker/demo/api.min.js +44 -21
- package/components/datepicker/demo/index.min.js +44 -21
- package/components/datepicker/dist/index.js +44 -21
- package/components/datepicker/dist/registered.js +44 -21
- package/components/dropdown/demo/api.md +29 -28
- package/components/dropdown/demo/api.min.js +12 -2
- package/components/dropdown/demo/index.min.js +12 -2
- package/components/dropdown/dist/auro-dropdown.d.ts +8 -0
- package/components/dropdown/dist/index.js +12 -2
- package/components/dropdown/dist/registered.js +12 -2
- package/components/form/demo/api.min.js +363 -264
- package/components/form/demo/index.min.js +363 -264
- package/components/input/demo/api.min.js +102 -77
- package/components/input/demo/index.min.js +102 -77
- package/components/input/dist/auro-input.d.ts +11 -0
- package/components/input/dist/base-input.d.ts +1 -0
- package/components/input/dist/index.js +32 -18
- package/components/input/dist/registered.js +32 -18
- package/components/menu/demo/api.min.js +1 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/menu/dist/index.js +1 -1
- package/components/menu/dist/registered.js +1 -1
- 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 +87 -26
- package/components/select/demo/index.min.js +87 -26
- package/components/select/demo/keyboardBehavior.md +3 -3
- package/components/select/dist/index.js +86 -25
- package/components/select/dist/registered.js +86 -25
- package/components/select/dist/selectKeyboardStrategy.d.ts +5 -2
- package/custom-elements.json +62 -4
- package/package.json +1 -1
|
@@ -1687,7 +1687,7 @@ class AuroHelpText extends i$2 {
|
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
1689
|
|
|
1690
|
-
var formkitVersion = '
|
|
1690
|
+
var formkitVersion = '202604031554';
|
|
1691
1691
|
|
|
1692
1692
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1693
1693
|
// See LICENSE in the project root for license information.
|
|
@@ -1679,7 +1679,7 @@ class AuroHelpText extends i$2 {
|
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
1681
|
|
|
1682
|
-
var formkitVersion = '
|
|
1682
|
+
var formkitVersion = '202604031554';
|
|
1683
1683
|
|
|
1684
1684
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1685
1685
|
// See LICENSE in the project root for license information.
|
|
@@ -1632,7 +1632,7 @@ class AuroHelpText extends LitElement {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
|
|
1635
|
-
var formkitVersion = '
|
|
1635
|
+
var formkitVersion = '202604031554';
|
|
1636
1636
|
|
|
1637
1637
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1638
1638
|
// See LICENSE in the project root for license information.
|
|
@@ -1632,7 +1632,7 @@ class AuroHelpText extends LitElement {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
|
|
1635
|
-
var formkitVersion = '
|
|
1635
|
+
var formkitVersion = '202604031554';
|
|
1636
1636
|
|
|
1637
1637
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1638
1638
|
// See LICENSE in the project root for license information.
|
|
@@ -1326,26 +1326,23 @@ function isClearBtnFocused(ctx, clearBtn = getClearBtn(ctx)) {
|
|
|
1326
1326
|
if (!clearBtn) {
|
|
1327
1327
|
return false;
|
|
1328
1328
|
}
|
|
1329
|
-
|
|
1329
|
+
const isFocused = Boolean(clearBtn.shadowRoot && clearBtn.shadowRoot.activeElement !== null);
|
|
1330
|
+
return isFocused;
|
|
1330
1331
|
}
|
|
1331
1332
|
|
|
1332
1333
|
const comboboxKeyboardStrategy = {
|
|
1333
|
-
|
|
1334
|
-
// If the clear button has focus, let the browser activate it normally.
|
|
1335
|
-
// stopPropagation prevents parent containers (e.g., forms) from treating
|
|
1336
|
-
// Enter as a submit, but we must NOT call preventDefault — that would
|
|
1337
|
-
// block the browser's built-in "Enter activates focused button" behavior.
|
|
1334
|
+
Enter(component, evt, ctx) {
|
|
1338
1335
|
if (isClearBtnFocused(ctx)) {
|
|
1336
|
+
// If the clear button has focus, let the browser activate it normally.
|
|
1337
|
+
// stopPropagation prevents parent containers (e.g., forms) from treating
|
|
1338
|
+
// Enter as a submit, but we must NOT call preventDefault — that would
|
|
1339
|
+
// block the browser's built-in "Enter activates focused button" behavior.
|
|
1339
1340
|
evt.stopPropagation();
|
|
1340
|
-
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
if (ctx.isExpanded && component.optionActive) {
|
|
1341
|
+
} else if (ctx.isExpanded && component.menu.optionActive) {
|
|
1344
1342
|
component.menu.makeSelection();
|
|
1345
|
-
|
|
1343
|
+
component.setClearBtnFocus();
|
|
1346
1344
|
evt.preventDefault();
|
|
1347
1345
|
evt.stopPropagation();
|
|
1348
|
-
component.setClearBtnFocus();
|
|
1349
1346
|
} else {
|
|
1350
1347
|
// Prevent the keypress from bubbling to parent containers (e.g., forms)
|
|
1351
1348
|
// which could interpret Enter as a submit or trigger other unintended behavior.
|
|
@@ -1357,71 +1354,28 @@ const comboboxKeyboardStrategy = {
|
|
|
1357
1354
|
}
|
|
1358
1355
|
},
|
|
1359
1356
|
|
|
1360
|
-
Tab(component,
|
|
1361
|
-
if (
|
|
1362
|
-
|
|
1357
|
+
Tab(component, _evt, ctx) {
|
|
1358
|
+
if (ctx.isExpanded && !isClearBtnFocused(ctx)) {
|
|
1359
|
+
// ClearBtn will not bubble up tab key events when it's focused, so need to manage it here when focused
|
|
1360
|
+
component.menu.makeSelection();
|
|
1361
|
+
component.hideBib();
|
|
1363
1362
|
}
|
|
1363
|
+
},
|
|
1364
1364
|
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
if (evt.shiftKey) {
|
|
1365
|
+
Home(component, evt, ctx) {
|
|
1366
|
+
if (ctx.isExpanded) {
|
|
1368
1367
|
evt.preventDefault();
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
component.menu.updateActiveOption(firstActive);
|
|
1372
|
-
}
|
|
1373
|
-
return;
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
if (ctx.isModal) {
|
|
1377
|
-
if (!ctx.activeInput) {
|
|
1378
|
-
return;
|
|
1379
|
-
}
|
|
1380
|
-
const clearBtn = getClearBtn(ctx);
|
|
1381
|
-
const clearBtnHasFocus = isClearBtnFocused(ctx, clearBtn);
|
|
1382
|
-
|
|
1383
|
-
// Tab from input: if clear button exists and doesn't have focus, focus it
|
|
1384
|
-
if (clearBtn && !clearBtnHasFocus && ctx.activeInput.value) {
|
|
1385
|
-
// Force clear button container visible to work around Safari not
|
|
1386
|
-
// propagating :focus-within through shadow DOM boundaries, which
|
|
1387
|
-
// causes .wrapper:not(:focus-within) to hide .notification.clear.
|
|
1388
|
-
const clearContainer = clearBtn.closest('.clear');
|
|
1389
|
-
if (clearContainer) {
|
|
1390
|
-
clearContainer.style.display = 'flex';
|
|
1391
|
-
clearBtn.addEventListener('focusout', () => {
|
|
1392
|
-
// Delay cleanup so :focus-within settles when focus moves
|
|
1393
|
-
// to a sibling (e.g., Shift+Tab back to the input).
|
|
1394
|
-
requestAnimationFrame(() => {
|
|
1395
|
-
clearContainer.style.display = '';
|
|
1396
|
-
});
|
|
1397
|
-
}, { once: true });
|
|
1398
|
-
}
|
|
1399
|
-
|
|
1400
|
-
// Focus the native button inside auro-button so the browser
|
|
1401
|
-
// treats it as a real focusable element inside the dialog.
|
|
1402
|
-
const nativeBtn = clearBtn.shadowRoot && clearBtn.shadowRoot.querySelector('button');
|
|
1403
|
-
if (nativeBtn) {
|
|
1404
|
-
nativeBtn.focus();
|
|
1405
|
-
} else {
|
|
1406
|
-
clearBtn.focus();
|
|
1407
|
-
}
|
|
1408
|
-
return;
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
// Tab from clear button (or no clear button / no value) →
|
|
1412
|
-
// select the highlighted option if any, then close
|
|
1413
|
-
if (component.optionActive) {
|
|
1414
|
-
component.menu.makeSelection();
|
|
1415
|
-
}
|
|
1416
|
-
component.hideBib();
|
|
1417
|
-
return;
|
|
1368
|
+
evt.stopPropagation();
|
|
1369
|
+
component.activateFirstEnabledAvailableOption();
|
|
1418
1370
|
}
|
|
1371
|
+
},
|
|
1419
1372
|
|
|
1420
|
-
|
|
1421
|
-
if (
|
|
1422
|
-
|
|
1373
|
+
End(component, evt, ctx) {
|
|
1374
|
+
if (ctx.isExpanded) {
|
|
1375
|
+
evt.preventDefault();
|
|
1376
|
+
evt.stopPropagation();
|
|
1377
|
+
component.activateLastEnabledAvailableOption();
|
|
1423
1378
|
}
|
|
1424
|
-
component.hideBib();
|
|
1425
1379
|
},
|
|
1426
1380
|
|
|
1427
1381
|
ArrowUp(component, evt, ctx) {
|
|
@@ -1430,14 +1384,15 @@ const comboboxKeyboardStrategy = {
|
|
|
1430
1384
|
return;
|
|
1431
1385
|
}
|
|
1432
1386
|
|
|
1387
|
+
// option display and navigation are prevented if there are no available options
|
|
1433
1388
|
if (component.availableOptions.length > 0) {
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1389
|
+
// navigate if bib is open otherwise open it
|
|
1390
|
+
if (component.dropdown.isPopoverVisible) {
|
|
1391
|
+
evt.preventDefault();
|
|
1392
|
+
navigateArrow(component, 'up');
|
|
1393
|
+
} else {
|
|
1394
|
+
component.showBib();
|
|
1395
|
+
}
|
|
1441
1396
|
}
|
|
1442
1397
|
},
|
|
1443
1398
|
|
|
@@ -1447,16 +1402,17 @@ const comboboxKeyboardStrategy = {
|
|
|
1447
1402
|
return;
|
|
1448
1403
|
}
|
|
1449
1404
|
|
|
1405
|
+
// option display and navigation are prevented if there are no available options
|
|
1450
1406
|
if (component.availableOptions.length > 0) {
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1407
|
+
// navigate if bib is open otherwise open it
|
|
1408
|
+
if (component.dropdown.isPopoverVisible) {
|
|
1409
|
+
evt.preventDefault();
|
|
1410
|
+
navigateArrow(component, 'down');
|
|
1411
|
+
} else {
|
|
1412
|
+
component.showBib();
|
|
1413
|
+
}
|
|
1458
1414
|
}
|
|
1459
|
-
}
|
|
1415
|
+
}
|
|
1460
1416
|
};
|
|
1461
1417
|
|
|
1462
1418
|
/**
|
|
@@ -5060,7 +5016,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
|
|
|
5060
5016
|
}
|
|
5061
5017
|
};
|
|
5062
5018
|
|
|
5063
|
-
var formkitVersion$2 = '
|
|
5019
|
+
var formkitVersion$2 = '202604031554';
|
|
5064
5020
|
|
|
5065
5021
|
let AuroElement$2 = class AuroElement extends i$4 {
|
|
5066
5022
|
static get properties() {
|
|
@@ -5241,6 +5197,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5241
5197
|
this.appearance = 'default';
|
|
5242
5198
|
this.chevron = false;
|
|
5243
5199
|
this.disabled = false;
|
|
5200
|
+
this.disableKeyboardHandling = false;
|
|
5244
5201
|
this.error = false;
|
|
5245
5202
|
this.tabIndex = 0;
|
|
5246
5203
|
this.noToggle = false;
|
|
@@ -5452,6 +5409,14 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5452
5409
|
reflect: true
|
|
5453
5410
|
},
|
|
5454
5411
|
|
|
5412
|
+
/**
|
|
5413
|
+
* If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior.
|
|
5414
|
+
*/
|
|
5415
|
+
disableKeyboardHandling: {
|
|
5416
|
+
type: Boolean,
|
|
5417
|
+
reflect: true
|
|
5418
|
+
},
|
|
5419
|
+
|
|
5455
5420
|
/**
|
|
5456
5421
|
* @private
|
|
5457
5422
|
*/
|
|
@@ -5757,7 +5722,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5757
5722
|
|
|
5758
5723
|
firstUpdated() {
|
|
5759
5724
|
// Configure the floater to, this will generate the ID for the bib
|
|
5760
|
-
this.floater.configure(this, 'auroDropdown');
|
|
5725
|
+
this.floater.configure(this, 'auroDropdown', !this.disableKeyboardHandling);
|
|
5761
5726
|
|
|
5762
5727
|
// Prevent `contain: layout` on the dropdown host. Layout containment
|
|
5763
5728
|
// creates a containing block for position:fixed descendants (the bib),
|
|
@@ -6065,6 +6030,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6065
6030
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
6066
6031
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
6067
6032
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
6033
|
+
aria-disabled="${o(this.disabled ? 'true' : undefined)}"
|
|
6068
6034
|
@focusin="${this.handleFocusin}"
|
|
6069
6035
|
@blur="${this.handleFocusOut}">
|
|
6070
6036
|
<div class="triggerContentWrapper" id="triggerLabel">
|
|
@@ -11791,6 +11757,12 @@ class BaseInput extends AuroElement$1 {
|
|
|
11791
11757
|
this.wrapperElement = this.shadowRoot.querySelector('.wrapper');
|
|
11792
11758
|
this.inputElement = this.renderRoot.querySelector('input');
|
|
11793
11759
|
this.labelElement = this.shadowRoot.querySelector('label');
|
|
11760
|
+
this.clearBtn = this.clearButtonRef.value;
|
|
11761
|
+
|
|
11762
|
+
// This must get moved into inputKeyboardStrategy when implemented
|
|
11763
|
+
this.clearBtn.addEventListener('keydown', (evt) => {
|
|
11764
|
+
evt.stopPropagation();
|
|
11765
|
+
});
|
|
11794
11766
|
|
|
11795
11767
|
this.patchInputEvent(this.inputElement);
|
|
11796
11768
|
|
|
@@ -12814,7 +12786,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
|
|
|
12814
12786
|
}
|
|
12815
12787
|
};
|
|
12816
12788
|
|
|
12817
|
-
var formkitVersion$1 = '
|
|
12789
|
+
var formkitVersion$1 = '202604031554';
|
|
12818
12790
|
|
|
12819
12791
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12820
12792
|
// See LICENSE in the project root for license information.
|
|
@@ -12871,6 +12843,11 @@ class AuroInput extends BaseInput {
|
|
|
12871
12843
|
* @private
|
|
12872
12844
|
*/
|
|
12873
12845
|
this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion$2, _$2);
|
|
12846
|
+
|
|
12847
|
+
/**
|
|
12848
|
+
* @private
|
|
12849
|
+
*/
|
|
12850
|
+
this.clearButtonRef = e$1();
|
|
12874
12851
|
}
|
|
12875
12852
|
|
|
12876
12853
|
static get styles() {
|
|
@@ -12888,6 +12865,19 @@ class AuroInput extends BaseInput {
|
|
|
12888
12865
|
];
|
|
12889
12866
|
}
|
|
12890
12867
|
|
|
12868
|
+
/**
|
|
12869
|
+
* Returns classmap configuration for the clear button visibility.
|
|
12870
|
+
* The button is hidden when the input has no value, is read-only, or is disabled.
|
|
12871
|
+
* @private
|
|
12872
|
+
* @returns {Record<string, boolean>} - Classmap object controlling clear button display state.
|
|
12873
|
+
*/
|
|
12874
|
+
get clearBtnClassMap() {
|
|
12875
|
+
return {
|
|
12876
|
+
'util_displayHidden': !this.hasValue || this.readyOnly || this.disabled
|
|
12877
|
+
};
|
|
12878
|
+
}
|
|
12879
|
+
|
|
12880
|
+
|
|
12891
12881
|
/**
|
|
12892
12882
|
* Determines if the HTML input element should be visually hidden.
|
|
12893
12883
|
* Returns true when display value content exists without focus and has a value,
|
|
@@ -13207,10 +13197,11 @@ class AuroInput extends BaseInput {
|
|
|
13207
13197
|
<${this.buttonTag}
|
|
13208
13198
|
@click="${this.handleClickClear}"
|
|
13209
13199
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
13210
|
-
class="notificationBtn clearBtn"
|
|
13200
|
+
class="notificationBtn clearBtn ${e$3(this.clearBtnClassMap)}"
|
|
13211
13201
|
shape="circle"
|
|
13212
13202
|
size="sm"
|
|
13213
|
-
variant="ghost"
|
|
13203
|
+
variant="ghost"
|
|
13204
|
+
${n$2(this.clearButtonRef)}>
|
|
13214
13205
|
<span><slot name="ariaLabel.clear">Clear Input</slot></span>
|
|
13215
13206
|
<${this.iconTag}
|
|
13216
13207
|
aria-hidden="true"
|
|
@@ -13355,11 +13346,7 @@ class AuroInput extends BaseInput {
|
|
|
13355
13346
|
<div part="accent-right" class="accents right">
|
|
13356
13347
|
${this.renderValidationErrorIconHtml()}
|
|
13357
13348
|
${this.hasValue && this.type === 'password' ? this.renderHtmlNotificationPassword() : undefined}
|
|
13358
|
-
${this.
|
|
13359
|
-
${!this.disabled && !this.readonly ? u$7`
|
|
13360
|
-
${this.renderHtmlActionClear()}
|
|
13361
|
-
` : undefined}
|
|
13362
|
-
` : undefined}
|
|
13349
|
+
${this.renderHtmlActionClear()}
|
|
13363
13350
|
</div>
|
|
13364
13351
|
</div>
|
|
13365
13352
|
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
@@ -13391,11 +13378,7 @@ class AuroInput extends BaseInput {
|
|
|
13391
13378
|
${this.layout.includes('right') || this.layout === "emphasized" ? u$7`
|
|
13392
13379
|
${this.renderValidationErrorIconHtml()}
|
|
13393
13380
|
` : undefined}
|
|
13394
|
-
${this.
|
|
13395
|
-
${!this.disabled && !this.readonly ? u$7`
|
|
13396
|
-
${this.renderHtmlActionClear()}
|
|
13397
|
-
` : undefined}
|
|
13398
|
-
` : undefined}
|
|
13381
|
+
${this.renderHtmlActionClear()}
|
|
13399
13382
|
</div>
|
|
13400
13383
|
</div>
|
|
13401
13384
|
<div class="${e$3(this.helpTextClasses)}" part="inputHelpText">
|
|
@@ -13423,11 +13406,7 @@ class AuroInput extends BaseInput {
|
|
|
13423
13406
|
</div>
|
|
13424
13407
|
<div class="accents right">
|
|
13425
13408
|
${this.renderValidationErrorIconHtml()}
|
|
13426
|
-
${this.
|
|
13427
|
-
${!this.disabled && !this.readonly ? u$7`
|
|
13428
|
-
${this.renderHtmlActionClear()}
|
|
13429
|
-
` : undefined}
|
|
13430
|
-
` : undefined}
|
|
13409
|
+
${this.renderHtmlActionClear()}
|
|
13431
13410
|
</div>
|
|
13432
13411
|
</div>
|
|
13433
13412
|
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
@@ -13853,7 +13832,7 @@ class AuroBibtemplate extends i$4 {
|
|
|
13853
13832
|
}
|
|
13854
13833
|
}
|
|
13855
13834
|
|
|
13856
|
-
var formkitVersion = '
|
|
13835
|
+
var formkitVersion = '202604031554';
|
|
13857
13836
|
|
|
13858
13837
|
var styleCss$3 = i$7`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13859
13838
|
|
|
@@ -14332,6 +14311,7 @@ class AuroCombobox extends AuroElement {
|
|
|
14332
14311
|
|
|
14333
14312
|
/**
|
|
14334
14313
|
* Array of available options to display in the dropdown.
|
|
14314
|
+
* This array contains all non-hidden options (e.g., hidden by filtering on input value).
|
|
14335
14315
|
* @private
|
|
14336
14316
|
*/
|
|
14337
14317
|
availableOptions: {
|
|
@@ -14709,12 +14689,40 @@ class AuroCombobox extends AuroElement {
|
|
|
14709
14689
|
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroCombobox);
|
|
14710
14690
|
}
|
|
14711
14691
|
|
|
14692
|
+
/**
|
|
14693
|
+
* Mark the first available (non-hidden), enabled option as `active`.
|
|
14694
|
+
* @private
|
|
14695
|
+
* @returns {void}
|
|
14696
|
+
*/
|
|
14697
|
+
activateFirstEnabledAvailableOption() {
|
|
14698
|
+
const firstEnabledOptionIndex = this.availableOptions.findIndex((opt) => !opt.disabled);
|
|
14699
|
+
this.updateActiveOption(firstEnabledOptionIndex);
|
|
14700
|
+
}
|
|
14701
|
+
|
|
14702
|
+
/**
|
|
14703
|
+
* Mark the last available (non-hidden), enabled option as `active`.
|
|
14704
|
+
* @private
|
|
14705
|
+
* @returns {void}
|
|
14706
|
+
*/
|
|
14707
|
+
activateLastEnabledAvailableOption() {
|
|
14708
|
+
let lastEnabledOptionIndex = -1;
|
|
14709
|
+
|
|
14710
|
+
// Work backwards through the available options array to find the last enabled option
|
|
14711
|
+
for (let index = this.availableOptions.length - 1; index >= 0; index -= 1) {
|
|
14712
|
+
if (!this.availableOptions[index].disabled) {
|
|
14713
|
+
lastEnabledOptionIndex = index;
|
|
14714
|
+
break;
|
|
14715
|
+
}
|
|
14716
|
+
}
|
|
14717
|
+
|
|
14718
|
+
this.updateActiveOption(lastEnabledOptionIndex);
|
|
14719
|
+
}
|
|
14720
|
+
|
|
14712
14721
|
/**
|
|
14713
14722
|
* Updates the filter for the available options based on the input value.
|
|
14714
14723
|
* @private
|
|
14715
14724
|
*/
|
|
14716
14725
|
updateFilter() {
|
|
14717
|
-
|
|
14718
14726
|
// Reset available options if noFilter is set to false after being true.
|
|
14719
14727
|
if (this.noFilter) {
|
|
14720
14728
|
this.availableOptions = [...this.options];
|
|
@@ -14833,6 +14841,10 @@ class AuroCombobox extends AuroElement {
|
|
|
14833
14841
|
if (this.value && this.input.value && !this.menu.value) {
|
|
14834
14842
|
this.syncValuesAndStates();
|
|
14835
14843
|
}
|
|
14844
|
+
|
|
14845
|
+
if (!this.availableOptions.includes(this.menu.optionActive)) {
|
|
14846
|
+
this.activateFirstEnabledAvailableOption();
|
|
14847
|
+
}
|
|
14836
14848
|
}
|
|
14837
14849
|
|
|
14838
14850
|
/**
|
|
@@ -14906,9 +14918,6 @@ class AuroCombobox extends AuroElement {
|
|
|
14906
14918
|
if (this.dropdownOpen) {
|
|
14907
14919
|
const expandedDelay = 150;
|
|
14908
14920
|
this._expandedTimeout = setTimeout(() => {
|
|
14909
|
-
if (!this.value) {
|
|
14910
|
-
this.updateActiveOption(0);
|
|
14911
|
-
}
|
|
14912
14921
|
this.triggerExpandedState = true;
|
|
14913
14922
|
}, expandedDelay);
|
|
14914
14923
|
} else {
|
|
@@ -14918,16 +14927,6 @@ class AuroCombobox extends AuroElement {
|
|
|
14918
14927
|
// Clear aria-activedescendant when dropdown closes
|
|
14919
14928
|
if (!this.dropdownOpen && this.input) {
|
|
14920
14929
|
this.input.setActiveDescendant(null);
|
|
14921
|
-
this.optionActive = null;
|
|
14922
|
-
|
|
14923
|
-
// Remove the highlighted state from all menu options so re-opening
|
|
14924
|
-
// the dropdown doesn't show a stale highlight.
|
|
14925
|
-
if (this.options) {
|
|
14926
|
-
this.options.forEach((opt) => {
|
|
14927
|
-
opt.active = false;
|
|
14928
|
-
opt.classList.remove('active');
|
|
14929
|
-
});
|
|
14930
|
-
}
|
|
14931
14930
|
|
|
14932
14931
|
// Restore pointer events on the menu in case they were disabled
|
|
14933
14932
|
// during fullscreen open to prevent touch pass-through.
|
|
@@ -14968,13 +14967,6 @@ class AuroCombobox extends AuroElement {
|
|
|
14968
14967
|
this.setInputFocus();
|
|
14969
14968
|
this._inFullscreenTransition = false;
|
|
14970
14969
|
});
|
|
14971
|
-
} else {
|
|
14972
|
-
// wait a frame in case the bib gets hidden immediately after showing because there is no value
|
|
14973
|
-
setTimeout(() => {
|
|
14974
|
-
if (this.componentHasFocus) {
|
|
14975
|
-
this.setInputFocus();
|
|
14976
|
-
}
|
|
14977
|
-
}, 0);
|
|
14978
14970
|
}
|
|
14979
14971
|
}
|
|
14980
14972
|
});
|
|
@@ -16356,7 +16348,7 @@ class AuroMenuOption extends AuroElement {
|
|
|
16356
16348
|
});
|
|
16357
16349
|
|
|
16358
16350
|
return u$7`
|
|
16359
|
-
<div class="${classes}">
|
|
16351
|
+
<div class="${classes}" aria-disabled="${this.disabled ? 'true' : 'false'}">
|
|
16360
16352
|
${this.selected && !this.noCheckmark
|
|
16361
16353
|
? this.generateIconHtml(checkmarkIcon.svg)
|
|
16362
16354
|
: undefined}
|