basalt-ui 2.27.2 → 2.29.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 (343) hide show
  1. package/CHANGELOG.md +466 -307
  2. package/MIGRATING.md +358 -12
  3. package/agent/rules/basalt-batteries.md +1 -1
  4. package/agent/rules/basalt-mantine.md +1 -1
  5. package/agent/rules/basalt-tokens.md +2 -2
  6. package/agent/skills/basalt-app/SKILL.md +3 -3
  7. package/agent/skills/basalt-charts/SKILL.md +1 -1
  8. package/agent/skills/basalt-design/SKILL.md +12 -6
  9. package/agent/skills/basalt-design/references/catalogue.md +42 -36
  10. package/agent/skills/basalt-design/references/recipes.md +47 -0
  11. package/agent/skills/basalt-design/references/states.md +1 -1
  12. package/configs/oxlint-basalt.json +2 -1
  13. package/configs/oxlint-plugin.js +112 -3
  14. package/configs/oxlint-plugin.test.ts +99 -4
  15. package/configs/oxlint.json +1 -0
  16. package/dist/agent/chat/thread-message.d.ts +1 -160
  17. package/dist/agent/chat/thread-message.d.ts.map +1 -1
  18. package/dist/agent/chat/thread-message.js +7 -162
  19. package/dist/agent/chat/virtualize.d.ts +5 -5
  20. package/dist/charts/ChartCard.d.ts +14 -7
  21. package/dist/charts/ChartCard.d.ts.map +1 -1
  22. package/dist/charts/ChartCard.js +112 -23
  23. package/dist/charts/Lines.d.ts.map +1 -1
  24. package/dist/charts/Lines.js +11 -4
  25. package/dist/charts/Sparkline.d.ts +14 -2
  26. package/dist/charts/Sparkline.d.ts.map +1 -1
  27. package/dist/charts/Sparkline.js +155 -44
  28. package/dist/charts/chart-box.module.css +59 -2
  29. package/dist/charts/chart-box.module.css.d.ts +5 -0
  30. package/dist/charts/chart-card.module.css +28 -17
  31. package/dist/charts/chart-card.module.css.d.ts +3 -0
  32. package/dist/charts/compile.d.ts +1 -1
  33. package/dist/charts/compile.d.ts.map +1 -1
  34. package/dist/charts/compile.js +38 -27
  35. package/dist/charts/labels.d.ts +13 -3
  36. package/dist/charts/labels.d.ts.map +1 -1
  37. package/dist/charts/labels.js +131 -20
  38. package/dist/charts/legend.d.ts.map +1 -1
  39. package/dist/charts/legend.js +1 -1
  40. package/dist/charts/ref-label.d.ts +37 -8
  41. package/dist/charts/ref-label.d.ts.map +1 -1
  42. package/dist/charts/ref-label.js +55 -10
  43. package/dist/charts/sparkline.module.css +50 -0
  44. package/dist/charts/sparkline.module.css.d.ts +3 -0
  45. package/dist/charts/state.d.ts +4 -4
  46. package/dist/charts/state.d.ts.map +1 -1
  47. package/dist/charts/state.js +23 -5
  48. package/dist/cli/doctor-upgrade.d.ts +11 -0
  49. package/dist/cli/doctor-upgrade.d.ts.map +1 -1
  50. package/dist/cli/doctor-upgrade.js +54 -0
  51. package/dist/cli/doctor.d.ts.map +1 -1
  52. package/dist/cli/doctor.js +32 -0
  53. package/dist/cli/help.d.ts.map +1 -1
  54. package/dist/cli/help.js +8 -3
  55. package/dist/cli/index.d.ts +13 -13
  56. package/dist/cli/index.d.ts.map +1 -1
  57. package/dist/cli/index.js +36 -2
  58. package/dist/cli/init.d.ts +6 -0
  59. package/dist/cli/init.d.ts.map +1 -1
  60. package/dist/cli/init.js +118 -27
  61. package/dist/cli/router-wiring.d.ts +3 -0
  62. package/dist/cli/router-wiring.d.ts.map +1 -1
  63. package/dist/cli/router-wiring.js +2 -0
  64. package/dist/cli/shot/capture.d.ts +34 -2
  65. package/dist/cli/shot/capture.d.ts.map +1 -1
  66. package/dist/cli/shot/capture.js +95 -12
  67. package/dist/cli/shot/detect.d.ts +4 -1
  68. package/dist/cli/shot/detect.d.ts.map +1 -1
  69. package/dist/cli/shot/detect.js +38 -16
  70. package/dist/cli/shot/index.d.ts.map +1 -1
  71. package/dist/cli/shot/index.js +9 -2
  72. package/dist/cli/shot/measure.d.ts.map +1 -1
  73. package/dist/cli/shot/measure.js +11 -2
  74. package/dist/cli/shot/types.d.ts +4 -1
  75. package/dist/cli/shot/types.d.ts.map +1 -1
  76. package/dist/cli/sync.d.ts.map +1 -1
  77. package/dist/cli/sync.js +10 -2
  78. package/dist/common/could-not-load.d.ts +13 -0
  79. package/dist/common/could-not-load.d.ts.map +1 -0
  80. package/dist/common/could-not-load.js +14 -0
  81. package/dist/common/empty-copy.d.ts +16 -0
  82. package/dist/common/empty-copy.d.ts.map +1 -0
  83. package/dist/common/empty-copy.js +9 -0
  84. package/dist/common/index.d.ts +1 -0
  85. package/dist/common/index.d.ts.map +1 -1
  86. package/dist/common/index.js +3 -0
  87. package/dist/common/props.d.ts +20 -0
  88. package/dist/common/props.d.ts.map +1 -1
  89. package/dist/common/props.js +13 -1
  90. package/dist/common/retry-button.module.css +7 -3
  91. package/dist/common/virtual-rows.d.ts +196 -0
  92. package/dist/common/virtual-rows.d.ts.map +1 -0
  93. package/dist/common/virtual-rows.js +290 -0
  94. package/dist/controls/controls.module.css +33 -1
  95. package/dist/controls/controls.module.css.d.ts +2 -0
  96. package/dist/controls/enum-filter.d.ts.map +1 -1
  97. package/dist/controls/enum-filter.js +8 -2
  98. package/dist/controls/filter-pill.d.ts +27 -3
  99. package/dist/controls/filter-pill.d.ts.map +1 -1
  100. package/dist/controls/filter-pill.js +15 -4
  101. package/dist/controls/form-layout.d.ts +9 -3
  102. package/dist/controls/form-layout.d.ts.map +1 -1
  103. package/dist/controls/form-layout.js +74 -12
  104. package/dist/controls/form-layout.module.css +112 -7
  105. package/dist/controls/form-layout.module.css.d.ts +1 -0
  106. package/dist/controls/multi-select-filter.d.ts +2 -2
  107. package/dist/controls/multi-select-filter.d.ts.map +1 -1
  108. package/dist/controls/multi-select-filter.js +12 -6
  109. package/dist/controls/range-filter.d.ts +1 -1
  110. package/dist/controls/range-filter.d.ts.map +1 -1
  111. package/dist/controls/range-filter.js +8 -2
  112. package/dist/dashboard/bar-list.d.ts +5 -5
  113. package/dist/dashboard/bar-list.d.ts.map +1 -1
  114. package/dist/dashboard/bar-list.js +15 -8
  115. package/dist/dashboard/bar-list.module.css +21 -5
  116. package/dist/dashboard/board-nav.d.ts +22 -0
  117. package/dist/dashboard/board-nav.d.ts.map +1 -0
  118. package/dist/dashboard/board-nav.js +49 -0
  119. package/dist/dashboard/board.d.ts +52 -0
  120. package/dist/dashboard/board.d.ts.map +1 -0
  121. package/dist/dashboard/board.js +247 -0
  122. package/dist/dashboard/board.module.css +179 -0
  123. package/dist/dashboard/board.module.css.d.ts +28 -0
  124. package/dist/dashboard/empty-state.d.ts +6 -6
  125. package/dist/dashboard/empty-state.d.ts.map +1 -1
  126. package/dist/dashboard/empty-state.js +17 -8
  127. package/dist/dashboard/event-list-model.d.ts +54 -0
  128. package/dist/dashboard/event-list-model.d.ts.map +1 -0
  129. package/dist/dashboard/event-list-model.js +76 -0
  130. package/dist/dashboard/event-list-rows.d.ts +23 -0
  131. package/dist/dashboard/event-list-rows.d.ts.map +1 -0
  132. package/dist/dashboard/event-list-rows.js +89 -0
  133. package/dist/dashboard/event-list-scroll.d.ts +55 -0
  134. package/dist/dashboard/event-list-scroll.d.ts.map +1 -0
  135. package/dist/dashboard/event-list-scroll.js +216 -0
  136. package/dist/dashboard/event-list-skeleton.d.ts +10 -0
  137. package/dist/dashboard/event-list-skeleton.d.ts.map +1 -0
  138. package/dist/dashboard/event-list-skeleton.js +34 -0
  139. package/dist/dashboard/event-list.d.ts +65 -0
  140. package/dist/dashboard/event-list.d.ts.map +1 -0
  141. package/dist/dashboard/event-list.js +208 -0
  142. package/dist/dashboard/event-list.module.css +336 -0
  143. package/dist/dashboard/event-list.module.css.d.ts +34 -0
  144. package/dist/dashboard/index.d.ts +2 -0
  145. package/dist/dashboard/index.d.ts.map +1 -1
  146. package/dist/dashboard/index.js +4 -0
  147. package/dist/dashboard/meter-model.d.ts +6 -3
  148. package/dist/dashboard/meter-model.d.ts.map +1 -1
  149. package/dist/dashboard/meter-model.js +9 -4
  150. package/dist/dashboard/meter-parts.d.ts +3 -0
  151. package/dist/dashboard/meter-parts.d.ts.map +1 -1
  152. package/dist/dashboard/meter-parts.js +36 -6
  153. package/dist/dashboard/meter.d.ts +3 -3
  154. package/dist/dashboard/meter.d.ts.map +1 -1
  155. package/dist/dashboard/meter.js +10 -2
  156. package/dist/dashboard/meter.module.css +20 -12
  157. package/dist/dashboard/meter.module.css.d.ts +0 -1
  158. package/dist/dashboard/page-summary.d.ts +3 -3
  159. package/dist/dashboard/page-summary.d.ts.map +1 -1
  160. package/dist/dashboard/page-summary.js +7 -2
  161. package/dist/dashboard/page-summary.module.css +5 -2
  162. package/dist/dashboard/query-state.d.ts +9 -8
  163. package/dist/dashboard/query-state.d.ts.map +1 -1
  164. package/dist/dashboard/query-state.js +29 -11
  165. package/dist/dashboard/section.d.ts +11 -3
  166. package/dist/dashboard/section.d.ts.map +1 -1
  167. package/dist/dashboard/section.js +34 -7
  168. package/dist/dashboard/settings-section.d.ts +8 -5
  169. package/dist/dashboard/settings-section.d.ts.map +1 -1
  170. package/dist/dashboard/settings-section.js +12 -8
  171. package/dist/dashboard/settings-section.module.css +25 -4
  172. package/dist/dashboard/settings-section.module.css.d.ts +1 -0
  173. package/dist/dashboard/stat-card-parts.d.ts +5 -1
  174. package/dist/dashboard/stat-card-parts.d.ts.map +1 -1
  175. package/dist/dashboard/stat-card-parts.js +8 -3
  176. package/dist/dashboard/stat-card.d.ts +3 -3
  177. package/dist/dashboard/stat-card.d.ts.map +1 -1
  178. package/dist/dashboard/stat-card.js +47 -12
  179. package/dist/dashboard/stat-card.module.css +42 -7
  180. package/dist/dashboard/stat-card.module.css.d.ts +3 -0
  181. package/dist/dashboard/stat-group.d.ts +2 -2
  182. package/dist/dashboard/stat-group.d.ts.map +1 -1
  183. package/dist/dashboard/stat-group.js +10 -3
  184. package/dist/dashboard/stat-strip.d.ts +5 -4
  185. package/dist/dashboard/stat-strip.d.ts.map +1 -1
  186. package/dist/dashboard/stat-strip.js +41 -31
  187. package/dist/dashboard/stat-strip.module.css +8 -6
  188. package/dist/dashboard/visual-slot.d.ts +4 -0
  189. package/dist/dashboard/visual-slot.d.ts.map +1 -1
  190. package/dist/dashboard/visual-slot.js +2 -0
  191. package/dist/dashboard/widget-header.d.ts +6 -6
  192. package/dist/dashboard/widget-header.d.ts.map +1 -1
  193. package/dist/dashboard/widget-header.js +4 -2
  194. package/dist/dashboard/widget-header.module.css +12 -15
  195. package/dist/format/shared.d.ts.map +1 -1
  196. package/dist/format/shared.js +24 -1
  197. package/dist/guard/index.d.ts +1 -1
  198. package/dist/guard/index.d.ts.map +1 -1
  199. package/dist/guard/index.js +4 -1
  200. package/dist/index.d.ts +1 -1
  201. package/dist/index.d.ts.map +1 -1
  202. package/dist/index.js +4 -0
  203. package/dist/shell/app-main.module.css +18 -0
  204. package/dist/styles.css +69 -0
  205. package/dist/surfaces.d.ts +2 -2
  206. package/dist/surfaces.d.ts.map +1 -1
  207. package/dist/surfaces.js +8 -2
  208. package/dist/table/cell-kinds.d.ts +47 -0
  209. package/dist/table/cell-kinds.d.ts.map +1 -0
  210. package/dist/table/cell-kinds.js +180 -0
  211. package/dist/table/cell-kinds.module.css +55 -0
  212. package/dist/table/cell-kinds.module.css.d.ts +15 -0
  213. package/dist/table/data-table-fold.d.ts +155 -0
  214. package/dist/table/data-table-fold.d.ts.map +1 -0
  215. package/dist/table/data-table-fold.js +320 -0
  216. package/dist/table/data-table-state.d.ts +10 -3
  217. package/dist/table/data-table-state.d.ts.map +1 -1
  218. package/dist/table/data-table-state.js +11 -6
  219. package/dist/table/data-table.d.ts +13 -28
  220. package/dist/table/data-table.d.ts.map +1 -1
  221. package/dist/table/data-table.js +362 -255
  222. package/dist/table/data-table.module.css +282 -3
  223. package/dist/table/data-table.module.css.d.ts +16 -0
  224. package/dist/table/table-features.d.ts +34 -4
  225. package/dist/table/table-features.d.ts.map +1 -1
  226. package/dist/table/table-features.js +10 -0
  227. package/dist/theme/card-inset.module.css +35 -0
  228. package/dist/theme/controls.module.css +55 -2
  229. package/dist/theme/ctl-theme.d.ts.map +1 -1
  230. package/dist/theme/ctl-theme.js +5 -0
  231. package/dist/theme/index.d.ts.map +1 -1
  232. package/dist/theme/index.js +14 -10
  233. package/dist/tokens/core.d.ts +1 -0
  234. package/dist/tokens/core.d.ts.map +1 -1
  235. package/dist/tokens/core.js +1 -0
  236. package/dist/tokens/derive.js +1 -1
  237. package/dist/tokens/palette.d.ts +2 -1
  238. package/dist/tokens/palette.d.ts.map +1 -1
  239. package/llms.txt +295 -5
  240. package/package.json +1 -1
  241. package/src/agent/chat/thread-message.tsx +10 -403
  242. package/src/agent/chat/virtualize.ts +5 -5
  243. package/src/charts/ChartCard.tsx +175 -31
  244. package/src/charts/Lines.tsx +13 -4
  245. package/src/charts/Sparkline.tsx +213 -48
  246. package/src/charts/chart-box.module.css +59 -2
  247. package/src/charts/chart-box.module.css.d.ts +5 -0
  248. package/src/charts/chart-card.module.css +28 -17
  249. package/src/charts/chart-card.module.css.d.ts +3 -0
  250. package/src/charts/compile.ts +59 -33
  251. package/src/charts/labels.ts +175 -24
  252. package/src/charts/legend.tsx +3 -2
  253. package/src/charts/ref-label.ts +114 -18
  254. package/src/charts/sparkline.module.css +50 -0
  255. package/src/charts/sparkline.module.css.d.ts +3 -0
  256. package/src/charts/state.tsx +40 -10
  257. package/src/cli/doctor-upgrade.ts +75 -0
  258. package/src/cli/doctor.ts +36 -0
  259. package/src/cli/help.ts +16 -6
  260. package/src/cli/index.ts +73 -67
  261. package/src/cli/init.ts +157 -36
  262. package/src/cli/router-wiring.ts +2 -2
  263. package/src/cli/shot/capture.ts +138 -16
  264. package/src/cli/shot/detect.ts +46 -22
  265. package/src/cli/shot/index.ts +8 -2
  266. package/src/cli/shot/measure.ts +11 -2
  267. package/src/cli/shot/types.ts +4 -1
  268. package/src/cli/sync.ts +12 -2
  269. package/src/common/could-not-load.ts +22 -0
  270. package/src/common/empty-copy.ts +17 -0
  271. package/src/common/index.ts +1 -0
  272. package/src/common/props.ts +30 -0
  273. package/src/common/retry-button.module.css +7 -3
  274. package/src/common/virtual-rows.tsx +682 -0
  275. package/src/controls/controls.module.css +33 -1
  276. package/src/controls/controls.module.css.d.ts +2 -0
  277. package/src/controls/enum-filter.tsx +8 -2
  278. package/src/controls/filter-pill.tsx +80 -27
  279. package/src/controls/form-layout.module.css +112 -7
  280. package/src/controls/form-layout.module.css.d.ts +1 -0
  281. package/src/controls/form-layout.tsx +115 -22
  282. package/src/controls/multi-select-filter.tsx +22 -11
  283. package/src/controls/range-filter.tsx +9 -3
  284. package/src/dashboard/bar-list.module.css +21 -5
  285. package/src/dashboard/bar-list.tsx +53 -45
  286. package/src/dashboard/board-nav.ts +67 -0
  287. package/src/dashboard/board.module.css +179 -0
  288. package/src/dashboard/board.module.css.d.ts +28 -0
  289. package/src/dashboard/board.tsx +415 -0
  290. package/src/dashboard/empty-state.tsx +21 -11
  291. package/src/dashboard/event-list-model.ts +125 -0
  292. package/src/dashboard/event-list-rows.tsx +117 -0
  293. package/src/dashboard/event-list-scroll.ts +291 -0
  294. package/src/dashboard/event-list-skeleton.tsx +62 -0
  295. package/src/dashboard/event-list.module.css +336 -0
  296. package/src/dashboard/event-list.module.css.d.ts +34 -0
  297. package/src/dashboard/event-list.tsx +336 -0
  298. package/src/dashboard/index.ts +2 -0
  299. package/src/dashboard/meter-model.ts +16 -7
  300. package/src/dashboard/meter-parts.tsx +53 -14
  301. package/src/dashboard/meter.module.css +20 -12
  302. package/src/dashboard/meter.module.css.d.ts +0 -1
  303. package/src/dashboard/meter.tsx +36 -18
  304. package/src/dashboard/page-summary.module.css +5 -2
  305. package/src/dashboard/page-summary.tsx +13 -6
  306. package/src/dashboard/query-state.tsx +55 -30
  307. package/src/dashboard/section.tsx +83 -41
  308. package/src/dashboard/settings-section.module.css +25 -4
  309. package/src/dashboard/settings-section.module.css.d.ts +1 -0
  310. package/src/dashboard/settings-section.tsx +18 -8
  311. package/src/dashboard/stat-card-parts.tsx +20 -3
  312. package/src/dashboard/stat-card.module.css +42 -7
  313. package/src/dashboard/stat-card.module.css.d.ts +3 -0
  314. package/src/dashboard/stat-card.tsx +55 -13
  315. package/src/dashboard/stat-group.tsx +22 -14
  316. package/src/dashboard/stat-strip.module.css +8 -6
  317. package/src/dashboard/stat-strip.tsx +29 -20
  318. package/src/dashboard/visual-slot.ts +5 -0
  319. package/src/dashboard/widget-header.module.css +12 -15
  320. package/src/dashboard/widget-header.tsx +8 -5
  321. package/src/format/shared.ts +30 -1
  322. package/src/guard/index.ts +7 -1
  323. package/src/index.ts +4 -0
  324. package/src/shell/app-main.module.css +18 -0
  325. package/src/styles.css +69 -0
  326. package/src/surfaces.ts +7 -1
  327. package/src/table/cell-kinds.module.css +55 -0
  328. package/src/table/cell-kinds.module.css.d.ts +15 -0
  329. package/src/table/cell-kinds.tsx +263 -0
  330. package/src/table/data-table-fold.tsx +567 -0
  331. package/src/table/data-table-state.ts +24 -13
  332. package/src/table/data-table.module.css +282 -3
  333. package/src/table/data-table.module.css.d.ts +16 -0
  334. package/src/table/data-table.tsx +430 -362
  335. package/src/table/table-features.ts +44 -4
  336. package/src/theme/__snapshots__/plain-theme.test.ts.snap +2 -66
  337. package/src/theme/card-inset.module.css +35 -0
  338. package/src/theme/controls.module.css +55 -2
  339. package/src/theme/ctl-theme.tsx +8 -0
  340. package/src/theme/index.ts +12 -8
  341. package/src/tokens/core.ts +1 -0
  342. package/src/tokens/derive.ts +1 -1
  343. package/src/tokens/palette.ts +4 -1
