@aurodesignsystem-dev/auro-formkit 0.0.0-pr1578.0 → 0.0.0-pr1581.0

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 (69) hide show
  1. package/ai/README.md +142 -0
  2. package/ai/_a11y-baseline.md +27 -0
  3. package/ai/_authored/_defaults.overlay.yaml +81 -0
  4. package/ai/_authored/auro-checkbox.overlay.yaml +22 -0
  5. package/ai/_authored/auro-combobox.overlay.yaml +37 -0
  6. package/ai/_authored/auro-counter.overlay.yaml +23 -0
  7. package/ai/_authored/auro-datepicker.overlay.yaml +44 -0
  8. package/ai/_authored/auro-dropdown.overlay.yaml +35 -0
  9. package/ai/_authored/auro-form.overlay.yaml +12 -0
  10. package/ai/_authored/auro-input.overlay.yaml +33 -0
  11. package/ai/_authored/auro-menu.overlay.yaml +21 -0
  12. package/ai/_authored/auro-radio.overlay.yaml +19 -0
  13. package/ai/_authored/auro-select.overlay.yaml +37 -0
  14. package/ai/_prompt-template.md +33 -0
  15. package/ai/llms.txt +26 -0
  16. package/ai/specs/auro-checkbox.spec.yaml +181 -0
  17. package/ai/specs/auro-combobox.spec.yaml +349 -0
  18. package/ai/specs/auro-counter.spec.yaml +215 -0
  19. package/ai/specs/auro-datepicker.spec.yaml +395 -0
  20. package/ai/specs/auro-dropdown.spec.yaml +295 -0
  21. package/ai/specs/auro-form.spec.yaml +148 -0
  22. package/ai/specs/auro-input.spec.yaml +392 -0
  23. package/ai/specs/auro-menu.spec.yaml +213 -0
  24. package/ai/specs/auro-radio.spec.yaml +184 -0
  25. package/ai/specs/auro-select.spec.yaml +324 -0
  26. package/components/checkbox/demo/customize.min.js +1 -1
  27. package/components/checkbox/demo/getting-started.min.js +1 -1
  28. package/components/checkbox/demo/index.min.js +1 -1
  29. package/components/checkbox/dist/index.js +1 -1
  30. package/components/checkbox/dist/registered.js +1 -1
  31. package/components/combobox/demo/customize.min.js +12 -3
  32. package/components/combobox/demo/getting-started.min.js +12 -3
  33. package/components/combobox/demo/index.min.js +12 -3
  34. package/components/combobox/dist/index.js +12 -3
  35. package/components/combobox/dist/registered.js +12 -3
  36. package/components/counter/demo/customize.min.js +12 -3
  37. package/components/counter/demo/index.min.js +12 -3
  38. package/components/counter/dist/index.js +12 -3
  39. package/components/counter/dist/registered.js +12 -3
  40. package/components/datepicker/demo/customize.min.js +12 -3
  41. package/components/datepicker/demo/index.min.js +12 -3
  42. package/components/datepicker/dist/index.js +12 -3
  43. package/components/datepicker/dist/registered.js +12 -3
  44. package/components/dropdown/demo/customize.min.js +10 -1
  45. package/components/dropdown/demo/getting-started.min.js +11 -2
  46. package/components/dropdown/demo/index.min.js +10 -1
  47. package/components/dropdown/dist/index.js +10 -1
  48. package/components/dropdown/dist/registered.js +10 -1
  49. package/components/form/demo/customize.min.js +50 -14
  50. package/components/form/demo/getting-started.min.js +50 -14
  51. package/components/form/demo/index.min.js +50 -14
  52. package/components/form/demo/registerDemoDeps.min.js +50 -14
  53. package/components/input/demo/customize.min.js +1 -1
  54. package/components/input/demo/getting-started.min.js +1 -1
  55. package/components/input/demo/index.min.js +1 -1
  56. package/components/input/dist/index.js +1 -1
  57. package/components/input/dist/registered.js +1 -1
  58. package/components/radio/demo/customize.min.js +1 -1
  59. package/components/radio/demo/getting-started.min.js +1 -1
  60. package/components/radio/demo/index.min.js +1 -1
  61. package/components/radio/dist/index.js +1 -1
  62. package/components/radio/dist/registered.js +1 -1
  63. package/components/select/demo/customize.min.js +11 -2
  64. package/components/select/demo/getting-started.min.js +11 -2
  65. package/components/select/demo/index.min.js +11 -2
  66. package/components/select/dist/index.js +11 -2
  67. package/components/select/dist/registered.js +11 -2
  68. package/custom-elements.json +1521 -1521
  69. package/package.json +6 -3
