@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
|
@@ -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
|
+
},
|
|
1296
1320
|
|
|
1297
|
-
|
|
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
|
+
},
|
|
1332
|
+
|
|
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
|
|
|
@@ -4916,7 +4961,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
4916
4961
|
}
|
|
4917
4962
|
};
|
|
4918
4963
|
|
|
4919
|
-
var formkitVersion$1 = '
|
|
4964
|
+
var formkitVersion$1 = '202604031554';
|
|
4920
4965
|
|
|
4921
4966
|
class AuroElement extends LitElement {
|
|
4922
4967
|
static get properties() {
|
|
@@ -5097,6 +5142,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5097
5142
|
this.appearance = 'default';
|
|
5098
5143
|
this.chevron = false;
|
|
5099
5144
|
this.disabled = false;
|
|
5145
|
+
this.disableKeyboardHandling = false;
|
|
5100
5146
|
this.error = false;
|
|
5101
5147
|
this.tabIndex = 0;
|
|
5102
5148
|
this.noToggle = false;
|
|
@@ -5308,6 +5354,14 @@ class AuroDropdown extends AuroElement {
|
|
|
5308
5354
|
reflect: true
|
|
5309
5355
|
},
|
|
5310
5356
|
|
|
5357
|
+
/**
|
|
5358
|
+
* If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior.
|
|
5359
|
+
*/
|
|
5360
|
+
disableKeyboardHandling: {
|
|
5361
|
+
type: Boolean,
|
|
5362
|
+
reflect: true
|
|
5363
|
+
},
|
|
5364
|
+
|
|
5311
5365
|
/**
|
|
5312
5366
|
* @private
|
|
5313
5367
|
*/
|
|
@@ -5613,7 +5667,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5613
5667
|
|
|
5614
5668
|
firstUpdated() {
|
|
5615
5669
|
// Configure the floater to, this will generate the ID for the bib
|
|
5616
|
-
this.floater.configure(this, 'auroDropdown');
|
|
5670
|
+
this.floater.configure(this, 'auroDropdown', !this.disableKeyboardHandling);
|
|
5617
5671
|
|
|
5618
5672
|
// Prevent `contain: layout` on the dropdown host. Layout containment
|
|
5619
5673
|
// creates a containing block for position:fixed descendants (the bib),
|
|
@@ -5921,6 +5975,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5921
5975
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5922
5976
|
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5923
5977
|
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5978
|
+
aria-disabled="${ifDefined(this.disabled ? 'true' : undefined)}"
|
|
5924
5979
|
@focusin="${this.handleFocusin}"
|
|
5925
5980
|
@blur="${this.handleFocusOut}">
|
|
5926
5981
|
<div class="triggerContentWrapper" id="triggerLabel">
|
|
@@ -6659,7 +6714,7 @@ class AuroHelpText extends LitElement {
|
|
|
6659
6714
|
}
|
|
6660
6715
|
}
|
|
6661
6716
|
|
|
6662
|
-
var formkitVersion = '
|
|
6717
|
+
var formkitVersion = '202604031554';
|
|
6663
6718
|
|
|
6664
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}`;
|
|
6665
6720
|
|
|
@@ -7202,6 +7257,20 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7202
7257
|
if (this.dropdown.isPopoverVisible) {
|
|
7203
7258
|
this.updateMenuShapeSize();
|
|
7204
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();
|
|
7205
7274
|
if (this.dropdown.isBibFullscreen) {
|
|
7206
7275
|
// Hide the trigger from assistive technology so VoiceOver cannot reach it
|
|
7207
7276
|
// behind the fullscreen dialog
|
|
@@ -7213,17 +7282,6 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7213
7282
|
// multiple Lit update cycles before moving focus into the bib
|
|
7214
7283
|
doubleRaf(() => {
|
|
7215
7284
|
this.bibtemplate.focusCloseButton();
|
|
7216
|
-
|
|
7217
|
-
// If there's a selected option, highlight it (per W3C APG combobox-select-only pattern)
|
|
7218
|
-
// No selection → no highlight
|
|
7219
|
-
if (this.optionSelected && !Array.isArray(this.optionSelected)) {
|
|
7220
|
-
this.menu.updateActiveOption(this.optionSelected);
|
|
7221
|
-
} else if (this.multiSelect && Array.isArray(this.optionSelected) && this.optionSelected.length > 0) {
|
|
7222
|
-
this.menu.updateActiveOption(this.optionSelected[0]);
|
|
7223
|
-
}
|
|
7224
|
-
|
|
7225
|
-
// Scroll the selected option into view when dropdown opens
|
|
7226
|
-
this.scrollSelectedOptionIntoView();
|
|
7227
7285
|
});
|
|
7228
7286
|
} else {
|
|
7229
7287
|
// wait til the bib gets fully rendered
|
|
@@ -7909,6 +7967,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7909
7967
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7910
7968
|
</div>
|
|
7911
7969
|
<${this.dropdownTag}
|
|
7970
|
+
disableKeyboardHandling
|
|
7912
7971
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
7913
7972
|
.a11yRole=${"combobox"}
|
|
7914
7973
|
?autoPlacement="${this.autoPlacement}"
|
|
@@ -7988,6 +8047,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
7988
8047
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7989
8048
|
</div>
|
|
7990
8049
|
<${this.dropdownTag}
|
|
8050
|
+
disableKeyboardHandling
|
|
7991
8051
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
7992
8052
|
.a11yRole=${"combobox"}
|
|
7993
8053
|
?autoPlacement="${this.autoPlacement}"
|
|
@@ -8073,6 +8133,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
8073
8133
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8074
8134
|
</div>
|
|
8075
8135
|
<${this.dropdownTag}
|
|
8136
|
+
disableKeyboardHandling
|
|
8076
8137
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
8077
8138
|
.a11yRole=${"combobox"}
|
|
8078
8139
|
?autoPlacement="${this.autoPlacement}"
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export namespace selectKeyboardStrategy {
|
|
2
2
|
export function ArrowUp(component: any, evt: any, ctx: any): void;
|
|
3
3
|
export function ArrowDown(component: any, evt: any, ctx: any): void;
|
|
4
|
-
export function Enter(component: any, evt: any): void;
|
|
4
|
+
export function Enter(component: any, evt: any, ctx: any): void;
|
|
5
|
+
export function Escape(component: any, evt: any, ctx: any): void;
|
|
5
6
|
export function Tab(component: any, evt: any, ctx: any): void;
|
|
6
|
-
function
|
|
7
|
+
export function Home(component: any, evt: any, ctx: any): void;
|
|
8
|
+
export function End(component: any, evt: any, ctx: any): void;
|
|
9
|
+
function _default(component: any, evt: any, ctx: any): void;
|
|
7
10
|
export { _default as default };
|
|
8
11
|
}
|
package/custom-elements.json
CHANGED
|
@@ -1188,6 +1188,28 @@
|
|
|
1188
1188
|
],
|
|
1189
1189
|
"description": "This will register this element with the browser."
|
|
1190
1190
|
},
|
|
1191
|
+
{
|
|
1192
|
+
"kind": "method",
|
|
1193
|
+
"name": "activateFirstEnabledAvailableOption",
|
|
1194
|
+
"description": "Mark the first available (non-hidden), enabled option as `active`.",
|
|
1195
|
+
"privacy": "private",
|
|
1196
|
+
"return": {
|
|
1197
|
+
"type": {
|
|
1198
|
+
"text": "void"
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
"kind": "method",
|
|
1204
|
+
"name": "activateLastEnabledAvailableOption",
|
|
1205
|
+
"description": "Mark the last available (non-hidden), enabled option as `active`.",
|
|
1206
|
+
"privacy": "private",
|
|
1207
|
+
"return": {
|
|
1208
|
+
"type": {
|
|
1209
|
+
"text": "void"
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
},
|
|
1191
1213
|
{
|
|
1192
1214
|
"kind": "method",
|
|
1193
1215
|
"name": "updateFilter",
|
|
@@ -1556,7 +1578,7 @@
|
|
|
1556
1578
|
"type": {
|
|
1557
1579
|
"text": "array"
|
|
1558
1580
|
},
|
|
1559
|
-
"description": "Array of available options to display in the dropdown.",
|
|
1581
|
+
"description": "Array of available options to display in the dropdown.\nThis array contains all non-hidden options (e.g., hidden by filtering on input value).",
|
|
1560
1582
|
"attribute": "availableOptions"
|
|
1561
1583
|
},
|
|
1562
1584
|
{
|
|
@@ -2079,7 +2101,7 @@
|
|
|
2079
2101
|
"type": {
|
|
2080
2102
|
"text": "array"
|
|
2081
2103
|
},
|
|
2082
|
-
"description": "Array of available options to display in the dropdown.",
|
|
2104
|
+
"description": "Array of available options to display in the dropdown.\nThis array contains all non-hidden options (e.g., hidden by filtering on input value).",
|
|
2083
2105
|
"fieldName": "availableOptions"
|
|
2084
2106
|
},
|
|
2085
2107
|
{
|
|
@@ -2402,7 +2424,7 @@
|
|
|
2402
2424
|
"type": {
|
|
2403
2425
|
"text": "object"
|
|
2404
2426
|
},
|
|
2405
|
-
"default": "{
|
|
2427
|
+
"default": "{ Enter(component, evt, ctx) { if (isClearBtnFocused(ctx)) { // If the clear button has focus, let the browser activate it normally. // stopPropagation prevents parent containers (e.g., forms) from treating // Enter as a submit, but we must NOT call preventDefault — that would // block the browser's built-in \"Enter activates focused button\" behavior. evt.stopPropagation(); } else if (ctx.isExpanded && component.menu.optionActive) { component.menu.makeSelection(); component.setClearBtnFocus(); evt.preventDefault(); evt.stopPropagation(); } else { // Prevent the keypress from bubbling to parent containers (e.g., forms) // which could interpret Enter as a submit or trigger other unintended behavior. // This is safe because showBib() opens the dialog programmatically, // not via event propagation. evt.preventDefault(); evt.stopPropagation(); component.showBib(); } }, Tab(component, _evt, ctx) { if (ctx.isExpanded && !isClearBtnFocused(ctx)) { // ClearBtn will not bubble up tab key events when it's focused, so need to manage it here when focused component.menu.makeSelection(); component.hideBib(); } }, Home(component, evt, ctx) { if (ctx.isExpanded) { evt.preventDefault(); evt.stopPropagation(); component.activateFirstEnabledAvailableOption(); } }, End(component, evt, ctx) { if (ctx.isExpanded) { evt.preventDefault(); evt.stopPropagation(); component.activateLastEnabledAvailableOption(); } }, ArrowUp(component, evt, ctx) { // If the clear button has focus, let the browser handle ArrowUp normally. if (isClearBtnFocused(ctx)) { return; } // option display and navigation are prevented if there are no available options if (component.availableOptions.length > 0) { // navigate if bib is open otherwise open it if (component.dropdown.isPopoverVisible) { evt.preventDefault(); navigateArrow(component, 'up'); } else { component.showBib(); } } }, ArrowDown(component, evt, ctx) { // If the clear button has focus, let the browser handle ArrowDown normally. if (isClearBtnFocused(ctx)) { return; } // option display and navigation are prevented if there are no available options if (component.availableOptions.length > 0) { // navigate if bib is open otherwise open it if (component.dropdown.isPopoverVisible) { evt.preventDefault(); navigateArrow(component, 'down'); } else { component.showBib(); } } } }"
|
|
2406
2428
|
}
|
|
2407
2429
|
],
|
|
2408
2430
|
"exports": [
|
|
@@ -8285,6 +8307,17 @@
|
|
|
8285
8307
|
"attribute": "disabled",
|
|
8286
8308
|
"reflects": true
|
|
8287
8309
|
},
|
|
8310
|
+
{
|
|
8311
|
+
"kind": "field",
|
|
8312
|
+
"name": "disableKeyboardHandling",
|
|
8313
|
+
"privacy": "public",
|
|
8314
|
+
"type": {
|
|
8315
|
+
"text": "boolean"
|
|
8316
|
+
},
|
|
8317
|
+
"description": "If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior.",
|
|
8318
|
+
"attribute": "disableKeyboardHandling",
|
|
8319
|
+
"reflects": true
|
|
8320
|
+
},
|
|
8288
8321
|
{
|
|
8289
8322
|
"kind": "field",
|
|
8290
8323
|
"name": "dropdownWidth",
|
|
@@ -8568,6 +8601,14 @@
|
|
|
8568
8601
|
"description": "If declared, the dropdown is not interactive.",
|
|
8569
8602
|
"fieldName": "disabled"
|
|
8570
8603
|
},
|
|
8604
|
+
{
|
|
8605
|
+
"name": "disableKeyboardHandling",
|
|
8606
|
+
"type": {
|
|
8607
|
+
"text": "boolean"
|
|
8608
|
+
},
|
|
8609
|
+
"description": "If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior.",
|
|
8610
|
+
"fieldName": "disableKeyboardHandling"
|
|
8611
|
+
},
|
|
8571
8612
|
{
|
|
8572
8613
|
"name": "dropdownWidth",
|
|
8573
8614
|
"type": {
|
|
@@ -9964,6 +10005,18 @@
|
|
|
9964
10005
|
}
|
|
9965
10006
|
],
|
|
9966
10007
|
"members": [
|
|
10008
|
+
{
|
|
10009
|
+
"kind": "field",
|
|
10010
|
+
"name": "clearBtnClassMap",
|
|
10011
|
+
"description": "Returns classmap configuration for the clear button visibility.\nThe button is hidden when the input has no value, is read-only, or is disabled.",
|
|
10012
|
+
"privacy": "private",
|
|
10013
|
+
"return": {
|
|
10014
|
+
"type": {
|
|
10015
|
+
"text": "Record<string, boolean>"
|
|
10016
|
+
}
|
|
10017
|
+
},
|
|
10018
|
+
"readonly": true
|
|
10019
|
+
},
|
|
9967
10020
|
{
|
|
9968
10021
|
"kind": "field",
|
|
9969
10022
|
"name": "inputHidden",
|
|
@@ -10290,6 +10343,11 @@
|
|
|
10290
10343
|
"name": "iconTag",
|
|
10291
10344
|
"privacy": "private"
|
|
10292
10345
|
},
|
|
10346
|
+
{
|
|
10347
|
+
"kind": "field",
|
|
10348
|
+
"name": "clearButtonRef",
|
|
10349
|
+
"privacy": "private"
|
|
10350
|
+
},
|
|
10293
10351
|
{
|
|
10294
10352
|
"kind": "field",
|
|
10295
10353
|
"name": "shadowRootOptions",
|
|
@@ -18692,7 +18750,7 @@
|
|
|
18692
18750
|
"type": {
|
|
18693
18751
|
"text": "object"
|
|
18694
18752
|
},
|
|
18695
|
-
"default": "{ ArrowUp(component, evt, ctx) { evt.preventDefault(); navigateArrow(component, 'up', { ctx, showFn: () => component.dropdown.show(), }); }, ArrowDown(component, evt, ctx) { evt.preventDefault(); navigateArrow(component, 'down', { ctx, showFn: () => component.dropdown.show(), }); }, Enter(component, evt) { evt.preventDefault(); component.menu.makeSelection(); }, Tab(component, evt, ctx) { if (!ctx.isExpanded) { return; } //
|
|
18753
|
+
"default": "{ ArrowUp(component, evt, ctx) { evt.preventDefault(); if (evt.altKey || evt.metaKey) { // navigate to first enabled option selectKeyboardStrategy.Home(component, evt, ctx); return; } navigateArrow(component, 'up', { ctx, showFn: () => component.dropdown.show(), }); }, ArrowDown(component, evt, ctx) { evt.preventDefault(); if (evt.altKey || evt.metaKey) { // navigate to last enabled option selectKeyboardStrategy.End(component, evt, ctx); return; } navigateArrow(component, 'down', { ctx, showFn: () => component.dropdown.show(), }); }, Enter(component, evt, ctx) { evt.preventDefault(); evt.stopPropagation(); if (!ctx.isExpanded) { component.dropdown.show(); return; } component.menu.makeSelection(); }, Escape(component, evt, ctx) { if (!ctx.isExpanded) { return; } component.dropdown.hide(); }, Tab(component, evt, ctx) { if (!ctx.isExpanded) { return; } // Tab selects the focused option and closes the popup per the // WAI-ARIA APG select-only combobox / listbox pattern. if (component.optionActive && !component.multiSelect) { component.menu.makeSelection(); } component.dropdown.hide(); }, Home(component, evt, ctx) { if (!ctx.isExpanded) { return; } evt.preventDefault(); evt.stopPropagation(); const firstOption = component.menu.menuService.menuOptions.find((option) => !option.disabled); if (firstOption) { component.menu.updateActiveOption(firstOption); } }, End(component, evt, ctx) { if (!ctx.isExpanded) { return; } evt.preventDefault(); evt.stopPropagation(); const lastOption = [...component.menu.menuService.menuOptions].reverse().find((option) => !option.disabled); if (lastOption) { component.menu.updateActiveOption(lastOption); } }, default(component, evt, ctx) { component.updateActiveOptionBasedOnKey(evt.key); if (evt.key === ' ') { evt.preventDefault(); evt.stopPropagation(); if (ctx.isExpanded) { component.dropdown.hide(); return; } component.dropdown.show(); } }, }"
|
|
18696
18754
|
}
|
|
18697
18755
|
],
|
|
18698
18756
|
"exports": [
|
package/package.json
CHANGED