@misoto22/folio 0.0.0 → 0.17.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 (721) hide show
  1. package/AGENTS.md +88 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +21 -0
  4. package/README.md +208 -2
  5. package/bin/folio-design.mjs +277 -0
  6. package/bin/migrate-legacy.mjs +81 -0
  7. package/dist/agent/Accordion.md +65 -0
  8. package/dist/agent/Actions.md +49 -0
  9. package/dist/agent/Alert.md +65 -0
  10. package/dist/agent/AppShell.md +69 -0
  11. package/dist/agent/ArchitectureFigure.md +72 -0
  12. package/dist/agent/AreaChart.md +94 -0
  13. package/dist/agent/Article.md +65 -0
  14. package/dist/agent/AspectRatio.md +58 -0
  15. package/dist/agent/Avatar.md +53 -0
  16. package/dist/agent/Badge.md +62 -0
  17. package/dist/agent/BarChart.md +93 -0
  18. package/dist/agent/BarList.md +67 -0
  19. package/dist/agent/BigNumber.md +70 -0
  20. package/dist/agent/BoxPlot.md +82 -0
  21. package/dist/agent/Breadcrumb.md +55 -0
  22. package/dist/agent/BulletChart.md +71 -0
  23. package/dist/agent/Button.md +81 -0
  24. package/dist/agent/Calendar.md +77 -0
  25. package/dist/agent/CalendarHeatmap.md +75 -0
  26. package/dist/agent/Card.md +72 -0
  27. package/dist/agent/Checkbox.md +57 -0
  28. package/dist/agent/Code.md +51 -0
  29. package/dist/agent/CodeBlock.md +77 -0
  30. package/dist/agent/Collapsible.md +68 -0
  31. package/dist/agent/Collection.md +169 -0
  32. package/dist/agent/ColorPicker.md +76 -0
  33. package/dist/agent/Combobox.md +77 -0
  34. package/dist/agent/Command.md +122 -0
  35. package/dist/agent/ComposedChart.md +82 -0
  36. package/dist/agent/Contact.md +90 -0
  37. package/dist/agent/Content.md +70 -0
  38. package/dist/agent/ContextMenu.md +93 -0
  39. package/dist/agent/Conversation.md +247 -0
  40. package/dist/agent/DataflowFigure.md +49 -0
  41. package/dist/agent/DatePicker.md +104 -0
  42. package/dist/agent/DescriptionList.md +69 -0
  43. package/dist/agent/Diagram.md +71 -0
  44. package/dist/agent/DiagramCanvas.md +71 -0
  45. package/dist/agent/DiagramExportMenu.md +65 -0
  46. package/dist/agent/DiagramInspector.md +73 -0
  47. package/dist/agent/DiagramLegend.md +56 -0
  48. package/dist/agent/DiagramMinimap.md +69 -0
  49. package/dist/agent/DiagramToolbar.md +70 -0
  50. package/dist/agent/Dialog.md +76 -0
  51. package/dist/agent/DropdownMenu.md +110 -0
  52. package/dist/agent/EmptyState.md +63 -0
  53. package/dist/agent/ErrorState.md +67 -0
  54. package/dist/agent/Evidence.md +165 -0
  55. package/dist/agent/Facet.md +107 -0
  56. package/dist/agent/Field.md +79 -0
  57. package/dist/agent/FigureBand.md +49 -0
  58. package/dist/agent/FloatingIconButton.md +61 -0
  59. package/dist/agent/FunnelChart.md +75 -0
  60. package/dist/agent/Heading.md +65 -0
  61. package/dist/agent/Heatmap.md +78 -0
  62. package/dist/agent/Histogram.md +88 -0
  63. package/dist/agent/Input.md +52 -0
  64. package/dist/agent/Kbd.md +48 -0
  65. package/dist/agent/LifecycleFigure.md +50 -0
  66. package/dist/agent/LineChart.md +85 -0
  67. package/dist/agent/LinkArrow.md +49 -0
  68. package/dist/agent/Markdown.md +69 -0
  69. package/dist/agent/Media.md +261 -0
  70. package/dist/agent/Metric.md +70 -0
  71. package/dist/agent/Metrics.md +114 -0
  72. package/dist/agent/Music.md +86 -0
  73. package/dist/agent/NativeSelect.md +62 -0
  74. package/dist/agent/NavItem.md +56 -0
  75. package/dist/agent/NumberField.md +73 -0
  76. package/dist/agent/PageHeader.md +69 -0
  77. package/dist/agent/Pagination.md +70 -0
  78. package/dist/agent/PieChart.md +80 -0
  79. package/dist/agent/Popover.md +80 -0
  80. package/dist/agent/Portfolio.md +93 -0
  81. package/dist/agent/PortfolioIndex.md +34 -0
  82. package/dist/agent/Progress.md +58 -0
  83. package/dist/agent/RadarChart.md +79 -0
  84. package/dist/agent/RadialChart.md +81 -0
  85. package/dist/agent/RadioGroup.md +66 -0
  86. package/dist/agent/Reading.md +233 -0
  87. package/dist/agent/Recovery.md +72 -0
  88. package/dist/agent/SankeyChart.md +85 -0
  89. package/dist/agent/ScatterChart.md +80 -0
  90. package/dist/agent/ScrollArea.md +62 -0
  91. package/dist/agent/SearchPalette.md +51 -0
  92. package/dist/agent/SearchableMenu.md +69 -0
  93. package/dist/agent/Select.md +102 -0
  94. package/dist/agent/Separator.md +60 -0
  95. package/dist/agent/SequenceFigure.md +51 -0
  96. package/dist/agent/Sheet.md +82 -0
  97. package/dist/agent/Sidebar.md +194 -0
  98. package/dist/agent/SiteNavigation.md +62 -0
  99. package/dist/agent/SiteShell.md +67 -0
  100. package/dist/agent/Skeleton.md +96 -0
  101. package/dist/agent/Slider.md +67 -0
  102. package/dist/agent/Sparkline.md +68 -0
  103. package/dist/agent/Spinner.md +62 -0
  104. package/dist/agent/StatusDot.md +56 -0
  105. package/dist/agent/StatusPill.md +55 -0
  106. package/dist/agent/Steps.md +68 -0
  107. package/dist/agent/Switch.md +50 -0
  108. package/dist/agent/Table.md +111 -0
  109. package/dist/agent/Tabs.md +71 -0
  110. package/dist/agent/Tag.md +67 -0
  111. package/dist/agent/Text.md +66 -0
  112. package/dist/agent/Textarea.md +46 -0
  113. package/dist/agent/Timeline.md +114 -0
  114. package/dist/agent/Timestamp.md +65 -0
  115. package/dist/agent/Toast.md +51 -0
  116. package/dist/agent/ToggleGroup.md +67 -0
  117. package/dist/agent/Toolbar.md +72 -0
  118. package/dist/agent/Tooltip.md +74 -0
  119. package/dist/agent/TreemapChart.md +76 -0
  120. package/dist/agent/WaterfallChart.md +86 -0
  121. package/dist/agent/Workbench.md +142 -0
  122. package/dist/agent/WorkflowFigure.md +51 -0
  123. package/dist/agent/catalog.json +8055 -0
  124. package/dist/agent/index.md +185 -0
  125. package/dist/article.css +407 -0
  126. package/dist/charts/AreaChart/AreaChart.d.ts +198 -0
  127. package/dist/charts/AreaChart/AreaChart.js +479 -0
  128. package/dist/charts/AreaChart/AreaChart.js.map +1 -0
  129. package/dist/charts/BarChart/BarChart.d.ts +190 -0
  130. package/dist/charts/BarChart/BarChart.js +599 -0
  131. package/dist/charts/BarChart/BarChart.js.map +1 -0
  132. package/dist/charts/BarList/BarList.d.ts +65 -0
  133. package/dist/charts/BarList/BarList.js +79 -0
  134. package/dist/charts/BarList/BarList.js.map +1 -0
  135. package/dist/charts/BigNumber/BigNumber.d.ts +72 -0
  136. package/dist/charts/BigNumber/BigNumber.js +51 -0
  137. package/dist/charts/BigNumber/BigNumber.js.map +1 -0
  138. package/dist/charts/BoxPlot/BoxPlot.d.ts +177 -0
  139. package/dist/charts/BoxPlot/BoxPlot.js +497 -0
  140. package/dist/charts/BoxPlot/BoxPlot.js.map +1 -0
  141. package/dist/charts/BulletChart/BulletChart.d.ts +100 -0
  142. package/dist/charts/BulletChart/BulletChart.js +197 -0
  143. package/dist/charts/BulletChart/BulletChart.js.map +1 -0
  144. package/dist/charts/CalendarHeatmap/CalendarHeatmap.d.ts +106 -0
  145. package/dist/charts/CalendarHeatmap/CalendarHeatmap.js +103 -0
  146. package/dist/charts/CalendarHeatmap/CalendarHeatmap.js.map +1 -0
  147. package/dist/charts/ComposedChart/ComposedChart.d.ts +178 -0
  148. package/dist/charts/ComposedChart/ComposedChart.js +667 -0
  149. package/dist/charts/ComposedChart/ComposedChart.js.map +1 -0
  150. package/dist/charts/Facet/Facet.d.ts +240 -0
  151. package/dist/charts/Facet/Facet.js +133 -0
  152. package/dist/charts/Facet/Facet.js.map +1 -0
  153. package/dist/charts/Facet/panels.d.ts +187 -0
  154. package/dist/charts/Facet/panels.js +203 -0
  155. package/dist/charts/Facet/panels.js.map +1 -0
  156. package/dist/charts/FunnelChart/FunnelChart.d.ts +106 -0
  157. package/dist/charts/FunnelChart/FunnelChart.js +137 -0
  158. package/dist/charts/FunnelChart/FunnelChart.js.map +1 -0
  159. package/dist/charts/Heatmap/Heatmap.d.ts +101 -0
  160. package/dist/charts/Heatmap/Heatmap.js +125 -0
  161. package/dist/charts/Heatmap/Heatmap.js.map +1 -0
  162. package/dist/charts/Histogram/Histogram.d.ts +188 -0
  163. package/dist/charts/Histogram/Histogram.js +382 -0
  164. package/dist/charts/Histogram/Histogram.js.map +1 -0
  165. package/dist/charts/LineChart/LineChart.d.ts +174 -0
  166. package/dist/charts/LineChart/LineChart.js +485 -0
  167. package/dist/charts/LineChart/LineChart.js.map +1 -0
  168. package/dist/charts/PieChart/PieChart.d.ts +140 -0
  169. package/dist/charts/PieChart/PieChart.js +317 -0
  170. package/dist/charts/PieChart/PieChart.js.map +1 -0
  171. package/dist/charts/RadarChart/RadarChart.d.ts +135 -0
  172. package/dist/charts/RadarChart/RadarChart.js +303 -0
  173. package/dist/charts/RadarChart/RadarChart.js.map +1 -0
  174. package/dist/charts/RadialChart/RadialChart.d.ts +142 -0
  175. package/dist/charts/RadialChart/RadialChart.js +279 -0
  176. package/dist/charts/RadialChart/RadialChart.js.map +1 -0
  177. package/dist/charts/SankeyChart/SankeyChart.d.ts +149 -0
  178. package/dist/charts/SankeyChart/SankeyChart.js +509 -0
  179. package/dist/charts/SankeyChart/SankeyChart.js.map +1 -0
  180. package/dist/charts/ScatterChart/ScatterChart.d.ts +149 -0
  181. package/dist/charts/ScatterChart/ScatterChart.js +275 -0
  182. package/dist/charts/ScatterChart/ScatterChart.js.map +1 -0
  183. package/dist/charts/Sparkline/Sparkline.d.ts +53 -0
  184. package/dist/charts/Sparkline/Sparkline.js +95 -0
  185. package/dist/charts/Sparkline/Sparkline.js.map +1 -0
  186. package/dist/charts/TreemapChart/TreemapChart.d.ts +98 -0
  187. package/dist/charts/TreemapChart/TreemapChart.js +127 -0
  188. package/dist/charts/TreemapChart/TreemapChart.js.map +1 -0
  189. package/dist/charts/WaterfallChart/WaterfallChart.d.ts +164 -0
  190. package/dist/charts/WaterfallChart/WaterfallChart.js +321 -0
  191. package/dist/charts/WaterfallChart/WaterfallChart.js.map +1 -0
  192. package/dist/charts/index.d.ts +43 -0
  193. package/dist/charts/index.js +130 -0
  194. package/dist/charts/index.js.map +1 -0
  195. package/dist/charts/lib/annotations.d.ts +103 -0
  196. package/dist/charts/lib/annotations.js +99 -0
  197. package/dist/charts/lib/annotations.js.map +1 -0
  198. package/dist/charts/lib/axis.d.ts +18 -0
  199. package/dist/charts/lib/axis.js +21 -0
  200. package/dist/charts/lib/axis.js.map +1 -0
  201. package/dist/charts/lib/background.d.ts +33 -0
  202. package/dist/charts/lib/background.js +173 -0
  203. package/dist/charts/lib/background.js.map +1 -0
  204. package/dist/charts/lib/brush.d.ts +94 -0
  205. package/dist/charts/lib/brush.js +535 -0
  206. package/dist/charts/lib/brush.js.map +1 -0
  207. package/dist/charts/lib/chart.d.ts +94 -0
  208. package/dist/charts/lib/chart.js +149 -0
  209. package/dist/charts/lib/chart.js.map +1 -0
  210. package/dist/charts/lib/dot.d.ts +29 -0
  211. package/dist/charts/lib/dot.js +78 -0
  212. package/dist/charts/lib/dot.js.map +1 -0
  213. package/dist/charts/lib/empty.d.ts +31 -0
  214. package/dist/charts/lib/empty.js +24 -0
  215. package/dist/charts/lib/empty.js.map +1 -0
  216. package/dist/charts/lib/export.d.ts +94 -0
  217. package/dist/charts/lib/export.js +62 -0
  218. package/dist/charts/lib/export.js.map +1 -0
  219. package/dist/charts/lib/figure.d.ts +81 -0
  220. package/dist/charts/lib/figure.js +62 -0
  221. package/dist/charts/lib/figure.js.map +1 -0
  222. package/dist/charts/lib/format.d.ts +46 -0
  223. package/dist/charts/lib/format.js +56 -0
  224. package/dist/charts/lib/format.js.map +1 -0
  225. package/dist/charts/lib/legend.d.ts +45 -0
  226. package/dist/charts/lib/legend.js +117 -0
  227. package/dist/charts/lib/legend.js.map +1 -0
  228. package/dist/charts/lib/loading.d.ts +48 -0
  229. package/dist/charts/lib/loading.js +105 -0
  230. package/dist/charts/lib/loading.js.map +1 -0
  231. package/dist/charts/lib/paint.d.ts +154 -0
  232. package/dist/charts/lib/paint.js +551 -0
  233. package/dist/charts/lib/paint.js.map +1 -0
  234. package/dist/charts/lib/scale.d.ts +23 -0
  235. package/dist/charts/lib/scale.js +13 -0
  236. package/dist/charts/lib/scale.js.map +1 -0
  237. package/dist/charts/lib/selection.d.ts +20 -0
  238. package/dist/charts/lib/selection.js +18 -0
  239. package/dist/charts/lib/selection.js.map +1 -0
  240. package/dist/charts/lib/sonify-control.d.ts +163 -0
  241. package/dist/charts/lib/sonify-control.js +172 -0
  242. package/dist/charts/lib/sonify-control.js.map +1 -0
  243. package/dist/charts/lib/sonify.d.ts +248 -0
  244. package/dist/charts/lib/sonify.js +262 -0
  245. package/dist/charts/lib/sonify.js.map +1 -0
  246. package/dist/charts/lib/toolbar.d.ts +144 -0
  247. package/dist/charts/lib/toolbar.js +156 -0
  248. package/dist/charts/lib/toolbar.js.map +1 -0
  249. package/dist/charts/lib/tooltip.d.ts +59 -0
  250. package/dist/charts/lib/tooltip.js +135 -0
  251. package/dist/charts/lib/tooltip.js.map +1 -0
  252. package/dist/charts/lib/values.d.ts +56 -0
  253. package/dist/charts/lib/values.js +71 -0
  254. package/dist/charts/lib/values.js.map +1 -0
  255. package/dist/charts/lib/zoom.d.ts +139 -0
  256. package/dist/charts/lib/zoom.js +314 -0
  257. package/dist/charts/lib/zoom.js.map +1 -0
  258. package/dist/components/Accordion/Accordion.d.ts +34 -0
  259. package/dist/components/Accordion/Accordion.js +43 -0
  260. package/dist/components/Accordion/Accordion.js.map +1 -0
  261. package/dist/components/Alert/Alert.d.ts +32 -0
  262. package/dist/components/Alert/Alert.js +49 -0
  263. package/dist/components/Alert/Alert.js.map +1 -0
  264. package/dist/components/AppShell/AppShell.d.ts +58 -0
  265. package/dist/components/AppShell/AppShell.js +126 -0
  266. package/dist/components/AppShell/AppShell.js.map +1 -0
  267. package/dist/components/Article/Article.d.ts +58 -0
  268. package/dist/components/Article/Article.js +34 -0
  269. package/dist/components/Article/Article.js.map +1 -0
  270. package/dist/components/AspectRatio/AspectRatio.d.ts +46 -0
  271. package/dist/components/AspectRatio/AspectRatio.js +33 -0
  272. package/dist/components/AspectRatio/AspectRatio.js.map +1 -0
  273. package/dist/components/Avatar/Avatar.d.ts +38 -0
  274. package/dist/components/Avatar/Avatar.js +44 -0
  275. package/dist/components/Avatar/Avatar.js.map +1 -0
  276. package/dist/components/Badge/Badge.d.ts +30 -0
  277. package/dist/components/Badge/Badge.js +29 -0
  278. package/dist/components/Badge/Badge.js.map +1 -0
  279. package/dist/components/Breadcrumb/Breadcrumb.d.ts +37 -0
  280. package/dist/components/Breadcrumb/Breadcrumb.js +46 -0
  281. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
  282. package/dist/components/Button/Button.d.ts +70 -0
  283. package/dist/components/Button/Button.js +95 -0
  284. package/dist/components/Button/Button.js.map +1 -0
  285. package/dist/components/Calendar/Calendar.d.ts +54 -0
  286. package/dist/components/Calendar/Calendar.js +369 -0
  287. package/dist/components/Calendar/Calendar.js.map +1 -0
  288. package/dist/components/Card/Card.d.ts +55 -0
  289. package/dist/components/Card/Card.js +64 -0
  290. package/dist/components/Card/Card.js.map +1 -0
  291. package/dist/components/Checkbox/Checkbox.d.ts +26 -0
  292. package/dist/components/Checkbox/Checkbox.js +34 -0
  293. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  294. package/dist/components/Code/Code.d.ts +30 -0
  295. package/dist/components/Code/Code.js +21 -0
  296. package/dist/components/Code/Code.js.map +1 -0
  297. package/dist/components/CodeBlock/CodeBlock.d.ts +145 -0
  298. package/dist/components/CodeBlock/CodeBlock.js +114 -0
  299. package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
  300. package/dist/components/Collapsible/Collapsible.d.ts +45 -0
  301. package/dist/components/Collapsible/Collapsible.js +60 -0
  302. package/dist/components/Collapsible/Collapsible.js.map +1 -0
  303. package/dist/components/ColorPicker/ColorPicker.d.ts +67 -0
  304. package/dist/components/ColorPicker/ColorPicker.js +334 -0
  305. package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
  306. package/dist/components/Combobox/Combobox.d.ts +77 -0
  307. package/dist/components/Combobox/Combobox.js +170 -0
  308. package/dist/components/Combobox/Combobox.js.map +1 -0
  309. package/dist/components/Command/Command.d.ts +125 -0
  310. package/dist/components/Command/Command.js +204 -0
  311. package/dist/components/Command/Command.js.map +1 -0
  312. package/dist/components/ContextMenu/ContextMenu.d.ts +63 -0
  313. package/dist/components/ContextMenu/ContextMenu.js +109 -0
  314. package/dist/components/ContextMenu/ContextMenu.js.map +1 -0
  315. package/dist/components/DatePicker/DatePicker.d.ts +130 -0
  316. package/dist/components/DatePicker/DatePicker.js +257 -0
  317. package/dist/components/DatePicker/DatePicker.js.map +1 -0
  318. package/dist/components/DescriptionList/DescriptionList.d.ts +73 -0
  319. package/dist/components/DescriptionList/DescriptionList.js +35 -0
  320. package/dist/components/DescriptionList/DescriptionList.js.map +1 -0
  321. package/dist/components/Diagram/Diagram.d.ts +86 -0
  322. package/dist/components/Diagram/Diagram.js +211 -0
  323. package/dist/components/Diagram/Diagram.js.map +1 -0
  324. package/dist/components/Dialog/Dialog.d.ts +63 -0
  325. package/dist/components/Dialog/Dialog.js +90 -0
  326. package/dist/components/Dialog/Dialog.js.map +1 -0
  327. package/dist/components/DropdownMenu/DropdownMenu.d.ts +87 -0
  328. package/dist/components/DropdownMenu/DropdownMenu.js +120 -0
  329. package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
  330. package/dist/components/EmptyState/EmptyState.d.ts +55 -0
  331. package/dist/components/EmptyState/EmptyState.js +32 -0
  332. package/dist/components/EmptyState/EmptyState.js.map +1 -0
  333. package/dist/components/ErrorState/ErrorState.d.ts +55 -0
  334. package/dist/components/ErrorState/ErrorState.js +41 -0
  335. package/dist/components/ErrorState/ErrorState.js.map +1 -0
  336. package/dist/components/Field/Field.d.ts +111 -0
  337. package/dist/components/Field/Field.js +95 -0
  338. package/dist/components/Field/Field.js.map +1 -0
  339. package/dist/components/Field/field-control.d.ts +31 -0
  340. package/dist/components/Field/field-control.js +12 -0
  341. package/dist/components/Field/field-control.js.map +1 -0
  342. package/dist/components/FigureBand/FigureBand.d.ts +31 -0
  343. package/dist/components/FigureBand/FigureBand.js +51 -0
  344. package/dist/components/FigureBand/FigureBand.js.map +1 -0
  345. package/dist/components/FloatingIconButton/FloatingIconButton.d.ts +29 -0
  346. package/dist/components/FloatingIconButton/FloatingIconButton.js +34 -0
  347. package/dist/components/FloatingIconButton/FloatingIconButton.js.map +1 -0
  348. package/dist/components/Heading/Heading.d.ts +62 -0
  349. package/dist/components/Heading/Heading.js +44 -0
  350. package/dist/components/Heading/Heading.js.map +1 -0
  351. package/dist/components/Input/Input.d.ts +22 -0
  352. package/dist/components/Input/Input.js +21 -0
  353. package/dist/components/Input/Input.js.map +1 -0
  354. package/dist/components/Kbd/Kbd.d.ts +27 -0
  355. package/dist/components/Kbd/Kbd.js +21 -0
  356. package/dist/components/Kbd/Kbd.js.map +1 -0
  357. package/dist/components/LinkArrow/LinkArrow.d.ts +24 -0
  358. package/dist/components/LinkArrow/LinkArrow.js +24 -0
  359. package/dist/components/LinkArrow/LinkArrow.js.map +1 -0
  360. package/dist/components/Markdown/Markdown.d.ts +139 -0
  361. package/dist/components/Markdown/Markdown.js +135 -0
  362. package/dist/components/Markdown/Markdown.js.map +1 -0
  363. package/dist/components/Markdown/inline.d.ts +29 -0
  364. package/dist/components/Markdown/inline.js +74 -0
  365. package/dist/components/Markdown/inline.js.map +1 -0
  366. package/dist/components/Markdown/nodes.d.ts +65 -0
  367. package/dist/components/Markdown/nodes.js +1 -0
  368. package/dist/components/Markdown/nodes.js.map +1 -0
  369. package/dist/components/Markdown/parse.d.ts +24 -0
  370. package/dist/components/Markdown/parse.js +110 -0
  371. package/dist/components/Markdown/parse.js.map +1 -0
  372. package/dist/components/Markdown/slug.d.ts +15 -0
  373. package/dist/components/Markdown/slug.js +7 -0
  374. package/dist/components/Markdown/slug.js.map +1 -0
  375. package/dist/components/Metric/Metric.d.ts +61 -0
  376. package/dist/components/Metric/Metric.js +51 -0
  377. package/dist/components/Metric/Metric.js.map +1 -0
  378. package/dist/components/NativeSelect/NativeSelect.d.ts +33 -0
  379. package/dist/components/NativeSelect/NativeSelect.js +44 -0
  380. package/dist/components/NativeSelect/NativeSelect.js.map +1 -0
  381. package/dist/components/NavItem/NavItem.d.ts +39 -0
  382. package/dist/components/NavItem/NavItem.js +31 -0
  383. package/dist/components/NavItem/NavItem.js.map +1 -0
  384. package/dist/components/NumberField/NumberField.d.ts +69 -0
  385. package/dist/components/NumberField/NumberField.js +162 -0
  386. package/dist/components/NumberField/NumberField.js.map +1 -0
  387. package/dist/components/PageHeader/PageHeader.d.ts +92 -0
  388. package/dist/components/PageHeader/PageHeader.js +37 -0
  389. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  390. package/dist/components/Pagination/Pagination.d.ts +67 -0
  391. package/dist/components/Pagination/Pagination.js +112 -0
  392. package/dist/components/Pagination/Pagination.js.map +1 -0
  393. package/dist/components/Popover/Popover.d.ts +39 -0
  394. package/dist/components/Popover/Popover.js +57 -0
  395. package/dist/components/Popover/Popover.js.map +1 -0
  396. package/dist/components/Progress/Progress.d.ts +43 -0
  397. package/dist/components/Progress/Progress.js +57 -0
  398. package/dist/components/Progress/Progress.js.map +1 -0
  399. package/dist/components/RadioGroup/RadioGroup.d.ts +49 -0
  400. package/dist/components/RadioGroup/RadioGroup.js +53 -0
  401. package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
  402. package/dist/components/ScrollArea/ScrollArea.d.ts +46 -0
  403. package/dist/components/ScrollArea/ScrollArea.js +54 -0
  404. package/dist/components/ScrollArea/ScrollArea.js.map +1 -0
  405. package/dist/components/SearchableMenu/SearchableMenu.d.ts +68 -0
  406. package/dist/components/SearchableMenu/SearchableMenu.js +101 -0
  407. package/dist/components/SearchableMenu/SearchableMenu.js.map +1 -0
  408. package/dist/components/Select/Select.d.ts +87 -0
  409. package/dist/components/Select/Select.js +130 -0
  410. package/dist/components/Select/Select.js.map +1 -0
  411. package/dist/components/Separator/Separator.d.ts +48 -0
  412. package/dist/components/Separator/Separator.js +43 -0
  413. package/dist/components/Separator/Separator.js.map +1 -0
  414. package/dist/components/Sheet/Sheet.d.ts +43 -0
  415. package/dist/components/Sheet/Sheet.js +79 -0
  416. package/dist/components/Sheet/Sheet.js.map +1 -0
  417. package/dist/components/Sidebar/Sidebar.d.ts +357 -0
  418. package/dist/components/Sidebar/Sidebar.js +447 -0
  419. package/dist/components/Sidebar/Sidebar.js.map +1 -0
  420. package/dist/components/Skeleton/Skeleton.d.ts +70 -0
  421. package/dist/components/Skeleton/Skeleton.js +44 -0
  422. package/dist/components/Skeleton/Skeleton.js.map +1 -0
  423. package/dist/components/Slider/Slider.d.ts +74 -0
  424. package/dist/components/Slider/Slider.js +143 -0
  425. package/dist/components/Slider/Slider.js.map +1 -0
  426. package/dist/components/Spinner/Spinner.d.ts +58 -0
  427. package/dist/components/Spinner/Spinner.js +49 -0
  428. package/dist/components/Spinner/Spinner.js.map +1 -0
  429. package/dist/components/StatusDot/StatusDot.d.ts +29 -0
  430. package/dist/components/StatusDot/StatusDot.js +44 -0
  431. package/dist/components/StatusDot/StatusDot.js.map +1 -0
  432. package/dist/components/StatusPill/StatusPill.d.ts +30 -0
  433. package/dist/components/StatusPill/StatusPill.js +37 -0
  434. package/dist/components/StatusPill/StatusPill.js.map +1 -0
  435. package/dist/components/Steps/Steps.d.ts +65 -0
  436. package/dist/components/Steps/Steps.js +25 -0
  437. package/dist/components/Steps/Steps.js.map +1 -0
  438. package/dist/components/Switch/Switch.d.ts +23 -0
  439. package/dist/components/Switch/Switch.js +23 -0
  440. package/dist/components/Switch/Switch.js.map +1 -0
  441. package/dist/components/Table/Table.d.ts +116 -0
  442. package/dist/components/Table/Table.js +137 -0
  443. package/dist/components/Table/Table.js.map +1 -0
  444. package/dist/components/Tabs/Tabs.d.ts +37 -0
  445. package/dist/components/Tabs/Tabs.js +205 -0
  446. package/dist/components/Tabs/Tabs.js.map +1 -0
  447. package/dist/components/Tag/Tag.d.ts +87 -0
  448. package/dist/components/Tag/Tag.js +62 -0
  449. package/dist/components/Tag/Tag.js.map +1 -0
  450. package/dist/components/Text/Text.d.ts +62 -0
  451. package/dist/components/Text/Text.js +30 -0
  452. package/dist/components/Text/Text.js.map +1 -0
  453. package/dist/components/Textarea/Textarea.d.ts +20 -0
  454. package/dist/components/Textarea/Textarea.js +32 -0
  455. package/dist/components/Textarea/Textarea.js.map +1 -0
  456. package/dist/components/Timestamp/Timestamp.d.ts +59 -0
  457. package/dist/components/Timestamp/Timestamp.js +56 -0
  458. package/dist/components/Timestamp/Timestamp.js.map +1 -0
  459. package/dist/components/Toast/Toast.d.ts +32 -0
  460. package/dist/components/Toast/Toast.js +64 -0
  461. package/dist/components/Toast/Toast.js.map +1 -0
  462. package/dist/components/ToggleGroup/ToggleGroup.d.ts +46 -0
  463. package/dist/components/ToggleGroup/ToggleGroup.js +88 -0
  464. package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -0
  465. package/dist/components/Toolbar/Toolbar.d.ts +55 -0
  466. package/dist/components/Toolbar/Toolbar.js +43 -0
  467. package/dist/components/Toolbar/Toolbar.js.map +1 -0
  468. package/dist/components/Tooltip/Tooltip.d.ts +43 -0
  469. package/dist/components/Tooltip/Tooltip.js +40 -0
  470. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  471. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.d.ts +55 -0
  472. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js +175 -0
  473. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js.map +1 -0
  474. package/dist/diagrams/DataflowFigure/DataflowFigure.d.ts +28 -0
  475. package/dist/diagrams/DataflowFigure/DataflowFigure.js +148 -0
  476. package/dist/diagrams/DataflowFigure/DataflowFigure.js.map +1 -0
  477. package/dist/diagrams/DiagramCanvas/DiagramCanvas.d.ts +78 -0
  478. package/dist/diagrams/DiagramCanvas/DiagramCanvas.js +229 -0
  479. package/dist/diagrams/DiagramCanvas/DiagramCanvas.js.map +1 -0
  480. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.d.ts +106 -0
  481. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js +123 -0
  482. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js.map +1 -0
  483. package/dist/diagrams/DiagramInspector/DiagramInspector.d.ts +70 -0
  484. package/dist/diagrams/DiagramInspector/DiagramInspector.js +94 -0
  485. package/dist/diagrams/DiagramInspector/DiagramInspector.js.map +1 -0
  486. package/dist/diagrams/DiagramLegend/DiagramLegend.d.ts +42 -0
  487. package/dist/diagrams/DiagramLegend/DiagramLegend.js +35 -0
  488. package/dist/diagrams/DiagramLegend/DiagramLegend.js.map +1 -0
  489. package/dist/diagrams/DiagramMinimap/DiagramMinimap.d.ts +77 -0
  490. package/dist/diagrams/DiagramMinimap/DiagramMinimap.js +106 -0
  491. package/dist/diagrams/DiagramMinimap/DiagramMinimap.js.map +1 -0
  492. package/dist/diagrams/DiagramToolbar/DiagramToolbar.d.ts +48 -0
  493. package/dist/diagrams/DiagramToolbar/DiagramToolbar.js +53 -0
  494. package/dist/diagrams/DiagramToolbar/DiagramToolbar.js.map +1 -0
  495. package/dist/diagrams/LifecycleFigure/LifecycleFigure.d.ts +31 -0
  496. package/dist/diagrams/LifecycleFigure/LifecycleFigure.js +234 -0
  497. package/dist/diagrams/LifecycleFigure/LifecycleFigure.js.map +1 -0
  498. package/dist/diagrams/SequenceFigure/SequenceFigure.d.ts +38 -0
  499. package/dist/diagrams/SequenceFigure/SequenceFigure.js +261 -0
  500. package/dist/diagrams/SequenceFigure/SequenceFigure.js.map +1 -0
  501. package/dist/diagrams/WorkflowFigure/WorkflowFigure.d.ts +36 -0
  502. package/dist/diagrams/WorkflowFigure/WorkflowFigure.js +259 -0
  503. package/dist/diagrams/WorkflowFigure/WorkflowFigure.js.map +1 -0
  504. package/dist/diagrams/index.d.ts +17 -0
  505. package/dist/diagrams/index.js +29 -0
  506. package/dist/diagrams/index.js.map +1 -0
  507. package/dist/diagrams/lib/dev.d.ts +61 -0
  508. package/dist/diagrams/lib/dev.js +96 -0
  509. package/dist/diagrams/lib/dev.js.map +1 -0
  510. package/dist/diagrams/lib/frame.d.ts +138 -0
  511. package/dist/diagrams/lib/frame.js +131 -0
  512. package/dist/diagrams/lib/frame.js.map +1 -0
  513. package/dist/diagrams/lib/geometry.d.ts +114 -0
  514. package/dist/diagrams/lib/geometry.js +113 -0
  515. package/dist/diagrams/lib/geometry.js.map +1 -0
  516. package/dist/diagrams/lib/legend.d.ts +32 -0
  517. package/dist/diagrams/lib/legend.js +84 -0
  518. package/dist/diagrams/lib/legend.js.map +1 -0
  519. package/dist/diagrams/lib/marks.d.ts +207 -0
  520. package/dist/diagrams/lib/marks.js +480 -0
  521. package/dist/diagrams/lib/marks.js.map +1 -0
  522. package/dist/diagrams/lib/route.d.ts +106 -0
  523. package/dist/diagrams/lib/route.js +201 -0
  524. package/dist/diagrams/lib/route.js.map +1 -0
  525. package/dist/diagrams/lib/wires.d.ts +59 -0
  526. package/dist/diagrams/lib/wires.js +94 -0
  527. package/dist/diagrams/lib/wires.js.map +1 -0
  528. package/dist/diagrams/spec.d.ts +405 -0
  529. package/dist/diagrams/spec.js +1 -0
  530. package/dist/diagrams/spec.js.map +1 -0
  531. package/dist/fonts/hanken-grotesk-300.woff2 +0 -0
  532. package/dist/fonts/hanken-grotesk-400.woff2 +0 -0
  533. package/dist/fonts/hanken-grotesk-500.woff2 +0 -0
  534. package/dist/fonts/hanken-grotesk-600.woff2 +0 -0
  535. package/dist/fonts/hanken-grotesk-700.woff2 +0 -0
  536. package/dist/fonts/ibm-plex-mono-400.woff2 +0 -0
  537. package/dist/fonts/ibm-plex-mono-500.woff2 +0 -0
  538. package/dist/fonts/ibm-plex-mono-600.woff2 +0 -0
  539. package/dist/fonts/newsreader-300.woff2 +0 -0
  540. package/dist/fonts/newsreader-400.woff2 +0 -0
  541. package/dist/fonts/newsreader-500.woff2 +0 -0
  542. package/dist/fonts/newsreader-600.woff2 +0 -0
  543. package/dist/fonts.css +96 -0
  544. package/dist/index.d.ts +97 -0
  545. package/dist/index.js +80 -0
  546. package/dist/index.js.map +1 -0
  547. package/dist/keyframes.css +300 -0
  548. package/dist/lib/cn.d.ts +21 -0
  549. package/dist/lib/cn.js +9 -0
  550. package/dist/lib/cn.js.map +1 -0
  551. package/dist/lib/color.d.ts +80 -0
  552. package/dist/lib/color.js +189 -0
  553. package/dist/lib/color.js.map +1 -0
  554. package/dist/lib/control.d.ts +32 -0
  555. package/dist/lib/control.js +14 -0
  556. package/dist/lib/control.js.map +1 -0
  557. package/dist/lib/index.d.ts +4 -0
  558. package/dist/lib/index.js +11 -0
  559. package/dist/lib/index.js.map +1 -0
  560. package/dist/lib/numeric.d.ts +35 -0
  561. package/dist/lib/numeric.js +29 -0
  562. package/dist/lib/numeric.js.map +1 -0
  563. package/dist/lib/overlay-container.d.ts +48 -0
  564. package/dist/lib/overlay-container.js +15 -0
  565. package/dist/lib/overlay-container.js.map +1 -0
  566. package/dist/lib/slot-content.d.ts +8 -0
  567. package/dist/lib/slot-content.js +17 -0
  568. package/dist/lib/slot-content.js.map +1 -0
  569. package/dist/lib/step-rail.d.ts +45 -0
  570. package/dist/lib/step-rail.js +47 -0
  571. package/dist/lib/step-rail.js.map +1 -0
  572. package/dist/lib/svg-export.d.ts +138 -0
  573. package/dist/lib/svg-export.js +198 -0
  574. package/dist/lib/svg-export.js.map +1 -0
  575. package/dist/lib/useClipboardCopy.d.ts +30 -0
  576. package/dist/lib/useClipboardCopy.js +37 -0
  577. package/dist/lib/useClipboardCopy.js.map +1 -0
  578. package/dist/lib/useSelectionIndicator.d.ts +29 -0
  579. package/dist/lib/useSelectionIndicator.js +49 -0
  580. package/dist/lib/useSelectionIndicator.js.map +1 -0
  581. package/dist/lib/warn.d.ts +73 -0
  582. package/dist/lib/warn.js +38 -0
  583. package/dist/lib/warn.js.map +1 -0
  584. package/dist/semantic.css +200 -0
  585. package/dist/styles.css +98 -0
  586. package/dist/themes.css +607 -0
  587. package/dist/tokens/brand.d.ts +47 -0
  588. package/dist/tokens/brand.js +38 -0
  589. package/dist/tokens/brand.js.map +1 -0
  590. package/dist/tokens.css +666 -0
  591. package/dist/tokens.d.ts +205 -0
  592. package/dist/tokens.js +1056 -0
  593. package/dist/tokens.json +1055 -0
  594. package/dist/website/Actions/Actions.d.ts +34 -0
  595. package/dist/website/Actions/Actions.js +29 -0
  596. package/dist/website/Actions/Actions.js.map +1 -0
  597. package/dist/website/Collection/Collection.d.ts +128 -0
  598. package/dist/website/Collection/Collection.js +162 -0
  599. package/dist/website/Collection/Collection.js.map +1 -0
  600. package/dist/website/Contact/Contact.d.ts +87 -0
  601. package/dist/website/Contact/Contact.js +94 -0
  602. package/dist/website/Contact/Contact.js.map +1 -0
  603. package/dist/website/Content/CodePanel.d.ts +27 -0
  604. package/dist/website/Content/CodePanel.js +30 -0
  605. package/dist/website/Content/CodePanel.js.map +1 -0
  606. package/dist/website/Content/Content.d.ts +29 -0
  607. package/dist/website/Content/Content.js +38 -0
  608. package/dist/website/Content/Content.js.map +1 -0
  609. package/dist/website/Conversation/Conversation.d.ts +193 -0
  610. package/dist/website/Conversation/Conversation.js +252 -0
  611. package/dist/website/Conversation/Conversation.js.map +1 -0
  612. package/dist/website/Evidence/Evidence.d.ts +116 -0
  613. package/dist/website/Evidence/Evidence.js +142 -0
  614. package/dist/website/Evidence/Evidence.js.map +1 -0
  615. package/dist/website/Media/Media.d.ts +173 -0
  616. package/dist/website/Media/Media.js +225 -0
  617. package/dist/website/Media/Media.js.map +1 -0
  618. package/dist/website/Media/MediaLightbox.d.ts +18 -0
  619. package/dist/website/Media/MediaLightbox.js +38 -0
  620. package/dist/website/Media/MediaLightbox.js.map +1 -0
  621. package/dist/website/Metrics/Metrics.d.ts +74 -0
  622. package/dist/website/Metrics/Metrics.js +96 -0
  623. package/dist/website/Metrics/Metrics.js.map +1 -0
  624. package/dist/website/Music/Music.d.ts +60 -0
  625. package/dist/website/Music/Music.js +80 -0
  626. package/dist/website/Music/Music.js.map +1 -0
  627. package/dist/website/Portfolio/FrameLayout.d.ts +9 -0
  628. package/dist/website/Portfolio/FrameLayout.js +42 -0
  629. package/dist/website/Portfolio/FrameLayout.js.map +1 -0
  630. package/dist/website/Portfolio/Portfolio.d.ts +49 -0
  631. package/dist/website/Portfolio/Portfolio.js +66 -0
  632. package/dist/website/Portfolio/Portfolio.js.map +1 -0
  633. package/dist/website/Portfolio/QuestionCard.d.ts +22 -0
  634. package/dist/website/Portfolio/QuestionCard.js +33 -0
  635. package/dist/website/Portfolio/QuestionCard.js.map +1 -0
  636. package/dist/website/PortfolioIndex/PortfolioIndex.d.ts +21 -0
  637. package/dist/website/PortfolioIndex/PortfolioIndex.js +31 -0
  638. package/dist/website/PortfolioIndex/PortfolioIndex.js.map +1 -0
  639. package/dist/website/Reading/Reading.d.ts +203 -0
  640. package/dist/website/Reading/Reading.js +357 -0
  641. package/dist/website/Reading/Reading.js.map +1 -0
  642. package/dist/website/Recovery/Recovery.d.ts +39 -0
  643. package/dist/website/Recovery/Recovery.js +96 -0
  644. package/dist/website/Recovery/Recovery.js.map +1 -0
  645. package/dist/website/SearchPalette/SearchPalette.d.ts +59 -0
  646. package/dist/website/SearchPalette/SearchPalette.js +120 -0
  647. package/dist/website/SearchPalette/SearchPalette.js.map +1 -0
  648. package/dist/website/SiteNavigation/SiteNavigation.d.ts +46 -0
  649. package/dist/website/SiteNavigation/SiteNavigation.js +101 -0
  650. package/dist/website/SiteNavigation/SiteNavigation.js.map +1 -0
  651. package/dist/website/SiteShell/SiteShell.d.ts +45 -0
  652. package/dist/website/SiteShell/SiteShell.js +46 -0
  653. package/dist/website/SiteShell/SiteShell.js.map +1 -0
  654. package/dist/website/Timeline/Timeline.d.ts +80 -0
  655. package/dist/website/Timeline/Timeline.js +99 -0
  656. package/dist/website/Timeline/Timeline.js.map +1 -0
  657. package/dist/website/Workbench/Chronology.d.ts +32 -0
  658. package/dist/website/Workbench/Chronology.js +32 -0
  659. package/dist/website/Workbench/Chronology.js.map +1 -0
  660. package/dist/website/Workbench/ContactRow.d.ts +13 -0
  661. package/dist/website/Workbench/ContactRow.js +11 -0
  662. package/dist/website/Workbench/ContactRow.js.map +1 -0
  663. package/dist/website/Workbench/PhotoMosaic.d.ts +13 -0
  664. package/dist/website/Workbench/PhotoMosaic.js +15 -0
  665. package/dist/website/Workbench/PhotoMosaic.js.map +1 -0
  666. package/dist/website/Workbench/Reveal.d.ts +19 -0
  667. package/dist/website/Workbench/Reveal.js +29 -0
  668. package/dist/website/Workbench/Reveal.js.map +1 -0
  669. package/dist/website/Workbench/ToolStrip.d.ts +18 -0
  670. package/dist/website/Workbench/ToolStrip.js +15 -0
  671. package/dist/website/Workbench/ToolStrip.js.map +1 -0
  672. package/dist/website/Workbench/Workbench.d.ts +23 -0
  673. package/dist/website/Workbench/Workbench.js +22 -0
  674. package/dist/website/Workbench/Workbench.js.map +1 -0
  675. package/dist/website/Workbench/WorkbenchCard.d.ts +29 -0
  676. package/dist/website/Workbench/WorkbenchCard.js +21 -0
  677. package/dist/website/Workbench/WorkbenchCard.js.map +1 -0
  678. package/dist/website/Workbench/WorkbenchEntries.d.ts +22 -0
  679. package/dist/website/Workbench/WorkbenchEntries.js +24 -0
  680. package/dist/website/Workbench/WorkbenchEntries.js.map +1 -0
  681. package/dist/website/Workbench/WorkbenchFigure.d.ts +20 -0
  682. package/dist/website/Workbench/WorkbenchFigure.js +15 -0
  683. package/dist/website/Workbench/WorkbenchFigure.js.map +1 -0
  684. package/dist/website/Workbench/WorkbenchHero.d.ts +24 -0
  685. package/dist/website/Workbench/WorkbenchHero.js +24 -0
  686. package/dist/website/Workbench/WorkbenchHero.js.map +1 -0
  687. package/dist/website/Workbench/theme.d.ts +22 -0
  688. package/dist/website/Workbench/theme.js +12 -0
  689. package/dist/website/Workbench/theme.js.map +1 -0
  690. package/dist/website/index.d.ts +38 -0
  691. package/dist/website/index.js +32 -0
  692. package/dist/website/index.js.map +1 -0
  693. package/dist/website-actions.css +6 -0
  694. package/dist/website-base.css +46 -0
  695. package/dist/website-collection.css +89 -0
  696. package/dist/website-contact.css +29 -0
  697. package/dist/website-content.css +20 -0
  698. package/dist/website-controls.css +91 -0
  699. package/dist/website-conversation.css +115 -0
  700. package/dist/website-evidence.css +56 -0
  701. package/dist/website-media.css +227 -0
  702. package/dist/website-metrics.css +15 -0
  703. package/dist/website-music.css +27 -0
  704. package/dist/website-portfolio.css +94 -0
  705. package/dist/website-reading.css +159 -0
  706. package/dist/website-recovery.css +28 -0
  707. package/dist/website-search.css +26 -0
  708. package/dist/website-shell.css +89 -0
  709. package/dist/website-timeline.css +43 -0
  710. package/dist/website-workbench.css +162 -0
  711. package/dist/website.css +26 -0
  712. package/llms.txt +35 -0
  713. package/package.json +163 -5
  714. package/skills/folio-design/SKILL.md +228 -0
  715. package/skills/folio-design/evals/claims.json +95 -0
  716. package/skills/folio-design/evals/evals.json +84 -0
  717. package/skills/folio-design/rules/a11y.md +167 -0
  718. package/skills/folio-design/rules/composition.md +108 -0
  719. package/skills/folio-design/rules/forms.md +135 -0
  720. package/skills/folio-design/rules/naming.md +155 -0
  721. package/skills/folio-design/rules/tokens.md +135 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["'use client'\n\nimport * as AvatarPrimitive from '@radix-ui/react-avatar'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../lib/cn'\n\nexport interface AvatarProps extends Omit<ComponentProps<typeof AvatarPrimitive.Root>, 'children'> {\n src?: string\n /**\n * Describes the person, not the picture. It names the circle itself rather\n * than the image inside it, because the image is the optional half and most\n * rows of a real list render as initials.\n *\n * Empty string is correct and deliberate when the name is already printed\n * beside the avatar: the circle then leaves the accessibility tree entirely,\n * rather than repeating a name a screen reader has just read.\n */\n alt: string\n /** Shown while the image loads and if it never does. Usually initials. */\n fallback: string\n size?: 'sm' | 'md' | 'lg'\n}\n\nconst SIZE = {\n sm: 'size-7 text-[10px]',\n md: 'size-9 text-[11px]',\n lg: 'size-12 text-[13px]',\n} as const\n\n/**\n * A person, as a circle.\n *\n * Wraps Radix so the fallback appears only after the image has actually failed\n * or is still loading — a hand-rolled `onError` swap flashes the initials on\n * every render before the cache answers.\n *\n * The ROOT carries the accessible name, not the image. `alt` on the image\n * reaches the DOM only when `src` does, and the initials are aria-hidden, so an\n * avatar with no photograph announced nothing at all however carefully `alt`\n * was written — and a user list where photographs are optional is full of them.\n *\n * @example\n * <Avatar src={user.photo} alt={user.name} fallback=\"HC\" />\n */\nexport function Avatar({ src, alt, fallback, size = 'md', className, ...rest }: AvatarProps) {\n // An empty alt takes no role at all rather than an unnamed one: `role=\"img\"`\n // with nothing to say is a violation, and the empty string exists precisely\n // to say there is nothing to add.\n const named = alt.trim() !== ''\n\n return (\n <AvatarPrimitive.Root\n role={named ? 'img' : undefined}\n aria-label={named ? alt : undefined}\n className={cn(\n 'relative inline-flex shrink-0 overflow-hidden rounded-full border border-(--rule) bg-(--stone)',\n SIZE[size],\n className,\n )}\n {...rest}\n >\n {src && (\n // Empty, deliberately: the root above is the one element that names\n // this person, and a second name here is the same person read twice.\n <AvatarPrimitive.Image src={src} alt=\"\" className=\"size-full object-cover\" />\n )}\n <AvatarPrimitive.Fallback\n // Nothing to announce: the root carries the identity whether or not the\n // photograph ever arrives. Initials read aloud are noise.\n aria-hidden=\"true\"\n className=\"grid size-full place-items-center font-mono uppercase tracking-wider text-(--ink-3-aa)\"\n >\n {fallback}\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n )\n}\n\nexport default Avatar\n"],"mappings":";AAmDI,SAaI,KAbJ;AAjDJ,YAAY,qBAAqB;AAEjC,SAAS,UAAU;AAmBnB,MAAM,OAAO;AAAA,EACX,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAiBO,SAAS,OAAO,EAAE,KAAK,KAAK,UAAU,OAAO,MAAM,WAAW,GAAG,KAAK,GAAgB;AAI3F,QAAM,QAAQ,IAAI,KAAK,MAAM;AAE7B,SACE;AAAA,IAAC,gBAAgB;AAAA,IAAhB;AAAA,MACC,MAAM,QAAQ,QAAQ;AAAA,MACtB,cAAY,QAAQ,MAAM;AAAA,MAC1B,WAAW;AAAA,QACT;AAAA,QACA,KAAK,IAAI;AAAA,QACT;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA;AAAA,QAGC,oBAAC,gBAAgB,OAAhB,EAAsB,KAAU,KAAI,IAAG,WAAU,0BAAyB;AAAA,QAE7E;AAAA,UAAC,gBAAgB;AAAA,UAAhB;AAAA,YAGC,eAAY;AAAA,YACZ,WAAU;AAAA,YAET;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,iBAAQ;","names":[]}
