@garantiabr/ui-kit 0.0.0-stage → 0.5.13

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 (441) hide show
  1. package/AGENTS.md +89 -0
  2. package/README.md +269 -2
  3. package/bin/init.mjs +238 -0
  4. package/dist/assets/produtos/agente-de-auditoria-icone.svg.js +6 -0
  5. package/dist/assets/produtos/agente-de-auditoria-icone.svg.js.map +1 -0
  6. package/dist/assets/produtos/avaliacao-de-bens-icone.svg.js +6 -0
  7. package/dist/assets/produtos/avaliacao-de-bens-icone.svg.js.map +1 -0
  8. package/dist/assets/produtos/central-de-conteudo-icone.svg.js +6 -0
  9. package/dist/assets/produtos/central-de-conteudo-icone.svg.js.map +1 -0
  10. package/dist/assets/produtos/registro-cartorario-icone.svg.js +6 -0
  11. package/dist/assets/produtos/registro-cartorario-icone.svg.js.map +1 -0
  12. package/dist/brand/apple-touch-icon.png +0 -0
  13. package/dist/brand/favicon-32.png +0 -0
  14. package/dist/brand/favicon.svg +11 -0
  15. package/dist/brand/icon-192.png +0 -0
  16. package/dist/brand/icon-512.png +0 -0
  17. package/dist/components/auth/OtpInput.d.ts +8 -0
  18. package/dist/components/auth/OtpInput.js +49 -0
  19. package/dist/components/auth/OtpInput.js.map +1 -0
  20. package/dist/components/chat/ChatConversationsDrawer.d.ts +29 -0
  21. package/dist/components/chat/ChatConversationsDrawer.js +156 -0
  22. package/dist/components/chat/ChatConversationsDrawer.js.map +1 -0
  23. package/dist/components/chat/chatFormatting.d.ts +2 -0
  24. package/dist/components/chat/chatFormatting.js +16 -0
  25. package/dist/components/chat/chatFormatting.js.map +1 -0
  26. package/dist/components/chat/types.d.ts +2 -0
  27. package/dist/components/chat/types.js +2 -0
  28. package/dist/components/chat/types.js.map +1 -0
  29. package/dist/components/chat/useChatWindowFrame.d.ts +23 -0
  30. package/dist/components/chat/useChatWindowFrame.js +42 -0
  31. package/dist/components/chat/useChatWindowFrame.js.map +1 -0
  32. package/dist/components/dashboard/DonutInsightCard.d.ts +11 -0
  33. package/dist/components/dashboard/DonutInsightCard.js +51 -0
  34. package/dist/components/dashboard/DonutInsightCard.js.map +1 -0
  35. package/dist/components/dashboard/FunilJornadaInsightCard.d.ts +22 -0
  36. package/dist/components/dashboard/FunilJornadaInsightCard.js +113 -0
  37. package/dist/components/dashboard/FunilJornadaInsightCard.js.map +1 -0
  38. package/dist/components/dashboard/InsightCard.d.ts +14 -0
  39. package/dist/components/dashboard/InsightCard.js +44 -0
  40. package/dist/components/dashboard/InsightCard.js.map +1 -0
  41. package/dist/components/dashboard/RankingList.d.ts +11 -0
  42. package/dist/components/dashboard/RankingList.js +28 -0
  43. package/dist/components/dashboard/RankingList.js.map +1 -0
  44. package/dist/components/documentos/AnaliseIaDialog.d.ts +114 -0
  45. package/dist/components/documentos/AnaliseIaDialog.js +923 -0
  46. package/dist/components/documentos/AnaliseIaDialog.js.map +1 -0
  47. package/dist/components/documentos/BatchPdfViewerDialog.d.ts +83 -0
  48. package/dist/components/documentos/BatchPdfViewerDialog.js +752 -0
  49. package/dist/components/documentos/BatchPdfViewerDialog.js.map +1 -0
  50. package/dist/components/documentos/DetalhesDocumentoConteudo.d.ts +31 -0
  51. package/dist/components/documentos/DetalhesDocumentoConteudo.js +301 -0
  52. package/dist/components/documentos/DetalhesDocumentoConteudo.js.map +1 -0
  53. package/dist/components/documentos/DocumentoErroIcon.d.ts +5 -0
  54. package/dist/components/documentos/DocumentoErroIcon.js +64 -0
  55. package/dist/components/documentos/DocumentoErroIcon.js.map +1 -0
  56. package/dist/components/documentos/PdfViewerDialog.d.ts +109 -0
  57. package/dist/components/documentos/PdfViewerDialog.js +704 -0
  58. package/dist/components/documentos/PdfViewerDialog.js.map +1 -0
  59. package/dist/components/documentos/TipoNaoConfirmadoBadge.d.ts +13 -0
  60. package/dist/components/documentos/TipoNaoConfirmadoBadge.js +30 -0
  61. package/dist/components/documentos/TipoNaoConfirmadoBadge.js.map +1 -0
  62. package/dist/components/documentos/notify.d.ts +6 -0
  63. package/dist/components/documentos/notify.js +9 -0
  64. package/dist/components/documentos/notify.js.map +1 -0
  65. package/dist/components/documentos/pdfDownload.d.ts +6 -0
  66. package/dist/components/documentos/pdfDownload.js +13 -0
  67. package/dist/components/documentos/pdfDownload.js.map +1 -0
  68. package/dist/components/documentos/pdfPageRenderers.d.ts +30 -0
  69. package/dist/components/documentos/pdfPageRenderers.js +38 -0
  70. package/dist/components/documentos/pdfPageRenderers.js.map +1 -0
  71. package/dist/components/documentos/pdfWorkerSetup.d.ts +1 -0
  72. package/dist/components/documentos/pdfWorkerSetup.js +4 -0
  73. package/dist/components/documentos/pdfWorkerSetup.js.map +1 -0
  74. package/dist/components/documentos/useDialogLayoutMode.d.ts +16 -0
  75. package/dist/components/documentos/useDialogLayoutMode.js +14 -0
  76. package/dist/components/documentos/useDialogLayoutMode.js.map +1 -0
  77. package/dist/components/documentos/useDockableDialogWindow.d.ts +66 -0
  78. package/dist/components/documentos/useDockableDialogWindow.js +105 -0
  79. package/dist/components/documentos/useDockableDialogWindow.js.map +1 -0
  80. package/dist/components/gia/GiaAudioPlayer.d.ts +9 -0
  81. package/dist/components/gia/GiaAudioPlayer.js +70 -0
  82. package/dist/components/gia/GiaAudioPlayer.js.map +1 -0
  83. package/dist/components/gia/GiaChatWindow.d.ts +44 -0
  84. package/dist/components/gia/GiaChatWindow.js +912 -0
  85. package/dist/components/gia/GiaChatWindow.js.map +1 -0
  86. package/dist/components/gia/GiaEmptyStateIllustration.d.ts +5 -0
  87. package/dist/components/gia/GiaEmptyStateIllustration.js +84 -0
  88. package/dist/components/gia/GiaEmptyStateIllustration.js.map +1 -0
  89. package/dist/components/gia/GiaMentionAutocomplete.d.ts +31 -0
  90. package/dist/components/gia/GiaMentionAutocomplete.js +115 -0
  91. package/dist/components/gia/GiaMentionAutocomplete.js.map +1 -0
  92. package/dist/components/gia/GiaMentionText.d.ts +10 -0
  93. package/dist/components/gia/GiaMentionText.js +66 -0
  94. package/dist/components/gia/GiaMentionText.js.map +1 -0
  95. package/dist/components/gia/mentionParsing.d.ts +79 -0
  96. package/dist/components/gia/mentionParsing.js +44 -0
  97. package/dist/components/gia/mentionParsing.js.map +1 -0
  98. package/dist/components/ui/accordion.d.ts +7 -0
  99. package/dist/components/ui/accordion.js +66 -0
  100. package/dist/components/ui/accordion.js.map +1 -0
  101. package/dist/components/ui/alert.d.ts +9 -0
  102. package/dist/components/ui/alert.js +68 -0
  103. package/dist/components/ui/alert.js.map +1 -0
  104. package/dist/components/ui/badge.d.ts +9 -0
  105. package/dist/components/ui/badge.js +45 -0
  106. package/dist/components/ui/badge.js.map +1 -0
  107. package/dist/components/ui/breadcrumb.d.ts +11 -0
  108. package/dist/components/ui/breadcrumb.js +105 -0
  109. package/dist/components/ui/breadcrumb.js.map +1 -0
  110. package/dist/components/ui/button.d.ts +10 -0
  111. package/dist/components/ui/button.js +58 -0
  112. package/dist/components/ui/button.js.map +1 -0
  113. package/dist/components/ui/calendar.d.ts +8 -0
  114. package/dist/components/ui/calendar.js +175 -0
  115. package/dist/components/ui/calendar.js.map +1 -0
  116. package/dist/components/ui/checkbox.d.ts +4 -0
  117. package/dist/components/ui/checkbox.js +33 -0
  118. package/dist/components/ui/checkbox.js.map +1 -0
  119. package/dist/components/ui/dialog.d.ts +17 -0
  120. package/dist/components/ui/dialog.js +148 -0
  121. package/dist/components/ui/dialog.js.map +1 -0
  122. package/dist/components/ui/dropdown-menu.d.ts +25 -0
  123. package/dist/components/ui/dropdown-menu.js +233 -0
  124. package/dist/components/ui/dropdown-menu.js.map +1 -0
  125. package/dist/components/ui/input.d.ts +3 -0
  126. package/dist/components/ui/input.js +23 -0
  127. package/dist/components/ui/input.js.map +1 -0
  128. package/dist/components/ui/label.d.ts +4 -0
  129. package/dist/components/ui/label.js +24 -0
  130. package/dist/components/ui/label.js.map +1 -0
  131. package/dist/components/ui/pagination.d.ts +13 -0
  132. package/dist/components/ui/pagination.js +120 -0
  133. package/dist/components/ui/pagination.js.map +1 -0
  134. package/dist/components/ui/popover.d.ts +10 -0
  135. package/dist/components/ui/popover.js +82 -0
  136. package/dist/components/ui/popover.js.map +1 -0
  137. package/dist/components/ui/progress.d.ts +4 -0
  138. package/dist/components/ui/progress.js +33 -0
  139. package/dist/components/ui/progress.js.map +1 -0
  140. package/dist/components/ui/scroll-area.d.ts +5 -0
  141. package/dist/components/ui/scroll-area.js +62 -0
  142. package/dist/components/ui/scroll-area.js.map +1 -0
  143. package/dist/components/ui/separator.d.ts +4 -0
  144. package/dist/components/ui/separator.js +28 -0
  145. package/dist/components/ui/separator.js.map +1 -0
  146. package/dist/components/ui/sheet.d.ts +14 -0
  147. package/dist/components/ui/sheet.js +129 -0
  148. package/dist/components/ui/sheet.js.map +1 -0
  149. package/dist/components/ui/table.d.ts +10 -0
  150. package/dist/components/ui/table.js +116 -0
  151. package/dist/components/ui/table.js.map +1 -0
  152. package/dist/components/ui/tabs.d.ts +11 -0
  153. package/dist/components/ui/tabs.js +93 -0
  154. package/dist/components/ui/tabs.js.map +1 -0
  155. package/dist/components/ui/textarea.d.ts +3 -0
  156. package/dist/components/ui/textarea.js +20 -0
  157. package/dist/components/ui/textarea.js.map +1 -0
  158. package/dist/components/ui/tooltip.d.ts +7 -0
  159. package/dist/components/ui/tooltip.js +57 -0
  160. package/dist/components/ui/tooltip.js.map +1 -0
  161. package/dist/components/ui-garantiabr/Alert.d.ts +17 -0
  162. package/dist/components/ui-garantiabr/Alert.js +77 -0
  163. package/dist/components/ui-garantiabr/Alert.js.map +1 -0
  164. package/dist/components/ui-garantiabr/accordion.d.ts +46 -0
  165. package/dist/components/ui-garantiabr/accordion.js +114 -0
  166. package/dist/components/ui-garantiabr/accordion.js.map +1 -0
  167. package/dist/components/ui-garantiabr/alertBanner.d.ts +14 -0
  168. package/dist/components/ui-garantiabr/alertBanner.js +49 -0
  169. package/dist/components/ui-garantiabr/alertBanner.js.map +1 -0
  170. package/dist/components/ui-garantiabr/altTabs.d.ts +19 -0
  171. package/dist/components/ui-garantiabr/altTabs.js +33 -0
  172. package/dist/components/ui-garantiabr/altTabs.js.map +1 -0
  173. package/dist/components/ui-garantiabr/appLayout.d.ts +56 -0
  174. package/dist/components/ui-garantiabr/appLayout.js +177 -0
  175. package/dist/components/ui-garantiabr/appLayout.js.map +1 -0
  176. package/dist/components/ui-garantiabr/avatar.d.ts +15 -0
  177. package/dist/components/ui-garantiabr/avatar.js +38 -0
  178. package/dist/components/ui-garantiabr/avatar.js.map +1 -0
  179. package/dist/components/ui-garantiabr/badge.d.ts +17 -0
  180. package/dist/components/ui-garantiabr/badge.js +54 -0
  181. package/dist/components/ui-garantiabr/badge.js.map +1 -0
  182. package/dist/components/ui-garantiabr/badgeNotification.d.ts +10 -0
  183. package/dist/components/ui-garantiabr/badgeNotification.js +41 -0
  184. package/dist/components/ui-garantiabr/badgeNotification.js.map +1 -0
  185. package/dist/components/ui-garantiabr/breadcrumb.d.ts +10 -0
  186. package/dist/components/ui-garantiabr/breadcrumb.js +61 -0
  187. package/dist/components/ui-garantiabr/breadcrumb.js.map +1 -0
  188. package/dist/components/ui-garantiabr/button.d.ts +23 -0
  189. package/dist/components/ui-garantiabr/button.js +71 -0
  190. package/dist/components/ui-garantiabr/button.js.map +1 -0
  191. package/dist/components/ui-garantiabr/buttonIcon.d.ts +15 -0
  192. package/dist/components/ui-garantiabr/buttonIcon.js +48 -0
  193. package/dist/components/ui-garantiabr/buttonIcon.js.map +1 -0
  194. package/dist/components/ui-garantiabr/calendar.d.ts +20 -0
  195. package/dist/components/ui-garantiabr/calendar.js +73 -0
  196. package/dist/components/ui-garantiabr/calendar.js.map +1 -0
  197. package/dist/components/ui-garantiabr/card.d.ts +12 -0
  198. package/dist/components/ui-garantiabr/card.js +31 -0
  199. package/dist/components/ui-garantiabr/card.js.map +1 -0
  200. package/dist/components/ui-garantiabr/chart_area.d.ts +29 -0
  201. package/dist/components/ui-garantiabr/chart_area.js +62 -0
  202. package/dist/components/ui-garantiabr/chart_area.js.map +1 -0
  203. package/dist/components/ui-garantiabr/chart_bar.d.ts +35 -0
  204. package/dist/components/ui-garantiabr/chart_bar.js +46 -0
  205. package/dist/components/ui-garantiabr/chart_bar.js.map +1 -0
  206. package/dist/components/ui-garantiabr/chart_bar_disponibilidade.d.ts +28 -0
  207. package/dist/components/ui-garantiabr/chart_bar_disponibilidade.js +57 -0
  208. package/dist/components/ui-garantiabr/chart_bar_disponibilidade.js.map +1 -0
  209. package/dist/components/ui-garantiabr/chart_bar_horizontal.d.ts +26 -0
  210. package/dist/components/ui-garantiabr/chart_bar_horizontal.js +44 -0
  211. package/dist/components/ui-garantiabr/chart_bar_horizontal.js.map +1 -0
  212. package/dist/components/ui-garantiabr/chart_composed.d.ts +36 -0
  213. package/dist/components/ui-garantiabr/chart_composed.js +70 -0
  214. package/dist/components/ui-garantiabr/chart_composed.js.map +1 -0
  215. package/dist/components/ui-garantiabr/chart_funnel.d.ts +13 -0
  216. package/dist/components/ui-garantiabr/chart_funnel.js +25 -0
  217. package/dist/components/ui-garantiabr/chart_funnel.js.map +1 -0
  218. package/dist/components/ui-garantiabr/chart_line.d.ts +27 -0
  219. package/dist/components/ui-garantiabr/chart_line.js +43 -0
  220. package/dist/components/ui-garantiabr/chart_line.js.map +1 -0
  221. package/dist/components/ui-garantiabr/chart_pie.d.ts +26 -0
  222. package/dist/components/ui-garantiabr/chart_pie.js +62 -0
  223. package/dist/components/ui-garantiabr/chart_pie.js.map +1 -0
  224. package/dist/components/ui-garantiabr/chart_statcard.d.ts +22 -0
  225. package/dist/components/ui-garantiabr/chart_statcard.js +175 -0
  226. package/dist/components/ui-garantiabr/chart_statcard.js.map +1 -0
  227. package/dist/components/ui-garantiabr/checkbox.d.ts +10 -0
  228. package/dist/components/ui-garantiabr/checkbox.js +31 -0
  229. package/dist/components/ui-garantiabr/checkbox.js.map +1 -0
  230. package/dist/components/ui-garantiabr/checkboxGroupField.d.ts +12 -0
  231. package/dist/components/ui-garantiabr/checkboxGroupField.js +40 -0
  232. package/dist/components/ui-garantiabr/checkboxGroupField.js.map +1 -0
  233. package/dist/components/ui-garantiabr/chip.d.ts +12 -0
  234. package/dist/components/ui-garantiabr/chip.js +49 -0
  235. package/dist/components/ui-garantiabr/chip.js.map +1 -0
  236. package/dist/components/ui-garantiabr/codeBlock.d.ts +27 -0
  237. package/dist/components/ui-garantiabr/codeBlock.js +100 -0
  238. package/dist/components/ui-garantiabr/codeBlock.js.map +1 -0
  239. package/dist/components/ui-garantiabr/commandPalette.d.ts +67 -0
  240. package/dist/components/ui-garantiabr/commandPalette.js +278 -0
  241. package/dist/components/ui-garantiabr/commandPalette.js.map +1 -0
  242. package/dist/components/ui-garantiabr/commandPaletteOrdem.d.ts +10 -0
  243. package/dist/components/ui-garantiabr/commandPaletteOrdem.js +13 -0
  244. package/dist/components/ui-garantiabr/commandPaletteOrdem.js.map +1 -0
  245. package/dist/components/ui-garantiabr/dashCard.d.ts +16 -0
  246. package/dist/components/ui-garantiabr/dashCard.js +51 -0
  247. package/dist/components/ui-garantiabr/dashCard.js.map +1 -0
  248. package/dist/components/ui-garantiabr/datePicker.d.ts +23 -0
  249. package/dist/components/ui-garantiabr/datePicker.js +143 -0
  250. package/dist/components/ui-garantiabr/datePicker.js.map +1 -0
  251. package/dist/components/ui-garantiabr/dialog.d.ts +14 -0
  252. package/dist/components/ui-garantiabr/dialog.js +69 -0
  253. package/dist/components/ui-garantiabr/dialog.js.map +1 -0
  254. package/dist/components/ui-garantiabr/divider.d.ts +7 -0
  255. package/dist/components/ui-garantiabr/divider.js +27 -0
  256. package/dist/components/ui-garantiabr/divider.js.map +1 -0
  257. package/dist/components/ui-garantiabr/dropdownMenu.d.ts +47 -0
  258. package/dist/components/ui-garantiabr/dropdownMenu.js +89 -0
  259. package/dist/components/ui-garantiabr/dropdownMenu.js.map +1 -0
  260. package/dist/components/ui-garantiabr/dropdownTrigger.d.ts +18 -0
  261. package/dist/components/ui-garantiabr/dropdownTrigger.js +66 -0
  262. package/dist/components/ui-garantiabr/dropdownTrigger.js.map +1 -0
  263. package/dist/components/ui-garantiabr/emptyState.d.ts +12 -0
  264. package/dist/components/ui-garantiabr/emptyState.js +68 -0
  265. package/dist/components/ui-garantiabr/emptyState.js.map +1 -0
  266. package/dist/components/ui-garantiabr/fileUpload.d.ts +78 -0
  267. package/dist/components/ui-garantiabr/fileUpload.js +552 -0
  268. package/dist/components/ui-garantiabr/fileUpload.js.map +1 -0
  269. package/dist/components/ui-garantiabr/floutNavetagionStep.d.ts +9 -0
  270. package/dist/components/ui-garantiabr/floutNavetagionStep.js +50 -0
  271. package/dist/components/ui-garantiabr/floutNavetagionStep.js.map +1 -0
  272. package/dist/components/ui-garantiabr/footer.d.ts +11 -0
  273. package/dist/components/ui-garantiabr/footer.js +31 -0
  274. package/dist/components/ui-garantiabr/footer.js.map +1 -0
  275. package/dist/components/ui-garantiabr/giaButton.d.ts +6 -0
  276. package/dist/components/ui-garantiabr/giaButton.js +22 -0
  277. package/dist/components/ui-garantiabr/giaButton.js.map +1 -0
  278. package/dist/components/ui-garantiabr/giaIcon.d.ts +6 -0
  279. package/dist/components/ui-garantiabr/giaIcon.js +49 -0
  280. package/dist/components/ui-garantiabr/giaIcon.js.map +1 -0
  281. package/dist/components/ui-garantiabr/helperText.d.ts +6 -0
  282. package/dist/components/ui-garantiabr/helperText.js +25 -0
  283. package/dist/components/ui-garantiabr/helperText.js.map +1 -0
  284. package/dist/components/ui-garantiabr/hoverCard.d.ts +12 -0
  285. package/dist/components/ui-garantiabr/hoverCard.js +33 -0
  286. package/dist/components/ui-garantiabr/hoverCard.js.map +1 -0
  287. package/dist/components/ui-garantiabr/iconesAvaliacao.d.ts +4 -0
  288. package/dist/components/ui-garantiabr/iconesAvaliacao.js +19 -0
  289. package/dist/components/ui-garantiabr/iconesAvaliacao.js.map +1 -0
  290. package/dist/components/ui-garantiabr/input.d.ts +4 -0
  291. package/dist/components/ui-garantiabr/input.js +21 -0
  292. package/dist/components/ui-garantiabr/input.js.map +1 -0
  293. package/dist/components/ui-garantiabr/inputCounter.d.ts +14 -0
  294. package/dist/components/ui-garantiabr/inputCounter.js +117 -0
  295. package/dist/components/ui-garantiabr/inputCounter.js.map +1 -0
  296. package/dist/components/ui-garantiabr/inputFormField.d.ts +22 -0
  297. package/dist/components/ui-garantiabr/inputFormField.js +129 -0
  298. package/dist/components/ui-garantiabr/inputFormField.js.map +1 -0
  299. package/dist/components/ui-garantiabr/inputMasked.d.ts +12 -0
  300. package/dist/components/ui-garantiabr/inputMasked.js +130 -0
  301. package/dist/components/ui-garantiabr/inputMasked.js.map +1 -0
  302. package/dist/components/ui-garantiabr/inputSearch.d.ts +16 -0
  303. package/dist/components/ui-garantiabr/inputSearch.js +104 -0
  304. package/dist/components/ui-garantiabr/inputSearch.js.map +1 -0
  305. package/dist/components/ui-garantiabr/listaColunasOrdenavel.d.ts +30 -0
  306. package/dist/components/ui-garantiabr/listaColunasOrdenavel.js +72 -0
  307. package/dist/components/ui-garantiabr/listaColunasOrdenavel.js.map +1 -0
  308. package/dist/components/ui-garantiabr/loadingSpinner.d.ts +9 -0
  309. package/dist/components/ui-garantiabr/loadingSpinner.js +57 -0
  310. package/dist/components/ui-garantiabr/loadingSpinner.js.map +1 -0
  311. package/dist/components/ui-garantiabr/messageComposer.d.ts +62 -0
  312. package/dist/components/ui-garantiabr/messageComposer.js +296 -0
  313. package/dist/components/ui-garantiabr/messageComposer.js.map +1 -0
  314. package/dist/components/ui-garantiabr/mobileDrawer.d.ts +11 -0
  315. package/dist/components/ui-garantiabr/mobileDrawer.js +102 -0
  316. package/dist/components/ui-garantiabr/mobileDrawer.js.map +1 -0
  317. package/dist/components/ui-garantiabr/multiSelectField.d.ts +27 -0
  318. package/dist/components/ui-garantiabr/multiSelectField.js +140 -0
  319. package/dist/components/ui-garantiabr/multiSelectField.js.map +1 -0
  320. package/dist/components/ui-garantiabr/navbar.d.ts +82 -0
  321. package/dist/components/ui-garantiabr/navbar.js +417 -0
  322. package/dist/components/ui-garantiabr/navbar.js.map +1 -0
  323. package/dist/components/ui-garantiabr/navbarMobileDrawer.d.ts +15 -0
  324. package/dist/components/ui-garantiabr/navbarMobileDrawer.js +146 -0
  325. package/dist/components/ui-garantiabr/navbarMobileDrawer.js.map +1 -0
  326. package/dist/components/ui-garantiabr/notificationCard.d.ts +35 -0
  327. package/dist/components/ui-garantiabr/notificationCard.js +70 -0
  328. package/dist/components/ui-garantiabr/notificationCard.js.map +1 -0
  329. package/dist/components/ui-garantiabr/optionSelect.d.ts +64 -0
  330. package/dist/components/ui-garantiabr/optionSelect.js +117 -0
  331. package/dist/components/ui-garantiabr/optionSelect.js.map +1 -0
  332. package/dist/components/ui-garantiabr/pagination.d.ts +13 -0
  333. package/dist/components/ui-garantiabr/pagination.js +141 -0
  334. package/dist/components/ui-garantiabr/pagination.js.map +1 -0
  335. package/dist/components/ui-garantiabr/popover.d.ts +18 -0
  336. package/dist/components/ui-garantiabr/popover.js +57 -0
  337. package/dist/components/ui-garantiabr/popover.js.map +1 -0
  338. package/dist/components/ui-garantiabr/productLogotype.d.ts +14 -0
  339. package/dist/components/ui-garantiabr/productLogotype.js +40 -0
  340. package/dist/components/ui-garantiabr/productLogotype.js.map +1 -0
  341. package/dist/components/ui-garantiabr/productSwitcher.d.ts +20 -0
  342. package/dist/components/ui-garantiabr/productSwitcher.js +62 -0
  343. package/dist/components/ui-garantiabr/productSwitcher.js.map +1 -0
  344. package/dist/components/ui-garantiabr/progressBar.d.ts +12 -0
  345. package/dist/components/ui-garantiabr/progressBar.js +32 -0
  346. package/dist/components/ui-garantiabr/progressBar.js.map +1 -0
  347. package/dist/components/ui-garantiabr/radioGroup.d.ts +14 -0
  348. package/dist/components/ui-garantiabr/radioGroup.js +47 -0
  349. package/dist/components/ui-garantiabr/radioGroup.js.map +1 -0
  350. package/dist/components/ui-garantiabr/segmentedControl.d.ts +28 -0
  351. package/dist/components/ui-garantiabr/segmentedControl.js +62 -0
  352. package/dist/components/ui-garantiabr/segmentedControl.js.map +1 -0
  353. package/dist/components/ui-garantiabr/select.d.ts +27 -0
  354. package/dist/components/ui-garantiabr/select.js +166 -0
  355. package/dist/components/ui-garantiabr/select.js.map +1 -0
  356. package/dist/components/ui-garantiabr/selectField.d.ts +12 -0
  357. package/dist/components/ui-garantiabr/selectField.js +38 -0
  358. package/dist/components/ui-garantiabr/selectField.js.map +1 -0
  359. package/dist/components/ui-garantiabr/sheet.d.ts +16 -0
  360. package/dist/components/ui-garantiabr/sheet.js +74 -0
  361. package/dist/components/ui-garantiabr/sheet.js.map +1 -0
  362. package/dist/components/ui-garantiabr/shinyButton.d.ts +24 -0
  363. package/dist/components/ui-garantiabr/shinyButton.js +34 -0
  364. package/dist/components/ui-garantiabr/shinyButton.js.map +1 -0
  365. package/dist/components/ui-garantiabr/shinyIconButton.d.ts +16 -0
  366. package/dist/components/ui-garantiabr/shinyIconButton.js +32 -0
  367. package/dist/components/ui-garantiabr/shinyIconButton.js.map +1 -0
  368. package/dist/components/ui-garantiabr/sideTrayNotification.d.ts +31 -0
  369. package/dist/components/ui-garantiabr/sideTrayNotification.js +87 -0
  370. package/dist/components/ui-garantiabr/sideTrayNotification.js.map +1 -0
  371. package/dist/components/ui-garantiabr/sidebar.d.ts +36 -0
  372. package/dist/components/ui-garantiabr/sidebar.js +231 -0
  373. package/dist/components/ui-garantiabr/sidebar.js.map +1 -0
  374. package/dist/components/ui-garantiabr/splitButton.d.ts +33 -0
  375. package/dist/components/ui-garantiabr/splitButton.js +67 -0
  376. package/dist/components/ui-garantiabr/splitButton.js.map +1 -0
  377. package/dist/components/ui-garantiabr/stepper.d.ts +9 -0
  378. package/dist/components/ui-garantiabr/stepper.js +31 -0
  379. package/dist/components/ui-garantiabr/stepper.js.map +1 -0
  380. package/dist/components/ui-garantiabr/switch.d.ts +9 -0
  381. package/dist/components/ui-garantiabr/switch.js +50 -0
  382. package/dist/components/ui-garantiabr/switch.js.map +1 -0
  383. package/dist/components/ui-garantiabr/table.d.ts +133 -0
  384. package/dist/components/ui-garantiabr/table.js +544 -0
  385. package/dist/components/ui-garantiabr/table.js.map +1 -0
  386. package/dist/components/ui-garantiabr/tabs.d.ts +27 -0
  387. package/dist/components/ui-garantiabr/tabs.js +53 -0
  388. package/dist/components/ui-garantiabr/tabs.js.map +1 -0
  389. package/dist/components/ui-garantiabr/tagInput.d.ts +13 -0
  390. package/dist/components/ui-garantiabr/tagInput.js +55 -0
  391. package/dist/components/ui-garantiabr/tagInput.js.map +1 -0
  392. package/dist/components/ui-garantiabr/textarea.d.ts +11 -0
  393. package/dist/components/ui-garantiabr/textarea.js +62 -0
  394. package/dist/components/ui-garantiabr/textarea.js.map +1 -0
  395. package/dist/components/ui-garantiabr/timeline.d.ts +29 -0
  396. package/dist/components/ui-garantiabr/timeline.js +38 -0
  397. package/dist/components/ui-garantiabr/timeline.js.map +1 -0
  398. package/dist/components/ui-garantiabr/toastDownload.d.ts +13 -0
  399. package/dist/components/ui-garantiabr/toastDownload.js +55 -0
  400. package/dist/components/ui-garantiabr/toastDownload.js.map +1 -0
  401. package/dist/components/ui-garantiabr/tooltip.d.ts +18 -0
  402. package/dist/components/ui-garantiabr/tooltip.js +34 -0
  403. package/dist/components/ui-garantiabr/tooltip.js.map +1 -0
  404. package/dist/components/ui-garantiabr/topNavegation.d.ts +32 -0
  405. package/dist/components/ui-garantiabr/topNavegation.js +267 -0
  406. package/dist/components/ui-garantiabr/topNavegation.js.map +1 -0
  407. package/dist/components/ui-garantiabr/truncatedText.d.ts +14 -0
  408. package/dist/components/ui-garantiabr/truncatedText.js +27 -0
  409. package/dist/components/ui-garantiabr/truncatedText.js.map +1 -0
  410. package/dist/components/ui-garantiabr/useTemRolagem.d.ts +4 -0
  411. package/dist/components/ui-garantiabr/useTemRolagem.js +17 -0
  412. package/dist/components/ui-garantiabr/useTemRolagem.js.map +1 -0
  413. package/dist/hooks/useTheme.d.ts +7 -0
  414. package/dist/hooks/useTheme.js +31 -0
  415. package/dist/hooks/useTheme.js.map +1 -0
  416. package/dist/lib/confianca.d.ts +4 -0
  417. package/dist/lib/confianca.js +16 -0
  418. package/dist/lib/confianca.js.map +1 -0
  419. package/dist/lib/protocolosSuporte.d.ts +29 -0
  420. package/dist/lib/protocolosSuporte.js +44 -0
  421. package/dist/lib/protocolosSuporte.js.map +1 -0
  422. package/dist/lib/utils.d.ts +2 -0
  423. package/dist/lib/utils.js +9 -0
  424. package/dist/lib/utils.js.map +1 -0
  425. package/dist/theme.css +1072 -0
  426. package/dist/types/svg.d.js +2 -0
  427. package/dist/types/svg.d.js.map +1 -0
  428. package/dist/utils/inputMasks.d.ts +5 -0
  429. package/dist/utils/inputMasks.js +16 -0
  430. package/dist/utils/inputMasks.js.map +1 -0
  431. package/dist/utils/useMediaQuery.d.ts +6 -0
  432. package/dist/utils/useMediaQuery.js +14 -0
  433. package/dist/utils/useMediaQuery.js.map +1 -0
  434. package/package.json +94 -4
  435. package/tools/agent-config.mjs +51 -0
  436. package/tools/check.mjs +110 -0
  437. package/tools/eslint-plugin.mjs +115 -0
  438. package/tools/hooks.mjs +133 -0
  439. package/tools/mcp.mjs +132 -0
  440. package/tools/version.mjs +43 -0
  441. package/tools/workspace.mjs +51 -0
