@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.
- package/custom-elements.json +10386 -3813
- package/dist/accordion/item/accordion-item.d.ts +17 -16
- package/dist/accordion/root/accordion-root.d.ts +13 -17
- package/dist/announcement/root/announcement-root.d.ts +24 -31
- package/dist/app-header/root/app-header-root.d.ts +14 -14
- package/dist/area-chart/root/area-chart-root.d.ts +29 -48
- package/dist/avatar/group/avatar-group.d.ts +6 -8
- package/dist/avatar/root/avatar-root.d.ts +11 -11
- package/dist/badge/root/badge-root.d.ts +14 -15
- package/dist/bar-chart/root/bar-chart-root.d.ts +40 -44
- package/dist/blockquote/root/blockquote-root.d.ts +5 -7
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +25 -33
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +12 -11
- package/dist/button/root/button-root.d.ts +16 -17
- package/dist/button-group/root/button-group-root.d.ts +9 -10
- package/dist/callout/root/callout-root.d.ts +10 -15
- package/dist/canvas/edge/canvas-edge.d.ts +21 -21
- package/dist/canvas/node/canvas-node.d.ts +43 -45
- package/dist/canvas/root/canvas-root.d.ts +100 -99
- package/dist/card/root/card-root.d.ts +10 -12
- package/dist/carousel/root/carousel-root.d.ts +32 -33
- package/dist/chat/composer/chat-composer.d.ts +24 -26
- package/dist/chat/message/chat-message.d.ts +30 -33
- package/dist/chat/root/chat-root.d.ts +63 -80
- package/dist/checkbox/root/checkbox-root.d.ts +30 -32
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +25 -25
- package/dist/code/root/code-root.d.ts +6 -10
- package/dist/code-block/root/code-block-root.d.ts +35 -48
- package/dist/color-input/root/color-input-root.d.ts +62 -56
- package/dist/color-input/root/color-input-root.js +3 -0
- package/dist/color-picker/root/color-picker-root.d.ts +61 -49
- package/dist/color-picker/root/color-picker-root.js +4 -0
- package/dist/combobox/root/combobox-root.d.ts +52 -53
- package/dist/command/root/command-root.d.ts +40 -40
- package/dist/command/root/command-root.js +1 -0
- package/dist/copy-button/root/copy-button-root.d.ts +24 -26
- package/dist/data-table/root/data-table-root.d.ts +106 -107
- package/dist/date-input/root/date-input-root.d.ts +54 -53
- package/dist/date-picker/root/date-picker-root.d.ts +25 -21
- package/dist/description-list/item/description-list-item.d.ts +7 -7
- package/dist/description-list/root/description-list-root.d.ts +10 -15
- package/dist/dialog/root/dialog-root.d.ts +22 -19
- package/dist/divider/root/divider-root.d.ts +12 -13
- package/dist/donut-chart/root/donut-chart-root.d.ts +19 -20
- package/dist/drawer/root/drawer-root.d.ts +19 -18
- package/dist/drilldown/item/drilldown-item.d.ts +28 -28
- package/dist/drilldown/root/drilldown-root.d.ts +22 -28
- package/dist/element-events.generated.js +19 -1
- package/dist/empty/root/empty-root.d.ts +16 -19
- package/dist/file-input/root/file-input-root.d.ts +32 -32
- package/dist/filter-input/chip/filter-chip.d.ts +36 -39
- package/dist/filter-input/field/filter-field.d.ts +25 -31
- package/dist/filter-input/menu/filter-menu.d.ts +50 -47
- package/dist/filter-input/operator/filter-operator.d.ts +15 -20
- package/dist/filter-input/root/filter-input-root.d.ts +80 -98
- package/dist/format-date/root/format-date-root.d.ts +19 -27
- package/dist/heatmap/root/heatmap-root.d.ts +40 -41
- package/dist/icon/root/icon-root.d.ts +21 -23
- package/dist/icon-button/root/icon-button-root.d.ts +12 -14
- package/dist/image/root/image-root.d.ts +30 -30
- package/dist/input/root/input-root.d.ts +36 -35
- package/dist/kbd/root/kbd-root.d.ts +13 -15
- package/dist/legend/root/legend-root.d.ts +18 -16
- package/dist/lightbox/item/lightbox-item.d.ts +13 -15
- package/dist/lightbox/root/lightbox-root.d.ts +40 -41
- package/dist/line-chart/root/line-chart-root.d.ts +20 -29
- package/dist/list/item/list-item.d.ts +17 -22
- package/dist/list/root/list-root.d.ts +6 -7
- package/dist/listbox/root/listbox-root.d.ts +42 -41
- package/dist/loader/root/loader-root.d.ts +16 -20
- package/dist/map/area/map-area.d.ts +48 -0
- package/dist/map/area/map-area.js +40 -0
- package/dist/map/buildings/map-buildings.d.ts +45 -0
- package/dist/map/buildings/map-buildings.js +37 -0
- package/dist/map/contours/map-contours.d.ts +61 -0
- package/dist/map/contours/map-contours.js +54 -0
- package/dist/map/index.d.ts +14 -0
- package/dist/map/index.js +10 -0
- package/dist/map/landcover/map-landcover.d.ts +47 -0
- package/dist/map/landcover/map-landcover.js +37 -0
- package/dist/map/marker/map-marker.d.ts +120 -0
- package/dist/map/marker/map-marker.js +109 -0
- package/dist/map/points/map-points.d.ts +139 -0
- package/dist/map/points/map-points.js +161 -0
- package/dist/map/position/map-position.d.ts +70 -0
- package/dist/map/position/map-position.js +89 -0
- package/dist/map/raster/map-raster.d.ts +84 -0
- package/dist/map/raster/map-raster.js +96 -0
- package/dist/map/root/map-root.d.ts +269 -52
- package/dist/map/root/map-root.js +473 -5
- package/dist/map/route/map-route.d.ts +73 -0
- package/dist/map/route/map-route.js +52 -0
- package/dist/map/terrain/map-terrain.d.ts +68 -0
- package/dist/map/terrain/map-terrain.js +58 -0
- package/dist/megamenu/root/megamenu-root.d.ts +27 -25
- package/dist/menu/item/menu-item.d.ts +30 -31
- package/dist/menu/root/menu-root.d.ts +25 -29
- package/dist/meter/root/meter-root.d.ts +22 -21
- package/dist/navigation/root/navigation-root.d.ts +13 -16
- package/dist/notifications/group/notification-group.d.ts +27 -28
- package/dist/notifications/notification/notification.d.ts +35 -42
- package/dist/notifications/root/notifications-root.d.ts +22 -24
- package/dist/number-input/root/number-input-root.d.ts +46 -50
- package/dist/object-inspector/root/object-inspector-root.d.ts +46 -58
- package/dist/option/group/option-group.d.ts +11 -11
- package/dist/option/root/option-root.d.ts +28 -33
- package/dist/outline/root/outline-root.d.ts +18 -17
- package/dist/pagination/root/pagination-root.d.ts +37 -39
- package/dist/pagination/size/pagination-size.d.ts +37 -43
- package/dist/pagination/summary/pagination-summary.d.ts +12 -14
- package/dist/pin-input/root/pin-input-root.d.ts +32 -38
- package/dist/popover/root/popover-root.d.ts +16 -21
- package/dist/progress/root/progress-root.d.ts +16 -14
- package/dist/qr-code/root/qr-code-root.d.ts +22 -25
- package/dist/quote/root/quote-root.d.ts +5 -6
- package/dist/radio/group/radio-group.d.ts +26 -28
- package/dist/radio/root/radio-root.d.ts +24 -28
- package/dist/rating/root/rating-root.d.ts +27 -30
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +43 -55
- package/dist/scroll-area/root/scroll-area-root.d.ts +15 -21
- package/dist/select/root/select-root.d.ts +41 -44
- package/dist/skeleton/root/skeleton-root.d.ts +7 -8
- package/dist/skip-link/root/skip-link-root.d.ts +21 -28
- package/dist/slider/root/slider-root.d.ts +36 -39
- package/dist/sparkline/root/sparkline-root.d.ts +22 -28
- package/dist/speed-dial/item/speed-dial-item.d.ts +21 -21
- package/dist/speed-dial/root/speed-dial-root.d.ts +25 -27
- package/dist/splitter/root/splitter-root.d.ts +37 -41
- package/dist/stat/group/stat-group.d.ts +4 -4
- package/dist/stat/root/stat-root.d.ts +8 -9
- package/dist/steps/root/steps-root.d.ts +11 -14
- package/dist/steps/step/step.d.ts +22 -29
- package/dist/switch/root/switch-root.d.ts +20 -24
- package/dist/table/cell/table-cell.d.ts +18 -8
- package/dist/table/cell/table-cell.js +5 -1
- package/dist/table/column/table-column.d.ts +62 -55
- package/dist/table/root/table-root.d.ts +16 -17
- package/dist/table/row/table-row.d.ts +3 -3
- package/dist/tabs/panel/tab-panel.d.ts +3 -3
- package/dist/tabs/root/tabs-root.d.ts +19 -17
- package/dist/tabs/tab/tab.d.ts +6 -6
- package/dist/tag/root/tag-root.d.ts +11 -12
- package/dist/textarea/root/textarea-root.d.ts +29 -32
- package/dist/time-input/root/time-input-root.d.ts +70 -69
- package/dist/time-picker/root/time-picker-root.d.ts +58 -66
- package/dist/timeline/item/timeline-item.d.ts +18 -24
- package/dist/timeline/root/timeline-root.d.ts +13 -21
- package/dist/toast/item/toast-item.d.ts +21 -22
- package/dist/toast/root/toast-root.d.ts +18 -23
- package/dist/toggle/group/toggle-group.d.ts +23 -25
- package/dist/toggle/root/toggle-root.d.ts +8 -8
- package/dist/toolbar/root/toolbar-root.d.ts +7 -10
- package/dist/tooltip/root/tooltip-root.d.ts +41 -47
- package/dist/tour/root/tour-root.d.ts +24 -26
- package/dist/tour/stop/tour-stop.d.ts +39 -48
- package/dist/tree/item/tree-item.d.ts +23 -25
- package/dist/tree/root/tree-root.d.ts +13 -12
- package/dist/trend/root/trend-root.d.ts +18 -19
- package/dist/video/root/video-root.d.ts +108 -101
- package/dist/video-playlist/item/video-playlist-item.d.ts +23 -28
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +17 -21
- package/dist/video-playlist/root/video-playlist-root.d.ts +21 -25
- package/dist/virtual-list/root/virtual-list-root.d.ts +27 -26
- package/package.json +5 -5
- package/types/jsx.d.ts +14011 -11983
- package/types/svelte.d.ts +10 -0
- 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
|
|
4
|
+
* @summary Two panes and a divider that you can move.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
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
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* bounds. A drag in progress is a state
|
|
21
|
-
*
|
|
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
|
-
*
|
|
24
|
-
*
|
|
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
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
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
|
|
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
|
|
47
|
-
* @event {HelixBeforeResizeEvent} helix-before-resize - Fired before the divider settles, and only
|
|
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
|
|
44
|
+
* @csspart end - The box that holds the second pane.
|
|
51
45
|
* @csspart separator - The divider itself.
|
|
52
|
-
* @csspart start - The box
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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,
|
|
90
|
+
* Which pane starts shut, when `collapsed` is not set.
|
|
97
91
|
*/
|
|
98
92
|
defaultCollapsed?: 'end' | 'start';
|
|
99
93
|
/**
|
|
100
|
-
* Where the divider starts,
|
|
94
|
+
* Where the divider starts, when `position` is not set.
|
|
101
95
|
*/
|
|
102
96
|
defaultPosition: number;
|
|
103
97
|
/**
|
|
104
|
-
*
|
|
98
|
+
* The divider's name, read by screen readers.
|
|
105
99
|
*/
|
|
106
100
|
label: string;
|
|
107
101
|
/**
|
|
108
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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,
|
|
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
|
|
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
|
-
*
|
|
8
|
-
* order
|
|
9
|
-
*
|
|
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
|
|
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
|
|
4
|
+
* @summary One measurement, with a label that names what it measures.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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
|
|
13
|
-
*
|
|
14
|
-
*
|
|
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,
|
|
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
|
|
5
|
+
* @summary A sequence of stages that shows which stage the user is on.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
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
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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
|
|
28
|
-
* @event {HelixBeforeActivateEvent} helix-before-activate - Fired before the active step changes. Cancelable:
|
|
29
|
-
* @event {HelixSelectEvent} helix-select - Fired when a step is pressed.
|
|
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
|
-
*
|
|
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
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
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
|
-
*
|
|
14
|
-
*
|
|
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
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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
|
-
*
|
|
25
|
-
* `::after`
|
|
26
|
-
*
|
|
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 -
|
|
38
|
-
* @slot description - A line under the name
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
46
|
+
* Whether this stage is finished.
|
|
54
47
|
*/
|
|
55
48
|
complete: boolean;
|
|
56
49
|
/**
|
|
57
|
-
* Whether this is the stage
|
|
50
|
+
* Whether this is the current stage.
|
|
58
51
|
*/
|
|
59
52
|
current: boolean;
|
|
60
53
|
/**
|
|
61
|
-
* Whether the
|
|
54
|
+
* Whether the stage is disabled, so the user cannot go to it.
|
|
62
55
|
*/
|
|
63
56
|
disabled: boolean;
|
|
64
57
|
/**
|
|
65
|
-
*
|
|
58
|
+
* The value the step sends in `helix-select`.
|
|
66
59
|
*/
|
|
67
60
|
value: string;
|
|
68
|
-
/**
|
|
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
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* outside a form as
|
|
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
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
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
|
|
21
|
-
*
|
|
22
|
-
*
|
|
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
|
|
27
|
+
* @slot - The label that names what the switch turns on.
|
|
31
28
|
*
|
|
32
|
-
* @event {Event} change -
|
|
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 -
|
|
31
|
+
* @event {Event} input - Sent after the state changes.
|
|
35
32
|
*
|
|
36
33
|
* @csspart control - The input.
|
|
37
|
-
* @csspart feedback -
|
|
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
|
|
41
|
-
* @csspart track - The
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
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 -
|
|
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
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* screen reader
|
|
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
|
|
12
|
-
*
|
|
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
|
|
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
|
|
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([
|