@@ -30,6 +30,23 @@ import type { ColumnDef, ColumnHelper, RowData } from '@tanstack/react-table'
30
30
  /** Horizontal alignment of a column's header AND its cells. */
31
31
  export type DataTableAlign = 'left' | 'center' | 'right'
32
32
 
33
+ /** The one list of cell kinds: the type, the runtime check and its error text derive from it. */
34
+ export const DATA_TABLE_COLUMN_KINDS = [
35
+ 'entity',
36
+ 'status',
37
+ 'number',
38
+ 'money',
39
+ 'relative-time',
40
+ 'meter',
41
+ 'text',
42
+ ] as const
43
+
44
+ /**
45
+ * The cell kinds `meta.kind` names (`docs/waves/design-parity/SPEC.md` § 6.6). Unset keeps the
46
+ * table's plain cell. The chrome and the content each kind supplies live in `cell-kinds.tsx`.
47
+ */
48
+ export type DataTableColumnKind = (typeof DATA_TABLE_COLUMN_KINDS)[number]
49
+
33
50
  /**
34
51
  * What a column def's `meta` may carry. Registered per table through `columnMeta: metaHelper<…>()`
35
52
  * rather than a global `declare module '@tanstack/react-table'`, so `meta: { aling: 'right' }` is a
@@ -39,10 +56,10 @@ export type DataTableAlign = 'left' | 'center' | 'right'
39
56
  export type BasaltColumnMeta = {
40
57
  align?: DataTableAlign
41
58
  /**
42
- * Opt OUT of the automatic mono-numeral cell style. The table applies it whenever the cell's
43
- * raw value is a number — which is right for a plain figure and wrong for a numeric accessor
44
- * whose `cell` renders its own chrome (a coloured `Text`, a `Badge`, a sparkline), because the
45
- * `<td>`'s mono font then overrides what the cell asked for.
59
+ * Opt OUT of the automatic numeral cell style (proportional sans with `tabular-nums`, SPEC D33).
60
+ * The table applies it whenever the cell's raw value is a number — which is right for a plain
61
+ * figure and wrong for a numeric accessor whose `cell` renders its own chrome (a coloured `Text`,
62
+ * a `Badge`, a sparkline), because the `<td>`'s numeral style then overrides what the cell asked for.
46
63
  */
