@jordan-mace/chaser-design-system 1.2.7 → 1.2.9

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 (354) hide show
  1. package/dist/index.d.mts +1834 -0
  2. package/dist/index.mjs +4729 -0
  3. package/dist/styles/layers.css.d.mts +6 -0
  4. package/dist/styles/layers.css.mjs +7 -0
  5. package/dist/styles/reset.css.d.mts +1 -0
  6. package/dist/styles/reset.css.mjs +24 -0
  7. package/dist/styles/sprinkles.css.d.mts +246 -0
  8. package/dist/styles/sprinkles.css.mjs +200 -0
  9. package/dist/styles/theme.css.d.mts +41 -0
  10. package/dist/styles/theme.css.mjs +50 -0
  11. package/package.json +18 -9
  12. package/src/components/Accordion/Accordion.tsx +21 -16
  13. package/src/components/Alert/Alert.tsx +11 -7
  14. package/src/components/Avatar/Avatar.tsx +16 -14
  15. package/src/components/Badge/Badge.tsx +8 -6
  16. package/src/components/Box/reset.css.ts +2 -2
  17. package/src/components/Breadcrumb/Breadcrumb.tsx +7 -10
  18. package/src/components/Button/Button.tsx +9 -11
  19. package/src/components/Card/Card.tsx +8 -10
  20. package/src/components/Checkbox/Checkbox.tsx +11 -8
  21. package/src/components/Collapse/Collapse.tsx +12 -9
  22. package/src/components/Combobox/Combobox.tsx +60 -31
  23. package/src/components/Container/Container.tsx +4 -3
  24. package/src/components/Divider/Divider.tsx +9 -5
  25. package/src/components/Drawer/Drawer.tsx +20 -13
  26. package/src/components/DropdownMenu/DropdownMenu.tsx +37 -15
  27. package/src/components/EmptyState/EmptyState.tsx +9 -12
  28. package/src/components/FileUpload/FileUpload.tsx +61 -45
  29. package/src/components/Form/Form.tsx +6 -8
  30. package/src/components/Grid/Grid.tsx +18 -13
  31. package/src/components/Icon/Icon.tsx +7 -6
  32. package/src/components/Input/Input.tsx +7 -8
  33. package/src/components/Kbd/Kbd.tsx +5 -4
  34. package/src/components/List/List.tsx +6 -2
  35. package/src/components/List/ListItem.tsx +6 -2
  36. package/src/components/Modal/Modal.tsx +16 -5
  37. package/src/components/Navbar/Navbar.tsx +2 -1
  38. package/src/components/Navbar/NavbarItem.tsx +2 -1
  39. package/src/components/NumberInput/NumberInput.tsx +29 -22
  40. package/src/components/Pagination/Pagination.tsx +39 -28
  41. package/src/components/Popover/Popover.tsx +37 -21
  42. package/src/components/Progress/Progress.tsx +39 -38
  43. package/src/components/Radio/Radio.tsx +12 -6
  44. package/src/components/ScrollArea/ScrollArea.tsx +9 -10
  45. package/src/components/Select/Select.tsx +12 -7
  46. package/src/components/Separator/Separator.tsx +8 -14
  47. package/src/components/Skeleton/Skeleton.tsx +11 -13
  48. package/src/components/Spinner/Spinner.tsx +15 -11
  49. package/src/components/Stack/Stack.tsx +34 -15
  50. package/src/components/Stepper/Stepper.tsx +19 -17
  51. package/src/components/Table/Table.tsx +31 -21
  52. package/src/components/Tabs/Tabs.tsx +14 -10
  53. package/src/components/Tag/Tag.tsx +8 -7
  54. package/src/components/Text/Header.tsx +6 -5
  55. package/src/components/Text/P.tsx +5 -4
  56. package/src/components/TextArea/TextArea.tsx +7 -8
  57. package/src/components/Toggle/Toggle.tsx +16 -7
  58. package/src/components/Tooltip/Tooltip.tsx +16 -11
  59. package/src/components/VisuallyHidden/VisuallyHidden.tsx +7 -8
  60. package/src/index.ts +6 -1
  61. package/dist/components/Accordion/Accordion.d.ts +0 -16
  62. package/dist/components/Accordion/Accordion.js +0 -43
  63. package/dist/components/Accordion/index.d.ts +0 -1
  64. package/dist/components/Accordion/index.js +0 -1
  65. package/dist/components/Accordion/styles.css.d.ts +0 -7
  66. package/dist/components/Accordion/styles.css.js +0 -65
  67. package/dist/components/Alert/Alert.d.ts +0 -9
  68. package/dist/components/Alert/Alert.js +0 -8
  69. package/dist/components/Alert/index.d.ts +0 -1
  70. package/dist/components/Alert/index.js +0 -1
  71. package/dist/components/Alert/styles.css.d.ts +0 -4
  72. package/dist/components/Alert/styles.css.js +0 -54
  73. package/dist/components/AspectRatio/AspectRatio.d.ts +0 -9
  74. package/dist/components/AspectRatio/AspectRatio.js +0 -12
  75. package/dist/components/AspectRatio/index.d.ts +0 -2
  76. package/dist/components/AspectRatio/index.js +0 -1
  77. package/dist/components/Avatar/Avatar.d.ts +0 -11
  78. package/dist/components/Avatar/Avatar.js +0 -13
  79. package/dist/components/Avatar/index.d.ts +0 -1
  80. package/dist/components/Avatar/index.js +0 -1
  81. package/dist/components/Avatar/styles.css.d.ts +0 -4
  82. package/dist/components/Avatar/styles.css.js +0 -151
  83. package/dist/components/Badge/Badge.d.ts +0 -11
  84. package/dist/components/Badge/Badge.js +0 -8
  85. package/dist/components/Badge/index.d.ts +0 -2
  86. package/dist/components/Badge/index.js +0 -1
  87. package/dist/components/Badge/styles.css.d.ts +0 -5
  88. package/dist/components/Badge/styles.css.js +0 -77
  89. package/dist/components/Box/Box.d.ts +0 -11
  90. package/dist/components/Box/Box.js +0 -54
  91. package/dist/components/Box/index.d.ts +0 -2
  92. package/dist/components/Box/index.js +0 -1
  93. package/dist/components/Box/reset.css.d.ts +0 -1
  94. package/dist/components/Box/reset.css.js +0 -15
  95. package/dist/components/Breadcrumb/Breadcrumb.d.ts +0 -12
  96. package/dist/components/Breadcrumb/Breadcrumb.js +0 -8
  97. package/dist/components/Breadcrumb/index.d.ts +0 -1
  98. package/dist/components/Breadcrumb/index.js +0 -1
  99. package/dist/components/Breadcrumb/styles.css.d.ts +0 -6
  100. package/dist/components/Breadcrumb/styles.css.js +0 -50
  101. package/dist/components/Button/Button.d.ts +0 -9
  102. package/dist/components/Button/Button.js +0 -8
  103. package/dist/components/Button/index.d.ts +0 -1
  104. package/dist/components/Button/index.js +0 -1
  105. package/dist/components/Button/styles.css.d.ts +0 -2
  106. package/dist/components/Button/styles.css.js +0 -30
  107. package/dist/components/Card/Card.d.ts +0 -8
  108. package/dist/components/Card/Card.js +0 -8
  109. package/dist/components/Card/index.d.ts +0 -1
  110. package/dist/components/Card/index.js +0 -1
  111. package/dist/components/Card/styles.css.d.ts +0 -2
  112. package/dist/components/Card/styles.css.js +0 -25
  113. package/dist/components/Checkbox/Checkbox.d.ts +0 -6
  114. package/dist/components/Checkbox/Checkbox.js +0 -25
  115. package/dist/components/Checkbox/index.d.ts +0 -1
  116. package/dist/components/Checkbox/index.js +0 -1
  117. package/dist/components/Checkbox/styles.css.d.ts +0 -3
  118. package/dist/components/Checkbox/styles.css.js +0 -31
  119. package/dist/components/Collapse/Collapse.d.ts +0 -12
  120. package/dist/components/Collapse/Collapse.js +0 -56
  121. package/dist/components/Collapse/index.d.ts +0 -2
  122. package/dist/components/Collapse/index.js +0 -1
  123. package/dist/components/Collapse/styles.css.d.ts +0 -3
  124. package/dist/components/Collapse/styles.css.js +0 -36
  125. package/dist/components/Combobox/Combobox.d.ts +0 -23
  126. package/dist/components/Combobox/Combobox.js +0 -104
  127. package/dist/components/Combobox/index.d.ts +0 -2
  128. package/dist/components/Combobox/index.js +0 -1
  129. package/dist/components/Combobox/styles.css.d.ts +0 -13
  130. package/dist/components/Combobox/styles.css.js +0 -142
  131. package/dist/components/Container/Container.d.ts +0 -11
  132. package/dist/components/Container/Container.js +0 -21
  133. package/dist/components/Container/index.d.ts +0 -2
  134. package/dist/components/Container/index.js +0 -1
  135. package/dist/components/Divider/Divider.d.ts +0 -9
  136. package/dist/components/Divider/Divider.js +0 -8
  137. package/dist/components/Divider/index.d.ts +0 -2
  138. package/dist/components/Divider/index.js +0 -1
  139. package/dist/components/Divider/styles.css.d.ts +0 -4
  140. package/dist/components/Divider/styles.css.js +0 -41
  141. package/dist/components/Drawer/Drawer.d.ts +0 -16
  142. package/dist/components/Drawer/Drawer.js +0 -65
  143. package/dist/components/Drawer/index.d.ts +0 -2
  144. package/dist/components/Drawer/index.js +0 -1
  145. package/dist/components/Drawer/styles.css.d.ts +0 -8
  146. package/dist/components/Drawer/styles.css.js +0 -125
  147. package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -23
  148. package/dist/components/DropdownMenu/DropdownMenu.js +0 -43
  149. package/dist/components/DropdownMenu/index.d.ts +0 -2
  150. package/dist/components/DropdownMenu/index.js +0 -1
  151. package/dist/components/DropdownMenu/styles.css.d.ts +0 -9
  152. package/dist/components/DropdownMenu/styles.css.js +0 -93
  153. package/dist/components/EmptyState/EmptyState.d.ts +0 -10
  154. package/dist/components/EmptyState/EmptyState.js +0 -8
  155. package/dist/components/EmptyState/index.d.ts +0 -2
  156. package/dist/components/EmptyState/index.js +0 -1
  157. package/dist/components/EmptyState/styles.css.d.ts +0 -5
  158. package/dist/components/EmptyState/styles.css.js +0 -30
  159. package/dist/components/FileUpload/FileUpload.d.ts +0 -27
  160. package/dist/components/FileUpload/FileUpload.js +0 -102
  161. package/dist/components/FileUpload/index.d.ts +0 -2
  162. package/dist/components/FileUpload/index.js +0 -1
  163. package/dist/components/FileUpload/styles.css.d.ts +0 -19
  164. package/dist/components/FileUpload/styles.css.js +0 -145
  165. package/dist/components/Form/Form.d.ts +0 -7
  166. package/dist/components/Form/Form.js +0 -8
  167. package/dist/components/Form/FormInput.d.ts +0 -5
  168. package/dist/components/Form/FormInput.js +0 -9
  169. package/dist/components/Form/index.d.ts +0 -2
  170. package/dist/components/Form/index.js +0 -2
  171. package/dist/components/Form/styles.css.d.ts +0 -2
  172. package/dist/components/Form/styles.css.js +0 -11
  173. package/dist/components/Grid/Grid.d.ts +0 -13
  174. package/dist/components/Grid/Grid.js +0 -25
  175. package/dist/components/Grid/index.d.ts +0 -2
  176. package/dist/components/Grid/index.js +0 -1
  177. package/dist/components/Icon/Icon.d.ts +0 -12
  178. package/dist/components/Icon/Icon.js +0 -21
  179. package/dist/components/Icon/index.d.ts +0 -1
  180. package/dist/components/Icon/index.js +0 -1
  181. package/dist/components/Icon/styles.css.d.ts +0 -1
  182. package/dist/components/Icon/styles.css.js +0 -9
  183. package/dist/components/Input/Input.d.ts +0 -7
  184. package/dist/components/Input/Input.js +0 -9
  185. package/dist/components/Input/index.d.ts +0 -1
  186. package/dist/components/Input/index.js +0 -1
  187. package/dist/components/Input/styles.css.d.ts +0 -2
  188. package/dist/components/Input/styles.css.js +0 -8
  189. package/dist/components/Kbd/Kbd.d.ts +0 -7
  190. package/dist/components/Kbd/Kbd.js +0 -6
  191. package/dist/components/Kbd/index.d.ts +0 -2
  192. package/dist/components/Kbd/index.js +0 -1
  193. package/dist/components/Kbd/styles.css.d.ts +0 -1
  194. package/dist/components/Kbd/styles.css.js +0 -16
  195. package/dist/components/List/List.d.ts +0 -5
  196. package/dist/components/List/List.js +0 -7
  197. package/dist/components/List/ListItem.d.ts +0 -5
  198. package/dist/components/List/ListItem.js +0 -7
  199. package/dist/components/List/index.d.ts +0 -2
  200. package/dist/components/List/index.js +0 -2
  201. package/dist/components/List/styles.css.d.ts +0 -2
  202. package/dist/components/List/styles.css.js +0 -11
  203. package/dist/components/Modal/Modal.d.ts +0 -13
  204. package/dist/components/Modal/Modal.js +0 -35
  205. package/dist/components/Modal/index.d.ts +0 -2
  206. package/dist/components/Modal/index.js +0 -1
  207. package/dist/components/Modal/styles.css.d.ts +0 -7
  208. package/dist/components/Modal/styles.css.js +0 -92
  209. package/dist/components/Navbar/Navbar.d.ts +0 -6
  210. package/dist/components/Navbar/Navbar.js +0 -8
  211. package/dist/components/Navbar/NavbarItem.d.ts +0 -6
  212. package/dist/components/Navbar/NavbarItem.js +0 -8
  213. package/dist/components/Navbar/index.d.ts +0 -2
  214. package/dist/components/Navbar/index.js +0 -2
  215. package/dist/components/Navbar/styles.css.d.ts +0 -2
  216. package/dist/components/Navbar/styles.css.js +0 -3
  217. package/dist/components/NumberInput/NumberInput.d.ts +0 -20
  218. package/dist/components/NumberInput/NumberInput.js +0 -39
  219. package/dist/components/NumberInput/index.d.ts +0 -2
  220. package/dist/components/NumberInput/index.js +0 -1
  221. package/dist/components/NumberInput/styles.css.d.ts +0 -10
  222. package/dist/components/NumberInput/styles.css.js +0 -117
  223. package/dist/components/Pagination/Pagination.d.ts +0 -10
  224. package/dist/components/Pagination/Pagination.js +0 -47
  225. package/dist/components/Pagination/index.d.ts +0 -2
  226. package/dist/components/Pagination/index.js +0 -1
  227. package/dist/components/Pagination/styles.css.d.ts +0 -4
  228. package/dist/components/Pagination/styles.css.js +0 -44
  229. package/dist/components/Popover/Popover.d.ts +0 -18
  230. package/dist/components/Popover/Popover.js +0 -55
  231. package/dist/components/Popover/index.d.ts +0 -2
  232. package/dist/components/Popover/index.js +0 -1
  233. package/dist/components/Popover/styles.css.d.ts +0 -11
  234. package/dist/components/Popover/styles.css.js +0 -185
  235. package/dist/components/Progress/Progress.d.ts +0 -10
  236. package/dist/components/Progress/Progress.js +0 -9
  237. package/dist/components/Progress/index.d.ts +0 -1
  238. package/dist/components/Progress/index.js +0 -1
  239. package/dist/components/Progress/styles.css.d.ts +0 -4
  240. package/dist/components/Progress/styles.css.js +0 -71
  241. package/dist/components/Radio/Radio.d.ts +0 -16
  242. package/dist/components/Radio/Radio.js +0 -25
  243. package/dist/components/Radio/index.d.ts +0 -1
  244. package/dist/components/Radio/index.js +0 -1
  245. package/dist/components/Radio/styles.css.d.ts +0 -5
  246. package/dist/components/Radio/styles.css.js +0 -42
  247. package/dist/components/ScrollArea/ScrollArea.d.ts +0 -11
  248. package/dist/components/ScrollArea/ScrollArea.js +0 -12
  249. package/dist/components/ScrollArea/index.d.ts +0 -2
  250. package/dist/components/ScrollArea/index.js +0 -1
  251. package/dist/components/ScrollArea/styles.css.d.ts +0 -3
  252. package/dist/components/ScrollArea/styles.css.js +0 -25
  253. package/dist/components/Select/Select.d.ts +0 -13
  254. package/dist/components/Select/Select.js +0 -10
  255. package/dist/components/Select/index.d.ts +0 -1
  256. package/dist/components/Select/index.js +0 -1
  257. package/dist/components/Select/styles.css.d.ts +0 -4
  258. package/dist/components/Select/styles.css.js +0 -82
  259. package/dist/components/Separator/Separator.d.ts +0 -8
  260. package/dist/components/Separator/Separator.js +0 -8
  261. package/dist/components/Separator/index.d.ts +0 -2
  262. package/dist/components/Separator/index.js +0 -1
  263. package/dist/components/Separator/styles.css.d.ts +0 -4
  264. package/dist/components/Separator/styles.css.js +0 -28
  265. package/dist/components/Skeleton/Skeleton.d.ts +0 -14
  266. package/dist/components/Skeleton/Skeleton.js +0 -13
  267. package/dist/components/Skeleton/index.d.ts +0 -2
  268. package/dist/components/Skeleton/index.js +0 -1
  269. package/dist/components/Skeleton/styles.css.d.ts +0 -4
  270. package/dist/components/Skeleton/styles.css.js +0 -56
  271. package/dist/components/Spinner/Spinner.d.ts +0 -10
  272. package/dist/components/Spinner/Spinner.js +0 -8
  273. package/dist/components/Spinner/index.d.ts +0 -2
  274. package/dist/components/Spinner/index.js +0 -1
  275. package/dist/components/Spinner/styles.css.d.ts +0 -4
  276. package/dist/components/Spinner/styles.css.js +0 -55
  277. package/dist/components/Stack/Stack.d.ts +0 -16
  278. package/dist/components/Stack/Stack.js +0 -24
  279. package/dist/components/Stack/index.d.ts +0 -2
  280. package/dist/components/Stack/index.js +0 -1
  281. package/dist/components/Stepper/Stepper.d.ts +0 -18
  282. package/dist/components/Stepper/Stepper.js +0 -25
  283. package/dist/components/Stepper/index.d.ts +0 -2
  284. package/dist/components/Stepper/index.js +0 -1
  285. package/dist/components/Stepper/styles.css.d.ts +0 -14
  286. package/dist/components/Stepper/styles.css.js +0 -104
  287. package/dist/components/Table/Table.d.ts +0 -42
  288. package/dist/components/Table/Table.js +0 -39
  289. package/dist/components/Table/index.d.ts +0 -1
  290. package/dist/components/Table/index.js +0 -1
  291. package/dist/components/Table/styles.css.d.ts +0 -8
  292. package/dist/components/Table/styles.css.js +0 -49
  293. package/dist/components/Tabs/Tabs.d.ts +0 -29
  294. package/dist/components/Tabs/Tabs.js +0 -52
  295. package/dist/components/Tabs/index.d.ts +0 -1
  296. package/dist/components/Tabs/index.js +0 -1
  297. package/dist/components/Tabs/styles.css.d.ts +0 -6
  298. package/dist/components/Tabs/styles.css.js +0 -100
  299. package/dist/components/Tag/Tag.d.ts +0 -16
  300. package/dist/components/Tag/Tag.js +0 -18
  301. package/dist/components/Tag/index.d.ts +0 -1
  302. package/dist/components/Tag/index.js +0 -1
  303. package/dist/components/Tag/styles.css.d.ts +0 -3
  304. package/dist/components/Tag/styles.css.js +0 -93
  305. package/dist/components/Text/Header.d.ts +0 -8
  306. package/dist/components/Text/Header.js +0 -8
  307. package/dist/components/Text/P.d.ts +0 -7
  308. package/dist/components/Text/P.js +0 -8
  309. package/dist/components/Text/index.d.ts +0 -2
  310. package/dist/components/Text/index.js +0 -2
  311. package/dist/components/Text/styles.css.d.ts +0 -2
  312. package/dist/components/Text/styles.css.js +0 -13
  313. package/dist/components/TextArea/TextArea.d.ts +0 -7
  314. package/dist/components/TextArea/TextArea.js +0 -9
  315. package/dist/components/TextArea/index.d.ts +0 -2
  316. package/dist/components/TextArea/index.js +0 -1
  317. package/dist/components/TextArea/styles.css.d.ts +0 -2
  318. package/dist/components/TextArea/styles.css.js +0 -10
  319. package/dist/components/Toast/Toast.d.ts +0 -34
  320. package/dist/components/Toast/Toast.js +0 -177
  321. package/dist/components/Toast/index.d.ts +0 -1
  322. package/dist/components/Toast/index.js +0 -1
  323. package/dist/components/Toast/styles.css.d.ts +0 -21
  324. package/dist/components/Toast/styles.css.js +0 -192
  325. package/dist/components/Toggle/Toggle.d.ts +0 -10
  326. package/dist/components/Toggle/Toggle.js +0 -17
  327. package/dist/components/Toggle/index.d.ts +0 -2
  328. package/dist/components/Toggle/index.js +0 -1
  329. package/dist/components/Toggle/styles.css.d.ts +0 -12
  330. package/dist/components/Toggle/styles.css.js +0 -118
  331. package/dist/components/Tooltip/Tooltip.d.ts +0 -10
  332. package/dist/components/Tooltip/Tooltip.js +0 -16
  333. package/dist/components/Tooltip/index.d.ts +0 -2
  334. package/dist/components/Tooltip/index.js +0 -1
  335. package/dist/components/Tooltip/styles.css.d.ts +0 -8
  336. package/dist/components/Tooltip/styles.css.js +0 -86
  337. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +0 -8
  338. package/dist/components/VisuallyHidden/VisuallyHidden.js +0 -9
  339. package/dist/components/VisuallyHidden/index.d.ts +0 -2
  340. package/dist/components/VisuallyHidden/index.js +0 -1
  341. package/dist/components/VisuallyHidden/styles.css.d.ts +0 -1
  342. package/dist/components/VisuallyHidden/styles.css.js +0 -12
  343. package/dist/components/index.d.ts +0 -68
  344. package/dist/components/index.js +0 -47
  345. package/dist/index.d.ts +0 -1
  346. package/dist/index.js +0 -1
  347. package/dist/styles/layers.css.d.ts +0 -3
  348. package/dist/styles/layers.css.js +0 -3
  349. package/dist/styles/sprinkles.css.d.ts +0 -241
  350. package/dist/styles/sprinkles.css.js +0 -165
  351. package/dist/styles/theme.css.d.ts +0 -38
  352. package/dist/styles/theme.css.js +0 -51
  353. package/dist/styles/utils.d.ts +0 -2
  354. package/dist/styles/utils.js +0 -7
