@fusion.dev/helix-headless 0.0.0-dev → 0.0.2

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 (210) hide show
  1. package/custom-elements.json +4513 -4483
  2. package/dist/accordion/item/accordion-item.d.ts +13 -15
  3. package/dist/accordion/item/accordion-item.js +15 -17
  4. package/dist/announcement/root/announcement-root.d.ts +7 -25
  5. package/dist/announcement/root/announcement-root.js +7 -20
  6. package/dist/app-header/root/app-header-root.d.ts +10 -17
  7. package/dist/app-header/root/app-header-root.js +9 -18
  8. package/dist/avatar/group/avatar-group.d.ts +10 -19
  9. package/dist/avatar/group/avatar-group.js +12 -17
  10. package/dist/avatar/root/avatar-root.d.ts +8 -8
  11. package/dist/avatar/root/avatar-root.js +19 -20
  12. package/dist/badge/root/badge-root.d.ts +6 -6
  13. package/dist/badge/root/badge-root.js +13 -13
  14. package/dist/bar-chart/root/bar-chart-root.d.ts +21 -29
  15. package/dist/bar-chart/root/bar-chart-root.js +42 -57
  16. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +12 -18
  17. package/dist/breadcrumbs/breadcrumb/breadcrumb.js +13 -16
  18. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +9 -28
  19. package/dist/breadcrumbs/root/breadcrumbs-root.js +9 -28
  20. package/dist/button/root/button-root.d.ts +84 -94
  21. package/dist/button/root/button-root.js +82 -92
  22. package/dist/callout/root/callout-root.d.ts +4 -5
  23. package/dist/carousel/root/carousel-root.d.ts +59 -71
  24. package/dist/carousel/root/carousel-root.js +73 -101
  25. package/dist/chat/composer/chat-composer.d.ts +29 -33
  26. package/dist/chat/composer/chat-composer.js +40 -44
  27. package/dist/chat/message/chat-message.d.ts +25 -25
  28. package/dist/chat/message/chat-message.js +26 -26
  29. package/dist/chat/root/chat-root.d.ts +28 -41
  30. package/dist/chat/root/chat-root.js +27 -40
  31. package/dist/checkbox/root/checkbox-root.d.ts +10 -12
  32. package/dist/checkbox/root/checkbox-root.js +29 -35
  33. package/dist/checkbox-group/root/checkbox-group-root.d.ts +32 -45
  34. package/dist/checkbox-group/root/checkbox-group-root.js +53 -79
  35. package/dist/code-block/root/code-block-root.d.ts +3 -4
  36. package/dist/code-block/root/code-block-root.js +8 -12
  37. package/dist/color-input/root/color-input-root.d.ts +36 -37
  38. package/dist/color-input/root/color-input-root.js +29 -34
  39. package/dist/color-picker/color.d.ts +7 -8
  40. package/dist/color-picker/color.js +7 -8
  41. package/dist/color-picker/root/color-picker-root.d.ts +55 -57
  42. package/dist/color-picker/root/color-picker-root.js +60 -64
  43. package/dist/combobox/root/combobox-root.d.ts +53 -58
  44. package/dist/combobox/root/combobox-root.js +85 -94
  45. package/dist/command/root/command-root.d.ts +8 -8
  46. package/dist/command/root/command-root.js +29 -33
  47. package/dist/copy-button/root/copy-button-root.d.ts +21 -24
  48. package/dist/copy-button/root/copy-button-root.js +25 -35
  49. package/dist/data-table/root/data-table-root.d.ts +77 -76
  50. package/dist/data-table/root/data-table-root.js +95 -84
  51. package/dist/data-table/root/order.d.ts +2 -2
  52. package/dist/data-table/root/order.js +1 -3
  53. package/dist/date-input/root/date-input-root.d.ts +88 -93
  54. package/dist/date-input/root/date-input-root.js +147 -158
  55. package/dist/date-picker/root/date-picker-root.d.ts +75 -83
  56. package/dist/date-picker/root/date-picker-root.js +120 -143
  57. package/dist/dialog/root/dialog-root.d.ts +41 -24
  58. package/dist/dialog/root/dialog-root.js +47 -24
  59. package/dist/divider/root/divider-root.d.ts +5 -6
  60. package/dist/divider/root/divider-root.js +4 -5
  61. package/dist/donut-chart/root/donut-chart-root.d.ts +22 -25
  62. package/dist/donut-chart/root/donut-chart-root.js +37 -51
  63. package/dist/drawer/root/drawer-root.d.ts +24 -29
  64. package/dist/drawer/root/drawer-root.js +15 -22
  65. package/dist/drilldown/item/drilldown-item.d.ts +14 -14
  66. package/dist/drilldown/item/drilldown-item.js +24 -26
  67. package/dist/drilldown/root/drilldown-root.d.ts +8 -10
  68. package/dist/drilldown/root/drilldown-root.js +6 -7
  69. package/dist/element-events.generated.js +1 -1
  70. package/dist/file-input/root/file-input-root.d.ts +20 -24
  71. package/dist/file-input/root/file-input-root.js +42 -57
  72. package/dist/format-date/root/format-date-root.js +1 -1
  73. package/dist/heatmap/root/buckets.d.ts +8 -8
  74. package/dist/heatmap/root/buckets.js +8 -8
  75. package/dist/heatmap/root/heatmap-root.d.ts +57 -63
  76. package/dist/heatmap/root/heatmap-root.js +72 -83
  77. package/dist/icon/root/icon-root.d.ts +4 -4
  78. package/dist/icon/root/icon-root.js +9 -9
  79. package/dist/icon-button/root/icon-button-root.d.ts +4 -6
  80. package/dist/icon-button/root/icon-button-root.js +4 -6
  81. package/dist/image/root/image-root.d.ts +49 -59
  82. package/dist/image/root/image-root.js +55 -65
  83. package/dist/index.d.ts +5 -5
  84. package/dist/index.js +5 -5
  85. package/dist/input/root/input-root.d.ts +61 -85
  86. package/dist/input/root/input-root.js +79 -106
  87. package/dist/kbd/root/kbd-root.d.ts +8 -7
  88. package/dist/kbd/root/kbd-root.js +71 -11
  89. package/dist/legend/root/legend-root.d.ts +1 -1
  90. package/dist/legend/root/legend-root.js +4 -5
  91. package/dist/line-chart/root/line-chart-root.d.ts +26 -30
  92. package/dist/line-chart/root/line-chart-root.js +10 -10
  93. package/dist/list/item/list-item.d.ts +14 -18
  94. package/dist/list/item/list-item.js +18 -22
  95. package/dist/list/root/list-root.d.ts +4 -4
  96. package/dist/list/root/list-root.js +3 -3
  97. package/dist/listbox/root/listbox-root.d.ts +31 -58
  98. package/dist/listbox/root/listbox-root.js +66 -109
  99. package/dist/megamenu/root/megamenu-root.d.ts +34 -35
  100. package/dist/megamenu/root/megamenu-root.js +53 -58
  101. package/dist/menu/item/menu-item.d.ts +39 -53
  102. package/dist/menu/item/menu-item.js +50 -64
  103. package/dist/menu/root/menu-root.d.ts +30 -40
  104. package/dist/menu/root/menu-root.js +49 -82
  105. package/dist/meter/root/meter-root.d.ts +49 -53
  106. package/dist/meter/root/meter-root.js +22 -27
  107. package/dist/navigation/root/navigation-root.js +11 -19
  108. package/dist/notifications/notification/notification.d.ts +16 -22
  109. package/dist/notifications/notification/notification.js +21 -27
  110. package/dist/notifications/root/notifications-root.d.ts +31 -39
  111. package/dist/notifications/root/notifications-root.js +41 -52
  112. package/dist/number-input/root/number-input-root.d.ts +31 -33
  113. package/dist/number-input/root/number-input-root.js +37 -39
  114. package/dist/option/root/option-root.d.ts +73 -74
  115. package/dist/option/root/option-root.js +62 -64
  116. package/dist/outline/root/outline-root.d.ts +38 -44
  117. package/dist/outline/root/outline-root.js +66 -82
  118. package/dist/pagination/root/pagination-root.d.ts +87 -92
  119. package/dist/pagination/root/pagination-root.js +116 -123
  120. package/dist/pagination/size/pagination-size.d.ts +31 -50
  121. package/dist/pagination/size/pagination-size.js +35 -55
  122. package/dist/pagination/summary/pagination-summary.d.ts +12 -12
  123. package/dist/pagination/summary/pagination-summary.js +18 -18
  124. package/dist/pin-input/root/pin-input-root.d.ts +53 -70
  125. package/dist/pin-input/root/pin-input-root.js +74 -94
  126. package/dist/popover/root/popover-root.d.ts +15 -20
  127. package/dist/popover/root/popover-root.js +19 -36
  128. package/dist/progress/root/progress-root.d.ts +12 -14
  129. package/dist/progress/root/progress-root.js +22 -25
  130. package/dist/qr-code/root/qr-code-root.d.ts +11 -11
  131. package/dist/qr-code/root/qr-code-root.js +12 -14
  132. package/dist/radio/group/radio-group.js +19 -26
  133. package/dist/radio/root/radio-root.d.ts +12 -13
  134. package/dist/radio/root/radio-root.js +12 -13
  135. package/dist/rating/root/rating-root.d.ts +25 -30
  136. package/dist/rating/root/rating-root.js +43 -50
  137. package/dist/scroll-area/root/scroll-area-root.d.ts +11 -14
  138. package/dist/scroll-area/root/scroll-area-root.js +39 -33
  139. package/dist/select/root/select-root.d.ts +7 -12
  140. package/dist/select/root/select-root.js +40 -55
  141. package/dist/slider/root/slider-root.d.ts +53 -60
  142. package/dist/slider/root/slider-root.js +74 -85
  143. package/dist/sparkline/root/sparkline-root.d.ts +43 -47
  144. package/dist/sparkline/root/sparkline-root.js +23 -32
  145. package/dist/speed-dial/item/speed-dial-item.d.ts +6 -6
  146. package/dist/speed-dial/item/speed-dial-item.js +9 -9
  147. package/dist/speed-dial/root/speed-dial-root.d.ts +21 -25
  148. package/dist/speed-dial/root/speed-dial-root.js +32 -40
  149. package/dist/splitter/root/splitter-root.d.ts +98 -111
  150. package/dist/splitter/root/splitter-root.js +96 -123
  151. package/dist/stat/root/stat-root.d.ts +2 -7
  152. package/dist/stat/root/stat-root.js +0 -5
  153. package/dist/steps/step/step.d.ts +19 -24
  154. package/dist/steps/step/step.js +27 -32
  155. package/dist/switch/root/switch-root.js +2 -2
  156. package/dist/table/column/table-column.d.ts +54 -60
  157. package/dist/table/column/table-column.js +95 -68
  158. package/dist/table/root/table-root.d.ts +5 -6
  159. package/dist/table/root/table-root.js +7 -10
  160. package/dist/tabs/panel/tab-panel.d.ts +21 -25
  161. package/dist/tabs/panel/tab-panel.js +25 -29
  162. package/dist/tabs/root/tabs-root.d.ts +25 -34
  163. package/dist/tabs/root/tabs-root.js +22 -28
  164. package/dist/tabs/tab/tab.d.ts +12 -12
  165. package/dist/tabs/tab/tab.js +19 -20
  166. package/dist/textarea/root/textarea-root.d.ts +36 -36
  167. package/dist/textarea/root/textarea-root.js +43 -47
  168. package/dist/time-input/root/time-input-root.d.ts +58 -68
  169. package/dist/time-input/root/time-input-root.js +62 -77
  170. package/dist/time-picker/root/time-picker-root.d.ts +73 -79
  171. package/dist/time-picker/root/time-picker-root.js +72 -84
  172. package/dist/timeline/item/timeline-item.d.ts +8 -11
  173. package/dist/timeline/item/timeline-item.js +8 -11
  174. package/dist/timeline/root/timeline-root.d.ts +5 -7
  175. package/dist/timeline/root/timeline-root.js +5 -7
  176. package/dist/toast/item/toast-item.d.ts +9 -27
  177. package/dist/toast/item/toast-item.js +19 -41
  178. package/dist/toast/root/toast-root.d.ts +10 -14
  179. package/dist/toast/root/toast-root.js +4 -5
  180. package/dist/toggle/group/toggle-group.d.ts +6 -15
  181. package/dist/toggle/group/toggle-group.js +21 -36
  182. package/dist/toggle/root/toggle-root.d.ts +26 -27
  183. package/dist/toggle/root/toggle-root.js +30 -31
  184. package/dist/toolbar/root/toolbar-root.d.ts +7 -10
  185. package/dist/toolbar/root/toolbar-root.js +10 -14
  186. package/dist/tooltip/root/tooltip-root.d.ts +52 -59
  187. package/dist/tooltip/root/tooltip-root.js +98 -93
  188. package/dist/tour/root/tour-root.d.ts +19 -23
  189. package/dist/tour/root/tour-root.js +31 -41
  190. package/dist/tour/stop/tour-stop.d.ts +14 -15
  191. package/dist/tour/stop/tour-stop.js +31 -34
  192. package/dist/tree/item/tree-item.d.ts +30 -35
  193. package/dist/tree/item/tree-item.js +43 -55
  194. package/dist/tree/root/tree-root.d.ts +7 -10
  195. package/dist/tree/root/tree-root.js +33 -42
  196. package/dist/trend/root/trend-root.d.ts +3 -5
  197. package/dist/trend/root/trend-root.js +5 -9
  198. package/dist/video/root/video-root.d.ts +100 -124
  199. package/dist/video/root/video-root.js +142 -176
  200. package/dist/video-playlist/item/video-playlist-item.d.ts +16 -16
  201. package/dist/video-playlist/item/video-playlist-item.js +24 -24
  202. package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -8
  203. package/dist/video-playlist/menu/video-playlist-menu.js +20 -29
  204. package/dist/video-playlist/root/video-playlist-root.d.ts +16 -11
  205. package/dist/video-playlist/root/video-playlist-root.js +21 -25
  206. package/dist/virtual-list/root/virtual-list-root.d.ts +8 -12
  207. package/dist/virtual-list/root/virtual-list-root.js +11 -16
  208. package/jsx.d.ts +9797 -12561
  209. package/package.json +6 -6
  210. package/vue.d.ts +2684 -3228
