@cosmicdrift/kumiko-renderer 0.413.1 → 0.415.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 (369) 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 +42 -59
  6. package/dist/app/form-schema.d.ts +1 -0
  7. package/dist/app/form-schema.js +24 -0
  8. package/dist/app/list-facets.d.ts +1 -0
  9. package/dist/app/list-facets.js +10 -1
  10. package/dist/app/list-sort-options.d.ts +4 -0
  11. package/dist/app/list-sort-options.js +11 -0
  12. package/dist/app/named-filter-facet.d.ts +16 -3
  13. package/dist/app/named-filter-facet.js +97 -5
  14. package/dist/app/projection-detail-body.d.ts +2 -4
  15. package/dist/app/projection-detail-body.js +7 -1
  16. package/dist/app/projection-detail-guidance-data.d.ts +7 -0
  17. package/dist/app/projection-detail-guidance-data.js +103 -0
  18. package/dist/app/projection-detail-guidance.d.ts +13 -0
  19. package/dist/app/projection-detail-guidance.js +197 -0
  20. package/dist/app/projection-detail-header-model.d.ts +1 -3
  21. package/dist/app/projection-detail-header-model.js +4 -8
  22. package/dist/app/projection-detail-header-region.d.ts +2 -1
  23. package/dist/app/projection-detail-header-region.js +63 -23
  24. package/dist/app/projection-detail-header.d.ts +6 -1
  25. package/dist/app/projection-detail-header.js +76 -18
  26. package/dist/app/projection-detail-navigation.d.ts +2 -0
  27. package/dist/app/projection-detail-navigation.js +13 -3
  28. package/dist/app/projection-detail-states.d.ts +3 -3
  29. package/dist/app/projection-list-body.js +4 -2
  30. package/dist/app/projection-list-render.js +3 -1
  31. package/dist/app/projection-list-shim.d.ts +4 -1
  32. package/dist/app/projection-list-shim.js +35 -8
  33. package/dist/app/reference-link.d.ts +3 -2
  34. package/dist/app/reference-link.js +19 -4
  35. package/dist/app/row-actions.js +3 -3
  36. package/dist/app/screen-access.d.ts +4 -0
  37. package/dist/app/screen-access.js +18 -0
  38. package/dist/app/screen-shared.js +3 -1
  39. package/dist/app/unique-label-keys.d.ts +1 -0
  40. package/dist/app/unique-label-keys.js +9 -0
  41. package/dist/app/use-entity-list-payload.d.ts +26 -0
  42. package/dist/app/use-entity-list-payload.js +59 -0
  43. package/dist/app/use-entity-range-facets.js +2 -3
  44. package/dist/app/use-facet-counts.d.ts +5 -0
  45. package/dist/app/use-facet-counts.js +7 -0
  46. package/dist/app/use-list-summary-row.d.ts +10 -0
  47. package/dist/app/use-list-summary-row.js +33 -0
  48. package/dist/app/use-named-filter-queue.d.ts +20 -0
  49. package/dist/app/use-named-filter-queue.js +9 -0
  50. package/dist/app/use-projection-detail-actions.d.ts +5 -4
  51. package/dist/app/use-projection-detail-actions.js +42 -1
  52. package/dist/app/use-projection-list-data.d.ts +5 -0
  53. package/dist/app/use-projection-list-data.js +35 -6
  54. package/dist/app/use-projection-list-query.d.ts +2 -0
  55. package/dist/app/use-projection-list-query.js +29 -16
  56. package/dist/app/use-related-list-tab-counts.js +5 -1
  57. package/dist/app/use-row-decoration.d.ts +13 -0
  58. package/dist/app/use-row-decoration.js +103 -0
  59. package/dist/app/use-screen-list-rows.d.ts +4 -1
  60. package/dist/app/use-screen-list-rows.js +14 -5
  61. package/dist/app/use-screen-list-table.d.ts +3 -1
  62. package/dist/app/use-screen-list-table.js +10 -1
  63. package/dist/app/write-failed-error.d.ts +1 -0
  64. package/dist/app/write-failed-error.js +10 -0
  65. package/dist/card-options.d.ts +25 -0
  66. package/dist/card-options.js +1 -0
  67. package/dist/compact-tap-classes.d.ts +1 -0
  68. package/dist/compact-tap-classes.js +3 -0
  69. package/dist/components/embedded-list-field.js +13 -12
  70. package/dist/components/list-empty-state.d.ts +13 -1
  71. package/dist/components/list-empty-state.js +20 -1
  72. package/dist/components/list-group-page-bridges.d.ts +1 -1
  73. package/dist/components/list-group-page-bridges.js +2 -2
  74. package/dist/components/related-list-section.js +4 -22
  75. package/dist/components/render-edit-action-button.d.ts +3 -1
  76. package/dist/components/render-edit-action-button.js +5 -3
  77. package/dist/components/render-edit-render-model.d.ts +2 -2
  78. package/dist/components/render-edit-types.d.ts +4 -2
  79. package/dist/components/render-edit.js +3 -1
  80. package/dist/components/render-list-hint-columns.d.ts +9 -0
  81. package/dist/components/render-list-hint-columns.js +87 -0
  82. package/dist/components/render-list-reference-columns.js +4 -2
  83. package/dist/components/render-list-row-tone.d.ts +3 -0
  84. package/dist/components/render-list-row-tone.js +10 -0
  85. package/dist/components/render-list-table-props.d.ts +9 -1
  86. package/dist/components/render-list-table-props.js +4 -1
  87. package/dist/components/render-list-toolbar-action.d.ts +1 -2
  88. package/dist/components/render-list-toolbar-model.d.ts +4 -1
  89. package/dist/components/render-list-toolbar-model.js +21 -6
  90. package/dist/components/render-list-toolbar.d.ts +3 -2
  91. package/dist/components/render-list-toolbar.js +8 -6
  92. package/dist/components/render-list-types.d.ts +6 -1
  93. package/dist/components/render-list.js +26 -7
  94. package/dist/components/use-render-edit-controlled-sync.js +3 -5
  95. package/dist/components/use-render-edit-draft-save.js +7 -9
  96. package/dist/components/use-render-edit-schema.d.ts +3 -0
  97. package/dist/components/use-render-edit-schema.js +15 -0
  98. package/dist/components/use-render-edit-state.d.ts +1 -0
  99. package/dist/components/use-render-edit-state.js +4 -1
  100. package/dist/components/use-render-edit-steps.js +2 -3
  101. package/dist/components/use-render-list-columns.d.ts +3 -1
  102. package/dist/components/use-render-list-columns.js +22 -10
  103. package/dist/context/screen-focus-context.d.ts +14 -0
  104. package/dist/context/screen-focus-context.js +28 -0
  105. package/dist/data-table-facet-types.d.ts +6 -0
  106. package/dist/data-table-view-types.d.ts +20 -1
  107. package/dist/headless/form/form-controller.js +3 -1
  108. package/dist/headless/form/zod-bridge.d.ts +7 -1
  109. package/dist/headless/form/zod-bridge.js +10 -0
  110. package/dist/headless/index.d.ts +2 -1
  111. package/dist/headless/index.js +1 -0
  112. package/dist/headless/pwa-service-worker-meta.d.ts +4 -0
  113. package/dist/headless/pwa-service-worker-meta.js +13 -0
  114. package/dist/headless/view-model/index.d.ts +1 -1
  115. package/dist/headless/view-model/list-file-display.js +3 -2
  116. package/dist/headless/view-model/list.js +16 -0
  117. package/dist/headless/view-model/types.d.ts +37 -0
  118. package/dist/hooks/list-column-layout.js +2 -1
  119. package/dist/hooks/list-server-groups.js +14 -1
  120. package/dist/hooks/list-state-schema.d.ts +1 -0
  121. package/dist/hooks/list-state-schema.js +9 -1
  122. package/dist/hooks/use-debounced-value.d.ts +1 -0
  123. package/dist/hooks/use-debounced-value.js +11 -0
  124. package/dist/hooks/use-list-aggregates.d.ts +5 -1
  125. package/dist/hooks/use-list-aggregates.js +9 -5
  126. package/dist/hooks/use-list-table.d.ts +2 -1
  127. package/dist/hooks/use-list-table.js +3 -9
  128. package/dist/hooks/use-list-url-state.d.ts +2 -0
  129. package/dist/hooks/use-list-url-state.js +12 -4
  130. package/dist/hooks/use-list-view-state.js +23 -3
  131. package/dist/hooks/use-reference-lookup.js +7 -2
  132. package/dist/hooks/use-remembered-list-params.d.ts +6 -2
  133. package/dist/hooks/use-remembered-list-params.js +18 -3
  134. package/dist/hooks/use-store.js +0 -1
  135. package/dist/i18n-defaults.js +39 -3
  136. package/dist/index.d.ts +7 -2
  137. package/dist/index.js +4 -1
  138. package/dist/live/dispatcher-live.js +2 -0
  139. package/dist/metric-types.d.ts +4 -0
  140. package/dist/primitives-record-guidance.d.ts +55 -0
  141. package/dist/primitives-record-guidance.js +1 -0
  142. package/dist/primitives.d.ts +47 -54
  143. package/dist/server-clock.d.ts +6 -0
  144. package/dist/server-clock.js +20 -0
  145. package/dist/session/session-ended.d.ts +1 -0
  146. package/dist/session/session-ended.js +2 -2
  147. package/dist/status-tone.d.ts +1 -0
  148. package/dist/status-tone.js +5 -0
  149. package/dist/web/app/browser-locale.js +1 -1
  150. package/dist/web/app/client-plugin.d.ts +6 -1
  151. package/dist/web/app/create-app.d.ts +2 -1
  152. package/dist/web/app/create-app.js +15 -5
  153. package/dist/web/app/dashboard-body.js +25 -11
  154. package/dist/web/app/dashboard-header.d.ts +2 -1
  155. package/dist/web/app/dashboard-header.js +19 -7
  156. package/dist/web/app/dashboard-list-panel.d.ts +12 -0
  157. package/dist/web/app/dashboard-list-panel.js +144 -0
  158. package/dist/web/app/dashboard-narrow-gate.d.ts +6 -0
  159. package/dist/web/app/dashboard-narrow-gate.js +6 -0
  160. package/dist/web/app/dashboard-narrow-order.d.ts +3 -0
  161. package/dist/web/app/dashboard-narrow-order.js +6 -0
  162. package/dist/web/app/dashboard-navigation-link.d.ts +12 -0
  163. package/dist/web/app/dashboard-navigation-link.js +21 -0
  164. package/dist/web/app/dashboard-panels.d.ts +7 -23
  165. package/dist/web/app/dashboard-panels.js +55 -123
  166. package/dist/web/app/dashboard-reference-list-table.d.ts +5 -1
  167. package/dist/web/app/dashboard-reference-list-table.js +13 -4
  168. package/dist/web/app/dashboard-shared.d.ts +23 -7
  169. package/dist/web/app/dashboard-shared.js +45 -17
  170. package/dist/web/app/dashboard-stat-group-panel.d.ts +14 -0
  171. package/dist/web/app/dashboard-stat-group-panel.js +74 -0
  172. package/dist/web/app/dashboard-text-panel.d.ts +12 -0
  173. package/dist/web/app/dashboard-text-panel.js +167 -0
  174. package/dist/web/app/dashboard-text.d.ts +2 -0
  175. package/dist/web/app/dashboard-text.js +1 -1
  176. package/dist/web/app/dashboard-visibility.js +1 -1
  177. package/dist/web/app/relative-time.js +2 -1
  178. package/dist/web/drawn-icons.d.ts +6 -0
  179. package/dist/web/drawn-icons.js +30 -0
  180. package/dist/web/editor/editor-footer.d.ts +28 -0
  181. package/dist/web/editor/editor-footer.js +23 -0
  182. package/dist/web/editor/editor-frame.d.ts +23 -0
  183. package/dist/web/editor/editor-frame.js +24 -0
  184. package/dist/web/editor/editor-header.d.ts +36 -0
  185. package/dist/web/editor/editor-header.js +30 -0
  186. package/dist/web/editor/editor-rail.d.ts +32 -0
  187. package/dist/web/editor/editor-rail.js +37 -0
  188. package/dist/web/editor/editor-workbench.d.ts +34 -0
  189. package/dist/web/editor/editor-workbench.js +19 -0
  190. package/dist/web/editor/index.d.ts +6 -0
  191. package/dist/web/editor/index.js +6 -0
  192. package/dist/web/editor/relative-when.d.ts +1 -0
  193. package/dist/web/editor/relative-when.js +18 -0
  194. package/dist/web/icons.js +6 -5
  195. package/dist/web/index.d.ts +9 -1
  196. package/dist/web/index.js +7 -1
  197. package/dist/web/layout/default-app-shell.js +6 -4
  198. package/dist/web/layout/focus-aware-sidebar.d.ts +4 -7
  199. package/dist/web/layout/focus-aware-sidebar.js +5 -7
  200. package/dist/web/layout/header-action-pinned.d.ts +8 -0
  201. package/dist/web/layout/header-action-pinned.js +25 -0
  202. package/dist/web/layout/nav-collapse-state.d.ts +7 -0
  203. package/dist/web/layout/nav-collapse-state.js +76 -0
  204. package/dist/web/layout/nav-tree.js +71 -28
  205. package/dist/web/layout/notification-bell.d.ts +7 -2
  206. package/dist/web/layout/notification-bell.js +16 -5
  207. package/dist/web/layout/page-header-slot.d.ts +2 -0
  208. package/dist/web/layout/page-header-slot.js +4 -0
  209. package/dist/web/layout/screen-focus.d.ts +8 -0
  210. package/dist/web/layout/screen-focus.js +42 -0
  211. package/dist/web/layout/shell-focus.d.ts +5 -4
  212. package/dist/web/layout/shell-focus.js +14 -7
  213. package/dist/web/layout/shell-header.d.ts +2 -1
  214. package/dist/web/layout/shell-header.js +84 -27
  215. package/dist/web/layout/shell-style.d.ts +3 -0
  216. package/dist/web/layout/shell-style.js +6 -0
  217. package/dist/web/layout/sidebar-open-state.d.ts +6 -0
  218. package/dist/web/layout/sidebar-open-state.js +28 -0
  219. package/dist/web/layout/uniform-bar-controls.d.ts +2 -2
  220. package/dist/web/layout/uniform-bar-controls.js +4 -3
  221. package/dist/web/layout/use-in-app-inbox.js +8 -1
  222. package/dist/web/layout/workspace-shell.d.ts +11 -1
  223. package/dist/web/layout/workspace-shell.js +9 -5
  224. package/dist/web/lib/upload-file-ref.d.ts +2 -2
  225. package/dist/web/lib/upload-file-ref.js +4 -9
  226. package/dist/web/presence/use-presence.js +7 -2
  227. package/dist/web/primitives/banner.d.ts +1 -1
  228. package/dist/web/primitives/banner.js +22 -9
  229. package/dist/web/primitives/calendar-day-picker.js +24 -5
  230. package/dist/web/primitives/card.js +18 -8
  231. package/dist/web/primitives/code-input.js +6 -1
  232. package/dist/web/primitives/data-table/actions-column.d.ts +2 -1
  233. package/dist/web/primitives/data-table/actions-column.js +7 -3
  234. package/dist/web/primitives/data-table/card-body.d.ts +6 -1
  235. package/dist/web/primitives/data-table/card-body.js +53 -6
  236. package/dist/web/primitives/data-table/card-frame.d.ts +8 -0
  237. package/dist/web/primitives/data-table/card-frame.js +9 -0
  238. package/dist/web/primitives/data-table/card-row.js +44 -7
  239. package/dist/web/primitives/data-table/card-sort-select.d.ts +6 -2
  240. package/dist/web/primitives/data-table/card-sort-select.js +10 -7
  241. package/dist/web/primitives/data-table/card-view.js +12 -2
  242. package/dist/web/primitives/data-table/column-picker-section.js +9 -2
  243. package/dist/web/primitives/data-table/column-resize-handle.js +3 -4
  244. package/dist/web/primitives/data-table/column-role.d.ts +1 -0
  245. package/dist/web/primitives/data-table/column-role.js +1 -0
  246. package/dist/web/primitives/data-table/data-cell-props.d.ts +5 -0
  247. package/dist/web/primitives/data-table/data-cell-props.js +5 -0
  248. package/dist/web/primitives/data-table/density.js +1 -0
  249. package/dist/web/primitives/data-table/facet-cluster.d.ts +2 -1
  250. package/dist/web/primitives/data-table/facet-cluster.js +2 -2
  251. package/dist/web/primitives/data-table/group-band.js +4 -0
  252. package/dist/web/primitives/data-table/hint-cell.d.ts +14 -0
  253. package/dist/web/primitives/data-table/hint-cell.js +68 -0
  254. package/dist/web/primitives/data-table/hint-column-width.d.ts +3 -0
  255. package/dist/web/primitives/data-table/hint-column-width.js +11 -0
  256. package/dist/web/primitives/data-table/measure-value.js +2 -3
  257. package/dist/web/primitives/data-table/row-action-column.d.ts +3 -0
  258. package/dist/web/primitives/data-table/row-action-column.js +4 -0
  259. package/dist/web/primitives/data-table/row-render-parts.d.ts +1 -1
  260. package/dist/web/primitives/data-table/row-render-parts.js +3 -2
  261. package/dist/web/primitives/data-table/sort-options-select.d.ts +22 -0
  262. package/dist/web/primitives/data-table/sort-options-select.js +46 -0
  263. package/dist/web/primitives/data-table/sortable-header.d.ts +3 -1
  264. package/dist/web/primitives/data-table/sortable-header.js +5 -3
  265. package/dist/web/primitives/data-table/table-body.d.ts +1 -1
  266. package/dist/web/primitives/data-table/table-body.js +5 -3
  267. package/dist/web/primitives/data-table/table-chrome.js +3 -1
  268. package/dist/web/primitives/data-table/table-content.js +12 -7
  269. package/dist/web/primitives/data-table/table-data-cell.js +9 -3
  270. package/dist/web/primitives/data-table/table-header-row.js +5 -2
  271. package/dist/web/primitives/data-table/table-view.js +22 -3
  272. package/dist/web/primitives/data-table/toolbar-end-cluster.js +1 -1
  273. package/dist/web/primitives/data-table/toolbar.d.ts +2 -0
  274. package/dist/web/primitives/data-table/toolbar.js +70 -7
  275. package/dist/web/primitives/data-table/totals-footer.d.ts +20 -0
  276. package/dist/web/primitives/data-table/totals-footer.js +41 -9
  277. package/dist/web/primitives/data-table/use-bulk-selection.js +2 -1
  278. package/dist/web/primitives/data-table/use-column-pins.js +4 -0
  279. package/dist/web/primitives/data-table/use-data-table-state.d.ts +1 -0
  280. package/dist/web/primitives/data-table/use-data-table-state.js +9 -5
  281. package/dist/web/primitives/data-table/use-measured-column-widths.js +5 -4
  282. package/dist/web/primitives/data-table/use-row-selection.js +22 -11
  283. package/dist/web/primitives/data-table/view-menu.js +7 -1
  284. package/dist/web/primitives/data-table-cell.d.ts +21 -2
  285. package/dist/web/primitives/data-table-cell.js +129 -26
  286. package/dist/web/primitives/embedded-file-cell.js +3 -2
  287. package/dist/web/primitives/embedded-list-cards.js +3 -4
  288. package/dist/web/primitives/facet-filter.d.ts +5 -3
  289. package/dist/web/primitives/facet-filter.js +36 -5
  290. package/dist/web/primitives/facet-search-filter.d.ts +2 -1
  291. package/dist/web/primitives/facet-search-filter.js +3 -2
  292. package/dist/web/primitives/facet-trigger-label.d.ts +8 -0
  293. package/dist/web/primitives/facet-trigger-label.js +9 -0
  294. package/dist/web/primitives/file-thumbnail.d.ts +6 -2
  295. package/dist/web/primitives/file-thumbnail.js +13 -6
  296. package/dist/web/primitives/file-upload.js +3 -2
  297. package/dist/web/primitives/file-view-action.d.ts +6 -0
  298. package/dist/web/primitives/file-view-action.js +22 -0
  299. package/dist/web/primitives/files-dropzone.js +20 -9
  300. package/dist/web/primitives/form-footer-parts.d.ts +0 -1
  301. package/dist/web/primitives/form.js +0 -1
  302. package/dist/web/primitives/hint-reason-row.d.ts +32 -0
  303. package/dist/web/primitives/hint-reason-row.js +45 -0
  304. package/dist/web/primitives/index.js +6 -0
  305. package/dist/web/primitives/layout-elements.d.ts +1 -1
  306. package/dist/web/primitives/layout-elements.js +3 -3
  307. package/dist/web/primitives/metric.js +20 -6
  308. package/dist/web/primitives/page-header.d.ts +1 -1
  309. package/dist/web/primitives/page-header.js +10 -2
  310. package/dist/web/primitives/pager.d.ts +3 -2
  311. package/dist/web/primitives/pager.js +31 -24
  312. package/dist/web/primitives/reason-box.d.ts +20 -0
  313. package/dist/web/primitives/reason-box.js +13 -0
  314. package/dist/web/primitives/record-breadcrumb.d.ts +3 -0
  315. package/dist/web/primitives/record-breadcrumb.js +11 -0
  316. package/dist/web/primitives/record-steps.d.ts +3 -0
  317. package/dist/web/primitives/record-steps.js +50 -0
  318. package/dist/web/primitives/record-summary.d.ts +3 -0
  319. package/dist/web/primitives/record-summary.js +18 -0
  320. package/dist/web/primitives/row-actions.d.ts +3 -1
  321. package/dist/web/primitives/row-actions.js +14 -5
  322. package/dist/web/primitives/segmented-select.js +10 -9
  323. package/dist/web/primitives/tabs.js +6 -1
  324. package/dist/web/pwa/pwa-support.d.ts +4 -0
  325. package/dist/web/pwa/pwa-support.js +131 -0
  326. package/dist/web/sse/live-events.js +2 -2
  327. package/dist/web/tokens.js +0 -3
  328. package/dist/web/ui/sidebar.d.ts +2 -1
  329. package/dist/web/ui/sidebar.js +4 -3
  330. package/dist/web/widgets/ai-text-field.js +3 -2
  331. package/dist/web/widgets/chart-parts.d.ts +7 -1
  332. package/dist/web/widgets/chart-parts.js +10 -4
  333. package/dist/web/widgets/collapsible-section.js +1 -1
  334. package/dist/web/widgets/dashboard-list-cards.d.ts +17 -0
  335. package/dist/web/widgets/dashboard-list-cards.js +46 -0
  336. package/dist/web/widgets/dashboard-list.d.ts +45 -5
  337. package/dist/web/widgets/dashboard-list.js +126 -25
  338. package/dist/web/widgets/drawer-panel-class.d.ts +1 -0
  339. package/dist/web/widgets/drawer-panel-class.js +9 -1
  340. package/dist/web/widgets/drawer-sizing.js +1 -1
  341. package/dist/web/widgets/drawer.js +2 -2
  342. package/dist/web/widgets/floating-panel.js +4 -2
  343. package/dist/web/widgets/index.d.ts +2 -0
  344. package/dist/web/widgets/index.js +2 -0
  345. package/dist/web/widgets/infinity-list.js +18 -11
  346. package/dist/web/widgets/pdf-viewer-toolbar.js +3 -2
  347. package/dist/web/widgets/preview-width-frame.d.ts +7 -0
  348. package/dist/web/widgets/preview-width-frame.js +10 -0
  349. package/dist/web/widgets/section-card.d.ts +1 -1
  350. package/dist/web/widgets/sheet-parts.js +3 -1
  351. package/dist/web/widgets/stacked-area-chrome.js +3 -3
  352. package/dist/web/widgets/stacked-area-tooltip.js +2 -10
  353. package/dist/web/widgets/stat-box-cell.d.ts +19 -0
  354. package/dist/web/widgets/stat-box-cell.js +10 -0
  355. package/dist/web/widgets/stat.d.ts +16 -1
  356. package/dist/web/widgets/stat.js +24 -7
  357. package/dist/web/widgets/status-badge.d.ts +7 -5
  358. package/dist/web/widgets/status-badge.js +2 -2
  359. package/dist/web/widgets/step-bar.d.ts +1 -1
  360. package/dist/web/widgets/step-bar.js +37 -7
  361. package/dist/web/widgets/step-list-row.d.ts +4 -0
  362. package/dist/web/widgets/step-list-row.js +22 -14
  363. package/dist/web/widgets/step-list.d.ts +12 -4
  364. package/dist/web/widgets/step-list.js +38 -20
  365. package/dist/web/widgets/upload-zone.d.ts +8 -1
  366. package/dist/web/widgets/upload-zone.js +13 -3
  367. package/package.json +5 -5
  368. package/src/changes.json +289 -0
  369. package/src/web/styles.css +15 -0
