@aurodesignsystem-dev/auro-formkit 0.0.0-pr1540.0 → 0.0.0-pr1540.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/checkbox/demo/accessibility.md +1 -1
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/accessibility.md +1 -1
- package/components/combobox/demo/api.md +2 -2
- package/components/combobox/demo/customize.md +54 -2
- package/components/combobox/demo/customize.min.js +421 -240
- package/components/combobox/demo/getting-started.min.js +421 -240
- package/components/combobox/demo/index.md +1 -0
- package/components/combobox/demo/index.min.js +421 -240
- package/components/combobox/demo/keyboard-behavior.md +1 -4
- package/components/combobox/dist/auro-combobox.d.ts +4 -1
- package/components/combobox/dist/index.js +334 -222
- package/components/combobox/dist/registered.js +334 -222
- package/components/counter/demo/customize.min.js +59 -222
- package/components/counter/demo/index.min.js +59 -222
- package/components/counter/dist/auro-counter.d.ts +0 -8
- package/components/counter/dist/index.js +59 -222
- package/components/counter/dist/registered.js +59 -222
- package/components/datepicker/demo/accessibility.md +1 -1
- package/components/datepicker/demo/customize.md +30 -1
- package/components/datepicker/demo/customize.min.js +84 -220
- package/components/datepicker/demo/getting-started.md +118 -2
- package/components/datepicker/demo/index.min.js +84 -220
- package/components/datepicker/dist/index.js +84 -220
- package/components/datepicker/dist/registered.js +84 -220
- package/components/dropdown/demo/customize.html +3 -0
- package/components/dropdown/demo/customize.min.js +55 -206
- package/components/dropdown/demo/getting-started.min.js +44 -205
- package/components/dropdown/demo/index.min.js +44 -205
- package/components/dropdown/dist/index.js +44 -205
- package/components/dropdown/dist/registered.js +44 -205
- package/components/form/demo/customize.min.js +670 -945
- package/components/form/demo/getting-started.min.js +670 -945
- package/components/form/demo/index.min.js +670 -945
- package/components/form/demo/registerDemoDeps.min.js +670 -945
- package/components/input/demo/accessibility.md +1 -1
- package/components/input/demo/customize.min.js +1 -1
- package/components/input/demo/getting-started.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/accessibility.md +9 -4
- package/components/menu/demo/api.md +26 -19
- package/components/menu/demo/css-only.md +26 -19
- package/components/menu/demo/customize.md +307 -47
- package/components/menu/demo/design.md +1 -1
- package/components/menu/demo/getting-started.md +144 -7
- package/components/menu/demo/index.min.js +214 -19
- 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 +4 -8
- package/components/menu/dist/auro-menuoption.d.ts +12 -0
- package/components/menu/dist/index.js +87 -18
- package/components/menu/dist/registered.js +87 -18
- package/components/radio/demo/accessibility.md +1 -1
- package/components/radio/demo/customize.min.js +1 -1
- package/components/radio/demo/getting-started.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/accessibility.md +6 -1
- package/components/select/demo/api.md +2 -2
- package/components/select/demo/customize.md +6 -3
- package/components/select/demo/customize.min.js +139 -227
- 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 +139 -227
- package/components/select/demo/index.md +2 -2
- package/components/select/demo/index.min.js +139 -227
- package/components/select/demo/keyboard-behavior.md +53 -58
- package/components/select/demo/voiceover.md +28 -15
- package/components/select/dist/auro-select.d.ts +6 -2
- package/components/select/dist/index.js +52 -209
- package/components/select/dist/registered.js +52 -209
- package/custom-elements.json +1611 -1552
- package/package.json +2 -2
|
@@ -9,15 +9,20 @@
|
|
|
9
9
|
<auro-anchorlink fluid href="#restrictedWidth" class="level2 body-xs">Restricted Width</auro-anchorlink>
|
|
10
10
|
<auro-anchorlink fluid href="#scroll" class="level2 body-xs">Scroll</auro-anchorlink>
|
|
11
11
|
<auro-anchorlink fluid href="#nocheckmark" class="level2 body-xs">No Checkmark</auro-anchorlink>
|
|
12
|
+
<auro-anchorlink fluid href="#dividers" class="level2 body-xs">Dividers</auro-anchorlink>
|
|
12
13
|
<auro-anchorlink fluid href="#nestedMenu" class="level2 body-xs">Nested Menu</auro-anchorlink>
|
|
13
14
|
<auro-anchorlink fluid href="#customBehavior">Behavior</auro-anchorlink>
|
|
15
|
+
<auro-anchorlink fluid href="#static" class="level2 body-xs">Static Options</auro-anchorlink>
|
|
16
|
+
<auro-anchorlink fluid href="#matchWord" class="level2 body-xs">Match Word</auro-anchorlink>
|
|
17
|
+
<auro-anchorlink fluid href="#persistent" class="level2 body-xs">Persistent Option</auro-anchorlink>
|
|
18
|
+
<auro-anchorlink fluid href="#nomatch" class="level2 body-xs">No Match Placeholder</auro-anchorlink>
|
|
14
19
|
<auro-anchorlink fluid href="#disabled" class="level2 body-xs">Disabled Options</auro-anchorlink>
|
|
15
20
|
<auro-anchorlink fluid href="#disabledMenu" class="level2 body-xs">Disabled Menu</auro-anchorlink>
|
|
21
|
+
<auro-anchorlink fluid href="#loading" class="level2 body-xs">Loading</auro-anchorlink>
|
|
16
22
|
<auro-anchorlink fluid href="#hidden" class="level2 body-xs">Hidden Options</auro-anchorlink>
|
|
17
23
|
<auro-anchorlink fluid href="#multiselect" class="level2 body-xs">Multi-Select</auro-anchorlink>
|
|
18
24
|
<auro-anchorlink fluid href="#presetValue" class="level2 body-xs">Preset Value</auro-anchorlink>
|
|
19
25
|
<auro-anchorlink fluid href="#presetValueMultiselect" class="level2 body-xs">Preset Value (Multi)</auro-anchorlink>
|
|
20
|
-
<auro-anchorlink fluid href="#preselect" class="level2 body-xs">Pre-Selected</auro-anchorlink>
|
|
21
26
|
</auro-nav>
|
|
22
27
|
</nav>
|
|
23
28
|
<div class="mainContent">
|
|
@@ -52,9 +57,9 @@
|
|
|
52
57
|
--ds-auro-menuoption-text-color: #5b1a6e;
|
|
53
58
|
}
|
|
54
59
|
</style>
|
|
55
|
-
<auro-menu id="customTokensMenu">
|
|
60
|
+
<auro-menu id="customTokensMenu" value="price">
|
|
56
61
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
57
|
-
<auro-menuoption value="price"
|
|
62
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
58
63
|
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
59
64
|
<hr>
|
|
60
65
|
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
@@ -75,9 +80,9 @@
|
|
|
75
80
|
--ds-auro-menuoption-text-color: #5b1a6e;
|
|
76
81
|
}
|
|
77
82
|
</style>
|
|
78
|
-
<auro-menu id="customTokensMenu">
|
|
83
|
+
<auro-menu id="customTokensMenu" value="price">
|
|
79
84
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
80
|
-
<auro-menuoption value="price"
|
|
85
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
81
86
|
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
82
87
|
<hr>
|
|
83
88
|
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
@@ -278,6 +283,47 @@
|
|
|
278
283
|
</auro-menu></code></pre>
|
|
279
284
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
280
285
|
</auro-accordion>
|
|
286
|
+
<auro-header level="3" id="dividers">Dividers</auro-header>
|
|
287
|
+
<p>Insert standard <code><hr></code> elements between <code>auro-menuoption</code> elements to create visual group separators. Dividers are non-interactive and are skipped during keyboard navigation.</p>
|
|
288
|
+
<div class="exampleWrapper">
|
|
289
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/hr.html) -->
|
|
290
|
+
<!-- The below content is automatically added from ./../apiExamples/hr.html -->
|
|
291
|
+
<auro-menu>
|
|
292
|
+
<auro-menuoption value="new tab">New tab</auro-menuoption>
|
|
293
|
+
<auro-menuoption value="new window">New window</auro-menuoption>
|
|
294
|
+
<auro-menuoption value="open file">Open file</auro-menuoption>
|
|
295
|
+
<auro-menuoption value="open location">Open location</auro-menuoption>
|
|
296
|
+
<hr>
|
|
297
|
+
<auro-menuoption value="close window">Close window</auro-menuoption>
|
|
298
|
+
<auro-menuoption value="close tab">Close tab</auro-menuoption>
|
|
299
|
+
<auro-menuoption value="save page as...">Save page as...</auro-menuoption>
|
|
300
|
+
<hr>
|
|
301
|
+
<auro-menuoption value="share">Share</auro-menuoption>
|
|
302
|
+
<hr>
|
|
303
|
+
<auro-menuoption value="print">Print</auro-menuoption>
|
|
304
|
+
</auro-menu>
|
|
305
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
306
|
+
</div>
|
|
307
|
+
<auro-accordion alignRight>
|
|
308
|
+
<span slot="trigger">See code</span>
|
|
309
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/hr.html) -->
|
|
310
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/hr.html -->
|
|
311
|
+
<pre class="language-html"><code class="language-html"><auro-menu>
|
|
312
|
+
<auro-menuoption value="new tab">New tab</auro-menuoption>
|
|
313
|
+
<auro-menuoption value="new window">New window</auro-menuoption>
|
|
314
|
+
<auro-menuoption value="open file">Open file</auro-menuoption>
|
|
315
|
+
<auro-menuoption value="open location">Open location</auro-menuoption>
|
|
316
|
+
<hr>
|
|
317
|
+
<auro-menuoption value="close window">Close window</auro-menuoption>
|
|
318
|
+
<auro-menuoption value="close tab">Close tab</auro-menuoption>
|
|
319
|
+
<auro-menuoption value="save page as...">Save page as...</auro-menuoption>
|
|
320
|
+
<hr>
|
|
321
|
+
<auro-menuoption value="share">Share</auro-menuoption>
|
|
322
|
+
<hr>
|
|
323
|
+
<auro-menuoption value="print">Print</auro-menuoption>
|
|
324
|
+
</auro-menu></code></pre>
|
|
325
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
326
|
+
</auro-accordion>
|
|
281
327
|
<auro-header level="3" id="nestedMenu">Nested Menu</auro-header>
|
|
282
328
|
<p>Nest additional <code>auro-menu</code> elements inside the default slot to create sub-menus. Each nested menu maintains its own selection state.</p>
|
|
283
329
|
<div class="exampleWrapper">
|
|
@@ -358,6 +404,144 @@
|
|
|
358
404
|
</section>
|
|
359
405
|
<section>
|
|
360
406
|
<auro-header level="2" id="customBehavior">Behavior</auro-header>
|
|
407
|
+
<auro-header level="3" id="static">Static Options</auro-header>
|
|
408
|
+
<p>Add the <code>static</code> attribute to an <code>auro-menuoption</code> to make it non-interactive — the option renders but is skipped during keyboard navigation and cannot be selected. Useful for section headers or informational rows inside a menu.</p>
|
|
409
|
+
<div class="exampleWrapper">
|
|
410
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/static.html) -->
|
|
411
|
+
<!-- The below content is automatically added from ./../apiExamples/static.html -->
|
|
412
|
+
<auro-menu>
|
|
413
|
+
<auro-menuoption static>Popular Destinations</auro-menuoption>
|
|
414
|
+
<auro-menuoption value="sea">Seattle (SEA)</auro-menuoption>
|
|
415
|
+
<auro-menuoption value="pdx">Portland (PDX)</auro-menuoption>
|
|
416
|
+
<auro-menuoption value="sfo">San Francisco (SFO)</auro-menuoption>
|
|
417
|
+
<auro-menuoption static>International</auro-menuoption>
|
|
418
|
+
<auro-menuoption value="lhr">London (LHR)</auro-menuoption>
|
|
419
|
+
<auro-menuoption value="nrt">Tokyo (NRT)</auro-menuoption>
|
|
420
|
+
</auro-menu>
|
|
421
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
422
|
+
</div>
|
|
423
|
+
<auro-accordion alignRight>
|
|
424
|
+
<span slot="trigger">See code</span>
|
|
425
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/static.html) -->
|
|
426
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/static.html -->
|
|
427
|
+
<pre class="language-html"><code class="language-html"><auro-menu>
|
|
428
|
+
<auro-menuoption static>Popular Destinations</auro-menuoption>
|
|
429
|
+
<auro-menuoption value="sea">Seattle (SEA)</auro-menuoption>
|
|
430
|
+
<auro-menuoption value="pdx">Portland (PDX)</auro-menuoption>
|
|
431
|
+
<auro-menuoption value="sfo">San Francisco (SFO)</auro-menuoption>
|
|
432
|
+
<auro-menuoption static>International</auro-menuoption>
|
|
433
|
+
<auro-menuoption value="lhr">London (LHR)</auro-menuoption>
|
|
434
|
+
<auro-menuoption value="nrt">Tokyo (NRT)</auro-menuoption>
|
|
435
|
+
</auro-menu></code></pre>
|
|
436
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
437
|
+
</auro-accordion>
|
|
438
|
+
<auro-header level="3" id="matchWord">Match Word</auro-header>
|
|
439
|
+
<p>Set the <code>matchWord</code> property to a string, and any option whose text contains that substring will render the matching portion visually highlighted. Typically driven by an input's <code>keyup</code> handler to power real-time filtering — this is the mechanism <code><auro-combobox></code> uses to highlight matches as the user types.</p>
|
|
440
|
+
<div class="exampleWrapper">
|
|
441
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/match-word.html) -->
|
|
442
|
+
<!-- The below content is automatically added from ./../apiExamples/match-word.html -->
|
|
443
|
+
<auro-input id="matchWordInput" required>
|
|
444
|
+
<span slot="label">Enter a value to match in the menu</span>
|
|
445
|
+
</auro-input>
|
|
446
|
+
<br />
|
|
447
|
+
<auro-menu id="matchWordMenu">
|
|
448
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
449
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
450
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
451
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
452
|
+
<auro-menu>
|
|
453
|
+
<auro-menuoption value="apples">Apples</auro-menuoption>
|
|
454
|
+
<auro-menuoption value="oranges">Oranges</auro-menuoption>
|
|
455
|
+
<auro-menuoption value="peaches">Peaches</auro-menuoption>
|
|
456
|
+
</auro-menu>
|
|
457
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
458
|
+
</auro-menu>
|
|
459
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
460
|
+
</div>
|
|
461
|
+
<auro-accordion alignRight>
|
|
462
|
+
<span slot="trigger">See code</span>
|
|
463
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/match-word.html) -->
|
|
464
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/match-word.html -->
|
|
465
|
+
<pre class="language-html"><code class="language-html"><auro-input id="matchWordInput" required>
|
|
466
|
+
<span slot="label">Enter a value to match in the menu</span>
|
|
467
|
+
</auro-input>
|
|
468
|
+
<br />
|
|
469
|
+
<auro-menu id="matchWordMenu">
|
|
470
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
471
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
472
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
473
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
474
|
+
<auro-menu>
|
|
475
|
+
<auro-menuoption value="apples">Apples</auro-menuoption>
|
|
476
|
+
<auro-menuoption value="oranges">Oranges</auro-menuoption>
|
|
477
|
+
<auro-menuoption value="peaches">Peaches</auro-menuoption>
|
|
478
|
+
</auro-menu>
|
|
479
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
480
|
+
</auro-menu></code></pre>
|
|
481
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
482
|
+
</auro-accordion>
|
|
483
|
+
<auro-header level="3" id="persistent">Persistent Option</auro-header>
|
|
484
|
+
<p>Add the <code>persistent</code> attribute to an <code>auro-menuoption</code> to opt it out of <code>matchWord</code> highlighting. The option remains fully interactive but its label is never rewritten — useful for utility rows like "Add new…" that should render identically regardless of the current filter string.</p>
|
|
485
|
+
<div class="exampleWrapper">
|
|
486
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/persistent.html) -->
|
|
487
|
+
<!-- The below content is automatically added from ./../apiExamples/persistent.html -->
|
|
488
|
+
<auro-input id="persistentExampleInput">
|
|
489
|
+
<span slot="label">Type to highlight matches</span>
|
|
490
|
+
</auro-input>
|
|
491
|
+
<br />
|
|
492
|
+
<auro-menu id="persistentExampleMenu">
|
|
493
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
494
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
495
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
496
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
497
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
498
|
+
<auro-menuoption value="add" persistent>+ Add a new sort option</auro-menuoption>
|
|
499
|
+
</auro-menu>
|
|
500
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
501
|
+
</div>
|
|
502
|
+
<auro-accordion alignRight>
|
|
503
|
+
<span slot="trigger">See code</span>
|
|
504
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/persistent.html) -->
|
|
505
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/persistent.html -->
|
|
506
|
+
<pre class="language-html"><code class="language-html"><auro-input id="persistentExampleInput">
|
|
507
|
+
<span slot="label">Type to highlight matches</span>
|
|
508
|
+
</auro-input>
|
|
509
|
+
<br />
|
|
510
|
+
<auro-menu id="persistentExampleMenu">
|
|
511
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
512
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
513
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
514
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
515
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
516
|
+
<auro-menuoption value="add" persistent>+ Add a new sort option</auro-menuoption>
|
|
517
|
+
</auro-menu></code></pre>
|
|
518
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
519
|
+
</auro-accordion>
|
|
520
|
+
<auro-header level="3" id="nomatch">No Match Placeholder</auro-header>
|
|
521
|
+
<p>Mark an option with the <code>nomatch</code> attribute to designate it as the placeholder shown when no other options match the user's input. When paired with <code><auro-combobox></code>, the combobox toggles the <code>hidden</code> attribute on this option automatically based on filter results.</p>
|
|
522
|
+
<div class="exampleWrapper">
|
|
523
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/nomatch.html) -->
|
|
524
|
+
<!-- The below content is automatically added from ./../apiExamples/nomatch.html -->
|
|
525
|
+
<auro-menu>
|
|
526
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
527
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
528
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
529
|
+
<auro-menuoption nomatch>No matching results</auro-menuoption>
|
|
530
|
+
</auro-menu>
|
|
531
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
532
|
+
</div>
|
|
533
|
+
<auro-accordion alignRight>
|
|
534
|
+
<span slot="trigger">See code</span>
|
|
535
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/nomatch.html) -->
|
|
536
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/nomatch.html -->
|
|
537
|
+
<pre class="language-html"><code class="language-html"><auro-menu>
|
|
538
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
539
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
540
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
541
|
+
<auro-menuoption nomatch>No matching results</auro-menuoption>
|
|
542
|
+
</auro-menu></code></pre>
|
|
543
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
544
|
+
</auro-accordion>
|
|
361
545
|
<auro-header level="3" id="disabled">Disabled Options</auro-header>
|
|
362
546
|
<p>Use the <code>disabled</code> attribute on <code>auro-menuoption</code> to prevent interaction with specific options.</p>
|
|
363
547
|
<div class="exampleWrapper">
|
|
@@ -440,6 +624,123 @@
|
|
|
440
624
|
</auro-menu></code></pre>
|
|
441
625
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
442
626
|
</auro-accordion>
|
|
627
|
+
<auro-header level="3" id="loading">Loading</auro-header>
|
|
628
|
+
<p>Use the <code>loading</code> attribute on <code>auro-menu</code> to indicate that options are being fetched asynchronously. Optional <code>loadingIcon</code> and <code>loadingText</code> slots let you customize the placeholder — a spinner, message, both, or neither.</p>
|
|
629
|
+
<div class="exampleWrapper">
|
|
630
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/loading.html) -->
|
|
631
|
+
<!-- The below content is automatically added from ./../apiExamples/loading.html -->
|
|
632
|
+
<auro-button id="loadingExampleToggleButton">Toggle Loading</auro-button>
|
|
633
|
+
<table id="loadingExampleTable">
|
|
634
|
+
<thead>
|
|
635
|
+
<tr>
|
|
636
|
+
<td width="25%">Spinner + Text</td>
|
|
637
|
+
<td width="25%">Text Only</td>
|
|
638
|
+
<td width="25%">Spinner Only</td>
|
|
639
|
+
<td width="25%">None</td>
|
|
640
|
+
</tr>
|
|
641
|
+
</thead>
|
|
642
|
+
<tr>
|
|
643
|
+
<td>
|
|
644
|
+
<auro-menu>
|
|
645
|
+
<auro-loader slot="loadingIcon" orbit xs></auro-loader><span slot="loadingText">Loading...</span>
|
|
646
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
647
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
648
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
649
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
650
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
651
|
+
</auro-menu>
|
|
652
|
+
</td>
|
|
653
|
+
<td>
|
|
654
|
+
<auro-menu>
|
|
655
|
+
<span slot="loadingText">Loading...</span>
|
|
656
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
657
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
658
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
659
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
660
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
661
|
+
</auro-menu>
|
|
662
|
+
</td>
|
|
663
|
+
<td>
|
|
664
|
+
<auro-menu>
|
|
665
|
+
<auro-loader slot="loadingIcon" orbit xs></auro-loader>
|
|
666
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
667
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
668
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
669
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
670
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
671
|
+
</auro-menu>
|
|
672
|
+
</td>
|
|
673
|
+
<td>
|
|
674
|
+
<auro-menu>
|
|
675
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
676
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
677
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
678
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
679
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
680
|
+
</auro-menu>
|
|
681
|
+
</td>
|
|
682
|
+
</tr>
|
|
683
|
+
</table>
|
|
684
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
685
|
+
</div>
|
|
686
|
+
<auro-accordion alignRight>
|
|
687
|
+
<span slot="trigger">See code</span>
|
|
688
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/loading.html) -->
|
|
689
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/loading.html -->
|
|
690
|
+
<pre class="language-html"><code class="language-html"><auro-button id="loadingExampleToggleButton">Toggle Loading</auro-button>
|
|
691
|
+
<table id="loadingExampleTable">
|
|
692
|
+
<thead>
|
|
693
|
+
<tr>
|
|
694
|
+
<td width="25%">Spinner + Text</td>
|
|
695
|
+
<td width="25%">Text Only</td>
|
|
696
|
+
<td width="25%">Spinner Only</td>
|
|
697
|
+
<td width="25%">None</td>
|
|
698
|
+
</tr>
|
|
699
|
+
</thead>
|
|
700
|
+
<tr>
|
|
701
|
+
<td>
|
|
702
|
+
<auro-menu>
|
|
703
|
+
<auro-loader slot="loadingIcon" orbit xs></auro-loader><span slot="loadingText">Loading...</span>
|
|
704
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
705
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
706
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
707
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
708
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
709
|
+
</auro-menu>
|
|
710
|
+
</td>
|
|
711
|
+
<td>
|
|
712
|
+
<auro-menu>
|
|
713
|
+
<span slot="loadingText">Loading...</span>
|
|
714
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
715
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
716
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
717
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
718
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
719
|
+
</auro-menu>
|
|
720
|
+
</td>
|
|
721
|
+
<td>
|
|
722
|
+
<auro-menu>
|
|
723
|
+
<auro-loader slot="loadingIcon" orbit xs></auro-loader>
|
|
724
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
725
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
726
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
727
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
728
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
729
|
+
</auro-menu>
|
|
730
|
+
</td>
|
|
731
|
+
<td>
|
|
732
|
+
<auro-menu>
|
|
733
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
734
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
735
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
736
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
737
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
738
|
+
</auro-menu>
|
|
739
|
+
</td>
|
|
740
|
+
</tr>
|
|
741
|
+
</table></code></pre>
|
|
742
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
743
|
+
</auro-accordion>
|
|
443
744
|
<auro-header level="3" id="hidden">Hidden Options</auro-header>
|
|
444
745
|
<p>Use the <code>hidden</code> attribute on <code>auro-menuoption</code> to visually hide an option while keeping it in the DOM.</p>
|
|
445
746
|
<div class="exampleWrapper">
|
|
@@ -509,7 +810,7 @@
|
|
|
509
810
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
510
811
|
</auro-accordion>
|
|
511
812
|
<auro-header level="3" id="presetValue">Preset Value</auro-header>
|
|
512
|
-
<p>Use the <code>value</code> attribute on <code>auro-menu</code> to set the selected option when the menu renders.</p>
|
|
813
|
+
<p>Use the <code>value</code> attribute on <code>auro-menu</code> to set the selected option when the menu renders. The value must match a selectable option; if it matches an option marked <code>disabled</code> or <code>static</code>, no option is selected and <code>auroMenu-selectValueFailure</code> is dispatched.</p>
|
|
513
814
|
<div class="exampleWrapper">
|
|
514
815
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/preset-value.html) -->
|
|
515
816
|
<!-- The below content is automatically added from ./../apiExamples/preset-value.html -->
|
|
@@ -562,47 +863,6 @@
|
|
|
562
863
|
</auro-menu></code></pre>
|
|
563
864
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
564
865
|
</auro-accordion>
|
|
565
|
-
<auro-header level="3" id="preselect">Pre-Selected</auro-header>
|
|
566
|
-
<p>Use the <code>selected</code> attribute on <code>auro-menuoption</code> to pre-select an option when the menu renders.</p>
|
|
567
|
-
<div class="exampleWrapper">
|
|
568
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/preselect.html) -->
|
|
569
|
-
<!-- The below content is automatically added from ./../apiExamples/preselect.html -->
|
|
570
|
-
<auro-menu>
|
|
571
|
-
<auro-menuoption value="new tab">New tab</auro-menuoption>
|
|
572
|
-
<auro-menuoption value="new window" selected>New window</auro-menuoption>
|
|
573
|
-
<auro-menuoption value="open file">Open file</auro-menuoption>
|
|
574
|
-
<auro-menuoption value="open location">Open location</auro-menuoption>
|
|
575
|
-
<hr>
|
|
576
|
-
<auro-menuoption value="close window">Close window</auro-menuoption>
|
|
577
|
-
<auro-menuoption value="close tab" disabled>Close tab</auro-menuoption>
|
|
578
|
-
<auro-menuoption value="save page as...">Save page as...</auro-menuoption>
|
|
579
|
-
<hr>
|
|
580
|
-
<auro-menuoption value="share" disabled>Share</auro-menuoption>
|
|
581
|
-
<hr>
|
|
582
|
-
<auro-menuoption value="print">Print</auro-menuoption>
|
|
583
|
-
</auro-menu>
|
|
584
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
585
|
-
</div>
|
|
586
|
-
<auro-accordion alignRight>
|
|
587
|
-
<span slot="trigger">See code</span>
|
|
588
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/preselect.html) -->
|
|
589
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/preselect.html -->
|
|
590
|
-
<pre class="language-html"><code class="language-html"><auro-menu>
|
|
591
|
-
<auro-menuoption value="new tab">New tab</auro-menuoption>
|
|
592
|
-
<auro-menuoption value="new window" selected>New window</auro-menuoption>
|
|
593
|
-
<auro-menuoption value="open file">Open file</auro-menuoption>
|
|
594
|
-
<auro-menuoption value="open location">Open location</auro-menuoption>
|
|
595
|
-
<hr>
|
|
596
|
-
<auro-menuoption value="close window">Close window</auro-menuoption>
|
|
597
|
-
<auro-menuoption value="close tab" disabled>Close tab</auro-menuoption>
|
|
598
|
-
<auro-menuoption value="save page as...">Save page as...</auro-menuoption>
|
|
599
|
-
<hr>
|
|
600
|
-
<auro-menuoption value="share" disabled>Share</auro-menuoption>
|
|
601
|
-
<hr>
|
|
602
|
-
<auro-menuoption value="print">Print</auro-menuoption>
|
|
603
|
-
</auro-menu></code></pre>
|
|
604
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
605
|
-
</auro-accordion>
|
|
606
866
|
</section>
|
|
607
867
|
</div>
|
|
608
868
|
</div>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<auro-header level="2" id="shapeSizeLayout">Shape | Size | Layout Support</auro-header>
|
|
23
23
|
<p>The <code>auro-menu</code> component supports the <code>shape</code> and <code>size</code> feature set. The component defaults to <code>shape="box"</code> and <code>size="sm"</code>. The <code>layout</code> attribute is not supported by this component.</p>
|
|
24
24
|
<auro-header level="3" id="size">Size</auro-header>
|
|
25
|
-
<p>Use the <code>size</code> attribute to change the size of menu options. Supported values are <code>sm</code> (default) and <code>
|
|
25
|
+
<p>Use the <code>size</code> attribute to change the size of menu options. Supported values are <code>xs</code>, <code>sm</code> (default), <code>md</code>, <code>lg</code>, and <code>xl</code>.</p>
|
|
26
26
|
<div class="exampleWrapper">
|
|
27
27
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/size.html) -->
|
|
28
28
|
<!-- The below content is automatically added from ./../apiExamples/size.html -->
|
|
@@ -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>
|