@aurodesignsystem-dev/auro-formkit 0.0.0-pr1059.1 → 0.0.0-pr1059.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/components/combobox/README.md +1 -1
  2. package/components/combobox/demo/api.md +98 -9
  3. package/components/combobox/demo/api.min.js +68 -31
  4. package/components/combobox/demo/index.md +1 -1
  5. package/components/combobox/demo/index.min.js +18 -27
  6. package/components/combobox/demo/readme.md +1 -1
  7. package/components/combobox/dist/index.js +14 -15
  8. package/components/combobox/dist/registered.js +14 -15
  9. package/components/counter/demo/api.min.js +7 -2
  10. package/components/counter/demo/index.min.js +7 -2
  11. package/components/counter/dist/index.js +7 -2
  12. package/components/counter/dist/registered.js +7 -2
  13. package/components/datepicker/demo/api.min.js +8 -3
  14. package/components/datepicker/demo/index.min.js +8 -3
  15. package/components/datepicker/dist/index.js +8 -3
  16. package/components/datepicker/dist/registered.js +8 -3
  17. package/components/dropdown/demo/api.min.js +7 -2
  18. package/components/dropdown/demo/index.min.js +7 -2
  19. package/components/dropdown/dist/index.js +7 -2
  20. package/components/dropdown/dist/registered.js +7 -2
  21. package/components/input/demo/api.md +1 -1
  22. package/components/input/demo/api.min.js +1 -1
  23. package/components/input/demo/index.md +1 -2
  24. package/components/input/demo/index.min.js +1 -1
  25. package/components/input/dist/base-input.d.ts +1 -1
  26. package/components/input/dist/index.js +1 -1
  27. package/components/input/dist/registered.js +1 -1
  28. package/components/menu/demo/api.min.js +4 -12
  29. package/components/menu/demo/index.min.js +4 -12
  30. package/components/menu/dist/index.js +4 -12
  31. package/components/menu/dist/registered.js +4 -12
  32. package/components/select/demo/api.min.js +12 -15
  33. package/components/select/demo/index.min.js +12 -15
  34. package/components/select/dist/index.js +8 -3
  35. package/components/select/dist/registered.js +8 -3
  36. package/package.json +1 -1
@@ -22,7 +22,7 @@ The following sections are editable by making changes to the following files:
22
22
  <!-- The below content is automatically added from ./docs/partials/description.md -->