@@ -17,7 +17,7 @@ function FacetResetButton({ onReset }) {
17
17
  return (_jsxs(UiButton, { variant: "ghost", size: "sm", className: "h-9 px-2", onClick: onReset, "data-testid": "facet-reset", children: [translate?.("kumiko.list.filter.reset") ?? "Reset", _jsx(X, {})] }));
18
18
  }
19
19
  /** The toolbar's filter controls; undefined when the list has none. */
20
- export function buildFacetCluster({ filterFacets, filterValues, onFilterChange, onFilterReset, dateRangeFacets, onDateRangeChange, rangeFacets, onRangeChange, resetAll, notice, dense, }) {
20
+ export function buildFacetCluster({ filterFacets, filterValues, onFilterChange, onFilterReset, dateRangeFacets, onDateRangeChange, rangeFacets, onRangeChange, resetAll, notice, dense, pills, }) {
21
21
  const hasFacets = filterFacets !== undefined && filterFacets.length > 0 && onFilterChange !== undefined;
22
22
  const hasDateRangeFacets = dateRangeFacets !== undefined && dateRangeFacets.length > 0 && onDateRangeChange !== undefined;
23
23
  const hasRangeFacets = rangeFacets !== undefined && rangeFacets.length > 0 && onRangeChange !== undefined;
@@ -31,7 +31,7 @@ export function buildFacetCluster({ filterFacets, filterValues, onFilterChange,
31
31
  return undefined;
32
32
  }
33
33
  return (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [hasFacets &&
34
- filterFacets.map((facet) => (_jsx(FacetFilter, { facet: facet, selected: filterValues?.[facet.field] ?? [], onChange: onFilterChange, dense: dense }, facet.field))), hasDateRangeFacets &&
34
+ filterFacets.map((facet) => (_jsx(FacetFilter, { facet: facet, selected: filterValues?.[facet.field] ?? [], onChange: onFilterChange, dense: dense, pill: pills }, facet.field))), hasDateRangeFacets &&
35
35
  dateRangeFacets.map((facet) => (_jsx(DateRangeFacetFilter, { facet: facet, onChange: onDateRangeChange }, facet.field))), hasRangeFacets &&
36
36
  rangeFacets.map((facet) => (_jsx(NumberRangeFacetFilter, { facet: facet, onChange: onRangeChange }, facet.field))), resetAll === undefined && hasActiveFilters && onFilterReset !== undefined && (_jsx(FacetResetButton, { onReset: onFilterReset })), showsResetAll && _jsx(ResetAllButton, { onReset: resetAll.onReset }), notice !== undefined && _jsx(ListNotice, { notice: notice })] }));
37
37
  }
