@aurodesignsystem-dev/auro-formkit 0.0.0-pr1628.1 → 0.0.0-pr1628.10

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 (155) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +1 -1
  2. package/components/bibtemplate/dist/index.js +1 -1
  3. package/components/bibtemplate/dist/registered.js +1 -1
  4. package/components/checkbox/README.md +1 -1
  5. package/components/checkbox/demo/accessibility.md +2 -2
  6. package/components/checkbox/demo/api.md +17 -17
  7. package/components/checkbox/demo/customize.md +16 -16
  8. package/components/checkbox/demo/customize.min.js +3 -3
  9. package/components/checkbox/demo/design.md +24 -24
  10. package/components/checkbox/demo/getting-started.md +33 -27
  11. package/components/checkbox/demo/getting-started.min.js +3 -3
  12. package/components/checkbox/demo/index.md +17 -17
  13. package/components/checkbox/demo/index.min.js +3 -3
  14. package/components/checkbox/demo/readme.md +1 -1
  15. package/components/checkbox/dist/auro-checkbox-group.d.ts +2 -2
  16. package/components/checkbox/dist/index.js +3 -3
  17. package/components/checkbox/dist/registered.js +3 -3
  18. package/components/combobox/demo/api.md +3 -3
  19. package/components/combobox/demo/css-only.md +3 -3
  20. package/components/combobox/demo/customize.md +12 -12
  21. package/components/combobox/demo/customize.min.js +50 -32
  22. package/components/combobox/demo/getting-started.min.js +50 -32
  23. package/components/combobox/demo/index.md +1 -1
  24. package/components/combobox/demo/index.min.js +50 -32
  25. package/components/combobox/dist/auro-combobox.d.ts +6 -4
  26. package/components/combobox/dist/index.js +39 -22
  27. package/components/combobox/dist/registered.js +39 -22
  28. package/components/counter/demo/accessibility.md +1 -1
  29. package/components/counter/demo/api.md +18 -18
  30. package/components/counter/demo/css-only.md +1 -1
  31. package/components/counter/demo/customize.md +2 -2
  32. package/components/counter/demo/customize.min.js +28 -28
  33. package/components/counter/demo/design.md +1 -1
  34. package/components/counter/demo/getting-started.md +29 -2
  35. package/components/counter/demo/getting-started.min.js +28 -28
  36. package/components/counter/demo/index.min.js +28 -28
  37. package/components/counter/demo/why-counter.md +3 -3
  38. package/components/counter/dist/auro-counter-group.d.ts +13 -14
  39. package/components/counter/dist/auro-counter.d.ts +1 -1
  40. package/components/counter/dist/index.js +28 -28
  41. package/components/counter/dist/registered.js +28 -28
  42. package/components/datepicker/README.md +1 -1
  43. package/components/datepicker/demo/accessibility.md +5 -5
  44. package/components/datepicker/demo/api.md +3 -3
  45. package/components/datepicker/demo/css-only.md +4 -4
  46. package/components/datepicker/demo/customize.md +12 -12
  47. package/components/datepicker/demo/customize.min.js +186 -132
  48. package/components/datepicker/demo/design.md +11 -11
  49. package/components/datepicker/demo/getting-started.md +4 -4
  50. package/components/datepicker/demo/getting-started.min.js +186 -132
  51. package/components/datepicker/demo/index.md +5 -5
  52. package/components/datepicker/demo/index.min.js +186 -132
  53. package/components/datepicker/demo/keyboard-behavior.md +1 -1
  54. package/components/datepicker/demo/readme.md +1 -1
  55. package/components/datepicker/demo/voiceover.md +4 -4
  56. package/components/datepicker/demo/why-datepicker.md +3 -3
  57. package/components/datepicker/dist/auro-calendar-cell.d.ts +32 -33
  58. package/components/datepicker/dist/auro-calendar-month.d.ts +8 -8
  59. package/components/datepicker/dist/auro-calendar.d.ts +44 -43
  60. package/components/datepicker/dist/auro-datepicker.d.ts +12 -10
  61. package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +3 -0
  62. package/components/datepicker/dist/index.js +186 -132
  63. package/components/datepicker/dist/registered.js +186 -132
  64. package/components/datepicker/dist/utilities.d.ts +4 -1
  65. package/components/datepicker/dist/utilitiesCalendar.d.ts +12 -4
  66. package/components/datepicker/dist/utilitiesCalendarRender.d.ts +12 -6
  67. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +4 -4
  68. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +7 -7
  69. package/components/dropdown/demo/api.md +7 -7
  70. package/components/dropdown/demo/css-only.md +2 -2
  71. package/components/dropdown/demo/customize.md +1 -1
  72. package/components/dropdown/demo/customize.min.js +10 -9
  73. package/components/dropdown/demo/design.md +4 -4
  74. package/components/dropdown/demo/getting-started.min.js +31 -16
  75. package/components/dropdown/demo/index.min.js +10 -9
  76. package/components/dropdown/demo/voiceover.md +1 -1
  77. package/components/dropdown/demo/why-dropdown.md +1 -1
  78. package/components/dropdown/dist/auro-dropdown.d.ts +9 -8
  79. package/components/dropdown/dist/index.js +10 -9
  80. package/components/dropdown/dist/registered.js +10 -9
  81. package/components/form/README.md +1 -1
  82. package/components/form/demo/api.md +7 -7
  83. package/components/form/demo/css-only.md +1 -1
  84. package/components/form/demo/customize.md +2 -0
  85. package/components/form/demo/customize.min.js +316 -230
  86. package/components/form/demo/getting-started.md +2 -0
  87. package/components/form/demo/getting-started.min.js +316 -230
  88. package/components/form/demo/index.md +2 -2
  89. package/components/form/demo/index.min.js +316 -230
  90. package/components/form/demo/keyboard-behavior.md +1 -1
  91. package/components/form/demo/readme.md +1 -1
  92. package/components/form/demo/registerDemoDeps.min.js +314 -228
  93. package/components/form/demo/voiceover.md +3 -3
  94. package/components/form/demo/why-form.md +1 -1
  95. package/components/form/dist/auro-form.d.ts +2 -2
  96. package/components/form/dist/index.js +2 -2
  97. package/components/form/dist/registered.js +2 -2
  98. package/components/input/demo/api.md +58 -58
  99. package/components/input/demo/css-only.md +4 -4
  100. package/components/input/demo/customize.md +11 -11
  101. package/components/input/demo/customize.min.js +21 -7
  102. package/components/input/demo/design.md +2 -2
  103. package/components/input/demo/getting-started.md +5 -5
  104. package/components/input/demo/getting-started.min.js +21 -7
  105. package/components/input/demo/index.md +1 -1
  106. package/components/input/demo/index.min.js +21 -7
  107. package/components/input/demo/why-input.md +3 -3
  108. package/components/input/dist/auro-input.d.ts +1 -1
  109. package/components/input/dist/base-input.d.ts +6 -5
  110. package/components/input/dist/index.js +21 -7
  111. package/components/input/dist/registered.js +21 -7
  112. package/components/input/dist/utilities.d.ts +11 -0
  113. package/components/menu/demo/accessibility.md +1 -1
  114. package/components/menu/demo/api.md +1 -1
  115. package/components/menu/demo/css-only.md +4 -4
  116. package/components/menu/demo/customize.md +1 -1
  117. package/components/menu/demo/design.md +1 -1
  118. package/components/menu/demo/getting-started.md +3 -3
  119. package/components/menu/demo/index.min.js +11 -10
  120. package/components/menu/demo/keyboard-behavior.md +1 -1
  121. package/components/menu/demo/voiceover.md +1 -1
  122. package/components/menu/demo/why-menu.md +3 -3
  123. package/components/menu/dist/auro-menu.d.ts +10 -9
  124. package/components/menu/dist/auro-menuoption.d.ts +1 -1
  125. package/components/menu/dist/index.js +11 -10
  126. package/components/menu/dist/registered.js +11 -10
  127. package/components/radio/demo/accessibility.md +1 -1
  128. package/components/radio/demo/api.md +10 -10
  129. package/components/radio/demo/customize.md +15 -5
  130. package/components/radio/demo/customize.min.js +10 -12
  131. package/components/radio/demo/design.md +1 -1
  132. package/components/radio/demo/getting-started.md +6 -6
  133. package/components/radio/demo/getting-started.min.js +10 -12
  134. package/components/radio/demo/index.md +1 -1
  135. package/components/radio/demo/index.min.js +10 -12
  136. package/components/radio/demo/keyboard-behavior.md +1 -1
  137. package/components/radio/demo/voiceover.md +1 -1
  138. package/components/radio/demo/why-radio.md +1 -1
  139. package/components/radio/dist/auro-radio-group.d.ts +6 -8
  140. package/components/radio/dist/auro-radio.d.ts +3 -3
  141. package/components/radio/dist/index.js +10 -12
  142. package/components/radio/dist/registered.js +10 -12
  143. package/components/select/demo/api.md +1 -1
  144. package/components/select/demo/css-only.md +1 -1
  145. package/components/select/demo/customize.md +1 -1
  146. package/components/select/demo/customize.min.js +27 -24
  147. package/components/select/demo/getting-started.min.js +27 -24
  148. package/components/select/demo/index.md +1 -1
  149. package/components/select/demo/index.min.js +27 -24
  150. package/components/select/demo/voiceover.md +1 -1
  151. package/components/select/dist/auro-select.d.ts +4 -3
  152. package/components/select/dist/index.js +16 -14
  153. package/components/select/dist/registered.js +16 -14
  154. package/custom-elements.json +148 -132
  155. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- <auro-header level="1" id="overview">Menu - Keyboard behavior</auro-header>
