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

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 (198) hide show
  1. package/.turbo/cache/0c8124a987c1cc05-meta.json +1 -1
  2. package/.turbo/cache/0cd512cdf86242c7-meta.json +1 -0
  3. package/.turbo/cache/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/2787020e69f50af2-meta.json +1 -1
  8. package/.turbo/cache/2a5295c8f561ed84-meta.json +1 -0
  9. package/.turbo/cache/2c0d681132c153dd-meta.json +1 -1
  10. package/.turbo/cache/4006a206400d5c7b-meta.json +1 -1
  11. package/.turbo/cache/492dda333b8d15f1-meta.json +1 -1
  12. package/.turbo/cache/4e3619d9dfc86809-meta.json +1 -0
  13. package/.turbo/cache/4e3619d9dfc86809.tar.zst +0 -0
  14. package/.turbo/cache/50993de942ec15a9-meta.json +1 -1
  15. package/.turbo/cache/50cd7dcfc9f820c5-meta.json +1 -0
  16. package/.turbo/cache/50cd7dcfc9f820c5.tar.zst +0 -0
  17. package/.turbo/cache/51eaa58d5c167de8-meta.json +1 -1
  18. package/.turbo/cache/5a0d3e26da304c62-meta.json +1 -0
  19. package/.turbo/cache/5a0d3e26da304c62.tar.zst +0 -0
  20. package/.turbo/cache/5c960af698582835-meta.json +1 -0
  21. package/.turbo/cache/5c960af698582835.tar.zst +0 -0
  22. package/.turbo/cache/5dbbb71dffc3f542-meta.json +1 -0
  23. package/.turbo/cache/5dbbb71dffc3f542.tar.zst +0 -0
  24. package/.turbo/cache/6081837e8943b62e-meta.json +1 -1
  25. package/.turbo/cache/60ad74320c682a2b-meta.json +1 -1
  26. package/.turbo/cache/61e218aba69cff58-meta.json +1 -1
  27. package/.turbo/cache/77da375a012de9d0-meta.json +1 -1
  28. package/.turbo/cache/7964d1656e9e702a-meta.json +1 -0
  29. package/.turbo/cache/7964d1656e9e702a.tar.zst +0 -0
  30. package/.turbo/cache/7bf2b06a479d0b30-meta.json +1 -1
  31. package/.turbo/cache/7c9ca6163e61285c-meta.json +1 -1
  32. package/.turbo/cache/80aca269cd346fb4-meta.json +1 -0
  33. package/.turbo/cache/80aca269cd346fb4.tar.zst +0 -0
  34. package/.turbo/cache/8602fc2bb737a5cf-meta.json +1 -0
  35. package/.turbo/cache/89e0e7a6148e854f-meta.json +1 -0
  36. package/.turbo/cache/{83a167e135cb431a.tar.zst → 89e0e7a6148e854f.tar.zst} +0 -0
  37. package/.turbo/cache/8bb856bd31b5b479-meta.json +1 -1
  38. package/.turbo/cache/93c887fb93a10daa-meta.json +1 -0
  39. package/.turbo/cache/93c887fb93a10daa.tar.zst +0 -0
  40. package/.turbo/cache/94dae2a64e9d8356-meta.json +1 -0
  41. package/.turbo/cache/97f6fe83b54acf09-meta.json +1 -0
  42. package/.turbo/cache/97f6fe83b54acf09.tar.zst +0 -0
  43. package/.turbo/cache/98317b0d14d94df7-meta.json +1 -0
  44. package/.turbo/cache/98317b0d14d94df7.tar.zst +0 -0
  45. package/.turbo/cache/98fc8a56e3e13790-meta.json +1 -0
  46. package/.turbo/cache/98fc8a56e3e13790.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/{50a29c70b93c57dd.tar.zst → df40b180126e5351.tar.zst} +0 -0
  70. package/.turbo/cache/e5f217f77c32c93b-meta.json +1 -0
  71. package/.turbo/cache/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 +25 -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 +22 -21
  89. package/components/combobox/demo/api.min.js +2532 -655
  90. package/components/combobox/demo/index.min.js +2529 -652
  91. package/components/combobox/dist/auro-combobox.d.ts +70 -80
  92. package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
  93. package/components/combobox/dist/index.js +1836 -274
  94. package/components/combobox/src/auro-combobox.js +156 -101
  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 +3 -3
  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 +5 -3
  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/080ca6155e637d5d.tar.zst +0 -0
  144. package/.turbo/cache/0b115e30ff606299-meta.json +0 -1
  145. package/.turbo/cache/0b115e30ff606299.tar.zst +0 -0
  146. package/.turbo/cache/1c630fb3411e4a41-meta.json +0 -1
  147. package/.turbo/cache/24b19ac5895e5dd6-meta.json +0 -1
  148. package/.turbo/cache/24b19ac5895e5dd6.tar.zst +0 -0
  149. package/.turbo/cache/29b72c73cbccb53d-meta.json +0 -1
  150. package/.turbo/cache/29b72c73cbccb53d.tar.zst +0 -0
  151. package/.turbo/cache/3e647c5863d32e6f-meta.json +0 -1
  152. package/.turbo/cache/3e647c5863d32e6f.tar.zst +0 -0
  153. package/.turbo/cache/43f5206cc4e69b44-meta.json +0 -1
  154. package/.turbo/cache/4a85ec226b585fd5-meta.json +0 -1
  155. package/.turbo/cache/50a29c70b93c57dd-meta.json +0 -1
  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/8af27c076dc010c3-meta.json +0 -1
  169. package/.turbo/cache/953c8216249d3509-meta.json +0 -1
  170. package/.turbo/cache/95a5e76ffd8c5110-meta.json +0 -1
  171. package/.turbo/cache/95a5e76ffd8c5110.tar.zst +0 -0
  172. package/.turbo/cache/a8b0fa0a9aa707c5-meta.json +0 -1
  173. package/.turbo/cache/a8b0fa0a9aa707c5.tar.zst +0 -0
  174. package/.turbo/cache/b22ca87b2f7f9cc2-meta.json +0 -1
  175. package/.turbo/cache/b7bbe2e7d44b77f0-meta.json +0 -1
  176. package/.turbo/cache/b7bbe2e7d44b77f0.tar.zst +0 -0
  177. package/.turbo/cache/c2b51643f886a493-meta.json +0 -1
  178. package/.turbo/cache/c2b51643f886a493.tar.zst +0 -0
  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/ff4dbfffc29255ab.tar.zst +0 -0
  189. /package/.turbo/cache/{639dac15b979bedc.tar.zst → 2a5295c8f561ed84.tar.zst} +0 -0
  190. /package/.turbo/cache/{1c630fb3411e4a41.tar.zst → 8602fc2bb737a5cf.tar.zst} +0 -0
  191. /package/.turbo/cache/{664c2e08614fd212.tar.zst → 94dae2a64e9d8356.tar.zst} +0 -0
  192. /package/.turbo/cache/{c7f5a276ddb73cf7.tar.zst → afbbd49ed1a558b9.tar.zst} +0 -0
  193. /package/.turbo/cache/{43f5206cc4e69b44.tar.zst → b353ce8f6da43dea.tar.zst} +0 -0
  194. /package/.turbo/cache/{c74d369a0475b124.tar.zst → b8db059a9b9ccb5d.tar.zst} +0 -0
  195. /package/.turbo/cache/{4a85ec226b585fd5.tar.zst → bc24a38aa1b1a102.tar.zst} +0 -0
  196. /package/.turbo/cache/{5c06332cf9f132da.tar.zst → c97b043e748e3580.tar.zst} +0 -0
  197. /package/.turbo/cache/{953c8216249d3509.tar.zst → ee1a3c1fe389da51.tar.zst} +0 -0
  198. /package/.turbo/cache/{feefbc25d550c1cd.tar.zst → f5958c3acb889631.tar.zst} +0 -0