@@ -49,5 +49,9 @@ export function GroupBand({ item, columnOf, }) {
49
49
  return (_jsx(ServerGroupHeader, { group: item.group, groupColumn: columnOf(item.owner.field), columnOf: columnOf, onToggle: item.owner.onToggle, onVisible: item.owner.onHeaderVisible }));
50
50
  case "groupMore":
51
51
  return _jsx(GroupLoadMore, { item: item });
52
+ default: {
53
+ const exhaustiveCheck = item;
54
+ return exhaustiveCheck;
55
+ }
52
56
  }
53
57
  }
@@ -0,0 +1,14 @@
1
+ import type { SelectOptionTone } from "@cosmicdrift/kumiko-framework/ui-types";
2
+ import { type ReactNode } from "react";
3
+ import type { ListColumnHintViewModel } from "../../../headless/index.ts";
4
+ export declare const HINT_TONE_TEXT_CLASS: Readonly<Record<SelectOptionTone, string>>;
5
+ export declare function hintSentenceClass(tone: SelectOptionTone | undefined, plainSentence: boolean | undefined, weight?: "font-medium" | "font-semibold"): string;
6
+ /** "To do" cell: an emphasized sentence in the row tone with an optional muted second line. */
7
+ export declare function HintCell({ value, row, hint, onOpen, leading, }: {
8
+ readonly value: unknown;
9
+ readonly row: Readonly<Record<string, unknown>>;
10
+ readonly hint: ListColumnHintViewModel;
11
+ /** Drawn in front of the sentence on its line (a badge or tone dot); the detail line starts below it, at the left edge. */
12
+ readonly leading?: ReactNode;
13
+ readonly onOpen?: () => void;
14
+ }): ReactNode;
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useId, useState } from "react";
3
+ import { isSelectOptionTone } from "../../../status-tone.js";
4
+ import { cn } from "../../lib/cn.js";
5
+ import { hintReasonOf, nonEmptyText, useHintReasonRowControl } from "../hint-reason-row.js";
6
+ import { ReasonBox, ReasonInfoButton } from "../reason-box.js";
7
+ export const HINT_TONE_TEXT_CLASS = {
8
+ bad: "text-status-bad",
9
+ warn: "text-status-warn",
10
+ critical: "text-status-critical",
11
+ ok: "text-status-ok",
12
+ accent: "text-primary",
13
+ neutral: "",
14
+ };
15
+ /** Tone `neutral` dims the sentence like an empty label (muted, not bold); `plainSentence` opts out. */
16
+ function isDimmedHintSentence(tone, plainSentence) {
17
+ return tone === "neutral" && plainSentence !== true;
18
+ }
19
+ const DIMMED_HINT_SENTENCE_CLASS = "font-normal text-muted-foreground";
20
+ const OPEN_SENTENCE_CLASS = "min-w-0 cursor-pointer bg-transparent p-0 text-left font-medium hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring";
21
+ function SentenceText({ text, className, onOpen, }) {
22
+ if (onOpen === undefined)
23
+ return _jsx("span", { className: className, children: text });
24
+ return (_jsx("button", { type: "button", className: cn(OPEN_SENTENCE_CLASS, className), onClick: (event) => {
25
+ event.stopPropagation();
26
+ onOpen();
27
+ }, children: text }));
28
+ }
29
+ // Without a sentence the empty label is the only element of the first cell, so it must stay
30
+ // the keyboard opener of a clickable row.
31
+ function EmptyHint({ label, onOpen, }) {
32
+ if (onOpen === undefined) {
33
+ return (_jsx("span", { "data-hint-empty": "true", className: "text-muted-foreground", children: label }));
34
+ }
35
+ return (_jsx("button", { type: "button", "data-hint-empty": "true", className: cn(OPEN_SENTENCE_CLASS, DIMMED_HINT_SENTENCE_CLASS), onClick: (event) => {
36
+ event.stopPropagation();
37
+ onOpen();
38
+ }, children: label }));
39
+ }
40
+ function useHintReason(hint, row) {
41
+ const [ownOpen, setOwnOpen] = useState(false);
42
+ const ownBoxId = useId();
43
+ const rowReason = useHintReasonRowControl(hint);
44
+ return {
45
+ reason: hintReasonOf(hint, row),
46
+ reasonOpen: rowReason?.open ?? ownOpen,
47
+ toggleReason: rowReason?.onToggle ?? (() => setOwnOpen((open) => !open)),
48
+ boxInRow: rowReason !== undefined,
49
+ boxId: rowReason?.boxId ?? ownBoxId,
50
+ };
51
+ }
52
+ export function hintSentenceClass(tone, plainSentence, weight = "font-medium") {
53
+ if (isDimmedHintSentence(tone, plainSentence))
54
+ return DIMMED_HINT_SENTENCE_CLASS;
55
+ return cn(weight, plainSentence !== true && tone !== undefined && HINT_TONE_TEXT_CLASS[tone]);
56
+ }
57
+ /** "To do" cell: an emphasized sentence in the row tone with an optional muted second line. */
58
+ export function HintCell({ value, row, hint, onOpen, leading, }) {
59
+ const { reason, reasonOpen, toggleReason, boxInRow, boxId } = useHintReason(hint, row);
60
+ const sentence = nonEmptyText(value);
61
+ if (sentence === undefined)
62
+ return _jsx(EmptyHint, { label: hint.emptyLabel, onOpen: onOpen });
63
+ const toneValue = hint.toneField === undefined ? undefined : row[hint.toneField];
64
+ const tone = isSelectOptionTone(toneValue) ? toneValue : undefined;
65
+ const detail = hint.detailField === undefined ? undefined : nonEmptyText(row[hint.detailField]);
66
+ const sentenceClass = hintSentenceClass(tone, hint.plainSentence);
67
+ return (_jsxs("span", { "data-hint-tone": tone, className: "flex min-w-0 flex-col gap-0.5", children: [_jsxs("span", { className: "flex items-start gap-2", children: [leading !== undefined && (_jsx("span", { className: "flex h-[1lh] shrink-0 items-center", children: leading })), _jsx(SentenceText, { text: sentence, className: sentenceClass, onOpen: onOpen }), reason !== undefined && (_jsx(ReasonInfoButton, { label: hint.reasonLabel, open: reasonOpen, onToggle: toggleReason, controls: boxId, "data-hint-reason-toggle": "true" }))] }), detail !== undefined && _jsx("small", { className: "text-xs text-muted-foreground", children: detail }), reason !== undefined && reasonOpen && !boxInRow && (_jsx(ReasonBox, { id: boxId, "data-hint-reason": "true", ...(reason.title !== undefined && { title: reason.title }), children: reason.text }))] }));
68
+ }
@@ -0,0 +1,3 @@
1
+ import type { CSSProperties } from "react";
2
+ import type { ListColumnViewModel } from "../../../headless/index.ts";
3
+ export declare function hintColumnWidthStyle(col: ListColumnViewModel, resizing: boolean): CSSProperties | undefined;
@@ -0,0 +1,11 @@
1
+ // A hint column states its width itself; the resizing layout already owns widths through <col>.
2
+ export function hintColumnWidthStyle(col, resizing) {
3
+ if (resizing || col.hint === undefined)
4
+ return undefined;
5
+ if (col.width === undefined && col.minWidth === undefined)
6
+ return undefined;
7
+ return {
8
+ ...(col.width !== undefined && { width: col.width }),
9
+ ...(col.minWidth !== undefined && { minWidth: col.minWidth }),
10
+ };
11
+ }
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { isListAggregateCurrencyAmounts } from "@cosmicdrift/kumiko-types/list-aggregate-types";
3
+ import { toMajorUnits } from "@cosmicdrift/kumiko-types/minor-units";
3
4
  import { useOptionalLocale, useOptionalTranslation } from "../../../index.js";
