@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
|
@@ -14,44 +14,32 @@ interface Row {
|
|
|
14
14
|
value: unknown;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* @summary A value
|
|
18
|
-
*
|
|
17
|
+
* @summary A structured value shown as a tree, where you can close branches,
|
|
18
|
+
* see how many entries each holds, and copy any part.
|
|
19
19
|
*
|
|
20
20
|
* @description
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* scrolls a wall of JSON and cannot put away the branch they do not care about;
|
|
24
|
-
* as a Tree, every node is a label and a string reads the same as a number. This
|
|
25
|
-
* reads the value and draws each entry with its type visible.
|
|
21
|
+
* Object Inspector shows a structured value, such as an API response, a config,
|
|
22
|
+
* or a raw record, as a read-only tree with each entry's type visible.
|
|
26
23
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
24
|
+
* Pass the object to `value`, or name a `<script type="application/json">` by
|
|
25
|
+
* id with `for`, the same source `VirtualList` and the charts read. JSON text
|
|
26
|
+
* works with server rendering and with React hydration, which skips object
|
|
27
|
+
* properties. `value` wins when both are set.
|
|
30
28
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
29
|
+
* The tree is one tab stop. Up and Down move between rows, Right opens a branch
|
|
30
|
+
* or moves into it, Left closes it or moves to its parent, and Home and End
|
|
31
|
+
* move to the first and last rows. Focus stays on the tree, and
|
|
32
|
+
* `aria-activedescendant` marks the active row. Each row carries its real
|
|
33
|
+
* level, position, and set size, including in a windowed tree.
|
|
36
34
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* windowed tree drop rows from the page without dropping focus with them. Each
|
|
42
|
-
* row carries its real level, position and set size, so a reader on a windowed
|
|
43
|
-
* row hears where it is in the value rather than in the slice drawn.
|
|
35
|
+
* The copy button copies the active row, a branch as JSON and a string as its
|
|
36
|
+
* text. So do Command+C and Control+C while the tree has focus and no text is
|
|
37
|
+
* selected. The button sits beside the tree, because assistive technology
|
|
38
|
+
* cannot reliably reach a button inside a tree item.
|
|
44
39
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* button would be an interactive control inside a tree item, which assistive
|
|
49
|
-
* technology cannot reach reliably.
|
|
50
|
-
*
|
|
51
|
-
* **`windowed` draws only the rows in view**, for a value of thousands of
|
|
52
|
-
* entries, through the same controller `VirtualList` and `DataTable` use. The
|
|
53
|
-
* box has to have a height for that to mean anything, which the styled tier
|
|
54
|
-
* gives it and a headless consumer has to.
|
|
40
|
+
* `windowed` draws only the rows in view, for values with thousands of entries.
|
|
41
|
+
* The box needs a height for windowing to work. The styled tier sets one, and
|
|
42
|
+
* in the headless tier you set it yourself.
|
|
55
43
|
*
|
|
56
44
|
* @since 0.1.0
|
|
57
45
|
* @status stable
|
|
@@ -61,48 +49,48 @@ interface Row {
|
|
|
61
49
|
*
|
|
62
50
|
* @event {HelixCopyEvent} helix-copy - A value was put on the clipboard, from the copy button or the keyboard.
|
|
63
51
|
*
|
|
64
|
-
* @csspart after - The
|
|
65
|
-
* @csspart before - The
|
|
52
|
+
* @csspart after - The space the rows below the drawn rows would take, when `windowed` is set.
|
|
53
|
+
* @csspart before - The space the rows above the drawn rows would take, when `windowed` is set.
|
|
66
54
|
* @csspart boolean - A `true` or `false`.
|
|
67
55
|
* @csspart copy - The copy button, which copies the active row.
|
|
68
|
-
* @csspart copy-button - The
|
|
69
|
-
* @csspart copy-mark - The clipboard
|
|
70
|
-
* @csspart copy-tooltip - The
|
|
71
|
-
* @csspart copy-tooltip-arrow - The
|
|
72
|
-
* @csspart copy-tooltip-arrow-bottom - The
|
|
73
|
-
* @csspart copy-tooltip-arrow-left - The
|
|
74
|
-
* @csspart copy-tooltip-arrow-right - The
|
|
75
|
-
* @csspart copy-tooltip-arrow-top - The
|
|
76
|
-
* @csspart copy-tooltip-bottom - The
|
|
77
|
-
* @csspart copy-tooltip-left - The
|
|
78
|
-
* @csspart copy-tooltip-right - The
|
|
79
|
-
* @csspart copy-tooltip-top - The
|
|
80
|
-
* @csspart count -
|
|
56
|
+
* @csspart copy-button - The button inside the copy control.
|
|
57
|
+
* @csspart copy-mark - The clipboard icon, and the confirmation icon that replaces it.
|
|
58
|
+
* @csspart copy-tooltip - The tooltip, forwarded from the copy button's tooltip.
|
|
59
|
+
* @csspart copy-tooltip-arrow - The tooltip's arrow, pointing at the copy button.
|
|
60
|
+
* @csspart copy-tooltip-arrow-bottom - The arrow while the tooltip is below the copy button, on the tooltip's top edge. Set alongside `copy-tooltip-arrow`.
|
|
61
|
+
* @csspart copy-tooltip-arrow-left - The arrow while the tooltip is left of the copy button, on the tooltip's right edge. Set alongside `copy-tooltip-arrow`.
|
|
62
|
+
* @csspart copy-tooltip-arrow-right - The arrow while the tooltip is right of the copy button, on the tooltip's left edge. Set alongside `copy-tooltip-arrow`.
|
|
63
|
+
* @csspart copy-tooltip-arrow-top - The arrow while the tooltip is above the copy button, on the tooltip's bottom edge. Set alongside `copy-tooltip-arrow`.
|
|
64
|
+
* @csspart copy-tooltip-bottom - The tooltip while it is below the copy button. Set alongside `copy-tooltip`.
|
|
65
|
+
* @csspart copy-tooltip-left - The tooltip while it is left of the copy button. Set alongside `copy-tooltip`.
|
|
66
|
+
* @csspart copy-tooltip-right - The tooltip while it is right of the copy button. Set alongside `copy-tooltip`.
|
|
67
|
+
* @csspart copy-tooltip-top - The tooltip while it is above the copy button. Set alongside `copy-tooltip`.
|
|
68
|
+
* @csspart count - The number of entries a branch holds.
|
|
81
69
|
* @csspart frame - The tree and the copy button beside it.
|
|
82
|
-
* @csspart header - The bar
|
|
70
|
+
* @csspart header - The bar that holds the label, when there is one.
|
|
83
71
|
* @csspart key - A property name or an array index.
|
|
84
72
|
* @csspart label - The label.
|
|
85
73
|
* @csspart null - A `null`.
|
|
86
74
|
* @csspart number - A number.
|
|
87
|
-
* @csspart row - One entry, a tree item.
|
|
88
|
-
* @csspart row-active - The entry the keyboard is on
|
|
75
|
+
* @csspart row - One entry, as a tree item.
|
|
76
|
+
* @csspart row-active - The entry the keyboard is on. Set alongside `row`.
|
|
89
77
|
* @csspart string - A string, in quotes.
|
|
90
|
-
* @csspart summary - The brackets
|
|
91
|
-
* @csspart toggle - The caret on a branch
|
|
92
|
-
* @csspart tree - The tree, the
|
|
78
|
+
* @csspart summary - The brackets that stand for a branch's contents.
|
|
79
|
+
* @csspart toggle - The caret on a branch. It points down when the branch is open and sideways when it is closed.
|
|
80
|
+
* @csspart tree - The tree, which is the element that receives focus.
|
|
93
81
|
*
|
|
94
82
|
* @cssproperty --object-inspector-level - How deep a row is, from 0 at the root, for indenting it.
|
|
95
83
|
*/
|
|
96
84
|
export declare class HelixHeadlessObjectInspector extends HelixElement {
|
|
97
85
|
/**
|
|
98
|
-
*
|
|
99
|
-
* `{name}`.
|
|
86
|
+
* The copy button's accessible name on a row with a key, with the key filled
|
|
87
|
+
* in as `{name}`.
|
|
100
88
|
*
|
|
101
89
|
* **Every word the inspector speaks is a property**, so a page in another
|
|
102
90
|
* language hears its own rather than English around its own keys.
|
|
103
91
|
*/
|
|
104
92
|
copyLabel: string;
|
|
105
|
-
/**
|
|
93
|
+
/** The copy button's accessible name on a row without a key, such as the root. */
|
|
106
94
|
copyValueLabel: string;
|
|
107
95
|
/**
|
|
108
96
|
* How many levels start open.
|
|
@@ -126,7 +114,7 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
|
|
|
126
114
|
*/
|
|
127
115
|
label: string;
|
|
128
116
|
/**
|
|
129
|
-
*
|
|
117
|
+
* Hides the copy button.
|
|
130
118
|
*
|
|
131
119
|
* Negative for the reason Code Block's is: a boolean attribute defaulting to
|
|
132
120
|
* true could never be turned off from markup.
|
|
@@ -140,7 +128,7 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
|
|
|
140
128
|
*/
|
|
141
129
|
noCopy: boolean;
|
|
142
130
|
/**
|
|
143
|
-
* The value
|
|
131
|
+
* The value to show, when your code already holds it as an object.
|
|
144
132
|
*
|
|
145
133
|
* Takes precedence over `for`. Anything JSON can say is drawn; anything else
|
|
146
134
|
* is shown as its string.
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
/**
|
|
4
|
-
* @summary A
|
|
4
|
+
* @summary A labeled group of options inside a listbox.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
* A heading over a set
|
|
8
|
-
* because
|
|
9
|
-
*
|
|
10
|
-
* moving through a grouped list exactly as it moves through a flat one.
|
|
7
|
+
* A heading over a set of options. The group holds no selection and no value,
|
|
8
|
+
* because the listbox owns those. Its options are still the listbox's options,
|
|
9
|
+
* so the keyboard moves through a grouped list the same way as a flat one.
|
|
11
10
|
*
|
|
12
|
-
* `role="group"`
|
|
13
|
-
* an option is in
|
|
11
|
+
* The group has `role="group"` and takes its name from the heading, so a screen
|
|
12
|
+
* reader announces which group an option is in, and the heading is not a stop
|
|
13
|
+
* of its own.
|
|
14
14
|
*
|
|
15
15
|
* @since 0.1.0
|
|
16
16
|
* @status stable
|
|
17
17
|
* @aliases OptGroup, Section
|
|
18
18
|
* @documentation https://fusion.dev/helix/components/option
|
|
19
19
|
*
|
|
20
|
-
* @slot - The options in
|
|
21
|
-
* @slot label -
|
|
20
|
+
* @slot - The options in the group.
|
|
21
|
+
* @slot label - The group's heading, for a heading that needs more than plain text.
|
|
22
22
|
*
|
|
23
|
-
* @csspart items - The
|
|
23
|
+
* @csspart items - The element that holds the group's options.
|
|
24
24
|
* @csspart label - The heading.
|
|
25
25
|
*/
|
|
26
26
|
export declare class HelixHeadlessOptionGroup extends HelixElement {
|
|
27
27
|
/**
|
|
28
|
-
* The heading
|
|
28
|
+
* The heading above the group's options.
|
|
29
29
|
*/
|
|
30
30
|
label: string;
|
|
31
31
|
protected willUpdate(changed: PropertyValues): void;
|
|
@@ -21,24 +21,18 @@ export declare const optionsAmong: (elements: readonly Element[]) => HelixHeadle
|
|
|
21
21
|
* @summary One choice in a listbox.
|
|
22
22
|
*
|
|
23
23
|
* @description
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* with a
|
|
28
|
-
*
|
|
29
|
-
* listbox, not any one control that happens to contain one.
|
|
24
|
+
* Options are their own family, separate from Select, because an option belongs
|
|
25
|
+
* to a listbox and several controls contain one. `role="option"` requires an
|
|
26
|
+
* owning `role="listbox"`. A Select is a listbox with a trigger, a Combobox is
|
|
27
|
+
* a listbox with a text input, and a command palette is a listbox in a dialog.
|
|
28
|
+
* `Radio` is a part of its group, because a radio has only one kind of owner.
|
|
30
29
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* Selection works the way it does for a radio. Choosing an option dispatches an
|
|
31
|
+
* event, the listbox decides whether the choice stands, and the listbox sets
|
|
32
|
+
* `selected`.
|
|
33
33
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* writes `selected` back. An option that selected itself would be a second
|
|
37
|
-
* answer to which one is chosen.
|
|
38
|
-
*
|
|
39
|
-
* **Nothing here knows about filtering.** A hidden option is hidden by whatever
|
|
40
|
-
* owns it, through `hidden`, because what counts as a match is the listbox's
|
|
41
|
-
* question and differs between a select and a command palette.
|
|
34
|
+
* Filtering belongs to the owner, which hides an option with `hidden`. What
|
|
35
|
+
* counts as a match differs between a select and a command palette.
|
|
42
36
|
*
|
|
43
37
|
* @since 0.1.0
|
|
44
38
|
* @status stable
|
|
@@ -46,18 +40,18 @@ export declare const optionsAmong: (elements: readonly Element[]) => HelixHeadle
|
|
|
46
40
|
* @aliases Item, Choice
|
|
47
41
|
* @documentation https://fusion.dev/helix/components/option
|
|
48
42
|
*
|
|
49
|
-
* @slot - The
|
|
50
|
-
* @slot end -
|
|
51
|
-
* @slot start -
|
|
43
|
+
* @slot - The option's label.
|
|
44
|
+
* @slot end - Content after the label, such as a shortcut or a count.
|
|
45
|
+
* @slot start - Content before the label, such as an icon or an avatar.
|
|
52
46
|
*
|
|
53
|
-
* @event {HelixSelectEvent} helix-select -
|
|
47
|
+
* @event {HelixSelectEvent} helix-select - The option was chosen. Cancelable: canceling it leaves the selection as it was.
|
|
54
48
|
*
|
|
55
|
-
* @csspart description - The
|
|
49
|
+
* @csspart description - The description under the label, when there is one.
|
|
56
50
|
* @csspart item - The row.
|
|
57
|
-
* @csspart item-active - The row the keyboard is on
|
|
58
|
-
* @csspart item-selected - The row of a
|
|
59
|
-
* @csspart label - The
|
|
60
|
-
* @csspart text - The
|
|
51
|
+
* @csspart item-active - The row the keyboard is on. Set alongside `item`.
|
|
52
|
+
* @csspart item-selected - The row of a selected option. Set alongside `item`.
|
|
53
|
+
* @csspart label - The option's label.
|
|
54
|
+
* @csspart text - The label and the description under it, as one column.
|
|
61
55
|
*
|
|
62
56
|
* @cssstate selected - While the option is chosen.
|
|
63
57
|
*/
|
|
@@ -69,7 +63,8 @@ export declare class HelixHeadlessOption extends HelixElement {
|
|
|
69
63
|
*/
|
|
70
64
|
active: boolean;
|
|
71
65
|
/**
|
|
72
|
-
* A second destination for
|
|
66
|
+
* A second destination for the row, opened when you choose it with the
|
|
67
|
+
* modifier key held.
|
|
73
68
|
*
|
|
74
69
|
* **An attribute rather than a second row, which is the whole point.** A
|
|
75
70
|
* palette that offered every component a reference page and a sandbox as
|
|
@@ -86,7 +81,7 @@ export declare class HelixHeadlessOption extends HelixElement {
|
|
|
86
81
|
*/
|
|
87
82
|
alternate: string;
|
|
88
83
|
/**
|
|
89
|
-
*
|
|
84
|
+
* The name of the second destination, announced to screen reader users.
|
|
90
85
|
*
|
|
91
86
|
* A row with two destinations needs both said, or a screen reader is told
|
|
92
87
|
* about one of them and the other is a key nobody mentioned. It goes to
|
|
@@ -96,7 +91,7 @@ export declare class HelixHeadlessOption extends HelixElement {
|
|
|
96
91
|
*/
|
|
97
92
|
alternateLabel: string;
|
|
98
93
|
/**
|
|
99
|
-
* Whether the markup
|
|
94
|
+
* Whether the markup declares this option selected. A form reset returns to it.
|
|
100
95
|
*
|
|
101
96
|
* `<option selected>` reflects to `defaultSelected` and `option.selected` is
|
|
102
97
|
* live state that does not reflect, and those are two different facts. This
|
|
@@ -125,7 +120,7 @@ export declare class HelixHeadlessOption extends HelixElement {
|
|
|
125
120
|
get defaultSelected(): boolean;
|
|
126
121
|
set defaultSelected(next: boolean);
|
|
127
122
|
/**
|
|
128
|
-
* A second line under the
|
|
123
|
+
* A second line under the label that describes the choice.
|
|
129
124
|
*
|
|
130
125
|
* A palette row reads better as a name and a caption than as one sentence
|
|
131
126
|
* carrying both: "Helix" and "the design system" are two facts, and a comma
|
|
@@ -147,7 +142,7 @@ export declare class HelixHeadlessOption extends HelixElement {
|
|
|
147
142
|
*/
|
|
148
143
|
description?: string;
|
|
149
144
|
/**
|
|
150
|
-
*
|
|
145
|
+
* Prevents the option from being chosen.
|
|
151
146
|
*/
|
|
152
147
|
disabled: boolean;
|
|
153
148
|
/**
|
|
@@ -166,11 +161,11 @@ export declare class HelixHeadlessOption extends HelixElement {
|
|
|
166
161
|
*/
|
|
167
162
|
selected: boolean;
|
|
168
163
|
/**
|
|
169
|
-
*
|
|
164
|
+
* The value that identifies the option, and that a form submits.
|
|
170
165
|
*/
|
|
171
166
|
value: string;
|
|
172
167
|
/**
|
|
173
|
-
* The
|
|
168
|
+
* The option's text, which a listbox matches typed text against.
|
|
174
169
|
*
|
|
175
170
|
* Read from the rendered content rather than required as a property, because
|
|
176
171
|
* the content is where a consumer naturally puts it and asking for both is
|
|
@@ -208,7 +203,7 @@ export declare class HelixHeadlessOption extends HelixElement {
|
|
|
208
203
|
* it is in every comparison too.
|
|
209
204
|
*/
|
|
210
205
|
get text(): string;
|
|
211
|
-
/**
|
|
206
|
+
/** Sends `helix-select` for this option. Does nothing when it is disabled. */
|
|
212
207
|
select(): void;
|
|
213
208
|
/**
|
|
214
209
|
* Mirrors the chosen state where a stylesheet can select on it.
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
/**
|
|
4
|
-
* @summary Links to the headings on
|
|
4
|
+
* @summary Links to the headings on the page, with the section in view marked.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Outline is a table of contents for a document. `Navigation` does the same job
|
|
8
|
+
* for a site.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* the page
|
|
10
|
+
* The links are your own anchors. A router renders its own `<a>` and cannot
|
|
11
|
+
* render one inside the outline's shadow root, and the hrefs are fragments on
|
|
12
|
+
* the same page.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
* `IntersectionObserver` with a band near the top fails
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* The current section is decided by the headings' positions. An
|
|
15
|
+
* `IntersectionObserver` with a band near the top fails both ways: when
|
|
16
|
+
* headings are far apart, none is in the band and no section is marked, and
|
|
17
|
+
* when they are close together, several are in the band at once.
|
|
18
18
|
*
|
|
19
19
|
* @since 0.1.0
|
|
20
20
|
* @status stable
|
|
@@ -24,15 +24,15 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
24
24
|
*
|
|
25
25
|
* @slot - The links, as anchors with fragment hrefs.
|
|
26
26
|
*
|
|
27
|
-
* @event {HelixActivateEvent} helix-activate -
|
|
27
|
+
* @event {HelixActivateEvent} helix-activate - Fired when the section in view changes, with its id as the value. It reports the scroll position and cannot be prevented.
|
|
28
28
|
*
|
|
29
|
-
* @csspart indicator - The mark that
|
|
29
|
+
* @csspart indicator - The mark that moves to the section in view.
|
|
30
30
|
* @csspart nav - The navigation landmark.
|
|
31
31
|
*/
|
|
32
32
|
export declare class HelixHeadlessOutline extends HelixElement {
|
|
33
33
|
private readonly indicator;
|
|
34
34
|
/**
|
|
35
|
-
* How
|
|
35
|
+
* How the page scrolls to a section when its link is clicked.
|
|
36
36
|
*
|
|
37
37
|
* The platform's own vocabulary, because this is the platform's own option:
|
|
38
38
|
* `auto` defers to whatever `scroll-behavior` the page has set on its scroll
|
|
@@ -54,12 +54,13 @@ export declare class HelixHeadlessOutline extends HelixElement {
|
|
|
54
54
|
*/
|
|
55
55
|
behavior: ScrollBehavior;
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* The navigation's name, read by screen readers.
|
|
58
58
|
*/
|
|
59
59
|
label: string;
|
|
60
60
|
/**
|
|
61
|
-
* How far below the top of
|
|
62
|
-
* pixels
|
|
61
|
+
* How far below the top of the scroll container a heading counts as reached,
|
|
62
|
+
* in pixels. The scroll container is the window or the panel the sections
|
|
63
|
+
* scroll in.
|
|
63
64
|
*
|
|
64
65
|
* The reading line. A page with a sticky masthead sets this to its height, or
|
|
65
66
|
* a little more: without it the current section changes as a heading slides
|
|
@@ -67,7 +68,7 @@ export declare class HelixHeadlessOutline extends HelixElement {
|
|
|
67
68
|
*/
|
|
68
69
|
offset: number;
|
|
69
70
|
/**
|
|
70
|
-
* The id of the section
|
|
71
|
+
* The id of the section in view, or empty before anything is measured.
|
|
71
72
|
*
|
|
72
73
|
* Read-only, and a getter rather than a property for that reason: it is
|
|
73
74
|
* derived from where the page is scrolled to, so a consumer setting it would
|
|
@@ -1,37 +1,32 @@
|
|
|
1
1
|
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
/**
|
|
4
|
-
* @summary
|
|
4
|
+
* @summary Controls for moving between the pages of a long set of results.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* Set a page and a total, and the component works out which page numbers to
|
|
8
|
+
* show and where the gaps go:
|
|
9
|
+
* `<helix-headless-pagination page="4" pages="12">`. You do not slot a child
|
|
10
|
+
* for each page.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* `siblings`
|
|
14
|
-
* control
|
|
15
|
-
*
|
|
16
|
-
* one click and the next.
|
|
12
|
+
* The width stays the same as you page. The run around the current page is
|
|
13
|
+
* `siblings` on each side and grows to absorb a gap at either end, so the
|
|
14
|
+
* control shows the same number of slots from the first page to the last, and
|
|
15
|
+
* the buttons do not move under the pointer.
|
|
17
16
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* binary-search step: any page in a set of any size is a handful of presses.
|
|
17
|
+
* A gap appears only where it hides more than one page. A gap is a control: it
|
|
18
|
+
* goes to the middle of the pages it hides, so any page is a few presses away.
|
|
21
19
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
20
|
+
* Set `href` to render every page as an `<a>`, with `{page}` replaced by the
|
|
21
|
+
* page number. The links can be crawled, a middle click opens a tab, and the
|
|
22
|
+
* address bar holds the state. Without `href` the pages are buttons, for a
|
|
23
|
+
* table that pages in place. Either way, a click dispatches `helix-navigate`
|
|
24
|
+
* first. Call `preventDefault()` to stop both the navigation and the page
|
|
25
|
+
* change, for example to hand navigation to a router. There is no
|
|
26
|
+
* `helix-change`, because moving to another page selects nothing.
|
|
28
27
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* **The count and the page-size control are their own elements.**
|
|
33
|
-
* `Pagination.Summary` and `Pagination.Size` sit beside this one, because a
|
|
34
|
-
* slot can only offer one place: at one end of one row, in one order.
|
|
28
|
+
* `Pagination.Summary` and `Pagination.Size` are separate elements that you
|
|
29
|
+
* place beside this one, so you choose where they go and in what order.
|
|
35
30
|
*
|
|
36
31
|
* @since 0.1.0
|
|
37
32
|
* @status stable
|
|
@@ -44,22 +39,22 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
44
39
|
* @slot next-icon - The glyph on the forward-one-page control, usually a caret.
|
|
45
40
|
* @slot previous-icon - The glyph on the back-one-page control, usually a caret.
|
|
46
41
|
*
|
|
47
|
-
* @event {HelixNavigateEvent} helix-navigate - Fired before the page changes, and cancelable.
|
|
42
|
+
* @event {HelixNavigateEvent} helix-navigate - Fired before the page changes, and cancelable. Canceling it is the only way to stop a page change.
|
|
48
43
|
*
|
|
49
44
|
* @csspart first - The control that jumps to the first page, under `ends`.
|
|
50
|
-
* @csspart gap - The control
|
|
45
|
+
* @csspart gap - The control in place of hidden pages, which jumps into them.
|
|
51
46
|
* @csspart item - One slot in the run, holding a page or a gap.
|
|
52
47
|
* @csspart last - The control that jumps to the last page, under `ends`.
|
|
53
48
|
* @csspart list - The run of pages.
|
|
54
|
-
* @csspart live - The region that
|
|
55
|
-
* @csspart mark - The glyph on a first, previous, next or last control, where none is slotted.
|
|
49
|
+
* @csspart live - The live region that announces a page change. It is clipped out of view and still read.
|
|
50
|
+
* @csspart mark - The glyph on a first, previous, next, or last control, where none is slotted.
|
|
56
51
|
* @csspart next - The control that moves forward one page.
|
|
57
52
|
* @csspart page - The control for one page.
|
|
58
53
|
* @csspart page-current - The page you are on, beside `page`.
|
|
59
54
|
* @csspart previous - The control that moves back one page.
|
|
60
|
-
* @csspart status - The
|
|
55
|
+
* @csspart status - The text that says which page you are on, in `compact`.
|
|
61
56
|
*
|
|
62
|
-
* @cssstate empty -
|
|
57
|
+
* @cssstate empty - There is one page or none, so there is nothing to page through.
|
|
63
58
|
*/
|
|
64
59
|
export declare class HelixHeadlessPagination extends HelixElement {
|
|
65
60
|
/**
|
|
@@ -67,7 +62,8 @@ export declare class HelixHeadlessPagination extends HelixElement {
|
|
|
67
62
|
*/
|
|
68
63
|
boundaries: number;
|
|
69
64
|
/**
|
|
70
|
-
*
|
|
65
|
+
* Replaces the page numbers with the current page and the page count, as
|
|
66
|
+
* written by `status-label`.
|
|
71
67
|
*
|
|
72
68
|
* A different structure rather than a different look, which is why it is
|
|
73
69
|
* here: the run of pages is gone and a single status line stands in its
|
|
@@ -79,11 +75,11 @@ export declare class HelixHeadlessPagination extends HelixElement {
|
|
|
79
75
|
*/
|
|
80
76
|
compact: boolean;
|
|
81
77
|
/**
|
|
82
|
-
*
|
|
78
|
+
* The page to open on when `page` is not set.
|
|
83
79
|
*/
|
|
84
80
|
defaultPage: number;
|
|
85
81
|
/**
|
|
86
|
-
*
|
|
82
|
+
* Shows controls that jump to the first and last pages.
|
|
87
83
|
*
|
|
88
84
|
* Off by default. The gaps already reach any page in a few presses and the
|
|
89
85
|
* last page is one of the two the run always shows, so on a short set these
|
|
@@ -102,11 +98,11 @@ export declare class HelixHeadlessPagination extends HelixElement {
|
|
|
102
98
|
*/
|
|
103
99
|
firstLabel: string;
|
|
104
100
|
/**
|
|
105
|
-
* Accessible name for a gap
|
|
101
|
+
* Accessible name for a gap. `{page}` is replaced with the page it jumps to.
|
|
106
102
|
*/
|
|
107
103
|
gapLabel: string;
|
|
108
104
|
/**
|
|
109
|
-
*
|
|
105
|
+
* The URL for each page. `{page}` is replaced with the page number.
|
|
110
106
|
*
|
|
111
107
|
* Absent renders buttons. Present renders links, which is what a paged result
|
|
112
108
|
* with its own URL should be: a crawler follows them, a middle click opens
|
|
@@ -140,7 +136,7 @@ export declare class HelixHeadlessPagination extends HelixElement {
|
|
|
140
136
|
*/
|
|
141
137
|
nextLabel: string;
|
|
142
138
|
/**
|
|
143
|
-
* The page
|
|
139
|
+
* The current page, counting from one.
|
|
144
140
|
*
|
|
145
141
|
* An accessor pair, the same shape as the calendar's `month`. Reading gives
|
|
146
142
|
* the page on show; writing sets it, and `default-page` seeds one the element
|
|
@@ -158,7 +154,8 @@ export declare class HelixHeadlessPagination extends HelixElement {
|
|
|
158
154
|
get page(): number;
|
|
159
155
|
set page(next: number);
|
|
160
156
|
/**
|
|
161
|
-
* Accessible name for one page
|
|
157
|
+
* Accessible name for one page. `{page}` and `{pages}` are replaced with the
|
|
158
|
+
* page number and the page count.
|
|
162
159
|
*/
|
|
163
160
|
pageLabel: string;
|
|
164
161
|
/**
|
|
@@ -190,7 +187,8 @@ export declare class HelixHeadlessPagination extends HelixElement {
|
|
|
190
187
|
*/
|
|
191
188
|
siblings: number;
|
|
192
189
|
/**
|
|
193
|
-
* The
|
|
190
|
+
* The text shown in `compact`. `{page}` and `{pages}` are replaced with the
|
|
191
|
+
* current page and the page count.
|
|
194
192
|
*
|
|
195
193
|
* No noun: the landmark this sits in is already named "Pagination", so
|
|
196
194
|
* "Page 7 of 24" says it twice to a screen reader and takes a third of the
|