@fusion.dev/helix-headless 0.104.1 → 0.106.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/custom-elements.json +10386 -3813
  2. package/dist/accordion/item/accordion-item.d.ts +17 -16
  3. package/dist/accordion/root/accordion-root.d.ts +13 -17
  4. package/dist/announcement/root/announcement-root.d.ts +24 -31
  5. package/dist/app-header/root/app-header-root.d.ts +14 -14
  6. package/dist/area-chart/root/area-chart-root.d.ts +29 -48
  7. package/dist/avatar/group/avatar-group.d.ts +6 -8
  8. package/dist/avatar/root/avatar-root.d.ts +11 -11
  9. package/dist/badge/root/badge-root.d.ts +14 -15
  10. package/dist/bar-chart/root/bar-chart-root.d.ts +40 -44
  11. package/dist/blockquote/root/blockquote-root.d.ts +5 -7
  12. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +25 -33
  13. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +12 -11
  14. package/dist/button/root/button-root.d.ts +16 -17
  15. package/dist/button-group/root/button-group-root.d.ts +9 -10
  16. package/dist/callout/root/callout-root.d.ts +10 -15
  17. package/dist/canvas/edge/canvas-edge.d.ts +21 -21
  18. package/dist/canvas/node/canvas-node.d.ts +43 -45
  19. package/dist/canvas/root/canvas-root.d.ts +100 -99
  20. package/dist/card/root/card-root.d.ts +10 -12
  21. package/dist/carousel/root/carousel-root.d.ts +32 -33
  22. package/dist/chat/composer/chat-composer.d.ts +24 -26
  23. package/dist/chat/message/chat-message.d.ts +30 -33
  24. package/dist/chat/root/chat-root.d.ts +63 -80
  25. package/dist/checkbox/root/checkbox-root.d.ts +30 -32
  26. package/dist/checkbox-group/root/checkbox-group-root.d.ts +25 -25
  27. package/dist/code/root/code-root.d.ts +6 -10
  28. package/dist/code-block/root/code-block-root.d.ts +35 -48
  29. package/dist/color-input/root/color-input-root.d.ts +62 -56
  30. package/dist/color-input/root/color-input-root.js +3 -0
  31. package/dist/color-picker/root/color-picker-root.d.ts +61 -49
  32. package/dist/color-picker/root/color-picker-root.js +4 -0
  33. package/dist/combobox/root/combobox-root.d.ts +52 -53
  34. package/dist/command/root/command-root.d.ts +40 -40
  35. package/dist/command/root/command-root.js +1 -0
  36. package/dist/copy-button/root/copy-button-root.d.ts +24 -26
  37. package/dist/data-table/root/data-table-root.d.ts +106 -107
  38. package/dist/date-input/root/date-input-root.d.ts +54 -53
  39. package/dist/date-picker/root/date-picker-root.d.ts +25 -21
  40. package/dist/description-list/item/description-list-item.d.ts +7 -7
  41. package/dist/description-list/root/description-list-root.d.ts +10 -15
  42. package/dist/dialog/root/dialog-root.d.ts +22 -19
  43. package/dist/divider/root/divider-root.d.ts +12 -13
  44. package/dist/donut-chart/root/donut-chart-root.d.ts +19 -20
  45. package/dist/drawer/root/drawer-root.d.ts +19 -18
  46. package/dist/drilldown/item/drilldown-item.d.ts +28 -28
  47. package/dist/drilldown/root/drilldown-root.d.ts +22 -28
  48. package/dist/element-events.generated.js +19 -1
  49. package/dist/empty/root/empty-root.d.ts +16 -19
  50. package/dist/file-input/root/file-input-root.d.ts +32 -32
  51. package/dist/filter-input/chip/filter-chip.d.ts +36 -39
  52. package/dist/filter-input/field/filter-field.d.ts +25 -31
  53. package/dist/filter-input/menu/filter-menu.d.ts +50 -47
  54. package/dist/filter-input/operator/filter-operator.d.ts +15 -20
  55. package/dist/filter-input/root/filter-input-root.d.ts +80 -98
  56. package/dist/format-date/root/format-date-root.d.ts +19 -27
  57. package/dist/heatmap/root/heatmap-root.d.ts +40 -41
  58. package/dist/icon/root/icon-root.d.ts +21 -23
  59. package/dist/icon-button/root/icon-button-root.d.ts +12 -14
  60. package/dist/image/root/image-root.d.ts +30 -30
  61. package/dist/input/root/input-root.d.ts +36 -35
  62. package/dist/kbd/root/kbd-root.d.ts +13 -15
  63. package/dist/legend/root/legend-root.d.ts +18 -16
  64. package/dist/lightbox/item/lightbox-item.d.ts +13 -15
  65. package/dist/lightbox/root/lightbox-root.d.ts +40 -41
  66. package/dist/line-chart/root/line-chart-root.d.ts +20 -29
  67. package/dist/list/item/list-item.d.ts +17 -22
  68. package/dist/list/root/list-root.d.ts +6 -7
  69. package/dist/listbox/root/listbox-root.d.ts +42 -41
  70. package/dist/loader/root/loader-root.d.ts +16 -20
  71. package/dist/map/area/map-area.d.ts +48 -0
  72. package/dist/map/area/map-area.js +40 -0
  73. package/dist/map/buildings/map-buildings.d.ts +45 -0
  74. package/dist/map/buildings/map-buildings.js +37 -0
  75. package/dist/map/contours/map-contours.d.ts +61 -0
  76. package/dist/map/contours/map-contours.js +54 -0
  77. package/dist/map/index.d.ts +14 -0
  78. package/dist/map/index.js +10 -0
  79. package/dist/map/landcover/map-landcover.d.ts +47 -0
  80. package/dist/map/landcover/map-landcover.js +37 -0
  81. package/dist/map/marker/map-marker.d.ts +120 -0
  82. package/dist/map/marker/map-marker.js +109 -0
  83. package/dist/map/points/map-points.d.ts +139 -0
  84. package/dist/map/points/map-points.js +161 -0
  85. package/dist/map/position/map-position.d.ts +70 -0
  86. package/dist/map/position/map-position.js +89 -0
  87. package/dist/map/raster/map-raster.d.ts +84 -0
  88. package/dist/map/raster/map-raster.js +96 -0
  89. package/dist/map/root/map-root.d.ts +269 -52
  90. package/dist/map/root/map-root.js +473 -5
  91. package/dist/map/route/map-route.d.ts +73 -0
  92. package/dist/map/route/map-route.js +52 -0
  93. package/dist/map/terrain/map-terrain.d.ts +68 -0
  94. package/dist/map/terrain/map-terrain.js +58 -0
  95. package/dist/megamenu/root/megamenu-root.d.ts +27 -25
  96. package/dist/menu/item/menu-item.d.ts +30 -31
  97. package/dist/menu/root/menu-root.d.ts +25 -29
  98. package/dist/meter/root/meter-root.d.ts +22 -21
  99. package/dist/navigation/root/navigation-root.d.ts +13 -16
  100. package/dist/notifications/group/notification-group.d.ts +27 -28
  101. package/dist/notifications/notification/notification.d.ts +35 -42
  102. package/dist/notifications/root/notifications-root.d.ts +22 -24
  103. package/dist/number-input/root/number-input-root.d.ts +46 -50
  104. package/dist/object-inspector/root/object-inspector-root.d.ts +46 -58
  105. package/dist/option/group/option-group.d.ts +11 -11
  106. package/dist/option/root/option-root.d.ts +28 -33
  107. package/dist/outline/root/outline-root.d.ts +18 -17
  108. package/dist/pagination/root/pagination-root.d.ts +37 -39
  109. package/dist/pagination/size/pagination-size.d.ts +37 -43
  110. package/dist/pagination/summary/pagination-summary.d.ts +12 -14
  111. package/dist/pin-input/root/pin-input-root.d.ts +32 -38
  112. package/dist/popover/root/popover-root.d.ts +16 -21
  113. package/dist/progress/root/progress-root.d.ts +16 -14
  114. package/dist/qr-code/root/qr-code-root.d.ts +22 -25
  115. package/dist/quote/root/quote-root.d.ts +5 -6
  116. package/dist/radio/group/radio-group.d.ts +26 -28
  117. package/dist/radio/root/radio-root.d.ts +24 -28
  118. package/dist/rating/root/rating-root.d.ts +27 -30
  119. package/dist/scatter-chart/root/scatter-chart-root.d.ts +43 -55
  120. package/dist/scroll-area/root/scroll-area-root.d.ts +15 -21
  121. package/dist/select/root/select-root.d.ts +41 -44
  122. package/dist/skeleton/root/skeleton-root.d.ts +7 -8
  123. package/dist/skip-link/root/skip-link-root.d.ts +21 -28
  124. package/dist/slider/root/slider-root.d.ts +36 -39
  125. package/dist/sparkline/root/sparkline-root.d.ts +22 -28
  126. package/dist/speed-dial/item/speed-dial-item.d.ts +21 -21
  127. package/dist/speed-dial/root/speed-dial-root.d.ts +25 -27
  128. package/dist/splitter/root/splitter-root.d.ts +37 -41
  129. package/dist/stat/group/stat-group.d.ts +4 -4
  130. package/dist/stat/root/stat-root.d.ts +8 -9
  131. package/dist/steps/root/steps-root.d.ts +11 -14
  132. package/dist/steps/step/step.d.ts +22 -29
  133. package/dist/switch/root/switch-root.d.ts +20 -24
  134. package/dist/table/cell/table-cell.d.ts +18 -8
  135. package/dist/table/cell/table-cell.js +5 -1
  136. package/dist/table/column/table-column.d.ts +62 -55
  137. package/dist/table/root/table-root.d.ts +16 -17
  138. package/dist/table/row/table-row.d.ts +3 -3
  139. package/dist/tabs/panel/tab-panel.d.ts +3 -3
  140. package/dist/tabs/root/tabs-root.d.ts +19 -17
  141. package/dist/tabs/tab/tab.d.ts +6 -6
  142. package/dist/tag/root/tag-root.d.ts +11 -12
  143. package/dist/textarea/root/textarea-root.d.ts +29 -32
  144. package/dist/time-input/root/time-input-root.d.ts +70 -69
  145. package/dist/time-picker/root/time-picker-root.d.ts +58 -66
  146. package/dist/timeline/item/timeline-item.d.ts +18 -24
  147. package/dist/timeline/root/timeline-root.d.ts +13 -21
  148. package/dist/toast/item/toast-item.d.ts +21 -22
  149. package/dist/toast/root/toast-root.d.ts +18 -23
  150. package/dist/toggle/group/toggle-group.d.ts +23 -25
  151. package/dist/toggle/root/toggle-root.d.ts +8 -8
  152. package/dist/toolbar/root/toolbar-root.d.ts +7 -10
  153. package/dist/tooltip/root/tooltip-root.d.ts +41 -47
  154. package/dist/tour/root/tour-root.d.ts +24 -26
  155. package/dist/tour/stop/tour-stop.d.ts +39 -48
  156. package/dist/tree/item/tree-item.d.ts +23 -25
  157. package/dist/tree/root/tree-root.d.ts +13 -12
  158. package/dist/trend/root/trend-root.d.ts +18 -19
  159. package/dist/video/root/video-root.d.ts +108 -101
  160. package/dist/video-playlist/item/video-playlist-item.d.ts +23 -28
  161. package/dist/video-playlist/menu/video-playlist-menu.d.ts +17 -21
  162. package/dist/video-playlist/root/video-playlist-root.d.ts +21 -25
  163. package/dist/virtual-list/root/virtual-list-root.d.ts +27 -26
  164. package/package.json +5 -5
  165. package/types/jsx.d.ts +14011 -11983
  166. package/types/svelte.d.ts +10 -0
  167. package/types/vue.d.ts +2143 -1497