1
+ <auro-header level="1" id="overview">Menu: Keyboard behavior</auro-header>
2
2
  <div class="contentWrapper">
3
3
  <div class="mainContent">
4
4
  <div class="scrollWrapper">
@@ -1,4 +1,4 @@
1
- <auro-header level="1" id="overview">Menu - VoiceOver behavior</auro-header>
1
+ <auro-header level="1" id="overview">Menu: VoiceOver behavior</auro-header>
2
2
  <p>This page documents the VoiceOver experience when using the <code>&lt;auro-menu&gt;</code> component. It covers announcements and interactions for menu navigation and option selection.</p>
3
3
  <div class="note"><strong>Note:</strong> In the standard integrations (<code>&lt;auro-select&gt;</code>, <code>&lt;auro-combobox&gt;</code>), keyboard focus stays on the parent trigger or input and <strong>doesn't</strong> move into the menu. The parent captures keys and drives the menu, and the active option is announced via <code>aria-activedescendant</code> on the trigger rather than by moving DOM focus between options. The focus-on-the-menu behavior described alongside the standalone case below only applies when an author makes <code>&lt;auro-menu&gt;</code> itself focusable (for example, <code>tabindex="0"</code>).</p>
4
4
  <auro-header level="2" id="voiceOverInteractiveAnnouncements">Interactive announcements</auro-header>
