@aurodesignsystem-dev/auro-formkit 0.0.0-pr1448.0 → 0.0.0-pr1451.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 (163) hide show
  1. package/components/checkbox/demo/api.md +201 -221
  2. package/components/checkbox/demo/api.min.js +1 -1
  3. package/components/checkbox/demo/index.md +21 -23
  4. package/components/checkbox/demo/index.min.js +1 -1
  5. package/components/checkbox/demo/keyboard-behavior.md +39 -0
  6. package/components/checkbox/demo/readme.md +23 -35
  7. package/components/checkbox/dist/auro-checkbox-group.d.ts +6 -6
  8. package/components/checkbox/dist/auro-checkbox.d.ts +8 -8
  9. package/components/checkbox/dist/index.js +1 -1
  10. package/components/checkbox/dist/registered.js +1 -1
  11. package/components/combobox/README.md +13 -3
  12. package/components/combobox/demo/accessibility.html +57 -0
  13. package/components/combobox/demo/accessibility.md +77 -0
  14. package/components/combobox/demo/api.html +24 -0
  15. package/components/combobox/demo/api.md +1613 -1685
  16. package/components/combobox/demo/api.min.js +15 -21
  17. package/components/combobox/demo/design.html +83 -0
  18. package/components/combobox/demo/design.md +283 -0
  19. package/components/combobox/demo/index.html +49 -16
  20. package/components/combobox/demo/index.js +3 -2
  21. package/components/combobox/demo/index.md +861 -185
  22. package/components/combobox/demo/index.min.js +41 -22
  23. package/components/combobox/demo/install.html +84 -0
  24. package/components/combobox/demo/install.js +24 -0
  25. package/components/combobox/demo/install.md +100 -0
  26. package/components/combobox/demo/install.min.js +17991 -0
  27. package/components/combobox/demo/{keyboardBehavior.html → keyboard-behavior.html} +2 -1
  28. package/components/combobox/demo/keyboard-behavior.md +276 -0
  29. package/components/combobox/demo/layout.md +112 -0
  30. package/components/combobox/demo/readme.html +25 -1
  31. package/components/combobox/demo/readme.md +50 -52
  32. package/components/combobox/demo/styles.css +141 -0
  33. package/components/combobox/demo/voiceover.html +66 -0
  34. package/components/combobox/demo/voiceover.md +118 -0
  35. package/components/combobox/dist/auro-combobox.d.ts +36 -36
  36. package/components/combobox/dist/index.js +12 -17
  37. package/components/combobox/dist/registered.js +12 -17
  38. package/components/counter/demo/api.md +751 -819
  39. package/components/counter/demo/api.min.js +2 -2
  40. package/components/counter/demo/index.md +35 -39
  41. package/components/counter/demo/index.min.js +2 -2
  42. package/components/counter/demo/keyboard-behavior.md +127 -0
  43. package/components/counter/demo/readme.md +39 -51
  44. package/components/counter/dist/auro-counter-group.d.ts +2 -2
  45. package/components/counter/dist/auro-counter.d.ts +10 -10
  46. package/components/counter/dist/index.js +2 -2
  47. package/components/counter/dist/registered.js +2 -2
  48. package/components/datepicker/demo/api.md +827 -931
  49. package/components/datepicker/demo/api.min.js +4 -4
  50. package/components/datepicker/demo/index.md +79 -87
  51. package/components/datepicker/demo/index.min.js +4 -4
  52. package/components/datepicker/demo/keyboard-behavior.md +19 -0
  53. package/components/datepicker/demo/readme.md +19 -31
  54. package/components/datepicker/dist/index.js +4 -4
  55. package/components/datepicker/dist/registered.js +4 -4
  56. package/components/datepicker/dist/{auro-calendar-cell.d.ts → src/auro-calendar-cell.d.ts} +2 -2
  57. package/components/datepicker/dist/{auro-datepicker.d.ts → src/auro-datepicker.d.ts} +13 -13
  58. package/components/datepicker/dist/{utilities.d.ts → src/utilities.d.ts} +4 -4
  59. package/components/datepicker/dist/{utilitiesCalendar.d.ts → src/utilitiesCalendar.d.ts} +3 -3
  60. package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +2 -2
  61. package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker.d.ts +1 -1
  62. package/components/dropdown/demo/api.md +795 -851
  63. package/components/dropdown/demo/api.min.js +1 -1
  64. package/components/dropdown/demo/index.md +145 -155
  65. package/components/dropdown/demo/index.min.js +1 -1
  66. package/components/dropdown/demo/keyboard-behavior.md +72 -0
  67. package/components/dropdown/demo/readme.md +39 -51
  68. package/components/dropdown/dist/auro-dropdown.d.ts +22 -22
  69. package/components/dropdown/dist/auro-dropdownBib.d.ts +3 -3
  70. package/components/dropdown/dist/dropdownBibKeyboardStrategy.d.ts +1 -1
  71. package/components/dropdown/dist/index.js +1 -1
  72. package/components/dropdown/dist/registered.js +1 -1
  73. package/components/form/demo/api.md +173 -179
  74. package/components/form/demo/api.min.js +27 -33
  75. package/components/form/demo/index.md +27 -33
  76. package/components/form/demo/index.min.js +27 -33
  77. package/components/form/demo/keyboard-behavior.md +38 -0
  78. package/components/form/demo/readme.md +14 -28
  79. package/components/input/demo/api.md +572 -664
  80. package/components/input/demo/api.min.js +2 -2
  81. package/components/input/demo/index.md +93 -99
  82. package/components/input/demo/index.min.js +2 -2
  83. package/components/input/demo/keyboard-behavior.md +25 -0
  84. package/components/input/demo/readme.md +17 -29
  85. package/components/input/dist/auro-input.d.ts +1 -1
  86. package/components/input/dist/base-input.d.ts +29 -29
  87. package/components/input/dist/index.js +2 -2
  88. package/components/input/dist/registered.js +2 -2
  89. package/components/menu/demo/api.md +745 -789
  90. package/components/menu/demo/api.min.js +3 -4
  91. package/components/menu/demo/index.md +35 -37
  92. package/components/menu/demo/index.min.js +3 -4
  93. package/components/menu/demo/keyboard-behavior.md +18 -0
  94. package/components/menu/demo/readme.md +23 -35
  95. package/components/menu/dist/auro-menu-utils.d.ts +1 -1
  96. package/components/menu/dist/auro-menu.context.d.ts +3 -3
  97. package/components/menu/dist/auro-menu.d.ts +5 -5
  98. package/components/menu/dist/auro-menuoption.d.ts +6 -6
  99. package/components/menu/dist/index.js +3 -4
  100. package/components/menu/dist/registered.js +3 -4
  101. package/components/radio/demo/api.md +318 -350
  102. package/components/radio/demo/api.min.js +1 -1
  103. package/components/radio/demo/index.md +25 -29
  104. package/components/radio/demo/index.min.js +1 -1
  105. package/components/radio/demo/keyboard-behavior.md +72 -0
  106. package/components/radio/demo/readme.md +21 -33
  107. package/components/radio/dist/auro-radio-group.d.ts +9 -9
  108. package/components/radio/dist/auro-radio.d.ts +8 -8
  109. package/components/radio/dist/index.js +1 -1
  110. package/components/radio/dist/registered.js +1 -1
  111. package/components/select/README.md +12 -1
  112. package/components/select/demo/accessibility.html +65 -0
  113. package/components/select/demo/accessibility.md +76 -0
  114. package/components/select/demo/api.md +1713 -1793
  115. package/components/select/demo/api.min.js +5 -6
  116. package/components/select/demo/index.html +247 -37
  117. package/components/select/demo/index.md +225 -345
  118. package/components/select/demo/index.min.js +5 -6
  119. package/components/select/demo/keyboard-behavior.md +39 -0
  120. package/components/select/demo/layout.html +59 -0
  121. package/components/select/demo/layout.md +299 -0
  122. package/components/select/demo/readme.md +45 -46
  123. package/components/select/demo/voiceover.html +65 -0
  124. package/components/select/demo/voiceover.md +183 -0
  125. package/components/select/dist/auro-select.d.ts +11 -11
  126. package/components/select/dist/index.js +2 -2
  127. package/components/select/dist/registered.js +2 -2
  128. package/custom-elements.json +13 -11
  129. package/package.json +26 -26
  130. package/components/checkbox/demo/keyboardBehavior.md +0 -0
  131. package/components/combobox/demo/keyboardBehavior.md +0 -281
  132. package/components/counter/demo/keyboardBehavior.md +0 -127
  133. package/components/datepicker/demo/keyboardBehavior.md +0 -19
  134. package/components/dropdown/demo/keyboardBehavior.md +0 -77
  135. package/components/form/demo/keyboardBehavior.md +0 -0
  136. package/components/input/demo/keyboardBehavior.md +0 -0
  137. package/components/menu/demo/keyboardBehavior.md +0 -0
  138. package/components/radio/demo/keyboardBehavior.md +0 -0
  139. package/components/select/demo/keyboardBehavior.md +0 -245
  140. /package/components/datepicker/dist/{auro-calendar-month.d.ts → src/auro-calendar-month.d.ts} +0 -0
  141. /package/components/datepicker/dist/{auro-calendar.d.ts → src/auro-calendar.d.ts} +0 -0
  142. /package/components/datepicker/dist/{buttonVersion.d.ts → src/buttonVersion.d.ts} +0 -0
  143. /package/components/datepicker/dist/{datepickerKeyboardStrategy.d.ts → src/datepickerKeyboardStrategy.d.ts} +0 -0
  144. /package/components/datepicker/dist/{iconVersion.d.ts → src/iconVersion.d.ts} +0 -0
  145. /package/components/datepicker/dist/{index.d.ts → src/index.d.ts} +0 -0
  146. /package/components/datepicker/dist/{popoverVersion.d.ts → src/popoverVersion.d.ts} +0 -0
  147. /package/components/datepicker/dist/{styles → src/styles}/classic/color-css.d.ts +0 -0
  148. /package/components/datepicker/dist/{styles → src/styles}/classic/style-css.d.ts +0 -0
  149. /package/components/datepicker/dist/{styles → src/styles}/color-calendar-css.d.ts +0 -0
  150. /package/components/datepicker/dist/{styles → src/styles}/color-cell-css.d.ts +0 -0
  151. /package/components/datepicker/dist/{styles → src/styles}/color-css.d.ts +0 -0
  152. /package/components/datepicker/dist/{styles → src/styles}/color-month-css.d.ts +0 -0
  153. /package/components/datepicker/dist/{styles → src/styles}/shapeSize-css.d.ts +0 -0
  154. /package/components/datepicker/dist/{styles → src/styles}/snowflake/color-css.d.ts +0 -0
  155. /package/components/datepicker/dist/{styles → src/styles}/snowflake/style-css.d.ts +0 -0
  156. /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-cell-css.d.ts +0 -0
  157. /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-css.d.ts +0 -0
  158. /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-month-css.d.ts +0 -0
  159. /package/components/datepicker/dist/{styles → src/styles}/style-css.d.ts +0 -0
  160. /package/components/datepicker/dist/{styles → src/styles}/tokens-css.d.ts +0 -0
  161. /package/components/datepicker/dist/{utilitiesCalendarRender.d.ts → src/utilitiesCalendarRender.d.ts} +0 -0
  162. /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/day.d.ts +0 -0
  163. /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