@@ -13,25 +13,30 @@ import {
13
13
  numberInputErrorMessage,
14
14
  } from './styles.css';
15
15
  import Box from '../Box';
16
+ import { Sprinkles } from '../../styles/sprinkles.css';
16
17
 
17
18
  export type NumberInputPosition = 'right' | 'left';
18
19
 
19
- export interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'min' | 'max'> {
20
- label?: string;
21
- value?: number | '';
22
- onChange?: (value: number | '') => void;
23
- min?: number;
24
- max?: number;
25
- step?: number;
26
- stepperPosition?: NumberInputPosition;
27
- placeholder?: string;
28
- hint?: string;
29
- error?: boolean;
30
- errorMessage?: string;
31
- fullWidth?: boolean;
32
- disabled?: boolean;
33
- allowEmpty?: boolean;
34
- }
20
+ export type NumberInputProps = Omit<
21
+ React.InputHTMLAttributes<HTMLInputElement>,
22
+ 'onChange' | 'value' | 'min' | 'max'
23
+ > &
24
+ Sprinkles & {
25
+ label?: string;
26
+ value?: number | '';
27
+ onChange?: (value: number | '') => void;
28
+ min?: number;
29
+ max?: number;
30
+ step?: number;
31
+ stepperPosition?: NumberInputPosition;
32
+ placeholder?: string;
33
+ hint?: string;
34
+ error?: boolean;
35
+ errorMessage?: string;
36
+ fullWidth?: boolean;
37
+ disabled?: boolean;
38
+ allowEmpty?: boolean;
39
+ };
35
40
 
