@aurodesignsystem/auro-formkit 5.1.3 → 5.1.4
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/CHANGELOG.md +14 -2
- package/components/combobox/README.md +2 -0
- package/components/combobox/demo/api.md +190 -62
- package/components/combobox/demo/api.min.js +401 -146
- package/components/combobox/demo/index.md +2 -0
- package/components/combobox/demo/index.min.js +331 -132
- package/components/combobox/demo/readme.md +2 -0
- package/components/combobox/dist/auro-combobox.d.ts +81 -33
- package/components/combobox/dist/index.js +297 -122
- package/components/combobox/dist/registered.js +297 -122
- package/components/counter/demo/api.min.js +9 -4
- package/components/counter/demo/index.min.js +9 -4
- package/components/counter/dist/index.js +9 -4
- package/components/counter/dist/registered.js +9 -4
- package/components/datepicker/demo/api.min.js +61 -16
- package/components/datepicker/demo/index.min.js +61 -16
- package/components/datepicker/dist/index.js +61 -16
- package/components/datepicker/dist/registered.js +61 -16
- package/components/dropdown/demo/api.min.js +8 -3
- package/components/dropdown/demo/index.min.js +8 -3
- package/components/dropdown/dist/index.js +8 -3
- package/components/dropdown/dist/registered.js +8 -3
- package/components/input/demo/api.md +48 -46
- package/components/input/demo/api.min.js +52 -12
- package/components/input/demo/index.md +7 -3
- 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 +35 -11
- package/components/menu/demo/index.min.js +35 -11
- package/components/menu/dist/auro-menu.d.ts +3 -2
- package/components/menu/dist/auro-menuoption.d.ts +1 -0
- package/components/menu/dist/index.js +35 -11
- package/components/menu/dist/registered.js +35 -11
- package/components/select/demo/api.min.js +44 -15
- package/components/select/demo/index.min.js +44 -15
- package/components/select/dist/index.js +10 -5
- package/components/select/dist/registered.js +10 -5
- 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) {
|
|
@@ -40,22 +40,49 @@ function dynamicMenuExample() {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
function swapValues() {
|
|
44
|
+
const elOne = document.querySelector('#dynamicMenuExample');
|
|
45
|
+
const elTwo = document.querySelector('#dynamicMenuExampleTwo');
|
|
46
|
+
|
|
47
|
+
const elOneValue = elOne.value;
|
|
48
|
+
const elTwoValue = elTwo.value;
|
|
49
|
+
|
|
50
|
+
const elOneInputValue = elOne.input.value;
|
|
51
|
+
const elTwoInputValue = elTwo.input.value;
|
|
52
|
+
|
|
53
|
+
elOne.reset();
|
|
54
|
+
elTwo.reset();
|
|
55
|
+
|
|
56
|
+
elOne.value = elTwoValue;
|
|
57
|
+
elTwo.value = elOneValue;
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
elOne.typedValue = elTwoInputValue;
|
|
62
|
+
elTwo.typedValue = elOneInputValue;
|
|
63
|
+
}, 0);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
document.querySelector('#dynamicMenuSwapButton').addEventListener('click', () => {
|
|
67
|
+
swapValues();
|
|
68
|
+
});
|
|
69
|
+
|
|
43
70
|
// Generates HTML for menu and submenus using country & city data from an external API
|
|
44
|
-
function generateHtml(data) {
|
|
45
|
-
const initialMenu = document.querySelector(
|
|
71
|
+
function generateHtml(data, selector) {
|
|
72
|
+
const initialMenu = document.querySelector(selector);
|
|
46
73
|
|
|
47
74
|
resetMenu(initialMenu);
|
|
48
75
|
|
|
49
76
|
for (let index = 0; index < data.length; index++) {
|
|
50
|
-
|
|
51
|
-
|
|
77
|
+
const country = data[index]['country'];
|
|
78
|
+
const cities = data[index]['cities'];
|
|
52
79
|
|
|
53
|
-
generateMenuOptionHtml(initialMenu, country, country);
|
|
80
|
+
generateMenuOptionHtml(initialMenu, country, country.substring(0, 3).toUpperCase());
|
|
54
81
|
|
|
55
82
|
for (let indexB = 0; indexB < cities.length; indexB++) {
|
|
56
|
-
|
|
83
|
+
const subMenu = document.createElement('auro-menu');
|
|
57
84
|
|
|
58
|
-
generateMenuOptionHtml(subMenu, cities[indexB], cities[indexB]);
|
|
85
|
+
generateMenuOptionHtml(subMenu, cities[indexB], cities[indexB].substring(0, 3).toUpperCase());
|
|
59
86
|
|
|
60
87
|
initialMenu.appendChild(subMenu);
|
|
61
88
|
}
|
|
@@ -63,26 +90,55 @@ function dynamicMenuExample() {
|
|
|
63
90
|
|
|
64
91
|
// Helper function that generates HTML for menuoptions
|
|
65
92
|
function generateMenuOptionHtml(menu, label, value) {
|
|
66
|
-
|
|
93
|
+
const option = document.createElement('auro-menuoption');
|
|
94
|
+
const displayValue = document.createElement('div');
|
|
95
|
+
displayValue.setAttribute("slot", "displayValue");
|
|
96
|
+
displayValue.innerHTML = value;
|
|
67
97
|
|
|
68
98
|
option.value = value;
|
|
69
99
|
option.innerHTML = label;
|
|
70
|
-
|
|
71
100
|
menu.appendChild(option);
|
|
101
|
+
option.appendChild(displayValue);
|
|
72
102
|
}
|
|
73
103
|
|
|
74
104
|
// Main javascript that runs all JS to create example
|
|
75
105
|
const dynamicData = new DynamicData();
|
|
76
|
-
const
|
|
77
|
-
const dropdownEl =
|
|
78
|
-
const inputEl = dropdownEl.querySelector(
|
|
106
|
+
const dynamicMenuExampleEl = document.querySelector('#dynamicMenuExample');
|
|
107
|
+
const dropdownEl = dynamicMenuExampleEl.shadowRoot.querySelector(dynamicMenuExampleEl.dropdownTag._$litStatic$);
|
|
108
|
+
const inputEl = dropdownEl.querySelector(dynamicMenuExampleEl.inputTag._$litStatic$);
|
|
79
109
|
|
|
80
110
|
inputEl.addEventListener('input', () => {
|
|
81
111
|
let data = dynamicData.getData();
|
|
82
112
|
data = dynamicData.filterData(data, inputEl.value);
|
|
83
113
|
|
|
84
|
-
generateHtml(data);
|
|
114
|
+
generateHtml(data, '#initMenu');
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
if (dynamicMenuExampleEl.value && dynamicMenuExampleEl.value.length > 0 && dynamicMenuExampleEl.input.value && (!dynamicMenuExampleEl.menu.availableOptions || dynamicMenuExampleEl.menu.availableOptions.length === 0)) {
|
|
119
|
+
let data = dynamicData.getData();
|
|
120
|
+
data = dynamicData.filterData(data, inputEl.value);
|
|
121
|
+
generateHtml(data, '#initMenu');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// TODO: Need to refactor this to to not console a console error
|
|
125
|
+
const dynamicDataTwo = new DynamicData();
|
|
126
|
+
const dynamicMenuExampleElTwo = document.querySelector('#dynamicMenuExample');
|
|
127
|
+
const dropdownElTwo = dynamicMenuExampleElTwo.shadowRoot.querySelector(dynamicMenuExampleElTwo.dropdownTag._$litStatic$);
|
|
128
|
+
const inputElTwo = dropdownElTwo.querySelector(dynamicMenuExampleElTwo.inputTag._$litStatic$);
|
|
129
|
+
|
|
130
|
+
inputElTwo.addEventListener('input', () => {
|
|
131
|
+
let data = dynamicDataTwo.getData();
|
|
132
|
+
data = dynamicDataTwo.filterData(data, inputEl.value);
|
|
133
|
+
|
|
134
|
+
generateHtml(data, '#initMenuTwo');
|
|
85
135
|
});
|
|
136
|
+
|
|
137
|
+
if (dynamicMenuExampleElTwo.value && dynamicMenuExampleElTwo.value.length > 0 && dynamicMenuExampleElTwo.input.value && (!dynamicMenuExampleElTwo.menu.availableOptions || dynamicMenuExampleElTwo.menu.availableOptions.length === 0)) {
|
|
138
|
+
let data = dynamicDataTwo.getData();
|
|
139
|
+
data = dynamicDataTwo.filterData(data, inputElTwo.value);
|
|
140
|
+
generateHtml(data, '#initMenuTwo');
|
|
141
|
+
}
|
|
86
142
|
}
|
|
87
143
|
|
|
88
144
|
function valueExample() {
|
|
@@ -4511,7 +4567,7 @@ let AuroElement$4 = class AuroElement extends i$2 {
|
|
|
4511
4567
|
* @returns {boolean} - Returns true if the element has focus.
|
|
4512
4568
|
*/
|
|
4513
4569
|
get componentHasFocus() {
|
|
4514
|
-
return this.matches(':focus');
|
|
4570
|
+
return this.matches(':focus') || this.matches(':focus-within');
|
|
4515
4571
|
}
|
|
4516
4572
|
|
|
4517
4573
|
resetShapeClasses() {
|
|
@@ -5296,8 +5352,13 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5296
5352
|
}
|
|
5297
5353
|
|
|
5298
5354
|
if (event) {
|
|
5299
|
-
|
|
5300
|
-
|
|
5355
|
+
// Wrap in a try-catch block to handle errors when trying to use assignedNodes from the NodeJS test environment.
|
|
5356
|
+
try {
|
|
5357
|
+
this.triggerNode = event.target;
|
|
5358
|
+
this.triggerContentSlot = event.target.assignedNodes();
|
|
5359
|
+
} catch (error) {
|
|
5360
|
+
console.warn('auro-dropdown: Unable to access the trigger content slot.', error); // eslint-disable-line no-console
|
|
5361
|
+
}
|
|
5301
5362
|
}
|
|
5302
5363
|
|
|
5303
5364
|
if (this.triggerContentSlot) {
|
|
@@ -10371,7 +10432,7 @@ let AuroElement$2$1 = class AuroElement extends i$2 {
|
|
|
10371
10432
|
* @returns {boolean} - Returns true if the element has focus.
|
|
10372
10433
|
*/
|
|
10373
10434
|
get componentHasFocus() {
|
|
10374
|
-
return this.matches(':focus');
|
|
10435
|
+
return this.matches(':focus') || this.matches(':focus-within');
|
|
10375
10436
|
}
|
|
10376
10437
|
|
|
10377
10438
|
resetShapeClasses() {
|
|
@@ -10445,7 +10506,7 @@ let AuroElement$2$1 = class AuroElement extends i$2 {
|
|
|
10445
10506
|
* @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
10446
10507
|
* @attr id
|
|
10447
10508
|
*
|
|
10448
|
-
* @slot ariaLabel.clear - Sets aria-label on clear button for
|
|
10509
|
+
* @slot ariaLabel.clear - Sets aria-label on clear button for screen reader to read
|
|
10449
10510
|
* @slot ariaLabel.password.show - Sets aria-label on password button to toggle on showing password
|
|
10450
10511
|
* @slot ariaLabel.password.hide - Sets aria-label on password button to toggle off showing password
|
|
10451
10512
|
* @slot helpText - Sets the help text displayed below the input.
|
|
@@ -10473,6 +10534,7 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10473
10534
|
this.activeLabel = false;
|
|
10474
10535
|
this.icon = false;
|
|
10475
10536
|
this.disabled = false;
|
|
10537
|
+
this.dvInputOnly = false;
|
|
10476
10538
|
this.max = undefined;
|
|
10477
10539
|
this.maxLength = undefined;
|
|
10478
10540
|
this.min = undefined;
|
|
@@ -10566,6 +10628,14 @@ class BaseInput extends AuroElement$2$1 {
|
|
|
10566
10628
|
return {
|
|
10567
10629
|
...super.properties,
|
|
10568
10630
|
|
|
10631
|
+
/**
|
|
10632
|
+
* If defined, the display value slot content will only mask the HTML5 input element. The input's label will not be masked.
|
|
10633
|
+
*/
|
|
10634
|
+
dvInputOnly: {
|
|
10635
|
+
type: Boolean,
|
|
10636
|
+
reflect: true
|
|
10637
|
+
},
|
|
10638
|
+
|
|
10569
10639
|
/**
|
|
10570
10640
|
* The value for the role attribute.
|
|
10571
10641
|
*/
|
|
@@ -13331,7 +13401,13 @@ class AuroInput extends BaseInput {
|
|
|
13331
13401
|
* @private
|
|
13332
13402
|
*/
|
|
13333
13403
|
get inputHidden() {
|
|
13334
|
-
return (
|
|
13404
|
+
return (
|
|
13405
|
+
this.hasDisplayValueContent && !this.hasFocus && this.hasValue) ||
|
|
13406
|
+
(
|
|
13407
|
+
(!this.value || this.value.length === 0) &&
|
|
13408
|
+
!this.hasFocus &&
|
|
13409
|
+
(!this.placeholder || this.placeholder === '')
|
|
13410
|
+
);
|
|
13335
13411
|
}
|
|
13336
13412
|
|
|
13337
13413
|
/**
|
|
@@ -13351,7 +13427,7 @@ class AuroInput extends BaseInput {
|
|
|
13351
13427
|
* @private
|
|
13352
13428
|
*/
|
|
13353
13429
|
get labelHidden() {
|
|
13354
|
-
return this.hasDisplayValueContent && !this.hasFocus && this.hasValue;
|
|
13430
|
+
return this.hasDisplayValueContent && !this.dvInputOnly && !this.hasFocus && this.hasValue;
|
|
13355
13431
|
}
|
|
13356
13432
|
|
|
13357
13433
|
/**
|
|
@@ -13360,18 +13436,26 @@ class AuroInput extends BaseInput {
|
|
|
13360
13436
|
* @returns {string} - The font class for the label.
|
|
13361
13437
|
*/
|
|
13362
13438
|
get labelFontClass() {
|
|
13363
|
-
const isHidden = this.inputHidden;
|
|
13364
|
-
|
|
13365
13439
|
if (this.layout.startsWith('emphasized')) {
|
|
13366
|
-
|
|
13440
|
+
let typeSize = 'body-sm';
|
|
13441
|
+
|
|
13442
|
+
if (this.hasDisplayValueContent) {
|
|
13443
|
+
if (!this.hasValue) {
|
|
13444
|
+
typeSize = 'accent-xl';
|
|
13445
|
+
}
|
|
13446
|
+
} else if (this.noFocusOrValue) {
|
|
13447
|
+
typeSize = 'accent-xl';
|
|
13448
|
+
}
|
|
13449
|
+
|
|
13450
|
+
return typeSize;
|
|
13367
13451
|
}
|
|
13368
13452
|
|
|
13369
13453
|
if (this.layout === 'snowflake') {
|
|
13370
|
-
return
|
|
13454
|
+
return this.hasValue || this.hasFocus || this.placeholder ? 'body-xs' : 'body-lg';
|
|
13371
13455
|
}
|
|
13372
13456
|
|
|
13373
13457
|
// classic layout (default)
|
|
13374
|
-
return
|
|
13458
|
+
return ((!this.value || this.value.length === 0) && !this.placeholder && !this.hasFocus) ? 'body-default' : 'body-xs';
|
|
13375
13459
|
}
|
|
13376
13460
|
|
|
13377
13461
|
/**
|
|
@@ -13381,7 +13465,17 @@ class AuroInput extends BaseInput {
|
|
|
13381
13465
|
*/
|
|
13382
13466
|
get inputFontClass() {
|
|
13383
13467
|
if (this.layout.startsWith('emphasized')) {
|
|
13384
|
-
|
|
13468
|
+
let typeSize = 'accent-xl';
|
|
13469
|
+
|
|
13470
|
+
if (this.hasDisplayValueContent) {
|
|
13471
|
+
if (!this.hasValue) {
|
|
13472
|
+
typeSize = 'body-sm';
|
|
13473
|
+
}
|
|
13474
|
+
} else if (this.noFocusOrValue) {
|
|
13475
|
+
typeSize = 'body-sm';
|
|
13476
|
+
}
|
|
13477
|
+
|
|
13478
|
+
return typeSize;
|
|
13385
13479
|
}
|
|
13386
13480
|
|
|
13387
13481
|
if (this.layout === 'snowflake') {
|
|
@@ -13424,6 +13518,13 @@ class AuroInput extends BaseInput {
|
|
|
13424
13518
|
};
|
|
13425
13519
|
}
|
|
13426
13520
|
|
|
13521
|
+
get commonDisplayValueWrapperClasses() {
|
|
13522
|
+
return {
|
|
13523
|
+
'displayValueWrapper': true,
|
|
13524
|
+
[this.inputFontClass]: true,
|
|
13525
|
+
};
|
|
13526
|
+
}
|
|
13527
|
+
|
|
13427
13528
|
/**
|
|
13428
13529
|
* Returns classmap configuration for html5 inputs in each layout.
|
|
13429
13530
|
* @private
|
|
@@ -13496,7 +13597,7 @@ class AuroInput extends BaseInput {
|
|
|
13496
13597
|
let nodes = this.shadowRoot.querySelector('slot[name="displayValue"]').assignedNodes();
|
|
13497
13598
|
|
|
13498
13599
|
// Handle when DisplayValue is multi-level slot content (e.g. combobox passing displayValue to input)
|
|
13499
|
-
if (nodes[0].tagName === 'SLOT') {
|
|
13600
|
+
if (nodes && nodes[0] && nodes[0].tagName === 'SLOT') {
|
|
13500
13601
|
nodes = nodes[0].assignedNodes();
|
|
13501
13602
|
}
|
|
13502
13603
|
|
|
@@ -13587,7 +13688,7 @@ class AuroInput extends BaseInput {
|
|
|
13587
13688
|
type="${this.type === "password" && this.showPassword ? "text" : this.getInputType(this.type)}"
|
|
13588
13689
|
/>
|
|
13589
13690
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
13590
|
-
<div class="
|
|
13691
|
+
<div class="${e(this.commonDisplayValueWrapperClasses)}">
|
|
13591
13692
|
<slot name="displayValue" @slotchange=${this.checkDisplayValueSlotChange}></slot>
|
|
13592
13693
|
</div>
|
|
13593
13694
|
</div>
|
|
@@ -15805,7 +15906,7 @@ var bibTemplateVersion = '1.0.0';
|
|
|
15805
15906
|
|
|
15806
15907
|
var styleCss$4 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host #inputInBib::part(accent-right){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
15807
15908
|
|
|
15808
|
-
var styleEmphasizedCss = i$5`:host([layout*=emphasized][shape*=pill]) [auro-input]{--ds-auro-input-background-color: var(--ds-advanced-color-dropdown-emphasized-background, rgba(0, 39, 74, 0.1019607843));--ds-auro-input-container-color: var(--ds-advanced-color-dropdown-emphasized-background, rgba(0, 39, 74, 0.1019607843));width:100%}:host([layout*=emphasized][shape*=pill]) [auro-input]
|
|
15909
|
+
var styleEmphasizedCss = i$5`:host([layout*=emphasized][shape*=pill]) [auro-input]{--ds-auro-input-background-color: var(--ds-advanced-color-dropdown-emphasized-background, rgba(0, 39, 74, 0.1019607843));--ds-auro-input-container-color: var(--ds-advanced-color-dropdown-emphasized-background, rgba(0, 39, 74, 0.1019607843));width:100%}:host([layout*=emphasized][shape*=pill]) [auro-input]::part(inputHelpText){display:none}`;
|
|
15809
15910
|
|
|
15810
15911
|
var styleSnowflakeCss = i$5`:host([layout*=snowflake][shape*=snowflake]) [auro-input]{width:100%}:host([layout*=snowflake][shape*=snowflake]) [auro-input]::part(inputHelpText){display:none}:host([layout*=snowflake][shape*=snowflake])::part(helpText){text-align:center}`;
|
|
15811
15912
|
|
|
@@ -15849,7 +15950,7 @@ let AuroElement$1 = class AuroElement extends i$2 {
|
|
|
15849
15950
|
* @returns {boolean} - Returns true if the element has focus.
|
|
15850
15951
|
*/
|
|
15851
15952
|
get componentHasFocus() {
|
|
15852
|
-
return this.matches(':focus');
|
|
15953
|
+
return this.matches(':focus') || this.matches(':focus-within');
|
|
15853
15954
|
}
|
|
15854
15955
|
|
|
15855
15956
|
resetShapeClasses() {
|
|
@@ -16131,7 +16232,9 @@ class AuroHelpText extends i$2 {
|
|
|
16131
16232
|
* @slot label - Defines the content of the label.
|
|
16132
16233
|
* @slot helpText - Defines the content of the helpText.
|
|
16133
16234
|
* @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.
|
|
16235
|
+
* @event auroCombobox-valueSet - (Deprecated) Notifies that the component has a new value set.
|
|
16236
|
+
* @event input - Notifies that the component has a new value set.
|
|
16237
|
+
* @event inputValue - Notifies that the components internal HTML5 input value has changed.
|
|
16135
16238
|
* @event auroFormElement-validated - Notifies that the component value(s) have been validated.
|
|
16136
16239
|
*/
|
|
16137
16240
|
|
|
@@ -16141,75 +16244,60 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16141
16244
|
constructor() {
|
|
16142
16245
|
super();
|
|
16143
16246
|
|
|
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;
|
|
16247
|
+
// Defaults that effect the combobox behavior and state
|
|
16164
16248
|
this.disabled = false;
|
|
16249
|
+
this.msgSelectionMissing = 'Please select an option.';
|
|
16250
|
+
this.noFilter = false;
|
|
16165
16251
|
this.noValidate = false;
|
|
16166
|
-
this.required = false;
|
|
16167
|
-
this.triggerIcon = false;
|
|
16168
|
-
|
|
16169
|
-
this.availableOptions = [];
|
|
16170
16252
|
this.optionActive = null;
|
|
16171
|
-
this.
|
|
16253
|
+
this.persistInput = false;
|
|
16254
|
+
this.required = false;
|
|
16255
|
+
this.value = undefined;
|
|
16256
|
+
this.typedValue = undefined;
|
|
16172
16257
|
|
|
16258
|
+
// Defaults that effect the overall layout of the combobox
|
|
16259
|
+
this.checkmark = false;
|
|
16260
|
+
this.dvInputOnly = false;
|
|
16173
16261
|
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
16262
|
this.layout = 'classic';
|
|
16190
|
-
|
|
16191
|
-
/**
|
|
16192
|
-
* @private
|
|
16193
|
-
*/
|
|
16263
|
+
this.matchWidth = true;
|
|
16194
16264
|
this.shape = 'classic';
|
|
16195
|
-
|
|
16196
|
-
/**
|
|
16197
|
-
* @private
|
|
16198
|
-
*/
|
|
16199
16265
|
this.size = 'xl';
|
|
16266
|
+
this.triggerIcon = false;
|
|
16200
16267
|
|
|
16201
|
-
//
|
|
16268
|
+
// Defaults that effect the dropdown
|
|
16202
16269
|
this.placement = 'bottom-start';
|
|
16203
16270
|
this.offset = 0;
|
|
16204
16271
|
this.noFlip = false;
|
|
16205
16272
|
this.autoPlacement = false;
|
|
16206
16273
|
|
|
16274
|
+
this.privateDefaults();
|
|
16275
|
+
}
|
|
16276
|
+
|
|
16277
|
+
/**
|
|
16278
|
+
* @private
|
|
16279
|
+
* @returns {void} Internal defaults.
|
|
16280
|
+
*/
|
|
16281
|
+
privateDefaults() {
|
|
16207
16282
|
const versioning = new AuroDependencyVersioning$3();
|
|
16208
16283
|
|
|
16209
16284
|
this.dropdownTag = versioning.generateTag('auro-formkit-combobox-dropdown', dropdownVersion, AuroDropdown);
|
|
16210
16285
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-combobox-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
16211
16286
|
this.inputTag = versioning.generateTag('auro-formkit-combobox-input', inputVersion, AuroInput);
|
|
16212
16287
|
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', '1.0.0', AuroHelpText);
|
|
16288
|
+
|
|
16289
|
+
this.availableOptions = [];
|
|
16290
|
+
this.dropdownId = undefined;
|
|
16291
|
+
this.dropdownOpen = false;
|
|
16292
|
+
this.errorMessage = null;
|
|
16293
|
+
this.isHiddenWhileLoading = false;
|
|
16294
|
+
this.largeFullscreenHeadline = false;
|
|
16295
|
+
this.onDark = false;
|
|
16296
|
+
this.optionSelected = undefined;
|
|
16297
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
16298
|
+
this.touched = false;
|
|
16299
|
+
this.validation = new AuroFormValidation$1();
|
|
16300
|
+
this.validity = undefined;
|
|
16213
16301
|
}
|
|
16214
16302
|
|
|
16215
16303
|
// This function is to define props used within the scope of this component
|
|
@@ -16247,7 +16335,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16247
16335
|
},
|
|
16248
16336
|
|
|
16249
16337
|
/**
|
|
16250
|
-
* When attribute is present auro-menu will apply
|
|
16338
|
+
* When attribute is present auro-menu will apply check marks to selected options.
|
|
16251
16339
|
*/
|
|
16252
16340
|
checkmark: {
|
|
16253
16341
|
type: Boolean,
|
|
@@ -16282,6 +16370,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16282
16370
|
attribute: false
|
|
16283
16371
|
},
|
|
16284
16372
|
|
|
16373
|
+
/**
|
|
16374
|
+
* If defined, the display value slot content will only mask the HTML5 input element. The inputs label will not be masked.
|
|
16375
|
+
*/
|
|
16376
|
+
dvInputOnly: {
|
|
16377
|
+
type: Boolean,
|
|
16378
|
+
reflect: true
|
|
16379
|
+
},
|
|
16380
|
+
|
|
16285
16381
|
/**
|
|
16286
16382
|
* When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
|
|
16287
16383
|
*/
|
|
@@ -16364,6 +16460,17 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16364
16460
|
type: Object
|
|
16365
16461
|
},
|
|
16366
16462
|
|
|
16463
|
+
/**
|
|
16464
|
+
* If declared, selecting a menu option will not change the input value. By doing so,
|
|
16465
|
+
* the current menu filter will be preserved and the user can continue from their last
|
|
16466
|
+
* filter state. It is recommended to use this in combination with the `displayValue` slot.
|
|
16467
|
+
* @type {Boolean}
|
|
16468
|
+
*/
|
|
16469
|
+
persistInput: {
|
|
16470
|
+
type: Boolean,
|
|
16471
|
+
reflect: true
|
|
16472
|
+
},
|
|
16473
|
+
|
|
16367
16474
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
16368
16475
|
/**
|
|
16369
16476
|
* Position where the bib should appear relative to the trigger.
|
|
@@ -16417,6 +16524,18 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16417
16524
|
type: String
|
|
16418
16525
|
},
|
|
16419
16526
|
|
|
16527
|
+
/**
|
|
16528
|
+
* Indicates whether the combobox is in a dirty state (has been interacted with).
|
|
16529
|
+
* @type {boolean}
|
|
16530
|
+
* @default false
|
|
16531
|
+
* @private
|
|
16532
|
+
*/
|
|
16533
|
+
touched: {
|
|
16534
|
+
type: Boolean,
|
|
16535
|
+
reflect: true,
|
|
16536
|
+
attribute: false
|
|
16537
|
+
},
|
|
16538
|
+
|
|
16420
16539
|
/**
|
|
16421
16540
|
* If set, the `icon` attribute will be applied to the trigger `auro-input` element.
|
|
16422
16541
|
*/
|
|
@@ -16433,6 +16552,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16433
16552
|
reflect: true
|
|
16434
16553
|
},
|
|
16435
16554
|
|
|
16555
|
+
/**
|
|
16556
|
+
* Specifies the value of the input element within the combobox.
|
|
16557
|
+
*/
|
|
16558
|
+
typedValue: {
|
|
16559
|
+
type: String,
|
|
16560
|
+
reflect: true
|
|
16561
|
+
},
|
|
16562
|
+
|
|
16436
16563
|
/**
|
|
16437
16564
|
* Specifies the `validityState` this element is in.
|
|
16438
16565
|
*/
|
|
@@ -16492,6 +16619,24 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16492
16619
|
];
|
|
16493
16620
|
}
|
|
16494
16621
|
|
|
16622
|
+
/**
|
|
16623
|
+
* Returns the current value of the input element within the combobox.
|
|
16624
|
+
* @returns {string|undefined} The value of the input element, or undefined if the input is not present.
|
|
16625
|
+
*/
|
|
16626
|
+
get inputValue() {
|
|
16627
|
+
if (!this.input) {
|
|
16628
|
+
return undefined;
|
|
16629
|
+
}
|
|
16630
|
+
return this.input.value;
|
|
16631
|
+
}
|
|
16632
|
+
|
|
16633
|
+
// /**
|
|
16634
|
+
// * Sets the value of the input element within the combobox.
|
|
16635
|
+
// */
|
|
16636
|
+
// set inputValue(value) {
|
|
16637
|
+
// this.input.value = value;
|
|
16638
|
+
// }
|
|
16639
|
+
|
|
16495
16640
|
/**
|
|
16496
16641
|
* Checks if the element is valid.
|
|
16497
16642
|
* @returns {boolean} - Returns true if the element is valid, false otherwise.
|
|
@@ -16580,11 +16725,38 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16580
16725
|
// Wait a lifecycle for child components to update
|
|
16581
16726
|
await Promise.all([this.menu.updateComplete]);
|
|
16582
16727
|
|
|
16583
|
-
|
|
16584
|
-
|
|
16585
|
-
|
|
16586
|
-
|
|
16728
|
+
this.updateTriggerTextDisplay();
|
|
16729
|
+
}
|
|
16730
|
+
|
|
16731
|
+
/**
|
|
16732
|
+
* Update displayValue or input.value, it's called when making a selection.
|
|
16733
|
+
* @private
|
|
16734
|
+
*/
|
|
16735
|
+
updateTriggerTextDisplay() {
|
|
16736
|
+
// update the input content if persistInput is false
|
|
16737
|
+
if (!this.persistInput) {
|
|
16738
|
+
if (this.menu.optionSelected && this.menu.optionSelected.textContent.length > 0) {
|
|
16739
|
+
this.input.value = this.menu.optionSelected.textContent;
|
|
16740
|
+
} else {
|
|
16741
|
+
this.input.value = this.value;
|
|
16742
|
+
}
|
|
16587
16743
|
}
|
|
16744
|
+
|
|
16745
|
+
// update the displayValue in the trigger if displayValue slot content is present
|
|
16746
|
+
const displayValueInTrigger = this.input.querySelector('[slot="displayValue"]');
|
|
16747
|
+
|
|
16748
|
+
if (displayValueInTrigger) {
|
|
16749
|
+
displayValueInTrigger.remove();
|
|
16750
|
+
}
|
|
16751
|
+
|
|
16752
|
+
if (this.menu.optionSelected) {
|
|
16753
|
+
const displayValueEl = this.menu.optionSelected.querySelector("[slot='displayValue']");
|
|
16754
|
+
if (displayValueEl) {
|
|
16755
|
+
this.input.appendChild(displayValueEl.cloneNode(true));
|
|
16756
|
+
}
|
|
16757
|
+
}
|
|
16758
|
+
|
|
16759
|
+
this.requestUpdate();
|
|
16588
16760
|
}
|
|
16589
16761
|
|
|
16590
16762
|
/**
|
|
@@ -16606,11 +16778,15 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16606
16778
|
* @returns {void}
|
|
16607
16779
|
*/
|
|
16608
16780
|
handleMenuOptions() {
|
|
16609
|
-
|
|
16610
16781
|
this.resetMenuMatchword();
|
|
16782
|
+
|
|
16611
16783
|
this.generateOptionsArray();
|
|
16612
16784
|
this.availableOptions = [];
|
|
16613
16785
|
this.updateFilter();
|
|
16786
|
+
|
|
16787
|
+
if (this.value && this.input.value && !this.menu.value) {
|
|
16788
|
+
this.syncValuesAndStates();
|
|
16789
|
+
}
|
|
16614
16790
|
}
|
|
16615
16791
|
|
|
16616
16792
|
/**
|
|
@@ -16708,14 +16884,29 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16708
16884
|
});
|
|
16709
16885
|
}
|
|
16710
16886
|
|
|
16887
|
+
/**
|
|
16888
|
+
* @private
|
|
16889
|
+
*/
|
|
16890
|
+
setClearBtnFocus() {
|
|
16891
|
+
const clearBtn = this.input.shadowRoot.querySelector('.clearBtn');
|
|
16892
|
+
if (clearBtn) {
|
|
16893
|
+
clearBtn.focus();
|
|
16894
|
+
}
|
|
16895
|
+
}
|
|
16896
|
+
|
|
16711
16897
|
/**
|
|
16712
16898
|
* @private
|
|
16713
16899
|
*/
|
|
16714
16900
|
setInputFocus() {
|
|
16715
16901
|
if (this.dropdown.isBibFullscreen && this.dropdown.isPopoverVisible) {
|
|
16716
16902
|
this.inputInBib.focus();
|
|
16717
|
-
} else {
|
|
16903
|
+
} else if (!this.input.componentHasFocus) {
|
|
16904
|
+
const focusedEl = this.querySelector(":focus");
|
|
16718
16905
|
this.input.focus();
|
|
16906
|
+
// current focus is on a menuoption, after clicking on it.
|
|
16907
|
+
if (this.persistInput && focusedEl && (focusedEl.tagName.toLowerCase() === 'auro-menuoption' || focusedEl.hasAttribute('auro-menuoption'))) {
|
|
16908
|
+
this.setClearBtnFocus();
|
|
16909
|
+
}
|
|
16719
16910
|
}
|
|
16720
16911
|
}
|
|
16721
16912
|
|
|
@@ -16751,6 +16942,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16751
16942
|
configureMenu() {
|
|
16752
16943
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
16753
16944
|
|
|
16945
|
+
this.menu.value = this.value;
|
|
16946
|
+
|
|
16754
16947
|
this.updateMenuShapeSize();
|
|
16755
16948
|
|
|
16756
16949
|
// a racing condition on custom-combobox with custom-menu
|
|
@@ -16771,7 +16964,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16771
16964
|
}
|
|
16772
16965
|
|
|
16773
16966
|
// handle the menu event for an option selection
|
|
16774
|
-
this.menu.addEventListener('auroMenu-selectedOption', () => {
|
|
16967
|
+
this.menu.addEventListener('auroMenu-selectedOption', (evt) => {
|
|
16775
16968
|
if (this.menu.optionSelected) {
|
|
16776
16969
|
const selected = this.menu.optionSelected;
|
|
16777
16970
|
|
|
@@ -16781,12 +16974,10 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16781
16974
|
|
|
16782
16975
|
if (!this.value || this.value !== this.optionSelected.value) {
|
|
16783
16976
|
this.value = this.optionSelected.value;
|
|
16784
|
-
this.menu.value = this.value;
|
|
16977
|
+
// this.menu.value = this.value;
|
|
16785
16978
|
}
|
|
16786
16979
|
|
|
16787
|
-
|
|
16788
|
-
this.input.value = this.optionSelected.textContent;
|
|
16789
|
-
}
|
|
16980
|
+
this.updateTriggerTextDisplay();
|
|
16790
16981
|
|
|
16791
16982
|
if (this.menu.matchWord !== this.input.value) {
|
|
16792
16983
|
this.menu.matchWord = this.input.value;
|
|
@@ -16794,18 +16985,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16794
16985
|
|
|
16795
16986
|
// update the hidden state of options based on newly selected value
|
|
16796
16987
|
this.handleMenuOptions();
|
|
16797
|
-
|
|
16798
|
-
this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
|
|
16799
|
-
bubbles: true,
|
|
16800
|
-
cancelable: false,
|
|
16801
|
-
composed: true,
|
|
16802
|
-
}));
|
|
16803
16988
|
}
|
|
16804
16989
|
|
|
16805
16990
|
// dropdown bib should hide when making a selection
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16991
|
+
if (evt.detail && evt.detail.source !== 'slotchange') {
|
|
16992
|
+
setTimeout(() => {
|
|
16993
|
+
this.hideBib();
|
|
16994
|
+
}, 0);
|
|
16995
|
+
}
|
|
16809
16996
|
});
|
|
16810
16997
|
|
|
16811
16998
|
this.menu.addEventListener('auroMenu-customEventFired', () => {
|
|
@@ -16847,12 +17034,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16847
17034
|
}
|
|
16848
17035
|
});
|
|
16849
17036
|
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
// not to bubble up input's validated event.
|
|
16853
|
-
evt.stopPropagation();
|
|
16854
|
-
|
|
16855
|
-
this.errorMessage = evt.detail.message;
|
|
17037
|
+
this.input.addEventListener('input', () => {
|
|
17038
|
+
this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
|
|
16856
17039
|
});
|
|
16857
17040
|
}
|
|
16858
17041
|
|
|
@@ -16896,29 +17079,9 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16896
17079
|
this.menu.matchWord = this.input.value;
|
|
16897
17080
|
this.optionActive = null;
|
|
16898
17081
|
|
|
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;
|
|
17082
|
+
if (!this.input.value) {
|
|
17083
|
+
this.clear();
|
|
16919
17084
|
}
|
|
16920
|
-
|
|
16921
|
-
this.menu.clearSelection();
|
|
16922
17085
|
this.handleMenuOptions();
|
|
16923
17086
|
|
|
16924
17087
|
// Validate only if the value was set programmatically
|
|
@@ -16943,10 +17106,16 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16943
17106
|
* @returns {void}
|
|
16944
17107
|
*/
|
|
16945
17108
|
configureCombobox() {
|
|
16946
|
-
this.addEventListener('keydown', (evt) => {
|
|
17109
|
+
this.addEventListener('keydown', async (evt) => {
|
|
16947
17110
|
if (evt.key === 'Enter') {
|
|
16948
17111
|
if (this.dropdown.isPopoverVisible && this.optionActive) {
|
|
16949
17112
|
this.menu.makeSelection();
|
|
17113
|
+
|
|
17114
|
+
await this.updateComplete;
|
|
17115
|
+
|
|
17116
|
+
evt.preventDefault();
|
|
17117
|
+
evt.stopPropagation();
|
|
17118
|
+
this.setClearBtnFocus();
|
|
16950
17119
|
} else {
|
|
16951
17120
|
this.showBib();
|
|
16952
17121
|
}
|
|
@@ -16961,6 +17130,10 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16961
17130
|
this.dropdown.focus();
|
|
16962
17131
|
}
|
|
16963
17132
|
} else {
|
|
17133
|
+
if (this.menu.optionActive && this.menu.optionActive.value) {
|
|
17134
|
+
this.menu.value = this.menu.optionActive.value;
|
|
17135
|
+
}
|
|
17136
|
+
|
|
16964
17137
|
setTimeout(() => {
|
|
16965
17138
|
if (!this.componentHasFocus) {
|
|
16966
17139
|
this.hideBib();
|
|
@@ -16990,8 +17163,15 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
16990
17163
|
});
|
|
16991
17164
|
|
|
16992
17165
|
this.addEventListener('focusin', () => {
|
|
17166
|
+
this.touched = true;
|
|
17167
|
+
|
|
16993
17168
|
this.focus();
|
|
16994
17169
|
});
|
|
17170
|
+
|
|
17171
|
+
this.addEventListener('auroFormElement-validated', (evt) => {
|
|
17172
|
+
this.input.validity = evt.detail.validity;
|
|
17173
|
+
this.input.errorMessage = evt.detail.message;
|
|
17174
|
+
});
|
|
16995
17175
|
}
|
|
16996
17176
|
|
|
16997
17177
|
/**
|
|
@@ -17036,7 +17216,9 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17036
17216
|
* @returns {void}
|
|
17037
17217
|
*/
|
|
17038
17218
|
focus() {
|
|
17039
|
-
this.
|
|
17219
|
+
if (!this.componentHasFocus) {
|
|
17220
|
+
this.input.focus();
|
|
17221
|
+
}
|
|
17040
17222
|
}
|
|
17041
17223
|
|
|
17042
17224
|
/**
|
|
@@ -17044,8 +17226,13 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17044
17226
|
* @returns {void}
|
|
17045
17227
|
*/
|
|
17046
17228
|
reset() {
|
|
17047
|
-
this.
|
|
17229
|
+
this.optionSelected = undefined;
|
|
17230
|
+
this.value = undefined;
|
|
17231
|
+
this.typedValue = undefined;
|
|
17232
|
+
this.input.value = undefined;
|
|
17233
|
+
this.menu.value = undefined;
|
|
17048
17234
|
this.validation.reset(this);
|
|
17235
|
+
this.touched = false;
|
|
17049
17236
|
}
|
|
17050
17237
|
|
|
17051
17238
|
/**
|
|
@@ -17054,6 +17241,11 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17054
17241
|
*/
|
|
17055
17242
|
clear() {
|
|
17056
17243
|
this.input.clear();
|
|
17244
|
+
if (this.menu.value || this.menu.optionSelected) {
|
|
17245
|
+
this.menu.reset();
|
|
17246
|
+
}
|
|
17247
|
+
this.optionSelected = undefined;
|
|
17248
|
+
this.value = undefined;
|
|
17057
17249
|
}
|
|
17058
17250
|
|
|
17059
17251
|
/**
|
|
@@ -17066,7 +17258,16 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17066
17258
|
|
|
17067
17259
|
async updated(changedProperties) {
|
|
17068
17260
|
// After the component is ready, send direct value changes to auro-menu.
|
|
17069
|
-
if (changedProperties.has('value')
|
|
17261
|
+
if (changedProperties.has('value')) {
|
|
17262
|
+
if (this.value && this.value.length > 0) {
|
|
17263
|
+
this.hasValue = true;
|
|
17264
|
+
} else {
|
|
17265
|
+
this.hasValue = false;
|
|
17266
|
+
}
|
|
17267
|
+
|
|
17268
|
+
if (this.hasValue && !this.input.value && (!this.menu.availableOptions || this.menu.availableOptions.length === 0)) {
|
|
17269
|
+
this.input.value = this.value;
|
|
17270
|
+
}
|
|
17070
17271
|
|
|
17071
17272
|
if (this.value) {
|
|
17072
17273
|
// If the value got set programmatically make sure we hide the bib
|
|
@@ -17080,6 +17281,19 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17080
17281
|
|
|
17081
17282
|
// Sync the input, menu, and optionSelected states
|
|
17082
17283
|
await this.syncValuesAndStates();
|
|
17284
|
+
|
|
17285
|
+
this.dispatchEvent(new CustomEvent('input', {
|
|
17286
|
+
bubbles: true,
|
|
17287
|
+
cancelable: false,
|
|
17288
|
+
composed: true,
|
|
17289
|
+
}));
|
|
17290
|
+
|
|
17291
|
+
// Deprecated, need to be removed.
|
|
17292
|
+
this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
|
|
17293
|
+
bubbles: true,
|
|
17294
|
+
cancelable: false,
|
|
17295
|
+
composed: true,
|
|
17296
|
+
}));
|
|
17083
17297
|
}
|
|
17084
17298
|
|
|
17085
17299
|
if (changedProperties.has('availableOptions')) {
|
|
@@ -17122,6 +17336,16 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17122
17336
|
});
|
|
17123
17337
|
}
|
|
17124
17338
|
|
|
17339
|
+
/**
|
|
17340
|
+
* Updates the active option in the menu.
|
|
17341
|
+
* @param {number} index - Index of the option to make active.
|
|
17342
|
+
*/
|
|
17343
|
+
updateActiveOption(index) {
|
|
17344
|
+
if (this.menu) {
|
|
17345
|
+
this.menu.updateActiveOption(index);
|
|
17346
|
+
}
|
|
17347
|
+
}
|
|
17348
|
+
|
|
17125
17349
|
/**
|
|
17126
17350
|
* Watch for slot changes and recalculate the menuoptions.
|
|
17127
17351
|
* @private
|
|
@@ -17131,6 +17355,10 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17131
17355
|
handleSlotChange(event) {
|
|
17132
17356
|
switch (event.target.name) {
|
|
17133
17357
|
case '':
|
|
17358
|
+
if (!this.menu || this.menu !== this.querySelector('auro-menu, [auro-menu]')) {
|
|
17359
|
+
this.configureMenu();
|
|
17360
|
+
}
|
|
17361
|
+
|
|
17134
17362
|
// Treat only generic menuoptions.
|
|
17135
17363
|
this.options = this.menu.querySelectorAll('auro-menuoption, [auro-menuoption]');
|
|
17136
17364
|
this.options.forEach((opt) => {
|
|
@@ -17207,14 +17435,16 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17207
17435
|
.inputmode="${this.inputmode}"
|
|
17208
17436
|
.placeholder="${this.placeholder}"
|
|
17209
17437
|
.type="${this.type}"
|
|
17438
|
+
.value="${this.typedValue}"
|
|
17210
17439
|
?disabled="${this.disabled}"
|
|
17211
17440
|
?icon="${this.triggerIcon}"
|
|
17212
|
-
?
|
|
17441
|
+
?dvInputOnly="${this.dvInputOnly}"
|
|
17213
17442
|
?onDark="${this.onDark}"
|
|
17214
17443
|
?required="${this.required}"
|
|
17215
17444
|
a11yRole="combobox"
|
|
17216
17445
|
id="${this.id}"
|
|
17217
17446
|
layout="${this.layout}"
|
|
17447
|
+
noValidate="true"
|
|
17218
17448
|
setCustomValidity="${this.setCustomValidity}"
|
|
17219
17449
|
setCustomValidityCustomError="${this.setCustomValidityCustomError}"
|
|
17220
17450
|
setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
|
|
@@ -17230,7 +17460,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17230
17460
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}">
|
|
17231
17461
|
<slot name="bib.fullscreen.headline" slot="header"></slot>
|
|
17232
17462
|
<slot name="ariaLabel.bib.close" slot="ariaLabel.close">Close</slot>
|
|
17233
|
-
<slot></slot>
|
|
17463
|
+
<slot @slotchange="${this.handleSlotChange}"></slot>
|
|
17234
17464
|
<${this.inputTag}
|
|
17235
17465
|
id="inputInBib"
|
|
17236
17466
|
@input="${this.handleInputValueChange}"
|
|
@@ -17240,6 +17470,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
17240
17470
|
.inputmode="${this.inputmode}"
|
|
17241
17471
|
.placeholder="${this.placeholder}"
|
|
17242
17472
|
.type="${this.type}"
|
|
17473
|
+
.value="${this.typedValue}"
|
|
17243
17474
|
?disabled="${this.disabled}"
|
|
17244
17475
|
?icon="${this.triggerIcon}"
|
|
17245
17476
|
?required="${this.required}"
|
|
@@ -17557,6 +17788,10 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17557
17788
|
updated(changedProperties) {
|
|
17558
17789
|
super.updated(changedProperties);
|
|
17559
17790
|
|
|
17791
|
+
if (changedProperties.has('optionSelected')) {
|
|
17792
|
+
this.notifySelectionChange();
|
|
17793
|
+
}
|
|
17794
|
+
|
|
17560
17795
|
if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
|
|
17561
17796
|
// Reset selection if multiSelect mode changes
|
|
17562
17797
|
this.clearSelection();
|
|
@@ -17566,8 +17801,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17566
17801
|
if (changedProperties.has("value")) {
|
|
17567
17802
|
// Handle null/undefined case
|
|
17568
17803
|
if (this.value === undefined || this.value === null) {
|
|
17569
|
-
this.
|
|
17570
|
-
this.index = -1;
|
|
17804
|
+
this.clearSelection();
|
|
17571
17805
|
} else {
|
|
17572
17806
|
if (this.multiSelect) {
|
|
17573
17807
|
// In multiselect mode, this.value should be an array of strings
|
|
@@ -17671,6 +17905,12 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17671
17905
|
if (changedProperties.has('matchWord') && regexWord &&
|
|
17672
17906
|
isOptionInteractive(option) && !option.hasAttribute('persistent')) {
|
|
17673
17907
|
const nested = option.querySelectorAll('.nestingSpacer');
|
|
17908
|
+
|
|
17909
|
+
const displayValueEl = option.querySelector('[slot="displayValue"]');
|
|
17910
|
+
if (displayValueEl) {
|
|
17911
|
+
option.removeChild(displayValueEl);
|
|
17912
|
+
}
|
|
17913
|
+
|
|
17674
17914
|
// Create nested spacers
|
|
17675
17915
|
const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
|
|
17676
17916
|
|
|
@@ -17680,6 +17920,9 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17680
17920
|
regexWord,
|
|
17681
17921
|
(match) => `<strong>${match}</strong>`
|
|
17682
17922
|
);
|
|
17923
|
+
if (displayValueEl) {
|
|
17924
|
+
option.append(displayValueEl);
|
|
17925
|
+
}
|
|
17683
17926
|
}
|
|
17684
17927
|
|
|
17685
17928
|
// Update disabled state
|
|
@@ -17811,6 +18054,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17811
18054
|
clearSelection() {
|
|
17812
18055
|
this.optionSelected = undefined;
|
|
17813
18056
|
this.value = undefined;
|
|
18057
|
+
this.index = -1;
|
|
17814
18058
|
}
|
|
17815
18059
|
|
|
17816
18060
|
/**
|
|
@@ -17908,7 +18152,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17908
18152
|
// In multiselect, toggle individual selections
|
|
17909
18153
|
this.toggleOption(option);
|
|
17910
18154
|
// In single select, only handle selection of new options
|
|
17911
|
-
} else if (!this.isOptionSelected(option)) {
|
|
18155
|
+
} else if (this.option !== this.optionSelected || !this.isOptionSelected(option)) {
|
|
17912
18156
|
this.clearSelection();
|
|
17913
18157
|
this.handleSelectState(option);
|
|
17914
18158
|
}
|
|
@@ -17939,7 +18183,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17939
18183
|
* @param {MouseEvent} event - Event object from the browser.
|
|
17940
18184
|
*/
|
|
17941
18185
|
handleMouseSelect(event) {
|
|
17942
|
-
if (event.target === this) {
|
|
18186
|
+
if (!this.rootMenu || event.target === this) {
|
|
17943
18187
|
return;
|
|
17944
18188
|
}
|
|
17945
18189
|
|
|
@@ -17964,8 +18208,9 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17964
18208
|
/**
|
|
17965
18209
|
* Handles slot change events.
|
|
17966
18210
|
* @private
|
|
18211
|
+
* @param {Event} evt - Event object from the browser.
|
|
17967
18212
|
*/
|
|
17968
|
-
handleSlotChange() {
|
|
18213
|
+
handleSlotChange(evt) {
|
|
17969
18214
|
if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
|
|
17970
18215
|
this.rootMenu = false;
|
|
17971
18216
|
}
|
|
@@ -17980,6 +18225,15 @@ class AuroMenu extends AuroElement$1 {
|
|
|
17980
18225
|
]
|
|
17981
18226
|
]));
|
|
17982
18227
|
}
|
|
18228
|
+
|
|
18229
|
+
if (this.value) {
|
|
18230
|
+
this.items.forEach((opt) => {
|
|
18231
|
+
if (opt.value === this.value || (this.multiSelect && this.formattedValue.includes(opt.value))) {
|
|
18232
|
+
this.handleSelectState(opt);
|
|
18233
|
+
this.notifySelectionChange(evt.type);
|
|
18234
|
+
}
|
|
18235
|
+
});
|
|
18236
|
+
}
|
|
17983
18237
|
}
|
|
17984
18238
|
|
|
17985
18239
|
/**
|
|
@@ -18034,7 +18288,6 @@ class AuroMenu extends AuroElement$1 {
|
|
|
18034
18288
|
|
|
18035
18289
|
/**
|
|
18036
18290
|
* Updates the active option state and dispatches events.
|
|
18037
|
-
* @private
|
|
18038
18291
|
* @param {number} index - Index of the option to make active.
|
|
18039
18292
|
*/
|
|
18040
18293
|
updateActiveOption(index) {
|
|
@@ -18063,10 +18316,11 @@ class AuroMenu extends AuroElement$1 {
|
|
|
18063
18316
|
|
|
18064
18317
|
/**
|
|
18065
18318
|
* Notifies selection change to parent components.
|
|
18319
|
+
* @param {any} source - The source that triggers this event.
|
|
18066
18320
|
* @private
|
|
18067
18321
|
*/
|
|
18068
|
-
notifySelectionChange() {
|
|
18069
|
-
dispatchMenuEvent(this, 'auroMenu-selectedOption');
|
|
18322
|
+
notifySelectionChange(source = undefined) {
|
|
18323
|
+
dispatchMenuEvent(this, 'auroMenu-selectedOption', { source });
|
|
18070
18324
|
}
|
|
18071
18325
|
|
|
18072
18326
|
/**
|
|
@@ -18139,7 +18393,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
18139
18393
|
}
|
|
18140
18394
|
}
|
|
18141
18395
|
|
|
18142
|
-
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}`;
|
|
18396
|
+
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}`;
|
|
18143
18397
|
|
|
18144
18398
|
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)}`;
|
|
18145
18399
|
|
|
@@ -18613,7 +18867,8 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
18613
18867
|
reflect: true
|
|
18614
18868
|
},
|
|
18615
18869
|
value: {
|
|
18616
|
-
type: String
|
|
18870
|
+
type: String,
|
|
18871
|
+
reflect: true
|
|
18617
18872
|
},
|
|
18618
18873
|
tabIndex: {
|
|
18619
18874
|
type: Number,
|