@cosmicdrift/kumiko-renderer 0.413.0 → 0.414.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 (339) hide show
  1. package/dist/app/action-form-support.js +4 -0
  2. package/dist/app/content-previews.d.ts +39 -0
  3. package/dist/app/content-previews.js +28 -0
  4. package/dist/app/entity-edit-screen.js +2 -5
  5. package/dist/app/entity-list-screen.js +30 -50
  6. package/dist/app/form-schema.d.ts +1 -0
  7. package/dist/app/form-schema.js +24 -0
  8. package/dist/app/list-sort-options.d.ts +4 -0
  9. package/dist/app/list-sort-options.js +11 -0
  10. package/dist/app/named-filter-facet.d.ts +17 -3
  11. package/dist/app/named-filter-facet.js +88 -5
  12. package/dist/app/projection-detail-body.d.ts +2 -4
  13. package/dist/app/projection-detail-body.js +7 -1
  14. package/dist/app/projection-detail-guidance-data.d.ts +7 -0
  15. package/dist/app/projection-detail-guidance-data.js +101 -0
  16. package/dist/app/projection-detail-guidance.d.ts +13 -0
  17. package/dist/app/projection-detail-guidance.js +197 -0
  18. package/dist/app/projection-detail-header-model.d.ts +1 -3
  19. package/dist/app/projection-detail-header-model.js +4 -8
  20. package/dist/app/projection-detail-header-region.d.ts +2 -1
  21. package/dist/app/projection-detail-header-region.js +63 -23
  22. package/dist/app/projection-detail-header.d.ts +6 -1
  23. package/dist/app/projection-detail-header.js +75 -18
  24. package/dist/app/projection-detail-states.d.ts +3 -3
  25. package/dist/app/projection-list-body.js +4 -2
  26. package/dist/app/projection-list-render.js +3 -1
  27. package/dist/app/projection-list-shim.d.ts +4 -1
  28. package/dist/app/projection-list-shim.js +35 -8
  29. package/dist/app/reference-link.d.ts +3 -2
  30. package/dist/app/reference-link.js +19 -4
  31. package/dist/app/row-actions.js +3 -3
  32. package/dist/app/screen-access.d.ts +4 -0
  33. package/dist/app/screen-access.js +19 -0
  34. package/dist/app/screen-shared.js +3 -1
  35. package/dist/app/unique-label-keys.d.ts +1 -0
  36. package/dist/app/unique-label-keys.js +9 -0
  37. package/dist/app/use-entity-list-payload.d.ts +25 -0
  38. package/dist/app/use-entity-list-payload.js +57 -0
  39. package/dist/app/use-entity-range-facets.js +2 -3
  40. package/dist/app/use-facet-counts.d.ts +5 -0
  41. package/dist/app/use-facet-counts.js +7 -0
  42. package/dist/app/use-list-summary-row.d.ts +10 -0
  43. package/dist/app/use-list-summary-row.js +33 -0
  44. package/dist/app/use-named-filter-queue.d.ts +20 -0
  45. package/dist/app/use-named-filter-queue.js +9 -0
  46. package/dist/app/use-projection-detail-actions.d.ts +4 -4
  47. package/dist/app/use-projection-detail-actions.js +30 -1
  48. package/dist/app/use-projection-list-data.d.ts +5 -0
  49. package/dist/app/use-projection-list-data.js +35 -6
  50. package/dist/app/use-projection-list-query.d.ts +2 -0
  51. package/dist/app/use-projection-list-query.js +29 -16
  52. package/dist/app/use-related-list-tab-counts.js +5 -1
  53. package/dist/app/use-row-decoration.d.ts +11 -0
  54. package/dist/app/use-row-decoration.js +55 -0
  55. package/dist/app/use-screen-list-rows.d.ts +4 -1
  56. package/dist/app/use-screen-list-rows.js +14 -5
  57. package/dist/app/use-screen-list-table.d.ts +3 -1
  58. package/dist/app/use-screen-list-table.js +10 -1
  59. package/dist/app/write-failed-error.d.ts +1 -0
  60. package/dist/app/write-failed-error.js +10 -0
  61. package/dist/compact-tap-classes.d.ts +1 -0
  62. package/dist/compact-tap-classes.js +3 -0
  63. package/dist/components/embedded-list-field.js +13 -12
  64. package/dist/components/form-pending-uploads.d.ts +8 -0
  65. package/dist/components/form-pending-uploads.js +27 -0
  66. package/dist/components/list-empty-state.d.ts +8 -1
  67. package/dist/components/list-empty-state.js +4 -1
  68. package/dist/components/list-group-page-bridges.d.ts +1 -1
  69. package/dist/components/list-group-page-bridges.js +2 -2
  70. package/dist/components/related-list-section.js +4 -22
  71. package/dist/components/render-edit-action-button.d.ts +3 -1
  72. package/dist/components/render-edit-action-button.js +5 -3
  73. package/dist/components/render-edit-form-actions.js +6 -3
  74. package/dist/components/render-edit-layout.js +2 -1
  75. package/dist/components/render-edit-render-model.d.ts +2 -2
  76. package/dist/components/render-edit-submit.js +2 -1
  77. package/dist/components/render-edit-types.d.ts +4 -2
  78. package/dist/components/render-edit.js +3 -1
  79. package/dist/components/render-list-hint-columns.d.ts +8 -0
  80. package/dist/components/render-list-hint-columns.js +77 -0
  81. package/dist/components/render-list-reference-columns.js +4 -2
  82. package/dist/components/render-list-row-tone.d.ts +3 -0
  83. package/dist/components/render-list-row-tone.js +10 -0
  84. package/dist/components/render-list-table-props.d.ts +9 -1
  85. package/dist/components/render-list-table-props.js +4 -1
  86. package/dist/components/render-list-toolbar-action.d.ts +1 -2
  87. package/dist/components/render-list-toolbar-model.d.ts +3 -0
  88. package/dist/components/render-list-toolbar-model.js +21 -6
  89. package/dist/components/render-list-toolbar.d.ts +3 -2
  90. package/dist/components/render-list-toolbar.js +8 -6
  91. package/dist/components/render-list-types.d.ts +6 -1
  92. package/dist/components/render-list.js +26 -7
  93. package/dist/components/use-render-edit-controlled-sync.js +5 -4
  94. package/dist/components/use-render-edit-draft-save.js +7 -9
  95. package/dist/components/use-render-edit-schema.d.ts +3 -0
  96. package/dist/components/use-render-edit-schema.js +15 -0
  97. package/dist/components/use-render-edit-state.d.ts +4 -0
  98. package/dist/components/use-render-edit-state.js +9 -1
  99. package/dist/components/use-render-edit-steps.js +2 -3
  100. package/dist/components/use-render-list-columns.d.ts +3 -1
  101. package/dist/components/use-render-list-columns.js +22 -10
  102. package/dist/context/screen-focus-context.d.ts +14 -0
  103. package/dist/context/screen-focus-context.js +28 -0
  104. package/dist/data-table-facet-types.d.ts +2 -0
  105. package/dist/data-table-view-types.d.ts +20 -1
  106. package/dist/headless/form/form-controller.js +3 -1
  107. package/dist/headless/form/zod-bridge.d.ts +7 -1
  108. package/dist/headless/form/zod-bridge.js +10 -0
  109. package/dist/headless/index.d.ts +2 -1
  110. package/dist/headless/index.js +1 -0
  111. package/dist/headless/pwa-service-worker-meta.d.ts +1 -0
  112. package/dist/headless/pwa-service-worker-meta.js +3 -0
  113. package/dist/headless/view-model/index.d.ts +1 -1
  114. package/dist/headless/view-model/list-file-display.js +3 -2
  115. package/dist/headless/view-model/list.js +16 -0
  116. package/dist/headless/view-model/types.d.ts +33 -0
  117. package/dist/hooks/list-column-layout.js +2 -1
  118. package/dist/hooks/list-server-groups.js +14 -1
  119. package/dist/hooks/list-state-schema.d.ts +1 -0
  120. package/dist/hooks/list-state-schema.js +9 -1
  121. package/dist/hooks/use-debounced-value.d.ts +1 -0
  122. package/dist/hooks/use-debounced-value.js +11 -0
  123. package/dist/hooks/use-list-aggregates.d.ts +5 -1
  124. package/dist/hooks/use-list-aggregates.js +9 -5
  125. package/dist/hooks/use-list-table.d.ts +2 -1
  126. package/dist/hooks/use-list-table.js +3 -9
  127. package/dist/hooks/use-list-url-state.d.ts +2 -0
  128. package/dist/hooks/use-list-url-state.js +12 -4
  129. package/dist/hooks/use-list-view-state.js +23 -3
  130. package/dist/hooks/use-reference-lookup.js +7 -2
  131. package/dist/hooks/use-remembered-list-params.d.ts +6 -2
  132. package/dist/hooks/use-remembered-list-params.js +18 -3
  133. package/dist/hooks/use-store.js +0 -1
  134. package/dist/i18n-defaults.js +37 -2
  135. package/dist/index.d.ts +8 -2
  136. package/dist/index.js +5 -1
  137. package/dist/live/dispatcher-live.js +2 -0
  138. package/dist/metric-types.d.ts +2 -0
  139. package/dist/primitives-record-guidance.d.ts +53 -0
  140. package/dist/primitives-record-guidance.js +1 -0
  141. package/dist/primitives.d.ts +41 -31
  142. package/dist/server-clock.d.ts +6 -0
  143. package/dist/server-clock.js +20 -0
  144. package/dist/session/session-ended.d.ts +1 -0
  145. package/dist/session/session-ended.js +2 -2
  146. package/dist/status-tone.d.ts +1 -0
  147. package/dist/status-tone.js +5 -0
  148. package/dist/web/app/browser-locale.js +1 -1
  149. package/dist/web/app/client-plugin.d.ts +6 -1
  150. package/dist/web/app/create-app.d.ts +2 -1
  151. package/dist/web/app/create-app.js +15 -5
  152. package/dist/web/app/dashboard-body.js +25 -11
  153. package/dist/web/app/dashboard-header.d.ts +2 -1
  154. package/dist/web/app/dashboard-header.js +19 -7
  155. package/dist/web/app/dashboard-list-panel.d.ts +12 -0
  156. package/dist/web/app/dashboard-list-panel.js +149 -0
  157. package/dist/web/app/dashboard-narrow-gate.d.ts +6 -0
  158. package/dist/web/app/dashboard-narrow-gate.js +6 -0
  159. package/dist/web/app/dashboard-narrow-order.d.ts +3 -0
  160. package/dist/web/app/dashboard-narrow-order.js +6 -0
  161. package/dist/web/app/dashboard-navigation-link.d.ts +12 -0
  162. package/dist/web/app/dashboard-navigation-link.js +21 -0
  163. package/dist/web/app/dashboard-panels.d.ts +6 -23
  164. package/dist/web/app/dashboard-panels.js +53 -123
  165. package/dist/web/app/dashboard-reference-list-table.d.ts +5 -1
  166. package/dist/web/app/dashboard-reference-list-table.js +12 -4
  167. package/dist/web/app/dashboard-shared.d.ts +23 -7
  168. package/dist/web/app/dashboard-shared.js +44 -17
  169. package/dist/web/app/dashboard-stat-group-panel.d.ts +13 -0
  170. package/dist/web/app/dashboard-stat-group-panel.js +67 -0
  171. package/dist/web/app/dashboard-text-panel.d.ts +12 -0
  172. package/dist/web/app/dashboard-text-panel.js +163 -0
  173. package/dist/web/app/dashboard-text.d.ts +2 -0
  174. package/dist/web/app/dashboard-text.js +1 -1
  175. package/dist/web/app/dashboard-visibility.js +1 -1
  176. package/dist/web/app/relative-time.js +2 -1
  177. package/dist/web/editor/editor-footer.d.ts +28 -0
  178. package/dist/web/editor/editor-footer.js +23 -0
  179. package/dist/web/editor/editor-frame.d.ts +23 -0
  180. package/dist/web/editor/editor-frame.js +24 -0
  181. package/dist/web/editor/editor-header.d.ts +36 -0
  182. package/dist/web/editor/editor-header.js +30 -0
  183. package/dist/web/editor/editor-rail.d.ts +32 -0
  184. package/dist/web/editor/editor-rail.js +37 -0
  185. package/dist/web/editor/editor-workbench.d.ts +34 -0
  186. package/dist/web/editor/editor-workbench.js +19 -0
  187. package/dist/web/editor/index.d.ts +6 -0
  188. package/dist/web/editor/index.js +6 -0
  189. package/dist/web/editor/relative-when.d.ts +1 -0
  190. package/dist/web/editor/relative-when.js +18 -0
  191. package/dist/web/index.d.ts +7 -1
  192. package/dist/web/index.js +5 -1
  193. package/dist/web/layout/default-app-shell.js +6 -4
  194. package/dist/web/layout/focus-aware-sidebar.d.ts +4 -7
  195. package/dist/web/layout/focus-aware-sidebar.js +5 -7
  196. package/dist/web/layout/header-action-pinned.d.ts +8 -0
  197. package/dist/web/layout/header-action-pinned.js +25 -0
  198. package/dist/web/layout/nav-collapse-state.d.ts +5 -0
  199. package/dist/web/layout/nav-collapse-state.js +66 -0
  200. package/dist/web/layout/nav-tree.js +25 -5
  201. package/dist/web/layout/page-header-slot.d.ts +2 -0
  202. package/dist/web/layout/page-header-slot.js +4 -0
  203. package/dist/web/layout/screen-focus.d.ts +8 -0
  204. package/dist/web/layout/screen-focus.js +42 -0
  205. package/dist/web/layout/shell-focus.d.ts +6 -5
  206. package/dist/web/layout/shell-focus.js +12 -9
  207. package/dist/web/layout/shell-header.js +38 -10
  208. package/dist/web/layout/sidebar-open-state.d.ts +6 -0
  209. package/dist/web/layout/sidebar-open-state.js +28 -0
  210. package/dist/web/layout/uniform-bar-controls.d.ts +2 -2
  211. package/dist/web/layout/uniform-bar-controls.js +4 -3
  212. package/dist/web/layout/use-in-app-inbox.js +8 -1
  213. package/dist/web/layout/workspace-shell.js +6 -4
  214. package/dist/web/lib/upload-file-ref.d.ts +2 -2
  215. package/dist/web/lib/upload-file-ref.js +4 -9
  216. package/dist/web/presence/use-presence.js +7 -2
  217. package/dist/web/primitives/banner.d.ts +1 -1
  218. package/dist/web/primitives/banner.js +14 -6
  219. package/dist/web/primitives/calendar-day-picker.js +24 -5
  220. package/dist/web/primitives/card.js +1 -1
  221. package/dist/web/primitives/code-input.js +6 -1
  222. package/dist/web/primitives/data-table/actions-column.d.ts +1 -0
  223. package/dist/web/primitives/data-table/actions-column.js +4 -2
  224. package/dist/web/primitives/data-table/card-body.d.ts +5 -0
  225. package/dist/web/primitives/data-table/card-body.js +47 -5
  226. package/dist/web/primitives/data-table/card-frame.d.ts +8 -0
  227. package/dist/web/primitives/data-table/card-frame.js +9 -0
  228. package/dist/web/primitives/data-table/card-row.js +40 -7
  229. package/dist/web/primitives/data-table/card-sort-select.d.ts +6 -2
  230. package/dist/web/primitives/data-table/card-sort-select.js +10 -7
  231. package/dist/web/primitives/data-table/card-view.js +12 -2
  232. package/dist/web/primitives/data-table/column-picker-section.js +9 -2
  233. package/dist/web/primitives/data-table/column-resize-handle.js +3 -4
  234. package/dist/web/primitives/data-table/column-role.d.ts +1 -0
  235. package/dist/web/primitives/data-table/column-role.js +1 -0
  236. package/dist/web/primitives/data-table/data-cell-props.d.ts +5 -0
  237. package/dist/web/primitives/data-table/data-cell-props.js +5 -0
  238. package/dist/web/primitives/data-table/density.js +1 -0
  239. package/dist/web/primitives/data-table/facet-cluster.d.ts +2 -1
  240. package/dist/web/primitives/data-table/facet-cluster.js +2 -2
  241. package/dist/web/primitives/data-table/group-band.js +4 -0
  242. package/dist/web/primitives/data-table/hint-cell.d.ts +16 -0
  243. package/dist/web/primitives/data-table/hint-cell.js +74 -0
  244. package/dist/web/primitives/data-table/hint-column-width.d.ts +3 -0
  245. package/dist/web/primitives/data-table/hint-column-width.js +11 -0
  246. package/dist/web/primitives/data-table/measure-value.js +2 -3
  247. package/dist/web/primitives/data-table/row-action-column.d.ts +3 -0
  248. package/dist/web/primitives/data-table/row-action-column.js +4 -0
  249. package/dist/web/primitives/data-table/sort-options-select.d.ts +22 -0
  250. package/dist/web/primitives/data-table/sort-options-select.js +46 -0
  251. package/dist/web/primitives/data-table/sortable-header.d.ts +3 -1
  252. package/dist/web/primitives/data-table/sortable-header.js +5 -3
  253. package/dist/web/primitives/data-table/table-body.d.ts +1 -1
  254. package/dist/web/primitives/data-table/table-body.js +5 -3
  255. package/dist/web/primitives/data-table/table-chrome.js +3 -1
  256. package/dist/web/primitives/data-table/table-content.js +10 -5
  257. package/dist/web/primitives/data-table/table-data-cell.js +9 -3
  258. package/dist/web/primitives/data-table/table-header-row.js +5 -2
  259. package/dist/web/primitives/data-table/table-view.js +17 -3
  260. package/dist/web/primitives/data-table/toolbar-end-cluster.js +1 -1
  261. package/dist/web/primitives/data-table/toolbar.js +31 -3
  262. package/dist/web/primitives/data-table/totals-footer.d.ts +20 -0
  263. package/dist/web/primitives/data-table/totals-footer.js +40 -9
  264. package/dist/web/primitives/data-table/use-bulk-selection.js +2 -1
  265. package/dist/web/primitives/data-table/use-column-pins.js +4 -0
  266. package/dist/web/primitives/data-table/use-data-table-state.d.ts +1 -0
  267. package/dist/web/primitives/data-table/use-data-table-state.js +9 -5
  268. package/dist/web/primitives/data-table/use-measured-column-widths.js +5 -4
  269. package/dist/web/primitives/data-table/use-row-selection.js +22 -11
  270. package/dist/web/primitives/data-table/view-menu.js +7 -1
  271. package/dist/web/primitives/data-table-cell.d.ts +21 -2
  272. package/dist/web/primitives/data-table-cell.js +96 -19
  273. package/dist/web/primitives/embedded-file-cell.js +10 -6
  274. package/dist/web/primitives/embedded-list-cards.js +3 -4
  275. package/dist/web/primitives/facet-filter.d.ts +4 -2
  276. package/dist/web/primitives/facet-filter.js +26 -3
  277. package/dist/web/primitives/facet-search-filter.js +1 -1
  278. package/dist/web/primitives/file-thumbnail.d.ts +6 -2
  279. package/dist/web/primitives/file-thumbnail.js +13 -6
  280. package/dist/web/primitives/file-upload.js +15 -11
  281. package/dist/web/primitives/file-view-action.d.ts +6 -0
  282. package/dist/web/primitives/file-view-action.js +19 -0
  283. package/dist/web/primitives/files-dropzone.js +18 -4
  284. package/dist/web/primitives/form-footer-parts.d.ts +0 -1
  285. package/dist/web/primitives/form.js +0 -1
  286. package/dist/web/primitives/hint-reason-row.d.ts +32 -0
  287. package/dist/web/primitives/hint-reason-row.js +45 -0
  288. package/dist/web/primitives/index.js +6 -0
  289. package/dist/web/primitives/layout-elements.d.ts +1 -1
  290. package/dist/web/primitives/layout-elements.js +2 -2
  291. package/dist/web/primitives/metric.js +8 -6
  292. package/dist/web/primitives/page-header.d.ts +1 -1
  293. package/dist/web/primitives/page-header.js +8 -1
  294. package/dist/web/primitives/pager.js +29 -18
  295. package/dist/web/primitives/reason-box.d.ts +20 -0
  296. package/dist/web/primitives/reason-box.js +13 -0
  297. package/dist/web/primitives/record-breadcrumb.d.ts +3 -0
  298. package/dist/web/primitives/record-breadcrumb.js +11 -0
  299. package/dist/web/primitives/record-steps.d.ts +3 -0
  300. package/dist/web/primitives/record-steps.js +45 -0
  301. package/dist/web/primitives/record-summary.d.ts +3 -0
  302. package/dist/web/primitives/record-summary.js +18 -0
  303. package/dist/web/primitives/row-actions.d.ts +3 -1
  304. package/dist/web/primitives/row-actions.js +14 -5
  305. package/dist/web/primitives/segmented-select.js +5 -7
  306. package/dist/web/pwa/pwa-support.d.ts +4 -0
  307. package/dist/web/pwa/pwa-support.js +113 -0
  308. package/dist/web/sse/live-events.js +2 -2
  309. package/dist/web/tokens.js +0 -3
  310. package/dist/web/widgets/chart-parts.d.ts +7 -1
  311. package/dist/web/widgets/chart-parts.js +10 -4
  312. package/dist/web/widgets/collapsible-section.js +1 -1
  313. package/dist/web/widgets/dashboard-list-cards.d.ts +17 -0
  314. package/dist/web/widgets/dashboard-list-cards.js +54 -0
  315. package/dist/web/widgets/dashboard-list.d.ts +37 -5
  316. package/dist/web/widgets/dashboard-list.js +95 -20
  317. package/dist/web/widgets/drawer-sizing.js +1 -1
  318. package/dist/web/widgets/floating-panel.js +4 -2
  319. package/dist/web/widgets/index.d.ts +2 -0
  320. package/dist/web/widgets/index.js +2 -0
  321. package/dist/web/widgets/infinity-list.js +18 -11
  322. package/dist/web/widgets/preview-width-frame.d.ts +7 -0
  323. package/dist/web/widgets/preview-width-frame.js +10 -0
  324. package/dist/web/widgets/section-card.d.ts +1 -1
  325. package/dist/web/widgets/stacked-area-chrome.js +3 -3
  326. package/dist/web/widgets/stacked-area-tooltip.js +2 -10
  327. package/dist/web/widgets/stat-box-cell.d.ts +19 -0
  328. package/dist/web/widgets/stat-box-cell.js +10 -0
  329. package/dist/web/widgets/stat.d.ts +10 -1
  330. package/dist/web/widgets/stat.js +14 -5
  331. package/dist/web/widgets/status-badge.d.ts +7 -5
  332. package/dist/web/widgets/status-badge.js +2 -2
  333. package/dist/web/widgets/step-bar.d.ts +1 -1
  334. package/dist/web/widgets/step-bar.js +37 -7
  335. package/dist/web/widgets/upload-zone.d.ts +8 -1
  336. package/dist/web/widgets/upload-zone.js +13 -3
  337. package/package.json +5 -5
  338. package/src/changes.json +223 -0
  339. package/src/web/styles.css +9 -0
