@redvars/peacock 4.5.1 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/dist/{BaseField-BbOj212R.js → BaseField-DOCmylob.js} +16 -3
  2. package/dist/BaseField-DOCmylob.js.map +1 -0
  3. package/dist/accordion.js +1 -1
  4. package/dist/activation-gate-D4IpmwyD.js +23 -0
  5. package/dist/activation-gate-D4IpmwyD.js.map +1 -0
  6. package/dist/avatar-group.js +2 -1
  7. package/dist/avatar-group.js.map +1 -1
  8. package/dist/avatar.js +3 -0
  9. package/dist/avatar.js.map +1 -1
  10. package/dist/{base-button-BJMGMcMv.js → base-button-9tGu5RSC.js} +30 -10
  11. package/dist/base-button-9tGu5RSC.js.map +1 -0
  12. package/dist/button-group.js +5 -3
  13. package/dist/button-group.js.map +1 -1
  14. package/dist/button.js +12 -16
  15. package/dist/button.js.map +1 -1
  16. package/dist/calendar-column-view.js +4 -4
  17. package/dist/{calendar-drag-IXMPZrTN.js → calendar-drag-DdJwSpEz.js} +2 -2
  18. package/dist/{calendar-drag-IXMPZrTN.js.map → calendar-drag-DdJwSpEz.js.map} +1 -1
  19. package/dist/{calendar-event-BQChlMXy.js → calendar-event-BvbYZHx1.js} +2 -2
  20. package/dist/{calendar-event-BQChlMXy.js.map → calendar-event-BvbYZHx1.js.map} +1 -1
  21. package/dist/calendar-month-view.js +65 -14
  22. package/dist/calendar-month-view.js.map +1 -1
  23. package/dist/calendar-timeline.js +9 -4
  24. package/dist/calendar-timeline.js.map +1 -1
  25. package/dist/calendar.js +21 -6
  26. package/dist/calendar.js.map +1 -1
  27. package/dist/card.js +29 -16
  28. package/dist/card.js.map +1 -1
  29. package/dist/chart-doughnut.js +3 -1
  30. package/dist/chart-doughnut.js.map +1 -1
  31. package/dist/chart-pie.js +9 -1
  32. package/dist/chart-pie.js.map +1 -1
  33. package/dist/chip-set.js +1 -1
  34. package/dist/chip.js +10 -19
  35. package/dist/chip.js.map +1 -1
  36. package/dist/code-editor.js +56 -5
  37. package/dist/code-editor.js.map +1 -1
  38. package/dist/color-field.js +4 -1
  39. package/dist/color-field.js.map +1 -1
  40. package/dist/currency-field.js +4 -1
  41. package/dist/currency-field.js.map +1 -1
  42. package/dist/custom-elements-jsdocs.json +29 -23
  43. package/dist/custom-elements.json +758 -93
  44. package/dist/{datasource-OwvH7SVq.js → datasource-DxEA6jHW.js} +6 -4
  45. package/dist/datasource-DxEA6jHW.js.map +1 -0
  46. package/dist/{date-cfPx3alz.js → date-DPQOY8Zd.js} +2 -2
  47. package/dist/{date-cfPx3alz.js.map → date-DPQOY8Zd.js.map} +1 -1
  48. package/dist/date-field.js +8 -5
  49. package/dist/date-field.js.map +1 -1
  50. package/dist/date-picker.js +2 -2
  51. package/dist/date-range-field.js +8 -5
  52. package/dist/date-range-field.js.map +1 -1
  53. package/dist/datetime-field.js +7 -4
  54. package/dist/datetime-field.js.map +1 -1
  55. package/dist/diagram-controls.js +1 -1
  56. package/dist/{throttle-SQ9t-HL7.js → dispatch-event-utils-DfgqVBK8.js} +2 -24
  57. package/dist/dispatch-event-utils-DfgqVBK8.js.map +1 -0
  58. package/dist/{form-submitter-beG1CXAn.js → dispatch-hooks-J_godlHh.js} +2 -87
  59. package/dist/dispatch-hooks-J_godlHh.js.map +1 -0
  60. package/dist/dropdown-button.js +11 -7
  61. package/dist/dropdown-button.js.map +1 -1
  62. package/dist/{event-manager-KGMT2x2Q.js → event-manager-DYfeN3VE.js} +3 -3
  63. package/dist/{event-manager-KGMT2x2Q.js.map → event-manager-DYfeN3VE.js.map} +1 -1
  64. package/dist/fab.js +15 -19
  65. package/dist/fab.js.map +1 -1
  66. package/dist/filter-bar.js +3 -3
  67. package/dist/form-submission-h40coUI8.js +13 -0
  68. package/dist/form-submission-h40coUI8.js.map +1 -0
  69. package/dist/form-submitter-BIFqZ0wq.js +88 -0
  70. package/dist/form-submitter-BIFqZ0wq.js.map +1 -0
  71. package/dist/form.js +1 -9
  72. package/dist/form.js.map +1 -1
  73. package/dist/icon-button.js +15 -19
  74. package/dist/icon-button.js.map +1 -1
  75. package/dist/icon.js +1 -1
  76. package/dist/implicit-submission-ChLdbxaR.js +100 -0
  77. package/dist/implicit-submission-ChLdbxaR.js.map +1 -0
  78. package/dist/index.js +20 -15
  79. package/dist/index.js.map +1 -1
  80. package/dist/{indicator-navigation-item-CmyhsOmy.js → indicator-navigation-item-BsQE3kUr.js} +2 -2
  81. package/dist/{indicator-navigation-item-CmyhsOmy.js.map → indicator-navigation-item-BsQE3kUr.js.map} +1 -1
  82. package/dist/input.js +13 -4
  83. package/dist/input.js.map +1 -1
  84. package/dist/json-viewer.js +1 -1
  85. package/dist/kanban.js +8 -7
  86. package/dist/kanban.js.map +1 -1
  87. package/dist/link-button.js +13 -14
  88. package/dist/link-button.js.map +1 -1
  89. package/dist/list-item.js +52 -16
  90. package/dist/list-item.js.map +1 -1
  91. package/dist/list.js +5 -3
  92. package/dist/list.js.map +1 -1
  93. package/dist/listbox.js +1 -1
  94. package/dist/loader-full.js +17 -12
  95. package/dist/loader-full.js.map +1 -1
  96. package/dist/loader.js +17 -12
  97. package/dist/loader.js.map +1 -1
  98. package/dist/locale-DEsJZCQG.js.map +1 -1
  99. package/dist/mention-input.js +8 -1
  100. package/dist/mention-input.js.map +1 -1
  101. package/dist/menu-item.js +12 -12
  102. package/dist/menu-item.js.map +1 -1
  103. package/dist/menu.js +7 -3
  104. package/dist/menu.js.map +1 -1
  105. package/dist/navigation-bar-item.js +4 -3
  106. package/dist/navigation-bar-item.js.map +1 -1
  107. package/dist/navigation-bar.js +4 -3
  108. package/dist/navigation-bar.js.map +1 -1
  109. package/dist/navigation-drawer-item.js +3 -2
  110. package/dist/navigation-drawer-item.js.map +1 -1
  111. package/dist/navigation-drawer.js +3 -2
  112. package/dist/navigation-drawer.js.map +1 -1
  113. package/dist/{navigation-item-base-kUrvJgCx.js → navigation-item-base-5ljwtLG_.js} +3 -2
  114. package/dist/{navigation-item-base-kUrvJgCx.js.map → navigation-item-base-5ljwtLG_.js.map} +1 -1
  115. package/dist/navigation-rail-item.js +4 -3
  116. package/dist/navigation-rail-item.js.map +1 -1
  117. package/dist/navigation-rail.js +6 -5
  118. package/dist/navigation-rail.js.map +1 -1
  119. package/dist/number-field.js +4 -1
  120. package/dist/number-field.js.map +1 -1
  121. package/dist/option.js +3 -2
  122. package/dist/option.js.map +1 -1
  123. package/dist/password-field.js +11 -4
  124. package/dist/password-field.js.map +1 -1
  125. package/dist/phone-field.js +4 -1
  126. package/dist/phone-field.js.map +1 -1
  127. package/dist/{picker-field-DmXYPvbF.js → picker-field-BiM3iXAQ.js} +2 -2
  128. package/dist/{picker-field-DmXYPvbF.js.map → picker-field-BiM3iXAQ.js.map} +1 -1
  129. package/dist/pin-input.js +4 -1
  130. package/dist/pin-input.js.map +1 -1
  131. package/dist/{range-utils-DZe96GnO.js → range-utils-vgG1SJ2o.js} +2 -2
  132. package/dist/{range-utils-DZe96GnO.js.map → range-utils-vgG1SJ2o.js.map} +1 -1
  133. package/dist/{roving-focus-controller-fm95JkZJ.js → roving-focus-controller-YtNbxH95.js} +30 -7
  134. package/dist/roving-focus-controller-YtNbxH95.js.map +1 -0
  135. package/dist/search.js +12 -6
  136. package/dist/search.js.map +1 -1
  137. package/dist/select.js +11 -3
  138. package/dist/select.js.map +1 -1
  139. package/dist/shipped-icons.js +1 -1
  140. package/dist/split-button.js +9 -1
  141. package/dist/split-button.js.map +1 -1
  142. package/dist/src/__internal/controllers/roving-focus-controller.d.ts +14 -2
  143. package/dist/src/__internal/implicit-submission.d.ts +25 -0
  144. package/dist/src/__internal/utils/activation-gate.d.ts +8 -0
  145. package/dist/src/__internal/utils/form-submission.d.ts +2 -0
  146. package/dist/src/avatar-group/avatar-group.d.ts +1 -1
  147. package/dist/src/button/base-button/base-button.d.ts +1 -1
  148. package/dist/src/button/button/button.d.ts +2 -1
  149. package/dist/src/button/fab/fab.d.ts +2 -1
  150. package/dist/src/button/icon-button/icon-button.d.ts +2 -1
  151. package/dist/src/button/link-button/link-button.d.ts +5 -1
  152. package/dist/src/calendar/calendar-month-view.d.ts +5 -1
  153. package/dist/src/calendar/calendar.d.ts +6 -1
  154. package/dist/src/card/card.d.ts +19 -9
  155. package/dist/src/chart-pie/chart-pie.d.ts +5 -0
  156. package/dist/src/chip/chip/chip.d.ts +4 -4
  157. package/dist/src/code-editor/code-editor.d.ts +3 -3
  158. package/dist/src/dropdown-button/dropdown-button.d.ts +5 -1
  159. package/dist/src/input/BaseField.d.ts +7 -0
  160. package/dist/src/input/input.d.ts +5 -1
  161. package/dist/src/list/list-item.d.ts +2 -1
  162. package/dist/src/mention-input/mention-input.d.ts +2 -0
  163. package/dist/src/menu/menu-item/menu-item.d.ts +6 -4
  164. package/dist/src/password-field/password-field.d.ts +3 -1
  165. package/dist/src/search/search.d.ts +1 -0
  166. package/dist/src/select/select.d.ts +2 -0
  167. package/dist/src/split-button/split-button.d.ts +6 -1
  168. package/dist/src/stepper/step.d.ts +3 -1
  169. package/dist/src/tabs/tab.d.ts +12 -2
  170. package/dist/src/textarea/textarea.d.ts +2 -0
  171. package/dist/src/toolbar/toolbar.d.ts +13 -2
  172. package/dist/step.js +7 -1
  173. package/dist/step.js.map +1 -1
  174. package/dist/stepper.js +10 -1
  175. package/dist/stepper.js.map +1 -1
  176. package/dist/sub-menu.js +3 -2
  177. package/dist/sub-menu.js.map +1 -1
  178. package/dist/svg.js +1 -1
  179. package/dist/tab-group.js +3 -2
  180. package/dist/tab-group.js.map +1 -1
  181. package/dist/tab.js +17 -12
  182. package/dist/tab.js.map +1 -1
  183. package/dist/tabs.js +3 -2
  184. package/dist/tabs.js.map +1 -1
  185. package/dist/test/accessible-name.test.d.ts +1 -0
  186. package/dist/test/helpers/count-activations.d.ts +9 -0
  187. package/dist/test/navigation-rail.test.d.ts +1 -0
  188. package/dist/test/throttle-delay.test.d.ts +1 -0
  189. package/dist/textarea.js +8 -1
  190. package/dist/textarea.js.map +1 -1
  191. package/dist/throttle-C7ZAPqtu.js +24 -0
  192. package/dist/throttle-C7ZAPqtu.js.map +1 -0
  193. package/dist/time-field.js +7 -4
  194. package/dist/time-field.js.map +1 -1
  195. package/dist/time-picker.js +2 -2
  196. package/dist/toolbar.js +25 -8
  197. package/dist/toolbar.js.map +1 -1
  198. package/dist/tree.js +1 -1
  199. package/dist/tsconfig.tsbuildinfo +1 -1
  200. package/dist/url-field.js +4 -1
  201. package/dist/url-field.js.map +1 -1
  202. package/dist/{utils-DcvLgexs.js → utils-CQzycr9J.js} +2 -1
  203. package/dist/utils-CQzycr9J.js.map +1 -0
  204. package/package.json +2 -1
  205. package/src/__internal/controllers/roving-focus-controller.ts +35 -7
  206. package/src/__internal/i18n/locale.ts +1 -1
  207. package/src/__internal/implicit-submission.ts +102 -0
  208. package/src/__internal/utils/activation-gate.ts +20 -0
  209. package/src/__internal/utils/cache-fetch.ts +6 -3
  210. package/src/__internal/utils/form-submission.ts +11 -0
  211. package/src/avatar/avatar.scss +5 -0
  212. package/src/avatar-group/avatar-group.scss +3 -0
  213. package/src/avatar-group/avatar-group.ts +1 -1
  214. package/src/button/base-button/base-button.ts +41 -16
  215. package/src/button/button/button.ts +5 -16
  216. package/src/button/fab/fab.ts +7 -18
  217. package/src/button/icon-button/icon-button.ts +7 -18
  218. package/src/button/link-button/link-button.ts +8 -15
  219. package/src/calendar/_calendar-header.scss +7 -1
  220. package/src/calendar/calendar-month-view.scss +36 -2
  221. package/src/calendar/calendar-month-view.ts +33 -8
  222. package/src/calendar/calendar.ts +17 -2
  223. package/src/calendar/utils.ts +1 -0
  224. package/src/card/card.ts +27 -16
  225. package/src/chart-doughnut/chart-doughnut.ts +6 -1
  226. package/src/chart-pie/chart-pie.ts +10 -1
  227. package/src/chip/chip/chip.ts +6 -26
  228. package/src/code-editor/code-editor.scss +70 -1
  229. package/src/code-editor/code-editor.ts +12 -4
  230. package/src/dropdown-button/dropdown-button.ts +7 -2
  231. package/src/form/form.ts +1 -9
  232. package/src/input/BaseField.ts +17 -0
  233. package/src/input/input.ts +13 -1
  234. package/src/kanban/kanban.scss +11 -7
  235. package/src/list/list-item.scss +5 -0
  236. package/src/list/list-item.ts +44 -16
  237. package/src/mention-input/mention-input.ts +5 -0
  238. package/src/menu/menu/menu.ts +4 -1
  239. package/src/menu/menu-item/menu-item.ts +9 -14
  240. package/src/navigation-rail/navigation-rail.scss +3 -2
  241. package/src/password-field/password-field.ts +11 -1
  242. package/src/search/search.ts +9 -0
  243. package/src/select/select.ts +5 -0
  244. package/src/split-button/split-button.ts +10 -1
  245. package/src/stepper/step.ts +7 -1
  246. package/src/stepper/stepper.scss +13 -0
  247. package/src/tabs/tab.ts +21 -17
  248. package/src/textarea/textarea.ts +5 -0
  249. package/src/toolbar/toolbar.ts +26 -7
  250. package/dist/BaseField-BbOj212R.js.map +0 -1
  251. package/dist/base-button-BJMGMcMv.js.map +0 -1
  252. package/dist/datasource-OwvH7SVq.js.map +0 -1
  253. package/dist/form-submitter-beG1CXAn.js.map +0 -1
  254. package/dist/roving-focus-controller-fm95JkZJ.js.map +0 -1
  255. package/dist/throttle-SQ9t-HL7.js.map +0 -1
  256. package/dist/utils-DcvLgexs.js.map +0 -1