@@ -0,0 +1,552 @@
1
+ "use client";
2
+ import { jsxs as n, jsx as t, Fragment as y } from "react/jsx-runtime";
3
+ import { useRef as Z, useState as A, useEffect as Y } from "react";
4
+ import { File as $e, Download as Xe, Sparkles as We, Trash as Ae, Upload as Je, TriangleAlert as Ze } from "lucide-react";
5
+ import { alertBanner as Q } from "./alertBanner.js";
6
+ import { Button as z } from "./button.js";
7
+ import { Checkbox as De } from "./checkbox.js";
8
+ import { Dialog as Ye } from "./dialog.js";
9
+ import { Tooltip as M } from "./tooltip.js";
10
+ import { Progress as Qe } from "../ui/progress.js";
11
+ import { cn as te } from "../../lib/utils.js";
12
+ const C = 1024, et = 280, tt = [".pdf", ".jpg", ".jpeg", ".png", ".tiff", ".tif", ".bmp"], ot = {
13
+ ".heic": "foto do iPhone (.heic) não é aceita. Exporte a foto como JPG e envie de novo.",
14
+ ".heif": "foto do iPhone (.heif) não é aceita. Exporte a foto como JPG e envie de novo."
15
+ }, ee = "PDF, JPG, PNG, TIFF ou BMP", nt = { ".pdf": "pdf", ".jpg": "jpg", ".jpeg": "jpg", ".png": "png", ".tiff": "tiff", ".tif": "tiff", ".bmp": "bmp" };
16
+ async function rt(s) {
17
+ const x = new Uint8Array(await s.slice(0, 8).arrayBuffer()), i = (...c) => c.every((m, l) => x[l] === m);
18
+ return i(37, 80, 68, 70) ? "pdf" : i(255, 216, 255) ? "jpg" : i(137, 80, 78, 71) ? "png" : i(73, 73, 42, 0) || i(77, 77, 0, 42) ? "tiff" : i(66, 77) ? "bmp" : null;
19
+ }
20
+ const st = tt.join(","), at = 45, it = "erro", Ee = "Erro ao enviar o documento", Se = "transition-colors hover:bg-surface-hover active:bg-surface-pressed", lt = 40;
21
+ function _(s, x = lt) {
22
+ if (s.length <= x) return s;
23
+ const i = s.lastIndexOf("."), c = i > 0 ? s.slice(i) : "", m = i > 0 ? s.slice(0, i) : s, l = "(...)", w = Math.max(1, x - c.length - l.length);
24
+ return `${m.slice(0, w)}${l}${c}`;
25
+ }
26
+ const oe = /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "27", height: "27", viewBox: "0 0 20 20", fill: "none", children: [
27
+ /* @__PURE__ */ t("path", { d: "M13.3919 2.66528C13.4399 2.49344 13.8061 2.49341 13.8541 2.66528C14.0178 3.25148 14.2794 3.93708 14.672 4.34497C15.0645 4.75276 15.7241 5.02448 16.2882 5.19458C16.4534 5.24459 16.4533 5.62455 16.2882 5.67472C15.724 5.84485 15.0645 6.11725 14.672 6.52515C14.2794 6.93306 14.0178 7.61861 13.8541 8.20484C13.8059 8.37638 13.4403 8.37627 13.3919 8.20484C13.2282 7.61875 12.9664 6.9331 12.574 6.52515C12.1814 6.11723 11.5211 5.84485 10.957 5.67472C10.7921 5.62436 10.792 5.24478 10.957 5.19458C11.5211 5.02445 12.1814 4.75289 12.574 4.34497C12.9665 3.93704 13.2281 3.25146 13.3919 2.66528Z", fill: "black" }),
28
+ /* @__PURE__ */ t("path", { d: "M15.8683 6.60409C15.8827 6.55252 15.993 6.55252 16.0074 6.60409C16.0565 6.77987 16.1347 6.98548 16.2524 7.10783C16.3701 7.23017 16.5682 7.31151 16.7374 7.36255C16.787 7.37751 16.787 7.49159 16.7374 7.50659C16.5681 7.55763 16.3701 7.63975 16.2524 7.76213C16.1347 7.88453 16.0565 8.09011 16.0074 8.26587C15.993 8.31739 15.8827 8.3174 15.8683 8.26587C15.8192 8.09009 15.741 7.88452 15.6233 7.76213C15.5055 7.63975 15.3075 7.55763 15.1383 7.50659C15.0887 7.49153 15.0887 7.37751 15.1383 7.36255C15.3075 7.31151 15.5056 7.23018 15.6233 7.10783C15.741 6.98548 15.8191 6.77988 15.8683 6.60409Z", fill: "black" }),
29
+ /* @__PURE__ */ t("path", { d: "M15.9895 1.73104C16.0136 1.64529 16.1964 1.64534 16.2206 1.73104C16.3025 2.02415 16.4337 2.36693 16.63 2.57088C16.8263 2.77481 17.156 2.91063 17.4381 2.99569C17.5206 3.02071 17.5205 3.2105 17.4381 3.23576C17.156 3.32082 16.8262 3.45742 16.63 3.66138C16.4337 3.86534 16.3025 4.20813 16.2206 4.50122C16.1962 4.58669 16.0138 4.58674 15.9895 4.50122C15.9077 4.20825 15.7771 3.86537 15.581 3.66138C15.3847 3.45747 15.0549 3.32083 14.7729 3.23576C14.6902 3.21082 14.6902 3.02063 14.7729 2.99569C15.0549 2.91062 15.3848 2.77475 15.581 2.57088C15.7772 2.3669 15.9077 2.02406 15.9895 1.73104Z", fill: "black" }),
30
+ /* @__PURE__ */ t("path", { d: "M8.33325 2.91675H7.7211C7.58023 2.91675 7.4459 2.97617 7.35113 3.08041L3.33325 7.50008V17.0001C3.33325 17.2762 3.55711 17.5001 3.83325 17.5001H14.4999C14.7761 17.5001 14.9999 17.2762 14.9999 17.0001V10.0001M3.33325 7.50008H7.83325C8.10939 7.50008 8.33325 7.27622 8.33325 7.00008V2.91675M10.8333 2.91675H8.33325", stroke: "black", strokeWidth: "2", strokeLinecap: "round" })
31
+ ] });
32
+ function Nt({ name: s, sizeLabel: x, onDownload: i, onAnaliseIa: c, analiseIaVariante: m = "icone", analiseIaProgresso: l, analiseIaIndicador: w, detalhe: U, onRemove: D, onClick: v, nomeMax: F, className: L }) {
33
+ return /* @__PURE__ */ t(
34
+ "div",
35
+ {
36
+ className: te("px-xl py-md", v && te(Se, "cursor-pointer"), L),
37
+ onClick: v,
38
+ onKeyDown: (d) => {
39
+ v && (d.key === "Enter" || d.key === " ") && (d.preventDefault(), v());
40
+ },
41
+ role: v ? "button" : void 0,
42
+ tabIndex: v ? 0 : void 0,
43
+ children: /* @__PURE__ */ n("div", { className: "flex min-h-7.5 w-full items-center justify-between gap-md", children: [
44
+ /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center gap-md", children: [
45
+ /* @__PURE__ */ t($e, { className: "size-[24px] shrink-0 text-fg-muted", "aria-hidden": "true" }),
46
+ /* @__PURE__ */ n("div", { className: "flex min-w-0 flex-col gap-3xs", children: [
47
+ /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center gap-5xs", children: [
48
+ /* @__PURE__ */ t("span", { className: "text-sm font-semibold text-fg-secondary", title: s, children: _(s, F) }),
49
+ x ? /* @__PURE__ */ n(y, { children: [
50
+ /* @__PURE__ */ t("span", { className: "text-xs font-bold text-fg-muted", children: "•" }),
51
+ /* @__PURE__ */ t("span", { className: "shrink-0 whitespace-nowrap text-xs text-fg-muted", children: x })
52
+ ] }) : null
53
+ ] }),
54
+ U
55
+ ] })
56
+ ] }),
57
+ i || c || D ? /* @__PURE__ */ n("div", { className: "flex items-center gap-sm", children: [
58
+ i ? /* @__PURE__ */ t(
59
+ M,
60
+ {
61
+ content: "Baixar arquivo",
62
+ trigger: /* @__PURE__ */ t(
63
+ "button",
64
+ {
65
+ type: "button",
66
+ className: "inline-flex h-[36px] w-[36px] items-center justify-center rounded-full bg-surface-muted text-fg transition hover:bg-primary-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 active:bg-primary-200 active:text-brand-fg-strong",
67
+ onClick: (d) => {
68
+ d.stopPropagation(), i();
69
+ },
70
+ "aria-label": `Baixar ${s}`,
71
+ children: /* @__PURE__ */ t(Xe, { className: "size-[20px]", "aria-hidden": !0 })
72
+ }
73
+ )
74
+ }
75
+ ) : null,
76
+ c && m === "botao" ? /* @__PURE__ */ n(
77
+ "button",
78
+ {
79
+ type: "button",
80
+ className: "inline-flex h-[36px] items-center justify-center gap-3xs whitespace-nowrap rounded-full bg-surface-muted px-md text-sm text-fg transition hover:bg-primary-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 active:bg-primary-200 active:text-brand-fg-strong",
81
+ "aria-label": `Análise IA de ${s}`,
82
+ onClick: (d) => {
83
+ d.stopPropagation(), c();
84
+ },
85
+ children: [
86
+ l !== void 0 && w ? w : /* @__PURE__ */ t(We, { className: "size-[16px]", "aria-hidden": "true" }),
87
+ /* @__PURE__ */ t("span", { className: "leading-sm", children: l !== void 0 ? `${Math.round(l)}%` : "Análise IA" })
88
+ ]
89
+ }
90
+ ) : null,
91
+ c && m === "icone" ? /* @__PURE__ */ t(
92
+ M,
93
+ {
94
+ content: "Análise IA",
95
+ trigger: /* @__PURE__ */ t(
96
+ "button",
97
+ {
98
+ type: "button",
99
+ className: "inline-flex h-[36px] w-[36px] items-center justify-center rounded-full bg-surface-muted text-fg transition hover:bg-primary-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 active:bg-primary-200 active:text-brand-fg-strong",
100
+ onClick: (d) => {
101
+ d.stopPropagation(), c();
102
+ },
103
+ "aria-label": `Análise IA de ${s}`,
104
+ children: /* @__PURE__ */ t("span", { className: "inline-flex [&>svg]:size-[22px]", children: oe })
105
+ }
106
+ )
107
+ }
108
+ ) : null,
109
+ D ? /* @__PURE__ */ t(
110
+ M,
111
+ {
112
+ content: "Remover arquivo",
113
+ trigger: /* @__PURE__ */ t(
114
+ "button",
115
+ {
116
+ type: "button",
117
+ className: "inline-flex h-[36px] w-[36px] items-center justify-center rounded-full bg-surface-muted text-fg transition hover:bg-red-50 hover:text-red-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-500",
118
+ onClick: (d) => {
119
+ d.stopPropagation(), D();
120
+ },
121
+ "aria-label": `Remover ${s}`,
122
+ children: /* @__PURE__ */ t(Ae, { className: "size-[20px]", "aria-hidden": !0 })
123
+ }
124
+ )
125
+ }
126
+ ) : null
127
+ ] }) : null
128
+ ] })
129
+ }
130
+ );
131
+ }
132
+ const ct = () => `${Date.now()}-${Math.random().toString(16).slice(2, 10)}`, Ct = ({
133
+ id: s,
134
+ className: x = "",
135
+ variant: i = "line",
136
+ maxFiles: c = 3,
137
+ directory: m = !1,
138
+ maxSizeMb: l,
139
+ onRejectedFiles: w,
140
+ hideRemainingHint: U = !1,
141
+ remainingHintText: D,
142
+ initialItems: v = [],
143
+ debugErrorMode: F = !1,
144
+ debugErrorKeyword: L = it,
145
+ debugErrorMessage: d = Ee,
146
+ confirmRemove: ne = !1,
147
+ renderFileTrigger: re,
148
+ uploadedItemClassName: Re,
149
+ selecionavel: I = !1,
150
+ onFilesChange: qe,
151
+ onItemsChange: se,
152
+ disabled: u,
153
+ ...Oe
154
+ }) => {
155
+ const G = Z(null), S = Z(0), R = Z(/* @__PURE__ */ new Map()), [p, V] = A(() => [...v]), [ae, K] = A(!1), [q, P] = A(null), [j, ie] = A(null), [E, Te] = A([]), [le, H] = A(/* @__PURE__ */ new Set()), X = p.filter((e) => e.status === "uploaded").length, O = Math.max(0, c - p.length), h = !!(u || O === 0), ce = st, de = ce.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), ke = de.map((e) => e.toUpperCase()).join(", ").replace(/, ([^,]*)$/, " e $1"), ue = (e) => {
156
+ const o = e / C;
157
+ return o >= C ? `${(o / C).toFixed(1)} MB` : `${o.toFixed(1)} KB`;
158
+ }, ze = (e) => !l || e.size <= l * C * C, N = (e) => {
159
+ const o = R.current.get(e);
160
+ o !== void 0 && (window.clearInterval(o), R.current.delete(e));
161
+ }, _e = () => {
162
+ R.current.forEach((e) => {
163
+ window.clearInterval(e);
164
+ }), R.current.clear();
165
+ };
166
+ Y(() => () => {
167
+ _e();
168
+ }, []), Y(() => {
169
+ se?.(p);
170
+ }, [p, se]), Y(() => {
171
+ const e = G.current;
172
+ e && (m ? (e.setAttribute("webkitdirectory", "true"), e.setAttribute("directory", "true")) : (e.removeAttribute("webkitdirectory"), e.removeAttribute("directory")));
173
+ }, [m]);
174
+ const Me = (e, o) => {
175
+ if (!F || o < at)
176
+ return !1;
177
+ const r = L.trim().toLowerCase();
178
+ return r ? e.name.toLowerCase().includes(r) : !1;
179
+ }, fe = (e) => {
180
+ const o = window.setInterval(() => {
181
+ V((r) => {
182
+ const a = r.find((g) => g.id === e);
183
+ if (!a || a.status === "uploaded" || a.status === "error")
184
+ return N(e), r;
185
+ const f = Math.min(100, a.progress + Math.floor(Math.random() * 20) + 10);
186
+ if (Me(a, f))
187
+ return N(e), r.map(
188
+ (g) => g.id === e ? {
189
+ ...g,
190
+ progress: 0,
191
+ status: "error",
192
+ error: d
193
+ } : g
194
+ );
195
+ const $ = f === 100 ? "uploaded" : "uploading";
196
+ return $ === "uploaded" && N(e), r.map(
197
+ (g) => g.id === e ? {
198
+ ...g,
199
+ progress: f,
200
+ status: $,
201
+ error: void 0
202
+ } : g
203
+ );
204
+ });
205
+ }, et);
206
+ R.current.set(e, o);
207
+ }, W = (e) => {
208
+ V(e), qe?.(e.map((o) => o.file));
209
+ }, Le = async (e) => {
210
+ const o = e.name.toLowerCase(), r = o.lastIndexOf("."), a = r > 0 ? o.slice(r) : "";
211
+ if (e.size === 0) return "o arquivo está vazio.";
212
+ if (a && !de.includes(a))
213
+ return ot[a] ?? `o formato ${a} não é aceito. Envie em ${ee}.`;
214
+ const f = await rt(e);
215
+ return f ? a && nt[a] !== f ? `o arquivo tem extensão ${a}, mas o conteúdo é ${f.toUpperCase()}. Salve de novo no formato certo e envie.` : l && !ze(e) ? `tem ${(Math.ceil(e.size / (C * C) * 100) / 100).toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} MB, acima do limite de ${l} MB por arquivo. Reduza o arquivo ou divida o documento.` : null : a ? `o arquivo tem extensão ${a}, mas o conteúdo não é desse formato. Abra o arquivo, salve de novo como ${ee} e envie.` : `não foi possível reconhecer o formato do arquivo. Envie em ${ee}.`;
216
+ }, me = async (e) => {
217
+ if (h || e.length === 0)
218
+ return;
219
+ const o = await Promise.all(e.map(Le)), r = e.flatMap((b, B) => o[B] ? [{ nome: b.name, motivo: o[B] }] : []), a = e.filter((b, B) => !o[B]);
220
+ Te(r), w?.(r);
221
+ const f = a.slice(0, O);
222
+ if (a.length > f.length ? ie(`${f.length} de ${a.length} arquivos foram adicionados: o limite de ${c} arquivos foi atingido.`) : ie(null), f.length === 0)
223
+ return;
224
+ const $ = f.map((b) => ({
225
+ id: ct(),
226
+ file: b,
227
+ name: b.name,
228
+ size: b.size,
229
+ progress: 0,
230
+ status: "uploading"
231
+ })), g = [...p, ...$];
232
+ W(g), $.forEach((b) => fe(b.id));
233
+ }, pe = () => E.length === 0 ? null : /* @__PURE__ */ t("div", { role: "alert", className: "flex w-full flex-col gap-4xs rounded-lg border border-orange-500 bg-orange-50 px-md py-sm text-left text-sm text-orange-600", children: E.length === 1 ? /* @__PURE__ */ n("p", { children: [
234
+ /* @__PURE__ */ n("span", { className: "font-medium", children: [
235
+ '"',
236
+ _(E[0].nome),
237
+ '" não foi adicionado:'
238
+ ] }),
239
+ " ",
240
+ E[0].motivo
241
+ ] }) : /* @__PURE__ */ n(y, { children: [
242
+ /* @__PURE__ */ n("p", { className: "font-medium", children: [
243
+ E.length,
244
+ " arquivos não foram adicionados:"
245
+ ] }),
246
+ /* @__PURE__ */ t("ul", { className: "flex list-disc flex-col gap-5xs pl-md", children: E.map((e) => /* @__PURE__ */ n("li", { children: [
247
+ /* @__PURE__ */ n("span", { className: "font-medium", children: [
248
+ _(e.nome),
249
+ ":"
250
+ ] }),
251
+ " ",
252
+ e.motivo
253
+ ] }, e.nome)) })
254
+ ] }) }), Pe = (e) => {
255
+ const o = Array.from(e.target.files ?? []);
256
+ me(o), e.target.value = "";
257
+ }, ge = () => {
258
+ S.current = 0, K(!1);
259
+ }, xe = (e) => {
260
+ e.preventDefault(), e.stopPropagation(), !u && (S.current += 1, K(!0));
261
+ }, ve = (e) => {
262
+ e.preventDefault(), e.stopPropagation(), !u && (S.current = Math.max(0, S.current - 1), S.current === 0 && K(!1));
263
+ }, he = (e) => {
264
+ e.preventDefault(), !u && (e.dataTransfer.dropEffect = "copy");
265
+ }, be = (e) => {
266
+ e.preventDefault(), e.stopPropagation();
267
+ const o = Array.from(e.dataTransfer.files ?? []);
268
+ if (u) {
269
+ ge();
270
+ return;
271
+ }
272
+ me(o), ge();
273
+ }, Ne = (e) => {
274
+ N(e), W(p.filter((o) => o.id !== e));
275
+ }, T = p.filter((e) => e.status === "uploaded"), k = T.filter((e) => le.has(e.id)), je = T.length > 0 && k.length === T.length, Be = (e) => H((o) => {
276
+ const r = new Set(o);
277
+ return r.has(e) ? r.delete(e) : r.add(e), r;
278
+ }), Ue = () => {
279
+ const e = new Set(k.map((o) => o.id));
280
+ e.forEach((o) => N(o)), W(p.filter((o) => !e.has(o.id))), H(/* @__PURE__ */ new Set()), Q.show({
281
+ type: "success",
282
+ title: e.size === 1 ? "Arquivo removido com sucesso" : `${e.size} arquivos removidos com sucesso`,
283
+ description: "Você pode anexar novos arquivos utilizando o campo de upload."
284
+ });
285
+ }, Fe = (e) => {
286
+ if (ne) {
287
+ P(e);
288
+ return;
289
+ }
290
+ Ne(e.id);
291
+ }, Ie = () => {
292
+ if (!q) return;
293
+ const e = q.name.toLowerCase().includes(L.trim().toLowerCase()), o = q;
294
+ if (P(null), e) {
295
+ Q.show({
296
+ type: "error",
297
+ title: "Não foi possível remover o arquivo",
298
+ description: "Ocorreu um erro ao tentar remover o arquivo. Tente novamente ou entre em contato com o suporte."
299
+ });
300
+ return;
301
+ }
302
+ Ne(o.id), Q.show({
303
+ type: "success",
304
+ title: "Arquivo removido com sucesso",
305
+ description: "O arquivo foi removido. Você pode anexar um novo utilizando o campo de upload."
306
+ });
307
+ }, Ce = (e) => {
308
+ N(e), V(
309
+ (o) => o.map(
310
+ (r) => r.id === e ? {
311
+ ...r,
312
+ progress: 0,
313
+ status: "uploading",
314
+ error: void 0
315
+ } : r
316
+ )
317
+ ), fe(e);
318
+ }, J = () => {
319
+ h || G.current?.click();
320
+ }, ye = ae && !u ? "border-primary-500 bg-primary-500/5 ring-1 ring-primary-500/30" : "border-line bg-surface", we = D ?? (O === 0 ? "Limite de arquivos atingido." : `Você ainda precisa enviar ${O} arquivo${O > 1 ? "s" : ""}.`), Ge = () => /* @__PURE__ */ t(
321
+ "input",
322
+ {
323
+ id: s,
324
+ ref: G,
325
+ className: "sr-only",
326
+ type: "file",
327
+ multiple: c > 1,
328
+ onChange: Pe,
329
+ disabled: h,
330
+ ...Oe,
331
+ accept: ce
332
+ }
333
+ ), Ve = () => /* @__PURE__ */ n(
334
+ "div",
335
+ {
336
+ className: `flex flex-col gap-sm rounded-xl border p-xl transition-colors ${ye} ${x}`,
337
+ onDragEnter: xe,
338
+ onDragLeave: ve,
339
+ onDragOver: he,
340
+ onDrop: be,
341
+ children: [
342
+ /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center justify-between gap-sm", children: [
343
+ /* @__PURE__ */ t("p", { className: "text-sm text-fg", children: "Arraste documentos para iniciar o upload" }),
344
+ /* @__PURE__ */ t("span", { className: "text-sm text-fg/40", children: "OU" }),
345
+ /* @__PURE__ */ t(
346
+ z,
347
+ {
348
+ type: "button",
349
+ size: "sm",
350
+ onClick: J,
351
+ disabled: h,
352
+ label: "Selecionar arquivo"
353
+ }
354
+ )
355
+ ] }),
356
+ pe(),
357
+ j ? /* @__PURE__ */ t("p", { className: "text-sm text-orange-600", children: j }) : null
358
+ ]
359
+ }
360
+ ), Ke = () => /* @__PURE__ */ n(
361
+ "div",
362
+ {
363
+ role: "button",
364
+ tabIndex: h ? -1 : 0,
365
+ "aria-disabled": h || void 0,
366
+ onClick: J,
367
+ onKeyDown: (e) => {
368
+ e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), J());
369
+ },
370
+ className: `flex flex-col gap-sm rounded-xl border p-xl text-center transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-brand-focus ${h ? "cursor-not-allowed" : `cursor-pointer ${ae ? "" : "hover:bg-surface-hover active:bg-surface-pressed"}`} ${ye} ${x}`,
371
+ onDragEnter: xe,
372
+ onDragLeave: ve,
373
+ onDragOver: he,
374
+ onDrop: be,
375
+ children: [
376
+ /* @__PURE__ */ t(Je, { className: "mx-auto size-[24px] text-fg-secondary" }),
377
+ /* @__PURE__ */ n("p", { className: "text-base leading-base text-fg", children: [
378
+ "Arraste aqui ou ",
379
+ /* @__PURE__ */ t("span", { className: h ? "text-fg-disabled" : "text-blue-600 hover:underline", children: "selecione" }),
380
+ m ? " uma pasta em seu dispositivo" : " arquivos em seu dispositivo"
381
+ ] }),
382
+ /* @__PURE__ */ n("p", { className: "text-sm text-fg-muted", children: [
383
+ m ? "Todos os arquivos dentro da pasta serão enviados." : `Apenas arquivos ${ke} são suportados.`,
384
+ l ? ` O tamanho máximo é de ${l} MB por arquivo.` : "",
385
+ U ? null : D ? /* @__PURE__ */ n(y, { children: [
386
+ /* @__PURE__ */ t("br", {}),
387
+ we
388
+ ] }) : ` ${we}`
389
+ ] }),
390
+ pe(),
391
+ j ? /* @__PURE__ */ t("p", { className: "text-sm text-orange-600", children: j }) : null
392
+ ]
393
+ }
394
+ ), He = (e) => /* @__PURE__ */ t("div", { className: te("px-xl py-md", e.status === "uploaded" && (Re ?? Se)), children: /* @__PURE__ */ t("div", { className: "flex min-h-7.5 w-full items-center justify-between gap-md", children: e.status === "uploading" ? /* @__PURE__ */ n(y, { children: [
395
+ oe,
396
+ /* @__PURE__ */ n("div", { className: "flex w-full flex-col", children: [
397
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-5xs", children: [
398
+ /* @__PURE__ */ t("span", { className: "text-sm leading-sm font-semibold text-fg-secondary", title: e.name, children: _(e.name) }),
399
+ /* @__PURE__ */ t("span", { className: "text-xs font-bold text-fg-muted", children: "•" }),
400
+ /* @__PURE__ */ t("span", { className: "text-xs leading-xs font-normal text-fg-muted", children: ue(e.size) })
401
+ ] }),
402
+ /* @__PURE__ */ n("div", { className: "flex flex-row items-center gap-sm", children: [
403
+ /* @__PURE__ */ t(Qe, { value: e.progress, className: "text-blue-800 **:data-[slot=progress-indicator]:bg-blue-800 **:data-[slot=progress-indicator]:rounded-full bg-surface-neutral" }),
404
+ /* @__PURE__ */ n("span", { className: "text-xs font-normal leading-xs text-fg-secondary", children: [
405
+ e.progress,
406
+ "%"
407
+ ] })
408
+ ] }),
409
+ /* @__PURE__ */ t("span", { className: "text-xs leading-xs text-fg-muted", children: "Status de processamento" })
410
+ ] })
411
+ ] }) : e.status === "error" ? /* @__PURE__ */ n(y, { children: [
412
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-md", children: [
413
+ /* @__PURE__ */ t(Ze, { className: "size-[24px] text-red-600" }),
414
+ /* @__PURE__ */ t("span", { className: "text-sm leading-sm font-normal text-red-600", children: e.error ?? Ee })
415
+ ] }),
416
+ /* @__PURE__ */ t(
417
+ z,
418
+ {
419
+ label: "Tentar novamente",
420
+ size: "sm",
421
+ variant: "secondary",
422
+ onClick: () => Ce(e.id),
423
+ disabled: u
424
+ }
425
+ )
426
+ ] }) : /* @__PURE__ */ n(y, { children: [
427
+ /* @__PURE__ */ n("div", { className: "flex min-w-0 flex-1 items-center gap-md", children: [
428
+ I ? /* @__PURE__ */ t(
429
+ De,
430
+ {
431
+ id: `${s}-sel-${e.id}`,
432
+ "aria-label": `Selecionar ${e.name}`,
433
+ checked: le.has(e.id),
434
+ onCheckedChange: () => Be(e.id),
435
+ disabled: u
436
+ }
437
+ ) : null,
438
+ (() => {
439
+ const o = /* @__PURE__ */ n("div", { className: "flex items-center gap-md", children: [
440
+ /* @__PURE__ */ t($e, { className: "size-[24px] text-fg-muted" }),
441
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-5xs", children: [
442
+ /* @__PURE__ */ t("span", { className: "text-sm font-semibold text-fg-secondary", title: e.name, children: _(e.name) }),
443
+ /* @__PURE__ */ t("span", { className: "text-xs font-bold text-fg-muted", children: "•" }),
444
+ /* @__PURE__ */ t("span", { className: "text-xs text-fg-muted", children: ue(e.size) })
445
+ ] })
446
+ ] });
447
+ return re ? re(e, o) : o;
448
+ })()
449
+ ] }),
450
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-sm", children: [
451
+ /* @__PURE__ */ t(
452
+ M,
453
+ {
454
+ content: "Análise IA",
455
+ trigger: /* @__PURE__ */ t(
456
+ "button",
457
+ {
458
+ type: "button",
459
+ className: "ml-auto inline-flex h-[36px] w-[36px] items-center justify-center rounded-full bg-surface-muted text-fg transition hover:bg-primary-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 active:bg-primary-200 active:text-brand-fg-strong disabled:opacity-60",
460
+ onClick: () => Ce(e.id),
461
+ disabled: u,
462
+ "aria-label": `Reenviar ${e.name}`,
463
+ children: /* @__PURE__ */ t("span", { className: "inline-flex [&>svg]:size-[22px]", children: oe })
464
+ }
465
+ )
466
+ }
467
+ ),
468
+ /* @__PURE__ */ t(
469
+ M,
470
+ {
471
+ content: "Remover arquivo",
472
+ trigger: /* @__PURE__ */ t(
473
+ "button",
474
+ {
475
+ type: "button",
476
+ className: "ml-auto inline-flex h-[36px] w-[36px] items-center justify-center rounded-full bg-surface-muted text-fg transition hover:bg-red-50 hover:text-red-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-500 disabled:opacity-60",
477
+ onClick: () => Fe(e),
478
+ disabled: u,
479
+ "aria-label": `Remover ${e.name}`,
480
+ children: /* @__PURE__ */ t(Ae, { className: "size-[20px]", "aria-hidden": !0 })
481
+ }
482
+ )
483
+ }
484
+ )
485
+ ] })
486
+ ] }) }) });
487
+ return /* @__PURE__ */ n("div", { className: "flex flex-col gap-md", children: [
488
+ ne && /* @__PURE__ */ t(
489
+ Ye,
490
+ {
491
+ open: q !== null,
492
+ onOpenChange: (e) => !e && P(null),
493
+ title: "Remover arquivo",
494
+ body: /* @__PURE__ */ n("p", { className: "text-base leading-[1.4] text-fg-muted", children: [
495
+ "O arquivo ",
496
+ q?.name,
497
+ " será removido desta solicitação. Você poderá anexar um novo arquivo. Deseja continuar?"
498
+ ] }),
499
+ secondaryAction: /* @__PURE__ */ t(z, { variant: "secondary", size: "md", label: "Cancelar", onClick: () => P(null) }),
500
+ primaryAction: /* @__PURE__ */ t(z, { variant: "destructive", size: "md", label: "Confirmar", onClick: Ie })
501
+ }
502
+ ),
503
+ Ge(),
504
+ i === "box" ? Ke() : Ve(),
505
+ p.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-md rounded-xl bg-surface-muted p-md", children: [
506
+ /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center justify-between gap-x-md gap-y-sm p-sm", children: [
507
+ I && T.length > 0 ? /* @__PURE__ */ t(
508
+ De,
509
+ {
510
+ id: `${s}-selecionar-todos`,
511
+ label: "Selecionar todos",
512
+ checked: je ? !0 : k.length > 0 ? "indeterminate" : !1,
513
+ onCheckedChange: (e) => H(e ? new Set(T.map((o) => o.id)) : /* @__PURE__ */ new Set()),
514
+ disabled: u
515
+ }
516
+ ) : null,
517
+ /* @__PURE__ */ n("div", { className: "ml-auto flex min-w-0 flex-wrap items-center justify-end gap-md", children: [
518
+ /* @__PURE__ */ t("p", { className: "min-w-0 truncate text-right text-sm text-fg-muted", children: !p.some((e) => e.status === "uploading") && X > 0 ? /* @__PURE__ */ n(y, { children: [
519
+ "Você subiu",
520
+ " ",
521
+ /* @__PURE__ */ n("span", { className: "font-medium text-fg", children: [
522
+ X,
523
+ " ",
524
+ X === 1 ? "arquivo" : "arquivos"
525
+ ] })
526
+ ] }) : "Enviando arquivos…" }),
527
+ I && k.length > 0 ? /* @__PURE__ */ t(
528
+ z,
529
+ {
530
+ label: `Remover selecionados (${k.length})`,
531
+ leftIcon: "Trash",
532
+ variant: "destructive",
533
+ size: "sm",
534
+ onClick: Ue,
535
+ disabled: u
536
+ }
537
+ ) : null
538
+ ] })
539
+ ] }),
540
+ /* @__PURE__ */ t("ul", { className: "flex flex-col overflow-hidden rounded-2xl border border-line bg-surface", children: p.map((e, o) => /* @__PURE__ */ n("li", { children: [
541
+ o > 0 && /* @__PURE__ */ t("div", { className: "mx-xl border-t border-line-subtle" }),
542
+ He(e)
543
+ ] }, e.id)) })
544
+ ] })
545
+ ] });
546
+ };
547
+ export {
548
+ Ct as FileUpload,
549
+ Nt as FileUploaded,
550
+ oe as iaIcon
551
+ };
552
+ //# sourceMappingURL=fileUpload.js.map