@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,35 +1,28 @@
|
|
|
1
1
|
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
2
|
import { type TemplateResult } from 'lit';
|
|
3
3
|
/**
|
|
4
|
-
* @summary
|
|
5
|
-
*
|
|
4
|
+
* @summary A link at the start of a page that moves keyboard focus past the
|
|
5
|
+
* header to the main content.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* content.
|
|
8
|
+
* Without a skip link, keyboard users tab through the whole header on every
|
|
9
|
+
* page before they reach the content. The skip link goes first in the document
|
|
10
|
+
* and points at the content.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
* scrolls
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* them, since `<main>` cannot, is given `tabindex="-1"` for as long as it holds
|
|
18
|
-
* focus and has it taken off again when focus leaves, so the page ends up as the
|
|
19
|
-
* consumer wrote it.
|
|
12
|
+
* Pressing it moves focus as well as the scroll position. An in-page link alone
|
|
13
|
+
* scrolls but leaves focus behind, so the next Tab lands in the header. A
|
|
14
|
+
* target that cannot take focus, such as `<main>`, gets `tabindex="-1"` while
|
|
15
|
+
* it has focus, and the attribute is removed when focus leaves.
|
|
20
16
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* it scrolls there and moves the point the next Tab starts from.
|
|
17
|
+
* The press is handled in script, so no `#main` is added to the URL and no
|
|
18
|
+
* history entry is created, and a router that reads the hash is not affected.
|
|
19
|
+
* The anchor has a real `href`, so before any script runs it works as a plain
|
|
20
|
+
* link: it scrolls to the target and moves the point the next Tab starts from.
|
|
26
21
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* order as well, and a skip link nobody can reach is the most common way one is
|
|
32
|
-
* broken.
|
|
22
|
+
* The styled tier hides the link until it has focus. On this tier the link is
|
|
23
|
+
* always visible. To hide it yourself, hide `::part(link)` while the host is
|
|
24
|
+
* not `:focus-within`. Do not use `display: none` or `visibility: hidden`,
|
|
25
|
+
* because they also remove the link from the tab order.
|
|
33
26
|
*
|
|
34
27
|
* @since 0.1.0
|
|
35
28
|
* @status stable
|
|
@@ -37,15 +30,15 @@ import { type TemplateResult } from 'lit';
|
|
|
37
30
|
* @aliases Skip navigation, Skip to content
|
|
38
31
|
* @documentation https://fusion.dev/helix/components/skip-link
|
|
39
32
|
*
|
|
40
|
-
* @slot - The link's
|
|
33
|
+
* @slot - The link's text. Defaults to `label`.
|
|
41
34
|
*
|
|
42
|
-
* @csspart link - The anchor
|
|
35
|
+
* @csspart link - The anchor. It takes the focus.
|
|
43
36
|
*/
|
|
44
37
|
export declare class HelixHeadlessSkipLink extends HelixElement {
|
|
45
38
|
/** Focus goes to the anchor inside, so the host is never the focus target. */
|
|
46
39
|
static shadowRootOptions: ShadowRootInit;
|
|
47
40
|
/**
|
|
48
|
-
*
|
|
41
|
+
* The in-page fragment the link moves focus to, such as `#main`.
|
|
49
42
|
*
|
|
50
43
|
* `#main` by default, because that is the id the content region almost always
|
|
51
44
|
* has; a page whose content is somewhere else says so. Anything that is not a
|
|
@@ -54,7 +47,7 @@ export declare class HelixHeadlessSkipLink extends HelixElement {
|
|
|
54
47
|
*/
|
|
55
48
|
href: string;
|
|
56
49
|
/**
|
|
57
|
-
* The link's
|
|
50
|
+
* The link's text, when it is plain text.
|
|
58
51
|
*
|
|
59
52
|
* The fallback of the default slot, so slotted content replaces it rather than
|
|
60
53
|
* appearing beside it.
|
|
@@ -5,30 +5,27 @@ declare const HelixHeadlessSlider_base: (new (...args: any[]) => import("@fusion
|
|
|
5
5
|
* @summary A value chosen from a range by dragging.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
*
|
|
9
|
-
* page keys and the touch target
|
|
10
|
-
*
|
|
11
|
-
* platform for a finger.
|
|
8
|
+
* Renders a native `<input type="range">`, so the drag, the arrow keys, Home,
|
|
9
|
+
* End, the page keys, and the touch target come from the platform. A native
|
|
10
|
+
* range has a hit area larger than its thumb, sized for a finger.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* value. `valueAsNumber` is there for arithmetic.
|
|
12
|
+
* The value is a string, like every other form control's, and
|
|
13
|
+
* `MixinControllerValue` holds text. Use `valueAsNumber` for arithmetic.
|
|
16
14
|
*
|
|
17
|
-
*
|
|
18
|
-
* styled and
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
15
|
+
* Marks are drawn by the component. The ticks of a `<datalist>` cannot be
|
|
16
|
+
* styled, and Firefox does not render them for a range. Marks are decoration.
|
|
17
|
+
* `step` sets where the value can land, and the input enforces it whether or
|
|
18
|
+
* not marks are drawn. `markers` is a count, so a slider from zero to a hundred
|
|
19
|
+
* does not draw a hundred and one marks by accident.
|
|
22
20
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* A range with two thumbs is two inputs stacked on one track, because there is
|
|
22
|
+
* no native two-thumb range. Each thumb keeps its own value.
|
|
25
23
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* off the control and the marker beside the label is all it does.
|
|
24
|
+
* `required` comes with the field mixin and cannot fail. A range is never
|
|
25
|
+
* empty: the platform shows its midpoint when no value is set, and `willUpdate`
|
|
26
|
+
* seeds that midpoint into `defaultValue`, so the value matches the handle from
|
|
27
|
+
* the first render. HTML does not apply `required` to a range either, so it is
|
|
28
|
+
* not set on the input. It only adds the marker beside the label.
|
|
32
29
|
*
|
|
33
30
|
* @since 0.1.0
|
|
34
31
|
* @status stable
|
|
@@ -36,33 +33,33 @@ declare const HelixHeadlessSlider_base: (new (...args: any[]) => import("@fusion
|
|
|
36
33
|
* @aliases Range, Range input
|
|
37
34
|
* @documentation https://fusion.dev/helix/components/slider
|
|
38
35
|
*
|
|
39
|
-
* @event {Event} change -
|
|
40
|
-
* @event {HelixBeforeChangeEvent} helix-before-change - Fired as the value changes
|
|
41
|
-
* @event {Event} input -
|
|
36
|
+
* @event {Event} change - Fired when the user releases the thumb.
|
|
37
|
+
* @event {HelixBeforeChangeEvent} helix-before-change - Fired as the value changes. Cancelable: call `preventDefault()` to keep the current value.
|
|
38
|
+
* @event {Event} input - Fired after the value changes.
|
|
42
39
|
*
|
|
43
40
|
* @csspart control - The range input.
|
|
44
|
-
* @csspart feedback -
|
|
45
|
-
* @csspart field - The row
|
|
46
|
-
* @csspart hint -
|
|
47
|
-
* @csspart label - The
|
|
48
|
-
* @csspart marker - One mark.
|
|
41
|
+
* @csspart feedback - The error message under the track.
|
|
42
|
+
* @csspart field - The row that holds the control and its readout.
|
|
43
|
+
* @csspart hint - The help text under the track, shown while there is no error.
|
|
44
|
+
* @csspart label - The label above the track.
|
|
45
|
+
* @csspart marker - One mark on the track.
|
|
49
46
|
* @csspart marker-label - The value a mark stands at, when `marker-labels` is set.
|
|
50
47
|
* @csspart markers - The row of marks along the track.
|
|
51
|
-
* @csspart output - The current value, shown beside
|
|
48
|
+
* @csspart output - The current value, shown beside the track.
|
|
52
49
|
*
|
|
53
50
|
* @cssproperty --slider-fraction - The value as a fraction of the range, 0 to 1.
|
|
54
51
|
* @cssproperty --slider-from - Where a range's filled span starts, as a fraction of the track, 0 to 1.
|
|
55
52
|
* @cssproperty --slider-marker-at - Where one marker sits, as a percentage of the track.
|
|
56
53
|
* @cssproperty --slider-to - Where a range's filled span ends, as a fraction of the track, 0 to 1.
|
|
57
54
|
*
|
|
58
|
-
* @cssstate invalid -
|
|
55
|
+
* @cssstate invalid - The slider has an error to show, from the browser's validation or from your `feedback`.
|
|
59
56
|
*/
|
|
60
57
|
export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
|
|
61
58
|
protected readonly aria: AriaForwardController;
|
|
62
59
|
/** Typed or dragged, so every edit is announced. See `announcesInput`. */
|
|
63
60
|
protected readonly announcesInput = true;
|
|
64
61
|
/**
|
|
65
|
-
*
|
|
62
|
+
* Shows the value at each mark.
|
|
66
63
|
*/
|
|
67
64
|
markerLabels: boolean;
|
|
68
65
|
/**
|
|
@@ -82,11 +79,11 @@ export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
|
|
|
82
79
|
*/
|
|
83
80
|
markers: number;
|
|
84
81
|
/**
|
|
85
|
-
* The largest value
|
|
82
|
+
* The largest value that can be chosen.
|
|
86
83
|
*/
|
|
87
84
|
max: number;
|
|
88
85
|
/**
|
|
89
|
-
*
|
|
86
|
+
* The name of a range's upper thumb, read after the slider's label.
|
|
90
87
|
*
|
|
91
88
|
* **Named with the label rather than instead of it.** Each thumb was
|
|
92
89
|
* `aria-label="${label} maximum"`, which overrode the `<label>` and read the
|
|
@@ -96,13 +93,13 @@ export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
|
|
|
96
93
|
*/
|
|
97
94
|
maximumLabel: string;
|
|
98
95
|
/**
|
|
99
|
-
* The smallest value
|
|
96
|
+
* The smallest value that can be chosen.
|
|
100
97
|
*/
|
|
101
98
|
min: number;
|
|
102
|
-
/**
|
|
99
|
+
/** The name of a range's lower thumb, read after the slider's label. */
|
|
103
100
|
minimumLabel: string;
|
|
104
101
|
/**
|
|
105
|
-
*
|
|
102
|
+
* The direction the track runs. `vertical` stands it on end.
|
|
106
103
|
*
|
|
107
104
|
* For a level rather than a quantity: a fader, a channel, anything a reader
|
|
108
105
|
* pictures as high and low rather than as less and more. Absent is
|
|
@@ -115,7 +112,7 @@ export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
|
|
|
115
112
|
*/
|
|
116
113
|
orientation?: 'horizontal' | 'vertical';
|
|
117
114
|
/**
|
|
118
|
-
*
|
|
115
|
+
* Adds a second thumb, so the value is a pair.
|
|
119
116
|
*
|
|
120
117
|
* The pair is one string, `"10,50"`, which is what a form submits and what
|
|
121
118
|
* `MixinControllerValue` already holds. `valueAsNumber` reads the lower of
|
|
@@ -123,7 +120,7 @@ export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
|
|
|
123
120
|
*/
|
|
124
121
|
range: boolean;
|
|
125
122
|
/**
|
|
126
|
-
*
|
|
123
|
+
* Shows the chosen value beside the track.
|
|
127
124
|
*/
|
|
128
125
|
showValue: boolean;
|
|
129
126
|
/**
|
|
@@ -214,7 +211,7 @@ export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
|
|
|
214
211
|
private snapped;
|
|
215
212
|
protected willUpdate(changed: PropertyValues): void;
|
|
216
213
|
protected updated(changed: PropertyValues): void;
|
|
217
|
-
/** How far one press of an arrow key moves
|
|
214
|
+
/** How far one press of an arrow key moves the thumb. */
|
|
218
215
|
step: number;
|
|
219
216
|
protected render(): TemplateResult;
|
|
220
217
|
}
|
|
@@ -1,35 +1,29 @@
|
|
|
1
1
|
import { type Curve, HelixElement, SourceController } from '@fusion.dev/helix-core';
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
/**
|
|
4
|
-
* @summary A
|
|
4
|
+
* @summary A small chart with no axes that shows the shape of a series beside its number.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* place of the one sentence that carries the meaning, so `values` is the list
|
|
12
|
-
* and `label` is the sentence.
|
|
7
|
+
* Takes its numbers from the `values` attribute. The other charts read a table,
|
|
8
|
+
* but a table behind a small trend line would be read aloud row by row. Set
|
|
9
|
+
* `values` to the data and `label` to the one sentence a screen reader
|
|
10
|
+
* announces.
|
|
13
11
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* table behind it, and it wins where both are given.
|
|
12
|
+
* This follows the library's rule that a content property is the fallback for
|
|
13
|
+
* its slot, as with `Tooltip`'s `content` and `Avatar`'s `name`. Use `for` when
|
|
14
|
+
* a sparkline has a real table behind it. `for` wins when both are set.
|
|
18
15
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* stops. So an unlabeled sparkline is `aria-hidden`, and a labeled one is an
|
|
23
|
-
* image named by its sentence.
|
|
16
|
+
* Without a `label` the sparkline is decorative and `aria-hidden`, for example
|
|
17
|
+
* beside a stat that already says "Sessions, 1,102". With a `label` it is an
|
|
18
|
+
* image named by that sentence.
|
|
24
19
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* way.
|
|
20
|
+
* Place it beside a `Stat`, because a change beside a figure is a second fact,
|
|
21
|
+
* as `Stat`'s own spec says. `Trend` is composed the same way.
|
|
28
22
|
*
|
|
29
|
-
* The
|
|
30
|
-
*
|
|
31
|
-
* and CSS cannot,
|
|
32
|
-
* without measuring anything
|
|
23
|
+
* The component writes the properties listed below, and the stylesheet that
|
|
24
|
+
* draws the sparkline reads them. Do not set them yourself. They carry numbers
|
|
25
|
+
* the component computes and CSS cannot, so a stylesheet can draw the sparkline
|
|
26
|
+
* without measuring anything.
|
|
33
27
|
*
|
|
34
28
|
* @since 0.1.0
|
|
35
29
|
* @status stable
|
|
@@ -38,8 +32,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
38
32
|
* @documentation https://fusion.dev/helix/components/sparkline
|
|
39
33
|
*
|
|
40
34
|
* @csspart area - The region between the line and the bottom of its range.
|
|
41
|
-
* @csspart bar - One column,
|
|
42
|
-
* @csspart line - The path
|
|
35
|
+
* @csspart bar - One column, drawn when `plot="bar"`.
|
|
36
|
+
* @csspart line - The line's path.
|
|
43
37
|
* @csspart svg - The drawing.
|
|
44
38
|
* @csspart terminus - The mark on the last value.
|
|
45
39
|
* @csspart wash-end - The far stop of the area's gradient.
|
|
@@ -50,7 +44,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
50
44
|
*/
|
|
51
45
|
export declare class HelixHeadlessSparkline extends HelixElement {
|
|
52
46
|
/**
|
|
53
|
-
* How the line
|
|
47
|
+
* How the line is drawn from one reading to the next.
|
|
54
48
|
*
|
|
55
49
|
* **`smooth` is the resting curve.** A straight segment asserts nothing about
|
|
56
50
|
* the values between two readings and a curve invents them, which is why
|
|
@@ -79,7 +73,7 @@ export declare class HelixHeadlessSparkline extends HelixElement {
|
|
|
79
73
|
*/
|
|
80
74
|
curve?: Curve;
|
|
81
75
|
/**
|
|
82
|
-
* The id of a table to read
|
|
76
|
+
* The id of a table to read the readings from, when a table holds the data.
|
|
83
77
|
*
|
|
84
78
|
* The first column of numbers is the series drawn. This wins over `values`,
|
|
85
79
|
* because a table is the readable representation and a list of numbers in an
|
|
@@ -90,7 +84,7 @@ export declare class HelixHeadlessSparkline extends HelixElement {
|
|
|
90
84
|
*/
|
|
91
85
|
for: string;
|
|
92
86
|
/**
|
|
93
|
-
*
|
|
87
|
+
* A sentence that describes what the line shows.
|
|
94
88
|
*
|
|
95
89
|
* "Sessions rose from 1,240 to 1,318 and fell to 1,102 over fourteen days" is
|
|
96
90
|
* the accessible representation of a sparkline, and a list of the fourteen
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
2
|
import { type TemplateResult } from 'lit';
|
|
3
3
|
/**
|
|
4
|
-
* @summary One action in a speed dial:
|
|
4
|
+
* @summary One action in a speed dial: an icon and a name beside it.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* screen can take, which is exactly what `role="menu"` was written for. The
|
|
11
|
-
* roles follow the contents.
|
|
7
|
+
* Each item is a command, so it has the `menuitem` role. A megamenu holds
|
|
8
|
+
* destinations, so it is a disclosure of links. A speed dial holds actions,
|
|
9
|
+
* which is what `role="menu"` is for.
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* being there, so it is read, searched and translated like anything else.
|
|
11
|
+
* The name is text rendered beside the icon, and it is the accessible name. A
|
|
12
|
+
* `title` on an icon shows only on hover. Visible text is read, searched, and
|
|
13
|
+
* translated like other text.
|
|
17
14
|
*
|
|
18
15
|
* @since 0.1.0
|
|
19
16
|
* @status stable
|
|
@@ -22,21 +19,21 @@ import { type TemplateResult } from 'lit';
|
|
|
22
19
|
* @documentation https://fusion.dev/helix/components/speed-dial
|
|
23
20
|
*
|
|
24
21
|
* @slot - The action's name.
|
|
25
|
-
* @slot icon - The
|
|
22
|
+
* @slot icon - The action's icon, the main way the action is recognized.
|
|
26
23
|
*
|
|
27
|
-
* @event {HelixSelectEvent} helix-select -
|
|
24
|
+
* @event {HelixSelectEvent} helix-select - The action was chosen. Cancelable: cancel it to keep the dial open.
|
|
28
25
|
*
|
|
29
|
-
* @csspart icon - The
|
|
30
|
-
* @csspart item - The control.
|
|
31
|
-
* @csspart label - The name beside
|
|
26
|
+
* @csspart icon - The box that holds the icon.
|
|
27
|
+
* @csspart item - The control for the action.
|
|
28
|
+
* @csspart label - The action's name, beside the icon.
|
|
32
29
|
*/
|
|
33
30
|
export declare class HelixHeadlessSpeedDialItem extends HelixElement {
|
|
34
31
|
/**
|
|
35
|
-
* Whether the action
|
|
32
|
+
* Whether the action is disabled, so it cannot be chosen.
|
|
36
33
|
*/
|
|
37
34
|
disabled: boolean;
|
|
38
35
|
/**
|
|
39
|
-
*
|
|
36
|
+
* The action's value, sent in `helix-select` when the action is chosen.
|
|
40
37
|
*/
|
|
41
38
|
value: string;
|
|
42
39
|
/**
|
|
@@ -45,14 +42,17 @@ export declare class HelixHeadlessSpeedDialItem extends HelixElement {
|
|
|
45
42
|
* protected. Not a consumer's to read or set.
|
|
46
43
|
*/
|
|
47
44
|
readonly isSpeedDialItem = true;
|
|
48
|
-
/** Puts focus on the control inside
|
|
45
|
+
/** Puts focus on the control inside the item. */
|
|
49
46
|
focus(): void;
|
|
50
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Moves focus to the action. Part of `NavigableItem`, which the shared
|
|
49
|
+
* keyboard controller uses for the arrow keys.
|
|
50
|
+
*/
|
|
51
51
|
focusItem(): void;
|
|
52
|
-
/** Chooses the action,
|
|
52
|
+
/** Chooses the action, the same as pressing it. */
|
|
53
53
|
select(): void;
|
|
54
54
|
/**
|
|
55
|
-
* Whether
|
|
55
|
+
* Whether the action has focus, which is what selected means in a speed dial.
|
|
56
56
|
*
|
|
57
57
|
* Asked of the document rather than of the shadow root: focus lands on the
|
|
58
58
|
* control inside this element and the platform retargets it, so from outside
|
|
@@ -2,29 +2,26 @@ import { HelixElement, KeyboardNavigationController, type Placement, PopoverCont
|
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
declare const HelixHeadlessSpeedDial_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & typeof HelixElement;
|
|
4
4
|
/**
|
|
5
|
-
* @summary A button that
|
|
5
|
+
* @summary A floating button that opens a short list of the main actions on a screen.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* `
|
|
13
|
-
* differs: a dial has no submenus, no headers, no checkable rows and no long
|
|
14
|
-
* list to type ahead through, and shipping it as an appearance of `Menu` would
|
|
15
|
-
* mean defining what a dial with a submenu in it does.
|
|
8
|
+
* A speed dial is a menu. Its items are commands, so it uses `role="menu"` and
|
|
9
|
+
* `menuitem`, and it is built from the same pieces as `Menu`:
|
|
10
|
+
* - `KeyboardNavigationController` for the arrow keys
|
|
11
|
+
* - `PopoverController` for the panel
|
|
12
|
+
* - `MixinControllerOpen` for open and closed
|
|
16
13
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* There is no `helix-fab`, because it would re-declare `emphasis`, `tone`,
|
|
20
|
-
* `label` and a size around a control that already has all four. A round raised
|
|
21
|
-
* button is a shape, and where it sits is `data-dock` in the base layer.
|
|
14
|
+
* It is a separate component because a speed dial has no submenus, headers,
|
|
15
|
+
* checkable items, or type-ahead.
|
|
22
16
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
17
|
+
* You slot the trigger. The usual floating action button is `IconButton` with
|
|
18
|
+
* `shape="circle"` and `raised`. There is no `helix-fab`, because `IconButton`
|
|
19
|
+
* already has `emphasis`, `tone`, `label`, and a size. Position the button with
|
|
20
|
+
* `data-dock` in the base layer.
|
|
21
|
+
*
|
|
22
|
+
* All four arrow keys move through the actions, because a speed dial has no
|
|
23
|
+
* nested levels to reserve the horizontal pair for. This is the default
|
|
24
|
+
* behavior of the keyboard controller.
|
|
28
25
|
*
|
|
29
26
|
* @since 0.1.0
|
|
30
27
|
* @status stable
|
|
@@ -33,21 +30,21 @@ declare const HelixHeadlessSpeedDial_base: (new (...args: any[]) => import("@fus
|
|
|
33
30
|
* @documentation https://fusion.dev/helix/components/speed-dial
|
|
34
31
|
*
|
|
35
32
|
* @slot - The actions.
|
|
36
|
-
* @slot trigger - The control that opens
|
|
33
|
+
* @slot trigger - The control that opens the actions. Without one, a button named by `label` is drawn.
|
|
37
34
|
*
|
|
38
|
-
* @event {HelixBeforeCloseEvent} helix-before-close -
|
|
39
|
-
* @event {HelixBeforeOpenEvent} helix-before-open -
|
|
40
|
-
* @event {HelixSelectEvent} helix-select -
|
|
41
|
-
* @event {Event} toggle -
|
|
35
|
+
* @event {HelixBeforeCloseEvent} helix-before-close - The actions are about to close. Cancelable: cancel it to keep them open.
|
|
36
|
+
* @event {HelixBeforeOpenEvent} helix-before-open - The actions are about to open. Cancelable: cancel it to keep them closed.
|
|
37
|
+
* @event {HelixSelectEvent} helix-select - An action was chosen. The action sends the event, and the dial closes after it. Cancelable: cancel it to keep the dial open.
|
|
38
|
+
* @event {Event} toggle - The dial opened or closed. The event carries `newState` and `oldState`.
|
|
42
39
|
*
|
|
43
40
|
* @csspart actions - The region the actions are drawn in.
|
|
44
|
-
* @csspart trigger - The default trigger,
|
|
41
|
+
* @csspart trigger - The default trigger, drawn when none is slotted.
|
|
45
42
|
*
|
|
46
43
|
* @cssstate open - While the actions are out.
|
|
47
44
|
*/
|
|
48
45
|
export declare class HelixHeadlessSpeedDial extends HelixHeadlessSpeedDial_base {
|
|
49
46
|
/**
|
|
50
|
-
*
|
|
47
|
+
* Accessible name for the trigger and the set of actions it opens.
|
|
51
48
|
*/
|
|
52
49
|
label: string;
|
|
53
50
|
/**
|
|
@@ -55,7 +52,8 @@ export declare class HelixHeadlessSpeedDial extends HelixHeadlessSpeedDial_base
|
|
|
55
52
|
*/
|
|
56
53
|
offset: number;
|
|
57
54
|
/**
|
|
58
|
-
*
|
|
55
|
+
* The direction the actions open in. They move to another side if that side
|
|
56
|
+
* does not fit.
|
|
59
57
|
*
|
|
60
58
|
* Up by default, because the control this hangs off is usually docked to the
|
|
61
59
|
* bottom of the window and there is nothing below it to fan into.
|