@@ -1,38 +1,32 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary Two panes and a divider the reader can move.
4
+ * @summary Two panes and a divider that you can move.
5
5
  *
6
6
  * @description
7
- * **One axis, and nesting is how you get two.** A splitter inside a splitter
8
- * gives back the cross, and gives the three-pane and four-pane arrangements a
9
- * single divider never had.
7
+ * A splitter has one axis. Nest splitters to get two axes and three-pane or
8
+ * four-pane layouts.
10
9
  *
11
- * **Where two of them cross there is a corner, and it moves both.** A splitter
12
- * slotted into a pane of another, at right angles to it, grows a handle at the
13
- * crossing: `move` under the pointer, both arrow axes on the keyboard, and a
14
- * drag that carries the two positions at once. It appears at `firstUpdated`
15
- * rather than in the served markup, being an affordance rather than content,
16
- * and a splitter with no corner yet is a splitter with two working dividers.
10
+ * When a splitter is slotted into a pane of another at a right angle, a corner
11
+ * handle appears where the dividers cross. It shows the `move` cursor, responds
12
+ * to both arrow axes, and a drag moves both dividers at once. The corner is
13
+ * added at `firstUpdated` and is not in the server markup. Before it appears,
14
+ * both dividers work on their own.
17
15
  *
