basalt-ui 2.24.0 → 2.26.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 +55 -0
- package/MIGRATING.md +191 -19
- package/configs/oxlint-basalt.json +1 -1
- package/configs/oxlint-plugin.js +3 -9
- package/configs/oxlint-plugin.test.ts +6 -0
- package/dist/charts/Bars.d.ts.map +1 -1
- package/dist/charts/Bars.js +4 -1
- package/dist/charts/CartesianChart.d.ts +2 -0
- package/dist/charts/CartesianChart.d.ts.map +1 -1
- package/dist/charts/ChartCard.d.ts +11 -5
- package/dist/charts/ChartCard.d.ts.map +1 -1
- package/dist/charts/ChartCard.js +11 -3
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +65 -7
- package/dist/charts/chart-box.module.css +50 -7
- package/dist/charts/chart-box.module.css.d.ts +2 -0
- package/dist/charts/chart-card.module.css +34 -0
- package/dist/charts/chart-card.module.css.d.ts +2 -0
- package/dist/charts/chart-legend.module.css +5 -6
- package/dist/charts/compile.d.ts +2 -0
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +45 -1
- package/dist/charts/legend.d.ts.map +1 -1
- package/dist/charts/legend.js +42 -9
- package/dist/charts/sparkline.module.css +13 -9
- package/dist/charts/state.d.ts +3 -1
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +15 -2
- package/dist/cli/shot/detect.d.ts.map +1 -1
- package/dist/cli/shot/detect.js +25 -36
- package/dist/dashboard/bar-list.d.ts.map +1 -1
- package/dist/dashboard/bar-list.js +16 -2
- package/dist/dashboard/bar-list.module.css +7 -2
- package/dist/dashboard/bar-list.module.css.d.ts +1 -0
- package/dist/dashboard/meter-model.d.ts +2 -0
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +99 -7
- package/dist/dashboard/meter-parts.d.ts +4 -7
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +102 -78
- package/dist/dashboard/meter.d.ts +1 -1
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.js +10 -7
- package/dist/dashboard/meter.module.css +43 -12
- package/dist/dashboard/meter.module.css.d.ts +1 -2
- package/dist/dashboard/section.d.ts +1 -2
- package/dist/dashboard/section.d.ts.map +1 -1
- package/dist/dashboard/section.module.css +8 -7
- package/dist/dashboard/stat-card.module.css +19 -2
- package/dist/dashboard/stat-strip.d.ts +9 -1
- package/dist/dashboard/stat-strip.d.ts.map +1 -1
- package/dist/dashboard/stat-strip.js +32 -6
- package/dist/dashboard/stat-strip.module.css +40 -1
- package/dist/dashboard/stat-strip.module.css.d.ts +3 -0
- package/dist/dashboard/visual-slot.d.ts +4 -0
- package/dist/dashboard/visual-slot.d.ts.map +1 -1
- package/dist/dashboard/visual-slot.js +2 -0
- package/dist/dashboard/widget-header.module.css +9 -0
- package/llms.txt +3 -3
- package/package.json +1 -1
- package/src/charts/Bars.tsx +7 -2
- package/src/charts/CartesianChart.tsx +2 -0
- package/src/charts/ChartCard.tsx +30 -7
- package/src/charts/Sparkline.tsx +105 -10
- package/src/charts/chart-box.module.css +50 -7
- package/src/charts/chart-box.module.css.d.ts +2 -0
- package/src/charts/chart-card.module.css +34 -0
- package/src/charts/chart-card.module.css.d.ts +2 -0
- package/src/charts/chart-legend.module.css +5 -6
- package/src/charts/compile.ts +60 -1
- package/src/charts/legend.tsx +64 -16
- package/src/charts/sparkline.module.css +13 -9
- package/src/charts/state.tsx +33 -7
- package/src/cli/shot/detect.ts +26 -40
- package/src/dashboard/bar-list.module.css +7 -2
- package/src/dashboard/bar-list.module.css.d.ts +1 -0
- package/src/dashboard/bar-list.tsx +14 -2
- package/src/dashboard/meter-model.ts +147 -12
- package/src/dashboard/meter-parts.tsx +71 -50
- package/src/dashboard/meter.module.css +43 -12
- package/src/dashboard/meter.module.css.d.ts +1 -2
- package/src/dashboard/meter.tsx +22 -9
- package/src/dashboard/section.module.css +8 -7
- package/src/dashboard/section.tsx +1 -2
- package/src/dashboard/stat-card.module.css +19 -2
- package/src/dashboard/stat-strip.module.css +40 -1
- package/src/dashboard/stat-strip.module.css.d.ts +3 -0
- package/src/dashboard/stat-strip.tsx +49 -8
- package/src/dashboard/visual-slot.ts +5 -0
- package/src/dashboard/widget-header.module.css +9 -0
package/src/dashboard/meter.tsx
CHANGED
|
@@ -57,7 +57,7 @@ import type { BasaltProps } from '../common/props'
|
|
|
57
57
|
import { VX } from '../tokens'
|
|
58
58
|
import { isReading, normalizeSegments, segmentReading, spanOf } from './meter-model'
|
|
59
59
|
import type { MeterSegment, MeterTick, MeterZone } from './meter-model'
|
|
60
|
-
import { MeterBar, MeterEmpty,
|
|
60
|
+
import { MeterBar, MeterEmpty, MeterRing, MeterRingLoading } from './meter-parts'
|
|
61
61
|
import { asText } from './scale'
|
|
62
62
|
import { VisualSlotContext } from './visual-slot'
|
|
63
63
|
|
|
@@ -162,7 +162,7 @@ export type MeterProps =
|
|
|
162
162
|
| (BarCommon & {
|
|
163
163
|
/** Ordered parts, accumulated from `min`; their sum is the reading. `forecast` parts render lighter. */
|
|
164
164
|
segments: readonly MeterSegment[]
|
|
165
|
-
/** Names the forecast
|
|
165
|
+
/** Names the forecast, ending where its fill ends (default: `Forecast: <labels>`). */
|
|
166
166
|
forecastCaption?: string
|
|
167
167
|
value?: never
|
|
168
168
|
color?: never
|
|
@@ -225,16 +225,28 @@ export function Meter(props: MeterProps) {
|
|
|
225
225
|
const shell = { className, style, row }
|
|
226
226
|
const ring = props.shape === 'ring'
|
|
227
227
|
warnInvalidTrack(min, max)
|
|
228
|
-
const
|
|
228
|
+
const host = useContext(VisualSlotContext)
|
|
229
|
+
const hostTone = host?.tone
|
|
229
230
|
const hostColor = hostTone === undefined ? undefined : VX.status[hostTone]
|
|
230
231
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
<MeterLoading label={label} ring={ring} zoned={props.zones !== undefined} shell={shell} />
|
|
234
|
-
)
|
|
232
|
+
const loading = props.loading === true || host?.loading === true
|
|
233
|
+
if (loading && ring) return <MeterRingLoading label={label} shell={shell} />
|
|
235
234
|
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
// A loading bar is the loaded bar on a placeholder reading (its captions painted as skeleton), so
|
|
236
|
+
// it has the loaded rows and height: zoned bars mid-track, plain bars at the start.
|
|
237
|
+
const segments =
|
|
238
|
+
props.segments === undefined || (loading && props.segments.length === 0)
|
|
239
|
+
? undefined
|
|
240
|
+
: normalizeSegments(props.segments)
|
|
241
|
+
const placeholder =
|
|
242
|
+
props.zones !== undefined && props.zones.length > 0 ? min + spanOf(min, max).span / 2 : min
|
|
243
|
+
const reading = loading
|
|
244
|
+
? segments === undefined
|
|
245
|
+
? placeholder
|
|
246
|
+
: segmentReading(segments, min)
|
|
247
|
+
: segments === undefined
|
|
248
|
+
? props.value
|
|
249
|
+
: segmentReading(segments, min)
|
|
238
250
|
if (!isReading(reading) || segments?.length === 0) {
|
|
239
251
|
return (
|
|
240
252
|
<MeterEmpty
|
|
@@ -275,6 +287,7 @@ export function Meter(props: MeterProps) {
|
|
|
275
287
|
startCaption={props.startCaption}
|
|
276
288
|
endCaption={props.endCaption}
|
|
277
289
|
readingAt={props.readingAt}
|
|
290
|
+
loading={loading}
|
|
278
291
|
/>
|
|
279
292
|
)
|
|
280
293
|
}
|
|
@@ -76,15 +76,16 @@
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/*
|
|
79
|
-
* A
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* so
|
|
83
|
-
*
|
|
84
|
-
*
|
|
79
|
+
* A `Text` summary line (argo's strength diagnostics shell: title 15 + chart-card title 13 + summary
|
|
80
|
+
* 12 + chart ticks and legend 11 = four sizes) joins the chart text step, so the shell stays at
|
|
81
|
+
* three: 15, 13, 11. The cap is the `--text-fz` variable Mantine's `Text` reads for its font size,
|
|
82
|
+
* pinned `!important` so it outranks the inline value a `size` prop writes; a `Text` sized by the
|
|
83
|
+
* consumer's own CLASS sets `font-size` directly, never reads the variable, and keeps that size
|
|
84
|
+
* (argo's reading backlog `.facts`, 13). Only a direct `Text` child is capped; a `Group` of stats
|
|
85
|
+
* keeps the sizes its own parts ask for.
|
|
85
86
|
*/
|
|
86
87
|
.summary > :global(.mantine-Text-root) {
|
|
87
|
-
|
|
88
|
+
--text-fz: var(--vx-text-micro) !important;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
/*
|
|
@@ -137,8 +137,7 @@ type SectionBaseProps = Omit<
|
|
|
137
137
|
defaultOpen?: boolean
|
|
138
138
|
/** Rendered directly under the header and ALWAYS visible, collapsed or not: a collapsed section
|
|
139
139
|
* still states its headline figures, which is what makes collapsing it a real option. Keep it to
|
|
140
|
-
* one row — the body is what `children` is for.
|
|
141
|
-
* chart-text step): a `size` prop on a bare `Text` here is ignored — wrap it to opt out. */
|
|
140
|
+
* one row — the body is what `children` is for. A `Text` here renders at 11 (the chart-text step); wrap it to opt out. */
|
|
142
141
|
summary?: ReactNode
|
|
143
142
|
/** Turns the root into a scroll anchor (`id` + `scroll-margin-top`). Inside `BasaltShell` the
|
|
144
143
|
* offset is the clearance token; without a shell it also clears `PageBar`, which assumes the
|
|
@@ -194,6 +194,23 @@
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
/* Cards of one StatGroup share ONE figure size. In the two-column phone state the last odd card spans the
|
|
198
|
+
* row, so its own width would size its numeral 22 against its row-mates' 16; the group's columns (a
|
|
199
|
+
* narrow card's size) set it for every card instead, whether or not a qualifier sits on its own line.
|
|
200
|
+
* `--basalt-stat-group-figure` on the group (or a wrapper) replaces that size. */
|
|
201
|
+
@container basalt-grid (max-width: 479.9px) {
|
|
202
|
+
[data-sm-cols] .body {
|
|
203
|
+
--basalt-stat-figure-size: var(--basalt-stat-group-figure, var(--vx-text-lg));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* A one-column group (under 260px) has no spanning card: each keeps its own width's clamp. */
|
|
208
|
+
@container basalt-grid (max-width: 259.9px) {
|
|
209
|
+
[data-sm-cols] .body {
|
|
210
|
+
--basalt-stat-figure-size: clamp(var(--vx-text-lg), 8cqi, var(--vx-text-kpi));
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
197
214
|
/* ── states ──────────────────────────────────────────────────────────────────────────────────── */
|
|
198
215
|
|
|
199
216
|
/* The empty branch: one muted line in the figure's place, at the figure row's height. */
|
|
@@ -388,10 +405,10 @@
|
|
|
388
405
|
margin-inline: calc(-1 * var(--vx-space-card-inset-x, 1rem));
|
|
389
406
|
}
|
|
390
407
|
|
|
391
|
-
/* A
|
|
408
|
+
/* A slotted chart's readout line (`--basalt-spark-readout-h`) above its plot: the card gap already sits
|
|
392
409
|
* above the slot, the slot reserves the rest, so the chip never covers the delta or qualifier row.
|
|
393
410
|
* `.foot` reserves the same, so a card with a sparkline and one without keep the same height. */
|
|
394
|
-
.sparklineBleed:has([data-basalt-sparkline]) {
|
|
411
|
+
.sparklineBleed:has([data-basalt-sparkline], [data-basalt-chart]) {
|
|
395
412
|
box-sizing: content-box;
|
|
396
413
|
padding-top: var(--basalt-spark-readout-reserve);
|
|
397
414
|
}
|
|
@@ -223,6 +223,44 @@
|
|
|
223
223
|
min-width: 0;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
+
/* Loading keeps the slot's or footer's own box (the consumer's visual or footer, laid out as loaded) and
|
|
227
|
+
* hides it under a skeleton, so the cell has its loaded height. A `Meter` inside draws its own loading
|
|
228
|
+
* rows and so stays visible; any other visual is covered by the one skeleton bar. */
|
|
229
|
+
.hold {
|
|
230
|
+
position: relative;
|
|
231
|
+
visibility: hidden;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.hold [data-basalt-meter],
|
|
235
|
+
.holdSkeleton {
|
|
236
|
+
visibility: visible;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.holdSkeleton {
|
|
240
|
+
position: absolute;
|
|
241
|
+
inset-block: 0.25rem;
|
|
242
|
+
inset-inline-start: 0;
|
|
243
|
+
width: 55%;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* The hero's bar: the value row's first line, as the plain skeleton. */
|
|
247
|
+
.holdHero {
|
|
248
|
+
composes: holdSkeleton;
|
|
249
|
+
inset-block: 0 auto;
|
|
250
|
+
width: 45%;
|
|
251
|
+
height: calc(var(--vx-text-kpi) * 1.25);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.visual.hold > .holdSkeleton {
|
|
255
|
+
inset-block-start: max(0px, calc(var(--basalt-spark-readout-h) - var(--vx-space-stack-sm)));
|
|
256
|
+
inset-block-end: 0;
|
|
257
|
+
width: 100%;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.hold:has([data-basalt-meter]) > .holdSkeleton {
|
|
261
|
+
display: none;
|
|
262
|
+
}
|
|
263
|
+
|
|
226
264
|
/* A Sparkline's hover readout takes this line above its plot (`charts/sparkline.module.css`). The
|
|
227
265
|
* cell's own stack gap already sits above it; the slot reserves the rest, so the chip never covers
|
|
228
266
|
* the value. */
|
|
@@ -230,7 +268,8 @@
|
|
|
230
268
|
--basalt-spark-readout-h: 1.125rem;
|
|
231
269
|
}
|
|
232
270
|
|
|
233
|
-
|
|
271
|
+
/* A slotted chart's readout line above its plot: the cell reserves it so the chip never covers the value. */
|
|
272
|
+
.visual:has([data-basalt-sparkline], [data-basalt-chart]) {
|
|
234
273
|
padding-top: max(0px, calc(var(--basalt-spark-readout-h) - var(--vx-space-stack-sm)));
|
|
235
274
|
}
|
|
236
275
|
|
|
@@ -21,6 +21,9 @@ declare const classes: {
|
|
|
21
21
|
readonly skeletonValue: string
|
|
22
22
|
readonly skeletonRow: string
|
|
23
23
|
readonly visual: string
|
|
24
|
+
readonly hold: string
|
|
25
|
+
readonly holdSkeleton: string
|
|
26
|
+
readonly holdHero: string
|
|
24
27
|
readonly visualStack: string
|
|
25
28
|
readonly reason: string
|
|
26
29
|
readonly error: string
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
* `tone` inks the VALUE only, for a verdict; a null reading is `—`. A cell may carry BOTH: the hero
|
|
9
9
|
* (e.g. VO2max) with `rows` under it; omit `value` to render the rows alone.
|
|
10
10
|
*
|
|
11
|
+
* `loading` keeps the loaded shape: the value bar, the visual slot and the footer line at their loaded
|
|
12
|
+
* height (the visual and footer are laid out hidden under a skeleton).
|
|
13
|
+
*
|
|
11
14
|
* `state` replaces the readings (hero, visual, rows, footer) with the cell's empty or error body, at
|
|
12
15
|
* the cell's size. Empty: the reason, muted, in the value's place (`—` only when no reason is given). Error: the shared error
|
|
13
16
|
* anatomy compact — status dot, the words `Could not load`, the message, the shared Retry. The caption stays.
|
|
@@ -48,7 +51,7 @@ import { StatusDot } from '../theme/status-dot'
|
|
|
48
51
|
import { VX } from '../tokens'
|
|
49
52
|
import { InfoGlyph } from './widget-header'
|
|
50
53
|
import classes from './stat-strip.module.css'
|
|
51
|
-
import { HOSTED, VisualSlotContext } from './visual-slot'
|
|
54
|
+
import { HOSTED, HOSTED_LOADING, VisualSlotContext } from './visual-slot'
|
|
52
55
|
|
|
53
56
|
/** The URL shot states an anchor can declare itself absent in (`data-shot-absent`). */
|
|
54
57
|
type StatStripShotState = 'empty' | 'loading' | 'error'
|
|
@@ -109,7 +112,12 @@ export type StatStripCell = {
|
|
|
109
112
|
rows?: readonly StatStripRow[]
|
|
110
113
|
/** Inks the value only — set it when the reading is a verdict. */
|
|
111
114
|
tone?: Tone
|
|
112
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Skeleton in place of the readings, in the loaded shape: the value bar, the `visual` slot and the
|
|
117
|
+
* `footer` line keep the height they have loaded. Pass the same `visual` and `footer` as at rest
|
|
118
|
+
* (empty data is fine): the slot is measured, never shown — a `Meter` in it draws its own loading
|
|
119
|
+
* rows, any other visual is covered by one skeleton.
|
|
120
|
+
*/
|
|
113
121
|
loading?: boolean
|
|
114
122
|
/** Dims the cell while placeholder data shows. */
|
|
115
123
|
stale?: boolean
|
|
@@ -126,6 +134,9 @@ export type StatStripFooterEntry = {
|
|
|
126
134
|
* every width, as a sibling AFTER the article (outside its `aria-labelledby` region). For a key that
|
|
127
135
|
* names no cell it takes the full width under the grid. */
|
|
128
136
|
under?: string
|
|
137
|
+
/** The shot states this entry is absent in; replaces the strip's `shotAbsent` (an entry production
|
|
138
|
+
* omits where the strip itself shows, e.g. a fact that needs data the empty state lacks). */
|
|
139
|
+
shotAbsent?: readonly StatStripShotState[]
|
|
129
140
|
}
|
|
130
141
|
|
|
131
142
|
export type StatStripProps = BasaltProps & {
|
|
@@ -189,7 +200,7 @@ function FooterCell({
|
|
|
189
200
|
className={under ? classes.underCell : classes.footerCell}
|
|
190
201
|
data-strip-footer-cell={entry.key}
|
|
191
202
|
data-shot={`strip-footer-${entry.key}`}
|
|
192
|
-
{...absentAttr(shotAbsent)}
|
|
203
|
+
{...absentAttr(entry.shotAbsent ?? shotAbsent)}
|
|
193
204
|
{...(under && { 'data-under': entry.under })}
|
|
194
205
|
>
|
|
195
206
|
{entry.content}
|
|
@@ -210,16 +221,41 @@ function StripCell({
|
|
|
210
221
|
const { rows, loading } = cell
|
|
211
222
|
const state = loading ? undefined : cell.state
|
|
212
223
|
const hasHero = cell.value !== undefined || rows === undefined
|
|
213
|
-
// The cell's verdict colours a plain Meter in its visual too (a hero host only).
|
|
214
|
-
|
|
224
|
+
// The cell's verdict colours a plain Meter in its visual too (a hero host only). While loading, a
|
|
225
|
+
// Meter in the slot draws its own loading state (the loaded rows, text painted as skeleton).
|
|
226
|
+
const hostSlot = !hasHero
|
|
227
|
+
? loading
|
|
228
|
+
? HOSTED_LOADING
|
|
229
|
+
: null
|
|
230
|
+
: cell.tone === undefined
|
|
231
|
+
? loading
|
|
232
|
+
? HOSTED_LOADING
|
|
233
|
+
: HOSTED
|
|
234
|
+
: { tone: cell.tone, ...(loading && { loading }) }
|
|
215
235
|
// A footer rides with what it captions: it follows the cell's last part, whatever a sibling holds.
|
|
236
|
+
// Loading keeps its box (so a wrapping footer keeps its lines) and lays a skeleton over it.
|
|
216
237
|
const footerEl = cell.footer !== undefined && (
|
|
217
|
-
<div
|
|
238
|
+
<div
|
|
239
|
+
className={cx(classes.footer, loading && classes.hold)}
|
|
240
|
+
data-strip-footer
|
|
241
|
+
{...(loading && { 'aria-hidden': true, inert: true })}
|
|
242
|
+
>
|
|
218
243
|
{cell.footer}
|
|
244
|
+
{loading && <Skeleton className={classes.holdSkeleton} radius="sm" />}
|
|
219
245
|
</div>
|
|
220
246
|
)
|
|
247
|
+
// A delta can wrap under the value in a narrow cell: with one, loading lays out the loaded value row
|
|
248
|
+
// (hidden) under the skeleton bar, so the cell has the lines the loaded one has.
|
|
221
249
|
const heroEl = loading ? (
|
|
222
|
-
|
|
250
|
+
cell.delta === undefined ? (
|
|
251
|
+
<Skeleton className={classes.skeletonValue} radius="sm" />
|
|
252
|
+
) : (
|
|
253
|
+
<div className={cx(classes.valueRow, classes.hold)} aria-hidden inert>
|
|
254
|
+
<span className={classes.value}>{cell.value ?? EMPTY}</span>
|
|
255
|
+
{cell.delta}
|
|
256
|
+
<Skeleton className={classes.holdHero} radius="sm" />
|
|
257
|
+
</div>
|
|
258
|
+
)
|
|
223
259
|
) : (
|
|
224
260
|
<div className={classes.valueRow}>
|
|
225
261
|
<span
|
|
@@ -276,8 +312,13 @@ function StripCell({
|
|
|
276
312
|
{state !== undefined && <CellState state={state} />}
|
|
277
313
|
{state === undefined && hasHero && heroEl}
|
|
278
314
|
{state === undefined && cell.visual !== undefined && (
|
|
279
|
-
<div
|
|
315
|
+
<div
|
|
316
|
+
className={cx(classes.visual, loading && classes.hold)}
|
|
317
|
+
data-strip-visual
|
|
318
|
+
{...(loading && { 'aria-hidden': true, inert: true })}
|
|
319
|
+
>
|
|
280
320
|
<VisualSlotContext.Provider value={hostSlot}>{cell.visual}</VisualSlotContext.Provider>
|
|
321
|
+
{loading && <Skeleton className={classes.holdSkeleton} radius="sm" />}
|
|
281
322
|
</div>
|
|
282
323
|
)}
|
|
283
324
|
{state === undefined &&
|
|
@@ -9,9 +9,14 @@ import type { Tone } from '../common/props'
|
|
|
9
9
|
|
|
10
10
|
export interface VisualSlot {
|
|
11
11
|
readonly tone?: Tone
|
|
12
|
+
/** The host is loading: a `Meter` in the slot draws its loading state without its own `loading`. */
|
|
13
|
+
readonly loading?: boolean
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
/** A host with no verdict of its own: one shared object, so a provider never re-renders its readers. */
|
|
15
17
|
export const HOSTED: VisualSlot = {}
|
|
16
18
|
|
|
19
|
+
/** `HOSTED` while the host loads. */
|
|
20
|
+
export const HOSTED_LOADING: VisualSlot = { loading: true }
|
|
21
|
+
|
|
17
22
|
export const VisualSlotContext = createContext<VisualSlot | null>(null)
|
|
@@ -221,6 +221,15 @@
|
|
|
221
221
|
min-width: 0;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
/* A `widget` tier (ChartCard) caption in `actions` — `<Text size="xs">`, 12 — joins the chart text
|
|
225
|
+
* step beside the plot's ticks and legend (argo's strength cards: title 13 + caption 12 + ticks 11
|
|
226
|
+
* + section title 15 was four sizes). The cap is the `--text-fz` variable `Text` reads, pinned
|
|
227
|
+
* `!important` over the inline value its `size` prop writes; other sizes (`md` figures, `sm`) are
|
|
228
|
+
* not touched, and a `Text` sized by a consumer class never reads the variable. */
|
|
229
|
+
.root[data-tier='widget'] .actions :global(.mantine-Text-root[style*='--mantine-font-size-xs']) {
|
|
230
|
+
--text-fz: var(--vx-text-micro) !important;
|
|
231
|
+
}
|
|
232
|
+
|
|
224
233
|
/* Directly under the title row, 4px off it — 1px put it inside the title's own line box, so a
|
|
225
234
|
* section with both read as a two-line heading rather than a heading plus a note. */
|
|
226
235
|
.subtitle {
|