@@ -19,25 +19,16 @@ 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
 
25
30
  // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
26
31
  /**
27
- * @prop {Object} optionSelected - Specifies the current selected option.
28
- * @prop {String} value - Value selected for the dropdown menu.
29
- * @prop {Boolean} checkmark - When attribute is present auro-menu will apply checkmarks to selected options.
30
- * @attr {String} error - When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
31
- * @attr {String} validity - Specifies the `validityState` this element is in.
32
- * @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
33
- * @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
34
- * @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
35
- * @attr {Boolean} disabled - If set, disables the combobox.
36
- * @attr {Boolean} noFilter - If set, combobox will not filter menuoptions based in input.
37
- * @attr {Boolean} noValidate - If set, disables auto-validation on blur.
38
- * @attr {Boolean} required - Populates the `required` attribute on the input. Used for client-side validation.
39
- * @attr {Boolean} triggerIcon - If set, the `icon` attribute will be applied to the trigger `auro-input` element.
40
- * @attr {String} type - Applies the defined value as the type attribute on auro-input.
41
32
  * @slot - Default slot for the menu content.
42
33
  * @slot label - Defines the content of the label.
43
34
  * @slot helpText - Defines the content of the helpText.
@@ -52,32 +43,10 @@ export class AuroCombobox extends LitElement {
52
43
 
53
44
  this.noFilter = false;
54
45
  this.validity = undefined;
55
- this.value = null;
56
- this.optionSelected = null;
46
+ this.value = undefined;
47
+ this.optionSelected = undefined;
57
48
 
58
49
  this.privateDefaults();
59
-
60
- /**
61
- * @private
62
- */
63
- this.validation = new AuroFormValidation();
64
-
65
- /**
66
- * @private
67
- */
68
- this.runtimeUtils = new AuroLibraryRuntimeUtils();
69
-
70
- /**
71
- * @private
72
- */
73
- this.isHiddenWhileLoading = false;
74
-
75
- /**
76
- * Generate unique names for dependency components.
77
- */
78
- const versioning = new AuroDependencyVersioning();
79
- this.dropdownTag = versioning.generateTag('auro-dropdown', dropdownVersion, AuroDropdown);
80
- this.inputTag = versioning.generateTag('auro-input', inputVersion, AuroInput);
81
50
  }