18
- * **The divider is a real `role="separator"` with `aria-valuenow`**, moved by
19
- * the arrow keys as well as by pointer, with `Home` and `End` taking it to its
20
- * bounds. A drag in progress is a state rather than `:hover`, so both dividers
21
- * a corner moves are lit for as long as it moves them.
16
+ * The divider has `role="separator"` and `aria-valuenow`. Drag it with a
17
+ * pointer or move it with the arrow keys, and press `Home` or `End` to move it
18
+ * to its bounds. A drag in progress is tracked as a state, so both dividers a
19
+ * corner moves stay lit for as long as they move.
22
20
  *
23
- * **It goes where it is put, all the way to either end.** `min` and `max` are
24
- * nothing and everything unless a consumer says otherwise, because a divider
25
- * that stops short of the edge gives a reader no way to put a pane away.
21
+ * By default, `min` and `max` let the divider reach either edge, so you can
22
+ * drag a pane fully closed. Set them to limit the range.
26
23
  *
27
- * **A pane can be shut, and that is not the same as a divider at the edge.**
28
- * The geometry is identical and the knowledge is not: only a shut pane knows
29
- * where to open back to. So `collapsed` is a second state rather than a reading
30
- * of the position, and the position it opens to is where the gesture that shut
31
- * it began, whichever gesture that was: a drag takes its reading on the press,
32
- * and every other door takes it in `settle`, nothing having been applied there
33
- * yet. `collapsed-size` keeps a sliver showing where a pane has a tab strip
34
- * worth leaving, and collapse overrides `min` and `max`, which is what those
35
- * are for.
24
+ * A pane can be collapsed, which is a separate state from a divider at the
25
+ * edge. `collapsed` names the shut pane, `start` or `end`, and the pane opens
26
+ * back to the position where the collapsing gesture began. A drag records that position
27
+ * on press, and every other way of collapsing records it in `settle`.
28
+ * `collapsed-size` keeps a sliver of the pane visible, such as a tab strip.
29
+ * Collapsing overrides `min` and `max`.
36
30
  *