47
64
  numeral?: boolean
48
65
  /**
@@ -53,6 +70,29 @@ export type BasaltColumnMeta = {
53
70
  * LAST column first — nothing regresses with no `meta.priority` set anywhere. See `foldOrder`.
54
71
  */
55
72
  priority?: number
73
+ /**
74
+ * The cell's kind: chrome always, content only when the column has no `cell` renderer of its own
75
+ * (a `cell` still supplies the content). Unset renders exactly the plain cell. A wrong value
76
+ * throws at render, like `align`.
77
+ *
78
+ * - `entity`: never wraps, ink, weight 500; the column's `cell` (glyph + name) or the raw value.
79
+ * - `status`: the status chip; colour from `statusColor`, default `gray`. Never wraps.
80
+ * - `number` / `money`: proportional tabular numerals (SPEC D33, not mono), right-aligned (an explicit `align` wins). Without a
81
+ * `cell` the raw number is formatted (`integer`; `money` grouped to `currency`'s minor digits, no symbol), null as a muted dash.
82
+ * The UNIT belongs in the header (`Volume (kg)`, `Salary (USD / yr)`), never in the cell.
83
+ * - `relative-time`: mono, muted; a raw `Date | number | string` renders as `3 hours ago` in a
84
+ * `<time>`, the full date in a tooltip and as its accessible name.
85
+ * - `meter`: the inline `Meter` bar for the value against `meterMax`.
86
+ * - `text`: plain `sm` ink that MAY wrap — the only kind that does. Every other body cell holds one line, so
87
+ * the fold measures natural widths and folds or pins instead of fitting by wrapping.
88
+ */
89
+ kind?: DataTableColumnKind
90
+ /** `status`: the chip colour for a cell value — a theme colour name or a CSS var. Default `gray`. */
91
+ statusColor?(value: unknown): string
92
+ /** `meter`: the value that fills the bar. Default 1 (a ratio). */
93
+ meterMax?: number
94
+ /** `money` without a `cell`: the ISO 4217 code that sets the minor digits (the header names it). Default `USD`. */
95
+ currency?: string
56
96
  }
