basalt-ui 2.21.0 → 2.22.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 (226) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/MIGRATING.md +277 -12
  3. package/agent/agents/basalt-design-reviewer.md +1 -1
  4. package/agent/rules/basalt-tokens.md +1 -1
  5. package/agent/skills/basalt-design/SKILL.md +1 -1
  6. package/agent/skills/basalt-design/references/anti-defaults.md +1 -1
  7. package/agent/skills/basalt-design/references/catalogue.md +1 -0
  8. package/dist/charts/BandStrip.d.ts.map +1 -1
  9. package/dist/charts/BandStrip.js +27 -3
  10. package/dist/charts/Bars.d.ts.map +1 -1
  11. package/dist/charts/Bars.js +5 -0
  12. package/dist/charts/CartesianChart.d.ts +8 -0
  13. package/dist/charts/CartesianChart.d.ts.map +1 -1
  14. package/dist/charts/CartesianChart.js +8 -5
  15. package/dist/charts/ChartCard.d.ts +12 -3
  16. package/dist/charts/ChartCard.d.ts.map +1 -1
  17. package/dist/charts/ChartCard.js +29 -8
  18. package/dist/charts/DualPanel.d.ts.map +1 -1
  19. package/dist/charts/DualPanel.js +5 -8
  20. package/dist/charts/Heatmap.d.ts +12 -1
  21. package/dist/charts/Heatmap.d.ts.map +1 -1
  22. package/dist/charts/Heatmap.js +34 -5
  23. package/dist/charts/Lines.d.ts +3 -0
  24. package/dist/charts/Lines.d.ts.map +1 -1
  25. package/dist/charts/Lines.js +29 -6
  26. package/dist/charts/MirroredBars.d.ts.map +1 -1
  27. package/dist/charts/MirroredBars.js +4 -6
  28. package/dist/charts/Sparkline.d.ts +7 -1
  29. package/dist/charts/Sparkline.d.ts.map +1 -1
  30. package/dist/charts/Sparkline.js +39 -14
  31. package/dist/charts/StackedArea.d.ts +4 -1
  32. package/dist/charts/StackedArea.d.ts.map +1 -1
  33. package/dist/charts/StackedArea.js +9 -3
  34. package/dist/charts/band-fold.d.ts +20 -1
  35. package/dist/charts/band-fold.d.ts.map +1 -1
  36. package/dist/charts/band-fold.js +9 -0
  37. package/dist/charts/chart-box.module.css +19 -0
  38. package/dist/charts/chart-card.module.css +25 -0
  39. package/dist/charts/chart-legend.module.css +7 -0
  40. package/dist/charts/compile.d.ts +17 -6
  41. package/dist/charts/compile.d.ts.map +1 -1
  42. package/dist/charts/compile.js +145 -74
  43. package/dist/charts/labels.d.ts +15 -4
  44. package/dist/charts/labels.d.ts.map +1 -1
  45. package/dist/charts/labels.js +34 -10
  46. package/dist/charts/legend.d.ts +2 -0
  47. package/dist/charts/legend.d.ts.map +1 -1
  48. package/dist/charts/legend.js +7 -21
  49. package/dist/charts/marks.js +1 -1
  50. package/dist/charts/panel.d.ts +0 -6
  51. package/dist/charts/panel.d.ts.map +1 -1
  52. package/dist/charts/panel.js +1 -10
  53. package/dist/charts/ref-label.d.ts +26 -0
  54. package/dist/charts/ref-label.d.ts.map +1 -0
  55. package/dist/charts/ref-label.js +63 -0
  56. package/dist/charts/scales.d.ts +4 -1
  57. package/dist/charts/scales.d.ts.map +1 -1
  58. package/dist/charts/scales.js +14 -3
  59. package/dist/charts/sparkline.module.css +10 -11
  60. package/dist/charts/sparkline.module.css.d.ts +1 -2
  61. package/dist/charts/state.d.ts +2 -0
  62. package/dist/charts/state.d.ts.map +1 -1
  63. package/dist/charts/state.js +2 -1
  64. package/dist/charts/types.d.ts +14 -5
  65. package/dist/charts/types.d.ts.map +1 -1
  66. package/dist/cli/doctor-upgrade.d.ts +1 -0
  67. package/dist/cli/doctor-upgrade.d.ts.map +1 -1
  68. package/dist/cli/doctor-upgrade.js +1 -0
  69. package/dist/cli/init.d.ts +2 -0
  70. package/dist/cli/init.d.ts.map +1 -1
  71. package/dist/cli/init.js +68 -4
  72. package/dist/cli/shot/capture.d.ts +21 -2
  73. package/dist/cli/shot/capture.d.ts.map +1 -1
  74. package/dist/cli/shot/capture.js +194 -32
  75. package/dist/cli/shot/detect.d.ts.map +1 -1
  76. package/dist/cli/shot/detect.js +14 -1
  77. package/dist/cli/shot/playwright.d.ts +5 -2
  78. package/dist/cli/shot/playwright.d.ts.map +1 -1
  79. package/dist/cli/shot/types.d.ts +2 -0
  80. package/dist/cli/shot/types.d.ts.map +1 -1
  81. package/dist/cli/shot/types.js +2 -0
  82. package/dist/controls/controls.module.css +11 -1
  83. package/dist/controls/filter-pill.d.ts.map +1 -1
  84. package/dist/controls/filter-pill.js +1 -0
  85. package/dist/controls/sync-button.d.ts.map +1 -1
  86. package/dist/controls/sync-button.js +22 -3
  87. package/dist/controls/sync-button.module.css +34 -2
  88. package/dist/controls/sync-button.module.css.d.ts +1 -0
  89. package/dist/dashboard/bar-list.d.ts.map +1 -1
  90. package/dist/dashboard/bar-list.js +7 -8
  91. package/dist/dashboard/bar-list.module.css +53 -0
  92. package/dist/dashboard/bar-list.module.css.d.ts +1 -0
  93. package/dist/dashboard/index.d.ts +1 -0
  94. package/dist/dashboard/index.d.ts.map +1 -1
  95. package/dist/dashboard/index.js +2 -0
  96. package/dist/dashboard/meter-model.d.ts +77 -3
  97. package/dist/dashboard/meter-model.d.ts.map +1 -1
  98. package/dist/dashboard/meter-model.js +88 -15
  99. package/dist/dashboard/meter-parts.d.ts +8 -0
  100. package/dist/dashboard/meter-parts.d.ts.map +1 -1
  101. package/dist/dashboard/meter-parts.js +238 -71
  102. package/dist/dashboard/meter.d.ts +43 -60
  103. package/dist/dashboard/meter.d.ts.map +1 -1
  104. package/dist/dashboard/meter.js +20 -3
  105. package/dist/dashboard/meter.module.css +61 -0
  106. package/dist/dashboard/meter.module.css.d.ts +5 -0
  107. package/dist/dashboard/page-summary.d.ts +20 -0
  108. package/dist/dashboard/page-summary.d.ts.map +1 -0
  109. package/dist/dashboard/page-summary.js +28 -0
  110. package/dist/dashboard/page-summary.module.css +89 -0
  111. package/dist/dashboard/page-summary.module.css.d.ts +15 -0
  112. package/dist/dashboard/section.d.ts +25 -2
  113. package/dist/dashboard/section.d.ts.map +1 -1
  114. package/dist/dashboard/section.js +10 -5
  115. package/dist/dashboard/section.module.css +23 -0
  116. package/dist/dashboard/section.module.css.d.ts +1 -0
  117. package/dist/dashboard/stat-card-parts.d.ts.map +1 -1
  118. package/dist/dashboard/stat-card-parts.js +1 -1
  119. package/dist/dashboard/stat-card.d.ts +4 -2
  120. package/dist/dashboard/stat-card.d.ts.map +1 -1
  121. package/dist/dashboard/stat-card.js +7 -5
  122. package/dist/dashboard/stat-card.module.css +17 -0
  123. package/dist/dashboard/stat-strip.d.ts +7 -1
  124. package/dist/dashboard/stat-strip.d.ts.map +1 -1
  125. package/dist/dashboard/stat-strip.js +74 -46
  126. package/dist/dashboard/stat-strip.module.css +67 -20
  127. package/dist/dashboard/stat-strip.module.css.d.ts +4 -0
  128. package/dist/dashboard/visual-slot.d.ts +7 -1
  129. package/dist/dashboard/visual-slot.d.ts.map +1 -1
  130. package/dist/dashboard/visual-slot.js +3 -1
  131. package/dist/guard/vx-names.d.ts.map +1 -1
  132. package/dist/guard/vx-names.js +2 -0
  133. package/dist/index.d.ts +1 -1
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +3 -1
  136. package/dist/styles.css +34 -2
  137. package/dist/theme/chrome-vars.d.ts +20 -5
  138. package/dist/theme/chrome-vars.d.ts.map +1 -1
  139. package/dist/theme/chrome-vars.js +46 -3
  140. package/dist/theme/controls.module.css +23 -0
  141. package/dist/theme/controls.module.css.d.ts +1 -0
  142. package/dist/theme/index.d.ts.map +1 -1
  143. package/dist/theme/index.js +8 -20
  144. package/dist/tokens/core.d.ts +2 -1
  145. package/dist/tokens/core.d.ts.map +1 -1
  146. package/dist/tokens/core.js +6 -1
  147. package/dist/tokens/derive.d.ts +3 -1
  148. package/dist/tokens/derive.d.ts.map +1 -1
  149. package/dist/tokens/derive.js +16 -1
  150. package/dist/tokens/palette.d.ts +4 -0
  151. package/dist/tokens/palette.d.ts.map +1 -1
  152. package/dist/tokens/palette.js +4 -0
  153. package/dist/tokens/status-text.d.ts.map +1 -1
  154. package/dist/tokens/status-text.js +3 -1
  155. package/llms.txt +38 -20
  156. package/package.json +1 -1
  157. package/src/charts/BandStrip.tsx +33 -3
  158. package/src/charts/Bars.tsx +6 -0
  159. package/src/charts/CartesianChart.tsx +16 -3
  160. package/src/charts/ChartCard.tsx +34 -6
  161. package/src/charts/DualPanel.tsx +3 -6
  162. package/src/charts/Heatmap.tsx +54 -5
  163. package/src/charts/Lines.tsx +56 -10
  164. package/src/charts/MirroredBars.tsx +3 -5
  165. package/src/charts/Sparkline.tsx +50 -13
  166. package/src/charts/StackedArea.tsx +14 -4
  167. package/src/charts/band-fold.ts +31 -1
  168. package/src/charts/chart-box.module.css +19 -0
  169. package/src/charts/chart-card.module.css +25 -0
  170. package/src/charts/chart-legend.module.css +7 -0
  171. package/src/charts/compile.ts +210 -85
  172. package/src/charts/labels.ts +48 -14
  173. package/src/charts/legend.tsx +10 -20
  174. package/src/charts/marks.ts +1 -1
  175. package/src/charts/panel.tsx +1 -16
  176. package/src/charts/ref-label.ts +104 -0
  177. package/src/charts/scales.ts +22 -2
  178. package/src/charts/sparkline.module.css +10 -11
  179. package/src/charts/sparkline.module.css.d.ts +1 -2
  180. package/src/charts/state.tsx +3 -1
  181. package/src/charts/types.ts +14 -5
  182. package/src/cli/doctor-upgrade.ts +1 -1
  183. package/src/cli/init.ts +100 -3
  184. package/src/cli/shot/capture.ts +251 -32
  185. package/src/cli/shot/detect.ts +18 -1
  186. package/src/cli/shot/playwright.ts +2 -2
  187. package/src/cli/shot/types.ts +3 -0
  188. package/src/controls/controls.module.css +11 -1
  189. package/src/controls/filter-pill.tsx +2 -0
  190. package/src/controls/sync-button.module.css +34 -2
  191. package/src/controls/sync-button.module.css.d.ts +1 -0
  192. package/src/controls/sync-button.tsx +40 -4
  193. package/src/dashboard/bar-list.module.css +53 -0
  194. package/src/dashboard/bar-list.module.css.d.ts +1 -0
  195. package/src/dashboard/bar-list.tsx +78 -69
  196. package/src/dashboard/index.ts +1 -0
  197. package/src/dashboard/meter-model.ts +186 -20
  198. package/src/dashboard/meter-parts.tsx +285 -64
  199. package/src/dashboard/meter.module.css +61 -0
  200. package/src/dashboard/meter.module.css.d.ts +5 -0
  201. package/src/dashboard/meter.tsx +60 -10
  202. package/src/dashboard/page-summary.module.css +89 -0
  203. package/src/dashboard/page-summary.module.css.d.ts +15 -0
  204. package/src/dashboard/page-summary.tsx +95 -0
  205. package/src/dashboard/section.module.css +23 -0
  206. package/src/dashboard/section.module.css.d.ts +1 -0
  207. package/src/dashboard/section.tsx +59 -11
  208. package/src/dashboard/stat-card-parts.tsx +5 -1
  209. package/src/dashboard/stat-card.module.css +17 -0
  210. package/src/dashboard/stat-card.tsx +12 -6
  211. package/src/dashboard/stat-strip.module.css +67 -20
  212. package/src/dashboard/stat-strip.module.css.d.ts +4 -0
  213. package/src/dashboard/stat-strip.tsx +118 -72
  214. package/src/dashboard/visual-slot.ts +12 -3
  215. package/src/guard/vx-names.ts +2 -0
  216. package/src/index.ts +2 -0
  217. package/src/styles.css +34 -2
  218. package/src/theme/__snapshots__/plain-theme.test.ts.snap +186 -60
  219. package/src/theme/chrome-vars.ts +77 -8
  220. package/src/theme/controls.module.css +23 -0
  221. package/src/theme/controls.module.css.d.ts +1 -0
  222. package/src/theme/index.ts +12 -25
  223. package/src/tokens/core.ts +4 -1
  224. package/src/tokens/derive.ts +32 -3
  225. package/src/tokens/palette.ts +4 -0
  226. package/src/tokens/status-text.ts +2 -0