37
31
  * @since 0.1.0
38
32
  * @status stable
@@ -40,16 +34,16 @@ import { type PropertyValues, type TemplateResult } from 'lit';
40
34
  * @aliases SplitPane, Resizable, SplitView
41
35
  * @documentation https://fusion.dev/helix/components/splitter
42
36
  *
43
- * @slot end - The pane after it.
37
+ * @slot end - The pane after the divider.
44
38
  * @slot start - The pane before the divider.
45
39
  *
46
- * @event {HelixBeforeCollapseEvent} helix-before-collapse - Fired before a pane shuts or reopens, whether or not the resize that reached it was allowed, and carrying its own position: a shut pane sits at `collapsed-size` rather than at the number the resize named. Cancelable: refusing it leaves the pane as it was and the divider where the gesture put it.
47
- * @event {HelixBeforeResizeEvent} helix-before-resize - Fired before the divider settles, and only where the gesture moved it: a press that moved nothing, a drag that came back, an arrow with nowhere left to go and a corner that moved the other divider are all silent on this one. Cancelable: refusing it takes the position and leaves the rest of the gesture, so a collapse the gesture reached is still announced and still yours to refuse. A drag has already drawn itself by then and holds where it was dropped until the consumer assigns their own.
40
+ * @event {HelixBeforeCollapseEvent} helix-before-collapse - Fired before a pane shuts or reopens, whether or not the resize that caused it was allowed. It carries its own position, because a shut pane sits at `collapsed-size`. Cancelable: canceling it leaves the pane as it was and the divider where the gesture put it.
41
+ * @event {HelixBeforeResizeEvent} helix-before-resize - Fired before the divider settles, and only when the gesture moved it. A press that moved nothing, a drag that came back, an arrow key with no room left, and a corner that moved only the other divider do not fire it. Cancelable: canceling it leaves the position to you and keeps the rest of the gesture, so a collapse the gesture reached still fires `helix-before-collapse`, which you can also cancel. A dragged divider stays where it was dropped until you set your own `position`.
48
42
  *
49
43
  * @csspart corner - The handle where two dividers cross, added on the client.
50
- * @csspart end - The box holding the second.
44
+ * @csspart end - The box that holds the second pane.
51
45
  * @csspart separator - The divider itself.
52
- * @csspart start - The box holding the first pane.
46
+ * @csspart start - The box that holds the first pane.
53
47
  *
54
48
  * @cssproperty --splitter-corner-at - Where a nested splitter crosses this one, as a percentage.
55
49
  * @cssproperty --splitter-position - Where the divider sits, as a percentage of the box.