82
51
 
83
52
  /**
@@ -88,6 +57,17 @@ export class AuroCombobox extends LitElement {
88
57
  this.availableOptions = [];
89
58
  this.optionActive = null;
90
59
  this.msgSelectionMissing = 'Please select an option.';
60
+
61
+ this.validation = new AuroFormValidation();
62
+
63
+ this.runtimeUtils = new AuroLibraryRuntimeUtils();
64
+
65
+ this.isHiddenWhileLoading = false;
66
+
67
+ const versioning = new AuroDependencyVersioning();
68
+
69
+ this.dropdownTag = versioning.generateTag('auro-dropdown', dropdownVersion, AuroDropdown);
70
+ this.inputTag = versioning.generateTag('auro-input', inputVersion, AuroInput);
91
71
  }
92
72
 
93
73
  // This function is to define props used within the scope of this component
@@ -96,87 +76,123 @@ export class AuroCombobox extends LitElement {
96
76
  static get properties() {
97
77
  return {
98
78
  // ...super.properties,
99
- error: {
100
- type: String,
101
- reflect: true
102
- },
103
- setCustomValidity: {
104
- type: String
105
- },
106
- setCustomValidityCustomError: {
107
- type: String
108
- },
109
- setCustomValidityValueMissing: {
110
- type: String
111
- },
112
- validity: {
79
+
80
+ /**
81
+ * An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
82
+ */
83
+ autocomplete: {
113
84
  type: String,
114
85
  reflect: true
115
86
  },
