analytica-frontend-lib 1.0.91 → 1.0.92

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 (298) hide show
  1. package/dist/Accordation/index.d.mts +12 -0
  2. package/dist/Accordation/index.d.ts +12 -1
  3. package/dist/Accordation/index.js +1 -0
  4. package/dist/Accordation/index.js.map +1 -0
  5. package/dist/Accordation/index.mjs +1 -0
  6. package/dist/Accordation/index.mjs.map +1 -0
  7. package/dist/Alert/index.d.mts +13 -0
  8. package/dist/Alert/index.d.ts +13 -1
  9. package/dist/Alert/index.js +1 -0
  10. package/dist/Alert/index.js.map +1 -0
  11. package/dist/Alert/index.mjs +1 -0
  12. package/dist/Alert/index.mjs.map +1 -0
  13. package/dist/AlertDialog/index.d.mts +36 -0
  14. package/dist/AlertDialog/index.d.ts +36 -1
  15. package/dist/AlertDialog/index.js +1 -0
  16. package/dist/AlertDialog/index.js.map +1 -0
  17. package/dist/AlertDialog/index.mjs +1 -0
  18. package/dist/AlertDialog/index.mjs.map +1 -0
  19. package/dist/Alternative/index.d.mts +81 -0
  20. package/dist/Alternative/index.d.ts +81 -1
  21. package/dist/Alternative/index.js +1 -0
  22. package/dist/Alternative/index.js.map +1 -0
  23. package/dist/Alternative/index.mjs +1 -0
  24. package/dist/Alternative/index.mjs.map +1 -0
  25. package/dist/Auth/AuthProvider/index.d.mts +3 -0
  26. package/dist/Auth/AuthProvider/index.d.ts +3 -1
  27. package/dist/Auth/AuthProvider/index.js +1 -0
  28. package/dist/Auth/AuthProvider/index.js.map +1 -0
  29. package/dist/Auth/AuthProvider/index.mjs +1 -0
  30. package/dist/Auth/AuthProvider/index.mjs.map +1 -0
  31. package/dist/Auth/ProtectedRoute/index.d.mts +3 -0
  32. package/dist/Auth/ProtectedRoute/index.d.ts +3 -1
  33. package/dist/Auth/ProtectedRoute/index.js +1 -0
  34. package/dist/Auth/ProtectedRoute/index.js.map +1 -0
  35. package/dist/Auth/ProtectedRoute/index.mjs +1 -0
  36. package/dist/Auth/ProtectedRoute/index.mjs.map +1 -0
  37. package/dist/Auth/PublicRoute/index.d.mts +3 -0
  38. package/dist/Auth/PublicRoute/index.d.ts +3 -1
  39. package/dist/Auth/PublicRoute/index.js +1 -0
  40. package/dist/Auth/PublicRoute/index.js.map +1 -0
  41. package/dist/Auth/PublicRoute/index.mjs +1 -0
  42. package/dist/Auth/PublicRoute/index.mjs.map +1 -0
  43. package/dist/Auth/getRootDomain/index.d.mts +3 -0
  44. package/dist/Auth/getRootDomain/index.d.ts +3 -1
  45. package/dist/Auth/getRootDomain/index.js +1 -0
  46. package/dist/Auth/getRootDomain/index.js.map +1 -0
  47. package/dist/Auth/getRootDomain/index.mjs +1 -0
  48. package/dist/Auth/getRootDomain/index.mjs.map +1 -0
  49. package/dist/Auth/index.d.mts +312 -0
  50. package/dist/Auth/index.d.ts +312 -1
  51. package/dist/Auth/index.js +1 -0
  52. package/dist/Auth/index.js.map +1 -0
  53. package/dist/Auth/index.mjs +1 -0
  54. package/dist/Auth/index.mjs.map +1 -0
  55. package/dist/Auth/useApiConfig/index.d.mts +43 -0
  56. package/dist/Auth/useApiConfig/index.d.ts +43 -1
  57. package/dist/Auth/useApiConfig/index.js +1 -0
  58. package/dist/Auth/useApiConfig/index.js.map +1 -0
  59. package/dist/Auth/useApiConfig/index.mjs +1 -0
  60. package/dist/Auth/useApiConfig/index.mjs.map +1 -0
  61. package/dist/Auth/useAuth/index.d.mts +3 -0
  62. package/dist/Auth/useAuth/index.d.ts +3 -1
  63. package/dist/Auth/useAuth/index.js +1 -0
  64. package/dist/Auth/useAuth/index.js.map +1 -0
  65. package/dist/Auth/useAuth/index.mjs +1 -0
  66. package/dist/Auth/useAuth/index.mjs.map +1 -0
  67. package/dist/Auth/useAuthGuard/index.d.mts +3 -0
  68. package/dist/Auth/useAuthGuard/index.d.ts +3 -1
  69. package/dist/Auth/useAuthGuard/index.js +1 -0
  70. package/dist/Auth/useAuthGuard/index.js.map +1 -0
  71. package/dist/Auth/useAuthGuard/index.mjs +1 -0
  72. package/dist/Auth/useAuthGuard/index.mjs.map +1 -0
  73. package/dist/Auth/useRouteAuth/index.d.mts +3 -0
  74. package/dist/Auth/useRouteAuth/index.d.ts +3 -1
  75. package/dist/Auth/useRouteAuth/index.js +1 -0
  76. package/dist/Auth/useRouteAuth/index.js.map +1 -0
  77. package/dist/Auth/useRouteAuth/index.mjs +1 -0
  78. package/dist/Auth/useRouteAuth/index.mjs.map +1 -0
  79. package/dist/Auth/useUrlAuthentication/index.d.mts +58 -0
  80. package/dist/Auth/useUrlAuthentication/index.d.ts +58 -1
  81. package/dist/Auth/useUrlAuthentication/index.js +1 -0
  82. package/dist/Auth/useUrlAuthentication/index.js.map +1 -0
  83. package/dist/Auth/useUrlAuthentication/index.mjs +1 -0
  84. package/dist/Auth/useUrlAuthentication/index.mjs.map +1 -0
  85. package/dist/Auth/withAuth/index.d.mts +3 -0
  86. package/dist/Auth/withAuth/index.d.ts +3 -1
  87. package/dist/Auth/withAuth/index.js +1 -0
  88. package/dist/Auth/withAuth/index.js.map +1 -0
  89. package/dist/Auth/withAuth/index.mjs +1 -0
  90. package/dist/Auth/withAuth/index.mjs.map +1 -0
  91. package/dist/Auth/zustandAuthAdapter/index.d.mts +75 -0
  92. package/dist/Auth/zustandAuthAdapter/index.d.ts +75 -1
  93. package/dist/Auth/zustandAuthAdapter/index.js +1 -0
  94. package/dist/Auth/zustandAuthAdapter/index.js.map +1 -0
  95. package/dist/Auth/zustandAuthAdapter/index.mjs +1 -0
  96. package/dist/Auth/zustandAuthAdapter/index.mjs.map +1 -0
  97. package/dist/Badge/index.d.mts +46 -0
  98. package/dist/Badge/index.d.ts +46 -1
  99. package/dist/Badge/index.js +1 -0
  100. package/dist/Badge/index.js.map +1 -0
  101. package/dist/Badge/index.mjs +1 -0
  102. package/dist/Badge/index.mjs.map +1 -0
  103. package/dist/Button/index.d.mts +45 -0
  104. package/dist/Button/index.d.ts +45 -1
  105. package/dist/Button/index.js +1 -0
  106. package/dist/Button/index.js.map +1 -0
  107. package/dist/Button/index.mjs +1 -0
  108. package/dist/Button/index.mjs.map +1 -0
  109. package/dist/Calendar/index.d.mts +60 -0
  110. package/dist/Calendar/index.d.ts +60 -1
  111. package/dist/Calendar/index.js +1 -0
  112. package/dist/Calendar/index.js.map +1 -0
  113. package/dist/Calendar/index.mjs +1 -0
  114. package/dist/Calendar/index.mjs.map +1 -0
  115. package/dist/Card/index.d.mts +150 -0
  116. package/dist/Card/index.d.ts +150 -1
  117. package/dist/Card/index.js +1 -0
  118. package/dist/Card/index.js.map +1 -0
  119. package/dist/Card/index.mjs +1 -0
  120. package/dist/Card/index.mjs.map +1 -0
  121. package/dist/CheckBox/index.d.mts +74 -0
  122. package/dist/CheckBox/index.d.ts +74 -1
  123. package/dist/CheckBox/index.js +1 -0
  124. package/dist/CheckBox/index.js.map +1 -0
  125. package/dist/CheckBox/index.mjs +1 -0
  126. package/dist/CheckBox/index.mjs.map +1 -0
  127. package/dist/Chips/index.d.mts +41 -0
  128. package/dist/Chips/index.d.ts +41 -1
  129. package/dist/Chips/index.js +1 -0
  130. package/dist/Chips/index.js.map +1 -0
  131. package/dist/Chips/index.mjs +1 -0
  132. package/dist/Chips/index.mjs.map +1 -0
  133. package/dist/Divider/index.d.mts +32 -0
  134. package/dist/Divider/index.d.ts +32 -1
  135. package/dist/Divider/index.js +1 -0
  136. package/dist/Divider/index.js.map +1 -0
  137. package/dist/Divider/index.mjs +1 -0
  138. package/dist/Divider/index.mjs.map +1 -0
  139. package/dist/DropdownMenu/index.d.mts +68 -0
  140. package/dist/DropdownMenu/index.d.ts +68 -1
  141. package/dist/DropdownMenu/index.js +1 -0
  142. package/dist/DropdownMenu/index.js.map +1 -0
  143. package/dist/DropdownMenu/index.mjs +1 -0
  144. package/dist/DropdownMenu/index.mjs.map +1 -0
  145. package/dist/IconButton/index.d.mts +76 -0
  146. package/dist/IconButton/index.d.ts +76 -1
  147. package/dist/IconButton/index.js +1 -0
  148. package/dist/IconButton/index.js.map +1 -0
  149. package/dist/IconButton/index.mjs +1 -0
  150. package/dist/IconButton/index.mjs.map +1 -0
  151. package/dist/IconRoundedButton/index.d.mts +34 -0
  152. package/dist/IconRoundedButton/index.d.ts +34 -1
  153. package/dist/IconRoundedButton/index.js +1 -0
  154. package/dist/IconRoundedButton/index.js.map +1 -0
  155. package/dist/IconRoundedButton/index.mjs +1 -0
  156. package/dist/IconRoundedButton/index.mjs.map +1 -0
  157. package/dist/Input/index.d.mts +27 -0
  158. package/dist/Input/index.d.ts +27 -1
  159. package/dist/Input/index.js +1 -0
  160. package/dist/Input/index.js.map +1 -0
  161. package/dist/Input/index.mjs +1 -0
  162. package/dist/Input/index.mjs.map +1 -0
  163. package/dist/Menu/index.d.mts +48 -0
  164. package/dist/Menu/index.d.ts +48 -1
  165. package/dist/Menu/index.js +1 -0
  166. package/dist/Menu/index.js.map +1 -0
  167. package/dist/Menu/index.mjs +1 -0
  168. package/dist/Menu/index.mjs.map +1 -0
  169. package/dist/Modal/index.d.mts +66 -0
  170. package/dist/Modal/index.d.ts +66 -1
  171. package/dist/Modal/index.js +1 -0
  172. package/dist/Modal/index.js.map +1 -0
  173. package/dist/Modal/index.mjs +1 -0
  174. package/dist/Modal/index.mjs.map +1 -0
  175. package/dist/MultipleChoice/index.d.mts +20 -0
  176. package/dist/MultipleChoice/index.d.ts +20 -1
  177. package/dist/MultipleChoice/index.js +1 -0
  178. package/dist/MultipleChoice/index.js.map +1 -0
  179. package/dist/MultipleChoice/index.mjs +1 -0
  180. package/dist/MultipleChoice/index.mjs.map +1 -0
  181. package/dist/NavButton/index.d.mts +57 -0
  182. package/dist/NavButton/index.d.ts +57 -1
  183. package/dist/NavButton/index.js +1 -0
  184. package/dist/NavButton/index.js.map +1 -0
  185. package/dist/NavButton/index.mjs +1 -0
  186. package/dist/NavButton/index.mjs.map +1 -0
  187. package/dist/NotFound/index.d.mts +58 -0
  188. package/dist/NotFound/index.d.ts +58 -1
  189. package/dist/NotFound/index.js +1 -0
  190. package/dist/NotFound/index.js.map +1 -0
  191. package/dist/NotFound/index.mjs +1 -0
  192. package/dist/NotFound/index.mjs.map +1 -0
  193. package/dist/ProgressBar/index.d.mts +95 -0
  194. package/dist/ProgressBar/index.d.ts +95 -1
  195. package/dist/ProgressBar/index.js +1 -0
  196. package/dist/ProgressBar/index.js.map +1 -0
  197. package/dist/ProgressBar/index.mjs +1 -0
  198. package/dist/ProgressBar/index.mjs.map +1 -0
  199. package/dist/ProgressCircle/index.d.mts +60 -0
  200. package/dist/ProgressCircle/index.d.ts +60 -1
  201. package/dist/ProgressCircle/index.js +1 -0
  202. package/dist/ProgressCircle/index.js.map +1 -0
  203. package/dist/ProgressCircle/index.mjs +1 -0
  204. package/dist/ProgressCircle/index.mjs.map +1 -0
  205. package/dist/Quiz/index.d.mts +57 -0
  206. package/dist/Quiz/index.d.ts +57 -1
  207. package/dist/Quiz/index.js +3 -2
  208. package/dist/Quiz/index.js.map +1 -0
  209. package/dist/Quiz/index.mjs +3 -2
  210. package/dist/Quiz/index.mjs.map +1 -0
  211. package/dist/Quiz/useQuizStore/index.d.mts +139 -0
  212. package/dist/Quiz/useQuizStore/index.d.ts +139 -1
  213. package/dist/Quiz/useQuizStore/index.js +1 -0
  214. package/dist/Quiz/useQuizStore/index.js.map +1 -0
  215. package/dist/Quiz/useQuizStore/index.mjs +1 -0
  216. package/dist/Quiz/useQuizStore/index.mjs.map +1 -0
  217. package/dist/Radio/index.d.mts +203 -0
  218. package/dist/Radio/index.d.ts +203 -1
  219. package/dist/Radio/index.js +1 -0
  220. package/dist/Radio/index.js.map +1 -0
  221. package/dist/Radio/index.mjs +1 -0
  222. package/dist/Radio/index.mjs.map +1 -0
  223. package/dist/Select/index.d.mts +58 -0
  224. package/dist/Select/index.d.ts +58 -1
  225. package/dist/Select/index.js +1 -0
  226. package/dist/Select/index.js.map +1 -0
  227. package/dist/Select/index.mjs +1 -0
  228. package/dist/Select/index.mjs.map +1 -0
  229. package/dist/SelectionButton/index.d.mts +57 -0
  230. package/dist/SelectionButton/index.d.ts +57 -1
  231. package/dist/SelectionButton/index.js +1 -0
  232. package/dist/SelectionButton/index.js.map +1 -0
  233. package/dist/SelectionButton/index.mjs +1 -0
  234. package/dist/SelectionButton/index.mjs.map +1 -0
  235. package/dist/Skeleton/index.d.mts +40 -0
  236. package/dist/Skeleton/index.d.ts +40 -1
  237. package/dist/Skeleton/index.js +1 -0
  238. package/dist/Skeleton/index.js.map +1 -0
  239. package/dist/Skeleton/index.mjs +1 -0
  240. package/dist/Skeleton/index.mjs.map +1 -0
  241. package/dist/Stepper/index.d.mts +169 -0
  242. package/dist/Stepper/index.d.ts +169 -1
  243. package/dist/Stepper/index.js +1 -0
  244. package/dist/Stepper/index.js.map +1 -0
  245. package/dist/Stepper/index.mjs +1 -0
  246. package/dist/Stepper/index.mjs.map +1 -0
  247. package/dist/Table/index.d.mts +17 -0
  248. package/dist/Table/index.d.ts +17 -1
  249. package/dist/Table/index.js +1 -0
  250. package/dist/Table/index.js.map +1 -0
  251. package/dist/Table/index.mjs +1 -0
  252. package/dist/Table/index.mjs.map +1 -0
  253. package/dist/Text/index.d.mts +58 -0
  254. package/dist/Text/index.d.ts +58 -1
  255. package/dist/Text/index.js +1 -0
  256. package/dist/Text/index.js.map +1 -0
  257. package/dist/Text/index.mjs +1 -0
  258. package/dist/Text/index.mjs.map +1 -0
  259. package/dist/TextArea/index.d.mts +70 -0
  260. package/dist/TextArea/index.d.ts +70 -1
  261. package/dist/TextArea/index.js +1 -0
  262. package/dist/TextArea/index.js.map +1 -0
  263. package/dist/TextArea/index.mjs +1 -0
  264. package/dist/TextArea/index.mjs.map +1 -0
  265. package/dist/Toast/ToastStore/index.d.mts +19 -0
  266. package/dist/Toast/ToastStore/index.d.ts +19 -1
  267. package/dist/Toast/ToastStore/index.js +1 -0
  268. package/dist/Toast/ToastStore/index.js.map +1 -0
  269. package/dist/Toast/ToastStore/index.mjs +1 -0
  270. package/dist/Toast/ToastStore/index.mjs.map +1 -0
  271. package/dist/Toast/Toaster/index.d.mts +16 -0
  272. package/dist/Toast/Toaster/index.d.ts +16 -1
  273. package/dist/Toast/Toaster/index.js +1 -0
  274. package/dist/Toast/Toaster/index.js.map +1 -0
  275. package/dist/Toast/Toaster/index.mjs +1 -0
  276. package/dist/Toast/Toaster/index.mjs.map +1 -0
  277. package/dist/Toast/index.d.mts +17 -0
  278. package/dist/Toast/index.d.ts +17 -1
  279. package/dist/Toast/index.js +1 -0
  280. package/dist/Toast/index.js.map +1 -0
  281. package/dist/Toast/index.mjs +1 -0
  282. package/dist/Toast/index.mjs.map +1 -0
  283. package/dist/index.css +5 -4
  284. package/dist/index.css.map +1 -0
  285. package/dist/index.d.mts +42 -2142
  286. package/dist/index.d.ts +42 -2142
  287. package/dist/index.js +3 -23
  288. package/dist/index.js.map +1 -0
  289. package/dist/index.mjs +3 -20
  290. package/dist/index.mjs.map +1 -0
  291. package/dist/styles.css +5 -4
  292. package/dist/styles.css.map +1 -0
  293. package/dist/styles.d.mts +2 -0
  294. package/dist/styles.d.ts +2 -0
  295. package/package.json +4 -5
  296. package/dist/CheckBox/CheckboxList/index.d.ts +0 -1
  297. package/dist/CheckBox/CheckboxList/index.js +0 -429
  298. package/dist/CheckBox/CheckboxList/index.mjs +0 -415
