@aurodesignsystem-dev/auro-formkit 0.0.0-pr1503.3 → 0.0.0-pr1503.5

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 (190) hide show
  1. package/components/bibtemplate/dist/index.js +1 -1
  2. package/components/bibtemplate/dist/registered.js +1 -1
  3. package/components/checkbox/demo/accessibility.md +1 -1
  4. package/components/checkbox/demo/customize.html +1 -2
  5. package/components/checkbox/demo/customize.min.js +23 -8
  6. package/components/checkbox/demo/getting-started.min.js +23 -8
  7. package/components/checkbox/demo/index.min.js +23 -8
  8. package/components/checkbox/dist/index.js +23 -8
  9. package/components/checkbox/dist/registered.js +23 -8
  10. package/components/combobox/README.md +1 -1
  11. package/components/combobox/demo/accessibility.md +1 -1
  12. package/components/combobox/demo/api.md +2 -2
  13. package/components/combobox/demo/customize.html +1 -2
  14. package/components/combobox/demo/customize.md +166 -142
  15. package/components/combobox/demo/customize.min.js +2515 -2316
  16. package/components/combobox/demo/getting-started.min.js +2515 -2312
  17. package/components/combobox/demo/index.md +2 -1
  18. package/components/combobox/demo/index.min.js +2515 -2312
  19. package/components/combobox/demo/keyboard-behavior.md +3 -146
  20. package/components/combobox/demo/readme.md +1 -1
  21. package/components/combobox/demo/why-combobox.md +2 -2
  22. package/components/combobox/dist/auro-combobox.d.ts +49 -15
  23. package/components/combobox/dist/index.js +1462 -753
  24. package/components/combobox/dist/registered.js +1462 -753
  25. package/components/counter/demo/customize.min.js +188 -244
  26. package/components/counter/demo/index.min.js +188 -244
  27. package/components/counter/dist/auro-counter.d.ts +0 -8
  28. package/components/counter/dist/index.js +188 -244
  29. package/components/counter/dist/registered.js +188 -244
  30. package/components/datepicker/demo/accessibility.md +20 -10
  31. package/components/datepicker/demo/api.md +65 -62
  32. package/components/datepicker/demo/customize.md +180 -40
  33. package/components/datepicker/demo/customize.min.js +1690 -777
  34. package/components/datepicker/demo/getting-started.md +118 -2
  35. package/components/datepicker/demo/index.min.js +1690 -759
  36. package/components/datepicker/demo/keyboard-behavior.md +3 -3
  37. package/components/datepicker/demo/voiceover.md +4 -4
  38. package/components/datepicker/demo/why-datepicker.md +2 -2
  39. package/components/datepicker/dist/{src/auro-calendar-cell.d.ts → auro-calendar-cell.d.ts} +48 -3
  40. package/components/datepicker/dist/{src/auro-calendar.d.ts → auro-calendar.d.ts} +188 -10
  41. package/components/datepicker/dist/{src/auro-datepicker.d.ts → auro-datepicker.d.ts} +89 -6
  42. package/components/datepicker/dist/blackoutUtils.d.ts +43 -0
  43. package/components/datepicker/dist/index.js +1690 -759
  44. package/components/datepicker/dist/registered.js +1690 -759
  45. package/components/dropdown/demo/customize.html +3 -0
  46. package/components/dropdown/demo/customize.min.js +142 -208
  47. package/components/dropdown/demo/getting-started.min.js +131 -207
  48. package/components/dropdown/demo/index.min.js +131 -207
  49. package/components/dropdown/dist/auro-dropdown.d.ts +17 -1
  50. package/components/dropdown/dist/index.js +131 -207
  51. package/components/dropdown/dist/registered.js +131 -207
  52. package/components/form/demo/api.md +3 -3
  53. package/components/form/demo/customize.html +6 -6
  54. package/components/form/demo/customize.md +535 -135
  55. package/components/form/demo/customize.min.js +6307 -4378
  56. package/components/form/demo/getting-started.md +344 -96
  57. package/components/form/demo/getting-started.min.js +6255 -4378
  58. package/components/form/demo/index.min.js +6206 -4378
  59. package/components/form/demo/registerDemoDeps.min.js +5827 -4333
  60. package/components/form/dist/auro-form.d.ts +128 -10
  61. package/components/form/dist/index.js +377 -43
  62. package/components/form/dist/registered.js +377 -43
  63. package/components/input/demo/accessibility.md +1 -1
  64. package/components/input/demo/api.md +58 -57
  65. package/components/input/demo/customize.html +1 -2
  66. package/components/input/demo/customize.md +62 -61
  67. package/components/input/demo/customize.min.js +396 -275
  68. package/components/input/demo/getting-started.min.js +396 -275
  69. package/components/input/demo/index.min.js +396 -275
  70. package/components/input/dist/auro-input.d.ts +1 -1
  71. package/components/input/dist/base-input.d.ts +60 -81
  72. package/components/input/dist/index.js +409 -276
  73. package/components/input/dist/registered.js +396 -275
  74. package/components/input/dist/utilities.d.ts +10 -1
  75. package/components/menu/demo/accessibility.md +9 -4
  76. package/components/menu/demo/api.md +48 -45
  77. package/components/menu/demo/css-only.md +26 -19
  78. package/components/menu/demo/customize.md +307 -75
  79. package/components/menu/demo/design.md +1 -1
  80. package/components/menu/demo/getting-started.md +144 -7
  81. package/components/menu/demo/index.min.js +961 -1341
  82. package/components/menu/demo/keyboard-behavior.md +83 -4
  83. package/components/menu/demo/voiceover.md +21 -14
  84. package/components/menu/demo/why-menu.md +8 -9
  85. package/components/menu/dist/auro-menu-utils.d.ts +19 -0
  86. package/components/menu/dist/auro-menu.d.ts +97 -116
  87. package/components/menu/dist/auro-menuoption.d.ts +39 -133
  88. package/components/menu/dist/index.js +823 -1309
  89. package/components/menu/dist/registered.js +835 -1309
  90. package/components/radio/demo/accessibility.md +1 -1
  91. package/components/radio/demo/customize.min.js +23 -8
  92. package/components/radio/demo/getting-started.min.js +23 -8
  93. package/components/radio/demo/index.min.js +23 -8
  94. package/components/radio/dist/index.js +23 -8
  95. package/components/radio/dist/registered.js +23 -8
  96. package/components/select/demo/accessibility.md +6 -1
  97. package/components/select/demo/api.md +3 -2
  98. package/components/select/demo/customize.html +1 -2
  99. package/components/select/demo/customize.md +210 -5
  100. package/components/select/demo/customize.min.js +1613 -1854
  101. package/components/select/demo/design.md +10 -10
  102. package/components/select/demo/getting-started.md +1 -1
  103. package/components/select/demo/getting-started.min.js +1617 -1903
  104. package/components/select/demo/index.md +2 -2
  105. package/components/select/demo/index.min.js +1613 -1854
  106. package/components/select/demo/keyboard-behavior.md +81 -54
  107. package/components/select/demo/voiceover.md +28 -15
  108. package/components/select/dist/auro-select.d.ts +70 -12
  109. package/components/select/dist/index.js +580 -315
  110. package/components/select/dist/registered.js +580 -315
  111. package/components/select/dist/selectUtils.d.ts +24 -0
  112. package/custom-elements.json +8071 -7919
  113. package/package.json +7 -3
  114. package/components/checkbox/demo/customize.js +0 -22
  115. package/components/checkbox/demo/demo-support.js +0 -1
  116. package/components/checkbox/demo/getting-started.js +0 -22
  117. package/components/checkbox/demo/index.js +0 -8
  118. package/components/checkbox/demo/styles.scss +0 -1
  119. package/components/combobox/demo/customize.js +0 -24
  120. package/components/combobox/demo/demo-support.js +0 -1
  121. package/components/combobox/demo/getting-started.js +0 -21
  122. package/components/combobox/demo/index.js +0 -23
  123. package/components/combobox/demo/styles.scss +0 -1
  124. package/components/counter/demo/customize.js +0 -21
  125. package/components/counter/demo/demo-support.js +0 -1
  126. package/components/counter/demo/index.js +0 -21
  127. package/components/counter/demo/styles.scss +0 -1
  128. package/components/datepicker/demo/customize.js +0 -19
  129. package/components/datepicker/demo/demo-support.js +0 -1
  130. package/components/datepicker/demo/index.js +0 -23
  131. package/components/datepicker/demo/styles.scss +0 -1
  132. package/components/dropdown/demo/customize.js +0 -9
  133. package/components/dropdown/demo/demo-support.js +0 -1
  134. package/components/dropdown/demo/getting-started.js +0 -9
  135. package/components/dropdown/demo/index.js +0 -16
  136. package/components/dropdown/demo/styles.scss +0 -1
  137. package/components/form/demo/customize.js +0 -9
  138. package/components/form/demo/demo-support.js +0 -1
  139. package/components/form/demo/getting-started.js +0 -9
  140. package/components/form/demo/index.js +0 -5
  141. package/components/form/demo/registerDemoDeps.js +0 -23
  142. package/components/form/demo/styles.scss +0 -1
  143. package/components/input/demo/customize.js +0 -25
  144. package/components/input/demo/demo-support.js +0 -1
  145. package/components/input/demo/getting-started.js +0 -8
  146. package/components/input/demo/index.js +0 -8
  147. package/components/input/demo/styles.css +0 -974
  148. package/components/input/demo/styles.scss +0 -1
  149. package/components/menu/demo/demo-support.js +0 -1
  150. package/components/menu/demo/index.js +0 -25
  151. package/components/menu/demo/styles.scss +0 -1
  152. package/components/menu/dist/auro-menu.context.d.ts +0 -238
  153. package/components/radio/demo/customize.js +0 -22
  154. package/components/radio/demo/demo-support.js +0 -1
  155. package/components/radio/demo/getting-started.js +0 -24
  156. package/components/radio/demo/index.js +0 -8
  157. package/components/radio/demo/styles.scss +0 -1
  158. package/components/select/demo/customize.js +0 -11
  159. package/components/select/demo/demo-support.js +0 -1
  160. package/components/select/demo/getting-started.js +0 -26
  161. package/components/select/demo/index.js +0 -11
  162. package/components/select/demo/styles.scss +0 -1
  163. /package/components/counter/dist/styles/{counter-wrapper-color-css.d.ts → counter-group-color-css.d.ts} +0 -0
  164. /package/components/datepicker/dist/{src/auro-calendar-month.d.ts → auro-calendar-month.d.ts} +0 -0
  165. /package/components/datepicker/dist/{src/buttonVersion.d.ts → buttonVersion.d.ts} +0 -0
  166. /package/components/datepicker/dist/{src/datepickerKeyboardStrategy.d.ts → datepickerKeyboardStrategy.d.ts} +0 -0
  167. /package/components/datepicker/dist/{src/iconVersion.d.ts → iconVersion.d.ts} +0 -0
  168. /package/components/datepicker/dist/{src/index.d.ts → index.d.ts} +0 -0
  169. /package/components/datepicker/dist/{src/popoverVersion.d.ts → popoverVersion.d.ts} +0 -0
  170. /package/components/datepicker/dist/{src/styles → styles}/classic/color-css.d.ts +0 -0
  171. /package/components/datepicker/dist/{src/styles → styles}/classic/style-css.d.ts +0 -0
  172. /package/components/datepicker/dist/{src/styles → styles}/color-calendar-css.d.ts +0 -0
  173. /package/components/datepicker/dist/{src/styles → styles}/color-cell-css.d.ts +0 -0
  174. /package/components/datepicker/dist/{src/styles → styles}/color-css.d.ts +0 -0
  175. /package/components/datepicker/dist/{src/styles → styles}/color-month-css.d.ts +0 -0
  176. /package/components/datepicker/dist/{src/styles → styles}/shapeSize-css.d.ts +0 -0
  177. /package/components/datepicker/dist/{src/styles → styles}/snowflake/color-css.d.ts +0 -0
  178. /package/components/datepicker/dist/{src/styles → styles}/snowflake/style-css.d.ts +0 -0
  179. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-cell-css.d.ts +0 -0
  180. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-css.d.ts +0 -0
  181. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-month-css.d.ts +0 -0
  182. /package/components/datepicker/dist/{src/styles → styles}/style-css.d.ts +0 -0
  183. /package/components/datepicker/dist/{src/styles → styles}/tokens-css.d.ts +0 -0
  184. /package/components/datepicker/dist/{src/utilities.d.ts → utilities.d.ts} +0 -0
  185. /package/components/datepicker/dist/{src/utilitiesCalendar.d.ts → utilitiesCalendar.d.ts} +0 -0
  186. /package/components/datepicker/dist/{src/utilitiesCalendarRender.d.ts → utilitiesCalendarRender.d.ts} +0 -0
  187. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/day.d.ts +0 -0
  188. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -0
  189. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
  190. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker.d.ts +0 -0
