@shavin/ui 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (471) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/LICENSE +21 -0
  3. package/README.md +81 -2
  4. package/components.json +15771 -0
  5. package/dist/authoring/types.js +0 -0
  6. package/dist/icons.d.ts +20 -0
  7. package/dist/icons.js +6 -0
  8. package/dist/index.d.ts +3325 -0
  9. package/dist/index.js +531 -0
  10. package/dist/inspector/FindingPopover.js +252 -0
  11. package/dist/inspector/Highlight.js +76 -0
  12. package/dist/inspector/Inspector.js +420 -0
  13. package/dist/inspector/InspectorRoot.js +75 -0
  14. package/dist/inspector/IssuesLayer.js +134 -0
  15. package/dist/inspector/IssuesList.js +174 -0
  16. package/dist/inspector/SettingsPanel.js +89 -0
  17. package/dist/inspector/ShavinMark.js +22 -0
  18. package/dist/inspector/Toolbar.js +202 -0
  19. package/dist/inspector/barPlacement.js +117 -0
  20. package/dist/inspector/env.js +59 -0
  21. package/dist/inspector/geometry.js +44 -0
  22. package/dist/inspector/ignored.js +52 -0
  23. package/dist/inspector/index.js +7 -0
  24. package/dist/inspector/journalClient.js +57 -0
  25. package/dist/inspector/journalState.js +36 -0
  26. package/dist/inspector/pin.js +43 -0
  27. package/dist/inspector/placement.js +96 -0
  28. package/dist/inspector/prompt.js +63 -0
  29. package/dist/inspector/scheme.js +56 -0
  30. package/dist/inspector/settings.js +54 -0
  31. package/dist/inspector/strings.js +67 -0
  32. package/dist/inspector/targets.js +31 -0
  33. package/dist/inspector/theme/ThemeControls.js +351 -0
  34. package/dist/inspector/theme/ThemePanel.js +32 -0
  35. package/dist/inspector/theme/useThemeController.js +560 -0
  36. package/dist/inspector/usePhone.js +32 -0
  37. package/dist/inspector/useSelectTool.js +82 -0
  38. package/dist/inspector/useTimeouts.js +22 -0
  39. package/dist/inspector/useTrackedRect.js +39 -0
  40. package/dist/lib/announce.js +47 -0
  41. package/dist/lib/bridge.js +43 -0
  42. package/dist/lib/buttonState.js +81 -0
  43. package/dist/lib/chart-kit.js +226 -0
  44. package/dist/lib/cn.js +8 -0
  45. package/dist/lib/color-space.js +315 -0
  46. package/dist/lib/concentric.js +85 -0
  47. package/dist/lib/hit-area.js +25 -0
  48. package/dist/lib/inspector/collect.js +299 -0
  49. package/dist/lib/inspector/color.js +58 -0
  50. package/dist/lib/inspector/console-capture.js +96 -0
  51. package/dist/lib/inspector/index.js +8 -0
  52. package/dist/lib/inspector/rules.js +232 -0
  53. package/dist/lib/inspector/run.js +35 -0
  54. package/dist/lib/inspector/schema.js +110 -0
  55. package/dist/lib/inspector/selector.js +103 -0
  56. package/dist/lib/inspector/tokens.js +34 -0
  57. package/dist/lib/media-overlay-presets.js +284 -0
  58. package/dist/lib/media-overlays.js +381 -0
  59. package/dist/lib/meta.js +70 -0
  60. package/dist/lib/motion-gsap.js +25 -0
  61. package/dist/lib/motion-runtime.js +283 -0
  62. package/dist/lib/neutral-tint.js +108 -0
  63. package/dist/lib/portal-container.js +12 -0
  64. package/dist/lib/scroll-edges.js +41 -0
  65. package/dist/lib/surface.js +6 -0
  66. package/dist/lib/syntax.js +115 -0
  67. package/dist/lib/theme-presets.d.ts +1 -0
  68. package/dist/lib/theme-presets.js +759 -0
  69. package/dist/lib/useClientLocale.js +11 -0
  70. package/dist/lib/useFieldErrorAnnouncement.js +15 -0
  71. package/dist/lib/useReducedMotion.js +17 -0
  72. package/dist/lib/useResizable.js +313 -0
  73. package/dist/lib/useReturnFocus.js +24 -0
  74. package/dist/lib/useSlidingIndicator.js +56 -0
  75. package/dist/panels.d.ts +37 -0
  76. package/dist/panels.js +19 -0
  77. package/dist/primitives/Accordion/Accordion.doc.js +37 -0
  78. package/dist/primitives/Accordion/Accordion.js +87 -0
  79. package/dist/primitives/Accordion/index.js +2 -0
  80. package/dist/primitives/ActionBar/ActionBar.doc.js +37 -0
  81. package/dist/primitives/ActionBar/ActionBar.js +126 -0
  82. package/dist/primitives/ActionBar/index.js +2 -0
  83. package/dist/primitives/AlertDialog/AlertDialog.doc.js +54 -0
  84. package/dist/primitives/AlertDialog/AlertDialog.js +113 -0
  85. package/dist/primitives/AlertDialog/index.js +2 -0
  86. package/dist/primitives/AppShell/AppShell.doc.js +81 -0
  87. package/dist/primitives/AppShell/AppShell.js +178 -0
  88. package/dist/primitives/AppShell/frame-context.js +10 -0
  89. package/dist/primitives/AppShell/index.js +2 -0
  90. package/dist/primitives/AspectRatio/AspectRatio.doc.js +34 -0
  91. package/dist/primitives/AspectRatio/AspectRatio.js +5 -0
  92. package/dist/primitives/AspectRatio/index.js +2 -0
  93. package/dist/primitives/Avatar/Avatar.doc.js +40 -0
  94. package/dist/primitives/Avatar/Avatar.js +62 -0
  95. package/dist/primitives/Avatar/index.js +2 -0
  96. package/dist/primitives/Backdrop/Backdrop.doc.js +24 -0
  97. package/dist/primitives/Backdrop/Backdrop.js +42 -0
  98. package/dist/primitives/Backdrop/index.js +2 -0
  99. package/dist/primitives/Badge/Badge.doc.js +35 -0
  100. package/dist/primitives/Badge/Badge.js +95 -0
  101. package/dist/primitives/Badge/index.js +2 -0
  102. package/dist/primitives/BarChart/BarChart.doc.js +59 -0
  103. package/dist/primitives/BarChart/BarChart.js +154 -0
  104. package/dist/primitives/BarChart/index.js +2 -0
  105. package/dist/primitives/BlockPreview/BlockPreview.doc.js +51 -0
  106. package/dist/primitives/BlockPreview/BlockPreview.js +485 -0
  107. package/dist/primitives/BlockPreview/index.js +8 -0
  108. package/dist/primitives/Blockquote/Blockquote.doc.js +25 -0
  109. package/dist/primitives/Blockquote/Blockquote.js +19 -0
  110. package/dist/primitives/Blockquote/index.js +2 -0
  111. package/dist/primitives/BottomNav/BottomNav.doc.js +37 -0
  112. package/dist/primitives/BottomNav/BottomNav.js +54 -0
  113. package/dist/primitives/BottomNav/index.js +2 -0
  114. package/dist/primitives/Box/Box.doc.js +45 -0
  115. package/dist/primitives/Box/Box.js +51 -0
  116. package/dist/primitives/Box/index.js +2 -0
  117. package/dist/primitives/Breadcrumbs/Breadcrumbs.doc.js +35 -0
  118. package/dist/primitives/Breadcrumbs/Breadcrumbs.js +40 -0
  119. package/dist/primitives/Breadcrumbs/index.js +2 -0
  120. package/dist/primitives/Button/Button.doc.js +80 -0
  121. package/dist/primitives/Button/Button.js +132 -0
  122. package/dist/primitives/Button/index.js +2 -0
  123. package/dist/primitives/Calendar/Calendar.doc.js +36 -0
  124. package/dist/primitives/Calendar/Calendar.js +502 -0
  125. package/dist/primitives/Calendar/index.js +2 -0
  126. package/dist/primitives/Callout/Callout.doc.js +34 -0
  127. package/dist/primitives/Callout/Callout.js +63 -0
  128. package/dist/primitives/Callout/index.js +2 -0
  129. package/dist/primitives/Card/Card.doc.js +46 -0
  130. package/dist/primitives/Card/Card.js +159 -0
  131. package/dist/primitives/Card/index.js +2 -0
  132. package/dist/primitives/Carousel/Carousel.doc.js +61 -0
  133. package/dist/primitives/Carousel/Carousel.js +369 -0
  134. package/dist/primitives/Carousel/index.js +1 -0
  135. package/dist/primitives/ChatBubble/ChatBubble.doc.js +37 -0
  136. package/dist/primitives/ChatBubble/ChatBubble.js +120 -0
  137. package/dist/primitives/ChatBubble/index.js +2 -0
  138. package/dist/primitives/Checkbox/Checkbox.doc.js +36 -0
  139. package/dist/primitives/Checkbox/Checkbox.js +57 -0
  140. package/dist/primitives/Checkbox/index.js +2 -0
  141. package/dist/primitives/CheckboxCards/CheckboxCards.doc.js +35 -0
  142. package/dist/primitives/CheckboxCards/CheckboxCards.js +47 -0
  143. package/dist/primitives/CheckboxCards/index.js +2 -0
  144. package/dist/primitives/CheckboxGroup/CheckboxGroup.doc.js +35 -0
  145. package/dist/primitives/CheckboxGroup/CheckboxGroup.js +40 -0
  146. package/dist/primitives/CheckboxGroup/index.js +2 -0
  147. package/dist/primitives/Code/Code.doc.js +22 -0
  148. package/dist/primitives/Code/Code.js +17 -0
  149. package/dist/primitives/Code/index.js +2 -0
  150. package/dist/primitives/CodeBlock/CodeBlock.doc.js +36 -0
  151. package/dist/primitives/CodeBlock/CodeBlock.js +205 -0
  152. package/dist/primitives/CodeBlock/index.js +2 -0
  153. package/dist/primitives/CodeEditor/CodeEditor.doc.js +53 -0
  154. package/dist/primitives/CodeEditor/CodeEditor.js +204 -0
  155. package/dist/primitives/CodeEditor/index.js +4 -0
  156. package/dist/primitives/ColorPicker/ColorPicker.doc.js +37 -0
  157. package/dist/primitives/ColorPicker/ColorPicker.js +776 -0
  158. package/dist/primitives/ColorPicker/index.js +2 -0
  159. package/dist/primitives/Combobox/Combobox.doc.js +36 -0
  160. package/dist/primitives/Combobox/Combobox.js +199 -0
  161. package/dist/primitives/Combobox/index.js +2 -0
  162. package/dist/primitives/Container/Container.doc.js +46 -0
  163. package/dist/primitives/Container/Container.js +54 -0
  164. package/dist/primitives/Container/index.js +2 -0
  165. package/dist/primitives/ContextMenu/ContextMenu.doc.js +36 -0
  166. package/dist/primitives/ContextMenu/ContextMenu.js +59 -0
  167. package/dist/primitives/ContextMenu/index.js +2 -0
  168. package/dist/primitives/DataList/DataList.doc.js +34 -0
  169. package/dist/primitives/DataList/DataList.js +35 -0
  170. package/dist/primitives/DataList/index.js +2 -0
  171. package/dist/primitives/DatePicker/DatePicker.doc.js +36 -0
  172. package/dist/primitives/DatePicker/DatePicker.js +398 -0
  173. package/dist/primitives/DatePicker/index.js +2 -0
  174. package/dist/primitives/Dialog/Dialog.doc.js +107 -0
  175. package/dist/primitives/Dialog/Dialog.js +143 -0
  176. package/dist/primitives/Dialog/index.js +2 -0
  177. package/dist/primitives/DonutChart/DonutChart.doc.js +26 -0
  178. package/dist/primitives/DonutChart/DonutChart.js +71 -0
  179. package/dist/primitives/DonutChart/index.js +2 -0
  180. package/dist/primitives/Drawer/Drawer.doc.js +44 -0
  181. package/dist/primitives/Drawer/Drawer.js +158 -0
  182. package/dist/primitives/Drawer/index.js +2 -0
  183. package/dist/primitives/Dropdown/Dropdown.doc.js +40 -0
  184. package/dist/primitives/Dropdown/Dropdown.js +146 -0
  185. package/dist/primitives/Dropdown/index.js +2 -0
  186. package/dist/primitives/Emphasis/Emphasis.doc.js +28 -0
  187. package/dist/primitives/Emphasis/Emphasis.js +25 -0
  188. package/dist/primitives/Emphasis/index.js +2 -0
  189. package/dist/primitives/EmptyState/EmptyState.doc.js +76 -0
  190. package/dist/primitives/EmptyState/EmptyState.js +118 -0
  191. package/dist/primitives/EmptyState/index.js +2 -0
  192. package/dist/primitives/FileOutput/FileOutput.doc.js +26 -0
  193. package/dist/primitives/FileOutput/FileOutput.js +55 -0
  194. package/dist/primitives/FileOutput/index.js +2 -0
  195. package/dist/primitives/Flex/Flex.doc.js +58 -0
  196. package/dist/primitives/Flex/Flex.js +98 -0
  197. package/dist/primitives/Flex/index.js +2 -0
  198. package/dist/primitives/FormErrorSummary/FormErrorSummary.doc.js +39 -0
  199. package/dist/primitives/FormErrorSummary/FormErrorSummary.js +61 -0
  200. package/dist/primitives/FormErrorSummary/index.js +2 -0
  201. package/dist/primitives/FormField/FormField.doc.js +68 -0
  202. package/dist/primitives/FormField/FormField.js +149 -0
  203. package/dist/primitives/FormField/index.js +2 -0
  204. package/dist/primitives/FunnelChart/FunnelChart.doc.js +45 -0
  205. package/dist/primitives/FunnelChart/FunnelChart.js +54 -0
  206. package/dist/primitives/FunnelChart/index.js +2 -0
  207. package/dist/primitives/Grid/Grid.doc.js +57 -0
  208. package/dist/primitives/Grid/Grid.js +122 -0
  209. package/dist/primitives/Grid/index.js +2 -0
  210. package/dist/primitives/Heading/Heading.doc.js +46 -0
  211. package/dist/primitives/Heading/Heading.js +80 -0
  212. package/dist/primitives/Heading/index.js +2 -0
  213. package/dist/primitives/Heatmap/Heatmap.doc.js +49 -0
  214. package/dist/primitives/Heatmap/Heatmap.js +42 -0
  215. package/dist/primitives/Heatmap/index.js +2 -0
  216. package/dist/primitives/HoverCard/HoverCard.doc.js +36 -0
  217. package/dist/primitives/HoverCard/HoverCard.js +39 -0
  218. package/dist/primitives/HoverCard/index.js +2 -0
  219. package/dist/primitives/Icon/Icon.doc.js +49 -0
  220. package/dist/primitives/Icon/Icon.js +214 -0
  221. package/dist/primitives/Icon/buckets/lucide-a.js +214 -0
  222. package/dist/primitives/Icon/buckets/lucide-b.js +298 -0
  223. package/dist/primitives/Icon/buckets/lucide-c.js +524 -0
  224. package/dist/primitives/Icon/buckets/lucide-d.js +110 -0
  225. package/dist/primitives/Icon/buckets/lucide-e.js +50 -0
  226. package/dist/primitives/Icon/buckets/lucide-f.js +264 -0
  227. package/dist/primitives/Icon/buckets/lucide-g.js +108 -0
  228. package/dist/primitives/Icon/buckets/lucide-h.js +112 -0
  229. package/dist/primitives/Icon/buckets/lucide-i.js +46 -0
  230. package/dist/primitives/Icon/buckets/lucide-j.js +6 -0
  231. package/dist/primitives/Icon/buckets/lucide-k.js +18 -0
  232. package/dist/primitives/Icon/buckets/lucide-l.js +162 -0
  233. package/dist/primitives/Icon/buckets/lucide-m.js +266 -0
  234. package/dist/primitives/Icon/buckets/lucide-n.js +34 -0
  235. package/dist/primitives/Icon/buckets/lucide-o.js +20 -0
  236. package/dist/primitives/Icon/buckets/lucide-p.js +216 -0
  237. package/dist/primitives/Icon/buckets/lucide-q.js +6 -0
  238. package/dist/primitives/Icon/buckets/lucide-r.js +140 -0
  239. package/dist/primitives/Icon/buckets/lucide-s.js +490 -0
  240. package/dist/primitives/Icon/buckets/lucide-t.js +204 -0
  241. package/dist/primitives/Icon/buckets/lucide-u.js +84 -0
  242. package/dist/primitives/Icon/buckets/lucide-v.js +46 -0
  243. package/dist/primitives/Icon/buckets/lucide-w.js +82 -0
  244. package/dist/primitives/Icon/buckets/lucide-x.js +6 -0
  245. package/dist/primitives/Icon/buckets/lucide-z.js +36 -0
  246. package/dist/primitives/Icon/buckets/phosphor-a.js +250 -0
  247. package/dist/primitives/Icon/buckets/phosphor-b.js +158 -0
  248. package/dist/primitives/Icon/buckets/phosphor-c.js +320 -0
  249. package/dist/primitives/Icon/buckets/phosphor-d.js +90 -0
  250. package/dist/primitives/Icon/buckets/phosphor-e.js +52 -0
  251. package/dist/primitives/Icon/buckets/phosphor-f.js +162 -0
  252. package/dist/primitives/Icon/buckets/phosphor-g.js +92 -0
  253. package/dist/primitives/Icon/buckets/phosphor-h.js +88 -0
  254. package/dist/primitives/Icon/buckets/phosphor-i.js +26 -0
  255. package/dist/primitives/Icon/buckets/phosphor-j.js +8 -0
  256. package/dist/primitives/Icon/buckets/phosphor-k.js +8 -0
  257. package/dist/primitives/Icon/buckets/phosphor-l.js +84 -0
  258. package/dist/primitives/Icon/buckets/phosphor-m.js +110 -0
  259. package/dist/primitives/Icon/buckets/phosphor-n.js +100 -0
  260. package/dist/primitives/Icon/buckets/phosphor-o.js +14 -0
  261. package/dist/primitives/Icon/buckets/phosphor-p.js +166 -0
  262. package/dist/primitives/Icon/buckets/phosphor-q.js +10 -0
  263. package/dist/primitives/Icon/buckets/phosphor-r.js +46 -0
  264. package/dist/primitives/Icon/buckets/phosphor-s.js +254 -0
  265. package/dist/primitives/Icon/buckets/phosphor-t.js +152 -0
  266. package/dist/primitives/Icon/buckets/phosphor-u.js +38 -0
  267. package/dist/primitives/Icon/buckets/phosphor-v.js +22 -0
  268. package/dist/primitives/Icon/buckets/phosphor-w.js +48 -0
  269. package/dist/primitives/Icon/buckets/phosphor-x.js +4 -0
  270. package/dist/primitives/Icon/buckets/phosphor-y.js +8 -0
  271. package/dist/primitives/Icon/icon-display-names.generated.js +4 -0
  272. package/dist/primitives/Icon/icon-loaders.generated.js +70 -0
  273. package/dist/primitives/Icon/icon-names-material.generated.js +4 -0
  274. package/dist/primitives/Icon/icon-names.js +11 -0
  275. package/dist/primitives/Icon/index.js +7 -0
  276. package/dist/primitives/IconButton/IconButton.doc.js +43 -0
  277. package/dist/primitives/IconButton/IconButton.js +98 -0
  278. package/dist/primitives/IconButton/index.js +2 -0
  279. package/dist/primitives/IconPicker/IconPicker.doc.js +52 -0
  280. package/dist/primitives/IconPicker/IconPicker.js +193 -0
  281. package/dist/primitives/IconPicker/index.js +2 -0
  282. package/dist/primitives/IconPicker/registry.js +98 -0
  283. package/dist/primitives/Image/Image.doc.js +40 -0
  284. package/dist/primitives/Image/Image.js +76 -0
  285. package/dist/primitives/Image/index.js +2 -0
  286. package/dist/primitives/Inset/Inset.doc.js +34 -0
  287. package/dist/primitives/Inset/Inset.js +51 -0
  288. package/dist/primitives/Inset/index.js +2 -0
  289. package/dist/primitives/Kbd/Kbd.doc.js +22 -0
  290. package/dist/primitives/Kbd/Kbd.js +17 -0
  291. package/dist/primitives/Kbd/index.js +2 -0
  292. package/dist/primitives/LineChart/LineChart.doc.js +61 -0
  293. package/dist/primitives/LineChart/LineChart.js +146 -0
  294. package/dist/primitives/LineChart/index.js +2 -0
  295. package/dist/primitives/Link/Link.doc.js +45 -0
  296. package/dist/primitives/Link/Link.js +37 -0
  297. package/dist/primitives/Link/index.js +2 -0
  298. package/dist/primitives/List/List.doc.js +35 -0
  299. package/dist/primitives/List/List.js +35 -0
  300. package/dist/primitives/List/index.js +2 -0
  301. package/dist/primitives/Menu/Menu.doc.js +37 -0
  302. package/dist/primitives/Menu/Menu.js +117 -0
  303. package/dist/primitives/Menu/index.js +2 -0
  304. package/dist/primitives/Murmur/Murmur.doc.js +32 -0
  305. package/dist/primitives/Murmur/Murmur.js +85 -0
  306. package/dist/primitives/Murmur/engine.js +163 -0
  307. package/dist/primitives/Murmur/index.js +12 -0
  308. package/dist/primitives/Pagination/Pagination.doc.js +37 -0
  309. package/dist/primitives/Pagination/Pagination.js +183 -0
  310. package/dist/primitives/Pagination/index.js +2 -0
  311. package/dist/primitives/PanelGroup/PanelGroup.doc.js +41 -0
  312. package/dist/primitives/PanelGroup/PanelGroup.js +142 -0
  313. package/dist/primitives/PanelGroup/index.js +2 -0
  314. package/dist/primitives/Popover/Popover.doc.js +36 -0
  315. package/dist/primitives/Popover/Popover.js +41 -0
  316. package/dist/primitives/Popover/index.js +2 -0
  317. package/dist/primitives/Progress/Progress.doc.js +35 -0
  318. package/dist/primitives/Progress/Progress.js +77 -0
  319. package/dist/primitives/Progress/index.js +2 -0
  320. package/dist/primitives/RadioGroup/RadioGroup.doc.js +36 -0
  321. package/dist/primitives/RadioGroup/RadioGroup.js +132 -0
  322. package/dist/primitives/RadioGroup/index.js +2 -0
  323. package/dist/primitives/Rating/NpsScale.js +102 -0
  324. package/dist/primitives/Rating/Rating.doc.js +35 -0
  325. package/dist/primitives/Rating/Rating.js +116 -0
  326. package/dist/primitives/Rating/RatingSummary.js +50 -0
  327. package/dist/primitives/Rating/SentimentRating.js +81 -0
  328. package/dist/primitives/Rating/index.js +5 -0
  329. package/dist/primitives/Reasoning/Reasoning.doc.js +28 -0
  330. package/dist/primitives/Reasoning/Reasoning.js +73 -0
  331. package/dist/primitives/Reasoning/index.js +2 -0
  332. package/dist/primitives/Resizable/Resizable.doc.js +50 -0
  333. package/dist/primitives/Resizable/ResizeHandle.js +185 -0
  334. package/dist/primitives/Resizable/index.js +2 -0
  335. package/dist/primitives/Row/Row.doc.js +36 -0
  336. package/dist/primitives/Row/Row.js +53 -0
  337. package/dist/primitives/Row/index.js +2 -0
  338. package/dist/primitives/ScrollArea/ScrollArea.doc.js +35 -0
  339. package/dist/primitives/ScrollArea/ScrollArea.js +50 -0
  340. package/dist/primitives/ScrollArea/index.js +2 -0
  341. package/dist/primitives/Section/Section.doc.js +64 -0
  342. package/dist/primitives/Section/Section.js +76 -0
  343. package/dist/primitives/Section/index.js +2 -0
  344. package/dist/primitives/SegmentedControl/SegmentedControl.doc.js +75 -0
  345. package/dist/primitives/SegmentedControl/SegmentedControl.js +160 -0
  346. package/dist/primitives/SegmentedControl/index.js +2 -0
  347. package/dist/primitives/Select/Select.doc.js +42 -0
  348. package/dist/primitives/Select/Select.js +180 -0
  349. package/dist/primitives/Select/index.js +2 -0
  350. package/dist/primitives/Separator/Separator.doc.js +34 -0
  351. package/dist/primitives/Separator/Separator.js +84 -0
  352. package/dist/primitives/Separator/index.js +2 -0
  353. package/dist/primitives/ShavinDevTools/DevToolsPanel.js +2050 -0
  354. package/dist/primitives/ShavinDevTools/ShavinDevTools.doc.js +44 -0
  355. package/dist/primitives/ShavinDevTools/ShavinDevTools.js +15 -0
  356. package/dist/primitives/ShavinDevTools/index.js +8 -0
  357. package/dist/primitives/ShavinDevTools/types.js +0 -0
  358. package/dist/primitives/Sidebar/Sidebar.doc.js +39 -0
  359. package/dist/primitives/Sidebar/Sidebar.js +295 -0
  360. package/dist/primitives/Sidebar/index.js +2 -0
  361. package/dist/primitives/Skeleton/Skeleton.doc.js +38 -0
  362. package/dist/primitives/Skeleton/Skeleton.js +36 -0
  363. package/dist/primitives/Skeleton/index.js +2 -0
  364. package/dist/primitives/Slider/Slider.doc.js +45 -0
  365. package/dist/primitives/Slider/Slider.js +406 -0
  366. package/dist/primitives/Slider/index.js +2 -0
  367. package/dist/primitives/Sortable/Sortable.doc.js +35 -0
  368. package/dist/primitives/Sortable/Sortable.js +179 -0
  369. package/dist/primitives/Sortable/index.js +2 -0
  370. package/dist/primitives/Sparkline/Sparkline.doc.js +25 -0
  371. package/dist/primitives/Sparkline/Sparkline.js +46 -0
  372. package/dist/primitives/Sparkline/index.js +2 -0
  373. package/dist/primitives/Spinner/Spinner.doc.js +35 -0
  374. package/dist/primitives/Spinner/Spinner.js +162 -0
  375. package/dist/primitives/Spinner/index.js +2 -0
  376. package/dist/primitives/Spotlight/Spotlight.doc.js +36 -0
  377. package/dist/primitives/Spotlight/Spotlight.js +139 -0
  378. package/dist/primitives/Spotlight/index.js +2 -0
  379. package/dist/primitives/Stepper/Stepper.doc.js +46 -0
  380. package/dist/primitives/Stepper/Stepper.js +235 -0
  381. package/dist/primitives/Stepper/index.js +2 -0
  382. package/dist/primitives/Switch/Switch.doc.js +36 -0
  383. package/dist/primitives/Switch/Switch.js +54 -0
  384. package/dist/primitives/Switch/index.js +2 -0
  385. package/dist/primitives/Table/Table.doc.js +47 -0
  386. package/dist/primitives/Table/Table.js +63 -0
  387. package/dist/primitives/Table/index.js +2 -0
  388. package/dist/primitives/Tabs/Tabs.doc.js +53 -0
  389. package/dist/primitives/Tabs/Tabs.js +275 -0
  390. package/dist/primitives/Tabs/index.js +2 -0
  391. package/dist/primitives/Text/Text.doc.js +35 -0
  392. package/dist/primitives/Text/Text.js +67 -0
  393. package/dist/primitives/Text/index.js +2 -0
  394. package/dist/primitives/TextArea/TextArea.doc.js +35 -0
  395. package/dist/primitives/TextArea/TextArea.js +45 -0
  396. package/dist/primitives/TextArea/index.js +2 -0
  397. package/dist/primitives/TextField/TextField.doc.js +41 -0
  398. package/dist/primitives/TextField/TextField.js +290 -0
  399. package/dist/primitives/TextField/index.js +2 -0
  400. package/dist/primitives/ThemeProvider/ScopedThemeProvider.js +71 -0
  401. package/dist/primitives/ThemeProvider/ThemeProvider.doc.js +61 -0
  402. package/dist/primitives/ThemeProvider/ThemeProvider.js +143 -0
  403. package/dist/primitives/ThemeProvider/clientTheme.js +47 -0
  404. package/dist/primitives/ThemeProvider/index.js +3 -0
  405. package/dist/primitives/ThemeProvider/themeContext.js +11 -0
  406. package/dist/primitives/ThemeSwitcher/ThemeSwitcher.doc.js +49 -0
  407. package/dist/primitives/ThemeSwitcher/ThemeSwitcher.js +323 -0
  408. package/dist/primitives/ThemeSwitcher/index.js +2 -0
  409. package/dist/primitives/TimePicker/TimePicker.doc.js +36 -0
  410. package/dist/primitives/TimePicker/TimePicker.js +368 -0
  411. package/dist/primitives/TimePicker/index.js +2 -0
  412. package/dist/primitives/Toast/Toast.doc.js +65 -0
  413. package/dist/primitives/Toast/Toast.js +304 -0
  414. package/dist/primitives/Toast/index.js +2 -0
  415. package/dist/primitives/ToolCall/ToolCall.doc.js +29 -0
  416. package/dist/primitives/ToolCall/ToolCall.js +75 -0
  417. package/dist/primitives/ToolCall/index.js +2 -0
  418. package/dist/primitives/Tooltip/Tooltip.doc.js +37 -0
  419. package/dist/primitives/Tooltip/Tooltip.js +55 -0
  420. package/dist/primitives/Tooltip/index.js +2 -0
  421. package/dist/primitives/TopBar/TopBar.doc.js +34 -0
  422. package/dist/primitives/TopBar/TopBar.js +8 -0
  423. package/dist/primitives/TopBar/index.js +2 -0
  424. package/dist/primitives/Video/PauseToggle.js +49 -0
  425. package/dist/primitives/Video/Video.doc.js +47 -0
  426. package/dist/primitives/Video/Video.js +104 -0
  427. package/dist/primitives/Video/index.js +1 -0
  428. package/dist/primitives/VoiceInput/VoiceInput.doc.js +38 -0
  429. package/dist/primitives/VoiceInput/VoiceInput.js +96 -0
  430. package/dist/primitives/VoiceInput/index.js +2 -0
  431. package/dist/primitives/WiseOwlLogo/WiseOwlLogo.doc.js +38 -0
  432. package/dist/primitives/WiseOwlLogo/WiseOwlLogo.js +82 -0
  433. package/dist/primitives/WiseOwlLogo/index.js +2 -0
  434. package/dist/primitives/WiseOwlLogo/paths.js +10 -0
  435. package/dist/server.d.ts +256 -0
  436. package/dist/server.js +22 -0
  437. package/dist/styles/base-oklch.css +124 -0
  438. package/dist/styles/base-oklch.d.ts +2 -0
  439. package/dist/styles/base.css +124 -0
  440. package/dist/styles/base.d.ts +2 -0
  441. package/dist/styles/brand-preset.d.ts +22 -0
  442. package/dist/styles/brand-preset.js +13 -0
  443. package/dist/styles/brand-theme-v4-oklch.css +2 -0
  444. package/dist/styles/brand-theme-v4-oklch.d.ts +2 -0
  445. package/dist/styles/brand-theme-v4.css +2 -0
  446. package/dist/styles/brand-theme-v4.d.ts +2 -0
  447. package/dist/styles/brand-tokens-oklch.css +6 -0
  448. package/dist/styles/brand-tokens-oklch.d.ts +2 -0
  449. package/dist/styles/brand-tokens.css +6 -0
  450. package/dist/styles/brand-tokens.d.ts +2 -0
  451. package/dist/styles/global-oklch.css +1329 -0
  452. package/dist/styles/global-oklch.d.ts +2 -0
  453. package/dist/styles/global.css +1329 -0
  454. package/dist/styles/global.d.ts +2 -0
  455. package/dist/styles/theme-v4-oklch.css +22 -0
  456. package/dist/styles/theme-v4-oklch.d.ts +2 -0
  457. package/dist/styles/theme-v4.css +22 -0
  458. package/dist/styles/theme-v4.d.ts +2 -0
  459. package/dist/styles/tokens-oklch.css +1204 -0
  460. package/dist/styles/tokens-oklch.d.ts +2 -0
  461. package/dist/styles/tokens.css +1204 -0
  462. package/dist/styles/tokens.d.ts +2 -0
  463. package/dist/tailwind-preset.cjs +155 -0
  464. package/dist/tailwind-preset.d.ts +112 -0
  465. package/dist/tailwind-preset.js +133 -0
  466. package/dist/theme-presets-BVWZ_TxX.d.ts +514 -0
  467. package/global-oklch.css +3 -0
  468. package/package.json +169 -4
  469. package/styles.css +3 -0
  470. package/tailwind-preset.ts +140 -0
  471. package/tokens.json +423 -0