23
23
  `<auro-combobox>` is the combination of [dropdown](http://auro.alaskaair.com/components/auro/dropdown), [input](http://auro.alaskaair.com/components/auro/input), and [menu](http://auro.alaskaair.com/components/auro/menu) and allows users to filter search results from a predefined list as they type. When the user starts typing in the text input, a dropdown of a menu shows up to display options that match the user’s search.
24
24
 
25
- Combobox behaves as a filter of menu options. Typing into the input field will execute the filter but will not set the `value` of the combobox. The combobox value is set by selecting a menu option. Clicking the `X` clear button in the input will remove the current value of the HTML5 input causing the menu filter to reset as well as remove the current value of the combobox.
25
+ By default, `auro-combobox` behaves as a suggestion list. This means any value may be typed into the combobox and the menu list presented effectively provides sample or suggestion options. With the use of the `persistInput` attribute the `auro-combobox` behaves as a filter of menu options. In this mode. typing into the input field will execute the filter but will not set the `value` of the combobox. The combobox value is set by selecting a menu option. Clicking the `X` clear button in the input will remove the current value of the HTML5 input causing the menu filter to reset as well as remove the current value of the combobox.
26
26
  <!-- AURO-GENERATED-CONTENT:END -->
27
27
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
28
28
  <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
@@ -170,7 +170,7 @@ The menu in this example was populated from data from a country/city API. To kee
170
170
  <!-- ----------------- -->
171
171
  <auro-combobox
172
172
  id="dynamicMenuExample"
173
- value="GER"
173
+ value="TAN"
174
174
  layout="snowflake"
175
175
  shape="snowflake"
176
176
  size="lg"
@@ -180,13 +180,35 @@ The menu in this example was populated from data from a country/city API. To kee
180
180
  dvInputOnly
181
181
  required>
182
182
  <span slot="bib.fullscreen.headline">Dynamic Combobox Header</span>
183
- <span slot="label">Name</span>
183
+ <span slot="label">First</span>
184
184
  <!--
185
185
  The auro-combobox element requires an empty auro-menu element
186
186
  due to the requirements of auro-dropdown and auro-input
187
187
  -->
188
188
  <auro-menu id="initMenu"></auro-menu>
189
- </auro-combobox>
189
+ </auro-combobox>
190
+ <auro-combobox
191
+ id="dynamicMenuExampleTwo"
192
+ value="GER"
193
+ layout="snowflake"
194
+ shape="snowflake"
195
+ size="lg"
196
+ ondark
197
+ noFilter
198
+ persistInput
199
+ dvInputOnly
200
+ required>
201
+ <span slot="bib.fullscreen.headline">Dynamic Combobox Header</span>
202
+ <span slot="label">Second</span>
203
+ <!--
204
+ The auro-combobox element requires an empty auro-menu element
205
+ due to the requirements of auro-dropdown and auro-input
206
+ -->
207
+ <auro-menu id="initMenuTwo"></auro-menu>
208
+ </auro-combobox>
209
+ <auro-button id="dynamicMenuSwapButton">
210
+ Swap Values
211
+ </auro-button>
190
212
  <!-- AURO-GENERATED-CONTENT:END -->
191
213
  </div>
192
214
  <auro-accordion alignRight>
@@ -199,7 +221,7 @@ The menu in this example was populated from data from a country/city API. To kee
199
221
  <!-- ----------------- -->
200
222
  <auro-combobox
201
223
  id="dynamicMenuExample"
202
- value="GER"
224
+ value="TAN"
203
225
  layout="snowflake"
204
226
  shape="snowflake"
205
227
  size="lg"
@@ -209,13 +231,35 @@ The menu in this example was populated from data from a country/city API. To kee
209
231
  dvInputOnly
210
232
  required>
211
233
  <span slot="bib.fullscreen.headline">Dynamic Combobox Header</span>
212
- <span slot="label">Name</span>
234
+ <span slot="label">First</span>
213
235
  <!--
214
236
  The auro-combobox element requires an empty auro-menu element
215
237
  due to the requirements of auro-dropdown and auro-input
216
238
  -->
217
239
  <auro-menu id="initMenu"></auro-menu>
218
240
  </auro-combobox>
241
+ <auro-combobox
242
+ id="dynamicMenuExampleTwo"
243
+ value="GER"
244
+ layout="snowflake"
245
+ shape="snowflake"
246
+ size="lg"
247
+ ondark
248
+ noFilter
249
+ persistInput
250
+ dvInputOnly
251
+ required>
252
+ <span slot="bib.fullscreen.headline">Dynamic Combobox Header</span>
253
+ <span slot="label">Second</span>
254
+ <!--
255
+ The auro-combobox element requires an empty auro-menu element
256
+ due to the requirements of auro-dropdown and auro-input
257
+ -->
258
+ <auro-menu id="initMenuTwo"></auro-menu>
259
+ </auro-combobox>
260
+ <auro-button id="dynamicMenuSwapButton">
261
+ Swap Values
262
+ </auro-button>
219
263
  ```
220
264
  <!-- AURO-GENERATED-CONTENT:END -->
221
265
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dynamicMenu.js) -->
@@ -234,9 +278,35 @@ export async function dynamicMenuExample() {
234
278
  }
235
279
  }
236
280
 
281
+ function swapValues() {
282
+ const elOne = document.querySelector('#dynamicMenuExample');
283
+ const elTwo = document.querySelector('#dynamicMenuExampleTwo');
284
+
285
+ const elOneValue = elOne.value;
286
+ const elTwoValue = elTwo.value;
287
+
288
+ const elOneInputValue = elOne.input.value;
289
+ const elTwoInputValue = elTwo.input.value;
290
+
291
+ elOne.reset();
292
+ elTwo.reset();
293
+
294
+ elOne.value = elTwoValue;
295
+ elTwo.value = elOneValue;
296
+
297
+ setTimeout(() => {
298
+ elOne.typedValue = elTwoInputValue;
299
+ elTwo.typedValue = elOneInputValue;
300
+ }, 0);
301
+ }
302
+
303
+ document.querySelector('#dynamicMenuSwapButton').addEventListener('click', () => {
304
+ swapValues();
305
+ });
306
+
237
307
  // Generates HTML for menu and submenus using country & city data from an external API
238
- function generateHtml(data) {
239
- const initialMenu = document.querySelector('#initMenu');
308
+ function generateHtml(data, selector) {
309
+ const initialMenu = document.querySelector(selector);
240
310
 
241
311
  resetMenu(initialMenu);
242
312
 
@@ -279,13 +349,32 @@ export async function dynamicMenuExample() {
279
349
  let data = dynamicData.getData();
280
350
  data = dynamicData.filterData(data, inputEl.value);
281
351
 
282
- generateHtml(data);
352
+ generateHtml(data, '#initMenu');
283
353
  });
284
354
 
285
355
  if (dynamicMenuExampleEl.value && dynamicMenuExampleEl.value.length > 0 && dynamicMenuExampleEl.input.value && (!dynamicMenuExampleEl.menu.availableOptions || dynamicMenuExampleEl.menu.availableOptions.length === 0)) {
286
356
  let data = dynamicData.getData();
287
357
  data = dynamicData.filterData(data, inputEl.value);
288
- generateHtml(data);
358
+ generateHtml(data, '#initMenu');
359
+ }
360
+
361
+ // TODO: Need to refactor this to to not console a console error
362
+ const dynamicDataTwo = new DynamicData();
363
+ const dynamicMenuExampleElTwo = document.querySelector('#dynamicMenuExample');
364
+ const dropdownElTwo = dynamicMenuExampleElTwo.shadowRoot.querySelector(dynamicMenuExampleElTwo.dropdownTag._$litStatic$);
365
+ const inputElTwo = dropdownElTwo.querySelector(dynamicMenuExampleElTwo.inputTag._$litStatic$);
366
+
367
+ inputElTwo.addEventListener('input', () => {
368
+ let data = dynamicDataTwo.getData();
369
+ data = dynamicDataTwo.filterData(data, inputEl.value);
370
+
371
+ generateHtml(data, '#initMenuTwo');
372
+ });
373
+
374
+ if (dynamicMenuExampleElTwo.value && dynamicMenuExampleElTwo.value.length > 0 && dynamicMenuExampleElTwo.input.value && (!dynamicMenuExampleElTwo.menu.availableOptions || dynamicMenuExampleElTwo.menu.availableOptions.length === 0)) {
375
+ let data = dynamicDataTwo.getData();
376
+ data = dynamicDataTwo.filterData(data, inputElTwo.value);
377
+ generateHtml(data, '#initMenuTwo');
289
378
  }
290
379
  }
291
380
  ```
@@ -40,9 +40,36 @@ async 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('#initMenu');
71
+ function generateHtml(data, selector) {
72
+ const initialMenu = document.querySelector(selector);
46
73
 
47
74
  resetMenu(initialMenu);
48
75
 
@@ -84,14 +111,33 @@ async function dynamicMenuExample() {
84
111
  let data = dynamicData.getData();
85
112
  data = dynamicData.filterData(data, inputEl.value);
86
113
 
87
- generateHtml(data);
114
+ generateHtml(data, '#initMenu');
88
115
  });
89
116
 
90
117
 
91
118
  if (dynamicMenuExampleEl.value && dynamicMenuExampleEl.value.length > 0 && dynamicMenuExampleEl.input.value && (!dynamicMenuExampleEl.menu.availableOptions || dynamicMenuExampleEl.menu.availableOptions.length === 0)) {
92
119
  let data = dynamicData.getData();
93
120
  data = dynamicData.filterData(data, inputEl.value);
94
- generateHtml(data);
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');
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');
95
141
  }
96
142
  }