@@ -1,6 +1,9 @@
1
1
  import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
2
  export interface RovingFocusOptions {
3
- /** The items, in order. Disabled or hidden ones are skipped automatically. */
3
+ /**
4
+ * The items, in order. Disabled or hidden ones are skipped automatically; include them, so that
5
+ * when the item holding the tab stop becomes disabled the next item takes the stop over.
6
+ */
4
7
  items: () => HTMLElement[];
5
8
  /** `horizontal` uses Left/Right (mirrored in right-to-left), `vertical` Up/Down, `both` all four. */
6
9
  orientation?: () => 'horizontal' | 'vertical' | 'both';
@@ -49,7 +52,11 @@ export declare class RovingFocusController implements ReactiveController {
49
52
  hostUpdated(): void;
50
53
  /** The item that holds the tab stop. */
51
54
  get activeItem(): HTMLElement | null;
52
- /** Re-applies the tab stops; call after the items change. */
55
+ /**
56
+ * Re-applies the tab stops; call after the items change, including when one becomes disabled
57
+ * or hidden. An item that can no longer take focus hands the tab stop to the focusable item
58
+ * after it (else the one before it), unless `initialItem` picks another.
59
+ */
53
60
  sync(): void;
54
61
  /** Makes `item` the tab stop, and focuses it unless `focus` is false. */
55
62
  setActive(item: HTMLElement, focus?: boolean): void;
@@ -57,6 +64,11 @@ export declare class RovingFocusController implements ReactiveController {
57
64
  handleFocusIn: (event: FocusEvent) => void;
58
65
  handleKeyDown: (event: KeyboardEvent) => void;
59
66
  private focusableItems;
67
+ /**
68
+ * For an active item that is still in the set but can no longer take focus: the first focusable
69
+ * item after it, else the nearest one before it.
70
+ */
71
+ private nearestFocusable;
60
72
  private itemFromEvent;
61
73
  private targetFor;
62
74
  /** The next item whose text starts with the typed characters (a 500 ms buffer, like native). */
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Counts a form-associated Peacock field as a single-line text field of its form, like a native
3
+ * text input. A form without a submit button is submitted on Enter only while it has one such
4
+ * field, so a field that leaves this out lets Enter in another field submit the form.
5
+ *
6
+ * `setupImplicitSubmission()` registers its field itself.
7
+ */
8
+ export declare function registerTextField(host: Element): void;
9
+ /**
10
+ * Gives a form-associated text field the implicit submission of a native text input: Enter in the
11
+ * field submits its form (see `submitImplicitly()`). Without it nothing happens, because the
12
+ * native input lives in the shadow root and has no form owner of its own.
13
+ *
14
+ * It acts after the keydown has reached every listener, so `preventDefault()` on the keydown
15
+ * cancels it. Only Enter typed in the text input counts, not Enter on a button inside the field;
16
+ * Enter while an input method is composing, or with Ctrl, Alt or Meta, is ignored.
17
+ *
18
+ * Call it in the constructor, before other keydown listeners are added.
19
+ *
20
+ * @param host The field. Its `form` is the form it submits.
21
+ * @param input The native text input inside the field.
22
+ */
23
+ export declare function setupImplicitSubmission(host: HTMLElement & {
24
+ readonly form: HTMLFormElement | null;
25
+ }, input: () => HTMLInputElement | null | undefined): void;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Gate for `throttle-delay`: the returned function says whether an activation may go ahead now.
3
+ * The first activation opens a window of `getDelay()` milliseconds, and every activation inside
4
+ * that window is refused, never deferred, so nothing runs later with a stale event. With no
5
+ * delay (unset, zero or negative) every activation goes ahead. The delay is read on each call, so
6
+ * a later change to it takes effect.
7
+ */
8
+ export declare function createActivationGate(getDelay: () => number | undefined): () => boolean;
@@ -0,0 +1,2 @@
1
+ /** Whether `el` is a submit button of a form: native, or a Peacock button with `type="submit"`. */
2
+ export declare function isSubmitButton(el: Element): boolean;
@@ -19,7 +19,7 @@ export type AvatarGroupSize = 'sm' | 'md' | 'lg';
19
19
  *
20
20
  * @slot - The `wc-avatar` elements.
21
21
  *
22
- * @cssprop --avatar-group-overlap - How far each avatar slides under the previous one. Defaults to a quarter of the avatar size.
22
+ * @cssprop --avatar-group-overlap - How far each avatar slides under the previous one. Defaults to a quarter of the avatar size, a tenth at `size="sm"`.
23
23
  * @cssprop --avatar-group-ring-width - Width of the ring between avatars. Defaults to `2px`.
24
24
  * @cssprop --avatar-group-ring-color - Color of the ring between avatars. Defaults to `var(--color-surface)`; set it to the background the group sits on.
25
25
  *
@@ -13,8 +13,8 @@ export interface BaseButton {
13
13
  softDisabled: boolean;
14
14
  disabledReason: string;
15
15
  throttleDelay?: number;
16
- __dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void;
17
16
  __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
17
+ __isClickBlocked(): boolean;
18
18
  }
19
19
  export declare function mixinBaseButton<T extends MixinBase<LitElement & WithElementInternals>>(base: T): MixinReturn<T, BaseButton>;
20
20
  /**
@@ -87,11 +87,12 @@ export declare class Button extends Button_base {
87
87
  private __iconSlotCleanup;
88
88
  /** Cleanup returned by observerSlotChangesWithCallback for the label slot. */
89
89
  private __labelSlotCleanup;
90
- constructor();
91
90
  disconnectedCallback(): void;
92
91
  firstUpdated(changedProperties: Map<PropertyKey, unknown>): void;
93
92
  focus(): void;
94
93
  blur(): void;
94
+ /** A soft-disabled, loading or skeleton button swallows clicks. */
95
+ __isClickBlocked(): boolean;
95
96
  __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
96
97
  renderButtonElement(): import("lit-html").TemplateResult<1>;
97
98
  renderButtonContent(): import("lit-html").TemplateResult<1>;
@@ -78,10 +78,11 @@ export declare class Fab extends Fab_base {
78
78
  /** The pressed state of a `toggle` FAB. Has no effect without `toggle`. */
79
79
  selected: boolean;
80
80
  readonly buttonElement: HTMLElement | null;
81
- constructor();
82
81
  firstUpdated(changedProperties: PropertyValues<this>): void;
83
82
  focus(): void;
84
83
  blur(): void;
84
+ /** A soft-disabled, loading or skeleton button, or a disabled link, swallows clicks. */
85
+ __isClickBlocked(): boolean;
85
86
  __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
86
87
  renderDisabledReason(softDisabled: boolean): typeof nothing | import("lit-html").TemplateResult<1>;
87
88
  renderTooltip(): typeof nothing | import("lit-html").TemplateResult<1>;
@@ -75,10 +75,11 @@ export declare class IconButton extends IconButton_base {
75
75
  */
76
76
  tooltip?: string;
77
77
  readonly buttonElement: HTMLElement | null;
78
- constructor();
79
78
  firstUpdated(changedProperties: PropertyValues<this>): void;
80
79
  focus(): void;
81
80
  blur(): void;
81
+ /** A soft-disabled, loading or skeleton button, or a disabled link, swallows clicks. */
82
+ __isClickBlocked(): boolean;
82
83
  __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
83
84
  renderDisabledReason(softDisabled: boolean): typeof nothing | import("lit-html").TemplateResult<1>;
84
85
  renderTooltip(): typeof nothing | import("lit-html").TemplateResult<1>;
@@ -47,11 +47,15 @@ export declare class LinkButton extends LinkButton_base {
47
47
  private readonly linkElement;
48
48
  private __iconSlotCleanup;
49
49
  private __labelSlotCleanup;
50
- constructor();
51
50
  disconnectedCallback(): void;
52
51
  firstUpdated(changedProperties: PropertyValues<this>): void;
53
52
  focus(): void;
54
53
  blur(): void;
54
+ /**
55
+ * A link has no native disabled state, so a disabled, soft-disabled or skeleton link swallows
56
+ * the click and stops the navigation.
57
+ */
58
+ __isClickBlocked(): boolean;
55
59
  __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
56
60
  renderDisabledReason(): typeof nothing | import("lit-html").TemplateResult<1>;
57
61
  renderTooltip(): typeof nothing | import("lit-html").TemplateResult<1>;
@@ -15,11 +15,14 @@ import type { WeekDay } from '../__internal/utils/date.js';
15
15
  * <p>The month is a read-only ARIA grid labelled with the month and year: one row per week, one
16
16
  * gridcell per day labelled with its full date. Each event is owned (<code>aria-owns</code>) by the
17
17
  * cell of the day it starts on in that week. Events are buttons labelled with their title and
18
- * time, or notes that cannot be focused when <code>events-readonly</code> is set.</p>
18
+ * time, or notes that cannot be focused when <code>events-readonly</code> is set. Each day number is
19
+ * a button that fires <code>date-click</code>; the day of <code>contextDate</code> is marked
20
+ * selected. Pressing a day number never starts a drag or adds an event.</p>
19
21
  * <p>With <code>editable</code>, events are dragged to other days and all-day events resized by
20
22
  * their edges; with <code>addable</code>, dragging across days or clicking one asks for an
21
23
  * all-day event. The days a drag covers are highlighted.</p>
22
24
  *
25
+ * @fires date-click - Internal, does not bubble; a day number was chosen and `wc-calendar` selects that day. Detail contains `{ date }`.
23
26
  * @fires event-click - Internal, does not bubble; `wc-calendar` re-fires it. Detail contains `{ event }`.
24
27
  * @fires event-change - Internal, does not bubble; an event was dropped on new days. `wc-calendar` re-fires it.
25
28
  * @fires event-add - Internal, does not bubble; days were drawn across or a day clicked. `wc-calendar` re-fires it.
@@ -63,6 +66,7 @@ export declare class CalendarMonthView extends LitElement {
63
66
  private _getDayClass;
64
67
  /** Custom properties that colour an event with a palette `color`. */
65
68
  private _colorVars;
69
+ private _emitDateClick;
66
70
  private _emitEventClick;
67
71
  private _emitChange;
68
72
  private _emitAdd;
@@ -35,7 +35,10 @@ export declare function applyCalendarChange<T extends EventType>(events: readonl
35
35
  * same from code; each fires <code>date-change</code>. The date shown is <code>date</code> (an ISO
36
36
  * string) or <code>contextDate</code> (a <code>Date</code>), kept in step. Choosing a day number
37
37
  * in a column view switches to the day view and fires <code>view-change</code> and
38
- * <code>date-change</code>.</p>
38
+ * <code>date-change</code>. In the month view, choosing a day number selects that day (it is
39
+ * highlighted and becomes <code>contextDate</code>) and fires <code>date-change</code>, staying on
40
+ * the month. The header shows the month and year in the month view and the full date otherwise,
41
+ * and wraps onto two lines when the calendar is narrow.</p>
39
42
  * <p>Events are buttons, chosen with a click, Enter or Space, which fire <code>event-click</code>.
40
43
  * With <code>events-readonly</code> they are shown but cannot be focused or clicked.
41
44
  * <code>loading</code> shows a progress bar and marks the calendar busy. <code>first-day</code>
@@ -182,6 +185,8 @@ export declare class Calendar extends LitElement {
182
185
  private readonly _handleKeyDown;
183
186
  private readonly _handleWindowKeyDown;
184
187
  private _onViewDateClick;
188
+ /** A day chosen in the month view becomes the selected day; the view stays on the month. */
189
+ private _onMonthDateClick;
185
190
  private _onViewEventClick;
186
191
  private _onViewEventChange;
187
192
  private _onViewEventAdd;
@@ -13,11 +13,12 @@ declare const Card_base: typeof LitElement & import("../__internal/mixins/MixinC
13
13
  * edge-to-edge media.</p>
14
14
  * <p>Set <code>actionable</code> to make the whole card a single button that fires
15
15
  * <code>click</code>, or <code>href</code> (with <code>target</code>, <code>rel</code> and
16
- * <code>download</code>) to make it a link. The content of an actionable or link card is inert, so
17
- * don't put buttons or links inside one; use a plain card with its own actions instead.
16
+ * <code>download</code>) to make it a link. The content of an actionable or link card names the
17
+ * button or link, and anything focusable or clickable inside it stops responding, so don't put
18
+ * buttons or links inside one; use a plain card with its own actions instead.
18
19
  * <code>throttle-delay</code> throttles activation.</p>
19
- * <p><code>disabled</code> dims the card and makes its content inert; an actionable or link card
20
- * also stops responding to clicks and leaves the tab order. With <code>disabled-reason</code> it
20
+ * <p><code>disabled</code> dims the card. A static card's content becomes inert; an actionable or
21
+ * link card stops responding to clicks and leaves the tab order. With <code>disabled-reason</code> it
21
22
  * stays focusable and screen readers read the reason with it.</p>
22
23
  *
23
24
  * @cssprop --card-container-shape - Corner radius of the card. Defaults to `--shape-corner-large`.
@@ -42,13 +43,14 @@ export declare class Card extends Card_base {
42
43
  */
43
44
  variant: CardVariant;
44
45
  /**
45
- * Dims the card and makes its content inert. An actionable or link card also stops responding
46
- * to clicks and leaves the tab order, unless `disabled-reason` is set.
46
+ * Dims the card. A static card's content becomes inert. An actionable or link card stops
47
+ * responding to clicks and leaves the tab order, unless `disabled-reason` is set.
47
48
  */
48
49
  disabled: boolean;
49
50
  /**
50
- * Makes the whole card a single button that fires `click`. Its content becomes inert, so don't
51
- * put buttons or links inside an actionable card.
51
+ * Makes the whole card a single button that fires `click`. Its content names the button, and
52
+ * anything focusable or clickable inside it stops responding, so don't put buttons or links
53
+ * inside an actionable card.
52
54
  */
53
55
  actionable: boolean;
54
56
  /**
@@ -74,7 +76,15 @@ export declare class Card extends Card_base {
74
76
  __getDisabledReasonID(): "disabled-reason" | undefined;
75
77
  renderDisabledReason(): typeof nothing | import("lit-html").TemplateResult<1>;
76
78
  renderCardElement(isLinkElement: boolean): import("lit-html").TemplateResult<1>;
77
- renderCardContent(inertContent: boolean): import("lit-html").TemplateResult<1>;
79
+ /**
80
+ * Renders the slotted content. Inside the button or link of an actionable or link card the
81
+ * content stays in the accessibility tree, because it gives the control its name: `inert` would
82
+ * remove it and leave screen readers announcing just "button" or "link". Instead, a slot with a
83
+ * negative tabindex takes everything assigned to it out of sequential focus navigation, and
84
+ * `.card-content` ignores the pointer (see card.scss). A disabled static card has no control to
85
+ * name, so its content is simply inert.
86
+ */
87
+ renderCardContent(interactive: boolean): import("lit-html").TemplateResult<1>;
78
88
  render(): import("lit-html").TemplateResult<1>;
79
89
  }
80
90
  export {};
@@ -91,6 +91,11 @@ export declare class ChartPie extends ChartBase {
91
91
  protected percent(value: number): string;
92
92
  /** The hole as a fraction of the radius: none for a pie. `wc-chart-doughnut` overrides it. */
93
93
  protected innerFraction(): number;
94
+ /**
95
+ * The outer radius for the current size. It depends only on reactive properties, so a render
96
+ * (the doughnut's centre) can read it before the chart is drawn at that size.
97
+ */
98
+ protected outerRadius(): number;
94
99
  protected draw(animate: boolean): void;
95
100
  protected drawHighlight(): void;
96
101
  protected itemAtPoint(x: number, y: number): number;
@@ -1,4 +1,4 @@
1
- import { LitElement, nothing } from 'lit';
1
+ import { LitElement, nothing, PropertyValues } from 'lit';
2
2
  declare const Chip_base: import("../../__internal/mixins/mixin.js").MixinReturn<import("../../__internal/mixins/mixin.js").MixinReturn<import("../../__internal/mixins/mixin.js").MixinReturn<import("../../__internal/mixins/mixin.js").MixinReturn<typeof LitElement, import("../../__internal/mixins/element-internals.js").WithElementInternals>>, import("../../__internal/mixins/hyperlink.js").Hyperlink>, import("../../button/base-button/base-button.js").BaseButton>;
3
3
  /**
4
4
  * @label Chip
@@ -72,14 +72,14 @@ export declare class Chip extends Chip_base {
72
72
  readonly buttonElement: HTMLElement | null;
73
73
  /** Peacock's strings for the dismiss button label. */
74
74
  private readonly i18n;
75
- constructor();
76
- __dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void;
75
+ /** A soft-disabled or skeleton chip, or a disabled link, swallows clicks. */
76
+ __isClickBlocked(): boolean;
77
77
  __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
78
78
  __renderDisabledReason(softDisabled: boolean): typeof nothing | import("lit-html").TemplateResult<1>;
79
79
  __renderTooltip(): typeof nothing | import("lit-html").TemplateResult<1>;
80
80
  focus(): void;
81
81
  blur(): void;
82
- firstUpdated(): void;
82
+ firstUpdated(changedProperties: PropertyValues): void;
83
83
  private _dismissClickHandler;
84
84
  private _renderCloseButton;
85
85
  render(): import("lit-html").TemplateResult<1>;
@@ -63,9 +63,9 @@ type Monaco = typeof import('./monaco.js');
63
63
  * @csspart editor - The area Monaco renders into.
64
64
  *
65
65
  * @cssprop --code-editor-height - Height of the editing area. Defaults to 300px. Ignored with `fill`.
66
- * @cssprop --code-editor-background - Frame background. Defaults to `--color-surface-container-low`.
67
- * @cssprop --code-editor-border-color - Frame border color. Defaults to `--color-outline-variant`.
68
- * @cssprop --code-editor-shape - Frame corner radius. Defaults to `--shape-corner-medium`.
66
+ * @cssprop --code-editor-background - Frame background. Defaults to `--field-container-color`, then `--color-surface-container-lowest`, like the other input fields.
67
+ * @cssprop --code-editor-border-color - Frame border color. Defaults to `--field-outline-color`, then `--color-outline`, like the other input fields.
68
+ * @cssprop --code-editor-shape - Frame corner radius. Defaults to the `--field-container-shape-*` corners, then `--shape-corner-extra-small`, like the other input fields.
69
69
  * @cssprop --code-highlighter-token-keyword - Keyword color, shared with `wc-code-highlighter`, like the other `--code-highlighter-token-*` colors.
70
70
  *
71
71
  * @fires {CustomEvent<{value: string}>} input - Dispatched on each edit.
@@ -1,6 +1,7 @@
1
1
  import { LitElement } from 'lit';
2
2
  import type { OverlayPlacement } from '../__internal/utils/placement.js';
3
3
  import type { MenuFocusTarget } from '../menu/menu/menu.js';
4
+ declare const DropdownButton_base: import("../__internal/mixins/mixin.js").MixinReturn<typeof LitElement>;
4
5
  /**
5
6
  * @label Dropdown Button
6
7
  * @tag wc-dropdown-button
@@ -9,6 +10,8 @@ import type { MenuFocusTarget } from '../menu/menu/menu.js';
9
10
  * @summary A button that opens a menu of actions or options.
10
11
  * @overview
11
12
  * <p>Clicking the button opens its menu, and clicking it again closes it.</p>
13
+ * <p>An <code>aria-label</code> on the dropdown button names its button. Give one to a dropdown
14
+ * button that shows only an icon.</p>
12
15
  *
13
16
  * @cssprop --dropdown-button-container-shape: Defines the border radius of the dropdown button container shape.
14
17
  *
@@ -25,7 +28,7 @@ import type { MenuFocusTarget } from '../menu/menu/menu.js';
25
28
  * ```
26
29
  * @tags controls
27
30
  */
28
- export declare class DropdownButton extends LitElement {
31
+ export declare class DropdownButton extends DropdownButton_base {
29
32
  static styles: import("lit").CSSResultGroup[];
30
33
  /**
31
34
  * Button size.
@@ -70,3 +73,4 @@ export declare class DropdownButton extends LitElement {
70
73
  close(): void;
71
74
  render(): import("lit-html").TemplateResult<1>;
72
75
  }
76
+ export {};
@@ -62,6 +62,7 @@ export default abstract class BaseField extends BaseInput {
62
62
  protected controlTabIndex?: string;
63
63
  /** Watches the field's width while it holds a suggestion, so the badge can shrink. */
64
64
  private __widthObserver?;
65
+ constructor();
65
66
  connectedCallback(): void;
66
67
  disconnectedCallback(): void;
67
68
  protected updated(changed: PropertyValues): void;
@@ -70,6 +71,12 @@ export default abstract class BaseField extends BaseInput {
70
71
  * sets it: a label beside it would narrow every line of the text.
71
72
  */
72
73
  protected get suggestionBadgeIconOnly(): boolean;
74
+ /**
75
+ * Whether the field is a single-line text field, which counts like a native text input when
76
+ * Enter decides whether to submit a form that has no submit button. Multi-line fields and
77
+ * selects turn it off. Read in the constructor, so an override must not use instance fields.
78
+ */
79
+ protected get singleLineTextField(): boolean;
73
80
  /**
74
81
  * The error text the field shows: the consumer's `error-text` while `error` is set, else an
75
82
  * error the control found itself, else the validation message once it should show.
@@ -8,7 +8,10 @@ import { type ControlValidity } from './BaseInput.js';
8
8
  * @summary A single-line text field for plain text, an email address or a phone number.
9
9
  * @overview
10
10
  * <p>Input is form-associated: inside a <code>&lt;form&gt;</code> its <code>value</code> is submitted
11
- * under its <code>name</code>, and <code>form.reset()</code> restores the starting value.</p>
11
+ * under its <code>name</code>, and <code>form.reset()</code> restores the starting value. Enter
12
+ * submits the form as in a native text input: it clicks the form's first submit button, or,
13
+ * without one, submits a form that has no other text field. A disabled default button blocks it,
14
+ * and <code>preventDefault()</code> on the <code>keydown</code> stops it.</p>
12
15
  * <p>It validates like a native input: <code>required</code> and an invalid <code>type="email"</code>
13
16
  * block form submission, and the message shows under the field once the value is committed or the
14
17
  * form is submitted. <code>checkValidity()</code>, <code>reportValidity()</code> and
@@ -53,6 +56,7 @@ export declare class Input extends BaseField {
53
56
  */
54
57
  protected spellcheckAttribute: string | null;
55
58
  private inputElement?;
59
+ constructor();
56
60
  focus(): void;
57
61
  blur(): void;
58
62
  protected computeValidity(): ControlValidity;
@@ -64,12 +64,13 @@ export declare class ListItem extends ListItem_base {
64
64
  readonly itemElement: HTMLElement | null;
65
65
  /** Re-renders when slotted children are added, removed or re-slotted. */
66
66
  private readonly _contentObserver;
67
- constructor();
68
67
  connectedCallback(): void;
69
68
  disconnectedCallback(): void;
70
69
  protected updated(): void;
71
70
  focus(): void;
72
71
  blur(): void;
72
+ /** A soft-disabled or skeleton item, or a disabled link, swallows clicks. */
73
+ __isClickBlocked(): boolean;
73
74
  __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
74
75
  private __hasNamedSlot;
75
76
  isClickable(): boolean;
@@ -123,6 +123,8 @@ export declare class MentionInput extends BaseField {
123
123
  protected updated(changed: PropertyValues): void;
124
124
  focus(): void;
125
125
  blur(): void;
126
+ /** Multi-line: like a native textarea, it does not count for implicit submission. */
127
+ protected get singleLineTextField(): boolean;
126
128
  protected computeValidity(): ControlValidity;
127
129
  protected validityAnchor(): HTMLTextAreaElement | undefined;
128
130
  /** The field event contract, with the mentions alongside the value. */
@@ -63,7 +63,6 @@ export declare class MenuItem extends MenuItem_base {
63
63
  private readonly _contentObserver;
64
64
  /** Roving tabindex value managed by the parent Menu. */
65
65
  private _rovingTabIndex;
66
- constructor();
67
66
  connectedCallback(): void;
68
67
  disconnectedCallback(): void;
69
68
  protected updated(): void;
@@ -76,10 +75,13 @@ export declare class MenuItem extends MenuItem_base {
76
75
  get typeaheadText(): string;
77
76
  focus(): void;
78
77
  blur(): void;
78
+ /** A soft-disabled item, or a disabled link, swallows clicks. */
79
+ __isClickBlocked(): boolean;
79
80
  /**
80
- * Handles clicks on the host: stops them for soft-disabled items and disabled links, and turns
81
- * a click fired at the host (`item.click()`, Enter in the menu) into a click on the inner button
82
- * or link, so a link item navigates.
81
+ * Turns a click fired at the host (`item.click()`) into a click on the inner button or link, so
82
+ * a link item navigates. Enter and Space in the menu click the inner button or link directly,
83
+ * like a pointer, so a listener on the item can cancel a link with `preventDefault()`. Blocked
84
+ * clicks (soft-disabled items, disabled links) are swallowed before this, by the host listener.
83
85
  */
84
86
  __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
85
87
  /** ARIA role of the inner control. */
@@ -15,7 +15,8 @@ import { type ControlValidity } from '../input/BaseInput.js';
15
15
  * <p>It validates like a native password input: <code>required</code>, <code>minlength</code>,
16
16
  * <code>maxlength</code> and <code>pattern</code> block form submission, and the message shows under
17
17
  * the field once the value is committed or the form is submitted. Inside a <code>&lt;form&gt;</code>
18
- * its <code>value</code> is submitted under its <code>name</code>.</p>
18
+ * its <code>value</code> is submitted under its <code>name</code>, and Enter submits the form as in
19
+ * a native input (see <code>wc-input</code>).</p>
19
20
  *
20
21
  * @fires {CustomEvent<{value: string}>} input - Dispatched as the user types.
21
22
  * @fires {CustomEvent<{value: string}>} change - Dispatched when the value is committed.
@@ -52,6 +53,7 @@ export declare class PasswordField extends BaseField {
52
53
  private inputElement?;
53
54
  /** Peacock's strings for the show/hide toggle. */
54
55
  private readonly i18n;
56
+ constructor();
55
57
  focus(): void;
56
58
  blur(): void;
57
59
  protected computeValidity(): ControlValidity;
@@ -85,6 +85,7 @@ export declare class Search extends BaseInput {
85
85
  private readonly ai;
86
86
  /** Whether Ask is offered now: `ask`, and AI on for the page. */
87
87
  private get __asking();
88
+ constructor();
88
89
  focus(): void;
89
90
  blur(): void;
90
91
  protected computeValidity(): ControlValidity;
@@ -127,6 +127,8 @@ export declare class Select extends BaseField {
127
127
  disconnectedCallback(): void;
128
128
  protected willUpdate(changed: PropertyValues<this>): void;
129
129
  protected updated(changedProperties: PropertyValues<this>): void;
130
+ /** Like a native select, it does not count for implicit submission. */
131
+ protected get singleLineTextField(): boolean;
130
132
  protected valueMissingText(): string;
131
133
  protected validityAnchor(): HTMLElement | undefined;
132
134
  /** Clears the selection (every value of a multi-select) and fires `change`. */
@@ -25,7 +25,7 @@ import type { MenuFocusTarget } from '../menu/menu/menu.js';
25
25
  * @cssprop --elevated-split-button-container-color: Color of the elevated split button container.
26
26
  * @cssprop --elevated-split-button-label-text-color: Text color of the elevated split button label.
27
27
  *
28
- * @fires {MouseEvent} click - Dispatched when the primary action button is clicked.
28
+ * @fires {MouseEvent} click - Dispatched when the primary action button is clicked, and only then: a menu item's click does not bubble past the split button. Listen on the item, or for the `menu-item-activate` event (`detail.item`) that the menu fires through the split button.
29
29
  * @fires {CustomEvent} open - Dispatched after the menu opens.
30
30
  * @fires {CustomEvent<{reason: 'escape' | 'light-dismiss' | 'action' | 'api'}>} close - Dispatched after the menu closes: an item pick is `action`, Escape `escape`, a press outside or Tab `light-dismiss`, `close()` or the primary action `api`.
31
31
  *
@@ -83,5 +83,10 @@ export declare class SplitButton extends LitElement {
83
83
  /** Closes the menu. */
84
84
  close(): void;
85
85
  private _onActionClick;
86
+ /**
87
+ * The split button's `click` means the primary action, so a menu item's click stops here: the
88
+ * item's own listeners and the menu have seen it, and the host still gets `menu-item-activate`.
89
+ */
90
+ private _onMenuClick;
86
91
  render(): import("lit-html").TemplateResult<1>;
87
92
  }
@@ -23,7 +23,9 @@ export interface StepContext {
23
23
  * before the stepper's <code>current</code> step are complete (a check), the current one has
24
24
  * <code>aria-current="step"</code>, and later ones are upcoming (their number). <code>error</code>
25
25
  * marks it with a warning icon and <code>error-text</code>, <code>disabled</code> takes it out of
26
- * navigation, and <code>optional</code> adds an "Optional" caption.</p>
26
+ * navigation, and <code>optional</code> adds an "Optional" caption. The step reflects its state
27
+ * as a read-only <code>status</code> attribute (<code>complete</code>, <code>current</code> or
28
+ * <code>upcoming</code>) for styling, for example <code>wc-step[status='current']</code>.</p>
27
29
  * <p>A screen reader reads each step as its position, label and state, for example
28
30
  * "Step 2 of 4, Shipping, Completed".</p>
29
31
  *
@@ -47,7 +47,9 @@ export declare class Tab extends LitElement {
47
47
  /** The URL to link to. When set, the tab renders as a link for page navigation. */
48
48
  href?: string;
49
49
  /**
50
- * Sets the delay for throttle in milliseconds. When unset (default), no throttle is applied.
50
+ * Throttles activation by this many milliseconds: after a click, every click inside the delay
51
+ * is swallowed, so neither `click` listeners nor `wc-tabs` see it. When unset (default), no
52
+ * throttle is applied.
51
53
  */
52
54
  throttleDelay?: number;
53
55
  /** The panel this tab controls; set by `wc-tab-group`. */
@@ -61,7 +63,15 @@ export declare class Tab extends LitElement {
61
63
  updated(changed: PropertyValues): void;
62
64
  focus(options?: Parameters<HTMLElement['focus']>[0]): void;
63
65
  blur(): void;
64
- __dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void;
66
+ /** Whether `throttle-delay` lets a click through now; opens a new delay when it does. */
67
+ private readonly __throttleAllows;
68
+ /**
69
+ * Host click listener. Every activation reaches it once: a click on the inner control
70
+ * bubbling out, or a click fired at the host. A disabled link must not navigate, and a click
71
+ * inside the `throttle-delay` window must not act; both are swallowed so no other listener
72
+ * (including `wc-tabs`) sees them. A disabled link's click does not open a throttle window.
73
+ */
74
+ private __handleHostClick;
65
75
  __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
66
76
  __getParentTabsVariant(): Tabs['variant'];
67
77
  __getDisabledReasonID(): string | typeof nothing;
@@ -62,6 +62,8 @@ export declare class Textarea extends BaseField {
62
62
  protected updated(changed: PropertyValues<this>): void;
63
63
  /** Just the sparkle: a label beside the text would narrow every line. */
64
64
  protected get suggestionBadgeIconOnly(): boolean;
65
+ /** Multi-line: like a native textarea, it does not count for implicit submission. */
66
+ protected get singleLineTextField(): boolean;
65
67
  focus(): void;
66
68
  blur(): void;
67
69
  protected computeValidity(): ControlValidity;
@@ -16,7 +16,9 @@ import { LitElement } from 'lit';
16
16
  *
17
17
  * <p>The toolbar follows the WAI-ARIA toolbar pattern: it is a single tab stop, and the arrow
18
18
  * keys along its orientation move focus between actions (Home and End jump to the first and last).
19
- * Disabled actions and dividers are skipped. Give the toolbar an <code>aria-label</code>.</p>
19
+ * Disabled actions and dividers are skipped, and when the action that holds the tab stop becomes
20
+ * disabled or hidden, the next enabled action (else the previous one) takes it over. Give the
21
+ * toolbar an <code>aria-label</code>.</p>
20
22
  *
21
23
  * @cssprop --toolbar-container-color - Background color of the toolbar.
22
24
  * @cssprop --toolbar-container-shape - Border radius of the floating toolbar.
@@ -77,9 +79,18 @@ export declare class Toolbar extends LitElement {
77
79
  elevated: boolean;
78
80
  /** The toolbar's single tab stop, moved with the arrow keys along its orientation. */
79
81
  private readonly roving;
82
+ /**
83
+ * Re-applies the tab stop when an action becomes disabled, aria-disabled or hidden, so it moves
84
+ * to the next enabled action instead of leaving the toolbar out of the Tab order.
85
+ */
86
+ private readonly __actionStateObserver;
80
87
  connectedCallback(): void;
88
+ disconnectedCallback(): void;
81
89
  updated(changed: Map<string, unknown>): void;
82
- /** Actions that can take focus, in slot order. */
90
+ /**
91
+ * The actions, in slot order. Disabled and hidden ones are included: the roving controller skips
92
+ * them, takes the tab stop off them and hands it to the next enabled action.
93
+ */
83
94
  private __getItems;
84
95
  private __handleSlotChange;
85
96
  render(): import("lit-html").TemplateResult<1>;
package/dist/step.js CHANGED
@@ -241,7 +241,9 @@ const STEPPER_INPUTS = ['value', 'error', 'disabled', 'optional'];
241
241
  * before the stepper's <code>current</code> step are complete (a check), the current one has
242
242
  * <code>aria-current="step"</code>, and later ones are upcoming (their number). <code>error</code>
243
243
  * marks it with a warning icon and <code>error-text</code>, <code>disabled</code> takes it out of
244
- * navigation, and <code>optional</code> adds an "Optional" caption.</p>
244
+ * navigation, and <code>optional</code> adds an "Optional" caption. The step reflects its state
245
+ * as a read-only <code>status</code> attribute (<code>complete</code>, <code>current</code> or
246
+ * <code>upcoming</code>) for styling, for example <code>wc-step[status='current']</code>.</p>
245
247
  * <p>A screen reader reads each step as its position, label and state, for example
246
248
  * "Step 2 of 4, Shipping, Completed".</p>
247
249
  *
@@ -320,6 +322,10 @@ let Step = class Step extends i$1 {
320
322
  old.orientation !== context.orientation) {
321
323
  this.context = context;
322
324
  }
325
+ // Reflected so pages (and the stepper's narrow layout) can style a step by its state.
326
+ if (this.getAttribute('status') !== context.status) {
327
+ this.setAttribute('status', context.status);
328
+ }
323
329
  }
324
330
  focus(options) {
325
331
  this.stepElement?.focus(options);