@@ -7,7 +7,7 @@
7
7
  <li><strong>Keyboard navigation:</strong> Arrow Up/Down move the active option; Enter selects it; Tab selects and moves focus out of the menu.</li>
8
8
  <li><strong>Active option tracking:</strong> The menu tracks the highlighted option, so parent components, such as <code>auro-select</code> and <code>auro-combobox</code>, can point <code>aria-activedescendant</code> at it.</li>
9
9
  <li><strong>Multi-select semantics:</strong> When <code>multiSelect</code> is on, the menu sets <code>aria-multiselectable</code>.</li>
10
- <li><strong>Loading state:</strong> The menu sets <code>aria-busy</code> while loading, and the <code>loadingIcon</code> and <code>loadingText</code> slots let you customize the loading indicator.</li>
10
+ <li><strong>Loading state:</strong> The menu sets <code>aria-busy</code> while loading, and shows the content of the <code>loadingIcon</code> and <code>loadingText</code> slots in place of the options.</li>
11
11
  </ul>
12
12
  <auro-header level="2" id="richOptionContent">Rich option content</auro-header>
13
13
  <p><code>&lt;option&gt;</code> elements accept only plain text. Native HTML has no way to add icons, descriptions, or nested structure to options.</p>
@@ -39,8 +39,8 @@
39
39
  <p>Native selects have no loading pattern. When options load asynchronously, native HTML has no standard way to tell people they're still loading.</p>
40
40
  <p><code>auro-menu</code> provides:</p>
41
41
  <ul>
42
- <li>A <code>loading</code> attribute that displays a loading indicator</li>
43
- <li><code>loadingIcon</code> and <code>loadingText</code> slots for custom loading UI</li>
42
+ <li>A <code>loading</code> attribute that replaces the options with a loading placeholder</li>
43
+ <li><code>loadingIcon</code> and <code>loadingText</code> slots for the icon and text the placeholder shows</li>
44
44
  <li><code>auroMenu-loadingChange</code> event when the loading state changes</li>
45
45
  </ul>
46
46
  <auro-header level="2" id="composability">Composability</auro-header>
@@ -20,7 +20,7 @@
20
20
  *
21
21
  * @event {CustomEvent<Element>} auroMenu-activatedOption - Fires when an option becomes the active (highlighted) option, through the arrow keys, hover, or `updateActiveOption()`. The option is in `detail`.
22
22
  * @event {CustomEvent<any>} auroMenu-customEventFired - Fires right after the menu fires the event named in an option's `event` attribute. The option is in `detail.option`.
23
- * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes.
23
+ * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes, and once when the menu first renders.
24
24
  * @event {CustomEvent<{ options: Array<HTMLElement> }>} auroMenu-optionsChange - Fires when the set of options in the menu changes.
25
25
  * @event {CustomEvent<any>} auroMenu-selectValueFailure - Fires when a value doesn't match any option that can be selected, or when someone chooses an option with no `value` in multi-select mode.
26
26
  * @event {CustomEvent<any>} auroMenu-selectValueReset - Fires when `reset()` clears the menu.
@@ -63,7 +63,7 @@ export class AuroMenu extends AuroElement {
63
63
  reflect: boolean;
64
64
  };
65
65
  /**
66
- * Indent level for submenus.
66
+ * Holds how deeply a nested menu is indented, which sets how many spacers its options get.
67
67
  * @private
68
68
  */
