analytica-frontend-lib 1.2.24 → 1.2.28

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 (446) hide show
  1. package/dist/Accordation/index.d.ts +4 -5
  2. package/dist/Accordation/index.d.ts.map +1 -0
  3. package/dist/Accordation/index.js.map +1 -1
  4. package/dist/Accordation/index.mjs.map +1 -1
  5. package/dist/ActivityDetails/index.css +19293 -0
  6. package/dist/ActivityDetails/index.css.map +1 -0
  7. package/dist/ActivityDetails/index.d.ts +31 -0
  8. package/dist/ActivityDetails/index.d.ts.map +1 -0
  9. package/dist/ActivityDetails/index.js +7359 -0
  10. package/dist/ActivityDetails/index.js.map +1 -0
  11. package/dist/ActivityDetails/index.mjs +7408 -0
  12. package/dist/ActivityDetails/index.mjs.map +1 -0
  13. package/dist/ActivityFilters/index.css +19293 -0
  14. package/dist/ActivityFilters/index.css.map +1 -0
  15. package/dist/ActivityFilters/index.d.ts +44 -0
  16. package/dist/ActivityFilters/index.d.ts.map +1 -0
  17. package/dist/ActivityFilters/index.js +4906 -0
  18. package/dist/ActivityFilters/index.js.map +1 -0
  19. package/dist/ActivityFilters/index.mjs +4921 -0
  20. package/dist/ActivityFilters/index.mjs.map +1 -0
  21. package/dist/Alert/index.d.ts +3 -5
  22. package/dist/Alert/index.d.ts.map +1 -0
  23. package/dist/Alert/index.js.map +1 -1
  24. package/dist/Alert/index.mjs.map +1 -1
  25. package/dist/AlertDialog/index.d.ts +2 -4
  26. package/dist/AlertDialog/index.d.ts.map +1 -0
  27. package/dist/AlertDialog/index.js.map +1 -1
  28. package/dist/AlertDialog/index.mjs.map +1 -1
  29. package/dist/AlertManager/index.css +127 -0
  30. package/dist/AlertManager/index.css.map +1 -1
  31. package/dist/AlertManager/index.d.ts +4 -8
  32. package/dist/AlertManager/index.d.ts.map +1 -0
  33. package/dist/AlertManager/index.js +23 -19
  34. package/dist/AlertManager/index.js.map +1 -1
  35. package/dist/AlertManager/index.mjs +45 -41
  36. package/dist/AlertManager/index.mjs.map +1 -1
  37. package/dist/AlertManagerView/index.d.ts +6 -10
  38. package/dist/AlertManagerView/index.d.ts.map +1 -0
  39. package/dist/AlertManagerView/index.js.map +1 -1
  40. package/dist/AlertManagerView/index.mjs.map +1 -1
  41. package/dist/Alternative/index.d.ts +6 -9
  42. package/dist/Alternative/index.d.ts.map +1 -0
  43. package/dist/Alternative/index.js.map +1 -1
  44. package/dist/Alternative/index.mjs.map +1 -1
  45. package/dist/Auth/AuthProvider/index.d.ts +324 -3
  46. package/dist/Auth/AuthProvider/index.d.ts.map +1 -0
  47. package/dist/Auth/ProtectedRoute/index.d.ts +324 -3
  48. package/dist/Auth/ProtectedRoute/index.d.ts.map +1 -0
  49. package/dist/Auth/PublicRoute/index.d.ts +324 -3
  50. package/dist/Auth/PublicRoute/index.d.ts.map +1 -0
  51. package/dist/Auth/getRootDomain/index.d.ts +324 -3
  52. package/dist/Auth/getRootDomain/index.d.ts.map +1 -0
  53. package/dist/Auth/index.d.ts +24 -26
  54. package/dist/Auth/index.d.ts.map +1 -0
  55. package/dist/Auth/useApiConfig/index.d.ts +3 -3
  56. package/dist/Auth/useApiConfig/index.d.ts.map +1 -0
  57. package/dist/Auth/useAuth/index.d.ts +324 -3
  58. package/dist/Auth/useAuth/index.d.ts.map +1 -0
  59. package/dist/Auth/useAuthGuard/index.d.ts +324 -3
  60. package/dist/Auth/useAuthGuard/index.d.ts.map +1 -0
  61. package/dist/Auth/useRouteAuth/index.d.ts +324 -3
  62. package/dist/Auth/useRouteAuth/index.d.ts.map +1 -0
  63. package/dist/Auth/useUrlAuthentication/index.d.ts +3 -4
  64. package/dist/Auth/useUrlAuthentication/index.d.ts.map +1 -0
  65. package/dist/Auth/withAuth/index.d.ts +324 -3
  66. package/dist/Auth/withAuth/index.d.ts.map +1 -0
  67. package/dist/Auth/zustandAuthAdapter/index.d.ts +2 -3
  68. package/dist/Auth/zustandAuthAdapter/index.d.ts.map +1 -0
  69. package/dist/Badge/index.d.ts +4 -6
  70. package/dist/Badge/index.d.ts.map +1 -0
  71. package/dist/Badge/index.js.map +1 -1
  72. package/dist/Badge/index.mjs.map +1 -1
  73. package/dist/BreadcrumbMenu/breadcrumbStore/index.d.ts +5 -7
  74. package/dist/BreadcrumbMenu/breadcrumbStore/index.d.ts.map +1 -0
  75. package/dist/BreadcrumbMenu/index.d.ts +4 -8
  76. package/dist/BreadcrumbMenu/index.d.ts.map +1 -0
  77. package/dist/BreadcrumbMenu/index.js.map +1 -1
  78. package/dist/BreadcrumbMenu/index.mjs.map +1 -1
  79. package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.d.ts +7 -10
  80. package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.d.ts.map +1 -0
  81. package/dist/BreadcrumbMenu/useUrlParams/index.d.ts +3 -4
  82. package/dist/BreadcrumbMenu/useUrlParams/index.d.ts.map +1 -0
  83. package/dist/Button/index.d.ts +4 -6
  84. package/dist/Button/index.d.ts.map +1 -0
  85. package/dist/Button/index.js.map +1 -1
  86. package/dist/Button/index.mjs.map +1 -1
  87. package/dist/Calendar/index.d.ts +9 -11
  88. package/dist/Calendar/index.d.ts.map +1 -0
  89. package/dist/Calendar/index.js.map +1 -1
  90. package/dist/Calendar/index.mjs.map +1 -1
  91. package/dist/Card/index.d.ts +17 -19
  92. package/dist/Card/index.d.ts.map +1 -0
  93. package/dist/Card/index.js.map +1 -1
  94. package/dist/Card/index.mjs.map +1 -1
  95. package/dist/CheckBox/index.d.ts +6 -8
  96. package/dist/CheckBox/index.d.ts.map +1 -0
  97. package/dist/CheckBox/index.js.map +1 -1
  98. package/dist/CheckBox/index.mjs.map +1 -1
  99. package/dist/Chips/index.d.ts +4 -6
  100. package/dist/Chips/index.d.ts.map +1 -0
  101. package/dist/Chips/index.js.map +1 -1
  102. package/dist/Chips/index.mjs.map +1 -1
  103. package/dist/CorrectActivityModal/index.d.ts +39 -0
  104. package/dist/CorrectActivityModal/index.d.ts.map +1 -0
  105. package/dist/CorrectActivityModal/index.js +3674 -0
  106. package/dist/CorrectActivityModal/index.js.map +1 -0
  107. package/dist/CorrectActivityModal/index.mjs +3689 -0
  108. package/dist/CorrectActivityModal/index.mjs.map +1 -0
  109. package/dist/Divider/index.d.ts +3 -5
  110. package/dist/Divider/index.d.ts.map +1 -0
  111. package/dist/Divider/index.js.map +1 -1
  112. package/dist/Divider/index.mjs.map +1 -1
  113. package/dist/DownloadButton/index.d.ts +5 -7
  114. package/dist/DownloadButton/index.d.ts.map +1 -0
  115. package/dist/DownloadButton/index.js.map +1 -1
  116. package/dist/DownloadButton/index.mjs.map +1 -1
  117. package/dist/DropdownMenu/index.d.ts +26 -28
  118. package/dist/DropdownMenu/index.d.ts.map +1 -0
  119. package/dist/DropdownMenu/index.js.map +1 -1
  120. package/dist/DropdownMenu/index.mjs.map +1 -1
  121. package/dist/EmptyState/index.d.ts +5 -7
  122. package/dist/EmptyState/index.d.ts.map +1 -0
  123. package/dist/EmptyState/index.js.map +1 -1
  124. package/dist/EmptyState/index.mjs.map +1 -1
  125. package/dist/FileAttachment/index.d.ts +72 -0
  126. package/dist/FileAttachment/index.d.ts.map +1 -0
  127. package/dist/FileAttachment/index.js +239 -0
  128. package/dist/FileAttachment/index.js.map +1 -0
  129. package/dist/FileAttachment/index.mjs +213 -0
  130. package/dist/FileAttachment/index.mjs.map +1 -0
  131. package/dist/IconButton/index.d.ts +6 -8
  132. package/dist/IconButton/index.d.ts.map +1 -0
  133. package/dist/IconButton/index.js.map +1 -1
  134. package/dist/IconButton/index.mjs.map +1 -1
  135. package/dist/IconRender/index.d.ts +5 -6
  136. package/dist/IconRender/index.d.ts.map +1 -0
  137. package/dist/IconRoundedButton/index.d.ts +4 -6
  138. package/dist/IconRoundedButton/index.d.ts.map +1 -0
  139. package/dist/IconRoundedButton/index.js.map +1 -1
  140. package/dist/IconRoundedButton/index.mjs.map +1 -1
  141. package/dist/Input/index.d.ts +5 -7
  142. package/dist/Input/index.d.ts.map +1 -0
  143. package/dist/LatexRenderer/index.d.ts +5 -6
  144. package/dist/LatexRenderer/index.d.ts.map +1 -0
  145. package/dist/LatexRenderer/index.js.map +1 -1
  146. package/dist/LatexRenderer/index.mjs.map +1 -1
  147. package/dist/LoadingModal/index.d.ts +3 -5
  148. package/dist/LoadingModal/index.d.ts.map +1 -0
  149. package/dist/Menu/index.d.ts +12 -14
  150. package/dist/Menu/index.d.ts.map +1 -0
  151. package/dist/Menu/index.js.map +1 -1
  152. package/dist/Menu/index.mjs.map +1 -1
  153. package/dist/Modal/index.d.ts +3 -5
  154. package/dist/Modal/index.d.ts.map +1 -0
  155. package/dist/Modal/index.js.map +1 -1
  156. package/dist/Modal/index.mjs.map +1 -1
  157. package/dist/Modal/utils/videoUtils/index.d.ts +4 -5
  158. package/dist/Modal/utils/videoUtils/index.d.ts.map +1 -0
  159. package/dist/MultipleChoice/index.d.ts +2 -4
  160. package/dist/MultipleChoice/index.d.ts.map +1 -0
  161. package/dist/MultipleChoice/index.js.map +1 -1
  162. package/dist/MultipleChoice/index.mjs.map +1 -1
  163. package/dist/NavButton/index.d.ts +5 -7
  164. package/dist/NavButton/index.d.ts.map +1 -0
  165. package/dist/NavButton/index.js.map +1 -1
  166. package/dist/NavButton/index.mjs.map +1 -1
  167. package/dist/NoSearchResult/index.d.ts +4 -6
  168. package/dist/NoSearchResult/index.d.ts.map +1 -0
  169. package/dist/NoSearchResult/index.js.map +1 -1
  170. package/dist/NoSearchResult/index.mjs.map +1 -1
  171. package/dist/NotFound/index.d.ts +4 -6
  172. package/dist/NotFound/index.d.ts.map +1 -0
  173. package/dist/NotFound/index.js.map +1 -1
  174. package/dist/NotFound/index.mjs.map +1 -1
  175. package/dist/NotificationCard/index.d.ts +218 -3
  176. package/dist/NotificationCard/index.d.ts.map +1 -0
  177. package/dist/NotificationCard/index.js.map +1 -1
  178. package/dist/NotificationCard/index.mjs.map +1 -1
  179. package/dist/ProgressBar/index.d.ts +4 -6
  180. package/dist/ProgressBar/index.d.ts.map +1 -0
  181. package/dist/ProgressBar/index.js.map +1 -1
  182. package/dist/ProgressBar/index.mjs.map +1 -1
  183. package/dist/ProgressCircle/index.d.ts +4 -6
  184. package/dist/ProgressCircle/index.d.ts.map +1 -0
  185. package/dist/ProgressCircle/index.js.map +1 -1
  186. package/dist/ProgressCircle/index.mjs.map +1 -1
  187. package/dist/Quiz/index.d.ts +19 -23
  188. package/dist/Quiz/index.d.ts.map +1 -0
  189. package/dist/Quiz/index.js.map +1 -1
  190. package/dist/Quiz/index.mjs.map +1 -1
  191. package/dist/Quiz/useQuizStore/index.d.ts +14 -17
  192. package/dist/Quiz/useQuizStore/index.d.ts.map +1 -0
  193. package/dist/Radio/index.d.ts +14 -15
  194. package/dist/Radio/index.d.ts.map +1 -0
  195. package/dist/Radio/index.js.map +1 -1
  196. package/dist/Radio/index.mjs.map +1 -1
  197. package/dist/Search/index.d.ts +4 -6
  198. package/dist/Search/index.d.ts.map +1 -0
  199. package/dist/Search/index.js.map +1 -1
  200. package/dist/Search/index.mjs.map +1 -1
  201. package/dist/Select/index.d.ts +12 -14
  202. package/dist/Select/index.d.ts.map +1 -0
  203. package/dist/Select/index.js.map +1 -1
  204. package/dist/Select/index.mjs.map +1 -1
  205. package/dist/SelectionButton/index.d.ts +5 -7
  206. package/dist/SelectionButton/index.d.ts.map +1 -0
  207. package/dist/SelectionButton/index.js.map +1 -1
  208. package/dist/SelectionButton/index.mjs.map +1 -1
  209. package/dist/Skeleton/index.d.ts +10 -12
  210. package/dist/Skeleton/index.d.ts.map +1 -0
  211. package/dist/Skeleton/index.js.map +1 -1
  212. package/dist/Skeleton/index.mjs.map +1 -1
  213. package/dist/StatisticsCard/index.d.ts +3 -5
  214. package/dist/StatisticsCard/index.d.ts.map +1 -0
  215. package/dist/StatisticsCard/index.js.map +1 -1
  216. package/dist/StatisticsCard/index.mjs.map +1 -1
  217. package/dist/Stepper/index.d.ts +6 -8
  218. package/dist/Stepper/index.d.ts.map +1 -0
  219. package/dist/Stepper/index.js.map +1 -1
  220. package/dist/Stepper/index.mjs.map +1 -1
  221. package/dist/SubjectInfo/index.d.ts +17 -2
  222. package/dist/SubjectInfo/index.d.ts.map +1 -0
  223. package/dist/Support/TicketModal/index.d.ts +14 -0
  224. package/dist/Support/TicketModal/index.d.ts.map +1 -0
  225. package/dist/Support/TicketModal/index.js +1279 -0
  226. package/dist/Support/TicketModal/index.js.map +1 -0
  227. package/dist/Support/TicketModal/index.mjs +1248 -0
  228. package/dist/Support/TicketModal/index.mjs.map +1 -0
  229. package/dist/Support/index.d.ts +8 -0
  230. package/dist/Support/index.d.ts.map +1 -0
  231. package/dist/Support/index.js +2686 -0
  232. package/dist/Support/index.js.map +1 -0
  233. package/dist/Support/index.mjs +2676 -0
  234. package/dist/Support/index.mjs.map +1 -0
  235. package/dist/Table/TablePagination/index.d.ts +4 -6
  236. package/dist/Table/TablePagination/index.d.ts.map +1 -0
  237. package/dist/Table/TablePagination/index.js.map +1 -1
  238. package/dist/Table/TablePagination/index.mjs.map +1 -1
  239. package/dist/Table/index.d.ts +18 -19
  240. package/dist/Table/index.d.ts.map +1 -0
  241. package/dist/Table/index.js.map +1 -1
  242. package/dist/Table/index.mjs.map +1 -1
  243. package/dist/TableProvider/index.css +127 -0
  244. package/dist/TableProvider/index.css.map +1 -1
  245. package/dist/TableProvider/index.d.ts +198 -4
  246. package/dist/TableProvider/index.d.ts.map +1 -0
  247. package/dist/TableProvider/index.js +23 -19
  248. package/dist/TableProvider/index.js.map +1 -1
  249. package/dist/TableProvider/index.mjs +45 -41
  250. package/dist/TableProvider/index.mjs.map +1 -1
  251. package/dist/Text/index.d.ts +4 -6
  252. package/dist/Text/index.d.ts.map +1 -0
  253. package/dist/Text/index.js.map +1 -1
  254. package/dist/Text/index.mjs.map +1 -1
  255. package/dist/TextArea/index.d.ts +6 -8
  256. package/dist/TextArea/index.d.ts.map +1 -0
  257. package/dist/TextArea/index.js.map +1 -1
  258. package/dist/TextArea/index.mjs.map +1 -1
  259. package/dist/ThemeToggle/index.d.ts +4 -8
  260. package/dist/ThemeToggle/index.d.ts.map +1 -0
  261. package/dist/ThemeToggle/index.js.map +1 -1
  262. package/dist/ThemeToggle/index.mjs.map +1 -1
  263. package/dist/Toast/ToastStore/index.d.ts +3 -5
  264. package/dist/Toast/ToastStore/index.d.ts.map +1 -0
  265. package/dist/Toast/Toaster/index.d.ts +4 -6
  266. package/dist/Toast/Toaster/index.d.ts.map +1 -0
  267. package/dist/Toast/Toaster/index.js.map +1 -1
  268. package/dist/Toast/Toaster/index.mjs.map +1 -1
  269. package/dist/Toast/index.d.ts +3 -5
  270. package/dist/Toast/index.d.ts.map +1 -0
  271. package/dist/Toast/index.js.map +1 -1
  272. package/dist/Toast/index.mjs.map +1 -1
  273. package/dist/VideoPlayer/index.d.ts +4 -6
  274. package/dist/VideoPlayer/index.d.ts.map +1 -0
  275. package/dist/VideoPlayer/index.js.map +1 -1
  276. package/dist/VideoPlayer/index.mjs.map +1 -1
  277. package/dist/Whiteboard/index.d.ts +5 -7
  278. package/dist/Whiteboard/index.d.ts.map +1 -0
  279. package/dist/Whiteboard/index.js.map +1 -1
  280. package/dist/Whiteboard/index.mjs.map +1 -1
  281. package/dist/assets/icons/subjects/BookOpenText.d.ts +5 -0
  282. package/dist/assets/icons/subjects/BookOpenText.d.ts.map +1 -0
  283. package/dist/assets/icons/subjects/ChatEN.d.ts +5 -0
  284. package/dist/assets/icons/subjects/ChatEN.d.ts.map +1 -0
  285. package/dist/assets/icons/subjects/ChatES.d.ts +5 -0
  286. package/dist/assets/icons/subjects/ChatES.d.ts.map +1 -0
  287. package/dist/assets/icons/subjects/ChatPT.d.ts +5 -0
  288. package/dist/assets/icons/subjects/ChatPT.d.ts.map +1 -0
  289. package/dist/assets/icons/subjects/HeadCircuit.d.ts +5 -0
  290. package/dist/assets/icons/subjects/HeadCircuit.d.ts.map +1 -0
  291. package/dist/assets/icons/subjects/Microscope.d.ts +5 -0
  292. package/dist/assets/icons/subjects/Microscope.d.ts.map +1 -0
  293. package/dist/enums/SubjectEnum.d.ts +19 -0
  294. package/dist/enums/SubjectEnum.d.ts.map +1 -0
  295. package/dist/hooks/useAppContent.d.ts +55 -0
  296. package/dist/hooks/useAppContent.d.ts.map +1 -0
  297. package/dist/hooks/useAppInitialization.d.ts +21 -0
  298. package/dist/hooks/useAppInitialization.d.ts.map +1 -0
  299. package/dist/hooks/useInstitution.d.ts +2 -0
  300. package/dist/hooks/useInstitution.d.ts.map +1 -0
  301. package/dist/hooks/useMobile/index.d.ts +4 -5
  302. package/dist/hooks/useMobile/index.d.ts.map +1 -0
  303. package/dist/hooks/useNotificationStore.d.ts +34 -0
  304. package/dist/hooks/useNotificationStore.d.ts.map +1 -0
  305. package/dist/hooks/useNotifications.d.ts +129 -0
  306. package/dist/hooks/useNotifications.d.ts.map +1 -0
  307. package/dist/hooks/useScreen.d.ts +38 -0
  308. package/dist/hooks/useScreen.d.ts.map +1 -0
  309. package/dist/hooks/useTheme/index.d.ts +4 -7
  310. package/dist/hooks/useTheme/index.d.ts.map +1 -0
  311. package/dist/index.css +127 -0
  312. package/dist/index.css.map +1 -1
  313. package/dist/index.d.ts +127 -783
  314. package/dist/index.d.ts.map +1 -0
  315. package/dist/index.js +9257 -6883
  316. package/dist/index.js.map +1 -1
  317. package/dist/index.mjs +9330 -6973
  318. package/dist/index.mjs.map +1 -1
  319. package/dist/store/appStore.d.ts +27 -0
  320. package/dist/store/appStore.d.ts.map +1 -0
  321. package/dist/store/authStore.d.ts +75 -0
  322. package/dist/store/authStore.d.ts.map +1 -0
  323. package/dist/store/notificationStore.d.ts +89 -0
  324. package/dist/store/notificationStore.d.ts.map +1 -0
  325. package/dist/{themeStore-P2X64zC-.d.mts → store/themeStore.d.ts} +8 -12
  326. package/dist/store/themeStore.d.ts.map +1 -0
  327. package/dist/styles.css +127 -0
  328. package/dist/styles.css.map +1 -1
  329. package/dist/suporthistory-W5LBGAUP.png +0 -0
  330. package/dist/types/activityDetails.d.ts +127 -0
  331. package/dist/types/activityDetails.d.ts.map +1 -0
  332. package/dist/types/activityFilters.d.ts +51 -0
  333. package/dist/types/activityFilters.d.ts.map +1 -0
  334. package/dist/types/auth.d.ts +53 -0
  335. package/dist/types/auth.d.ts.map +1 -0
  336. package/dist/types/notifications.d.ts +199 -0
  337. package/dist/types/notifications.d.ts.map +1 -0
  338. package/dist/types/questionTypes.d.ts +6 -0
  339. package/dist/types/questionTypes.d.ts.map +1 -0
  340. package/dist/types/studentActivityCorrection.d.ts +57 -0
  341. package/dist/types/studentActivityCorrection.d.ts.map +1 -0
  342. package/dist/types/support/index.d.ts +111 -0
  343. package/dist/types/support/index.d.ts.map +1 -0
  344. package/dist/types/support/index.js +115 -0
  345. package/dist/types/support/index.js.map +1 -0
  346. package/dist/types/support/index.mjs +84 -0
  347. package/dist/types/support/index.mjs.map +1 -0
  348. package/dist/utils/activityFilters.d.ts +23 -0
  349. package/dist/utils/activityFilters.d.ts.map +1 -0
  350. package/dist/utils/dropdown.d.ts +12 -0
  351. package/dist/utils/dropdown.d.ts.map +1 -0
  352. package/dist/utils/index.d.ts +6 -19
  353. package/dist/utils/index.d.ts.map +1 -0
  354. package/dist/utils/index.js +24 -2
  355. package/dist/utils/index.js.map +1 -1
  356. package/dist/utils/index.mjs +20 -1
  357. package/dist/utils/index.mjs.map +1 -1
  358. package/dist/utils/keys.d.ts +24 -0
  359. package/dist/utils/keys.d.ts.map +1 -0
  360. package/package.json +21 -4
  361. package/dist/Accordation/index.d.mts +0 -15
  362. package/dist/Alert/index.d.mts +0 -13
  363. package/dist/AlertDialog/index.d.mts +0 -36
  364. package/dist/AlertManager/index.d.mts +0 -17
  365. package/dist/AlertManagerView/index.d.mts +0 -31
  366. package/dist/Alternative/index.d.mts +0 -81
  367. package/dist/Auth/AuthProvider/index.d.mts +0 -3
  368. package/dist/Auth/ProtectedRoute/index.d.mts +0 -3
  369. package/dist/Auth/PublicRoute/index.d.mts +0 -3
  370. package/dist/Auth/getRootDomain/index.d.mts +0 -3
  371. package/dist/Auth/index.d.mts +0 -326
  372. package/dist/Auth/useApiConfig/index.d.mts +0 -43
  373. package/dist/Auth/useAuth/index.d.mts +0 -3
  374. package/dist/Auth/useAuthGuard/index.d.mts +0 -3
  375. package/dist/Auth/useRouteAuth/index.d.mts +0 -3
  376. package/dist/Auth/useUrlAuthentication/index.d.mts +0 -69
  377. package/dist/Auth/withAuth/index.d.mts +0 -3
  378. package/dist/Auth/zustandAuthAdapter/index.d.mts +0 -75
  379. package/dist/Badge/index.d.mts +0 -46
  380. package/dist/BreadcrumbMenu/breadcrumbStore/index.d.mts +0 -77
  381. package/dist/BreadcrumbMenu/index.d.mts +0 -31
  382. package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.d.mts +0 -48
  383. package/dist/BreadcrumbMenu/useUrlParams/index.d.mts +0 -28
  384. package/dist/Button/index.d.mts +0 -45
  385. package/dist/Calendar/index.d.mts +0 -60
  386. package/dist/Card/index.d.mts +0 -150
  387. package/dist/CheckBox/index.d.mts +0 -74
  388. package/dist/CheckBoxGroup-9n5C0OH4.d.mts +0 -24
  389. package/dist/CheckBoxGroup-9n5C0OH4.d.ts +0 -24
  390. package/dist/Chips/index.d.mts +0 -41
  391. package/dist/Divider/index.d.mts +0 -32
  392. package/dist/DownloadButton/index.d.mts +0 -46
  393. package/dist/DropdownMenu/index.d.mts +0 -82
  394. package/dist/EmptyState/index.d.mts +0 -65
  395. package/dist/IconButton/index.d.mts +0 -76
  396. package/dist/IconRender/index.d.mts +0 -36
  397. package/dist/IconRoundedButton/index.d.mts +0 -34
  398. package/dist/Input/index.d.mts +0 -27
  399. package/dist/LatexRenderer/index.d.mts +0 -50
  400. package/dist/LoadingModal/index.d.mts +0 -11
  401. package/dist/Menu/index.d.mts +0 -48
  402. package/dist/Modal/index.d.mts +0 -76
  403. package/dist/Modal/utils/videoUtils/index.d.mts +0 -28
  404. package/dist/MultipleChoice/index.d.mts +0 -20
  405. package/dist/NavButton/index.d.mts +0 -57
  406. package/dist/NoSearchResult/index.d.mts +0 -37
  407. package/dist/NotFound/index.d.mts +0 -58
  408. package/dist/NotificationCard/index.d.mts +0 -3
  409. package/dist/NotificationCard-4GgB0Nsf.d.mts +0 -417
  410. package/dist/NotificationCard-4GgB0Nsf.d.ts +0 -417
  411. package/dist/ProgressBar/index.d.mts +0 -95
  412. package/dist/ProgressCircle/index.d.mts +0 -60
  413. package/dist/Quiz/index.d.mts +0 -55
  414. package/dist/Quiz/useQuizStore/index.d.mts +0 -258
  415. package/dist/Radio/index.d.mts +0 -203
  416. package/dist/Search/index.d.mts +0 -27
  417. package/dist/Select/index.d.mts +0 -59
  418. package/dist/SelectionButton/index.d.mts +0 -57
  419. package/dist/Skeleton/index.d.mts +0 -40
  420. package/dist/StatisticsCard/index.d.mts +0 -79
  421. package/dist/Stepper/index.d.mts +0 -169
  422. package/dist/SubjectInfo/index.d.mts +0 -2
  423. package/dist/SubjectInfo-Dvt0OodP.d.mts +0 -37
  424. package/dist/SubjectInfo-Dvt0OodP.d.ts +0 -37
  425. package/dist/Table/TablePagination/index.d.mts +0 -64
  426. package/dist/Table/index.d.mts +0 -93
  427. package/dist/TableProvider/index.d.mts +0 -4
  428. package/dist/TableProvider-BnAnv3OV.d.mts +0 -239
  429. package/dist/TableProvider-GfPlLqzg.d.ts +0 -239
  430. package/dist/Text/index.d.mts +0 -58
  431. package/dist/TextArea/index.d.mts +0 -74
  432. package/dist/ThemeToggle/index.d.mts +0 -12
  433. package/dist/Toast/ToastStore/index.d.mts +0 -19
  434. package/dist/Toast/Toaster/index.d.mts +0 -16
  435. package/dist/Toast/index.d.mts +0 -17
  436. package/dist/VideoPlayer/index.d.mts +0 -52
  437. package/dist/Whiteboard/index.d.mts +0 -34
  438. package/dist/hooks/useMobile/index.d.mts +0 -29
  439. package/dist/hooks/useTheme/index.d.mts +0 -17
  440. package/dist/index.d.mts +0 -783
  441. package/dist/styles.d.mts +0 -2
  442. package/dist/styles.d.ts +0 -2
  443. package/dist/themeStore-P2X64zC-.d.ts +0 -79
  444. package/dist/types-DqZRjqxh.d.ts +0 -67
  445. package/dist/types-pd3QVhSu.d.mts +0 -67
  446. package/dist/utils/index.d.mts +0 -27
