@aurodesignsystem/auro-formkit 5.1.2 → 5.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +14 -7
  2. package/components/checkbox/demo/api.min.js +2 -2
  3. package/components/checkbox/demo/index.min.js +2 -2
  4. package/components/checkbox/dist/index.js +2 -2
  5. package/components/checkbox/dist/registered.js +2 -2
  6. package/components/combobox/README.md +2 -0
  7. package/components/combobox/demo/api.md +190 -62
  8. package/components/combobox/demo/api.min.js +414 -156
  9. package/components/combobox/demo/index.md +4 -2
  10. package/components/combobox/demo/index.min.js +344 -142
  11. package/components/combobox/demo/readme.md +2 -0
  12. package/components/combobox/dist/auro-combobox.d.ts +81 -33
  13. package/components/combobox/dist/index.js +309 -131
  14. package/components/combobox/dist/registered.js +309 -131
  15. package/components/counter/demo/api.min.js +17 -10
  16. package/components/counter/demo/index.min.js +17 -10
  17. package/components/counter/dist/index.js +17 -10
  18. package/components/counter/dist/registered.js +17 -10
  19. package/components/datepicker/demo/api.md +0 -1
  20. package/components/datepicker/demo/api.min.js +76 -28
  21. package/components/datepicker/demo/index.min.js +76 -28
  22. package/components/datepicker/dist/index.js +76 -28
  23. package/components/datepicker/dist/registered.js +76 -28
  24. package/components/dropdown/demo/api.md +2 -0
  25. package/components/dropdown/demo/api.min.js +12 -6
  26. package/components/dropdown/demo/index.min.js +12 -6
  27. package/components/dropdown/dist/index.js +12 -6
  28. package/components/dropdown/dist/registered.js +12 -6
  29. package/components/helptext/dist/index.js +1 -1
  30. package/components/helptext/dist/registered.js +1 -1
  31. package/components/input/demo/api.md +48 -46
  32. package/components/input/demo/api.min.js +57 -16
  33. package/components/input/demo/index.md +7 -3
  34. package/components/input/demo/index.min.js +57 -16
  35. package/components/input/dist/auro-input.d.ts +4 -0
  36. package/components/input/dist/base-input.d.ts +9 -1
  37. package/components/input/dist/index.js +57 -16
  38. package/components/input/dist/registered.js +57 -16
  39. package/components/layoutElement/dist/auroElement.d.ts +2 -1
  40. package/components/layoutElement/dist/index.js +2 -1
  41. package/components/layoutElement/dist/registered.js +2 -1
  42. package/components/menu/demo/api.md +4 -3
  43. package/components/menu/demo/api.min.js +37 -12
  44. package/components/menu/demo/index.min.js +37 -12
  45. package/components/menu/dist/auro-menu.d.ts +3 -2
  46. package/components/menu/dist/auro-menuoption.d.ts +1 -0
  47. package/components/menu/dist/index.js +37 -12
  48. package/components/menu/dist/registered.js +37 -12
  49. package/components/radio/demo/api.min.js +2 -2
  50. package/components/radio/demo/index.min.js +2 -2
  51. package/components/radio/dist/index.js +2 -2
  52. package/components/radio/dist/registered.js +2 -2
  53. package/components/select/demo/api.min.js +54 -20
  54. package/components/select/demo/index.md +78 -66
  55. package/components/select/demo/index.min.js +54 -20
  56. package/components/select/dist/index.js +19 -9
  57. package/components/select/dist/registered.js +19 -9
  58. package/components/select/dist/styles/emphasized/color-css.d.ts +2 -0
  59. package/package.json +3 -3
@@ -5,54 +5,64 @@
5
5
 
6
6
  ## Properties
7
7
 
