@eylulg/ui 0.0.0-stage → 1.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 (367) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +328 -2
  3. package/dist/chrome/Anchor.d.ts +3 -0
  4. package/dist/chrome/Anchor.js +14 -0
  5. package/dist/chrome/Anchor.js.map +1 -0
  6. package/dist/chrome/AppShell.d.ts +28 -0
  7. package/dist/chrome/AppShell.js +57 -0
  8. package/dist/chrome/AppShell.js.map +1 -0
  9. package/dist/chrome/BrandLogo.d.ts +13 -0
  10. package/dist/chrome/BrandLogo.js +33 -0
  11. package/dist/chrome/BrandLogo.js.map +1 -0
  12. package/dist/chrome/BrandMark.d.ts +12 -0
  13. package/dist/chrome/BrandMark.js +40 -0
  14. package/dist/chrome/BrandMark.js.map +1 -0
  15. package/dist/chrome/LinkRouter.d.ts +19 -0
  16. package/dist/chrome/LinkRouter.js +28 -0
  17. package/dist/chrome/LinkRouter.js.map +1 -0
  18. package/dist/chrome/MobileMenu.d.ts +19 -0
  19. package/dist/chrome/MobileMenu.js +52 -0
  20. package/dist/chrome/MobileMenu.js.map +1 -0
  21. package/dist/chrome/ProjectSwitcher.d.ts +30 -0
  22. package/dist/chrome/ProjectSwitcher.js +64 -0
  23. package/dist/chrome/ProjectSwitcher.js.map +1 -0
  24. package/dist/chrome/ProjectSwitcherMenu.d.ts +13 -0
  25. package/dist/chrome/ProjectSwitcherMenu.js +50 -0
  26. package/dist/chrome/ProjectSwitcherMenu.js.map +1 -0
  27. package/dist/chrome/SidebarNav.d.ts +34 -0
  28. package/dist/chrome/SidebarNav.js +106 -0
  29. package/dist/chrome/SidebarNav.js.map +1 -0
  30. package/dist/chrome/SiteFooter.d.ts +37 -0
  31. package/dist/chrome/SiteFooter.js +105 -0
  32. package/dist/chrome/SiteFooter.js.map +1 -0
  33. package/dist/chrome/TextSizeToggle.d.ts +11 -0
  34. package/dist/chrome/TextSizeToggle.js +38 -0
  35. package/dist/chrome/TextSizeToggle.js.map +1 -0
  36. package/dist/chrome/ThemeToggle.d.ts +26 -0
  37. package/dist/chrome/ThemeToggle.js +100 -0
  38. package/dist/chrome/ThemeToggle.js.map +1 -0
  39. package/dist/chrome/ThemeToggleMenu.d.ts +16 -0
  40. package/dist/chrome/ThemeToggleMenu.js +42 -0
  41. package/dist/chrome/ThemeToggleMenu.js.map +1 -0
  42. package/dist/chrome/TopNav.d.ts +42 -0
  43. package/dist/chrome/TopNav.js +117 -0
  44. package/dist/chrome/TopNav.js.map +1 -0
  45. package/dist/chrome/brandLogoPath.d.ts +2 -0
  46. package/dist/chrome/brandLogoPath.js +7 -0
  47. package/dist/chrome/brandLogoPath.js.map +1 -0
  48. package/dist/chrome/index.d.ts +28 -0
  49. package/dist/chrome/index.js +15 -0
  50. package/dist/chrome/projects.d.ts +28 -0
  51. package/dist/chrome/projects.js +105 -0
  52. package/dist/chrome/projects.js.map +1 -0
  53. package/dist/chrome/themeChoices.d.ts +6 -0
  54. package/dist/chrome/themeChoices.js +18 -0
  55. package/dist/chrome/themeChoices.js.map +1 -0
  56. package/dist/chrome/themeScript.d.ts +16 -0
  57. package/dist/chrome/themeScript.js +20 -0
  58. package/dist/chrome/themeScript.js.map +1 -0
  59. package/dist/chrome/types.d.ts +17 -0
  60. package/dist/chrome/useTextSize.d.ts +16 -0
  61. package/dist/chrome/useTextSize.js +64 -0
  62. package/dist/chrome/useTextSize.js.map +1 -0
  63. package/dist/chrome/useTheme.d.ts +19 -0
  64. package/dist/chrome/useTheme.js +86 -0
  65. package/dist/chrome/useTheme.js.map +1 -0
  66. package/dist/components/Avatar/Avatar.d.ts +39 -0
  67. package/dist/components/Avatar/Avatar.js +122 -0
  68. package/dist/components/Avatar/Avatar.js.map +1 -0
  69. package/dist/components/Avatar/index.d.ts +2 -0
  70. package/dist/components/Avatar/index.js +2 -0
  71. package/dist/components/Badge/Badge.d.ts +19 -0
  72. package/dist/components/Badge/Badge.js +77 -0
  73. package/dist/components/Badge/Badge.js.map +1 -0
  74. package/dist/components/Badge/index.d.ts +2 -0
  75. package/dist/components/Badge/index.js +2 -0
  76. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +18 -0
  77. package/dist/components/Breadcrumbs/Breadcrumbs.js +40 -0
  78. package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -0
  79. package/dist/components/Breadcrumbs/index.d.ts +2 -0
  80. package/dist/components/Breadcrumbs/index.js +2 -0
  81. package/dist/components/Button/Button.d.ts +39 -0
  82. package/dist/components/Button/Button.js +73 -0
  83. package/dist/components/Button/Button.js.map +1 -0
  84. package/dist/components/Button/buttonStyles.d.ts +21 -0
  85. package/dist/components/Button/buttonStyles.js +32 -0
  86. package/dist/components/Button/buttonStyles.js.map +1 -0
  87. package/dist/components/Button/index.d.ts +2 -0
  88. package/dist/components/Button/index.js +4 -0
  89. package/dist/components/Card/Card.d.ts +47 -0
  90. package/dist/components/Card/Card.js +119 -0
  91. package/dist/components/Card/Card.js.map +1 -0
  92. package/dist/components/Card/index.d.ts +2 -0
  93. package/dist/components/Card/index.js +2 -0
  94. package/dist/components/Chart/BarChart.d.ts +24 -0
  95. package/dist/components/Chart/BarChart.js +327 -0
  96. package/dist/components/Chart/BarChart.js.map +1 -0
  97. package/dist/components/Chart/ChartFrame.d.ts +27 -0
  98. package/dist/components/Chart/ChartFrame.js +80 -0
  99. package/dist/components/Chart/ChartFrame.js.map +1 -0
  100. package/dist/components/Chart/ChartLegend.d.ts +28 -0
  101. package/dist/components/Chart/ChartLegend.js +53 -0
  102. package/dist/components/Chart/ChartLegend.js.map +1 -0
  103. package/dist/components/Chart/ChartTable.d.ts +11 -0
  104. package/dist/components/Chart/ChartTable.js +48 -0
  105. package/dist/components/Chart/ChartTable.js.map +1 -0
  106. package/dist/components/Chart/ChartTooltip.d.ts +33 -0
  107. package/dist/components/Chart/ChartTooltip.js +56 -0
  108. package/dist/components/Chart/ChartTooltip.js.map +1 -0
  109. package/dist/components/Chart/HeatGrid.d.ts +50 -0
  110. package/dist/components/Chart/HeatGrid.js +256 -0
  111. package/dist/components/Chart/HeatGrid.js.map +1 -0
  112. package/dist/components/Chart/LineChart.d.ts +23 -0
  113. package/dist/components/Chart/LineChart.js +248 -0
  114. package/dist/components/Chart/LineChart.js.map +1 -0
  115. package/dist/components/Chart/format.d.ts +24 -0
  116. package/dist/components/Chart/format.js +134 -0
  117. package/dist/components/Chart/format.js.map +1 -0
  118. package/dist/components/Chart/geometry.d.ts +11 -0
  119. package/dist/components/Chart/geometry.js +69 -0
  120. package/dist/components/Chart/geometry.js.map +1 -0
  121. package/dist/components/Chart/index.d.ts +9 -0
  122. package/dist/components/Chart/index.js +6 -0
  123. package/dist/components/Chart/interaction.d.ts +43 -0
  124. package/dist/components/Chart/interaction.js +106 -0
  125. package/dist/components/Chart/interaction.js.map +1 -0
  126. package/dist/components/Chart/labels.d.ts +3 -0
  127. package/dist/components/Chart/labels.js +23 -0
  128. package/dist/components/Chart/labels.js.map +1 -0
  129. package/dist/components/Chart/scale.d.ts +15 -0
  130. package/dist/components/Chart/scale.js +54 -0
  131. package/dist/components/Chart/scale.js.map +1 -0
  132. package/dist/components/Chart/series.d.ts +14 -0
  133. package/dist/components/Chart/series.js +72 -0
  134. package/dist/components/Chart/series.js.map +1 -0
  135. package/dist/components/Chart/summary.d.ts +8 -0
  136. package/dist/components/Chart/summary.js +56 -0
  137. package/dist/components/Chart/summary.js.map +1 -0
  138. package/dist/components/Chart/types.d.ts +50 -0
  139. package/dist/components/Chart/useElementWidth.d.ts +6 -0
  140. package/dist/components/Chart/useElementWidth.js +25 -0
  141. package/dist/components/Chart/useElementWidth.js.map +1 -0
  142. package/dist/components/Checkbox/Checkbox.d.ts +9 -0
  143. package/dist/components/Checkbox/Checkbox.js +36 -0
  144. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  145. package/dist/components/Checkbox/index.d.ts +2 -0
  146. package/dist/components/Checkbox/index.js +2 -0
  147. package/dist/components/CodeBlock/CodeBlock.d.ts +22 -0
  148. package/dist/components/CodeBlock/CodeBlock.js +56 -0
  149. package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
  150. package/dist/components/CodeBlock/index.d.ts +2 -0
  151. package/dist/components/CodeBlock/index.js +2 -0
  152. package/dist/components/Combobox/Combobox.d.ts +34 -0
  153. package/dist/components/Combobox/Combobox.js +106 -0
  154. package/dist/components/Combobox/Combobox.js.map +1 -0
  155. package/dist/components/Combobox/index.d.ts +2 -0
  156. package/dist/components/Combobox/index.js +2 -0
  157. package/dist/components/CommandPalette/CommandPalette.d.ts +74 -0
  158. package/dist/components/CommandPalette/CommandPalette.js +51 -0
  159. package/dist/components/CommandPalette/CommandPalette.js.map +1 -0
  160. package/dist/components/CommandPalette/CommandPaletteOverlay.d.ts +11 -0
  161. package/dist/components/CommandPalette/CommandPaletteOverlay.js +180 -0
  162. package/dist/components/CommandPalette/CommandPaletteOverlay.js.map +1 -0
  163. package/dist/components/CommandPalette/index.d.ts +2 -0
  164. package/dist/components/CommandPalette/index.js +2 -0
  165. package/dist/components/DatePicker/DatePicker.d.ts +25 -0
  166. package/dist/components/DatePicker/DatePicker.js +142 -0
  167. package/dist/components/DatePicker/DatePicker.js.map +1 -0
  168. package/dist/components/DatePicker/index.d.ts +2 -0
  169. package/dist/components/DatePicker/index.js +2 -0
  170. package/dist/components/Dialog/Dialog.d.ts +37 -0
  171. package/dist/components/Dialog/Dialog.js +33 -0
  172. package/dist/components/Dialog/Dialog.js.map +1 -0
  173. package/dist/components/Dialog/DialogOverlay.d.ts +3 -0
  174. package/dist/components/Dialog/DialogOverlay.js +72 -0
  175. package/dist/components/Dialog/DialogOverlay.js.map +1 -0
  176. package/dist/components/Dialog/index.d.ts +2 -0
  177. package/dist/components/Dialog/index.js +2 -0
  178. package/dist/components/Drawer/Drawer.d.ts +36 -0
  179. package/dist/components/Drawer/Drawer.js +33 -0
  180. package/dist/components/Drawer/Drawer.js.map +1 -0
  181. package/dist/components/Drawer/DrawerOverlay.d.ts +3 -0
  182. package/dist/components/Drawer/DrawerOverlay.js +71 -0
  183. package/dist/components/Drawer/DrawerOverlay.js.map +1 -0
  184. package/dist/components/Drawer/index.d.ts +2 -0
  185. package/dist/components/Drawer/index.js +2 -0
  186. package/dist/components/DropdownMenu/DropdownMenu.d.ts +49 -0
  187. package/dist/components/DropdownMenu/DropdownMenu.js +52 -0
  188. package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
  189. package/dist/components/DropdownMenu/DropdownMenuParts.d.ts +6 -0
  190. package/dist/components/DropdownMenu/DropdownMenuParts.js +76 -0
  191. package/dist/components/DropdownMenu/DropdownMenuParts.js.map +1 -0
  192. package/dist/components/DropdownMenu/index.d.ts +2 -0
  193. package/dist/components/DropdownMenu/index.js +2 -0
  194. package/dist/components/EmptyState/EmptyState.d.ts +19 -0
  195. package/dist/components/EmptyState/EmptyState.js +51 -0
  196. package/dist/components/EmptyState/EmptyState.js.map +1 -0
  197. package/dist/components/EmptyState/index.d.ts +2 -0
  198. package/dist/components/EmptyState/index.js +2 -0
  199. package/dist/components/FileDropZone/FileDropZone.d.ts +41 -0
  200. package/dist/components/FileDropZone/FileDropZone.js +94 -0
  201. package/dist/components/FileDropZone/FileDropZone.js.map +1 -0
  202. package/dist/components/FileDropZone/index.d.ts +2 -0
  203. package/dist/components/FileDropZone/index.js +2 -0
  204. package/dist/components/IconButton/IconButton.d.ts +17 -0
  205. package/dist/components/IconButton/IconButton.js +37 -0
  206. package/dist/components/IconButton/IconButton.js.map +1 -0
  207. package/dist/components/IconButton/index.d.ts +2 -0
  208. package/dist/components/IconButton/index.js +2 -0
  209. package/dist/components/Input/Input.d.ts +21 -0
  210. package/dist/components/Input/Input.js +43 -0
  211. package/dist/components/Input/Input.js.map +1 -0
  212. package/dist/components/Input/index.d.ts +2 -0
  213. package/dist/components/Input/index.js +2 -0
  214. package/dist/components/Kbd/Kbd.d.ts +16 -0
  215. package/dist/components/Kbd/Kbd.js +35 -0
  216. package/dist/components/Kbd/Kbd.js.map +1 -0
  217. package/dist/components/Kbd/index.d.ts +2 -0
  218. package/dist/components/Kbd/index.js +2 -0
  219. package/dist/components/PageHeader/PageHeader.d.ts +18 -0
  220. package/dist/components/PageHeader/PageHeader.js +45 -0
  221. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  222. package/dist/components/PageHeader/index.d.ts +2 -0
  223. package/dist/components/PageHeader/index.js +2 -0
  224. package/dist/components/Pagination/Pagination.d.ts +32 -0
  225. package/dist/components/Pagination/Pagination.js +124 -0
  226. package/dist/components/Pagination/Pagination.js.map +1 -0
  227. package/dist/components/Pagination/index.d.ts +2 -0
  228. package/dist/components/Pagination/index.js +2 -0
  229. package/dist/components/Popover/Popover.d.ts +27 -0
  230. package/dist/components/Popover/Popover.js +33 -0
  231. package/dist/components/Popover/Popover.js.map +1 -0
  232. package/dist/components/Popover/PopoverOverlay.d.ts +3 -0
  233. package/dist/components/Popover/PopoverOverlay.js +39 -0
  234. package/dist/components/Popover/PopoverOverlay.js.map +1 -0
  235. package/dist/components/Popover/index.d.ts +2 -0
  236. package/dist/components/Popover/index.js +2 -0
  237. package/dist/components/ProgressBar/ProgressBar.d.ts +19 -0
  238. package/dist/components/ProgressBar/ProgressBar.js +52 -0
  239. package/dist/components/ProgressBar/ProgressBar.js.map +1 -0
  240. package/dist/components/ProgressBar/index.d.ts +2 -0
  241. package/dist/components/ProgressBar/index.js +2 -0
  242. package/dist/components/RadioGroup/RadioGroup.d.ts +14 -0
  243. package/dist/components/RadioGroup/RadioGroup.js +46 -0
  244. package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
  245. package/dist/components/RadioGroup/index.d.ts +2 -0
  246. package/dist/components/RadioGroup/index.js +2 -0
  247. package/dist/components/SegmentedControl/SegmentedControl.d.ts +32 -0
  248. package/dist/components/SegmentedControl/SegmentedControl.js +55 -0
  249. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -0
  250. package/dist/components/SegmentedControl/index.d.ts +2 -0
  251. package/dist/components/SegmentedControl/index.js +2 -0
  252. package/dist/components/Select/Select.d.ts +28 -0
  253. package/dist/components/Select/Select.js +64 -0
  254. package/dist/components/Select/Select.js.map +1 -0
  255. package/dist/components/Select/index.d.ts +2 -0
  256. package/dist/components/Select/index.js +2 -0
  257. package/dist/components/Skeleton/Skeleton.d.ts +13 -0
  258. package/dist/components/Skeleton/Skeleton.js +33 -0
  259. package/dist/components/Skeleton/Skeleton.js.map +1 -0
  260. package/dist/components/Skeleton/index.d.ts +2 -0
  261. package/dist/components/Skeleton/index.js +2 -0
  262. package/dist/components/Spinner/Spinner.d.ts +12 -0
  263. package/dist/components/Spinner/Spinner.js +29 -0
  264. package/dist/components/Spinner/Spinner.js.map +1 -0
  265. package/dist/components/Spinner/index.d.ts +2 -0
  266. package/dist/components/Spinner/index.js +2 -0
  267. package/dist/components/Stat/Stat.d.ts +49 -0
  268. package/dist/components/Stat/Stat.js +125 -0
  269. package/dist/components/Stat/Stat.js.map +1 -0
  270. package/dist/components/Stat/index.d.ts +2 -0
  271. package/dist/components/Stat/index.js +2 -0
  272. package/dist/components/Switch/Switch.d.ts +11 -0
  273. package/dist/components/Switch/Switch.js +39 -0
  274. package/dist/components/Switch/Switch.js.map +1 -0
  275. package/dist/components/Switch/index.d.ts +2 -0
  276. package/dist/components/Switch/index.js +2 -0
  277. package/dist/components/Table/Table.d.ts +41 -0
  278. package/dist/components/Table/Table.js +121 -0
  279. package/dist/components/Table/Table.js.map +1 -0
  280. package/dist/components/Table/index.d.ts +2 -0
  281. package/dist/components/Table/index.js +2 -0
  282. package/dist/components/Tabs/Tabs.d.ts +10 -0
  283. package/dist/components/Tabs/Tabs.js +58 -0
  284. package/dist/components/Tabs/Tabs.js.map +1 -0
  285. package/dist/components/Tabs/index.d.ts +2 -0
  286. package/dist/components/Tabs/index.js +2 -0
  287. package/dist/components/Tag/Tag.d.ts +16 -0
  288. package/dist/components/Tag/Tag.js +48 -0
  289. package/dist/components/Tag/Tag.js.map +1 -0
  290. package/dist/components/Tag/index.d.ts +2 -0
  291. package/dist/components/Tag/index.js +2 -0
  292. package/dist/components/Textarea/Textarea.d.ts +28 -0
  293. package/dist/components/Textarea/Textarea.js +30 -0
  294. package/dist/components/Textarea/Textarea.js.map +1 -0
  295. package/dist/components/Textarea/index.d.ts +2 -0
  296. package/dist/components/Textarea/index.js +2 -0
  297. package/dist/components/Toast/Toast.d.ts +52 -0
  298. package/dist/components/Toast/Toast.js +77 -0
  299. package/dist/components/Toast/Toast.js.map +1 -0
  300. package/dist/components/Toast/ToastItem.d.ts +6 -0
  301. package/dist/components/Toast/ToastItem.js +127 -0
  302. package/dist/components/Toast/ToastItem.js.map +1 -0
  303. package/dist/components/Toast/index.d.ts +2 -0
  304. package/dist/components/Toast/index.js +2 -0
  305. package/dist/components/Tooltip/Tooltip.d.ts +17 -0
  306. package/dist/components/Tooltip/Tooltip.js +38 -0
  307. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  308. package/dist/components/Tooltip/TooltipOverlay.d.ts +5 -0
  309. package/dist/components/Tooltip/TooltipOverlay.js +27 -0
  310. package/dist/components/Tooltip/TooltipOverlay.js.map +1 -0
  311. package/dist/components/Tooltip/index.d.ts +2 -0
  312. package/dist/components/Tooltip/index.js +2 -0
  313. package/dist/fonts.css +21 -0
  314. package/dist/index.d.ts +38 -0
  315. package/dist/index.js +43 -0
  316. package/dist/internal/Field.d.ts +13 -0
  317. package/dist/internal/Field.js +29 -0
  318. package/dist/internal/Field.js.map +1 -0
  319. package/dist/internal/LazyDialogTrigger.d.ts +8 -0
  320. package/dist/internal/LazyDialogTrigger.js +15 -0
  321. package/dist/internal/LazyDialogTrigger.js.map +1 -0
  322. package/dist/internal/PreloadOnIntent.d.ts +15 -0
  323. package/dist/internal/PreloadOnIntent.js +26 -0
  324. package/dist/internal/PreloadOnIntent.js.map +1 -0
  325. package/dist/internal/Spinner.d.ts +3 -0
  326. package/dist/internal/Spinner.js +14 -0
  327. package/dist/internal/Spinner.js.map +1 -0
  328. package/dist/internal/focusRing.d.ts +2 -0
  329. package/dist/internal/focusRing.js +7 -0
  330. package/dist/internal/focusRing.js.map +1 -0
  331. package/dist/internal/lazyModule.d.ts +15 -0
  332. package/dist/internal/lazyModule.js +54 -0
  333. package/dist/internal/lazyModule.js.map +1 -0
  334. package/dist/internal/surfaces.d.ts +8 -0
  335. package/dist/internal/surfaces.js +13 -0
  336. package/dist/internal/surfaces.js.map +1 -0
  337. package/dist/internal/types.d.ts +5 -0
  338. package/dist/internal/useLazyMenuTrigger.d.ts +23 -0
  339. package/dist/internal/useLazyMenuTrigger.js +47 -0
  340. package/dist/internal/useLazyMenuTrigger.js.map +1 -0
  341. package/dist/reset.css +52 -0
  342. package/dist/styles/themes/scales.d.ts +2 -0
  343. package/dist/styles/themes/scales.js +132 -0
  344. package/dist/styles/themes/scales.js.map +1 -0
  345. package/dist/styles/themes/variants.d.ts +41 -0
  346. package/dist/styles/themes/variants.js +180 -0
  347. package/dist/styles/themes/variants.js.map +1 -0
  348. package/dist/styles.css +2 -0
  349. package/dist/theme.css +557 -0
  350. package/dist/themes/all.css +158 -0
  351. package/dist/themes/assistant.css +25 -0
  352. package/dist/themes/control-room.css +25 -0
  353. package/dist/themes/plain-language.css +25 -0
  354. package/dist/themes/portfolio.css +25 -0
  355. package/dist/themes/review.css +25 -0
  356. package/dist/themes/sudoku.css +25 -0
  357. package/dist/themes/tokens.css +25 -0
  358. package/dist/themes/watchlist.css +25 -0
  359. package/dist/themes/workspace.css +25 -0
  360. package/dist/tokens.css +351 -0
  361. package/dist/utils/cx.d.ts +23 -0
  362. package/dist/utils/cx.js +25 -0
  363. package/dist/utils/cx.js.map +1 -0
  364. package/dist/utils/cxLite.d.ts +12 -0
  365. package/dist/utils/cxLite.js +23 -0
  366. package/dist/utils/cxLite.js.map +1 -0
  367. package/package.json +304 -4
