@jordan-mace/chaser-design-system 1.2.3 → 1.2.4

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 +43 -0
  3. package/dist/components/Accordion/index.d.ts +1 -0
  4. package/dist/components/Accordion/index.js +1 -0
  5. package/dist/components/Accordion/styles.css.d.ts +7 -0
  6. package/dist/components/Accordion/styles.css.js +65 -0
  7. package/dist/components/Alert/Alert.d.ts +9 -0
  8. package/dist/components/Alert/Alert.js +8 -0
  9. package/dist/components/Alert/index.d.ts +1 -0
  10. package/dist/components/Alert/index.js +1 -0
  11. package/dist/components/Alert/styles.css.d.ts +4 -0
  12. package/dist/components/Alert/styles.css.js +54 -0
  13. package/dist/components/AspectRatio/AspectRatio.d.ts +9 -0
  14. package/dist/components/AspectRatio/AspectRatio.js +12 -0
  15. package/dist/components/AspectRatio/index.d.ts +2 -0
  16. package/dist/components/AspectRatio/index.js +1 -0
  17. package/dist/components/Avatar/Avatar.d.ts +11 -0
  18. package/dist/components/Avatar/Avatar.js +13 -0
  19. package/dist/components/Avatar/index.d.ts +1 -0
  20. package/dist/components/Avatar/index.js +1 -0
  21. package/dist/components/Avatar/styles.css.d.ts +4 -0
  22. package/dist/components/Avatar/styles.css.js +151 -0
  23. package/dist/components/Badge/Badge.d.ts +11 -0
  24. package/dist/components/Badge/Badge.js +8 -0
  25. package/dist/components/Badge/index.d.ts +2 -0
  26. package/dist/components/Badge/index.js +1 -0
  27. package/dist/components/Badge/styles.css.d.ts +5 -0
  28. package/dist/components/Badge/styles.css.js +77 -0
  29. package/dist/components/Box/Box.d.ts +11 -0
  30. package/dist/components/Box/Box.js +54 -0
  31. package/dist/components/Box/index.d.ts +2 -0
  32. package/dist/components/Box/index.js +1 -0
  33. package/dist/components/Box/reset.css.d.ts +1 -0
  34. package/dist/components/Box/reset.css.js +15 -0
  35. package/dist/components/Breadcrumb/Breadcrumb.d.ts +12 -0
  36. package/dist/components/Breadcrumb/Breadcrumb.js +8 -0
  37. package/dist/components/Breadcrumb/index.d.ts +1 -0
  38. package/dist/components/Breadcrumb/index.js +1 -0
  39. package/dist/components/Breadcrumb/styles.css.d.ts +6 -0
  40. package/dist/components/Breadcrumb/styles.css.js +50 -0
  41. package/dist/components/Button/Button.d.ts +9 -0
  42. package/dist/components/Button/Button.js +8 -0
  43. package/dist/components/Button/index.d.ts +1 -0
  44. package/dist/components/Button/index.js +1 -0
  45. package/dist/components/Button/styles.css.d.ts +2 -0
  46. package/dist/components/Button/styles.css.js +30 -0
  47. package/dist/components/Card/Card.d.ts +8 -0
  48. package/dist/components/Card/Card.js +8 -0
  49. package/dist/components/Card/index.d.ts +1 -0
  50. package/dist/components/Card/index.js +1 -0
  51. package/dist/components/Card/styles.css.d.ts +2 -0
  52. package/dist/components/Card/styles.css.js +25 -0
  53. package/dist/components/Checkbox/Checkbox.d.ts +6 -0
  54. package/dist/components/Checkbox/Checkbox.js +25 -0
  55. package/dist/components/Checkbox/index.d.ts +1 -0
  56. package/dist/components/Checkbox/index.js +1 -0
  57. package/dist/components/Checkbox/styles.css.d.ts +3 -0
  58. package/dist/components/Checkbox/styles.css.js +31 -0
  59. package/dist/components/Collapse/Collapse.d.ts +12 -0
  60. package/dist/components/Collapse/Collapse.js +56 -0
  61. package/dist/components/Collapse/index.d.ts +2 -0
  62. package/dist/components/Collapse/index.js +1 -0
  63. package/dist/components/Collapse/styles.css.d.ts +3 -0
  64. package/dist/components/Collapse/styles.css.js +36 -0
  65. package/dist/components/Combobox/Combobox.d.ts +23 -0
  66. package/dist/components/Combobox/Combobox.js +104 -0
  67. package/dist/components/Combobox/index.d.ts +2 -0
  68. package/dist/components/Combobox/index.js +1 -0
  69. package/dist/components/Combobox/styles.css.d.ts +13 -0
  70. package/dist/components/Combobox/styles.css.js +142 -0
  71. package/dist/components/Container/Container.d.ts +11 -0
  72. package/dist/components/Container/Container.js +21 -0
  73. package/dist/components/Container/index.d.ts +2 -0
  74. package/dist/components/Container/index.js +1 -0
  75. package/dist/components/Divider/Divider.d.ts +9 -0
  76. package/dist/components/Divider/Divider.js +8 -0
  77. package/dist/components/Divider/index.d.ts +2 -0
  78. package/dist/components/Divider/index.js +1 -0
  79. package/dist/components/Divider/styles.css.d.ts +4 -0
  80. package/dist/components/Divider/styles.css.js +41 -0
  81. package/dist/components/Drawer/Drawer.d.ts +16 -0
  82. package/dist/components/Drawer/Drawer.js +65 -0
  83. package/dist/components/Drawer/index.d.ts +2 -0
  84. package/dist/components/Drawer/index.js +1 -0
  85. package/dist/components/Drawer/styles.css.d.ts +8 -0
  86. package/dist/components/Drawer/styles.css.js +125 -0
  87. package/dist/components/DropdownMenu/DropdownMenu.d.ts +23 -0
  88. package/dist/components/DropdownMenu/DropdownMenu.js +43 -0
  89. package/dist/components/DropdownMenu/index.d.ts +2 -0
  90. package/dist/components/DropdownMenu/index.js +1 -0
  91. package/dist/components/DropdownMenu/styles.css.d.ts +9 -0
  92. package/dist/components/DropdownMenu/styles.css.js +93 -0
  93. package/dist/components/EmptyState/EmptyState.d.ts +10 -0
  94. package/dist/components/EmptyState/EmptyState.js +8 -0
  95. package/dist/components/EmptyState/index.d.ts +2 -0
  96. package/dist/components/EmptyState/index.js +1 -0
  97. package/dist/components/EmptyState/styles.css.d.ts +5 -0
  98. package/dist/components/EmptyState/styles.css.js +30 -0
  99. package/dist/components/FileUpload/FileUpload.d.ts +27 -0
  100. package/dist/components/FileUpload/FileUpload.js +102 -0
  101. package/dist/components/FileUpload/index.d.ts +2 -0
  102. package/dist/components/FileUpload/index.js +1 -0
  103. package/dist/components/FileUpload/styles.css.d.ts +19 -0
  104. package/dist/components/FileUpload/styles.css.js +145 -0
  105. package/dist/components/Form/Form.d.ts +7 -0
  106. package/dist/components/Form/Form.js +8 -0
  107. package/dist/components/Form/FormInput.d.ts +5 -0
  108. package/dist/components/Form/FormInput.js +9 -0
  109. package/dist/components/Form/index.d.ts +2 -0
  110. package/dist/components/Form/index.js +2 -0
  111. package/dist/components/Form/styles.css.d.ts +2 -0
  112. package/dist/components/Form/styles.css.js +11 -0
  113. package/dist/components/Grid/Grid.d.ts +13 -0
  114. package/dist/components/Grid/Grid.js +25 -0
  115. package/dist/components/Grid/index.d.ts +2 -0
  116. package/dist/components/Grid/index.js +1 -0
  117. package/dist/components/Icon/Icon.d.ts +12 -0
  118. package/dist/components/Icon/Icon.js +21 -0
  119. package/dist/components/Icon/index.d.ts +1 -0
  120. package/dist/components/Icon/index.js +1 -0
  121. package/dist/components/Icon/styles.css.d.ts +1 -0
  122. package/dist/components/Icon/styles.css.js +9 -0
  123. package/dist/components/Input/Input.d.ts +7 -0
  124. package/dist/components/Input/Input.js +9 -0
  125. package/dist/components/Input/index.d.ts +1 -0
  126. package/dist/components/Input/index.js +1 -0
  127. package/dist/components/Input/styles.css.d.ts +2 -0
  128. package/dist/components/Input/styles.css.js +8 -0
  129. package/dist/components/Kbd/Kbd.d.ts +7 -0
  130. package/dist/components/Kbd/Kbd.js +6 -0
  131. package/dist/components/Kbd/index.d.ts +2 -0
  132. package/dist/components/Kbd/index.js +1 -0
  133. package/dist/components/Kbd/styles.css.d.ts +1 -0
  134. package/dist/components/Kbd/styles.css.js +16 -0
  135. package/dist/components/List/List.d.ts +5 -0
  136. package/dist/components/List/List.js +7 -0
  137. package/dist/components/List/ListItem.d.ts +5 -0
  138. package/dist/components/List/ListItem.js +7 -0
  139. package/dist/components/List/index.d.ts +2 -0
  140. package/dist/components/List/index.js +2 -0
  141. package/dist/components/List/styles.css.d.ts +2 -0
  142. package/dist/components/List/styles.css.js +11 -0
  143. package/dist/components/Modal/Modal.d.ts +13 -0
  144. package/dist/components/Modal/Modal.js +35 -0
  145. package/dist/components/Modal/index.d.ts +2 -0
  146. package/dist/components/Modal/index.js +1 -0
  147. package/dist/components/Modal/styles.css.d.ts +7 -0
  148. package/dist/components/Modal/styles.css.js +92 -0
  149. package/dist/components/Navbar/Navbar.d.ts +6 -0
  150. package/dist/components/Navbar/Navbar.js +8 -0
  151. package/dist/components/Navbar/NavbarItem.d.ts +6 -0
  152. package/dist/components/Navbar/NavbarItem.js +8 -0
  153. package/dist/components/Navbar/index.d.ts +2 -0
  154. package/dist/components/Navbar/index.js +2 -0
  155. package/dist/components/Navbar/styles.css.d.ts +2 -0
  156. package/dist/components/Navbar/styles.css.js +3 -0
  157. package/dist/components/NumberInput/NumberInput.d.ts +20 -0
  158. package/dist/components/NumberInput/NumberInput.js +39 -0
  159. package/dist/components/NumberInput/index.d.ts +2 -0
  160. package/dist/components/NumberInput/index.js +1 -0
  161. package/dist/components/NumberInput/styles.css.d.ts +10 -0
  162. package/dist/components/NumberInput/styles.css.js +117 -0
  163. package/dist/components/Pagination/Pagination.d.ts +10 -0
  164. package/dist/components/Pagination/Pagination.js +47 -0
  165. package/dist/components/Pagination/index.d.ts +2 -0
  166. package/dist/components/Pagination/index.js +1 -0
  167. package/dist/components/Pagination/styles.css.d.ts +4 -0
  168. package/dist/components/Pagination/styles.css.js +44 -0
  169. package/dist/components/Popover/Popover.d.ts +18 -0
  170. package/dist/components/Popover/Popover.js +55 -0
  171. package/dist/components/Popover/index.d.ts +2 -0
  172. package/dist/components/Popover/index.js +1 -0
  173. package/dist/components/Popover/styles.css.d.ts +11 -0
  174. package/dist/components/Popover/styles.css.js +185 -0
  175. package/dist/components/Progress/Progress.d.ts +10 -0
  176. package/dist/components/Progress/Progress.js +9 -0
  177. package/dist/components/Progress/index.d.ts +1 -0
  178. package/dist/components/Progress/index.js +1 -0
  179. package/dist/components/Progress/styles.css.d.ts +4 -0
  180. package/dist/components/Progress/styles.css.js +71 -0
  181. package/dist/components/Radio/Radio.d.ts +16 -0
  182. package/dist/components/Radio/Radio.js +25 -0
  183. package/dist/components/Radio/index.d.ts +1 -0
  184. package/dist/components/Radio/index.js +1 -0
  185. package/dist/components/Radio/styles.css.d.ts +5 -0
  186. package/dist/components/Radio/styles.css.js +42 -0
  187. package/dist/components/ScrollArea/ScrollArea.d.ts +11 -0
  188. package/dist/components/ScrollArea/ScrollArea.js +12 -0
  189. package/dist/components/ScrollArea/index.d.ts +2 -0
  190. package/dist/components/ScrollArea/index.js +1 -0
  191. package/dist/components/ScrollArea/styles.css.d.ts +3 -0
  192. package/dist/components/ScrollArea/styles.css.js +25 -0
  193. package/dist/components/Select/Select.d.ts +13 -0
  194. package/dist/components/Select/Select.js +10 -0
  195. package/dist/components/Select/index.d.ts +1 -0
  196. package/dist/components/Select/index.js +1 -0
  197. package/dist/components/Select/styles.css.d.ts +4 -0
  198. package/dist/components/Select/styles.css.js +82 -0
  199. package/dist/components/Separator/Separator.d.ts +8 -0
  200. package/dist/components/Separator/Separator.js +8 -0
  201. package/dist/components/Separator/index.d.ts +2 -0
  202. package/dist/components/Separator/index.js +1 -0
  203. package/dist/components/Separator/styles.css.d.ts +4 -0
  204. package/dist/components/Separator/styles.css.js +28 -0
  205. package/dist/components/Skeleton/Skeleton.d.ts +14 -0
  206. package/dist/components/Skeleton/Skeleton.js +13 -0
  207. package/dist/components/Skeleton/index.d.ts +2 -0
  208. package/dist/components/Skeleton/index.js +1 -0
  209. package/dist/components/Skeleton/styles.css.d.ts +4 -0
  210. package/dist/components/Skeleton/styles.css.js +56 -0
  211. package/dist/components/Spinner/Spinner.d.ts +10 -0
  212. package/dist/components/Spinner/Spinner.js +8 -0
  213. package/dist/components/Spinner/index.d.ts +2 -0
  214. package/dist/components/Spinner/index.js +1 -0
  215. package/dist/components/Spinner/styles.css.d.ts +4 -0
  216. package/dist/components/Spinner/styles.css.js +55 -0
  217. package/dist/components/Stack/Stack.d.ts +16 -0
  218. package/dist/components/Stack/Stack.js +24 -0
  219. package/dist/components/Stack/index.d.ts +2 -0
  220. package/dist/components/Stack/index.js +1 -0
  221. package/dist/components/Stepper/Stepper.d.ts +18 -0
  222. package/dist/components/Stepper/Stepper.js +25 -0
  223. package/dist/components/Stepper/index.d.ts +2 -0
  224. package/dist/components/Stepper/index.js +1 -0
  225. package/dist/components/Stepper/styles.css.d.ts +14 -0
  226. package/dist/components/Stepper/styles.css.js +104 -0
  227. package/dist/components/Table/Table.d.ts +42 -0
  228. package/dist/components/Table/Table.js +39 -0
  229. package/dist/components/Table/index.d.ts +1 -0
  230. package/dist/components/Table/index.js +1 -0
  231. package/dist/components/Table/styles.css.d.ts +8 -0
  232. package/dist/components/Table/styles.css.js +49 -0
  233. package/dist/components/Tabs/Tabs.d.ts +29 -0
  234. package/dist/components/Tabs/Tabs.js +52 -0
  235. package/dist/components/Tabs/index.d.ts +1 -0
  236. package/dist/components/Tabs/index.js +1 -0
  237. package/dist/components/Tabs/styles.css.d.ts +6 -0
  238. package/dist/components/Tabs/styles.css.js +100 -0
  239. package/dist/components/Tag/Tag.d.ts +16 -0
  240. package/dist/components/Tag/Tag.js +18 -0
  241. package/dist/components/Tag/index.d.ts +1 -0
  242. package/dist/components/Tag/index.js +1 -0
  243. package/dist/components/Tag/styles.css.d.ts +3 -0
  244. package/dist/components/Tag/styles.css.js +93 -0
  245. package/dist/components/Text/Header.d.ts +8 -0
  246. package/dist/components/Text/Header.js +8 -0
  247. package/dist/components/Text/P.d.ts +7 -0
  248. package/dist/components/Text/P.js +8 -0
  249. package/dist/components/Text/index.d.ts +2 -0
  250. package/dist/components/Text/index.js +2 -0
  251. package/dist/components/Text/styles.css.d.ts +2 -0
  252. package/dist/components/Text/styles.css.js +13 -0
  253. package/dist/components/TextArea/TextArea.d.ts +7 -0
  254. package/dist/components/TextArea/TextArea.js +9 -0
  255. package/dist/components/TextArea/index.d.ts +2 -0
  256. package/dist/components/TextArea/index.js +1 -0
  257. package/dist/components/TextArea/styles.css.d.ts +2 -0
  258. package/dist/components/TextArea/styles.css.js +10 -0
  259. package/dist/components/Toast/Toast.d.ts +34 -0
  260. package/dist/components/Toast/Toast.js +177 -0
  261. package/dist/components/Toast/index.d.ts +1 -0
  262. package/dist/components/Toast/index.js +1 -0
  263. package/dist/components/Toast/styles.css.d.ts +21 -0
  264. package/dist/components/Toast/styles.css.js +192 -0
  265. package/dist/components/Toggle/Toggle.d.ts +10 -0
  266. package/dist/components/Toggle/Toggle.js +17 -0
  267. package/dist/components/Toggle/index.d.ts +2 -0
  268. package/dist/components/Toggle/index.js +1 -0
  269. package/dist/components/Toggle/styles.css.d.ts +12 -0
  270. package/dist/components/Toggle/styles.css.js +118 -0
  271. package/dist/components/Tooltip/Tooltip.d.ts +10 -0
  272. package/dist/components/Tooltip/Tooltip.js +16 -0
  273. package/dist/components/Tooltip/index.d.ts +2 -0
  274. package/dist/components/Tooltip/index.js +1 -0
  275. package/dist/components/Tooltip/styles.css.d.ts +8 -0
  276. package/dist/components/Tooltip/styles.css.js +86 -0
  277. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +8 -0
  278. package/dist/components/VisuallyHidden/VisuallyHidden.js +9 -0
  279. package/dist/components/VisuallyHidden/index.d.ts +2 -0
  280. package/dist/components/VisuallyHidden/index.js +1 -0
  281. package/dist/components/VisuallyHidden/styles.css.d.ts +1 -0
  282. package/dist/components/VisuallyHidden/styles.css.js +12 -0
  283. package/dist/components/index.d.ts +68 -0
  284. package/dist/components/index.js +47 -0
  285. package/dist/index.d.ts +1 -0
  286. package/dist/index.js +1 -0
  287. package/dist/styles/layers.css.d.ts +3 -0
  288. package/dist/styles/layers.css.js +3 -0
  289. package/dist/styles/sprinkles.css.d.ts +241 -0
  290. package/dist/styles/sprinkles.css.js +165 -0
  291. package/dist/styles/theme.css.d.ts +38 -0
  292. package/dist/styles/theme.css.js +51 -0
  293. package/dist/styles/utils.d.ts +2 -0
  294. package/dist/styles/utils.js +7 -0
  295. package/package.json +9 -18
  296. package/dist/index.cjs +0 -4894
  297. package/dist/index.d.cts +0 -1111
  298. package/dist/index.d.mts +0 -1111
  299. package/dist/index.mjs +0 -4812
