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.
Files changed (169) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/MIGRATING.md +400 -12
  3. package/agent/agents/basalt-design-reviewer.md +3 -3
  4. package/agent/skills/basalt-design/SKILL.md +2 -2
  5. package/agent/skills/basalt-design/references/catalogue.md +22 -19
  6. package/agent/skills/basalt-design/references/states.md +39 -0
  7. package/dist/charts/BandStrip.d.ts.map +1 -1
  8. package/dist/charts/BandStrip.js +51 -5
  9. package/dist/charts/Bars.d.ts.map +1 -1
  10. package/dist/charts/Bars.js +19 -3
  11. package/dist/charts/CartesianChart.d.ts +2 -0
  12. package/dist/charts/CartesianChart.d.ts.map +1 -1
  13. package/dist/charts/CartesianChart.js +7 -3
  14. package/dist/charts/ChartCard.d.ts +1 -1
  15. package/dist/charts/ChartCard.d.ts.map +1 -1
  16. package/dist/charts/ChartCard.js +25 -15
  17. package/dist/charts/Sparkline.d.ts +8 -2
  18. package/dist/charts/Sparkline.d.ts.map +1 -1
  19. package/dist/charts/Sparkline.js +95 -15
  20. package/dist/charts/StackedArea.d.ts.map +1 -1
  21. package/dist/charts/StackedArea.js +5 -1
  22. package/dist/charts/band-fold.d.ts +22 -4
  23. package/dist/charts/band-fold.d.ts.map +1 -1
  24. package/dist/charts/band-fold.js +10 -2
  25. package/dist/charts/chart-dates.d.ts +12 -0
  26. package/dist/charts/chart-dates.d.ts.map +1 -0
  27. package/dist/charts/chart-dates.js +16 -0
  28. package/dist/charts/chart-legend.module.css +16 -0
  29. package/dist/charts/compile.d.ts +10 -0
  30. package/dist/charts/compile.d.ts.map +1 -1
  31. package/dist/charts/compile.js +77 -24
  32. package/dist/charts/date-tick-format.d.ts +5 -5
  33. package/dist/charts/date-tick-format.d.ts.map +1 -1
  34. package/dist/charts/date-tick-format.js +3 -7
  35. package/dist/charts/labels.d.ts +7 -3
  36. package/dist/charts/labels.d.ts.map +1 -1
  37. package/dist/charts/labels.js +28 -17
  38. package/dist/charts/legend.d.ts +0 -6
  39. package/dist/charts/legend.d.ts.map +1 -1
  40. package/dist/charts/legend.js +87 -35
  41. package/dist/charts/ref-label.d.ts +17 -0
  42. package/dist/charts/ref-label.d.ts.map +1 -1
  43. package/dist/charts/ref-label.js +13 -1
  44. package/dist/charts/sparkline.module.css +62 -12
  45. package/dist/charts/sparkline.module.css.d.ts +1 -0
  46. package/dist/charts/state.d.ts.map +1 -1
  47. package/dist/charts/state.js +4 -2
  48. package/dist/charts/types.d.ts +15 -3
  49. package/dist/charts/types.d.ts.map +1 -1
  50. package/dist/cli/shot/capture.d.ts.map +1 -1
  51. package/dist/cli/shot/capture.js +9 -5
  52. package/dist/cli/shot/detect.js +8 -5
  53. package/dist/cli/shot/measure.js +19 -23
  54. package/dist/cli/shot/playwright.d.ts +8 -0
  55. package/dist/cli/shot/playwright.d.ts.map +1 -1
  56. package/dist/cli/shot/playwright.js +5 -1
  57. package/dist/cli/shot/types.d.ts +2 -0
  58. package/dist/cli/shot/types.d.ts.map +1 -1
  59. package/dist/cli/tokens-css.d.ts +5 -7
  60. package/dist/cli/tokens-css.d.ts.map +1 -1
  61. package/dist/cli/tokens-css.js +11 -12
  62. package/dist/dashboard/bar-list.d.ts +6 -1
  63. package/dist/dashboard/bar-list.d.ts.map +1 -1
  64. package/dist/dashboard/bar-list.js +8 -0
  65. package/dist/dashboard/bar-list.module.css +18 -0
  66. package/dist/dashboard/delta-badge.d.ts.map +1 -1
  67. package/dist/dashboard/delta-badge.js +2 -2
  68. package/dist/dashboard/empty-state.d.ts.map +1 -1
  69. package/dist/dashboard/meter-model.d.ts +55 -21
  70. package/dist/dashboard/meter-model.d.ts.map +1 -1
  71. package/dist/dashboard/meter-model.js +98 -17
  72. package/dist/dashboard/meter-parts.d.ts +9 -2
  73. package/dist/dashboard/meter-parts.d.ts.map +1 -1
  74. package/dist/dashboard/meter-parts.js +99 -21
  75. package/dist/dashboard/meter.d.ts +21 -8
  76. package/dist/dashboard/meter.d.ts.map +1 -1
  77. package/dist/dashboard/meter.js +14 -3
  78. package/dist/dashboard/meter.module.css +57 -2
  79. package/dist/dashboard/meter.module.css.d.ts +5 -0
  80. package/dist/dashboard/query-state.d.ts +7 -3
  81. package/dist/dashboard/query-state.d.ts.map +1 -1
  82. package/dist/dashboard/query-state.js +15 -7
  83. package/dist/dashboard/section.d.ts +2 -1
  84. package/dist/dashboard/section.d.ts.map +1 -1
  85. package/dist/dashboard/section.module.css +12 -0
  86. package/dist/dashboard/settings-section.d.ts +1 -1
  87. package/dist/dashboard/settings-section.d.ts.map +1 -1
  88. package/dist/dashboard/settings-section.js +3 -3
  89. package/dist/dashboard/stat-card-parts.js +1 -1
  90. package/dist/dashboard/stat-card.module.css +43 -10
  91. package/dist/dashboard/stat-group.module.css +15 -0
  92. package/dist/dashboard/stat-strip.d.ts +16 -5
  93. package/dist/dashboard/stat-strip.d.ts.map +1 -1
  94. package/dist/dashboard/stat-strip.js +100 -74
  95. package/dist/dashboard/stat-strip.module.css +68 -62
  96. package/dist/dashboard/stat-strip.module.css.d.ts +1 -0
  97. package/dist/dashboard/widget-header.d.ts.map +1 -1
  98. package/dist/dashboard/widget-header.js +19 -1
  99. package/dist/dashboard/widget-header.module.css +6 -0
  100. package/dist/guard/index.d.ts +2 -2
  101. package/dist/guard/index.d.ts.map +1 -1
  102. package/dist/guard/index.js +1 -17
  103. package/dist/styles.css +18 -11
  104. package/dist/table/data-table.js +1 -1
  105. package/dist/theme/controls.module.css +19 -0
  106. package/dist/theme/controls.module.css.d.ts +1 -0
  107. package/dist/theme/index.d.ts.map +1 -1
  108. package/dist/theme/index.js +12 -7
  109. package/dist/theme/status-verdict.d.ts.map +1 -1
  110. package/dist/theme/status-verdict.js +9 -1
  111. package/dist/tokens/palette.d.ts +7 -10
  112. package/dist/tokens/palette.d.ts.map +1 -1
  113. package/dist/tokens/palette.js +7 -10
  114. package/llms.txt +7 -4
  115. package/package.json +1 -1
  116. package/src/charts/BandStrip.tsx +55 -5
  117. package/src/charts/Bars.tsx +31 -3
  118. package/src/charts/CartesianChart.tsx +9 -3
  119. package/src/charts/ChartCard.tsx +32 -19
  120. package/src/charts/Sparkline.tsx +139 -21
  121. package/src/charts/StackedArea.tsx +12 -1
  122. package/src/charts/band-fold.ts +25 -6
  123. package/src/charts/chart-dates.ts +30 -0
  124. package/src/charts/chart-legend.module.css +16 -0
  125. package/src/charts/compile.ts +148 -25
  126. package/src/charts/date-tick-format.ts +10 -13
  127. package/src/charts/labels.ts +43 -22
  128. package/src/charts/legend.tsx +70 -3
  129. package/src/charts/ref-label.ts +27 -0
  130. package/src/charts/sparkline.module.css +62 -12
  131. package/src/charts/sparkline.module.css.d.ts +1 -0
  132. package/src/charts/state.tsx +7 -4
  133. package/src/charts/types.ts +13 -3
  134. package/src/cli/shot/capture.ts +15 -3
  135. package/src/cli/shot/detect.ts +9 -9
  136. package/src/cli/shot/measure.ts +27 -27
  137. package/src/cli/shot/playwright.ts +18 -2
  138. package/src/cli/shot/types.ts +2 -0
  139. package/src/cli/tokens-css.ts +18 -20
  140. package/src/dashboard/bar-list.module.css +18 -0
  141. package/src/dashboard/bar-list.tsx +29 -0
  142. package/src/dashboard/delta-badge.tsx +6 -2
  143. package/src/dashboard/empty-state.tsx +4 -2
  144. package/src/dashboard/meter-model.ts +181 -47
  145. package/src/dashboard/meter-parts.tsx +187 -30
  146. package/src/dashboard/meter.module.css +57 -2
  147. package/src/dashboard/meter.module.css.d.ts +5 -0
  148. package/src/dashboard/meter.tsx +33 -10
  149. package/src/dashboard/query-state.tsx +20 -9
  150. package/src/dashboard/section.module.css +12 -0
  151. package/src/dashboard/section.tsx +2 -1
  152. package/src/dashboard/settings-section.tsx +4 -4
  153. package/src/dashboard/stat-card-parts.tsx +1 -1
  154. package/src/dashboard/stat-card.module.css +43 -10
  155. package/src/dashboard/stat-group.module.css +15 -0
  156. package/src/dashboard/stat-strip.module.css +68 -62
  157. package/src/dashboard/stat-strip.module.css.d.ts +1 -0
  158. package/src/dashboard/stat-strip.tsx +118 -59
  159. package/src/dashboard/widget-header.module.css +6 -0
  160. package/src/dashboard/widget-header.tsx +28 -1
  161. package/src/guard/index.ts +3 -19
  162. package/src/styles.css +18 -11
  163. package/src/table/data-table.tsx +1 -1
  164. package/src/theme/__snapshots__/plain-theme.test.ts.snap +14 -8
  165. package/src/theme/controls.module.css +19 -0
  166. package/src/theme/controls.module.css.d.ts +1 -0
  167. package/src/theme/index.ts +12 -7
  168. package/src/theme/status-verdict.tsx +5 -1
  169. package/src/tokens/palette.ts +7 -10
