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
@@ -1 +1 @@
1
- {"version":3,"file":"bar-list.d.ts","sourceRoot":"","sources":["../../src/dashboard/bar-list.tsx"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAMlD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,6FAA6F;IAC7F,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACvC,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,KAAK,EAAE,SAAS,WAAW,EAAE,CAAA;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,KAAK,MAAM,CAAA;IACzD,oGAAoG;IACpG,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IAC3B,4DAA4D;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IAChC,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAmBD,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,MAAe,EACf,GAAG,EACH,OAAgB,EAChB,YAAoB,EACpB,cAAc,EACd,OAAe,EACf,WAAe,EACf,SAAqB,EACrB,SAAS,EACT,KAAK,GACN,EAAE,YAAY,+BAiHd"}
1
+ {"version":3,"file":"bar-list.d.ts","sourceRoot":"","sources":["../../src/dashboard/bar-list.tsx"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAOlE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,6FAA6F;IAC7F,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,WAAW,GACpC,cAAc,GAAG;IACf,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,KAAK,EAAE,SAAS,WAAW,EAAE,CAAA;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,KAAK,MAAM,CAAA;IACzD,oGAAoG;IACpG,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IAC3B,4DAA4D;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IAChC,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,0GAA0G;IAC1G,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mIAAmI;IACnI,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAmBH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,MAAe,EACf,GAAG,EACH,OAAgB,EAChB,YAAoB,EACpB,cAAc,EACd,OAAe,EACf,WAAW,EACX,SAAqC,EACrC,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,YAAY,+BAoHd"}
@@ -1,10 +1,12 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Skeleton, VisuallyHidden } from "@mantine/core";
3
+ import { EmptyState } from "./empty-state.js";
3
4
  import { isValidElement } from "react";
4
- import { cx } from "../common/props.js";
5
+ import { cx, pickDataAttributes } from "../common/props.js";
5
6
  import classes from "./bar-list.module.css";
6
7
  import { StatusDot } from "../theme/status-dot.js";
7
8
  import { StatusVerdict } from "../theme/status-verdict.js";
9
+ import { skeletonRowCount } from "./event-list-model.js";
8
10
  import { asText, barPercent } from "./scale.js";
9
11
  const hasContent = (node) => node !== void 0 && node !== null && typeof node !== "boolean";
10
12
  const isFigure = (node) => typeof node === "number" || typeof node === "string" && /^[\s+\-−±▲▼]*[€$£¥]?\d/.test(node);
@@ -18,15 +20,17 @@ function BarList({
18
20
  accentLeader = false,
19
21
  secondaryAlign,
20
22
  loading = false,
21
- loadingRows = 5,
22
- emptyText = "No data",
23
+ loadingRows,
24
+ emptyText = "No items to compare yet",
23
25
  className,
24
- style
26
+ style,
27
+ ...rest
25
28
  }) {
29
+ const data = pickDataAttributes(rest);
26
30
  if (loading) {
27
- return /* @__PURE__ */ jsx("div", { className: cx(classes.frame, className), style, children: /* @__PURE__ */ jsxs("div", { className: classes.root, "aria-busy": "true", "data-variant": variant, children: [
31
+ return /* @__PURE__ */ jsx("div", { ...data, className: cx(classes.frame, className), style, children: /* @__PURE__ */ jsxs("div", { className: classes.root, "aria-busy": "true", "data-variant": variant, children: [
28
32
  /* @__PURE__ */ jsx(VisuallyHidden, { children: `Loading ${label}` }),
29
- Array.from({ length: loadingRows }, (_, i) => /* @__PURE__ */ jsxs(
33
+ Array.from({ length: skeletonRowCount(loadingRows, items.length) }, (_, i) => /* @__PURE__ */ jsxs(
30
34
  "div",
31
35
  {
32
36
  className: cx(classes.row, classes.skeletonRow),
@@ -44,7 +48,10 @@ function BarList({
44
48
  ] }) });
45
49
  }
46
50
  if (items.length === 0) {
47
- return /* @__PURE__ */ jsx("div", { className: cx(classes.frame, className), style, children: /* @__PURE__ */ jsx("output", { className: classes.root, "aria-label": label, children: /* @__PURE__ */ jsx("span", { className: classes.empty, children: emptyText }) }) });
51
+ return /* @__PURE__ */ jsx("div", { ...data, className: cx(classes.frame, className), style, children: /* @__PURE__ */ jsxs("div", { className: classes.root, role: "status", children: [
52
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: label }),
53
+ /* @__PURE__ */ jsx(EmptyState, { tier: "section", title: emptyText, className: classes.empty })
54
+ ] }) });
48
55
  }
49
56
  const scale = max ?? items.reduce(
50
57
  (top, i) => i.max === void 0 && Number.isFinite(i.value) ? Math.max(top, i.value) : top,
@@ -55,7 +62,7 @@ function BarList({
55
62
  const align = secondaryAlign ?? (items.some((i) => isText(i.secondary)) ? "start" : "end");
56
63
  return (
57
64
  // The frame is the width container the wide layout keys on (a container cannot restyle its own grid).
58
- /* @__PURE__ */ jsx("div", { className: cx(classes.frame, className), style, children: /* @__PURE__ */ jsx(
65
+ /* @__PURE__ */ jsx("div", { ...data, className: cx(classes.frame, className), style, children: /* @__PURE__ */ jsx(
59
66
  "ul",
60
67
  {
61
68
  className: classes.root,
@@ -69,6 +69,8 @@
69
69
  .label {
70
70
  position: relative;
71
71
  min-width: 0;
72
+ /* A name truncates before it touches the value, whatever the column gap. */
73
+ padding-inline-end: var(--vx-space-stack-md, 0.75rem);
72
74
  overflow: hidden;
73
75
  text-overflow: ellipsis;
74
76
  white-space: nowrap;
@@ -96,8 +98,6 @@
96
98
 
97
99
  .empty {
98
100
  grid-column: 1 / -1;
99
- font-size: var(--vx-text-sm);
100
- color: var(--vx-muted);
101
101
  }
102
102
 
103
103
  /* A real row with a skeleton laid over it: the row sets the height, the skeleton paints it. */
@@ -233,10 +233,26 @@
233
233
  }
234
234
 
235
235
  /*
236
- * A column of DeltaBadges: glyph and figure are ONE unit, end-aligned as a whole, so the glyph never drifts
237
- * from its figure however wide the column ("▲ 9%" and "▲13%" share their right edge and keep the badge's own
238
- * gap). Tabular figures keep the right edges even (D33: only in a table-like column, not a hero metric).
236
+ * A column of DeltaBadges is a start-aligned two-track grid: the glyph track, then the figure. Every
237
+ * glyph shares one x and sits one fixed gap from its own figure ("▲ 9%" and "▲ 13%" alike); the
238
+ * figures are ragged on the right. End-aligning them in a fixed-width track kept the right edge but
239
+ * left a digit-wide hole between a short figure and its glyph (about 8px, Wave 50 S4).
239
240
  */
240
241
  .secondary [data-delta] {
242
+ /* A block that hugs its content and sits on the cell's start, whatever the cell's `text-align`, so
243
+ * every glyph shares one x. */
244
+ display: grid;
245
+ width: max-content;
246
+ margin-inline-end: auto;
247
+ grid-auto-flow: column;
248
+ grid-template-columns: auto auto;
249
+ justify-items: start;
241
250
  font-variant-numeric: tabular-nums;
251
+ /* The row's line box, not the badge's own `line-height: 1`: its baseline then sits on the value's. */
252
+ line-height: inherit;
253
+ }
254
+
255
+ /* A zero delta has no glyph: its figure is the only track. */
256
+ .secondary [data-delta]:not(:has([data-delta-glyph])) {
257
+ grid-template-columns: auto;
242
258
  }
@@ -0,0 +1,22 @@
1
+ /** Roving-focus movement for `Board`: pure, so the keyboard law is testable without a DOM. */
2
+ export type BoardKey = 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'Home' | 'End';
3
+ export declare const BOARD_KEYS: readonly ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"];
4
+ export declare function isBoardKey(key: string): key is BoardKey;
5
+ export type BoardPos = {
6
+ col: number;
7
+ row: number;
8
+ };
9
+ /**
10
+ * The position `key` moves to from `from`, or `null` when it stays put. `sizes` is the card count of
11
+ * every column in order. Up/Down/Home/End stay in the column; Left/Right jump to the nearest
12
+ * non-empty column in that direction and land on the same row index, clamped to its last card.
13
+ */
14
+ export declare function moveOnBoard(sizes: readonly number[], from: BoardPos, key: BoardKey): BoardPos | null;
15
+ /**
16
+ * Only http(s) and relative references render as links; anything else (`javascript:`, `data:`,
17
+ * `mailto:`) stays text. The scheme is case-insensitive (`HTTPS://` is http). A leading `/` must not
18
+ * be followed by another `/` or a `\` — browsers read both as a host (`//evil`, `/\evil`) — and a
19
+ * leading `\` is rejected the same way.
20
+ */
21
+ export declare function isSafeHref(href: string): boolean;
22
+ //# sourceMappingURL=board-nav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board-nav.d.ts","sourceRoot":"","sources":["../../src/dashboard/board-nav.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAE9F,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,MAAM,GAAG,KAAK,CAAA;AAE5F,eAAO,MAAM,UAAU,6EAOiB,CAAA;AAExC,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,QAAQ,CAEvD;AAED,MAAM,MAAM,QAAQ,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnD;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,QAAQ,GACZ,QAAQ,GAAG,IAAI,CA4BjB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD"}
@@ -0,0 +1,49 @@
1
+ const BOARD_KEYS = [
2
+ "ArrowUp",
3
+ "ArrowDown",
4
+ "ArrowLeft",
5
+ "ArrowRight",
6
+ "Home",
7
+ "End"
8
+ ];
9
+ function isBoardKey(key) {
10
+ return BOARD_KEYS.includes(key);
11
+ }
12
+ function moveOnBoard(sizes, from, key) {
13
+ const size = sizes[from.col] ?? 0;
14
+ let next;
15
+ switch (key) {
16
+ case "ArrowUp":
17
+ next = { col: from.col, row: from.row - 1 };
18
+ break;
19
+ case "ArrowDown":
20
+ next = { col: from.col, row: from.row + 1 };
21
+ break;
22
+ case "Home":
23
+ next = { col: from.col, row: 0 };
24
+ break;
25
+ case "End":
26
+ next = { col: from.col, row: size - 1 };
27
+ break;
28
+ case "ArrowLeft":
29
+ case "ArrowRight": {
30
+ const step = key === "ArrowLeft" ? -1 : 1;
31
+ let col = from.col + step;
32
+ while (col >= 0 && col < sizes.length && (sizes[col] ?? 0) === 0) col += step;
33
+ if (col < 0 || col >= sizes.length) return null;
34
+ next = { col, row: Math.min(from.row, (sizes[col] ?? 1) - 1) };
35
+ break;
36
+ }
37
+ }
38
+ if (next.row < 0 || next.row >= (sizes[next.col] ?? 0)) return null;
39
+ return next.col === from.col && next.row === from.row ? null : next;
40
+ }
41
+ function isSafeHref(href) {
42
+ return /^https?:\/\//i.test(href) || /^(?:\/(?![/\\])|\.{1,2}\/|#|\?)/.test(href);
43
+ }
44
+ export {
45
+ BOARD_KEYS,
46
+ isBoardKey,
47
+ isSafeHref,
48
+ moveOnBoard
49
+ };
@@ -0,0 +1,52 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { BasaltProps, DataAttributes } from '../common/props.js';
3
+ import type { EnumField, FieldHandle } from '../state.js';
4
+ export type BoardProps<T extends string = string> = BasaltProps & DataAttributes & {
5
+ /** Accessible name of the board. Default "Board". */
6
+ label?: string;
7
+ /** Columns in display order. Column and card `id`s must be unique within their parent. */
8
+ columns: readonly {
9
+ id: T;
10
+ title: string;
11
+ /** Colour of the header's status dot (a `VX.status.*` token). Default muted. */
12
+ tone?: string;
13
+ /** Right-aligned header text, already formatted ("3 items", "$12.40"). */
14
+ total?: string;
15
+ /** The title of the `EmptyState` tile an empty column shows. Default "Nothing here"; say why it is empty. */
16
+ empty?: string;
17
+ cards: readonly {
18
+ id: string;
19
+ actor?: string;
20
+ type?: string;
21
+ title: string;
22
+ /** A linked record; `href` is a link only when http(s) or relative. */
23
+ record?: {
24
+ label: string;
25
+ href?: string;
26
+ };
27
+ /** One muted status line ("Deferred · waiting on CI"). */
28
+ status?: string;
29
+ /** An optional meter or preview; the one ReactNode slot. */
30
+ meter?: ReactNode;
31
+ }[];
32
+ }[];
33
+ /** Called with the card and column ids on Enter, Space or a click. */
34
+ onOpen?: (cardId: string, columnId: string) => void;
35
+ /** Each column scrolls alone inside a box of this height. Omitted: content-sized. */
36
+ height?: number | string;
37
+ /** Renders column-shaped skeletons. */
38
+ loading?: boolean;
39
+ /** The tile shown when no column has a card. Default "Nothing on the board". */
40
+ empty?: {
41
+ title: string;
42
+ description?: string;
43
+ action?: ReactNode;
44
+ };
45
+ /**
46
+ * Compact: the store field holding the selected column id (an enum field of the column ids, the
47
+ * type `ViewTabs` takes). Omitted: internal state, first column.
48
+ */
49
+ field?: FieldHandle<EnumField<T>>;
50
+ };
51
+ export declare function Board<T extends string = string>({ field, ...props }: BoardProps<T>): import("react").JSX.Element;
52
+ //# sourceMappingURL=board.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../src/dashboard/board.tsx"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAElE,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAStD,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,WAAW,GAC7D,cAAc,GAAG;IACf,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0FAA0F;IAC1F,OAAO,EAAE,SAAS;QAChB,EAAE,EAAE,CAAC,CAAA;QACL,KAAK,EAAE,MAAM,CAAA;QACb,gFAAgF;QAChF,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,0EAA0E;QAC1E,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,6GAA6G;QAC7G,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,SAAS;YACd,EAAE,EAAE,MAAM,CAAA;YACV,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,IAAI,CAAC,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;YACb,uEAAuE;YACvE,MAAM,CAAC,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,IAAI,CAAC,EAAE,MAAM,CAAA;aAAE,CAAA;YACzC,0DAA0D;YAC1D,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,4DAA4D;YAC5D,KAAK,CAAC,EAAE,SAAS,CAAA;SAClB,EAAE,CAAA;KACJ,EAAE,CAAA;IACH,sEAAsE;IACtE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gFAAgF;IAChF,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE,CAAA;IACnE;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;CAClC,CAAA;AA+EH,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,+BAMlF"}
@@ -0,0 +1,247 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { ScrollArea, SegmentedControl, Skeleton, Card, VisuallyHidden } from "@mantine/core";
3
+ import { Fragment, useEffect, useId, useRef, useState } from "react";
4
+ import { cx, pickDataAttributes } from "../common/props.js";
5
+ import { useSizeClass } from "../shell/use-size-class.js";
6
+ import { StatusDot } from "../theme/status-dot.js";
7
+ import { VX } from "../tokens/index.js";
8
+ import classes from "./board.module.css";
9
+ import { isBoardKey, isSafeHref, moveOnBoard } from "./board-nav.js";
10
+ import { EmptyState } from "./empty-state.js";
11
+ import { useScrolledEdge } from "./event-list-scroll.js";
12
+ const DEFAULT_EMPTY = { title: "Nothing on the board" };
13
+ const SKELETON_COLUMNS = 3;
14
+ const SKELETON_CARDS = 3;
15
+ const cardKey = (col, card) => `${col}\0${card}`;
16
+ function ColumnSwitcher({
17
+ label,
18
+ items,
19
+ value,
20
+ onChange,
21
+ disabled = false
22
+ }) {
23
+ return (
24
+ // theme-allow raw-selection-control — the board's own column switcher, its selection is the board's own (a `field` when given, else internal), not a page filter.
25
+ /* @__PURE__ */ jsx(
26
+ SegmentedControl,
27
+ {
28
+ "aria-label": `${label} column`,
29
+ disabled,
30
+ fullWidth: true,
31
+ size: "ctl",
32
+ value,
33
+ ...onChange !== void 0 && { onChange },
34
+ data: items.map((i) => ({ value: i.id, label: i.text }))
35
+ }
36
+ )
37
+ );
38
+ }
39
+ function SkeletonColumn({ title }) {
40
+ return /* @__PURE__ */ jsxs("div", { className: classes.column, "aria-hidden": true, children: [
41
+ /* @__PURE__ */ jsx("div", { className: classes.head, children: title === void 0 ? /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonTitle }) : /* @__PURE__ */ jsx("span", { className: classes.title, children: title }) }),
42
+ /* @__PURE__ */ jsx("div", { className: classes.list, children: Array.from({ length: SKELETON_CARDS }, (_, i) => /* @__PURE__ */ jsxs(Card, { className: classes.card, children: [
43
+ /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonCaption }),
44
+ /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonLine }),
45
+ /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonStatus })
46
+ ] }, i)) })
47
+ ] });
48
+ }
49
+ function FieldBoard({
50
+ field,
51
+ ...props
52
+ }) {
53
+ const [picked, setPicked] = field.use();
54
+ return /* @__PURE__ */ jsx(BoardView, { ...props, picked, onPick: setPicked });
55
+ }
56
+ function InternalBoard(props) {
57
+ const [picked, setPicked] = useState(void 0);
58
+ return /* @__PURE__ */ jsx(BoardView, { ...props, picked, onPick: setPicked });
59
+ }
60
+ function Board({ field, ...props }) {
61
+ return field === void 0 ? /* @__PURE__ */ jsx(InternalBoard, { ...props }) : /* @__PURE__ */ jsx(FieldBoard, { field, ...props });
62
+ }
63
+ function ColumnScroll({ height, children }) {
64
+ const [viewport, setViewport] = useState(null);
65
+ useScrolledEdge(viewport);
66
+ return /* @__PURE__ */ jsx(
67
+ ScrollArea.Autosize,
68
+ {
69
+ ...height !== void 0 && { mah: height },
70
+ type: "auto",
71
+ offsetScrollbars: "y",
72
+ viewportRef: setViewport,
73
+ scrollbarSize: 6,
74
+ classNames: { viewport: classes.viewport, thumb: classes.thumb },
75
+ children
76
+ }
77
+ );
78
+ }
79
+ function BoardView({
80
+ label = "Board",
81
+ columns,
82
+ onOpen,
83
+ height,
84
+ loading = false,
85
+ empty = DEFAULT_EMPTY,
86
+ picked,
87
+ onPick,
88
+ className,
89
+ style,
90
+ ...rest
91
+ }) {
92
+ const compact = useSizeClass() === "compact";
93
+ const labelId = useId();
94
+ const [active, setActive] = useState(null);
95
+ const [announcement, setAnnouncement] = useState("");
96
+ const buttons = useRef(/* @__PURE__ */ new Map());
97
+ const pending = useRef(null);
98
+ const sizes = columns.map((c) => c.cards.length);
99
+ const total = sizes.reduce((a, b) => a + b, 0);
100
+ const selected = columns.find((c) => c.id === picked) ?? columns[0];
101
+ const selectColumn = onPick;
102
+ const selectedIndex = selected === void 0 ? -1 : columns.indexOf(selected);
103
+ const rendered = (colIndex) => !compact || colIndex === selectedIndex;
104
+ const firstCol = columns.findIndex((c, i) => rendered(i) && c.cards.length > 0);
105
+ const activeCol = columns.findIndex((c) => c.id === active?.col);
106
+ const activeRow = columns[activeCol]?.cards.findIndex((c) => c.id === active?.card) ?? -1;
107
+ const stop = activeCol >= 0 && activeRow >= 0 && rendered(activeCol) ? { col: activeCol, row: activeRow } : firstCol >= 0 ? { col: firstCol, row: 0 } : null;
108
+ useEffect(() => {
109
+ const key = pending.current;
110
+ if (key === null) return;
111
+ pending.current = null;
112
+ buttons.current.get(key)?.focus();
113
+ });
114
+ const onKeyDown = (event, from) => {
115
+ if (!isBoardKey(event.key)) return;
116
+ event.preventDefault();
117
+ const to = moveOnBoard(sizes, from, event.key);
118
+ const col = to && columns[to.col];
119
+ const card = col && col.cards[to.row];
120
+ if (!to || !col || !card) return;
121
+ pending.current = cardKey(col.id, card.id);
122
+ setActive({ col: col.id, card: card.id });
123
+ setAnnouncement(`${col.title}, card ${to.row + 1} of ${col.cards.length}: ${card.title}`);
124
+ if (compact && col.id !== selected?.id) selectColumn(col.id);
125
+ };
126
+ const renderColumn = (col, colIndex) => {
127
+ const headId = `${labelId}-${col.id}`;
128
+ const list = col.cards.length === 0 ? /* @__PURE__ */ jsx(EmptyState, { tier: "section", title: col.empty ?? "Nothing here" }) : (
129
+ // The explicit role is deliberate: `list-style: none` makes Safari/VoiceOver drop the implicit one.
130
+ // oxlint-disable-next-line jsx-a11y/no-redundant-roles
131
+ /* @__PURE__ */ jsx("ul", { className: classes.list, role: "list", "aria-labelledby": headId, children: col.cards.map((card, row) => {
132
+ const here = stop?.col === colIndex && stop.row === row;
133
+ const caption = [card.actor, card.type].filter(Boolean).join(" \xB7 ");
134
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(Card, { className: classes.card, children: [
135
+ caption !== "" && /* @__PURE__ */ jsx("p", { className: classes.caption, children: caption }),
136
+ /* @__PURE__ */ jsx(
137
+ "button",
138
+ {
139
+ type: "button",
140
+ className: classes.open,
141
+ tabIndex: here ? 0 : -1,
142
+ ref: (el) => {
143
+ const key = cardKey(col.id, card.id);
144
+ if (el) buttons.current.set(key, el);
145
+ else buttons.current.delete(key);
146
+ },
147
+ onFocus: () => setActive({ col: col.id, card: card.id }),
148
+ onKeyDown: (e) => onKeyDown(e, { col: colIndex, row }),
149
+ onClick: () => onOpen?.(card.id, col.id),
150
+ children: card.title
151
+ }
152
+ ),
153
+ card.record !== void 0 && (card.record.href !== void 0 && isSafeHref(card.record.href) ? /* @__PURE__ */ jsx(
154
+ "a",
155
+ {
156
+ className: classes.record,
157
+ href: card.record.href,
158
+ .../^https?:/i.test(card.record.href) && {
159
+ target: "_blank",
160
+ rel: "noreferrer"
161
+ },
162
+ children: card.record.label
163
+ }
164
+ ) : /* @__PURE__ */ jsx("span", { className: classes.record, children: card.record.label })),
165
+ card.status !== void 0 && /* @__PURE__ */ jsx("p", { className: classes.status, children: card.status }),
166
+ card.meter !== void 0 && /* @__PURE__ */ jsx("div", { className: classes.meter, children: card.meter })
167
+ ] }) }, card.id);
168
+ }) })
169
+ );
170
+ return (
171
+ // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role -- a named group of cards, not a fieldset
172
+ /* @__PURE__ */ jsxs("div", { className: classes.column, role: "group", "aria-labelledby": headId, children: [
173
+ /* @__PURE__ */ jsxs("div", { className: classes.head, children: [
174
+ !compact && /* @__PURE__ */ jsx(StatusDot, { color: col.tone ?? VX.muted }),
175
+ /* @__PURE__ */ jsxs("h3", { id: headId, className: classes.title, children: [
176
+ compact ? /* @__PURE__ */ jsx(VisuallyHidden, { children: col.title }) : col.title,
177
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: `, ${col.cards.length} ${col.cards.length === 1 ? "card" : "cards"}` })
178
+ ] }),
179
+ !compact && /* @__PURE__ */ jsx("span", { className: classes.count, "aria-hidden": true, children: col.cards.length }),
180
+ col.total !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.total, children: col.total })
181
+ ] }),
182
+ /* @__PURE__ */ jsx(ColumnScroll, { ...height !== void 0 && { height }, children: list })
183
+ ] }, col.id)
184
+ );
185
+ };
186
+ let content;
187
+ if (loading) {
188
+ content = /* @__PURE__ */ jsxs("div", { "aria-busy": "true", children: [
189
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: `Loading ${label}` }),
190
+ compact && columns.length > 0 && // The loaded switcher's footprint with the titles it will carry, inert until the cards land.
191
+ /* @__PURE__ */ jsx(
192
+ ColumnSwitcher,
193
+ {
194
+ label,
195
+ disabled: true,
196
+ value: selected?.id ?? "",
197
+ items: columns.map((c) => ({ id: c.id, text: c.title }))
198
+ }
199
+ ),
200
+ /* @__PURE__ */ jsx("div", { className: classes.columns, children: compact ? /* @__PURE__ */ jsx(SkeletonColumn, {}) : columns.length > 0 ? columns.map((c) => /* @__PURE__ */ jsx(SkeletonColumn, { title: c.title }, c.id)) : Array.from({ length: SKELETON_COLUMNS }, (_, i) => /* @__PURE__ */ jsx(SkeletonColumn, {}, i)) })
201
+ ] });
202
+ } else if (total === 0) {
203
+ content = // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role -- a polite live region whose name is the visually hidden label inside
204
+ /* @__PURE__ */ jsxs("div", { className: classes.empty, role: "status", children: [
205
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: label }),
206
+ /* @__PURE__ */ jsx(
207
+ EmptyState,
208
+ {
209
+ tier: "section",
210
+ title: empty.title,
211
+ ...empty.description !== void 0 && { description: empty.description },
212
+ ...empty.action !== void 0 && { action: empty.action }
213
+ }
214
+ )
215
+ ] });
216
+ } else {
217
+ content = /* @__PURE__ */ jsxs(Fragment, { children: [
218
+ compact && /* @__PURE__ */ jsx(
219
+ ColumnSwitcher,
220
+ {
221
+ label,
222
+ value: selected?.id ?? "",
223
+ onChange: (id) => {
224
+ const col = columns.find((c) => c.id === id);
225
+ if (col) selectColumn(col.id);
226
+ },
227
+ items: columns.map((c) => ({ id: c.id, text: `${c.title} ${c.cards.length}` }))
228
+ }
229
+ ),
230
+ /* @__PURE__ */ jsx("div", { className: classes.columns, children: compact ? selected && renderColumn(selected, columns.indexOf(selected)) : columns.map(renderColumn) }),
231
+ /* @__PURE__ */ jsx(VisuallyHidden, { component: "output", "aria-live": "polite", children: announcement })
232
+ ] });
233
+ }
234
+ return /* @__PURE__ */ jsx(
235
+ "div",
236
+ {
237
+ ...pickDataAttributes(rest),
238
+ className: cx(classes.root, className),
239
+ style,
240
+ "data-board": "",
241
+ children: content
242
+ }
243
+ );
244
+ }
245
+ export {
246
+ Board
247
+ };
@@ -0,0 +1,179 @@
1
+ /*
2
+ * Board (docs/waves/design-parity/SPEC.md § 6.8). Columns share the row; each scrolls alone inside a
3
+ * Mantine ScrollArea bounded by `height`. Cards are Mantine Cards: the theme owns inset, radius and
4
+ * surface, so nothing here sets them. The open button is stretched over its card (one click target,
5
+ * one tab stop); the record link and the meter slot sit above that overlay.
6
+ */
7
+ .root {
8
+ inline-size: 100%;
9
+ min-width: 0;
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: var(--vx-space-stack-sm);
13
+ }
14
+
15
+ .columns {
16
+ display: flex;
17
+ align-items: flex-start;
18
+ gap: var(--vx-space-stack-sm);
19
+ }
20
+
21
+ .column {
22
+ flex: 1 1 0;
23
+ min-width: 0;
24
+ display: flex;
25
+ flex-direction: column;
26
+ gap: var(--vx-space-stack-sm);
27
+ }
28
+
29
+ /* A bottom fade while more cards sit below the fold (`data-more`, set by `ColumnScroll`). A mask, not a
30
+ gradient of the page colour: a Board in a `Section` sits on the panel surface, and a fade to the
31
+ page colour (W50) left a 16 px band that read as no fade at all. The mask dissolves the cards
32
+ themselves, so it shows on any backdrop, and adds no height. */
33
+ .viewport[data-more] {
34
+ --board-fade: calc(var(--vx-space-stack-lg, 1.5rem) * 2);
35
+ mask-image: linear-gradient(to bottom, black calc(100% - var(--board-fade)), transparent);
36
+ }
37
+
38
+ /* A quiet thumb: 6 px, a faint ink tint that firms on hover, no rail behind it (Mantine's default is a
39
+ heavy grey bar that read as chrome on the page). */
40
+ .thumb {
41
+ background: color-mix(in srgb, var(--vx-ink) 22%, transparent);
42
+ }
43
+
44
+ .thumb:hover {
45
+ background: color-mix(in srgb, var(--vx-ink) 40%, transparent);
46
+ }
47
+
48
+ .head {
49
+ display: flex;
50
+ align-items: center;
51
+ gap: var(--vx-space-control-gap);
52
+ min-width: 0;
53
+ }
54
+
55
+ .title {
56
+ margin: 0;
57
+ min-width: 0;
58
+ overflow: hidden;
59
+ text-overflow: ellipsis;
60
+ white-space: nowrap;
61
+ font-size: var(--vx-text-sm);
62
+ font-weight: 500;
63
+ color: var(--vx-ink);
64
+ }
65
+
66
+ .count {
67
+ font-family: var(--basalt-font-mono);
68
+ font-size: var(--vx-text-micro);
69
+ color: var(--vx-muted);
70
+ }
71
+
72
+ .total {
73
+ margin-inline-start: auto;
74
+ font-family: var(--basalt-font-mono);
75
+ font-size: var(--vx-text-micro);
76
+ color: var(--vx-muted);
77
+ white-space: nowrap;
78
+ }
79
+
80
+ .list {
81
+ margin: 0;
82
+ padding: 0;
83
+ list-style: none;
84
+ display: flex;
85
+ flex-direction: column;
86
+ /* 6 px at level 0, riding the density multiplier like every other step. */
87
+ gap: calc(var(--vx-space-stack-xs) * 1.5);
88
+ }
89
+
90
+ .card {
91
+ position: relative;
92
+ display: flex;
93
+ flex-direction: column;
94
+ gap: var(--vx-space-stack-xs);
95
+ min-width: 0;
96
+ overflow-wrap: anywhere;
97
+ }
98
+
99
+ .caption {
100
+ margin: 0;
101
+ font-family: var(--basalt-font-mono);
102
+ font-size: var(--vx-text-micro);
103
+ color: var(--vx-muted);
104
+ }
105
+
106
+ .open {
107
+ all: unset;
108
+ display: block;
109
+ font-size: var(--vx-text-sm);
110
+ color: var(--vx-ink);
111
+ cursor: pointer;
112
+ }
113
+
114
+ /* The whole card is the target. */
115
+ .open::after {
116
+ content: '';
117
+ position: absolute;
118
+ inset: 0;
119
+ border-radius: inherit;
120
+ }
121
+
122
+ .open:focus-visible::after {
123
+ outline: 2px solid var(--vx-focus-ring, var(--mantine-primary-color-filled));
124
+ outline-offset: 1px;
125
+ }
126
+
127
+ .record,
128
+ .meter {
129
+ position: relative;
130
+ z-index: 1;
131
+ font-size: var(--vx-text-xs);
132
+ }
133
+
134
+ /* The record link is chrome, not an accent site (SPEC § 6.12): ink in both schemes, and a visited
135
+ record never changes colour. */
136
+ a.record,
137
+ a.record:visited {
138
+ color: var(--vx-ink);
139
+ text-decoration: none;
140
+ }
141
+
142
+ a.record:hover {
143
+ text-decoration: underline;
144
+ }
145
+
146
+ a.record:focus-visible {
147
+ outline: 2px solid var(--vx-focus-ring, var(--mantine-primary-color-filled));
148
+ outline-offset: 1px;
149
+ }
150
+
151
+ .status {
152
+ margin: 0;
153
+ font-size: var(--vx-text-xs);
154
+ color: var(--vx-muted);
155
+ }
156
+
157
+ .empty {
158
+ display: block;
159
+ }
160
+
161
+ .skeletonTitle {
162
+ inline-size: 40%;
163
+ block-size: 0.75rem;
164
+ }
165
+
166
+ .skeletonCaption {
167
+ inline-size: 35%;
168
+ block-size: 0.5rem;
169
+ }
170
+
171
+ .skeletonLine {
172
+ inline-size: 85%;
173
+ block-size: 0.75rem;
174
+ }
175
+
176
+ .skeletonStatus {
177
+ inline-size: 50%;
178
+ block-size: 0.5rem;
179
+ }