@@ -0,0 +1,30 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ type BadgeTone = 'neutral' | 'success' | 'warning' | 'danger' | 'outline';
5
+ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
6
+ children: ReactNode;
7
+ /**
8
+ * `neutral` is the default and the right answer nearly always. The three
9
+ * status tones are the system's only chroma and are bound to STATE — a badge
10
+ * that is red because the design wanted a red badge is the thing this scale
11
+ * exists to prevent.
12
+ */
13
+ tone?: BadgeTone;
14
+ }
15
+ /**
16
+ * A count, a state, a small inline marker.
17
+ *
18
+ * Mono and small, so it reads as metadata rather than as content. A badge is
19
+ * not interactive — if it can be clicked or dismissed it is a `Tag` or a
20
+ * button, and giving this one an `onClick` produces a control a keyboard cannot
21
+ * reach.
22
+ *
23
+ * @example
24
+ * <Badge>12</Badge>
25
+ * @example
26
+ * <Badge tone="success">Deployed</Badge>
27
+ */
28
+ declare function Badge({ children, tone, className, ...rest }: BadgeProps): react.JSX.Element;
29
+
30
+ export { Badge, type BadgeProps, type BadgeTone, Badge as default };
@@ -0,0 +1,29 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/cn.js";
3
+ const TONE = {
4
+ neutral: "bg-(--stone) text-(--ink-2) border-transparent",
5
+ success: "bg-(--ok-soft) text-(--ok) border-transparent",
6
+ warning: "bg-(--warn-soft) text-(--warn) border-transparent",
7
+ danger: "bg-(--danger-soft) text-(--danger) border-transparent",
8
+ outline: "bg-transparent text-(--ink-2) border-(--rule-2)"
9
+ };
10
+ function Badge({ children, tone = "neutral", className, ...rest }) {
11
+ return /* @__PURE__ */ jsx(
12
+ "span",
13
+ {
14
+ className: cn(
15
+ "inline-flex items-center gap-1.5 rounded-(--radius-sm) border px-2.5 py-1 font-(family-name:--label-font) text-xs tracking-[calc(0.025em*var(--label-tracking-scale))]",
16
+ TONE[tone],
17
+ className
18
+ ),
19
+ ...rest,
20
+ children
21
+ }
22
+ );
23
+ }
24
+ var Badge_default = Badge;
25
+ export {
26
+ Badge,
27
+ Badge_default as default
28
+ };
29
+ //# sourceMappingURL=Badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react'\nimport { cn } from '../../lib/cn'\n\nexport type BadgeTone = 'neutral' | 'success' | 'warning' | 'danger' | 'outline'\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n children: ReactNode\n /**\n * `neutral` is the default and the right answer nearly always. The three\n * status tones are the system's only chroma and are bound to STATE — a badge\n * that is red because the design wanted a red badge is the thing this scale\n * exists to prevent.\n */\n tone?: BadgeTone\n}\n\nconst TONE: Record<BadgeTone, string> = {\n neutral: 'bg-(--stone) text-(--ink-2) border-transparent',\n success: 'bg-(--ok-soft) text-(--ok) border-transparent',\n warning: 'bg-(--warn-soft) text-(--warn) border-transparent',\n danger: 'bg-(--danger-soft) text-(--danger) border-transparent',\n outline: 'bg-transparent text-(--ink-2) border-(--rule-2)',\n}\n\n/**\n * A count, a state, a small inline marker.\n *\n * Mono and small, so it reads as metadata rather than as content. A badge is\n * not interactive — if it can be clicked or dismissed it is a `Tag` or a\n * button, and giving this one an `onClick` produces a control a keyboard cannot\n * reach.\n *\n * @example\n * <Badge>12</Badge>\n * @example\n * <Badge tone=\"success\">Deployed</Badge>\n */\nexport function Badge({ children, tone = 'neutral', className, ...rest }: BadgeProps) {\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-(--radius-sm) border px-2.5 py-1 font-(family-name:--label-font) text-xs tracking-[calc(0.025em*var(--label-tracking-scale))]',\n TONE[tone],\n className,\n )}\n {...rest}\n >\n {children}\n </span>\n )\n}\n\nexport default Badge\n"],"mappings":"AAuCI;AAtCJ,SAAS,UAAU;AAenB,MAAM,OAAkC;AAAA,EACtC,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AACX;AAeO,SAAS,MAAM,EAAE,UAAU,OAAO,WAAW,WAAW,GAAG,KAAK,GAAe;AACpF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,KAAK,IAAI;AAAA,QACT;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,gBAAQ;","names":[]}
@@ -0,0 +1,37 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface Crumb {
5
+ label: ReactNode;
6
+ /** Omit on the last crumb — the page you are already on is not a link. */
7
+ href?: string;
8
+ }
9
+ interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {
10
+ items: Crumb[];
11
+ /** Names this trail when a page has more than one. */
12
+ label?: string;
13
+ /** Rendered between crumbs. A slash by default; it is decorative either way. */
14
+ separator?: ReactNode;
15
+ }
16
+ /**
17
+ * Where you are, as a path.
18
+ *
19
+ * The last crumb is plain text with `aria-current="page"` rather than a link to
20
+ * itself — a self-link is the most common breadcrumb bug, and it makes a screen
21
+ * reader offer a navigation that goes nowhere.
22
+ *
23
+ * Separators live in `<li aria-hidden>` so the trail is read as its items and
24
+ * not as "home slash work slash".
25
+ *
26
+ * A middle crumb with no `href` is a defect that is invisible twice over: it
27
+ * renders as plain text in the same `--ink-3-aa` as the links beside it, and it
28
+ * carries no `aria-current` either — so it reads as the page the reader is on
29
+ * when it is not, and neither the browser nor a review says a word. The console
30
+ * does, in development.
31
+ *
32
+ * @example
33
+ * <Breadcrumb items={[{ label: 'Components', href: '/components' }, { label: 'Button' }]} />
34
+ */
35
+ declare function Breadcrumb({ items, label, separator, className, ...rest }: BreadcrumbProps): react.JSX.Element;
36
+
37
+ export { Breadcrumb, type BreadcrumbProps, type Crumb, Breadcrumb as default };
@@ -0,0 +1,46 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Fragment } from "react";
3
+ import { cn } from "../../lib/cn.js";
4
+ import { DEV, warn } from "../../lib/warn.js";
5
+ function Breadcrumb({
6
+ items,
7
+ label = "Breadcrumb",
8
+ separator = "/",
9
+ className,
10
+ ...rest
11
+ }) {
12
+ if (DEV) warnUnlinked(items);
13
+ return /* @__PURE__ */ jsx("nav", { "aria-label": label, className: cn("mono-meta text-(--ink-3-aa)", className), ...rest, children: /* @__PURE__ */ jsx("ol", { className: "m-0 flex list-none flex-wrap items-center gap-2 p-0", children: items.map((item, index) => {
14
+ const last = index === items.length - 1;
15
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
16
+ /* @__PURE__ */ jsx("li", { className: "min-w-0", children: item.href && !last ? /* @__PURE__ */ jsx(
17
+ "a",
18
+ {
19
+ href: item.href,
20
+ className: "text-(--ink-3-aa) underline decoration-transparent underline-offset-4 transition-colors duration-(--duration-fast) hover:text-(--ink) hover:decoration-(--rule-2)",
21
+ children: item.label
22
+ }
23
+ ) : /* @__PURE__ */ jsx("span", { "aria-current": last ? "page" : void 0, className: last ? "text-(--ink)" : void 0, children: item.label }) }),
24
+ !last && /* @__PURE__ */ jsx("li", { "aria-hidden": "true", className: "select-none text-(--rule-2)", children: separator })
25
+ ] }, index);
26
+ }) }) });
27
+ }
28
+ function warnUnlinked(items) {
29
+ items.forEach((item, index) => {
30
+ if (item.href || index === items.length - 1) return;
31
+ const named = typeof item.label === "string" ? `"${item.label}"` : `at ${index}`;
32
+ warn({
33
+ code: "BREADCRUMB_CRUMB_NOT_LINKED",
34
+ problem: `The crumb ${named} has no href, so it renders as plain text in the same colour as the links beside it and takes no aria-current. It reads as the current page, and it is not.`,
35
+ field: `items[${index}]`,
36
+ fix: "Give every crumb but the last an href, or drop the crumb if there is nothing to link to.",
37
+ component: "Breadcrumb"
38
+ });
39
+ });
40
+ }
41
+ var Breadcrumb_default = Breadcrumb;
42
+ export {
43
+ Breadcrumb,
44
+ Breadcrumb_default as default
45
+ };
46
+ //# sourceMappingURL=Breadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import { Fragment } from 'react'\nimport type { HTMLAttributes, ReactNode } from 'react'\nimport { cn } from '../../lib/cn'\nimport { DEV, warn } from '../../lib/warn'\n\nexport interface Crumb {\n label: ReactNode\n /** Omit on the last crumb — the page you are already on is not a link. */\n href?: string\n}\n\nexport interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {\n items: Crumb[]\n /** Names this trail when a page has more than one. */\n label?: string\n /** Rendered between crumbs. A slash by default; it is decorative either way. */\n separator?: ReactNode\n}\n\n/**\n * Where you are, as a path.\n *\n * The last crumb is plain text with `aria-current=\"page\"` rather than a link to\n * itself — a self-link is the most common breadcrumb bug, and it makes a screen\n * reader offer a navigation that goes nowhere.\n *\n * Separators live in `<li aria-hidden>` so the trail is read as its items and\n * not as \"home slash work slash\".\n *\n * A middle crumb with no `href` is a defect that is invisible twice over: it\n * renders as plain text in the same `--ink-3-aa` as the links beside it, and it\n * carries no `aria-current` either — so it reads as the page the reader is on\n * when it is not, and neither the browser nor a review says a word. The console\n * does, in development.\n *\n * @example\n * <Breadcrumb items={[{ label: 'Components', href: '/components' }, { label: 'Button' }]} />\n */\nexport function Breadcrumb({\n items,\n label = 'Breadcrumb',\n separator = '/',\n className,\n ...rest\n}: BreadcrumbProps) {\n if (DEV) warnUnlinked(items)\n\n return (\n <nav aria-label={label} className={cn('mono-meta text-(--ink-3-aa)', className)} {...rest}>\n <ol className=\"m-0 flex list-none flex-wrap items-center gap-2 p-0\">\n {items.map((item, index) => {\n const last = index === items.length - 1\n return (\n <Fragment key={index}>\n <li className=\"min-w-0\">\n {item.href && !last ? (\n <a\n href={item.href}\n className=\"text-(--ink-3-aa) underline decoration-transparent underline-offset-4 transition-colors duration-(--duration-fast) hover:text-(--ink) hover:decoration-(--rule-2)\"\n >\n {item.label}\n </a>\n ) : (\n <span aria-current={last ? 'page' : undefined} className={last ? 'text-(--ink)' : undefined}>\n {item.label}\n </span>\n )}\n </li>\n {!last && (\n <li aria-hidden=\"true\" className=\"select-none text-(--rule-2)\">\n {separator}\n </li>\n )}\n </Fragment>\n )\n })}\n </ol>\n </nav>\n )\n}\n\n/**\n * Dev only: every crumb but the last owes the reader a destination.\n *\n * The label is a ReactNode, so a crumb whose label is not a string is named by\n * its position instead — the message has to identify the crumb well enough to\n * repair the call without opening anything.\n */\nfunction warnUnlinked(items: Crumb[]): void {\n items.forEach((item, index) => {\n if (item.href || index === items.length - 1) return\n const named = typeof item.label === 'string' ? `\"${item.label}\"` : `at ${index}`\n\n warn({\n code: 'BREADCRUMB_CRUMB_NOT_LINKED',\n problem: `The crumb ${named} has no href, so it renders as plain text in the same colour as the links beside it and takes no aria-current. It reads as the current page, and it is not.`,\n field: `items[${index}]`,\n fix: 'Give every crumb but the last an href, or drop the crumb if there is nothing to link to.',\n component: 'Breadcrumb',\n })\n })\n}\n\nexport default Breadcrumb\n"],"mappings":"AAqDY,SAGM,KAHN;AArDZ,SAAS,gBAAgB;AAEzB,SAAS,UAAU;AACnB,SAAS,KAAK,YAAY;AAmCnB,SAAS,WAAW;AAAA,EACzB;AAAA,EACA,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ;AAAA,EACA,GAAG;AACL,GAAoB;AAClB,MAAI,IAAK,cAAa,KAAK;AAE3B,SACE,oBAAC,SAAI,cAAY,OAAO,WAAW,GAAG,+BAA+B,SAAS,GAAI,GAAG,MACnF,8BAAC,QAAG,WAAU,uDACX,gBAAM,IAAI,CAAC,MAAM,UAAU;AAC1B,UAAM,OAAO,UAAU,MAAM,SAAS;AACtC,WACE,qBAAC,YACC;AAAA,0BAAC,QAAG,WAAU,WACX,eAAK,QAAQ,CAAC,OACb;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,KAAK;AAAA,UACX,WAAU;AAAA,UAET,eAAK;AAAA;AAAA,MACR,IAEA,oBAAC,UAAK,gBAAc,OAAO,SAAS,QAAW,WAAW,OAAO,iBAAiB,QAC/E,eAAK,OACR,GAEJ;AAAA,MACC,CAAC,QACA,oBAAC,QAAG,eAAY,QAAO,WAAU,+BAC9B,qBACH;AAAA,SAlBW,KAoBf;AAAA,EAEJ,CAAC,GACH,GACF;AAEJ;AASA,SAAS,aAAa,OAAsB;AAC1C,QAAM,QAAQ,CAAC,MAAM,UAAU;AAC7B,QAAI,KAAK,QAAQ,UAAU,MAAM,SAAS,EAAG;AAC7C,UAAM,QAAQ,OAAO,KAAK,UAAU,WAAW,IAAI,KAAK,KAAK,MAAM,MAAM,KAAK;AAE9E,SAAK;AAAA,MACH,MAAM;AAAA,MACN,SAAS,aAAa,KAAK;AAAA,MAC3B,OAAO,SAAS,KAAK;AAAA,MACrB,KAAK;AAAA,MACL,WAAW;AAAA,IACb,CAAC;AAAA,EACH,CAAC;AACH;AAEA,IAAO,qBAAQ;","names":[]}
@@ -0,0 +1,70 @@
1
+ import * as react from 'react';
2
+ import { ReactNode, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
3
+
4
+ type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
5
+ type ButtonSize = 'sm' | 'md' | 'lg';
6
+ interface CommonProps {
7
+ children?: ReactNode;
8
+ /**
9
+ * Which action this is. `primary` is the one thing the screen wants you to
10
+ * do, so there is at most one per view; `danger` is reserved for destructive
11
+ * actions and is the only place chroma is allowed on a control.
12
+ */
13
+ variant?: ButtonVariant;
14
+ /** 36 / 44 / 48px tall. `md` meets the pointer-target floor on its own. */
15
+ size?: ButtonSize;
16
+ /** Optional mono keycap glyph rendered after the label (e.g. "P"). */
17
+ keycap?: string;
18
+ /**
19
+ * Swaps the leading content for a spinner and blocks interaction. The label
20
+ * stays put — a button that empties out while it works loses its width, and
21
+ * the page reflows under the pointer that just clicked it.
22
+ */
23
+ loading?: boolean;
24
+ /**
25
+ * Square control with no label. REQUIRES `aria-label`: an icon-only button
26
+ * with no accessible name is invisible to a screen reader, and this is the
27
+ * single most common way a design system ships an unusable control.
28
+ */
29
+ iconOnly?: boolean;
30
+ /**
31
+ * Render the child element instead of a `<button>`, keeping these styles.
32
+ * Use it to hand the styling to a router's `Link` — `asChild` is what keeps
33
+ * this package free of any one router.
34
+ *
35
+ * The decoration slots (`keycap`, `loading`) are not injected into a slotted
36
+ * child; compose them inside it yourself.
37
+ *
38
+ * @example
39
+ * <Button asChild><Link href="/work">Work</Link></Button>
40
+ */
41
+ asChild?: boolean;
42
+ className?: string;
43
+ }
44
+ type ButtonAsLink = CommonProps & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'className' | 'children'> & {
45
+ href: string;
46
+ };
47
+ type ButtonAsButton = CommonProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'children'> & {
48
+ href?: undefined;
49
+ };
50
+ type ButtonProps = ButtonAsLink | ButtonAsButton;
51
+ /**
52
+ * The system's action.
53
+ *
54
+ * Renders a `<button>`, or an `<a>` when given `href`, or whatever you hand it
55
+ * via `asChild`. No router is imported, so the package stays framework-agnostic
56
+ * and a Next or React Router app wires its own `Link` at the call site.
57
+ *
58
+ * Server-component friendly: there is no client boundary here, so it renders in
59
+ * a static page as well as an interactive one.
60
+ *
61
+ * @example
62
+ * <Button variant="secondary" keycap="P">View projects</Button>
63
+ * @example
64
+ * <Button loading disabled>Saving…</Button>
65
+ * @example
66
+ * <Button iconOnly aria-label="Close"><X size={16} /></Button>
67
+ */
68
+ declare function Button(props: ButtonProps): react.JSX.Element;
69
+
70
+ export { Button, type ButtonProps, type ButtonSize, type ButtonVariant, Button as default };
@@ -0,0 +1,95 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cn } from "../../lib/cn.js";
4
+ import { DEV, warn } from "../../lib/warn.js";
5
+ import { Spinner } from "../Spinner/Spinner.js";
6
+ const BASE = "inline-flex items-center justify-center gap-(--control-gap) rounded-(--radius) font-sans transition-[opacity,color,border-color,background-color] duration-(--duration-fast) ease-(--ease-out-expo) disabled:opacity-(--disabled-opacity) disabled:pointer-events-none aria-disabled:opacity-(--disabled-opacity) aria-disabled:pointer-events-none";
7
+ const VARIANT = {
8
+ primary: "bg-(--action) text-(--action-foreground) border border-(--action) hover:opacity-85",
9
+ secondary: "border border-(--rule-2) text-(--ink) bg-transparent hover:border-(--ink)",
10
+ ghost: "border border-transparent text-(--ink-2) hover:text-(--ink) hover:bg-(--stone)",
11
+ /* The one place chroma is allowed on a control, and only because the action
12
+ is destructive — that is a state, not a brand colour. */
13
+ danger: "bg-(--danger) text-(--paper) border border-(--danger) hover:opacity-85"
14
+ };
15
+ const SIZE = {
16
+ sm: "min-h-(--control-h-sm) px-(--control-px-sm) py-(--control-py-sm) text-[13px] leading-(--control-lh)",
17
+ md: "min-h-(--control-h-md) px-(--control-px-md) py-(--control-py-md) text-sm leading-(--control-lh)",
18
+ lg: "min-h-(--control-h-lg) px-(--control-px-lg) py-(--control-py-lg) text-[15px] leading-(--control-lh)"
19
+ };
20
+ const ICON_SIZE = {
21
+ sm: "size-(--control-h-sm) p-0",
22
+ md: "size-(--control-h-md) p-0",
23
+ lg: "size-(--control-h-lg) p-0"
24
+ };
25
+ const SPINNER_SIZE = { sm: "sm", md: "sm", lg: "md" };
26
+ function Keycap({ glyph }) {
27
+ return /* @__PURE__ */ jsx("span", { className: "rounded-(--radius-sm) border border-current px-2 py-0.5 font-mono text-[11px] opacity-55", children: glyph });
28
+ }
29
+ function Button(props) {
30
+ const {
31
+ children,
32
+ variant = "primary",
33
+ size = "md",
34
+ keycap,
35
+ loading = false,
36
+ iconOnly = false,
37
+ asChild = false,
38
+ className
39
+ } = props;
40
+ const cls = cn(BASE, VARIANT[variant], iconOnly ? ICON_SIZE[size] : SIZE[size], className);
41
+ if (DEV && iconOnly) {
42
+ const named = typeof props["aria-label"] === "string" && props["aria-label"].trim() !== "";
43
+ const described = typeof props["aria-labelledby"] === "string";
44
+ if (!named && !described) {
45
+ warn({
46
+ code: "BUTTON_ICON_ONLY_UNNAMED",
47
+ problem: 'An iconOnly Button has no text, so without an accessible name a screen reader announces it as "button" and nothing else.',
48
+ field: "aria-label",
49
+ fix: 'Add aria-label with the action the button performs, e.g. aria-label="Delete invoice".',
50
+ component: "Button"
51
+ });
52
+ }
53
+ }
54
+ const spinnerTone = variant === "primary" || variant === "danger" ? "current" : "default";
55
+ const decoration = /* @__PURE__ */ jsxs(Fragment, { children: [
56
+ loading && /* @__PURE__ */ jsx(Spinner, { size: SPINNER_SIZE[size], tone: spinnerTone, label: null }),
57
+ children,
58
+ keycap && /* @__PURE__ */ jsx(Keycap, { glyph: keycap })
59
+ ] });
60
+ if (asChild) {
61
+ const { children: _c2, variant: _v2, size: _s2, keycap: _k2, loading: _l2, iconOnly: _i2, asChild: _a2, className: _cn2, ...rest2 } = props;
62
+ return /* @__PURE__ */ jsx(Slot, { className: cls, ...rest2, children });
63
+ }
64
+ if (props.href !== void 0) {
65
+ const { children: _c2, variant: _v2, size: _s2, keycap: _k2, loading: _l2, iconOnly: _i2, asChild: _a2, className: _cn2, href, ...rest2 } = props;
66
+ return /* @__PURE__ */ jsx(
67
+ "a",
68
+ {
69
+ href,
70
+ className: cls,
71
+ "aria-disabled": loading || void 0,
72
+ ...rest2,
73
+ children: decoration
74
+ }
75
+ );
76
+ }
77
+ const { children: _c, variant: _v, size: _s, keycap: _k, loading: _l, iconOnly: _i, asChild: _a, className: _cn, ...rest } = props;
78
+ return /* @__PURE__ */ jsx(
79
+ "button",
80
+ {
81
+ type: rest.type ?? "button",
82
+ "aria-busy": loading || void 0,
83
+ disabled: rest.disabled || loading,
84
+ className: cls,
85
+ ...rest,
86
+ children: decoration
87
+ }
88
+ );
89
+ }
90
+ var Button_default = Button;
91
+ export {
92
+ Button,
93
+ Button_default as default
94
+ };
95
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport type { AnchorHTMLAttributes, ButtonHTMLAttributes, ReactNode } from 'react'\nimport { cn } from '../../lib/cn'\nimport { DEV, warn } from '../../lib/warn'\nimport { Spinner } from '../Spinner/Spinner'\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger'\nexport type ButtonSize = 'sm' | 'md' | 'lg'\n\n/**\n * The base every variant shares.\n *\n * It reads `--radius`, the CONTROL step, which is the same corner an `Input`,\n * a `Select` trigger and a `Textarea` draw. It used to be a pill, and a pill\n * beside an 8px field is two different ideas of what a control is — the one\n * inconsistency in the system that every reader noticed and none of the\n * component pages could explain. Everything on the control line now agrees,\n * and the capsule is kept for the things that genuinely are one: a badge, a\n * status pill, a segmented strip, a progress track.\n *\n * It does not move on hover. An earlier base lifted a pixel and asked for a\n * shadow the White Reset does not have — `--shadow` resolves to `none`, so that\n * hover state was invisible on every button in the system while still costing a\n * transition. Opacity carries the filled hover; the border carries the outlined\n * one.\n *\n * The transition names its properties rather than using `all`, so a layout\n * change (a width that grows when the label becomes \"Saving…\") is instant\n * instead of sliding.\n */\nconst BASE =\n 'inline-flex items-center justify-center gap-(--control-gap) rounded-(--radius) font-sans transition-[opacity,color,border-color,background-color] duration-(--duration-fast) ease-(--ease-out-expo) disabled:opacity-(--disabled-opacity) disabled:pointer-events-none aria-disabled:opacity-(--disabled-opacity) aria-disabled:pointer-events-none'\n\nconst VARIANT: Record<ButtonVariant, string> = {\n primary: 'bg-(--action) text-(--action-foreground) border border-(--action) hover:opacity-85',\n secondary: 'border border-(--rule-2) text-(--ink) bg-transparent hover:border-(--ink)',\n ghost: 'border border-transparent text-(--ink-2) hover:text-(--ink) hover:bg-(--stone)',\n /* The one place chroma is allowed on a control, and only because the action\n is destructive — that is a state, not a brand colour. */\n danger: 'bg-(--danger) text-(--paper) border border-(--danger) hover:opacity-85',\n}\n\n/**\n * `min-h` rather than `h`, so a button that wraps to two lines grows instead of\n * clipping.\n *\n * The heights come from the density tokens rather than from a literal, so a\n * subtree marked `data-density=\"compact\"` shrinks its controls without a single\n * call site being told. At the default density `md` is 44px — the pointer\n * target WCAG 2.5.5 asks for.\n *\n * `--control-lh` is what makes those numbers true rather than aspirational. A\n * floor only binds while the box is under it, and the box is the line plus the\n * padding plus the border — so a label inheriting the body's 1.6 leading put\n * `sm` at 39px against its own 36px token, `md` at 46 against 44 and `lg` at 50\n * against 48. Every size was two to three pixels taller than the number\n * documenting it, which is also how a masthead sized from `--control-h-sm`\n * ended up with a search field standing proud of every icon beside it.\n */\nconst SIZE: Record<ButtonSize, string> = {\n sm: 'min-h-(--control-h-sm) px-(--control-px-sm) py-(--control-py-sm) text-[13px] leading-(--control-lh)',\n md: 'min-h-(--control-h-md) px-(--control-px-md) py-(--control-py-md) text-sm leading-(--control-lh)',\n lg: 'min-h-(--control-h-lg) px-(--control-px-lg) py-(--control-py-lg) text-[15px] leading-(--control-lh)',\n}\n\n/** Square, because an icon has no label to give the box its width. */\nconst ICON_SIZE: Record<ButtonSize, string> = {\n sm: 'size-(--control-h-sm) p-0',\n md: 'size-(--control-h-md) p-0',\n lg: 'size-(--control-h-lg) p-0',\n}\n\nconst SPINNER_SIZE: Record<ButtonSize, 'sm' | 'md'> = { sm: 'sm', md: 'sm', lg: 'md' }\n\ninterface CommonProps {\n children?: ReactNode\n /**\n * Which action this is. `primary` is the one thing the screen wants you to\n * do, so there is at most one per view; `danger` is reserved for destructive\n * actions and is the only place chroma is allowed on a control.\n */\n variant?: ButtonVariant\n /** 36 / 44 / 48px tall. `md` meets the pointer-target floor on its own. */\n size?: ButtonSize\n /** Optional mono keycap glyph rendered after the label (e.g. \"P\"). */\n keycap?: string\n /**\n * Swaps the leading content for a spinner and blocks interaction. The label\n * stays put — a button that empties out while it works loses its width, and\n * the page reflows under the pointer that just clicked it.\n */\n loading?: boolean\n /**\n * Square control with no label. REQUIRES `aria-label`: an icon-only button\n * with no accessible name is invisible to a screen reader, and this is the\n * single most common way a design system ships an unusable control.\n */\n iconOnly?: boolean\n /**\n * Render the child element instead of a `<button>`, keeping these styles.\n * Use it to hand the styling to a router's `Link` — `asChild` is what keeps\n * this package free of any one router.\n *\n * The decoration slots (`keycap`, `loading`) are not injected into a slotted\n * child; compose them inside it yourself.\n *\n * @example\n * <Button asChild><Link href=\"/work\">Work</Link></Button>\n */\n asChild?: boolean\n className?: string\n}\n\ntype ButtonAsLink = CommonProps &\n Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'className' | 'children'> & { href: string }\n\ntype ButtonAsButton = CommonProps &\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'children'> & { href?: undefined }\n\nexport type ButtonProps = ButtonAsLink | ButtonAsButton\n\nfunction Keycap({ glyph }: { glyph: string }) {\n return (\n <span className=\"rounded-(--radius-sm) border border-current px-2 py-0.5 font-mono text-[11px] opacity-55\">\n {glyph}\n </span>\n )\n}\n\n/**\n * The system's action.\n *\n * Renders a `<button>`, or an `<a>` when given `href`, or whatever you hand it\n * via `asChild`. No router is imported, so the package stays framework-agnostic\n * and a Next or React Router app wires its own `Link` at the call site.\n *\n * Server-component friendly: there is no client boundary here, so it renders in\n * a static page as well as an interactive one.\n *\n * @example\n * <Button variant=\"secondary\" keycap=\"P\">View projects</Button>\n * @example\n * <Button loading disabled>Saving…</Button>\n * @example\n * <Button iconOnly aria-label=\"Close\"><X size={16} /></Button>\n */\nexport function Button(props: ButtonProps) {\n const {\n children,\n variant = 'primary',\n size = 'md',\n keycap,\n loading = false,\n iconOnly = false,\n asChild = false,\n className,\n } = props\n\n const cls = cn(BASE, VARIANT[variant], iconOnly ? ICON_SIZE[size] : SIZE[size], className)\n\n if (DEV && iconOnly) {\n // The control renders correctly and is announced as \"button\" and nothing\n // else. Nothing about the rendered page says so, which is why this is the\n // single most common way a design system ships an unusable control.\n const named =\n typeof props['aria-label'] === 'string' && props['aria-label'].trim() !== ''\n const described = typeof props['aria-labelledby'] === 'string'\n if (!named && !described) {\n warn({\n code: 'BUTTON_ICON_ONLY_UNNAMED',\n problem:\n 'An iconOnly Button has no text, so without an accessible name a screen reader announces it as \"button\" and nothing else.',\n field: 'aria-label',\n fix: 'Add aria-label with the action the button performs, e.g. aria-label=\"Delete invoice\".',\n component: 'Button',\n })\n }\n }\n\n // A filled ground needs a spinner in the inherited colour; an outlined one\n // reads better against the page's own rule scale.\n const spinnerTone = variant === 'primary' || variant === 'danger' ? 'current' : 'default'\n const decoration = (\n <>\n {loading && <Spinner size={SPINNER_SIZE[size]} tone={spinnerTone} label={null} />}\n {children}\n {keycap && <Keycap glyph={keycap} />}\n </>\n )\n\n if (asChild) {\n const { children: _c, variant: _v, size: _s, keycap: _k, loading: _l, iconOnly: _i, asChild: _a, className: _cn, ...rest } = props\n return (\n <Slot className={cls} {...rest}>\n {children}\n </Slot>\n )\n }\n\n if (props.href !== undefined) {\n const { children: _c, variant: _v, size: _s, keycap: _k, loading: _l, iconOnly: _i, asChild: _a, className: _cn, href, ...rest } = props\n return (\n <a\n href={href}\n className={cls}\n // A link cannot be `disabled`; `aria-disabled` plus the pointer-events\n // rule in BASE is the accessible equivalent.\n aria-disabled={loading || undefined}\n {...rest}\n >\n {decoration}\n </a>\n )\n }\n\n const { children: _c, variant: _v, size: _s, keycap: _k, loading: _l, iconOnly: _i, asChild: _a, className: _cn, ...rest } = props\n return (\n <button\n type={rest.type ?? 'button'}\n aria-busy={loading || undefined}\n disabled={rest.disabled || loading}\n className={cls}\n {...rest}\n >\n {decoration}\n </button>\n )\n}\n\nexport default Button\n"],"mappings":"AA2HI,SA4DA,UA5DA,KA4DA,YA5DA;AA3HJ,SAAS,YAAY;AAErB,SAAS,UAAU;AACnB,SAAS,KAAK,YAAY;AAC1B,SAAS,eAAe;AA0BxB,MAAM,OACJ;AAEF,MAAM,UAAyC;AAAA,EAC7C,SAAS;AAAA,EACT,WAAW;AAAA,EACX,OAAO;AAAA;AAAA;AAAA,EAGP,QAAQ;AACV;AAmBA,MAAM,OAAmC;AAAA,EACvC,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAGA,MAAM,YAAwC;AAAA,EAC5C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,eAAgD,EAAE,IAAI,MAAM,IAAI,MAAM,IAAI,KAAK;AAiDrF,SAAS,OAAO,EAAE,MAAM,GAAsB;AAC5C,SACE,oBAAC,UAAK,WAAU,4FACb,iBACH;AAEJ;AAmBO,SAAS,OAAO,OAAoB;AACzC,QAAM;AAAA,IACJ;AAAA,IACA,UAAU;AAAA,IACV,OAAO;AAAA,IACP;AAAA,IACA,UAAU;AAAA,IACV,WAAW;AAAA,IACX,UAAU;AAAA,IACV;AAAA,EACF,IAAI;AAEJ,QAAM,MAAM,GAAG,MAAM,QAAQ,OAAO,GAAG,WAAW,UAAU,IAAI,IAAI,KAAK,IAAI,GAAG,SAAS;AAEzF,MAAI,OAAO,UAAU;AAInB,UAAM,QACJ,OAAO,MAAM,YAAY,MAAM,YAAY,MAAM,YAAY,EAAE,KAAK,MAAM;AAC5E,UAAM,YAAY,OAAO,MAAM,iBAAiB,MAAM;AACtD,QAAI,CAAC,SAAS,CAAC,WAAW;AACxB,WAAK;AAAA,QACH,MAAM;AAAA,QACN,SACE;AAAA,QACF,OAAO;AAAA,QACP,KAAK;AAAA,QACL,WAAW;AAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF;AAIA,QAAM,cAAc,YAAY,aAAa,YAAY,WAAW,YAAY;AAChF,QAAM,aACJ,iCACG;AAAA,eAAW,oBAAC,WAAQ,MAAM,aAAa,IAAI,GAAG,MAAM,aAAa,OAAO,MAAM;AAAA,IAC9E;AAAA,IACA,UAAU,oBAAC,UAAO,OAAO,QAAQ;AAAA,KACpC;AAGF,MAAI,SAAS;AACX,UAAM,EAAE,UAAUA,KAAI,SAASC,KAAI,MAAMC,KAAI,QAAQC,KAAI,SAASC,KAAI,UAAUC,KAAI,SAASC,KAAI,WAAWC,MAAK,GAAGC,MAAK,IAAI;AAC7H,WACE,oBAAC,QAAK,WAAW,KAAM,GAAGA,OACvB,UACH;AAAA,EAEJ;AAEA,MAAI,MAAM,SAAS,QAAW;AAC5B,UAAM,EAAE,UAAUR,KAAI,SAASC,KAAI,MAAMC,KAAI,QAAQC,KAAI,SAASC,KAAI,UAAUC,KAAI,SAASC,KAAI,WAAWC,MAAK,MAAM,GAAGC,MAAK,IAAI;AACnI,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,QAGX,iBAAe,WAAW;AAAA,QACzB,GAAGA;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEJ;AAEA,QAAM,EAAE,UAAU,IAAI,SAAS,IAAI,MAAM,IAAI,QAAQ,IAAI,SAAS,IAAI,UAAU,IAAI,SAAS,IAAI,WAAW,KAAK,GAAG,KAAK,IAAI;AAC7H,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,KAAK,QAAQ;AAAA,MACnB,aAAW,WAAW;AAAA,MACtB,UAAU,KAAK,YAAY;AAAA,MAC3B,WAAW;AAAA,MACV,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,iBAAQ;","names":["_c","_v","_s","_k","_l","_i","_a","_cn","rest"]}
@@ -0,0 +1,54 @@
1
+ import * as react from 'react';
2
+ import { DayPickerProps } from 'react-day-picker';
3
+
4
+ /**
5
+ * The strings the month-and-year picker says, none of which react-day-picker
6
+ * knows about — its own `labels` prop covers its own chrome, and this panel is
7
+ * ours. English by default, and exposed for the same reason `AppShell` exposes
8
+ * `openLabel`: every one of these controls is an icon or a bare number, so the
9
+ * string IS the control as far as a screen reader is concerned.
10
+ *
11
+ * The month names already follow `locale`, which is what made the chrome around
12
+ * them read as an oversight rather than as a policy.
13
+ */
14
+ interface CalendarLabels {
15
+ /** Names the panel showing twelve months. */
16
+ monthPanelLabel?: string;
17
+ /** Names the panel showing a page of years. */
18
+ yearPanelLabel?: string;
19
+ /** The two chevrons that browse a year at a time, inside the month panel. */
20
+ previousYearLabel?: string;
21
+ nextYearLabel?: string;
22
+ /** The two chevrons that page the year grid, twenty-four at a time. */
23
+ earlierYearsLabel?: string;
24
+ laterYearsLabel?: string;
25
+ }
26
+ type CalendarProps = DayPickerProps & CalendarLabels;
27
+ /**
28
+ * A month, as a grid of days.
29
+ *
30
+ * Wraps react-day-picker rather than building a calendar, and the reason is the
31
+ * long tail: a month grid is easy, and everything around it is not — the
32
+ * keyboard contract (arrows move a day, Page moves a month, Home and End reach
33
+ * the week's ends), the `aria-live` announcement when the month changes, week
34
+ * numbering, the first day of the week varying by locale, and the fact that
35
+ * "today" and "selected" are different states a screen reader must hear apart.
36
+ *
37
+ * Every class is replaced rather than layered over the library's stylesheet, so
38
+ * nothing here depends on a CSS file this package does not control — but the
39
+ * library's OWN class is kept on each slot, because passing a class REPLACES it
40
+ * and every `.rdp-*` selector downstream depends on those.
41
+ *
42
+ * The month names follow `locale`. The picker's own chrome — the two panels and
43
+ * the four chevrons that browse them — follows `CalendarLabels`, because
44
+ * `locale` cannot supply strings this package invented.
45
+ *
46
+ * @example
47
+ * <Calendar mode="single" selected={date} onSelect={setDate} />
48
+ * @example
49
+ * // A birth date: widen the years, since the default span is deliberately short.
50
+ * <Calendar mode="single" startMonth={new Date(1920, 0)} endMonth={new Date()} />
51
+ */
52
+ declare function Calendar({ className, classNames, components, monthPanelLabel, yearPanelLabel, previousYearLabel, nextYearLabel, earlierYearsLabel, laterYearsLabel, ...props }: CalendarProps): react.JSX.Element;
53
+
54
+ export { Calendar, type CalendarLabels, type CalendarProps, Calendar as default };