@fusion.dev/helix-headless 0.105.0 → 0.107.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 +7324 -3890
- 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 +52 -56
- package/dist/color-picker/root/color-picker-root.d.ts +49 -49
- package/dist/combobox/root/combobox-root.d.ts +52 -53
- package/dist/command/root/command-root.d.ts +35 -40
- 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 +7 -0
- 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 +6 -0
- package/dist/map/area/map-area.js +3 -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 +7 -0
- package/dist/map/index.js +5 -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 +11 -4
- package/dist/map/marker/map-marker.js +13 -1
- package/dist/map/points/map-points.d.ts +7 -1
- package/dist/map/points/map-points.js +3 -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 +169 -7
- package/dist/map/root/map-root.js +352 -4
- package/dist/map/route/map-route.d.ts +6 -0
- package/dist/map/route/map-route.js +3 -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 +10363 -9520
- package/types/svelte.d.ts +5 -0
- package/types/vue.d.ts +1440 -1032
|
@@ -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([
|
|
@@ -31,51 +31,49 @@ export declare const at: (row: Readonly<Record<string, unknown>>, path: string)
|
|
|
31
31
|
*/
|
|
32
32
|
export declare const edgeOf: (align: string | undefined) => string | undefined;
|
|
33
33
|
/**
|
|
34
|
-
* @summary One column of a table: its heading,
|
|
34
|
+
* @summary One column of a table: its heading, its width, and the field it reads from each row.
|
|
35
35
|
*
|
|
36
36
|
* @description
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* that is accidentally the headings is invalid CSS a grid ignores in silence,
|
|
41
|
-
* drawing the whole table as one column. `Table`'s `columns` is dealt out a
|
|
42
|
-
* track at a time against the columns declared under it, so a heading among the
|
|
43
|
-
* widths costs its own column a width and no more, and a list longer or shorter
|
|
44
|
-
* than the columns is trimmed or shared rather than being a second count of
|
|
45
|
-
* them. A column's own `width` wins over the track in its place.
|
|
37
|
+
* Each column provides both its heading and its grid track. Adding a column
|
|
38
|
+
* adds a track, and removing one removes it. `Table`'s `columns` is applied one
|
|
39
|
+
* track at a time to the columns declared under it:
|
|
46
40
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* the values line up against, and `cell` takes a function for anything the
|
|
51
|
-
* field alone cannot express. The schema is markup and the data is a property:
|
|
52
|
-
* a schema is small, declarative, and something a reader should be able to see
|
|
53
|
-
* in the HTML, and data is large and windowed.
|
|
41
|
+
* - A heading name in the list affects only its own column's width.
|
|
42
|
+
* - A list longer or shorter than the columns is trimmed or shared.
|
|
43
|
+
* - A column's own `width` overrides the track in its place.
|
|
54
44
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
45
|
+
* This protects the table from a track list that contains the headings by
|
|
46
|
+
* mistake, which is invalid CSS that the grid ignores silently, drawing the
|
|
47
|
+
* whole table as one column.
|
|
58
48
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* in a wrapper that has to be kept the same width.
|
|
49
|
+
* Every per-column setting goes on the column, so `DataTable` needs no column
|
|
50
|
+
* configuration object:
|
|
62
51
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* `DataTable` draws the cells, so it leaves out the ones under a hidden column.
|
|
68
|
-
* A `Table`'s cells are markup the consumer wrote, so hide them with the
|
|
69
|
-
* column, as removing a column means removing its cells: a row with a cell more
|
|
70
|
-
* than the table has tracks wraps into the next.
|
|
52
|
+
* - `field` names the key the cell reads.
|
|
53
|
+
* - `sortable` lets people sort by the column.
|
|
54
|
+
* - `text-align` sets which edge the values line up against.
|
|
55
|
+
* - `cell` takes a function for anything `field` alone cannot express.
|
|
71
56
|
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
57
|
+
* The same element works in both `Table` and `DataTable`. It is identified by a
|
|
58
|
+
* flag, so the two roots share nothing else.
|
|
59
|
+
*
|
|
60
|
+
* The column generates no box of its own, the same as a row. The heading is a
|
|
61
|
+
* grid item of the table, so it lines up with the cells below it.
|
|
62
|
+
*
|
|
63
|
+
* `hidden` takes the column out of the grid, both its heading and its track, so
|
|
64
|
+
* the other columns keep their widths and every row keeps its cells under their
|
|
65
|
+
* headings. `hidden="until-found"` keeps the track and leaves the heading
|
|
66
|
+
* drawn, as it does on every Helix element. `DataTable` leaves out the cells
|
|
67
|
+
* under a hidden column. In a `Table` the cells are markup you wrote, so hide
|
|
68
|
+
* them with the column: a row with more cells than the table has tracks wraps
|
|
69
|
+
* onto the next line.
|
|
70
|
+
*
|
|
71
|
+
* A heading that does something holds a control. A column header is not
|
|
72
|
+
* focusable, so a sortable heading contains a `<button>`, which is the pattern
|
|
73
|
+
* for a sortable table and the only way to reach the sort by keyboard. A
|
|
74
|
+
* resizable column has a `separator` on its end edge, moved by dragging or with
|
|
75
|
+
* the arrow keys. In a table with reorderable columns, each column has a grip
|
|
76
|
+
* that the table moves.
|
|
79
77
|
*
|
|
80
78
|
* @since 0.1.0
|
|
81
79
|
* @status stable
|
|
@@ -84,20 +82,21 @@ export declare const edgeOf: (align: string | undefined) => string | undefined;
|
|
|
84
82
|
*
|
|
85
83
|
* @slot - The heading.
|
|
86
84
|
*
|
|
87
|
-
* @event {HelixBeforeResizeEvent} helix-before-resize -
|
|
85
|
+
* @event {HelixBeforeResizeEvent} helix-before-resize - The column is about to be resized, with the requested width. Cancelable: cancel it to keep the current width.
|
|
88
86
|
*
|
|
89
87
|
* @csspart column - The heading cell.
|
|
90
|
-
* @csspart grip - The handle
|
|
91
|
-
* @csspart grip-mark - The
|
|
92
|
-
* @csspart resizer - The edge
|
|
93
|
-
* @csspart sort - The button a sortable heading
|
|
88
|
+
* @csspart grip - The handle for moving the column, when the table allows it.
|
|
89
|
+
* @csspart grip-mark - The icon on the grip.
|
|
90
|
+
* @csspart resizer - The edge that is dragged to change the width, when the column is resizable.
|
|
91
|
+
* @csspart sort - The button that a sortable heading renders as.
|
|
94
92
|
*
|
|
95
93
|
* @cssstate sorted-ascending - While the table is sorted by this column, smallest first.
|
|
96
94
|
* @cssstate sorted-descending - While the table is sorted by this column, largest first.
|
|
97
95
|
*/
|
|
98
96
|
export declare class HelixHeadlessTableColumn extends HelixElement {
|
|
99
97
|
/**
|
|
100
|
-
*
|
|
98
|
+
* A function that reads the cell's content from a row, for cells that `field`
|
|
99
|
+
* alone cannot read.
|
|
101
100
|
*
|
|
102
101
|
* A property and not an attribute, because it is a function. Set it from a Lit
|
|
103
102
|
* template with `.cell=${...}`, or assign it in script. A column with neither
|
|
@@ -106,7 +105,8 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
|
|
|
106
105
|
*/
|
|
107
106
|
cell: CellReader | undefined;
|
|
108
107
|
/**
|
|
109
|
-
*
|
|
108
|
+
* A function that reads the value used for sorting and filtering, when it
|
|
109
|
+
* differs from the cell.
|
|
110
110
|
*
|
|
111
111
|
* **The one that is easy to leave out and expensive to add later.** A cell
|
|
112
112
|
* showing `2.4 MB` sorts as a string unless something says the underlying value
|
|
@@ -132,15 +132,15 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
|
|
|
132
132
|
*/
|
|
133
133
|
field: string;
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
135
|
+
* The accessible name of the grip that moves the column. `{name}` is replaced
|
|
136
|
+
* with the heading text.
|
|
137
137
|
*
|
|
138
138
|
* **Every word a column speaks is a property**, so a table in another
|
|
139
139
|
* language hears its own rather than English around its own headings.
|
|
140
140
|
*/
|
|
141
141
|
moveLabel: string;
|
|
142
142
|
/**
|
|
143
|
-
* Whether
|
|
143
|
+
* Whether the column can be resized.
|
|
144
144
|
*
|
|
145
145
|
* By dragging the edge at the end of the heading, or with the arrow keys once
|
|
146
146
|
* it has focus, a step at a time and four with Shift. The width lands in
|
|
@@ -149,12 +149,12 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
|
|
|
149
149
|
*/
|
|
150
150
|
resizable: boolean;
|
|
151
151
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
152
|
+
* The accessible name of the separator that resizes the column. `{name}` is
|
|
153
|
+
* replaced with the heading text.
|
|
154
154
|
*/
|
|
155
155
|
resizeLabel: string;
|
|
156
156
|
/**
|
|
157
|
-
* Whether
|
|
157
|
+
* Whether the table can be sorted by this column.
|
|
158
158
|
*
|
|
159
159
|
* Ignored without a `field`, and silently: a column with nothing to sort by
|
|
160
160
|
* has no order to offer, and refusing loudly would mean an actions column
|
|
@@ -226,7 +226,8 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
|
|
|
226
226
|
*/
|
|
227
227
|
width: string;
|
|
228
228
|
/**
|
|
229
|
-
*
|
|
229
|
+
* The text screen readers announce for the column's width. `{width}` is
|
|
230
|
+
* replaced with the width.
|
|
230
231
|
*/
|
|
231
232
|
widthLabel: string;
|
|
232
233
|
/**
|
|
@@ -257,7 +258,7 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
|
|
|
257
258
|
/** Watches `hidden`, which is the platform's attribute and no property of this element's. */
|
|
258
259
|
private hiding;
|
|
259
260
|
/**
|
|
260
|
-
* The narrowest a
|
|
261
|
+
* The narrowest width a column can be dragged to, in pixels.
|
|
261
262
|
*
|
|
262
263
|
* Three characters and the inset around them. Narrower and the heading has
|
|
263
264
|
* nothing left to be read by, and the separator is a grab target with no
|
|
@@ -275,7 +276,10 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
|
|
|
275
276
|
* exactly when the heading stops being drawn.
|
|
276
277
|
*/
|
|
277
278
|
get shown(): boolean;
|
|
278
|
-
/**
|
|
279
|
+
/**
|
|
280
|
+
* Whether the table can be sorted by this column, which needs `sortable` and
|
|
281
|
+
* a `field`.
|
|
282
|
+
*/
|
|
279
283
|
get canSort(): boolean;
|
|
280
284
|
/**
|
|
281
285
|
* The value this column shows for a row.
|
|
@@ -285,7 +289,10 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
|
|
|
285
289
|
* default back for the rows it has nothing to say about.
|
|
286
290
|
*/
|
|
287
291
|
read(row: Readonly<Record<string, unknown>>): unknown;
|
|
288
|
-
/**
|
|
292
|
+
/**
|
|
293
|
+
* The value this column sorts and filters by for a row, which can differ from
|
|
294
|
+
* what it shows.
|
|
295
|
+
*/
|
|
289
296
|
order(row: Readonly<Record<string, unknown>>): unknown;
|
|
290
297
|
protected willUpdate(changed: PropertyValues): void;
|
|
291
298
|
/** The words of the heading, for naming the controls on it. */
|
|
@@ -3,23 +3,22 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
3
3
|
import { type HelixHeadlessTableColumn } from '../column/table-column.js';
|
|
4
4
|
declare const HelixHeadlessTable_base: (new (...args: any[]) => import("@fusion.dev/helix-core").CollectionElement) & typeof HelixElement;
|
|
5
5
|
/**
|
|
6
|
-
* @summary
|
|
6
|
+
* @summary A table of data, laid out on a grid.
|
|
7
7
|
*
|
|
8
8
|
* @description
|
|
9
|
-
*
|
|
9
|
+
* Lays out the rows on a CSS grid, so every column lines up across rows and
|
|
10
10
|
* each row stays a real element that can be styled, hidden, or made
|
|
11
|
-
* interactive.
|
|
12
|
-
*
|
|
11
|
+
* interactive. A `<table>` layout aligns columns but limits almost everything
|
|
12
|
+
* else.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* items of the one grid that does the aligning.
|
|
14
|
+
* A grid of elements has no table structure for assistive technology, so the
|
|
15
|
+
* roles are set explicitly: `table`, `row`, `cell`, and `columnheader`. Rows
|
|
16
|
+
* are `display: contents`, so their cells become items of the one grid.
|
|
18
17
|
*
|
|
19
|
-
* The
|
|
20
|
-
* it.
|
|
21
|
-
* and CSS cannot,
|
|
22
|
-
* without measuring anything
|
|
18
|
+
* The CSS custom properties listed for this component are written by it and
|
|
19
|
+
* read by the stylesheet that draws it. Do not set them. Each holds a number
|
|
20
|
+
* the component computes and CSS cannot, so the stylesheet can draw the table
|
|
21
|
+
* without measuring anything.
|
|
23
22
|
*
|
|
24
23
|
* @since 0.1.0
|
|
25
24
|
* @status stable
|
|
@@ -29,13 +28,13 @@ declare const HelixHeadlessTable_base: (new (...args: any[]) => import("@fusion.
|
|
|
29
28
|
*
|
|
30
29
|
* @slot - The table's rows.
|
|
31
30
|
*
|
|
32
|
-
* @csspart empty -
|
|
33
|
-
* @csspart head - The row the column headings
|
|
34
|
-
* @csspart live -
|
|
35
|
-
* @csspart loading -
|
|
31
|
+
* @csspart empty - The text shown when there are no rows.
|
|
32
|
+
* @csspart head - The row that holds the column headings. It has `display: contents`, so it takes no space of its own.
|
|
33
|
+
* @csspart live - A live region that repeats the empty and loading text, so screen readers announce it when it changes. Visually hidden in the styled tier.
|
|
34
|
+
* @csspart loading - The text shown while the rows are loading.
|
|
36
35
|
* @csspart table - The grid.
|
|
37
36
|
*
|
|
38
|
-
* @cssproperty --table-template - The column track list
|
|
37
|
+
* @cssproperty --table-template - The column track list the table works out from its columns. The component writes it inline on the element that reads it, so setting it has no effect. Set `columns` to change the tracks.
|
|
39
38
|
*/
|
|
40
39
|
export declare class HelixHeadlessTable extends HelixHeadlessTable_base {
|
|
41
40
|
/**
|
|
@@ -5,9 +5,9 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
7
|
* The row renders its cells straight through and lays out none of them, so a
|
|
8
|
-
*
|
|
9
|
-
* across
|
|
10
|
-
*
|
|
8
|
+
* stylesheet can place them in the table's grid and every column lines up
|
|
9
|
+
* across rows. The row still exists as an element, so you can style it, hide
|
|
10
|
+
* it, or make it interactive.
|
|
11
11
|
*
|
|
12
12
|
* @since 0.1.0
|
|
13
13
|
* @status stable
|
|
@@ -4,9 +4,9 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
4
4
|
* @summary The content shown for one tab.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
* still there when the
|
|
9
|
-
* server
|
|
7
|
+
* An inactive panel is hidden and stays mounted. Anything typed into it is
|
|
8
|
+
* still there when the person comes back, and the content of every panel is in
|
|
9
|
+
* the server-rendered markup for crawlers, whichever tab is open.
|
|
10
10
|
*
|
|
11
11
|
* @since 0.1.0
|
|
12
12
|
* @status stable
|