basalt-ui 2.19.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.
Files changed (157) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/MIGRATING.md +174 -12
  3. package/agent/rules/basalt-charts.md +1 -1
  4. package/agent/rules/basalt-mantine.md +1 -1
  5. package/agent/skills/basalt-app/SKILL.md +1 -1
  6. package/agent/skills/basalt-design/SKILL.md +1 -1
  7. package/agent/templates/DESIGN.md.tpl +1 -1
  8. package/configs/oxlint-plugin.js +33 -19
  9. package/configs/oxlint-plugin.test.ts +32 -2
  10. package/dist/charts/ChartCard.d.ts +28 -3
  11. package/dist/charts/ChartCard.d.ts.map +1 -1
  12. package/dist/charts/ChartCard.js +33 -11
  13. package/dist/charts/Donut.d.ts.map +1 -1
  14. package/dist/charts/Donut.js +13 -1
  15. package/dist/charts/Heatmap.js +1 -1
  16. package/dist/charts/Sparkline.d.ts +7 -1
  17. package/dist/charts/Sparkline.d.ts.map +1 -1
  18. package/dist/charts/Sparkline.js +137 -18
  19. package/dist/charts/box.d.ts +2 -0
  20. package/dist/charts/box.d.ts.map +1 -1
  21. package/dist/charts/box.js +2 -0
  22. package/dist/charts/chart-box.module.css +30 -0
  23. package/dist/charts/chart-box.module.css.d.ts +1 -0
  24. package/dist/charts/chart-card.module.css +47 -0
  25. package/dist/charts/chart-card.module.css.d.ts +7 -0
  26. package/dist/charts/compile.d.ts.map +1 -1
  27. package/dist/charts/compile.js +35 -8
  28. package/dist/charts/host.d.ts.map +1 -1
  29. package/dist/charts/host.js +2 -1
  30. package/dist/charts/index.d.ts +1 -1
  31. package/dist/charts/index.d.ts.map +1 -1
  32. package/dist/charts/sparkline.module.css +59 -0
  33. package/dist/charts/sparkline.module.css.d.ts +13 -0
  34. package/dist/charts/state.d.ts.map +1 -1
  35. package/dist/charts/state.js +32 -4
  36. package/dist/charts/types.d.ts +6 -0
  37. package/dist/charts/types.d.ts.map +1 -1
  38. package/dist/controls/sync-button.d.ts +3 -0
  39. package/dist/controls/sync-button.d.ts.map +1 -1
  40. package/dist/dashboard/bar-list.d.ts +15 -4
  41. package/dist/dashboard/bar-list.d.ts.map +1 -1
  42. package/dist/dashboard/bar-list.js +39 -15
  43. package/dist/dashboard/bar-list.module.css +77 -2
  44. package/dist/dashboard/bar-list.module.css.d.ts +1 -0
  45. package/dist/dashboard/delta-badge.d.ts +8 -3
  46. package/dist/dashboard/delta-badge.d.ts.map +1 -1
  47. package/dist/dashboard/delta-badge.js +9 -2
  48. package/dist/dashboard/index.d.ts +2 -0
  49. package/dist/dashboard/index.d.ts.map +1 -1
  50. package/dist/dashboard/meter-model.d.ts +19 -0
  51. package/dist/dashboard/meter-model.d.ts.map +1 -1
  52. package/dist/dashboard/meter-model.js +18 -1
  53. package/dist/dashboard/meter-parts.d.ts +5 -1
  54. package/dist/dashboard/meter-parts.d.ts.map +1 -1
  55. package/dist/dashboard/meter-parts.js +114 -74
  56. package/dist/dashboard/meter.d.ts +22 -1
  57. package/dist/dashboard/meter.d.ts.map +1 -1
  58. package/dist/dashboard/meter.js +4 -1
  59. package/dist/dashboard/meter.module.css +90 -12
  60. package/dist/dashboard/meter.module.css.d.ts +5 -0
  61. package/dist/dashboard/query-state.d.ts.map +1 -1
  62. package/dist/dashboard/query-state.js +14 -9
  63. package/dist/dashboard/settings-section.d.ts.map +1 -1
  64. package/dist/dashboard/settings-section.js +14 -25
  65. package/dist/dashboard/stat-card-parts.js +1 -1
  66. package/dist/dashboard/stat-card.d.ts +1 -1
  67. package/dist/dashboard/stat-card.d.ts.map +1 -1
  68. package/dist/dashboard/stat-card.js +3 -6
  69. package/dist/dashboard/stat-card.module.css +15 -7
  70. package/dist/dashboard/stat-group.d.ts +11 -2
  71. package/dist/dashboard/stat-group.d.ts.map +1 -1
  72. package/dist/dashboard/stat-group.js +9 -7
  73. package/dist/dashboard/stat-strip.d.ts +50 -0
  74. package/dist/dashboard/stat-strip.d.ts.map +1 -0
  75. package/dist/dashboard/stat-strip.js +85 -0
  76. package/dist/dashboard/stat-strip.module.css +208 -0
  77. package/dist/dashboard/stat-strip.module.css.d.ts +28 -0
  78. package/dist/dashboard/widget-header.d.ts +3 -3
  79. package/dist/dashboard/widget-header.module.css +10 -6
  80. package/dist/format/date.d.ts.map +1 -1
  81. package/dist/format/date.js +4 -3
  82. package/dist/format/shared.d.ts +6 -0
  83. package/dist/format/shared.d.ts.map +1 -1
  84. package/dist/format/shared.js +6 -2
  85. package/dist/guard/index.d.ts +1 -1
  86. package/dist/guard/index.js +1 -1
  87. package/dist/index.d.ts +3 -1
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +4 -0
  90. package/dist/styles.css +6 -0
  91. package/dist/theme/card-inset.module.css +76 -0
  92. package/dist/theme/card-inset.module.css.d.ts +9 -0
  93. package/dist/theme/controls.module.css +3 -0
  94. package/dist/theme/index.d.ts.map +1 -1
  95. package/dist/theme/index.js +23 -0
  96. package/dist/theme/nav-link.module.css +8 -10
  97. package/dist/theme/status-dot.d.ts +3 -2
  98. package/dist/theme/status-dot.d.ts.map +1 -1
  99. package/dist/theme/status-dot.js +12 -3
  100. package/dist/theme/status-verdict.d.ts +3 -2
  101. package/dist/theme/status-verdict.d.ts.map +1 -1
  102. package/dist/theme/status-verdict.js +3 -2
  103. package/dist/theme/status-verdict.module.css +4 -2
  104. package/llms.txt +30 -6
  105. package/package.json +1 -1
  106. package/src/charts/ChartCard.tsx +70 -4
  107. package/src/charts/Donut.tsx +9 -1
  108. package/src/charts/Heatmap.tsx +1 -1
  109. package/src/charts/Sparkline.tsx +180 -18
  110. package/src/charts/box.tsx +2 -0
  111. package/src/charts/chart-box.module.css +30 -0
  112. package/src/charts/chart-box.module.css.d.ts +1 -0
  113. package/src/charts/chart-card.module.css +47 -0
  114. package/src/charts/chart-card.module.css.d.ts +7 -0
  115. package/src/charts/compile.ts +42 -9
  116. package/src/charts/host.tsx +6 -3
  117. package/src/charts/index.ts +1 -1
  118. package/src/charts/sparkline.module.css +59 -0
  119. package/src/charts/sparkline.module.css.d.ts +13 -0
  120. package/src/charts/state.tsx +44 -4
  121. package/src/charts/types.ts +6 -0
  122. package/src/controls/sync-button.tsx +3 -0
  123. package/src/dashboard/bar-list.module.css +77 -2
  124. package/src/dashboard/bar-list.module.css.d.ts +1 -0
  125. package/src/dashboard/bar-list.tsx +86 -18
  126. package/src/dashboard/delta-badge.tsx +21 -5
  127. package/src/dashboard/index.ts +2 -0
  128. package/src/dashboard/meter-model.ts +35 -0
  129. package/src/dashboard/meter-parts.tsx +119 -23
  130. package/src/dashboard/meter.module.css +90 -12
  131. package/src/dashboard/meter.module.css.d.ts +5 -0
  132. package/src/dashboard/meter.tsx +26 -2
  133. package/src/dashboard/query-state.tsx +28 -19
  134. package/src/dashboard/settings-section.tsx +1 -8
  135. package/src/dashboard/stat-card-parts.tsx +1 -1
  136. package/src/dashboard/stat-card.module.css +15 -7
  137. package/src/dashboard/stat-card.tsx +5 -8
  138. package/src/dashboard/stat-group.tsx +19 -8
  139. package/src/dashboard/stat-strip.module.css +208 -0
  140. package/src/dashboard/stat-strip.module.css.d.ts +28 -0
  141. package/src/dashboard/stat-strip.tsx +183 -0
  142. package/src/dashboard/widget-header.module.css +10 -6
  143. package/src/dashboard/widget-header.tsx +3 -3
  144. package/src/format/date.ts +6 -3
  145. package/src/format/shared.ts +11 -2
  146. package/src/guard/index.ts +1 -1
  147. package/src/index.ts +7 -0
  148. package/src/styles.css +6 -0
  149. package/src/theme/__snapshots__/plain-theme.test.ts.snap +168 -24
  150. package/src/theme/card-inset.module.css +76 -0
  151. package/src/theme/card-inset.module.css.d.ts +9 -0
  152. package/src/theme/controls.module.css +3 -0
  153. package/src/theme/index.ts +30 -0
  154. package/src/theme/nav-link.module.css +8 -10
  155. package/src/theme/status-dot.tsx +17 -5
  156. package/src/theme/status-verdict.module.css +4 -2
  157. package/src/theme/status-verdict.tsx +9 -4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,53 @@