@@ -0,0 +1,142 @@
1
+ import { styleVariants } from '@vanilla-extract/css';
2
+ import { vars } from '../../styles/theme.css';
3
+ import { styleWithLayer } from '../../styles/utils';
4
+ export const comboboxContainer = styleWithLayer({
5
+ position: 'relative',
6
+ width: '100%',
7
+ });
8
+ export const comboboxInput = styleWithLayer({
9
+ width: '100%',
10
+ padding: '0.75rem 2.5rem 0.75rem 1rem',
11
+ fontSize: '14px',
12
+ fontFamily: vars.fontFamily.body,
13
+ color: vars.colors.textPrimary,
14
+ backgroundColor: vars.colors.inputBackground,
15
+ border: `1px solid ${vars.colors.inputBorder}`,
16
+ borderRadius: '8px',
17
+ outline: 'none',
18
+ transition: 'border-color 0.2s ease',
19
+ '::placeholder': {
20
+ color: vars.colors.inputPlaceholder,
21
+ },
22
+ ':focus-visible': {
23
+ outline: `2px solid ${vars.colors.inputBorderFocused}`,
24
+ outlineOffset: '2px',
25
+ },
26
+ ':hover': {
27
+ borderColor: vars.colors.inputBorderFocused,
28
+ },
29
+ selectors: {
30
+ '&:disabled': {
31
+ cursor: 'not-allowed',
32
+ opacity: 0.5,
33
+ backgroundColor: vars.colors.backgroundMuted,
34
+ },
35
+ '&:disabled:hover': {
36
+ borderColor: vars.colors.inputBorder,
37
+ },
38
+ },
39
+ });
40
+ export const comboboxInputVariants = styleVariants({
41
+ default: {},
42
+ error: {
43
+ border: `1px solid ${vars.colors.alertErrorBorder}`,
44
+ ':focus-visible': {
45
+ outline: `2px solid ${vars.colors.alertErrorBorder}`,
46
+ },
47
+ ':hover': {
48
+ borderColor: vars.colors.alertErrorBorder,
49
+ },
50
+ },
51
+ });
52
+ export const comboboxLabel = styleWithLayer({
53
+ display: 'block',
54
+ fontSize: '14px',
55
+ fontWeight: '500',
56
+ color: vars.colors.textPrimary,
57
+ marginBottom: '8px',
58
+ });
59
+ export const comboboxDropdown = styleWithLayer({
60
+ position: 'absolute',
61
+ top: '100%',
62
+ left: 0,
63
+ right: 0,
64
+ backgroundColor: vars.colors.backgroundDefault,
65
+ border: `1px solid ${vars.colors.borderDefault}`,
66
+ borderRadius: '8px',
67
+ boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
68
+ maxHeight: '200px',
69
+ overflowY: 'auto',
70
+ zIndex: 50,
71
+ marginTop: '4px',
72
+ });
73
+ export const comboboxOption = styleWithLayer({
74
+ padding: '0.75rem 1rem',
75
+ cursor: 'pointer',
76
+ fontSize: '14px',
77
+ color: vars.colors.textPrimary,
78
+ transition: 'background-color 0.15s ease',
79
+ ':hover': {
80
+ backgroundColor: vars.colors.backgroundMuted,
81
+ },
82
+ ':focus-visible': {
83
+ outline: 'none',
84
+ backgroundColor: vars.colors.backgroundMuted,
85
+ },
86
+ });
87
+ export const comboboxOptionSelected = styleWithLayer({
88
+ backgroundColor: vars.colors.buttonBackgroundPrimary,
89
+ color: vars.colors.buttonTextPrimary,
90
+ ':hover': {
91
+ backgroundColor: vars.colors.buttonBackgroundFocusedPrimary,
92
+ },
93
+ });
94
+ export const comboboxOptionDisabled = styleWithLayer({
95
+ opacity: 0.5,
96
+ cursor: 'not-allowed',
97
+ ':hover': {
98
+ backgroundColor: 'transparent',
99
+ },
100
+ });
101
+ export const comboboxClearButton = styleWithLayer({
102
+ position: 'absolute',
103
+ right: '2.5rem',
104
+ top: '50%',
105
+ transform: 'translateY(-50%)',
106
+ background: 'none',
107
+ border: 'none',
108
+ cursor: 'pointer',
109
+ padding: '0.25rem',
110
+ color: vars.colors.textSecondary,
111
+ fontSize: '16px',
112
+ display: 'flex',
113
+ alignItems: 'center',
114
+ justifyContent: 'center',
115
+ ':hover': {
116
+ color: vars.colors.textPrimary,
117
+ },
118
+ });
119
+ export const comboboxArrow = styleWithLayer({
120
+ position: 'absolute',
121
+ right: '0.75rem',
122
+ top: '50%',
123
+ transform: 'translateY(-50%)',
124
+ pointerEvents: 'none',
125
+ color: vars.colors.textSecondary,
126
+ });
127
+ export const comboboxNoResults = styleWithLayer({
128
+ padding: '0.75rem 1rem',
129
+ fontSize: '14px',
130
+ color: vars.colors.textSecondary,
131
+ textAlign: 'center',
132
+ });
133
+ export const comboboxHint = styleWithLayer({
134
+ fontSize: '12px',
135
+ color: vars.colors.textSecondary,
136
+ marginTop: '4px',
137
+ });
138
+ export const comboboxErrorMessage = styleWithLayer({
139
+ fontSize: '12px',
140
+ color: vars.colors.alertErrorText,
141
+ marginTop: '4px',
142
+ });
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export type ContainerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
3
+ export interface ContainerProps {
4
+ size?: ContainerSize;
5
+ centerContent?: boolean;
6
+ children?: React.ReactNode;
7
+ className?: string;
8
+ style?: React.CSSProperties;
9
+ }
10
+ declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLElement>>;
11
+ export default Container;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import Box from '../Box';
4
+ const sizeMap = {
5
+ sm: '640px',
6
+ md: '768px',
7
+ lg: '1024px',
8
+ xl: '1280px',
9
+ full: '100%',
10
+ };
11
+ const Container = forwardRef(({ size = 'lg', centerContent = true, children, className, style }, ref) => {
12
+ const sizeValue = size;
13
+ const containerStyle = {
14
+ maxWidth: sizeMap[sizeValue],
15
+ marginLeft: centerContent ? 'auto' : undefined,
16
+ marginRight: centerContent ? 'auto' : undefined,
17
+ };
18
+ return (_jsx(Box, { ref: ref, width: "100%", className: className, style: { ...containerStyle, ...style }, children: children }));
19
+ });
20
+ Container.displayName = 'Container';
21
+ export default Container;
@@ -0,0 +1,2 @@
1
+ export { default as Container } from './Container';
2
+ export type { ContainerProps, ContainerSize } from './Container';
@@ -0,0 +1 @@
1
+ export { default as Container } from './Container';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export type DividerOrientation = 'horizontal' | 'vertical';
3
+ export type DividerSize = 'small' | 'medium' | 'large';
4
+ export interface DividerProps extends React.HTMLAttributes<HTMLHRElement> {
5
+ orientation?: DividerOrientation;
6
+ size?: DividerSize;
7
+ }
8
+ declare const Divider: ({ orientation, size, ...props }: DividerProps) => import("react/jsx-runtime").JSX.Element;
9
+ export default Divider;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import { divider, dividerOrientations, dividerSizes, dividerVerticalSizes, } from './styles.css';
4
+ import Box from '../Box';
5
+ const Divider = ({ orientation = 'horizontal', size = 'medium', ...props }) => {
6
+ return (_jsx(Box, { as: "hr", className: clsx(divider, dividerOrientations[orientation], orientation === 'vertical' ? dividerVerticalSizes[size] : dividerSizes[size], props.className), role: "separator", "aria-orientation": orientation, ...props }));
7
+ };
8
+ export default Divider;
@@ -0,0 +1,2 @@
1
+ export { default as Divider } from './Divider';
2
+ export type { DividerProps, DividerOrientation, DividerSize } from './Divider';
@@ -0,0 +1 @@
1
+ export { default as Divider } from './Divider';
@@ -0,0 +1,4 @@
1
+ export declare const dividerOrientations: Record<"horizontal" | "vertical", string>;
2
+ export declare const dividerSizes: Record<"medium" | "large" | "small", string>;
3
+ export declare const divider: string;
4
+ export declare const dividerVerticalSizes: Record<"medium" | "large" | "small", string>;
@@ -0,0 +1,41 @@
1
+ import { styleVariants } from '@vanilla-extract/css';
2
+ import { vars } from '../../styles/theme.css';
3
+ import { styleWithLayer } from '../../styles/utils';
4
+ export const dividerOrientations = styleVariants({
5
+ horizontal: {
6
+ width: '100%',
7
+ height: '1px',
8
+ borderTop: `1px solid ${vars.colors.borderMuted}`,
9
+ },
10
+ vertical: {
11
+ width: '1px',
12
+ height: '100%',
13
+ borderLeft: `1px solid ${vars.colors.borderMuted}`,
14
+ },
15
+ });
16
+ export const dividerSizes = styleVariants({
17
+ small: {
18
+ margin: '0.5rem 0',
19
+ },
20
+ medium: {
21
+ margin: '1rem 0',
22
+ },
23
+ large: {
24
+ margin: '1.5rem 0',
25
+ },
26
+ });
27
+ export const divider = styleWithLayer({
28
+ border: 'none',
29
+ flexShrink: 0,
30
+ });
31
+ export const dividerVerticalSizes = styleVariants({
32
+ small: {
33
+ margin: '0 0.5rem',
34
+ },
35
+ medium: {
36
+ margin: '0 1rem',
37
+ },
38
+ large: {
39
+ margin: '0 1.5rem',
40
+ },
41
+ });
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export type DrawerPosition = 'left' | 'right' | 'top' | 'bottom';
3
+ export type DrawerSize = 'small' | 'medium' | 'large' | 'full';
4
+ export interface DrawerProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ isOpen: boolean;
6
+ onClose: () => void;
7
+ title?: string;
8
+ position?: DrawerPosition;
9
+ size?: DrawerSize;
10
+ children?: React.ReactNode;
11
+ footer?: React.ReactNode;
12
+ showCloseButton?: boolean;
13
+ closeOnOverlayClick?: boolean;
14
+ }
15
+ declare const Drawer: ({ isOpen, onClose, title, position, size, children, footer, showCloseButton, closeOnOverlayClick, className, ...props }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
16
+ export default Drawer;
@@ -0,0 +1,65 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import { useEffect } from 'react';
4
+ import { drawer, drawerPositionVariants, drawerOverlay, drawerHeader, drawerTitle, drawerCloseButton, drawerBody, drawerFooter, } from './styles.css';
5
+ import Box from '../Box';
6
+ const sizeMap = {
7
+ left: {
8
+ small: '250px',
9
+ medium: '350px',
10
+ large: '450px',
11
+ full: '100vw',
12
+ },
13
+ right: {
14
+ small: '250px',
15
+ medium: '350px',
16
+ large: '450px',
17
+ full: '100vw',
18
+ },
19
+ top: {
20
+ small: '200px',
21
+ medium: '300px',
22
+ large: '400px',
23
+ full: '100vh',
24
+ },
25
+ bottom: {
26
+ small: '200px',
27
+ medium: '300px',
28
+ large: '400px',
29
+ full: '100vh',
30
+ },
31
+ };
32
+ const Drawer = ({ isOpen, onClose, title, position = 'right', size = 'medium', children, footer, showCloseButton = true, closeOnOverlayClick = true, className, ...props }) => {
33
+ useEffect(() => {
34
+ if (isOpen) {
35
+ document.body.style.overflow = 'hidden';
36
+ }
37
+ else {
38
+ document.body.style.overflow = '';
39
+ }
40
+ return () => {
41
+ document.body.style.overflow = '';
42
+ };
43
+ }, [isOpen]);
44
+ useEffect(() => {
45
+ const handleEscape = (e) => {
46
+ if (e.key === 'Escape' && isOpen) {
47
+ onClose();
48
+ }
49
+ };
50
+ document.addEventListener('keydown', handleEscape);
51
+ return () => document.removeEventListener('keydown', handleEscape);
52
+ }, [isOpen, onClose]);
53
+ if (!isOpen)
54
+ return null;
55
+ const dimensionStyle = {
56
+ ['--drawer-width']: ['left', 'right'].includes(position)
57
+ ? sizeMap[position][size]
58
+ : undefined,
59
+ ['--drawer-height']: ['top', 'bottom'].includes(position)
60
+ ? sizeMap[position][size]
61
+ : undefined,
62
+ };
63
+ return (_jsxs(_Fragment, { children: [_jsx(Box, { className: drawerOverlay, onClick: closeOnOverlayClick ? onClose : undefined, "aria-hidden": "true" }), _jsxs(Box, { as: "div", role: "dialog", "aria-modal": "true", className: clsx(drawer, drawerPositionVariants[position], className), style: dimensionStyle, ...props, children: [title && (_jsxs(Box, { as: "div", className: drawerHeader, children: [_jsx(Box, { as: "h2", className: drawerTitle, children: title }), showCloseButton && (_jsx(Box, { as: "button", className: drawerCloseButton, onClick: onClose, "aria-label": "Close drawer", type: "button", children: "\u00D7" }))] })), _jsx(Box, { as: "div", className: drawerBody, children: children }), footer && _jsx(Box, { as: "div", className: drawerFooter, children: footer })] })] }));
64
+ };
65
+ export default Drawer;
@@ -0,0 +1,2 @@
1
+ export { default as Drawer } from './Drawer';
2
+ export type { DrawerProps, DrawerPosition, DrawerSize } from './Drawer';
@@ -0,0 +1 @@
1
+ export { default as Drawer } from './Drawer';
@@ -0,0 +1,8 @@
1
+ export declare const drawerPositionVariants: Record<"bottom" | "left" | "right" | "top", string>;
2
+ export declare const drawerOverlay: string;
3
+ export declare const drawer: string;
4
+ export declare const drawerHeader: string;
5
+ export declare const drawerTitle: string;
6
+ export declare const drawerCloseButton: string;
7
+ export declare const drawerBody: string;
8
+ export declare const drawerFooter: string;
@@ -0,0 +1,125 @@
1
+ import { styleVariants, keyframes } from '@vanilla-extract/css';
2
+ import { vars } from '../../styles/theme.css';
3
+ import { styleWithLayer } from '../../styles/utils';
4
+ const slideInFromLeft = keyframes({
5
+ from: { transform: 'translateX(-100%)' },
6
+ to: { transform: 'translateX(0)' },
7
+ });
8
+ const slideInFromRight = keyframes({
9
+ from: { transform: 'translateX(100%)' },
10
+ to: { transform: 'translateX(0)' },
11
+ });
12
+ const slideInFromTop = keyframes({
13
+ from: { transform: 'translateY(-100%)' },
14
+ to: { transform: 'translateY(0)' },
15
+ });
16
+ const slideInFromBottom = keyframes({
17
+ from: { transform: 'translateY(100%)' },
18
+ to: { transform: 'translateY(0)' },
19
+ });
20
+ const fadeIn = keyframes({
21
+ from: { opacity: 0 },
22
+ to: { opacity: 1 },
23
+ });
24
+ export const drawerPositionVariants = styleVariants({
25
+ left: {
26
+ top: 0,
27
+ left: 0,
28
+ bottom: 0,
29
+ width: 'var(--drawer-width, 300px)',
30
+ maxWidth: '100vw',
31
+ animation: `${slideInFromLeft} 0.3s ease-out`,
32
+ },
33
+ right: {
34
+ top: 0,
35
+ right: 0,
36
+ bottom: 0,
37
+ width: 'var(--drawer-width, 300px)',
38
+ maxWidth: '100vw',
39
+ animation: `${slideInFromRight} 0.3s ease-out`,
40
+ },
41
+ top: {
42
+ top: 0,
43
+ left: 0,
44
+ right: 0,
45
+ height: 'var(--drawer-height, 300px)',
46
+ maxHeight: '100vh',
47
+ animation: `${slideInFromTop} 0.3s ease-out`,
48
+ },
49
+ bottom: {
50
+ bottom: 0,
51
+ left: 0,
52
+ right: 0,
53
+ height: 'var(--drawer-height, 300px)',
54
+ maxHeight: '100vh',
55
+ animation: `${slideInFromBottom} 0.3s ease-out`,
56
+ },
57
+ });
58
+ export const drawerOverlay = styleWithLayer({
59
+ position: 'fixed',
60
+ inset: 0,
61
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
62
+ animation: `${fadeIn} 0.2s ease-out`,
63
+ zIndex: 40,
64
+ });
65
+ export const drawer = styleWithLayer({
66
+ position: 'fixed',
67
+ background: vars.colors.backgroundDefault,
68
+ boxShadow: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
69
+ zIndex: 50,
70
+ display: 'flex',
71
+ flexDirection: 'column',
72
+ overflow: 'hidden',
73
+ });
74
+ export const drawerHeader = styleWithLayer({
75
+ padding: '1.25rem',
76
+ borderBottom: `1px solid ${vars.colors.borderMuted}`,
77
+ display: 'flex',
78
+ alignItems: 'center',
79
+ justifyContent: 'space-between',
80
+ gap: '1rem',
81
+ });
82
+ export const drawerTitle = styleWithLayer({
83
+ fontFamily: vars.fontFamily.heading,
84
+ fontSize: '1.25rem',
85
+ fontWeight: '600',
86
+ color: vars.colors.textPrimary,
87
+ margin: 0,
88
+ });
89
+ export const drawerCloseButton = styleWithLayer({
90
+ background: 'none',
91
+ border: 'none',
92
+ padding: '0.5rem',
93
+ cursor: 'pointer',
94
+ borderRadius: '0.375rem',
95
+ display: 'flex',
96
+ alignItems: 'center',
97
+ justifyContent: 'center',
98
+ color: vars.colors.textSecondary,
99
+ fontSize: '1.5rem',
100
+ lineHeight: '1',
101
+ transition: 'background-color 0.2s ease-in-out, color 0.2s ease-in-out',
102
+ selectors: {
103
+ '&:hover': {
104
+ backgroundColor: vars.colors.borderMuted,
105
+ color: vars.colors.textPrimary,
106
+ },
107
+ '&:focus-visible': {
108
+ outline: '2px solid var(--drawer-focus-ring, currentColor)',
109
+ outlineOffset: '2px',
110
+ },
111
+ },
112
+ });
113
+ export const drawerBody = styleWithLayer({
114
+ padding: '1.25rem',
115
+ overflowY: 'auto',
116
+ flex: 1,
117
+ });
118
+ export const drawerFooter = styleWithLayer({
119
+ padding: '1.25rem',
120
+ borderTop: `1px solid ${vars.colors.borderMuted}`,
121
+ display: 'flex',
122
+ gap: '0.75rem',
123
+ justifyContent: 'flex-end',
124
+ alignItems: 'center',
125
+ });
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ export type DropdownMenuPosition = 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
3
+ export type DropdownMenuItemVariant = 'default' | 'destructive' | 'disabled';
4
+ export interface DropdownMenuItemProps {
5
+ label: string;
6
+ onClick?: () => void;
7
+ variant?: DropdownMenuItemVariant;
8
+ icon?: React.ReactNode;
9
+ disabled?: boolean;
10
+ }
11
+ export interface DropdownMenuGroupProps {
12
+ label?: string;
13
+ items: DropdownMenuItemProps[];
14
+ }
15
+ export interface DropdownMenuProps extends React.HTMLAttributes<HTMLDivElement> {
16
+ trigger: React.ReactNode;
17
+ items?: DropdownMenuItemProps[];
18
+ groups?: DropdownMenuGroupProps[];
19
+ position?: DropdownMenuPosition;
20
+ closeOnItemClick?: boolean;
21
+ }
22
+ declare const DropdownMenu: ({ trigger, items, groups, position, closeOnItemClick, className, ...props }: DropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
23
+ export default DropdownMenu;
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import React, { useState, useRef, useEffect } from 'react';
4
+ import { dropdownMenuContainer, dropdownMenuTrigger, dropdownMenuContent, dropdownMenuPositionVariants, dropdownMenuItem, dropdownMenuItemVariants, dropdownMenuSeparator, dropdownMenuGroup, dropdownMenuLabel, } from './styles.css';
5
+ import Box from '../Box';
6
+ const DropdownMenu = ({ trigger, items = [], groups = [], position = 'bottomLeft', closeOnItemClick = true, className, ...props }) => {
7
+ const [isOpen, setIsOpen] = useState(false);
8
+ const containerRef = useRef(null);
9
+ useEffect(() => {
10
+ const handleClickOutside = (event) => {
11
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
12
+ setIsOpen(false);
13
+ }
14
+ };
15
+ if (isOpen) {
16
+ document.addEventListener('mousedown', handleClickOutside);
17
+ }
18
+ return () => {
19
+ document.removeEventListener('mousedown', handleClickOutside);
20
+ };
21
+ }, [isOpen]);
22
+ useEffect(() => {
23
+ const handleEscape = (e) => {
24
+ if (e.key === 'Escape' && isOpen) {
25
+ setIsOpen(false);
26
+ }
27
+ };
28
+ document.addEventListener('keydown', handleEscape);
29
+ return () => document.removeEventListener('keydown', handleEscape);
30
+ }, [isOpen]);
31
+ const handleItemClick = (item) => {
32
+ if (item.disabled || item.variant === 'disabled')
33
+ return;
34
+ item.onClick?.();
35
+ if (closeOnItemClick) {
36
+ setIsOpen(false);
37
+ }
38
+ };
39
+ const renderItem = (item, index) => (_jsxs(Box, { as: "button", className: clsx(dropdownMenuItem, dropdownMenuItemVariants[item.disabled || item.variant === 'disabled' ? 'disabled' : item.variant || 'default']), onClick: () => handleItemClick(item), disabled: item.disabled || item.variant === 'disabled', role: "menuitem", type: "button", children: [item.icon && _jsx("span", { children: item.icon }), item.label] }, index));
40
+ const renderGroup = (group, index) => (_jsxs(Box, { className: dropdownMenuGroup, role: "group", children: [group.label && (_jsx(Box, { as: "div", className: dropdownMenuLabel, role: "presentation", children: group.label })), group.items.map((item, itemIndex) => renderItem(item, itemIndex))] }, index));
41
+ return (_jsxs(Box, { ref: containerRef, className: clsx(dropdownMenuContainer, className), ...props, children: [_jsx(Box, { className: dropdownMenuTrigger, onClick: () => setIsOpen(!isOpen), "aria-expanded": isOpen, "aria-haspopup": "true", children: trigger }), isOpen && (_jsxs(Box, { className: clsx(dropdownMenuContent, dropdownMenuPositionVariants[position]), role: "menu", "aria-orientation": "vertical", children: [items.length > 0 && (_jsx(Box, { className: dropdownMenuGroup, children: items.map((item, index) => renderItem(item, index)) })), groups.map((group, index) => (_jsxs(React.Fragment, { children: [index > 0 && _jsx(Box, { as: "div", className: dropdownMenuSeparator, role: "separator" }), renderGroup(group, index)] }, index)))] }))] }));
42
+ };
43
+ export default DropdownMenu;
@@ -0,0 +1,2 @@
1
+ export { default as DropdownMenu } from './DropdownMenu';
2
+ export type { DropdownMenuProps, DropdownMenuItemProps, DropdownMenuGroupProps, DropdownMenuPosition, DropdownMenuItemVariant } from './DropdownMenu';
@@ -0,0 +1 @@
1
+ export { default as DropdownMenu } from './DropdownMenu';
@@ -0,0 +1,9 @@
1
+ export declare const dropdownMenuContainer: string;
2
+ export declare const dropdownMenuTrigger: string;
3
+ export declare const dropdownMenuContent: string;
4
+ export declare const dropdownMenuPositionVariants: Record<"topLeft" | "topRight" | "bottomLeft" | "bottomRight", string>;
5
+ export declare const dropdownMenuItem: string;
6
+ export declare const dropdownMenuItemVariants: Record<"default" | "disabled" | "destructive", string>;
7
+ export declare const dropdownMenuSeparator: string;
8
+ export declare const dropdownMenuGroup: string;
9
+ export declare const dropdownMenuLabel: string;
@@ -0,0 +1,93 @@
1
+ import { styleVariants } from '@vanilla-extract/css';
2
+ import { vars } from '../../styles/theme.css';
3
+ import { styleWithLayer } from '../../styles/utils';
4
+ export const dropdownMenuContainer = styleWithLayer({
5
+ position: 'relative',
6
+ display: 'inline-block',
7
+ });
8
+ export const dropdownMenuTrigger = styleWithLayer({
9
+ cursor: 'pointer',
10
+ userSelect: 'none',
11
+ });
12
+ export const dropdownMenuContent = styleWithLayer({
13
+ position: 'absolute',
14
+ backgroundColor: vars.colors.backgroundDefault,
15
+ border: `1px solid ${vars.colors.borderDefault}`,
16
+ borderRadius: '0.5rem',
17
+ boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
18
+ minWidth: '160px',
19
+ zIndex: 50,
20
+ overflow: 'hidden',
21
+ marginTop: '0.25rem',
22
+ });
23
+ export const dropdownMenuPositionVariants = styleVariants({
24
+ bottomLeft: {
25
+ top: '100%',
26
+ left: 0,
27
+ },
28
+ bottomRight: {
29
+ top: '100%',
30
+ right: 0,
31
+ },
32
+ topLeft: {
33
+ bottom: '100%',
34
+ left: 0,
35
+ marginTop: 0,
36
+ marginBottom: '0.25rem',
37
+ },
38
+ topRight: {
39
+ bottom: '100%',
40
+ right: 0,
41
+ marginTop: 0,
42
+ marginBottom: '0.25rem',
43
+ },
44
+ });
45
+ export const dropdownMenuItem = styleWithLayer({
46
+ padding: '0.75rem 1rem',
47
+ cursor: 'pointer',
48
+ display: 'flex',
49
+ alignItems: 'center',
50
+ gap: '0.5rem',
51
+ fontSize: '14px',
52
+ color: vars.colors.textPrimary,
53
+ transition: 'background-color 0.15s ease',
54
+ ':hover': {
55
+ backgroundColor: vars.colors.backgroundMuted,
56
+ },
57
+ ':focus-visible': {
58
+ outline: 'none',
59
+ backgroundColor: vars.colors.backgroundMuted,
60
+ },
61
+ });
62
+ export const dropdownMenuItemVariants = styleVariants({
63
+ default: {},
64
+ destructive: {
65
+ color: vars.colors.alertErrorText,
66
+ ':hover': {
67
+ backgroundColor: vars.colors.alertErrorBackground,
68
+ },
69
+ },
70
+ disabled: {
71
+ opacity: 0.5,
72
+ cursor: 'not-allowed',
73
+ ':hover': {
74
+ backgroundColor: 'transparent',
75
+ },
76
+ },
77
+ });
78
+ export const dropdownMenuSeparator = styleWithLayer({
79
+ height: '1px',
80
+ backgroundColor: vars.colors.borderMuted,
81
+ margin: '0.5rem 0',
82
+ });
83
+ export const dropdownMenuGroup = styleWithLayer({
84
+ padding: '0.5rem 0',
85
+ });
86
+ export const dropdownMenuLabel = styleWithLayer({
87
+ padding: '0.5rem 1rem',
88
+ fontSize: '12px',
89
+ fontWeight: '600',
90
+ color: vars.colors.textSecondary,
91
+ textTransform: 'uppercase',
92
+ letterSpacing: '0.05em',
93
+ });