@adea-ai/ui 0.61.0 → 0.62.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 (334) hide show
  1. package/README.md +44 -6
  2. package/dist/LICENSE +201 -0
  3. package/dist/NOTICE +50 -0
  4. package/dist/components/composites/account-menu/index.js +2 -0
  5. package/dist/components/composites/list-row/index.js +2 -0
  6. package/dist/components/composites/settings/index.js +2 -0
  7. package/dist/components/composites/stat/index.js +2 -0
  8. package/dist/components/composites/update-dialog/index.js +2 -0
  9. package/dist/components/composites/workspace-mark/index.js +2 -0
  10. package/dist/components/conversation/index.js +6 -0
  11. package/dist/components/layout/app-shell/index.js +2 -0
  12. package/dist/components/layout/page/index.js +2 -0
  13. package/dist/components/layout/panel/index.js +2 -0
  14. package/dist/components/layout/side-rail/index.js +3 -0
  15. package/dist/components/layout/sidebar-nav/index.js +2 -0
  16. package/dist/components/layout/status-bar/index.js +2 -0
  17. package/dist/components/layout/top-bar/index.js +2 -0
  18. package/dist/components/motion/index.js +2 -2
  19. package/dist/components/theme/index.js +5 -0
  20. package/dist/components/ui/accordion/index.js +2 -0
  21. package/dist/components/ui/alert/index.js +2 -0
  22. package/dist/components/ui/alert-dialog/index.js +2 -0
  23. package/dist/components/ui/aspect-ratio/index.js +2 -0
  24. package/dist/components/ui/avatar/index.js +2 -0
  25. package/dist/components/ui/badge/index.js +2 -0
  26. package/dist/components/ui/board/index.js +2 -0
  27. package/dist/components/ui/breadcrumb/index.js +2 -0
  28. package/dist/components/ui/button/index.js +2 -0
  29. package/dist/components/ui/button-group/index.js +2 -0
  30. package/dist/components/ui/calendar/index.js +2 -0
  31. package/dist/components/ui/card/index.js +2 -0
  32. package/dist/components/ui/carousel/index.js +2 -0
  33. package/dist/components/ui/chart/index.js +2 -0
  34. package/dist/components/ui/checkbox/index.js +2 -0
  35. package/dist/components/ui/code-block/index.js +2 -0
  36. package/dist/components/ui/collapsible/index.js +2 -0
  37. package/dist/components/ui/combobox/index.js +2 -0
  38. package/dist/components/ui/command/index.js +2 -0
  39. package/dist/components/ui/context-menu/index.js +2 -0
  40. package/dist/components/ui/detail-panel/index.js +2 -0
  41. package/dist/components/ui/dialog/index.js +2 -0
  42. package/dist/components/ui/diff-block/index.js +2 -0
  43. package/dist/components/ui/drawer/index.js +2 -0
  44. package/dist/components/ui/dropdown-menu/index.js +2 -0
  45. package/dist/components/ui/empty/index.js +2 -0
  46. package/dist/components/ui/entity-icon/index.js +2 -0
  47. package/dist/components/ui/field/index.js +2 -0
  48. package/dist/components/ui/hover-card/index.js +2 -0
  49. package/dist/components/ui/input/index.js +2 -0
  50. package/dist/components/ui/input-group/index.js +2 -0
  51. package/dist/components/ui/input-otp/index.js +2 -0
  52. package/dist/components/ui/item/index.js +2 -0
  53. package/dist/components/ui/kbd/index.js +2 -0
  54. package/dist/components/ui/label/index.js +2 -0
  55. package/dist/components/ui/menubar/index.js +2 -0
  56. package/dist/components/ui/modal-dialog/index.js +2 -0
  57. package/dist/components/ui/navigation-menu/index.js +2 -0
  58. package/dist/components/ui/pagination/index.js +2 -0
  59. package/dist/components/ui/popover/index.js +2 -0
  60. package/dist/components/ui/progress/index.js +2 -0
  61. package/dist/components/ui/radio-group/index.js +2 -0
  62. package/dist/components/ui/resizable/index.js +2 -0
  63. package/dist/components/ui/scroll-area/index.js +2 -0
  64. package/dist/components/ui/select/index.js +2 -0
  65. package/dist/components/ui/separator/index.js +2 -0
  66. package/dist/components/ui/sheet/index.js +2 -0
  67. package/dist/components/ui/skeleton/index.js +2 -0
  68. package/dist/components/ui/slider/index.js +2 -0
  69. package/dist/components/ui/spinner/index.js +2 -0
  70. package/dist/components/ui/status-chip/index.js +2 -0
  71. package/dist/components/ui/switch/index.js +2 -0
  72. package/dist/components/ui/table/index.js +2 -0
  73. package/dist/components/ui/tabs/index.js +2 -0
  74. package/dist/components/ui/textarea/index.js +2 -0
  75. package/dist/components/ui/toast/index.js +2 -0
  76. package/dist/components/ui/toggle/index.js +2 -0
  77. package/dist/components/ui/toggle-group/index.js +2 -0
  78. package/dist/components/ui/tooltip/index.js +2 -0
  79. package/dist/index.d.ts +2 -4
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +1 -3
  82. package/dist/r/accordion.json +3 -1
  83. package/dist/r/account-menu.json +2 -1
  84. package/dist/r/alert-dialog.json +3 -1
  85. package/dist/r/alert.json +3 -1
  86. package/dist/r/app-shell.json +3 -1
  87. package/dist/r/aspect-ratio.json +3 -1
  88. package/dist/r/avatar.json +3 -1
  89. package/dist/r/badge.json +3 -1
  90. package/dist/r/board.json +3 -1
  91. package/dist/r/breadcrumb.json +3 -1
  92. package/dist/r/button-group.json +2 -1
  93. package/dist/r/button.json +3 -1
  94. package/dist/r/calendar.json +2 -1
  95. package/dist/r/card.json +3 -1
  96. package/dist/r/carousel.json +2 -1
  97. package/dist/r/chart.json +3 -1
  98. package/dist/r/checkbox.json +3 -1
  99. package/dist/r/code-block.json +2 -1
  100. package/dist/r/collapsible.json +3 -1
  101. package/dist/r/combobox.json +3 -1
  102. package/dist/r/command.json +3 -1
  103. package/dist/r/context-menu.json +3 -1
  104. package/dist/r/conversation.json +2 -1
  105. package/dist/r/detail-panel.json +2 -1
  106. package/dist/r/dialog.json +3 -1
  107. package/dist/r/diff-block.json +3 -1
  108. package/dist/r/drawer.json +3 -1
  109. package/dist/r/dropdown-menu.json +3 -1
  110. package/dist/r/empty.json +3 -1
  111. package/dist/r/entity-icon.json +3 -1
  112. package/dist/r/field.json +3 -1
  113. package/dist/r/hover-card.json +3 -1
  114. package/dist/r/input-group.json +3 -1
  115. package/dist/r/input-otp.json +3 -1
  116. package/dist/r/input.json +3 -1
  117. package/dist/r/item.json +3 -1
  118. package/dist/r/kbd.json +3 -1
  119. package/dist/r/label.json +3 -1
  120. package/dist/r/lib.json +50 -0
  121. package/dist/r/list-row.json +3 -1
  122. package/dist/r/menubar.json +3 -1
  123. package/dist/r/modal-dialog.json +2 -1
  124. package/dist/r/motion.json +22 -0
  125. package/dist/r/navigation-menu.json +3 -1
  126. package/dist/r/page.json +3 -1
  127. package/dist/r/pagination.json +3 -1
  128. package/dist/r/panel.json +3 -1
  129. package/dist/r/popover.json +3 -1
  130. package/dist/r/progress.json +3 -1
  131. package/dist/r/radio-group.json +3 -1
  132. package/dist/r/registry.json +320 -73
  133. package/dist/r/resizable.json +3 -1
  134. package/dist/r/scroll-area.json +3 -1
  135. package/dist/r/select.json +3 -1
  136. package/dist/r/separator.json +3 -1
  137. package/dist/r/settings.json +3 -1
  138. package/dist/r/sheet.json +2 -1
  139. package/dist/r/side-rail.json +3 -1
  140. package/dist/r/sidebar-nav.json +3 -1
  141. package/dist/r/skeleton.json +3 -1
  142. package/dist/r/slider.json +3 -1
  143. package/dist/r/spinner.json +3 -1
  144. package/dist/r/src/components/composites/account-menu/account-menu.tsx +150 -0
  145. package/dist/r/src/components/composites/account-menu/index.ts +1 -0
  146. package/dist/r/src/components/composites/list-row/index.ts +1 -0
  147. package/dist/r/src/components/composites/list-row/list-row.tsx +116 -0
  148. package/dist/r/src/components/composites/settings/index.ts +1 -0
  149. package/dist/r/src/components/composites/settings/settings.tsx +142 -0
  150. package/dist/r/src/components/composites/stat/index.ts +9 -0
  151. package/dist/r/src/components/composites/stat/stat.tsx +155 -0
  152. package/dist/r/src/components/composites/update-dialog/index.ts +7 -0
  153. package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +529 -0
  154. package/dist/r/src/components/composites/workspace-mark/index.ts +1 -0
  155. package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +72 -0
  156. package/dist/r/src/components/conversation/conversation-avatar.tsx +60 -0
  157. package/dist/r/src/components/conversation/conversation-surface.tsx +107 -0
  158. package/dist/r/src/components/conversation/index.ts +25 -0
  159. package/dist/r/src/components/conversation/message-composer.tsx +239 -0
  160. package/dist/r/src/components/conversation/message-row.tsx +387 -0
  161. package/dist/r/src/components/conversation/thread-panel.tsx +141 -0
  162. package/dist/r/src/components/layout/app-shell/app-shell.tsx +92 -0
  163. package/dist/r/src/components/layout/app-shell/index.ts +1 -0
  164. package/dist/r/src/components/layout/page/index.ts +9 -0
  165. package/dist/r/src/components/layout/page/page.tsx +122 -0
  166. package/dist/r/src/components/layout/panel/index.ts +12 -0
  167. package/dist/r/src/components/layout/panel/panel.tsx +166 -0
  168. package/dist/r/src/components/layout/side-rail/index.ts +12 -0
  169. package/dist/r/src/components/layout/side-rail/side-rail-context.ts +42 -0
  170. package/dist/r/src/components/layout/side-rail/side-rail.tsx +405 -0
  171. package/dist/r/src/components/layout/sidebar-nav/index.ts +14 -0
  172. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +244 -0
  173. package/dist/r/src/components/layout/status-bar/index.ts +1 -0
  174. package/dist/r/src/components/layout/status-bar/status-bar.tsx +73 -0
  175. package/dist/r/src/components/layout/top-bar/index.ts +10 -0
  176. package/dist/r/src/components/layout/top-bar/top-bar.tsx +166 -0
  177. package/dist/r/src/components/motion/index.ts +2 -0
  178. package/dist/r/src/components/motion/presence.tsx +32 -0
  179. package/dist/r/src/components/theme/appearance-panel.tsx +179 -0
  180. package/dist/r/src/components/theme/index.ts +22 -0
  181. package/dist/r/src/components/theme/theme-picker.tsx +174 -0
  182. package/dist/r/src/components/theme/theme-provider.tsx +309 -0
  183. package/dist/r/src/components/theme/theme-toggle.tsx +64 -0
  184. package/dist/r/src/components/ui/accordion/accordion.tsx +66 -0
  185. package/dist/r/src/components/ui/accordion/index.ts +1 -0
  186. package/dist/r/src/components/ui/alert/alert.tsx +95 -0
  187. package/dist/r/src/components/ui/alert/index.ts +1 -0
  188. package/dist/r/src/components/ui/alert-dialog/alert-dialog.tsx +176 -0
  189. package/dist/r/src/components/ui/alert-dialog/index.ts +13 -0
  190. package/dist/r/src/components/ui/aspect-ratio/aspect-ratio.tsx +38 -0
  191. package/dist/r/src/components/ui/aspect-ratio/index.ts +1 -0
  192. package/dist/r/src/components/ui/avatar/avatar.tsx +114 -0
  193. package/dist/r/src/components/ui/avatar/index.ts +9 -0
  194. package/dist/r/src/components/ui/badge/badge.tsx +59 -0
  195. package/dist/r/src/components/ui/badge/index.ts +1 -0
  196. package/dist/r/src/components/ui/board/board.tsx +254 -0
  197. package/dist/r/src/components/ui/board/index.ts +10 -0
  198. package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +117 -0
  199. package/dist/r/src/components/ui/breadcrumb/index.ts +9 -0
  200. package/dist/r/src/components/ui/button/button.tsx +89 -0
  201. package/dist/r/src/components/ui/button/index.ts +1 -0
  202. package/dist/r/src/components/ui/button-group/button-group.tsx +92 -0
  203. package/dist/r/src/components/ui/button-group/index.ts +6 -0
  204. package/dist/r/src/components/ui/calendar/calendar.tsx +277 -0
  205. package/dist/r/src/components/ui/calendar/index.ts +1 -0
  206. package/dist/r/src/components/ui/card/card.tsx +82 -0
  207. package/dist/r/src/components/ui/card/index.ts +10 -0
  208. package/dist/r/src/components/ui/carousel/carousel.tsx +209 -0
  209. package/dist/r/src/components/ui/carousel/index.ts +1 -0
  210. package/dist/r/src/components/ui/chart/chart.tsx +413 -0
  211. package/dist/r/src/components/ui/chart/index.ts +17 -0
  212. package/dist/r/src/components/ui/checkbox/checkbox.tsx +99 -0
  213. package/dist/r/src/components/ui/checkbox/index.ts +1 -0
  214. package/dist/r/src/components/ui/code-block/code-block.tsx +238 -0
  215. package/dist/r/src/components/ui/code-block/index.ts +1 -0
  216. package/dist/r/src/components/ui/collapsible/collapsible.tsx +54 -0
  217. package/dist/r/src/components/ui/collapsible/index.ts +1 -0
  218. package/dist/r/src/components/ui/combobox/combobox.tsx +142 -0
  219. package/dist/r/src/components/ui/combobox/index.ts +10 -0
  220. package/dist/r/src/components/ui/command/command.tsx +214 -0
  221. package/dist/r/src/components/ui/command/index.ts +12 -0
  222. package/dist/r/src/components/ui/context-menu/context-menu.tsx +163 -0
  223. package/dist/r/src/components/ui/context-menu/index.ts +15 -0
  224. package/dist/r/src/components/ui/detail-panel/detail-panel.tsx +161 -0
  225. package/dist/r/src/components/ui/detail-panel/index.ts +9 -0
  226. package/dist/r/src/components/ui/dialog/dialog.tsx +138 -0
  227. package/dist/r/src/components/ui/dialog/index.ts +14 -0
  228. package/dist/r/src/components/ui/diff-block/diff-block.tsx +286 -0
  229. package/dist/r/src/components/ui/diff-block/index.ts +11 -0
  230. package/dist/r/src/components/ui/drawer/drawer.tsx +144 -0
  231. package/dist/r/src/components/ui/drawer/index.ts +13 -0
  232. package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +203 -0
  233. package/dist/r/src/components/ui/dropdown-menu/index.ts +18 -0
  234. package/dist/r/src/components/ui/empty/empty.tsx +104 -0
  235. package/dist/r/src/components/ui/empty/index.ts +10 -0
  236. package/dist/r/src/components/ui/entity-icon/entity-icon.tsx +154 -0
  237. package/dist/r/src/components/ui/entity-icon/index.ts +1 -0
  238. package/dist/r/src/components/ui/field/field.tsx +131 -0
  239. package/dist/r/src/components/ui/field/index.ts +11 -0
  240. package/dist/r/src/components/ui/hover-card/hover-card.tsx +48 -0
  241. package/dist/r/src/components/ui/hover-card/index.ts +1 -0
  242. package/dist/r/src/components/ui/input/index.ts +1 -0
  243. package/dist/r/src/components/ui/input/input.tsx +41 -0
  244. package/dist/r/src/components/ui/input-group/index.ts +8 -0
  245. package/dist/r/src/components/ui/input-group/input-group.tsx +111 -0
  246. package/dist/r/src/components/ui/input-otp/index.ts +1 -0
  247. package/dist/r/src/components/ui/input-otp/input-otp.tsx +108 -0
  248. package/dist/r/src/components/ui/item/index.ts +10 -0
  249. package/dist/r/src/components/ui/item/item.tsx +146 -0
  250. package/dist/r/src/components/ui/kbd/index.ts +1 -0
  251. package/dist/r/src/components/ui/kbd/kbd.tsx +42 -0
  252. package/dist/r/src/components/ui/label/index.ts +1 -0
  253. package/dist/r/src/components/ui/label/label.tsx +36 -0
  254. package/dist/r/src/components/ui/menubar/index.ts +16 -0
  255. package/dist/r/src/components/ui/menubar/menubar.tsx +190 -0
  256. package/dist/r/src/components/ui/modal-dialog/index.ts +1 -0
  257. package/dist/r/src/components/ui/modal-dialog/modal-dialog.tsx +95 -0
  258. package/dist/r/src/components/ui/navigation-menu/index.ts +13 -0
  259. package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +229 -0
  260. package/dist/r/src/components/ui/pagination/index.ts +8 -0
  261. package/dist/r/src/components/ui/pagination/pagination.tsx +144 -0
  262. package/dist/r/src/components/ui/popover/index.ts +10 -0
  263. package/dist/r/src/components/ui/popover/popover.tsx +81 -0
  264. package/dist/r/src/components/ui/progress/index.ts +1 -0
  265. package/dist/r/src/components/ui/progress/progress.tsx +67 -0
  266. package/dist/r/src/components/ui/radio-group/index.ts +1 -0
  267. package/dist/r/src/components/ui/radio-group/radio-group.tsx +78 -0
  268. package/dist/r/src/components/ui/resizable/index.ts +6 -0
  269. package/dist/r/src/components/ui/resizable/resizable.tsx +74 -0
  270. package/dist/r/src/components/ui/scroll-area/index.ts +1 -0
  271. package/dist/r/src/components/ui/scroll-area/scroll-area.tsx +66 -0
  272. package/dist/r/src/components/ui/select/index.ts +11 -0
  273. package/dist/r/src/components/ui/select/select.tsx +188 -0
  274. package/dist/r/src/components/ui/separator/index.ts +1 -0
  275. package/dist/r/src/components/ui/separator/separator.tsx +40 -0
  276. package/dist/r/src/components/ui/sheet/index.ts +13 -0
  277. package/dist/r/src/components/ui/sheet/sheet.tsx +132 -0
  278. package/dist/r/src/components/ui/skeleton/index.ts +1 -0
  279. package/dist/r/src/components/ui/skeleton/skeleton.tsx +28 -0
  280. package/dist/r/src/components/ui/slider/index.ts +1 -0
  281. package/dist/r/src/components/ui/slider/slider.tsx +81 -0
  282. package/dist/r/src/components/ui/spinner/index.ts +1 -0
  283. package/dist/r/src/components/ui/spinner/spinner.tsx +58 -0
  284. package/dist/r/src/components/ui/status-chip/index.ts +8 -0
  285. package/dist/r/src/components/ui/status-chip/status-chip.tsx +142 -0
  286. package/dist/r/src/components/ui/switch/index.ts +1 -0
  287. package/dist/r/src/components/ui/switch/switch.tsx +100 -0
  288. package/dist/r/src/components/ui/table/index.ts +11 -0
  289. package/dist/r/src/components/ui/table/table.tsx +125 -0
  290. package/dist/r/src/components/ui/tabs/index.ts +8 -0
  291. package/dist/r/src/components/ui/tabs/tabs.tsx +77 -0
  292. package/dist/r/src/components/ui/textarea/index.ts +1 -0
  293. package/dist/r/src/components/ui/textarea/textarea.tsx +36 -0
  294. package/dist/r/src/components/ui/toast/index.ts +1 -0
  295. package/dist/r/src/components/ui/toast/toast.tsx +220 -0
  296. package/dist/r/src/components/ui/toggle/index.ts +1 -0
  297. package/dist/r/src/components/ui/toggle/toggle.tsx +60 -0
  298. package/dist/r/src/components/ui/toggle-group/index.ts +6 -0
  299. package/dist/r/src/components/ui/toggle-group/toggle-group.tsx +66 -0
  300. package/dist/r/src/components/ui/tooltip/index.ts +9 -0
  301. package/dist/r/src/components/ui/tooltip/tooltip.tsx +102 -0
  302. package/dist/r/src/lib/keyed-rows.ts +68 -0
  303. package/dist/r/src/lib/overlay.ts +70 -0
  304. package/dist/r/src/lib/themes.ts +490 -0
  305. package/dist/r/src/lib/tokens.ts +688 -0
  306. package/dist/r/src/lib/utils.ts +76 -0
  307. package/dist/r/src/lib/variants.ts +62 -0
  308. package/dist/r/src/lib/version-notes.ts +65 -0
  309. package/dist/r/src/styles/base.css +644 -0
  310. package/dist/r/src/styles/fonts.css +26 -0
  311. package/dist/r/src/styles/globals.css +18 -0
  312. package/dist/r/src/styles/theme.css +864 -0
  313. package/dist/r/stat.json +3 -1
  314. package/dist/r/status-bar.json +3 -1
  315. package/dist/r/status-chip.json +2 -1
  316. package/dist/r/switch.json +3 -1
  317. package/dist/r/table.json +3 -1
  318. package/dist/r/tabs.json +3 -1
  319. package/dist/r/textarea.json +3 -1
  320. package/dist/r/theming.json +42 -0
  321. package/dist/r/toast.json +3 -1
  322. package/dist/r/toggle-group.json +2 -1
  323. package/dist/r/toggle.json +3 -1
  324. package/dist/r/tooltip.json +3 -1
  325. package/dist/r/top-bar.json +3 -1
  326. package/dist/r/update-dialog.json +2 -1
  327. package/dist/r/workspace-mark.json +2 -1
  328. package/package.json +10 -9
  329. package/registry.json +320 -73
  330. package/src/index.ts +2 -4
  331. package/dist/components/ui/diff-block/diff-block.test.d.ts +0 -2
  332. package/dist/components/ui/diff-block/diff-block.test.d.ts.map +0 -1
  333. package/dist/lib/keyed-rows.test.d.ts +0 -2
  334. package/dist/lib/keyed-rows.test.d.ts.map +0 -1