@@ -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;
@@ -65,7 +66,7 @@
65
66
  <script type="module">
66
67
  import 'https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js';
67
68
  import 'https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js';
68
- fetch('./keyboardBehavior.md')
69
+ fetch('./keyboard-behavior.md')
69
70
  .then((response) => response.text())
70
71
  .then((text) => {
71
72
  const rawHtml = marked.parse(text);
@@ -0,0 +1,276 @@
1
+ <auro-header level="1" id="overview">Combobox - Keyboard Behavior</auro-header>
2
+ <div class="contentWrapper">
3
+ <div class="mainContent">
4
+ <div class="scrollWrapper">
5
+ <auro-header level="2" id="tabBehavior">Tab Behavior</auro-header>
6
+ <p>The component trigger contains an <code>&lt;auro-input&gt;</code> which has two elements:</p>
7
+ <ol>
8
+ <li><strong>Input</strong></li>
9
+ <li><strong>Clear button:</strong> only shown when the input has a value.</li>
10
+ </ol>
11
+ <p>Each focusable element <em>(when shown)</em> participates in the browser window's default <code>tabindex</code> sequence.</p>
12
+ <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>
13
+ <p>On <strong>large viewport devices</strong> (e.g., desktop browser, tablet) there is no focusable content inside the component bib.</p>
14
+ <p>On <strong>small viewport devices</strong> (e.g., phone) the bib opens a modal dialog with a focusable <strong>input</strong> and <strong>clear button</strong> which can receive <strong>Click</strong> and <strong>Tap</strong> events.</p>
15
+ <auro-header level="2" id="keyEvents">Key Events</auro-header>
16
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/keyEvents.md) -->
17
+ <!-- The below content is automatically added from ./../docs/partials/keyEvents.md -->
18
+ <div class="note">
19
+ <p><strong>Static vs Dynamic Option List:</strong> The <strong>expanded</strong> state can never be applied without list options rendered into the DOM. Since the component supports dynamic option lists generated <em>after</em> a value is typed into the <strong>input</strong>, certain key events (as noted in the <strong>Current State</strong> column of the table below) only function with the option list rendered into the DOM.</p>
20
+ </div>
21
+ <table>
22
+ <thead>
23
+ <tr>
24
+ <th>Key</th>
25
+ <th>Modifier</th>
26
+ <th>Current State</th>
27
+ <th>Focus Element</th>
28
+ <th>Behavior</th>
29
+ </tr>
30
+ </thead>
31
+ <tbody>
32
+ <tr>
33
+ <td rowspan="6">ArrowDown</td>
34
+ <td rowspan="2">-</td>
35
+ <td>Collapsed, list options have been populated</td>
36
+ <td>
37
+ Trigger input element, <strong>NOT</strong> the trigger input clear button
38
+ </td>
39
+ <td>Opens the bib.</td>
40
+ </tr>
41
+ <tr>
42
+ <td>Expanded</td>
43
+ <td>
44
+ Input element, <strong>NOT</strong> the input clear button
45
+ <div class="note">
46
+ <strong>Note:</strong> Includes both trigger and bib content inputs depending on viewport size.
47
+ </div>
48
+ </td>
49
+ <td>
50
+ 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.
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <td rowspan="2">Command</td>
55
+ <td>Collapsed, list options have been populated</td>
56
+ <td>
57
+ Trigger input element, <strong>NOT</strong> the trigger input clear button
58
+ </td>
59
+ <td>Opens the bib.</td>
60
+ </tr>
61
+ <tr>
62
+ <td>Expanded</td>
63
+ <td>
64
+ Input element, <strong>NOT</strong> the input clear button
65
+ <div class="note">
66
+ <strong>Note:</strong> Includes both trigger and bib content inputs.
67
+ </div>
68
+ </td>
69
+ <td>
70
+ Advances the <code>focused</code> option to the last enabled option in the list.
71
+ </td>
72
+ </tr>
73
+ <tr>
74
+ <td rowspan="2">Option</td>
75
+ <td>Collapsed, list options have been populated</td>
76
+ <td>
77
+ Trigger input element, <strong>NOT</strong> the trigger input clear button
78
+ </td>
79
+ <td>Opens the bib.</td>
80
+ </tr>
81
+ <tr>
82
+ <td>Expanded</td>
83
+ <td>
84
+ Input element, <strong>NOT</strong> the input clear button
85
+ <div class="note">
86
+ <strong>Note:</strong> Includes both trigger and bib content inputs.
87
+ </div>
88
+ </td>
89
+ <td>
90
+ Advances the <code>focused</code> option to the last enabled option in the list.
91
+ </td>
92
+ </tr>
93
+ <tr>
94
+ <td rowspan="6">ArrowUp</td>
95
+ <td rowspan="2">-</td>
96
+ <td>Collapsed, list options have been populated</td>
97
+ <td>
98
+ Trigger input element, <strong>NOT</strong> the trigger input clear button
99
+ </td>
100
+ <td>Opens the bib.</td>
101
+ </tr>
102
+ <tr>
103
+ <td>Expanded</td>
104
+ <td>
105
+ Input element, <strong>NOT</strong> the input clear button
106
+ <div class="note">
107
+ <strong>Note:</strong> Includes both trigger and bib content inputs.
108
+ </div>
109
+ </td>
110
+ <td>
111
+ 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.
112
+ </td>
113
+ </tr>
114
+ <tr>
115
+ <td rowspan="2">Command</td>
116
+ <td>Collapsed, list options have been populated</td>
117
+ <td>
118
+ Trigger input element, <strong>NOT</strong> the trigger input clear button
119
+ </td>
120
+ <td>Opens the bib.</td>
121
+ </tr>
122
+ <tr>
123
+ <td>Expanded</td>
124
+ <td>
125
+ Input element, <strong>NOT</strong> the input clear button
126
+ <div class="note">
127
+ <strong>Note:</strong> Includes both trigger and bib content inputs.
128
+ </div>
129
+ </td>
130
+ <td>
131
+ Advances the <code>focused</code> option to the first enabled option in the list.
132
+ </td>
133
+ </tr>
134
+ <tr>
135
+ <td rowspan="2">Option</td>
136
+ <td>Collapsed, list options have been populated</td>
137
+ <td>
138
+ Input element, <strong>NOT</strong> the input clear button
139
+ </td>
140
+ <td>Opens the bib.</td>
141
+ </tr>
142
+ <tr>
143
+ <td>Expanded</td>
144
+ <td>
145
+ Input element, <strong>NOT</strong> the input clear button
146
+ <div class="note">
147
+ <strong>Note:</strong> Includes both trigger and bib content inputs.
148
+ </div>
149
+ </td>
150
+ <td>
151
+ Advances the <code>focused</code> option to the first enabled option in the list.
152
+ </td>
153
+ </tr>
154
+ <tr>
155
+ <td>End</td>
156
+ <td>-</td>
157
+ <td>Expanded</td>
158
+ <td>
159
+ Input element, <strong>NOT</strong> the input clear button
160
+ <div class="note">
161
+ <strong>Note:</strong> Includes both trigger and bib content inputs.
162
+ </div>
163
+ </td>
164
+ <td>
165
+ Advances the <code>focused</code> option to the last enabled option in the list.
166
+ </td>
167
+ </tr>
168
+ <tr>
169
+ <td rowspan="4">Enter</td>
170
+ <td rowspan="4">-</td>
171
+ <td>Collapsed, list options have been populated</td>
172
+ <td>
173
+ Trigger input, <strong>NOT</strong> the input clear button
174
+ </td>
175
+ <td>
176
+ The bib is opened.
177
+ </td>
178
+ </tr>
179
+ <tr>
180
+ <td>Collapsed</td>
181
+ <td>
182
+ Input clear button, <strong>NOT</strong> the input element
183
+ </td>
184
+ <td>
185
+ The <strong>input</strong> value is cleared, <strong>focus</strong> moves to the trigger input element.
186
+ </td>
187
+ </tr>
188
+ <tr>
189
+ <td>Expanded, large viewport device</td>
190
+ <td>
191
+ Trigger input element, <strong>NOT</strong> the trigger input clear button
192
+ </td>
193
+ <td>
194
+ The current <code>focused</code> option is selected, closes the bib and <strong>focus</strong> is returned to the trigger input element.
195
+ </td>
196
+ </tr>
197
+ <tr>
198
+ <td>Expanded, small viewport device</td>
199
+ <td>
200
+ Dialog input element, <strong>NOT</strong> the dialog input clear button
201
+ </td>
202
+ <td>
203
+ The current <code>focused</code> option is selected, closes the bib and <strong>focus</strong> is returned to the trigger input element.
204
+ </td>
205
+ </tr>
206
+ <tr>
207
+ <td>Escape</td>
208
+ <td>-</td>
209
+ <td>Expanded</td>
210
+ <td>
211
+ Input element, <strong>NOT</strong> the input clear button
212
+ <div class="note">
213
+ <strong>Note:</strong> Includes both trigger and bib content inputs.
214
+ </div>
215
+ </td>
216
+ <td>
217
+ Closes the bib, moves <strong>focus</strong> to the trigger input element.
218
+ </td>
219
+ </tr>
220
+ <tr>
221
+ <td>Home</td>
222
+ <td>-</td>
223
+ <td>Expanded</td>
224
+ <td>
225
+ Input element, <strong>NOT</strong> the input clear button
226
+ <div class="note">
227
+ <strong>Note:</strong> Includes both trigger and bib content inputs.
228
+ </div>
229
+ </td>
230
+ <td>
231
+ Advances the <code>focused</code> option to the first enabled option in the list.
232
+ </td>
233
+ </tr>
234
+ <tr>
235
+ <td rowspan="2">Tab</td>
236
+ <td>-</td>
237
+ <td>Expanded</td>
238
+ <td>
239
+ Input element, <strong>NOT</strong> the input clear button
240
+ <div class="note">
241
+ <strong>Note:</strong> Includes both trigger and bib content inputs.
242
+ </div>
243
+ </td>
244
+ <td>
245
+ The current <code>focused</code> option is selected, the bib is closed and <strong>focus</strong> is moved to the <strong>clear button</strong> in the component trigger.
246
+ </td>
247
+ </tr>
248
+ <tr>
249
+ <td>Shift</td>
250
+ <td>Expanded</td>
251
+ <td>
252
+ Input element, <strong>NOT</strong> the input clear button
253
+ <div class="note">
254
+ <strong>Note:</strong> Includes both trigger and bib content inputs.
255
+ </div>
256
+ </td>
257
+ <td>
258
+ Advances the <code>focused</code> option to the first enabled option in the list.
259
+ <div class="note">
260
+ <strong>Note:</strong> the bib will <strong>NOT</strong> close and the page will <strong>NOT</strong> navigate to the previous focusable element in the tabindex order.
261
+ </div>
262
+ </td>
263
+ </tr>
264
+ </tbody>
265
+ </table>
266
+ <!-- AURO-GENERATED-CONTENT:END -->
267
+ <div class="note">
268
+ <p><strong>Note:</strong> The following keyboard behavior is unsupported at this time:</p>
269
+ <ul>
270
+ <li><strong>PageUp:</strong> The browser moves the <code>focused</code> option up by approximately one <strong>page</strong> of visible options (typically equal to the number of rendered rows). The scroll position updates in tandem so that the newly focused option is brought into view, usually aligning near the top of the visible list.</li>
271
+ <li><strong>PageDown:</strong> The browser advances the <code>focused</code> option down by approximately one <strong>page</strong> of visible items (typically equal to the number of rendered rows). The scroll position updates accordingly so the newly focused option is brought into view, often aligning near the bottom of the visible list.</li>
272
+ </ul>
273
+ </div>
274
+ </div>
275
+ </div>
276
+ </div>
@@ -0,0 +1,112 @@
1
+ <p>The component consists of the following elements:</p>
2
+ <ul>
3
+ <li>
4
+ <strong>trigger:</strong> shows the component label, current value and will render to reflect state of the component (e.g. <code>focus</code>, <code>hover</code>, <code>disabled</code>, <code>valid</code>, <code>invalid</code>), and a flag marking instances that are required. The trigger includes a text input that allows the user to type and filter the available options.
5
+ </li>
6
+ <li>
7
+ <strong>options list:</strong> a list of options that may be selected which are rendered in an element which can be expanded/collapsed by interacting with the trigger. The list is filtered based on user input.
8
+ </li>
9
+ <li>
10
+ <strong>help text:</strong> descriptive text rendered below the trigger intended to help clarify the intended use of the component instance and any current validation error with instructions to resolve those errors.
11
+ </li>
12
+ </ul>
13
+ <auro-header level="4" id="trigger">Trigger</auro-header>
14
+ <p>The trigger includes the component label, a flag marking the component optional/required and the current value. This label is required in order to ensure correct behavior when a guest is using accessibility tools such as screen readers and VoiceOver utilities. The invalid state will also announce to accessibility tools when applied.</p>
15
+ <p>The optional/required flag content may be customized.</p>
16
+ <p>When rendering the value of a selected option, the text content of the option will render in the input field.</p>
17
+ <p>The trigger is a focusable element and will visually respond to common UI states - <strong>Hover</strong> <em>(:hover)</em>, <strong>Focus</strong> <em>(:focus / :focus-visible)</em>, <strong>Disabled</strong> <em>(:disabled)</em>. The component does not have a visual response to the <strong>Active</strong> <em>(:active)</em> state.</p>
18
+ <auro-header level="4" id="options">List Options</auro-header>
19
+ <p>The component will render a list of options that may be selected. Options are filtered as the user types in the input. Each option may be in one of the following states when rendered:</p>
20
+ <ul>
21
+ <li>
22
+ <code>selected</code> - One option may be selected at a time and identifies the current value of the component.
23
+ </li>
24
+ <li>
25
+ <code>active</code> - One option may be active at a time. The active option indicates the item that will become selected if the user chooses.
26
+ </li>
27
+ <li>
28
+ <code>disabled</code> - One or more options may be disabled. Disabled options are not interactive and cannot be marked as active or selected.
29
+ </li>
30
+ </ul>
31
+ <auro-header level="4" id="helpText">Help Text</auro-header>
32
+ <p>Help text is not required. However, consideration should be given to how users will understand the full context of the component instance, particularly users reliant on accessibility tools like screen readers. In certain cases, a component label alone may be confusing.</p>
33
+ <p>If the component fails validation, the help text will change to show a validation help message instead of the default help text.</p>
34
+ <auro-header level="3" id="helpText">Colors</auro-header>
35
+ <auro-header level="4" id="defaultColor">Default Color</auro-header>
36
+ <p>When the component is used on a light background.</p>
37
+ <div class="exampleWrapper">
38
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
39
+ <!-- The below content is automatically added from ./../apiExamples/basic.html -->
40
+ <auro-combobox>
41
+ <span slot="ariaLabel.bib.close">Close combobox</span>
42
+ <span slot="ariaLabel.input.clear">Clear All</span>
43
+ <span slot="bib.fullscreen.headline">Bib Header</span>
44
+ <span slot="label">Name</span>
45
+ <auro-menu>
46
+ <auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
47
+ <auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
48
+ <auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
49
+ <auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
50
+ <auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
51
+ <auro-menuoption static nomatch>No matching option</auro-menuoption>
52
+ </auro-menu>
53
+ </auro-combobox>
54
+ <!-- AURO-GENERATED-CONTENT:END -->
55
+ </div>
56
+ <auro-accordion alignRight>
57
+ <span slot="trigger">See code</span>
58
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
59
+ <!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
60
+ <pre class="language-html"><code class="language-html">&lt;auro-combobox&gt;
61
+ &lt;span slot="ariaLabel.bib.close"&gt;Close combobox&lt;/span&gt;
62
+ &lt;span slot="ariaLabel.input.clear"&gt;Clear All&lt;/span&gt;
63
+ &lt;span slot="bib.fullscreen.headline"&gt;Bib Header&lt;/span&gt;
64
+ &lt;span slot="label"&gt;Name&lt;/span&gt;
65
+ &lt;auro-menu&gt;
66
+ &lt;auro-menuoption value="Apples" id="option-0"&gt;Apples&lt;/auro-menuoption&gt;
67
+ &lt;auro-menuoption value="Oranges" id="option-1"&gt;Oranges&lt;/auro-menuoption&gt;
68
+ &lt;auro-menuoption value="Peaches" id="option-2"&gt;Peaches&lt;/auro-menuoption&gt;
69
+ &lt;auro-menuoption value="Grapes" id="option-3"&gt;Grapes&lt;/auro-menuoption&gt;
70
+ &lt;auro-menuoption value="Cherries" id="option-4"&gt;Cherries&lt;/auro-menuoption&gt;
71
+ &lt;auro-menuoption static nomatch&gt;No matching option&lt;/auro-menuoption&gt;
72
+ &lt;/auro-menu&gt;
73
+ &lt;/auro-combobox&gt;</code></pre>
74
+ <!-- AURO-GENERATED-CONTENT:END -->
75
+ </auro-accordion>
76
+ <auro-header level="4" id="inverseColor">Inverse Color</auro-header>
77
+ <p>When the component is used on a darker background, set `appearance="inverse"` to invert the component colors for proper contrast and visibility.</p>
78
+ <div class="exampleWrapper--ondark">
79
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse.html) -->
80
+ <!-- The below content is automatically added from ./../apiExamples/appearance-inverse.html -->
81
+ <auro-combobox appearance="inverse">
82
+ <span slot="bib.fullscreen.headline">Bib Header</span>
83
+ <span slot="label">Name</span>
84
+ <auro-menu>
85
+ <auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
86
+ <auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
87
+ <auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
88
+ <auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
89
+ <auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
90
+ <auro-menuoption static nomatch>No matching option</auro-menuoption>
91
+ </auro-menu>
92
+ </auro-combobox>
93
+ <!-- AURO-GENERATED-CONTENT:END -->
94
+ </div>
95
+ <auro-accordion alignRight>
96
+ <span slot="trigger">See code</span>
97
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/appearance-inverse.html) -->
98
+ <!-- The below code snippet is automatically added from ./../apiExamples/appearance-inverse.html -->
99
+ <pre class="language-html"><code class="language-html">&lt;auro-combobox appearance="inverse"&gt;
100
+ &lt;span slot="bib.fullscreen.headline"&gt;Bib Header&lt;/span&gt;
101
+ &lt;span slot="label"&gt;Name&lt;/span&gt;
102
+ &lt;auro-menu&gt;
103
+ &lt;auro-menuoption value="Apples" id="option-0"&gt;Apples&lt;/auro-menuoption&gt;
104
+ &lt;auro-menuoption value="Oranges" id="option-1"&gt;Oranges&lt;/auro-menuoption&gt;
105
+ &lt;auro-menuoption value="Peaches" id="option-2"&gt;Peaches&lt;/auro-menuoption&gt;
106
+ &lt;auro-menuoption value="Grapes" id="option-3"&gt;Grapes&lt;/auro-menuoption&gt;
107
+ &lt;auro-menuoption value="Cherries" id="option-4"&gt;Cherries&lt;/auro-menuoption&gt;
108
+ &lt;auro-menuoption static nomatch&gt;No matching option&lt;/auro-menuoption&gt;
109
+ &lt;/auro-menu&gt;
110
+ &lt;/auro-combobox&gt;</code></pre>
111
+ <!-- AURO-GENERATED-CONTENT:END -->
112
+ </auro-accordion>
@@ -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
  </head>
