@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,76 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import * as React from "react";
5
+ import { cn } from "../lib/cn.js";
6
+ /*
7
+ * Which kind? Ask first whether a hairline rule and whitespace would do: that is `plain`. Then
8
+ * whether the thing could be picked up and moved somewhere else on its own — a quote, a pricing
9
+ * option, a form panel: that is a card, `default` (20px, the one soft drop shadow). A section
10
+ * panel, a specimen sheet, a page cover could not: it is part of the page, `square` (no radius,
11
+ * no shadow). When unsure, prefer square — and before either, plain. Boxing every group
12
+ * flattens the hierarchy.
13
+ */
14
+ const cardVariants = {
15
+ /** An object on the page: the card material, 20px corners, the system's only drop shadow. */
16
+ default: "surface-card",
17
+ /** A part of the page: the same material, square, no shadow, the card's padding. */
18
+ square: "rounded-none surface-container p-[var(--card-padding,24px)] sm:p-[var(--card-padding,32px)] md:p-[var(--card-padding,40px)]",
19
+ /** No box: no border, no ground, no shadow — a top hairline and whitespace. */
20
+ plain: "border-t border-border/60 pt-6 pb-8",
21
+ };
22
+ /**
23
+ * Card — a group of content in one of three kinds. `default` is an **object** sitting *on* the
24
+ * page (a quote, a pricing option, a form panel): `surface-card` material, 20px radius, the
25
+ * system's only drop shadow, and responsive 24/32/40px padding that belongs to the card — never
26
+ * pad it at the call site. `square` is a **part of** the page (a section panel, a specimen sheet,
27
+ * a cover): the same material, square, no shadow. `plain` is **no box**: a top hairline and
28
+ * whitespace, for features, steps and principles laid out in a grid.
29
+ *
30
+ * Could it be picked up and moved somewhere else on its own? Yes → `default`. No → `square`.
31
+ * Would a rule and whitespace do? → `plain`, before either. The rule people break: wrapping
32
+ * content in a card because it feels tidier, or rounding a part of the page.
33
+ */
34
+ export function Card({ variant = "default", render, ref, className, ...props }) {
35
+ return useRender({
36
+ defaultTagName: "div",
37
+ render,
38
+ ref,
39
+ props: {
40
+ "data-slot": "card",
41
+ "data-variant": variant,
42
+ ...props,
43
+ className: cn("flex flex-col gap-6 text-card-foreground", cardVariants[variant], className),
44
+ },
45
+ });
46
+ }
47
+ /** Title + description stack at the top of a card. */
48
+ export function CardHeader({ className, ...props }) {
49
+ return _jsx("div", { "data-slot": "card-header", className: cn("flex flex-col gap-2", className), ...props });
50
+ }
51
+ /** The card's heading, in Licht. Renders an `<h3>`; use `render` for another level. */
52
+ export function CardTitle({ render, ref, className, ...props }) {
53
+ return useRender({
54
+ defaultTagName: "h3",
55
+ render,
56
+ ref,
57
+ props: {
58
+ "data-slot": "card-title",
59
+ ...props,
60
+ // A long word with no break (a name, a URL) wraps instead of running past the card.
61
+ className: cn("m-0 display text-[24px] leading-[1.1] [overflow-wrap:anywhere] text-foreground sm:text-[28px]", className),
62
+ },
63
+ });
64
+ }
65
+ /** Supporting copy under the title. */
66
+ export function CardDescription({ className, ...props }) {
67
+ return (_jsx("p", { "data-slot": "card-description", className: cn("m-0 text-[15px] leading-relaxed [overflow-wrap:anywhere] text-muted-foreground", className), ...props }));
68
+ }
69
+ /** The card's body. */
70
+ export function CardContent({ className, ...props }) {
71
+ return (_jsx("div", { "data-slot": "card-content", className: cn("text-[15px] leading-relaxed text-foreground-soft", className), ...props }));
72
+ }
73
+ /** Actions or meta at the bottom of a card. One primary at most. */
74
+ export function CardFooter({ className, ...props }) {
75
+ return (_jsx("div", { "data-slot": "card-footer", className: cn("mt-auto flex flex-wrap items-center gap-3", className), ...props }));
76
+ }
@@ -0,0 +1,90 @@
1
+ import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
2
+ import * as React from "react";
3
+ import { type ButtonProps } from "./button.js";
4
+ /** The Embla instance, for `setApi` and `useCarousel().api`. */
5
+ export type CarouselApi = UseEmblaCarouselType[1];
6
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
7
+ /** Embla options (`align`, `loop`, `slidesToScroll`, `dragFree`, `startIndex` …). */
8
+ export type CarouselOptions = UseCarouselParameters[0];
9
+ /** Embla plugins (autoplay, class names, wheel gestures …). */
10
+ export type CarouselPlugin = UseCarouselParameters[1];
11
+ export type CarouselOrientation = "horizontal" | "vertical";
12
+ interface CarouselContextValue {
13
+ carouselRef: ReturnType<typeof useEmblaCarousel>[0];
14
+ api: CarouselApi;
15
+ orientation: CarouselOrientation;
16
+ /** Index of the selected snap (0-based). */
17
+ selectedIndex: number;
18
+ /** Number of snaps — the number of positions, not always the number of slides. */
19
+ snapCount: number;
20
+ canScrollPrev: boolean;
21
+ canScrollNext: boolean;
22
+ scrollPrev: () => void;
23
+ scrollNext: () => void;
24
+ scrollTo: (index: number) => void;
25
+ /** True under `prefers-reduced-motion`: every programmatic scroll jumps instead of gliding. */
26
+ reducedMotion: boolean;
27
+ }
28
+ /**
29
+ * useCarousel — the carousel's state and controls, for building your own counter or buttons
30
+ * inside a `Carousel`: `selectedIndex`, `snapCount`, `canScrollPrev`, `scrollNext()`, `api` …
31
+ */
32
+ export declare function useCarousel(): CarouselContextValue;
33
+ export interface CarouselProps extends React.ComponentProps<"div"> {
34
+ /** `horizontal` slides left/right; `vertical` slides up/down and needs a height on `CarouselContent`. */
35
+ orientation?: CarouselOrientation;
36
+ /** Embla options. `loop: true` wraps from the last slide to the first. */
37
+ opts?: CarouselOptions;
38
+ /** Embla plugins. */
39
+ plugins?: CarouselPlugin;
40
+ /** Receives the Embla instance once it is ready. */
41
+ setApi?: (api: CarouselApi) => void;
42
+ /** Accessible name of the carousel region, e.g. "Spec sheets". */
43
+ "aria-label"?: string;
44
+ }
45
+ /**
46
+ * Carousel — a row of slides moved one at a time: a wall of spec sheets, a series of
47
+ * illustrations, the steps of a short walkthrough. Built on Embla: drag, swipe, loop and
48
+ * arrow keys work out of the box; under reduced motion every move is instant.
49
+ *
50
+ * Controls are the brand's, not generic dots: `CarouselPrevious` / `CarouselNext` are circular
51
+ * secondary icon buttons and `CarouselDots` is a rail of hairline ticks (or a mono "01 / 07").
52
+ * Place them yourself — usually on one row under the slides.
53
+ *
54
+ * The rule people break: hiding content people need inside it. A carousel shows one thing at a
55
+ * time; anything that must be compared or read in full belongs on the page as a grid or list.
56
+ */
57
+ export declare function Carousel({ orientation, opts, plugins, setApi, className, children, onKeyDownCapture, ...props }: CarouselProps): React.JSX.Element;
58
+ export interface CarouselContentProps extends React.ComponentProps<"div"> {
59
+ /** Class for the clipping viewport (set a height here for a vertical carousel). */
60
+ viewportClassName?: string;
61
+ }
62
+ /** The clipping viewport and the moving track. Slides go inside as `CarouselItem`s. */
63
+ export declare function CarouselContent({ viewportClassName, className, ...props }: CarouselContentProps): React.JSX.Element;
64
+ /**
65
+ * One slide. Full width by default; set a basis for several per view (`basis-1/2`, `md:basis-1/3`).
66
+ * The 16px gutter between slides is built in.
67
+ */
68
+ export declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
69
+ export interface CarouselButtonProps extends ButtonProps {
70
+ }
71
+ /** The previous button: a circular secondary icon button. Disabled at the first slide unless looping. */
72
+ export declare function CarouselPrevious({ variant, size, className, children, onClick, ...props }: CarouselButtonProps): React.JSX.Element;
73
+ /** The next button: a circular secondary icon button. Disabled at the last slide unless looping. */
74
+ export declare function CarouselNext({ variant, size, className, children, onClick, ...props }: CarouselButtonProps): React.JSX.Element;
75
+ export interface CarouselDotsProps extends React.ComponentProps<"div"> {
76
+ /**
77
+ * `ticks` — a rail of hairline ticks like `ProcessSteps`; the current one is long and in
78
+ * foreground ink, and every tick is a button. `index` — a mono "01 / 07" counter.
79
+ */
80
+ variant?: "ticks" | "index";
81
+ /** Accessible name for the tick buttons; receives the 1-based slide number. */
82
+ getLabel?: (slide: number, total: number) => string;
83
+ }
84
+ /**
85
+ * Where you are in the carousel, in the brand's vocabulary: hairline ticks (each one jumps to its
86
+ * slide) or a mono "01 / 07" index. Never round dots. The long tick moves with the slides, so a
87
+ * drag or a glide hands it from one tick to the next rather than switching it at the start.
88
+ */
89
+ export declare function CarouselDots({ variant, getLabel, className, ...props }: CarouselDotsProps): React.JSX.Element;
90
+ export {};
@@ -0,0 +1,213 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import useEmblaCarousel, {} from "embla-carousel-react";
4
+ import { ArrowLeftIcon, ArrowRightIcon, ArrowDownIcon, ArrowUpIcon } from "lucide-react";
5
+ import * as React from "react";
6
+ import { cn } from "../lib/cn.js";
7
+ import { Button } from "./button.js";
8
+ import { useDirection } from "./direction.js";
9
+ const CarouselContext = React.createContext(null);
10
+ /**
11
+ * useCarousel — the carousel's state and controls, for building your own counter or buttons
12
+ * inside a `Carousel`: `selectedIndex`, `snapCount`, `canScrollPrev`, `scrollNext()`, `api` …
13
+ */
14
+ export function useCarousel() {
15
+ const context = React.useContext(CarouselContext);
16
+ if (!context)
17
+ throw new Error("useCarousel must be used within a <Carousel />");
18
+ return context;
19
+ }
20
+ const reducedQuery = "(prefers-reduced-motion: reduce)";
21
+ const subscribeReduced = (onChange) => {
22
+ const mq = window.matchMedia(reducedQuery);
23
+ mq.addEventListener("change", onChange);
24
+ return () => mq.removeEventListener("change", onChange);
25
+ };
26
+ const useReducedMotion = () => React.useSyncExternalStore(subscribeReduced, () => window.matchMedia(reducedQuery).matches, () => false);
27
+ /**
28
+ * Carousel — a row of slides moved one at a time: a wall of spec sheets, a series of
29
+ * illustrations, the steps of a short walkthrough. Built on Embla: drag, swipe, loop and
30
+ * arrow keys work out of the box; under reduced motion every move is instant.
31
+ *
32
+ * Controls are the brand's, not generic dots: `CarouselPrevious` / `CarouselNext` are circular
33
+ * secondary icon buttons and `CarouselDots` is a rail of hairline ticks (or a mono "01 / 07").
34
+ * Place them yourself — usually on one row under the slides.
35
+ *
36
+ * The rule people break: hiding content people need inside it. A carousel shows one thing at a
37
+ * time; anything that must be compared or read in full belongs on the page as a grid or list.
38
+ */
39
+ export function Carousel({ orientation = "horizontal", opts, plugins, setApi, className, children, onKeyDownCapture, ...props }) {
40
+ // Inside a right-to-left DirectionProvider the slides run right to left too, unless `opts` says.
41
+ const provided = useDirection();
42
+ const direction = opts?.direction ?? provided;
43
+ const [carouselRef, api] = useEmblaCarousel({ ...opts, direction, axis: orientation === "horizontal" ? "x" : "y" }, plugins);
44
+ const reducedMotion = useReducedMotion();
45
+ const [state, setState] = React.useState({
46
+ selectedIndex: 0,
47
+ snapCount: 0,
48
+ canScrollPrev: false,
49
+ canScrollNext: false,
50
+ });
51
+ React.useEffect(() => {
52
+ if (!api)
53
+ return;
54
+ setApi?.(api);
55
+ const update = (embla) => setState({
56
+ selectedIndex: embla.selectedScrollSnap(),
57
+ snapCount: embla.scrollSnapList().length,
58
+ canScrollPrev: embla.canScrollPrev(),
59
+ canScrollNext: embla.canScrollNext(),
60
+ });
61
+ update(api);
62
+ api.on("reInit", update);
63
+ api.on("select", update);
64
+ return () => {
65
+ api.off("reInit", update);
66
+ api.off("select", update);
67
+ };
68
+ }, [api, setApi]);
69
+ const scrollPrev = React.useCallback(() => api?.scrollPrev(reducedMotion), [api, reducedMotion]);
70
+ const scrollNext = React.useCallback(() => api?.scrollNext(reducedMotion), [api, reducedMotion]);
71
+ const scrollTo = React.useCallback((index) => api?.scrollTo(index, reducedMotion), [api, reducedMotion]);
72
+ const handleKeyDown = (event) => {
73
+ onKeyDownCapture?.(event);
74
+ if (event.defaultPrevented)
75
+ return;
76
+ const target = event.target;
77
+ if (target.closest("input, textarea, select, [contenteditable='true'], [role='slider']"))
78
+ return;
79
+ // The arrows point the way the slides run: in right to left, the left arrow is next.
80
+ const rtl = orientation === "horizontal" && direction === "rtl";
81
+ const prev = orientation === "horizontal" ? (rtl ? "ArrowRight" : "ArrowLeft") : "ArrowUp";
82
+ const next = orientation === "horizontal" ? (rtl ? "ArrowLeft" : "ArrowRight") : "ArrowDown";
83
+ if (event.key === prev) {
84
+ event.preventDefault();
85
+ scrollPrev();
86
+ }
87
+ else if (event.key === next) {
88
+ event.preventDefault();
89
+ scrollNext();
90
+ }
91
+ };
92
+ const value = {
93
+ carouselRef,
94
+ api,
95
+ orientation,
96
+ ...state,
97
+ scrollPrev,
98
+ scrollNext,
99
+ scrollTo,
100
+ reducedMotion,
101
+ };
102
+ return (_jsx(CarouselContext.Provider, { value: value, children: _jsx("div", { "data-slot": "carousel", "data-orientation": orientation, role: "region", "aria-roledescription": "carousel", className: cn("relative flex flex-col gap-6", className), onKeyDownCapture: handleKeyDown, ...props, children: children }) }));
103
+ }
104
+ /** The clipping viewport and the moving track. Slides go inside as `CarouselItem`s. */
105
+ export function CarouselContent({ viewportClassName, className, ...props }) {
106
+ const { carouselRef, orientation } = useCarousel();
107
+ return (_jsx("div", { ref: carouselRef, "data-slot": "carousel-viewport", className: cn("overflow-hidden", viewportClassName), children: _jsx("div", { "data-slot": "carousel-content", className: cn("flex touch-pan-y",
108
+ // Pulled back by the slides' 16px gutter, and 16px taller to match: each slide's content
109
+ // is exactly the viewport's height, as each one's width is in a horizontal carousel.
110
+ orientation === "horizontal" ? "-ml-4" : "-mt-4 h-[calc(100%+--spacing(4))] touch-pan-x flex-col", className), ...props }) }));
111
+ }
112
+ /**
113
+ * One slide. Full width by default; set a basis for several per view (`basis-1/2`, `md:basis-1/3`).
114
+ * The 16px gutter between slides is built in.
115
+ */
116
+ export function CarouselItem({ className, ...props }) {
117
+ const { orientation } = useCarousel();
118
+ return (_jsx("div", { "data-slot": "carousel-item", role: "group", "aria-roledescription": "slide", className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className), ...props }));
119
+ }
120
+ /** The previous button: a circular secondary icon button. Disabled at the first slide unless looping. */
121
+ export function CarouselPrevious({ variant = "secondary", size = "icon", className, children, onClick, ...props }) {
122
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
123
+ return (_jsx(Button, { "data-slot": "carousel-previous", variant: variant, size: size, "aria-label": "Previous slide", disabled: !canScrollPrev, className: className, onClick: (event) => {
124
+ onClick?.(event);
125
+ if (!event.defaultPrevented)
126
+ scrollPrev();
127
+ }, ...props, children: children ??
128
+ (orientation === "horizontal" ? (_jsx(ArrowLeftIcon, { "aria-hidden": true, className: "rtl:-scale-x-100" })) : (_jsx(ArrowUpIcon, { "aria-hidden": true }))) }));
129
+ }
130
+ /** The next button: a circular secondary icon button. Disabled at the last slide unless looping. */
131
+ export function CarouselNext({ variant = "secondary", size = "icon", className, children, onClick, ...props }) {
132
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
133
+ return (_jsx(Button, { "data-slot": "carousel-next", variant: variant, size: size, "aria-label": "Next slide", disabled: !canScrollNext, className: className, onClick: (event) => {
134
+ onClick?.(event);
135
+ if (!event.defaultPrevented)
136
+ scrollNext();
137
+ }, ...props, children: children ??
138
+ (orientation === "horizontal" ? (_jsx(ArrowRightIcon, { "aria-hidden": true, className: "rtl:-scale-x-100" })) : (_jsx(ArrowDownIcon, { "aria-hidden": true }))) }));
139
+ }
140
+ const pad = (n) => String(n).padStart(2, "0");
141
+ /**
142
+ * How current each snap is, 0–1, from where the slides are right now: the two snaps either side
143
+ * of the scroll position share it, so it passes from one to the next as the slides move.
144
+ */
145
+ function snapWeights(api) {
146
+ const snaps = api.scrollSnapList();
147
+ const last = snaps.length - 1;
148
+ const weights = snaps.map(() => 0);
149
+ if (last < 1)
150
+ return weights.fill(1);
151
+ const first = snaps[0];
152
+ let progress = api.scrollProgress();
153
+ // Looping, the stretch after the last snap leads round to the first.
154
+ if (api.internalEngine().options.loop)
155
+ progress = first + ((((progress - first) % 1) + 1) % 1);
156
+ else
157
+ progress = Math.min(Math.max(progress, first), snaps[last]);
158
+ for (let index = 0; index <= last; index++) {
159
+ const from = snaps[index];
160
+ const to = index < last ? snaps[index + 1] : first + 1;
161
+ if (progress > to)
162
+ continue;
163
+ const share = to > from ? (progress - from) / (to - from) : 0;
164
+ weights[index] = 1 - share;
165
+ weights[index < last ? index + 1 : 0] += share;
166
+ break;
167
+ }
168
+ return weights;
169
+ }
170
+ /**
171
+ * Where you are in the carousel, in the brand's vocabulary: hairline ticks (each one jumps to its
172
+ * slide) or a mono "01 / 07" index. Never round dots. The long tick moves with the slides, so a
173
+ * drag or a glide hands it from one tick to the next rather than switching it at the start.
174
+ */
175
+ export function CarouselDots({ variant = "ticks", getLabel = (slide, total) => `Go to slide ${slide} of ${total}`, className, ...props }) {
176
+ const { api, orientation, selectedIndex, snapCount, scrollTo } = useCarousel();
177
+ const total = Math.max(snapCount, 1);
178
+ const ticks = React.useRef([]);
179
+ // Every frame the slides move, each tick takes how current it is as --current. Written to the
180
+ // nodes directly, so following a drag doesn't re-render.
181
+ React.useEffect(() => {
182
+ if (!api || variant !== "ticks")
183
+ return;
184
+ const follow = () => snapWeights(api).forEach((weight, index) => ticks.current[index]?.style.setProperty("--current", weight.toFixed(3)));
185
+ follow();
186
+ api.on("scroll", follow);
187
+ api.on("settle", follow);
188
+ api.on("reInit", follow);
189
+ return () => {
190
+ api.off("scroll", follow);
191
+ api.off("settle", follow);
192
+ api.off("reInit", follow);
193
+ };
194
+ }, [api, variant, snapCount]);
195
+ if (variant === "index") {
196
+ return (_jsxs("div", { "data-slot": "carousel-dots", "data-variant": "index",
197
+ // "01 / 07" stays in that order in a right-to-left page: numerals are never mirrored.
198
+ dir: "ltr", "aria-live": "polite", "aria-atomic": "true", className: cn("font-mono text-xs leading-none text-muted-foreground tabular-nums", className), ...props, children: [_jsx("span", { className: "text-foreground", children: pad(selectedIndex + 1) }), _jsx("span", { "aria-hidden": true, children: " / " }), _jsx("span", { className: "sr-only", children: " of " }), pad(total)] }));
199
+ }
200
+ const vertical = orientation === "vertical";
201
+ return (_jsx("div", { "data-slot": "carousel-dots", "data-variant": "ticks", "data-orientation": orientation, className: cn("flex items-center", vertical && "flex-col", className), ...props, children: Array.from({ length: snapCount }, (_, index) => {
202
+ const current = index === selectedIndex;
203
+ return (_jsx("button", { type: "button", "data-slot": "carousel-dot", "data-active": current ? "" : undefined, "aria-label": getLabel(index + 1, total), "aria-current": current ? "true" : undefined, onClick: () => scrollTo(index), className: cn("group/dot flex cursor-pointer items-center justify-center border-0 bg-transparent p-0 focus-ring", vertical ? "min-w-(--control-h-sm) py-1.5" : "min-h-(--control-h-sm) px-1.5"), children: _jsx("span", { ref: (node) => {
204
+ ticks.current[index] = node;
205
+ }, "aria-hidden": true, className: cn(
206
+ // --tick runs from a 16px hairline at 20% ink (0) to the 40px current tick in full
207
+ // ink (1). It follows --current as the slides move, and data-active until then.
208
+ // The ink is laid over the hairline, so hover can still brighten what's beneath.
209
+ "relative block bg-foreground/20 transition-[background-color] duration-(--duration) ease-brand group-hover/dot:bg-foreground/50", "[--tick:var(--current,0)] group-data-active/dot:[--tick:var(--current,1)]", "after:absolute after:inset-0 after:bg-foreground after:opacity-(--tick)", vertical
210
+ ? "h-[calc(1rem+1.5rem*var(--tick))] w-px"
211
+ : "h-px w-[calc(1rem+1.5rem*var(--tick))]") }) }, index));
212
+ }) }));
213
+ }
@@ -0,0 +1,180 @@
1
+ import * as React from "react";
2
+ import * as RechartsPrimitive from "recharts";
3
+ import type { LegendPayload } from "recharts";
4
+ /** How one series is named and drawn. Keys are the `dataKey`s (or `nameKey` values) of the chart. */
5
+ export interface ChartSeriesConfig {
6
+ /** The series name shown in tooltips and legends. */
7
+ label?: React.ReactNode;
8
+ /** A 16px lucide icon shown in place of the swatch in the legend. */
9
+ icon?: React.ComponentType<{
10
+ className?: string;
11
+ }>;
12
+ /**
13
+ * Any CSS colour. Defaults to the next step of the container's `palette` — the monochrome
14
+ * ramp `var(--chart-1)` … `var(--chart-5)`, or the category tones — in the order the keys are
15
+ * written. Pass a status colour (`var(--destructive)`) only when the series is that status.
16
+ */
17
+ color?: string;
18
+ /** An SVG dash array for line series (`"4 3"`), mirrored in the tooltip and legend swatch. */
19
+ dash?: string;
20
+ /** `hatch` marks a series filled with `<ChartHatch>`; the swatch shows the same hatch. */
21
+ pattern?: "solid" | "hatch";
22
+ }
23
+ /**
24
+ * Series key → `{ label, color?, icon?, dash?, pattern? }`. Each key becomes `--color-<key>`; any
25
+ * series name works as a key — one that is not a plain CSS name ("New York") is escaped there,
26
+ * and `chartColor(key)` writes the reference.
27
+ */
28
+ export type ChartConfig = Record<string, ChartSeriesConfig>;
29
+ interface ChartContextValue {
30
+ config: ChartConfig;
31
+ }
32
+ /** The config of the nearest `ChartContainer`. For custom tooltip or legend content. */
33
+ export declare function useChart(): ChartContextValue;
34
+ /**
35
+ * chartColor — a series' colour as CSS: `var(--color-<key>)`, with the key escaped. Use it for a
36
+ * key that is not a plain CSS name — `stroke={chartColor("New York")}`, a `Cell`'s `fill`, the
37
+ * `color` of a `ChartGradient` or `ChartHatch`; for a plain key it is the same as writing the `var()`.
38
+ */
39
+ export declare function chartColor(key: string): string;
40
+ export interface ChartContainerProps extends Omit<React.ComponentProps<"div">, "children"> {
41
+ /** Series key → label, colour, icon, dash and pattern. */
42
+ config: ChartConfig;
43
+ /**
44
+ * Where series take their default colours. `mono` (default): the grey ramp, told apart by value
45
+ * plus dash or hatch. `tones`: the six category tones (`--tone-blue`, aqua, violet, magenta,
46
+ * orange, lime), for categories people must tell apart at a glance — keep the legend.
47
+ */
48
+ palette?: "mono" | "tones";
49
+ /** Which grid lines to keep. `horizontal` (default) for columns, lines and areas; `vertical` for horizontal bars. */
50
+ grid?: "horizontal" | "vertical" | "both";
51
+ /** One Recharts chart (`AreaChart`, `BarChart`, `LineChart`, `PieChart` …). */
52
+ children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
53
+ }
54
+ /**
55
+ * ChartContainer — the frame every chart sits in. It sizes the Recharts chart responsively
56
+ * (16:9 by default; set a height with `className="aspect-auto h-60"`), writes one
57
+ * `--color-<key>` variable per series from `config`, and themes Recharts in the zon
58
+ * material: 11px Licht Mono muted ticks, `--grid-line` hairlines (horizontal only by
59
+ * default), a hairline cursor, 1.5px lines with no dots except the active one.
60
+ *
61
+ * Series are monochrome by default: the `--chart-1…5` ramp, told apart by value plus dash,
62
+ * hatch or opacity. `palette="tones"` colours them with the category tones when the categories
63
+ * themselves are the point (a share by kind, one line per region). The rule people break:
64
+ * colour without a legend, or a rainbow for one series. Five series at most in grey, six in
65
+ * tones; fold the rest into "Other".
66
+ */
67
+ export declare function ChartContainer({ id, config, palette, grid, className, style, children, ...props }: ChartContainerProps): React.JSX.Element;
68
+ export interface ChartGradientProps {
69
+ /** Reference it as `fill="url(#<id>)"`. Make it unique on the page. */
70
+ id: string;
71
+ /** Usually `var(--color-<key>)`. */
72
+ color: string;
73
+ /** Opacity at the top and bottom of the fill. Defaults to 0.24 → 0.02. */
74
+ from?: number;
75
+ to?: number;
76
+ }
77
+ /**
78
+ * ChartGradient — the soft vertical fill under an area: the series colour fading to nothing.
79
+ * Put it inside the chart (`<AreaChart>`) and reference it with `fill="url(#id)"`.
80
+ */
81
+ export declare function ChartGradient({ id, color, from, to }: ChartGradientProps): React.JSX.Element;
82
+ export interface ChartHatchProps {
83
+ /** Reference it as `fill="url(#<id>)"`. Make it unique on the page. */
84
+ id: string;
85
+ /** Usually `var(--color-<key>)`. */
86
+ color: string;
87
+ /** `45` (default) or `135` degrees. */
88
+ angle?: 45 | 135;
89
+ }
90
+ /**
91
+ * ChartHatch — a diagonal hatch fill, the second channel that separates monochrome series
92
+ * in print, forced colours and for readers who cannot tell two greys apart. Put it inside the
93
+ * chart and reference it with `fill="url(#id)"`; set `pattern: "hatch"` on the series config
94
+ * so the tooltip and legend swatches match.
95
+ */
96
+ export declare function ChartHatch({ id, color, angle }: ChartHatchProps): React.JSX.Element;
97
+ /**
98
+ * ChartActiveSector — lifts the slice under the pointer: it moves 4px out from the centre and
99
+ * grows 3%, on `--duration`, and settles back when the pointer leaves. Pass it as `activeShape`
100
+ * on `Pie`. Recharts calls it as a plain function, re-creates its element on every render and
101
+ * keeps the slice active after the pointer has gone, so the motion cannot live on it: it gives
102
+ * the slice's group, which persists, its direction and the pie's centre, and the chart lifts
103
+ * whichever marked slice the pointer is over; `data-lifted` carries the transition
104
+ * (parts/data.css).
105
+ */
106
+ export declare function ChartActiveSector(props: RechartsPrimitive.PieSectorDataItem): React.JSX.Element;
107
+ interface ChartCursorProps {
108
+ points?: {
109
+ x: number;
110
+ y: number;
111
+ }[];
112
+ x?: number;
113
+ y?: number;
114
+ width?: number;
115
+ height?: number;
116
+ cx?: number;
117
+ className?: string;
118
+ [key: string]: unknown;
119
+ }
120
+ /**
121
+ * ChartCursor — the tooltip's cursor, drawn so it glides from point to point instead of jumping:
122
+ * the hairline on lines and areas and the band on bars keep their shape and move by a transform
123
+ * the browser can ease (`--duration`, so still under reduced motion). `ChartTooltip` uses it by
124
+ * default.
125
+ */
126
+ export declare function ChartCursor(props: ChartCursorProps): React.JSX.Element;
127
+ export type ChartTooltipProps = React.ComponentProps<typeof RechartsPrimitive.Tooltip>;
128
+ /**
129
+ * ChartTooltip — Recharts' `Tooltip`. Pass `content={<ChartTooltipContent />}`. The cursor is a
130
+ * hairline on lines and areas and a quiet `--control-hover` band on bars, and it glides from
131
+ * point to point (`ChartCursor`); pass `cursor` to draw your own, or `false` for none.
132
+ */
133
+ export declare function ChartTooltip(props: ChartTooltipProps): React.JSX.Element;
134
+ type TooltipItem = RechartsPrimitive.TooltipPayloadEntry;
135
+ export interface ChartTooltipContentProps {
136
+ active?: boolean;
137
+ payload?: ReadonlyArray<TooltipItem>;
138
+ label?: React.ReactNode;
139
+ /** `dot` (default) for bars and areas, `line` for lines (follows the series dash), `dashed` for targets. */
140
+ indicator?: "dot" | "line" | "dashed";
141
+ /** Hide the heading (the category or date). */
142
+ hideLabel?: boolean;
143
+ /** Hide the swatches — for a single series. */
144
+ hideIndicator?: boolean;
145
+ /** Format the heading, e.g. a date. */
146
+ labelFormatter?: (label: React.ReactNode, payload: ReadonlyArray<TooltipItem>) => React.ReactNode;
147
+ /** Format each value, e.g. `(v) => `${v} ms``. Values are mono and tabular. */
148
+ valueFormatter?: (value: TooltipItem["value"], name: React.ReactNode, item: TooltipItem) => React.ReactNode;
149
+ /** Payload field that names each item (pie charts: the category field). */
150
+ nameKey?: string;
151
+ /** Config key or payload field to take the heading from instead of `label`. */
152
+ labelKey?: string;
153
+ className?: string;
154
+ }
155
+ /**
156
+ * ChartTooltipContent — the tooltip body: menu material at 12px, the category or date in
157
+ * Licht Sans, one row per series with a small swatch, its label and a mono tabular value.
158
+ * Text stays in text tokens; only the swatch carries the series colour.
159
+ */
160
+ export declare function ChartTooltipContent({ active, payload, label, indicator, hideLabel, hideIndicator, labelFormatter, valueFormatter, nameKey, labelKey, className, }: ChartTooltipContentProps): React.JSX.Element | null;
161
+ /**
162
+ * ChartLegend — Recharts' `Legend`. Pass `content={<ChartLegendContent />}`. Items keep the
163
+ * order the series are drawn in (Recharts sorts them alphabetically by default).
164
+ */
165
+ export declare function ChartLegend({ itemSorter, ...props }: React.ComponentProps<typeof RechartsPrimitive.Legend>): React.JSX.Element;
166
+ export interface ChartLegendContentProps {
167
+ payload?: ReadonlyArray<LegendPayload>;
168
+ verticalAlign?: "top" | "middle" | "bottom";
169
+ /** Hide the swatches (not recommended: the swatch is the identity). */
170
+ hideIcon?: boolean;
171
+ /** Payload field that names each item (pie charts: the category field). */
172
+ nameKey?: string;
173
+ className?: string;
174
+ }
175
+ /**
176
+ * ChartLegendContent — one swatch and a mono 11px label per series. Always show it for two
177
+ * or more series; a single series is named by the chart's title instead.
178
+ */
179
+ export declare function ChartLegendContent({ payload, verticalAlign, hideIcon, nameKey, className, }: ChartLegendContentProps): React.JSX.Element | null;
180
+ export {};