cursedbelt 5.40.0 → 5.45.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 (499) hide show
  1. package/dist/react/Toast.d.ts +12 -2
  2. package/dist/react/Toast.d.ts.map +1 -1
  3. package/dist/react/Toast.js +32 -3
  4. package/dist/react/Toast.js.map +1 -1
  5. package/dist/react/analytics/MetricDrilldown.js +1 -1
  6. package/dist/react/charts/AreaChart.d.ts.map +1 -1
  7. package/dist/react/charts/AreaChart.js +5 -5
  8. package/dist/react/charts/AreaChart.js.map +1 -1
  9. package/dist/react/charts/BarChart.d.ts.map +1 -1
  10. package/dist/react/charts/BarChart.js +3 -3
  11. package/dist/react/charts/BarChart.js.map +1 -1
  12. package/dist/react/charts/ChartCard.d.ts +53 -0
  13. package/dist/react/charts/ChartCard.d.ts.map +1 -0
  14. package/dist/react/charts/ChartCard.js +46 -0
  15. package/dist/react/charts/ChartCard.js.map +1 -0
  16. package/dist/react/charts/ChartFrame.d.ts +12 -5
  17. package/dist/react/charts/ChartFrame.d.ts.map +1 -1
  18. package/dist/react/charts/ChartFrame.js +12 -5
  19. package/dist/react/charts/ChartFrame.js.map +1 -1
  20. package/dist/react/charts/ChartLegend.js +1 -1
  21. package/dist/react/charts/ChartLegend.js.map +1 -1
  22. package/dist/react/charts/HeatmapChart.js +3 -3
  23. package/dist/react/charts/HeatmapChart.js.map +1 -1
  24. package/dist/react/charts/IntervalTimeline.js +1 -1
  25. package/dist/react/charts/IntervalTimeline.js.map +1 -1
  26. package/dist/react/charts/LineChart.d.ts.map +1 -1
  27. package/dist/react/charts/LineChart.js +3 -3
  28. package/dist/react/charts/LineChart.js.map +1 -1
  29. package/dist/react/charts/TimeSeriesChart.d.ts.map +1 -1
  30. package/dist/react/charts/TimeSeriesChart.js +6 -6
  31. package/dist/react/charts/TimeSeriesChart.js.map +1 -1
  32. package/dist/react/charts/chartBox.d.ts +46 -0
  33. package/dist/react/charts/chartBox.d.ts.map +1 -0
  34. package/dist/react/charts/chartBox.js +45 -0
  35. package/dist/react/charts/chartBox.js.map +1 -0
  36. package/dist/react/charts/index.d.ts +2 -0
  37. package/dist/react/charts/index.d.ts.map +1 -1
  38. package/dist/react/charts/index.js +2 -0
  39. package/dist/react/charts/index.js.map +1 -1
  40. package/dist/react/charts/shared.d.ts +13 -2
  41. package/dist/react/charts/shared.d.ts.map +1 -1
  42. package/dist/react/charts/shared.js +14 -3
  43. package/dist/react/charts/shared.js.map +1 -1
  44. package/dist/react/chat/Bubble.js +4 -4
  45. package/dist/react/chat/Bubble.js.map +1 -1
  46. package/dist/react/chat/MessageScroller.js +1 -1
  47. package/dist/react/chat/MessageScroller.js.map +1 -1
  48. package/dist/react/components/ActionBar.d.ts.map +1 -1
  49. package/dist/react/components/ActionBar.js +63 -1
  50. package/dist/react/components/ActionBar.js.map +1 -1
  51. package/dist/react/components/AddItemsMenu.js +1 -1
  52. package/dist/react/components/AddItemsMenu.js.map +1 -1
  53. package/dist/react/components/Alert.d.ts +16 -2
  54. package/dist/react/components/Alert.d.ts.map +1 -1
  55. package/dist/react/components/Alert.js +35 -2
  56. package/dist/react/components/Alert.js.map +1 -1
  57. package/dist/react/components/AppShell.d.ts +55 -33
  58. package/dist/react/components/AppShell.d.ts.map +1 -1
  59. package/dist/react/components/AppShell.js +121 -31
  60. package/dist/react/components/AppShell.js.map +1 -1
  61. package/dist/react/components/AsyncPanel.d.ts +21 -3
  62. package/dist/react/components/AsyncPanel.d.ts.map +1 -1
  63. package/dist/react/components/AsyncPanel.js +49 -5
  64. package/dist/react/components/AsyncPanel.js.map +1 -1
  65. package/dist/react/components/BannerLane.d.ts +32 -0
  66. package/dist/react/components/BannerLane.d.ts.map +1 -0
  67. package/dist/react/components/BannerLane.js +41 -0
  68. package/dist/react/components/BannerLane.js.map +1 -0
  69. package/dist/react/components/Button.d.ts.map +1 -1
  70. package/dist/react/components/Button.js +2 -1
  71. package/dist/react/components/Button.js.map +1 -1
  72. package/dist/react/components/ChipFilterStrip.js +1 -1
  73. package/dist/react/components/ChipFilterStrip.js.map +1 -1
  74. package/dist/react/components/ComboboxField.d.ts.map +1 -1
  75. package/dist/react/components/ComboboxField.js +14 -4
  76. package/dist/react/components/ComboboxField.js.map +1 -1
  77. package/dist/react/components/CommentThread.js +2 -2
  78. package/dist/react/components/CommentThread.js.map +1 -1
  79. package/dist/react/components/ConfirmDialog.js +1 -1
  80. package/dist/react/components/ConfirmDialog.js.map +1 -1
  81. package/dist/react/components/DataTable/DataTable.d.ts +18 -2
  82. package/dist/react/components/DataTable/DataTable.d.ts.map +1 -1
  83. package/dist/react/components/DataTable/DataTable.js +51 -12
  84. package/dist/react/components/DataTable/DataTable.js.map +1 -1
  85. package/dist/react/components/DataTable/Pagination.js +1 -1
  86. package/dist/react/components/DataTable/Pagination.js.map +1 -1
  87. package/dist/react/components/DataTable/RowActions.d.ts +7 -1
  88. package/dist/react/components/DataTable/RowActions.d.ts.map +1 -1
  89. package/dist/react/components/DataTable/RowActions.js +10 -3
  90. package/dist/react/components/DataTable/RowActions.js.map +1 -1
  91. package/dist/react/components/DataTable/TableFilterBuilder.js +1 -1
  92. package/dist/react/components/DataTable/TableFilterBuilder.js.map +1 -1
  93. package/dist/react/components/DataTable/cells/CodeCell.js +1 -1
  94. package/dist/react/components/DataTable/cells/CodeCell.js.map +1 -1
  95. package/dist/react/components/DataTable/cells/LinkCell.js +1 -1
  96. package/dist/react/components/DataTable/cells/LinkCell.js.map +1 -1
  97. package/dist/react/components/DataTable/index.d.ts +1 -1
  98. package/dist/react/components/DataTable/index.d.ts.map +1 -1
  99. package/dist/react/components/DataTable/index.js.map +1 -1
  100. package/dist/react/components/DataTable/types.d.ts +20 -0
  101. package/dist/react/components/DataTable/types.d.ts.map +1 -1
  102. package/dist/react/components/DataTable/types.js +22 -0
  103. package/dist/react/components/DataTable/types.js.map +1 -1
  104. package/dist/react/components/DateTimeField.d.ts.map +1 -1
  105. package/dist/react/components/DateTimeField.js +4 -1
  106. package/dist/react/components/DateTimeField.js.map +1 -1
  107. package/dist/react/components/DeleteButton.js +2 -0
  108. package/dist/react/components/DeleteButton.js.map +1 -1
  109. package/dist/react/components/Drawer.js +3 -3
  110. package/dist/react/components/Drawer.js.map +1 -1
  111. package/dist/react/components/DropdownMenu.d.ts +16 -0
  112. package/dist/react/components/DropdownMenu.d.ts.map +1 -1
  113. package/dist/react/components/DropdownMenu.js +22 -6
  114. package/dist/react/components/DropdownMenu.js.map +1 -1
  115. package/dist/react/components/EmptyState.d.ts +10 -2
  116. package/dist/react/components/EmptyState.d.ts.map +1 -1
  117. package/dist/react/components/EmptyState.js +10 -5
  118. package/dist/react/components/EmptyState.js.map +1 -1
  119. package/dist/react/components/EventTimeline.js +1 -1
  120. package/dist/react/components/EventTimeline.js.map +1 -1
  121. package/dist/react/components/FileDropZone.js +1 -1
  122. package/dist/react/components/FileDropZone.js.map +1 -1
  123. package/dist/react/components/Grid.d.ts +9 -1
  124. package/dist/react/components/Grid.d.ts.map +1 -1
  125. package/dist/react/components/Grid.js +20 -2
  126. package/dist/react/components/Grid.js.map +1 -1
  127. package/dist/react/components/Guide.d.ts +31 -0
  128. package/dist/react/components/Guide.d.ts.map +1 -0
  129. package/dist/react/components/Guide.js +18 -0
  130. package/dist/react/components/Guide.js.map +1 -0
  131. package/dist/react/components/InfoHintImpl.d.ts +0 -13
  132. package/dist/react/components/InfoHintImpl.d.ts.map +1 -1
  133. package/dist/react/components/InfoHintImpl.js +17 -1
  134. package/dist/react/components/InfoHintImpl.js.map +1 -1
  135. package/dist/react/components/InlineEditableText.js +1 -1
  136. package/dist/react/components/InlineEditableText.js.map +1 -1
  137. package/dist/react/components/IsolatedFrame.js +1 -1
  138. package/dist/react/components/IsolatedFrame.js.map +1 -1
  139. package/dist/react/components/ListToolbar.d.ts.map +1 -1
  140. package/dist/react/components/ListToolbar.js +2 -2
  141. package/dist/react/components/ListToolbar.js.map +1 -1
  142. package/dist/react/components/LogViewer.d.ts +26 -2
  143. package/dist/react/components/LogViewer.d.ts.map +1 -1
  144. package/dist/react/components/LogViewer.js +41 -26
  145. package/dist/react/components/LogViewer.js.map +1 -1
  146. package/dist/react/components/Modal.d.ts +5 -1
  147. package/dist/react/components/Modal.d.ts.map +1 -1
  148. package/dist/react/components/Modal.js +18 -8
  149. package/dist/react/components/Modal.js.map +1 -1
  150. package/dist/react/components/Page.d.ts +51 -7
  151. package/dist/react/components/Page.d.ts.map +1 -1
  152. package/dist/react/components/Page.js +53 -8
  153. package/dist/react/components/Page.js.map +1 -1
  154. package/dist/react/components/PageGuideButton.d.ts +11 -0
  155. package/dist/react/components/PageGuideButton.d.ts.map +1 -0
  156. package/dist/react/components/PageGuideButton.js +13 -0
  157. package/dist/react/components/PageGuideButton.js.map +1 -0
  158. package/dist/react/components/PanelSeparator.js +1 -1
  159. package/dist/react/components/PanelSeparator.js.map +1 -1
  160. package/dist/react/components/Popover.d.ts.map +1 -1
  161. package/dist/react/components/Popover.js +2 -1
  162. package/dist/react/components/Popover.js.map +1 -1
  163. package/dist/react/components/PromptDialog.js +1 -1
  164. package/dist/react/components/PromptDialog.js.map +1 -1
  165. package/dist/react/components/ScrollArea.d.ts +9 -1
  166. package/dist/react/components/ScrollArea.d.ts.map +1 -1
  167. package/dist/react/components/ScrollArea.js +9 -3
  168. package/dist/react/components/ScrollArea.js.map +1 -1
  169. package/dist/react/components/Section.d.ts +5 -2
  170. package/dist/react/components/Section.d.ts.map +1 -1
  171. package/dist/react/components/Section.js +5 -2
  172. package/dist/react/components/Section.js.map +1 -1
  173. package/dist/react/components/Skeleton.d.ts +19 -1
  174. package/dist/react/components/Skeleton.d.ts.map +1 -1
  175. package/dist/react/components/Skeleton.js +24 -2
  176. package/dist/react/components/Skeleton.js.map +1 -1
  177. package/dist/react/components/StatStrip.js +1 -1
  178. package/dist/react/components/StatStrip.js.map +1 -1
  179. package/dist/react/components/StatTile.d.ts +30 -3
  180. package/dist/react/components/StatTile.d.ts.map +1 -1
  181. package/dist/react/components/StatTile.js +35 -9
  182. package/dist/react/components/StatTile.js.map +1 -1
  183. package/dist/react/components/StatTileGrid.d.ts +10 -1
  184. package/dist/react/components/StatTileGrid.d.ts.map +1 -1
  185. package/dist/react/components/StatTileGrid.js +50 -33
  186. package/dist/react/components/StatTileGrid.js.map +1 -1
  187. package/dist/react/components/StatusPill.d.ts.map +1 -1
  188. package/dist/react/components/StatusPill.js +26 -1
  189. package/dist/react/components/StatusPill.js.map +1 -1
  190. package/dist/react/components/Surface.d.ts +1 -1
  191. package/dist/react/components/Surface.d.ts.map +1 -1
  192. package/dist/react/components/Surface.js +20 -11
  193. package/dist/react/components/Surface.js.map +1 -1
  194. package/dist/react/components/SwatchPicker.d.ts.map +1 -1
  195. package/dist/react/components/SwatchPicker.js +5 -1
  196. package/dist/react/components/SwatchPicker.js.map +1 -1
  197. package/dist/react/components/Switch.js +1 -1
  198. package/dist/react/components/Switch.js.map +1 -1
  199. package/dist/react/components/WidgetHeader.js +1 -1
  200. package/dist/react/components/WidgetHeader.js.map +1 -1
  201. package/dist/react/components/calendar/CalendarLegend.js +1 -1
  202. package/dist/react/components/calendar/CalendarLegend.js.map +1 -1
  203. package/dist/react/components/calendar/DayAgenda.js +1 -1
  204. package/dist/react/components/calendar/DayAgenda.js.map +1 -1
  205. package/dist/react/components/calendar/EventChip.js +1 -1
  206. package/dist/react/components/calendar/EventChip.js.map +1 -1
  207. package/dist/react/components/calendar/MonthGrid.js +1 -1
  208. package/dist/react/components/calendar/MonthGrid.js.map +1 -1
  209. package/dist/react/components/calendar/WeekView.js +2 -2
  210. package/dist/react/components/calendar/WeekView.js.map +1 -1
  211. package/dist/react/components/cardFrame.d.ts +16 -0
  212. package/dist/react/components/cardFrame.d.ts.map +1 -0
  213. package/dist/react/components/cardFrame.js +24 -0
  214. package/dist/react/components/cardFrame.js.map +1 -0
  215. package/dist/react/components/dialog.d.ts.map +1 -1
  216. package/dist/react/components/dialog.js +2 -1
  217. package/dist/react/components/dialog.js.map +1 -1
  218. package/dist/react/dashboard-grid/WidgetFrame.js +2 -2
  219. package/dist/react/dashboard-grid/WidgetFrame.js.map +1 -1
  220. package/dist/react/emoji/EmojiPicker.js +1 -1
  221. package/dist/react/emoji/EmojiPicker.js.map +1 -1
  222. package/dist/react/file-tree/FileTree.d.ts +8 -1
  223. package/dist/react/file-tree/FileTree.d.ts.map +1 -1
  224. package/dist/react/file-tree/FileTree.js +29 -4
  225. package/dist/react/file-tree/FileTree.js.map +1 -1
  226. package/dist/react/filter-rail/FilterRail.js +1 -1
  227. package/dist/react/filter-rail/FilterRail.js.map +1 -1
  228. package/dist/react/icons.js +1 -1
  229. package/dist/react/icons.js.map +1 -1
  230. package/dist/react/index.d.ts +8 -5
  231. package/dist/react/index.d.ts.map +1 -1
  232. package/dist/react/index.js +5 -2
  233. package/dist/react/index.js.map +1 -1
  234. package/dist/react/lib/menuSections.d.ts +8 -0
  235. package/dist/react/lib/menuSections.d.ts.map +1 -0
  236. package/dist/react/lib/menuSections.js +37 -0
  237. package/dist/react/lib/menuSections.js.map +1 -0
  238. package/dist/react/markdown/Markdown.js +2 -2
  239. package/dist/react/markdown/Markdown.js.map +1 -1
  240. package/dist/react/media/HoverScrubVideoThumb.js +1 -1
  241. package/dist/react/media/HoverScrubVideoThumb.js.map +1 -1
  242. package/dist/react/media/MaskPainter.js +1 -1
  243. package/dist/react/media/MediaUploadControl.js +1 -1
  244. package/dist/react/media/MediaUploadControl.js.map +1 -1
  245. package/dist/react/media/VideoTrimmer.js +1 -1
  246. package/dist/react/media/VideoTrimmer.js.map +1 -1
  247. package/dist/react/media/denseGallery.css +5 -1
  248. package/dist/react/namespace/NamespaceTargetCapsule.js +1 -1
  249. package/dist/react/namespace/NamespaceTargetCapsule.js.map +1 -1
  250. package/dist/react/nav/BreadcrumbTrail.js +1 -1
  251. package/dist/react/nav/BreadcrumbTrail.js.map +1 -1
  252. package/dist/react/nav/CommandBar.d.ts +7 -1
  253. package/dist/react/nav/CommandBar.d.ts.map +1 -1
  254. package/dist/react/nav/CommandBar.js +5 -3
  255. package/dist/react/nav/CommandBar.js.map +1 -1
  256. package/dist/react/nav/PlaceBar.d.ts.map +1 -1
  257. package/dist/react/nav/PlaceBar.js +7 -9
  258. package/dist/react/nav/PlaceBar.js.map +1 -1
  259. package/dist/react/nav/SideNav.d.ts +12 -2
  260. package/dist/react/nav/SideNav.d.ts.map +1 -1
  261. package/dist/react/nav/SideNav.js +42 -22
  262. package/dist/react/nav/SideNav.js.map +1 -1
  263. package/dist/react/nav/TopBar.d.ts +65 -31
  264. package/dist/react/nav/TopBar.d.ts.map +1 -1
  265. package/dist/react/nav/TopBar.js +59 -24
  266. package/dist/react/nav/TopBar.js.map +1 -1
  267. package/dist/react/nav/index.d.ts +1 -1
  268. package/dist/react/nav/index.d.ts.map +1 -1
  269. package/dist/react/nav/index.js +1 -1
  270. package/dist/react/nav/index.js.map +1 -1
  271. package/dist/react/nav/navShared.d.ts +10 -1
  272. package/dist/react/nav/navShared.d.ts.map +1 -1
  273. package/dist/react/nav/navShared.js +23 -0
  274. package/dist/react/nav/navShared.js.map +1 -1
  275. package/dist/react/notifications/NotificationFeed.js +2 -2
  276. package/dist/react/notifications/NotificationFeed.js.map +1 -1
  277. package/dist/react/palette/Command.d.ts.map +1 -1
  278. package/dist/react/palette/Command.js +1 -1
  279. package/dist/react/palette/Command.js.map +1 -1
  280. package/dist/react/palette/CommandPalette.d.ts +13 -1
  281. package/dist/react/palette/CommandPalette.d.ts.map +1 -1
  282. package/dist/react/palette/CommandPalette.js +44 -8
  283. package/dist/react/palette/CommandPalette.js.map +1 -1
  284. package/dist/react/palette/commandSources.d.ts +57 -0
  285. package/dist/react/palette/commandSources.d.ts.map +1 -0
  286. package/dist/react/palette/commandSources.js +129 -0
  287. package/dist/react/palette/commandSources.js.map +1 -0
  288. package/dist/react/palette/index.d.ts +1 -0
  289. package/dist/react/palette/index.d.ts.map +1 -1
  290. package/dist/react/palette/index.js +1 -0
  291. package/dist/react/palette/index.js.map +1 -1
  292. package/dist/react/rich-text/RichTextEditor.js +1 -1
  293. package/dist/react/rich-text/RichTextEditor.js.map +1 -1
  294. package/dist/react/rich-text/RichTextToolbar.js +1 -1
  295. package/dist/react/rich-text/RichTextToolbar.js.map +1 -1
  296. package/dist/scripts/guardrailsEnforce.d.ts.map +1 -1
  297. package/dist/styles-areas/analytics.css +16 -16
  298. package/dist/styles-areas/auth.css +3 -3
  299. package/dist/styles-areas/calendar.css +6 -6
  300. package/dist/styles-areas/chart-table.css +1 -1
  301. package/dist/styles-areas/charts.css +3 -3
  302. package/dist/styles-areas/chat.css +7 -6
  303. package/dist/styles-areas/companion-link.css +2 -2
  304. package/dist/styles-areas/core.css +98 -89
  305. package/dist/styles-areas/dashboard-grid.css +4 -4
  306. package/dist/styles-areas/data-table.css +16 -16
  307. package/dist/styles-areas/disk-usage.css +5 -5
  308. package/dist/styles-areas/emoji.css +2 -2
  309. package/dist/styles-areas/fields.css +13 -14
  310. package/dist/styles-areas/filter-rail.css +4 -4
  311. package/dist/styles-areas/folder-tree.css +3 -3
  312. package/dist/styles-areas/markdown.css +2 -1
  313. package/dist/styles-areas/master-detail.css +3 -3
  314. package/dist/styles-areas/media-gallery.css +8 -8
  315. package/dist/styles-areas/media.css +12 -13
  316. package/dist/styles-areas/nav.css +28 -14
  317. package/dist/styles-areas/notifications.css +4 -4
  318. package/dist/styles-areas/overlays.css +4 -4
  319. package/dist/styles-areas/palette.css +4 -3
  320. package/dist/styles-areas/rich-text.css +3 -3
  321. package/dist/styles-areas/sharing.css +4 -3
  322. package/dist/styles-areas/stats.css +9 -8
  323. package/dist/styles-areas/test-report.css +3 -3
  324. package/dist/styles-areas/wizard.css +6 -5
  325. package/dist/styles-areas/workbench.css +10 -9
  326. package/dist/styles-areas/workbook-viewer.css +2 -2
  327. package/dist/styles-utilities.css +272 -187
  328. package/dist/testing/designAudit.d.ts.map +1 -1
  329. package/dist/testing/designAudit.js +4 -0
  330. package/dist/testing/designAudit.js.map +1 -1
  331. package/dist/testing/designBaseline.d.ts.map +1 -1
  332. package/dist/testing/designBaseline.js +4 -0
  333. package/dist/testing/designBaseline.js.map +1 -1
  334. package/dist/theme.css +103 -2
  335. package/package.json +3 -2
  336. package/scripts/guardrails-baseline.json +2 -1
  337. package/scripts/guardrailsEnforce.spec.ts +64 -0
  338. package/scripts/guardrailsEnforce.ts +65 -8
  339. package/scripts/styleAreas.ts +1 -0
  340. package/src/nodeTypesDeclared.spec.ts +47 -0
  341. package/src/react/Toast.spec.tsx +43 -0
  342. package/src/react/Toast.tsx +45 -2
  343. package/src/react/analytics/MetricDrilldown.tsx +1 -1
  344. package/src/react/charts/AreaChart.tsx +9 -8
  345. package/src/react/charts/BarChart.tsx +11 -10
  346. package/src/react/charts/ChartCard.tsx +146 -0
  347. package/src/react/charts/ChartFrame.tsx +28 -10
  348. package/src/react/charts/ChartLegend.tsx +1 -1
  349. package/src/react/charts/HeatmapChart.tsx +5 -5
  350. package/src/react/charts/IntervalTimeline.tsx +2 -2
  351. package/src/react/charts/LineChart.tsx +9 -8
  352. package/src/react/charts/TimeSeriesChart.tsx +11 -10
  353. package/src/react/charts/chartBox.spec.ts +40 -0
  354. package/src/react/charts/chartBox.ts +75 -0
  355. package/src/react/charts/index.ts +2 -0
  356. package/src/react/charts/shared.ts +16 -3
  357. package/src/react/chat/Bubble.tsx +5 -5
  358. package/src/react/chat/MessageScroller.tsx +1 -1
  359. package/src/react/components/ActionBar.spec.tsx +90 -0
  360. package/src/react/components/ActionBar.tsx +82 -2
  361. package/src/react/components/AddItemsMenu.tsx +1 -1
  362. package/src/react/components/Alert.spec.tsx +32 -2
  363. package/src/react/components/Alert.tsx +47 -3
  364. package/src/react/components/AppShell.spec.tsx +199 -13
  365. package/src/react/components/AppShell.tsx +235 -92
  366. package/src/react/components/AsyncPanel.spec.tsx +7 -1
  367. package/src/react/components/AsyncPanel.tsx +85 -5
  368. package/src/react/components/BannerLane.tsx +128 -0
  369. package/src/react/components/Button.tsx +2 -0
  370. package/src/react/components/ChipFilterStrip.tsx +1 -1
  371. package/src/react/components/ComboboxField.tsx +20 -3
  372. package/src/react/components/CommentThread.tsx +2 -2
  373. package/src/react/components/ConfirmDialog.tsx +1 -1
  374. package/src/react/components/DataTable/DataTable.tsx +80 -8
  375. package/src/react/components/DataTable/Pagination.tsx +1 -1
  376. package/src/react/components/DataTable/RowActions.tsx +55 -2
  377. package/src/react/components/DataTable/TableFilterBuilder.tsx +1 -1
  378. package/src/react/components/DataTable/cells/CodeCell.tsx +1 -1
  379. package/src/react/components/DataTable/cells/LinkCell.tsx +1 -1
  380. package/src/react/components/DataTable/index.ts +1 -0
  381. package/src/react/components/DataTable/numericColumn.spec.ts +19 -0
  382. package/src/react/components/DataTable/types.ts +36 -0
  383. package/src/react/components/DateTimeField.tsx +3 -1
  384. package/src/react/components/DeleteButton.tsx +3 -0
  385. package/src/react/components/Drawer.tsx +3 -3
  386. package/src/react/components/DropdownMenu.spec.tsx +55 -0
  387. package/src/react/components/DropdownMenu.tsx +73 -20
  388. package/src/react/components/EmptyState.tsx +26 -7
  389. package/src/react/components/EventTimeline.tsx +1 -1
  390. package/src/react/components/Field.width.spec.tsx +11 -0
  391. package/src/react/components/FileDropZone.tsx +1 -1
  392. package/src/react/components/Grid.spec.tsx +44 -0
  393. package/src/react/components/Grid.tsx +41 -11
  394. package/src/react/components/Guide.tsx +77 -0
  395. package/src/react/components/InfoHint.spec.tsx +21 -0
  396. package/src/react/components/InfoHintImpl.tsx +22 -1
  397. package/src/react/components/InlineEditableText.tsx +1 -1
  398. package/src/react/components/IsolatedFrame.tsx +1 -1
  399. package/src/react/components/ListToolbar.spec.tsx +12 -0
  400. package/src/react/components/ListToolbar.tsx +8 -5
  401. package/src/react/components/LogViewer.tsx +118 -18
  402. package/src/react/components/Modal.spec.tsx +17 -2
  403. package/src/react/components/Modal.tsx +25 -10
  404. package/src/react/components/MultiSelectField.spec.tsx +6 -0
  405. package/src/react/components/Page.spec.tsx +89 -5
  406. package/src/react/components/Page.tsx +100 -16
  407. package/src/react/components/PageGuideButton.tsx +42 -0
  408. package/src/react/components/PanelSeparator.tsx +1 -1
  409. package/src/react/components/Popover.tsx +3 -1
  410. package/src/react/components/PromptDialog.tsx +1 -1
  411. package/src/react/components/ScrollArea.spec.tsx +20 -0
  412. package/src/react/components/ScrollArea.tsx +19 -0
  413. package/src/react/components/Section.spec.tsx +82 -1
  414. package/src/react/components/Section.tsx +10 -4
  415. package/src/react/components/Skeleton.tsx +50 -2
  416. package/src/react/components/StatStrip.tsx +1 -1
  417. package/src/react/components/StatTile.tsx +84 -11
  418. package/src/react/components/StatTileGrid.spec.tsx +6 -1
  419. package/src/react/components/StatTileGrid.tsx +25 -0
  420. package/src/react/components/StatusPill.tsx +26 -1
  421. package/src/react/components/Surface.tsx +22 -14
  422. package/src/react/components/SwatchPicker.tsx +4 -0
  423. package/src/react/components/Switch.tsx +1 -1
  424. package/src/react/components/WidgetHeader.tsx +1 -1
  425. package/src/react/components/calendar/CalendarLegend.tsx +1 -1
  426. package/src/react/components/calendar/DayAgenda.tsx +1 -1
  427. package/src/react/components/calendar/EventChip.tsx +1 -1
  428. package/src/react/components/calendar/MonthGrid.tsx +1 -1
  429. package/src/react/components/calendar/WeekView.tsx +2 -2
  430. package/src/react/components/cardFrame.ts +28 -0
  431. package/src/react/components/dataDisplay.spec.tsx +176 -0
  432. package/src/react/components/dialog.tsx +4 -1
  433. package/src/react/dashboard-grid/WidgetFrame.tsx +2 -2
  434. package/src/react/emoji/EmojiPicker.tsx +1 -1
  435. package/src/react/file-tree/FileTree.spec.tsx +49 -0
  436. package/src/react/file-tree/FileTree.tsx +37 -4
  437. package/src/react/filter-rail/FilterRail.tsx +1 -1
  438. package/src/react/icons.tsx +1 -1
  439. package/src/react/index.ts +28 -3
  440. package/src/react/lib/menuSections.ts +33 -0
  441. package/src/react/markdown/Markdown.tsx +2 -2
  442. package/src/react/media/HoverScrubVideoThumb.tsx +2 -2
  443. package/src/react/media/MaskPainter.tsx +1 -1
  444. package/src/react/media/MediaUploadControl.tsx +1 -1
  445. package/src/react/media/VideoTrimmer.tsx +1 -1
  446. package/src/react/media/denseGallery.css +5 -1
  447. package/src/react/namespace/NamespaceTargetCapsule.tsx +1 -1
  448. package/src/react/nav/BreadcrumbTrail.tsx +2 -2
  449. package/src/react/nav/CommandBar.tsx +14 -3
  450. package/src/react/nav/PlaceBar.tsx +18 -8
  451. package/src/react/nav/SideNav.tsx +99 -17
  452. package/src/react/nav/TopBar.spec.tsx +78 -21
  453. package/src/react/nav/TopBar.tsx +270 -98
  454. package/src/react/nav/index.ts +8 -1
  455. package/src/react/nav/nav.spec.tsx +46 -2
  456. package/src/react/nav/navShared.tsx +23 -2
  457. package/src/react/notifications/NotificationFeed.tsx +2 -2
  458. package/src/react/palette/Command.tsx +1 -1
  459. package/src/react/palette/CommandPalette.spec.tsx +31 -0
  460. package/src/react/palette/CommandPalette.tsx +108 -11
  461. package/src/react/palette/commandSources.tsx +186 -0
  462. package/src/react/palette/index.ts +7 -0
  463. package/src/react/rich-text/RichTextEditor.tsx +1 -1
  464. package/src/react/rich-text/RichTextToolbar.tsx +1 -1
  465. package/src/styles-areas/analytics.css +16 -16
  466. package/src/styles-areas/auth.css +3 -3
  467. package/src/styles-areas/calendar.css +6 -6
  468. package/src/styles-areas/chart-table.css +1 -1
  469. package/src/styles-areas/charts.css +3 -3
  470. package/src/styles-areas/chat.css +7 -6
  471. package/src/styles-areas/companion-link.css +2 -2
  472. package/src/styles-areas/core.css +98 -89
  473. package/src/styles-areas/dashboard-grid.css +4 -4
  474. package/src/styles-areas/data-table.css +16 -16
  475. package/src/styles-areas/disk-usage.css +5 -5
  476. package/src/styles-areas/emoji.css +2 -2
  477. package/src/styles-areas/fields.css +13 -14
  478. package/src/styles-areas/filter-rail.css +4 -4
  479. package/src/styles-areas/folder-tree.css +3 -3
  480. package/src/styles-areas/markdown.css +2 -1
  481. package/src/styles-areas/master-detail.css +3 -3
  482. package/src/styles-areas/media-gallery.css +8 -8
  483. package/src/styles-areas/media.css +12 -13
  484. package/src/styles-areas/nav.css +28 -14
  485. package/src/styles-areas/notifications.css +4 -4
  486. package/src/styles-areas/overlays.css +4 -4
  487. package/src/styles-areas/palette.css +4 -3
  488. package/src/styles-areas/rich-text.css +3 -3
  489. package/src/styles-areas/sharing.css +4 -3
  490. package/src/styles-areas/stats.css +9 -8
  491. package/src/styles-areas/test-report.css +3 -3
  492. package/src/styles-areas/wizard.css +6 -5
  493. package/src/styles-areas/workbench.css +10 -9
  494. package/src/styles-areas/workbook-viewer.css +2 -2
  495. package/src/styles-utilities.css +272 -187
  496. package/src/testing/designAudit.ts +3 -0
  497. package/src/testing/designBaseline.ts +4 -0
  498. package/src/theme.css +103 -2
  499. package/src/themeDarkScopeAliases.spec.ts +65 -0
