@aurodesignsystem-dev/auro-formkit 0.0.0-pr1396.2 → 0.0.0-pr1397.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +17 -279
  2. package/components/checkbox/demo/api.min.js +1 -1
  3. package/components/checkbox/demo/index.min.js +1 -1
  4. package/components/checkbox/dist/index.js +1 -1
  5. package/components/checkbox/dist/registered.js +1 -1
  6. package/components/combobox/demo/api.min.js +3 -3
  7. package/components/combobox/demo/index.min.js +3 -3
  8. package/components/combobox/dist/index.js +3 -3
  9. package/components/combobox/dist/registered.js +3 -3
  10. package/components/counter/demo/api.min.js +2 -2
  11. package/components/counter/demo/index.min.js +2 -2
  12. package/components/counter/dist/index.js +2 -2
  13. package/components/counter/dist/registered.js +2 -2
  14. package/components/datepicker/demo/api.min.js +3 -3
  15. package/components/datepicker/demo/index.min.js +3 -3
  16. package/components/datepicker/dist/index.js +3 -3
  17. package/components/datepicker/dist/registered.js +3 -3
  18. package/components/dropdown/demo/api.min.js +1 -1
  19. package/components/dropdown/demo/index.min.js +1 -1
  20. package/components/dropdown/demo/keyboardBehavior.md +67 -0
  21. package/components/dropdown/dist/index.js +1 -1
  22. package/components/dropdown/dist/registered.js +1 -1
  23. package/components/form/demo/api.min.js +13 -13
  24. package/components/form/demo/index.min.js +13 -13
  25. package/components/input/demo/api.min.js +1 -1
  26. package/components/input/demo/index.min.js +1 -1
  27. package/components/input/dist/index.js +1 -1
  28. package/components/input/dist/registered.js +1 -1
  29. package/components/radio/demo/api.min.js +1 -1
  30. package/components/radio/demo/index.min.js +1 -1
  31. package/components/radio/dist/index.js +1 -1
  32. package/components/radio/dist/registered.js +1 -1
  33. package/components/select/demo/a11y.md +215 -0
  34. package/components/select/demo/api.min.js +2 -2
  35. package/components/select/demo/contribute.md +17 -0
  36. package/components/select/demo/index.min.js +2 -2
  37. package/components/select/demo/install.md +97 -0
  38. package/components/select/demo/keyboard.html +72 -0
  39. package/components/select/demo/keyboardBehavior.md +247 -0
  40. package/components/select/demo/layout.md +290 -0
  41. package/components/select/demo/ux.html +338 -0
  42. package/components/select/demo/ux.md +206 -0
  43. package/components/select/dist/index.js +2 -2
  44. package/components/select/dist/registered.js +2 -2
  45. package/custom-elements.json +1394 -1394
  46. package/package.json +1 -1
