@cueplusplus/ui 0.1.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 (372) hide show
  1. package/dist/charts/_token.js +39 -0
  2. package/dist/charts/container.d.ts +58 -0
  3. package/dist/charts/container.js +77 -0
  4. package/dist/charts/index.d.ts +5 -0
  5. package/dist/charts/index.js +5 -0
  6. package/dist/charts/ramps.d.ts +140 -0
  7. package/dist/charts/ramps.js +615 -0
  8. package/dist/charts/theme.d.ts +112 -0
  9. package/dist/charts/theme.js +165 -0
  10. package/dist/charts/tones.d.ts +111 -0
  11. package/dist/charts/tones.js +127 -0
  12. package/dist/chat/_glyphs.js +55 -0
  13. package/dist/chat/agent-color.d.ts +84 -0
  14. package/dist/chat/agent-color.js +101 -0
  15. package/dist/chat/agent-pile.d.ts +55 -0
  16. package/dist/chat/agent-pile.js +121 -0
  17. package/dist/chat/ask-box.d.ts +88 -0
  18. package/dist/chat/ask-box.js +341 -0
  19. package/dist/chat/composer.d.ts +66 -0
  20. package/dist/chat/composer.js +144 -0
  21. package/dist/chat/delegation-card.d.ts +60 -0
  22. package/dist/chat/delegation-card.js +129 -0
  23. package/dist/chat/index.d.ts +8 -0
  24. package/dist/chat/index.js +8 -0
  25. package/dist/chat/message-list.d.ts +39 -0
  26. package/dist/chat/message-list.js +105 -0
  27. package/dist/chat/message.d.ts +47 -0
  28. package/dist/chat/message.js +108 -0
  29. package/dist/chrome/_glyphs.js +101 -0
  30. package/dist/chrome/_tabs-scroll.d.ts +62 -0
  31. package/dist/chrome/_tabs-scroll.js +68 -0
  32. package/dist/chrome/_tree.d.ts +75 -0
  33. package/dist/chrome/_tree.js +49 -0
  34. package/dist/chrome/empty-state.d.ts +37 -0
  35. package/dist/chrome/empty-state.js +57 -0
  36. package/dist/chrome/eyebrow.d.ts +29 -0
  37. package/dist/chrome/eyebrow.js +36 -0
  38. package/dist/chrome/index.d.ts +17 -0
  39. package/dist/chrome/index.js +17 -0
  40. package/dist/chrome/navigation-menu.d.ts +80 -0
  41. package/dist/chrome/navigation-menu.js +121 -0
  42. package/dist/chrome/page-shell.d.ts +38 -0
  43. package/dist/chrome/page-shell.js +66 -0
  44. package/dist/chrome/panel.d.ts +55 -0
  45. package/dist/chrome/panel.js +67 -0
  46. package/dist/chrome/row.d.ts +82 -0
  47. package/dist/chrome/row.js +106 -0
  48. package/dist/chrome/scroll-area.d.ts +39 -0
  49. package/dist/chrome/scroll-area.js +70 -0
  50. package/dist/chrome/section-header.d.ts +42 -0
  51. package/dist/chrome/section-header.js +79 -0
  52. package/dist/chrome/segmented-control.d.ts +58 -0
  53. package/dist/chrome/segmented-control.js +76 -0
  54. package/dist/chrome/status-bar.d.ts +46 -0
  55. package/dist/chrome/status-bar.js +56 -0
  56. package/dist/chrome/tabs.d.ts +80 -0
  57. package/dist/chrome/tabs.js +176 -0
  58. package/dist/chrome/title-bar.d.ts +37 -0
  59. package/dist/chrome/title-bar.js +45 -0
  60. package/dist/chrome/toolbar.d.ts +46 -0
  61. package/dist/chrome/toolbar.js +62 -0
  62. package/dist/chrome/tree.d.ts +98 -0
  63. package/dist/chrome/tree.js +248 -0
  64. package/dist/color/_checker.js +14 -0
  65. package/dist/color/_convert.d.ts +52 -0
  66. package/dist/color/_convert.js +66 -0
  67. package/dist/color/_glyphs.js +28 -0
  68. package/dist/color/_thumb.js +15 -0
  69. package/dist/color/_value.js +28 -0
  70. package/dist/color/color-area.d.ts +27 -0
  71. package/dist/color/color-area.js +40 -0
  72. package/dist/color/color-field.d.ts +32 -0
  73. package/dist/color/color-field.js +43 -0
  74. package/dist/color/color-picker.d.ts +71 -0
  75. package/dist/color/color-picker.js +178 -0
  76. package/dist/color/color-slider.d.ts +31 -0
  77. package/dist/color/color-slider.js +51 -0
  78. package/dist/color/color-swatch.d.ts +32 -0
  79. package/dist/color/color-swatch.js +44 -0
  80. package/dist/color/index.d.ts +7 -0
  81. package/dist/color/index.js +7 -0
  82. package/dist/configurator/_export.d.ts +78 -0
  83. package/dist/configurator/_export.js +261 -0
  84. package/dist/configurator/_glyphs.js +92 -0
  85. package/dist/configurator/_overrides.d.ts +247 -0
  86. package/dist/configurator/_overrides.js +514 -0
  87. package/dist/configurator/configurator.d.ts +71 -0
  88. package/dist/configurator/configurator.js +279 -0
  89. package/dist/configurator/export-dialog.d.ts +30 -0
  90. package/dist/configurator/export-dialog.js +121 -0
  91. package/dist/configurator/index.d.ts +8 -0
  92. package/dist/configurator/index.js +8 -0
  93. package/dist/configurator/panel-sections.d.ts +86 -0
  94. package/dist/configurator/panel-sections.js +316 -0
  95. package/dist/configurator/token-editor.d.ts +74 -0
  96. package/dist/configurator/token-editor.js +149 -0
  97. package/dist/configurator/use-zoom.d.ts +87 -0
  98. package/dist/configurator/use-zoom.js +113 -0
  99. package/dist/date/_glyphs.js +34 -0
  100. package/dist/date/_segments.js +55 -0
  101. package/dist/date/_trigger.js +31 -0
  102. package/dist/date/calendar.d.ts +25 -0
  103. package/dist/date/calendar.js +125 -0
  104. package/dist/date/date-field.d.ts +34 -0
  105. package/dist/date/date-field.js +41 -0
  106. package/dist/date/date-picker.d.ts +69 -0
  107. package/dist/date/date-picker.js +89 -0
  108. package/dist/date/date-range-picker.d.ts +65 -0
  109. package/dist/date/date-range-picker.js +92 -0
  110. package/dist/date/index.d.ts +6 -0
  111. package/dist/date/index.js +6 -0
  112. package/dist/date/time-field.d.ts +29 -0
  113. package/dist/date/time-field.js +36 -0
  114. package/dist/dmx/_ramp.d.ts +77 -0
  115. package/dist/dmx/_ramp.js +169 -0
  116. package/dist/dmx/_readout.js +53 -0
  117. package/dist/dmx/_universe.d.ts +105 -0
  118. package/dist/dmx/_universe.js +112 -0
  119. package/dist/dmx/channel-matrix.d.ts +81 -0
  120. package/dist/dmx/channel-matrix.js +285 -0
  121. package/dist/dmx/dmx-bar.d.ts +50 -0
  122. package/dist/dmx/dmx-bar.js +107 -0
  123. package/dist/dmx/dmx-strip.d.ts +41 -0
  124. package/dist/dmx/dmx-strip.js +196 -0
  125. package/dist/dmx/index.d.ts +7 -0
  126. package/dist/dmx/index.js +7 -0
  127. package/dist/dmx/universe-grid.d.ts +61 -0
  128. package/dist/dmx/universe-grid.js +182 -0
  129. package/dist/flow/_frame.d.ts +52 -0
  130. package/dist/flow/_frame.js +38 -0
  131. package/dist/flow/controls.d.ts +41 -0
  132. package/dist/flow/controls.js +53 -0
  133. package/dist/flow/flow.css +121 -0
  134. package/dist/flow/handles.d.ts +40 -0
  135. package/dist/flow/handles.js +61 -0
  136. package/dist/flow/index.d.ts +7 -0
  137. package/dist/flow/index.js +7 -0
  138. package/dist/flow/node-card.d.ts +71 -0
  139. package/dist/flow/node-card.js +102 -0
  140. package/dist/flow/signal-edge.d.ts +60 -0
  141. package/dist/flow/signal-edge.js +108 -0
  142. package/dist/flow/use-flow-theme.d.ts +69 -0
  143. package/dist/flow/use-flow-theme.js +109 -0
  144. package/dist/forms/_chassis.d.ts +64 -0
  145. package/dist/forms/_chassis.js +59 -0
  146. package/dist/forms/_glyphs.js +143 -0
  147. package/dist/forms/_listbox.js +55 -0
  148. package/dist/forms/autocomplete.d.ts +61 -0
  149. package/dist/forms/autocomplete.js +88 -0
  150. package/dist/forms/button-group.d.ts +47 -0
  151. package/dist/forms/button-group.js +52 -0
  152. package/dist/forms/checkbox.d.ts +51 -0
  153. package/dist/forms/checkbox.js +98 -0
  154. package/dist/forms/combobox.d.ts +73 -0
  155. package/dist/forms/combobox.js +108 -0
  156. package/dist/forms/env-var-input.d.ts +74 -0
  157. package/dist/forms/env-var-input.js +116 -0
  158. package/dist/forms/field.d.ts +89 -0
  159. package/dist/forms/field.js +102 -0
  160. package/dist/forms/file-upload.d.ts +113 -0
  161. package/dist/forms/file-upload.js +232 -0
  162. package/dist/forms/index.d.ts +26 -0
  163. package/dist/forms/index.js +26 -0
  164. package/dist/forms/input-group.d.ts +31 -0
  165. package/dist/forms/input-group.js +54 -0
  166. package/dist/forms/input.d.ts +33 -0
  167. package/dist/forms/input.js +36 -0
  168. package/dist/forms/multi-select.d.ts +62 -0
  169. package/dist/forms/multi-select.js +107 -0
  170. package/dist/forms/number-field.d.ts +38 -0
  171. package/dist/forms/number-field.js +64 -0
  172. package/dist/forms/otp-field.d.ts +54 -0
  173. package/dist/forms/otp-field.js +59 -0
  174. package/dist/forms/password-input.d.ts +46 -0
  175. package/dist/forms/password-input.js +62 -0
  176. package/dist/forms/radio-group.d.ts +50 -0
  177. package/dist/forms/radio-group.js +64 -0
  178. package/dist/forms/rating.d.ts +69 -0
  179. package/dist/forms/rating.js +103 -0
  180. package/dist/forms/scrub-input.d.ts +81 -0
  181. package/dist/forms/scrub-input.js +249 -0
  182. package/dist/forms/search-input.d.ts +54 -0
  183. package/dist/forms/search-input.js +112 -0
  184. package/dist/forms/select.d.ts +75 -0
  185. package/dist/forms/select.js +91 -0
  186. package/dist/forms/slider.d.ts +44 -0
  187. package/dist/forms/slider.js +65 -0
  188. package/dist/forms/switch.d.ts +36 -0
  189. package/dist/forms/switch.js +71 -0
  190. package/dist/forms/tags-input.d.ts +69 -0
  191. package/dist/forms/tags-input.js +148 -0
  192. package/dist/forms/textarea.d.ts +27 -0
  193. package/dist/forms/textarea.js +37 -0
  194. package/dist/forms/toggle-group.d.ts +41 -0
  195. package/dist/forms/toggle-group.js +56 -0
  196. package/dist/forms/toggle.d.ts +41 -0
  197. package/dist/forms/toggle.js +100 -0
  198. package/dist/index.d.ts +112 -0
  199. package/dist/index.js +104 -0
  200. package/dist/instruments/_ansi.js +116 -0
  201. package/dist/instruments/_glyphs.js +90 -0
  202. package/dist/instruments/_motion.js +56 -0
  203. package/dist/instruments/_rem.js +21 -0
  204. package/dist/instruments/app-window-frame.d.ts +48 -0
  205. package/dist/instruments/app-window-frame.js +76 -0
  206. package/dist/instruments/copy-button.d.ts +41 -0
  207. package/dist/instruments/copy-button.js +112 -0
  208. package/dist/instruments/data-table.d.ts +168 -0
  209. package/dist/instruments/data-table.js +212 -0
  210. package/dist/instruments/group-bar.d.ts +63 -0
  211. package/dist/instruments/group-bar.js +122 -0
  212. package/dist/instruments/index.d.ts +13 -0
  213. package/dist/instruments/index.js +13 -0
  214. package/dist/instruments/log-viewer.d.ts +74 -0
  215. package/dist/instruments/log-viewer.js +215 -0
  216. package/dist/instruments/meter.d.ts +77 -0
  217. package/dist/instruments/meter.js +96 -0
  218. package/dist/instruments/progress.d.ts +45 -0
  219. package/dist/instruments/progress.js +61 -0
  220. package/dist/instruments/seam-grid.d.ts +66 -0
  221. package/dist/instruments/seam-grid.js +78 -0
  222. package/dist/instruments/sparkline.d.ts +39 -0
  223. package/dist/instruments/sparkline.js +85 -0
  224. package/dist/instruments/stat.d.ts +35 -0
  225. package/dist/instruments/stat.js +59 -0
  226. package/dist/instruments/table.d.ts +51 -0
  227. package/dist/instruments/table.js +92 -0
  228. package/dist/instruments/terminal-frame.d.ts +89 -0
  229. package/dist/instruments/terminal-frame.js +256 -0
  230. package/dist/instruments/two-step-button.d.ts +47 -0
  231. package/dist/instruments/two-step-button.js +147 -0
  232. package/dist/instruments/usage-chart.d.ts +55 -0
  233. package/dist/instruments/usage-chart.js +235 -0
  234. package/dist/layout/_collapse.js +46 -0
  235. package/dist/layout/_glyphs.js +45 -0
  236. package/dist/layout/accordion.d.ts +52 -0
  237. package/dist/layout/accordion.js +81 -0
  238. package/dist/layout/breadcrumb.d.ts +35 -0
  239. package/dist/layout/breadcrumb.js +67 -0
  240. package/dist/layout/card.d.ts +51 -0
  241. package/dist/layout/card.js +76 -0
  242. package/dist/layout/carousel.d.ts +96 -0
  243. package/dist/layout/carousel.js +211 -0
  244. package/dist/layout/collapsible.d.ts +74 -0
  245. package/dist/layout/collapsible.js +126 -0
  246. package/dist/layout/container.d.ts +27 -0
  247. package/dist/layout/container.js +40 -0
  248. package/dist/layout/description-list.d.ts +24 -0
  249. package/dist/layout/description-list.js +37 -0
  250. package/dist/layout/grid.d.ts +40 -0
  251. package/dist/layout/grid.js +48 -0
  252. package/dist/layout/index.d.ts +15 -0
  253. package/dist/layout/index.js +15 -0
  254. package/dist/layout/item.d.ts +65 -0
  255. package/dist/layout/item.js +100 -0
  256. package/dist/layout/link.d.ts +48 -0
  257. package/dist/layout/link.js +63 -0
  258. package/dist/layout/pagination.d.ts +54 -0
  259. package/dist/layout/pagination.js +121 -0
  260. package/dist/layout/resizable.d.ts +38 -0
  261. package/dist/layout/resizable.js +68 -0
  262. package/dist/layout/sidebar.d.ts +67 -0
  263. package/dist/layout/sidebar.js +129 -0
  264. package/dist/layout/stack.d.ts +46 -0
  265. package/dist/layout/stack.js +62 -0
  266. package/dist/layout/stepper.d.ts +49 -0
  267. package/dist/layout/stepper.js +81 -0
  268. package/dist/layout/timeline.d.ts +43 -0
  269. package/dist/layout/timeline.js +63 -0
  270. package/dist/lib/aria-class.js +24 -0
  271. package/dist/lib/cn.js +18 -0
  272. package/dist/lib/compose.js +38 -0
  273. package/dist/lib/cva.d.ts +18 -0
  274. package/dist/lib/cva.js +65 -0
  275. package/dist/midi/_notes.d.ts +101 -0
  276. package/dist/midi/_notes.js +183 -0
  277. package/dist/midi/_ruler.d.ts +100 -0
  278. package/dist/midi/_ruler.js +105 -0
  279. package/dist/midi/_time.d.ts +107 -0
  280. package/dist/midi/_time.js +130 -0
  281. package/dist/midi/index.d.ts +9 -0
  282. package/dist/midi/index.js +9 -0
  283. package/dist/midi/musical-time-input.d.ts +48 -0
  284. package/dist/midi/musical-time-input.js +154 -0
  285. package/dist/midi/piano-keyboard.d.ts +50 -0
  286. package/dist/midi/piano-keyboard.js +193 -0
  287. package/dist/midi/spectrum-visualizer.d.ts +65 -0
  288. package/dist/midi/spectrum-visualizer.js +213 -0
  289. package/dist/midi/threshold-rail.d.ts +72 -0
  290. package/dist/midi/threshold-rail.js +214 -0
  291. package/dist/midi/timeline-ruler.d.ts +83 -0
  292. package/dist/midi/timeline-ruler.js +152 -0
  293. package/dist/overlays/_debounce.js +34 -0
  294. package/dist/overlays/_glyphs.js +59 -0
  295. package/dist/overlays/_surface.d.ts +70 -0
  296. package/dist/overlays/_surface.js +70 -0
  297. package/dist/overlays/_wheel.js +42 -0
  298. package/dist/overlays/alert-dialog.d.ts +67 -0
  299. package/dist/overlays/alert-dialog.js +117 -0
  300. package/dist/overlays/command-palette.d.ts +93 -0
  301. package/dist/overlays/command-palette.js +193 -0
  302. package/dist/overlays/context-menu.d.ts +64 -0
  303. package/dist/overlays/context-menu.js +78 -0
  304. package/dist/overlays/dialog.d.ts +72 -0
  305. package/dist/overlays/dialog.js +124 -0
  306. package/dist/overlays/drawer.d.ts +75 -0
  307. package/dist/overlays/drawer.js +151 -0
  308. package/dist/overlays/dropdown-menu.d.ts +79 -0
  309. package/dist/overlays/dropdown-menu.js +156 -0
  310. package/dist/overlays/hover-card.d.ts +58 -0
  311. package/dist/overlays/hover-card.js +91 -0
  312. package/dist/overlays/index.d.ts +15 -0
  313. package/dist/overlays/index.js +15 -0
  314. package/dist/overlays/info-tip.d.ts +41 -0
  315. package/dist/overlays/info-tip.js +45 -0
  316. package/dist/overlays/menubar.d.ts +72 -0
  317. package/dist/overlays/menubar.js +100 -0
  318. package/dist/overlays/popover.d.ts +66 -0
  319. package/dist/overlays/popover.js +114 -0
  320. package/dist/overlays/sheet.d.ts +78 -0
  321. package/dist/overlays/sheet.js +131 -0
  322. package/dist/overlays/toast.d.ts +106 -0
  323. package/dist/overlays/toast.js +146 -0
  324. package/dist/overlays/tooltip.d.ts +57 -0
  325. package/dist/overlays/tooltip.js +95 -0
  326. package/dist/primitives/avatar.d.ts +51 -0
  327. package/dist/primitives/avatar.js +93 -0
  328. package/dist/primitives/button.d.ts +46 -0
  329. package/dist/primitives/button.js +94 -0
  330. package/dist/primitives/chip.d.ts +47 -0
  331. package/dist/primitives/chip.js +152 -0
  332. package/dist/primitives/icon-button.d.ts +41 -0
  333. package/dist/primitives/icon-button.js +59 -0
  334. package/dist/primitives/index.d.ts +10 -0
  335. package/dist/primitives/index.js +10 -0
  336. package/dist/primitives/kbd.d.ts +17 -0
  337. package/dist/primitives/kbd.js +24 -0
  338. package/dist/primitives/separator.d.ts +25 -0
  339. package/dist/primitives/separator.js +30 -0
  340. package/dist/primitives/skeleton.d.ts +20 -0
  341. package/dist/primitives/skeleton.js +27 -0
  342. package/dist/primitives/spinner.d.ts +26 -0
  343. package/dist/primitives/spinner.js +31 -0
  344. package/dist/primitives/status-dot.d.ts +44 -0
  345. package/dist/primitives/status-dot.js +50 -0
  346. package/dist/styles.css +19 -0
  347. package/dist/system/density.d.ts +33 -0
  348. package/dist/system/density.js +49 -0
  349. package/dist/system/index.d.ts +8 -0
  350. package/dist/system/index.js +7 -0
  351. package/dist/system/portal.d.ts +51 -0
  352. package/dist/system/portal.js +122 -0
  353. package/dist/system/prepaint.d.ts +38 -0
  354. package/dist/system/prepaint.js +37 -0
  355. package/dist/system/theme-provider.d.ts +72 -0
  356. package/dist/system/theme-provider.js +252 -0
  357. package/dist/system/use-density.d.ts +33 -0
  358. package/dist/system/use-density.js +84 -0
  359. package/dist/system/use-isomorphic-layout-effect.js +15 -0
  360. package/dist/system/use-theme.d.ts +19 -0
  361. package/dist/system/use-theme.js +25 -0
  362. package/dist/theming/_presets.d.ts +11 -0
  363. package/dist/theming/_presets.js +487 -0
  364. package/dist/theming/contrast.d.ts +110 -0
  365. package/dist/theming/contrast.js +167 -0
  366. package/dist/theming/create-theme.d.ts +165 -0
  367. package/dist/theming/create-theme.js +442 -0
  368. package/dist/theming/index.d.ts +5 -0
  369. package/dist/theming/index.js +5 -0
  370. package/dist/theming/serialize.d.ts +145 -0
  371. package/dist/theming/serialize.js +165 -0
  372. package/package.json +216 -0
