@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,11 @@
1
+ import { LUCIDE_NAMES, PHOSPHOR, RADIX } from "./icon-loaders.generated.js";
2
+ import { ICON_NAMES } from "./icon-display-names.generated.js";
3
+ function iconExists(name) {
4
+ const key = name.toLowerCase().replace(/[-_]/g, "");
5
+ const keys = [key, key.endsWith("icon") ? key.slice(0, -4) : ""].filter(Boolean);
6
+ return keys.some((k) => LUCIDE_NAMES[k] !== void 0 || PHOSPHOR[k] !== void 0 || RADIX[k] !== void 0);
7
+ }
8
+ export {
9
+ ICON_NAMES,
10
+ iconExists
11
+ };
@@ -0,0 +1,7 @@
1
+ import { Icon, preloadIcons, iconVariants } from "./Icon.js";
2
+ export * from "./Icon.doc.js";
3
+ export {
4
+ Icon,
5
+ iconVariants,
6
+ preloadIcons
7
+ };
@@ -0,0 +1,43 @@
1
+ const docs = {
2
+ name: "IconButton",
3
+ description: "A square button that shows only an icon. It needs a label for screen readers, and comes in solid, soft, outline and ghost styles.",
4
+ features: [
5
+ "Variants: solid, soft, outline, ghost",
6
+ "Tones: brand and danger",
7
+ "Sizes: sm (32px), md (40px), lg (48px)",
8
+ "Always forwards ref to support Radix primitive asChild triggers",
9
+ "loading (Spinner replaces the icon, progress cursor) and disabledReason (focusable, reason in a Tooltip), same as Button"
10
+ ],
11
+ accessibility: [
12
+ "Enforces mandatory aria-label string prop in TypeScript types for zero-accessibility-defect icon buttons",
13
+ "Active scale micro-animation on press (active:scale-[0.97]), suppressed while disabled or loading",
14
+ "disabledReason renders aria-disabled (focusable) and is the button's accessible description; the most common place for an unexplained disabled state",
15
+ "loading sets aria-busy; loadingLabel is announced once"
16
+ ],
17
+ keyboard: "Space or Enter to trigger action",
18
+ usage: {
19
+ bestPractices: [
20
+ {
21
+ guidance: true,
22
+ description: "Always pass a descriptive aria-label (e.g. aria-label='Close dialog')."
23
+ },
24
+ {
25
+ guidance: false,
26
+ description: "Do not pass visible text children \u2014 reach for Button instead."
27
+ }
28
+ ]
29
+ },
30
+ examples: [
31
+ {
32
+ title: "Disabled with a reason",
33
+ code: '<IconButton aria-label="Delete project" variant="ghost" tone="danger" disabledReason="Only owners can delete projects"><Icon name="trash-2" /></IconButton>'
34
+ },
35
+ {
36
+ title: "Settings Icon Button",
37
+ code: '<IconButton aria-label="Open settings" variant="ghost"><Settings className="h-5 w-5" /></IconButton>'
38
+ }
39
+ ]
40
+ };
41
+ export {
42
+ docs
43
+ };
@@ -0,0 +1,98 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../../lib/cn.js";
5
+ import { hitAreaClass } from "../../lib/hit-area.js";
6
+ import { useButtonState } from "../../lib/buttonState.js";
7
+ import { Spinner } from "../Spinner/index.js";
8
+ const iconButtonVariants = cva(
9
+ "hit-area-touch inline-flex shrink-0 items-center justify-center transition [&:not([data-inert])]:active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-40 data-[inert=reason]:cursor-not-allowed data-[inert=reason]:opacity-40 data-[inert=loading]:cursor-progress [&_svg]:!text-inherit",
10
+ {
11
+ variants: {
12
+ variant: {
13
+ solid: "",
14
+ soft: "",
15
+ outline: "border bg-surface",
16
+ ghost: "bg-transparent"
17
+ },
18
+ tone: {
19
+ brand: "",
20
+ danger: ""
21
+ },
22
+ size: {
23
+ sm: "h-8 w-8 rounded-[var(--radius-lg)] [&_svg]:h-4 [&_svg]:w-4",
24
+ md: "h-10 w-10 rounded-[var(--radius-lg)] [&_svg]:h-5 [&_svg]:w-5",
25
+ lg: "h-12 w-12 rounded-[var(--radius-xl)] [&_svg]:h-6 [&_svg]:w-6"
26
+ }
27
+ },
28
+ compoundVariants: [
29
+ { variant: "solid", tone: "brand", class: "bg-brand-solid text-brand-fg [&:not([data-inert])]:hover:bg-brand-solid-hover" },
30
+ { variant: "solid", tone: "danger", class: "bg-danger text-danger-fg [&:not([data-inert])]:hover:opacity-90" },
31
+ {
32
+ variant: "soft",
33
+ tone: "brand",
34
+ class: "bg-brand-subtle text-brand-contrast [&:not([data-inert])]:hover:bg-brand-subtle-hover"
35
+ },
36
+ {
37
+ variant: "soft",
38
+ tone: "danger",
39
+ class: "bg-danger/[0.12] text-danger [&:not([data-inert])]:hover:bg-danger/[0.18]"
40
+ },
41
+ { variant: "outline", tone: "brand", class: "border-hairline text-fg [&:not([data-inert])]:hover:bg-fg/[0.05]" },
42
+ {
43
+ variant: "outline",
44
+ tone: "danger",
45
+ class: "border-danger text-danger [&:not([data-inert])]:hover:bg-danger/[0.08]"
46
+ },
47
+ { variant: "ghost", tone: "brand", class: "text-fg-muted [&:not([data-inert])]:hover:bg-fg/[0.06] [&:not([data-inert])]:hover:text-fg" },
48
+ { variant: "ghost", tone: "danger", class: "text-danger [&:not([data-inert])]:hover:bg-danger/[0.08]" }
49
+ ],
50
+ defaultVariants: { variant: "solid", tone: "brand", size: "md" }
51
+ }
52
+ );
53
+ const IconButton = forwardRef(function IconButton2({
54
+ className,
55
+ variant,
56
+ tone,
57
+ size,
58
+ children,
59
+ type = "button",
60
+ loading,
61
+ loadingLabel,
62
+ disabledReason,
63
+ hitArea,
64
+ disabled,
65
+ onClick,
66
+ onPointerDown,
67
+ style,
68
+ "aria-describedby": describedBy,
69
+ ...props
70
+ }, ref) {
71
+ const { inert, buttonProps, wrap } = useButtonState({
72
+ disabled,
73
+ loading,
74
+ loadingLabel,
75
+ disabledReason,
76
+ onClick,
77
+ onPointerDown,
78
+ "aria-describedby": describedBy,
79
+ style,
80
+ ref
81
+ });
82
+ return wrap(
83
+ /* @__PURE__ */ jsx(
84
+ "button",
85
+ {
86
+ type,
87
+ className: cn(iconButtonVariants({ variant, tone, size }), hitAreaClass(hitArea, "touch", "IconButton"), className),
88
+ ...props,
89
+ ...buttonProps,
90
+ children: inert === "loading" ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "inline-flex items-center", children: /* @__PURE__ */ jsx(Spinner, { size: size === "lg" ? "lg" : "md", label: "" }) }) : children
91
+ }
92
+ )
93
+ );
94
+ });
95
+ export {
96
+ IconButton,
97
+ iconButtonVariants
98
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./IconButton.js";
2
+ export * from "./IconButton.doc.js";
@@ -0,0 +1,52 @@
1
+ const docs = {
2
+ name: "IconPicker",
3
+ description: "Choose an icon from a searchable grid in a popover, with tabs for the Lucide, Phosphor, Radix and Material icon sets.",
4
+ features: [
5
+ "Variants: 'default' (full input-like trigger) or 'icon' (compact square button)",
6
+ "Sizes: sm, md, lg for seamless alignment with form controls and toolbars",
7
+ "Custom Trigger: pass custom children to trigger popover from any custom element",
8
+ "Search filter text input with instantaneous keyword matching",
9
+ "Icon Library filtering tabs supporting Lucide, Radix, Phosphor",
10
+ "Supports optional 'none' (\xD8) selection via allowNone prop",
11
+ "Exports ALL_ICONS dictionary of built-in Lucide icons"
12
+ ],
13
+ accessibility: [
14
+ "Keyboard accessible icon button grid with focus rings",
15
+ "Each icon option provides accessible title tooltip attribute",
16
+ "Radix Popover focus trapping and ESC key dismissal"
17
+ ],
18
+ keyboard: "Type to filter icons, Tab to browse grid, Enter to select icon, Escape to close",
19
+ usage: {
20
+ bestPractices: [
21
+ {
22
+ guidance: true,
23
+ description: "Use variant='icon' inside toolbars, action bars, or compact property panels."
24
+ },
25
+ {
26
+ guidance: true,
27
+ description: "Use IconPicker in page builder tools or customization settings forms."
28
+ },
29
+ {
30
+ guidance: false,
31
+ description: "Do not use IconPicker for simple static navigation links \u2014 use Button or MenuItem instead."
32
+ }
33
+ ]
34
+ },
35
+ examples: [
36
+ {
37
+ title: "Input-Style Trigger",
38
+ code: '<IconPicker value="sparkles" onChange={(v) => console.log(v)} allowNone />'
39
+ },
40
+ {
41
+ title: "Compact Icon-Button Trigger",
42
+ code: '<IconPicker variant="icon" size="sm" value="settings" onChange={(v) => console.log(v)} />'
43
+ },
44
+ {
45
+ title: "Custom Button Trigger",
46
+ code: '<IconPicker value="user" onChange={(v) => console.log(v)}><Button variant="outline">Change Icon</Button></IconPicker>'
47
+ }
48
+ ]
49
+ };
50
+ export {
51
+ docs
52
+ };
@@ -0,0 +1,193 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import { Popover, PopoverTrigger, PopoverContent } from "../Popover/index.js";
5
+ import { TextField } from "../TextField/index.js";
6
+ import { cn } from "../../lib/cn.js";
7
+ import { Ban } from "lucide-react";
8
+ import { Icon } from "../Icon/index.js";
9
+ function IconPicker({
10
+ value,
11
+ onChange,
12
+ children,
13
+ variant = "default",
14
+ size = "md",
15
+ allowNone = false,
16
+ libraries,
17
+ className
18
+ }) {
19
+ const [open, setOpen] = useState(false);
20
+ const [search, setSearch] = useState("");
21
+ const [activeLibrary, setActiveLibrary] = useState("all");
22
+ const [registry, setRegistry] = useState(null);
23
+ useEffect(() => {
24
+ if (!open || registry) return;
25
+ let live = true;
26
+ import("./registry.js").then((m) => live && setRegistry(m.ICON_REGISTRY));
27
+ return () => {
28
+ live = false;
29
+ };
30
+ }, [open, registry]);
31
+ const query = search.trim().toLowerCase();
32
+ const libraryFiltered = !registry ? [] : activeLibrary === "all" ? registry : registry.filter(
33
+ (item) => item.library.toLowerCase() === activeLibrary.toLowerCase()
34
+ );
35
+ const filteredIcons = query ? libraryFiltered.filter(
36
+ (item) => item.name.toLowerCase().includes(query) || item.id.toLowerCase().includes(query)
37
+ ).slice(0, 120) : libraryFiltered.slice(0, 96);
38
+ const SelectedIcon = value ? ({ className: cls }) => /* @__PURE__ */ jsx(Icon, { name: value, size: "sm", className: cls }) : void 0;
39
+ const defaultTrigger = variant === "icon" ? /* @__PURE__ */ jsx(
40
+ "button",
41
+ {
42
+ type: "button",
43
+ className: cn(
44
+ "flex items-center justify-center rounded-[var(--radius-lg)] border border-hairline bg-surface text-fg-muted transition hover:bg-surface-hover hover:text-fg cursor-pointer shrink-0 shadow-1",
45
+ size === "sm" ? "h-7 w-7" : size === "lg" ? "h-9 w-9" : "h-8 w-8",
46
+ className
47
+ ),
48
+ "aria-label": value && value !== "none" ? `Icon: ${value}. Change icon` : "Pick icon",
49
+ title: value || "Pick icon",
50
+ children: SelectedIcon ? /* @__PURE__ */ jsx(SelectedIcon, { className: size === "sm" ? "h-3.5 w-3.5" : size === "lg" ? "h-4.5 w-4.5" : "h-4 w-4" }) : /* @__PURE__ */ jsx(Ban, { className: "h-3.5 w-3.5 text-fg-subtle" })
51
+ }
52
+ ) : /* @__PURE__ */ jsxs(
53
+ "button",
54
+ {
55
+ type: "button",
56
+ className: cn(
57
+ "flex w-full items-center justify-between gap-2 rounded-[var(--radius-lg)] border border-border-control bg-surface transition hover:bg-surface-hover cursor-pointer text-left",
58
+ size === "sm" ? "py-1 pl-2.5 pr-2 text-xs" : size === "lg" ? "py-2.5 pl-3 pr-2.5 text-base" : "py-1.5 pl-3 pr-2.5 text-sm",
59
+ className
60
+ ),
61
+ children: [
62
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 truncate text-left flex-1 min-w-0", children: [
63
+ SelectedIcon ? /* @__PURE__ */ jsx(SelectedIcon, { className: cn("shrink-0 text-fg-muted", size === "sm" ? "h-3.5 w-3.5" : "h-4 w-4") }) : /* @__PURE__ */ jsx(Ban, { className: cn("shrink-0 text-fg-subtle", size === "sm" ? "h-3.5 w-3.5" : "h-4 w-4") }),
64
+ /* @__PURE__ */ jsx("span", { className: "truncate text-xs text-fg", children: value || "none" })
65
+ ] }),
66
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", className: cn("shrink-0 text-fg-muted", size === "sm" ? "h-3.5 w-3.5" : "h-4 w-4"), children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) })
67
+ ]
68
+ }
69
+ );
70
+ const gridRef = useRef(null);
71
+ const offset = allowNone ? 1 : 0;
72
+ const selectedIndex = filteredIcons.findIndex(
73
+ (item) => value === item.name || value.toLowerCase() === item.name.toLowerCase()
74
+ );
75
+ const tabbableIndex = allowNone && value === "none" ? 0 : selectedIndex >= 0 ? selectedIndex + offset : 0;
76
+ const onGridKeyDown = (e) => {
77
+ const options = Array.from(e.currentTarget.querySelectorAll('[role="option"]'));
78
+ const current = options.indexOf(document.activeElement);
79
+ if (current < 0) return;
80
+ const step = { ArrowRight: 1, ArrowLeft: -1, ArrowDown: 8, ArrowUp: -8 }[e.key];
81
+ let next = step === void 0 ? -1 : current + step;
82
+ if (e.key === "Home") next = 0;
83
+ if (e.key === "End") next = options.length - 1;
84
+ if (next < 0 || next >= options.length) return;
85
+ e.preventDefault();
86
+ options[current].tabIndex = -1;
87
+ options[next].tabIndex = 0;
88
+ options[next].focus();
89
+ };
90
+ const availableTabs = libraries && libraries.length > 0 ? ["all", ...Array.from(new Set(libraries.map((l) => l.toLowerCase())))] : ["all", "phosphor", "lucide", "radix"];
91
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
92
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: children ? children : defaultTrigger }),
93
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-3", children: /* @__PURE__ */ jsxs("div", { className: "space-y-2.5", children: [
94
+ /* @__PURE__ */ jsx(
95
+ TextField,
96
+ {
97
+ placeholder: "Search icons\u2026",
98
+ "aria-label": "Search icons",
99
+ value: search,
100
+ onChange: (e) => setSearch(e.target.value),
101
+ onKeyDown: (e) => {
102
+ if (e.key === "ArrowDown") {
103
+ e.preventDefault();
104
+ gridRef.current?.querySelector('[tabindex="0"]')?.focus();
105
+ }
106
+ },
107
+ size: "sm",
108
+ className: "w-full"
109
+ }
110
+ ),
111
+ /* @__PURE__ */ jsx("div", { role: "status", className: "sr-only", children: !registry ? "Loading icons" : filteredIcons.length === 0 ? "No matching icons" : `${filteredIcons.length} icons` }),
112
+ availableTabs.length > 1 && /* @__PURE__ */ jsx("div", { role: "group", "aria-label": "Icon library", className: "flex items-center gap-1 border-b border-hairline pb-1.5 overflow-x-auto", children: availableTabs.map((lib) => /* @__PURE__ */ jsx(
113
+ "button",
114
+ {
115
+ type: "button",
116
+ onClick: () => setActiveLibrary(lib),
117
+ "aria-pressed": activeLibrary.toLowerCase() === lib,
118
+ className: cn(
119
+ "min-h-6 px-2 text-xs font-medium rounded-[var(--radius-lg)] capitalize transition cursor-pointer shrink-0",
120
+ activeLibrary.toLowerCase() === lib ? "bg-brand/15 text-brand-text font-semibold" : "text-fg-muted hover:text-fg hover:bg-surface-hover"
121
+ ),
122
+ children: lib
123
+ },
124
+ lib
125
+ )) }),
126
+ /* @__PURE__ */ jsxs(
127
+ "div",
128
+ {
129
+ ref: gridRef,
130
+ role: "listbox",
131
+ "aria-label": "Icons",
132
+ onKeyDown: onGridKeyDown,
133
+ className: "grid grid-cols-8 gap-1 max-h-56 overflow-y-auto pr-1",
134
+ children: [
135
+ allowNone && /* @__PURE__ */ jsx(
136
+ "button",
137
+ {
138
+ type: "button",
139
+ role: "option",
140
+ "aria-label": "None",
141
+ "aria-selected": value === "none",
142
+ tabIndex: tabbableIndex === 0 ? 0 : -1,
143
+ onClick: () => {
144
+ onChange("none");
145
+ setOpen(false);
146
+ },
147
+ className: cn(
148
+ "flex flex-col items-center justify-center rounded-[var(--radius-lg)] h-8 w-8 hover:bg-surface-hover transition border border-transparent shrink-0",
149
+ value === "none" && "bg-surface-hover border-brand-text text-brand-text"
150
+ ),
151
+ title: "None",
152
+ children: /* @__PURE__ */ jsx(Ban, { className: "h-4 w-4 text-fg-subtle", "aria-hidden": true })
153
+ }
154
+ ),
155
+ filteredIcons.map((item, i) => {
156
+ const IconComp = item.component;
157
+ const isSelected = value === item.name || value.toLowerCase() === item.name.toLowerCase();
158
+ return /* @__PURE__ */ jsx(
159
+ "button",
160
+ {
161
+ type: "button",
162
+ role: "option",
163
+ "aria-label": `${item.name}, ${item.library}`,
164
+ "aria-selected": isSelected,
165
+ tabIndex: tabbableIndex === i + offset ? 0 : -1,
166
+ onClick: () => {
167
+ onChange(item.name);
168
+ setOpen(false);
169
+ },
170
+ className: cn(
171
+ "flex flex-col items-center justify-center rounded-[var(--radius-lg)] h-8 w-8 hover:bg-surface-hover transition border border-transparent text-fg-muted hover:text-fg shrink-0",
172
+ isSelected && "bg-surface-hover border-brand-text text-brand-text hover:text-brand-text font-semibold"
173
+ ),
174
+ title: `${item.name} (${item.library})`,
175
+ children: /* @__PURE__ */ jsx(IconComp, { className: "h-4 w-4", "aria-hidden": true })
176
+ },
177
+ item.id
178
+ );
179
+ }),
180
+ !registry ? /* @__PURE__ */ jsx("div", { className: "col-span-8 py-4 text-center text-xs text-fg-subtle", children: "Loading icons\u2026" }) : filteredIcons.length === 0 && /* @__PURE__ */ jsxs("div", { className: "col-span-8 py-4 text-center text-xs text-fg-subtle", children: [
181
+ "No matching icons in ",
182
+ activeLibrary,
183
+ " library."
184
+ ] })
185
+ ]
186
+ }
187
+ )
188
+ ] }) })
189
+ ] });
190
+ }
191
+ export {
192
+ IconPicker
193
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./IconPicker.js";
2
+ export * from "./IconPicker.doc.js";
@@ -0,0 +1,98 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as LucideIcons from "lucide-react";
3
+ import * as PhosphorIcons from "@phosphor-icons/react";
4
+ import * as RadixIcons from "@radix-ui/react-icons";
5
+ import * as MDIIcons from "@mdi/js";
6
+ const ICON_REGISTRY = [];
7
+ const ALL_ICONS = {};
8
+ Object.entries(LucideIcons).forEach(([name, comp]) => {
9
+ if ((typeof comp === "function" || typeof comp === "object" && comp !== null && "$$typeof" in comp) && !name.startsWith("Lucide") && name !== "createLucideIcon" && name !== "LucideIcon" && name !== "default") {
10
+ const camelKey = name.charAt(0).toLowerCase() + name.slice(1);
11
+ const component = comp;
12
+ ALL_ICONS[camelKey] = component;
13
+ const lowerKey = name.toLowerCase();
14
+ if (!ALL_ICONS[lowerKey]) {
15
+ ALL_ICONS[lowerKey] = component;
16
+ }
17
+ if (!ALL_ICONS[name]) {
18
+ ALL_ICONS[name] = component;
19
+ }
20
+ ICON_REGISTRY.push({
21
+ id: `lucide-${camelKey}`,
22
+ name: camelKey,
23
+ library: "lucide",
24
+ component
25
+ });
26
+ }
27
+ });
28
+ Object.entries(PhosphorIcons).forEach(([name, comp]) => {
29
+ if ((typeof comp === "function" || typeof comp === "object" && comp !== null && "$$typeof" in comp) && !name.endsWith("Icon") && !name.startsWith("Icon") && name !== "SSR" && name !== "default") {
30
+ const camelKey = name.charAt(0).toLowerCase() + name.slice(1);
31
+ const component = comp;
32
+ if (!ALL_ICONS[camelKey]) {
33
+ ALL_ICONS[camelKey] = component;
34
+ }
35
+ const lowerKey = name.toLowerCase();
36
+ if (!ALL_ICONS[lowerKey]) {
37
+ ALL_ICONS[lowerKey] = component;
38
+ }
39
+ if (!ALL_ICONS[name]) {
40
+ ALL_ICONS[name] = component;
41
+ }
42
+ ICON_REGISTRY.push({
43
+ id: `phosphor-${camelKey}`,
44
+ name: camelKey,
45
+ library: "phosphor",
46
+ component
47
+ });
48
+ }
49
+ });
50
+ Object.entries(RadixIcons).forEach(([name, comp]) => {
51
+ if ((typeof comp === "function" || typeof comp === "object" && comp !== null && "$$typeof" in comp) && name !== "default") {
52
+ const rawName = name.endsWith("Icon") ? name.slice(0, -4) : name;
53
+ const camelKey = rawName.charAt(0).toLowerCase() + rawName.slice(1);
54
+ const component = comp;
55
+ if (!ALL_ICONS[camelKey]) {
56
+ ALL_ICONS[camelKey] = component;
57
+ }
58
+ const lowerKey = rawName.toLowerCase();
59
+ if (!ALL_ICONS[lowerKey]) {
60
+ ALL_ICONS[lowerKey] = component;
61
+ }
62
+ if (!ALL_ICONS[name]) {
63
+ ALL_ICONS[name] = component;
64
+ }
65
+ ICON_REGISTRY.push({
66
+ id: `radix-${camelKey}`,
67
+ name: camelKey,
68
+ library: "radix",
69
+ component
70
+ });
71
+ }
72
+ });
73
+ Object.entries(MDIIcons).forEach(([key, path]) => {
74
+ if (typeof path !== "string" || !key.startsWith("mdi")) return;
75
+ const rawName = key.slice(3);
76
+ const camelKey = rawName.charAt(0).toLowerCase() + rawName.slice(1);
77
+ const lowerKey = camelKey.toLowerCase();
78
+ const MdiWrapper = ({ strokeWidth: _sw, absoluteStrokeWidth: _asw, size: _sz, ...rest }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...rest, children: /* @__PURE__ */ jsx("path", { d: path, fill: "currentColor" }) });
79
+ if (!ALL_ICONS[camelKey]) {
80
+ ALL_ICONS[camelKey] = MdiWrapper;
81
+ }
82
+ if (!ALL_ICONS[lowerKey]) {
83
+ ALL_ICONS[lowerKey] = MdiWrapper;
84
+ }
85
+ if (!ALL_ICONS[key]) {
86
+ ALL_ICONS[key] = MdiWrapper;
87
+ }
88
+ ICON_REGISTRY.push({
89
+ id: `material-${camelKey}`,
90
+ name: camelKey,
91
+ library: "material",
92
+ component: MdiWrapper
93
+ });
94
+ });
95
+ export {
96
+ ALL_ICONS,
97
+ ICON_REGISTRY
98
+ };
@@ -0,0 +1,40 @@
1
+ const docs = {
2
+ name: "Image",
3
+ description: "Shows an image at a set ratio and fit, with a placeholder when the source is missing or fails to load. Overlays such as a scrim or gradient can sit on top.",
4
+ features: [
5
+ "Supports radius escape hatch (radius='none|small|medium|large|full|inherit')",
6
+ "Defaults to panel radius --radius-panel per AGENTS.md rules",
7
+ "Zero Layout Shift (CLS) via ratio prop (e.g. ratio='16/9')",
8
+ "Graceful fallback box when src is missing or fails to load",
9
+ 'Overlay layers via bgOverlays \u2014 the same layer system layouts use for backgrounds (presets, solid, gradients, fx), composited on top of the image; fx needs `npm i @shavin/fx` (free to use under its own licence) and `registerFxBackdrops()`, e.g. bgOverlays="fx:light-streaks/50, scrim"'
10
+ ],
11
+ accessibility: [
12
+ "Enforces alt text prop for screen reader image descriptions",
13
+ "Applies role='img' and aria-label to broken placeholder states"
14
+ ],
15
+ usage: {
16
+ bestPractices: [
17
+ {
18
+ guidance: true,
19
+ description: "Always pass ratio='16/9' or explicit dimensions to reserve space and prevent layout shifts."
20
+ },
21
+ {
22
+ guidance: false,
23
+ description: "Do not use raw un-styled <img> tags \u2014 reach for Image primitive to handle load failures gracefully."
24
+ }
25
+ ]
26
+ },
27
+ examples: [
28
+ {
29
+ title: "Hero Feature Image",
30
+ code: '<Image src="https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=800" alt="Abstract shapes" ratio="16/9" fit="cover" />'
31
+ },
32
+ {
33
+ title: "Image with a scrim overlay",
34
+ code: '<Image src="https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=800" alt="Abstract shapes" ratio="16/9" fit="cover" bgOverlays="scrim" />'
35
+ }
36
+ ]
37
+ };
38
+ export {
39
+ docs
40
+ };
@@ -0,0 +1,76 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../../lib/cn.js";
6
+ import { renderOverlays } from "../../lib/media-overlays.js";
7
+ const imageVariants = cva("block overflow-hidden bg-surface-hover", {
8
+ variants: {
9
+ radius: {
10
+ none: "rounded-none",
11
+ small: "rounded-[0.25rem]",
12
+ medium: "rounded-[0.5rem]",
13
+ large: "rounded-[0.75rem]",
14
+ full: "rounded-full",
15
+ inherit: "rounded-[var(--radius-panel)]",
16
+ concentric: "rounded-panel-inner"
17
+ }
18
+ },
19
+ defaultVariants: { radius: "inherit" }
20
+ });
21
+ const FIT_CLASS = { cover: "object-cover", contain: "object-contain", fill: "object-fill", none: "object-none" };
22
+ function Image({ src, alt = "", ratio, fit = "cover", radius, placeholder, bgOverlays, className, style, ...props }) {
23
+ const [failed, setFailed] = useState(false);
24
+ const showPlaceholder = !src || failed;
25
+ const boxStyle = { ...ratio ? { aspectRatio: ratio } : null, ...style };
26
+ const overlayNodes = renderOverlays(bgOverlays);
27
+ if (showPlaceholder) {
28
+ return /* @__PURE__ */ jsxs(
29
+ "div",
30
+ {
31
+ role: "img",
32
+ "aria-label": alt || "Image placeholder",
33
+ className: cn(imageVariants({ radius }), "flex w-full items-center justify-center relative bg-surface-hover text-fg-subtle", className),
34
+ style: boxStyle,
35
+ children: [
36
+ placeholder ?? /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", className: "h-1/4 max-h-10 w-1/4 max-w-10 text-fg-subtle", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", children: [
37
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
38
+ /* @__PURE__ */ jsx("circle", { cx: "9", cy: "9", r: "2" }),
39
+ /* @__PURE__ */ jsx("path", { d: "m21 15-4.5-4.5L5 21" })
40
+ ] }),
41
+ overlayNodes
42
+ ]
43
+ }
44
+ );
45
+ }
46
+ if (overlayNodes.length) {
47
+ return /* @__PURE__ */ jsxs("div", { className: cn(imageVariants({ radius }), "relative overflow-hidden", className), style: boxStyle, children: [
48
+ /* @__PURE__ */ jsx(
49
+ "img",
50
+ {
51
+ src,
52
+ alt,
53
+ onError: () => setFailed(true),
54
+ className: cn("absolute inset-0 h-full w-full", FIT_CLASS[fit]),
55
+ ...props
56
+ }
57
+ ),
58
+ overlayNodes
59
+ ] });
60
+ }
61
+ return /* @__PURE__ */ jsx(
62
+ "img",
63
+ {
64
+ src,
65
+ alt,
66
+ onError: () => setFailed(true),
67
+ className: cn(imageVariants({ radius }), "h-full w-full", FIT_CLASS[fit], className),
68
+ style: boxStyle,
69
+ ...props
70
+ }
71
+ );
72
+ }
73
+ export {
74
+ Image,
75
+ imageVariants
76
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./Image.js";
2
+ export * from "./Image.doc.js";
@@ -0,0 +1,34 @@
1
+ const docs = {
2
+ name: "Inset",
3
+ group: "layout",
4
+ description: "Card layout helper component that bleeds content to container edges using negative margin scale math.",
5
+ features: [
6
+ "Sides: all (-m-4/-m-5), top (-mx-4 -mt-4), bottom (-mx-4 -mb-4), x (-mx-4)",
7
+ "Padding scale: sm (p-4) and md (p-5) matching Card padding tokens",
8
+ "Clip prop automatically rounds top/bottom corners to --radius-panel"
9
+ ],
10
+ accessibility: [
11
+ "Structural container wrapper maintaining DOM layout hierarchy"
12
+ ],
13
+ usage: {
14
+ bestPractices: [
15
+ {
16
+ guidance: true,
17
+ description: "Use Inset inside Card for edge-to-edge header images, full-bleed code blocks, or maps."
18
+ },
19
+ {
20
+ guidance: false,
21
+ description: "Do not manually write hardcoded negative margins like -mx-5 -mt-5 \u2014 use Inset p='md' side='top' instead."
22
+ }
23
+ ]
24
+ },
25
+ examples: [
26
+ {
27
+ title: "Card Top Image Bleed",
28
+ code: '<Card p="sm"><Inset side="top" p="sm" clip><Image src="cover.jpg" ratio="16/9" /></Inset><div>Card Body Content</div></Card>'
29
+ }
30
+ ]
31
+ };
32
+ export {
33
+ docs
34
+ };