37
38
  <body class="auro-markdown">
38
39
  <main></main>
@@ -46,7 +47,30 @@
46
47
  const rawHtml = marked.parse(text);
47
48
  document.querySelector('main').innerHTML = rawHtml;
48
49
  Prism.highlightAll();
49
- })
50
+ addCopyButtons();
51
+ });
52
+
53
+ function addCopyButtons() {
54
+ document.querySelectorAll('auro-accordion pre[class*="language-"]').forEach((pre) => {
55
+ const wrapper = document.createElement('div');
56
+ wrapper.className = 'pre-wrapper';
57
+ pre.parentNode.insertBefore(wrapper, pre);
58
+ wrapper.appendChild(pre);
59
+ const btn = document.createElement('button');
60
+ btn.className = 'copy-btn';
61
+ btn.textContent = 'Copy';
62
+ btn.addEventListener('click', () => {
63
+ const code = pre.querySelector('code');
64
+ const raw = code ? code.textContent : pre.textContent;
65
+ const text = raw.replace(/\u200B/g, '').replace(/^\n+/, '').replace(/\n+$/, '\n');
66
+ navigator.clipboard.writeText(text).then(() => {
67
+ btn.textContent = 'Copied!';
68
+ setTimeout(() => { btn.textContent = 'Copy'; }, 1500);
69
+ });
70
+ });
71
+ wrapper.appendChild(btn);
72
+ });
73
+ }
50
74
  </script>
