@jordan-mace/chaser-design-system 1.1.0 → 1.2.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 (299) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +16 -0
  2. package/dist/components/Accordion/Accordion.js +108 -0
  3. package/dist/components/Accordion/index.d.ts +1 -0
  4. package/dist/components/Accordion/index.js +2 -0
  5. package/dist/components/Accordion/styles.css.d.ts +7 -0
  6. package/dist/components/Accordion/styles.css.js +66 -0
  7. package/dist/components/Alert/Alert.d.ts +9 -0
  8. package/dist/components/Alert/Alert.js +28 -0
  9. package/dist/components/Alert/index.d.ts +1 -0
  10. package/dist/components/Alert/index.js +2 -0
  11. package/dist/components/Alert/styles.css.d.ts +4 -0
  12. package/dist/components/Alert/styles.css.js +55 -0
  13. package/dist/components/AspectRatio/AspectRatio.d.ts +9 -0
  14. package/dist/components/AspectRatio/AspectRatio.js +27 -0
  15. package/dist/components/AspectRatio/index.d.ts +2 -0
  16. package/dist/components/AspectRatio/index.js +2 -0
  17. package/dist/components/Avatar/Avatar.d.ts +11 -0
  18. package/dist/components/Avatar/Avatar.js +27 -0
  19. package/dist/components/Avatar/index.d.ts +1 -0
  20. package/dist/components/Avatar/index.js +2 -0
  21. package/dist/components/Avatar/styles.css.d.ts +4 -0
  22. package/dist/components/Avatar/styles.css.js +152 -0
  23. package/dist/components/Badge/Badge.d.ts +11 -0
  24. package/dist/components/Badge/Badge.js +13 -0
  25. package/dist/components/Badge/index.d.ts +2 -0
  26. package/dist/components/Badge/index.js +2 -0
  27. package/dist/components/Badge/styles.css.d.ts +5 -0
  28. package/dist/components/Badge/styles.css.js +78 -0
  29. package/dist/components/Box/Box.d.ts +11 -0
  30. package/dist/components/Box/Box.js +53 -0
  31. package/dist/components/Box/index.d.ts +2 -0
  32. package/dist/components/Box/index.js +2 -0
  33. package/dist/components/Box/reset.css.d.ts +1 -0
  34. package/dist/components/Box/reset.css.js +16 -0
  35. package/dist/components/Breadcrumb/Breadcrumb.d.ts +13 -0
  36. package/dist/components/Breadcrumb/Breadcrumb.js +66 -0
  37. package/dist/components/Breadcrumb/index.d.ts +1 -0
  38. package/dist/components/Breadcrumb/index.js +2 -0
  39. package/dist/components/Breadcrumb/styles.css.d.ts +6 -0
  40. package/dist/components/Breadcrumb/styles.css.js +51 -0
  41. package/dist/components/Button/Button.d.ts +9 -0
  42. package/dist/components/Button/Button.js +15 -0
  43. package/dist/components/Button/index.d.ts +1 -0
  44. package/dist/components/Button/index.js +2 -0
  45. package/dist/components/Button/styles.css.d.ts +2 -0
  46. package/dist/components/Button/styles.css.js +31 -0
  47. package/dist/components/Card/Card.d.ts +8 -0
  48. package/dist/components/Card/Card.js +15 -0
  49. package/dist/components/Card/index.d.ts +1 -0
  50. package/dist/components/Card/index.js +2 -0
  51. package/dist/components/Card/styles.css.d.ts +2 -0
  52. package/dist/components/Card/styles.css.js +26 -0
  53. package/dist/components/Checkbox/Checkbox.d.ts +6 -0
  54. package/dist/components/Checkbox/Checkbox.js +50 -0
  55. package/dist/components/Checkbox/index.d.ts +1 -0
  56. package/dist/components/Checkbox/index.js +2 -0
  57. package/dist/components/Checkbox/styles.css.d.ts +3 -0
  58. package/dist/components/Checkbox/styles.css.js +32 -0
  59. package/dist/components/Collapse/Collapse.d.ts +12 -0
  60. package/dist/components/Collapse/Collapse.js +58 -0
  61. package/dist/components/Collapse/index.d.ts +2 -0
  62. package/dist/components/Collapse/index.js +2 -0
  63. package/dist/components/Collapse/styles.css.d.ts +3 -0
  64. package/dist/components/Collapse/styles.css.js +37 -0
  65. package/dist/components/Combobox/Combobox.d.ts +23 -0
  66. package/dist/components/Combobox/Combobox.js +171 -0
  67. package/dist/components/Combobox/index.d.ts +2 -0
  68. package/dist/components/Combobox/index.js +2 -0
  69. package/dist/components/Combobox/styles.css.d.ts +13 -0
  70. package/dist/components/Combobox/styles.css.js +143 -0
  71. package/dist/components/Container/Container.d.ts +11 -0
  72. package/dist/components/Container/Container.js +31 -0
  73. package/dist/components/Container/index.d.ts +2 -0
  74. package/dist/components/Container/index.js +2 -0
  75. package/dist/components/Divider/Divider.d.ts +9 -0
  76. package/dist/components/Divider/Divider.js +14 -0
  77. package/dist/components/Divider/index.d.ts +2 -0
  78. package/dist/components/Divider/index.js +2 -0
  79. package/dist/components/Divider/styles.css.d.ts +4 -0
  80. package/dist/components/Divider/styles.css.js +42 -0
  81. package/dist/components/Drawer/Drawer.d.ts +16 -0
  82. package/dist/components/Drawer/Drawer.js +113 -0
  83. package/dist/components/Drawer/index.d.ts +2 -0
  84. package/dist/components/Drawer/index.js +2 -0
  85. package/dist/components/Drawer/styles.css.d.ts +8 -0
  86. package/dist/components/Drawer/styles.css.js +146 -0
  87. package/dist/components/DropdownMenu/DropdownMenu.d.ts +23 -0
  88. package/dist/components/DropdownMenu/DropdownMenu.js +98 -0
  89. package/dist/components/DropdownMenu/index.d.ts +2 -0
  90. package/dist/components/DropdownMenu/index.js +2 -0
  91. package/dist/components/DropdownMenu/styles.css.d.ts +9 -0
  92. package/dist/components/DropdownMenu/styles.css.js +94 -0
  93. package/dist/components/EmptyState/EmptyState.d.ts +10 -0
  94. package/dist/components/EmptyState/EmptyState.js +32 -0
  95. package/dist/components/EmptyState/index.d.ts +2 -0
  96. package/dist/components/EmptyState/index.js +2 -0
  97. package/dist/components/EmptyState/styles.css.d.ts +5 -0
  98. package/dist/components/EmptyState/styles.css.js +31 -0
  99. package/dist/components/FileUpload/FileUpload.d.ts +27 -0
  100. package/dist/components/FileUpload/FileUpload.js +214 -0
  101. package/dist/components/FileUpload/index.d.ts +2 -0
  102. package/dist/components/FileUpload/index.js +2 -0
  103. package/dist/components/FileUpload/styles.css.d.ts +19 -0
  104. package/dist/components/FileUpload/styles.css.js +146 -0
  105. package/dist/components/Form/Form.d.ts +7 -0
  106. package/dist/components/Form/Form.js +15 -0
  107. package/dist/components/Form/FormInput.d.ts +5 -0
  108. package/dist/components/Form/FormInput.js +15 -0
  109. package/dist/components/Form/index.d.ts +2 -0
  110. package/dist/components/Form/index.js +3 -0
  111. package/dist/components/Form/styles.css.d.ts +2 -0
  112. package/dist/components/Form/styles.css.js +12 -0
  113. package/dist/components/Grid/Grid.d.ts +13 -0
  114. package/dist/components/Grid/Grid.js +30 -0
  115. package/dist/components/Grid/index.d.ts +2 -0
  116. package/dist/components/Grid/index.js +2 -0
  117. package/dist/components/Icon/Icon.d.ts +12 -0
  118. package/dist/components/Icon/Icon.js +29 -0
  119. package/dist/components/Icon/index.d.ts +1 -0
  120. package/dist/components/Icon/index.js +2 -0
  121. package/dist/components/Icon/styles.css.d.ts +1 -0
  122. package/dist/components/Icon/styles.css.js +10 -0
  123. package/dist/components/Input/Input.d.ts +7 -0
  124. package/dist/components/Input/Input.js +38 -0
  125. package/dist/components/Input/index.d.ts +1 -0
  126. package/dist/components/Input/index.js +2 -0
  127. package/dist/components/Input/styles.css.d.ts +2 -0
  128. package/dist/components/Input/styles.css.js +9 -0
  129. package/dist/components/Kbd/Kbd.d.ts +7 -0
  130. package/dist/components/Kbd/Kbd.js +10 -0
  131. package/dist/components/Kbd/index.d.ts +2 -0
  132. package/dist/components/Kbd/index.js +2 -0
  133. package/dist/components/Kbd/styles.css.d.ts +1 -0
  134. package/dist/components/Kbd/styles.css.js +17 -0
  135. package/dist/components/List/List.d.ts +5 -0
  136. package/dist/components/List/List.js +11 -0
  137. package/dist/components/List/ListItem.d.ts +5 -0
  138. package/dist/components/List/ListItem.js +11 -0
  139. package/dist/components/List/index.d.ts +2 -0
  140. package/dist/components/List/index.js +3 -0
  141. package/dist/components/List/styles.css.d.ts +2 -0
  142. package/dist/components/List/styles.css.js +12 -0
  143. package/dist/components/Modal/Modal.d.ts +13 -0
  144. package/dist/components/Modal/Modal.js +71 -0
  145. package/dist/components/Modal/index.d.ts +2 -0
  146. package/dist/components/Modal/index.js +2 -0
  147. package/dist/components/Modal/styles.css.d.ts +7 -0
  148. package/dist/components/Modal/styles.css.js +93 -0
  149. package/dist/components/Navbar/Navbar.d.ts +6 -0
  150. package/dist/components/Navbar/Navbar.js +16 -0
  151. package/dist/components/Navbar/NavbarItem.d.ts +6 -0
  152. package/dist/components/Navbar/NavbarItem.js +12 -0
  153. package/dist/components/Navbar/index.d.ts +2 -0
  154. package/dist/components/Navbar/index.js +3 -0
  155. package/dist/components/Navbar/styles.css.d.ts +2 -0
  156. package/dist/components/Navbar/styles.css.js +4 -0
  157. package/dist/components/NumberInput/NumberInput.d.ts +20 -0
  158. package/dist/components/NumberInput/NumberInput.js +108 -0
  159. package/dist/components/NumberInput/index.d.ts +2 -0
  160. package/dist/components/NumberInput/index.js +2 -0
  161. package/dist/components/NumberInput/styles.css.d.ts +10 -0
  162. package/dist/components/NumberInput/styles.css.js +118 -0
  163. package/dist/components/Pagination/Pagination.d.ts +11 -0
  164. package/dist/components/Pagination/Pagination.js +70 -0
  165. package/dist/components/Pagination/index.d.ts +2 -0
  166. package/dist/components/Pagination/index.js +2 -0
  167. package/dist/components/Pagination/styles.css.d.ts +4 -0
  168. package/dist/components/Pagination/styles.css.js +45 -0
  169. package/dist/components/Popover/Popover.d.ts +18 -0
  170. package/dist/components/Popover/Popover.js +105 -0
  171. package/dist/components/Popover/index.d.ts +2 -0
  172. package/dist/components/Popover/index.js +2 -0
  173. package/dist/components/Popover/styles.css.d.ts +11 -0
  174. package/dist/components/Popover/styles.css.js +192 -0
  175. package/dist/components/Progress/Progress.d.ts +11 -0
  176. package/dist/components/Progress/Progress.js +55 -0
  177. package/dist/components/Progress/index.d.ts +1 -0
  178. package/dist/components/Progress/index.js +2 -0
  179. package/dist/components/Progress/styles.css.d.ts +4 -0
  180. package/dist/components/Progress/styles.css.js +72 -0
  181. package/dist/components/Radio/Radio.d.ts +16 -0
  182. package/dist/components/Radio/Radio.js +60 -0
  183. package/dist/components/Radio/index.d.ts +1 -0
  184. package/dist/components/Radio/index.js +2 -0
  185. package/dist/components/Radio/styles.css.d.ts +5 -0
  186. package/dist/components/Radio/styles.css.js +43 -0
  187. package/dist/components/ScrollArea/ScrollArea.d.ts +11 -0
  188. package/dist/components/ScrollArea/ScrollArea.js +22 -0
  189. package/dist/components/ScrollArea/index.d.ts +2 -0
  190. package/dist/components/ScrollArea/index.js +2 -0
  191. package/dist/components/ScrollArea/styles.css.d.ts +3 -0
  192. package/dist/components/ScrollArea/styles.css.js +26 -0
  193. package/dist/components/Select/Select.d.ts +13 -0
  194. package/dist/components/Select/Select.js +36 -0
  195. package/dist/components/Select/index.d.ts +1 -0
  196. package/dist/components/Select/index.js +2 -0
  197. package/dist/components/Select/styles.css.d.ts +4 -0
  198. package/dist/components/Select/styles.css.js +83 -0
  199. package/dist/components/Separator/Separator.d.ts +9 -0
  200. package/dist/components/Separator/Separator.js +13 -0
  201. package/dist/components/Separator/index.d.ts +2 -0
  202. package/dist/components/Separator/index.js +2 -0
  203. package/dist/components/Separator/styles.css.d.ts +4 -0
  204. package/dist/components/Separator/styles.css.js +29 -0
  205. package/dist/components/Skeleton/Skeleton.d.ts +14 -0
  206. package/dist/components/Skeleton/Skeleton.js +28 -0
  207. package/dist/components/Skeleton/index.d.ts +2 -0
  208. package/dist/components/Skeleton/index.js +2 -0
  209. package/dist/components/Skeleton/styles.css.d.ts +4 -0
  210. package/dist/components/Skeleton/styles.css.js +65 -0
  211. package/dist/components/Spinner/Spinner.d.ts +10 -0
  212. package/dist/components/Spinner/Spinner.js +14 -0
  213. package/dist/components/Spinner/index.d.ts +2 -0
  214. package/dist/components/Spinner/index.js +2 -0
  215. package/dist/components/Spinner/styles.css.d.ts +4 -0
  216. package/dist/components/Spinner/styles.css.js +60 -0
  217. package/dist/components/Stack/Stack.d.ts +16 -0
  218. package/dist/components/Stack/Stack.js +39 -0
  219. package/dist/components/Stack/index.d.ts +2 -0
  220. package/dist/components/Stack/index.js +2 -0
  221. package/dist/components/Stepper/Stepper.d.ts +18 -0
  222. package/dist/components/Stepper/Stepper.js +70 -0
  223. package/dist/components/Stepper/index.d.ts +2 -0
  224. package/dist/components/Stepper/index.js +2 -0
  225. package/dist/components/Stepper/styles.css.d.ts +14 -0
  226. package/dist/components/Stepper/styles.css.js +105 -0
  227. package/dist/components/Table/Table.d.ts +42 -0
  228. package/dist/components/Table/Table.js +65 -0
  229. package/dist/components/Table/index.d.ts +1 -0
  230. package/dist/components/Table/index.js +2 -0
  231. package/dist/components/Table/styles.css.d.ts +8 -0
  232. package/dist/components/Table/styles.css.js +50 -0
  233. package/dist/components/Tabs/Tabs.d.ts +29 -0
  234. package/dist/components/Tabs/Tabs.js +71 -0
  235. package/dist/components/Tabs/index.d.ts +1 -0
  236. package/dist/components/Tabs/index.js +2 -0
  237. package/dist/components/Tabs/styles.css.d.ts +6 -0
  238. package/dist/components/Tabs/styles.css.js +101 -0
  239. package/dist/components/Tag/Tag.d.ts +16 -0
  240. package/dist/components/Tag/Tag.js +40 -0
  241. package/dist/components/Tag/index.d.ts +1 -0
  242. package/dist/components/Tag/index.js +2 -0
  243. package/dist/components/Tag/styles.css.d.ts +3 -0
  244. package/dist/components/Tag/styles.css.js +94 -0
  245. package/dist/components/Text/Header.d.ts +8 -0
  246. package/dist/components/Text/Header.js +12 -0
  247. package/dist/components/Text/P.d.ts +7 -0
  248. package/dist/components/Text/P.js +12 -0
  249. package/dist/components/Text/index.d.ts +2 -0
  250. package/dist/components/Text/index.js +3 -0
  251. package/dist/components/Text/styles.css.d.ts +2 -0
  252. package/dist/components/Text/styles.css.js +14 -0
  253. package/dist/components/TextArea/TextArea.d.ts +7 -0
  254. package/dist/components/TextArea/TextArea.js +38 -0
  255. package/dist/components/TextArea/index.d.ts +2 -0
  256. package/dist/components/TextArea/index.js +2 -0
  257. package/dist/components/TextArea/styles.css.d.ts +2 -0
  258. package/dist/components/TextArea/styles.css.js +11 -0
  259. package/dist/components/Toast/Toast.d.ts +34 -0
  260. package/dist/components/Toast/Toast.js +236 -0
  261. package/dist/components/Toast/index.d.ts +1 -0
  262. package/dist/components/Toast/index.js +2 -0
  263. package/dist/components/Toast/styles.css.d.ts +21 -0
  264. package/dist/components/Toast/styles.css.js +217 -0
  265. package/dist/components/Toggle/Toggle.d.ts +10 -0
  266. package/dist/components/Toggle/Toggle.js +62 -0
  267. package/dist/components/Toggle/index.d.ts +2 -0
  268. package/dist/components/Toggle/index.js +2 -0
  269. package/dist/components/Toggle/styles.css.d.ts +12 -0
  270. package/dist/components/Toggle/styles.css.js +119 -0
  271. package/dist/components/Tooltip/Tooltip.d.ts +10 -0
  272. package/dist/components/Tooltip/Tooltip.js +41 -0
  273. package/dist/components/Tooltip/index.d.ts +2 -0
  274. package/dist/components/Tooltip/index.js +2 -0
  275. package/dist/components/Tooltip/styles.css.d.ts +8 -0
  276. package/dist/components/Tooltip/styles.css.js +87 -0
  277. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +8 -0
  278. package/dist/components/VisuallyHidden/VisuallyHidden.js +8 -0
  279. package/dist/components/VisuallyHidden/index.d.ts +2 -0
  280. package/dist/components/VisuallyHidden/index.js +2 -0
  281. package/dist/components/VisuallyHidden/styles.css.d.ts +1 -0
  282. package/dist/components/VisuallyHidden/styles.css.js +13 -0
  283. package/dist/components/index.d.ts +68 -0
  284. package/dist/components/index.js +48 -0
  285. package/dist/index.d.ts +1 -0
  286. package/dist/index.js +1 -0
  287. package/dist/layers.css.js +9 -0
  288. package/dist/reset.css.js +57 -0
  289. package/dist/styles/layers.css.d.ts +3 -0
  290. package/dist/styles/layers.css.js +9 -0
  291. package/dist/styles/reset.css.js +57 -0
  292. package/dist/styles/sprinkles.css.d.ts +241 -0
  293. package/dist/styles/sprinkles.css.js +220 -0
  294. package/dist/styles/theme.css.d.ts +38 -0
  295. package/dist/styles/theme.css.js +50 -0
  296. package/dist/styles/utils.d.ts +2 -0
  297. package/dist/styles/utils.js +8 -0
  298. package/dist/theme.css.js +50 -0
  299. package/package.json +4 -4