1
+ # [2.20.0](https://github.com/jkrumm/basalt-ui/compare/v2.19.0...v2.20.0) (2026-10-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * address review on chart font, Meter glue and slot hover test ([8027c08](https://github.com/jkrumm/basalt-ui/commit/8027c087f8c88f3f1188d69de316079489fb6adf))
7
+ * address review on round-2 fixtures ([ec9d619](https://github.com/jkrumm/basalt-ui/commit/ec9d619d1f7c1428815bf1709e2aeafe573e447c))
8
+ * drop the last redundant card inset pair and its stale guard hint ([8bc0500](https://github.com/jkrumm/basalt-ui/commit/8bc05005e41e31c672b205620500a55bc488b940))
9
+ * gate card facts by state and settle review round 1 ([22b4a49](https://github.com/jkrumm/basalt-ui/commit/22b4a49e6476eb5d3d78283ad923a539fb0f04f8))
10
+ * gate the item-flow facts by state ([34abefb](https://github.com/jkrumm/basalt-ui/commit/34abefb29507659b6dcef0a6677659bf63bd216e))
11
+ * keep the meter marker centred and pin the muted fill below line ([9da586d](https://github.com/jkrumm/basalt-ui/commit/9da586d789ae0d9049b6a92897f68e76888b3cab))
12
+ * match the vs prefix loosely and space the period ([1723364](https://github.com/jkrumm/basalt-ui/commit/172336484ba1acfa8dd26db8df0d070f6e225993))
13
+ * render the S3 day note as a meter and drop the budget legend ([3aec049](https://github.com/jkrumm/basalt-ui/commit/3aec0496568639faa8dd50c6dc48aa6df3680957))
14
+ * round-1 board fixes for facts, strip, meter and chart faces ([88d9e76](https://github.com/jkrumm/basalt-ui/commit/88d9e765d0894263c8e2fceb99ab5f3d5f4a68d0))
15
+ * round-1 fixture fixes on S3, S4 and the components page ([f48da52](https://github.com/jkrumm/basalt-ui/commit/f48da5298546140959e56e0dc641fd7ea1c262e0))
16
+ * round-2 fixture fixes on S2, S3, S4 and components ([e7d4076](https://github.com/jkrumm/basalt-ui/commit/e7d40765ed6646f928867c7d80ed51fbb5aac1ec))
17
+ * sparkline readout review round 1 ([ebef74f](https://github.com/jkrumm/basalt-ui/commit/ebef74f63a03a6199ab0f57239301e7cc0e5ebe0))
18
+ * split the bar list format part and keep tick text in the track ([c6efab8](https://github.com/jkrumm/basalt-ui/commit/c6efab8a4d93720c6df236e23dbde5f248190f84))
19
+ * stub Intl.RelativeTimeFormat through defineProperty in tests ([eac88ab](https://github.com/jkrumm/basalt-ui/commit/eac88ab70bbf605e22e7dd251015479282f6991e))
20
+ * tint the budget line by verdict and dedupe the forecast row ([fe964b8](https://github.com/jkrumm/basalt-ui/commit/fe964b8883253662a1e5440a0b7649aacfd4db4a))
21
+ * type the ref label mark generically and cover the flip band ([d0b1198](https://github.com/jkrumm/basalt-ui/commit/d0b1198de82efeed00ded4357bbfb663ce275e07))
22
+
23
+
24
+ ### Features
25
+
26
+ * add a facts slot to the chart card for the headline figure ([f93c793](https://github.com/jkrumm/basalt-ui/commit/f93c7936e9d14bd9bda2c4d08759a96be41bbfd5))
27
+ * add a strip variant with typed cells and a footer row to StatGroup ([1dfcab8](https://github.com/jkrumm/basalt-ui/commit/1dfcab8f01a18c72761a69fe3fe6fc00e265cbe1))
28
+ * add BarList per-row max, thin rows and per-row ticks ([e79e503](https://github.com/jkrumm/basalt-ui/commit/e79e5034da1aa59a7ef72bf828583662d5edef03))
29
+ * add meter ticks, muted tone, row size and root part types ([a58c48d](https://github.com/jkrumm/basalt-ui/commit/a58c48d0c3767d7569a54f08f3c5b6f015d93971))
30
+ * add the agent-work scenario and a strip on training and spend ([f4ef65b](https://github.com/jkrumm/basalt-ui/commit/f4ef65bb6156e90e84f714b6e70a9d7934d2d5b8))
31
+ * chart error body uses the dot idiom, pin tab hover and padding ([41d7296](https://github.com/jkrumm/basalt-ui/commit/41d72962a239634a40faf6635cfda86611ce911d))
32
+ * compose the comparison period in DeltaBadge ([c903195](https://github.com/jkrumm/basalt-ui/commit/c90319555408abfa6e88ffa7646cc81687253abd))
33
+ * export StatusDot and StatusVerdict from the root ([eb835c6](https://github.com/jkrumm/basalt-ui/commit/eb835c6a6219d984765b20885840d5bc3e27fdd7))
34
+ * heatmap ticks keep the caption size at every width ([87e947f](https://github.com/jkrumm/basalt-ui/commit/87e947faad6dd00bd338f1c6ef01d2d6a9b32eda))
35
+ * keep the subtitle and gate chart card facts by state ([9c87401](https://github.com/jkrumm/basalt-ui/commit/9c87401e8cff18140fdb0b387cafcc618cd2c744))
36
+ * ledger the strip hairlines and draw its row rule between cells ([2d65e2e](https://github.com/jkrumm/basalt-ui/commit/2d65e2e6b59e7413b377eae5529cf56f4852b176))
37
+ * let strip cells carry hero and rows, stale state and derived anchors ([781e57e](https://github.com/jkrumm/basalt-ui/commit/781e57e97de0b7d3fd0f2bbba7099974fe62a2c1))
38
+ * let the status mark take className and style ([054d466](https://github.com/jkrumm/basalt-ui/commit/054d466b774066da757e965d1dcb49b476b36f37))
39
+ * measure the card inset in Chrome and let consumer classes win ([9a93f4c](https://github.com/jkrumm/basalt-ui/commit/9a93f4cdc84dfed95ad76d2e0f55d452e91044a1))
40
+ * on-plot labels for chart reference lines ([220663b](https://github.com/jkrumm/basalt-ui/commit/220663b869b5406f07609e81982a44fc617f9979))
41
+ * on-scale button padding, dark tab hover, neutral active row ([60b9abe](https://github.com/jkrumm/basalt-ui/commit/60b9abed5aa9a295df3e80bff4f4560154fcaeff))
42
+ * proportional hero numerals, mono only for captions and times ([9da4c3f](https://github.com/jkrumm/basalt-ui/commit/9da4c3fa1fbcf4141285e64eccd6acda43bb93fd))
43
+ * re-encode spend distribution and spend over time on s4 ([6048d83](https://github.com/jkrumm/basalt-ui/commit/6048d833f8d13a1b2fdc5718f85ff57cc2bf173f))
44
+ * relativeTime and SyncButton honour the format locale ([dea7750](https://github.com/jkrumm/basalt-ui/commit/dea7750960b4787acec078de4c624411636ebccb))
45
+ * reserve the sparkline readout line and set verdicts in the sans ([311c216](https://github.com/jkrumm/basalt-ui/commit/311c216261a487a65d4612b3d0c9545850e64e9a))
46
+ * round-2 board fixes for readout, chart error, ticks and rows ([ab632fb](https://github.com/jkrumm/basalt-ui/commit/ab632fbddb8dbc8be86f9b86c65740c01e70fc26))
47
+ * share one locale resolver across the format builders ([7431ae4](https://github.com/jkrumm/basalt-ui/commit/7431ae455f10ea6a26c20e007686ac8b36229428))
48
+ * sparkline reference line and a hover/focus readout ([aff4fb7](https://github.com/jkrumm/basalt-ui/commit/aff4fb7b76008164effee7c4db27918165491705))
49
+ * the theme owns the card inset; card-inset flags the pair ([a936467](https://github.com/jkrumm/basalt-ui/commit/a9364676a09ef9bd6048fa2fe3acb9c3ef5aee34))
50
+
1
51
  # [2.19.0](https://github.com/jkrumm/basalt-ui/compare/v2.18.0...v2.19.0) (2026-10-17)
2
52
 
3
53
 
package/MIGRATING.md CHANGED
@@ -66,18 +66,18 @@ There is one row per SURFACE, not per export, and a surface earns a row once any
66
66
  shipped lefthook preset both changed in 1.30.0 with no row that owned them — which is how a
67
67
  consumer read this index, found nothing, and diffed a KPI row that had silently gone 4-up → 2-up.
68
68
 
69
- | Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | 1.36.0 | 1.36.1 | 1.37.0 | 1.37.1 | 1.38.0 | 1.38.1 | 1.39.0 | 1.40.0 | 1.40.1 | 1.40.2 | 1.40.3 | 1.41.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | 2.5.0 | 2.6.0 | 2.6.1 | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.8.0 | 2.8.1 | 2.9.0 | 2.9.1 | 2.10.0 | 2.11.0 | 2.11.1 | 2.12.0 | 2.13.0 | 2.13.1 | 2.13.2 | 2.13.3 | 2.14.0 | 2.15.0 | 2.16.0 | 2.17.0 | 2.18.0 | 2.19.0 | Unreleased |
70
- | ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ------ | -------------------------------------------------------------------------------------------- | ------ | ------ | ------ | ------ | ------ | ----------------------------------------------- | ------ | ------ | ------ | ------ | ------------------------------------------------------------ | ---------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
71
- | **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — | — | — | — | — | — | | `appShellInset` 20 → 16 (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | spacing, radius, type and the dense tier (§ 2.16.0) | — | — | — | — |
72
- | **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BandSpan.absentFraction` + `absentState` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
73
- | **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltProvider` embedded mode, `spotlight` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | expanded gutter 24 (§ 2.16.0) | — | — | light/outline Buttons ink, no status edges (§ 2.19.0) | — |
74
- | **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — | `FormSection`/`FormRow`/`FormGroup`/`FormActions` move here (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | dense 28 tier at a fine pointer (§ 2.16.0) | — | — | — | — |
75
- | **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
76
- | **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
77
- | **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | card inset 12/16, `kpi` 22 / 500 (§ 2.16.0) | — | — | StatCard status dot, Meter/BarList refinements (§ 2.19.0) | — |
78
- | **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
79
- | **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | the managed block moves `CLAUDE.md` → `AGENTS.md` (§ 1.41.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `doctor`: CSS + forced dropped subpaths, `oxlint-floor`, Start wiring (§ 2.8.0) | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
80
- | **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — | `unknown-vx-token` → `error`; the token factories throw (§ Guards) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | `inline-spacing` steps, `card-inset` accepts both pairs (§ 2.16.0) | — | — | — | — |
69
+ | Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | 1.36.0 | 1.36.1 | 1.37.0 | 1.37.1 | 1.38.0 | 1.38.1 | 1.39.0 | 1.40.0 | 1.40.1 | 1.40.2 | 1.40.3 | 1.41.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | 2.5.0 | 2.6.0 | 2.6.1 | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.8.0 | 2.8.1 | 2.9.0 | 2.9.1 | 2.10.0 | 2.11.0 | 2.11.1 | 2.12.0 | 2.13.0 | 2.13.1 | 2.13.2 | 2.13.3 | 2.14.0 | 2.15.0 | 2.16.0 | 2.17.0 | 2.18.0 | 2.19.0 | 2.20.0 | Unreleased |
70
+ | ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ------ | -------------------------------------------------------------------------------------------- | ------ | ------ | ------ | ------ | ------ | ----------------------------------------------- | ------ | ------ | ------ | ------ | ------------------------------------------------------------ | ---------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
71
+ | **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — | — | — | — | — | — | | `appShellInset` 20 → 16 (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | spacing, radius, type and the dense tier (§ 2.16.0) | — | — | — | — | — |
72
+ | **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BandSpan.absentFraction` + `absentState` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
73
+ | **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltProvider` embedded mode, `spotlight` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | expanded gutter 24 (§ 2.16.0) | — | — | light/outline Buttons ink, no status edges (§ 2.19.0) | — | — |
74
+ | **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — | `FormSection`/`FormRow`/`FormGroup`/`FormActions` move here (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | dense 28 tier at a fine pointer (§ 2.16.0) | — | — | — | — | — |
75
+ | **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
76
+ | **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
77
+ | **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | card inset 12/16, `kpi` 22 / 500 (§ 2.16.0) | — | — | StatCard status dot, Meter/BarList refinements (§ 2.19.0) | — | — |
78
+ | **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
79
+ | **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | the managed block moves `CLAUDE.md` → `AGENTS.md` (§ 1.41.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `doctor`: CSS + forced dropped subpaths, `oxlint-floor`, Start wiring (§ 2.8.0) | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
80
+ | **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — | `unknown-vx-token` → `error`; the token factories throw (§ Guards) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | `inline-spacing` steps, `card-inset` accepts both pairs (§ 2.16.0) | — | — | — | — | — |
81
81
 
82
82
  ---
83
83
 
@@ -1046,6 +1046,168 @@ The `basalt-ui/router-tanstack` subpath is **removed** in 2.x, not moved: an imp
1046
1046
  _Nothing yet. Author the next section under this heading as `## Unreleased — <title>`; the
1047
1047
  release renames it and opens a new one here._
1048
1048
 
1049
+ ## 2.20.0 — the sparkline reference and readout
1050
+
1051
+ **`Sparkline` now answers hover and keyboard focus.** A pointer over the cell, or arrow keys /
1052
+ Home / End on the focused chart, show the point's value in one quiet in-cell line (Escape or blur
1053
+ clears it) and mark the point with a dot. It was inert before. Value text comes from the new
1054
+ `format` prop (default: the compact number format), the x text from the new `labels` array
1055
+ (index-aligned with `data`). **Opt out** by putting the sparkline under an `aria-hidden` ancestor,
1056
+ which disables the readout.
1057
+
1058
+ New, additive: `reference={n | 'mean'}` draws a dashed `--vx-line` hairline and widens the y domain
1059
+ to include it (`'mean'` is over the plotted values).
1060
+
1061
+ ### `Meter` captions share one size, and gains `ticks`, `tone`, `size`
1062
+
1063
+ **Changed default:** the `Meter` empty line ("No data") was `--vx-text-sm`; every Meter caption
1064
+ (reading, target, forecast, part, zone and tick names, the empty line) now reads one token,
1065
+ `--basalt-meter-caption`, defaulting to `--vx-text-micro`. **Opt out** (or follow the host text) per
1066
+ Meter: `style={{ '--basalt-meter-caption': 'var(--vx-text-sm)' }}`, or `1em` to inherit the host size.
1067
+ The target tick now also carries a 1px track-coloured halo, and at `target === max` sits inside the
1068
+ track end instead of straddling it.
1069
+
1070
+ New, additive: `ticks={[{ at, label? }]}` (several marks; out-of-range ticks are dropped, not
1071
+ clamped), `tone="muted"` (a non-verdict fill, 3:1 against the track in both schemes), `size="row"`
1072
+ (one text line tall, no caption rows), and root types `MeterSegment`, `MeterZone`, `MeterTick`.
1073
+
1074
+ ### `relativeTime` honours the format locale
1075
+
1076
+ `relativeTime` (and `SyncButton`, which calls it with no locale) now falls back to the
1077
+ `defineFormat` / `BasaltProvider` `locale`, like `numberFormat` and `dateFormat` always did. Before,
1078
+ it fell back to the runtime's own locale, so an `en-GB` app on a German system read "vor 4 Tagen".
1079
+ The fix is in `relativeTime`'s formatter only: `duration` and the date builders already resolved the default, and no other `Intl.RelativeTimeFormat` exists in `src`.
1080
+
1081
+ **Opt-out:** pass `locale` per call, or leave `defineFormat` / the provider `locale` unset to keep
1082
+ the runtime locale. argo can drop its `APP_LOCALE` wrapper around `relativeTime`.
1083
+
1084
+ ### Proportional numerals (`StatCard`, `WidgetHeader`, `DeltaBadge`, `BarList`, `Meter`)
1085
+
1086
+ Hero values, row labels and body text are now the proportional sans with lining figures; mono is
1087
+ for captions, times and code only (`docs/DESIGN-CORE.md`). Before, every numeral rendered in
1088
+ JetBrains Mono.
1089
+
1090
+ - **What changed:** `StatCard` / `WidgetHeader` hero value, unit and count chip, `StatCard`
1091
+ breakdown values, `DeltaBadge`, `BarList` value and secondary, and `Meter` ring value, captions
1092
+ and zone labels now read `font-family: var(--basalt-font-numeral, var(--basalt-font-sans))` with
1093
+ `font-variant-numeric: lining-nums`. Sizes, weights and letter-spacing are unchanged. Headings
1094
+ (`h1`–`h6`, `.mantine-Title-root`) drop the face's slashed zero (`font-feature-settings: 'zero' 0`).
1095
+ - **Unchanged:** uppercase captions, qualifiers, the group-tier heading and times stay mono;
1096
+ `src/table/**`, `[data-numeric]` controls and axis ticks keep tabular figures.
1097
+ - **Opt out (old mono heroes):** one declaration restores every site above:
1098
+
1099
+ ```css
1100
+ :root {
1101
+ --basalt-font-numeral: var(--basalt-font-mono);
1102
+ }
1103
+ ```
1104
+
1105
+ Heading zeros: `h1, h2, h3, h4, h5, h6, .mantine-Title-root { font-feature-settings: normal; }`
1106
+ (needs to out-rank `@layer basalt` — declare it unlayered).
1107
+
1108
+ ### `<Card>` and `<Paper>` default to the 12/16 inset
1109
+
1110
+ The theme now sets the inset itself — `--vx-space-card-inset-y` 12 / `-x` 16, density-scaled — on
1111
+ every `Card` and `Paper`. Before, a bare `<Card>` got Mantine's 16 px all round and a bare
1112
+ `<Paper>` got 0, so both missed the law and consumers wrote `py="sm" px="md"` on every card.
1113
+
1114
+ | You wrote | Before | Now |
1115
+ | ------------------------------ | ------------ | ------------------------------------------------------------- |
1116
+ | `<Card>` | 16 all round | 12 / 16 |
1117
+ | `<Paper>` | 0 | 12 / 16 |
1118
+ | `<Card py="sm" px="md">` | 12 / 16 | 12 / 16 — and `basalt/card-inset` flags the pair as redundant |
1119
+ | `<Card padding={0}>` / `p={0}` | flush | flush, flagged: use `variant="flush"` |
1120
+
1121
+ - **Delete** every `py="sm" px="md"` on a `Card` or `Paper`.
1122
+ - **Flush whole card** (a map, an image, a table that owns its own padding): `variant="flush"` on
1123
+ `Card` or `Paper`. **Full-bleed region inside a padded card**: `<Card.Section>`, whose negative
1124
+ margins now cancel the 12/16 pair rather than one `--card-padding`.
1125
+ - **Opt out of the theme inset for one card**: an explicit padding with
1126
+ `{/* theme-allow card-inset — <why> */}`. A Card `padding` prop still works (it retargets the same
1127
+ pair), and `p`/`py`/`px` style props win as inline styles.
1128
+ - A `Paper` you relied on being padding-free (a bare wrapper, a custom overlay) now has 12/16:
1129
+ add `variant="flush"`. Mantine's own `Modal`, `Drawer`, `Dialog`, `ActionBar` and `FloatingWindow`
1130
+ are excluded and gain nothing.
1131
+ - `basalt/card-inset` stays at `warn` (grace → 2.26.0); the redundant pair is a new finding, so a
1132
+ codebase that was clean last release will report until the pairs are deleted.
1133
+
1134
+ ### `DeltaBadge` `period` composes "vs <period>"
1135
+
1136
+ `period` (and `deltaPeriod` on `StatCard`, `WidgetHeader`, `Section`) now renders `vs <period>`: `period="MoM"` reads "vs MoM" where it read "MoM". A period that already starts with the prefix is left alone, so a caller passing `"vs last week"` still renders "vs last week", not "vs vs last week". **Opt out** with `periodPrefix=""` on `DeltaBadge` (renders the period raw), or pass your locale's word (`periodPrefix="gegenüber"`). A period that is not a comparison (`"30d"`, a change over a window) now reads wrongly ("vs 30d"): pass `periodPrefix=""` on `DeltaBadge` itself, or reword it through the card props (`"30 days ago"`). Drop the hand-written "vs " at your leisure.
1137
+
1138
+ ### Chrome: on-scale Button padding, neutral selected nav row, neutral error state
1139
+
1140
+ **Button inline padding is on the spacing scale.** Every size reads `--vx-space-stack-*` steps
1141
+ (density-scaled) instead of Mantine's 14/18/22/26/32 px and compact 7/8/10/12/14 px: `xs` 12, `sm` 16,
1142
+ `md` 20, `lg` 24, `xl` 32; `compact-xs`/`-sm` 8, `compact-md`/`-lg` 12, `compact-xl` 16 (at density 0).
1143
+ Heights are unchanged, and `size="ctl"` keeps its own 10 px inset. **Opt out** per component with
1144
+ `<Button styles={{ root: { '--button-padding-x': 'var(--button-padding-x-<size>)' } }}>`, using the
1145
+ matching Mantine size var (`--button-padding-x-xs`, `-compact-xs`, …), or globally by overriding
1146
+ `Button.vars` in your theme.
1147
+
1148
+ **The selected nav row is a neutral ink fill, not an accent tint.** `NavLink[data-active]` paints
1149
+ ink 10 % (14 % on hover) with the existing weight 600; the accent stays on the active icon, focus and
1150
+ the filled primary. **Opt out** with a consumer class on the row that sets `background-color`
1151
+ (consumer classes win over the theme module).
1152
+
1153
+ **Errors render as a dot, a word, the message and a retry.** `ErrorState` (and so `QueryState`
1154
+ and `StatCard` error bodies) no longer renders a red-tinted Mantine `Alert`; it is a neutral
1155
+ `role="alert"` stack led by a `StatusDot` and the title. `ChartCard`'s error body gets the same idiom
1156
+ (dot, "Error", the message, Retry); the compact sparkline `—` is unchanged. **Opt out** by rendering your own
1157
+ `<Alert color="red" variant="light">` in the `error` slot of the surface (or a custom `ErrorState`
1158
+ wrapper).
1159
+
1160
+ Also fixed (no action): a hovered `Tab` now shows an ink-5 % fill in dark as in light.
1161
+
1162
+ ### Facts at rest, strip captions, tick fonts
1163
+
1164
+ **Changed default:** `ChartCard` `facts` show only at rest; while `state` is pending, errored or empty
1165
+ the header keeps its title row alone (the figure above a skeleton contradicted it). **Opt out:** none;
1166
+ pass the figure as `info`/`subtitle` text if a loading card must still state it.
1167
+
1168
+ **Changed default:** the lowercase `qualifier` of a `StatCard` and a `StatGroup` strip cell is the muted
1169
+ proportional sans (mono stays on the UPPERCASE caption), and a strip cell's `· ` separator is gone. The
1170
+ caption and its info glyph are one unit (the caption truncates with a `title`; the qualifier wraps
1171
+ whole below it). Chart axis ticks (the chart host's font) are the proportional sans with `tabular-nums`, not mono.
1172
+ **Opt out:** set `--basalt-chart-font: var(--basalt-font-mono)` on the chart or an ancestor.
1173
+
1174
+ `Meter` captions wrap with `text-wrap: pretty` and join a number and a known unit (`24 h`, `7 d`, `5 min`, `40 %`)
1175
+ with a no-break space, so `textContent` carries U+00A0 there; its visually-hidden summary now reads the caption
1176
+ size instead of the inherited body size.
1177
+
1178
+ ### Round-2 board fixes: sparkline readout, chart error, tick size, captions, thin rows, verdict word
1179
+
1180
+ **Changed default — `Sparkline` readout.** The hover/focus chip is opaque and sits on a line ABOVE the plot
1181
+ box (it sat inside it and covered the line's last segment, a bar or the end dot). The `StatCard` `right`
1182
+ slot and a strip cell's `visual` now reserve that line (`--basalt-spark-readout-h`, 18px) as padding above
1183
+ a sparkline, so the card/cell grows by up to 18px and the chip never covers the hero value; `bleed` already
1184
+ had the room. **No opt-out for the position:** a chip inside the plot has to cover some mark. Resize the
1185
+ line with `--basalt-spark-readout-h` (chip and reserve move together); the readout itself is off under an
1186
+ `aria-hidden` ancestor.
1187
+
1188
+ **Changed default — chart error body.** A `ChartCard` (or any chart) error is StatCard's anatomy: a
1189
+ left-aligned stack of dot, "Could not load this chart", the message and `stateAction`; it was a centred
1190
+ "Error" word. The body now grows past the chart's height rather than clip its action. **No opt-out:** the
1191
+ old body clipped Retry at 390px, so there is no layout worth restoring; pass your own `state` copy via the
1192
+ error's message.
1193
+
1194
+ **Changed default — tick size.** Chart tick labels (every kind, `Heatmap` included) are `--vx-text-micro`
1195
+ at every container width; they were the 10px nano rung below 480px. **No opt-out:** one size is the law.
1196
+
1197
+ **Changed default — `Meter` captions.** They wrap with `text-wrap: balance`, and the last two words of a
1198
+ caption `Meter` composes are joined by a no-break space when the last is 6 characters or fewer
1199
+ (`textContent` carries U+00A0 there). **Opt out:** pass a node to `startCaption`/`endCaption` (a node is never
1200
+ glued).
1201
+
1202
+ **Changed default — `BarList variant="thin"`.** The label wraps to two lines before truncating (its `title`
1203
+ has the whole text) and the secondary column takes at most 40% of the list. **No opt-out:** the old width
1204
+ cut titles to a few characters at 390px.
1205
+
1206
+ **Changed default — `StatusVerdict` word.** It is the proportional sans (`--basalt-font-sans`) at the micro
1207
+ size in muted ink, not the mono: it is a sentence fragment, not an UPPERCASE caption. This reaches the
1208
+ `StatCard` tone word, `BarList` secondaries that use it, and the notification centre. **Opt out:** pass
1209
+ `className` with `font-family: var(--basalt-font-mono)`.
1210
+
1049
1211
  ## 2.19.0 — the status dot, ink buttons and Meter refinements
1050
1212
 
1051
1213
  ### Status is a dot and a word, not an edge stripe (`StatCard`, `Callout`, notification centre)
@@ -33,5 +33,5 @@ Every cartesian chart is `CartesianChart` or a kind built on it; props are in th
33
33
 
34
34
  - `@visx/*` is banned. [basalt/chart-engine-boundary]
35
35
  - Import engine marks only from `@tanstack/charts/{line,area,area-x,bar,rect,rule,dot,tick,text,vector,link,arrow,difference,stack,scales/*,transform/*,mark/decorative,d3/shape,types}`; the bare root and `@tanstack/charts/react` are errors. [basalt/chart-engine-boundary]
36
- - Wrap a chart kind in `ChartCard`, never a raw `Card` or `Paper`. [basalt/chart-in-raw-surface]
36
+ - Wrap a chart kind in `ChartCard`, never a raw `Card` or `Paper`; its headline figure and period go in `facts`, not a filler `subtitle`. [basalt/chart-in-raw-surface] [type ChartCardProps]
37
37
  - Series colors are `{ light, dark }` pairs from the app's series file (`defineSeries`); write no hex or `rgba()` in a chart file. [check-theme raw-hex] [check-theme raw-color-fn]
@@ -32,7 +32,7 @@ paths:
32
32
  ## Surfaces
33
33
 
34
34
  - Never pass `withBorder` to `Card` or `Paper`; the theme draws the ring (`<Card.Section withBorder>` is fine). [check-theme card-with-border]
35
- - Card/Paper insets are `py="sm" px="md"` with the theme radius; no explicit `p`, `padding` or `radius`. [basalt/card-inset]
35
+ - The theme owns the Card/Paper inset (12/16) and radius: write no `p`, `padding`, `py`, `px` or `radius`, not even `py="sm" px="md"`. Flush is `variant="flush"` (whole card) or `<Card.Section>` (a full-bleed region). [basalt/card-inset]
36
36
  - Lay out with `Box`/`Flex`/`Grid`/`Stack`/`Group`, not a `<div>` with `style`. [check-theme raw-html-layout] [check-theme hidden-inline-style]
37
37
  - No inline `display: flex|grid`; no inline spacing; spacing props take `xs..xl`. [check-theme inline-display] [check-theme inline-spacing] [check-theme raw-spacing]
38
38
  - Inputs come from `@mantine/core`, never `<input>`, `<select>` or `<textarea>`. [check-theme raw-form-control]
@@ -74,7 +74,7 @@ const columns = [
74
74
  col.accessor('revenue', {
75
75
  header: 'Revenue',
76
76
  sortFn: 'basic', // v9 `sortFn`, not v8 `sortingFn`
77
- meta: { align: 'right' }, // numbers are mono-numeral by default; `numeral: false` opts out
77
+ meta: { align: 'right' }, // table number columns are mono-numeral by default (Wave 37 revisits the table face); `numeral: false` opts out
78
78
  cell: (c) => money(c.getValue(), { currency: 'USD' }),
79
79
  }),
80
80
  ]
@@ -20,7 +20,7 @@ Method only; the law is `.claude/rules/basalt-*.md` and `./DESIGN.md`.
20
20
  | Part of a whole, 2–6 parts | one segmented (stacked) bar, parts in order — not a donut plus a total card, not a row of N `StatCard`s | `Bars` (stacked, the default) |
21
21
  | Distribution | small axis-less histogram | `Bars` in a `ChartCard` |
22
22
  | Status over time | band strip; a heat grid for daily data | `BandStrip` / `Heatmap` |
23
- | Many rows, several attributes | table, right-aligned mono figures | `BasaltDataTable` |
23
+ | Many rows, several attributes | table, right-aligned tabular figures | `BasaltDataTable` |
24
24
  | Nothing yet / failed | why + what to do | `EmptyState` / the component's own state |
25
25
 
26
26
  No row fits the data → say so; never default to a number in a box.
@@ -13,7 +13,7 @@ theme's config knobs (see the `basalt-tokens` rule) — so nothing here restates
13
13
 
14
14
  - **Accent hue:** {{ACCENT_HUE}} (default: the shipped seed; a single-series mark stays neutral)
15
15
  - **Theme knobs:** _(none — `createBasaltTheme()` bare)_ · record any non-zero `derive`/`fonts`/
16
- `radius`/`density` level here, with its reason.
16
+ `radius`/`density` level or `--basalt-font-numeral` override here, with its reason.
17
17
 
18
18
  ## Series dictionary
19
19
 
@@ -588,15 +588,21 @@ const rawSizeLiteral = {
588
588
 
589
589
  const CARD_TAGS = new Set(['Card', 'Paper'])
590
590
 
591
- // The idiom is the PAIR py="sm" px="md" (12/16), or leaving both to the theme. Never a uniform
592
- // `p`/`padding` (whatever its value or form), never one half of the pair alone, never a number, an
593
- // expression or any other step. The pair is the level-0 inset (`cardInsetY`/`cardInsetX` =
594
- // `SPACE_SCALE.sm`/`.md`); `tokens/space-scale.test.ts` pins that.
591
+ // The THEME owns the inset (Wave 35): a bare Card/Paper resolves to the level-0 12/16 pair
592
+ // (`cardInsetY`/`cardInsetX` = `SPACE_SCALE.sm`/`.md`; `tokens/space-scale.test.ts` pins that), so
593
+ // the idiom is to write nothing. The pair spelled out (`py="sm" px="md"`) is therefore REDUNDANT, any
594
+ // other explicit inset/radius is off-idiom, and flush is `variant="flush"` (whole card) or
595
+ // `Card.Section` (a full-bleed region of a padded card). `p`/`padding` take one value, so no
596
+ // uniform form can equal the 12/16 pair — they are always off-idiom.
595
597
  export const CARD_INSET_PY = 'sm'
596
598
  export const CARD_INSET_PX = 'md'
597
599
  const CARD_INSET_MESSAGE =
598
- 'Card/Paper is off the card idiom — use the spacing sm/md inset together (py="sm" px="md") and ' +
599
- "the theme's card radius, not an explicit p/padding, a lone py/px, or a radius. (basalt/card-inset)"
600
+ 'Card/Paper is off the card idiom — the theme owns the 12/16 inset and radius, so write no ' +
601
+ 'p/padding/py/px/radius. Flush whole card: variant="flush"; full-bleed region in a padded card: ' +
602
+ '<Card.Section>; a deliberate exception: {/* theme-allow card-inset — reason */}. (basalt/card-inset)'
603
+ const CARD_INSET_REDUNDANT_MESSAGE =
604
+ 'Card/Paper inset is redundant — the theme owns it (12/16, density-scaled); delete ' +
605
+ 'py="sm" px="md". (basalt/card-inset)'
600
606
 
601
607
  function isStringLiteral(node) {
602
608
  return node !== null && node.type === 'Literal' && typeof node.value === 'string'
@@ -606,7 +612,7 @@ function attrValue(attr) {
606
612
  return unwrapExpressionContainer(attr.value)
607
613
  }
608
614
 
609
- // Ships: warn (grace → 2.24.0)
615
+ // Ships: warn (grace → 2.26.0)
610
616
  const cardInset = {
611
617
  meta: {
612
618
  type: 'suggestion',
@@ -639,16 +645,24 @@ const cardInset = {
639
645
  for (const name of ['p', 'padding', 'radius']) {
640
646
  if (attrs.has(name)) offenders.push(attrs.get(name))
641
647
  }
642
- // The pair stands or falls together: each half must be exactly its step, and neither
643
- // may appear without the other.
644
- const pyOk = isExactly(py, CARD_INSET_PY)
645
- const pxOk = isExactly(px, CARD_INSET_PX)
646
- if (py && !(pyOk && pxOk)) offenders.push(py)
647
- if (px && !(pyOk && pxOk)) offenders.push(px)
648
-
649
- for (const attr of offenders) {
650
- if (hasThemeAllow(context, attr, 'card-inset')) continue
651
- context.report({ node: attr, message: CARD_INSET_MESSAGE })
648
+ // The theme's own pair, restated, is redundant; any other py/px (or a lone half) is
649
+ // off-idiom.
650
+ const isThemePair = isExactly(py, CARD_INSET_PY) && isExactly(px, CARD_INSET_PX)
651
+ const redundant = []
652
+ if (isThemePair) redundant.push(py, px)
653
+ else {
654
+ if (py) offenders.push(py)
655
+ if (px) offenders.push(px)
656
+ }
657
+
658
+ for (const [list, message] of [
659
+ [offenders, CARD_INSET_MESSAGE],
660
+ [redundant, CARD_INSET_REDUNDANT_MESSAGE],
661
+ ]) {
662
+ for (const attr of list) {
663
+ if (hasThemeAllow(context, attr, 'card-inset')) continue
664
+ context.report({ node: attr, message })
665
+ }
652
666
  }
653
667
  },
654
668
  }
@@ -4224,8 +4238,8 @@ const routeViewTransition = {
4224
4238
  export const PLUGIN_RULE_GRACE = {
4225
4239
  'card-inset': {
4226
4240
  since: '2.16.0',
4227
- promote: '2.24.0',
4228
- why: 'Tightened in 2.16.0: only py="sm" px="md" together (or neither) passes; uniform p/padding, a lone half, numbers and expressions are findings.',
4241
+ promote: '2.26.0',
4242
+ why: 'Tightened in 2.16.0: only py="sm" px="md" together (or neither) passed. Inverted in 2.20.0 (Wave 35): the theme owns the 12/16 inset, so the pair is now a "redundant" finding and "neither" is the idiom; flush is variant="flush" or Card.Section. The redundant pair is a NEW finding class first shipping in 2.20.0, so consumers get the full grace again: promote moved 2.24.0 → 2.26.0.',
4229
4243
  },
4230
4244
  }
4231
4245
 
@@ -249,14 +249,44 @@ describe('basalt/card-inset', () => {
249
249
  })
250
250
 
251
251
  it.each([
252
- ['the sm/md pair', '<Paper py="sm" px="md" />'],
253
- ['the pair in either order', '<Card px="md" py="sm" />'],
254
252
  ['no padding at all', '<Card />'],
253
+ ['a bare Paper', '<Paper />'],
254
+ ['the flush Card', '<Card variant="flush" />'],
255
+ ['the flush Paper', '<Paper variant="flush" />'],
256
+ ['a full-bleed Card.Section in a padded card', '<Card><Card.Section /></Card>'],
257
+ [
258
+ 'an explicit inset with a waiver',
259
+ '<div>\n{/* theme-allow card-inset — hero map */}\n<Card p={0} />\n</div>',
260
+ ],
255
261
  ])('does NOT flag %s', (_name, jsx) => {
256
262
  const { rules } = run(`export const C = () => ${jsx}\n`)
257
263
  expect(rules).not.toContain('card-inset')
258
264
  })
259
265
 
266
+ // The theme owns the 12/16 inset (Wave 35), so restating it is noise that drifts.
267
+ it.each([
268
+ ['the sm/md pair', '<Paper py="sm" px="md" />'],
269
+ ['the pair in either order', '<Card px="md" py="sm" />'],
270
+ ['the pair in expression containers', '<Card py={"sm"} px={"md"} />'],
271
+ ])('flags %s as redundant', (_name, jsx) => {
272
+ const { rules, output } = run(`export const C = () => ${jsx}\n`)
273
+ expect(rules).toContain('card-inset')
274
+ expect(output).toContain('redundant')
275
+ expect(output).toContain('theme owns')
276
+ })
277
+
278
+ it('names the flush idiom on any other explicit inset, and not "redundant"', () => {
279
+ const { output } = run(`export const C = () => <Card py={0} px={0} />\n`)
280
+ expect(output).toContain('variant="flush"')
281
+ expect(output).toContain('Card.Section')
282
+ expect(output).not.toContain('redundant')
283
+ })
284
+
285
+ it('flush does not excuse an explicit padding next to it', () => {
286
+ const { rules } = run(`export const C = () => <Card variant="flush" p="lg" />\n`)
287
+ expect(rules).toContain('card-inset')
288
+ })
289
+
260
290
  it('ships warn through its grace minor, so a flagged card does not fail the run', () => {
261
291
  const { code, rules } = run(`export const C = () => <Card p="lg" />\n`)
262
292
  // The fixture config sets the rule to error; the SHIPPED level is pinned by the ledger tests.
@@ -2,12 +2,22 @@ import type { ReactElement, ReactNode } from 'react';
2
2
  import type { BasaltProps, SlotStylesProps } from '../common/props.js';
3
3
  import type { DeltaPolarity } from '../dashboard/delta-badge.js';
4
4
  import type { ChartState, ResponsiveChartHeight } from './types.js';
5
+ /** One headline figure: the value is the hero, then its unit, a comparison node and the period. */
6
+ export type ChartFact = {
7
+ value: ReactNode;
8
+ unit?: string | undefined;
9
+ /** Usually a `DeltaBadge`. */
10
+ comparison?: ReactNode;
11
+ /** Plain text the figure covers, e.g. `last 30 d`. */
12
+ period?: string | undefined;
13
+ };
5
14
  /** The three boxes a `ChartCard` paints. */
6
15
  export type ChartCardSlot = 'root' | 'header' | 'body';
7
- export type ChartCardProps = BasaltProps & SlotStylesProps<ChartCardSlot> & {
16
+ type ChartCardBaseProps = BasaltProps & SlotStylesProps<ChartCardSlot> & {
8
17
  title?: string | undefined;
9
18
  icon?: ReactNode;
10
- /** A muted line below the title row; does not by itself render the header. */
19
+ /** A muted line below the title row; does not by itself render the header. With `facts` it is the
20
+ * basis/as-of line after the facts row (always visible, never folded into the info glyph). */
11
21
  subtitle?: string | undefined;
12
22
  /** `WidgetHeader`'s info glyph beside the title. */
13
23
  info?: string | undefined;
@@ -30,5 +40,20 @@ export type ChartCardProps = BasaltProps & SlotStylesProps<ChartCardSlot> & {
30
40
  stateAction?: ReactNode;
31
41
  children?: ReactNode;
32
42
  };
33
- export declare function ChartCard({ actions, state, placeholderHeight, stateAction, className, classNames, style, children, ...header }: ChartCardProps): ReactElement;
43
+ /**
44
+ * `facts` replaces the legacy `value`/`delta` hero: the two are mutually exclusive in the type. The
45
+ * facts show only at rest: while `state` is pending, errored or empty the figure would sit above a
46
+ * skeleton or a placeholder that contradicts it, so the header keeps its title row alone.
47
+ */
48
+ export type ChartCardProps = ChartCardBaseProps & ({
49
+ /** The headline figure(s) under the title: value, unit, comparison, period. Wraps at half
50
+ * width, never clips. Replaces `value`/`delta`. */
51
+ facts: ChartFact | readonly ChartFact[];
52
+ value?: undefined;
53
+ delta?: undefined;
54
+ } | {
55
+ facts?: undefined;
56
+ });
57
+ export declare function ChartCard({ actions, state, placeholderHeight, stateAction, className, classNames, style, children, facts, ...header }: ChartCardProps): ReactElement;
58
+ export {};
34
59
  //# sourceMappingURL=ChartCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChartCard.d.ts","sourceRoot":"","sources":["../../src/charts/ChartCard.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGnE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAM7D,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAoEhE,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAA;AAEtD,MAAM,MAAM,cAAc,GAAG,WAAW,GACtC,eAAe,CAAC,aAAa,CAAC,GAAG;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;IACzC,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,mFAAmF;IACnF,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IAC9B;;wFAEoF;IACpF,iBAAiB,CAAC,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAAA;IAC9D,sEAAsE;IACtE,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAWH,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,KAAK,EACL,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,UAAU,EACV,KAAK,EACL,QAAQ,EACR,GAAG,MAAM,EACV,EAAE,cAAc,GAAG,YAAY,CA4C/B"}
1
+ {"version":3,"file":"ChartCard.d.ts","sourceRoot":"","sources":["../../src/charts/ChartCard.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGnE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAM7D,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAoEhE,mGAAmG;AACnG,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B,CAAA;AAED,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAA;AAEtD,KAAK,kBAAkB,GAAG,WAAW,GACnC,eAAe,CAAC,aAAa,CAAC,GAAG;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;kGAC8F;IAC9F,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;IACzC,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,mFAAmF;IACnF,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IAC9B;;wFAEoF;IACpF,iBAAiB,CAAC,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAAA;IAC9D,sEAAsE;IACtE,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAEH;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAC7C,CACI;IACE;uDACmD;IACnD,KAAK,EAAE,SAAS,GAAG,SAAS,SAAS,EAAE,CAAA;IACvC,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,GACD;IAAE,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,CACxB,CAAA;AA0CH,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,KAAK,EACL,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,UAAU,EACV,KAAK,EACL,QAAQ,EACR,KAAK,EACL,GAAG,MAAM,EACV,EAAE,cAAc,GAAG,YAAY,CAkD/B"}
@@ -57,6 +57,21 @@ const bodyClipStyle = {
57
57
  };
58
58
  const definedOnly = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== void 0));
59
59
  const HEADER_TRIGGERS = ["title", "info", "value", "icon", "count"];
60
+ function Facts({
61
+ facts,
62
+ basis
63
+ }) {
64
+ const list = Array.isArray(facts) ? facts : [facts];
65
+ return /* @__PURE__ */ jsxs("div", { "data-basalt-facts": "", className: classes.facts, children: [
66
+ /* @__PURE__ */ jsx("div", { className: classes.factsRow, children: list.map((f, i) => /* @__PURE__ */ jsxs("span", { "data-basalt-fact": "", className: classes.fact, children: [
67
+ /* @__PURE__ */ jsx("span", { "data-basalt-fact-value": "", className: classes.factValue, children: f.value }),
68
+ f.unit !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.factUnit, children: f.unit }),
69
+ f.comparison,
70
+ f.period !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.factPeriod, children: f.period })
71
+ ] }, i)) }),
72
+ basis !== void 0 && /* @__PURE__ */ jsx("p", { "data-basalt-facts-basis": "", className: classes.factsBasis, children: basis })
73
+ ] });
74
+ }
60
75
  function ChartCard({
61
76
  actions,
62
77
  state,
@@ -66,11 +81,15 @@ function ChartCard({
66
81
  classNames,
67
82
  style,
68
83
  children,
84
+ facts,
69
85
  ...header
70
86
  }) {
71
87
  const { ref, short } = useShortCard();
72
88
  const resolved = resolveChartState(state);
73
- const hasHeader = actions !== void 0 || HEADER_TRIGGERS.some((k) => header[k] !== void 0);
89
+ const showFacts = facts !== void 0 && resolved === null;
90
+ const hasHeader = actions !== void 0 || showFacts || HEADER_TRIGGERS.some((k) => header[k] !== void 0);
91
+ const { subtitle, ...rest } = header;
92
+ const headerProps = facts === void 0 ? header : rest;
74
93
  return /* @__PURE__ */ jsx(ChartCardContext.Provider, { value: true, children: /* @__PURE__ */ jsxs(
75
94
  "div",
76
95
  {
@@ -81,17 +100,20 @@ function ChartCard({
81
100
  ...resolved === "pending" && { "aria-busy": "true" },
82
101
  ...short && { "data-basalt-card-short": "" },
83
102
  children: [
84
- hasHeader && /* @__PURE__ */ jsx("div", { className: cx(classes.header, classNames?.header), children: /* @__PURE__ */ jsx(
85
- WidgetHeader,
86
- {
87
- tier: "widget",
88
- ...definedOnly(header),
89
- title: header.title ?? "",
90
- ...actions !== void 0 && {
91
- actions: /* @__PURE__ */ jsx("span", { "data-basalt-tier": "widget", children: actions })
103
+ hasHeader && /* @__PURE__ */ jsxs("div", { className: cx(classes.header, classNames?.header), children: [
104
+ /* @__PURE__ */ jsx(
105
+ WidgetHeader,
106
+ {
107
+ tier: "widget",
108
+ ...definedOnly(headerProps),
109
+ title: header.title ?? "",
110
+ ...actions !== void 0 && {
111
+ actions: /* @__PURE__ */ jsx("span", { "data-basalt-tier": "widget", children: actions })
112
+ }
92
113
  }
93
- }
94
- ) }),
114
+ ),
115
+ showFacts && /* @__PURE__ */ jsx(Facts, { facts, basis: subtitle })
116
+ ] }),
95
117
  /* @__PURE__ */ jsx(
96
118
  "div",
97
119
  {
@@ -1 +1 @@
1
- {"version":3,"file":"Donut.d.ts","sourceRoot":"","sources":["../../src/charts/Donut.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAWlD,OAAO,KAAK,EAAe,UAAU,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE7E,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IAAE,GAAG,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7E,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,WAAW,GAAG;IAChE,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,CAAA;IAC9B,uDAAuD;IACvD,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAA;IAC/B,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IAClC,4DAA4D;IAC5D,WAAW,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;IAC9C,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAAA;IACnD,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;CAC/B,CAAA;AAkED,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,YAAY,CAkJnF"}
1
+ {"version":3,"file":"Donut.d.ts","sourceRoot":"","sources":["../../src/charts/Donut.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAWlD,OAAO,KAAK,EAAe,UAAU,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE7E,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IAAE,GAAG,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7E,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,WAAW,GAAG;IAChE,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,CAAA;IAC9B,uDAAuD;IACvD,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAA;IAC/B,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IAClC,4DAA4D;IAC5D,WAAW,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;IAC9C,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAAA;IACnD,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;CAC/B,CAAA;AAkED,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,YAAY,CA0JnF"}