51
75
  <script src="./index.min.js" data-demo-script="true" type="module"></script>
52
76
 
@@ -21,9 +21,19 @@ The following sections are editable by making changes to the following files:
21
21
 
22
22
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
23
23
  <!-- The below content is automatically added from ./docs/partials/description.md -->
24
- `<auro-combobox>` is the combination of [dropdown](http://auro.alaskaair.com/components/auro/dropdown), [input](http://auro.alaskaair.com/components/auro/input), and [menu](http://auro.alaskaair.com/components/auro/menu) and allows users to filter search results from a predefined list as they type. When the user starts typing in the text input, a dropdown of a menu shows up to display options that match the user’s search.
25
-
26
- By default, `auro-combobox` behaves as a suggestion list. This means any value may be typed into the combobox and the menu list presented effectively provides sample or suggestion options. With the use of the `persistInput` attribute the `auro-combobox` behaves as a filter of menu options. In this mode. typing into the input field will execute the filter but will not set the `value` of the combobox. The combobox value is set by selecting a menu option. Clicking the `X` clear button in the input will remove the current value of the HTML5 input causing the menu filter to reset as well as remove the current value of the combobox.
24
+ <p><code>&lt;auro-combobox&gt;</code> combines a text input with a filterable dropdown menu, letting users either type a value or pick one from a list. As the user types, the menu narrows to show only matching options.</p>
25
+ <p>The component supports two modes:</p>
26
+ <ul>
27
+ <li><strong>Suggestion (default)</strong> — The user may type any value. The menu provides suggestions but does not restrict input.</li>
28
+ <li><strong>Filter</strong> — The user must select from the menu. Typing filters the available options but does not set the component's value. The value is only set when a menu option is selected.</li>
29
+ </ul>
30
+ <p>Common use cases:</p>
31
+ <ul>
32
+ <li><strong>Airport or city search</strong> — Type a city name or airport code to filter a long list of destinations.</li>
33
+ <li><strong>Country or region selection</strong> — Quickly find and select from a large set of geographic options.</li>
34
+ <li><strong>Autocomplete fields</strong> — Provide type-ahead suggestions for form fields where the set of valid values is known.</li>
35
+ <li><strong>Search with suggestions</strong> — Offer recommended results while still allowing freeform input.</li>
36
+ </ul>
27
37
  <!-- AURO-GENERATED-CONTENT:END -->
28
38
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
29
39
  <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
@@ -37,12 +47,12 @@ By default, `auro-combobox` behaves as a suggestion list. This means any value m
37
47
  The `<auro-combobox>` element should be used in situations where users may:
38
48
 
39
49
  * Search
40
- * Airports: user looks for a specific airport by searching for the city name or airport code
41
- * Site wide: user searches for a topic site wide and combobox makes suggestions on searchable results
50
+ * Airports: user looks for a specific airport by searching for the city name or airport code
51
+ * Site wide: user searches for a topic site wide and combobox makes suggestions on searchable results
42
52
  * Filter
43
- * Options: user chooses filters for their search by using combobox
53
+ * Options: user chooses filters for their search by using combobox
44
54
  * Select
45
- * Quantity: user types a quantity to select an option within a range (for example, the user may be limited to 2-34)
55
+ * Quantity: user types a quantity to select an option within a range (for example, the user may be limited to 2-34)
46
56
  <!-- AURO-GENERATED-CONTENT:END -->
47
57
 
48
58
  ## Getting Started
@@ -52,9 +62,7 @@ The `<auro-combobox>` element should be used in situations where users may:
52
62
 
53
63
  #### NPM Installation
54
64
 
55
- ```shell
56
- $ npm i @aurodesignsystem/auro-formkit
57
- ```
65
+ <pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-formkit</code></pre>
58
66
  <!-- AURO-GENERATED-CONTENT:END -->
59
67
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
60
68
  <!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
@@ -63,13 +71,11 @@ $ npm i @aurodesignsystem/auro-formkit
63
71
 
64
72
  When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
65
73
 
66
- ```json
67
- {
74
+ <pre class="language-json"><code class="language-json">{
68
75
  "compilerOptions": {
69
76
  "moduleResolution": "bundler"
70
77
  }
71
- }
72
- ```
78
+ }</code></pre>
73
79
 
