@jordan-mace/chaser-design-system 1.2.2 → 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 (514) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +2 -2
  2. package/dist/components/Accordion/Accordion.js +26 -91
  3. package/dist/components/Accordion/index.js +1 -2
  4. package/dist/components/Accordion/styles.css.js +65 -14
  5. package/dist/components/Alert/Alert.d.ts +1 -1
  6. package/dist/components/Alert/Alert.js +8 -28
  7. package/dist/components/Alert/index.js +1 -2
  8. package/dist/components/Alert/styles.css.js +54 -13
  9. package/dist/components/AspectRatio/AspectRatio.js +9 -24
  10. package/dist/components/AspectRatio/index.js +1 -2
  11. package/dist/components/Avatar/Avatar.d.ts +1 -1
  12. package/dist/components/Avatar/Avatar.js +10 -24
  13. package/dist/components/Avatar/index.js +1 -2
  14. package/dist/components/Avatar/styles.css.js +151 -19
  15. package/dist/components/Badge/Badge.d.ts +1 -1
  16. package/dist/components/Badge/Badge.js +8 -13
  17. package/dist/components/Badge/index.js +1 -2
  18. package/dist/components/Badge/styles.css.js +77 -23
  19. package/dist/components/Box/Box.js +18 -17
  20. package/dist/components/Box/index.js +1 -2
  21. package/dist/components/Box/reset.css.js +15 -3
  22. package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -2
  23. package/dist/components/Breadcrumb/Breadcrumb.js +8 -66
  24. package/dist/components/Breadcrumb/index.js +1 -2
  25. package/dist/components/Breadcrumb/styles.css.js +50 -10
  26. package/dist/components/Button/Button.d.ts +1 -1
  27. package/dist/components/Button/Button.js +8 -15
  28. package/dist/components/Button/index.js +1 -2
  29. package/dist/components/Button/styles.css.js +30 -9
  30. package/dist/components/Card/Card.d.ts +1 -1
  31. package/dist/components/Card/Card.js +8 -15
  32. package/dist/components/Card/index.js +1 -2
  33. package/dist/components/Card/styles.css.js +25 -10
  34. package/dist/components/Checkbox/Checkbox.js +20 -45
  35. package/dist/components/Checkbox/index.js +1 -2
  36. package/dist/components/Checkbox/styles.css.js +31 -7
  37. package/dist/components/Collapse/Collapse.d.ts +1 -1
  38. package/dist/components/Collapse/Collapse.js +40 -42
  39. package/dist/components/Collapse/index.js +1 -2
  40. package/dist/components/Collapse/styles.css.js +36 -8
  41. package/dist/components/Combobox/Combobox.d.ts +1 -1
  42. package/dist/components/Combobox/Combobox.js +62 -129
  43. package/dist/components/Combobox/index.js +1 -2
  44. package/dist/components/Combobox/styles.css.js +142 -20
  45. package/dist/components/Container/Container.js +9 -19
  46. package/dist/components/Container/index.js +1 -2
  47. package/dist/components/Divider/Divider.d.ts +1 -1
  48. package/dist/components/Divider/Divider.js +8 -14
  49. package/dist/components/Divider/index.js +1 -2
  50. package/dist/components/Divider/styles.css.js +41 -19
  51. package/dist/components/Drawer/Drawer.d.ts +1 -1
  52. package/dist/components/Drawer/Drawer.js +37 -85
  53. package/dist/components/Drawer/index.js +1 -2
  54. package/dist/components/Drawer/styles.css.js +125 -17
  55. package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
  56. package/dist/components/DropdownMenu/DropdownMenu.js +33 -88
  57. package/dist/components/DropdownMenu/index.js +1 -2
  58. package/dist/components/DropdownMenu/styles.css.d.ts +1 -1
  59. package/dist/components/DropdownMenu/styles.css.js +93 -22
  60. package/dist/components/EmptyState/EmptyState.d.ts +1 -1
  61. package/dist/components/EmptyState/EmptyState.js +8 -32
  62. package/dist/components/EmptyState/index.js +1 -2
  63. package/dist/components/EmptyState/styles.css.js +30 -9
  64. package/dist/components/FileUpload/FileUpload.d.ts +1 -1
  65. package/dist/components/FileUpload/FileUpload.js +63 -175
  66. package/dist/components/FileUpload/index.js +1 -2
  67. package/dist/components/FileUpload/styles.css.js +145 -32
  68. package/dist/components/Form/Form.d.ts +1 -1
  69. package/dist/components/Form/Form.js +8 -15
  70. package/dist/components/Form/FormInput.d.ts +1 -1
  71. package/dist/components/Form/FormInput.js +9 -15
  72. package/dist/components/Form/index.js +2 -3
  73. package/dist/components/Form/styles.css.js +11 -4
  74. package/dist/components/Grid/Grid.js +14 -19
  75. package/dist/components/Grid/index.js +1 -2
  76. package/dist/components/Icon/Icon.d.ts +1 -1
  77. package/dist/components/Icon/Icon.js +12 -20
  78. package/dist/components/Icon/index.js +1 -2
  79. package/dist/components/Icon/styles.css.js +9 -3
  80. package/dist/components/Input/Input.d.ts +1 -1
  81. package/dist/components/Input/Input.js +9 -38
  82. package/dist/components/Input/index.js +1 -2
  83. package/dist/components/Input/styles.css.js +8 -4
  84. package/dist/components/Kbd/Kbd.d.ts +1 -1
  85. package/dist/components/Kbd/Kbd.js +6 -10
  86. package/dist/components/Kbd/index.js +1 -2
  87. package/dist/components/Kbd/styles.css.js +16 -5
  88. package/dist/components/List/List.d.ts +1 -1
  89. package/dist/components/List/List.js +7 -11
  90. package/dist/components/List/ListItem.d.ts +1 -1
  91. package/dist/components/List/ListItem.js +7 -11
  92. package/dist/components/List/index.js +2 -3
  93. package/dist/components/List/styles.css.js +11 -6
  94. package/dist/components/Modal/Modal.d.ts +1 -1
  95. package/dist/components/Modal/Modal.js +21 -57
  96. package/dist/components/Modal/index.js +1 -2
  97. package/dist/components/Modal/styles.css.js +92 -16
  98. package/dist/components/Navbar/Navbar.d.ts +1 -1
  99. package/dist/components/Navbar/Navbar.js +8 -16
  100. package/dist/components/Navbar/NavbarItem.d.ts +1 -1
  101. package/dist/components/Navbar/NavbarItem.js +8 -12
  102. package/dist/components/Navbar/index.js +2 -3
  103. package/dist/components/Navbar/styles.css.js +3 -4
  104. package/dist/components/NumberInput/NumberInput.d.ts +1 -1
  105. package/dist/components/NumberInput/NumberInput.js +25 -94
  106. package/dist/components/NumberInput/index.js +1 -2
  107. package/dist/components/NumberInput/styles.css.js +117 -17
  108. package/dist/components/Pagination/Pagination.d.ts +1 -2
  109. package/dist/components/Pagination/Pagination.js +34 -57
  110. package/dist/components/Pagination/index.js +1 -2
  111. package/dist/components/Pagination/styles.css.js +44 -11
  112. package/dist/components/Popover/Popover.d.ts +1 -1
  113. package/dist/components/Popover/Popover.js +43 -93
  114. package/dist/components/Popover/index.js +1 -2
  115. package/dist/components/Popover/styles.css.d.ts +2 -2
  116. package/dist/components/Popover/styles.css.js +185 -33
  117. package/dist/components/Progress/Progress.d.ts +1 -2
  118. package/dist/components/Progress/Progress.js +8 -54
  119. package/dist/components/Progress/index.js +1 -2
  120. package/dist/components/Progress/styles.css.js +71 -18
  121. package/dist/components/Radio/Radio.d.ts +2 -2
  122. package/dist/components/Radio/Radio.js +17 -52
  123. package/dist/components/Radio/index.js +1 -2
  124. package/dist/components/Radio/styles.css.js +42 -9
  125. package/dist/components/ScrollArea/ScrollArea.d.ts +1 -1
  126. package/dist/components/ScrollArea/ScrollArea.js +8 -18
  127. package/dist/components/ScrollArea/index.js +1 -2
  128. package/dist/components/ScrollArea/styles.css.js +25 -11
  129. package/dist/components/Select/Select.js +9 -35
  130. package/dist/components/Select/index.js +1 -2
  131. package/dist/components/Select/styles.css.js +82 -11
  132. package/dist/components/Separator/Separator.d.ts +1 -2
  133. package/dist/components/Separator/Separator.js +8 -13
  134. package/dist/components/Separator/index.js +1 -2
  135. package/dist/components/Separator/styles.css.js +28 -15
  136. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  137. package/dist/components/Skeleton/Skeleton.js +9 -24
  138. package/dist/components/Skeleton/index.js +1 -2
  139. package/dist/components/Skeleton/styles.css.js +56 -20
  140. package/dist/components/Spinner/Spinner.d.ts +1 -1
  141. package/dist/components/Spinner/Spinner.js +8 -14
  142. package/dist/components/Spinner/index.js +1 -2
  143. package/dist/components/Spinner/styles.css.d.ts +1 -1
  144. package/dist/components/Spinner/styles.css.js +55 -19
  145. package/dist/components/Stack/Stack.js +10 -25
  146. package/dist/components/Stack/index.js +1 -2
  147. package/dist/components/Stepper/Stepper.d.ts +1 -1
  148. package/dist/components/Stepper/Stepper.js +19 -64
  149. package/dist/components/Stepper/index.js +1 -2
  150. package/dist/components/Stepper/styles.css.js +104 -22
  151. package/dist/components/Table/Table.d.ts +7 -7
  152. package/dist/components/Table/Table.js +30 -56
  153. package/dist/components/Table/index.js +1 -2
  154. package/dist/components/Table/styles.css.js +49 -15
  155. package/dist/components/Tabs/Tabs.d.ts +4 -4
  156. package/dist/components/Tabs/Tabs.js +33 -52
  157. package/dist/components/Tabs/index.js +1 -2
  158. package/dist/components/Tabs/styles.css.js +100 -14
  159. package/dist/components/Tag/Tag.d.ts +2 -2
  160. package/dist/components/Tag/Tag.js +16 -38
  161. package/dist/components/Tag/index.js +1 -2
  162. package/dist/components/Tag/styles.css.d.ts +1 -1
  163. package/dist/components/Tag/styles.css.js +93 -14
  164. package/dist/components/Text/Header.d.ts +1 -1
  165. package/dist/components/Text/Header.js +8 -12
  166. package/dist/components/Text/P.d.ts +1 -1
  167. package/dist/components/Text/P.js +8 -12
  168. package/dist/components/Text/index.js +2 -3
  169. package/dist/components/Text/styles.css.js +13 -6
  170. package/dist/components/TextArea/TextArea.d.ts +1 -1
  171. package/dist/components/TextArea/TextArea.js +9 -38
  172. package/dist/components/TextArea/index.js +1 -2
  173. package/dist/components/TextArea/styles.css.js +10 -4
  174. package/dist/components/Toast/Toast.d.ts +3 -3
  175. package/dist/components/Toast/Toast.js +85 -144
  176. package/dist/components/Toast/index.js +1 -2
  177. package/dist/components/Toast/styles.css.d.ts +1 -1
  178. package/dist/components/Toast/styles.css.js +192 -32
  179. package/dist/components/Toggle/Toggle.d.ts +1 -1
  180. package/dist/components/Toggle/Toggle.js +12 -57
  181. package/dist/components/Toggle/index.js +1 -2
  182. package/dist/components/Toggle/styles.css.js +118 -24
  183. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  184. package/dist/components/Tooltip/Tooltip.js +12 -37
  185. package/dist/components/Tooltip/index.js +1 -2
  186. package/dist/components/Tooltip/styles.css.js +86 -17
  187. package/dist/components/VisuallyHidden/VisuallyHidden.js +7 -6
  188. package/dist/components/VisuallyHidden/index.js +1 -2
  189. package/dist/components/VisuallyHidden/styles.css.js +12 -3
  190. package/dist/components/index.js +47 -48
  191. package/dist/index.js +1 -1
  192. package/dist/styles/layers.css.js +3 -4
  193. package/dist/styles/sprinkles.css.d.ts +115 -115
  194. package/dist/styles/sprinkles.css.js +72 -2219
  195. package/dist/styles/theme.css.js +48 -38
  196. package/dist/styles/utils.js +7 -8
  197. package/package.json +12 -16
  198. package/src/components/Accordion/Accordion.stories.tsx +73 -0
  199. package/src/components/Accordion/Accordion.test.tsx +54 -0
  200. package/src/components/Accordion/Accordion.tsx +146 -0
  201. package/src/components/Accordion/index.ts +1 -0
  202. package/src/components/Accordion/styles.css.ts +72 -0
  203. package/src/components/Alert/Alert.stories.tsx +82 -0
  204. package/src/components/Alert/Alert.test.tsx +58 -0
  205. package/src/components/Alert/Alert.tsx +48 -0
  206. package/src/components/Alert/__screenshots__/Alert.test.tsx/Alert-renders-dismissible-alert-correctly-1-chromium-linux.png +0 -0
  207. package/src/components/Alert/__screenshots__/Alert.test.tsx/Alert-renders-error-alert-correctly-1-chromium-linux.png +0 -0
  208. package/src/components/Alert/__screenshots__/Alert.test.tsx/Alert-renders-info-alert-correctly-1-chromium-linux.png +0 -0
  209. package/src/components/Alert/__screenshots__/Alert.test.tsx/Alert-renders-success-alert-correctly-1-chromium-linux.png +0 -0
  210. package/src/components/Alert/__screenshots__/Alert.test.tsx/Alert-renders-warning-alert-correctly-1-chromium-linux.png +0 -0
  211. package/src/components/Alert/index.ts +1 -0
  212. package/src/components/Alert/styles.css.ts +58 -0
  213. package/src/components/AspectRatio/AspectRatio.stories.tsx +85 -0
  214. package/src/components/AspectRatio/AspectRatio.test.tsx +50 -0
  215. package/src/components/AspectRatio/AspectRatio.tsx +42 -0
  216. package/src/components/AspectRatio/index.ts +2 -0
  217. package/src/components/Avatar/Avatar.stories.tsx +82 -0
  218. package/src/components/Avatar/Avatar.test.tsx +45 -0
  219. package/src/components/Avatar/Avatar.tsx +51 -0
  220. package/src/components/Avatar/index.ts +1 -0
  221. package/src/components/Avatar/styles.css.ts +155 -0
  222. package/src/components/Badge/Badge.stories.tsx +141 -0
  223. package/src/components/Badge/Badge.test.tsx +74 -0
  224. package/src/components/Badge/Badge.tsx +46 -0
  225. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-does-not-render-children-when-dot-is-true-1.png +0 -0
  226. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-default-badge-correctly-1-chromium-linux.png +0 -0
  227. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-dot-badge-correctly-1-chromium-linux.png +0 -0
  228. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-dot-with-size-correctly-1-chromium-linux.png +0 -0
  229. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-dot-with-variant-correctly-1-chromium-linux.png +0 -0
  230. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-error-badge-correctly-1-chromium-linux.png +0 -0
  231. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-info-badge-correctly-1-chromium-linux.png +0 -0
  232. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-large-badge-correctly-1-chromium-linux.png +0 -0
  233. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-medium-badge-correctly-1-chromium-linux.png +0 -0
  234. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-small-badge-correctly-1-chromium-linux.png +0 -0
  235. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-span-element-with-proper-attributes-1.png +0 -0
  236. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-success-badge-correctly-1-chromium-linux.png +0 -0
  237. package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-warning-badge-correctly-1-chromium-linux.png +0 -0
  238. package/src/components/Badge/index.ts +2 -0
  239. package/src/components/Badge/styles.css.ts +82 -0
  240. package/src/components/Box/Box.stories.tsx +183 -0
  241. package/src/components/Box/Box.test.tsx +63 -0
  242. package/src/components/Box/Box.tsx +72 -0
  243. package/src/components/Box/index.ts +2 -0
  244. package/src/components/Box/reset.css.ts +16 -0
  245. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +55 -0
  246. package/src/components/Breadcrumb/Breadcrumb.test.tsx +44 -0
  247. package/src/components/Breadcrumb/Breadcrumb.tsx +102 -0
  248. package/src/components/Breadcrumb/index.ts +1 -0
  249. package/src/components/Breadcrumb/styles.css.ts +56 -0
  250. package/src/components/Button/Button.stories.tsx +60 -0
  251. package/src/components/Button/Button.test.tsx +26 -0
  252. package/src/components/Button/Button.tsx +31 -0
  253. package/src/components/Button/__screenshots__/Button.test.tsx/Button-renders-correctly-1-chromium-win32.png +0 -0
  254. package/src/components/Button/__screenshots__/Button.test.tsx/Button-renders-primary-button-correctly-1-chromium-linux.png +0 -0
  255. package/src/components/Button/__screenshots__/Button.test.tsx/Button-renders-primary-button-correctly-1-chromium-win32.png +0 -0
  256. package/src/components/Button/index.ts +1 -0
  257. package/src/components/Button/styles.css.ts +32 -0
  258. package/src/components/Card/Card.stories.tsx +85 -0
  259. package/src/components/Card/Card.test.tsx +43 -0
  260. package/src/components/Card/Card.tsx +34 -0
  261. package/src/components/Card/__screenshots__/Card.test.tsx/Card-renders-elevated-card-correctly-1-chromium-linux.png +0 -0
  262. package/src/components/Card/__screenshots__/Card.test.tsx/Card-renders-filled-card-correctly-1-chromium-linux.png +0 -0
  263. package/src/components/Card/__screenshots__/Card.test.tsx/Card-renders-outlined-card-correctly-1-chromium-linux.png +0 -0
  264. package/src/components/Card/__screenshots__/Card.test.tsx/Card-renders-with-no-padding-1-chromium-linux.png +0 -0
  265. package/src/components/Card/index.ts +1 -0
  266. package/src/components/Card/styles.css.ts +27 -0
  267. package/src/components/Checkbox/Checkbox.stories.tsx +61 -0
  268. package/src/components/Checkbox/Checkbox.test.tsx +40 -0
  269. package/src/components/Checkbox/Checkbox.tsx +58 -0
  270. package/src/components/Checkbox/index.ts +1 -0
  271. package/src/components/Checkbox/styles.css.ts +34 -0
  272. package/src/components/Collapse/Collapse.stories.tsx +63 -0
  273. package/src/components/Collapse/Collapse.test.tsx +24 -0
  274. package/src/components/Collapse/Collapse.tsx +97 -0
  275. package/src/components/Collapse/index.ts +2 -0
  276. package/src/components/Collapse/styles.css.ts +42 -0
  277. package/src/components/Combobox/Combobox.stories.tsx +100 -0
  278. package/src/components/Combobox/Combobox.test.tsx +49 -0
  279. package/src/components/Combobox/Combobox.tsx +266 -0
  280. package/src/components/Combobox/index.ts +2 -0
  281. package/src/components/Combobox/styles.css.ts +155 -0
  282. package/src/components/Container/Container.stories.tsx +69 -0
  283. package/src/components/Container/Container.test.tsx +42 -0
  284. package/src/components/Container/Container.tsx +47 -0
  285. package/src/components/Container/index.ts +2 -0
  286. package/src/components/Divider/Divider.stories.tsx +121 -0
  287. package/src/components/Divider/Divider.test.tsx +56 -0
  288. package/src/components/Divider/Divider.tsx +40 -0
  289. package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-applies-orientation-correctly-1.png +0 -0
  290. package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-horizontal-divider-correctly-1-chromium-linux.png +0 -0
  291. package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-hr-element-with-proper-attributes-1.png +0 -0
  292. package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-large-divider-correctly-1-chromium-linux.png +0 -0
  293. package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-medium-divider-correctly-1-chromium-linux.png +0 -0
  294. package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-small-divider-correctly-1-chromium-linux.png +0 -0
  295. package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-vertical-divider-correctly-1-chromium-linux.png +0 -0
  296. package/src/components/Divider/index.ts +2 -0
  297. package/src/components/Divider/styles.css.ts +45 -0
  298. package/src/components/Drawer/Drawer.stories.tsx +99 -0
  299. package/src/components/Drawer/Drawer.test.tsx +51 -0
  300. package/src/components/Drawer/Drawer.tsx +148 -0
  301. package/src/components/Drawer/index.ts +2 -0
  302. package/src/components/Drawer/styles.css.ts +138 -0
  303. package/src/components/DropdownMenu/DropdownMenu.stories.tsx +72 -0
  304. package/src/components/DropdownMenu/DropdownMenu.test.tsx +43 -0
  305. package/src/components/DropdownMenu/DropdownMenu.tsx +156 -0
  306. package/src/components/DropdownMenu/index.ts +2 -0
  307. package/src/components/DropdownMenu/styles.css.ts +102 -0
  308. package/src/components/EmptyState/EmptyState.stories.tsx +47 -0
  309. package/src/components/EmptyState/EmptyState.test.tsx +25 -0
  310. package/src/components/EmptyState/EmptyState.tsx +53 -0
  311. package/src/components/EmptyState/index.ts +2 -0
  312. package/src/components/EmptyState/styles.css.ts +36 -0
  313. package/src/components/FileUpload/FileUpload.stories.tsx +138 -0
  314. package/src/components/FileUpload/FileUpload.test.tsx +56 -0
  315. package/src/components/FileUpload/FileUpload.tsx +269 -0
  316. package/src/components/FileUpload/index.ts +2 -0
  317. package/src/components/FileUpload/styles.css.ts +164 -0
  318. package/src/components/Form/Form.stories.tsx +51 -0
  319. package/src/components/Form/Form.test.tsx +41 -0
  320. package/src/components/Form/Form.tsx +28 -0
  321. package/src/components/Form/FormInput.tsx +16 -0
  322. package/src/components/Form/__screenshots__/Form.test.tsx/Form-can-submit-1.png +0 -0
  323. package/src/components/Form/__screenshots__/Form.test.tsx/Form-renders-correctly-1-chromium-win32.png +0 -0
  324. package/src/components/Form/__screenshots__/Form.test.tsx/Form-renders-form-correctly-1-chromium-linux.png +0 -0
  325. package/src/components/Form/__screenshots__/Form.test.tsx/Form-renders-form-correctly-1-chromium-win32.png +0 -0
  326. package/src/components/Form/index.ts +2 -0
  327. package/src/components/Form/styles.css.ts +13 -0
  328. package/src/components/Grid/Grid.stories.tsx +134 -0
  329. package/src/components/Grid/Grid.test.tsx +41 -0
  330. package/src/components/Grid/Grid.tsx +48 -0
  331. package/src/components/Grid/index.ts +2 -0
  332. package/src/components/Icon/Icon.tsx +43 -0
  333. package/src/components/Icon/index.ts +1 -0
  334. package/src/components/Icon/styles.css.ts +11 -0
  335. package/src/components/Input/Input.stories.tsx +38 -0
  336. package/src/components/Input/Input.test.tsx +16 -0
  337. package/src/components/Input/Input.tsx +43 -0
  338. package/src/components/Input/__screenshots__/Input.test.tsx/Input-renders-correctly-with-label-1-chromium-linux.png +0 -0
  339. package/src/components/Input/__screenshots__/Input.test.tsx/Input-renders-correctly-with-label-1-chromium-win32.png +0 -0
  340. package/src/components/Input/__screenshots__/Input.test.tsx/Input-renders-correctly-without-label-1-chromium-linux.png +0 -0
  341. package/src/components/Input/__screenshots__/Input.test.tsx/Input-renders-correctly-without-label-1-chromium-win32.png +0 -0
  342. package/src/components/Input/index.ts +1 -0
  343. package/src/components/Input/styles.css.ts +10 -0
  344. package/src/components/Kbd/Kbd.stories.tsx +53 -0
  345. package/src/components/Kbd/Kbd.test.tsx +22 -0
  346. package/src/components/Kbd/Kbd.tsx +17 -0
  347. package/src/components/Kbd/index.ts +2 -0
  348. package/src/components/Kbd/styles.css.ts +18 -0
  349. package/src/components/List/List.test.tsx +18 -0
  350. package/src/components/List/List.tsx +13 -0
  351. package/src/components/List/ListItem.tsx +13 -0
  352. package/src/components/List/__screenshots__/List.test.tsx/List-renders-correctly-1-chromium-win32.png +0 -0
  353. package/src/components/List/__screenshots__/List.test.tsx/List-renders-list-correctly-1-chromium-linux.png +0 -0
  354. package/src/components/List/__screenshots__/List.test.tsx/List-renders-list-correctly-1-chromium-win32.png +0 -0
  355. package/src/components/List/index.ts +2 -0
  356. package/src/components/List/styles.css.ts +13 -0
  357. package/src/components/Modal/Modal.stories.tsx +202 -0
  358. package/src/components/Modal/Modal.test.tsx +168 -0
  359. package/src/components/Modal/Modal.tsx +109 -0
  360. package/src/components/Modal/__screenshots__/Modal.test.tsx/Modal-displays-title-correctly-1.png +0 -0
  361. package/src/components/Modal/__screenshots__/Modal.test.tsx/Modal-handles-backdrop-click-to-close-1.png +0 -0
  362. package/src/components/Modal/index.ts +2 -0
  363. package/src/components/Modal/styles.css.ts +99 -0
  364. package/src/components/Navbar/Navbar.stories.tsx +49 -0
  365. package/src/components/Navbar/Navbar.test.tsx +18 -0
  366. package/src/components/Navbar/Navbar.tsx +27 -0
  367. package/src/components/Navbar/NavbarItem.tsx +14 -0
  368. package/src/components/Navbar/__screenshots__/Navbar.test.tsx/Navbar-renders-correctly-1-chromium-win32.png +0 -0
  369. package/src/components/Navbar/__screenshots__/Navbar.test.tsx/Navbar-renders-navbar-correctly-1-chromium-linux.png +0 -0
  370. package/src/components/Navbar/__screenshots__/Navbar.test.tsx/Navbar-renders-navbar-correctly-1-chromium-win32.png +0 -0
  371. package/src/components/Navbar/index.ts +2 -0
  372. package/src/components/Navbar/styles.css.ts +5 -0
  373. package/src/components/NumberInput/NumberInput.stories.tsx +101 -0
  374. package/src/components/NumberInput/NumberInput.test.tsx +39 -0
  375. package/src/components/NumberInput/NumberInput.tsx +161 -0
  376. package/src/components/NumberInput/index.ts +2 -0
  377. package/src/components/NumberInput/styles.css.ts +127 -0
  378. package/src/components/Pagination/Pagination.stories.tsx +63 -0
  379. package/src/components/Pagination/Pagination.test.tsx +27 -0
  380. package/src/components/Pagination/Pagination.tsx +138 -0
  381. package/src/components/Pagination/index.ts +2 -0
  382. package/src/components/Pagination/styles.css.ts +48 -0
  383. package/src/components/Popover/Popover.stories.tsx +80 -0
  384. package/src/components/Popover/Popover.test.tsx +47 -0
  385. package/src/components/Popover/Popover.tsx +171 -0
  386. package/src/components/Popover/index.ts +2 -0
  387. package/src/components/Popover/styles.css.ts +197 -0
  388. package/src/components/Progress/Progress.stories.tsx +73 -0
  389. package/src/components/Progress/Progress.test.tsx +53 -0
  390. package/src/components/Progress/Progress.tsx +66 -0
  391. package/src/components/Progress/index.ts +1 -0
  392. package/src/components/Progress/styles.css.ts +75 -0
  393. package/src/components/Radio/Radio.stories.tsx +75 -0
  394. package/src/components/Radio/Radio.test.tsx +54 -0
  395. package/src/components/Radio/Radio.tsx +104 -0
  396. package/src/components/Radio/index.ts +1 -0
  397. package/src/components/Radio/styles.css.ts +47 -0
  398. package/src/components/ScrollArea/ScrollArea.stories.tsx +63 -0
  399. package/src/components/ScrollArea/ScrollArea.test.tsx +24 -0
  400. package/src/components/ScrollArea/ScrollArea.tsx +50 -0
  401. package/src/components/ScrollArea/index.ts +2 -0
  402. package/src/components/ScrollArea/styles.css.ts +28 -0
  403. package/src/components/Select/Select.stories.tsx +94 -0
  404. package/src/components/Select/Select.test.tsx +57 -0
  405. package/src/components/Select/Select.tsx +60 -0
  406. package/src/components/Select/index.ts +1 -0
  407. package/src/components/Select/styles.css.ts +86 -0
  408. package/src/components/Separator/Separator.stories.tsx +49 -0
  409. package/src/components/Separator/Separator.test.tsx +22 -0
  410. package/src/components/Separator/Separator.tsx +37 -0
  411. package/src/components/Separator/index.ts +2 -0
  412. package/src/components/Separator/styles.css.ts +32 -0
  413. package/src/components/Skeleton/Skeleton.stories.tsx +78 -0
  414. package/src/components/Skeleton/Skeleton.test.tsx +36 -0
  415. package/src/components/Skeleton/Skeleton.tsx +67 -0
  416. package/src/components/Skeleton/index.ts +2 -0
  417. package/src/components/Skeleton/styles.css.ts +62 -0
  418. package/src/components/Spinner/Spinner.stories.tsx +123 -0
  419. package/src/components/Spinner/Spinner.test.tsx +73 -0
  420. package/src/components/Spinner/Spinner.tsx +41 -0
  421. package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-div-element-with-proper-attributes-1.png +0 -0
  422. package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-error-color-correctly-1-chromium-linux.png +0 -0
  423. package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-info-color-correctly-1-chromium-linux.png +0 -0
  424. package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-large-spinner-correctly-1-chromium-linux.png +0 -0
  425. package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-medium-spinner-correctly-1-chromium-linux.png +0 -0
  426. package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-primary-spinner-correctly-1-chromium-linux.png +0 -0
  427. package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-secondary-color-correctly-1-chromium-linux.png +0 -0
  428. package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-small-spinner-correctly-1-chromium-linux.png +0 -0
  429. package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-success-color-correctly-1-chromium-linux.png +0 -0
  430. package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-warning-color-correctly-1-chromium-linux.png +0 -0
  431. package/src/components/Spinner/index.ts +2 -0
  432. package/src/components/Spinner/styles.css.ts +59 -0
  433. package/src/components/Stack/Stack.stories.tsx +123 -0
  434. package/src/components/Stack/Stack.test.tsx +48 -0
  435. package/src/components/Stack/Stack.tsx +60 -0
  436. package/src/components/Stack/index.ts +2 -0
  437. package/src/components/Stepper/Stepper.stories.tsx +85 -0
  438. package/src/components/Stepper/Stepper.test.tsx +47 -0
  439. package/src/components/Stepper/Stepper.tsx +133 -0
  440. package/src/components/Stepper/index.ts +2 -0
  441. package/src/components/Stepper/styles.css.ts +118 -0
  442. package/src/components/Table/Table.stories.tsx +147 -0
  443. package/src/components/Table/Table.test.tsx +104 -0
  444. package/src/components/Table/Table.tsx +131 -0
  445. package/src/components/Table/index.ts +1 -0
  446. package/src/components/Table/styles.css.ts +57 -0
  447. package/src/components/Tabs/Tabs.stories.tsx +104 -0
  448. package/src/components/Tabs/Tabs.test.tsx +52 -0
  449. package/src/components/Tabs/Tabs.tsx +147 -0
  450. package/src/components/Tabs/index.ts +1 -0
  451. package/src/components/Tabs/styles.css.ts +106 -0
  452. package/src/components/Tag/Tag.stories.tsx +72 -0
  453. package/src/components/Tag/Tag.test.tsx +49 -0
  454. package/src/components/Tag/Tag.tsx +72 -0
  455. package/src/components/Tag/index.ts +1 -0
  456. package/src/components/Tag/styles.css.ts +96 -0
  457. package/src/components/Text/Header.stories.tsx +45 -0
  458. package/src/components/Text/Header.tsx +20 -0
  459. package/src/components/Text/P.stories.tsx +24 -0
  460. package/src/components/Text/P.tsx +19 -0
  461. package/src/components/Text/Text.test.tsx +32 -0
  462. package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h1-correctly-1-chromium-linux.png +0 -0
  463. package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h1-correctly-1-chromium-win32.png +0 -0
  464. package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h2-correctly-1-chromium-linux.png +0 -0
  465. package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h2-correctly-1-chromium-win32.png +0 -0
  466. package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h3-correctly-1-chromium-linux.png +0 -0
  467. package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h3-correctly-1-chromium-win32.png +0 -0
  468. package/src/components/Text/__screenshots__/Text.test.tsx/P-renders-correctly-1-chromium-win32.png +0 -0
  469. package/src/components/Text/__screenshots__/Text.test.tsx/P-renders-p-correctly-1-chromium-linux.png +0 -0
  470. package/src/components/Text/__screenshots__/Text.test.tsx/P-renders-p-correctly-1-chromium-win32.png +0 -0
  471. package/src/components/Text/index.ts +2 -0
  472. package/src/components/Text/styles.css.ts +15 -0
  473. package/src/components/TextArea/TextArea.stories.tsx +40 -0
  474. package/src/components/TextArea/TextArea.test.tsx +16 -0
  475. package/src/components/TextArea/TextArea.tsx +43 -0
  476. package/src/components/TextArea/index.ts +2 -0
  477. package/src/components/TextArea/styles.css.ts +12 -0
  478. package/src/components/Toast/Toast.tsx +342 -0
  479. package/src/components/Toast/index.ts +9 -0
  480. package/src/components/Toast/styles.css.ts +213 -0
  481. package/src/components/Toggle/Toggle.stories.tsx +190 -0
  482. package/src/components/Toggle/Toggle.test.tsx +85 -0
  483. package/src/components/Toggle/Toggle.tsx +94 -0
  484. package/src/components/Toggle/index.ts +2 -0
  485. package/src/components/Toggle/styles.css.ts +130 -0
  486. package/src/components/Tooltip/Tooltip.stories.tsx +111 -0
  487. package/src/components/Tooltip/Tooltip.test.tsx +93 -0
  488. package/src/components/Tooltip/Tooltip.tsx +72 -0
  489. package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-has-proper-role-attribute-1.png +0 -0
  490. package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-bottom-tooltip-correctly-1-chromium-linux.png +0 -0
  491. package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-left-tooltip-correctly-1-chromium-linux.png +0 -0
  492. package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-right-tooltip-correctly-1-chromium-linux.png +0 -0
  493. package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-tooltip-without-arrow-1-chromium-linux.png +0 -0
  494. package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-top-tooltip-correctly-1-chromium-linux.png +0 -0
  495. package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-with-tooltip-content-1.png +0 -0
  496. package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-shows-tooltip-on-hover-1.png +0 -0
  497. package/src/components/Tooltip/index.ts +2 -0
  498. package/src/components/Tooltip/styles.css.ts +94 -0
  499. package/src/components/VisuallyHidden/VisuallyHidden.stories.tsx +42 -0
  500. package/src/components/VisuallyHidden/VisuallyHidden.test.tsx +20 -0
  501. package/src/components/VisuallyHidden/VisuallyHidden.tsx +26 -0
  502. package/src/components/VisuallyHidden/index.ts +2 -0
  503. package/src/components/VisuallyHidden/styles.css.ts +14 -0
  504. package/src/components/index.ts +68 -0
  505. package/src/index.ts +1 -0
  506. package/src/styles/layers.css.ts +3 -0
  507. package/src/styles/reset.css.ts +79 -0
  508. package/src/styles/sprinkles.css.ts +177 -0
  509. package/src/styles/theme.css.ts +55 -0
  510. package/src/styles/utils.ts +9 -0
  511. package/dist/layers.css.js +0 -4
  512. package/dist/reset.css.js +0 -1
  513. package/dist/styles/reset.css.js +0 -1
  514. package/dist/theme.css.js +0 -41