@@ -51,7 +51,7 @@ export class AuroInputUtilities {
51
51
  /**
52
52
  * Converts an IMask-style date mask to a date-fns compatible format string.
53
53
  * @param {string} mask - IMask date mask (e.g. "MM/DD/YYYY").
54
- * @returns {string} date-fns format string (e.g. "MM/dd/yyyy").
54
+ * @returns {string} A date-fns format string (e.g. "MM/dd/yyyy").
55
55
  */
56
56
  toDateFnsMask(mask: string): string;
57
57
  /**
@@ -62,6 +62,15 @@ export class AuroInputUtilities {
62
62
  * @returns {boolean}
63
63
  */
64
64
  private isFullDateFormat;
65
+ /**
66
+ * Validates a value against a partial date format (one that lacks yy/mm/dd all three).
67
+ * Day- and year-only formats (dd/yy/yyyy) are checked as integer ranges; other partial formats use
68
+ * a date-fns parse + round-trip to confirm both validity and exact formatting.
69
+ * @param {string} value - The user-facing display value.
70
+ * @param {string} format - The partial date format string (e.g. "mm/yyyy", "yyyy", "dd").
71
+ * @returns {boolean}
72
+ */
73
+ isValidPartialDate(value: string, format: string): boolean;
65
74
  /**
66
75
  * Converts a display string to its model value.
67
76
  * For full date formats, converts the display string to an ISO date string.
@@ -19,11 +19,16 @@
19
19
  <auro-header level="2" id="keyboardInteraction">Keyboard Interaction</auro-header>
20
20
  <p>The menu supports full keyboard navigation:</p>
21
21
  <ul>
22
- <li><strong>Arrow Down / Arrow Up:</strong> Moves focus between options.</li>
23
- <li><strong>Enter / Space:</strong> Selects the currently focused option.</li>
24
- <li><strong>Home / End:</strong> Moves focus to the first or last option.</li>
22
+ <li><strong>Arrow Down / Arrow Up:</strong> Moves the active option.</li>
23
+ <li><strong>Enter:</strong> Selects the currently active option.</li>
24
+ <li><strong>Tab:</strong> Selects the currently active option and moves focus out of the menu.</li>
25
25
  </ul>
26
- <p>See the <auro-hyperlink href="keyboardBehavior">Keyboard Behavior</auro-hyperlink> page for full details.</p>
26
+ <p>See the <auro-hyperlink href="keyboard-behavior">Keyboard Behavior</auro-hyperlink> page for full details.</p>
27
+ </section>
28
+ <section>
29
+ <auro-header level="2" id="modifierKeys">Modifier Keys</auro-header>
30
+ <p>The <strong>Meta</strong> key (Command on macOS, Windows/Super elsewhere) is intentionally not used as a modifier for menu keyboard shortcuts. On Windows, Linux, and ChromeOS, the operating system intercepts <code>Meta</code> + Arrow combinations for window management (e.g. window snapping) before the browser receives the event, so any shortcut bound to <code>Meta</code> + Arrow would work only on macOS and silently fail on other platforms.</p>
31
+ <p>To jump to the first or last option in a way that works uniformly across platforms, use <strong>Home</strong> and <strong>End</strong>, which follow the <a href="https://www.w3.org/WAI/ARIA/apg/patterns/listbox/" target="_blank">WAI-ARIA Listbox pattern</a>.</p>
27
32
  </section>
28
33
  <section>
29
34
  <auro-header level="2" id="multiselect">Multi-Select</auro-header>
@@ -7,32 +7,32 @@ The `auro-menu` element provides users a way to select from a list of options.
7
7
 
8
8
  ## Properties
9
9
 
10
- | Property | Attribute | Modifiers | Type | Default | Description |
11
- |----------------------------|----------------------------|-----------|-----------------------|-------------|--------------------------------------------------|
12
- | `allowDeselect` | `allowDeselect` | | `boolean` | false | Allows deselecting an already selected option when clicked again in single-select mode. |
13
- | `currentLabel` | | readonly | `string` | | |
14
- | `disabled` | `disabled` | | `boolean` | | When true, the entire menu and all options are disabled. |
15
- | `hasLoadingPlaceholder` | `hasLoadingPlaceholder` | | `boolean` | | Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state. |
16
- | `index` | | | `number` | | |
17
- | `items` | | readonly | `HTMLElement[]` | | |
18
- | `loading` | `loading` | | `boolean` | false | When true, displays a loading state using the loadingIcon and loadingText slots if provided. |
19
- | `matchWord` | `matchword` | | `string` | "undefined" | Specifies a string used to highlight matched string parts in options. |
20
- | `multiSelect` | `multiselect` | | `boolean` | false | When true, the selected option can be multiple options. |
21
- | `noCheckmark` | `nocheckmark` | | `boolean` | false | When true, selected option will not show the checkmark. |
22
- | `optionActive` | `optionactive` | | `object` | "undefined" | Specifies the current active menuOption. |
23
- | `optionSelected` | `optionSelected` | | `object` | "undefined" | An array of currently selected menu options, type `HTMLElement` by default. In multi-select mode, `optionSelected` is an array of HTML elements. |
24
- | `options` | | readonly | `array` | | Available menu options. |
25
- | `selectAllMatchingOptions` | `selectAllMatchingOptions` | | `boolean` | false | When true, selects all options that match the provided value/key when setting value and multiselect is enabled. |
26
- | `selectedOption` | | readonly | `HTMLElement \| null` | | Gets the first selected option, or null if none. |
27
- | `selectedOptions` | | readonly | `HTMLElement[]` | | Gets the currently selected options. |
28
- | `value` | `value` | | `string` | | The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values. |
10
+ | Property | Attribute | Modifiers | Type | Default | Description |
11
+ |-------------------------|---------------|-----------|-----------------------|-------------|--------------------------------------------------|
12
+ | `currentLabel` | | readonly | `string` | | |
13
+ | `disabled` | `disabled` | | `boolean` | | When true, the entire menu and all options are disabled. |
14
+ | `hasLoadingPlaceholder` | | readonly | `boolean` | | Getter for loading placeholder state. |
15
+ | `index` | | | `number` | | |
16
+ | `layout` | | | `string` | | |
17
+ | `loading` | `loading` | | `boolean` | false | When true, displays a loading state using the loadingIcon and loadingText slots if provided. |
18
+ | `matchWord` | `matchword` | | `string` | "undefined" | Specifies a string used to highlight matched string parts in options. |
19
+ | `multiSelect` | `multiselect` | | `boolean` | false | When true, the selected option can be multiple options. |
20
+ | `noCheckmark` | `nocheckmark` | | `boolean` | false | When true, selected option will not show the checkmark. |
21
+ | `optionActive` | | | `object` | "undefined" | Specifies the current active menuOption. |
22
+ | `optionSelected` | | | `object` | "undefined" | The currently selected menu option(s). In single-select mode this is a single `HTMLElement` (or `undefined` when nothing is selected). In multi-select mode this is an array of `HTMLElement`s. |
23
+ | `options` | | readonly | `HTMLElement[]` | | |
24
+ | `selectedOption` | | readonly | `HTMLElement \| null` | | Gets the first selected option, or null if none. |
25
+ | `selectedOptions` | | readonly | `HTMLElement[]` | | Gets the currently selected options as an array. |
26
+ | `value` | `value` | | `string` | "undefined" | The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.<br />Options marked `disabled` or `static` are not selectable by value; `hidden` options remain selectable. In single-select mode, if the value matches a non-selectable option the selection is cleared (`optionSelected` becomes `undefined`) and `auroMenu-selectValueFailure` is dispatched. In multi-select mode, non-selectable entries are dropped from the value and the remaining selectable entries are selected; `auroMenu-selectValueFailure` is dispatched only when none of the entries match a selectable option. |
29
27
 
30
28
  ## Methods
31
29
 
32
- | Method | Type | Description |
33
- |----------------------|-------------------------------|--------------------------------------------------|
34
- | `reset` | `(): void` | Resets the menu to its initial state.<br />This is the only way to return value to undefined. |
35
- | `updateActiveOption` | `(option: HTMLElement): void` | Updates the currently active option in the menu.<br /><br />**option**: The option to set as active. |
30
+ | Method | Type | Description |
31
+ |----------------------|--------------------------------------------------|--------------------------------------------------|
32
+ | `navigateOptions` | `(direction: string): void` | Navigates through options using keyboard.<br /><br />**direction**: 'up' or 'down'. |
33
+ | `reset` | `(): void` | Resets the menu to its initial state.<br />This is the only way to return value to undefined. |
34
+ | `selectByValue` | `(value: string \| string[] \| null \| undefined): void` | Selects options by value. Options marked `disabled` or `static` are not selectable; `hidden` options remain selectable. In single-select mode, if the value matches a non-selectable option the selection is cleared and `auroMenu-selectValueFailure` is dispatched. In multi-select mode, non-selectable entries are dropped and the remaining selectable entries are selected; `auroMenu-selectValueFailure` is dispatched only when none of the entries match a selectable option. Passing `undefined`, `null`, an empty string, or an empty array clears the selection without dispatching a failure.<br /><br />**value**: The value(s) to select. |
35
+ | `updateActiveOption` | `(indexOrOption: number \| HTMLElement): void` | Updates the active option state and dispatches events.<br />Accepts either a numeric index or an HTMLElement option.<br /><br />**indexOrOption**: Index of the option or the option element to make active. |
36
36
 
37
37
  ## Events
38
38
 
@@ -40,9 +40,8 @@ The `auro-menu` element provides users a way to select from a list of options.
40
40
  |-------------------------------|--------------------------------------------------|--------------------------------------------------|
41
41
  | `auroMenu-activatedOption` | `CustomEvent<Element>` | Notifies that a menuoption has been made `active`. |
42
42
  | `auroMenu-customEventFired` | `CustomEvent<any>` | Notifies that a custom event has been fired. |
43
- | `auroMenu-deselectPrevented` | `CustomEvent<{ values: HTMLElement[] }>` | Notifies that deselection was prevented and includes the affected options in `detail.values`. |
44
43
  | `auroMenu-loadingChange` | `CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>` | Notifies when the loading attribute is changed. |
45
- | `auroMenu-optionsChange` | `CustomEvent<{ options: any; }>` | |
44
+ | `auroMenu-optionsChange` | `CustomEvent<{ options: Element[] \| undefined; }>` | |
46
45
  | `auroMenu-selectValueFailure` | `CustomEvent<any>` | Notifies that an attempt to select a menuoption by matching a value has failed. |
47
46
  | `auroMenu-selectValueReset` | `CustomEvent<any>` | Notifies that the component value has been reset. |
48
47
  | `auroMenu-selectedOption` | `CustomEvent<any>` | Notifies that a new menuoption selection has been made. |
@@ -59,36 +58,40 @@ The `auro-menu` element provides users a way to select from a list of options.
59
58
 
60
59
  The `auro-menuoption` element provides users a way to define a menu option.
61
60
 
61
+ ## Attributes
62
+
63
+ | Attribute | Type | Description |
64
+ |-----------|-----------|--------------------------------------------------|
65
+ | `static` | `Boolean` | When present, marks the option as non-interactive — it renders but is skipped during keyboard navigation and cannot be selected. Useful for section headers, informational rows inside a menu, or attaching event listeners. |
66
+
62
67
  ## Properties
63
68
 
64
- | Property | Attribute | Modifiers | Type | Default | Description |
65
- |---------------|------------|-----------|-----------|---------|--------------------------------------------------|
66
- | `disabled` | `disabled` | | `boolean` | false | When true, disables the menu option. |
67
- | `iconTag` | | | | | |
68
- | `isActive` | | readonly | `boolean` | | Returns whether the menu option is currently active and selectable.<br />An option is considered active if it is not hidden, not disabled, and not static. |
69
- | `key` | `key` | | `string` | | Allows users to set a unique key for the menu option for specified option selection. If no key is provided, the value property will be used. |
70
- | `noMatch` | `nomatch` | | `boolean` | false | When true, marks this option as the "no matching results" placeholder shown by combobox when the user's input does not match any available options. Enables distinct styling and prevents the option from being treated as a selectable match. |
71
- | `selected` | `selected` | | `boolean` | false | Specifies that an option is selected. |
72
- | `tabIndex` | `tabIndex` | | `number` | | Specifies the tab index of the menu option. |
73
- | `unsubscribe` | | | `number` | null | |
74
- | `value` | `value` | | `string` | | Specifies the value to be sent to a server. |
69
+ | Property | Attribute | Modifiers | Type | Default | Description |
70
+ |---------------|---------------|-----------|-----------|---------|--------------------------------------------------|
71
+ | `disabled` | `disabled` | | `boolean` | false | |
72
+ | `iconTag` | | | | | |
73
+ | `isActive` | | readonly | `boolean` | | Returns whether the menu option is currently active and selectable. |
74
+ | `layout` | | | `string` | | |
75
+ | `noCheckmark` | `noCheckmark` | | `boolean` | false | |
76
+ | `noMatch` | `nomatch` | | `boolean` | false | When true, marks this option as the "no matching results" placeholder shown by combobox<br />when the user's input does not match any available options. |
77
+ | `persistent` | `persistent` | | `boolean` | false | When true, this option is excluded from `matchWord` DOM rewriting — useful for utility rows (e.g., "Add new…") that must render identically regardless of the current filter. |
78
+ | `selected` | `selected` | | `boolean` | false | **Deprecated.** Use the `value` attribute on `auro-menu` to set the selected option when the menu renders (or call `menu.selectByValue(value)` programmatically). Support for the child-level `selected` attribute will be removed in a future major release. |
79
+ | `value` | `value` | | `string` | | |
75
80
 
76
81
  ## Methods
77
82
 
78
- | Method | Type | Description |
79
- |-----------------------|-------------------------------|--------------------------------------------------|
80
- | `attachTo` | `(service: Object): void` | Attaches this menu option to a menu service and subscribes to its events.<br />This method enables the option to participate in menu selection and highlighting logic.<br /><br />**service**: The menu service instance to attach to. |
81
- | `bindEvents` | `(): void` | Sets up event listeners for user interaction with the menu option.<br />This function enables click and mouse enter events to trigger selection and highlighting logic. |
82
- | `handleMenuChange` | `(event: Object): void` | Handles changes from the menu service and updates the option's state.<br />This function synchronizes the option's properties and selection/highlight state with menu events.<br /><br />**event**: The event object from the menu service. |
83
- | `setInternalSelected` | `(isSelected: boolean): void` | Updates the internal selected state of the menu option bypassing 'updated' and triggers custom events if selected.<br />This function ensures the option's selection state is synchronized with menu logic and notifies listeners.<br /><br />**isSelected**: Whether the option should be marked as selected. |
84
- | `setSelected` | `(isSelected: boolean): void` | Sets the selected state of the menu option.<br />This function updates whether the option is currently selected.<br /><br />**isSelected**: Whether the option should be marked as selected. |
85
- | `updateActive` | `(isActive: boolean): void` | Updates the active state and visual highlighting of the menu option.<br />This function toggles the option's active status and applies or removes the active CSS class.<br /><br />**isActive**: Whether the option should be marked as active. |
83
+ | Method | Type |
84
+ |--------------------|-----------------------|
85
+ | `attachTo` | `(): void` |
86
+ | `handleMenuChange` | `(): void` |
87
+ | `setSelected` | `(value: any): void` |
88
+ | `updateActive` | `(active: any): void` |
86
89
 
87
90
  ## Events
88
91
 
89
92
  | Event | Type | Description |
90
93
  |----------------------------|---------------------|--------------------------------------------------|
91
- | `auroMenuOption-click` | `CustomEvent<this>` | |
94
+ | `auroMenuOption-click` | `CustomEvent<this>` | Notifies that this option has been clicked. |
92
95
  | `auroMenuOption-mouseover` | `CustomEvent<this>` | Notifies that this option has been hovered over. |
93
96
 
94
97
  ## Slots
@@ -54,26 +54,28 @@
54
54
  &lt;/ul&gt;</code></pre>
55
55
  <auro-header level="2">What you lose without auro-menu</auro-header>
56
56
  <p>While the CSS above replicates the <strong>visual styling</strong> of <code>auro-menu</code>, the following functionality built into the <code>auro-menu</code> and <code>auro-menuoption</code> web components is <strong>not available</strong> when using plain HTML:</p>
57
- <auro-header level="3">Roving tabindex</auro-header>
58
- <p><code>auro-menu</code> manages a roving <code>tabindex</code> so that only the currently active option is in the tab order, and focus moves between options without leaving the menu. With plain HTML, you must implement the roving-tabindex pattern yourself by maintaining the <code>tabindex="0"</code>/<code>tabindex="-1"</code> state across all options on every focus and key event.</p>
57
+ <auro-header level="3">Active-option tracking</auro-header>
58
+ <p><code>auro-menu</code> tracks the active option internally (via an <code>active</code> CSS class on the current <code>auro-menuoption</code>) rather than moving DOM focus between options. In typical integrations (<code>&lt;auro-select&gt;</code>, <code>&lt;auro-combobox&gt;</code>), focus remains on the parent trigger/input and <code>aria-activedescendant</code> points at the active option; if you make <code>&lt;auro-menu&gt;</code> focusable (e.g., <code>tabindex="0"</code>), the same active-option model applies while focus is on the menu host. With plain HTML, you must pick one focus model either roving <code>tabindex="0"</code>/<code>tabindex="-1"</code>, or <code>aria-activedescendant</code> on the container and wire up the DOM writes yourself on every key event.</p>
59
59
  <auro-header level="3">Arrow-key navigation</auro-header>
60
- <p><code>auro-menu</code> handles <code>ArrowUp</code>, <code>ArrowDown</code>, <code>Home</code>, <code>End</code>, <code>Enter</code>, and <code>Space</code> to move the highlight and commit selections. Native <code>&lt;ul&gt;</code> elements have no built-in keyboard model — you must wire up <code>keydown</code> listeners, track the highlighted index, and prevent default browser scrolling on the arrow keys yourself.</p>
61
- <auro-header level="3">Type-ahead search</auro-header>
62
- <p><code>auro-menu</code> supports a <code>matchword</code> attribute that highlights matched substrings within option labels, and the listbox supports type-ahead focus jumping. Plain HTML provides neither both behaviors must be implemented manually with string matching and DOM manipulation.</p>
60
+ <p><code>auro-menu</code> handles <code>ArrowUp</code>, <code>ArrowDown</code>, <code>Enter</code>, and <code>Tab</code> to move the highlight and commit selections. Native <code>&lt;ul&gt;</code> elements have no built-in keyboard model — you must wire up <code>keydown</code> listeners, track the highlighted index, and prevent default browser scrolling on the arrow keys yourself.</p>
61
+ <auro-header level="3">matchWord highlighting</auro-header>
62
+ <p><code>auro-menu</code> supports a <code>matchWord</code> attribute that highlights matched substrings within option labels used by <code>auro-combobox</code> to visually mark the user's typed input inside each filtered option. Plain HTML provides no equivalent; you must walk each option and wrap matched substrings yourself.</p>
63
+ <auro-header level="3">Type-ahead navigation</auro-header>
64
+ <p>Type-ahead — jumping the active option to whichever entry starts with the letters the user typed — is <strong>not</strong> handled by <code>auro-menu</code> itself. It is provided by the parent selection component (<code>auro-select</code>, <code>auro-combobox</code>) which captures printable characters on its trigger and calls back into the menu. A plain-HTML listbox has no such wiring and would need a bespoke keydown handler that tracks a rolling character buffer and resolves it against the option list.</p>
63
65
  <auro-header level="3">Nested submenu support</auro-header>
64
- <p><code>auro-menu</code> detects nested <code>auro-menu</code> elements, applies the correct <code>role="group"</code>, computes indentation per level, and propagates the shared menu service down the tree. With plain HTML, you must apply nested ARIA roles and indentation manually, and there is no built-in coordination of focus or selection between parent and child lists.</p>
66
+ <p><code>auro-menu</code> detects nested <code>auro-menu</code> elements, applies the correct <code>role="group"</code>, and computes indentation per level. The root menu treats all descendant options as a single flat list, so selecting an option inside a nested menu updates the root menu's <code>value</code> and <code>optionSelected</code> the root always owns the selection state. With plain HTML, you must apply nested ARIA roles and indentation manually.</p>
65
67
  <auro-header level="3">Selection state coordination</auro-header>
66
- <p><code>auro-menu</code> coordinates the selected option(s) through an internal <code>MenuService</code> that keeps <code>optionSelected</code>, <code>value</code>, and each option's <code>aria-selected</code> state in sync. With native HTML, you must update <code>aria-selected</code> on every option yourself on each change and manage your own source of truth for the selected value.</p>
68
+ <p><code>auro-menu</code> keeps <code>optionSelected</code>, <code>value</code>, and each option's <code>aria-selected</code> state in sync internally. With native HTML, you must update <code>aria-selected</code> on every option yourself on each change and manage your own source of truth for the selected value.</p>
67
69
  <auro-header level="3">ARIA roles and live announcements</auro-header>
68
70
  <p><code>auro-menu</code> automatically applies <code>role="listbox"</code>, <code>aria-multiselectable</code>, <code>aria-busy</code> during loading, and per-option <code>role="option"</code> with <code>aria-selected</code> and <code>aria-disabled</code>. Plain HTML requires you to author every one of these attributes by hand and keep them in sync with state — and to add any additional live-region announcements yourself.</p>
69
71
  <auro-header level="3">Value emission and events</auro-header>
70
- <p><code>auro-menu</code> dispatches a structured set of events — <code>auroMenu-selectedOption</code>, <code>auroMenu-activatedOption</code>, <code>auroMenu-optionsChange</code>, <code>auroMenu-selectValueReset</code>, <code>auroMenu-selectValueFailure</code>, <code>auroMenu-deselectPrevented</code>, and <code>auroMenu-loadingChange</code> — so parent components can react to highlight, selection, and lifecycle changes. Native listboxes emit no equivalent events; you must dispatch your own.</p>
72
+ <p><code>auro-menu</code> dispatches a structured set of events — <code>auroMenu-selectedOption</code>, <code>auroMenu-activatedOption</code>, <code>auroMenu-optionsChange</code>, <code>auroMenu-selectValueReset</code>, <code>auroMenu-selectValueFailure</code>, and <code>auroMenu-loadingChange</code> — so parent components can react to highlight, selection, and lifecycle changes. Native listboxes emit no equivalent events; you must dispatch your own.</p>
71
73
  <auro-header level="3">Multi-select with array value</auro-header>
72
74
  <p><code>auro-menu</code> supports <code>multiselect</code>, exposing the selection as a JSON-stringified array via <code>value</code> and as an array of elements via <code>optionSelected</code>. With plain HTML, you must track multiple selections yourself, manage the <code>aria-multiselectable</code> attribute, and serialize the result manually.</p>
73
- <auro-header level="3">Allow-deselect behavior</auro-header>
74
- <p><code>auro-menu</code> supports an <code>allowDeselect</code> attribute that lets a user click an already-selected option to clear it in single-select mode, with a <code>auroMenu-deselectPrevented</code> event when the operation is blocked. Native listboxes do not have a deselect concept; you must implement and gate the behavior yourself.</p>
75
+ <auro-header level="3">Multi-select deselect</auro-header>
76
+ <p>In multi-select mode, clicking an already-selected option toggles it off. Native listboxes have no built-in deselect concept for individual options; you must implement the toggle behavior and update <code>aria-selected</code> yourself.</p>
75
77
  <auro-header level="3">Select-by-value and reset</auro-header>
76
- <p><code>auro-menu</code> exposes a <code>value</code> attribute that drives selection programmatically (including the <code>selectAllMatchingOptions</code> option for multi-select) and a single <code>reset()</code> method that clears all selection and validation state. With plain HTML, you must walk the list to find a matching option, set its state, and write your own reset routine.</p>
78
+ <p><code>auro-menu</code> exposes a <code>value</code> attribute that drives selection programmatically (accepting a JSON-stringified array in multi-select mode) and a single <code>reset()</code> method that clears all selection and validation state. With plain HTML, you must walk the list to find a matching option, set its state, and write your own reset routine.</p>
77
79
  <auro-header level="3">Loading state</auro-header>
78
80
  <p><code>auro-menu</code> renders a built-in loading placeholder via <code>loadingIcon</code> and <code>loadingText</code> slots, sets <code>aria-busy</code>, and emits <code>auroMenu-loadingChange</code> when the loading attribute toggles. With plain HTML, you must render a placeholder, manage <code>aria-busy</code>, and signal loading transitions yourself.</p>
79
81
  <auro-header level="3">Shape and size variants</auro-header>
@@ -96,9 +98,9 @@
96
98
  <td>Built-in</td>
97
99
  </tr>
98
100
  <tr>
99
- <td>Roving tabindex</td>
100
- <td>Manual</td>
101
- <td>Built-in</td>
101
+ <td>Active-option tracking</td>
102
+ <td>Manual (roving tabindex or <code>aria-activedescendant</code>)</td>
103
+ <td>Built-in (<code>active</code> class on the current option)</td>
102
104
  </tr>
103
105
  <tr>
104
106
  <td>Arrow-key navigation</td>
@@ -106,9 +108,14 @@
106
108
  <td>Built-in</td>
107
109
  </tr>
108
110
  <tr>
109
- <td>Type-ahead and <code>matchword</code> highlighting</td>
111
+ <td><code>matchWord</code> highlighting</td>
112
+ <td>Not supported</td>
113
+ <td>Built-in via <code>matchWord</code></td>
114
+ </tr>
115
+ <tr>
116
+ <td>Type-ahead navigation</td>
110
117
  <td>Not supported</td>
111
- <td>Built-in via <code>matchword</code></td>
118
+ <td>Provided by parent <code>auro-select</code> / <code>auro-combobox</code></td>
112
119
  </tr>
113
120
  <tr>
114
121
  <td>Nested submenus</td>
@@ -118,7 +125,7 @@
118
125
  <tr>
119
126
  <td>Selection state coordination</td>
120
127
  <td>Manual <code>aria-selected</code> sync</td>
121
- <td>Centralized via menu service</td>
128
+ <td>Coordinated internally</td>
122
129
  </tr>
123
130
  <tr>
124
131
  <td>ARIA roles and <code>aria-busy</code></td>
@@ -136,9 +143,9 @@
136
143
  <td><code>multiselect</code> + <code>value</code></td>
137
144
  </tr>
138
145
  <tr>
139
- <td>Allow-deselect behavior</td>
146
+ <td>Multi-select deselect</td>
140
147
  <td>Manual</td>
141
- <td><code>allowDeselect</code> attribute</td>
148
+ <td>Click-to-toggle built in</td>
142
149
  </tr>
143
150
  <tr>
144
151
  <td>Select-by-value and reset</td>