@@ -0,0 +1,51 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "../../lib/cn.js";
4
+ const insetVariants = cva("", {
5
+ variants: {
6
+ p: {
7
+ sm: "",
8
+ md: ""
9
+ },
10
+ side: {
11
+ all: "",
12
+ top: "",
13
+ bottom: "",
14
+ x: ""
15
+ }
16
+ },
17
+ compoundVariants: [
18
+ { p: "sm", side: "all", class: "-m-4" },
19
+ { p: "sm", side: "top", class: "-mx-4 -mt-4" },
20
+ { p: "sm", side: "bottom", class: "-mx-4 -mb-4" },
21
+ { p: "sm", side: "x", class: "-mx-4" },
22
+ { p: "md", side: "all", class: "-m-5" },
23
+ { p: "md", side: "top", class: "-mx-5 -mt-5" },
24
+ { p: "md", side: "bottom", class: "-mx-5 -mb-5" },
25
+ { p: "md", side: "x", class: "-mx-5" }
26
+ ],
27
+ defaultVariants: { p: "sm", side: "all" }
28
+ });
29
+ function Inset({
30
+ side,
31
+ p,
32
+ clip,
33
+ className,
34
+ ...props
35
+ }) {
36
+ return /* @__PURE__ */ jsx(
37
+ "div",
38
+ {
39
+ className: cn(
40
+ insetVariants({ p, side }),
41
+ clip && (side === "top" ? "overflow-hidden rounded-t-[var(--radius-panel)]" : side === "bottom" ? "overflow-hidden rounded-b-[var(--radius-panel)]" : side === "x" ? "overflow-hidden" : "overflow-hidden rounded-[var(--radius-panel)]"),
42
+ className
43
+ ),
44
+ ...props
45
+ }
46
+ );
47
+ }
48
+ export {
49
+ Inset,
50
+ insetVariants
51
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./Inset.js";
2
+ export * from "./Inset.doc.js";
@@ -0,0 +1,22 @@
1
+ const docs = {
2
+ name: "Kbd",
3
+ group: "typography",
4
+ description: "A physical key, for keyboard shortcuts in menus, hints and docs.",
5
+ features: ["Bordered key cap with a heavier bottom edge, mono font, muted text"],
6
+ accessibility: ["Renders a native <kbd> element; write combinations as separate keys (\u2318 then K) so each is announced"],
7
+ usage: {
8
+ bestPractices: [
9
+ { guidance: true, description: "Use one Kbd per key in a combination." },
10
+ { guidance: false, description: "Do not use Kbd for code or values; use Code." }
11
+ ]
12
+ },
13
+ examples: [
14
+ {
15
+ title: "Shortcut hint",
16
+ code: '<Text size="sm" color="muted">Press <Kbd>\u2318</Kbd> <Kbd>K</Kbd> to search.</Text>'
17
+ }
18
+ ]
19
+ };
20
+ export {
21
+ docs
22
+ };
@@ -0,0 +1,17 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/cn.js";
3
+ function Kbd({ children, className }) {
4
+ return /* @__PURE__ */ jsx(
5
+ "kbd",
6
+ {
7
+ className: cn(
8
+ "rounded-[var(--radius-lg)] border border-hairline border-b-2 bg-surface px-1.5 py-0.5 font-mono text-xs text-fg-muted",
9
+ className
10
+ ),
11
+ children
12
+ }
13
+ );
14
+ }
15
+ export {
16
+ Kbd
17
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./Kbd.js";
2
+ export * from "./Kbd.doc.js";
@@ -0,0 +1,61 @@
1
+ const docs = {
2
+ name: "LineChart",
3
+ description: "Line or area chart, one series or several: overlay several metrics, stack areas, smooth or straight curves, shared hover tooltip and legend. Axis ticks are always round numbers.",
4
+ features: [
5
+ "Multi-series: one record per x position, a numeric value per series key",
6
+ "type line or area; stacked areas with stacked",
7
+ "No series needed for a single trend: pass { label, value }",
8
+ "curve smooth, linear or step (balances, plans, queue depth)",
9
+ "yMax, tickCount, showYAxis, showXAxis, showGrid, padding, xLabelEvery / xLabelEveryMobile / xLabels",
10
+ "yFormat (number | compact | currency | percent) with yPrefix/ySuffix",
11
+ "Legend appears automatically for two or more series"
12
+ ],
13
+ accessibility: ["The chart has role=img with a label; keep the surrounding heading and values in text", "Colour is never the only signal: legends, labels and tooltips carry names and values"],
14
+ keyboard: "Hover to inspect values.",
15
+ usage: {
16
+ bestPractices: [
17
+ { guidance: true, description: "Use LineChart for one or several metrics over time; use Sparkline for a tiny trend inside a card or table cell." },
18
+ { guidance: false, description: "Do not pass pre-formatted strings as values; keep numbers raw and format with yFormat." }
19
+ ]
20
+ },
21
+ examples: [
22
+ {
23
+ title: "Two lines",
24
+ code: `<LineChart
25
+ data={[
26
+ { label: "Jan", web: 1200, ios: 640 },
27
+ { label: "Feb", web: 1350, ios: 720 },
28
+ { label: "Mar", web: 1280, ios: 810 },
29
+ { label: "Apr", web: 1490, ios: 905 },
30
+ { label: "May", web: 1620, ios: 980 },
31
+ { label: "Jun", web: 1710, ios: 1100 },
32
+ ]}
33
+ series={[
34
+ { key: "web", name: "Web" },
35
+ { key: "ios", name: "iOS", tone: "success" },
36
+ ]}
37
+ />`
38
+ },
39
+ {
40
+ title: "Stacked area",
41
+ code: `<LineChart
42
+ type="area"
43
+ stacked
44
+ data={[
45
+ { label: "Q1", web: 4200, ios: 2100, android: 1500 },
46
+ { label: "Q2", web: 4600, ios: 2500, android: 1800 },
47
+ { label: "Q3", web: 4900, ios: 2900, android: 2300 },
48
+ { label: "Q4", web: 5400, ios: 3300, android: 2700 },
49
+ ]}
50
+ series={[
51
+ { key: "web", name: "Web" },
52
+ { key: "ios", name: "iOS" },
53
+ { key: "android", name: "Android" },
54
+ ]}
55
+ />`
56
+ }
57
+ ]
58
+ };
59
+ export {
60
+ docs
61
+ };
@@ -0,0 +1,146 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useId, useMemo, useRef, useState } from "react";
4
+ import { cn } from "../../lib/cn.js";
5
+ import {
6
+ ChartDataTable,
7
+ ChartLegend,
8
+ ChartTooltip,
9
+ DEFAULT_SERIES,
10
+ SeriesMarker,
11
+ SeriesPatterns,
12
+ chartKeyProps,
13
+ makeFormatter,
14
+ niceScale,
15
+ patternBase,
16
+ seriesColor,
17
+ seriesDash,
18
+ seriesFill,
19
+ xLabelClass,
20
+ xLabelState,
21
+ useSize
22
+ } from "../../lib/chart-kit.js";
23
+ function smoothPath(pts) {
24
+ if (pts.length < 3) return pts.map((p, i) => `${i ? "L" : "M"} ${p.x} ${p.y}`).join(" ");
25
+ let d = `M ${pts[0].x} ${pts[0].y}`;
26
+ for (let i = 0; i < pts.length - 1; i++) {
27
+ const p0 = pts[i - 1] ?? pts[i], p1 = pts[i], p2 = pts[i + 1], p3 = pts[i + 2] ?? p2;
28
+ const c1x = p1.x + (p2.x - p0.x) / 6, c1y = p1.y + (p2.y - p0.y) / 6;
29
+ const c2x = p2.x - (p3.x - p1.x) / 6, c2y = p2.y - (p3.y - p1.y) / 6;
30
+ d += ` C ${c1x} ${c1y}, ${c2x} ${c2y}, ${p2.x} ${p2.y}`;
31
+ }
32
+ return d;
33
+ }
34
+ function LineChart({
35
+ data,
36
+ series = DEFAULT_SERIES,
37
+ type = "line",
38
+ stacked = false,
39
+ curve = "smooth",
40
+ height = 260,
41
+ showLegend = true,
42
+ showGrid = true,
43
+ showYAxis = true,
44
+ showXAxis = true,
45
+ showDots,
46
+ xLabelEvery,
47
+ xLabelEveryMobile,
48
+ xLabels,
49
+ tickCount = 4,
50
+ yMax,
51
+ padding: paddingProp,
52
+ yFormat,
53
+ yPrefix,
54
+ ySuffix,
55
+ title,
56
+ description,
57
+ patterns = true,
58
+ className,
59
+ ...props
60
+ }) {
61
+ const descId = useId();
62
+ const pat = patterns && series.length > 1 ? patternBase(descId) : null;
63
+ const name = title ?? (type === "area" ? "Area chart" : "Line chart");
64
+ const ref = useRef(null);
65
+ const { width } = useSize(ref, height);
66
+ const [hover, setHover] = useState(null);
67
+ const fmt = makeFormatter({ yFormat, yPrefix, ySuffix });
68
+ const PAD = { top: 16, right: 16, bottom: showXAxis ? 28 : 8, left: showYAxis ? 44 : 8, ...paddingProp };
69
+ const innerW = Math.max(width - PAD.left - PAD.right, 40);
70
+ const innerH = Math.max(height - PAD.top - PAD.bottom, 40);
71
+ const dots = showDots ?? data.length <= 16;
72
+ const { scale, stacks } = useMemo(() => {
73
+ const cumulative = data.map((d) => {
74
+ let run = 0;
75
+ return series.map((s) => {
76
+ const v = Number(d[s.key] ?? 0);
77
+ const base = stacked ? run : 0;
78
+ run += v;
79
+ return { v, y0: base, y1: stacked ? run : v };
80
+ });
81
+ });
82
+ const max = Math.max(0, ...cumulative.flat().map((c) => c.y1));
83
+ const intervals = Math.max(Math.floor(tickCount), 1);
84
+ const nice = niceScale(yMax ?? max, intervals);
85
+ const ticks = yMax !== void 0 ? Array.from({ length: intervals + 1 }, (_, i) => yMax / intervals * i) : nice.ticks;
86
+ return { scale: { max: yMax ?? nice.max, ticks }, stacks: cumulative };
87
+ }, [data, series, stacked, tickCount, yMax]);
88
+ const x = (i) => PAD.left + (data.length <= 1 ? innerW / 2 : i / (data.length - 1) * innerW);
89
+ const y = (v) => PAD.top + innerH - v / scale.max * innerH;
90
+ function onMove(e) {
91
+ const rect = e.currentTarget.getBoundingClientRect();
92
+ const rel = (e.clientX - rect.left - PAD.left) / innerW;
93
+ setHover(Math.min(data.length - 1, Math.max(0, Math.round(rel * (data.length - 1)))));
94
+ }
95
+ const path = (pts) => curve === "smooth" ? smoothPath(pts) : curve === "step" ? pts.map((p, i) => i ? `H ${p.x} V ${p.y}` : `M ${p.x} ${p.y}`).join(" ") : pts.map((p, i) => `${i ? "L" : "M"} ${p.x} ${p.y}`).join(" ");
96
+ const paths = series.map((s, si) => {
97
+ const pts = data.map((_, i) => ({ x: x(i), y: y(stacks[i][si].y1) }));
98
+ const line = path(pts);
99
+ const low = data.map((_, i) => ({ x: x(i), y: y(stacks[i][si].y0) })).reverse();
100
+ const area = `${line} L ${low.map((p) => `${p.x} ${p.y}`).join(" L ")} Z`;
101
+ return { line, area, color: seriesColor(s, si) };
102
+ });
103
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-3", className), ...props, children: [
104
+ showLegend && series.length > 1 && /* @__PURE__ */ jsx(ChartLegend, { series, patterns: pat, kind: "line" }),
105
+ description && /* @__PURE__ */ jsx("p", { id: descId, className: "sr-only", children: description }),
106
+ /* @__PURE__ */ jsxs(
107
+ "div",
108
+ {
109
+ ref,
110
+ className: "relative w-full rounded-[var(--radius-lg)]",
111
+ style: { height },
112
+ ...chartKeyProps({ name, descriptionId: description ? descId : void 0, count: data.length, hover, setHover }),
113
+ children: [
114
+ /* @__PURE__ */ jsxs("svg", { width, height, onPointerMove: onMove, onPointerLeave: () => setHover(null), "aria-hidden": "true", children: [
115
+ pat && /* @__PURE__ */ jsx(SeriesPatterns, { base: pat, colors: paths.map((p) => p.color) }),
116
+ scale.ticks.map((t) => /* @__PURE__ */ jsxs("g", { children: [
117
+ showGrid && /* @__PURE__ */ jsx("line", { x1: PAD.left, x2: width - PAD.right, y1: y(t), y2: y(t), stroke: "rgb(var(--hairline))", strokeDasharray: "3 4" }),
118
+ showYAxis && /* @__PURE__ */ jsx("text", { x: PAD.left - 8, y: y(t) + 4, textAnchor: "end", className: "fill-fg-subtle text-[11px]", children: fmt(t) })
119
+ ] }, t)),
120
+ showXAxis && data.map((d, i) => {
121
+ const state = xLabelState(String(d.label), i, { xLabelEvery, xLabelEveryMobile, xLabels });
122
+ return state !== "hide" && /* @__PURE__ */ jsx("text", { x: x(i), y: height - 8, textAnchor: "middle", className: cn("fill-fg-subtle text-[11px]", xLabelClass(state)), children: d.label }, i);
123
+ }),
124
+ type === "area" && paths.map((p, i) => /* @__PURE__ */ jsx("path", { d: p.area, fill: stacked ? seriesFill(pat, i, p.color) : p.color, opacity: stacked ? 0.55 : 0.12 }, `a${i}`)),
125
+ paths.map((p, i) => /* @__PURE__ */ jsx("path", { d: p.line, fill: "none", stroke: p.color, strokeWidth: 2, strokeDasharray: seriesDash(!!pat, i), strokeLinejoin: "round", strokeLinecap: "round" }, i)),
126
+ hover !== null && /* @__PURE__ */ jsx("line", { x1: x(hover), x2: x(hover), y1: PAD.top, y2: PAD.top + innerH, stroke: "rgb(var(--hairline-strong))" }),
127
+ dots && series.map((s, si) => data.map((_, i) => /* @__PURE__ */ jsx(SeriesMarker, { i: si, shaped: !!pat, cx: x(i), cy: y(stacks[i][si].y1), r: hover === i ? 4 : 2.5, fill: "rgb(var(--bg-surface))", stroke: paths[si].color, strokeWidth: 2 }, `${si}-${i}`))),
128
+ !dots && hover !== null && series.map((s, si) => /* @__PURE__ */ jsx(SeriesMarker, { i: si, shaped: !!pat, cx: x(hover), cy: y(stacks[hover][si].y1), r: 4, fill: "rgb(var(--bg-surface))", stroke: paths[si].color, strokeWidth: 2 }, si))
129
+ ] }),
130
+ hover !== null && /* @__PURE__ */ jsx(ChartTooltip, { left: x(hover), width, title: String(data[hover].name ?? data[hover].label), rows: series.map((s, si) => ({ name: s.name, value: fmt(stacks[hover][si].v, true), color: paths[si].color, index: si, patterns: pat, kind: "line" })) })
131
+ ]
132
+ }
133
+ ),
134
+ /* @__PURE__ */ jsx(
135
+ ChartDataTable,
136
+ {
137
+ caption: name,
138
+ columns: ["Label", ...series.map((x2) => x2.name)],
139
+ rows: data.map((d) => [String(d.name ?? d.label), ...series.map((x2) => fmt(Number(d[x2.key] ?? 0), true))])
140
+ }
141
+ )
142
+ ] });
143
+ }
144
+ export {
145
+ LineChart
146
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./LineChart.js";
2
+ export * from "./LineChart.doc.js";
@@ -0,0 +1,45 @@
1
+ const docs = {
2
+ name: "Link",
3
+ group: "typography",
4
+ description: "Inline text link with underline and colour variants.",
5
+ features: [
6
+ "underline: hover (default), always, none",
7
+ "color: default (text colour) or brand (link token)",
8
+ "size: xs, sm, md, lg, or inherit from the surrounding text",
9
+ "Renders a native <a>, so it works with any router through href",
10
+ 'standalone: a 24px hit area for a link that is not inside a sentence (navigation, footer, table of contents); no layout shift. On by default when underline is "none"; standalone={false} opts out'
11
+ ],
12
+ accessibility: [
13
+ "Native anchor: focusable, announced as a link, activates with Enter",
14
+ 'Write link text that makes sense on its own ("Read the billing guide", not "click here")',
15
+ 'Target size (WCAG 2.5.8): links inside running text are exempt; give a stand-alone link standalone. hitArea="touch" grows it to 44px on touch, hitArea="none" opts out',
16
+ 'Add rel="noopener noreferrer" with target="_blank", and say the link opens a new tab'
17
+ ],
18
+ keyboard: "Tab to focus, Enter to follow.",
19
+ usage: {
20
+ bestPractices: [
21
+ { guidance: true, description: 'Use underline="always" for links inside paragraphs so they are recognisable without colour.' },
22
+ { guidance: true, description: "Add standalone to links that stand on their own: nav, footer and table-of-contents links." },
23
+ { guidance: false, description: 'Do not use Link for actions that do not navigate; use Button with variant="ghost".' }
24
+ ]
25
+ },
26
+ examples: [
27
+ {
28
+ title: "Inline and brand links",
29
+ code: `<Text>
30
+ Read the <Link href="#" underline="always">billing guide</Link> or{" "}
31
+ <Link href="#" color="brand">contact support</Link>.
32
+ </Text>`
33
+ },
34
+ {
35
+ title: "Stand-alone links",
36
+ code: `<Flex direction="column" gap="1">
37
+ <Link href="#" standalone>Pricing</Link>
38
+ <Link href="#" standalone>Changelog</Link>
39
+ </Flex>`
40
+ }
41
+ ]
42
+ };
43
+ export {
44
+ docs
45
+ };
@@ -0,0 +1,37 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "../../lib/cn.js";
4
+ import { hitAreaClass } from "../../lib/hit-area.js";
5
+ const linkVariants = cva("transition-colors", {
6
+ variants: {
7
+ underline: {
8
+ always: "underline",
9
+ hover: "no-underline hover:underline",
10
+ none: "no-underline"
11
+ },
12
+ color: {
13
+ default: "text-fg",
14
+ brand: "text-link"
15
+ }
16
+ },
17
+ defaultVariants: { underline: "hover", color: "default" }
18
+ });
19
+ function Link({
20
+ href,
21
+ children,
22
+ underline,
23
+ color,
24
+ size,
25
+ standalone,
26
+ hitArea,
27
+ className,
28
+ ...props
29
+ }) {
30
+ const isStandalone = standalone ?? underline === "none";
31
+ const sizeClass = size === "xs" ? "text-xs" : size === "sm" ? "text-sm" : size === "lg" ? "text-lg" : size === "md" ? "text-base" : "";
32
+ return /* @__PURE__ */ jsx("a", { href, className: cn(linkVariants({ underline, color }), sizeClass, isStandalone && "hit-area", isStandalone && hitAreaClass(hitArea, "floor", "Link"), className), ...props, children });
33
+ }
34
+ export {
35
+ Link,
36
+ linkVariants
37
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./Link.js";
2
+ export * from "./Link.doc.js";
@@ -0,0 +1,35 @@
1
+ const docs = {
2
+ name: "List",
3
+ group: "typography",
4
+ description: "A bulleted or numbered list for body text. Numbers can also be letters or roman numerals.",
5
+ features: [
6
+ "Markers: bullet (disc), number (decimal), lower-roman, upper-roman, lower-alpha, upper-alpha, none",
7
+ "Auto-infers <ul> or <ol> tag based on marker choice",
8
+ "Semantic <ul> / <ol> and <li> HTML structure"
9
+ ],
10
+ accessibility: [
11
+ "Native HTML list accessibility tree representation",
12
+ "High contrast marker styling (marker:text-fg-subtle)"
13
+ ],
14
+ usage: {
15
+ bestPractices: [
16
+ {
17
+ guidance: true,
18
+ description: "Use List for prose bullet points, feature lists, and sequential steps."
19
+ },
20
+ {
21
+ guidance: false,
22
+ description: "Do not use List for clickable interactive item rows \u2014 reach for Card or DataList instead."
23
+ }
24
+ ]
25
+ },
26
+ examples: [
27
+ {
28
+ title: "Bulleted Prose List",
29
+ code: '<List marker="bullet"><ListItem>First key feature point</ListItem><ListItem>Second key feature point</ListItem></List>'
30
+ }
31
+ ]
32
+ };
33
+ export {
34
+ docs
35
+ };
@@ -0,0 +1,35 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "../../lib/cn.js";
4
+ const listVariants = cva("space-y-1.5 text-sm text-fg", {
5
+ variants: {
6
+ marker: {
7
+ bullet: "list-disc pl-5 marker:text-fg-subtle",
8
+ number: "list-decimal pl-5 marker:text-fg-subtle",
9
+ "lower-roman": "[list-style-type:lower-roman] pl-6 marker:text-fg-subtle",
10
+ "upper-roman": "[list-style-type:upper-roman] pl-6 marker:text-fg-subtle",
11
+ "lower-alpha": "[list-style-type:lower-alpha] pl-5 marker:text-fg-subtle",
12
+ "upper-alpha": "[list-style-type:upper-alpha] pl-5 marker:text-fg-subtle",
13
+ none: "list-none"
14
+ }
15
+ },
16
+ defaultVariants: { marker: "bullet" }
17
+ });
18
+ function List({
19
+ as,
20
+ marker,
21
+ className,
22
+ ...props
23
+ }) {
24
+ const orderedMarkers = ["number", "lower-roman", "upper-roman", "lower-alpha", "upper-alpha"];
25
+ const Tag = as ?? (marker && orderedMarkers.includes(marker) ? "ol" : "ul");
26
+ return /* @__PURE__ */ jsx(Tag, { className: cn(listVariants({ marker }), className), ...props });
27
+ }
28
+ function ListItem({ className, ...props }) {
29
+ return /* @__PURE__ */ jsx("li", { className: cn("leading-relaxed", className), ...props });
30
+ }
31
+ export {
32
+ List,
33
+ ListItem,
34
+ listVariants
35
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./List.js";
2
+ export * from "./List.doc.js";
@@ -0,0 +1,37 @@
1
+ const docs = {
2
+ name: "Menu",
3
+ description: "A list of actions that opens from a button, with keyboard navigation and nested submenus.",
4
+ features: [
5
+ "Components: Menu, MenuTrigger, MenuItem, MenuSub, MenuSubTrigger, MenuSubContent",
6
+ "Supports CVA variant='default' and variant='danger' (destructive item)",
7
+ "Includes ChevronRight indicator for nested sub-menus per AGENTS.md convention",
8
+ "Uses data-panel translucent surface styling"
9
+ ],
10
+ accessibility: [
11
+ "Arrow key navigation between items with typeahead character matching",
12
+ "Restores focus to trigger element on close",
13
+ "Supports aria-expanded, aria-controls, and role='menu'"
14
+ ],
15
+ keyboard: "Up/Down arrows to navigate items, Right arrow to open sub-menu, Left arrow to close sub-menu, Enter to select, Escape to dismiss",
16
+ usage: {
17
+ bestPractices: [
18
+ {
19
+ guidance: true,
20
+ description: "Use Menu for contextual action lists (e.g. \u22EF overflow triggers)."
21
+ },
22
+ {
23
+ guidance: false,
24
+ description: "Do not use Menu as a form select control \u2014 reach for Select instead."
25
+ }
26
+ ]
27
+ },
28
+ examples: [
29
+ {
30
+ title: "Context Action Menu",
31
+ code: '<Menu trigger={<MenuTrigger />}><MenuItem>Edit</MenuItem><MenuItem variant="danger">Delete</MenuItem></Menu>'
32
+ }
33
+ ]
34
+ };
35
+ export {
36
+ docs
37
+ };
@@ -0,0 +1,117 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { forwardRef } from "react";
4
+ import * as RadixMenu from "@radix-ui/react-dropdown-menu";
5
+ import { cva } from "class-variance-authority";
6
+ import { cn } from "../../lib/cn.js";
7
+ import { usePortalContainer } from "../../lib/portal-container.js";
8
+ function Menu({
9
+ trigger,
10
+ children,
11
+ align = "start",
12
+ onOpenChange
13
+ }) {
14
+ const portalContainer = usePortalContainer();
15
+ return /* @__PURE__ */ jsxs(RadixMenu.Root, { onOpenChange, children: [
16
+ /* @__PURE__ */ jsx(RadixMenu.Trigger, { asChild: true, children: trigger }),
17
+ /* @__PURE__ */ jsx(RadixMenu.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx(
18
+ RadixMenu.Content,
19
+ {
20
+ "data-panel": true,
21
+ align,
22
+ sideOffset: 4,
23
+ avoidCollisions: true,
24
+ collisionPadding: 8,
25
+ className: "animate-rise origin-[var(--radix-dropdown-menu-content-transform-origin)] z-[var(--z-floating)] w-52 overflow-hidden rounded-[var(--radius-panel)] border border-hairline shadow-panel focus:outline-none",
26
+ children: /* @__PURE__ */ jsx("div", { className: "max-h-[calc(6.5*2.25rem)] overflow-y-auto p-1", children })
27
+ }
28
+ ) })
29
+ ] });
30
+ }
31
+ const MenuTrigger = forwardRef(
32
+ function MenuTrigger2({ className, children, ...props }, ref) {
33
+ return /* @__PURE__ */ jsx(
34
+ "button",
35
+ {
36
+ ref,
37
+ type: "button",
38
+ "aria-label": children ? void 0 : "More options",
39
+ className: cn(
40
+ "rounded-[var(--radius-lg)] p-2 text-fg-muted transition hover:bg-surface-hover hover:text-fg active:scale-[0.97]",
41
+ className
42
+ ),
43
+ ...props,
44
+ children: children ?? /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", className: "h-5 w-5", fill: "currentColor", "aria-hidden": "true", children: [
45
+ /* @__PURE__ */ jsx("circle", { cx: "5", cy: "12", r: "1.8" }),
46
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1.8" }),
47
+ /* @__PURE__ */ jsx("circle", { cx: "19", cy: "12", r: "1.8" })
48
+ ] })
49
+ }
50
+ );
51
+ }
52
+ );
53
+ const menuItemVariants = cva(
54
+ "block w-full cursor-pointer rounded-panel-p1 px-3 py-2 text-left text-sm outline-none hover:bg-elevated-hover data-[highlighted]:bg-elevated-hover",
55
+ {
56
+ variants: {
57
+ variant: {
58
+ default: "text-fg",
59
+ danger: "border-t border-hairline text-danger"
60
+ }
61
+ },
62
+ defaultVariants: { variant: "default" }
63
+ }
64
+ );
65
+ function MenuItem({
66
+ className,
67
+ variant,
68
+ ...props
69
+ }) {
70
+ return /* @__PURE__ */ jsx(RadixMenu.Item, { className: cn(menuItemVariants({ variant }), className), ...props });
71
+ }
72
+ function MenuSub({ children, ...props }) {
73
+ return /* @__PURE__ */ jsx(RadixMenu.Sub, { ...props, children });
74
+ }
75
+ const MenuSubTrigger = forwardRef(function MenuSubTrigger2({ className, children, ...props }, ref) {
76
+ return /* @__PURE__ */ jsxs(
77
+ RadixMenu.SubTrigger,
78
+ {
79
+ ref,
80
+ className: cn(
81
+ "flex w-full cursor-default select-none items-center justify-between rounded-panel-p1 px-3 py-2 text-sm outline-none hover:bg-elevated-hover data-[highlighted]:bg-elevated-hover data-[state=open]:bg-elevated-hover text-fg",
82
+ className
83
+ ),
84
+ ...props,
85
+ children: [
86
+ children,
87
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", className: "ml-auto h-3.5 w-3.5 text-fg-muted", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6", strokeLinecap: "round", strokeLinejoin: "round" }) })
88
+ ]
89
+ }
90
+ );
91
+ });
92
+ const MenuSubContent = forwardRef(function MenuSubContent2({ className, children, ...props }, ref) {
93
+ const portalContainer = usePortalContainer();
94
+ return /* @__PURE__ */ jsx(RadixMenu.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx(
95
+ RadixMenu.SubContent,
96
+ {
97
+ ref,
98
+ "data-panel": true,
99
+ sideOffset: 2,
100
+ alignOffset: -5,
101
+ className: cn(
102
+ "z-[var(--z-floating)] min-w-[8rem] overflow-hidden rounded-[var(--radius-panel)] border border-hairline bg-surface shadow-panel animate-rise",
103
+ className
104
+ ),
105
+ ...props,
106
+ children: /* @__PURE__ */ jsx("div", { className: "max-h-[calc(6.5*2.25rem)] overflow-y-auto p-1", children })
107
+ }
108
+ ) });
109
+ });
110
+ export {
111
+ Menu,
112
+ MenuItem,
113
+ MenuSub,
114
+ MenuSubContent,
115
+ MenuSubTrigger,
116
+ MenuTrigger
117
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./Menu.js";
2
+ export * from "./Menu.doc.js";
@@ -0,0 +1,32 @@
1
+ const docs = {
2
+ name: "Murmur",
3
+ description: "A living dot-sphere that shows what an AI is doing: idle, thinking, working, listening, searching, composing, weaving, connecting, plus the orbiting and looping loaders. Every state is free.",
4
+ features: [
5
+ "States: idle, thinking, working, listening (level-reactive), searching, composing, weaving, connecting, and the loaders orbiting (ring) and looping (infinity). Add your own with registerMurmurState",
6
+ "size, speed, dots and dotSize props tune the sphere; dotSize scales every dot (default 0.4)",
7
+ "Canvas, no dependencies. Colour follows the text colour, brand by default",
8
+ "Pauses off screen and stops animating under prefers-reduced-motion",
9
+ "Used by ChatBubble (submitted), Reasoning, ToolCall and VoiceInput"
10
+ ],
11
+ accessibility: [
12
+ 'role=img with an accessible name from the state, or pass label="" to hide it when visible text sits beside it',
13
+ "Motion is decorative and respects prefers-reduced-motion"
14
+ ],
15
+ keyboard: "Not interactive.",
16
+ usage: {
17
+ bestPractices: [
18
+ { guidance: true, description: "Pair Murmur with a short visible label (Thinking, Searching) so the state is never conveyed by motion alone." },
19
+ { guidance: false, description: "Do not use Murmur as a generic page loader, use Spinner or Skeleton for non-AI waiting." }
20
+ ]
21
+ },
22
+ examples: [
23
+ { title: "Thinking", code: '<Murmur state="thinking" size={32} />' },
24
+ { title: "Fine dots", code: '<Murmur state="thinking" size={64} dots={160} dotSize={0.25} />' },
25
+ { title: "Listening with level", code: '<Murmur state="listening" size={48} level={0.6} />' },
26
+ { title: "Searching", code: '<Murmur state="searching" size={32} />' },
27
+ { title: "Beaded ring loader", code: '<Murmur state="orbiting" size={20} dots={18} label="Loading" />' }
28
+ ]
29
+ };
30
+ export {
31
+ docs
32
+ };