@aurodesignsystem/auro-formkit 2.0.0-beta.10 → 2.0.0-beta.11

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 (197) hide show
  1. package/.turbo/cache/0c8124a987c1cc05-meta.json +1 -1
  2. package/.turbo/cache/0cd512cdf86242c7-meta.json +1 -0
  3. package/.turbo/cache/{ff4dbfffc29255ab.tar.zst → 0cd512cdf86242c7.tar.zst} +0 -0
  4. package/.turbo/cache/123c83cd8727dff3-meta.json +1 -0
  5. package/.turbo/cache/123c83cd8727dff3.tar.zst +0 -0
  6. package/.turbo/cache/18129dba20f51b6b-meta.json +1 -1
  7. package/.turbo/cache/253e861af7025ed4-meta.json +1 -0
  8. package/.turbo/cache/253e861af7025ed4.tar.zst +0 -0
  9. package/.turbo/cache/2787020e69f50af2-meta.json +1 -1
  10. package/.turbo/cache/2a5295c8f561ed84-meta.json +1 -0
  11. package/.turbo/cache/2c0d681132c153dd-meta.json +1 -1
  12. package/.turbo/cache/4006a206400d5c7b-meta.json +1 -1
  13. package/.turbo/cache/492dda333b8d15f1-meta.json +1 -1
  14. package/.turbo/cache/4e3619d9dfc86809-meta.json +1 -0
  15. package/.turbo/cache/4e3619d9dfc86809.tar.zst +0 -0
  16. package/.turbo/cache/50993de942ec15a9-meta.json +1 -1
  17. package/.turbo/cache/50cd7dcfc9f820c5-meta.json +1 -0
  18. package/.turbo/cache/50cd7dcfc9f820c5.tar.zst +0 -0
  19. package/.turbo/cache/51eaa58d5c167de8-meta.json +1 -1
  20. package/.turbo/cache/5a0d3e26da304c62-meta.json +1 -0
  21. package/.turbo/cache/5a0d3e26da304c62.tar.zst +0 -0
  22. package/.turbo/cache/5c960af698582835-meta.json +1 -0
  23. package/.turbo/cache/5c960af698582835.tar.zst +0 -0
  24. package/.turbo/cache/5dbbb71dffc3f542-meta.json +1 -0
  25. package/.turbo/cache/5dbbb71dffc3f542.tar.zst +0 -0
  26. package/.turbo/cache/6081837e8943b62e-meta.json +1 -1
  27. package/.turbo/cache/60ad74320c682a2b-meta.json +1 -1
  28. package/.turbo/cache/61e218aba69cff58-meta.json +1 -1
  29. package/.turbo/cache/77da375a012de9d0-meta.json +1 -1
  30. package/.turbo/cache/7964d1656e9e702a-meta.json +1 -0
  31. package/.turbo/cache/7964d1656e9e702a.tar.zst +0 -0
  32. package/.turbo/cache/7bf2b06a479d0b30-meta.json +1 -1
  33. package/.turbo/cache/7c9ca6163e61285c-meta.json +1 -1
  34. package/.turbo/cache/80aca269cd346fb4-meta.json +1 -0
  35. package/.turbo/cache/80aca269cd346fb4.tar.zst +0 -0
  36. package/.turbo/cache/8602fc2bb737a5cf-meta.json +1 -0
  37. package/.turbo/cache/89e0e7a6148e854f-meta.json +1 -0
  38. package/.turbo/cache/89e0e7a6148e854f.tar.zst +0 -0
  39. package/.turbo/cache/8bb856bd31b5b479-meta.json +1 -1
  40. package/.turbo/cache/93c887fb93a10daa-meta.json +1 -0
  41. package/.turbo/cache/93c887fb93a10daa.tar.zst +0 -0
  42. package/.turbo/cache/94dae2a64e9d8356-meta.json +1 -0
  43. package/.turbo/cache/97f6fe83b54acf09-meta.json +1 -0
  44. package/.turbo/cache/{080ca6155e637d5d.tar.zst → 97f6fe83b54acf09.tar.zst} +0 -0
  45. package/.turbo/cache/98317b0d14d94df7-meta.json +1 -0
  46. package/.turbo/cache/98317b0d14d94df7.tar.zst +0 -0
  47. package/.turbo/cache/9ae99e8e7bd83d06-meta.json +1 -1
  48. package/.turbo/cache/9cbcd13b1d031f63-meta.json +1 -0
  49. package/.turbo/cache/{8af27c076dc010c3.tar.zst → 9cbcd13b1d031f63.tar.zst} +0 -0
  50. package/.turbo/cache/afbbd49ed1a558b9-meta.json +1 -0
  51. package/.turbo/cache/b353ce8f6da43dea-meta.json +1 -0
  52. package/.turbo/cache/b5e6dc7fb9ae1a2f-meta.json +1 -1
  53. package/.turbo/cache/b6a202cc85cb61a0-meta.json +1 -1
  54. package/.turbo/cache/b8db059a9b9ccb5d-meta.json +1 -0
  55. package/.turbo/cache/bc24a38aa1b1a102-meta.json +1 -0
  56. package/.turbo/cache/be0b95293ea517cc-meta.json +1 -1
  57. package/.turbo/cache/c3a4f7a3565d6706-meta.json +1 -0
  58. package/.turbo/cache/c3a4f7a3565d6706.tar.zst +0 -0
  59. package/.turbo/cache/c44efc9e4ddd8a0e-meta.json +1 -1
  60. package/.turbo/cache/c6c6411199b68170-meta.json +1 -1
  61. package/.turbo/cache/c97b043e748e3580-meta.json +1 -0
  62. package/.turbo/cache/d5db503b2eaf239c-meta.json +1 -1
  63. package/.turbo/cache/d775555355d6b8fc-meta.json +1 -1
  64. package/.turbo/cache/d7c3007be148d2a1-meta.json +1 -1
  65. package/.turbo/cache/dad3d78b33edd9e4-meta.json +1 -1
  66. package/.turbo/cache/dc597b3ea4f61ec8-meta.json +1 -0
  67. package/.turbo/cache/dc597b3ea4f61ec8.tar.zst +0 -0
  68. package/.turbo/cache/df40b180126e5351-meta.json +1 -0
  69. package/.turbo/cache/df40b180126e5351.tar.zst +0 -0
  70. package/.turbo/cache/e5f217f77c32c93b-meta.json +1 -0
  71. package/.turbo/cache/{c2b51643f886a493.tar.zst → e5f217f77c32c93b.tar.zst} +0 -0
  72. package/.turbo/cache/e62cfee068e3ef36-meta.json +1 -1
  73. package/.turbo/cache/e9e36823f6c98f07-meta.json +1 -1
  74. package/.turbo/cache/ee1a3c1fe389da51-meta.json +1 -0
  75. package/.turbo/cache/f3c7b40f2c6a4094-meta.json +1 -0
  76. package/.turbo/cache/{b22ca87b2f7f9cc2.tar.zst → f3c7b40f2c6a4094.tar.zst} +0 -0
  77. package/.turbo/cache/f5958c3acb889631-meta.json +1 -0
  78. package/.turbo/cache/fb3809ac3f90e3b2-meta.json +1 -0
  79. package/.turbo/cache/{eb1dbe885532c1dc.tar.zst → fb3809ac3f90e3b2.tar.zst} +0 -0
  80. package/.turbo/cache/fd5ddfa43ebd8e5c-meta.json +1 -0
  81. package/.turbo/cache/fd5ddfa43ebd8e5c.tar.zst +0 -0
  82. package/CHANGELOG.md +13 -0
  83. package/components/checkbox/.turbo/turbo-build.log +3 -3
  84. package/components/checkbox/.turbo/turbo-bundler.log +3 -3
  85. package/components/checkbox/README.md +1 -1
  86. package/components/combobox/.turbo/turbo-build.log +3 -3
  87. package/components/combobox/README.md +4 -4
  88. package/components/combobox/demo/api.md +9 -9
  89. package/components/combobox/demo/api.min.js +2508 -642
  90. package/components/combobox/demo/index.min.js +2505 -639
  91. package/components/combobox/dist/auro-combobox.d.ts +9 -4
  92. package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
  93. package/components/combobox/dist/index.js +1863 -312
  94. package/components/combobox/src/auro-combobox.js +70 -26
  95. package/components/counter/.turbo/turbo-build.log +3 -3
  96. package/components/counter/.turbo/turbo-bundler.log +3 -3
  97. package/components/counter/README.md +1 -1
  98. package/components/datepicker/.turbo/turbo-build.log +3 -3
  99. package/components/datepicker/README.md +4 -4
  100. package/components/dropdown/.turbo/turbo-build.log +3 -3
  101. package/components/dropdown/.turbo/turbo-bundler.log +2 -2
  102. package/components/dropdown/README.md +1 -1
  103. package/components/form/.turbo/turbo-build.log +3 -3
  104. package/components/form/.turbo/turbo-bundler.log +3 -3
  105. package/components/form/README.md +1 -1
  106. package/components/input/.turbo/turbo-build.log +3 -3
  107. package/components/input/.turbo/turbo-bundler.log +3 -3
  108. package/components/input/README.md +1 -1
  109. package/components/menu/.turbo/turbo-build.log +4 -2
  110. package/components/menu/.turbo/turbo-bundler.log +3 -3
  111. package/components/menu/README.md +1 -1
  112. package/components/menu/demo/api.md +57 -20
  113. package/components/menu/demo/api.min.js +620 -305
  114. package/components/menu/demo/index.min.js +618 -303
  115. package/components/menu/dist/auro-menu-utils.d.ts +43 -0
  116. package/components/menu/dist/auro-menu-utils.d.ts.map +1 -0
  117. package/components/menu/dist/auro-menu.d.ts +97 -81
  118. package/components/menu/dist/auro-menu.d.ts.map +1 -1
  119. package/components/menu/dist/index.d.ts +1 -0
  120. package/components/menu/dist/index.js +619 -304
  121. package/components/menu/src/auro-menu-utils.js +131 -0
  122. package/components/menu/src/auro-menu.js +493 -303
  123. package/components/menu/src/index.js +7 -0
  124. package/components/radio/.turbo/turbo-build.log +3 -3
  125. package/components/radio/.turbo/turbo-bundler.log +3 -3
  126. package/components/radio/README.md +1 -1
  127. package/components/select/.turbo/turbo-build.log +5 -3
  128. package/components/select/README.md +3 -3
  129. package/components/select/demo/api.md +46 -11
  130. package/components/select/demo/api.min.js +2336 -485
  131. package/components/select/demo/index.min.js +2337 -486
  132. package/components/select/dist/auro-select.d.ts +17 -6
  133. package/components/select/dist/auro-select.d.ts.map +1 -1
  134. package/components/select/dist/index.js +1706 -170
  135. package/components/select/src/auro-select.js +53 -24
  136. package/components/select/src/styles/style-css.js +1 -1
  137. package/components/select/src/styles/style.css +7 -0
  138. package/components/select/src/styles/style.scss +13 -0
  139. package/package.json +1 -1
  140. package/.turbo/cache/026e4d886ba97e63-meta.json +0 -1
  141. package/.turbo/cache/026e4d886ba97e63.tar.zst +0 -0
  142. package/.turbo/cache/080ca6155e637d5d-meta.json +0 -1
  143. package/.turbo/cache/0b115e30ff606299-meta.json +0 -1
  144. package/.turbo/cache/0b115e30ff606299.tar.zst +0 -0
  145. package/.turbo/cache/1c630fb3411e4a41-meta.json +0 -1
  146. package/.turbo/cache/24b19ac5895e5dd6-meta.json +0 -1
  147. package/.turbo/cache/24b19ac5895e5dd6.tar.zst +0 -0
  148. package/.turbo/cache/29b72c73cbccb53d-meta.json +0 -1
  149. package/.turbo/cache/29b72c73cbccb53d.tar.zst +0 -0
  150. package/.turbo/cache/3e647c5863d32e6f-meta.json +0 -1
  151. package/.turbo/cache/3e647c5863d32e6f.tar.zst +0 -0
  152. package/.turbo/cache/43f5206cc4e69b44-meta.json +0 -1
  153. package/.turbo/cache/4a85ec226b585fd5-meta.json +0 -1
  154. package/.turbo/cache/50a29c70b93c57dd-meta.json +0 -1
  155. package/.turbo/cache/50a29c70b93c57dd.tar.zst +0 -0
  156. package/.turbo/cache/56455145cd768755-meta.json +0 -1
  157. package/.turbo/cache/56455145cd768755.tar.zst +0 -0
  158. package/.turbo/cache/5c06332cf9f132da-meta.json +0 -1
  159. package/.turbo/cache/5e613afc6868d0e2-meta.json +0 -1
  160. package/.turbo/cache/5e613afc6868d0e2.tar.zst +0 -0
  161. package/.turbo/cache/639dac15b979bedc-meta.json +0 -1
  162. package/.turbo/cache/664c2e08614fd212-meta.json +0 -1
  163. package/.turbo/cache/6c51b0ebfc086faa-meta.json +0 -1
  164. package/.turbo/cache/6c51b0ebfc086faa.tar.zst +0 -0
  165. package/.turbo/cache/7216d994164825fb-meta.json +0 -1
  166. package/.turbo/cache/7216d994164825fb.tar.zst +0 -0
  167. package/.turbo/cache/83a167e135cb431a-meta.json +0 -1
  168. package/.turbo/cache/83a167e135cb431a.tar.zst +0 -0
  169. package/.turbo/cache/8af27c076dc010c3-meta.json +0 -1
  170. package/.turbo/cache/953c8216249d3509-meta.json +0 -1
  171. package/.turbo/cache/95a5e76ffd8c5110-meta.json +0 -1
  172. package/.turbo/cache/95a5e76ffd8c5110.tar.zst +0 -0
  173. package/.turbo/cache/a8b0fa0a9aa707c5-meta.json +0 -1
  174. package/.turbo/cache/a8b0fa0a9aa707c5.tar.zst +0 -0
  175. package/.turbo/cache/b22ca87b2f7f9cc2-meta.json +0 -1
  176. package/.turbo/cache/b7bbe2e7d44b77f0-meta.json +0 -1
  177. package/.turbo/cache/b7bbe2e7d44b77f0.tar.zst +0 -0
  178. package/.turbo/cache/c2b51643f886a493-meta.json +0 -1
  179. package/.turbo/cache/c74d369a0475b124-meta.json +0 -1
  180. package/.turbo/cache/c7f5a276ddb73cf7-meta.json +0 -1
  181. package/.turbo/cache/c96933d40404e4c8-meta.json +0 -1
  182. package/.turbo/cache/c96933d40404e4c8.tar.zst +0 -0
  183. package/.turbo/cache/eb1dbe885532c1dc-meta.json +0 -1
  184. package/.turbo/cache/f1f6744948f1b18f-meta.json +0 -1
  185. package/.turbo/cache/f1f6744948f1b18f.tar.zst +0 -0
  186. package/.turbo/cache/feefbc25d550c1cd-meta.json +0 -1
  187. package/.turbo/cache/ff4dbfffc29255ab-meta.json +0 -1
  188. /package/.turbo/cache/{639dac15b979bedc.tar.zst → 2a5295c8f561ed84.tar.zst} +0 -0
  189. /package/.turbo/cache/{1c630fb3411e4a41.tar.zst → 8602fc2bb737a5cf.tar.zst} +0 -0
  190. /package/.turbo/cache/{664c2e08614fd212.tar.zst → 94dae2a64e9d8356.tar.zst} +0 -0
  191. /package/.turbo/cache/{c7f5a276ddb73cf7.tar.zst → afbbd49ed1a558b9.tar.zst} +0 -0
  192. /package/.turbo/cache/{43f5206cc4e69b44.tar.zst → b353ce8f6da43dea.tar.zst} +0 -0
  193. /package/.turbo/cache/{c74d369a0475b124.tar.zst → b8db059a9b9ccb5d.tar.zst} +0 -0
  194. /package/.turbo/cache/{4a85ec226b585fd5.tar.zst → bc24a38aa1b1a102.tar.zst} +0 -0
  195. /package/.turbo/cache/{5c06332cf9f132da.tar.zst → c97b043e748e3580.tar.zst} +0 -0
  196. /package/.turbo/cache/{953c8216249d3509.tar.zst → ee1a3c1fe389da51.tar.zst} +0 -0
  197. /package/.turbo/cache/{feefbc25d550c1cd.tar.zst → f5958c3acb889631.tar.zst} +0 -0