116
- disabled: {
87
+
88
+ /**
89
+ * When attribute is present auro-menu will apply checkmarks to selected options.
90
+ */
91
+ checkmark: {
117
92
  type: Boolean,
118
93
  reflect: true
119
94
  },
120
- noFilter: {
95
+
96
+ /**
97
+ * If set, disables the combobox.
98
+ */
99
+ disabled: {
121
100
  type: Boolean,
122
101
  reflect: true
123
102
  },
124
- optionSelected: { type: Object },
125
- noValidate: { type: Boolean },
126
- required: {
127
- type: Boolean,
103
+
104
+ /**
105
+ * When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
106
+ */
107
+ error: {
108
+ type: String,
128
109
  reflect: true
129
110
  },
130
- triggerIcon: {
111
+
112
+ /**
113
+ * If set, combobox will not filter menuoptions based in input.
114
+ */
115
+ noFilter: {
131
116
  type: Boolean,
132
117
  reflect: true
133
118
  },
134
- type: {
135
- type: String,
136
- reflect: true
119
+
120
+ /**
121
+ * If set, disables auto-validation on blur.
122
+ */
123
+ noValidate: {
124
+ type: Boolean
137
125
  },
138
- value: {
139
- type: String
126
+
127
+ /**
128
+ * Specifies the current selected option.
129
+ */
130
+ optionSelected: {
131
+ type: Object,
132
+ converter: arrayConverter,
133
+ hasChanged: arrayOrUndefinedHasChanged
140
134
  },
141
- checkmark: {
135
+
136
+ /**
137
+ * Populates the `required` attribute on the input. Used for client-side validation.
138
+ */
139
+ required: {
142
140
  type: Boolean,
143
141
  reflect: true
144
142
  },
145
143
 
146
144
  /**
147
- * @private
145
+ * Sets a custom help text message to display for all validityStates.
148
146
  */
149
- availableOptions: { type: Array },
147
+ setCustomValidity: {
148
+ type: String
149
+ },
150
150
 
151
151
  /**
152
- * @private
152
+ * Custom help text message to display when validity = `customError`.
153
153
  */
154
- optionActive: { type: Object },
154
+ setCustomValidityCustomError: {
155
+ type: String
156
+ },
155
157
 
156
158
  /**
157
- * @private
159
+ * Custom help text message to display when validity = `valueMissing`.
158
160
  */
159
- msgSelectionMissing: { type: String },
161
+ setCustomValidityValueMissing: {
162
+ type: String
163
+ },
160
164
 
161
165
  /**
162
- * @private
166
+ * If set, the `icon` attribute will be applied to the trigger `auro-input` element.
163
167
  */
164
- dropdownElementName: { type: String },
168
+ triggerIcon: {
169
+ type: Boolean,
170
+ reflect: true
171
+ },
165
172
 
166
173
  /**
167
- * @private
174
+ * Applies the defined value as the type attribute on auro-input.
168
175
  */
169
- dropdownTag: { type: Object },
176
+ type: {
177
+ type: String,
178
+ reflect: true
179
+ },
170
180
 
171
181
  /**
172
- * @private
182
+ * Specifies the `validityState` this element is in.
173
183
  */
174
- inputElementName: { type: String },
184
+ validity: {
185
+ type: String,
186
+ reflect: true
187
+ },
175
188
 
176
189
  /**
177
- * @private
190
+ * Value selected for the dropdown menu.
178
191
  */
179
- inputTag: { type: Object }
192
+ value: {
193
+ converter: arrayConverter,
194
+ hasChanged: arrayOrUndefinedHasChanged
195
+ },
180
196
  };
181
197
  }
182
198
 
@@ -205,6 +221,33 @@ export class AuroCombobox extends LitElement {
205
221
  this.generateOptionsArray();
206
222
  this.availableOptions = [];
207
223
 
224
+ if (this.menu.optionSelected) {
225
+ // Get first option since combobox is single-select
226
+ const [selected] = this.menu.optionSelected;
227
+
228
+ if (!this.optionSelected || this.optionSelected[0] !== selected) {
229
+ // Store as array
230
+ this.optionSelected = [selected];
231
+ }
232
+
233
+ if (!this.value || this.value[0] !== selected.value) {
234
+ // Store as array
235
+ this.value = [selected.value];
236
+ // Menu already expects array
237
+ this.menu.value = this.value;
238
+ }
239
+
240
+ if (this.input.value !== selected.textContent) {
241
+ this.input.value = selected.textContent;
242
+ }
243
+
244
+ if (this.menu.matchWord !== this.input.value) {
245
+ this.menu.matchWord = this.input.value;
246
+ }
247
+
248
+ this.classList.add('combobox-filled');
249
+ }
250
+
208
251
  if (this.noFilter) {
209
252
  this.availableOptions = [...this.options];
210
253
  } else {
@@ -346,12 +389,15 @@ export class AuroCombobox extends LitElement {
346
389
  // handle the menu event for an option selection
347
390
  this.menu.addEventListener('auroMenu-selectedOption', () => {
348
391
  if (this.menu.optionSelected) {
349
- if (this.optionSelected !== this.menu.optionSelected) {
350
- this.optionSelected = this.menu.optionSelected;
392
+ const [selected] = this.menu.optionSelected;
393
+
394
+ if (!this.optionSelected || this.optionSelected[0] !== selected) {
395
+ this.optionSelected = [selected];
351
396
  }
352
397
 
353
- if (this.value !== this.optionSelected.value) {
354
- this.value = this.optionSelected.value;
398
+ if (!this.value || this.value[0] !== this.optionSelected[0].value) {
399
+ this.value = [this.optionSelected[0].value];
400
+ this.menu.value = this.value;
355
401
  }
356
402
 
357
403
  if (this.input.value !== this.optionSelected.textContent) {
@@ -387,7 +433,7 @@ export class AuroCombobox extends LitElement {
387
433
  });
388
434
 
389
435
  this.menu.addEventListener('auroMenu-selectValueFailure', () => {
390
- this.optionSelected = undefined;
436
+ this.menu.clearSelection();
391
437
  });
392
438
 
393
439
  this.menu.addEventListener('auroMenu-selectValueReset', () => {
@@ -415,8 +461,9 @@ export class AuroCombobox extends LitElement {
415
461
  this.validation.validate(this);
416
462
  }
417
463
 
418
- if (typeof this.value === 'object') {
419
- this.value = '';
464
+ // Set to undefined if empty
465
+ if (this.value && this.value.length === 0) {
466
+ this.value = undefined;
420
467
  }
421
468
  });
422
469
 
@@ -459,10 +506,10 @@ export class AuroCombobox extends LitElement {
459
506
 
460
507
  let hasChange = false;
461
508
 
462
- if (this.value !== this.input.value) {
463
- this.value = this.input.value;
509
+ // Store value as array or undefined
510
+ if (!this.value || this.value[0] !== this.input.value) {
511
+ this.value = this.input.value ? [this.input.value] : undefined;
464
512
  hasChange = true;
465
-
466
513
  this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
467
514
  bubbles: true,
468
515
  cancelable: false,
@@ -484,23 +531,23 @@ export class AuroCombobox extends LitElement {
484
531
  return;
485
532
  }
486
533
 
487
- this.menu.resetOptionsStates();
534
+ this.menu.clearSelection();
488
535
  this.handleMenuOptions();
489
536
 
490
- // validate if the value was set programmatically
537
+ // Validate only if the value was set programmatically
491
538
  if (document.activeElement !== this) {
492
539
  this.validation.validate(this);
493
540
  }
494
541
 
495
- // hide the menu if the value is empty otherwise show if there are available suggestions
542
+ // Hide menu if value is empty, otherwise show if there are available suggestions
496
543
  if (this.input.value && this.input.value.length === 0) {
497
544
  this.hideBib();
498
545
  this.classList.remove('combobox-filled');
499
546
  } else if (!this.dropdown.isPopoverVisible && this.availableOptions) {
500
547
  const hasFocus = this.contains(document.activeElement);
501
548
 
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
549
+ // If focus is within the combobox, show bib
550
+ // Prevent bib from being shown while loading & presetting the value
504
551
  if (hasFocus) {
505
552
  this.showBib();
506
553
  }
@@ -508,7 +555,7 @@ export class AuroCombobox extends LitElement {
508
555
  this.classList.add('combobox-filled');
509
556
  }
510
557
 
511
- // force the dropdown bib to hide if the input value has no matching suggestions
558
+ // Force dropdown bib to hide if input value has no matching suggestions
512
559
  if (!this.availableOptions || this.availableOptions.length === 0) {
513
560
  this.hideBib();
514
561
  }
@@ -548,14 +595,18 @@ export class AuroCombobox extends LitElement {
548
595
 
549
596
  if (this.dropdown.isPopoverVisible) {
550
597
  if (evt.key === 'ArrowUp') {
551
- this.menu.selectNextItem('up');
598
+ this.menu.navigateOptions('up');
552
599
  }
553
600
 
554
601
  if (evt.key === 'ArrowDown') {
555
- this.menu.selectNextItem('down');
602
+ this.menu.navigateOptions('down');
556
603
  }
557
604
  }
558
605
  });
606
+
607
+ this.addEventListener('focusin', () => {
608
+ this.focus();
609
+ });
559
610
  }
560
611
 
561
612
  /**
@@ -611,20 +662,23 @@ export class AuroCombobox extends LitElement {
611
662
  reset() {
612
663
  this.input.reset();
613
664
  this.validation.reset(this);
665
+ this.menu.value = undefined;
614
666
  }
615
667
 
616
668
  updated(changedProperties) {
617
669
  // After the component is ready, send direct value changes to auro-menu.
618
670
  if (changedProperties.has('value')) {
619
671
  if (this.value) {
620
- if (this.optionSelected && this.optionSelected.value === this.value) {
672
+ if (this.optionSelected && this.optionSelected[0] && this.optionSelected[0].value === this.value[0]) {
621
673
  // If value updates and the previously selected option already matches the new value
622
674
  // just update the input value to use the textContent of the optionSelected
623
- this.input.value = this.optionSelected.textContent;
675
+ this.input.value = this.optionSelected[0].textContent;
624
676
  } else {
625
677
  // Otherwise just enter the value into the input
626
678
  this.optionSelected = undefined;
627
- this.input.value = this.value;
679
+ // Use first value since combobox is single-select
680
+ const [inputValue] = this.value;
681
+ this.input.value = inputValue;
628
682
 
629
683
  // If the value got set programmatically make sure we hide the bib
630
684
  if (!this.contains(document.activeElement)) {
@@ -646,7 +700,7 @@ export class AuroCombobox extends LitElement {
646
700
  /**
647
701
  * Watch for slot changes and recalculate the menuoptions.
648
702
  * @private
649
- * @param {Event} event - slotchange event
703
+ * @param {Event} event - `slotchange` event.
650
704
  * @returns {void}
651
705
  */
652
706
  handleSlotChange(event) {
@@ -697,6 +751,7 @@ export class AuroCombobox extends LitElement {
697
751
  setCustomValidity="${this.setCustomValidity}"
698
752
  setCustomValidityValueMissing="${this.setCustomValidityValueMissing}"
699
753
  setCustomValidityCustomError="${this.setCustomValidityCustomError}"
754
+ .autocomplete="${this.autocomplete}"
700
755
  .type="${this.type}"
701
756
  @input="${this.handleInputValueChange}">
702
757
  <slot name="label" slot="label"></slot>
@@ -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.4s
306
306
  
307
307
  ./demo/index.js → ./demo/...
308
- created ./demo/ in 826ms
308
+ created ./demo/ in 1s
309
309
  
310
310
  ./demo/api.js → ./demo/...
311
- created ./demo/ in 466ms
311
+ created ./demo/ in 879ms
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.4s
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 541ms
10
+ created ./demo/ in 720ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 604ms
13
+ created ./demo/ in 532ms
@@ -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.11/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.3s
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.11/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.11/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.11/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.11/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.3s
94
94
  
95
95
  ./demo/index.js → ./demo/...
96
- created ./demo/ in 1.2s
96
+ created ./demo/ in 896ms
97
97
  
98
98
  ./demo/api.js → ./demo/...
99
- created ./demo/ in 947ms
99
+ created ./demo/ in 937ms
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
@@ -4,10 +4,10 @@
4
4
 
5
5
  
6
6
  ./src/index.js → dist...
7
- created dist in 1.4s
7
+ created dist in 1.1s
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 848ms
10
+ created ./demo/ in 1s
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 808ms
13
+ created ./demo/ in 812ms
@@ -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.11/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 394ms
73
73
  
74
74
  ./demo/index.js → ./demo/...
75
- created ./demo/ in 279ms
75
+ created ./demo/ in 242ms
76
76
  
77
77
  ./demo/api.js → ./demo/...
78
- created ./demo/ in 225ms
78
+ created ./demo/ in 201ms
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 447ms
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 258ms
10
+ created ./demo/ in 302ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 250ms
13
+ created ./demo/ in 247ms
@@ -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.11/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.3s
220
220
  
221
221
  ./demo/index.js → ./demo/...
222
- created ./demo/ in 966ms
222
+ created ./demo/ in 1.3s
223
223
  
224
224
  ./demo/api.js → ./demo/...
225
- created ./demo/ in 1.1s
225
+ created ./demo/ in 1.2s
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 955ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 1s
13
+ created ./demo/ in 952ms
@@ -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.11/dist/auro-input__bundled.js" type="module"></script>
93
93
  <!-- AURO-GENERATED-CONTENT:END -->
94
94
 
95
95
  ## auro-input use cases