69
69
  level: {
@@ -135,25 +135,25 @@ export class AuroMenu extends AuroElement {
135
135
  loading: boolean;
136
136
  multiSelect: boolean;
137
137
  /**
138
- * Handles keyboard navigation and selection.
138
+ * Called when a key is pressed in the menu. The arrow keys move the active option, and Enter and Tab select it.
139
139
  * @private
140
140
  * @param {KeyboardEvent} event - The keydown event.
141
141
  */
142
142
  private handleKeyDown;
143
143
  /**
144
- * Handles option selection via click events from menuoptions.
144
+ * Called when an option fires `auroMenuOption-click`. Selects the clicked option, unless the menu is disabled or nested in another menu.
145
145
  * @private
146
146
  * @param {CustomEvent} event - The auroMenuOption-click event.
147
147
  */
148
148
  private handleMouseSelect;
149
149
  /**
150
- * Handles option hover events.
150
+ * Called when the pointer moves over an option. Makes it the active option, unless it can't be highlighted.
151
151
  * @private
152
152
  * @param {CustomEvent} event - The `auroMenuOption-mouseover` event.
153
153
  */
154
154
  private handleOptionHover;
155
155
  /**
156
- * Handles slot change events.
156
+ * Called when the menu's content changes. Sets the menu up again, and re-applies a `value` that was set before the options arrived.
157
157
  * @private
158
158
  */
159
159
  private handleSlotChange;
@@ -203,8 +203,8 @@ export class AuroMenu extends AuroElement {
203
203
  */
204
204
  readonly get currentLabel(): string;
205
205
  /**
206
- * Formatted value based on `multiSelect` state.
207
- * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
206
+ * Gets `value` in the shape the menu works with: the string itself, or, in multi-select mode,
207
+ * an array of values parsed from the JSON array string.
208
208
  * @private
209
209
  * @returns {String|Array<String>}
210
210
  */
@@ -316,7 +316,7 @@ export class AuroMenu extends AuroElement {
316
316
  */
317
317
  updateActiveOption(indexOrOption: number | HTMLElement): void;
318
318
  /**
319
- * Handles custom events defined on options.
319
+ * Fires the event named in the option's `event` attribute, then `auroMenu-customEventFired`, with the option in `detail.option`.
320
320
  * @private
321
321
  * @param {HTMLElement} option - Option with custom event.
322
322
  */
@@ -328,6 +328,7 @@ export class AuroMenu extends AuroElement {
328
328
  */
329
329
  private notifySelectionChange;
330
330
  /**
331
+ * Checks whether two selections hold the same options, in any order.
331
332
  * @private
332
333
  * @param {any} current - The current selection.
333
334
  * @param {any} next - The new selection to compare.
@@ -175,7 +175,7 @@ export class AuroMenuOption extends AuroElement {
175
175
  */
176
176
  attachTo(): void;
177
177
  /**
178
- * Handles click events on the menu option.
178
+ * Called when the option is clicked. Fires `auroMenuOption-click`, unless the option or a menu containing it is disabled.
179
179
  * @private
180
180
  */
181
181
  private handleClick;
@@ -492,7 +492,7 @@ let menuInstanceIdCounter = 0;
492
492
  *
493
493
  * @event {CustomEvent<Element>} auroMenu-activatedOption - Fires when an option becomes the active (highlighted) option, through the arrow keys, hover, or `updateActiveOption()`. The option is in `detail`.
494
494
  * @event {CustomEvent<any>} auroMenu-customEventFired - Fires right after the menu fires the event named in an option's `event` attribute. The option is in `detail.option`.
495
- * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes.
495
+ * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes, and once when the menu first renders.
496
496
  * @event {CustomEvent<{ options: Array<HTMLElement> }>} auroMenu-optionsChange - Fires when the set of options in the menu changes.
497
497
  * @event {CustomEvent<any>} auroMenu-selectValueFailure - Fires when a value doesn't match any option that can be selected, or when someone chooses an option with no `value` in multi-select mode.
498
498
  * @event {CustomEvent<any>} auroMenu-selectValueReset - Fires when `reset()` clears the menu.
@@ -637,7 +637,7 @@ class AuroMenu extends AuroElement {
637
637
  },
638
638
 
639
639
  /**
640
- * Indent level for submenus.
640
+ * Holds how deeply a nested menu is indented, which sets how many spacers its options get.
641
641
  * @private
642
642
  */
643
643
  level: {
@@ -809,8 +809,8 @@ class AuroMenu extends AuroElement {
809
809
  }
810
810
 
811
811
  /**
812
- * Formatted value based on `multiSelect` state.
813
- * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
812
+ * Gets `value` in the shape the menu works with: the string itself, or, in multi-select mode,
813
+ * an array of values parsed from the JSON array string.
814
814
  * @private
815
815
  * @returns {String|Array<String>}
816
816
  */
@@ -1620,7 +1620,7 @@ class AuroMenu extends AuroElement {
1620
1620
  }
1621
1621
 
1622
1622
  /**
1623
- * Handles keyboard navigation and selection.
1623
+ * Called when a key is pressed in the menu. The arrow keys move the active option, and Enter and Tab select it.
1624
1624
  * @private
1625
1625
  * @param {KeyboardEvent} event - The keydown event.
1626
1626
  */
@@ -1646,7 +1646,7 @@ class AuroMenu extends AuroElement {
1646
1646
  }
1647
1647
 
1648
1648
  /**
1649
- * Handles option selection via click events from menuoptions.
1649
+ * Called when an option fires `auroMenuOption-click`. Selects the clicked option, unless the menu is disabled or nested in another menu.
1650
1650
  * @private
1651
1651
  * @param {CustomEvent} event - The auroMenuOption-click event.
1652
1652
  */
@@ -1666,7 +1666,7 @@ class AuroMenu extends AuroElement {
1666
1666
  }
1667
1667
 
1668
1668
  /**
1669
- * Handles option hover events.
1669
+ * Called when the pointer moves over an option. Makes it the active option, unless it can't be highlighted.
1670
1670
  * @private
1671
1671
  * @param {CustomEvent} event - The `auroMenuOption-mouseover` event.
1672
1672
  */
@@ -1690,7 +1690,7 @@ class AuroMenu extends AuroElement {
1690
1690
  }
1691
1691
 
1692
1692
  /**
1693
- * Handles slot change events.
1693
+ * Called when the menu's content changes. Sets the menu up again, and re-applies a `value` that was set before the options arrived.
1694
1694
  * @private
1695
1695
  */
1696
1696
  handleSlotChange() {
@@ -1786,7 +1786,7 @@ class AuroMenu extends AuroElement {
1786
1786
  }
1787
1787
 
1788
1788
  /**
1789
- * Handles custom events defined on options.
1789
+ * Fires the event named in the option's `event` attribute, then `auroMenu-customEventFired`, with the option in `detail.option`.
1790
1790
  * @private
1791
1791
  * @param {HTMLElement} option - Option with custom event.
1792
1792
  */
@@ -1806,6 +1806,7 @@ class AuroMenu extends AuroElement {
1806
1806
  }
1807
1807
 
1808
1808
  /**
1809
+ * Checks whether two selections hold the same options, in any order.
1809
1810
  * @private
1810
1811
  * @param {any} current - The current selection.
1811
1812
  * @param {any} next - The new selection to compare.
@@ -2275,7 +2276,7 @@ class AuroMenuOption extends AuroElement {
2275
2276
  }
2276
2277
 
2277
2278
  /**
2278
- * Handles click events on the menu option.
2279
+ * Called when the option is clicked. Fires `auroMenuOption-click`, unless the option or a menu containing it is disabled.
2279
2280
  * @private
2280
2281
  */
2281
2282
  handleClick() {
@@ -453,7 +453,7 @@ let menuInstanceIdCounter = 0;
453
453
  *
454
454
  * @event {CustomEvent<Element>} auroMenu-activatedOption - Fires when an option becomes the active (highlighted) option, through the arrow keys, hover, or `updateActiveOption()`. The option is in `detail`.
455
455
  * @event {CustomEvent<any>} auroMenu-customEventFired - Fires right after the menu fires the event named in an option's `event` attribute. The option is in `detail.option`.
456
- * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes.
456
+ * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes, and once when the menu first renders.
457
457
  * @event {CustomEvent<{ options: Array<HTMLElement> }>} auroMenu-optionsChange - Fires when the set of options in the menu changes.
458
458
  * @event {CustomEvent<any>} auroMenu-selectValueFailure - Fires when a value doesn't match any option that can be selected, or when someone chooses an option with no `value` in multi-select mode.
459
459
  * @event {CustomEvent<any>} auroMenu-selectValueReset - Fires when `reset()` clears the menu.
@@ -598,7 +598,7 @@ class AuroMenu extends AuroElement {
598
598
  },
599
599
 
600
600
  /**
601
- * Indent level for submenus.
601
+ * Holds how deeply a nested menu is indented, which sets how many spacers its options get.
602
602
  * @private
603
603
  */
604
604
  level: {
@@ -770,8 +770,8 @@ class AuroMenu extends AuroElement {
770
770
  }
771
771
 
772
772
  /**
773
- * Formatted value based on `multiSelect` state.
774
- * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
773
+ * Gets `value` in the shape the menu works with: the string itself, or, in multi-select mode,
774
+ * an array of values parsed from the JSON array string.
775
775
  * @private
776
776
  * @returns {String|Array<String>}
777
777
  */
@@ -1581,7 +1581,7 @@ class AuroMenu extends AuroElement {
1581
1581
  }
1582
1582
 
1583
1583
  /**
1584
- * Handles keyboard navigation and selection.
1584
+ * Called when a key is pressed in the menu. The arrow keys move the active option, and Enter and Tab select it.
1585
1585
  * @private
1586
1586
  * @param {KeyboardEvent} event - The keydown event.
1587
1587
  */
@@ -1607,7 +1607,7 @@ class AuroMenu extends AuroElement {
1607
1607
  }
1608
1608
 
1609
1609
  /**
1610
- * Handles option selection via click events from menuoptions.
1610
+ * Called when an option fires `auroMenuOption-click`. Selects the clicked option, unless the menu is disabled or nested in another menu.
1611
1611
  * @private
1612
1612
  * @param {CustomEvent} event - The auroMenuOption-click event.
1613
1613
  */
@@ -1627,7 +1627,7 @@ class AuroMenu extends AuroElement {
1627
1627
  }
1628
1628
 
1629
1629
  /**
1630
- * Handles option hover events.
1630
+ * Called when the pointer moves over an option. Makes it the active option, unless it can't be highlighted.
1631
1631
  * @private
1632
1632
  * @param {CustomEvent} event - The `auroMenuOption-mouseover` event.
1633
1633
  */
@@ -1651,7 +1651,7 @@ class AuroMenu extends AuroElement {
1651
1651
  }
1652
1652
 
1653
1653
  /**
1654
- * Handles slot change events.
1654
+ * Called when the menu's content changes. Sets the menu up again, and re-applies a `value` that was set before the options arrived.
1655
1655
  * @private
1656
1656
  */
1657
1657
  handleSlotChange() {
@@ -1747,7 +1747,7 @@ class AuroMenu extends AuroElement {
1747
1747
  }
1748
1748
 
1749
1749
  /**
1750
- * Handles custom events defined on options.
1750
+ * Fires the event named in the option's `event` attribute, then `auroMenu-customEventFired`, with the option in `detail.option`.
1751
1751
  * @private
1752
1752
  * @param {HTMLElement} option - Option with custom event.
1753
1753
  */
@@ -1767,6 +1767,7 @@ class AuroMenu extends AuroElement {
1767
1767
  }
1768
1768
 
1769
1769
  /**
1770
+ * Checks whether two selections hold the same options, in any order.
1770
1771
  * @private
1771
1772
  * @param {any} current - The current selection.
1772
1773
  * @param {any} next - The new selection to compare.
@@ -2236,7 +2237,7 @@ class AuroMenuOption extends AuroElement {
2236
2237
  }
2237
2238
 
2238
2239
  /**
2239
- * Handles click events on the menu option.
2240
+ * Called when the option is clicked. Fires `auroMenuOption-click`, unless the option or a menu containing it is disabled.
2240
2241
  * @private
2241
2242
  */
2242
2243
  handleClick() {
@@ -1,4 +1,4 @@
1
- <auro-header level="1" id="overview">Radio - Accessibility</auro-header>
1
+ <auro-header level="1" id="overview">Radio: Accessibility</auro-header>
2
2
  <div class="contentWrapper">
3
3
  <div class="mainContent">
4
4
  <div class="scrollWrapper">
@@ -98,10 +98,10 @@ A group of radio buttons with a shared label that lets people choose exactly one
98
98
  | error | error | | string | | behavior | | Shows the group in its error state with this message, such as "Select an option".<br>The error stays until you remove the attribute. When set, `setCustomValidityCustomError` or `setCustomValidity` replaces the message. |
99
99
  | noValidate | novalidate | | boolean | | behavior | | Stops the group from validating automatically when focus leaves it or the selection changes.<br>To validate the group yourself, call `validate()`. The `error` attribute still applies. |
100
100
  | optionSelected | | | HTMLElement | | behavior | | Gets the selected `auro-radio` element, or `undefined` when nothing is selected. |
101
- | required | required | | boolean | | behavior | `!noValidate` | Requires a selection in the group and hides the "(optional)" text after the legend.<br>When nothing is selected, the group shows an error after focus leaves it. |
102
- | setCustomValidity | setcustomvalidity | | string | | behavior | `!noValidate` | Sets one error message for every kind of error, such as "Choose an option".<br>It replaces the `error` text and the `setCustomValidityValueMissing` and `setCustomValidityCustomError` messages. |
103
- | setCustomValidityCustomError | setcustomvaliditycustomerror | | string | | behavior | `!noValidate` | Sets the error message shown while the `error` attribute is set, in place of the attribute's own text.<br>`setCustomValidity` takes priority when both are set. |
104
- | setCustomValidityValueMissing | setcustomvalidityvaluemissing | | string | | behavior | `!noValidate` | Sets the error message shown when the group is `required` and nothing is selected, such as "Select an option".<br>The group has no default message, so set this or `setCustomValidity` to show one. `setCustomValidity` takes priority when both are set. |
101
+ | required | required | | boolean | | behavior | | Requires a selection in the group and hides the "(optional)" text after the legend.<br>Unless `noValidate` is set, the group shows an error when focus leaves it with nothing selected. |
102
+ | setCustomValidity | setcustomvalidity | | string | | behavior | | Sets one error message for every kind of error, such as "Choose an option".<br>It replaces the `error` text and the `setCustomValidityValueMissing` and `setCustomValidityCustomError` messages. |
103
+ | setCustomValidityCustomError | setcustomvaliditycustomerror | | string | | behavior | `error` | Sets the error message shown while the `error` attribute is set, in place of the attribute's own text.<br>`setCustomValidity` takes priority when both are set. |
104
+ | setCustomValidityValueMissing | setcustomvalidityvaluemissing | | string | | behavior | `required` | Sets the error message shown when the group is `required` and nothing is selected, such as "Select an option".<br>The group has no default message, so set this or `setCustomValidity` to show one. `setCustomValidity` takes priority when both are set. |
105
105
  | validity | validity | readonly | string | | behavior | | Gets the group's current validation state: `valid`, `valueMissing`, or `customError`.<br>It's `undefined` until the group is first validated. |
106
106
  | value | value | | string | | behavior | | Gets the `value` of the selected radio button, such as `window`.<br>Setting it doesn't select a radio button; set `checked` on the radio button instead. |
107
107
 
@@ -122,12 +122,12 @@ A group of radio buttons with a shared label that lets people choose exactly one
122
122
 
123
123
  ### Slots
124
124
 
125
- | Name | Category | Required | Relevant when | Description |
126
- | ------------- | -------- | -------- | ------------- | --------------------------------------------------------------------------------------------------------------------- |
127
- | helpText | ui | | | Help text shown below the group, such as "Choose one". While the group shows an error, the error message replaces it. |
128
- | legend | ui | Yes | | Label for the group, such as "Seat preference". Screen readers announce it as the group's name. |
129
- | optionalLabel | ui | | `!required` | Text shown after the legend when the group isn't `required`, such as "- optional". Defaults to "(optional)". |
130
- | default | | | | The `auro-radio` elements in the group. |
125
+ | Name | Category | Required | Relevant when | Description |
126
+ | ------------- | -------- | -------- | ------------- | ------------------------------------------------------------------------------------------------------------------------- |
127
+ | helpText | ui | | | Help text shown below the group, such as "Choose one". While the group shows an error, the error message replaces it. |
128
+ | legend | ui | Yes | | Label for the group, such as "Seat preference". Screen readers announce it as the group's name. |
129
+ | optionalLabel | ui | | `!required` | Text shown after the legend when the group isn't `required`, such as a translated "(optional)". Defaults to "(optional)". |
130
+ | default | | | | The `auro-radio` elements in the group. |
131
131
 
132
132
  ### CSS shadow parts
133
133
 
@@ -1,4 +1,4 @@
1
- <auro-header level="1" id="overview">Radio - Customize</auro-header>
1
+ <auro-header level="1" id="overview">Radio: Customize</auro-header>
2
2
  <div class="contentWrapper">
3
3
  <nav>
4
4
  <auro-nav anchorNavContent=".scrollWrapper">
@@ -116,11 +116,17 @@
116
116
  <!-- The below content is automatically added from ./../apiExamples/custom-tokens.html -->
117
117
  <style>
118
118
  #customTokenRadioGroup {
119
+ --ds-auro-radio-group-label-color: purple;
120
+ }
121
+
122
+ #customTokenRadioGroup auro-radio {
119
123
  --ds-auro-radio-btn-border-color: purple;
124
+ --ds-auro-radio-label-color: purple;
125
+ }
126
+
127
+ #customTokenRadioGroup auro-radio[checked] {
120
128
  --ds-auro-radio-btn-fill-color: lavender;
121
129
  --ds-auro-radio-btn-inset-color: purple;
122
- --ds-auro-radio-label-color: purple;
123
- --ds-auro-radio-group-label-color: purple;
124
130
  }
125
131
  </style>
126
132
  <auro-radio-group id="customTokenRadioGroup">
@@ -137,11 +143,15 @@
137
143
  <!-- The below code snippet is automatically added from ./../apiExamples/custom-tokens.html -->
138
144
  <pre class="language-html"><code class="language-html">&lt;style&gt;
139
145
  #customTokenRadioGroup {
146
+ --ds-auro-radio-group-label-color: purple;
147
+ }
148
+ &#10; #customTokenRadioGroup auro-radio {
140
149
  --ds-auro-radio-btn-border-color: purple;
150
+ --ds-auro-radio-label-color: purple;
151
+ }
152
+ &#10; #customTokenRadioGroup auro-radio[checked] {
141
153
  --ds-auro-radio-btn-fill-color: lavender;
142
154
  --ds-auro-radio-btn-inset-color: purple;
143
- --ds-auro-radio-label-color: purple;
144
- --ds-auro-radio-group-label-color: purple;
145
155
  }
146
156
  &lt;/style&gt;
147
157
  &lt;auro-radio-group id="customTokenRadioGroup"&gt;
@@ -279,7 +279,7 @@ class AuroRadio extends i$2 {
279
279
  },
280
280
 
281
281
  /**
282
- * ID for input node.
282
+ * Holds the ID of the inner `<input>` element, which its `<label>` points to.
283
283
  * @private
284
284
  */
285
285
  inputId: {
@@ -325,7 +325,7 @@ class AuroRadio extends i$2 {
325
325
  },
326
326
 
327
327
  /**
328
- * Kept out of the API docs, because changing it can easily break accessibility.
328
+ * Sets the host's ARIA role, `radio`. Kept out of the API docs, because changing it can easily break accessibility.
329
329
  * @private
330
330
  */
331
331
  role: {
@@ -334,7 +334,7 @@ class AuroRadio extends i$2 {
334
334
  },
335
335
 
336
336
  /**
337
- * Whether or not the radio button has been touched by the user.
337
+ * Records whether someone has interacted with the radio button.
338
338
  * @private
339
339
  */
340
340
  touched: {
@@ -1338,7 +1338,7 @@ class AuroHelpText extends i$2 {
1338
1338
  }
1339
1339
  }
1340
1340
 
1341
- var formkitVersion = '202611081756';
1341
+ var formkitVersion = '202611091558';
1342
1342
 
1343
1343
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1344
1344
  // See LICENSE in the project root for license information.
@@ -1373,7 +1373,7 @@ var formkitVersion = '202611081756';
1373
1373
  * @csspart radio-group - The `<fieldset>` element, with `role="radiogroup"`, that wraps the legend and the radio buttons.
1374
1374
  * @csspart helpText - The help text element below the group, which shows the help text or the error message.
1375
1375
  * @slot {HTMLSlotElement} legend - Label for the group, such as "Seat preference". Screen readers announce it as the group's name. {@requiredWhen always} {@category ui}
1376
- * @slot {HTMLSlotElement} optionalLabel - Text shown after the legend when the group isn't `required`, such as "- optional". Defaults to "(optional)". {@relevantWhen !required} {@category ui}
1376
+ * @slot {HTMLSlotElement} optionalLabel - Text shown after the legend when the group isn't `required`, such as a translated "(optional)". Defaults to "(optional)". {@relevantWhen !required} {@category ui}
1377
1377
  * @slot {HTMLSlotElement} helpText - Help text shown below the group, such as "Choose one". While the group shows an error, the error message replaces it. {@category ui}
1378
1378
  * @slot default - The `auro-radio` elements in the group.
1379
1379
  * @event auroFormElement-validated - Fires each time the group runs validation, with the result in `event.detail.validity` and `event.detail.message`.
@@ -1483,7 +1483,7 @@ class AuroRadioGroup extends i$2 {
1483
1483
  },
1484
1484
 
1485
1485
  /**
1486
- * Indicates whether the legend slot is set or not.
1486
+ * Records whether the `legend` slot has content.
1487
1487
  * @private
1488
1488
  */
1489
1489
  hasLegend: {
@@ -1534,8 +1534,7 @@ class AuroRadioGroup extends i$2 {
1534
1534
 
1535
1535
  /**
1536
1536
  * Requires a selection in the group and hides the "(optional)" text after the legend.
1537
- * When nothing is selected, the group shows an error after focus leaves it.
1538
- * @relevantWhen !noValidate
1537
+ * Unless `noValidate` is set, the group shows an error when focus leaves it with nothing selected.
1539
1538
  * @category behavior
1540
1539
  */
1541
1540
  required: {
@@ -1546,7 +1545,6 @@ class AuroRadioGroup extends i$2 {
1546
1545
  /**
1547
1546
  * Sets one error message for every kind of error, such as "Choose an option".
1548
1547
  * It replaces the `error` text and the `setCustomValidityValueMissing` and `setCustomValidityCustomError` messages.
1549
- * @relevantWhen !noValidate
1550
1548
  * @category behavior
1551
1549
  */
1552
1550
  setCustomValidity: {
@@ -1557,7 +1555,7 @@ class AuroRadioGroup extends i$2 {
1557
1555
  /**
1558
1556
  * Sets the error message shown while the `error` attribute is set, in place of the attribute's own text.
1559
1557
  * `setCustomValidity` takes priority when both are set.
1560
- * @relevantWhen !noValidate
1558
+ * @relevantWhen error
1561
1559
  * @category behavior
1562
1560
  */
1563
1561
  setCustomValidityCustomError: {
@@ -1568,7 +1566,7 @@ class AuroRadioGroup extends i$2 {
1568
1566
  /**
1569
1567
  * Sets the error message shown when the group is `required` and nothing is selected, such as "Select an option".
1570
1568
  * The group has no default message, so set this or `setCustomValidity` to show one. `setCustomValidity` takes priority when both are set.
1571
- * @relevantWhen !noValidate
1569
+ * @relevantWhen required
1572
1570
  * @category behavior
1573
1571
  */
1574
1572
  setCustomValidityValueMissing: {
@@ -1577,7 +1575,7 @@ class AuroRadioGroup extends i$2 {
1577
1575
  },
1578
1576
 
1579
1577
  /**
1580
- * Indicates whether the radio group is in a dirty state (has been interacted with).
1578
+ * Records whether someone has interacted with the group.
1581
1579
  * @private
1582
1580
  */
1583
1581
  touched: {
@@ -1,4 +1,4 @@
1
- <auro-header level="1" id="overview">Radio - Design</auro-header>
1
+ <auro-header level="1" id="overview">Radio: Design</auro-header>
2
2
  <div class="contentWrapper">
3
3
  <div class="mainContent">
4
4
  <div class="scrollWrapper">
@@ -1,4 +1,4 @@
1
- <auro-header level="1" id="overview">Radio - Getting started</auro-header>
1
+ <auro-header level="1" id="overview">Radio: Getting started</auro-header>
2
2
  <div class="contentWrapper">
3
3
  <nav>
4
4
  <auro-nav anchorNavContent=".scrollWrapper">
@@ -284,13 +284,13 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
284
284
  <auro-header level="4" id="slot-helpText">helpText</auro-header>
285
285
  <p>Help text shown below the group, such as "Choose one". While the group shows an error, the error message replaces it.</p>
286
286
  <auro-header level="4" id="slot-optionalLabel">optionalLabel</auro-header>
287
- <p>Text shown after the legend when the group isn't <code>required</code>, such as "- optional". It replaces the default <em>"(optional)"</em> text.</p>
287
+ <p>Text shown after the legend when the group isn't <code>required</code>, such as a translated "(optional)". It replaces the default <em>"(optional)"</em> text.</p>
288
288
  <div class="exampleWrapper">
289
289
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optional-label.html) -->
290
290
  <!-- The below content is automatically added from ./../apiExamples/optional-label.html -->
291
291
  <auro-radio-group>
292
292
  <span slot="legend">Form label goes here</span>
293
- <span slot="optionalLabel"> - custom optional flag</span>
293
+ <span slot="optionalLabel"> (not required)</span>
294
294
  <auro-radio id="labelRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
295
295
  <auro-radio id="labelRadio2" label="No" name="radioDemo" value="no"></auro-radio>
296
296
  <auro-radio id="labelRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
@@ -303,7 +303,7 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
303
303
  <!-- The below code snippet is automatically added from ./../apiExamples/optional-label.html -->
304
304
  <pre class="language-html"><code class="language-html">&lt;auro-radio-group&gt;
305
305
  &lt;span slot="legend"&gt;Form label goes here&lt;/span&gt;
306
- &lt;span slot="optionalLabel"&gt; - custom optional flag&lt;/span&gt;
306
+ &lt;span slot="optionalLabel"&gt; (not required)&lt;/span&gt;
307
307
  &lt;auro-radio id="labelRadio1" label="Yes" name="radioDemo" value="yes"&gt;&lt;/auro-radio&gt;
308
308
  &lt;auro-radio id="labelRadio2" label="No" name="radioDemo" value="no"&gt;&lt;/auro-radio&gt;
309
309
  &lt;auro-radio id="labelRadio3" label="Maybe" name="radioDemo" value="maybe"&gt;&lt;/auro-radio&gt;
@@ -319,7 +319,7 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
319
319
  <auro-radio-group>
320
320
  <span slot="legend">Form label goes here</span>
321
321
  <auro-radio id="basicGroupRadio1" label="Sample text" name="radioDemo" value="option1"></auro-radio>
322
- <auro-radio id="basicGroupRadio2" label="This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines." name="radioDemo" value="option2"></auro-radio>
322
+ <auro-radio id="basicGroupRadio2" name="radioDemo" value="option2">This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines.</auro-radio>
323
323
  <auro-radio id="basicGroupRadio3" label="Sample text" name="radioDemo" value="option3"></auro-radio>
324
324
  </auro-radio-group>
325
325
  <!-- AURO-GENERATED-CONTENT:END -->
@@ -331,7 +331,7 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
331
331
  <pre class="language-html"><code class="language-html">&lt;auro-radio-group&gt;
332
332
  &lt;span slot="legend"&gt;Form label goes here&lt;/span&gt;
333
333
  &lt;auro-radio id="basicGroupRadio1" label="Sample text" name="radioDemo" value="option1"&gt;&lt;/auro-radio&gt;
334
- &lt;auro-radio id="basicGroupRadio2" label="This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines." name="radioDemo" value="option2"&gt;&lt;/auro-radio&gt;
334
+ &lt;auro-radio id="basicGroupRadio2" name="radioDemo" value="option2"&gt;This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines.&lt;/auro-radio&gt;
335
335
  &lt;auro-radio id="basicGroupRadio3" label="Sample text" name="radioDemo" value="option3"&gt;&lt;/auro-radio&gt;
336
336
  &lt;/auro-radio-group&gt;</code></pre>
337
337
  <!-- AURO-GENERATED-CONTENT:END -->