basalt-ui 2.18.0 → 2.20.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 +90 -0
- package/MIGRATING.md +238 -12
- package/agent/agents/basalt-design-reviewer.md +2 -2
- package/agent/rules/basalt-charts.md +1 -1
- package/agent/rules/basalt-mantine.md +1 -1
- package/agent/skills/basalt-app/SKILL.md +1 -1
- package/agent/skills/basalt-design/SKILL.md +1 -1
- package/agent/templates/DESIGN.md.tpl +1 -1
- package/configs/oxlint-plugin.js +33 -19
- package/configs/oxlint-plugin.test.ts +32 -2
- package/dist/charts/ChartCard.d.ts +28 -3
- package/dist/charts/ChartCard.d.ts.map +1 -1
- package/dist/charts/ChartCard.js +33 -11
- package/dist/charts/Donut.d.ts.map +1 -1
- package/dist/charts/Donut.js +13 -1
- package/dist/charts/Heatmap.js +1 -1
- package/dist/charts/Sparkline.d.ts +7 -1
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +137 -18
- package/dist/charts/box.d.ts +2 -0
- package/dist/charts/box.d.ts.map +1 -1
- package/dist/charts/box.js +2 -0
- package/dist/charts/chart-box.module.css +30 -0
- package/dist/charts/chart-box.module.css.d.ts +1 -0
- package/dist/charts/chart-card.module.css +47 -0
- package/dist/charts/chart-card.module.css.d.ts +7 -0
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +35 -8
- package/dist/charts/host.d.ts.map +1 -1
- package/dist/charts/host.js +2 -1
- package/dist/charts/index.d.ts +1 -1
- package/dist/charts/index.d.ts.map +1 -1
- package/dist/charts/sparkline.module.css +59 -0
- package/dist/charts/sparkline.module.css.d.ts +13 -0
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +32 -4
- package/dist/charts/types.d.ts +6 -0
- package/dist/charts/types.d.ts.map +1 -1
- package/dist/commands/notifications/center.d.ts.map +1 -1
- package/dist/commands/notifications/center.js +18 -26
- package/dist/content/callout.d.ts +1 -1
- package/dist/content/callout.d.ts.map +1 -1
- package/dist/content/callout.js +10 -1
- package/dist/content/callout.module.css +15 -3
- package/dist/content/callout.module.css.d.ts +1 -0
- package/dist/controls/sync-button.d.ts +3 -0
- package/dist/controls/sync-button.d.ts.map +1 -1
- package/dist/dashboard/bar-list.d.ts +15 -4
- package/dist/dashboard/bar-list.d.ts.map +1 -1
- package/dist/dashboard/bar-list.js +56 -19
- package/dist/dashboard/bar-list.module.css +110 -17
- package/dist/dashboard/bar-list.module.css.d.ts +2 -0
- package/dist/dashboard/delta-badge.d.ts +8 -3
- package/dist/dashboard/delta-badge.d.ts.map +1 -1
- package/dist/dashboard/delta-badge.js +9 -2
- package/dist/dashboard/index.d.ts +2 -0
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/meter-model.d.ts +68 -1
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +65 -4
- package/dist/dashboard/meter-parts.d.ts +5 -1
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +234 -60
- package/dist/dashboard/meter.d.ts +38 -6
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.js +4 -1
- package/dist/dashboard/meter.module.css +209 -13
- package/dist/dashboard/meter.module.css.d.ts +16 -0
- package/dist/dashboard/query-state.d.ts.map +1 -1
- package/dist/dashboard/query-state.js +14 -9
- package/dist/dashboard/settings-section.d.ts.map +1 -1
- package/dist/dashboard/settings-section.js +14 -25
- package/dist/dashboard/stat-card-parts.d.ts +3 -1
- package/dist/dashboard/stat-card-parts.d.ts.map +1 -1
- package/dist/dashboard/stat-card-parts.js +18 -3
- package/dist/dashboard/stat-card.d.ts +7 -6
- package/dist/dashboard/stat-card.d.ts.map +1 -1
- package/dist/dashboard/stat-card.js +51 -83
- package/dist/dashboard/stat-card.module.css +42 -14
- package/dist/dashboard/stat-group.d.ts +11 -2
- package/dist/dashboard/stat-group.d.ts.map +1 -1
- package/dist/dashboard/stat-group.js +9 -7
- package/dist/dashboard/stat-strip.d.ts +50 -0
- package/dist/dashboard/stat-strip.d.ts.map +1 -0
- package/dist/dashboard/stat-strip.js +85 -0
- package/dist/dashboard/stat-strip.module.css +208 -0
- package/dist/dashboard/stat-strip.module.css.d.ts +28 -0
- package/dist/dashboard/widget-header.d.ts +3 -3
- package/dist/dashboard/widget-header.d.ts.map +1 -1
- package/dist/dashboard/widget-header.js +2 -1
- package/dist/dashboard/widget-header.module.css +38 -7
- package/dist/format/date.d.ts.map +1 -1
- package/dist/format/date.js +4 -3
- package/dist/format/shared.d.ts +6 -0
- package/dist/format/shared.d.ts.map +1 -1
- package/dist/format/shared.js +6 -2
- package/dist/guard/index.d.ts +1 -1
- package/dist/guard/index.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/styles.css +6 -0
- package/dist/theme/card-inset.module.css +76 -0
- package/dist/theme/card-inset.module.css.d.ts +9 -0
- package/dist/theme/chrome-vars.d.ts +29 -17
- package/dist/theme/chrome-vars.d.ts.map +1 -1
- package/dist/theme/chrome-vars.js +18 -8
- package/dist/theme/controls.module.css +3 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +32 -5
- package/dist/theme/nav-link.module.css +8 -10
- package/dist/theme/status-dot.d.ts +7 -0
- package/dist/theme/status-dot.d.ts.map +1 -0
- package/dist/theme/status-dot.js +18 -0
- package/dist/theme/status-dot.module.css +9 -0
- package/dist/theme/status-dot.module.css.d.ts +8 -0
- package/dist/theme/status-verdict.d.ts +10 -0
- package/dist/theme/status-verdict.d.ts.map +1 -0
- package/dist/theme/status-verdict.js +14 -0
- package/dist/theme/status-verdict.module.css +25 -0
- package/dist/theme/status-verdict.module.css.d.ts +9 -0
- package/llms.txt +30 -6
- package/package.json +1 -1
- package/src/charts/ChartCard.tsx +70 -4
- package/src/charts/Donut.tsx +9 -1
- package/src/charts/Heatmap.tsx +1 -1
- package/src/charts/Sparkline.tsx +180 -18
- package/src/charts/box.tsx +2 -0
- package/src/charts/chart-box.module.css +30 -0
- package/src/charts/chart-box.module.css.d.ts +1 -0
- package/src/charts/chart-card.module.css +47 -0
- package/src/charts/chart-card.module.css.d.ts +7 -0
- package/src/charts/compile.ts +42 -9
- package/src/charts/host.tsx +6 -3
- package/src/charts/index.ts +1 -1
- package/src/charts/sparkline.module.css +59 -0
- package/src/charts/sparkline.module.css.d.ts +13 -0
- package/src/charts/state.tsx +44 -4
- package/src/charts/types.ts +6 -0
- package/src/commands/notifications/center.tsx +29 -32
- package/src/content/callout.module.css +15 -3
- package/src/content/callout.module.css.d.ts +1 -0
- package/src/content/callout.tsx +15 -2
- package/src/controls/sync-button.tsx +3 -0
- package/src/dashboard/bar-list.module.css +110 -17
- package/src/dashboard/bar-list.module.css.d.ts +2 -0
- package/src/dashboard/bar-list.tsx +102 -21
- package/src/dashboard/delta-badge.tsx +21 -5
- package/src/dashboard/index.ts +2 -0
- package/src/dashboard/meter-model.ts +132 -4
- package/src/dashboard/meter-parts.tsx +305 -25
- package/src/dashboard/meter.module.css +209 -13
- package/src/dashboard/meter.module.css.d.ts +16 -0
- package/src/dashboard/meter.tsx +42 -7
- package/src/dashboard/query-state.tsx +28 -19
- package/src/dashboard/settings-section.tsx +1 -8
- package/src/dashboard/stat-card-parts.tsx +22 -2
- package/src/dashboard/stat-card.module.css +42 -14
- package/src/dashboard/stat-card.tsx +23 -60
- package/src/dashboard/stat-group.tsx +19 -8
- package/src/dashboard/stat-strip.module.css +208 -0
- package/src/dashboard/stat-strip.module.css.d.ts +28 -0
- package/src/dashboard/stat-strip.tsx +183 -0
- package/src/dashboard/widget-header.module.css +38 -7
- package/src/dashboard/widget-header.tsx +7 -4
- package/src/format/date.ts +6 -3
- package/src/format/shared.ts +11 -2
- package/src/guard/index.ts +1 -1
- package/src/index.ts +7 -0
- package/src/styles.css +6 -0
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +242 -26
- package/src/theme/card-inset.module.css +76 -0
- package/src/theme/card-inset.module.css.d.ts +9 -0
- package/src/theme/chrome-vars.ts +48 -23
- package/src/theme/controls.module.css +3 -0
- package/src/theme/index.ts +40 -6
- package/src/theme/nav-link.module.css +8 -10
- package/src/theme/status-dot.module.css +9 -0
- package/src/theme/status-dot.module.css.d.ts +8 -0
- package/src/theme/status-dot.tsx +31 -0
- package/src/theme/status-verdict.module.css +25 -0
- package/src/theme/status-verdict.module.css.d.ts +9 -0
- package/src/theme/status-verdict.tsx +32 -0
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
gap: var(--vx-space-stack-xs, 0.25rem);
|
|
11
11
|
min-width: 0;
|
|
12
|
+
/* The ONE caption size: every caption below reads it. A host that wants captions at its own text
|
|
13
|
+
* size sets `--basalt-meter-caption: 1em` on the Meter. */
|
|
14
|
+
--basalt-meter-caption: var(--vx-text-micro);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.root.zoned {
|
|
18
|
+
position: relative;
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
.track {
|
|
@@ -31,6 +38,14 @@
|
|
|
31
38
|
background: var(--vx-line);
|
|
32
39
|
}
|
|
33
40
|
|
|
41
|
+
/*
|
|
42
|
+
* A non-verdict reading: --vx-muted at 65%. 35% (argo's alpha) measures 1.7:1 (light) / 2.4:1 (dark)
|
|
43
|
+
* against the track; 65% clears 3:1 in both, and is not the near-white of --vx-line in dark.
|
|
44
|
+
*/
|
|
45
|
+
.fill[data-tone='muted'] {
|
|
46
|
+
background: color-mix(in srgb, var(--vx-muted) 65%, transparent);
|
|
47
|
+
}
|
|
48
|
+
|
|
34
49
|
/* The committed/forecast pair: the same neutral at two strengths. Flat, never hatched. */
|
|
35
50
|
.forecastFill {
|
|
36
51
|
background: color-mix(in srgb, var(--vx-line) 45%, transparent);
|
|
@@ -41,6 +56,89 @@
|
|
|
41
56
|
inset-block: 0;
|
|
42
57
|
}
|
|
43
58
|
|
|
59
|
+
/*
|
|
60
|
+
* Zone names under the band: absolutely placed at each band start so they stay on the band. When
|
|
61
|
+
* they would collide the band collapses (hidden but still laid out, so it can be re-measured) and the
|
|
62
|
+
* same names wrap as a list. The holding zone is ink, the rest muted.
|
|
63
|
+
*/
|
|
64
|
+
.zoneBand {
|
|
65
|
+
position: relative;
|
|
66
|
+
/* Labels are absolutely placed, so the row needs its own line height. */
|
|
67
|
+
height: 1.25em;
|
|
68
|
+
font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
|
|
69
|
+
font-variant-numeric: lining-nums;
|
|
70
|
+
font-size: var(--basalt-meter-caption);
|
|
71
|
+
color: var(--vx-muted);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
* Hidden but laid out, so a resize can measure it again. Absolute against `.root.zoned`, which has
|
|
76
|
+
* no inline padding, so `inset-inline: 0` gives the band the same width as when it was in flow.
|
|
77
|
+
*/
|
|
78
|
+
.zoneBand[data-collapsed] {
|
|
79
|
+
position: absolute;
|
|
80
|
+
top: 0;
|
|
81
|
+
inset-inline: 0;
|
|
82
|
+
visibility: hidden;
|
|
83
|
+
pointer-events: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.zoneLabel {
|
|
87
|
+
position: absolute;
|
|
88
|
+
top: 0;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.zoneLabelHolding {
|
|
93
|
+
font-weight: 500;
|
|
94
|
+
color: var(--vx-ink);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.zoneList {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-wrap: wrap;
|
|
100
|
+
gap: var(--vx-space-stack-xs) var(--vx-space-stack-sm);
|
|
101
|
+
font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
|
|
102
|
+
font-variant-numeric: lining-nums;
|
|
103
|
+
font-size: var(--basalt-meter-caption);
|
|
104
|
+
color: var(--vx-muted);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.zoneListItem {
|
|
108
|
+
min-width: 0;
|
|
109
|
+
overflow-wrap: anywhere;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* The reading under the band, centred on the marker. Clipped so it never widens the row before the first measure. */
|
|
113
|
+
.zoneReadingRow {
|
|
114
|
+
--basalt-reading-dir: 1;
|
|
115
|
+
position: relative;
|
|
116
|
+
height: 1.25em;
|
|
117
|
+
overflow: clip;
|
|
118
|
+
font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
|
|
119
|
+
font-variant-numeric: lining-nums;
|
|
120
|
+
font-size: var(--basalt-meter-caption);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.zoneReadingRow:dir(rtl) {
|
|
124
|
+
--basalt-reading-dir: -1;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Before the first measure the start edge sits AT the marker, so the label shifts back half its width
|
|
128
|
+
* along the inline axis (the physical `translate` flips sign in RTL). Measured, the start edge is exact. */
|
|
129
|
+
.zoneReading {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 0;
|
|
132
|
+
translate: calc(-50% * var(--basalt-reading-dir)) 0;
|
|
133
|
+
white-space: nowrap;
|
|
134
|
+
font-weight: 500;
|
|
135
|
+
color: var(--vx-ink);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.zoneReading[data-measured] {
|
|
139
|
+
translate: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
44
142
|
/* The reading on a zone track: a notch standing proud of the bands, in ink. */
|
|
45
143
|
.marker {
|
|
46
144
|
position: absolute;
|
|
@@ -48,7 +146,7 @@
|
|
|
48
146
|
bottom: -3px;
|
|
49
147
|
width: 3px;
|
|
50
148
|
margin-inline-start: -1.5px;
|
|
51
|
-
border-radius:
|
|
149
|
+
border-radius: var(--vx-radius-fine);
|
|
52
150
|
background: var(--vx-ink);
|
|
53
151
|
}
|
|
54
152
|
|
|
@@ -58,8 +156,10 @@
|
|
|
58
156
|
bottom: -2px;
|
|
59
157
|
width: 2px;
|
|
60
158
|
margin-inline-start: -1px;
|
|
61
|
-
border-radius:
|
|
159
|
+
border-radius: var(--vx-radius-fine);
|
|
62
160
|
background: var(--vx-ink);
|
|
161
|
+
/* A track-coloured halo keeps an ink tick readable on a fill that is itself near-ink (dark). */
|
|
162
|
+
box-shadow: 0 0 0 1px var(--vx-surface-subtle);
|
|
63
163
|
}
|
|
64
164
|
|
|
65
165
|
.boundaryTick {
|
|
@@ -69,30 +169,70 @@
|
|
|
69
169
|
|
|
70
170
|
.captions {
|
|
71
171
|
display: flex;
|
|
172
|
+
flex-wrap: wrap;
|
|
72
173
|
align-items: baseline;
|
|
73
174
|
justify-content: space-between;
|
|
74
175
|
gap: var(--vx-space-control-gap, 0.375rem);
|
|
75
|
-
font-family: var(--basalt-font-
|
|
76
|
-
font-
|
|
176
|
+
font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
|
|
177
|
+
font-variant-numeric: lining-nums;
|
|
178
|
+
font-size: var(--basalt-meter-caption);
|
|
179
|
+
text-wrap: balance;
|
|
77
180
|
color: var(--vx-muted);
|
|
78
181
|
}
|
|
79
182
|
|
|
183
|
+
/* Captions never truncate: the row wraps, and a caption wider than the row wraps inside itself. */
|
|
80
184
|
.caption {
|
|
81
|
-
|
|
185
|
+
min-width: 0;
|
|
186
|
+
text-wrap: balance;
|
|
187
|
+
overflow-wrap: anywhere;
|
|
82
188
|
}
|
|
83
189
|
|
|
190
|
+
/* Alone in the row, or wrapped onto its own line, the end caption still sits at the end. */
|
|
84
191
|
.captionEnd {
|
|
85
192
|
composes: caption;
|
|
193
|
+
margin-inline-start: auto;
|
|
86
194
|
text-align: end;
|
|
87
195
|
}
|
|
88
196
|
|
|
89
|
-
/*
|
|
90
|
-
.
|
|
91
|
-
|
|
197
|
+
/* The visually-hidden summary and loading text are still text: they read the caption size, not the
|
|
198
|
+
* body size they would inherit. */
|
|
199
|
+
.root .summary {
|
|
200
|
+
font-size: var(--basalt-meter-caption);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Categorical segments: one caption per part under the track, wrapping at narrow widths. */
|
|
204
|
+
.partCaptions {
|
|
205
|
+
display: flex;
|
|
206
|
+
flex-wrap: wrap;
|
|
207
|
+
gap: var(--vx-space-stack-xs, 0.25rem) var(--vx-space-stack-sm);
|
|
208
|
+
margin: 0;
|
|
209
|
+
padding: 0;
|
|
210
|
+
list-style: none;
|
|
211
|
+
font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
|
|
212
|
+
font-variant-numeric: lining-nums;
|
|
213
|
+
font-size: var(--basalt-meter-caption);
|
|
214
|
+
text-wrap: balance;
|
|
215
|
+
color: var(--vx-muted);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.partCaption {
|
|
219
|
+
display: inline-flex;
|
|
220
|
+
align-items: baseline;
|
|
221
|
+
gap: var(--vx-space-control-gap, 0.375rem);
|
|
222
|
+
min-width: 0;
|
|
223
|
+
overflow-wrap: anywhere;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* A shape cue beside the name, so the part never reads by colour alone. */
|
|
227
|
+
.swatch {
|
|
228
|
+
flex: none;
|
|
229
|
+
width: 0.5rem;
|
|
230
|
+
height: 0.5rem;
|
|
231
|
+
border-radius: var(--vx-radius-fine);
|
|
92
232
|
}
|
|
93
233
|
|
|
94
234
|
.empty {
|
|
95
|
-
font-size: var(--
|
|
235
|
+
font-size: var(--basalt-meter-caption);
|
|
96
236
|
color: var(--vx-muted);
|
|
97
237
|
}
|
|
98
238
|
|
|
@@ -114,8 +254,13 @@
|
|
|
114
254
|
align-items: center;
|
|
115
255
|
justify-content: center;
|
|
116
256
|
align-self: flex-start;
|
|
117
|
-
|
|
118
|
-
|
|
257
|
+
box-sizing: border-box;
|
|
258
|
+
/* 80px, growing (still square) when the value is wider than the ring's inner circle. */
|
|
259
|
+
min-width: 5rem;
|
|
260
|
+
width: max-content;
|
|
261
|
+
aspect-ratio: 1;
|
|
262
|
+
/* 12px at the default step: keeps the value inside the ring's stroke. */
|
|
263
|
+
padding: calc(1.5 * var(--vx-space-stack-sm, 0.5rem));
|
|
119
264
|
}
|
|
120
265
|
|
|
121
266
|
.ring {
|
|
@@ -138,8 +283,9 @@
|
|
|
138
283
|
|
|
139
284
|
.ringValue {
|
|
140
285
|
position: relative;
|
|
141
|
-
font-family: var(--basalt-font-
|
|
142
|
-
font-
|
|
286
|
+
font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
|
|
287
|
+
font-variant-numeric: lining-nums;
|
|
288
|
+
font-size: var(--vx-text-kpi);
|
|
143
289
|
font-weight: 500;
|
|
144
290
|
color: var(--vx-ink);
|
|
145
291
|
}
|
|
@@ -148,3 +294,53 @@
|
|
|
148
294
|
width: 5rem;
|
|
149
295
|
height: 5rem;
|
|
150
296
|
}
|
|
297
|
+
|
|
298
|
+
/* ── tick captions ───────────────────────────────────────────────────────────────────────────── */
|
|
299
|
+
|
|
300
|
+
/* Above the track, so they never share a row with the zone names or the captions below it. */
|
|
301
|
+
.tickLabels {
|
|
302
|
+
position: relative;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.tickBand {
|
|
306
|
+
position: relative;
|
|
307
|
+
height: 1.25em;
|
|
308
|
+
font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
|
|
309
|
+
font-variant-numeric: lining-nums;
|
|
310
|
+
font-size: var(--basalt-meter-caption);
|
|
311
|
+
color: var(--vx-muted);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/* Hidden but laid out, so a resize can measure it again. */
|
|
315
|
+
.tickBand[data-collapsed] {
|
|
316
|
+
position: absolute;
|
|
317
|
+
top: 0;
|
|
318
|
+
inset-inline: 0;
|
|
319
|
+
visibility: hidden;
|
|
320
|
+
pointer-events: none;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.tickLabel {
|
|
324
|
+
position: absolute;
|
|
325
|
+
top: 0;
|
|
326
|
+
white-space: nowrap;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* ── size="row" ──────────────────────────────────────────────────────────────────────────────── */
|
|
330
|
+
|
|
331
|
+
.row {
|
|
332
|
+
gap: 0;
|
|
333
|
+
justify-content: center;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.row .track {
|
|
337
|
+
height: 1lh;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.row .skeletonTrack {
|
|
341
|
+
height: 1lh;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.row .skeletonCaption {
|
|
345
|
+
display: none;
|
|
346
|
+
}
|
|
@@ -4,17 +4,29 @@
|
|
|
4
4
|
*/
|
|
5
5
|
declare const classes: {
|
|
6
6
|
readonly root: string
|
|
7
|
+
readonly summary: string
|
|
8
|
+
readonly zoned: string
|
|
7
9
|
readonly track: string
|
|
8
10
|
readonly trackBox: string
|
|
9
11
|
readonly fill: string
|
|
10
12
|
readonly forecastFill: string
|
|
11
13
|
readonly zone: string
|
|
14
|
+
readonly zoneBand: string
|
|
15
|
+
readonly zoneLabel: string
|
|
16
|
+
readonly zoneLabelHolding: string
|
|
17
|
+
readonly zoneList: string
|
|
18
|
+
readonly zoneListItem: string
|
|
19
|
+
readonly zoneReadingRow: string
|
|
20
|
+
readonly zoneReading: string
|
|
12
21
|
readonly marker: string
|
|
13
22
|
readonly tick: string
|
|
14
23
|
readonly boundaryTick: string
|
|
15
24
|
readonly captions: string
|
|
16
25
|
readonly caption: string
|
|
17
26
|
readonly captionEnd: string
|
|
27
|
+
readonly partCaptions: string
|
|
28
|
+
readonly partCaption: string
|
|
29
|
+
readonly swatch: string
|
|
18
30
|
readonly empty: string
|
|
19
31
|
readonly skeletonTrack: string
|
|
20
32
|
readonly skeletonCaption: string
|
|
@@ -24,5 +36,9 @@ declare const classes: {
|
|
|
24
36
|
readonly ringArc: string
|
|
25
37
|
readonly ringValue: string
|
|
26
38
|
readonly skeletonRing: string
|
|
39
|
+
readonly tickLabels: string
|
|
40
|
+
readonly tickBand: string
|
|
41
|
+
readonly tickLabel: string
|
|
42
|
+
readonly row: string
|
|
27
43
|
}
|
|
28
44
|
export default classes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-state.d.ts","sourceRoot":"","sources":["../../src/dashboard/query-state.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"query-state.d.ts","sourceRoot":"","sources":["../../src/dashboard/query-state.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAKnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,CAAA;AAE/C;;;;;GAKG;AACH,YAAY,EAAE,cAAc,EAAE,CAAA;AAE9B,kGAAkG;AAClG,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB,CAAA;AAID,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG;IAC5C,gDAAgD;IAChD,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,gGAAgG;AAChG,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAiB,EACjB,SAAS,EACT,KAAK,GACN,EAA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MAAM,EAAE,MAAM,EACd,OAAO,GAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAwB,GACjD,WAAW,CAAC,KAAK,CAAC,CASpB;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAA;AAEnC,MAAM,MAAM,eAAe,CAAC,KAAK,IAAI,WAAW,GAC9C,eAAe,CAAC,cAAc,CAAC,GAAG;IAChC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,CAAA;IAC5B,wFAAwF;IACxF,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,SAAS,CAAC,CAAA;IAClD,uDAAuD;IACvD,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,6FAA6F;IAC7F,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAA;IAClC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,uDAAuD;IACvD,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,kDAAkD;IAClD,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,EAChC,KAAK,EACL,QAAQ,EACR,KAAK,EACL,OAAO,EACP,UAA6B,EAC7B,aAAqC,EACrC,WAAW,EACX,IAAI,EACJ,OAAO,EACP,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG,SAAS,CAqEpC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Button, Center, Group, Loader, Stack, Text } from "@mantine/core";
|
|
3
3
|
import { toErrorMessage } from "../common/errors.js";
|
|
4
4
|
import { cx } from "../common/props.js";
|
|
5
|
+
import { VX } from "../tokens/index.js";
|
|
6
|
+
import { StatusDot } from "../theme/status-dot.js";
|
|
5
7
|
import { EmptyState } from "./empty-state.js";
|
|
6
8
|
import { assertQueryStateLike } from "../common/query-state-like.js";
|
|
7
9
|
function LoadingState({
|
|
@@ -43,21 +45,24 @@ function ErrorState({
|
|
|
43
45
|
style
|
|
44
46
|
}) {
|
|
45
47
|
const resolved = tier ?? "page";
|
|
46
|
-
const alert = /* @__PURE__ */
|
|
47
|
-
|
|
48
|
+
const alert = /* @__PURE__ */ jsxs(
|
|
49
|
+
Stack,
|
|
48
50
|
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
title,
|
|
51
|
+
gap: "xs",
|
|
52
|
+
role: "alert",
|
|
52
53
|
...resolved === "section" && className !== void 0 && { className },
|
|
53
54
|
...resolved === "section" && style !== void 0 && { style },
|
|
54
|
-
children:
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
|
|
57
|
+
/* @__PURE__ */ jsx(StatusDot, { color: VX.status.bad }),
|
|
58
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, children: title })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: toErrorMessage(error, fallback) }),
|
|
56
61
|
(onRetry ?? action) !== void 0 && /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
57
62
|
onRetry && /* @__PURE__ */ jsx(Button, { size: "xs", variant: "default", loading: retrying, onClick: onRetry, children: "Retry" }),
|
|
58
63
|
action
|
|
59
64
|
] })
|
|
60
|
-
]
|
|
65
|
+
]
|
|
61
66
|
}
|
|
62
67
|
);
|
|
63
68
|
if (resolved === "section") return alert;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/dashboard/settings-section.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAI7D,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAYnE,gFAAgF;AAChF,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE5D;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAC5C,eAAe,CAAC,mBAAmB,CAAC,GACpC,sBAAsB,GAAG;IACvB,wDAAwD;IACxD,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,0DAA0D;IAC1D,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAEH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,oBAAoB,+
|
|
1
|
+
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/dashboard/settings-section.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAI7D,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAYnE,gFAAgF;AAChF,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE5D;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAC5C,eAAe,CAAC,mBAAmB,CAAC,GACpC,sBAAsB,GAAG;IACvB,wDAAwD;IACxD,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,0DAA0D;IAC1D,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAEH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,oBAAoB,+BAgBtB;AAED,gEAAgE;AAChE,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAE1D,MAAM,MAAM,gBAAgB,GAAG,WAAW,GACxC,eAAe,CAAC,eAAe,CAAC,GAAG;IACjC,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mDAAmD;IACnD,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAEH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,gBAAgB,+BAelB;AAED,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAA;AAElD,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,eAAe,+BAuBjB"}
|
|
@@ -24,30 +24,20 @@ function SettingsSection({
|
|
|
24
24
|
style,
|
|
25
25
|
classNames
|
|
26
26
|
}) {
|
|
27
|
-
return /* @__PURE__ */ jsxs(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
...
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/* @__PURE__ */ jsx(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
...icon !== void 0 && { icon },
|
|
42
|
-
...subtitle !== void 0 && { subtitle },
|
|
43
|
-
...info !== void 0 && { info },
|
|
44
|
-
...actions !== void 0 && { actions: /* @__PURE__ */ jsx(CtlSlot, { children: actions }) }
|
|
45
|
-
}
|
|
46
|
-
) }),
|
|
47
|
-
/* @__PURE__ */ jsx("div", { className: cx(classes.rows, classNames?.body), children })
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
);
|
|
27
|
+
return /* @__PURE__ */ jsxs(Card, { className: cx(classNames?.root, className), style, children: [
|
|
28
|
+
/* @__PURE__ */ jsx("div", { className: cx(classes.header, classNames?.header), children: /* @__PURE__ */ jsx(
|
|
29
|
+
WidgetHeader,
|
|
30
|
+
{
|
|
31
|
+
tier: "section",
|
|
32
|
+
title,
|
|
33
|
+
...icon !== void 0 && { icon },
|
|
34
|
+
...subtitle !== void 0 && { subtitle },
|
|
35
|
+
...info !== void 0 && { info },
|
|
36
|
+
...actions !== void 0 && { actions: /* @__PURE__ */ jsx(CtlSlot, { children: actions }) }
|
|
37
|
+
}
|
|
38
|
+
) }),
|
|
39
|
+
/* @__PURE__ */ jsx("div", { className: cx(classes.rows, classNames?.body), children })
|
|
40
|
+
] });
|
|
51
41
|
}
|
|
52
42
|
function SettingsRow({
|
|
53
43
|
label,
|
|
@@ -89,7 +79,6 @@ function DangerZone({
|
|
|
89
79
|
{
|
|
90
80
|
className: cx(classNames?.root, className),
|
|
91
81
|
style: {
|
|
92
|
-
padding: "var(--vx-space-card-inset-y, 0.75rem) var(--vx-space-card-inset-x, 1rem)",
|
|
93
82
|
boxShadow: `${VX.shadowCard}, 0 0 0 1px ${alpha(VX.status.bad, 0.25)}`,
|
|
94
83
|
...style
|
|
95
84
|
},
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import type { Tone } from '../common/props.js';
|
|
2
3
|
export type CaptionRowProps = {
|
|
3
4
|
title: string;
|
|
4
5
|
icon?: ReactNode;
|
|
5
6
|
info?: string;
|
|
6
7
|
qualifier?: string;
|
|
8
|
+
tone?: Tone;
|
|
7
9
|
actions?: ReactNode;
|
|
8
10
|
};
|
|
9
11
|
/**
|
|
@@ -11,7 +13,7 @@ export type CaptionRowProps = {
|
|
|
11
13
|
* caption + info + qualifier do not fit, the qualifier wraps UNDER the caption instead of truncating
|
|
12
14
|
* either: the container's width decides, never the viewport's.
|
|
13
15
|
*/
|
|
14
|
-
export declare function CaptionRow({ title, icon, info, qualifier, actions }: CaptionRowProps): import("react").JSX.Element;
|
|
16
|
+
export declare function CaptionRow({ title, icon, info, qualifier, tone, actions }: CaptionRowProps): import("react").JSX.Element;
|
|
15
17
|
export type FootProps = {
|
|
16
18
|
/** Reserve the foot's height (a visual AND a footer line) even when a branch shows neither. */
|
|
17
19
|
reserve: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat-card-parts.d.ts","sourceRoot":"","sources":["../../src/dashboard/stat-card-parts.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"stat-card-parts.d.ts","sourceRoot":"","sources":["../../src/dashboard/stat-card-parts.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKrD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAI3C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA;AASD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,eAAe,+BAgC1F;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,+FAA+F;IAC/F,OAAO,EAAE,OAAO,CAAA;IAChB;qFACiF;IACjF,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,SAAS,CAAA;IACrB,UAAU,EAAE,SAAS,CAAA;CACtB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,SAAS,sCAQ9E;AAED;0FAC0F;AAC1F,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAK3E;AAED,wBAAgB,aAAa,gCAE5B;AAED,wBAAgB,cAAc,gCAE7B;AAED,wBAAgB,cAAc,gCAE7B;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,+BAU3D"}
|
|
@@ -2,17 +2,32 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Skeleton } from "@mantine/core";
|
|
3
3
|
import { IconSlot } from "../theme/icon-slot.js";
|
|
4
4
|
import { CtlSlot } from "../theme/index.js";
|
|
5
|
+
import { StatusVerdict } from "../theme/status-verdict.js";
|
|
6
|
+
import { VX } from "../tokens/index.js";
|
|
5
7
|
import { InfoGlyph } from "./widget-header.js";
|
|
6
8
|
import classes from "./stat-card.module.css";
|
|
7
|
-
|
|
9
|
+
const TONE_WORD = {
|
|
10
|
+
good: { word: "OK", phrase: "Within the good threshold" },
|
|
11
|
+
warn: { word: "Watch", phrase: "Past the warning threshold" },
|
|
12
|
+
bad: { word: "Over", phrase: "Past the severe threshold" }
|
|
13
|
+
};
|
|
14
|
+
function CaptionRow({ title, icon, info, qualifier, tone, actions }) {
|
|
8
15
|
return /* @__PURE__ */ jsxs("div", { className: classes.captionRow, children: [
|
|
9
16
|
/* @__PURE__ */ jsxs("div", { className: classes.captionMain, children: [
|
|
10
17
|
/* @__PURE__ */ jsxs("div", { className: classes.lead, children: [
|
|
11
18
|
/* @__PURE__ */ jsxs("h3", { className: classes.caption, children: [
|
|
12
19
|
icon !== void 0 && /* @__PURE__ */ jsx(IconSlot, { className: classes.icon, children: icon }),
|
|
13
|
-
/* @__PURE__ */ jsx("span", { className: classes.captionText, children: title })
|
|
20
|
+
/* @__PURE__ */ jsx("span", { className: classes.captionText, title, "data-widget-title": true, children: title })
|
|
14
21
|
] }),
|
|
15
|
-
info !== void 0 && /* @__PURE__ */ jsx(InfoGlyph, { text: info })
|
|
22
|
+
info !== void 0 && /* @__PURE__ */ jsx(InfoGlyph, { text: info }),
|
|
23
|
+
tone !== void 0 && /* @__PURE__ */ jsx(
|
|
24
|
+
StatusVerdict,
|
|
25
|
+
{
|
|
26
|
+
color: VX.status[tone],
|
|
27
|
+
word: TONE_WORD[tone].word,
|
|
28
|
+
phrase: TONE_WORD[tone].phrase
|
|
29
|
+
}
|
|
30
|
+
)
|
|
16
31
|
] }),
|
|
17
32
|
qualifier !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.qualifier, children: qualifier })
|
|
18
33
|
] }),
|
|
@@ -12,7 +12,7 @@ export type StatCardSlot = 'root' | 'header' | 'body' | 'sparkline';
|
|
|
12
12
|
*
|
|
13
13
|
* `value` is a pre-formatted `string` for the same reason the hero's is: the card cannot know the
|
|
14
14
|
* locale, the currency or the precision the number was measured at. `tone` marks ONE row as past a
|
|
15
|
-
* threshold and is the same vocabulary as the card's own `tone`, so a row saying `bad` and a
|
|
15
|
+
* threshold and is the same vocabulary as the card's own `tone`, so a row saying `bad` and a dot
|
|
16
16
|
* saying `bad` are the same claim at two scales; omitting it is untinted, never `'good'`.
|
|
17
17
|
*/
|
|
18
18
|
export type StatCardBreakdownRow = {
|
|
@@ -49,7 +49,7 @@ export type StatCardSparklineSize = {
|
|
|
49
49
|
* three slices.
|
|
50
50
|
*/
|
|
51
51
|
export type StatCardProps = BasaltProps & SlotStylesProps<StatCardSlot> & Omit<WidgetHeaderTitleProps, 'subtitle'> & Omit<WidgetHeaderMetricProps, 'value'> & WidgetHeaderDeltaProps & {
|
|
52
|
-
/** Pre-formatted hero figure (
|
|
52
|
+
/** Pre-formatted hero figure (sans `kpi`, weight 500, lining, ink). Required here, unlike on
|
|
53
53
|
* `WidgetHeader`: see the type's own doc. */
|
|
54
54
|
value: string;
|
|
55
55
|
/**
|
|
@@ -128,10 +128,11 @@ export type StatCardProps = BasaltProps & SlotStylesProps<StatCardSlot> & Omit<W
|
|
|
128
128
|
/** Caption-row right slot (e.g. a ghost "..." menu trigger) — wrapped in `CtlSlot tier="widget"`,
|
|
129
129
|
* so a raw `ActionIcon` with no `size` lands on the 24px step the caption row holds (C1/C5). */
|
|
130
130
|
actions?: ReactNode;
|
|
131
|
-
/** Threshold verdict —
|
|
132
|
-
* assistive tech. Omitting it is NOT `'good'`: omitted covers a
|
|
133
|
-
* is absent, and stays untinted so a card with nothing
|
|
134
|
-
* `'good'` only to assert a measured value that has
|
|
131
|
+
/** Threshold verdict — a status dot plus a short word (`OK` / `Watch` / `Over`) on the caption
|
|
132
|
+
* row, with the full phrase for assistive tech. Omitting it is NOT `'good'`: omitted covers a
|
|
133
|
+
* reading that is fine AND one that is absent, and stays untinted so a card with nothing
|
|
134
|
+
* measured can never render green. Pass `'good'` only to assert a measured value that has
|
|
135
|
+
* earned the verdict. */
|
|
135
136
|
tone?: Tone;
|
|
136
137
|
};
|
|
137
138
|
export declare function StatCard({ title, icon, info, qualifier, subtitle, value, unit, breakdown, query, loading, emptyText, delta, deltaPeriod, deltaPolarity, deltaFormat, deltaGlyph, sparkline, sparklinePlacement, actions, tone, className, style, classNames, }: StatCardProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat-card.d.ts","sourceRoot":"","sources":["../../src/dashboard/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