@zonsh/ui 0.0.0 → 0.2.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 (388) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +75 -1
  3. package/assets/illustrations/drawing/bracket-construction-dark.svg +77 -0
  4. package/assets/illustrations/drawing/bracket-construction-filled-dark.svg +50 -0
  5. package/assets/illustrations/drawing/bracket-construction-filled.svg +50 -0
  6. package/assets/illustrations/drawing/bracket-construction.svg +77 -0
  7. package/assets/illustrations/drawing/crescent-dark.svg +28 -0
  8. package/assets/illustrations/drawing/crescent-guides-dark.svg +33 -0
  9. package/assets/illustrations/drawing/crescent-guides.svg +33 -0
  10. package/assets/illustrations/drawing/crescent.svg +28 -0
  11. package/assets/illustrations/drawing/eclipse-dark.svg +187 -0
  12. package/assets/illustrations/drawing/eclipse-guides-dark.svg +191 -0
  13. package/assets/illustrations/drawing/eclipse-guides.svg +191 -0
  14. package/assets/illustrations/drawing/eclipse.svg +187 -0
  15. package/assets/illustrations/drawing/elevation-guides-dark.svg +31 -0
  16. package/assets/illustrations/drawing/elevation-guides-plain-dark.svg +9 -0
  17. package/assets/illustrations/drawing/elevation-guides-plain.svg +9 -0
  18. package/assets/illustrations/drawing/elevation-guides.svg +31 -0
  19. package/assets/illustrations/drawing/horizon-dark.svg +30 -0
  20. package/assets/illustrations/drawing/horizon.svg +30 -0
  21. package/assets/illustrations/drawing/nib-study-dark.svg +107 -0
  22. package/assets/illustrations/drawing/nib-study-plain-dark.svg +93 -0
  23. package/assets/illustrations/drawing/nib-study-plain.svg +93 -0
  24. package/assets/illustrations/drawing/nib-study.svg +107 -0
  25. package/assets/illustrations/editorial/assistant-640.webp +0 -0
  26. package/assets/illustrations/editorial/assistant.webp +0 -0
  27. package/assets/illustrations/editorial/automation-640.webp +0 -0
  28. package/assets/illustrations/editorial/automation.webp +0 -0
  29. package/assets/illustrations/editorial/bracket-left-640.webp +0 -0
  30. package/assets/illustrations/editorial/bracket-left.webp +0 -0
  31. package/assets/illustrations/editorial/bracket-right-640.webp +0 -0
  32. package/assets/illustrations/editorial/bracket-right.webp +0 -0
  33. package/assets/illustrations/editorial/custom-software-640.webp +0 -0
  34. package/assets/illustrations/editorial/custom-software.webp +0 -0
  35. package/assets/illustrations/editorial/digitalization-640.webp +0 -0
  36. package/assets/illustrations/editorial/digitalization.webp +0 -0
  37. package/assets/illustrations/editorial/integration-640.webp +0 -0
  38. package/assets/illustrations/editorial/integration.webp +0 -0
  39. package/assets/illustrations/editorial/problem-640.webp +0 -0
  40. package/assets/illustrations/editorial/problem.webp +0 -0
  41. package/assets/illustrations/editorial/process-analysis-640.webp +0 -0
  42. package/assets/illustrations/editorial/process-analysis.webp +0 -0
  43. package/assets/illustrations/editorial/process-concept-640.webp +0 -0
  44. package/assets/illustrations/editorial/process-concept.webp +0 -0
  45. package/assets/illustrations/editorial/process-development-640.webp +0 -0
  46. package/assets/illustrations/editorial/process-development.webp +0 -0
  47. package/assets/illustrations/editorial/process-discovery-640.webp +0 -0
  48. package/assets/illustrations/editorial/process-discovery.webp +0 -0
  49. package/assets/illustrations/editorial/process-maintenance-640.webp +0 -0
  50. package/assets/illustrations/editorial/process-maintenance.webp +0 -0
  51. package/assets/illustrations/editorial/process-prototype-640.webp +0 -0
  52. package/assets/illustrations/editorial/process-prototype.webp +0 -0
  53. package/assets/illustrations/editorial/process-testing-640.webp +0 -0
  54. package/assets/illustrations/editorial/process-testing.webp +0 -0
  55. package/assets/illustrations/iso/automation-dark.svg +6 -0
  56. package/assets/illustrations/iso/automation.svg +6 -0
  57. package/assets/illustrations/iso/bar-chart-dark.svg +6 -0
  58. package/assets/illustrations/iso/bar-chart.svg +6 -0
  59. package/assets/illustrations/iso/brackets-classic-dark.svg +6 -0
  60. package/assets/illustrations/iso/brackets-classic.svg +6 -0
  61. package/assets/illustrations/iso/brackets-dark.svg +6 -0
  62. package/assets/illustrations/iso/brackets.svg +6 -0
  63. package/assets/illustrations/iso/city-dark.svg +6 -0
  64. package/assets/illustrations/iso/city.svg +6 -0
  65. package/assets/illustrations/iso/conveyor-dark.svg +6 -0
  66. package/assets/illustrations/iso/conveyor.svg +6 -0
  67. package/assets/illustrations/iso/database-dark.svg +6 -0
  68. package/assets/illustrations/iso/database.svg +6 -0
  69. package/assets/illustrations/iso/documents-dark.svg +6 -0
  70. package/assets/illustrations/iso/documents.svg +6 -0
  71. package/assets/illustrations/iso/inbox-dark.svg +6 -0
  72. package/assets/illustrations/iso/inbox.svg +6 -0
  73. package/assets/illustrations/iso/laptop-dark.svg +6 -0
  74. package/assets/illustrations/iso/laptop.svg +6 -0
  75. package/assets/illustrations/iso/monitor-dark.svg +6 -0
  76. package/assets/illustrations/iso/monitor.svg +6 -0
  77. package/assets/illustrations/iso/pipeline-dark.svg +6 -0
  78. package/assets/illustrations/iso/pipeline.svg +6 -0
  79. package/assets/illustrations/iso/platform-dark.svg +6 -0
  80. package/assets/illustrations/iso/platform.svg +6 -0
  81. package/assets/illustrations/iso/server-dark.svg +6 -0
  82. package/assets/illustrations/iso/server.svg +6 -0
  83. package/assets/illustrations/iso/spreadsheet-dark.svg +6 -0
  84. package/assets/illustrations/iso/spreadsheet.svg +6 -0
  85. package/assets/illustrations/iso/timeline-dark.svg +6 -0
  86. package/assets/illustrations/iso/timeline.svg +6 -0
  87. package/assets/illustrations/sheet/construction.svg +115 -0
  88. package/assets/illustrations/sheet/crescent.svg +40 -0
  89. package/assets/illustrations/sheet/limb.svg +42 -0
  90. package/assets/illustrations/sheet/stress-axis.svg +119 -0
  91. package/assets/illustrations/sheet/totality.svg +215 -0
  92. package/assets/illustrations/sheet/vertical-metrics.svg +43 -0
  93. package/assets/logo-left.svg +1 -0
  94. package/assets/logo-right.svg +1 -0
  95. package/assets/logo.svg +1 -0
  96. package/dist/components/_overlay.d.ts +47 -0
  97. package/dist/components/_overlay.js +59 -0
  98. package/dist/components/accordion.d.ts +32 -0
  99. package/dist/components/accordion.js +39 -0
  100. package/dist/components/alert-dialog.d.ts +45 -0
  101. package/dist/components/alert-dialog.js +56 -0
  102. package/dist/components/alert.d.ts +35 -0
  103. package/dist/components/alert.js +42 -0
  104. package/dist/components/ascii-field.d.ts +34 -0
  105. package/dist/components/ascii-field.js +410 -0
  106. package/dist/components/aspect-ratio.d.ts +14 -0
  107. package/dist/components/aspect-ratio.js +17 -0
  108. package/dist/components/avatar.d.ts +42 -0
  109. package/dist/components/avatar.js +55 -0
  110. package/dist/components/badge.d.ts +70 -0
  111. package/dist/components/badge.js +62 -0
  112. package/dist/components/breadcrumb.d.ts +22 -0
  113. package/dist/components/breadcrumb.js +32 -0
  114. package/dist/components/button-group.d.ts +30 -0
  115. package/dist/components/button-group.js +47 -0
  116. package/dist/components/button.d.ts +53 -0
  117. package/dist/components/button.js +130 -0
  118. package/dist/components/calendar.d.ts +26 -0
  119. package/dist/components/calendar.js +164 -0
  120. package/dist/components/card.d.ts +42 -0
  121. package/dist/components/card.js +76 -0
  122. package/dist/components/carousel.d.ts +90 -0
  123. package/dist/components/carousel.js +213 -0
  124. package/dist/components/chart.d.ts +180 -0
  125. package/dist/components/chart.js +286 -0
  126. package/dist/components/checkbox.d.ts +23 -0
  127. package/dist/components/checkbox.js +43 -0
  128. package/dist/components/code-block.d.ts +45 -0
  129. package/dist/components/code-block.js +58 -0
  130. package/dist/components/code-highlight.d.ts +13 -0
  131. package/dist/components/code-highlight.js +107 -0
  132. package/dist/components/collapsible.d.ts +20 -0
  133. package/dist/components/collapsible.js +32 -0
  134. package/dist/components/color-picker.d.ts +85 -0
  135. package/dist/components/color-picker.js +407 -0
  136. package/dist/components/combobox.d.ts +81 -0
  137. package/dist/components/combobox.js +100 -0
  138. package/dist/components/command.d.ts +112 -0
  139. package/dist/components/command.js +212 -0
  140. package/dist/components/context-menu.d.ts +29 -0
  141. package/dist/components/context-menu.js +35 -0
  142. package/dist/components/conversation.d.ts +27 -0
  143. package/dist/components/conversation.js +293 -0
  144. package/dist/components/copy-button.d.ts +46 -0
  145. package/dist/components/copy-button.js +118 -0
  146. package/dist/components/data-table.d.ts +175 -0
  147. package/dist/components/data-table.js +302 -0
  148. package/dist/components/date-picker.d.ts +91 -0
  149. package/dist/components/date-picker.js +207 -0
  150. package/dist/components/dialog.d.ts +48 -0
  151. package/dist/components/dialog.js +92 -0
  152. package/dist/components/direction.d.ts +16 -0
  153. package/dist/components/direction.js +18 -0
  154. package/dist/components/drawer.d.ts +60 -0
  155. package/dist/components/drawer.js +76 -0
  156. package/dist/components/empty.d.ts +31 -0
  157. package/dist/components/empty.js +50 -0
  158. package/dist/components/feature-list.d.ts +54 -0
  159. package/dist/components/feature-list.js +43 -0
  160. package/dist/components/field.d.ts +15 -0
  161. package/dist/components/field.js +36 -0
  162. package/dist/components/file-drop.d.ts +55 -0
  163. package/dist/components/file-drop.js +197 -0
  164. package/dist/components/filter-bar.d.ts +106 -0
  165. package/dist/components/filter-bar.js +296 -0
  166. package/dist/components/form.d.ts +33 -0
  167. package/dist/components/form.js +34 -0
  168. package/dist/components/graph.d.ts +105 -0
  169. package/dist/components/graph.js +786 -0
  170. package/dist/components/illustration.d.ts +85 -0
  171. package/dist/components/illustration.js +165 -0
  172. package/dist/components/input-group.d.ts +127 -0
  173. package/dist/components/input-group.js +292 -0
  174. package/dist/components/input.d.ts +16 -0
  175. package/dist/components/input.js +25 -0
  176. package/dist/components/item.d.ts +64 -0
  177. package/dist/components/item.js +116 -0
  178. package/dist/components/kbd.d.ts +33 -0
  179. package/dist/components/kbd.js +38 -0
  180. package/dist/components/label.d.ts +12 -0
  181. package/dist/components/label.js +24 -0
  182. package/dist/components/layout.d.ts +136 -0
  183. package/dist/components/layout.js +162 -0
  184. package/dist/components/logo.d.ts +54 -0
  185. package/dist/components/logo.js +96 -0
  186. package/dist/components/menu.d.ts +60 -0
  187. package/dist/components/menu.js +138 -0
  188. package/dist/components/menubar.d.ts +62 -0
  189. package/dist/components/menubar.js +223 -0
  190. package/dist/components/message.d.ts +42 -0
  191. package/dist/components/message.js +56 -0
  192. package/dist/components/meter.d.ts +31 -0
  193. package/dist/components/meter.js +25 -0
  194. package/dist/components/native-select.d.ts +26 -0
  195. package/dist/components/native-select.js +35 -0
  196. package/dist/components/navigation-menu.d.ts +42 -0
  197. package/dist/components/navigation-menu.js +97 -0
  198. package/dist/components/number-field.d.ts +36 -0
  199. package/dist/components/number-field.js +153 -0
  200. package/dist/components/otp-field.d.ts +35 -0
  201. package/dist/components/otp-field.js +94 -0
  202. package/dist/components/pagination.d.ts +31 -0
  203. package/dist/components/pagination.js +70 -0
  204. package/dist/components/pdf-viewer.d.ts +69 -0
  205. package/dist/components/pdf-viewer.js +929 -0
  206. package/dist/components/popover.d.ts +33 -0
  207. package/dist/components/popover.js +48 -0
  208. package/dist/components/preview-card.d.ts +25 -0
  209. package/dist/components/preview-card.js +22 -0
  210. package/dist/components/progress.d.ts +27 -0
  211. package/dist/components/progress.js +23 -0
  212. package/dist/components/prompt-input.d.ts +131 -0
  213. package/dist/components/prompt-input.js +403 -0
  214. package/dist/components/quote.d.ts +22 -0
  215. package/dist/components/quote.js +15 -0
  216. package/dist/components/radio-group.d.ts +18 -0
  217. package/dist/components/radio-group.js +34 -0
  218. package/dist/components/reasoning.d.ts +31 -0
  219. package/dist/components/reasoning.js +70 -0
  220. package/dist/components/resizable.d.ts +38 -0
  221. package/dist/components/resizable.js +41 -0
  222. package/dist/components/response.d.ts +30 -0
  223. package/dist/components/response.js +538 -0
  224. package/dist/components/scroll-area.d.ts +33 -0
  225. package/dist/components/scroll-area.js +31 -0
  226. package/dist/components/select.d.ts +35 -0
  227. package/dist/components/select.js +60 -0
  228. package/dist/components/separator.d.ts +14 -0
  229. package/dist/components/separator.js +17 -0
  230. package/dist/components/sidebar.d.ts +147 -0
  231. package/dist/components/sidebar.js +489 -0
  232. package/dist/components/site-header.d.ts +59 -0
  233. package/dist/components/site-header.js +67 -0
  234. package/dist/components/skeleton.d.ts +31 -0
  235. package/dist/components/skeleton.js +29 -0
  236. package/dist/components/slider.d.ts +24 -0
  237. package/dist/components/slider.js +129 -0
  238. package/dist/components/sources.d.ts +25 -0
  239. package/dist/components/sources.js +35 -0
  240. package/dist/components/spinner.d.ts +36 -0
  241. package/dist/components/spinner.js +72 -0
  242. package/dist/components/suggestions.d.ts +20 -0
  243. package/dist/components/suggestions.js +18 -0
  244. package/dist/components/switch.d.ts +14 -0
  245. package/dist/components/switch.js +26 -0
  246. package/dist/components/table.d.ts +162 -0
  247. package/dist/components/table.js +758 -0
  248. package/dist/components/tabs.d.ts +25 -0
  249. package/dist/components/tabs.js +162 -0
  250. package/dist/components/tag.d.ts +41 -0
  251. package/dist/components/tag.js +88 -0
  252. package/dist/components/tags-input.d.ts +40 -0
  253. package/dist/components/tags-input.js +239 -0
  254. package/dist/components/textarea.d.ts +13 -0
  255. package/dist/components/textarea.js +16 -0
  256. package/dist/components/theme.d.ts +41 -0
  257. package/dist/components/theme.js +112 -0
  258. package/dist/components/time-field.d.ts +51 -0
  259. package/dist/components/time-field.js +437 -0
  260. package/dist/components/timeline.d.ts +76 -0
  261. package/dist/components/timeline.js +99 -0
  262. package/dist/components/toast.d.ts +72 -0
  263. package/dist/components/toast.js +196 -0
  264. package/dist/components/toggle-group.d.ts +41 -0
  265. package/dist/components/toggle-group.js +140 -0
  266. package/dist/components/toggle.d.ts +23 -0
  267. package/dist/components/toggle.js +35 -0
  268. package/dist/components/tool-call.d.ts +52 -0
  269. package/dist/components/tool-call.js +57 -0
  270. package/dist/components/toolbar.d.ts +17 -0
  271. package/dist/components/toolbar.js +34 -0
  272. package/dist/components/tooltip.d.ts +42 -0
  273. package/dist/components/tooltip.js +47 -0
  274. package/dist/components/tree.d.ts +75 -0
  275. package/dist/components/tree.js +636 -0
  276. package/dist/components/typography.d.ts +134 -0
  277. package/dist/components/typography.js +176 -0
  278. package/dist/components/video-player.d.ts +276 -0
  279. package/dist/components/video-player.js +1352 -0
  280. package/dist/components/whiteboard.d.ts +80 -0
  281. package/dist/components/whiteboard.js +389 -0
  282. package/dist/index.d.ts +85 -0
  283. package/dist/index.js +86 -0
  284. package/dist/lib/cn.d.ts +20 -0
  285. package/dist/lib/cn.js +38 -0
  286. package/dist/lib/code-highlight.d.ts +31 -0
  287. package/dist/lib/code-highlight.js +24 -0
  288. package/dist/lib/code-theme.d.ts +19 -0
  289. package/dist/lib/code-theme.js +140 -0
  290. package/dist/lib/collapse-row.d.ts +9 -0
  291. package/dist/lib/collapse-row.js +129 -0
  292. package/dist/lib/digit-roll.d.ts +21 -0
  293. package/dist/lib/digit-roll.js +31 -0
  294. package/dist/lib/editorial-assets.d.ts +16 -0
  295. package/dist/lib/editorial-assets.js +56 -0
  296. package/dist/lib/figure/catalog.d.ts +127 -0
  297. package/dist/lib/figure/catalog.js +130 -0
  298. package/dist/lib/figure/figures/automation.d.ts +7 -0
  299. package/dist/lib/figure/figures/automation.js +143 -0
  300. package/dist/lib/figure/figures/bar-chart.d.ts +7 -0
  301. package/dist/lib/figure/figures/bar-chart.js +99 -0
  302. package/dist/lib/figure/figures/brackets-classic.d.ts +11 -0
  303. package/dist/lib/figure/figures/brackets-classic.js +170 -0
  304. package/dist/lib/figure/figures/brackets.d.ts +8 -0
  305. package/dist/lib/figure/figures/brackets.js +84 -0
  306. package/dist/lib/figure/figures/city.d.ts +7 -0
  307. package/dist/lib/figure/figures/city.js +93 -0
  308. package/dist/lib/figure/figures/conveyor.d.ts +7 -0
  309. package/dist/lib/figure/figures/conveyor.js +97 -0
  310. package/dist/lib/figure/figures/database.d.ts +7 -0
  311. package/dist/lib/figure/figures/database.js +65 -0
  312. package/dist/lib/figure/figures/documents.d.ts +7 -0
  313. package/dist/lib/figure/figures/documents.js +83 -0
  314. package/dist/lib/figure/figures/inbox.d.ts +7 -0
  315. package/dist/lib/figure/figures/inbox.js +92 -0
  316. package/dist/lib/figure/figures/laptop.d.ts +7 -0
  317. package/dist/lib/figure/figures/laptop.js +67 -0
  318. package/dist/lib/figure/figures/monitor.d.ts +7 -0
  319. package/dist/lib/figure/figures/monitor.js +59 -0
  320. package/dist/lib/figure/figures/pipeline.d.ts +8 -0
  321. package/dist/lib/figure/figures/pipeline.js +117 -0
  322. package/dist/lib/figure/figures/platform.d.ts +7 -0
  323. package/dist/lib/figure/figures/platform.js +117 -0
  324. package/dist/lib/figure/figures/server.d.ts +7 -0
  325. package/dist/lib/figure/figures/server.js +115 -0
  326. package/dist/lib/figure/figures/spreadsheet.d.ts +7 -0
  327. package/dist/lib/figure/figures/spreadsheet.js +87 -0
  328. package/dist/lib/figure/figures/timeline.d.ts +7 -0
  329. package/dist/lib/figure/figures/timeline.js +65 -0
  330. package/dist/lib/figure/kernel.d.ts +152 -0
  331. package/dist/lib/figure/kernel.js +576 -0
  332. package/dist/lib/figure/parts.d.ts +42 -0
  333. package/dist/lib/figure/parts.js +126 -0
  334. package/dist/lib/form-reset.d.ts +11 -0
  335. package/dist/lib/form-reset.js +22 -0
  336. package/dist/lib/glide.d.ts +53 -0
  337. package/dist/lib/glide.js +138 -0
  338. package/dist/lib/graph-layout.d.ts +58 -0
  339. package/dist/lib/graph-layout.js +200 -0
  340. package/dist/lib/illustration-drawings.d.ts +89 -0
  341. package/dist/lib/illustration-drawings.js +539 -0
  342. package/dist/lib/illustration-info.d.ts +37 -0
  343. package/dist/lib/illustration-info.js +22 -0
  344. package/dist/lib/illustration-library.d.ts +87 -0
  345. package/dist/lib/illustration-library.js +352 -0
  346. package/dist/lib/logo-geometry.d.ts +29 -0
  347. package/dist/lib/logo-geometry.js +67 -0
  348. package/dist/lib/markdown-guard.d.ts +16 -0
  349. package/dist/lib/markdown-guard.js +123 -0
  350. package/dist/lib/merge-refs.d.ts +10 -0
  351. package/dist/lib/merge-refs.js +26 -0
  352. package/dist/lib/motion.d.ts +6 -0
  353. package/dist/lib/motion.js +12 -0
  354. package/dist/lib/pdf-worker.d.ts +1 -0
  355. package/dist/lib/pdf-worker.js +6 -0
  356. package/dist/lib/pdf.d.ts +19 -0
  357. package/dist/lib/pdf.js +58 -0
  358. package/dist/lib/platform.d.ts +33 -0
  359. package/dist/lib/platform.js +68 -0
  360. package/dist/lib/room.d.ts +25 -0
  361. package/dist/lib/room.js +46 -0
  362. package/dist/lib/table-fit.d.ts +143 -0
  363. package/dist/lib/table-fit.js +577 -0
  364. package/dist/lib/theme-script.d.ts +18 -0
  365. package/dist/lib/theme-script.js +29 -0
  366. package/dist/styles/expressive.css +188 -0
  367. package/dist/styles/fonts.css +145 -0
  368. package/dist/styles/index.css +206 -0
  369. package/dist/styles/material.css +313 -0
  370. package/dist/styles/parts/ai.css +360 -0
  371. package/dist/styles/parts/brand.css +75 -0
  372. package/dist/styles/parts/controls.css +725 -0
  373. package/dist/styles/parts/data.css +222 -0
  374. package/dist/styles/parts/editorial.css +120 -0
  375. package/dist/styles/parts/feedback.css +273 -0
  376. package/dist/styles/parts/foundations.css +166 -0
  377. package/dist/styles/parts/graph.css +214 -0
  378. package/dist/styles/parts/inputs.css +261 -0
  379. package/dist/styles/parts/isometric.css +124 -0
  380. package/dist/styles/parts/navigation.css +232 -0
  381. package/dist/styles/parts/overlays.css +250 -0
  382. package/dist/styles/parts/pdf.css +154 -0
  383. package/dist/styles/parts/react-flow.css +519 -0
  384. package/dist/styles/parts/whiteboard.css +855 -0
  385. package/dist/styles/tokens.css +290 -0
  386. package/dist/vite.d.ts +116 -0
  387. package/dist/vite.js +129 -0
  388. package/package.json +188 -5
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ScrollArea as BaseScrollArea } from "@base-ui/react/scroll-area";
4
+ import { cn, sx } from "../lib/cn.js";
5
+ function ScrollAreaScrollbar({ orientation }) {
6
+ return (_jsx(BaseScrollArea.Scrollbar, { "data-slot": "scroll-area-scrollbar", orientation: orientation, className: cn("m-1 flex touch-none rounded-full opacity-0 transition-opacity duration-(--duration) ease-(--ease) select-none", "pointer-events-none data-hovering:pointer-events-auto data-hovering:opacity-100 data-scrolling:pointer-events-auto data-scrolling:opacity-100", "data-[orientation=horizontal]:h-1 data-[orientation=vertical]:w-1"), children: _jsx(BaseScrollArea.Thumb, { "data-slot": "scroll-area-thumb", className: "rounded-full bg-field-edge transition-colors duration-(--duration) ease-(--ease) hover:bg-control-focus data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full" }) }));
7
+ }
8
+ /**
9
+ * ScrollArea — a scrolling region with a thin, quiet scrollbar.
10
+ *
11
+ * The thumb is a 4px round bar in `--field-edge` that appears while the pointer is over the
12
+ * area or while scrolling. Edges with more content fade out using Base UI's overflow CSS
13
+ * variables, so the fade grows as you scroll away from an edge. The rule people break:
14
+ * nesting scroll areas or putting the main page in one. Let the page scroll natively; use
15
+ * this for bounded panels (a sidebar, a code listing, a long select). Sidebars never show a
16
+ * scrollbar: pass `scrollbar={false}`.
17
+ */
18
+ export function ScrollArea({ orientation = "vertical", fade = true, scrollbar = true, viewportClassName, contentClassName, viewportRender, className, children, ...props }) {
19
+ const fadeAxis = !fade
20
+ ? undefined
21
+ : orientation === "both"
22
+ ? "both"
23
+ : orientation === "horizontal"
24
+ ? "x"
25
+ : "y";
26
+ return (_jsxs(BaseScrollArea.Root, { "data-slot": "scroll-area", className: sx("relative min-h-0 overflow-hidden", className), ...props, children: [_jsx(BaseScrollArea.Viewport, { "data-slot": "scroll-area-viewport", "data-scroll-viewport": "", "data-fade": fadeAxis, render: viewportRender, className: cn("size-full max-h-[inherit] overscroll-contain focus-ring", viewportClassName), children: _jsx(BaseScrollArea.Content, { "data-slot": "scroll-area-content",
27
+ // Base UI keeps the content at least as wide as what is in it (min-width: fit-content), so a
28
+ // long word or a row that does not wrap would widen a vertical area past its box, with no
29
+ // bar to scroll it back: there, the content keeps the box's width and wraps or truncates.
30
+ className: cn(orientation === "vertical" ? "min-w-0!" : "min-w-fit", contentClassName), children: children }) }), scrollbar && orientation !== "horizontal" && _jsx(ScrollAreaScrollbar, { orientation: "vertical" }), scrollbar && orientation !== "vertical" && _jsx(ScrollAreaScrollbar, { orientation: "horizontal" }), scrollbar && orientation === "both" && _jsx(BaseScrollArea.Corner, { "data-slot": "scroll-area-corner" })] }));
31
+ }
@@ -0,0 +1,35 @@
1
+ import { Select as BaseSelect } from "@base-ui/react/select";
2
+ import * as React from "react";
3
+ /**
4
+ * Select — pick one option from a list. Use `ToggleGroup` instead when there are 2–5 short
5
+ * options and seeing them side by side is the point.
6
+ *
7
+ * Pass `items` to `<Select>` so `<SelectValue>` can render the selected label.
8
+ */
9
+ export declare function Select<Value, Multiple extends boolean | undefined = false>({ inputRef, ...props }: BaseSelect.Root.Props<Value, Multiple>): React.JSX.Element;
10
+ declare const triggerSizes: {
11
+ readonly sm: "min-h-(--control-h-sm) px-2.5 text-[13px]";
12
+ readonly default: "min-h-(--control-h) ps-3.5 pe-2.5 text-[15px]";
13
+ };
14
+ export interface SelectTriggerProps extends BaseSelect.Trigger.Props {
15
+ size?: keyof typeof triggerSizes;
16
+ }
17
+ export declare function SelectTrigger({ size, className, children, ...props }: SelectTriggerProps): React.JSX.Element;
18
+ export declare function SelectValue({ className, ...props }: BaseSelect.Value.Props): React.JSX.Element;
19
+ export interface SelectContentProps extends BaseSelect.Popup.Props {
20
+ /**
21
+ * Open over the trigger, with the chosen option laid exactly on the value, as a macOS menu
22
+ * does — instead of as a list below it. Mouse only: opened by touch, or with too little room
23
+ * around the trigger, it opens below as usual.
24
+ */
25
+ alignItemWithTrigger?: boolean;
26
+ /** Positioner props: side, align, sideOffset … */
27
+ positioner?: Omit<BaseSelect.Positioner.Props, "children">;
28
+ }
29
+ export declare function SelectContent({ className, children, alignItemWithTrigger, positioner, dir, ...props }: SelectContentProps): React.JSX.Element;
30
+ export declare function SelectItem({ className, children, ...props }: BaseSelect.Item.Props): React.JSX.Element;
31
+ export declare function SelectGroup({ className, ...props }: BaseSelect.Group.Props): React.JSX.Element;
32
+ export declare function SelectGroupLabel({ className, ...props }: BaseSelect.GroupLabel.Props): React.JSX.Element;
33
+ export declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof BaseSelect.Separator>): React.JSX.Element;
34
+ export declare const SelectLabel: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
35
+ export {};
@@ -0,0 +1,60 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Select as BaseSelect } from "@base-ui/react/select";
4
+ import { CheckIcon, ChevronDownIcon, ChevronsUpDownIcon, ChevronUpIcon } from "lucide-react";
5
+ import * as React from "react";
6
+ import { cn, sx } from "../lib/cn.js";
7
+ import { useFormReset } from "../lib/form-reset.js";
8
+ import { mergeRefs } from "../lib/merge-refs.js";
9
+ import { usePopupDir } from "./_overlay.js";
10
+ import { ScrollArea } from "./scroll-area.js";
11
+ /**
12
+ * Select — pick one option from a list. Use `ToggleGroup` instead when there are 2–5 short
13
+ * options and seeing them side by side is the point.
14
+ *
15
+ * Pass `items` to `<Select>` so `<SelectValue>` can render the selected label.
16
+ */
17
+ export function Select({ inputRef, ...props }) {
18
+ // A form's reset remounts it from its defaults (lib/form-reset); its hidden input finds the form.
19
+ const [resetKey, formRef] = useFormReset();
20
+ const refs = React.useMemo(() => mergeRefs(formRef, inputRef), [formRef, inputRef]);
21
+ return _jsx(BaseSelect.Root, { inputRef: refs, ...props }, resetKey);
22
+ }
23
+ const triggerSizes = {
24
+ sm: "min-h-(--control-h-sm) px-2.5 text-[13px]",
25
+ default: "min-h-(--control-h) ps-3.5 pe-2.5 text-[15px]",
26
+ };
27
+ export function SelectTrigger({ size = "default", className, children, ...props }) {
28
+ return (_jsxs(BaseSelect.Trigger, { "data-slot": "select-trigger", "data-size": size, className: sx([
29
+ "group/trigger inline-flex w-full min-w-40 material-field cursor-pointer items-center justify-between gap-3 rounded-control font-body leading-none whitespace-nowrap outline-none select-none",
30
+ triggerSizes[size],
31
+ ], className), ...props, children: [children, _jsx(BaseSelect.Icon, { className: "flex text-muted-foreground transition-colors group-hover/trigger:not-group-data-disabled/trigger:text-foreground", children: _jsx(ChevronsUpDownIcon, { className: "size-4" }) })] }));
32
+ }
33
+ export function SelectValue({ className, ...props }) {
34
+ return (_jsx(BaseSelect.Value, { "data-slot": "select-value", className: sx(["truncate data-placeholder:text-control-muted"], className), ...props }));
35
+ }
36
+ export function SelectContent({ className, children, alignItemWithTrigger = false, positioner, dir, ...props }) {
37
+ const popupDir = usePopupDir(dir);
38
+ return (_jsx(BaseSelect.Portal, { children: _jsx(BaseSelect.Positioner, { sideOffset: 6, alignItemWithTrigger: alignItemWithTrigger, dir: popupDir, ...positioner, className: "z-50 outline-none select-none", children: _jsxs(BaseSelect.Popup, { "data-slot": "select-content", className: sx([
39
+ // As wide as the trigger, or wider for long options — up to 24rem (or the trigger, if
40
+ // wider) and never past the window, so the popup never spans the screen.
41
+ "relative max-w-[min(var(--available-width),max(var(--anchor-width),24rem))] min-w-(--anchor-width) popup-motion overflow-hidden rounded-button material-menu p-1 font-body outline-none",
42
+ ], className), ...props, children: [_jsx(BaseSelect.ScrollUpArrow, { className: "top-0 left-0 z-1 hidden h-6 w-full cursor-default items-center justify-center bg-control-menu text-muted-foreground data-[side=none]:flex", children: _jsx(ChevronUpIcon, { className: "size-3.5" }) }), _jsx(ScrollArea, { className: "h-full max-h-[calc(var(--available-height)-0.625rem)] in-data-[side=none]:max-h-none", viewportRender: _jsx(BaseSelect.List, { "data-slot": "select-list", role: "listbox", className: "scroll-py-1 data-has-overflow-y:pr-3" }), children: children }), _jsx(BaseSelect.ScrollDownArrow, { className: "bottom-0 left-0 z-1 hidden h-6 w-full cursor-default items-center justify-center bg-control-menu text-muted-foreground data-[side=none]:flex", children: _jsx(ChevronDownIcon, { className: "size-3.5" }) })] }) }) }));
43
+ }
44
+ export function SelectItem({ className, children, ...props }) {
45
+ return (_jsxs(BaseSelect.Item, { "data-slot": "select-item", className: sx([
46
+ "grid min-h-(--control-h) cursor-pointer grid-cols-[1fr_1rem] items-center gap-3 rounded-item border border-transparent py-1.5 pr-2.5 pl-2.5 text-sm text-foreground-soft outline-none select-none",
47
+ "data-highlighted:border-control-inner-edge data-highlighted:bg-control-hover data-highlighted:text-foreground data-highlighted:shadow-highlight",
48
+ "data-disabled:pointer-events-none data-disabled:opacity-50 data-selected:text-foreground",
49
+ ], className), ...props, children: [_jsx(BaseSelect.ItemText, { className: "col-start-1 line-clamp-2 [overflow-wrap:anywhere]", children: children }), _jsx(BaseSelect.ItemIndicator, { className: "col-start-2 flex", children: _jsx(CheckIcon, { className: "size-4" }) })] }));
50
+ }
51
+ export function SelectGroup({ className, ...props }) {
52
+ return _jsx(BaseSelect.Group, { "data-slot": "select-group", className: className, ...props });
53
+ }
54
+ export function SelectGroupLabel({ className, ...props }) {
55
+ return (_jsx(BaseSelect.GroupLabel, { "data-slot": "select-group-label", className: sx(["px-2.5 pt-2.5 pb-1.5 eyebrow text-[11px] [overflow-wrap:anywhere]"], className), ...props }));
56
+ }
57
+ export function SelectSeparator({ className, ...props }) {
58
+ return (_jsx(BaseSelect.Separator, { "data-slot": "select-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
59
+ }
60
+ export const SelectLabel = BaseSelect.Label;
@@ -0,0 +1,14 @@
1
+ import { Separator as BaseSeparator } from "@base-ui/react/separator";
2
+ import type * as React from "react";
3
+ export interface SeparatorProps extends BaseSeparator.Props {
4
+ /** A short mono label centred on a horizontal rule, e.g. `"or"` or `"02 — Chapters"`. */
5
+ label?: React.ReactNode;
6
+ }
7
+ /**
8
+ * Separator — the hairline rule, which is the default way to group content here.
9
+ *
10
+ * `border/60`, 1px, horizontal or vertical. An optional mono label sits in the middle of a
11
+ * horizontal rule. The rule people break: reaching for a box (a boxed `Card`) where
12
+ * a rule and whitespace would do. Use this first.
13
+ */
14
+ export declare function Separator({ orientation, label, className, ...props }: SeparatorProps): React.JSX.Element;
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Separator as BaseSeparator } from "@base-ui/react/separator";
4
+ import { sx } from "../lib/cn.js";
5
+ /**
6
+ * Separator — the hairline rule, which is the default way to group content here.
7
+ *
8
+ * `border/60`, 1px, horizontal or vertical. An optional mono label sits in the middle of a
9
+ * horizontal rule. The rule people break: reaching for a box (a boxed `Card`) where
10
+ * a rule and whitespace would do. Use this first.
11
+ */
12
+ export function Separator({ orientation = "horizontal", label, className, ...props }) {
13
+ if (label != null && orientation === "horizontal") {
14
+ return (_jsx(BaseSeparator, { "data-slot": "separator", "data-labelled": "", orientation: orientation, className: sx("flex w-full items-center gap-4 eyebrow text-[11px] before:h-px before:flex-1 before:bg-border/60 before:content-[''] after:h-px after:flex-1 after:bg-border/60 after:content-['']", className), ...props, children: _jsx("span", { className: "shrink-0", children: label }) }));
15
+ }
16
+ return (_jsx(BaseSeparator, { "data-slot": "separator", orientation: orientation, className: sx("shrink-0 bg-border/60 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:min-h-4 data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch", className), ...props }));
17
+ }
@@ -0,0 +1,147 @@
1
+ import { useRender } from "@base-ui/react/use-render";
2
+ import * as React from "react";
3
+ import { type ButtonProps } from "./button.js";
4
+ import { type ScrollAreaProps } from "./scroll-area.js";
5
+ import { type SeparatorProps } from "./separator.js";
6
+ /**
7
+ * How the sidebar collapses on desktop. `offcanvas` slides it away entirely, `icon` shrinks it to
8
+ * a rail of 38px icon squares with tooltips, `none` keeps it open. On mobile, `offcanvas` and
9
+ * `icon` both become a sheet.
10
+ */
11
+ export type SidebarCollapsible = "offcanvas" | "icon" | "none";
12
+ export interface SidebarContextValue {
13
+ /** `expanded` or `collapsed` — the desktop state. */
14
+ state: "expanded" | "collapsed";
15
+ /** Desktop open state. */
16
+ open: boolean;
17
+ setOpen: (open: boolean) => void;
18
+ /** Mobile sheet open state. */
19
+ openMobile: boolean;
20
+ setOpenMobile: (open: boolean) => void;
21
+ /** Below 768px the sidebar is a sheet. */
22
+ isMobile: boolean;
23
+ /** Toggles the sheet on mobile and the panel on desktop. */
24
+ toggleSidebar: () => void;
25
+ collapsible: SidebarCollapsible;
26
+ }
27
+ /**
28
+ * useSidebar — the app shell's state, for building your own trigger or reacting to collapse:
29
+ * `{ state, open, setOpen, openMobile, setOpenMobile, isMobile, toggleSidebar, collapsible }`.
30
+ * Must be used inside a `SidebarProvider`.
31
+ */
32
+ export declare function useSidebar(): SidebarContextValue;
33
+ export interface SidebarProviderProps extends React.ComponentProps<"div"> {
34
+ /** Initial desktop state when uncontrolled. Pass the cookie value here when rendering on a server. */
35
+ defaultOpen?: boolean;
36
+ /** Controlled desktop state. */
37
+ open?: boolean;
38
+ onOpenChange?: (open: boolean) => void;
39
+ /** How the sidebar collapses on desktop. Defaults to `offcanvas`. */
40
+ collapsible?: SidebarCollapsible;
41
+ /**
42
+ * Where the desktop state is remembered (localStorage and a cookie of this name). `null`
43
+ * turns persistence off. Defaults to `"zon-sidebar"`.
44
+ */
45
+ storageKey?: string | null;
46
+ /**
47
+ * Key that toggles the sidebar with ⌘ on Apple devices and Ctrl elsewhere — never the other, so
48
+ * Ctrl+B still moves the caret back in a Mac's text field. `false` turns it off. Defaults to `"b"`.
49
+ */
50
+ keyboardShortcut?: string | false;
51
+ }
52
+ /**
53
+ * SidebarProvider — turns a `Sidebar` into an app shell: open state, collapse (`offcanvas`,
54
+ * `icon` or `none`), ⌘B on a Mac and Ctrl+B elsewhere, a sheet on mobile and a remembered state.
55
+ *
56
+ * It renders the shell's flex row; put the `Sidebar` and a `SidebarInset` inside. The shell is
57
+ * at least the viewport tall (`min-h-svh`) — give it a fixed height (`h-[560px] min-h-0`) to
58
+ * embed it in a page. Widths come from `--sidebar-width` (16rem) and `--sidebar-width-icon`.
59
+ */
60
+ export declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange, collapsible, storageKey, keyboardShortcut, className, style, children, ...props }: SidebarProviderProps): React.JSX.Element;
61
+ export interface SidebarProps extends React.ComponentProps<"nav"> {
62
+ /** In an app shell: which edge the panel sits on. Put a right sidebar after the `SidebarInset`. */
63
+ side?: "left" | "right";
64
+ /**
65
+ * In an app shell: `sidebar` (default) divides the panel from the page with a hairline;
66
+ * `inset` drops the hairline and sets the page beside it as a raised 20px panel with an 8px
67
+ * margin, so the sidebar reads as the ground the work sits on; `floating` is the reverse — the
68
+ * sidebar itself is the raised 20px panel, 8px from the shell's edges, beside a flat page.
69
+ * Desktop only.
70
+ */
71
+ variant?: "sidebar" | "inset" | "floating";
72
+ /**
73
+ * `default` 38px rows; `sm` the dense sidebar: 30px rows, 13px labels, tighter groups and a
74
+ * narrower icon rail, for tools with many sections. Controls inside (a search field, a
75
+ * button in the header) take the 30px height too.
76
+ */
77
+ size?: "default" | "sm";
78
+ }
79
+ /**
80
+ * Sidebar — section navigation for docs, settings and dashboards.
81
+ *
82
+ * A `<nav>` of `SidebarGroup`s, each with an eyebrow `SidebarGroupLabel` and 38px
83
+ * `SidebarItem` rows at 12px radius. Rows are flat at rest, share one soft hover fill that glides
84
+ * with the pointer, and take the raised material when current. The rule people break: marking the current page with a flat fill or
85
+ * a bold weight. Set `current` (it writes `aria-current="page"`) and let the material show it.
86
+ * A sidebar never shows a scrollbar: a long one goes in `<ScrollArea scrollbar={false}>`.
87
+ *
88
+ * Inside a `SidebarProvider` it becomes the app shell's panel: a full-height column divided from
89
+ * the page by a hairline, holding `SidebarHeader`, `SidebarContent` and `SidebarFooter`. It
90
+ * collapses on desktop and turns into a sheet on mobile.
91
+ */
92
+ export declare function Sidebar({ side, variant, size, className, children, ...props }: SidebarProps): React.JSX.Element;
93
+ /** The top of an app-shell sidebar: a logo, a workspace switcher, a search row. Never scrolls. */
94
+ export declare function SidebarHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
95
+ /** The bottom of an app-shell sidebar: the account, settings, help. Never scrolls. */
96
+ export declare function SidebarFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
97
+ export interface SidebarContentProps extends ScrollAreaProps {
98
+ }
99
+ /**
100
+ * The scrolling middle of an app-shell sidebar, holding the `SidebarGroup`s 28px apart. It is a
101
+ * `ScrollArea` with `scrollbar={false}`: it scrolls, never shows a bar, and fades at the edges.
102
+ */
103
+ export declare function SidebarContent({ className, contentClassName, ...props }: SidebarContentProps): React.JSX.Element;
104
+ /** A hairline between the header, content and footer, inset 12px to line up with the rows. Inside `SidebarContent` pass `mx-0`. */
105
+ export declare function SidebarSeparator({ className, ...props }: SeparatorProps): React.JSX.Element;
106
+ /** A labelled group of rows. Pair it with a `SidebarGroupLabel`. */
107
+ export declare function SidebarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
108
+ /**
109
+ * The eyebrow above a group: 12px mono, uppercase, 0.18em tracking. In the icon rail it fades
110
+ * and folds away with the panel's width (a negative margin of its own fixed height), so the rows
111
+ * glide up instead of jumping; screen readers still hear it.
112
+ */
113
+ export declare function SidebarGroupLabel({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
114
+ export interface SidebarItemProps extends useRender.ComponentProps<"a"> {
115
+ /** The current page. Sets `aria-current="page"` and the raised treatment. */
116
+ current?: boolean;
117
+ /**
118
+ * In an icon-collapsed sidebar, the tooltip beside the 38px square. Defaults to the row's text.
119
+ * `false` turns it off.
120
+ */
121
+ tooltip?: React.ReactNode;
122
+ }
123
+ /**
124
+ * One navigation row. Renders an `<a>`; pass `render={<Link to="…" />}` for router links.
125
+ * Leading icons are 16px; a trailing `Kbd`, `Tag` or `SidebarMenuBadge` is pushed to the end
126
+ * with `ml-auto`. In an icon-collapsed app shell it shrinks to a 38px square with a tooltip.
127
+ */
128
+ export declare function SidebarItem({ current, tooltip, render, ref, className, children, onClick, ...props }: SidebarItemProps): React.JSX.Element;
129
+ /** A count at the end of a row ("12"): mono, tabular, muted. Hidden in the icon rail. */
130
+ export declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
131
+ /**
132
+ * The button that opens and closes the sidebar: a circular ghost icon button, usually first in
133
+ * the inset's toolbar. On mobile it opens the sheet. Shows the ⌘B / Ctrl+B shortcut's action.
134
+ */
135
+ export declare function SidebarTrigger({ variant, size, className, children, onClick, ...props }: ButtonProps): React.JSX.Element;
136
+ /**
137
+ * A thin strip along the sidebar's inner edge: hover shows the hairline in `--control-focus`,
138
+ * click toggles the sidebar. A pointer convenience — keyboard users have the trigger and ⌘B.
139
+ */
140
+ export declare function SidebarRail({ className, onClick, ...props }: React.ComponentProps<"button">): React.JSX.Element | null;
141
+ /**
142
+ * The main area beside an app-shell sidebar: a `<main>` column that takes the remaining width.
143
+ * Put a toolbar row (with `SidebarTrigger`) first, then the page. Beside a `variant="inset"`
144
+ * sidebar it becomes a raised 20px panel with an 8px margin (styles in parts/navigation.css).
145
+ * Otherwise it has no fill of its own: the page ground shows through.
146
+ */
147
+ export declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): React.JSX.Element;