36
41
  const NumberInput = ({
37
42
  label,
@@ -53,7 +58,7 @@ const NumberInput = ({
53
58
  }: NumberInputProps) => {
54
59
  const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
55
60
  const inputValue = e.target.value;
56
-
61
+
57
62
  if (inputValue === '') {
58
63
  if (allowEmpty) {
59
64
  onChange?.('');
@@ -62,7 +67,7 @@ const NumberInput = ({
62
67
  }
63
68
  return;
64
69
  }
65
-
70
+
66
71
  const numValue = parseFloat(inputValue);
67
72
  if (!isNaN(numValue)) {
68
73
  const clampedValue = Math.min(Math.max(numValue, min), max);
@@ -82,8 +87,10 @@ const NumberInput = ({
82
87
  onChange?.(newValue);
83
88
  }, [value, step, min, onChange]);
84
89
 
85
- const isIncrementDisabled = disabled || (typeof value === 'number' && value >= max);
86
- const isDecrementDisabled = disabled || (typeof value === 'number' && value <= min);
90
+ const isIncrementDisabled =
91
+ disabled || (typeof value === 'number' && value >= max);
92
+ const isDecrementDisabled =
93
+ disabled || (typeof value === 'number' && value <= min);
87
94
 
88
95
  const displayValue = value === '' ? '' : value;
89
96
 
@@ -94,7 +101,7 @@ const NumberInput = ({
94
101
  {label}
95
102
  </Box>
96
103
  )}
97
-
104
+
98
105
  <Box className={numberInputContainer}>
99
106
  <Box
100
107
  as="input"
@@ -113,7 +120,7 @@ const NumberInput = ({
113
120
  )}
114
121
  {...props}
115
122
  />
116
-
123
+
117
124
  <Box
118
125
  className={clsx(
119
126
  numberInputStepper,
@@ -1,16 +1,23 @@
1
1
  import clsx from 'clsx';
2
2
  import React from 'react';
3
- import { paginationContainer, pageButton, pageButtonVariants, ellipsis } from './styles.css';
3
+ import {
4
+ paginationContainer,
5
+ pageButton,
6
+ pageButtonVariants,
7
+ ellipsis,
8
+ } from './styles.css';
4
9
  import Box from '../Box';
10
+ import { Sprinkles } from '../../styles/sprinkles.css';
5
11
 
6
- export type PaginationProps = {
7
- currentPage: number;
8
- totalPages: number;
9
- onPageChange: (page: number) => void;
10
- siblingCount?: number;
11
- showFirstLast?: boolean;
12
- showPrevNext?: boolean;
13
- };
12
+ export type PaginationProps = React.HTMLAttributes<HTMLDivElement> &
13
+ Sprinkles & {
14
+ currentPage: number;
15
+ totalPages: number;
16
+ onPageChange: (page: number) => void;
17
+ siblingCount?: number;
18
+ showFirstLast?: boolean;
19
+ showPrevNext?: boolean;
20
+ };
14
21
 
15
22
  const Pagination = ({
16
23
  currentPage,
@@ -19,23 +26,24 @@ const Pagination = ({
19
26
  siblingCount = 1,
20
27
  showFirstLast = true,
21
28
  showPrevNext = true,
29
+ ...props
22
30
  }: PaginationProps) => {
23
31
  const generatePageNumbers = () => {
24
32
  const pages: (number | string)[] = [];
25
-
33
+
26
34
  const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
27
35
  const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages);
28
-
36
+
29
37
  const shouldShowLeftEllipsis = leftSiblingIndex > 2;
30
38
  const shouldShowRightEllipsis = rightSiblingIndex < totalPages - 1;
31
-
39
+
32
40
  if (totalPages <= 7) {
33
41
  for (let i = 1; i <= totalPages; i++) {
34
42
  pages.push(i);
35
43
  }
36
44
  } else {
37
45
  pages.push(1);
38
-
46
+
39
47
  if (shouldShowLeftEllipsis) {
40
48
  pages.push('left-ellipsis');
41
49
  } else if (currentPage > 3) {
@@ -43,13 +51,13 @@ const Pagination = ({
43
51
  pages.push(i);
44
52
  }
45
53
  }
46
-
54
+
47
55
  for (let i = leftSiblingIndex; i <= rightSiblingIndex; i++) {
48
56
  if (i !== 1 && i !== totalPages) {
49
57
  pages.push(i);
50
58
  }
51
59
  }
52
-
60
+
53
61
  if (shouldShowRightEllipsis) {
54
62
  pages.push('right-ellipsis');
55
63
  } else if (currentPage < totalPages - 2) {
@@ -57,17 +65,18 @@ const Pagination = ({
57
65
  pages.push(i);
58
66
  }
59
67
  }
60
-
68
+
61
69
  pages.push(totalPages);
62
70
  }
63
-
71
+
64
72
  return pages;
65
73
  };
66
-
74
+
67
75
  const pages = generatePageNumbers();
68
-
76
+ const { className, ...restProps } = props;
77
+
69
78
  return (
70
- <Box className={paginationContainer}>
79
+ <Box className={clsx(paginationContainer, className)} {...restProps}>
71
80
  {showFirstLast && (
72
81
  <Box
73
82
  as="button"
@@ -78,7 +87,7 @@ const Pagination = ({
78
87
  {'<<'}
79
88
  </Box>
80
89
  )}
81
-
90
+
82
91
  {showPrevNext && (
83
92
  <Box
84
93
  as="button"
@@ -89,15 +98,17 @@ const Pagination = ({
89
98
  {'<'}
90
99
  </Box>
91
100
  )}
92
-
93
- {pages.map((page, index) => (
101
+
102
+ {pages.map((page, index) =>
94
103
  typeof page === 'number' ? (
95
104
  <Box
96
105
  key={`page-${page}`}
97
106
  as="button"
98
107
  className={clsx(
99
108
  pageButton,
100
- page === currentPage ? pageButtonVariants.active : pageButtonVariants.default
109
+ page === currentPage
110
+ ? pageButtonVariants.active
111
+ : pageButtonVariants.default,
101
112
  )}
102
113
  onClick={() => onPageChange(page)}
103
114
  >
@@ -107,9 +118,9 @@ const Pagination = ({
107
118
  <Box key={`${page}-${index}`} className={ellipsis}>
108
119
  ...
109
120
  </Box>
110
- )
111
- ))}
112
-
121
+ ),
122
+ )}
123
+
113
124
  {showPrevNext && (
114
125
  <Box
115
126
  as="button"
@@ -120,7 +131,7 @@ const Pagination = ({
120
131
  {'>'}
121
132
  </Box>
122
133
  )}
123
-
134
+
124
135
  {showFirstLast && (
125
136
  <Box
126
137
  as="button"
@@ -14,23 +14,33 @@ import {
14
14
  popoverFooter,
15
15
  } from './styles.css';
16
16
  import Box from '../Box';
17
-
18
- export type PopoverPosition = 'top' | 'bottom' | 'left' | 'right' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
17
+ import { Sprinkles } from '../../styles/sprinkles.css';
18
+
19
+ export type PopoverPosition =
20
+ | 'top'
21
+ | 'bottom'
22
+ | 'left'
23
+ | 'right'
24
+ | 'topLeft'
25
+ | 'topRight'
26
+ | 'bottomLeft'
27
+ | 'bottomRight';
19
28
  export type PopoverTriggerType = 'click' | 'hover';
20
29
 
21
- export interface PopoverProps extends React.HTMLAttributes<HTMLDivElement> {
22
- trigger: React.ReactNode;
23
- children: React.ReactNode;
24
- position?: PopoverPosition;
25
- title?: string;
26
- footer?: React.ReactNode;
27
- showArrow?: boolean;
28
- triggerType?: PopoverTriggerType;
29
- closeOnClickOutside?: boolean;
30
- closeOnEscape?: boolean;
31
- defaultOpen?: boolean;
32
- onOpenChange?: (isOpen: boolean) => void;
33
- }
30
+ export type PopoverProps = React.HTMLAttributes<HTMLDivElement> &
31
+ Sprinkles & {
32
+ trigger: React.ReactNode;
33
+ children: React.ReactNode;
34
+ position?: PopoverPosition;
35
+ title?: string;
36
+ footer?: React.ReactNode;
37
+ showArrow?: boolean;
38
+ triggerType?: PopoverTriggerType;
39
+ closeOnClickOutside?: boolean;
40
+ closeOnEscape?: boolean;
41
+ defaultOpen?: boolean;
42
+ onOpenChange?: (isOpen: boolean) => void;
43
+ };
34
44
 
35
45
  const Popover = ({
36
46
  trigger,
@@ -58,7 +68,10 @@ const Popover = ({
58
68
  if (!closeOnClickOutside) return;
59
69
 
60
70
  const handleClickOutside = (event: MouseEvent) => {
61
- if (containerRef.current && !containerRef.current.contains(event.target as Node)) {
71
+ if (
72
+ containerRef.current &&
73
+ !containerRef.current.contains(event.target as Node)
74
+ ) {
62
75
  setIsOpen(false);
63
76
  }
64
77
  };
@@ -118,7 +131,7 @@ const Popover = ({
118
131
  >
119
132
  {trigger}
120
133
  </Box>
121
-
134
+
122
135
  {isOpen && (
123
136
  <Box
124
137
  className={clsx(popoverContent, popoverPositionVariants[position])}
@@ -128,10 +141,13 @@ const Popover = ({
128
141
  {showArrow && (
129
142
  <Box
130
143
  as="span"
131
- className={clsx(popoverArrow, popoverArrowPositionVariants[position])}
144
+ className={clsx(
145
+ popoverArrow,
146
+ popoverArrowPositionVariants[position],
147
+ )}
132
148
  />
133
149
  )}
134
-
150
+
135
151
  {(title || triggerType === 'click') && (
136
152
  <Box as="div" className={popoverHeader}>
137
153
  {title && (
@@ -152,11 +168,11 @@ const Popover = ({
152
168
  )}
153
169
  </Box>
154
170
  )}
155
-
171
+
156
172
  <Box as="div" className={popoverBody}>
157
173
  {children}
158
174
  </Box>
159
-
175
+
160
176
  {footer && (
161
177
  <Box as="div" className={popoverFooter}>
162
178
  {footer}
@@ -7,15 +7,16 @@ import {
7
7
  progressLabel,
8
8
  } from './styles.css';
9
9
  import Box from '../Box';
10
+ import { Sprinkles } from '../../styles/sprinkles.css';
10
11
 
11
- type ProgressProps = {
12
- value: number;
13
- max?: number;
14
- label?: string;
15
- showPercentage?: boolean;
16
- variant?: 'default' | 'success' | 'warning' | 'error';
17
- className?: string;
18
- };
12
+ type ProgressProps = React.HTMLAttributes<HTMLDivElement> &
13
+ Sprinkles & {
14
+ value: number;
15
+ max?: number;
16
+ label?: string;
17
+ showPercentage?: boolean;
18
+ variant?: 'default' | 'success' | 'warning' | 'error';
19
+ };
19
20
 
20
21
  const Progress = ({
21
22
  value,
@@ -26,41 +27,41 @@ const Progress = ({
26
27
  className,
27
28
  }: ProgressProps) => {
28
29
  const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
29
-
30
+
30
31
  return (
31
- <Box className={clsx(progress, className)} width="100%">
32
- {(label || showPercentage) && (
33
- <Box
34
- className={progressLabel}
35
- display="flex"
36
- justifyContent="space-between"
37
- fontSize="12px"
38
- fontWeight="500"
39
- color="c5-600"
40
- marginBottom="small"
41
- fontFamily="body"
42
- >
43
- {label && <Box as="span">{label}</Box>}
44
- {showPercentage && <Box as="span">{percentage}%</Box>}
45
- </Box>
46
- )}
32
+ <Box className={clsx(progress, className)} width="100%">
33
+ {(label || showPercentage) && (
47
34
  <Box
48
- as="div"
49
- className={progressBar[variant]}
50
- role="progressbar"
51
- aria-valuenow={value}
52
- aria-valuemin={0}
53
- aria-valuemax={max}
35
+ className={progressLabel}
36
+ display="flex"
37
+ justifyContent="space-between"
38
+ fontSize="12px"
39
+ fontWeight="500"
40
+ color="c5-600"
41
+ marginBottom="small"
42
+ fontFamily="body"
54
43
  >
55
- <Box
56
- as="div"
57
- className={progressFill[variant]}
58
- style={{ width: `${percentage}%` }}
59
- role="presentation"
60
- />
44
+ {label && <Box as="span">{label}</Box>}
45
+ {showPercentage && <Box as="span">{percentage}%</Box>}
61
46
  </Box>
47
+ )}
48
+ <Box
49
+ as="div"
50
+ className={progressBar[variant]}
51
+ role="progressbar"
52
+ aria-valuenow={value}
53
+ aria-valuemin={0}
54
+ aria-valuemax={max}
55
+ >
56
+ <Box
57
+ as="div"
58
+ className={progressFill[variant]}
59
+ style={{ width: `${percentage}%` }}
60
+ role="presentation"
61
+ />
62
62
  </Box>
63
- );
63
+ </Box>
64
+ );
64
65
  };
65
66
 
66
67
  export default Progress;
@@ -8,6 +8,7 @@ import {
8
8
  radioGroupHorizontal,
9
9
  } from './styles.css';
10
10
  import Box from '../Box';
11
+ import { Sprinkles } from '../../styles/sprinkles.css';
11
12
 
12
13
  type RadioContextType = {
13
14
  name?: string;
@@ -20,17 +21,18 @@ const RadioContext = createContext<RadioContextType>({});
20
21
  type RadioProps = Omit<
21
22
  React.InputHTMLAttributes<HTMLInputElement>,
22
23
  'type' | 'value' | 'onChange'
23
- > & {
24
- label?: string;
25
- value: string;
26
- };
24
+ > &
25
+ Sprinkles & {
26
+ label?: string;
27
+ value: string;
28
+ };
27
29
 
28
30
  const Radio = forwardRef<HTMLInputElement, RadioProps>(
29
31
  ({ label, className, value, ...props }, ref) => {
30
32
  const context = useContext(RadioContext);
31
33
  const name = context.name || props.name;
32
34
  const isChecked = context.value === value;
33
-
35
+
34
36
  const handleChange = () => {
35
37
  if (context.onChange) {
36
38
  context.onChange(value);
@@ -58,7 +60,11 @@ const Radio = forwardRef<HTMLInputElement, RadioProps>(
58
60
  className={radioInput}
59
61
  {...props}
60
62
  />
61
- {label && <Box as="span" className={radioLabel}>{label}</Box>}
63
+ {label && (
64
+ <Box as="span" className={radioLabel}>
65
+ {label}
66
+ </Box>
67
+ )}
62
68
  </Box>
63
69
  );
64
70
  },
@@ -6,16 +6,17 @@ import {
6
6
  scrollAreaViewport,
7
7
  } from './styles.css';
8
8
  import Box from '../Box';
9
+ import { Sprinkles } from '../../styles/sprinkles.css';
9
10
 
10
11
  export type ScrollAreaOrientation = 'vertical' | 'horizontal' | 'both';
11
12
 
12
- export interface ScrollAreaProps {
13
- children: React.ReactNode;
14
- orientation?: ScrollAreaOrientation;
15
- maxHeight?: string | number;
16
- maxWidth?: string | number;
17
- className?: string;
18
- }
13
+ export type ScrollAreaProps = React.HTMLAttributes<HTMLDivElement> &
14
+ Sprinkles & {
15
+ children: React.ReactNode;
16
+ orientation?: ScrollAreaOrientation;
17
+ maxHeight?: string | number;
18
+ maxWidth?: string | number;
19
+ };
19
20
 
20
21
  const ScrollArea = ({
21
22
  children,
@@ -40,9 +41,7 @@ const ScrollArea = ({
40
41
  style={style}
41
42
  {...props}
42
43
  >
43
- <Box className={scrollAreaViewport}>
44
- {children}
45
- </Box>
44
+ <Box className={scrollAreaViewport}>{children}</Box>
46
45
  </Box>
47
46
  );
48
47
  };
@@ -2,6 +2,7 @@ import clsx from 'clsx';
2
2
  import React, { forwardRef } from 'react';
3
3
  import { select, selectLabel, selectWrapper } from './styles.css';
4
4
  import Box from '../Box';
5
+ import { Sprinkles } from '../../styles/sprinkles.css';
5
6
 
6
7
  type SelectOption = {
7
8
  value: string;
@@ -9,15 +10,19 @@ type SelectOption = {
9
10
  disabled?: boolean;
10
11
  };
11
12
 
12
- type SelectProps = Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> & {
13
- label?: string;
14
- options: SelectOption[];
15
- error?: boolean;
16
- fullWidth?: boolean;
17
- };
13
+ type SelectProps = Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> &
14
+ Sprinkles & {
15
+ label?: string;
16
+ options: SelectOption[];
17
+ error?: boolean;
18
+ fullWidth?: boolean;
19
+ };
18
20
 
19
21
  const Select = forwardRef<HTMLSelectElement, SelectProps>(
20
- ({ label, options, error = false, fullWidth = true, className, ...props }, ref) => {
22
+ (
23
+ { label, options, error = false, fullWidth = true, className, ...props },
24
+ ref,
25
+ ) => {
21
26
  return (
22
27
  <Box className={selectWrapper} width="100%">
23
28
  {label && (
@@ -1,18 +1,16 @@
1
1
  import clsx from 'clsx';
2
2
  import React from 'react';
3
- import {
4
- separator,
5
- separatorOrientation,
6
- } from './styles.css';
3
+ import { separator, separatorOrientation } from './styles.css';
7
4
  import Box from '../Box';
5
+ import { Sprinkles } from '../../styles/sprinkles.css';
8
6
 
9
7
  export type SeparatorOrientation = 'horizontal' | 'vertical';
10
8
 
11
- export interface SeparatorProps {
12
- orientation?: SeparatorOrientation;
13
- decorative?: boolean;
14
- className?: string;
15
- }
9
+ export type SeparatorProps = React.HTMLAttributes<HTMLHRElement> &
10
+ Sprinkles & {
11
+ orientation?: SeparatorOrientation;
12
+ decorative?: boolean;
13
+ };
16
14
 
17
15
  const Separator = ({
18
16
  orientation = 'horizontal',
@@ -23,11 +21,7 @@ const Separator = ({
23
21
  return (
24
22
  <Box
25
23
  as="hr"
26
- className={clsx(
27
- separator,
28
- separatorOrientation[orientation],
29
- className,
30
- )}
24
+ className={clsx(separator, separatorOrientation[orientation], className)}
31
25
  aria-hidden={decorative}
32
26
  {...props}
33
27
  />
@@ -7,19 +7,21 @@ import {
7
7
  skeletonAnimation,
8
8
  } from './styles.css';
9
9
  import Box from '../Box';
10
+ import { Sprinkles } from '../../styles/sprinkles.css';
10
11
 
11
12
  export type SkeletonVariant = 'text' | 'circle' | 'rectangle';
12
13
  export type SkeletonSize = 'small' | 'medium' | 'large';
13
14
  export type SkeletonAnimation = 'shimmer' | 'pulse' | 'none';
14
15
 
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
- }
16
+ export type SkeletonProps = React.HTMLAttributes<HTMLDivElement> &
17
+ Sprinkles & {
18
+ variant?: SkeletonVariant;
19
+ size?: SkeletonSize;
20
+ animation?: SkeletonAnimation;
21
+ width?: string | number;
22
+ height?: string | number;
23
+ count?: number;
24
+ };
23
25
 
24
26
  const Skeleton = ({
25
27
  variant = 'text',
@@ -54,11 +56,7 @@ const Skeleton = ({
54
56
  ));
55
57
 
56
58
  return (
57
- <Box
58
- display="flex"
59
- flexDirection="column"
60
- gap="small"
61
- >
59
+ <Box display="flex" flexDirection="column" gap="small">
62
60
  {skeletons}
63
61
  </Box>
64
62
  );
@@ -1,20 +1,24 @@
1
1
  import clsx from 'clsx';
2
- import {
3
- spinner,
4
- spinnerColors,
5
- spinnerSizes,
6
- } from './styles.css';
2
+ import { spinner, spinnerColors, spinnerSizes } from './styles.css';
7
3
  import React from 'react';
8
4
  import Box from '../Box';
5
+ import { Sprinkles } from '../../styles/sprinkles.css';
9
6
 
10
- export type SpinnerColor = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
7
+ export type SpinnerColor =
8
+ | 'primary'
9
+ | 'secondary'
10
+ | 'success'
11
+ | 'warning'
12
+ | 'error'
13
+ | 'info';
11
14
  export type SpinnerSize = 'small' | 'medium' | 'large';
12
15
 
13
- export interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
14
- color?: SpinnerColor;
15
- size?: SpinnerSize;
16
- role?: string;
17
- }
16
+ export type SpinnerProps = React.HTMLAttributes<HTMLDivElement> &
17
+ Sprinkles & {
18
+ color?: SpinnerColor;
19
+ size?: SpinnerSize;
20
+ role?: string;
21
+ };
18
22
 
19
23
  const Spinner = ({
20
24
  color = 'primary',