@@ -0,0 +1,77 @@
1
+ "use client";
2
+ import { cx } from "../../utils/cx.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ // src/components/Badge/Badge.tsx
5
+ var colors = {
6
+ gray: {
7
+ badge: "bg-tertiary text-secondary ring-default",
8
+ dot: "bg-fg-tertiary"
9
+ },
10
+ brand: {
11
+ badge: "bg-brand-subtle text-brand ring-brand-200 dark:ring-brand-800",
12
+ dot: "bg-fg-brand"
13
+ },
14
+ success: {
15
+ badge: "bg-success-subtle text-success ring-success-200 dark:ring-success-800",
16
+ dot: "bg-fg-success"
17
+ },
18
+ warning: {
19
+ badge: "bg-warning-subtle text-warning ring-warning-200 dark:ring-warning-800",
20
+ dot: "bg-fg-warning"
21
+ },
22
+ error: {
23
+ badge: "bg-error-subtle text-error ring-error-200 dark:ring-error-800",
24
+ dot: "bg-fg-error"
25
+ },
26
+ blue: {
27
+ badge: "bg-blue-subtle text-blue ring-blue",
28
+ dot: "bg-fg-blue"
29
+ },
30
+ purple: {
31
+ badge: "bg-purple-subtle text-purple ring-purple",
32
+ dot: "bg-fg-purple"
33
+ },
34
+ pink: {
35
+ badge: "bg-pink-subtle text-pink ring-pink",
36
+ dot: "bg-fg-pink"
37
+ },
38
+ orange: {
39
+ badge: "bg-orange-subtle text-orange ring-orange",
40
+ dot: "bg-fg-orange"
41
+ },
42
+ indigo: {
43
+ badge: "bg-indigo-subtle text-indigo ring-indigo",
44
+ dot: "bg-fg-indigo"
45
+ }
46
+ };
47
+ var sizes = {
48
+ sm: "h-5 gap-1 px-2 text-xs",
49
+ md: "h-6 gap-1.5 px-2.5 text-sm"
50
+ };
51
+ /**
52
+ * A static, non-interactive status label. Colour never carries the meaning
53
+ * alone: the text says it. Blue, purple, pink, orange and indigo are
54
+ * categorical hues for apps with many statuses; the contrast check covers
55
+ * each of them in light and dark.
56
+ */
57
+ function Badge({ color = "gray", size = "md", dot = false, icon: Icon, className, children, ...props }) {
58
+ return /* @__PURE__ */ jsxs("span", {
59
+ ...props,
60
+ "data-color": color,
61
+ className: cx("inline-flex items-center rounded-full font-medium whitespace-nowrap ring-1 ring-inset", colors[color].badge, sizes[size], className),
62
+ children: [
63
+ dot && /* @__PURE__ */ jsx("span", {
64
+ "aria-hidden": "true",
65
+ className: cx("size-1.5 rounded-full", colors[color].dot)
66
+ }),
67
+ Icon && /* @__PURE__ */ jsx(Icon, {
68
+ "aria-hidden": "true",
69
+ className: "size-3 shrink-0"
70
+ }),
71
+ children
72
+ ]
73
+ });
74
+ }
75
+ export { Badge };
76
+
77
+ //# sourceMappingURL=Badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.js","names":[],"sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\nimport type { IconComponent } from '../../internal/types';\nimport { cx } from '../../utils/cx';\n\nexport type BadgeColor =\n | 'gray'\n | 'brand'\n | 'success'\n | 'warning'\n | 'error'\n | 'blue'\n | 'purple'\n | 'pink'\n | 'orange'\n | 'indigo';\nexport type BadgeSize = 'sm' | 'md';\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n color?: BadgeColor;\n size?: BadgeSize;\n /** Shows a status dot before the label. */\n dot?: boolean;\n icon?: IconComponent;\n children: ReactNode;\n}\n\nconst colors: Record<BadgeColor, { badge: string; dot: string }> = {\n gray: { badge: 'bg-tertiary text-secondary ring-default', dot: 'bg-fg-tertiary' },\n brand: {\n badge: 'bg-brand-subtle text-brand ring-brand-200 dark:ring-brand-800',\n dot: 'bg-fg-brand',\n },\n success: {\n badge: 'bg-success-subtle text-success ring-success-200 dark:ring-success-800',\n dot: 'bg-fg-success',\n },\n warning: {\n badge: 'bg-warning-subtle text-warning ring-warning-200 dark:ring-warning-800',\n dot: 'bg-fg-warning',\n },\n error: {\n badge: 'bg-error-subtle text-error ring-error-200 dark:ring-error-800',\n dot: 'bg-fg-error',\n },\n blue: { badge: 'bg-blue-subtle text-blue ring-blue', dot: 'bg-fg-blue' },\n purple: { badge: 'bg-purple-subtle text-purple ring-purple', dot: 'bg-fg-purple' },\n pink: { badge: 'bg-pink-subtle text-pink ring-pink', dot: 'bg-fg-pink' },\n orange: { badge: 'bg-orange-subtle text-orange ring-orange', dot: 'bg-fg-orange' },\n indigo: { badge: 'bg-indigo-subtle text-indigo ring-indigo', dot: 'bg-fg-indigo' },\n};\n\nconst sizes: Record<BadgeSize, string> = {\n sm: 'h-5 gap-1 px-2 text-xs',\n md: 'h-6 gap-1.5 px-2.5 text-sm',\n};\n\n/**\n * A static, non-interactive status label. Colour never carries the meaning\n * alone: the text says it. Blue, purple, pink, orange and indigo are\n * categorical hues for apps with many statuses; the contrast check covers\n * each of them in light and dark.\n */\nexport function Badge({\n color = 'gray',\n size = 'md',\n dot = false,\n icon: Icon,\n className,\n children,\n ...props\n}: BadgeProps) {\n return (\n <span\n {...props}\n data-color={color}\n className={cx(\n 'inline-flex items-center rounded-full font-medium whitespace-nowrap ring-1 ring-inset',\n colors[color].badge,\n sizes[size],\n className,\n )}\n >\n {dot && (\n <span aria-hidden='true' className={cx('size-1.5 rounded-full', colors[color].dot)} />\n )}\n {Icon && <Icon aria-hidden='true' className='size-3 shrink-0' />}\n {children}\n </span>\n );\n}\n"],"mappings":";;;;AA0BA,IAAM,SAA6D;CACjE,MAAM;EAAE,OAAO;EAA2C,KAAK;CAAiB;CAChF,OAAO;EACL,OAAO;EACP,KAAK;CACP;CACA,SAAS;EACP,OAAO;EACP,KAAK;CACP;CACA,SAAS;EACP,OAAO;EACP,KAAK;CACP;CACA,OAAO;EACL,OAAO;EACP,KAAK;CACP;CACA,MAAM;EAAE,OAAO;EAAsC,KAAK;CAAa;CACvE,QAAQ;EAAE,OAAO;EAA4C,KAAK;CAAe;CACjF,MAAM;EAAE,OAAO;EAAsC,KAAK;CAAa;CACvE,QAAQ;EAAE,OAAO;EAA4C,KAAK;CAAe;CACjF,QAAQ;EAAE,OAAO;EAA4C,KAAK;CAAe;AACnF;AAEA,IAAM,QAAmC;CACvC,IAAI;CACJ,IAAI;AACN;;;;;;;AAQA,SAAgB,MAAM,EACpB,QAAQ,QACR,OAAO,MACP,MAAM,OACN,MAAM,MACN,WACA,UACA,GAAG,SACU;CACb,OACE,qBAAC,QAAD;EACE,GAAI;EACJ,cAAY;EACZ,WAAW,GACT,yFACA,OAAO,MAAM,CAAC,OACd,MAAM,OACN,SACF;EARF,UAAA;GAUG,OACC,oBAAC,QAAD;IAAM,eAAY;IAAO,WAAW,GAAG,yBAAyB,OAAO,MAAM,CAAC,GAAG;GAAI,CAAA;GAEtF,QAAQ,oBAAC,MAAD;IAAM,eAAY;IAAO,WAAU;GAAmB,CAAA;GAC9D;EACG;;AAEV"}
@@ -0,0 +1,2 @@
1
+ export { Badge } from './Badge';
2
+ export type { BadgeProps, BadgeColor, BadgeSize } from './Badge';
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ export { Badge } from "./Badge.js";
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type BreadcrumbsProps as AriaBreadcrumbsProps, type LinkProps } from 'react-aria-components';
3
+ export interface BreadcrumbsProps<T extends object> extends Omit<AriaBreadcrumbsProps<T>, 'className'> {
4
+ /** Accessible name of the navigation landmark. */
5
+ 'aria-label'?: string;
6
+ className?: string;
7
+ }
8
+ /**
9
+ * The trail of pages above the current one, in a navigation landmark. The
10
+ * last item is the current page and is marked with aria-current.
11
+ */
12
+ export declare function Breadcrumbs<T extends object>({ 'aria-label': ariaLabel, className, ...props }: BreadcrumbsProps<T>): import("react").JSX.Element;
13
+ export interface BreadcrumbItemProps extends Pick<LinkProps, 'href' | 'target' | 'rel' | 'routerOptions'> {
14
+ id?: string;
15
+ children: ReactNode;
16
+ }
17
+ /** One level of the trail. Pass `href` for every item except the current page. */
18
+ export declare function BreadcrumbItem({ id, children, ...linkProps }: BreadcrumbItemProps): import("react").JSX.Element;
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import { focusRing } from "../../internal/focusRing.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { ChevronRight } from "lucide-react";
5
+ import { Breadcrumb, Breadcrumbs, Link } from "react-aria-components";
6
+ // src/components/Breadcrumbs/Breadcrumbs.tsx
7
+ var list = "flex flex-wrap items-center gap-1 text-sm";
8
+ var link = ["rounded-xs font-medium text-tertiary data-hovered:text-secondary data-hovered:underline data-current:font-semibold data-current:text-primary data-current:no-underline", focusRing].join(" ");
9
+ /**
10
+ * The trail of pages above the current one, in a navigation landmark. The
11
+ * last item is the current page and is marked with aria-current.
12
+ */
13
+ function Breadcrumbs$1({ "aria-label": ariaLabel = "Breadcrumbs", className, ...props }) {
14
+ return /* @__PURE__ */ jsx("nav", {
15
+ "aria-label": ariaLabel,
16
+ className,
17
+ children: /* @__PURE__ */ jsx(Breadcrumbs, {
18
+ ...props,
19
+ className: list
20
+ })
21
+ });
22
+ }
23
+ /** One level of the trail. Pass `href` for every item except the current page. */
24
+ function BreadcrumbItem({ id, children, ...linkProps }) {
25
+ return /* @__PURE__ */ jsx(Breadcrumb, {
26
+ id,
27
+ className: "flex items-center gap-1",
28
+ children: ({ isCurrent }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Link, {
29
+ ...linkProps,
30
+ className: link,
31
+ children
32
+ }), !isCurrent && /* @__PURE__ */ jsx(ChevronRight, {
33
+ "aria-hidden": "true",
34
+ className: "size-4 shrink-0 text-fg-tertiary"
35
+ })] })
36
+ });
37
+ }
38
+ export { BreadcrumbItem, Breadcrumbs$1 as Breadcrumbs };
39
+
40
+ //# sourceMappingURL=Breadcrumbs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumbs.js","names":["Breadcrumbs","AriaBreadcrumbs","AriaBreadcrumb","_Fragment"],"sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":["import { ChevronRight } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport {\n Breadcrumb as AriaBreadcrumb,\n Breadcrumbs as AriaBreadcrumbs,\n Link,\n type BreadcrumbsProps as AriaBreadcrumbsProps,\n type LinkProps,\n} from 'react-aria-components';\nimport { focusRing } from '../../internal/focusRing';\n\nexport interface BreadcrumbsProps<T extends object> extends Omit<\n AriaBreadcrumbsProps<T>,\n 'className'\n> {\n /** Accessible name of the navigation landmark. */\n 'aria-label'?: string;\n className?: string;\n}\n\nconst list = 'flex flex-wrap items-center gap-1 text-sm';\n\nconst link = [\n 'rounded-xs font-medium text-tertiary data-hovered:text-secondary data-hovered:underline data-current:font-semibold data-current:text-primary data-current:no-underline',\n focusRing,\n].join(' ');\n\n/**\n * The trail of pages above the current one, in a navigation landmark. The\n * last item is the current page and is marked with aria-current.\n */\nexport function Breadcrumbs<T extends object>({\n 'aria-label': ariaLabel = 'Breadcrumbs',\n className,\n ...props\n}: BreadcrumbsProps<T>) {\n return (\n <nav aria-label={ariaLabel} className={className}>\n <AriaBreadcrumbs {...props} className={list} />\n </nav>\n );\n}\n\nexport interface BreadcrumbItemProps extends Pick<\n LinkProps,\n 'href' | 'target' | 'rel' | 'routerOptions'\n> {\n id?: string;\n children: ReactNode;\n}\n\n/** One level of the trail. Pass `href` for every item except the current page. */\nexport function BreadcrumbItem({ id, children, ...linkProps }: BreadcrumbItemProps) {\n return (\n <AriaBreadcrumb id={id} className='flex items-center gap-1'>\n {({ isCurrent }) => (\n <>\n <Link {...linkProps} className={link}>\n {children}\n </Link>\n {!isCurrent && (\n <ChevronRight aria-hidden='true' className='size-4 shrink-0 text-fg-tertiary' />\n )}\n </>\n )}\n </AriaBreadcrumb>\n );\n}\n"],"mappings":";;;;;;AAoBA,IAAM,OAAO;AAEb,IAAM,OAAO,CACX,0KACA,SACF,CAAC,CAAC,KAAK,GAAG;;;;;AAMV,SAAgBA,cAA8B,EAC5C,cAAc,YAAY,eAC1B,WACA,GAAG,SACmB;CACtB,OACE,oBAAC,OAAD;EAAK,cAAY;EAAsB;EACrC,UAAA,oBAACC,aAAD;GAAiB,GAAI;GAAO,WAAW;EAAO,CAAA;CAC3C,CAAA;AAET;;AAWA,SAAgB,eAAe,EAAE,IAAI,UAAU,GAAG,aAAkC;CAClF,OACE,oBAACC,YAAD;EAAoB;EAAI,WAAU;EAC9B,WAAA,EAAE,gBACF,qBAAAC,UAAA,EAAA,UAAA,CACE,oBAAC,MAAD;GAAM,GAAI;GAAW,WAAW;GAC7B;EACG,CAAA,GACL,CAAC,aACA,oBAAC,cAAD;GAAc,eAAY;GAAO,WAAU;EAAoC,CAAA,CAEjF,EAAA,CAAA;CAEU,CAAA;AAEpB"}
@@ -0,0 +1,2 @@
1
+ export { BreadcrumbItem, Breadcrumbs } from './Breadcrumbs';
2
+ export type { BreadcrumbItemProps, BreadcrumbsProps } from './Breadcrumbs';
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ export { BreadcrumbItem, Breadcrumbs } from "./Breadcrumbs.js";
@@ -0,0 +1,39 @@
1
+ import type { ReactNode, Ref } from 'react';
2
+ import { type ButtonProps as AriaButtonProps, type LinkProps as AriaLinkProps } from 'react-aria-components';
3
+ import type { IconComponent } from '../../internal/types';
4
+ import { type ButtonSize, type ButtonVariant } from './buttonStyles';
5
+ export { buttonSizes, buttonStyles, buttonVariants, type ButtonSize, type ButtonVariant, } from './buttonStyles';
6
+ interface ButtonLookProps {
7
+ /**
8
+ * Visual emphasis. Use one primary button per view. `destructive-outline` is
9
+ * the quieter choice for a delete action next to a primary one.
10
+ */
11
+ variant?: ButtonVariant;
12
+ size?: ButtonSize;
13
+ /** Icon rendered before the label. */
14
+ iconLeading?: IconComponent;
15
+ /** Icon rendered after the label. */
16
+ iconTrailing?: IconComponent;
17
+ }
18
+ export interface ButtonProps extends ButtonLookProps, Omit<AriaButtonProps, 'isPending'> {
19
+ /** Shows a spinner, keeps the width and announces the pending state. */
20
+ isLoading?: boolean;
21
+ /** Text announced while loading. Defaults to the button label. */
22
+ loadingLabel?: string;
23
+ href?: undefined;
24
+ /** Ref to the button element, for example to return focus to it. */
25
+ ref?: Ref<HTMLButtonElement>;
26
+ }
27
+ /**
28
+ * A link that looks like a button: pass `href` and Button renders a React Aria
29
+ * Link (an `<a>`), which goes through your router's navigate when the app is
30
+ * wrapped in a React Aria `RouterProvider`. A link cannot be loading.
31
+ */
32
+ export interface LinkButtonProps extends ButtonLookProps, Omit<AriaLinkProps, 'children'> {
33
+ href: string;
34
+ children?: ReactNode;
35
+ /** Ref to the anchor element. */
36
+ ref?: Ref<HTMLAnchorElement>;
37
+ }
38
+ /** A button, or a link that looks like one when `href` is set. */
39
+ export declare function Button(props: ButtonProps | LinkButtonProps): import("react").JSX.Element;
@@ -0,0 +1,73 @@
1
+ "use client";
2
+ import { Spinner } from "../../internal/Spinner.js";
3
+ import { cx } from "../../utils/cx.js";
4
+ import { buttonSizes, buttonStyles, buttonVariants } from "./buttonStyles.js";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { Button, Link, composeRenderProps } from "react-aria-components";
7
+ // src/components/Button/Button.tsx
8
+ /** A button, or a link that looks like one when `href` is set. */
9
+ function Button$1(props) {
10
+ if (props.href !== void 0) return /* @__PURE__ */ jsx(ButtonLink, { ...props });
11
+ return /* @__PURE__ */ jsx(ButtonControl, { ...props });
12
+ }
13
+ function ButtonControl({ variant = "primary", size = "md", isLoading = false, iconLeading: IconLeading, iconTrailing: IconTrailing, loadingLabel, ref, className, children, ...props }) {
14
+ return /* @__PURE__ */ jsx(Button, {
15
+ ...props,
16
+ ref,
17
+ isPending: isLoading,
18
+ "data-variant": variant,
19
+ "data-size": size,
20
+ className: composeRenderProps(className, (consumer) => buttonStyles({
21
+ variant,
22
+ size,
23
+ className: consumer
24
+ })),
25
+ children: composeRenderProps(children, (content, { isPending }) => /* @__PURE__ */ jsxs(Fragment, { children: [isPending && /* @__PURE__ */ jsxs("span", {
26
+ className: "absolute inset-0 flex items-center justify-center",
27
+ children: [/* @__PURE__ */ jsx(Spinner, {}), loadingLabel && /* @__PURE__ */ jsx("span", {
28
+ className: "sr-only",
29
+ children: loadingLabel
30
+ })]
31
+ }), /* @__PURE__ */ jsxs("span", {
32
+ className: cx("inline-flex items-center gap-[inherit]", isPending && "opacity-0"),
33
+ children: [
34
+ IconLeading && /* @__PURE__ */ jsx(IconLeading, {
35
+ "aria-hidden": "true",
36
+ className: "size-4 shrink-0"
37
+ }),
38
+ content,
39
+ IconTrailing && /* @__PURE__ */ jsx(IconTrailing, {
40
+ "aria-hidden": "true",
41
+ className: "size-4 shrink-0"
42
+ })
43
+ ]
44
+ })] }))
45
+ });
46
+ }
47
+ function ButtonLink({ variant = "primary", size = "md", iconLeading: IconLeading, iconTrailing: IconTrailing, ref, className, children, ...props }) {
48
+ return /* @__PURE__ */ jsxs(Link, {
49
+ ...props,
50
+ ref,
51
+ "data-variant": variant,
52
+ "data-size": size,
53
+ className: composeRenderProps(className, (consumer) => buttonStyles({
54
+ variant,
55
+ size,
56
+ className: consumer
57
+ })),
58
+ children: [
59
+ IconLeading && /* @__PURE__ */ jsx(IconLeading, {
60
+ "aria-hidden": "true",
61
+ className: "size-4 shrink-0"
62
+ }),
63
+ children,
64
+ IconTrailing && /* @__PURE__ */ jsx(IconTrailing, {
65
+ "aria-hidden": "true",
66
+ className: "size-4 shrink-0"
67
+ })
68
+ ]
69
+ });
70
+ }
71
+ export { Button$1 as Button, buttonSizes, buttonVariants };
72
+
73
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","names":["Button","AriaButton","_Fragment","AriaLink"],"sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport {\n Button as AriaButton,\n Link as AriaLink,\n composeRenderProps,\n type ButtonProps as AriaButtonProps,\n type LinkProps as AriaLinkProps,\n} from 'react-aria-components';\nimport { Spinner } from '../../internal/Spinner';\nimport type { IconComponent } from '../../internal/types';\nimport { cx } from '../../utils/cx';\nimport { buttonStyles, type ButtonSize, type ButtonVariant } from './buttonStyles';\n\nexport {\n buttonSizes,\n buttonStyles,\n buttonVariants,\n type ButtonSize,\n type ButtonVariant,\n} from './buttonStyles';\n\ninterface ButtonLookProps {\n /**\n * Visual emphasis. Use one primary button per view. `destructive-outline` is\n * the quieter choice for a delete action next to a primary one.\n */\n variant?: ButtonVariant;\n size?: ButtonSize;\n /** Icon rendered before the label. */\n iconLeading?: IconComponent;\n /** Icon rendered after the label. */\n iconTrailing?: IconComponent;\n}\n\nexport interface ButtonProps extends ButtonLookProps, Omit<AriaButtonProps, 'isPending'> {\n /** Shows a spinner, keeps the width and announces the pending state. */\n isLoading?: boolean;\n /** Text announced while loading. Defaults to the button label. */\n loadingLabel?: string;\n href?: undefined;\n /** Ref to the button element, for example to return focus to it. */\n ref?: Ref<HTMLButtonElement>;\n}\n\n/**\n * A link that looks like a button: pass `href` and Button renders a React Aria\n * Link (an `<a>`), which goes through your router's navigate when the app is\n * wrapped in a React Aria `RouterProvider`. A link cannot be loading.\n */\nexport interface LinkButtonProps extends ButtonLookProps, Omit<AriaLinkProps, 'children'> {\n href: string;\n children?: ReactNode;\n /** Ref to the anchor element. */\n ref?: Ref<HTMLAnchorElement>;\n}\n\n/** A button, or a link that looks like one when `href` is set. */\nexport function Button(props: ButtonProps | LinkButtonProps) {\n if (props.href !== undefined) return <ButtonLink {...props} />;\n return <ButtonControl {...props} />;\n}\n\nfunction ButtonControl({\n variant = 'primary',\n size = 'md',\n isLoading = false,\n iconLeading: IconLeading,\n iconTrailing: IconTrailing,\n loadingLabel,\n ref,\n className,\n children,\n ...props\n}: ButtonProps) {\n return (\n <AriaButton\n {...props}\n ref={ref}\n isPending={isLoading}\n data-variant={variant}\n data-size={size}\n className={composeRenderProps(className, (consumer) =>\n buttonStyles({ variant, size, className: consumer }),\n )}\n >\n {composeRenderProps(children, (content, { isPending }): ReactNode => (\n <>\n {isPending && (\n <span className='absolute inset-0 flex items-center justify-center'>\n <Spinner />\n {loadingLabel && <span className='sr-only'>{loadingLabel}</span>}\n </span>\n )}\n <span className={cx('inline-flex items-center gap-[inherit]', isPending && 'opacity-0')}>\n {IconLeading && <IconLeading aria-hidden='true' className='size-4 shrink-0' />}\n {content}\n {IconTrailing && <IconTrailing aria-hidden='true' className='size-4 shrink-0' />}\n </span>\n </>\n ))}\n </AriaButton>\n );\n}\n\nfunction ButtonLink({\n variant = 'primary',\n size = 'md',\n iconLeading: IconLeading,\n iconTrailing: IconTrailing,\n ref,\n className,\n children,\n ...props\n}: LinkButtonProps) {\n return (\n <AriaLink\n {...props}\n ref={ref}\n data-variant={variant}\n data-size={size}\n className={composeRenderProps(className, (consumer) =>\n buttonStyles({ variant, size, className: consumer }),\n )}\n >\n {IconLeading && <IconLeading aria-hidden='true' className='size-4 shrink-0' />}\n {children}\n {IconTrailing && <IconTrailing aria-hidden='true' className='size-4 shrink-0' />}\n </AriaLink>\n );\n}\n"],"mappings":";;;;;;;;AAyDA,SAAgBA,SAAO,OAAsC;CAC3D,IAAI,MAAM,SAAS,KAAA,GAAW,OAAO,oBAAC,YAAD,EAAY,GAAI,MAAQ,CAAA;CAC7D,OAAO,oBAAC,eAAD,EAAe,GAAI,MAAQ,CAAA;AACpC;AAEA,SAAS,cAAc,EACrB,UAAU,WACV,OAAO,MACP,YAAY,OACZ,aAAa,aACb,cAAc,cACd,cACA,KACA,WACA,UACA,GAAG,SACW;CACd,OACE,oBAACC,QAAD;EACE,GAAI;EACC;EACL,WAAW;EACX,gBAAc;EACd,aAAW;EACX,WAAW,mBAAmB,YAAY,aACxC,aAAa;GAAE;GAAS;GAAM,WAAW;EAAS,CAAC,CACrD;EAEC,UAAA,mBAAmB,WAAW,SAAS,EAAE,gBACxC,qBAAAC,UAAA,EAAA,UAAA,CACG,aACC,qBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA,CACE,oBAAC,SAAD,CAAU,CAAA,GACT,gBAAgB,oBAAC,QAAD;IAAM,WAAU;IAAW,UAAA;GAAmB,CAAA,CAC3D;EAER,CAAA,GAAA,qBAAC,QAAD;GAAM,WAAW,GAAG,0CAA0C,aAAa,WAAW;GAAtF,UAAA;IACG,eAAe,oBAAC,aAAD;KAAa,eAAY;KAAO,WAAU;IAAmB,CAAA;IAC5E;IACA,gBAAgB,oBAAC,cAAD;KAAc,eAAY;KAAO,WAAU;IAAmB,CAAA;GAC3E;EACN,CAAA,CAAA,EAAA,CAAA,CACH;CACS,CAAA;AAEhB;AAEA,SAAS,WAAW,EAClB,UAAU,WACV,OAAO,MACP,aAAa,aACb,cAAc,cACd,KACA,WACA,UACA,GAAG,SACe;CAClB,OACE,qBAACC,MAAD;EACE,GAAI;EACC;EACL,gBAAc;EACd,aAAW;EACX,WAAW,mBAAmB,YAAY,aACxC,aAAa;GAAE;GAAS;GAAM,WAAW;EAAS,CAAC,CACrD;EAPF,UAAA;GASG,eAAe,oBAAC,aAAD;IAAa,eAAY;IAAO,WAAU;GAAmB,CAAA;GAC5E;GACA,gBAAgB,oBAAC,cAAD;IAAc,eAAY;IAAO,WAAU;GAAmB,CAAA;EACvE;;AAEd"}
@@ -0,0 +1,21 @@
1
+ export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'destructive' | 'destructive-outline';
2
+ export type ButtonSize = 'sm' | 'md' | 'lg';
3
+ export declare const buttonVariants: Record<ButtonVariant, string>;
4
+ export declare const buttonSizes: Record<ButtonSize, string>;
5
+ export declare const buttonBase: string;
6
+ export interface ButtonStylesOptions {
7
+ variant?: ButtonVariant;
8
+ size?: ButtonSize;
9
+ /** Extra classes, merged so they win over the defaults. */
10
+ className?: string;
11
+ }
12
+ /**
13
+ * The class string of a Button, for a custom element that must look like one,
14
+ * such as a framework link component that cannot be wrapped:
15
+ *
16
+ * <Link href="/new" className={buttonStyles({ variant: 'secondary' })}>New</Link>
17
+ *
18
+ * The hover, pressed and disabled states key off React Aria's data attributes,
19
+ * so use it on a React Aria element; on a plain element only the resting state shows.
20
+ */
21
+ export declare function buttonStyles({ variant, size, className, }?: ButtonStylesOptions): string;
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { focusRing } from "../../internal/focusRing.js";
3
+ import { cx } from "../../utils/cx.js";
4
+ // src/components/Button/buttonStyles.ts
5
+ var buttonVariants = {
6
+ primary: "bg-brand-solid text-on-solid shadow-xs data-hovered:bg-brand-solid-hover data-pressed:bg-brand-solid-hover",
7
+ secondary: "bg-primary text-secondary border border-default shadow-xs data-hovered:bg-hover data-hovered:text-primary data-pressed:bg-tertiary",
8
+ tertiary: "bg-transparent text-secondary data-hovered:bg-hover data-hovered:text-primary data-pressed:bg-tertiary",
9
+ destructive: "bg-error-solid text-on-solid shadow-xs data-hovered:bg-error-solid-hover data-pressed:bg-error-solid-hover",
10
+ "destructive-outline": "bg-primary text-error border border-error shadow-xs data-hovered:bg-error-subtle data-pressed:bg-error-subtle"
11
+ };
12
+ var buttonSizes = {
13
+ sm: "h-control-sm gap-1.5 px-3 text-sm",
14
+ md: "h-control-md gap-2 px-control-x text-sm",
15
+ lg: "h-control-lg gap-2.5 px-5 text-md"
16
+ };
17
+ var buttonBase = cx("touch-target relative inline-flex cursor-pointer items-center justify-center rounded-md font-semibold whitespace-nowrap transition-colors select-none", "data-disabled:cursor-not-allowed data-disabled:border-disabled data-disabled:bg-disabled data-disabled:text-disabled data-disabled:shadow-none", focusRing);
18
+ /**
19
+ * The class string of a Button, for a custom element that must look like one,
20
+ * such as a framework link component that cannot be wrapped:
21
+ *
22
+ * <Link href="/new" className={buttonStyles({ variant: 'secondary' })}>New</Link>
23
+ *
24
+ * The hover, pressed and disabled states key off React Aria's data attributes,
25
+ * so use it on a React Aria element; on a plain element only the resting state shows.
26
+ */
27
+ function buttonStyles({ variant = "primary", size = "md", className } = {}) {
28
+ return cx(buttonBase, buttonVariants[variant], buttonSizes[size], className);
29
+ }
30
+ export { buttonBase, buttonSizes, buttonStyles, buttonVariants };
31
+
32
+ //# sourceMappingURL=buttonStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buttonStyles.js","names":[],"sources":["../../../src/components/Button/buttonStyles.ts"],"sourcesContent":["import { focusRing } from '../../internal/focusRing';\nimport { cx } from '../../utils/cx';\n\nexport type ButtonVariant =\n 'primary' | 'secondary' | 'tertiary' | 'destructive' | 'destructive-outline';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\n\nexport const buttonVariants: Record<ButtonVariant, string> = {\n primary:\n 'bg-brand-solid text-on-solid shadow-xs data-hovered:bg-brand-solid-hover data-pressed:bg-brand-solid-hover',\n secondary:\n 'bg-primary text-secondary border border-default shadow-xs data-hovered:bg-hover data-hovered:text-primary data-pressed:bg-tertiary',\n tertiary:\n 'bg-transparent text-secondary data-hovered:bg-hover data-hovered:text-primary data-pressed:bg-tertiary',\n destructive:\n 'bg-error-solid text-on-solid shadow-xs data-hovered:bg-error-solid-hover data-pressed:bg-error-solid-hover',\n 'destructive-outline':\n 'bg-primary text-error border border-error shadow-xs data-hovered:bg-error-subtle data-pressed:bg-error-subtle',\n};\n\nexport const buttonSizes: Record<ButtonSize, string> = {\n sm: 'h-control-sm gap-1.5 px-3 text-sm',\n md: 'h-control-md gap-2 px-control-x text-sm',\n lg: 'h-control-lg gap-2.5 px-5 text-md',\n};\n\nexport const buttonBase = cx(\n 'touch-target relative inline-flex cursor-pointer items-center justify-center rounded-md font-semibold whitespace-nowrap transition-colors select-none',\n 'data-disabled:cursor-not-allowed data-disabled:border-disabled data-disabled:bg-disabled data-disabled:text-disabled data-disabled:shadow-none',\n focusRing,\n);\n\nexport interface ButtonStylesOptions {\n variant?: ButtonVariant;\n size?: ButtonSize;\n /** Extra classes, merged so they win over the defaults. */\n className?: string;\n}\n\n/**\n * The class string of a Button, for a custom element that must look like one,\n * such as a framework link component that cannot be wrapped:\n *\n * <Link href=\"/new\" className={buttonStyles({ variant: 'secondary' })}>New</Link>\n *\n * The hover, pressed and disabled states key off React Aria's data attributes,\n * so use it on a React Aria element; on a plain element only the resting state shows.\n */\nexport function buttonStyles({\n variant = 'primary',\n size = 'md',\n className,\n}: ButtonStylesOptions = {}): string {\n return cx(buttonBase, buttonVariants[variant], buttonSizes[size], className);\n}\n"],"mappings":";;;;AAOA,IAAa,iBAAgD;CAC3D,SACE;CACF,WACE;CACF,UACE;CACF,aACE;CACF,uBACE;AACJ;AAEA,IAAa,cAA0C;CACrD,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,IAAa,aAAa,GACxB,yJACA,kJACA,SACF;;;;;;;;;;AAkBA,SAAgB,aAAa,EAC3B,UAAU,WACV,OAAO,MACP,cACuB,CAAC,GAAW;CACnC,OAAO,GAAG,YAAY,eAAe,UAAU,YAAY,OAAO,SAAS;AAC7E"}
@@ -0,0 +1,2 @@
1
+ export { Button, buttonVariants, buttonSizes } from './Button';
2
+ export type { ButtonProps, ButtonVariant, ButtonSize } from './Button';
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ import { buttonSizes, buttonVariants } from "./buttonStyles.js";
3
+ import { Button } from "./Button.js";
4
+ export { Button, buttonSizes, buttonVariants };
@@ -0,0 +1,47 @@
1
+ import { type AriaAttributes, type HTMLAttributes, type ReactNode } from 'react';
2
+ import { type LinkProps, type PressEvent } from 'react-aria-components';
3
+ export type CardHeadingLevel = 2 | 3 | 4;
4
+ type AriaProps = Partial<Pick<AriaAttributes, 'aria-label' | 'aria-describedby' | 'aria-keyshortcuts' | 'aria-current' | 'aria-haspopup'>>;
5
+ interface CardAction extends AriaProps {
6
+ href?: string;
7
+ target?: LinkProps['target'];
8
+ rel?: string;
9
+ onPress?: (event: PressEvent) => void;
10
+ }
11
+ export type CardPadding = 'default' | 'none';
12
+ export interface CardProps extends CardAction, HTMLAttributes<HTMLDivElement> {
13
+ children: ReactNode;
14
+ /**
15
+ * `none` removes the padding and clips the content to the rounded corners,
16
+ * for media cards where an image runs to the edge. Give the text parts their
17
+ * own padding, for example `<CardBody className="p-card">`.
18
+ */
19
+ padding?: CardPadding;
20
+ }
21
+ export interface CardHeaderProps {
22
+ title: ReactNode;
23
+ description?: ReactNode;
24
+ /** Secondary actions, such as an IconButton or a DropdownMenu. Stay reachable in an interactive card. */
25
+ actions?: ReactNode;
26
+ headingLevel?: CardHeadingLevel;
27
+ /** `lg` for a few large cards, such as featured projects on a home page. */
28
+ size?: 'md' | 'lg';
29
+ className?: string;
30
+ }
31
+ export interface CardSlotProps {
32
+ children: ReactNode;
33
+ className?: string;
34
+ }
35
+ /**
36
+ * A surface that groups related content. Pass `href` or `onPress` to make
37
+ * the whole card one link or button, named by the CardHeader title; controls
38
+ * in the header actions and the footer stay separately reachable. On an
39
+ * interactive card, `aria-keyshortcuts`, `aria-describedby`, `aria-label`,
40
+ * `aria-current` and `aria-haspopup` go to that link or button, where assistive
41
+ * technology looks for them, instead of to the surrounding div.
42
+ */
43
+ export declare function Card({ href, target, rel, onPress, padding, className, children, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, 'aria-keyshortcuts': ariaKeyShortcuts, 'aria-current': ariaCurrent, 'aria-haspopup': ariaHasPopup, ...props }: CardProps): import("react").JSX.Element;
44
+ export declare function CardHeader({ title, description, actions, headingLevel, size, className, }: CardHeaderProps): import("react").JSX.Element;
45
+ export declare function CardBody({ children, className }: CardSlotProps): import("react").JSX.Element;
46
+ export declare function CardFooter({ children, className }: CardSlotProps): import("react").JSX.Element;
47
+ export {};
@@ -0,0 +1,119 @@
1
+ "use client";
2
+ import { cx } from "../../utils/cx.js";
3
+ import { createContext, useContext } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Button, Link } from "react-aria-components";
6
+ // src/components/Card/Card.tsx
7
+ var CardActionContext = createContext({});
8
+ var headings = {
9
+ 2: "h2",
10
+ 3: "h3",
11
+ 4: "h4"
12
+ };
13
+ var titleSizes = {
14
+ md: "font-display text-md font-semibold text-primary",
15
+ lg: "font-display text-xl font-bold text-primary"
16
+ };
17
+ var surface = "relative flex flex-col rounded-xl border border-subtle bg-elevated text-primary shadow-xs";
18
+ var paddings = {
19
+ default: "gap-stack p-card",
20
+ none: "overflow-hidden"
21
+ };
22
+ var interactiveSurface = "transition-colors hover:border-strong hover:bg-secondary has-[[data-card-action][data-focus-visible]]:outline-2 has-[[data-card-action][data-focus-visible]]:outline-offset-2 has-[[data-card-action][data-focus-visible]]:outline-focus";
23
+ var stretched = "cursor-pointer text-left outline-none after:absolute after:inset-0 after:rounded-xl after:content-[\"\"]";
24
+ /** Lifts nested controls above the stretched link so they stay clickable. */
25
+ var raised = "relative z-10";
26
+ var headerActions = [raised, "flex shrink-0 items-center gap-2"].join(" ");
27
+ /**
28
+ * A surface that groups related content. Pass `href` or `onPress` to make
29
+ * the whole card one link or button, named by the CardHeader title; controls
30
+ * in the header actions and the footer stay separately reachable. On an
31
+ * interactive card, `aria-keyshortcuts`, `aria-describedby`, `aria-label`,
32
+ * `aria-current` and `aria-haspopup` go to that link or button, where assistive
33
+ * technology looks for them, instead of to the surrounding div.
34
+ */
35
+ function Card({ href, target, rel, onPress, padding = "default", className, children, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, "aria-keyshortcuts": ariaKeyShortcuts, "aria-current": ariaCurrent, "aria-haspopup": ariaHasPopup, ...props }) {
36
+ const interactive = Boolean(href ?? onPress);
37
+ const aria = {
38
+ "aria-label": ariaLabel,
39
+ "aria-describedby": ariaDescribedBy,
40
+ "aria-keyshortcuts": ariaKeyShortcuts,
41
+ "aria-current": ariaCurrent,
42
+ "aria-haspopup": ariaHasPopup
43
+ };
44
+ return /* @__PURE__ */ jsx(CardActionContext.Provider, {
45
+ value: interactive ? {
46
+ href,
47
+ target,
48
+ rel,
49
+ onPress,
50
+ ...aria
51
+ } : {},
52
+ children: /* @__PURE__ */ jsx("div", {
53
+ ...props,
54
+ ...interactive ? {} : aria,
55
+ className: cx(surface, paddings[padding], interactive && interactiveSurface, className),
56
+ children
57
+ })
58
+ });
59
+ }
60
+ function CardTitle({ children }) {
61
+ const { href, target, rel, onPress, "aria-keyshortcuts": keyShortcuts, ...aria } = useContext(CardActionContext);
62
+ function applyKeyShortcuts(element) {
63
+ if (element && keyShortcuts) element.setAttribute("aria-keyshortcuts", keyShortcuts);
64
+ }
65
+ if (href) return /* @__PURE__ */ jsx(Link, {
66
+ "data-card-action": true,
67
+ href,
68
+ target,
69
+ rel,
70
+ onPress,
71
+ className: stretched,
72
+ ref: applyKeyShortcuts,
73
+ ...aria,
74
+ children
75
+ });
76
+ if (onPress) return /* @__PURE__ */ jsx(Button, {
77
+ "data-card-action": true,
78
+ onPress,
79
+ className: stretched,
80
+ ref: applyKeyShortcuts,
81
+ ...aria,
82
+ children
83
+ });
84
+ return children;
85
+ }
86
+ function CardHeader({ title, description, actions, headingLevel = 3, size = "md", className }) {
87
+ const Heading = headings[headingLevel];
88
+ return /* @__PURE__ */ jsxs("div", {
89
+ className: cx("flex items-start gap-3", className),
90
+ children: [/* @__PURE__ */ jsxs("div", {
91
+ className: "flex min-w-0 flex-1 flex-col gap-1",
92
+ children: [/* @__PURE__ */ jsx(Heading, {
93
+ className: titleSizes[size],
94
+ children: /* @__PURE__ */ jsx(CardTitle, { children: title })
95
+ }), description && /* @__PURE__ */ jsx("p", {
96
+ className: size === "lg" ? "text-md text-tertiary" : "text-sm text-tertiary",
97
+ children: description
98
+ })]
99
+ }), actions && /* @__PURE__ */ jsx("div", {
100
+ className: headerActions,
101
+ children: actions
102
+ })]
103
+ });
104
+ }
105
+ function CardBody({ children, className }) {
106
+ return /* @__PURE__ */ jsx("div", {
107
+ className: cx("text-sm text-secondary", className),
108
+ children
109
+ });
110
+ }
111
+ function CardFooter({ children, className }) {
112
+ return /* @__PURE__ */ jsx("div", {
113
+ className: cx(raised, "flex flex-wrap items-center justify-end gap-3 border-t border-subtle pt-stack", className),
114
+ children
115
+ });
116
+ }
117
+ export { Card, CardBody, CardFooter, CardHeader };
118
+
119
+ //# sourceMappingURL=Card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.js","names":[],"sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type AriaAttributes,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { Button, Link, type LinkProps, type PressEvent } from 'react-aria-components';\nimport { cx } from '../../utils/cx';\n\nexport type CardHeadingLevel = 2 | 3 | 4;\n\ntype AriaProps = Partial<\n Pick<\n AriaAttributes,\n 'aria-label' | 'aria-describedby' | 'aria-keyshortcuts' | 'aria-current' | 'aria-haspopup'\n >\n>;\n\ninterface CardAction extends AriaProps {\n href?: string;\n target?: LinkProps['target'];\n rel?: string;\n onPress?: (event: PressEvent) => void;\n}\n\nexport type CardPadding = 'default' | 'none';\n\nexport interface CardProps extends CardAction, HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /**\n * `none` removes the padding and clips the content to the rounded corners,\n * for media cards where an image runs to the edge. Give the text parts their\n * own padding, for example `<CardBody className=\"p-card\">`.\n */\n padding?: CardPadding;\n}\n\nexport interface CardHeaderProps {\n title: ReactNode;\n description?: ReactNode;\n /** Secondary actions, such as an IconButton or a DropdownMenu. Stay reachable in an interactive card. */\n actions?: ReactNode;\n headingLevel?: CardHeadingLevel;\n /** `lg` for a few large cards, such as featured projects on a home page. */\n size?: 'md' | 'lg';\n className?: string;\n}\n\nexport interface CardSlotProps {\n children: ReactNode;\n className?: string;\n}\n\nconst CardActionContext = createContext<CardAction>({});\n\nconst headings = { 2: 'h2', 3: 'h3', 4: 'h4' } as const;\n\nconst titleSizes = {\n md: 'font-display text-md font-semibold text-primary',\n lg: 'font-display text-xl font-bold text-primary',\n} as const;\n\nconst surface =\n 'relative flex flex-col rounded-xl border border-subtle bg-elevated text-primary shadow-xs';\nconst paddings: Record<CardPadding, string> = {\n default: 'gap-stack p-card',\n none: 'overflow-hidden',\n};\n\nconst interactiveSurface =\n 'transition-colors hover:border-strong hover:bg-secondary has-[[data-card-action][data-focus-visible]]:outline-2 has-[[data-card-action][data-focus-visible]]:outline-offset-2 has-[[data-card-action][data-focus-visible]]:outline-focus';\n\nconst stretched =\n 'cursor-pointer text-left outline-none after:absolute after:inset-0 after:rounded-xl after:content-[\"\"]';\n\n/** Lifts nested controls above the stretched link so they stay clickable. */\nconst raised = 'relative z-10';\n\nconst headerActions = [raised, 'flex shrink-0 items-center gap-2'].join(' ');\n\n/**\n * A surface that groups related content. Pass `href` or `onPress` to make\n * the whole card one link or button, named by the CardHeader title; controls\n * in the header actions and the footer stay separately reachable. On an\n * interactive card, `aria-keyshortcuts`, `aria-describedby`, `aria-label`,\n * `aria-current` and `aria-haspopup` go to that link or button, where assistive\n * technology looks for them, instead of to the surrounding div.\n */\nexport function Card({\n href,\n target,\n rel,\n onPress,\n padding = 'default',\n className,\n children,\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedBy,\n 'aria-keyshortcuts': ariaKeyShortcuts,\n 'aria-current': ariaCurrent,\n 'aria-haspopup': ariaHasPopup,\n ...props\n}: CardProps) {\n const interactive = Boolean(href ?? onPress);\n const aria: AriaProps = {\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedBy,\n 'aria-keyshortcuts': ariaKeyShortcuts,\n 'aria-current': ariaCurrent,\n 'aria-haspopup': ariaHasPopup,\n };\n return (\n <CardActionContext.Provider value={interactive ? { href, target, rel, onPress, ...aria } : {}}>\n <div\n {...props}\n {...(interactive ? {} : aria)}\n className={cx(surface, paddings[padding], interactive && interactiveSurface, className)}\n >\n {children}\n </div>\n </CardActionContext.Provider>\n );\n}\n\nfunction CardTitle({ children }: { children: ReactNode }) {\n const {\n href,\n target,\n rel,\n onPress,\n 'aria-keyshortcuts': keyShortcuts,\n ...aria\n } = useContext(CardActionContext);\n\n // React Aria drops aria-keyshortcuts from the props it renders, so it is set on the element.\n function applyKeyShortcuts(element: HTMLElement | null) {\n if (element && keyShortcuts) element.setAttribute('aria-keyshortcuts', keyShortcuts);\n }\n\n if (href) {\n return (\n <Link\n data-card-action\n href={href}\n target={target}\n rel={rel}\n onPress={onPress}\n className={stretched}\n ref={applyKeyShortcuts}\n {...aria}\n >\n {children}\n </Link>\n );\n }\n if (onPress) {\n return (\n <Button\n data-card-action\n onPress={onPress}\n className={stretched}\n ref={applyKeyShortcuts}\n {...aria}\n >\n {children}\n </Button>\n );\n }\n return children;\n}\n\nexport function CardHeader({\n title,\n description,\n actions,\n headingLevel = 3,\n size = 'md',\n className,\n}: CardHeaderProps) {\n const Heading = headings[headingLevel];\n return (\n <div className={cx('flex items-start gap-3', className)}>\n <div className='flex min-w-0 flex-1 flex-col gap-1'>\n <Heading className={titleSizes[size]}>\n <CardTitle>{title}</CardTitle>\n </Heading>\n {description && (\n <p className={size === 'lg' ? 'text-md text-tertiary' : 'text-sm text-tertiary'}>\n {description}\n </p>\n )}\n </div>\n {actions && <div className={headerActions}>{actions}</div>}\n </div>\n );\n}\n\nexport function CardBody({ children, className }: CardSlotProps) {\n return <div className={cx('text-sm text-secondary', className)}>{children}</div>;\n}\n\nexport function CardFooter({ children, className }: CardSlotProps) {\n return (\n <div\n className={cx(\n raised,\n 'flex flex-wrap items-center justify-end gap-3 border-t border-subtle pt-stack',\n className,\n )}\n >\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;AAsDA,IAAM,oBAAoB,cAA0B,CAAC,CAAC;AAEtD,IAAM,WAAW;CAAE,GAAG;CAAM,GAAG;CAAM,GAAG;AAAK;AAE7C,IAAM,aAAa;CACjB,IAAI;CACJ,IAAI;AACN;AAEA,IAAM,UACJ;AACF,IAAM,WAAwC;CAC5C,SAAS;CACT,MAAM;AACR;AAEA,IAAM,qBACJ;AAEF,IAAM,YACJ;;AAGF,IAAM,SAAS;AAEf,IAAM,gBAAgB,CAAC,QAAQ,kCAAkC,CAAC,CAAC,KAAK,GAAG;;;;;;;;;AAU3E,SAAgB,KAAK,EACnB,MACA,QACA,KACA,SACA,UAAU,WACV,WACA,UACA,cAAc,WACd,oBAAoB,iBACpB,qBAAqB,kBACrB,gBAAgB,aAChB,iBAAiB,cACjB,GAAG,SACS;CACZ,MAAM,cAAc,QAAQ,QAAQ,OAAO;CAC3C,MAAM,OAAkB;EACtB,cAAc;EACd,oBAAoB;EACpB,qBAAqB;EACrB,gBAAgB;EAChB,iBAAiB;CACnB;CACA,OACE,oBAAC,kBAAkB,UAAnB;EAA4B,OAAO,cAAc;GAAE;GAAM;GAAQ;GAAK;GAAS,GAAG;EAAK,IAAI,CAAC;EAC1F,UAAA,oBAAC,OAAD;GACE,GAAI;GACJ,GAAK,cAAc,CAAC,IAAI;GACxB,WAAW,GAAG,SAAS,SAAS,UAAU,eAAe,oBAAoB,SAAS;GAErF;EACE,CAAA;CACqB,CAAA;AAEhC;AAEA,SAAS,UAAU,EAAE,YAAqC;CACxD,MAAM,EACJ,MACA,QACA,KACA,SACA,qBAAqB,cACrB,GAAG,SACD,WAAW,iBAAiB;CAGhC,SAAS,kBAAkB,SAA6B;EACtD,IAAI,WAAW,cAAc,QAAQ,aAAa,qBAAqB,YAAY;CACrF;CAEA,IAAI,MACF,OACE,oBAAC,MAAD;EACE,oBAAA;EACM;EACE;EACH;EACI;EACT,WAAW;EACX,KAAK;EACL,GAAI;EAEH;CACG,CAAA;CAGV,IAAI,SACF,OACE,oBAAC,QAAD;EACE,oBAAA;EACS;EACT,WAAW;EACX,KAAK;EACL,GAAI;EAEH;CACK,CAAA;CAGZ,OAAO;AACT;AAEA,SAAgB,WAAW,EACzB,OACA,aACA,SACA,eAAe,GACf,OAAO,MACP,aACkB;CAClB,MAAM,UAAU,SAAS;CACzB,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,0BAA0B,SAAS;EAAtD,UAAA,CACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,SAAD;IAAS,WAAW,WAAW;IAC7B,UAAA,oBAAC,WAAD,EAAA,UAAY,MAAiB,CAAA;GACtB,CAAA,GACR,eACC,oBAAC,KAAD;IAAG,WAAW,SAAS,OAAO,0BAA0B;IACrD,UAAA;GACA,CAAA,CAEF;EACJ,CAAA,GAAA,WAAW,oBAAC,OAAD;GAAK,WAAW;GAAgB,UAAA;EAAa,CAAA,CACtD;;AAET;AAEA,SAAgB,SAAS,EAAE,UAAU,aAA4B;CAC/D,OAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,0BAA0B,SAAS;EAAI;CAAc,CAAA;AACjF;AAEA,SAAgB,WAAW,EAAE,UAAU,aAA4B;CACjE,OACE,oBAAC,OAAD;EACE,WAAW,GACT,QACA,iFACA,SACF;EAEC;CACE,CAAA;AAET"}
@@ -0,0 +1,2 @@
1
+ export { Card, CardBody, CardFooter, CardHeader } from './Card';
2
+ export type { CardHeaderProps, CardHeadingLevel, CardProps, CardSlotProps } from './Card';
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ export { Card, CardBody, CardFooter, CardHeader } from "./Card.js";
@@ -0,0 +1,24 @@
1
+ import type { ChartBaseProps, ChartSeries } from './types';
2
+ export interface BarChartProps extends ChartBaseProps {
3
+ /** One name per bar group. */
4
+ categories: string[];
5
+ /**
6
+ * Up to six series get a colour each. Negative values grow down or to the left of zero; `null`
7
+ * leaves the bar out and reads as "No data".
8
+ */
9
+ series: ChartSeries[];
10
+ orientation?: 'vertical' | 'horizontal';
11
+ grouping?: 'grouped' | 'stacked';
12
+ /** Header of the first table column. Defaults to `labels.category`. */
13
+ categoryLabel?: string;
14
+ /** Intl options for values in the axis, tooltip and table. */
15
+ valueFormat?: Intl.NumberFormatOptions;
16
+ /** Prints the value at the end of each bar when it fits. Not used for stacks. */
17
+ hasValueLabels?: boolean;
18
+ }
19
+ /**
20
+ * Bars for comparing categories: vertical or horizontal, grouped or stacked. Bars are at most 24
21
+ * pixels thick with a rounded end and a square base, and stacked segments are 2 pixels apart.
22
+ * Every bar can take focus and shows its group in the tooltip.
23
+ */
24
+ export declare function BarChart({ categories, series, orientation, grouping, categoryLabel, valueFormat, hasValueLabels, title, hideTitle, summary, locale, labels, height, isCard, className, }: BarChartProps): import("react").JSX.Element;