@aurodesignsystem-dev/auro-formkit 0.0.0-pr1411.3 → 0.0.0-pr1413.1
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 +109 -127
- package/components/combobox/demo/index.min.js +109 -127
- 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 +109 -127
- package/components/combobox/dist/registered.js +109 -127
- package/components/counter/demo/api.min.js +2 -2
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/api.min.js +51 -141
- package/components/datepicker/demo/index.min.js +51 -141
- package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +1 -4
- package/components/datepicker/dist/index.js +51 -141
- package/components/datepicker/dist/registered.js +51 -141
- package/components/dropdown/demo/api.min.js +1 -1
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/api.min.js +263 -358
- package/components/form/demo/index.min.js +263 -358
- 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/keyboardBehavior.md +0 -0
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/keyboardBehavior.md +0 -0
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/api.min.js +2 -2
- package/components/select/demo/index.min.js +2 -2
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +43 -4
- package/package.json +3 -3
- /package/components/datepicker/demo/{keyboardBehavior.html → keyboard-behavior.html} +0 -0
|
@@ -1249,26 +1249,23 @@ function isClearBtnFocused(ctx, clearBtn = getClearBtn(ctx)) {
|
|
|
1249
1249
|
if (!clearBtn) {
|
|
1250
1250
|
return false;
|
|
1251
1251
|
}
|
|
1252
|
-
|
|
1252
|
+
const isFocused = Boolean(clearBtn.shadowRoot && clearBtn.shadowRoot.activeElement !== null);
|
|
1253
|
+
return isFocused;
|
|
1253
1254
|
}
|
|
1254
1255
|
|
|
1255
1256
|
const comboboxKeyboardStrategy = {
|
|
1256
|
-
|
|
1257
|
-
// If the clear button has focus, let the browser activate it normally.
|
|
1258
|
-
// stopPropagation prevents parent containers (e.g., forms) from treating
|
|
1259
|
-
// Enter as a submit, but we must NOT call preventDefault — that would
|
|
1260
|
-
// block the browser's built-in "Enter activates focused button" behavior.
|
|
1257
|
+
Enter(component, evt, ctx) {
|
|
1261
1258
|
if (isClearBtnFocused(ctx)) {
|
|
1259
|
+
// If the clear button has focus, let the browser activate it normally.
|
|
1260
|
+
// stopPropagation prevents parent containers (e.g., forms) from treating
|
|
1261
|
+
// Enter as a submit, but we must NOT call preventDefault — that would
|
|
1262
|
+
// block the browser's built-in "Enter activates focused button" behavior.
|
|
1262
1263
|
evt.stopPropagation();
|
|
1263
|
-
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
if (ctx.isExpanded && component.optionActive) {
|
|
1264
|
+
} else if (ctx.isExpanded && component.menu.optionActive) {
|
|
1267
1265
|
component.menu.makeSelection();
|
|
1268
|
-
|
|
1266
|
+
component.setClearBtnFocus();
|
|
1269
1267
|
evt.preventDefault();
|
|
1270
1268
|
evt.stopPropagation();
|
|
1271
|
-
component.setClearBtnFocus();
|
|
1272
1269
|
} else {
|
|
1273
1270
|
// Prevent the keypress from bubbling to parent containers (e.g., forms)
|
|
1274
1271
|
// which could interpret Enter as a submit or trigger other unintended behavior.
|
|
@@ -1280,71 +1277,28 @@ const comboboxKeyboardStrategy = {
|
|
|
1280
1277
|
}
|
|
1281
1278
|
},
|
|
1282
1279
|
|
|
1283
|
-
Tab(component,
|
|
1284
|
-
if (
|
|
1285
|
-
|
|
1280
|
+
Tab(component, _evt, ctx) {
|
|
1281
|
+
if (ctx.isExpanded && !isClearBtnFocused(ctx)) {
|
|
1282
|
+
// ClearBtn will not bubble up tab key events when it's focused, so need to manage it here when focused
|
|
1283
|
+
component.menu.makeSelection();
|
|
1284
|
+
component.hideBib();
|
|
1286
1285
|
}
|
|
1286
|
+
},
|
|
1287
1287
|
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
if (evt.shiftKey) {
|
|
1288
|
+
Home(component, evt, ctx) {
|
|
1289
|
+
if (ctx.isExpanded) {
|
|
1291
1290
|
evt.preventDefault();
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
component.menu.updateActiveOption(firstActive);
|
|
1295
|
-
}
|
|
1296
|
-
return;
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
if (ctx.isModal) {
|
|
1300
|
-
if (!ctx.activeInput) {
|
|
1301
|
-
return;
|
|
1302
|
-
}
|
|
1303
|
-
const clearBtn = getClearBtn(ctx);
|
|
1304
|
-
const clearBtnHasFocus = isClearBtnFocused(ctx, clearBtn);
|
|
1305
|
-
|
|
1306
|
-
// Tab from input: if clear button exists and doesn't have focus, focus it
|
|
1307
|
-
if (clearBtn && !clearBtnHasFocus && ctx.activeInput.value) {
|
|
1308
|
-
// Force clear button container visible to work around Safari not
|
|
1309
|
-
// propagating :focus-within through shadow DOM boundaries, which
|
|
1310
|
-
// causes .wrapper:not(:focus-within) to hide .notification.clear.
|
|
1311
|
-
const clearContainer = clearBtn.closest('.clear');
|
|
1312
|
-
if (clearContainer) {
|
|
1313
|
-
clearContainer.style.display = 'flex';
|
|
1314
|
-
clearBtn.addEventListener('focusout', () => {
|
|
1315
|
-
// Delay cleanup so :focus-within settles when focus moves
|
|
1316
|
-
// to a sibling (e.g., Shift+Tab back to the input).
|
|
1317
|
-
requestAnimationFrame(() => {
|
|
1318
|
-
clearContainer.style.display = '';
|
|
1319
|
-
});
|
|
1320
|
-
}, { once: true });
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
// Focus the native button inside auro-button so the browser
|
|
1324
|
-
// treats it as a real focusable element inside the dialog.
|
|
1325
|
-
const nativeBtn = clearBtn.shadowRoot && clearBtn.shadowRoot.querySelector('button');
|
|
1326
|
-
if (nativeBtn) {
|
|
1327
|
-
nativeBtn.focus();
|
|
1328
|
-
} else {
|
|
1329
|
-
clearBtn.focus();
|
|
1330
|
-
}
|
|
1331
|
-
return;
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
// Tab from clear button (or no clear button / no value) →
|
|
1335
|
-
// select the highlighted option if any, then close
|
|
1336
|
-
if (component.optionActive) {
|
|
1337
|
-
component.menu.makeSelection();
|
|
1338
|
-
}
|
|
1339
|
-
component.hideBib();
|
|
1340
|
-
return;
|
|
1291
|
+
evt.stopPropagation();
|
|
1292
|
+
component.activateFirstEnabledAvailableOption();
|
|
1341
1293
|
}
|
|
1294
|
+
},
|
|
1342
1295
|
|
|
1343
|
-
|
|
1344
|
-
if (
|
|
1345
|
-
|
|
1296
|
+
End(component, evt, ctx) {
|
|
1297
|
+
if (ctx.isExpanded) {
|
|
1298
|
+
evt.preventDefault();
|
|
1299
|
+
evt.stopPropagation();
|
|
1300
|
+
component.activateLastEnabledAvailableOption();
|
|
1346
1301
|
}
|
|
1347
|
-
component.hideBib();
|
|
1348
1302
|
},
|
|
1349
1303
|
|
|
1350
1304
|
ArrowUp(component, evt, ctx) {
|
|
@@ -1353,14 +1307,15 @@ const comboboxKeyboardStrategy = {
|
|
|
1353
1307
|
return;
|
|
1354
1308
|
}
|
|
1355
1309
|
|
|
1310
|
+
// option display and navigation are prevented if there are no available options
|
|
1356
1311
|
if (component.availableOptions.length > 0) {
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1312
|
+
// navigate if bib is open otherwise open it
|
|
1313
|
+
if (component.dropdown.isPopoverVisible) {
|
|
1314
|
+
evt.preventDefault();
|
|
1315
|
+
navigateArrow(component, 'up');
|
|
1316
|
+
} else {
|
|
1317
|
+
component.showBib();
|
|
1318
|
+
}
|
|
1364
1319
|
}
|
|
1365
1320
|
},
|
|
1366
1321
|
|
|
@@ -1370,16 +1325,17 @@ const comboboxKeyboardStrategy = {
|
|
|
1370
1325
|
return;
|
|
1371
1326
|
}
|
|
1372
1327
|
|
|
1328
|
+
// option display and navigation are prevented if there are no available options
|
|
1373
1329
|
if (component.availableOptions.length > 0) {
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1330
|
+
// navigate if bib is open otherwise open it
|
|
1331
|
+
if (component.dropdown.isPopoverVisible) {
|
|
1332
|
+
evt.preventDefault();
|
|
1333
|
+
navigateArrow(component, 'down');
|
|
1334
|
+
} else {
|
|
1335
|
+
component.showBib();
|
|
1336
|
+
}
|
|
1381
1337
|
}
|
|
1382
|
-
}
|
|
1338
|
+
}
|
|
1383
1339
|
};
|
|
1384
1340
|
|
|
1385
1341
|
/**
|
|
@@ -4983,7 +4939,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
|
|
|
4983
4939
|
}
|
|
4984
4940
|
};
|
|
4985
4941
|
|
|
4986
|
-
var formkitVersion$2 = '
|
|
4942
|
+
var formkitVersion$2 = '202604031553';
|
|
4987
4943
|
|
|
4988
4944
|
let AuroElement$2 = class AuroElement extends i$4 {
|
|
4989
4945
|
static get properties() {
|
|
@@ -11724,6 +11680,12 @@ class BaseInput extends AuroElement$1 {
|
|
|
11724
11680
|
this.wrapperElement = this.shadowRoot.querySelector('.wrapper');
|
|
11725
11681
|
this.inputElement = this.renderRoot.querySelector('input');
|
|
11726
11682
|
this.labelElement = this.shadowRoot.querySelector('label');
|
|
11683
|
+
this.clearBtn = this.clearButtonRef.value;
|
|
11684
|
+
|
|
11685
|
+
// This must get moved into inputKeyboardStrategy when implemented
|
|
11686
|
+
this.clearBtn.addEventListener('keydown', (evt) => {
|
|
11687
|
+
evt.stopPropagation();
|
|
11688
|
+
});
|
|
11727
11689
|
|
|
11728
11690
|
this.patchInputEvent(this.inputElement);
|
|
11729
11691
|
|
|
@@ -12747,7 +12709,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
|
|
|
12747
12709
|
}
|
|
12748
12710
|
};
|
|
12749
12711
|
|
|
12750
|
-
var formkitVersion$1 = '
|
|
12712
|
+
var formkitVersion$1 = '202604031553';
|
|
12751
12713
|
|
|
12752
12714
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12753
12715
|
// See LICENSE in the project root for license information.
|
|
@@ -12804,6 +12766,11 @@ class AuroInput extends BaseInput {
|
|
|
12804
12766
|
* @private
|
|
12805
12767
|
*/
|
|
12806
12768
|
this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion$2, _$2);
|
|
12769
|
+
|
|
12770
|
+
/**
|
|
12771
|
+
* @private
|
|
12772
|
+
*/
|
|
12773
|
+
this.clearButtonRef = e$1();
|
|
12807
12774
|
}
|
|
12808
12775
|
|
|
12809
12776
|
static get styles() {
|
|
@@ -12821,6 +12788,19 @@ class AuroInput extends BaseInput {
|
|
|
12821
12788
|
];
|
|
12822
12789
|
}
|
|
12823
12790
|
|
|
12791
|
+
/**
|
|
12792
|
+
* Returns classmap configuration for the clear button visibility.
|
|
12793
|
+
* The button is hidden when the input has no value, is read-only, or is disabled.
|
|
12794
|
+
* @private
|
|
12795
|
+
* @returns {Record<string, boolean>} - Classmap object controlling clear button display state.
|
|
12796
|
+
*/
|
|
12797
|
+
get clearBtnClassMap() {
|
|
12798
|
+
return {
|
|
12799
|
+
'util_displayHidden': !this.hasValue || this.readyOnly || this.disabled
|
|
12800
|
+
};
|
|
12801
|
+
}
|
|
12802
|
+
|
|
12803
|
+
|
|
12824
12804
|
/**
|
|
12825
12805
|
* Determines if the HTML input element should be visually hidden.
|
|
12826
12806
|
* Returns true when display value content exists without focus and has a value,
|
|
@@ -13140,10 +13120,11 @@ class AuroInput extends BaseInput {
|
|
|
13140
13120
|
<${this.buttonTag}
|
|
13141
13121
|
@click="${this.handleClickClear}"
|
|
13142
13122
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
13143
|
-
class="notificationBtn clearBtn"
|
|
13123
|
+
class="notificationBtn clearBtn ${e$3(this.clearBtnClassMap)}"
|
|
13144
13124
|
shape="circle"
|
|
13145
13125
|
size="sm"
|
|
13146
|
-
variant="ghost"
|
|
13126
|
+
variant="ghost"
|
|
13127
|
+
${n$2(this.clearButtonRef)}>
|
|
13147
13128
|
<span><slot name="ariaLabel.clear">Clear Input</slot></span>
|
|
13148
13129
|
<${this.iconTag}
|
|
13149
13130
|
aria-hidden="true"
|
|
@@ -13288,11 +13269,7 @@ class AuroInput extends BaseInput {
|
|
|
13288
13269
|
<div part="accent-right" class="accents right">
|
|
13289
13270
|
${this.renderValidationErrorIconHtml()}
|
|
13290
13271
|
${this.hasValue && this.type === 'password' ? this.renderHtmlNotificationPassword() : undefined}
|
|
13291
|
-
${this.
|
|
13292
|
-
${!this.disabled && !this.readonly ? u$7`
|
|
13293
|
-
${this.renderHtmlActionClear()}
|
|
13294
|
-
` : undefined}
|
|
13295
|
-
` : undefined}
|
|
13272
|
+
${this.renderHtmlActionClear()}
|
|
13296
13273
|
</div>
|
|
13297
13274
|
</div>
|
|
13298
13275
|
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
@@ -13324,11 +13301,7 @@ class AuroInput extends BaseInput {
|
|
|
13324
13301
|
${this.layout.includes('right') || this.layout === "emphasized" ? u$7`
|
|
13325
13302
|
${this.renderValidationErrorIconHtml()}
|
|
13326
13303
|
` : undefined}
|
|
13327
|
-
${this.
|
|
13328
|
-
${!this.disabled && !this.readonly ? u$7`
|
|
13329
|
-
${this.renderHtmlActionClear()}
|
|
13330
|
-
` : undefined}
|
|
13331
|
-
` : undefined}
|
|
13304
|
+
${this.renderHtmlActionClear()}
|
|
13332
13305
|
</div>
|
|
13333
13306
|
</div>
|
|
13334
13307
|
<div class="${e$3(this.helpTextClasses)}" part="inputHelpText">
|
|
@@ -13356,11 +13329,7 @@ class AuroInput extends BaseInput {
|
|
|
13356
13329
|
</div>
|
|
13357
13330
|
<div class="accents right">
|
|
13358
13331
|
${this.renderValidationErrorIconHtml()}
|
|
13359
|
-
${this.
|
|
13360
|
-
${!this.disabled && !this.readonly ? u$7`
|
|
13361
|
-
${this.renderHtmlActionClear()}
|
|
13362
|
-
` : undefined}
|
|
13363
|
-
` : undefined}
|
|
13332
|
+
${this.renderHtmlActionClear()}
|
|
13364
13333
|
</div>
|
|
13365
13334
|
</div>
|
|
13366
13335
|
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
@@ -13786,7 +13755,7 @@ class AuroBibtemplate extends i$4 {
|
|
|
13786
13755
|
}
|
|
13787
13756
|
}
|
|
13788
13757
|
|
|
13789
|
-
var formkitVersion = '
|
|
13758
|
+
var formkitVersion = '202604031553';
|
|
13790
13759
|
|
|
13791
13760
|
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}`;
|
|
13792
13761
|
|
|
@@ -14265,6 +14234,7 @@ class AuroCombobox extends AuroElement {
|
|
|
14265
14234
|
|
|
14266
14235
|
/**
|
|
14267
14236
|
* Array of available options to display in the dropdown.
|
|
14237
|
+
* This array contains all non-hidden options (e.g., hidden by filtering on input value).
|
|
14268
14238
|
* @private
|
|
14269
14239
|
*/
|
|
14270
14240
|
availableOptions: {
|
|
@@ -14642,12 +14612,40 @@ class AuroCombobox extends AuroElement {
|
|
|
14642
14612
|
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroCombobox);
|
|
14643
14613
|
}
|
|
14644
14614
|
|
|
14615
|
+
/**
|
|
14616
|
+
* Mark the first available (non-hidden), enabled option as `active`.
|
|
14617
|
+
* @private
|
|
14618
|
+
* @returns {void}
|
|
14619
|
+
*/
|
|
14620
|
+
activateFirstEnabledAvailableOption() {
|
|
14621
|
+
const firstEnabledOptionIndex = this.availableOptions.findIndex((opt) => !opt.disabled);
|
|
14622
|
+
this.updateActiveOption(firstEnabledOptionIndex);
|
|
14623
|
+
}
|
|
14624
|
+
|
|
14625
|
+
/**
|
|
14626
|
+
* Mark the last available (non-hidden), enabled option as `active`.
|
|
14627
|
+
* @private
|
|
14628
|
+
* @returns {void}
|
|
14629
|
+
*/
|
|
14630
|
+
activateLastEnabledAvailableOption() {
|
|
14631
|
+
let lastEnabledOptionIndex = -1;
|
|
14632
|
+
|
|
14633
|
+
// Work backwards through the available options array to find the last enabled option
|
|
14634
|
+
for (let index = this.availableOptions.length - 1; index >= 0; index -= 1) {
|
|
14635
|
+
if (!this.availableOptions[index].disabled) {
|
|
14636
|
+
lastEnabledOptionIndex = index;
|
|
14637
|
+
break;
|
|
14638
|
+
}
|
|
14639
|
+
}
|
|
14640
|
+
|
|
14641
|
+
this.updateActiveOption(lastEnabledOptionIndex);
|
|
14642
|
+
}
|
|
14643
|
+
|
|
14645
14644
|
/**
|
|
14646
14645
|
* Updates the filter for the available options based on the input value.
|
|
14647
14646
|
* @private
|
|
14648
14647
|
*/
|
|
14649
14648
|
updateFilter() {
|
|
14650
|
-
|
|
14651
14649
|
// Reset available options if noFilter is set to false after being true.
|
|
14652
14650
|
if (this.noFilter) {
|
|
14653
14651
|
this.availableOptions = [...this.options];
|
|
@@ -14766,6 +14764,10 @@ class AuroCombobox extends AuroElement {
|
|
|
14766
14764
|
if (this.value && this.input.value && !this.menu.value) {
|
|
14767
14765
|
this.syncValuesAndStates();
|
|
14768
14766
|
}
|
|
14767
|
+
|
|
14768
|
+
if (!this.availableOptions.includes(this.menu.optionActive)) {
|
|
14769
|
+
this.activateFirstEnabledAvailableOption();
|
|
14770
|
+
}
|
|
14769
14771
|
}
|
|
14770
14772
|
|
|
14771
14773
|
/**
|
|
@@ -14839,9 +14841,6 @@ class AuroCombobox extends AuroElement {
|
|
|
14839
14841
|
if (this.dropdownOpen) {
|
|
14840
14842
|
const expandedDelay = 150;
|
|
14841
14843
|
this._expandedTimeout = setTimeout(() => {
|
|
14842
|
-
if (!this.value) {
|
|
14843
|
-
this.updateActiveOption(0);
|
|
14844
|
-
}
|
|
14845
14844
|
this.triggerExpandedState = true;
|
|
14846
14845
|
}, expandedDelay);
|
|
14847
14846
|
} else {
|
|
@@ -14851,16 +14850,6 @@ class AuroCombobox extends AuroElement {
|
|
|
14851
14850
|
// Clear aria-activedescendant when dropdown closes
|
|
14852
14851
|
if (!this.dropdownOpen && this.input) {
|
|
14853
14852
|
this.input.setActiveDescendant(null);
|
|
14854
|
-
this.optionActive = null;
|
|
14855
|
-
|
|
14856
|
-
// Remove the highlighted state from all menu options so re-opening
|
|
14857
|
-
// the dropdown doesn't show a stale highlight.
|
|
14858
|
-
if (this.options) {
|
|
14859
|
-
this.options.forEach((opt) => {
|
|
14860
|
-
opt.active = false;
|
|
14861
|
-
opt.classList.remove('active');
|
|
14862
|
-
});
|
|
14863
|
-
}
|
|
14864
14853
|
|
|
14865
14854
|
// Restore pointer events on the menu in case they were disabled
|
|
14866
14855
|
// during fullscreen open to prevent touch pass-through.
|
|
@@ -14901,13 +14890,6 @@ class AuroCombobox extends AuroElement {
|
|
|
14901
14890
|
this.setInputFocus();
|
|
14902
14891
|
this._inFullscreenTransition = false;
|
|
14903
14892
|
});
|
|
14904
|
-
} else {
|
|
14905
|
-
// wait a frame in case the bib gets hidden immediately after showing because there is no value
|
|
14906
|
-
setTimeout(() => {
|
|
14907
|
-
if (this.componentHasFocus) {
|
|
14908
|
-
this.setInputFocus();
|
|
14909
|
-
}
|
|
14910
|
-
}, 0);
|
|
14911
14893
|
}
|
|
14912
14894
|
}
|
|
14913
14895
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="mainContent">
|
|
4
4
|
<div class="scrollWrapper">
|
|
5
5
|
<auro-header level="2" id="tabBehavior">Tab Behavior</auro-header>
|
|
6
|
-
<p>The component trigger contains an <code><auro-input></code> which has two
|
|
6
|
+
<p>The component trigger contains an <code><auro-input></code> which has two elements:</p>
|
|
7
7
|
<ol>
|
|
8
8
|
<li><strong>Input</strong></li>
|
|
9
9
|
<li><strong>Clear button:</strong> only shown when the input has a value.</li>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<p>Each focusable element <em>(when shown)</em> participates in the browser window's default <code>tabindex</code> sequence.</p>
|
|
12
12
|
<p>When the component is <code>disabled</code> it is removed from the <code>tabindex</code> sequence. VoiceOver's virtual cursor <em>(swipe navigation)</em> can still encounter the component, but standard keyboard <code>Tab</code> navigation skips it.</p>
|
|
13
13
|
<p>On <strong>large viewport devices</strong> (e.g., desktop browser, tablet) there is no focusable content inside the component bib.</p>
|
|
14
|
-
<p>On <strong>small viewport devices</strong> (e.g., phone) the bib opens a modal dialog with a focusable <strong>input</strong> and <strong>clear button</strong> which
|
|
14
|
+
<p>On <strong>small viewport devices</strong> (e.g., phone) the bib opens a modal dialog with a focusable <strong>input</strong> and <strong>clear button</strong> which can receive <strong>Click</strong> and <strong>Tap</strong> events.</p>
|
|
15
15
|
<auro-header level="2" id="keyEvents">Key Events</auro-header>
|
|
16
16
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/keyEvents.md) -->
|
|
17
17
|
<!-- The below content is automatically added from ./../docs/partials/keyEvents.md -->
|
|
@@ -166,8 +166,8 @@
|
|
|
166
166
|
</td>
|
|
167
167
|
</tr>
|
|
168
168
|
<tr>
|
|
169
|
-
<td rowspan="
|
|
170
|
-
<td rowspan="
|
|
169
|
+
<td rowspan="4">Enter</td>
|
|
170
|
+
<td rowspan="4">-</td>
|
|
171
171
|
<td>Collapsed, list options have been populated</td>
|
|
172
172
|
<td>
|
|
173
173
|
Trigger input, <strong>NOT</strong> the input clear button
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
</td>
|
|
187
187
|
</tr>
|
|
188
188
|
<tr>
|
|
189
|
-
<td
|
|
189
|
+
<td>Expanded, large viewport device</td>
|
|
190
190
|
<td>
|
|
191
191
|
Trigger input element, <strong>NOT</strong> the trigger input clear button
|
|
192
192
|
</td>
|
|
@@ -195,15 +195,7 @@
|
|
|
195
195
|
</td>
|
|
196
196
|
</tr>
|
|
197
197
|
<tr>
|
|
198
|
-
<td>
|
|
199
|
-
Trigger input close button, <strong>NOT</strong> the trigger input
|
|
200
|
-
</td>
|
|
201
|
-
<td>
|
|
202
|
-
The input value is cleared and <strong>focus</strong> is moved to the trigger input element.
|
|
203
|
-
</td>
|
|
204
|
-
</tr>
|
|
205
|
-
<tr>
|
|
206
|
-
<td rowspan="2">Expanded, small viewport device</td>
|
|
198
|
+
<td>Expanded, small viewport device</td>
|
|
207
199
|
<td>
|
|
208
200
|
Dialog input element, <strong>NOT</strong> the dialog input clear button
|
|
209
201
|
</td>
|
|
@@ -211,14 +203,6 @@
|
|
|
211
203
|
The current <code>focused</code> option is selected, closes the bib and <strong>focus</strong> is returned to the trigger input element.
|
|
212
204
|
</td>
|
|
213
205
|
</tr>
|
|
214
|
-
<tr>
|
|
215
|
-
<td>
|
|
216
|
-
Dialog input clear button, <strong>NOT</strong> the dialog input element
|
|
217
|
-
</td>
|
|
218
|
-
<td>
|
|
219
|
-
The <strong>input</strong> value is cleared, <strong>focus</strong> moves to the dialog input element.
|
|
220
|
-
</td>
|
|
221
|
-
</tr>
|
|
222
206
|
<tr>
|
|
223
207
|
<td>Escape</td>
|
|
224
208
|
<td>-</td>
|
|
@@ -248,9 +232,9 @@
|
|
|
248
232
|
</td>
|
|
249
233
|
</tr>
|
|
250
234
|
<tr>
|
|
251
|
-
<td rowspan="
|
|
252
|
-
<td
|
|
253
|
-
<td
|
|
235
|
+
<td rowspan="2">Tab</td>
|
|
236
|
+
<td>-</td>
|
|
237
|
+
<td>Expanded</td>
|
|
254
238
|
<td>
|
|
255
239
|
Input element, <strong>NOT</strong> the input clear button
|
|
256
240
|
<div class="note">
|
|
@@ -261,17 +245,6 @@
|
|
|
261
245
|
The current <code>focused</code> option is selected, the bib is closed and <strong>focus</strong> is moved to the <strong>clear button</strong> in the component trigger.
|
|
262
246
|
</td>
|
|
263
247
|
</tr>
|
|
264
|
-
<tr>
|
|
265
|
-
<td>
|
|
266
|
-
Input clear button, <strong>NOT</strong> the input element
|
|
267
|
-
<div class="note">
|
|
268
|
-
<strong>Note:</strong> Includes both trigger and bib content input clear buttons.
|
|
269
|
-
</div>
|
|
270
|
-
</td>
|
|
271
|
-
<td>
|
|
272
|
-
<span style="background-color: pink; color: red;"> What do we do here? </span>
|
|
273
|
-
</td>
|
|
274
|
-
</tr>
|
|
275
248
|
<tr>
|
|
276
249
|
<td>Shift</td>
|
|
277
250
|
<td>Expanded</td>
|
|
@@ -42,6 +42,7 @@ export class AuroCombobox extends AuroElement {
|
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
44
|
* Array of available options to display in the dropdown.
|
|
45
|
+
* This array contains all non-hidden options (e.g., hidden by filtering on input value).
|
|
45
46
|
* @private
|
|
46
47
|
*/
|
|
47
48
|
availableOptions: {
|
|
@@ -381,6 +382,18 @@ export class AuroCombobox extends AuroElement {
|
|
|
381
382
|
* @returns {boolean} - Returns true if the element is valid, false otherwise.
|
|
382
383
|
*/
|
|
383
384
|
isValid(): boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Mark the first available (non-hidden), enabled option as `active`.
|
|
387
|
+
* @private
|
|
388
|
+
* @returns {void}
|
|
389
|
+
*/
|
|
390
|
+
private activateFirstEnabledAvailableOption;
|
|
391
|
+
/**
|
|
392
|
+
* Mark the last available (non-hidden), enabled option as `active`.
|
|
393
|
+
* @private
|
|
394
|
+
* @returns {void}
|
|
395
|
+
*/
|
|
396
|
+
private activateLastEnabledAvailableOption;
|
|
384
397
|
/**
|
|
385
398
|
* Updates the filter for the available options based on the input value.
|
|
386
399
|
* @private
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export namespace comboboxKeyboardStrategy {
|
|
2
|
-
function Enter(component: any, evt: any, ctx: any):
|
|
3
|
-
function Tab(component: any,
|
|
2
|
+
function Enter(component: any, evt: any, ctx: any): void;
|
|
3
|
+
function Tab(component: any, _evt: any, ctx: any): void;
|
|
4
|
+
function Home(component: any, evt: any, ctx: any): void;
|
|
5
|
+
function End(component: any, evt: any, ctx: any): void;
|
|
4
6
|
function ArrowUp(component: any, evt: any, ctx: any): void;
|
|
5
7
|
function ArrowDown(component: any, evt: any, ctx: any): void;
|
|
6
8
|
}
|