analytica-frontend-lib 1.0.90 → 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 -2139
  286. package/dist/index.d.ts +42 -2139
  287. package/dist/index.js +3 -6
  288. package/dist/index.js.map +1 -0
  289. package/dist/index.mjs +3 -4
  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.mts CHANGED
@@ -1,400 +1,46 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ export { default as Text } from './Text/index.mjs';
2
+ export { default as Button } from './Button/index.mjs';
3
+ export { default as Badge } from './Badge/index.mjs';
4
+ export { default as Alert } from './Alert/index.mjs';
5
+ export { default as IconButton } from './IconButton/index.mjs';
6
+ export { default as IconRoundedButton } from './IconRoundedButton/index.mjs';
7
+ export { default as NavButton } from './NavButton/index.mjs';
8
+ export { default as SelectionButton } from './SelectionButton/index.mjs';
9
+ export { default as Table } from './Table/index.mjs';
10
+ export { default as CheckBox } from './CheckBox/index.mjs';
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.mjs';
15
+ export { default as TextArea } from './TextArea/index.mjs';
16
+ export { default as Toast } from './Toast/index.mjs';
17
+ export { default as Toaster } from './Toast/Toaster/index.mjs';
18
+ export { default as Divider } from './Divider/index.mjs';
19
+ export { default as useToastStore } from './Toast/ToastStore/index.mjs';
20
+ export { default as Input } from './Input/index.mjs';
21
+ export { default as Chips } from './Chips/index.mjs';
22
+ export { default as ProgressBar } from './ProgressBar/index.mjs';
23
+ export { default as ProgressCircle } from './ProgressCircle/index.mjs';
24
+ export { default as Stepper } from './Stepper/index.mjs';
25
+ export { default as Calendar } from './Calendar/index.mjs';
26
+ export { default as Modal } from './Modal/index.mjs';
27
+ export { CardAccordation } from './Accordation/index.mjs';
28
+ export { AlternativesList } from './Alternative/index.mjs';
29
+ export { AlertDialog } from './AlertDialog/index.mjs';
30
+ export { MultipleChoiceList } from './MultipleChoice/index.mjs';
31
+ export { default as DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.mjs';
32
+ export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.mjs';
33
+ export { default as Menu, MenuContent, MenuItem, MenuOverflow } from './Menu/index.mjs';
34
+ export { CardActivitiesResults, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardSimulationHistory, CardStatus, CardTest, CardTopic } from './Card/index.mjs';
35
+ export { Skeleton, SkeletonCard, SkeletonCircle, SkeletonList, SkeletonRectangle, SkeletonRounded, SkeletonTable, SkeletonText } from './Skeleton/index.mjs';
36
+ export { default as NotFound } from './NotFound/index.mjs';
37
+ export { AuthProvider, ProtectedRoute, PublicRoute, getRootDomain, useAuth, useAuthGuard, useRouteAuth, withAuth } from './Auth/index.mjs';
38
+ export { createZustandAuthAdapter } from './Auth/zustandAuthAdapter/index.mjs';
39
+ export { useUrlAuthentication } from './Auth/useUrlAuthentication/index.mjs';
40
+ export { useApiConfig } from './Auth/useApiConfig/index.mjs';
41
+ export { Quiz, QuizAlternative, QuizContent, QuizFooter, QuizHeader, QuizHeaderResult, QuizListResult, QuizListResultByMateria, QuizQuestionList, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTitle } from './Quiz/index.mjs';
42
+ export { useQuizStore } from './Quiz/useQuizStore/index.mjs';
43
+ import 'react/jsx-runtime';
398
44
 
399
45
  /**
400
46
  * CheckboxList size variants
@@ -483,1747 +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
- interface MenuOverflowProps extends HTMLAttributes<HTMLDivElement> {
1374
- children: ReactNode;
1375
- defaultValue: string;
1376
- value?: string;
1377
- onValueChange?: (value: string) => void;
1378
- }
1379
- declare const MenuOverflow: ({ children, className, defaultValue, value, onValueChange, ...props }: MenuOverflowProps) => react_jsx_runtime.JSX.Element;
1380
-
1381
- interface CardActivitiesResultsProps extends HTMLAttributes<HTMLDivElement> {
1382
- icon: ReactNode;
1383
- title: string;
1384
- subTitle: string;
1385
- header: string;
1386
- description?: string;
1387
- extended?: boolean;
1388
- action?: 'warning' | 'success' | 'error' | 'info';
1389
- }
1390
- declare const CardActivitiesResults: react.ForwardRefExoticComponent<CardActivitiesResultsProps & react.RefAttributes<HTMLDivElement>>;
1391
- interface CardQuestionProps extends HTMLAttributes<HTMLDivElement> {
1392
- header: string;
1393
- state?: 'done' | 'undone';
1394
- onClickButton?: (valueButton?: unknown) => void;
1395
- valueButton?: unknown;
1396
- }
1397
- declare const CardQuestions: react.ForwardRefExoticComponent<CardQuestionProps & react.RefAttributes<HTMLDivElement>>;
1398
- interface CardProgressProps extends HTMLAttributes<HTMLDivElement> {
1399
- header: string;
1400
- subhead?: string;
1401
- initialDate?: string;
1402
- endDate?: string;
1403
- progress?: number;
1404
- direction?: 'horizontal' | 'vertical';
1405
- icon: ReactNode;
1406
- color?: string;
1407
- progressVariant?: 'blue' | 'green';
1408
- showDates?: boolean;
1409
- }
1410
- declare const CardProgress: react.ForwardRefExoticComponent<CardProgressProps & react.RefAttributes<HTMLDivElement>>;
1411
- interface CardTopicProps extends HTMLAttributes<HTMLDivElement> {
1412
- header: string;
1413
- subHead?: string[];
1414
- progress: number;
1415
- showPercentage?: boolean;
1416
- progressVariant?: 'blue' | 'green';
1417
- }
1418
- declare const CardTopic: react.ForwardRefExoticComponent<CardTopicProps & react.RefAttributes<HTMLDivElement>>;
1419
- interface CardPerformanceProps extends HTMLAttributes<HTMLDivElement> {
1420
- header: string;
1421
- description?: string;
1422
- progress?: number;
1423
- labelProgress?: string;
1424
- actionVariant?: 'button' | 'caret';
1425
- progressVariant?: 'blue' | 'green';
1426
- onClickButton?: (valueButton?: unknown) => void;
1427
- valueButton?: unknown;
1428
- }
1429
- declare const CardPerformance: react.ForwardRefExoticComponent<CardPerformanceProps & react.RefAttributes<HTMLDivElement>>;
1430
- interface CardResultsProps extends HTMLAttributes<HTMLDivElement> {
1431
- header: string;
1432
- icon: ReactNode;
1433
- correct_answers: number;
1434
- incorrect_answers: number;
1435
- direction?: 'row' | 'col';
1436
- color?: string;
1437
- }
1438
- declare const CardResults: react.ForwardRefExoticComponent<CardResultsProps & react.RefAttributes<HTMLDivElement>>;
1439
- interface CardStatusProps extends HTMLAttributes<HTMLDivElement> {
1440
- header: string;
1441
- status?: 'correct' | 'incorrect';
1442
- label?: string;
1443
- }
1444
- declare const CardStatus: react.ForwardRefExoticComponent<CardStatusProps & react.RefAttributes<HTMLDivElement>>;
1445
- interface CardAudioProps extends HTMLAttributes<HTMLDivElement> {
1446
- src?: string;
1447
- title?: string;
1448
- onPlay?: () => void;
1449
- onPause?: () => void;
1450
- onEnded?: () => void;
1451
- onAudioTimeUpdate?: (currentTime: number, duration: number) => void;
1452
- loop?: boolean;
1453
- preload?: 'none' | 'metadata' | 'auto';
1454
- tracks?: Array<{
1455
- kind: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata';
1456
- src: string;
1457
- srcLang: string;
1458
- label: string;
1459
- default?: boolean;
1460
- }>;
1461
- }
1462
- declare const CardAudio: react.ForwardRefExoticComponent<CardAudioProps & react.RefAttributes<HTMLDivElement>>;
1463
- interface CardSimuladoProps extends HTMLAttributes<HTMLDivElement> {
1464
- title: string;
1465
- duration?: string;
1466
- info: string;
1467
- backgroundColor: 'enem' | 'prova' | 'simuladao' | 'vestibular';
1468
- }
1469
- declare const CardSimulado: react.ForwardRefExoticComponent<CardSimuladoProps & react.RefAttributes<HTMLDivElement>>;
1470
- interface CardTestProps extends Omit<HTMLAttributes<HTMLElement>, 'onSelect'> {
1471
- title: string;
1472
- duration?: string;
1473
- questionsCount?: number;
1474
- additionalInfo?: string;
1475
- selected?: boolean;
1476
- onSelect?: (selected: boolean) => void;
1477
- }
1478
- declare const CardTest: react.ForwardRefExoticComponent<CardTestProps & react.RefAttributes<HTMLElement>>;
1479
- interface SimulationItem {
1480
- id: string;
1481
- title: string;
1482
- type: 'enem' | 'prova' | 'simulado' | 'vestibular';
1483
- info: string;
1484
- }
1485
- interface SimulationHistoryData {
1486
- date: string;
1487
- simulations: SimulationItem[];
1488
- }
1489
- interface CardSimulationHistoryProps extends HTMLAttributes<HTMLDivElement> {
1490
- data: SimulationHistoryData[];
1491
- onSimulationClick?: (simulation: SimulationItem) => void;
1492
- }
1493
- declare const CardSimulationHistory: react.ForwardRefExoticComponent<CardSimulationHistoryProps & react.RefAttributes<HTMLDivElement>>;
1494
-
1495
- interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
1496
- variant?: 'text' | 'circular' | 'rectangular' | 'rounded';
1497
- width?: string | number;
1498
- height?: string | number;
1499
- animation?: 'pulse' | 'none';
1500
- lines?: number;
1501
- spacing?: 'none' | 'small' | 'medium' | 'large';
1502
- }
1503
- declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLDivElement>>;
1504
- declare const SkeletonText: react.ForwardRefExoticComponent<Omit<SkeletonProps, "variant"> & react.RefAttributes<HTMLDivElement>>;
1505
- declare const SkeletonCircle: react.ForwardRefExoticComponent<Omit<SkeletonProps, "variant"> & react.RefAttributes<HTMLDivElement>>;
1506
- declare const SkeletonRectangle: react.ForwardRefExoticComponent<Omit<SkeletonProps, "variant"> & react.RefAttributes<HTMLDivElement>>;
1507
- declare const SkeletonRounded: react.ForwardRefExoticComponent<Omit<SkeletonProps, "variant"> & react.RefAttributes<HTMLDivElement>>;
1508
- interface SkeletonCardProps extends HTMLAttributes<HTMLDivElement> {
1509
- showAvatar?: boolean;
1510
- showTitle?: boolean;
1511
- showDescription?: boolean;
1512
- showActions?: boolean;
1513
- lines?: number;
1514
- }
1515
- declare const SkeletonCard: react.ForwardRefExoticComponent<SkeletonCardProps & react.RefAttributes<HTMLDivElement>>;
1516
- interface SkeletonListProps extends HTMLAttributes<HTMLDivElement> {
1517
- items?: number;
1518
- showAvatar?: boolean;
1519
- showTitle?: boolean;
1520
- showDescription?: boolean;
1521
- lines?: number;
1522
- }
1523
- declare const SkeletonList: react.ForwardRefExoticComponent<SkeletonListProps & react.RefAttributes<HTMLDivElement>>;
1524
- interface SkeletonTableProps extends HTMLAttributes<HTMLDivElement> {
1525
- rows?: number;
1526
- columns?: number;
1527
- showHeader?: boolean;
1528
- }
1529
- declare const SkeletonTable: react.ForwardRefExoticComponent<SkeletonTableProps & react.RefAttributes<HTMLDivElement>>;
1530
-
1531
- /**
1532
- * Props interface for the NotFound component
1533
- *
1534
- * @interface NotFoundProps
1535
- * @property {string} [title] - Custom title text (default: "Página não encontrada")
1536
- * @property {string} [description] - Custom description text
1537
- * @property {string} [buttonText] - Custom button text (default: "Voltar")
1538
- * @property {() => void} [onButtonClick] - Callback function for button click
1539
- * @property {string} [className] - Additional CSS classes for the container
1540
- * @property {'404' | '500' | 'custom'} [errorType] - Type of error to display (default: '404')
1541
- * @property {string} [customErrorCode] - Custom error code when errorType is 'custom'
1542
- */
1543
- interface NotFoundProps {
1544
- title?: string;
1545
- description?: string;
1546
- buttonText?: string;
1547
- onButtonClick?: () => void;
1548
- className?: string;
1549
- errorType?: '404' | '500' | 'custom';
1550
- customErrorCode?: string;
1551
- }
1552
- /**
1553
- * NotFound component for displaying error pages
1554
- *
1555
- * A reusable component for displaying 404, 500, or custom error pages
1556
- * with configurable content and navigation button.
1557
- *
1558
- * @param {NotFoundProps} props - The component props
1559
- * @returns {JSX.Element} The NotFound component
1560
- *
1561
- * @example
1562
- * ```typescript
1563
- * // Basic 404 page
1564
- * <NotFound onButtonClick={() => navigate('/dashboard')} />
1565
- *
1566
- * // Custom error page
1567
- * <NotFound
1568
- * errorType="500"
1569
- * title="Erro interno do servidor"
1570
- * description="Algo deu errado. Tente novamente mais tarde."
1571
- * buttonText="Tentar novamente"
1572
- * onButtonClick={() => window.location.reload()}
1573
- * />
1574
- *
1575
- * // Custom error code
1576
- * <NotFound
1577
- * errorType="custom"
1578
- * customErrorCode="403"
1579
- * title="Acesso negado"
1580
- * description="Você não tem permissão para acessar esta página."
1581
- * />
1582
- * ```
1583
- */
1584
- declare const NotFound: ({ title, description, buttonText, onButtonClick, className, errorType, customErrorCode, }: NotFoundProps) => react_jsx_runtime.JSX.Element;
1585
-
1586
- /**
1587
- * Interface for basic authentication tokens
1588
- *
1589
- * @interface AuthTokens
1590
- * @property {string} token - Main authentication token
1591
- * @property {string} refreshToken - Token used to refresh the main token
1592
- * @property {unknown} [key] - Additional properties that can be included
1593
- */
1594
- interface AuthTokens {
1595
- token: string;
1596
- refreshToken: string;
1597
- [key: string]: unknown;
1598
- }
1599
- /**
1600
- * Interface for basic user information
1601
- *
1602
- * @interface AuthUser
1603
- * @property {string} id - Unique user identifier
1604
- * @property {string} [name] - Optional user name
1605
- * @property {string} [email] - Optional user email
1606
- * @property {unknown} [key] - Additional user properties
1607
- */
1608
- interface AuthUser {
1609
- id: string;
1610
- name?: string;
1611
- email?: string;
1612
- [key: string]: unknown;
1613
- }
1614
- /**
1615
- * Interface for basic session information
1616
- *
1617
- * @interface SessionInfo
1618
- * @property {string} [institutionId] - Optional institution identifier
1619
- * @property {string} [profileId] - Optional profile identifier
1620
- * @property {string} [schoolId] - Optional school identifier
1621
- * @property {string} [schoolYearId] - Optional school year identifier
1622
- * @property {string} [classId] - Optional class identifier
1623
- * @property {unknown} [key] - Additional session properties
1624
- */
1625
- interface SessionInfo {
1626
- institutionId?: string;
1627
- profileId?: string;
1628
- schoolId?: string;
1629
- schoolYearId?: string;
1630
- classId?: string;
1631
- [key: string]: unknown;
1632
- }
1633
- /**
1634
- * Interface for authentication state
1635
- *
1636
- * @interface AuthState
1637
- * @property {boolean} isAuthenticated - Whether the user is authenticated
1638
- * @property {boolean} isLoading - Whether authentication is being checked
1639
- * @property {AuthUser | null} [user] - Current user information
1640
- * @property {SessionInfo | null} [sessionInfo] - Current session information
1641
- * @property {AuthTokens | null} [tokens] - Current authentication tokens
1642
- */
1643
- interface AuthState {
1644
- isAuthenticated: boolean;
1645
- isLoading: boolean;
1646
- user?: AuthUser | null;
1647
- sessionInfo?: SessionInfo | null;
1648
- tokens?: AuthTokens | null;
1649
- }
1650
- /**
1651
- * Interface for authentication context functions and state
1652
- *
1653
- * @interface AuthContextType
1654
- * @extends {AuthState}
1655
- * @property {() => Promise<boolean>} checkAuth - Function to check authentication status
1656
- * @property {() => void} signOut - Function to sign out the user
1657
- */
1658
- interface AuthContextType extends AuthState {
1659
- checkAuth: () => Promise<boolean>;
1660
- signOut: () => void;
1661
- }
1662
- /**
1663
- * Props for the AuthProvider component
1664
- *
1665
- * @interface AuthProviderProps
1666
- * @property {ReactNode} children - Child components
1667
- * @property {() => Promise<boolean> | boolean} [checkAuthFn] - Function to check if user is authenticated
1668
- * @property {() => void} [signOutFn] - Function to handle logout
1669
- * @property {Partial<AuthState>} [initialAuthState] - Initial authentication state
1670
- * @property {() => AuthUser | null | undefined} [getUserFn] - Function to get user data
1671
- * @property {() => SessionInfo | null | undefined} [getSessionFn] - Function to get session info
1672
- * @property {() => AuthTokens | null | undefined} [getTokensFn] - Function to get tokens
1673
- */
1674
- interface AuthProviderProps {
1675
- children: ReactNode;
1676
- /**
1677
- * Função para verificar se o usuário está autenticado
1678
- * Deve retornar uma Promise<boolean>
1679
- */
1680
- checkAuthFn?: () => Promise<boolean> | boolean;
1681
- /**
1682
- * Função para fazer logout
1683
- */
1684
- signOutFn?: () => void;
1685
- /**
1686
- * Estado de autenticação inicial
1687
- */
1688
- initialAuthState?: Partial<AuthState>;
1689
- /**
1690
- * Função para obter dados do usuário (opcional)
1691
- */
1692
- getUserFn?: () => AuthUser | null | undefined;
1693
- /**
1694
- * Função para obter informações da sessão (opcional)
1695
- */
1696
- getSessionFn?: () => SessionInfo | null | undefined;
1697
- /**
1698
- * Função para obter tokens (opcional)
1699
- */
1700
- getTokensFn?: () => AuthTokens | null | undefined;
1701
- }
1702
- /**
1703
- * Authentication provider that manages global auth state
1704
- * Compatible with any store (Zustand, Redux, Context, etc.)
1705
- *
1706
- * @param {AuthProviderProps} props - The provider props
1707
- * @returns {JSX.Element} The provider component
1708
- *
1709
- * @example
1710
- * ```tsx
1711
- * <AuthProvider
1712
- * checkAuthFn={checkAuthFunction}
1713
- * signOutFn={signOutFunction}
1714
- * getUserFn={getUserFunction}
1715
- * >
1716
- * <App />
1717
- * </AuthProvider>
1718
- * ```
1719
- */
1720
- declare const AuthProvider: ({ children, checkAuthFn, signOutFn, initialAuthState, getUserFn, getSessionFn, getTokensFn, }: AuthProviderProps) => react_jsx_runtime.JSX.Element;
1721
- /**
1722
- * Hook to use the authentication context
1723
- *
1724
- * @throws {Error} When used outside of AuthProvider
1725
- * @returns {AuthContextType} The authentication context
1726
- *
1727
- * @example
1728
- * ```tsx
1729
- * const { isAuthenticated, user, signOut } = useAuth();
1730
- * ```
1731
- */
1732
- declare const useAuth: () => AuthContextType;
1733
- /**
1734
- * Props for the ProtectedRoute component
1735
- *
1736
- * @interface ProtectedRouteProps
1737
- * @property {ReactNode} children - Components to render when authenticated
1738
- * @property {string} [redirectTo] - Path to redirect when not authenticated (default: '/')
1739
- * @property {ReactNode} [loadingComponent] - Custom loading component
1740
- * @property {(authState: AuthState) => boolean} [additionalCheck] - Additional authentication check
1741
- */
1742
- interface ProtectedRouteProps {
1743
- children: ReactNode;
1744
- /**
1745
- * Path para redirecionamento quando não autenticado
1746
- */
1747
- redirectTo?: string;
1748
- /**
1749
- * Componente de loading personalizado
1750
- */
1751
- loadingComponent?: ReactNode;
1752
- /**
1753
- * Função adicional de verificação (ex: verificar permissões específicas)
1754
- */
1755
- additionalCheck?: (authState: AuthState) => boolean;
1756
- }
1757
- /**
1758
- * Componente para proteger rotas que requerem autenticação
1759
- *
1760
- * @example
1761
- * ```tsx
1762
- * <ProtectedRoute redirectTo="/login">
1763
- * <PainelPage />
1764
- * </ProtectedRoute>
1765
- * ```
1766
- */
1767
- declare const ProtectedRoute: ({ children, redirectTo, loadingComponent, additionalCheck, }: ProtectedRouteProps) => react_jsx_runtime.JSX.Element | null;
1768
- /**
1769
- * Props for the PublicRoute component
1770
- *
1771
- * @interface PublicRouteProps
1772
- * @property {ReactNode} children - Components to render
1773
- * @property {string} [redirectTo] - Path to redirect to (default: '/painel')
1774
- * @property {boolean} [redirectIfAuthenticated] - Whether to redirect if authenticated
1775
- * @property {boolean} [checkAuthBeforeRender] - Whether to check auth before rendering
1776
- */
1777
- interface PublicRouteProps {
1778
- children: ReactNode;
1779
- /**
1780
- * Path para redirecionamento
1781
- */
1782
- redirectTo?: string;
1783
- /**
1784
- * Se deve redirecionar quando usuário estiver autenticado
1785
- */
1786
- redirectIfAuthenticated?: boolean;
1787
- /**
1788
- * Se deve verificar autenticação antes de renderizar
1789
- */
1790
- checkAuthBeforeRender?: boolean;
1791
- }
1792
- /**
1793
- * Componente para rotas públicas (login, recuperação de senha, etc.)
1794
- * Opcionalmente redireciona se o usuário já estiver autenticado
1795
- *
1796
- * @example
1797
- * ```tsx
1798
- * <PublicRoute redirectTo="/painel" redirectIfAuthenticated={true}>
1799
- * <LoginPage />
1800
- * </PublicRoute>
1801
- * ```
1802
- */
1803
- declare const PublicRoute: ({ children, redirectTo, redirectIfAuthenticated, checkAuthBeforeRender, }: PublicRouteProps) => react_jsx_runtime.JSX.Element;
1804
- /**
1805
- * Higher-Order Component to protect components with authentication
1806
- *
1807
- * @template P - Component props type
1808
- * @param {ComponentType<P>} Component - Component to wrap with authentication
1809
- * @param {Omit<ProtectedRouteProps, 'children'>} [options] - Protection options
1810
- * @returns {(props: P) => JSX.Element} Wrapped component
1811
- *
1812
- * @example
1813
- * ```tsx
1814
- * const ProtectedComponent = withAuth(MyComponent, {
1815
- * redirectTo: "/login",
1816
- * loadingComponent: <CustomSpinner />
1817
- * });
1818
- * ```
1819
- */
1820
- declare const withAuth: <P extends object>(Component: ComponentType<P>, options?: Omit<ProtectedRouteProps, "children">) => (props: P) => react_jsx_runtime.JSX.Element;
1821
- /**
1822
- * Hook for authentication guard with custom checks
1823
- *
1824
- * @param {object} [options] - Guard options
1825
- * @param {boolean} [options.requireAuth=true] - Whether authentication is required
1826
- * @param {(authState: AuthState) => boolean} [options.customCheck] - Custom check function
1827
- * @returns {object} Guard result with canAccess, isLoading, and authState
1828
- *
1829
- * @example
1830
- * ```tsx
1831
- * const { canAccess, isLoading } = useAuthGuard({
1832
- * requireAuth: true,
1833
- * customCheck: (authState) => authState.user?.role === 'admin'
1834
- * });
1835
- * ```
1836
- */
1837
- declare const useAuthGuard: (options?: {
1838
- requireAuth?: boolean;
1839
- customCheck?: (authState: AuthState) => boolean;
1840
- }) => {
1841
- canAccess: boolean;
1842
- isLoading: boolean;
1843
- authState: AuthContextType;
1844
- };
1845
- /**
1846
- * Hook to check authentication on specific routes
1847
- * Useful for conditional checks within components
1848
- *
1849
- * @param {string} [fallbackPath='/'] - Path to redirect when not authenticated
1850
- * @returns {object} Object with isAuthenticated, isLoading, and redirectToLogin function
1851
- *
1852
- * @example
1853
- * ```tsx
1854
- * const { isAuthenticated, redirectToLogin } = useRouteAuth();
1855
- *
1856
- * if (!isAuthenticated) {
1857
- * return redirectToLogin();
1858
- * }
1859
- * ```
1860
- */
1861
- declare const useRouteAuth: (fallbackPath?: string) => {
1862
- isAuthenticated: boolean;
1863
- isLoading: boolean;
1864
- redirectToLogin: () => react_jsx_runtime.JSX.Element;
1865
- };
1866
- /**
1867
- * Get the root domain from the current window location
1868
- * Handles localhost and subdomain cases
1869
- *
1870
- * @returns {string} The root domain URL
1871
- */
1872
- declare const getRootDomain: () => string;
1873
-
1874
- /**
1875
- * Generic adapter for integrating AuthProvider with Zustand stores
1876
- * Users should import this file and pass their store instance
1877
- *
1878
- * @template S - Zustand store type that contains auth-related state
1879
- * @param {object} useAuthStore - Zustand store hook with getState method
1880
- * @param {() => S} useAuthStore.getState - Function to get current store state
1881
- * @returns {object} Adapter object with auth functions
1882
- *
1883
- * @example
1884
- * ```typescript
1885
- * // Define your Zustand store type
1886
- * interface AuthStore {
1887
- * sessionInfo?: SessionInfo;
1888
- * tokens?: AuthTokens;
1889
- * user?: AuthUser;
1890
- * signOut: () => void;
1891
- * }
1892
- *
1893
- * // Create the adapter
1894
- * const authAdapter = createZustandAuthAdapter(useAuthStore);
1895
- *
1896
- * // Use with AuthProvider
1897
- * <AuthProvider
1898
- * checkAuthFn={authAdapter.checkAuth}
1899
- * signOutFn={authAdapter.signOut}
1900
- * getUserFn={authAdapter.getUser}
1901
- * getSessionFn={authAdapter.getSessionInfo}
1902
- * getTokensFn={authAdapter.getTokens}
1903
- * >
1904
- * <App />
1905
- * </AuthProvider>
1906
- * ```
1907
- */
1908
- declare function createZustandAuthAdapter<S extends {
1909
- sessionInfo?: unknown;
1910
- tokens?: unknown;
1911
- user?: unknown;
1912
- signOut?: () => void;
1913
- }>(useAuthStore: {
1914
- getState: () => S;
1915
- }): {
1916
- /**
1917
- * Check if the user is authenticated based on sessionInfo and tokens
1918
- *
1919
- * @returns {Promise<boolean>} Promise that resolves to authentication status
1920
- */
1921
- checkAuth: () => Promise<boolean>;
1922
- /**
1923
- * Get the current user from the store
1924
- *
1925
- * @returns {unknown} Current user data from the store
1926
- */
1927
- getUser: () => unknown;
1928
- /**
1929
- * Get the current session information from the store
1930
- *
1931
- * @returns {unknown} Current session info from the store
1932
- */
1933
- getSessionInfo: () => unknown;
1934
- /**
1935
- * Get the current authentication tokens from the store
1936
- *
1937
- * @returns {unknown} Current tokens from the store
1938
- */
1939
- getTokens: () => unknown;
1940
- /**
1941
- * Sign out the user by calling the store's signOut function if available
1942
- *
1943
- * @returns {void}
1944
- */
1945
- signOut: () => void;
1946
- };
1947
-
1948
- /**
1949
- * Options interface for the useUrlAuthentication hook
1950
- *
1951
- * @template Tokens - Type for authentication tokens
1952
- * @template Session - Type for session information
1953
- * @template Profile - Type for profile information
1954
- *
1955
- * @interface UseUrlAuthOptions
1956
- * @property {(tokens: Tokens) => void} setTokens - Function to set authentication tokens
1957
- * @property {(session: Session) => void} setSessionInfo - Function to set session information
1958
- * @property {(profile: Profile) => void} [setSelectedProfile] - Optional function to set selected profile
1959
- * @property {object} api - API instance with get method
1960
- * @property {(endpoint: string, config: unknown) => Promise<unknown>} api.get - API get method
1961
- * @property {string} endpoint - API endpoint to fetch session data
1962
- * @property {(searchParams: URLSearchParams) => object} [extractParams] - Custom parameter extraction function
1963
- * @property {() => void} [clearParamsFromURL] - Function to clear URL parameters after processing
1964
- */
1965
- interface UseUrlAuthOptions<Tokens = unknown, Session = unknown, Profile = unknown> {
1966
- setTokens: (tokens: Tokens) => void;
1967
- setSessionInfo: (session: Session) => void;
1968
- setSelectedProfile?: (profile: Profile) => void;
1969
- api: {
1970
- get: (endpoint: string, config: unknown) => Promise<unknown>;
1971
- };
1972
- endpoint: string;
1973
- extractParams?: (searchParams: URLSearchParams) => {
1974
- sessionId: string;
1975
- token: string;
1976
- refreshToken: string;
1977
- };
1978
- clearParamsFromURL?: () => void;
1979
- }
1980
- /**
1981
- * Hook for handling URL-based authentication
1982
- * Extracts authentication parameters from URL and processes them
1983
- *
1984
- * @template Tokens - Type for authentication tokens
1985
- * @template Session - Type for session information
1986
- * @template Profile - Type for profile information
1987
- *
1988
- * @param {UseUrlAuthOptions<Tokens, Session, Profile>} options - Configuration options
1989
- * @returns {void}
1990
- *
1991
- * @example
1992
- * ```typescript
1993
- * useUrlAuthentication({
1994
- * setTokens: (tokens) => authStore.setTokens(tokens),
1995
- * setSessionInfo: (session) => authStore.setSessionInfo(session),
1996
- * setSelectedProfile: (profile) => authStore.setProfile(profile),
1997
- * api: apiInstance,
1998
- * endpoint: '/auth/session',
1999
- * clearParamsFromURL: () => navigate('/', { replace: true })
2000
- * });
2001
- * ```
2002
- */
2003
- declare function useUrlAuthentication<Tokens = unknown, Session = unknown, Profile = unknown>(options: UseUrlAuthOptions<Tokens, Session, Profile>): void;
2004
-
2005
- /**
2006
- * Type definition for API client with get method
2007
- *
2008
- * @template T - Type extending object with get method
2009
- */
2010
- type ApiClient<T = unknown> = {
2011
- get: (endpoint: string, config?: T) => Promise<unknown>;
2012
- };
2013
- /**
2014
- * Creates a memoized API configuration object compatible with useUrlAuthentication
2015
- *
2016
- * This hook wraps an API client instance to create a consistent interface
2017
- * for the useUrlAuthentication hook, ensuring proper memoization to prevent
2018
- * unnecessary re-renders.
2019
- *
2020
- * @template T - Generic type for API client configuration
2021
- * @param {ApiClient<T>} api - Axios instance or any API client with a get method
2022
- * @returns {object} Memoized API configuration object with get method
2023
- *
2024
- * @example
2025
- * ```typescript
2026
- * import { useApiConfig } from 'analytica-frontend-lib';
2027
- * import { useApi } from './services/apiService';
2028
- *
2029
- * function App() {
2030
- * const api = useApi();
2031
- * const apiConfig = useApiConfig(api);
2032
- *
2033
- * useUrlAuthentication({
2034
- * setTokens,
2035
- * setSessionInfo,
2036
- * setSelectedProfile,
2037
- * api: apiConfig,
2038
- * endpoint: '/auth/session-info',
2039
- * });
2040
- * }
2041
- * ```
2042
- */
2043
- declare function useApiConfig<T = unknown>(api: ApiClient<T>): {
2044
- get: (endpoint: string, config: unknown) => Promise<unknown>;
2045
- };
2046
-
2047
- declare enum QUESTION_DIFFICULTY {
2048
- FACIL = "FACIL",
2049
- MEDIO = "MEDIO",
2050
- DIFICIL = "DIFICIL"
2051
- }
2052
- declare enum QUESTION_TYPE {
2053
- ALTERNATIVA = "ALTERNATIVA",
2054
- DISSERTATIVA = "DISSERTATIVA",
2055
- MULTIPLA_CHOICE = "MULTIPLA_CHOICE"
2056
- }
2057
- declare enum QUESTION_STATUS {
2058
- APROVADO = "APROVADO",
2059
- REPROVADO = "REPROVADO"
2060
- }
2061
- interface Question {
2062
- id: string;
2063
- questionText: string;
2064
- description: string;
2065
- type: QUESTION_TYPE;
2066
- status: QUESTION_STATUS;
2067
- difficulty: QUESTION_DIFFICULTY;
2068
- examBoard: string;
2069
- examYear: string;
2070
- answerKey: null | string;
2071
- institutionIds: string[];
2072
- knowledgeMatrix: {
2073
- areaKnowledgeId: string;
2074
- subjectId: string;
2075
- topicId: string;
2076
- subtopicId: string;
2077
- contentId: string;
2078
- }[];
2079
- options: {
2080
- id: string;
2081
- option: string;
2082
- isCorrect: boolean;
2083
- }[];
2084
- }
2085
- interface Simulado {
2086
- id: string;
2087
- title: string;
2088
- category: string;
2089
- questions: Question[];
2090
- }
2091
- interface Atividade {
2092
- id: string;
2093
- title: string;
2094
- questions: Question[];
2095
- }
2096
- interface Aula {
2097
- id: string;
2098
- title: string;
2099
- questions: Question[];
2100
- }
2101
- interface UserAnswerItem {
2102
- questionId: string;
2103
- activityId: string;
2104
- userId: string;
2105
- answer: string | null;
2106
- optionId: string | null;
2107
- }
2108
- interface QuizState {
2109
- bySimulated?: Simulado;
2110
- byActivity?: Atividade;
2111
- byQuestionary?: Aula;
2112
- currentQuestionIndex: number;
2113
- selectedAnswers: Record<string, string>;
2114
- userAnswers: UserAnswerItem[];
2115
- timeElapsed: number;
2116
- isStarted: boolean;
2117
- isFinished: boolean;
2118
- userId: string;
2119
- setBySimulated: (simulado: Simulado) => void;
2120
- setByActivity: (atividade: Atividade) => void;
2121
- setByQuestionary: (aula: Aula) => void;
2122
- setUserId: (userId: string) => void;
2123
- setUserAnswers: (userAnswers: UserAnswerItem[]) => void;
2124
- goToNextQuestion: () => void;
2125
- goToPreviousQuestion: () => void;
2126
- goToQuestion: (index: number) => void;
2127
- getActiveQuiz: () => {
2128
- quiz: Simulado | Atividade | Aula;
2129
- type: 'bySimulated' | 'byActivity' | 'byQuestionary';
2130
- } | null;
2131
- selectAnswer: (questionId: string, answerId: string) => void;
2132
- selectMultipleAnswer: (questionId: string, answerIds: string[]) => void;
2133
- skipQuestion: () => void;
2134
- addUserAnswer: (questionId: string, answerId?: string) => void;
2135
- startQuiz: () => void;
2136
- finishQuiz: () => void;
2137
- resetQuiz: () => void;
2138
- updateTime: (time: number) => void;
2139
- startTimer: () => void;
2140
- stopTimer: () => void;
2141
- getCurrentQuestion: () => Question | null;
2142
- getTotalQuestions: () => number;
2143
- getAnsweredQuestions: () => number;
2144
- getUnansweredQuestions: () => number[];
2145
- getSkippedQuestions: () => number;
2146
- getProgress: () => number;
2147
- isQuestionAnswered: (questionId: string) => boolean;
2148
- isQuestionSkipped: (questionId: string) => boolean;
2149
- getCurrentAnswer: () => string | undefined;
2150
- getAllCurrentAnswer: () => UserAnswerItem[] | undefined;
2151
- getQuizTitle: () => string;
2152
- formatTime: (seconds: number) => string;
2153
- getUserAnswers: () => UserAnswerItem[];
2154
- getUnansweredQuestionsFromUserAnswers: () => number[];
2155
- getQuestionsGroupedBySubject: () => {
2156
- [key: string]: Question[];
2157
- };
2158
- getUserId: () => string;
2159
- setCurrentQuestion: (question: Question) => void;
2160
- getUserAnswerByQuestionId: (questionId: string) => UserAnswerItem | null;
2161
- isQuestionAnsweredByUserAnswers: (questionId: string) => boolean;
2162
- getQuestionStatusFromUserAnswers: (questionId: string) => 'answered' | 'unanswered' | 'skipped';
2163
- getUserAnswersForActivity: () => UserAnswerItem[];
2164
- }
2165
- declare const useQuizStore: zustand.UseBoundStore<Omit<zustand.StoreApi<QuizState>, "setState" | "devtools"> & {
2166
- setState(partial: QuizState | Partial<QuizState> | ((state: QuizState) => QuizState | Partial<QuizState>), replace?: false | undefined, action?: (string | {
2167
- [x: string]: unknown;
2168
- [x: number]: unknown;
2169
- [x: symbol]: unknown;
2170
- type: string;
2171
- }) | undefined): void;
2172
- setState(state: QuizState | ((state: QuizState) => QuizState), replace: true, action?: (string | {
2173
- [x: string]: unknown;
2174
- [x: number]: unknown;
2175
- [x: symbol]: unknown;
2176
- type: string;
2177
- }) | undefined): void;
2178
- devtools: {
2179
- cleanup: () => void;
2180
- };
2181
- }>;
2182
-
2183
- declare const Quiz: react.ForwardRefExoticComponent<{
2184
- children: ReactNode;
2185
- className?: string;
2186
- } & react.RefAttributes<HTMLDivElement>>;
2187
- declare const QuizHeaderResult: react.ForwardRefExoticComponent<{
2188
- className?: string;
2189
- } & react.RefAttributes<HTMLDivElement>>;
2190
- declare const QuizTitle: react.ForwardRefExoticComponent<{
2191
- className?: string;
2192
- } & react.RefAttributes<HTMLDivElement>>;
2193
- declare const QuizHeader: () => react_jsx_runtime.JSX.Element;
2194
- declare const QuizContent: react.ForwardRefExoticComponent<{
2195
- type?: "Alternativas" | "Dissertativa";
2196
- variant?: "result" | "default";
2197
- className?: string;
2198
- } & react.RefAttributes<HTMLDivElement>>;
2199
- interface QuizAlternativeInterface {
2200
- variant?: 'result' | 'default';
2201
- }
2202
- declare const QuizAlternative: ({ variant }: QuizAlternativeInterface) => react_jsx_runtime.JSX.Element;
2203
- declare const QuizQuestionList: ({ filterType, onQuestionClick, }?: {
2204
- filterType?: string;
2205
- onQuestionClick?: () => void;
2206
- }) => react_jsx_runtime.JSX.Element;
2207
- declare const QuizFooter: react.ForwardRefExoticComponent<{
2208
- className?: string;
2209
- variant?: "result" | "default";
2210
- onGoToSimulated?: () => void;
2211
- onDetailResult?: () => void;
2212
- } & react.RefAttributes<HTMLDivElement>>;
2213
- declare const QuizResultHeaderTitle: react.ForwardRefExoticComponent<{
2214
- className?: string;
2215
- } & react.RefAttributes<HTMLDivElement>>;
2216
- declare const QuizResultTitle: react.ForwardRefExoticComponent<{
2217
- className?: string;
2218
- } & react.RefAttributes<HTMLParagraphElement>>;
2219
- declare const QuizResultPerformance: react.ForwardRefExoticComponent<react.RefAttributes<HTMLDivElement>>;
2220
- declare const QuizListResult: react.ForwardRefExoticComponent<{
2221
- className?: string;
2222
- onSubjectClick?: (subject: string) => void;
2223
- } & react.RefAttributes<HTMLDivElement>>;
2224
- declare const QuizListResultByMateria: ({ subject, onQuestionClick, }: {
2225
- subject: string;
2226
- onQuestionClick: (question: Question) => void;
2227
- }) => react_jsx_runtime.JSX.Element;
2228
-
2229
- 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, 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 };