@aurodesignsystem-dev/auro-formkit 0.0.0-pr1503.3 → 0.0.0-pr1503.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/demo/accessibility.md +1 -1
- package/components/checkbox/demo/customize.html +1 -2
- package/components/checkbox/demo/customize.min.js +23 -8
- package/components/checkbox/demo/getting-started.min.js +23 -8
- package/components/checkbox/demo/index.min.js +23 -8
- package/components/checkbox/dist/index.js +23 -8
- package/components/checkbox/dist/registered.js +23 -8
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/accessibility.md +1 -1
- package/components/combobox/demo/api.md +2 -2
- package/components/combobox/demo/customize.html +1 -2
- package/components/combobox/demo/customize.md +166 -142
- package/components/combobox/demo/customize.min.js +2515 -2316
- package/components/combobox/demo/getting-started.min.js +2515 -2312
- package/components/combobox/demo/index.md +2 -1
- package/components/combobox/demo/index.min.js +2515 -2312
- package/components/combobox/demo/keyboard-behavior.md +3 -146
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/demo/why-combobox.md +2 -2
- package/components/combobox/dist/auro-combobox.d.ts +49 -15
- package/components/combobox/dist/index.js +1462 -753
- package/components/combobox/dist/registered.js +1462 -753
- package/components/counter/demo/customize.min.js +188 -244
- package/components/counter/demo/index.min.js +188 -244
- package/components/counter/dist/auro-counter.d.ts +0 -8
- package/components/counter/dist/index.js +188 -244
- package/components/counter/dist/registered.js +188 -244
- package/components/datepicker/demo/accessibility.md +20 -10
- package/components/datepicker/demo/api.md +65 -62
- package/components/datepicker/demo/customize.md +180 -40
- package/components/datepicker/demo/customize.min.js +1690 -777
- package/components/datepicker/demo/getting-started.md +118 -2
- package/components/datepicker/demo/index.min.js +1690 -759
- package/components/datepicker/demo/keyboard-behavior.md +3 -3
- package/components/datepicker/demo/voiceover.md +4 -4
- package/components/datepicker/demo/why-datepicker.md +2 -2
- package/components/datepicker/dist/{src/auro-calendar-cell.d.ts → auro-calendar-cell.d.ts} +48 -3
- package/components/datepicker/dist/{src/auro-calendar.d.ts → auro-calendar.d.ts} +188 -10
- package/components/datepicker/dist/{src/auro-datepicker.d.ts → auro-datepicker.d.ts} +89 -6
- package/components/datepicker/dist/blackoutUtils.d.ts +43 -0
- package/components/datepicker/dist/index.js +1690 -759
- package/components/datepicker/dist/registered.js +1690 -759
- package/components/dropdown/demo/customize.html +3 -0
- package/components/dropdown/demo/customize.min.js +142 -208
- package/components/dropdown/demo/getting-started.min.js +131 -207
- package/components/dropdown/demo/index.min.js +131 -207
- package/components/dropdown/dist/auro-dropdown.d.ts +17 -1
- package/components/dropdown/dist/index.js +131 -207
- package/components/dropdown/dist/registered.js +131 -207
- package/components/form/demo/api.md +3 -3
- package/components/form/demo/customize.html +6 -6
- package/components/form/demo/customize.md +535 -135
- package/components/form/demo/customize.min.js +6307 -4378
- package/components/form/demo/getting-started.md +344 -96
- package/components/form/demo/getting-started.min.js +6255 -4378
- package/components/form/demo/index.min.js +6206 -4378
- package/components/form/demo/registerDemoDeps.min.js +5827 -4333
- package/components/form/dist/auro-form.d.ts +128 -10
- package/components/form/dist/index.js +377 -43
- package/components/form/dist/registered.js +377 -43
- package/components/input/demo/accessibility.md +1 -1
- package/components/input/demo/api.md +58 -57
- package/components/input/demo/customize.html +1 -2
- package/components/input/demo/customize.md +62 -61
- package/components/input/demo/customize.min.js +396 -275
- package/components/input/demo/getting-started.min.js +396 -275
- package/components/input/demo/index.min.js +396 -275
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +60 -81
- package/components/input/dist/index.js +409 -276
- package/components/input/dist/registered.js +396 -275
- package/components/input/dist/utilities.d.ts +10 -1
- package/components/menu/demo/accessibility.md +9 -4
- package/components/menu/demo/api.md +48 -45
- package/components/menu/demo/css-only.md +26 -19
- package/components/menu/demo/customize.md +307 -75
- package/components/menu/demo/design.md +1 -1
- package/components/menu/demo/getting-started.md +144 -7
- package/components/menu/demo/index.min.js +961 -1341
- package/components/menu/demo/keyboard-behavior.md +83 -4
- package/components/menu/demo/voiceover.md +21 -14
- package/components/menu/demo/why-menu.md +8 -9
- package/components/menu/dist/auro-menu-utils.d.ts +19 -0
- package/components/menu/dist/auro-menu.d.ts +97 -116
- package/components/menu/dist/auro-menuoption.d.ts +39 -133
- package/components/menu/dist/index.js +823 -1309
- package/components/menu/dist/registered.js +835 -1309
- package/components/radio/demo/accessibility.md +1 -1
- package/components/radio/demo/customize.min.js +23 -8
- package/components/radio/demo/getting-started.min.js +23 -8
- package/components/radio/demo/index.min.js +23 -8
- package/components/radio/dist/index.js +23 -8
- package/components/radio/dist/registered.js +23 -8
- package/components/select/demo/accessibility.md +6 -1
- package/components/select/demo/api.md +3 -2
- package/components/select/demo/customize.html +1 -2
- package/components/select/demo/customize.md +210 -5
- package/components/select/demo/customize.min.js +1613 -1854
- package/components/select/demo/design.md +10 -10
- package/components/select/demo/getting-started.md +1 -1
- package/components/select/demo/getting-started.min.js +1617 -1903
- package/components/select/demo/index.md +2 -2
- package/components/select/demo/index.min.js +1613 -1854
- package/components/select/demo/keyboard-behavior.md +81 -54
- package/components/select/demo/voiceover.md +28 -15
- package/components/select/dist/auro-select.d.ts +70 -12
- package/components/select/dist/index.js +580 -315
- package/components/select/dist/registered.js +580 -315
- package/components/select/dist/selectUtils.d.ts +24 -0
- package/custom-elements.json +8071 -7919
- package/package.json +7 -3
- package/components/checkbox/demo/customize.js +0 -22
- package/components/checkbox/demo/demo-support.js +0 -1
- package/components/checkbox/demo/getting-started.js +0 -22
- package/components/checkbox/demo/index.js +0 -8
- package/components/checkbox/demo/styles.scss +0 -1
- package/components/combobox/demo/customize.js +0 -24
- package/components/combobox/demo/demo-support.js +0 -1
- package/components/combobox/demo/getting-started.js +0 -21
- package/components/combobox/demo/index.js +0 -23
- package/components/combobox/demo/styles.scss +0 -1
- package/components/counter/demo/customize.js +0 -21
- package/components/counter/demo/demo-support.js +0 -1
- package/components/counter/demo/index.js +0 -21
- package/components/counter/demo/styles.scss +0 -1
- package/components/datepicker/demo/customize.js +0 -19
- package/components/datepicker/demo/demo-support.js +0 -1
- package/components/datepicker/demo/index.js +0 -23
- package/components/datepicker/demo/styles.scss +0 -1
- package/components/dropdown/demo/customize.js +0 -9
- package/components/dropdown/demo/demo-support.js +0 -1
- package/components/dropdown/demo/getting-started.js +0 -9
- package/components/dropdown/demo/index.js +0 -16
- package/components/dropdown/demo/styles.scss +0 -1
- package/components/form/demo/customize.js +0 -9
- package/components/form/demo/demo-support.js +0 -1
- package/components/form/demo/getting-started.js +0 -9
- package/components/form/demo/index.js +0 -5
- package/components/form/demo/registerDemoDeps.js +0 -23
- package/components/form/demo/styles.scss +0 -1
- package/components/input/demo/customize.js +0 -25
- package/components/input/demo/demo-support.js +0 -1
- package/components/input/demo/getting-started.js +0 -8
- package/components/input/demo/index.js +0 -8
- package/components/input/demo/styles.css +0 -974
- package/components/input/demo/styles.scss +0 -1
- package/components/menu/demo/demo-support.js +0 -1
- package/components/menu/demo/index.js +0 -25
- package/components/menu/demo/styles.scss +0 -1
- package/components/menu/dist/auro-menu.context.d.ts +0 -238
- package/components/radio/demo/customize.js +0 -22
- package/components/radio/demo/demo-support.js +0 -1
- package/components/radio/demo/getting-started.js +0 -24
- package/components/radio/demo/index.js +0 -8
- package/components/radio/demo/styles.scss +0 -1
- package/components/select/demo/customize.js +0 -11
- package/components/select/demo/demo-support.js +0 -1
- package/components/select/demo/getting-started.js +0 -26
- package/components/select/demo/index.js +0 -11
- package/components/select/demo/styles.scss +0 -1
- /package/components/counter/dist/styles/{counter-wrapper-color-css.d.ts → counter-group-color-css.d.ts} +0 -0
- /package/components/datepicker/dist/{src/auro-calendar-month.d.ts → auro-calendar-month.d.ts} +0 -0
- /package/components/datepicker/dist/{src/buttonVersion.d.ts → buttonVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/datepickerKeyboardStrategy.d.ts → datepickerKeyboardStrategy.d.ts} +0 -0
- /package/components/datepicker/dist/{src/iconVersion.d.ts → iconVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/components/datepicker/dist/{src/popoverVersion.d.ts → popoverVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/shapeSize-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/tokens-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/utilities.d.ts → utilities.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendar.d.ts → utilitiesCalendar.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendarRender.d.ts → utilitiesCalendarRender.d.ts} +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/day.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker.d.ts +0 -0
|
@@ -22,10 +22,13 @@
|
|
|
22
22
|
<auro-anchorlink fluid href="#options" class="level2 body-xs">options</auro-anchorlink>
|
|
23
23
|
<auro-anchorlink fluid href="#index" class="level2 body-xs">index</auro-anchorlink>
|
|
24
24
|
<auro-anchorlink fluid href="#functions">Functions</auro-anchorlink>
|
|
25
|
-
<auro-anchorlink fluid href="#makeSelection" class="level2 body-xs">makeSelection()</auro-anchorlink>
|
|
26
25
|
<auro-anchorlink fluid href="#reset" class="level2 body-xs">reset()</auro-anchorlink>
|
|
26
|
+
<auro-anchorlink fluid href="#selectByValue" class="level2 body-xs">selectByValue()</auro-anchorlink>
|
|
27
27
|
<auro-anchorlink fluid href="#updateActiveOption" class="level2 body-xs">updateActiveOption()</auro-anchorlink>
|
|
28
28
|
<auro-anchorlink fluid href="#navigateOptions" class="level2 body-xs">navigateOptions()</auro-anchorlink>
|
|
29
|
+
<auro-anchorlink fluid href="#events">Events</auro-anchorlink>
|
|
30
|
+
<auro-anchorlink fluid href="#eventList" class="level2 body-xs">Event List</auro-anchorlink>
|
|
31
|
+
<auro-anchorlink fluid href="#eventAttribute" class="level2 body-xs">Option event attribute</auro-anchorlink>
|
|
29
32
|
</auro-nav>
|
|
30
33
|
</nav>
|
|
31
34
|
<div class="mainContent">
|
|
@@ -293,7 +296,7 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
|
|
|
293
296
|
<auro-header level="2" id="stateManagement">State Management</auro-header>
|
|
294
297
|
<p>The following properties reflect the current state of the menu and can be accessed via JavaScript.</p>
|
|
295
298
|
<auro-header level="3" id="value">value</auro-header>
|
|
296
|
-
<p>Gets or sets the selected value. In multi-select mode, this is a JSON stringified array of selected option values (e.g., <code>'["stops","duration"]'</code>).</p>
|
|
299
|
+
<p>Gets or sets the selected value. In multi-select mode, this is a JSON stringified array of selected option values (e.g., <code>'["stops","duration"]'</code>). If the value matches an option marked <code>disabled</code> or <code>static</code>, the selection is cleared (<code>optionSelected</code> becomes <code>undefined</code>) and <code>auroMenu-selectValueFailure</code> is dispatched. <code>hidden</code> options remain selectable by value.</p>
|
|
297
300
|
<auro-header level="3" id="optionSelected">optionSelected</auro-header>
|
|
298
301
|
<p>Returns the currently selected <code><auro-menuoption></code> element, or <code>undefined</code> if no option is selected. When <code>multiSelect</code> is enabled, returns an array of selected elements.</p>
|
|
299
302
|
<auro-header level="3" id="optionActive">optionActive</auro-header>
|
|
@@ -308,14 +311,148 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
|
|
|
308
311
|
<section>
|
|
309
312
|
<auro-header level="2" id="functions">Functions</auro-header>
|
|
310
313
|
<p>The following public methods are available on the <code><auro-menu></code> element.</p>
|
|
311
|
-
<auro-header level="3" id="makeSelection">makeSelection()</auro-header>
|
|
312
|
-
<p>Selects the currently active menu option. This is the programmatic equivalent of clicking on an option or pressing Enter while an option is focused.</p>
|
|
313
314
|
<auro-header level="3" id="reset">reset()</auro-header>
|
|
314
315
|
<p>Resets the menu to its initial state, clearing all selected options and restoring the value to <code>undefined</code>.</p>
|
|
315
|
-
<
|
|
316
|
-
|
|
316
|
+
<div class="exampleWrapper">
|
|
317
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/reset.html) -->
|
|
318
|
+
<!-- The below content is automatically added from ./../apiExamples/reset.html -->
|
|
319
|
+
<auro-menu id="resetExample" value="duration">
|
|
320
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
321
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
322
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
323
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
324
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
325
|
+
</auro-menu>
|
|
326
|
+
<br/><br/>
|
|
327
|
+
<auro-button id="resetExampleBtn">RESET</auro-button>
|
|
328
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
329
|
+
</div>
|
|
330
|
+
<auro-accordion alignRight>
|
|
331
|
+
<span slot="trigger">See code</span>
|
|
332
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reset.html) -->
|
|
333
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/reset.html -->
|
|
334
|
+
<pre class="language-html"><code class="language-html"><auro-menu id="resetExample" value="duration">
|
|
335
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
336
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
337
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
338
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
339
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
340
|
+
</auro-menu>
|
|
341
|
+
<br/><br/>
|
|
342
|
+
<auro-button id="resetExampleBtn">RESET</auro-button></code></pre>
|
|
343
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
344
|
+
</auro-accordion>
|
|
345
|
+
<auro-header level="3" id="selectByValue">selectByValue(value)</auro-header>
|
|
346
|
+
<p>Selects the option(s) whose <code>value</code> matches the argument. Accepts a string in single-select mode or an array of strings in multi-select mode; passing <code>undefined</code>, <code>null</code>, an empty string, or an empty array clears the selection.</p>
|
|
347
|
+
<div class="exampleWrapper">
|
|
348
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/select-by-value.html) -->
|
|
349
|
+
<!-- The below content is automatically added from ./../apiExamples/select-by-value.html -->
|
|
350
|
+
<auro-menu id="selectByValueMenu">
|
|
351
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
352
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
353
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
354
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
355
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
356
|
+
</auro-menu>
|
|
357
|
+
<br />
|
|
358
|
+
<auro-button id="selectByValueStops">Select "Stops"</auro-button>
|
|
359
|
+
<auro-button id="selectByValueDuration">Select "Duration"</auro-button>
|
|
360
|
+
<auro-button id="selectByValueClear">Clear selection</auro-button>
|
|
361
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
362
|
+
</div>
|
|
363
|
+
<auro-accordion alignRight>
|
|
364
|
+
<span slot="trigger">See code</span>
|
|
365
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/select-by-value.html) -->
|
|
366
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/select-by-value.html -->
|
|
367
|
+
<pre class="language-html"><code class="language-html"><auro-menu id="selectByValueMenu">
|
|
368
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
369
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
370
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
371
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
372
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
373
|
+
</auro-menu>
|
|
374
|
+
<br />
|
|
375
|
+
<auro-button id="selectByValueStops">Select "Stops"</auro-button>
|
|
376
|
+
<auro-button id="selectByValueDuration">Select "Duration"</auro-button>
|
|
377
|
+
<auro-button id="selectByValueClear">Clear selection</auro-button></code></pre>
|
|
378
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
379
|
+
</auro-accordion>
|
|
380
|
+
<auro-header level="3" id="updateActiveOption">updateActiveOption(indexOrOption)</auro-header>
|
|
381
|
+
<p>Sets the specified option as the currently active (highlighted) option. Accepts either a numeric index into <code>options</code> or an <code><auro-menuoption></code> element reference.</p>
|
|
317
382
|
<auro-header level="3" id="navigateOptions">navigateOptions(direction)</auro-header>
|
|
318
|
-
<p>Moves the
|
|
383
|
+
<p>Moves the active option to the next or previous option. Accepts <code>'up'</code> or <code>'down'</code> as the direction parameter.</p>
|
|
384
|
+
</section>
|
|
385
|
+
<section>
|
|
386
|
+
<auro-header level="2" id="events">Events</auro-header>
|
|
387
|
+
<p>The <code><auro-menu></code> element dispatches custom events that consumers can subscribe to via <code>addEventListener</code>. The example below wires listeners for the full event set and logs each firing.</p>
|
|
388
|
+
<auro-header level="3" id="eventList">Event List</auro-header>
|
|
389
|
+
<ul>
|
|
390
|
+
<li><code>auroMenu-selectedOption</code> — a new selection has been made.</li>
|
|
391
|
+
<li><code>auroMenu-activatedOption</code> — the active (highlighted) option changed via keyboard or hover.</li>
|
|
392
|
+
<li><code>auroMenu-optionsChange</code> — the set of available options was updated (e.g., after a slot change).</li>
|
|
393
|
+
<li><code>auroMenu-selectValueReset</code> — the menu's <code>value</code> was reset via <code>reset()</code>.</li>
|
|
394
|
+
<li><code>auroMenu-selectValueFailure</code> — a value selection (via <code>selectByValue()</code>, the <code>value</code> attribute, or setting the <code>value</code> property) found no matching selectable option. This includes values that match an option marked <code>disabled</code> or <code>static</code>, which are never selectable.</li>
|
|
395
|
+
</ul>
|
|
396
|
+
<div class="exampleWrapper">
|
|
397
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/events.html) -->
|
|
398
|
+
<!-- The below content is automatically added from ./../apiExamples/events.html -->
|
|
399
|
+
<auro-menu id="eventsExampleMenu">
|
|
400
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
401
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
402
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
403
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
404
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
405
|
+
</auro-menu>
|
|
406
|
+
<br />
|
|
407
|
+
<auro-button id="eventsExampleReset">reset()</auro-button>
|
|
408
|
+
<auro-button id="eventsExampleBadValue">selectByValue("nonexistent")</auro-button>
|
|
409
|
+
<auro-button id="eventsExampleClearLog">Clear log</auro-button>
|
|
410
|
+
<pre id="eventsExampleLog" style="max-height: 200px; overflow: auto; padding: var(--ds-size-100, 8px); background: var(--ds-color-container-secondary, #f5f5f5); border-radius: 4px;">(interact with the menu above)</pre>
|
|
411
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
412
|
+
</div>
|
|
413
|
+
<auro-accordion alignRight>
|
|
414
|
+
<span slot="trigger">See code</span>
|
|
415
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/events.html) -->
|
|
416
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/events.html -->
|
|
417
|
+
<pre class="language-html"><code class="language-html"><auro-menu id="eventsExampleMenu">
|
|
418
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
419
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
420
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
421
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
422
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
423
|
+
</auro-menu>
|
|
424
|
+
<br />
|
|
425
|
+
<auro-button id="eventsExampleReset">reset()</auro-button>
|
|
426
|
+
<auro-button id="eventsExampleBadValue">selectByValue("nonexistent")</auro-button>
|
|
427
|
+
<auro-button id="eventsExampleClearLog">Clear log</auro-button>
|
|
428
|
+
<pre id="eventsExampleLog" style="max-height: 200px; overflow: auto; padding: var(--ds-size-100, 8px); background: var(--ds-color-container-secondary, #f5f5f5); border-radius: 4px;">(interact with the menu above)</pre></code></pre>
|
|
429
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
430
|
+
</auro-accordion>
|
|
431
|
+
<auro-header level="3" id="eventAttribute">Option event attribute</auro-header>
|
|
432
|
+
<p>Attach an <code>event</code> attribute to any <code>auro-menuoption</code> to dispatch a named custom event from the menu when that option is selected. The generic <code>auroMenu-customEventFired</code> event is also dispatched on every firing — its <code>detail.option</code> references the option that triggered it, so a single listener can route on the <code>event</code> attribute value.</p>
|
|
433
|
+
<div class="exampleWrapper">
|
|
434
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/event-attribute.html) -->
|
|
435
|
+
<!-- The below content is automatically added from ./../apiExamples/event-attribute.html -->
|
|
436
|
+
<auro-menu id="eventAttrExample">
|
|
437
|
+
<auro-menuoption value="search" event="custom-flight-search">Search flights</auro-menuoption>
|
|
438
|
+
<auro-menuoption value="clear" event="custom-clear-filters">Clear filters</auro-menuoption>
|
|
439
|
+
<auro-menuoption value="save" event="custom-save-preferences">Save preferences</auro-menuoption>
|
|
440
|
+
</auro-menu>
|
|
441
|
+
<p>Last custom event: <output id="eventAttrOutput">(none)</output></p>
|
|
442
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
443
|
+
</div>
|
|
444
|
+
<auro-accordion alignRight>
|
|
445
|
+
<span slot="trigger">See code</span>
|
|
446
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/event-attribute.html) -->
|
|
447
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/event-attribute.html -->
|
|
448
|
+
<pre class="language-html"><code class="language-html"><auro-menu id="eventAttrExample">
|
|
449
|
+
<auro-menuoption value="search" event="custom-flight-search">Search flights</auro-menuoption>
|
|
450
|
+
<auro-menuoption value="clear" event="custom-clear-filters">Clear filters</auro-menuoption>
|
|
451
|
+
<auro-menuoption value="save" event="custom-save-preferences">Save preferences</auro-menuoption>
|
|
452
|
+
</auro-menu>
|
|
453
|
+
<p>Last custom event: <output id="eventAttrOutput">(none)</output></p></code></pre>
|
|
454
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
455
|
+
</auro-accordion>
|
|
319
456
|
</section>
|
|
320
457
|
</div>
|
|
321
458
|
</div>
|