@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,33 +1,24 @@
|
|
|
1
1
|
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
2
|
import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
/**
|
|
4
|
-
* @summary A timestamp,
|
|
4
|
+
* @summary A timestamp, formatted for the user's locale.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `Intl` call and a different set of options. This is that call, as an element,
|
|
10
|
-
* so a date is written where it is shown.
|
|
7
|
+
* Formats a date with `Intl` where it is shown, so you do not write the same
|
|
8
|
+
* `Intl` call and options in your own code.
|
|
11
9
|
*
|
|
12
|
-
* **`elapsed`
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* feed and three months further down it. Past six days this shows a date, which
|
|
17
|
-
* is shorter to read and impossible to misread. `elapsedTime` in `helix/core`
|
|
18
|
-
* carries the measurement.
|
|
10
|
+
* **`elapsed` shows compact relative time for a feed**, such as "42m", "3h", or
|
|
11
|
+
* "1d". After six days it shows a date. In en-US, `Intl.NumberFormat` narrow
|
|
12
|
+
* renders both `minute` and `month` as `m`, so a compact "3m" could mean three
|
|
13
|
+
* minutes or three months. `elapsedTime` in `helix/core` does the measurement.
|
|
19
14
|
*
|
|
20
|
-
* **The
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* its own reading expires rather than polling, and an element showing a date
|
|
24
|
-
* asks for nothing at all: fifty rows and fifty intervals is fifty wakeups a
|
|
25
|
-
* second where one will do, and a feed of last month's notifications should cost
|
|
26
|
-
* nothing to leave open.
|
|
15
|
+
* **The text refreshes on one timer shared by the page.** Each element
|
|
16
|
+
* schedules an update for when its current reading expires, and an element
|
|
17
|
+
* showing a date schedules none, so a long feed left open costs almost nothing.
|
|
27
18
|
*
|
|
28
|
-
*
|
|
29
|
-
* paste, and
|
|
30
|
-
*
|
|
19
|
+
* **The output is always `<time datetime>`**, so screen readers, copy and
|
|
20
|
+
* paste, and scripts parsing the page get the exact instant, whatever the
|
|
21
|
+
* visible text says.
|
|
31
22
|
*
|
|
32
23
|
* @since 0.1.0
|
|
33
24
|
* @status stable
|
|
@@ -35,11 +26,11 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
|
35
26
|
* @aliases RelativeTime, Timestamp, TimeAgo
|
|
36
27
|
* @documentation https://fusion.dev/helix/components/format-date
|
|
37
28
|
*
|
|
38
|
-
* @csspart time - The `<time>` element
|
|
29
|
+
* @csspart time - The `<time>` element that holds the formatted text.
|
|
39
30
|
*/
|
|
40
31
|
export declare class HelixHeadlessFormatDate extends HelixElement {
|
|
41
32
|
/**
|
|
42
|
-
* The timestamp,
|
|
33
|
+
* The timestamp, in any format `Date` can parse.
|
|
43
34
|
*
|
|
44
35
|
* An ISO string is what an API sends and what `<time datetime>` takes, so it
|
|
45
36
|
* is the shape that needs no translation at either end. Left unset this
|
|
@@ -61,7 +52,8 @@ export declare class HelixHeadlessFormatDate extends HelixElement {
|
|
|
61
52
|
*/
|
|
62
53
|
day?: 'numeric' | '2-digit';
|
|
63
54
|
/**
|
|
64
|
-
*
|
|
55
|
+
* Shows how long ago the timestamp was, in a compact form such as "3h", in
|
|
56
|
+
* place of the date.
|
|
65
57
|
*
|
|
66
58
|
* Reflected, because it is the one property that decides which of two readings
|
|
67
59
|
* this is and a stylesheet has a reason to know: a compact reading is a fixed
|
|
@@ -73,7 +65,7 @@ export declare class HelixHeadlessFormatDate extends HelixElement {
|
|
|
73
65
|
*/
|
|
74
66
|
hour?: 'numeric' | '2-digit';
|
|
75
67
|
/**
|
|
76
|
-
*
|
|
68
|
+
* The locale to format the timestamp in.
|
|
77
69
|
*
|
|
78
70
|
* Empty is the runtime's own.
|
|
79
71
|
*/
|
|
@@ -97,7 +89,7 @@ export declare class HelixHeadlessFormatDate extends HelixElement {
|
|
|
97
89
|
*/
|
|
98
90
|
timeZone?: string;
|
|
99
91
|
/**
|
|
100
|
-
*
|
|
92
|
+
* Shows the name of the time zone, in its `long` or `short` form.
|
|
101
93
|
*/
|
|
102
94
|
timeZoneName?: 'long' | 'short';
|
|
103
95
|
/**
|
|
@@ -3,29 +3,28 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
|
3
3
|
import '../../tooltip/index.js';
|
|
4
4
|
declare const HelixHeadlessHeatmap_base: typeof HelixElement & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinChartSourceInterface);
|
|
5
5
|
/**
|
|
6
|
-
* @summary A strip of cells colored by
|
|
6
|
+
* @summary A strip of cells, each colored by its reading, for uptime, contributions, or activity.
|
|
7
7
|
*
|
|
8
8
|
* @description
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* A grid of cells, each colored by a tone. `rows="1"` makes a status strip, and
|
|
10
|
+
* `rows="7"` makes a contribution graph. GitHub's contribution graph uses five
|
|
11
|
+
* discrete levels, which a set of tones covers.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* differently colored cells would be ninety series.
|
|
13
|
+
* Color in a heatmap is per cell. In every other Helix chart, color is per
|
|
14
|
+
* series, so ninety differently colored cells would need ninety series.
|
|
16
15
|
*
|
|
17
|
-
* **The data is a real `<table>` named by `for`**,
|
|
18
|
-
*
|
|
19
|
-
* `data-hidden-visually
|
|
16
|
+
* **The data is a real `<table>` named by `for`**, as in every Helix chart, and
|
|
17
|
+
* the table is the accessible representation. Hide it with
|
|
18
|
+
* `data-hidden-visually`, and screen readers still read it.
|
|
20
19
|
*
|
|
21
20
|
* A cell takes its tone from its own `data-tone`, or from `thresholds` and
|
|
22
|
-
* `tones`
|
|
23
|
-
*
|
|
21
|
+
* `tones` applied to its value. `data-tone` wins, so when you already know a
|
|
22
|
+
* day was degraded, you can set the tone directly.
|
|
24
23
|
*
|
|
25
|
-
* **
|
|
26
|
-
* `--heatmap-tone: var(--heatmap-tone-success)
|
|
27
|
-
*
|
|
28
|
-
*
|
|
24
|
+
* **The headless tier does not resolve tone names.** A tone named `success`
|
|
25
|
+
* writes `--heatmap-tone: var(--heatmap-tone-success)`, and the styled tier or
|
|
26
|
+
* your own stylesheet defines that property. The headless tier does not use
|
|
27
|
+
* `var(--helix-color-*)`.
|
|
29
28
|
*
|
|
30
29
|
* @since 0.1.0
|
|
31
30
|
* @status stable
|
|
@@ -35,12 +34,12 @@ declare const HelixHeadlessHeatmap_base: typeof HelixElement & (new (...args: an
|
|
|
35
34
|
*
|
|
36
35
|
* @slot end - Below the strip, at the trailing edge: usually the newest date.
|
|
37
36
|
* @slot start - Below the strip, at the leading edge: usually the oldest date.
|
|
38
|
-
* @slot summary - Below the strip, in the middle:
|
|
37
|
+
* @slot summary - Below the strip, in the middle: a summary of the range shown.
|
|
39
38
|
*
|
|
40
|
-
* @event {HelixResizeEvent} helix-resize - Fired when the number of cells drawn changes,
|
|
39
|
+
* @event {HelixResizeEvent} helix-resize - Fired when the number of cells drawn changes, with the new number.
|
|
41
40
|
*
|
|
42
41
|
* @csspart cell - One reading.
|
|
43
|
-
* @csspart empty - Shown when the table has no readings
|
|
42
|
+
* @csspart empty - Shown when the table has no readings. It stays hidden until the table can be read: on the server and during hydration, there is no document to resolve `for` in.
|
|
44
43
|
* @csspart end - The trailing slot's box.
|
|
45
44
|
* @csspart footer - The three-slot row under the strip.
|
|
46
45
|
* @csspart mark - The invisible point the tooltip is anchored to.
|
|
@@ -50,33 +49,33 @@ declare const HelixHeadlessHeatmap_base: typeof HelixElement & (new (...args: an
|
|
|
50
49
|
* @csspart tooltip - The bubble, forwarded from `Tooltip`.
|
|
51
50
|
* @csspart tooltip-anchor - The `Tooltip` element itself.
|
|
52
51
|
* @csspart tooltip-arrow - The bubble's point, forwarded from `Tooltip`.
|
|
53
|
-
* @csspart tooltip-arrow-bottom - The point while the bubble is below the reading,
|
|
54
|
-
* @csspart tooltip-arrow-left - The point while the bubble is left of the reading,
|
|
55
|
-
* @csspart tooltip-arrow-right - The point while the bubble is right of the reading,
|
|
56
|
-
* @csspart tooltip-arrow-top - The point while the bubble is above the reading,
|
|
57
|
-
* @csspart tooltip-bottom - The bubble while it is below the reading
|
|
52
|
+
* @csspart tooltip-arrow-bottom - The point while the bubble is below the reading, on its top edge. Set alongside `tooltip-arrow`.
|
|
53
|
+
* @csspart tooltip-arrow-left - The point while the bubble is left of the reading, on its right edge. Set alongside `tooltip-arrow`.
|
|
54
|
+
* @csspart tooltip-arrow-right - The point while the bubble is right of the reading, on its left edge. Set alongside `tooltip-arrow`.
|
|
55
|
+
* @csspart tooltip-arrow-top - The point while the bubble is above the reading, on its bottom edge. Set alongside `tooltip-arrow`.
|
|
56
|
+
* @csspart tooltip-bottom - The bubble while it is below the reading. Set alongside `tooltip`.
|
|
58
57
|
* @csspart tooltip-cell - One column's name and value inside the tooltip.
|
|
59
58
|
* @csspart tooltip-label - The reading's own name inside the tooltip.
|
|
60
|
-
* @csspart tooltip-left - The bubble while it is left of the reading
|
|
59
|
+
* @csspart tooltip-left - The bubble while it is left of the reading. Set alongside `tooltip`.
|
|
61
60
|
* @csspart tooltip-name - A column's name inside the tooltip.
|
|
62
|
-
* @csspart tooltip-right - The bubble while it is right of the reading
|
|
63
|
-
* @csspart tooltip-top - The bubble while it is above the reading
|
|
61
|
+
* @csspart tooltip-right - The bubble while it is right of the reading. Set alongside `tooltip`.
|
|
62
|
+
* @csspart tooltip-top - The bubble while it is above the reading. Set alongside `tooltip`.
|
|
64
63
|
* @csspart tooltip-value - A column's value inside the tooltip.
|
|
65
64
|
*
|
|
66
|
-
* @cssproperty --heatmap-rows - How many rows the strip lays out.
|
|
67
|
-
* @cssproperty --heatmap-tone - The tone of the cell
|
|
68
|
-
* @cssproperty --heatmap-tone-1 - The
|
|
65
|
+
* @cssproperty --heatmap-rows - How many rows the strip lays out. The component writes it from the data, and the stylesheet that draws the strip reads it.
|
|
66
|
+
* @cssproperty --heatmap-tone - The tone of the cell it is set on. The component writes it, and the stylesheet that paints the cell reads it.
|
|
67
|
+
* @cssproperty --heatmap-tone-1 - The weakest step of the magnitude ramp, used by `tones="1 …"`.
|
|
69
68
|
* @cssproperty --heatmap-tone-2 - The second step of the magnitude ramp.
|
|
70
69
|
* @cssproperty --heatmap-tone-3 - The third step of the magnitude ramp.
|
|
71
70
|
* @cssproperty --heatmap-tone-4 - The fourth step of the magnitude ramp.
|
|
72
|
-
* @cssproperty --heatmap-tone-5 - The
|
|
73
|
-
* @cssproperty --heatmap-tone-accent -
|
|
74
|
-
* @cssproperty --heatmap-tone-danger -
|
|
75
|
-
* @cssproperty --heatmap-tone-info -
|
|
76
|
-
* @cssproperty --heatmap-tone-muted -
|
|
77
|
-
* @cssproperty --heatmap-tone-primary -
|
|
78
|
-
* @cssproperty --heatmap-tone-success -
|
|
79
|
-
* @cssproperty --heatmap-tone-warning -
|
|
71
|
+
* @cssproperty --heatmap-tone-5 - The strongest step of the magnitude ramp.
|
|
72
|
+
* @cssproperty --heatmap-tone-accent - The color of the `accent` tone.
|
|
73
|
+
* @cssproperty --heatmap-tone-danger - The color of the `danger` tone.
|
|
74
|
+
* @cssproperty --heatmap-tone-info - The color of the `info` tone.
|
|
75
|
+
* @cssproperty --heatmap-tone-muted - The color of the `muted` tone: a quiet background, for a bucket that means nothing happened.
|
|
76
|
+
* @cssproperty --heatmap-tone-primary - The color of the `primary` tone.
|
|
77
|
+
* @cssproperty --heatmap-tone-success - The color of the `success` tone, named in `tones` or in `data-tone`.
|
|
78
|
+
* @cssproperty --heatmap-tone-warning - The color of the `warning` tone.
|
|
80
79
|
*/
|
|
81
80
|
export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
|
|
82
81
|
/**
|
|
@@ -87,8 +86,8 @@ export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
|
|
|
87
86
|
*/
|
|
88
87
|
emptyText: string;
|
|
89
88
|
/**
|
|
90
|
-
* Space between cells, in CSS pixels
|
|
91
|
-
*
|
|
89
|
+
* Space between cells, in CSS pixels. It is a number for the same reason
|
|
90
|
+
* `min-cell` is.
|
|
92
91
|
*/
|
|
93
92
|
gap: number;
|
|
94
93
|
/**
|
|
@@ -132,7 +131,7 @@ export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
|
|
|
132
131
|
*/
|
|
133
132
|
thresholds: string;
|
|
134
133
|
/**
|
|
135
|
-
*
|
|
134
|
+
* The tone for each bucket, in the same order as `thresholds`.
|
|
136
135
|
*
|
|
137
136
|
* A name, resolved as `--heatmap-tone-<name>` by whichever tier answers.
|
|
138
137
|
* **`"1"` through `"5"` are a ramp and everything else is a category**, which
|
|
@@ -2,31 +2,27 @@ import { HelixElement } from '@fusion.dev/helix-core';
|
|
|
2
2
|
import { type HelixIcon } from '@fusion.dev/helix-icons';
|
|
3
3
|
import { nothing, type TemplateResult } from 'lit';
|
|
4
4
|
/**
|
|
5
|
-
* @summary
|
|
5
|
+
* @summary A named icon from the Helix set.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
* The
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* model would draw a fraction of the set and quietly drop the rest.
|
|
8
|
+
* The icons are Phosphor, drawn on a 256 box at stroke-width 16. Each glyph
|
|
9
|
+
* renders its full inner markup, because most icons are several elements, each
|
|
10
|
+
* with its own stroke and fill.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* what makes `unsafeSVG` the right tool rather than a risk.
|
|
12
|
+
* The markup is generated at build time from SVG files in this repository and
|
|
13
|
+
* never comes from user input, so rendering it with `unsafeSVG` is safe.
|
|
16
14
|
*
|
|
17
|
-
* The `<svg>` carries `fill="currentColor"
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* outline icons looked fine and hid this.
|
|
15
|
+
* The `<svg>` carries `fill="currentColor"`. The generator keeps only the inner
|
|
16
|
+
* markup, and Phosphor sets its fill on the root tag that the generator
|
|
17
|
+
* discards. Without it, the 65 solid glyphs fall back to black and disappear on
|
|
18
|
+
* a dark background. Shapes that set their own `fill` or `stroke` are
|
|
19
|
+
* unaffected.
|
|
23
20
|
*
|
|
24
|
-
* A name with no match renders nothing
|
|
25
|
-
* typo cannot leave a hole in a layout that looks deliberate.
|
|
21
|
+
* A name with no match renders nothing.
|
|
26
22
|
*
|
|
27
|
-
* An icon is decorative by default and hidden from assistive technology.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
23
|
+
* An icon is decorative by default and hidden from assistive technology. Set
|
|
24
|
+
* `label` only when the icon is the only carrier of meaning, such as in a
|
|
25
|
+
* button with no text.
|
|
30
26
|
*
|
|
31
27
|
* @since 0.1.0
|
|
32
28
|
* @status stable
|
|
@@ -38,7 +34,7 @@ import { nothing, type TemplateResult } from 'lit';
|
|
|
38
34
|
*/
|
|
39
35
|
export declare class HelixHeadlessIcon extends HelixElement {
|
|
40
36
|
/**
|
|
41
|
-
* The icon
|
|
37
|
+
* The icon to draw, as an object you import.
|
|
42
38
|
*
|
|
43
39
|
* **The scalable door, and the one this library uses internally.** An icon is
|
|
44
40
|
* data, `{ content, name, viewBox }`, so a value imported by name ships one
|
|
@@ -53,11 +49,13 @@ export declare class HelixHeadlessIcon extends HelixElement {
|
|
|
53
49
|
*/
|
|
54
50
|
icon?: HelixIcon;
|
|
55
51
|
/**
|
|
56
|
-
*
|
|
52
|
+
* The icon's name, read by screen readers. Set it for an icon that is not
|
|
53
|
+
* decorative.
|
|
57
54
|
*/
|
|
58
55
|
label: string;
|
|
59
56
|
/**
|
|
60
|
-
*
|
|
57
|
+
* Flips the glyph on a right-to-left page. Use it for an arrow that means
|
|
58
|
+
* forward or back.
|
|
61
59
|
*
|
|
62
60
|
* Asked for rather than inferred from the name. The names are physical, and
|
|
63
61
|
* `arrow-left` drawn pointing right on an Arabic page would be the icon
|
|
@@ -65,7 +63,7 @@ export declare class HelixHeadlessIcon extends HelixElement {
|
|
|
65
63
|
*/
|
|
66
64
|
mirror: boolean;
|
|
67
65
|
/**
|
|
68
|
-
*
|
|
66
|
+
* The name of the icon in the Helix set.
|
|
69
67
|
*
|
|
70
68
|
* **A lookup, and the reason both this and `icon` exist.** A name is a string,
|
|
71
69
|
* so it is what markup can carry, and resolving one means an index of the
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import { HelixHeadlessButton } from '../../button/root/button-root.js';
|
|
2
2
|
/**
|
|
3
|
-
* @summary A button whose content is an icon,
|
|
3
|
+
* @summary A button whose content is an icon, named by its `label`.
|
|
4
4
|
*
|
|
5
5
|
* @description
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* toolbar becomes unusable without sight. `label` is not optional in practice,
|
|
11
|
-
* and having a component that says so is what makes it reviewable.
|
|
6
|
+
* A button with an icon for its content. Always set `label`: an icon-only
|
|
7
|
+
* control has no accessible name unless you give it one, and a button whose
|
|
8
|
+
* content is a glyph is announced as "button" and nothing else. A separate
|
|
9
|
+
* component with a `label` makes the name something a review can check.
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
11
|
+
* The element is registered, so other headless components can render
|
|
12
|
+
* `helix-headless-icon-button`, for example as an announcement's dismiss
|
|
13
|
+
* control. They do not depend on a styled tag, which would never upgrade in
|
|
14
|
+
* this tier.
|
|
17
15
|
*
|
|
18
|
-
*
|
|
19
|
-
* and an icon-only button is
|
|
20
|
-
* different content and a different shape
|
|
16
|
+
* Icon Button is a top-level component. A namespace such as `Button.Icon` would
|
|
17
|
+
* mean a part of a button, and an icon-only button is a complete button with
|
|
18
|
+
* different content and a different shape.
|
|
21
19
|
*
|
|
22
20
|
* @since 0.1.0
|
|
23
21
|
* @status stable
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
/**
|
|
4
|
-
* @summary
|
|
4
|
+
* @summary An image that shows a placeholder while it loads and a fallback if it fails.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* states and the two events that move between them, and leaves the box to the
|
|
12
|
-
* stylesheet.
|
|
7
|
+
* Image handles the part CSS cannot: when the picture has loaded, or that it
|
|
8
|
+
* failed. `aspect-ratio` in your stylesheet reserves the box. The element
|
|
9
|
+
* tracks three states and relays the two events that move between them, and
|
|
10
|
+
* leaves the box to the stylesheet.
|
|
13
11
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* The `placeholder` slot is empty by default, so the headless tier does not
|
|
13
|
+
* depend on `Skeleton`, which it does not ship.
|
|
16
14
|
*
|
|
17
15
|
* @since 0.1.0
|
|
18
16
|
* @status stable
|
|
@@ -20,31 +18,31 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
20
18
|
* @aliases Picture, Img, Figure
|
|
21
19
|
* @documentation https://fusion.dev/helix/components/image
|
|
22
20
|
*
|
|
23
|
-
* @slot fallback - Shown
|
|
24
|
-
* @slot placeholder - Shown until the
|
|
21
|
+
* @slot fallback - Shown in place of the image if it fails to load.
|
|
22
|
+
* @slot placeholder - Shown until the image loads.
|
|
25
23
|
*
|
|
26
|
-
* @event {Event} error - Relayed
|
|
27
|
-
* @event {Event} load - Relayed
|
|
24
|
+
* @event {Event} error - The image failed to load. Relayed from the inner image, whose own event stays inside the shadow root.
|
|
25
|
+
* @event {Event} load - The image loaded. Relayed from the inner image, whose own event stays inside the shadow root.
|
|
28
26
|
*
|
|
29
|
-
* @csspart fallback -
|
|
30
|
-
* @csspart image - The
|
|
31
|
-
* @csspart placeholder -
|
|
27
|
+
* @csspart fallback - The fallback, shown when the image fails to load.
|
|
28
|
+
* @csspart image - The image itself.
|
|
29
|
+
* @csspart placeholder - The placeholder, shown until the image loads.
|
|
32
30
|
*/
|
|
33
31
|
export declare class HelixHeadlessImage extends HelixElement {
|
|
34
32
|
/**
|
|
35
|
-
*
|
|
33
|
+
* A text description of the image, read by screen readers.
|
|
36
34
|
*
|
|
37
35
|
* Empty is a real answer and means decoration. Omitting the attribute is not
|
|
38
36
|
* the same thing: a reader with nothing to read announces the file name.
|
|
39
37
|
*/
|
|
40
38
|
alt: string;
|
|
41
39
|
/**
|
|
42
|
-
* How the
|
|
43
|
-
*
|
|
40
|
+
* How the image is fetched across origins. It decides whether a canvas can
|
|
41
|
+
* read the image.
|
|
44
42
|
*/
|
|
45
43
|
crossOrigin: 'anonymous' | 'use-credentials' | null;
|
|
46
44
|
/**
|
|
47
|
-
* Whether the browser may decode off the main thread.
|
|
45
|
+
* Whether the browser may decode the image off the main thread.
|
|
48
46
|
*
|
|
49
47
|
* `async` is the resting value and right for a picture in a page. `sync` is
|
|
50
48
|
* what a consumer reaches for when the picture is about to be composited with
|
|
@@ -52,7 +50,8 @@ export declare class HelixHeadlessImage extends HelixElement {
|
|
|
52
50
|
*/
|
|
53
51
|
decoding: 'async' | 'auto' | 'sync';
|
|
54
52
|
/**
|
|
55
|
-
* How urgently
|
|
53
|
+
* How urgently the browser fetches the image. Set `high` on the main image
|
|
54
|
+
* of a page.
|
|
56
55
|
*
|
|
57
56
|
* The hero of a page is usually its largest contentful paint, and the fix is
|
|
58
57
|
* two attributes rather than one: `loading="eager"` stops it waiting for the
|
|
@@ -62,7 +61,8 @@ export declare class HelixHeadlessImage extends HelixElement {
|
|
|
62
61
|
*/
|
|
63
62
|
fetchPriority: 'auto' | 'high' | 'low';
|
|
64
63
|
/**
|
|
65
|
-
* Whether to
|
|
64
|
+
* Whether the image waits to load until it is nearly on screen. Defaults to
|
|
65
|
+
* `lazy`.
|
|
66
66
|
*
|
|
67
67
|
* `lazy` by default, which is the opposite of the platform's, because a
|
|
68
68
|
* picture worth putting in a component is usually below the fold and the one
|
|
@@ -74,19 +74,19 @@ export declare class HelixHeadlessImage extends HelixElement {
|
|
|
74
74
|
*/
|
|
75
75
|
referrerPolicy: string;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* The width the image takes in the layout, passed through to the inner image.
|
|
78
78
|
*/
|
|
79
79
|
sizes: string;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* The URL of the image.
|
|
82
82
|
*/
|
|
83
83
|
src: string;
|
|
84
84
|
/**
|
|
85
|
-
* The candidate widths, passed through to the
|
|
85
|
+
* The candidate files and their widths, passed through to the inner image.
|
|
86
86
|
*/
|
|
87
87
|
srcset: string;
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* The loading state: `loading`, `loaded`, or `error`.
|
|
90
90
|
*
|
|
91
91
|
* Read-only to a consumer: it is a report rather than a setting.
|
|
92
92
|
*
|
|
@@ -185,13 +185,13 @@ export declare class HelixHeadlessImage extends HelixElement {
|
|
|
185
185
|
* nowhere else on the page.
|
|
186
186
|
*/
|
|
187
187
|
private get image();
|
|
188
|
-
/** Whether the
|
|
188
|
+
/** Whether the image has finished loading, successfully or not. */
|
|
189
189
|
get complete(): boolean;
|
|
190
|
-
/**
|
|
190
|
+
/** The candidate the browser chose from `srcset`. */
|
|
191
191
|
get currentSrc(): string;
|
|
192
|
-
/** The
|
|
192
|
+
/** The image's intrinsic height in pixels. Zero until the image loads. */
|
|
193
193
|
get naturalHeight(): number;
|
|
194
|
-
/** The
|
|
194
|
+
/** The image's intrinsic width in pixels. Zero until the image loads. */
|
|
195
195
|
get naturalWidth(): number;
|
|
196
196
|
protected render(): TemplateResult;
|
|
197
197
|
}
|