@zonsh/ui 0.0.0-stage → 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 +76 -2
  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 +189 -3
@@ -0,0 +1,23 @@
1
+ import { Toggle as BaseToggle } from "@base-ui/react/toggle";
2
+ declare const sizes: {
3
+ readonly sm: "min-h-(--control-h-sm) gap-1.5 px-3 text-[13px]";
4
+ readonly default: "min-h-(--control-h) gap-2 px-4 text-sm";
5
+ readonly icon: "size-(--icon-button) rounded-full p-0";
6
+ readonly "icon-sm": "size-(--control-h-sm) rounded-full p-0";
7
+ };
8
+ export type ToggleSize = keyof typeof sizes;
9
+ export interface ToggleProps<Value extends string = string> extends BaseToggle.Props<Value> {
10
+ size?: ToggleSize;
11
+ }
12
+ /**
13
+ * Toggle — a raised button that stays pressed. Off, it is the quiet raised surface with soft
14
+ * ink, and hover only brightens the ink. On, it sinks into the surface: the hover fill, a deeper inset shadow, the
15
+ * `--control-focus` edge of a current item and full foreground ink. Never a colour fill or
16
+ * layout movement.
17
+ *
18
+ * Use it for a single on/off tool ("Show grid", bold, pin). For a choice between options use
19
+ * `ToggleGroup`; for a form value use `Checkbox` or `Switch`. Icon sizes are circular and need
20
+ * an `aria-label` — and keep that label constant; the pressed state is announced separately.
21
+ */
22
+ export declare function Toggle<Value extends string = string>({ size, className, ...props }: ToggleProps<Value>): import("react").JSX.Element;
23
+ export {};
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Toggle as BaseToggle } from "@base-ui/react/toggle";
4
+ import { sx } from "../lib/cn.js";
5
+ const sizes = {
6
+ sm: "min-h-(--control-h-sm) gap-1.5 px-3 text-[13px]",
7
+ default: "min-h-(--control-h) gap-2 px-4 text-sm",
8
+ icon: "size-(--icon-button) rounded-full p-0",
9
+ "icon-sm": "size-(--control-h-sm) rounded-full p-0",
10
+ };
11
+ /**
12
+ * Toggle — a raised button that stays pressed. Off, it is the quiet raised surface with soft
13
+ * ink, and hover only brightens the ink. On, it sinks into the surface: the hover fill, a deeper inset shadow, the
14
+ * `--control-focus` edge of a current item and full foreground ink. Never a colour fill or
15
+ * layout movement.
16
+ *
17
+ * Use it for a single on/off tool ("Show grid", bold, pin). For a choice between options use
18
+ * `ToggleGroup`; for a form value use `Checkbox` or `Switch`. Icon sizes are circular and need
19
+ * an `aria-label` — and keep that label constant; the pressed state is announced separately.
20
+ */
21
+ export function Toggle({ size = "default", className, ...props }) {
22
+ return (_jsx(BaseToggle, { "data-slot": "toggle", "data-size": size, className: sx([
23
+ // The raised material, written out: the shared utility fills on hover, which would
24
+ // read as "on". Hover here only brightens the ink; the pressed inset lives in controls.css.
25
+ "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-button border border-transparent bg-control-surface bg-linear-to-b from-control-inner-edge to-transparent font-body leading-none font-medium whitespace-nowrap shadow-raised focus-ring select-none",
26
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
27
+ // Off is the quiet raised surface with soft ink; on sinks in behind the focus-grey edge.
28
+ "text-foreground-soft hover:not-data-disabled:text-foreground",
29
+ "data-pressed:bg-control-hover data-pressed:text-foreground data-pressed:shadow-(--toggle-shadow-pressed)",
30
+ // Only a natively disabled toggle ignores the pointer; drawn by a ToolbarButton it stays
31
+ // focusable while disabled and still takes hover, so a tooltip can say why.
32
+ "disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50",
33
+ sizes[size],
34
+ ], className), ...props }));
35
+ }
@@ -0,0 +1,52 @@
1
+ import type { Collapsible as BaseCollapsible } from "@base-ui/react/collapsible";
2
+ import * as React from "react";
3
+ /** Where a tool call is: queued, running, finished, or failed. */
4
+ export type ToolCallStatus = "pending" | "running" | "completed" | "error";
5
+ export interface ToolCallProps extends Omit<BaseCollapsible.Root.Props, "children"> {
6
+ /** The tool's name as the model called it, shown in mono: `search_orders`. */
7
+ name: string;
8
+ status: ToolCallStatus;
9
+ /** A 14px icon before the name. Default: a wrench. */
10
+ icon?: React.ReactNode;
11
+ /** Status labels, e.g. for another language. */
12
+ labels?: Partial<Record<ToolCallStatus, string>>;
13
+ /**
14
+ * Colour the parameters and the result as code — JSON for objects — in the zon theme. Needs a
15
+ * `CodeHighlightProvider` (from `@zonsh/ui/code-highlight`) above it; otherwise they stay mono.
16
+ */
17
+ highlight?: boolean;
18
+ /** `ToolCallInput` and `ToolCallOutput`. */
19
+ children?: React.ReactNode;
20
+ }
21
+ /**
22
+ * ToolCall — a tool the model used, as a 20px card: the tool's name in mono, its status as a
23
+ * tag (a spinner while it runs, a green check when done, red on error), and, folded under it,
24
+ * what it was called with and what it returned.
25
+ *
26
+ * The rule people break: opening every tool call by default. Most readers want the answer;
27
+ * the calls are there to check it.
28
+ */
29
+ export declare function ToolCall({ name, status, icon, labels, highlight, className, children, ...props }: ToolCallProps): React.JSX.Element;
30
+ export interface ToolCallInputProps {
31
+ /** What the tool was called with; objects show as JSON. */
32
+ input: unknown;
33
+ /** The heading. Default `Parameters`. */
34
+ label?: React.ReactNode;
35
+ /** The language of a string `input`, e.g. `"bash"` for a command; objects are always JSON. */
36
+ language?: string;
37
+ }
38
+ /** What the model called the tool with, as a code block. */
39
+ export declare function ToolCallInput({ input, label, language }: ToolCallInputProps): React.JSX.Element;
40
+ export interface ToolCallOutputProps {
41
+ /** What the tool returned; objects show as JSON. Children replace it, e.g. a table. */
42
+ output?: unknown;
43
+ /** The error, when the call failed: shown in red with an icon instead of the output. */
44
+ errorText?: string;
45
+ /** The heading. Default `Result`, or `Error`. */
46
+ label?: React.ReactNode;
47
+ /** The language of a string `output`, e.g. `"html"`; objects are always JSON. */
48
+ language?: string;
49
+ children?: React.ReactNode;
50
+ }
51
+ /** What the tool returned: a code block, your own rendering as children, or the error. */
52
+ export declare function ToolCallOutput({ output, errorText, label, language, children }: ToolCallOutputProps): React.JSX.Element;
@@ -0,0 +1,57 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { CheckIcon, ChevronDownIcon, CircleAlertIcon, CircleDashedIcon, WrenchIcon } from "lucide-react";
4
+ import * as React from "react";
5
+ import { cn, sx } from "../lib/cn.js";
6
+ import { CodeBlock } from "./code-block.js";
7
+ import { Collapsible, CollapsiblePanel, CollapsibleTrigger } from "./collapsible.js";
8
+ import { Spinner } from "./spinner.js";
9
+ import { Tag } from "./tag.js";
10
+ const statusLabels = {
11
+ pending: "Pending",
12
+ running: "Running",
13
+ completed: "Completed",
14
+ error: "Error",
15
+ };
16
+ /** Whether the call's input and output colour their code: set once on ToolCall. */
17
+ const HighlightContext = React.createContext(false);
18
+ /**
19
+ * ToolCall — a tool the model used, as a 20px card: the tool's name in mono, its status as a
20
+ * tag (a spinner while it runs, a green check when done, red on error), and, folded under it,
21
+ * what it was called with and what it returned.
22
+ *
23
+ * The rule people break: opening every tool call by default. Most readers want the answer;
24
+ * the calls are there to check it.
25
+ */
26
+ export function ToolCall({ name, status, icon, labels, highlight = false, className, children, ...props }) {
27
+ const label = labels?.[status] ?? statusLabels[status];
28
+ return (_jsx(HighlightContext.Provider, { value: highlight, children: _jsxs(Collapsible, { "data-slot": "tool-call", "data-status": status, className: sx("overflow-hidden surface-card [--card-padding:0]", className), ...props, children: [_jsxs(CollapsibleTrigger, { "data-slot": "tool-call-trigger", showIcon: false, className: "w-full justify-between gap-3 px-4 py-2.5 text-foreground", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { "aria-hidden": true, className: "flex shrink-0 text-muted-foreground [&_svg]:size-3.5", children: icon ?? _jsx(WrenchIcon, {}) }), _jsx("span", { className: "truncate", children: name })] }), _jsxs("span", { className: "flex shrink-0 items-center gap-2", children: [_jsxs(Tag, { "data-slot": "tool-call-status", variant: status === "error" ? "destructive" : status === "completed" ? "default" : "muted", children: [status === "running" ? (_jsx(Spinner, { size: "sm", label: label })) : status === "completed" ? (_jsx(CheckIcon, { "aria-hidden": true, className: "text-success" })) : status === "error" ? (_jsx(CircleAlertIcon, { "aria-hidden": true })) : (_jsx(CircleDashedIcon, { "aria-hidden": true })), _jsx("span", { "aria-hidden": status === "running" || undefined, children: label })] }), _jsx(ChevronDownIcon, { "aria-hidden": true, className: "size-3.5 text-muted-foreground transition-[rotate] duration-(--duration) ease-(--ease) group-data-panel-open/collapsible-trigger:rotate-180" })] })] }), _jsx(CollapsiblePanel, { "data-slot": "tool-call-panel", children: _jsx("div", { className: "flex flex-col gap-4 border-t border-border/60 p-4", children: children }) })] }) }));
29
+ }
30
+ function Section({ label, children, slot, }) {
31
+ return (_jsxs("section", { "data-slot": slot, className: "flex min-w-0 flex-col gap-2", children: [_jsx("h4", { className: "m-0 eyebrow text-[11px]", children: label }), children] }));
32
+ }
33
+ /** A value as text: strings as they are, the rest as JSON — a BigInt as its digits, and a value
34
+ * JSON cannot hold (one that contains itself) as `String(value)`, never an error. */
35
+ function asCode(value) {
36
+ if (typeof value === "string")
37
+ return value;
38
+ try {
39
+ return JSON.stringify(value, (_key, v) => (typeof v === "bigint" ? v.toString() : v), 2);
40
+ }
41
+ catch {
42
+ return String(value);
43
+ }
44
+ }
45
+ /** A value as a CodeBlock: objects as JSON, strings in `language` if one is given. */
46
+ function ValueCode({ value, language }) {
47
+ const highlight = React.useContext(HighlightContext);
48
+ return (_jsx(CodeBlock, { code: asCode(value), language: language ?? (typeof value === "string" ? undefined : "json"), highlight: highlight }));
49
+ }
50
+ /** What the model called the tool with, as a code block. */
51
+ export function ToolCallInput({ input, label = "Parameters", language }) {
52
+ return (_jsx(Section, { slot: "tool-call-input", label: label, children: _jsx(ValueCode, { value: input, language: language }) }));
53
+ }
54
+ /** What the tool returned: a code block, your own rendering as children, or the error. */
55
+ export function ToolCallOutput({ output, errorText, label, language, children }) {
56
+ return (_jsx(Section, { slot: "tool-call-output", label: label ?? (errorText ? "Error" : "Result"), children: errorText ? (_jsxs("p", { className: "m-0 flex items-start gap-2 text-sm text-destructive", children: [_jsx(CircleAlertIcon, { "aria-hidden": true, className: "mt-0.5 size-4 shrink-0" }), errorText] })) : children != null ? (_jsx("div", { className: cn("min-w-0 text-sm text-foreground-soft"), children: children })) : (_jsx(ValueCode, { value: output, language: language })) }));
57
+ }
@@ -0,0 +1,17 @@
1
+ import { Toolbar as BaseToolbar } from "@base-ui/react/toolbar";
2
+ /**
3
+ * Toolbar — a dense row of related commands (editor formatting, table actions, view options).
4
+ *
5
+ * A 12px surface in the shared material holding 30px `ToolbarButton`s. Off, a button is flat
6
+ * and muted; hover only brightens its text and icon; on (`aria-pressed`) it is raised; a press
7
+ * shows the pressed inset (styles in parts/navigation.css). Arrow keys move between items; Tab leaves the toolbar.
8
+ * The rule people break: mixing 38px controls into it. A toolbar is a dense surface — every
9
+ * control inside is 30px (`size="sm"` on `Select`, `Input` and `Button`).
10
+ */
11
+ export declare function Toolbar({ className, ...props }: BaseToolbar.Root.Props): import("react").JSX.Element;
12
+ /** A 30px command. Icon-only buttons need an `aria-label`. Toggles set `aria-pressed`. */
13
+ export declare function ToolbarButton({ className, ...props }: BaseToolbar.Button.Props): import("react").JSX.Element;
14
+ /** A run of related buttons, e.g. bold / italic / underline. */
15
+ export declare function ToolbarGroup({ className, ...props }: BaseToolbar.Group.Props): import("react").JSX.Element;
16
+ /** A hairline between groups. It orients itself across the toolbar. */
17
+ export declare function ToolbarSeparator({ className, ...props }: BaseToolbar.Separator.Props): import("react").JSX.Element;
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Toolbar as BaseToolbar } from "@base-ui/react/toolbar";
4
+ import { sx } from "../lib/cn.js";
5
+ /**
6
+ * Toolbar — a dense row of related commands (editor formatting, table actions, view options).
7
+ *
8
+ * A 12px surface in the shared material holding 30px `ToolbarButton`s. Off, a button is flat
9
+ * and muted; hover only brightens its text and icon; on (`aria-pressed`) it is raised; a press
10
+ * shows the pressed inset (styles in parts/navigation.css). Arrow keys move between items; Tab leaves the toolbar.
11
+ * The rule people break: mixing 38px controls into it. A toolbar is a dense surface — every
12
+ * control inside is 30px (`size="sm"` on `Select`, `Input` and `Button`).
13
+ */
14
+ export function Toolbar({ className, ...props }) {
15
+ return (_jsx(BaseToolbar.Root, { "data-slot": "toolbar", className: sx("inline-flex w-fit items-center gap-1 rounded-button p-1 surface-container data-[orientation=vertical]:flex-col", className), ...props }));
16
+ }
17
+ /** A 30px command. Icon-only buttons need an `aria-label`. Toggles set `aria-pressed`. */
18
+ export function ToolbarButton({ className, ...props }) {
19
+ return (_jsx(BaseToolbar.Button, { "data-slot": "toolbar-button", className: sx([
20
+ "inline-flex min-h-(--control-h-sm) min-w-(--control-h-sm) shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-item px-2 font-body text-[13px] leading-none whitespace-nowrap focus-ring select-none",
21
+ // A disabled toolbar button stays focusable (Base UI) and still takes hover, so a tooltip
22
+ // can say why; its clicks stay inert. Only a natively disabled one ignores the pointer.
23
+ "disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50",
24
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
25
+ ], className), ...props }));
26
+ }
27
+ /** A run of related buttons, e.g. bold / italic / underline. */
28
+ export function ToolbarGroup({ className, ...props }) {
29
+ return (_jsx(BaseToolbar.Group, { "data-slot": "toolbar-group", className: sx("flex items-center gap-0.5 data-[orientation=vertical]:flex-col", className), ...props }));
30
+ }
31
+ /** A hairline between groups. It orients itself across the toolbar. */
32
+ export function ToolbarSeparator({ className, ...props }) {
33
+ return (_jsx(BaseToolbar.Separator, { "data-slot": "toolbar-separator", className: sx("shrink-0 bg-border data-[orientation=horizontal]:my-1 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-4 data-[orientation=vertical]:mx-1 data-[orientation=vertical]:h-4 data-[orientation=vertical]:w-px", className), ...props }));
34
+ }
@@ -0,0 +1,42 @@
1
+ import { Tooltip as BaseTooltip } from "@base-ui/react/tooltip";
2
+ import * as React from "react";
3
+ /**
4
+ * TooltipProvider — shares one quick delay across every tooltip below it, so moving from one
5
+ * icon button to the next opens the next tooltip instantly. Wrap the app (or a toolbar) once.
6
+ */
7
+ export declare function TooltipProvider({ delay, closeDelay, ...props }: BaseTooltip.Provider.Props): React.JSX.Element;
8
+ /**
9
+ * Tooltip — a short label for a control that has no visible text, shown on hover and focus.
10
+ *
11
+ * The rule people break: putting essential information or interactive content in it. Tooltips
12
+ * are invisible on touch; anything people must read or click belongs in a `Popover` or on the page.
13
+ */
14
+ export declare const Tooltip: <Payload>(props: BaseTooltip.Root.Props<Payload>) => React.JSX.Element;
15
+ /**
16
+ * The element the tooltip describes. Compose with a control: `render={<Button size="icon" … />}`.
17
+ * It opens after the provider's delay, or the same quick 150ms without one; pass `delay` for a
18
+ * tooltip that should wait longer.
19
+ */
20
+ export declare function TooltipTrigger({ delay, ...props }: BaseTooltip.Trigger.Props): React.JSX.Element;
21
+ declare const tooltipVariants: {
22
+ /** 12px Licht Mono — labels, shortcuts, values. */
23
+ readonly mono: "font-mono text-xs leading-4 tracking-normal";
24
+ /** 13px Licht Sans — a short sentence. */
25
+ readonly text: "font-body text-[13px] leading-snug";
26
+ };
27
+ export interface TooltipContentProps extends BaseTooltip.Popup.Props {
28
+ variant?: keyof typeof tooltipVariants;
29
+ side?: BaseTooltip.Positioner.Props["side"];
30
+ align?: BaseTooltip.Positioner.Props["align"];
31
+ sideOffset?: BaseTooltip.Positioner.Props["sideOffset"];
32
+ alignOffset?: BaseTooltip.Positioner.Props["alignOffset"];
33
+ /** Any other positioner props: `collisionPadding`, `sticky`, `anchor` … */
34
+ positioner?: Omit<BaseTooltip.Positioner.Props, "children">;
35
+ /** Props for the portal (e.g. `container`). */
36
+ portal?: Omit<BaseTooltip.Portal.Props, "children">;
37
+ /** Draw a small notch pointing at the trigger. */
38
+ arrow?: boolean;
39
+ }
40
+ /** Portal + Positioner + Popup. Menu material at the 7px item radius, `popup-motion`. */
41
+ export declare function TooltipContent({ variant, side, align, sideOffset, alignOffset, positioner, portal, arrow, className, children, dir, ...props }: TooltipContentProps): React.JSX.Element;
42
+ export {};
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Tooltip as BaseTooltip } from "@base-ui/react/tooltip";
4
+ import * as React from "react";
5
+ import { sx, triggerSlot } from "../lib/cn.js";
6
+ import { overlayArrow, usePopupDir } from "./_overlay.js";
7
+ /** The quick open delay (ms): long enough to pass over a control without a flash, short enough to feel immediate. */
8
+ const TOOLTIP_DELAY = 150;
9
+ /** True below a TooltipProvider, whose delay a trigger then inherits. */
10
+ const InProviderContext = React.createContext(false);
11
+ /**
12
+ * TooltipProvider — shares one quick delay across every tooltip below it, so moving from one
13
+ * icon button to the next opens the next tooltip instantly. Wrap the app (or a toolbar) once.
14
+ */
15
+ export function TooltipProvider({ delay = TOOLTIP_DELAY, closeDelay = 0, ...props }) {
16
+ return (_jsx(InProviderContext.Provider, { value: true, children: _jsx(BaseTooltip.Provider, { delay: delay, closeDelay: closeDelay, ...props }) }));
17
+ }
18
+ /**
19
+ * Tooltip — a short label for a control that has no visible text, shown on hover and focus.
20
+ *
21
+ * The rule people break: putting essential information or interactive content in it. Tooltips
22
+ * are invisible on touch; anything people must read or click belongs in a `Popover` or on the page.
23
+ */
24
+ export const Tooltip = BaseTooltip.Root;
25
+ /**
26
+ * The element the tooltip describes. Compose with a control: `render={<Button size="icon" … />}`.
27
+ * It opens after the provider's delay, or the same quick 150ms without one; pass `delay` for a
28
+ * tooltip that should wait longer.
29
+ */
30
+ export function TooltipTrigger({ delay, ...props }) {
31
+ const inProvider = React.useContext(InProviderContext);
32
+ return (_jsx(BaseTooltip.Trigger, { ...triggerSlot("tooltip-trigger", props.render), delay: delay ?? (inProvider ? undefined : TOOLTIP_DELAY), ...props }));
33
+ }
34
+ const tooltipVariants = {
35
+ /** 12px Licht Mono — labels, shortcuts, values. */
36
+ mono: "font-mono text-xs leading-4 tracking-normal",
37
+ /** 13px Licht Sans — a short sentence. */
38
+ text: "font-body text-[13px] leading-snug",
39
+ };
40
+ /** Portal + Positioner + Popup. Menu material at the 7px item radius, `popup-motion`. */
41
+ export function TooltipContent({ variant = "mono", side = "top", align = "center", sideOffset = 6, alignOffset = 0, positioner, portal, arrow = false, className, children, dir, ...props }) {
42
+ const popupDir = usePopupDir(dir);
43
+ return (_jsx(BaseTooltip.Portal, { ...portal, children: _jsx(BaseTooltip.Positioner, { side: side, align: align, sideOffset: sideOffset, alignOffset: alignOffset, arrowPadding: 8, collisionPadding: 8, dir: popupDir, ...positioner, className: "z-50 outline-none", children: _jsxs(BaseTooltip.Popup, { "data-slot": "tooltip-content", "data-variant": variant, className: sx([
44
+ "relative max-w-64 popup-motion rounded-item material-menu px-2 py-1 break-words text-foreground outline-none select-none",
45
+ tooltipVariants[variant],
46
+ ], className), ...props, children: [arrow && _jsx(BaseTooltip.Arrow, { "data-slot": "tooltip-arrow", className: overlayArrow }), children] }) }) }));
47
+ }
@@ -0,0 +1,75 @@
1
+ import * as React from "react";
2
+ /** One node of a `Tree`. Ids must be unique across the whole tree. */
3
+ export interface TreeNode {
4
+ /** Unique across the tree: selection and expansion are kept by id. */
5
+ id: string;
6
+ /** The row's text. Keep it short: rows truncate rather than wrap. */
7
+ label: React.ReactNode;
8
+ /**
9
+ * A 16px leading icon, or a function of the row's state — a folder that opens:
10
+ * `icon: ({ expanded }) => expanded ? <FolderOpenIcon /> : <FolderIcon />`.
11
+ */
12
+ icon?: React.ReactNode | ((state: TreeNodeState) => React.ReactNode);
13
+ /** Trailing detail at the row's end in mono: a count, a status letter, a `Kbd`. */
14
+ meta?: React.ReactNode;
15
+ /** Child nodes. A node with children (even an empty list) is a branch and can expand. */
16
+ children?: TreeNode[];
17
+ /** Focusable, but it cannot be selected or expanded. */
18
+ disabled?: boolean;
19
+ /** Renders the row as a link (docs navigation); Enter follows it. */
20
+ href?: string;
21
+ /** The text type-ahead matches. Defaults to the label when it is a string. */
22
+ textValue?: string;
23
+ }
24
+ /** What a node's `icon` function receives. */
25
+ export interface TreeNodeState {
26
+ expanded: boolean;
27
+ selected: boolean;
28
+ level: number;
29
+ }
30
+ /** `single` (default) keeps one selected node; `multiple` many; `none` turns selection off. */
31
+ export type TreeSelectionMode = "single" | "multiple" | "none";
32
+ export interface TreeProps extends Omit<React.ComponentProps<"ul">, "children" | "onSelect"> {
33
+ /** The nodes, nested through `children`. */
34
+ items: TreeNode[];
35
+ /** `default` 38px rows; `sm` 30px rows and 13px labels for dense panels (a file explorer). */
36
+ size?: "default" | "sm";
37
+ selectionMode?: TreeSelectionMode;
38
+ /** Selected ids, controlled. Pair with `onSelectedChange`. */
39
+ selected?: string[];
40
+ /** Selected ids on first render, uncontrolled. */
41
+ defaultSelected?: string[];
42
+ onSelectedChange?: (selected: string[]) => void;
43
+ /** Expanded branch ids, controlled. Pair with `onExpandedChange`. */
44
+ expanded?: string[];
45
+ /** Expanded branch ids on first render, uncontrolled. */
46
+ defaultExpanded?: string[];
47
+ onExpandedChange?: (expanded: string[]) => void;
48
+ /**
49
+ * A node was activated — clicked, or Enter pressed on it — after selection is applied. Open the
50
+ * file here, or route a link: call `event.preventDefault()` to stop an `href` from navigating.
51
+ */
52
+ onAction?: (node: TreeNode, event: React.SyntheticEvent) => void;
53
+ /** Draw the indentation guides: a hairline down from each open branch. Defaults to `true`. */
54
+ guides?: boolean;
55
+ /**
56
+ * Render only the rows in view, so a tree of thousands of open nodes mounts and moves at once.
57
+ * On by default for trees of more than 500 nodes. The tree scrolls with the box around it that
58
+ * scrolls — a `ScrollArea`, a panel with a height and `overflow-auto` — or with the page.
59
+ * Branches then open and close without easing, and find-in-page sees only the rows on screen.
60
+ */
61
+ virtualized?: boolean;
62
+ }
63
+ /**
64
+ * Tree — a hierarchical list: files and folders, nested settings, a docs table of contents. Rows
65
+ * are 38px (30px with `size="sm"`) at 7px corners: hover lifts a row like a highlighted menu item,
66
+ * the selection is the raised row, a chevron turns as a branch opens, and a hairline guide runs
67
+ * down from each open branch.
68
+ *
69
+ * Data in, not parts: pass `items` and the tree owns the WAI-ARIA tree pattern — one tab stop,
70
+ * arrows that walk and open, Home/End, type-ahead, Space/Enter to select, Shift and ⌘ (Ctrl off
71
+ * a Mac) to extend in `multiple` mode. Past 500 nodes it renders only the rows in view (`virtualized`).
72
+ * The rule people break: a tree for two levels of a few items — that is a `Sidebar` with groups,
73
+ * or an `Accordion`.
74
+ */
75
+ export declare function Tree({ items, size, selectionMode, selected: selectedProp, defaultSelected, onSelectedChange, expanded: expandedProp, defaultExpanded, onExpandedChange, onAction, guides, virtualized, ref, className, onKeyDown, onFocus, onBlur, ...props }: TreeProps): React.JSX.Element;