@zsherman/charts 0.0.0-stage → 0.1.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/CHANGELOG.md +7 -0
- package/LICENSE +373 -0
- package/README.md +13 -2
- package/THIRD_PARTY_NOTICES.md +33 -0
- package/dist/dom/bar-list/bar-list.js +386 -0
- package/dist/dom/bar-list/bar-list.styles.js +171 -0
- package/dist/dom/bar-list/index.js +1 -0
- package/dist/dom/chart/chart.js +716 -0
- package/dist/dom/chart/chart.styles.js +165 -0
- package/dist/dom/chart/index.js +1 -0
- package/dist/dom/chart-grid/chart-grid.js +67 -0
- package/dist/dom/chart-grid/index.js +1 -0
- package/dist/dom/donut/donut.js +565 -0
- package/dist/dom/donut/donut.styles.js +111 -0
- package/dist/dom/donut/index.js +1 -0
- package/dist/dom/heat-graph/calendar.js +118 -0
- package/dist/dom/heat-graph/heat-graph.js +423 -0
- package/dist/dom/heat-graph/heat-graph.styles.js +168 -0
- package/dist/dom/heat-graph/index.js +1 -0
- package/dist/dom/heat-matrix/heat-matrix.js +346 -0
- package/dist/dom/heat-matrix/heat-matrix.styles.js +155 -0
- package/dist/dom/heat-matrix/index.js +1 -0
- package/dist/dom/heat-matrix/model.js +41 -0
- package/dist/dom/index.js +13 -0
- package/dist/dom/internal/colors.js +44 -0
- package/dist/dom/internal/floating-tip.js +83 -0
- package/dist/dom/internal/format.js +43 -0
- package/dist/dom/internal/grid-context.js +5 -0
- package/dist/dom/internal/hidden.styles.js +16 -0
- package/dist/dom/internal/legend.js +112 -0
- package/dist/dom/internal/legend.styles.js +108 -0
- package/dist/dom/internal/markers.js +101 -0
- package/dist/dom/internal/options.js +300 -0
- package/dist/dom/internal/place.js +27 -0
- package/dist/dom/internal/scheme-watch.js +73 -0
- package/dist/dom/internal/share.js +28 -0
- package/dist/dom/internal/types.js +0 -0
- package/dist/dom/row-chart/index.js +1 -0
- package/dist/dom/row-chart/model.js +59 -0
- package/dist/dom/row-chart/row-chart.js +691 -0
- package/dist/dom/row-chart/row-chart.styles.js +242 -0
- package/dist/dom/segmented-bar/index.js +1 -0
- package/dist/dom/segmented-bar/segmented-bar.js +280 -0
- package/dist/dom/segmented-bar/segmented-bar.styles.js +88 -0
- package/dist/dom/sparkline/index.js +1 -0
- package/dist/dom/sparkline/sparkline.js +145 -0
- package/dist/dom/stacked-histogram/histogram.js +137 -0
- package/dist/dom/stacked-histogram/index.js +1 -0
- package/dist/dom/stacked-histogram/stacked-histogram.js +761 -0
- package/dist/dom/stacked-histogram/stacked-histogram.styles.js +211 -0
- package/dist/dom/state-timeline/index.js +1 -0
- package/dist/dom/state-timeline/model.js +166 -0
- package/dist/dom/state-timeline/state-timeline.js +729 -0
- package/dist/dom/state-timeline/state-timeline.styles.js +171 -0
- package/dist/dom/status-history/index.js +1 -0
- package/dist/dom/status-history/status-history.js +542 -0
- package/dist/dom/status-history/status-history.styles.js +171 -0
- package/dist/solid/bar-list/bar-list.jsx +139 -0
- package/dist/solid/bar-list/bar-list.styles.jsx +171 -0
- package/dist/solid/bar-list/index.jsx +1 -0
- package/dist/solid/chart/chart.jsx +454 -0
- package/dist/solid/chart/chart.styles.jsx +165 -0
- package/dist/solid/chart/index.jsx +1 -0
- package/dist/solid/chart-grid/chart-grid.jsx +46 -0
- package/dist/solid/chart-grid/index.jsx +1 -0
- package/dist/solid/donut/donut.jsx +291 -0
- package/dist/solid/donut/donut.styles.jsx +111 -0
- package/dist/solid/donut/index.jsx +1 -0
- package/dist/solid/heat-graph/calendar.jsx +118 -0
- package/dist/solid/heat-graph/heat-graph.jsx +228 -0
- package/dist/solid/heat-graph/heat-graph.styles.jsx +168 -0
- package/dist/solid/heat-graph/index.jsx +1 -0
- package/dist/solid/heat-matrix/heat-matrix.jsx +165 -0
- package/dist/solid/heat-matrix/heat-matrix.styles.jsx +155 -0
- package/dist/solid/heat-matrix/index.jsx +1 -0
- package/dist/solid/heat-matrix/model.jsx +41 -0
- package/dist/solid/index.jsx +13 -0
- package/dist/solid/internal/colors.jsx +44 -0
- package/dist/solid/internal/floating-tip.jsx +68 -0
- package/dist/solid/internal/format.jsx +43 -0
- package/dist/solid/internal/grid-context.jsx +5 -0
- package/dist/solid/internal/hidden.styles.jsx +16 -0
- package/dist/solid/internal/legend.jsx +35 -0
- package/dist/solid/internal/legend.styles.jsx +108 -0
- package/dist/solid/internal/markers.jsx +101 -0
- package/dist/solid/internal/options.jsx +300 -0
- package/dist/solid/internal/place.jsx +27 -0
- package/dist/solid/internal/scheme-watch.jsx +73 -0
- package/dist/solid/internal/share.jsx +28 -0
- package/dist/solid/internal/types.jsx +0 -0
- package/dist/solid/row-chart/index.jsx +1 -0
- package/dist/solid/row-chart/model.jsx +59 -0
- package/dist/solid/row-chart/row-chart.jsx +312 -0
- package/dist/solid/row-chart/row-chart.styles.jsx +242 -0
- package/dist/solid/segmented-bar/index.jsx +1 -0
- package/dist/solid/segmented-bar/segmented-bar.jsx +125 -0
- package/dist/solid/segmented-bar/segmented-bar.styles.jsx +88 -0
- package/dist/solid/sparkline/index.jsx +1 -0
- package/dist/solid/sparkline/sparkline.jsx +88 -0
- package/dist/solid/stacked-histogram/histogram.jsx +137 -0
- package/dist/solid/stacked-histogram/index.jsx +1 -0
- package/dist/solid/stacked-histogram/stacked-histogram.jsx +381 -0
- package/dist/solid/stacked-histogram/stacked-histogram.styles.jsx +211 -0
- package/dist/solid/state-timeline/index.jsx +1 -0
- package/dist/solid/state-timeline/model.jsx +166 -0
- package/dist/solid/state-timeline/state-timeline.jsx +387 -0
- package/dist/solid/state-timeline/state-timeline.styles.jsx +171 -0
- package/dist/solid/status-history/index.jsx +1 -0
- package/dist/solid/status-history/status-history.jsx +279 -0
- package/dist/solid/status-history/status-history.styles.jsx +171 -0
- package/dist/styles.css +1 -0
- package/dist/types/bar-list/bar-list.d.ts +91 -0
- package/dist/types/bar-list/bar-list.styles.d.ts +148 -0
- package/dist/types/bar-list/index.d.ts +3 -0
- package/dist/types/chart/chart.d.ts +98 -0
- package/dist/types/chart/chart.styles.d.ts +145 -0
- package/dist/types/chart/index.d.ts +3 -0
- package/dist/types/chart-grid/chart-grid.d.ts +35 -0
- package/dist/types/chart-grid/index.d.ts +2 -0
- package/dist/types/donut/donut.d.ts +124 -0
- package/dist/types/donut/donut.styles.d.ts +96 -0
- package/dist/types/donut/index.d.ts +3 -0
- package/dist/types/heat-graph/calendar.d.ts +61 -0
- package/dist/types/heat-graph/heat-graph.d.ts +82 -0
- package/dist/types/heat-graph/heat-graph.styles.d.ts +141 -0
- package/dist/types/heat-graph/index.d.ts +4 -0
- package/dist/types/heat-matrix/heat-matrix.d.ts +65 -0
- package/dist/types/heat-matrix/heat-matrix.styles.d.ts +135 -0
- package/dist/types/heat-matrix/index.d.ts +3 -0
- package/dist/types/heat-matrix/model.d.ts +15 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/internal/colors.d.ts +22 -0
- package/dist/types/internal/floating-tip.d.ts +15 -0
- package/dist/types/internal/format.d.ts +7 -0
- package/dist/types/internal/grid-context.d.ts +9 -0
- package/dist/types/internal/hidden.styles.d.ts +15 -0
- package/dist/types/internal/legend.d.ts +18 -0
- package/dist/types/internal/legend.styles.d.ts +96 -0
- package/dist/types/internal/markers.d.ts +16 -0
- package/dist/types/internal/options.d.ts +59 -0
- package/dist/types/internal/place.d.ts +20 -0
- package/dist/types/internal/scheme-watch.d.ts +12 -0
- package/dist/types/internal/share.d.ts +19 -0
- package/dist/types/internal/types.d.ts +163 -0
- package/dist/types/row-chart/index.d.ts +4 -0
- package/dist/types/row-chart/model.d.ts +50 -0
- package/dist/types/row-chart/row-chart.d.ts +148 -0
- package/dist/types/row-chart/row-chart.styles.d.ts +216 -0
- package/dist/types/segmented-bar/index.d.ts +3 -0
- package/dist/types/segmented-bar/segmented-bar.d.ts +65 -0
- package/dist/types/segmented-bar/segmented-bar.styles.d.ts +75 -0
- package/dist/types/sparkline/index.d.ts +3 -0
- package/dist/types/sparkline/sparkline.d.ts +38 -0
- package/dist/types/stacked-histogram/histogram.d.ts +48 -0
- package/dist/types/stacked-histogram/index.d.ts +4 -0
- package/dist/types/stacked-histogram/stacked-histogram.d.ts +73 -0
- package/dist/types/stacked-histogram/stacked-histogram.styles.d.ts +187 -0
- package/dist/types/state-timeline/index.d.ts +3 -0
- package/dist/types/state-timeline/model.d.ts +63 -0
- package/dist/types/state-timeline/state-timeline.d.ts +108 -0
- package/dist/types/state-timeline/state-timeline.styles.d.ts +151 -0
- package/dist/types/status-history/index.d.ts +3 -0
- package/dist/types/status-history/status-history.d.ts +72 -0
- package/dist/types/status-history/status-history.styles.d.ts +150 -0
- package/docs/api.json +1346 -0
- package/docs/bar-list.md +190 -0
- package/docs/chart-grid.md +77 -0
- package/docs/chart.md +355 -0
- package/docs/donut.md +182 -0
- package/docs/heat-graph.md +121 -0
- package/docs/heat-matrix.md +108 -0
- package/docs/llms.txt +68 -0
- package/docs/row-chart.md +193 -0
- package/docs/search-index.json +291 -0
- package/docs/segmented-bar.md +128 -0
- package/docs/sparkline.md +82 -0
- package/docs/stacked-histogram.md +123 -0
- package/docs/state-timeline.md +141 -0
- package/docs/status-history.md +121 -0
- package/package.json +104 -4
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import * as stylex from "@stylexjs/stylex";
|
|
2
|
+
export declare const styles: Readonly<{
|
|
3
|
+
readonly root: Readonly<{
|
|
4
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
5
|
+
readonly display: stylex.StyleXClassNameFor<"display", "grid">;
|
|
6
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
7
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
8
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
9
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
10
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
11
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
12
|
+
}>;
|
|
13
|
+
readonly legend: Readonly<{
|
|
14
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
15
|
+
readonly flexWrap: stylex.StyleXClassNameFor<"flexWrap", "wrap">;
|
|
16
|
+
readonly columnGap: stylex.StyleXClassNameFor<"columnGap", string>;
|
|
17
|
+
readonly rowGap: stylex.StyleXClassNameFor<"rowGap", string>;
|
|
18
|
+
readonly margin: stylex.StyleXClassNameFor<"margin", 0>;
|
|
19
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
|
|
20
|
+
readonly listStyle: stylex.StyleXClassNameFor<"listStyle", "none">;
|
|
21
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
22
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
23
|
+
}>;
|
|
24
|
+
readonly legendItem: Readonly<{
|
|
25
|
+
readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
|
|
26
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
27
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
28
|
+
}>;
|
|
29
|
+
readonly swatch: Readonly<{
|
|
30
|
+
readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
|
|
31
|
+
readonly width: stylex.StyleXClassNameFor<"width", "0.625rem">;
|
|
32
|
+
readonly height: stylex.StyleXClassNameFor<"height", "0.625rem">;
|
|
33
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", "2px">;
|
|
34
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "var(--swatch)">;
|
|
35
|
+
readonly forcedColorAdjust: stylex.StyleXClassNameFor<"forcedColorAdjust", "none">;
|
|
36
|
+
}>;
|
|
37
|
+
readonly plot: Readonly<{
|
|
38
|
+
readonly position: stylex.StyleXClassNameFor<"position", "relative">;
|
|
39
|
+
readonly display: stylex.StyleXClassNameFor<"display", "grid">;
|
|
40
|
+
readonly gridTemplateColumns: stylex.StyleXClassNameFor<"gridTemplateColumns", "fit-content(35%) minmax(0, 1fr)">;
|
|
41
|
+
readonly columnGap: stylex.StyleXClassNameFor<"columnGap", string>;
|
|
42
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
43
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
44
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "none" | "solid">;
|
|
45
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", "2px">;
|
|
46
|
+
readonly outlineOffset: stylex.StyleXClassNameFor<"outlineOffset", "4px">;
|
|
47
|
+
readonly outlineColor: stylex.StyleXClassNameFor<"outlineColor", string>;
|
|
48
|
+
}>;
|
|
49
|
+
readonly rows: Readonly<{
|
|
50
|
+
readonly display: stylex.StyleXClassNameFor<"display", "grid">;
|
|
51
|
+
readonly gridColumn: stylex.StyleXClassNameFor<"gridColumn", "1 / -1">;
|
|
52
|
+
readonly gridTemplateColumns: stylex.StyleXClassNameFor<"gridTemplateColumns", "subgrid">;
|
|
53
|
+
readonly rowGap: stylex.StyleXClassNameFor<"rowGap", "var(--st-gap)">;
|
|
54
|
+
readonly margin: stylex.StyleXClassNameFor<"margin", 0>;
|
|
55
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
|
|
56
|
+
readonly listStyle: stylex.StyleXClassNameFor<"listStyle", "none">;
|
|
57
|
+
}>;
|
|
58
|
+
readonly row: Readonly<{
|
|
59
|
+
readonly display: stylex.StyleXClassNameFor<"display", "grid">;
|
|
60
|
+
readonly gridColumn: stylex.StyleXClassNameFor<"gridColumn", "1 / -1">;
|
|
61
|
+
readonly gridTemplateColumns: stylex.StyleXClassNameFor<"gridTemplateColumns", "subgrid">;
|
|
62
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
63
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
64
|
+
}>;
|
|
65
|
+
readonly label: Readonly<{
|
|
66
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
67
|
+
readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
|
|
68
|
+
readonly textOverflow: stylex.StyleXClassNameFor<"textOverflow", "ellipsis">;
|
|
69
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
70
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "end">;
|
|
71
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
72
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", unknown>;
|
|
73
|
+
readonly color: stylex.StyleXClassNameFor<"color", unknown>;
|
|
74
|
+
}>;
|
|
75
|
+
readonly track: Readonly<{
|
|
76
|
+
readonly display: stylex.StyleXClassNameFor<"display", "block">;
|
|
77
|
+
readonly width: stylex.StyleXClassNameFor<"width", "100%">;
|
|
78
|
+
readonly height: stylex.StyleXClassNameFor<"height", "var(--st-row)">;
|
|
79
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", "2px">;
|
|
80
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
81
|
+
readonly forcedColorAdjust: stylex.StyleXClassNameFor<"forcedColorAdjust", "none">;
|
|
82
|
+
}>;
|
|
83
|
+
readonly axis: Readonly<{
|
|
84
|
+
readonly position: stylex.StyleXClassNameFor<"position", "relative">;
|
|
85
|
+
readonly gridColumn: stylex.StyleXClassNameFor<"gridColumn", "2">;
|
|
86
|
+
readonly height: stylex.StyleXClassNameFor<"height", "1.25rem">;
|
|
87
|
+
readonly marginBlockStart: stylex.StyleXClassNameFor<"marginBlockStart", string>;
|
|
88
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
89
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
90
|
+
readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
|
|
91
|
+
}>;
|
|
92
|
+
readonly tick: Readonly<{
|
|
93
|
+
readonly position: stylex.StyleXClassNameFor<"position", "absolute">;
|
|
94
|
+
readonly top: stylex.StyleXClassNameFor<"top", 0>;
|
|
95
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
96
|
+
readonly translate: stylex.StyleXClassNameFor<"translate", "-50% 0">;
|
|
97
|
+
readonly unicodeBidi: stylex.StyleXClassNameFor<"unicodeBidi", "plaintext">;
|
|
98
|
+
}>;
|
|
99
|
+
readonly cursor: Readonly<{
|
|
100
|
+
readonly position: stylex.StyleXClassNameFor<"position", "absolute">;
|
|
101
|
+
readonly top: stylex.StyleXClassNameFor<"top", 0>;
|
|
102
|
+
readonly width: stylex.StyleXClassNameFor<"width", "1px">;
|
|
103
|
+
readonly pointerEvents: stylex.StyleXClassNameFor<"pointerEvents", "none">;
|
|
104
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
105
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0.7>;
|
|
106
|
+
readonly forcedColorAdjust: stylex.StyleXClassNameFor<"forcedColorAdjust", "none">;
|
|
107
|
+
}>;
|
|
108
|
+
readonly tooltip: Readonly<{
|
|
109
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
110
|
+
readonly display: stylex.StyleXClassNameFor<"display", "grid">;
|
|
111
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
112
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", "10rem">;
|
|
113
|
+
readonly maxWidth: stylex.StyleXClassNameFor<"maxWidth", "min(20rem, calc(100vw - 16px))">;
|
|
114
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
|
|
115
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
|
|
116
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
117
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
118
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", "1px">;
|
|
119
|
+
readonly borderStyle: stylex.StyleXClassNameFor<"borderStyle", "solid">;
|
|
120
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", string>;
|
|
121
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
122
|
+
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", string>;
|
|
123
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
124
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
125
|
+
}>;
|
|
126
|
+
readonly tooltipHeading: Readonly<{
|
|
127
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
128
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
|
|
129
|
+
}>;
|
|
130
|
+
readonly tooltipMuted: Readonly<{
|
|
131
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
132
|
+
readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
|
|
133
|
+
readonly unicodeBidi: stylex.StyleXClassNameFor<"unicodeBidi", "plaintext">;
|
|
134
|
+
}>;
|
|
135
|
+
readonly tooltipState: Readonly<{
|
|
136
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
137
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
138
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
139
|
+
}>;
|
|
140
|
+
readonly tooltipValue: Readonly<{
|
|
141
|
+
readonly marginInlineStart: stylex.StyleXClassNameFor<"marginInlineStart", "auto">;
|
|
142
|
+
readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
|
|
143
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
144
|
+
readonly unicodeBidi: stylex.StyleXClassNameFor<"unicodeBidi", "plaintext">;
|
|
145
|
+
}>;
|
|
146
|
+
readonly empty: Readonly<{
|
|
147
|
+
readonly margin: stylex.StyleXClassNameFor<"margin", 0>;
|
|
148
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
|
|
149
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
150
|
+
}>;
|
|
151
|
+
}>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { JSX } from "@solidjs/web";
|
|
2
|
+
import type { ChartColor } from "../internal/types.js";
|
|
3
|
+
/** What a check found in one interval. */
|
|
4
|
+
export type StatusState = "success" | "degraded" | "error" | "unknown";
|
|
5
|
+
/** One interval of the history. */
|
|
6
|
+
export interface StatusEntry<T = unknown> {
|
|
7
|
+
/** When the interval starts: a `Date`, milliseconds since the epoch, or an ISO string. */
|
|
8
|
+
time: Date | number | string;
|
|
9
|
+
/**
|
|
10
|
+
* `success` met its target; `degraded` worked but missed one (slow responses); `error` failed or was
|
|
11
|
+
* down; `unknown` has no result (no check ran), so it says nothing about health.
|
|
12
|
+
*/
|
|
13
|
+
status: StatusState;
|
|
14
|
+
/** A few words on what happened (`"checkout timed out"`), after the time and state in its name and tooltip. */
|
|
15
|
+
note?: string;
|
|
16
|
+
/** Your own data for this interval, handed back to `onSelectEntry`. */
|
|
17
|
+
data?: T;
|
|
18
|
+
}
|
|
19
|
+
/** The status words. Also set app-wide with the kit's `LocaleProvider messages={{ statusHistory }}`. */
|
|
20
|
+
export type StatusHistoryLabels = Record<StatusState, string>;
|
|
21
|
+
export interface StatusHistoryProps<T = unknown> extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "children" | "class" | "title"> {
|
|
22
|
+
/** The history in words, for assistive technology: what is checked, the period and the result. */
|
|
23
|
+
label: string;
|
|
24
|
+
/** One entry per interval, oldest first. Each draws one bar; bars are never merged. */
|
|
25
|
+
data: readonly StatusEntry<T>[];
|
|
26
|
+
/**
|
|
27
|
+
* The bars' height in pixels.
|
|
28
|
+
* @defaultValue 32
|
|
29
|
+
*/
|
|
30
|
+
height?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Space between bars in pixels (it narrows when the bars run out of room).
|
|
33
|
+
* @defaultValue 2
|
|
34
|
+
*/
|
|
35
|
+
gap?: number;
|
|
36
|
+
/** Above the start: what is checked ("Checkout"). */
|
|
37
|
+
title?: JSX.Element;
|
|
38
|
+
/** Above the end: the result ("99.2% uptime"). */
|
|
39
|
+
summary?: JSX.Element;
|
|
40
|
+
/** Below the start: where the range begins ("90 hours ago"). */
|
|
41
|
+
startLabel?: JSX.Element;
|
|
42
|
+
/** Below the end: where it ends ("Now"). */
|
|
43
|
+
endLabel?: JSX.Element;
|
|
44
|
+
/** Dates under the bars, for a long range without `startLabel` and `endLabel`. */
|
|
45
|
+
axis?: boolean;
|
|
46
|
+
/** The states shown, each named with its count. */
|
|
47
|
+
legend?: boolean;
|
|
48
|
+
/** Each state's color: a chart token (`chart-1` … `chart-8`) or any CSS color. Defaults to the kit's status colors. */
|
|
49
|
+
colors?: Partial<Record<StatusState, ChartColor>>;
|
|
50
|
+
/**
|
|
51
|
+
* The time zone times are written in (`"UTC"`, `"Europe/Berlin"`). Defaults to the runtime's: set it when
|
|
52
|
+
* the server renders, so server and browser write the same times.
|
|
53
|
+
*/
|
|
54
|
+
timeZone?: string;
|
|
55
|
+
/** How an interval's time is written in its name and tooltip. Defaults to the locale's date, and time when intervals are shorter than a day. */
|
|
56
|
+
formatTime?: (date: Date) => string;
|
|
57
|
+
/** Called when a bar is clicked or chosen with Enter or Space: open that interval's details. */
|
|
58
|
+
onSelectEntry?: (entry: StatusEntry<T>, index: number) => void;
|
|
59
|
+
/** The status words, in your wording or language (app-wide: `LocaleProvider messages.statusHistory`). */
|
|
60
|
+
labels?: Partial<StatusHistoryLabels>;
|
|
61
|
+
/** Extra classes on the root. */
|
|
62
|
+
class?: JSX.ClassValue;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A row of bars, one per check interval, colored by what the check found: healthy, degraded, failed or no
|
|
66
|
+
* data. For the recent health of one service on a monitor card. A grid with one tab stop: the arrow keys move
|
|
67
|
+
* by interval, each bar is named with its time and state, and the tooltip follows the pointer and the focus.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* <StatusHistory label="Checkout, last 90 hours: 99% healthy, 1 failure" data={checks} title="Checkout" summary="99% uptime" />
|
|
71
|
+
*/
|
|
72
|
+
export declare function StatusHistory<T = unknown>(props: StatusHistoryProps<T>): JSX.Element;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import * as stylex from "@stylexjs/stylex";
|
|
2
|
+
export declare const styles: Readonly<{
|
|
3
|
+
readonly root: Readonly<{
|
|
4
|
+
readonly position: stylex.StyleXClassNameFor<"position", "relative">;
|
|
5
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
6
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
7
|
+
readonly flexDirection: stylex.StyleXClassNameFor<"flexDirection", "column">;
|
|
8
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
9
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
10
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
11
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
12
|
+
}>;
|
|
13
|
+
readonly corners: Readonly<{
|
|
14
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
15
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "baseline">;
|
|
16
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
17
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
18
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
19
|
+
}>;
|
|
20
|
+
readonly header: Readonly<{
|
|
21
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
22
|
+
}>;
|
|
23
|
+
readonly footer: Readonly<{
|
|
24
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
25
|
+
}>;
|
|
26
|
+
readonly cornerStart: Readonly<{
|
|
27
|
+
readonly flex: stylex.StyleXClassNameFor<"flex", "1 1 0">;
|
|
28
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
29
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
|
|
30
|
+
}>;
|
|
31
|
+
readonly title: Readonly<{
|
|
32
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
33
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
34
|
+
}>;
|
|
35
|
+
readonly cornerEnd: Readonly<{
|
|
36
|
+
readonly flex: stylex.StyleXClassNameFor<"flex", "1 1 0">;
|
|
37
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
38
|
+
readonly marginInlineStart: stylex.StyleXClassNameFor<"marginInlineStart", "auto">;
|
|
39
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "end">;
|
|
40
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
|
|
41
|
+
}>;
|
|
42
|
+
readonly bars: Readonly<{
|
|
43
|
+
readonly display: stylex.StyleXClassNameFor<"display", "grid">;
|
|
44
|
+
readonly gridAutoFlow: stylex.StyleXClassNameFor<"gridAutoFlow", "column">;
|
|
45
|
+
readonly gridAutoColumns: stylex.StyleXClassNameFor<"gridAutoColumns", "minmax(0, 1fr)">;
|
|
46
|
+
readonly columnGap: stylex.StyleXClassNameFor<"columnGap", "min(var(--sh-gap), calc(30% / var(--sh-count)))">;
|
|
47
|
+
readonly height: stylex.StyleXClassNameFor<"height", "var(--sh-height)">;
|
|
48
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "none">;
|
|
49
|
+
}>;
|
|
50
|
+
readonly bar: Readonly<{
|
|
51
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
52
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
53
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
|
|
54
|
+
readonly cursor: stylex.StyleXClassNameFor<"cursor", "default">;
|
|
55
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "none" | "solid">;
|
|
56
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", "2px">;
|
|
57
|
+
readonly outlineOffset: stylex.StyleXClassNameFor<"outlineOffset", "1px">;
|
|
58
|
+
readonly outlineColor: stylex.StyleXClassNameFor<"outlineColor", string>;
|
|
59
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", "2px">;
|
|
60
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "var(--sh-fill)">;
|
|
61
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0.75 | 1>;
|
|
62
|
+
readonly forcedColorAdjust: stylex.StyleXClassNameFor<"forcedColorAdjust", "none">;
|
|
63
|
+
}>;
|
|
64
|
+
readonly clickable: Readonly<{
|
|
65
|
+
readonly cursor: stylex.StyleXClassNameFor<"cursor", "pointer">;
|
|
66
|
+
}>;
|
|
67
|
+
readonly axis: Readonly<{
|
|
68
|
+
readonly position: stylex.StyleXClassNameFor<"position", "relative">;
|
|
69
|
+
readonly height: stylex.StyleXClassNameFor<"height", "1rem">;
|
|
70
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
71
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", "1rem">;
|
|
72
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
73
|
+
readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
|
|
74
|
+
}>;
|
|
75
|
+
readonly tick: Readonly<{
|
|
76
|
+
readonly position: stylex.StyleXClassNameFor<"position", "absolute">;
|
|
77
|
+
readonly top: stylex.StyleXClassNameFor<"top", 0>;
|
|
78
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
79
|
+
}>;
|
|
80
|
+
readonly legend: Readonly<{
|
|
81
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
82
|
+
readonly flexWrap: stylex.StyleXClassNameFor<"flexWrap", "wrap">;
|
|
83
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
84
|
+
readonly margin: stylex.StyleXClassNameFor<"margin", 0>;
|
|
85
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
|
|
86
|
+
readonly listStyle: stylex.StyleXClassNameFor<"listStyle", "none">;
|
|
87
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
88
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
89
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
90
|
+
}>;
|
|
91
|
+
readonly legendItem: Readonly<{
|
|
92
|
+
readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
|
|
93
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
94
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
95
|
+
}>;
|
|
96
|
+
readonly count: Readonly<{
|
|
97
|
+
readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
|
|
98
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
99
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
100
|
+
}>;
|
|
101
|
+
readonly swatch: Readonly<{
|
|
102
|
+
readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
|
|
103
|
+
readonly display: stylex.StyleXClassNameFor<"display", "inline-block">;
|
|
104
|
+
readonly width: stylex.StyleXClassNameFor<"width", "0.625rem">;
|
|
105
|
+
readonly height: stylex.StyleXClassNameFor<"height", "0.625rem">;
|
|
106
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", "2px">;
|
|
107
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "var(--sh-fill)">;
|
|
108
|
+
readonly forcedColorAdjust: stylex.StyleXClassNameFor<"forcedColorAdjust", "none">;
|
|
109
|
+
}>;
|
|
110
|
+
readonly tooltip: Readonly<{
|
|
111
|
+
readonly position: stylex.StyleXClassNameFor<"position", "absolute">;
|
|
112
|
+
readonly zIndex: stylex.StyleXClassNameFor<"zIndex", 1>;
|
|
113
|
+
readonly top: stylex.StyleXClassNameFor<"top", 0>;
|
|
114
|
+
readonly left: stylex.StyleXClassNameFor<"left", 0>;
|
|
115
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
116
|
+
readonly display: stylex.StyleXClassNameFor<"display", "grid">;
|
|
117
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
118
|
+
readonly maxWidth: stylex.StyleXClassNameFor<"maxWidth", "min(18rem, 100%)">;
|
|
119
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
|
|
120
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
|
|
121
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
122
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
123
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", "1px">;
|
|
124
|
+
readonly borderStyle: stylex.StyleXClassNameFor<"borderStyle", "solid">;
|
|
125
|
+
readonly borderColor: stylex.StyleXClassNameFor<"borderColor", string>;
|
|
126
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
127
|
+
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", string>;
|
|
128
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
129
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
130
|
+
readonly pointerEvents: stylex.StyleXClassNameFor<"pointerEvents", "none">;
|
|
131
|
+
}>;
|
|
132
|
+
readonly tooltipTime: Readonly<{
|
|
133
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
134
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
135
|
+
}>;
|
|
136
|
+
readonly tooltipStatus: Readonly<{
|
|
137
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
138
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
139
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
140
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
141
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
142
|
+
}>;
|
|
143
|
+
}>;
|
|
144
|
+
/** Each state's default fill: the kit's status colors, and a faint neutral for "no result". */
|
|
145
|
+
export declare const fills: {
|
|
146
|
+
readonly success: "var(--sui-success)";
|
|
147
|
+
readonly degraded: "var(--sui-warning)";
|
|
148
|
+
readonly error: "var(--sui-danger)";
|
|
149
|
+
readonly unknown: "color-mix(in oklab, var(--sui-text-subtle) 35%, transparent)";
|
|
150
|
+
};
|