74
80
  This configuration enables proper module resolution for the component's TypeScript files.
75
81
  <!-- AURO-GENERATED-CONTENT:END -->
@@ -80,9 +86,7 @@ This configuration enables proper module resolution for the component's TypeScri
80
86
  <!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
81
87
  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.
82
88
 
83
- ```html
84
- <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-combobox/+esm"></script>
85
- ```
89
+ <pre class="language-html"><code class="language-html">&lt;script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-combobox/+esm"&gt;&lt;/script&gt;</code></pre>
86
90
  <!-- AURO-GENERATED-CONTENT:END -->
87
91
 
88
92
  ## Formkit Development
@@ -96,9 +100,7 @@ Running the `dev` command will open a `localhost` development server for all com
96
100
 
97
101
  To only develop a single component, use the `--filter` flag:
98
102
 
99
- ```shell
100
- npx turbo dev --filter=@aurodesignsystem/auro-input
101
- ```
103
+ <pre class="language-shell"><code class="language-shell">npx turbo dev --filter=@aurodesignsystem/auro-input</code></pre>
102
104
  <!-- AURO-GENERATED-CONTENT:END -->
103
105
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
104
106
  <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
@@ -113,46 +115,42 @@ However, if you need to load multiple versions of the same component on a single
113
115
 