@@ -14,7 +14,7 @@
14
14
  * the re-derivation this exists to delete. `LoadingState` / `ErrorState` ship alongside as the
15
15
  * escape hatch for a page that must place its branches in different DOM positions.
16
16
  */
17
- import { Center, Group, Loader, Stack, Text } from '@mantine/core'
17
+ import { Center, Group, Loader, Skeleton, Stack, Text, VisuallyHidden } from '@mantine/core'
18
18
  import type { CSSProperties, ReactNode } from 'react'
19
19
  import { toErrorMessage } from '../common/errors'
20
20
  import { cx } from '../common/props'
@@ -60,11 +60,15 @@ export type QueryEmptyCopy = {
60
60
  export type LoadingStateProps = BasaltProps & {
61
61
  /** How loud this state is. Default `'page'`. */
62
62
  tier?: QueryStateTier
63
- /** Accessible name for the spinner. Say what is loading. */
63
+ /** Accessible name for the loading state. Say what is loading. */
64
64
  label?: string
65
65
  }
66
66
 
67
- /** A spinner on its own — `tier="page"` centres it in a generous block, `'section'` is bare. */
67
+ /**
68
+ * `tier="page"` centres a neutral spinner in a generous block (a route body whose shape is unknown);
69
+ * `'section'` is a neutral skeleton, never an accent spinner. A card region that knows its loaded
70
+ * shape passes `loading` to `QueryState` instead.
71
+ */
68
72
  export function LoadingState({
69
73
  tier,
70
74
  label = 'Loading',
@@ -74,12 +78,19 @@ export function LoadingState({
74
78
  const resolved = tier ?? 'page'
75
79
  if (resolved === 'section') {
76
80
  return (
77
- <Loader
78
- size="sm"
81
+ <Stack
82
+ component="output"
83
+ gap="xs"
79
84
  aria-label={label}
85
+ aria-busy="true"
80
86
  {...(className !== undefined && { className })}
81
87
  {...(style !== undefined && { style })}
82
- />
88
+ >
89
+ <VisuallyHidden>{label}</VisuallyHidden>
90
+ <Skeleton height={14} width="40%" />
91
+ <Skeleton height={14} />
92
+ <Skeleton height={14} width="75%" />
93
+ </Stack>
83
94
  )
84
95
  }
85
96
  // Same page-level vertical inset `EmptyState`'s `'page'` variant uses (`empty-state.tsx`'s
@@ -90,7 +101,7 @@ export function LoadingState({
90
101
  {...(className !== undefined && { className })}
91
102
  style={{ paddingBlock: 'calc(var(--vx-space-stack-xs, 0.25rem) * 16)', ...style }}
92
103
  >
93
- <Loader size="sm" aria-label={label} />
104
+ <Loader size="sm" color={VX.muted} aria-label={label} />
94
105
  </Center>
95
106
  )
96
107
  }
@@ -119,7 +130,7 @@ export type ErrorStateProps = BasaltProps & {
119
130
  */
120
131
  export function ErrorState({
121
132
  error,
122
- title = 'Something went wrong',
133
+ title = 'Could not load',
123
134
  fallback = 'The request failed.',
124
135
  onRetry,
125
136
  retrying = false,
@@ -246,7 +257,7 @@ export type QueryStateProps<TData> = BasaltProps &
246
257
  errorAction?: ReactNode
247
258
  /** How loud every branch is. Default `'page'`. */
248
259
  tier?: QueryStateTier
249
- /** Replace the default spinner (e.g. with a skeleton grid). */
260
+ /** Replace the default loading state (e.g. with a skeleton in the region's loaded shape). */
250
261
  loading?: ReactNode
251
262
  }
252
263
 
@@ -75,6 +75,18 @@
75
75
  gap: var(--mantine-spacing-xs, 0.625rem);
76
76
  }
77
77
 
78
+ /*
79
+ * A bare `<Text size="xs">` summary line (argo's strength diagnostics shell: title 15 + chart-card
80
+ * title 13 + summary 12 + chart ticks and legend 11 = four sizes) joins the chart text step, so the
81
+ * shell stays at three: 15, 13, 11. Mantine's `Text` writes `--text-fz` inline from its `size` prop,
82
+ * so no inherited custom property can reach it: this rule sets `font-size` itself, and the inline
83
+ * `--text-fz` is then unused. Only a direct `Text` child is capped; a `Group` of stats keeps
84
+ * the sizes its own parts ask for.
85
+ */
86
+ .summary > :global(.mantine-Text-root) {
87
+ font-size: var(--vx-text-micro);
88
+ }
89
+
78
90
  /*
79
91
  * The collapse chevron — a plain control, not a Mantine ActionIcon, so it sits directly in the header
80
92
  * row (its own CtlSlot fragment would nest a theme provider around one glyph). It is sized to the
@@ -137,7 +137,8 @@ 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. */
140
+ * one row — the body is what `children` is for. Section owns the summary text size (11 px, the
141
+ * chart-text step): a `size` prop on a bare `Text` here is ignored — wrap it to opt out. */
141
142
  summary?: ReactNode
142
143
  /** Turns the root into a scroll anchor (`id` + `scroll-margin-top`). Inside `BasaltShell` the
143
144
  * offset is the clearance token; without a shell it also clears `PageBar`, which assumes the
@@ -40,7 +40,7 @@ import classes from './settings-section.module.css'
40
40
 
41
41
  const eyebrowStyle = {
42
42
  fontFamily: 'var(--basalt-font-mono)',
43
- fontSize: VX.text.micro,
43
+ fontSize: VX.text.xs,
44
44
  fontWeight: 500,
45
45
  letterSpacing: '0.06em',
46
46
  textTransform: 'uppercase' as const,
@@ -102,7 +102,7 @@ export type SettingsRowProps = BasaltProps &
102
102
  SlotStylesProps<SettingsRowSlot> & {
103
103
  /** 13px ink label on the left. */
104
104
  label: string
105
- /** Optional 12.5px muted description under the label. */
105
+ /** Optional 12px muted description under the label. */
106
106
  description?: string
107
107
  /** Right-aligned control (input/switch/button). */
108
108
  control?: ReactNode
@@ -125,9 +125,9 @@ export function SettingsRow({
125
125
  {...(style !== undefined && { style })}
126
126
  >
127
127
  <Stack gap={2} {...(classNames?.label !== undefined && { className: classNames.label })}>
128
- <span style={{ fontSize: VX.text.md, color: VX.ink }}>{label}</span>
128
+ <span style={{ fontSize: VX.text.sm, color: VX.ink }}>{label}</span>
129
129
  {description && (
130
- <span style={{ fontSize: VX.text.sm, color: VX.muted }}>{description}</span>
130
+ <span style={{ fontSize: VX.text.xs, color: VX.muted }}>{description}</span>
131
131
  )}
132
132
  </Stack>
133
133
  <div className={cx(classes.control, classNames?.control)}>{control ?? children}</div>
@@ -56,7 +56,7 @@ export function CaptionRow({ title, icon, info, qualifier, tone, actions }: Capt
56
56
  )}
57
57
  </div>
58
58
  {qualifier !== undefined && (
59
- <span className={classes.qualifier} title={qualifier}>
59
+ <span className={classes.qualifier} title={qualifier} data-stat-qualifier>
60
60
  {qualifier}
61
61
  </span>
62
62
  )}
@@ -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) never wraps the
100
- * qualifier under the caption: that second line pushed the value below its row neighbours'. The
101
- * caption row stays one line; the qualifier truncates (full text in its `title`). */
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
- flex-wrap: nowrap;
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: 0 1 auto;
109
- overflow: hidden;
110
- text-overflow: ellipsis;
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-stat-foot-gap) + var(--basalt-stat-footer-h)
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));
@@ -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
- grid-row: span 6;
35
- grid-template-rows: subgrid;
35
+ align-content: start;
36
36
  min-width: 0;
37
- /* The foot inset lives HERE, on the row-high slot (it lands on the last track of every cell
38
- * alike). A cell that ends early must not carry it: its padding would inflate the shared track
39
- * it ends in and push the parts below out of line. */
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 spans the same six tracks (parts align through the subgrid) but is `align-self: start`,
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: grid;
50
- grid-row: 1 / span var(--basalt-strip-span, 6);
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 PART. Every cell sits on the same six tracks of `.cells` (caption, hero, hero footer,
67
- * visual, rows, footer), so a row of cells shares one caption top and one value baseline, and a void opens
68
- * only where a sibling's same part is taller. A cell SPANS only down to its last part
69
- * (`--basalt-strip-span`), so its own box ends at its content; the slot around it runs the whole
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: center;
96
+ align-items: flex-start;
133
97
  column-gap: var(--vx-space-control-gap);
134
98
  min-width: 0;
135
99
  }
136
100
 
137
- /* Caption + qualifier wrap among themselves; the `action` beside them never joins the wrap. */
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: center;
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). It is one flex
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
- overflow-wrap: anywhere;
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
+ }
@@ -32,5 +32,6 @@ declare const classes: {
32
32
  readonly rowValue: string
33
33
  readonly footerRow: string
34
34
  readonly footerCell: string
35
+ readonly underCell: string
35
36
  }
36
37
  export default classes