@@ -0,0 +1,78 @@
1
+ import { styleVariants } from "@vanilla-extract/css";
2
+ import { vars } from "../../styles/theme.css.js";
3
+ import { styleWithLayer } from "../../styles/utils.js";
4
+ const badgeVariants = styleVariants({
5
+ default: {
6
+ backgroundColor: vars.colors.borderDefault,
7
+ color: vars.colors.textPrimary
8
+ },
9
+ success: {
10
+ backgroundColor: vars.colors.alertSuccessBackground,
11
+ color: vars.colors.alertSuccessText,
12
+ border: `1px solid ${vars.colors.alertSuccessBorder}`
13
+ },
14
+ warning: {
15
+ backgroundColor: vars.colors.alertWarningBackground,
16
+ color: vars.colors.alertWarningText,
17
+ border: `1px solid ${vars.colors.alertWarningBorder}`
18
+ },
19
+ error: {
20
+ backgroundColor: vars.colors.alertErrorBackground,
21
+ color: vars.colors.alertErrorText,
22
+ border: `1px solid ${vars.colors.alertErrorBorder}`
23
+ },
24
+ info: {
25
+ backgroundColor: vars.colors.alertInfoBackground,
26
+ color: vars.colors.alertInfoText,
27
+ border: `1px solid ${vars.colors.alertInfoBorder}`
28
+ }
29
+ });
30
+ const badgeSizes = styleVariants({
31
+ small: {
32
+ fontSize: '0.7rem',
33
+ padding: '0.125rem 0.375rem',
34
+ borderRadius: '0.25rem'
35
+ },
36
+ medium: {
37
+ fontSize: '0.75rem',
38
+ padding: '0.25rem 0.5rem',
39
+ borderRadius: '0.375rem'
40
+ },
41
+ large: {
42
+ fontSize: '0.875rem',
43
+ padding: '0.375rem 0.625rem',
44
+ borderRadius: '0.5rem'
45
+ }
46
+ });
47
+ const badge = styleWithLayer({
48
+ display: 'inline-flex',
49
+ alignItems: 'center',
50
+ justifyContent: 'center',
51
+ fontWeight: '500',
52
+ whiteSpace: 'nowrap',
53
+ fontFamily: vars.fontFamily.body,
54
+ transition: 'background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out'
55
+ });
56
+ const badgeDot = styleWithLayer({
57
+ width: '0.5rem',
58
+ height: '0.5rem',
59
+ borderRadius: '50%',
60
+ display: 'inline-block',
61
+ padding: 0,
62
+ minWidth: 'auto'
63
+ });
64
+ const badgeDotSizes = styleVariants({
65
+ small: {
66
+ width: '0.375rem',
67
+ height: '0.375rem'
68
+ },
69
+ medium: {
70
+ width: '0.5rem',
71
+ height: '0.5rem'
72
+ },
73
+ large: {
74
+ width: '0.625rem',
75
+ height: '0.625rem'
76
+ }
77
+ });
78
+ export { badge, badgeDot, badgeDotSizes, badgeSizes, badgeVariants };
@@ -0,0 +1,11 @@
1
+ import { type Sprinkles } from '../../styles/sprinkles.css';
2
+ import React from 'react';
3
+ type BoxProps = Sprinkles & {
4
+ as?: React.ElementType;
5
+ children?: React.ReactNode;
6
+ className?: string;
7
+ [key: string]: unknown;
8
+ };
9
+ declare const Box: React.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & React.RefAttributes<HTMLElement>>;
10
+ export default Box;
11
+ export type { BoxProps };
@@ -0,0 +1,53 @@
1
+ import clsx from "clsx";
2
+ import { sprinkles } from "../../styles/sprinkles.css.js";
3
+ import { reset as external_reset_css_js_reset } from "./reset.css.js";
4
+ import react, { forwardRef } from "react";
5
+ const Box = /*#__PURE__*/ forwardRef((props, ref)=>{
6
+ const { as: Component = 'div', className, children, ...rest } = props;
7
+ const sprinkleProps = {};
8
+ const otherProps = {
9
+ ref
10
+ };
11
+ const sprinkleKeys = new Set([
12
+ 'display',
13
+ 'width',
14
+ 'height',
15
+ 'flexDirection',
16
+ 'justifyContent',
17
+ 'alignItems',
18
+ 'paddingTop',
19
+ 'paddingBottom',
20
+ 'paddingLeft',
21
+ 'paddingRight',
22
+ 'marginLeft',
23
+ 'marginRight',
24
+ 'marginTop',
25
+ 'marginBottom',
26
+ 'borderLeft',
27
+ 'borderRight',
28
+ 'borderTop',
29
+ 'borderBottom',
30
+ 'borderRadius',
31
+ 'gap',
32
+ 'padding',
33
+ 'border',
34
+ 'paddingX',
35
+ 'paddingY',
36
+ 'marginX',
37
+ 'marginY',
38
+ 'placeItems',
39
+ 'color',
40
+ 'background'
41
+ ]);
42
+ Object.entries(rest).forEach(([key, value])=>{
43
+ if (sprinkleKeys.has(key)) sprinkleProps[key] = value;
44
+ else otherProps[key] = value;
45
+ });
46
+ return /*#__PURE__*/ react.createElement(Component, {
47
+ className: clsx(external_reset_css_js_reset, sprinkles(sprinkleProps), className),
48
+ ...otherProps
49
+ }, children);
50
+ });
51
+ Box.displayName = 'Box';
52
+ const Box_Box = Box;
53
+ export { Box_Box as default };
@@ -0,0 +1,2 @@
1
+ export { default } from './Box';
2
+ export type { BoxProps } from './Box';
@@ -0,0 +1,2 @@
1
+ import Box from "./Box.js";
2
+ export { Box as default };
@@ -0,0 +1 @@
1
+ export declare const reset: string;
@@ -0,0 +1,16 @@
1
+ import { style } from "@vanilla-extract/css";
2
+ import { componentsLayer } from "../../styles/layers.css.js";
3
+ const reset_css_reset = style({
4
+ '@layer': {
5
+ [componentsLayer]: {
6
+ margin: 0,
7
+ padding: 0,
8
+ border: 0,
9
+ boxSizing: 'border-box',
10
+ fontSize: '100%',
11
+ font: 'inherit',
12
+ verticalAlign: 'baseline'
13
+ }
14
+ }
15
+ });
16
+ export { reset_css_reset as reset };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ type BreadcrumbItem = {
3
+ label: string;
4
+ href?: string;
5
+ current?: boolean;
6
+ };
7
+ type BreadcrumbProps = {
8
+ items: BreadcrumbItem[];
9
+ className?: string;
10
+ separator?: string;
11
+ };
12
+ declare const Breadcrumb: ({ items, className, separator, }: BreadcrumbProps) => React.JSX.Element;
13
+ export default Breadcrumb;
@@ -0,0 +1,66 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import "react";
4
+ import { breadcrumb, breadcrumbCurrent, breadcrumbItem, breadcrumbLink, breadcrumbList, breadcrumbSeparator } from "./styles.css.js";
5
+ import Box from "../Box/index.js";
6
+ const Breadcrumb = ({ items, className, separator = '/' })=>/*#__PURE__*/ jsx(Box, {
7
+ as: "nav",
8
+ "aria-label": "Breadcrumb",
9
+ className: clsx(breadcrumb, className),
10
+ display: "flex",
11
+ alignItems: "center",
12
+ gap: "small",
13
+ fontSize: "14px",
14
+ children: /*#__PURE__*/ jsx(Box, {
15
+ as: "ol",
16
+ className: breadcrumbList,
17
+ display: "flex",
18
+ alignItems: "center",
19
+ style: {
20
+ listStyle: 'none'
21
+ },
22
+ margin: "none",
23
+ padding: "none",
24
+ gap: "small",
25
+ children: items.map((item, index)=>/*#__PURE__*/ jsxs(Box, {
26
+ as: "li",
27
+ className: breadcrumbItem,
28
+ display: "flex",
29
+ alignItems: "center",
30
+ children: [
31
+ item.href && !item.current ? /*#__PURE__*/ jsx(Box, {
32
+ as: "a",
33
+ href: item.href,
34
+ className: breadcrumbLink,
35
+ display: "inline",
36
+ alignItems: "center",
37
+ color: "c5-600",
38
+ fontSize: "14px",
39
+ textDecoration: "none",
40
+ children: item.label
41
+ }) : /*#__PURE__*/ jsx(Box, {
42
+ as: "span",
43
+ className: breadcrumbCurrent,
44
+ display: "inline",
45
+ alignItems: "center",
46
+ color: "c5-700",
47
+ fontSize: "14px",
48
+ fontWeight: "500",
49
+ children: item.label
50
+ }),
51
+ index < items.length - 1 && /*#__PURE__*/ jsx(Box, {
52
+ as: "span",
53
+ className: breadcrumbSeparator,
54
+ color: "c5-500",
55
+ fontSize: "12px",
56
+ style: {
57
+ userSelect: 'none'
58
+ },
59
+ children: separator
60
+ })
61
+ ]
62
+ }, index))
63
+ })
64
+ });
65
+ const Breadcrumb_Breadcrumb = Breadcrumb;
66
+ export { Breadcrumb_Breadcrumb as default };
@@ -0,0 +1 @@
1
+ export { default as Breadcrumb } from './Breadcrumb';
@@ -0,0 +1,2 @@
1
+ import Breadcrumb from "./Breadcrumb.js";
2
+ export { Breadcrumb };
@@ -0,0 +1,6 @@
1
+ export declare const breadcrumb: string;
2
+ export declare const breadcrumbList: string;
3
+ export declare const breadcrumbItem: string;
4
+ export declare const breadcrumbLink: string;
5
+ export declare const breadcrumbSeparator: string;
6
+ export declare const breadcrumbCurrent: string;
@@ -0,0 +1,51 @@
1
+ import { style } from "@vanilla-extract/css";
2
+ import { vars } from "../../styles/theme.css.js";
3
+ import { styleWithLayer } from "../../styles/utils.js";
4
+ const breadcrumb = styleWithLayer({
5
+ display: 'flex',
6
+ alignItems: 'center',
7
+ gap: '4px',
8
+ fontFamily: vars.fontFamily.body,
9
+ fontSize: '14px'
10
+ });
11
+ const breadcrumbList = style({
12
+ display: 'flex',
13
+ alignItems: 'center',
14
+ listStyle: 'none',
15
+ margin: 0,
16
+ padding: 0,
17
+ gap: '4px'
18
+ });
19
+ const breadcrumbItem = style({
20
+ display: 'flex',
21
+ alignItems: 'center'
22
+ });
23
+ const breadcrumbLink = style({
24
+ display: 'inline-flex',
25
+ alignItems: 'center',
26
+ color: vars.colors.textSecondary,
27
+ textDecoration: 'none',
28
+ fontSize: '14px',
29
+ ':hover': {
30
+ color: vars.colors.buttonBackgroundPrimary,
31
+ textDecoration: 'underline'
32
+ },
33
+ ':focus-visible': {
34
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
35
+ outlineOffset: '2px',
36
+ borderRadius: '4px'
37
+ }
38
+ });
39
+ const breadcrumbSeparator = style({
40
+ color: vars.colors.textDisabled,
41
+ fontSize: '12px',
42
+ userSelect: 'none'
43
+ });
44
+ const breadcrumbCurrent = style({
45
+ display: 'inline-flex',
46
+ alignItems: 'center',
47
+ color: vars.colors.textPrimary,
48
+ fontSize: '14px',
49
+ fontWeight: '500'
50
+ });
51
+ export { breadcrumb, breadcrumbCurrent, breadcrumbItem, breadcrumbLink, breadcrumbList, breadcrumbSeparator };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
3
+ variant: 'primary' | 'secondary';
4
+ children?: React.ReactNode;
5
+ label?: string;
6
+ fullWidth?: boolean;
7
+ };
8
+ declare const Button: ({ label, ...props }: ButtonProps) => React.JSX.Element;
9
+ export default Button;
@@ -0,0 +1,15 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { button as external_styles_css_js_button, buttonVariants } from "./styles.css.js";
4
+ import "react";
5
+ import Box from "../Box/index.js";
6
+ const Button = ({ label, ...props })=>/*#__PURE__*/ jsx(Box, {
7
+ as: "button",
8
+ borderRadius: "large",
9
+ width: props.fullWidth ? '100%' : void 0,
10
+ className: clsx(buttonVariants[props.variant], external_styles_css_js_button, props.className),
11
+ ...props,
12
+ children: props.children || label
13
+ });
14
+ const Button_Button = Button;
15
+ export { Button_Button as default };
@@ -0,0 +1 @@
1
+ export { default as Button } from './Button';
@@ -0,0 +1,2 @@
1
+ import Button from "./Button.js";
2
+ export { Button };
@@ -0,0 +1,2 @@
1
+ export declare const buttonVariants: Record<"primary" | "secondary", string>;
2
+ export declare const button: string;
@@ -0,0 +1,31 @@
1
+ import { styleVariants } from "@vanilla-extract/css";
2
+ import { vars } from "../../styles/theme.css.js";
3
+ import { styleWithLayer } from "../../styles/utils.js";
4
+ const buttonVariants = styleVariants({
5
+ primary: {
6
+ backgroundColor: vars.colors.buttonBackgroundPrimary,
7
+ color: vars.colors.buttonTextPrimary,
8
+ ':focus-visible': {
9
+ backgroundColor: vars.colors.buttonBackgroundFocusedPrimary
10
+ },
11
+ ':hover': {
12
+ backgroundColor: vars.colors.buttonBackgroundFocusedPrimary
13
+ }
14
+ },
15
+ secondary: {
16
+ backgroundColor: vars.colors.buttonBackgroundSecondary,
17
+ color: vars.colors.buttonTextSecondary,
18
+ ':focus-visible': {
19
+ backgroundColor: vars.colors.buttonBackgroundFocusedSecondary
20
+ },
21
+ ':hover': {
22
+ backgroundColor: vars.colors.buttonBackgroundFocusedSecondary
23
+ }
24
+ }
25
+ });
26
+ const styles_css_button = styleWithLayer({
27
+ padding: '1rem',
28
+ borderRadius: '1rem',
29
+ border: 0
30
+ });
31
+ export { styles_css_button as button, buttonVariants };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type CardProps = React.HTMLAttributes<HTMLDivElement> & {
3
+ variant?: 'elevated' | 'outlined' | 'filled';
4
+ children?: React.ReactNode;
5
+ padding?: 'none' | 'small' | 'medium' | 'large';
6
+ };
7
+ declare const Card: ({ variant, padding, ...props }: CardProps) => React.JSX.Element;
8
+ export default Card;
@@ -0,0 +1,15 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { card, cardVariants } from "./styles.css.js";
4
+ import "react";
5
+ import Box from "../Box/index.js";
6
+ const Card = ({ variant = 'elevated', padding = 'medium', ...props })=>/*#__PURE__*/ jsx(Box, {
7
+ as: "div",
8
+ borderRadius: "large",
9
+ padding: 'none' !== padding ? padding : void 0,
10
+ className: clsx(cardVariants[variant], card, props.className),
11
+ ...props,
12
+ children: props.children
13
+ });
14
+ const Card_Card = Card;
15
+ export { Card_Card as default };
@@ -0,0 +1 @@
1
+ export { default as Card } from './Card';
@@ -0,0 +1,2 @@
1
+ import Card from "./Card.js";
2
+ export { Card };
@@ -0,0 +1,2 @@
1
+ export declare const cardVariants: Record<"filled" | "elevated" | "outlined", string>;
2
+ export declare const card: string;
@@ -0,0 +1,26 @@
1
+ import { styleVariants } from "@vanilla-extract/css";
2
+ import { vars } from "../../styles/theme.css.js";
3
+ import { styleWithLayer } from "../../styles/utils.js";
4
+ const cardVariants = styleVariants({
5
+ elevated: {
6
+ backgroundColor: vars.colors.backgroundDefault,
7
+ boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)',
8
+ border: 'none'
9
+ },
10
+ outlined: {
11
+ backgroundColor: vars.colors.backgroundDefault,
12
+ border: `1px solid ${vars.colors.borderDefault}`,
13
+ boxShadow: 'none'
14
+ },
15
+ filled: {
16
+ backgroundColor: vars.colors.backgroundMuted,
17
+ border: 'none',
18
+ boxShadow: 'none'
19
+ }
20
+ });
21
+ const card = styleWithLayer({
22
+ display: 'block',
23
+ position: 'relative',
24
+ transition: 'all 0.2s ease-in-out'
25
+ });
26
+ export { card, cardVariants };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> & {
3
+ label?: string;
4
+ indeterminate?: boolean;
5
+ } & React.RefAttributes<HTMLInputElement>>;
6
+ export default Checkbox;
@@ -0,0 +1,50 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { forwardRef, useEffect, useRef } from "react";
4
+ import { checkboxContainer, checkboxInput, checkboxLabel } from "./styles.css.js";
5
+ import Box from "../Box/index.js";
6
+ const Checkbox = /*#__PURE__*/ forwardRef(({ label, className, indeterminate, ...props }, ref)=>{
7
+ const inputRef = useRef(null);
8
+ const combinedRef = (node)=>{
9
+ if ('function' == typeof ref) ref(node);
10
+ else if (ref) ref.current = node;
11
+ inputRef.current = node;
12
+ };
13
+ useEffect(()=>{
14
+ if (inputRef.current) inputRef.current.indeterminate = !!indeterminate;
15
+ }, [
16
+ indeterminate
17
+ ]);
18
+ return /*#__PURE__*/ jsxs(Box, {
19
+ as: "label",
20
+ className: clsx(checkboxContainer, className),
21
+ display: "flex",
22
+ alignItems: "center",
23
+ gap: "small",
24
+ cursor: "pointer",
25
+ style: {
26
+ userSelect: 'none'
27
+ },
28
+ children: [
29
+ /*#__PURE__*/ jsx(Box, {
30
+ as: "input",
31
+ type: "checkbox",
32
+ ref: combinedRef,
33
+ className: checkboxInput,
34
+ style: {
35
+ width: '18px',
36
+ height: '18px'
37
+ },
38
+ ...props
39
+ }),
40
+ label && /*#__PURE__*/ jsx(Box, {
41
+ as: "span",
42
+ className: checkboxLabel,
43
+ children: label
44
+ })
45
+ ]
46
+ });
47
+ });
48
+ Checkbox.displayName = 'Checkbox';
49
+ const Checkbox_Checkbox = Checkbox;
50
+ export { Checkbox_Checkbox as default };
@@ -0,0 +1 @@
1
+ export { default as Checkbox } from './Checkbox';
@@ -0,0 +1,2 @@
1
+ import Checkbox from "./Checkbox.js";
2
+ export { Checkbox };
@@ -0,0 +1,3 @@
1
+ export declare const checkboxContainer: string;
2
+ export declare const checkboxInput: string;
3
+ export declare const checkboxLabel: string;
@@ -0,0 +1,32 @@
1
+ import { style } from "@vanilla-extract/css";
2
+ import { vars } from "../../styles/theme.css.js";
3
+ import { styleWithLayer } from "../../styles/utils.js";
4
+ const checkboxContainer = styleWithLayer({
5
+ display: 'flex',
6
+ alignItems: 'center',
7
+ gap: '8px',
8
+ cursor: 'pointer',
9
+ userSelect: 'none'
10
+ });
11
+ const checkboxInput = style({
12
+ width: '18px',
13
+ height: '18px',
14
+ border: `2px solid ${vars.colors.borderDefault}`,
15
+ borderRadius: '4px',
16
+ cursor: 'pointer',
17
+ accentColor: vars.colors.buttonBackgroundPrimary,
18
+ ':focus-visible': {
19
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
20
+ outlineOffset: '2px'
21
+ },
22
+ ':disabled': {
23
+ cursor: 'not-allowed',
24
+ opacity: 0.5
25
+ }
26
+ });
27
+ const checkboxLabel = styleWithLayer({
28
+ fontFamily: vars.fontFamily.body,
29
+ fontSize: '14px',
30
+ color: vars.colors.textPrimary
31
+ });
32
+ export { checkboxContainer, checkboxInput, checkboxLabel };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export type CollapseAnimation = 'height' | 'opacity' | 'both';
3
+ export interface CollapseProps {
4
+ isOpen: boolean;
5
+ children: React.ReactNode;
6
+ animation?: CollapseAnimation;
7
+ duration?: number;
8
+ className?: string;
9
+ onAnimationEnd?: () => void;
10
+ }
11
+ declare const Collapse: ({ isOpen, children, animation, duration, className, onAnimationEnd, }: CollapseProps) => React.JSX.Element | null;
12
+ export default Collapse;
@@ -0,0 +1,58 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import { collapseContainer, collapseContent } from "./styles.css.js";
5
+ import Box from "../Box/index.js";
6
+ const Collapse = ({ isOpen, children, animation = 'both', duration = 300, className, onAnimationEnd })=>{
7
+ const [height, setHeight] = useState(isOpen ? void 0 : 0);
8
+ const [isAnimating, setIsAnimating] = useState(false);
9
+ const contentRef = useRef(null);
10
+ useEffect(()=>{
11
+ if (isOpen) {
12
+ setIsAnimating(true);
13
+ if (contentRef.current) setHeight(contentRef.current.scrollHeight);
14
+ } else {
15
+ setIsAnimating(true);
16
+ setHeight(0);
17
+ }
18
+ }, [
19
+ isOpen
20
+ ]);
21
+ const handleTransitionEnd = ()=>{
22
+ setIsAnimating(false);
23
+ if (isOpen) setHeight(void 0);
24
+ onAnimationEnd?.();
25
+ };
26
+ const getAnimationStyles = ()=>{
27
+ const baseStyles = {
28
+ transition: `height ${duration}ms ease-out, opacity ${duration}ms ease-out`,
29
+ height: void 0 !== height ? `${height}px` : void 0,
30
+ opacity: isOpen || isAnimating ? 1 : 0
31
+ };
32
+ if ('height' === animation) return {
33
+ ...baseStyles,
34
+ transition: `height ${duration}ms ease-out`,
35
+ opacity: 1
36
+ };
37
+ if ('opacity' === animation) return {
38
+ ...baseStyles,
39
+ transition: `opacity ${duration}ms ease-out`,
40
+ height: void 0
41
+ };
42
+ return baseStyles;
43
+ };
44
+ if (!isOpen && !isAnimating && 'opacity' !== animation) return null;
45
+ return /*#__PURE__*/ jsx(Box, {
46
+ className: clsx(collapseContainer, className),
47
+ style: getAnimationStyles(),
48
+ onTransitionEnd: handleTransitionEnd,
49
+ "aria-hidden": !isOpen,
50
+ children: /*#__PURE__*/ jsx(Box, {
51
+ ref: contentRef,
52
+ className: collapseContent,
53
+ children: children
54
+ })
55
+ });
56
+ };
57
+ const Collapse_Collapse = Collapse;
58
+ export { Collapse_Collapse as default };
@@ -0,0 +1,2 @@
1
+ export { default as Collapse } from './Collapse';
2
+ export type { CollapseProps, CollapseAnimation } from './Collapse';
@@ -0,0 +1,2 @@
1
+ import Collapse from "./Collapse.js";
2
+ export { Collapse };
@@ -0,0 +1,3 @@
1
+ export declare const collapseContainer: string;
2
+ export declare const collapseContent: string;
3
+ export declare const collapseAnimation: Record<"in" | "out", string>;