4
5
  import { DataTableCell } from "../data-table-cell.js";
5
- // Money measures arrive in the storage scale (minor units, ×100), one entry per currency.
6
- const MONEY_STORAGE_SCALE = 100;
7
6
  const NO_ROW = {};
8
7
  function cellTypeOf(measure, column) {
9
8
  return measure.kind === "count" ? "number" : (column?.type ?? "number");
@@ -24,5 +23,5 @@ export function MeasureValue({ measure, column, }) {
24
23
  const { value } = measure;
25
24
  if (!isListAggregateCurrencyAmounts(value))
26
25
  return cell(value, measure.kind);
27
- return (_jsx("span", { className: "inline-flex flex-col items-end", children: value.map((entry) => cell({ amount: entry.value / MONEY_STORAGE_SCALE, currency: entry.currency }, entry.currency)) }));
26
+ return (_jsx("span", { className: "inline-flex flex-col items-end", children: value.map((entry) => cell({ amount: toMajorUnits(entry.value), currency: entry.currency }, entry.currency)) }));
28
27
  }
@@ -0,0 +1,3 @@
1
+ import type { ListColumnViewModel } from "../../../headless/index.ts";
2
+ /** A column that is a per-row action link or button: right-aligned from sm with a screen-reader-only header. */
3
+ export declare function isRowActionColumn(col: ListColumnViewModel): boolean;
@@ -0,0 +1,4 @@
1
+ /** A column that is a per-row action link or button: right-aligned from sm with a screen-reader-only header. */
2
+ export function isRowActionColumn(col) {
3
+ return col.rowActionLink === true || col.display === "button";
4
+ }
@@ -5,4 +5,4 @@ import type { DataTableModel } from "./use-data-table-state.ts";
5
5
  export declare function renderExpandToggle(m: DataTableModel, row: ListRowViewModel): ReactNode;
6
6
  export declare function renderExpansion(m: DataTableModel, row: ListRowViewModel, as: "row" | "item", colSpan: number): ReactNode;
7
7
  export declare function renderBand(m: DataTableModel, item: DataTableBandItem): ReactNode;
8
- export declare function renderEmptyBlock(m: DataTableModel): ReactNode;
8
+ export declare function renderEmptyBlock(m: DataTableModel, embedded?: boolean): ReactNode;
@@ -29,7 +29,8 @@ export function renderExpansion(m, row, as, colSpan) {
29
29
  export function renderBand(m, item) {
30
30
  return _jsx(GroupBand, { item: item, columnOf: m.columnOf });
31
31
  }
32
- export function renderEmptyBlock(m) {
32
+ // `embedded`: the block sits inside the framed table's body, which already draws the border.
33
+ export function renderEmptyBlock(m, embedded = false) {
33
34
  const { testId, chromeless, fillsHeight, emptyState, tableTranslate } = m;
34
- return (_jsx("div", { "data-testid": testId !== undefined ? `${testId}-empty` : "render-list-empty", className: cn("flex flex-col items-center justify-center p-12 text-sm text-muted-foreground gap-3", chromeless !== true && !fillsHeight && "rounded-md border border-dashed"), children: emptyState ?? _jsx("span", { children: tableTranslate?.("kumiko.list.no-entries") ?? "No entries." }) }));
35
+ return (_jsx("div", { "data-testid": testId !== undefined ? `${testId}-empty` : "render-list-empty", className: cn("flex flex-col items-center justify-center gap-3 px-6 py-10 text-[13px] text-muted-foreground", !embedded && chromeless !== true && !fillsHeight && "rounded-md border border-border-row"), children: emptyState ?? _jsx("span", { children: tableTranslate?.("kumiko.list.no-entries") ?? "No entries." }) }));
35
36
  }
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from "react";
2
+ import type { DataTableProps, DataTableSort } from "../../../index.ts";
3
+ import type { DataTableModel } from "./use-data-table-state.ts";
4
+ type SortOptions = NonNullable<DataTableProps["sortOptions"]>;
5
+ export declare function sortOptionValue(option: DataTableSort): string;
6
+ export declare function activeSortOption(options: SortOptions, sort: DataTableSort | null | undefined): SortOptions[number] | undefined;
7
+ export declare function hasSortOptionsSelect(options: DataTableProps["sortOptions"], onSortChange: DataTableProps["onSortChange"]): options is SortOptions;
8
+ export declare function sortSummaryText(m: DataTableModel): string | undefined;
9
+ export declare function SortOptionsSelect({ options, sort, onSortChange, testId, className, summary, bordered, chevron, }: {
10
+ readonly options: SortOptions;
11
+ readonly sort: DataTableSort | null | undefined;
12
+ readonly onSortChange: (next: DataTableSort | null) => void;
13
+ readonly testId: string;
14
+ readonly className?: string;
15
+ /** Replaces the label text, e.g. with the sentence that also names the list size. */
16
+ readonly summary?: string;
17
+ /** Draws the select like the filter-row selects: bordered, same height. */
18
+ readonly bordered?: boolean;
19
+ /** `false` leaves the trailing chevron out, so a summary sentence reads as plain text. */
20
+ readonly chevron?: boolean;
21
+ }): ReactNode;
22
+ export {};
@@ -0,0 +1,46 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronDown } from "lucide-react";
3
+ import { useOptionalTranslation } from "../../../index.js";
4
+ import { cn } from "../../lib/cn.js";
5
+ export function sortOptionValue(option) {
6
+ return `${option.field}:${option.dir}`;
7
+ }
8
+ export function activeSortOption(options, sort) {
9
+ if (sort === undefined || sort === null)
10
+ return undefined;
11
+ return options.find((option) => option.field === sort.field && option.dir === sort.dir);
12
+ }
13
+ export function hasSortOptionsSelect(options, onSortChange) {
14
+ return onSortChange !== undefined && options !== undefined && options.length > 0;
15
+ }
16
+ // "Sorted by Urgency ↓ · 26 contracts": one sentence with the order and the size of the list.
17
+ // Undefined while no sort option is active, so the plain label stays.
18
+ export function sortSummaryText(m) {
19
+ if (m.sortOptions === undefined)
20
+ return undefined;
21
+ const active = activeSortOption(m.sortOptions, m.sort);
22
+ if (active === undefined)
23
+ return undefined;
24
+ const total = m.pager?.total ?? m.rows.length;
25
+ const noun = m.itemNoun?.(total) ?? "";
26
+ const direction = active.dir === "asc" ? "↑" : "↓";
27
+ const count = total.toLocaleString(m.tableLocale);
28
+ return (m.tableTranslate?.("kumiko.list.sort.summary", {
29
+ sort: active.label,
30
+ direction,
31
+ count,
32
+ noun,
33
+ }) ?? `Sorted by ${active.label} ${direction} · ${count} ${noun}`).trim();
34
+ }
35
+ // "Sorted by: <active label>" over a native select; with no matching option only the prefix shows
36
+ // so the control never claims an order the list is not in.
37
+ export function SortOptionsSelect({ options, sort, onSortChange, testId, className, summary, bordered = false, chevron = true, }) {
38
+ const translate = useOptionalTranslation();
39
+ const active = activeSortOption(options, sort);
40
+ const prefix = translate?.("kumiko.list.sort.prefix") ?? "Sorted by";
41
+ return (_jsxs("div", { className: cn("relative flex h-9 items-center gap-1.5 rounded-md text-[13px] text-foreground-secondary focus-within:ring-1 focus-within:ring-ring", summary !== undefined && !bordered && "h-6 text-xs text-muted-foreground", bordered && "rounded-md border border-border-strong bg-background px-2.5 text-foreground", className), children: [_jsx("span", { "aria-hidden": "true", "data-testid": `${testId}-label`, className: summary === undefined && active !== undefined ? "inline-flex gap-1.5" : undefined, children: summary !== undefined || active === undefined ? ((summary ?? prefix)) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-muted-foreground", children: `${prefix}: ` }), _jsx("span", { "data-testid": `${testId}-value`, children: active.label })] })) }), chevron && _jsx(ChevronDown, { className: "size-3.5", "aria-hidden": "true" }), _jsxs("select", { "aria-label": prefix, "data-testid": testId, value: active !== undefined ? sortOptionValue(active) : "", onChange: (e) => {
42
+ const picked = options.find((option) => sortOptionValue(option) === e.target.value);
43
+ if (picked !== undefined)
44
+ onSortChange({ field: picked.field, dir: picked.dir });
45
+ }, className: "absolute inset-0 size-full cursor-pointer opacity-0", children: [active === undefined && _jsx("option", { value: "", children: prefix }), options.map((option) => (_jsx("option", { value: sortOptionValue(option), children: option.label }, sortOptionValue(option))))] })] }));
46
+ }
@@ -1,12 +1,14 @@
1
1
  import type { CSSProperties, ReactNode } from "react";
2
2
  import type { DataTableSort } from "../../../index.ts";
3
3
  export declare const COMPACT_HEADER_CLASS = "text-xs font-semibold";
4
- export declare function SortableHeader({ field, label, sortable, highlighted, numeric, fitContent, compact, className, sort, onSortChange, style, columnField, trailing, }: {
4
+ export declare function SortableHeader({ field, label, sortable, highlighted, numeric, actionColumn, fitContent, compact, className, sort, onSortChange, style, columnField, trailing, }: {
5
5
  readonly field: string;
6
6
  readonly label: string;
7
7
  readonly sortable: boolean;
8
8
  readonly highlighted?: boolean;
9
9
  readonly numeric?: boolean;
10
+ /** Per-row action column: from sm right-aligned and without visible header text. */
11
+ readonly actionColumn?: boolean;
10
12
  readonly fitContent?: boolean;
11
13
  readonly compact?: boolean;
12
14
  readonly className?: string;
@@ -4,6 +4,8 @@ import { cn } from "../../lib/cn.js";
4
4
  import { TableHead } from "../../ui/table.js";
5
5
  import { FIT_CONTENT_CELL_CLASS } from "../data-table-cell.js";
6
6
  export const COMPACT_HEADER_CLASS = "text-xs font-semibold";
7
+ /** Small-caps look of column headers from sm up: 11px keeps dense tables inside 1280px. */
8
+ const SMALL_CAPS_HEADER_CLASS = "sm:text-[11px] sm:uppercase sm:tracking-[0.05em]";
7
9
  // SortableHeader: renders the th header per column, with or without
8
10
  // click-sort. Three paths:
9
11
  // (a) sortable=false OR no onSortChange -> plain label, no cursor
@@ -13,7 +15,7 @@ export const COMPACT_HEADER_CLASS = "text-xs font-semibold";
13
15
  // (c) sortable=true in the schema but no onSortChange prop -> still
14
16
  // label-only, but data-sortable=true stays so tests that know the
15
17
  // schema view keep working.
16
- export function SortableHeader({ field, label, sortable, highlighted, numeric, fitContent, compact, className, sort, onSortChange, style, columnField, trailing, }) {
18
+ export function SortableHeader({ field, label, sortable, highlighted, numeric, actionColumn, fitContent, compact, className, sort, onSortChange, style, columnField, trailing, }) {
17
19
  const active = sort?.field === field ? sort : undefined;
18
20
  const ariaSort = active?.dir === "asc" ? "ascending" : active?.dir === "desc" ? "descending" : "none";
19
21
  const cellExtras = {
@@ -21,13 +23,13 @@ export function SortableHeader({ field, label, sortable, highlighted, numeric, f
21
23
  ...(columnField !== undefined && { "data-column-field": columnField }),
22
24
  };
23
25
  if (!sortable || onSortChange === undefined) {
24
- return (_jsxs(TableHead, { "data-testid": `column-${field}`, "data-sortable": sortable === true ? true : undefined, "data-highlighted": highlighted === true ? "true" : undefined, className: cn("font-medium whitespace-normal text-muted-foreground", numeric === true && "text-right", fitContent === true && FIT_CONTENT_CELL_CLASS, highlighted === true && "bg-accent/40", trailing !== undefined && "group/header relative", compact === true && COMPACT_HEADER_CLASS, className), ...cellExtras, children: [label, trailing] }));
26
+ return (_jsxs(TableHead, { "data-testid": `column-${field}`, "data-sortable": sortable === true ? true : undefined, "data-highlighted": highlighted === true ? "true" : undefined, className: cn("font-medium whitespace-normal text-muted-foreground", SMALL_CAPS_HEADER_CLASS, numeric === true && "text-right", actionColumn === true && "sm:text-right", fitContent === true && FIT_CONTENT_CELL_CLASS, highlighted === true && "bg-accent/40", trailing !== undefined && "group/header relative", compact === true && COMPACT_HEADER_CLASS, className), ...cellExtras, children: [actionColumn === true ? _jsx("span", { className: "sm:sr-only", children: label }) : label, trailing] }));
25
27
  }
26
28
  const Icon = active?.dir === "asc" ? ArrowUp : active?.dir === "desc" ? ArrowDown : ArrowUpDown;
27
29
  const next = nextSortState(active?.dir, field);
28
30
  return (_jsxs(TableHead, { "data-testid": `column-${field}`, "data-sortable": "true", "data-highlighted": highlighted === true ? "true" : undefined, "aria-sort": ariaSort, className: cn(active !== undefined
29
31
  ? "font-semibold text-foreground"
30
- : "font-medium text-muted-foreground", "whitespace-normal", numeric === true && "text-right", fitContent === true && FIT_CONTENT_CELL_CLASS, highlighted === true && "bg-accent/40", trailing !== undefined && "group/header relative", compact === true && COMPACT_HEADER_CLASS, className), ...cellExtras, children: [_jsxs("button", { type: "button", onClick: () => onSortChange(next), className: cn("group/sort inline-flex h-8 items-center gap-1.5 rounded-sm px-2 -mx-2 text-sm [font-weight:inherit]", "hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", active !== undefined && "text-foreground", compact === true && "text-xs"), children: [_jsx("span", { children: label }), _jsx(Icon, { "data-sort-icon": active === undefined ? "idle" : "active", className: cn("size-3.5", active === undefined &&
32
+ : "font-medium text-muted-foreground", "whitespace-normal", SMALL_CAPS_HEADER_CLASS, numeric === true && "text-right", fitContent === true && FIT_CONTENT_CELL_CLASS, highlighted === true && "bg-accent/40", trailing !== undefined && "group/header relative", compact === true && COMPACT_HEADER_CLASS, className), ...cellExtras, children: [_jsxs("button", { type: "button", onClick: () => onSortChange(next), className: cn("group/sort inline-flex h-8 items-center gap-1.5 rounded-sm px-2 -mx-2 text-sm [font-weight:inherit]", SMALL_CAPS_HEADER_CLASS, "hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", active !== undefined && "text-foreground", compact === true && "text-xs"), children: [_jsx("span", { children: label }), _jsx(Icon, { "data-sort-icon": active === undefined ? "idle" : "active", className: cn("size-3.5", active === undefined &&
31
33
  "opacity-0 group-hover/sort:opacity-40 group-focus-visible/sort:opacity-40"), "aria-hidden": "true" })] }), trailing] }));
32
34
  }
33
35
  // 3-state toggle: no sort -> asc -> desc -> no sort. Idiomatic for
@@ -1,3 +1,3 @@
1
- import { type ReactNode } from "react";
1
+ import type { ReactNode } from "react";
2
2
  import type { DataTableModel } from "./use-data-table-state.ts";
3
3
  export declare function renderTableBody(m: DataTableModel): ReactNode;
@@ -1,8 +1,8 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Fragment } from "react";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  import { cn } from "../../lib/cn.js";
4
3
  import { TableBody, TableCell, TableRow } from "../../ui/table.js";
5
4
  import { rowToneClass } from "../data-table-cell.js";
5
+ import { HintReasonRowScope, hintReasonOf } from "../hint-reason-row.js";
6
6
  import { RowActionsCell } from "../row-actions.js";
7
7
  import { ActionsBodyCell } from "./actions-column.js";
8
8
  import { bandClassName, bandReactKey, bandTestId } from "./group-band.js";
@@ -25,7 +25,9 @@ function renderDataRow(m, row) {
25
25
  const openRow = m.rowOpener(row);
26
26
  const opensOnClick = openRow !== undefined;
27
27
  const keyboard = m.keyboardRow(row.id, openRow);
28
- return (_jsxs(Fragment, { children: [_jsxs(TableRow, { "data-testid": m.rowTestId(row), "data-tone": rowTone?.(row), onClick: openRow, className: cn(rowToneClass(rowTone?.(row)), opensOnClick && "cursor-pointer", m.fillsHeight && "h-10 border-border-row hover:bg-muted", density.row, keyboard.className), ...keyboard.props, children: [m.selection.bodyCell(row, m.pins.bodyCell(SELECT_COLUMN_KEY)), m.expansion !== undefined && renderExpandCell(m, row), m.columns.map((col, colIndex) => renderDataCell(m, row, col, colIndex, opensOnClick)), m.hasTableActions && tableActions !== undefined && renderActionsCell(m, row, tableActions)] }), renderExpansion(m, row, "row", m.fullColSpan)] }, row.id));
28
+ const reasonHint = m.columns.find((col) => col.hint !== undefined && hintReasonOf(col.hint, row.values) !== undefined)?.hint;
29
+ const rowElements = (_jsxs(_Fragment, { children: [_jsxs(TableRow, { "data-testid": m.rowTestId(row), "data-tone": rowTone?.(row), onClick: openRow, className: cn(rowToneClass(rowTone?.(row)), opensOnClick && "cursor-pointer", "[&:has(+[data-reason-row])]:border-b-0", m.fillsHeight && "h-10 border-border-row hover:bg-muted", density.row, keyboard.className), ...keyboard.props, children: [m.selection.bodyCell(row, m.pins.bodyCell(SELECT_COLUMN_KEY)), m.expansion !== undefined && renderExpandCell(m, row), m.columns.map((col, colIndex) => renderDataCell(m, row, col, colIndex, opensOnClick)), m.hasTableActions && tableActions !== undefined && renderActionsCell(m, row, tableActions)] }), renderExpansion(m, row, "row", m.fullColSpan)] }));
30
+ return (_jsx(HintReasonRowScope, { hint: reasonHint, row: row.values, renderBoxRow: (box) => (_jsx(TableRow, { "data-testid": `${m.rowTestId(row)}-reason`, "data-reason-row": "true", children: _jsx(TableCell, { colSpan: m.fullColSpan, children: box }) })), children: rowElements }, row.id));
29
31
  }
30
32
  export function renderTableBody(m) {
31
33
  return (_jsx(TableBody, { children: m.tableItems.map((item) => item.kind === "row" ? renderDataRow(m, item.row) : renderBandRow(m, item)) }));
@@ -14,7 +14,9 @@ export function FlushTable({ className, ...props }) {
14
14
  // in SortableHeader: a `[&_th]:font-*` rule here would outrank it.
15
15
  // Child selectors only: an expanded row nests a whole table inside a cell, and
16
16
  // descendant selectors would make its header sticky and re-pad its cells.
17
- export const FILL_TABLE_CLASS = cn("[&>thead>tr>th]:sticky [&>thead>tr>th]:top-0 [&>thead>tr>th]:z-10 [&>thead>tr>th]:h-9 [&>thead>tr>th]:bg-muted [&>thead>tr>th]:px-2 [&>thead>tr>th]:text-[13px]", "[&>thead>tr>th]:shadow-[inset_0_-1px_0_var(--color-border)] [&>thead>tr>th_button]:text-[13px] [&>tbody>tr>td]:px-2 [&>tbody>tr>td]:py-0", "[&>*>tr>:first-child]:pl-6 [&>*>tr>:last-child]:pr-6");
17
+ export const FILL_TABLE_CLASS = cn("[&>thead>tr>th]:sticky [&>thead>tr>th]:top-0 [&>thead>tr>th]:z-10 [&>thead>tr>th]:h-9 [&>thead>tr>th]:bg-muted [&>thead>tr>th]:px-2 [&>thead>tr>th]:text-[13px]", "[&>thead>tr>th]:shadow-[inset_0_-1px_0_var(--color-border)] [&>thead>tr>th_button]:text-[13px] [&>tbody>tr>td]:px-2 [&>tbody>tr>td]:py-0",
18
+ // The small-caps header size of SortableHeader; the child selectors above would outrank it.
19
+ "sm:[&>thead>tr>th]:text-[11px] sm:[&>thead>tr>th_button]:text-[11px]", "[&>*>tr>:first-child]:pl-6 [&>*>tr>:last-child]:pr-6");
18
20
  // `!`: beats the first/last-child padding of FILL_TABLE_CLASS, which would
19
21
  // otherwise widen the narrow toggle column / pad the full-width expansion cell.
20
22
  // The nested table's sticky actions cell (last td) gets the muted surface
@@ -1,5 +1,7 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/cn.js";
2
3
  import { InfiniteSentinel, Pager } from "../pager.js";
4
+ import { CARD_SURFACE_CLASS, hasSeparateCardRows, isInsideCardFrame } from "./card-frame.js";
3
5
  import { renderCardsView } from "./card-view.js";
4
6
  import { renderEmptyBlock } from "./row-render-parts.js";
5
7
  import { DataTableFooter } from "./table-footer.js";
@@ -9,10 +11,10 @@ import { renderTableView } from "./table-view.js";
9
11
  // Except total === 0: then there is nothing to paginate. Incompatible with
10
12
  // infinite scroll: the caller sets either pager OR onReachEnd.
11
13
  function renderPager(m) {
12
- const { pager, serverGroups, itemNoun, testId } = m;
14
+ const { pager, serverGroups, testId } = m;
13
15
  if (pager === undefined || !(pager.total > 0) || serverGroups !== undefined)
14
16
  return undefined;
15
- return (_jsx(Pager, { page: pager.page, limit: pager.limit, total: pager.total, onPageChange: pager.onPageChange, ...(pager.pageSizeOptions !== undefined && { pageSizeOptions: pager.pageSizeOptions }), ...(pager.onPageSizeChange !== undefined && { onPageSizeChange: pager.onPageSizeChange }), ...(itemNoun !== undefined && { itemNoun }), testId: testId !== undefined ? `${testId}-pager` : "render-list-pager", pinned: m.fillsHeight }));
17
+ return (_jsx(Pager, { page: pager.page, limit: pager.limit, total: pager.total, onPageChange: pager.onPageChange, ...(pager.pageSizeOptions !== undefined && { pageSizeOptions: pager.pageSizeOptions }), ...(pager.onPageSizeChange !== undefined && { onPageSizeChange: pager.onPageSizeChange }), testId: testId !== undefined ? `${testId}-pager` : "render-list-pager", pinned: m.fillsHeight || isInsideCardFrame(m), plain: m.isNarrow && hasSeparateCardRows(m) }));
16
18
  }
17
19
  function renderSentinel(m, pagerElement) {
18
20
  const { onReachEnd, serverGroups, testId } = m;
@@ -23,7 +25,7 @@ function renderSentinel(m, pagerElement) {
23
25
  }
24
26
  function renderTableBodyContent(m) {
25
27
  if (m.isEmpty)
26
- return renderEmptyBlock(m);
28
+ return isInsideCardFrame(m) ? renderTableView(m) : renderEmptyBlock(m);
27
29
  return m.isNarrow ? renderCardsView(m) : renderTableView(m);
28
30
  }
29
31
  export function renderTableContent(m) {
@@ -31,11 +33,14 @@ export function renderTableContent(m) {
31
33
  const tableContent = renderTableBodyContent(m);
32
34
  const pagerElement = renderPager(m);
33
35
  const sentinelElement = renderSentinel(m, pagerElement);
36
+ const framed = isInsideCardFrame(m);
34
37
  // With scrollBody the footer (pager, else the entry count) sits OUTSIDE the
35
38
  // scroll surface so it stays put at any row count; the infinite sentinel
36
39
  // stays INSIDE, or it would never intersect the scrollport.
37
- if (!m.fillsHeight) {
38
- return (_jsxs(_Fragment, { children: [m.selection.bar, tableContent, pagerElement, sentinelElement] }));
39
- }
40
- return (_jsxs(_Fragment, { children: [m.selection.bar, _jsxs("div", { "data-testid": testId !== undefined ? `${testId}-scroll` : "render-list-scroll", className: "min-h-0 flex-1 overflow-auto border-t border-border bg-card", children: [tableContent, sentinelElement] }), pagerElement ?? (_jsx(DataTableFooter, { count: serverGroups?.totalCount ?? m.rows.length, ...(itemNoun !== undefined && { itemNoun }), testId: testId !== undefined ? `${testId}-footer` : "render-list-footer" }))] }));
40
+ const content = m.fillsHeight ? (_jsxs("div", { "data-testid": testId !== undefined ? `${testId}-scroll` : "render-list-scroll", className: cn("min-h-0 flex-1 overflow-auto bg-card", !framed && "border-t border-border"), children: [tableContent, sentinelElement] })) : (_jsxs(_Fragment, { children: [tableContent, sentinelElement] }));
41
+ const footer = pagerElement ??
42
+ (m.fillsHeight ? (_jsx(DataTableFooter, { count: serverGroups?.totalCount ?? m.rows.length, ...(itemNoun !== undefined && { itemNoun }), testId: testId !== undefined ? `${testId}-footer` : "render-list-footer" })) : undefined);
43
+ // Frame card: content and footer share one bordered card. A fill-height card is as tall as
44
+ // its rows and shrinks into the scroll container; the 24px sides match the toolbar's inset.
45
+ return (_jsxs(_Fragment, { children: [m.selection.bar, framed ? (_jsxs("div", { "data-testid": testId !== undefined ? `${testId}-frame` : "render-list-frame", className: cn(CARD_SURFACE_CLASS, "overflow-hidden", m.fillsHeight && "mx-6 mb-6 flex min-h-0 flex-col"), children: [content, footer] })) : (_jsxs(_Fragment, { children: [content, footer] }))] }));
41
46
  }
@@ -3,6 +3,8 @@ import { cn } from "../../lib/cn.js";
3
3
  import { TableCell } from "../../ui/table.js";
4
4
  import { cellLinkProp, cellTitle, DataTableCell, FIT_CONTENT_CELL_CLASS, FirstCellLink, isEmptyCellValue, NUMERIC_COLUMN_TYPES, TABULAR_COLUMN_TYPES, } from "../data-table-cell.js";
5
5
  import { columnCellPresentationProps } from "./data-cell-props.js";
6
+ import { hintColumnWidthStyle } from "./hint-column-width.js";
7
+ import { isRowActionColumn } from "./row-action-column.js";
6
8
  // Text wraps instead of truncating: nowrap cells keep their
7
9
  // full width, so a wide table scrolled sideways and its
8
10
  // last column slid under the sticky actions column with
@@ -28,6 +30,9 @@ function isDateColumn(col) {
28
30
  function autoLayoutCellClassName(m, col, colIndex) {
29
31
  if (m.sizing !== undefined && isDateColumn(col))
30
32
  return "whitespace-nowrap";
33
+ // max-w-xs would cap a hint column that states a wider width.
34
+ if (col.hint !== undefined && col.width !== undefined)
35
+ return "whitespace-normal break-words";
31
36
  return colIndex === 0 && m.sizing !== undefined
32
37
  ? "whitespace-normal [overflow-wrap:anywhere]"
33
38
  : "max-w-xs whitespace-normal break-words";
@@ -37,15 +42,16 @@ function dataCellClassName(m, col, colIndex, pinClassName) {
37
42
  ? m.sizing?.fixed === true
38
43
  ? "overflow-hidden whitespace-normal break-words"
39
44
  : autoLayoutCellClassName(m, col, colIndex)
40
- : FIT_CONTENT_CELL_CLASS, colIndex === 0 ? "font-medium text-foreground" : "text-foreground-secondary", NUMERIC_COLUMN_TYPES.has(col.type) && "text-right", TABULAR_COLUMN_TYPES.has(col.type) && "tabular-nums", col.highlighted === true && "bg-accent/40", m.density.cell, pinClassName);
45
+ : FIT_CONTENT_CELL_CLASS, colIndex === 0 ? "font-medium text-foreground" : "text-foreground-secondary", NUMERIC_COLUMN_TYPES.has(col.type) && "text-right", isRowActionColumn(col) && "sm:text-right", TABULAR_COLUMN_TYPES.has(col.type) && "tabular-nums", col.highlighted === true && "bg-accent/40", m.density.cell, pinClassName);
41
46
  }
42
47
  export function renderDataCell(m, row, col, colIndex, opensOnClick) {
43
48
  const { getCellTestId, onCellChange, onRowClick, tableTranslate, tableLocale } = m;
44
49
  const bodyPin = m.pins.bodyCell(col.field);
45
50
  const linksFirstCell = colIndex === 0 && opensOnClick && onCellChange === undefined;
46
- return (_jsx(TableCell, { "data-testid": getCellTestId?.(row, col.field) ?? `cell-${row.id}-${col.field}`, "data-highlighted": col.highlighted === true ? "true" : undefined, className: dataCellClassName(m, col, colIndex, bodyPin.className), style: bodyPin.style, title: cellTitle(row.values[col.field]), children: _jsx(FirstCellLink, { enabled: linksFirstCell, onOpen: () => onRowClick?.(row), empty: isEmptyCellValue(row.values[col.field]), emptyLabel: m.rowClickLabel, children: _jsx(DataTableCell, { value: row.values[col.field], row: row.values, field: col.field, type: col.type, renderer: col.renderer, translate: tableTranslate, locale: tableLocale, ...columnCellPresentationProps(col), ...(col.fileDisplay !== undefined && {
51
+ const wrapsCellInOpener = linksFirstCell && col.hint === undefined;
52
+ return (_jsx(TableCell, { "data-testid": getCellTestId?.(row, col.field) ?? `cell-${row.id}-${col.field}`, "data-highlighted": col.highlighted === true ? "true" : undefined, className: dataCellClassName(m, col, colIndex, bodyPin.className), style: { ...bodyPin.style, ...hintColumnWidthStyle(col, m.sizing !== undefined) }, title: cellTitle(row.values[col.field]), children: _jsx(FirstCellLink, { enabled: wrapsCellInOpener, onOpen: () => onRowClick?.(row), empty: col.hint === undefined && isEmptyCellValue(row.values[col.field]), emptyLabel: m.rowClickLabel, children: _jsx(DataTableCell, { value: row.values[col.field], row: row.values, field: col.field, type: col.type, renderer: col.renderer, translate: tableTranslate, locale: tableLocale, ...columnCellPresentationProps(col), ...(col.fileDisplay !== undefined && {
47
53
  fileDisplay: col.fileDisplay,
48
54
  }), ...(onCellChange !== undefined && {
49
55
  onChange: (value) => onCellChange(row.id, col.field, value),
50
- }), ...cellLinkProp(col, row, !linksFirstCell) }) }) }, col.field));
56
+ }), ...cellLinkProp(col, row, !linksFirstCell), ...(linksFirstCell && !wrapsCellInOpener && { onOpenRow: () => onRowClick?.(row) }) }) }) }, col.field));
51
57
  }
@@ -4,17 +4,20 @@ import { TableHead, TableHeader, TableRow } from "../../ui/table.js";
4
4
  import { NUMERIC_COLUMN_TYPES } from "../data-table-cell.js";
5
5
  import { ActionsHeaderCell } from "./actions-column.js";
6
6
  import { ColumnResizeHandle } from "./column-resize-handle.js";
7
+ import { COLUMN_ROLE_ATTRIBUTE } from "./column-role.js";
8
+ import { hintColumnWidthStyle } from "./hint-column-width.js";
9
+ import { isRowActionColumn } from "./row-action-column.js";
7
10
  import { SortableHeader } from "./sortable-header.js";
8
11
  import { EXPAND_TOGGLE_CELL_CLASS } from "./table-chrome.js";
9
12
  import { EXPAND_COLUMN_KEY, SELECT_COLUMN_KEY } from "./use-column-pins.js";
10
13
  function renderColumnHeader(m, col) {
11
14
  const { sizing, sort, onSortChange } = m;
12
15
  const headerPin = m.pins.headerCell(col.field);
13
- return (_jsx(SortableHeader, { field: col.field, label: col.label, sortable: col.sortable === true, highlighted: col.highlighted === true, numeric: NUMERIC_COLUMN_TYPES.has(col.type), fitContent: col.fileDisplay !== undefined, compact: m.compactHeader === true, className: cn(m.density.header, headerPin.className), style: headerPin.style, columnField: headerPin.columnField, trailing: sizing && _jsx(ColumnResizeHandle, { field: col.field, label: col.label, sizing: sizing }), ...(sort !== undefined && sort !== null && { sort }), ...(onSortChange !== undefined && { onSortChange }) }, col.field));
16
+ return (_jsx(SortableHeader, { field: col.field, label: col.label, sortable: col.sortable === true, highlighted: col.highlighted === true, numeric: NUMERIC_COLUMN_TYPES.has(col.type), actionColumn: isRowActionColumn(col), fitContent: col.fileDisplay !== undefined, compact: m.compactHeader === true, className: cn(m.density.header, headerPin.className), style: { ...headerPin.style, ...hintColumnWidthStyle(col, sizing !== undefined) }, columnField: headerPin.columnField, trailing: sizing && _jsx(ColumnResizeHandle, { field: col.field, label: col.label, sizing: sizing }), ...(sort !== undefined && sort !== null && { sort }), ...(onSortChange !== undefined && { onSortChange }) }, col.field));
14
17
  }
15
18
  function renderExpandHeaderCell(m) {
16
19
  const expandHeaderPin = m.pins.headerCell(EXPAND_COLUMN_KEY);
17
- return (_jsx(TableHead, { "data-testid": "column-expand", className: cn(EXPAND_TOGGLE_CELL_CLASS, expandHeaderPin.className), style: expandHeaderPin.style }));
20
+ return (_jsx(TableHead, { "data-testid": "column-expand", [COLUMN_ROLE_ATTRIBUTE]: "expand", className: cn(EXPAND_TOGGLE_CELL_CLASS, expandHeaderPin.className), style: expandHeaderPin.style }));
18
21
  }
19
22
  export function renderTableHeader(m) {
20
23
  return (_jsx(TableHeader, { className: "bg-muted", children: _jsxs(TableRow, { ref: m.headerRowRef, className: "hover:bg-transparent", children: [m.selection.headerCell(m.pins.headerCell(SELECT_COLUMN_KEY)), m.expansion !== undefined && renderExpandHeaderCell(m), m.columns.map((col) => renderColumnHeader(m, col)), m.hasTableActions && (_jsx(ActionsHeaderCell, { label: m.tableTranslate?.("kumiko.list.actions") ?? "Actions", style: m.pins.actionsHeaderStyle, absorbsLeftover: m.sizing?.fixed === true }))] }) }));
@@ -1,25 +1,44 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../../lib/cn.js";
3
- import { Table } from "../../ui/table.js";
3
+ import { Table, TableBody, TableCell, TableFooter, TableRow } from "../../ui/table.js";
4
+ import { isInsideCardFrame } from "./card-frame.js";
4
5
  import { ColumnWidthGroup } from "./column-resize-handle.js";
6
+ import { renderEmptyBlock } from "./row-render-parts.js";
5
7
  import { renderTableBody } from "./table-body.js";
6
8
  import { FILL_TABLE_CLASS, FlushTable } from "./table-chrome.js";
7
9
  import { renderTableHeader } from "./table-header-row.js";
8
- import { TotalsFooterRow } from "./totals-footer.js";
10
+ import { SummaryFooterRow, TotalsFooterRow } from "./totals-footer.js";
9
11
  function renderColumnWidths(m) {
10
12
  const { sizing } = m;
11
13
  if (sizing === undefined || !sizing.fixed)
12
14
  return null;
13
15
  return (_jsx(ColumnWidthGroup, { fields: m.columns.map((col) => col.field), sizing: sizing, hasExpandColumn: m.expansion !== undefined, hasSelectColumn: m.selection.active, hasActionsColumn: m.hasTableActions }));
14
16
  }
17
+ function renderSummaryRow(m) {
18
+ if (m.summaryRow === undefined)
19
+ return null;
20
+ return (_jsx(SummaryFooterRow, { summary: m.summaryRow, colSpan: m.fullColSpan, cellClassName: m.density.cell, columns: m.columns, cellPin: m.pins.bodyCell, leadingCells: { select: m.selection.active, expand: m.expansion !== undefined }, actionsCell: m.hasTableActions ? { fillsHeight: m.fillsHeight } : undefined }));
21
+ }
15
22
  function renderTotalsRow(m) {
16
23
  const { totals } = m;
17
24
  if (totals === undefined)
18
25
  return null;
19
26
  return (_jsx(TotalsFooterRow, { totals: totals, columns: m.columns, cellPin: m.pins.bodyCell, leadingCells: { select: m.selection.active, expand: m.expansion !== undefined }, actionsCell: m.hasTableActions ? { fillsHeight: m.fillsHeight } : undefined, cellClassName: m.density.cell }));
20
27
  }
28
+ // Both rows share one tfoot; a second tfoot is invalid HTML.
29
+ function renderTableFooter(m) {
30
+ const summary = renderSummaryRow(m);
31
+ const totals = renderTotalsRow(m);
32
+ if (summary === null && totals === null)
33
+ return null;
34
+ return (_jsxs(TableFooter, { className: "bg-muted text-[12.5px]", children: [summary, totals] }));
35
+ }
36
+ // A framed list that is empty keeps its header row; the empty state fills one spanning row below it.
37
+ function renderEmptyBody(m) {
38
+ return (_jsx(TableBody, { children: _jsx(TableRow, { className: "hover:bg-transparent", children: _jsx(TableCell, { colSpan: m.fullColSpan, className: "p-0", children: renderEmptyBlock(m, true) }) }) }));
39
+ }
21
40
  export function renderTableView(m) {
22
41
  const { fillsHeight, chromeless, sizing, testId } = m;
23
42
  const TableRoot = fillsHeight ? FlushTable : Table;
24
- return (_jsx("div", { className: cn(!fillsHeight && "overflow-hidden", !fillsHeight && chromeless !== true && "rounded-lg border bg-card"), children: _jsxs(TableRoot, { "data-testid": testId, className: fillsHeight ? FILL_TABLE_CLASS : undefined, ...(sizing?.tableStyle !== undefined && { style: sizing.tableStyle }), children: [renderColumnWidths(m), renderTableHeader(m), renderTableBody(m), renderTotalsRow(m)] }) }));
43
+ return (_jsx("div", { className: cn(!fillsHeight && "overflow-hidden", !fillsHeight && chromeless !== true && !isInsideCardFrame(m) && "rounded-lg border bg-card"), children: _jsxs(TableRoot, { "data-testid": testId, className: fillsHeight ? FILL_TABLE_CLASS : undefined, ...(sizing?.tableStyle !== undefined && { style: sizing.tableStyle }), children: [renderColumnWidths(m), renderTableHeader(m), m.isEmpty ? renderEmptyBody(m) : renderTableBody(m), m.isEmpty ? null : renderTableFooter(m)] }) }));
25
44
  }
@@ -9,5 +9,5 @@ export function ToolbarEndCluster({ view, columnLabels, exportList, toolbarEnd,
9
9
  if (!toolbarEndHasContent(view, exportList, toolbarEnd))
10
10
  return null;
11
11
  const showsViewMenu = viewHasMenu(view);
12
- return (_jsxs("div", { className: "flex flex-wrap items-center gap-2 ml-auto", children: [showsViewMenu && _jsx(ViewMenu, { view: view, columnLabels: columnLabels }), exportList !== undefined && _jsx(ExportButton, { source: exportList }), toolbarEnd] }));
12
+ return (_jsxs("div", { className: "flex flex-wrap items-center gap-2 ml-auto", children: [showsViewMenu && (_jsx("div", { className: "max-sm:hidden", children: _jsx(ViewMenu, { view: view, columnLabels: columnLabels }) })), exportList !== undefined && (_jsx("div", { className: "max-sm:hidden", children: _jsx(ExportButton, { source: exportList }) })), toolbarEnd] }));
13
13
  }
@@ -1,5 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { DataTableModel } from "./use-data-table-state.ts";
3
+ /** Facets that open behind the filter icon on a phone; the rest stays in the inline cluster. */
4
+ export declare function buildBehindFilterCluster(m: DataTableModel): ReactNode;
3
5
  export declare function buildModelFacetCluster(m: DataTableModel): ReactNode;
4
6
  export declare function hasToolbarContent(m: DataTableModel, facetCluster: ReactNode): boolean;
5
7
  export declare function toolbarMergesDescription(m: DataTableModel, facetCluster: ReactNode): boolean;