@@ -0,0 +1,392 @@
1
+ # GENERATED by packages/build-tools/src/aiSpecGenerator.mjs — do not edit by hand.
2
+ # Authored inputs live in ai/_authored/auro-input.overlay.yaml
3
+ component: auro-input
4
+ version: 0.0.0
5
+ summary: Single-line text input (types text, email, password, number) with built-in validation, required/error states, and a bordered theme.
6
+ generatedFrom:
7
+ cem: custom-elements.json#auro-input
8
+ cssRecipe: components/input/demo/css-only.md
9
+ overlay: ai/_authored/auro-input.overlay.yaml
10
+ sourceOfTruth:
11
+ component: components/input/src/auro-input.js
12
+ visual:
13
+ tokensImport: ./node_modules/@aurodesignsystem/design-tokens/dist/tokens/CSSCustomProperties.css
14
+ rule: NEVER hardcode a hex, px, rem, or font-family value. Every visual value MUST be an Auro --ds-* token via var(--ds-token, fallback). Literal values are allowed only as the second argument (fallback) of var().
15
+ css: |-
16
+ @import "./node_modules/@aurodesignsystem/design-tokens/dist/tokens/CSSCustomProperties.css";
17
+
18
+ .input-field {
19
+ display: block;
20
+ width: 100%;
21
+ box-sizing: border-box;
22
+ height: var(--ds-size-600, 3rem);
23
+ padding: 0 var(--ds-size-200, 1rem);
24
+ font-family: var(--ds-font-family-default, sans-serif);
25
+ font-size: var(--ds-text-body-default-size, 1rem);
26
+ line-height: var(--ds-text-body-default-line-height, 1.5);
27
+ color: var(--ds-color-text-primary-default, #1d1d1d);
28
+ background-color: var(--ds-color-container-primary-default, #ffffff);
29
+ border: 1px solid var(--ds-color-border-ui-default, #6e767f);
30
+ border-radius: var(--ds-border-radius, 4px);
31
+ outline: none;
32
+ }
33
+
34
+ .input-field:focus-visible {
35
+ border-color: var(--ds-color-border-active-default, #01426a);
36
+ outline: 2px solid var(--ds-color-border-active-default, #01426a);
37
+ outline-offset: 1px;
38
+ }
39
+
40
+ .input-field:disabled {
41
+ cursor: not-allowed;
42
+ opacity: 0.5;
43
+ }
44
+
45
+ .input-field[aria-invalid="true"] {
46
+ border-color: var(--ds-color-border-error-default, #d50032);
47
+ }
48
+
49
+ .input-label {
50
+ display: block;
51
+ margin-bottom: var(--ds-size-50, 0.25rem);
52
+ font-size: var(--ds-text-body-sm-size, 0.875rem);
53
+ color: var(--ds-color-text-secondary-default, #6e767f);
54
+ }
55
+
56
+ .input-helptext {
57
+ display: block;
58
+ margin-top: var(--ds-size-50, 0.25rem);
59
+ font-size: var(--ds-text-body-sm-size, 0.875rem);
60
+ color: var(--ds-color-text-secondary-default, #6e767f);
61
+ }
62
+
63
+ .input-helptext[data-error="true"] {
64
+ color: var(--ds-color-text-error-default, #d50032);
65
+ }
66
+ api:
67
+ attributes:
68
+ - name: a11yRole
69
+ tier: enhanced
70
+ description: The value for the role attribute.
71
+ - name: a11yControls
72
+ tier: enhanced
73
+ description: The value for the aria-controls attribute.
74
+ - name: a11yExpanded
75
+ tier: enhanced
76
+ description: The value for the aria-expanded attribute.
77
+ - name: a11yActivedescendant
78
+ tier: enhanced
79
+ description: The value for the aria-activedescendant attribute.
80
+ - name: activeLabel
81
+ tier: wc-only
82
+ default: 'false'
83
+ description: If set, the label will remain fixed in the active position.
84
+ - name: appearance
85
+ tier: wc-only
86
+ default: '"default"'
87
+ description: Defines whether the component will be on lighter or darker backgrounds.
88
+ - name: autocapitalize
89
+ tier: core
90
+ native: autocapitalize
91
+ description: An enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user.
92
+ - name: autocomplete
93
+ tier: core
94
+ native: autocomplete
95
+ description: An enumerated attribute that defines what the user agent can suggest for autofill.
96
+ - name: autocorrect
97
+ tier: core
98
+ native: autocorrect
99
+ description: When set to `off`, stops iOS from auto-correcting words when typed into a text box.
100
+ - name: customValidityTypeEmail
101
+ tier: enhanced
102
+ description: Custom help text message for email type validity.
103
+ - name: disabled
104
+ tier: core
105
+ native: disabled
106
+ default: 'false'
107
+ description: If set, disables the input.
108
+ - name: dvInputOnly
109
+ tier: wc-only
110
+ default: 'false'
111
+ description: If defined, the display value slot content will only mask the HTML5 input element.
112
+ - name: error
113
+ tier: wc-only
114
+ description: When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
115
+ - name: errorMessage
116
+ tier: wc-only
117
+ description: Contains the help text message for the current validity error.
118
+ - name: format
119
+ tier: wc-only
120
+ description: Overrides LitElement's generated accessor so we can track whether the consumer explicitly set `format`.
121
+ - name: hideLabelVisually
122
+ tier: core
123
+ native: add a visually-hidden class to the <label> (keep it in the DOM)
124
+ default: 'false'
125
+ description: If set, the label will be hidden visually but still accessible to assistive technologies.
126
+ - name: icon
127
+ tier: wc-only
128
+ default: 'false'
129
+ description: If set, will render an icon inside the input to the left of the value.
130
+ - name: id
131
+ tier: core
132
+ native: id
133
+ description: The id global attribute defines an identifier (ID) which must be unique in the whole document.
134
+ - name: inputmode
135
+ tier: core
136
+ native: inputmode
137
+ description: Exposes inputmode attribute for input.
138
+ - name: lang
139
+ tier: core
140
+ native: lang
141
+ description: Defines the language of an element.
142
+ - name: locale
143
+ tier: enhanced
144
+ default: '''en-US'''
145
+ description: Defines the locale of an element.
146
+ - name: max
147
+ tier: core
148
+ native: max
149
+ default: undefined
150
+ description: The maximum value allowed.
151
+ - name: maxLength
152
+ tier: core
153
+ native: maxlength
154
+ default: undefined
155
+ description: The maximum number of characters the user can enter into the text input.
156
+ - name: min
157
+ tier: core
158
+ native: min
159
+ default: undefined
160
+ description: The minimum value allowed.
161
+ - name: minLength
162
+ tier: core
163
+ native: minlength
164
+ default: undefined
165
+ description: The minimum number of characters the user can enter into the text input.
166
+ - name: name
167
+ tier: core
168
+ native: name
169
+ description: Populates the `name` attribute on the input.
170
+ - name: nested
171
+ tier: wc-only
172
+ description: Sets styles for nested operation - removes borders, hides help + error text, and hides accents.
173
+ - name: noValidate
174
+ tier: wc-only
175
+ default: 'false'
176
+ description: If set, disables auto-validation on blur.
177
+ - name: onDark
178
+ tier: wc-only
179
+ default: 'false'
180
+ description: DEPRECATED - use `appearance="inverse"` instead.
181
+ - name: pattern
182
+ tier: core
183
+ native: pattern
184
+ description: Specifies a regular expression the form control's value should match.
185
+ - name: placeholder
186
+ tier: core
187
+ native: placeholder
188
+ description: Define custom placeholder text.
189
+ - name: readonly
190
+ tier: core
191
+ native: readonly (+ aria-readonly="true")
192
+ description: Makes the input read-only, but can be set programmatically.
193
+ - name: required
194
+ tier: core
195
+ native: required
196
+ default: 'false'
197
+ description: Populates the `required` attribute on the input.
198
+ - name: setCustomValidity
199
+ tier: wc-only
200
+ description: Sets a custom help text message to display for all validityStates.
201
+ - name: setCustomValidityBadInput
202
+ tier: enhanced
203
+ description: Custom help text message to display when validity = `badInput`.
204
+ - name: setCustomValidityCustomError
205
+ tier: enhanced
206
+ description: Custom help text message to display when validity = `customError`.
207
+ - name: setCustomValidityForType
208
+ tier: enhanced
209
+ default: undefined
210
+ description: Custom help text message to display for the declared element `type` and type validity fails.
211
+ - name: setCustomValidityPatternMismatch
212
+ tier: enhanced
213
+ description: Custom help text message to display when validity = `patternMismatch`.
214
+ - name: setCustomValidityRangeOverflow
215
+ tier: enhanced
216
+ description: Custom help text message to display when validity = `rangeOverflow`.
217
+ - name: setCustomValidityRangeUnderflow
218
+ tier: enhanced
219
+ description: Custom help text message to display when validity = `rangeUnderflow`.
220
+ - name: setCustomValidityTooLong
221
+ tier: enhanced
222
+ description: Custom help text message to display when validity = `tooLong`.
223
+ - name: setCustomValidityTooShort
224
+ tier: enhanced
225
+ description: Custom help text message to display when validity = `tooShort`.
226
+ - name: setCustomValidityValueMissing
227
+ tier: enhanced
228
+ description: Custom help text message to display when validity = `valueMissing`.
229
+ - name: showPassword
230
+ tier: wc-only
231
+ default: 'false'
232
+ - name: simple
233
+ tier: wc-only
234
+ description: Simple makes the input render without a border.
235
+ - name: spellcheck
236
+ tier: core
237
+ native: spellcheck
238
+ description: An enumerated attribute defines whether the element may be checked for spelling errors.
239
+ - name: type
240
+ tier: core
241
+ native: type
242
+ enum:
243
+ - text
244
+ - email
245
+ - password
246
+ - number
247
+ default: '''text'''
248
+ description: Populates the `type` attribute on the input.
249
+ - name: validateOnInput
250
+ tier: wc-only
251
+ description: Sets validation mode to re-eval with each input.
252
+ - name: validity
253
+ tier: wc-only
254
+ description: Specifies the `validityState` this element is in.
255
+ - name: value
256
+ tier: core
257
+ native: value
258
+ default: undefined
259
+ description: Populates the `value` attribute on the input.
260
+ - name: layout
261
+ tier: wc-only
262
+ default: '{''default''}'
263
+ description: Defines the language of an element.
264
+ - name: shape
265
+ tier: wc-only
266
+ - name: size
267
+ tier: enhanced
268
+ - name: ondark
269
+ tier: wc-only
270
+ slots:
271
+ - name: ariaLabel.clear
272
+ tier: core
273
+ description: Sets aria-label on clear button for screen reader to read
274
+ - name: ariaLabel.password.show
275
+ tier: core
276
+ description: Sets aria-label on password button to toggle on showing password
277
+ - name: ariaLabel.password.hide
278
+ tier: core
279
+ description: Sets aria-label on password button to toggle off showing password
280
+ - name: helpText
281
+ tier: core
282
+ description: Sets the help text displayed below the input.
283
+ - name: label
284
+ tier: core
285
+ description: Sets the label text for the input.
286
+ - name: optionalLabel
287
+ tier: core
288
+ description: Allows overriding the optional display text "(optional)", which appears next to the label.
289
+ - name: displayValue
290
+ tier: wc-only
291
+ description: Allows custom HTML content to display in place of the value when the input is not focused.
292
+ events:
293
+ - name: auroInput-validityChange
294
+ tier: wc-only
295
+ - name: input
296
+ tier: core
297
+ description: Event fires when the value of an `auro-input` has been changed.
298
+ - name: auroFormElement-validated
299
+ tier: wc-only
300
+ description: Notifies that the `validity` and `errorMessage` value has changed.
301
+ methods:
302
+ - name: register
303
+ tier: wc-only
304
+ - name: focus
305
+ tier: wc-only
306
+ - name: validate
307
+ tier: wc-only
308
+ - name: reset
309
+ tier: wc-only
310
+ - name: clear
311
+ tier: wc-only
312
+ - name: resetShapeClasses
313
+ tier: wc-only
314
+ - name: resetLayoutClasses
315
+ tier: wc-only
316
+ - name: updateComponentArchitecture
317
+ tier: wc-only
318
+ behavior:
319
+ a11y:
320
+ - Every control MUST have a programmatically associated <label> (for/id or wrapping).
321
+ - Link help text via aria-describedby so it is announced after the label.
322
+ - Reflect invalid state with aria-invalid="true|false" on the control.
323
+ - Render validation errors with role="alert" aria-live="assertive" so they announce immediately.
324
+ - When the field is not `required`, append "(optional)" to the accessible label.
325
+ - For password fields, the show/hide toggle needs its own accessible name (aria-label).
326
+ keyboard:
327
+ - All interactive affordances are real, focusable elements in DOM order.
328
+ validation:
329
+ - Track a "touched" state; do NOT show errors before the field is first blurred.
330
+ - On invalid, swap the helpText content for the error message and set aria-invalid="true".
331
+ gaps:
332
+ - id: input-masking
333
+ feature: Input masking
334
+ guidance: 'auro-input integrates IMask to apply format patterns as the user types — for example format="(###) ###-####" for phone numbers or format="mm/dd/yyyy" for dates.'
335
+ - id: credit-card-formatting-and-detection
336
+ feature: Credit-card formatting and detection
337
+ guidance: auro-input with type="credit-card" auto-detects Visa, Mastercard, American Express, Discover, Diners Club, and Alaska Airlines cards from the first digits, applies the correct digit grouping (e.g., 4-4-4-4 for Visa, 4-6-5 for Amex), displays the matching card brand icon, and validates with the Luhn algorithm.
338
+ - id: password-show-hide-toggle
339
+ feature: Password show/hide toggle
340
+ guidance: auro-input with type="password" includes an accessible show/hide toggle with customizable ARIA labels via the ariaLabel.password.show and ariaLabel.password.hide slots.
341
+ - id: clear-button
342
+ feature: Clear button
343
+ guidance: auro-input renders an accessible clear button when the field has a value, with a customizable ARIA label via the ariaLabel.clear slot.
344
+ - id: custom-validation-messages
345
+ feature: Custom validation messages
346
+ guidance: auro-input exposes a full set of per-constraint setters — setCustomValidityValueMissing, setCustomValidityRangeOverflow, setCustomValidityRangeUnderflow, setCustomValidityTooLong, setCustomValidityTooShort, setCustomValidityBadInput, setCustomValidityCustomError, and setCustomValidityForType.
347
+ - id: format-types
348
+ feature: Format types
349
+ guidance: auro-input ships dedicated type values for credit-card, month-day-year, year-month-day, day-month-year, month-year, month-fullYear, and year-month, each applying the correct mask, validation, and accent icon.
350
+ - id: floating-and-dynamic-labels
351
+ feature: Floating and dynamic labels
352
+ guidance: auro-input floats the label above the field when it is focused or populated, and automatically associates slotted label content with the underlying input.
353
+ - id: display-value-slot
354
+ feature: Display value slot
355
+ guidance: auro-input supports a displayValue slot that renders custom HTML in place of the raw value when the input is blurred — useful for masked account numbers or formatted currency.
356
+ - id: layout-and-shape-variants
357
+ feature: Layout and shape variants
358
+ guidance: auro-input supports classic, emphasized, and snowflake layouts, as well as shape variants (box, pill, pill-left, pill-right).
359
+ - id: icon-slots-and-accents
360
+ feature: Icon slots and accents
361
+ guidance: auro-input renders left and right accent slots and an automatic accent icon for typed formats (credit-card brand icon, calendar icon for date types).
362
+ - id: help-text-and-error-slots
363
+ feature: Help text and error slots
364
+ guidance: auro-input exposes a helpText slot that automatically swaps to the validation error message when the field is invalid, with the correct ARIA wiring and color treatment.
365
+ - id: validation-timing-control
366
+ feature: Validation timing control
367
+ guidance: auro-input supports validateOnInput to validate on every keystroke, noValidate to disable validation, and tracks touched state so errors do not appear before the user has interacted with the field.
368
+ - id: form-integration-events
369
+ feature: Form integration events
370
+ guidance: auro-input dispatches auroFormElement-validated events so a parent auro-form can coordinate validation across all child fields.
371
+ - id: multi-brand-theming
372
+ feature: Multi-brand theming
373
+ guidance: auro-input consumes Auro design tokens through its component logic, so it automatically picks up brand-specific theming when token packages are swapped.
374
+ examples:
375
+ - id: text-input
376
+ html: |-
377
+ <label class="input-label" for="name">Full name</label>
378
+ <input id="name" type="text" class="input-field" name="name" />
379
+ - id: email-input
380
+ html: |-
381
+ <label class="input-label" for="email">Email address</label>
382
+ <input id="email" type="email" class="input-field" name="email" required />
383
+ - id: password-input
384
+ html: |-
385
+ <label class="input-label" for="password">Password</label>
386
+ <input id="password" type="password" class="input-field" name="password" />
387
+ verify:
388
+ - every color, size, spacing, radius, and font value uses var(--ds-*)
389
+ - each control has an associated <label>
390
+ - controls with aria-invalid="true" have a role="alert" message referenced by aria-describedby
391
+ - 'axe: label, aria-valid-attr-value, color-contrast pass'
392
+ - type is one of text|email|password|number (other Auro types are wc-only)
@@ -0,0 +1,213 @@
1
+ # GENERATED by packages/build-tools/src/aiSpecGenerator.mjs — do not edit by hand.
2
+ # Authored inputs live in ai/_authored/auro-menu.overlay.yaml
3
+ component: auro-menu
4
+ version: 0.0.0
5
+ summary: Selectable option list; native closest is a <ul role="listbox"> with role="option" items, or the <option>s inside a native <select>.
6
+ generatedFrom:
7
+ cem: custom-elements.json#auro-menu
8
+ cssRecipe: components/menu/demo/css-only.md
9
+ overlay: ai/_authored/auro-menu.overlay.yaml
10
+ sourceOfTruth:
11
+ component: components/menu/src/auro-menu.js
12
+ visual:
13
+ tokensImport: ./node_modules/@aurodesignsystem/design-tokens/dist/tokens/CSSCustomProperties.css
14
+ rule: NEVER hardcode a hex, px, rem, or font-family value. Every visual value MUST be an Auro --ds-* token via var(--ds-token, fallback). Literal values are allowed only as the second argument (fallback) of var().
15
+ css: |-
16
+ @import "./node_modules/@aurodesignsystem/design-tokens/dist/tokens/CSSCustomProperties.css";
17
+
18
+ .menu {
19
+ list-style: none;
20
+ margin: 0;
21
+ padding: var(--ds-size-100, 0.5rem) 0;
22
+ background-color: var(--ds-color-container-primary-default, #ffffff);
23
+ border: 1px solid var(--ds-color-border-ui-default, #6e767f);
24
+ border-radius: var(--ds-border-radius, 4px);
25
+ }
26
+
27
+ .menu__option {
28
+ padding: var(--ds-size-100, 0.5rem) var(--ds-size-200, 1rem);
29
+ color: var(--ds-color-text-primary-default, #1d1f24);
30
+ cursor: pointer;
31
+ user-select: none;
32
+ }
33
+
34
+ .menu__option:hover {
35
+ background-color: var(--ds-color-container-ui-hover-default, #f0f5ff);
36
+ }
37
+
38
+ .menu__option:focus-visible {
39
+ outline: 2px solid var(--ds-color-border-active-default, #01426a);
40
+ outline-offset: -2px;
41
+ }
42
+
43
+ .menu__option[aria-selected="true"] {
44
+ background-color: var(--ds-color-container-ui-selected-default, #01426a);
45
+ color: var(--ds-color-text-inverse-default, #ffffff);
46
+ }
47
+
48
+ .menu__option[aria-disabled="true"] {
49
+ cursor: not-allowed;
50
+ opacity: 0.5;
51
+ }
52
+ api:
53
+ attributes:
54
+ - name: disabled
55
+ tier: core
56
+ native: disabled
57
+ description: When true, the entire menu and all options are disabled.
58
+ - name: loading
59
+ tier: wc-only
60
+ default: 'false'
61
+ description: When true, displays a loading state using the loadingIcon and loadingText slots if provided.
62
+ - name: matchword
63
+ tier: wc-only
64
+ default: undefined
65
+ description: Specifies a string used to highlight matched string parts in options.
66
+ - name: multiselect
67
+ tier: core
68
+ native: aria-multiselectable="true" on the listbox (or the native `multiple` attribute)
69
+ default: 'false'
70
+ description: When true, the selected option can be multiple options.
71
+ - name: nocheckmark
72
+ tier: wc-only
73
+ default: 'false'
74
+ description: When true, selected option will not show the checkmark.
75
+ - name: value
76
+ tier: core
77
+ native: value
78
+ default: undefined
79
+ description: The value of the selected option.
80
+ - name: layout
81
+ tier: wc-only
82
+ default: '{''default''}'
83
+ description: Defines the language of an element.
84
+ - name: shape
85
+ tier: wc-only
86
+ - name: size
87
+ tier: enhanced
88
+ - name: ondark
89
+ tier: wc-only
90
+ slots:
91
+ - name: loadingText
92
+ tier: core
93
+ description: Text to show while loading attribute is set
94
+ - name: loadingIcon
95
+ tier: core
96
+ description: Icon to show while loading attribute is set
97
+ - name: (default)
98
+ tier: core
99
+ description: Slot for insertion of menu options.
100
+ events:
101
+ - name: auroMenu-optionsChange
102
+ tier: wc-only
103
+ - name: auroMenu-activatedOption
104
+ tier: wc-only
105
+ description: Notifies that a menuoption has been made `active`.
106
+ - name: auroMenu-customEventFired
107
+ tier: wc-only
108
+ description: Notifies that a custom event has been fired.
109
+ - name: auroMenu-loadingChange
110
+ tier: wc-only
111
+ description: Notifies when the loading attribute is changed.
112
+ - name: auroMenu-selectValueFailure
113
+ tier: wc-only
114
+ description: Notifies that an attempt to select a menuoption by matching a value has failed.
115
+ - name: auroMenu-selectValueReset
116
+ tier: wc-only
117
+ description: Notifies that the component value has been reset.
118
+ - name: auroMenu-selectedOption
119
+ tier: wc-only
120
+ description: Notifies that a new menuoption selection has been made.
121
+ methods:
122
+ - name: register
123
+ tier: wc-only
124
+ - name: selectByValue
125
+ tier: wc-only
126
+ - name: reset
127
+ tier: wc-only
128
+ - name: navigateOptions
129
+ tier: wc-only
130
+ - name: updateActiveOption
131
+ tier: wc-only
132
+ - name: renderLayout
133
+ tier: wc-only
134
+ - name: resetShapeClasses
135
+ tier: wc-only
136
+ - name: resetLayoutClasses
137
+ tier: wc-only
138
+ - name: updateComponentArchitecture
139
+ tier: wc-only
140
+ behavior:
141
+ a11y:
142
+ - Every control MUST have a programmatically associated <label> (for/id or wrapping).
143
+ - Link help text via aria-describedby so it is announced after the label.
144
+ - Reflect invalid state with aria-invalid="true|false" on the control.
145
+ - Render validation errors with role="alert" aria-live="assertive" so they announce immediately.
146
+ - Use role="listbox" with role="option" children; set aria-selected on chosen options and aria-activedescendant for the highlighted one.
147
+ keyboard:
148
+ - All interactive affordances are real, focusable elements in DOM order.
149
+ - Up/Down move the active option, Enter/Space selects, type-ahead jumps to matching options, Home/End jump to the ends.
150
+ validation: []
151
+ gaps:
152
+ - id: active-option-tracking
153
+ feature: Active-option tracking
154
+ guidance: auro-menu tracks the active option internally (via an active CSS class on the current auro-menuoption) rather than moving DOM focus between options.
155
+ - id: arrow-key-navigation
156
+ feature: Arrow-key navigation
157
+ guidance: auro-menu handles ArrowUp, ArrowDown, Enter, and Tab to move the highlight and commit selections.
158
+ - id: matchword-highlighting
159
+ feature: matchWord highlighting
160
+ guidance: auro-menu supports a matchWord attribute that highlights matched substrings within option labels — used by auro-combobox to visually mark the user's typed input inside each filtered option.
161
+ - id: type-ahead-navigation
162
+ feature: Type-ahead navigation
163
+ guidance: Type-ahead — jumping the active option to whichever entry starts with the letters the user typed — is not handled by auro-menu itself.
164
+ - id: nested-submenu-support
165
+ feature: Nested submenu support
166
+ guidance: auro-menu detects nested auro-menu elements, applies the correct role="group", and computes indentation per level.
167
+ - id: selection-state-coordination
168
+ feature: Selection state coordination
169
+ guidance: auro-menu keeps optionSelected, value, and each option's aria-selected state in sync internally.
170
+ - id: aria-roles-and-live-announcements
171
+ feature: ARIA roles and live announcements
172
+ guidance: auro-menu automatically applies role="listbox", aria-multiselectable, aria-busy during loading, and per-option role="option" with aria-selected and aria-disabled.
173
+ - id: value-emission-and-events
174
+ feature: Value emission and events
175
+ guidance: auro-menu dispatches a structured set of events — auroMenu-selectedOption, auroMenu-activatedOption, auroMenu-optionsChange, auroMenu-selectValueReset, auroMenu-selectValueFailure, and auroMenu-loadingChange — so parent components can react to highlight, selection, and lifecycle changes.
176
+ - id: multi-select-with-array-value
177
+ feature: Multi-select with array value
178
+ guidance: auro-menu supports multiselect, exposing the selection as a JSON-stringified array via value and as an array of elements via optionSelected.
179
+ - id: multi-select-deselect
180
+ feature: Multi-select deselect
181
+ guidance: In multi-select mode, clicking an already-selected option toggles it off.
182
+ - id: select-by-value-and-reset
183
+ feature: Select-by-value and reset
184
+ guidance: auro-menu exposes a value attribute that drives selection programmatically (accepting a JSON-stringified array in multi-select mode) and a single reset() method that clears all selection and validation state.
185
+ - id: loading-state
186
+ feature: Loading state
187
+ guidance: auro-menu renders a built-in loading placeholder via loadingIcon and loadingText slots, sets aria-busy, and emits auroMenu-loadingChange when the loading attribute toggles.
188
+ - id: shape-and-size-variants
189
+ feature: Shape and size variants
190
+ guidance: auro-menu supports shape (box, round) and size (sm, md) variants that adjust spacing and corner radii consistently across the menu and its options.
191
+ - id: multi-brand-theming
192
+ feature: Multi-brand theming
193
+ guidance: auro-menu consumes Auro design tokens through its component logic, so it automatically picks up brand-specific theming when token packages are swapped.
194
+ examples:
195
+ - id: basic-listbox
196
+ html: |-
197
+ <ul class="menu" role="listbox" aria-label="Cabin class">
198
+ <li class="menu__option" role="option" tabindex="0" aria-selected="true">Economy</li>
199
+ <li class="menu__option" role="option" tabindex="-1" aria-selected="false">Premium</li>
200
+ <li class="menu__option" role="option" tabindex="-1" aria-selected="false">First</li>
201
+ </ul>
202
+ - id: listbox-with-a-disabled-option
203
+ html: |-
204
+ <ul class="menu" role="listbox" aria-label="Seat">
205
+ <li class="menu__option" role="option" tabindex="0" aria-selected="false">12A</li>
206
+ <li class="menu__option" role="option" tabindex="-1" aria-selected="false" aria-disabled="true">12B</li>
207
+ <li class="menu__option" role="option" tabindex="-1" aria-selected="false">12C</li>
208
+ </ul>
209
+ verify:
210
+ - every color, size, spacing, radius, and font value uses var(--ds-*)
211
+ - each control has an associated <label>
212
+ - controls with aria-invalid="true" have a role="alert" message referenced by aria-describedby
213
+ - 'axe: label, aria-valid-attr-value, color-contrast pass'