@@ -0,0 +1,3674 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/components/CorrectActivityModal/CorrectActivityModal.tsx
31
+ var CorrectActivityModal_exports = {};
32
+ __export(CorrectActivityModal_exports, {
33
+ default: () => CorrectActivityModal_default
34
+ });
35
+ module.exports = __toCommonJS(CorrectActivityModal_exports);
36
+ var import_react9 = require("react");
37
+ var import_phosphor_react7 = require("phosphor-react");
38
+
39
+ // src/components/Modal/Modal.tsx
40
+ var import_react = require("react");
41
+ var import_phosphor_react = require("phosphor-react");
42
+
43
+ // src/utils/utils.ts
44
+ var import_clsx = require("clsx");
45
+ var import_tailwind_merge = require("tailwind-merge");
46
+ function cn(...inputs) {
47
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
48
+ }
49
+
50
+ // src/components/Button/Button.tsx
51
+ var import_jsx_runtime = require("react/jsx-runtime");
52
+ var VARIANT_ACTION_CLASSES = {
53
+ solid: {
54
+ primary: "bg-primary-950 text-text border border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus-visible:outline-none focus-visible:bg-primary-950 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-primary-700 active:border-primary-700 disabled:bg-primary-500 disabled:border-primary-500 disabled:opacity-40 disabled:cursor-not-allowed",
55
+ positive: "bg-success-500 text-text border border-success-500 hover:bg-success-600 hover:border-success-600 focus-visible:outline-none focus-visible:bg-success-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-success-700 active:border-success-700 disabled:bg-success-500 disabled:border-success-500 disabled:opacity-40 disabled:cursor-not-allowed",
56
+ negative: "bg-error-500 text-text border border-error-500 hover:bg-error-600 hover:border-error-600 focus-visible:outline-none focus-visible:bg-error-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-error-700 active:border-error-700 disabled:bg-error-500 disabled:border-error-500 disabled:opacity-40 disabled:cursor-not-allowed"
57
+ },
58
+ outline: {
59
+ primary: "bg-transparent text-primary-950 border border-primary-950 hover:bg-background-50 hover:text-primary-400 hover:border-primary-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 active:border-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
60
+ positive: "bg-transparent text-success-500 border border-success-300 hover:bg-background-50 hover:text-success-400 hover:border-success-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 active:border-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
61
+ negative: "bg-transparent text-error-500 border border-error-300 hover:bg-background-50 hover:text-error-400 hover:border-error-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
62
+ },
63
+ link: {
64
+ primary: "bg-transparent text-primary-950 hover:text-primary-400 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
65
+ positive: "bg-transparent text-success-500 hover:text-success-400 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
66
+ negative: "bg-transparent text-error-500 hover:text-error-400 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
67
+ }
68
+ };
69
+ var SIZE_CLASSES = {
70
+ "extra-small": "text-xs px-3.5 py-2",
71
+ small: "text-sm px-4 py-2.5",
72
+ medium: "text-md px-5 py-2.5",
73
+ large: "text-lg px-6 py-3",
74
+ "extra-large": "text-lg px-7 py-3.5"
75
+ };
76
+ var Button = ({
77
+ children,
78
+ iconLeft,
79
+ iconRight,
80
+ size = "medium",
81
+ variant = "solid",
82
+ action = "primary",
83
+ className = "",
84
+ disabled,
85
+ type = "button",
86
+ ...props
87
+ }) => {
88
+ const sizeClasses = SIZE_CLASSES[size];
89
+ const variantClasses = VARIANT_ACTION_CLASSES[variant][action];
90
+ const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-medium";
91
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
92
+ "button",
93
+ {
94
+ className: cn(baseClasses, variantClasses, sizeClasses, className),
95
+ disabled,
96
+ type,
97
+ ...props,
98
+ children: [
99
+ iconLeft && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "mr-2 flex items-center", children: iconLeft }),
100
+ children,
101
+ iconRight && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-2 flex items-center", children: iconRight })
102
+ ]
103
+ }
104
+ );
105
+ };
106
+ var Button_default = Button;
107
+
108
+ // src/components/Modal/utils/videoUtils.ts
109
+ var isYouTubeUrl = (url) => {
110
+ const youtubeRegex = /^(https?:\/\/)?((www|m|music)\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/.+/i;
111
+ return youtubeRegex.test(url);
112
+ };
113
+ var isValidYouTubeHost = (host) => {
114
+ if (host === "youtu.be") return "youtu.be";
115
+ const isValidYouTubeCom = host === "youtube.com" || host.endsWith(".youtube.com") && /^(www|m|music)\.youtube\.com$/.test(host);
116
+ if (isValidYouTubeCom) return "youtube";
117
+ const isValidNoCookie = host === "youtube-nocookie.com" || host.endsWith(".youtube-nocookie.com") && /^(www|m|music)\.youtube-nocookie\.com$/.test(host);
118
+ if (isValidNoCookie) return "nocookie";
119
+ return null;
120
+ };
121
+ var extractYoutuBeId = (pathname) => {
122
+ const firstSeg = pathname.split("/").filter(Boolean)[0];
123
+ return firstSeg || null;
124
+ };
125
+ var extractYouTubeId = (pathname, searchParams) => {
126
+ const parts = pathname.split("/").filter(Boolean);
127
+ const [first, second] = parts;
128
+ if (first === "embed" && second) return second;
129
+ if (first === "shorts" && second) return second;
130
+ if (first === "live" && second) return second;
131
+ const v = searchParams.get("v");
132
+ if (v) return v;
133
+ return null;
134
+ };
135
+ var getYouTubeVideoId = (url) => {
136
+ try {
137
+ const u = new URL(url);
138
+ const hostType = isValidYouTubeHost(u.hostname.toLowerCase());
139
+ if (!hostType) return null;
140
+ if (hostType === "youtu.be") {
141
+ return extractYoutuBeId(u.pathname);
142
+ }
143
+ return extractYouTubeId(u.pathname, u.searchParams);
144
+ } catch {
145
+ return null;
146
+ }
147
+ };
148
+ var getYouTubeEmbedUrl = (videoId) => {
149
+ return `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=0&rel=0&modestbranding=1`;
150
+ };
151
+
152
+ // src/components/Modal/Modal.tsx
153
+ var import_jsx_runtime2 = require("react/jsx-runtime");
154
+ var SIZE_CLASSES2 = {
155
+ xs: "max-w-[360px]",
156
+ sm: "max-w-[420px]",
157
+ md: "max-w-[510px]",
158
+ lg: "max-w-[640px]",
159
+ xl: "max-w-[970px]"
160
+ };
161
+ var Modal = ({
162
+ isOpen,
163
+ onClose,
164
+ title,
165
+ children,
166
+ size = "md",
167
+ className = "",
168
+ closeOnEscape = true,
169
+ footer,
170
+ hideCloseButton = false,
171
+ variant = "default",
172
+ description,
173
+ image,
174
+ imageAlt,
175
+ actionLink,
176
+ actionLabel,
177
+ contentClassName = ""
178
+ }) => {
179
+ const titleId = (0, import_react.useId)();
180
+ (0, import_react.useEffect)(() => {
181
+ if (!isOpen || !closeOnEscape) return;
182
+ const handleEscape = (event) => {
183
+ if (event.key === "Escape") {
184
+ onClose();
185
+ }
186
+ };
187
+ document.addEventListener("keydown", handleEscape);
188
+ return () => document.removeEventListener("keydown", handleEscape);
189
+ }, [isOpen, closeOnEscape, onClose]);
190
+ (0, import_react.useEffect)(() => {
191
+ if (!isOpen) return;
192
+ const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
193
+ const originalOverflow = document.body.style.overflow;
194
+ const originalPaddingRight = document.body.style.paddingRight;
195
+ document.body.style.overflow = "hidden";
196
+ if (scrollbarWidth > 0) {
197
+ document.body.style.paddingRight = `${scrollbarWidth}px`;
198
+ const overlay = document.createElement("div");
199
+ overlay.id = "modal-scrollbar-overlay";
200
+ overlay.style.cssText = `
201
+ position: fixed;
202
+ top: 0;
203
+ right: 0;
204
+ width: ${scrollbarWidth}px;
205
+ height: 100vh;
206
+ background-color: rgb(0 0 0 / 0.6);
207
+ z-index: 40;
208
+ pointer-events: none;
209
+ `;
210
+ document.body.appendChild(overlay);
211
+ }
212
+ return () => {
213
+ document.body.style.overflow = originalOverflow;
214
+ document.body.style.paddingRight = originalPaddingRight;
215
+ const overlay = document.getElementById("modal-scrollbar-overlay");
216
+ if (overlay) {
217
+ overlay.remove();
218
+ }
219
+ };
220
+ }, [isOpen]);
221
+ if (!isOpen) return null;
222
+ const sizeClasses = SIZE_CLASSES2[size];
223
+ const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
224
+ const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
225
+ const modalClasses = cn(
226
+ baseClasses,
227
+ sizeClasses,
228
+ dialogResetClasses,
229
+ className
230
+ );
231
+ const normalizeUrl = (href) => /^https?:\/\//i.test(href) ? href : `https://${href}`;
232
+ const handleActionClick = () => {
233
+ if (actionLink) {
234
+ window.open(normalizeUrl(actionLink), "_blank", "noopener,noreferrer");
235
+ }
236
+ };
237
+ if (variant === "activity") {
238
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs border-none p-0 m-0 w-full cursor-default", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
239
+ "dialog",
240
+ {
241
+ className: modalClasses,
242
+ "aria-labelledby": titleId,
243
+ "aria-modal": "true",
244
+ open: true,
245
+ children: [
246
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
247
+ "button",
248
+ {
249
+ onClick: onClose,
250
+ className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
251
+ "aria-label": "Fechar modal",
252
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_phosphor_react.X, { size: 18 })
253
+ }
254
+ ) }),
255
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
256
+ image && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
257
+ "img",
258
+ {
259
+ src: image,
260
+ alt: imageAlt ?? "",
261
+ className: "w-[122px] h-[122px] object-contain"
262
+ }
263
+ ) }),
264
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
265
+ "h2",
266
+ {
267
+ id: titleId,
268
+ className: "text-lg font-semibold text-text-950 text-center",
269
+ children: title
270
+ }
271
+ ),
272
+ description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
273
+ actionLink && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "w-full", children: [
274
+ (() => {
275
+ const normalized = normalizeUrl(actionLink);
276
+ const isYT = isYouTubeUrl(normalized);
277
+ if (!isYT) return null;
278
+ const id = getYouTubeVideoId(normalized);
279
+ if (!id) {
280
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
281
+ Button_default,
282
+ {
283
+ variant: "solid",
284
+ action: "primary",
285
+ size: "large",
286
+ className: "w-full",
287
+ onClick: handleActionClick,
288
+ children: actionLabel || "Iniciar Atividade"
289
+ }
290
+ );
291
+ }
292
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
293
+ "iframe",
294
+ {
295
+ src: getYouTubeEmbedUrl(id),
296
+ className: "w-full aspect-video rounded-lg",
297
+ allowFullScreen: true,
298
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
299
+ title: "V\xEDdeo YouTube"
300
+ }
301
+ );
302
+ })(),
303
+ !isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
304
+ Button_default,
305
+ {
306
+ variant: "solid",
307
+ action: "primary",
308
+ size: "large",
309
+ className: "w-full",
310
+ onClick: handleActionClick,
311
+ children: actionLabel || "Iniciar Atividade"
312
+ }
313
+ )
314
+ ] })
315
+ ] })
316
+ ]
317
+ }
318
+ ) });
319
+ }
320
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs border-none p-0 m-0 w-full cursor-default", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
321
+ "dialog",
322
+ {
323
+ className: modalClasses,
324
+ "aria-labelledby": titleId,
325
+ "aria-modal": "true",
326
+ open: true,
327
+ children: [
328
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center justify-between px-6 py-6", children: [
329
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
330
+ !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
331
+ "button",
332
+ {
333
+ onClick: onClose,
334
+ className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
335
+ "aria-label": "Fechar modal",
336
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_phosphor_react.X, { size: 18 })
337
+ }
338
+ )
339
+ ] }),
340
+ children && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn("px-6 pb-6", contentClassName), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
341
+ footer && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
342
+ ]
343
+ }
344
+ ) });
345
+ };
346
+ var Modal_default = Modal;
347
+
348
+ // src/components/Text/Text.tsx
349
+ var import_jsx_runtime3 = require("react/jsx-runtime");
350
+ var Text = ({
351
+ children,
352
+ size = "md",
353
+ weight = "normal",
354
+ color = "text-text-950",
355
+ as,
356
+ className = "",
357
+ ...props
358
+ }) => {
359
+ let sizeClasses = "";
360
+ let weightClasses = "";
361
+ const sizeClassMap = {
362
+ "2xs": "text-2xs",
363
+ xs: "text-xs",
364
+ sm: "text-sm",
365
+ md: "text-md",
366
+ lg: "text-lg",
367
+ xl: "text-xl",
368
+ "2xl": "text-2xl",
369
+ "3xl": "text-3xl",
370
+ "4xl": "text-4xl",
371
+ "5xl": "text-5xl",
372
+ "6xl": "text-6xl"
373
+ };
374
+ sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
375
+ const weightClassMap = {
376
+ hairline: "font-hairline",
377
+ light: "font-light",
378
+ normal: "font-normal",
379
+ medium: "font-medium",
380
+ semibold: "font-semibold",
381
+ bold: "font-bold",
382
+ extrabold: "font-extrabold",
383
+ black: "font-black"
384
+ };
385
+ weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
386
+ const baseClasses = "font-primary";
387
+ const Component = as ?? "p";
388
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
389
+ Component,
390
+ {
391
+ className: cn(baseClasses, sizeClasses, weightClasses, color, className),
392
+ ...props,
393
+ children
394
+ }
395
+ );
396
+ };
397
+ var Text_default = Text;
398
+
399
+ // src/components/Badge/Badge.tsx
400
+ var import_phosphor_react2 = require("phosphor-react");
401
+ var import_jsx_runtime4 = require("react/jsx-runtime");
402
+ var VARIANT_ACTION_CLASSES2 = {
403
+ solid: {
404
+ error: "bg-error-background text-error-700 focus-visible:outline-none",
405
+ warning: "bg-warning text-warning-800 focus-visible:outline-none",
406
+ success: "bg-success text-success-800 focus-visible:outline-none",
407
+ info: "bg-info text-info-800 focus-visible:outline-none",
408
+ muted: "bg-background-muted text-background-800 focus-visible:outline-none"
409
+ },
410
+ outlined: {
411
+ error: "bg-error text-error-700 border border-error-300 focus-visible:outline-none",
412
+ warning: "bg-warning text-warning-800 border border-warning-300 focus-visible:outline-none",
413
+ success: "bg-success text-success-800 border border-success-300 focus-visible:outline-none",
414
+ info: "bg-info text-info-800 border border-info-300 focus-visible:outline-none",
415
+ muted: "bg-background-muted text-background-800 border border-border-300 focus-visible:outline-none"
416
+ },
417
+ exams: {
418
+ exam1: "bg-exam-1 text-info-700 focus-visible:outline-none",
419
+ exam2: "bg-exam-2 text-typography-1 focus-visible:outline-none",
420
+ exam3: "bg-exam-3 text-typography-2 focus-visible:outline-none",
421
+ exam4: "bg-exam-4 text-success-700 focus-visible:outline-none"
422
+ },
423
+ examsOutlined: {
424
+ exam1: "bg-exam-1 text-info-700 border border-info-700 focus-visible:outline-none",
425
+ exam2: "bg-exam-2 text-typography-1 border border-typography-1 focus-visible:outline-none",
426
+ exam3: "bg-exam-3 text-typography-2 border border-typography-2 focus-visible:outline-none",
427
+ exam4: "bg-exam-4 text-success-700 border border-success-700 focus-visible:outline-none"
428
+ },
429
+ resultStatus: {
430
+ negative: "bg-error text-error-800 focus-visible:outline-none",
431
+ positive: "bg-success text-success-800 focus-visible:outline-none"
432
+ },
433
+ notification: "text-primary"
434
+ };
435
+ var SIZE_CLASSES3 = {
436
+ small: "text-2xs px-2 py-1",
437
+ medium: "text-xs px-2 py-1",
438
+ large: "text-sm px-2 py-1"
439
+ };
440
+ var SIZE_CLASSES_ICON = {
441
+ small: "size-3",
442
+ medium: "size-3.5",
443
+ large: "size-4"
444
+ };
445
+ var Badge = ({
446
+ children,
447
+ iconLeft,
448
+ iconRight,
449
+ size = "medium",
450
+ variant = "solid",
451
+ action = "error",
452
+ className = "",
453
+ notificationActive = false,
454
+ ...props
455
+ }) => {
456
+ const sizeClasses = SIZE_CLASSES3[size];
457
+ const sizeClassesIcon = SIZE_CLASSES_ICON[size];
458
+ const variantActionMap = VARIANT_ACTION_CLASSES2[variant] || {};
459
+ const variantClasses = typeof variantActionMap === "string" ? variantActionMap : variantActionMap[action] ?? variantActionMap.muted ?? "";
460
+ const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
461
+ const baseClassesIcon = "flex items-center";
462
+ if (variant === "notification") {
463
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
464
+ "div",
465
+ {
466
+ className: cn(baseClasses, variantClasses, sizeClasses, className),
467
+ ...props,
468
+ children: [
469
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_phosphor_react2.Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
470
+ notificationActive && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
471
+ "span",
472
+ {
473
+ "data-testid": "notification-dot",
474
+ className: "absolute top-[5px] right-[10px] block h-2 w-2 rounded-full bg-indicator-error ring-2 ring-white"
475
+ }
476
+ )
477
+ ]
478
+ }
479
+ );
480
+ }
481
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
482
+ "div",
483
+ {
484
+ className: cn(baseClasses, variantClasses, sizeClasses, className),
485
+ ...props,
486
+ children: [
487
+ iconLeft && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
488
+ children,
489
+ iconRight && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
490
+ ]
491
+ }
492
+ );
493
+ };
494
+ var Badge_default = Badge;
495
+
496
+ // src/components/Alternative/Alternative.tsx
497
+ var import_phosphor_react3 = require("phosphor-react");
498
+
499
+ // src/components/Radio/Radio.tsx
500
+ var import_react2 = require("react");
501
+ var import_zustand = require("zustand");
502
+ var import_jsx_runtime5 = require("react/jsx-runtime");
503
+ var SIZE_CLASSES4 = {
504
+ small: {
505
+ radio: "w-5 h-5",
506
+ textSize: "sm",
507
+ spacing: "gap-1.5",
508
+ borderWidth: "border-2",
509
+ dotSize: "w-2.5 h-2.5",
510
+ labelHeight: "h-5"
511
+ },
512
+ medium: {
513
+ radio: "w-6 h-6",
514
+ textSize: "md",
515
+ spacing: "gap-2",
516
+ borderWidth: "border-2",
517
+ dotSize: "w-3 h-3",
518
+ labelHeight: "h-6"
519
+ },
520
+ large: {
521
+ radio: "w-7 h-7",
522
+ textSize: "lg",
523
+ spacing: "gap-2",
524
+ borderWidth: "border-2",
525
+ dotSize: "w-3.5 h-3.5",
526
+ labelHeight: "h-7"
527
+ },
528
+ extraLarge: {
529
+ radio: "w-8 h-8",
530
+ textSize: "xl",
531
+ spacing: "gap-3",
532
+ borderWidth: "border-2",
533
+ dotSize: "w-4 h-4",
534
+ labelHeight: "h-8"
535
+ }
536
+ };
537
+ var BASE_RADIO_CLASSES = "rounded-full border cursor-pointer transition-all duration-200 flex items-center justify-center focus:outline-none";
538
+ var STATE_CLASSES = {
539
+ default: {
540
+ unchecked: "border-border-400 bg-background hover:border-border-500",
541
+ checked: "border-primary-950 bg-background hover:border-primary-800"
542
+ },
543
+ hovered: {
544
+ unchecked: "border-border-500 bg-background",
545
+ checked: "border-info-700 bg-background"
546
+ },
547
+ focused: {
548
+ unchecked: "border-border-400 bg-background",
549
+ checked: "border-primary-950 bg-background"
550
+ },
551
+ invalid: {
552
+ unchecked: "border-border-400 bg-background",
553
+ checked: "border-primary-950 bg-background"
554
+ },
555
+ disabled: {
556
+ unchecked: "border-border-400 bg-background cursor-not-allowed",
557
+ checked: "border-primary-950 bg-background cursor-not-allowed"
558
+ }
559
+ };
560
+ var DOT_CLASSES = {
561
+ default: "bg-primary-950",
562
+ hovered: "bg-info-700",
563
+ focused: "bg-primary-950",
564
+ invalid: "bg-primary-950",
565
+ disabled: "bg-primary-950"
566
+ };
567
+ var Radio = (0, import_react2.forwardRef)(
568
+ ({
569
+ label,
570
+ size = "medium",
571
+ state = "default",
572
+ errorMessage,
573
+ helperText,
574
+ className = "",
575
+ labelClassName = "",
576
+ checked: checkedProp,
577
+ defaultChecked = false,
578
+ disabled,
579
+ id,
580
+ name,
581
+ value,
582
+ onChange,
583
+ ...props
584
+ }, ref) => {
585
+ const generatedId = (0, import_react2.useId)();
586
+ const inputId = id ?? `radio-${generatedId}`;
587
+ const inputRef = (0, import_react2.useRef)(null);
588
+ const [internalChecked, setInternalChecked] = (0, import_react2.useState)(defaultChecked);
589
+ const isControlled = checkedProp !== void 0;
590
+ const checked = isControlled ? checkedProp : internalChecked;
591
+ const handleChange = (event) => {
592
+ const newChecked = event.target.checked;
593
+ if (!isControlled) {
594
+ setInternalChecked(newChecked);
595
+ }
596
+ if (event.target) {
597
+ event.target.blur();
598
+ }
599
+ onChange?.(event);
600
+ };
601
+ const currentState = disabled ? "disabled" : state;
602
+ const sizeClasses = SIZE_CLASSES4[size];
603
+ const actualRadioSize = sizeClasses.radio;
604
+ const actualDotSize = sizeClasses.dotSize;
605
+ const radioVariant = checked ? "checked" : "unchecked";
606
+ const stylingClasses = STATE_CLASSES[currentState][radioVariant];
607
+ const getBorderWidth = () => {
608
+ if (currentState === "focused") {
609
+ return "border-2";
610
+ }
611
+ return sizeClasses.borderWidth;
612
+ };
613
+ const borderWidthClass = getBorderWidth();
614
+ const radioClasses = cn(
615
+ BASE_RADIO_CLASSES,
616
+ actualRadioSize,
617
+ borderWidthClass,
618
+ stylingClasses,
619
+ className
620
+ );
621
+ const dotClasses = cn(
622
+ actualDotSize,
623
+ "rounded-full",
624
+ DOT_CLASSES[currentState],
625
+ "transition-all duration-200"
626
+ );
627
+ const isWrapperNeeded = currentState === "focused" || currentState === "invalid";
628
+ const wrapperBorderColor = currentState === "focused" ? "border-indicator-info" : "border-indicator-error";
629
+ const getTextColor = () => {
630
+ if (currentState === "disabled") {
631
+ return checked ? "text-text-900" : "text-text-600";
632
+ }
633
+ if (currentState === "focused") {
634
+ return "text-text-900";
635
+ }
636
+ return checked ? "text-text-900" : "text-text-600";
637
+ };
638
+ const getCursorClass = () => {
639
+ return currentState === "disabled" ? "cursor-not-allowed" : "cursor-pointer";
640
+ };
641
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col", children: [
642
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
643
+ "div",
644
+ {
645
+ className: cn(
646
+ "flex flex-row items-center",
647
+ isWrapperNeeded ? cn("p-1 border-2", wrapperBorderColor, "rounded-lg gap-1.5") : sizeClasses.spacing,
648
+ disabled ? "opacity-40" : ""
649
+ ),
650
+ children: [
651
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
652
+ "input",
653
+ {
654
+ ref: (node) => {
655
+ inputRef.current = node;
656
+ if (typeof ref === "function") ref(node);
657
+ else if (ref) ref.current = node;
658
+ },
659
+ type: "radio",
660
+ id: inputId,
661
+ checked,
662
+ disabled,
663
+ name,
664
+ value,
665
+ onChange: handleChange,
666
+ className: "sr-only",
667
+ style: {
668
+ position: "absolute",
669
+ left: "-9999px",
670
+ visibility: "hidden"
671
+ },
672
+ ...props
673
+ }
674
+ ),
675
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
676
+ "button",
677
+ {
678
+ type: "button",
679
+ className: radioClasses,
680
+ disabled,
681
+ "aria-pressed": checked,
682
+ onClick: (e) => {
683
+ e.preventDefault();
684
+ if (!disabled) {
685
+ if (inputRef.current) {
686
+ inputRef.current.click();
687
+ inputRef.current.blur();
688
+ }
689
+ }
690
+ },
691
+ onKeyDown: (e) => {
692
+ if ((e.key === "Enter" || e.key === " ") && !disabled) {
693
+ e.preventDefault();
694
+ if (inputRef.current) {
695
+ inputRef.current.click();
696
+ inputRef.current.blur();
697
+ }
698
+ }
699
+ },
700
+ children: checked && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: dotClasses })
701
+ }
702
+ ),
703
+ label && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
704
+ "div",
705
+ {
706
+ className: cn(
707
+ "flex flex-row items-center",
708
+ sizeClasses.labelHeight,
709
+ "flex-1 min-w-0"
710
+ ),
711
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
712
+ Text_default,
713
+ {
714
+ as: "label",
715
+ htmlFor: inputId,
716
+ size: sizeClasses.textSize,
717
+ weight: "normal",
718
+ className: cn(
719
+ getCursorClass(),
720
+ "select-none leading-normal flex items-center font-roboto truncate",
721
+ labelClassName
722
+ ),
723
+ color: getTextColor(),
724
+ children: label
725
+ }
726
+ )
727
+ }
728
+ )
729
+ ]
730
+ }
731
+ ),
732
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
733
+ Text_default,
734
+ {
735
+ size: "sm",
736
+ weight: "normal",
737
+ className: "mt-1.5 truncate",
738
+ color: "text-error-600",
739
+ children: errorMessage
740
+ }
741
+ ),
742
+ helperText && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
743
+ Text_default,
744
+ {
745
+ size: "sm",
746
+ weight: "normal",
747
+ className: "mt-1.5 truncate",
748
+ color: "text-text-500",
749
+ children: helperText
750
+ }
751
+ )
752
+ ] });
753
+ }
754
+ );
755
+ Radio.displayName = "Radio";
756
+ var createRadioGroupStore = (name, defaultValue, disabled, onValueChange) => (0, import_zustand.create)((set, get) => ({
757
+ value: defaultValue,
758
+ setValue: (value) => {
759
+ if (!get().disabled) {
760
+ set({ value });
761
+ get().onValueChange?.(value);
762
+ }
763
+ },
764
+ onValueChange,
765
+ disabled,
766
+ name
767
+ }));
768
+ var useRadioGroupStore = (externalStore) => {
769
+ if (!externalStore) {
770
+ throw new Error("RadioGroupItem must be used within a RadioGroup");
771
+ }
772
+ return externalStore;
773
+ };
774
+ var injectStore = (children, store) => import_react2.Children.map(children, (child) => {
775
+ if (!(0, import_react2.isValidElement)(child)) return child;
776
+ const typedChild = child;
777
+ const shouldInject = typedChild.type === RadioGroupItem;
778
+ return (0, import_react2.cloneElement)(typedChild, {
779
+ ...shouldInject ? { store } : {},
780
+ ...typedChild.props.children ? { children: injectStore(typedChild.props.children, store) } : {}
781
+ });
782
+ });
783
+ var RadioGroup = (0, import_react2.forwardRef)(
784
+ ({
785
+ value: propValue,
786
+ defaultValue = "",
787
+ onValueChange,
788
+ name: propName,
789
+ disabled = false,
790
+ className = "",
791
+ children,
792
+ ...props
793
+ }, ref) => {
794
+ const generatedId = (0, import_react2.useId)();
795
+ const name = propName || `radio-group-${generatedId}`;
796
+ const storeRef = (0, import_react2.useRef)(null);
797
+ storeRef.current ??= createRadioGroupStore(
798
+ name,
799
+ defaultValue,
800
+ disabled,
801
+ onValueChange
802
+ );
803
+ const store = storeRef.current;
804
+ const { setValue } = (0, import_zustand.useStore)(store, (s) => s);
805
+ (0, import_react2.useEffect)(() => {
806
+ const currentValue = store.getState().value;
807
+ if (currentValue && onValueChange) {
808
+ onValueChange(currentValue);
809
+ }
810
+ }, []);
811
+ (0, import_react2.useEffect)(() => {
812
+ if (propValue !== void 0) {
813
+ setValue(propValue);
814
+ }
815
+ }, [propValue, setValue]);
816
+ (0, import_react2.useEffect)(() => {
817
+ store.setState({ disabled });
818
+ }, [disabled, store]);
819
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
820
+ "div",
821
+ {
822
+ ref,
823
+ className,
824
+ role: "radiogroup",
825
+ "aria-label": name,
826
+ ...props,
827
+ children: injectStore(children, store)
828
+ }
829
+ );
830
+ }
831
+ );
832
+ RadioGroup.displayName = "RadioGroup";
833
+ var RadioGroupItem = (0, import_react2.forwardRef)(
834
+ ({
835
+ value,
836
+ store: externalStore,
837
+ disabled: itemDisabled,
838
+ size = "medium",
839
+ state = "default",
840
+ className = "",
841
+ id,
842
+ ...props
843
+ }, ref) => {
844
+ const store = useRadioGroupStore(externalStore);
845
+ const {
846
+ value: groupValue,
847
+ setValue,
848
+ disabled: groupDisabled,
849
+ name
850
+ } = (0, import_zustand.useStore)(store);
851
+ const generatedId = (0, import_react2.useId)();
852
+ const inputId = id ?? `radio-item-${generatedId}`;
853
+ const isChecked = groupValue === value;
854
+ const isDisabled = groupDisabled || itemDisabled;
855
+ const currentState = isDisabled ? "disabled" : state;
856
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
857
+ Radio,
858
+ {
859
+ ref,
860
+ id: inputId,
861
+ name,
862
+ value,
863
+ checked: isChecked,
864
+ disabled: isDisabled,
865
+ size,
866
+ state: currentState,
867
+ className,
868
+ onChange: (e) => {
869
+ if (e.target.checked && !isDisabled) {
870
+ setValue(value);
871
+ }
872
+ },
873
+ ...props
874
+ }
875
+ );
876
+ }
877
+ );
878
+ RadioGroupItem.displayName = "RadioGroupItem";
879
+
880
+ // src/components/Alternative/Alternative.tsx
881
+ var import_react3 = require("react");
882
+ var import_jsx_runtime6 = require("react/jsx-runtime");
883
+ var AlternativesList = ({
884
+ alternatives,
885
+ name,
886
+ defaultValue,
887
+ value,
888
+ onValueChange,
889
+ disabled = false,
890
+ layout = "default",
891
+ className = "",
892
+ mode = "interactive",
893
+ selectedValue
894
+ }) => {
895
+ const uniqueId = (0, import_react3.useId)();
896
+ const groupName = name || `alternatives-${uniqueId}`;
897
+ const [actualValue, setActualValue] = (0, import_react3.useState)(value);
898
+ const isReadonly = mode === "readonly";
899
+ const getStatusStyles = (status, isReadonly2) => {
900
+ const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
901
+ switch (status) {
902
+ case "correct":
903
+ return "bg-success-background border-success-300";
904
+ case "incorrect":
905
+ return "bg-error-background border-error-300";
906
+ default:
907
+ return `bg-background border-border-100 ${hoverClass}`;
908
+ }
909
+ };
910
+ const getStatusBadge = (status) => {
911
+ switch (status) {
912
+ case "correct":
913
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react3.CheckCircle, {}), children: "Resposta correta" });
914
+ case "incorrect":
915
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react3.XCircle, {}), children: "Resposta incorreta" });
916
+ default:
917
+ return null;
918
+ }
919
+ };
920
+ const getLayoutClasses = () => {
921
+ switch (layout) {
922
+ case "compact":
923
+ return "gap-2";
924
+ case "detailed":
925
+ return "gap-4";
926
+ default:
927
+ return "gap-3.5";
928
+ }
929
+ };
930
+ const renderReadonlyAlternative = (alternative) => {
931
+ const alternativeId = alternative.value;
932
+ const isUserSelected = selectedValue === alternative.value;
933
+ const isCorrectAnswer = alternative.status === "correct";
934
+ let displayStatus = void 0;
935
+ if (isUserSelected && !isCorrectAnswer) {
936
+ displayStatus = "incorrect";
937
+ } else if (isCorrectAnswer) {
938
+ displayStatus = "correct";
939
+ }
940
+ const statusStyles = getStatusStyles(displayStatus, true);
941
+ const statusBadge = getStatusBadge(displayStatus);
942
+ const renderRadio = () => {
943
+ const radioClasses = `w-6 h-6 rounded-full border-2 cursor-default transition-all duration-200 flex items-center justify-center ${isUserSelected ? "border-primary-950 bg-background" : "border-border-400 bg-background"}`;
944
+ const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
945
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: dotClasses }) });
946
+ };
947
+ if (layout === "detailed") {
948
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
949
+ "div",
950
+ {
951
+ className: cn(
952
+ "border-2 rounded-lg p-4 w-full",
953
+ statusStyles,
954
+ alternative.disabled ? "opacity-50" : ""
955
+ ),
956
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
957
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
958
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mt-1", children: renderRadio() }),
959
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-1", children: [
960
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
961
+ "p",
962
+ {
963
+ className: cn(
964
+ "block font-medium",
965
+ selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
966
+ ),
967
+ children: alternative.label
968
+ }
969
+ ),
970
+ alternative.description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
971
+ ] })
972
+ ] }),
973
+ statusBadge && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
974
+ ] })
975
+ },
976
+ alternativeId
977
+ );
978
+ }
979
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
980
+ "div",
981
+ {
982
+ className: cn(
983
+ "flex flex-row justify-between items-start gap-2 p-2 rounded-lg w-full",
984
+ statusStyles,
985
+ alternative.disabled ? "opacity-50" : ""
986
+ ),
987
+ children: [
988
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
989
+ renderRadio(),
990
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
991
+ "span",
992
+ {
993
+ className: cn(
994
+ "flex-1",
995
+ selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
996
+ ),
997
+ children: alternative.label
998
+ }
999
+ )
1000
+ ] }),
1001
+ statusBadge && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
1002
+ ]
1003
+ },
1004
+ alternativeId
1005
+ );
1006
+ };
1007
+ if (isReadonly) {
1008
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1009
+ "div",
1010
+ {
1011
+ className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
1012
+ children: alternatives.map(
1013
+ (alternative) => renderReadonlyAlternative(alternative)
1014
+ )
1015
+ }
1016
+ );
1017
+ }
1018
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1019
+ RadioGroup,
1020
+ {
1021
+ name: groupName,
1022
+ defaultValue,
1023
+ value,
1024
+ onValueChange: (value2) => {
1025
+ setActualValue(value2);
1026
+ onValueChange?.(value2);
1027
+ },
1028
+ disabled,
1029
+ className: cn("flex flex-col", getLayoutClasses(), className),
1030
+ children: alternatives.map((alternative, index) => {
1031
+ const alternativeId = alternative.value || `alt-${index}`;
1032
+ const statusStyles = getStatusStyles(alternative.status, false);
1033
+ const statusBadge = getStatusBadge(alternative.status);
1034
+ if (layout === "detailed") {
1035
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1036
+ "div",
1037
+ {
1038
+ className: cn(
1039
+ "border-2 rounded-lg p-4 transition-all",
1040
+ statusStyles,
1041
+ alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
1042
+ ),
1043
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
1044
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
1045
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1046
+ RadioGroupItem,
1047
+ {
1048
+ value: alternative.value,
1049
+ id: alternativeId,
1050
+ disabled: alternative.disabled,
1051
+ className: "mt-1"
1052
+ }
1053
+ ),
1054
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-1", children: [
1055
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1056
+ "label",
1057
+ {
1058
+ htmlFor: alternativeId,
1059
+ className: cn(
1060
+ "block font-medium",
1061
+ actualValue === alternative.value ? "text-text-950" : "text-text-600",
1062
+ alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
1063
+ ),
1064
+ children: alternative.label
1065
+ }
1066
+ ),
1067
+ alternative.description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
1068
+ ] })
1069
+ ] }),
1070
+ statusBadge && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
1071
+ ] })
1072
+ },
1073
+ alternativeId
1074
+ );
1075
+ }
1076
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1077
+ "div",
1078
+ {
1079
+ className: cn(
1080
+ "flex flex-row justify-between gap-2 items-start p-2 rounded-lg transition-all",
1081
+ statusStyles,
1082
+ alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
1083
+ ),
1084
+ children: [
1085
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
1086
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1087
+ RadioGroupItem,
1088
+ {
1089
+ value: alternative.value,
1090
+ id: alternativeId,
1091
+ disabled: alternative.disabled
1092
+ }
1093
+ ),
1094
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1095
+ "label",
1096
+ {
1097
+ htmlFor: alternativeId,
1098
+ className: cn(
1099
+ "flex-1",
1100
+ actualValue === alternative.value ? "text-text-950" : "text-text-600",
1101
+ alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
1102
+ ),
1103
+ children: alternative.label
1104
+ }
1105
+ )
1106
+ ] }),
1107
+ statusBadge && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
1108
+ ]
1109
+ },
1110
+ alternativeId
1111
+ );
1112
+ })
1113
+ }
1114
+ );
1115
+ };
1116
+ var HeaderAlternative = (0, import_react3.forwardRef)(
1117
+ ({ className, title, subTitle, content, ...props }, ref) => {
1118
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1119
+ "div",
1120
+ {
1121
+ ref,
1122
+ className: cn(
1123
+ "bg-background p-4 flex flex-col gap-4 rounded-xl",
1124
+ className
1125
+ ),
1126
+ ...props,
1127
+ children: [
1128
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "flex flex-col", children: [
1129
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-text-950 font-bold text-lg", children: title }),
1130
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-text-700 text-sm ", children: subTitle })
1131
+ ] }),
1132
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-text-950 text-md", children: content })
1133
+ ]
1134
+ }
1135
+ );
1136
+ }
1137
+ );
1138
+
1139
+ // src/components/Accordation/Accordation.tsx
1140
+ var import_react6 = require("react");
1141
+
1142
+ // src/components/Card/Card.tsx
1143
+ var import_react5 = require("react");
1144
+
1145
+ // src/components/ProgressBar/ProgressBar.tsx
1146
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1147
+ var SIZE_CLASSES5 = {
1148
+ small: {
1149
+ container: "h-1",
1150
+ // 4px height (h-1 = 4px in Tailwind)
1151
+ bar: "h-1",
1152
+ // 4px height for the fill bar
1153
+ spacing: "gap-2",
1154
+ // 8px gap between label and progress bar
1155
+ layout: "flex-col",
1156
+ // vertical layout for small
1157
+ borderRadius: "rounded-full"
1158
+ // 9999px border radius
1159
+ },
1160
+ medium: {
1161
+ container: "h-2",
1162
+ // 8px height (h-2 = 8px in Tailwind)
1163
+ bar: "h-2",
1164
+ // 8px height for the fill bar
1165
+ spacing: "gap-2",
1166
+ // 8px gap between progress bar and label
1167
+ layout: "flex-row items-center",
1168
+ // horizontal layout for medium
1169
+ borderRadius: "rounded-lg"
1170
+ // 8px border radius
1171
+ }
1172
+ };
1173
+ var VARIANT_CLASSES = {
1174
+ blue: {
1175
+ background: "bg-background-300",
1176
+ // Background track color (#D5D4D4)
1177
+ fill: "bg-primary-700"
1178
+ // Blue for activity progress (#2271C4)
1179
+ },
1180
+ green: {
1181
+ background: "bg-background-300",
1182
+ // Background track color (#D5D4D4)
1183
+ fill: "bg-success-200"
1184
+ // Green for performance (#84D3A2)
1185
+ }
1186
+ };
1187
+ var calculateProgressValues = (value, max) => {
1188
+ const safeValue = isNaN(value) ? 0 : value;
1189
+ const clampedValue = Math.max(0, Math.min(safeValue, max));
1190
+ const percentage = max === 0 ? 0 : clampedValue / max * 100;
1191
+ return { clampedValue, percentage };
1192
+ };
1193
+ var shouldShowHeader = (label, showPercentage, showHitCount) => {
1194
+ return !!(label || showPercentage || showHitCount);
1195
+ };
1196
+ var getDisplayPriority = (showHitCount, showPercentage, label, clampedValue, max, percentage) => {
1197
+ if (showHitCount) {
1198
+ return {
1199
+ type: "hitCount",
1200
+ content: `${Math.round(clampedValue)} de ${max}`,
1201
+ hasMetrics: true
1202
+ };
1203
+ }
1204
+ if (showPercentage) {
1205
+ return {
1206
+ type: "percentage",
1207
+ content: `${Math.round(percentage)}%`,
1208
+ hasMetrics: true
1209
+ };
1210
+ }
1211
+ return {
1212
+ type: "label",
1213
+ content: label,
1214
+ hasMetrics: false
1215
+ };
1216
+ };
1217
+ var getCompactLayoutConfig = ({
1218
+ showPercentage,
1219
+ showHitCount,
1220
+ percentage,
1221
+ clampedValue,
1222
+ max,
1223
+ label,
1224
+ percentageClassName,
1225
+ labelClassName
1226
+ }) => {
1227
+ const displayPriority = getDisplayPriority(
1228
+ showHitCount,
1229
+ showPercentage,
1230
+ label,
1231
+ clampedValue,
1232
+ max,
1233
+ percentage
1234
+ );
1235
+ return {
1236
+ color: displayPriority.hasMetrics ? "text-primary-600" : "text-primary-700",
1237
+ className: displayPriority.hasMetrics ? percentageClassName : labelClassName,
1238
+ content: displayPriority.content
1239
+ };
1240
+ };
1241
+ var getDefaultLayoutDisplayConfig = (size, label, showPercentage) => ({
1242
+ showHeader: size === "small" && !!(label || showPercentage),
1243
+ showPercentage: size === "medium" && showPercentage,
1244
+ showLabel: size === "medium" && !!label && !showPercentage
1245
+ // Only show label when percentage is not shown
1246
+ });
1247
+ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue, max, percentage, percentageClassName) => {
1248
+ if (!showHitCount && !showPercentage) return null;
1249
+ const displayPriority = getDisplayPriority(
1250
+ showHitCount,
1251
+ showPercentage,
1252
+ null,
1253
+ // label is not relevant for stacked layout metrics display
1254
+ clampedValue,
1255
+ max,
1256
+ percentage
1257
+ );
1258
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1259
+ "div",
1260
+ {
1261
+ className: cn(
1262
+ "text-xs font-medium leading-[14px] text-right",
1263
+ percentageClassName
1264
+ ),
1265
+ children: displayPriority.type === "hitCount" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1266
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-success-200", children: Math.round(clampedValue) }),
1267
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "text-text-600", children: [
1268
+ " de ",
1269
+ max
1270
+ ] })
1271
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text_default, { size: "xs", weight: "medium", className: "text-success-200", children: [
1272
+ Math.round(percentage),
1273
+ "%"
1274
+ ] })
1275
+ }
1276
+ );
1277
+ };
1278
+ var ProgressBarBase = ({
1279
+ clampedValue,
1280
+ max,
1281
+ percentage,
1282
+ label,
1283
+ variantClasses,
1284
+ containerClassName,
1285
+ fillClassName
1286
+ }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1287
+ "div",
1288
+ {
1289
+ className: cn(
1290
+ containerClassName,
1291
+ variantClasses.background,
1292
+ "overflow-hidden relative"
1293
+ ),
1294
+ children: [
1295
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1296
+ "progress",
1297
+ {
1298
+ value: clampedValue,
1299
+ max,
1300
+ "aria-label": typeof label === "string" ? `${label}: ${Math.round(percentage)}% complete` : `Progress: ${Math.round(percentage)}% of ${max}`,
1301
+ className: "absolute inset-0 w-full h-full opacity-0"
1302
+ }
1303
+ ),
1304
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1305
+ "div",
1306
+ {
1307
+ className: cn(
1308
+ fillClassName,
1309
+ variantClasses.fill,
1310
+ "transition-all duration-300 ease-out"
1311
+ ),
1312
+ style: { width: `${percentage}%` }
1313
+ }
1314
+ )
1315
+ ]
1316
+ }
1317
+ );
1318
+ var StackedLayout = ({
1319
+ className,
1320
+ label,
1321
+ showPercentage,
1322
+ showHitCount,
1323
+ labelClassName,
1324
+ percentageClassName,
1325
+ clampedValue,
1326
+ max,
1327
+ percentage,
1328
+ variantClasses,
1329
+ dimensions
1330
+ }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1331
+ "div",
1332
+ {
1333
+ className: cn(
1334
+ "flex flex-col items-start gap-2",
1335
+ dimensions.width,
1336
+ dimensions.height,
1337
+ className
1338
+ ),
1339
+ children: [
1340
+ shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
1341
+ label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1342
+ Text_default,
1343
+ {
1344
+ as: "div",
1345
+ size: "md",
1346
+ weight: "medium",
1347
+ className: cn("text-text-600 leading-[19px]", labelClassName),
1348
+ children: label
1349
+ }
1350
+ ),
1351
+ renderStackedHitCountDisplay(
1352
+ showHitCount,
1353
+ showPercentage,
1354
+ clampedValue,
1355
+ max,
1356
+ percentage,
1357
+ percentageClassName
1358
+ )
1359
+ ] }),
1360
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1361
+ ProgressBarBase,
1362
+ {
1363
+ clampedValue,
1364
+ max,
1365
+ percentage,
1366
+ label,
1367
+ variantClasses,
1368
+ containerClassName: "w-full h-2 rounded-lg",
1369
+ fillClassName: "h-2 rounded-lg shadow-hard-shadow-3"
1370
+ }
1371
+ )
1372
+ ]
1373
+ }
1374
+ );
1375
+ var CompactLayout = ({
1376
+ className,
1377
+ label,
1378
+ showPercentage,
1379
+ showHitCount,
1380
+ labelClassName,
1381
+ percentageClassName,
1382
+ clampedValue,
1383
+ max,
1384
+ percentage,
1385
+ variantClasses,
1386
+ dimensions
1387
+ }) => {
1388
+ const {
1389
+ color,
1390
+ className: compactClassName,
1391
+ content
1392
+ } = getCompactLayoutConfig({
1393
+ showPercentage,
1394
+ showHitCount,
1395
+ percentage,
1396
+ clampedValue,
1397
+ max,
1398
+ label,
1399
+ percentageClassName,
1400
+ labelClassName
1401
+ });
1402
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1403
+ "div",
1404
+ {
1405
+ className: cn(
1406
+ "flex flex-col items-start gap-1",
1407
+ dimensions.width,
1408
+ dimensions.height,
1409
+ className
1410
+ ),
1411
+ children: [
1412
+ shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1413
+ Text_default,
1414
+ {
1415
+ as: "div",
1416
+ size: "sm",
1417
+ weight: "medium",
1418
+ color,
1419
+ className: cn("leading-4 w-full", compactClassName),
1420
+ children: content
1421
+ }
1422
+ ),
1423
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1424
+ ProgressBarBase,
1425
+ {
1426
+ clampedValue,
1427
+ max,
1428
+ percentage,
1429
+ label,
1430
+ variantClasses,
1431
+ containerClassName: "w-full h-1 rounded-full",
1432
+ fillClassName: "h-1 rounded-full"
1433
+ }
1434
+ )
1435
+ ]
1436
+ }
1437
+ );
1438
+ };
1439
+ var DefaultLayout = ({
1440
+ className,
1441
+ size,
1442
+ sizeClasses,
1443
+ variantClasses,
1444
+ label,
1445
+ showPercentage,
1446
+ labelClassName,
1447
+ percentageClassName,
1448
+ clampedValue,
1449
+ max,
1450
+ percentage
1451
+ }) => {
1452
+ const gapClass = size === "medium" ? "gap-2" : sizeClasses.spacing;
1453
+ const progressBarClass = size === "medium" ? "flex-grow" : "w-full";
1454
+ const displayConfig = getDefaultLayoutDisplayConfig(
1455
+ size,
1456
+ label,
1457
+ showPercentage
1458
+ );
1459
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cn("flex", sizeClasses.layout, gapClass, className), children: [
1460
+ displayConfig.showHeader && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-row items-center justify-between w-full", children: [
1461
+ label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1462
+ Text_default,
1463
+ {
1464
+ as: "div",
1465
+ size: "xs",
1466
+ weight: "medium",
1467
+ className: cn(
1468
+ "text-text-950 leading-none tracking-normal text-center",
1469
+ labelClassName
1470
+ ),
1471
+ children: label
1472
+ }
1473
+ ),
1474
+ showPercentage && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1475
+ Text_default,
1476
+ {
1477
+ size: "xs",
1478
+ weight: "medium",
1479
+ className: cn(
1480
+ "text-text-950 leading-none tracking-normal text-center",
1481
+ percentageClassName
1482
+ ),
1483
+ children: [
1484
+ Math.round(percentage),
1485
+ "%"
1486
+ ]
1487
+ }
1488
+ )
1489
+ ] }),
1490
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1491
+ ProgressBarBase,
1492
+ {
1493
+ clampedValue,
1494
+ max,
1495
+ percentage,
1496
+ label,
1497
+ variantClasses,
1498
+ containerClassName: cn(
1499
+ progressBarClass,
1500
+ sizeClasses.container,
1501
+ sizeClasses.borderRadius
1502
+ ),
1503
+ fillClassName: cn(
1504
+ sizeClasses.bar,
1505
+ sizeClasses.borderRadius,
1506
+ "shadow-hard-shadow-3"
1507
+ )
1508
+ }
1509
+ ),
1510
+ displayConfig.showPercentage && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1511
+ Text_default,
1512
+ {
1513
+ size: "xs",
1514
+ weight: "medium",
1515
+ className: cn(
1516
+ "text-text-950 leading-none tracking-normal text-center flex-none",
1517
+ percentageClassName
1518
+ ),
1519
+ children: [
1520
+ Math.round(percentage),
1521
+ "%"
1522
+ ]
1523
+ }
1524
+ ),
1525
+ displayConfig.showLabel && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1526
+ Text_default,
1527
+ {
1528
+ as: "div",
1529
+ size: "xs",
1530
+ weight: "medium",
1531
+ className: cn(
1532
+ "text-text-950 leading-none tracking-normal text-center flex-none",
1533
+ labelClassName
1534
+ ),
1535
+ children: label
1536
+ }
1537
+ )
1538
+ ] });
1539
+ };
1540
+ var ProgressBar = ({
1541
+ value,
1542
+ max = 100,
1543
+ size = "medium",
1544
+ variant = "blue",
1545
+ layout = "default",
1546
+ label,
1547
+ showPercentage = false,
1548
+ showHitCount = false,
1549
+ className = "",
1550
+ labelClassName = "",
1551
+ percentageClassName = "",
1552
+ stackedWidth,
1553
+ stackedHeight,
1554
+ compactWidth,
1555
+ compactHeight
1556
+ }) => {
1557
+ const { clampedValue, percentage } = calculateProgressValues(value, max);
1558
+ const sizeClasses = SIZE_CLASSES5[size];
1559
+ const variantClasses = VARIANT_CLASSES[variant];
1560
+ if (layout === "stacked") {
1561
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1562
+ StackedLayout,
1563
+ {
1564
+ className,
1565
+ label,
1566
+ showPercentage,
1567
+ showHitCount,
1568
+ labelClassName,
1569
+ percentageClassName,
1570
+ clampedValue,
1571
+ max,
1572
+ percentage,
1573
+ variantClasses,
1574
+ dimensions: {
1575
+ width: stackedWidth ?? "w-[380px]",
1576
+ height: stackedHeight ?? "h-[35px]"
1577
+ }
1578
+ }
1579
+ );
1580
+ }
1581
+ if (layout === "compact") {
1582
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1583
+ CompactLayout,
1584
+ {
1585
+ className,
1586
+ label,
1587
+ showPercentage,
1588
+ showHitCount,
1589
+ labelClassName,
1590
+ percentageClassName,
1591
+ clampedValue,
1592
+ max,
1593
+ percentage,
1594
+ variantClasses,
1595
+ dimensions: {
1596
+ width: compactWidth ?? "w-[131px]",
1597
+ height: compactHeight ?? "h-[24px]"
1598
+ }
1599
+ }
1600
+ );
1601
+ }
1602
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1603
+ DefaultLayout,
1604
+ {
1605
+ className,
1606
+ size,
1607
+ sizeClasses,
1608
+ variantClasses,
1609
+ label,
1610
+ showPercentage,
1611
+ labelClassName,
1612
+ percentageClassName,
1613
+ clampedValue,
1614
+ max,
1615
+ percentage
1616
+ }
1617
+ );
1618
+ };
1619
+ var ProgressBar_default = ProgressBar;
1620
+
1621
+ // src/components/Card/Card.tsx
1622
+ var import_phosphor_react4 = require("phosphor-react");
1623
+
1624
+ // src/components/IconRender/IconRender.tsx
1625
+ var import_react4 = require("react");
1626
+ var PhosphorIcons = __toESM(require("phosphor-react"));
1627
+
1628
+ // src/assets/icons/subjects/ChatPT.tsx
1629
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1630
+ var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1631
+ "svg",
1632
+ {
1633
+ width: size,
1634
+ height: size,
1635
+ viewBox: "0 0 32 32",
1636
+ fill: "none",
1637
+ xmlns: "http://www.w3.org/2000/svg",
1638
+ children: [
1639
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1640
+ "path",
1641
+ {
1642
+ d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
1643
+ fill: color
1644
+ }
1645
+ ),
1646
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1647
+ "path",
1648
+ {
1649
+ d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
1650
+ fill: color
1651
+ }
1652
+ ),
1653
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1654
+ "path",
1655
+ {
1656
+ d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
1657
+ fill: color
1658
+ }
1659
+ )
1660
+ ]
1661
+ }
1662
+ );
1663
+
1664
+ // src/assets/icons/subjects/ChatEN.tsx
1665
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1666
+ var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1667
+ "svg",
1668
+ {
1669
+ width: size,
1670
+ height: size,
1671
+ viewBox: "0 0 32 32",
1672
+ fill: "none",
1673
+ xmlns: "http://www.w3.org/2000/svg",
1674
+ children: [
1675
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1676
+ "path",
1677
+ {
1678
+ d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
1679
+ fill: color
1680
+ }
1681
+ ),
1682
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1683
+ "path",
1684
+ {
1685
+ d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
1686
+ fill: color
1687
+ }
1688
+ ),
1689
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1690
+ "path",
1691
+ {
1692
+ d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
1693
+ fill: color
1694
+ }
1695
+ )
1696
+ ]
1697
+ }
1698
+ );
1699
+
1700
+ // src/assets/icons/subjects/ChatES.tsx
1701
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1702
+ var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1703
+ "svg",
1704
+ {
1705
+ width: size,
1706
+ height: size,
1707
+ viewBox: "0 0 32 32",
1708
+ fill: "none",
1709
+ xmlns: "http://www.w3.org/2000/svg",
1710
+ children: [
1711
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1712
+ "path",
1713
+ {
1714
+ d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
1715
+ fill: color
1716
+ }
1717
+ ),
1718
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1719
+ "path",
1720
+ {
1721
+ d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
1722
+ fill: color
1723
+ }
1724
+ ),
1725
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1726
+ "path",
1727
+ {
1728
+ d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
1729
+ fill: color
1730
+ }
1731
+ )
1732
+ ]
1733
+ }
1734
+ );
1735
+
1736
+ // src/components/IconRender/IconRender.tsx
1737
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1738
+ var IconRender = ({
1739
+ iconName,
1740
+ color = "#000000",
1741
+ size = 24,
1742
+ weight = "regular"
1743
+ }) => {
1744
+ if (typeof iconName === "string") {
1745
+ switch (iconName) {
1746
+ case "Chat_PT":
1747
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChatPT, { size, color });
1748
+ case "Chat_EN":
1749
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChatEN, { size, color });
1750
+ case "Chat_ES":
1751
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChatES, { size, color });
1752
+ default: {
1753
+ const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
1754
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconComponent, { size, color, weight });
1755
+ }
1756
+ }
1757
+ } else {
1758
+ return (0, import_react4.cloneElement)(iconName, {
1759
+ size,
1760
+ color: "currentColor"
1761
+ });
1762
+ }
1763
+ };
1764
+ var IconRender_default = IconRender;
1765
+
1766
+ // src/components/Card/Card.tsx
1767
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1768
+ var CARD_BASE_CLASSES = {
1769
+ default: "w-full bg-background border border-border-50 rounded-xl",
1770
+ compact: "w-full bg-background border border-border-50 rounded-lg",
1771
+ minimal: "w-full bg-background border border-border-100 rounded-md"
1772
+ };
1773
+ var CARD_PADDING_CLASSES = {
1774
+ none: "",
1775
+ small: "p-2",
1776
+ medium: "p-4",
1777
+ large: "p-6"
1778
+ };
1779
+ var CARD_MIN_HEIGHT_CLASSES = {
1780
+ none: "",
1781
+ small: "min-h-16",
1782
+ medium: "min-h-20",
1783
+ large: "min-h-24"
1784
+ };
1785
+ var CARD_LAYOUT_CLASSES = {
1786
+ horizontal: "flex flex-row",
1787
+ vertical: "flex flex-col"
1788
+ };
1789
+ var CARD_CURSOR_CLASSES = {
1790
+ default: "",
1791
+ pointer: "cursor-pointer"
1792
+ };
1793
+ var CardBase = (0, import_react5.forwardRef)(
1794
+ ({
1795
+ children,
1796
+ variant = "default",
1797
+ layout = "horizontal",
1798
+ padding = "medium",
1799
+ minHeight = "medium",
1800
+ cursor = "default",
1801
+ className = "",
1802
+ ...props
1803
+ }, ref) => {
1804
+ const baseClasses = CARD_BASE_CLASSES[variant];
1805
+ const paddingClasses = CARD_PADDING_CLASSES[padding];
1806
+ const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
1807
+ const layoutClasses = CARD_LAYOUT_CLASSES[layout];
1808
+ const cursorClasses = CARD_CURSOR_CLASSES[cursor];
1809
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1810
+ "div",
1811
+ {
1812
+ ref,
1813
+ className: cn(
1814
+ baseClasses,
1815
+ paddingClasses,
1816
+ minHeightClasses,
1817
+ layoutClasses,
1818
+ cursorClasses,
1819
+ className
1820
+ ),
1821
+ ...props,
1822
+ children
1823
+ }
1824
+ );
1825
+ }
1826
+ );
1827
+ var ACTION_CARD_CLASSES = {
1828
+ warning: "bg-warning-background",
1829
+ success: "bg-success-200",
1830
+ error: "bg-error-100",
1831
+ info: "bg-info-background"
1832
+ };
1833
+ var ACTION_ICON_CLASSES = {
1834
+ warning: "bg-warning-300 text-text",
1835
+ success: "bg-indicator-positive text-text-950",
1836
+ error: "bg-indicator-negative text-text",
1837
+ info: "bg-info-500 text-text"
1838
+ };
1839
+ var ACTION_SUBTITLE_CLASSES = {
1840
+ warning: "text-warning-600",
1841
+ success: "text-success-700",
1842
+ error: "text-error-700",
1843
+ info: "text-info-700"
1844
+ };
1845
+ var ACTION_HEADER_CLASSES = {
1846
+ warning: "text-warning-300",
1847
+ success: "text-success-300",
1848
+ error: "text-error-300",
1849
+ info: "text-info-300"
1850
+ };
1851
+ var CardActivitiesResults = (0, import_react5.forwardRef)(
1852
+ ({
1853
+ icon,
1854
+ title,
1855
+ subTitle,
1856
+ header,
1857
+ extended = false,
1858
+ action = "success",
1859
+ description,
1860
+ className,
1861
+ ...props
1862
+ }, ref) => {
1863
+ const actionCardClasses = ACTION_CARD_CLASSES[action];
1864
+ const actionIconClasses = ACTION_ICON_CLASSES[action];
1865
+ const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
1866
+ const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
1867
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1868
+ "div",
1869
+ {
1870
+ ref,
1871
+ className: cn(
1872
+ "w-full flex flex-col border border-border-50 bg-background rounded-xl",
1873
+ className
1874
+ ),
1875
+ ...props,
1876
+ children: [
1877
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1878
+ "div",
1879
+ {
1880
+ className: cn(
1881
+ "flex flex-col gap-1 items-center justify-center p-4",
1882
+ actionCardClasses,
1883
+ extended ? "rounded-t-xl" : "rounded-xl"
1884
+ ),
1885
+ children: [
1886
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1887
+ "span",
1888
+ {
1889
+ className: cn(
1890
+ "size-7.5 rounded-full flex items-center justify-center",
1891
+ actionIconClasses
1892
+ ),
1893
+ children: icon
1894
+ }
1895
+ ),
1896
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1897
+ Text_default,
1898
+ {
1899
+ size: "2xs",
1900
+ weight: "medium",
1901
+ className: "text-text-800 uppercase truncate",
1902
+ children: title
1903
+ }
1904
+ ),
1905
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1906
+ "p",
1907
+ {
1908
+ className: cn("text-lg font-bold truncate", actionSubTitleClasses),
1909
+ children: subTitle
1910
+ }
1911
+ )
1912
+ ]
1913
+ }
1914
+ ),
1915
+ extended && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
1916
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1917
+ "p",
1918
+ {
1919
+ className: cn(
1920
+ "text-2xs font-medium uppercase truncate",
1921
+ actionHeaderClasses
1922
+ ),
1923
+ children: header
1924
+ }
1925
+ ),
1926
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Badge_default, { size: "large", action: "info", children: description })
1927
+ ] })
1928
+ ]
1929
+ }
1930
+ );
1931
+ }
1932
+ );
1933
+ var CardQuestions = (0, import_react5.forwardRef)(
1934
+ ({
1935
+ header,
1936
+ state = "undone",
1937
+ className,
1938
+ onClickButton,
1939
+ valueButton,
1940
+ ...props
1941
+ }, ref) => {
1942
+ const isDone = state === "done";
1943
+ const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
1944
+ const buttonLabel = isDone ? "Ver Resultado" : "Responder";
1945
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1946
+ CardBase,
1947
+ {
1948
+ ref,
1949
+ layout: "horizontal",
1950
+ padding: "medium",
1951
+ minHeight: "medium",
1952
+ className: cn("justify-between gap-4", className),
1953
+ ...props,
1954
+ children: [
1955
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
1956
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
1957
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-row gap-6 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1958
+ Badge_default,
1959
+ {
1960
+ size: "medium",
1961
+ variant: "solid",
1962
+ action: isDone ? "success" : "error",
1963
+ children: stateLabel
1964
+ }
1965
+ ) })
1966
+ ] }),
1967
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1968
+ Button_default,
1969
+ {
1970
+ size: "extra-small",
1971
+ onClick: () => onClickButton?.(valueButton),
1972
+ className: "min-w-fit",
1973
+ children: buttonLabel
1974
+ }
1975
+ ) })
1976
+ ]
1977
+ }
1978
+ );
1979
+ }
1980
+ );
1981
+ var CardProgress = (0, import_react5.forwardRef)(
1982
+ ({
1983
+ header,
1984
+ subhead,
1985
+ initialDate,
1986
+ endDate,
1987
+ progress = 0,
1988
+ direction = "horizontal",
1989
+ icon,
1990
+ color = "#B7DFFF",
1991
+ progressVariant = "blue",
1992
+ showDates = true,
1993
+ className,
1994
+ ...props
1995
+ }, ref) => {
1996
+ const isHorizontal = direction === "horizontal";
1997
+ const contentComponent = {
1998
+ horizontal: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1999
+ showDates && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
2000
+ initialDate && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
2001
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
2002
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-600", children: initialDate })
2003
+ ] }),
2004
+ endDate && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
2005
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-800 font-semibold", children: "Fim" }),
2006
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-600", children: endDate })
2007
+ ] })
2008
+ ] }),
2009
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
2010
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2011
+ ProgressBar_default,
2012
+ {
2013
+ size: "small",
2014
+ value: progress,
2015
+ variant: progressVariant,
2016
+ "data-testid": "progress-bar"
2017
+ }
2018
+ ),
2019
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2020
+ Text_default,
2021
+ {
2022
+ size: "xs",
2023
+ weight: "medium",
2024
+ className: cn(
2025
+ "text-text-950 leading-none tracking-normal text-center flex-none"
2026
+ ),
2027
+ children: [
2028
+ Math.round(progress),
2029
+ "%"
2030
+ ]
2031
+ }
2032
+ )
2033
+ ] })
2034
+ ] }),
2035
+ vertical: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-text-800", children: subhead })
2036
+ };
2037
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2038
+ CardBase,
2039
+ {
2040
+ ref,
2041
+ layout: isHorizontal ? "horizontal" : "vertical",
2042
+ padding: "none",
2043
+ minHeight: "medium",
2044
+ cursor: "pointer",
2045
+ className: cn(isHorizontal ? "h-20" : "", className),
2046
+ ...props,
2047
+ children: [
2048
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2049
+ "div",
2050
+ {
2051
+ className: cn(
2052
+ "flex justify-center items-center [&>svg]:size-6 text-text-950",
2053
+ isHorizontal ? "min-w-[80px] min-h-[80px] rounded-l-xl" : "min-h-[50px] w-full rounded-t-xl",
2054
+ !color.startsWith("#") ? `${color}` : ""
2055
+ ),
2056
+ style: color.startsWith("#") ? { backgroundColor: color } : void 0,
2057
+ "data-testid": "icon-container",
2058
+ children: icon
2059
+ }
2060
+ ),
2061
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2062
+ "div",
2063
+ {
2064
+ className: cn(
2065
+ "p-4 flex flex-col justify-between w-full h-full",
2066
+ !isHorizontal && "gap-4"
2067
+ ),
2068
+ children: [
2069
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
2070
+ contentComponent[direction]
2071
+ ]
2072
+ }
2073
+ )
2074
+ ]
2075
+ }
2076
+ );
2077
+ }
2078
+ );
2079
+ var CardTopic = (0, import_react5.forwardRef)(
2080
+ ({
2081
+ header,
2082
+ subHead,
2083
+ progress,
2084
+ showPercentage = false,
2085
+ progressVariant = "blue",
2086
+ className = "",
2087
+ ...props
2088
+ }, ref) => {
2089
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2090
+ CardBase,
2091
+ {
2092
+ ref,
2093
+ layout: "vertical",
2094
+ padding: "small",
2095
+ minHeight: "medium",
2096
+ cursor: "pointer",
2097
+ className: cn("justify-center gap-2 py-2 px-4", className),
2098
+ ...props,
2099
+ children: [
2100
+ subHead && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react5.Fragment, { children: [
2101
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: text }),
2102
+ index < subHead.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: "\u2022" })
2103
+ ] }, `${text} - ${index}`)) }),
2104
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
2105
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
2106
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2107
+ ProgressBar_default,
2108
+ {
2109
+ size: "small",
2110
+ value: progress,
2111
+ variant: progressVariant,
2112
+ "data-testid": "progress-bar"
2113
+ }
2114
+ ),
2115
+ showPercentage && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2116
+ Text_default,
2117
+ {
2118
+ size: "xs",
2119
+ weight: "medium",
2120
+ className: cn(
2121
+ "text-text-950 leading-none tracking-normal text-center flex-none"
2122
+ ),
2123
+ children: [
2124
+ Math.round(progress),
2125
+ "%"
2126
+ ]
2127
+ }
2128
+ )
2129
+ ] })
2130
+ ]
2131
+ }
2132
+ );
2133
+ }
2134
+ );
2135
+ var CardPerformance = (0, import_react5.forwardRef)(
2136
+ ({
2137
+ header,
2138
+ progress,
2139
+ description = "Sem dados ainda! Voc\xEA ainda n\xE3o fez um question\xE1rio neste assunto.",
2140
+ actionVariant = "button",
2141
+ progressVariant = "blue",
2142
+ labelProgress = "",
2143
+ className = "",
2144
+ onClickButton,
2145
+ valueButton,
2146
+ ...props
2147
+ }, ref) => {
2148
+ const hasProgress = progress !== void 0;
2149
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2150
+ CardBase,
2151
+ {
2152
+ ref,
2153
+ layout: "horizontal",
2154
+ padding: "medium",
2155
+ minHeight: "none",
2156
+ className: cn(
2157
+ actionVariant == "caret" ? "cursor-pointer" : "",
2158
+ className
2159
+ ),
2160
+ onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
2161
+ ...props,
2162
+ children: [
2163
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w-full flex flex-col justify-between gap-2", children: [
2164
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row justify-between items-center gap-2", children: [
2165
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
2166
+ actionVariant === "button" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2167
+ Button_default,
2168
+ {
2169
+ variant: "outline",
2170
+ size: "extra-small",
2171
+ onClick: () => onClickButton?.(valueButton),
2172
+ className: "min-w-fit flex-shrink-0",
2173
+ children: "Ver Aula"
2174
+ }
2175
+ )
2176
+ ] }),
2177
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2178
+ ProgressBar_default,
2179
+ {
2180
+ value: progress,
2181
+ label: `${progress}% ${labelProgress}`,
2182
+ variant: progressVariant
2183
+ }
2184
+ ) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs text-text-600 truncate", children: description }) })
2185
+ ] }),
2186
+ actionVariant == "caret" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2187
+ import_phosphor_react4.CaretRight,
2188
+ {
2189
+ className: "size-4.5 text-text-800 cursor-pointer",
2190
+ "data-testid": "caret-icon"
2191
+ }
2192
+ )
2193
+ ]
2194
+ }
2195
+ );
2196
+ }
2197
+ );
2198
+ var CardResults = (0, import_react5.forwardRef)(
2199
+ ({
2200
+ header,
2201
+ correct_answers,
2202
+ incorrect_answers,
2203
+ icon,
2204
+ direction = "col",
2205
+ color = "#B7DFFF",
2206
+ className,
2207
+ ...props
2208
+ }, ref) => {
2209
+ const isRow = direction == "row";
2210
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2211
+ CardBase,
2212
+ {
2213
+ ref,
2214
+ layout: "horizontal",
2215
+ padding: "none",
2216
+ minHeight: "medium",
2217
+ className: cn("items-stretch cursor-pointer pr-4", className),
2218
+ ...props,
2219
+ children: [
2220
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2221
+ "div",
2222
+ {
2223
+ className: cn(
2224
+ "flex justify-center items-center [&>svg]:size-8 text-text-950 min-w-20 max-w-20 min-h-full rounded-l-xl"
2225
+ ),
2226
+ style: {
2227
+ backgroundColor: color
2228
+ },
2229
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
2230
+ }
2231
+ ),
2232
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w-full flex flex-row justify-between items-center", children: [
2233
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2234
+ "div",
2235
+ {
2236
+ className: cn(
2237
+ "p-4 flex flex-wrap justify-between w-full h-full",
2238
+ isRow ? "flex-row items-center gap-2" : "flex-col"
2239
+ ),
2240
+ children: [
2241
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
2242
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
2243
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2244
+ Badge_default,
2245
+ {
2246
+ action: "success",
2247
+ variant: "solid",
2248
+ size: "large",
2249
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.CheckCircle, {}),
2250
+ children: [
2251
+ correct_answers,
2252
+ " Corretas"
2253
+ ]
2254
+ }
2255
+ ),
2256
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2257
+ Badge_default,
2258
+ {
2259
+ action: "error",
2260
+ variant: "solid",
2261
+ size: "large",
2262
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.XCircle, {}),
2263
+ children: [
2264
+ incorrect_answers,
2265
+ " Incorretas"
2266
+ ]
2267
+ }
2268
+ )
2269
+ ] })
2270
+ ]
2271
+ }
2272
+ ),
2273
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
2274
+ ] })
2275
+ ]
2276
+ }
2277
+ );
2278
+ }
2279
+ );
2280
+ var CardStatus = (0, import_react5.forwardRef)(
2281
+ ({ header, className, status, label, ...props }, ref) => {
2282
+ const getLabelBadge = (status2) => {
2283
+ switch (status2) {
2284
+ case "correct":
2285
+ return "Correta";
2286
+ case "incorrect":
2287
+ return "Incorreta";
2288
+ case "unanswered":
2289
+ return "Em branco";
2290
+ case "pending":
2291
+ return "Avalia\xE7\xE3o pendente";
2292
+ default:
2293
+ return "Em branco";
2294
+ }
2295
+ };
2296
+ const getIconBadge = (status2) => {
2297
+ switch (status2) {
2298
+ case "correct":
2299
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.CheckCircle, {});
2300
+ case "incorrect":
2301
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.XCircle, {});
2302
+ case "pending":
2303
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.Clock, {});
2304
+ default:
2305
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.XCircle, {});
2306
+ }
2307
+ };
2308
+ const getActionBadge = (status2) => {
2309
+ switch (status2) {
2310
+ case "correct":
2311
+ return "success";
2312
+ case "incorrect":
2313
+ return "error";
2314
+ case "pending":
2315
+ return "info";
2316
+ default:
2317
+ return "info";
2318
+ }
2319
+ };
2320
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2321
+ CardBase,
2322
+ {
2323
+ ref,
2324
+ layout: "horizontal",
2325
+ padding: "medium",
2326
+ minHeight: "medium",
2327
+ className: cn("items-center cursor-pointer", className),
2328
+ ...props,
2329
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
2330
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
2331
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
2332
+ status && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2333
+ Badge_default,
2334
+ {
2335
+ action: getActionBadge(status),
2336
+ variant: "solid",
2337
+ size: "medium",
2338
+ iconLeft: getIconBadge(status),
2339
+ children: getLabelBadge(status)
2340
+ }
2341
+ ),
2342
+ label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-text-800", children: label })
2343
+ ] }),
2344
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.CaretRight, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
2345
+ ] })
2346
+ }
2347
+ );
2348
+ }
2349
+ );
2350
+ var CardSettings = (0, import_react5.forwardRef)(
2351
+ ({ header, className, icon, ...props }, ref) => {
2352
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2353
+ CardBase,
2354
+ {
2355
+ ref,
2356
+ layout: "horizontal",
2357
+ padding: "small",
2358
+ minHeight: "none",
2359
+ className: cn(
2360
+ "border-none items-center gap-2 text-text-700",
2361
+ className
2362
+ ),
2363
+ ...props,
2364
+ children: [
2365
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "[&>svg]:size-6", children: icon }),
2366
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "w-full text-sm truncate", children: header }),
2367
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.CaretRight, { size: 24, className: "cursor-pointer" })
2368
+ ]
2369
+ }
2370
+ );
2371
+ }
2372
+ );
2373
+ var CardSupport = (0, import_react5.forwardRef)(
2374
+ ({ header, className, direction = "col", children, ...props }, ref) => {
2375
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2376
+ CardBase,
2377
+ {
2378
+ ref,
2379
+ layout: "horizontal",
2380
+ padding: "medium",
2381
+ minHeight: "none",
2382
+ className: cn(
2383
+ "border-none items-center gap-2 text-text-700",
2384
+ className
2385
+ ),
2386
+ ...props,
2387
+ children: [
2388
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2389
+ "div",
2390
+ {
2391
+ className: cn(
2392
+ "w-full flex",
2393
+ direction == "col" ? "flex-col" : "flex-row items-center"
2394
+ ),
2395
+ children: [
2396
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
2397
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex flex-row gap-1", children })
2398
+ ]
2399
+ }
2400
+ ),
2401
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.CaretRight, { className: "text-text-800 cursor-pointer", size: 24 })
2402
+ ]
2403
+ }
2404
+ );
2405
+ }
2406
+ );
2407
+ var CardForum = (0, import_react5.forwardRef)(
2408
+ ({
2409
+ title,
2410
+ content,
2411
+ comments,
2412
+ onClickComments,
2413
+ valueComments,
2414
+ onClickProfile,
2415
+ valueProfile,
2416
+ className = "",
2417
+ date,
2418
+ hour,
2419
+ ...props
2420
+ }, ref) => {
2421
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2422
+ CardBase,
2423
+ {
2424
+ ref,
2425
+ layout: "horizontal",
2426
+ padding: "medium",
2427
+ minHeight: "none",
2428
+ variant: "minimal",
2429
+ className: cn("w-auto h-auto gap-3", className),
2430
+ ...props,
2431
+ children: [
2432
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2433
+ "button",
2434
+ {
2435
+ type: "button",
2436
+ "aria-label": "Ver perfil",
2437
+ onClick: () => onClickProfile?.(valueProfile),
2438
+ className: "min-w-8 h-8 rounded-full bg-background-950"
2439
+ }
2440
+ ),
2441
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
2442
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
2443
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
2444
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "text-xs text-text-600", children: [
2445
+ "\u2022 ",
2446
+ date,
2447
+ " \u2022 ",
2448
+ hour
2449
+ ] })
2450
+ ] }),
2451
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
2452
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2453
+ "button",
2454
+ {
2455
+ type: "button",
2456
+ "aria-label": "Ver coment\xE1rios",
2457
+ onClick: () => onClickComments?.(valueComments),
2458
+ className: "text-text-600 flex flex-row gap-2 items-center",
2459
+ children: [
2460
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.ChatCircleText, { "aria-hidden": "true", size: 16 }),
2461
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "text-xs", children: [
2462
+ comments,
2463
+ " respostas"
2464
+ ] })
2465
+ ]
2466
+ }
2467
+ )
2468
+ ] })
2469
+ ]
2470
+ }
2471
+ );
2472
+ }
2473
+ );
2474
+ var CardAudio = (0, import_react5.forwardRef)(
2475
+ ({
2476
+ src,
2477
+ title,
2478
+ onPlay,
2479
+ onPause,
2480
+ onEnded,
2481
+ onAudioTimeUpdate,
2482
+ loop = false,
2483
+ preload = "metadata",
2484
+ tracks,
2485
+ className,
2486
+ ...props
2487
+ }, ref) => {
2488
+ const [isPlaying, setIsPlaying] = (0, import_react5.useState)(false);
2489
+ const [currentTime, setCurrentTime] = (0, import_react5.useState)(0);
2490
+ const [duration, setDuration] = (0, import_react5.useState)(0);
2491
+ const [volume, setVolume] = (0, import_react5.useState)(1);
2492
+ const [showVolumeControl, setShowVolumeControl] = (0, import_react5.useState)(false);
2493
+ const [showSpeedMenu, setShowSpeedMenu] = (0, import_react5.useState)(false);
2494
+ const [playbackRate, setPlaybackRate] = (0, import_react5.useState)(1);
2495
+ const audioRef = (0, import_react5.useRef)(null);
2496
+ const volumeControlRef = (0, import_react5.useRef)(null);
2497
+ const speedMenuRef = (0, import_react5.useRef)(null);
2498
+ const formatTime = (time) => {
2499
+ const minutes = Math.floor(time / 60);
2500
+ const seconds = Math.floor(time % 60);
2501
+ return `${minutes}:${seconds.toString().padStart(2, "0")}`;
2502
+ };
2503
+ const handlePlayPause = () => {
2504
+ if (isPlaying) {
2505
+ audioRef.current?.pause();
2506
+ setIsPlaying(false);
2507
+ onPause?.();
2508
+ } else {
2509
+ audioRef.current?.play();
2510
+ setIsPlaying(true);
2511
+ onPlay?.();
2512
+ }
2513
+ };
2514
+ const handleTimeUpdate = () => {
2515
+ const current = audioRef.current?.currentTime ?? 0;
2516
+ const total = audioRef.current?.duration ?? 0;
2517
+ setCurrentTime(current);
2518
+ setDuration(total);
2519
+ onAudioTimeUpdate?.(current, total);
2520
+ };
2521
+ const handleLoadedMetadata = () => {
2522
+ setDuration(audioRef.current?.duration ?? 0);
2523
+ };
2524
+ const handleEnded = () => {
2525
+ setIsPlaying(false);
2526
+ setCurrentTime(0);
2527
+ onEnded?.();
2528
+ };
2529
+ const handleProgressClick = (e) => {
2530
+ const rect = e.currentTarget.getBoundingClientRect();
2531
+ const clickX = e.clientX - rect.left;
2532
+ const width = rect.width;
2533
+ const percentage = clickX / width;
2534
+ const newTime = percentage * duration;
2535
+ if (audioRef.current) {
2536
+ audioRef.current.currentTime = newTime;
2537
+ }
2538
+ setCurrentTime(newTime);
2539
+ };
2540
+ const handleVolumeChange = (e) => {
2541
+ const newVolume = parseFloat(e.target.value);
2542
+ setVolume(newVolume);
2543
+ if (audioRef.current) {
2544
+ audioRef.current.volume = newVolume;
2545
+ }
2546
+ };
2547
+ const toggleVolumeControl = () => {
2548
+ setShowVolumeControl(!showVolumeControl);
2549
+ setShowSpeedMenu(false);
2550
+ };
2551
+ const toggleSpeedMenu = () => {
2552
+ setShowSpeedMenu(!showSpeedMenu);
2553
+ setShowVolumeControl(false);
2554
+ };
2555
+ const handleSpeedChange = (speed) => {
2556
+ setPlaybackRate(speed);
2557
+ if (audioRef.current) {
2558
+ audioRef.current.playbackRate = speed;
2559
+ }
2560
+ setShowSpeedMenu(false);
2561
+ };
2562
+ const getVolumeIcon = () => {
2563
+ if (volume === 0) {
2564
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.SpeakerSimpleX, { size: 24 });
2565
+ }
2566
+ if (volume < 0.5) {
2567
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.SpeakerLow, { size: 24 });
2568
+ }
2569
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.SpeakerHigh, { size: 24 });
2570
+ };
2571
+ (0, import_react5.useEffect)(() => {
2572
+ const handleClickOutside = (event) => {
2573
+ if (volumeControlRef.current && !volumeControlRef.current.contains(event.target)) {
2574
+ setShowVolumeControl(false);
2575
+ }
2576
+ if (speedMenuRef.current && !speedMenuRef.current.contains(event.target)) {
2577
+ setShowSpeedMenu(false);
2578
+ }
2579
+ };
2580
+ document.addEventListener("mousedown", handleClickOutside);
2581
+ return () => {
2582
+ document.removeEventListener("mousedown", handleClickOutside);
2583
+ };
2584
+ }, []);
2585
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2586
+ CardBase,
2587
+ {
2588
+ ref,
2589
+ layout: "horizontal",
2590
+ padding: "medium",
2591
+ minHeight: "none",
2592
+ className: cn(
2593
+ "flex flex-row w-auto h-14 items-center gap-2",
2594
+ className
2595
+ ),
2596
+ ...props,
2597
+ children: [
2598
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2599
+ "audio",
2600
+ {
2601
+ ref: audioRef,
2602
+ src,
2603
+ loop,
2604
+ preload,
2605
+ onTimeUpdate: handleTimeUpdate,
2606
+ onLoadedMetadata: handleLoadedMetadata,
2607
+ onEnded: handleEnded,
2608
+ "data-testid": "audio-element",
2609
+ "aria-label": title,
2610
+ children: tracks ? tracks.map((track) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2611
+ "track",
2612
+ {
2613
+ kind: track.kind,
2614
+ src: track.src,
2615
+ srcLang: track.srcLang,
2616
+ label: track.label,
2617
+ default: track.default
2618
+ },
2619
+ track.src
2620
+ )) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2621
+ "track",
2622
+ {
2623
+ kind: "captions",
2624
+ src: "data:text/vtt;base64,",
2625
+ srcLang: "pt",
2626
+ label: "Sem legendas dispon\xEDveis"
2627
+ }
2628
+ )
2629
+ }
2630
+ ),
2631
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2632
+ "button",
2633
+ {
2634
+ type: "button",
2635
+ onClick: handlePlayPause,
2636
+ disabled: !src,
2637
+ className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
2638
+ "aria-label": isPlaying ? "Pausar" : "Reproduzir",
2639
+ children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex gap-0.5", children: [
2640
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" }),
2641
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" })
2642
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.Play, { size: 24 })
2643
+ }
2644
+ ),
2645
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(currentTime) }),
2646
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2647
+ "button",
2648
+ {
2649
+ type: "button",
2650
+ className: "w-full h-2 bg-border-100 rounded-full cursor-pointer",
2651
+ onClick: handleProgressClick,
2652
+ onKeyDown: (e) => {
2653
+ if (e.key === "Enter" || e.key === " ") {
2654
+ e.preventDefault();
2655
+ handleProgressClick(
2656
+ e
2657
+ );
2658
+ }
2659
+ },
2660
+ "aria-label": "Barra de progresso do \xE1udio",
2661
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2662
+ "div",
2663
+ {
2664
+ className: "h-full bg-primary-600 rounded-full transition-all duration-100",
2665
+ style: {
2666
+ width: duration > 0 ? `${currentTime / duration * 100}%` : "0%"
2667
+ }
2668
+ }
2669
+ )
2670
+ }
2671
+ ) }),
2672
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(duration) }),
2673
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative h-6", ref: volumeControlRef, children: [
2674
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2675
+ "button",
2676
+ {
2677
+ type: "button",
2678
+ onClick: toggleVolumeControl,
2679
+ className: "cursor-pointer text-text-950 hover:text-primary-600",
2680
+ "aria-label": "Controle de volume",
2681
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
2682
+ }
2683
+ ),
2684
+ showVolumeControl && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2685
+ "button",
2686
+ {
2687
+ type: "button",
2688
+ className: "absolute bottom-full right-0 mb-2 p-2 bg-background border border-border-100 rounded-lg shadow-lg focus:outline-none focus:ring-2 focus:ring-primary-500",
2689
+ onKeyDown: (e) => {
2690
+ if (e.key === "Escape") {
2691
+ setShowVolumeControl(false);
2692
+ }
2693
+ },
2694
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2695
+ "input",
2696
+ {
2697
+ type: "range",
2698
+ min: "0",
2699
+ max: "1",
2700
+ step: "0.1",
2701
+ value: volume,
2702
+ onChange: handleVolumeChange,
2703
+ onKeyDown: (e) => {
2704
+ if (e.key === "ArrowUp" || e.key === "ArrowRight") {
2705
+ e.preventDefault();
2706
+ const newVolume = Math.min(
2707
+ 1,
2708
+ Math.round((volume + 0.1) * 10) / 10
2709
+ );
2710
+ setVolume(newVolume);
2711
+ if (audioRef.current) audioRef.current.volume = newVolume;
2712
+ } else if (e.key === "ArrowDown" || e.key === "ArrowLeft") {
2713
+ e.preventDefault();
2714
+ const newVolume = Math.max(
2715
+ 0,
2716
+ Math.round((volume - 0.1) * 10) / 10
2717
+ );
2718
+ setVolume(newVolume);
2719
+ if (audioRef.current) audioRef.current.volume = newVolume;
2720
+ }
2721
+ },
2722
+ className: "w-20 h-2 bg-border-100 rounded-lg appearance-none cursor-pointer",
2723
+ style: {
2724
+ background: `linear-gradient(to right, #3b82f6 0%, #3b82f6 ${volume * 100}%, #e5e7eb ${volume * 100}%, #e5e7eb 100%)`
2725
+ },
2726
+ "aria-label": "Volume",
2727
+ "aria-valuenow": Math.round(volume * 100),
2728
+ "aria-valuemin": 0,
2729
+ "aria-valuemax": 100
2730
+ }
2731
+ )
2732
+ }
2733
+ )
2734
+ ] }),
2735
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative h-6", ref: speedMenuRef, children: [
2736
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2737
+ "button",
2738
+ {
2739
+ type: "button",
2740
+ onClick: toggleSpeedMenu,
2741
+ className: "cursor-pointer text-text-950 hover:text-primary-600",
2742
+ "aria-label": "Op\xE7\xF5es de velocidade",
2743
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.DotsThreeVertical, { size: 24 })
2744
+ }
2745
+ ),
2746
+ showSpeedMenu && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "absolute bottom-full right-0 mb-2 p-2 bg-background border border-border-100 rounded-lg shadow-lg min-w-24 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col gap-1", children: [
2747
+ { speed: 1, label: "1x" },
2748
+ { speed: 1.5, label: "1.5x" },
2749
+ { speed: 2, label: "2x" }
2750
+ ].map(({ speed, label }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2751
+ "button",
2752
+ {
2753
+ type: "button",
2754
+ onClick: () => handleSpeedChange(speed),
2755
+ className: cn(
2756
+ "px-3 py-1 text-sm text-left rounded hover:bg-border-50 transition-colors",
2757
+ playbackRate === speed ? "bg-primary-950 text-secondary-100 font-medium" : "text-text-950"
2758
+ ),
2759
+ children: label
2760
+ },
2761
+ speed
2762
+ )) }) })
2763
+ ] })
2764
+ ]
2765
+ }
2766
+ );
2767
+ }
2768
+ );
2769
+ var SIMULADO_BACKGROUND_CLASSES = {
2770
+ enem: "bg-exam-1",
2771
+ prova: "bg-exam-2",
2772
+ simuladao: "bg-exam-3",
2773
+ vestibular: "bg-exam-4"
2774
+ };
2775
+ var CardSimulado = (0, import_react5.forwardRef)(
2776
+ ({ title, duration, info, backgroundColor, className, ...props }, ref) => {
2777
+ const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
2778
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2779
+ CardBase,
2780
+ {
2781
+ ref,
2782
+ layout: "horizontal",
2783
+ padding: "medium",
2784
+ minHeight: "none",
2785
+ cursor: "pointer",
2786
+ className: cn(
2787
+ `${backgroundClass} hover:shadow-soft-shadow-2 transition-shadow duration-200`,
2788
+ className
2789
+ ),
2790
+ ...props,
2791
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex justify-between items-center w-full gap-4", children: [
2792
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
2793
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
2794
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-4 text-text-700", children: [
2795
+ duration && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-1", children: [
2796
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.Clock, { size: 16, className: "flex-shrink-0" }),
2797
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { size: "sm", children: duration })
2798
+ ] }),
2799
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { size: "sm", className: "truncate", children: info })
2800
+ ] })
2801
+ ] }),
2802
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2803
+ import_phosphor_react4.CaretRight,
2804
+ {
2805
+ size: 24,
2806
+ className: "text-text-800 flex-shrink-0",
2807
+ "data-testid": "caret-icon"
2808
+ }
2809
+ )
2810
+ ] })
2811
+ }
2812
+ );
2813
+ }
2814
+ );
2815
+ var CardTest = (0, import_react5.forwardRef)(
2816
+ ({
2817
+ title,
2818
+ duration,
2819
+ questionsCount,
2820
+ additionalInfo,
2821
+ selected = false,
2822
+ onSelect,
2823
+ className = "",
2824
+ ...props
2825
+ }, ref) => {
2826
+ const handleClick = () => {
2827
+ if (onSelect) {
2828
+ onSelect(!selected);
2829
+ }
2830
+ };
2831
+ const handleKeyDown = (event) => {
2832
+ if ((event.key === "Enter" || event.key === " ") && onSelect) {
2833
+ event.preventDefault();
2834
+ onSelect(!selected);
2835
+ }
2836
+ };
2837
+ const isSelectable = !!onSelect;
2838
+ const getQuestionsText = (count) => {
2839
+ const singular = count === 1 ? "quest\xE3o" : "quest\xF5es";
2840
+ return `${count} ${singular}`;
2841
+ };
2842
+ const displayInfo = questionsCount ? getQuestionsText(questionsCount) : additionalInfo || "";
2843
+ const baseClasses = "flex flex-row items-center p-4 gap-2 w-full max-w-full bg-background shadow-soft-shadow-1 rounded-xl isolate border-0 text-left";
2844
+ const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
2845
+ const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
2846
+ if (isSelectable) {
2847
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2848
+ "button",
2849
+ {
2850
+ ref,
2851
+ type: "button",
2852
+ className: cn(
2853
+ `${baseClasses} ${interactiveClasses} ${selectedClasses} ${className}`.trim()
2854
+ ),
2855
+ onClick: handleClick,
2856
+ onKeyDown: handleKeyDown,
2857
+ "aria-pressed": selected,
2858
+ ...props,
2859
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
2860
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2861
+ Text_default,
2862
+ {
2863
+ size: "md",
2864
+ weight: "bold",
2865
+ className: "text-text-950 tracking-[0.2px] leading-[19px] truncate",
2866
+ children: title
2867
+ }
2868
+ ),
2869
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
2870
+ duration && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
2871
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.Clock, { size: 16, className: "text-text-700" }),
2872
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2873
+ Text_default,
2874
+ {
2875
+ size: "sm",
2876
+ className: "text-text-700 leading-[21px] whitespace-nowrap",
2877
+ children: duration
2878
+ }
2879
+ )
2880
+ ] }),
2881
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2882
+ Text_default,
2883
+ {
2884
+ size: "sm",
2885
+ className: "text-text-700 leading-[21px] flex-grow truncate",
2886
+ children: displayInfo
2887
+ }
2888
+ )
2889
+ ] })
2890
+ ] })
2891
+ }
2892
+ );
2893
+ }
2894
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2895
+ "div",
2896
+ {
2897
+ ref,
2898
+ className: cn(`${baseClasses} ${className}`.trim()),
2899
+ ...props,
2900
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
2901
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2902
+ Text_default,
2903
+ {
2904
+ size: "md",
2905
+ weight: "bold",
2906
+ className: "text-text-950 tracking-[0.2px] leading-[19px] truncate",
2907
+ children: title
2908
+ }
2909
+ ),
2910
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
2911
+ duration && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
2912
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.Clock, { size: 16, className: "text-text-700" }),
2913
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2914
+ Text_default,
2915
+ {
2916
+ size: "sm",
2917
+ className: "text-text-700 leading-[21px] whitespace-nowrap",
2918
+ children: duration
2919
+ }
2920
+ )
2921
+ ] }),
2922
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2923
+ Text_default,
2924
+ {
2925
+ size: "sm",
2926
+ className: "text-text-700 leading-[21px] flex-grow truncate min-w-0",
2927
+ children: displayInfo
2928
+ }
2929
+ )
2930
+ ] })
2931
+ ] })
2932
+ }
2933
+ );
2934
+ }
2935
+ );
2936
+ var SIMULATION_TYPE_STYLES = {
2937
+ enem: {
2938
+ background: "bg-exam-1",
2939
+ badge: "exam1",
2940
+ text: "Enem"
2941
+ },
2942
+ prova: {
2943
+ background: "bg-exam-2",
2944
+ badge: "exam2",
2945
+ text: "Prova"
2946
+ },
2947
+ simulado: {
2948
+ background: "bg-exam-3",
2949
+ badge: "exam3",
2950
+ text: "Simulad\xE3o"
2951
+ },
2952
+ vestibular: {
2953
+ background: "bg-exam-4",
2954
+ badge: "exam4",
2955
+ text: "Vestibular"
2956
+ }
2957
+ };
2958
+ var CardSimulationHistory = (0, import_react5.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
2959
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2960
+ "div",
2961
+ {
2962
+ ref,
2963
+ className: cn("w-full max-w-[992px] h-auto", className),
2964
+ ...props,
2965
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-0", children: [
2966
+ data.map((section, sectionIndex) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2967
+ "div",
2968
+ {
2969
+ className: cn(
2970
+ "flex flex-row justify-center items-start px-4 py-6 gap-2 w-full bg-background",
2971
+ sectionIndex === 0 ? "rounded-t-3xl" : ""
2972
+ ),
2973
+ children: [
2974
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2975
+ Text_default,
2976
+ {
2977
+ size: "xs",
2978
+ weight: "bold",
2979
+ className: "text-text-800 w-11 flex-shrink-0",
2980
+ children: section.date
2981
+ }
2982
+ ),
2983
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
2984
+ const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
2985
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2986
+ CardBase,
2987
+ {
2988
+ layout: "horizontal",
2989
+ padding: "medium",
2990
+ minHeight: "none",
2991
+ cursor: "pointer",
2992
+ className: cn(
2993
+ `${typeStyles.background} rounded-xl hover:shadow-soft-shadow-2
2994
+ transition-shadow duration-200 h-auto min-h-[61px]`
2995
+ ),
2996
+ onClick: () => onSimulationClick?.(simulation),
2997
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
2998
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
2999
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3000
+ Text_default,
3001
+ {
3002
+ size: "lg",
3003
+ weight: "bold",
3004
+ className: "text-text-950 truncate",
3005
+ children: simulation.title
3006
+ }
3007
+ ),
3008
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
3009
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3010
+ Badge_default,
3011
+ {
3012
+ variant: "examsOutlined",
3013
+ action: typeStyles.badge,
3014
+ size: "medium",
3015
+ children: typeStyles.text
3016
+ }
3017
+ ),
3018
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
3019
+ ] })
3020
+ ] }),
3021
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3022
+ import_phosphor_react4.CaretRight,
3023
+ {
3024
+ size: 24,
3025
+ className: "text-text-800 flex-shrink-0",
3026
+ "data-testid": "caret-icon"
3027
+ }
3028
+ )
3029
+ ] })
3030
+ },
3031
+ simulation.id
3032
+ );
3033
+ }) })
3034
+ ]
3035
+ }
3036
+ ) }, section.date)),
3037
+ data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-full h-6 bg-background rounded-b-3xl" })
3038
+ ] })
3039
+ }
3040
+ );
3041
+ });
3042
+
3043
+ // src/components/Accordation/Accordation.tsx
3044
+ var import_phosphor_react5 = require("phosphor-react");
3045
+ var import_jsx_runtime13 = require("react/jsx-runtime");
3046
+ var CardAccordation = (0, import_react6.forwardRef)(
3047
+ ({
3048
+ trigger,
3049
+ children,
3050
+ className,
3051
+ defaultExpanded = false,
3052
+ expanded: controlledExpanded,
3053
+ onToggleExpanded,
3054
+ value,
3055
+ disabled = false,
3056
+ ...props
3057
+ }, ref) => {
3058
+ const [internalExpanded, setInternalExpanded] = (0, import_react6.useState)(defaultExpanded);
3059
+ const generatedId = (0, import_react6.useId)();
3060
+ const contentId = value ? `accordion-content-${value}` : generatedId;
3061
+ const headerId = value ? `accordion-header-${value}` : `${generatedId}-header`;
3062
+ const isControlled = controlledExpanded !== void 0;
3063
+ const isExpanded = isControlled ? controlledExpanded : internalExpanded;
3064
+ (0, import_react6.useEffect)(() => {
3065
+ if (isControlled) {
3066
+ setInternalExpanded(controlledExpanded);
3067
+ }
3068
+ }, [isControlled, controlledExpanded]);
3069
+ const handleToggle = () => {
3070
+ if (disabled) return;
3071
+ const newExpanded = !isExpanded;
3072
+ if (!isControlled) {
3073
+ setInternalExpanded(newExpanded);
3074
+ }
3075
+ onToggleExpanded?.(newExpanded);
3076
+ };
3077
+ const handleKeyDown = (event) => {
3078
+ if (disabled) return;
3079
+ if (event.key === "Enter" || event.key === " ") {
3080
+ event.preventDefault();
3081
+ handleToggle();
3082
+ }
3083
+ };
3084
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3085
+ CardBase,
3086
+ {
3087
+ ref,
3088
+ layout: "vertical",
3089
+ padding: "none",
3090
+ minHeight: "none",
3091
+ className: cn("overflow-hidden", className),
3092
+ ...props,
3093
+ children: [
3094
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3095
+ "button",
3096
+ {
3097
+ id: headerId,
3098
+ type: "button",
3099
+ onClick: handleToggle,
3100
+ onKeyDown: handleKeyDown,
3101
+ disabled,
3102
+ className: cn(
3103
+ "w-full cursor-pointer not-aria-expanded:rounded-xl aria-expanded:rounded-t-xl flex items-center justify-between gap-3 text-left transition-colors duration-200 focus:outline-none focus:border-2 focus:border-primary-950 focus:ring-inset px-2",
3104
+ disabled && "cursor-not-allowed text-text-400"
3105
+ ),
3106
+ "aria-expanded": isExpanded,
3107
+ "aria-controls": contentId,
3108
+ "aria-disabled": disabled,
3109
+ "data-value": value,
3110
+ children: [
3111
+ trigger,
3112
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3113
+ import_phosphor_react5.CaretRight,
3114
+ {
3115
+ size: 20,
3116
+ className: cn(
3117
+ "transition-transform duration-200 flex-shrink-0",
3118
+ disabled ? "text-gray-400" : "text-text-700",
3119
+ isExpanded ? "rotate-90" : "rotate-0"
3120
+ ),
3121
+ "data-testid": "accordion-caret"
3122
+ }
3123
+ )
3124
+ ]
3125
+ }
3126
+ ),
3127
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3128
+ "section",
3129
+ {
3130
+ id: contentId,
3131
+ "aria-labelledby": headerId,
3132
+ "aria-hidden": !isExpanded,
3133
+ className: cn(
3134
+ "transition-all duration-300 ease-in-out overflow-hidden",
3135
+ isExpanded ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
3136
+ ),
3137
+ "data-testid": "accordion-content",
3138
+ "data-value": value,
3139
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "p-4 pt-0", children })
3140
+ }
3141
+ )
3142
+ ]
3143
+ }
3144
+ );
3145
+ }
3146
+ );
3147
+ CardAccordation.displayName = "CardAccordation";
3148
+
3149
+ // src/components/Accordation/AccordionGroup.tsx
3150
+ var import_react7 = require("react");
3151
+ var import_zustand2 = require("zustand");
3152
+ var import_jsx_runtime14 = require("react/jsx-runtime");
3153
+ function createAccordionGroupStore(type, initialValue, collapsible) {
3154
+ return (0, import_zustand2.create)((set, get) => ({
3155
+ type,
3156
+ value: initialValue,
3157
+ collapsible,
3158
+ setValue: (value) => set({ value }),
3159
+ isItemExpanded: (itemValue) => {
3160
+ const state = get();
3161
+ if (state.type === "single") {
3162
+ return state.value === itemValue;
3163
+ } else {
3164
+ return Array.isArray(state.value) && state.value.includes(itemValue);
3165
+ }
3166
+ }
3167
+ }));
3168
+ }
3169
+ var injectStore2 = (children, store, indexRef, onItemToggle) => {
3170
+ return import_react7.Children.map(children, (child) => {
3171
+ if (!(0, import_react7.isValidElement)(child)) {
3172
+ return child;
3173
+ }
3174
+ const typedChild = child;
3175
+ const displayName = typedChild.type?.displayName;
3176
+ let newProps = {};
3177
+ if (displayName === "CardAccordation") {
3178
+ const itemValue = typedChild.props.value || `accordion-item-${indexRef.current++}`;
3179
+ const storeState = store.getState();
3180
+ const expanded = storeState.isItemExpanded(itemValue);
3181
+ newProps.value = itemValue;
3182
+ newProps.expanded = expanded;
3183
+ newProps.onToggleExpanded = (isExpanded) => {
3184
+ onItemToggle(itemValue, isExpanded);
3185
+ typedChild.props.onToggleExpanded?.(isExpanded);
3186
+ };
3187
+ }
3188
+ if (typedChild.props.children) {
3189
+ const processedChildren = injectStore2(
3190
+ typedChild.props.children,
3191
+ store,
3192
+ indexRef,
3193
+ onItemToggle
3194
+ );
3195
+ if (displayName === "CardAccordation") {
3196
+ newProps.children = processedChildren;
3197
+ } else if (processedChildren !== typedChild.props.children) {
3198
+ return (0, import_react7.cloneElement)(typedChild, { children: processedChildren });
3199
+ }
3200
+ }
3201
+ if (Object.keys(newProps).length > 0) {
3202
+ return (0, import_react7.cloneElement)(typedChild, newProps);
3203
+ }
3204
+ return child;
3205
+ });
3206
+ };
3207
+ var AccordionGroup = (0, import_react7.forwardRef)(
3208
+ ({
3209
+ type = "single",
3210
+ defaultValue,
3211
+ value: controlledValue,
3212
+ onValueChange,
3213
+ collapsible = true,
3214
+ children,
3215
+ className,
3216
+ ...props
3217
+ }, ref) => {
3218
+ const [internalValue, setInternalValue] = (0, import_react7.useState)(
3219
+ defaultValue || (type === "single" ? "" : [])
3220
+ );
3221
+ const isControlled = controlledValue !== void 0;
3222
+ const currentValue = isControlled ? controlledValue : internalValue;
3223
+ const storeRef = (0, import_react7.useRef)(null);
3224
+ if (storeRef.current) {
3225
+ storeRef.current.setState((prev) => {
3226
+ const nextState = {};
3227
+ if (prev.type !== type) {
3228
+ nextState.type = type;
3229
+ }
3230
+ if (prev.collapsible !== collapsible) {
3231
+ nextState.collapsible = collapsible;
3232
+ }
3233
+ return nextState;
3234
+ });
3235
+ } else {
3236
+ storeRef.current = createAccordionGroupStore(
3237
+ type,
3238
+ currentValue,
3239
+ collapsible
3240
+ );
3241
+ }
3242
+ const store = storeRef.current;
3243
+ (0, import_react7.useEffect)(() => {
3244
+ store.setState({ value: currentValue });
3245
+ }, [currentValue, store]);
3246
+ (0, import_react7.useEffect)(() => {
3247
+ if (!isControlled) {
3248
+ setInternalValue((prev) => {
3249
+ if (type === "single") {
3250
+ if (Array.isArray(prev)) {
3251
+ return prev[0] ?? "";
3252
+ }
3253
+ return typeof prev === "string" ? prev : "";
3254
+ }
3255
+ if (Array.isArray(prev)) {
3256
+ return prev;
3257
+ }
3258
+ return prev ? [prev] : [];
3259
+ });
3260
+ }
3261
+ }, [isControlled, type]);
3262
+ const handleItemToggle = (itemValue, isExpanded) => {
3263
+ const storeState = store.getState();
3264
+ let newValue;
3265
+ if (type === "single") {
3266
+ if (isExpanded) {
3267
+ newValue = itemValue;
3268
+ } else {
3269
+ newValue = collapsible ? "" : storeState.value;
3270
+ }
3271
+ } else {
3272
+ const currentArray = Array.isArray(storeState.value) ? storeState.value : [];
3273
+ if (isExpanded) {
3274
+ newValue = [...currentArray, itemValue];
3275
+ } else {
3276
+ newValue = currentArray.filter((v) => v !== itemValue);
3277
+ }
3278
+ }
3279
+ if (!isControlled) {
3280
+ setInternalValue(newValue);
3281
+ }
3282
+ store.setState({ value: newValue });
3283
+ onValueChange?.(newValue);
3284
+ };
3285
+ const indexRef = { current: 0 };
3286
+ const enhancedChildren = injectStore2(
3287
+ children,
3288
+ store,
3289
+ indexRef,
3290
+ handleItemToggle
3291
+ );
3292
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { ref, className, ...props, children: enhancedChildren });
3293
+ }
3294
+ );
3295
+ AccordionGroup.displayName = "AccordionGroup";
3296
+
3297
+ // src/components/FileAttachment/FileAttachment.tsx
3298
+ var import_react8 = require("react");
3299
+ var import_phosphor_react6 = require("phosphor-react");
3300
+ var import_jsx_runtime15 = require("react/jsx-runtime");
3301
+ var generateFileId = () => {
3302
+ return crypto.randomUUID();
3303
+ };
3304
+
3305
+ // src/types/studentActivityCorrection.ts
3306
+ var QUESTION_STATUS = {
3307
+ CORRETA: "CORRETA",
3308
+ INCORRETA: "INCORRETA",
3309
+ EM_BRANCO: "EM_BRANCO"
3310
+ };
3311
+ var getQuestionStatusBadgeConfig = (status) => {
3312
+ const configs = {
3313
+ [QUESTION_STATUS.CORRETA]: {
3314
+ label: "Correta",
3315
+ bgColor: "bg-success-background",
3316
+ textColor: "text-success-800"
3317
+ },
3318
+ [QUESTION_STATUS.INCORRETA]: {
3319
+ label: "Incorreta",
3320
+ bgColor: "bg-error-background",
3321
+ textColor: "text-error-800"
3322
+ },
3323
+ [QUESTION_STATUS.EM_BRANCO]: {
3324
+ label: "Em branco",
3325
+ bgColor: "bg-gray-100",
3326
+ textColor: "text-gray-600"
3327
+ }
3328
+ };
3329
+ return configs[status];
3330
+ };
3331
+
3332
+ // src/components/CorrectActivityModal/CorrectActivityModal.tsx
3333
+ var import_jsx_runtime16 = require("react/jsx-runtime");
3334
+ var variantConfig = {
3335
+ score: {
3336
+ bg: "bg-warning-background",
3337
+ text: "text-warning-600",
3338
+ iconBg: "bg-warning-300",
3339
+ iconColor: "text-white",
3340
+ IconComponent: import_phosphor_react7.Star
3341
+ },
3342
+ correct: {
3343
+ bg: "bg-success-200",
3344
+ text: "text-success-700",
3345
+ iconBg: "bg-indicator-positive",
3346
+ iconColor: "text-text-950",
3347
+ IconComponent: import_phosphor_react7.Medal
3348
+ },
3349
+ incorrect: {
3350
+ bg: "bg-error-100",
3351
+ text: "text-error-700",
3352
+ iconBg: "bg-indicator-negative",
3353
+ iconColor: "text-white",
3354
+ IconComponent: import_phosphor_react7.WarningCircle
3355
+ }
3356
+ };
3357
+ var StatCard = ({ label, value, variant }) => {
3358
+ const config = variantConfig[variant];
3359
+ const IconComponent = config.IconComponent;
3360
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3361
+ "div",
3362
+ {
3363
+ className: cn(
3364
+ "border border-border-50 rounded-xl py-4 px-3 flex flex-col items-center justify-center gap-1",
3365
+ config.bg
3366
+ ),
3367
+ children: [
3368
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3369
+ "div",
3370
+ {
3371
+ className: cn(
3372
+ "w-[30px] h-[30px] rounded-2xl flex items-center justify-center",
3373
+ config.iconBg
3374
+ ),
3375
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3376
+ IconComponent,
3377
+ {
3378
+ size: 16,
3379
+ className: config.iconColor,
3380
+ weight: "regular"
3381
+ }
3382
+ )
3383
+ }
3384
+ ),
3385
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3386
+ Text_default,
3387
+ {
3388
+ className: cn("text-2xs font-bold uppercase text-center", config.text),
3389
+ children: label
3390
+ }
3391
+ ),
3392
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: cn("text-xl font-bold", config.text), children: value })
3393
+ ]
3394
+ }
3395
+ );
3396
+ };
3397
+ var CorrectActivityModal = ({
3398
+ isOpen,
3399
+ onClose,
3400
+ data,
3401
+ isViewOnly = false,
3402
+ onObservationSubmit
3403
+ }) => {
3404
+ const [observation, setObservation] = (0, import_react9.useState)("");
3405
+ const [isObservationExpanded, setIsObservationExpanded] = (0, import_react9.useState)(false);
3406
+ const [isObservationSaved, setIsObservationSaved] = (0, import_react9.useState)(false);
3407
+ const [savedObservation, setSavedObservation] = (0, import_react9.useState)("");
3408
+ const [attachedFiles, setAttachedFiles] = (0, import_react9.useState)([]);
3409
+ const [savedFiles, setSavedFiles] = (0, import_react9.useState)([]);
3410
+ const fileInputRef = (0, import_react9.useRef)(null);
3411
+ (0, import_react9.useEffect)(() => {
3412
+ if (isOpen) {
3413
+ setObservation("");
3414
+ setIsObservationExpanded(false);
3415
+ setIsObservationSaved(false);
3416
+ setSavedObservation("");
3417
+ setAttachedFiles([]);
3418
+ setSavedFiles([]);
3419
+ }
3420
+ }, [isOpen, data?.studentId]);
3421
+ const handleOpenObservation = () => {
3422
+ setIsObservationExpanded(true);
3423
+ };
3424
+ const handleFilesAdd = (files) => {
3425
+ const newFile = files[0];
3426
+ if (newFile) {
3427
+ setAttachedFiles([{ file: newFile, id: generateFileId() }]);
3428
+ }
3429
+ };
3430
+ const handleFileRemove = (id) => {
3431
+ setAttachedFiles((prev) => prev.filter((f) => f.id !== id));
3432
+ };
3433
+ const handleSaveObservation = () => {
3434
+ if (observation.trim() || attachedFiles.length > 0) {
3435
+ setSavedObservation(observation);
3436
+ setSavedFiles([...attachedFiles]);
3437
+ setIsObservationSaved(true);
3438
+ setIsObservationExpanded(false);
3439
+ onObservationSubmit?.(
3440
+ observation,
3441
+ attachedFiles.map((f) => f.file)
3442
+ );
3443
+ }
3444
+ };
3445
+ const handleEditObservation = () => {
3446
+ setObservation(savedObservation);
3447
+ setAttachedFiles([...savedFiles]);
3448
+ setIsObservationSaved(false);
3449
+ setIsObservationExpanded(true);
3450
+ };
3451
+ if (!data) return null;
3452
+ const title = isViewOnly ? "Detalhes da atividade" : "Corrigir atividade";
3453
+ const formattedScore = data.score === null ? "-" : data.score.toFixed(1);
3454
+ const renderObservationSection = () => {
3455
+ if (isViewOnly) return null;
3456
+ if (isObservationSaved) {
3457
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "bg-background border border-border-100 rounded-lg p-4 space-y-2", children: [
3458
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3", children: [
3459
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-sm font-bold text-text-950", children: "Observa\xE7\xE3o" }),
3460
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-3", children: [
3461
+ savedFiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-2 px-5 h-10 bg-secondary-500 rounded-full min-w-0 max-w-[150px]", children: [
3462
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3463
+ import_phosphor_react7.Paperclip,
3464
+ {
3465
+ size: 18,
3466
+ className: "text-text-800 flex-shrink-0"
3467
+ }
3468
+ ),
3469
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-base font-medium text-text-800 truncate", children: savedFiles[0].file.name })
3470
+ ] }),
3471
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3472
+ Button_default,
3473
+ {
3474
+ type: "button",
3475
+ variant: "outline",
3476
+ size: "small",
3477
+ onClick: handleEditObservation,
3478
+ className: "flex items-center gap-2 flex-shrink-0",
3479
+ children: [
3480
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react7.PencilSimple, { size: 16 }),
3481
+ "Editar"
3482
+ ]
3483
+ }
3484
+ )
3485
+ ] })
3486
+ ] }),
3487
+ savedObservation && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "p-3 bg-background-50 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-sm text-text-700", children: savedObservation }) })
3488
+ ] });
3489
+ }
3490
+ if (isObservationExpanded) {
3491
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "bg-background border border-border-100 rounded-lg p-4 space-y-3", children: [
3492
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-sm font-bold text-text-950", children: "Observa\xE7\xE3o" }),
3493
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3494
+ "textarea",
3495
+ {
3496
+ value: observation,
3497
+ onChange: (e) => setObservation(e.target.value),
3498
+ placeholder: "Escreva uma observa\xE7\xE3o para o estudante",
3499
+ className: "w-full min-h-[80px] p-3 border border-border-100 rounded-lg text-sm text-text-700 placeholder:text-text-400 resize-none focus:outline-none focus:ring-2 focus:ring-primary-500"
3500
+ }
3501
+ ),
3502
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3503
+ "input",
3504
+ {
3505
+ type: "file",
3506
+ ref: fileInputRef,
3507
+ className: "hidden",
3508
+ onChange: (e) => {
3509
+ const selectedFiles = e.target.files;
3510
+ if (selectedFiles && selectedFiles.length > 0) {
3511
+ handleFilesAdd(Array.from(selectedFiles));
3512
+ }
3513
+ if (fileInputRef.current) {
3514
+ fileInputRef.current.value = "";
3515
+ }
3516
+ },
3517
+ "aria-label": "Selecionar arquivo"
3518
+ }
3519
+ ),
3520
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col-reverse sm:flex-row gap-3 sm:justify-between", children: [
3521
+ attachedFiles.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-center gap-2 px-5 h-10 bg-secondary-500 rounded-full min-w-0 max-w-[150px]", children: [
3522
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react7.Paperclip, { size: 18, className: "text-text-800 flex-shrink-0" }),
3523
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-base font-medium text-text-800 truncate", children: attachedFiles[0].file.name }),
3524
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3525
+ "button",
3526
+ {
3527
+ type: "button",
3528
+ onClick: () => handleFileRemove(attachedFiles[0].id),
3529
+ className: "text-text-700 hover:text-text-800 flex-shrink-0",
3530
+ "aria-label": `Remover ${attachedFiles[0].file.name}`,
3531
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react7.X, { size: 18 })
3532
+ }
3533
+ )
3534
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3535
+ Button_default,
3536
+ {
3537
+ type: "button",
3538
+ variant: "outline",
3539
+ size: "small",
3540
+ onClick: () => fileInputRef.current?.click(),
3541
+ className: "flex items-center gap-2",
3542
+ children: [
3543
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react7.Paperclip, { size: 18 }),
3544
+ "Anexar"
3545
+ ]
3546
+ }
3547
+ ),
3548
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3549
+ Button_default,
3550
+ {
3551
+ type: "button",
3552
+ size: "small",
3553
+ onClick: handleSaveObservation,
3554
+ disabled: !observation.trim() && attachedFiles.length === 0,
3555
+ children: "Salvar"
3556
+ }
3557
+ )
3558
+ ] }),
3559
+ data.observation && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "p-3 bg-background-50 rounded-lg", children: [
3560
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-xs text-text-500", children: "Observa\xE7\xE3o anterior:" }),
3561
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-sm text-text-700", children: data.observation })
3562
+ ] })
3563
+ ] });
3564
+ }
3565
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "bg-background border border-border-100 rounded-lg p-4 flex flex-col sm:flex-row gap-3 sm:items-center sm:justify-between", children: [
3566
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-sm font-bold text-text-950", children: "Observa\xE7\xE3o" }),
3567
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button_default, { type: "button", size: "small", onClick: handleOpenObservation, children: "Incluir" })
3568
+ ] });
3569
+ };
3570
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3571
+ Modal_default,
3572
+ {
3573
+ isOpen,
3574
+ onClose,
3575
+ title,
3576
+ size: "lg",
3577
+ contentClassName: "max-h-[80vh] overflow-y-auto",
3578
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-6", children: [
3579
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-3", children: [
3580
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w-10 h-10 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-lg font-semibold text-primary-700", children: data.studentName.charAt(0).toUpperCase() }) }),
3581
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-lg font-medium text-text-950", children: data.studentName })
3582
+ ] }),
3583
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "grid grid-cols-3 gap-4", children: [
3584
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(StatCard, { label: "Nota", value: formattedScore, variant: "score" }),
3585
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3586
+ StatCard,
3587
+ {
3588
+ label: "N\xB0 de quest\xF5es corretas",
3589
+ value: data.correctCount,
3590
+ variant: "correct"
3591
+ }
3592
+ ),
3593
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3594
+ StatCard,
3595
+ {
3596
+ label: "N\xB0 de quest\xF5es incorretas",
3597
+ value: data.incorrectCount,
3598
+ variant: "incorrect"
3599
+ }
3600
+ )
3601
+ ] }),
3602
+ renderObservationSection(),
3603
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-2", children: [
3604
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-sm font-bold text-text-950", children: "Respostas" }),
3605
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AccordionGroup, { type: "multiple", className: "space-y-2", children: data.questions.map((question) => {
3606
+ const badgeConfig = getQuestionStatusBadgeConfig(question.status);
3607
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3608
+ CardAccordation,
3609
+ {
3610
+ value: `question-${question.questionNumber}`,
3611
+ className: "bg-background rounded-xl",
3612
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-between w-full py-3 pr-2", children: [
3613
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text_default, { className: "text-base font-bold text-text-950", children: [
3614
+ "Quest\xE3o ",
3615
+ question.questionNumber
3616
+ ] }),
3617
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3618
+ Badge_default,
3619
+ {
3620
+ className: cn(
3621
+ "text-xs px-2 py-1",
3622
+ badgeConfig.bgColor,
3623
+ badgeConfig.textColor
3624
+ ),
3625
+ children: badgeConfig.label
3626
+ }
3627
+ )
3628
+ ] }),
3629
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-4 pt-2", children: [
3630
+ question.questionText && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "text-sm text-text-700", children: question.questionText }),
3631
+ question.alternatives && question.alternatives.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3632
+ CardAccordation,
3633
+ {
3634
+ value: `alternatives-${question.questionNumber}`,
3635
+ className: "border border-border-100 rounded-lg",
3636
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "py-3 pr-2 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-sm font-bold text-text-950", children: "Alternativas" }) }),
3637
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3638
+ AlternativesList,
3639
+ {
3640
+ mode: "readonly",
3641
+ selectedValue: question.studentAnswer,
3642
+ alternatives: question.alternatives.map(
3643
+ (alt) => ({
3644
+ value: alt.value,
3645
+ label: alt.label,
3646
+ status: alt.isCorrect ? "correct" : void 0
3647
+ })
3648
+ )
3649
+ }
3650
+ ) })
3651
+ }
3652
+ ),
3653
+ (!question.alternatives || question.alternatives.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
3654
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex gap-2", children: [
3655
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-xs text-text-500", children: "Resposta do aluno:" }),
3656
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-xs text-text-700", children: question.studentAnswer || "N\xE3o respondeu" })
3657
+ ] }),
3658
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex gap-2", children: [
3659
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-xs text-text-500", children: "Resposta correta:" }),
3660
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { className: "text-xs text-success-700", children: question.correctAnswer || "-" })
3661
+ ] })
3662
+ ] })
3663
+ ] })
3664
+ },
3665
+ question.questionNumber
3666
+ );
3667
+ }) })
3668
+ ] })
3669
+ ] })
3670
+ }
3671
+ );
3672
+ };
3673
+ var CorrectActivityModal_default = CorrectActivityModal;
3674
+ //# sourceMappingURL=index.js.map