@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
@@ -10,7 +10,6 @@ export type FormFooterModel = {
10
10
  readonly unsavedCount: number | undefined;
11
11
  readonly railed: boolean;
12
12
  readonly pinned: boolean;
13
- readonly secondaryActions: ReactNode;
14
13
  readonly renderedSecondary: ReactNode;
15
14
  readonly renderedActions: ReactNode;
16
15
  readonly hasNonPrimaryOverflow: boolean;
@@ -185,7 +185,6 @@ export function FormFooter({ actions, secondaryActions, testId, chromeless, stic
185
185
  unsavedCount,
186
186
  railed,
187
187
  pinned,
188
- secondaryActions,
189
188
  renderedSecondary,
190
189
  renderedActions,
191
190
  hasNonPrimaryOverflow,
@@ -0,0 +1,32 @@
1
+ import { type ReactNode } from "react";
2
+ import type { ListColumnHintViewModel } from "../../headless/index.ts";
3
+ export type HintReasonRowControl = {
4
+ readonly hint: ListColumnHintViewModel;
5
+ readonly open: boolean;
6
+ readonly onToggle: () => void;
7
+ readonly boxId: string;
8
+ };
9
+ /**
10
+ * Set when the row of `hint` owns the reason state, because it draws the box as a row of its own.
11
+ * The match is by object identity: the scope and the cell must both take `hint` from the same
12
+ * `m.columns` entry, so a copy such as `cardHint` deliberately does not match.
13
+ */
14
+ export declare function useHintReasonRowControl(hint: ListColumnHintViewModel): HintReasonRowControl | undefined;
15
+ export declare function nonEmptyText(value: unknown): string | undefined;
16
+ export type HintReason = {
17
+ readonly text: string;
18
+ readonly title: string | undefined;
19
+ };
20
+ export declare function hintReasonOf(hint: ListColumnHintViewModel, row: Readonly<Record<string, unknown>>): HintReason | undefined;
21
+ export declare function isReasonOpenByDefault(hint: ListColumnHintViewModel, row: Readonly<Record<string, unknown>>): boolean;
22
+ /**
23
+ * Keeps the open state of a row's reason and draws the box as a row below the row, over its full
24
+ * width. Without a `hint` it only renders its children, so the row does not remount when a reason
25
+ * appears or disappears. The default-open state counts at the first render only, and not below sm.
26
+ */
27
+ export declare function HintReasonRowScope({ hint, row, renderBoxRow, children, }: {
28
+ readonly hint: ListColumnHintViewModel | undefined;
29
+ readonly row: Readonly<Record<string, unknown>>;
30
+ readonly renderBoxRow: (box: ReactNode) => ReactNode;
31
+ readonly children: ReactNode;
32
+ }): ReactNode;
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createContext, useContext, useId, useState } from "react";
3
+ import { ReasonBox } from "./reason-box.js";
4
+ import { useIsBelowSmViewport } from "./use-narrow-viewport.js";
5
+ const HintReasonRowContext = createContext(undefined);
6
+ /**
7
+ * Set when the row of `hint` owns the reason state, because it draws the box as a row of its own.
8
+ * The match is by object identity: the scope and the cell must both take `hint` from the same
9
+ * `m.columns` entry, so a copy such as `cardHint` deliberately does not match.
10
+ */
11
+ export function useHintReasonRowControl(hint) {
12
+ const control = useContext(HintReasonRowContext);
13
+ return control?.hint === hint ? control : undefined;
14
+ }
15
+ export function nonEmptyText(value) {
16
+ if (typeof value !== "string")
17
+ return undefined;
18
+ const trimmed = value.trim();
19
+ return trimmed === "" ? undefined : trimmed;
20
+ }
21
+ export function hintReasonOf(hint, row) {
22
+ const text = hint.reasonField === undefined ? undefined : nonEmptyText(row[hint.reasonField]);
23
+ if (text === undefined)
24
+ return undefined;
25
+ const title = hint.reasonTitleField === undefined ? undefined : nonEmptyText(row[hint.reasonTitleField]);
26
+ return { text, title };
27
+ }
28
+ export function isReasonOpenByDefault(hint, row) {
29
+ return hint.reasonOpenField !== undefined && row[hint.reasonOpenField] === true;
30
+ }
31
+ /**
32
+ * Keeps the open state of a row's reason and draws the box as a row below the row, over its full
33
+ * width. Without a `hint` it only renders its children, so the row does not remount when a reason
34
+ * appears or disappears. The default-open state counts at the first render only, and not below sm.
35
+ */
36
+ export function HintReasonRowScope({ hint, row, renderBoxRow, children, }) {
37
+ const belowSm = useIsBelowSmViewport();
38
+ const boxId = useId();
39
+ const [open, setOpen] = useState(() => hint !== undefined && !belowSm && isReasonOpenByDefault(hint, row));
40
+ const reason = hint === undefined ? undefined : hintReasonOf(hint, row);
41
+ const control = hint === undefined ? undefined : { hint, open, onToggle: () => setOpen((was) => !was), boxId };
42
+ return (_jsxs(HintReasonRowContext.Provider, { value: control, children: [children, open &&
43
+ reason !== undefined &&
44
+ renderBoxRow(_jsx(ReasonBox, { id: boxId, "data-hint-reason": "true", ...(reason.title !== undefined && { title: reason.title }), children: reason.text }))] }));
45
+ }
@@ -16,6 +16,9 @@ import { DefaultMetric, DefaultMetricBand } from "./metric.js";
16
16
  import { DefaultModal } from "./modal.js";
17
17
  import { DefaultPageHeader } from "./page-header.js";
18
18
  import { PromoPanel } from "./promo-panel.js";
19
+ import { DefaultRecordBreadcrumb } from "./record-breadcrumb.js";
20
+ import { DefaultRecordSteps } from "./record-steps.js";
21
+ import { DefaultRecordSummary } from "./record-summary.js";
19
22
  import { CopyButton, ShareButton } from "./share-actions.js";
20
23
  import { DefaultStatusBadge } from "./status-badge.js";
21
24
  import { StickyActionBar } from "./sticky-action-bar.js";
@@ -68,6 +71,9 @@ export const defaultPrimitives = {
68
71
  StatusBadge: DefaultStatusBadge,
69
72
  Metric: DefaultMetric,
70
73
  MetricBand: DefaultMetricBand,
74
+ RecordBreadcrumb: DefaultRecordBreadcrumb,
75
+ RecordSummary: DefaultRecordSummary,
76
+ RecordSteps: DefaultRecordSteps,
71
77
  PageHeader: DefaultPageHeader,
72
78
  JsonView: DefaultJsonView,
73
79
  FileValueList,
@@ -2,7 +2,7 @@ import { type MouseEvent, type ReactNode } from "react";
2
2
  import type { FillContainerProps, GridCellProps, GridProps, HeadingProps, LinkProps, ProgressProps, SectionProps, StepBarProps, TextProps, WizardStepGroupProps } from "../../index.ts";
3
3
  import "../react-css-custom-properties.ts";
4
4
  export declare function DefaultSection({ id, title, subtitle, subtitleBelowLgOnly, children, actions, variant, layout, testId, icon, }: SectionProps): ReactNode;
5
- export declare function DefaultFillContainer({ children, testId, grow }: FillContainerProps): ReactNode;
5
+ export declare function DefaultFillContainer({ children, testId, grow, className, }: FillContainerProps): ReactNode;
6
6
  export declare function DefaultGrid({ columns, children, testId, maxRows, flow, list, ariaLabelledBy, }: GridProps): ReactNode;
7
7
  export declare function DefaultGridCell({ span, width, children }: GridCellProps): ReactNode;
8
8
  export declare function DefaultText({ variant, decorative, children, testId, }: TextProps): ReactNode;
@@ -45,11 +45,11 @@ export function DefaultSection({ id, title, subtitle, subtitleBelowLgOnly, child
45
45
  // non-portaled overlay.
46
46
  return (_jsx("div", { "data-slot": "card", "data-testid": testId, className: cn(cardSurface(), "overflow-hidden", variant === "destructive" && "border-destructive/40"), children: _jsxs("div", { className: "flex flex-col gap-4 px-6 py-6", children: [header, children] }) }));
47
47
  }
48
- export function DefaultFillContainer({ children, testId, grow }) {
48
+ export function DefaultFillContainer({ children, testId, grow, className, }) {
49
49
  // flex-1 only on request (`grow`, set under fillScreenHeight): without it the
50
50
  // container sizes to its content and only shrinks (min-h-0), so a two-row
51
51
  // table in a non-fixed-height screen does not stretch.
52
- return (_jsx("div", { "data-testid": testId, className: cn("flex min-h-0 flex-col", grow === true && "flex-1"), children: children }));
52
+ return (_jsx("div", { "data-testid": testId, className: cn("flex min-h-0 flex-col", grow === true && "flex-1", className), children: children }));
53
53
  }
54
54
  const DRAWER_FIELD_CELL_WIDTH_CLASS = {
55
55
  money: "w-full sm:w-[200px] [&_label]:whitespace-nowrap",
@@ -193,5 +193,5 @@ export function DefaultHeading({ variant = "page", children, testId }) {
193
193
  if (variant === "group") {
194
194
  return (_jsx("h2", { "data-testid": testId, className: "text-base font-semibold text-foreground", children: children }));
195
195
  }
196
- return (_jsx("h1", { "data-testid": testId, className: "text-2xl font-semibold tracking-tight", children: children }));
196
+ return (_jsx("h1", { "data-testid": testId, className: "text-xl font-semibold tracking-tight sm:text-2xl", children: children }));
197
197
  }
@@ -2,7 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Children, createContext, useContext } from "react";
3
3
  import { Icon } from "../icons.js";
4
4
  import { cn } from "../lib/cn.js";
5
- import { STAT_CARD_GRID_CLASSES, StatCard } from "../widgets/stat.js";
5
+ import { StatCard } from "../widgets/stat.js";
6
+ import { useIsBelowSmViewport } from "./use-narrow-viewport.js";
7
+ // Two tiles per row on phones, then the dashboard stat-group fill.
8
+ const METRIC_TILE_GRID_CLASSES = "grid grid-cols-2 gap-2 sm:gap-3 md:grid-cols-[repeat(auto-fit,minmax(min(12rem,100%),1fr))]";
6
9
  const InsideMetricBandContext = createContext(false);
7
10
  // The screen-form column already insets and spaces its children; a band in its
8
11
  // header region must not add its own padding on top. DefaultCard resets this
@@ -12,18 +15,29 @@ export const InsideScreenFormColumnContext = createContext(false);
12
15
  export function DefaultMetricBand({ lead, subtitle, children, testId, tiles, }) {
13
16
  const insideScreenFormColumn = useContext(InsideScreenFormColumnContext);
14
17
  const hasMetrics = Children.toArray(children).length > 0;
15
- return (_jsxs("div", { className: cn("flex shrink-0 flex-col gap-3", !insideScreenFormColumn && "px-6 pb-4 pt-3.5"), "data-testid": testId, children: [lead !== undefined && _jsx("div", { "data-kumiko-layout": "metric-band-lead", children: lead }), subtitle !== undefined && (_jsx("div", { className: "flex flex-wrap items-center gap-x-2 text-[13px] text-foreground-secondary [&_a]:text-primary", children: subtitle })), hasMetrics &&
16
- (tiles === true ? (_jsx("div", { className: STAT_CARD_GRID_CLASSES, children: children })) : (_jsx(InsideMetricBandContext.Provider, { value: true, children: _jsx("dl", { className: "m-0 grid grid-cols-2 gap-6 md:grid-cols-3 lg:grid-cols-5", children: children }) })))] }));
18
+ return (_jsxs("div", { className: cn("flex shrink-0 flex-col gap-3", !insideScreenFormColumn && "px-6 pb-4 pt-3.5 max-sm:px-4"), "data-testid": testId, children: [lead !== undefined && _jsx("div", { "data-kumiko-layout": "metric-band-lead", children: lead }), subtitle !== undefined && (_jsx("div", { className: "flex flex-wrap items-center gap-x-2 text-[13px] text-foreground-secondary [&_a]:text-primary", children: subtitle })), hasMetrics &&
19
+ (tiles === true ? (_jsx("div", { className: METRIC_TILE_GRID_CLASSES, children: children })) : (_jsx(InsideMetricBandContext.Provider, { value: true, children: _jsx("dl", { className: "m-0 grid grid-cols-2 gap-6 md:grid-cols-3 lg:grid-cols-5", children: children }) })))] }));
17
20
  }
18
- function MetricTile({ label, value, testId, onPress, tone, icon }) {
19
- const card = (_jsx(StatCard, { label: label, value: value, ...(icon !== undefined && { icon: _jsx(Icon, { name: icon, className: "size-4" }) }), ...(tone !== undefined && { tone }), ...(testId !== undefined && { testId }) }));
21
+ // Below sm the narrow sub line replaces the regular one (board phone metrics are shorter).
22
+ function useMetricSub({ sub, narrowSub }) {
23
+ const narrow = useIsBelowSmViewport();
24
+ return narrow && narrowSub !== undefined ? narrowSub : sub;
25
+ }
26
+ function MetricTile(props) {
27
+ const { label, value, testId, onPress, tone, icon } = props;
28
+ const sub = useMetricSub(props);
29
+ const narrow = useIsBelowSmViewport();
30
+ // The phone's short sub line ("of 2,850") stands beside the value like the board; the full one sits below.
31
+ const subBeside = narrow && props.narrowSub !== undefined;
32
+ const card = (_jsx(StatCard, { label: label, value: value, boardPadding: true, ...(sub !== undefined && { sub, subBelow: !subBeside }), ...(onPress !== undefined && { navigable: true }), ...(icon !== undefined && { icon: _jsx(Icon, { name: icon, className: "size-4" }) }), ...(tone !== undefined && { tone }), ...(testId !== undefined && { testId }) }));
20
33
  return onPress !== undefined ? (_jsx("button", { type: "button", className: "text-left", onClick: onPress, children: card })) : (card);
21
34
  }
22
35
  export function DefaultMetric(props) {
23
36
  const insideBand = useContext(InsideMetricBandContext);
37
+ const sub = useMetricSub(props);
24
38
  if (props.tile === true)
25
39
  return _jsx(MetricTile, { ...props });
26
40
  const { label, value, testId, onPress } = props;
27
- const item = (_jsxs("div", { "data-testid": testId, className: cn("flex min-w-0 flex-col gap-0.5", onPress !== undefined && "cursor-pointer"), ...(onPress !== undefined && { onClick: onPress }), children: [_jsx("dt", { className: "text-xs text-muted-foreground", "data-testid": testId !== undefined ? `${testId}-label` : undefined, children: label }), _jsx("dd", { className: "m-0 text-base font-medium tabular-nums text-foreground", "data-testid": testId !== undefined ? `${testId}-value` : undefined, children: onPress !== undefined ? (_jsx("button", { type: "button", className: "text-left hover:underline", children: value })) : (value) })] }));
41
+ const item = (_jsxs("div", { "data-testid": testId, className: cn("flex min-w-0 flex-col gap-0.5", onPress !== undefined && "cursor-pointer"), ...(onPress !== undefined && { onClick: onPress }), children: [_jsx("dt", { className: "text-xs text-muted-foreground", "data-testid": testId !== undefined ? `${testId}-label` : undefined, children: label }), _jsxs("dd", { className: "m-0 text-base font-medium tabular-nums text-foreground", "data-testid": testId !== undefined ? `${testId}-value` : undefined, children: [onPress !== undefined ? (_jsx("button", { type: "button", className: "text-left hover:underline", children: value })) : (value), sub !== undefined && (_jsx("span", { className: "block text-xs font-normal text-muted-foreground", "data-testid": testId !== undefined ? `${testId}-sub` : undefined, children: sub }))] })] }));
28
42
  return insideBand ? item : _jsx("dl", { className: "m-0", children: item });
29
43
  }
@@ -1,3 +1,3 @@
1
1
  import { type ReactNode } from "react";
2
2
  import type { PageHeaderProps } from "../../index.ts";
3
- export declare function DefaultPageHeader({ title, recordTitle, status, actions, overflowItems, hideBreadcrumb, breadcrumbScreenId, }: PageHeaderProps): ReactNode;
3
+ export declare function DefaultPageHeader({ title, recordTitle, status, actions, bodyTitle, overflowItems, hideBreadcrumb, breadcrumbScreenId, }: PageHeaderProps): ReactNode;
@@ -1,14 +1,15 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect } from "react";
2
+ import { useEffect, useLayoutEffect } from "react";
3
3
  import { createPortal } from "react-dom";
4
4
  import { usePageHeaderSlot } from "../layout/page-header-slot.js";
5
5
  import { UNIFORM_BAR_CONTROLS_CLASSES } from "../layout/uniform-bar-controls.js";
6
6
  import { cn } from "../lib/cn.js";
7
- export function DefaultPageHeader({ title, recordTitle, status, actions, overflowItems, hideBreadcrumb, breadcrumbScreenId, }) {
7
+ export function DefaultPageHeader({ title, recordTitle, status, actions, bodyTitle, overflowItems, hideBreadcrumb, breadcrumbScreenId, }) {
8
8
  const slot = usePageHeaderSlot();
9
9
  const setOverflowItems = slot?.setOverflowItems;
10
10
  const setTitle = slot?.setTitle;
11
11
  const setRecordTitle = slot?.setRecordTitle;
12
+ const setBodyTitle = slot?.setBodyTitle;
12
13
  const setBreadcrumbHidden = slot?.setBreadcrumbHidden;
13
14
  const setBreadcrumbScreenId = slot?.setBreadcrumbScreenId;
14
15
  useEffect(() => {
@@ -23,6 +24,13 @@ export function DefaultPageHeader({ title, recordTitle, status, actions, overflo
23
24
  setBreadcrumbScreenId(breadcrumbScreenId);
24
25
  return () => setBreadcrumbScreenId(undefined);
25
26
  }, [setBreadcrumbScreenId, breadcrumbScreenId]);
27
+ // Layout effect: a passive one lets the shell paint its own h1 next to the body's for a frame.
28
+ useLayoutEffect(() => {
29
+ if (setBodyTitle === undefined || bodyTitle !== true)
30
+ return;
31
+ setBodyTitle(true);
32
+ return () => setBodyTitle(false);
33
+ }, [setBodyTitle, bodyTitle]);
26
34
  useEffect(() => {
27
35
  if (setRecordTitle === undefined || recordTitle === undefined)
28
36
  return;
@@ -9,14 +9,15 @@ export declare function InfiniteSentinel({ onReachEnd, loadingMore, hasMore, row
9
9
  readonly rowsCount: number;
10
10
  readonly testId?: string;
11
11
  }): ReactNode;
12
- export declare function Pager({ page, limit, total, onPageChange, pageSizeOptions, onPageSizeChange, itemNoun, testId, pinned, }: {
12
+ export declare function Pager({ page, limit, total, onPageChange, pageSizeOptions, onPageSizeChange, testId, pinned, plain, }: {
13
13
  readonly page: number;
14
14
  readonly limit: number;
15
15
  readonly total: number;
16
16
  readonly onPageChange: (next: number) => void;
17
17
  readonly pageSizeOptions?: readonly number[];
18
18
  readonly onPageSizeChange?: (next: number) => void;
19
- readonly itemNoun?: (count: number) => string;
20
19
  readonly testId?: string;
21
20
  readonly pinned?: boolean;
21
+ /** Phone cards: no bar, border or background; the footer sits on the page like the card list. */
22
+ readonly plain?: boolean;
22
23
  }): ReactNode;
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ChevronDown, ChevronLeft, ChevronRight, Loader2 } from "lucide-react";
2
+ import { ChevronLeft, ChevronRight, Loader2 } from "lucide-react";
3
3
  import { useEffect, useRef } from "react";
4
- import { useTranslation } from "../../index.js";
4
+ import { useOptionalLocale, useTranslation } from "../../index.js";
5
5
  import { cn } from "../lib/cn.js";
6
6
  import "../react-css-custom-properties.js";
7
- export const TABLE_FOOTER_BAR_CLASS = cn("flex h-15 shrink-0 items-center gap-4 border-t border-border bg-card pl-4 pr-2", "text-[13px] tabular-nums text-foreground-secondary md:h-11 md:px-6");
7
+ export const TABLE_FOOTER_BAR_CLASS = cn("flex h-15 shrink-0 items-center gap-4 border-t border-border-row bg-card pl-4 pr-2", "text-[12.5px] tabular-nums text-muted-foreground md:h-11 md:px-6");
8
8
  // InfiniteSentinel — empty div at the end of the table that uses
9
9
  // IntersectionObserver to detect when the user scrolls near the list end.
10
10
  // onReachEnd fires exactly once per "becomes visible" transition; the
@@ -52,38 +52,45 @@ export function InfiniteSentinel({ onReachEnd, loadingMore, hasMore, rowsCount,
52
52
  const showEndLabel = !hasMore && rowsCount >= END_LABEL_MIN_ROWS;
53
53
  return (_jsx("div", { ref: ref, "data-testid": testId, className: cn("flex items-center justify-center text-sm text-muted-foreground", showEndLabel || loadingMore ? "py-4" : ""), children: showEndLabel ? (_jsx("span", { "data-testid": testId !== undefined ? `${testId}-end` : undefined, children: t("kumiko.list.end-of-list") })) : loadingMore ? (_jsx(Loader2, { className: "size-4 animate-spin", "aria-hidden": "true" })) : hasMore ? (_jsx("span", { "aria-hidden": "true", children: "\u00A0" })) : null }));
54
54
  }
55
- // Pager — status text on the left ("X – Y of Z"), "Page X of Y" and the
56
- // prev/next arrows on the right. No numbered page list: the board shows none.
55
+ // Pager — left "X – Y of Z · N per page" (the page size is a select in text
56
+ // style), right "‹ 1 2 3 ›" from sm; below sm only the arrows.
57
57
  // `pinned` renders the footer bar of a scrollBody table (fixed height, top
58
58
  // border); unpinned it sits as a plain row below the table.
59
59
  //
60
60
  // Status text and aria-labels go through t(...), which requires a
61
61
  // LocaleProvider in the tree — same requirement as InfiniteSentinel above,
62
62
  // already established for DataTable consumers.
63
- export function Pager({ page, limit, total, onPageChange, pageSizeOptions, onPageSizeChange, itemNoun, testId, pinned, }) {
63
+ export function Pager({ page, limit, total, onPageChange, pageSizeOptions, onPageSizeChange, testId, pinned, plain, }) {
64
64
  const t = useTranslation();
65
+ const locale = useOptionalLocale();
65
66
  const totalPages = Math.max(1, Math.ceil(total / limit));
66
67
  const safePage = Math.max(1, Math.min(page, totalPages));
67
68
  const from = (safePage - 1) * limit + 1;
68
69
  const to = Math.min(safePage * limit, total);
69
- return (_jsxs("div", { "data-testid": testId, className: pinned === true
70
- ? TABLE_FOOTER_BAR_CLASS
71
- : "mt-3 flex items-center gap-4 text-[13px] tabular-nums text-foreground-secondary", children: [_jsx("div", { "data-testid": testId !== undefined ? `${testId}-status` : undefined, className: "flex-1", children: itemNoun !== undefined
72
- ? t("kumiko.pager.status.noun", {
73
- from: from.toLocaleString(),
74
- to: to.toLocaleString(),
75
- total: total.toLocaleString(),
76
- noun: itemNoun(total),
77
- })
78
- : t("kumiko.pager.status", {
79
- from: from.toLocaleString(),
80
- to: to.toLocaleString(),
81
- total: total.toLocaleString(),
82
- }) }), pageSizeOptions !== undefined && onPageSizeChange !== undefined && (_jsxs("div", { className: "relative hidden md:block", children: [_jsx("select", { "aria-label": t("kumiko.pager.pageSizeLabel"), "data-testid": testId !== undefined ? `${testId}-page-size` : undefined, value: limit, onChange: (e) => onPageSizeChange(Number(e.target.value)), className: "h-7 appearance-none rounded-md border border-input bg-card pl-2 pr-7 text-[13px] text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", children: pageSizeOptions.map((size) => (_jsx("option", { value: size, children: t("kumiko.pager.pageSize", { size: size.toLocaleString() }) }, size))) }), _jsx(ChevronDown, { className: "pointer-events-none absolute right-2 top-1/2 size-4 -translate-y-1/2 opacity-50", "aria-hidden": "true" })] })), _jsx("div", { className: "hidden md:block", children: t("kumiko.pager.pageOf", {
83
- page: safePage.toLocaleString(),
84
- pages: totalPages.toLocaleString(),
85
- }) }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(PagerButton, { ariaLabel: t("kumiko.pager.previousPage"), disabled: safePage <= 1, onClick: () => onPageChange(safePage - 1), testId: testId !== undefined ? `${testId}-prev` : undefined, children: _jsx(ChevronLeft, { className: "size-3.5", "aria-hidden": "true" }) }), _jsx(PagerButton, { ariaLabel: t("kumiko.pager.nextPage"), disabled: safePage >= totalPages, onClick: () => onPageChange(safePage + 1), testId: testId !== undefined ? `${testId}-next` : undefined, children: _jsx(ChevronRight, { className: "size-3.5", "aria-hidden": "true" }) })] })] }));
70
+ return (_jsxs("div", { "data-testid": testId, className: plain === true
71
+ ? "flex items-center justify-between px-4 pb-3 pt-1 text-[12.5px] tabular-nums text-muted-foreground"
72
+ : pinned === true
73
+ ? TABLE_FOOTER_BAR_CLASS
74
+ : "mt-3 flex items-center gap-4 text-[12.5px] tabular-nums text-muted-foreground", children: [_jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-1", children: [_jsx("div", { "data-testid": testId !== undefined ? `${testId}-status` : undefined, children: t("kumiko.pager.status", {
75
+ from: from.toLocaleString(locale),
76
+ to: to.toLocaleString(locale),
77
+ total: total.toLocaleString(locale),
78
+ }) }), pageSizeOptions !== undefined && onPageSizeChange !== undefined && (_jsxs("div", { className: "hidden items-center sm:flex", children: [_jsx("span", { "aria-hidden": "true", children: "\u00B7" }), _jsx("select", { "aria-label": t("kumiko.pager.pageSizeLabel"), "data-testid": testId !== undefined ? `${testId}-page-size` : undefined, value: limit, onChange: (e) => onPageSizeChange(Number(e.target.value)), className: "h-7 cursor-pointer appearance-none rounded-md border-0 bg-transparent px-1.5 text-[12.5px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", children: pageSizeOptions.map((size) => (_jsx("option", { value: size, children: t("kumiko.pager.pageSize", { size: size.toLocaleString(locale) }) }, size))) })] }))] }), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(PagerButton, { ariaLabel: t("kumiko.pager.previousPage"), disabled: safePage <= 1, onClick: () => onPageChange(safePage - 1), testId: testId !== undefined ? `${testId}-prev` : undefined, children: _jsx(ChevronLeft, { className: "size-3.5", "aria-hidden": "true" }) }), _jsx("div", { className: "hidden items-center gap-1 sm:flex", children: pageNumbersAround(safePage, totalPages).map((entry) => typeof entry !== "number" ? (_jsx("span", { "aria-hidden": "true", className: "px-1", children: "\u2026" }, `gap-${entry.gapBefore}`)) : (_jsx(PageNumberButton, { page: entry, current: entry === safePage, label: t("kumiko.pager.goToPage", { page: entry.toLocaleString() }), onClick: () => onPageChange(entry), testId: testId !== undefined ? `${testId}-page-${entry}` : undefined }, entry))) }), _jsx(PagerButton, { ariaLabel: t("kumiko.pager.nextPage"), disabled: safePage >= totalPages, onClick: () => onPageChange(safePage + 1), testId: testId !== undefined ? `${testId}-next` : undefined, children: _jsx(ChevronRight, { className: "size-3.5", "aria-hidden": "true" }) })] })] }));
79
+ }
80
+ // All pages up to 7, else first, last and the neighbours of the current page, gaps in between.
81
+ function pageNumbersAround(current, totalPages) {
82
+ if (totalPages <= 7)
83
+ return Array.from({ length: totalPages }, (_, i) => i + 1);
84
+ const wanted = new Set([1, current - 1, current, current + 1, totalPages]);
85
+ const pages = [...wanted].filter((page) => page >= 1 && page <= totalPages).sort((a, b) => a - b);
86
+ return pages.flatMap((page, index) => {
87
+ const previous = pages[index - 1];
88
+ return previous !== undefined && page - previous > 1 ? [{ gapBefore: page }, page] : [page];
89
+ });
90
+ }
91
+ function PageNumberButton({ page, current, label, onClick, testId, }) {
92
+ return (_jsx("button", { type: "button", onClick: onClick, "aria-label": label, "aria-current": current ? "page" : undefined, "data-testid": testId, className: cn("inline-flex h-6 min-w-6 items-center justify-center rounded px-1.5", "hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", current && "bg-primary text-primary-foreground hover:bg-primary"), children: page.toLocaleString() }));
86
93
  }
87
94
  function PagerButton({ children, onClick, ariaLabel, disabled, testId, }) {
88
- return (_jsx("button", { type: "button", onClick: onClick, disabled: disabled, "aria-label": ariaLabel, "data-testid": testId, className: cn("inline-flex size-11 items-center justify-center rounded-md border border-border md:size-7", "hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", "disabled:pointer-events-none disabled:text-foreground-disabled"), children: children }));
95
+ return (_jsx("button", { type: "button", onClick: onClick, disabled: disabled, "aria-label": ariaLabel, "data-testid": testId, className: cn("inline-flex size-11 items-center justify-center rounded sm:size-6", "hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", "disabled:pointer-events-none disabled:text-foreground-disabled"), children: children }));
89
96
  }
@@ -0,0 +1,20 @@
1
+ import type { ReactNode } from "react";
2
+ /** The opened "why" of a hint or step: a dark note box with a small arrow at the top left, so it reads as a note on top of the row tint. */
3
+ export declare function ReasonBox({ children, title, testId, id, ...dataAttributes }: {
4
+ readonly children: ReactNode;
5
+ /** Bold lead-in of the paragraph. */
6
+ readonly title?: string;
7
+ readonly testId?: string;
8
+ /** Target of the info button's `aria-controls`. */
9
+ readonly id?: string;
10
+ readonly "data-hint-reason"?: "true";
11
+ }): ReactNode;
12
+ /** Info icon that opens a ReasonBox; sits next to a title and never opens a clickable row around it. */
13
+ export declare function ReasonInfoButton({ label, open, onToggle, controls, ...dataAttributes }: {
14
+ readonly label: string;
15
+ readonly open: boolean;
16
+ readonly onToggle: () => void;
17
+ /** Id of the box this button opens; only referenced while open. */
18
+ readonly controls?: string;
19
+ readonly "data-hint-reason-toggle"?: "true";
20
+ }): ReactNode;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Info } from "lucide-react";
3
+ /** The opened "why" of a hint or step: a dark note box with a small arrow at the top left, so it reads as a note on top of the row tint. */
4
+ export function ReasonBox({ children, title, testId, id, ...dataAttributes }) {
5
+ return (_jsxs("span", { "data-testid": testId, id: id, ...dataAttributes, className: "relative mt-1 block rounded-md bg-sidebar px-3 py-2.5 text-[12.5px] leading-[1.45] text-sidebar-foreground whitespace-pre-line before:absolute before:-top-[5px] before:left-[18px] before:border-[5px] before:border-t-0 before:border-transparent before:border-b-sidebar before:content-['']", children: [title !== undefined && _jsxs("b", { className: "font-semibold", children: [title, " "] }), children] }));
6
+ }
7
+ /** Info icon that opens a ReasonBox; sits next to a title and never opens a clickable row around it. */
8
+ export function ReasonInfoButton({ label, open, onToggle, controls, ...dataAttributes }) {
9
+ return (_jsx("button", { type: "button", "aria-expanded": open, "aria-controls": open ? controls : undefined, "aria-label": label, title: label, ...dataAttributes, className: "shrink-0 text-muted-foreground hover:text-foreground", onClick: (event) => {
10
+ event.stopPropagation();
11
+ onToggle();
12
+ }, children: _jsx(Info, { className: "size-4", "aria-hidden": "true" }) }));
13
+ }
@@ -0,0 +1,3 @@
1
+ import { type ReactNode } from "react";
2
+ import type { RecordBreadcrumbProps } from "../../index.ts";
3
+ export declare function DefaultRecordBreadcrumb({ items, ariaLabel, testId, }: RecordBreadcrumbProps): ReactNode;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Fragment, useContext } from "react";
3
+ import { uniqueLabelKeys } from "../../app/unique-label-keys.js";
4
+ import { cn } from "../lib/cn.js";
5
+ import { DefaultLink } from "./layout-elements.js";
6
+ import { InsideScreenFormColumnContext } from "./metric.js";
7
+ export function DefaultRecordBreadcrumb({ items, ariaLabel, testId, }) {
8
+ const insideScreenFormColumn = useContext(InsideScreenFormColumnContext);
9
+ const keys = uniqueLabelKeys(items.map((item) => item.label));
10
+ return (_jsx("nav", { "aria-label": ariaLabel, "data-testid": testId, className: cn("flex shrink-0 flex-wrap items-center gap-2 text-[13px] text-muted-foreground", !insideScreenFormColumn && "px-6 pt-3.5 max-sm:px-4"), children: items.map((item, index) => (_jsxs(Fragment, { children: [index > 0 && _jsx("span", { "aria-hidden": "true", children: "\u203A" }), item.link !== undefined ? (_jsx(DefaultLink, { href: item.link.href, onPress: item.link.onPress, className: "text-foreground-secondary", children: item.label })) : (_jsx("span", { className: "font-medium text-foreground", children: item.label }))] }, keys[index]))) }));
11
+ }
@@ -0,0 +1,3 @@
1
+ import { type ReactNode } from "react";
2
+ import type { RecordStepsProps } from "../../index.ts";
3
+ export declare function DefaultRecordSteps({ title, subtitle, emptyLabel, reasonLabel, narrowLimit, moreLabel, lessLabel, items, count, testId, }: RecordStepsProps): ReactNode;
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useContext, useId, useState } from "react";
3
+ import { cn } from "../lib/cn.js";
4
+ import { InsideScreenFormColumnContext } from "./metric.js";
5
+ import { ReasonBox, ReasonInfoButton } from "./reason-box.js";
6
+ import { useIsBelowSmViewport } from "./use-narrow-viewport.js";
7
+ const STEP_STRIPE_CLASS = {
8
+ bad: "bg-status-bad",
9
+ warn: "bg-status-warn",
10
+ critical: "bg-status-critical",
11
+ ok: "bg-status-ok",
12
+ accent: "bg-primary",
13
+ neutral: "bg-border-strong",
14
+ };
15
+ function StepTitle({ item }) {
16
+ const narrow = useIsBelowSmViewport();
17
+ return narrow ? (item.narrowTitle ?? item.title) : item.title;
18
+ }
19
+ function StepDetail({ item }) {
20
+ const narrow = useIsBelowSmViewport();
21
+ const detail = narrow ? (item.narrowDetail ?? item.detail) : item.detail;
22
+ if (detail === undefined)
23
+ return null;
24
+ return _jsx("small", { className: "block text-xs text-muted-foreground", children: detail });
25
+ }
26
+ function StepRow({ item, reasonLabel }) {
27
+ const [reasonOpen, setReasonOpen] = useState(item.reasonOpen === true);
28
+ const reasonBoxId = useId();
29
+ const narrow = useIsBelowSmViewport();
30
+ return (_jsxs("li", { "data-testid": `record-step-${item.id}`, "data-tone": item.tone, className: "relative grid grid-cols-[minmax(0,1fr)_auto] gap-x-3 gap-y-1 py-3 pl-5 pr-4 max-sm:py-[9px] max-sm:pl-3.5 max-sm:pr-0", children: [_jsx("span", { "aria-hidden": "true", className: cn("absolute inset-y-2.5 left-0 w-1 rounded-[2px] max-sm:inset-y-[9px]", STEP_STRIPE_CLASS[item.tone ?? "neutral"]) }), _jsxs("div", { className: "col-start-1 row-start-1 flex min-w-0 items-start gap-2", children: [_jsx("span", { className: "font-medium text-foreground max-sm:text-[13.5px]", "data-slot": "step-what", children: _jsx(StepTitle, { item: item }) }), item.reason !== undefined && (_jsx("span", { className: "flex max-sm:hidden", children: _jsx(ReasonInfoButton, { label: reasonLabel, open: reasonOpen, controls: reasonBoxId, onToggle: () => setReasonOpen((open) => !open) }) }))] }), _jsxs("div", { className: "col-start-2 row-start-1 flex shrink-0 items-center gap-3 max-sm:row-span-2 max-sm:self-center max-sm:[&_button]:h-8 max-sm:[&_button]:text-[13px]", children: [item.moreActions !== undefined && !narrow && (_jsx("div", { className: "text-[12.5px] text-muted-foreground [&_a]:text-[12.5px] [&_a]:text-muted-foreground [&_button]:text-[12.5px] [&_button]:text-muted-foreground", children: item.moreActions })), item.actions] }), _jsx("div", { className: "col-start-1 row-start-2 min-w-0 sm:col-span-2", children: _jsx(StepDetail, { item: item }) }), item.moreActions !== undefined && narrow && (_jsx("div", { "data-testid": `record-step-${item.id}-more-actions`, className: "col-span-2 row-start-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground [&_a]:text-xs [&_a]:text-muted-foreground [&_button]:text-xs [&_button]:text-muted-foreground", children: item.moreActions })), item.reason !== undefined && reasonOpen && (_jsx("div", { className: "col-span-2 row-start-3 max-sm:hidden", children: _jsx(ReasonBox, { id: reasonBoxId, testId: `record-step-${item.id}-reason`, ...(item.reasonTitle !== undefined && { title: item.reasonTitle }), children: item.reason }) }))] }));
31
+ }
32
+ function StepsHeader({ title, subtitle, count, testId, }) {
33
+ return (_jsxs("header", { className: "flex flex-wrap items-baseline gap-x-3 gap-y-1 px-4 py-3 max-sm:px-0 max-sm:pt-1", children: [_jsx("h3", { className: "m-0 text-sm font-semibold text-foreground", children: title }), subtitle !== undefined && (_jsx("span", { className: "text-[13px] text-muted-foreground max-sm:hidden", children: subtitle })), count !== undefined && (_jsx("span", { "data-testid": `${testId ?? "record-steps"}-count`, className: "ml-auto text-xs text-muted-foreground sm:hidden", children: count }))] }));
34
+ }
35
+ function StepsMoreToggle({ testId, expanded, label, onToggle, }) {
36
+ return (_jsxs("button", { type: "button", "data-testid": `${testId ?? "record-steps"}-toggle`, "aria-expanded": expanded, className: "relative w-full border-t px-4 py-3 text-left text-sm font-medium text-primary hover:underline max-sm:border-border-row max-sm:py-[9px] max-sm:pl-3.5 max-sm:pr-0 max-sm:text-xs max-sm:font-normal", onClick: onToggle, children: [_jsx("span", { "aria-hidden": "true", className: "absolute inset-y-[9px] left-0 w-1 rounded-[2px] bg-border-strong sm:hidden" }), label] }));
37
+ }
38
+ export function DefaultRecordSteps({ title, subtitle, emptyLabel, reasonLabel, narrowLimit, moreLabel, lessLabel, items, count, testId, }) {
39
+ const insideScreenFormColumn = useContext(InsideScreenFormColumnContext);
40
+ const narrow = useIsBelowSmViewport();
41
+ const [expanded, setExpanded] = useState(false);
42
+ const limited = narrow && narrowLimit !== undefined && items.length > narrowLimit;
43
+ const visible = limited && !expanded ? items.slice(0, narrowLimit) : items;
44
+ const toggleLabel = moreLabel === undefined || lessLabel === undefined
45
+ ? undefined
46
+ : expanded
47
+ ? lessLabel
48
+ : moreLabel(items.length - visible.length);
49
+ return (_jsx("section", { "data-testid": testId, className: cn("shrink-0", !insideScreenFormColumn && "px-6 py-2 max-sm:px-4"), children: _jsxs("div", { className: "sm:rounded-md sm:border sm:bg-card", children: [_jsx(StepsHeader, { title: title, subtitle: subtitle, count: count, testId: testId }), items.length === 0 ? (_jsx("p", { className: "m-0 px-4 py-3 text-sm text-muted-foreground", children: emptyLabel })) : (_jsx("ul", { className: "m-0 flex list-none flex-col divide-y divide-border-row p-0", children: visible.map((item) => (_jsx(StepRow, { item: item, reasonLabel: reasonLabel }, item.id))) })), limited && toggleLabel !== undefined && (_jsx(StepsMoreToggle, { testId: testId, expanded: expanded, label: toggleLabel, onToggle: () => setExpanded((open) => !open) }))] }) }));
50
+ }
@@ -0,0 +1,3 @@
1
+ import { type ReactNode } from "react";
2
+ import type { RecordSummaryProps } from "../../index.ts";
3
+ export declare function DefaultRecordSummary({ text, narrowText, tone, testId, }: RecordSummaryProps): ReactNode;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext } from "react";
3
+ import { cn } from "../lib/cn.js";
4
+ import { InsideScreenFormColumnContext } from "./metric.js";
5
+ import { useIsBelowSmViewport } from "./use-narrow-viewport.js";
6
+ const SUMMARY_BORDER_CLASS = {
7
+ bad: "border-status-bad",
8
+ warn: "border-status-warn",
9
+ critical: "border-status-critical",
10
+ ok: "border-status-ok",
11
+ accent: "border-primary",
12
+ neutral: "border-border-strong",
13
+ };
14
+ export function DefaultRecordSummary({ text, narrowText, tone, testId, }) {
15
+ const insideScreenFormColumn = useContext(InsideScreenFormColumnContext);
16
+ const narrow = useIsBelowSmViewport();
17
+ return (_jsx("div", { className: cn("shrink-0", !insideScreenFormColumn && "px-6 py-2 max-sm:px-4"), children: _jsx("p", { "data-testid": testId, "data-tone": tone, className: cn("m-0 rounded-lg border border-l-[3px] bg-card px-3.5 py-2.5 sm:px-[18px] sm:py-3.5 font-heading text-[15px] leading-[1.5] sm:text-[17px] sm:leading-relaxed text-foreground", tone === undefined ? "border-l-primary" : SUMMARY_BORDER_CLASS[tone]), children: narrow && narrowText !== undefined ? narrowText : text }) }));
18
+ }
@@ -3,11 +3,13 @@ import type { ListRowViewModel } from "../../headless/index.ts";
3
3
  import type { DataTableRowAction, DataTableRowActionMode } from "../../index.ts";