@@ -8,7 +8,7 @@ import { StatusDot } from "../theme/status-dot.js";
8
8
  import { VX } from "../tokens/index.js";
9
9
  import { InfoGlyph } from "./widget-header.js";
10
10
  import classes from "./stat-strip.module.css";
11
- import { VisualSlotContext } from "./visual-slot.js";
11
+ import { HOSTED, VisualSlotContext } from "./visual-slot.js";
12
12
  const EMPTY = "\u2014";
13
13
  function CellState({ state }) {
14
14
  if (state.kind === "empty") {
@@ -27,58 +27,86 @@ function CellState({ state }) {
27
27
  state.onRetry !== void 0 && /* @__PURE__ */ jsx(RetryButton, { onClick: state.onRetry, retrying: state.retrying ?? false })
28
28
  ] });
29
29
  }
30
+ function lastTrackOf(cell, state) {
31
+ if (state !== void 0) return state.kind === "empty" && state.reason !== void 0 ? 4 : 2;
32
+ if (cell.rows !== void 0)
33
+ return cell.footer !== void 0 ? 6 : cell.visual !== void 0 ? 5 : 4;
34
+ if (cell.visual !== void 0) return 4;
35
+ return cell.footer !== void 0 ? 3 : 2;
36
+ }
30
37
  function StripCell({ cell }) {
31
38
  const captionId = useId();
32
39
  const { rows, loading } = cell;
33
40
  const state = loading ? void 0 : cell.state;
34
41
  const hasHero = cell.value !== void 0 || rows === void 0;
35
42
  const ownFooter = cell.visual !== void 0 && rows === void 0;
36
- const footerEl = cell.footer !== void 0 && /* @__PURE__ */ jsx("div", { className: classes.footer, "data-strip-footer": true, children: cell.footer });
37
- return /* @__PURE__ */ jsxs(
38
- "article",
39
- {
40
- className: classes.cell,
41
- "data-strip-cell": cell.key,
42
- "data-shot": `strip-${cell.key}`,
43
- "aria-labelledby": captionId,
44
- ...state === void 0 && cell.visual !== void 0 && { "data-strip-has-visual": "" },
45
- ...state === void 0 && rows !== void 0 && { "data-strip-has-rows": "" },
46
- ...cell.stale && { "data-stale": "true" },
47
- children: [
48
- /* @__PURE__ */ jsxs("div", { className: classes.captionLine, children: [
49
- /* @__PURE__ */ jsxs("span", { className: classes.lead, children: [
50
- /* @__PURE__ */ jsx("span", { className: classes.caption, id: captionId, title: cell.caption, "data-strip-caption": true, children: cell.caption }),
51
- cell.info !== void 0 && /* @__PURE__ */ jsx(InfoGlyph, { text: cell.info })
43
+ const heroFooter = hasHero && cell.visual === void 0 && rows === void 0;
44
+ const hostSlot = !hasHero ? null : cell.tone === void 0 ? HOSTED : { tone: cell.tone };
45
+ const lastTrack = lastTrackOf(cell, state);
46
+ const footerEl = cell.footer !== void 0 && /* @__PURE__ */ jsx("div", { className: cx(classes.footer, heroFooter && classes.heroFooter), "data-strip-footer": true, children: cell.footer });
47
+ const heroEl = loading ? /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonValue, radius: "sm" }) : /* @__PURE__ */ jsxs("div", { className: classes.valueRow, children: [
48
+ /* @__PURE__ */ jsx(
49
+ "span",
50
+ {
51
+ className: classes.value,
52
+ "data-strip-value": true,
53
+ style: cell.tone !== void 0 ? { color: VX.status[cell.tone] } : void 0,
54
+ children: cell.value ?? EMPTY
55
+ }
56
+ ),
57
+ cell.value !== void 0 && cell.value !== null && cell.unit !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.unit, children: cell.unit }),
58
+ cell.delta
59
+ ] });
60
+ return (
61
+ // The slot owns the dividers and stretches to the row; the article inside ends at its content.
62
+ /* @__PURE__ */ jsx("div", { className: classes.cell, "data-strip-slot": true, children: /* @__PURE__ */ jsxs(
63
+ "article",
64
+ {
65
+ className: classes.content,
66
+ style: { "--basalt-strip-span": lastTrack },
67
+ "data-strip-cell": cell.key,
68
+ "data-shot": `strip-${cell.key}`,
69
+ "aria-labelledby": captionId,
70
+ ...state === void 0 && cell.visual !== void 0 && { "data-strip-has-visual": "" },
71
+ ...state === void 0 && rows !== void 0 && { "data-strip-has-rows": "" },
72
+ ...cell.stale && { "data-stale": "true" },
73
+ children: [
74
+ /* @__PURE__ */ jsxs("div", { className: classes.captionLine, children: [
75
+ /* @__PURE__ */ jsxs("div", { className: classes.captionMain, children: [
76
+ /* @__PURE__ */ jsxs("span", { className: classes.lead, children: [
77
+ /* @__PURE__ */ jsx(
78
+ "span",
79
+ {
80
+ className: classes.caption,
81
+ id: captionId,
82
+ title: cell.caption,
83
+ "data-strip-caption": true,
84
+ children: cell.caption
85
+ }
86
+ ),
87
+ cell.info !== void 0 && /* @__PURE__ */ jsx(InfoGlyph, { text: cell.info })
88
+ ] }),
89
+ cell.qualifier !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.qualifier, children: cell.qualifier })
90
+ ] }),
91
+ cell.action !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.action, "data-strip-action": true, children: cell.action })
52
92
  ] }),
53
- cell.qualifier !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.qualifier, children: cell.qualifier })
54
- ] }),
55
- state !== void 0 && /* @__PURE__ */ jsx(CellState, { state }),
56
- state === void 0 && hasHero && (loading ? /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonValue, radius: "sm" }) : /* @__PURE__ */ jsxs("div", { className: classes.valueRow, children: [
57
- /* @__PURE__ */ jsx(
58
- "span",
59
- {
60
- className: classes.value,
61
- "data-strip-value": true,
62
- style: cell.tone !== void 0 ? { color: VX.status[cell.tone] } : void 0,
63
- children: cell.value ?? EMPTY
64
- }
65
- ),
66
- cell.value !== void 0 && cell.value !== null && cell.unit !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.unit, children: cell.unit }),
67
- cell.delta
68
- ] })),
69
- state === void 0 && cell.visual !== void 0 && /* @__PURE__ */ jsxs("div", { className: classes.visualStack, children: [
70
- /* @__PURE__ */ jsx("div", { className: classes.visual, "data-strip-visual": true, children: /* @__PURE__ */ jsx(VisualSlotContext.Provider, { value: hasHero, children: cell.visual }) }),
71
- ownFooter && footerEl
72
- ] }),
73
- state === void 0 && rows !== void 0 && (loading ? /* @__PURE__ */ jsx("div", { className: classes.rows, "aria-hidden": "true", children: rows.map((row) => /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonRow, radius: "sm" }, row.key)) }) : /* @__PURE__ */ jsx("ul", { className: classes.rows, "data-strip-rows": true, children: rows.map((row) => /* @__PURE__ */ jsxs("li", { className: classes.row, "data-strip-row": row.key, children: [
74
- /* @__PURE__ */ jsx("span", { className: classes.rowLabel, children: row.label }),
75
- /* @__PURE__ */ jsx("span", { className: classes.visual, children: row.visual }),
76
- /* @__PURE__ */ jsx("span", { className: classes.rowValue, children: row.value ?? EMPTY }),
77
- /* @__PURE__ */ jsx("span", { children: row.delta })
78
- ] }, row.key)) })),
79
- state === void 0 && !ownFooter && footerEl
80
- ]
81
- }
93
+ state !== void 0 && /* @__PURE__ */ jsx(CellState, { state }),
94
+ state === void 0 && hasHero && heroEl,
95
+ state === void 0 && heroFooter && footerEl,
96
+ state === void 0 && cell.visual !== void 0 && /* @__PURE__ */ jsxs("div", { className: classes.visualStack, children: [
97
+ /* @__PURE__ */ jsx("div", { className: classes.visual, "data-strip-visual": true, children: /* @__PURE__ */ jsx(VisualSlotContext.Provider, { value: hostSlot, children: cell.visual }) }),
98
+ ownFooter && footerEl
99
+ ] }),
100
+ state === void 0 && rows !== void 0 && (loading ? /* @__PURE__ */ jsx("div", { className: classes.rows, "aria-hidden": "true", children: rows.map((row) => /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonRow, radius: "sm" }, row.key)) }) : /* @__PURE__ */ jsx("ul", { className: classes.rows, "data-strip-rows": true, children: rows.map((row) => /* @__PURE__ */ jsxs("li", { className: classes.row, "data-strip-row": row.key, children: [
101
+ /* @__PURE__ */ jsx("span", { className: classes.rowLabel, children: row.label }),
102
+ /* @__PURE__ */ jsx("span", { className: classes.visual, children: row.visual }),
103
+ /* @__PURE__ */ jsx("span", { className: classes.rowValue, children: row.hideValue ? null : row.value ?? EMPTY }),
104
+ /* @__PURE__ */ jsx("span", { children: row.delta })
105
+ ] }, row.key)) })),
106
+ state === void 0 && !ownFooter && !heroFooter && footerEl
107
+ ]
108
+ }
109
+ ) })
82
110
  );