57
97
 
58
98
  /**
@@ -755,37 +755,7 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
755
755
  "size": "md",
756
756
  },
757
757
  },
758
- "Pagination": {
759
- "vars": {
760
- "fn":
761
- "(theme, props) => ({
762
- root: { "--pagination-active-color": onColorFor(theme, props) }
763
- })"
764
- ,
765
- "outputs": [
766
- {
767
- "probes": 772,
768
- "result": "{"root":{"--pagination-active-color":"var(--vx-on-blue)"}}",
769
- },
770
- {
771
- "probes": 384,
772
- "result": "{"root":{"--pagination-active-color":"var(--vx-on-red)"}}",
773
- },
774
- {
775
- "probes": 384,
776
- "result": "{"root":{"--pagination-active-color":"var(--vx-on-gray)"}}",
777
- },
778
- {
779
- "probes": 384,
780
- "result": "{"root":{"--pagination-active-color":"var(--vx-on-dark)"}}",
781
- },
782
- {
783
- "probes": 384,
784
- "result": "{"root":{}}",
785
- },
786
- ],
787
- },
788
- },
758
+ "Pagination": {},
789
759
  "PaginationControl": {
790
760
  "defaultProps": {
791
761
  "data-basalt-hit": true,
@@ -798,7 +768,6 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
798
768
  "styles": {
799
769
  "root": {
800
770
  "backgroundColor": "var(--vx-surface-panel)",
801
- "borderRadius": "var(--vx-radius-card)",
802
771
  "boxShadow": "var(--vx-shadow-card)",
803
772
  },
804
773
  },
@@ -978,7 +947,6 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
978
947
  "height": 40,
979
948
  },
980
949
  "th": {
981
- "color": "var(--vx-faint)",
982
950
  "fontFamily": "var(--basalt-font-mono)",
983
951
  "fontSize": 11,
984
952
  "fontWeight": 500,
@@ -2088,37 +2056,7 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
2088
2056
  "size": "md",
2089
2057
  },
2090
2058
  },
2091
- "Pagination": {
2092
- "vars": {
2093
- "fn":
2094
- "(theme, props) => ({
2095
- root: { "--pagination-active-color": onColorFor(theme, props) }
2096
- })"
2097
- ,
2098
- "outputs": [
2099
- {
2100
- "probes": 772,
2101
- "result": "{"root":{"--pagination-active-color":"var(--vx-on-blue)"}}",
2102
- },
2103
- {
2104
- "probes": 384,
2105
- "result": "{"root":{"--pagination-active-color":"var(--vx-on-red)"}}",
2106
- },
2107
- {
2108
- "probes": 384,
2109
- "result": "{"root":{"--pagination-active-color":"var(--vx-on-gray)"}}",
2110
- },
2111
- {
2112
- "probes": 384,
2113
- "result": "{"root":{"--pagination-active-color":"var(--vx-on-dark)"}}",
2114
- },
2115
- {
2116
- "probes": 384,
2117
- "result": "{"root":{}}",
2118
- },
2119
- ],
2120
- },
2121
- },
2059
+ "Pagination": {},
2122
2060
  "PaginationControl": {
2123
2061
  "defaultProps": {
2124
2062
  "data-basalt-hit": true,
@@ -2131,7 +2069,6 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
2131
2069
  "styles": {
2132
2070
  "root": {
2133
2071
  "backgroundColor": "var(--vx-surface-panel)",
2134
- "borderRadius": "var(--vx-radius-card)",
2135
2072
  "boxShadow": "var(--vx-shadow-card)",
2136
2073
  },
2137
2074
  },
@@ -2311,7 +2248,6 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
2311
2248
  "height": 32,
2312
2249
  },
2313
2250
  "th": {
2314
- "color": "var(--vx-faint)",
2315
2251
  "fontFamily": "var(--basalt-font-mono)",
2316
2252
  "fontSize": 11,
2317
2253
  "fontWeight": 500,
@@ -29,6 +29,41 @@
29
29
  padding: 0;
30
30
  }
31
31
 
32
+ /* The card radius tier. Paper's lives here rather than in the theme's inline `styles` so the rule
33
+ below can step it down; a Card keeps its inline value, which this one equals. */
34
+ .inset {
35
+ border-radius: var(--vx-radius-card);
36
+ }
37
+
38
+ /*
39
+ * A `Paper` floating over a flush card (a scrubber or key over a map canvas) is a nested surface:
40
+ * sharing the card's radius fails `craft-1/nested-radius-step` (< 3 px apart). It steps DOWN to the
41
+ * control tier, which is always a scale step and 4 px under the card at every radius level (`card =
42
+ * 10 + level`, `ctrl = 6 + level`), the same snap-down law as the Wave 38 nested radii.
43
+ *
44
+ * An explicit `radius` prop still wins: Mantine writes it inline as `--paper-radius`, which beats
45
+ * this rule's `initial` reset; unset, Mantine's own class value (the theme default radius) is
46
+ * reset away so the `var()` falls through to the control tier.
47
+ *
48
+ * Excluded: Mantine's own floating surfaces, which are Papers too but are not panels over the
49
+ * canvas, and a `withinPortal={false}` one renders INSIDE the card. Every `mantine-*-dropdown`
50
+ * part (Popover, Menu, HoverCard, Combobox and the Selects built on it) and Modal / Drawer / Dialog
51
+ * content keep their own radius. What still matches is any other Paper under the flush card, at any
52
+ * depth: a Paper used as an inner card steps down too, which is the nested-step law's intent.
53
+ */
54
+ .inset[data-variant='flush']
55
+ .inset:where(
56
+ :not(
57
+ [class*='mantine-'][class*='-dropdown'],
58
+ [class*='mantine-Modal-'],
59
+ [class*='mantine-Drawer-'],
60
+ [class*='mantine-Dialog-']
61
+ )
62
+ ) {
63
+ --paper-radius: initial;
64
+ border-radius: var(--paper-radius, var(--vx-radius-ctrl));
65
+ }
66
+
32
67
  .inset:where(
33
68
  :not(
34
69
  [data-variant='flush'],
@@ -56,11 +56,32 @@ html[data-mantine-color-scheme] .inputWrapper[data-variant='default']:not([data-
56
56
  * which keep their Mantine semantics and take the focus ring alone.
57
57
  */
58
58
  .input {
59
- --field-depth: 0 0 transparent;
59
+ --field-resting: 0 0 transparent;
60
+ --field-depth: var(--field-resting);
60
61
 
61
62
  box-shadow: var(--field-depth);
62
63
  }
63
64
 
65
+ /* Browser autofill: the field surface over the UA colour, keeping the variant's resting depth. */
66
+ .input:-webkit-autofill,
67
+ .input:-webkit-autofill:hover,
68
+ .input:-webkit-autofill:focus {
69
+ --field-depth: var(--field-resting), 0 0 0 100vmax var(--vx-surface-field) inset;
70
+ /* The UA repaints its highlight on :focus (a Select's input stays focused while its list is open)
71
+ * and recolours the text; parking the background transition keeps the paint off the field. */
72
+ -webkit-text-fill-color: var(--vx-ink);
73
+ caret-color: var(--vx-ink);
74
+ transition: background-color 600000s 0s;
75
+ }
76
+
77
+ /* Tab into a field selects its value, and the UA paints that selection in its own colour (a green
78
+ in the dark scheme). The shot crop of a focused field showed exactly that, not an autofill fill:
79
+ `:-webkit-autofill` never matches there. The selection takes the accent, tinted, with the ink kept. */
80
+ .input::selection {
81
+ background: color-mix(in srgb, var(--mantine-primary-color-filled) 35%, transparent);
82
+ color: var(--vx-ink);
83
+ }
84
+
64
85
  /* An input cannot host the `[data-basalt-hit]` ::after overlay, so its touch floor is real height. */
65
86
  @media (pointer: coarse) {
66
87
  .input {
@@ -69,7 +90,7 @@ html[data-mantine-color-scheme] .inputWrapper[data-variant='default']:not([data-
69
90
  }
70
91
 
71
92
  .input[data-variant='default'] {
72
- --field-depth: var(--vx-shadow-raised);
93
+ --field-resting: var(--vx-shadow-raised);
73
94
  }
74
95
 
75
96
  /*
@@ -309,6 +330,38 @@ html .tableRoot {
309
330
  --table-border-color: var(--vx-surface-hairline);
310
331
  }
311
332
 
333
+ /*
334
+ * The header is a faint micro-label on the body's own fill (no band; the hairline below the head row
335
+ * is its only divider). The SORTED column steps up to ink — its arrow inherits it; unsorted sortable
336
+ * headers stay faint. `aria-sort` is the state the table already writes, so no extra class.
337
+ */
338
+ html .tableRoot th {
339
+ color: var(--vx-faint);
340
+ }
341
+
342
+ html .tableRoot th[aria-sort='ascending'],
343
+ html .tableRoot th[aria-sort='descending'] {
344
+ color: var(--vx-ink);
345
+ }
346
+
347
+ /*
348
+ * The current page is selection state, so it is an ink-mixed fill with an ink label, the `pills` Tab's
349
+ * step (SPEC § 6.12). This is its one home: there is no `Pagination` vars entry in `theme/index.ts`.
350
+ * Mantine writes `--pagination-active-bg` inline only for an explicit `color=`, which therefore keeps
351
+ * its accent fill and Mantine's own label contrast.
352
+ */
353
+ html :global(.mantine-Pagination-root):not([style*='--pagination-active-bg']) {
354
+ --pagination-active-bg: color-mix(in srgb, var(--vx-ink) 12%, var(--vx-surface-panel));
355
+ }
356
+
357
+ /* The label is set on the control: Mantine writes `--pagination-active-color` inline (white), which a
358
+ rule on the root cannot outrank. */
359
+ html
360
+ :global(.mantine-Pagination-root):not([style*='--pagination-active-bg'])
361
+ :global(.mantine-Pagination-control)[data-active] {
362
+ color: var(--vx-ink);
363
+ }
364
+
312
365
  /*
313
366
  * The LAST row's separator is dropped — exactly the rule (and exactly the reasoning) the Accordion
314
367
  * above already carries: a separator BETWEEN items is information, and the same line drawn after the
@@ -40,10 +40,13 @@ import type {
40
40
  MantineThemeOverride,
41
41
  MultiSelect,
42
42
  NativeSelect,
43
+ NumberInput,
44
+ PasswordInput,
43
45
  Radio,
44
46
  SegmentedControl,
45
47
  Select,
46
48
  Switch,
49
+ Textarea,
47
50
  TextInput,
48
51
  } from '@mantine/core'
49
52
  import type { ReactNode } from 'react'
@@ -68,6 +71,11 @@ export const CTL_THEME: MantineThemeOverride = {
68
71
  MultiSelect: ext<typeof MultiSelect>({ defaultProps: { size: 'ctl' } }),
69
72
  SegmentedControl: ext<typeof SegmentedControl>({ defaultProps: { size: 'ctl' } }),
70
73
  NativeSelect: ext<typeof NativeSelect>({ defaultProps: { size: 'ctl' } }),
74
+ // The form fields a `FormRow` / `SettingsRow` hosts (SPEC § 6.13): the 32 px field without a
75
+ // per-call `size`. `theme/index.ts` already carries the `ctl` stepper column for NumberInput.
76
+ NumberInput: ext<typeof NumberInput>({ defaultProps: { size: 'ctl' } }),
77
+ PasswordInput: ext<typeof PasswordInput>({ defaultProps: { size: 'ctl' } }),
78
+ Textarea: ext<typeof Textarea>({ defaultProps: { size: 'ctl' } }),
71
79
  // The theme keys are the component names Mantine's own `useProps` looks up — `RadioGroup`, not
72
80
  // `Radio.Group` (`RadioGroup.mjs`: `useProps("RadioGroup", …)`).
73
81
  Radio: ext<typeof Radio>({
@@ -496,11 +496,12 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
496
496
  }),
497
497
  Paper: ext<typeof Paper>({
498
498
  classNames: { root: cardInsetClasses.inset },
499
+ // The radius is in `card-inset.module.css`, not inline: an inline value cannot be stepped
500
+ // down for a Paper floating over a flush card.
499
501
  styles: {
500
502
  root: {
501
503
  backgroundColor: 'var(--vx-surface-panel)',
502
504
  boxShadow: 'var(--vx-shadow-card)',
503
- borderRadius: 'var(--vx-radius-card)',
504
505
  },
505
506
  },
506
507
  }),
@@ -1049,7 +1050,9 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
1049
1050
  },
1050
1051
  },
1051
1052
  }),
1052
- // Header cells become a micro-label (mono, uppercase, faint) — numeral/tabular styling for
1053
+ // Header cells become a micro-label (mono, uppercase; the colour — faint, ink when sorted — is
1054
+ // `.tableRoot th` in controls.module.css, since an inline colour here could not be overridden by
1055
+ // the sorted state). The head shares the body's fill: no band, only the hairline. Numeral/tabular styling for
1053
1056
  // body cells is a per-table call-site concern, left to consumers. `--table-border-color`
1054
1057
  // drives row separators AND the opt-in `withTableBorder` outer border — both drop to the
1055
1058
  // hairline (Mantine's default reads gray-3/dark-4 = the STRONG line, too heavy in a card).
@@ -1068,7 +1071,6 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
1068
1071
  fontWeight: 500,
1069
1072
  letterSpacing: '0.06em',
1070
1073
  textTransform: 'uppercase',
1071
- color: 'var(--vx-faint)',
1072
1074
  },
1073
1075
  td: { height: spacing.step.tableRowHeight, fontSize: VX.text.sm },
1074
1076
  },
@@ -1121,11 +1123,9 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
1121
1123
  },
1122
1124
  }),
1123
1125
  }),
1124
- Pagination: ext<typeof Pagination>({
1125
- vars: (theme, props) => ({
1126
- root: { '--pagination-active-color': onColorFor(theme, props) },
1127
- }),
1128
- }),
1126
+ // The current page is ink (SPEC § 6.12); its one home is `controls.module.css`, so this entry only
1127
+ // registers the component for the border-coverage gate.
1128
+ Pagination: ext<typeof Pagination>({}),
1129
1129
  // `Pagination`'s own controls (prev/next/page buttons) resolve `PaginationControl`'s
1130
1130
  // defaultProps independently of the parent — `data-basalt-hit` here is what closes the
1131
1131
  // gap Switch/Checkbox/Radio already close at their own theme entries.
@@ -1406,6 +1406,10 @@ function ctlSizeVars(): Record<string, string> & Record<CtlHeightVar, string> {
1406
1406
  '--combobox-chevron-size-ctl': pxRem(CTL_CHEVRON_SIZE),
1407
1407
  '--ni-chevron-size-ctl': pxRem(CTL_NUMBER_CHEVRON_SIZE),
1408
1408
  '--ni-right-section-width-ctl': `calc(${pxRem(CTL_NUMBER_RIGHT_SECTION_WIDTH)} * var(--mantine-scale))`,
1409
+ // PasswordInput's visibility toggle: Mantine's own `xs` pair (22 px button, 16 px icon), the tier
1410
+ // whose input height already equals `ctl`; undeclared, `size="ctl"` left the toggle unsized.
1411
+ '--psi-button-size-ctl': 'calc(1.375rem * var(--mantine-scale))',
1412
+ '--psi-icon-size-ctl': 'calc(1rem * var(--mantine-scale))',
1409
1413
  '--badge-padding-x-ctl': `calc(${pxRem(CTL_PADDING_X)} * var(--mantine-scale))`,
1410
1414
  '--badge-fz-ctl': `calc(${pxRem(VX.text.xs)} * var(--mantine-scale))`,
1411
1415
  // `= VX.text.sm` per `docs/CONTROLS-SPEC.md` §5 — same `calc(<rem> * var(--mantine-scale))`
@@ -284,6 +284,7 @@ export const VX = {
284
284
 
285
285
  // Score / zone status scale (excellent → poor)
286
286
  status: {
287
+ /** FILL-ONLY: zones, bands, heatmap cells. Not AA as text (~3:1 on a light card) — text uses `good`. */
287
288
  excellent: 'var(--vx-status-excellent)',
288
289
  good: 'var(--vx-status-good)',
289
290
  warn: 'var(--vx-status-warn)',
@@ -114,7 +114,7 @@ const FILL_LUMINANCE = 0.165
114
114
 
115
115
  // ── Accent family ────────────────────────────────────────────────────────────────────────────
116
116
  // Fill hover: fillTone - FILL_HOVER_TONE_DELTA, fillChroma + FILL_HOVER_CHROMA_DELTA.
117
- const FILL_HOVER_TONE_DELTA = 4.8
117
+ const FILL_HOVER_TONE_DELTA = 10
118
118
  const FILL_HOVER_CHROMA_DELTA = -3.6
119
119
  // Dark-mode accent-as-INK: lighter tone, chroma pulled back off the fill's saturation so it reads
120
120
  // as an ink color rather than a second fill.
@@ -1190,6 +1190,8 @@ function buildPaletteDataUncached(config: DeriveConfig) {
1190
1190
  * success/warning/danger pairs as `SEMANTIC` (also the direct source for Badge/Notification/delta
1191
1191
  * -badge status-tint idioms in the theme — one set of hexes, several consumers). `excellent`
1192
1192
  * (top-of-scale grade) and `neutral` keep their prior chart-only families (unchanged BP families).
1193
+ * `excellent` is FILL-ONLY (zones, bands, heatmap cells): about 3:1 on a light card, so text uses
1194
+ * `good`, which the status-text solver holds to AA. `basalt/status-fill-as-text` guards it.
1193
1195
  */
1194
1196
  const STATUS = {
1195
1197
  excellent: p(BP.forest),
@@ -1412,7 +1414,8 @@ export const SEMANTIC = STATIC_PALETTE_DATA.SEMANTIC
1412
1414
 
1413
1415
  /**
1414
1416
  * Score / zone status scale (excellent → poor). `good`/`warn`/`bad` are the SAME spec
1415
- * success/warning/danger pairs as `SEMANTIC`. GENERATED — see `buildPaletteData` above.
1417
+ * success/warning/danger pairs as `SEMANTIC`. `excellent` is fill-only (not AA as text); use `good`
1418
+ * for text. GENERATED — see `buildPaletteData` above.
1416
1419
  */
1417
1420
  export const STATUS = STATIC_PALETTE_DATA.STATUS
1418
1421