@@ -19,6 +19,11 @@ import dropdownVersion from './formkit/auro-dropdownVersion.js';
19
19
  import { AuroInput } from '@aurodesignsystem/auro-input';
20
20
  import inputVersion from './formkit/auro-inputVersion.js';
21
21
 
22
+ import {
23
+ arrayConverter,
24
+ arrayOrUndefinedHasChanged
25
+ } from '@aurodesignsystem/auro-menu';
26
+
22
27
  // Import touch detection lib
23
28
  import styleCss from "./styles/style-css.js";
24
29
 
@@ -52,8 +57,8 @@ export class AuroCombobox extends LitElement {
52
57
 
53
58
  this.noFilter = false;
54
59
  this.validity = undefined;
55
- this.value = null;
56
- this.optionSelected = null;
60
+ this.value = undefined;
61
+ this.optionSelected = undefined;
57
62
 
58
63
  this.privateDefaults();
59
64
 
@@ -121,7 +126,11 @@ export class AuroCombobox extends LitElement {
121
126
  type: Boolean,
122
127
  reflect: true
123
128
  },
124
- optionSelected: { type: Object },
129
+ optionSelected: {
130
+ type: Object,
131
+ converter: arrayConverter,
132
+ hasChanged: arrayOrUndefinedHasChanged
133
+ },
125
134
  noValidate: { type: Boolean },
126
135
  required: {
127
136
  type: Boolean,
@@ -136,7 +145,8 @@ export class AuroCombobox extends LitElement {
136
145
  reflect: true
137
146
  },
138
147
  value: {
139
- type: String
148
+ converter: arrayConverter,
149
+ hasChanged: arrayOrUndefinedHasChanged
140
150
  },
141
151
  checkmark: {
142
152
  type: Boolean,
@@ -205,6 +215,33 @@ export class AuroCombobox extends LitElement {
205
215
  this.generateOptionsArray();
206
216
  this.availableOptions = [];
207
217
 
218
+ if (this.menu.optionSelected) {
219
+ // Get first option since combobox is single-select
220
+ const [selected] = this.menu.optionSelected;
221
+
222
+ if (!this.optionSelected || this.optionSelected[0] !== selected) {
223
+ // Store as array
224
+ this.optionSelected = [selected];
225
+ }
226
+
227
+ if (!this.value || this.value[0] !== selected.value) {
228
+ // Store as array
229
+ this.value = [selected.value];
230
+ // Menu already expects array
231
+ this.menu.value = this.value;
232
+ }
233
+
234
+ if (this.input.value !== selected.textContent) {
235
+ this.input.value = selected.textContent;
236
+ }
237
+
238
+ if (this.menu.matchWord !== this.input.value) {
239
+ this.menu.matchWord = this.input.value;
240
+ }
241
+
242
+ this.classList.add('combobox-filled');
243
+ }
244
+
208
245
  if (this.noFilter) {
209
246
  this.availableOptions = [...this.options];
210
247
  } else {
@@ -346,12 +383,15 @@ export class AuroCombobox extends LitElement {
346
383
  // handle the menu event for an option selection
347
384
  this.menu.addEventListener('auroMenu-selectedOption', () => {
348
385
  if (this.menu.optionSelected) {
349
- if (this.optionSelected !== this.menu.optionSelected) {
350
- this.optionSelected = this.menu.optionSelected;
386
+ const [selected] = this.menu.optionSelected;
387
+
388
+ if (!this.optionSelected || this.optionSelected[0] !== selected) {
389
+ this.optionSelected = [selected];
351
390
  }
352
391
 
353
- if (this.value !== this.optionSelected.value) {
354
- this.value = this.optionSelected.value;
392
+ if (!this.value || this.value[0] !== this.optionSelected[0].value) {
393
+ this.value = [this.optionSelected[0].value];
394
+ this.menu.value = this.value;
355
395
  }
356
396
 
357
397
  if (this.input.value !== this.optionSelected.textContent) {
@@ -387,7 +427,7 @@ export class AuroCombobox extends LitElement {
387
427
  });
388
428
 
389
429
  this.menu.addEventListener('auroMenu-selectValueFailure', () => {
390
- this.optionSelected = undefined;
430
+ this.menu.clearSelection();
391
431
  });
392
432
 
393
433
  this.menu.addEventListener('auroMenu-selectValueReset', () => {
@@ -415,8 +455,9 @@ export class AuroCombobox extends LitElement {
415
455
  this.validation.validate(this);
416
456
  }
417
457
 
418
- if (typeof this.value === 'object') {
419
- this.value = '';
458
+ // Set to undefined if empty
459
+ if (this.value && this.value.length === 0) {
460
+ this.value = undefined;
420
461
  }
421
462
  });
422
463
 
@@ -459,10 +500,10 @@ export class AuroCombobox extends LitElement {
459
500
 
460
501
  let hasChange = false;
461
502
 
462
- if (this.value !== this.input.value) {
463
- this.value = this.input.value;
503
+ // Store value as array or undefined
504
+ if (!this.value || this.value[0] !== this.input.value) {
505
+ this.value = this.input.value ? [this.input.value] : undefined;
464
506
  hasChange = true;
465
-
466
507
  this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
467
508
  bubbles: true,
468
509
  cancelable: false,
@@ -484,23 +525,23 @@ export class AuroCombobox extends LitElement {
484
525
  return;
485
526
  }
486
527
 
487
- this.menu.resetOptionsStates();
528
+ this.menu.clearSelection();
488
529
  this.handleMenuOptions();
489
530
 
490
- // validate if the value was set programmatically
531
+ // Validate only if the value was set programmatically
491
532
  if (document.activeElement !== this) {
492
533
  this.validation.validate(this);
493
534
  }
494
535
 
495
- // hide the menu if the value is empty otherwise show if there are available suggestions
536
+ // Hide menu if value is empty, otherwise show if there are available suggestions
496
537
  if (this.input.value && this.input.value.length === 0) {
497
538
  this.hideBib();
498
539
  this.classList.remove('combobox-filled');
499
540
  } else if (!this.dropdown.isPopoverVisible && this.availableOptions) {
500
541
  const hasFocus = this.contains(document.activeElement);
501
542
 
502
- // if the focus is within the combobox, then show the bib
503
- // this will prevent the bib from being shown while loading & presetting the value
543
+ // If focus is within the combobox, show bib
544
+ // Prevent bib from being shown while loading & presetting the value
504
545
  if (hasFocus) {
505
546
  this.showBib();
506
547
  }
@@ -508,7 +549,7 @@ export class AuroCombobox extends LitElement {
508
549
  this.classList.add('combobox-filled');
509
550
  }
510
551
 
511
- // force the dropdown bib to hide if the input value has no matching suggestions
552
+ // Force dropdown bib to hide if input value has no matching suggestions
512
553
  if (!this.availableOptions || this.availableOptions.length === 0) {
513
554
  this.hideBib();
514
555
  }
@@ -548,11 +589,11 @@ export class AuroCombobox extends LitElement {
548
589
 
549
590
  if (this.dropdown.isPopoverVisible) {
550
591
  if (evt.key === 'ArrowUp') {
551
- this.menu.selectNextItem('up');
592
+ this.menu.navigateOptions('up');
552
593
  }
553
594
 
554
595
  if (evt.key === 'ArrowDown') {
555
- this.menu.selectNextItem('down');
596
+ this.menu.navigateOptions('down');
556
597
  }
557
598
  }
558
599
  });
@@ -611,20 +652,23 @@ export class AuroCombobox extends LitElement {
611
652
  reset() {
612
653
  this.input.reset();
613
654
  this.validation.reset(this);
655
+ this.menu.value = undefined;
614
656
  }
615
657
 
616
658
  updated(changedProperties) {
617
659
  // After the component is ready, send direct value changes to auro-menu.
618
660
  if (changedProperties.has('value')) {
619
661
  if (this.value) {
620
- if (this.optionSelected && this.optionSelected.value === this.value) {
662
+ if (this.optionSelected && this.optionSelected[0] && this.optionSelected[0].value === this.value[0]) {
621
663
  // If value updates and the previously selected option already matches the new value
622
664
  // just update the input value to use the textContent of the optionSelected
623
- this.input.value = this.optionSelected.textContent;
665
+ this.input.value = this.optionSelected[0].textContent;
624
666
  } else {
625
667
  // Otherwise just enter the value into the input
626
668
  this.optionSelected = undefined;
627
- this.input.value = this.value;
669
+ // Use first value since combobox is single-select
670
+ const [inputValue] = this.value;
671
+ this.input.value = inputValue;
628
672
 
629
673
  // If the value got set programmatically make sure we hide the bib
630
674
  if (!this.contains(document.activeElement)) {
@@ -646,7 +690,7 @@ export class AuroCombobox extends LitElement {
646
690
  /**
647
691
  * Watch for slot changes and recalculate the menuoptions.
648
692
  * @private
649
- * @param {Event} event - slotchange event
693
+ * @param {Event} event - `slotchange` event.
650
694
  * @returns {void}
651
695
  */
652
696
  handleSlotChange(event) {
@@ -302,13 +302,13 @@ Complete!
302
302
 
303
303
  
304
304
  ./src/index.js → dist...
305
- created dist in 1.2s
305
+ created dist in 1.1s
306
306
  
307
307
  ./demo/index.js → ./demo/...
308
- created ./demo/ in 826ms
308
+ created ./demo/ in 1.3s
309
309
  
310
310
  ./demo/api.js → ./demo/...
311
- created ./demo/ in 466ms
311
+ created ./demo/ in 712ms
312
312
 
313
313
  > @aurodesignsystem/auro-counter@1.0.0 build:docs
314
314
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component counter
@@ -4,10 +4,10 @@
4
4
 
5
5
  
6
6
  ./src/index.js → dist...
7
- created dist in 927ms
7
+ created dist in 1.1s
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 541ms
10
+ created ./demo/ in 882ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 604ms
13
+ created ./demo/ in 651ms
@@ -100,7 +100,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
100
100
  <!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
101
101
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
102
102
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
103
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-counter@2.0.0-beta.9/dist/auro-counter__bundled.js" type="module"></script>
103
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-counter@2.0.0-beta.10/dist/auro-counter__bundled.js" type="module"></script>
104
104
  <!-- AURO-GENERATED-CONTENT:END -->
105
105
 
106
106
  ## auro-counter use cases
@@ -373,13 +373,13 @@ More info and automated migrator: https://sass-lang.com/d/import
373
373
 
374
374
  
375
375
  ./src/index.js → dist...
376
- created dist in 7.4s
376
+ created dist in 7.2s
377
377
  
378
378
  ./demo/index.js → ./demo/...
379
- created ./demo/ in 3.7s
379
+ created ./demo/ in 3.6s
380
380
  
381
381
  ./demo/api.js → ./demo/...
382
- created ./demo/ in 3.4s
382
+ created ./demo/ in 3.3s
383
383
 
384
384
  > @aurodesignsystem/auro-datepicker@3.2.0 build:docs
385
385
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component datepicker
@@ -93,10 +93,10 @@ In cases where the project is not able to process JS assets, there are pre-proce
93
93
  <!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
94
94
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
95
95
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
96
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.9/dist/auro-dropdown__bundled.js" type="module"></script>
97
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-input@2.0.0-beta.9/dist/auro-input__bundled.js" type="module"></script>
98
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-popover@2.0.0-beta.9/dist/auro-popover__bundled.js" type="module"></script>
99
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-datepicker@2.0.0-beta.9/dist/auro-datepicker__bundled.js" type="module"></script>
96
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.10/dist/auro-dropdown__bundled.js" type="module"></script>
97
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-input@2.0.0-beta.10/dist/auro-input__bundled.js" type="module"></script>
98
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-popover@2.0.0-beta.10/dist/auro-popover__bundled.js" type="module"></script>
99
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-datepicker@2.0.0-beta.10/dist/auro-datepicker__bundled.js" type="module"></script>
100
100
  <!-- AURO-GENERATED-CONTENT:END -->
101
101
 
102
102
  ## auro-datepicker use cases
@@ -90,13 +90,13 @@ More info and automated migrator: https://sass-lang.com/d/import
90
90
 
91
91
  
92
92
  ./src/index.js → dist...
93
- created dist in 1.6s
93
+ created dist in 1.1s
94
94
  
95
95
  ./demo/index.js → ./demo/...
96
- created ./demo/ in 1.2s
96
+ created ./demo/ in 937ms
97
97
  
98
98
  ./demo/api.js → ./demo/...
99
- created ./demo/ in 947ms
99
+ created ./demo/ in 741ms
100
100
 
101
101
  > @aurodesignsystem/auro-dropdown@3.0.0 build:docs
102
102
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component dropdown
@@ -7,7 +7,7 @@
7
7
  created dist in 1.4s
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 848ms
10
+ created ./demo/ in 843ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 808ms
13
+ created ./demo/ in 821ms
@@ -97,7 +97,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
97
97
  <!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
98
98
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.9.2/dist/tokens/CSSCustomProperties.css" />
99
99
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
100
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.9/dist/auro-dropdown__bundled.js" type="module"></script>
100
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.10/dist/auro-dropdown__bundled.js" type="module"></script>
101
101
  <!-- AURO-GENERATED-CONTENT:END -->
102
102
 
103
103
  ## auro-dropdown use cases
@@ -69,13 +69,13 @@ Run in verbose mode to see all warnings.
69
69
 
70
70
  
71
71
  ./src/index.js → dist...
72
- created dist in 369ms
72
+ created dist in 592ms
73
73
  
74
74
  ./demo/index.js → ./demo/...
75
- created ./demo/ in 279ms
75
+ created ./demo/ in 282ms
76
76
  
77
77
  ./demo/api.js → ./demo/...
78
- created ./demo/ in 225ms
78
+ created ./demo/ in 218ms
79
79
 
80
80
  > @aurodesignsystem/auro-form@1.0.0 build:docs
81
81
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component form
@@ -4,10 +4,10 @@
4
4
 
5
5
  
6
6
  ./src/index.js → dist...
7
- created dist in 440ms
7
+ created dist in 435ms
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 258ms
10
+ created ./demo/ in 400ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 250ms
13
+ created ./demo/ in 377ms
@@ -97,7 +97,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
97
97
  <!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
98
98
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
99
99
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
100
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-form@2.0.0-beta.9/dist/auro-form__bundled.js" type="module"></script>
100
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-form@2.0.0-beta.10/dist/auro-form__bundled.js" type="module"></script>
101
101
  <!-- AURO-GENERATED-CONTENT:END -->
102
102
 
103
103
  ## auro-form use cases
@@ -216,13 +216,13 @@ More info and automated migrator: https://sass-lang.com/d/import
216
216
 
217
217
  
218
218
  ./src/index.js → dist...
219
- created dist in 1.1s
219
+ created dist in 1.4s
220
220
  
221
221
  ./demo/index.js → ./demo/...
222
- created ./demo/ in 966ms
222
+ created ./demo/ in 1.2s
223
223
  
224
224
  ./demo/api.js → ./demo/...
225
- created ./demo/ in 1.1s
225
+ created ./demo/ in 1.5s
226
226
 
227
227
  > @aurodesignsystem/auro-input@4.2.0 build:docs
228
228
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component input
@@ -4,10 +4,10 @@
4
4
 
5
5
  
6
6
  ./src/index.js → dist...
7
- created dist in 1.3s
7
+ created dist in 1.4s
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 952ms
10
+ created ./demo/ in 1s
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 1s
13
+ created ./demo/ in 773ms
@@ -89,7 +89,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
89
89
  <!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
90
90
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
91
91
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
92
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-input@2.0.0-beta.9/dist/auro-input__bundled.js" type="module"></script>
92
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-input@2.0.0-beta.10/dist/auro-input__bundled.js" type="module"></script>
93
93
  <!-- AURO-GENERATED-CONTENT:END -->
94
94
 
95
95
  ## auro-input use cases
@@ -104,10 +104,10 @@ More info and automated migrator: https://sass-lang.com/d/import
104
104
  created dist in 1s
105
105
  
106
106
  ./demo/index.js → ./demo/...
107
- created ./demo/ in 654ms
107
+ created ./demo/ in 565ms
108
108
  
109
109
  ./demo/api.js → ./demo/...
110
- created ./demo/ in 627ms
110
+ created ./demo/ in 657ms
111
111
 
112
112
  > @aurodesignsystem/auro-menu@4.1.4 build:docs
113
113
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component menu
@@ -149,6 +149,7 @@ Web Component Analyzer analyzing 2 files...
149
149
  ⁕ FILE:src=./../apiExamples/nocheckmark.html
150
150
  ⁕ FILE:src=./../apiExamples/disabledMenu.html
151
151
  ⁕ FILE:src=./../apiExamples/matchWord.html
152
+ ⁕ FILE:src=./../apiExamples/multiSelect.html
152
153
  ⁕ FILE:src=./../apiExamples/loading.html
153
154
  ⁕ FILE:src=./../apiExamples/scroll.html
154
155
  ⁕ FILE:src=./../apiExamples/hr.html
@@ -163,6 +164,7 @@ Web Component Analyzer analyzing 2 files...
163
164
  ⁕ CODE:src=./../apiExamples/disabledMenu.html
164
165
  ⁕ CODE:src=./../apiExamples/matchWord.js
165
166
  ⁕ CODE:src=./../apiExamples/matchWord.html
167
+ ⁕ CODE:src=./../apiExamples/multiSelect.html
166
168
  ⁕ CODE:src=./../apiExamples/loading.js
167
169
  ⁕ CODE:src=./../apiExamples/loading.html
168
170
  ⁕ CODE:src=./../apiExamples/scroll.html
@@ -4,10 +4,10 @@
4
4
 
5
5
  
6
6
  ./src/index.js → dist...
7
- created dist in 1.1s
7
+ created dist in 954ms
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 791ms
10
+ created ./demo/ in 742ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 648ms
13
+ created ./demo/ in 761ms
@@ -100,7 +100,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
100
100
  <!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
101
101
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
102
102
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
103
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.9/dist/auro-menu__bundled.js" type="module"></script>
103
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.10/dist/auro-menu__bundled.js" type="module"></script>
104
104
  <!-- AURO-GENERATED-CONTENT:END -->
105
105
 
106
106
  ## auro-menu use cases
@@ -5,26 +5,31 @@
5
5
 
6
6
  The auro-menu element provides users a way to select from a list of options.
7
7
 
8
+ ## Attributes
9
+
10
+ | Attribute | Type | Description |
11
+ |------------------|---------------------------------|--------------------------------------------------|
12
+ | [optionselected](#optionselected) | `Array<HTMLElement>\|undefined` | An array of currently selected menu options. In single-select mode, the array will contain only one HTMLElement. `undefined` when no options are selected. |
13
+
8
14
  ## Properties
9
15
 
10
- | Property | Attribute | Type | Default | Description |
11
- |-------------------------|------------------|-----------|-------------|--------------------------------------------------|
12
- | [disabled](#disabled) | `disabled` | `Boolean` | | When true, the entire menu and all options are disabled; |
13
- | [hasLoadingPlaceholder](#hasLoadingPlaceholder) | | `Boolean` | | Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state. |
14
- | [loading](#loading) | `loading` | `Boolean` | false | When true, displays a loading state using the loadingIcon and loadingText slots if provided. |
15
- | [matchWord](#matchWord) | `matchWord` | `String` | "undefined" | Specifies a string used to highlight matched string parts in options. |
16
- | [noCheckmark](#noCheckmark) | `noCheckmark` | `Boolean` | false | When true, selected option will not show the checkmark. |
17
- | [optionActive](#optionActive) | `optionActive` | `object` | "undefined" | |
18
- | [optionSelected](#optionSelected) | `optionSelected` | `Object` | "undefined" | Specifies the current selected menuOption. |
19
- | [value](#value) | `value` | `String` | "undefined" | Value selected for the menu. |
16
+ | Property | Attribute | Type | Default | Description |
17
+ |-------------------------|------------------|----------------------------|-------------|--------------------------------------------------|
18
+ | [disabled](#disabled) | `disabled` | `boolean` | | When true, the entire menu and all options are disabled; |
19
+ | [hasLoadingPlaceholder](#hasLoadingPlaceholder) | | `boolean` | | Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state. |
20
+ | [loading](#loading) | `loading` | `boolean` | false | When true, displays a loading state using the loadingIcon and loadingText slots if provided. |
21
+ | [matchWord](#matchWord) | `matchword` | `string` | "undefined" | Specifies a string used to highlight matched string parts in options. |
22
+ | [multiSelect](#multiSelect) | `multiselect` | `boolean` | false | When true, the selected option can be multiple options. |
23
+ | [noCheckmark](#noCheckmark) | `nocheckmark` | `boolean` | false | When true, selected option will not show the checkmark. |
24
+ | [optionActive](#optionActive) | `optionactive` | `object` | "undefined" | Specifies the current active menuOption. |
25
+ | [optionSelected](#optionSelected) | `optionSelected` | | "undefined" | |
26
+ | [value](#value) | `value` | `Array<string>\|undefined` | "undefined" | Value selected for the menu. `undefined` when no selection has been made, otherwise an array of strings. In single-select mode, the array will contain only one value. |
20
27
 
21
28
  ## Methods
22
29
 
23
- | Method | Type | Description |
24
- |----------------------|---------------------------------|--------------------------------------------------|
25
- | [makeSelection](#makeSelection) | `(): void` | Process actions for making making a menuoption selection. |
26
- | [resetOptionsStates](#resetOptionsStates) | `(): void` | Reset the menu and all options. |
27
- | [selectNextItem](#selectNextItem) | `(moveDirection: string): void` | Using value of current this.index evaluates index<br />of next :focus to set based on array of this.items ignoring items<br />with disabled attr.<br /><br />The event.target is not used as the function needs to know where to go,<br />versus knowing where it is.<br /><br />**moveDirection**: Up or Down based on keyboard event. |
30
+ | Method | Type | Description |
31
+ |---------|------------|--------------------------------------------------|
32
+ | [reset](#reset) | `(): void` | Resets the menu to its initial state.<br />This is the only way to return value to undefined. |
28
33
 
29
34
  ## Events
30
35
 
@@ -33,7 +38,7 @@ The auro-menu element provides users a way to select from a list of options.
33
38
  | `auroMenu-activatedOption` | `CustomEvent<Element>` | Notifies that a menuoption has been made `active`. |
34
39
  | `auroMenu-customEventFired` | `CustomEvent<any>` | Notifies that a custom event has been fired. |
35
40
  | `auroMenu-loadingChange` | `CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>` | Notifies when the loading attribute is changed. |
36
- | `auroMenu-selectValueFailure` | `CustomEvent<any>` | Notifies that a an attempt to select a menuoption by matching a value has failed. |
41
+ | `auroMenu-selectValueFailure` | `CustomEvent<any>` | Notifies that an attempt to select a menuoption by matching a value has failed. |
37
42
  | `auroMenu-selectValueReset` | `CustomEvent<any>` | Notifies that the component value has been reset. |
38
43
  | `auroMenu-selectedOption` | `CustomEvent<any>` | Notifies that a new menuoption selection has been made. |
39
44
 
@@ -308,6 +313,38 @@ export function auroMenuMatchWordExample() {
308
313
  <!-- AURO-GENERATED-CONTENT:END -->
309
314
  </auro-accordion>
310
315
 
316
+ ### Multi Select<a name="multiSelect"></a>
317
+ The `auro-menu` supports a multi-select option. To use, place the `multiselect` attribute on the `<auro-menu>` element tag. When applied, the `value` attribute will become an Array versus String value.
318
+
319
+ <div class="exampleWrapper">
320
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/multiSelect.html) -->
321
+ <!-- The below content is automatically added from ./../apiExamples/multiSelect.html -->
322
+ <auro-menu multiselect>
323
+ <auro-menuoption value="stops">Stops</auro-menuoption>
324
+ <auro-menuoption value="price">Price</auro-menuoption>
325
+ <auro-menuoption value="duration">Duration</auro-menuoption>
326
+ <auro-menuoption value="departure">Departure</auro-menuoption>
327
+ <auro-menuoption value="arrival">Arrival</auro-menuoption>
328
+ </auro-menu>
329
+ <!-- AURO-GENERATED-CONTENT:END -->
330
+ </div>
331
+ <auro-accordion alignRight>
332
+ <span slot="trigger">See code</span>
333
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/multiSelect.html) -->
334
+ <!-- The below code snippet is automatically added from ./../apiExamples/multiSelect.html -->
335
+
336
+ ```html
337
+ <auro-menu multiselect>
338
+ <auro-menuoption value="stops">Stops</auro-menuoption>
339
+ <auro-menuoption value="price">Price</auro-menuoption>
340
+ <auro-menuoption value="duration">Duration</auro-menuoption>
341
+ <auro-menuoption value="departure">Departure</auro-menuoption>
342
+ <auro-menuoption value="arrival">Arrival</auro-menuoption>
343
+ </auro-menu>
344
+ ```
345
+ <!-- AURO-GENERATED-CONTENT:END -->
346
+ </auro-accordion>
347
+
311
348
  #### Loading<a name="loading"></a>
312
349
  While content is loading, the menu can either remain empty or display a loading placeholder
313
350
 
@@ -874,12 +911,12 @@ The `auro-menu` may be reset to a state with no menuoption selected by setting t
874
911
  ```js
875
912
  export function auroMenuResetExample() {
876
913
  const resetExampleBtnElem = document.querySelector('#resetExampleBtn');
877
- const resetExampleElem = document.querySelector('#resetExample');
878
-
914
+ const resetExampleElem = document.querySelector('#resetExample');
915
+
879
916
  if (resetExampleElem && resetExampleBtnElem) {
880
917
  resetExampleBtnElem.addEventListener('click', () => {
881
- resetExampleElem.value = undefined;
882
- })
918
+ resetExampleElem.reset();
919
+ });
883
920
  }
884
921
  }
885
922
  ```