package/dist/index.d.ts CHANGED
@@ -1,400 +1,46 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ export { default as Text } from './Text/index.js';
2
+ export { default as Button } from './Button/index.js';
3
+ export { default as Badge } from './Badge/index.js';
4
+ export { default as Alert } from './Alert/index.js';
5
+ export { default as IconButton } from './IconButton/index.js';
6
+ export { default as IconRoundedButton } from './IconRoundedButton/index.js';
7
+ export { default as NavButton } from './NavButton/index.js';
8
+ export { default as SelectionButton } from './SelectionButton/index.js';
9
+ export { default as Table } from './Table/index.js';
10
+ export { default as CheckBox } from './CheckBox/index.js';
2
11
  import * as react from 'react';
3
- import { ElementType, ReactNode, ComponentPropsWithoutRef, ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, HtmlHTMLAttributes, ComponentType } from 'react';
4
- import * as zustand from 'zustand';
12
+ import { ReactNode, HTMLAttributes, InputHTMLAttributes } from 'react';
5
13
  import { StoreApi } from 'zustand';
6
-
7
- /**
8
- * Base text component props
9
- */
10
- type BaseTextProps = {
11
- /** Content to be displayed */
12
- children?: ReactNode;
13
- /** Text size variant */
14
- size?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl';
15
- /** Font weight variant */
16
- weight?: 'hairline' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
17
- /** Color variant - white for light backgrounds, black for dark backgrounds */
18
- color?: string;
19
- /** Additional CSS classes to apply */
20
- className?: string;
21
- };
22
- /**
23
- * Polymorphic text component props that ensures type safety based on the 'as' prop
24
- */
25
- type TextProps<T extends ElementType = 'p'> = BaseTextProps & {
26
- /** HTML tag to render */
27
- as?: T;
28
- } & Omit<ComponentPropsWithoutRef<T>, keyof BaseTextProps>;
29
- /**
30
- * Text component for Analytica Ensino platforms
31
- *
32
- * A flexible polymorphic text component with multiple sizes, weights, and colors.
33
- * Automatically adapts to dark and light themes with full type safety.
34
- *
35
- * @param children - The content to display
36
- * @param size - The text size variant (2xs, xs, sm, md, lg, xl, 2xl, 3xl, 4xl, 5xl, 6xl)
37
- * @param weight - The font weight variant (hairline, light, normal, medium, semibold, bold, extrabold, black)
38
- * @param color - The color variant - adapts to theme
39
- * @param as - The HTML tag to render - determines allowed attributes via TypeScript
40
- * @param className - Additional CSS classes
41
- * @param props - HTML attributes valid for the chosen tag only
42
- * @returns A styled text element with type-safe attributes
43
- *
44
- * @example
45
- * ```tsx
46
- * <Text size="lg" weight="bold" color="text-info-800">
47
- * This is a large, bold text
48
- * </Text>
49
- *
50
- * <Text as="a" href="/link" target="_blank">
51
- * Link with type-safe anchor attributes
52
- * </Text>
53
- *
54
- * <Text as="button" onClick={handleClick} disabled>
55
- * Button with type-safe button attributes
56
- * </Text>
57
- * ```
58
- */
59
- declare const Text: <T extends ElementType = "p">({ children, size, weight, color, as, className, ...props }: TextProps<T>) => react_jsx_runtime.JSX.Element;
60
-
61
- /**
62
- * Button component props interface
63
- */
64
- type ButtonProps = {
65
- /** Content to be displayed inside the button */
66
- children: ReactNode;
67
- /** Ícone à esquerda do texto */
68
- iconLeft?: ReactNode;
69
- /** Ícone à direita do texto */
70
- iconRight?: ReactNode;
71
- /** Size of the button */
72
- size?: 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
73
- /** Visual variant of the button */
74
- variant?: 'solid' | 'outline' | 'link';
75
- /** Action type of the button */
76
- action?: 'primary' | 'positive' | 'negative';
77
- /** Additional CSS classes to apply */
78
- className?: string;
79
- } & ButtonHTMLAttributes<HTMLButtonElement>;
80
- /**
81
- * Button component for Analytica Ensino platforms
82
- *
83
- * A flexible button component with multiple variants, sizes and actions.
84
- *
85
- * @param children - The content to display inside the button
86
- * @param size - The size variant (extra-small, small, medium, large, extra-large)
87
- * @param variant - The visual style variant (solid, outline, link)
88
- * @param action - The action type (primary, positive, negative)
89
- * @param className - Additional CSS classes
90
- * @param props - All other standard button HTML attributes
91
- * @returns A styled button element
92
- *
93
- * @example
94
- * ```tsx
95
- * <Button variant="solid" action="primary" size="medium" onClick={() => console.log('clicked')}>
96
- * Click me
97
- * </Button>
98
- * ```
99
- */
100
- declare const Button: ({ children, iconLeft, iconRight, size, variant, action, className, disabled, type, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
101
-
102
- /**
103
- * Badge component props interface
104
- */
105
- type BadgeProps = {
106
- /** Content to be displayed inside the badge */
107
- children?: ReactNode;
108
- /** Ícone à direita do texto */
109
- iconRight?: ReactNode;
110
- /** Ícone à esquerda do texto */
111
- iconLeft?: ReactNode;
112
- /** Size of the badge */
113
- size?: 'small' | 'medium' | 'large';
114
- /** Visual variant of the badge */
115
- variant?: 'solid' | 'outlined' | 'exams' | 'examsOutlined' | 'resultStatus' | 'notification';
116
- /** Action type of the badge */
117
- action?: 'error' | 'warning' | 'success' | 'info' | 'muted' | 'exam1' | 'exam2' | 'exam3' | 'exam4' | 'positive' | 'negative';
118
- /** Additional CSS classes to apply */
119
- className?: string;
120
- notificationActive?: boolean;
121
- } & HTMLAttributes<HTMLDivElement>;
122
- /**
123
- * Badge component for Analytica Ensino platforms
124
- *
125
- * A flexible button component with multiple variants, sizes and actions.
126
- *
127
- * @param children - The content to display inside the badge
128
- * @param size - The size variant (extra-small, small, medium, large, extra-large)
129
- * @param variant - The visual style variant (solid, outline, link)
130
- * @param action - The action type (primary, positive, negative)
131
- * @param className - Additional CSS classes
132
- * @param props - All other standard div HTML attributes
133
- * @returns A styled badge element
134
- *
135
- * @example
136
- * ```tsx
137
- * <Badge variant="solid" action="info" size="medium">
138
- * Information
139
- * </Badge>
140
- * ```
141
- */
142
- declare const Badge: ({ children, iconLeft, iconRight, size, variant, action, className, notificationActive, ...props }: BadgeProps) => react_jsx_runtime.JSX.Element;
143
-
144
- type AlertProps = {
145
- title?: string;
146
- description: string;
147
- variant?: 'solid' | 'outline';
148
- action?: 'default' | 'info' | 'success' | 'warning' | 'error';
149
- className?: string;
150
- } & HTMLAttributes<HTMLDivElement>;
151
- declare const Alert: ({ variant, title, description, action, className, ...props }: AlertProps) => react_jsx_runtime.JSX.Element;
152
-
153
- /**
154
- * IconButton component for Analytica Ensino platforms
155
- *
156
- * Um botão compacto apenas com ícone, ideal para menus dropdown,
157
- * barras de ferramentas e ações secundárias.
158
- * Oferece dois tamanhos com estilo consistente.
159
- * Estado ativo permanece até ser clicado novamente ou outro botão ser ativado.
160
- * Suporta forwardRef para acesso programático ao elemento DOM.
161
- *
162
- * @param icon - O ícone a ser exibido no botão
163
- * @param size - Tamanho do botão (sm, md)
164
- * @param active - Estado ativo/selecionado do botão
165
- * @param className - Classes CSS adicionais
166
- * @param props - Todos os outros atributos HTML padrão de button
167
- * @returns Um elemento button compacto estilizado apenas com ícone
168
- *
169
- * @example
170
- * ```tsx
171
- * <IconButton
172
- * icon={<MoreVerticalIcon />}
173
- * size="sm"
174
- * onClick={() => openMenu()}
175
- * />
176
- * ```
177
- *
178
- * @example
179
- * ```tsx
180
- * // Botão ativo em uma barra de ferramentas - permanece ativo até outro clique
181
- * <IconButton
182
- * icon={<BoldIcon />}
183
- * active={isBold}
184
- * onClick={toggleBold}
185
- * />
186
- * ```
187
- *
188
- * @example
189
- * ```tsx
190
- * // Usando ref para controle programático
191
- * const buttonRef = useRef<HTMLButtonElement>(null);
192
- *
193
- * <IconButton
194
- * ref={buttonRef}
195
- * icon={<EditIcon />}
196
- * size="md"
197
- * onClick={() => startEditing()}
198
- * />
199
- * ```
200
- */
201
- declare const IconButton: react.ForwardRefExoticComponent<{
202
- /** Ícone a ser exibido no botão */
203
- icon: ReactNode;
204
- /** Tamanho do botão */
205
- size?: "sm" | "md";
206
- /** Estado de seleção/ativo do botão - permanece ativo até ser clicado novamente ou outro botão ser ativado */
207
- active?: boolean;
208
- /** Additional CSS classes to apply */
209
- className?: string;
210
- } & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
211
-
212
- /**
213
- * IconRoundedButton component props interface
214
- */
215
- type IconRoundedButtonProps = {
216
- /** Ícone a ser exibido no botão */
217
- icon: ReactNode;
218
- /** Additional CSS classes to apply */
219
- className?: string;
220
- } & ButtonHTMLAttributes<HTMLButtonElement>;
221
- /**
222
- * IconRoundedButton component for Analytica Ensino platforms
223
- *
224
- * Um botão redondo simples que exibe apenas um ícone.
225
- * Ideal para ações como navegação, fechar, editar, etc.
226
- *
227
- * @param icon - O ícone a ser exibido no botão
228
- * @param className - Classes CSS adicionais
229
- * @param props - Todos os outros atributos HTML padrão de button
230
- * @returns Um elemento button estilizado e redondo
231
- *
232
- * @example
233
- * ```tsx
234
- * <IconRoundedButton
235
- * icon={<ChevronRightIcon />}
236
- * onClick={() => console.log('clicked')}
237
- * />
238
- * ```
239
- */
240
- declare const IconRoundedButton: ({ icon, className, disabled, ...props }: IconRoundedButtonProps) => react_jsx_runtime.JSX.Element;
241
-
242
- /**
243
- * NavButton component for Analytica Ensino platforms
244
- *
245
- * Um botão de navegação com ícone e texto para navegação principal.
246
- * Ideal para menus de navegação, sidebar, tabs de navegação, etc.
247
- * Suporta forwardRef para acesso programático ao elemento DOM.
248
- *
249
- * @param icon - O ícone a ser exibido no botão
250
- * @param label - O texto/label a ser exibido
251
- * @param selected - Estado de seleção do botão
252
- * @param className - Classes CSS adicionais
253
- * @param props - Todos os outros atributos HTML padrão de button
254
- * @returns Um elemento button estilizado para navegação
255
- *
256
- * @example
257
- * ```tsx
258
- * <NavButton
259
- * icon={<HomeIcon />}
260
- * label="Início"
261
- * selected={false}
262
- * onClick={() => navigate('/')}
263
- * />
264
- * ```
265
- *
266
- * @example
267
- * ```tsx
268
- * // Usando ref para foco programático
269
- * const buttonRef = useRef<HTMLButtonElement>(null);
270
- *
271
- * const handleFocus = () => {
272
- * buttonRef.current?.focus();
273
- * };
274
- *
275
- * <NavButton
276
- * ref={buttonRef}
277
- * icon={<HomeIcon />}
278
- * label="Dashboard"
279
- * selected={isActive}
280
- * onClick={() => setActiveTab('dashboard')}
281
- * />
282
- * ```
283
- */
284
- declare const NavButton: react.ForwardRefExoticComponent<{
285
- /** Ícone a ser exibido no botão */
286
- icon: ReactNode;
287
- /** Texto/label a ser exibido ao lado do ícone */
288
- label: string;
289
- /** Estado de seleção do botão */
290
- selected?: boolean;
291
- /** Additional CSS classes to apply */
292
- className?: string;
293
- } & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
294
-
295
- /**
296
- * SelectionButton component for Analytica Ensino platforms
297
- *
298
- * Um botão com ícone e texto para ações e navegação com estado de seleção.
299
- * Ideal para filtros, tags, categorias, seleção de tipos, etc.
300
- * Suporta forwardRef para acesso programático ao elemento DOM.
301
- *
302
- * @param icon - O ícone a ser exibido no botão
303
- * @param label - O texto/label a ser exibido
304
- * @param selected - Estado de seleção do botão
305
- * @param className - Classes CSS adicionais
306
- * @param props - Todos os outros atributos HTML padrão de button
307
- * @returns Um elemento button estilizado
308
- *
309
- * @example
310
- * ```tsx
311
- * <SelectionButton
312
- * icon={<TagIcon />}
313
- * label="Categoria"
314
- * selected={false}
315
- * onClick={() => handleSelection()}
316
- * />
317
- * ```
318
- *
319
- * @example
320
- * ```tsx
321
- * // Usando ref para foco programático
322
- * const buttonRef = useRef<HTMLButtonElement>(null);
323
- *
324
- * const handleFocus = () => {
325
- * buttonRef.current?.focus();
326
- * };
327
- *
328
- * <SelectionButton
329
- * ref={buttonRef}
330
- * icon={<TagIcon />}
331
- * label="Categoria"
332
- * selected={isSelected}
333
- * onClick={() => setSelected(!isSelected)}
334
- * />
335
- * ```
336
- */
337
- declare const SelectionButton: react.ForwardRefExoticComponent<{
338
- /** Ícone a ser exibido no botão */
339
- icon: ReactNode;
340
- /** Texto/label a ser exibido ao lado do ícone */
341
- label: string;
342
- /** Estado de seleção do botão */
343
- selected?: boolean;
344
- /** Additional CSS classes to apply */
345
- className?: string;
346
- } & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
347
-
348
- declare const Table: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
349
-
350
- /**
351
- * CheckBox size variants
352
- */
353
- type CheckBoxSize = 'small' | 'medium' | 'large';
354
- /**
355
- * CheckBox visual state
356
- */
357
- type CheckBoxState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled';
358
- /**
359
- * CheckBox component for Analytica Ensino platforms
360
- *
361
- * A checkbox component with essential states, sizes and themes.
362
- * Uses the Analytica Ensino Design System colors from styles.css with automatic
363
- * light/dark mode support. Includes Text component integration for consistent typography.
364
- *
365
- * @example
366
- * ```tsx
367
- * // Basic checkbox
368
- * <CheckBox label="Option" />
369
- *
370
- * // Small size
371
- * <CheckBox size="small" label="Small option" />
372
- *
373
- * // Invalid state
374
- * <CheckBox state="invalid" label="Required field" />
375
- *
376
- * // Disabled state
377
- * <CheckBox disabled label="Disabled option" />
378
- * ```
379
- */
380
- declare const CheckBox: react.ForwardRefExoticComponent<{
381
- /** Label text to display next to the checkbox */
382
- label?: ReactNode;
383
- /** Size variant of the checkbox */
384
- size?: CheckBoxSize;
385
- /** Visual state of the checkbox */
386
- state?: CheckBoxState;
387
- /** Indeterminate state for partial selections */
388
- indeterminate?: boolean;
389
- /** Error message to display */
390
- errorMessage?: string;
391
- /** Helper text to display */
392
- helperText?: string;
393
- /** Additional CSS classes */
394
- className?: string;
395
- /** Label CSS classes */
396
- labelClassName?: string;
397
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & react.RefAttributes<HTMLInputElement>>;
14
+ export { default as Radio, RadioGroup, RadioGroupItem } from './Radio/index.js';
15
+ export { default as TextArea } from './TextArea/index.js';
16
+ export { default as Toast } from './Toast/index.js';
17
+ export { default as Toaster } from './Toast/Toaster/index.js';
18
+ export { default as Divider } from './Divider/index.js';
19
+ export { default as useToastStore } from './Toast/ToastStore/index.js';
20
+ export { default as Input } from './Input/index.js';
21
+ export { default as Chips } from './Chips/index.js';
22
+ export { default as ProgressBar } from './ProgressBar/index.js';
23
+ export { default as ProgressCircle } from './ProgressCircle/index.js';
24
+ export { default as Stepper } from './Stepper/index.js';
25
+ export { default as Calendar } from './Calendar/index.js';
26
+ export { default as Modal } from './Modal/index.js';
27
+ export { CardAccordation } from './Accordation/index.js';
28
+ export { AlternativesList } from './Alternative/index.js';
29
+ export { AlertDialog } from './AlertDialog/index.js';
30
+ export { MultipleChoiceList } from './MultipleChoice/index.js';
31
+ export { default as DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.js';
32
+ export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.js';
33
+ export { default as Menu, MenuContent, MenuItem, MenuOverflow } from './Menu/index.js';
34
+ export { CardActivitiesResults, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardSimulationHistory, CardStatus, CardTest, CardTopic } from './Card/index.js';
35
+ export { Skeleton, SkeletonCard, SkeletonCircle, SkeletonList, SkeletonRectangle, SkeletonRounded, SkeletonTable, SkeletonText } from './Skeleton/index.js';
36
+ export { default as NotFound } from './NotFound/index.js';
37
+ export { AuthProvider, ProtectedRoute, PublicRoute, getRootDomain, useAuth, useAuthGuard, useRouteAuth, withAuth } from './Auth/index.js';
38
+ export { createZustandAuthAdapter } from './Auth/zustandAuthAdapter/index.js';
39
+ export { useUrlAuthentication } from './Auth/useUrlAuthentication/index.js';
40
+ export { useApiConfig } from './Auth/useApiConfig/index.js';
41
+ export { Quiz, QuizAlternative, QuizContent, QuizFooter, QuizHeader, QuizHeaderResult, QuizListResult, QuizListResultByMateria, QuizQuestionList, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTitle } from './Quiz/index.js';
42
+ export { useQuizStore } from './Quiz/useQuizStore/index.js';
43
+ import 'react/jsx-runtime';
398
44
 
399
45
  /**
400
46
  * CheckboxList size variants
@@ -483,1750 +129,4 @@ declare const CheckboxListItem: react.ForwardRefExoticComponent<{
483
129
  className?: string;
484
130
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "checked" | "type" | "name" | "onChange"> & react.RefAttributes<HTMLInputElement>>;
485
131
 
486
- /**
487
- * Radio size variants
488
- */
489
- type RadioSize = 'small' | 'medium' | 'large' | 'extraLarge';
490
- /**
491
- * Radio visual state
492
- */
493
- type RadioState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled';
494
- /**
495
- * Radio component for Analytica Ensino platforms
496
- *
497
- * A radio button component with essential states, sizes and themes.
498
- * Uses the Analytica Ensino Design System colors from styles.css with automatic
499
- * light/dark mode support. Includes Text component integration for consistent typography.
500
- *
501
- * @example
502
- * ```tsx
503
- * // Basic radio
504
- * <Radio name="option" value="1" label="Option 1" />
505
- *
506
- * // Small size
507
- * <Radio size="small" name="option" value="2" label="Small option" />
508
- *
509
- * // Invalid state
510
- * <Radio state="invalid" name="option" value="3" label="Required field" />
511
- *
512
- * // Disabled state
513
- * <Radio disabled name="option" value="4" label="Disabled option" />
514
- *
515
- * // Default checked (uncontrolled)
516
- * <Radio defaultChecked name="option" value="5" label="Initially checked" />
517
- * ```
518
- */
519
- declare const Radio: react.ForwardRefExoticComponent<{
520
- /** Label text to display next to the radio */
521
- label?: ReactNode;
522
- /** Size variant of the radio */
523
- size?: RadioSize;
524
- /** Visual state of the radio */
525
- state?: RadioState;
526
- /** Error message to display */
527
- errorMessage?: string;
528
- /** Helper text to display */
529
- helperText?: string;
530
- /** Additional CSS classes */
531
- className?: string;
532
- /** Label CSS classes */
533
- labelClassName?: string;
534
- /** Radio group name */
535
- name?: string;
536
- /** Radio value */
537
- value?: string;
538
- /** Default checked state for uncontrolled radios */
539
- defaultChecked?: boolean;
540
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "defaultChecked" | "type"> & react.RefAttributes<HTMLInputElement>>;
541
- /**
542
- * RadioGroup store interface
543
- */
544
- interface RadioGroupStore {
545
- value: string;
546
- setValue: (value: string) => void;
547
- onValueChange?: (value: string) => void;
548
- disabled: boolean;
549
- name: string;
550
- }
551
- type RadioGroupStoreApi = StoreApi<RadioGroupStore>;
552
- /**
553
- * RadioGroup component for flexible radio group composition
554
- *
555
- * Uses Zustand for state management with automatic store injection.
556
- * Allows complete control over layout and styling by composing with RadioGroupItem.
557
- *
558
- * @example
559
- * ```tsx
560
- * <RadioGroup defaultValue="option1" onValueChange={setValue}>
561
- * <div className="flex items-center gap-3">
562
- * <RadioGroupItem value="option1" id="r1" />
563
- * <label htmlFor="r1">Option 1</label>
564
- * </div>
565
- * <div className="flex items-center gap-3">
566
- * <RadioGroupItem value="option2" id="r2" />
567
- * <label htmlFor="r2">Option 2</label>
568
- * </div>
569
- * </RadioGroup>
570
- * ```
571
- */
572
- declare const RadioGroup: react.ForwardRefExoticComponent<{
573
- /** Current selected value */
574
- value?: string;
575
- /** Default selected value for uncontrolled usage */
576
- defaultValue?: string;
577
- /** Callback when selection changes */
578
- onValueChange?: (value: string) => void;
579
- /** Group name for all radios */
580
- name?: string;
581
- /** Disabled state for the entire group */
582
- disabled?: boolean;
583
- /** Additional CSS classes */
584
- className?: string;
585
- /** Children components */
586
- children: ReactNode;
587
- } & Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> & react.RefAttributes<HTMLDivElement>>;
588
- /**
589
- * RadioGroupItem component for use within RadioGroup
590
- *
591
- * A radio button without label that works within RadioGroup context.
592
- * Provides just the radio input for maximum flexibility in composition.
593
- *
594
- * @example
595
- * ```tsx
596
- * <RadioGroup defaultValue="option1">
597
- * <div className="flex items-center gap-3">
598
- * <RadioGroupItem value="option1" id="r1" />
599
- * <label htmlFor="r1">Option 1</label>
600
- * </div>
601
- * </RadioGroup>
602
- * ```
603
- */
604
- declare const RadioGroupItem: react.ForwardRefExoticComponent<{
605
- /** Value for this radio item */
606
- value: string;
607
- /** Store reference (automatically injected by RadioGroup) */
608
- store?: RadioGroupStoreApi;
609
- /** Disabled state for this specific item */
610
- disabled?: boolean;
611
- /** Size variant */
612
- size?: RadioSize;
613
- /** Visual state */
614
- state?: RadioState;
615
- /** Additional CSS classes */
616
- className?: string;
617
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "checked" | "type" | "name" | "onChange"> & react.RefAttributes<HTMLInputElement>>;
618
-
619
- /**
620
- * TextArea size variants
621
- */
622
- type TextAreaSize = 'small' | 'medium' | 'large' | 'extraLarge';
623
- /**
624
- * TextArea visual state
625
- */
626
- type TextAreaState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled';
627
- /**
628
- * TextArea component for Analytica Ensino platforms
629
- *
630
- * A textarea component with essential states, sizes and themes.
631
- * Uses exact design specifications with 288px width, 96px height, and specific
632
- * color values. Includes Text component integration for consistent typography.
633
- *
634
- * @example
635
- * ```tsx
636
- * // Basic textarea
637
- * <TextArea label="Description" placeholder="Enter description..." />
638
- *
639
- * // Small size
640
- * <TextArea size="small" label="Comment" />
641
- *
642
- * // Invalid state
643
- * <TextArea state="invalid" label="Required field" errorMessage="This field is required" />
644
- *
645
- * // Disabled state
646
- * <TextArea disabled label="Read-only field" />
647
- * ```
648
- */
649
- declare const TextArea: react.ForwardRefExoticComponent<{
650
- /** Label text to display above the textarea */
651
- label?: ReactNode;
652
- /** Size variant of the textarea */
653
- size?: TextAreaSize;
654
- /** Visual state of the textarea */
655
- state?: TextAreaState;
656
- /** Error message to display */
657
- errorMessage?: string;
658
- /** Helper text to display */
659
- helperMessage?: string;
660
- /** Additional CSS classes */
661
- className?: string;
662
- /** Label CSS classes */
663
- labelClassName?: string;
664
- } & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> & react.RefAttributes<HTMLTextAreaElement>>;
665
-
666
- type ToastPosition$1 = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'default';
667
- type ToastProps = {
668
- title: string;
669
- description?: string;
670
- onClose: () => void;
671
- /** Visual variant of the badge */
672
- variant?: 'solid' | 'outlined';
673
- /** Action type of the badge */
674
- action?: 'warning' | 'success' | 'info';
675
- position?: ToastPosition$1;
676
- } & HTMLAttributes<HTMLDivElement>;
677
- declare const Toast: ({ variant, action, className, onClose, title, description, position, ...props }: ToastProps) => react_jsx_runtime.JSX.Element;
678
-
679
- declare const Toaster: () => react_jsx_runtime.JSX.Element;
680
-
681
- /**
682
- * Divider component props interface
683
- */
684
- type DividerProps = {
685
- /** Orientation of the divider */
686
- orientation?: 'horizontal' | 'vertical';
687
- /** Additional CSS classes to apply */
688
- className?: string;
689
- } & HTMLAttributes<HTMLHRElement>;
690
- /**
691
- * Divider component for Analytica Ensino platforms
692
- *
693
- * A simple divider component that creates a visual separation between content sections.
694
- * Can be used both horizontally and vertically.
695
- *
696
- * @param orientation - The orientation of the divider (horizontal or vertical)
697
- * @param className - Additional CSS classes
698
- * @param props - All other standard hr HTML attributes
699
- * @returns A styled divider element
700
- *
701
- * @example
702
- * ```tsx
703
- * <Divider orientation="horizontal" />
704
- * <Divider orientation="vertical" className="h-8" />
705
- * ```
706
- */
707
- declare const Divider: ({ orientation, className, ...props }: DividerProps) => react_jsx_runtime.JSX.Element;
708
-
709
- type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'default';
710
- type ToastData = {
711
- id: string;
712
- title: string;
713
- description?: string;
714
- variant?: 'solid' | 'outlined';
715
- action?: 'warning' | 'success' | 'info';
716
- position?: ToastPosition;
717
- };
718
- type ToastStore = {
719
- toasts: ToastData[];
720
- addToast: (toast: Omit<ToastData, 'id'>) => void;
721
- removeToast: (id: string) => void;
722
- };
723
- declare const useToastStore: zustand.UseBoundStore<zustand.StoreApi<ToastStore>>;
724
-
725
- declare const Input: react.ForwardRefExoticComponent<{
726
- /** Label text displayed above the input */
727
- label?: string;
728
- /** Helper text displayed below the input */
729
- helperText?: string;
730
- /** Error message displayed below the input */
731
- errorMessage?: string;
732
- /** Size of the input */
733
- size?: "small" | "medium" | "large" | "extra-large";
734
- /** Visual variant of the input */
735
- variant?: "outlined" | "underlined" | "rounded";
736
- /** Current state of the input */
737
- state?: "default" | "error" | "disabled" | "read-only";
738
- /** Icon to display on the left side of the input */
739
- iconLeft?: ReactNode;
740
- /** Icon to display on the right side of the input */
741
- iconRight?: ReactNode;
742
- /** Additional CSS classes to apply to the input */
743
- className?: string;
744
- /** Additional CSS classes to apply to the container */
745
- containerClassName?: string;
746
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & react.RefAttributes<HTMLInputElement>>;
747
-
748
- /**
749
- * Chips component props interface
750
- */
751
- type ChipsProps = {
752
- /** Content to be displayed inside the chip */
753
- children: ReactNode;
754
- /** Se o chip está selecionado (mostra check automaticamente) */
755
- selected?: boolean;
756
- /** Additional CSS classes to apply */
757
- className?: string;
758
- } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>;
759
- /**
760
- * Chips component for Analytica Ensino platforms
761
- *
762
- * Um componente de chip seguindo exatamente o design do Figma.
763
- * Suporte a dois estados principais: default (sem ícone) e selected (com ícone de check).
764
- * Quando selecionado, automaticamente mostra o ícone de check.
765
- *
766
- * @param children - O conteúdo a ser exibido dentro do chip
767
- * @param selected - Se o chip está selecionado (mostra check automaticamente)
768
- * @param className - Classes CSS adicionais
769
- * @param props - Todos os outros atributos padrão de button HTML
770
- * @returns Um elemento de chip estilizado
771
- *
772
- * @example
773
- * ```tsx
774
- * <Chips onClick={() => console.log('clicked')}>
775
- * Label
776
- * </Chips>
777
- *
778
- * <Chips selected onClick={() => console.log('selected')}>
779
- * Selected Label
780
- * </Chips>
781
- * ```
782
- */
783
- declare const Chips: ({ children, selected, className, disabled, type, ...props }: ChipsProps) => react_jsx_runtime.JSX.Element;
784
-
785
- /**
786
- * Progress bar size variants
787
- */
788
- type ProgressBarSize = 'small' | 'medium';
789
- /**
790
- * Progress bar color variants
791
- */
792
- type ProgressBarVariant = 'blue' | 'green';
793
- /**
794
- * Progress bar layout variants
795
- */
796
- type ProgressBarLayout = 'default' | 'stacked' | 'compact';
797
- /**
798
- * ProgressBar component props interface
799
- */
800
- type ProgressBarProps = {
801
- /** Progress value between 0 and 100 */
802
- value: number;
803
- /** Maximum value (defaults to 100) */
804
- max?: number;
805
- /** Size variant of the progress bar */
806
- size?: ProgressBarSize;
807
- /** Color variant of the progress bar */
808
- variant?: ProgressBarVariant;
809
- /** Layout variant of the progress bar */
810
- layout?: ProgressBarLayout;
811
- /** Optional label to display */
812
- label?: ReactNode;
813
- /** Show percentage text */
814
- showPercentage?: boolean;
815
- /**
816
- * Show hit count (e.g., "28 de 30") instead of percentage
817
- *
818
- * PRIORITY: When both showHitCount and showPercentage are true,
819
- * showHitCount takes precedence (stacked and compact layouts only).
820
- * Default layout does not support showHitCount.
821
- */
822
- showHitCount?: boolean;
823
- /** Additional CSS classes */
824
- className?: string;
825
- /** Label CSS classes */
826
- labelClassName?: string;
827
- /** Percentage text CSS classes */
828
- percentageClassName?: string;
829
- /** Custom width for stacked layout (defaults to w-[380px]) */
830
- stackedWidth?: string;
831
- /** Custom height for stacked layout (defaults to h-[35px]) */
832
- stackedHeight?: string;
833
- /** Custom width for compact layout (defaults to w-[131px]) */
834
- compactWidth?: string;
835
- /** Custom height for compact layout (defaults to h-[24px]) */
836
- compactHeight?: string;
837
- };
838
- /**
839
- * ProgressBar component for Analytica Ensino platforms
840
- *
841
- * A progress bar component with size and color variants designed for tracking
842
- * activity progress (blue) and performance metrics (green).
843
- * Uses the Analytica Ensino Design System colors from styles.css with automatic
844
- * light/dark mode support. Includes Text component integration for consistent typography.
845
- *
846
- * CONTENT DISPLAY PRIORITY (Consistent across all layouts):
847
- * 1. showHitCount (highest) - "X de Y" format (stacked/compact only)
848
- * 2. showPercentage - "X%" format
849
- * 3. label (lowest) - Custom label text
850
- *
851
- * When multiple display options are enabled, higher priority options take precedence.
852
- *
853
- * @example
854
- * ```tsx
855
- * // Basic progress bar
856
- * <ProgressBar value={65} />
857
- *
858
- * // Activity progress (blue)
859
- * <ProgressBar variant="blue" value={45} label="Progress" showPercentage />
860
- *
861
- * // Performance metrics (green)
862
- * <ProgressBar variant="green" size="medium" value={85} label="Performance" />
863
- *
864
- * // Small size with custom max value
865
- * <ProgressBar size="small" value={3} max={5} showPercentage />
866
- *
867
- * // Stacked layout with fixed width and hit count
868
- * <ProgressBar layout="stacked" variant="green" value={28} max={30} label="Fáceis" showHitCount />
869
- *
870
- * // Compact layout for small cards
871
- * <ProgressBar layout="compact" variant="blue" value={70} label="Questão 08" />
872
- * ```
873
- */
874
- declare const ProgressBar: ({ value, max, size, variant, layout, label, showPercentage, showHitCount, className, labelClassName, percentageClassName, stackedWidth, stackedHeight, compactWidth, compactHeight, }: ProgressBarProps) => react_jsx_runtime.JSX.Element;
875
-
876
- /**
877
- * Progress circle size variants
878
- */
879
- type ProgressCircleSize = 'small' | 'medium';
880
- /**
881
- * Progress circle color variants
882
- */
883
- type ProgressCircleVariant = 'blue' | 'green';
884
- /**
885
- * ProgressCircle component props interface
886
- */
887
- type ProgressCircleProps = {
888
- /** Progress value between 0 and 100 */
889
- value: number;
890
- /** Maximum value (defaults to 100) */
891
- max?: number;
892
- /** Size variant of the progress circle */
893
- size?: ProgressCircleSize;
894
- /** Color variant of the progress circle */
895
- variant?: ProgressCircleVariant;
896
- /** Optional label to display below percentage */
897
- label?: ReactNode;
898
- /** Show percentage text */
899
- showPercentage?: boolean;
900
- /** Additional CSS classes */
901
- className?: string;
902
- /** Label CSS classes */
903
- labelClassName?: string;
904
- /** Percentage text CSS classes */
905
- percentageClassName?: string;
906
- };
907
- /**
908
- * ProgressCircle component for Analytica Ensino platforms
909
- *
910
- * A circular progress indicator with size and color variants designed for tracking
911
- * activity progress (blue) and performance metrics (green).
912
- * Uses the Analytica Ensino Design System colors from styles.css with automatic
913
- * light/dark mode support. Includes Text component integration for consistent typography.
914
- *
915
- * @example
916
- * ```tsx
917
- * // Basic progress circle
918
- * <ProgressCircle value={65} />
919
- *
920
- * // Activity progress (blue)
921
- * <ProgressCircle variant="blue" value={45} label="CONCLUÍDO" showPercentage />
922
- *
923
- * // Performance metrics (green)
924
- * <ProgressCircle variant="green" size="medium" value={85} label="MÉDIA" />
925
- *
926
- * // Small size with custom max value
927
- * <ProgressCircle size="small" value={3} max={5} showPercentage />
928
- * ```
929
- */
930
- declare const ProgressCircle: ({ value, max, size, variant, label, showPercentage, className, labelClassName, percentageClassName, }: ProgressCircleProps) => react_jsx_runtime.JSX.Element;
931
-
932
- /**
933
- * Stepper size variants
934
- */
935
- type StepperSize = 'small' | 'medium' | 'large' | 'extraLarge';
936
- /**
937
- * Step state variants
938
- */
939
- type StepState = 'pending' | 'current' | 'completed';
940
- /**
941
- * Individual step data interface
942
- */
943
- interface StepData {
944
- /** Unique identifier for the step */
945
- id: string;
946
- /** Label text for the step */
947
- label: string;
948
- /** Current state of the step */
949
- state: StepState;
950
- }
951
- /**
952
- * Stepper component props interface
953
- */
954
- type StepperProps = {
955
- /** Array of step data */
956
- steps: StepData[];
957
- /** Size variant of the stepper */
958
- size?: StepperSize;
959
- /** Current active step index */
960
- currentStep?: number;
961
- /** Additional CSS classes */
962
- className?: string;
963
- /** Step container CSS classes */
964
- stepClassName?: string;
965
- /** Progress indicator (e.g., "Etapa 2 de 4") */
966
- showProgress?: boolean;
967
- /** Custom progress text */
968
- progressText?: string;
969
- /** Make stepper responsive (vertical on mobile) */
970
- responsive?: boolean;
971
- };
972
- /**
973
- * Stepper component for Analytica Ensino platforms
974
- *
975
- * A progress stepper component that displays a sequence of steps with different states.
976
- * Follows the exact design specifications with proper spacing, colors, and layout.
977
- * Fully responsive for mobile, tablets, and laptops.
978
- *
979
- * Design specifications:
980
- * - Based on exact CSS specifications from Figma design
981
- * - Fully responsive: mobile (320px+) -> tablets (640px+) -> laptops (1024px+)
982
- * - Progressive sizing with responsive breakpoints that adapt to device type
983
- * - Consistent gaps that scale with screen size and device capabilities
984
- * - Consistent color scheme: pending (gray), current (dark blue), completed (light blue)
985
- * - Responsive design with overflow scroll on smaller devices
986
- * - Optimized text sizing and layout for each device category
987
- *
988
- * @example
989
- * ```tsx
990
- * // Basic stepper - automatically responsive for all devices
991
- * <Stepper steps={steps} currentStep={1} />
992
- *
993
- * // Custom styling with full responsive behavior
994
- * <Stepper steps={steps} size="medium" showProgress responsive />
995
- * ```
996
- */
997
- declare const Stepper: ({ steps: initialSteps, size, currentStep, className, stepClassName, showProgress, progressText, responsive, }: StepperProps) => react_jsx_runtime.JSX.Element;
998
-
999
- /**
1000
- * Activity status types for calendar days
1001
- */
1002
- type ActivityStatus = 'near-deadline' | 'overdue' | 'in-deadline';
1003
- /**
1004
- * Activity data for a specific day
1005
- */
1006
- interface CalendarActivity {
1007
- id: string;
1008
- status: ActivityStatus;
1009
- title?: string;
1010
- }
1011
- /**
1012
- * Calendar variant types
1013
- */
1014
- type CalendarVariant = 'navigation' | 'selection';
1015
- /**
1016
- * Calendar component props
1017
- */
1018
- interface CalendarProps {
1019
- /** Calendar variant - navigation (compact) or selection (full) */
1020
- variant?: CalendarVariant;
1021
- /** Currently selected date */
1022
- selectedDate?: Date;
1023
- /** Function called when a date is selected */
1024
- onDateSelect?: (date: Date) => void;
1025
- /** Function called when month changes */
1026
- onMonthChange?: (date: Date) => void;
1027
- /** Activities data for calendar days */
1028
- activities?: Record<string, CalendarActivity[]>;
1029
- /** Show activities indicators */
1030
- showActivities?: boolean;
1031
- /** Additional CSS classes */
1032
- className?: string;
1033
- }
1034
- /**
1035
- * Calendar component for Analytica Ensino platforms
1036
- *
1037
- * A comprehensive calendar component with activity indicators,
1038
- * date selection, and navigation capabilities.
1039
- */
1040
- declare const Calendar: ({ variant, selectedDate, onDateSelect, onMonthChange, activities, showActivities, className, }: CalendarProps) => react_jsx_runtime.JSX.Element;
1041
-
1042
- /**
1043
- * Modal component props interface
1044
- */
1045
- type ModalProps = {
1046
- /** Whether the modal is open */
1047
- isOpen: boolean;
1048
- /** Function to close the modal */
1049
- onClose: () => void;
1050
- /** Modal title */
1051
- title: string;
1052
- /** Modal description/content */
1053
- children: ReactNode;
1054
- /** Size of the modal */
1055
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
1056
- /** Additional CSS classes for the modal content */
1057
- className?: string;
1058
- /** Whether clicking the backdrop should close the modal */
1059
- closeOnBackdropClick?: boolean;
1060
- /** Whether pressing Escape should close the modal */
1061
- closeOnEscape?: boolean;
1062
- /** Footer content (typically buttons) */
1063
- footer?: ReactNode;
1064
- /** Hide the close button */
1065
- hideCloseButton?: boolean;
1066
- };
1067
- /**
1068
- * Modal component for Analytica Ensino platforms
1069
- *
1070
- * A flexible modal component with multiple size variants and customizable behavior.
1071
- *
1072
- * @param isOpen - Whether the modal is currently open
1073
- * @param onClose - Callback function called when the modal should be closed
1074
- * @param title - The title displayed at the top of the modal
1075
- * @param children - The main content of the modal
1076
- * @param size - The size variant (xs, sm, md, lg, xl)
1077
- * @param className - Additional CSS classes for the modal content
1078
- * @param closeOnBackdropClick - Whether clicking the backdrop closes the modal (default: true)
1079
- * @param closeOnEscape - Whether pressing Escape closes the modal (default: true)
1080
- * @param footer - Footer content, typically action buttons
1081
- * @param hideCloseButton - Whether to hide the X close button (default: false)
1082
- * @returns A modal overlay with content
1083
- *
1084
- * @example
1085
- * ```tsx
1086
- * <Modal
1087
- * isOpen={isModalOpen}
1088
- * onClose={() => setIsModalOpen(false)}
1089
- * title="Invite your team"
1090
- * size="md"
1091
- * footer={
1092
- * <div className="flex gap-3">
1093
- * <Button variant="outline" onClick={() => setIsModalOpen(false)}>Cancel</Button>
1094
- * <Button variant="solid" onClick={handleExplore}>Explore</Button>
1095
- * </div>
1096
- * }
1097
- * >
1098
- * Elevate user interactions with our versatile modals.
1099
- * </Modal>
1100
- * ```
1101
- */
1102
- declare const Modal: ({ isOpen, onClose, title, children, size, className, closeOnBackdropClick, closeOnEscape, footer, hideCloseButton, }: ModalProps) => react_jsx_runtime.JSX.Element | null;
1103
-
1104
- interface CardAccordationProps extends HTMLAttributes<HTMLDivElement> {
1105
- trigger: ReactNode;
1106
- children: ReactNode;
1107
- defaultExpanded?: boolean;
1108
- onToggleExpanded?: (isExpanded: boolean) => void;
1109
- }
1110
- declare const CardAccordation: react.ForwardRefExoticComponent<CardAccordationProps & react.RefAttributes<HTMLDivElement>>;
1111
-
1112
- /**
1113
- * Interface para definir uma alternativa
1114
- */
1115
- interface Alternative {
1116
- value: string;
1117
- label: string;
1118
- status?: 'correct' | 'incorrect' | 'neutral';
1119
- disabled?: boolean;
1120
- description?: string;
1121
- }
1122
- /**
1123
- * Props do componente AlternativesList
1124
- */
1125
- interface AlternativesListProps {
1126
- /** Lista de alternativas */
1127
- alternatives: Alternative[];
1128
- /** Nome do grupo de radio */
1129
- name?: string;
1130
- /** Valor selecionado por padrão */
1131
- defaultValue?: string;
1132
- /** Valor controlado */
1133
- value?: string;
1134
- /** Callback quando uma alternativa é selecionada */
1135
- onValueChange?: (value: string) => void;
1136
- /** Se o componente está desabilitado */
1137
- disabled?: boolean;
1138
- /** Layout das alternativas */
1139
- layout?: 'default' | 'compact' | 'detailed';
1140
- /** Classes CSS adicionais */
1141
- className?: string;
1142
- /** Modo de exibição: interativo (com radios funcionais) ou readonly (apenas visual) */
1143
- mode?: 'interactive' | 'readonly';
1144
- /** Valor selecionado pelo usuário (apenas para modo readonly) */
1145
- selectedValue?: string;
1146
- }
1147
- /**
1148
- * Componente reutilizável para exibir lista de alternativas com RadioGroup
1149
- *
1150
- * Suporta dois modos:
1151
- * - `interactive`: Permite interação com radios (padrão)
1152
- * - `readonly`: Apenas exibição visual dos estados
1153
- *
1154
- * @example
1155
- * ```tsx
1156
- * // Modo interativo (padrão)
1157
- * <AlternativesList
1158
- * mode="interactive"
1159
- * alternatives={[
1160
- * { value: "a", label: "Alternativa A", status: "correct" },
1161
- * { value: "b", label: "Alternativa B", status: "incorrect" },
1162
- * { value: "c", label: "Alternativa C" }
1163
- * ]}
1164
- * defaultValue="a"
1165
- * onValueChange={(value) => console.log(value)}
1166
- * />
1167
- *
1168
- * // Modo readonly - mostra seleção do usuário
1169
- * <AlternativesList
1170
- * mode="readonly"
1171
- * selectedValue="b" // O que o usuário selecionou
1172
- * alternatives={[
1173
- * { value: "a", label: "Resposta A", status: "correct" }, // Mostra como correta
1174
- * { value: "b", label: "Resposta B" }, // Mostra radio selecionado + badge incorreto
1175
- * { value: "c", label: "Resposta C" }
1176
- * ]}
1177
- * />
1178
- * ```
1179
- */
1180
- declare const AlternativesList: ({ alternatives, name, defaultValue, value, onValueChange, disabled, layout, className, mode, selectedValue, }: AlternativesListProps) => react_jsx_runtime.JSX.Element;
1181
- interface HeaderAlternativeProps extends HTMLAttributes<HTMLDivElement> {
1182
- title: string;
1183
- subTitle: string;
1184
- content: string;
1185
- }
1186
- declare const HeaderAlternative: react.ForwardRefExoticComponent<HeaderAlternativeProps & react.RefAttributes<HTMLDivElement>>;
1187
-
1188
- interface AlertDialogProps extends HTMLAttributes<HTMLDivElement> {
1189
- /** Title of the alert dialog */
1190
- title: string;
1191
- /** Whether the alert dialog is open (controlled mode) */
1192
- isOpen: boolean;
1193
- /** Function called when the alert dialog is opened or closed (controlled mode) */
1194
- onChangeOpen: (open: boolean) => void;
1195
- /** Whether clicking the backdrop should close the alert dialog */
1196
- closeOnBackdropClick?: boolean;
1197
- /** Whether pressing Escape should close the alert dialog */
1198
- closeOnEscape?: boolean;
1199
- /** Additional CSS classes for the alert dialog content */
1200
- className?: string;
1201
- /** Function called when submit button is clicked */
1202
- onSubmit?: (value?: unknown) => void;
1203
- /** Value to pass to onSubmit function */
1204
- submitValue?: unknown;
1205
- /** Function called when cancel button is clicked */
1206
- onCancel?: (value?: unknown) => void;
1207
- /** Value to pass to onCancel function */
1208
- cancelValue?: unknown;
1209
- /** Description of the alert dialog */
1210
- description: string;
1211
- /** Label of the cancel button */
1212
- cancelButtonLabel?: string;
1213
- /** Label of the submit button */
1214
- submitButtonLabel?: string;
1215
- /** Size of the alert dialog */
1216
- size?: 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
1217
- }
1218
- declare const AlertDialog: react.ForwardRefExoticComponent<AlertDialogProps & react.RefAttributes<HTMLDivElement>>;
1219
-
1220
- interface Choice {
1221
- value: string;
1222
- label: string;
1223
- status?: 'correct' | 'incorrect' | 'neutral';
1224
- disabled?: boolean;
1225
- }
1226
- interface MultipleChoiceListProps extends HtmlHTMLAttributes<HTMLDivElement> {
1227
- choices: Choice[];
1228
- disabled?: boolean;
1229
- name?: string;
1230
- selectedValues?: string[];
1231
- onHandleSelectedValues?: (values: string[]) => void;
1232
- mode?: 'interactive' | 'readonly';
1233
- }
1234
- declare const MultipleChoiceList: ({ disabled, className, choices, name, selectedValues, onHandleSelectedValues, mode, }: MultipleChoiceListProps) => react_jsx_runtime.JSX.Element;
1235
-
1236
- interface DropdownStore {
1237
- open: boolean;
1238
- setOpen: (open: boolean) => void;
1239
- }
1240
- type DropdownStoreApi = StoreApi<DropdownStore>;
1241
- interface DropdownMenuProps {
1242
- children: ReactNode;
1243
- open?: boolean;
1244
- onOpenChange?: (open: boolean) => void;
1245
- }
1246
- declare const DropdownMenu: ({ children, open: propOpen, onOpenChange, }: DropdownMenuProps) => react_jsx_runtime.JSX.Element;
1247
- declare const DropdownMenuTrigger: {
1248
- ({ className, children, onClick, store: externalStore, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
1249
- disabled?: boolean;
1250
- store?: DropdownStoreApi;
1251
- }): react_jsx_runtime.JSX.Element;
1252
- displayName: string;
1253
- };
1254
- declare const MenuLabel: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
1255
- inset?: boolean;
1256
- store?: DropdownStoreApi;
1257
- } & react.RefAttributes<HTMLDivElement>>;
1258
- declare const DropdownMenuContent: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
1259
- align?: "start" | "center" | "end";
1260
- side?: "top" | "right" | "bottom" | "left";
1261
- variant?: "menu" | "profile";
1262
- sideOffset?: number;
1263
- store?: DropdownStoreApi;
1264
- } & react.RefAttributes<HTMLDivElement>>;
1265
- declare const DropdownMenuItem: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
1266
- inset?: boolean;
1267
- size?: "small" | "medium";
1268
- iconLeft?: ReactNode;
1269
- iconRight?: ReactNode;
1270
- disabled?: boolean;
1271
- variant?: "profile" | "menu";
1272
- store?: DropdownStoreApi;
1273
- } & react.RefAttributes<HTMLDivElement>>;
1274
- declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
1275
- store?: DropdownStoreApi;
1276
- } & react.RefAttributes<HTMLDivElement>>;
1277
- declare const ProfileMenuTrigger: react.ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
1278
- store?: DropdownStoreApi;
1279
- } & react.RefAttributes<HTMLButtonElement>>;
1280
- declare const ProfileMenuHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
1281
- name: string;
1282
- email: string;
1283
- store?: DropdownStoreApi;
1284
- } & react.RefAttributes<HTMLDivElement>>;
1285
- declare const ProfileMenuSection: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
1286
- store?: DropdownStoreApi;
1287
- } & react.RefAttributes<HTMLDivElement>>;
1288
- declare const ProfileMenuFooter: {
1289
- ({ className, disabled, onClick, store: externalStore, ...props }: HTMLAttributes<HTMLButtonElement> & {
1290
- disabled?: boolean;
1291
- store?: DropdownStoreApi;
1292
- }): react_jsx_runtime.JSX.Element;
1293
- displayName: string;
1294
- };
1295
-
1296
- interface SelectStore {
1297
- open: boolean;
1298
- setOpen: (open: boolean) => void;
1299
- value: string;
1300
- setValue: (value: string) => void;
1301
- selectedLabel: ReactNode;
1302
- setSelectedLabel: (label: ReactNode) => void;
1303
- onValueChange?: (value: string) => void;
1304
- }
1305
- type SelectStoreApi = StoreApi<SelectStore>;
1306
- interface SelectProps {
1307
- children: ReactNode;
1308
- defaultValue?: string;
1309
- value?: string;
1310
- onValueChange?: (value: string) => void;
1311
- size?: 'small' | 'medium' | 'large' | 'extra-large';
1312
- label?: string;
1313
- helperText?: string;
1314
- errorMessage?: string;
1315
- id?: string;
1316
- }
1317
- declare const Select: ({ children, defaultValue, value: propValue, onValueChange, size, label, helperText, errorMessage, id, }: SelectProps) => react_jsx_runtime.JSX.Element;
1318
- declare const SelectValue: ({ placeholder, store: externalStore, }: {
1319
- placeholder?: string;
1320
- store?: SelectStoreApi;
1321
- }) => react_jsx_runtime.JSX.Element;
1322
- interface SelectTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
1323
- className?: string;
1324
- invalid?: boolean;
1325
- variant?: 'outlined' | 'underlined' | 'rounded';
1326
- store?: SelectStoreApi;
1327
- size?: 'small' | 'medium' | 'large' | 'extra-large';
1328
- selectId?: string;
1329
- }
1330
- declare const SelectTrigger: react.ForwardRefExoticComponent<SelectTriggerProps & react.RefAttributes<HTMLButtonElement>>;
1331
- interface SelectContentProps extends HTMLAttributes<HTMLDivElement> {
1332
- className?: string;
1333
- align?: 'start' | 'center' | 'end';
1334
- side?: 'top' | 'right' | 'bottom' | 'left';
1335
- store?: SelectStoreApi;
1336
- }
1337
- declare const SelectContent: react.ForwardRefExoticComponent<SelectContentProps & react.RefAttributes<HTMLDivElement>>;
1338
- interface SelectItemProps extends HTMLAttributes<HTMLDivElement> {
1339
- value: string;
1340
- disabled?: boolean;
1341
- store?: SelectStoreApi;
1342
- }
1343
- declare const SelectItem: react.ForwardRefExoticComponent<SelectItemProps & react.RefAttributes<HTMLDivElement>>;
1344
-
1345
- type MenuVariant = 'menu' | 'menu2' | 'breadcrumb';
1346
- interface MenuStore {
1347
- value: string;
1348
- setValue: (value: string) => void;
1349
- onValueChange?: (value: string) => void;
1350
- }
1351
- type MenuStoreApi = StoreApi<MenuStore>;
1352
- interface MenuProps extends HTMLAttributes<HTMLDivElement> {
1353
- children: ReactNode;
1354
- defaultValue: string;
1355
- value?: string;
1356
- variant?: MenuVariant;
1357
- onValueChange?: (value: string) => void;
1358
- }
1359
- declare const Menu: react.ForwardRefExoticComponent<MenuProps & react.RefAttributes<HTMLDivElement>>;
1360
- interface MenuContentProps extends HTMLAttributes<HTMLUListElement> {
1361
- children: ReactNode;
1362
- variant?: MenuVariant;
1363
- }
1364
- declare const MenuContent: react.ForwardRefExoticComponent<MenuContentProps & react.RefAttributes<HTMLUListElement>>;
1365
- interface MenuItemProps extends HTMLAttributes<HTMLLIElement> {
1366
- value: string;
1367
- disabled?: boolean;
1368
- store?: MenuStoreApi;
1369
- variant?: MenuVariant;
1370
- separator?: boolean;
1371
- }
1372
- declare const MenuItem: react.ForwardRefExoticComponent<MenuItemProps & react.RefAttributes<HTMLLIElement>>;
1373
- declare const MenuItemIcon: ({ className, icon, ...props }: HTMLAttributes<HTMLSpanElement> & {
1374
- icon: ReactNode;
1375
- }) => react_jsx_runtime.JSX.Element;
1376
- interface MenuOverflowProps extends HTMLAttributes<HTMLDivElement> {
1377
- children: ReactNode;
1378
- defaultValue: string;
1379
- value?: string;
1380
- onValueChange?: (value: string) => void;
1381
- }
1382
- declare const MenuOverflow: ({ children, className, defaultValue, value, onValueChange, ...props }: MenuOverflowProps) => react_jsx_runtime.JSX.Element;
1383
-
1384
- interface CardActivitiesResultsProps extends HTMLAttributes<HTMLDivElement> {
1385
- icon: ReactNode;
1386
- title: string;
1387
- subTitle: string;
1388
- header: string;
1389
- description?: string;
1390
- extended?: boolean;
1391
- action?: 'warning' | 'success' | 'error' | 'info';
1392
- }
1393
- declare const CardActivitiesResults: react.ForwardRefExoticComponent<CardActivitiesResultsProps & react.RefAttributes<HTMLDivElement>>;
1394
- interface CardQuestionProps extends HTMLAttributes<HTMLDivElement> {
1395
- header: string;
1396
- state?: 'done' | 'undone';
1397
- onClickButton?: (valueButton?: unknown) => void;
1398
- valueButton?: unknown;
1399
- }
1400
- declare const CardQuestions: react.ForwardRefExoticComponent<CardQuestionProps & react.RefAttributes<HTMLDivElement>>;
1401
- interface CardProgressProps extends HTMLAttributes<HTMLDivElement> {
1402
- header: string;
1403
- subhead?: string;
1404
- initialDate?: string;
1405
- endDate?: string;
1406
- progress?: number;
1407
- direction?: 'horizontal' | 'vertical';
1408
- icon: ReactNode;
1409
- color?: string;
1410
- progressVariant?: 'blue' | 'green';
1411
- showDates?: boolean;
1412
- }
1413
- declare const CardProgress: react.ForwardRefExoticComponent<CardProgressProps & react.RefAttributes<HTMLDivElement>>;
1414
- interface CardTopicProps extends HTMLAttributes<HTMLDivElement> {
1415
- header: string;
1416
- subHead?: string[];
1417
- progress: number;
1418
- showPercentage?: boolean;
1419
- progressVariant?: 'blue' | 'green';
1420
- }
1421
- declare const CardTopic: react.ForwardRefExoticComponent<CardTopicProps & react.RefAttributes<HTMLDivElement>>;
1422
- interface CardPerformanceProps extends HTMLAttributes<HTMLDivElement> {
1423
- header: string;
1424
- description?: string;
1425
- progress?: number;
1426
- labelProgress?: string;
1427
- actionVariant?: 'button' | 'caret';
1428
- progressVariant?: 'blue' | 'green';
1429
- onClickButton?: (valueButton?: unknown) => void;
1430
- valueButton?: unknown;
1431
- }
1432
- declare const CardPerformance: react.ForwardRefExoticComponent<CardPerformanceProps & react.RefAttributes<HTMLDivElement>>;
1433
- interface CardResultsProps extends HTMLAttributes<HTMLDivElement> {
1434
- header: string;
1435
- icon: ReactNode;
1436
- correct_answers: number;
1437
- incorrect_answers: number;
1438
- direction?: 'row' | 'col';
1439
- color?: string;
1440
- }
1441
- declare const CardResults: react.ForwardRefExoticComponent<CardResultsProps & react.RefAttributes<HTMLDivElement>>;
1442
- interface CardStatusProps extends HTMLAttributes<HTMLDivElement> {
1443
- header: string;
1444
- status?: 'correct' | 'incorrect';
1445
- label?: string;
1446
- }
1447
- declare const CardStatus: react.ForwardRefExoticComponent<CardStatusProps & react.RefAttributes<HTMLDivElement>>;
1448
- interface CardAudioProps extends HTMLAttributes<HTMLDivElement> {
1449
- src?: string;
1450
- title?: string;
1451
- onPlay?: () => void;
1452
- onPause?: () => void;
1453
- onEnded?: () => void;
1454
- onAudioTimeUpdate?: (currentTime: number, duration: number) => void;
1455
- loop?: boolean;
1456
- preload?: 'none' | 'metadata' | 'auto';
1457
- tracks?: Array<{
1458
- kind: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata';
1459
- src: string;
1460
- srcLang: string;
1461
- label: string;
1462
- default?: boolean;
1463
- }>;
1464
- }
1465
- declare const CardAudio: react.ForwardRefExoticComponent<CardAudioProps & react.RefAttributes<HTMLDivElement>>;
1466
- interface CardSimuladoProps extends HTMLAttributes<HTMLDivElement> {
1467
- title: string;
1468
- duration?: string;
1469
- info: string;
1470
- backgroundColor: 'enem' | 'prova' | 'simuladao' | 'vestibular';
1471
- }
1472
- declare const CardSimulado: react.ForwardRefExoticComponent<CardSimuladoProps & react.RefAttributes<HTMLDivElement>>;
1473
- interface CardTestProps extends Omit<HTMLAttributes<HTMLElement>, 'onSelect'> {
1474
- title: string;
1475
- duration?: string;
1476
- questionsCount?: number;
1477
- additionalInfo?: string;
1478
- selected?: boolean;
1479
- onSelect?: (selected: boolean) => void;
1480
- }
1481
- declare const CardTest: react.ForwardRefExoticComponent<CardTestProps & react.RefAttributes<HTMLElement>>;
1482
- interface SimulationItem {
1483
- id: string;
1484
- title: string;
1485
- type: 'enem' | 'prova' | 'simulado' | 'vestibular';
1486
- info: string;
1487
- }
1488
- interface SimulationHistoryData {
1489
- date: string;
1490
- simulations: SimulationItem[];
1491
- }
1492
- interface CardSimulationHistoryProps extends HTMLAttributes<HTMLDivElement> {
1493
- data: SimulationHistoryData[];
1494
- onSimulationClick?: (simulation: SimulationItem) => void;
1495
- }
1496
- declare const CardSimulationHistory: react.ForwardRefExoticComponent<CardSimulationHistoryProps & react.RefAttributes<HTMLDivElement>>;
1497
-
1498
- interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
1499
- variant?: 'text' | 'circular' | 'rectangular' | 'rounded';
1500
- width?: string | number;
1501
- height?: string | number;
1502
- animation?: 'pulse' | 'none';
1503
- lines?: number;
1504
- spacing?: 'none' | 'small' | 'medium' | 'large';
1505
- }
1506
- declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLDivElement>>;
1507
- declare const SkeletonText: react.ForwardRefExoticComponent<Omit<SkeletonProps, "variant"> & react.RefAttributes<HTMLDivElement>>;
1508
- declare const SkeletonCircle: react.ForwardRefExoticComponent<Omit<SkeletonProps, "variant"> & react.RefAttributes<HTMLDivElement>>;
1509
- declare const SkeletonRectangle: react.ForwardRefExoticComponent<Omit<SkeletonProps, "variant"> & react.RefAttributes<HTMLDivElement>>;
1510
- declare const SkeletonRounded: react.ForwardRefExoticComponent<Omit<SkeletonProps, "variant"> & react.RefAttributes<HTMLDivElement>>;
1511
- interface SkeletonCardProps extends HTMLAttributes<HTMLDivElement> {
1512
- showAvatar?: boolean;
1513
- showTitle?: boolean;
1514
- showDescription?: boolean;
1515
- showActions?: boolean;
1516
- lines?: number;
1517
- }
1518
- declare const SkeletonCard: react.ForwardRefExoticComponent<SkeletonCardProps & react.RefAttributes<HTMLDivElement>>;
1519
- interface SkeletonListProps extends HTMLAttributes<HTMLDivElement> {
1520
- items?: number;
1521
- showAvatar?: boolean;
1522
- showTitle?: boolean;
1523
- showDescription?: boolean;
1524
- lines?: number;
1525
- }
1526
- declare const SkeletonList: react.ForwardRefExoticComponent<SkeletonListProps & react.RefAttributes<HTMLDivElement>>;
1527
- interface SkeletonTableProps extends HTMLAttributes<HTMLDivElement> {
1528
- rows?: number;
1529
- columns?: number;
1530
- showHeader?: boolean;
1531
- }
1532
- declare const SkeletonTable: react.ForwardRefExoticComponent<SkeletonTableProps & react.RefAttributes<HTMLDivElement>>;
1533
-
1534
- /**
1535
- * Props interface for the NotFound component
1536
- *
1537
- * @interface NotFoundProps
1538
- * @property {string} [title] - Custom title text (default: "Página não encontrada")
1539
- * @property {string} [description] - Custom description text
1540
- * @property {string} [buttonText] - Custom button text (default: "Voltar")
1541
- * @property {() => void} [onButtonClick] - Callback function for button click
1542
- * @property {string} [className] - Additional CSS classes for the container
1543
- * @property {'404' | '500' | 'custom'} [errorType] - Type of error to display (default: '404')
1544
- * @property {string} [customErrorCode] - Custom error code when errorType is 'custom'
1545
- */
1546
- interface NotFoundProps {
1547
- title?: string;
1548
- description?: string;
1549
- buttonText?: string;
1550
- onButtonClick?: () => void;
1551
- className?: string;
1552
- errorType?: '404' | '500' | 'custom';
1553
- customErrorCode?: string;
1554
- }
1555
- /**
1556
- * NotFound component for displaying error pages
1557
- *
1558
- * A reusable component for displaying 404, 500, or custom error pages
1559
- * with configurable content and navigation button.
1560
- *
1561
- * @param {NotFoundProps} props - The component props
1562
- * @returns {JSX.Element} The NotFound component
1563
- *
1564
- * @example
1565
- * ```typescript
1566
- * // Basic 404 page
1567
- * <NotFound onButtonClick={() => navigate('/dashboard')} />
1568
- *
1569
- * // Custom error page
1570
- * <NotFound
1571
- * errorType="500"
1572
- * title="Erro interno do servidor"
1573
- * description="Algo deu errado. Tente novamente mais tarde."
1574
- * buttonText="Tentar novamente"
1575
- * onButtonClick={() => window.location.reload()}
1576
- * />
1577
- *
1578
- * // Custom error code
1579
- * <NotFound
1580
- * errorType="custom"
1581
- * customErrorCode="403"
1582
- * title="Acesso negado"
1583
- * description="Você não tem permissão para acessar esta página."
1584
- * />
1585
- * ```
1586
- */
1587
- declare const NotFound: ({ title, description, buttonText, onButtonClick, className, errorType, customErrorCode, }: NotFoundProps) => react_jsx_runtime.JSX.Element;
1588
-
1589
- /**
1590
- * Interface for basic authentication tokens
1591
- *
1592
- * @interface AuthTokens
1593
- * @property {string} token - Main authentication token
1594
- * @property {string} refreshToken - Token used to refresh the main token
1595
- * @property {unknown} [key] - Additional properties that can be included
1596
- */
1597
- interface AuthTokens {
1598
- token: string;
1599
- refreshToken: string;
1600
- [key: string]: unknown;
1601
- }
1602
- /**
1603
- * Interface for basic user information
1604
- *
1605
- * @interface AuthUser
1606
- * @property {string} id - Unique user identifier
1607
- * @property {string} [name] - Optional user name
1608
- * @property {string} [email] - Optional user email
1609
- * @property {unknown} [key] - Additional user properties
1610
- */
1611
- interface AuthUser {
1612
- id: string;
1613
- name?: string;
1614
- email?: string;
1615
- [key: string]: unknown;
1616
- }
1617
- /**
1618
- * Interface for basic session information
1619
- *
1620
- * @interface SessionInfo
1621
- * @property {string} [institutionId] - Optional institution identifier
1622
- * @property {string} [profileId] - Optional profile identifier
1623
- * @property {string} [schoolId] - Optional school identifier
1624
- * @property {string} [schoolYearId] - Optional school year identifier
1625
- * @property {string} [classId] - Optional class identifier
1626
- * @property {unknown} [key] - Additional session properties
1627
- */
1628
- interface SessionInfo {
1629
- institutionId?: string;
1630
- profileId?: string;
1631
- schoolId?: string;
1632
- schoolYearId?: string;
1633
- classId?: string;
1634
- [key: string]: unknown;
1635
- }
1636
- /**
1637
- * Interface for authentication state
1638
- *
1639
- * @interface AuthState
1640
- * @property {boolean} isAuthenticated - Whether the user is authenticated
1641
- * @property {boolean} isLoading - Whether authentication is being checked
1642
- * @property {AuthUser | null} [user] - Current user information
1643
- * @property {SessionInfo | null} [sessionInfo] - Current session information
1644
- * @property {AuthTokens | null} [tokens] - Current authentication tokens
1645
- */
1646
- interface AuthState {
1647
- isAuthenticated: boolean;
1648
- isLoading: boolean;
1649
- user?: AuthUser | null;
1650
- sessionInfo?: SessionInfo | null;
1651
- tokens?: AuthTokens | null;
1652
- }
1653
- /**
1654
- * Interface for authentication context functions and state
1655
- *
1656
- * @interface AuthContextType
1657
- * @extends {AuthState}
1658
- * @property {() => Promise<boolean>} checkAuth - Function to check authentication status
1659
- * @property {() => void} signOut - Function to sign out the user
1660
- */
1661
- interface AuthContextType extends AuthState {
1662
- checkAuth: () => Promise<boolean>;
1663
- signOut: () => void;
1664
- }
1665
- /**
1666
- * Props for the AuthProvider component
1667
- *
1668
- * @interface AuthProviderProps
1669
- * @property {ReactNode} children - Child components
1670
- * @property {() => Promise<boolean> | boolean} [checkAuthFn] - Function to check if user is authenticated
1671
- * @property {() => void} [signOutFn] - Function to handle logout
1672
- * @property {Partial<AuthState>} [initialAuthState] - Initial authentication state
1673
- * @property {() => AuthUser | null | undefined} [getUserFn] - Function to get user data
1674
- * @property {() => SessionInfo | null | undefined} [getSessionFn] - Function to get session info
1675
- * @property {() => AuthTokens | null | undefined} [getTokensFn] - Function to get tokens
1676
- */
1677
- interface AuthProviderProps {
1678
- children: ReactNode;
1679
- /**
1680
- * Função para verificar se o usuário está autenticado
1681
- * Deve retornar uma Promise<boolean>
1682
- */
1683
- checkAuthFn?: () => Promise<boolean> | boolean;
1684
- /**
1685
- * Função para fazer logout
1686
- */
1687
- signOutFn?: () => void;
1688
- /**
1689
- * Estado de autenticação inicial
1690
- */
1691
- initialAuthState?: Partial<AuthState>;
1692
- /**
1693
- * Função para obter dados do usuário (opcional)
1694
- */
1695
- getUserFn?: () => AuthUser | null | undefined;
1696
- /**
1697
- * Função para obter informações da sessão (opcional)
1698
- */
1699
- getSessionFn?: () => SessionInfo | null | undefined;
1700
- /**
1701
- * Função para obter tokens (opcional)
1702
- */
1703
- getTokensFn?: () => AuthTokens | null | undefined;
1704
- }
1705
- /**
1706
- * Authentication provider that manages global auth state
1707
- * Compatible with any store (Zustand, Redux, Context, etc.)
1708
- *
1709
- * @param {AuthProviderProps} props - The provider props
1710
- * @returns {JSX.Element} The provider component
1711
- *
1712
- * @example
1713
- * ```tsx
1714
- * <AuthProvider
1715
- * checkAuthFn={checkAuthFunction}
1716
- * signOutFn={signOutFunction}
1717
- * getUserFn={getUserFunction}
1718
- * >
1719
- * <App />
1720
- * </AuthProvider>
1721
- * ```
1722
- */
1723
- declare const AuthProvider: ({ children, checkAuthFn, signOutFn, initialAuthState, getUserFn, getSessionFn, getTokensFn, }: AuthProviderProps) => react_jsx_runtime.JSX.Element;
1724
- /**
1725
- * Hook to use the authentication context
1726
- *
1727
- * @throws {Error} When used outside of AuthProvider
1728
- * @returns {AuthContextType} The authentication context
1729
- *
1730
- * @example
1731
- * ```tsx
1732
- * const { isAuthenticated, user, signOut } = useAuth();
1733
- * ```
1734
- */
1735
- declare const useAuth: () => AuthContextType;
1736
- /**
1737
- * Props for the ProtectedRoute component
1738
- *
1739
- * @interface ProtectedRouteProps
1740
- * @property {ReactNode} children - Components to render when authenticated
1741
- * @property {string} [redirectTo] - Path to redirect when not authenticated (default: '/')
1742
- * @property {ReactNode} [loadingComponent] - Custom loading component
1743
- * @property {(authState: AuthState) => boolean} [additionalCheck] - Additional authentication check
1744
- */
1745
- interface ProtectedRouteProps {
1746
- children: ReactNode;
1747
- /**
1748
- * Path para redirecionamento quando não autenticado
1749
- */
1750
- redirectTo?: string;
1751
- /**
1752
- * Componente de loading personalizado
1753
- */
1754
- loadingComponent?: ReactNode;
1755
- /**
1756
- * Função adicional de verificação (ex: verificar permissões específicas)
1757
- */
1758
- additionalCheck?: (authState: AuthState) => boolean;
1759
- }
1760
- /**
1761
- * Componente para proteger rotas que requerem autenticação
1762
- *
1763
- * @example
1764
- * ```tsx
1765
- * <ProtectedRoute redirectTo="/login">
1766
- * <PainelPage />
1767
- * </ProtectedRoute>
1768
- * ```
1769
- */
1770
- declare const ProtectedRoute: ({ children, redirectTo, loadingComponent, additionalCheck, }: ProtectedRouteProps) => react_jsx_runtime.JSX.Element | null;
1771
- /**
1772
- * Props for the PublicRoute component
1773
- *
1774
- * @interface PublicRouteProps
1775
- * @property {ReactNode} children - Components to render
1776
- * @property {string} [redirectTo] - Path to redirect to (default: '/painel')
1777
- * @property {boolean} [redirectIfAuthenticated] - Whether to redirect if authenticated
1778
- * @property {boolean} [checkAuthBeforeRender] - Whether to check auth before rendering
1779
- */
1780
- interface PublicRouteProps {
1781
- children: ReactNode;
1782
- /**
1783
- * Path para redirecionamento
1784
- */
1785
- redirectTo?: string;
1786
- /**
1787
- * Se deve redirecionar quando usuário estiver autenticado
1788
- */
1789
- redirectIfAuthenticated?: boolean;
1790
- /**
1791
- * Se deve verificar autenticação antes de renderizar
1792
- */
1793
- checkAuthBeforeRender?: boolean;
1794
- }
1795
- /**
1796
- * Componente para rotas públicas (login, recuperação de senha, etc.)
1797
- * Opcionalmente redireciona se o usuário já estiver autenticado
1798
- *
1799
- * @example
1800
- * ```tsx
1801
- * <PublicRoute redirectTo="/painel" redirectIfAuthenticated={true}>
1802
- * <LoginPage />
1803
- * </PublicRoute>
1804
- * ```
1805
- */
1806
- declare const PublicRoute: ({ children, redirectTo, redirectIfAuthenticated, checkAuthBeforeRender, }: PublicRouteProps) => react_jsx_runtime.JSX.Element;
1807
- /**
1808
- * Higher-Order Component to protect components with authentication
1809
- *
1810
- * @template P - Component props type
1811
- * @param {ComponentType<P>} Component - Component to wrap with authentication
1812
- * @param {Omit<ProtectedRouteProps, 'children'>} [options] - Protection options
1813
- * @returns {(props: P) => JSX.Element} Wrapped component
1814
- *
1815
- * @example
1816
- * ```tsx
1817
- * const ProtectedComponent = withAuth(MyComponent, {
1818
- * redirectTo: "/login",
1819
- * loadingComponent: <CustomSpinner />
1820
- * });
1821
- * ```
1822
- */
1823
- declare const withAuth: <P extends object>(Component: ComponentType<P>, options?: Omit<ProtectedRouteProps, "children">) => (props: P) => react_jsx_runtime.JSX.Element;
1824
- /**
1825
- * Hook for authentication guard with custom checks
1826
- *
1827
- * @param {object} [options] - Guard options
1828
- * @param {boolean} [options.requireAuth=true] - Whether authentication is required
1829
- * @param {(authState: AuthState) => boolean} [options.customCheck] - Custom check function
1830
- * @returns {object} Guard result with canAccess, isLoading, and authState
1831
- *
1832
- * @example
1833
- * ```tsx
1834
- * const { canAccess, isLoading } = useAuthGuard({
1835
- * requireAuth: true,
1836
- * customCheck: (authState) => authState.user?.role === 'admin'
1837
- * });
1838
- * ```
1839
- */
1840
- declare const useAuthGuard: (options?: {
1841
- requireAuth?: boolean;
1842
- customCheck?: (authState: AuthState) => boolean;
1843
- }) => {
1844
- canAccess: boolean;
1845
- isLoading: boolean;
1846
- authState: AuthContextType;
1847
- };
1848
- /**
1849
- * Hook to check authentication on specific routes
1850
- * Useful for conditional checks within components
1851
- *
1852
- * @param {string} [fallbackPath='/'] - Path to redirect when not authenticated
1853
- * @returns {object} Object with isAuthenticated, isLoading, and redirectToLogin function
1854
- *
1855
- * @example
1856
- * ```tsx
1857
- * const { isAuthenticated, redirectToLogin } = useRouteAuth();
1858
- *
1859
- * if (!isAuthenticated) {
1860
- * return redirectToLogin();
1861
- * }
1862
- * ```
1863
- */
1864
- declare const useRouteAuth: (fallbackPath?: string) => {
1865
- isAuthenticated: boolean;
1866
- isLoading: boolean;
1867
- redirectToLogin: () => react_jsx_runtime.JSX.Element;
1868
- };
1869
- /**
1870
- * Get the root domain from the current window location
1871
- * Handles localhost and subdomain cases
1872
- *
1873
- * @returns {string} The root domain URL
1874
- */
1875
- declare const getRootDomain: () => string;
1876
-
1877
- /**
1878
- * Generic adapter for integrating AuthProvider with Zustand stores
1879
- * Users should import this file and pass their store instance
1880
- *
1881
- * @template S - Zustand store type that contains auth-related state
1882
- * @param {object} useAuthStore - Zustand store hook with getState method
1883
- * @param {() => S} useAuthStore.getState - Function to get current store state
1884
- * @returns {object} Adapter object with auth functions
1885
- *
1886
- * @example
1887
- * ```typescript
1888
- * // Define your Zustand store type
1889
- * interface AuthStore {
1890
- * sessionInfo?: SessionInfo;
1891
- * tokens?: AuthTokens;
1892
- * user?: AuthUser;
1893
- * signOut: () => void;
1894
- * }
1895
- *
1896
- * // Create the adapter
1897
- * const authAdapter = createZustandAuthAdapter(useAuthStore);
1898
- *
1899
- * // Use with AuthProvider
1900
- * <AuthProvider
1901
- * checkAuthFn={authAdapter.checkAuth}
1902
- * signOutFn={authAdapter.signOut}
1903
- * getUserFn={authAdapter.getUser}
1904
- * getSessionFn={authAdapter.getSessionInfo}
1905
- * getTokensFn={authAdapter.getTokens}
1906
- * >
1907
- * <App />
1908
- * </AuthProvider>
1909
- * ```
1910
- */
1911
- declare function createZustandAuthAdapter<S extends {
1912
- sessionInfo?: unknown;
1913
- tokens?: unknown;
1914
- user?: unknown;
1915
- signOut?: () => void;
1916
- }>(useAuthStore: {
1917
- getState: () => S;
1918
- }): {
1919
- /**
1920
- * Check if the user is authenticated based on sessionInfo and tokens
1921
- *
1922
- * @returns {Promise<boolean>} Promise that resolves to authentication status
1923
- */
1924
- checkAuth: () => Promise<boolean>;
1925
- /**
1926
- * Get the current user from the store
1927
- *
1928
- * @returns {unknown} Current user data from the store
1929
- */
1930
- getUser: () => unknown;
1931
- /**
1932
- * Get the current session information from the store
1933
- *
1934
- * @returns {unknown} Current session info from the store
1935
- */
1936
- getSessionInfo: () => unknown;
1937
- /**
1938
- * Get the current authentication tokens from the store
1939
- *
1940
- * @returns {unknown} Current tokens from the store
1941
- */
1942
- getTokens: () => unknown;
1943
- /**
1944
- * Sign out the user by calling the store's signOut function if available
1945
- *
1946
- * @returns {void}
1947
- */
1948
- signOut: () => void;
1949
- };
1950
-
1951
- /**
1952
- * Options interface for the useUrlAuthentication hook
1953
- *
1954
- * @template Tokens - Type for authentication tokens
1955
- * @template Session - Type for session information
1956
- * @template Profile - Type for profile information
1957
- *
1958
- * @interface UseUrlAuthOptions
1959
- * @property {(tokens: Tokens) => void} setTokens - Function to set authentication tokens
1960
- * @property {(session: Session) => void} setSessionInfo - Function to set session information
1961
- * @property {(profile: Profile) => void} [setSelectedProfile] - Optional function to set selected profile
1962
- * @property {object} api - API instance with get method
1963
- * @property {(endpoint: string, config: unknown) => Promise<unknown>} api.get - API get method
1964
- * @property {string} endpoint - API endpoint to fetch session data
1965
- * @property {(searchParams: URLSearchParams) => object} [extractParams] - Custom parameter extraction function
1966
- * @property {() => void} [clearParamsFromURL] - Function to clear URL parameters after processing
1967
- */
1968
- interface UseUrlAuthOptions<Tokens = unknown, Session = unknown, Profile = unknown> {
1969
- setTokens: (tokens: Tokens) => void;
1970
- setSessionInfo: (session: Session) => void;
1971
- setSelectedProfile?: (profile: Profile) => void;
1972
- api: {
1973
- get: (endpoint: string, config: unknown) => Promise<unknown>;
1974
- };
1975
- endpoint: string;
1976
- extractParams?: (searchParams: URLSearchParams) => {
1977
- sessionId: string;
1978
- token: string;
1979
- refreshToken: string;
1980
- };
1981
- clearParamsFromURL?: () => void;
1982
- }
1983
- /**
1984
- * Hook for handling URL-based authentication
1985
- * Extracts authentication parameters from URL and processes them
1986
- *
1987
- * @template Tokens - Type for authentication tokens
1988
- * @template Session - Type for session information
1989
- * @template Profile - Type for profile information
1990
- *
1991
- * @param {UseUrlAuthOptions<Tokens, Session, Profile>} options - Configuration options
1992
- * @returns {void}
1993
- *
1994
- * @example
1995
- * ```typescript
1996
- * useUrlAuthentication({
1997
- * setTokens: (tokens) => authStore.setTokens(tokens),
1998
- * setSessionInfo: (session) => authStore.setSessionInfo(session),
1999
- * setSelectedProfile: (profile) => authStore.setProfile(profile),
2000
- * api: apiInstance,
2001
- * endpoint: '/auth/session',
2002
- * clearParamsFromURL: () => navigate('/', { replace: true })
2003
- * });
2004
- * ```
2005
- */
2006
- declare function useUrlAuthentication<Tokens = unknown, Session = unknown, Profile = unknown>(options: UseUrlAuthOptions<Tokens, Session, Profile>): void;
2007
-
2008
- /**
2009
- * Type definition for API client with get method
2010
- *
2011
- * @template T - Type extending object with get method
2012
- */
2013
- type ApiClient<T = unknown> = {
2014
- get: (endpoint: string, config?: T) => Promise<unknown>;
2015
- };
2016
- /**
2017
- * Creates a memoized API configuration object compatible with useUrlAuthentication
2018
- *
2019
- * This hook wraps an API client instance to create a consistent interface
2020
- * for the useUrlAuthentication hook, ensuring proper memoization to prevent
2021
- * unnecessary re-renders.
2022
- *
2023
- * @template T - Generic type for API client configuration
2024
- * @param {ApiClient<T>} api - Axios instance or any API client with a get method
2025
- * @returns {object} Memoized API configuration object with get method
2026
- *
2027
- * @example
2028
- * ```typescript
2029
- * import { useApiConfig } from 'analytica-frontend-lib';
2030
- * import { useApi } from './services/apiService';
2031
- *
2032
- * function App() {
2033
- * const api = useApi();
2034
- * const apiConfig = useApiConfig(api);
2035
- *
2036
- * useUrlAuthentication({
2037
- * setTokens,
2038
- * setSessionInfo,
2039
- * setSelectedProfile,
2040
- * api: apiConfig,
2041
- * endpoint: '/auth/session-info',
2042
- * });
2043
- * }
2044
- * ```
2045
- */
2046
- declare function useApiConfig<T = unknown>(api: ApiClient<T>): {
2047
- get: (endpoint: string, config: unknown) => Promise<unknown>;
2048
- };
2049
-
2050
- declare enum QUESTION_DIFFICULTY {
2051
- FACIL = "FACIL",
2052
- MEDIO = "MEDIO",
2053
- DIFICIL = "DIFICIL"
2054
- }
2055
- declare enum QUESTION_TYPE {
2056
- ALTERNATIVA = "ALTERNATIVA",
2057
- DISSERTATIVA = "DISSERTATIVA",
2058
- MULTIPLA_CHOICE = "MULTIPLA_CHOICE"
2059
- }
2060
- declare enum QUESTION_STATUS {
2061
- APROVADO = "APROVADO",
2062
- REPROVADO = "REPROVADO"
2063
- }
2064
- interface Question {
2065
- id: string;
2066
- questionText: string;
2067
- description: string;
2068
- type: QUESTION_TYPE;
2069
- status: QUESTION_STATUS;
2070
- difficulty: QUESTION_DIFFICULTY;
2071
- examBoard: string;
2072
- examYear: string;
2073
- answerKey: null | string;
2074
- institutionIds: string[];
2075
- knowledgeMatrix: {
2076
- areaKnowledgeId: string;
2077
- subjectId: string;
2078
- topicId: string;
2079
- subtopicId: string;
2080
- contentId: string;
2081
- }[];
2082
- options: {
2083
- id: string;
2084
- option: string;
2085
- isCorrect: boolean;
2086
- }[];
2087
- }
2088
- interface Simulado {
2089
- id: string;
2090
- title: string;
2091
- category: string;
2092
- questions: Question[];
2093
- }
2094
- interface Atividade {
2095
- id: string;
2096
- title: string;
2097
- questions: Question[];
2098
- }
2099
- interface Aula {
2100
- id: string;
2101
- title: string;
2102
- questions: Question[];
2103
- }
2104
- interface UserAnswerItem {
2105
- questionId: string;
2106
- activityId: string;
2107
- userId: string;
2108
- answer: string | null;
2109
- optionId: string | null;
2110
- }
2111
- interface QuizState {
2112
- bySimulated?: Simulado;
2113
- byActivity?: Atividade;
2114
- byQuestionary?: Aula;
2115
- currentQuestionIndex: number;
2116
- selectedAnswers: Record<string, string>;
2117
- userAnswers: UserAnswerItem[];
2118
- timeElapsed: number;
2119
- isStarted: boolean;
2120
- isFinished: boolean;
2121
- userId: string;
2122
- setBySimulated: (simulado: Simulado) => void;
2123
- setByActivity: (atividade: Atividade) => void;
2124
- setByQuestionary: (aula: Aula) => void;
2125
- setUserId: (userId: string) => void;
2126
- setUserAnswers: (userAnswers: UserAnswerItem[]) => void;
2127
- goToNextQuestion: () => void;
2128
- goToPreviousQuestion: () => void;
2129
- goToQuestion: (index: number) => void;
2130
- getActiveQuiz: () => {
2131
- quiz: Simulado | Atividade | Aula;
2132
- type: 'bySimulated' | 'byActivity' | 'byQuestionary';
2133
- } | null;
2134
- selectAnswer: (questionId: string, answerId: string) => void;
2135
- selectMultipleAnswer: (questionId: string, answerIds: string[]) => void;
2136
- skipQuestion: () => void;
2137
- addUserAnswer: (questionId: string, answerId?: string) => void;
2138
- startQuiz: () => void;
2139
- finishQuiz: () => void;
2140
- resetQuiz: () => void;
2141
- updateTime: (time: number) => void;
2142
- startTimer: () => void;
2143
- stopTimer: () => void;
2144
- getCurrentQuestion: () => Question | null;
2145
- getTotalQuestions: () => number;
2146
- getAnsweredQuestions: () => number;
2147
- getUnansweredQuestions: () => number[];
2148
- getSkippedQuestions: () => number;
2149
- getProgress: () => number;
2150
- isQuestionAnswered: (questionId: string) => boolean;
2151
- isQuestionSkipped: (questionId: string) => boolean;
2152
- getCurrentAnswer: () => string | undefined;
2153
- getAllCurrentAnswer: () => UserAnswerItem[] | undefined;
2154
- getQuizTitle: () => string;
2155
- formatTime: (seconds: number) => string;
2156
- getUserAnswers: () => UserAnswerItem[];
2157
- getUnansweredQuestionsFromUserAnswers: () => number[];
2158
- getQuestionsGroupedBySubject: () => {
2159
- [key: string]: Question[];
2160
- };
2161
- getUserId: () => string;
2162
- setCurrentQuestion: (question: Question) => void;
2163
- getUserAnswerByQuestionId: (questionId: string) => UserAnswerItem | null;
2164
- isQuestionAnsweredByUserAnswers: (questionId: string) => boolean;
2165
- getQuestionStatusFromUserAnswers: (questionId: string) => 'answered' | 'unanswered' | 'skipped';
2166
- getUserAnswersForActivity: () => UserAnswerItem[];
2167
- }
2168
- declare const useQuizStore: zustand.UseBoundStore<Omit<zustand.StoreApi<QuizState>, "setState" | "devtools"> & {
2169
- setState(partial: QuizState | Partial<QuizState> | ((state: QuizState) => QuizState | Partial<QuizState>), replace?: false | undefined, action?: (string | {
2170
- [x: string]: unknown;
2171
- [x: number]: unknown;
2172
- [x: symbol]: unknown;
2173
- type: string;
2174
- }) | undefined): void;
2175
- setState(state: QuizState | ((state: QuizState) => QuizState), replace: true, action?: (string | {
2176
- [x: string]: unknown;
2177
- [x: number]: unknown;
2178
- [x: symbol]: unknown;
2179
- type: string;
2180
- }) | undefined): void;
2181
- devtools: {
2182
- cleanup: () => void;
2183
- };
2184
- }>;
2185
-
2186
- declare const Quiz: react.ForwardRefExoticComponent<{
2187
- children: ReactNode;
2188
- className?: string;
2189
- } & react.RefAttributes<HTMLDivElement>>;
2190
- declare const QuizHeaderResult: react.ForwardRefExoticComponent<{
2191
- className?: string;
2192
- } & react.RefAttributes<HTMLDivElement>>;
2193
- declare const QuizTitle: react.ForwardRefExoticComponent<{
2194
- className?: string;
2195
- } & react.RefAttributes<HTMLDivElement>>;
2196
- declare const QuizHeader: () => react_jsx_runtime.JSX.Element;
2197
- declare const QuizContent: react.ForwardRefExoticComponent<{
2198
- type?: "Alternativas" | "Dissertativa";
2199
- variant?: "result" | "default";
2200
- className?: string;
2201
- } & react.RefAttributes<HTMLDivElement>>;
2202
- interface QuizAlternativeInterface {
2203
- variant?: 'result' | 'default';
2204
- }
2205
- declare const QuizAlternative: ({ variant }: QuizAlternativeInterface) => react_jsx_runtime.JSX.Element;
2206
- declare const QuizQuestionList: ({ filterType, onQuestionClick, }?: {
2207
- filterType?: string;
2208
- onQuestionClick?: () => void;
2209
- }) => react_jsx_runtime.JSX.Element;
2210
- declare const QuizFooter: react.ForwardRefExoticComponent<{
2211
- className?: string;
2212
- variant?: "result" | "default";
2213
- onGoToSimulated?: () => void;
2214
- onDetailResult?: () => void;
2215
- } & react.RefAttributes<HTMLDivElement>>;
2216
- declare const QuizResultHeaderTitle: react.ForwardRefExoticComponent<{
2217
- className?: string;
2218
- } & react.RefAttributes<HTMLDivElement>>;
2219
- declare const QuizResultTitle: react.ForwardRefExoticComponent<{
2220
- className?: string;
2221
- } & react.RefAttributes<HTMLParagraphElement>>;
2222
- declare const QuizResultPerformance: react.ForwardRefExoticComponent<react.RefAttributes<HTMLDivElement>>;
2223
- declare const QuizListResult: react.ForwardRefExoticComponent<{
2224
- className?: string;
2225
- onSubjectClick?: (subject: string) => void;
2226
- } & react.RefAttributes<HTMLDivElement>>;
2227
- declare const QuizListResultByMateria: ({ subject, onQuestionClick, }: {
2228
- subject: string;
2229
- onQuestionClick: (question: Question) => void;
2230
- }) => react_jsx_runtime.JSX.Element;
2231
-
2232
- export { Alert, AlertDialog, AlternativesList, AuthProvider, Badge, Button, Calendar, CardAccordation, CardActivitiesResults, CardAudio, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardSimulationHistory, CardStatus, CardTest, CardTopic, CheckBox, CheckboxList, CheckboxListItem, Chips, Divider, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, HeaderAlternative, IconButton, IconRoundedButton, Input, Menu, MenuContent, MenuItem, MenuItemIcon, MenuLabel, MenuOverflow, Modal, MultipleChoiceList, NavButton, NotFound, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger, ProgressBar, ProgressCircle, ProtectedRoute, PublicRoute, Quiz, QuizAlternative, QuizContent, QuizFooter, QuizHeader, QuizHeaderResult, QuizListResult, QuizListResultByMateria, QuizQuestionList, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTitle, Radio, RadioGroup, RadioGroupItem, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, SelectionButton, Skeleton, SkeletonCard, SkeletonCircle, SkeletonList, SkeletonRectangle, SkeletonRounded, SkeletonTable, SkeletonText, Stepper, Table, Text, TextArea, Toast, Toaster, createZustandAuthAdapter, getRootDomain, useApiConfig, useAuth, useAuthGuard, useQuizStore, useRouteAuth, useToastStore, useUrlAuthentication, withAuth };
132
+ export { CheckboxList, CheckboxListItem };