83
111
  }
84
112
  function StatStrip({ label, cells, footer, cols, className, style }) {
@@ -27,17 +27,33 @@
27
27
  margin: -1px 0 0 -1px;
28
28
  }
29
29
 
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. */
30
32
  .cell {
31
33
  display: grid;
32
- grid-row: span 5;
34
+ grid-row: span 6;
33
35
  grid-template-rows: subgrid;
34
36
  min-width: 0;
35
- padding: var(--vx-space-stack-md);
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. */
40
+ padding-block-end: var(--vx-space-stack-md);
36
41
  box-shadow:
37
42
  -1px 0 0 var(--vx-divider),
38
43
  0 -1px 0 var(--vx-divider);
39
44
  }
40
45
 
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. */
48
+ .content {
49
+ display: grid;
50
+ grid-row: 1 / span var(--basalt-strip-span, 6);
51
+ grid-template-rows: subgrid;
52
+ align-self: start;
53
+ min-width: 0;
54
+ padding: var(--vx-space-stack-md) var(--vx-space-stack-md) 0;
55
+ }
56
+
41
57
  /* Forced colors drop box-shadows, so the hairlines come back as CanvasText borders. Every cell takes
42
58
  * both, so they stay level with each other; `.clip` still hides the leading ones. */
43
59
  @media (forced-colors: active) {
@@ -47,22 +63,22 @@
47
63
  }
