@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,121 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.js";
3
+ import { useCuePortalProps } from "../system/portal.js";
4
+ import { overlayPopupTransitionClasses, overlayPositionerClasses, overlaySurfaceClasses } from "../overlays/_surface.js";
5
+ import { CaretDownGlyph } from "./_glyphs.js";
6
+ import * as React from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { NavigationMenu } from "@base-ui/react/navigation-menu";
9
+ /**
10
+ * The marketing-shaped navigation header: a strip of words, each opening a panel
11
+ * of destinations.
12
+ *
13
+ * Wraps Base UI's `NavigationMenu`, which is the right primitive because a
14
+ * navigation menu is *not* a menu: its rows are links, not commands, so it must
15
+ * not take `role="menu"` (which tells a screen reader to expect commands and
16
+ * swallows the browser's own link affordances). Hover intent, the shared
17
+ * resizing popup, focus handling and the landmark are all the primitive's.
18
+ *
19
+ * Reach for {@link Menubar} when the entries run commands, `Tabs` when they
20
+ * switch a panel in place, and `Sidebar` when the console has more than about
21
+ * six destinations.
22
+ *
23
+ * @example
24
+ * <NavigationMenu.Root aria-label="Console">
25
+ * <NavigationMenu.List>
26
+ * <NavigationMenu.Item>
27
+ * <NavigationMenu.Trigger>Patch</NavigationMenu.Trigger>
28
+ * <NavigationMenu.Content>
29
+ * <NavigationMenu.Link href="/patch/fixtures" description="Everything addressed">
30
+ * Fixtures
31
+ * </NavigationMenu.Link>
32
+ * </NavigationMenu.Content>
33
+ * </NavigationMenu.Item>
34
+ * </NavigationMenu.List>
35
+ * <NavigationMenu.Viewport />
36
+ * </NavigationMenu.Root>
37
+ */
38
+ const NavigationMenu$1 = {
39
+ Root: React.forwardRef(function NavigationMenuRoot({ className, ...elementProps }, ref) {
40
+ return /* @__PURE__ */ jsx(NavigationMenu.Root, {
41
+ ref,
42
+ "data-slot": "navigation-menu",
43
+ className: cn("relative", className),
44
+ ...elementProps
45
+ });
46
+ }),
47
+ List: React.forwardRef(function NavigationMenuList({ className, ...elementProps }, ref) {
48
+ return /* @__PURE__ */ jsx(NavigationMenu.List, {
49
+ ref,
50
+ "data-slot": "navigation-menu-list",
51
+ className: cn("flex items-center gap-(--cue-space-1)", className),
52
+ ...elementProps
53
+ });
54
+ }),
55
+ Item: React.forwardRef(function NavigationMenuItem({ className, ...elementProps }, ref) {
56
+ return /* @__PURE__ */ jsx(NavigationMenu.Item, {
57
+ ref,
58
+ "data-slot": "navigation-menu-item",
59
+ className: cn(className),
60
+ ...elementProps
61
+ });
62
+ }),
63
+ Trigger: React.forwardRef(function NavigationMenuTrigger({ className, caret = true, children, ...elementProps }, ref) {
64
+ return /* @__PURE__ */ jsxs(NavigationMenu.Trigger, {
65
+ ref,
66
+ "data-slot": "navigation-menu-trigger",
67
+ className: cn("inline-flex h-control-md cursor-default items-center gap-(--cue-space-2) rounded-(--radius-control) px-(--cue-space-3) font-mono text-(length:--cue-text-ui) whitespace-nowrap text-fg-muted no-underline transition-colors duration-150 outline-none select-none hover:text-fg focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-1 focus-visible:outline-accent data-[popup-open]:bg-accent-soft data-[popup-open]:text-fg", className),
68
+ ...elementProps,
69
+ children: [children, caret ? /* @__PURE__ */ jsx(NavigationMenu.Icon, {
70
+ className: "flex items-center transition-transform duration-150 data-[popup-open]:rotate-180 motion-reduce:transition-none",
71
+ children: /* @__PURE__ */ jsx(CaretDownGlyph, { className: "size-icon-sm text-fg-subtle" })
72
+ }) : null]
73
+ });
74
+ }),
75
+ Content: React.forwardRef(function NavigationMenuContent({ className, ...elementProps }, ref) {
76
+ return /* @__PURE__ */ jsx(NavigationMenu.Content, {
77
+ ref,
78
+ "data-slot": "navigation-menu-content",
79
+ className: cn("flex w-[min(20rem,calc(100vw-2rem))] flex-col gap-(--cue-space-1) p-(--cue-space-2)", className),
80
+ ...elementProps
81
+ });
82
+ }),
83
+ Link: React.forwardRef(function NavigationMenuLink({ className, description, active, children, ...elementProps }, ref) {
84
+ return /* @__PURE__ */ jsxs(NavigationMenu.Link, {
85
+ ref,
86
+ "data-slot": "navigation-menu-link",
87
+ "data-active": active === true ? "" : void 0,
88
+ "aria-current": active === true ? "page" : void 0,
89
+ className: cn("flex cursor-pointer flex-col gap-(--cue-space-1) rounded-(--radius-control) px-(--cue-space-3) py-(--cue-space-2) font-mono text-(length:--cue-text-ui) text-fg-muted no-underline transition-colors duration-150 outline-none select-none hover:bg-surface-3 hover:text-fg focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-1 focus-visible:outline-accent data-[active]:text-accent", className),
90
+ ...elementProps,
91
+ children: [/* @__PURE__ */ jsx("span", { children }), description === void 0 ? null : /* @__PURE__ */ jsx("span", {
92
+ className: "text-(length:--cue-text-label) leading-relaxed text-fg-subtle",
93
+ children: description
94
+ })]
95
+ });
96
+ }),
97
+ Viewport: React.forwardRef(function NavigationMenuViewport({ className, positionerClassName, sideOffset = 4, align = "start", ...popupProps }, ref) {
98
+ const portalProps = useCuePortalProps();
99
+ return /* @__PURE__ */ jsx(NavigationMenu.Portal, {
100
+ ...portalProps,
101
+ children: /* @__PURE__ */ jsx(NavigationMenu.Positioner, {
102
+ className: cn(overlayPositionerClasses, "h-(--positioner-height) w-(--positioner-width) max-w-(--available-width)", positionerClassName),
103
+ side: "bottom",
104
+ align,
105
+ sideOffset,
106
+ children: /* @__PURE__ */ jsx(NavigationMenu.Popup, {
107
+ ref,
108
+ "data-slot": "navigation-menu-popup",
109
+ className: cn(overlaySurfaceClasses, overlayPopupTransitionClasses, "relative h-(--popup-height) w-(--popup-width) overflow-hidden outline-none", className),
110
+ ...popupProps,
111
+ children: /* @__PURE__ */ jsx(NavigationMenu.Viewport, {
112
+ "data-slot": "navigation-menu-viewport",
113
+ className: "relative h-full w-full overflow-hidden"
114
+ })
115
+ })
116
+ })
117
+ });
118
+ })
119
+ };
120
+ //#endregion
121
+ export { NavigationMenu$1 as NavigationMenu };
@@ -0,0 +1,38 @@
1
+ import * as React from "react";
2
+ //#region src/chrome/page-shell.d.ts
3
+ /** How wide the content column is allowed to get. */
4
+ type PageWidth = "narrow" | "wide";
5
+ interface PageShellProps extends Omit<React.ComponentPropsWithoutRef<"div">, "title"> {
6
+ /** Which measure the content column takes. Defaults to `"narrow"`. */
7
+ width?: PageWidth;
8
+ /** The page heading. Rendered as the `<h1>`. */
9
+ title?: React.ReactNode;
10
+ /** One supporting line under the title. */
11
+ subtitle?: React.ReactNode;
12
+ /** Accent kicker above the title — normally an `<Eyebrow>`. */
13
+ eyebrow?: React.ReactNode;
14
+ /** Page-level actions, aligned with the title. */
15
+ actions?: React.ReactNode;
16
+ /** The page body. */
17
+ children?: React.ReactNode;
18
+ }
19
+ /**
20
+ * A centred content column with a standard page header.
21
+ *
22
+ * The header is emitted only when something fills it, so a shell used purely
23
+ * for its measure adds no empty box and no stray vertical rhythm.
24
+ *
25
+ * Renders a plain `<div>` rather than a `<main>`: a page can hold more than one
26
+ * shell (a split view), and only one element per document may be `<main>`. Wrap
27
+ * it yourself where the semantics apply.
28
+ *
29
+ * Static markup — no `"use client"`.
30
+ *
31
+ * @example
32
+ * <PageShell title="Patch" subtitle="512 channels" eyebrow={<Eyebrow>Console</Eyebrow>}>
33
+ * <Panel>…</Panel>
34
+ * </PageShell>
35
+ */
36
+ declare const PageShell: React.ForwardRefExoticComponent<PageShellProps & React.RefAttributes<HTMLDivElement>>;
37
+ //#endregion
38
+ export { PageShell, PageShellProps, PageWidth };
@@ -0,0 +1,66 @@
1
+ import { cn } from "../lib/cn.js";
2
+ import * as React from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ //#region src/chrome/page-shell.tsx
5
+ /**
6
+ * Two measures, not a scale. `narrow` (42rem) is a reading column — settings,
7
+ * forms, prose. `wide` (54rem) is a working column — tables and panel grids.
8
+ * Anything that wants the full viewport is not a page shell; it is a console
9
+ * layout and should own its own frame.
10
+ */
11
+ const WIDTHS = {
12
+ narrow: "max-w-[42rem]",
13
+ wide: "max-w-[54rem]"
14
+ };
15
+ /**
16
+ * A centred content column with a standard page header.
17
+ *
18
+ * The header is emitted only when something fills it, so a shell used purely
19
+ * for its measure adds no empty box and no stray vertical rhythm.
20
+ *
21
+ * Renders a plain `<div>` rather than a `<main>`: a page can hold more than one
22
+ * shell (a split view), and only one element per document may be `<main>`. Wrap
23
+ * it yourself where the semantics apply.
24
+ *
25
+ * Static markup — no `"use client"`.
26
+ *
27
+ * @example
28
+ * <PageShell title="Patch" subtitle="512 channels" eyebrow={<Eyebrow>Console</Eyebrow>}>
29
+ * <Panel>…</Panel>
30
+ * </PageShell>
31
+ */
32
+ const PageShell = React.forwardRef(function PageShell({ className, width = "narrow", title, subtitle, eyebrow, actions, children, ...elementProps }, ref) {
33
+ const hasHeader = title !== void 0 || subtitle !== void 0 || eyebrow !== void 0 || actions !== void 0;
34
+ return /* @__PURE__ */ jsxs("div", {
35
+ ref,
36
+ "data-slot": "page-shell",
37
+ className: cn("mx-auto flex w-full flex-col gap-(--cue-space-6) px-(--cue-space-6) py-(--cue-space-7)", WIDTHS[width], className),
38
+ ...elementProps,
39
+ children: [hasHeader ? /* @__PURE__ */ jsxs("header", {
40
+ "data-slot": "page-shell-header",
41
+ className: "flex items-start justify-between gap-(--cue-space-4)",
42
+ children: [/* @__PURE__ */ jsxs("div", {
43
+ className: "flex min-w-0 flex-col gap-(--cue-space-2)",
44
+ children: [
45
+ eyebrow,
46
+ title === void 0 ? null : /* @__PURE__ */ jsx("h1", {
47
+ "data-slot": "page-shell-title",
48
+ className: "font-mono text-(length:--cue-text-title) font-medium text-fg",
49
+ children: title
50
+ }),
51
+ subtitle === void 0 ? null : /* @__PURE__ */ jsx("p", {
52
+ "data-slot": "page-shell-subtitle",
53
+ className: "font-mono text-(length:--cue-text-ui) leading-relaxed text-fg-muted",
54
+ children: subtitle
55
+ })
56
+ ]
57
+ }), actions === void 0 ? null : /* @__PURE__ */ jsx("div", {
58
+ "data-slot": "page-shell-actions",
59
+ className: "flex shrink-0 items-center gap-(--cue-space-2)",
60
+ children: actions
61
+ })]
62
+ }) : null, children]
63
+ });
64
+ });
65
+ //#endregion
66
+ export { PageShell };
@@ -0,0 +1,55 @@
1
+ import * as React from "react";
2
+ //#region src/chrome/panel.d.ts
3
+ /** Props for {@link Panel}: the native `<div>` surface plus `className`. */
4
+ type PanelProps = React.ComponentPropsWithoutRef<"div">;
5
+ /**
6
+ * The universal container: one hairline rim, one raised surface, one radius.
7
+ *
8
+ * Everything in a console lives in a panel — a cue list, a patch table, a
9
+ * settings group — so the shape is defined once here rather than re-typed as
10
+ * four utilities at every call site. `overflow-hidden` is part of the recipe,
11
+ * not an extra: it clips the first and last `Row`'s square edges back to the
12
+ * panel's radius, which is what makes a stack of hairline rows read as one
13
+ * object.
14
+ *
15
+ * Deliberately flat: no shadow. In this system only a floating surface (a
16
+ * dialog, a menu, a toast) is allowed one — see `overlays/_surface.ts`.
17
+ *
18
+ * Static markup — no `"use client"`.
19
+ *
20
+ * @example
21
+ * <Panel>
22
+ * <PanelHeader title="Cue stack" actions={<IconButton aria-label="Add" icon={Plus} />} />
23
+ * <Row>Cue 1</Row>
24
+ * <Row>Cue 2</Row>
25
+ * </Panel>
26
+ */
27
+ declare const Panel: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
28
+ interface PanelHeaderProps extends Omit<React.ComponentPropsWithoutRef<"div">, "title"> {
29
+ /**
30
+ * The header's label. Rendered one type rung above body text — the panel's
31
+ * own name, not a page heading.
32
+ */
33
+ title?: React.ReactNode;
34
+ /**
35
+ * Right-hand slot: the controls that act on the whole panel (a menu, a
36
+ * refresh button, a count chip).
37
+ */
38
+ actions?: React.ReactNode;
39
+ /** Extra content in the leading cluster, after the title. */
40
+ children?: React.ReactNode;
41
+ }
42
+ /**
43
+ * The top bar of a {@link Panel}: title left, actions right, hairline under.
44
+ *
45
+ * Padded with the density row tokens rather than its own values, so the header
46
+ * lines up horizontally with the rows beneath it at every density level.
47
+ *
48
+ * Static markup — no `"use client"`.
49
+ *
50
+ * @example
51
+ * <PanelHeader title="Universes" actions={<Chip tone="ok">live</Chip>} />
52
+ */
53
+ declare const PanelHeader: React.ForwardRefExoticComponent<PanelHeaderProps & React.RefAttributes<HTMLDivElement>>;
54
+ //#endregion
55
+ export { Panel, PanelHeader, PanelHeaderProps, PanelProps };
@@ -0,0 +1,67 @@
1
+ import { cn } from "../lib/cn.js";
2
+ import * as React from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ //#region src/chrome/panel.tsx
5
+ /**
6
+ * The universal container: one hairline rim, one raised surface, one radius.
7
+ *
8
+ * Everything in a console lives in a panel — a cue list, a patch table, a
9
+ * settings group — so the shape is defined once here rather than re-typed as
10
+ * four utilities at every call site. `overflow-hidden` is part of the recipe,
11
+ * not an extra: it clips the first and last `Row`'s square edges back to the
12
+ * panel's radius, which is what makes a stack of hairline rows read as one
13
+ * object.
14
+ *
15
+ * Deliberately flat: no shadow. In this system only a floating surface (a
16
+ * dialog, a menu, a toast) is allowed one — see `overlays/_surface.ts`.
17
+ *
18
+ * Static markup — no `"use client"`.
19
+ *
20
+ * @example
21
+ * <Panel>
22
+ * <PanelHeader title="Cue stack" actions={<IconButton aria-label="Add" icon={Plus} />} />
23
+ * <Row>Cue 1</Row>
24
+ * <Row>Cue 2</Row>
25
+ * </Panel>
26
+ */
27
+ const Panel = React.forwardRef(function Panel({ className, ...elementProps }, ref) {
28
+ return /* @__PURE__ */ jsx("div", {
29
+ ref,
30
+ "data-slot": "panel",
31
+ className: cn("overflow-hidden rounded-(--radius-surface) border border-border bg-surface-1", className),
32
+ ...elementProps
33
+ });
34
+ });
35
+ /**
36
+ * The top bar of a {@link Panel}: title left, actions right, hairline under.
37
+ *
38
+ * Padded with the density row tokens rather than its own values, so the header
39
+ * lines up horizontally with the rows beneath it at every density level.
40
+ *
41
+ * Static markup — no `"use client"`.
42
+ *
43
+ * @example
44
+ * <PanelHeader title="Universes" actions={<Chip tone="ok">live</Chip>} />
45
+ */
46
+ const PanelHeader = React.forwardRef(function PanelHeader({ className, title, actions, children, ...elementProps }, ref) {
47
+ return /* @__PURE__ */ jsxs("div", {
48
+ ref,
49
+ "data-slot": "panel-header",
50
+ className: cn("flex items-center justify-between gap-(--cue-space-3) border-b border-border px-(--cue-pad-row-x) py-(--cue-pad-row-y)", className),
51
+ ...elementProps,
52
+ children: [/* @__PURE__ */ jsxs("div", {
53
+ className: "flex min-w-0 items-center gap-(--cue-space-3)",
54
+ children: [title === void 0 ? null : /* @__PURE__ */ jsx("span", {
55
+ "data-slot": "panel-header-title",
56
+ className: "truncate font-mono text-(length:--cue-text-emphasis) font-medium text-fg",
57
+ children: title
58
+ }), children]
59
+ }), actions === void 0 ? null : /* @__PURE__ */ jsx("div", {
60
+ "data-slot": "panel-header-actions",
61
+ className: "flex shrink-0 items-center gap-(--cue-space-2)",
62
+ children: actions
63
+ })]
64
+ });
65
+ });
66
+ //#endregion
67
+ export { Panel, PanelHeader };
@@ -0,0 +1,82 @@
1
+ import { ClassProp, VariantProps } from "../lib/cva.js";
2
+ import * as React from "react";
3
+ //#region src/chrome/row.d.ts
4
+ /**
5
+ * The list-row recipe, in both of the system's separator idioms.
6
+ *
7
+ * `seam: false` is the default hairline list: each row draws its own top
8
+ * border and the first one drops it, so a stack inside a `Panel` shows rules
9
+ * *between* rows and none against the panel rim.
10
+ *
11
+ * `seam: true` is the snuffle idiom: the rows sit on a `bg-border` ground with
12
+ * a 1px gap between them (see {@link SeamList}), and the gap *is* the rule.
13
+ * The row must then paint its own fill and draw no border at all, or the two
14
+ * separators double up into a 2px line.
15
+ *
16
+ * @example
17
+ * <li className={rowVariants({ interactive: true })} />
18
+ */
19
+ declare const rowVariants: (props?: ({
20
+ seam?: boolean | null | undefined;
21
+ interactive?: boolean | null | undefined;
22
+ } & ClassProp) | undefined) => string;
23
+ interface RowProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof rowVariants> {
24
+ /**
25
+ * Render as a `<button>` with hover feedback and a focus ring instead of a
26
+ * static `<div>`. Use for rows that select, open or toggle something.
27
+ */
28
+ interactive?: boolean;
29
+ /**
30
+ * Drop the hairline and paint the row's own fill, for use inside a
31
+ * {@link SeamList}. Without a `SeamList` parent the rows will simply touch.
32
+ */
33
+ seam?: boolean;
34
+ /** Disable the interactive form. Ignored when `interactive` is not set. */
35
+ disabled?: boolean;
36
+ /** Row content — normally a label, a spacer and a value or control. */
37
+ children?: React.ReactNode;
38
+ }
39
+ /**
40
+ * One row of a hairline list: the workhorse of every console panel.
41
+ *
42
+ * Static by default and a real `<button>` when `interactive` — never a `<div>`
43
+ * with an `onClick`, so keyboard users get it for free. Vertical rhythm comes
44
+ * from the density row-padding tokens, so the same list is 22px tall in
45
+ * ultra-compact and 34px tall in large without touching the markup.
46
+ *
47
+ * Static markup — no `"use client"`.
48
+ *
49
+ * @example
50
+ * <Panel><Row>Channel 1<span className="ml-auto">255</span></Row></Panel>
51
+ * @example
52
+ * <SeamList>
53
+ * <Row seam interactive onClick={select}>Cue 1</Row>
54
+ * <Row seam interactive onClick={select}>Cue 2</Row>
55
+ * </SeamList>
56
+ */
57
+ declare const Row: React.ForwardRefExoticComponent<RowProps & React.RefAttributes<HTMLElement>>;
58
+ /** Props for {@link SeamList}: the native `<div>` surface plus `className`. */
59
+ type SeamListProps = React.ComponentPropsWithoutRef<"div">;
60
+ /**
61
+ * A list whose separators are gaps, not borders.
62
+ *
63
+ * The container is filled with the border colour and its children are spaced
64
+ * `1px` apart; each child paints its own opaque fill, so what shows through the
65
+ * gap is a perfect hairline that can never double up with a row's own border or
66
+ * disagree with it at a rounded corner.
67
+ *
68
+ * Pair with `<Row seam>`. Use it where rows are cards in their own right (a
69
+ * cue list, a fixture list); use a plain `Panel` + `Row` where they are lines
70
+ * of one table.
71
+ *
72
+ * Static markup — no `"use client"`.
73
+ *
74
+ * @example
75
+ * <SeamList>
76
+ * <Row seam>Cue 1</Row>
77
+ * <Row seam>Cue 2</Row>
78
+ * </SeamList>
79
+ */
80
+ declare const SeamList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
81
+ //#endregion
82
+ export { Row, RowProps, SeamList, SeamListProps, rowVariants };
@@ -0,0 +1,106 @@
1
+ import { cn } from "../lib/cn.js";
2
+ import { cva } from "../lib/cva.js";
3
+ import * as React from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/chrome/row.tsx
6
+ /**
7
+ * The list-row recipe, in both of the system's separator idioms.
8
+ *
9
+ * `seam: false` is the default hairline list: each row draws its own top
10
+ * border and the first one drops it, so a stack inside a `Panel` shows rules
11
+ * *between* rows and none against the panel rim.
12
+ *
13
+ * `seam: true` is the snuffle idiom: the rows sit on a `bg-border` ground with
14
+ * a 1px gap between them (see {@link SeamList}), and the gap *is* the rule.
15
+ * The row must then paint its own fill and draw no border at all, or the two
16
+ * separators double up into a 2px line.
17
+ *
18
+ * @example
19
+ * <li className={rowVariants({ interactive: true })} />
20
+ */
21
+ const rowVariants = cva("flex w-full items-center gap-(--cue-space-3) px-(--cue-pad-row-x) py-(--cue-pad-row-y) font-mono text-(length:--cue-text-ui) text-fg", {
22
+ variants: {
23
+ seam: {
24
+ true: "bg-bg",
25
+ false: "border-t border-border first:border-t-0 [[data-slot=panel-header]+&]:border-t-0"
26
+ },
27
+ interactive: {
28
+ true: "cursor-pointer text-left transition-colors duration-150 outline-none hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-40",
29
+ false: ""
30
+ }
31
+ },
32
+ defaultVariants: {
33
+ seam: false,
34
+ interactive: false
35
+ }
36
+ });
37
+ /**
38
+ * One row of a hairline list: the workhorse of every console panel.
39
+ *
40
+ * Static by default and a real `<button>` when `interactive` — never a `<div>`
41
+ * with an `onClick`, so keyboard users get it for free. Vertical rhythm comes
42
+ * from the density row-padding tokens, so the same list is 22px tall in
43
+ * ultra-compact and 34px tall in large without touching the markup.
44
+ *
45
+ * Static markup — no `"use client"`.
46
+ *
47
+ * @example
48
+ * <Panel><Row>Channel 1<span className="ml-auto">255</span></Row></Panel>
49
+ * @example
50
+ * <SeamList>
51
+ * <Row seam interactive onClick={select}>Cue 1</Row>
52
+ * <Row seam interactive onClick={select}>Cue 2</Row>
53
+ * </SeamList>
54
+ */
55
+ const Row = React.forwardRef(function Row({ className, seam, interactive = false, disabled, children, ...elementProps }, ref) {
56
+ const classes = cn(rowVariants({
57
+ seam,
58
+ interactive
59
+ }), className);
60
+ if (interactive) return /* @__PURE__ */ jsx("button", {
61
+ ref,
62
+ type: "button",
63
+ disabled,
64
+ "data-slot": "row",
65
+ className: classes,
66
+ ...elementProps,
67
+ children
68
+ });
69
+ return /* @__PURE__ */ jsx("div", {
70
+ ref,
71
+ "data-slot": "row",
72
+ className: classes,
73
+ ...elementProps,
74
+ children
75
+ });
76
+ });
77
+ /**
78
+ * A list whose separators are gaps, not borders.
79
+ *
80
+ * The container is filled with the border colour and its children are spaced
81
+ * `1px` apart; each child paints its own opaque fill, so what shows through the
82
+ * gap is a perfect hairline that can never double up with a row's own border or
83
+ * disagree with it at a rounded corner.
84
+ *
85
+ * Pair with `<Row seam>`. Use it where rows are cards in their own right (a
86
+ * cue list, a fixture list); use a plain `Panel` + `Row` where they are lines
87
+ * of one table.
88
+ *
89
+ * Static markup — no `"use client"`.
90
+ *
91
+ * @example
92
+ * <SeamList>
93
+ * <Row seam>Cue 1</Row>
94
+ * <Row seam>Cue 2</Row>
95
+ * </SeamList>
96
+ */
97
+ const SeamList = React.forwardRef(function SeamList({ className, ...elementProps }, ref) {
98
+ return /* @__PURE__ */ jsx("div", {
99
+ ref,
100
+ "data-slot": "seam-list",
101
+ className: cn("flex flex-col gap-px overflow-hidden rounded-(--radius-surface) border border-border bg-border", className),
102
+ ...elementProps
103
+ });
104
+ });
105
+ //#endregion
106
+ export { Row, SeamList, rowVariants };
@@ -0,0 +1,39 @@
1
+ import * as React from "react";
2
+ import { ScrollArea } from "@base-ui/react/scroll-area";
3
+ //#region src/chrome/scroll-area.d.ts
4
+ /** Which axes get a styled scrollbar. */
5
+ type ScrollAreaOrientation = "vertical" | "horizontal" | "both";
6
+ interface ScrollAreaProps extends Omit<ScrollArea.Root.Props, "className"> {
7
+ /** Extra classes for the frame. Give it a height, or nothing will scroll. */
8
+ className?: string;
9
+ /** Extra classes for the scrolling viewport (padding belongs here). */
10
+ viewportClassName?: string;
11
+ /** Which axes may scroll. Defaults to `"vertical"`. */
12
+ orientation?: ScrollAreaOrientation;
13
+ /**
14
+ * Keep the scrollbar tracks mounted even when the content fits. Use for a
15
+ * panel whose content grows and shrinks, where a track appearing and
16
+ * disappearing would reflow everything beside it.
17
+ */
18
+ keepScrollbarsMounted?: boolean;
19
+ /** Ref to the scrolling element itself — for virtualizers and scroll restore. */
20
+ viewportRef?: React.Ref<HTMLDivElement>;
21
+ /** The scrolling content. */
22
+ children?: React.ReactNode;
23
+ }
24
+ /**
25
+ * A scrolling region with the system's own scrollbar instead of the platform's.
26
+ *
27
+ * Wraps Base UI's `ScrollArea`, which keeps native scrolling (and therefore
28
+ * native momentum, keyboard and trackpad behaviour) and only re-skins the bar.
29
+ * The frame must be given a bounded height by the caller — `h-full` inside a
30
+ * flex parent, or an explicit height — or there is nothing to scroll.
31
+ *
32
+ * @example
33
+ * <ScrollArea className="h-64" viewportClassName="p-(--cue-space-4)">
34
+ * {cues.map((c) => <Row key={c.id}>{c.name}</Row>)}
35
+ * </ScrollArea>
36
+ */
37
+ declare const ScrollArea$1: React.ForwardRefExoticComponent<Omit<ScrollAreaProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
38
+ //#endregion
39
+ export { ScrollArea$1 as ScrollArea, ScrollAreaOrientation, ScrollAreaProps };
@@ -0,0 +1,70 @@
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 { ScrollArea } from "@base-ui/react/scroll-area";
6
+ //#region src/chrome/scroll-area.tsx
7
+ /**
8
+ * The scrollbar is an overlay, not a gutter: it fades in while the pointer is
9
+ * over the area or the content is moving, and takes no layout space either way.
10
+ * A console packs panels edge to edge, and a permanent 12px trough on every one
11
+ * of them is 12px of chrome per panel that says nothing.
12
+ */
13
+ const SCROLLBAR_CLASSES = "flex touch-none justify-center rounded-full opacity-0 transition-opacity delay-300 duration-150 select-none data-[hovering]:opacity-100 data-[hovering]:delay-0 data-[scrolling]:opacity-100 data-[scrolling]:delay-0 motion-reduce:transition-none data-[orientation=horizontal]:h-(--cue-space-3) data-[orientation=horizontal]:flex-col data-[orientation=vertical]:w-(--cue-space-3)";
14
+ /**
15
+ * A scrolling region with the system's own scrollbar instead of the platform's.
16
+ *
17
+ * Wraps Base UI's `ScrollArea`, which keeps native scrolling (and therefore
18
+ * native momentum, keyboard and trackpad behaviour) and only re-skins the bar.
19
+ * The frame must be given a bounded height by the caller — `h-full` inside a
20
+ * flex parent, or an explicit height — or there is nothing to scroll.
21
+ *
22
+ * @example
23
+ * <ScrollArea className="h-64" viewportClassName="p-(--cue-space-4)">
24
+ * {cues.map((c) => <Row key={c.id}>{c.name}</Row>)}
25
+ * </ScrollArea>
26
+ */
27
+ const ScrollArea$1 = React.forwardRef(function ScrollArea$2({ className, viewportClassName, orientation = "vertical", keepScrollbarsMounted = false, viewportRef, children, ...elementProps }, ref) {
28
+ const vertical = orientation === "vertical" || orientation === "both";
29
+ const horizontal = orientation === "horizontal" || orientation === "both";
30
+ return /* @__PURE__ */ jsxs(ScrollArea.Root, {
31
+ ref,
32
+ "data-slot": "scroll-area",
33
+ className: cn("relative min-h-0", className),
34
+ ...elementProps,
35
+ children: [
36
+ /* @__PURE__ */ jsx(ScrollArea.Viewport, {
37
+ ref: viewportRef,
38
+ "data-slot": "scroll-area-viewport",
39
+ className: cn("size-full overscroll-contain outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-accent", viewportClassName),
40
+ children: /* @__PURE__ */ jsx(ScrollArea.Content, {
41
+ "data-slot": "scroll-area-content",
42
+ children
43
+ })
44
+ }),
45
+ vertical ? /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
46
+ orientation: "vertical",
47
+ keepMounted: keepScrollbarsMounted,
48
+ "data-slot": "scroll-area-scrollbar",
49
+ className: SCROLLBAR_CLASSES,
50
+ children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {
51
+ "data-slot": "scroll-area-thumb",
52
+ className: "w-full rounded-full bg-border-strong"
53
+ })
54
+ }) : null,
55
+ horizontal ? /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
56
+ orientation: "horizontal",
57
+ keepMounted: keepScrollbarsMounted,
58
+ "data-slot": "scroll-area-scrollbar",
59
+ className: SCROLLBAR_CLASSES,
60
+ children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {
61
+ "data-slot": "scroll-area-thumb",
62
+ className: "h-full rounded-full bg-border-strong"
63
+ })
64
+ }) : null,
65
+ vertical && horizontal ? /* @__PURE__ */ jsx(ScrollArea.Corner, { "data-slot": "scroll-area-corner" }) : null
66
+ ]
67
+ });
68
+ });
69
+ //#endregion
70
+ export { ScrollArea$1 as ScrollArea };