@@ -38,25 +38,71 @@ import { type PropertyValues, type TemplateResult } from 'lit';
38
38
  export declare class HelixHeadlessButton extends HelixFormElement {
39
39
  protected readonly aria: AriaForwardController;
40
40
  /**
41
- * What activating the button does to its form.
41
+ * What to send when the button is activated, and what to send it to.
42
+ *
43
+ * The platform's invoker attributes, forwarded onto the inner `<button>`
44
+ * rather than left on the host: only a real button is recognized as an
45
+ * invoker, so `commandfor` written on a custom element resolves nothing and
46
+ * the trigger silently does nothing at all. A wrapper has to hand them down,
47
+ * the same way `label` becomes `aria-label` in there.
48
+ *
49
+ * ```html
50
+ * <helix-button commandfor="confirm" command="--show">Delete…</helix-button>
51
+ * ```
52
+ *
53
+ * `commandFor` spells its attribute out, because Lit lowercases a property
54
+ * name to derive one rather than dash-casing it, and what a consumer writes
55
+ * is the platform's `commandfor`.
56
+ *
57
+ * @reference https://html.spec.whatwg.org/multipage/form-elements.html#attr-button-command Invoker Commands
42
58
  */
43
- type: 'button' | 'submit' | 'reset';
59
+ command: string;
44
60
  /**
45
- * What this button submits under its own `name`, the way a native submitter does.
61
+ * The id of the element the command is sent to.
46
62
  *
47
- * **Reported for exactly the submission this button starts and not otherwise.**
48
- * A native submit button contributes `name=value` only when it is the one
49
- * that submitted, and every other button on the form contributes nothing. A
50
- * form-associated element reporting a value continuously would contribute on
51
- * every submission whoever started it, which is a different feature wearing
52
- * the same name, so `submit` below sets it, submits, and clears it inside one
53
- * synchronous call.
63
+ * @reference https://html.spec.whatwg.org/multipage/form-elements.html#attr-button-commandfor Invoker Commands
64
+ */
65
+ commandFor: string;
66
+ /**
67
+ * Whether this button is a disclosure trigger, and whether its panel is open.
54
68
  *
55
- * `CopyButton` has a `value` of its own meaning the text to put on the
56
- * clipboard, which is not this and is why it is declared there rather than
57
- * inherited.
69
+ * **Set by whatever owns the panel, and a property rather than an attribute
70
+ * for the reason `Menu` already states about its items**: an attribute
71
+ * written onto a consumer's element after it upgrades is a hydration mismatch
72
+ * waiting to happen. Measured 28 Aug 2026 against React 19.2.8, server markup
73
+ * hydrated with the definitions loaded either side of `hydrateRoot`:
74
+ * `Megamenu` and `SpeedDial` wrote `aria-expanded` onto the slotted trigger
75
+ * and React reported "some attributes of the server rendered HTML didn't
76
+ * match the client properties. This won't be patched up" in both orders;
77
+ * `Popover` and `Menu`, which write nothing, were clean in both.
78
+ *
79
+ * **A property crosses that gap because React never looks at one.** It diffs
80
+ * the attributes it rendered, and this one is `attribute: false`, so the state
81
+ * travels to the inner `<button>` and lands inside a shadow root React does
82
+ * not own and cannot compare. The consumer's own element is left exactly as
83
+ * they served it and the reader is still told what the control does.
84
+ *
85
+ * `undefined` renders nothing at all, so a button that is not a trigger
86
+ * carries no `aria-expanded`: the resting state is the attribute's absence,
87
+ * which is the rule every reflected property here follows.
88
+ *
89
+ * A consumer who wants to say this statically writes `aria-expanded` on the
90
+ * host instead, which `AriaForwardController` carries to the same place.
58
91
  */
59
- value: string;
92
+ expanded?: boolean;
93
+ /**
94
+ * Whether the button holds its group's tab stop.
95
+ *
96
+ * A toolbar keeps one tab stop across its children, and the obvious way to do
97
+ * that is to write `tabindex` onto each of them. That is a change to markup
98
+ * the consumer rendered, so a React consumer's hydration reports it and does
99
+ * not patch it up. A parent sets this property instead, which writes nothing,
100
+ * and the stop lands on the inner control inside the shadow root.
101
+ *
102
+ * No attribute, because it is coordination between elements rather than
103
+ * anything a consumer sets.
104
+ */
105
+ focusable: boolean;
60
106
  /**
61
107
  * Where this button's submission goes, overriding the form's own.
62
108
  *
@@ -98,77 +144,29 @@ export declare class HelixHeadlessButton extends HelixFormElement {
98
144
  * "button" and nothing else.
99
145
  */
100
146
  label: string;
101
- /**
102
- * What to send when the button is activated, and what to send it to.
103
- *
104
- * The platform's invoker attributes, forwarded onto the inner `<button>`
105
- * rather than left on the host: only a real button is recognized as an
106
- * invoker, so `commandfor` written on a custom element resolves nothing and
107
- * the trigger silently does nothing at all. A wrapper has to hand them down,
108
- * the same way `label` becomes `aria-label` in there.
109
- *
110
- * ```html
111
- * <helix-button commandfor="confirm" command="--show">Delete…</helix-button>
112
- * ```
113
- *
114
- * `commandFor` spells its attribute out, because Lit lowercases a property
115
- * name to derive one rather than dash-casing it, and what a consumer writes
116
- * is the platform's `commandfor`.
117
- *
118
- * @reference https://html.spec.whatwg.org/multipage/form-elements.html#attr-button-command Invoker Commands
119
- */
120
- command: string;
121
- /**
122
- * The id of the element the command is sent to.
123
- *
124
- * @reference https://html.spec.whatwg.org/multipage/form-elements.html#attr-button-commandfor Invoker Commands
125
- */
126
- commandFor: string;
127
147
  /** Moves focus to the inner control, so the host is never the focus target. */
128
148
  static shadowRootOptions: ShadowRootInit;
129
149
  private readonly handleClick;
130
150
  /**
131
- * Whether the button holds its group's tab stop.
132
- *
133
- * A toolbar keeps one tab stop across its children, and the obvious way to do
134
- * that is to write `tabindex` onto each of them. That is a change to markup
135
- * the consumer rendered, so a React consumer's hydration reports it and does
136
- * not patch it up. A parent sets this property instead, which writes nothing,
137
- * and the stop lands on the inner control inside the shadow root.
138
- *
139
- * No attribute, because it is coordination between elements rather than
140
- * anything a consumer sets.
151
+ * What activating the button does to its form.
141
152
  */
142
- focusable: boolean;
153
+ type: 'button' | 'submit' | 'reset';
143
154
  /**
144
- * Whether this button is a disclosure trigger, and whether its panel is open.
145
- *
146
- * **Set by whatever owns the panel, and a property rather than an attribute
147
- * for the reason `Menu` already states about its items**: an attribute
148
- * written onto a consumer's element after it upgrades is a hydration mismatch
149
- * waiting to happen. Measured 28 Aug 2026 against React 19.2.8, server markup
150
- * hydrated with the definitions loaded either side of `hydrateRoot`:
151
- * `Megamenu` and `SpeedDial` wrote `aria-expanded` onto the slotted trigger
152
- * and React reported "some attributes of the server rendered HTML didn't
153
- * match the client properties. This won't be patched up" in both orders;
154
- * `Popover` and `Menu`, which write nothing, were clean in both.
155
- *
156
- * **A property crosses that gap because React never looks at one.** It diffs
157
- * the attributes it rendered, and this one is `attribute: false`, so the state
158
- * travels to the inner `<button>` and lands inside a shadow root React does
159
- * not own and cannot compare. The consumer's own element is left exactly as
160
- * they served it, which is what `Popover`'s note asks for, and the reader is
161
- * still told what the control does, which is what `SpeedDial`'s note asks
162
- * for. See #322.
155
+ * What this button submits under its own `name`, the way a native submitter does.
163
156
  *
164
- * `undefined` renders nothing at all, so a button that is not a trigger
165
- * carries no `aria-expanded`: the resting state is the attribute's absence,
166
- * which is the rule every reflected property here follows.
157
+ * **Reported for exactly the submission this button starts and not otherwise.**
158
+ * A native submit button contributes `name=value` only when it is the one
159
+ * that submitted, and every other button on the form contributes nothing. A
160
+ * form-associated element reporting a value continuously would contribute on
161
+ * every submission whoever started it, which is a different feature wearing
162
+ * the same name, so `submit` below sets it, submits, and clears it inside one
163
+ * synchronous call.
167
164
  *
168
- * A consumer who wants to say this statically writes `aria-expanded` on the
169
- * host instead, which `AriaForwardController` carries to the same place.
165
+ * `CopyButton` has a `value` of its own meaning the text to put on the
166
+ * clipboard, which is not this and is why it is declared there rather than
167
+ * inherited.
170
168
  */
171
- expanded?: boolean;
169
+ value: string;
172
170
  /**
173
171
  * Submits the form as this button, for the length of one call.
174
172
  *
@@ -188,11 +186,11 @@ export declare class HelixHeadlessButton extends HelixFormElement {
188
186
  /**
189
187
  * The element this button's command is sent to, resolved.
190
188
  *
191
- * The platform's own accessor, and this element had the resolution and kept
192
- * it to itself: `linkCommand` writes the target onto the inner `<button>`,
193
- * where a consumer cannot reach it, and `commandFor` answers with an id
194
- * rather than an element. Writing assigns the inner control directly, which
195
- * is what an invoker without an id in the same tree needs.
189
+ * The platform's own accessor, because the resolution is otherwise kept
190
+ * inside: `linkCommand` writes the target onto the inner `<button>`, where a
191
+ * consumer cannot reach it, and `commandFor` answers with an id rather than
192
+ * an element. Writing assigns the inner control directly, which is what an
193
+ * invoker without an id in the same tree needs.
196
194
  */
197
195
  get commandForElement(): Element | null;
198
196
  set commandForElement(target: Element | null);
@@ -208,13 +206,7 @@ export declare class HelixHeadlessButton extends HelixFormElement {
208
206
  *
209
207
  * `commandForElement` takes an element instead, and an element reference
210
208
  * resolves outward: a node in a shadow root may point at one in the document.
211
- * The same asymmetry the listbox relies on for `aria-activedescendant`, and
212
- * the second place in this library where the id form is the one that cannot
213
- * work.
214
- *
215
- * The id is looked up in the host's own root rather than the document, so a
216
- * button inside somebody else's shadow root finds a target in that same root
217
- * and not a coincidence in the page.
209
+ * The same asymmetry the listbox relies on for `aria-activedescendant`.
218
210
  */
219
211
  private linkCommand;
220
212
  /**
@@ -228,12 +220,10 @@ export declare class HelixHeadlessButton extends HelixFormElement {
228
220
  /**
229
221
  * Sends the `command` event where the browser will not.
230
222
  *
231
- * Invoker commands are recent, and where they are missing `linkCommand` set a
232
- * property that does not exist and returned, so the button did nothing at all
233
- * when clicked. Silently: the markup was right, the component was right, and
234
- * every `command` in the library was inert at once with no error to find. A
235
- * design system cannot ship an example that depends on a feature failing that
236
- * quietly.
223
+ * Invoker commands are recent, and where they are missing `linkCommand` sets a
224
+ * property that does not exist and returns, so the button does nothing at all
225
+ * when clicked. Silently: the markup is right, the component is right, and
226
+ * every `command` in the library is inert at once with no error to find.
237
227
  *
238
228
  * Only where the platform is absent, so a browser that has invokers sends
239
229
  * exactly one event and this sends none. Doing both would open a dialog and
@@ -54,25 +54,44 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
54
54
  target: () => this.renderRoot?.querySelector('[part="button"]') ?? null,
55
55
  });
56
56
  /**
57
- * What activating the button does to its form.
57
+ * What to send when the button is activated, and what to send it to.
58
+ *
59
+ * The platform's invoker attributes, forwarded onto the inner `<button>`
60
+ * rather than left on the host: only a real button is recognized as an
61
+ * invoker, so `commandfor` written on a custom element resolves nothing and
62
+ * the trigger silently does nothing at all. A wrapper has to hand them down,
63
+ * the same way `label` becomes `aria-label` in there.
64
+ *
65
+ * ```html
66
+ * <helix-button commandfor="confirm" command="--show">Delete…</helix-button>
67
+ * ```
68
+ *
69
+ * `commandFor` spells its attribute out, because Lit lowercases a property
70
+ * name to derive one rather than dash-casing it, and what a consumer writes
71
+ * is the platform's `commandfor`.
72
+ *
73
+ * @reference https://html.spec.whatwg.org/multipage/form-elements.html#attr-button-command Invoker Commands
58
74
  */
59
- this.type = 'button';
75
+ this.command = '';
60
76
  /**
61
- * What this button submits under its own `name`, the way a native submitter does.
77
+ * The id of the element the command is sent to.
62
78
  *
63
- * **Reported for exactly the submission this button starts and not otherwise.**
64
- * A native submit button contributes `name=value` only when it is the one
65
- * that submitted, and every other button on the form contributes nothing. A
66
- * form-associated element reporting a value continuously would contribute on
67
- * every submission whoever started it, which is a different feature wearing
68
- * the same name, so `submit` below sets it, submits, and clears it inside one
69
- * synchronous call.
79
+ * @reference https://html.spec.whatwg.org/multipage/form-elements.html#attr-button-commandfor Invoker Commands
80
+ */
81
+ this.commandFor = '';
82
+ /**
83
+ * Whether the button holds its group's tab stop.
70
84
  *
71
- * `CopyButton` has a `value` of its own meaning the text to put on the
72
- * clipboard, which is not this and is why it is declared there rather than
73
- * inherited.
85
+ * A toolbar keeps one tab stop across its children, and the obvious way to do
86
+ * that is to write `tabindex` onto each of them. That is a change to markup
87
+ * the consumer rendered, so a React consumer's hydration reports it and does
88
+ * not patch it up. A parent sets this property instead, which writes nothing,
89
+ * and the stop lands on the inner control inside the shadow root.
90
+ *
91
+ * No attribute, because it is coordination between elements rather than
92
+ * anything a consumer sets.
74
93
  */
75
- this.value = '';
94
+ this.focusable = true;
76
95
  /**
77
96
  * Where this button's submission goes, overriding the form's own.
78
97
  *
@@ -114,49 +133,21 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
114
133
  * "button" and nothing else.
115
134
  */
116
135
  this.label = '';
117
- /**
118
- * What to send when the button is activated, and what to send it to.
119
- *
120
- * The platform's invoker attributes, forwarded onto the inner `<button>`
121
- * rather than left on the host: only a real button is recognized as an
122
- * invoker, so `commandfor` written on a custom element resolves nothing and
123
- * the trigger silently does nothing at all. A wrapper has to hand them down,
124
- * the same way `label` becomes `aria-label` in there.
125
- *
126
- * ```html
127
- * <helix-button commandfor="confirm" command="--show">Delete…</helix-button>
128
- * ```
129
- *
130
- * `commandFor` spells its attribute out, because Lit lowercases a property
131
- * name to derive one rather than dash-casing it, and what a consumer writes
132
- * is the platform's `commandfor`.
133
- *
134
- * @reference https://html.spec.whatwg.org/multipage/form-elements.html#attr-button-command Invoker Commands
135
- */
136
- this.command = '';
137
- /**
138
- * The id of the element the command is sent to.
139
- *
140
- * @reference https://html.spec.whatwg.org/multipage/form-elements.html#attr-button-commandfor Invoker Commands
141
- */
142
- this.commandFor = '';
143
136
  this.handleClick = () => {
144
137
  /* **Re-linked here, and this is the line that makes a trigger reliable.**
145
138
  *
146
- * `linkCommand` used to run from `updated` alone, so the target was
147
- * resolved once, whenever the button last rendered, and never again. A
148
- * button whose properties do not change does not update again, so one whose
149
- * target had not been inserted yet stayed wired to nothing for good.
150
- * Measured: `commandForElement` read null with the target absent, null
151
- * again after the target was inserted, and resolved the instant an
152
- * unrelated property forced an update. Whether a trigger worked came down
153
- * to insertion order, which is why it survived a full reload and not a
154
- * client navigation, where the same markup arrives in pieces.
139
+ * From `updated` alone the target resolves once, whenever the button last
140
+ * rendered, and never again. A button whose properties do not change does
141
+ * not update again, so one whose target had not been inserted yet stays
142
+ * wired to nothing for good. Measured: `commandForElement` read null with
143
+ * the target absent, null again after the target was inserted, and resolved
144
+ * the instant an unrelated property forced an update. Whether a trigger
145
+ * works then comes down to insertion order, which is why it survives a full
146
+ * reload and not a client navigation, where the same markup arrives in
147
+ * pieces.
155
148
  *
156
- * **The fallback path was the correct one all along**, which is the tell:
157
- * `sendCommand` resolves through `commandTarget` at activation, so a
158
- * browser *without* invokers ran this correctly and a browser with them did
159
- * not.
149
+ * `sendCommand` resolves through `commandTarget` at activation, so a browser
150
+ * *without* invokers was never affected and one with them was.
160
151
  *
161
152
  * A click listener is early enough, and that is measured rather than read
162
153
  * off the specification: activation behavior runs after the click has
@@ -187,18 +178,25 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
187
178
  }
188
179
  };
189
180
  /**
190
- * Whether the button holds its group's tab stop.
181
+ * What activating the button does to its form.
182
+ */
183
+ this.type = 'button';
184
+ /**
185
+ * What this button submits under its own `name`, the way a native submitter does.
191
186
  *
192
- * A toolbar keeps one tab stop across its children, and the obvious way to do
193
- * that is to write `tabindex` onto each of them. That is a change to markup
194
- * the consumer rendered, so a React consumer's hydration reports it and does
195
- * not patch it up. A parent sets this property instead, which writes nothing,
196
- * and the stop lands on the inner control inside the shadow root.
187
+ * **Reported for exactly the submission this button starts and not otherwise.**
188
+ * A native submit button contributes `name=value` only when it is the one
189
+ * that submitted, and every other button on the form contributes nothing. A
190
+ * form-associated element reporting a value continuously would contribute on
191
+ * every submission whoever started it, which is a different feature wearing
192
+ * the same name, so `submit` below sets it, submits, and clears it inside one
193
+ * synchronous call.
197
194
  *
198
- * No attribute, because it is coordination between elements rather than
199
- * anything a consumer sets.
195
+ * `CopyButton` has a `value` of its own meaning the text to put on the
196
+ * clipboard, which is not this and is why it is declared there rather than
197
+ * inherited.
200
198
  */
201
- this.focusable = true;
199
+ this.value = '';
202
200
  }
203
201
  /** Moves focus to the inner control, so the host is never the focus target. */
204
202
  static { this.shadowRootOptions = {
@@ -261,11 +259,11 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
261
259
  /**
262
260
  * The element this button's command is sent to, resolved.
263
261
  *
264
- * The platform's own accessor, and this element had the resolution and kept
265
- * it to itself: `linkCommand` writes the target onto the inner `<button>`,
266
- * where a consumer cannot reach it, and `commandFor` answers with an id
267
- * rather than an element. Writing assigns the inner control directly, which
268
- * is what an invoker without an id in the same tree needs.
262
+ * The platform's own accessor, because the resolution is otherwise kept
263
+ * inside: `linkCommand` writes the target onto the inner `<button>`, where a
264
+ * consumer cannot reach it, and `commandFor` answers with an id rather than
265
+ * an element. Writing assigns the inner control directly, which is what an
266
+ * invoker without an id in the same tree needs.
269
267
  */
270
268
  get commandForElement() {
271
269
  const button = this.renderRoot?.querySelector('button');
@@ -289,13 +287,7 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
289
287
  *
290
288
  * `commandForElement` takes an element instead, and an element reference
291
289
  * resolves outward: a node in a shadow root may point at one in the document.
292
- * The same asymmetry the listbox relies on for `aria-activedescendant`, and
293
- * the second place in this library where the id form is the one that cannot
294
- * work.
295
- *
296
- * The id is looked up in the host's own root rather than the document, so a
297
- * button inside somebody else's shadow root finds a target in that same root
298
- * and not a coincidence in the page.
290
+ * The same asymmetry the listbox relies on for `aria-activedescendant`.
299
291
  */
300
292
  linkCommand() {
301
293
  const button = this.renderRoot?.querySelector('button');
@@ -320,12 +312,10 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
320
312
  /**
321
313
  * Sends the `command` event where the browser will not.
322
314
  *
323
- * Invoker commands are recent, and where they are missing `linkCommand` set a
324
- * property that does not exist and returned, so the button did nothing at all
325
- * when clicked. Silently: the markup was right, the component was right, and
326
- * every `command` in the library was inert at once with no error to find. A
327
- * design system cannot ship an example that depends on a feature failing that
328
- * quietly.
315
+ * Invoker commands are recent, and where they are missing `linkCommand` sets a
316
+ * property that does not exist and returns, so the button does nothing at all
317
+ * when clicked. Silently: the markup is right, the component is right, and
318
+ * every `command` in the library is inert at once with no error to find.
329
319
  *
330
320
  * Only where the platform is absent, so a browser that has invokers sends
331
321
  * exactly one event and this sends none. Doing both would open a dialog and
@@ -361,10 +351,16 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
361
351
  };
362
352
  __decorate([
363
353
  property()
364
- ], HelixHeadlessButton.prototype, "type", void 0);
354
+ ], HelixHeadlessButton.prototype, "command", void 0);
365
355
  __decorate([
366
- property()
367
- ], HelixHeadlessButton.prototype, "value", void 0);
356
+ property({ attribute: 'commandfor' })
357
+ ], HelixHeadlessButton.prototype, "commandFor", void 0);
358
+ __decorate([
359
+ property({ attribute: false })
360
+ ], HelixHeadlessButton.prototype, "expanded", void 0);
361
+ __decorate([
362
+ property({ attribute: false })
363
+ ], HelixHeadlessButton.prototype, "focusable", void 0);
368
364
  __decorate([
369
365
  property({ attribute: 'formaction' })
370
366
  ], HelixHeadlessButton.prototype, "formAction", void 0);
@@ -385,16 +381,10 @@ __decorate([
385
381
  ], HelixHeadlessButton.prototype, "label", void 0);
386
382
  __decorate([
387
383
  property()
388
- ], HelixHeadlessButton.prototype, "command", void 0);
389
- __decorate([
390
- property({ attribute: 'commandfor' })
391
- ], HelixHeadlessButton.prototype, "commandFor", void 0);
392
- __decorate([
393
- property({ attribute: false })
394
- ], HelixHeadlessButton.prototype, "focusable", void 0);
384
+ ], HelixHeadlessButton.prototype, "type", void 0);
395
385
  __decorate([
396
- property({ attribute: false })
397
- ], HelixHeadlessButton.prototype, "expanded", void 0);
386
+ property()
387
+ ], HelixHeadlessButton.prototype, "value", void 0);
398
388
  HelixHeadlessButton = __decorate([
399
389
  customElement('helix-headless-button')
400
390
  ], HelixHeadlessButton);
@@ -39,11 +39,10 @@ export declare class HelixHeadlessCallout extends HelixElement {
39
39
  /**
40
40
  * What kind of attention the passage needs.
41
41
  *
42
- * **`severity` was a sixth spelling of `tone`**, which is the axis for what a
43
- * thing means, and a subset of it: a callout reports a status and never a
44
- * brand role, so it takes four of the seven. One word per axis is the whole
45
- * of the registry, and two words for one axis is how `tone` had drifted into
46
- * five incompatible value sets before anything held it.
42
+ * `tone` is the axis for what a thing means, and this is a subset of it: a
43
+ * callout reports a status and never a brand role, so it takes four of the
44
+ * seven values. One word per axis is the whole of the registry, which is why
45
+ * there is no `severity` beside it.
47
46
  */
48
47
  tone?: 'danger' | 'info' | 'success' | 'warning';
49
48
  /**