@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,502 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useState, useMemo, useRef, useEffect, useId } from "react";
4
+ import { ChevronLeft, ChevronRight } from "lucide-react";
5
+ import { cn } from "../../lib/cn.js";
6
+ import { useClientLocale } from "../../lib/useClientLocale.js";
7
+ import { concentricContainerStyle, withConcentricStyle } from "../../lib/concentric.js";
8
+ import { Button } from "../Button/Button.js";
9
+ import { Text } from "../Text/index.js";
10
+ import { SegmentedControl, SegmentedControlItem } from "../SegmentedControl/SegmentedControl.js";
11
+ const toneStyles = {
12
+ default: "bg-surface-hover text-fg border-hairline",
13
+ info: "bg-surface-hover text-link border-hairline",
14
+ success: "bg-surface-hover text-success border-hairline",
15
+ warning: "bg-surface-hover text-warning border-hairline",
16
+ danger: "bg-surface-hover text-danger border-hairline"
17
+ };
18
+ function CalendarEventChip({
19
+ event,
20
+ onClick
21
+ }) {
22
+ const style = toneStyles[event.tone ?? "default"];
23
+ return /* @__PURE__ */ jsxs(
24
+ "button",
25
+ {
26
+ type: "button",
27
+ onClick: (e) => {
28
+ e.stopPropagation();
29
+ onClick?.(event);
30
+ },
31
+ className: cn(
32
+ "group flex w-full items-center gap-1.5 rounded-[var(--radius-lg)] border px-1.5 py-0.5 text-left text-xs font-medium transition hover:brightness-95 cursor-pointer",
33
+ style
34
+ ),
35
+ children: [
36
+ /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-70" }),
37
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: event.title }),
38
+ event.time && /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 text-[10px] opacity-70", children: event.time })
39
+ ]
40
+ }
41
+ );
42
+ }
43
+ const WEEKDAYS = [
44
+ { short: "Sun", long: "Sunday" },
45
+ { short: "Mon", long: "Monday" },
46
+ { short: "Tue", long: "Tuesday" },
47
+ { short: "Wed", long: "Wednesday" },
48
+ { short: "Thu", long: "Thursday" },
49
+ { short: "Fri", long: "Friday" },
50
+ { short: "Sat", long: "Saturday" }
51
+ ];
52
+ function formatDateKey(d) {
53
+ const year = d.getFullYear();
54
+ const month = String(d.getMonth() + 1).padStart(2, "0");
55
+ const day = String(d.getDate()).padStart(2, "0");
56
+ return `${year}-${month}-${day}`;
57
+ }
58
+ function addDays(d, days) {
59
+ const result = new Date(d);
60
+ result.setDate(result.getDate() + days);
61
+ return result;
62
+ }
63
+ function getHeaderTitle(anchor, view, locale) {
64
+ if (view === "full") {
65
+ return anchor.toLocaleString(locale, { month: "long", year: "numeric" });
66
+ }
67
+ if (view === "1day") {
68
+ return anchor.toLocaleDateString(locale, { month: "short", day: "numeric", year: "numeric" });
69
+ }
70
+ const end = addDays(anchor, view === "2days" ? 1 : 2);
71
+ const startStr = anchor.toLocaleDateString(locale, { month: "short", day: "numeric" });
72
+ const endStr = end.toLocaleDateString(locale, { month: "short", day: "numeric", year: "numeric" });
73
+ return `${startStr} \u2013 ${endStr}`;
74
+ }
75
+ function parseTimeMinutes(timeStr) {
76
+ if (!timeStr) return null;
77
+ const parts = timeStr.split("-");
78
+ const startRaw = parts[0].trim();
79
+ const endRaw = parts[1]?.trim();
80
+ const parseSingle = (raw) => {
81
+ const isPM = /pm/i.test(raw);
82
+ const isAM = /am/i.test(raw);
83
+ const clean = raw.replace(/[^\d:]/g, "");
84
+ const sub = clean.split(":");
85
+ if (!sub[0]) return null;
86
+ let h = parseInt(sub[0], 10);
87
+ const m = sub[1] ? parseInt(sub[1], 10) : 0;
88
+ if (isPM && h < 12) h += 12;
89
+ if (isAM && h === 12) h = 0;
90
+ return h * 60 + m;
91
+ };
92
+ const startMinutes = parseSingle(startRaw);
93
+ if (startMinutes === null) return null;
94
+ let durationMinutes = 60;
95
+ if (endRaw) {
96
+ const endMinutes = parseSingle(endRaw);
97
+ if (endMinutes !== null && endMinutes > startMinutes) {
98
+ durationMinutes = endMinutes - startMinutes;
99
+ }
100
+ }
101
+ return { startMinutes, durationMinutes };
102
+ }
103
+ function CalendarView({
104
+ date,
105
+ defaultDate,
106
+ onDateChange,
107
+ view,
108
+ defaultView = "full",
109
+ onViewChange,
110
+ allowedViews = ["full", "1day", "2days", "3days"],
111
+ allowViewChange = true,
112
+ startHour = 0,
113
+ endHour = 23,
114
+ events = [],
115
+ onSelectDate,
116
+ onEventClick,
117
+ fitContainer = true,
118
+ locale,
119
+ className,
120
+ style
121
+ }) {
122
+ const dateLocale = useClientLocale(locale);
123
+ const [currentAnchorState, setCurrentAnchorState] = useState(defaultDate ?? /* @__PURE__ */ new Date());
124
+ const [currentViewState, setCurrentViewState] = useState(defaultView);
125
+ const anchor = date ?? currentAnchorState;
126
+ const currentView = view ?? currentViewState;
127
+ const hoursList = useMemo(() => {
128
+ const s = Math.max(0, Math.min(23, startHour));
129
+ const e = Math.max(s, Math.min(23, endHour));
130
+ return Array.from({ length: e - s + 1 }, (_, i) => i + s);
131
+ }, [startHour, endHour]);
132
+ const setAnchor = (nextDate) => {
133
+ if (date === void 0) setCurrentAnchorState(nextDate);
134
+ onDateChange?.(nextDate);
135
+ };
136
+ const setViewMode = (nextView) => {
137
+ if (view === void 0) setCurrentViewState(nextView);
138
+ onViewChange?.(nextView);
139
+ };
140
+ const year = anchor.getFullYear();
141
+ const month = anchor.getMonth();
142
+ const headerTitle = useMemo(() => getHeaderTitle(anchor, currentView, dateLocale), [anchor, currentView, dateLocale]);
143
+ const daysGrid = useMemo(() => {
144
+ const firstDayOfMonth = new Date(year, month, 1);
145
+ const lastDayOfMonth = new Date(year, month + 1, 0);
146
+ const startingDayOfWeek = firstDayOfMonth.getDay();
147
+ const totalDays = lastDayOfMonth.getDate();
148
+ const days = [];
149
+ const prevMonthLastDay = new Date(year, month, 0).getDate();
150
+ for (let i = startingDayOfWeek - 1; i >= 0; i--) {
151
+ const d = new Date(year, month - 1, prevMonthLastDay - i);
152
+ days.push({ date: d, isCurrentMonth: false, dateKey: formatDateKey(d) });
153
+ }
154
+ for (let day = 1; day <= totalDays; day++) {
155
+ const d = new Date(year, month, day);
156
+ days.push({ date: d, isCurrentMonth: true, dateKey: formatDateKey(d) });
157
+ }
158
+ const remaining = 42 - days.length;
159
+ for (let i = 1; i <= remaining; i++) {
160
+ const d = new Date(year, month + 1, i);
161
+ days.push({ date: d, isCurrentMonth: false, dateKey: formatDateKey(d) });
162
+ }
163
+ return days;
164
+ }, [year, month]);
165
+ const scheduleDays = useMemo(() => {
166
+ if (currentView === "1day") return [anchor];
167
+ if (currentView === "2days") return [anchor, addDays(anchor, 1)];
168
+ if (currentView === "3days") return [anchor, addDays(anchor, 1), addDays(anchor, 2)];
169
+ return [];
170
+ }, [anchor, currentView]);
171
+ const eventsByDate = useMemo(() => {
172
+ const map = {};
173
+ for (const evt of events) {
174
+ if (!map[evt.date]) map[evt.date] = [];
175
+ map[evt.date].push(evt);
176
+ }
177
+ return map;
178
+ }, [events]);
179
+ const todayKey = useMemo(() => formatDateKey(/* @__PURE__ */ new Date()), []);
180
+ const anchorKey = formatDateKey(anchor);
181
+ const weeks = useMemo(
182
+ () => Array.from({ length: 6 }, (_, w) => daysGrid.slice(w * 7, w * 7 + 7)),
183
+ [daysGrid]
184
+ );
185
+ const stepDays = currentView === "1day" ? 1 : currentView === "2days" ? 2 : 3;
186
+ const titleId = useId();
187
+ const gridRef = useRef(null);
188
+ const [focusKey, setFocusKey] = useState(null);
189
+ const pendingFocus = useRef(false);
190
+ const inMonth = (key) => !!key && daysGrid.some((c) => c.dateKey === key && c.isCurrentMonth);
191
+ const tabbableKey = inMonth(focusKey) ? focusKey : inMonth(anchorKey) ? anchorKey : formatDateKey(new Date(year, month, 1));
192
+ useEffect(() => {
193
+ if (!pendingFocus.current || !focusKey) return;
194
+ pendingFocus.current = false;
195
+ gridRef.current?.querySelector(`[data-date="${focusKey}"]`)?.focus();
196
+ }, [focusKey, daysGrid]);
197
+ const moveFocus = (d) => {
198
+ if (d.getFullYear() !== year || d.getMonth() !== month) setAnchor(d);
199
+ pendingFocus.current = true;
200
+ setFocusKey(formatDateKey(d));
201
+ };
202
+ const onGridKeyDown = (e) => {
203
+ const target = e.target;
204
+ const key = target.getAttribute("data-date");
205
+ if (!key) return;
206
+ const [y, m, dd] = key.split("-").map(Number);
207
+ const from = new Date(y, m - 1, dd);
208
+ let next = null;
209
+ switch (e.key) {
210
+ case "ArrowLeft":
211
+ next = addDays(from, -1);
212
+ break;
213
+ case "ArrowRight":
214
+ next = addDays(from, 1);
215
+ break;
216
+ case "ArrowUp":
217
+ next = addDays(from, -7);
218
+ break;
219
+ case "ArrowDown":
220
+ next = addDays(from, 7);
221
+ break;
222
+ case "Home":
223
+ next = addDays(from, -from.getDay());
224
+ break;
225
+ case "End":
226
+ next = addDays(from, 6 - from.getDay());
227
+ break;
228
+ case "PageUp":
229
+ case "PageDown": {
230
+ const dir = e.key === "PageUp" ? -1 : 1;
231
+ const t = e.shiftKey ? new Date(y + dir, m - 1, 1) : new Date(y, m - 1 + dir, 1);
232
+ const lastDay = new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate();
233
+ next = new Date(t.getFullYear(), t.getMonth(), Math.min(dd, lastDay));
234
+ break;
235
+ }
236
+ }
237
+ if (!next) return;
238
+ e.preventDefault();
239
+ moveFocus(next);
240
+ };
241
+ const handlePrev = () => {
242
+ if (currentView === "full") {
243
+ setAnchor(new Date(year, month - 1, 1));
244
+ } else {
245
+ const shift = currentView === "1day" ? 1 : currentView === "2days" ? 2 : 3;
246
+ setAnchor(addDays(anchor, -shift));
247
+ }
248
+ };
249
+ const handleNext = () => {
250
+ if (currentView === "full") {
251
+ setAnchor(new Date(year, month + 1, 1));
252
+ } else {
253
+ const shift = currentView === "1day" ? 1 : currentView === "2days" ? 2 : 3;
254
+ setAnchor(addDays(anchor, shift));
255
+ }
256
+ };
257
+ const handleToday = () => {
258
+ const now = /* @__PURE__ */ new Date();
259
+ setAnchor(now);
260
+ onSelectDate?.(now);
261
+ };
262
+ const canSwitchView = allowViewChange && allowedViews.length > 1;
263
+ return /* @__PURE__ */ jsxs(
264
+ "div",
265
+ {
266
+ className: cn(
267
+ "w-full rounded-[var(--radius-panel)] border border-hairline bg-surface p-4 shadow-card",
268
+ fitContainer ? "flex flex-col h-full min-h-[550px]" : "",
269
+ className
270
+ ),
271
+ style: withConcentricStyle(style, concentricContainerStyle("4")),
272
+ children: [
273
+ /* @__PURE__ */ jsxs("div", { className: "mb-4 flex flex-col sm:flex-row sm:items-center justify-between gap-3 shrink-0", children: [
274
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Text, { id: titleId, size: "lg", weight: "semibold", className: "text-fg", "aria-live": "polite", children: headerTitle }) }),
275
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
276
+ canSwitchView && /* @__PURE__ */ jsxs(
277
+ SegmentedControl,
278
+ {
279
+ size: "sm",
280
+ value: currentView,
281
+ onValueChange: (v) => v && setViewMode(v),
282
+ children: [
283
+ allowedViews.includes("full") && /* @__PURE__ */ jsx(SegmentedControlItem, { value: "full", children: "Full" }),
284
+ allowedViews.includes("1day") && /* @__PURE__ */ jsx(SegmentedControlItem, { value: "1day", children: "1 Day" }),
285
+ allowedViews.includes("2days") && /* @__PURE__ */ jsx(SegmentedControlItem, { value: "2days", children: "2 Days" }),
286
+ allowedViews.includes("3days") && /* @__PURE__ */ jsx(SegmentedControlItem, { value: "3days", children: "3 Days" })
287
+ ]
288
+ }
289
+ ),
290
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 ml-auto sm:ml-0", children: [
291
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: handleToday, children: "Today" }),
292
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center rounded-[var(--radius-lg)] border border-hairline bg-surface-hover/50 p-0.5", children: [
293
+ /* @__PURE__ */ jsx(
294
+ "button",
295
+ {
296
+ type: "button",
297
+ onClick: handlePrev,
298
+ className: "flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-surface hover:text-fg transition cursor-pointer",
299
+ "aria-label": currentView === "full" ? "Previous month" : `Previous ${stepDays === 1 ? "day" : `${stepDays} days`}`,
300
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4", "aria-hidden": true })
301
+ }
302
+ ),
303
+ /* @__PURE__ */ jsx(
304
+ "button",
305
+ {
306
+ type: "button",
307
+ onClick: handleNext,
308
+ className: "flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-surface hover:text-fg transition cursor-pointer",
309
+ "aria-label": currentView === "full" ? "Next month" : `Next ${stepDays === 1 ? "day" : `${stepDays} days`}`,
310
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4", "aria-hidden": true })
311
+ }
312
+ )
313
+ ] })
314
+ ] })
315
+ ] })
316
+ ] }),
317
+ currentView === "full" && // APG date grid: rows of gridcells, each holding a real button. One tab stop
318
+ // (roving tabindex); arrows move by day/week, Home/End to week start/end,
319
+ // PageUp/PageDown by month (Shift: year), Enter/Space selects.
320
+ /* @__PURE__ */ jsxs(
321
+ "div",
322
+ {
323
+ ref: gridRef,
324
+ role: "grid",
325
+ "aria-labelledby": titleId,
326
+ className: "flex-1 flex flex-col min-h-0",
327
+ onKeyDown: onGridKeyDown,
328
+ children: [
329
+ /* @__PURE__ */ jsx("div", { role: "row", className: "mb-2 grid grid-cols-7 gap-px text-center shrink-0", children: WEEKDAYS.map((day) => /* @__PURE__ */ jsx(
330
+ "div",
331
+ {
332
+ role: "columnheader",
333
+ "aria-label": day.long,
334
+ className: "py-1 text-xs font-medium text-fg-muted uppercase tracking-wider",
335
+ children: day.short
336
+ },
337
+ day.short
338
+ )) }),
339
+ /* @__PURE__ */ jsx("div", { role: "rowgroup", className: "grid grid-rows-6 gap-1 border-t border-hairline/60 pt-2 flex-1", children: weeks.map((week, w) => /* @__PURE__ */ jsx("div", { role: "row", className: "grid grid-cols-7 gap-1", children: week.map(({ date: d, isCurrentMonth, dateKey }) => {
340
+ const isToday = dateKey === todayKey;
341
+ const isSelected = dateKey === anchorKey;
342
+ const dayEvents = eventsByDate[dateKey] ?? [];
343
+ const fullDate = d.toLocaleDateString(dateLocale, { weekday: "long", month: "long", day: "numeric", year: "numeric" });
344
+ return /* @__PURE__ */ jsxs(
345
+ "div",
346
+ {
347
+ role: "gridcell",
348
+ "aria-selected": isSelected,
349
+ className: cn(
350
+ "group relative min-h-[4.5rem] sm:min-h-[5.5rem] rounded-[var(--radius-lg)] border border-hairline/40 p-1.5 transition hover:border-hairline hover:bg-surface-hover/50 flex flex-col justify-between overflow-hidden",
351
+ !isCurrentMonth && "bg-surface-hover/20",
352
+ isSelected && "ring-2 ring-brand-text border-transparent"
353
+ ),
354
+ children: [
355
+ /* @__PURE__ */ jsx(
356
+ "button",
357
+ {
358
+ type: "button",
359
+ "data-date": dateKey,
360
+ tabIndex: dateKey === tabbableKey ? 0 : -1,
361
+ "aria-current": isToday ? "date" : void 0,
362
+ "aria-label": dayEvents.length > 0 ? `${fullDate}, ${dayEvents.length} event${dayEvents.length === 1 ? "" : "s"}` : fullDate,
363
+ onClick: () => {
364
+ setFocusKey(dateKey);
365
+ setAnchor(d);
366
+ onSelectDate?.(d);
367
+ },
368
+ onFocus: () => setFocusKey(dateKey),
369
+ className: "absolute inset-0 rounded-[var(--radius-lg)] cursor-pointer focus-visible:[outline-offset:calc(var(--focus-width)*-1)]"
370
+ }
371
+ ),
372
+ /* @__PURE__ */ jsxs("div", { className: "pointer-events-none relative flex items-center justify-between", children: [
373
+ /* @__PURE__ */ jsx(
374
+ "span",
375
+ {
376
+ "aria-hidden": "true",
377
+ className: cn(
378
+ "flex h-5 w-5 sm:h-6 sm:w-6 items-center justify-center rounded-full text-xs font-medium",
379
+ isCurrentMonth ? "text-fg" : "text-fg-subtle",
380
+ isToday && "bg-brand-solid text-brand-fg font-bold"
381
+ ),
382
+ children: d.getDate()
383
+ }
384
+ ),
385
+ dayEvents.length > 0 && /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", className: "hidden sm:inline-block text-xs font-mono text-fg-muted", children: [
386
+ dayEvents.length,
387
+ " ",
388
+ dayEvents.length === 1 ? "evt" : "evts"
389
+ ] })
390
+ ] }),
391
+ /* @__PURE__ */ jsxs("div", { className: "pointer-events-none relative mt-1 flex flex-col gap-1 [&>button]:pointer-events-auto", children: [
392
+ dayEvents.slice(0, 3).map((evt) => /* @__PURE__ */ jsx(CalendarEventChip, { event: evt, onClick: onEventClick }, evt.id)),
393
+ dayEvents.length > 3 && /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", className: "pointer-events-none px-1 text-xs font-medium text-fg-muted", children: [
394
+ "+",
395
+ dayEvents.length - 3,
396
+ " more"
397
+ ] })
398
+ ] })
399
+ ]
400
+ },
401
+ dateKey
402
+ );
403
+ }) }, w)) })
404
+ ]
405
+ }
406
+ ),
407
+ currentView !== "full" && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col border border-hairline/60 rounded-[var(--radius-lg)] overflow-hidden min-h-0 bg-surface", children: [
408
+ /* @__PURE__ */ jsx("div", { className: "overflow-x-auto border-b border-hairline bg-surface-hover/40", children: /* @__PURE__ */ jsxs(
409
+ "div",
410
+ {
411
+ className: "grid divide-x divide-hairline/60",
412
+ style: {
413
+ gridTemplateColumns: `54px repeat(${scheduleDays.length}, minmax(120px, 1fr))`
414
+ },
415
+ children: [
416
+ /* @__PURE__ */ jsx("div", { className: "p-2 text-center text-[10px] font-mono uppercase text-fg-muted flex items-center justify-center", children: "Time" }),
417
+ scheduleDays.map((d) => {
418
+ const dateKey = formatDateKey(d);
419
+ const isToday = dateKey === todayKey;
420
+ return /* @__PURE__ */ jsxs(
421
+ "button",
422
+ {
423
+ type: "button",
424
+ "aria-current": isToday ? "date" : void 0,
425
+ "aria-label": d.toLocaleDateString(dateLocale, { weekday: "long", month: "long", day: "numeric", year: "numeric" }),
426
+ onClick: () => {
427
+ setAnchor(d);
428
+ onSelectDate?.(d);
429
+ },
430
+ className: "p-2 text-center cursor-pointer hover:bg-surface-hover/60 transition",
431
+ children: [
432
+ /* @__PURE__ */ jsx("span", { className: "block text-[10px] font-medium uppercase text-fg-muted", children: d.toLocaleDateString(dateLocale, { weekday: "short" }) }),
433
+ /* @__PURE__ */ jsx(
434
+ "span",
435
+ {
436
+ className: cn(
437
+ "inline-flex items-center justify-center h-6 w-6 rounded-full text-xs font-semibold mt-0.5",
438
+ isToday && "bg-brand-solid text-brand-fg font-bold"
439
+ ),
440
+ children: d.getDate()
441
+ }
442
+ )
443
+ ]
444
+ },
445
+ dateKey
446
+ );
447
+ })
448
+ ]
449
+ }
450
+ ) }),
451
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto relative", children: /* @__PURE__ */ jsxs(
452
+ "div",
453
+ {
454
+ className: "grid divide-x divide-hairline/60 min-h-full",
455
+ style: {
456
+ gridTemplateColumns: `54px repeat(${scheduleDays.length}, minmax(120px, 1fr))`
457
+ },
458
+ children: [
459
+ /* @__PURE__ */ jsx("div", { className: "divide-y divide-hairline/30 bg-surface-hover/20", children: hoursList.map((h) => /* @__PURE__ */ jsx("div", { className: "h-16 pr-2 pt-1 text-right text-[10px] font-mono text-fg-muted", children: h === 0 ? "12 AM" : h < 12 ? `${h} AM` : h === 12 ? "12 PM" : `${h - 12} PM` }, h)) }),
460
+ scheduleDays.map((d) => {
461
+ const dateKey = formatDateKey(d);
462
+ const dayEvents = eventsByDate[dateKey] ?? [];
463
+ return /* @__PURE__ */ jsxs("div", { className: "relative divide-y divide-hairline/30 bg-surface", children: [
464
+ hoursList.map((h) => /* @__PURE__ */ jsx("div", { className: "h-16 hover:bg-surface-hover/20 transition" }, h)),
465
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 pointer-events-none p-1", children: dayEvents.map((evt) => {
466
+ const parsed = parseTimeMinutes(evt.time);
467
+ let topPx = 4;
468
+ let heightPx = 52;
469
+ if (parsed) {
470
+ const minFromStart = parsed.startMinutes - startHour * 60;
471
+ const pxPerMin = 64 / 60;
472
+ topPx = Math.max(0, minFromStart * pxPerMin);
473
+ heightPx = Math.max(28, parsed.durationMinutes * pxPerMin);
474
+ }
475
+ return /* @__PURE__ */ jsx(
476
+ "div",
477
+ {
478
+ style: { top: `${topPx}px`, height: `${heightPx}px` },
479
+ className: "absolute left-1 right-1 pointer-events-auto z-10",
480
+ children: /* @__PURE__ */ jsx(CalendarEventChip, { event: evt, onClick: onEventClick })
481
+ },
482
+ evt.id
483
+ );
484
+ }) })
485
+ ] }, dateKey);
486
+ })
487
+ ]
488
+ }
489
+ ) })
490
+ ] })
491
+ ]
492
+ }
493
+ );
494
+ }
495
+ function Calendar(props) {
496
+ return /* @__PURE__ */ jsx(CalendarView, { ...props });
497
+ }
498
+ export {
499
+ Calendar,
500
+ CalendarEventChip,
501
+ CalendarView
502
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./Calendar.js";
2
+ export * from "./Calendar.doc.js";
@@ -0,0 +1,34 @@
1
+ const docs = {
2
+ name: "Callout",
3
+ description: "High-visibility information container panel built with panel radius (--radius-panel) and semantic colors.",
4
+ features: [
5
+ "Colors: neutral, brand, success, warning, danger",
6
+ "Uses panel radius --radius-panel per AGENTS.md rule section 5",
7
+ "Automatic default icons per semantic color variant (Info, CheckCircle, AlertTriangle, AlertCircle)"
8
+ ],
9
+ accessibility: [
10
+ "role='alert' for color='danger' and role='status' for the other colours by default; a passed role wins (role='note' for a static notice present on first load)",
11
+ "Includes semantic icon alongside text for visual accessibility"
12
+ ],
13
+ usage: {
14
+ bestPractices: [
15
+ {
16
+ guidance: true,
17
+ description: "Use Callout for important tips, warnings, or inline status updates."
18
+ },
19
+ {
20
+ guidance: false,
21
+ description: "Do not use Callout for temporary floating notifications \u2014 reach for Toast instead."
22
+ }
23
+ ]
24
+ },
25
+ examples: [
26
+ {
27
+ title: "Warning Callout",
28
+ code: '<Callout color="warning" title="Action Required">Please verify your email address before continuing.</Callout>'
29
+ }
30
+ ]
31
+ };
32
+ export {
33
+ docs
34
+ };
@@ -0,0 +1,63 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "../../lib/cn.js";
4
+ import { AlertCircle, CheckCircle2, AlertTriangle, Info } from "lucide-react";
5
+ const calloutVariants = cva(
6
+ "flex w-full items-start gap-3 rounded-[var(--radius-panel)] border p-4 text-sm transition-colors",
7
+ {
8
+ variants: {
9
+ color: {
10
+ neutral: "bg-surface-hover/60 text-fg border-hairline",
11
+ brand: "bg-brand/10 text-fg border-brand/30",
12
+ success: "bg-success/10 text-fg border-success/30",
13
+ warning: "bg-warning/10 text-fg border-warning/30",
14
+ danger: "bg-danger/10 text-fg border-danger/30"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ color: "neutral"
19
+ }
20
+ }
21
+ );
22
+ const defaultIcons = {
23
+ neutral: /* @__PURE__ */ jsx(Info, { className: "h-5 w-5 shrink-0 text-fg-muted" }),
24
+ brand: /* @__PURE__ */ jsx(Info, { className: "h-5 w-5 shrink-0 text-brand-contrast" }),
25
+ success: /* @__PURE__ */ jsx(CheckCircle2, { className: "h-5 w-5 shrink-0 text-success" }),
26
+ warning: /* @__PURE__ */ jsx(AlertTriangle, { className: "h-5 w-5 shrink-0 text-warning" }),
27
+ danger: /* @__PURE__ */ jsx(AlertCircle, { className: "h-5 w-5 shrink-0 text-danger" })
28
+ };
29
+ function Callout({
30
+ className,
31
+ color = "neutral",
32
+ title,
33
+ icon,
34
+ titleAs: TitleTag = "p",
35
+ children,
36
+ ...props
37
+ }) {
38
+ const resolvedColor = color ?? "neutral";
39
+ const iconNode = icon ?? defaultIcons[resolvedColor];
40
+ return (
41
+ // Danger is an alert (announced); other colours are a status. A passed `role` wins: static
42
+ // notices present on first load pass role="note", FormErrorSummary passes role="group".
43
+ /* @__PURE__ */ jsxs(
44
+ "div",
45
+ {
46
+ role: resolvedColor === "danger" ? "alert" : "status",
47
+ className: cn(calloutVariants({ color: resolvedColor }), className),
48
+ ...props,
49
+ children: [
50
+ iconNode,
51
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
52
+ title && /* @__PURE__ */ jsx(TitleTag, { className: "font-semibold leading-none mb-1 text-fg", children: title }),
53
+ /* @__PURE__ */ jsx("div", { className: "text-sm leading-relaxed text-fg-muted", children })
54
+ ] })
55
+ ]
56
+ }
57
+ )
58
+ );
59
+ }
60
+ export {
61
+ Callout,
62
+ calloutVariants
63
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./Callout.js";
2
+ export * from "./Callout.doc.js";
@@ -0,0 +1,46 @@
1
+ const docs = {
2
+ name: "Card",
3
+ group: "layout",
4
+ description: "A panel that groups related content, with padding presets, an optional hover state and an optional background image or video.",
5
+ features: [
6
+ "Padding presets: none, xs (8px), sm (16px), md (20px), lg (24px), xl (32px), 2xl (40px), 3xl (48px)",
7
+ "Interactive mode with hover elevation and cursor-pointer",
8
+ "Surface contrast scope via surface prop for media backgrounds. With a photo, video or fx backdrop and no surface it defaults to dark-always plus a dark scrim (dark-30, fx dark-50); meshes and custom gradients need an explicit surface (dark-always or light-always)",
9
+ "Background media: bgVideo, bgImage, bgOverlays (presets, hex, tokens, gradients via comma-separated shorthand), bgSize, bgVideoPaused",
10
+ "Fx backdrops (needs `npm i @shavin/fx`, free to use under its own licence, and `registerFxBackdrops()`): bgOverlays=\"fx:dither-waves, gradient-bottom\"; params only when changed: fx:fluid-silk(speed=1.2); quote text values: fx:type-tiles(text='Plan money')"
11
+ ],
12
+ accessibility: [
13
+ "Renders as <div> by default; use polymorphic as prop for semantic elements"
14
+ ],
15
+ usage: {
16
+ bestPractices: [
17
+ { guidance: true, description: "Use Card for grouped content blocks with consistent surface treatment and elevation." },
18
+ { guidance: true, description: "Use bgImage with gradient-bottom overlay for media cards with bottom-aligned text." },
19
+ { guidance: false, description: "Do not embed <video> elements as children \u2014 pass bgVideo prop and the card handles media layer rendering." }
20
+ ]
21
+ },
22
+ examples: [
23
+ {
24
+ title: "Basic Card",
25
+ code: '<Card padding="md">Card content</Card>'
26
+ },
27
+ {
28
+ title: "Card with Background Image + Gradient",
29
+ description: "bgImage with gradient-bottom overlay for text legibility at the bottom",
30
+ code: '<Card padding="lg" bgImage="https://..." bgOverlays="gradient-bottom" surface="dark-always" className="h-[280px] flex flex-col justify-end"><Heading size="md">Feature Card</Heading></Card>'
31
+ },
32
+ {
33
+ title: "Multi-Layer Overlay with Video",
34
+ description: "bgVideo with dark-50 base + scrim at 70% opacity",
35
+ code: '<Card padding="lg" bgVideo="https://..." bgOverlays="dark-50, scrim/70" surface="dark-always" className="h-[260px] flex flex-col justify-end"><Heading size="md">Video Card</Heading></Card>'
36
+ },
37
+ {
38
+ title: "Custom Gradient + Token Overlay",
39
+ description: "Custom hex solid + linear gradient + brand token \u2014 no JSON needed",
40
+ code: '<Card padding="lg" bgImage="https://..." bgOverlays="#1a1a2e/30, linear(180deg, #000/0%, #000/100%)/60, (brand)/10" className="h-[260px] flex flex-col justify-end"><Heading size="md">Custom</Heading></Card>'
41
+ }
42
+ ]
43
+ };
44
+ export {
45
+ docs
46
+ };