basalt-ui 2.22.0 → 2.24.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 +68 -0
- package/MIGRATING.md +400 -12
- package/agent/agents/basalt-design-reviewer.md +3 -3
- package/agent/skills/basalt-design/SKILL.md +2 -2
- package/agent/skills/basalt-design/references/catalogue.md +22 -19
- package/agent/skills/basalt-design/references/states.md +39 -0
- package/dist/charts/BandStrip.d.ts.map +1 -1
- package/dist/charts/BandStrip.js +51 -5
- package/dist/charts/Bars.d.ts.map +1 -1
- package/dist/charts/Bars.js +19 -3
- package/dist/charts/CartesianChart.d.ts +2 -0
- package/dist/charts/CartesianChart.d.ts.map +1 -1
- package/dist/charts/CartesianChart.js +7 -3
- package/dist/charts/ChartCard.d.ts +1 -1
- package/dist/charts/ChartCard.d.ts.map +1 -1
- package/dist/charts/ChartCard.js +25 -15
- package/dist/charts/Sparkline.d.ts +8 -2
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +95 -15
- package/dist/charts/StackedArea.d.ts.map +1 -1
- package/dist/charts/StackedArea.js +5 -1
- package/dist/charts/band-fold.d.ts +22 -4
- package/dist/charts/band-fold.d.ts.map +1 -1
- package/dist/charts/band-fold.js +10 -2
- package/dist/charts/chart-dates.d.ts +12 -0
- package/dist/charts/chart-dates.d.ts.map +1 -0
- package/dist/charts/chart-dates.js +16 -0
- package/dist/charts/chart-legend.module.css +16 -0
- package/dist/charts/compile.d.ts +10 -0
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +77 -24
- package/dist/charts/date-tick-format.d.ts +5 -5
- package/dist/charts/date-tick-format.d.ts.map +1 -1
- package/dist/charts/date-tick-format.js +3 -7
- package/dist/charts/labels.d.ts +7 -3
- package/dist/charts/labels.d.ts.map +1 -1
- package/dist/charts/labels.js +28 -17
- package/dist/charts/legend.d.ts +0 -6
- package/dist/charts/legend.d.ts.map +1 -1
- package/dist/charts/legend.js +87 -35
- package/dist/charts/ref-label.d.ts +17 -0
- package/dist/charts/ref-label.d.ts.map +1 -1
- package/dist/charts/ref-label.js +13 -1
- package/dist/charts/sparkline.module.css +62 -12
- package/dist/charts/sparkline.module.css.d.ts +1 -0
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +4 -2
- package/dist/charts/types.d.ts +15 -3
- package/dist/charts/types.d.ts.map +1 -1
- package/dist/cli/shot/capture.d.ts.map +1 -1
- package/dist/cli/shot/capture.js +9 -5
- package/dist/cli/shot/detect.js +8 -5
- package/dist/cli/shot/measure.js +19 -23
- package/dist/cli/shot/playwright.d.ts +8 -0
- package/dist/cli/shot/playwright.d.ts.map +1 -1
- package/dist/cli/shot/playwright.js +5 -1
- package/dist/cli/shot/types.d.ts +2 -0
- package/dist/cli/shot/types.d.ts.map +1 -1
- package/dist/cli/tokens-css.d.ts +5 -7
- package/dist/cli/tokens-css.d.ts.map +1 -1
- package/dist/cli/tokens-css.js +11 -12
- package/dist/dashboard/bar-list.d.ts +6 -1
- package/dist/dashboard/bar-list.d.ts.map +1 -1
- package/dist/dashboard/bar-list.js +8 -0
- package/dist/dashboard/bar-list.module.css +18 -0
- package/dist/dashboard/delta-badge.d.ts.map +1 -1
- package/dist/dashboard/delta-badge.js +2 -2
- package/dist/dashboard/empty-state.d.ts.map +1 -1
- package/dist/dashboard/meter-model.d.ts +55 -21
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +98 -17
- package/dist/dashboard/meter-parts.d.ts +9 -2
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +99 -21
- package/dist/dashboard/meter.d.ts +21 -8
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.js +14 -3
- package/dist/dashboard/meter.module.css +57 -2
- package/dist/dashboard/meter.module.css.d.ts +5 -0
- package/dist/dashboard/query-state.d.ts +7 -3
- package/dist/dashboard/query-state.d.ts.map +1 -1
- package/dist/dashboard/query-state.js +15 -7
- package/dist/dashboard/section.d.ts +2 -1
- package/dist/dashboard/section.d.ts.map +1 -1
- package/dist/dashboard/section.module.css +12 -0
- package/dist/dashboard/settings-section.d.ts +1 -1
- package/dist/dashboard/settings-section.d.ts.map +1 -1
- package/dist/dashboard/settings-section.js +3 -3
- package/dist/dashboard/stat-card-parts.js +1 -1
- package/dist/dashboard/stat-card.module.css +43 -10
- package/dist/dashboard/stat-group.module.css +15 -0
- package/dist/dashboard/stat-strip.d.ts +16 -5
- package/dist/dashboard/stat-strip.d.ts.map +1 -1
- package/dist/dashboard/stat-strip.js +100 -74
- package/dist/dashboard/stat-strip.module.css +68 -62
- package/dist/dashboard/stat-strip.module.css.d.ts +1 -0
- package/dist/dashboard/widget-header.d.ts.map +1 -1
- package/dist/dashboard/widget-header.js +19 -1
- package/dist/dashboard/widget-header.module.css +6 -0
- package/dist/guard/index.d.ts +2 -2
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +1 -17
- package/dist/styles.css +18 -11
- package/dist/table/data-table.js +1 -1
- package/dist/theme/controls.module.css +19 -0
- package/dist/theme/controls.module.css.d.ts +1 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +12 -7
- package/dist/theme/status-verdict.d.ts.map +1 -1
- package/dist/theme/status-verdict.js +9 -1
- package/dist/tokens/palette.d.ts +7 -10
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +7 -10
- package/llms.txt +7 -4
- package/package.json +1 -1
- package/src/charts/BandStrip.tsx +55 -5
- package/src/charts/Bars.tsx +31 -3
- package/src/charts/CartesianChart.tsx +9 -3
- package/src/charts/ChartCard.tsx +32 -19
- package/src/charts/Sparkline.tsx +139 -21
- package/src/charts/StackedArea.tsx +12 -1
- package/src/charts/band-fold.ts +25 -6
- package/src/charts/chart-dates.ts +30 -0
- package/src/charts/chart-legend.module.css +16 -0
- package/src/charts/compile.ts +148 -25
- package/src/charts/date-tick-format.ts +10 -13
- package/src/charts/labels.ts +43 -22
- package/src/charts/legend.tsx +70 -3
- package/src/charts/ref-label.ts +27 -0
- package/src/charts/sparkline.module.css +62 -12
- package/src/charts/sparkline.module.css.d.ts +1 -0
- package/src/charts/state.tsx +7 -4
- package/src/charts/types.ts +13 -3
- package/src/cli/shot/capture.ts +15 -3
- package/src/cli/shot/detect.ts +9 -9
- package/src/cli/shot/measure.ts +27 -27
- package/src/cli/shot/playwright.ts +18 -2
- package/src/cli/shot/types.ts +2 -0
- package/src/cli/tokens-css.ts +18 -20
- package/src/dashboard/bar-list.module.css +18 -0
- package/src/dashboard/bar-list.tsx +29 -0
- package/src/dashboard/delta-badge.tsx +6 -2
- package/src/dashboard/empty-state.tsx +4 -2
- package/src/dashboard/meter-model.ts +181 -47
- package/src/dashboard/meter-parts.tsx +187 -30
- package/src/dashboard/meter.module.css +57 -2
- package/src/dashboard/meter.module.css.d.ts +5 -0
- package/src/dashboard/meter.tsx +33 -10
- package/src/dashboard/query-state.tsx +20 -9
- package/src/dashboard/section.module.css +12 -0
- package/src/dashboard/section.tsx +2 -1
- package/src/dashboard/settings-section.tsx +4 -4
- package/src/dashboard/stat-card-parts.tsx +1 -1
- package/src/dashboard/stat-card.module.css +43 -10
- package/src/dashboard/stat-group.module.css +15 -0
- package/src/dashboard/stat-strip.module.css +68 -62
- package/src/dashboard/stat-strip.module.css.d.ts +1 -0
- package/src/dashboard/stat-strip.tsx +118 -59
- package/src/dashboard/widget-header.module.css +6 -0
- package/src/dashboard/widget-header.tsx +28 -1
- package/src/guard/index.ts +3 -19
- package/src/styles.css +18 -11
- package/src/table/data-table.tsx +1 -1
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +14 -8
- package/src/theme/controls.module.css +19 -0
- package/src/theme/controls.module.css.d.ts +1 -0
- package/src/theme/index.ts +12 -7
- package/src/theme/status-verdict.tsx +5 -1
- package/src/tokens/palette.ts +7 -10
|
@@ -7,7 +7,7 @@ import { cx } from "../common/props.js";
|
|
|
7
7
|
import classes from "./settings-section.module.css";
|
|
8
8
|
const eyebrowStyle = {
|
|
9
9
|
fontFamily: "var(--basalt-font-mono)",
|
|
10
|
-
fontSize: VX.text.
|
|
10
|
+
fontSize: VX.text.xs,
|
|
11
11
|
fontWeight: 500,
|
|
12
12
|
letterSpacing: "0.06em",
|
|
13
13
|
textTransform: "uppercase",
|
|
@@ -55,8 +55,8 @@ function SettingsRow({
|
|
|
55
55
|
...style !== void 0 && { style },
|
|
56
56
|
children: [
|
|
57
57
|
/* @__PURE__ */ jsxs(Stack, { gap: 2, ...classNames?.label !== void 0 && { className: classNames.label }, children: [
|
|
58
|
-
/* @__PURE__ */ jsx("span", { style: { fontSize: VX.text.
|
|
59
|
-
description && /* @__PURE__ */ jsx("span", { style: { fontSize: VX.text.
|
|
58
|
+
/* @__PURE__ */ jsx("span", { style: { fontSize: VX.text.sm, color: VX.ink }, children: label }),
|
|
59
|
+
description && /* @__PURE__ */ jsx("span", { style: { fontSize: VX.text.xs, color: VX.muted }, children: description })
|
|
60
60
|
] }),
|
|
61
61
|
/* @__PURE__ */ jsx("div", { className: cx(classes.control, classNames?.control), children: control ?? children })
|
|
62
62
|
]
|
|
@@ -29,7 +29,7 @@ function CaptionRow({ title, icon, info, qualifier, tone, actions }) {
|
|
|
29
29
|
}
|
|
30
30
|
)
|
|
31
31
|
] }),
|
|
32
|
-
qualifier !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.qualifier, title: qualifier, children: qualifier })
|
|
32
|
+
qualifier !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.qualifier, title: qualifier, "data-stat-qualifier": true, children: qualifier })
|
|
33
33
|
] }),
|
|
34
34
|
actions !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.actions, "data-basalt-hit-scope": true, children: /* @__PURE__ */ jsx(CtlSlot, { tier: "widget", children: actions }) })
|
|
35
35
|
] });
|
|
@@ -96,20 +96,39 @@
|
|
|
96
96
|
min-width: 0;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
/* A card too narrow to share its caption row (a two-column phone cell, ~170px)
|
|
100
|
-
*
|
|
101
|
-
*
|
|
99
|
+
/* A card too narrow to share its caption row (a two-column phone cell, ~170px): the qualifier takes its
|
|
100
|
+
* own line under the caption, where it wraps again rather than truncating (a qualifier can be the only place
|
|
101
|
+
* a band is stated). A card without one reserves the line when a StatGroup row-mate has one, so the values of
|
|
102
|
+
* one StatGroup row share a baseline. The caption keeps its line (it truncates, with
|
|
103
|
+
* its `title`, only when it alone does not fit). */
|
|
102
104
|
@container basalt-card (max-width: 239.9px) {
|
|
105
|
+
.captionMain:has(> .qualifier) {
|
|
106
|
+
--basalt-stat-qualifier-reserve: 1;
|
|
107
|
+
}
|
|
108
|
+
|
|
103
109
|
.captionMain {
|
|
104
|
-
|
|
110
|
+
/* 1 when this card has a qualifier or a StatGroup sibling does (`stat-group.module.css`), else 0:
|
|
111
|
+
* a card nobody shares a row with a qualifier to reserves nothing. */
|
|
112
|
+
--basalt-stat-qualifier-h: calc(
|
|
113
|
+
var(--vx-text-micro) * 1.4 * var(--basalt-stat-qualifier-reserve, 0)
|
|
114
|
+
);
|
|
115
|
+
align-content: flex-start;
|
|
116
|
+
justify-content: flex-start;
|
|
117
|
+
min-height: calc(
|
|
118
|
+
var(--vx-space-control-height-widget, 1.5rem) * var(--mantine-scale, 1) +
|
|
119
|
+
var(--basalt-stat-qualifier-h)
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.lead {
|
|
124
|
+
min-height: calc(var(--vx-space-control-height-widget, 1.5rem) * var(--mantine-scale, 1));
|
|
105
125
|
}
|
|
106
126
|
|
|
127
|
+
/* Always its own line: siblings of one group never place it differently (beside, or under). */
|
|
107
128
|
.qualifier {
|
|
108
|
-
flex:
|
|
109
|
-
|
|
110
|
-
text-
|
|
111
|
-
white-space: nowrap;
|
|
112
|
-
text-align: end;
|
|
129
|
+
flex-basis: 100%;
|
|
130
|
+
line-height: 1.4;
|
|
131
|
+
text-wrap: balance;
|
|
113
132
|
}
|
|
114
133
|
}
|
|
115
134
|
|
|
@@ -233,8 +252,14 @@
|
|
|
233
252
|
gap: var(--basalt-stat-foot-gap);
|
|
234
253
|
margin-top: auto;
|
|
235
254
|
min-width: 0;
|
|
255
|
+
/* The sparkline slot's readout reserve (`.sparklineBleed`): the readout line less the card gap above. */
|
|
256
|
+
--basalt-spark-readout-reserve: max(
|
|
257
|
+
0px,
|
|
258
|
+
calc(var(--basalt-spark-readout-h) - var(--vx-space-stat-card-gap))
|
|
259
|
+
);
|
|
236
260
|
min-height: calc(
|
|
237
|
-
var(--basalt-stat-visual-h) + var(--basalt-
|
|
261
|
+
var(--basalt-stat-visual-h) + var(--basalt-spark-readout-reserve) +
|
|
262
|
+
var(--basalt-stat-foot-gap) + var(--basalt-stat-footer-h)
|
|
238
263
|
);
|
|
239
264
|
}
|
|
240
265
|
|
|
@@ -363,6 +388,14 @@
|
|
|
363
388
|
margin-inline: calc(-1 * var(--vx-space-card-inset-x, 1rem));
|
|
364
389
|
}
|
|
365
390
|
|
|
391
|
+
/* A Sparkline's readout line (`--basalt-spark-readout-h`) above its plot: the card gap already sits
|
|
392
|
+
* above the slot, the slot reserves the rest, so the chip never covers the delta or qualifier row.
|
|
393
|
+
* `.foot` reserves the same, so a card with a sparkline and one without keep the same height. */
|
|
394
|
+
.sparklineBleed:has([data-basalt-sparkline]) {
|
|
395
|
+
box-sizing: content-box;
|
|
396
|
+
padding-top: var(--basalt-spark-readout-reserve);
|
|
397
|
+
}
|
|
398
|
+
|
|
366
399
|
/* A Meter in the visual slot is a block, not a chart: it sizes to its content and keeps the card's
|
|
367
400
|
* inline inset instead of the sparkline's fixed 22px and side bleed. */
|
|
368
401
|
.sparklineBleed:has(> [data-basalt-meter]) {
|
|
@@ -43,6 +43,13 @@
|
|
|
43
43
|
gap: var(--vx-space-stack-md);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/* A card with a qualifier tells its row-mates to reserve the qualifier line in a narrow card, so the
|
|
47
|
+
* values of one group share a baseline (`stat-card.module.css`). Group-wide, not per row: the row a
|
|
48
|
+
* card lands in depends on the container, which a selector cannot read. */
|
|
49
|
+
.root:has([data-stat-qualifier]) {
|
|
50
|
+
--basalt-stat-qualifier-reserve: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
/* 260px is StatGroup's own literal (docs/DESIGN-CORE.md § Layout, elevation, shapes), not a container class: one column below it,
|
|
47
54
|
* so every cell leads a row and the rail draws no leading hairline at all. */
|
|
48
55
|
@container basalt-grid (max-width: 259.9px) {
|
|
@@ -56,6 +63,14 @@
|
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
|
|
66
|
+
/* An odd count never leaves one cell alone on a half-empty row: below 480px (two columns) the last
|
|
67
|
+
* odd cell spans the row, as the strip's does. */
|
|
68
|
+
@container basalt-grid (max-width: 479.9px) {
|
|
69
|
+
.root > *:last-child:nth-child(odd) {
|
|
70
|
+
grid-column: 1 / -1;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
59
74
|
@container basalt-grid (min-width: 800px) {
|
|
60
75
|
.root {
|
|
61
76
|
grid-template-columns: repeat(var(--basalt-stat-group-cols-sm), minmax(0, 1fr));
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { BasaltProps, Tone } from '../common/props.js';
|
|
3
|
+
/** The URL shot states an anchor can declare itself absent in (`data-shot-absent`). */
|
|
4
|
+
type StatStripShotState = 'empty' | 'loading' | 'error';
|
|
3
5
|
export type StatStripRow = {
|
|
4
6
|
key: string;
|
|
5
7
|
label: string;
|
|
@@ -55,19 +57,28 @@ export type StatStripCell = {
|
|
|
55
57
|
stale?: boolean;
|
|
56
58
|
/** Empty or failed: replaces the readings; `loading` wins while pending. */
|
|
57
59
|
state?: StatStripCellState;
|
|
60
|
+
/** The shot states this cell's anchor is absent in; replaces the group's `shotAbsent`. */
|
|
61
|
+
shotAbsent?: readonly StatStripShotState[];
|
|
62
|
+
};
|
|
63
|
+
export type StatStripFooterEntry = {
|
|
64
|
+
key: string;
|
|
65
|
+
content: ReactNode;
|
|
66
|
+
/** The `key` of the cell this entry qualifies: it renders inside that cell, under its content, at
|
|
67
|
+
* every width, as a sibling AFTER the article (outside its `aria-labelledby` region). For a key that
|
|
68
|
+
* names no cell it takes the full width under the grid. */
|
|
69
|
+
under?: string;
|
|
58
70
|
};
|
|
59
71
|
export type StatStripProps = BasaltProps & {
|
|
60
72
|
/** The strip's accessible name. */
|
|
61
73
|
label: string;
|
|
62
74
|
cells: readonly StatStripCell[];
|
|
63
75
|
/** Wider cells under the cells. */
|
|
64
|
-
footer?: readonly
|
|
65
|
-
key: string;
|
|
66
|
-
content: ReactNode;
|
|
67
|
-
}[];
|
|
76
|
+
footer?: readonly StatStripFooterEntry[];
|
|
68
77
|
/** The DESKTOP column count. Default: the cell count, capped at 6. */
|
|
69
78
|
cols?: 2 | 3 | 4 | 5 | 6;
|
|
79
|
+
/** The shot states the page hides the whole strip in (`data-shot-absent` on every derived anchor). */
|
|
80
|
+
shotAbsent?: readonly StatStripShotState[];
|
|
70
81
|
};
|
|
71
|
-
export declare function StatStrip({ label, cells, footer, cols, className, style }: StatStripProps): import("react").JSX.Element;
|
|
82
|
+
export declare function StatStrip({ label, cells, footer, cols, shotAbsent, className, style, }: StatStripProps): import("react").JSX.Element;
|
|
72
83
|
export {};
|
|
73
84
|
//# sourceMappingURL=stat-strip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat-strip.d.ts","sourceRoot":"","sources":["../../src/dashboard/stat-strip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stat-strip.d.ts","sourceRoot":"","sources":["../../src/dashboard/stat-strip.tsx"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAQxD,uFAAuF;AACvF,KAAK,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;AAKvD,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,0EAA0E;IAC1E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,sBAAsB;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,wFAAwF;AACxF,KAAK,kBAAkB,GACnB;IACE,IAAI,EAAE,OAAO,CAAA;IACb,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,GACD;IACE,IAAI,EAAE,OAAO,CAAA;IACb,wDAAwD;IACxD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAEL,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf;iEAC6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;kCAC8B;IAC9B,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sBAAsB;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,yEAAyE;IACzE,IAAI,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;IAC9B,kEAAkE;IAClE,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,yCAAyC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kDAAkD;IAClD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,4EAA4E;IAC5E,KAAK,CAAC,EAAE,kBAAkB,CAAA;IAC1B,0FAA0F;IAC1F,UAAU,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;CAC3C,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,SAAS,CAAA;IAClB;;+DAE2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG;IACzC,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,SAAS,aAAa,EAAE,CAAA;IAC/B,mCAAmC;IACnC,MAAM,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAA;IACxC,sEAAsE;IACtE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACxB,sGAAsG;IACtG,UAAU,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;CAC3C,CAAA;AA6KD,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,MAAM,EACN,IAAI,EACJ,UAAU,EACV,SAAS,EACT,KAAK,GACN,EAAE,cAAc,+BA8ChB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Card, Skeleton } from "@mantine/core";
|
|
3
3
|
import { useId } from "react";
|
|
4
4
|
import { toErrorMessage } from "../common/errors.js";
|
|
@@ -9,41 +9,53 @@ import { VX } from "../tokens/index.js";
|
|
|
9
9
|
import { InfoGlyph } from "./widget-header.js";
|
|
10
10
|
import classes from "./stat-strip.module.css";
|
|
11
11
|
import { HOSTED, VisualSlotContext } from "./visual-slot.js";
|
|
12
|
+
const absentAttr = (states) => states === void 0 || states.length === 0 ? {} : { "data-shot-absent": states.join(" ") };
|
|
12
13
|
const EMPTY = "\u2014";
|
|
13
14
|
function CellState({ state }) {
|
|
14
15
|
if (state.kind === "empty") {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
if (state.reason !== void 0) {
|
|
17
|
+
return /* @__PURE__ */ jsx("p", { className: classes.reason, "data-strip-reason": true, children: state.reason });
|
|
18
|
+
}
|
|
19
|
+
return /* @__PURE__ */ jsx("div", { className: classes.valueRow, children: /* @__PURE__ */ jsx("span", { className: classes.value, "data-strip-value": true, children: EMPTY }) });
|
|
19
20
|
}
|
|
20
21
|
const message = toErrorMessage(state.error, "The request failed.");
|
|
21
22
|
return /* @__PURE__ */ jsxs("div", { className: classes.error, role: "alert", "data-strip-state": "error", children: [
|
|
22
23
|
/* @__PURE__ */ jsxs("span", { className: classes.errorHead, children: [
|
|
23
24
|
/* @__PURE__ */ jsx(StatusDot, { color: VX.status.bad }),
|
|
24
|
-
"
|
|
25
|
+
"Could not load"
|
|
25
26
|
] }),
|
|
26
27
|
/* @__PURE__ */ jsx("p", { className: classes.reason, children: message }),
|
|
27
28
|
state.onRetry !== void 0 && /* @__PURE__ */ jsx(RetryButton, { onClick: state.onRetry, retrying: state.retrying ?? false })
|
|
28
29
|
] });
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return
|
|
31
|
+
function FooterCell({
|
|
32
|
+
entry,
|
|
33
|
+
shotAbsent,
|
|
34
|
+
under
|
|
35
|
+
}) {
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: under ? classes.underCell : classes.footerCell,
|
|
40
|
+
"data-strip-footer-cell": entry.key,
|
|
41
|
+
"data-shot": `strip-footer-${entry.key}`,
|
|
42
|
+
...absentAttr(shotAbsent),
|
|
43
|
+
...under && { "data-under": entry.under },
|
|
44
|
+
children: entry.content
|
|
45
|
+
}
|
|
46
|
+
);
|
|
36
47
|
}
|
|
37
|
-
function StripCell({
|
|
48
|
+
function StripCell({
|
|
49
|
+
cell,
|
|
50
|
+
shotAbsent,
|
|
51
|
+
under
|
|
52
|
+
}) {
|
|
38
53
|
const captionId = useId();
|
|
39
54
|
const { rows, loading } = cell;
|
|
40
55
|
const state = loading ? void 0 : cell.state;
|
|
41
56
|
const hasHero = cell.value !== void 0 || rows === void 0;
|
|
42
|
-
const ownFooter = cell.visual !== void 0 && rows === void 0;
|
|
43
|
-
const heroFooter = hasHero && cell.visual === void 0 && rows === void 0;
|
|
44
57
|
const hostSlot = !hasHero ? null : cell.tone === void 0 ? HOSTED : { tone: cell.tone };
|
|
45
|
-
const
|
|
46
|
-
const footerEl = cell.footer !== void 0 && /* @__PURE__ */ jsx("div", { className: cx(classes.footer, heroFooter && classes.heroFooter), "data-strip-footer": true, children: cell.footer });
|
|
58
|
+
const footerEl = cell.footer !== void 0 && /* @__PURE__ */ jsx("div", { className: classes.footer, "data-strip-footer": true, children: cell.footer });
|
|
47
59
|
const heroEl = loading ? /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonValue, radius: "sm" }) : /* @__PURE__ */ jsxs("div", { className: classes.valueRow, children: [
|
|
48
60
|
/* @__PURE__ */ jsx(
|
|
49
61
|
"span",
|
|
@@ -58,82 +70,96 @@ function StripCell({ cell }) {
|
|
|
58
70
|
cell.delta
|
|
59
71
|
] });
|
|
60
72
|
return (
|
|
61
|
-
// The slot owns the dividers and
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
73
|
+
// The slot owns the dividers and runs the row; the article inside ends at its content.
|
|
74
|
+
/* @__PURE__ */ jsxs("div", { className: classes.cell, "data-strip-slot": true, children: [
|
|
75
|
+
/* @__PURE__ */ jsxs(
|
|
76
|
+
"article",
|
|
77
|
+
{
|
|
78
|
+
className: classes.content,
|
|
79
|
+
"data-strip-cell": cell.key,
|
|
80
|
+
"data-shot": `strip-${cell.key}`,
|
|
81
|
+
"aria-labelledby": captionId,
|
|
82
|
+
...absentAttr(cell.shotAbsent ?? shotAbsent),
|
|
83
|
+
...state !== void 0 && { "data-strip-has-state": "" },
|
|
84
|
+
...state === void 0 && cell.visual !== void 0 && { "data-strip-has-visual": "" },
|
|
85
|
+
...state === void 0 && rows !== void 0 && { "data-strip-has-rows": "" },
|
|
86
|
+
...cell.stale && { "data-stale": "true" },
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsxs("div", { className: classes.captionLine, children: [
|
|
89
|
+
/* @__PURE__ */ jsxs("div", { className: classes.captionMain, children: [
|
|
90
|
+
/* @__PURE__ */ jsxs("span", { className: classes.lead, children: [
|
|
91
|
+
/* @__PURE__ */ jsx(
|
|
92
|
+
"span",
|
|
93
|
+
{
|
|
94
|
+
className: classes.caption,
|
|
95
|
+
id: captionId,
|
|
96
|
+
title: cell.caption,
|
|
97
|
+
"data-strip-caption": true,
|
|
98
|
+
children: cell.caption
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
cell.info !== void 0 && /* @__PURE__ */ jsx(InfoGlyph, { text: cell.info })
|
|
102
|
+
] }),
|
|
103
|
+
cell.qualifier !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.qualifier, children: cell.qualifier })
|
|
88
104
|
] }),
|
|
89
|
-
cell.
|
|
105
|
+
cell.action !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.action, "data-strip-action": true, children: cell.action })
|
|
90
106
|
] }),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
state === void 0 && !ownFooter && !heroFooter && footerEl
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
) })
|
|
107
|
+
state !== void 0 && /* @__PURE__ */ jsx(CellState, { state }),
|
|
108
|
+
state === void 0 && hasHero && heroEl,
|
|
109
|
+
state === void 0 && cell.visual !== void 0 && /* @__PURE__ */ jsx("div", { className: classes.visual, "data-strip-visual": true, children: /* @__PURE__ */ jsx(VisualSlotContext.Provider, { value: hostSlot, children: cell.visual }) }),
|
|
110
|
+
state === void 0 && rows !== void 0 && (loading ? /* @__PURE__ */ jsx("div", { className: classes.rows, "aria-hidden": "true", children: rows.map((row) => /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonRow, radius: "sm" }, row.key)) }) : /* @__PURE__ */ jsx("ul", { className: classes.rows, "data-strip-rows": true, children: rows.map((row) => /* @__PURE__ */ jsxs("li", { className: classes.row, "data-strip-row": row.key, children: [
|
|
111
|
+
/* @__PURE__ */ jsx("span", { className: classes.rowLabel, children: row.label }),
|
|
112
|
+
/* @__PURE__ */ jsx("span", { className: classes.visual, children: row.visual }),
|
|
113
|
+
/* @__PURE__ */ jsx("span", { className: classes.rowValue, children: row.hideValue ? null : row.value ?? EMPTY }),
|
|
114
|
+
/* @__PURE__ */ jsx("span", { children: row.delta })
|
|
115
|
+
] }, row.key)) })),
|
|
116
|
+
state === void 0 && footerEl
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
under.map((entry) => /* @__PURE__ */ jsx(FooterCell, { entry, shotAbsent, under: true }, entry.key))
|
|
121
|
+
] })
|
|
110
122
|
);
|
|
111
123
|
}
|
|
112
|
-
function StatStrip({
|
|
124
|
+
function StatStrip({
|
|
125
|
+
label,
|
|
126
|
+
cells,
|
|
127
|
+
footer,
|
|
128
|
+
cols,
|
|
129
|
+
shotAbsent,
|
|
130
|
+
className,
|
|
131
|
+
style
|
|
132
|
+
}) {
|
|
113
133
|
const desktop = cols ?? Math.min(Math.max(cells.length, 2), 6);
|
|
114
134
|
const mid = desktop === 4 ? 2 : Math.min(desktop, 3);
|
|
135
|
+
const keys = new Set(cells.map((cell) => cell.key));
|
|
136
|
+
const underOf = (key) => footer?.filter((entry) => entry.under === key) ?? [];
|
|
137
|
+
const rest = footer?.filter((entry) => entry.under === void 0 || !keys.has(entry.under)) ?? [];
|
|
138
|
+
const hasQualifier = cells.some((cell) => cell.qualifier !== void 0);
|
|
139
|
+
const hasAction = cells.some((cell) => cell.action !== void 0);
|
|
115
140
|
return /* @__PURE__ */ jsx("div", { className: cx(classes.container, className), style, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(
|
|
116
141
|
Card.Section,
|
|
117
142
|
{
|
|
118
143
|
component: "section",
|
|
119
144
|
"aria-label": label,
|
|
120
145
|
className: classes.clip,
|
|
146
|
+
...hasQualifier && { "data-strip-qualifier": "" },
|
|
147
|
+
...hasAction && { "data-strip-action-row": "" },
|
|
121
148
|
style: {
|
|
122
149
|
"--basalt-strip-cols": desktop,
|
|
123
150
|
"--basalt-strip-cols-sm": mid
|
|
124
151
|
},
|
|
125
152
|
children: [
|
|
126
|
-
/* @__PURE__ */ jsx("div", { className: classes.cells, children: cells.map((cell) => /* @__PURE__ */ jsx(
|
|
127
|
-
|
|
128
|
-
"div",
|
|
153
|
+
/* @__PURE__ */ jsx("div", { className: classes.cells, children: cells.map((cell) => /* @__PURE__ */ jsx(
|
|
154
|
+
StripCell,
|
|
129
155
|
{
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
children: entry.content
|
|
156
|
+
cell,
|
|
157
|
+
shotAbsent,
|
|
158
|
+
under: underOf(cell.key)
|
|
134
159
|
},
|
|
135
|
-
|
|
136
|
-
)) })
|
|
160
|
+
cell.key
|
|
161
|
+
)) }),
|
|
162
|
+
rest.length > 0 && /* @__PURE__ */ jsx("div", { className: classes.footerRow, children: rest.map((entry) => /* @__PURE__ */ jsx(FooterCell, { entry, shotAbsent, under: false }, entry.key)) })
|
|
137
163
|
]
|
|
138
164
|
}
|
|
139
165
|
) }) });
|
|
@@ -28,27 +28,26 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/* The CELL is the row-high column: it owns the hairlines, so they run the whole row however short
|
|
31
|
-
* the cell inside it ends. It paints nothing else — the one surface stays the Card's.
|
|
31
|
+
* the cell inside it ends. It paints nothing else — the one surface stays the Card's. It is also the
|
|
32
|
+
* size container the caption line answers to (a cell is ~170px at 390, ~250px at 1440). */
|
|
32
33
|
.cell {
|
|
33
34
|
display: grid;
|
|
34
|
-
|
|
35
|
-
grid-template-rows: subgrid;
|
|
35
|
+
align-content: start;
|
|
36
36
|
min-width: 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
container-type: inline-size;
|
|
38
|
+
container-name: basalt-card;
|
|
39
|
+
/* The foot inset lives HERE, on the row-high slot, so a cell that ends early keeps the strip's
|
|
40
|
+
* surface under it. */
|
|
40
41
|
padding-block-end: var(--vx-space-stack-md);
|
|
41
42
|
box-shadow:
|
|
42
43
|
-1px 0 0 var(--vx-divider),
|
|
43
44
|
0 -1px 0 var(--vx-divider);
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
/* The CONTENT
|
|
47
|
-
* so its own box ends at its content instead of at the row's bottom. */
|
|
47
|
+
/* The CONTENT is a plain column: its box ends at its content, whatever a sibling holds below. */
|
|
48
48
|
.content {
|
|
49
|
-
display:
|
|
50
|
-
|
|
51
|
-
grid-template-rows: subgrid;
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
52
51
|
align-self: start;
|
|
53
52
|
min-width: 0;
|
|
54
53
|
padding: var(--vx-space-stack-md) var(--vx-space-stack-md) 0;
|
|
@@ -63,18 +62,11 @@
|
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
/* Cells align by
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* row. A part a cell lacks collapses its track (the spacing is a margin on the part, not a gap).
|
|
71
|
-
* A footer rides with what it captions: under a hero alone it takes the hero-footer track right
|
|
72
|
-
* below the hero, under a visual it rides in the visual track (`.visualStack`); only a rows
|
|
73
|
-
* cell's footer uses the shared footer track. A hero-less cell (rows only) starts its rows in the
|
|
74
|
-
* visual track, so the hero track above them is the one void, and only as tall as a sibling's
|
|
75
|
-
* value. */
|
|
65
|
+
/* Cells align by CONSTRUCTION, not by shared tracks: the parts above the value have equal height in
|
|
66
|
+
* every cell of a row (one caption line; a reserved qualifier line in a narrow cell when any cell has
|
|
67
|
+
* a qualifier), so a row shares one caption top and one value baseline. Below the value each cell
|
|
68
|
+
* stacks its own parts and ends at its last one. */
|
|
76
69
|
.content > * {
|
|
77
|
-
grid-column: 1;
|
|
78
70
|
min-width: 0;
|
|
79
71
|
}
|
|
80
72
|
|
|
@@ -82,33 +74,6 @@
|
|
|
82
74
|
margin-block-start: var(--vx-space-stack-sm);
|
|
83
75
|
}
|
|
84
76
|
|
|
85
|
-
.valueRow,
|
|
86
|
-
.skeletonValue,
|
|
87
|
-
.error {
|
|
88
|
-
grid-row: 2;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/* A hero's footer has its own track right under the hero track, so it hugs the value however tall a
|
|
92
|
-
* sibling's visual is, and a cell without a footer never spans (or reserves) it. */
|
|
93
|
-
.content > .heroFooter {
|
|
94
|
-
grid-row: 3;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.content > .visualStack,
|
|
98
|
-
.content > .reason,
|
|
99
|
-
.content > .rows {
|
|
100
|
-
grid-row: 4;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.content[data-strip-has-visual] > .rows {
|
|
104
|
-
grid-row: 5;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.content > .footer:not(.heroFooter) {
|
|
108
|
-
grid-row: 6;
|
|
109
|
-
align-self: start;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
77
|
@container basalt-grid (max-width: 479.9px) {
|
|
113
78
|
.cells {
|
|
114
79
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
@@ -126,20 +91,27 @@
|
|
|
126
91
|
}
|
|
127
92
|
|
|
128
93
|
.captionLine {
|
|
129
|
-
grid-row: 1;
|
|
130
94
|
display: flex;
|
|
131
95
|
flex-wrap: nowrap;
|
|
132
|
-
align-items:
|
|
96
|
+
align-items: flex-start;
|
|
133
97
|
column-gap: var(--vx-space-control-gap);
|
|
134
98
|
min-width: 0;
|
|
135
99
|
}
|
|
136
100
|
|
|
137
|
-
/*
|
|
101
|
+
/* A cell with an action reserves the control's height on every caption line of the strip, so the
|
|
102
|
+
* values stay level whichever cell carries one. */
|
|
103
|
+
[data-strip-action-row] .captionLine {
|
|
104
|
+
min-height: calc(var(--vx-space-control-height-widget, 1.5rem) * var(--mantine-scale, 1));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Caption and qualifier share one line while the qualifier fits; when it does not it wraps whole under the
|
|
108
|
+
* caption and wraps again rather than truncating (it can be the only place a band is stated). */
|
|
138
109
|
.captionMain {
|
|
139
110
|
display: flex;
|
|
140
111
|
flex: 1 1 0;
|
|
141
112
|
flex-wrap: wrap;
|
|
142
|
-
align-items:
|
|
113
|
+
align-items: baseline;
|
|
114
|
+
align-content: flex-start;
|
|
143
115
|
column-gap: var(--vx-space-control-gap);
|
|
144
116
|
min-width: 0;
|
|
145
117
|
}
|
|
@@ -162,17 +134,38 @@
|
|
|
162
134
|
font-family: var(--basalt-font-mono);
|
|
163
135
|
font-size: var(--vx-text-micro);
|
|
164
136
|
font-weight: 500;
|
|
137
|
+
line-height: 1.4;
|
|
165
138
|
letter-spacing: 0.06em;
|
|
166
139
|
text-transform: uppercase;
|
|
167
140
|
color: var(--vx-faint);
|
|
168
141
|
}
|
|
169
142
|
|
|
170
|
-
/* The lowercase qualifier is the muted sans (mono is for the UPPERCASE caption only).
|
|
171
|
-
* item, so when it does not fit beside the caption it wraps WHOLE onto its own line below. */
|
|
143
|
+
/* The lowercase qualifier is the muted sans (mono is for the UPPERCASE caption only). */
|
|
172
144
|
.qualifier {
|
|
145
|
+
flex: 0 1 auto;
|
|
146
|
+
min-width: 0;
|
|
147
|
+
overflow-wrap: anywhere;
|
|
148
|
+
text-wrap: balance;
|
|
173
149
|
font-size: var(--vx-text-micro);
|
|
150
|
+
line-height: 1.4;
|
|
174
151
|
color: var(--vx-muted);
|
|
175
|
-
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* A narrow cell (~170px at 390): when any cell of the strip has a qualifier every cell reserves one line for
|
|
155
|
+
* it, whether it sat beside the caption or wrapped under it, so values share a baseline. */
|
|
156
|
+
@container basalt-card (max-width: 239.9px) {
|
|
157
|
+
.qualifier {
|
|
158
|
+
line-height: 1.25;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[data-strip-qualifier] .captionMain {
|
|
162
|
+
min-height: calc(var(--vx-text-micro) * (1.4 + 1.25));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* The two caption lines read as one block: the value follows at the tight step. */
|
|
166
|
+
[data-strip-qualifier] .captionLine + * {
|
|
167
|
+
margin-block-start: var(--vx-space-stack-xs);
|
|
168
|
+
}
|
|
176
169
|
}
|
|
177
170
|
|
|
178
171
|
/* A control at the end of the caption line: it keeps its size, the caption truncates first. */
|
|
@@ -230,10 +223,6 @@
|
|
|
230
223
|
min-width: 0;
|
|
231
224
|
}
|
|
232
225
|
|
|
233
|
-
.visualStack > .footer {
|
|
234
|
-
margin-block-start: var(--vx-space-stack-sm);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
226
|
/* A Sparkline's hover readout takes this line above its plot (`charts/sparkline.module.css`). The
|
|
238
227
|
* cell's own stack gap already sits above it; the slot reserves the rest, so the chip never covers
|
|
239
228
|
* the value. */
|
|
@@ -245,6 +234,12 @@
|
|
|
245
234
|
padding-top: max(0px, calc(var(--basalt-spark-readout-h) - var(--vx-space-stack-sm)));
|
|
246
235
|
}
|
|
247
236
|
|
|
237
|
+
/* The state copy keeps the cell's inset on every side: the article ends at its own last track, so the
|
|
238
|
+
* foot inset (carried by the row-high slot, further down) cannot reach it. */
|
|
239
|
+
.content[data-strip-has-state] {
|
|
240
|
+
padding-block-end: var(--vx-space-stack-md);
|
|
241
|
+
}
|
|
242
|
+
|
|
248
243
|
/* An empty cell's reason and an errored cell's message: one muted `sm` line, wrapping rather than
|
|
249
244
|
* clipping (a 390px two-column cell is ~170px wide). */
|
|
250
245
|
.reason {
|
|
@@ -319,12 +314,14 @@
|
|
|
319
314
|
}
|
|
320
315
|
|
|
321
316
|
/* A meter's start and end captions read as one phrase (name, then value) however wide the track. */
|
|
322
|
-
.footerCell [data-meter-captions]
|
|
317
|
+
.footerCell [data-meter-captions],
|
|
318
|
+
.underCell [data-meter-captions] {
|
|
323
319
|
justify-content: flex-start;
|
|
324
320
|
column-gap: var(--vx-space-stack-md);
|
|
325
321
|
}
|
|
326
322
|
|
|
327
|
-
.footerCell [data-meter-captions] >
|
|
323
|
+
.footerCell [data-meter-captions] > *,
|
|
324
|
+
.underCell [data-meter-captions] > * {
|
|
328
325
|
margin-inline-start: 0;
|
|
329
326
|
text-align: start;
|
|
330
327
|
}
|
|
@@ -336,3 +333,12 @@
|
|
|
336
333
|
border-inline-start: 1px solid var(--vx-divider);
|
|
337
334
|
border-block-start: 1px solid var(--vx-divider);
|
|
338
335
|
}
|
|
336
|
+
|
|
337
|
+
/* A footer entry `under` a cell is part of that cell: it sits in the slot under the article, inset like
|
|
338
|
+
* the article, split from the readings by the strip's own hairline. */
|
|
339
|
+
.underCell {
|
|
340
|
+
min-width: 0;
|
|
341
|
+
margin: var(--vx-space-stack-md) var(--vx-space-stack-md) 0;
|
|
342
|
+
padding-block-start: var(--vx-space-stack-sm);
|
|
343
|
+
border-block-start: 1px solid var(--vx-divider);
|
|
344
|
+
}
|