@@ -0,0 +1,68 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.js";
3
+ import * as React from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Group, Panel, Separator } from "react-resizable-panels";
6
+ //#region src/layout/resizable.tsx
7
+ /**
8
+ * The group's axis, published to the handles.
9
+ *
10
+ * `react-resizable-panels` keeps its orientation in an internal context and
11
+ * stamps no attribute for it, so a `Resizable.Handle` cannot tell from the DOM
12
+ * whether it should be 4px wide or 4px tall. This is that one missing bit.
13
+ */
14
+ const ResizableOrientationContext = React.createContext("horizontal");
15
+ /**
16
+ * Split panes the user can drag, on `react-resizable-panels`.
17
+ *
18
+ * `react-resizable-panels` is an **optional peer**: import this from
19
+ * `@cueplusplus/ui/layout/resizable`, never from the core barrel, so an app
20
+ * with no split view never installs one.
21
+ *
22
+ * @example
23
+ * <Resizable.Group orientation="horizontal">
24
+ * <Resizable.Panel id="tree" defaultSize={25} minSize={15}>…</Resizable.Panel>
25
+ * <Resizable.Handle withGrip />
26
+ * <Resizable.Panel id="editor">…</Resizable.Panel>
27
+ * </Resizable.Group>
28
+ */
29
+ const Resizable = {
30
+ Group: React.forwardRef(function ResizableGroup({ className, orientation = "horizontal", elementRef, children, ...elementProps }, ref) {
31
+ return /* @__PURE__ */ jsx(ResizableOrientationContext.Provider, {
32
+ value: orientation,
33
+ children: /* @__PURE__ */ jsx(Group, {
34
+ elementRef: elementRef ?? ref,
35
+ orientation,
36
+ "data-slot": "resizable-group",
37
+ "data-orientation": orientation,
38
+ className: cn("min-h-0 min-w-0", className),
39
+ ...elementProps,
40
+ children
41
+ })
42
+ });
43
+ }),
44
+ Panel: React.forwardRef(function ResizablePanel({ className, elementRef, ...elementProps }, ref) {
45
+ return /* @__PURE__ */ jsx(Panel, {
46
+ elementRef: elementRef ?? ref,
47
+ "data-slot": "resizable-panel",
48
+ className: cn("min-h-0 min-w-0", className),
49
+ ...elementProps
50
+ });
51
+ }),
52
+ Handle: React.forwardRef(function ResizableHandle({ className, withGrip = false, elementRef, children, ...elementProps }, ref) {
53
+ const orientation = React.useContext(ResizableOrientationContext);
54
+ return /* @__PURE__ */ jsxs(Separator, {
55
+ elementRef: elementRef ?? ref,
56
+ "data-slot": "resizable-handle",
57
+ className: cn("relative flex items-center justify-center bg-border transition-colors duration-150 outline-none data-[separator=hover]:bg-accent data-[separator=active]:bg-accent data-[separator=focus]:bg-accent focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-accent data-[separator=disabled]:opacity-40 motion-reduce:transition-none", orientation === "vertical" ? "h-[0.25rem] w-full" : "w-[0.25rem] self-stretch", className),
58
+ ...elementProps,
59
+ children: [withGrip ? /* @__PURE__ */ jsx("span", {
60
+ "data-slot": "resizable-grip",
61
+ "aria-hidden": "true",
62
+ className: cn("pointer-events-none rounded-full bg-border-strong", orientation === "vertical" ? "h-px w-(--cue-space-6)" : "h-(--cue-space-6) w-px")
63
+ }) : null, children]
64
+ });
65
+ })
66
+ };
67
+ //#endregion
68
+ export { Resizable };
@@ -0,0 +1,67 @@
1
+ import * as React from "react";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ //#region src/layout/sidebar.d.ts
4
+ interface SidebarContextValue {
5
+ collapsed: boolean;
6
+ toggle: () => void;
7
+ }
8
+ /** Read the collapse state of the nearest {@link SidebarRoot}. */
9
+ declare function useSidebar(): SidebarContextValue;
10
+ interface SidebarRootProps extends React.ComponentPropsWithoutRef<"aside"> {
11
+ /** Collapsed state when controlled. Pass with `onCollapsedChange`. */
12
+ collapsed?: boolean;
13
+ /** Initial collapsed state when uncontrolled. Defaults to `false`. */
14
+ defaultCollapsed?: boolean;
15
+ /** Called with the new collapsed state whenever the rail is pressed. */
16
+ onCollapsedChange?: (collapsed: boolean) => void;
17
+ /** Width while expanded. Any CSS length. Defaults to `"14rem"`. */
18
+ width?: string;
19
+ /** Width while collapsed. Any CSS length. Defaults to `"3rem"`. */
20
+ collapsedWidth?: string;
21
+ }
22
+ interface SidebarSectionProps extends React.ComponentPropsWithoutRef<"div"> {
23
+ /**
24
+ * The group caption, in the mono micro idiom. Dropped entirely while the
25
+ * sidebar is collapsed — at rail width a caption has nothing left to caption.
26
+ */
27
+ label?: React.ReactNode;
28
+ }
29
+ interface SidebarItemProps extends React.ComponentPropsWithoutRef<"button"> {
30
+ /** Optional leading icon component (e.g. a lucide icon), drawn `aria-hidden`. */
31
+ icon?: React.ElementType;
32
+ /** Mark this item as the current destination. */
33
+ active?: boolean;
34
+ /** Trailing slot: a count, a status dot. Hidden while collapsed. */
35
+ badge?: React.ReactNode;
36
+ /**
37
+ * Replace the rendered element (Base UI render prop) — normally a router
38
+ * link: `render={<NextLink href="/patch" />}`.
39
+ */
40
+ render?: useRender.RenderProp;
41
+ }
42
+ interface SidebarRailProps extends Omit<React.ComponentPropsWithoutRef<"button">, "children"> {
43
+ /** Accessible name while expanded. Defaults to `"Collapse sidebar"`. */
44
+ collapseLabel?: string;
45
+ /** Accessible name while collapsed. Defaults to `"Expand sidebar"`. */
46
+ expandLabel?: string;
47
+ }
48
+ /**
49
+ * The console's navigation column: sections of items, and a rail that collapses
50
+ * the whole thing to icons.
51
+ *
52
+ * @example
53
+ * <Sidebar.Root defaultCollapsed aria-label="Main">
54
+ * <Sidebar.Section label="Console">
55
+ * <Sidebar.Item render={<NextLink href="/patch" />} active>Patch</Sidebar.Item>
56
+ * </Sidebar.Section>
57
+ * <Sidebar.Rail />
58
+ * </Sidebar.Root>
59
+ */
60
+ declare const Sidebar: {
61
+ Root: React.ForwardRefExoticComponent<SidebarRootProps & React.RefAttributes<HTMLElement>>;
62
+ Section: React.ForwardRefExoticComponent<SidebarSectionProps & React.RefAttributes<HTMLDivElement>>;
63
+ Item: React.ForwardRefExoticComponent<SidebarItemProps & React.RefAttributes<HTMLButtonElement>>;
64
+ Rail: React.ForwardRefExoticComponent<SidebarRailProps & React.RefAttributes<HTMLButtonElement>>;
65
+ };
66
+ //#endregion
67
+ export { Sidebar, SidebarItemProps, SidebarRailProps, SidebarRootProps, SidebarSectionProps, useSidebar };
@@ -0,0 +1,129 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.js";
3
+ import * as React from "react";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { useRender } from "@base-ui/react/use-render";
6
+ //#region src/layout/sidebar.tsx
7
+ /**
8
+ * Collapse state, published to the parts.
9
+ *
10
+ * A `Sidebar.Item` two levels down has to know whether to show its label, and a
11
+ * `Sidebar.Rail` has to know which way it toggles. Context rather than props so
12
+ * a call site can nest sections and items freely without threading a boolean.
13
+ */
14
+ const SidebarContext = React.createContext({
15
+ collapsed: false,
16
+ toggle: () => {}
17
+ });
18
+ /** Read the collapse state of the nearest {@link SidebarRoot}. */
19
+ function useSidebar() {
20
+ return React.useContext(SidebarContext);
21
+ }
22
+ /**
23
+ * The console's navigation column: sections of items, and a rail that collapses
24
+ * the whole thing to icons.
25
+ *
26
+ * @example
27
+ * <Sidebar.Root defaultCollapsed aria-label="Main">
28
+ * <Sidebar.Section label="Console">
29
+ * <Sidebar.Item render={<NextLink href="/patch" />} active>Patch</Sidebar.Item>
30
+ * </Sidebar.Section>
31
+ * <Sidebar.Rail />
32
+ * </Sidebar.Root>
33
+ */
34
+ const Sidebar = {
35
+ Root: React.forwardRef(function SidebarRoot({ className, collapsed: collapsedProp, defaultCollapsed = false, onCollapsedChange, width = "14rem", collapsedWidth = "3rem", style, ...elementProps }, ref) {
36
+ const [uncontrolled, setUncontrolled] = React.useState(defaultCollapsed);
37
+ const collapsed = collapsedProp ?? uncontrolled;
38
+ const toggle = React.useCallback(() => {
39
+ const next = !(collapsedProp ?? uncontrolled);
40
+ if (collapsedProp === void 0) setUncontrolled(next);
41
+ onCollapsedChange?.(next);
42
+ }, [
43
+ collapsedProp,
44
+ uncontrolled,
45
+ onCollapsedChange
46
+ ]);
47
+ const context = React.useMemo(() => ({
48
+ collapsed,
49
+ toggle
50
+ }), [collapsed, toggle]);
51
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, {
52
+ value: context,
53
+ children: /* @__PURE__ */ jsx("aside", {
54
+ ref,
55
+ "data-slot": "sidebar",
56
+ "data-collapsed": collapsed ? "" : void 0,
57
+ className: cn("group/sidebar relative flex h-full shrink-0 flex-col gap-(--cue-space-4) border-r border-border bg-surface-1 py-(--cue-space-4) transition-[width] duration-150 ease-out motion-reduce:transition-none", className),
58
+ style: {
59
+ width: collapsed ? collapsedWidth : width,
60
+ ...style
61
+ },
62
+ ...elementProps
63
+ })
64
+ });
65
+ }),
66
+ Section: React.forwardRef(function SidebarSection({ className, label, children, ...elementProps }, ref) {
67
+ const { collapsed } = useSidebar();
68
+ return /* @__PURE__ */ jsxs("div", {
69
+ ref,
70
+ "data-slot": "sidebar-section",
71
+ className: cn("flex flex-col gap-(--cue-space-1) px-(--cue-space-2)", className),
72
+ ...elementProps,
73
+ children: [label === void 0 || collapsed ? null : /* @__PURE__ */ jsx("div", {
74
+ "data-slot": "sidebar-section-label",
75
+ className: "flex h-control-sm items-center px-(--cue-space-2) font-mono text-(length:--cue-text-label) tracking-[0.15em] text-fg-subtle uppercase",
76
+ children: label
77
+ }), children]
78
+ });
79
+ }),
80
+ Item: React.forwardRef(function SidebarItem({ className, icon: Icon, active = false, badge, render, type, children, ...elementProps }, ref) {
81
+ return useRender({
82
+ render,
83
+ ref,
84
+ defaultTagName: "button",
85
+ props: {
86
+ ...render === void 0 ? { type: type ?? "button" } : type === void 0 ? {} : { type },
87
+ ...elementProps,
88
+ "data-slot": "sidebar-item",
89
+ "data-active": active ? "" : void 0,
90
+ "aria-current": active ? "page" : void 0,
91
+ className: cn("flex h-control-md w-full cursor-pointer items-center gap-(--cue-space-3) rounded-(--radius-control) border-0 bg-transparent px-(--cue-space-3) text-left font-mono text-(length:--cue-text-ui) text-fg-muted no-underline transition-colors duration-150 outline-none select-none hover:bg-surface-2 hover:text-fg focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-1 focus-visible:outline-accent data-[active]:bg-accent-soft data-[active]:text-accent disabled:pointer-events-none disabled:opacity-40", className),
92
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
93
+ Icon === void 0 ? null : /* @__PURE__ */ jsx(Icon, {
94
+ "aria-hidden": "true",
95
+ className: "size-icon-md shrink-0"
96
+ }),
97
+ /* @__PURE__ */ jsx("span", {
98
+ "data-slot": "sidebar-item-label",
99
+ className: "min-w-0 flex-1 truncate group-data-[collapsed]/sidebar:sr-only",
100
+ children
101
+ }),
102
+ badge === void 0 ? null : /* @__PURE__ */ jsx("span", {
103
+ "data-slot": "sidebar-item-badge",
104
+ className: "shrink-0 group-data-[collapsed]/sidebar:hidden",
105
+ children: badge
106
+ })
107
+ ] })
108
+ }
109
+ });
110
+ }),
111
+ Rail: React.forwardRef(function SidebarRail({ className, collapseLabel = "Collapse sidebar", expandLabel = "Expand sidebar", onClick, ...elementProps }, ref) {
112
+ const { collapsed, toggle } = useSidebar();
113
+ return /* @__PURE__ */ jsx("button", {
114
+ ref,
115
+ type: "button",
116
+ "data-slot": "sidebar-rail",
117
+ "aria-label": collapsed ? expandLabel : collapseLabel,
118
+ "aria-expanded": !collapsed,
119
+ onClick: (event) => {
120
+ onClick?.(event);
121
+ if (!event.defaultPrevented) toggle();
122
+ },
123
+ className: cn("absolute inset-y-0 right-0 w-[0.25rem] translate-x-1/2 cursor-ew-resize border-0 bg-transparent p-0 transition-colors duration-150 outline-none hover:bg-accent focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-accent motion-reduce:transition-none", className),
124
+ ...elementProps
125
+ });
126
+ })
127
+ };
128
+ //#endregion
129
+ export { Sidebar, useSidebar };
@@ -0,0 +1,46 @@
1
+ import * as React from "react";
2
+ //#region src/layout/stack.d.ts
3
+ /**
4
+ * A rung of the density space ladder, or `0` for no gap at all.
5
+ *
6
+ * The prop is a number rather than a class string so a layout can never spend a
7
+ * gap this system does not own: there is no `gap-[13px]` to reach for.
8
+ */
9
+ type SpaceStep = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
10
+ /** Cross-axis alignment. */
11
+ type StackAlign = "start" | "center" | "end" | "stretch" | "baseline";
12
+ /** Main-axis distribution. */
13
+ type StackJustify = "start" | "center" | "end" | "between";
14
+ interface StackProps extends React.ComponentPropsWithoutRef<"div"> {
15
+ /** `"column"` (default) or `"row"`. */
16
+ direction?: "row" | "column";
17
+ /** Which rung of the density space ladder to spend between children. Defaults to `4`. */
18
+ gap?: SpaceStep;
19
+ /** Cross-axis alignment. Omit to inherit the flex default (`stretch`). */
20
+ align?: StackAlign;
21
+ /** Main-axis distribution. Omit to inherit the flex default (`start`). */
22
+ justify?: StackJustify;
23
+ /** Let a row wrap onto more lines. */
24
+ wrap?: boolean;
25
+ /** Lay out as `inline-flex`, so the stack sits in a line of text. */
26
+ inline?: boolean;
27
+ }
28
+ /**
29
+ * One-dimensional layout: the flex row or column, with the gap tokenised.
30
+ *
31
+ * Exists so that spacing between siblings is a density decision rather than a
32
+ * per-call-site guess. A `Stack gap={4}` is 8px at normal density and 6px at
33
+ * ultra-compact without touching the markup, which is the whole point of the
34
+ * density system — and something `flex gap-2` written by hand quietly opts out
35
+ * of.
36
+ *
37
+ * Static markup — no `"use client"`.
38
+ *
39
+ * @example
40
+ * <Stack gap={5}><Panel /><Panel /></Stack>
41
+ * @example
42
+ * <Stack direction="row" gap={2} align="center"><StatusDot tone="ok" />Online</Stack>
43
+ */
44
+ declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
45
+ //#endregion
46
+ export { SpaceStep, Stack, StackAlign, StackJustify, StackProps };
@@ -0,0 +1,62 @@
1
+ import { cn } from "../lib/cn.js";
2
+ import * as React from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/layout/stack.tsx
5
+ /**
6
+ * Static class per rung — Tailwind scans source text, so a computed
7
+ * `gap-(--cue-space-${n})` would never be generated.
8
+ *
9
+ * @internal Shared with `grid.tsx`.
10
+ */
11
+ const GAP_CLASSES = {
12
+ 0: "",
13
+ 1: "gap-(--cue-space-1)",
14
+ 2: "gap-(--cue-space-2)",
15
+ 3: "gap-(--cue-space-3)",
16
+ 4: "gap-(--cue-space-4)",
17
+ 5: "gap-(--cue-space-5)",
18
+ 6: "gap-(--cue-space-6)",
19
+ 7: "gap-(--cue-space-7)",
20
+ 8: "gap-(--cue-space-8)"
21
+ };
22
+ /** @internal Shared with `grid.tsx`. */
23
+ const ALIGN_CLASSES = {
24
+ start: "items-start",
25
+ center: "items-center",
26
+ end: "items-end",
27
+ stretch: "items-stretch",
28
+ baseline: "items-baseline"
29
+ };
30
+ /** @internal Shared with `grid.tsx`. */
31
+ const JUSTIFY_CLASSES = {
32
+ start: "justify-start",
33
+ center: "justify-center",
34
+ end: "justify-end",
35
+ between: "justify-between"
36
+ };
37
+ /**
38
+ * One-dimensional layout: the flex row or column, with the gap tokenised.
39
+ *
40
+ * Exists so that spacing between siblings is a density decision rather than a
41
+ * per-call-site guess. A `Stack gap={4}` is 8px at normal density and 6px at
42
+ * ultra-compact without touching the markup, which is the whole point of the
43
+ * density system — and something `flex gap-2` written by hand quietly opts out
44
+ * of.
45
+ *
46
+ * Static markup — no `"use client"`.
47
+ *
48
+ * @example
49
+ * <Stack gap={5}><Panel /><Panel /></Stack>
50
+ * @example
51
+ * <Stack direction="row" gap={2} align="center"><StatusDot tone="ok" />Online</Stack>
52
+ */
53
+ const Stack = React.forwardRef(function Stack({ className, direction = "column", gap = 4, align, justify, wrap = false, inline = false, ...elementProps }, ref) {
54
+ return /* @__PURE__ */ jsx("div", {
55
+ ref,
56
+ "data-slot": "stack",
57
+ className: cn(inline ? "inline-flex" : "flex", direction === "row" ? "flex-row" : "flex-col", GAP_CLASSES[gap], align === void 0 ? null : ALIGN_CLASSES[align], justify === void 0 ? null : JUSTIFY_CLASSES[justify], wrap ? "flex-wrap" : null, className),
58
+ ...elementProps
59
+ });
60
+ });
61
+ //#endregion
62
+ export { ALIGN_CLASSES, GAP_CLASSES, JUSTIFY_CLASSES, Stack };
@@ -0,0 +1,49 @@
1
+ import * as React from "react";
2
+ //#region src/layout/stepper.d.ts
3
+ /** One step of a {@link Stepper}. */
4
+ interface StepperStep {
5
+ /** Stable identity, matched against `current`. */
6
+ id: string;
7
+ /** What the step says. Keep it to one or two words — this is a trail, not a list. */
8
+ label: React.ReactNode;
9
+ }
10
+ /** Where a step sits relative to the current one. */
11
+ type StepperState = "complete" | "current" | "upcoming";
12
+ interface StepperProps extends Omit<React.ComponentPropsWithoutRef<"nav">, "children" | "onChange"> {
13
+ /** The steps, in order. */
14
+ steps: readonly StepperStep[];
15
+ /** The `id` of the step in progress. An unknown id leaves every step upcoming. */
16
+ current: string;
17
+ /**
18
+ * Called with the `id` of a step the user asked to go back to. Passing it
19
+ * turns the finished steps into buttons; leaving it off keeps the trail
20
+ * static, which is the honest rendering when the earlier steps cannot be
21
+ * revisited.
22
+ */
23
+ onStepChange?: (id: string) => void;
24
+ /** What sits between steps. Defaults to `"·"`. */
25
+ separator?: React.ReactNode;
26
+ /** The nav's accessible name. Defaults to `"Progress"`. */
27
+ label?: string;
28
+ }
29
+ /**
30
+ * The step trail: `1 target · 2 preview · 3 apply`.
31
+ *
32
+ * Deliberately a line of mono text rather than the usual row of numbered discs
33
+ * joined by rules. A stepper drawn as circles-and-lines is 60px tall and says
34
+ * exactly as much as one line of 9px type — and in a console that vertical
35
+ * space belongs to the thing being configured, not to the wizard chrome around
36
+ * it. Only the numbers carry the accent, so the trail reads as one sentence
37
+ * with the position marked, which is what a progress indicator is for.
38
+ *
39
+ * Forward steps are never buttons: a step you have not reached is not a place
40
+ * you can go, and offering it as a control is a promise the flow cannot keep.
41
+ *
42
+ * @example
43
+ * <Stepper steps={[{ id: "target", label: "target" }, { id: "preview", label: "preview" }]} current="preview" />
44
+ * @example
45
+ * <Stepper steps={steps} current={step} onStepChange={setStep} />
46
+ */
47
+ declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLElement>>;
48
+ //#endregion
49
+ export { Stepper, StepperProps, StepperState, StepperStep };
@@ -0,0 +1,81 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.js";
3
+ import * as React from "react";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/layout/stepper.tsx
6
+ /** Ink per state: done recedes, now is full strength, later is barely there. */
7
+ const STEP_TONES = {
8
+ complete: "text-fg-muted",
9
+ current: "text-fg",
10
+ upcoming: "text-fg-subtle"
11
+ };
12
+ /** The number carries the accent for everything you have reached. */
13
+ const INDEX_TONES = {
14
+ complete: "text-accent",
15
+ current: "text-accent",
16
+ upcoming: "text-fg-subtle"
17
+ };
18
+ const STEP_BUTTON_CLASSES = "inline-flex cursor-pointer items-center gap-(--cue-space-2) rounded-(--radius-control) border-0 bg-transparent p-0 font-mono text-[length:inherit] tracking-[inherit] text-inherit uppercase transition-colors duration-150 outline-none hover:text-fg focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2 focus-visible:outline-accent";
19
+ /**
20
+ * The step trail: `1 target · 2 preview · 3 apply`.
21
+ *
22
+ * Deliberately a line of mono text rather than the usual row of numbered discs
23
+ * joined by rules. A stepper drawn as circles-and-lines is 60px tall and says
24
+ * exactly as much as one line of 9px type — and in a console that vertical
25
+ * space belongs to the thing being configured, not to the wizard chrome around
26
+ * it. Only the numbers carry the accent, so the trail reads as one sentence
27
+ * with the position marked, which is what a progress indicator is for.
28
+ *
29
+ * Forward steps are never buttons: a step you have not reached is not a place
30
+ * you can go, and offering it as a control is a promise the flow cannot keep.
31
+ *
32
+ * @example
33
+ * <Stepper steps={[{ id: "target", label: "target" }, { id: "preview", label: "preview" }]} current="preview" />
34
+ * @example
35
+ * <Stepper steps={steps} current={step} onStepChange={setStep} />
36
+ */
37
+ const Stepper = React.forwardRef(function Stepper({ className, steps, current, onStepChange, separator = "·", label = "Progress", ...elementProps }, ref) {
38
+ const currentIndex = steps.findIndex((step) => step.id === current);
39
+ return /* @__PURE__ */ jsx("nav", {
40
+ ref,
41
+ "data-slot": "stepper",
42
+ "aria-label": label,
43
+ className: cn("min-w-0", className),
44
+ ...elementProps,
45
+ children: /* @__PURE__ */ jsx("ol", {
46
+ className: "m-0 flex list-none flex-wrap items-center gap-(--cue-space-3) p-0 font-mono text-(length:--cue-text-label) tracking-[0.1em] uppercase",
47
+ children: steps.map((step, index) => {
48
+ const state = currentIndex === -1 || index > currentIndex ? "upcoming" : index === currentIndex ? "current" : "complete";
49
+ const navigable = onStepChange !== void 0 && state === "complete";
50
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
51
+ "data-slot": "stepper-index",
52
+ className: cn("tabular-nums", INDEX_TONES[state]),
53
+ children: index + 1
54
+ }), /* @__PURE__ */ jsx("span", {
55
+ "data-slot": "stepper-label",
56
+ className: "truncate",
57
+ children: step.label
58
+ })] });
59
+ return /* @__PURE__ */ jsxs(React.Fragment, { children: [index === 0 ? null : /* @__PURE__ */ jsx("li", {
60
+ "data-slot": "stepper-separator",
61
+ "aria-hidden": "true",
62
+ className: "text-fg-subtle select-none",
63
+ children: separator
64
+ }), /* @__PURE__ */ jsx("li", {
65
+ "data-slot": "stepper-step",
66
+ "data-state": state,
67
+ "aria-current": state === "current" ? "step" : void 0,
68
+ className: cn("inline-flex min-w-0 items-center gap-(--cue-space-2)", STEP_TONES[state]),
69
+ children: navigable ? /* @__PURE__ */ jsx("button", {
70
+ type: "button",
71
+ onClick: () => onStepChange(step.id),
72
+ className: STEP_BUTTON_CLASSES,
73
+ children: body
74
+ }) : body
75
+ })] }, step.id);
76
+ })
77
+ })
78
+ });
79
+ });
80
+ //#endregion
81
+ export { Stepper };
@@ -0,0 +1,43 @@
1
+ import { StatusTone } from "../primitives/status-dot.js";
2
+ import * as React from "react";
3
+ //#region src/layout/timeline.d.ts
4
+ /** Props for {@link TimelineRoot}: the native `<ol>` surface plus `className`. */
5
+ type TimelineRootProps = React.ComponentPropsWithoutRef<"ol">;
6
+ /** Props for {@link TimelineItem}: the native `<li>` surface plus `className`. */
7
+ type TimelineItemProps = React.ComponentPropsWithoutRef<"li">;
8
+ interface TimelineMarkerProps extends Omit<React.ComponentPropsWithoutRef<"span">, "children"> {
9
+ /** Which state this event is in. The shared `StatusDot` vocabulary. */
10
+ tone: StatusTone;
11
+ /** Screen-reader text for the dot. Defaults to the tone name. */
12
+ label?: string;
13
+ /** Pulse the dot for an event still in progress. */
14
+ pulse?: boolean;
15
+ }
16
+ /** Props for {@link TimelineContent}: the native `<div>` surface plus `className`. */
17
+ type TimelineContentProps = React.ComponentPropsWithoutRef<"div">;
18
+ /**
19
+ * A vertical run of events on one rail: a run log, a cue history, a deploy
20
+ * trail.
21
+ *
22
+ * Static markup — no `"use client"`.
23
+ *
24
+ * @example
25
+ * <Timeline.Root>
26
+ * <Timeline.Item>
27
+ * <Timeline.Marker tone="ok" label="Patched" />
28
+ * <Timeline.Content>Patched universe 1</Timeline.Content>
29
+ * </Timeline.Item>
30
+ * <Timeline.Item>
31
+ * <Timeline.Marker tone="busy" label="Focusing" pulse />
32
+ * <Timeline.Content>Focusing front truss</Timeline.Content>
33
+ * </Timeline.Item>
34
+ * </Timeline.Root>
35
+ */
36
+ declare const Timeline: {
37
+ Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
38
+ Item: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
39
+ Marker: React.ForwardRefExoticComponent<TimelineMarkerProps & React.RefAttributes<HTMLSpanElement>>;
40
+ Content: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
41
+ };
42
+ //#endregion
43
+ export { Timeline, TimelineContentProps, TimelineItemProps, TimelineMarkerProps, TimelineRootProps };
@@ -0,0 +1,63 @@
1
+ import { cn } from "../lib/cn.js";
2
+ import { StatusDot } from "../primitives/status-dot.js";
3
+ import * as React from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ /**
6
+ * A vertical run of events on one rail: a run log, a cue history, a deploy
7
+ * trail.
8
+ *
9
+ * Static markup — no `"use client"`.
10
+ *
11
+ * @example
12
+ * <Timeline.Root>
13
+ * <Timeline.Item>
14
+ * <Timeline.Marker tone="ok" label="Patched" />
15
+ * <Timeline.Content>Patched universe 1</Timeline.Content>
16
+ * </Timeline.Item>
17
+ * <Timeline.Item>
18
+ * <Timeline.Marker tone="busy" label="Focusing" pulse />
19
+ * <Timeline.Content>Focusing front truss</Timeline.Content>
20
+ * </Timeline.Item>
21
+ * </Timeline.Root>
22
+ */
23
+ const Timeline = {
24
+ Root: React.forwardRef(function TimelineRoot({ className, ...elementProps }, ref) {
25
+ return /* @__PURE__ */ jsx("ol", {
26
+ ref,
27
+ "data-slot": "timeline",
28
+ className: cn("m-0 flex list-none flex-col p-0", className),
29
+ ...elementProps
30
+ });
31
+ }),
32
+ Item: React.forwardRef(function TimelineItem({ className, ...elementProps }, ref) {
33
+ return /* @__PURE__ */ jsx("li", {
34
+ ref,
35
+ "data-slot": "timeline-item",
36
+ className: cn("relative flex gap-(--cue-space-4) pb-(--cue-space-5) last:pb-0", "before:absolute before:top-(--cue-icon-sm) before:bottom-0 before:left-[calc(var(--cue-icon-sm)/2)] before:w-px before:-translate-x-1/2 before:bg-border before:content-[''] last:before:hidden", className),
37
+ ...elementProps
38
+ });
39
+ }),
40
+ Marker: React.forwardRef(function TimelineMarker({ className, tone, label, pulse, ...elementProps }, ref) {
41
+ return /* @__PURE__ */ jsx("span", {
42
+ ref,
43
+ "data-slot": "timeline-marker",
44
+ className: cn("relative z-10 flex size-icon-sm shrink-0 items-center justify-center rounded-full bg-bg", className),
45
+ ...elementProps,
46
+ children: /* @__PURE__ */ jsx(StatusDot, {
47
+ tone,
48
+ label,
49
+ pulse
50
+ })
51
+ });
52
+ }),
53
+ Content: React.forwardRef(function TimelineContent({ className, ...elementProps }, ref) {
54
+ return /* @__PURE__ */ jsx("div", {
55
+ ref,
56
+ "data-slot": "timeline-content",
57
+ className: cn("flex min-w-0 flex-1 flex-col gap-(--cue-space-1) font-mono text-(length:--cue-text-ui) text-fg", className),
58
+ ...elementProps
59
+ });
60
+ })
61
+ };
62
+ //#endregion
63
+ export { Timeline };
@@ -0,0 +1,24 @@
1
+ import { cn } from "./cn.js";
2
+ //#region src/lib/aria-class.ts
3
+ /**
4
+ * Bridge a React Aria `className` — string *or* render prop — through `cn`.
5
+ *
6
+ * Every other component in this system merges the caller's `className` over the
7
+ * recipe with `cn`, which is what makes `className` a real override instead of
8
+ * a specificity fight. React Aria's render-prop form breaks that: the value is
9
+ * a function, so there is nothing to merge until it is called. This wraps the
10
+ * function instead, deferring the merge to render time and keeping the same
11
+ * last-one-wins contract on both shapes.
12
+ *
13
+ * @param base - The component's own recipe.
14
+ * @param className - Whatever the caller passed, if anything.
15
+ * @returns A string when both sides are strings, otherwise a render prop.
16
+ * @example
17
+ * <RACColorArea className={ariaClassName(colorAreaClasses, className)} />
18
+ */
19
+ function ariaClassName(base, className) {
20
+ if (typeof className === "function") return (values) => cn(base, className(values));
21
+ return cn(base, className);
22
+ }
23
+ //#endregion
24
+ export { ariaClassName };
package/dist/lib/cn.js ADDED
@@ -0,0 +1,18 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ //#region src/lib/cn.ts
4
+ /**
5
+ * Join class names and resolve conflicting Tailwind utilities, last one wins.
6
+ *
7
+ * Every component in the system funnels its computed classes plus the caller's
8
+ * `className` through `cn`, which is what makes `className` a real override
9
+ * instead of a fight with specificity.
10
+ *
11
+ * @param inputs - Any clsx-compatible values (strings, arrays, condition maps).
12
+ * @returns The merged, de-conflicted class string.
13
+ * @example
14
+ * cn("h-4 px-2", isLarge && "h-8") // "px-2 h-8" when isLarge
15
+ */
16
+ const cn = (...inputs) => twMerge(clsx(inputs));
17
+ //#endregion
18
+ export { cn };