@@ -0,0 +1,97 @@
1
+ # Select - Install
2
+
3
+ ## Getting Started
4
+
5
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=../../../docs/templates/componentInstall.md) -->
6
+ <!-- The below content is automatically added from ../../../docs/templates/componentInstall.md -->
7
+
8
+ #### NPM Installation
9
+
10
+ ```shell
11
+ $ npm i @aurodesignsystem/auro-formkit
12
+ ```
13
+ <!-- AURO-GENERATED-CONTENT:END -->
14
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=../../../docs/templates/gettingStarted.md) -->
15
+ <!-- The below content is automatically added from ../../../docs/templates/gettingStarted.md -->
16
+
17
+ ### TypeScript Module Resolution
18
+
19
+ When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
20
+
21
+ ```json
22
+ {
23
+ "compilerOptions": {
24
+ "moduleResolution": "bundler"
25
+ }
26
+ }
27
+ ```
28
+
29
+ This configuration enables proper module resolution for the component's TypeScript files.
30
+ <!-- AURO-GENERATED-CONTENT:END -->
31
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/customRegistration.md) -->
32
+ <!-- The below content is automatically added from ./../docs/partials/customRegistration.md -->
33
+
34
+ ## Custom Component Registration for Version Management
35
+
36
+ There are two key parts to every Auro component: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition. The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
37
+
38
+ When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
39
+
40
+ However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), you can manually register the class under a custom element name to avoid conflicts.
41
+
42
+ You can do this by importing only the component class and using the `register(name)` method with a unique name:
43
+
44
+ ```js
45
+ // Import the class only
46
+ import { AuroSelect } from '@aurodesignsystem/auro-formkit/auro-select/class';
47
+
48
+ // Register with a custom name if desired
49
+ AuroSelect.register('custom-select');
50
+ ```
51
+
52
+ This will create a new custom element `<custom-select>` that behaves exactly like `<auro-select>`, allowing both to coexist on the same page without interfering with each other.
53
+
54
+ <div class="exampleWrapper exampleWrapper--flex">
55
+ <custom-select placeholder="Placeholder Text">
56
+ <span slot="bib.fullscreen.headline">Bib Headline</span>
57
+ <span slot="label">Label</span>
58
+ <auro-menu>
59
+ <auro-menuoption value="stops">Stops</auro-menuoption>
60
+ <auro-menuoption value="price">Price</auro-menuoption>
61
+ <auro-menuoption value="duration">Duration</auro-menuoption>
62
+ <auro-menuoption value="departure">Departure</auro-menuoption>
63
+ <auro-menuoption value="arrival">Arrival</auro-menuoption>
64
+ <auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
65
+ </auro-menu>
66
+ </custom-select>
67
+ </div>
68
+ <auro-accordion alignRight>
69
+ <span slot="trigger">See code</span>
70
+
71
+ ```html
72
+ <custom-select placeholder="Placeholder Text">
73
+ <span slot="bib.fullscreen.headline">Bib Headline</span>
74
+ <span slot="label">Label</span>
75
+ <auro-menu>
76
+ <auro-menuoption value="stops">Stops</auro-menuoption>
77
+ <auro-menuoption value="price">Price</auro-menuoption>
78
+ <auro-menuoption value="duration">Duration</auro-menuoption>
79
+ <auro-menuoption value="departure">Departure</auro-menuoption>
80
+ <auro-menuoption value="arrival">Arrival</auro-menuoption>
81
+ <auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
82
+ </auro-menu>
83
+ </custom-select>
84
+ ```
85
+ </auro-accordion>
86
+ <!-- AURO-GENERATED-CONTENT:END -->
87
+
88
+ ## Install from CDN
89
+
90
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=../../../docs/templates/bundleInstallDescription.md) -->
91
+ <!-- The below content is automatically added from ../../../docs/templates/bundleInstallDescription.md -->
92
+ In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
93
+
94
+ ```html
95
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-select/+esm"></script>
96
+ ```
97
+ <!-- AURO-GENERATED-CONTENT:END -->
@@ -0,0 +1,72 @@
1
+ <!--
2
+ Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
3
+ See LICENSE in the project root for license information.
4
+
5
+ HTML in this document is standardized and NOT to be edited.
6
+ All demo code should be added/edited in ./demo/index.md
7
+
8
+ With the exception of adding custom elements if needed for the demo.
9
+
10
+ ----------------------- DO NOT EDIT -----------------------------
11
+
12
+ -->
13
+
14
+ <!DOCTYPE html>
15
+ <html lang="en">
16
+ <head>
17
+ <meta charset="UTF-8" />
18
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
+ <title>Auro Web Component Demo | auro-select</title>
20
+
21
+ <!-- Prism.js Stylesheet -->
22
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
23
+
24
+ <!-- Legacy reference is still needed to support auro-select's use of legacy token values at this time -->
25
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
26
+
27
+ <!-- Design Token Alaska Theme -->
28
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
29
+
30
+ <!-- Webcore Stylesheet Alaska Theme -->
31
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
32
+
33
+ <!-- Demo Specific Styles -->
34
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
35
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
36
+ <style>
37
+ table {
38
+ --ds-color-container-secondary-default: transparent;
39
+ }
40
+
41
+ tr:not(:last-of-type) {
42
+ border-bottom: 1px solid var(--ds-color-border-tertiary-default);
43
+ }
44
+
45
+ sup {
46
+ font-size: 60%;
47
+ font-style: italic;
48
+ opacity: 0.6;
49
+ top: -.5rem;
50
+ }
51
+ </style>
52
+ </head>
53
+ <body class="auro-markdown">
54
+ <main></main>
55
+
56
+ <script type="module">
57
+ import 'https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js';
58
+ import 'https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js';
59
+ fetch('./keyboardBehavior.md')
60
+ .then((response) => response.text())
61
+ .then((text) => {
62
+ const rawHtml = marked.parse(text);
63
+ document.querySelector('main').innerHTML = rawHtml;
64
+ Prism.highlightAll();
65
+ })
66
+ </script>
67
+ <script src="./index.min.js" data-demo-script="true" type="module"></script>
68
+
69
+ <!-- If additional elements are needed for the demo, add them here. -->
70
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
71
+ </body>
72
+ </html>
@@ -0,0 +1,247 @@
1
+ <auro-header level="1" id="overview">Select - Keyboard Behavior</auro-header>
2
+ <div class="contentWrapper">
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>&lt;auro-select></code> component inherits the default tabindex behavior of <code>&lt;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.<auro-hyperlink></p>
20
+ <p> When the component is <code>disabled</code> it is removed from the tab order by the browser. VoiceOver's virtual cursor (swipe navigation) 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 expanded, 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.</p>
22
+ <!-- AURO-GENERATED-CONTENT:END -->
23
+ <p>There are no focusable elements inside the <code>&lt;auro-select></code> bib content.</p>
24
+ <auro-header level="2" id="keyEvents">Key Events</auro-header>
25
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/keyEvents.md) -->
26
+ <!-- The below content is automatically added from ./../docs/partials/keyEvents.md -->
27
+ <table>
28
+ <thead>
29
+ <tr>
30
+ <th>Key</th>
31
+ <th>Modifier</th>
32
+ <th>Current State</th>
33
+ <th>Focus Element</th>
34
+ <th>Behavior</th>
35
+ </tr>
36
+ </thead>
37
+ <tbody>
38
+ <tr>
39
+ <td rowspan="6">ArrowDown</td>
40
+ <td rowspan="2">-</td>
41
+ <td>Collapsed</td>
42
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
43
+ <td>Opens the bib.</td>
44
+ </tr>
45
+ <tr>
46
+ <td>Expanded</td>
47
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
48
+ <td>
49
+ Advances the <code>activeOption</code> to the next enabled option in the list. If the current <code>activeOption</code> is the last enabled option, selection wraps to the first enabled option.
50
+ </td>
51
+ </tr>
52
+ <tr>
53
+ <td rowspan="2">Command</td>
54
+ <td>Collapsed</td>
55
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
56
+ <td>Opens the bib.</td>
57
+ </tr>
58
+ <tr>
59
+ <td>Expanded</td>
60
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
61
+ <td>
62
+ Advances the <code>activeOption</code> to the last enabled option in the list.
63
+ </td>
64
+ </tr>
65
+ <tr>
66
+ <td rowspan="2">Option</td>
67
+ <td>Collapsed</td>
68
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
69
+ <td>Opens the bib.</td>
70
+ </tr>
71
+ <tr>
72
+ <td>Expanded</td>
73
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
74
+ <td>
75
+ Advances the <code>activeOption</code> to the last enabled option in the list.
76
+ </td>
77
+ </tr>
78
+ <tr>
79
+ <td rowspan="6">ArrowUp</td>
80
+ <td rowspan="2">-</td>
81
+ <td>Collapsed</td>
82
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
83
+ <td>Opens the bib.</td>
84
+ </tr>
85
+ <tr>
86
+ <td>Expanded</td>
87
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
88
+ <td>
89
+ Advances the <code>activeOption</code> to the previous enabled option in the list. If the current <code>activeOption</code> is the first enabled option, selection wraps to the last enabled option.
90
+ </td>
91
+ </tr>
92
+ <tr>
93
+ <td rowspan="2">Command</td>
94
+ <td>Collapsed</td>
95
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
96
+ <td>Opens the bib.</td>
97
+ </tr>
98
+ <tr>
99
+ <td>Expanded</td>
100
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
101
+ <td>
102
+ Advances the <code>activeOption</code> to the first enabled option in the list.
103
+ </td>
104
+ </tr>
105
+ <tr>
106
+ <td rowspan="2">Option</td>
107
+ <td>Collapsed</td>
108
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
109
+ <td>Opens the bib.</td>
110
+ </tr>
111
+ <tr>
112
+ <td>Expanded</td>
113
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
114
+ <td>
115
+ Advances the <code>activeOption</code> to the first enabled option in the list.
116
+ </td>
117
+ </tr>
118
+ <tr>
119
+ <td>End</td>
120
+ <td>-</td>
121
+ <td>Expanded</td>
122
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
123
+ <td>
124
+ Advances the <code>activeOption</code> to the last enabled option in the list.
125
+ </td>
126
+ </tr>
127
+ <tr>
128
+ <td>Enter</td>
129
+ <td>-</td>
130
+ <td>Expanded</td>
131
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
132
+ <td>
133
+ The current <code>activeOption</code> is selected.
134
+ </td>
135
+ </tr>
136
+ <tr>
137
+ <td>Home</td>
138
+ <td>-</td>
139
+ <td>Expanded</td>
140
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
141
+ <td>
142
+ Advances the <code>activeOption</code> to the first enabled option in the list.
143
+ </td>
144
+ </tr>
145
+ <tr>
146
+ <td>PageDown</td>
147
+ <td>-</td>
148
+ <td>Expanded</td>
149
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
150
+ <td>
151
+ The browser advances the <code>activeOption</code> by approximately one “page” of visible options (typically equal to the number of rendered rows). The scroll position updates in tandem so that the newly active option is brought into view, usually aligning near the bottom of the visible list.
152
+ </td>
153
+ </tr>
154
+ <tr>
155
+ <td>PageUp</td>
156
+ <td>-</td>
157
+ <td>Expanded</td>
158
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
159
+ <td>
160
+ The browser moves the <code>activeOption</code> up by approximately one “page” of visible items (typically equal to the number of rendered rows). The scroll position updates accordingly so the newly active option is brought into view, often aligning near the top of the visible list.
161
+ </td>
162
+ </tr>
163
+ <tr>
164
+ <td rowspan="2">Tab</td>
165
+ <td>-</td>
166
+ <td>Expanded</td>
167
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
168
+ <td>
169
+ The current <code>activeOption</code> is selected.
170
+ <br />
171
+ <i><strong>Note:</strong> the page will also navigate to the next focusable element in the tabindex order.</i>
172
+ </td>
173
+ </tr>
174
+ <tr>
175
+ <td>Shift</td>
176
+ <td>Expanded</td>
177
+ <td>*<sup><a href="#fn_FocusAll">1</a></sup></td>
178
+ <td>
179
+ Advances the <code>activeOption</code> to the first enabled option in the list.
180
+ <br />
181
+ <i><strong>Note:</strong> the page will <strong>NOT</strong> navigate to the previous focusable element in the tabindex order.</i>
182
+ </td>
183
+ </tr>
184
+ </tbody>
185
+ </table>
186
+ <!-- AURO-GENERATED-CONTENT:END -->
187
+ <auro-header level="3" id="keyEventsDropdown">Key Events inherited from Auro-Dropdown</auro-header>
188
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../dropdown/docs/partials/keyEvents.md) -->
189
+ <!-- The below content is automatically added from ./../../dropdown/docs/partials/keyEvents.md -->
190
+ <table>
191
+ <thead>
192
+ <tr>
193
+ <th>Key</th>
194
+ <th>Modifier</th>
195
+ <th>Current State</th>
196
+ <th>Focus Element</th>
197
+ <th>Behavior</th>
198
+ </tr>
199
+ </thead>
200
+ <tbody>
201
+ <tr>
202
+ <td rowspan="2">Enter</td>
203
+ <td>-</td>
204
+ <td>Collapsed</td>
205
+ <td>*<sup>1</sup></td>
206
+ <td>Opens the bib.</td>
207
+ </tr>
208
+ <tr>
209
+ <td>-</td>
210
+ <td>Expanded</td>
211
+ <td>*<sup>1</sup></td>
212
+ <td>Closes the bib.</td>
213
+ </tr>
214
+ <tr>
215
+ <td>Escape</td>
216
+ <td>-</td>
217
+ <td>Expanded</td>
218
+ <td>*<sup>1</sup></td>
219
+ <td>Closes the bib.</td>
220
+ </tr>
221
+ <tr>
222
+ <td rowspan="2">Space</td>
223
+ <td>-</td>
224
+ <td>Collapsed</td>
225
+ <td>*<sup>1</sup></td>
226
+ <td>Opens the bib.</td>
227
+ </tr>
228
+ <tr>
229
+ <td>-</td>
230
+ <td>Expanded</td>
231
+ <td>*<sup>1</sup></td>
232
+ <td>Closes the bib.</td>
233
+ </tr>
234
+ </tbody>
235
+ </table>
236
+ <!-- AURO-GENERATED-CONTENT:END -->
237
+ <section class="footnotes">
238
+ <hr />
239
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../../docs/partials/footnotes/1.md) -->
240
+ <!-- The below content is automatically added from ./../../../docs/partials/footnotes/1.md -->
241
+ <span class="fineprint" id="fn_FocusAll">
242
+ 1. Current focus is `:host` or any focusable element within the component.
243
+ </span>
244
+ <!-- AURO-GENERATED-CONTENT:END -->
245
+ </section>
246
+ </div>
247
+ </div>