@aurodesignsystem-dev/auro-formkit 0.0.0-pr1052.0 → 0.0.0-pr1052.10
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/combobox/README.md +2 -0
- package/components/combobox/demo/api.md +96 -57
- package/components/combobox/demo/api.min.js +353 -144
- package/components/combobox/demo/index.md +2 -0
- package/components/combobox/demo/index.min.js +332 -133
- package/components/combobox/demo/readme.md +2 -0
- package/components/combobox/dist/auro-combobox.d.ts +81 -33
- package/components/combobox/dist/index.js +294 -118
- package/components/combobox/dist/registered.js +294 -118
- 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 +54 -14
- package/components/datepicker/demo/index.min.js +54 -14
- package/components/datepicker/dist/index.js +54 -14
- package/components/datepicker/dist/registered.js +54 -14
- 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/input/demo/api.md +48 -46
- package/components/input/demo/api.min.js +52 -12
- package/components/input/demo/index.md +6 -1
- package/components/input/demo/index.min.js +52 -12
- package/components/input/dist/auro-input.d.ts +4 -0
- package/components/input/dist/base-input.d.ts +9 -1
- package/components/input/dist/index.js +52 -12
- package/components/input/dist/registered.js +52 -12
- package/components/layoutElement/dist/index.js +1 -1
- package/components/layoutElement/dist/registered.js +1 -1
- package/components/menu/demo/api.md +4 -3
- package/components/menu/demo/api.min.js +39 -16
- package/components/menu/demo/index.min.js +39 -16
- package/components/menu/dist/auro-menu.d.ts +3 -3
- package/components/menu/dist/index.js +39 -16
- package/components/menu/dist/registered.js +39 -16
- package/components/select/demo/api.min.js +40 -17
- package/components/select/demo/index.min.js +40 -17
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/package.json +1 -1
|
@@ -32,7 +32,7 @@ class DynamicData {
|
|
|
32
32
|
// Javascript example file
|
|
33
33
|
// -----------------------
|
|
34
34
|
|
|
35
|
-
function dynamicMenuExample() {
|
|
35
|
+
async function dynamicMenuExample() {
|
|
36
36
|
// Resets the root menu
|
|
37
37
|
function resetMenu(root) {
|
|
38
38
|
while (root.firstChild) {
|
|
@@ -47,15 +47,15 @@ function dynamicMenuExample() {
|
|
|
47
47
|
resetMenu(initialMenu);
|
|
48
48
|
|
|
49
49
|
for (let index = 0; index < data.length; index++) {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
const country = data[index]['country'];
|
|
51
|
+
const cities = data[index]['cities'];
|
|
52
52
|
|
|
53
|
-
generateMenuOptionHtml(initialMenu, country, country);
|
|
53
|
+
generateMenuOptionHtml(initialMenu, country, country.substring(0, 3).toUpperCase());
|
|
54
54
|
|
|
55
55
|
for (let indexB = 0; indexB < cities.length; indexB++) {
|
|
56
|
-
|
|
56
|
+
const subMenu = document.createElement('auro-menu');
|
|
57
57
|
|
|
58
|
-
generateMenuOptionHtml(subMenu, cities[indexB], cities[indexB]);
|
|
58
|
+
generateMenuOptionHtml(subMenu, cities[indexB], cities[indexB].substring(0, 3).toUpperCase());
|
|
59
59
|
|
|
60
60
|
initialMenu.appendChild(subMenu);
|
|
61
61
|
}
|
|
@@ -63,19 +63,22 @@ function dynamicMenuExample() {
|
|
|
63
63
|
|
|
64
64
|
// Helper function that generates HTML for menuoptions
|
|
65
65
|
function generateMenuOptionHtml(menu, label, value) {
|
|
66
|
-
|
|
66
|
+
const option = document.createElement('auro-menuoption');
|
|
67
|
+
const displayValue = document.createElement('div');
|
|
68
|
+
displayValue.setAttribute("slot", "displayValue");
|
|
69
|
+
displayValue.innerHTML = value;
|
|
67
70
|
|
|
68
71
|
option.value = value;
|
|
69
72
|
option.innerHTML = label;
|
|
70
|
-
|
|
71
73
|
menu.appendChild(option);
|
|
74
|
+
option.appendChild(displayValue);
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
// Main javascript that runs all JS to create example
|
|
75
78
|
const dynamicData = new DynamicData();
|
|
76
|
-
const
|
|
77
|
-
const dropdownEl =
|
|
78
|
-
const inputEl = dropdownEl.querySelector(
|
|
79
|
+
const dynamicMenuExampleEl = document.querySelector('#dynamicMenuExample');
|
|
80
|
+
const dropdownEl = dynamicMenuExampleEl.shadowRoot.querySelector(dynamicMenuExampleEl.dropdownTag._$litStatic$);
|
|
81
|
+
const inputEl = dropdownEl.querySelector(dynamicMenuExampleEl.inputTag._$litStatic$);
|
|
79
82
|
|
|
80
83
|
inputEl.addEventListener('input', () => {
|
|
81
84
|
let data = dynamicData.getData();
|
|
@@ -83,6 +86,13 @@ function dynamicMenuExample() {
|
|
|
83
86
|
|
|
84
87
|
generateHtml(data);
|
|
85
88
|
});
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
if (dynamicMenuExampleEl.value && dynamicMenuExampleEl.value.length > 0 && dynamicMenuExampleEl.input.value && (!dynamicMenuExampleEl.menu.availableOptions || dynamicMenuExampleEl.menu.availableOptions.length === 0)) {
|
|
92
|
+
let data = dynamicData.getData();
|
|
93
|
+
data = dynamicData.filterData(data, inputEl.value);
|
|
94
|
+
generateHtml(data);
|
|
95
|
+
}
|
|
86
96
|
}
|
|
87
97
|
|
|
88
98
|
function valueExample() {
|
|
@@ -4511,7 +4521,7 @@ let AuroElement$4 = class AuroElement extends i$2 {
|
|
|
4511
4521
|
* @returns {boolean} - Returns true if the element has focus.
|
|
4512
4522
|
*/
|
|
4513
4523
|
get componentHasFocus() {
|
|
4514
|
-
return this.matches(':focus');
|
|
4524
|
+
return this.matches(':focus') || this.matches(':focus-within');
|
|
4515
4525
|
}
|
|
4516
4526
|
|
|
4517
4527
|
resetShapeClasses() {
|
|
@@ -10371,7 +10381,7 @@ let AuroElement$2$1 = class AuroElement extends i$2 {
|
|
|
10371
10381
|
* @returns {boolean} - Returns true if the element has focus.
|
|
10372
10382
|
*/
|
|
10373
10383
|
get componentHasFocus() {
|
|
10374
|
-
return this.matches(':focus');
|
|
10384
|
+
return this.matches(':focus') || this.matches(':focus-within');
|
|
10375
10385
|
}
|
|
10376
10386
|
|
|
10377
10387
|
resetShapeClasses() {
|
|
@@ -10445,7 +10455,7 @@ let AuroElement$2$1 = class AuroElement extends i$2 {
|
|
|
10445
10455
|
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
10446
10456
|
* @attr id
|
|
10447
10457
|
*
|
|
10448
|
-
* @slot ariaLabel.clear - Sets aria-label on clear button for
|
|
10458
|
+
* @slot ariaLabel.clear - Sets aria-label on clear button for screen reader to read
|
|
10449
10459
|
* @slot ariaLabel.password.show - Sets aria-label on password button to toggle on showing password
|
|
10450
10460
|
* @slot ariaLabel.password.hide - Sets aria-label on password button to toggle off showing password
|
|
10451
10461
|
* @slot helpText - Sets the help text displayed below the input.
|
|
@@ -10473,6 +10483,7 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10473
10483
|
this.activeLabel = false;
|
|
10474
10484
|
this.icon = false;
|
|
10475
10485
|
this.disabled = false;
|
|
10486
|
+
this.dvInputOnly = false;
|
|
10476
10487
|
this.max = undefined;
|
|
10477
10488
|
this.maxLength = undefined;
|
|
10478
10489
|
this.min = undefined;
|
|
@@ -10566,6 +10577,14 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10566
10577
|
return {
|
|
10567
10578
|
...super.properties,
|
|
10568
10579
|
|
|
10580
|
+
/**
|
|
10581
|
+
* If defined, the display value slot content will only mask the HTML5 input element. The inputs label will not be masked.
|
|
10582
|
+
*/
|
|
10583
|
+
dvInputOnly: {
|
|
10584
|
+
type: Boolean,
|
|
10585
|
+
reflect: true
|
|
10586
|
+
},
|
|
10587
|
+
|
|
10569
10588
|
/**
|
|
10570
10589
|
* The value for the role attribute.
|
|
10571
10590
|
*/
|
|
@@ -13331,7 +13350,13 @@ class AuroInput extends BaseInput {
|
|
|
13331
13350
|
* @private
|
|
13332
13351
|
*/
|
|
13333
13352
|
get inputHidden() {
|
|
13334
|
-
return (
|
|
13353
|
+
return (
|
|
13354
|
+
this.hasDisplayValueContent && !this.hasFocus && this.hasValue) ||
|
|
13355
|
+
(
|
|
13356
|
+
(!this.value || this.value.length === 0) &&
|
|
13357
|
+
!this.hasFocus &&
|
|
13358
|
+
(!this.placeholder || this.placeholder === '')
|
|
13359
|
+
);
|
|
13335
13360
|
}
|
|
13336
13361
|
|
|
13337
13362
|
/**
|
|
@@ -13351,7 +13376,7 @@ class AuroInput extends BaseInput {
|
|
|
13351
13376
|
* @private
|
|
13352
13377
|
*/
|
|
13353
13378
|
get labelHidden() {
|
|
13354
|
-
return this.hasDisplayValueContent && !this.hasFocus && this.hasValue;
|
|
13379
|
+
return this.hasDisplayValueContent && !this.dvInputOnly && !this.hasFocus && this.hasValue;
|
|
13355
13380
|
}
|
|
13356
13381
|
|
|
13357
13382
|
/**
|
|
@@ -13360,18 +13385,26 @@ class AuroInput extends BaseInput {
|
|
|
13360
13385
|
* @returns {string} - The font class for the label.
|
|
13361
13386
|
*/
|
|
13362
13387
|
get labelFontClass() {
|
|
13363
|
-
const isHidden = this.inputHidden;
|
|
13364
|
-
|
|
13365
13388
|
if (this.layout.startsWith('emphasized')) {
|
|
13366
|
-
|
|
13389
|
+
let typeSize = 'body-sm';
|
|
13390
|
+
|
|
13391
|
+
if (this.hasDisplayValueContent) {
|
|
13392
|
+
if (!this.hasValue) {
|
|
13393
|
+
typeSize = 'accent-xl';
|
|
13394
|
+
}
|
|
13395
|
+
} else if (this.noFocusOrValue) {
|
|
13396
|
+
typeSize = 'accent-xl';
|
|
13397
|
+
}
|
|
13398
|
+
|
|
13399
|
+
return typeSize;
|
|
13367
13400
|
}
|
|
13368
13401
|
|
|
13369
13402
|
if (this.layout === 'snowflake') {
|
|
13370
|
-
return
|
|
13403
|
+
return this.hasValue || this.hasFocus || this.placeholder ? 'body-xs' : 'body-lg';
|
|
13371
13404
|
}
|
|
13372
13405
|
|
|
13373
13406
|
// classic layout (default)
|
|
13374
|
-
return
|
|
13407
|
+
return ((!this.value || this.value.length === 0) && !this.placeholder && !this.hasFocus) ? 'body-default' : 'body-xs';
|
|
13375
13408
|
}
|
|
13376
13409
|
|
|
13377
13410
|
/**
|
|
@@ -13381,7 +13414,17 @@ class AuroInput extends BaseInput {
|
|
|
13381
13414
|
*/
|
|
13382
13415
|
get inputFontClass() {
|
|
13383
13416
|
if (this.layout.startsWith('emphasized')) {
|
|
13384
|
-
|
|
13417
|
+
let typeSize = 'accent-xl';
|
|
13418
|
+
|
|
13419
|
+
if (this.hasDisplayValueContent) {
|
|
13420
|
+
if (!this.hasValue) {
|
|
13421
|
+
typeSize = 'body-sm';
|
|
13422
|
+
}
|
|
13423
|
+
} else if (this.noFocusOrValue) {
|
|
13424
|
+
typeSize = 'body-sm';
|
|
13425
|
+
}
|
|
13426
|
+
|
|
13427
|
+
return typeSize;
|
|
13385
13428
|
}
|
|
13386
13429
|
|
|
13387
13430
|
if (this.layout === 'snowflake') {
|
|
@@ -13424,6 +13467,13 @@ class AuroInput extends BaseInput {
|
|
|
13424
13467
|
};
|
|
13425
13468
|
}
|
|
13426
13469
|
|
|
13470
|
+
get commonDisplayValueWrapperClasses() {
|
|
13471
|
+
return {
|
|
13472
|
+
'displayValueWrapper': true,
|
|
13473
|
+
[this.inputFontClass]: true,
|
|
13474
|
+
};
|
|
13475
|
+
}
|
|
13476
|
+
|
|
13427
13477
|
/**
|
|
13428
13478
|
* Returns classmap configuration for html5 inputs in each layout.
|
|
13429
13479
|
* @private
|
|
@@ -13496,7 +13546,7 @@ class AuroInput extends BaseInput {
|
|
|
13496
13546
|
let nodes = this.shadowRoot.querySelector('slot[name="displayValue"]').assignedNodes();
|
|
13497
13547
|
|
|
13498
13548
|
// Handle when DisplayValue is multi-level slot content (e.g. combobox passing displayValue to input)
|
|
13499
|
-
if (nodes[0].tagName === 'SLOT') {
|
|
13549
|
+
if (nodes && nodes[0] && nodes[0].tagName === 'SLOT') {
|
|
13500
13550
|
nodes = nodes[0].assignedNodes();
|
|
13501
13551
|
}
|
|
13502
13552
|
|
|
@@ -13587,7 +13637,7 @@ class AuroInput extends BaseInput {
|
|
|
13587
13637
|
type="${this.type === "password" && this.showPassword ? "text" : this.getInputType(this.type)}"
|
|
13588
13638
|
/>
|
|
13589
13639
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
13590
|
-
<div class="
|
|
13640
|
+
<div class="${e(this.commonDisplayValueWrapperClasses)}">
|
|
13591
13641
|
<slot name="displayValue" @slotchange=${this.checkDisplayValueSlotChange}></slot>
|
|
13592
13642
|
</div>
|
|
13593
13643
|
</div>
|
|
@@ -15849,7 +15899,7 @@ let AuroElement$1 = class AuroElement extends i$2 {
|
|
|
15849
15899
|
* @returns {boolean} - Returns true if the element has focus.
|
|
15850
15900
|
*/
|
|
15851
15901
|
get componentHasFocus() {
|
|
15852
|
-
return this.matches(':focus');
|
|
15902
|
+
return this.matches(':focus') || this.matches(':focus-within');
|
|
15853
15903
|
}
|
|
15854
15904
|
|
|
15855
15905
|
resetShapeClasses() {
|
|
@@ -16131,7 +16181,9 @@ class AuroHelpText extends i$2 {
|
|
|
16131
16181
|
* @slot label - Defines the content of the label.
|
|
16132
16182
|
* @slot helpText - Defines the content of the helpText.
|
|
16133
16183
|
* @slot displayValue - Allows custom HTML content to display the selected value when the combobox is not focused. Only works with `snowflake` and `emphasized` layouts.
|
|
16134
|
-
* @event auroCombobox-valueSet - Notifies that the component has a new value set.
|
|
16184
|
+
* @event auroCombobox-valueSet - (Deprecated) Notifies that the component has a new value set.
|
|
16185
|
+
* @event input - Notifies that the component has a new value set.
|
|
16186
|
+
* @event inputValue - Notifies that the components internal HTML5 input value has changed.
|
|
16135
16187
|
* @event auroFormElement-validated - Notifies that the component value(s) have been validated.
|
|
16136
16188
|
*/
|
|
16137
16189
|
|
|
@@ -16141,75 +16193,60 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16141
16193
|
constructor() {
|
|
16142
16194
|
super();
|
|
16143
16195
|
|
|
16144
|
-
|
|
16145
|
-
|
|
16146
|
-
this.privateDefaults();
|
|
16147
|
-
}
|
|
16148
|
-
|
|
16149
|
-
/**
|
|
16150
|
-
* @private
|
|
16151
|
-
* @returns {void} Internal defaults.
|
|
16152
|
-
*/
|
|
16153
|
-
privateDefaults() {
|
|
16154
|
-
this.dropdownOpen = false;
|
|
16155
|
-
this.dropdownId = undefined;
|
|
16156
|
-
this.onDark = false;
|
|
16157
|
-
|
|
16158
|
-
this.noFilter = false;
|
|
16159
|
-
this.validity = undefined;
|
|
16160
|
-
this.value = undefined;
|
|
16161
|
-
this.optionSelected = undefined;
|
|
16162
|
-
|
|
16163
|
-
this.checkmark = false;
|
|
16196
|
+
// Defaults that effect the combobox behavior and state
|
|
16164
16197
|
this.disabled = false;
|
|
16198
|
+
this.msgSelectionMissing = 'Please select an option.';
|
|
16199
|
+
this.noFilter = false;
|
|
16165
16200
|
this.noValidate = false;
|
|
16166
|
-
this.required = false;
|
|
16167
|
-
this.triggerIcon = false;
|
|
16168
|
-
|
|
16169
|
-
this.availableOptions = [];
|
|
16170
16201
|
this.optionActive = null;
|
|
16171
|
-
this.
|
|
16202
|
+
this.persistInput = false;
|
|
16203
|
+
this.required = false;
|
|
16204
|
+
this.value = undefined;
|
|
16205
|
+
this.typedValue = undefined;
|
|
16172
16206
|
|
|
16207
|
+
// Defaults that effect the overall layout of the combobox
|
|
16208
|
+
this.checkmark = false;
|
|
16209
|
+
this.dvInputOnly = false;
|
|
16173
16210
|
this.fullscreenBreakpoint = 'sm';
|
|
16174
|
-
this.largeFullscreenHeadline = false;
|
|
16175
|
-
|
|
16176
|
-
this.validation = new AuroFormValidation$1();
|
|
16177
|
-
|
|
16178
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
16179
|
-
|
|
16180
|
-
this.isHiddenWhileLoading = false;
|
|
16181
|
-
|
|
16182
|
-
// Error message
|
|
16183
|
-
this.errorMessage = null;
|
|
16184
|
-
|
|
16185
|
-
// Layout Config
|
|
16186
|
-
/**
|
|
16187
|
-
* @private
|
|
16188
|
-
*/
|
|
16189
16211
|
this.layout = 'classic';
|
|
16190
|
-
|
|
16191
|
-
/**
|
|
16192
|
-
* @private
|
|
16193
|
-
*/
|
|
16212
|
+
this.matchWidth = true;
|
|
16194
16213
|
this.shape = 'classic';
|
|
16195
|
-
|
|
16196
|
-
/**
|
|
16197
|
-
* @private
|
|
16198
|
-
*/
|
|
16199
16214
|
this.size = 'xl';
|
|
16215
|
+
this.triggerIcon = false;
|
|
16200
16216
|
|
|
16201
|
-
//
|
|
16217
|
+
// Defaults that effect the dropdown
|
|
16202
16218
|
this.placement = 'bottom-start';
|
|
16203
16219
|
this.offset = 0;
|
|
16204
16220
|
this.noFlip = false;
|
|
16205
16221
|
this.autoPlacement = false;
|
|
16206
16222
|
|
|
16223
|
+
this.privateDefaults();
|
|
16224
|
+
}
|
|
16225
|
+
|
|
16226
|
+
/**
|
|
16227
|
+
* @private
|
|
16228
|
+
* @returns {void} Internal defaults.
|
|
16229
|
+
*/
|
|
16230
|
+
privateDefaults() {
|
|
16207
16231
|
const versioning = new AuroDependencyVersioning$3();
|
|
16208
16232
|
|
|
16209
16233
|
this.dropdownTag = versioning.generateTag('auro-formkit-combobox-dropdown', dropdownVersion, AuroDropdown);
|
|
16210
16234
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-combobox-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
16211
16235
|
this.inputTag = versioning.generateTag('auro-formkit-combobox-input', inputVersion, AuroInput);
|
|
16212
16236
|
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', '1.0.0', AuroHelpText);
|
|
16237
|
+
|
|
16238
|
+
this.availableOptions = [];
|
|
16239
|
+
this.dropdownId = undefined;
|
|
16240
|
+
this.dropdownOpen = false;
|
|
16241
|
+
this.errorMessage = null;
|
|
16242
|
+
this.isHiddenWhileLoading = false;
|
|
16243
|
+
this.largeFullscreenHeadline = false;
|
|
16244
|
+
this.onDark = false;
|
|
16245
|
+
this.optionSelected = undefined;
|
|
16246
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
16247
|
+
this.touched = false;
|
|
16248
|
+
this.validation = new AuroFormValidation$1();
|
|
16249
|
+
this.validity = undefined;
|
|
16213
16250
|
}
|
|
16214
16251
|
|
|
16215
16252
|
// This function is to define props used within the scope of this component
|
|
@@ -16247,7 +16284,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16247
16284
|
},
|
|
16248
16285
|
|
|
16249
16286
|
/**
|
|
16250
|
-
* When attribute is present auro-menu will apply
|
|
16287
|
+
* When attribute is present auro-menu will apply check marks to selected options.
|
|
16251
16288
|
*/
|
|
16252
16289
|
checkmark: {
|
|
16253
16290
|
type: Boolean,
|
|
@@ -16282,6 +16319,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16282
16319
|
attribute: false
|
|
16283
16320
|
},
|
|
16284
16321
|
|
|
16322
|
+
/**
|
|
16323
|
+
* If defined, the display value slot content will only mask the HTML5 input element. The inputs label will not be masked.
|
|
16324
|
+
*/
|
|
16325
|
+
dvInputOnly: {
|
|
16326
|
+
type: Boolean,
|
|
16327
|
+
reflect: true
|
|
16328
|
+
},
|
|
16329
|
+
|
|
16285
16330
|
/**
|
|
16286
16331
|
* When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
|
|
16287
16332
|
*/
|
|
@@ -16364,6 +16409,17 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16364
16409
|
type: Object
|
|
16365
16410
|
},
|
|
16366
16411
|
|
|
16412
|
+
/**
|
|
16413
|
+
* If declared, selecting a menu option will not change the input value. By doing so,
|
|
16414
|
+
* the current menu filter will be preserved and the user can continue from their last
|
|
16415
|
+
* filter state. It is recommended to use this in combination with the `displayValue` slot.
|
|
16416
|
+
* @type {Boolean}
|
|
16417
|
+
*/
|
|
16418
|
+
persistInput: {
|
|
16419
|
+
type: Boolean,
|
|
16420
|
+
reflect: true
|
|
16421
|
+
},
|
|
16422
|
+
|
|
16367
16423
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
16368
16424
|
/**
|
|
16369
16425
|
* Position where the bib should appear relative to the trigger.
|
|
@@ -16417,6 +16473,18 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16417
16473
|
type: String
|
|
16418
16474
|
},
|
|
16419
16475
|
|
|
16476
|
+
/**
|
|
16477
|
+
* Indicates whether the combobox is in a dirty state (has been interacted with).
|
|
16478
|
+
* @type {boolean}
|
|
16479
|
+
* @default false
|
|
16480
|
+
* @private
|
|
16481
|
+
*/
|
|
16482
|
+
touched: {
|
|
16483
|
+
type: Boolean,
|
|
16484
|
+
reflect: true,
|
|
16485
|
+
attribute: false
|
|
16486
|
+
},
|
|
16487
|
+
|
|
16420
16488
|
/**
|
|
16421
16489
|
* If set, the `icon` attribute will be applied to the trigger `auro-input` element.
|
|
16422
16490
|
*/
|
|
@@ -16433,6 +16501,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16433
16501
|
reflect: true
|
|
16434
16502
|
},
|
|
16435
16503
|
|
|
16504
|
+
/**
|
|
16505
|
+
* Specifies the value of the input element within the combobox.
|
|
16506
|
+
*/
|
|
16507
|
+
typedValue: {
|
|
16508
|
+
type: String,
|
|
16509
|
+
reflect: true
|
|
16510
|
+
},
|
|
16511
|
+
|
|
16436
16512
|
/**
|
|
16437
16513
|
* Specifies the `validityState` this element is in.
|
|
16438
16514
|
*/
|
|
@@ -16492,6 +16568,24 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16492
16568
|
];
|
|
16493
16569
|
}
|
|
16494
16570
|
|
|
16571
|
+
/**
|
|
16572
|
+
* Returns the current value of the input element within the combobox.
|
|
16573
|
+
* @returns {string|undefined} The value of the input element, or undefined if the input is not present.
|
|
16574
|
+
*/
|
|
16575
|
+
get inputValue() {
|
|
16576
|
+
if (!this.input) {
|
|
16577
|
+
return undefined;
|
|
16578
|
+
}
|
|
16579
|
+
return this.input.value;
|
|
16580
|
+
}
|
|
16581
|
+
|
|
16582
|
+
// /**
|
|
16583
|
+
// * Sets the value of the input element within the combobox.
|
|
16584
|
+
// */
|
|
16585
|
+
// set inputValue(value) {
|
|
16586
|
+
// this.input.value = value;
|
|
16587
|
+
// }
|
|
16588
|
+
|
|
16495
16589
|
/**
|
|
16496
16590
|
* Checks if the element is valid.
|
|
16497
16591
|
* @returns {boolean} - Returns true if the element is valid, false otherwise.
|
|
@@ -16577,13 +16671,43 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16577
16671
|
this.menu.value = this.value;
|
|
16578
16672
|
this.menu.matchWord = this.input.value;
|
|
16579
16673
|
|
|
16674
|
+
console.warn('syncValuesAndStates()');
|
|
16675
|
+
console.info('this.value', this.value);
|
|
16676
|
+
console.info('this.input.value', this.input.value);
|
|
16677
|
+
console.info('this.menu.value', this.menu.value);
|
|
16678
|
+
|
|
16580
16679
|
// Wait a lifecycle for child components to update
|
|
16581
16680
|
await Promise.all([this.menu.updateComplete]);
|
|
16582
16681
|
|
|
16583
|
-
|
|
16584
|
-
|
|
16585
|
-
|
|
16586
|
-
|
|
16682
|
+
this.updateTriggerTextDisplay();
|
|
16683
|
+
}
|
|
16684
|
+
|
|
16685
|
+
/**
|
|
16686
|
+
* Update displayValue or input.value, it's called when making a selection.
|
|
16687
|
+
* @private
|
|
16688
|
+
*/
|
|
16689
|
+
updateTriggerTextDisplay() {
|
|
16690
|
+
// update the input content if persistInput is false
|
|
16691
|
+
if (!this.persistInput) {
|
|
16692
|
+
if (this.menu.optionSelected && this.menu.optionSelected.textContent.length > 0) {
|
|
16693
|
+
this.input.value = this.menu.optionSelected.textContent;
|
|
16694
|
+
} else {
|
|
16695
|
+
this.input.value = this.value;
|
|
16696
|
+
}
|
|
16697
|
+
}
|
|
16698
|
+
|
|
16699
|
+
// update the displayValue in the trigger if displayValue slot content is present
|
|
16700
|
+
const displayValueInTrigger = this.input.querySelector('[slot="displayValue"]');
|
|
16701
|
+
|
|
16702
|
+
if (displayValueInTrigger) {
|
|
16703
|
+
displayValueInTrigger.remove();
|
|
16704
|
+
}
|
|
16705
|
+
|
|
16706
|
+
if (this.menu.optionSelected) {
|
|
16707
|
+
const displayValueEl = this.menu.optionSelected.querySelector("[slot='displayValue']");
|
|
16708
|
+
if (displayValueEl) {
|
|
16709
|
+
this.input.appendChild(displayValueEl.cloneNode(true));
|
|
16710
|
+
}
|
|
16587
16711
|
}
|
|
16588
16712
|
}
|
|
16589
16713
|
|
|
@@ -16606,11 +16730,16 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16606
16730
|
* @returns {void}
|
|
16607
16731
|
*/
|
|
16608
16732
|
handleMenuOptions() {
|
|
16609
|
-
|
|
16733
|
+
console.warn('handleMenuOptions()');
|
|
16610
16734
|
this.resetMenuMatchword();
|
|
16735
|
+
|
|
16611
16736
|
this.generateOptionsArray();
|
|
16612
16737
|
this.availableOptions = [];
|
|
16613
16738
|
this.updateFilter();
|
|
16739
|
+
|
|
16740
|
+
if (this.value && this.input.value && !this.menu.value) {
|
|
16741
|
+
this.syncValuesAndStates();
|
|
16742
|
+
}
|
|
16614
16743
|
}
|
|
16615
16744
|
|
|
16616
16745
|
/**
|
|
@@ -16708,14 +16837,29 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16708
16837
|
});
|
|
16709
16838
|
}
|
|
16710
16839
|
|
|
16840
|
+
/**
|
|
16841
|
+
* @private
|
|
16842
|
+
*/
|
|
16843
|
+
setClearBtnFocus() {
|
|
16844
|
+
const clearBtn = this.input.shadowRoot.querySelector('.clearBtn');
|
|
16845
|
+
if (clearBtn) {
|
|
16846
|
+
clearBtn.focus();
|
|
16847
|
+
}
|
|
16848
|
+
}
|
|
16849
|
+
|
|
16711
16850
|
/**
|
|
16712
16851
|
* @private
|
|
16713
16852
|
*/
|
|
16714
16853
|
setInputFocus() {
|
|
16715
16854
|
if (this.dropdown.isBibFullscreen && this.dropdown.isPopoverVisible) {
|
|
16716
16855
|
this.inputInBib.focus();
|
|
16717
|
-
} else {
|
|
16856
|
+
} else if (!this.input.componentHasFocus) {
|
|
16857
|
+
const focusedEl = this.querySelector(":focus");
|
|
16718
16858
|
this.input.focus();
|
|
16859
|
+
// current focus is on a menuoption, after clicking on it.
|
|
16860
|
+
if (this.persistInput && focusedEl && (focusedEl.tagName.toLowerCase() === 'auro-menuoption' || focusedEl.hasAttribute('auro-menuoption'))) {
|
|
16861
|
+
this.setClearBtnFocus();
|
|
16862
|
+
}
|
|
16719
16863
|
}
|
|
16720
16864
|
}
|
|
16721
16865
|
|
|
@@ -16751,6 +16895,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16751
16895
|
configureMenu() {
|
|
16752
16896
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
16753
16897
|
|
|
16898
|
+
this.menu.value = this.value;
|
|
16899
|
+
|
|
16754
16900
|
this.updateMenuShapeSize();
|
|
16755
16901
|
|
|
16756
16902
|
// a racing condition on custom-combobox with custom-menu
|
|
@@ -16771,7 +16917,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16771
16917
|
}
|
|
16772
16918
|
|
|
16773
16919
|
// handle the menu event for an option selection
|
|
16774
|
-
this.menu.addEventListener('auroMenu-selectedOption', () => {
|
|
16920
|
+
this.menu.addEventListener('auroMenu-selectedOption', (evt) => {
|
|
16921
|
+
console.warn('event auroMenu-selectedOption', evt);
|
|
16775
16922
|
if (this.menu.optionSelected) {
|
|
16776
16923
|
const selected = this.menu.optionSelected;
|
|
16777
16924
|
|
|
@@ -16781,12 +16928,10 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16781
16928
|
|
|
16782
16929
|
if (!this.value || this.value !== this.optionSelected.value) {
|
|
16783
16930
|
this.value = this.optionSelected.value;
|
|
16784
|
-
this.menu.value = this.value;
|
|
16931
|
+
// this.menu.value = this.value;
|
|
16785
16932
|
}
|
|
16786
16933
|
|
|
16787
|
-
|
|
16788
|
-
this.input.value = this.optionSelected.textContent;
|
|
16789
|
-
}
|
|
16934
|
+
this.updateTriggerTextDisplay();
|
|
16790
16935
|
|
|
16791
16936
|
if (this.menu.matchWord !== this.input.value) {
|
|
16792
16937
|
this.menu.matchWord = this.input.value;
|
|
@@ -16794,18 +16939,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16794
16939
|
|
|
16795
16940
|
// update the hidden state of options based on newly selected value
|
|
16796
16941
|
this.handleMenuOptions();
|
|
16797
|
-
|
|
16798
|
-
this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
|
|
16799
|
-
bubbles: true,
|
|
16800
|
-
cancelable: false,
|
|
16801
|
-
composed: true,
|
|
16802
|
-
}));
|
|
16803
16942
|
}
|
|
16804
16943
|
|
|
16805
16944
|
// dropdown bib should hide when making a selection
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16945
|
+
if (evt.detail && evt.detail.source !== 'slotchange') {
|
|
16946
|
+
setTimeout(() => {
|
|
16947
|
+
this.hideBib();
|
|
16948
|
+
}, 0);
|
|
16949
|
+
}
|
|
16809
16950
|
});
|
|
16810
16951
|
|
|
16811
16952
|
this.menu.addEventListener('auroMenu-customEventFired', () => {
|
|
@@ -16847,12 +16988,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16847
16988
|
}
|
|
16848
16989
|
});
|
|
16849
16990
|
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
// not to bubble up input's validated event.
|
|
16853
|
-
evt.stopPropagation();
|
|
16854
|
-
|
|
16855
|
-
this.errorMessage = evt.detail.message;
|
|
16991
|
+
this.input.addEventListener('input', () => {
|
|
16992
|
+
this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
|
|
16856
16993
|
});
|
|
16857
16994
|
}
|
|
16858
16995
|
|
|
@@ -16886,6 +17023,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16886
17023
|
* @returns {void}
|
|
16887
17024
|
*/
|
|
16888
17025
|
handleInputValueChange(event) {
|
|
17026
|
+
console.warn('handleInputValueChange', event);
|
|
16889
17027
|
if (event.target === this.inputInBib) {
|
|
16890
17028
|
this.input.value = this.inputInBib.value;
|
|
16891
17029
|
return;
|
|
@@ -16896,29 +17034,9 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16896
17034
|
this.menu.matchWord = this.input.value;
|
|
16897
17035
|
this.optionActive = null;
|
|
16898
17036
|
|
|
16899
|
-
|
|
16900
|
-
|
|
16901
|
-
if (!this.value || this.value !== this.input.value) {
|
|
16902
|
-
this.menu.value = this.input.value;
|
|
16903
|
-
this.value = this.menu.value;
|
|
16904
|
-
hasChange = true;
|
|
16905
|
-
this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
|
|
16906
|
-
bubbles: true,
|
|
16907
|
-
cancelable: false,
|
|
16908
|
-
composed: true,
|
|
16909
|
-
}));
|
|
16910
|
-
}
|
|
16911
|
-
|
|
16912
|
-
if (this.optionSelected && this.input.value !== this.optionSelected.textContent) {
|
|
16913
|
-
this.optionSelected = undefined;
|
|
16914
|
-
hasChange = true;
|
|
16915
|
-
}
|
|
16916
|
-
|
|
16917
|
-
if (!hasChange) {
|
|
16918
|
-
return;
|
|
17037
|
+
if (!this.input.value) {
|
|
17038
|
+
this.clear();
|
|
16919
17039
|
}
|
|
16920
|
-
|
|
16921
|
-
this.menu.clearSelection();
|
|
16922
17040
|
this.handleMenuOptions();
|
|
16923
17041
|
|
|
16924
17042
|
// Validate only if the value was set programmatically
|
|
@@ -16943,10 +17061,16 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16943
17061
|
* @returns {void}
|
|
16944
17062
|
*/
|
|
16945
17063
|
configureCombobox() {
|
|
16946
|
-
this.addEventListener('keydown', (evt) => {
|
|
17064
|
+
this.addEventListener('keydown', async (evt) => {
|
|
16947
17065
|
if (evt.key === 'Enter') {
|
|
16948
17066
|
if (this.dropdown.isPopoverVisible && this.optionActive) {
|
|
16949
17067
|
this.menu.makeSelection();
|
|
17068
|
+
|
|
17069
|
+
await this.updateComplete;
|
|
17070
|
+
|
|
17071
|
+
evt.preventDefault();
|
|
17072
|
+
evt.stopPropagation();
|
|
17073
|
+
this.setClearBtnFocus();
|
|
16950
17074
|
} else {
|
|
16951
17075
|
this.showBib();
|
|
16952
17076
|
}
|
|
@@ -16961,6 +17085,10 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16961
17085
|
this.dropdown.focus();
|
|
16962
17086
|
}
|
|
16963
17087
|
} else {
|
|
17088
|
+
if (this.menu.optionActive && this.menu.optionActive.value) {
|
|
17089
|
+
this.menu.value = this.menu.optionActive.value;
|
|
17090
|
+
}
|
|
17091
|
+
|
|
16964
17092
|
setTimeout(() => {
|
|
16965
17093
|
if (!this.componentHasFocus) {
|
|
16966
17094
|
this.hideBib();
|
|
@@ -16990,8 +17118,15 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16990
17118
|
});
|
|
16991
17119
|
|
|
16992
17120
|
this.addEventListener('focusin', () => {
|
|
17121
|
+
this.touched = true;
|
|
17122
|
+
|
|
16993
17123
|
this.focus();
|
|
16994
17124
|
});
|
|
17125
|
+
|
|
17126
|
+
this.addEventListener('auroFormElement-validated', (evt) => {
|
|
17127
|
+
this.input.validity = evt.detail.validity;
|
|
17128
|
+
this.input.errorMessage = evt.detail.message;
|
|
17129
|
+
});
|
|
16995
17130
|
}
|
|
16996
17131
|
|
|
16997
17132
|
/**
|
|
@@ -17036,7 +17171,9 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17036
17171
|
* @returns {void}
|
|
17037
17172
|
*/
|
|
17038
17173
|
focus() {
|
|
17039
|
-
this.
|
|
17174
|
+
if (!this.componentHasFocus) {
|
|
17175
|
+
this.input.focus();
|
|
17176
|
+
}
|
|
17040
17177
|
}
|
|
17041
17178
|
|
|
17042
17179
|
/**
|
|
@@ -17045,7 +17182,11 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17045
17182
|
*/
|
|
17046
17183
|
reset() {
|
|
17047
17184
|
this.input.reset();
|
|
17185
|
+
this.menu.reset();
|
|
17186
|
+
this.optionSelected = undefined;
|
|
17187
|
+
this.value = undefined;
|
|
17048
17188
|
this.validation.reset(this);
|
|
17189
|
+
this.touched = false;
|
|
17049
17190
|
}
|
|
17050
17191
|
|
|
17051
17192
|
/**
|
|
@@ -17054,6 +17195,11 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17054
17195
|
*/
|
|
17055
17196
|
clear() {
|
|
17056
17197
|
this.input.clear();
|
|
17198
|
+
if (this.menu.value || this.menu.optionSelected) {
|
|
17199
|
+
this.menu.reset();
|
|
17200
|
+
}
|
|
17201
|
+
this.optionSelected = undefined;
|
|
17202
|
+
this.value = undefined;
|
|
17057
17203
|
}
|
|
17058
17204
|
|
|
17059
17205
|
/**
|
|
@@ -17066,7 +17212,16 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17066
17212
|
|
|
17067
17213
|
async updated(changedProperties) {
|
|
17068
17214
|
// After the component is ready, send direct value changes to auro-menu.
|
|
17069
|
-
if (changedProperties.has('value')
|
|
17215
|
+
if (changedProperties.has('value')) {
|
|
17216
|
+
if (this.value && this.value.length > 0) {
|
|
17217
|
+
this.hasValue = true;
|
|
17218
|
+
} else {
|
|
17219
|
+
this.hasValue = false;
|
|
17220
|
+
}
|
|
17221
|
+
|
|
17222
|
+
if (this.hasValue && !this.input.value && (!this.menu.availableOptions || this.menu.availableOptions.length === 0)) {
|
|
17223
|
+
this.input.value = this.value;
|
|
17224
|
+
}
|
|
17070
17225
|
|
|
17071
17226
|
if (this.value) {
|
|
17072
17227
|
// If the value got set programmatically make sure we hide the bib
|
|
@@ -17080,6 +17235,19 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17080
17235
|
|
|
17081
17236
|
// Sync the input, menu, and optionSelected states
|
|
17082
17237
|
await this.syncValuesAndStates();
|
|
17238
|
+
|
|
17239
|
+
this.dispatchEvent(new CustomEvent('input', {
|
|
17240
|
+
bubbles: true,
|
|
17241
|
+
cancelable: false,
|
|
17242
|
+
composed: true,
|
|
17243
|
+
}));
|
|
17244
|
+
|
|
17245
|
+
// Deprecated, need to be removed.
|
|
17246
|
+
this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
|
|
17247
|
+
bubbles: true,
|
|
17248
|
+
cancelable: false,
|
|
17249
|
+
composed: true,
|
|
17250
|
+
}));
|
|
17083
17251
|
}
|
|
17084
17252
|
|
|
17085
17253
|
if (changedProperties.has('availableOptions')) {
|
|
@@ -17122,6 +17290,16 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17122
17290
|
});
|
|
17123
17291
|
}
|
|
17124
17292
|
|
|
17293
|
+
/**
|
|
17294
|
+
* Updates the active option in the menu.
|
|
17295
|
+
* @param {number} index - Index of the option to make active.
|
|
17296
|
+
*/
|
|
17297
|
+
updateActiveOption(index) {
|
|
17298
|
+
if (this.menu) {
|
|
17299
|
+
this.menu.updateActiveOption(index);
|
|
17300
|
+
}
|
|
17301
|
+
}
|
|
17302
|
+
|
|
17125
17303
|
/**
|
|
17126
17304
|
* Watch for slot changes and recalculate the menuoptions.
|
|
17127
17305
|
* @private
|
|
@@ -17129,8 +17307,13 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17129
17307
|
* @returns {void}
|
|
17130
17308
|
*/
|
|
17131
17309
|
handleSlotChange(event) {
|
|
17310
|
+
console.warn('handleSlotChange', event);
|
|
17132
17311
|
switch (event.target.name) {
|
|
17133
17312
|
case '':
|
|
17313
|
+
if (!this.menu || this.menu !== this.querySelector('auro-menu, [auro-menu]')) {
|
|
17314
|
+
this.configureMenu();
|
|
17315
|
+
}
|
|
17316
|
+
|
|
17134
17317
|
// Treat only generic menuoptions.
|
|
17135
17318
|
this.options = this.menu.querySelectorAll('auro-menuoption, [auro-menuoption]');
|
|
17136
17319
|
this.options.forEach((opt) => {
|
|
@@ -17207,14 +17390,16 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17207
17390
|
.inputmode="${this.inputmode}"
|
|
17208
17391
|
.placeholder="${this.placeholder}"
|
|
17209
17392
|
.type="${this.type}"
|
|
17393
|
+
.value="${this.typedValue}"
|
|
17210
17394
|
?disabled="${this.disabled}"
|
|
17211
17395
|
?icon="${this.triggerIcon}"
|
|
17212
|
-
?
|
|
17396
|
+
?dvInputOnly="${this.dvInputOnly}"
|
|
17213
17397
|
?onDark="${this.onDark}"
|
|
17214
17398
|
?required="${this.required}"
|
|
17215
17399
|
a11yRole="combobox"
|
|
17216
17400
|
id="${this.id}"
|
|
17217
17401
|
layout="${this.layout}"
|
|
17402
|
+
noValidate="true"
|
|
17218
17403
|
setCustomValidity="${this.setCustomValidity}"
|
|
17219
17404
|
setCustomValidityCustomError="${this.setCustomValidityCustomError}"
|
|
17220
17405
|
setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
|
|
@@ -17230,7 +17415,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17230
17415
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}">
|
|
17231
17416
|
<slot name="bib.fullscreen.headline" slot="header"></slot>
|
|
17232
17417
|
<slot name="ariaLabel.bib.close" slot="ariaLabel.close">Close</slot>
|
|
17233
|
-
<slot></slot>
|
|
17418
|
+
<slot @slotchange="${this.handleSlotChange}"></slot>
|
|
17234
17419
|
<${this.inputTag}
|
|
17235
17420
|
id="inputInBib"
|
|
17236
17421
|
@input="${this.handleInputValueChange}"
|
|
@@ -17240,6 +17425,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17240
17425
|
.inputmode="${this.inputmode}"
|
|
17241
17426
|
.placeholder="${this.placeholder}"
|
|
17242
17427
|
.type="${this.type}"
|
|
17428
|
+
.value="${this.typedValue}"
|
|
17243
17429
|
?disabled="${this.disabled}"
|
|
17244
17430
|
?icon="${this.triggerIcon}"
|
|
17245
17431
|
?required="${this.required}"
|
|
@@ -17564,10 +17750,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17564
17750
|
|
|
17565
17751
|
|
|
17566
17752
|
if (changedProperties.has("value")) {
|
|
17753
|
+
console.warn('menu value updated', this.value);
|
|
17754
|
+
console.info('available options', this.availableOptions);
|
|
17567
17755
|
// Handle null/undefined case
|
|
17568
17756
|
if (this.value === undefined || this.value === null) {
|
|
17569
|
-
this.
|
|
17570
|
-
this.index = -1;
|
|
17757
|
+
this.clearSelection();
|
|
17571
17758
|
} else {
|
|
17572
17759
|
if (this.multiSelect) {
|
|
17573
17760
|
// In multiselect mode, this.value should be an array of strings
|
|
@@ -17576,9 +17763,12 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17576
17763
|
|
|
17577
17764
|
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
17578
17765
|
} else {
|
|
17766
|
+
console.info('single-select mode, looking for value', this.value);
|
|
17579
17767
|
// In single-select mode, this.value should be a string
|
|
17580
17768
|
const matchingOptions = this.items.find((item) => item.value === this.value);
|
|
17581
17769
|
|
|
17770
|
+
console.info('matchingOptions', matchingOptions);
|
|
17771
|
+
|
|
17582
17772
|
if (matchingOptions) {
|
|
17583
17773
|
this.optionSelected = matchingOptions;
|
|
17584
17774
|
this.index = this.items.indexOf(matchingOptions);
|
|
@@ -17587,6 +17777,8 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17587
17777
|
this.optionSelected = undefined;
|
|
17588
17778
|
this.index = -1;
|
|
17589
17779
|
}
|
|
17780
|
+
|
|
17781
|
+
console.warn('optionSelected', this.optionSelected);
|
|
17590
17782
|
}
|
|
17591
17783
|
|
|
17592
17784
|
// If no matching options were found in either mode
|
|
@@ -17613,6 +17805,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17613
17805
|
|
|
17614
17806
|
// Process all other UI updates
|
|
17615
17807
|
this.updateItemsState(changedProperties);
|
|
17808
|
+
|
|
17809
|
+
if (changedProperties.has('optionSelected')) {
|
|
17810
|
+
console.warn('updated: optionSelected', this.optionSelected);
|
|
17811
|
+
this.notifySelectionChange();
|
|
17812
|
+
}
|
|
17616
17813
|
}
|
|
17617
17814
|
|
|
17618
17815
|
/**
|
|
@@ -17671,6 +17868,12 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17671
17868
|
if (changedProperties.has('matchWord') && regexWord &&
|
|
17672
17869
|
isOptionInteractive(option) && !option.hasAttribute('persistent')) {
|
|
17673
17870
|
const nested = option.querySelectorAll('.nestingSpacer');
|
|
17871
|
+
|
|
17872
|
+
const displayValueEl = option.querySelector('[slot="displayValue"]');
|
|
17873
|
+
if (displayValueEl) {
|
|
17874
|
+
option.removeChild(displayValueEl);
|
|
17875
|
+
}
|
|
17876
|
+
|
|
17674
17877
|
// Create nested spacers
|
|
17675
17878
|
const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
|
|
17676
17879
|
|
|
@@ -17680,6 +17883,9 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17680
17883
|
regexWord,
|
|
17681
17884
|
(match) => `<strong>${match}</strong>`
|
|
17682
17885
|
);
|
|
17886
|
+
if (displayValueEl) {
|
|
17887
|
+
option.append(displayValueEl);
|
|
17888
|
+
}
|
|
17683
17889
|
}
|
|
17684
17890
|
|
|
17685
17891
|
// Update disabled state
|
|
@@ -17811,6 +18017,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17811
18017
|
clearSelection() {
|
|
17812
18018
|
this.optionSelected = undefined;
|
|
17813
18019
|
this.value = undefined;
|
|
18020
|
+
this.index = -1;
|
|
17814
18021
|
}
|
|
17815
18022
|
|
|
17816
18023
|
/**
|
|
@@ -17908,7 +18115,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17908
18115
|
// In multiselect, toggle individual selections
|
|
17909
18116
|
this.toggleOption(option);
|
|
17910
18117
|
// In single select, only handle selection of new options
|
|
17911
|
-
} else if (!this.isOptionSelected(option)) {
|
|
18118
|
+
} else if (this.option !== this.optionSelected || !this.isOptionSelected(option)) {
|
|
17912
18119
|
this.clearSelection();
|
|
17913
18120
|
this.handleSelectState(option);
|
|
17914
18121
|
}
|
|
@@ -17939,7 +18146,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17939
18146
|
* @param {MouseEvent} event - Event object from the browser.
|
|
17940
18147
|
*/
|
|
17941
18148
|
handleMouseSelect(event) {
|
|
17942
|
-
if (event.target === this) {
|
|
18149
|
+
if (!this.rootMenu || event.target === this) {
|
|
17943
18150
|
return;
|
|
17944
18151
|
}
|
|
17945
18152
|
|
|
@@ -17964,7 +18171,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17964
18171
|
/**
|
|
17965
18172
|
* Handles slot change events.
|
|
17966
18173
|
* @private
|
|
17967
|
-
* @param {Event} evt -
|
|
18174
|
+
* @param {Event} evt - Event object from the browser.
|
|
17968
18175
|
*/
|
|
17969
18176
|
handleSlotChange(evt) {
|
|
17970
18177
|
if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
|
|
@@ -17982,12 +18189,14 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17982
18189
|
]));
|
|
17983
18190
|
}
|
|
17984
18191
|
|
|
17985
|
-
|
|
17986
|
-
|
|
17987
|
-
|
|
17988
|
-
|
|
17989
|
-
|
|
17990
|
-
|
|
18192
|
+
if (this.value) {
|
|
18193
|
+
this.items.forEach((opt) => {
|
|
18194
|
+
if (opt.value === this.value || (this.multiSelect && this.formattedValue.includes(opt.value))) {
|
|
18195
|
+
this.handleSelectState(opt);
|
|
18196
|
+
this.notifySelectionChange(evt.type);
|
|
18197
|
+
}
|
|
18198
|
+
});
|
|
18199
|
+
}
|
|
17991
18200
|
}
|
|
17992
18201
|
|
|
17993
18202
|
/**
|
|
@@ -18042,7 +18251,6 @@ class AuroMenu extends AuroElement$1 {
|
|
|
18042
18251
|
|
|
18043
18252
|
/**
|
|
18044
18253
|
* Updates the active option state and dispatches events.
|
|
18045
|
-
* @private
|
|
18046
18254
|
* @param {number} index - Index of the option to make active.
|
|
18047
18255
|
*/
|
|
18048
18256
|
updateActiveOption(index) {
|
|
@@ -18071,10 +18279,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
18071
18279
|
|
|
18072
18280
|
/**
|
|
18073
18281
|
* Notifies selection change to parent components.
|
|
18282
|
+
* @param {any} source - The source that triggers this event.
|
|
18074
18283
|
* @private
|
|
18075
18284
|
*/
|
|
18076
|
-
notifySelectionChange() {
|
|
18077
|
-
dispatchMenuEvent(this, 'auroMenu-selectedOption');
|
|
18285
|
+
notifySelectionChange(source = undefined) {
|
|
18286
|
+
dispatchMenuEvent(this, 'auroMenu-selectedOption', { source });
|
|
18078
18287
|
}
|
|
18079
18288
|
|
|
18080
18289
|
/**
|
|
@@ -18147,7 +18356,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
18147
18356
|
}
|
|
18148
18357
|
}
|
|
18149
18358
|
|
|
18150
|
-
var styleCss$1 = i$5`.body-default{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);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.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);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{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);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.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);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-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);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);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.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);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.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);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.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);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.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);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.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);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.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);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.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);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.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);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.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);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.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);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.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);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.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);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));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);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.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);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));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);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.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);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));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);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.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);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{cursor:pointer;user-select:none}:host .wrapper{display:flex;align-items:center;padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);border-radius:var(--ds-size-100, 0.5rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box]{border-radius:unset}:host .wrapper[class*=shape-snowflake]{border-radius:unset;line-height:24px}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem);line-height:26px}:host .wrapper[class*=-xl]{padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem);line-height:26px}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
18359
|
+
var styleCss$1 = i$5`.body-default{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);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.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);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{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);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.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);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-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);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);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.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);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.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);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.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);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.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);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.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);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.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);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.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);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.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);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.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);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.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);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.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);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.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);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));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);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.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);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));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);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.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);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));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);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.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);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{cursor:pointer;user-select:none}:host .wrapper{display:flex;align-items:center;padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);border-radius:var(--ds-size-100, 0.5rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box]{border-radius:unset}:host .wrapper[class*=shape-snowflake]{border-radius:unset;line-height:24px}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem);line-height:26px}:host .wrapper[class*=-xl]{padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem);line-height:26px}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}[slot=displayValue]{display:none}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
18151
18360
|
|
|
18152
18361
|
var colorCss$1 = i$5`:host .wrapper{background-color:var(--ds-auro-menuoption-container-color, transparent);box-shadow:inset 0 0 0 1px var(--ds-auro-menuoption-container-border-color, transparent);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}:host(:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([selected]:hover),:host([selected].active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}:host([selected]:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host(:focus:hover),:host(:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([selected]:focus:hover),:host([selected]:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}`;
|
|
18153
18362
|
|