48
64
  }
49
65
 
50
- /* Cells align by PART. Every cell spans the same five tracks of `.cells` (caption, hero, visual,
51
- * rows, footer), so a row of cells shares one caption top and one value baseline, and a void opens
52
- * only where a sibling's same part is taller. A part a cell lacks collapses its track (the spacing
53
- * is a margin on the part, not a gap, so an empty track adds none). A cell without a visual keeps
54
- * its rows (and a footer without rows) in the visual track, directly under its hero: short cells
55
- * stay compact instead of stretching their footer to the row's bottom. A footer under a visual
56
- * rides in the visual track with it (`.visualStack`), so it hugs its own visual; only a rows
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
57
73
  * cell's footer uses the shared footer track. A hero-less cell (rows only) starts its rows in the
58
74
  * visual track, so the hero track above them is the one void, and only as tall as a sibling's
59
75
  * value. */
60
- .cell > * {
76
+ .content > * {
61
77
  grid-column: 1;
62
78
  min-width: 0;
63
79
  }
64
80
 
65
- .cell > :not(.captionLine) {
81
+ .content > :not(.captionLine) {
66
82
  margin-block-start: var(--vx-space-stack-sm);
67
83
  }
68
84
 
@@ -72,22 +88,24 @@
72
88
  grid-row: 2;
73
89
  }
74
90
 
75
- .cell > .visualStack,
76
- .cell > .reason,
77
- .cell > .rows,
78
- .cell > .footer {
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 {
79
94
  grid-row: 3;
80
95
  }
81
96
 
82
- .cell[data-strip-has-visual] > .rows {
97
+ .content > .visualStack,
98
+ .content > .reason,
99
+ .content > .rows {
83
100
  grid-row: 4;
84
101
  }
85
102
 
86
- .cell[data-strip-has-rows] > .footer {
103
+ .content[data-strip-has-visual] > .rows {
87
104
  grid-row: 5;
88
105
  }
89
106
 
90
- .cell > .footer {
107
+ .content > .footer:not(.heroFooter) {
108
+ grid-row: 6;
91
109
  align-self: start;
92
110
  }
93
111
 
@@ -110,6 +128,16 @@
110
128
  .captionLine {
111
129
  grid-row: 1;
112
130
  display: flex;
131
+ flex-wrap: nowrap;
132
+ align-items: center;
133
+ column-gap: var(--vx-space-control-gap);
134
+ min-width: 0;
135
+ }
136
+
137
+ /* Caption + qualifier wrap among themselves; the `action` beside them never joins the wrap. */
138
+ .captionMain {
139
+ display: flex;
140
+ flex: 1 1 0;
113
141
  flex-wrap: wrap;
114
142
  align-items: center;
115
143
  column-gap: var(--vx-space-control-gap);
@@ -147,6 +175,14 @@
147
175
  overflow-wrap: anywhere;
148
176
  }
149
177
 
178
+ /* A control at the end of the caption line: it keeps its size, the caption truncates first. */
179
+ .action {
180
+ display: inline-flex;
181
+ flex: none;
182
+ align-items: center;
183
+ margin-inline-start: auto;
184
+ }
185
+
150
186
  .valueRow {
151
187
  display: flex;
152
188
  flex-wrap: wrap;
@@ -180,7 +216,7 @@
180
216
  height: calc(var(--vx-text-kpi) * 1.25);
181
217
  }
182
218
 
183
- .cell[data-stale] {
219
+ .content[data-stale] {
184
220
  /* The package's one dimmed-state value (controls.module.css, panel-row.module.css). */
185
221
  opacity: 0.55;
186
222
  }
@@ -201,7 +237,7 @@
201
237
  /* A Sparkline's hover readout takes this line above its plot (`charts/sparkline.module.css`). The
202
238
  * cell's own stack gap already sits above it; the slot reserves the rest, so the chip never covers
203
239
  * the value. */
204
- .cell {
240
+ .content {
205
241
  --basalt-spark-readout-h: 1.125rem;
206
242
  }
207
243
 
@@ -282,6 +318,17 @@
282
318
  margin-left: -1px;
283
319
  }
284
320
 
321
+ /* A meter's start and end captions read as one phrase (name, then value) however wide the track. */
322
+ .footerCell [data-meter-captions] {
323
+ justify-content: flex-start;
324
+ column-gap: var(--vx-space-stack-md);
325
+ }
326
+
327
+ .footerCell [data-meter-captions] > * {
328
+ margin-inline-start: 0;
329
+ text-align: start;
330
+ }
331
+
285
332
  .footerCell {
286
333
  flex: 1 1 14rem;
287
334
  min-width: 0;
@@ -7,11 +7,15 @@ declare const classes: {
7
7
  readonly clip: string
8
8
  readonly cells: string
9
9
  readonly cell: string
10
+ readonly content: string
11
+ readonly action: string
10
12
  readonly captionLine: string
13
+ readonly captionMain: string
11
14
  readonly lead: string
12
15
  readonly caption: string
13
16
  readonly qualifier: string
14
17
  readonly valueRow: string
18
+ readonly heroFooter: string
15
19
  readonly value: string
16
20
  readonly unit: string
17
21
  readonly skeletonValue: string
@@ -1,2 +1,8 @@
1
- export declare const VisualSlotContext: import("react").Context<boolean>;
1
+ import type { Tone } from '../common/props.js';
2
+ export interface VisualSlot {
3
+ readonly tone?: Tone;
4
+ }
5
+ /** A host with no verdict of its own: one shared object, so a provider never re-renders its readers. */
6
+ export declare const HOSTED: VisualSlot;
7
+ export declare const VisualSlotContext: import("react").Context<VisualSlot | null>;
2
8
  //# sourceMappingURL=visual-slot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"visual-slot.d.ts","sourceRoot":"","sources":["../../src/dashboard/visual-slot.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB,kCAAuB,CAAA"}
1
+ {"version":3,"file":"visual-slot.d.ts","sourceRoot":"","sources":["../../src/dashboard/visual-slot.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CACrB;AAED,wGAAwG;AACxG,eAAO,MAAM,MAAM,EAAE,UAAe,CAAA;AAEpC,eAAO,MAAM,iBAAiB,4CAAyC,CAAA"}
@@ -1,5 +1,7 @@
1
1
  import { createContext } from "react";
2
- const VisualSlotContext = createContext(false);
2
+ const HOSTED = {};
3
+ const VisualSlotContext = createContext(null);
3
4
  export {
5
+ HOSTED,
4
6
  VisualSlotContext
5
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"vx-names.d.ts","sourceRoot":"","sources":["../../src/guard/vx-names.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EA8N5C,CAAA"}
1
+ {"version":3,"file":"vx-names.d.ts","sourceRoot":"","sources":["../../src/guard/vx-names.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAgO5C,CAAA"}
@@ -200,6 +200,8 @@ const BASALT_VX_NAMES = [
200
200
  "--vx-surface-overlay",
201
201
  "--vx-surface-panel",
202
202
  "--vx-surface-panel-hover",
203
+ "--vx-surface-row-hover",
204
+ "--vx-surface-row-selected",
203
205
  "--vx-surface-subtle",
204
206
  "--vx-text-display",
205
207
  "--vx-text-h1",
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ export { ThemeToggle } from './theme/theme-toggle.js';
15
15
  export { StatusDot, type StatusDotProps } from './theme/status-dot.js';
16
16
  export { StatusVerdict, type StatusVerdictProps } from './theme/status-verdict.js';
17
17
  export { BasaltShell, PageBar, PageAside, useSizeClass, PageTitle, type ShellBaseProps, type SidebarBlock, type SettingsMenuItem, } from './shell/index.js';
18
- export { WidgetHeader, DeltaBadge, Section, StatCard, type StatCardBreakdownRow, type StatCardSparklineSize, StatGroup, type StatStripCell, type StatStripRow, EmptyState, SettingsSection, SettingsRow, DangerZone, Meter, type MeterProps, type MeterSegment, type MeterTick, type MeterZone, BarList, type BarListProps, } from './dashboard/index.js';
18
+ export { WidgetHeader, DeltaBadge, Section, StatCard, type StatCardBreakdownRow, type StatCardSparklineSize, StatGroup, type StatStripCell, type StatStripRow, EmptyState, SettingsSection, SettingsRow, DangerZone, Meter, type MeterProps, type MeterSegment, type MeterTick, type MeterZone, BarList, type BarListProps, PageSummary, type PageSummaryProps, } from './dashboard/index.js';
19
19
  export { unwrap } from './unwrap.js';
20
20
  export type { BasaltRegister, SeriesKey } from './register.js';
21
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACrE,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACnG,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,EACV,YAAY,EACZ,KAAK,SAAS,GACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAA;AACtE,OAAO,EAAE,iBAAiB,EA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Y,EACZ,KAAK,SAAS,GACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC/E,OAAO,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,YAAY,EACZ,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,GACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,YAAY,EACZ,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,UAAU,EACV,eAAe,EACf,WAAW,EACX,UAAU,EACV,KAAK,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,OAAO,EACP,KAAK,YAAY,EACjB,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAMjC,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -33,7 +33,8 @@ import {
33
33
  SettingsRow,
34
34
  DangerZone,
35
35
  Meter,
36
- BarList
36
+ BarList,
37
+ PageSummary
37
38
  } from "./dashboard/index.js";
38
39
  import { unwrap } from "./unwrap.js";
39
40
  export {
@@ -46,6 +47,7 @@ export {
46
47
  Meter,
47
48
  PageAside,
48
49
  PageBar,
50
+ PageSummary,
49
51
  PageTitle,
50
52
  Section,
51
53
  SettingsRow,
package/dist/styles.css CHANGED
@@ -67,6 +67,32 @@
67
67
  text-size-adjust: 100%;
68
68
  }
69
69
 
70
+ /* A slashed zero belongs to data text only. Hubot Sans (the heading face) draws one, and it leaked
71
+ into every title that borrows the face (`2026`, `90 days`). `zero` is OFF by default and nothing
72
+ in the package turns it on, so this is the off state at the root: it inherits into every head-face
73
+ surface whether a heading element, a Mantine title or a CSS-module class that only sets the
74
+ family, and is a no-op on the mono stack. */
75
+ :root {
76
+ font-feature-settings: 'zero' 0;
77
+ }
78
+
79
+ /* Mono data text drops its ligatures: `<>` in a facts line is two characters, not a diamond. Reaches
80
+ the mono stack by element (code, kbd, samp, pre), by contract (`data-numeric`, `data-monospace`),
81
+ by Mantine's `ff="monospace"` inline style, and by the stack's own var in an inline style. Body
82
+ sans keeps its ligatures. A CSS-module class that only sets the mono family is out of reach. */
83
+ code,
84
+ kbd,
85
+ samp,
86
+ pre,
87
+ [data-numeric],
88
+ [data-monospace],
89
+ [style*='font-family-monospace'],
90
+ [style*='basalt-font-mono'],
91
+ .mantine-Code-root,
92
+ .mantine-Kbd-root {
93
+ font-variant-ligatures: none;
94
+ }
95
+
70
96
  /* Removes the grey tap-highlight flash on iOS/Android for anything actually tappable. Scoped to
71
97
  the interactive roles/tags rather than `*` (argo's own rule): a highlight on non-interactive
72
98
  content is not the flash this exists to remove, and `*` would also numb a consumer's own
@@ -144,6 +170,14 @@
144
170
  outline-color: var(--vx-accent);
145
171
  }
146
172
 
173
+ /* The chart host is a focusable element Mantine does not own, so no `mantine-focus-*` class reaches
174
+ it and the UA ring paints instead: a white double ring in dark (argo strength strip and
175
+ diagnostics at dark 390). There is no media or pointer branch behind it. */
176
+ .basalt-chart:focus-visible {
177
+ outline: 2px solid var(--vx-accent);
178
+ outline-offset: calc(0.125rem * var(--mantine-scale));
179
+ }
180
+
147
181
  /* Hubot Sans is a condensed display face — the spec pins it at 88% font-stretch everywhere it
148
182
  lands (headings + the Mantine Title component). Read from the knob declared above rather than
149
183
  hardcoded here, so a consumer retunes it in one declaration instead of fighting these bare
@@ -156,8 +190,6 @@
156
190
  h6,
157
191
  .mantine-Title-root {
158
192
  font-stretch: var(--basalt-font-head-stretch, 88%);
159
- /* Hubot Sans draws a slashed zero by default; a heading numeral is a figure, not code. */
160
- font-feature-settings: 'zero' 0;
161
193
  font-variant-numeric: lining-nums;
162
194
  }
163
195
 
@@ -77,11 +77,13 @@ export declare function inkVars(props: {
77
77
  variant?: string | undefined;
78
78
  }): InkVars;
79
79
  /**
80
- * Tabs vars: the on-color re-point plus the active underline in ink (SPEC § 6.12). Only the
81
- * underline `default` variant takes ink (`pills` fills with the colour); an explicit `color=` opts
82
- * out. The return type lists `--tabs-text-color` and `--tabs-radius` because Mantine's
83
- * `TabsCssVariables` type declares only `--tabs-color` / `--tabs-radius` while Tabs' OWN
84
- * varsResolver writes `--tabs-text-color` (an upstream type gap).
80
+ * Tabs vars: the selected tab reads by ink and weight, never the accent (SPEC § 6.12; DESIGN-CORE
81
+ * § Accent discipline). `default` and `outline` paint their active underline/border from
82
+ * `--tabs-color`, so that is ink; `pills` fills the tab with it, so the fill is an ink-mixed panel
83
+ * and the label (`--tabs-text-color`) is ink, not the on-accent white. An explicit `color=` opts out
84
+ * of all three and keeps the on-color text var. The return type lists `--tabs-text-color` and
85
+ * `--tabs-radius` because Mantine's `TabsCssVariables` type declares only `--tabs-color` /
86
+ * `--tabs-radius` while Tabs' OWN varsResolver writes `--tabs-text-color` (an upstream type gap).
85
87
  */
86
88
  export declare function tabsVars(theme: MantineTheme, props: {
87
89
  color?: string | null | undefined;
@@ -90,5 +92,18 @@ export declare function tabsVars(theme: MantineTheme, props: {
90
92
  }): {
91
93
  root: Record<'--tabs-color' | '--tabs-radius' | '--tabs-text-color', string | undefined>;
92
94
  };
95
+ /**
96
+ * Badge vars (SPEC § 6.10): the status chip is the neutral surface with an ink word, and a named
97
+ * colour is a leading status dot, not a tinted slab (W36 r3/r6 "tinted status Badges"). Only the
98
+ * `light` variant (the theme default); `filled`, `outline`, `dot` and `default` keep their meaning —
99
+ * a `filled` accent count is the one tinted-chrome case that stays. Any colour the caller gives (theme name, indexed shade, hex, var) becomes the dot; `gray` is the
100
+ * no-signal chip. A `leftSection` glyph replaces the dot.
101
+ */
102
+ export declare function badgeVars(theme: MantineTheme, props: {
103
+ color?: string | null | undefined;
104
+ variant?: string | undefined;
105
+ }): {
106
+ root: Record<'--badge-bg' | '--badge-color' | '--badge-dot' | '--badge-dot-content' | '--badge-dot-cols', string | undefined>;
107
+ };
93
108
  export {};
94
109
  //# sourceMappingURL=chrome-vars.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chrome-vars.d.ts","sourceRoot":"","sources":["../../src/theme/chrome-vars.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAIjG;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,GAC/E,MAAM,GAAG,SAAS,CAGpB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE1E;AAED,KAAK,OAAO,GAAG;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAA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AK,OAAO,GAAG;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAgBD;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,GAAG,OAAO,CAKV;AAKD;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE;IACL,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACnC,GACA;IAAE,IAAI,EAAE,MAAM,CAAC,cAAc,GAAG,eAAe,GAAG,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CAAE,CAkB9F;AAiBD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GACzE;IACD,IAAI,EAAE,MAAM,CACV,YAAY,GAAG,eAAe,GAAG,aAAa,GAAG,qBAAqB,GAAG,kBAAkB,EAC3F,MAAM,GAAG,SAAS,CACnB,CAAA;CACF,CAuBA"}
@@ -27,17 +27,60 @@ function inkVars(props) {
27
27
  if (!Object.hasOwn(INK_BY_VARIANT, variant)) return {};
28
28
  return INK_BY_VARIANT[variant] ?? {};
29
29
  }
30
+ const PILL_FILL = "color-mix(in srgb, var(--vx-ink) 12%, var(--vx-surface-panel))";
30
31
  function tabsVars(theme, props) {
31
- const underline = !hasExplicitColor(props.color) && (props.variant ?? "default") === "default";
32
+ if (hasExplicitColor(props.color)) {
33
+ return {
34
+ root: {
35
+ "--tabs-text-color": onColorFor(theme, props),
36
+ "--tabs-color": void 0,
37
+ "--tabs-radius": void 0
38
+ }
39
+ };
40
+ }
41
+ const pills = props.variant === "pills";
32
42
  return {
33
43
  root: {
34
- "--tabs-text-color": onColorFor(theme, props),
35
- "--tabs-color": underline ? "var(--vx-ink)" : void 0,
44
+ "--tabs-text-color": pills ? INK : onColorFor(theme, props),
45
+ "--tabs-color": pills ? PILL_FILL : INK,
36
46
  "--tabs-radius": void 0
37
47
  }
38
48
  };
39
49
  }
50
+ function dotColor(theme, color) {
51
+ if (Object.hasOwn(theme.colors, color)) return `var(--mantine-color-${color}-filled)`;
52
+ const [name, shade] = color.split(".");
53
+ if (name !== void 0 && shade !== void 0 && /^\d$/.test(shade) && Object.hasOwn(theme.colors, name)) {
54
+ return `var(--mantine-color-${name}-${shade})`;
55
+ }
56
+ return color;
57
+ }
58
+ function badgeVars(theme, props) {
59
+ const none = {
60
+ "--badge-bg": void 0,
61
+ "--badge-color": void 0,
62
+ "--badge-dot": void 0,
63
+ "--badge-dot-content": void 0,
64
+ "--badge-dot-cols": void 0
65
+ };
66
+ if ((props.variant ?? "light") !== "light") return { root: none };
67
+ const name = props.color ?? "gray";
68
+ const dot = name === "gray" ? void 0 : dotColor(theme, name);
69
+ return {
70
+ root: {
71
+ ...none,
72
+ "--badge-bg": SUBTLE,
73
+ "--badge-color": INK,
74
+ ...dot !== void 0 && {
75
+ "--badge-dot": dot,
76
+ "--badge-dot-content": "''",
77
+ "--badge-dot-cols": "auto 1fr"
78
+ }
79
+ }
80
+ };
81
+ }
40
82
  export {
83
+ badgeVars,
41
84
  hasExplicitColor,
42
85
  inkVars,
43
86
  onColor,
@@ -200,6 +200,11 @@ html[data-mantine-color-scheme] .inputWrapper[data-variant='default']:not([data-
200
200
  .actionIconRoot:disabled:not([data-loading]),
201
201
  .actionIconRoot[data-disabled]:not([data-loading]) {
202
202
  --ctrl-depth: 0 0 transparent;
203
+
204
+ /* One surface in both schemes. Mantine's disabled fill is a gray step that is the PANEL itself in
205
+ * dark, so a disabled Button there read as the subtle variant with dimmer text; an ink-mixed panel
206
+ * is visible on either page, and the state is told apart by more than ink. */
207
+ background: color-mix(in srgb, var(--vx-ink) 8%, var(--vx-surface-panel));
203
208
  }
204
209
 
205
210
  /*
@@ -318,6 +323,24 @@ html .tableRoot tbody tr:last-of-type {
318
323
  border-bottom: none;
319
324
  }
320
325
 
326
+ /*
327
+ * Badge status dot: a coloured `light` Badge is the neutral surface + ink word with a leading dot in the
328
+ * status colour (`badgeVars` writes the `--badge-dot*` vars; nothing here without them). The dot is a
329
+ * grid item, so the root takes two columns while it is shown. A section (left or right) replaces it.
330
+ */
331
+ .badgeRoot[data-variant='light']:not([data-with-left-section], [data-with-right-section]) {
332
+ grid-template-columns: var(--badge-dot-cols, none);
333
+ column-gap: calc(0.25rem * var(--mantine-scale));
334
+ }
335
+
336
+ .badgeRoot[data-variant='light']:not([data-with-left-section], [data-with-right-section])::before {
337
+ content: var(--badge-dot-content, none);
338
+ width: calc(0.375rem * var(--mantine-scale));
339
+ height: calc(0.375rem * var(--mantine-scale));
340
+ border-radius: 50%;
341
+ background: var(--badge-dot);
342
+ }
343
+
321
344
  /*
322
345
  * Badge leading glyph (`leftSection`): the state encoded by shape. 12px on a 20px chip, 4px gap
323
346
  * (Mantine's own section margin is spacing.xs / 2 = 4), centred on the label.
@@ -13,6 +13,7 @@ declare const classes: {
13
13
  readonly accordionItem: string
14
14
  readonly tabsRoot: string
15
15
  readonly tableRoot: string
16
+ readonly badgeRoot: string
16
17
  readonly badgeSection: string
17
18
  }
18
19
  export default classes
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EA0CV,o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