@@ -1,17 +1,38 @@
1
+ import type { DashboardListRowToneMarker, SelectOptionTone } from "@cosmicdrift/kumiko-framework/ui-types";
1
2
  import type { ReactNode } from "react";
3
+ import { type CellLink, type ListColumnHintViewModel, type RuntimeCellLink } from "../../headless/index.ts";
2
4
  export type DashboardListColumn = {
3
5
  readonly field: string;
4
6
  /** Translated by the caller. */
5
7
  readonly label: string;
6
- readonly display?: "bar" | "badge" | "datetime";
8
+ readonly display?: "bar" | "badge" | "datetime" | "button";
7
9
  readonly badgeToneField?: string;
10
+ readonly badgeDot?: false;
8
11
  /** Resolves the raw cell value to display text, e.g. a reference id to its label. */
9
12
  readonly renderValue?: (value: unknown, row: Readonly<Record<string, unknown>>) => string;
13
+ /** Links the rendered text to its target, e.g. a reference cell to the record's detail. */
14
+ readonly linkFor?: RuntimeCellLink;
15
+ /** "To do" cell; owns the rendering, `toneField` already defaulted by the caller. */
16
+ readonly hint?: ListColumnHintViewModel;
17
+ /** `showOnNarrowOnly`: drawn in the phone cards only, never as a table column. */
18
+ readonly narrowOnly?: true;
10
19
  };