@@ -16,6 +16,7 @@ import { Info } from 'lucide-react';
16
16
  import { useEffect, useState } from 'react';
17
17
  import { useHasHover } from '../hooks/useHasHover.js';
18
18
  import { cn } from '../lib/cn.js';
19
+ import { devWarnOnce } from '../lib/devWarn.js';
19
20
  import { HOVER_HINT_DELAY_MS } from '../lib/hoverIntent.js';
20
21
 
21
22
  import { INFO_HINT_TRIGGER, type InfoHintImplProps } from '../lib/infoHint.js';
@@ -33,6 +34,9 @@ import { INFO_HINT_TRIGGER, type InfoHintImplProps } from '../lib/infoHint.js';
33
34
  *
34
35
  * Loaded by `InfoHint.tsx` with a dynamic `import()` — see that file for why.
35
36
  */
37
+ /** CPY-1's ceiling for a hint, with a little slack over "about 300". */
38
+ const INFO_HINT_MAX_CHARS = 320;
39
+
36
40
  export default function InfoHintImpl({
37
41
  children,
38
42
  title,
@@ -82,6 +86,20 @@ export default function InfoHintImpl({
82
86
  if (initialFocus) (refs.domReference.current as HTMLElement | null)?.focus();
83
87
  }, []);
84
88
 
89
+ // CPY-1: a hint holds a definition or a rule — about 300 characters. Past that it is a
90
+ // procedure, and its home is a page's `guide` or a `GuideRoute`, not a bubble over the canvas.
91
+ // Measured when the panel attaches: `FloatingPortal` mounts its root a tick after `open`.
92
+ const measurePanel = (el: HTMLDivElement | null) => {
93
+ const length = el?.textContent?.length ?? 0;
94
+ if (length > INFO_HINT_MAX_CHARS) {
95
+ devWarnOnce(
96
+ 'InfoHint:too-long',
97
+ `cursedbelt: an <InfoHint> holds ${length} characters; it is for a definition of about ${INFO_HINT_MAX_CHARS} (CPY-2). ` +
98
+ "Move a longer text to PageHeader's `guide` or a GuideRoute.",
99
+ );
100
+ }
101
+ };
102
+
85
103
  return (
86
104
  <>
87
105
  <button
@@ -100,7 +118,10 @@ export default function InfoHintImpl({
100
118
  <FloatingPortal>
101
119
  <div
102
120
  // guardrails-ignore no-hand-rolled-surface: the hint's floating-ui bubble — a tooltip-class overlay with its own z-index and shadow, not a card
103
- ref={refs.setFloating}
121
+ ref={(el) => {
122
+ refs.setFloating(el);
123
+ measurePanel(el);
124
+ }}
104
125
  data-cb-prose=''
105
126
  style={floatingStyles}
106
127
  {...getFloatingProps()}
@@ -186,7 +186,7 @@ export function InlineEditableText({
186
186
  // `DESIGN.md` §5's footprint is the floor and UX_STANDARDS §0 records that it
187
187
  // wins over the band — so the box grows too, and the band stays as the extra.
188
188
  TAP_TARGET_HEIGHT,
189
- 'pointer-coarse:before:absolute pointer-coarse:before:top-[-10px] pointer-coarse:before:bottom-[-10px] pointer-coarse:before:left-[-4px] pointer-coarse:before:right-[-4px] pointer-coarse:before:content-[""]',
189
+ 'pointer-coarse:before:absolute pointer-coarse:before:top-[calc(var(--hit-slop-y)*-1)] pointer-coarse:before:bottom-[calc(var(--hit-slop-y)*-1)] pointer-coarse:before:-left-1 pointer-coarse:before:-right-1 pointer-coarse:before:content-[""]',
190
190
  wrap ? 'whitespace-pre-wrap break-words' : 'block w-full truncate',
191
191
  !value && 'italic text-muted-foreground',
192
192
  className,
@@ -144,7 +144,7 @@ export function IsolatedFrame({
144
144
  // The bezel: a rounded, overflow-hidden device frame at a fixed logical
145
145
  // size, so the framed page sees a true phone viewport (its own media
146
146
  // queries fire) rather than a squeezed desktop column.
147
- className='shrink-0 overflow-hidden rounded-[2.5rem] border-8 border-border-strong bg-border-strong shadow-overlay'
147
+ className='shrink-0 overflow-hidden rounded-[var(--radius-device)] border-8 border-border-strong bg-border-strong shadow-overlay'
148
148
  style={{ width: MOBILE_WIDTH, height: MOBILE_HEIGHT }}
149
149
  >
150
150
  {frame}
@@ -24,6 +24,18 @@ describe('ListToolbar', () => {
24
24
  expect(box.getAttribute('placeholder')).toBe('anything in a draft');
25
25
  });
26
26
 
27
+ test('the box is the shared SearchInput — a magnifier, and "Search" when no placeholder is given', () => {
28
+ // Forge task 2514: with no searchPlaceholder the bare Input was an empty, unmarked rectangle.
29
+ const { container, getByRole } = render(<ListToolbar search='' onSearchChange={() => {}} searchLabel='Search renders' />);
30
+ expect(container.querySelector('.cbsi .cbsi-icon')).not.toBeNull();
31
+ expect(getByRole('searchbox', { name: 'Search renders' }).getAttribute('placeholder')).toBe('Search');
32
+ });
33
+
34
+ test('a * stays a plain character — no wildcard badge', () => {
35
+ const { container } = render(<ListToolbar search='draft*' onSearchChange={() => {}} />);
36
+ expect(container.querySelector('[aria-label="Wildcard search"]')).toBeNull();
37
+ });
38
+
27
39
  test('the accessible name falls back to the placeholder, then to "Search"', () => {
28
40
  const { getByRole } = render(
29
41
  <ListToolbar search='' onSearchChange={() => {}} searchPlaceholder='file name or repo' />,
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { cn } from '../lib/cn.js';
3
3
  import { ChipFilterStrip, type ChipOption } from './ChipFilterStrip.js';
4
- import { Input } from './Input.js';
4
+ import { SearchInput } from './SearchInput.js';
5
5
 
6
6
  export interface ListToolbarProps {
7
7
  /**
@@ -117,11 +117,14 @@ export function ListToolbar({
117
117
  return (
118
118
  <div className={cn('flex flex-wrap items-center gap-x-3 gap-y-2', className)}>
119
119
  {showSearch ? (
120
- <Input
121
- type='search'
120
+ // The one search box (magnifier + themed Input). A bare Input drew an empty, unmarked
121
+ // rectangle whenever a caller passed no placeholder (forge task 2514). `syntax={false}`:
122
+ // a caller filters these words as plain text, so a `*` must not grow a wildcard badge.
123
+ <SearchInput
124
+ syntax={false}
122
125
  value={search}
123
- onChange={(e) => onSearchChange(e.currentTarget.value)}
124
- placeholder={searchPlaceholder}
126
+ onChange={onSearchChange}
127
+ placeholder={searchPlaceholder ?? 'Search'}
125
128
  aria-label={searchLabel ?? searchPlaceholder ?? 'Search'}
126
129
  // Full width on a phone (the chips then wrap beneath it, still tappable);
127
130
  // a fixed, modest column from `sm:` so the chips share the line rather than
@@ -3,7 +3,7 @@ import { cn } from '../lib/cn.js';
3
3
  import { Badge } from './Badge.js';
4
4
  import { Button } from './Button.js';
5
5
  import { Input } from './Input.js';
6
- import { ScrollArea } from './ScrollArea.js';
6
+ import { ScrollArea, type ScrollAreaHeight } from './ScrollArea.js';
7
7
 
8
8
  /**
9
9
  * A log output pane — monospace, virtualization-free, and honest about what it
@@ -54,8 +54,27 @@ export interface LogViewerProps {
54
54
  loading?: boolean;
55
55
  /** Start with newest-at-the-bottom following. Default true. */
56
56
  follow?: boolean;
57
- /** Visible height in rows. Default 24. */
57
+ /** Visible height in rows. Default 24. Ignored when `height` is set. */
58
58
  rows?: number;
59
+ /**
60
+ * Bound the pane to a token height (DAT-13, LAY-8) — `sm` 12rem · `md` 20rem · `lg` 28rem,
61
+ * never more than 60dvh on a phone. A live log is a terminal viewport of a fixed size,
62
+ * not a box that grows with its output and pushes the page down. Prefer this to `rows`.
63
+ */
64
+ height?: ScrollAreaHeight;
65
+ /**
66
+ * The terminal's header strip (DAT-13): the stream's name ("Batch B2026-10-01"), its age
67
+ * ("18m in flight") and a badge (a `StatusPill`). Any of them draws the strip, attached to
68
+ * the top of the pane, so the reader knows WHICH output this is before reading a line.
69
+ */
70
+ stream?: React.ReactNode;
71
+ age?: React.ReactNode;
72
+ badge?: React.ReactNode;
73
+ /**
74
+ * "Open full log →" in the header strip — the way out of a bounded tail into the whole
75
+ * transcript. An `href` renders a link; `onClick` a button.
76
+ */
77
+ openFullLog?: { href?: string; onClick?: () => void; label?: string };
59
78
  /** Hide the filter box for a short, fixed output (`df -h`). */
60
79
  filterable?: boolean;
61
80
  /**
@@ -117,6 +136,11 @@ export function LogViewer({
117
136
  loading = false,
118
137
  follow: followDefault = true,
119
138
  rows = 24,
139
+ height,
140
+ stream,
141
+ age,
142
+ badge,
143
+ openFullLog,
120
144
  filterable = true,
121
145
  onSelectLine,
122
146
  selectedLine = null,
@@ -161,9 +185,36 @@ export function LogViewer({
161
185
  }, [followDefault]);
162
186
 
163
187
  const hidden = lines.length - visible.length;
188
+ const hasStrip = stream != null || age != null || badge != null || openFullLog != null;
189
+ const jumpToLive = useCallback(() => {
190
+ const el = paneRef.current;
191
+ if (el) el.scrollTop = el.scrollHeight;
192
+ setFollowing(true);
193
+ }, []);
194
+
195
+ const followButton = (
196
+ <Button
197
+ variant={following ? 'primary' : 'secondary'}
198
+ size="sm"
199
+ onClick={() => setFollowing((f) => !f)}
200
+ aria-pressed={following}
201
+ tooltip={
202
+ following
203
+ ? 'Following the tail — scroll up to stop'
204
+ : 'Jump to the newest line and follow it'
205
+ }
206
+ >
207
+ Follow
208
+ </Button>
209
+ );
210
+ // With the strip drawn, Follow lives in it beside "Open full log" — the toolbar row above the
211
+ // pane is then only for what the strip does not carry, and is not drawn empty.
212
+ const toolbarRow =
213
+ !hasStrip || title != null || (exitCode !== null && exitCode !== 0) || typeof durationMs === 'number' || filterable;
164
214
 
165
215
  return (
166
216
  <div className={cn('flex flex-col gap-2', className)}>
217
+ {toolbarRow && (
167
218
  <div className="flex flex-wrap items-center gap-2">
168
219
  {title && <span className="cb-meta-label">{title}</span>}
169
220
  {exitCode !== null && exitCode !== 0 && (
@@ -182,20 +233,9 @@ export function LogViewer({
182
233
  className="w-48"
183
234
  />
184
235
  )}
185
- <Button
186
- variant={following ? 'primary' : 'secondary'}
187
- size="sm"
188
- onClick={() => setFollowing((f) => !f)}
189
- aria-pressed={following}
190
- tooltip={
191
- following
192
- ? 'Following the tail — scroll up to stop'
193
- : 'Jump to the newest line and follow it'
194
- }
195
- >
196
- Follow
197
- </Button>
236
+ {!hasStrip && followButton}
198
237
  </div>
238
+ )}
199
239
 
200
240
  {command && (
201
241
  <ScrollArea
@@ -218,11 +258,50 @@ export function LogViewer({
218
258
 
219
259
  {/* The height lives on a wrapper, not on the ScrollArea: ScrollArea owns its
220
260
  own `style` (it computes keyboard/safe-area scroll padding there), and
221
- `min-h-0 flex-1` makes it fill exactly this bounded flex column. */}
222
- <div className="flex min-h-0 flex-col" style={{ maxHeight: `${rows * 1.5}rem` }}>
261
+ `min-h-0 flex-1` makes it fill exactly this bounded flex column. Under `height`
262
+ the ScrollArea takes the region token itself. */}
263
+ <div
264
+ className="relative flex min-h-0 flex-col"
265
+ style={height ? undefined : { maxHeight: `${rows * 1.5}rem` }}
266
+ data-cb-log-following={following ? 'true' : 'false'}
267
+ >
268
+ {hasStrip && (
269
+ <div
270
+ data-cb-log-header=""
271
+ // Wraps as two groups — what the stream is, then its controls — so a phone gets two
272
+ // clean lines instead of a name squeezed to "B…" and a link broken over three.
273
+ className="flex min-h-9 min-w-0 flex-wrap items-center gap-x-2 gap-y-1 rounded-t-md border border-b-0 border-border bg-muted px-3 py-1 text-xs"
274
+ >
275
+ <span className="flex min-w-0 max-w-full items-center gap-2">
276
+ {stream != null && <span className="min-w-0 truncate font-mono font-medium text-foreground">{stream}</span>}
277
+ {age != null && <span className="shrink-0 whitespace-nowrap tabular-nums text-muted-foreground">{age}</span>}
278
+ {badge != null && <span className="shrink-0">{badge}</span>}
279
+ </span>
280
+ <span className="ml-auto flex shrink-0 items-center gap-1 whitespace-nowrap">
281
+ {followButton}
282
+ {openFullLog &&
283
+ (openFullLog.href ? (
284
+ <Button asChild variant="ghost" size="sm" tooltip="Open the whole log" tooltipMobile="off">
285
+ <a href={openFullLog.href}>{openFullLog.label ?? 'Open full log →'}</a>
286
+ </Button>
287
+ ) : (
288
+ <Button
289
+ variant="ghost"
290
+ size="sm"
291
+ tooltip="Open the whole log"
292
+ tooltipMobile="off"
293
+ onClick={openFullLog.onClick}
294
+ >
295
+ {openFullLog.label ?? 'Open full log →'}
296
+ </Button>
297
+ ))}
298
+ </span>
299
+ </div>
300
+ )}
223
301
  <ScrollArea
224
302
  scrollRef={paneRef}
225
303
  onScroll={onScroll}
304
+ height={height}
226
305
  // `both`: a log line is arbitrarily long and must scroll inside its own
227
306
  // box, never widen the page. `space="none"` + no safe-area padding —
228
307
  // the sticky-follow reads "am I at the bottom", and a comfort gap below
@@ -230,7 +309,10 @@ export function LogViewer({
230
309
  axis="both"
231
310
  space="none"
232
311
  safeArea={false}
233
- className="rounded-md border border-border bg-background font-mono text-xs leading-relaxed"
312
+ className={cn(
313
+ 'border border-border bg-background font-mono text-xs leading-relaxed',
314
+ hasStrip ? 'rounded-b-md' : 'rounded-md',
315
+ )}
234
316
  role="log"
235
317
  aria-live="off"
236
318
  aria-busy={loading || undefined}
@@ -284,6 +366,24 @@ export function LogViewer({
284
366
  </ol>
285
367
  )}
286
368
  </ScrollArea>
369
+ {/* DAT-13: following paused because the reader scrolled up — say so, and offer the
370
+ one-tap way back, instead of a Follow toggle they have to find in the toolbar. Only
371
+ for a LIVE log (`follow` on): a finished transcript read from the top has no "live". */}
372
+ {followDefault && !following && visible.length > 0 && (
373
+ <div className="pointer-events-none absolute inset-x-0 bottom-3 flex justify-center">
374
+ <Button
375
+ variant="secondary"
376
+ size="sm"
377
+ className="pointer-events-auto rounded-full shadow-md"
378
+ tooltip="Scroll to the newest line and follow it"
379
+ tooltipMobile="off"
380
+ onClick={jumpToLive}
381
+ data-cb-log-jump=""
382
+ >
383
+ Jump to live ↓
384
+ </Button>
385
+ </div>
386
+ )}
287
387
  </div>
288
388
 
289
389
  <p className="text-xs tabular-nums text-muted-foreground">
@@ -44,7 +44,22 @@ describe('Modal', () => {
44
44
  x
45
45
  </Modal>,
46
46
  );
47
- expect(contentPanel()?.className).toContain('max-w-2xl');
47
+ expect(contentPanel()?.className).toContain('max-w-[var(--modal-w-lg)]');
48
+ cleanup();
49
+ // OVL-1 has three widths; `xl` is `lg` under its old name, so an app passing it still compiles.
50
+ render(
51
+ <Modal open onClose={() => {}} size='xl' title='t'>
52
+ x
53
+ </Modal>,
54
+ );
55
+ expect(contentPanel()?.className).toContain('max-w-[var(--modal-w-lg)]');
56
+ cleanup();
57
+ render(
58
+ <Modal open onClose={() => {}} size='sm' title='t'>
59
+ x
60
+ </Modal>,
61
+ );
62
+ expect(contentPanel()?.className).toContain('max-w-[var(--modal-w-sm)]');
48
63
  cleanup();
49
64
  render(
50
65
  <Modal open onClose={() => {}} size='full' title='t'>
@@ -318,7 +333,7 @@ describe('Drawer', () => {
318
333
  );
319
334
  const panel = contentPanel();
320
335
  expect(panel?.className).toContain('slide-in-from-bottom');
321
- expect(panel?.className).toContain('max-h-[85dvh]');
336
+ expect(panel?.className).toContain('max-h-[var(--sheet-h-lg)]');
322
337
  });
323
338
 
324
339
  test('left side: slides in from the left', () => {
@@ -4,6 +4,7 @@ import { useDiscardGuard } from '../hooks/useDiscardGuard.js';
4
4
  import { useMediaQuery } from '../hooks/useMediaQuery.js';
5
5
  import { useSwipeToDismiss } from '../hooks/useSwipeToDismiss.js';
6
6
  import { cn } from '../lib/cn.js';
7
+ import { devWarnOnce } from '../lib/devWarn.js';
7
8
  import { FooterSlot } from './ActionBar.js';
8
9
  import { Dialog, DialogContent, DialogTitle, focusPanelOnOpen } from './dialog.js';
9
10
  import { IconButton } from './IconButton.js';
@@ -11,21 +12,35 @@ import { ScrollArea } from './ScrollArea.js';
11
12
 
12
13
  export { useDialogOpen } from '../lib/openDialogs.js';
13
14
 
14
- export type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
15
+ /**
16
+ * OVL-1's three widths plus `full`. `xl` is the pre-2465 name for a wide modal, kept so the
17
+ * apps that pass it still compile; it renders `lg` (the old `xl` was 896px, `lg` is 900px).
18
+ */
19
+ export type ModalSize = 'sm' | 'md' | 'lg' | 'full' | /** @deprecated use `lg` */ 'xl';
15
20
 
16
21
  // ONE sizing scale replaces the ad-hoc `max-w-xl`/`max-w-2xl`/`max-h-[80vh]` classNames
17
- // scattered across the apps' modals. `full` is a near-fullscreen sheet with a 1rem margin
18
- // on every side; `cn`'s twMerge dedupes its `max-h` against the base below (last wins).
22
+ // scattered across the apps' modals. OVL-1: three widths, each a theme.css token —
23
+ // `sm` 400px (a confirmation, one field), `md` 600px (an ordinary form), `lg` 900px (heavy
24
+ // entry, a wizard, a form beside its preview). `full` is a near-fullscreen sheet with a 1rem
25
+ // margin on every side; `cn`'s twMerge dedupes its `max-h` against the base below (last wins).
19
26
  // Every size is `sm:`-scoped: under `sm` a modal is a bottom sheet the width of the screen,
20
27
  // whatever size it asked for on a desktop — see `SHEET` below.
21
- const SIZE: Record<ModalSize, string> = {
22
- sm: 'sm:max-w-sm',
23
- md: 'sm:max-w-lg',
24
- lg: 'sm:max-w-2xl',
25
- xl: 'sm:max-w-4xl',
28
+ const SIZE: Record<Exclude<ModalSize, 'xl'>, string> = {
29
+ sm: 'sm:max-w-[var(--modal-w-sm)]',
30
+ md: 'sm:max-w-[var(--modal-w-md)]',
31
+ lg: 'sm:max-w-[var(--modal-w-lg)]',
26
32
  full: 'sm:max-w-[calc(100vw-2rem)] sm:max-h-[calc(100dvh-2rem)] max-sm:h-dvh max-sm:max-h-dvh max-sm:rounded-none',
27
33
  };
28
34
 
35
+ /** The width a size renders — `xl` is `lg` under its old name. */
36
+ function sizeClass(size: ModalSize): string {
37
+ if (size === 'xl') {
38
+ devWarnOnce('Modal:size-xl', "cursedbelt: <Modal size='xl'> is `lg` now (OVL-1 has three widths: sm 400, md 600, lg 900). Pass size='lg'.");
39
+ return SIZE.lg;
40
+ }
41
+ return SIZE[size];
42
+ }
43
+
29
44
  /** Below `sm` (640px), where a centred card becomes a bottom sheet. */
30
45
  const PHONE_QUERY = '(max-width: 639px)';
31
46
 
@@ -39,7 +54,7 @@ const PHONE_QUERY = '(max-width: 639px)';
39
54
  * every native sheet does.
40
55
  */
41
56
  const SHEET =
42
- 'max-sm:inset-x-0 max-sm:bottom-0 max-sm:w-full max-sm:max-w-none max-sm:max-h-[92dvh] max-sm:rounded-t-2xl max-sm:rounded-b-none max-sm:border-x-0 max-sm:border-b-0 max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=closed]:slide-out-to-bottom';
57
+ 'max-sm:inset-x-0 max-sm:bottom-0 max-sm:w-full max-sm:max-w-none max-sm:max-h-[var(--sheet-h-phone)] max-sm:rounded-t-2xl max-sm:rounded-b-none max-sm:border-x-0 max-sm:border-b-0 max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=closed]:slide-out-to-bottom';
43
58
 
44
59
  /** From `sm` up: the centred card, capped to the viewport, zooming in. */
45
60
  const CARD =
@@ -194,7 +209,7 @@ export function Modal({
194
209
  'data-[state=closed]:animate-out data-[state=closed]:fade-out-0',
195
210
  SHEET,
196
211
  CARD,
197
- SIZE[size],
212
+ sizeClass(size),
198
213
  className,
199
214
  )}
200
215
  // Intercept Radix's default close so a dirty form gets the discard prompt; while
@@ -35,6 +35,12 @@ describe('MultiSelectField', () => {
35
35
  expect(container.querySelectorAll('[aria-label^="Remove"]').length).toBe(0);
36
36
  });
37
37
 
38
+ test('drops the placeholder once a chip is chosen', () => {
39
+ // Forge task 2514: "Pick…" beside a chosen chip read as if nothing were selected.
40
+ const { container } = render(<Controlled initial={['a']} />);
41
+ expect((container.querySelector('input') as HTMLInputElement).placeholder).toBe('');
42
+ });
43
+
38
44
  test('renders the selected options as removable chips', () => {
39
45
  const { getByLabelText } = render(<Controlled initial={['a', 'c']} />);
40
46
  expect(getByLabelText('Remove Alpha')).not.toBeNull();
@@ -1,6 +1,7 @@
1
1
  import { afterEach, describe, expect, test } from 'bun:test';
2
- import { cleanup, render } from '@testing-library/react';
3
- import { PageContainer, ReadableColumn } from './Page.js';
2
+ import { cleanup, fireEvent, render } from '@testing-library/react';
3
+ import { GuideRoute, GuideSection } from './Guide.js';
4
+ import { PageContainer, PageHeader, ReadableColumn } from './Page.js';
4
5
 
5
6
  afterEach(cleanup);
6
7
 
@@ -13,10 +14,93 @@ describe('ReadableColumn — DESIGN.md §1, prose is clamped to 750–850px', ()
13
14
  });
14
15
 
15
16
  test('it is NOT the same width as PageContainer, which is the dashboard width', () => {
16
- // The whole reason this component exists: `max-w-5xl` is 1024px — right for a
17
- // table or a board, 25% too wide for a paragraph.
17
+ // The whole reason this component exists: the dashboard width is right for a
18
+ // table or a board, and far too wide for a paragraph.
18
19
  const { container } = render(<PageContainer>text</PageContainer>);
19
- expect(container.firstElementChild?.className).toContain('max-w-5xl');
20
+ expect(container.firstElementChild?.className).toContain('max-w-[var(--page-w-dashboard)]');
20
21
  expect(container.firstElementChild?.className).not.toContain('--reading-width');
21
22
  });
22
23
  });
24
+
25
+ describe('PageContainer width — LAY-1, the page type picks the width (task 2461)', () => {
26
+ const declared = (el: Element | null) => el?.getAttribute('data-cb-page-width');
27
+
28
+ test('dashboard is the default: 1152px, declared for the audit', () => {
29
+ const { container } = render(<PageContainer>x</PageContainer>);
30
+ expect(declared(container.firstElementChild)).toBe('1152');
31
+ });
32
+
33
+ test.each([
34
+ ['form', '640', 'max-w-[var(--page-w-form)]'],
35
+ ['dashboard', '1152', 'max-w-[var(--page-w-dashboard)]'],
36
+ ['wide', '1536', 'max-w-[var(--page-w-wide)]'],
37
+ ['prose', '800', 'max-w-[var(--reading-width)]'],
38
+ ] as const)('%s → %spx through its token', (width, px, cls) => {
39
+ const { container } = render(<PageContainer width={width}>x</PageContainer>);
40
+ expect(declared(container.firstElementChild)).toBe(px);
41
+ expect(container.firstElementChild?.className).toContain(cls);
42
+ });
43
+
44
+ test('the gutters are 16/24/32px', () => {
45
+ const { container } = render(<PageContainer>x</PageContainer>);
46
+ expect(container.firstElementChild?.className).toContain('px-4 py-6 sm:px-6 lg:px-8');
47
+ });
48
+ });
49
+
50
+ describe('PageHeader — NAV-11: one h1, a one-line subtitle', () => {
51
+ test('exactly one h1, and the subtitle is a single truncating line', () => {
52
+ const { container } = render(<PageHeader title='Requests' subtitle='What you asked for.' actions={<span>New</span>} />);
53
+ expect(container.querySelectorAll('h1')).toHaveLength(1);
54
+ const line = container.querySelector('[data-cb-page-subtitle] p');
55
+ expect(line?.className).toContain('truncate');
56
+ // It fits (happy-dom lays nothing out, so nothing is wider than its line): no ⓘ.
57
+ expect(container.querySelector('[data-cb-page-subtitle] button')).toBeNull();
58
+ });
59
+
60
+ test('🔴 a subtitle wider than its line gets an InfoHint carrying the whole text', () => {
61
+ const proto = HTMLElement.prototype;
62
+ const scroll = Object.getOwnPropertyDescriptor(proto, 'scrollWidth');
63
+ const client = Object.getOwnPropertyDescriptor(proto, 'clientWidth');
64
+ Object.defineProperty(proto, 'scrollWidth', { configurable: true, get: () => 900 });
65
+ Object.defineProperty(proto, 'clientWidth', { configurable: true, get: () => 300 });
66
+ try {
67
+ const { container } = render(<PageHeader title='Requests' subtitle='A sentence far too long for one line.' />);
68
+ const hint = container.querySelector('[data-cb-page-subtitle] button');
69
+ expect(hint?.getAttribute('aria-label')).toBe('The full description');
70
+ } finally {
71
+ if (scroll) Object.defineProperty(proto, 'scrollWidth', scroll);
72
+ else delete (proto as { scrollWidth?: number }).scrollWidth;
73
+ if (client) Object.defineProperty(proto, 'clientWidth', client);
74
+ else delete (proto as { clientWidth?: number }).clientWidth;
75
+ }
76
+ });
77
+ });
78
+
79
+ describe('PageHeader — a guide one tap away, not paragraphs on the canvas (CPY-2)', () => {
80
+ test('`guide` renders a Guide button before the actions that opens the text as prose', async () => {
81
+ const { getByRole, getByText, findByText } = render(
82
+ <PageHeader title='Limits' guide={<p>Each window opens on the first run after a gap.</p>} actions={<span>New</span>} />,
83
+ );
84
+ const button = getByRole('button', { name: /Guide/ });
85
+ // Before the page's own actions, so the actions keep the trailing edge.
86
+ const actions = getByText('New');
87
+ expect(button.compareDocumentPosition(actions) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
88
+ fireEvent.click(button);
89
+ const text = await findByText('Each window opens on the first run after a gap.');
90
+ expect(text.closest('[data-cb-prose]')).not.toBeNull();
91
+ });
92
+
93
+ test('GuideRoute: a back link to its page, one h1, and the body inside the reading column', () => {
94
+ const { container, getByRole } = render(
95
+ <GuideRoute title='How connections work' lede='Why they break.' backHref='#/connections' backLabel='Connections'>
96
+ <GuideSection title='Troubleshooting'>
97
+ <p>{'Long procedure text. '.repeat(20)}</p>
98
+ </GuideSection>
99
+ </GuideRoute>,
100
+ );
101
+ expect(getByRole('link', { name: /Connections/ }).getAttribute('href')).toBe('#/connections');
102
+ expect(container.querySelectorAll('h1')).toHaveLength(1);
103
+ expect(container.querySelector('h2')?.textContent).toBe('Troubleshooting');
104
+ expect(container.querySelector('[data-cb-readable]')?.textContent).toContain('Long procedure text.');
105
+ });
106
+ });