97
143
 
@@ -5306,8 +5352,13 @@ class AuroDropdown extends AuroElement$4 {
5306
5352
  }
5307
5353
 
5308
5354
  if (event) {
5309
- this.triggerNode = event.target;
5310
- this.triggerContentSlot = event.target.assignedNodes();
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
+ }
5311
5362
  }
5312
5363
 
5313
5364
  if (this.triggerContentSlot) {
@@ -10578,7 +10629,7 @@ class BaseInput extends AuroElement$2$1 {
10578
10629
  ...super.properties,
10579
10630
 
10580
10631
  /**
10581
- * If defined, the display value slot content will only mask the HTML5 input element. The inputs label will not be masked.
10632
+ * If defined, the display value slot content will only mask the HTML5 input element. The input's label will not be masked.
10582
10633
  */
10583
10634
  dvInputOnly: {
10584
10635
  type: Boolean,
@@ -15855,7 +15906,7 @@ var bibTemplateVersion = '1.0.0';
15855
15906
 
15856
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}`;
15857
15908
 
15858
- 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]:hover{--ds-auro-input-background-color: var(--ds-advanced-color-dropdown-emphasized-background-hover, rgba(0, 39, 74, 0.2));--ds-auro-input-container-color: var(--ds-advanced-color-dropdown-emphasized-background-hover, rgba(0, 39, 74, 0.2))}:host([layout*=emphasized][shape*=pill]) [auro-input]::part(inputHelpText){display:none}`;
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}`;
15859
15910
 
15860
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}`;
15861
15912
 
@@ -16671,11 +16722,6 @@ class AuroCombobox extends AuroElement$1 {
16671
16722
  this.menu.value = this.value;
16672
16723
  this.menu.matchWord = this.input.value;
16673
16724
 
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
-
16679
16725
  // Wait a lifecycle for child components to update
16680
16726
  await Promise.all([this.menu.updateComplete]);
16681
16727
 
@@ -16709,6 +16755,8 @@ class AuroCombobox extends AuroElement$1 {
16709
16755
  this.input.appendChild(displayValueEl.cloneNode(true));
16710
16756
  }
16711
16757
  }
16758
+
16759
+ this.requestUpdate();
16712
16760
  }
