@jordan-mace/chaser-design-system 1.2.8 → 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 (307) 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/Box/reset.css.ts +2 -2
  13. package/src/index.ts +6 -1
  14. package/dist/components/Accordion/Accordion.d.ts +0 -15
  15. package/dist/components/Accordion/Accordion.js +0 -43
  16. package/dist/components/Accordion/index.d.ts +0 -1
  17. package/dist/components/Accordion/index.js +0 -1
  18. package/dist/components/Accordion/styles.css.d.ts +0 -7
  19. package/dist/components/Accordion/styles.css.js +0 -65
  20. package/dist/components/Alert/Alert.d.ts +0 -10
  21. package/dist/components/Alert/Alert.js +0 -8
  22. package/dist/components/Alert/index.d.ts +0 -1
  23. package/dist/components/Alert/index.js +0 -1
  24. package/dist/components/Alert/styles.css.d.ts +0 -4
  25. package/dist/components/Alert/styles.css.js +0 -54
  26. package/dist/components/AspectRatio/AspectRatio.d.ts +0 -9
  27. package/dist/components/AspectRatio/AspectRatio.js +0 -12
  28. package/dist/components/AspectRatio/index.d.ts +0 -2
  29. package/dist/components/AspectRatio/index.js +0 -1
  30. package/dist/components/Avatar/Avatar.d.ts +0 -11
  31. package/dist/components/Avatar/Avatar.js +0 -13
  32. package/dist/components/Avatar/index.d.ts +0 -1
  33. package/dist/components/Avatar/index.js +0 -1
  34. package/dist/components/Avatar/styles.css.d.ts +0 -4
  35. package/dist/components/Avatar/styles.css.js +0 -151
  36. package/dist/components/Badge/Badge.d.ts +0 -12
  37. package/dist/components/Badge/Badge.js +0 -8
  38. package/dist/components/Badge/index.d.ts +0 -2
  39. package/dist/components/Badge/index.js +0 -1
  40. package/dist/components/Badge/styles.css.d.ts +0 -5
  41. package/dist/components/Badge/styles.css.js +0 -77
  42. package/dist/components/Box/Box.d.ts +0 -11
  43. package/dist/components/Box/Box.js +0 -54
  44. package/dist/components/Box/index.d.ts +0 -2
  45. package/dist/components/Box/index.js +0 -1
  46. package/dist/components/Box/reset.css.d.ts +0 -1
  47. package/dist/components/Box/reset.css.js +0 -15
  48. package/dist/components/Breadcrumb/Breadcrumb.d.ts +0 -13
  49. package/dist/components/Breadcrumb/Breadcrumb.js +0 -8
  50. package/dist/components/Breadcrumb/index.d.ts +0 -1
  51. package/dist/components/Breadcrumb/index.js +0 -1
  52. package/dist/components/Breadcrumb/styles.css.d.ts +0 -6
  53. package/dist/components/Breadcrumb/styles.css.js +0 -50
  54. package/dist/components/Button/Button.d.ts +0 -10
  55. package/dist/components/Button/Button.js +0 -8
  56. package/dist/components/Button/index.d.ts +0 -1
  57. package/dist/components/Button/index.js +0 -1
  58. package/dist/components/Button/styles.css.d.ts +0 -2
  59. package/dist/components/Button/styles.css.js +0 -30
  60. package/dist/components/Card/Card.d.ts +0 -9
  61. package/dist/components/Card/Card.js +0 -8
  62. package/dist/components/Card/index.d.ts +0 -1
  63. package/dist/components/Card/index.js +0 -1
  64. package/dist/components/Card/styles.css.d.ts +0 -2
  65. package/dist/components/Card/styles.css.js +0 -25
  66. package/dist/components/Checkbox/Checkbox.d.ts +0 -151
  67. package/dist/components/Checkbox/Checkbox.js +0 -25
  68. package/dist/components/Checkbox/index.d.ts +0 -1
  69. package/dist/components/Checkbox/index.js +0 -1
  70. package/dist/components/Checkbox/styles.css.d.ts +0 -3
  71. package/dist/components/Checkbox/styles.css.js +0 -31
  72. package/dist/components/Collapse/Collapse.d.ts +0 -12
  73. package/dist/components/Collapse/Collapse.js +0 -56
  74. package/dist/components/Collapse/index.d.ts +0 -2
  75. package/dist/components/Collapse/index.js +0 -1
  76. package/dist/components/Collapse/styles.css.d.ts +0 -3
  77. package/dist/components/Collapse/styles.css.js +0 -36
  78. package/dist/components/Combobox/Combobox.d.ts +0 -24
  79. package/dist/components/Combobox/Combobox.js +0 -111
  80. package/dist/components/Combobox/index.d.ts +0 -2
  81. package/dist/components/Combobox/index.js +0 -1
  82. package/dist/components/Combobox/styles.css.d.ts +0 -13
  83. package/dist/components/Combobox/styles.css.js +0 -142
  84. package/dist/components/Container/Container.d.ts +0 -163
  85. package/dist/components/Container/Container.js +0 -21
  86. package/dist/components/Container/index.d.ts +0 -2
  87. package/dist/components/Container/index.js +0 -1
  88. package/dist/components/Divider/Divider.d.ts +0 -10
  89. package/dist/components/Divider/Divider.js +0 -10
  90. package/dist/components/Divider/index.d.ts +0 -2
  91. package/dist/components/Divider/index.js +0 -1
  92. package/dist/components/Divider/styles.css.d.ts +0 -4
  93. package/dist/components/Divider/styles.css.js +0 -41
  94. package/dist/components/Drawer/Drawer.d.ts +0 -18
  95. package/dist/components/Drawer/Drawer.js +0 -65
  96. package/dist/components/Drawer/index.d.ts +0 -2
  97. package/dist/components/Drawer/index.js +0 -1
  98. package/dist/components/Drawer/styles.css.d.ts +0 -8
  99. package/dist/components/Drawer/styles.css.js +0 -125
  100. package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -24
  101. package/dist/components/DropdownMenu/DropdownMenu.js +0 -46
  102. package/dist/components/DropdownMenu/index.d.ts +0 -2
  103. package/dist/components/DropdownMenu/index.js +0 -1
  104. package/dist/components/DropdownMenu/styles.css.d.ts +0 -9
  105. package/dist/components/DropdownMenu/styles.css.js +0 -93
  106. package/dist/components/EmptyState/EmptyState.d.ts +0 -10
  107. package/dist/components/EmptyState/EmptyState.js +0 -8
  108. package/dist/components/EmptyState/index.d.ts +0 -2
  109. package/dist/components/EmptyState/index.js +0 -1
  110. package/dist/components/EmptyState/styles.css.d.ts +0 -5
  111. package/dist/components/EmptyState/styles.css.js +0 -30
  112. package/dist/components/FileUpload/FileUpload.d.ts +0 -28
  113. package/dist/components/FileUpload/FileUpload.js +0 -106
  114. package/dist/components/FileUpload/index.d.ts +0 -2
  115. package/dist/components/FileUpload/index.js +0 -1
  116. package/dist/components/FileUpload/styles.css.d.ts +0 -19
  117. package/dist/components/FileUpload/styles.css.js +0 -145
  118. package/dist/components/Form/Form.d.ts +0 -7
  119. package/dist/components/Form/Form.js +0 -8
  120. package/dist/components/Form/FormInput.d.ts +0 -5
  121. package/dist/components/Form/FormInput.js +0 -9
  122. package/dist/components/Form/index.d.ts +0 -2
  123. package/dist/components/Form/index.js +0 -2
  124. package/dist/components/Form/styles.css.d.ts +0 -2
  125. package/dist/components/Form/styles.css.js +0 -11
  126. package/dist/components/Grid/Grid.d.ts +0 -162
  127. package/dist/components/Grid/Grid.js +0 -25
  128. package/dist/components/Grid/index.d.ts +0 -2
  129. package/dist/components/Grid/index.js +0 -1
  130. package/dist/components/Icon/Icon.d.ts +0 -12
  131. package/dist/components/Icon/Icon.js +0 -21
  132. package/dist/components/Icon/index.d.ts +0 -1
  133. package/dist/components/Icon/index.js +0 -1
  134. package/dist/components/Icon/styles.css.d.ts +0 -1
  135. package/dist/components/Icon/styles.css.js +0 -9
  136. package/dist/components/Input/Input.d.ts +0 -8
  137. package/dist/components/Input/Input.js +0 -9
  138. package/dist/components/Input/index.d.ts +0 -1
  139. package/dist/components/Input/index.js +0 -1
  140. package/dist/components/Input/styles.css.d.ts +0 -2
  141. package/dist/components/Input/styles.css.js +0 -8
  142. package/dist/components/Kbd/Kbd.d.ts +0 -7
  143. package/dist/components/Kbd/Kbd.js +0 -6
  144. package/dist/components/Kbd/index.d.ts +0 -2
  145. package/dist/components/Kbd/index.js +0 -1
  146. package/dist/components/Kbd/styles.css.d.ts +0 -1
  147. package/dist/components/Kbd/styles.css.js +0 -16
  148. package/dist/components/List/List.d.ts +0 -6
  149. package/dist/components/List/List.js +0 -7
  150. package/dist/components/List/ListItem.d.ts +0 -6
  151. package/dist/components/List/ListItem.js +0 -7
  152. package/dist/components/List/index.d.ts +0 -2
  153. package/dist/components/List/index.js +0 -2
  154. package/dist/components/List/styles.css.d.ts +0 -2
  155. package/dist/components/List/styles.css.js +0 -11
  156. package/dist/components/Modal/Modal.d.ts +0 -15
  157. package/dist/components/Modal/Modal.js +0 -35
  158. package/dist/components/Modal/index.d.ts +0 -2
  159. package/dist/components/Modal/index.js +0 -1
  160. package/dist/components/Modal/styles.css.d.ts +0 -7
  161. package/dist/components/Modal/styles.css.js +0 -92
  162. package/dist/components/Navbar/Navbar.d.ts +0 -7
  163. package/dist/components/Navbar/Navbar.js +0 -8
  164. package/dist/components/Navbar/NavbarItem.d.ts +0 -7
  165. package/dist/components/Navbar/NavbarItem.js +0 -8
  166. package/dist/components/Navbar/index.d.ts +0 -2
  167. package/dist/components/Navbar/index.js +0 -2
  168. package/dist/components/Navbar/styles.css.d.ts +0 -2
  169. package/dist/components/Navbar/styles.css.js +0 -3
  170. package/dist/components/NumberInput/NumberInput.d.ts +0 -21
  171. package/dist/components/NumberInput/NumberInput.js +0 -39
  172. package/dist/components/NumberInput/index.d.ts +0 -2
  173. package/dist/components/NumberInput/index.js +0 -1
  174. package/dist/components/NumberInput/styles.css.d.ts +0 -10
  175. package/dist/components/NumberInput/styles.css.js +0 -117
  176. package/dist/components/Pagination/Pagination.d.ts +0 -12
  177. package/dist/components/Pagination/Pagination.js +0 -50
  178. package/dist/components/Pagination/index.d.ts +0 -2
  179. package/dist/components/Pagination/index.js +0 -1
  180. package/dist/components/Pagination/styles.css.d.ts +0 -4
  181. package/dist/components/Pagination/styles.css.js +0 -44
  182. package/dist/components/Popover/Popover.d.ts +0 -19
  183. package/dist/components/Popover/Popover.js +0 -56
  184. package/dist/components/Popover/index.d.ts +0 -2
  185. package/dist/components/Popover/index.js +0 -1
  186. package/dist/components/Popover/styles.css.d.ts +0 -11
  187. package/dist/components/Popover/styles.css.js +0 -185
  188. package/dist/components/Progress/Progress.d.ts +0 -11
  189. package/dist/components/Progress/Progress.js +0 -9
  190. package/dist/components/Progress/index.d.ts +0 -1
  191. package/dist/components/Progress/index.js +0 -1
  192. package/dist/components/Progress/styles.css.d.ts +0 -4
  193. package/dist/components/Progress/styles.css.js +0 -71
  194. package/dist/components/Radio/Radio.d.ts +0 -161
  195. package/dist/components/Radio/Radio.js +0 -25
  196. package/dist/components/Radio/index.d.ts +0 -1
  197. package/dist/components/Radio/index.js +0 -1
  198. package/dist/components/Radio/styles.css.d.ts +0 -5
  199. package/dist/components/Radio/styles.css.js +0 -42
  200. package/dist/components/ScrollArea/ScrollArea.d.ts +0 -11
  201. package/dist/components/ScrollArea/ScrollArea.js +0 -12
  202. package/dist/components/ScrollArea/index.d.ts +0 -2
  203. package/dist/components/ScrollArea/index.js +0 -1
  204. package/dist/components/ScrollArea/styles.css.d.ts +0 -3
  205. package/dist/components/ScrollArea/styles.css.js +0 -25
  206. package/dist/components/Select/Select.d.ts +0 -158
  207. package/dist/components/Select/Select.js +0 -10
  208. package/dist/components/Select/index.d.ts +0 -1
  209. package/dist/components/Select/index.js +0 -1
  210. package/dist/components/Select/styles.css.d.ts +0 -4
  211. package/dist/components/Select/styles.css.js +0 -82
  212. package/dist/components/Separator/Separator.d.ts +0 -9
  213. package/dist/components/Separator/Separator.js +0 -8
  214. package/dist/components/Separator/index.d.ts +0 -2
  215. package/dist/components/Separator/index.js +0 -1
  216. package/dist/components/Separator/styles.css.d.ts +0 -4
  217. package/dist/components/Separator/styles.css.js +0 -28
  218. package/dist/components/Skeleton/Skeleton.d.ts +0 -15
  219. package/dist/components/Skeleton/Skeleton.js +0 -13
  220. package/dist/components/Skeleton/index.d.ts +0 -2
  221. package/dist/components/Skeleton/index.js +0 -1
  222. package/dist/components/Skeleton/styles.css.d.ts +0 -4
  223. package/dist/components/Skeleton/styles.css.js +0 -56
  224. package/dist/components/Spinner/Spinner.d.ts +0 -11
  225. package/dist/components/Spinner/Spinner.js +0 -8
  226. package/dist/components/Spinner/index.d.ts +0 -2
  227. package/dist/components/Spinner/index.js +0 -1
  228. package/dist/components/Spinner/styles.css.d.ts +0 -4
  229. package/dist/components/Spinner/styles.css.js +0 -55
  230. package/dist/components/Stack/Stack.d.ts +0 -167
  231. package/dist/components/Stack/Stack.js +0 -24
  232. package/dist/components/Stack/index.d.ts +0 -2
  233. package/dist/components/Stack/index.js +0 -1
  234. package/dist/components/Stepper/Stepper.d.ts +0 -19
  235. package/dist/components/Stepper/Stepper.js +0 -25
  236. package/dist/components/Stepper/index.d.ts +0 -2
  237. package/dist/components/Stepper/index.js +0 -1
  238. package/dist/components/Stepper/styles.css.d.ts +0 -14
  239. package/dist/components/Stepper/styles.css.js +0 -104
  240. package/dist/components/Table/Table.d.ts +0 -41
  241. package/dist/components/Table/Table.js +0 -39
  242. package/dist/components/Table/index.d.ts +0 -1
  243. package/dist/components/Table/index.js +0 -1
  244. package/dist/components/Table/styles.css.d.ts +0 -8
  245. package/dist/components/Table/styles.css.js +0 -49
  246. package/dist/components/Tabs/Tabs.d.ts +0 -29
  247. package/dist/components/Tabs/Tabs.js +0 -52
  248. package/dist/components/Tabs/index.d.ts +0 -1
  249. package/dist/components/Tabs/index.js +0 -1
  250. package/dist/components/Tabs/styles.css.d.ts +0 -6
  251. package/dist/components/Tabs/styles.css.js +0 -100
  252. package/dist/components/Tag/Tag.d.ts +0 -16
  253. package/dist/components/Tag/Tag.js +0 -18
  254. package/dist/components/Tag/index.d.ts +0 -1
  255. package/dist/components/Tag/index.js +0 -1
  256. package/dist/components/Tag/styles.css.d.ts +0 -3
  257. package/dist/components/Tag/styles.css.js +0 -93
  258. package/dist/components/Text/Header.d.ts +0 -8
  259. package/dist/components/Text/Header.js +0 -8
  260. package/dist/components/Text/P.d.ts +0 -7
  261. package/dist/components/Text/P.js +0 -8
  262. package/dist/components/Text/index.d.ts +0 -2
  263. package/dist/components/Text/index.js +0 -2
  264. package/dist/components/Text/styles.css.d.ts +0 -2
  265. package/dist/components/Text/styles.css.js +0 -13
  266. package/dist/components/TextArea/TextArea.d.ts +0 -8
  267. package/dist/components/TextArea/TextArea.js +0 -9
  268. package/dist/components/TextArea/index.d.ts +0 -2
  269. package/dist/components/TextArea/index.js +0 -1
  270. package/dist/components/TextArea/styles.css.d.ts +0 -2
  271. package/dist/components/TextArea/styles.css.js +0 -10
  272. package/dist/components/Toast/Toast.d.ts +0 -34
  273. package/dist/components/Toast/Toast.js +0 -177
  274. package/dist/components/Toast/index.d.ts +0 -1
  275. package/dist/components/Toast/index.js +0 -1
  276. package/dist/components/Toast/styles.css.d.ts +0 -21
  277. package/dist/components/Toast/styles.css.js +0 -192
  278. package/dist/components/Toggle/Toggle.d.ts +0 -11
  279. package/dist/components/Toggle/Toggle.js +0 -17
  280. package/dist/components/Toggle/index.d.ts +0 -2
  281. package/dist/components/Toggle/index.js +0 -1
  282. package/dist/components/Toggle/styles.css.d.ts +0 -12
  283. package/dist/components/Toggle/styles.css.js +0 -118
  284. package/dist/components/Tooltip/Tooltip.d.ts +0 -11
  285. package/dist/components/Tooltip/Tooltip.js +0 -16
  286. package/dist/components/Tooltip/index.d.ts +0 -2
  287. package/dist/components/Tooltip/index.js +0 -1
  288. package/dist/components/Tooltip/styles.css.d.ts +0 -8
  289. package/dist/components/Tooltip/styles.css.js +0 -86
  290. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +0 -8
  291. package/dist/components/VisuallyHidden/VisuallyHidden.js +0 -9
  292. package/dist/components/VisuallyHidden/index.d.ts +0 -2
  293. package/dist/components/VisuallyHidden/index.js +0 -1
  294. package/dist/components/VisuallyHidden/styles.css.d.ts +0 -1
  295. package/dist/components/VisuallyHidden/styles.css.js +0 -12
  296. package/dist/components/index.d.ts +0 -68
  297. package/dist/components/index.js +0 -47
  298. package/dist/index.d.ts +0 -1
  299. package/dist/index.js +0 -1
  300. package/dist/styles/layers.css.d.ts +0 -3
  301. package/dist/styles/layers.css.js +0 -3
  302. package/dist/styles/sprinkles.css.d.ts +0 -241
  303. package/dist/styles/sprinkles.css.js +0 -165
  304. package/dist/styles/theme.css.d.ts +0 -38
  305. package/dist/styles/theme.css.js +0 -51
  306. package/dist/styles/utils.d.ts +0 -2
  307. package/dist/styles/utils.js +0 -7