114
116
  You can do this by importing only the component class and using the `register(name)` method with a unique name:
115
117
 
116
- ```js
117
- // Import the class only
118
+ <pre class="language-js"><code class="language-js">// Import the class only
118
119
  import { AuroCombobox } from '@aurodesignsystem/auro-formkit/auro-combobox/class';
119
-
120
+
120
121
  // Register with a custom name if desired
121
- AuroCombobox.register('custom-combobox');
122
- ```
122
+ AuroCombobox.register('custom-combobox');</code></pre>
123
123
 
124
124
  This will create a new custom element `<custom-combobox>` that behaves exactly like `<auro-combobox>`, allowing both to coexist on the same page without interfering with each other.
125
125
 
126
126
  <div class="exampleWrapper exampleWrapper--flex">
127
- <custom-combobox>
128
- <span slot="bib.fullscreen.headline">Bib Header</span>
129
- <span slot="label">Name</span>
130
- <auro-menu>
131
- <auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
132
- <auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
133
- <auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
134
- <auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
135
- <auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
136
- <auro-menuoption static nomatch>No matching option</auro-menuoption>
137
- </auro-menu>
138
- </custom-combobox>
127
+ <custom-combobox>
128
+ <span slot="bib.fullscreen.headline">Bib Header</span>
129
+ <span slot="label">Name</span>
130
+ <auro-menu>
131
+ <auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
132
+ <auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
133
+ <auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
134
+ <auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
135
+ <auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
136
+ <auro-menuoption static nomatch>No matching option</auro-menuoption>
137
+ </auro-menu>
138
+ </custom-combobox>
139
139
  </div>