8
- | Property | Attribute | Type | Default | Description |
9
- |---------------------------------|---------------------------------|---------------|----------------|--------------------------------------------------|
10
- | [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | | If declared, bib's position will be automatically calculated where to appear. |
11
- | [autocomplete](#autocomplete) | `autocomplete` | `string` | "false" | An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported. |
12
- | [checkmark](#checkmark) | `checkmark` | `boolean` | | When attribute is present auro-menu will apply checkmarks to selected options. |
13
- | [disabled](#disabled) | `disabled` | `boolean` | | If set, disables the combobox. |
14
- | [error](#error) | `error` | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
15
- | [format](#format) | `format` | `string` | | Specifies the input mask format. |
16
- | [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string` | "sm" | Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)<br />at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
17
- | [inputmode](#inputmode) | `inputmode` | `string` | | Exposes inputmode attribute for input. |
18
- | [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600 |
19
- | [layout](#layout) | | `string` | | |
20
- | [matchWidth](#matchWidth) | `matchWidth` | `boolean` | true | If declared, the popover and trigger will be set to the same width. |
21
- | [noFilter](#noFilter) | `noFilter` | `boolean` | | If set, combobox will not filter menuoptions based in input. |
22
- | [noFlip](#noFlip) | `noFlip` | `boolean` | "false" | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
23
- | [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
24
- | [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
25
- | [onDark](#onDark) | `onDark` | `boolean` | | If declared, onDark styles will be applied to the trigger. |
26
- | [optionSelected](#optionSelected) | `optionSelected` | `HTMLElement` | | Specifies the current selected option. |
27
- | [placeholder](#placeholder) | `placeholder` | `string` | | Define custom placeholder text, only supported by date input formats. |
28
- | [placement](#placement) | `placement` | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end" |
29
- | [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the input. Used for client-side validation. |
30
- | [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
31
- | [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
32
- | [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
33
- | [triggerIcon](#triggerIcon) | `triggerIcon` | `boolean` | | If set, the `icon` attribute will be applied to the trigger `auro-input` element. |
34
- | [type](#type) | `type` | `string` | | Applies the defined value as the type attribute on auro-input. |
35
- | [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
36
- | [value](#value) | `value` | `string` | | Value selected for the dropdown menu. |
8
+ | Property | Attribute | Modifiers | Type | Default | Description |
9
+ |---------------------------------|---------------------------------|-----------|-----------------------|----------------------------|--------------------------------------------------|
10
+ | [autoPlacement](#autoPlacement) | `autoPlacement` | | `boolean` | false | If declared, bib's position will be automatically calculated where to appear. |
11
+ | [autocomplete](#autocomplete) | `autocomplete` | | `string` | "false" | An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported. |
12
+ | [checkmark](#checkmark) | `checkmark` | | `boolean` | false | When attribute is present auro-menu will apply check marks to selected options. |
13
+ | [disabled](#disabled) | `disabled` | | `boolean` | false | If set, disables the combobox. |
14
+ | [dvInputOnly](#dvInputOnly) | `dvInputOnly` | | `boolean` | false | If defined, the display value slot content will only mask the HTML5 input element. The inputs label will not be masked. |
15
+ | [error](#error) | `error` | | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
16
+ | [format](#format) | `format` | | `string` | | Specifies the input mask format. |
17
+ | [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | | `string` | "sm" | Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)<br />at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
18
+ | [inputValue](#inputValue) | | readonly | `string \| undefined` | | Returns the current value of the input element within the combobox. |
19
+ | [inputmode](#inputmode) | `inputmode` | | `string` | | Exposes inputmode attribute for input. |
20
+ | [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600 |
21
+ | [layout](#layout) | | | `string` | "classic" | |
22
+ | [matchWidth](#matchWidth) | `matchWidth` | | `boolean` | true | If declared, the popover and trigger will be set to the same width. |
23
+ | [msgSelectionMissing](#msgSelectionMissing) | | | `string` | "Please select an option." | |
24
+ | [noFilter](#noFilter) | `noFilter` | | `boolean` | false | If set, combobox will not filter menuoptions based in input. |
25
+ | [noFlip](#noFlip) | `noFlip` | | `boolean` | "false" | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
26
+ | [noValidate](#noValidate) | `noValidate` | | `boolean` | false | If set, disables auto-validation on blur. |
27
+ | [offset](#offset) | `offset` | | `number` | "0" | Gap between the trigger element and bib. |
28
+ | [onDark](#onDark) | `onDark` | | `boolean` | | If declared, onDark styles will be applied to the trigger. |
29
+ | [optionSelected](#optionSelected) | `optionSelected` | | `HTMLElement` | | Specifies the current selected option. |
30
+ | [persistInput](#persistInput) | `persistInput` | | `Boolean` | false | If declared, selecting a menu option will not change the input value. By doing so,<br />the current menu filter will be preserved and the user can continue from their last<br />filter state. It is recommended to use this in combination with the `displayValue` slot. |
31
+ | [placeholder](#placeholder) | `placeholder` | | `string` | | Define custom placeholder text, only supported by date input formats. |
32
+ | [placement](#placement) | `placement` | | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end" |
33
+ | [required](#required) | `required` | | `boolean` | false | Populates the `required` attribute on the input. Used for client-side validation. |
34
+ | [setCustomValidity](#setCustomValidity) | `setCustomValidity` | | `string` | | Sets a custom help text message to display for all validityStates. |
35
+ | [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | | `string` | | Custom help text message to display when validity = `customError`. |
36
+ | [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | | `string` | | Custom help text message to display when validity = `valueMissing`. |
37
+ | [shape](#shape) | | | `string` | "classic" | |
38
+ | [size](#size) | | | `string` | "xl" | |
39
+ | [triggerIcon](#triggerIcon) | `triggerIcon` | | `boolean` | false | If set, the `icon` attribute will be applied to the trigger `auro-input` element. |
40
+ | [type](#type) | `type` | | `string` | | Applies the defined value as the type attribute on auro-input. |
41
+ | [typedValue](#typedValue) | `typedValue` | | `string` | "undefined" | Specifies the value of the input element within the combobox. |
42
+ | [validity](#validity) | `validity` | | `string` | | Specifies the `validityState` this element is in. |
43
+ | [value](#value) | `value` | | `string` | "undefined" | Value selected for the dropdown menu. |
37
44
 
38
45
  ## Methods
39
46
 
40
- | Method | Type | Description |
41
- |------------|----------------------------------------|--------------------------------------------------|
42
- | [clear](#clear) | `(): void` | Clears the current value of the combobox. |
43
- | [focus](#focus) | `(): void` | Focuses the combobox trigger input. |
44
- | [hideBib](#hideBib) | `(): void` | Hides the dropdown bib if its open. |
45
- | [isValid](#isValid) | `(): boolean` | Checks if the element is valid. |
46
- | [reset](#reset) | `(): void` | Resets component to initial state. |
47
- | [showBib](#showBib) | `(): void` | Shows the dropdown bib if there are options to show. |
48
- | [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
47
+ | Method | Type | Description |
48
+ |----------------------|----------------------------------------|--------------------------------------------------|
49
+ | [clear](#clear) | `(): void` | Clears the current value of the combobox. |
50
+ | [focus](#focus) | `(): void` | Focuses the combobox trigger input. |
51
+ | [hideBib](#hideBib) | `(): void` | Hides the dropdown bib if its open. |
52
+ | [isValid](#isValid) | `(): boolean` | Checks if the element is valid. |
53
+ | [reset](#reset) | `(): void` | Resets component to initial state. |
54
+ | [showBib](#showBib) | `(): void` | Shows the dropdown bib if there are options to show. |
55
+ | [updateActiveOption](#updateActiveOption) | `(index: number): void` | Updates the active option in the menu.<br /><br />**index**: Index of the option to make active. |
56
+ | [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
49
57
 
50
58
  ## Events
51
59
 
52
- | Event | Type | Description |
53
- |-----------------------------|--------------------|--------------------------------------------------|
54
- | `auroCombobox-valueSet` | `CustomEvent<any>` | Notifies that the component has a new value set. |
55
- | `auroFormElement-validated` | | Notifies that the component value(s) have been validated. |
60
+ | Event | Type | Description |
61
+ |-----------------------------|------------------------------------------------|--------------------------------------------------|
62
+ | `auroCombobox-valueSet` | `CustomEvent<any>` | (Deprecated) Notifies that the component has a new value set. |
63
+ | `auroFormElement-validated` | | Notifies that the component value(s) have been validated. |
64
+ | [input](#input) | `CustomEvent<any>` | Notifies that the component has a new value set. |
65
+ | [inputValue](#inputValue) | `CustomEvent<{ value: string \| undefined; }>` | Notifies that the components internal HTML5 input value has changed. |
56
66
 
57
67
  ## Slots
58
68
 
@@ -153,20 +163,52 @@ This example demonstrates a data driven combobox. The data is used to populate t
153
163
 
154
164
  The menu in this example was populated from data from a country/city API. To keep the data set small, the data in the menu is based off an API call that returns all countries and cities that contain the substring "**germ**" (non case-sensitive) in their name.
155
165
 
156
- <div class="exampleWrapper">
166
+ <div class="exampleWrapper--ondark">
157
167
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dynamicMenu.html) -->
158
168
  <!-- The below content is automatically added from ./../apiExamples/dynamicMenu.html -->
159
169
  <!-- HTML example file -->
160
170
  <!-- ----------------- -->
161
- <auro-combobox id="dynamicMenuExample" noFilter>
171
+ <auro-combobox
172
+ id="dynamicMenuExample"
173
+ value="TAN"
174
+ layout="snowflake"
175
+ shape="snowflake"
176
+ size="lg"
177
+ ondark
178
+ noFilter
179
+ persistInput
180
+ dvInputOnly
181
+ required>
162
182
  <span slot="bib.fullscreen.headline">Dynamic Combobox Header</span>
163
- <span slot="label">Name</span>
183
+ <span slot="label">First</span>
164
184
  <!--
165
185
  The auro-combobox element requires an empty auro-menu element
166
186
  due to the requirements of auro-dropdown and auro-input
167
187
  -->
168
188
  <auro-menu id="initMenu"></auro-menu>
169
- </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>
170
212
  <!-- AURO-GENERATED-CONTENT:END -->
171
213
  </div>
172
214
  <auro-accordion alignRight>
@@ -177,15 +219,47 @@ The menu in this example was populated from data from a country/city API. To kee
177
219
  ```html
178
220
  <!-- HTML example file -->
179
221
  <!-- ----------------- -->
180
- <auro-combobox id="dynamicMenuExample" noFilter>
222
+ <auro-combobox
223
+ id="dynamicMenuExample"
224
+ value="TAN"
225
+ layout="snowflake"
226
+ shape="snowflake"
227
+ size="lg"
228
+ ondark
229
+ noFilter
230
+ persistInput
231
+ dvInputOnly
232
+ required>
181
233
  <span slot="bib.fullscreen.headline">Dynamic Combobox Header</span>
182
- <span slot="label">Name</span>
234
+ <span slot="label">First</span>
183
235
  <!--
184
236
  The auro-combobox element requires an empty auro-menu element
185
237
  due to the requirements of auro-dropdown and auro-input
186
238
  -->
187
239
  <auro-menu id="initMenu"></auro-menu>
188
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>
189
263
  ```
190
264
  <!-- AURO-GENERATED-CONTENT:END -->
191
265
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dynamicMenu.js) -->
@@ -196,7 +270,7 @@ The menu in this example was populated from data from a country/city API. To kee
196
270
  // -----------------------
197
271
  import { DynamicData } from './dynamicMenuDataApi';
198
272
 
199
- export function dynamicMenuExample() {
273
+ export async function dynamicMenuExample() {
200
274
  // Resets the root menu
201
275
  function resetMenu(root) {
202
276
  while (root.firstChild) {
@@ -204,22 +278,48 @@ export function dynamicMenuExample() {
204
278
  }
205
279
  }
206
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
+
207
307
  // Generates HTML for menu and submenus using country & city data from an external API
208
- function generateHtml(data) {
209
- const initialMenu = document.querySelector('#initMenu');
308
+ function generateHtml(data, selector) {
309
+ const initialMenu = document.querySelector(selector);
210
310
 
211
311
  resetMenu(initialMenu);
212
312
 
213
313
  for (let index = 0; index < data.length; index++) {
214
- let country = data[index]['country'];
215
- let cities = data[index]['cities'];
314
+ const country = data[index]['country'];
315
+ const cities = data[index]['cities'];
216
316
 
217
- generateMenuOptionHtml(initialMenu, country, country);
317
+ generateMenuOptionHtml(initialMenu, country, country.substring(0, 3).toUpperCase());
218
318
 
219
319
  for (let indexB = 0; indexB < cities.length; indexB++) {
220
- let subMenu = document.createElement('auro-menu');
320
+ const subMenu = document.createElement('auro-menu');
221
321
 
222
- generateMenuOptionHtml(subMenu, cities[indexB], cities[indexB]);
322
+ generateMenuOptionHtml(subMenu, cities[indexB], cities[indexB].substring(0, 3).toUpperCase());
223
323
 
224
324
  initialMenu.appendChild(subMenu);
225
325
  }
@@ -228,26 +328,54 @@ export function dynamicMenuExample() {
228
328
 
229
329
  // Helper function that generates HTML for menuoptions
230
330
  function generateMenuOptionHtml(menu, label, value) {
231
- let option = document.createElement('auro-menuoption');
331
+ const option = document.createElement('auro-menuoption');
332
+ const displayValue = document.createElement('div');
333
+ displayValue.setAttribute("slot", "displayValue");
334
+ displayValue.innerHTML = value;
232
335
 
233
336
  option.value = value;
234
337
  option.innerHTML = label;
235
-
236
338
  menu.appendChild(option);
339
+ option.appendChild(displayValue);
237
340
  }
238
341
 
239
342
  // Main javascript that runs all JS to create example
240
343
  const dynamicData = new DynamicData();
241
- const dynamicMenuExample = document.querySelector('#dynamicMenuExample');
242
- const dropdownEl = dynamicMenuExample.shadowRoot.querySelector(dynamicMenuExample.dropdownTag._$litStatic$);
243
- const inputEl = dropdownEl.querySelector(dynamicMenuExample.inputTag._$litStatic$);
344
+ const dynamicMenuExampleEl = document.querySelector('#dynamicMenuExample');
345
+ const dropdownEl = dynamicMenuExampleEl.shadowRoot.querySelector(dynamicMenuExampleEl.dropdownTag._$litStatic$);
346
+ const inputEl = dropdownEl.querySelector(dynamicMenuExampleEl.inputTag._$litStatic$);
244
347
 
245
348
  inputEl.addEventListener('input', () => {
246
349
  let data = dynamicData.getData();
247
350
  data = dynamicData.filterData(data, inputEl.value);
248
351
 
249
- generateHtml(data);
352
+ generateHtml(data, '#initMenu');
353
+ });
354
+
355
+ if (dynamicMenuExampleEl.value && dynamicMenuExampleEl.value.length > 0 && dynamicMenuExampleEl.input.value && (!dynamicMenuExampleEl.menu.availableOptions || dynamicMenuExampleEl.menu.availableOptions.length === 0)) {
356
+ let data = dynamicData.getData();
357
+ data = dynamicData.filterData(data, inputEl.value);
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');
250
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');
378
+ }
251
379
  }
252
380
  ```
253
381
  <!-- AURO-GENERATED-CONTENT:END -->