package/dist/index.mjs ADDED
@@ -0,0 +1,4729 @@
1
+ import { componentsLayer, resetLayer } from "./styles/layers.css.mjs";
2
+ import { sprinkles } from "./styles/sprinkles.css.mjs";
3
+ import { vars } from "./styles/theme.css.mjs";
4
+ import "./styles/reset.css.mjs";
5
+ import clsx from "clsx";
6
+ import { keyframes, style, styleVariants } from "@vanilla-extract/css";
7
+ import React, { createContext, forwardRef, useCallback, useContext, useEffect, useId, useRef, useState } from "react";
8
+ import { createPortal } from "react-dom";
9
+
10
+ //#region src/styles/utils.ts
11
+ const styleWithLayer = (rule) => style({ "@layer": { [componentsLayer]: rule } });
12
+
13
+ //#endregion
14
+ //#region src/components/Button/styles.css.ts
15
+ const buttonVariants = styleVariants({
16
+ primary: {
17
+ backgroundColor: vars.colors.buttonBackgroundPrimary,
18
+ color: vars.colors.buttonTextPrimary,
19
+ ":focus-visible": { backgroundColor: vars.colors.buttonBackgroundFocusedPrimary },
20
+ ":hover": { backgroundColor: vars.colors.buttonBackgroundFocusedPrimary }
21
+ },
22
+ secondary: {
23
+ backgroundColor: vars.colors.buttonBackgroundSecondary,
24
+ color: vars.colors.buttonTextSecondary,
25
+ ":focus-visible": { backgroundColor: vars.colors.buttonBackgroundFocusedSecondary },
26
+ ":hover": { backgroundColor: vars.colors.buttonBackgroundFocusedSecondary }
27
+ }
28
+ });
29
+ const button = styleWithLayer({
30
+ padding: "1rem",
31
+ borderRadius: "1rem",
32
+ border: 0
33
+ });
34
+
35
+ //#endregion
36
+ //#region src/components/Box/reset.css.ts
37
+ const reset = style({ "@layer": { [resetLayer]: {
38
+ margin: 0,
39
+ padding: 0,
40
+ border: 0,
41
+ boxSizing: "border-box",
42
+ fontSize: "100%",
43
+ font: "inherit",
44
+ verticalAlign: "baseline"
45
+ } } });
46
+
47
+ //#endregion
48
+ //#region src/components/Box/Box.tsx
49
+ const Box = forwardRef((props, ref) => {
50
+ const { as: Component = "div", className, children, ...rest } = props;
51
+ const sprinkleProps = {};
52
+ const otherProps = { ref };
53
+ const sprinkleKeys = new Set([
54
+ "display",
55
+ "width",
56
+ "height",
57
+ "flexDirection",
58
+ "justifyContent",
59
+ "alignItems",
60
+ "paddingTop",
61
+ "paddingBottom",
62
+ "paddingLeft",
63
+ "paddingRight",
64
+ "marginLeft",
65
+ "marginRight",
66
+ "marginTop",
67
+ "marginBottom",
68
+ "borderLeft",
69
+ "borderRight",
70
+ "borderTop",
71
+ "borderBottom",
72
+ "borderRadius",
73
+ "gap",
74
+ "padding",
75
+ "border",
76
+ "paddingX",
77
+ "paddingY",
78
+ "marginX",
79
+ "marginY",
80
+ "placeItems",
81
+ "color",
82
+ "background"
83
+ ]);
84
+ Object.entries(rest).forEach(([key, value]) => {
85
+ if (sprinkleKeys.has(key)) {
86
+ sprinkleProps[key] = value;
87
+ } else {
88
+ otherProps[key] = value;
89
+ }
90
+ });
91
+ return React.createElement(Component, {
92
+ className: clsx(reset, sprinkles(sprinkleProps), className),
93
+ ...otherProps
94
+ }, children);
95
+ });
96
+ Box.displayName = "Box";
97
+
98
+ //#endregion
99
+ //#region src/components/Button/Button.tsx
100
+ const Button = ({ label, ...props }) => {
101
+ return /* @__PURE__ */ React.createElement(Box, {
102
+ as: "button",
103
+ borderRadius: "large",
104
+ width: props.fullWidth ? "100%" : undefined,
105
+ className: clsx(buttonVariants[props.variant], button, props.className),
106
+ ...props
107
+ }, props.children || label);
108
+ };
109
+
110
+ //#endregion
111
+ //#region src/components/List/styles.css.ts
112
+ const list = style({
113
+ listStyle: "none",
114
+ padding: 0,
115
+ margin: 0
116
+ });
117
+ const listItem = style({
118
+ padding: "0.5rem 0",
119
+ borderBottom: `1px solid ${vars.colors.listBorder}`
120
+ });
121
+
122
+ //#endregion
123
+ //#region src/components/List/List.tsx
124
+ const List = ({ children, ...props }) => {
125
+ return /* @__PURE__ */ React.createElement(Box, {
126
+ as: "ul",
127
+ className: list,
128
+ ...props
129
+ }, children);
130
+ };
131
+
132
+ //#endregion
133
+ //#region src/components/List/ListItem.tsx
134
+ const ListItem = ({ children, ...props }) => {
135
+ return /* @__PURE__ */ React.createElement(Box, {
136
+ as: "li",
137
+ className: listItem,
138
+ ...props
139
+ }, children);
140
+ };
141
+
142
+ //#endregion
143
+ //#region src/components/Input/styles.css.ts
144
+ const inputStyle = styleWithLayer({
145
+ padding: "0.5rem 1rem",
146
+ borderRadius: "0.5rem"
147
+ });
148
+ const label$1 = styleWithLayer({ paddingRight: "0.5rem" });
149
+
150
+ //#endregion
151
+ //#region src/components/Text/styles.css.ts
152
+ const text = style({
153
+ color: vars.colors.textPrimary,
154
+ fontFamily: vars.fontFamily.body,
155
+ lineHeight: "24px"
156
+ });
157
+ const heading = style({
158
+ color: vars.colors.textPrimary,
159
+ fontFamily: vars.fontFamily.heading,
160
+ lineHeight: "32px",
161
+ fontWeight: "700"
162
+ });
163
+
164
+ //#endregion
165
+ //#region src/components/Input/Input.tsx
166
+ const Input = (props) => {
167
+ return /* @__PURE__ */ React.createElement(Box, {
168
+ display: "flex",
169
+ flexDirection: {
170
+ mobile: "column",
171
+ tablet: "row"
172
+ },
173
+ gap: "small"
174
+ }, props.label && /* @__PURE__ */ React.createElement(Box, {
175
+ as: "label",
176
+ className: clsx(text, label$1),
177
+ marginX: {
178
+ mobile: "auto",
179
+ tablet: "none"
180
+ },
181
+ marginY: {
182
+ mobile: "none",
183
+ tablet: "auto"
184
+ },
185
+ htmlFor: props.id
186
+ }, props.label), /* @__PURE__ */ React.createElement(Box, {
187
+ as: "input",
188
+ className: clsx(inputStyle, props.className),
189
+ width: props.fullWidth ? "100%" : undefined,
190
+ ...props
191
+ }));
192
+ };
193
+
194
+ //#endregion
195
+ //#region src/components/Form/styles.css.ts
196
+ const formStyle = styleWithLayer({
197
+ display: "grid",
198
+ gridTemplateRows: "min-content 1fr min-content"
199
+ });
200
+ const formInputStyle = styleWithLayer({
201
+ display: "flex",
202
+ flexDirection: "row",
203
+ justifyContent: "space-between",
204
+ alignItems: "center"
205
+ });
206
+
207
+ //#endregion
208
+ //#region src/components/Form/Form.tsx
209
+ const Form = (props) => {
210
+ return /* @__PURE__ */ React.createElement(Box, {
211
+ as: "form",
212
+ gap: "medium",
213
+ paddingX: "large",
214
+ className: clsx(formStyle, props.className),
215
+ ...props
216
+ }, props.children);
217
+ };
218
+
219
+ //#endregion
220
+ //#region src/components/Form/FormInput.tsx
221
+ const FormInput = (props) => {
222
+ return /* @__PURE__ */ React.createElement(Box, {
223
+ as: Input,
224
+ padding: "small",
225
+ className: clsx(formInputStyle, props.className),
226
+ label: props.label,
227
+ ...props
228
+ });
229
+ };
230
+
231
+ //#endregion
232
+ //#region src/components/Navbar/styles.css.ts
233
+ const navbarStyle = styleWithLayer({});
234
+ const navbarItemStyle = styleWithLayer({});
235
+
236
+ //#endregion
237
+ //#region src/components/Navbar/Navbar.tsx
238
+ const Navbar = (props) => {
239
+ return /* @__PURE__ */ React.createElement(Box, {
240
+ as: "nav",
241
+ width: "100%",
242
+ display: "flex",
243
+ flexDirection: "row",
244
+ gap: "medium",
245
+ className: clsx(navbarStyle, props.className),
246
+ ...props
247
+ });
248
+ };
249
+
250
+ //#endregion
251
+ //#region src/components/Navbar/NavbarItem.tsx
252
+ const NavbarItem = (props) => {
253
+ return /* @__PURE__ */ React.createElement(Box, {
254
+ as: "div",
255
+ className: clsx(navbarItemStyle, props.className),
256
+ ...props
257
+ });
258
+ };
259
+
260
+ //#endregion
261
+ //#region src/components/Card/styles.css.ts
262
+ const cardVariants = styleVariants({
263
+ elevated: {
264
+ backgroundColor: vars.colors.backgroundDefault,
265
+ boxShadow: "0 2px 8px rgba(0, 0, 0, 0.1)",
266
+ border: "none"
267
+ },
268
+ outlined: {
269
+ backgroundColor: vars.colors.backgroundDefault,
270
+ border: `1px solid ${vars.colors.borderDefault}`,
271
+ boxShadow: "none"
272
+ },
273
+ filled: {
274
+ backgroundColor: vars.colors.backgroundMuted,
275
+ border: "none",
276
+ boxShadow: "none"
277
+ }
278
+ });
279
+ const card = styleWithLayer({
280
+ display: "block",
281
+ position: "relative",
282
+ transition: "all 0.2s ease-in-out"
283
+ });
284
+
285
+ //#endregion
286
+ //#region src/components/Card/Card.tsx
287
+ const Card = ({ variant = "elevated", padding = "medium", ...props }) => {
288
+ return /* @__PURE__ */ React.createElement(Box, {
289
+ as: "div",
290
+ borderRadius: "large",
291
+ padding: padding !== "none" ? padding : undefined,
292
+ className: clsx(cardVariants[variant], card, props.className),
293
+ ...props
294
+ }, props.children);
295
+ };
296
+
297
+ //#endregion
298
+ //#region src/components/Alert/styles.css.ts
299
+ const alertVariants = styleVariants({
300
+ success: {
301
+ backgroundColor: vars.colors.alertSuccessBackground,
302
+ borderLeftColor: vars.colors.alertSuccessBorder,
303
+ color: vars.colors.alertSuccessText
304
+ },
305
+ warning: {
306
+ backgroundColor: vars.colors.alertWarningBackground,
307
+ borderLeftColor: vars.colors.alertWarningBorder,
308
+ color: vars.colors.alertWarningText
309
+ },
310
+ error: {
311
+ backgroundColor: vars.colors.alertErrorBackground,
312
+ borderLeftColor: vars.colors.alertErrorBorder,
313
+ color: vars.colors.alertErrorText
314
+ },
315
+ info: {
316
+ backgroundColor: vars.colors.alertInfoBackground,
317
+ borderLeftColor: vars.colors.alertInfoBorder,
318
+ color: vars.colors.alertInfoText
319
+ }
320
+ });
321
+ const alert = styleWithLayer({
322
+ padding: "1rem",
323
+ borderLeft: "4px solid",
324
+ borderRadius: "0.5rem",
325
+ display: "flex",
326
+ alignItems: "flex-start",
327
+ gap: "0.5rem",
328
+ fontFamily: vars.fontFamily.body,
329
+ fontSize: "0.875rem",
330
+ lineHeight: "1.5"
331
+ });
332
+ const alertContent = styleWithLayer({ flex: 1 });
333
+ const alertDismissButton = styleWithLayer({
334
+ background: "none",
335
+ border: "none",
336
+ padding: "0.25rem",
337
+ cursor: "pointer",
338
+ borderRadius: "0.25rem",
339
+ display: "flex",
340
+ alignItems: "center",
341
+ justifyContent: "center",
342
+ opacity: .7,
343
+ transition: "opacity 0.2s ease-in-out",
344
+ ":hover": { opacity: 1 }
345
+ });
346
+
347
+ //#endregion
348
+ //#region src/components/Alert/Alert.tsx
349
+ const Alert = ({ severity = "info", dismissible = false, onDismiss, children, ...props }) => {
350
+ return /* @__PURE__ */ React.createElement(Box, {
351
+ as: "div",
352
+ role: "alert",
353
+ className: clsx(alert, alertVariants[severity], props.className),
354
+ ...props
355
+ }, /* @__PURE__ */ React.createElement(Box, {
356
+ as: "div",
357
+ className: alertContent
358
+ }, children), dismissible && onDismiss && /* @__PURE__ */ React.createElement(Box, {
359
+ as: "button",
360
+ className: alertDismissButton,
361
+ onClick: onDismiss,
362
+ "aria-label": "Dismiss alert",
363
+ type: "button"
364
+ }, "×"));
365
+ };
366
+
367
+ //#endregion
368
+ //#region src/components/Text/P.tsx
369
+ const P = (props) => {
370
+ return /* @__PURE__ */ React.createElement(Box, {
371
+ as: "p",
372
+ className: clsx(props.className, text)
373
+ }, props.children);
374
+ };
375
+
376
+ //#endregion
377
+ //#region src/components/Text/Header.tsx
378
+ const Header = ({ variant, children, className }) => {
379
+ return /* @__PURE__ */ React.createElement(Box, {
380
+ as: variant,
381
+ className: clsx(className, text, heading)
382
+ }, children);
383
+ };
384
+
385
+ //#endregion
386
+ //#region src/components/Modal/styles.css.ts
387
+ const modalVariants = styleVariants({
388
+ small: { maxWidth: "400px" },
389
+ medium: { maxWidth: "600px" },
390
+ large: { maxWidth: "800px" },
391
+ full: { maxWidth: "95vw" }
392
+ });
393
+ const modal = styleWithLayer({
394
+ background: vars.colors.backgroundDefault,
395
+ borderRadius: "0.75rem",
396
+ boxShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
397
+ border: "1px solid var(--modal-border, transparent)",
398
+ color: vars.colors.textPrimary,
399
+ fontFamily: vars.fontFamily.body,
400
+ maxWidth: "90vw",
401
+ maxHeight: "90vh",
402
+ flexDirection: "column",
403
+ overflow: "hidden",
404
+ selectors: {
405
+ "&:not([open])": { display: "none" },
406
+ "[open] &": { display: "flex" },
407
+ "&::backdrop": { backgroundColor: "rgba(0, 0, 0, 0.5)" }
408
+ }
409
+ });
410
+ const modalHeader = styleWithLayer({
411
+ padding: "1.25rem",
412
+ borderBottom: `1px solid ${vars.colors.borderMuted}`,
413
+ display: "flex",
414
+ alignItems: "center",
415
+ justifyContent: "space-between",
416
+ gap: "1rem"
417
+ });
418
+ const modalTitle = styleWithLayer({
419
+ fontFamily: vars.fontFamily.heading,
420
+ fontSize: "1.25rem",
421
+ fontWeight: "600",
422
+ color: vars.colors.textPrimary,
423
+ margin: 0
424
+ });
425
+ const modalCloseButton = styleWithLayer({
426
+ background: "none",
427
+ border: "none",
428
+ padding: "0.5rem",
429
+ cursor: "pointer",
430
+ borderRadius: "0.375rem",
431
+ display: "flex",
432
+ alignItems: "center",
433
+ justifyContent: "center",
434
+ color: vars.colors.textSecondary,
435
+ fontSize: "1.5rem",
436
+ lineHeight: "1",
437
+ transition: "background-color 0.2s ease-in-out, color 0.2s ease-in-out",
438
+ selectors: {
439
+ "&:hover": {
440
+ backgroundColor: vars.colors.borderMuted,
441
+ color: vars.colors.textPrimary
442
+ },
443
+ "&:focus-visible": {
444
+ outline: "2px solid var(--modal-focus-ring, currentColor)",
445
+ outlineOffset: "2px"
446
+ }
447
+ }
448
+ });
449
+ const modalBody = styleWithLayer({
450
+ padding: "1.25rem",
451
+ overflowY: "auto",
452
+ flex: 1
453
+ });
454
+ const modalFooter = styleWithLayer({
455
+ padding: "1.25rem",
456
+ borderTop: `1px solid ${vars.colors.borderMuted}`,
457
+ display: "flex",
458
+ gap: "0.75rem",
459
+ justifyContent: "flex-end",
460
+ alignItems: "center"
461
+ });
462
+
463
+ //#endregion
464
+ //#region src/components/Modal/Modal.tsx
465
+ const Modal = ({ isOpen, onClose, title, size = "medium", children, footer, showCloseButton = true, ...props }) => {
466
+ const dialogRef = useRef(null);
467
+ useEffect(() => {
468
+ const dialog = dialogRef.current;
469
+ if (!dialog) return;
470
+ if (isOpen) {
471
+ dialog.showModal();
472
+ dialog.classList.add("open");
473
+ } else {
474
+ dialog.close();
475
+ dialog.classList.remove("open");
476
+ }
477
+ const handleClose = () => {
478
+ onClose();
479
+ };
480
+ dialog.addEventListener("close", handleClose);
481
+ return () => {
482
+ dialog.removeEventListener("close", handleClose);
483
+ };
484
+ }, [isOpen, onClose]);
485
+ return /* @__PURE__ */ React.createElement(Box, {
486
+ as: "dialog",
487
+ ref: dialogRef,
488
+ className: clsx(modal, modalVariants[size]),
489
+ onClick: (e) => {
490
+ if (e.target === dialogRef.current) {
491
+ onClose();
492
+ }
493
+ },
494
+ ...props
495
+ }, title && /* @__PURE__ */ React.createElement(Box, {
496
+ as: "div",
497
+ className: modalHeader
498
+ }, /* @__PURE__ */ React.createElement(Box, {
499
+ as: "h2",
500
+ className: modalTitle
501
+ }, title), showCloseButton && /* @__PURE__ */ React.createElement(Box, {
502
+ as: "button",
503
+ className: modalCloseButton,
504
+ onClick: onClose,
505
+ "aria-label": "Close modal",
506
+ type: "button"
507
+ }, "×")), /* @__PURE__ */ React.createElement(Box, {
508
+ as: "div",
509
+ className: modalBody
510
+ }, children), footer && /* @__PURE__ */ React.createElement(Box, {
511
+ as: "div",
512
+ className: modalFooter
513
+ }, footer));
514
+ };
515
+
516
+ //#endregion
517
+ //#region src/components/Badge/styles.css.ts
518
+ const badgeVariants = styleVariants({
519
+ default: {
520
+ backgroundColor: vars.colors.borderDefault,
521
+ color: vars.colors.textPrimary
522
+ },
523
+ success: {
524
+ backgroundColor: vars.colors.alertSuccessBackground,
525
+ color: vars.colors.alertSuccessText,
526
+ border: `1px solid ${vars.colors.alertSuccessBorder}`
527
+ },
528
+ warning: {
529
+ backgroundColor: vars.colors.alertWarningBackground,
530
+ color: vars.colors.alertWarningText,
531
+ border: `1px solid ${vars.colors.alertWarningBorder}`
532
+ },
533
+ error: {
534
+ backgroundColor: vars.colors.alertErrorBackground,
535
+ color: vars.colors.alertErrorText,
536
+ border: `1px solid ${vars.colors.alertErrorBorder}`
537
+ },
538
+ info: {
539
+ backgroundColor: vars.colors.alertInfoBackground,
540
+ color: vars.colors.alertInfoText,
541
+ border: `1px solid ${vars.colors.alertInfoBorder}`
542
+ }
543
+ });
544
+ const badgeSizes = styleVariants({
545
+ small: {
546
+ fontSize: "0.7rem",
547
+ padding: "0.125rem 0.375rem",
548
+ borderRadius: "0.25rem"
549
+ },
550
+ medium: {
551
+ fontSize: "0.75rem",
552
+ padding: "0.25rem 0.5rem",
553
+ borderRadius: "0.375rem"
554
+ },
555
+ large: {
556
+ fontSize: "0.875rem",
557
+ padding: "0.375rem 0.625rem",
558
+ borderRadius: "0.5rem"
559
+ }
560
+ });
561
+ const badge = styleWithLayer({
562
+ display: "inline-flex",
563
+ alignItems: "center",
564
+ justifyContent: "center",
565
+ fontWeight: "500",
566
+ whiteSpace: "nowrap",
567
+ fontFamily: vars.fontFamily.body,
568
+ transition: "background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out"
569
+ });
570
+ const badgeDot = styleWithLayer({
571
+ width: "0.5rem",
572
+ height: "0.5rem",
573
+ borderRadius: "50%",
574
+ display: "inline-block",
575
+ padding: 0,
576
+ minWidth: "auto"
577
+ });
578
+ const badgeDotSizes = styleVariants({
579
+ small: {
580
+ width: "0.375rem",
581
+ height: "0.375rem"
582
+ },
583
+ medium: {
584
+ width: "0.5rem",
585
+ height: "0.5rem"
586
+ },
587
+ large: {
588
+ width: "0.625rem",
589
+ height: "0.625rem"
590
+ }
591
+ });
592
+
593
+ //#endregion
594
+ //#region src/components/Badge/Badge.tsx
595
+ const Badge = ({ variant = "default", size = "medium", dot = false, children, ...props }) => {
596
+ return /* @__PURE__ */ React.createElement(Box, {
597
+ as: "span",
598
+ className: clsx(badge, badgeVariants[variant], dot ? badgeDot : badgeSizes[size], dot && badgeDotSizes[size], props.className),
599
+ ...props
600
+ }, dot ? null : children);
601
+ };
602
+
603
+ //#endregion
604
+ //#region src/components/Divider/styles.css.ts
605
+ const dividerOrientations = styleVariants({
606
+ horizontal: {
607
+ width: "100%",
608
+ height: "1px",
609
+ borderTop: `1px solid ${vars.colors.borderMuted}`
610
+ },
611
+ vertical: {
612
+ width: "1px",
613
+ height: "100%",
614
+ borderLeft: `1px solid ${vars.colors.borderMuted}`
615
+ }
616
+ });
617
+ const dividerSizes = styleVariants({
618
+ small: { margin: "0.5rem 0" },
619
+ medium: { margin: "1rem 0" },
620
+ large: { margin: "1.5rem 0" }
621
+ });
622
+ const divider = styleWithLayer({
623
+ border: "none",
624
+ flexShrink: 0
625
+ });
626
+ const dividerVerticalSizes = styleVariants({
627
+ small: { margin: "0 0.5rem" },
628
+ medium: { margin: "0 1rem" },
629
+ large: { margin: "0 1.5rem" }
630
+ });
631
+
632
+ //#endregion
633
+ //#region src/components/Divider/Divider.tsx
634
+ const Divider = ({ orientation = "horizontal", size = "medium", ...props }) => {
635
+ return /* @__PURE__ */ React.createElement(Box, {
636
+ as: "hr",
637
+ className: clsx(divider, dividerOrientations[orientation], orientation === "vertical" ? dividerVerticalSizes[size] : dividerSizes[size], props.className),
638
+ role: "separator",
639
+ "aria-orientation": orientation,
640
+ ...props
641
+ });
642
+ };
643
+
644
+ //#endregion
645
+ //#region src/components/Spinner/styles.css.ts
646
+ const spin = keyframes({
647
+ "0%": { transform: "rotate(0deg)" },
648
+ "100%": { transform: "rotate(360deg)" }
649
+ });
650
+ const spinnerColors = styleVariants({
651
+ primary: {
652
+ borderColor: vars.colors.borderDefault,
653
+ borderTopColor: vars.colors.buttonBackgroundPrimary
654
+ },
655
+ secondary: {
656
+ borderColor: vars.colors.borderDefault,
657
+ borderTopColor: vars.colors.buttonBackgroundSecondary
658
+ },
659
+ success: {
660
+ borderColor: vars.colors.borderDefault,
661
+ borderTopColor: vars.colors.alertSuccessBorder
662
+ },
663
+ warning: {
664
+ borderColor: vars.colors.borderDefault,
665
+ borderTopColor: vars.colors.alertWarningBorder
666
+ },
667
+ error: {
668
+ borderColor: vars.colors.borderDefault,
669
+ borderTopColor: vars.colors.alertErrorBorder
670
+ },
671
+ info: {
672
+ borderColor: vars.colors.borderDefault,
673
+ borderTopColor: vars.colors.alertInfoBorder
674
+ }
675
+ });
676
+ const spinnerSizes = styleVariants({
677
+ small: {
678
+ width: "1rem",
679
+ height: "1rem",
680
+ borderWidth: "2px"
681
+ },
682
+ medium: {
683
+ width: "1.5rem",
684
+ height: "1.5rem",
685
+ borderWidth: "3px"
686
+ },
687
+ large: {
688
+ width: "2rem",
689
+ height: "2rem",
690
+ borderWidth: "4px"
691
+ }
692
+ });
693
+ const spinner = style({
694
+ borderRadius: "50%",
695
+ borderStyle: "solid",
696
+ animation: `${spin} 1s linear infinite`,
697
+ display: "inline-block"
698
+ });
699
+
700
+ //#endregion
701
+ //#region src/components/Spinner/Spinner.tsx
702
+ const Spinner = ({ color = "primary", size = "medium", role = "status", ...props }) => {
703
+ return /* @__PURE__ */ React.createElement(Box, {
704
+ as: "div",
705
+ className: clsx(spinner, spinnerColors[color], spinnerSizes[size], props.className),
706
+ role,
707
+ "aria-label": "Loading",
708
+ ...props
709
+ });
710
+ };
711
+
712
+ //#endregion
713
+ //#region src/components/Tooltip/styles.css.ts
714
+ const tooltipPositions = styleVariants({
715
+ top: {
716
+ bottom: "100%",
717
+ marginBottom: "0.25rem",
718
+ left: "50%",
719
+ transform: "translateX(-50%)"
720
+ },
721
+ bottom: {
722
+ top: "100%",
723
+ marginTop: "0.25rem",
724
+ left: "50%",
725
+ transform: "translateX(-50%)"
726
+ },
727
+ left: {
728
+ right: "100%",
729
+ marginRight: "0.25rem",
730
+ top: "50%",
731
+ transform: "translateY(-50%)"
732
+ },
733
+ right: {
734
+ left: "100%",
735
+ marginLeft: "0.25rem",
736
+ top: "50%",
737
+ transform: "translateY(-50%)"
738
+ }
739
+ });
740
+ const tooltipContainer = styleWithLayer({
741
+ position: "relative",
742
+ display: "inline-flex"
743
+ });
744
+ const tooltipContent = styleWithLayer({
745
+ position: "absolute",
746
+ backgroundColor: vars.colors.textPrimary,
747
+ color: vars.colors.backgroundDefault,
748
+ padding: "0.375rem 0.75rem",
749
+ borderRadius: "0.375rem",
750
+ fontSize: "0.75rem",
751
+ whiteSpace: "nowrap",
752
+ zIndex: 1001,
753
+ boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)",
754
+ opacity: 0,
755
+ visibility: "hidden",
756
+ transition: "opacity 0.2s ease-in-out, visibility 0.2s ease-in-out",
757
+ pointerEvents: "none",
758
+ selectors: { "&[data-visible=\"true\"]": {
759
+ opacity: 1,
760
+ visibility: "visible"
761
+ } }
762
+ });
763
+ const tooltipArrow = styleWithLayer({
764
+ position: "absolute",
765
+ width: "0",
766
+ height: "0",
767
+ borderStyle: "solid",
768
+ borderWidth: "0.25rem",
769
+ borderColor: "transparent"
770
+ });
771
+ const tooltipArrowTop = styleWithLayer({
772
+ bottom: "-0.25rem",
773
+ left: "50%",
774
+ transform: "translateX(-50%)",
775
+ borderTopColor: vars.colors.textPrimary
776
+ });
777
+ const tooltipArrowBottom = styleWithLayer({
778
+ top: "-0.25rem",
779
+ left: "50%",
780
+ transform: "translateX(-50%)",
781
+ borderBottomColor: vars.colors.textPrimary
782
+ });
783
+ const tooltipArrowLeft = styleWithLayer({
784
+ right: "-0.25rem",
785
+ top: "50%",
786
+ transform: "translateY(-50%)",
787
+ borderLeftColor: vars.colors.textPrimary
788
+ });
789
+ const tooltipArrowRight = styleWithLayer({
790
+ left: "-0.25rem",
791
+ top: "50%",
792
+ transform: "translateY(-50%)",
793
+ borderRightColor: vars.colors.textPrimary
794
+ });
795
+
796
+ //#endregion
797
+ //#region src/components/Tooltip/Tooltip.tsx
798
+ const Tooltip = ({ content, position = "top", showArrow = true, children, ...props }) => {
799
+ const [isVisible, setIsVisible] = useState(false);
800
+ const arrowStyle = {
801
+ top: position === "bottom" ? tooltipArrowBottom : undefined,
802
+ bottom: position === "top" ? tooltipArrowTop : undefined,
803
+ left: position === "right" ? tooltipArrowLeft : undefined,
804
+ right: position === "left" ? tooltipArrowRight : undefined
805
+ };
806
+ return /* @__PURE__ */ React.createElement(Box, {
807
+ as: "div",
808
+ className: clsx(tooltipContainer, props.className),
809
+ onMouseEnter: () => setIsVisible(true),
810
+ onMouseLeave: () => setIsVisible(false),
811
+ onFocus: () => setIsVisible(true),
812
+ onBlur: () => setIsVisible(false),
813
+ ...props
814
+ }, children, /* @__PURE__ */ React.createElement(Box, {
815
+ as: "div",
816
+ className: clsx(tooltipContent, tooltipPositions[position]),
817
+ "data-visible": isVisible,
818
+ role: "tooltip"
819
+ }, showArrow && /* @__PURE__ */ React.createElement(Box, {
820
+ as: "span",
821
+ className: clsx(tooltipArrow, arrowStyle.top, arrowStyle.bottom, arrowStyle.left, arrowStyle.right)
822
+ }), content));
823
+ };
824
+
825
+ //#endregion
826
+ //#region src/components/Toggle/styles.css.ts
827
+ const toggleSizes = styleVariants({
828
+ small: {
829
+ width: "1.5rem",
830
+ height: "0.75rem"
831
+ },
832
+ medium: {
833
+ width: "2rem",
834
+ height: "1rem"
835
+ },
836
+ large: {
837
+ width: "2.5rem",
838
+ height: "1.25rem"
839
+ }
840
+ });
841
+ const toggleLabel = styleWithLayer({
842
+ display: "inline-flex",
843
+ alignItems: "center",
844
+ cursor: "pointer"
845
+ });
846
+ const toggle = styleWithLayer({
847
+ position: "relative",
848
+ display: "inline-flex",
849
+ alignItems: "center",
850
+ selectors: { "&:has(input:disabled)": {
851
+ cursor: "not-allowed",
852
+ opacity: .5
853
+ } }
854
+ });
855
+ const toggleInput = styleWithLayer({
856
+ position: "absolute",
857
+ opacity: 0,
858
+ width: 0,
859
+ height: 0,
860
+ cursor: "pointer"
861
+ });
862
+ const toggleTrack = styleWithLayer({
863
+ borderRadius: "9999px",
864
+ transition: "background-color 0.2s ease-in-out",
865
+ backgroundColor: vars.colors.borderDefault,
866
+ position: "relative",
867
+ display: "inline-flex",
868
+ alignItems: "center",
869
+ cursor: "pointer",
870
+ selectors: { "&:hover": { backgroundColor: vars.colors.borderMuted } }
871
+ });
872
+ const toggleTrackChecked = styleWithLayer({
873
+ backgroundColor: vars.colors.buttonBackgroundPrimary,
874
+ selectors: { "&:hover": { backgroundColor: vars.colors.buttonBackgroundFocusedPrimary } }
875
+ });
876
+ const toggleTrackUnchecked = styleWithLayer({ backgroundColor: vars.colors.borderDefault });
877
+ const toggleThumb = styleWithLayer({
878
+ borderRadius: "50%",
879
+ backgroundColor: vars.colors.backgroundDefault,
880
+ position: "absolute",
881
+ transition: "transform 0.2s ease-in-out, background-color 0.2s ease-in-out",
882
+ top: "50%",
883
+ left: "0",
884
+ transform: "translateY(-50%)"
885
+ });
886
+ const toggleThumbSizes = styleVariants({
887
+ small: {
888
+ width: "0.5rem",
889
+ height: "0.5rem"
890
+ },
891
+ medium: {
892
+ width: "0.75rem",
893
+ height: "0.75rem"
894
+ },
895
+ large: {
896
+ width: "1rem",
897
+ height: "1rem"
898
+ }
899
+ });
900
+ const toggleThumbChecked = styleWithLayer({
901
+ transform: "translateY(-50%) translateX(1.25rem)",
902
+ backgroundColor: vars.colors.backgroundDefault,
903
+ selectors: {
904
+ "[data-size=\"small\"] &": { transform: "translateY(-50%) translateX(1rem)" },
905
+ "[data-size=\"large\"] &": { transform: "translateY(-50%) translateX(1.5rem)" }
906
+ }
907
+ });
908
+ const toggleThumbUnchecked = styleWithLayer({
909
+ transform: "translateY(-50%) translateX(0)",
910
+ backgroundColor: vars.colors.backgroundDefault
911
+ });
912
+ const toggleFocusRing = styleWithLayer({
913
+ position: "absolute",
914
+ inset: "-0.25rem",
915
+ borderRadius: "0.5rem",
916
+ pointerEvents: "none",
917
+ opacity: 0,
918
+ transition: "opacity 0.2s ease-in-out",
919
+ boxShadow: `0 0 0 3px ${vars.colors.buttonBackgroundPrimary}`,
920
+ selectors: { "[data-focused=\"true\"] &": { opacity: 1 } }
921
+ });
922
+
923
+ //#endregion
924
+ //#region src/components/Toggle/Toggle.tsx
925
+ const Toggle = ({ checked = false, onChange, size = "medium", label, disabled = false, id, ...props }) => {
926
+ const [isFocused, setIsFocused] = useState(false);
927
+ const generatedId = useId();
928
+ const toggleId = id || `toggle-${generatedId}`;
929
+ const handleChange = (e) => {
930
+ if (!disabled && onChange) {
931
+ onChange(e.target.checked);
932
+ }
933
+ };
934
+ return /* @__PURE__ */ React.createElement(Box, {
935
+ as: "div",
936
+ className: toggle
937
+ }, /* @__PURE__ */ React.createElement(Box, {
938
+ as: "label",
939
+ htmlFor: toggleId,
940
+ className: toggleLabel
941
+ }, /* @__PURE__ */ React.createElement(Box, {
942
+ as: "input",
943
+ type: "checkbox",
944
+ id: toggleId,
945
+ checked,
946
+ onChange: handleChange,
947
+ disabled,
948
+ className: toggleInput,
949
+ onFocus: () => setIsFocused(true),
950
+ onBlur: () => setIsFocused(false),
951
+ "aria-checked": checked,
952
+ role: "switch",
953
+ ...props
954
+ }), /* @__PURE__ */ React.createElement(Box, {
955
+ as: "span",
956
+ className: clsx(toggleTrack, toggleSizes[size], checked ? toggleTrackChecked : toggleTrackUnchecked),
957
+ "data-size": size
958
+ }, /* @__PURE__ */ React.createElement(Box, {
959
+ as: "span",
960
+ className: clsx(toggleThumb, toggleThumbSizes[size], checked ? toggleThumbChecked : toggleThumbUnchecked)
961
+ })), /* @__PURE__ */ React.createElement(Box, {
962
+ as: "span",
963
+ className: toggleFocusRing,
964
+ "data-focused": isFocused,
965
+ "aria-hidden": "true"
966
+ })), label && /* @__PURE__ */ React.createElement(Box, {
967
+ as: "span",
968
+ marginLeft: "small"
969
+ }, label));
970
+ };
971
+
972
+ //#endregion
973
+ //#region src/components/Checkbox/styles.css.ts
974
+ const checkboxContainer = styleWithLayer({
975
+ display: "flex",
976
+ alignItems: "center",
977
+ gap: "8px",
978
+ cursor: "pointer",
979
+ userSelect: "none"
980
+ });
981
+ const checkboxInput = style({
982
+ width: "18px",
983
+ height: "18px",
984
+ border: `2px solid ${vars.colors.borderDefault}`,
985
+ borderRadius: "4px",
986
+ cursor: "pointer",
987
+ accentColor: vars.colors.buttonBackgroundPrimary,
988
+ ":focus-visible": {
989
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
990
+ outlineOffset: "2px"
991
+ },
992
+ ":disabled": {
993
+ cursor: "not-allowed",
994
+ opacity: .5
995
+ }
996
+ });
997
+ const checkboxLabel = styleWithLayer({
998
+ fontFamily: vars.fontFamily.body,
999
+ fontSize: "14px",
1000
+ color: vars.colors.textPrimary
1001
+ });
1002
+
1003
+ //#endregion
1004
+ //#region src/components/Checkbox/Checkbox.tsx
1005
+ const Checkbox = forwardRef(({ label, className, indeterminate, ...props }, ref) => {
1006
+ const inputRef = useRef(null);
1007
+ const combinedRef = (node) => {
1008
+ if (typeof ref === "function") {
1009
+ ref(node);
1010
+ } else if (ref) {
1011
+ ref.current = node;
1012
+ }
1013
+ inputRef.current = node;
1014
+ };
1015
+ useEffect(() => {
1016
+ if (inputRef.current) {
1017
+ inputRef.current.indeterminate = !!indeterminate;
1018
+ }
1019
+ }, [indeterminate]);
1020
+ return /* @__PURE__ */ React.createElement(Box, {
1021
+ as: "label",
1022
+ className: clsx(checkboxContainer, className),
1023
+ display: "flex",
1024
+ alignItems: "center",
1025
+ gap: "small",
1026
+ cursor: "pointer",
1027
+ style: { userSelect: "none" }
1028
+ }, /* @__PURE__ */ React.createElement(Box, {
1029
+ as: "input",
1030
+ type: "checkbox",
1031
+ ref: combinedRef,
1032
+ className: checkboxInput,
1033
+ style: {
1034
+ width: "18px",
1035
+ height: "18px"
1036
+ },
1037
+ ...props
1038
+ }), label && /* @__PURE__ */ React.createElement(Box, {
1039
+ as: "span",
1040
+ className: checkboxLabel
1041
+ }, label));
1042
+ });
1043
+ Checkbox.displayName = "Checkbox";
1044
+
1045
+ //#endregion
1046
+ //#region src/components/Radio/styles.css.ts
1047
+ const radioContainer = styleWithLayer({
1048
+ display: "flex",
1049
+ alignItems: "center",
1050
+ gap: "8px",
1051
+ cursor: "pointer",
1052
+ userSelect: "none"
1053
+ });
1054
+ const radioInput = style({
1055
+ width: "18px",
1056
+ height: "18px",
1057
+ border: `2px solid ${vars.colors.borderDefault}`,
1058
+ borderRadius: "50%",
1059
+ cursor: "pointer",
1060
+ accentColor: vars.colors.buttonBackgroundPrimary,
1061
+ ":focus-visible": {
1062
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1063
+ outlineOffset: "2px"
1064
+ },
1065
+ ":disabled": {
1066
+ cursor: "not-allowed",
1067
+ opacity: .5
1068
+ }
1069
+ });
1070
+ const radioLabel = styleWithLayer({
1071
+ fontFamily: vars.fontFamily.body,
1072
+ fontSize: "14px",
1073
+ color: vars.colors.textPrimary
1074
+ });
1075
+ const radioGroup = styleWithLayer({
1076
+ display: "flex",
1077
+ flexDirection: "column",
1078
+ gap: "8px"
1079
+ });
1080
+ const radioGroupHorizontal = styleWithLayer({
1081
+ display: "flex",
1082
+ flexDirection: "row",
1083
+ gap: "16px",
1084
+ flexWrap: "wrap"
1085
+ });
1086
+
1087
+ //#endregion
1088
+ //#region src/components/Radio/Radio.tsx
1089
+ const RadioContext = createContext({});
1090
+ const Radio = forwardRef(({ label, className, value, ...props }, ref) => {
1091
+ const context = useContext(RadioContext);
1092
+ const name = context.name || props.name;
1093
+ const isChecked = context.value === value;
1094
+ const handleChange = () => {
1095
+ if (context.onChange) {
1096
+ context.onChange(value);
1097
+ }
1098
+ };
1099
+ return /* @__PURE__ */ React.createElement(Box, {
1100
+ as: "label",
1101
+ className: clsx(radioContainer, className),
1102
+ display: "flex",
1103
+ alignItems: "center",
1104
+ gap: "small",
1105
+ cursor: "pointer",
1106
+ style: { userSelect: "none" }
1107
+ }, /* @__PURE__ */ React.createElement(Box, {
1108
+ as: "input",
1109
+ type: "radio",
1110
+ ref,
1111
+ name,
1112
+ value,
1113
+ checked: isChecked,
1114
+ onChange: handleChange,
1115
+ className: radioInput,
1116
+ ...props
1117
+ }), label && /* @__PURE__ */ React.createElement(Box, {
1118
+ as: "span",
1119
+ className: radioLabel
1120
+ }, label));
1121
+ });
1122
+ Radio.displayName = "Radio";
1123
+ const RadioGroup = ({ children, name, value, onChange, layout = "vertical", className }) => {
1124
+ return /* @__PURE__ */ React.createElement(RadioContext.Provider, { value: {
1125
+ name,
1126
+ value,
1127
+ onChange
1128
+ } }, /* @__PURE__ */ React.createElement(Box, { className: clsx(layout === "horizontal" ? radioGroupHorizontal : radioGroup, className) }, children));
1129
+ };
1130
+ const RadioComponent = Object.assign(Radio, { Group: RadioGroup });
1131
+
1132
+ //#endregion
1133
+ //#region src/components/Select/styles.css.ts
1134
+ const selectContainer = styleWithLayer({ width: "100%" });
1135
+ const select = styleVariants({
1136
+ default: {
1137
+ width: "100%",
1138
+ padding: "0.75rem 1rem",
1139
+ fontSize: "14px",
1140
+ fontFamily: vars.fontFamily.body,
1141
+ color: vars.colors.textPrimary,
1142
+ backgroundColor: vars.colors.inputBackground,
1143
+ border: `1px solid ${vars.colors.inputBorder}`,
1144
+ borderRadius: "8px",
1145
+ cursor: "pointer",
1146
+ outline: "none",
1147
+ appearance: "none",
1148
+ 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")`,
1149
+ backgroundRepeat: "no-repeat",
1150
+ backgroundPosition: "right 12px center",
1151
+ transition: "border-color 0.2s ease",
1152
+ "::placeholder": { color: vars.colors.inputPlaceholder },
1153
+ ":focus-visible": {
1154
+ outline: `2px solid ${vars.colors.inputBorderFocused}`,
1155
+ outlineOffset: "2px"
1156
+ },
1157
+ ":hover:not(:disabled)": { borderColor: vars.colors.inputBorderFocused },
1158
+ ":disabled": {
1159
+ cursor: "not-allowed",
1160
+ opacity: .5,
1161
+ backgroundColor: vars.colors.backgroundMuted
1162
+ }
1163
+ },
1164
+ error: {
1165
+ width: "100%",
1166
+ padding: "0.75rem 1rem",
1167
+ fontSize: "14px",
1168
+ fontFamily: vars.fontFamily.body,
1169
+ color: vars.colors.textPrimary,
1170
+ backgroundColor: vars.colors.inputBackground,
1171
+ border: `1px solid ${vars.colors.alertErrorBorder}`,
1172
+ borderRadius: "8px",
1173
+ cursor: "pointer",
1174
+ outline: "none",
1175
+ appearance: "none",
1176
+ 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")`,
1177
+ backgroundRepeat: "no-repeat",
1178
+ backgroundPosition: "right 12px center",
1179
+ transition: "border-color 0.2s ease",
1180
+ "::placeholder": { color: vars.colors.inputPlaceholder },
1181
+ ":focus-visible": {
1182
+ outline: `2px solid ${vars.colors.alertErrorBorder}`,
1183
+ outlineOffset: "2px"
1184
+ },
1185
+ ":hover:not(:disabled)": { borderColor: vars.colors.alertErrorBorder },
1186
+ ":disabled": {
1187
+ cursor: "not-allowed",
1188
+ opacity: .5,
1189
+ backgroundColor: vars.colors.backgroundMuted
1190
+ }
1191
+ }
1192
+ });
1193
+ const selectLabel = styleWithLayer({
1194
+ display: "block",
1195
+ fontSize: "14px",
1196
+ fontWeight: "500",
1197
+ color: vars.colors.textPrimary,
1198
+ marginBottom: "8px"
1199
+ });
1200
+ const selectWrapper = styleWithLayer({ width: "100%" });
1201
+
1202
+ //#endregion
1203
+ //#region src/components/Select/Select.tsx
1204
+ const Select = forwardRef(({ label, options, error = false, fullWidth = true, className, ...props }, ref) => {
1205
+ return /* @__PURE__ */ React.createElement(Box, {
1206
+ className: selectWrapper,
1207
+ width: "100%"
1208
+ }, label && /* @__PURE__ */ React.createElement(Box, {
1209
+ as: "label",
1210
+ className: selectLabel,
1211
+ display: "block",
1212
+ fontSize: "14px",
1213
+ fontWeight: "500",
1214
+ color: "c5-700",
1215
+ marginBottom: "small"
1216
+ }, label), /* @__PURE__ */ React.createElement(Box, {
1217
+ as: "select",
1218
+ ref,
1219
+ className: clsx(select[error ? "error" : "default"], className),
1220
+ width: fullWidth ? "100%" : undefined,
1221
+ ...props
1222
+ }, options.map((option) => /* @__PURE__ */ React.createElement("option", {
1223
+ key: option.value,
1224
+ value: option.value,
1225
+ disabled: option.disabled
1226
+ }, option.label))));
1227
+ });
1228
+ Select.displayName = "Select";
1229
+
1230
+ //#endregion
1231
+ //#region src/components/Tabs/styles.css.ts
1232
+ const tabsContainer = styleWithLayer({ width: "100%" });
1233
+ const tabsList = styleWithLayer({
1234
+ display: "flex",
1235
+ gap: "4px",
1236
+ borderBottom: `2px solid ${vars.colors.borderDefault}`,
1237
+ fontFamily: vars.fontFamily.body
1238
+ });
1239
+ const tabsListHorizontal = styleWithLayer({
1240
+ flexDirection: "row",
1241
+ overflowX: "auto"
1242
+ });
1243
+ const tabsListVertical = styleWithLayer({
1244
+ flexDirection: "column",
1245
+ borderBottom: "none",
1246
+ borderRight: `2px solid ${vars.colors.borderDefault}`
1247
+ });
1248
+ const tabItem = styleVariants({
1249
+ base: {
1250
+ padding: "0.75rem 1.5rem",
1251
+ fontSize: "14px",
1252
+ fontWeight: "500",
1253
+ color: vars.colors.textSecondary,
1254
+ cursor: "pointer",
1255
+ border: "none",
1256
+ backgroundColor: "transparent",
1257
+ whiteSpace: "nowrap",
1258
+ transition: "all 0.2s ease",
1259
+ ":focus-visible": {
1260
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1261
+ outlineOffset: "2px"
1262
+ },
1263
+ ":hover:not(:disabled)": {
1264
+ color: vars.colors.textPrimary,
1265
+ backgroundColor: vars.colors.backgroundMuted
1266
+ },
1267
+ ":disabled": {
1268
+ cursor: "not-allowed",
1269
+ opacity: .5
1270
+ }
1271
+ },
1272
+ active: {
1273
+ padding: "0.75rem 1.5rem",
1274
+ fontSize: "14px",
1275
+ fontWeight: "500",
1276
+ color: vars.colors.buttonBackgroundPrimary,
1277
+ cursor: "pointer",
1278
+ border: "none",
1279
+ backgroundColor: "transparent",
1280
+ whiteSpace: "nowrap",
1281
+ transition: "all 0.2s ease",
1282
+ borderBottom: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1283
+ marginBottom: "-2px",
1284
+ ":focus-visible": {
1285
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1286
+ outlineOffset: "2px"
1287
+ },
1288
+ ":hover:not(:disabled)": { backgroundColor: vars.colors.backgroundMuted },
1289
+ ":disabled": {
1290
+ cursor: "not-allowed",
1291
+ opacity: .5
1292
+ }
1293
+ },
1294
+ verticalActive: {
1295
+ padding: "0.75rem 1.5rem",
1296
+ fontSize: "14px",
1297
+ fontWeight: "500",
1298
+ color: vars.colors.buttonBackgroundPrimary,
1299
+ cursor: "pointer",
1300
+ border: "none",
1301
+ backgroundColor: "transparent",
1302
+ whiteSpace: "nowrap",
1303
+ transition: "all 0.2s ease",
1304
+ borderRight: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1305
+ marginRight: "-2px",
1306
+ ":focus-visible": {
1307
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1308
+ outlineOffset: "2px"
1309
+ },
1310
+ ":hover:not(:disabled)": { backgroundColor: vars.colors.backgroundMuted },
1311
+ ":disabled": {
1312
+ cursor: "not-allowed",
1313
+ opacity: .5
1314
+ }
1315
+ }
1316
+ });
1317
+ const tabContent = styleWithLayer({
1318
+ padding: "1.5rem 0",
1319
+ fontFamily: vars.fontFamily.body,
1320
+ fontSize: "14px",
1321
+ color: vars.colors.textPrimary
1322
+ });
1323
+
1324
+ //#endregion
1325
+ //#region src/components/Tabs/Tabs.tsx
1326
+ const TabsContext = createContext({
1327
+ activeTab: "",
1328
+ setActiveTab: () => {}
1329
+ });
1330
+ const Tabs = ({ children, defaultValue = "", orientation = "horizontal", onChange, className, ...props }) => {
1331
+ const [activeTab, setActiveTab] = useState(defaultValue);
1332
+ const handleTabChange = (value) => {
1333
+ setActiveTab(value);
1334
+ if (onChange) {
1335
+ onChange(value);
1336
+ }
1337
+ };
1338
+ return /* @__PURE__ */ React.createElement(TabsContext.Provider, { value: {
1339
+ activeTab,
1340
+ setActiveTab: handleTabChange,
1341
+ orientation
1342
+ } }, /* @__PURE__ */ React.createElement(Box, {
1343
+ className: clsx(tabsContainer, className),
1344
+ width: "100%",
1345
+ ...props
1346
+ }, children));
1347
+ };
1348
+ const TabList = ({ children, className }) => {
1349
+ const { orientation } = useContext(TabsContext);
1350
+ return /* @__PURE__ */ React.createElement(Box, {
1351
+ as: "div",
1352
+ role: "tablist",
1353
+ className: clsx(tabsList, orientation === "vertical" ? tabsListVertical : tabsListHorizontal, className)
1354
+ }, children);
1355
+ };
1356
+ const Tab = ({ value, children, disabled = false, className }) => {
1357
+ const { activeTab, setActiveTab, orientation } = useContext(TabsContext);
1358
+ const isActive = activeTab === value;
1359
+ const handleClick = () => {
1360
+ if (!disabled) {
1361
+ setActiveTab(value);
1362
+ }
1363
+ };
1364
+ return /* @__PURE__ */ React.createElement(Box, {
1365
+ as: "button",
1366
+ role: "tab",
1367
+ "aria-selected": isActive,
1368
+ disabled,
1369
+ onClick: handleClick,
1370
+ className: clsx(tabItem[orientation === "vertical" ? isActive ? "verticalActive" : "base" : isActive ? "active" : "base"], className)
1371
+ }, children);
1372
+ };
1373
+ const TabPanel = ({ value, children, className }) => {
1374
+ const { activeTab } = useContext(TabsContext);
1375
+ const isActive = activeTab === value;
1376
+ if (!isActive) return null;
1377
+ return /* @__PURE__ */ React.createElement(Box, {
1378
+ as: "div",
1379
+ role: "tabpanel",
1380
+ className: clsx(tabContent, className)
1381
+ }, children);
1382
+ };
1383
+ const TabsComponent = Object.assign(Tabs, {
1384
+ List: TabList,
1385
+ Tab,
1386
+ Panel: TabPanel
1387
+ });
1388
+
1389
+ //#endregion
1390
+ //#region src/components/Avatar/styles.css.ts
1391
+ const avatar = styleVariants({
1392
+ base: {
1393
+ display: "inline-flex",
1394
+ alignItems: "center",
1395
+ justifyContent: "center",
1396
+ backgroundColor: vars.colors.backgroundMuted,
1397
+ color: vars.colors.textPrimary,
1398
+ fontFamily: vars.fontFamily.body,
1399
+ fontWeight: "500",
1400
+ overflow: "hidden",
1401
+ userSelect: "none",
1402
+ textDecoration: "none",
1403
+ ":focus-visible": {
1404
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1405
+ outlineOffset: "2px"
1406
+ }
1407
+ },
1408
+ small: {
1409
+ display: "inline-flex",
1410
+ alignItems: "center",
1411
+ justifyContent: "center",
1412
+ backgroundColor: vars.colors.backgroundMuted,
1413
+ color: vars.colors.textPrimary,
1414
+ fontFamily: vars.fontFamily.body,
1415
+ fontWeight: "500",
1416
+ overflow: "hidden",
1417
+ userSelect: "none",
1418
+ textDecoration: "none",
1419
+ width: "24px",
1420
+ height: "24px",
1421
+ fontSize: "12px",
1422
+ borderRadius: "12px",
1423
+ ":focus-visible": {
1424
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1425
+ outlineOffset: "2px"
1426
+ }
1427
+ },
1428
+ medium: {
1429
+ display: "inline-flex",
1430
+ alignItems: "center",
1431
+ justifyContent: "center",
1432
+ backgroundColor: vars.colors.backgroundMuted,
1433
+ color: vars.colors.textPrimary,
1434
+ fontFamily: vars.fontFamily.body,
1435
+ fontWeight: "500",
1436
+ overflow: "hidden",
1437
+ userSelect: "none",
1438
+ textDecoration: "none",
1439
+ width: "32px",
1440
+ height: "32px",
1441
+ fontSize: "14px",
1442
+ borderRadius: "16px",
1443
+ ":focus-visible": {
1444
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1445
+ outlineOffset: "2px"
1446
+ }
1447
+ },
1448
+ large: {
1449
+ display: "inline-flex",
1450
+ alignItems: "center",
1451
+ justifyContent: "center",
1452
+ backgroundColor: vars.colors.backgroundMuted,
1453
+ color: vars.colors.textPrimary,
1454
+ fontFamily: vars.fontFamily.body,
1455
+ fontWeight: "500",
1456
+ overflow: "hidden",
1457
+ userSelect: "none",
1458
+ textDecoration: "none",
1459
+ width: "40px",
1460
+ height: "40px",
1461
+ fontSize: "16px",
1462
+ borderRadius: "20px",
1463
+ ":focus-visible": {
1464
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1465
+ outlineOffset: "2px"
1466
+ }
1467
+ },
1468
+ xlarge: {
1469
+ display: "inline-flex",
1470
+ alignItems: "center",
1471
+ justifyContent: "center",
1472
+ backgroundColor: vars.colors.backgroundMuted,
1473
+ color: vars.colors.textPrimary,
1474
+ fontFamily: vars.fontFamily.body,
1475
+ fontWeight: "500",
1476
+ overflow: "hidden",
1477
+ userSelect: "none",
1478
+ textDecoration: "none",
1479
+ width: "64px",
1480
+ height: "64px",
1481
+ fontSize: "24px",
1482
+ borderRadius: "32px",
1483
+ ":focus-visible": {
1484
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1485
+ outlineOffset: "2px"
1486
+ }
1487
+ }
1488
+ });
1489
+ const avatarImage = style({
1490
+ width: "100%",
1491
+ height: "100%",
1492
+ objectFit: "cover"
1493
+ });
1494
+ const avatarWithImage = styleVariants({
1495
+ small: {
1496
+ width: "24px",
1497
+ height: "24px",
1498
+ borderRadius: "12px",
1499
+ overflow: "hidden",
1500
+ ":focus-visible": {
1501
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1502
+ outlineOffset: "2px"
1503
+ }
1504
+ },
1505
+ medium: {
1506
+ width: "32px",
1507
+ height: "32px",
1508
+ borderRadius: "16px",
1509
+ overflow: "hidden",
1510
+ ":focus-visible": {
1511
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1512
+ outlineOffset: "2px"
1513
+ }
1514
+ },
1515
+ large: {
1516
+ width: "40px",
1517
+ height: "40px",
1518
+ borderRadius: "20px",
1519
+ overflow: "hidden",
1520
+ ":focus-visible": {
1521
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1522
+ outlineOffset: "2px"
1523
+ }
1524
+ },
1525
+ xlarge: {
1526
+ width: "64px",
1527
+ height: "64px",
1528
+ borderRadius: "32px",
1529
+ overflow: "hidden",
1530
+ ":focus-visible": {
1531
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1532
+ outlineOffset: "2px"
1533
+ }
1534
+ }
1535
+ });
1536
+ const avatarWrapper = styleWithLayer({ display: "inline-flex" });
1537
+
1538
+ //#endregion
1539
+ //#region src/components/Avatar/Avatar.tsx
1540
+ const Avatar = ({ alt, className, src, size = "medium", children, fallback }) => {
1541
+ const sizeClass = avatar[size];
1542
+ if (src) {
1543
+ return /* @__PURE__ */ React.createElement(Box, {
1544
+ className: clsx(avatarWrapper, className),
1545
+ display: "inline"
1546
+ }, /* @__PURE__ */ React.createElement(Box, {
1547
+ as: "img",
1548
+ src,
1549
+ alt: alt || "Avatar",
1550
+ className: clsx(avatarWithImage[size], avatarImage)
1551
+ }));
1552
+ }
1553
+ const initials = children || fallback;
1554
+ return /* @__PURE__ */ React.createElement(Box, {
1555
+ className: clsx(sizeClass, className),
1556
+ role: "img",
1557
+ "aria-label": alt
1558
+ }, initials);
1559
+ };
1560
+
1561
+ //#endregion
1562
+ //#region src/components/Tag/styles.css.ts
1563
+ const tag = styleVariants({
1564
+ base: {
1565
+ display: "inline-flex",
1566
+ alignItems: "center",
1567
+ padding: "4px 12px",
1568
+ fontSize: "12px",
1569
+ fontWeight: "500",
1570
+ fontFamily: vars.fontFamily.body,
1571
+ borderRadius: "16px",
1572
+ transition: "all 0.2s ease"
1573
+ },
1574
+ default: {
1575
+ display: "inline-flex",
1576
+ alignItems: "center",
1577
+ padding: "4px 12px",
1578
+ fontSize: "12px",
1579
+ fontWeight: "500",
1580
+ fontFamily: vars.fontFamily.body,
1581
+ color: vars.colors.textPrimary,
1582
+ backgroundColor: vars.colors.backgroundMuted,
1583
+ borderRadius: "16px",
1584
+ transition: "all 0.2s ease"
1585
+ },
1586
+ primary: {
1587
+ display: "inline-flex",
1588
+ alignItems: "center",
1589
+ padding: "4px 12px",
1590
+ fontSize: "12px",
1591
+ fontWeight: "500",
1592
+ fontFamily: vars.fontFamily.body,
1593
+ color: vars.colors.buttonTextPrimary,
1594
+ backgroundColor: vars.colors.buttonBackgroundPrimary,
1595
+ borderRadius: "16px",
1596
+ transition: "all 0.2s ease"
1597
+ },
1598
+ success: {
1599
+ display: "inline-flex",
1600
+ alignItems: "center",
1601
+ padding: "4px 12px",
1602
+ fontSize: "12px",
1603
+ fontWeight: "500",
1604
+ fontFamily: vars.fontFamily.body,
1605
+ color: vars.colors.alertSuccessText,
1606
+ backgroundColor: vars.colors.alertSuccessBackground,
1607
+ borderRadius: "16px",
1608
+ transition: "all 0.2s ease"
1609
+ },
1610
+ warning: {
1611
+ display: "inline-flex",
1612
+ alignItems: "center",
1613
+ padding: "4px 12px",
1614
+ fontSize: "12px",
1615
+ fontWeight: "500",
1616
+ fontFamily: vars.fontFamily.body,
1617
+ color: vars.colors.alertWarningText,
1618
+ backgroundColor: vars.colors.alertWarningBackground,
1619
+ borderRadius: "16px",
1620
+ transition: "all 0.2s ease"
1621
+ },
1622
+ error: {
1623
+ display: "inline-flex",
1624
+ alignItems: "center",
1625
+ padding: "4px 12px",
1626
+ fontSize: "12px",
1627
+ fontWeight: "500",
1628
+ fontFamily: vars.fontFamily.body,
1629
+ color: vars.colors.alertErrorText,
1630
+ backgroundColor: vars.colors.alertErrorBackground,
1631
+ borderRadius: "16px",
1632
+ transition: "all 0.2s ease"
1633
+ }
1634
+ });
1635
+ const removeButton = style({
1636
+ cursor: "pointer",
1637
+ marginLeft: "8px",
1638
+ display: "flex",
1639
+ alignItems: "center",
1640
+ justifyContent: "center",
1641
+ color: vars.colors.textSecondary,
1642
+ fontSize: "16px",
1643
+ lineHeight: "1",
1644
+ ":hover": { color: vars.colors.textPrimary }
1645
+ });
1646
+ const tagGroup = styleWithLayer({
1647
+ display: "flex",
1648
+ flexWrap: "wrap",
1649
+ gap: "8px"
1650
+ });
1651
+
1652
+ //#endregion
1653
+ //#region src/components/Tag/Tag.tsx
1654
+ const Tag = ({ children, variant = "default", onRemove, removable = false, className }) => {
1655
+ return /* @__PURE__ */ React.createElement(Box, {
1656
+ as: "span",
1657
+ className: clsx(tag[variant], className),
1658
+ display: "inline",
1659
+ alignItems: "center"
1660
+ }, children, removable && /* @__PURE__ */ React.createElement(Box, {
1661
+ as: "span",
1662
+ onClick: onRemove,
1663
+ className: removeButton,
1664
+ role: "button",
1665
+ tabIndex: 0,
1666
+ "aria-label": "Remove tag",
1667
+ onKeyDown: (e) => {
1668
+ if (e.key === "Enter" || e.key === " ") {
1669
+ onRemove?.();
1670
+ }
1671
+ }
1672
+ }, "×"));
1673
+ };
1674
+ const TagGroup = ({ children, className }) => {
1675
+ return /* @__PURE__ */ React.createElement(Box, {
1676
+ className: clsx(tagGroup, className),
1677
+ display: "flex",
1678
+ gap: "small",
1679
+ style: { flexWrap: "wrap" }
1680
+ }, children);
1681
+ };
1682
+ const TagComponent = Object.assign(Tag, { Group: TagGroup });
1683
+
1684
+ //#endregion
1685
+ //#region src/components/Breadcrumb/styles.css.ts
1686
+ const breadcrumb = styleWithLayer({
1687
+ display: "flex",
1688
+ alignItems: "center",
1689
+ gap: "4px",
1690
+ fontFamily: vars.fontFamily.body,
1691
+ fontSize: "14px"
1692
+ });
1693
+ const breadcrumbList = style({
1694
+ display: "flex",
1695
+ alignItems: "center",
1696
+ listStyle: "none",
1697
+ margin: 0,
1698
+ padding: 0,
1699
+ gap: "4px"
1700
+ });
1701
+ const breadcrumbItem = style({
1702
+ display: "flex",
1703
+ alignItems: "center"
1704
+ });
1705
+ const breadcrumbLink = style({
1706
+ display: "inline-flex",
1707
+ alignItems: "center",
1708
+ color: vars.colors.textSecondary,
1709
+ textDecoration: "none",
1710
+ fontSize: "14px",
1711
+ ":hover": {
1712
+ color: vars.colors.buttonBackgroundPrimary,
1713
+ textDecoration: "underline"
1714
+ },
1715
+ ":focus-visible": {
1716
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1717
+ outlineOffset: "2px",
1718
+ borderRadius: "4px"
1719
+ }
1720
+ });
1721
+ const breadcrumbSeparator = style({
1722
+ color: vars.colors.textDisabled,
1723
+ fontSize: "12px",
1724
+ userSelect: "none"
1725
+ });
1726
+ const breadcrumbCurrent = style({
1727
+ display: "inline-flex",
1728
+ alignItems: "center",
1729
+ color: vars.colors.textPrimary,
1730
+ fontSize: "14px",
1731
+ fontWeight: "500"
1732
+ });
1733
+
1734
+ //#endregion
1735
+ //#region src/components/Breadcrumb/Breadcrumb.tsx
1736
+ const Breadcrumb = ({ items, className, separator = "/" }) => {
1737
+ return /* @__PURE__ */ React.createElement(Box, {
1738
+ as: "nav",
1739
+ "aria-label": "Breadcrumb",
1740
+ className: clsx(breadcrumb, className),
1741
+ display: "flex",
1742
+ alignItems: "center",
1743
+ gap: "small",
1744
+ fontSize: "14px"
1745
+ }, /* @__PURE__ */ React.createElement(Box, {
1746
+ as: "ol",
1747
+ className: breadcrumbList,
1748
+ display: "flex",
1749
+ alignItems: "center",
1750
+ style: { listStyle: "none" },
1751
+ margin: "none",
1752
+ padding: "none",
1753
+ gap: "small"
1754
+ }, items.map((item, index) => /* @__PURE__ */ React.createElement(Box, {
1755
+ as: "li",
1756
+ key: index,
1757
+ className: breadcrumbItem,
1758
+ display: "flex",
1759
+ alignItems: "center"
1760
+ }, item.href && !item.current ? /* @__PURE__ */ React.createElement(Box, {
1761
+ as: "a",
1762
+ href: item.href,
1763
+ className: breadcrumbLink,
1764
+ display: "inline",
1765
+ alignItems: "center",
1766
+ color: "c5-600",
1767
+ fontSize: "14px",
1768
+ textDecoration: "none"
1769
+ }, item.label) : /* @__PURE__ */ React.createElement(Box, {
1770
+ as: "span",
1771
+ className: breadcrumbCurrent,
1772
+ display: "inline",
1773
+ alignItems: "center",
1774
+ color: "c5-700",
1775
+ fontSize: "14px",
1776
+ fontWeight: "500"
1777
+ }, item.label), index < items.length - 1 && /* @__PURE__ */ React.createElement(Box, {
1778
+ as: "span",
1779
+ className: breadcrumbSeparator,
1780
+ color: "c5-500",
1781
+ fontSize: "12px",
1782
+ style: { userSelect: "none" }
1783
+ }, separator)))));
1784
+ };
1785
+
1786
+ //#endregion
1787
+ //#region src/components/Accordion/styles.css.ts
1788
+ const accordion = styleWithLayer({
1789
+ width: "100%",
1790
+ fontFamily: vars.fontFamily.body
1791
+ });
1792
+ const accordionItem = style({
1793
+ width: "100%",
1794
+ marginBottom: "4px",
1795
+ border: `1px solid ${vars.colors.borderDefault}`,
1796
+ borderRadius: "8px",
1797
+ overflow: "hidden"
1798
+ });
1799
+ const accordionHeader = style({
1800
+ width: "100%",
1801
+ display: "flex",
1802
+ alignItems: "center",
1803
+ justifyContent: "space-between",
1804
+ padding: "12px 16px",
1805
+ backgroundColor: vars.colors.backgroundMuted,
1806
+ cursor: "pointer",
1807
+ userSelect: "none",
1808
+ fontSize: "14px",
1809
+ fontWeight: "500",
1810
+ color: vars.colors.textPrimary,
1811
+ transition: "background-color 0.2s ease",
1812
+ ":hover": { backgroundColor: vars.colors.backgroundDefault },
1813
+ ":focus-visible": {
1814
+ outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
1815
+ outlineOffset: "-2px"
1816
+ }
1817
+ });
1818
+ const accordionContent = styleVariants({
1819
+ collapsed: {
1820
+ display: "none",
1821
+ padding: "0 16px",
1822
+ fontSize: "14px",
1823
+ color: vars.colors.textPrimary,
1824
+ backgroundColor: vars.colors.backgroundDefault
1825
+ },
1826
+ expanded: {
1827
+ display: "block",
1828
+ padding: "12px 16px",
1829
+ fontSize: "14px",
1830
+ color: vars.colors.textPrimary,
1831
+ backgroundColor: vars.colors.backgroundDefault,
1832
+ animation: "slideDown 0.2s ease"
1833
+ }
1834
+ });
1835
+ const accordionIcon = style({
1836
+ fontSize: "12px",
1837
+ transition: "transform 0.2s ease",
1838
+ display: "flex",
1839
+ alignItems: "center",
1840
+ justifyContent: "center"
1841
+ });
1842
+ const accordionIconExpanded = style({ transform: "rotate(180deg)" });
1843
+ const accordionGroup = styleWithLayer({ width: "100%" });
1844
+
1845
+ //#endregion
1846
+ //#region src/components/Accordion/Accordion.tsx
1847
+ const AccordionContext = createContext({
1848
+ allowMultiple: false,
1849
+ expandedItems: new Set(),
1850
+ toggleItem: () => {}
1851
+ });
1852
+ const Accordion = ({ children, allowMultiple = false, ...props }) => {
1853
+ const [expandedItems, setExpandedItems] = useState(new Set());
1854
+ const toggleItem = (value) => {
1855
+ setExpandedItems((prev) => {
1856
+ const newSet = new Set(prev);
1857
+ if (newSet.has(value)) {
1858
+ newSet.delete(value);
1859
+ } else {
1860
+ if (allowMultiple) {
1861
+ newSet.add(value);
1862
+ } else {
1863
+ return new Set([value]);
1864
+ }
1865
+ }
1866
+ return newSet;
1867
+ });
1868
+ };
1869
+ return /* @__PURE__ */ React.createElement(AccordionContext.Provider, { value: {
1870
+ allowMultiple,
1871
+ expandedItems,
1872
+ toggleItem
1873
+ } }, /* @__PURE__ */ React.createElement(Box, {
1874
+ className: clsx(accordionGroup, props.className),
1875
+ width: "100%",
1876
+ ...props
1877
+ }, children));
1878
+ };
1879
+ const AccordionItem = ({ value, title, children, ...props }) => {
1880
+ const { expandedItems, toggleItem } = useContext(AccordionContext);
1881
+ const isExpanded = expandedItems.has(value);
1882
+ const toggleExpanded = useCallback(() => {
1883
+ toggleItem(value);
1884
+ }, [value, toggleItem]);
1885
+ return /* @__PURE__ */ React.createElement(Box, {
1886
+ as: "div",
1887
+ className: clsx(accordionItem, props.className),
1888
+ width: "100%",
1889
+ marginBottom: "small",
1890
+ border: "small",
1891
+ borderRadius: "large",
1892
+ overflow: "hidden",
1893
+ ...props
1894
+ }, /* @__PURE__ */ React.createElement(Box, {
1895
+ as: "button",
1896
+ onClick: toggleExpanded,
1897
+ className: accordionHeader,
1898
+ display: "flex",
1899
+ alignItems: "center",
1900
+ justifyContent: "space-between",
1901
+ padding: "small",
1902
+ cursor: "pointer",
1903
+ style: { userSelect: "none" },
1904
+ fontSize: "14px",
1905
+ fontWeight: "500",
1906
+ color: "c5-700",
1907
+ "aria-expanded": isExpanded,
1908
+ "aria-controls": `accordion-content-${value}`
1909
+ }, /* @__PURE__ */ React.createElement(Box, { as: "span" }, title), /* @__PURE__ */ React.createElement(Box, {
1910
+ as: "span",
1911
+ className: clsx(accordionIcon, isExpanded && accordionIconExpanded),
1912
+ fontSize: "12px",
1913
+ display: "flex",
1914
+ alignItems: "center",
1915
+ justifyContent: "center",
1916
+ "aria-hidden": "true"
1917
+ }, "▼")), /* @__PURE__ */ React.createElement(Box, {
1918
+ as: "div",
1919
+ id: `accordion-content-${value}`,
1920
+ className: clsx(accordionContent[isExpanded ? "expanded" : "collapsed"]),
1921
+ padding: "small",
1922
+ fontSize: "14px",
1923
+ color: "c5-700",
1924
+ role: "region"
1925
+ }, children));
1926
+ };
1927
+ const AccordionComponent = Object.assign(Accordion, { Item: AccordionItem });
1928
+
1929
+ //#endregion
1930
+ //#region src/components/Progress/styles.css.ts
1931
+ const progress = styleWithLayer({ width: "100%" });
1932
+ const progressBar = styleVariants({
1933
+ default: {
1934
+ width: "100%",
1935
+ height: "8px",
1936
+ backgroundColor: vars.colors.backgroundMuted,
1937
+ borderRadius: "4px",
1938
+ overflow: "hidden"
1939
+ },
1940
+ success: {
1941
+ width: "100%",
1942
+ height: "8px",
1943
+ backgroundColor: vars.colors.alertSuccessBackground,
1944
+ borderRadius: "4px",
1945
+ overflow: "hidden"
1946
+ },
1947
+ warning: {
1948
+ width: "100%",
1949
+ height: "8px",
1950
+ backgroundColor: vars.colors.alertWarningBackground,
1951
+ borderRadius: "4px",
1952
+ overflow: "hidden"
1953
+ },
1954
+ error: {
1955
+ width: "100%",
1956
+ height: "8px",
1957
+ backgroundColor: vars.colors.alertErrorBackground,
1958
+ borderRadius: "4px",
1959
+ overflow: "hidden"
1960
+ }
1961
+ });
1962
+ const progressFill = styleVariants({
1963
+ default: {
1964
+ height: "100%",
1965
+ borderRadius: "4px",
1966
+ transition: "width 0.3s ease",
1967
+ backgroundColor: vars.colors.buttonBackgroundPrimary
1968
+ },
1969
+ success: {
1970
+ height: "100%",
1971
+ borderRadius: "4px",
1972
+ transition: "width 0.3s ease",
1973
+ backgroundColor: vars.colors.alertSuccessBorder
1974
+ },
1975
+ warning: {
1976
+ height: "100%",
1977
+ borderRadius: "4px",
1978
+ transition: "width 0.3s ease",
1979
+ backgroundColor: vars.colors.alertWarningBorder
1980
+ },
1981
+ error: {
1982
+ height: "100%",
1983
+ borderRadius: "4px",
1984
+ transition: "width 0.3s ease",
1985
+ backgroundColor: vars.colors.alertErrorBorder
1986
+ }
1987
+ });
1988
+ const progressLabel = styleWithLayer({
1989
+ display: "flex",
1990
+ justifyContent: "space-between",
1991
+ fontSize: "12px",
1992
+ fontWeight: "500",
1993
+ color: vars.colors.textSecondary,
1994
+ marginBottom: "4px",
1995
+ fontFamily: vars.fontFamily.body
1996
+ });
1997
+
1998
+ //#endregion
1999
+ //#region src/components/Progress/Progress.tsx
2000
+ const Progress = ({ value, max = 100, label, showPercentage = false, variant = "default", className }) => {
2001
+ const percentage = Math.min(Math.max(value / max * 100, 0), 100);
2002
+ return /* @__PURE__ */ React.createElement(Box, {
2003
+ className: clsx(progress, className),
2004
+ width: "100%"
2005
+ }, (label || showPercentage) && /* @__PURE__ */ React.createElement(Box, {
2006
+ className: progressLabel,
2007
+ display: "flex",
2008
+ justifyContent: "space-between",
2009
+ fontSize: "12px",
2010
+ fontWeight: "500",
2011
+ color: "c5-600",
2012
+ marginBottom: "small",
2013
+ fontFamily: "body"
2014
+ }, label && /* @__PURE__ */ React.createElement(Box, { as: "span" }, label), showPercentage && /* @__PURE__ */ React.createElement(Box, { as: "span" }, percentage, "%")), /* @__PURE__ */ React.createElement(Box, {
2015
+ as: "div",
2016
+ className: progressBar[variant],
2017
+ role: "progressbar",
2018
+ "aria-valuenow": value,
2019
+ "aria-valuemin": 0,
2020
+ "aria-valuemax": max
2021
+ }, /* @__PURE__ */ React.createElement(Box, {
2022
+ as: "div",
2023
+ className: progressFill[variant],
2024
+ style: { width: `${percentage}%` },
2025
+ role: "presentation"
2026
+ })));
2027
+ };
2028
+
2029
+ //#endregion
2030
+ //#region src/components/Icon/styles.css.ts
2031
+ const icon = styleWithLayer({
2032
+ display: "inline-flex",
2033
+ alignItems: "center",
2034
+ justifyContent: "center",
2035
+ fontSize: "16px",
2036
+ lineHeight: "1",
2037
+ userSelect: "none"
2038
+ });
2039
+
2040
+ //#endregion
2041
+ //#region src/components/Icon/Icon.tsx
2042
+ const IconComponent = ({ name, children, className, color }) => {
2043
+ const iconMap = {
2044
+ check: "✓",
2045
+ error: "✗",
2046
+ warning: "⚠",
2047
+ info: "i",
2048
+ success: "✓",
2049
+ close: "×"
2050
+ };
2051
+ const displayContent = children || (name ? iconMap[name] : undefined);
2052
+ if (!displayContent) {
2053
+ return null;
2054
+ }
2055
+ return /* @__PURE__ */ React.createElement(Box, {
2056
+ as: "span",
2057
+ className: clsx(icon, className),
2058
+ style: { color },
2059
+ "aria-hidden": "true"
2060
+ }, displayContent);
2061
+ };
2062
+ IconComponent.displayName = "Icon";
2063
+
2064
+ //#endregion
2065
+ //#region src/components/Toast/styles.css.ts
2066
+ const slideInRight = keyframes({
2067
+ "0%": {
2068
+ transform: "translateX(100%)",
2069
+ opacity: "0"
2070
+ },
2071
+ "100%": {
2072
+ transform: "translateX(0)",
2073
+ opacity: "1"
2074
+ }
2075
+ });
2076
+ const slideInLeft = keyframes({
2077
+ "0%": {
2078
+ transform: "translateX(-100%)",
2079
+ opacity: "0"
2080
+ },
2081
+ "100%": {
2082
+ transform: "translateX(0)",
2083
+ opacity: "1"
2084
+ }
2085
+ });
2086
+ const slideInTop = keyframes({
2087
+ "0%": {
2088
+ transform: "translateY(-100%)",
2089
+ opacity: "0"
2090
+ },
2091
+ "100%": {
2092
+ transform: "translateY(0)",
2093
+ opacity: "1"
2094
+ }
2095
+ });
2096
+ const slideOutRight = keyframes({
2097
+ "0%": {
2098
+ transform: "translateX(0)",
2099
+ opacity: "1"
2100
+ },
2101
+ "100%": {
2102
+ transform: "translateX(100%)",
2103
+ opacity: "0"
2104
+ }
2105
+ });
2106
+ const slideOutLeft = keyframes({
2107
+ "0%": {
2108
+ transform: "translateX(0)",
2109
+ opacity: "1"
2110
+ },
2111
+ "100%": {
2112
+ transform: "translateX(-100%)",
2113
+ opacity: "0"
2114
+ }
2115
+ });
2116
+ const slideInBottom = keyframes({
2117
+ "0%": {
2118
+ transform: "translateY(100%)",
2119
+ opacity: "0"
2120
+ },
2121
+ "100%": {
2122
+ transform: "translateY(0)",
2123
+ opacity: "1"
2124
+ }
2125
+ });
2126
+ const slideOutBottom = keyframes({
2127
+ "0%": {
2128
+ transform: "translateY(0)",
2129
+ opacity: "1"
2130
+ },
2131
+ "100%": {
2132
+ transform: "translateY(100%)",
2133
+ opacity: "0"
2134
+ }
2135
+ });
2136
+ const fadeIn$2 = keyframes({
2137
+ "0%": { opacity: "0" },
2138
+ "100%": { opacity: "1" }
2139
+ });
2140
+ const fadeOut = keyframes({
2141
+ "0%": { opacity: "1" },
2142
+ "100%": { opacity: "0" }
2143
+ });
2144
+ const fadeOutSuccess = keyframes({
2145
+ "0%": { opacity: "1" },
2146
+ "100%": { opacity: "0" }
2147
+ });
2148
+ const fadeOutError = keyframes({
2149
+ "0%": { opacity: "1" },
2150
+ "100%": { opacity: "0" }
2151
+ });
2152
+ const fadeOutWarning = keyframes({
2153
+ "0%": { opacity: "1" },
2154
+ "100%": { opacity: "0" }
2155
+ });
2156
+ const fadeOutInfo = keyframes({
2157
+ "0%": { opacity: "1" },
2158
+ "100%": { opacity: "0" }
2159
+ });
2160
+ const slideOut = keyframes({
2161
+ "0%": {
2162
+ transform: "translateX(0)",
2163
+ opacity: "1"
2164
+ },
2165
+ "100%": {
2166
+ transform: "translateX(100%)",
2167
+ opacity: "0"
2168
+ }
2169
+ });
2170
+ const toastContainer = style({
2171
+ position: "fixed",
2172
+ zIndex: "9999",
2173
+ pointerEvents: "none"
2174
+ });
2175
+ const toastWrapper = styleVariants({
2176
+ topLeft: {
2177
+ position: "fixed",
2178
+ top: "16px",
2179
+ left: "16px",
2180
+ zIndex: "9999"
2181
+ },
2182
+ topCenter: {
2183
+ position: "fixed",
2184
+ top: "16px",
2185
+ left: "50%",
2186
+ transform: "translateX(-50%)",
2187
+ zIndex: "9999"
2188
+ },
2189
+ topRight: {
2190
+ position: "fixed",
2191
+ top: "16px",
2192
+ right: "16px",
2193
+ zIndex: "9999"
2194
+ },
2195
+ bottomLeft: {
2196
+ position: "fixed",
2197
+ bottom: "16px",
2198
+ left: "16px",
2199
+ zIndex: "9999"
2200
+ },
2201
+ bottomCenter: {
2202
+ position: "fixed",
2203
+ bottom: "16px",
2204
+ left: "50%",
2205
+ transform: "translateX(-50%)",
2206
+ zIndex: "9999"
2207
+ },
2208
+ bottomRight: {
2209
+ position: "fixed",
2210
+ bottom: "16px",
2211
+ right: "16px",
2212
+ zIndex: "9999"
2213
+ }
2214
+ });
2215
+ const toastItem = style({
2216
+ width: "300px",
2217
+ pointerEvents: "auto",
2218
+ marginBottom: "8px"
2219
+ });
2220
+ const toastCloseButton = style({
2221
+ background: "none",
2222
+ border: "none",
2223
+ cursor: "pointer",
2224
+ padding: "0",
2225
+ display: "flex",
2226
+ alignItems: "center",
2227
+ justifyContent: "center",
2228
+ color: vars.colors.textSecondary,
2229
+ fontSize: "16px",
2230
+ lineHeight: "1",
2231
+ ":hover": { color: vars.colors.textPrimary }
2232
+ });
2233
+ const toastProgressBarContainer = style({
2234
+ position: "absolute",
2235
+ left: 0,
2236
+ right: 0,
2237
+ bottom: 0,
2238
+ height: "3px",
2239
+ backgroundColor: "rgba(0, 0, 0, 0.1)",
2240
+ borderRadius: "0 0 4px 4px",
2241
+ overflow: "hidden"
2242
+ });
2243
+ const toastProgressBar = style({
2244
+ height: "100%",
2245
+ borderRadius: "0 0 4px 4px",
2246
+ transition: "width 0.1s linear",
2247
+ animation: `progressBar 0.3s ease ${fadeIn$2} forwards`
2248
+ });
2249
+ const toastContent = styleWithLayer({
2250
+ flex: 1,
2251
+ minWidth: 0
2252
+ });
2253
+
2254
+ //#endregion
2255
+ //#region src/components/Toast/Toast.tsx
2256
+ const ToastContext = createContext({
2257
+ addToast: () => "",
2258
+ removeToast: () => {},
2259
+ handleDismissAll: () => {},
2260
+ handleResumeAll: () => {}
2261
+ });
2262
+ const getFadeOutForVariant = (variant) => {
2263
+ const fadeOutMap = {
2264
+ success: fadeOutSuccess,
2265
+ error: fadeOutError,
2266
+ warning: fadeOutWarning,
2267
+ info: fadeOutInfo
2268
+ };
2269
+ return fadeOutMap[variant] || fadeOutInfo;
2270
+ };
2271
+ const positionToClassKey = {
2272
+ "top-left": "topLeft",
2273
+ "top-center": "topCenter",
2274
+ "top-right": "topRight",
2275
+ "bottom-left": "bottomLeft",
2276
+ "bottom-center": "bottomCenter",
2277
+ "bottom-right": "bottomRight"
2278
+ };
2279
+ const ToastProvider = ({ children, position = "top-right", maxVisible = 5, stacking = "stack" }) => {
2280
+ const [toasts, setToasts] = useState([]);
2281
+ const [pauseId, setPauseId] = useState(null);
2282
+ const timeoutsRef = useRef(new Map());
2283
+ const pauseTimeoutRef = useRef(null);
2284
+ const toastsRef = useRef([]);
2285
+ useEffect(() => {
2286
+ toastsRef.current = toasts;
2287
+ }, [toasts]);
2288
+ const removeToastInternal = useCallback((id) => {
2289
+ setToasts((prev) => {
2290
+ const toast = prev.find((t) => t.id === id);
2291
+ if (toast) {
2292
+ toast.options.onClose?.();
2293
+ }
2294
+ return prev.filter((t) => t.id !== id);
2295
+ });
2296
+ const timeout = timeoutsRef.current.get(id);
2297
+ if (timeout) {
2298
+ clearTimeout(timeout);
2299
+ timeoutsRef.current.delete(id);
2300
+ }
2301
+ }, []);
2302
+ const addToast = useCallback((message, variant = "info", options = {}) => {
2303
+ const id = `toast-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
2304
+ const duration = options.duration ?? 5e3;
2305
+ const startTime = Date.now();
2306
+ const newToast = {
2307
+ id,
2308
+ message,
2309
+ variant,
2310
+ options: {
2311
+ ...options,
2312
+ duration,
2313
+ position: options.position ?? position
2314
+ },
2315
+ startTime,
2316
+ paused: false,
2317
+ duration
2318
+ };
2319
+ setToasts((prev) => {
2320
+ if (stacking === "replace") {
2321
+ return [newToast];
2322
+ }
2323
+ const filtered = prev.filter((t) => {
2324
+ const elapsed = Date.now() - t.startTime;
2325
+ return elapsed < (t.options.duration ?? 5e3);
2326
+ });
2327
+ return [...filtered, newToast].slice(-maxVisible);
2328
+ });
2329
+ const timeoutId = setTimeout(() => {
2330
+ removeToastInternal(id);
2331
+ }, duration);
2332
+ timeoutsRef.current.set(id, timeoutId);
2333
+ return id;
2334
+ }, [
2335
+ maxVisible,
2336
+ stacking,
2337
+ position,
2338
+ removeToastInternal
2339
+ ]);
2340
+ const dismissInternal = useCallback((id) => {
2341
+ const toast = toastsRef.current.find((t) => t.id === id);
2342
+ if (!toast) return;
2343
+ setToasts((prev) => prev.map((t) => {
2344
+ if (t.id === id) {
2345
+ return {
2346
+ ...t,
2347
+ paused: true
2348
+ };
2349
+ }
2350
+ return t;
2351
+ }));
2352
+ if (pauseTimeoutRef.current) {
2353
+ clearTimeout(pauseTimeoutRef.current);
2354
+ }
2355
+ setPauseId(id);
2356
+ pauseTimeoutRef.current = setTimeout(() => {
2357
+ setPauseId(null);
2358
+ removeToastInternal(id);
2359
+ }, 500);
2360
+ const timeout = timeoutsRef.current.get(id);
2361
+ if (timeout) {
2362
+ clearTimeout(timeout);
2363
+ timeoutsRef.current.delete(id);
2364
+ }
2365
+ }, [removeToastInternal]);
2366
+ const dismissAllInternal = useCallback(() => {
2367
+ setPauseId("all");
2368
+ toastsRef.current.forEach((toast) => {
2369
+ const timeout = timeoutsRef.current.get(toast.id);
2370
+ if (timeout) {
2371
+ clearTimeout(timeout);
2372
+ timeoutsRef.current.delete(toast.id);
2373
+ }
2374
+ });
2375
+ }, []);
2376
+ const resumeAllInternal = useCallback(() => {
2377
+ setPauseId(null);
2378
+ toastsRef.current.forEach((toast) => {
2379
+ if (toast.paused && toast.duration > 500) {
2380
+ const timeout = setTimeout(() => {
2381
+ removeToastInternal(toast.id);
2382
+ }, toast.duration - (Date.now() - toast.startTime));
2383
+ timeoutsRef.current.set(toast.id, timeout);
2384
+ }
2385
+ });
2386
+ }, [removeToastInternal]);
2387
+ useEffect(() => {
2388
+ return () => {
2389
+ timeoutsRef.current.forEach((timeout) => clearTimeout(timeout));
2390
+ if (pauseTimeoutRef.current) {
2391
+ clearTimeout(pauseTimeoutRef.current);
2392
+ }
2393
+ };
2394
+ }, []);
2395
+ const value = {
2396
+ addToast,
2397
+ removeToast: removeToastInternal,
2398
+ handleDismissAll: dismissAllInternal,
2399
+ handleResumeAll: resumeAllInternal
2400
+ };
2401
+ return /* @__PURE__ */ React.createElement(ToastContext.Provider, { value }, children, /* @__PURE__ */ React.createElement(ToastContainer, {
2402
+ toasts,
2403
+ position,
2404
+ pauseId,
2405
+ onDismiss: dismissInternal,
2406
+ onDismissAll: dismissAllInternal,
2407
+ onResumeAll: resumeAllInternal
2408
+ }));
2409
+ };
2410
+ const ToastContainer = ({ toasts, position, pauseId, onDismiss, onDismissAll, onResumeAll }) => {
2411
+ const [container, setContainer] = useState(null);
2412
+ useEffect(() => {
2413
+ const existingContainer = document.getElementById("toast-container");
2414
+ if (existingContainer) {
2415
+ setContainer(existingContainer);
2416
+ } else {
2417
+ const el = document.createElement("div");
2418
+ el.id = "toast-container";
2419
+ document.body.appendChild(el);
2420
+ setContainer(el);
2421
+ }
2422
+ }, []);
2423
+ if (!container) return null;
2424
+ return createPortal(/* @__PURE__ */ React.createElement("div", {
2425
+ className: clsx(toastContainer, toastWrapper[positionToClassKey[position]]),
2426
+ onMouseEnter: onDismissAll,
2427
+ onMouseLeave: onResumeAll
2428
+ }, toasts.map((toast) => {
2429
+ const elapsed = Date.now() - toast.startTime;
2430
+ const progress = (toast.duration - elapsed) / toast.duration * 100;
2431
+ const fadeOutAnimation = getFadeOutForVariant(toast.variant);
2432
+ return /* @__PURE__ */ React.createElement("div", {
2433
+ key: toast.id,
2434
+ className: toastItem,
2435
+ style: {
2436
+ opacity: toast.paused || pauseId !== null ? .7 : 1,
2437
+ animation: `${slideInRight} 0.2s ease, 0.2s ease ${fadeOutAnimation} forwards`
2438
+ },
2439
+ onMouseEnter: () => onDismiss(toast.id)
2440
+ }, /* @__PURE__ */ React.createElement("div", { className: toastContent }, /* @__PURE__ */ React.createElement(IconComponent, { name: toast.variant === "success" ? "check" : toast.variant === "error" ? "error" : "info" }), /* @__PURE__ */ React.createElement("span", { style: { marginLeft: "8px" } }, toast.message), toast.options.closable !== false && /* @__PURE__ */ React.createElement("button", {
2441
+ type: "button",
2442
+ className: toastCloseButton,
2443
+ onClick: () => onDismiss(toast.id),
2444
+ "aria-label": "Close toast"
2445
+ }, /* @__PURE__ */ React.createElement(IconComponent, { name: "close" })), toast.duration > 0 && /* @__PURE__ */ React.createElement("div", { className: toastProgressBarContainer }, /* @__PURE__ */ React.createElement("div", {
2446
+ className: toastProgressBar,
2447
+ style: { width: `${progress}%` }
2448
+ }))));
2449
+ })), container);
2450
+ };
2451
+ const useToast = () => {
2452
+ const context = useContext(ToastContext);
2453
+ return context;
2454
+ };
2455
+ const Toast = ({ message, variant = "info", options, className }) => {
2456
+ return null;
2457
+ };
2458
+ Toast.displayName = "Toast";
2459
+
2460
+ //#endregion
2461
+ //#region src/components/Table/styles.css.ts
2462
+ const table = styleWithLayer({
2463
+ width: "100%",
2464
+ borderCollapse: "collapse",
2465
+ borderSpacing: 0,
2466
+ fontFamily: vars.fontFamily.body
2467
+ });
2468
+ const thead = styleWithLayer({
2469
+ backgroundColor: vars.colors.backgroundDefault,
2470
+ borderBottom: `2px solid ${vars.colors.borderDefault}`
2471
+ });
2472
+ const tbody = styleWithLayer({ backgroundColor: "transparent" });
2473
+ const tfoot = styleWithLayer({
2474
+ backgroundColor: vars.colors.backgroundMuted,
2475
+ borderTop: `2px solid ${vars.colors.borderDefault}`,
2476
+ fontWeight: "bold"
2477
+ });
2478
+ const tr = styleVariants({
2479
+ default: {
2480
+ borderBottom: `1px solid ${vars.colors.borderMuted}`,
2481
+ ":hover": { backgroundColor: vars.colors.backgroundMuted }
2482
+ },
2483
+ striped: { borderBottom: `1px solid ${vars.colors.borderMuted}` }
2484
+ });
2485
+ const th = styleWithLayer({
2486
+ padding: "12px 16px",
2487
+ textAlign: "left",
2488
+ fontWeight: "600",
2489
+ color: vars.colors.textPrimary,
2490
+ whiteSpace: "nowrap"
2491
+ });
2492
+ const td = styleWithLayer({
2493
+ padding: "12px 16px",
2494
+ color: vars.colors.textPrimary,
2495
+ borderBottom: `1px solid ${vars.colors.borderMuted}`
2496
+ });
2497
+ const tableContainer = styleWithLayer({
2498
+ overflowX: "auto",
2499
+ border: `1px solid ${vars.colors.borderDefault}`,
2500
+ borderRadius: "8px"
2501
+ });
2502
+
2503
+ //#endregion
2504
+ //#region src/components/Table/Table.tsx
2505
+ const TableContext = createContext({});
2506
+ const TableComponent = ({ children, striped = false, className, ...props }) => {
2507
+ return /* @__PURE__ */ React.createElement(TableContext.Provider, { value: { striped } }, /* @__PURE__ */ React.createElement(Box, {
2508
+ className: clsx(tableContainer, className),
2509
+ width: "100%"
2510
+ }, /* @__PURE__ */ React.createElement(Box, {
2511
+ as: "table",
2512
+ className: clsx(table),
2513
+ ...props
2514
+ }, children)));
2515
+ };
2516
+ const Thead = ({ children, className }) => {
2517
+ return /* @__PURE__ */ React.createElement(Box, {
2518
+ as: "thead",
2519
+ className: clsx(thead, className)
2520
+ }, children);
2521
+ };
2522
+ const Tbody = ({ children, className }) => {
2523
+ return /* @__PURE__ */ React.createElement(Box, {
2524
+ as: "tbody",
2525
+ className: clsx(tbody, className)
2526
+ }, children);
2527
+ };
2528
+ const Tfoot = ({ children, className }) => {
2529
+ return /* @__PURE__ */ React.createElement(Box, {
2530
+ as: "tfoot",
2531
+ className: clsx(tfoot, className)
2532
+ }, children);
2533
+ };
2534
+ const Tr = ({ children, className }) => {
2535
+ const { striped } = useContext(TableContext);
2536
+ return /* @__PURE__ */ React.createElement(Box, {
2537
+ as: "tr",
2538
+ className: clsx(tr[striped ? "striped" : "default"], className)
2539
+ }, children);
2540
+ };
2541
+ const Th = ({ children, className }) => {
2542
+ return /* @__PURE__ */ React.createElement(Box, {
2543
+ as: "th",
2544
+ className: clsx(th, className)
2545
+ }, children);
2546
+ };
2547
+ const Td = ({ children, className, colSpan, rowSpan }) => {
2548
+ return /* @__PURE__ */ React.createElement(Box, {
2549
+ as: "td",
2550
+ className: clsx(td, className),
2551
+ colSpan,
2552
+ rowSpan
2553
+ }, children);
2554
+ };
2555
+ const Table = Object.assign(TableComponent, {
2556
+ Thead,
2557
+ Tbody,
2558
+ Tfoot,
2559
+ Tr,
2560
+ Th,
2561
+ Td
2562
+ });
2563
+
2564
+ //#endregion
2565
+ //#region src/components/TextArea/styles.css.ts
2566
+ const textAreaStyle = styleWithLayer({
2567
+ padding: "0.5rem 1rem",
2568
+ borderRadius: "0.5rem",
2569
+ minHeight: "100px",
2570
+ resize: "vertical"
2571
+ });
2572
+ const label = styleWithLayer({ paddingRight: "0.5rem" });
2573
+
2574
+ //#endregion
2575
+ //#region src/components/TextArea/TextArea.tsx
2576
+ const TextArea = (props) => {
2577
+ return /* @__PURE__ */ React.createElement(Box, {
2578
+ display: "flex",
2579
+ flexDirection: {
2580
+ mobile: "column",
2581
+ tablet: "row"
2582
+ },
2583
+ gap: "small"
2584
+ }, props.label && /* @__PURE__ */ React.createElement(Box, {
2585
+ as: "label",
2586
+ className: clsx(text, label),
2587
+ marginX: {
2588
+ mobile: "auto",
2589
+ tablet: "none"
2590
+ },
2591
+ marginY: {
2592
+ mobile: "none",
2593
+ tablet: "auto"
2594
+ },
2595
+ htmlFor: props.id
2596
+ }, props.label), /* @__PURE__ */ React.createElement(Box, {
2597
+ as: "textarea",
2598
+ className: clsx(textAreaStyle, props.className),
2599
+ width: props.fullWidth ? "100%" : undefined,
2600
+ ...props
2601
+ }));
2602
+ };
2603
+
2604
+ //#endregion
2605
+ //#region src/components/Pagination/styles.css.ts
2606
+ const paginationContainer = styleWithLayer({
2607
+ display: "flex",
2608
+ alignItems: "center",
2609
+ gap: "0.5rem"
2610
+ });
2611
+ const pageButton = styleWithLayer({
2612
+ padding: "0.5rem 0.75rem",
2613
+ borderRadius: "0.5rem",
2614
+ border: `1px solid ${vars.colors.borderDefault}`,
2615
+ backgroundColor: "transparent",
2616
+ cursor: "pointer",
2617
+ minWidth: "2.5rem",
2618
+ display: "flex",
2619
+ alignItems: "center",
2620
+ justifyContent: "center",
2621
+ ":disabled": {
2622
+ cursor: "not-allowed",
2623
+ opacity: .5
2624
+ }
2625
+ });
2626
+ const pageButtonVariants = styleVariants({
2627
+ default: {
2628
+ color: vars.colors.textPrimary,
2629
+ ":hover": { backgroundColor: vars.colors.buttonBackgroundSecondary }
2630
+ },
2631
+ active: {
2632
+ backgroundColor: vars.colors.buttonBackgroundPrimary,
2633
+ color: vars.colors.buttonTextPrimary,
2634
+ borderColor: vars.colors.buttonBackgroundPrimary,
2635
+ ":hover": { backgroundColor: vars.colors.buttonBackgroundFocusedPrimary }
2636
+ }
2637
+ });
2638
+ const ellipsis = styleWithLayer({
2639
+ padding: "0.5rem",
2640
+ color: vars.colors.textPrimary,
2641
+ userSelect: "none"
2642
+ });
2643
+
2644
+ //#endregion
2645
+ //#region src/components/Pagination/Pagination.tsx
2646
+ const Pagination = ({ currentPage, totalPages, onPageChange, siblingCount = 1, showFirstLast = true, showPrevNext = true, ...props }) => {
2647
+ const generatePageNumbers = () => {
2648
+ const pages = [];
2649
+ const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
2650
+ const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages);
2651
+ const shouldShowLeftEllipsis = leftSiblingIndex > 2;
2652
+ const shouldShowRightEllipsis = rightSiblingIndex < totalPages - 1;
2653
+ if (totalPages <= 7) {
2654
+ for (let i = 1; i <= totalPages; i++) {
2655
+ pages.push(i);
2656
+ }
2657
+ } else {
2658
+ pages.push(1);
2659
+ if (shouldShowLeftEllipsis) {
2660
+ pages.push("left-ellipsis");
2661
+ } else if (currentPage > 3) {
2662
+ for (let i = 2; i < leftSiblingIndex; i++) {
2663
+ pages.push(i);
2664
+ }
2665
+ }
2666
+ for (let i = leftSiblingIndex; i <= rightSiblingIndex; i++) {
2667
+ if (i !== 1 && i !== totalPages) {
2668
+ pages.push(i);
2669
+ }
2670
+ }
2671
+ if (shouldShowRightEllipsis) {
2672
+ pages.push("right-ellipsis");
2673
+ } else if (currentPage < totalPages - 2) {
2674
+ for (let i = rightSiblingIndex + 1; i < totalPages; i++) {
2675
+ pages.push(i);
2676
+ }
2677
+ }
2678
+ pages.push(totalPages);
2679
+ }
2680
+ return pages;
2681
+ };
2682
+ const pages = generatePageNumbers();
2683
+ const { className, ...restProps } = props;
2684
+ return /* @__PURE__ */ React.createElement(Box, {
2685
+ className: clsx(paginationContainer, className),
2686
+ ...restProps
2687
+ }, showFirstLast && /* @__PURE__ */ React.createElement(Box, {
2688
+ as: "button",
2689
+ className: clsx(pageButton, pageButtonVariants.default),
2690
+ onClick: () => onPageChange(1),
2691
+ disabled: currentPage === 1
2692
+ }, "<<"), showPrevNext && /* @__PURE__ */ React.createElement(Box, {
2693
+ as: "button",
2694
+ className: clsx(pageButton, pageButtonVariants.default),
2695
+ onClick: () => onPageChange(currentPage - 1),
2696
+ disabled: currentPage === 1
2697
+ }, "<"), pages.map((page, index) => typeof page === "number" ? /* @__PURE__ */ React.createElement(Box, {
2698
+ key: `page-${page}`,
2699
+ as: "button",
2700
+ className: clsx(pageButton, page === currentPage ? pageButtonVariants.active : pageButtonVariants.default),
2701
+ onClick: () => onPageChange(page)
2702
+ }, page) : /* @__PURE__ */ React.createElement(Box, {
2703
+ key: `${page}-${index}`,
2704
+ className: ellipsis
2705
+ }, "...")), showPrevNext && /* @__PURE__ */ React.createElement(Box, {
2706
+ as: "button",
2707
+ className: clsx(pageButton, pageButtonVariants.default),
2708
+ onClick: () => onPageChange(currentPage + 1),
2709
+ disabled: currentPage === totalPages
2710
+ }, ">"), showFirstLast && /* @__PURE__ */ React.createElement(Box, {
2711
+ as: "button",
2712
+ className: clsx(pageButton, pageButtonVariants.default),
2713
+ onClick: () => onPageChange(totalPages),
2714
+ disabled: currentPage === totalPages
2715
+ }, ">>"));
2716
+ };
2717
+
2718
+ //#endregion
2719
+ //#region src/components/Skeleton/styles.css.ts
2720
+ const shimmer = keyframes({
2721
+ "0%": { backgroundPosition: "-200% 0" },
2722
+ "100%": { backgroundPosition: "200% 0" }
2723
+ });
2724
+ const pulse = keyframes({
2725
+ "0%, 100%": { opacity: 1 },
2726
+ "50%": { opacity: .5 }
2727
+ });
2728
+ const skeletonVariants = styleVariants({
2729
+ text: { borderRadius: "0.25rem" },
2730
+ circle: { borderRadius: "50%" },
2731
+ rectangle: { borderRadius: "0.5rem" }
2732
+ });
2733
+ const skeletonSizes = styleVariants({
2734
+ small: { height: "1rem" },
2735
+ medium: { height: "1.5rem" },
2736
+ large: { height: "2rem" }
2737
+ });
2738
+ const skeletonAnimation = styleVariants({
2739
+ shimmer: {
2740
+ background: `linear-gradient(
2741
+ 90deg,
2742
+ ${vars.colors.borderMuted} 25%,
2743
+ ${vars.colors.borderDefault} 50%,
2744
+ ${vars.colors.borderMuted} 75%
2745
+ )`,
2746
+ backgroundSize: "200% 100%",
2747
+ animation: `${shimmer} 1.5s ease-in-out infinite`
2748
+ },
2749
+ pulse: {
2750
+ backgroundColor: vars.colors.borderMuted,
2751
+ animation: `${pulse} 2s ease-in-out infinite`
2752
+ },
2753
+ none: { backgroundColor: vars.colors.borderMuted }
2754
+ });
2755
+ const skeleton = styleWithLayer({
2756
+ width: "100%",
2757
+ display: "inline-block"
2758
+ });
2759
+
2760
+ //#endregion
2761
+ //#region src/components/Skeleton/Skeleton.tsx
2762
+ const Skeleton = ({ variant = "text", size = "medium", animation = "shimmer", width, height, count = 1, className, ...props }) => {
2763
+ const style = {
2764
+ width,
2765
+ height
2766
+ };
2767
+ const skeletons = Array.from({ length: count }, (_, index) => /* @__PURE__ */ React.createElement(Box, {
2768
+ key: index,
2769
+ as: "span",
2770
+ className: clsx(skeleton, skeletonVariants[variant], skeletonSizes[size], skeletonAnimation[animation], className),
2771
+ style,
2772
+ "aria-hidden": "true",
2773
+ ...props
2774
+ }));
2775
+ return /* @__PURE__ */ React.createElement(Box, {
2776
+ display: "flex",
2777
+ flexDirection: "column",
2778
+ gap: "small"
2779
+ }, skeletons);
2780
+ };
2781
+
2782
+ //#endregion
2783
+ //#region src/components/Drawer/styles.css.ts
2784
+ const slideInFromLeft = keyframes({
2785
+ from: { transform: "translateX(-100%)" },
2786
+ to: { transform: "translateX(0)" }
2787
+ });
2788
+ const slideInFromRight = keyframes({
2789
+ from: { transform: "translateX(100%)" },
2790
+ to: { transform: "translateX(0)" }
2791
+ });
2792
+ const slideInFromTop = keyframes({
2793
+ from: { transform: "translateY(-100%)" },
2794
+ to: { transform: "translateY(0)" }
2795
+ });
2796
+ const slideInFromBottom = keyframes({
2797
+ from: { transform: "translateY(100%)" },
2798
+ to: { transform: "translateY(0)" }
2799
+ });
2800
+ const fadeIn$1 = keyframes({
2801
+ from: { opacity: 0 },
2802
+ to: { opacity: 1 }
2803
+ });
2804
+ const drawerPositionVariants = styleVariants({
2805
+ left: {
2806
+ top: 0,
2807
+ left: 0,
2808
+ bottom: 0,
2809
+ width: "var(--drawer-width, 300px)",
2810
+ maxWidth: "100vw",
2811
+ animation: `${slideInFromLeft} 0.3s ease-out`
2812
+ },
2813
+ right: {
2814
+ top: 0,
2815
+ right: 0,
2816
+ bottom: 0,
2817
+ width: "var(--drawer-width, 300px)",
2818
+ maxWidth: "100vw",
2819
+ animation: `${slideInFromRight} 0.3s ease-out`
2820
+ },
2821
+ top: {
2822
+ top: 0,
2823
+ left: 0,
2824
+ right: 0,
2825
+ height: "var(--drawer-height, 300px)",
2826
+ maxHeight: "100vh",
2827
+ animation: `${slideInFromTop} 0.3s ease-out`
2828
+ },
2829
+ bottom: {
2830
+ bottom: 0,
2831
+ left: 0,
2832
+ right: 0,
2833
+ height: "var(--drawer-height, 300px)",
2834
+ maxHeight: "100vh",
2835
+ animation: `${slideInFromBottom} 0.3s ease-out`
2836
+ }
2837
+ });
2838
+ const drawerOverlay = styleWithLayer({
2839
+ position: "fixed",
2840
+ inset: 0,
2841
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
2842
+ animation: `${fadeIn$1} 0.2s ease-out`,
2843
+ zIndex: 40
2844
+ });
2845
+ const drawer = styleWithLayer({
2846
+ position: "fixed",
2847
+ background: vars.colors.backgroundDefault,
2848
+ boxShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
2849
+ zIndex: 50,
2850
+ display: "flex",
2851
+ flexDirection: "column",
2852
+ overflow: "hidden"
2853
+ });
2854
+ const drawerHeader = styleWithLayer({
2855
+ padding: "1.25rem",
2856
+ borderBottom: `1px solid ${vars.colors.borderMuted}`,
2857
+ display: "flex",
2858
+ alignItems: "center",
2859
+ justifyContent: "space-between",
2860
+ gap: "1rem"
2861
+ });
2862
+ const drawerTitle = styleWithLayer({
2863
+ fontFamily: vars.fontFamily.heading,
2864
+ fontSize: "1.25rem",
2865
+ fontWeight: "600",
2866
+ color: vars.colors.textPrimary,
2867
+ margin: 0
2868
+ });
2869
+ const drawerCloseButton = styleWithLayer({
2870
+ background: "none",
2871
+ border: "none",
2872
+ padding: "0.5rem",
2873
+ cursor: "pointer",
2874
+ borderRadius: "0.375rem",
2875
+ display: "flex",
2876
+ alignItems: "center",
2877
+ justifyContent: "center",
2878
+ color: vars.colors.textSecondary,
2879
+ fontSize: "1.5rem",
2880
+ lineHeight: "1",
2881
+ transition: "background-color 0.2s ease-in-out, color 0.2s ease-in-out",
2882
+ selectors: {
2883
+ "&:hover": {
2884
+ backgroundColor: vars.colors.borderMuted,
2885
+ color: vars.colors.textPrimary
2886
+ },
2887
+ "&:focus-visible": {
2888
+ outline: "2px solid var(--drawer-focus-ring, currentColor)",
2889
+ outlineOffset: "2px"
2890
+ }
2891
+ }
2892
+ });
2893
+ const drawerBody = styleWithLayer({
2894
+ padding: "1.25rem",
2895
+ overflowY: "auto",
2896
+ flex: 1
2897
+ });
2898
+ const drawerFooter = styleWithLayer({
2899
+ padding: "1.25rem",
2900
+ borderTop: `1px solid ${vars.colors.borderMuted}`,
2901
+ display: "flex",
2902
+ gap: "0.75rem",
2903
+ justifyContent: "flex-end",
2904
+ alignItems: "center"
2905
+ });
2906
+
2907
+ //#endregion
2908
+ //#region src/components/Drawer/Drawer.tsx
2909
+ const sizeMap$1 = {
2910
+ left: {
2911
+ small: "250px",
2912
+ medium: "350px",
2913
+ large: "450px",
2914
+ full: "100vw"
2915
+ },
2916
+ right: {
2917
+ small: "250px",
2918
+ medium: "350px",
2919
+ large: "450px",
2920
+ full: "100vw"
2921
+ },
2922
+ top: {
2923
+ small: "200px",
2924
+ medium: "300px",
2925
+ large: "400px",
2926
+ full: "100vh"
2927
+ },
2928
+ bottom: {
2929
+ small: "200px",
2930
+ medium: "300px",
2931
+ large: "400px",
2932
+ full: "100vh"
2933
+ }
2934
+ };
2935
+ const Drawer = ({ isOpen, onClose, title, position = "right", size = "medium", children, footer, showCloseButton = true, closeOnOverlayClick = true, className, ...props }) => {
2936
+ useEffect(() => {
2937
+ if (isOpen) {
2938
+ document.body.style.overflow = "hidden";
2939
+ } else {
2940
+ document.body.style.overflow = "";
2941
+ }
2942
+ return () => {
2943
+ document.body.style.overflow = "";
2944
+ };
2945
+ }, [isOpen]);
2946
+ useEffect(() => {
2947
+ const handleEscape = (e) => {
2948
+ if (e.key === "Escape" && isOpen) {
2949
+ onClose();
2950
+ }
2951
+ };
2952
+ document.addEventListener("keydown", handleEscape);
2953
+ return () => document.removeEventListener("keydown", handleEscape);
2954
+ }, [isOpen, onClose]);
2955
+ if (!isOpen) return null;
2956
+ const dimensionStyle = {
2957
+ ["--drawer-width"]: ["left", "right"].includes(position) ? sizeMap$1[position][size] : undefined,
2958
+ ["--drawer-height"]: ["top", "bottom"].includes(position) ? sizeMap$1[position][size] : undefined
2959
+ };
2960
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Box, {
2961
+ className: drawerOverlay,
2962
+ onClick: closeOnOverlayClick ? onClose : undefined,
2963
+ "aria-hidden": "true"
2964
+ }), /* @__PURE__ */ React.createElement(Box, {
2965
+ as: "div",
2966
+ role: "dialog",
2967
+ "aria-modal": "true",
2968
+ className: clsx(drawer, drawerPositionVariants[position], className),
2969
+ style: dimensionStyle,
2970
+ ...props
2971
+ }, title && /* @__PURE__ */ React.createElement(Box, {
2972
+ as: "div",
2973
+ className: drawerHeader
2974
+ }, /* @__PURE__ */ React.createElement(Box, {
2975
+ as: "h2",
2976
+ className: drawerTitle
2977
+ }, title), showCloseButton && /* @__PURE__ */ React.createElement(Box, {
2978
+ as: "button",
2979
+ className: drawerCloseButton,
2980
+ onClick: onClose,
2981
+ "aria-label": "Close drawer",
2982
+ type: "button"
2983
+ }, "×")), /* @__PURE__ */ React.createElement(Box, {
2984
+ as: "div",
2985
+ className: drawerBody
2986
+ }, children), footer && /* @__PURE__ */ React.createElement(Box, {
2987
+ as: "div",
2988
+ className: drawerFooter
2989
+ }, footer)));
2990
+ };
2991
+
2992
+ //#endregion
2993
+ //#region src/components/DropdownMenu/styles.css.ts
2994
+ const dropdownMenuContainer = styleWithLayer({
2995
+ position: "relative",
2996
+ display: "inline-block"
2997
+ });
2998
+ const dropdownMenuTrigger = styleWithLayer({
2999
+ cursor: "pointer",
3000
+ userSelect: "none"
3001
+ });
3002
+ const dropdownMenuContent = styleWithLayer({
3003
+ position: "absolute",
3004
+ backgroundColor: vars.colors.backgroundDefault,
3005
+ border: `1px solid ${vars.colors.borderDefault}`,
3006
+ borderRadius: "0.5rem",
3007
+ boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
3008
+ minWidth: "160px",
3009
+ zIndex: 50,
3010
+ overflow: "hidden",
3011
+ marginTop: "0.25rem"
3012
+ });
3013
+ const dropdownMenuPositionVariants = styleVariants({
3014
+ bottomLeft: {
3015
+ top: "100%",
3016
+ left: 0
3017
+ },
3018
+ bottomRight: {
3019
+ top: "100%",
3020
+ right: 0
3021
+ },
3022
+ topLeft: {
3023
+ bottom: "100%",
3024
+ left: 0,
3025
+ marginTop: 0,
3026
+ marginBottom: "0.25rem"
3027
+ },
3028
+ topRight: {
3029
+ bottom: "100%",
3030
+ right: 0,
3031
+ marginTop: 0,
3032
+ marginBottom: "0.25rem"
3033
+ }
3034
+ });
3035
+ const dropdownMenuItem = styleWithLayer({
3036
+ padding: "0.75rem 1rem",
3037
+ cursor: "pointer",
3038
+ display: "flex",
3039
+ alignItems: "center",
3040
+ gap: "0.5rem",
3041
+ fontSize: "14px",
3042
+ color: vars.colors.textPrimary,
3043
+ transition: "background-color 0.15s ease",
3044
+ ":hover": { backgroundColor: vars.colors.backgroundMuted },
3045
+ ":focus-visible": {
3046
+ outline: "none",
3047
+ backgroundColor: vars.colors.backgroundMuted
3048
+ }
3049
+ });
3050
+ const dropdownMenuItemVariants = styleVariants({
3051
+ default: {},
3052
+ destructive: {
3053
+ color: vars.colors.alertErrorText,
3054
+ ":hover": { backgroundColor: vars.colors.alertErrorBackground }
3055
+ },
3056
+ disabled: {
3057
+ opacity: .5,
3058
+ cursor: "not-allowed",
3059
+ ":hover": { backgroundColor: "transparent" }
3060
+ }
3061
+ });
3062
+ const dropdownMenuSeparator = styleWithLayer({
3063
+ height: "1px",
3064
+ backgroundColor: vars.colors.borderMuted,
3065
+ margin: "0.5rem 0"
3066
+ });
3067
+ const dropdownMenuGroup = styleWithLayer({ padding: "0.5rem 0" });
3068
+ const dropdownMenuLabel = styleWithLayer({
3069
+ padding: "0.5rem 1rem",
3070
+ fontSize: "12px",
3071
+ fontWeight: "600",
3072
+ color: vars.colors.textSecondary,
3073
+ textTransform: "uppercase",
3074
+ letterSpacing: "0.05em"
3075
+ });
3076
+
3077
+ //#endregion
3078
+ //#region src/components/DropdownMenu/DropdownMenu.tsx
3079
+ const DropdownMenu = ({ trigger, items = [], groups = [], position = "bottomLeft", closeOnItemClick = true, className, ...props }) => {
3080
+ const [isOpen, setIsOpen] = useState(false);
3081
+ const containerRef = useRef(null);
3082
+ useEffect(() => {
3083
+ const handleClickOutside = (event) => {
3084
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
3085
+ setIsOpen(false);
3086
+ }
3087
+ };
3088
+ if (isOpen) {
3089
+ document.addEventListener("mousedown", handleClickOutside);
3090
+ }
3091
+ return () => {
3092
+ document.removeEventListener("mousedown", handleClickOutside);
3093
+ };
3094
+ }, [isOpen]);
3095
+ useEffect(() => {
3096
+ const handleEscape = (e) => {
3097
+ if (e.key === "Escape" && isOpen) {
3098
+ setIsOpen(false);
3099
+ }
3100
+ };
3101
+ document.addEventListener("keydown", handleEscape);
3102
+ return () => document.removeEventListener("keydown", handleEscape);
3103
+ }, [isOpen]);
3104
+ const handleItemClick = (item) => {
3105
+ if (item.disabled || item.variant === "disabled") return;
3106
+ item.onClick?.();
3107
+ if (closeOnItemClick) {
3108
+ setIsOpen(false);
3109
+ }
3110
+ };
3111
+ const renderItem = (item, index) => /* @__PURE__ */ React.createElement(Box, {
3112
+ key: index,
3113
+ as: "button",
3114
+ className: clsx(dropdownMenuItem, dropdownMenuItemVariants[item.disabled || item.variant === "disabled" ? "disabled" : item.variant || "default"]),
3115
+ onClick: () => handleItemClick(item),
3116
+ disabled: item.disabled || item.variant === "disabled",
3117
+ role: "menuitem",
3118
+ type: "button"
3119
+ }, item.icon && /* @__PURE__ */ React.createElement("span", null, item.icon), item.label);
3120
+ const renderGroup = (group, index) => /* @__PURE__ */ React.createElement(Box, {
3121
+ key: index,
3122
+ className: dropdownMenuGroup,
3123
+ role: "group"
3124
+ }, group.label && /* @__PURE__ */ React.createElement(Box, {
3125
+ as: "div",
3126
+ className: dropdownMenuLabel,
3127
+ role: "presentation"
3128
+ }, group.label), group.items.map((item, itemIndex) => renderItem(item, itemIndex)));
3129
+ return /* @__PURE__ */ React.createElement(Box, {
3130
+ ref: containerRef,
3131
+ className: clsx(dropdownMenuContainer, className),
3132
+ ...props
3133
+ }, /* @__PURE__ */ React.createElement(Box, {
3134
+ className: dropdownMenuTrigger,
3135
+ onClick: () => setIsOpen(!isOpen),
3136
+ "aria-expanded": isOpen,
3137
+ "aria-haspopup": "true"
3138
+ }, trigger), isOpen && /* @__PURE__ */ React.createElement(Box, {
3139
+ className: clsx(dropdownMenuContent, dropdownMenuPositionVariants[position]),
3140
+ role: "menu",
3141
+ "aria-orientation": "vertical"
3142
+ }, items.length > 0 && /* @__PURE__ */ React.createElement(Box, { className: dropdownMenuGroup }, items.map((item, index) => renderItem(item, index))), groups.map((group, index) => /* @__PURE__ */ React.createElement(React.Fragment, { key: index }, index > 0 && /* @__PURE__ */ React.createElement(Box, {
3143
+ as: "div",
3144
+ className: dropdownMenuSeparator,
3145
+ role: "separator"
3146
+ }), renderGroup(group, index)))));
3147
+ };
3148
+
3149
+ //#endregion
3150
+ //#region src/components/Popover/styles.css.ts
3151
+ const fadeIn = keyframes({
3152
+ from: {
3153
+ opacity: 0,
3154
+ transform: "scale(0.95)"
3155
+ },
3156
+ to: {
3157
+ opacity: 1,
3158
+ transform: "scale(1)"
3159
+ }
3160
+ });
3161
+ const popoverContainer = styleWithLayer({
3162
+ position: "relative",
3163
+ display: "inline-block"
3164
+ });
3165
+ const popoverTrigger = styleWithLayer({ cursor: "pointer" });
3166
+ const popoverContent = styleWithLayer({
3167
+ position: "absolute",
3168
+ backgroundColor: vars.colors.backgroundDefault,
3169
+ border: `1px solid ${vars.colors.borderDefault}`,
3170
+ borderRadius: "0.75rem",
3171
+ boxShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
3172
+ zIndex: 50,
3173
+ padding: "1rem",
3174
+ minWidth: "200px",
3175
+ maxWidth: "400px",
3176
+ animation: `${fadeIn} 0.15s ease-out`
3177
+ });
3178
+ const popoverPositionVariants = styleVariants({
3179
+ top: {
3180
+ bottom: "100%",
3181
+ left: "50%",
3182
+ transform: "translateX(-50%)",
3183
+ marginBottom: "0.5rem"
3184
+ },
3185
+ bottom: {
3186
+ top: "100%",
3187
+ left: "50%",
3188
+ transform: "translateX(-50%)",
3189
+ marginTop: "0.5rem"
3190
+ },
3191
+ left: {
3192
+ right: "100%",
3193
+ top: "50%",
3194
+ transform: "translateY(-50%)",
3195
+ marginRight: "0.5rem"
3196
+ },
3197
+ right: {
3198
+ left: "100%",
3199
+ top: "50%",
3200
+ transform: "translateY(-50%)",
3201
+ marginLeft: "0.5rem"
3202
+ },
3203
+ topLeft: {
3204
+ bottom: "100%",
3205
+ right: 0,
3206
+ marginBottom: "0.5rem"
3207
+ },
3208
+ topRight: {
3209
+ bottom: "100%",
3210
+ left: 0,
3211
+ marginBottom: "0.5rem"
3212
+ },
3213
+ bottomLeft: {
3214
+ top: "100%",
3215
+ right: 0,
3216
+ marginTop: "0.5rem"
3217
+ },
3218
+ bottomRight: {
3219
+ top: "100%",
3220
+ left: 0,
3221
+ marginTop: "0.5rem"
3222
+ }
3223
+ });
3224
+ const popoverArrow = styleWithLayer({
3225
+ position: "absolute",
3226
+ width: "8px",
3227
+ height: "8px",
3228
+ backgroundColor: vars.colors.backgroundDefault,
3229
+ border: `1px solid ${vars.colors.borderDefault}`,
3230
+ transform: "rotate(45deg)"
3231
+ });
3232
+ const popoverArrowPositionVariants = styleVariants({
3233
+ top: {
3234
+ bottom: "-5px",
3235
+ left: "50%",
3236
+ transform: "translateX(-50%) rotate(45deg)",
3237
+ borderTop: "none",
3238
+ borderLeft: "none"
3239
+ },
3240
+ bottom: {
3241
+ top: "-5px",
3242
+ left: "50%",
3243
+ transform: "translateX(-50%) rotate(45deg)",
3244
+ borderBottom: "none",
3245
+ borderRight: "none"
3246
+ },
3247
+ left: {
3248
+ right: "-5px",
3249
+ top: "50%",
3250
+ transform: "translateY(-50%) rotate(45deg)",
3251
+ borderLeft: "none",
3252
+ borderBottom: "none"
3253
+ },
3254
+ right: {
3255
+ left: "-5px",
3256
+ top: "50%",
3257
+ transform: "translateY(-50%) rotate(45deg)",
3258
+ borderRight: "none",
3259
+ borderTop: "none"
3260
+ },
3261
+ topLeft: {
3262
+ bottom: "-5px",
3263
+ right: "1rem",
3264
+ transform: "rotate(45deg)",
3265
+ borderTop: "none",
3266
+ borderLeft: "none"
3267
+ },
3268
+ topRight: {
3269
+ bottom: "-5px",
3270
+ left: "1rem",
3271
+ transform: "rotate(45deg)",
3272
+ borderTop: "none",
3273
+ borderLeft: "none"
3274
+ },
3275
+ bottomLeft: {
3276
+ top: "-5px",
3277
+ right: "1rem",
3278
+ transform: "rotate(45deg)",
3279
+ borderBottom: "none",
3280
+ borderRight: "none"
3281
+ },
3282
+ bottomRight: {
3283
+ top: "-5px",
3284
+ left: "1rem",
3285
+ transform: "rotate(45deg)",
3286
+ borderBottom: "none",
3287
+ borderRight: "none"
3288
+ }
3289
+ });
3290
+ const popoverHeader = styleWithLayer({
3291
+ display: "flex",
3292
+ alignItems: "center",
3293
+ justifyContent: "space-between",
3294
+ marginBottom: "0.75rem",
3295
+ paddingBottom: "0.75rem",
3296
+ borderBottom: `1px solid ${vars.colors.borderMuted}`
3297
+ });
3298
+ const popoverTitle = styleWithLayer({
3299
+ fontFamily: vars.fontFamily.heading,
3300
+ fontSize: "1rem",
3301
+ fontWeight: "600",
3302
+ color: vars.colors.textPrimary,
3303
+ margin: 0
3304
+ });
3305
+ const popoverCloseButton = styleWithLayer({
3306
+ background: "none",
3307
+ border: "none",
3308
+ padding: "0.25rem",
3309
+ cursor: "pointer",
3310
+ borderRadius: "0.25rem",
3311
+ display: "flex",
3312
+ alignItems: "center",
3313
+ justifyContent: "center",
3314
+ color: vars.colors.textSecondary,
3315
+ fontSize: "1.25rem",
3316
+ lineHeight: "1",
3317
+ marginLeft: "0.5rem",
3318
+ transition: "background-color 0.2s ease-in-out, color 0.2s ease-in-out",
3319
+ ":hover": {
3320
+ backgroundColor: vars.colors.borderMuted,
3321
+ color: vars.colors.textPrimary
3322
+ }
3323
+ });
3324
+ const popoverBody = styleWithLayer({
3325
+ fontSize: "14px",
3326
+ color: vars.colors.textPrimary,
3327
+ lineHeight: "1.5"
3328
+ });
3329
+ const popoverFooter = styleWithLayer({
3330
+ display: "flex",
3331
+ gap: "0.5rem",
3332
+ justifyContent: "flex-end",
3333
+ marginTop: "0.75rem",
3334
+ paddingTop: "0.75rem",
3335
+ borderTop: `1px solid ${vars.colors.borderMuted}`
3336
+ });
3337
+
3338
+ //#endregion
3339
+ //#region src/components/Popover/Popover.tsx
3340
+ const Popover = ({ trigger, children, position = "bottom", title, footer, showArrow = true, triggerType = "click", closeOnClickOutside = true, closeOnEscape = true, defaultOpen = false, onOpenChange, className, ...props }) => {
3341
+ const [isOpen, setIsOpen] = useState(defaultOpen);
3342
+ const containerRef = useRef(null);
3343
+ useEffect(() => {
3344
+ onOpenChange?.(isOpen);
3345
+ }, [isOpen, onOpenChange]);
3346
+ useEffect(() => {
3347
+ if (!closeOnClickOutside) return;
3348
+ const handleClickOutside = (event) => {
3349
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
3350
+ setIsOpen(false);
3351
+ }
3352
+ };
3353
+ if (isOpen) {
3354
+ document.addEventListener("mousedown", handleClickOutside);
3355
+ }
3356
+ return () => {
3357
+ document.removeEventListener("mousedown", handleClickOutside);
3358
+ };
3359
+ }, [isOpen, closeOnClickOutside]);
3360
+ useEffect(() => {
3361
+ if (!closeOnEscape) return;
3362
+ const handleEscape = (e) => {
3363
+ if (e.key === "Escape" && isOpen) {
3364
+ setIsOpen(false);
3365
+ }
3366
+ };
3367
+ document.addEventListener("keydown", handleEscape);
3368
+ return () => document.removeEventListener("keydown", handleEscape);
3369
+ }, [isOpen, closeOnEscape]);
3370
+ const handleTriggerClick = () => {
3371
+ if (triggerType === "click") {
3372
+ setIsOpen(!isOpen);
3373
+ }
3374
+ };
3375
+ const handleTriggerMouseEnter = () => {
3376
+ if (triggerType === "hover") {
3377
+ setIsOpen(true);
3378
+ }
3379
+ };
3380
+ const handleTriggerMouseLeave = () => {
3381
+ if (triggerType === "hover") {
3382
+ setIsOpen(false);
3383
+ }
3384
+ };
3385
+ return /* @__PURE__ */ React.createElement(Box, {
3386
+ ref: containerRef,
3387
+ className: clsx(popoverContainer, className),
3388
+ onMouseEnter: handleTriggerMouseEnter,
3389
+ onMouseLeave: handleTriggerMouseLeave,
3390
+ ...props
3391
+ }, /* @__PURE__ */ React.createElement(Box, {
3392
+ className: popoverTrigger,
3393
+ onClick: handleTriggerClick,
3394
+ "aria-expanded": isOpen
3395
+ }, trigger), isOpen && /* @__PURE__ */ React.createElement(Box, {
3396
+ className: clsx(popoverContent, popoverPositionVariants[position]),
3397
+ role: "dialog",
3398
+ "aria-modal": "false"
3399
+ }, showArrow && /* @__PURE__ */ React.createElement(Box, {
3400
+ as: "span",
3401
+ className: clsx(popoverArrow, popoverArrowPositionVariants[position])
3402
+ }), (title || triggerType === "click") && /* @__PURE__ */ React.createElement(Box, {
3403
+ as: "div",
3404
+ className: popoverHeader
3405
+ }, title && /* @__PURE__ */ React.createElement(Box, {
3406
+ as: "h3",
3407
+ className: popoverTitle
3408
+ }, title), triggerType === "click" && /* @__PURE__ */ React.createElement(Box, {
3409
+ as: "button",
3410
+ className: popoverCloseButton,
3411
+ onClick: () => setIsOpen(false),
3412
+ "aria-label": "Close popover",
3413
+ type: "button"
3414
+ }, "×")), /* @__PURE__ */ React.createElement(Box, {
3415
+ as: "div",
3416
+ className: popoverBody
3417
+ }, children), footer && /* @__PURE__ */ React.createElement(Box, {
3418
+ as: "div",
3419
+ className: popoverFooter
3420
+ }, footer)));
3421
+ };
3422
+
3423
+ //#endregion
3424
+ //#region src/components/Stepper/styles.css.ts
3425
+ const stepperContainer = styleWithLayer({
3426
+ display: "flex",
3427
+ alignItems: "flex-start",
3428
+ width: "100%"
3429
+ });
3430
+ const stepperHorizontal = styleWithLayer({
3431
+ flexDirection: "row",
3432
+ justifyContent: "space-between"
3433
+ });
3434
+ const stepperVertical = styleWithLayer({
3435
+ flexDirection: "column",
3436
+ gap: "1rem"
3437
+ });
3438
+ const step = styleWithLayer({
3439
+ display: "flex",
3440
+ flexDirection: "column",
3441
+ alignItems: "center",
3442
+ position: "relative",
3443
+ flex: 1
3444
+ });
3445
+ const stepVertical = styleWithLayer({
3446
+ flexDirection: "row",
3447
+ alignItems: "flex-start",
3448
+ gap: "1rem"
3449
+ });
3450
+ const stepIndicator = styleWithLayer({
3451
+ width: "2.5rem",
3452
+ height: "2.5rem",
3453
+ borderRadius: "50%",
3454
+ display: "flex",
3455
+ alignItems: "center",
3456
+ justifyContent: "center",
3457
+ fontWeight: "600",
3458
+ fontSize: "14px",
3459
+ transition: "all 0.3s ease",
3460
+ zIndex: 1
3461
+ });
3462
+ const stepIndicatorVariants = styleVariants({
3463
+ pending: {
3464
+ backgroundColor: vars.colors.borderMuted,
3465
+ color: vars.colors.textSecondary,
3466
+ border: `2px solid ${vars.colors.borderMuted}`
3467
+ },
3468
+ current: {
3469
+ backgroundColor: vars.colors.buttonBackgroundPrimary,
3470
+ color: vars.colors.buttonTextPrimary,
3471
+ border: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
3472
+ boxShadow: `0 0 0 4px ${vars.colors.alertInfoBackground}`
3473
+ },
3474
+ completed: {
3475
+ backgroundColor: vars.colors.alertSuccessBorder,
3476
+ color: vars.colors.buttonTextPrimary,
3477
+ border: `2px solid ${vars.colors.alertSuccessBorder}`
3478
+ }
3479
+ });
3480
+ const stepContent = styleWithLayer({
3481
+ display: "flex",
3482
+ flexDirection: "column",
3483
+ alignItems: "center",
3484
+ marginTop: "0.5rem",
3485
+ textAlign: "center"
3486
+ });
3487
+ const stepContentVertical = styleWithLayer({
3488
+ alignItems: "flex-start",
3489
+ marginTop: 0,
3490
+ textAlign: "left"
3491
+ });
3492
+ const stepTitle = styleWithLayer({
3493
+ fontFamily: vars.fontFamily.heading,
3494
+ fontSize: "14px",
3495
+ fontWeight: "600",
3496
+ color: vars.colors.textPrimary,
3497
+ margin: 0
3498
+ });
3499
+ const stepDescription = styleWithLayer({
3500
+ fontSize: "12px",
3501
+ color: vars.colors.textSecondary,
3502
+ marginTop: "0.25rem",
3503
+ maxWidth: "200px"
3504
+ });
3505
+ const stepConnector = styleWithLayer({
3506
+ position: "absolute",
3507
+ top: "1.25rem",
3508
+ left: "calc(50% + 1.5rem)",
3509
+ right: "calc(-50% + 1.5rem)",
3510
+ height: "2px",
3511
+ backgroundColor: vars.colors.borderMuted,
3512
+ zIndex: 0
3513
+ });
3514
+ const stepConnectorCompleted = styleWithLayer({ backgroundColor: vars.colors.alertSuccessBorder });
3515
+ const stepConnectorVertical = styleWithLayer({
3516
+ position: "absolute",
3517
+ top: "2.5rem",
3518
+ left: "1.25rem",
3519
+ width: "2px",
3520
+ height: "calc(100% + 1rem)",
3521
+ backgroundColor: vars.colors.borderMuted,
3522
+ zIndex: 0
3523
+ });
3524
+
3525
+ //#endregion
3526
+ //#region src/components/Stepper/Stepper.tsx
3527
+ const Stepper = ({ steps, currentStep = 0, orientation = "horizontal", showConnectors = true, onStepClick, clickable = false, className, ...props }) => {
3528
+ const getStepStatus = (index) => {
3529
+ if (index < currentStep) return "completed";
3530
+ if (index === currentStep) return "current";
3531
+ return "pending";
3532
+ };
3533
+ const handleStepClick = (index) => {
3534
+ if (clickable && onStepClick) {
3535
+ onStepClick(index);
3536
+ }
3537
+ };
3538
+ return /* @__PURE__ */ React.createElement(Box, {
3539
+ className: clsx(stepperContainer, orientation === "horizontal" ? stepperHorizontal : stepperVertical, className),
3540
+ role: "list",
3541
+ "aria-label": "Step progress",
3542
+ ...props
3543
+ }, steps.map((stepItem, index) => {
3544
+ const status = stepItem.status || getStepStatus(index);
3545
+ const isLast = index === steps.length - 1;
3546
+ const isCompleted = status === "completed";
3547
+ return /* @__PURE__ */ React.createElement(Box, {
3548
+ key: index,
3549
+ className: clsx(step, orientation === "vertical" && stepVertical),
3550
+ role: "listitem",
3551
+ "aria-current": status === "current" ? "step" : undefined
3552
+ }, showConnectors && !isLast && orientation === "horizontal" && /* @__PURE__ */ React.createElement(Box, {
3553
+ className: clsx(stepConnector, isCompleted && stepConnectorCompleted),
3554
+ "aria-hidden": "true"
3555
+ }), showConnectors && !isLast && orientation === "vertical" && /* @__PURE__ */ React.createElement(Box, {
3556
+ className: stepConnectorVertical,
3557
+ style: { backgroundColor: isCompleted ? undefined : undefined },
3558
+ "aria-hidden": "true"
3559
+ }), /* @__PURE__ */ React.createElement(Box, {
3560
+ className: clsx(stepIndicator, stepIndicatorVariants[status]),
3561
+ onClick: () => handleStepClick(index),
3562
+ style: { cursor: clickable ? "pointer" : "default" },
3563
+ "aria-label": `Step ${index + 1}: ${stepItem.title}`
3564
+ }, status === "completed" ? "✓" : index + 1), /* @__PURE__ */ React.createElement(Box, { className: clsx(stepContent, orientation === "vertical" && stepContentVertical) }, /* @__PURE__ */ React.createElement(Box, {
3565
+ as: "h4",
3566
+ className: stepTitle
3567
+ }, stepItem.title), stepItem.description && /* @__PURE__ */ React.createElement(Box, {
3568
+ as: "p",
3569
+ className: stepDescription
3570
+ }, stepItem.description)));
3571
+ }));
3572
+ };
3573
+
3574
+ //#endregion
3575
+ //#region src/components/Combobox/styles.css.ts
3576
+ const comboboxContainer = styleWithLayer({
3577
+ position: "relative",
3578
+ width: "100%"
3579
+ });
3580
+ const comboboxInput = styleWithLayer({
3581
+ width: "100%",
3582
+ padding: "0.75rem 2.5rem 0.75rem 1rem",
3583
+ fontSize: "14px",
3584
+ fontFamily: vars.fontFamily.body,
3585
+ color: vars.colors.textPrimary,
3586
+ backgroundColor: vars.colors.inputBackground,
3587
+ border: `1px solid ${vars.colors.inputBorder}`,
3588
+ borderRadius: "8px",
3589
+ outline: "none",
3590
+ transition: "border-color 0.2s ease",
3591
+ "::placeholder": { color: vars.colors.inputPlaceholder },
3592
+ ":focus-visible": {
3593
+ outline: `2px solid ${vars.colors.inputBorderFocused}`,
3594
+ outlineOffset: "2px"
3595
+ },
3596
+ ":hover": { borderColor: vars.colors.inputBorderFocused },
3597
+ selectors: {
3598
+ "&:disabled": {
3599
+ cursor: "not-allowed",
3600
+ opacity: .5,
3601
+ backgroundColor: vars.colors.backgroundMuted
3602
+ },
3603
+ "&:disabled:hover": { borderColor: vars.colors.inputBorder }
3604
+ }
3605
+ });
3606
+ const comboboxInputVariants = styleVariants({
3607
+ default: {},
3608
+ error: {
3609
+ border: `1px solid ${vars.colors.alertErrorBorder}`,
3610
+ ":focus-visible": { outline: `2px solid ${vars.colors.alertErrorBorder}` },
3611
+ ":hover": { borderColor: vars.colors.alertErrorBorder }
3612
+ }
3613
+ });
3614
+ const comboboxLabel = styleWithLayer({
3615
+ display: "block",
3616
+ fontSize: "14px",
3617
+ fontWeight: "500",
3618
+ color: vars.colors.textPrimary,
3619
+ marginBottom: "8px"
3620
+ });
3621
+ const comboboxDropdown = styleWithLayer({
3622
+ position: "absolute",
3623
+ top: "100%",
3624
+ left: 0,
3625
+ right: 0,
3626
+ backgroundColor: vars.colors.backgroundDefault,
3627
+ border: `1px solid ${vars.colors.borderDefault}`,
3628
+ borderRadius: "8px",
3629
+ boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
3630
+ maxHeight: "200px",
3631
+ overflowY: "auto",
3632
+ zIndex: 50,
3633
+ marginTop: "4px"
3634
+ });
3635
+ const comboboxOption = styleWithLayer({
3636
+ padding: "0.75rem 1rem",
3637
+ cursor: "pointer",
3638
+ fontSize: "14px",
3639
+ color: vars.colors.textPrimary,
3640
+ transition: "background-color 0.15s ease",
3641
+ ":hover": { backgroundColor: vars.colors.backgroundMuted },
3642
+ ":focus-visible": {
3643
+ outline: "none",
3644
+ backgroundColor: vars.colors.backgroundMuted
3645
+ }
3646
+ });
3647
+ const comboboxOptionSelected = styleWithLayer({
3648
+ backgroundColor: vars.colors.buttonBackgroundPrimary,
3649
+ color: vars.colors.buttonTextPrimary,
3650
+ ":hover": { backgroundColor: vars.colors.buttonBackgroundFocusedPrimary }
3651
+ });
3652
+ const comboboxOptionDisabled = styleWithLayer({
3653
+ opacity: .5,
3654
+ cursor: "not-allowed",
3655
+ ":hover": { backgroundColor: "transparent" }
3656
+ });
3657
+ const comboboxClearButton = styleWithLayer({
3658
+ position: "absolute",
3659
+ right: "2.5rem",
3660
+ top: "50%",
3661
+ transform: "translateY(-50%)",
3662
+ background: "none",
3663
+ border: "none",
3664
+ cursor: "pointer",
3665
+ padding: "0.25rem",
3666
+ color: vars.colors.textSecondary,
3667
+ fontSize: "16px",
3668
+ display: "flex",
3669
+ alignItems: "center",
3670
+ justifyContent: "center",
3671
+ ":hover": { color: vars.colors.textPrimary }
3672
+ });
3673
+ const comboboxArrow = styleWithLayer({
3674
+ position: "absolute",
3675
+ right: "0.75rem",
3676
+ top: "50%",
3677
+ transform: "translateY(-50%)",
3678
+ pointerEvents: "none",
3679
+ color: vars.colors.textSecondary
3680
+ });
3681
+ const comboboxNoResults = styleWithLayer({
3682
+ padding: "0.75rem 1rem",
3683
+ fontSize: "14px",
3684
+ color: vars.colors.textSecondary,
3685
+ textAlign: "center"
3686
+ });
3687
+ const comboboxHint = styleWithLayer({
3688
+ fontSize: "12px",
3689
+ color: vars.colors.textSecondary,
3690
+ marginTop: "4px"
3691
+ });
3692
+ const comboboxErrorMessage = styleWithLayer({
3693
+ fontSize: "12px",
3694
+ color: vars.colors.alertErrorText,
3695
+ marginTop: "4px"
3696
+ });
3697
+
3698
+ //#endregion
3699
+ //#region src/components/Combobox/Combobox.tsx
3700
+ const defaultFilterFn = (option, inputValue) => {
3701
+ return option.label.toLowerCase().includes(inputValue.toLowerCase());
3702
+ };
3703
+ const Combobox = ({ label, options, value, onChange, onInputChange, placeholder = "Search...", hint, error = false, errorMessage, fullWidth = true, clearable = true, disabled = false, filterFn = defaultFilterFn, className, ...props }) => {
3704
+ const [inputValue, setInputValue] = useState("");
3705
+ const [isOpen, setIsOpen] = useState(false);
3706
+ const [highlightedIndex, setHighlightedIndex] = useState(-1);
3707
+ const containerRef = useRef(null);
3708
+ const inputRef = useRef(null);
3709
+ const selectedOption = options.find((opt) => opt.value === value);
3710
+ useEffect(() => {
3711
+ if (selectedOption) {
3712
+ setInputValue(selectedOption.label);
3713
+ } else if (!isOpen) {
3714
+ setInputValue("");
3715
+ }
3716
+ }, [selectedOption, isOpen]);
3717
+ const filteredOptions = options.filter((option) => filterFn(option, inputValue));
3718
+ useEffect(() => {
3719
+ const handleClickOutside = (event) => {
3720
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
3721
+ setIsOpen(false);
3722
+ if (selectedOption) {
3723
+ setInputValue(selectedOption.label);
3724
+ } else {
3725
+ setInputValue("");
3726
+ }
3727
+ }
3728
+ };
3729
+ document.addEventListener("mousedown", handleClickOutside);
3730
+ return () => document.removeEventListener("mousedown", handleClickOutside);
3731
+ }, [selectedOption]);
3732
+ const handleInputChange = (e) => {
3733
+ const newValue = e.target.value;
3734
+ setInputValue(newValue);
3735
+ setIsOpen(true);
3736
+ setHighlightedIndex(-1);
3737
+ onInputChange?.(newValue);
3738
+ if (!newValue) {
3739
+ onChange?.("", null);
3740
+ }
3741
+ };
3742
+ const handleOptionClick = (option) => {
3743
+ if (option.disabled) return;
3744
+ setInputValue(option.label);
3745
+ setIsOpen(false);
3746
+ onChange?.(option.value, option);
3747
+ };
3748
+ const handleClear = (e) => {
3749
+ e.stopPropagation();
3750
+ setInputValue("");
3751
+ setIsOpen(false);
3752
+ onChange?.("", null);
3753
+ inputRef.current?.focus();
3754
+ };
3755
+ const handleKeyDown = (e) => {
3756
+ if (disabled) return;
3757
+ switch (e.key) {
3758
+ case "ArrowDown":
3759
+ e.preventDefault();
3760
+ if (!isOpen) {
3761
+ setIsOpen(true);
3762
+ }
3763
+ setHighlightedIndex((prev) => prev < filteredOptions.length - 1 ? prev + 1 : prev);
3764
+ break;
3765
+ case "ArrowUp":
3766
+ e.preventDefault();
3767
+ setHighlightedIndex((prev) => prev > 0 ? prev - 1 : prev);
3768
+ break;
3769
+ case "Enter":
3770
+ e.preventDefault();
3771
+ if (isOpen && highlightedIndex >= 0 && filteredOptions[highlightedIndex]) {
3772
+ handleOptionClick(filteredOptions[highlightedIndex]);
3773
+ } else {
3774
+ setIsOpen(!isOpen);
3775
+ }
3776
+ break;
3777
+ case "Escape":
3778
+ setIsOpen(false);
3779
+ if (selectedOption) {
3780
+ setInputValue(selectedOption.label);
3781
+ } else {
3782
+ setInputValue("");
3783
+ }
3784
+ break;
3785
+ }
3786
+ };
3787
+ const displayValue = selectedOption && !isOpen ? selectedOption.label : inputValue;
3788
+ return /* @__PURE__ */ React.createElement(Box, {
3789
+ className: comboboxContainer,
3790
+ ref: containerRef,
3791
+ width: fullWidth ? "100%" : undefined
3792
+ }, label && /* @__PURE__ */ React.createElement(Box, {
3793
+ as: "label",
3794
+ className: comboboxLabel
3795
+ }, label), /* @__PURE__ */ React.createElement(Box, { position: "relative" }, /* @__PURE__ */ React.createElement(Box, {
3796
+ as: "input",
3797
+ ref: inputRef,
3798
+ type: "text",
3799
+ value: displayValue,
3800
+ onChange: handleInputChange,
3801
+ onKeyDown: handleKeyDown,
3802
+ onFocus: () => setIsOpen(true),
3803
+ placeholder,
3804
+ disabled,
3805
+ className: clsx(comboboxInput, comboboxInputVariants[error ? "error" : "default"], className),
3806
+ role: "combobox",
3807
+ "aria-expanded": isOpen,
3808
+ "aria-autocomplete": "list",
3809
+ "aria-controls": isOpen ? "combobox-listbox" : undefined,
3810
+ "aria-activedescendant": highlightedIndex >= 0 ? `option-${filteredOptions[highlightedIndex]?.value}` : undefined,
3811
+ ...props
3812
+ }), clearable && inputValue && !disabled && /* @__PURE__ */ React.createElement(Box, {
3813
+ as: "button",
3814
+ className: comboboxClearButton,
3815
+ onClick: handleClear,
3816
+ type: "button",
3817
+ "aria-label": "Clear selection"
3818
+ }, "×"), /* @__PURE__ */ React.createElement(Box, {
3819
+ className: comboboxArrow,
3820
+ "aria-hidden": "true"
3821
+ }, /* @__PURE__ */ React.createElement("svg", {
3822
+ width: "12",
3823
+ height: "12",
3824
+ viewBox: "0 0 12 12",
3825
+ fill: "currentColor"
3826
+ }, /* @__PURE__ */ React.createElement("path", { d: "M6 8L1 3h10z" })))), isOpen && /* @__PURE__ */ React.createElement(Box, {
3827
+ as: "ul",
3828
+ id: "combobox-listbox",
3829
+ className: comboboxDropdown,
3830
+ role: "listbox"
3831
+ }, filteredOptions.length === 0 ? /* @__PURE__ */ React.createElement(Box, {
3832
+ as: "li",
3833
+ className: comboboxNoResults
3834
+ }, "No results found") : filteredOptions.map((option, index) => /* @__PURE__ */ React.createElement(Box, {
3835
+ key: option.value,
3836
+ as: "li",
3837
+ id: `option-${option.value}`,
3838
+ className: clsx(comboboxOption, option.value === value && comboboxOptionSelected, option.disabled && comboboxOptionDisabled),
3839
+ onClick: () => handleOptionClick(option),
3840
+ role: "option",
3841
+ "aria-selected": option.value === value,
3842
+ "aria-disabled": option.disabled,
3843
+ style: { backgroundColor: index === highlightedIndex ? "var(--highlight-color, #f3f4f6)" : undefined }
3844
+ }, option.label))), error && errorMessage && /* @__PURE__ */ React.createElement(Box, {
3845
+ as: "div",
3846
+ className: comboboxErrorMessage,
3847
+ role: "alert"
3848
+ }, errorMessage), hint && !error && /* @__PURE__ */ React.createElement(Box, {
3849
+ as: "div",
3850
+ className: comboboxHint
3851
+ }, hint));
3852
+ };
3853
+
3854
+ //#endregion
3855
+ //#region src/components/NumberInput/styles.css.ts
3856
+ const numberInputContainer = styleWithLayer({
3857
+ position: "relative",
3858
+ display: "flex",
3859
+ alignItems: "center",
3860
+ width: "100%"
3861
+ });
3862
+ const numberInput = styleWithLayer({
3863
+ width: "100%",
3864
+ padding: "0.75rem 2.5rem",
3865
+ fontSize: "14px",
3866
+ fontFamily: vars.fontFamily.body,
3867
+ color: vars.colors.textPrimary,
3868
+ backgroundColor: vars.colors.inputBackground,
3869
+ border: `1px solid ${vars.colors.inputBorder}`,
3870
+ borderRadius: "8px",
3871
+ outline: "none",
3872
+ textAlign: "center",
3873
+ transition: "border-color 0.2s ease",
3874
+ "::placeholder": { color: vars.colors.inputPlaceholder },
3875
+ ":focus-visible": {
3876
+ outline: `2px solid ${vars.colors.inputBorderFocused}`,
3877
+ outlineOffset: "2px"
3878
+ },
3879
+ ":hover": { borderColor: vars.colors.inputBorderFocused },
3880
+ selectors: {
3881
+ "&:disabled": {
3882
+ cursor: "not-allowed",
3883
+ opacity: .5,
3884
+ backgroundColor: vars.colors.backgroundMuted
3885
+ },
3886
+ "&:disabled:hover": { borderColor: vars.colors.inputBorder }
3887
+ }
3888
+ });
3889
+ const numberInputVariants = styleVariants({
3890
+ default: {},
3891
+ error: {
3892
+ border: `1px solid ${vars.colors.alertErrorBorder}`,
3893
+ ":focus-visible": { outline: `2px solid ${vars.colors.alertErrorBorder}` },
3894
+ ":hover": { borderColor: vars.colors.alertErrorBorder }
3895
+ }
3896
+ });
3897
+ const numberInputLabel = styleWithLayer({
3898
+ display: "block",
3899
+ fontSize: "14px",
3900
+ fontWeight: "500",
3901
+ color: vars.colors.textPrimary,
3902
+ marginBottom: "8px"
3903
+ });
3904
+ const numberInputStepper = styleWithLayer({
3905
+ position: "absolute",
3906
+ display: "flex",
3907
+ flexDirection: "column",
3908
+ right: "0.5rem",
3909
+ top: "50%",
3910
+ transform: "translateY(-50%)",
3911
+ gap: "2px"
3912
+ });
3913
+ const numberInputStepperLeft = styleWithLayer({
3914
+ left: "0.5rem",
3915
+ right: "auto"
3916
+ });
3917
+ const numberInputButton = styleWithLayer({
3918
+ width: "1.5rem",
3919
+ height: "1.25rem",
3920
+ display: "flex",
3921
+ alignItems: "center",
3922
+ justifyContent: "center",
3923
+ backgroundColor: vars.colors.buttonBackgroundSecondary,
3924
+ border: `1px solid ${vars.colors.borderDefault}`,
3925
+ borderRadius: "4px",
3926
+ cursor: "pointer",
3927
+ fontSize: "12px",
3928
+ color: vars.colors.buttonTextSecondary,
3929
+ transition: "all 0.15s ease",
3930
+ padding: 0,
3931
+ ":hover": { backgroundColor: vars.colors.buttonBackgroundFocusedSecondary },
3932
+ ":active": { transform: "scale(0.95)" },
3933
+ selectors: {
3934
+ "&:disabled": {
3935
+ cursor: "not-allowed",
3936
+ opacity: .5
3937
+ },
3938
+ "&:disabled:hover": { backgroundColor: vars.colors.buttonBackgroundSecondary }
3939
+ }
3940
+ });
3941
+ const numberInputWrapper = styleWithLayer({ width: "100%" });
3942
+ const numberInputHint = styleWithLayer({
3943
+ fontSize: "12px",
3944
+ color: vars.colors.textSecondary,
3945
+ marginTop: "4px"
3946
+ });
3947
+ const numberInputErrorMessage = styleWithLayer({
3948
+ fontSize: "12px",
3949
+ color: vars.colors.alertErrorText,
3950
+ marginTop: "4px"
3951
+ });
3952
+
3953
+ //#endregion
3954
+ //#region src/components/NumberInput/NumberInput.tsx
3955
+ const NumberInput = ({ label, value, onChange, min = -Infinity, max = Infinity, step = 1, stepperPosition = "right", placeholder = "0", hint, error = false, errorMessage, fullWidth = true, disabled = false, allowEmpty = true, className, ...props }) => {
3956
+ const handleChange = (e) => {
3957
+ const inputValue = e.target.value;
3958
+ if (inputValue === "") {
3959
+ if (allowEmpty) {
3960
+ onChange?.("");
3961
+ } else {
3962
+ onChange?.(0);
3963
+ }
3964
+ return;
3965
+ }
3966
+ const numValue = parseFloat(inputValue);
3967
+ if (!isNaN(numValue)) {
3968
+ const clampedValue = Math.min(Math.max(numValue, min), max);
3969
+ onChange?.(clampedValue);
3970
+ }
3971
+ };
3972
+ const increment = useCallback(() => {
3973
+ const currentValue = typeof value === "number" ? value : 0;
3974
+ const newValue = Math.min(currentValue + step, max);
3975
+ onChange?.(newValue);
3976
+ }, [
3977
+ value,
3978
+ step,
3979
+ max,
3980
+ onChange
3981
+ ]);
3982
+ const decrement = useCallback(() => {
3983
+ const currentValue = typeof value === "number" ? value : 0;
3984
+ const newValue = Math.max(currentValue - step, min);
3985
+ onChange?.(newValue);
3986
+ }, [
3987
+ value,
3988
+ step,
3989
+ min,
3990
+ onChange
3991
+ ]);
3992
+ const isIncrementDisabled = disabled || typeof value === "number" && value >= max;
3993
+ const isDecrementDisabled = disabled || typeof value === "number" && value <= min;
3994
+ const displayValue = value === "" ? "" : value;
3995
+ return /* @__PURE__ */ React.createElement(Box, {
3996
+ className: numberInputWrapper,
3997
+ width: fullWidth ? "100%" : undefined
3998
+ }, label && /* @__PURE__ */ React.createElement(Box, {
3999
+ as: "label",
4000
+ className: numberInputLabel
4001
+ }, label), /* @__PURE__ */ React.createElement(Box, { className: numberInputContainer }, /* @__PURE__ */ React.createElement(Box, {
4002
+ as: "input",
4003
+ type: "number",
4004
+ value: displayValue,
4005
+ onChange: handleChange,
4006
+ min,
4007
+ max,
4008
+ step,
4009
+ placeholder,
4010
+ disabled,
4011
+ className: clsx(numberInput, numberInputVariants[error ? "error" : "default"], className),
4012
+ ...props
4013
+ }), /* @__PURE__ */ React.createElement(Box, { className: clsx(numberInputStepper, stepperPosition === "left" && numberInputStepperLeft) }, /* @__PURE__ */ React.createElement(Box, {
4014
+ as: "button",
4015
+ className: numberInputButton,
4016
+ onClick: increment,
4017
+ disabled: isIncrementDisabled,
4018
+ type: "button",
4019
+ "aria-label": "Increase value"
4020
+ }, "+"), /* @__PURE__ */ React.createElement(Box, {
4021
+ as: "button",
4022
+ className: numberInputButton,
4023
+ onClick: decrement,
4024
+ disabled: isDecrementDisabled,
4025
+ type: "button",
4026
+ "aria-label": "Decrease value"
4027
+ }, "−"))), error && errorMessage && /* @__PURE__ */ React.createElement(Box, {
4028
+ as: "div",
4029
+ className: numberInputErrorMessage,
4030
+ role: "alert"
4031
+ }, errorMessage), hint && !error && /* @__PURE__ */ React.createElement(Box, {
4032
+ as: "div",
4033
+ className: numberInputHint
4034
+ }, hint));
4035
+ };
4036
+
4037
+ //#endregion
4038
+ //#region src/components/FileUpload/styles.css.ts
4039
+ const fileUploadContainer = styleWithLayer({ width: "100%" });
4040
+ const fileUploadDropzone = styleWithLayer({
4041
+ border: `2px dashed ${vars.colors.borderDefault}`,
4042
+ borderRadius: "12px",
4043
+ padding: "2rem",
4044
+ textAlign: "center",
4045
+ cursor: "pointer",
4046
+ transition: "all 0.2s ease",
4047
+ backgroundColor: vars.colors.backgroundMuted,
4048
+ ":hover": {
4049
+ borderColor: vars.colors.inputBorderFocused,
4050
+ backgroundColor: vars.colors.alertInfoBackground
4051
+ }
4052
+ });
4053
+ const fileUploadDropzoneVariants = styleVariants({
4054
+ default: {},
4055
+ dragOver: {
4056
+ borderColor: vars.colors.buttonBackgroundPrimary,
4057
+ backgroundColor: vars.colors.alertInfoBackground,
4058
+ borderStyle: "solid"
4059
+ },
4060
+ error: {
4061
+ borderColor: vars.colors.alertErrorBorder,
4062
+ backgroundColor: vars.colors.alertErrorBackground
4063
+ },
4064
+ disabled: {
4065
+ cursor: "not-allowed",
4066
+ opacity: .6,
4067
+ ":hover": {
4068
+ borderColor: vars.colors.borderDefault,
4069
+ backgroundColor: vars.colors.backgroundMuted
4070
+ }
4071
+ }
4072
+ });
4073
+ const fileUploadLabel = styleWithLayer({
4074
+ display: "block",
4075
+ fontSize: "14px",
4076
+ fontWeight: "500",
4077
+ color: vars.colors.textPrimary,
4078
+ marginBottom: "8px"
4079
+ });
4080
+ const fileUploadText = styleWithLayer({
4081
+ fontSize: "14px",
4082
+ color: vars.colors.textSecondary,
4083
+ marginTop: "0.5rem"
4084
+ });
4085
+ const fileUploadHint = styleWithLayer({
4086
+ fontSize: "12px",
4087
+ color: vars.colors.textSecondary,
4088
+ marginTop: "0.5rem"
4089
+ });
4090
+ const fileUploadInput = styleWithLayer({ display: "none" });
4091
+ const fileUploadList = styleWithLayer({
4092
+ marginTop: "1rem",
4093
+ display: "flex",
4094
+ flexDirection: "column",
4095
+ gap: "0.75rem"
4096
+ });
4097
+ const fileUploadItem = styleWithLayer({
4098
+ display: "flex",
4099
+ alignItems: "center",
4100
+ gap: "0.75rem",
4101
+ padding: "0.75rem",
4102
+ backgroundColor: vars.colors.backgroundDefault,
4103
+ border: `1px solid ${vars.colors.borderMuted}`,
4104
+ borderRadius: "8px"
4105
+ });
4106
+ const fileUploadItemInfo = styleWithLayer({
4107
+ flex: 1,
4108
+ minWidth: 0
4109
+ });
4110
+ const fileUploadItemName = styleWithLayer({
4111
+ fontSize: "14px",
4112
+ fontWeight: "500",
4113
+ color: vars.colors.textPrimary,
4114
+ whiteSpace: "nowrap",
4115
+ overflow: "hidden",
4116
+ textOverflow: "ellipsis"
4117
+ });
4118
+ const fileUploadItemSize = styleWithLayer({
4119
+ fontSize: "12px",
4120
+ color: vars.colors.textSecondary,
4121
+ marginTop: "2px"
4122
+ });
4123
+ const fileUploadItemProgress = styleWithLayer({
4124
+ flex: 1,
4125
+ maxWidth: "200px"
4126
+ });
4127
+ const fileUploadRemoveButton = styleWithLayer({
4128
+ background: "none",
4129
+ border: "none",
4130
+ cursor: "pointer",
4131
+ padding: "0.25rem",
4132
+ color: vars.colors.textSecondary,
4133
+ fontSize: "18px",
4134
+ display: "flex",
4135
+ alignItems: "center",
4136
+ justifyContent: "center",
4137
+ borderRadius: "4px",
4138
+ transition: "all 0.15s ease",
4139
+ ":hover": {
4140
+ color: vars.colors.alertErrorText,
4141
+ backgroundColor: vars.colors.alertErrorBackground
4142
+ }
4143
+ });
4144
+ const fileUploadError = styleWithLayer({
4145
+ fontSize: "12px",
4146
+ color: vars.colors.alertErrorText,
4147
+ marginTop: "0.5rem"
4148
+ });
4149
+ const fileUploadIcon = styleWithLayer({
4150
+ fontSize: "24px",
4151
+ color: vars.colors.textSecondary
4152
+ });
4153
+ const fileUploadProgressBar = styleWithLayer({
4154
+ width: "100%",
4155
+ height: "4px",
4156
+ backgroundColor: vars.colors.borderMuted,
4157
+ borderRadius: "2px",
4158
+ overflow: "hidden",
4159
+ marginTop: "0.5rem"
4160
+ });
4161
+ const fileUploadProgressFill = styleWithLayer({
4162
+ height: "100%",
4163
+ backgroundColor: vars.colors.buttonBackgroundPrimary,
4164
+ transition: "width 0.3s ease"
4165
+ });
4166
+ const fileUploadProgressFillVariants = styleVariants({
4167
+ uploading: { backgroundColor: vars.colors.buttonBackgroundPrimary },
4168
+ success: { backgroundColor: vars.colors.alertSuccessBorder },
4169
+ error: { backgroundColor: vars.colors.alertErrorBorder }
4170
+ });
4171
+
4172
+ //#endregion
4173
+ //#region src/components/FileUpload/FileUpload.tsx
4174
+ const formatFileSize = (bytes) => {
4175
+ if (bytes === 0) return "0 Bytes";
4176
+ const k = 1024;
4177
+ const sizes = [
4178
+ "Bytes",
4179
+ "KB",
4180
+ "MB",
4181
+ "GB"
4182
+ ];
4183
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
4184
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
4185
+ };
4186
+ const FileUpload = ({ label, files = [], onFilesChange, onFileAdd, onFileRemove, accept, multiple = false, maxFileSize, maxFiles, disabled = false, dropzoneText = "Drag and drop files here, or click to browse", hint, showProgress = true, className, ...props }) => {
4187
+ const [isDragOver, setIsDragOver] = useState(false);
4188
+ const [error, setError] = useState(null);
4189
+ const inputRef = useRef(null);
4190
+ const validateFile = (file) => {
4191
+ if (maxFileSize && file.size > maxFileSize) {
4192
+ return `File size exceeds ${formatFileSize(maxFileSize)}`;
4193
+ }
4194
+ if (accept) {
4195
+ const acceptedTypes = accept.split(",").map((type) => type.trim());
4196
+ const isAccepted = acceptedTypes.some((type) => {
4197
+ if (type.includes("*")) {
4198
+ return file.type.startsWith(type.replace("/*", ""));
4199
+ }
4200
+ return file.type === type || file.name.endsWith(type);
4201
+ });
4202
+ if (!isAccepted) {
4203
+ return `File type not accepted. Allowed: ${accept}`;
4204
+ }
4205
+ }
4206
+ return null;
4207
+ };
4208
+ const handleFiles = useCallback((fileList) => {
4209
+ if (!fileList || disabled) return;
4210
+ const newFiles = [];
4211
+ const errors = [];
4212
+ Array.from(fileList).forEach((file) => {
4213
+ const validationError = validateFile(file);
4214
+ if (validationError) {
4215
+ errors.push(`${file.name}: ${validationError}`);
4216
+ } else {
4217
+ newFiles.push(file);
4218
+ }
4219
+ });
4220
+ if (maxFiles && files.length + newFiles.length > maxFiles) {
4221
+ errors.push(`Maximum ${maxFiles} files allowed`);
4222
+ newFiles.splice(maxFiles - files.length);
4223
+ }
4224
+ if (errors.length > 0) {
4225
+ setError(errors.join(", "));
4226
+ } else {
4227
+ setError(null);
4228
+ }
4229
+ if (newFiles.length > 0) {
4230
+ onFileAdd?.(newFiles);
4231
+ }
4232
+ }, [
4233
+ disabled,
4234
+ files.length,
4235
+ maxFileSize,
4236
+ maxFiles,
4237
+ accept,
4238
+ onFileAdd
4239
+ ]);
4240
+ const handleDragOver = (e) => {
4241
+ e.preventDefault();
4242
+ if (!disabled) {
4243
+ setIsDragOver(true);
4244
+ }
4245
+ };
4246
+ const handleDragLeave = (e) => {
4247
+ e.preventDefault();
4248
+ setIsDragOver(false);
4249
+ };
4250
+ const handleDrop = (e) => {
4251
+ e.preventDefault();
4252
+ setIsDragOver(false);
4253
+ handleFiles(e.dataTransfer.files);
4254
+ };
4255
+ const handleClick = () => {
4256
+ if (!disabled) {
4257
+ inputRef.current?.click();
4258
+ }
4259
+ };
4260
+ const handleInputChange = (e) => {
4261
+ handleFiles(e.target.files);
4262
+ e.target.value = "";
4263
+ };
4264
+ const handleRemove = (fileId) => {
4265
+ onFileRemove?.(fileId);
4266
+ };
4267
+ const getVariant = () => {
4268
+ if (disabled) return "disabled";
4269
+ if (error) return "error";
4270
+ if (isDragOver) return "dragOver";
4271
+ return "default";
4272
+ };
4273
+ return /* @__PURE__ */ React.createElement(Box, {
4274
+ className: clsx(fileUploadContainer, className),
4275
+ ...props
4276
+ }, label && /* @__PURE__ */ React.createElement(Box, {
4277
+ as: "label",
4278
+ className: fileUploadLabel
4279
+ }, label), /* @__PURE__ */ React.createElement(Box, {
4280
+ as: "div",
4281
+ className: clsx(fileUploadDropzone, fileUploadDropzoneVariants[getVariant()]),
4282
+ onDragOver: handleDragOver,
4283
+ onDragLeave: handleDragLeave,
4284
+ onDrop: handleDrop,
4285
+ onClick: handleClick,
4286
+ role: "button",
4287
+ tabIndex: disabled ? -1 : 0,
4288
+ "aria-disabled": disabled
4289
+ }, /* @__PURE__ */ React.createElement(Box, {
4290
+ className: fileUploadIcon,
4291
+ "aria-hidden": "true"
4292
+ }, /* @__PURE__ */ React.createElement("svg", {
4293
+ width: "48",
4294
+ height: "48",
4295
+ viewBox: "0 0 24 24",
4296
+ fill: "none",
4297
+ stroke: "currentColor",
4298
+ strokeWidth: "2"
4299
+ }, /* @__PURE__ */ React.createElement("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), /* @__PURE__ */ React.createElement("polyline", { points: "17,8 12,3 7,8" }), /* @__PURE__ */ React.createElement("line", {
4300
+ x1: "12",
4301
+ y1: "3",
4302
+ x2: "12",
4303
+ y2: "15"
4304
+ }))), /* @__PURE__ */ React.createElement(Box, {
4305
+ as: "p",
4306
+ className: fileUploadText
4307
+ }, dropzoneText), hint && /* @__PURE__ */ React.createElement(Box, {
4308
+ as: "p",
4309
+ className: fileUploadHint
4310
+ }, hint), /* @__PURE__ */ React.createElement(Box, {
4311
+ as: "input",
4312
+ ref: inputRef,
4313
+ type: "file",
4314
+ className: fileUploadInput,
4315
+ onChange: handleInputChange,
4316
+ accept,
4317
+ multiple,
4318
+ disabled,
4319
+ "aria-label": "File upload input"
4320
+ })), error && /* @__PURE__ */ React.createElement(Box, {
4321
+ as: "p",
4322
+ className: fileUploadError,
4323
+ role: "alert"
4324
+ }, error), files.length > 0 && /* @__PURE__ */ React.createElement(Box, {
4325
+ as: "ul",
4326
+ className: fileUploadList,
4327
+ "aria-label": "Uploaded files"
4328
+ }, files.map((file) => /* @__PURE__ */ React.createElement(Box, {
4329
+ key: file.id,
4330
+ as: "li",
4331
+ className: fileUploadItem
4332
+ }, /* @__PURE__ */ React.createElement(Box, { className: fileUploadItemInfo }, /* @__PURE__ */ React.createElement(Box, {
4333
+ as: "p",
4334
+ className: fileUploadItemName,
4335
+ title: file.name
4336
+ }, file.name), /* @__PURE__ */ React.createElement(Box, {
4337
+ as: "p",
4338
+ className: fileUploadItemSize
4339
+ }, formatFileSize(file.size), file.status === "uploading" && showProgress && " • Uploading...", file.status === "success" && " • Complete", file.status === "error" && file.errorMessage && ` • ${file.errorMessage}`), showProgress && file.status === "uploading" && /* @__PURE__ */ React.createElement(Box, { className: fileUploadProgressBar }, /* @__PURE__ */ React.createElement(Box, {
4340
+ className: clsx(fileUploadProgressFill, fileUploadProgressFillVariants[file.status]),
4341
+ style: { width: `${file.progress}%` }
4342
+ }))), /* @__PURE__ */ React.createElement(Box, {
4343
+ as: "button",
4344
+ className: fileUploadRemoveButton,
4345
+ onClick: () => handleRemove(file.id),
4346
+ type: "button",
4347
+ "aria-label": `Remove ${file.name}`
4348
+ }, "×")))));
4349
+ };
4350
+
4351
+ //#endregion
4352
+ //#region src/components/Stack/Stack.tsx
4353
+ const alignMap = {
4354
+ start: "flex-start",
4355
+ center: "center",
4356
+ end: "flex-end",
4357
+ stretch: "stretch"
4358
+ };
4359
+ const justifyMap = {
4360
+ start: "flex-start",
4361
+ center: "center",
4362
+ end: "flex-end",
4363
+ between: "space-between",
4364
+ around: "space-around",
4365
+ evenly: "space-evenly"
4366
+ };
4367
+ const Stack = forwardRef(({ direction = "column", align, justify, gap, wrap, children, className, style, ...rest }, ref) => {
4368
+ const alignItems = align ? alignMap[align] : undefined;
4369
+ const justifyContent = justify ? justifyMap[justify] : undefined;
4370
+ return /* @__PURE__ */ React.createElement(Box, {
4371
+ ref,
4372
+ display: "flex",
4373
+ flexDirection: direction,
4374
+ alignItems,
4375
+ justifyContent,
4376
+ gap,
4377
+ className,
4378
+ style: {
4379
+ flexWrap: wrap ? "wrap" : undefined,
4380
+ ...style
4381
+ },
4382
+ ...rest
4383
+ }, children);
4384
+ });
4385
+ Stack.displayName = "Stack";
4386
+
4387
+ //#endregion
4388
+ //#region src/components/Grid/Grid.tsx
4389
+ const gapMap = {
4390
+ none: "0",
4391
+ small: "0.5rem",
4392
+ medium: "1rem",
4393
+ large: "2rem"
4394
+ };
4395
+ const Grid = forwardRef(({ columns, gap = "medium", minChildWidth, children, ...props }, ref) => {
4396
+ const gapValue = gap;
4397
+ const gridStyle = {
4398
+ display: "grid",
4399
+ gap: gapMap[gapValue]
4400
+ };
4401
+ if (minChildWidth) {
4402
+ gridStyle.gridTemplateColumns = `repeat(auto-fit, minmax(${minChildWidth},1fr))`;
4403
+ } else if (columns) {
4404
+ gridStyle.gridTemplateColumns = `repeat(${columns},1fr)`;
4405
+ }
4406
+ return /* @__PURE__ */ React.createElement(Box, {
4407
+ ref,
4408
+ className: props.className,
4409
+ style: {
4410
+ ...gridStyle,
4411
+ ...props.style
4412
+ },
4413
+ ...props
4414
+ }, children);
4415
+ });
4416
+ Grid.displayName = "Grid";
4417
+
4418
+ //#endregion
4419
+ //#region src/components/Container/Container.tsx
4420
+ const sizeMap = {
4421
+ sm: "640px",
4422
+ md: "768px",
4423
+ lg: "1024px",
4424
+ xl: "1280px",
4425
+ full: "100%"
4426
+ };
4427
+ const Container = forwardRef(({ size = "lg", centerContent = true, children, className, style }, ref) => {
4428
+ const sizeValue = size;
4429
+ const containerStyle = {
4430
+ maxWidth: sizeMap[sizeValue],
4431
+ marginLeft: centerContent ? "auto" : undefined,
4432
+ marginRight: centerContent ? "auto" : undefined
4433
+ };
4434
+ return /* @__PURE__ */ React.createElement(Box, {
4435
+ ref,
4436
+ width: "100%",
4437
+ className,
4438
+ style: {
4439
+ ...containerStyle,
4440
+ ...style
4441
+ }
4442
+ }, children);
4443
+ });
4444
+ Container.displayName = "Container";
4445
+
4446
+ //#endregion
4447
+ //#region src/components/AspectRatio/AspectRatio.tsx
4448
+ const AspectRatio = forwardRef(({ ratio = "1/1", children, ...props }, ref) => {
4449
+ const aspectRatio = typeof ratio === "number" ? ratio : ratio;
4450
+ return /* @__PURE__ */ React.createElement(Box, {
4451
+ ref,
4452
+ position: "relative",
4453
+ style: {
4454
+ aspectRatio,
4455
+ overflow: "hidden"
4456
+ },
4457
+ ...props
4458
+ }, /* @__PURE__ */ React.createElement(Box, {
4459
+ position: "absolute",
4460
+ width: "100%",
4461
+ height: "100%",
4462
+ display: "flex",
4463
+ alignItems: "center",
4464
+ justifyContent: "center"
4465
+ }, children));
4466
+ });
4467
+ AspectRatio.displayName = "AspectRatio";
4468
+
4469
+ //#endregion
4470
+ //#region src/components/Collapse/styles.css.ts
4471
+ const collapseIn = keyframes({
4472
+ from: {
4473
+ height: 0,
4474
+ opacity: 0
4475
+ },
4476
+ to: {
4477
+ height: "auto",
4478
+ opacity: 1
4479
+ }
4480
+ });
4481
+ const collapseOut = keyframes({
4482
+ from: {
4483
+ height: "auto",
4484
+ opacity: 1
4485
+ },
4486
+ to: {
4487
+ height: 0,
4488
+ opacity: 0
4489
+ }
4490
+ });
4491
+ const collapseContainer = styleWithLayer({ overflow: "hidden" });
4492
+ const collapseContent = styleWithLayer({ width: "100%" });
4493
+ const collapseAnimation = styleVariants({
4494
+ in: { animation: `${collapseIn} 0.3s ease-out forwards` },
4495
+ out: { animation: `${collapseOut} 0.3s ease-out forwards` }
4496
+ });
4497
+
4498
+ //#endregion
4499
+ //#region src/components/Collapse/Collapse.tsx
4500
+ const Collapse = ({ isOpen, children, animation = "both", duration = 300, className, onAnimationEnd }) => {
4501
+ const [height, setHeight] = useState(isOpen ? undefined : 0);
4502
+ const [isAnimating, setIsAnimating] = useState(false);
4503
+ const contentRef = useRef(null);
4504
+ useEffect(() => {
4505
+ if (isOpen) {
4506
+ setIsAnimating(true);
4507
+ if (contentRef.current) {
4508
+ setHeight(contentRef.current.scrollHeight);
4509
+ }
4510
+ } else {
4511
+ setIsAnimating(true);
4512
+ setHeight(0);
4513
+ }
4514
+ }, [isOpen]);
4515
+ const handleTransitionEnd = () => {
4516
+ setIsAnimating(false);
4517
+ if (isOpen) {
4518
+ setHeight(undefined);
4519
+ }
4520
+ onAnimationEnd?.();
4521
+ };
4522
+ const getAnimationStyles = () => {
4523
+ const baseStyles = {
4524
+ transition: `height ${duration}ms ease-out, opacity ${duration}ms ease-out`,
4525
+ height: height !== undefined ? `${height}px` : undefined,
4526
+ opacity: isOpen || isAnimating ? 1 : 0
4527
+ };
4528
+ if (animation === "height") {
4529
+ return {
4530
+ ...baseStyles,
4531
+ transition: `height ${duration}ms ease-out`,
4532
+ opacity: 1
4533
+ };
4534
+ }
4535
+ if (animation === "opacity") {
4536
+ return {
4537
+ ...baseStyles,
4538
+ transition: `opacity ${duration}ms ease-out`,
4539
+ height: undefined
4540
+ };
4541
+ }
4542
+ return baseStyles;
4543
+ };
4544
+ if (!isOpen && !isAnimating && animation !== "opacity") {
4545
+ return null;
4546
+ }
4547
+ return /* @__PURE__ */ React.createElement(Box, {
4548
+ className: clsx(collapseContainer, className),
4549
+ style: getAnimationStyles(),
4550
+ onTransitionEnd: handleTransitionEnd,
4551
+ "aria-hidden": !isOpen
4552
+ }, /* @__PURE__ */ React.createElement(Box, {
4553
+ ref: contentRef,
4554
+ className: collapseContent
4555
+ }, children));
4556
+ };
4557
+
4558
+ //#endregion
4559
+ //#region src/components/VisuallyHidden/styles.css.ts
4560
+ const visuallyHidden = styleWithLayer({
4561
+ position: "absolute",
4562
+ width: "1px",
4563
+ height: "1px",
4564
+ padding: 0,
4565
+ margin: "-1px",
4566
+ overflow: "hidden",
4567
+ clip: "rect(0, 0, 0, 0)",
4568
+ whiteSpace: "nowrap",
4569
+ border: 0
4570
+ });
4571
+
4572
+ //#endregion
4573
+ //#region src/components/VisuallyHidden/VisuallyHidden.tsx
4574
+ const VisuallyHidden = ({ children, as: Component = "span", ...props }) => {
4575
+ return React.createElement(Component, {
4576
+ className: visuallyHidden,
4577
+ ...props
4578
+ }, children);
4579
+ };
4580
+
4581
+ //#endregion
4582
+ //#region src/components/EmptyState/styles.css.ts
4583
+ const emptyState = styleWithLayer({
4584
+ display: "flex",
4585
+ flexDirection: "column",
4586
+ alignItems: "center",
4587
+ justifyContent: "center",
4588
+ padding: "2rem",
4589
+ textAlign: "center"
4590
+ });
4591
+ const emptyStateIcon = styleWithLayer({
4592
+ fontSize: "48px",
4593
+ marginBottom: "1rem",
4594
+ color: vars.colors.textSecondary
4595
+ });
4596
+ const emptyStateTitle = styleWithLayer({
4597
+ fontSize: "18px",
4598
+ fontWeight: "600",
4599
+ color: vars.colors.textPrimary,
4600
+ margin: "0 0 0.5rem 0"
4601
+ });
4602
+ const emptyStateDescription = styleWithLayer({
4603
+ fontSize: "14px",
4604
+ color: vars.colors.textSecondary,
4605
+ margin: "0 0 1rem 0",
4606
+ maxWidth: "400px"
4607
+ });
4608
+ const emptyStateAction = styleWithLayer({ marginTop: "0.5rem" });
4609
+
4610
+ //#endregion
4611
+ //#region src/components/EmptyState/EmptyState.tsx
4612
+ const EmptyState = ({ icon, title, description, action, className }) => {
4613
+ return /* @__PURE__ */ React.createElement(Box, {
4614
+ className: clsx(emptyState, className),
4615
+ role: "status"
4616
+ }, icon && /* @__PURE__ */ React.createElement(Box, {
4617
+ className: emptyStateIcon,
4618
+ "aria-hidden": "true"
4619
+ }, icon), title && /* @__PURE__ */ React.createElement(Box, {
4620
+ as: "h3",
4621
+ className: emptyStateTitle
4622
+ }, title), description && /* @__PURE__ */ React.createElement(Box, {
4623
+ as: "p",
4624
+ className: emptyStateDescription
4625
+ }, description), action && /* @__PURE__ */ React.createElement(Box, { className: emptyStateAction }, action));
4626
+ };
4627
+
4628
+ //#endregion
4629
+ //#region src/components/Separator/styles.css.ts
4630
+ const separator = styleWithLayer({
4631
+ border: "none",
4632
+ margin: 0,
4633
+ flexShrink: 0
4634
+ });
4635
+ const separatorOrientation = styleVariants({
4636
+ horizontal: {
4637
+ width: "100%",
4638
+ height: "1px",
4639
+ backgroundColor: vars.colors.borderDefault
4640
+ },
4641
+ vertical: {
4642
+ width: "1px",
4643
+ height: "100%",
4644
+ backgroundColor: vars.colors.borderDefault
4645
+ }
4646
+ });
4647
+ const separatorSize = styleVariants({
4648
+ small: {},
4649
+ medium: {},
4650
+ large: {}
4651
+ });
4652
+ const separatorDecorative = styleWithLayer({ backgroundColor: vars.colors.borderMuted });
4653
+
4654
+ //#endregion
4655
+ //#region src/components/Separator/Separator.tsx
4656
+ const Separator = ({ orientation = "horizontal", decorative = false, className, ...props }) => {
4657
+ return /* @__PURE__ */ React.createElement(Box, {
4658
+ as: "hr",
4659
+ className: clsx(separator, separatorOrientation[orientation], className),
4660
+ "aria-hidden": decorative,
4661
+ ...props
4662
+ });
4663
+ };
4664
+
4665
+ //#endregion
4666
+ //#region src/components/ScrollArea/styles.css.ts
4667
+ const scrollArea = styleWithLayer({
4668
+ overflow: "auto",
4669
+ scrollbarWidth: "thin",
4670
+ scrollbarColor: `${vars.colors.borderDefault} ${vars.colors.backgroundMuted}`
4671
+ });
4672
+ const scrollAreaOrientation = styleVariants({
4673
+ vertical: {
4674
+ overflowX: "hidden",
4675
+ overflowY: "auto"
4676
+ },
4677
+ horizontal: {
4678
+ overflowX: "auto",
4679
+ overflowY: "hidden"
4680
+ },
4681
+ both: { overflow: "auto" }
4682
+ });
4683
+ const scrollAreaViewport = styleWithLayer({
4684
+ width: "100%",
4685
+ height: "100%"
4686
+ });
4687
+
4688
+ //#endregion
4689
+ //#region src/components/ScrollArea/ScrollArea.tsx
4690
+ const ScrollArea = ({ children, orientation = "vertical", maxHeight, maxWidth, className, ...props }) => {
4691
+ const style = {
4692
+ maxHeight,
4693
+ maxWidth
4694
+ };
4695
+ return /* @__PURE__ */ React.createElement(Box, {
4696
+ className: clsx(scrollArea, scrollAreaOrientation[orientation], className),
4697
+ style,
4698
+ ...props
4699
+ }, /* @__PURE__ */ React.createElement(Box, { className: scrollAreaViewport }, children));
4700
+ };
4701
+
4702
+ //#endregion
4703
+ //#region src/components/Kbd/styles.css.ts
4704
+ const kbd = styleWithLayer({
4705
+ display: "inline-block",
4706
+ padding: "0.125rem 0.375rem",
4707
+ fontFamily: "monospace",
4708
+ fontSize: "0.85em",
4709
+ fontWeight: "600",
4710
+ lineHeight: "1.5",
4711
+ color: vars.colors.textPrimary,
4712
+ backgroundColor: vars.colors.backgroundMuted,
4713
+ border: `1px solid ${vars.colors.borderDefault}`,
4714
+ borderRadius: "4px",
4715
+ boxShadow: "0 2px 0 rgba(0, 0, 0, 0.1)",
4716
+ whiteSpace: "nowrap"
4717
+ });
4718
+
4719
+ //#endregion
4720
+ //#region src/components/Kbd/Kbd.tsx
4721
+ const Kbd = ({ children, className, ...props }) => {
4722
+ return /* @__PURE__ */ React.createElement("kbd", {
4723
+ className: `${kbd} ${className || ""}`,
4724
+ ...props
4725
+ }, children);
4726
+ };
4727
+
4728
+ //#endregion
4729
+ export { AccordionComponent as Accordion, Alert, AspectRatio, Avatar, Badge, Box, Breadcrumb, Button, Card, Checkbox, Collapse, Combobox, Container, Divider, Drawer, DropdownMenu, EmptyState, FileUpload, Form, FormInput, Grid, Header, IconComponent as Icon, Input, Kbd, List, ListItem, Modal, Navbar, NavbarItem, NumberInput, P, Pagination, Popover, Progress, RadioComponent as Radio, ScrollArea, Select, Separator, Skeleton, Spinner, Stack, Stepper, Table, TabsComponent as Tabs, TagComponent as Tag, TextArea, Toast, ToastProvider, Toggle, Tooltip, VisuallyHidden, useToast };