@@ -71,7 +65,7 @@ export declare class HelixHeadlessSplitter extends HelixElement {
71
65
  get collapsed(): 'end' | 'start' | undefined;
72
66
  set collapsed(next: 'end' | 'start' | undefined);
73
67
  /**
74
- * What the divider says while a pane is shut, in place of a number.
68
+ * The divider's value while a pane is shut, as text in place of a number.
75
69
  *
76
70
  * **A shut pane is off the scale the divider reports**, which is `min` to
77
71
  * `max`, the sliver a drag keeps. The divider said a value outside its own
@@ -89,27 +83,27 @@ export declare class HelixHeadlessSplitter extends HelixElement {
89
83
  */
90
84
  collapsedSize: number;
91
85
  /**
92
- * Accessible name for the handle where two dividers cross.
86
+ * The name of the handle where two dividers cross, read by screen readers.
93
87
  */
94
88
  cornerLabel: string;
95
89
  /**
96
- * Which pane starts shut, where nothing declared it.
90
+ * Which pane starts shut, when `collapsed` is not set.
97
91
  */
98
92
  defaultCollapsed?: 'end' | 'start';
99
93
  /**
100
- * Where the divider starts, where nothing declared it.
94
+ * Where the divider starts, when `position` is not set.
101
95
  */
102
96
  defaultPosition: number;
103
97
  /**
104
- * Accessible name for the divider.
98
+ * The divider's name, read by screen readers.
105
99
  */
106
100
  label: string;
107
101
  /**
108
- * Nearest it may come to the end, on the same terms as `min`.
102
+ * How close the divider can come to the end, in the same units as `min`.
109
103
  */
110
104
  max: number | string;
111
105
  /**
112
- * Nearest the divider may come to the start.
106
+ * How close the divider can come to the start.
113
107
  *
114
108
  * A bare number is a percentage, which is what this always took. A CSS length
115
109
  * is resolved against the splitter's own box along its axis, so `min="15rem"`
@@ -178,7 +172,7 @@ export declare class HelixHeadlessSplitter extends HelixElement {
178
172
  get position(): number;
179
173
  set position(next: number);
180
174
  /**
181
- * How far one arrow press moves it, as a percentage.
175
+ * How far one arrow key press moves the divider, as a percentage.
182
176
  */
183
177
  step: number;
184
178
  /** The position, whoever set it, and `undefined` until somebody has. */
@@ -270,7 +264,8 @@ export declare class HelixHeadlessSplitter extends HelixElement {
270
264
  */
271
265
  private origin;
272
266
  /**
273
- * Moves the divider, and optionally says so.
267
+ * Moves the divider. With `settled` set, it also fires the events for a
268
+ * finished move.
274
269
  *
275
270
  * Public because a corner on a nested splitter has to drive the one it is
276
271
  * nested in, and that is the whole of what it needs: the pair are not
@@ -322,7 +317,8 @@ export declare class HelixHeadlessSplitter extends HelixElement {
322
317
  */
323
318
  private watchWidth;
324
319
  /**
325
- * Public because a nested splitter compares axes with the one it is in.
320
+ * Whether the panes are stacked. Public because a nested splitter compares
321
+ * its axis with the one it is in.
326
322
  *
327
323
  * The one place the axis is decided, which is why `auto` costs a single line
328
324
  * here rather than a pass over seventeen readers: the drag, the arrow keys and
@@ -4,9 +4,9 @@ import { type PropertyValues, type TemplateResult } from 'lit';
4
4
  * @summary A row of related measurements.
5
5
  *
6
6
  * @description
7
- * A group rather than a list, because the figures are read together and their
8
- * order carries no meaning: a list would announce "1 of 4" for a set where the
9
- * position is not information.
7
+ * Screen readers announce the stats as a group. The figures are read together
8
+ * and their order has no meaning, so the group does not announce positions such
9
+ * as "1 of 4".
10
10
  *
11
11
  * @since 0.1.0
12
12
  * @status stable
@@ -17,7 +17,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
17
17
  */
18
18
  export declare class HelixHeadlessStatGroup extends HelixElement {
19
19
  /**
20
- * Accessible name for the set.
20
+ * Accessible name for the group.
21
21
  */
22
22
  label: string;
23
23
  protected willUpdate(changed: PropertyValues): void;
@@ -1,17 +1,16 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary One measurement, with the word for what it measures.
4
+ * @summary One measurement, with a label that names what it measures.
5
5
  *
6
6
  * @description
7
- * Label first in the markup and the value after it, which is the reading order
8
- * a screen reader takes and the order a caption sits above a figure. The eye
9
- * lands on the number either way, because the number is the loud thing; a
10
- * reader hearing it needs to know what it counts before hearing how many.
7
+ * The label comes first in the markup and the value after it, so a screen
8
+ * reader reads what the figure counts before the number. Visually, the number
9
+ * stands out either way.
11
10
  *
12
- * Both are bare slots. An element whose only job is to assign itself a slot on
13
- * connect gives its own host an attribute after upgrade, which a React
14
- * consumer's server markup never had.
11
+ * Both are bare slots. An element that assigned itself a slot on connect would
12
+ * add an attribute after upgrade, which markup rendered on the server by React
13
+ * does not have.
15
14
  *
16
15
  * @since 0.1.0
17
16
  * @status stable
@@ -21,7 +20,7 @@ import { type TemplateResult } from 'lit';
21
20
  *
22
21
  * @slot - The value.
23
22
  * @slot label - What the value measures.
24
- * @slot unit - The unit, set beside the value.
23
+ * @slot unit - The unit, shown beside the value.
25
24
  */
26
25
  export declare class HelixHeadlessStat extends HelixElement {
27
26
  /**
@@ -2,19 +2,16 @@ import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  declare const HelixHeadlessSteps_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerActiveInterface) & typeof HelixElement;
4
4
  /**
5
- * @summary A sequence of stages, and where the reader is in it.
5
+ * @summary A sequence of stages that shows which stage the user is on.
6
6
  *
7
7
  * @description
8
- * **`active` names where the reader is. `complete` stays on each step.** Only
9
- * one of them is positional: return to stage one of three and stages one and
10
- * two are still finished, where "everything before the active one" says only
11
- * the first is. So this element drives `current` and never touches `complete`.
8
+ * `active` sets where the user is, and `complete` stays on each step. Returning
9
+ * to stage one of three leaves stages one and two finished, so the root sets
10
+ * `current` on the steps and never changes `complete`.
12
11
  *
13
- * **`active` is optional, and a sequence without it still renders.** Left
14
- * unset, each step's own `current` stands, which is what lets the whole
15
- * sequence be right in the server's markup: this element would have to count
16
- * its slotted children to know which is third, and the server has none to
17
- * count.
12
+ * `active` is optional. Without it, each step keeps its own `current`, so the
13
+ * sequence is correct in the server's markup, where the root cannot count its
14
+ * slotted children.
18
15
  *
19
16
  * @since 0.1.0
20
17
  * @status stable
@@ -24,13 +21,13 @@ declare const HelixHeadlessSteps_base: (new (...args: any[]) => import("@fusion.
24
21
  *
25
22
  * @slot - The steps.
26
23
  *
27
- * @event {HelixActivateEvent} helix-activate - Fired once the current one has moved, so the element already holds it.
28
- * @event {HelixBeforeActivateEvent} helix-before-activate - Fired before the active step changes. Cancelable: refusing it takes the decision and nothing moves.
29
- * @event {HelixSelectEvent} helix-select - Fired when a step is pressed. Dispatched by the step and listened for here, because the root is what a consumer holds. Cancelable: refusing it takes the decision and nothing moves.
24
+ * @event {HelixActivateEvent} helix-activate - Fired after the current step changes, when the element already holds the new step.
25
+ * @event {HelixBeforeActivateEvent} helix-before-activate - Fired before the active step changes. Cancelable: cancel it to keep the current step.
26
+ * @event {HelixSelectEvent} helix-select - Fired when a step is pressed. The step dispatches it, and you can listen for it on the sequence. Cancelable: cancel it to keep the current step.
30
27
  */
31
28
  export declare class HelixHeadlessSteps extends HelixHeadlessSteps_base {
32
29
  /**
33
- * Accessible name for the sequence.
30
+ * The sequence's name, read by screen readers.
34
31
  *
35
32
  * A list of stages is a landmark a reader arrives at out of order, so it
36
33
  * needs a name of its own rather than borrowing the heading above it.
@@ -5,28 +5,21 @@ import '../../button/index.js';
5
5
  * @summary One stage in a sequence.
6
6
  *
7
7
  * @description
8
- * **The name is a button, and only the name.** The marker is `aria-hidden`
9
- * decoration, so wrapping it would add hit area and no meaning. It is `Button`
10
- * rather than a `<button>` this element resets: the hover wash, the focus ring
11
- * and the disabled treatment are decisions the button carries.
8
+ * Only the step's name is a button. The marker is `aria-hidden` decoration, so
9
+ * it is outside the button. The name uses `Button`, so the hover wash, the
10
+ * focus ring, and the disabled style come from `Button`.
12
11
  *
13
- * **It says nothing about where a reader may go.** Every step is pressable and
14
- * announces itself with `helix-select`; refusing the ones ahead is `disabled`,
15
- * which the consumer sets, because only they know whether a form can be
16
- * skipped.
12
+ * Every step can be pressed and fires `helix-select`. To stop the user from
13
+ * moving to a step, set `disabled` on it.
17
14
  *
18
- * **The marker is a slot whose fallback is the state.** A finished stage shows
19
- * a check, the current one a target, one not yet reached an empty ring. Exactly
20
- * one is rendered, chosen from the step's own two booleans, rather than three
21
- * with two hidden in CSS: the accessibility tree would otherwise carry marks
22
- * that are not there.
15
+ * The marker is a slot, and its fallback shows the step's state: a check for a
16
+ * finished stage, a target for the current stage, and an empty ring for a stage
17
+ * not reached yet. Only that one mark is rendered, so the accessibility tree
18
+ * has no hidden marks.
23
19
  *
24
- * **The two half lines either side of the mark are a sheet's, on `::before` and
25
- * `::after` of the step.** Both are placed entirely from properties the list
26
- * hands down, so there was nothing about them for a box to carry, and this tier
27
- * ships no CSS: a box it rendered for one to paint would be an empty child
28
- * costing whatever the consumer's own layout charges for a child. `ListItem`
29
- * measured that.
20
+ * The half lines on each side of the mark are drawn on the step's `::before`
21
+ * and `::after` from properties the list sets, so the step renders no extra
22
+ * element for them.
30
23
  *
31
24
  * @since 0.1.0
32
25
  * @status stable
@@ -34,38 +27,38 @@ import '../../button/index.js';
34
27
  * @documentation https://fusion.dev/helix/components/steps
35
28
  *
36
29
  * @slot - The step's name.
37
- * @slot content - What the stage holds. Always rendered here, a tier with no stylesheet having nothing to fold it with, so whether it is folded away is the sheet's answer and not this tier's.
38
- * @slot description - A line under the name, for what the stage is for.
30
+ * @slot content - The stage's content. The headless tier always renders it, because it has no stylesheet to collapse it with. Your stylesheet decides whether it is collapsed.
31
+ * @slot description - A line under the name that describes the stage.
39
32
  * @slot marker - Replaces the number, or the check a complete step shows.
40
33
  *
41
- * @event {HelixSelectEvent} helix-select - Fired when the step is pressed. Cancelable: refusing it takes the decision and nothing moves.
34
+ * @event {HelixSelectEvent} helix-select - Fired when the step is pressed. Cancelable: cancel it to keep the current step.
42
35
  *
43
36
  * @csspart body - The name and its description.
44
37
  * @csspart content - What the stage holds, while it is open.
45
- * @csspart description - The line under it.
38
+ * @csspart description - The line under the name.
46
39
  * @csspart label - The step's name, which is a control.
47
- * @csspart label-button - The inner control.
40
+ * @csspart label-button - The button inside the label.
48
41
  * @csspart mark - The glyph inside the marker: a tick, a dot, or an empty ring.
49
42
  * @csspart marker - The shape carrying the number or the check.
50
43
  */
51
44
  export declare class HelixHeadlessStep extends HelixElement {
52
45
  /**
53
- * Whether the reader has finished this stage.
46
+ * Whether this stage is finished.
54
47
  */
55
48
  complete: boolean;
56
49
  /**
57
- * Whether this is the stage the reader is in.
50
+ * Whether this is the current stage.
58
51
  */
59
52
  current: boolean;
60
53
  /**
61
- * Whether the reader may go to this stage.
54
+ * Whether the stage is disabled, so the user cannot go to it.
62
55
  */
63
56
  disabled: boolean;
64
57
  /**
65
- * What this stage is called when it announces itself.
58
+ * The value the step sends in `helix-select`.
66
59
  */
67
60
  value: string;
68
- /** Announces the step, unless it is refusing. */
61
+ /** Fires `helix-select` for the step, unless the step is `disabled`. */
69
62
  select(): void;
70
63
  /**
71
64
  * The mark this stage's state calls for.
@@ -5,21 +5,18 @@ declare const HelixHeadlessSwitch_base: (new (...args: any[]) => import("@fusion
5
5
  * @summary A control that turns something on or off.
6
6
  *
7
7
  * @description
8
- * **A switch is not a checkbox with a different shape.** A checkbox is an
9
- * answer to a question the form asks when it is submitted; a switch is a thing
10
- * happening now. That is why `role="switch"` exists and why a switch belongs
11
- * outside a form as often as in one: it says "on" and "off" rather than
12
- * "ticked" and "unticked", and a reader expects the effect immediately rather
13
- * than on Save.
8
+ * A switch turns something on or off right away, and a checkbox is an answer
9
+ * the form submits later. A screen reader announces `role="switch"` as "on" or
10
+ * "off", and people expect the change to take effect immediately. A switch is
11
+ * as common outside a form as inside one.
14
12
  *
15
- * Rendered as a real `<input type="checkbox">` carrying `role="switch"`, which
16
- * is the pairing ARIA describes: the input is what a form submits and what a
17
- * label forwards a press to, and the role is what a screen reader announces.
18
- * Neither half can be got from the other.
13
+ * It renders a real `<input type="checkbox">` with `role="switch"`, the pairing
14
+ * ARIA describes. The input is what a form submits and what a label forwards a
15
+ * press to, and the role is what a screen reader announces.
19
16
  *
20
- * The label sits beside it, inside the `<label>` that forwards the press, the
21
- * way a checkbox's does. The hint and the message go under the row, because
22
- * there is no above: the switch and the words naming it are one line.
17
+ * The label sits beside the switch, inside the `<label>` that forwards the
18
+ * press, the same as a checkbox. The hint and the message go below the row,
19
+ * because the switch and its label share one line.
23
20
  *
24
21
  * @since 0.1.0
25
22
  * @status stable
@@ -27,25 +24,24 @@ declare const HelixHeadlessSwitch_base: (new (...args: any[]) => import("@fusion
27
24
  * @aliases Toggle switch, On/off
28
25
  * @documentation https://fusion.dev/helix/components/switch
29
26
  *
30
- * @slot - The words naming what this turns on.
27
+ * @slot - The label that names what the switch turns on.
31
28
  *
32
- * @event {Event} change - Relayed from the input once the state has changed.
29
+ * @event {Event} change - Sent from the input after the state changes.
33
30
  * @event {HelixBeforeToggleEvent} helix-before-toggle - Fired before the state changes, and cancelable.
34
- * @event {Event} input - Announced once the state has moved.
31
+ * @event {Event} input - Sent after the state changes.
35
32
  *
36
33
  * @csspart control - The input.
37
- * @csspart feedback - What is wrong with it.
34
+ * @csspart feedback - The message that says what is wrong.
38
35
  * @csspart field - The row: the track and its label.
39
36
  * @csspart hint - Help under the control, while nothing is wrong.
40
- * @csspart label - The words beside it.
41
- * @csspart track - The groove. The thumb that travels in it is drawn on the
42
- * groove itself, which is `::part(track)::after` from a consumer's sheet: this
43
- * tier ships no CSS, so a box it renders for one to paint is an empty child
44
- * costing whatever the consumer's own layout charges for a child. `ListItem`
45
- * measured that.
37
+ * @csspart label - The label beside the track.
38
+ * @csspart track - The track. Draw the thumb on the track itself, with
39
+ * `::part(track)::after` in your stylesheet. This tier ships no CSS, so it
40
+ * renders no separate thumb element, which would be an empty child that costs
41
+ * your layout as much as any other child. `ListItem` measured that cost.
46
42
  *
47
43
  * @cssstate checked - While it is on.
48
- * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
44
+ * @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
49
45
  */
50
46
  export declare class HelixHeadlessSwitch extends HelixHeadlessSwitch_base {
51
47
  protected readonly aria: AriaForwardController;
@@ -4,13 +4,13 @@ import { type PropertyValues, type TemplateResult } from 'lit';
4
4
  * @summary One cell of a table.
5
5
  *
6
6
  * @description
7
- * Carries its own role, because a grid of divs is not a table to anything
8
- * reading it. `header` makes the cell a `columnheader`, which is what lets a
9
- * screen reader announce "Attribute, appearance" rather than just the value.
7
+ * Sets its own role, because a grid of elements has no table structure for
8
+ * assistive technology otherwise. `header` makes the cell a `columnheader`, so
9
+ * a screen reader announces the heading with the value, for example "Attribute,
10
+ * appearance".
10
11
  *
11
- * The role goes on the host rather than inside the shadow root, because the
12
- * cell has to be a child of its row in the flat tree for the table's structure
13
- * to hold together.
12
+ * The role is on the host so the cell stays a child of its row in the flat
13
+ * tree, which keeps the table structure intact.
14
14
  *
15
15
  * @since 0.1.0
16
16
  * @status stable
@@ -19,14 +19,24 @@ import { type PropertyValues, type TemplateResult } from 'lit';
19
19
  *
20
20
  * @slot - The cell's content.
21
21
  *
22
- * @cssproperty --table-cell-align - The edge the column this cell sits under is set to, `start`, `center` or `end`, and unset under a column that sets none. Written by the table around it, since the cell is the consumer's markup and nothing is written onto it; read by the sheet that draws the cell, where `justify-content` and `text-align` both take it as it comes and both follow the writing direction.
22
+ * @cssproperty --table-cell-align - The text alignment of the column above the cell: `start`, `center`, or `end`, and unset when the column sets none. The table writes it, and the stylesheet that draws the cell reads it for `justify-content` and `text-align`, which both follow the writing direction.
23
+ *
24
+ * @cssstate text - The cell holds text of its own, beside or instead of elements, so the stylesheet lets its content flow as a line of text.
23
25
  */
24
26
  export declare class HelixHeadlessTableCell extends HelixElement {
25
27
  /**
26
- * Whether the cell heads its column.
28
+ * Whether the cell is the header cell of its column.
27
29
  */
28
30
  header: boolean;
29
31
  protected willUpdate(changed: PropertyValues): void;
32
+ /**
33
+ * Sets the `text` state from the cell's own content.
34
+ *
35
+ * Only text nodes count, and only ones with more than whitespace. A cell of
36
+ * elements alone keeps its elements laid out as they were, which is what a
37
+ * lone tag, button, or block of text wants.
38
+ */
39
+ private readonly handleSlotChange;
30
40
  protected render(): TemplateResult;
31
41
  }
32
42
  declare global {
@@ -11,13 +11,17 @@ let HelixHeadlessTableCell = class HelixHeadlessTableCell extends HelixElement {
11
11
  constructor() {
12
12
  super(...arguments);
13
13
  this.header = false;
14
+ this.handleSlotChange = () => {
15
+ const text = [...this.childNodes].some((node) => node.nodeType === Node.TEXT_NODE && (node.textContent ?? '').trim() !== '');
16
+ this.toggleState('text', text);
17
+ };
14
18
  }
15
19
  willUpdate(changed) {
16
20
  super.willUpdate(changed);
17
21
  hostAria(this.internals, { role: this.header ? 'columnheader' : 'cell' });
18
22
  }
19
23
  render() {
20
- return html `<slot></slot>`;
24
+ return html `<slot @slotchange=${this.handleSlotChange}></slot>`;
21
25
  }
22
26
  };
23
27
  __decorate([