@fusion.dev/helix-headless 0.105.0 → 0.107.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +7324 -3890
- package/dist/accordion/item/accordion-item.d.ts +17 -16
- package/dist/accordion/root/accordion-root.d.ts +13 -17
- package/dist/announcement/root/announcement-root.d.ts +24 -31
- package/dist/app-header/root/app-header-root.d.ts +14 -14
- package/dist/area-chart/root/area-chart-root.d.ts +29 -48
- package/dist/avatar/group/avatar-group.d.ts +6 -8
- package/dist/avatar/root/avatar-root.d.ts +11 -11
- package/dist/badge/root/badge-root.d.ts +14 -15
- package/dist/bar-chart/root/bar-chart-root.d.ts +40 -44
- package/dist/blockquote/root/blockquote-root.d.ts +5 -7
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +25 -33
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +12 -11
- package/dist/button/root/button-root.d.ts +16 -17
- package/dist/button-group/root/button-group-root.d.ts +9 -10
- package/dist/callout/root/callout-root.d.ts +10 -15
- package/dist/canvas/edge/canvas-edge.d.ts +21 -21
- package/dist/canvas/node/canvas-node.d.ts +43 -45
- package/dist/canvas/root/canvas-root.d.ts +100 -99
- package/dist/card/root/card-root.d.ts +10 -12
- package/dist/carousel/root/carousel-root.d.ts +32 -33
- package/dist/chat/composer/chat-composer.d.ts +24 -26
- package/dist/chat/message/chat-message.d.ts +30 -33
- package/dist/chat/root/chat-root.d.ts +63 -80
- package/dist/checkbox/root/checkbox-root.d.ts +30 -32
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +25 -25
- package/dist/code/root/code-root.d.ts +6 -10
- package/dist/code-block/root/code-block-root.d.ts +35 -48
- package/dist/color-input/root/color-input-root.d.ts +52 -56
- package/dist/color-picker/root/color-picker-root.d.ts +49 -49
- package/dist/combobox/root/combobox-root.d.ts +52 -53
- package/dist/command/root/command-root.d.ts +35 -40
- package/dist/copy-button/root/copy-button-root.d.ts +24 -26
- package/dist/data-table/root/data-table-root.d.ts +106 -107
- package/dist/date-input/root/date-input-root.d.ts +54 -53
- package/dist/date-picker/root/date-picker-root.d.ts +25 -21
- package/dist/description-list/item/description-list-item.d.ts +7 -7
- package/dist/description-list/root/description-list-root.d.ts +10 -15
- package/dist/dialog/root/dialog-root.d.ts +22 -19
- package/dist/divider/root/divider-root.d.ts +12 -13
- package/dist/donut-chart/root/donut-chart-root.d.ts +19 -20
- package/dist/drawer/root/drawer-root.d.ts +19 -18
- package/dist/drilldown/item/drilldown-item.d.ts +28 -28
- package/dist/drilldown/root/drilldown-root.d.ts +22 -28
- package/dist/element-events.generated.js +7 -0
- package/dist/empty/root/empty-root.d.ts +16 -19
- package/dist/file-input/root/file-input-root.d.ts +32 -32
- package/dist/filter-input/chip/filter-chip.d.ts +36 -39
- package/dist/filter-input/field/filter-field.d.ts +25 -31
- package/dist/filter-input/menu/filter-menu.d.ts +50 -47
- package/dist/filter-input/operator/filter-operator.d.ts +15 -20
- package/dist/filter-input/root/filter-input-root.d.ts +80 -98
- package/dist/format-date/root/format-date-root.d.ts +19 -27
- package/dist/heatmap/root/heatmap-root.d.ts +40 -41
- package/dist/icon/root/icon-root.d.ts +21 -23
- package/dist/icon-button/root/icon-button-root.d.ts +12 -14
- package/dist/image/root/image-root.d.ts +30 -30
- package/dist/input/root/input-root.d.ts +36 -35
- package/dist/kbd/root/kbd-root.d.ts +13 -15
- package/dist/legend/root/legend-root.d.ts +18 -16
- package/dist/lightbox/item/lightbox-item.d.ts +13 -15
- package/dist/lightbox/root/lightbox-root.d.ts +40 -41
- package/dist/line-chart/root/line-chart-root.d.ts +20 -29
- package/dist/list/item/list-item.d.ts +17 -22
- package/dist/list/root/list-root.d.ts +6 -7
- package/dist/listbox/root/listbox-root.d.ts +42 -41
- package/dist/loader/root/loader-root.d.ts +16 -20
- package/dist/map/area/map-area.d.ts +6 -0
- package/dist/map/area/map-area.js +3 -0
- package/dist/map/buildings/map-buildings.d.ts +45 -0
- package/dist/map/buildings/map-buildings.js +37 -0
- package/dist/map/contours/map-contours.d.ts +61 -0
- package/dist/map/contours/map-contours.js +54 -0
- package/dist/map/index.d.ts +7 -0
- package/dist/map/index.js +5 -0
- package/dist/map/landcover/map-landcover.d.ts +47 -0
- package/dist/map/landcover/map-landcover.js +37 -0
- package/dist/map/marker/map-marker.d.ts +11 -4
- package/dist/map/marker/map-marker.js +13 -1
- package/dist/map/points/map-points.d.ts +7 -1
- package/dist/map/points/map-points.js +3 -0
- package/dist/map/raster/map-raster.d.ts +84 -0
- package/dist/map/raster/map-raster.js +96 -0
- package/dist/map/root/map-root.d.ts +169 -7
- package/dist/map/root/map-root.js +352 -4
- package/dist/map/route/map-route.d.ts +6 -0
- package/dist/map/route/map-route.js +3 -0
- package/dist/map/terrain/map-terrain.d.ts +68 -0
- package/dist/map/terrain/map-terrain.js +58 -0
- package/dist/megamenu/root/megamenu-root.d.ts +27 -25
- package/dist/menu/item/menu-item.d.ts +30 -31
- package/dist/menu/root/menu-root.d.ts +25 -29
- package/dist/meter/root/meter-root.d.ts +22 -21
- package/dist/navigation/root/navigation-root.d.ts +13 -16
- package/dist/notifications/group/notification-group.d.ts +27 -28
- package/dist/notifications/notification/notification.d.ts +35 -42
- package/dist/notifications/root/notifications-root.d.ts +22 -24
- package/dist/number-input/root/number-input-root.d.ts +46 -50
- package/dist/object-inspector/root/object-inspector-root.d.ts +46 -58
- package/dist/option/group/option-group.d.ts +11 -11
- package/dist/option/root/option-root.d.ts +28 -33
- package/dist/outline/root/outline-root.d.ts +18 -17
- package/dist/pagination/root/pagination-root.d.ts +37 -39
- package/dist/pagination/size/pagination-size.d.ts +37 -43
- package/dist/pagination/summary/pagination-summary.d.ts +12 -14
- package/dist/pin-input/root/pin-input-root.d.ts +32 -38
- package/dist/popover/root/popover-root.d.ts +16 -21
- package/dist/progress/root/progress-root.d.ts +16 -14
- package/dist/qr-code/root/qr-code-root.d.ts +22 -25
- package/dist/quote/root/quote-root.d.ts +5 -6
- package/dist/radio/group/radio-group.d.ts +26 -28
- package/dist/radio/root/radio-root.d.ts +24 -28
- package/dist/rating/root/rating-root.d.ts +27 -30
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +43 -55
- package/dist/scroll-area/root/scroll-area-root.d.ts +15 -21
- package/dist/select/root/select-root.d.ts +41 -44
- package/dist/skeleton/root/skeleton-root.d.ts +7 -8
- package/dist/skip-link/root/skip-link-root.d.ts +21 -28
- package/dist/slider/root/slider-root.d.ts +36 -39
- package/dist/sparkline/root/sparkline-root.d.ts +22 -28
- package/dist/speed-dial/item/speed-dial-item.d.ts +21 -21
- package/dist/speed-dial/root/speed-dial-root.d.ts +25 -27
- package/dist/splitter/root/splitter-root.d.ts +37 -41
- package/dist/stat/group/stat-group.d.ts +4 -4
- package/dist/stat/root/stat-root.d.ts +8 -9
- package/dist/steps/root/steps-root.d.ts +11 -14
- package/dist/steps/step/step.d.ts +22 -29
- package/dist/switch/root/switch-root.d.ts +20 -24
- package/dist/table/cell/table-cell.d.ts +18 -8
- package/dist/table/cell/table-cell.js +5 -1
- package/dist/table/column/table-column.d.ts +62 -55
- package/dist/table/root/table-root.d.ts +16 -17
- package/dist/table/row/table-row.d.ts +3 -3
- package/dist/tabs/panel/tab-panel.d.ts +3 -3
- package/dist/tabs/root/tabs-root.d.ts +19 -17
- package/dist/tabs/tab/tab.d.ts +6 -6
- package/dist/tag/root/tag-root.d.ts +11 -12
- package/dist/textarea/root/textarea-root.d.ts +29 -32
- package/dist/time-input/root/time-input-root.d.ts +70 -69
- package/dist/time-picker/root/time-picker-root.d.ts +58 -66
- package/dist/timeline/item/timeline-item.d.ts +18 -24
- package/dist/timeline/root/timeline-root.d.ts +13 -21
- package/dist/toast/item/toast-item.d.ts +21 -22
- package/dist/toast/root/toast-root.d.ts +18 -23
- package/dist/toggle/group/toggle-group.d.ts +23 -25
- package/dist/toggle/root/toggle-root.d.ts +8 -8
- package/dist/toolbar/root/toolbar-root.d.ts +7 -10
- package/dist/tooltip/root/tooltip-root.d.ts +41 -47
- package/dist/tour/root/tour-root.d.ts +24 -26
- package/dist/tour/stop/tour-stop.d.ts +39 -48
- package/dist/tree/item/tree-item.d.ts +23 -25
- package/dist/tree/root/tree-root.d.ts +13 -12
- package/dist/trend/root/trend-root.d.ts +18 -19
- package/dist/video/root/video-root.d.ts +108 -101
- package/dist/video-playlist/item/video-playlist-item.d.ts +23 -28
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +17 -21
- package/dist/video-playlist/root/video-playlist-root.d.ts +21 -25
- package/dist/virtual-list/root/virtual-list-root.d.ts +27 -26
- package/package.json +5 -5
- package/types/jsx.d.ts +10363 -9520
- package/types/svelte.d.ts +5 -0
- package/types/vue.d.ts +1440 -1032
|
@@ -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
|
}
|
|
@@ -4,25 +4,23 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
4
4
|
export type InputType = 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url';
|
|
5
5
|
declare const HelixHeadlessInput_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerValueInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinFieldInterface) & typeof HelixFormElement;
|
|
6
6
|
/**
|
|
7
|
-
* @summary A single line of text
|
|
7
|
+
* @summary A field for a single line of text.
|
|
8
8
|
*
|
|
9
9
|
* @description
|
|
10
|
-
* Renders a real `<input>`, so the caret, selection, autofill, spellcheck,
|
|
11
|
-
* password
|
|
12
|
-
*
|
|
13
|
-
* before any script loads.
|
|
10
|
+
* Renders a real `<input>`, so the caret, selection, autofill, spellcheck,
|
|
11
|
+
* password managers, and a phone's on-screen keyboard all work natively. The
|
|
12
|
+
* field is in the server markup, so it works before any script loads.
|
|
14
13
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* answers a form reset.
|
|
14
|
+
* An input inside a shadow root does not submit with a form outside it, so the
|
|
15
|
+
* host is form-associated and reports its value through `ElementInternals`.
|
|
16
|
+
* That also carries validity and handles a form reset.
|
|
19
17
|
*
|
|
20
|
-
* `value` and `defaultValue`
|
|
21
|
-
*
|
|
22
|
-
*
|
|
18
|
+
* `value` and `defaultValue` work like `checked` and `defaultChecked`. `value`
|
|
19
|
+
* is what is in the field now, and `defaultValue` is the value from the markup,
|
|
20
|
+
* which a reset restores.
|
|
23
21
|
*
|
|
24
|
-
*
|
|
25
|
-
* input and its `validity` is copied
|
|
22
|
+
* Validity comes from the browser. `type` and `required` are set on the real
|
|
23
|
+
* input, and its `validity` is copied to the host.
|
|
26
24
|
*
|
|
27
25
|
* @since 0.1.0
|
|
28
26
|
* @status stable
|
|
@@ -33,34 +31,35 @@ declare const HelixHeadlessInput_base: (new (...args: any[]) => import("@fusion.
|
|
|
33
31
|
* @slot end - After the text, for an icon or a unit.
|
|
34
32
|
* @slot start - Before the text, for an icon or a prefix.
|
|
35
33
|
*
|
|
36
|
-
* @event {Event} change -
|
|
37
|
-
* @event {HelixBeforeChangeEvent} helix-before-change -
|
|
38
|
-
* @event {Event} input -
|
|
34
|
+
* @event {Event} change - Sent when the user finishes changing the value. Relayed from the native input.
|
|
35
|
+
* @event {HelixBeforeChangeEvent} helix-before-change - The text is about to change. Cancelable: cancel it to keep the current text.
|
|
36
|
+
* @event {Event} input - Fired as the value changes.
|
|
39
37
|
*
|
|
40
38
|
* @csspart clear - The button that empties the field.
|
|
41
|
-
* @csspart control - The input
|
|
42
|
-
* @csspart feedback -
|
|
43
|
-
* @csspart field - The box
|
|
44
|
-
* @csspart hint - Help under the field, while
|
|
45
|
-
* @csspart label - The
|
|
39
|
+
* @csspart control - The native input.
|
|
40
|
+
* @csspart feedback - The message that says what is wrong with the value.
|
|
41
|
+
* @csspart field - The box around the input, its slots, and its buttons.
|
|
42
|
+
* @csspart hint - Help text under the field, shown while there is no feedback.
|
|
43
|
+
* @csspart label - The label above the field.
|
|
46
44
|
* @csspart reveal - The button that shows and hides a password.
|
|
47
|
-
* @csspart reveal-pressed - The reveal button while the password
|
|
45
|
+
* @csspart reveal-pressed - The reveal button while the password is shown, added beside `reveal`.
|
|
48
46
|
*
|
|
49
|
-
* @cssstate invalid -
|
|
47
|
+
* @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
|
|
50
48
|
*/
|
|
51
49
|
export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
|
|
52
50
|
protected readonly aria: AriaForwardController;
|
|
53
51
|
/** Typed or dragged, so every edit is announced. See `announcesInput`. */
|
|
54
52
|
protected readonly announcesInput = true;
|
|
55
53
|
/**
|
|
56
|
-
* What the browser may autofill
|
|
54
|
+
* What the browser may autofill in the field, as an HTML `autocomplete`
|
|
55
|
+
* token.
|
|
57
56
|
*
|
|
58
57
|
* Empty leaves the attribute off, which is the browser's default. Set it to
|
|
59
58
|
* a token like `email` or `bday` to ask for autofill, or to `off` to refuse.
|
|
60
59
|
*/
|
|
61
60
|
autocomplete: string;
|
|
62
61
|
/**
|
|
63
|
-
* Whether the field
|
|
62
|
+
* Whether the field shows a button that empties it.
|
|
64
63
|
*
|
|
65
64
|
* Shown only while there is something to clear, because a control that does
|
|
66
65
|
* nothing is worse than no control: a reader who presses it and sees no
|
|
@@ -69,7 +68,7 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
|
|
|
69
68
|
*/
|
|
70
69
|
clearable: boolean;
|
|
71
70
|
/**
|
|
72
|
-
*
|
|
71
|
+
* The accessible name of the clear button, which shows only an icon.
|
|
73
72
|
*/
|
|
74
73
|
clearLabel: string;
|
|
75
74
|
/**
|
|
@@ -89,13 +88,14 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
|
|
|
89
88
|
*/
|
|
90
89
|
pattern: string;
|
|
91
90
|
/**
|
|
92
|
-
*
|
|
91
|
+
* The text shown while the field is empty.
|
|
93
92
|
*
|
|
94
93
|
* Not a label: it goes when typing starts.
|
|
95
94
|
*/
|
|
96
95
|
placeholder: string;
|
|
97
96
|
/**
|
|
98
|
-
* Whether the field
|
|
97
|
+
* Whether the field blocks editing. A read-only field still submits its
|
|
98
|
+
* value.
|
|
99
99
|
*
|
|
100
100
|
* **The attribute is `readonly`, which is the platform's spelling.** A
|
|
101
101
|
* camelCase property needs an explicit `attribute`, and dash-casing a word
|
|
@@ -128,7 +128,7 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
|
|
|
128
128
|
/** Focus is delegated to the input, so the host is never the focus target. */
|
|
129
129
|
static shadowRootOptions: ShadowRootInit;
|
|
130
130
|
/**
|
|
131
|
-
* The
|
|
131
|
+
* The direction of the selection, as the native input names it.
|
|
132
132
|
*
|
|
133
133
|
* The `<input>` is inside this shadow root, so a consumer had no way to ask
|
|
134
134
|
* where the selection is, let alone move it: `querySelector` does not cross
|
|
@@ -149,8 +149,8 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
|
|
|
149
149
|
get selectionStart(): number;
|
|
150
150
|
set selectionStart(at: number);
|
|
151
151
|
/**
|
|
152
|
-
* Selects
|
|
153
|
-
* cannot
|
|
152
|
+
* Selects the range from `start` to `end` in one call, which setting
|
|
153
|
+
* `selectionStart` and `selectionEnd` one at a time cannot always do.
|
|
154
154
|
*
|
|
155
155
|
* Setting `selectionStart` past the current `selectionEnd` drags the end
|
|
156
156
|
* along, so the two writes a consumer would make in sequence do not compose
|
|
@@ -185,7 +185,7 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
|
|
|
185
185
|
private readonly handleChange;
|
|
186
186
|
/** Reports the value and the validity the host stands behind. */
|
|
187
187
|
private sync;
|
|
188
|
-
/** Puts the caret in the field,
|
|
188
|
+
/** Puts the caret in the field, as clicking its label does. */
|
|
189
189
|
focus(options?: FocusOptions): void;
|
|
190
190
|
/** Selects everything in the field. */
|
|
191
191
|
select(): void;
|
|
@@ -208,13 +208,14 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
|
|
|
208
208
|
*/
|
|
209
209
|
reveal: boolean;
|
|
210
210
|
/**
|
|
211
|
-
*
|
|
211
|
+
* The accessible name of the reveal toggle.
|
|
212
212
|
*
|
|
213
213
|
* The state is `aria-pressed`, not this.
|
|
214
214
|
*/
|
|
215
215
|
revealLabel: string;
|
|
216
216
|
/**
|
|
217
|
-
*
|
|
217
|
+
* The kind of text the field accepts. It sets the on-screen keyboard and the
|
|
218
|
+
* validation.
|
|
218
219
|
*
|
|
219
220
|
* **Not reflected.** Reflection exists so a selector can reach a value, and
|
|
220
221
|
* no stylesheet in this repository selects on `type`. Reflecting it writes
|
|
@@ -4,21 +4,18 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
4
4
|
* @summary A keyboard key or chord, set inline with text.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
* Renders a
|
|
8
|
-
* reading the markup.
|
|
7
|
+
* Renders a `<kbd>` element.
|
|
9
8
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* a component inserting one would have to guess which.
|
|
9
|
+
* Each element holds one key, except when you use `keys`. For a sequence or a
|
|
10
|
+
* chord, write one element per key and put the separator between them as text,
|
|
11
|
+
* such as "then" or "plus".
|
|
14
12
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* `⌘K` on Apple and `Ctrl+K` everywhere else.
|
|
13
|
+
* `keys` renders the right glyphs for the platform. Given `mod`, it renders
|
|
14
|
+
* `⌘K` on Apple devices and `Ctrl+K` everywhere else. A `⌘K` typed into a
|
|
15
|
+
* template is wrong for anyone on Windows.
|
|
19
16
|
*
|
|
20
|
-
*
|
|
21
|
-
* key and listens for nothing
|
|
17
|
+
* The element binds the shortcut only when `within` is set. By default it draws
|
|
18
|
+
* the key and listens for nothing.
|
|
22
19
|
*
|
|
23
20
|
* @since 0.1.0
|
|
24
21
|
* @status stable
|
|
@@ -28,13 +25,13 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
28
25
|
*
|
|
29
26
|
* @slot - The key's label, where `keys` is not set.
|
|
30
27
|
*
|
|
31
|
-
* @event {HelixShortcutEvent} helix-shortcut -
|
|
28
|
+
* @event {HelixShortcutEvent} helix-shortcut - The chord was pressed. Cancelable: cancel it to let the key press keep its usual effect.
|
|
32
29
|
*
|
|
33
30
|
* @csspart kbd - The key.
|
|
34
31
|
*/
|
|
35
32
|
export declare class HelixHeadlessKbd extends HelixElement {
|
|
36
33
|
/**
|
|
37
|
-
* The chord,
|
|
34
|
+
* The key or chord to show, such as `mod+k`, `shift+?`, or `/`.
|
|
38
35
|
*
|
|
39
36
|
* `mod` is the platform's own command modifier, which is the reason to write
|
|
40
37
|
* a chord here rather than a glyph: it is the one token whose right answer
|
|
@@ -42,7 +39,8 @@ export declare class HelixHeadlessKbd extends HelixElement {
|
|
|
42
39
|
*/
|
|
43
40
|
keys: string;
|
|
44
41
|
/**
|
|
45
|
-
* Where the chord is listened for
|
|
42
|
+
* Where the chord is listened for. `control` listens inside the control the
|
|
43
|
+
* key sits in, and `document` listens on the whole page.
|
|
46
44
|
*
|
|
47
45
|
* Unset draws a key and binds nothing.
|
|
48
46
|
*
|