@@ -0,0 +1,122 @@
1
+ import type { ComponentProps, JSX } from 'solid-js'
2
+ import { Show, splitProps } from 'solid-js'
3
+ import { cn } from '../../../lib/utils'
4
+
5
+ /**
6
+ * PageHeader.
7
+ *
8
+ * The title block at the top of a scrollable page: where the user is, what this
9
+ * page is, and the actions that apply to the whole of it.
10
+ *
11
+ * The action slot is single and singular on purpose. A page header with four
12
+ * equally-weighted buttons has not decided what the page is for; the design
13
+ * system can only make that look tidy, not make it true. Put the primary action
14
+ * here and the rest in an overflow menu or on the rows they belong to.
15
+ */
16
+ export function PageHeader(props: ComponentProps<'header'>) {
17
+ const [local, rest] = splitProps(props, ['class'])
18
+
19
+ return (
20
+ <header
21
+ data-slot="page-header"
22
+ class={cn(
23
+ 'flex shrink-0 flex-wrap items-start justify-between gap-x-4 gap-y-3 px-5 pt-5 pb-4',
24
+ local.class
25
+ )}
26
+ {...rest}
27
+ />
28
+ )
29
+ }
30
+
31
+ export function PageHeaderContent(props: ComponentProps<'div'>) {
32
+ const [local, rest] = splitProps(props, ['class'])
33
+ return (
34
+ <div
35
+ data-slot="page-header-content"
36
+ class={cn('flex min-w-0 flex-col gap-1', local.class)}
37
+ {...rest}
38
+ />
39
+ )
40
+ }
41
+
42
+ export function PageHeaderTitle(props: ComponentProps<'h1'>) {
43
+ const [local, rest] = splitProps(props, ['class'])
44
+ return (
45
+ <h1
46
+ data-slot="page-header-title"
47
+ class={cn('text-xl font-semibold tracking-tight', local.class)}
48
+ {...rest}
49
+ />
50
+ )
51
+ }
52
+
53
+ export function PageHeaderDescription(props: ComponentProps<'p'>) {
54
+ const [local, rest] = splitProps(props, ['class'])
55
+ return (
56
+ <p
57
+ data-slot="page-header-description"
58
+ class={cn('max-w-prose text-sm text-muted-foreground text-pretty', local.class)}
59
+ {...rest}
60
+ />
61
+ )
62
+ }
63
+
64
+ /** The trailing action group. One primary action, at most. */
65
+ export function PageHeaderActions(props: ComponentProps<'div'>) {
66
+ const [local, rest] = splitProps(props, ['class'])
67
+ return (
68
+ <div
69
+ data-slot="page-header-actions"
70
+ class={cn('flex shrink-0 items-center gap-2', local.class)}
71
+ {...rest}
72
+ />
73
+ )
74
+ }
75
+
76
+ /**
77
+ * A section inside a page, with an optional title and a description.
78
+ * Sections are separated by space rather than by rules — a page of boxed
79
+ * sections reads as a dashboard, and most pages are not one.
80
+ */
81
+ export function PageSection(
82
+ props: ComponentProps<'section'> & { title?: string; description?: string; action?: JSX.Element }
83
+ ) {
84
+ const [local, rest] = splitProps(props, ['class', 'title', 'description', 'action', 'children'])
85
+
86
+ return (
87
+ <section
88
+ data-slot="page-section"
89
+ class={cn('flex flex-col gap-3 px-5 py-4', local.class)}
90
+ {...rest}
91
+ >
92
+ <Show when={local.title}>
93
+ <div class="flex items-baseline justify-between gap-3">
94
+ <div class="flex min-w-0 flex-col gap-0.5">
95
+ <h2 class="text-base font-semibold tracking-tight">{local.title}</h2>
96
+ <Show when={local.description}>
97
+ <p class="max-w-prose text-sm text-muted-foreground text-pretty">
98
+ {local.description}
99
+ </p>
100
+ </Show>
101
+ </div>
102
+ <Show when={local.action}>
103
+ <div class="flex shrink-0 items-center gap-2">{local.action}</div>
104
+ </Show>
105
+ </div>
106
+ </Show>
107
+ {local.children}
108
+ </section>
109
+ )
110
+ }
111
+
112
+ /** The scroll container a page's header and sections sit in. */
113
+ export function Page(props: ComponentProps<'div'>) {
114
+ const [local, rest] = splitProps(props, ['class'])
115
+ return (
116
+ <div
117
+ data-slot="page"
118
+ class={cn('flex min-h-0 flex-1 flex-col overflow-y-auto', local.class)}
119
+ {...rest}
120
+ />
121
+ )
122
+ }
@@ -0,0 +1,12 @@
1
+ export {
2
+ Panel,
3
+ PanelActions,
4
+ PanelBody,
5
+ PanelCard,
6
+ PanelDescription,
7
+ PanelFooter,
8
+ PanelHeader,
9
+ PanelPlaceholder,
10
+ PanelTitle,
11
+ PanelToolbar,
12
+ } from './panel'
@@ -0,0 +1,166 @@
1
+ import type { ComponentProps } from 'solid-js'
2
+ import { Show, splitProps } from 'solid-js'
3
+ import { cn } from '../../../lib/utils'
4
+
5
+ /**
6
+ * Panel.
7
+ *
8
+ * A titled region inside the content area — an editor, an inspector, a list, a
9
+ * terminal. It is the third level of surface after the shell and the sidebar,
10
+ * and like them its parts are fixed: a header with a title and a toolbar, a
11
+ * scrolling body, an optional footer.
12
+ *
13
+ * The body scrolls and the header does not, which is the whole reason this is a
14
+ * component. A panel whose header scrolls away loses the name of what the user
15
+ * is looking at, and every hand-built panel gets this wrong at least once.
16
+ *
17
+ * Component props are `title`-agnostic on purpose: the panel does not decide
18
+ * how large its title is, so an inspector's title and an editor's title agree.
19
+ */
20
+ export function Panel(props: ComponentProps<'section'>) {
21
+ const [local, rest] = splitProps(props, ['class'])
22
+
23
+ return (
24
+ <section
25
+ data-slot="panel"
26
+ class={cn(
27
+ 'bg-surface flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden',
28
+ local.class
29
+ )}
30
+ {...rest}
31
+ />
32
+ )
33
+ }
34
+
35
+ /** A panel whose surface is raised, for a panel floating over the canvas. */
36
+ export function PanelCard(props: ComponentProps<'section'>) {
37
+ const [local, rest] = splitProps(props, ['class'])
38
+
39
+ return (
40
+ <Panel
41
+ class={cn(
42
+ 'bg-card m-2 h-[calc(100%-1rem)] rounded-xl border border-border shadow-xs',
43
+ local.class
44
+ )}
45
+ {...rest}
46
+ />
47
+ )
48
+ }
49
+
50
+ export function PanelHeader(props: ComponentProps<'header'>) {
51
+ const [local, rest] = splitProps(props, ['class'])
52
+
53
+ return (
54
+ <header
55
+ data-slot="panel-header"
56
+ class={cn(
57
+ 'flex min-h-(--topbar-height) shrink-0 items-center gap-2 border-b border-border px-3',
58
+ local.class
59
+ )}
60
+ {...rest}
61
+ />
62
+ )
63
+ }
64
+
65
+ export function PanelTitle(props: ComponentProps<'h2'>) {
66
+ const [local, rest] = splitProps(props, ['class'])
67
+ return (
68
+ <h2
69
+ data-slot="panel-title"
70
+ class={cn('min-w-0 truncate text-sm font-semibold tracking-tight', local.class)}
71
+ {...rest}
72
+ />
73
+ )
74
+ }
75
+
76
+ export function PanelDescription(props: ComponentProps<'p'>) {
77
+ const [local, rest] = splitProps(props, ['class'])
78
+ return (
79
+ <p
80
+ data-slot="panel-description"
81
+ class={cn('truncate text-xs text-muted-foreground', local.class)}
82
+ {...rest}
83
+ />
84
+ )
85
+ }
86
+
87
+ /** The trailing group in a panel header: buttons, tabs, a menu. */
88
+ export function PanelActions(props: ComponentProps<'div'>) {
89
+ const [local, rest] = splitProps(props, ['class'])
90
+ return (
91
+ <div
92
+ data-slot="panel-actions"
93
+ class={cn('ms-auto flex shrink-0 items-center gap-1', local.class)}
94
+ {...rest}
95
+ />
96
+ )
97
+ }
98
+
99
+ /** A secondary row under the header: a toolbar, tabs, a filter bar. */
100
+ export function PanelToolbar(props: ComponentProps<'div'>) {
101
+ const [local, rest] = splitProps(props, ['class'])
102
+ return (
103
+ <div
104
+ data-slot="panel-toolbar"
105
+ class={cn(
106
+ 'flex min-h-9 shrink-0 items-center gap-1.5 border-b border-border px-2',
107
+ local.class
108
+ )}
109
+ {...rest}
110
+ />
111
+ )
112
+ }
113
+
114
+ /**
115
+ * The scrolling region.
116
+ *
117
+ * `min-h-0` is required and easy to omit: a flex child's default `min-height`
118
+ * is its content, so without it a long body pushes the panel past its parent
119
+ * instead of scrolling.
120
+ */
121
+ export function PanelBody(
122
+ props: ComponentProps<'div'> & { /** Remove the default padding. */ bare?: boolean }
123
+ ) {
124
+ const [local, rest] = splitProps(props, ['class', 'bare'])
125
+
126
+ return (
127
+ <div
128
+ data-slot="panel-body"
129
+ class={cn('min-h-0 flex-1 overflow-y-auto', { 'p-3': !local.bare }, local.class)}
130
+ {...rest}
131
+ />
132
+ )
133
+ }
134
+
135
+ export function PanelFooter(props: ComponentProps<'footer'>) {
136
+ const [local, rest] = splitProps(props, ['class'])
137
+ return (
138
+ <footer
139
+ data-slot="panel-footer"
140
+ class={cn('flex shrink-0 items-center gap-2 border-t border-border px-3 py-2', local.class)}
141
+ {...rest}
142
+ />
143
+ )
144
+ }
145
+
146
+ /**
147
+ * The centered message a panel shows when it has no content. Distinct from
148
+ * `Empty`, which is a full-page state with room for media and actions; this is
149
+ * the in-pane version, sized for a column.
150
+ */
151
+ export function PanelPlaceholder(props: ComponentProps<'div'>) {
152
+ const [local, rest] = splitProps(props, ['class', 'children'])
153
+
154
+ return (
155
+ <div
156
+ data-slot="panel-placeholder"
157
+ class={cn(
158
+ 'text-muted-foreground flex h-full min-h-32 flex-col items-center justify-center gap-2 p-6 text-center text-sm',
159
+ local.class
160
+ )}
161
+ {...rest}
162
+ >
163
+ <Show when={local.children}>{local.children}</Show>
164
+ </div>
165
+ )
166
+ }
@@ -0,0 +1,12 @@
1
+ export {
2
+ SideRail,
3
+ SideRailButton,
4
+ SideRailContent,
5
+ SideRailFooter,
6
+ SideRailHeader,
7
+ SideRailItem,
8
+ SideRailSection,
9
+ type SideRailItemProps,
10
+ type SideRailProps,
11
+ } from './side-rail'
12
+ export { useSideRail } from './side-rail-context'
@@ -0,0 +1,42 @@
1
+ import { createContext, createMemo, useContext } from 'solid-js'
2
+
3
+ /**
4
+ * The side rail's collapse state, shared with its items.
5
+ *
6
+ * A rail has two forms — icon-only and labelled — and every item has to agree
7
+ * about which is showing. Threading a `collapsed` prop through each item would
8
+ * work in a demo and break in practice, because an app composes its rail from
9
+ * several components (a brand, a section, a footer) and would have to remember
10
+ * to pass the flag to all of them.
11
+ *
12
+ * Context makes the rail's form a property of the rail rather than an argument
13
+ * every caller repeats. The items still decide what to *do* about it: a hidden
14
+ * label must become a tooltip, not simply disappear.
15
+ */
16
+ type SideRailContextValue = {
17
+ collapsed: () => boolean
18
+ /** Width the rail occupies, so a layout can reserve it without measuring. */
19
+ width: () => string
20
+ }
21
+
22
+ const SideRailContext = createContext<SideRailContextValue>()
23
+
24
+ export function useSideRail(): SideRailContextValue {
25
+ const value = useContext(SideRailContext)
26
+ if (!value) {
27
+ throw new Error('useSideRail must be called inside a <SideRail>.')
28
+ }
29
+ return value
30
+ }
31
+
32
+ export { SideRailContext }
33
+
34
+ export function createSideRailValue(
35
+ collapsed: () => boolean,
36
+ width: () => string
37
+ ): SideRailContextValue {
38
+ return {
39
+ collapsed: createMemo(() => collapsed()),
40
+ width,
41
+ }
42
+ }