4
4
  import { type ActionOverflowMenuProps } from "../../index.ts";
5
5
  import "../react-css-custom-properties.ts";
6
- export declare function RowActionsCell({ row, actions, mode, rowIsLink, compact, }: {
6
+ export declare function RowActionsCell({ row, actions, mode, rowIsLink, compact, small, }: {
7
7
  readonly row: ListRowViewModel;
8
8
  readonly actions: readonly DataTableRowAction[];
9
9
  readonly mode?: DataTableRowActionMode;
10
10
  readonly rowIsLink?: boolean;
11
11
  readonly compact?: boolean;
12
+ /** Small bordered buttons without the phone touch height; for buttons sitting inside a card. */
13
+ readonly small?: boolean;
12
14
  }): ReactNode;
13
15
  export declare function ActionOverflowMenu({ items, label, testId }: ActionOverflowMenuProps): ReactNode;
@@ -1,6 +1,7 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Loader2, MoreHorizontal } from "lucide-react";
3
3
  import { useState } from "react";
4
+ import { COMPACT_TAP_CLASSES } from "../../compact-tap-classes.js";
4
5
  import { needsActionConfirm, shouldRenderActionsIconOnly, useTranslation, WriteFailedError, } from "../../index.js";
5
6
  import { Icon } from "../icons.js";
6
7
  import { cn } from "../lib/cn.js";
@@ -24,14 +25,18 @@ function primaryRowAction(actions) {
24
25
  // >2 (no kebab). `w-full justify-start` pins the first button to the
25
26
  // column's left edge so it sits at the same position across rows
26
27
  // (otherwise it would drift with differently-sized labels).
28
+ // - "menu": every action in the kebab, whatever its `display`.
27
29
  // The isVisible filter runs here; an action hidden for a given row never
28
30
  // reaches render. If every action is hidden, the cell stays empty (no
29
31
  // phantom column).
30
- export function RowActionsCell({ row, actions, mode = "adaptive", rowIsLink = false, compact = false, }) {
32
+ export function RowActionsCell({ row, actions, mode = "adaptive", rowIsLink = false, compact = false, small = false, }) {
31
33
  const visible = actions.filter((a) => a.isVisible === undefined || a.isVisible(row));
32
34
  if (visible.length === 0)
33
35
  return null;
34
36
  const hasExplicitDisplay = visible.some((a) => a.display !== undefined);
37
+ if (mode === "menu") {
38
+ return (_jsx("div", { className: "inline-flex items-center justify-end", children: _jsx(RowActionsKebab, { row: row, actions: visible }) }));
39
+ }
35
40
  if (mode === "inline") {
36
41
  // Teil C: >2 actions all carrying an icon collapse to icon-only —
37
42
  // otherwise "inline" is exactly the wall-to-wall text-button problem
@@ -42,7 +47,7 @@ export function RowActionsCell({ row, actions, mode = "adaptive", rowIsLink = fa
42
47
  if (hasExplicitDisplay) {
43
48
  const inline = visible.filter((a) => a.display !== undefined);
44
49
  const rest = visible.filter((a) => a.display === undefined);
45
- return (_jsxs("div", { className: "inline-flex flex-nowrap items-center gap-1 justify-end whitespace-nowrap", children: [inline.map((a) => (_jsx(RowActionButton, { row: row, action: a, compact: compact }, a.id))), rest.length > 0 && _jsx(RowActionsKebab, { row: row, actions: rest })] }));
50
+ return (_jsxs("div", { className: "inline-flex flex-nowrap items-center gap-1 justify-end whitespace-nowrap", children: [inline.map((a) => (_jsx(RowActionButton, { row: row, action: a, compact: compact, small: small }, a.id))), rest.length > 0 && _jsx(RowActionsKebab, { row: row, actions: rest })] }));
46
51
  }
47
52
  if (rowIsLink) {
48
53
  return (_jsx("div", { className: "inline-flex items-center justify-end", children: _jsx(RowActionsKebab, { row: row, actions: visible }) }));
@@ -93,11 +98,13 @@ function effectiveRowActionDisplay(display, hasIcon, compact) {
93
98
  return "link";
94
99
  return display;
95
100
  }
96
- function RowActionButton({ row, action, iconOnly = false, asLink = false, compact = false, }) {
101
+ function RowActionButton({ row, action, iconOnly = false, asLink = false, compact = false, small = false, }) {
97
102
  const { busy, triggerNow } = useRowActionTrigger(row);
98
103
  const [confirmOpen, setConfirmOpen] = useState(false);
99
104
  const resolvedIcon = actionIconFor(action.icon);
100
- const display = effectiveRowActionDisplay(action.display, resolvedIcon !== undefined, compact);
105
+ const resolvedDisplay = effectiveRowActionDisplay(action.display, resolvedIcon !== undefined, compact);
106
+ // A card's small row action is always an outlined button, also when the author asked for a link.
107
+ const display = small && resolvedDisplay === "link" ? "button" : resolvedDisplay;
101
108
  const isBorderedButton = display === "button";
102
109
  const showIconOnly = display === "icon" || (display === undefined && iconOnly && resolvedIcon !== undefined);
103
110
  const linkLike = display === "link" || (display === undefined && asLink);
@@ -123,7 +130,9 @@ function RowActionButton({ row, action, iconOnly = false, asLink = false, compac
123
130
  void triggerNow(action);
124
131
  }
125
132
  }, className: cn("inline-flex items-center justify-center gap-1.5 text-sm", isBorderedButton
126
- ? "h-8 rounded-md px-3 font-medium max-md:h-11"
133
+ ? small
134
+ ? cn("rounded-md font-medium", COMPACT_TAP_CLASSES)
135
+ : "h-8 rounded-md px-3 font-medium max-md:h-11"
127
136
  : linkLike
128
137
  ? "h-7 rounded-md px-2.5 max-md:h-11"
129
138
  : "h-8 rounded-sm max-md:h-11", showIconOnly ? "w-8 max-md:w-11" : !linkLike && !isBorderedButton && "px-2", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", "disabled:opacity-50 disabled:pointer-events-none", variantClass), children: busy ? (_jsx(Loader2, { className: "size-3.5 animate-spin", "aria-hidden": "true" })) : resolvedIcon === undefined || (linkLike && !showIconOnly) ? (action.label) : showIconOnly ? (_jsx(Icon, { name: resolvedIcon, className: "size-4" })) : (_jsxs(_Fragment, { children: [_jsx(Icon, { name: resolvedIcon, className: "size-4" }), action.label] })) }), _jsx(DefaultDialog, { open: confirmOpen, onOpenChange: setConfirmOpen, title: action.label, ...(action.confirm !== undefined && { description: action.confirm }), confirmLabel: action.confirmLabel ?? action.label, ...(action.style === "danger" && { variant: "danger" }), onConfirm: () => triggerNow(action), testId: `row-${row.id}-action-${action.id}-dialog` })] }));