@@ -0,0 +1,28 @@
1
+ import { style, styleVariants } from '@vanilla-extract/css';
2
+ import { vars } from '../../styles/theme.css';
3
+ import { styleWithLayer } from '../../styles/utils';
4
+
5
+ export const scrollArea = styleWithLayer({
6
+ overflow: 'auto',
7
+ scrollbarWidth: 'thin',
8
+ scrollbarColor: `${vars.colors.borderDefault} ${vars.colors.backgroundMuted}`,
9
+ });
10
+
11
+ export const scrollAreaOrientation = styleVariants({
12
+ vertical: {
13
+ overflowX: 'hidden',
14
+ overflowY: 'auto',
15
+ },
16
+ horizontal: {
17
+ overflowX: 'auto',
18
+ overflowY: 'hidden',
19
+ },
20
+ both: {
21
+ overflow: 'auto',
22
+ },
23
+ });
24
+
25
+ export const scrollAreaViewport = styleWithLayer({
26
+ width: '100%',
27
+ height: '100%',
28
+ });
@@ -0,0 +1,94 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { fn } from 'storybook/test';
3
+
4
+ import { Select } from '.';
5
+ import React from 'react';
6
+
7
+ const meta = {
8
+ title: 'Components/Select',
9
+ component: Select,
10
+ parameters: {
11
+ layout: 'centered',
12
+ },
13
+ tags: ['autodocs'],
14
+ args: { onChange: fn() },
15
+ } satisfies Meta<typeof Select>;
16
+
17
+ export default meta;
18
+ type Story = StoryObj<typeof meta>;
19
+
20
+ const options = [
21
+ { value: 'option1', label: 'Option 1' },
22
+ { value: 'option2', label: 'Option 2' },
23
+ { value: 'option3', label: 'Option 3' },
24
+ { value: 'option4', label: 'Option 4' },
25
+ ];
26
+
27
+ export const Default: Story = {
28
+ args: {
29
+ options,
30
+ },
31
+ };
32
+
33
+ export const WithLabel: Story = {
34
+ args: {
35
+ label: 'Choose an option',
36
+ options,
37
+ },
38
+ };
39
+
40
+ export const WithDefaultValue: Story = {
41
+ args: {
42
+ label: 'Choose an option',
43
+ options,
44
+ defaultValue: 'option2',
45
+ },
46
+ };
47
+
48
+ export const WithPlaceholder: Story = {
49
+ args: {
50
+ label: 'Choose an option',
51
+ placeholder: 'Select...',
52
+ options: [
53
+ { value: '', label: 'Select...', disabled: true },
54
+ ...options,
55
+ ],
56
+ },
57
+ };
58
+
59
+ export const Error: Story = {
60
+ args: {
61
+ label: 'Choose an option',
62
+ options,
63
+ error: true,
64
+ },
65
+ };
66
+
67
+ export const Disabled: Story = {
68
+ args: {
69
+ label: 'Choose an option',
70
+ options,
71
+ disabled: true,
72
+ defaultValue: 'option2',
73
+ },
74
+ };
75
+
76
+ export const WithDisabledOptions: Story = {
77
+ args: {
78
+ label: 'Choose an option',
79
+ options: [
80
+ { value: 'option1', label: 'Option 1' },
81
+ { value: 'option2', label: 'Option 2 (disabled)', disabled: true },
82
+ { value: 'option3', label: 'Option 3' },
83
+ { value: 'option4', label: 'Option 4' },
84
+ ],
85
+ },
86
+ };
87
+
88
+ export const NotFullWidth: Story = {
89
+ args: {
90
+ label: 'Choose an option',
91
+ options,
92
+ fullWidth: false,
93
+ },
94
+ };
@@ -0,0 +1,57 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { render } from 'vitest-browser-react';
3
+ import Select from './Select';
4
+ import React from 'react';
5
+
6
+ describe('Select', () => {
7
+ const options = [
8
+ { value: 'option1', label: 'Option 1' },
9
+ { value: 'option2', label: 'Option 2' },
10
+ { value: 'option3', label: 'Option 3' },
11
+ ];
12
+
13
+ it('renders select correctly', async () => {
14
+ const { container } = await render(<Select options={options} />);
15
+ expect(container).toMatchScreenshot();
16
+ });
17
+
18
+ it('renders select with label correctly', async () => {
19
+ const { container } = await render(
20
+ <Select label="Choose an option" options={options} />,
21
+ );
22
+ expect(container).toMatchScreenshot();
23
+ });
24
+
25
+ it('renders select with error state correctly', async () => {
26
+ const { container } = await render(
27
+ <Select label="Choose an option" options={options} error />,
28
+ );
29
+ expect(container).toMatchScreenshot();
30
+ });
31
+
32
+ it('renders disabled select correctly', async () => {
33
+ const { container } = await render(
34
+ <Select label="Choose an option" options={options} disabled />,
35
+ );
36
+ expect(container).toMatchScreenshot();
37
+ });
38
+
39
+ it('renders select with disabled option correctly', async () => {
40
+ const optionsWithDisabled = [
41
+ { value: 'option1', label: 'Option 1' },
42
+ { value: 'option2', label: 'Option 2', disabled: true },
43
+ { value: 'option3', label: 'Option 3' },
44
+ ];
45
+ const { container } = await render(
46
+ <Select options={optionsWithDisabled} />,
47
+ );
48
+ expect(container).toMatchScreenshot();
49
+ });
50
+
51
+ it('renders select with selected value correctly', async () => {
52
+ const { container } = await render(
53
+ <Select options={options} defaultValue="option2" />,
54
+ );
55
+ expect(container).toMatchScreenshot();
56
+ });
57
+ });
@@ -0,0 +1,60 @@
1
+ import clsx from 'clsx';
2
+ import React, { forwardRef } from 'react';
3
+ import { select, selectLabel, selectWrapper } from './styles.css';
4
+ import Box from '../Box';
5
+
6
+ type SelectOption = {
7
+ value: string;
8
+ label: string;
9
+ disabled?: boolean;
10
+ };
11
+
12
+ type SelectProps = Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> & {
13
+ label?: string;
14
+ options: SelectOption[];
15
+ error?: boolean;
16
+ fullWidth?: boolean;
17
+ };
18
+
19
+ const Select = forwardRef<HTMLSelectElement, SelectProps>(
20
+ ({ label, options, error = false, fullWidth = true, className, ...props }, ref) => {
21
+ return (
22
+ <Box className={selectWrapper} width="100%">
23
+ {label && (
24
+ <Box
25
+ as="label"
26
+ className={selectLabel}
27
+ display="block"
28
+ fontSize="14px"
29
+ fontWeight="500"
30
+ color="c5-700"
31
+ marginBottom="small"
32
+ >
33
+ {label}
34
+ </Box>
35
+ )}
36
+ <Box
37
+ as="select"
38
+ ref={ref}
39
+ className={clsx(select[error ? 'error' : 'default'], className)}
40
+ width={fullWidth ? '100%' : undefined}
41
+ {...props}
42
+ >
43
+ {options.map((option) => (
44
+ <option
45
+ key={option.value}
46
+ value={option.value}
47
+ disabled={option.disabled}
48
+ >
49
+ {option.label}
50
+ </option>
51
+ ))}
52
+ </Box>
53
+ </Box>
54
+ );
55
+ },
56
+ );
57
+
58
+ Select.displayName = 'Select';
59
+
60
+ export default Select;
@@ -0,0 +1 @@
1
+ export { default as Select } from './Select';
@@ -0,0 +1,86 @@
1
+ import { style, styleVariants } from '@vanilla-extract/css';
2
+ import { vars } from '../../styles/theme.css';
3
+ import { styleWithLayer } from '../../styles/utils';
4
+
5
+ export const selectContainer = styleWithLayer({
6
+ width: '100%',
7
+ });
8
+
9
+ export const select = styleVariants({
10
+ default: {
11
+ width: '100%',
12
+ padding: '0.75rem 1rem',
13
+ fontSize: '14px',
14
+ fontFamily: vars.fontFamily.body,
15
+ color: vars.colors.textPrimary,
16
+ backgroundColor: vars.colors.inputBackground,
17
+ border: `1px solid ${vars.colors.inputBorder}`,
18
+ borderRadius: '8px',
19
+ cursor: 'pointer',
20
+ outline: 'none',
21
+ appearance: 'none',
22
+ backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23252525' d='M6 8L1 3h10z'/%3E%3C/svg%3E")`,
23
+ backgroundRepeat: 'no-repeat',
24
+ backgroundPosition: 'right 12px center',
25
+ transition: 'border-color 0.2s ease',
26
+ '::placeholder': {
27
+ color: vars.colors.inputPlaceholder,
28
+ },
29
+ ':focus-visible': {
30
+ outline: `2px solid ${vars.colors.inputBorderFocused}`,
31
+ outlineOffset: '2px',
32
+ },
33
+ ':hover:not(:disabled)': {
34
+ borderColor: vars.colors.inputBorderFocused,
35
+ },
36
+ ':disabled': {
37
+ cursor: 'not-allowed',
38
+ opacity: 0.5,
39
+ backgroundColor: vars.colors.backgroundMuted,
40
+ },
41
+ },
42
+ error: {
43
+ width: '100%',
44
+ padding: '0.75rem 1rem',
45
+ fontSize: '14px',
46
+ fontFamily: vars.fontFamily.body,
47
+ color: vars.colors.textPrimary,
48
+ backgroundColor: vars.colors.inputBackground,
49
+ border: `1px solid ${vars.colors.alertErrorBorder}`,
50
+ borderRadius: '8px',
51
+ cursor: 'pointer',
52
+ outline: 'none',
53
+ appearance: 'none',
54
+ backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23252525' d='M6 8L1 3h10z'/%3E%3C/svg%3E")`,
55
+ backgroundRepeat: 'no-repeat',
56
+ backgroundPosition: 'right 12px center',
57
+ transition: 'border-color 0.2s ease',
58
+ '::placeholder': {
59
+ color: vars.colors.inputPlaceholder,
60
+ },
61
+ ':focus-visible': {
62
+ outline: `2px solid ${vars.colors.alertErrorBorder}`,
63
+ outlineOffset: '2px',
64
+ },
65
+ ':hover:not(:disabled)': {
66
+ borderColor: vars.colors.alertErrorBorder,
67
+ },
68
+ ':disabled': {
69
+ cursor: 'not-allowed',
70
+ opacity: 0.5,
71
+ backgroundColor: vars.colors.backgroundMuted,
72
+ },
73
+ },
74
+ });
75
+
76
+ export const selectLabel = styleWithLayer({
77
+ display: 'block',
78
+ fontSize: '14px',
79
+ fontWeight: '500',
80
+ color: vars.colors.textPrimary,
81
+ marginBottom: '8px',
82
+ });
83
+
84
+ export const selectWrapper = styleWithLayer({
85
+ width: '100%',
86
+ });
@@ -0,0 +1,49 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import React from 'react';
3
+ import { Separator } from '.';
4
+ import { Box } from '../Box';
5
+
6
+ const meta = {
7
+ title: 'Components/Separator',
8
+ component: Separator,
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ tags: ['autodocs'],
13
+ } satisfies Meta<typeof Separator>;
14
+
15
+ export default meta;
16
+ type Story = StoryObj<typeof meta>;
17
+
18
+ export const Horizontal: Story = {
19
+ args: {
20
+ orientation: 'horizontal',
21
+ },
22
+ render: () => (
23
+ <Box width="100%">
24
+ <p>Content above</p>
25
+ <Separator orientation="horizontal" />
26
+ <p>Content below</p>
27
+ </Box>
28
+ ),
29
+ };
30
+
31
+ export const Vertical: Story = {
32
+ args: {
33
+ orientation: 'vertical',
34
+ },
35
+ render: () => (
36
+ <Box display="flex" height="100px" alignItems="center">
37
+ <span>Left content</span>
38
+ <Separator orientation="vertical" />
39
+ <span>Right content</span>
40
+ </Box>
41
+ ),
42
+ };
43
+
44
+ export const Decorative: Story = {
45
+ args: {
46
+ orientation: 'horizontal',
47
+ decorative: true,
48
+ },
49
+ };
@@ -0,0 +1,22 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { render } from 'vitest-browser-react';
3
+ import Separator from './Separator';
4
+ import React from 'react';
5
+
6
+ describe('Separator', () => {
7
+ it('renders horizontal separator', async () => {
8
+ const { container } = await render(
9
+ <Separator orientation="horizontal" />
10
+ );
11
+ expect(container).toMatchScreenshot();
12
+ });
13
+
14
+ it('renders vertical separator', async () => {
15
+ const { container } = await render(
16
+ <div style={{ height: '100px' }}>
17
+ <Separator orientation="vertical" />
18
+ </div>
19
+ );
20
+ expect(container).toMatchScreenshot();
21
+ });
22
+ });
@@ -0,0 +1,37 @@
1
+ import clsx from 'clsx';
2
+ import React from 'react';
3
+ import {
4
+ separator,
5
+ separatorOrientation,
6
+ } from './styles.css';
7
+ import Box from '../Box';
8
+
9
+ export type SeparatorOrientation = 'horizontal' | 'vertical';
10
+
11
+ export interface SeparatorProps {
12
+ orientation?: SeparatorOrientation;
13
+ decorative?: boolean;
14
+ className?: string;
15
+ }
16
+
17
+ const Separator = ({
18
+ orientation = 'horizontal',
19
+ decorative = false,
20
+ className,
21
+ ...props
22
+ }: SeparatorProps) => {
23
+ return (
24
+ <Box
25
+ as="hr"
26
+ className={clsx(
27
+ separator,
28
+ separatorOrientation[orientation],
29
+ className,
30
+ )}
31
+ aria-hidden={decorative}
32
+ {...props}
33
+ />
34
+ );
35
+ };
36
+
37
+ export default Separator;
@@ -0,0 +1,2 @@
1
+ export { default as Separator } from './Separator';
2
+ export type { SeparatorProps, SeparatorOrientation } from './Separator';
@@ -0,0 +1,32 @@
1
+ import { style, styleVariants } from '@vanilla-extract/css';
2
+ import { vars } from '../../styles/theme.css';
3
+ import { styleWithLayer } from '../../styles/utils';
4
+
5
+ export const separator = styleWithLayer({
6
+ border: 'none',
7
+ margin: 0,
8
+ flexShrink: 0,
9
+ });
10
+
11
+ export const separatorOrientation = styleVariants({
12
+ horizontal: {
13
+ width: '100%',
14
+ height: '1px',
15
+ backgroundColor: vars.colors.borderDefault,
16
+ },
17
+ vertical: {
18
+ width: '1px',
19
+ height: '100%',
20
+ backgroundColor: vars.colors.borderDefault,
21
+ },
22
+ });
23
+
24
+ export const separatorSize = styleVariants({
25
+ small: {},
26
+ medium: {},
27
+ large: {},
28
+ });
29
+
30
+ export const separatorDecorative = styleWithLayer({
31
+ backgroundColor: vars.colors.borderMuted,
32
+ });
@@ -0,0 +1,78 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import React from 'react';
3
+
4
+ import { Skeleton } from '.';
5
+
6
+ const meta = {
7
+ title: 'Components/Skeleton',
8
+ component: Skeleton,
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ tags: ['autodocs'],
13
+ } satisfies Meta<typeof Skeleton>;
14
+
15
+ export default meta;
16
+ type Story = StoryObj<typeof meta>;
17
+
18
+ export const Text: Story = {
19
+ args: {
20
+ variant: 'text',
21
+ size: 'medium',
22
+ width: 200,
23
+ },
24
+ };
25
+
26
+ export const Circle: Story = {
27
+ args: {
28
+ variant: 'circle',
29
+ width: 48,
30
+ height: 48,
31
+ },
32
+ };
33
+
34
+ export const Rectangle: Story = {
35
+ args: {
36
+ variant: 'rectangle',
37
+ width: 200,
38
+ height: 100,
39
+ },
40
+ };
41
+
42
+ export const MultipleLines: Story = {
43
+ args: {
44
+ variant: 'text',
45
+ count: 3,
46
+ width: 300,
47
+ },
48
+ };
49
+
50
+ export const PulseAnimation: Story = {
51
+ args: {
52
+ variant: 'text',
53
+ animation: 'pulse',
54
+ width: 200,
55
+ },
56
+ };
57
+
58
+ export const NoAnimation: Story = {
59
+ args: {
60
+ variant: 'text',
61
+ animation: 'none',
62
+ width: 200,
63
+ },
64
+ };
65
+
66
+ export const DifferentSizes: Story = {
67
+ args: {
68
+ variant: 'text',
69
+ width: 200,
70
+ },
71
+ render: () => (
72
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>
73
+ <Skeleton size="small" width={200} />
74
+ <Skeleton size="medium" width={200} />
75
+ <Skeleton size="large" width={200} />
76
+ </div>
77
+ ),
78
+ };
@@ -0,0 +1,36 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { render } from 'vitest-browser-react';
3
+ import Skeleton from './Skeleton';
4
+ import React from 'react';
5
+
6
+ describe('Skeleton', () => {
7
+ it('renders correctly as text variant', async () => {
8
+ const { container } = await render(<Skeleton variant="text" />);
9
+ expect(container).toMatchScreenshot();
10
+ });
11
+
12
+ it('renders correctly as circle variant', async () => {
13
+ const { container } = await render(<Skeleton variant="circle" width={48} height={48} />);
14
+ expect(container).toMatchScreenshot();
15
+ });
16
+
17
+ it('renders correctly as rectangle variant', async () => {
18
+ const { container } = await render(<Skeleton variant="rectangle" width={200} height={100} />);
19
+ expect(container).toMatchScreenshot();
20
+ });
21
+
22
+ it('renders multiple skeletons with count', async () => {
23
+ const { container } = await render(<Skeleton count={3} />);
24
+ expect(container).toMatchScreenshot();
25
+ });
26
+
27
+ it('renders with pulse animation', async () => {
28
+ const { container } = await render(<Skeleton animation="pulse" />);
29
+ expect(container).toMatchScreenshot();
30
+ });
31
+
32
+ it('renders without animation', async () => {
33
+ const { container } = await render(<Skeleton animation="none" />);
34
+ expect(container).toMatchScreenshot();
35
+ });
36
+ });
@@ -0,0 +1,67 @@
1
+ import clsx from 'clsx';
2
+ import React from 'react';
3
+ import {
4
+ skeleton,
5
+ skeletonVariants,
6
+ skeletonSizes,
7
+ skeletonAnimation,
8
+ } from './styles.css';
9
+ import Box from '../Box';
10
+
11
+ export type SkeletonVariant = 'text' | 'circle' | 'rectangle';
12
+ export type SkeletonSize = 'small' | 'medium' | 'large';
13
+ export type SkeletonAnimation = 'shimmer' | 'pulse' | 'none';
14
+
15
+ export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
16
+ variant?: SkeletonVariant;
17
+ size?: SkeletonSize;
18
+ animation?: SkeletonAnimation;
19
+ width?: string | number;
20
+ height?: string | number;
21
+ count?: number;
22
+ }
23
+
24
+ const Skeleton = ({
25
+ variant = 'text',
26
+ size = 'medium',
27
+ animation = 'shimmer',
28
+ width,
29
+ height,
30
+ count = 1,
31
+ className,
32
+ ...props
33
+ }: SkeletonProps) => {
34
+ const style: React.CSSProperties = {
35
+ width: width,
36
+ height: height,
37
+ };
38
+
39
+ const skeletons = Array.from({ length: count }, (_, index) => (
40
+ <Box
41
+ key={index}
42
+ as="span"
43
+ className={clsx(
44
+ skeleton,
45
+ skeletonVariants[variant],
46
+ skeletonSizes[size],
47
+ skeletonAnimation[animation],
48
+ className,
49
+ )}
50
+ style={style}
51
+ aria-hidden="true"
52
+ {...props}
53
+ />
54
+ ));
55
+
56
+ return (
57
+ <Box
58
+ display="flex"
59
+ flexDirection="column"
60
+ gap="small"
61
+ >
62
+ {skeletons}
63
+ </Box>
64
+ );
65
+ };
66
+
67
+ export default Skeleton;
@@ -0,0 +1,2 @@
1
+ export { default as Skeleton } from './Skeleton';
2
+ export type { SkeletonProps, SkeletonVariant, SkeletonSize, SkeletonAnimation } from './Skeleton';