16713
16761
 
16714
16762
  /**
@@ -16730,7 +16778,6 @@ class AuroCombobox extends AuroElement$1 {
16730
16778
  * @returns {void}
16731
16779
  */
16732
16780
  handleMenuOptions() {
16733
- console.warn('handleMenuOptions()');
16734
16781
  this.resetMenuMatchword();
16735
16782
 
16736
16783
  this.generateOptionsArray();
@@ -16917,7 +16964,6 @@ class AuroCombobox extends AuroElement$1 {
16917
16964
 
16918
16965
  // handle the menu event for an option selection
16919
16966
  this.menu.addEventListener('auroMenu-selectedOption', (evt) => {
16920
- console.warn('event auroMenu-selectedOption', evt);
16921
16967
  if (this.menu.optionSelected) {
16922
16968
  const selected = this.menu.optionSelected;
16923
16969
 
@@ -17018,7 +17064,6 @@ class AuroCombobox extends AuroElement$1 {
17018
17064
  * @returns {void}
17019
17065
  */
17020
17066
  handleInputValueChange(event) {
17021
- console.warn('handleInputValueChange', event);
17022
17067
  if (event.target === this.inputInBib) {
17023
17068
  this.input.value = this.inputInBib.value;
17024
17069
  return;
@@ -17180,10 +17225,11 @@ class AuroCombobox extends AuroElement$1 {
17180
17225
  * @returns {void}
17181
17226
  */
17182
17227
  reset() {
17183
- this.input.reset();
17184
- this.menu.reset();
17185
17228
  this.optionSelected = undefined;
17186
17229
  this.value = undefined;
17230
+ this.typedValue = undefined;
17231
+ this.input.value = undefined;
17232
+ this.menu.value = undefined;
17187
17233
  this.validation.reset(this);
17188
17234
  this.touched = false;
17189
17235
  }
@@ -17307,7 +17353,6 @@ class AuroCombobox extends AuroElement$1 {
17307
17353
  * @returns {void}
17308
17354
  */
17309
17355
  handleSlotChange(event) {
17310
- console.warn('handleSlotChange', event);
17311
17356
  switch (event.target.name) {
17312
17357
  case '':
17313
17358
  if (!this.menu || this.menu !== this.querySelector('auro-menu, [auro-menu]')) {
@@ -17743,6 +17788,10 @@ class AuroMenu extends AuroElement$1 {
17743
17788
  updated(changedProperties) {
17744
17789
  super.updated(changedProperties);
17745
17790
 
17791
+ if (changedProperties.has('optionSelected')) {
17792
+ this.notifySelectionChange();
17793
+ }
17794
+
17746
17795
  if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
17747
17796
  // Reset selection if multiSelect mode changes
17748
17797
  this.clearSelection();
@@ -17750,8 +17799,6 @@ class AuroMenu extends AuroElement$1 {
17750
17799
 
17751
17800
 
17752
17801
  if (changedProperties.has("value")) {
17753
- console.warn('menu value updated', this.value);
17754
- console.info('available options', this.availableOptions);
17755
17802
  // Handle null/undefined case
17756
17803
  if (this.value === undefined || this.value === null) {
17757
17804
  this.clearSelection();
@@ -17763,12 +17810,9 @@ class AuroMenu extends AuroElement$1 {
17763
17810
 
17764
17811
  this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
17765
17812
  } else {
17766
- console.info('single-select mode, looking for value', this.value);
17767
17813
  // In single-select mode, this.value should be a string
17768
17814
  const matchingOptions = this.items.find((item) => item.value === this.value);
17769
17815
 
17770
- console.info('matchingOptions', matchingOptions);
17771
-
17772
17816
  if (matchingOptions) {
17773
17817
  this.optionSelected = matchingOptions;
17774
17818
  this.index = this.items.indexOf(matchingOptions);
@@ -17777,8 +17821,6 @@ class AuroMenu extends AuroElement$1 {
17777
17821
  this.optionSelected = undefined;
17778
17822
  this.index = -1;
17779
17823
  }
17780
-
17781
- console.warn('optionSelected', this.optionSelected);
17782
17824
  }
17783
17825
 
17784
17826
  // If no matching options were found in either mode
@@ -17805,11 +17847,6 @@ class AuroMenu extends AuroElement$1 {
17805
17847
 
17806
17848
  // Process all other UI updates
17807
17849
  this.updateItemsState(changedProperties);
17808
-
17809
- if (changedProperties.has('optionSelected')) {
17810
- console.warn('updated: optionSelected', this.optionSelected);
17811
- this.notifySelectionChange();
17812
- }
17813
17850
  }
17814
17851
 
17815
17852
  /**
@@ -4,7 +4,7 @@
4
4
  <!-- The below content is automatically added from ./../docs/partials/description.md -->
5
5
  `<auro-combobox>` is the combination of [dropdown](http://auro.alaskaair.com/components/auro/dropdown), [input](http://auro.alaskaair.com/components/auro/input), and [menu](http://auro.alaskaair.com/components/auro/menu) and allows users to filter search results from a predefined list as they type. When the user starts typing in the text input, a dropdown of a menu shows up to display options that match the user’s search.
6
6
 
7
- Combobox behaves as a filter of menu options. Typing into the input field will execute the filter but will not set the `value` of the combobox. The combobox value is set by selecting a menu option. Clicking the `X` clear button in the input will remove the current value of the HTML5 input causing the menu filter to reset as well as remove the current value of the combobox.
7
+ By default, `auro-combobox` behaves as a suggestion list. This means any value may be typed into the combobox and the menu list presented effectively provides sample or suggestion options. With the use of the `persistInput` attribute the `auro-combobox` behaves as a filter of menu options. In this mode. typing into the input field will execute the filter but will not set the `value` of the combobox. The combobox value is set by selecting a menu option. Clicking the `X` clear button in the input will remove the current value of the HTML5 input causing the menu filter to reset as well as remove the current value of the combobox.
8
8
  <!-- AURO-GENERATED-CONTENT:END -->
9
9
 
10
10
  ## auro-combobox use cases
@@ -5154,8 +5154,13 @@ class AuroDropdown extends AuroElement$4 {
5154
5154
  }
5155
5155
 
5156
5156
  if (event) {
5157
- this.triggerNode = event.target;
5158
- this.triggerContentSlot = event.target.assignedNodes();
5157
+ // Wrap in a try-catch block to handle errors when trying to use assignedNodes from the NodeJS test environment.
5158
+ try {
5159
+ this.triggerNode = event.target;
5160
+ this.triggerContentSlot = event.target.assignedNodes();
5161
+ } catch (error) {
5162
+ console.warn('auro-dropdown: Unable to access the trigger content slot.', error); // eslint-disable-line no-console
5163
+ }
5159
5164
  }
5160
5165
 
5161
5166
  if (this.triggerContentSlot) {
@@ -10426,7 +10431,7 @@ class BaseInput extends AuroElement$2$1 {
10426
10431
  ...super.properties,
10427
10432
 
10428
10433
  /**
10429
- * If defined, the display value slot content will only mask the HTML5 input element. The inputs label will not be masked.
10434
+ * If defined, the display value slot content will only mask the HTML5 input element. The input's label will not be masked.
10430
10435
  */
10431
10436
  dvInputOnly: {
10432
10437
  type: Boolean,
@@ -15703,7 +15708,7 @@ var bibTemplateVersion = '1.0.0';
15703
15708
 
15704
15709
  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}`;
15705
15710
 
15706
- 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]:hover{--ds-auro-input-background-color: var(--ds-advanced-color-dropdown-emphasized-background-hover, rgba(0, 39, 74, 0.2));--ds-auro-input-container-color: var(--ds-advanced-color-dropdown-emphasized-background-hover, rgba(0, 39, 74, 0.2))}:host([layout*=emphasized][shape*=pill]) [auro-input]::part(inputHelpText){display:none}`;
15711
+ 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}`;
15707
15712
 
15708
15713
  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}`;
15709
15714
 
@@ -16519,11 +16524,6 @@ class AuroCombobox extends AuroElement$1 {
16519
16524
  this.menu.value = this.value;
16520
16525
  this.menu.matchWord = this.input.value;
16521
16526
 
16522
- console.warn('syncValuesAndStates()');
16523
- console.info('this.value', this.value);
16524
- console.info('this.input.value', this.input.value);
16525
- console.info('this.menu.value', this.menu.value);
16526
-
16527
16527
  // Wait a lifecycle for child components to update
16528
16528
  await Promise.all([this.menu.updateComplete]);
16529
16529
 
@@ -16557,6 +16557,8 @@ class AuroCombobox extends AuroElement$1 {
16557
16557
  this.input.appendChild(displayValueEl.cloneNode(true));
16558
16558
  }
16559
16559
  }
16560
+
16561
+ this.requestUpdate();
16560
16562
  }
16561
16563
 
16562
16564
  /**
@@ -16578,7 +16580,6 @@ class AuroCombobox extends AuroElement$1 {
16578
16580
  * @returns {void}
16579
16581
  */
16580
16582
  handleMenuOptions() {
16581
- console.warn('handleMenuOptions()');
16582
16583
  this.resetMenuMatchword();
16583
16584
 
16584
16585
  this.generateOptionsArray();
@@ -16765,7 +16766,6 @@ class AuroCombobox extends AuroElement$1 {
16765
16766
 
16766
16767
  // handle the menu event for an option selection
16767
16768
  this.menu.addEventListener('auroMenu-selectedOption', (evt) => {
16768
- console.warn('event auroMenu-selectedOption', evt);
16769
16769
  if (this.menu.optionSelected) {
16770
16770
  const selected = this.menu.optionSelected;
16771
16771
 
@@ -16866,7 +16866,6 @@ class AuroCombobox extends AuroElement$1 {
16866
16866
  * @returns {void}
16867
16867
  */
16868
16868
  handleInputValueChange(event) {
16869
- console.warn('handleInputValueChange', event);
16870
16869
  if (event.target === this.inputInBib) {
16871
16870
  this.input.value = this.inputInBib.value;
16872
16871
  return;
@@ -17028,10 +17027,11 @@ class AuroCombobox extends AuroElement$1 {
17028
17027
  * @returns {void}
17029
17028
  */
17030
17029
  reset() {
17031
- this.input.reset();
17032
- this.menu.reset();
17033
17030
  this.optionSelected = undefined;
17034
17031
  this.value = undefined;
17032
+ this.typedValue = undefined;
17033
+ this.input.value = undefined;
17034
+ this.menu.value = undefined;
17035
17035
  this.validation.reset(this);
17036
17036
  this.touched = false;
17037
17037
  }
@@ -17155,7 +17155,6 @@ class AuroCombobox extends AuroElement$1 {
17155
17155
  * @returns {void}
17156
17156
  */
17157
17157
  handleSlotChange(event) {
17158
- console.warn('handleSlotChange', event);
17159
17158
  switch (event.target.name) {
17160
17159
  case '':
17161
17160
  if (!this.menu || this.menu !== this.querySelector('auro-menu, [auro-menu]')) {
@@ -17591,6 +17590,10 @@ class AuroMenu extends AuroElement$1 {
17591
17590
  updated(changedProperties) {
17592
17591
  super.updated(changedProperties);
17593
17592
 
17593
+ if (changedProperties.has('optionSelected')) {
17594
+ this.notifySelectionChange();
17595
+ }
17596
+
17594
17597
  if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
17595
17598
  // Reset selection if multiSelect mode changes
17596
17599
  this.clearSelection();
@@ -17598,8 +17601,6 @@ class AuroMenu extends AuroElement$1 {
17598
17601
 
17599
17602
 
17600
17603
  if (changedProperties.has("value")) {
17601
- console.warn('menu value updated', this.value);
17602
- console.info('available options', this.availableOptions);
17603
17604
  // Handle null/undefined case
17604
17605
  if (this.value === undefined || this.value === null) {
17605
17606
  this.clearSelection();
@@ -17611,12 +17612,9 @@ class AuroMenu extends AuroElement$1 {
17611
17612
 
17612
17613
  this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
17613
17614
  } else {
17614
- console.info('single-select mode, looking for value', this.value);
17615
17615
  // In single-select mode, this.value should be a string
17616
17616
  const matchingOptions = this.items.find((item) => item.value === this.value);
17617
17617
 
17618
- console.info('matchingOptions', matchingOptions);
17619
-
17620
17618
  if (matchingOptions) {
17621
17619
  this.optionSelected = matchingOptions;
17622
17620
  this.index = this.items.indexOf(matchingOptions);
@@ -17625,8 +17623,6 @@ class AuroMenu extends AuroElement$1 {
17625
17623
  this.optionSelected = undefined;
17626
17624
  this.index = -1;
17627
17625
  }
17628
-
17629
- console.warn('optionSelected', this.optionSelected);
17630
17626
  }
17631
17627
 
17632
17628
  // If no matching options were found in either mode
@@ -17653,11 +17649,6 @@ class AuroMenu extends AuroElement$1 {
17653
17649
 
17654
17650
  // Process all other UI updates
17655
17651
  this.updateItemsState(changedProperties);
17656
-
17657
- if (changedProperties.has('optionSelected')) {
17658
- console.warn('updated: optionSelected', this.optionSelected);
17659
- this.notifySelectionChange();
17660
- }
17661
17652
  }
17662
17653
 
17663
17654
  /**
@@ -22,7 +22,7 @@ The following sections are editable by making changes to the following files:
22
22
  <!-- The below content is automatically added from ./docs/partials/description.md -->
23
23
  `<auro-combobox>` is the combination of [dropdown](http://auro.alaskaair.com/components/auro/dropdown), [input](http://auro.alaskaair.com/components/auro/input), and [menu](http://auro.alaskaair.com/components/auro/menu) and allows users to filter search results from a predefined list as they type. When the user starts typing in the text input, a dropdown of a menu shows up to display options that match the user’s search.
24
24
 
25
- Combobox behaves as a filter of menu options. Typing into the input field will execute the filter but will not set the `value` of the combobox. The combobox value is set by selecting a menu option. Clicking the `X` clear button in the input will remove the current value of the HTML5 input causing the menu filter to reset as well as remove the current value of the combobox.
25
+ By default, `auro-combobox` behaves as a suggestion list. This means any value may be typed into the combobox and the menu list presented effectively provides sample or suggestion options. With the use of the `persistInput` attribute the `auro-combobox` behaves as a filter of menu options. In this mode. typing into the input field will execute the filter but will not set the `value` of the combobox. The combobox value is set by selecting a menu option. Clicking the `X` clear button in the input will remove the current value of the HTML5 input causing the menu filter to reset as well as remove the current value of the combobox.
26
26
  <!-- AURO-GENERATED-CONTENT:END -->
27
27
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
28
28
  <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->