11
- type Row = Readonly<Record<string, unknown>>;
12
- /** Compact 40px-row table for dashboard lists with optional bar/badge
13
- * columns. */
14
- export declare function DashboardListTable({ columns, rows, formatPercent, formatNumber, formatDateTime, translate, testId, }: {
20
+ export type DashboardListRow = Readonly<Record<string, unknown>>;
21
+ type Row = DashboardListRow;
22
+ export declare function DashboardListCell({ column, row, formatPercent, formatNumber, formatDateTime, translate, leading, }: {
23
+ /** Only a `hint` column takes it: it stands on the sentence's line, in front of it. */
24
+ readonly leading?: ReactNode;
25
+ readonly column: DashboardListColumn;
26
+ readonly row: Row;
27
+ readonly formatPercent: (fraction: number) => string;
28
+ readonly formatNumber: (value: number) => string;
29
+ readonly formatDateTime: (atMs: number) => string;
30
+ readonly translate: (key: string) => string;
31
+ }): ReactNode;
32
+ export declare function rowToneOf(row: Row, rowToneField: string | undefined): SelectOptionTone | undefined;
33
+ /** Compact table for dashboard lists with optional bar/badge columns. Badge columns in front of a
34
+ * `hint` column join the hint's first line; rows with a tone get 12px of padding above and below. */
35
+ export declare function DashboardListTable({ columns: allColumns, rows, formatPercent, formatNumber, formatDateTime, translate, testId, rowToneField, rowToneMarker, showHeader, rowLink, }: {
15
36
  readonly columns: readonly DashboardListColumn[];
16
37
  readonly rows: readonly Row[];
17
38
  readonly formatPercent: (fraction: number) => string;
@@ -19,5 +40,16 @@ export declare function DashboardListTable({ columns, rows, formatPercent, forma
19
40
  readonly formatDateTime: (atMs: number) => string;
20
41
  readonly translate: (key: string) => string;
21
42
  readonly testId?: string;
43
+ /** Row field holding a SelectOptionTone; tints the row. */
44
+ readonly rowToneField?: string;
45
+ /** "bar" (default): stripe at the row's left edge; "dot": small dot in front of the first cell. */
46
+ readonly rowToneMarker?: DashboardListRowToneMarker;
47
+ /** `false` drops the column header row. */
48
+ readonly showHeader?: boolean;
49
+ /** Row is a link: `linkFor` resolves the target per row, the icon sits in an extra last cell. */
50
+ readonly rowLink?: {
51
+ readonly linkFor: (row: Row) => CellLink | undefined;
52
+ readonly icon: "arrow" | "chevron";
53
+ };
22
54
  }): ReactNode;
23
55
  export {};
@@ -1,19 +1,22 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { EMPTY_VALUE_PLACEHOLDER } from "../../headless/index.js";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ArrowUpRight, ChevronRight } from "lucide-react";
3
+ import { EMPTY_VALUE_PLACEHOLDER, } from "../../headless/index.js";
4
+ import { isSelectOptionTone } from "../../status-tone.js";
5
+ import { cn } from "../lib/cn.js";
6
+ import { HintCell } from "../primitives/data-table/hint-cell.js";
7
+ import { CellTextLink, LINK_BUTTON_CLASS, LIST_BADGE_TONE, rowToneClass, toneDotClass, } from "../primitives/data-table-cell.js";
8
+ import { HintReasonRowScope, hintReasonOf } from "../primitives/hint-reason-row.js";
3
9
  import { StatusBadge } from "./status-badge.js";
4
- const BADGE_TONE = {
5
- positive: "ok",
6
- warn: "warn",
7
- negative: "bad",
8
- neutral: "muted",
9
- };
10
10
  function fractionOf(raw) {
11
11
  return typeof raw === "number" && Number.isFinite(raw) ? Math.max(0, Math.min(1, raw)) : 0;
12
12
  }
13
13
  // Rows may carry i18n keys (quota labels, failure reasons); translate falls back to the key itself.
14
14
  const I18N_KEY_SHAPE = /^[a-z][\w-]*(?:[:.][\w-]+)+$/i;
15
- function Cell({ column, row, formatPercent, formatNumber, formatDateTime, translate, }) {
15
+ export function DashboardListCell({ column, row, formatPercent, formatNumber, formatDateTime, translate, leading, }) {
16
16
  const raw = row[column.field];
17
+ if (column.hint !== undefined) {
18
+ return _jsx(HintCell, { value: raw, row: row, hint: column.hint, leading: leading });
19
+ }
17
20
  if (column.display === "bar") {
18
21
  const fraction = fractionOf(raw);
19
22
  return (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { role: "progressbar", "aria-valuenow": Math.round(fraction * 100), "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": column.label, className: "h-1 min-w-16 flex-1 overflow-hidden rounded-full bg-border", children: _jsx("div", { className: "h-full rounded-full bg-status-active", style: { width: `${fraction * 100}%` } }) }), _jsx("span", { className: "w-10 shrink-0 text-right tabular-nums text-muted-foreground", children: formatPercent(fraction) })] }));
@@ -22,8 +25,8 @@ function Cell({ column, row, formatPercent, formatNumber, formatDateTime, transl
22
25
  if (raw === undefined || raw === null || raw === "")
23
26
  return EMPTY_VALUE_PLACEHOLDER;
24
27
  const toneKey = column.badgeToneField !== undefined ? row[column.badgeToneField] : undefined;
25
- const tone = (typeof toneKey === "string" ? BADGE_TONE[toneKey] : undefined) ?? "muted";
26
- return _jsx(StatusBadge, { tone: tone, children: String(raw) });
28
+ const tone = (typeof toneKey === "string" ? LIST_BADGE_TONE[toneKey] : undefined) ?? "muted";
29
+ return (_jsx(StatusBadge, { tone: tone, dot: column.badgeDot !== false, children: String(raw) }));
27
30
  }
28
31
  if (column.display === "datetime") {
29
32
  const atMs = typeof raw === "number" ? raw : typeof raw === "string" ? Date.parse(raw) : Number.NaN;
@@ -31,17 +34,89 @@ function Cell({ column, row, formatPercent, formatNumber, formatDateTime, transl
31
34
  return EMPTY_VALUE_PLACEHOLDER;
32
35
  return _jsx("span", { className: "tabular-nums", children: formatDateTime(atMs) });
33
36
  }
34
- if (column.renderValue !== undefined)
35
- return column.renderValue(raw, row);
36
- if (typeof raw === "number")
37
- return _jsx("span", { className: "tabular-nums", children: formatNumber(raw) });
37
+ if (column.display === "button") {
38
+ const link = column.linkFor?.(raw, row);
39
+ if (raw === undefined || raw === null || raw === "")
40
+ return EMPTY_VALUE_PLACEHOLDER;
41
+ const text = column.renderValue?.(raw, row) ?? String(raw);
42
+ const label = I18N_KEY_SHAPE.test(text) ? translate(text) : text;
43
+ return link === undefined ? (label) : (_jsx(CellTextLink, { link: link, className: LINK_BUTTON_CLASS, children: label }));
44
+ }
45
+ if (column.renderValue !== undefined) {
46
+ const text = column.renderValue(raw, row);
47
+ const link = column.linkFor?.(raw, row);
48
+ return link === undefined ? text : _jsx(CellTextLink, { link: link, children: text });
49
+ }
50
+ const link = column.linkFor?.(raw, row);
51
+ if (typeof raw === "number") {
52
+ const number = _jsx("span", { className: "tabular-nums", children: formatNumber(raw) });
53
+ return link === undefined ? number : _jsx(CellTextLink, { link: link, children: number });
54
+ }
38
55
  if (raw === undefined || raw === null || raw === "")
39
56
  return EMPTY_VALUE_PLACEHOLDER;
40
57
  const text = String(raw);
41
- return I18N_KEY_SHAPE.test(text) ? translate(text) : text;
58
+ const shown = I18N_KEY_SHAPE.test(text) ? translate(text) : text;
59
+ return link === undefined ? shown : _jsx(CellTextLink, { link: link, children: shown });
60
+ }
61
+ export function rowToneOf(row, rowToneField) {
62
+ const value = rowToneField === undefined ? undefined : row[rowToneField];
63
+ return isSelectOptionTone(value) ? value : undefined;
64
+ }
65
+ function RowLinkIcon({ link, icon, label, }) {
66
+ if (link === undefined)
67
+ return null;
68
+ const Glyph = icon === "chevron" ? ChevronRight : ArrowUpRight;
69
+ return (_jsxs(CellTextLink, { link: link, className: "inline-flex text-muted-foreground hover:text-foreground", children: [_jsx(Glyph, { className: "size-4", "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: label })] }));
70
+ }
71
+ const INTERACTIVE_DESCENDANT_SELECTOR = "a, button";
72
+ function pressRowLink(event, link) {
73
+ if (link === undefined)
74
+ return;
75
+ if (event.target instanceof Element && event.target.closest(INTERACTIVE_DESCENDANT_SELECTOR)) {
76
+ return;
77
+ }
78
+ link.onPress();
79
+ }
80
+ function ToneDot({ tone }) {
81
+ return (_jsx("span", { "aria-hidden": "true", "data-testid": "dashboard-list-tone-dot", className: cn("inline-block size-2 shrink-0 rounded-full", toneDotClass(tone)) }));
82
+ }
83
+ // Badges in front of the "to do" column belong to its line: they sit inline before the sentence.
84
+ function leadingBadgeColumnsOf(columns) {
85
+ const hintIndex = columns.findIndex((column) => column.hint !== undefined);
86
+ return columns.slice(0, Math.max(hintIndex, 0)).filter((column) => column.display === "badge");
42
87
  }
43
- /** Compact 40px-row table for dashboard lists with optional bar/badge
44
- * columns. */
45
- export function DashboardListTable({ columns, rows, formatPercent, formatNumber, formatDateTime, translate, testId, }) {
46
- return (_jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { "data-testid": testId, className: "w-full text-sm", children: [_jsx("thead", { children: _jsx("tr", { className: "h-9 border-b border-border-row text-left text-xs text-muted-foreground", children: columns.map((column) => (_jsx("th", { scope: "col", className: "px-4 font-medium", children: column.label }, column.field))) }) }), _jsx("tbody", { children: rows.map((row, index) => (_jsx("tr", { className: "h-10 border-b border-border-row last:border-b-0", children: columns.map((column) => (_jsx("td", { className: "px-4", children: _jsx(Cell, { column: column, row: row, formatPercent: formatPercent, formatNumber: formatNumber, formatDateTime: formatDateTime, translate: translate }) }, column.field))) }, typeof row["id"] === "string" ? row["id"] : index))) })] }) }));
88
+ /** Compact table for dashboard lists with optional bar/badge columns. Badge columns in front of a
89
+ * `hint` column join the hint's first line; rows with a tone get 12px of padding above and below. */
90
+ export function DashboardListTable({ columns: allColumns, rows, formatPercent, formatNumber, formatDateTime, translate, testId, rowToneField, rowToneMarker = "bar", showHeader = true, rowLink, }) {
91
+ const visibleColumns = allColumns.filter((column) => column.narrowOnly !== true);
92
+ const leadingBadgeColumns = leadingBadgeColumnsOf(visibleColumns);
93
+ const columns = visibleColumns.filter((column) => !leadingBadgeColumns.includes(column));
94
+ const hintColumn = columns.find((column) => column.hint !== undefined);
95
+ const padded = rowToneField !== undefined || leadingBadgeColumns.length > 0;
96
+ const cellProps = { formatPercent, formatNumber, formatDateTime, translate };
97
+ return (_jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { "data-testid": testId, className: "w-full text-sm", children: [showHeader && (_jsx("thead", { children: _jsxs("tr", { className: "h-9 border-b border-border-row text-left text-xs text-muted-foreground", children: [columns.map((column) => (_jsx("th", { scope: "col", className: "px-4 font-medium", children: column.label }, column.field))), rowLink !== undefined && _jsx("th", { scope: "col", className: "w-8" })] }) })), _jsx("tbody", { children: rows.map((row, index) => {
98
+ const rowTarget = rowLink?.linkFor(row);
99
+ const tone = rowToneOf(row, rowToneField);
100
+ const dot = rowToneMarker === "dot" && tone !== undefined ? _jsx(ToneDot, { tone: tone }) : null;
101
+ const leadingFor = (column, columnIndex) => {
102
+ const badges = column === hintColumn ? leadingBadgeColumns : [];
103
+ const front = columnIndex === 0 ? dot : null;
104
+ if (front === null && badges.length === 0)
105
+ return undefined;
106
+ return (_jsxs(_Fragment, { children: [front, badges.map((badge) => (_jsx(DashboardListCell, { column: badge, row: row, ...cellProps }, badge.field)))] }));
107
+ };
108
+ const rowKey = typeof row["id"] === "string" ? row["id"] : index;
109
+ const rowElement = (_jsxs("tr", { ...(rowTarget !== undefined && {
110
+ onClick: (event) => pressRowLink(event, rowTarget),
111
+ }), className: cn("h-10 border-b border-border-row last:border-b-0 [&:has(+[data-reason-row])]:border-b-0", rowTarget !== undefined && "cursor-pointer", padded && "sm:[&>td]:py-3",
112
+ // Without a header row nothing labels the columns, so narrow screens stack them.
113
+ !showHeader &&
114
+ "max-sm:grid max-sm:h-auto max-sm:grid-cols-1 max-sm:gap-1 max-sm:py-2", rowToneMarker === "bar" && rowToneClass(tone)), children: [columns.map((column, columnIndex) => {
115
+ const leading = leadingFor(column, columnIndex);
116
+ const cell = (_jsx(DashboardListCell, { column: column, row: row, ...cellProps, ...(column.hint !== undefined && { leading }) }));
117
+ return (_jsx("td", { className: cn("px-4", !showHeader && "max-sm:block"), children: column.hint === undefined && dot !== null && columnIndex === 0 ? (_jsxs("span", { className: "flex items-center gap-2", children: [dot, cell] })) : (cell) }, column.field));
118
+ }), rowLink !== undefined && (_jsx("td", { className: "w-8 px-2 text-right", children: _jsx(RowLinkIcon, { link: rowTarget, icon: rowLink.icon, label: translate("kumiko.dashboard.list.open-row") }) }))] }, rowKey));
119
+ const reasonHint = columns.find((column) => column.hint !== undefined && hintReasonOf(column.hint, row) !== undefined)?.hint;
120
+ return (_jsx(HintReasonRowScope, { hint: reasonHint, row: row, renderBoxRow: (box) => (_jsx("tr", { "data-reason-row": "true", className: "border-b border-border-row last:border-b-0", children: _jsx("td", { colSpan: columns.length + (rowLink !== undefined ? 1 : 0), className: "px-4 pb-3", children: box }) })), children: rowElement }, rowKey));
121
+ }) })] }) }));
47
122
  }
@@ -1,7 +1,7 @@
1
1
  import { MAX_VIEWPORT_WIDTH } from "./drawer-panel-class.js";
2
2
  export const MIN_WIDTH_PX = 320;
3
3
  export const MAX_WIDTH_PX = 1000;
4
- // Must match the static `max(600px,37.5vw)` in floatingSideClass — Tailwind's
4
+ // Must match the static `max(600px,37.5vw)` in WIDTH_CLASS (drawer-panel-class.ts) — Tailwind's
5
5
  // JIT can't read these at runtime, so the two are kept in sync by hand.
6
6
  // 600px (vs. the old 520px floor) gives a two-column field row (e.g.
7
7
  // street/number, zip/city) room to breathe, while staying well under half
@@ -172,8 +172,10 @@ export function FloatingPanel({ title, headerActions, children, storageKey, defa
172
172
  return createPortal(_jsxs("div", { role: "dialog", "aria-modal": "false", "aria-labelledby": titleId, "data-testid": testId, className: cn("fixed z-50 flex flex-col overflow-hidden rounded-lg border text-foreground shadow-2xl", aiSurface ? "bg-ai-surface" : "bg-background"), style: {
173
173
  right: fixedPlacement.rightPx,
174
174
  bottom: fixedPlacement.bottomPx,
175
- width: `min(${fixedPlacement.widthPx}px, calc(100vw - ${2 * FLOATING_PANEL_MARGIN_PX}px))`,
176
- height: `min(${fixedPlacement.heightPx}px, calc(100vh - ${fixedPlacement.bottomPx + FLOATING_PANEL_MARGIN_PX}px))`,
175
+ width: fixedPlacement.widthPx,
176
+ maxWidth: `calc(100vw - ${fixedPlacement.rightPx + FLOATING_PANEL_MARGIN_PX}px)`,
177
+ height: fixedPlacement.heightPx,
178
+ maxHeight: `calc(100vh - ${fixedPlacement.bottomPx + FLOATING_PANEL_MARGIN_PX}px)`,
177
179
  }, children: [_jsxs("div", { className: cn("flex shrink-0 items-center gap-2 border-b px-3 py-2", aiSurface ? "bg-ai-surface" : "bg-muted"), children: [_jsx("div", { id: titleId, className: "min-w-0 flex-1 truncate font-medium", children: title }), headerActions] }), _jsx("div", { className: bodyClass, children: children })] }), document.body);
178
180
  }
179
181
  const limits = getLimits();
@@ -14,6 +14,7 @@ export { Drawer, type DrawerProps } from "./drawer.tsx";
14
14
  export { FeedList, type FeedRow } from "./feed-list.tsx";
15
15
  export { FloatingPanel, type FloatingPanelGeometry, type FloatingPanelPlacement, type FloatingPanelProps, } from "./floating-panel.tsx";
16
16
  export { BooleanField, type BooleanFieldProps, DateField, type DateFieldProps, FileField, type FileFieldProps, MoneyField, NumberField, type NumberFieldProps, PercentField, RangeField, type RangeFieldProps, SelectField, type SelectFieldProps, TextareaField, type TextareaFieldProps, TextField, type TextFieldProps, } from "./form-fields.tsx";
17
+ export { HtmlMailFrame } from "./html-mail-frame.tsx";
17
18
  export { InfinityList, type InfinityListProps, type InfinityListSelection, } from "./infinity-list.tsx";
18
19
  export { MessageReader } from "./message-reader.tsx";
19
20
  export { type MessageAttachment, type MessageBody, type MessageReaderProps, type MessageReaderTab, MessageThread, type MessageThreadProps, type ThreadMessage, } from "./message-thread.tsx";
@@ -22,6 +23,7 @@ export { ModeSwitch, type ModeSwitchVariant } from "./mode-switch.tsx";
22
23
  export { type PdfMatchInfo, PdfPreview, type PdfPreviewProps, type PdfPreviewSource, } from "./pdf-preview.tsx";
23
24
  export { type PhotoSlotSpec, PhotoSlots, type PhotoSlotsProps } from "./photo-slots.tsx";
24
25
  export { PlanCard, type PlanCardActionSlot, type PlanCardLinkSlot, type PlanCardPrice, type PlanCardProps, PlanGrid, type PlanGridProps, } from "./plan-card.tsx";
26
+ export { type PreviewDevice, PreviewWidthFrame } from "./preview-width-frame.tsx";
25
27
  export { ProgressBar } from "./progress-bar.tsx";
26
28
  export { ProgressList, type ProgressListRow } from "./progress-list.tsx";
27
29
  export { PublicShell, type PublicShellProps, type PublicShellVariant } from "./public-shell.tsx";
@@ -16,6 +16,7 @@ export { Drawer } from "./drawer.js";
16
16
  export { FeedList } from "./feed-list.js";
17
17
  export { FloatingPanel, } from "./floating-panel.js";
18
18
  export { BooleanField, DateField, FileField, MoneyField, NumberField, PercentField, RangeField, SelectField, TextareaField, TextField, } from "./form-fields.js";
19
+ export { HtmlMailFrame } from "./html-mail-frame.js";
19
20
  export { InfinityList, } from "./infinity-list.js";
20
21
  export { MessageReader } from "./message-reader.js";
21
22
  export { MessageThread, } from "./message-thread.js";
@@ -24,6 +25,7 @@ export { ModeSwitch } from "./mode-switch.js";
24
25
  export { PdfPreview, } from "./pdf-preview.js";
25
26
  export { PhotoSlots } from "./photo-slots.js";
26
27
  export { PlanCard, PlanGrid, } from "./plan-card.js";
28
+ export { PreviewWidthFrame } from "./preview-width-frame.js";
27
29
  export { ProgressBar } from "./progress-bar.js";
28
30
  export { ProgressList } from "./progress-list.js";
29
31
  export { PublicShell } from "./public-shell.js";
@@ -88,8 +88,6 @@ export function InfinityList({ query, payload, pageSize = 50, rows, nextCursor,
88
88
  // into one query per event. A refresh already running schedules
89
89
  // exactly one trailing pass after it settles.
90
90
  const liveTimerRef = useRef(null);
91
- const liveInFlightRef = useRef(false);
92
- const liveTrailingRef = useRef(false);
93
91
  // Live-mode: on an SSE event for the query's entity, refetch only the
94
92
  // first page and merge it in — rows the fresh page still contains move
95
93
  // to the front (newest-first feeds), rows it dropped (edited/deleted
@@ -97,7 +95,7 @@ export function InfinityList({ query, payload, pageSize = 50, rows, nextCursor,
97
95
  // A full reload would collapse already-accumulated pages and jump the
98
96
  // scroll position.
99
97
  // biome-ignore lint/correctness/useExhaustiveDependencies: payload goes through payloadKey
100
- const refreshFirstPage = useCallback(async () => {
98
+ const refreshFirstPage = useCallback(async (onSuperseded) => {
101
99
  // Read, don't bump at the start: a concurrent load() (e.g. the mount
102
100
  // fetch still in flight) must not be discarded by a refresh that then
103
101
  // fails or is superseded. Only a refresh that actually delivers fresh
@@ -107,7 +105,7 @@ export function InfinityList({ query, payload, pageSize = 50, rows, nextCursor,
107
105
  if (seqAtStart !== requestSeq.current) {
108
106
  // A load-more bumps the sequence without covering page 1, so the signal that
109
107
  // triggered this refresh would otherwise be lost.
110
- liveTrailingRef.current = true;
108
+ onSuperseded();
111
109
  return;
112
110
  }
113
111
  // skip: background live refresh failed, keep showing the current rows
@@ -154,12 +152,20 @@ export function InfinityList({ query, payload, pageSize = 50, rows, nextCursor,
154
152
  // skip: no entity to listen on, nothing to subscribe to
155
153
  if (liveEntities.length === 0)
156
154
  return;
155
+ // In-flight and trailing flags belong to this effect: a payload change starts a fresh pair, so
156
+ // an event for the new payload is never parked behind the old payload's refresh, and a torn-down
157
+ // effect never runs a pass through its stale refreshFirstPage.
158
+ let disposed = false;
159
+ let inFlight = false;
160
+ let trailing = false;
157
161
  const runRefresh = () => {
158
- liveInFlightRef.current = true;
159
- void refreshFirstPage().finally(() => {
160
- liveInFlightRef.current = false;
161
- if (liveTrailingRef.current) {
162
- liveTrailingRef.current = false;
162
+ inFlight = true;
163
+ void refreshFirstPage(() => {
164
+ trailing = true;
165
+ }).finally(() => {
166
+ inFlight = false;
167
+ if (!disposed && trailing) {
168
+ trailing = false;
163
169
  runRefresh();
164
170
  }
165
171
  });
@@ -169,8 +175,8 @@ export function InfinityList({ query, payload, pageSize = 50, rows, nextCursor,
169
175
  clearTimeout(liveTimerRef.current);
170
176
  liveTimerRef.current = setTimeout(() => {
171
177
  liveTimerRef.current = null;
172
- if (liveInFlightRef.current) {
173
- liveTrailingRef.current = true;
178
+ if (inFlight) {
179
+ trailing = true;
174
180
  return;
175
181
  }
176
182
  runRefresh();
@@ -178,6 +184,7 @@ export function InfinityList({ query, payload, pageSize = 50, rows, nextCursor,
178
184
  };
179
185
  const unsubscribe = subscribeToEntities(subscribeLive, liveEntities, scheduleRefresh);
180
186
  return () => {
187
+ disposed = true;
181
188
  unsubscribe();
182
189
  if (liveTimerRef.current !== null) {
183
190
  clearTimeout(liveTimerRef.current);
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from "react";
2
+ export type PreviewDevice = "desktop" | "mobile";
3
+ export declare function PreviewWidthFrame({ device, children, testId, }: {
4
+ readonly device: PreviewDevice;
5
+ readonly children: ReactNode;
6
+ readonly testId?: string;
7
+ }): ReactNode;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Page widths of a rendered preview live here, inside the Tailwind scan surface, so feature code
3
+ // picks a device instead of carrying its own max-w classes.
4
+ const PREVIEW_WIDTH_CLASS = {
5
+ desktop: "mx-auto w-full max-w-[760px]",
6
+ mobile: "mx-auto w-full max-w-[375px]",
7
+ };
8
+ export function PreviewWidthFrame({ device, children, testId, }) {
9
+ return (_jsx("div", { className: PREVIEW_WIDTH_CLASS[device], "data-testid": testId, "data-device": device, children: children }));
10
+ }
@@ -3,7 +3,7 @@ import type { ReactNode } from "react";
3
3
  * replaces repeated `<section className={CARD}>…<h2>` blocks in
4
4
  * custom screens. Thin wrapper around the Card primitive. */
5
5
  export declare function SectionCard({ title, subtitle, action, footer, children, testId, }: {
6
- readonly title: string;
6
+ readonly title?: string;
7
7
  readonly subtitle?: string;
8
8
  readonly action?: ReactNode;
9
9
  readonly footer?: ReactNode;
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/cn.js";
3
- import { chartColor, seriesTotal, valueAt } from "./chart-data.js";
3
+ import { chartColor, seriesTotal } from "./chart-data.js";
4
4
  import { MarkerLegend, markerLegendItems } from "./chart-markers.js";
5
5
  import { ChartLegend, YTicks } from "./chart-parts.js";
6
6
  import { ModeSwitch } from "./mode-switch.js";
7
7
  import { StackedAreaBrush } from "./stacked-area-brush.js";
8
- import { STACKED_AREA_PLOT_HEIGHT_CLASS } from "./stacked-area-geometry.js";
8
+ import { bucketTotals, STACKED_AREA_PLOT_HEIGHT_CLASS } from "./stacked-area-geometry.js";
9
9
  import { renderStackedAreaPlot } from "./stacked-area-plot.js";
10
10
  const SCROLLABLE_BUCKET_WIDTH_PX = 48;
11
11
  export function renderRangeSwitch(m) {
@@ -23,7 +23,7 @@ export function renderBrushBar(m) {
23
23
  const { allTimes, visibleWindow, changeSelection } = m.win;
24
24
  if (!brush || allTimes.length < 2)
25
25
  return undefined;
26
- return (_jsx(StackedAreaBrush, { times: allTimes, totals: allTimes.map((atMs) => allSeries.reduce((sum, s) => sum + valueAt(s, atMs), 0)), window: visibleWindow, labels: brushLabels, onChange: (next) => changeSelection({ kind: "brush", startMs: next.startMs, endMs: next.endMs }), testId: `${testId ?? "stacked-area"}-brush` }));
26
+ return (_jsx(StackedAreaBrush, { times: allTimes, totals: bucketTotals(allTimes, allSeries), window: visibleWindow, labels: brushLabels, onChange: (next) => changeSelection({ kind: "brush", startMs: next.startMs, endMs: next.endMs }), testId: `${testId ?? "stacked-area"}-brush` }));
27
27
  }
28
28
  function renderPlotArea(m, scrollRef) {
29
29
  const plot = renderStackedAreaPlot(m);
@@ -1,6 +1,7 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/cn.js";
3
3
  import { chartColor, percent, valueAt } from "./chart-data.js";
4
+ import { ChartSwatch } from "./chart-parts.js";
4
5
  import { bucketIndexAtFraction } from "./chart-window.js";
5
6
  import { STACKED_AREA_PLOT_HEIGHT_CLASS } from "./stacked-area-geometry.js";
6
7
  const TOOLTIP_WIDTH_REM = 14;
@@ -35,15 +36,6 @@ function buildTooltipRows(m, tooltipAtMs) {
35
36
  }),
36
37
  ];
37
38
  }
38
- function renderTooltipSwatch(row) {
39
- if (row.swatch === "area") {
40
- return (_jsx("span", { "aria-hidden": "true", className: "size-2 shrink-0 rounded-[2px]", style: { backgroundColor: row.color } }));
41
- }
42
- return (_jsx("span", { "aria-hidden": "true", className: "w-3 shrink-0 border-t-2", style: {
43
- borderColor: row.color,
44
- borderTopStyle: row.swatch === "dashed-line" ? "dashed" : "solid",
45
- } }));
46
- }
47
39
  function renderTooltipCard(m, tooltipAtMs) {
48
40
  const tooltipFraction = m.win.fractionOf(tooltipAtMs);
49
41
  const tooltipOnLeft = tooltipFraction > 0.5;
@@ -51,7 +43,7 @@ function renderTooltipCard(m, tooltipAtMs) {
51
43
  const tooltipLeft = tooltipOnLeft
52
44
  ? `max(0px, calc(${tooltipEdge} - ${TOOLTIP_WIDTH_REM}rem))`
53
45
  : `max(0px, min(calc(${tooltipEdge}), calc(100% - ${TOOLTIP_WIDTH_REM}rem)))`;
54
- return (_jsxs(_Fragment, { children: [_jsx("div", { "aria-hidden": "true", className: "pointer-events-none absolute inset-y-0 w-px bg-foreground/40", style: { left: percent(tooltipFraction) } }), _jsxs("div", { "data-testid": "chart-tooltip", "data-side": tooltipOnLeft ? "left" : "right", className: "pointer-events-none absolute top-2 rounded-md border bg-popover p-2 text-xs text-popover-foreground shadow-sm", style: { left: tooltipLeft, width: `min(${TOOLTIP_WIDTH_REM}rem, 100%)` }, children: [_jsx("div", { className: "mb-1 font-medium", children: m.win.formatBucket(tooltipAtMs) }), buildTooltipRows(m, tooltipAtMs).map((row) => (_jsxs("div", { className: "flex items-center gap-1.5", children: [renderTooltipSwatch(row), _jsx("span", { className: "min-w-0 truncate text-muted-foreground", children: row.label }), _jsx("span", { className: "ml-auto tabular-nums", children: m.props.formatAxisValue(row.value) })] }, row.key)))] })] }));
46
+ return (_jsxs(_Fragment, { children: [_jsx("div", { "aria-hidden": "true", className: "pointer-events-none absolute inset-y-0 w-px bg-foreground/40", style: { left: percent(tooltipFraction) } }), _jsxs("div", { "data-testid": "chart-tooltip", "data-side": tooltipOnLeft ? "left" : "right", className: "pointer-events-none absolute top-2 rounded-md border bg-popover p-2 text-xs text-popover-foreground shadow-sm", style: { left: tooltipLeft, width: `min(${TOOLTIP_WIDTH_REM}rem, 100%)` }, children: [_jsx("div", { className: "mb-1 font-medium", children: m.win.formatBucket(tooltipAtMs) }), buildTooltipRows(m, tooltipAtMs).map((row) => (_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(ChartSwatch, { color: row.color, swatch: row.swatch, className: "shrink-0" }), _jsx("span", { className: "min-w-0 truncate text-muted-foreground", children: row.label }), _jsx("span", { className: "ml-auto tabular-nums", children: m.props.formatAxisValue(row.value) })] }, row.key)))] })] }));
55
47
  }
56
48
  function bucketAtMsUnderPointer(m, event) {
57
49
  const { times, visibleWindow } = m.win;
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from "react";
2
+ import { type StatDelta, type StatLink, type StatTone } from "./stat.tsx";
3
+ type StatBoxCellProps = {
4
+ readonly label: string;
5
+ /** Replaces `label` in the one-line phone variant. */
6
+ readonly narrowLabel?: string;
7
+ readonly value: string;
8
+ readonly sub?: string;
9
+ readonly tone?: StatTone;
10
+ readonly icon?: ReactNode;
11
+ readonly delta?: StatDelta;
12
+ readonly spark?: readonly number[];
13
+ readonly testId?: string;
14
+ readonly link?: StatLink;
15
+ };
16
+ /** Cell of a titled stat strip. From `sm` a box: the number large on the left, label bold and
17
+ * sub line small beside it. Below `sm` plain text "<number> <label>" that joins the strip's single line. */
18
+ export declare function StatBoxCell({ label, narrowLabel, value, sub, tone, icon, delta, spark, testId, link, }: StatBoxCellProps): ReactNode;
19
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../lib/cn.js";
3
+ import { useIsBelowSmViewport } from "../primitives/use-narrow-viewport.js";
4
+ import { Sparkline, StatLinkFrame, TONE_VALUE, } from "./stat.js";
5
+ /** Cell of a titled stat strip. From `sm` a box: the number large on the left, label bold and
6
+ * sub line small beside it. Below `sm` plain text "<number> <label>" that joins the strip's single line. */
7
+ export function StatBoxCell({ label, narrowLabel, value, sub, tone = "default", icon, delta, spark, testId, link, }) {
8
+ const belowSm = useIsBelowSmViewport();
9
+ return (_jsx(StatLinkFrame, { link: link, testId: testId, children: belowSm ? (_jsxs("span", { "data-testid": testId, className: "whitespace-nowrap text-sm", children: [_jsx("span", { className: "tabular-nums text-foreground", children: value }), " ", _jsx("span", { className: "text-foreground", children: narrowLabel ?? label })] })) : (_jsxs("div", { "data-testid": testId, className: "flex min-w-0 items-center gap-3 rounded-md border border-border bg-background px-3 py-2", children: [icon, _jsx("span", { className: cn("text-2xl font-semibold leading-none tabular-nums", TONE_VALUE[tone]), children: value }), _jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate text-sm font-semibold text-foreground", children: label }), sub !== undefined && (_jsx("span", { className: "truncate text-xs text-muted-foreground", children: sub }))] }), delta !== undefined && (_jsxs("span", { className: "whitespace-nowrap text-xs font-medium tabular-nums text-muted-foreground", children: [delta.direction === "up" ? "↑" : "↓", delta.value] })), spark !== undefined && (_jsx(Sparkline, { points: spark, className: cn("h-6 w-16 shrink-0", TONE_VALUE[tone]) }))] })) }));
10
+ }
@@ -2,11 +2,17 @@ import type { DashboardStatTone } from "@cosmicdrift/kumiko-types/screen";
2
2
  import type { ReactNode } from "react";
3
3
  export type StatTone = DashboardStatTone;
4
4
  export declare const STAT_CARD_GRID_CLASSES = "grid grid-cols-[repeat(auto-fit,minmax(min(12rem,100%),1fr))] gap-3";
5
+ export declare const TONE_VALUE: Record<StatTone, string>;
5
6
  /** Makes a tile a link; `onPress` is the SPA navigation, `href` serves modified clicks and a11y. */
6
7
  export type StatLink = {
7
8
  readonly href: string;
8
9
  readonly onPress: () => void;
9
10
  };
11
+ export declare function StatLinkFrame({ link, testId, children, }: {
12
+ readonly link: StatLink | undefined;
13
+ readonly testId: string | undefined;
14
+ readonly children: ReactNode;
15
+ }): ReactNode;
10
16
  export type StatDelta = {
11
17
  readonly value: string;
12
18
  readonly direction: "up" | "down";
@@ -18,10 +24,11 @@ export declare function Sparkline({ points, className, }: {
18
24
  }): ReactNode;
19
25
  /** Icon-bearing metric tile with an optional delta chip, trend line,
20
26
  * and sparkline. `icon` is a ready-made node (the app supplies its SVG). */
21
- export declare function StatCard({ icon, label, value, sub, tone, accentColor, delta, trend, spark, testId, link, children, }: {
27
+ export declare function StatCard({ icon, label, value, sub, tone, accentColor, delta, trend, spark, testId, link, navigable, children, }: {
22
28
  readonly icon?: ReactNode;
23
29
  readonly label: string;
24
30
  readonly value: string;
31
+ /** Small text on the baseline right behind the value. */
25
32
  readonly sub?: string;
26
33
  readonly tone?: StatTone;
27
34
  readonly accentColor?: string;
@@ -30,6 +37,8 @@ export declare function StatCard({ icon, label, value, sub, tone, accentColor, d
30
37
  readonly spark?: readonly number[];
31
38
  readonly testId?: string;
32
39
  readonly link?: StatLink;
40
+ /** Draws a small arrow top right: the tile leads somewhere. Implied by `link`. */
41
+ readonly navigable?: boolean;
33
42
  /** Extra content below the built-in fields (e.g. a usage meter) — kept
34
43
  * inside the same card chrome instead of stacking a second bordered box. */
35
44
  readonly children?: ReactNode;
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ArrowUpRight } from "lucide-react";
2
3
  import { usePrimitives } from "../../index.js";
3
4
  import { cn } from "../lib/cn.js";
4
5
  // One grid for every row of StatCards (dashboard stat groups, detail metric tiles), so the
@@ -11,14 +12,21 @@ const TONE_CHIP = {
11
12
  warn: "bg-destructive/10 text-destructive",
12
13
  negative: "bg-status-bad-surface text-status-bad",
13
14
  };
14
- const TONE_VALUE = {
15
+ export const TONE_VALUE = {
15
16
  default: "text-foreground",
16
17
  positive: "text-primary",
17
18
  ok: "text-status-ok",
18
19
  warn: "text-destructive",
19
20
  negative: "text-status-bad",
20
21
  };
21
- function StatLinkFrame({ link, testId, children, }) {
22
+ const TONE_STRIPE = {
23
+ default: "",
24
+ positive: "border-l-[3px] border-l-primary",
25
+ ok: "border-l-[3px] border-l-status-ok",
26
+ warn: "border-l-[3px] border-l-status-warn",
27
+ negative: "border-l-[3px] border-l-status-bad",
28
+ };
29
+ export function StatLinkFrame({ link, testId, children, }) {
22
30
  const { Link } = usePrimitives();
23
31
  if (link === undefined)
24
32
  return children;
@@ -53,19 +61,20 @@ function StatIconChip({ icon, tone, accentColor, }) {
53
61
  }
54
62
  /** Icon-bearing metric tile with an optional delta chip, trend line,
55
63
  * and sparkline. `icon` is a ready-made node (the app supplies its SVG). */
56
- export function StatCard({ icon, label, value, sub, tone = "default", accentColor, delta, trend, spark, testId, link, children, }) {
64
+ export function StatCard({ icon, label, value, sub, tone = "default", accentColor, delta, trend, spark, testId, link, navigable = false, children, }) {
57
65
  const { Card } = usePrimitives();
66
+ const leadsSomewhere = navigable || link !== undefined;
58
67
  // StatCard is a reusable small-tile widget (a metrics dashboard grid, not
59
68
  // a whole-section frame) — an extension section mounting several of
60
69
  // these renders a grid of tiles inside its own host Card, not a
61
70
  // duplicate outer frame around the section's full content.
62
- const tile = (_jsxs(Card, { options: { padded: false }, className: "p-4", testId: testId, children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-x-2 gap-y-1", children: [_jsxs("div", { className: "flex min-w-0 flex-1 basis-[7rem] items-center gap-2 text-muted-foreground", children: [icon !== undefined && _jsx(StatIconChip, { icon: icon, tone: tone, accentColor: accentColor }), _jsx("span", { title: label, className: "min-w-0 line-clamp-2 text-xs font-medium", children: label })] }), delta !== undefined && (_jsxs("span", { className: cn("inline-flex shrink-0 items-center gap-0.5 whitespace-nowrap rounded-full px-1.5 py-0.5 text-xs font-medium tabular-nums", TONE_CHIP[delta.tone ?? tone]), children: [delta.direction === "up" ? "↑" : "↓", delta.value] }))] }), _jsx("div", { className: "mt-2 text-xl font-semibold tabular-nums text-foreground", children: value }), sub !== undefined && _jsx("div", { className: "mt-0.5 text-xs text-muted-foreground", children: sub }), trend !== undefined && (_jsx("div", { className: "mt-0.5 text-xs font-medium text-foreground/80", children: trend })), spark !== undefined && (_jsx(Sparkline, { points: spark, className: cn("mt-2 h-7 w-full", TONE_VALUE[tone]) })), children !== undefined && _jsx("div", { className: "mt-3", children: children })] }));
71
+ const tile = (_jsxs(Card, { options: { padded: false }, className: cn("relative p-4", TONE_STRIPE[tone]), testId: testId, children: [leadsSomewhere && (_jsx(ArrowUpRight, { className: "absolute right-3 top-3 size-3.5 text-muted-foreground", "aria-hidden": "true", "data-kumiko-layout": "stat-card-arrow" })), _jsxs("div", { className: cn("flex flex-wrap items-start justify-between gap-x-2 gap-y-1", leadsSomewhere && "pr-5"), children: [_jsxs("div", { className: "flex min-w-0 flex-1 basis-[7rem] items-center gap-2 text-muted-foreground", children: [icon !== undefined && _jsx(StatIconChip, { icon: icon, tone: tone, accentColor: accentColor }), _jsx("span", { title: label, className: "min-w-0 line-clamp-2 text-xs font-medium", children: label })] }), delta !== undefined && (_jsxs("span", { className: cn("inline-flex shrink-0 items-center gap-0.5 whitespace-nowrap rounded-full px-1.5 py-0.5 text-xs font-medium tabular-nums", TONE_CHIP[delta.tone ?? tone]), children: [delta.direction === "up" ? "↑" : "↓", delta.value] }))] }), _jsxs("div", { className: "mt-1.5 flex flex-wrap items-baseline gap-x-2", children: [_jsx("span", { className: cn("text-xl font-semibold tabular-nums", TONE_VALUE[tone]), children: value }), sub !== undefined && _jsx("span", { className: "text-xs text-muted-foreground", children: sub })] }), trend !== undefined && (_jsx("div", { className: "mt-0.5 text-xs font-medium text-foreground/80", children: trend })), spark !== undefined && (_jsx(Sparkline, { points: spark, className: cn("mt-2 h-7 w-full", TONE_VALUE[tone]) })), children !== undefined && _jsx("div", { className: "mt-3", children: children })] }));
63
72
  return (_jsx(StatLinkFrame, { link: link, testId: testId, children: tile }));
64
73
  }
65
74
  /** Flat KPI cell for a strip (divider instead of card): label, value with
66
75
  * sparkline beside it, sub line. */
67
76
  export function StatStripCell({ icon, label, value, sub, tone = "default", accentColor, delta, spark, testId, link, }) {
68
- return (_jsx(StatLinkFrame, { link: link, testId: testId, children: _jsxs("div", { "data-testid": testId, className: "flex min-w-0 flex-col gap-1 px-4 py-3", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-x-2 gap-y-1", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-2 text-xs font-medium text-muted-foreground", children: [icon !== undefined && (_jsx(StatIconChip, { icon: icon, tone: tone, accentColor: accentColor })), _jsx("span", { children: label })] }), delta !== undefined && (_jsxs("span", { className: cn("inline-flex shrink-0 items-center gap-0.5 whitespace-nowrap rounded-full px-1.5 py-0.5 text-xs font-medium tabular-nums", TONE_CHIP[delta.tone ?? tone]), children: [delta.direction === "up" ? "↑" : "↓", delta.value] }))] }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx("span", { className: cn("text-xl font-semibold tabular-nums", TONE_VALUE[tone]), children: value }), spark !== undefined && (_jsx(Sparkline, { points: spark, className: cn("h-7 w-20 shrink-0", TONE_VALUE[tone]) }))] }), sub !== undefined && _jsx("div", { className: "text-xs text-muted-foreground", children: sub })] }) }));
77
+ return (_jsx(StatLinkFrame, { link: link, testId: testId, children: _jsxs("div", { "data-testid": testId, className: "flex min-w-0 flex-col gap-1 px-4 py-3", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-x-2 gap-y-1", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-2 text-xs font-medium text-muted-foreground", children: [icon !== undefined && (_jsx(StatIconChip, { icon: icon, tone: tone, accentColor: accentColor })), _jsx("span", { children: label })] }), delta !== undefined && (_jsxs("span", { className: cn("inline-flex shrink-0 items-center gap-0.5 whitespace-nowrap rounded-full px-1.5 py-0.5 text-xs font-medium tabular-nums", TONE_CHIP[delta.tone ?? tone]), children: [delta.direction === "up" ? "↑" : "↓", delta.value] }))] }), _jsxs("div", { className: "flex shrink-0 items-center gap-3", children: [_jsx("span", { className: cn("text-xl font-semibold tabular-nums", TONE_VALUE[tone]), children: value }), spark !== undefined && (_jsx(Sparkline, { points: spark, className: cn("h-7 w-20 shrink-0", TONE_VALUE[tone]) }))] }), sub !== undefined && _jsx("div", { className: "text-xs text-muted-foreground", children: sub })] }) }));
69
78
  }
70
79
  /** Compact metric tile (without an icon) — for dense KPI grids.
71
80
  * StatCard is the icon-bearing variant. */
@@ -1,15 +1,17 @@
1
1
  import type { ReactNode } from "react";
2
- export type StatusTone = "ok" | "warn" | "bad" | "critical" | "muted";
2
+ import type { StatusBadgeOptionTone, StatusTone } from "../../status-tone.ts";
3
+ export type { StatusTone };
3
4
  export declare const STATUS_TONE_TEXT: Record<StatusTone, string>;
4
- /** `accent` is a brand-colored call-out (e.g. "3 suggestions"), not a status —
5
- * hence not part of `StatusTone`, which toasts and select options share. */
6
- export type StatusBadgeTone = StatusTone | "accent";
5
+ /** `accent` is a brand tone select options can request; toasts only use `StatusTone`. */
6
+ export type StatusBadgeTone = StatusBadgeOptionTone;
7
7
  export declare const TONE_PILL: Record<StatusBadgeTone, string>;
8
8
  /** Pill badge with a status dot. Caller maps domain values to a tone
9
9
  * (e.g. operational→ok, investigating→warn) and passes the translated
10
10
  * label as children. */
11
- export declare function StatusBadge({ tone, children, className, testId, }: {
11
+ export declare function StatusBadge({ tone, children, className, testId, dot, }: {
12
12
  readonly tone: StatusBadgeTone;
13
+ /** `false` draws the pill without its leading dot. */
14
+ readonly dot?: boolean;
13
15
  readonly children: ReactNode;
14
16
  readonly className?: string;
15
17
  readonly testId?: string;
@@ -19,8 +19,8 @@ export const TONE_PILL = {
19
19
  /** Pill badge with a status dot. Caller maps domain values to a tone
20
20
  * (e.g. operational→ok, investigating→warn) and passes the translated
21
21
  * label as children. */
22
- export function StatusBadge({ tone, children, className, testId, }) {
22
+ export function StatusBadge({ tone, children, className, testId, dot = true, }) {
23
23
  return (_jsxs("span", { "data-testid": testId, className: cn(
24
24
  // Px on phones: an app may shrink its root font for desktop density, the phone reading size stays.
25
- "inline-flex h-5 items-center gap-1.5 whitespace-nowrap rounded-full px-2 text-xs font-medium max-md:h-[20px] max-md:text-[12px]", TONE_PILL[tone], className), children: [_jsx("span", { "aria-hidden": "true", "data-status-dot": true, className: "size-1.5 shrink-0 rounded-full bg-current" }), children] }));
25
+ "inline-flex h-5 items-center gap-1.5 whitespace-nowrap rounded-full px-2 text-xs font-medium max-md:h-[20px] max-md:text-[12px]", TONE_PILL[tone], className), children: [dot && (_jsx("span", { "aria-hidden": "true", "data-status-dot": true, className: "size-1.5 shrink-0 rounded-full bg-current" })), children] }));
26
26
  }
@@ -21,7 +21,7 @@ export declare function StepBar({ steps, currentIndex, compactLabel, onStepSelec
21
21
  readonly doneSteps?: readonly boolean[];
22
22
  readonly selectableSteps?: "done" | "all";
23
23
  readonly narrowLayout?: "label" | "steps";
24
- readonly orientation?: "horizontal" | "vertical";
24
+ readonly orientation?: "horizontal" | "vertical" | "stacked";
25
25
  readonly heading?: string;
26
26
  readonly description?: string;
27
27
  readonly subtitles?: readonly (string | undefined)[];