140
140
  <auro-accordion alignRight>
141
- <span slot="trigger">See code</span>
141
+ <span slot="trigger">See code</span>
142
142
 
143
- ```html
144
- <custom-combobox>
145
- <span slot="bib.fullscreen.headline">Bib Header</span>
146
- <span slot="label">Name</span>
147
- <auro-menu>
148
- <auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
149
- <auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
150
- <auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
151
- <auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
152
- <auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
153
- <auro-menuoption static nomatch>No matching option</auro-menuoption>
154
- </auro-menu>
155
- </custom-combobox>
156
- ```
143
+ <pre class="language-html"><code class="language-html">&lt;custom-combobox&gt;
144
+ &lt;span slot="bib.fullscreen.headline"&gt;Bib Header&lt;/span&gt;
145
+ &lt;span slot="label"&gt;Name&lt;/span&gt;
146
+ &lt;auro-menu&gt;
147
+ &lt;auro-menuoption value="Apples" id="option-0"&gt;Apples&lt;/auro-menuoption&gt;
148
+ &lt;auro-menuoption value="Oranges" id="option-1"&gt;Oranges&lt;/auro-menuoption&gt;
149
+ &lt;auro-menuoption value="Peaches" id="option-2"&gt;Peaches&lt;/auro-menuoption&gt;
150
+ &lt;auro-menuoption value="Grapes" id="option-3"&gt;Grapes&lt;/auro-menuoption&gt;
151
+ &lt;auro-menuoption value="Cherries" id="option-4"&gt;Cherries&lt;/auro-menuoption&gt;
152
+ &lt;auro-menuoption static nomatch&gt;No matching option&lt;/auro-menuoption&gt;
153
+ &lt;/auro-menu&gt;
154
+ &lt;/custom-combobox&gt;</code></pre>
157
155
  </auro-accordion>
158
156
  <!-- AURO-GENERATED-CONTENT:END -->