@aurodesignsystem-dev/auro-formkit 0.0.0-pr1451.1 → 0.0.0-pr1451.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/README.md +23 -37
- package/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/readme.md +0 -2
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/README.md +43 -57
- package/components/combobox/demo/accessibility.html +22 -11
- package/components/combobox/demo/api.html +27 -16
- package/components/combobox/demo/api.min.js +4 -4
- package/components/combobox/demo/design.html +27 -16
- package/components/combobox/demo/index.html +28 -22
- package/components/combobox/demo/index.min.js +4 -4
- package/components/combobox/demo/install.html +26 -16
- package/components/combobox/demo/install.md +0 -2
- package/components/combobox/demo/install.min.js +4 -4
- package/components/combobox/demo/keyboard-behavior.html +22 -11
- package/components/combobox/demo/readme.html +27 -16
- package/components/combobox/demo/readme.md +0 -2
- package/components/combobox/demo/styles.css +911 -71
- package/components/combobox/demo/voiceover.html +22 -11
- package/components/combobox/dist/index.js +4 -4
- package/components/combobox/dist/registered.js +4 -4
- package/components/counter/README.md +39 -53
- package/components/counter/demo/api.min.js +2 -2
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/demo/readme.md +0 -2
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/README.md +19 -33
- package/components/datepicker/demo/api.min.js +4 -4
- package/components/datepicker/demo/index.min.js +4 -4
- package/components/datepicker/demo/readme.md +0 -2
- package/components/datepicker/dist/index.js +4 -4
- package/components/datepicker/dist/registered.js +4 -4
- package/components/dropdown/README.md +39 -53
- package/components/dropdown/demo/api.min.js +1 -1
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/demo/readme.md +0 -2
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/README.md +14 -30
- package/components/form/demo/api.min.js +16 -16
- package/components/form/demo/index.min.js +16 -16
- package/components/form/demo/readme.md +0 -2
- package/components/input/README.md +17 -31
- package/components/input/demo/api.min.js +2 -2
- package/components/input/demo/index.min.js +2 -2
- package/components/input/demo/readme.md +0 -2
- package/components/input/dist/index.js +2 -2
- package/components/input/dist/registered.js +2 -2
- package/components/menu/README.md +23 -37
- package/components/menu/demo/readme.md +0 -2
- package/components/radio/README.md +21 -35
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/readme.md +0 -2
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/README.md +41 -73
- package/components/select/demo/accessibility.html +23 -20
- package/components/select/demo/api.html +45 -10
- package/components/select/demo/api.min.js +2 -2
- package/components/select/demo/design.html +94 -0
- package/components/select/demo/design.md +391 -0
- package/components/select/demo/getting-started.html +125 -0
- package/components/select/demo/getting-started.js +9 -0
- package/components/select/demo/getting-started.md +1020 -0
- package/components/select/demo/getting-started.min.js +10490 -0
- package/components/select/demo/index.html +55 -241
- package/components/select/demo/index.md +38 -98
- package/components/select/demo/index.min.js +2 -2
- package/components/select/demo/install.md +92 -0
- package/components/select/demo/keyboard-behavior.html +23 -11
- package/components/select/demo/keyboard-behavior.md +247 -36
- package/components/select/demo/keyboardBehavior.html +22 -11
- package/components/select/demo/layout.html +45 -10
- package/components/select/demo/layout.md +71 -260
- package/components/select/demo/readme.html +46 -11
- package/components/select/demo/readme.md +25 -45
- package/components/select/demo/styles.css +1026 -0
- package/components/select/demo/voiceover.html +23 -11
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +1667 -1667
- package/package.json +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<auro-header level="2" id="setup">Setup</auro-header>
|
|
2
|
+
<auro-accordion-group Emphasis>
|
|
3
|
+
<auro-accordion expanded class="section" id="recommendedAccordion">
|
|
4
|
+
<span slot="trigger">Recommended Installation and Implementation</span>
|
|
5
|
+
<div class="accordion-content">
|
|
6
|
+
<auro-header level="3">Install</auro-header>
|
|
7
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../../docs/templates/componentInstall.md) -->
|
|
8
|
+
<!-- The below content is automatically added from ./../../../docs/templates/componentInstall.md -->
|
|
9
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-formkit</code></pre>
|
|
10
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
11
|
+
<auro-header level="3">Implementation</auro-header>
|
|
12
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/customRegistration.md) -->
|
|
13
|
+
<!-- The below content is automatically added from ./../docs/partials/customRegistration.md -->
|
|
14
|
+
<p>Every Auro component consists of a JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and a <a href="https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define">custom element registration</a>. The class defines the component's behavior, and the registration maps it to an HTML tag name so it can be used in markup.</p>
|
|
15
|
+
<p>The default import (shown above) handles both steps automatically, registering the component under its standard tag name.</p>
|
|
16
|
+
<p>If you need multiple versions of the same component on a single page — for example, when two projects depend on different versions — you can register the class under a custom tag name to avoid conflicts.</p>
|
|
17
|
+
<p>To do this, import the component class directly and call its `register(name)` method with a unique name:</p>
|
|
18
|
+
<pre class="language-js"><code class="language-js">// Import the classes
|
|
19
|
+
import { AuroSelect } from '@aurodesignsystem/auro-formkit/auro-select/class';
|
|
20
|
+
import { AuroMenu } from '@aurodesignsystem/auro-formkit/auro-menu/class';
|
|
21
|
+
import { AuroMenuOption } from '@aurodesignsystem/auro-formkit/auro-menuoption/class';
|
|
22
|
+
|
|
23
|
+
// Register each component with a custom name
|
|
24
|
+
AuroSelect.register('custom-select');
|
|
25
|
+
AuroMenu.register('custom-menu');
|
|
26
|
+
AuroMenuOption.register('custom-menuoption');</code></pre>
|
|
27
|
+
|
|
28
|
+
The `<auro-menu>` and `<auro-menuoption>` components must also be custom registered when using a custom `<auro-select>` registration. All three components work together and need to be registered under the same custom naming convention.
|
|
29
|
+
|
|
30
|
+
This will create new custom elements that behave exactly like their standard counterparts, allowing both to coexist on the same page without interfering with each other.
|
|
31
|
+
|
|
32
|
+
<pre class="language-html"><code class="language-html"><custom-select placeholder="Placeholder Text" id="custom-select">
|
|
33
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
34
|
+
<span slot="label">Label</span>
|
|
35
|
+
<custom-menu>
|
|
36
|
+
<custom-menuoption value="stops">Stops</custom-menuoption>
|
|
37
|
+
<custom-menuoption value="price">Price</custom-menuoption>
|
|
38
|
+
<custom-menuoption value="duration">Duration</custom-menuoption>
|
|
39
|
+
<custom-menuoption value="departure">Departure</custom-menuoption>
|
|
40
|
+
<custom-menuoption value="arrival">Arrival</custom-menuoption>
|
|
41
|
+
<custom-menuoption value="prefer alaska">Prefer Alaska</custom-menuoption>
|
|
42
|
+
</custom-menu>
|
|
43
|
+
</custom-select></code></pre>
|
|
44
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
45
|
+
</div>
|
|
46
|
+
</auro-accordion>
|
|
47
|
+
<auro-accordion class="section" id="autoAccordion">
|
|
48
|
+
<span slot="trigger">Auto Installation and Implementation</span>
|
|
49
|
+
<div class="accordion-content">
|
|
50
|
+
<p class="warning"><strong>Warning:</strong> Default registration can cause conflicts if another package registers the same tag name using a different version of the component, leading to unexpected behavior. Use custom registration to avoid this risk.</p>
|
|
51
|
+
<auro-header level="3">Install</auro-header>
|
|
52
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../../docs/templates/componentInstall.md) -->
|
|
53
|
+
<!-- The below content is automatically added from ./../../../docs/templates/componentInstall.md -->
|
|
54
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-formkit</code></pre>
|
|
55
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
56
|
+
<auro-header level="3">Implementation</auro-header>
|
|
57
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/defaultRegistration.md) -->
|
|
58
|
+
<!-- The below content is automatically added from ./../docs/partials/defaultRegistration.md -->
|
|
59
|
+
<p>Once installed, the component can be used in your project by importing the component's registered module:</p>
|
|
60
|
+
<pre class="language-js"><code class="language-js">import '@aurodesignsystem/auro-formkit/auro-select';</code></pre>
|
|
61
|
+
<p>This import registers the <code><auro-select></code> custom element globally. You can then use it in your HTML:</p>
|
|
62
|
+
<pre class="language-html"><code class="language-html"><auro-select id="default-select">
|
|
63
|
+
<span slot="label">Choose an option</span>
|
|
64
|
+
<auro-menu>
|
|
65
|
+
<auro-menuoption value="option1">Option 1</auro-menuoption>
|
|
66
|
+
<auro-menuoption value="option2">Option 2</auro-menuoption>
|
|
67
|
+
</auro-menu>
|
|
68
|
+
</auro-select></code></pre>
|
|
69
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
70
|
+
</div>
|
|
71
|
+
</auro-accordion>
|
|
72
|
+
<auro-accordion class="section" id="cdnAccordion">
|
|
73
|
+
<span slot="trigger">CDN Installation and Implementation</span>
|
|
74
|
+
<div class="accordion-content">
|
|
75
|
+
<p class="warning"><strong>Warning:</strong> CDN install & registration can cause conflicts if another package registers the same tag name using a different version of the component, leading to unexpected behavior. Use custom registration to avoid this risk.</p>
|
|
76
|
+
<auro-header level="3">Install & Implementation</auro-header>
|
|
77
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/cdnRegistration.md) -->
|
|
78
|
+
<!-- The below content is automatically added from ./../docs/partials/cdnRegistration.md -->
|
|
79
|
+
<p>Add the following script tag to your HTML to load the component directly from a CDN:</p>
|
|
80
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-select/+esm"></script></code></pre>
|
|
81
|
+
<p>This script registers the <code><auro-select></code> custom element globally. You can then use it in your HTML:</p>
|
|
82
|
+
<pre class="language-html"><code class="language-html"><auro-select id="cdn-select">
|
|
83
|
+
<span slot="label">Choose an option</span>
|
|
84
|
+
<auro-menu>
|
|
85
|
+
<auro-menuoption value="option1">Option 1</auro-menuoption>
|
|
86
|
+
<auro-menuoption value="option2">Option 2</auro-menuoption>
|
|
87
|
+
</auro-menu>
|
|
88
|
+
</auro-select></code></pre>
|
|
89
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
90
|
+
</div>
|
|
91
|
+
</auro-accordion>
|
|
92
|
+
</auro-accordion-group>
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
19
|
<title>Auro Web Component Demo | auro-select</title>
|
|
20
20
|
|
|
21
|
-
<!--
|
|
22
|
-
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/
|
|
21
|
+
<!-- highlight.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
|
|
23
23
|
|
|
24
24
|
<!-- Legacy reference is still needed to support auro-select's use of legacy token values at this time -->
|
|
25
25
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
<!-- Demo Specific Styles -->
|
|
34
34
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
35
35
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
36
|
+
<link rel="stylesheet" type="text/css" href="./styles.css" />
|
|
36
37
|
<style>
|
|
37
38
|
table {
|
|
38
39
|
--ds-color-container-secondary-default: transparent;
|
|
@@ -63,15 +64,26 @@
|
|
|
63
64
|
<main></main>
|
|
64
65
|
|
|
65
66
|
<script type="module">
|
|
66
|
-
import 'https://
|
|
67
|
-
import 'https://
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
import {unified} from 'https://esm.sh/unified';
|
|
68
|
+
import remarkParse from 'https://esm.sh/remark-parse';
|
|
69
|
+
import remarkGfm from 'https://esm.sh/remark-gfm';
|
|
70
|
+
import remarkRehype from 'https://esm.sh/remark-rehype';
|
|
71
|
+
import rehypeRaw from 'https://esm.sh/rehype-raw';
|
|
72
|
+
import rehypeHighlight from 'https://esm.sh/rehype-highlight';
|
|
73
|
+
import rehypeStringify from 'https://esm.sh/rehype-stringify';
|
|
74
|
+
|
|
75
|
+
const response = await fetch('./keyboard-behavior.md');
|
|
76
|
+
const text = await response.text();
|
|
77
|
+
const result = await unified()
|
|
78
|
+
.use(remarkParse)
|
|
79
|
+
.use(remarkGfm)
|
|
80
|
+
.use(remarkRehype, { allowDangerousHtml: true })
|
|
81
|
+
.use(rehypeRaw)
|
|
82
|
+
.use(rehypeHighlight)
|
|
83
|
+
.use(rehypeStringify)
|
|
84
|
+
.process(text);
|
|
85
|
+
|
|
86
|
+
document.querySelector('main').innerHTML = String(result);
|
|
75
87
|
</script>
|
|
76
88
|
|
|
77
89
|
<!-- If additional elements are needed for the demo, add them here. -->
|
|
@@ -1,39 +1,250 @@
|
|
|
1
1
|
<auro-header level="1" id="overview">Select - Keyboard Behavior</auro-header>
|
|
2
2
|
<div class="contentWrapper">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
3
|
+
<nav>
|
|
4
|
+
<auro-nav anchorNavContent=".scrollWrapper">
|
|
5
|
+
<!-- <span slot="label">Anchor Navigation</span> -->
|
|
6
|
+
<span slot="mobileToggleCollapsed">View More</span>
|
|
7
|
+
<span slot="mobileToggleExpanded">View Less</span>
|
|
8
|
+
<auro-anchorlink fluid href="#keyboard">Keyboard Behavior</auro-anchorlink>
|
|
9
|
+
<auro-anchorlink fluid href="#tabBehavior" class="level2 body-xs">Tab Behavior</auro-anchorlink>
|
|
10
|
+
<auro-anchorlink fluid href="#keyEvents" class="level2 body-xs">Key Events</auro-anchorlink>
|
|
11
|
+
</auro-nav>
|
|
12
|
+
</nav>
|
|
13
|
+
<div class="mainContent">
|
|
14
|
+
<div class="scrollWrapper">
|
|
15
|
+
<auro-header level="2" id="tabBehavior">Tab Behavior</auro-header>
|
|
16
|
+
<p>The <code><auro-select></code> component inherits the default tabindex behavior of <code><auro-dropdown></code> with no modifications.</p>
|
|
17
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../dropdown/docs/partials/tabindex.md) -->
|
|
18
|
+
<!-- The below content is automatically added from ./../../dropdown/docs/partials/tabindex.md -->
|
|
19
|
+
<p>The trigger is a focusable element and participates in the standard tab order, responding to <code>Tab</code> and <code>Shift+Tab</code> key events per <auro-hyperlink href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/tabindex">native browser behavior, i.e., these keys step through the browser tabindex sequence.</auro-hyperlink></p>
|
|
20
|
+
<p>When the component is <code>disabled</code> it is removed from the <code>tabindex</code> sequence. VoiceOver's virtual cursor <em>(swipe navigation)</em> can still encounter the component, but standard keyboard <code>Tab</code> navigation skips it.</p>
|
|
21
|
+
<p>When the bib is collapsed, the bib content is excluded from the tab sequence. When <strong>expanded</strong>, focusable elements within the bib content are included in the natural tab order. In fullscreen mode, focus is trapped within the bib, and the tab sequence cycles through the bib content focusable elements until the bib is closed or the viewport no longer meets the fullscreen condition and is rendered as a popover.</p>
|
|
22
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
23
|
+
<p>There are no focusable elements inside the <code><auro-select></code> bib content.</p>
|
|
24
|
+
<div class="note">
|
|
25
|
+
<strong>Note:</strong> The following HTML5 select element keyboard behavior is unsupported in <code><auro-select multiSelect></code>:
|
|
26
|
+
<ul>
|
|
27
|
+
<li><strong>Extending selection (Shift+Arrow)</strong></li>
|
|
28
|
+
<li><strong>Select all (Cmd+A):</strong> Select all options</li>
|
|
29
|
+
</ul>
|
|
30
|
+
</div>
|
|
31
|
+
<auro-header level="2" id="keyEvents">Key Events</auro-header>
|
|
32
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/keyEvents.md) -->
|
|
33
|
+
<!-- The below content is automatically added from ./../docs/partials/keyEvents.md -->
|
|
34
|
+
<table>
|
|
35
|
+
<thead>
|
|
36
|
+
<tr>
|
|
37
|
+
<th>Key</th>
|
|
38
|
+
<th>Modifier</th>
|
|
39
|
+
<th>Current State</th>
|
|
40
|
+
<th>Focus Element</th>
|
|
41
|
+
<th>Behavior</th>
|
|
42
|
+
</tr>
|
|
43
|
+
</thead>
|
|
44
|
+
<tbody>
|
|
45
|
+
<tr>
|
|
46
|
+
<td rowspan="6">ArrowDown</td>
|
|
47
|
+
<td rowspan="2">-</td>
|
|
48
|
+
<td>Collapsed</td>
|
|
49
|
+
<td>Trigger element</td>
|
|
50
|
+
<td>Opens the bib.</td>
|
|
51
|
+
</tr>
|
|
52
|
+
<tr>
|
|
53
|
+
<td>Expanded</td>
|
|
54
|
+
<td>Trigger element</td>
|
|
55
|
+
<td>
|
|
56
|
+
Advances the <code>focused</code> option to the next enabled option in the list. If the current <code>focused</code> option is the last enabled option, selection wraps to the first enabled option.
|
|
57
|
+
</td>
|
|
58
|
+
</tr>
|
|
59
|
+
<tr>
|
|
60
|
+
<td rowspan="2">Command</td>
|
|
61
|
+
<td>Collapsed</td>
|
|
62
|
+
<td>Trigger element</td>
|
|
63
|
+
<td>Opens the bib.</td>
|
|
64
|
+
</tr>
|
|
65
|
+
<tr>
|
|
66
|
+
<td>Expanded</td>
|
|
67
|
+
<td>Trigger element</td>
|
|
68
|
+
<td>
|
|
69
|
+
Advances the <code>focused</code> option to the last enabled option in the list.
|
|
70
|
+
</td>
|
|
71
|
+
</tr>
|
|
72
|
+
<tr>
|
|
73
|
+
<td rowspan="2">Option</td>
|
|
74
|
+
<td>Collapsed</td>
|
|
75
|
+
<td>Trigger element</td>
|
|
76
|
+
<td>Opens the bib.</td>
|
|
77
|
+
</tr>
|
|
78
|
+
<tr>
|
|
79
|
+
<td>Expanded</td>
|
|
80
|
+
<td>Trigger element</td>
|
|
81
|
+
<td>
|
|
82
|
+
Advances the <code>focused</code> option to the last enabled option in the list.
|
|
83
|
+
</td>
|
|
84
|
+
</tr>
|
|
85
|
+
<tr>
|
|
86
|
+
<td rowspan="6">ArrowUp</td>
|
|
87
|
+
<td rowspan="2">-</td>
|
|
88
|
+
<td>Collapsed</td>
|
|
89
|
+
<td>Trigger element</td>
|
|
90
|
+
<td>Opens the bib.</td>
|
|
91
|
+
</tr>
|
|
92
|
+
<tr>
|
|
93
|
+
<td>Expanded</td>
|
|
94
|
+
<td>Trigger element</td>
|
|
95
|
+
<td>
|
|
96
|
+
Advances the <code>focused</code> option to the previous enabled option in the list. If the current <code>focused</code> option is the first enabled option, selection wraps to the last enabled option.
|
|
97
|
+
</td>
|
|
98
|
+
</tr>
|
|
99
|
+
<tr>
|
|
100
|
+
<td rowspan="2">Command</td>
|
|
101
|
+
<td>Collapsed</td>
|
|
102
|
+
<td>Trigger element</td>
|
|
103
|
+
<td>Opens the bib.</td>
|
|
104
|
+
</tr>
|
|
105
|
+
<tr>
|
|
106
|
+
<td>Expanded</td>
|
|
107
|
+
<td>Trigger element</td>
|
|
108
|
+
<td>
|
|
109
|
+
Advances the <code>focused</code> option to the first enabled option in the list.
|
|
110
|
+
</td>
|
|
111
|
+
</tr>
|
|
112
|
+
<tr>
|
|
113
|
+
<td rowspan="2">Option</td>
|
|
114
|
+
<td>Collapsed</td>
|
|
115
|
+
<td>Trigger element</td>
|
|
116
|
+
<td>Opens the bib.</td>
|
|
117
|
+
</tr>
|
|
118
|
+
<tr>
|
|
119
|
+
<td>Expanded</td>
|
|
120
|
+
<td>Trigger element</td>
|
|
121
|
+
<td>
|
|
122
|
+
Advances the <code>focused</code> option to the first enabled option in the list.
|
|
123
|
+
</td>
|
|
124
|
+
</tr>
|
|
125
|
+
<tr>
|
|
126
|
+
<td>End</td>
|
|
127
|
+
<td>-</td>
|
|
128
|
+
<td>Expanded</td>
|
|
129
|
+
<td>Trigger element</td>
|
|
130
|
+
<td>
|
|
131
|
+
Advances the <code>focused</code> option to the last enabled option in the list.
|
|
132
|
+
</td>
|
|
133
|
+
</tr>
|
|
134
|
+
<tr>
|
|
135
|
+
<td rowspan="2">Enter</td>
|
|
136
|
+
<td rowspan="2">-</td>
|
|
137
|
+
<td>
|
|
138
|
+
Expanded, without <code>multiSelect</code>
|
|
139
|
+
</td>
|
|
140
|
+
<td>Trigger element</td>
|
|
141
|
+
<td>
|
|
142
|
+
The current <code>focused</code> option is selected, closes the bib.
|
|
143
|
+
</td>
|
|
144
|
+
</tr>
|
|
145
|
+
<tr>
|
|
146
|
+
<td>
|
|
147
|
+
Expanded, with <code>multiSelect</code>
|
|
148
|
+
</td>
|
|
149
|
+
<td>Trigger element</td>
|
|
150
|
+
<td>
|
|
151
|
+
The current <code>focused</code> option is toggled, does not close the bib.
|
|
152
|
+
</td>
|
|
153
|
+
</tr>
|
|
154
|
+
<tr>
|
|
155
|
+
<td>Home</td>
|
|
156
|
+
<td>-</td>
|
|
157
|
+
<td>Expanded</td>
|
|
158
|
+
<td>Trigger element</td>
|
|
159
|
+
<td>
|
|
160
|
+
Advances the <code>focused</code> option to the first enabled option in the list.
|
|
161
|
+
</td>
|
|
162
|
+
</tr>
|
|
163
|
+
<tr>
|
|
164
|
+
<td rowspan="2">Tab</td>
|
|
165
|
+
<td>-</td>
|
|
166
|
+
<td>Expanded</td>
|
|
167
|
+
<td>Trigger element</td>
|
|
168
|
+
<td>
|
|
169
|
+
The current <code>focused</code> option is selected.
|
|
170
|
+
<div class="note">
|
|
171
|
+
<strong>Note:</strong> the page will also navigate to the next focusable element in the tabindex sequence.
|
|
172
|
+
</div>
|
|
173
|
+
</td>
|
|
174
|
+
</tr>
|
|
175
|
+
<tr>
|
|
176
|
+
<td>Shift</td>
|
|
177
|
+
<td>Expanded</td>
|
|
178
|
+
<td>Trigger element</td>
|
|
179
|
+
<td>
|
|
180
|
+
The current <code>focused</code> option is selected.
|
|
181
|
+
<div class="note">
|
|
182
|
+
<strong>Note:</strong> the page will also navigate to the previous focusable element in the tabindex sequence.
|
|
183
|
+
</div>
|
|
184
|
+
</td>
|
|
185
|
+
</tr>
|
|
186
|
+
</tbody>
|
|
187
|
+
</table>
|
|
188
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
189
|
+
<auro-header level="3" id="keyEventsDropdown">Key Events inherited from Auro-Dropdown</auro-header>
|
|
190
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../dropdown/docs/partials/keyEvents.md) -->
|
|
191
|
+
<!-- The below content is automatically added from ./../../dropdown/docs/partials/keyEvents.md -->
|
|
192
|
+
<table>
|
|
193
|
+
<thead>
|
|
194
|
+
<tr>
|
|
195
|
+
<th>Key</th>
|
|
196
|
+
<th>Modifier</th>
|
|
197
|
+
<th>Current State</th>
|
|
198
|
+
<th>Focus Element</th>
|
|
199
|
+
<th>Behavior</th>
|
|
200
|
+
</tr>
|
|
201
|
+
</thead>
|
|
202
|
+
<tbody>
|
|
203
|
+
<tr>
|
|
204
|
+
<td rowspan="2">Enter</td>
|
|
205
|
+
<td>-</td>
|
|
206
|
+
<td>Collapsed</td>
|
|
207
|
+
<td>
|
|
208
|
+
Trigger or any <strong>focusable</strong> element within the trigger.
|
|
209
|
+
</td>
|
|
210
|
+
<td>Opens the bib.</td>
|
|
211
|
+
</tr>
|
|
212
|
+
<tr>
|
|
213
|
+
<td>-</td>
|
|
214
|
+
<td>Expanded</td>
|
|
215
|
+
<td>
|
|
216
|
+
Trigger or any <strong>focusable</strong> element within the trigger.
|
|
217
|
+
</td>
|
|
218
|
+
<td>Closes the bib.</td>
|
|
219
|
+
</tr>
|
|
220
|
+
<tr>
|
|
221
|
+
<td>Escape</td>
|
|
222
|
+
<td>-</td>
|
|
223
|
+
<td>Expanded</td>
|
|
224
|
+
<td>
|
|
225
|
+
Component <code>:host</code> or any <strong>focusable</strong> element within the component.
|
|
226
|
+
</td>
|
|
227
|
+
<td>Closes the bib.</td>
|
|
228
|
+
</tr>
|
|
229
|
+
<tr>
|
|
230
|
+
<td rowspan="2">Space</td>
|
|
231
|
+
<td>-</td>
|
|
232
|
+
<td>Collapsed</td>
|
|
233
|
+
<td>
|
|
234
|
+
Trigger or any <strong>focusable</strong> element within the trigger.
|
|
235
|
+
</td>
|
|
236
|
+
<td>Opens the bib.</td>
|
|
237
|
+
</tr>
|
|
238
|
+
<tr>
|
|
239
|
+
<td>-</td>
|
|
240
|
+
<td>Expanded</td>
|
|
241
|
+
<td>
|
|
242
|
+
Trigger or any <strong>focusable</strong> element within the trigger.
|
|
243
|
+
</td>
|
|
244
|
+
<td>Closes the bib.</td>
|
|
245
|
+
</tr>
|
|
246
|
+
</tbody>
|
|
247
|
+
</table>
|
|
248
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
249
|
+
</div>
|
|
39
250
|
</div>
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
19
|
<title>Auro Web Component Demo | auro-select</title>
|
|
20
20
|
|
|
21
|
-
<!--
|
|
22
|
-
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/
|
|
21
|
+
<!-- highlight.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
|
|
23
23
|
|
|
24
24
|
<!-- Legacy reference is still needed to support auro-select's use of legacy token values at this time -->
|
|
25
25
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
@@ -63,15 +63,26 @@
|
|
|
63
63
|
<main></main>
|
|
64
64
|
|
|
65
65
|
<script type="module">
|
|
66
|
-
import 'https://
|
|
67
|
-
import 'https://
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
import {unified} from 'https://esm.sh/unified';
|
|
67
|
+
import remarkParse from 'https://esm.sh/remark-parse';
|
|
68
|
+
import remarkGfm from 'https://esm.sh/remark-gfm';
|
|
69
|
+
import remarkRehype from 'https://esm.sh/remark-rehype';
|
|
70
|
+
import rehypeRaw from 'https://esm.sh/rehype-raw';
|
|
71
|
+
import rehypeHighlight from 'https://esm.sh/rehype-highlight';
|
|
72
|
+
import rehypeStringify from 'https://esm.sh/rehype-stringify';
|
|
73
|
+
|
|
74
|
+
const response = await fetch('./keyboardBehavior.md');
|
|
75
|
+
const text = await response.text();
|
|
76
|
+
const result = await unified()
|
|
77
|
+
.use(remarkParse)
|
|
78
|
+
.use(remarkGfm)
|
|
79
|
+
.use(remarkRehype, { allowDangerousHtml: true })
|
|
80
|
+
.use(rehypeRaw)
|
|
81
|
+
.use(rehypeHighlight)
|
|
82
|
+
.use(rehypeStringify)
|
|
83
|
+
.process(text);
|
|
84
|
+
|
|
85
|
+
document.querySelector('main').innerHTML = String(result);
|
|
75
86
|
</script>
|
|
76
87
|
|
|
77
88
|
<!-- If additional elements are needed for the demo, add them here. -->
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
19
|
<title>Auro Web Component Demo | auro-select | Layout</title>
|
|
20
20
|
|
|
21
|
-
<!--
|
|
22
|
-
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/
|
|
21
|
+
<!-- highlight.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
|
|
23
23
|
|
|
24
24
|
<!-- Legacy reference is still needed to support auro-select's use of legacy token values at this time -->
|
|
25
25
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
@@ -33,20 +33,55 @@
|
|
|
33
33
|
<!-- Demo Specific Styles -->
|
|
34
34
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
35
35
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
36
|
+
<link rel="stylesheet" type="text/css" href="./styles.css" />
|
|
36
37
|
</head>
|
|
37
38
|
<body class="auro-markdown">
|
|
38
39
|
<main></main>
|
|
39
40
|
|
|
40
41
|
<script type="module">
|
|
41
|
-
import 'https://
|
|
42
|
-
import 'https://
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
import {unified} from 'https://esm.sh/unified';
|
|
43
|
+
import remarkParse from 'https://esm.sh/remark-parse';
|
|
44
|
+
import remarkGfm from 'https://esm.sh/remark-gfm';
|
|
45
|
+
import remarkRehype from 'https://esm.sh/remark-rehype';
|
|
46
|
+
import rehypeRaw from 'https://esm.sh/rehype-raw';
|
|
47
|
+
import rehypeHighlight from 'https://esm.sh/rehype-highlight';
|
|
48
|
+
import rehypeStringify from 'https://esm.sh/rehype-stringify';
|
|
49
|
+
|
|
50
|
+
const response = await fetch('./layout.md');
|
|
51
|
+
const text = await response.text();
|
|
52
|
+
const result = await unified()
|
|
53
|
+
.use(remarkParse)
|
|
54
|
+
.use(remarkGfm)
|
|
55
|
+
.use(remarkRehype, { allowDangerousHtml: true })
|
|
56
|
+
.use(rehypeRaw)
|
|
57
|
+
.use(rehypeHighlight)
|
|
58
|
+
.use(rehypeStringify)
|
|
59
|
+
.process(text);
|
|
60
|
+
|
|
61
|
+
document.querySelector('main').innerHTML = String(result);
|
|
62
|
+
addCopyButtons();
|
|
63
|
+
|
|
64
|
+
function addCopyButtons() {
|
|
65
|
+
document.querySelectorAll('pre code[class*="language-"], pre code[class*="hljs"]').forEach((code) => {
|
|
66
|
+
const pre = code.parentElement;
|
|
67
|
+
const wrapper = document.createElement('div');
|
|
68
|
+
wrapper.className = 'pre-wrapper';
|
|
69
|
+
pre.parentNode.insertBefore(wrapper, pre);
|
|
70
|
+
wrapper.appendChild(pre);
|
|
71
|
+
const btn = document.createElement('button');
|
|
72
|
+
btn.className = 'copy-btn';
|
|
73
|
+
btn.textContent = 'Copy';
|
|
74
|
+
btn.addEventListener('click', () => {
|
|
75
|
+
const raw = code.textContent;
|
|
76
|
+
const text = raw.replace(/\u200B/g, '').replace(/^\n+/, '').replace(/\n+$/, '\n').replace(/^\$ /, '');
|
|
77
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
78
|
+
btn.textContent = 'Copied!';
|
|
79
|
+
setTimeout(() => { btn.textContent = 'Copy'; }, 1500);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
wrapper.appendChild(btn);
|
|
49
83
|
});
|
|
84
|
+
}
|
|
50
85
|
</script>
|
|
51
86
|
|
|
52
87
|
<!-- If additional elements are needed for the demo, add them here. -->
|