xertica-ui 2.5.3 → 2.6.0

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 (583) hide show
  1. package/CHANGELOG.md +687 -664
  2. package/README.md +482 -482
  3. package/assets/xertica-logo.svg +37 -37
  4. package/assets/xertica-x-logo.svg +20 -20
  5. package/bin/cli.ts +1293 -1256
  6. package/bin/generate-tokens.ts +256 -262
  7. package/bin/language-config.test.ts +32 -0
  8. package/bin/language-config.ts +384 -359
  9. package/components/Introduction.mdx +121 -121
  10. package/components/assistant/code-block/CodeBlock.tsx +7 -6
  11. package/components/assistant/code-block/code-block.mdx +38 -38
  12. package/components/assistant/code-block/code-block.test.tsx +2 -1
  13. package/components/assistant/formatted-document/FormattedDocument.tsx +3 -0
  14. package/components/assistant/formatted-document/formatted-document.mdx +31 -31
  15. package/components/assistant/formatted-document/formatted-document.test.tsx +5 -4
  16. package/components/assistant/markdown-message/MarkdownMessage.tsx +1 -1
  17. package/components/assistant/markdown-message/markdown-message.mdx +44 -44
  18. package/components/assistant/modern-chat-input/modern-chat-input.mdx +71 -71
  19. package/components/assistant/modern-chat-input/modern-chat-input.test.tsx +3 -2
  20. package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +1 -1
  21. package/components/assistant/xertica-assistant/types.ts +3 -2
  22. package/components/assistant/xertica-assistant/use-assistant.ts +5 -4
  23. package/components/assistant/xertica-assistant/xertica-assistant.mdx +66 -66
  24. package/components/assistant/xertica-assistant/xertica-assistant.test.tsx +2 -1
  25. package/components/blocks/card-patterns/card-patterns.mdx +123 -123
  26. package/components/brand/branding/branding.mdx +27 -27
  27. package/components/brand/language-selector/language-selector.mdx +126 -126
  28. package/components/brand/theme-toggle/theme-toggle.mdx +47 -47
  29. package/components/brand/theme-toggle/theme-toggle.test.tsx +6 -2
  30. package/components/brand/xertica-logo/xertica-logo.mdx +56 -56
  31. package/components/brand/xertica-orbe/xertica-orbe.mdx +38 -38
  32. package/components/brand/xertica-provider/XerticaProvider.tsx +112 -112
  33. package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
  34. package/components/brand/xertica-provider/xertica-provider.test.tsx +25 -13
  35. package/components/brand/xertica-xlogo/xertica-xlogo.mdx +55 -55
  36. package/components/examples/DrawingMapExample.tsx +1 -4
  37. package/components/layout/header/header.mdx +117 -117
  38. package/components/layout/header/header.test.tsx +2 -1
  39. package/components/layout/sidebar/sidebar.mdx +99 -99
  40. package/components/layout/sidebar/sidebar.stories.tsx +1033 -1033
  41. package/components/layout/sidebar/sidebar.test.tsx +2 -1
  42. package/components/layout/sidebar/sidebar.tsx +1509 -1506
  43. package/components/media/audio-player/AudioPlayer.mdx +67 -67
  44. package/components/media/audio-player/AudioPlayer.test.tsx +2 -1
  45. package/components/media/floating-media-wrapper.mdx +74 -74
  46. package/components/media/video-player/VideoPlayer.mdx +102 -102
  47. package/components/media/video-player/VideoPlayer.test.tsx +3 -2
  48. package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +188 -188
  49. package/components/pages/forgot-password-page/forgot-password-page.mdx +60 -60
  50. package/components/pages/forgot-password-page/forgot-password-page.test.tsx +2 -1
  51. package/components/pages/home-content/HomeContent.tsx +119 -119
  52. package/components/pages/home-content/home-content.mdx +62 -62
  53. package/components/pages/home-page/HomePage.stories.tsx +8 -15
  54. package/components/pages/home-page/home-page.mdx +53 -53
  55. package/components/pages/home-page/home-page.test.tsx +2 -1
  56. package/components/pages/login-page/LoginPage.mdx +31 -31
  57. package/components/pages/login-page/LoginPage.tsx +218 -218
  58. package/components/pages/login-page/login-page.test.tsx +2 -1
  59. package/components/pages/reset-password-page/ResetPasswordPage.tsx +243 -243
  60. package/components/pages/reset-password-page/reset-password-page.mdx +63 -63
  61. package/components/pages/template-content/TemplateContent.tsx +1353 -1353
  62. package/components/pages/template-content/template-content.mdx +61 -61
  63. package/components/pages/template-page/TemplatePage.stories.tsx +32 -32
  64. package/components/pages/template-page/template-page.mdx +53 -53
  65. package/components/pages/template-page/template-page.test.tsx +2 -1
  66. package/components/pages/verify-email-page/VerifyEmailPage.tsx +206 -206
  67. package/components/pages/verify-email-page/verify-email-page.mdx +55 -55
  68. package/components/public-api-smoke.test.tsx +10 -6
  69. package/components/shared/assistant-utils.ts +3 -2
  70. package/components/shared/navigation.ts +2 -2
  71. package/components/ui/accordion/accordion.mdx +29 -29
  72. package/components/ui/alert/alert.mdx +29 -29
  73. package/components/ui/alert-dialog/alert-dialog.mdx +26 -26
  74. package/components/ui/aspect-ratio/aspect-ratio.mdx +25 -25
  75. package/components/ui/assistant-chart/AssistantChart.tsx +8 -2
  76. package/components/ui/assistant-chart/assistant-chart.mdx +25 -25
  77. package/components/ui/avatar/avatar.mdx +26 -26
  78. package/components/ui/badge/badge.mdx +28 -28
  79. package/components/ui/breadcrumb/breadcrumb.mdx +26 -26
  80. package/components/ui/button/button.mdx +29 -29
  81. package/components/ui/calendar/calendar.mdx +26 -26
  82. package/components/ui/card/card.mdx +26 -26
  83. package/components/ui/carousel/carousel.mdx +26 -26
  84. package/components/ui/chart/chart.mdx +26 -26
  85. package/components/ui/chart/chart.test.tsx +178 -178
  86. package/components/ui/chart/chart.tsx +2252 -2245
  87. package/components/ui/checkbox/checkbox.mdx +26 -26
  88. package/components/ui/collapsible/collapsible.mdx +25 -25
  89. package/components/ui/command/command.mdx +26 -26
  90. package/components/ui/context-menu/context-menu.mdx +26 -26
  91. package/components/ui/dialog/dialog.mdx +26 -26
  92. package/components/ui/drawer/drawer.mdx +26 -26
  93. package/components/ui/dropdown-menu/dropdown-menu.mdx +26 -26
  94. package/components/ui/empty/empty.mdx +26 -26
  95. package/components/ui/file-upload/file-upload.mdx +26 -26
  96. package/components/ui/form/form.mdx +20 -20
  97. package/components/ui/google-maps-loader/google-maps-loader.mdx +68 -68
  98. package/components/ui/hover-card/hover-card.mdx +26 -26
  99. package/components/ui/input/input.mdx +29 -29
  100. package/components/ui/input-otp/input-otp.mdx +26 -26
  101. package/components/ui/label/label.mdx +25 -25
  102. package/components/ui/map/map.mdx +26 -26
  103. package/components/ui/map/map.tsx +6 -1
  104. package/components/ui/menubar/menubar.mdx +26 -26
  105. package/components/ui/navigation-menu/navigation-menu.mdx +26 -26
  106. package/components/ui/notification-badge/notification-badge.mdx +26 -26
  107. package/components/ui/page-header/page-header.mdx +44 -44
  108. package/components/ui/pagination/pagination.mdx +26 -26
  109. package/components/ui/popover/popover.mdx +26 -26
  110. package/components/ui/progress/progress.mdx +25 -25
  111. package/components/ui/radio-group/radio-group.mdx +26 -26
  112. package/components/ui/rating/rating.mdx +26 -26
  113. package/components/ui/resizable/resizable.mdx +26 -26
  114. package/components/ui/resizable/resizable.tsx +13 -8
  115. package/components/ui/rich-text-editor/rich-text-editor.mdx +47 -47
  116. package/components/ui/route-map/route-map.mdx +26 -26
  117. package/components/ui/scroll-area/scroll-area.mdx +25 -25
  118. package/components/ui/search/search.mdx +27 -27
  119. package/components/ui/select/select.mdx +26 -26
  120. package/components/ui/separator/separator.mdx +25 -25
  121. package/components/ui/sheet/sheet.mdx +26 -26
  122. package/components/ui/simple-map/simple-map.mdx +25 -25
  123. package/components/ui/skeleton/skeleton.mdx +25 -25
  124. package/components/ui/slider/slider.mdx +26 -26
  125. package/components/ui/sonner/sonner.mdx +26 -26
  126. package/components/ui/stats-card/stats-card.mdx +26 -26
  127. package/components/ui/stats-card/stats-card.stories.tsx +117 -117
  128. package/components/ui/stats-card/stats-card.tsx +109 -109
  129. package/components/ui/stepper/stepper.mdx +26 -26
  130. package/components/ui/switch/switch.mdx +25 -25
  131. package/components/ui/table/table.mdx +27 -27
  132. package/components/ui/tabs/tabs.mdx +26 -26
  133. package/components/ui/textarea/textarea.mdx +25 -25
  134. package/components/ui/timeline/timeline.mdx +26 -26
  135. package/components/ui/toggle/toggle.mdx +26 -26
  136. package/components/ui/toggle-group/toggle-group.mdx +26 -26
  137. package/components/ui/tooltip/tooltip.mdx +26 -26
  138. package/components/ui/tree-view/tree-view.mdx +26 -26
  139. package/components.json +511 -511
  140. package/contexts/BrandColorsContext.tsx +282 -282
  141. package/contexts/i18n-singleton.test.tsx +57 -0
  142. package/contexts/theme-data.ts +391 -391
  143. package/dist/{AssistantChart-DNdwuS-t.js → AssistantChart-BMNSA_Pk.js} +4 -4
  144. package/dist/{AssistantChart-COGiOV-g.cjs → AssistantChart-BzM7plyc.cjs} +31 -21
  145. package/dist/{AssistantChart-CWX1OWNM.js → AssistantChart-C842evTi.js} +31 -21
  146. package/dist/{AssistantChart-BW9JK6jw.cjs → AssistantChart-CVF2uh37.cjs} +4 -4
  147. package/dist/{AssistantChart-BZTPJ5dP.cjs → AssistantChart-JooMdVQU.cjs} +5 -5
  148. package/dist/{AssistantChart-DMJJ_Amf.js → AssistantChart-KHS-tp-L.js} +5 -5
  149. package/dist/{BrandColorsContext-BwY-b6M4.cjs → BrandColorsContext-B4_81eas.cjs} +2 -2
  150. package/dist/{BrandColorsContext-BMRJ04Wf.js → BrandColorsContext-DbK5LnQ_.js} +2 -2
  151. package/dist/{CodeBlock-CjeFavqV.js → CodeBlock-DiKO8ocT.js} +11 -11
  152. package/dist/{CodeBlock-CV6dtsTM.cjs → CodeBlock-ZYThr7Kn.cjs} +12 -9
  153. package/dist/{XerticaXLogo-mqjoBiLI.js → LanguageSelector-CmTj3lWq.js} +85 -82
  154. package/dist/{XerticaXLogo-BX3ueACh.js → LanguageSelector-DxW6o7bt.js} +81 -81
  155. package/dist/{XerticaXLogo-uQgwns_E.cjs → LanguageSelector-Sw73qvWV.cjs} +84 -81
  156. package/dist/{ThemeContext-BgclCB35.js → ThemeContext-BGeh_Kdr.js} +290 -212
  157. package/dist/{ThemeContext-BblcjQup.cjs → ThemeContext-D50irx5T.cjs} +291 -205
  158. package/dist/{VerifyEmailPage-C_Zk6Gen.cjs → VerifyEmailPage-B6bOrybJ.cjs} +17 -17
  159. package/dist/{VerifyEmailPage-B31mCrMc.js → VerifyEmailPage-BRE5Fz59.js} +8 -8
  160. package/dist/{VerifyEmailPage-Cyl55sJb.js → VerifyEmailPage-BcCluouh.js} +135 -65
  161. package/dist/VerifyEmailPage-Bx1sr0uQ.cjs +3298 -0
  162. package/dist/{VerifyEmailPage-Bci0bA-P.js → VerifyEmailPage-DUYyXCX9.js} +3 -3
  163. package/dist/VerifyEmailPage-DXXMHbzq.js +3289 -0
  164. package/dist/{VerifyEmailPage-u_Dn7t1U.cjs → VerifyEmailPage-DpYtFk35.cjs} +21 -21
  165. package/dist/{VerifyEmailPage-X14vhdyl.js → VerifyEmailPage-NXKWW3Dk.js} +12 -12
  166. package/dist/{VerifyEmailPage-C7KiYXrm.cjs → VerifyEmailPage-QrCz4Wqr.cjs} +11 -11
  167. package/dist/{VerifyEmailPage-Bv8Ah_TK.cjs → VerifyEmailPage-ZmQra0Wi.cjs} +144 -74
  168. package/dist/{XerticaProvider-BErr83Bg.js → XerticaProvider-BF3q_myt.js} +5 -4
  169. package/dist/{XerticaProvider-CeS5G_n5.cjs → XerticaProvider-C_JSOz1U.cjs} +2 -2
  170. package/dist/{XerticaProvider-CwOkHxiT.cjs → XerticaProvider-D5zjrqZq.cjs} +5 -4
  171. package/dist/{XerticaProvider-ra2NciRq.js → XerticaProvider-KTGl4Cn1.js} +2 -2
  172. package/dist/{alert-dialog-DqlRW_An.js → alert-dialog-BrpwXKwS.js} +3 -3
  173. package/dist/{alert-dialog-DhwPioBa.cjs → alert-dialog-CZU1Zase.cjs} +3 -3
  174. package/dist/{alert-dialog-KpoabzJb.js → alert-dialog-ClRoLH7l.js} +40 -56
  175. package/dist/{alert-dialog-B4M3vQKS.cjs → alert-dialog-DBBqvU-V.cjs} +53 -38
  176. package/dist/assistant.cjs.js +2 -2
  177. package/dist/assistant.es.js +2 -2
  178. package/dist/brand.cjs.js +6 -6
  179. package/dist/brand.es.js +2 -2
  180. package/dist/cli.js +63 -21
  181. package/dist/components/assistant/code-block/CodeBlock.d.ts +2 -1
  182. package/dist/components/assistant/formatted-document/FormattedDocument.d.ts +2 -1
  183. package/dist/components/assistant/markdown-message/MarkdownMessage.d.ts +2 -1
  184. package/dist/components/assistant/modern-chat-input/ModernChatInput.d.ts +2 -1
  185. package/dist/components/assistant/xertica-assistant/parts/AssistantCollapsedView.d.ts +2 -1
  186. package/dist/components/assistant/xertica-assistant/parts/AssistantConversationList.d.ts +2 -1
  187. package/dist/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.d.ts +2 -1
  188. package/dist/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.d.ts +2 -1
  189. package/dist/components/assistant/xertica-assistant/parts/AssistantHeader.d.ts +2 -1
  190. package/dist/components/assistant/xertica-assistant/parts/AssistantMessageBubble.d.ts +2 -1
  191. package/dist/components/assistant/xertica-assistant/parts/AssistantTabBar.d.ts +2 -1
  192. package/dist/components/assistant/xertica-assistant/parts/AssistantTypingIndicator.d.ts +2 -1
  193. package/dist/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.d.ts +2 -1
  194. package/dist/components/assistant/xertica-assistant/types.d.ts +3 -2
  195. package/dist/components/assistant/xertica-assistant/use-assistant.d.ts +1 -1
  196. package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +2 -1
  197. package/dist/components/blocks/card-patterns/ActivityCard.d.ts +1 -1
  198. package/dist/components/blocks/card-patterns/ActivityCardSkeleton.d.ts +1 -1
  199. package/dist/components/blocks/card-patterns/FeatureCard.d.ts +1 -1
  200. package/dist/components/blocks/card-patterns/FeatureCardSkeleton.d.ts +1 -1
  201. package/dist/components/blocks/card-patterns/NotificationCard.d.ts +1 -1
  202. package/dist/components/blocks/card-patterns/NotificationCardSkeleton.d.ts +1 -1
  203. package/dist/components/blocks/card-patterns/ProfileCard.d.ts +1 -1
  204. package/dist/components/blocks/card-patterns/ProfileCardSkeleton.d.ts +1 -1
  205. package/dist/components/blocks/card-patterns/ProjectCard.d.ts +1 -1
  206. package/dist/components/blocks/card-patterns/ProjectCardSkeleton.d.ts +1 -1
  207. package/dist/components/blocks/card-patterns/QuickActionCard.d.ts +1 -1
  208. package/dist/components/blocks/card-patterns/QuickActionCardSkeleton.d.ts +1 -1
  209. package/dist/components/brand/language-selector/LanguageSelector.d.ts +2 -1
  210. package/dist/components/brand/theme-toggle/ThemeToggle.d.ts +2 -1
  211. package/dist/components/brand/xertica-logo/XerticaLogo.d.ts +2 -1
  212. package/dist/components/brand/xertica-orbe/XerticaOrbe.d.ts +2 -1
  213. package/dist/components/brand/xertica-provider/XerticaProvider.d.ts +1 -1
  214. package/dist/components/brand/xertica-xlogo/XerticaXLogo.d.ts +2 -1
  215. package/dist/components/examples/DrawingMapExample.d.ts +2 -1
  216. package/dist/components/examples/FilterableMapExample.d.ts +1 -1
  217. package/dist/components/examples/MapShowcase.d.ts +2 -1
  218. package/dist/components/examples/SimpleFilterableMap.d.ts +2 -1
  219. package/dist/components/figma/ImageWithFallback.d.ts +1 -1
  220. package/dist/components/layout/header/header.d.ts +1 -1
  221. package/dist/components/layout/sidebar/sidebar.d.ts +25 -13
  222. package/dist/components/media/FloatingMediaWrapper.d.ts +1 -1
  223. package/dist/components/media/audio-player/AudioPlayer.d.ts +2 -1
  224. package/dist/components/media/video-player/VideoPlayer.d.ts +2 -1
  225. package/dist/components/pages/forgot-password-page/ForgotPasswordPage.d.ts +2 -1
  226. package/dist/components/pages/home-content/HomeContent.d.ts +2 -1
  227. package/dist/components/pages/home-page/HomePage.d.ts +2 -1
  228. package/dist/components/pages/login-page/LoginPage.d.ts +2 -1
  229. package/dist/components/pages/reset-password-page/ResetPasswordPage.d.ts +2 -1
  230. package/dist/components/pages/template-content/TemplateContent.d.ts +2 -1
  231. package/dist/components/pages/template-page/TemplatePage.d.ts +2 -1
  232. package/dist/components/pages/verify-email-page/VerifyEmailPage.d.ts +2 -1
  233. package/dist/components/shared/CustomTooltipContent.d.ts +1 -1
  234. package/dist/components/shared/assistant-utils.d.ts +3 -2
  235. package/dist/components/shared/error-boundary.d.ts +4 -4
  236. package/dist/components/shared/error-fallbacks.d.ts +4 -3
  237. package/dist/components/shared/navigation.d.ts +6 -2
  238. package/dist/components/ui/accordion/accordion.d.ts +4 -4
  239. package/dist/components/ui/alert/alert.d.ts +3 -3
  240. package/dist/components/ui/alert-dialog/alert-dialog.d.ts +10 -10
  241. package/dist/components/ui/aspect-ratio/aspect-ratio.d.ts +1 -1
  242. package/dist/components/ui/assistant-chart/AssistantChart.d.ts +4 -3
  243. package/dist/components/ui/avatar/avatar.d.ts +3 -3
  244. package/dist/components/ui/badge/badge.d.ts +1 -1
  245. package/dist/components/ui/breadcrumb/breadcrumb.d.ts +7 -7
  246. package/dist/components/ui/calendar/calendar.d.ts +2 -2
  247. package/dist/components/ui/card/card.d.ts +7 -7
  248. package/dist/components/ui/carousel/carousel.d.ts +5 -5
  249. package/dist/components/ui/chart/chart.d.ts +16 -16
  250. package/dist/components/ui/collapsible/collapsible.d.ts +3 -3
  251. package/dist/components/ui/command/command.d.ts +9 -9
  252. package/dist/components/ui/context-menu/context-menu.d.ts +15 -15
  253. package/dist/components/ui/dialog/dialog.d.ts +9 -9
  254. package/dist/components/ui/drawer/drawer.d.ts +10 -10
  255. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +15 -15
  256. package/dist/components/ui/form/form.d.ts +7 -7
  257. package/dist/components/ui/google-maps-loader/google-maps-loader.d.ts +3 -3
  258. package/dist/components/ui/hover-card/hover-card.d.ts +3 -3
  259. package/dist/components/ui/input-otp/input-otp.d.ts +4 -4
  260. package/dist/components/ui/label/label.d.ts +1 -1
  261. package/dist/components/ui/menubar/menubar.d.ts +16 -16
  262. package/dist/components/ui/navigation-menu/navigation-menu.d.ts +8 -8
  263. package/dist/components/ui/page-header/page-header.d.ts +3 -3
  264. package/dist/components/ui/pagination/pagination.d.ts +7 -7
  265. package/dist/components/ui/popover/popover.d.ts +4 -4
  266. package/dist/components/ui/progress/progress.d.ts +1 -1
  267. package/dist/components/ui/resizable/resizable.d.ts +11 -7
  268. package/dist/components/ui/rich-text-editor/rich-text-editor.d.ts +1 -1
  269. package/dist/components/ui/scroll-area/scroll-area.d.ts +2 -2
  270. package/dist/components/ui/separator/separator.d.ts +1 -1
  271. package/dist/components/ui/sheet/sheet.d.ts +10 -10
  272. package/dist/components/ui/skeleton/skeleton.d.ts +1 -1
  273. package/dist/components/ui/sonner/sonner.d.ts +2 -1
  274. package/dist/components/ui/stats-card/stats-card-skeleton.d.ts +1 -1
  275. package/dist/components/ui/table/table.d.ts +8 -8
  276. package/dist/components/ui/tabs/tabs.d.ts +4 -4
  277. package/dist/components/ui/tooltip/tooltip.d.ts +4 -4
  278. package/dist/contexts/ApiKeyContext.d.ts +2 -2
  279. package/dist/contexts/AssistenteContext.d.ts +1 -1
  280. package/dist/contexts/AuthContext.d.ts +1 -1
  281. package/dist/contexts/LanguageContext.d.ts +2 -2
  282. package/dist/contexts/LayoutContext.d.ts +2 -2
  283. package/dist/contexts/ThemeContext.d.ts +1 -1
  284. package/dist/features/assistant/hooks/useAssistantConfig.d.ts +1 -1
  285. package/dist/features/home/hooks/useDashboardStats.d.ts +1 -1
  286. package/dist/features/home/hooks/useFeatureCards.d.ts +1 -1
  287. package/dist/features/home/hooks/useTeamMembers.d.ts +1 -1
  288. package/dist/{google-maps-loader-BCe58h9D.js → google-maps-loader-BOug999f.js} +0 -4
  289. package/dist/{google-maps-loader-casMyxlo.cjs → google-maps-loader-DfeBRI8Q.cjs} +0 -5
  290. package/dist/hooks.cjs.js +2 -2
  291. package/dist/hooks.es.js +2 -2
  292. package/dist/{index-9GWd0qxq.cjs → index-BQjx1Mdf.cjs} +1 -1
  293. package/dist/index-Bei5DzAL.js +6 -0
  294. package/dist/index.cjs.js +15 -15
  295. package/dist/index.es.js +11 -11
  296. package/dist/layout.cjs.js +1 -1
  297. package/dist/layout.es.js +1 -1
  298. package/dist/pages.cjs.js +1 -1
  299. package/dist/pages.es.js +1 -1
  300. package/dist/{rich-text-editor-B2CKz7nx.cjs → rich-text-editor-BuqSu718.cjs} +68 -3
  301. package/dist/{rich-text-editor-DloeW0wc.js → rich-text-editor-CV8FtA_l.js} +66 -4
  302. package/dist/{sidebar-CLmIjgNd.cjs → sidebar-BGJ0j567.cjs} +84 -67
  303. package/dist/{sidebar-Duermn32.js → sidebar-BI6mZlC8.js} +81 -64
  304. package/dist/{sidebar-BS1p2V7t.cjs → sidebar-BtmotOg-.cjs} +367 -9
  305. package/dist/{sidebar-QwCoeoZ_.js → sidebar-D3EgGVxF.js} +1 -1
  306. package/dist/{sidebar-CQn_rwxP.cjs → sidebar-DDTqMGnR.cjs} +4 -4
  307. package/dist/{sidebar-3XyzjVBw.js → sidebar-I7EXyf5D.js} +364 -6
  308. package/dist/ui.cjs.js +4 -4
  309. package/dist/ui.es.js +4 -4
  310. package/dist/{xertica-assistant-B687qEPU.js → xertica-assistant-CJVnvMqU.js} +17 -8
  311. package/dist/{xertica-assistant-sOHwTgIP.cjs → xertica-assistant-CKPtc1z5.cjs} +19 -10
  312. package/dist/{xertica-assistant-QFUnv5I2.cjs → xertica-assistant-DER0brPQ.cjs} +6 -5
  313. package/dist/{xertica-assistant-CyikE3N_.js → xertica-assistant-DQCjpk5M.js} +4 -3
  314. package/dist/{xertica-assistant-B1NaSFFj.js → xertica-assistant-Dk-9AJzw.js} +6 -5
  315. package/dist/{xertica-assistant-CIaUlbIt.cjs → xertica-assistant-DxhIKvuY.cjs} +8 -7
  316. package/dist/xertica-ui.css +2 -2
  317. package/docs/components/audio-player.md +1 -1
  318. package/docs/components/sidebar.md +331 -331
  319. package/docs/components/stats-card.md +138 -138
  320. package/docs/components/toggle.md +12 -0
  321. package/docs/doc-audit.md +35 -229
  322. package/docs/i18n.md +31 -10
  323. package/docs/llms.md +6 -4
  324. package/llms-compact.txt +444 -444
  325. package/llms-full.txt +12144 -12144
  326. package/llms.txt +187 -187
  327. package/package.json +223 -219
  328. package/scripts/a11y-audit.mjs +162 -162
  329. package/scripts/fix-stories.cjs +19 -19
  330. package/styles/globals.css +0 -1
  331. package/styles/xertica/base.css +8 -0
  332. package/styles/xertica/tokens.css +240 -240
  333. package/templates/.env.example +2 -2
  334. package/templates/.prettierignore +4 -4
  335. package/templates/.prettierrc +10 -10
  336. package/templates/guidelines/Guidelines.md +865 -865
  337. package/templates/index.html +13 -13
  338. package/templates/package.json +69 -69
  339. package/templates/src/app/components/AuthGuard.tsx +11 -0
  340. package/templates/src/features/auth/ui/AuthPageShell.tsx +32 -32
  341. package/templates/src/features/home/ui/HomeContent.tsx +116 -116
  342. package/templates/src/features/settings/index.ts +2 -0
  343. package/templates/src/features/settings/ui/SettingsContent.tsx +134 -0
  344. package/templates/src/features/template/ui/TemplateContent.tsx +1321 -1321
  345. package/templates/src/i18n.ts +36 -13
  346. package/templates/src/locales/en/pages/settings.json +15 -0
  347. package/templates/src/locales/es/pages/settings.json +15 -0
  348. package/templates/src/locales/pt-BR/pages/settings.json +15 -0
  349. package/templates/src/pages/SettingsPage.tsx +28 -0
  350. package/templates/src/shared/config/navigation.ts +2 -2
  351. package/templates/src/styles/xertica/tokens.css +240 -240
  352. package/templates/vite.config.d.ts +2 -2
  353. package/templates/vite.config.js +20 -20
  354. package/utils/gemini.ts +2 -2
  355. package/dist/AssistantChart-9w31gdAb.cjs +0 -3363
  356. package/dist/AssistantChart-BAudAfne.cjs +0 -3591
  357. package/dist/AssistantChart-BAx9VQvb.cjs +0 -3374
  358. package/dist/AssistantChart-BP8upjMk.js +0 -3565
  359. package/dist/AssistantChart-BXU1ACnh.js +0 -3489
  360. package/dist/AssistantChart-CVko2A1W.js +0 -3348
  361. package/dist/AssistantChart-CVzmmhx4.js +0 -3337
  362. package/dist/AssistantChart-CeU2dIb6.js +0 -3469
  363. package/dist/AssistantChart-D0A1FPYt.cjs +0 -3515
  364. package/dist/AssistantChart-DO5UuX4J.cjs +0 -3495
  365. package/dist/AudioPlayer-1ypwE2Wh.cjs +0 -936
  366. package/dist/AudioPlayer-BJ2IuRQW.cjs +0 -1275
  367. package/dist/AudioPlayer-BWDW6TN9.cjs +0 -1279
  368. package/dist/AudioPlayer-CM962GEh.js +0 -1280
  369. package/dist/AudioPlayer-CbZId7cj.cjs +0 -998
  370. package/dist/AudioPlayer-DU8zt8-z.js +0 -999
  371. package/dist/AudioPlayer-DuKXrCfy.js +0 -937
  372. package/dist/AudioPlayer-Xxma6_-H.js +0 -1276
  373. package/dist/BrandColorsContext-DLVJgtmH.js +0 -666
  374. package/dist/BrandColorsContext-DZT7JjeD.js +0 -659
  375. package/dist/BrandColorsContext-GUyFmkX0.cjs +0 -665
  376. package/dist/BrandColorsContext-awnBCmC4.cjs +0 -666
  377. package/dist/CodeBlock-C2ZUXt8V.js +0 -219
  378. package/dist/CodeBlock-C5oYnLQp.cjs +0 -218
  379. package/dist/CodeBlock-DuxdtN-l.js +0 -219
  380. package/dist/CodeBlock-POVYONvC.cjs +0 -218
  381. package/dist/CustomTooltipContent-BT6brkVJ.cjs +0 -49
  382. package/dist/CustomTooltipContent-CfOfikhq.js +0 -33
  383. package/dist/CustomTooltipContent-DHjkY0ww.js +0 -40
  384. package/dist/CustomTooltipContent-c_K-DWRr.cjs +0 -56
  385. package/dist/FeatureCard-9GhnlgL3.js +0 -336
  386. package/dist/FeatureCard-Bcb3Zi54.js +0 -302
  387. package/dist/FeatureCard-Cfs6Ishq.js +0 -485
  388. package/dist/FeatureCard-CkPd2psQ.cjs +0 -301
  389. package/dist/FeatureCard-Dkp-xmzM.cjs +0 -335
  390. package/dist/FeatureCard-ie3L8Fpr.cjs +0 -484
  391. package/dist/FeatureCardSkeleton-CAgu8stE.js +0 -27
  392. package/dist/FeatureCardSkeleton-mO3Bdm_V.cjs +0 -26
  393. package/dist/LanguageContext-BwhwC3G2.js +0 -657
  394. package/dist/LanguageContext-DvUt5jBg.cjs +0 -656
  395. package/dist/LayoutContext-BDmcZfMH.cjs +0 -84
  396. package/dist/LayoutContext-C4kKN9RV.cjs +0 -93
  397. package/dist/LayoutContext-CGEe1oPq.js +0 -94
  398. package/dist/LayoutContext-CwT5KLiW.cjs +0 -104
  399. package/dist/LayoutContext-DVLCsoQn.js +0 -105
  400. package/dist/LayoutContext-dbQvdC4O.js +0 -85
  401. package/dist/ThemeContext-BbBNoFTG.js +0 -735
  402. package/dist/ThemeContext-Bo-W2WZH.js +0 -1856
  403. package/dist/ThemeContext-CP3a0jxy.cjs +0 -1855
  404. package/dist/ThemeContext-Cmr8Ex8H.cjs +0 -734
  405. package/dist/ThemeContext-CpqYShLq.cjs +0 -324
  406. package/dist/ThemeContext-D3LzacmG.js +0 -188
  407. package/dist/ThemeContext-DQUOeziy.cjs +0 -1855
  408. package/dist/ThemeContext-Du2nE1PL.js +0 -325
  409. package/dist/ThemeContext-GeEBTJ3q.cjs +0 -1621
  410. package/dist/ThemeContext-JyLK9B1o.js +0 -1622
  411. package/dist/ThemeContext-RTy1m2Uq.js +0 -82
  412. package/dist/ThemeContext-U4dEYc6C.cjs +0 -187
  413. package/dist/ThemeContext-bSzuOit2.cjs +0 -81
  414. package/dist/ThemeContext-ept8jhXI.js +0 -1856
  415. package/dist/VerifyEmailPage-BE-L9mB7.js +0 -2828
  416. package/dist/VerifyEmailPage-BIBOKV7Z.js +0 -3214
  417. package/dist/VerifyEmailPage-BJjAMUTW.js +0 -3223
  418. package/dist/VerifyEmailPage-BRSP-Pwt.cjs +0 -3196
  419. package/dist/VerifyEmailPage-Bae2cBXT.cjs +0 -2827
  420. package/dist/VerifyEmailPage-BiRm7Nh4.cjs +0 -3213
  421. package/dist/VerifyEmailPage-Bvfv8HVQ.js +0 -3214
  422. package/dist/VerifyEmailPage-CR7kb5df.cjs +0 -2827
  423. package/dist/VerifyEmailPage-C_ihbcth.js +0 -2828
  424. package/dist/VerifyEmailPage-CbgjOF0v.js +0 -2828
  425. package/dist/VerifyEmailPage-CdYPSJoO.js +0 -2828
  426. package/dist/VerifyEmailPage-CkBYfsNy.cjs +0 -3232
  427. package/dist/VerifyEmailPage-D-FRj5TU.cjs +0 -3213
  428. package/dist/VerifyEmailPage-DF2ilhum.cjs +0 -3210
  429. package/dist/VerifyEmailPage-DMBh4NM9.cjs +0 -2827
  430. package/dist/VerifyEmailPage-DTtFfC-J.js +0 -3197
  431. package/dist/VerifyEmailPage-Dt7zgA4w.cjs +0 -2827
  432. package/dist/VerifyEmailPage-EhudUdqF.js +0 -3211
  433. package/dist/VerifyEmailPage-RrUApqBN.js +0 -3214
  434. package/dist/VerifyEmailPage-VoMI7MYH.cjs +0 -3213
  435. package/dist/VerifyEmailPage-hdB8JQGv.cjs +0 -3213
  436. package/dist/VerifyEmailPage-vYHbYK3q.js +0 -3214
  437. package/dist/XerticaOrbe-BCUVSPPB.cjs +0 -1924
  438. package/dist/XerticaOrbe-BGIB1CTK.js +0 -1355
  439. package/dist/XerticaOrbe-By8eEvR-.js +0 -1925
  440. package/dist/XerticaOrbe-FWGjBj0U.cjs +0 -1354
  441. package/dist/XerticaProvider-AChwphCO.cjs +0 -48
  442. package/dist/XerticaProvider-AbWlr7Af.cjs +0 -48
  443. package/dist/XerticaProvider-B8CaV7xu.cjs +0 -39
  444. package/dist/XerticaProvider-BITjgC5p.js +0 -39
  445. package/dist/XerticaProvider-BSyFrmC0.js +0 -49
  446. package/dist/XerticaProvider-By8q3Roe.cjs +0 -38
  447. package/dist/XerticaProvider-CUYJZc32.js +0 -49
  448. package/dist/XerticaProvider-CW9hpCdF.cjs +0 -39
  449. package/dist/XerticaProvider-CWgby5mY.js +0 -49
  450. package/dist/XerticaProvider-CWs6EwNa.js +0 -49
  451. package/dist/XerticaProvider-CiNKjMx1.cjs +0 -48
  452. package/dist/XerticaProvider-CjQAQPcn.cjs +0 -48
  453. package/dist/XerticaProvider-D5lLumH-.js +0 -49
  454. package/dist/XerticaProvider-DQtvJU7m.js +0 -40
  455. package/dist/XerticaProvider-DUOJg9iX.js +0 -49
  456. package/dist/XerticaProvider-Dl_b72_l.cjs +0 -51
  457. package/dist/XerticaProvider-qQUDop71.cjs +0 -48
  458. package/dist/XerticaProvider-siSt9uG2.js +0 -40
  459. package/dist/XerticaXLogo-8TTzBjHw.cjs +0 -251
  460. package/dist/XerticaXLogo-B2svDGZh.cjs +0 -251
  461. package/dist/XerticaXLogo-BWaag64t.js +0 -252
  462. package/dist/XerticaXLogo-CFuIlYFH.js +0 -252
  463. package/dist/XerticaXLogo-CU-U-GP4.cjs +0 -251
  464. package/dist/XerticaXLogo-ChryA6xj.js +0 -252
  465. package/dist/XerticaXLogo-CowGv7BC.js +0 -252
  466. package/dist/XerticaXLogo-CziKMQil.cjs +0 -242
  467. package/dist/XerticaXLogo-D8jf0SNv.cjs +0 -214
  468. package/dist/XerticaXLogo-DHz5SugF.js +0 -252
  469. package/dist/XerticaXLogo-DTee_y8X.cjs +0 -251
  470. package/dist/XerticaXLogo-DfUvz-lD.js +0 -243
  471. package/dist/XerticaXLogo-DzXKZBtG.js +0 -231
  472. package/dist/XerticaXLogo-fAJMy3H4.js +0 -215
  473. package/dist/XerticaXLogo-kslQ8Tk_.cjs +0 -251
  474. package/dist/XerticaXLogo-xWbElCZj.cjs +0 -230
  475. package/dist/alert-dialog-iDe5VE5o.js +0 -842
  476. package/dist/alert-dialog-yckpaOpy.cjs +0 -865
  477. package/dist/avatar-Cq5_E8r9.cjs +0 -78
  478. package/dist/avatar-CuYu2MKt.cjs +0 -72
  479. package/dist/avatar-Cxyofu1H.js +0 -56
  480. package/dist/avatar-DSBfJMRJ.js +0 -62
  481. package/dist/breadcrumb-CVzzzqfo.js +0 -103
  482. package/dist/breadcrumb-DIJ0X3Ot.js +0 -96
  483. package/dist/breadcrumb-DjSxkjlQ.cjs +0 -95
  484. package/dist/breadcrumb-DnDlQFg2.cjs +0 -102
  485. package/dist/button-0CXwCRTm.cjs +0 -85
  486. package/dist/button-Bnv9SvYK.cjs +0 -79
  487. package/dist/button-C6uvh0rV.js +0 -63
  488. package/dist/button-qkz7Icqf.js +0 -69
  489. package/dist/card-B8-Gl5DL.js +0 -73
  490. package/dist/card-Bv_c57KU.cjs +0 -72
  491. package/dist/card-DJTsYhLL.cjs +0 -89
  492. package/dist/card-fi8zAN-I.js +0 -90
  493. package/dist/dropdown-menu-B_uEXNc4.cjs +0 -220
  494. package/dist/dropdown-menu-CFuCssWA.js +0 -204
  495. package/dist/dropdown-menu-Ze1YZFyc.cjs +0 -247
  496. package/dist/dropdown-menu-nc_Lvg-u.js +0 -231
  497. package/dist/google-maps-loader-BVoVhUwA.js +0 -316
  498. package/dist/google-maps-loader-BqsYL48U.cjs +0 -285
  499. package/dist/google-maps-loader-DjJaYhV6.cjs +0 -316
  500. package/dist/google-maps-loader-t2IlYBzw.js +0 -286
  501. package/dist/index-B7A523O_.js +0 -8
  502. package/dist/index-BabBx2pa.js +0 -6
  503. package/dist/index-CkTUgOwX.js +0 -8
  504. package/dist/index-D3RLKRAs.cjs +0 -7
  505. package/dist/index-DmHhnb7a.cjs +0 -7
  506. package/dist/index.umd.js +0 -13712
  507. package/dist/input-CNFHVKvo.cjs +0 -145
  508. package/dist/input-CPl84zAx.cjs +0 -151
  509. package/dist/input-C_UiS2Py.cjs +0 -152
  510. package/dist/input-D-6IsAca.js +0 -133
  511. package/dist/input-cc-PTD4R.js +0 -123
  512. package/dist/input-wPYg0d0P.js +0 -127
  513. package/dist/progress-BLwqortq.cjs +0 -105
  514. package/dist/progress-Cs9i4DPx.js +0 -81
  515. package/dist/progress-D9mtsf6j.js +0 -89
  516. package/dist/progress-DDeuWPZw.cjs +0 -97
  517. package/dist/rich-text-editor-1UW3Y2JK.js +0 -2891
  518. package/dist/rich-text-editor-BM-LPpTh.js +0 -2902
  519. package/dist/rich-text-editor-BmsjY03B.js +0 -2949
  520. package/dist/rich-text-editor-BrdC5evx.js +0 -2244
  521. package/dist/rich-text-editor-CyggTOLQ.cjs +0 -2908
  522. package/dist/rich-text-editor-DbV-S7Fi.cjs +0 -2261
  523. package/dist/rich-text-editor-DoCkKhzk.cjs +0 -2919
  524. package/dist/rich-text-editor-DqLICivI.js +0 -2832
  525. package/dist/rich-text-editor-DxO1Hz3a.cjs +0 -2903
  526. package/dist/rich-text-editor-GS2kpTAK.cjs +0 -2966
  527. package/dist/routes.d.ts +0 -10
  528. package/dist/select-Cmb8zF7w.cjs +0 -156
  529. package/dist/select-CprSNX0z.js +0 -139
  530. package/dist/select-DT7Zjn42.cjs +0 -162
  531. package/dist/select-En8DkoaQ.js +0 -145
  532. package/dist/sidebar-B3EYhli0.cjs +0 -800
  533. package/dist/sidebar-B4ZWaMrE.js +0 -792
  534. package/dist/sidebar-B9NR0lCe.cjs +0 -800
  535. package/dist/sidebar-BcJ6LxvX.cjs +0 -733
  536. package/dist/sidebar-BvF5I2Ue.cjs +0 -800
  537. package/dist/sidebar-C5B_LHek.cjs +0 -795
  538. package/dist/sidebar-CA6_ek3f.js +0 -801
  539. package/dist/sidebar-CRMiBtAi.js +0 -801
  540. package/dist/sidebar-CVUGHOS_.cjs +0 -756
  541. package/dist/sidebar-CZ2mWaMM.cjs +0 -800
  542. package/dist/sidebar-CmvwjnVb.js +0 -757
  543. package/dist/sidebar-CplprZpM.js +0 -801
  544. package/dist/sidebar-DyYvgyBj.cjs +0 -795
  545. package/dist/sidebar-Dz7bd3zP.js +0 -796
  546. package/dist/sidebar-KIS0C2JH.js +0 -801
  547. package/dist/sidebar-OTO_up7Z.js +0 -801
  548. package/dist/sidebar-WoKvFWCN.js +0 -717
  549. package/dist/sidebar-zowjejT2.cjs +0 -800
  550. package/dist/skeleton-4zoHiFJ_.cjs +0 -83
  551. package/dist/skeleton-C4bHqUBf.js +0 -84
  552. package/dist/slider-C0JKA9k3.js +0 -56
  553. package/dist/slider-CPmwzm_3.cjs +0 -73
  554. package/dist/slider-DcJharR9.cjs +0 -73
  555. package/dist/slider-Pay3fka2.js +0 -56
  556. package/dist/sonner-DeUIj0Zg.cjs +0 -63
  557. package/dist/sonner-g9RIfi35.js +0 -47
  558. package/dist/tooltip-CNtsL5cB.cjs +0 -71
  559. package/dist/tooltip-CTyZCD8h.js +0 -55
  560. package/dist/tooltip-CwgSdy3h.cjs +0 -67
  561. package/dist/tooltip-D-OrYnKO.js +0 -51
  562. package/dist/use-audio-player-BJFV24XW.js +0 -188
  563. package/dist/use-audio-player-Bkh23vQ3.js +0 -177
  564. package/dist/use-audio-player-Dn1NR9xN.cjs +0 -176
  565. package/dist/use-audio-player-DyVYlOnR.cjs +0 -187
  566. package/dist/use-mobile-BB4M_4Ru.cjs +0 -47
  567. package/dist/use-mobile-CLu9nqGL.js +0 -31
  568. package/dist/use-mobile-CNwiBNxu.js +0 -33
  569. package/dist/use-mobile-Dlf74ufz.cjs +0 -49
  570. package/dist/xertica-assistant-B1IaHXnB.cjs +0 -1894
  571. package/dist/xertica-assistant-BMqdyRVi.js +0 -2082
  572. package/dist/xertica-assistant-BbgzsgsG.js +0 -2164
  573. package/dist/xertica-assistant-Bj3vBCq_.cjs +0 -2081
  574. package/dist/xertica-assistant-CfBCo21g.js +0 -2148
  575. package/dist/xertica-assistant-DIM_Do1k.js +0 -1866
  576. package/dist/xertica-assistant-DPsESB6t.js +0 -1878
  577. package/dist/xertica-assistant-DrsRwla1.cjs +0 -2147
  578. package/dist/xertica-assistant-Qp3ydksa.cjs +0 -1882
  579. package/dist/xertica-assistant-d2qs2Vd9.cjs +0 -2163
  580. package/dist/xertica-assistant-gnCJdcZY.js +0 -1866
  581. package/dist/xertica-assistant-yyrR0JKl.cjs +0 -1882
  582. package/styles/xertica/app-overrides/scrollbar.css +0 -33
  583. package/dist/{XerticaXLogo-qBPhwK3g.cjs → LanguageSelector-1cINLJ23.cjs} +80 -80
@@ -1,3211 +0,0 @@
1
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import React__default, { useState, createContext, useContext, useMemo, useRef, useCallback, useEffect } from "react";
3
- import { B as Button, c as cn } from "./button-C6uvh0rV.js";
4
- import { I as Input, S as ScrollArea } from "./input-wPYg0d0P.js";
5
- import { I as ImageWithFallback, L as Label, P as PageHeader, M as Map, C as Checkbox, S as Separator, T as Tabs, p as TabsList, q as TabsTrigger, o as TabsContent, n as Switch, R as RadioGroup, m as RadioGroupItem, A as AlertDialog, j as AlertDialogTrigger, c as AlertDialogContent, f as AlertDialogHeader, i as AlertDialogTitle, d as AlertDialogDescription, e as AlertDialogFooter, b as AlertDialogCancel, a as AlertDialogAction } from "./alert-dialog-KpoabzJb.js";
6
- import { L as LanguageSelector, X as XerticaLogo } from "./XerticaXLogo-DHz5SugF.js";
7
- import { ArrowLeft, Lock, FileText, Home, CheckCircle2, AlertCircle, Coffee, ShoppingBag, Landmark, Hotel, Utensils, MapPin, Filter, X, MousePointer2, Circle, Square, Hexagon, Undo, Trash2, Save, Check, Pencil, Layers, Settings, Users, Mail, Phone, Search, User, Calendar, Bell, FileEdit, ArrowRightLeft, Clock, Plus, Archive, Map as Map$1 } from "lucide-react";
8
- import { useNavigate, Link, useLocation } from "react-router-dom";
9
- import { H as Header, S as Sidebar } from "./sidebar-CA6_ek3f.js";
10
- import { C as Card, e as CardHeader, f as CardTitle, b as CardContent, d as CardFooter, c as CardDescription, S as Skeleton } from "./skeleton-C4bHqUBf.js";
11
- import { B as Badge, P as Progress } from "./progress-Cs9i4DPx.js";
12
- import { a as useOptionalLayout } from "./LayoutContext-CGEe1oPq.js";
13
- import { u as useLanguage } from "./ThemeContext-Du2nE1PL.js";
14
- import { useQuery } from "@tanstack/react-query";
15
- import { useTranslation } from "react-i18next";
16
- import { F as FeatureCardSkeleton } from "./FeatureCardSkeleton-CAgu8stE.js";
17
- import { X as XerticaAssistant, g as gerarResposta } from "./xertica-assistant-BbgzsgsG.js";
18
- import i18n from "i18next";
19
- import { k as Dialog, n as DialogContent, q as DialogHeader, t as DialogTitle, o as DialogDescription, A as Alert, b as AlertTitle, a as AlertDescription, V as Textarea, T as Table, Q as TableHeader, U as TableRow, O as TableHead, K as TableBody, M as TableCell, u as DialogTrigger, p as DialogFooter } from "./rich-text-editor-1UW3Y2JK.js";
20
- import { S as Select, h as SelectTrigger, i as SelectValue, a as SelectContent, c as SelectItem } from "./select-CprSNX0z.js";
21
- import { S as Slider } from "./slider-Pay3fka2.js";
22
- import { toast } from "sonner";
23
- import { create } from "zustand";
24
- function ForgotPasswordPage() {
25
- const navigate = useNavigate();
26
- const [email, setEmail] = useState("");
27
- const [isLoading, setIsLoading] = useState(false);
28
- const handleSubmit = async (e) => {
29
- e.preventDefault();
30
- setIsLoading(true);
31
- await new Promise((resolve) => setTimeout(resolve, 1500));
32
- navigate("/verify-email", { state: { email } });
33
- setIsLoading(false);
34
- };
35
- const handleSocialLogin = (_provider) => {
36
- };
37
- return /* @__PURE__ */ jsxs("div", { className: "min-h-screen flex", children: [
38
- /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
39
- /* @__PURE__ */ jsx(
40
- ImageWithFallback,
41
- {
42
- src: "https://images.unsplash.com/photo-1557804506-669a67965ba0?w=1200&h=800&fit=crop&auto=format",
43
- alt: "Segurança e tecnologia",
44
- className: "absolute inset-0 w-full h-full object-cover"
45
- }
46
- ),
47
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
48
- ] }),
49
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center justify-center px-4 sm:px-6 lg:px-8 lg:flex-none lg:w-1/2 relative bg-muted", children: [
50
- /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsx(LanguageSelector, { variant: "minimal", showIcon: false }) }),
51
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
52
- /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm space-y-6 relative z-10", children: [
53
- /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
54
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(
55
- XerticaLogo,
56
- {
57
- className: "h-12 w-auto text-primary dark:text-foreground",
58
- variant: "theme"
59
- }
60
- ) }),
61
- /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: "Recuperar senha" }),
62
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: "Digite seu e-mail e enviaremos as instruções para redefinir sua senha" })
63
- ] }),
64
- /* @__PURE__ */ jsxs("form", { className: "space-y-6", onSubmit: handleSubmit, children: [
65
- /* @__PURE__ */ jsxs("div", { className: "form-group space-y-2", children: [
66
- /* @__PURE__ */ jsx(Label, { htmlFor: "email", className: "form-label", children: "E-mail" }),
67
- /* @__PURE__ */ jsx(
68
- Input,
69
- {
70
- id: "email",
71
- name: "email",
72
- type: "email",
73
- required: true,
74
- className: "w-full",
75
- placeholder: "seu@email.com",
76
- value: email,
77
- onChange: (e) => setEmail(e.target.value)
78
- }
79
- )
80
- ] }),
81
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
82
- /* @__PURE__ */ jsx(Button, { type: "submit", className: "w-full", disabled: isLoading, children: isLoading ? "Enviando..." : "Enviar instruções" }),
83
- /* @__PURE__ */ jsxs(
84
- Button,
85
- {
86
- type: "button",
87
- onClick: () => navigate("/login"),
88
- variant: "outline",
89
- className: "w-full text-muted-foreground hover:text-foreground",
90
- children: [
91
- /* @__PURE__ */ jsx(ArrowLeft, { className: "w-4 h-4 mr-2" }),
92
- "Voltar para o login"
93
- ]
94
- }
95
- )
96
- ] })
97
- ] }),
98
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
99
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsx("div", { className: "w-full border-t border-border" }) }),
100
- /* @__PURE__ */ jsx("div", { className: "relative flex justify-center text-sm", children: /* @__PURE__ */ jsx("span", { className: "bg-muted px-2 text-muted-foreground", children: "ou continue com" }) })
101
- ] }),
102
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
103
- /* @__PURE__ */ jsxs(
104
- Button,
105
- {
106
- type: "button",
107
- variant: "outline",
108
- className: "w-full justify-center",
109
- onClick: () => handleSocialLogin(),
110
- children: [
111
- /* @__PURE__ */ jsxs("svg", { className: "w-5 h-5 mr-2", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
112
- /* @__PURE__ */ jsx(
113
- "path",
114
- {
115
- fill: "#EA4335",
116
- d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"
117
- }
118
- ),
119
- /* @__PURE__ */ jsx(
120
- "path",
121
- {
122
- fill: "#4285F4",
123
- d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"
124
- }
125
- ),
126
- /* @__PURE__ */ jsx(
127
- "path",
128
- {
129
- fill: "#FBBC05",
130
- d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"
131
- }
132
- ),
133
- /* @__PURE__ */ jsx(
134
- "path",
135
- {
136
- fill: "#34A853",
137
- d: "M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"
138
- }
139
- ),
140
- /* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
141
- ] }),
142
- /* @__PURE__ */ jsx("span", { children: "Entrar com Google" })
143
- ]
144
- }
145
- ),
146
- /* @__PURE__ */ jsxs(
147
- Button,
148
- {
149
- type: "button",
150
- variant: "outline",
151
- className: "w-full justify-center",
152
- onClick: () => handleSocialLogin(),
153
- children: [
154
- /* @__PURE__ */ jsx(Lock, { className: "w-5 h-5 mr-2 text-[var(--chart-4)]" }),
155
- /* @__PURE__ */ jsx("span", { children: "Entrar com MT Login" })
156
- ]
157
- }
158
- ),
159
- /* @__PURE__ */ jsx(
160
- Button,
161
- {
162
- type: "button",
163
- variant: "outline",
164
- className: "w-full justify-center font-normal",
165
- onClick: () => handleSocialLogin(),
166
- children: /* @__PURE__ */ jsxs("span", { children: [
167
- "Entrar com ",
168
- /* @__PURE__ */ jsx("strong", { className: "font-semibold", children: "gov.br" })
169
- ] })
170
- }
171
- )
172
- ] })
173
- ] })
174
- ] })
175
- ] });
176
- }
177
- const SIDEBAR_COLLAPSED_WIDTH = 80;
178
- const t = (key, options) => i18n.t(key, options);
179
- const MOCK_TEAM_MEMBERS = [
180
- { id: "1", name: "Ana Silva", email: "ana.silva@example.com", role: "Developer", status: "active" },
181
- { id: "2", name: "Bruno Costa", email: "bruno.costa@example.com", role: "Designer", status: "active" },
182
- { id: "3", name: "Carla Oliveira", email: "carla.oliveira@example.com", role: "Manager", status: "away" },
183
- { id: "4", name: "Diego Santos", email: "diego.santos@example.com", role: "Analyst", status: "inactive" }
184
- ];
185
- async function fetchTeamMembers() {
186
- await new Promise((resolve) => setTimeout(resolve, 250));
187
- return MOCK_TEAM_MEMBERS;
188
- }
189
- async function fetchFeatureCards() {
190
- await new Promise((resolve) => setTimeout(resolve, 100));
191
- return [
192
- {
193
- id: "template-cli",
194
- title: t("home.templateCliTitle"),
195
- description: t("home.templateCliDescription"),
196
- badge: t("home.templateClibadge"),
197
- href: "/template"
198
- }
199
- ];
200
- }
201
- function useTeamMembers() {
202
- const { language } = useLanguage();
203
- return useQuery({
204
- // Language is part of the key so each locale has its own cache slot.
205
- queryKey: ["home", "team-members", language],
206
- queryFn: fetchTeamMembers,
207
- staleTime: 2 * 60 * 1e3
208
- // 2 min
209
- });
210
- }
211
- function useFeatureCards() {
212
- const { language } = useLanguage();
213
- return useQuery({
214
- // Language is part of the key so each locale has its own cache slot.
215
- queryKey: ["home", "feature-cards", language],
216
- queryFn: fetchFeatureCards,
217
- staleTime: 10 * 60 * 1e3
218
- // 10 min — feature list is fairly static
219
- });
220
- }
221
- const useDashboardStore = create((set) => ({
222
- // Filters
223
- activeTab: "overview",
224
- setActiveTab: (tab) => set({ activeTab: tab }),
225
- // UI toggles
226
- statsExpanded: true,
227
- toggleStats: () => set((state) => ({ statsExpanded: !state.statsExpanded })),
228
- // Showcase controls
229
- progress: 45,
230
- setProgress: (value) => set({ progress: value }),
231
- sliderValue: [50],
232
- setSliderValue: (value) => set({ sliderValue: value }),
233
- switchEnabled: false,
234
- toggleSwitch: () => set((state) => ({ switchEnabled: !state.switchEnabled }))
235
- }));
236
- function isDev() {
237
- return false;
238
- }
239
- function SectionErrorFallback({ error, reset }) {
240
- return /* @__PURE__ */ jsxs(
241
- "div",
242
- {
243
- role: "alert",
244
- className: "flex flex-col items-center justify-center gap-3 p-6 rounded-[var(--radius-lg)] border border-destructive/30 bg-destructive/5 text-center",
245
- children: [
246
- /* @__PURE__ */ jsxs(
247
- "svg",
248
- {
249
- width: "24",
250
- height: "24",
251
- viewBox: "0 0 24 24",
252
- fill: "none",
253
- stroke: "currentColor",
254
- strokeWidth: "2",
255
- strokeLinecap: "round",
256
- strokeLinejoin: "round",
257
- className: "text-destructive shrink-0",
258
- "aria-hidden": "true",
259
- children: [
260
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
261
- /* @__PURE__ */ jsx("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
262
- /* @__PURE__ */ jsx("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
263
- ]
264
- }
265
- ),
266
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
267
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Não foi possível carregar este conteúdo" }),
268
- isDev()
269
- ] }),
270
- /* @__PURE__ */ jsx(
271
- "button",
272
- {
273
- onClick: reset,
274
- className: "inline-flex items-center px-3 py-1.5 text-xs rounded-[var(--radius-button)] border border-border bg-background hover:bg-accent hover:text-accent-foreground transition-colors",
275
- children: "Tentar novamente"
276
- }
277
- )
278
- ]
279
- }
280
- );
281
- }
282
- class ErrorBoundary extends React__default.Component {
283
- constructor(props) {
284
- super(props);
285
- this.state = { hasError: false, error: null };
286
- this.reset = this.reset.bind(this);
287
- }
288
- static getDerivedStateFromError(error) {
289
- return { hasError: true, error };
290
- }
291
- componentDidCatch(error, info) {
292
- var _a, _b;
293
- (_b = (_a = this.props).onError) == null ? void 0 : _b.call(_a, error, info);
294
- }
295
- componentDidUpdate(prevProps) {
296
- if (!this.state.hasError) return;
297
- const { resetKeys } = this.props;
298
- if (!(resetKeys == null ? void 0 : resetKeys.length)) return;
299
- const prevKeys = prevProps.resetKeys ?? [];
300
- const changed = resetKeys.some((key, i) => key !== prevKeys[i]);
301
- if (changed) this.reset();
302
- }
303
- reset() {
304
- this.setState({ hasError: false, error: null });
305
- }
306
- render() {
307
- const { hasError, error } = this.state;
308
- const { children, fallback: Fallback } = this.props;
309
- if (hasError && error) {
310
- return /* @__PURE__ */ jsx(Fallback, { error, reset: this.reset });
311
- }
312
- return children;
313
- }
314
- }
315
- function SectionErrorBoundary({ children, onError, resetKeys }) {
316
- return /* @__PURE__ */ jsx(ErrorBoundary, { fallback: SectionErrorFallback, onError, resetKeys, children });
317
- }
318
- function HomeContent() {
319
- const { t: t2 } = useTranslation();
320
- const layout = useOptionalLayout();
321
- const sidebarExpanded = (layout == null ? void 0 : layout.sidebarExpanded) ?? false;
322
- const sidebarWidth = (layout == null ? void 0 : layout.sidebarWidth) ?? 256;
323
- const navigate = useNavigate();
324
- const { data: featureCards = [], isLoading } = useFeatureCards();
325
- return /* @__PURE__ */ jsxs(
326
- "div",
327
- {
328
- style: {
329
- paddingLeft: sidebarExpanded ? `${sidebarWidth}px` : SIDEBAR_COLLAPSED_WIDTH
330
- },
331
- className: "flex-1 flex flex-col overflow-hidden transition-all duration-300",
332
- children: [
333
- /* @__PURE__ */ jsx(
334
- Header,
335
- {
336
- showThemeToggle: true,
337
- showLanguageSelector: true,
338
- breadcrumbs: [
339
- { label: t2("nav.designSystem"), href: "/home" },
340
- { label: t2("nav.home") }
341
- ],
342
- renderLink: (href, props) => /* @__PURE__ */ jsx(Link, { to: href, ...props })
343
- }
344
- ),
345
- /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-hidden bg-muted", children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsx("div", { className: "p-2 sm:p-4 md:p-6", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto space-y-8", children: [
346
- /* @__PURE__ */ jsx(
347
- PageHeader,
348
- {
349
- title: t2("home.welcome"),
350
- subtitle: t2("home.subtitle")
351
- }
352
- ),
353
- /* @__PURE__ */ jsx(SectionErrorBoundary, { children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
354
- /* @__PURE__ */ jsx(FeatureCardSkeleton, { showAction: true }),
355
- /* @__PURE__ */ jsx(FeatureCardSkeleton, { showAction: true }),
356
- /* @__PURE__ */ jsx(FeatureCardSkeleton, { showAction: true })
357
- ] }) : featureCards.map((card) => /* @__PURE__ */ jsxs(
358
- Card,
359
- {
360
- className: "hover:shadow-xl transition-shadow duration-200 flex flex-col h-full",
361
- children: [
362
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
363
- /* @__PURE__ */ jsx("div", { className: "p-2 bg-[var(--chart-2)]/20 rounded-[var(--radius)]", children: /* @__PURE__ */ jsx(FileText, { className: "w-6 h-6 text-[var(--chart-2)]" }) }),
364
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
365
- /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: t2(`home.${card.id.replace(/-/g, "")}Title`, { defaultValue: card.title }) }),
366
- card.badge && /* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-xs", children: t2(`home.${card.id.replace(/-/g, "")}badge`, { defaultValue: card.badge }) })
367
- ] })
368
- ] }) }),
369
- /* @__PURE__ */ jsx(CardContent, { className: "flex-1", children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t2(`home.${card.id.replace(/-/g, "")}Description`, { defaultValue: card.description }) }) }),
370
- /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(
371
- Button,
372
- {
373
- variant: "outline",
374
- className: "w-full",
375
- onClick: () => navigate(card.href),
376
- children: t2("common.view")
377
- }
378
- ) })
379
- ]
380
- },
381
- card.id
382
- )) }) })
383
- ] }) }) }) })
384
- ]
385
- }
386
- );
387
- }
388
- const routes = [
389
- { path: "/home", label: "Home", icon: Home },
390
- { path: "/template", label: "Template", icon: FileText }
391
- ];
392
- const AuthContext = createContext(null);
393
- function useAuth() {
394
- const ctx = useContext(AuthContext);
395
- if (!ctx) throw new Error("useAuth must be used within <AuthProvider>");
396
- return ctx;
397
- }
398
- async function fetchAssistantConfig() {
399
- await new Promise((resolve) => setTimeout(resolve, 150));
400
- const t2 = (key) => i18n.t(key);
401
- return {
402
- suggestions: [
403
- { id: "1", text: t2("assistant.suggestions.whatCanIAsk") },
404
- { id: "2", text: t2("assistant.suggestions.whatDoYouDo") },
405
- { id: "3", text: t2("assistant.suggestions.whichProjects") },
406
- { id: "4", text: t2("assistant.suggestions.nextProject") }
407
- ],
408
- richSuggestions: [
409
- { id: "rich-1", text: t2("assistant.richSuggestions.viewPerformance") },
410
- { id: "rich-2", text: t2("assistant.richSuggestions.generateReport") },
411
- { id: "rich-3", text: t2("assistant.richSuggestions.createDocument") },
412
- { id: "rich-4", text: t2("assistant.richSuggestions.generatePodcast") }
413
- ],
414
- feedbackOptions: [
415
- t2("assistant.feedback.notWhatIWanted"),
416
- t2("assistant.feedback.incorrectInfo"),
417
- t2("assistant.feedback.incompleteAnswer")
418
- ]
419
- };
420
- }
421
- function getMockRichSuggestions() {
422
- return [
423
- { id: "rich-1", text: i18n.t("assistant.richSuggestions.viewPerformance") },
424
- { id: "rich-2", text: i18n.t("assistant.richSuggestions.generateReport") },
425
- { id: "rich-3", text: i18n.t("assistant.richSuggestions.createDocument") },
426
- { id: "rich-4", text: i18n.t("assistant.richSuggestions.generatePodcast") }
427
- ];
428
- }
429
- function getMockFeedbackOptions() {
430
- return [
431
- i18n.t("assistant.feedback.notWhatIWanted"),
432
- i18n.t("assistant.feedback.incorrectInfo"),
433
- i18n.t("assistant.feedback.incompleteAnswer")
434
- ];
435
- }
436
- function useAssistantConfig() {
437
- const { language } = useLanguage();
438
- return useQuery({
439
- // Language is part of the key so each locale has its own cache slot.
440
- queryKey: ["assistant", "config", language],
441
- queryFn: fetchAssistantConfig,
442
- staleTime: 30 * 60 * 1e3
443
- // 30 min — config rarely changes
444
- });
445
- }
446
- function HomePage() {
447
- const { user, logout } = useAuth();
448
- const layout = useOptionalLayout();
449
- const [localSidebarExpanded, setLocalSidebarExpanded] = React__default.useState(false);
450
- const [localAssistantExpanded, setLocalAssistantExpanded] = React__default.useState(false);
451
- const sidebarExpanded = (layout == null ? void 0 : layout.sidebarExpanded) ?? localSidebarExpanded;
452
- const sidebarWidth = (layout == null ? void 0 : layout.sidebarWidth) ?? 280;
453
- const assistenteExpanded = (layout == null ? void 0 : layout.assistenteExpanded) ?? localAssistantExpanded;
454
- const toggleSidebar = (layout == null ? void 0 : layout.toggleSidebar) ?? (() => setLocalSidebarExpanded((value) => !value));
455
- const toggleAssistente = (layout == null ? void 0 : layout.toggleAssistente) ?? (() => setLocalAssistantExpanded((value) => !value));
456
- const location = useLocation();
457
- const navigate = useNavigate();
458
- const { data: assistantConfig } = useAssistantConfig();
459
- return /* @__PURE__ */ jsxs("div", { className: "h-screen flex bg-muted overflow-hidden relative", children: [
460
- /* @__PURE__ */ jsx(
461
- Sidebar,
462
- {
463
- expanded: sidebarExpanded,
464
- width: sidebarWidth,
465
- onToggle: toggleSidebar,
466
- user: {
467
- ...user,
468
- name: "Ariel Santos",
469
- avatar: "https://github.com/shadcn.png"
470
- },
471
- onLogout: logout,
472
- onSettingsClick: () => navigate("/settings"),
473
- location,
474
- navigate,
475
- routes
476
- }
477
- ),
478
- /* @__PURE__ */ jsx(HomeContent, {}),
479
- /* @__PURE__ */ jsx(
480
- XerticaAssistant,
481
- {
482
- isExpanded: assistenteExpanded,
483
- onToggle: toggleAssistente,
484
- defaultTab: "chat",
485
- demoMode: true,
486
- responseGenerator: gerarResposta,
487
- suggestions: assistantConfig == null ? void 0 : assistantConfig.suggestions,
488
- richSuggestions: (assistantConfig == null ? void 0 : assistantConfig.richSuggestions) ?? getMockRichSuggestions(),
489
- feedbackOptions: (assistantConfig == null ? void 0 : assistantConfig.feedbackOptions) ?? getMockFeedbackOptions(),
490
- onEvaluation: () => {
491
- }
492
- }
493
- )
494
- ] });
495
- }
496
- function LoginPage({ onLogin }) {
497
- const navigate = useNavigate();
498
- const { t: t2 } = useTranslation();
499
- const [email, setEmail] = useState("");
500
- const [password, setPassword] = useState("");
501
- const [isLoading, setIsLoading] = useState(false);
502
- const [error, setError] = useState("");
503
- const handleSubmit = async (e) => {
504
- e.preventDefault();
505
- setError("");
506
- setIsLoading(true);
507
- await new Promise((resolve) => setTimeout(resolve, 1e3));
508
- const success = onLogin(email, password);
509
- if (!success) {
510
- setError(t2("login.errorFillFields"));
511
- }
512
- setIsLoading(false);
513
- };
514
- const handleSocialLogin = (_provider) => {
515
- onLogin("social@user.com", "social-auth");
516
- };
517
- return /* @__PURE__ */ jsxs("div", { className: "min-h-screen flex", children: [
518
- /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
519
- /* @__PURE__ */ jsx(
520
- ImageWithFallback,
521
- {
522
- src: "https://images.unsplash.com/photo-1551434678-e076c223a692?w=1200&h=800&fit=crop&auto=format",
523
- alt: t2("login.heroImageAlt"),
524
- className: "absolute inset-0 w-full h-full object-cover"
525
- }
526
- ),
527
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
528
- ] }),
529
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center justify-center px-4 sm:px-6 lg:px-8 lg:flex-none lg:w-1/2 relative bg-muted", children: [
530
- /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsx(LanguageSelector, { variant: "minimal", showIcon: false }) }),
531
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
532
- /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm space-y-6 relative z-10", children: [
533
- /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
534
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(
535
- XerticaLogo,
536
- {
537
- className: "h-12 w-auto text-primary dark:text-foreground",
538
- variant: "theme"
539
- }
540
- ) }),
541
- /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: t2("login.heading") })
542
- ] }),
543
- /* @__PURE__ */ jsxs("form", { className: "space-y-6", onSubmit: handleSubmit, children: [
544
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
545
- /* @__PURE__ */ jsx(Label, { htmlFor: "email", children: t2("login.emailLabel") }),
546
- /* @__PURE__ */ jsx(
547
- Input,
548
- {
549
- id: "email",
550
- name: "email",
551
- type: "email",
552
- required: true,
553
- className: "w-full",
554
- placeholder: t2("login.emailPlaceholder"),
555
- value: email,
556
- onChange: (e) => setEmail(e.target.value)
557
- }
558
- )
559
- ] }),
560
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
561
- /* @__PURE__ */ jsx(Label, { htmlFor: "password", children: t2("login.passwordLabel") }),
562
- /* @__PURE__ */ jsx(
563
- Input,
564
- {
565
- id: "password",
566
- name: "password",
567
- type: "password",
568
- required: true,
569
- className: "w-full",
570
- placeholder: "••••••••",
571
- value: password,
572
- onChange: (e) => setPassword(e.target.value)
573
- }
574
- )
575
- ] }),
576
- error && /* @__PURE__ */ jsx("div", { className: "text-destructive text-sm text-center", children: error }),
577
- /* @__PURE__ */ jsx(Button, { type: "submit", className: "w-full", disabled: isLoading, children: isLoading ? t2("login.submitting") : t2("login.submit") }),
578
- /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx(
579
- "button",
580
- {
581
- type: "button",
582
- onClick: () => navigate("/forgot-password"),
583
- className: "text-sm text-primary hover:opacity-80 transition-colors",
584
- children: t2("login.forgotPassword")
585
- }
586
- ) })
587
- ] }),
588
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
589
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsx("div", { className: "w-full border-t border-border" }) }),
590
- /* @__PURE__ */ jsx("div", { className: "relative flex justify-center text-sm", children: /* @__PURE__ */ jsx("span", { className: "bg-muted px-2 text-muted-foreground", children: t2("login.orContinueWith") }) })
591
- ] }),
592
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
593
- /* @__PURE__ */ jsxs(
594
- Button,
595
- {
596
- type: "button",
597
- variant: "outline",
598
- className: "w-full justify-center",
599
- onClick: () => handleSocialLogin(),
600
- children: [
601
- /* @__PURE__ */ jsxs("svg", { className: "w-5 h-5 mr-2", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
602
- /* @__PURE__ */ jsx(
603
- "path",
604
- {
605
- fill: "#EA4335",
606
- d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"
607
- }
608
- ),
609
- /* @__PURE__ */ jsx(
610
- "path",
611
- {
612
- fill: "#4285F4",
613
- d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"
614
- }
615
- ),
616
- /* @__PURE__ */ jsx(
617
- "path",
618
- {
619
- fill: "#FBBC05",
620
- d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"
621
- }
622
- ),
623
- /* @__PURE__ */ jsx(
624
- "path",
625
- {
626
- fill: "#34A853",
627
- d: "M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"
628
- }
629
- ),
630
- /* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
631
- ] }),
632
- /* @__PURE__ */ jsx("span", { children: t2("login.signInWithGoogle") })
633
- ]
634
- }
635
- ),
636
- /* @__PURE__ */ jsxs(
637
- Button,
638
- {
639
- type: "button",
640
- variant: "outline",
641
- className: "w-full justify-center",
642
- onClick: () => handleSocialLogin(),
643
- children: [
644
- /* @__PURE__ */ jsx(Lock, { className: "w-5 h-5 mr-2 text-[var(--chart-4)]" }),
645
- /* @__PURE__ */ jsx("span", { children: t2("login.signInWithMTLogin") })
646
- ]
647
- }
648
- ),
649
- /* @__PURE__ */ jsx(
650
- Button,
651
- {
652
- type: "button",
653
- variant: "outline",
654
- className: "w-full justify-center font-normal",
655
- onClick: () => handleSocialLogin(),
656
- children: /* @__PURE__ */ jsx("span", { children: t2("login.signInWithGovBr") })
657
- }
658
- )
659
- ] })
660
- ] })
661
- ] })
662
- ] });
663
- }
664
- function ResetPasswordPage() {
665
- const navigate = useNavigate();
666
- const { t: t2 } = useTranslation();
667
- const [password, setPassword] = useState("");
668
- const [confirmPassword, setConfirmPassword] = useState("");
669
- const [isLoading, setIsLoading] = useState(false);
670
- const [error, setError] = useState("");
671
- const [passwordStrength, setPasswordStrength] = useState(
672
- null
673
- );
674
- const checkPasswordStrength = (pwd) => {
675
- if (pwd.length === 0) {
676
- setPasswordStrength(null);
677
- return;
678
- }
679
- if (pwd.length < 6) {
680
- setPasswordStrength("weak");
681
- } else if (pwd.length < 10) {
682
- setPasswordStrength("medium");
683
- } else {
684
- setPasswordStrength("strong");
685
- }
686
- };
687
- const handlePasswordChange = (value) => {
688
- setPassword(value);
689
- checkPasswordStrength(value);
690
- setError("");
691
- };
692
- const handleSubmit = async (e) => {
693
- e.preventDefault();
694
- setError("");
695
- if (password.length < 6) {
696
- setError(t2("resetPassword.errorMinLength"));
697
- return;
698
- }
699
- if (password !== confirmPassword) {
700
- setError(t2("resetPassword.errorMismatch"));
701
- return;
702
- }
703
- setIsLoading(true);
704
- await new Promise((resolve) => setTimeout(resolve, 1500));
705
- navigate("/login", { state: { resetSuccess: true } });
706
- setIsLoading(false);
707
- };
708
- const getStrengthColor = () => {
709
- switch (passwordStrength) {
710
- case "weak":
711
- return "text-destructive";
712
- case "medium":
713
- return "text-[var(--chart-3)]";
714
- case "strong":
715
- return "text-[var(--chart-2)]";
716
- default:
717
- return "text-muted-foreground";
718
- }
719
- };
720
- const getStrengthText = () => {
721
- switch (passwordStrength) {
722
- case "weak":
723
- return t2("resetPassword.strengthWeak");
724
- case "medium":
725
- return t2("resetPassword.strengthMedium");
726
- case "strong":
727
- return t2("resetPassword.strengthStrong");
728
- default:
729
- return "";
730
- }
731
- };
732
- return /* @__PURE__ */ jsxs("div", { className: "min-h-screen flex", children: [
733
- /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
734
- /* @__PURE__ */ jsx(
735
- ImageWithFallback,
736
- {
737
- src: "https://images.unsplash.com/photo-1555949963-aa79dcee981c?w=1200&h=800&fit=crop&auto=format",
738
- alt: t2("resetPassword.heroImageAlt"),
739
- className: "absolute inset-0 w-full h-full object-cover"
740
- }
741
- ),
742
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
743
- ] }),
744
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center justify-center px-4 sm:px-6 lg:px-8 lg:flex-none lg:w-1/2 relative bg-muted", children: [
745
- /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsx(LanguageSelector, { variant: "minimal", showIcon: false }) }),
746
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
747
- /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm space-y-6 relative z-10", children: [
748
- /* @__PURE__ */ jsxs(
749
- "button",
750
- {
751
- onClick: () => navigate("/login"),
752
- className: "flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",
753
- children: [
754
- /* @__PURE__ */ jsx(ArrowLeft, { className: "w-4 h-4" }),
755
- /* @__PURE__ */ jsx("span", { className: "text-small", children: t2("resetPassword.backToLogin") })
756
- ]
757
- }
758
- ),
759
- /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
760
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(
761
- XerticaLogo,
762
- {
763
- className: "h-12 w-auto text-primary dark:text-foreground",
764
- variant: "theme"
765
- }
766
- ) }),
767
- /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: t2("resetPassword.heading") }),
768
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: t2("resetPassword.subheading") })
769
- ] }),
770
- /* @__PURE__ */ jsxs("form", { className: "space-y-6", onSubmit: handleSubmit, children: [
771
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
772
- /* @__PURE__ */ jsx(Label, { htmlFor: "password", children: t2("resetPassword.newPasswordLabel") }),
773
- /* @__PURE__ */ jsx(
774
- Input,
775
- {
776
- id: "password",
777
- name: "password",
778
- type: "password",
779
- required: true,
780
- className: "w-full",
781
- placeholder: "••••••••",
782
- value: password,
783
- onChange: (e) => handlePasswordChange(e.target.value)
784
- }
785
- ),
786
- passwordStrength && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
787
- /* @__PURE__ */ jsx("div", { className: "flex-1 h-1 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsx(
788
- "div",
789
- {
790
- className: `h-full transition-all duration-300 ${passwordStrength === "weak" ? "w-1/3 bg-destructive" : passwordStrength === "medium" ? "w-2/3 bg-[var(--chart-3)]" : "w-full bg-[var(--chart-2)]"}`
791
- }
792
- ) }),
793
- /* @__PURE__ */ jsx("span", { className: `text-small ${getStrengthColor()}`, children: getStrengthText() })
794
- ] })
795
- ] }),
796
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
797
- /* @__PURE__ */ jsx(Label, { htmlFor: "confirmPassword", children: t2("resetPassword.confirmPasswordLabel") }),
798
- /* @__PURE__ */ jsx(
799
- Input,
800
- {
801
- id: "confirmPassword",
802
- name: "confirmPassword",
803
- type: "password",
804
- required: true,
805
- className: "w-full",
806
- placeholder: "••••••••",
807
- value: confirmPassword,
808
- onChange: (e) => {
809
- setConfirmPassword(e.target.value);
810
- setError("");
811
- }
812
- }
813
- )
814
- ] }),
815
- /* @__PURE__ */ jsxs("div", { className: "bg-accent rounded-[var(--radius)] p-4 space-y-2", children: [
816
- /* @__PURE__ */ jsx("p", { className: "text-sm", children: t2("resetPassword.requirements") }),
817
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
818
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
819
- /* @__PURE__ */ jsx(
820
- CheckCircle2,
821
- {
822
- className: `w-4 h-4 ${password.length >= 6 ? "text-[var(--chart-2)]" : "text-muted-foreground"}`
823
- }
824
- ),
825
- /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: t2("resetPassword.requirementMinChars") })
826
- ] }),
827
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
828
- /* @__PURE__ */ jsx(
829
- CheckCircle2,
830
- {
831
- className: `w-4 h-4 ${password === confirmPassword && password.length > 0 ? "text-[var(--chart-2)]" : "text-muted-foreground"}`
832
- }
833
- ),
834
- /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: t2("resetPassword.requirementMatch") })
835
- ] })
836
- ] })
837
- ] }),
838
- error && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-destructive bg-destructive/10 rounded-[var(--radius)] p-3", children: [
839
- /* @__PURE__ */ jsx(AlertCircle, { className: "w-4 h-4 flex-shrink-0" }),
840
- /* @__PURE__ */ jsx("span", { className: "text-sm", children: error })
841
- ] }),
842
- /* @__PURE__ */ jsx(Button, { type: "submit", className: "w-full", disabled: isLoading, children: isLoading ? t2("resetPassword.submitting") : t2("resetPassword.submit") })
843
- ] })
844
- ] })
845
- ] })
846
- ] });
847
- }
848
- function createLucideIconSvg(iconName) {
849
- const iconPaths = {
850
- utensils: '<path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2"></path><path d="M7 2v20"></path><path d="M21 15V2v0a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7"></path>',
851
- hotel: '<path d="M18 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2Z"></path><path d="M8 6h8"></path><path d="M8 10h8"></path><path d="M8 14h8"></path><path d="M8 18h8"></path>',
852
- landmark: '<path d="m3 21 18-18"></path><path d="M9 15V6h6v9"></path><path d="M12 3v3"></path><path d="M3 15h18"></path><path d="M6 21v-6"></path><path d="M18 21v-6"></path>',
853
- shopping: '<path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z"></path><path d="M3 6h18"></path><path d="M16 10a4 4 0 0 1-8 0"></path>',
854
- coffee: '<path d="M17 8h1a4 4 0 1 1 0 8h-1"></path><path d="M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z"></path><line x1="6" x2="6" y1="2" y2="4"></line><line x1="10" x2="10" y1="2" y2="4"></line><line x1="14" x2="14" y1="2" y2="4"></line>'
855
- };
856
- const path = iconPaths[iconName] || "";
857
- return `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">${path}</svg>`;
858
- }
859
- const markerGroups = {
860
- restaurant: {
861
- id: "restaurant",
862
- name: "Restaurantes",
863
- color: "var(--destructive)",
864
- // red
865
- iconColor: "#FFFFFF",
866
- // white para contraste
867
- iconName: "utensils",
868
- icon: Utensils
869
- },
870
- hotel: {
871
- id: "hotel",
872
- name: "Hotéis",
873
- color: "var(--info)",
874
- // blue
875
- iconColor: "#FFFFFF",
876
- iconName: "hotel",
877
- icon: Hotel
878
- },
879
- landmark: {
880
- id: "landmark",
881
- name: "Pontos Turísticos",
882
- color: "var(--success)",
883
- // green
884
- iconColor: "#FFFFFF",
885
- iconName: "landmark",
886
- icon: Landmark
887
- },
888
- shopping: {
889
- id: "shopping",
890
- name: "Compras",
891
- color: "var(--warning)",
892
- // orange
893
- iconColor: "#FFFFFF",
894
- iconName: "shopping",
895
- icon: ShoppingBag
896
- },
897
- cafe: {
898
- id: "cafe",
899
- name: "Cafeterias",
900
- color: "var(--primary)",
901
- // purple
902
- iconColor: "#FFFFFF",
903
- iconName: "coffee",
904
- icon: Coffee
905
- }
906
- };
907
- const sampleLocations = [
908
- // Restaurantes
909
- {
910
- position: { lat: -23.5505, lng: -46.6333 },
911
- title: "Restaurante Italiano",
912
- info: "Melhor pizza da cidade",
913
- group: "restaurant"
914
- },
915
- {
916
- position: { lat: -23.5485, lng: -46.635 },
917
- title: "Sushi Bar",
918
- info: "Comida japonesa autêntica",
919
- group: "restaurant"
920
- },
921
- {
922
- position: { lat: -23.552, lng: -46.631 },
923
- title: "Churrascaria Premium",
924
- info: "Rodízio tradicional brasileiro",
925
- group: "restaurant"
926
- },
927
- // Hotéis
928
- {
929
- position: { lat: -23.5475, lng: -46.6361 },
930
- title: "Hotel Luxo",
931
- info: "5 estrelas - Vista panorâmica",
932
- group: "hotel"
933
- },
934
- {
935
- position: { lat: -23.553, lng: -46.634 },
936
- title: "Hotel Boutique",
937
- info: "Design moderno e aconchegante",
938
- group: "hotel"
939
- },
940
- // Pontos Turísticos
941
- {
942
- position: { lat: -23.5613, lng: -46.6563 },
943
- title: "Parque Ibirapuera",
944
- info: "Maior parque urbano da cidade",
945
- group: "landmark"
946
- },
947
- {
948
- position: { lat: -23.5558, lng: -46.6396 },
949
- title: "MASP",
950
- info: "Museu de Arte de São Paulo",
951
- group: "landmark"
952
- },
953
- {
954
- position: { lat: -23.5489, lng: -46.6388 },
955
- title: "Avenida Paulista",
956
- info: "Centro financeiro e cultural",
957
- group: "landmark"
958
- },
959
- // Shopping
960
- {
961
- position: { lat: -23.5465, lng: -46.64 },
962
- title: "Shopping Center",
963
- info: "Mais de 300 lojas",
964
- group: "shopping"
965
- },
966
- {
967
- position: { lat: -23.554, lng: -46.638 },
968
- title: "Galeria de Arte",
969
- info: "Arte contemporânea e design",
970
- group: "shopping"
971
- },
972
- // Cafeterias
973
- {
974
- position: { lat: -23.5495, lng: -46.6345 },
975
- title: "Café Artesanal",
976
- info: "Café especial e brunch",
977
- group: "cafe"
978
- },
979
- {
980
- position: { lat: -23.551, lng: -46.637 },
981
- title: "Coffee House",
982
- info: "Café gourmet e wi-fi",
983
- group: "cafe"
984
- },
985
- {
986
- position: { lat: -23.5525, lng: -46.6355 },
987
- title: "Café Cultural",
988
- info: "Livros e café",
989
- group: "cafe"
990
- }
991
- ];
992
- function FilterableMapExample({ apiKey }) {
993
- const [activeFilters, setActiveFilters] = useState(
994
- new Set(Object.keys(markerGroups))
995
- );
996
- const [showFilters, setShowFilters] = useState(true);
997
- const filteredLocations = useMemo(() => {
998
- return sampleLocations.filter((location) => activeFilters.has(location.group));
999
- }, [activeFilters]);
1000
- const toggleFilter = (groupId) => {
1001
- setActiveFilters((prev) => {
1002
- const newFilters = new Set(prev);
1003
- if (newFilters.has(groupId)) {
1004
- newFilters.delete(groupId);
1005
- } else {
1006
- newFilters.add(groupId);
1007
- }
1008
- return newFilters;
1009
- });
1010
- };
1011
- const toggleAll = () => {
1012
- if (activeFilters.size === Object.keys(markerGroups).length) {
1013
- setActiveFilters(/* @__PURE__ */ new Set());
1014
- } else {
1015
- setActiveFilters(new Set(Object.keys(markerGroups)));
1016
- }
1017
- };
1018
- const markersWithCustomization = filteredLocations.map((location) => ({
1019
- ...location,
1020
- customColor: markerGroups[location.group].color,
1021
- iconSvg: createLucideIconSvg(markerGroups[location.group].iconName),
1022
- iconColor: markerGroups[location.group].iconColor
1023
- }));
1024
- const getGroupCount = (groupId) => {
1025
- return sampleLocations.filter((loc) => loc.group === groupId).length;
1026
- };
1027
- return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
1028
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
1029
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1030
- /* @__PURE__ */ jsx(MapPin, { className: "w-5 h-5 text-primary" }),
1031
- /* @__PURE__ */ jsx("h3", { children: "Filtro por Categorias" })
1032
- ] }),
1033
- /* @__PURE__ */ jsxs(Badge, { variant: "secondary", children: [
1034
- filteredLocations.length,
1035
- " de ",
1036
- sampleLocations.length,
1037
- " locais"
1038
- ] })
1039
- ] }),
1040
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Use os filtros compactos no canto superior esquerdo do mapa para visualizar marcadores por categoria" }),
1041
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1042
- /* @__PURE__ */ jsx(
1043
- Map,
1044
- {
1045
- center: { lat: -23.5505, lng: -46.6333 },
1046
- zoom: 14,
1047
- markers: markersWithCustomization,
1048
- height: "500px",
1049
- zoomControl: true,
1050
- fullscreenControl: true,
1051
- apiKey
1052
- }
1053
- ),
1054
- /* @__PURE__ */ jsx(
1055
- "div",
1056
- {
1057
- className: cn(
1058
- "absolute top-4 left-4 z-10 transition-all duration-300",
1059
- showFilters ? "translate-x-0" : "-translate-x-full"
1060
- ),
1061
- children: /* @__PURE__ */ jsxs("div", { className: "p-2.5 rounded-lg shadow-[var(--shadow-elevation-sm)] bg-card border border-border max-w-[220px]", children: [
1062
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
1063
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
1064
- /* @__PURE__ */ jsx(Filter, { className: "w-3.5 h-3.5 text-foreground" }),
1065
- /* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: "Filtros" })
1066
- ] }),
1067
- /* @__PURE__ */ jsx(
1068
- Button,
1069
- {
1070
- size: "sm",
1071
- variant: "ghost",
1072
- onClick: () => setShowFilters(false),
1073
- className: "h-5 w-5 p-0",
1074
- children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
1075
- }
1076
- )
1077
- ] }),
1078
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
1079
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 py-0.5", children: [
1080
- /* @__PURE__ */ jsx(
1081
- Checkbox,
1082
- {
1083
- id: "filter-all",
1084
- checked: activeFilters.size === Object.keys(markerGroups).length,
1085
- onCheckedChange: toggleAll
1086
- }
1087
- ),
1088
- /* @__PURE__ */ jsxs(
1089
- Label,
1090
- {
1091
- htmlFor: "filter-all",
1092
- className: "flex items-center gap-1.5 cursor-pointer text-sm",
1093
- children: [
1094
- /* @__PURE__ */ jsx(MapPin, { className: "w-3.5 h-3.5" }),
1095
- "Todos",
1096
- /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs h-4 px-1", children: sampleLocations.length })
1097
- ]
1098
- }
1099
- )
1100
- ] }),
1101
- Object.entries(markerGroups).map(([id, group]) => {
1102
- const groupId = id;
1103
- const Icon = group.icon;
1104
- const isActive = activeFilters.has(groupId);
1105
- const count = getGroupCount(groupId);
1106
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 py-0.5", children: [
1107
- /* @__PURE__ */ jsx(
1108
- Checkbox,
1109
- {
1110
- id: `filter-${id}`,
1111
- checked: isActive,
1112
- onCheckedChange: () => toggleFilter(groupId)
1113
- }
1114
- ),
1115
- /* @__PURE__ */ jsxs(
1116
- Label,
1117
- {
1118
- htmlFor: `filter-${id}`,
1119
- className: "flex items-center gap-1.5 cursor-pointer text-sm",
1120
- children: [
1121
- /* @__PURE__ */ jsx(Icon, { className: "w-3.5 h-3.5", style: { color: group.color } }),
1122
- /* @__PURE__ */ jsx("span", { className: isActive ? "text-foreground" : "text-muted-foreground", children: group.name }),
1123
- /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-xs h-4 px-1", children: count })
1124
- ]
1125
- }
1126
- )
1127
- ] }, id);
1128
- })
1129
- ] })
1130
- ] })
1131
- }
1132
- ),
1133
- !showFilters && /* @__PURE__ */ jsxs(
1134
- Button,
1135
- {
1136
- size: "sm",
1137
- onClick: () => setShowFilters(true),
1138
- className: "absolute top-4 left-4 z-10 h-8 bg-primary text-primary-foreground",
1139
- children: [
1140
- /* @__PURE__ */ jsx(Filter, { className: "w-3.5 h-3.5 mr-1.5" }),
1141
- "Filtros"
1142
- ]
1143
- }
1144
- )
1145
- ] }),
1146
- /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-3 justify-center pt-2 border-t border-border", children: Object.entries(markerGroups).map(([id, group]) => {
1147
- const Icon = group.icon;
1148
- const count = getGroupCount(id);
1149
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-1 rounded-lg bg-muted", children: [
1150
- /* @__PURE__ */ jsx("div", { className: "w-3 h-3 rounded-full", style: { backgroundColor: group.color } }),
1151
- /* @__PURE__ */ jsx(Icon, { className: "w-4 h-4", style: { color: group.color } }),
1152
- /* @__PURE__ */ jsx("span", { className: "text-sm", style: { color: "var(--foreground)" }, children: group.name }),
1153
- /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs h-5", children: count })
1154
- ] }, id);
1155
- }) }),
1156
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-3", children: [
1157
- /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1158
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Total de Locais" }),
1159
- /* @__PURE__ */ jsx("p", { className: "text-2xl text-foreground", children: sampleLocations.length })
1160
- ] }),
1161
- /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1162
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Visíveis" }),
1163
- /* @__PURE__ */ jsx("p", { className: "text-2xl text-primary", children: filteredLocations.length })
1164
- ] }),
1165
- /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1166
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Categorias" }),
1167
- /* @__PURE__ */ jsx("p", { className: "text-2xl text-foreground", children: Object.keys(markerGroups).length })
1168
- ] }),
1169
- /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1170
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Filtros Ativos" }),
1171
- /* @__PURE__ */ jsx("p", { className: "text-2xl text-chart-2", children: activeFilters.size })
1172
- ] })
1173
- ] })
1174
- ] });
1175
- }
1176
- function DrawingMapExample({ apiKey }) {
1177
- const [mapInstance, setMapInstance] = useState(null);
1178
- const [selectedMode, setSelectedMode] = useState(null);
1179
- const [shapes, setShapes] = useState([]);
1180
- const [showSaveDialog, setShowSaveDialog] = useState(false);
1181
- const [savedData, setSavedData] = useState("");
1182
- const [isDrawingPolygon, setIsDrawingPolygon] = useState(false);
1183
- const tempPolylineRef = useRef(null);
1184
- const polygonPathRef = useRef([]);
1185
- const mapListenersRef = useRef([]);
1186
- const colors = {
1187
- fill: "#2C275B",
1188
- // Primary do CSS
1189
- stroke: "#2C275B",
1190
- fillOpacity: 0.2,
1191
- strokeWeight: 2,
1192
- editable: true,
1193
- draggable: true
1194
- };
1195
- const addMarker = useCallback(
1196
- (position) => {
1197
- if (!mapInstance) return;
1198
- const marker = new google.maps.marker.AdvancedMarkerElement({
1199
- position,
1200
- map: mapInstance,
1201
- gmpDraggable: true,
1202
- // Propriedade correta para AdvancedMarkerElement
1203
- title: "Marcador"
1204
- });
1205
- marker.addListener("dragend", () => {
1206
- toast.info("Posição do marcador atualizada");
1207
- });
1208
- const newShape = { type: "marker", overlay: marker };
1209
- setShapes((prev) => [...prev, newShape]);
1210
- toast.success("Marcador adicionado");
1211
- },
1212
- [mapInstance]
1213
- );
1214
- const addCircle = useCallback(
1215
- (center) => {
1216
- if (!mapInstance) return;
1217
- const circle = new google.maps.Circle({
1218
- map: mapInstance,
1219
- center,
1220
- radius: 500,
1221
- fillColor: colors.fill,
1222
- fillOpacity: colors.fillOpacity,
1223
- strokeColor: colors.stroke,
1224
- strokeWeight: colors.strokeWeight,
1225
- editable: true,
1226
- draggable: true
1227
- });
1228
- const newShape = { type: "circle", overlay: circle };
1229
- setShapes((prev) => [...prev, newShape]);
1230
- toast.success("Círculo adicionado");
1231
- },
1232
- [mapInstance, colors]
1233
- );
1234
- const addRectangle = useCallback(
1235
- (center) => {
1236
- if (!mapInstance) return;
1237
- const offset = 5e-3;
1238
- const bounds = {
1239
- north: center.lat() + offset,
1240
- south: center.lat() - offset,
1241
- east: center.lng() + offset,
1242
- west: center.lng() - offset
1243
- };
1244
- const rectangle = new google.maps.Rectangle({
1245
- map: mapInstance,
1246
- bounds,
1247
- fillColor: colors.fill,
1248
- fillOpacity: colors.fillOpacity,
1249
- strokeColor: colors.stroke,
1250
- strokeWeight: colors.strokeWeight,
1251
- editable: true,
1252
- draggable: true
1253
- });
1254
- const newShape = { type: "rectangle", overlay: rectangle };
1255
- setShapes((prev) => [...prev, newShape]);
1256
- toast.success("Retângulo adicionado");
1257
- },
1258
- [mapInstance, colors]
1259
- );
1260
- const cancelPolygonDrawing = useCallback(() => {
1261
- if (tempPolylineRef.current) {
1262
- tempPolylineRef.current.setMap(null);
1263
- tempPolylineRef.current = null;
1264
- }
1265
- polygonPathRef.current = [];
1266
- setIsDrawingPolygon(false);
1267
- }, []);
1268
- const finishPolygon = useCallback(() => {
1269
- if (!mapInstance || polygonPathRef.current.length < 3) {
1270
- if (polygonPathRef.current.length < 3 && polygonPathRef.current.length > 0) {
1271
- toast.error("Polígono precisa de pelo menos 3 pontos.");
1272
- }
1273
- return;
1274
- }
1275
- const polygon = new google.maps.Polygon({
1276
- map: mapInstance,
1277
- paths: polygonPathRef.current,
1278
- fillColor: colors.fill,
1279
- fillOpacity: colors.fillOpacity,
1280
- strokeColor: colors.stroke,
1281
- strokeWeight: colors.strokeWeight,
1282
- editable: true,
1283
- draggable: true
1284
- });
1285
- const newShape = { type: "polygon", overlay: polygon };
1286
- setShapes((prev) => [...prev, newShape]);
1287
- cancelPolygonDrawing();
1288
- toast.success("Polígono criado com sucesso!");
1289
- }, [mapInstance, colors, cancelPolygonDrawing]);
1290
- const addPolygonPoint = useCallback(
1291
- (point) => {
1292
- var _a;
1293
- if (!mapInstance) return;
1294
- if (!isDrawingPolygon) {
1295
- setIsDrawingPolygon(true);
1296
- polygonPathRef.current = [point];
1297
- tempPolylineRef.current = new google.maps.Polyline({
1298
- map: mapInstance,
1299
- path: polygonPathRef.current,
1300
- strokeColor: colors.stroke,
1301
- strokeOpacity: 0.8,
1302
- strokeWeight: 2,
1303
- geodesic: true,
1304
- clickable: false
1305
- // Importante: não capturar cliques para não atrapalhar o mapa
1306
- });
1307
- toast.info("Clique para adicionar pontos. Duplo clique ou botão check para fechar.", {
1308
- duration: 4e3
1309
- });
1310
- } else {
1311
- polygonPathRef.current.push(point);
1312
- (_a = tempPolylineRef.current) == null ? void 0 : _a.setPath(polygonPathRef.current);
1313
- }
1314
- },
1315
- [mapInstance, isDrawingPolygon, colors]
1316
- );
1317
- const clearListeners = () => {
1318
- mapListenersRef.current.forEach((listener) => google.maps.event.removeListener(listener));
1319
- mapListenersRef.current = [];
1320
- };
1321
- useEffect(() => {
1322
- if (!mapInstance) return;
1323
- clearListeners();
1324
- if (!selectedMode) {
1325
- mapInstance.setOptions({ draggableCursor: "grab", clickableIcons: true });
1326
- return;
1327
- }
1328
- mapInstance.setOptions({
1329
- draggableCursor: "crosshair",
1330
- clickableIcons: false
1331
- });
1332
- const clickListener = mapInstance.addListener("click", (e) => {
1333
- if (!e.latLng) return;
1334
- switch (selectedMode) {
1335
- case "marker":
1336
- addMarker(e.latLng);
1337
- break;
1338
- case "circle":
1339
- addCircle(e.latLng);
1340
- break;
1341
- case "rectangle":
1342
- addRectangle(e.latLng);
1343
- break;
1344
- case "polygon":
1345
- addPolygonPoint(e.latLng);
1346
- break;
1347
- }
1348
- });
1349
- mapListenersRef.current.push(clickListener);
1350
- if (selectedMode === "polygon") {
1351
- const dblClickListener = mapInstance.addListener("dblclick", (e) => {
1352
- if (e.domEvent) e.domEvent.stopPropagation();
1353
- finishPolygon();
1354
- });
1355
- mapListenersRef.current.push(dblClickListener);
1356
- }
1357
- return () => {
1358
- clearListeners();
1359
- };
1360
- }, [
1361
- mapInstance,
1362
- selectedMode,
1363
- addMarker,
1364
- addCircle,
1365
- addRectangle,
1366
- addPolygonPoint,
1367
- finishPolygon
1368
- ]);
1369
- const handleModeChange = (mode) => {
1370
- if (isDrawingPolygon) {
1371
- cancelPolygonDrawing();
1372
- }
1373
- setSelectedMode(mode);
1374
- };
1375
- const clearAll = () => {
1376
- shapes.forEach((shape) => {
1377
- if ("setMap" in shape.overlay) shape.overlay.setMap(null);
1378
- else shape.overlay.map = null;
1379
- });
1380
- setShapes([]);
1381
- if (isDrawingPolygon) cancelPolygonDrawing();
1382
- toast.info("Mapa limpo");
1383
- };
1384
- const undoLast = () => {
1385
- var _a;
1386
- if (isDrawingPolygon) {
1387
- if (polygonPathRef.current.length > 0) {
1388
- polygonPathRef.current.pop();
1389
- (_a = tempPolylineRef.current) == null ? void 0 : _a.setPath(polygonPathRef.current);
1390
- if (polygonPathRef.current.length === 0) {
1391
- cancelPolygonDrawing();
1392
- }
1393
- }
1394
- return;
1395
- }
1396
- if (shapes.length === 0) return;
1397
- const lastShape = shapes[shapes.length - 1];
1398
- if ("setMap" in lastShape.overlay) lastShape.overlay.setMap(null);
1399
- else lastShape.overlay.map = null;
1400
- setShapes((prev) => prev.slice(0, prev.length - 1));
1401
- };
1402
- const handleSave = () => {
1403
- if (shapes.length === 0) {
1404
- toast.error("Adicione desenhos ao mapa antes de salvar.");
1405
- return;
1406
- }
1407
- const exportData = shapes.map((s) => {
1408
- var _a, _b;
1409
- let data = {};
1410
- if (s.type === "marker") {
1411
- const marker = s.overlay;
1412
- const pos = marker.position;
1413
- if (pos) {
1414
- const lat = typeof pos.lat === "function" ? pos.lat() : pos.lat;
1415
- const lng = typeof pos.lng === "function" ? pos.lng() : pos.lng;
1416
- data = { lat, lng };
1417
- }
1418
- } else if (s.type === "circle") {
1419
- const circle = s.overlay;
1420
- data = {
1421
- center: { lat: (_a = circle.getCenter()) == null ? void 0 : _a.lat(), lng: (_b = circle.getCenter()) == null ? void 0 : _b.lng() },
1422
- radius: circle.getRadius()
1423
- };
1424
- } else if (s.type === "rectangle") {
1425
- const rect = s.overlay;
1426
- const bounds = rect.getBounds();
1427
- data = {
1428
- north: bounds == null ? void 0 : bounds.getNorthEast().lat(),
1429
- south: bounds == null ? void 0 : bounds.getSouthWest().lat(),
1430
- east: bounds == null ? void 0 : bounds.getNorthEast().lng(),
1431
- west: bounds == null ? void 0 : bounds.getSouthWest().lng()
1432
- };
1433
- } else if (s.type === "polygon") {
1434
- const poly = s.overlay;
1435
- const path = poly.getPath();
1436
- data = path.getArray().map((coord) => ({ lat: coord.lat(), lng: coord.lng() }));
1437
- }
1438
- return { type: s.type, data };
1439
- });
1440
- setSavedData(JSON.stringify(exportData, null, 2));
1441
- setShowSaveDialog(true);
1442
- };
1443
- const ToolButton = ({
1444
- active,
1445
- onClick,
1446
- icon: Icon,
1447
- label
1448
- }) => /* @__PURE__ */ jsxs(
1449
- Button,
1450
- {
1451
- variant: active ? "default" : "ghost",
1452
- className: `w-full justify-start gap-3 ${active ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground"}`,
1453
- onClick,
1454
- children: [
1455
- /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" }),
1456
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: label })
1457
- ]
1458
- }
1459
- );
1460
- return /* @__PURE__ */ jsxs(Card, { className: "h-full border-0 shadow-none md:border md:shadow-sm", children: [
1461
- /* @__PURE__ */ jsx(CardHeader, { className: "border-b bg-muted/20 pb-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
1462
- /* @__PURE__ */ jsxs("div", { children: [
1463
- /* @__PURE__ */ jsx(CardTitle, { children: "Ferramentas de Desenho" }),
1464
- /* @__PURE__ */ jsx(CardDescription, { className: "mt-1", children: "Crie geometrias personalizadas no mapa" })
1465
- ] }),
1466
- /* @__PURE__ */ jsxs(Badge, { variant: "outline", className: "h-6", children: [
1467
- shapes.length,
1468
- " ",
1469
- shapes.length === 1 ? "elemento" : "elementos"
1470
- ] })
1471
- ] }) }),
1472
- /* @__PURE__ */ jsxs(CardContent, { className: "p-0 flex flex-col md:flex-row h-[600px] bg-background", children: [
1473
- /* @__PURE__ */ jsxs("div", { className: "w-full md:w-64 border-b md:border-b-0 md:border-r bg-muted/10 flex flex-col", children: [
1474
- /* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsxs("div", { className: "p-4 space-y-6", children: [
1475
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
1476
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider px-2", children: "Ferramentas" }),
1477
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
1478
- /* @__PURE__ */ jsx(
1479
- ToolButton,
1480
- {
1481
- active: selectedMode === null,
1482
- onClick: () => handleModeChange(null),
1483
- icon: MousePointer2,
1484
- label: "Navegar"
1485
- }
1486
- ),
1487
- /* @__PURE__ */ jsx(
1488
- ToolButton,
1489
- {
1490
- active: selectedMode === "marker",
1491
- onClick: () => handleModeChange("marker"),
1492
- icon: MapPin,
1493
- label: "Marcador"
1494
- }
1495
- ),
1496
- /* @__PURE__ */ jsx(
1497
- ToolButton,
1498
- {
1499
- active: selectedMode === "circle",
1500
- onClick: () => handleModeChange("circle"),
1501
- icon: Circle,
1502
- label: "Círculo"
1503
- }
1504
- ),
1505
- /* @__PURE__ */ jsx(
1506
- ToolButton,
1507
- {
1508
- active: selectedMode === "rectangle",
1509
- onClick: () => handleModeChange("rectangle"),
1510
- icon: Square,
1511
- label: "Retângulo"
1512
- }
1513
- ),
1514
- /* @__PURE__ */ jsx(
1515
- ToolButton,
1516
- {
1517
- active: selectedMode === "polygon",
1518
- onClick: () => handleModeChange("polygon"),
1519
- icon: Hexagon,
1520
- label: "Polígono"
1521
- }
1522
- )
1523
- ] })
1524
- ] }),
1525
- /* @__PURE__ */ jsx(Separator, {}),
1526
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
1527
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider px-2", children: "Ações" }),
1528
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
1529
- /* @__PURE__ */ jsxs(
1530
- Button,
1531
- {
1532
- variant: "outline",
1533
- onClick: undoLast,
1534
- disabled: shapes.length === 0 && !isDrawingPolygon,
1535
- className: "w-full",
1536
- title: "Desfazer último",
1537
- "aria-label": "Desfazer último",
1538
- children: [
1539
- /* @__PURE__ */ jsx(Undo, { className: "h-4 w-4 mr-2" }),
1540
- "Desfazer"
1541
- ]
1542
- }
1543
- ),
1544
- /* @__PURE__ */ jsxs(
1545
- Button,
1546
- {
1547
- variant: "destructive",
1548
- onClick: clearAll,
1549
- disabled: shapes.length === 0 && !isDrawingPolygon,
1550
- className: "w-full bg-destructive/10 text-destructive hover:bg-destructive hover:text-destructive-foreground border-0 shadow-none",
1551
- children: [
1552
- /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4 mr-2" }),
1553
- "Limpar"
1554
- ]
1555
- }
1556
- )
1557
- ] }),
1558
- /* @__PURE__ */ jsxs(
1559
- Button,
1560
- {
1561
- variant: "default",
1562
- onClick: handleSave,
1563
- disabled: shapes.length === 0,
1564
- className: "w-full mt-2",
1565
- children: [
1566
- /* @__PURE__ */ jsx(Save, { className: "h-4 w-4 mr-2" }),
1567
- "Salvar GeoJSON"
1568
- ]
1569
- }
1570
- )
1571
- ] })
1572
- ] }) }),
1573
- isDrawingPolygon && /* @__PURE__ */ jsxs("div", { className: "p-4 bg-primary/5 border-t border-primary/10", children: [
1574
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2 text-primary text-xs font-medium", children: [
1575
- /* @__PURE__ */ jsxs("span", { className: "relative flex h-2 w-2", children: [
1576
- /* @__PURE__ */ jsx("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75" }),
1577
- /* @__PURE__ */ jsx("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-primary" })
1578
- ] }),
1579
- "Desenhando Polígono..."
1580
- ] }),
1581
- /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
1582
- /* @__PURE__ */ jsxs(
1583
- Button,
1584
- {
1585
- size: "sm",
1586
- className: "w-full bg-green-600 hover:bg-green-700 text-white",
1587
- onClick: finishPolygon,
1588
- children: [
1589
- /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 mr-1" }),
1590
- " Concluir"
1591
- ]
1592
- }
1593
- ),
1594
- /* @__PURE__ */ jsxs(
1595
- Button,
1596
- {
1597
- size: "sm",
1598
- variant: "outline",
1599
- className: "w-full",
1600
- onClick: cancelPolygonDrawing,
1601
- children: [
1602
- /* @__PURE__ */ jsx(X, { className: "h-3 w-3 mr-1" }),
1603
- " Cancelar"
1604
- ]
1605
- }
1606
- )
1607
- ] })
1608
- ] })
1609
- ] }),
1610
- /* @__PURE__ */ jsxs("div", { className: "flex-1 relative bg-muted/5 min-h-[400px]", children: [
1611
- /* @__PURE__ */ jsx(
1612
- Map,
1613
- {
1614
- className: "h-full w-full rounded-none md:rounded-br-lg",
1615
- center: { lat: -23.5505, lng: -46.6333 },
1616
- zoom: 13,
1617
- height: "100%",
1618
- mapContainerClassName: "h-full w-full rounded-none md:rounded-br-lg",
1619
- disableDefaultUI: true,
1620
- zoomControl: true,
1621
- onMapLoad: setMapInstance,
1622
- apiKey
1623
- }
1624
- ),
1625
- selectedMode && !isDrawingPolygon && /* @__PURE__ */ jsxs("div", { className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-background/90 backdrop-blur border px-4 py-2 rounded-full shadow-sm text-xs font-medium text-muted-foreground pointer-events-none z-10", children: [
1626
- selectedMode === "marker" && "Clique no mapa para adicionar um marcador",
1627
- selectedMode === "circle" && "Clique no mapa para definir o centro do círculo",
1628
- selectedMode === "rectangle" && "Clique no mapa para criar um retângulo",
1629
- selectedMode === "polygon" && "Clique sequencialmente para desenhar a área"
1630
- ] })
1631
- ] }),
1632
- /* @__PURE__ */ jsx(Dialog, { open: showSaveDialog, onOpenChange: setShowSaveDialog, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-md", children: [
1633
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
1634
- /* @__PURE__ */ jsx(DialogTitle, { children: "Dados Geográficos (GeoJSON)" }),
1635
- /* @__PURE__ */ jsx(DialogDescription, { children: "Copie os dados das formas desenhadas abaixo." })
1636
- ] }),
1637
- /* @__PURE__ */ jsx("div", { className: "relative mt-2", children: /* @__PURE__ */ jsx(
1638
- "pre",
1639
- {
1640
- className: "p-4 rounded-lg bg-muted overflow-auto max-h-[300px] text-xs font-mono",
1641
- "data-custom-scrollbar": true,
1642
- children: savedData
1643
- }
1644
- ) }),
1645
- /* @__PURE__ */ jsx("div", { className: "flex justify-end mt-4", children: /* @__PURE__ */ jsx(Button, { onClick: () => setShowSaveDialog(false), children: "Fechar" }) })
1646
- ] }) })
1647
- ] })
1648
- ] });
1649
- }
1650
- function MapShowcase() {
1651
- const [activeTab, setActiveTab] = useState("simple");
1652
- const [isTransitioning, setIsTransitioning] = useState(false);
1653
- const [apiKey, setApiKey] = useState("");
1654
- const [inputApiKey, setInputApiKey] = useState("");
1655
- const [showTraffic, setShowTraffic] = useState(false);
1656
- const [showTransit, setShowTransit] = useState(false);
1657
- const [showBicycling, setShowBicycling] = useState(false);
1658
- const [showZoomControl, setShowZoomControl] = useState(true);
1659
- const [showMapTypeControl, setShowMapTypeControl] = useState(false);
1660
- const [showStreetViewControl, setShowStreetViewControl] = useState(false);
1661
- const [showFullscreenControl, setShowFullscreenControl] = useState(true);
1662
- const handleTabChange = (value) => {
1663
- if (value === activeTab) return;
1664
- setIsTransitioning(true);
1665
- setTimeout(() => {
1666
- setActiveTab(value);
1667
- setIsTransitioning(false);
1668
- }, 50);
1669
- };
1670
- return /* @__PURE__ */ jsxs("div", { className: "space-y-8", children: [
1671
- /* @__PURE__ */ jsx(
1672
- PageHeader,
1673
- {
1674
- title: "Mapas",
1675
- subtitle: "Biblioteca de componentes de mapa para visualização de dados geoespaciais. Utiliza a API do Google Maps com estilização personalizada do Xertica UI.",
1676
- actions: /* @__PURE__ */ jsx(Badge, { children: "Design System" })
1677
- }
1678
- ),
1679
- /* @__PURE__ */ jsxs(Card, { children: [
1680
- /* @__PURE__ */ jsxs(CardHeader, { children: [
1681
- /* @__PURE__ */ jsx(CardTitle, { children: "Configuração da API Key" }),
1682
- /* @__PURE__ */ jsx(CardDescription, { children: "Insira sua Google Maps API Key para renderizar os mapas abaixo." })
1683
- ] }),
1684
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-md items-center space-x-2", children: [
1685
- /* @__PURE__ */ jsx(
1686
- Input,
1687
- {
1688
- type: "password",
1689
- placeholder: "Cole sua Google Maps API Key aqui",
1690
- "aria-label": "Google Maps API Key",
1691
- value: inputApiKey,
1692
- onChange: (e) => setInputApiKey(e.target.value),
1693
- className: "max-w-md h-10"
1694
- }
1695
- ),
1696
- /* @__PURE__ */ jsx(Button, { onClick: () => setApiKey(inputApiKey), children: "Salvar" })
1697
- ] }) })
1698
- ] }),
1699
- /* @__PURE__ */ jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "w-full", children: [
1700
- /* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-4 mb-8", children: [
1701
- /* @__PURE__ */ jsx(TabsTrigger, { value: "simple", children: "Mapas Simples" }),
1702
- /* @__PURE__ */ jsx(TabsTrigger, { value: "markers", children: "Marcadores" }),
1703
- /* @__PURE__ */ jsx(TabsTrigger, { value: "controls", children: "Controles" }),
1704
- /* @__PURE__ */ jsxs(TabsTrigger, { value: "drawing", className: "flex items-center gap-2", children: [
1705
- /* @__PURE__ */ jsx(Pencil, { className: "w-3 h-3" }),
1706
- " Desenho"
1707
- ] })
1708
- ] }),
1709
- /* @__PURE__ */ jsx(TabsContent, { value: "simple", className: "space-y-8", children: !isTransitioning && activeTab === "simple" && /* @__PURE__ */ jsxs(Fragment, { children: [
1710
- /* @__PURE__ */ jsxs(Card, { children: [
1711
- /* @__PURE__ */ jsxs(CardHeader, { children: [
1712
- /* @__PURE__ */ jsx(CardTitle, { children: "Mapa Padrão" }),
1713
- /* @__PURE__ */ jsx(CardDescription, { children: "Configuração básica do mapa centralizado em uma coordenada específica." })
1714
- ] }),
1715
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
1716
- Map,
1717
- {
1718
- center: { lat: -23.5505, lng: -46.6333 },
1719
- zoom: 13,
1720
- height: "400px",
1721
- apiKey
1722
- }
1723
- ) })
1724
- ] }),
1725
- /* @__PURE__ */ jsxs(Card, { children: [
1726
- /* @__PURE__ */ jsxs(CardHeader, { children: [
1727
- /* @__PURE__ */ jsx(CardTitle, { children: "Camadas (Layers)" }),
1728
- /* @__PURE__ */ jsx(CardDescription, { children: "Sobreposição de informações como tráfego, transporte público e ciclovias." })
1729
- ] }),
1730
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
1731
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-6 p-4 border rounded-lg bg-muted/50", children: [
1732
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1733
- /* @__PURE__ */ jsx(Switch, { id: "traffic", checked: showTraffic, onCheckedChange: setShowTraffic }),
1734
- /* @__PURE__ */ jsxs(Label, { htmlFor: "traffic", className: "flex items-center gap-2", children: [
1735
- /* @__PURE__ */ jsx(Layers, { className: "w-4 h-4" }),
1736
- " Trânsito"
1737
- ] })
1738
- ] }),
1739
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1740
- /* @__PURE__ */ jsx(Switch, { id: "transit", checked: showTransit, onCheckedChange: setShowTransit }),
1741
- /* @__PURE__ */ jsxs(Label, { htmlFor: "transit", className: "flex items-center gap-2", children: [
1742
- /* @__PURE__ */ jsx(Layers, { className: "w-4 h-4" }),
1743
- " Transporte"
1744
- ] })
1745
- ] }),
1746
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1747
- /* @__PURE__ */ jsx(
1748
- Switch,
1749
- {
1750
- id: "bicycling",
1751
- checked: showBicycling,
1752
- onCheckedChange: setShowBicycling
1753
- }
1754
- ),
1755
- /* @__PURE__ */ jsxs(Label, { htmlFor: "bicycling", className: "flex items-center gap-2", children: [
1756
- /* @__PURE__ */ jsx(Layers, { className: "w-4 h-4" }),
1757
- " Ciclovias"
1758
- ] })
1759
- ] })
1760
- ] }),
1761
- /* @__PURE__ */ jsx(
1762
- Map,
1763
- {
1764
- center: { lat: -23.5505, lng: -46.6333 },
1765
- zoom: 12,
1766
- height: "500px",
1767
- layers: {
1768
- traffic: showTraffic,
1769
- transit: showTransit,
1770
- bicycling: showBicycling
1771
- },
1772
- apiKey
1773
- }
1774
- )
1775
- ] })
1776
- ] }),
1777
- /* @__PURE__ */ jsxs("div", { className: "grid md:grid-cols-3 gap-4", children: [
1778
- /* @__PURE__ */ jsxs(Card, { children: [
1779
- /* @__PURE__ */ jsx(CardHeader, { className: "p-4 pb-2", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: "São Paulo" }) }),
1780
- /* @__PURE__ */ jsx(CardContent, { className: "p-4 pt-0", children: /* @__PURE__ */ jsx(
1781
- Map,
1782
- {
1783
- center: { lat: -23.5505, lng: -46.6333 },
1784
- zoom: 11,
1785
- height: "200px",
1786
- disableDefaultUI: true,
1787
- apiKey
1788
- }
1789
- ) })
1790
- ] }),
1791
- /* @__PURE__ */ jsxs(Card, { children: [
1792
- /* @__PURE__ */ jsx(CardHeader, { className: "p-4 pb-2", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: "Rio de Janeiro" }) }),
1793
- /* @__PURE__ */ jsx(CardContent, { className: "p-4 pt-0", children: /* @__PURE__ */ jsx(
1794
- Map,
1795
- {
1796
- center: { lat: -22.9068, lng: -43.1729 },
1797
- zoom: 11,
1798
- height: "200px",
1799
- disableDefaultUI: true,
1800
- apiKey
1801
- }
1802
- ) })
1803
- ] }),
1804
- /* @__PURE__ */ jsxs(Card, { children: [
1805
- /* @__PURE__ */ jsx(CardHeader, { className: "p-4 pb-2", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: "New York" }) }),
1806
- /* @__PURE__ */ jsx(CardContent, { className: "p-4 pt-0", children: /* @__PURE__ */ jsx(
1807
- Map,
1808
- {
1809
- center: { lat: 40.7128, lng: -74.006 },
1810
- zoom: 11,
1811
- height: "200px",
1812
- disableDefaultUI: true,
1813
- apiKey
1814
- }
1815
- ) })
1816
- ] })
1817
- ] })
1818
- ] }) }),
1819
- /* @__PURE__ */ jsx(TabsContent, { value: "markers", className: "space-y-8", children: !isTransitioning && activeTab === "markers" && /* @__PURE__ */ jsxs(Fragment, { children: [
1820
- /* @__PURE__ */ jsxs(Card, { children: [
1821
- /* @__PURE__ */ jsxs(CardHeader, { children: [
1822
- /* @__PURE__ */ jsx(CardTitle, { children: "Marcadores e Pins" }),
1823
- /* @__PURE__ */ jsx(CardDescription, { children: "Exemplos de marcadores personalizados com diferentes cores e informações." })
1824
- ] }),
1825
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
1826
- Map,
1827
- {
1828
- center: { lat: -23.5505, lng: -46.6333 },
1829
- zoom: 13,
1830
- height: "500px",
1831
- apiKey,
1832
- markers: [
1833
- {
1834
- position: { lat: -23.5505, lng: -46.6333 },
1835
- title: "Principal",
1836
- info: "Marcador padrão",
1837
- customColor: "#4F46E5"
1838
- },
1839
- {
1840
- position: { lat: -23.54, lng: -46.64 },
1841
- title: "Secundário",
1842
- info: "Marcador de alerta",
1843
- customColor: "#EF4444",
1844
- icon: "!"
1845
- },
1846
- {
1847
- position: { lat: -23.56, lng: -46.62 },
1848
- title: "Loja",
1849
- info: "Ponto de venda",
1850
- customColor: "#10B981",
1851
- icon: "S"
1852
- }
1853
- ]
1854
- }
1855
- ) })
1856
- ] }),
1857
- /* @__PURE__ */ jsxs(Card, { children: [
1858
- /* @__PURE__ */ jsxs(CardHeader, { children: [
1859
- /* @__PURE__ */ jsx(CardTitle, { children: "Marcador com Ações" }),
1860
- /* @__PURE__ */ jsx(CardDescription, { children: "Marcador interativo que exibe conteúdo rico (texto, imagem, botões) ao ser clicado." })
1861
- ] }),
1862
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
1863
- Map,
1864
- {
1865
- center: { lat: -23.5505, lng: -46.6333 },
1866
- zoom: 13,
1867
- height: "500px",
1868
- apiKey,
1869
- markers: [
1870
- {
1871
- position: { lat: -23.5505, lng: -46.6333 },
1872
- label: "🏢",
1873
- richContent: /* @__PURE__ */ jsxs("div", { className: "p-4 max-w-[260px]", children: [
1874
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
1875
- /* @__PURE__ */ jsx("h4", { className: "font-semibold text-base", children: "Xertica HQ" }),
1876
- /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-[10px] h-5", children: "Open" })
1877
- ] }),
1878
- /* @__PURE__ */ jsxs("div", { className: "w-full h-32 bg-muted rounded-md mb-3 overflow-hidden relative", children: [
1879
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" }),
1880
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center text-white font-medium", children: "Office View" })
1881
- ] }),
1882
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-3 leading-relaxed", children: "Sede principal em São Paulo. Espaço moderno para reuniões e eventos." }),
1883
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
1884
- /* @__PURE__ */ jsx(Button, { size: "sm", className: "w-full h-8 text-xs shadow-sm", children: "Navegar" }),
1885
- /* @__PURE__ */ jsx(
1886
- Button,
1887
- {
1888
- size: "sm",
1889
- variant: "outline",
1890
- className: "w-full h-8 text-xs bg-background",
1891
- children: "Detalhes"
1892
- }
1893
- )
1894
- ] })
1895
- ] })
1896
- }
1897
- ]
1898
- }
1899
- ) })
1900
- ] }),
1901
- /* @__PURE__ */ jsxs(Card, { children: [
1902
- /* @__PURE__ */ jsxs(CardHeader, { children: [
1903
- /* @__PURE__ */ jsx(CardTitle, { children: "Áreas e Zonas" }),
1904
- /* @__PURE__ */ jsx(CardDescription, { children: "Delimitação de áreas geográficas usando círculos e polígonos." })
1905
- ] }),
1906
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
1907
- Map,
1908
- {
1909
- center: { lat: -23.5505, lng: -46.6333 },
1910
- zoom: 12,
1911
- height: "500px",
1912
- apiKey,
1913
- markers: [
1914
- {
1915
- position: { lat: -23.5505, lng: -46.6333 },
1916
- title: "Centro da Zona",
1917
- info: "Raio de 3km",
1918
- customColor: "#6366F1"
1919
- }
1920
- ],
1921
- circle: {
1922
- center: { lat: -23.5505, lng: -46.6333 },
1923
- radius: 3e3,
1924
- fillColor: "#6366F1",
1925
- strokeColor: "#4F46E5"
1926
- },
1927
- polygon: {
1928
- paths: [
1929
- [
1930
- { lat: -23.52, lng: -46.6 },
1931
- { lat: -23.52, lng: -46.66 },
1932
- { lat: -23.58, lng: -46.66 },
1933
- { lat: -23.58, lng: -46.6 }
1934
- ]
1935
- ],
1936
- fillColor: "#10B981",
1937
- strokeColor: "#059669"
1938
- }
1939
- }
1940
- ) })
1941
- ] })
1942
- ] }) }),
1943
- /* @__PURE__ */ jsx(TabsContent, { value: "controls", className: "space-y-8", children: !isTransitioning && activeTab === "controls" && /* @__PURE__ */ jsxs(Fragment, { children: [
1944
- /* @__PURE__ */ jsxs(Card, { children: [
1945
- /* @__PURE__ */ jsxs(CardHeader, { children: [
1946
- /* @__PURE__ */ jsx(CardTitle, { children: "Controles do Mapa" }),
1947
- /* @__PURE__ */ jsx(CardDescription, { children: "Personalize a interface do mapa ativando ou desativando controles nativos." })
1948
- ] }),
1949
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
1950
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4 p-4 border rounded-lg bg-muted/50", children: [
1951
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1952
- /* @__PURE__ */ jsx(
1953
- Checkbox,
1954
- {
1955
- id: "zoom",
1956
- checked: showZoomControl,
1957
- onCheckedChange: (c) => setShowZoomControl(!!c)
1958
- }
1959
- ),
1960
- /* @__PURE__ */ jsx(Label, { htmlFor: "zoom", children: "Zoom Control" })
1961
- ] }),
1962
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1963
- /* @__PURE__ */ jsx(
1964
- Checkbox,
1965
- {
1966
- id: "maptype",
1967
- checked: showMapTypeControl,
1968
- onCheckedChange: (c) => setShowMapTypeControl(!!c)
1969
- }
1970
- ),
1971
- /* @__PURE__ */ jsx(Label, { htmlFor: "maptype", children: "Map Type" })
1972
- ] }),
1973
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1974
- /* @__PURE__ */ jsx(
1975
- Checkbox,
1976
- {
1977
- id: "streetview",
1978
- checked: showStreetViewControl,
1979
- onCheckedChange: (c) => setShowStreetViewControl(!!c)
1980
- }
1981
- ),
1982
- /* @__PURE__ */ jsx(Label, { htmlFor: "streetview", children: "Street View" })
1983
- ] }),
1984
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1985
- /* @__PURE__ */ jsx(
1986
- Checkbox,
1987
- {
1988
- id: "fullscreen",
1989
- checked: showFullscreenControl,
1990
- onCheckedChange: (c) => setShowFullscreenControl(!!c)
1991
- }
1992
- ),
1993
- /* @__PURE__ */ jsx(Label, { htmlFor: "fullscreen", children: "Fullscreen" })
1994
- ] })
1995
- ] }),
1996
- /* @__PURE__ */ jsx(
1997
- Map,
1998
- {
1999
- center: { lat: -23.5505, lng: -46.6333 },
2000
- zoom: 13,
2001
- height: "400px",
2002
- apiKey,
2003
- zoomControl: showZoomControl,
2004
- mapTypeControl: showMapTypeControl,
2005
- streetViewControl: showStreetViewControl,
2006
- fullscreenControl: showFullscreenControl
2007
- }
2008
- )
2009
- ] })
2010
- ] }),
2011
- /* @__PURE__ */ jsxs(Card, { children: [
2012
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2013
- /* @__PURE__ */ jsx(CardTitle, { children: "Filtros Interativos" }),
2014
- /* @__PURE__ */ jsx(CardDescription, { children: "Exemplo avançado de mapa com controles customizados para filtragem de marcadores." })
2015
- ] }),
2016
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(FilterableMapExample, { apiKey }) })
2017
- ] })
2018
- ] }) }),
2019
- /* @__PURE__ */ jsx(TabsContent, { value: "drawing", className: "space-y-8", children: !isTransitioning && activeTab === "drawing" && /* @__PURE__ */ jsx(DrawingMapExample, { apiKey }) })
2020
- ] }),
2021
- /* @__PURE__ */ jsxs("div", { className: "grid md:grid-cols-3 gap-6 pt-8 border-t", children: [
2022
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2023
- /* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm", children: "Documentação" }),
2024
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
2025
- "Verifique ",
2026
- /* @__PURE__ */ jsx("code", { children: "MAP_SETUP.md" }),
2027
- " para configuração inicial e requisitos de API."
2028
- ] })
2029
- ] }),
2030
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2031
- /* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm", children: "Performance" }),
2032
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Utiliza carregamento assíncrono e AdvancedMarkerElement para melhor desempenho." })
2033
- ] }),
2034
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2035
- /* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm", children: "Design System" }),
2036
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
2037
- "Componentes seguem estritamente as variáveis de tokens do ",
2038
- /* @__PURE__ */ jsx("code", { children: "globals.css" }),
2039
- "."
2040
- ] })
2041
- ] })
2042
- ] })
2043
- ] });
2044
- }
2045
- function TemplateContent() {
2046
- const { t: t2 } = useTranslation();
2047
- const layout = useOptionalLayout();
2048
- const [localSidebarExpanded, setLocalSidebarExpanded] = useState(false);
2049
- const [localSidebarWidth, setLocalSidebarWidth] = useState(280);
2050
- const sidebarExpanded = (layout == null ? void 0 : layout.sidebarExpanded) ?? localSidebarExpanded;
2051
- const sidebarWidth = (layout == null ? void 0 : layout.sidebarWidth) ?? localSidebarWidth;
2052
- const setSidebarWidth = (layout == null ? void 0 : layout.setSidebarWidth) ?? setLocalSidebarWidth;
2053
- (layout == null ? void 0 : layout.toggleSidebar) ?? (() => setLocalSidebarExpanded((value) => !value));
2054
- useNavigate();
2055
- const { data: teamMembers = [], isLoading: teamLoading } = useTeamMembers();
2056
- const progress = useDashboardStore((s) => s.progress);
2057
- const setProgress = useDashboardStore((s) => s.setProgress);
2058
- const sliderValue = useDashboardStore((s) => s.sliderValue);
2059
- const setSliderValue = useDashboardStore((s) => s.setSliderValue);
2060
- const switchEnabled = useDashboardStore((s) => s.switchEnabled);
2061
- const toggleSwitch = useDashboardStore((s) => s.toggleSwitch);
2062
- const [showSidebarUser, setShowSidebarUser] = useState(true);
2063
- const [showSidebarSettings, setShowSidebarSettings] = useState(true);
2064
- const [showSidebarLogout, setShowSidebarLogout] = useState(true);
2065
- const [showHeaderActions, setShowHeaderActions] = useState(true);
2066
- const [showHeaderBreadcrumbs, setShowHeaderBreadcrumbs] = useState(true);
2067
- const handleFormSubmit = (e) => {
2068
- e.preventDefault();
2069
- toast.success("Form submitted successfully!");
2070
- };
2071
- return /* @__PURE__ */ jsxs(
2072
- "div",
2073
- {
2074
- className: "flex-1 flex flex-col overflow-hidden transition-all duration-300",
2075
- style: {
2076
- paddingLeft: sidebarExpanded ? `${sidebarWidth}px` : "80px"
2077
- },
2078
- children: [
2079
- /* @__PURE__ */ jsx(
2080
- Header,
2081
- {
2082
- showThemeToggle: true,
2083
- showLanguageSelector: true,
2084
- breadcrumbs: [
2085
- { label: "Design System", href: "/home", icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" }) },
2086
- { label: "Página de Template" }
2087
- ],
2088
- renderLink: (href, props) => /* @__PURE__ */ jsx(Link, { to: href, ...props })
2089
- }
2090
- ),
2091
- /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-hidden bg-muted", children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsx("div", { className: "p-2 sm:p-4 md:p-6", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto space-y-8", children: [
2092
- /* @__PURE__ */ jsx(
2093
- PageHeader,
2094
- {
2095
- title: "Página de Template",
2096
- subtitle: "Template completo com componentes do Design System"
2097
- }
2098
- ),
2099
- /* @__PURE__ */ jsxs("section", { children: [
2100
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: "Header with Breadcrumbs" }),
2101
- /* @__PURE__ */ jsxs(Card, { children: [
2102
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2103
- /* @__PURE__ */ jsx(CardTitle, { children: "Main Header" }),
2104
- /* @__PURE__ */ jsx(CardDescription, { children: "Example of Header with 4-level breadcrumbs" })
2105
- ] }),
2106
- /* @__PURE__ */ jsxs(CardContent, { className: "p-0 border-t bg-background overflow-hidden rounded-b-[var(--radius-lg)]", children: [
2107
- /* @__PURE__ */ jsx(
2108
- Header,
2109
- {
2110
- className: "border-b",
2111
- breadcrumbs: [
2112
- { label: "Dashboard", href: "#", icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" }) },
2113
- { label: "Settings", href: "#", icon: /* @__PURE__ */ jsx(Settings, { className: "w-4 h-4" }) },
2114
- { label: "Users", href: "#", icon: /* @__PURE__ */ jsx(Users, { className: "w-4 h-4" }) },
2115
- { label: "Access Profile" }
2116
- ],
2117
- showLanguageSelector: true,
2118
- showThemeToggle: true
2119
- }
2120
- ),
2121
- /* @__PURE__ */ jsxs("div", { className: "p-6 min-h-[200px]", children: [
2122
- /* @__PURE__ */ jsx("h4", { className: "text-lg font-semibold mb-2", children: "Example Content" }),
2123
- /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
2124
- "Neste exemplo, o componente ",
2125
- /* @__PURE__ */ jsx("strong", { children: "Header" }),
2126
- " principal da aplicação agora suporta receber um array de breadcrumbs para navegações complexas com mais de 3 níveis."
2127
- ] })
2128
- ] })
2129
- ] })
2130
- ] })
2131
- ] }),
2132
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2133
- /* @__PURE__ */ jsxs("section", { children: [
2134
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: "Alertas" }),
2135
- /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [
2136
- /* @__PURE__ */ jsxs(Alert, { variant: "info", children: [
2137
- /* @__PURE__ */ jsx(AlertTitle, { children: "Informação" }),
2138
- /* @__PURE__ */ jsx(AlertDescription, { children: "Este é um exemplo de alerta informativo usando os componentes do Design System." })
2139
- ] }),
2140
- /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
2141
- /* @__PURE__ */ jsx(AlertTitle, { children: "Erro" }),
2142
- /* @__PURE__ */ jsx(AlertDescription, { children: "Ocorreu um erro ao processar sua solicitação." })
2143
- ] }),
2144
- /* @__PURE__ */ jsxs(Alert, { variant: "success", children: [
2145
- /* @__PURE__ */ jsx(AlertTitle, { children: "Sucesso" }),
2146
- /* @__PURE__ */ jsx(AlertDescription, { children: "Operação realizada com sucesso!" })
2147
- ] }),
2148
- /* @__PURE__ */ jsxs(Alert, { variant: "warning", children: [
2149
- /* @__PURE__ */ jsx(AlertTitle, { children: "Aviso" }),
2150
- /* @__PURE__ */ jsx(AlertDescription, { children: "Atenção: Esta ação não pode ser desfeita." })
2151
- ] })
2152
- ] })
2153
- ] }),
2154
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2155
- /* @__PURE__ */ jsxs("section", { children: [
2156
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: "Cards & Abas" }),
2157
- /* @__PURE__ */ jsxs(Tabs, { defaultValue: "overview", className: "w-full", children: [
2158
- /* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-4", children: [
2159
- /* @__PURE__ */ jsx(TabsTrigger, { value: "overview", children: "Visão Geral" }),
2160
- /* @__PURE__ */ jsx(TabsTrigger, { value: "forms", children: "Formulários" }),
2161
- /* @__PURE__ */ jsx(TabsTrigger, { value: "data", children: "Dados" }),
2162
- /* @__PURE__ */ jsx(TabsTrigger, { value: "settings", children: "Configurações" })
2163
- ] }),
2164
- /* @__PURE__ */ jsxs(TabsContent, { value: "overview", className: "space-y-4", children: [
2165
- /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-3", children: [
2166
- /* @__PURE__ */ jsxs(Card, { children: [
2167
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2168
- /* @__PURE__ */ jsx(CardTitle, { children: "Total de Usuários" }),
2169
- /* @__PURE__ */ jsx(CardDescription, { children: "Últimos 30 dias" })
2170
- ] }),
2171
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "text-foreground", children: [
2172
- /* @__PURE__ */ jsx("span", { className: "[font-size:var(--text-stats)] [font-weight:var(--font-weight-bold)]", children: "1,234" }),
2173
- /* @__PURE__ */ jsx(Badge, { variant: "default", className: "ml-2", children: "+12%" })
2174
- ] }) })
2175
- ] }),
2176
- /* @__PURE__ */ jsxs(Card, { children: [
2177
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2178
- /* @__PURE__ */ jsx(CardTitle, { children: "Receita Total" }),
2179
- /* @__PURE__ */ jsx(CardDescription, { children: "Mês atual" })
2180
- ] }),
2181
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "text-foreground", children: [
2182
- /* @__PURE__ */ jsx("span", { className: "[font-size:var(--text-stats)] [font-weight:var(--font-weight-bold)]", children: "$ 45.2k" }),
2183
- /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "ml-2", children: "+8%" })
2184
- ] }) })
2185
- ] }),
2186
- /* @__PURE__ */ jsxs(Card, { children: [
2187
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2188
- /* @__PURE__ */ jsx(CardTitle, { children: "Taxa de Conversão" }),
2189
- /* @__PURE__ */ jsx(CardDescription, { children: "Semana atual" })
2190
- ] }),
2191
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "text-foreground", children: [
2192
- /* @__PURE__ */ jsx("span", { className: "[font-size:var(--text-stats)] [font-weight:var(--font-weight-bold)]", children: "3.2%" }),
2193
- /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "ml-2", children: "-2%" })
2194
- ] }) })
2195
- ] })
2196
- ] }),
2197
- /* @__PURE__ */ jsxs(Card, { children: [
2198
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2199
- /* @__PURE__ */ jsx(CardTitle, { children: "Progresso & Sliders" }),
2200
- /* @__PURE__ */ jsx(CardDescription, { children: "Exemplo de componentes de progresso" })
2201
- ] }),
2202
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2203
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2204
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2205
- /* @__PURE__ */ jsx(Label, { children: "Progresso do Projeto" }),
2206
- /* @__PURE__ */ jsxs("span", { className: "[font-size:var(--text-small)] text-muted-foreground", children: [
2207
- progress,
2208
- "%"
2209
- ] })
2210
- ] }),
2211
- /* @__PURE__ */ jsx(Progress, { value: progress, className: "w-full" }),
2212
- /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
2213
- /* @__PURE__ */ jsx(
2214
- Button,
2215
- {
2216
- size: "sm",
2217
- onClick: () => setProgress(Math.max(0, progress - 10)),
2218
- children: "-10%"
2219
- }
2220
- ),
2221
- /* @__PURE__ */ jsx(
2222
- Button,
2223
- {
2224
- size: "sm",
2225
- onClick: () => setProgress(Math.min(100, progress + 10)),
2226
- children: "+10%"
2227
- }
2228
- )
2229
- ] })
2230
- ] }),
2231
- /* @__PURE__ */ jsx(Separator, {}),
2232
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2233
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2234
- /* @__PURE__ */ jsx(Label, { children: "Volume" }),
2235
- /* @__PURE__ */ jsxs("span", { className: "[font-size:var(--text-small)] text-muted-foreground", children: [
2236
- sliderValue[0],
2237
- "%"
2238
- ] })
2239
- ] }),
2240
- /* @__PURE__ */ jsx(
2241
- Slider,
2242
- {
2243
- value: sliderValue,
2244
- onValueChange: setSliderValue,
2245
- min: 0,
2246
- max: 100,
2247
- step: 1,
2248
- className: "w-full",
2249
- "aria-label": "Volume"
2250
- }
2251
- )
2252
- ] })
2253
- ] })
2254
- ] })
2255
- ] }),
2256
- /* @__PURE__ */ jsx(TabsContent, { value: "forms", className: "space-y-4", children: /* @__PURE__ */ jsxs(Card, { children: [
2257
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2258
- /* @__PURE__ */ jsx(CardTitle, { children: "Formulário de Cadastro" }),
2259
- /* @__PURE__ */ jsx(CardDescription, { children: "Preencha os campos abaixo para criar uma nova conta" })
2260
- ] }),
2261
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("form", { onSubmit: handleFormSubmit, className: "space-y-4", children: [
2262
- /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [
2263
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2264
- /* @__PURE__ */ jsx(Label, { htmlFor: "firstName", children: "Nome" }),
2265
- /* @__PURE__ */ jsx(Input, { id: "firstName", placeholder: "João" })
2266
- ] }),
2267
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2268
- /* @__PURE__ */ jsx(Label, { htmlFor: "lastName", children: "Sobrenome" }),
2269
- /* @__PURE__ */ jsx(Input, { id: "lastName", placeholder: "Silva" })
2270
- ] })
2271
- ] }),
2272
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2273
- /* @__PURE__ */ jsx(Label, { htmlFor: "email", children: "E-mail" }),
2274
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2275
- /* @__PURE__ */ jsx(Mail, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
2276
- /* @__PURE__ */ jsx(
2277
- Input,
2278
- {
2279
- id: "email",
2280
- type: "email",
2281
- placeholder: "john@example.com",
2282
- className: "pl-10"
2283
- }
2284
- )
2285
- ] })
2286
- ] }),
2287
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2288
- /* @__PURE__ */ jsx(Label, { htmlFor: "phone", children: "Telefone" }),
2289
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2290
- /* @__PURE__ */ jsx(Phone, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
2291
- /* @__PURE__ */ jsx(
2292
- Input,
2293
- {
2294
- id: "phone",
2295
- type: "tel",
2296
- placeholder: "(11) 99999-9999",
2297
- className: "pl-10"
2298
- }
2299
- )
2300
- ] })
2301
- ] }),
2302
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2303
- /* @__PURE__ */ jsx(Label, { htmlFor: "role", children: "Função" }),
2304
- /* @__PURE__ */ jsxs(Select, { children: [
2305
- /* @__PURE__ */ jsx(SelectTrigger, { id: "role", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Selecione uma função" }) }),
2306
- /* @__PURE__ */ jsxs(SelectContent, { children: [
2307
- /* @__PURE__ */ jsx(SelectItem, { value: "developer", children: "Desenvolvedor" }),
2308
- /* @__PURE__ */ jsx(SelectItem, { value: "designer", children: "Designer" }),
2309
- /* @__PURE__ */ jsx(SelectItem, { value: "manager", children: "Gerente" }),
2310
- /* @__PURE__ */ jsx(SelectItem, { value: "analyst", children: "Analista" })
2311
- ] })
2312
- ] })
2313
- ] }),
2314
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2315
- /* @__PURE__ */ jsx(Label, { htmlFor: "bio", children: "Biografia" }),
2316
- /* @__PURE__ */ jsx(
2317
- Textarea,
2318
- {
2319
- id: "bio",
2320
- placeholder: "Conte-nos um pouco sobre você...",
2321
- rows: 4
2322
- }
2323
- )
2324
- ] }),
2325
- /* @__PURE__ */ jsx(Separator, {}),
2326
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
2327
- /* @__PURE__ */ jsx("h4", { children: "Preferências" }),
2328
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2329
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2330
- /* @__PURE__ */ jsx(Checkbox, { id: "newsletter" }),
2331
- /* @__PURE__ */ jsx(Label, { htmlFor: "newsletter", className: "font-normal", children: "Receber newsletter por e-mail" })
2332
- ] }),
2333
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2334
- /* @__PURE__ */ jsx(Checkbox, { id: "notifications" }),
2335
- /* @__PURE__ */ jsx(Label, { htmlFor: "notifications", className: "font-normal", children: "Ativar notificações push" })
2336
- ] }),
2337
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2338
- /* @__PURE__ */ jsx(Checkbox, { id: "updates" }),
2339
- /* @__PURE__ */ jsx(Label, { htmlFor: "updates", className: "font-normal", children: "Receber atualizações sobre novos recursos" })
2340
- ] })
2341
- ] }),
2342
- /* @__PURE__ */ jsx(Separator, {}),
2343
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2344
- /* @__PURE__ */ jsx(Label, { children: "Tipo de Conta" }),
2345
- /* @__PURE__ */ jsxs(RadioGroup, { defaultValue: "personal", "aria-label": "Tipo de Conta", children: [
2346
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2347
- /* @__PURE__ */ jsx(RadioGroupItem, { value: "personal", id: "personal" }),
2348
- /* @__PURE__ */ jsx(Label, { htmlFor: "personal", className: "font-normal", children: "Pessoal" })
2349
- ] }),
2350
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2351
- /* @__PURE__ */ jsx(RadioGroupItem, { value: "business", id: "business" }),
2352
- /* @__PURE__ */ jsx(Label, { htmlFor: "business", className: "font-normal", children: "Empresarial" })
2353
- ] }),
2354
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2355
- /* @__PURE__ */ jsx(RadioGroupItem, { value: "enterprise", id: "enterprise" }),
2356
- /* @__PURE__ */ jsx(Label, { htmlFor: "enterprise", className: "font-normal", children: "Corporativo" })
2357
- ] })
2358
- ] })
2359
- ] })
2360
- ] })
2361
- ] }) }),
2362
- /* @__PURE__ */ jsxs(CardFooter, { className: "flex justify-between", children: [
2363
- /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Cancelar" }),
2364
- /* @__PURE__ */ jsx(Button, { onClick: handleFormSubmit, children: "Criar Conta" })
2365
- ] })
2366
- ] }) }),
2367
- /* @__PURE__ */ jsx(TabsContent, { value: "data", className: "space-y-4", children: /* @__PURE__ */ jsx(SectionErrorBoundary, { children: /* @__PURE__ */ jsxs(Card, { children: [
2368
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2369
- /* @__PURE__ */ jsx(CardTitle, { children: "Lista de Usuários" }),
2370
- /* @__PURE__ */ jsx(CardDescription, { children: "Gerenciar usuários do sistema" })
2371
- ] }),
2372
- /* @__PURE__ */ jsxs(CardContent, { children: [
2373
- /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2374
- /* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
2375
- /* @__PURE__ */ jsx(
2376
- Input,
2377
- {
2378
- placeholder: "Buscar usuários...",
2379
- "aria-label": "Buscar usuários",
2380
- className: "pl-10"
2381
- }
2382
- )
2383
- ] }) }),
2384
- /* @__PURE__ */ jsx("div", { className: "rounded-[var(--radius-lg)] border border-border overflow-hidden", children: /* @__PURE__ */ jsxs(Table, { children: [
2385
- /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
2386
- /* @__PURE__ */ jsx(TableHead, { children: t2("team.name") }),
2387
- /* @__PURE__ */ jsx(TableHead, { children: t2("team.email") }),
2388
- /* @__PURE__ */ jsx(TableHead, { children: t2("team.role") }),
2389
- /* @__PURE__ */ jsx(TableHead, { children: t2("team.status") }),
2390
- /* @__PURE__ */ jsx(TableHead, { className: "text-right", children: t2("team.actions") })
2391
- ] }) }),
2392
- /* @__PURE__ */ jsx(TableBody, { children: teamLoading ? /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxs(TableRow, { children: [
2393
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2394
- /* @__PURE__ */ jsx(Skeleton, { className: "size-8 rounded-full shrink-0" }),
2395
- /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-28" })
2396
- ] }) }),
2397
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-36" }) }),
2398
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-20" }) }),
2399
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-16 rounded-full" }) }),
2400
- /* @__PURE__ */ jsx(TableCell, { className: "text-right", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-7 w-14 ml-auto" }) })
2401
- ] }, i)) }) : teamMembers.map((member) => /* @__PURE__ */ jsxs(TableRow, { children: [
2402
- /* @__PURE__ */ jsx(TableCell, { children: member.name }),
2403
- /* @__PURE__ */ jsx(TableCell, { children: member.email }),
2404
- /* @__PURE__ */ jsx(TableCell, { children: t2(`team.roles.${member.role}`) }),
2405
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(
2406
- Badge,
2407
- {
2408
- variant: member.status === "active" ? "default" : member.status === "away" ? "secondary" : "outline",
2409
- children: t2(`common.${member.status}`)
2410
- }
2411
- ) }),
2412
- /* @__PURE__ */ jsx(TableCell, { className: "text-right", children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", children: t2("common.edit") }) })
2413
- ] }, member.id)) })
2414
- ] }) })
2415
- ] }),
2416
- /* @__PURE__ */ jsxs(CardFooter, { className: "flex justify-between items-center", children: [
2417
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t2("team.showing", { count: teamMembers.length, total: teamMembers.length }) }),
2418
- /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
2419
- /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", children: "Previous" }),
2420
- /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", children: "Next" })
2421
- ] })
2422
- ] })
2423
- ] }) }) }),
2424
- /* @__PURE__ */ jsx(TabsContent, { value: "settings", className: "space-y-4", children: /* @__PURE__ */ jsxs(Card, { children: [
2425
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2426
- /* @__PURE__ */ jsx(CardTitle, { children: "Configurações do Sistema" }),
2427
- /* @__PURE__ */ jsx(CardDescription, { children: "Gerenciar configurações gerais" })
2428
- ] }),
2429
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2430
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2431
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
2432
- /* @__PURE__ */ jsx(Label, { htmlFor: "dark-mode", children: "Dark Mode" }),
2433
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Enable dark theme in the interface" })
2434
- ] }),
2435
- /* @__PURE__ */ jsx(
2436
- Switch,
2437
- {
2438
- id: "dark-mode",
2439
- checked: switchEnabled,
2440
- onCheckedChange: toggleSwitch
2441
- }
2442
- )
2443
- ] }),
2444
- /* @__PURE__ */ jsx(Separator, {}),
2445
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2446
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
2447
- /* @__PURE__ */ jsx(Label, { htmlFor: "email-notifications", children: "Email Notifications" }),
2448
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Receive important updates by email" })
2449
- ] }),
2450
- /* @__PURE__ */ jsx(Switch, { id: "email-notifications", defaultChecked: true })
2451
- ] }),
2452
- /* @__PURE__ */ jsx(Separator, {}),
2453
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2454
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
2455
- /* @__PURE__ */ jsx(Label, { htmlFor: "push-notifications", children: "Push Notifications" }),
2456
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Receive instant notifications in the browser" })
2457
- ] }),
2458
- /* @__PURE__ */ jsx(Switch, { id: "push-notifications" })
2459
- ] }),
2460
- /* @__PURE__ */ jsx(Separator, {}),
2461
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2462
- /* @__PURE__ */ jsx(Label, { children: "Language" }),
2463
- /* @__PURE__ */ jsxs(Select, { defaultValue: "pt-br", children: [
2464
- /* @__PURE__ */ jsx(SelectTrigger, { "aria-label": "Idioma do sistema", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
2465
- /* @__PURE__ */ jsxs(SelectContent, { children: [
2466
- /* @__PURE__ */ jsx(SelectItem, { value: "pt-br", children: "Portuguese (Brazil)" }),
2467
- /* @__PURE__ */ jsx(SelectItem, { value: "en", children: "English" }),
2468
- /* @__PURE__ */ jsx(SelectItem, { value: "es", children: "Spanish" })
2469
- ] })
2470
- ] })
2471
- ] }),
2472
- /* @__PURE__ */ jsx(Separator, {}),
2473
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2474
- /* @__PURE__ */ jsx(Label, { children: "Time Zone" }),
2475
- /* @__PURE__ */ jsxs(Select, { defaultValue: "america-sao-paulo", children: [
2476
- /* @__PURE__ */ jsx(SelectTrigger, { "aria-label": "Fuso horário", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
2477
- /* @__PURE__ */ jsxs(SelectContent, { children: [
2478
- /* @__PURE__ */ jsx(SelectItem, { value: "america-sao-paulo", children: "America/Sao Paulo (GMT-3)" }),
2479
- /* @__PURE__ */ jsx(SelectItem, { value: "america-new-york", children: "America/New York (GMT-5)" }),
2480
- /* @__PURE__ */ jsx(SelectItem, { value: "europe-london", children: "Europe/London (GMT+0)" })
2481
- ] })
2482
- ] })
2483
- ] })
2484
- ] }),
2485
- /* @__PURE__ */ jsxs(CardFooter, { className: "flex justify-between", children: [
2486
- /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Restaurar Padrões" }),
2487
- /* @__PURE__ */ jsx(Button, { children: "Salvar Alterações" })
2488
- ] })
2489
- ] }) })
2490
- ] })
2491
- ] }),
2492
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2493
- /* @__PURE__ */ jsxs("section", { children: [
2494
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: "Botões" }),
2495
- /* @__PURE__ */ jsxs(Card, { children: [
2496
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2497
- /* @__PURE__ */ jsx(CardTitle, { children: "Variações de Botão" }),
2498
- /* @__PURE__ */ jsx(CardDescription, { children: "Diferentes estilos e tamanhos de botões" })
2499
- ] }),
2500
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2501
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2502
- /* @__PURE__ */ jsx(Label, { children: "Variants" }),
2503
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2504
- /* @__PURE__ */ jsx(Button, { variant: "default", children: "Default" }),
2505
- /* @__PURE__ */ jsx(Button, { variant: "secondary", children: "Secondary" }),
2506
- /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Outline" }),
2507
- /* @__PURE__ */ jsx(Button, { variant: "ghost", children: "Ghost" }),
2508
- /* @__PURE__ */ jsx(Button, { variant: "link", children: "Link" }),
2509
- /* @__PURE__ */ jsx(Button, { variant: "destructive", children: "Destructive" })
2510
- ] })
2511
- ] }),
2512
- /* @__PURE__ */ jsx(Separator, {}),
2513
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2514
- /* @__PURE__ */ jsx(Label, { children: "Sizes" }),
2515
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
2516
- /* @__PURE__ */ jsx(Button, { size: "sm", children: "Small" }),
2517
- /* @__PURE__ */ jsx(Button, { size: "default", children: "Default" }),
2518
- /* @__PURE__ */ jsx(Button, { size: "lg", children: "Large" }),
2519
- /* @__PURE__ */ jsx(Button, { size: "icon", "aria-label": "Configurações", children: /* @__PURE__ */ jsx(Settings, { className: "h-4 w-4" }) })
2520
- ] })
2521
- ] }),
2522
- /* @__PURE__ */ jsx(Separator, {}),
2523
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2524
- /* @__PURE__ */ jsx(Label, { children: "With Icons" }),
2525
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2526
- /* @__PURE__ */ jsxs(Button, { children: [
2527
- /* @__PURE__ */ jsx(User, { className: "mr-2 h-4 w-4" }),
2528
- "Profile"
2529
- ] }),
2530
- /* @__PURE__ */ jsxs(Button, { variant: "secondary", children: [
2531
- /* @__PURE__ */ jsx(Mail, { className: "mr-2 h-4 w-4" }),
2532
- "Messages"
2533
- ] }),
2534
- /* @__PURE__ */ jsxs(Button, { variant: "outline", children: [
2535
- /* @__PURE__ */ jsx(Calendar, { className: "mr-2 h-4 w-4" }),
2536
- "Schedule"
2537
- ] })
2538
- ] })
2539
- ] }),
2540
- /* @__PURE__ */ jsx(Separator, {}),
2541
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2542
- /* @__PURE__ */ jsx(Label, { children: "States" }),
2543
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2544
- /* @__PURE__ */ jsx(Button, { disabled: true, children: "Disabled" }),
2545
- /* @__PURE__ */ jsx(Button, { variant: "outline", disabled: true, children: "Outline Disabled" })
2546
- ] })
2547
- ] })
2548
- ] })
2549
- ] })
2550
- ] }),
2551
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2552
- /* @__PURE__ */ jsxs("section", { children: [
2553
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: "Badges" }),
2554
- /* @__PURE__ */ jsxs(Card, { children: [
2555
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2556
- /* @__PURE__ */ jsx(CardTitle, { children: "Variações de Badge" }),
2557
- /* @__PURE__ */ jsx(CardDescription, { children: "Estilos diferentes de badge para status e tags" })
2558
- ] }),
2559
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2560
- /* @__PURE__ */ jsx(Badge, { variant: "default", children: "Padrão" }),
2561
- /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: "Secundário" }),
2562
- /* @__PURE__ */ jsx(Badge, { variant: "outline", children: "Contorno" }),
2563
- /* @__PURE__ */ jsx(Badge, { variant: "destructive", children: "Destrutivo" }),
2564
- /* @__PURE__ */ jsx(Badge, { className: "bg-success text-success-foreground", children: "Sucesso" }),
2565
- /* @__PURE__ */ jsx(Badge, { className: "bg-warning text-warning-foreground", children: "Aviso" }),
2566
- /* @__PURE__ */ jsx(Badge, { className: "bg-info text-info-foreground", children: "Info" })
2567
- ] }) })
2568
- ] })
2569
- ] }),
2570
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2571
- /* @__PURE__ */ jsxs("section", { children: [
2572
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: "Diálogos" }),
2573
- /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [
2574
- /* @__PURE__ */ jsxs(Card, { children: [
2575
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2576
- /* @__PURE__ */ jsx(CardTitle, { children: "Diálogo" }),
2577
- /* @__PURE__ */ jsx(CardDescription, { children: "Um modal interativo básico" })
2578
- ] }),
2579
- /* @__PURE__ */ jsx(CardContent, { className: "flex justify-center py-6", children: /* @__PURE__ */ jsxs(Dialog, { children: [
2580
- /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Editar Perfil" }) }),
2581
- /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [
2582
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
2583
- /* @__PURE__ */ jsx(DialogTitle, { children: "Editar Perfil" }),
2584
- /* @__PURE__ */ jsx(DialogDescription, { children: "Faça alterações no seu perfil aqui. Clique em salvar quando terminar." })
2585
- ] }),
2586
- /* @__PURE__ */ jsxs("div", { className: "grid gap-4 py-4", children: [
2587
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [
2588
- /* @__PURE__ */ jsx(Label, { htmlFor: "name", className: "text-right", children: "Nome" }),
2589
- /* @__PURE__ */ jsx(Input, { id: "name", defaultValue: "John Doe", className: "col-span-3" })
2590
- ] }),
2591
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [
2592
- /* @__PURE__ */ jsx(Label, { htmlFor: "username", className: "text-right", children: "Usuário" }),
2593
- /* @__PURE__ */ jsx(Input, { id: "username", defaultValue: "@johndoe", className: "col-span-3" })
2594
- ] })
2595
- ] }),
2596
- /* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsx(Button, { type: "submit", children: "Atualizar" }) })
2597
- ] })
2598
- ] }) })
2599
- ] }),
2600
- /* @__PURE__ */ jsxs(Card, { children: [
2601
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2602
- /* @__PURE__ */ jsx(CardTitle, { children: "Alerta de Diálogo" }),
2603
- /* @__PURE__ */ jsx(CardDescription, { children: "Um alerta para decisões importantes" })
2604
- ] }),
2605
- /* @__PURE__ */ jsx(CardContent, { className: "flex justify-center py-6", children: /* @__PURE__ */ jsxs(AlertDialog, { children: [
2606
- /* @__PURE__ */ jsx(AlertDialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "destructive", children: "Excluir Conta" }) }),
2607
- /* @__PURE__ */ jsxs(AlertDialogContent, { className: "sm:max-w-[425px]", children: [
2608
- /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
2609
- /* @__PURE__ */ jsx(AlertDialogTitle, { children: "Você tem certeza absoluta?" }),
2610
- /* @__PURE__ */ jsx(AlertDialogDescription, { children: "Esta ação não pode ser desfeita. Isso excluirá permanentemente sua conta e removerá seus dados de nossos servidores." })
2611
- ] }),
2612
- /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
2613
- /* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancelar" }),
2614
- /* @__PURE__ */ jsx(AlertDialogAction, { className: "bg-destructive text-destructive-foreground hover:bg-destructive/90", children: "Continuar" })
2615
- ] })
2616
- ] })
2617
- ] }) })
2618
- ] })
2619
- ] })
2620
- ] }),
2621
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2622
- /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsx(MapShowcase, {}) }),
2623
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2624
- /* @__PURE__ */ jsxs("section", { children: [
2625
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: "Variações de Cabeçalho" }),
2626
- /* @__PURE__ */ jsxs(Card, { children: [
2627
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2628
- /* @__PURE__ */ jsx(CardTitle, { children: "Configurações do Cabeçalho Principal" }),
2629
- /* @__PURE__ */ jsx(CardDescription, { children: "O Header é focado em navegação (breadcrumbs) e ações contextuais rápidas." })
2630
- ] }),
2631
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2632
- /* @__PURE__ */ jsxs("div", { className: "p-4 border rounded-[var(--radius-lg)] bg-muted/30", children: [
2633
- /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold mb-4", children: "Elementos Visíveis" }),
2634
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-6", children: [
2635
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2636
- /* @__PURE__ */ jsx(
2637
- Switch,
2638
- {
2639
- id: "header-actions",
2640
- checked: showHeaderActions,
2641
- onCheckedChange: setShowHeaderActions
2642
- }
2643
- ),
2644
- /* @__PURE__ */ jsx(Label, { htmlFor: "header-actions", className: "cursor-pointer", children: "Botões de Ação" })
2645
- ] }),
2646
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2647
- /* @__PURE__ */ jsx(
2648
- Switch,
2649
- {
2650
- id: "header-bread",
2651
- checked: showHeaderBreadcrumbs,
2652
- onCheckedChange: setShowHeaderBreadcrumbs
2653
- }
2654
- ),
2655
- /* @__PURE__ */ jsx(Label, { htmlFor: "header-bread", className: "cursor-pointer", children: "Breadcrumbs" })
2656
- ] })
2657
- ] })
2658
- ] }),
2659
- /* @__PURE__ */ jsxs("div", { className: "relative border rounded-[var(--radius-lg)] bg-muted/10 overflow-hidden shadow-inner", children: [
2660
- /* @__PURE__ */ jsx("div", { className: "p-4 bg-background/50 border-b text-xs font-mono text-muted-foreground", children: "Visualização" }),
2661
- /* @__PURE__ */ jsx(
2662
- Header,
2663
- {
2664
- title: !showHeaderBreadcrumbs ? "Página Atual" : void 0,
2665
- breadcrumbs: showHeaderBreadcrumbs ? [
2666
- {
2667
- label: "Xertica UI",
2668
- href: "#",
2669
- icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" })
2670
- },
2671
- { label: "Configurações", href: "#" },
2672
- { label: "Perfil" }
2673
- ] : void 0,
2674
- actions: showHeaderActions ? [
2675
- {
2676
- id: "notify",
2677
- icon: /* @__PURE__ */ jsx(Bell, { className: "w-5 h-5" }),
2678
- onClick: () => toast("Notificações abertas")
2679
- },
2680
- {
2681
- id: "mail",
2682
- label: "Mensagens",
2683
- icon: /* @__PURE__ */ jsx(Mail, { className: "w-5 h-5" }),
2684
- onClick: () => toast("Mensagens abertas")
2685
- }
2686
- ] : void 0
2687
- }
2688
- ),
2689
- /* @__PURE__ */ jsx("div", { className: "h-32 flex items-center justify-center text-muted-foreground text-sm italic", children: "Área de Conteúdo da Página" })
2690
- ] })
2691
- ] })
2692
- ] })
2693
- ] }),
2694
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2695
- /* @__PURE__ */ jsxs("section", { children: [
2696
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: "Variações da Sidebar" }),
2697
- /* @__PURE__ */ jsxs(Card, { children: [
2698
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2699
- /* @__PURE__ */ jsx(CardTitle, { children: "Sidebar Modo Assistente vs Padrão" }),
2700
- /* @__PURE__ */ jsx(CardDescription, { children: "A Sidebar suporta flexibilidade através da propriedade variant." })
2701
- ] }),
2702
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: "assistant", className: "w-full", children: [
2703
- /* @__PURE__ */ jsxs(TabsList, { className: "mb-4", children: [
2704
- /* @__PURE__ */ jsx(TabsTrigger, { value: "assistant", children: "Modo Assistente" }),
2705
- /* @__PURE__ */ jsx(TabsTrigger, { value: "default", children: "Modo Padrão" })
2706
- ] }),
2707
- /* @__PURE__ */ jsxs("div", { className: "mb-6 p-4 border rounded-[var(--radius-lg)] bg-muted/30", children: [
2708
- /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold mb-4", children: "Configurações do Rodapé" }),
2709
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-6 mt-2", children: [
2710
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2711
- /* @__PURE__ */ jsx(
2712
- Switch,
2713
- {
2714
- id: "show-user",
2715
- checked: showSidebarUser,
2716
- onCheckedChange: setShowSidebarUser
2717
- }
2718
- ),
2719
- /* @__PURE__ */ jsx(Label, { htmlFor: "show-user", className: "cursor-pointer", children: "Perfil do Usuário" })
2720
- ] }),
2721
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2722
- /* @__PURE__ */ jsx(
2723
- Switch,
2724
- {
2725
- id: "show-settings",
2726
- checked: showSidebarSettings,
2727
- onCheckedChange: setShowSidebarSettings
2728
- }
2729
- ),
2730
- /* @__PURE__ */ jsx(Label, { htmlFor: "show-settings", className: "cursor-pointer", children: "Configurações" })
2731
- ] }),
2732
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2733
- /* @__PURE__ */ jsx(
2734
- Switch,
2735
- {
2736
- id: "show-logout",
2737
- checked: showSidebarLogout,
2738
- onCheckedChange: setShowSidebarLogout
2739
- }
2740
- ),
2741
- /* @__PURE__ */ jsx(Label, { htmlFor: "show-logout", className: "cursor-pointer", children: "Botão de Sair" })
2742
- ] })
2743
- ] }),
2744
- /* @__PURE__ */ jsxs("div", { className: "mt-6 pt-6 border-t", children: [
2745
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-4", children: [
2746
- /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold", children: "Largura da Sidebar (Desktop)" }),
2747
- /* @__PURE__ */ jsxs("span", { className: "text-xs font-mono bg-muted px-2 py-1 rounded", children: [
2748
- sidebarWidth,
2749
- "px"
2750
- ] })
2751
- ] }),
2752
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
2753
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground w-12 text-right", children: "240px" }),
2754
- /* @__PURE__ */ jsx(
2755
- Slider,
2756
- {
2757
- value: [sidebarWidth],
2758
- onValueChange: (val) => setSidebarWidth(val[0]),
2759
- min: 240,
2760
- max: 450,
2761
- step: 10,
2762
- className: "flex-1",
2763
- "aria-label": "Largura da Sidebar"
2764
- }
2765
- ),
2766
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground w-12", children: "450px" })
2767
- ] })
2768
- ] })
2769
- ] }),
2770
- /* @__PURE__ */ jsx(TabsContent, { value: "assistant", children: /* @__PURE__ */ jsxs(
2771
- "div",
2772
- {
2773
- className: "relative h-[600px] border rounded-[var(--radius-lg)] bg-muted/20 overflow-hidden",
2774
- style: { transform: "translateZ(0)" },
2775
- children: [
2776
- /* @__PURE__ */ jsx(
2777
- Sidebar,
2778
- {
2779
- expanded: true,
2780
- width: sidebarWidth,
2781
- onToggle: () => {
2782
- },
2783
- user: { email: "admin@xertica.com" },
2784
- onLogout: () => toast("Saiu"),
2785
- location: { pathname: "/assistant/current" },
2786
- navigate: () => {
2787
- },
2788
- variant: "assistant",
2789
- search: {
2790
- show: true,
2791
- placeholder: "Buscar tópicos...",
2792
- filter: {
2793
- show: true,
2794
- content: /* @__PURE__ */ jsxs("div", { className: "p-2 space-y-2", children: [
2795
- /* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase text-muted-foreground px-2", children: "Filtrar por Status" }),
2796
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2 p-1", children: [
2797
- /* @__PURE__ */ jsx(Badge, { className: "bg-sidebar-foreground/20 text-sidebar-foreground border-none cursor-pointer hover:bg-sidebar-foreground/30", children: "Ativo" }),
2798
- /* @__PURE__ */ jsx(
2799
- Badge,
2800
- {
2801
- variant: "outline",
2802
- className: "text-sidebar-foreground/70 border-sidebar-foreground/20 cursor-pointer hover:bg-sidebar-foreground/10",
2803
- children: "Arquivado"
2804
- }
2805
- ),
2806
- /* @__PURE__ */ jsx(
2807
- Badge,
2808
- {
2809
- variant: "outline",
2810
- className: "text-sidebar-foreground/70 border-sidebar-foreground/20 cursor-pointer hover:bg-sidebar-foreground/10",
2811
- children: "Pendente"
2812
- }
2813
- )
2814
- ] })
2815
- ] })
2816
- }
2817
- },
2818
- fixedArea: {
2819
- show: true,
2820
- content: /* @__PURE__ */ jsxs(Button, { className: "w-full bg-sidebar-primary hover:bg-sidebar-primary/90 text-sidebar-primary-foreground shadow-lg font-bold border-none transition-all duration-300 transform hover:scale-[1.02] active:scale-[0.98]", children: [
2821
- /* @__PURE__ */ jsx(Plus, { className: "w-4 h-4 mr-2" }),
2822
- "Nova Conversa"
2823
- ] })
2824
- },
2825
- navigationGroups: [
2826
- {
2827
- id: "recent",
2828
- label: "Recentes",
2829
- icon: Clock,
2830
- items: [
2831
- {
2832
- path: "/assistant/refatoracao",
2833
- label: "Refatoração da Sidebar",
2834
- description: "Ativo agora",
2835
- actions: [
2836
- {
2837
- label: "Renomear",
2838
- icon: FileEdit,
2839
- onClick: () => toast("Abrir renomear...")
2840
- },
2841
- {
2842
- label: "Mover",
2843
- icon: ArrowRightLeft,
2844
- children: [
2845
- {
2846
- label: "Projetos Ativos",
2847
- onClick: () => toast("Movido para Projetos Ativos")
2848
- },
2849
- {
2850
- label: "Monitoramento",
2851
- onClick: () => toast("Movido para Monitoramento")
2852
- },
2853
- {
2854
- label: "Arquivar",
2855
- onClick: () => toast("Movido para Arquivo")
2856
- }
2857
- ]
2858
- },
2859
- {
2860
- label: "Limpar",
2861
- icon: Trash2,
2862
- onClick: () => toast("Histórico Limpo!"),
2863
- variant: "destructive"
2864
- }
2865
- ]
2866
- }
2867
- ]
2868
- },
2869
- {
2870
- id: "projects",
2871
- label: "Monitoramento de Projetos",
2872
- icon: Map$1,
2873
- actions: [
2874
- {
2875
- label: "Nova Categoria",
2876
- icon: Plus,
2877
- onClick: () => toast("Criar nova categoria...")
2878
- },
2879
- {
2880
- label: "Arquivar Grupo",
2881
- icon: Archive,
2882
- onClick: () => toast("Arquivando grupo...")
2883
- }
2884
- ],
2885
- items: [
2886
- {
2887
- path: "/assistant/br163",
2888
- label: "Restauração BR-163",
2889
- icon: () => /* @__PURE__ */ jsx("div", { className: "w-2 h-2 rounded-full bg-yellow-500" }),
2890
- description: /* @__PURE__ */ jsxs("div", { className: "space-y-1.5 min-w-[160px]", children: [
2891
- /* @__PURE__ */ jsx(
2892
- Progress,
2893
- {
2894
- value: 67,
2895
- className: "h-1.5 bg-sidebar-foreground/10"
2896
- }
2897
- ),
2898
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center text-[10px] text-sidebar-foreground/60", children: [
2899
- /* @__PURE__ */ jsx("span", { children: "Cuiabá, MT" }),
2900
- /* @__PURE__ */ jsx("span", { children: "67%" })
2901
- ] })
2902
- ] })
2903
- }
2904
- ]
2905
- }
2906
- ],
2907
- footer: {
2908
- showUser: showSidebarUser,
2909
- showSettings: showSidebarSettings,
2910
- showLogout: showSidebarLogout
2911
- }
2912
- }
2913
- ),
2914
- /* @__PURE__ */ jsx(
2915
- "div",
2916
- {
2917
- className: "absolute inset-y-0 right-0 p-8 flex items-center justify-center transition-all duration-300",
2918
- style: { left: `${sidebarWidth}px` },
2919
- children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-center", children: "Conteúdo do Modo Assistente" })
2920
- }
2921
- )
2922
- ]
2923
- }
2924
- ) }),
2925
- /* @__PURE__ */ jsx(TabsContent, { value: "default", children: /* @__PURE__ */ jsxs(
2926
- "div",
2927
- {
2928
- className: "relative h-[600px] border rounded-[var(--radius-lg)] bg-muted/20 overflow-hidden",
2929
- style: { transform: "translateZ(0)" },
2930
- children: [
2931
- /* @__PURE__ */ jsx(
2932
- Sidebar,
2933
- {
2934
- expanded: true,
2935
- width: sidebarWidth,
2936
- onToggle: () => {
2937
- },
2938
- user: {
2939
- name: "Ariel Santos",
2940
- email: "admin@xertica.com",
2941
- avatar: "https://github.com/shadcn.png"
2942
- },
2943
- onLogout: () => toast("Saiu"),
2944
- onSettingsClick: () => toast("Configurações clicadas"),
2945
- location: { pathname: "/home" },
2946
- navigate: () => {
2947
- },
2948
- variant: "default",
2949
- routes: [
2950
- { path: "/home", label: "Início", icon: Home },
2951
- { path: "/dashboard", label: "Dashboard", icon: Users },
2952
- { path: "/settings", label: "Configurações", icon: Settings }
2953
- ],
2954
- footer: {
2955
- showUser: showSidebarUser,
2956
- showSettings: showSidebarSettings,
2957
- showLogout: showSidebarLogout
2958
- }
2959
- }
2960
- ),
2961
- /* @__PURE__ */ jsx(
2962
- "div",
2963
- {
2964
- className: "absolute inset-y-0 right-0 p-8 flex items-center justify-center transition-all duration-300",
2965
- style: { left: `${sidebarWidth}px` },
2966
- children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-center", children: "Navegação Tradicional do Sistema" })
2967
- }
2968
- )
2969
- ]
2970
- }
2971
- ) })
2972
- ] }) })
2973
- ] })
2974
- ] }),
2975
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2976
- /* @__PURE__ */ jsxs(Card, { className: "mt-8", children: [
2977
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2978
- /* @__PURE__ */ jsx(CardTitle, { children: "Template Pronto para CLI" }),
2979
- /* @__PURE__ */ jsx(CardDescription, { children: "Como usar este template" })
2980
- ] }),
2981
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
2982
- /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
2983
- "Este template está pronto para ser usado como base para novos projetos. Todos os componentes usam as variáveis CSS definidas em",
2984
- " ",
2985
- /* @__PURE__ */ jsx("code", { className: "bg-muted px-2 py-1 rounded-[var(--radius-sm)] [font-size:var(--text-small)]", children: "/styles/xertica/tokens.css" }),
2986
- "and follow the Xertica UI CLI-first architecture."
2987
- ] }),
2988
- /* @__PURE__ */ jsxs(Alert, { variant: "info", children: [
2989
- /* @__PURE__ */ jsx(AlertTitle, { children: "Dica" }),
2990
- /* @__PURE__ */ jsx(AlertDescription, { children: "Copie este arquivo como ponto de partida para suas páginas. Todos os componentes são reutilizáveis e customizáveis através de variáveis CSS." })
2991
- ] })
2992
- ] })
2993
- ] })
2994
- ] }) }) }) })
2995
- ]
2996
- }
2997
- );
2998
- }
2999
- function TemplatePage() {
3000
- const { user, logout } = useAuth();
3001
- const layout = useOptionalLayout();
3002
- const [localSidebarExpanded, setLocalSidebarExpanded] = React__default.useState(false);
3003
- const [localAssistantExpanded, setLocalAssistantExpanded] = React__default.useState(false);
3004
- const sidebarExpanded = (layout == null ? void 0 : layout.sidebarExpanded) ?? localSidebarExpanded;
3005
- const sidebarWidth = (layout == null ? void 0 : layout.sidebarWidth) ?? 280;
3006
- const assistenteExpanded = (layout == null ? void 0 : layout.assistenteExpanded) ?? localAssistantExpanded;
3007
- const toggleSidebar = (layout == null ? void 0 : layout.toggleSidebar) ?? (() => setLocalSidebarExpanded((value) => !value));
3008
- const toggleAssistente = (layout == null ? void 0 : layout.toggleAssistente) ?? (() => setLocalAssistantExpanded((value) => !value));
3009
- const location = useLocation();
3010
- const navigate = useNavigate();
3011
- return /* @__PURE__ */ jsxs("div", { className: "h-screen flex bg-muted overflow-hidden relative", children: [
3012
- /* @__PURE__ */ jsx(
3013
- Sidebar,
3014
- {
3015
- expanded: sidebarExpanded,
3016
- width: sidebarWidth,
3017
- onToggle: toggleSidebar,
3018
- user: {
3019
- ...user,
3020
- name: "Ariel Santos",
3021
- avatar: "https://github.com/shadcn.png"
3022
- },
3023
- onLogout: logout,
3024
- onSettingsClick: () => navigate("/settings"),
3025
- location,
3026
- navigate,
3027
- routes
3028
- }
3029
- ),
3030
- /* @__PURE__ */ jsx(TemplateContent, {}),
3031
- /* @__PURE__ */ jsx(
3032
- XerticaAssistant,
3033
- {
3034
- isExpanded: assistenteExpanded,
3035
- onToggle: toggleAssistente,
3036
- onEvaluation: () => {
3037
- }
3038
- }
3039
- )
3040
- ] });
3041
- }
3042
- function VerifyEmailPage() {
3043
- var _a;
3044
- const navigate = useNavigate();
3045
- const location = useLocation();
3046
- const { t: t2 } = useTranslation();
3047
- const email = ((_a = location.state) == null ? void 0 : _a.email) || "your@email.com";
3048
- const [isResending, setIsResending] = useState(false);
3049
- const [resendSuccess, setResendSuccess] = useState(false);
3050
- const handleResend = async () => {
3051
- setIsResending(true);
3052
- setResendSuccess(false);
3053
- await new Promise((resolve) => setTimeout(resolve, 1500));
3054
- setIsResending(false);
3055
- setResendSuccess(true);
3056
- setTimeout(() => setResendSuccess(false), 3e3);
3057
- };
3058
- const handleSocialLogin = (_provider) => {
3059
- };
3060
- return /* @__PURE__ */ jsxs("div", { className: "min-h-screen flex", children: [
3061
- /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
3062
- /* @__PURE__ */ jsx(
3063
- ImageWithFallback,
3064
- {
3065
- src: "https://images.unsplash.com/photo-1563986768609-322da13575f3?w=1200&h=800&fit=crop&auto=format",
3066
- alt: t2("verifyEmail.heroImageAlt"),
3067
- className: "absolute inset-0 w-full h-full object-cover"
3068
- }
3069
- ),
3070
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
3071
- ] }),
3072
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center justify-center px-4 sm:px-6 lg:px-8 lg:flex-none lg:w-1/2 relative bg-muted", children: [
3073
- /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsx(LanguageSelector, { variant: "minimal", showIcon: false }) }),
3074
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
3075
- /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm space-y-6 relative z-10", children: [
3076
- /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
3077
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(
3078
- XerticaLogo,
3079
- {
3080
- className: "h-12 w-auto text-primary dark:text-foreground",
3081
- variant: "theme"
3082
- }
3083
- ) }),
3084
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx("div", { className: "p-4 bg-primary/10 rounded-[var(--radius)]", children: /* @__PURE__ */ jsx(Mail, { className: "w-12 h-12 text-primary" }) }) }),
3085
- /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: t2("verifyEmail.heading") }),
3086
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: t2("verifyEmail.instructionsSent") }),
3087
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-primary", children: email })
3088
- ] }),
3089
- /* @__PURE__ */ jsxs("div", { className: "bg-accent rounded-[var(--radius)] p-4 space-y-3", children: [
3090
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t2("verifyEmail.instructions") }),
3091
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-muted-foreground", children: [
3092
- /* @__PURE__ */ jsx(CheckCircle2, { className: "w-4 h-4 mt-0.5 flex-shrink-0 text-[var(--chart-2)]" }),
3093
- /* @__PURE__ */ jsx("span", { className: "text-sm", children: t2("verifyEmail.checkSpam") })
3094
- ] })
3095
- ] }),
3096
- resendSuccess && /* @__PURE__ */ jsxs("div", { className: "bg-[var(--chart-2)]/10 border border-[var(--chart-2)]/20 rounded-[var(--radius)] p-3 flex items-center gap-2", children: [
3097
- /* @__PURE__ */ jsx(CheckCircle2, { className: "w-5 h-5 text-[var(--chart-2)] flex-shrink-0" }),
3098
- /* @__PURE__ */ jsx("span", { className: "text-sm text-[var(--chart-2)]", children: t2("verifyEmail.resentSuccess") })
3099
- ] }),
3100
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
3101
- /* @__PURE__ */ jsx("p", { className: "text-center text-muted-foreground", children: t2("verifyEmail.notReceived") }),
3102
- /* @__PURE__ */ jsx(
3103
- Button,
3104
- {
3105
- variant: "outline",
3106
- className: "w-full",
3107
- onClick: handleResend,
3108
- disabled: isResending,
3109
- children: isResending ? t2("verifyEmail.resending") : t2("verifyEmail.resend")
3110
- }
3111
- ),
3112
- /* @__PURE__ */ jsxs(
3113
- Button,
3114
- {
3115
- type: "button",
3116
- onClick: () => navigate("/login"),
3117
- variant: "outline",
3118
- className: "w-full text-muted-foreground hover:text-foreground",
3119
- children: [
3120
- /* @__PURE__ */ jsx(ArrowLeft, { className: "w-4 h-4 mr-2" }),
3121
- t2("verifyEmail.backToLogin")
3122
- ]
3123
- }
3124
- )
3125
- ] }),
3126
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
3127
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsx("div", { className: "w-full border-t border-border" }) }),
3128
- /* @__PURE__ */ jsx("div", { className: "relative flex justify-center text-sm", children: /* @__PURE__ */ jsx("span", { className: "bg-muted px-2 text-muted-foreground", children: t2("login.orContinueWith") }) })
3129
- ] }),
3130
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
3131
- /* @__PURE__ */ jsxs(
3132
- Button,
3133
- {
3134
- type: "button",
3135
- variant: "outline",
3136
- className: "w-full justify-center",
3137
- onClick: () => handleSocialLogin(),
3138
- children: [
3139
- /* @__PURE__ */ jsxs("svg", { className: "w-5 h-5 mr-2", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
3140
- /* @__PURE__ */ jsx(
3141
- "path",
3142
- {
3143
- fill: "#EA4335",
3144
- d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"
3145
- }
3146
- ),
3147
- /* @__PURE__ */ jsx(
3148
- "path",
3149
- {
3150
- fill: "#4285F4",
3151
- d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"
3152
- }
3153
- ),
3154
- /* @__PURE__ */ jsx(
3155
- "path",
3156
- {
3157
- fill: "#FBBC05",
3158
- d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"
3159
- }
3160
- ),
3161
- /* @__PURE__ */ jsx(
3162
- "path",
3163
- {
3164
- fill: "#34A853",
3165
- d: "M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"
3166
- }
3167
- ),
3168
- /* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
3169
- ] }),
3170
- /* @__PURE__ */ jsx("span", { children: t2("login.signInWithGoogle") })
3171
- ]
3172
- }
3173
- ),
3174
- /* @__PURE__ */ jsxs(
3175
- Button,
3176
- {
3177
- type: "button",
3178
- variant: "outline",
3179
- className: "w-full justify-center",
3180
- onClick: () => handleSocialLogin(),
3181
- children: [
3182
- /* @__PURE__ */ jsx(Lock, { className: "w-5 h-5 mr-2 text-[var(--chart-4)]" }),
3183
- /* @__PURE__ */ jsx("span", { children: t2("login.signInWithMTLogin") })
3184
- ]
3185
- }
3186
- ),
3187
- /* @__PURE__ */ jsx(
3188
- Button,
3189
- {
3190
- type: "button",
3191
- variant: "outline",
3192
- className: "w-full justify-center font-normal",
3193
- onClick: () => handleSocialLogin(),
3194
- children: /* @__PURE__ */ jsx("span", { children: t2("login.signInWithGovBr") })
3195
- }
3196
- )
3197
- ] })
3198
- ] })
3199
- ] })
3200
- ] });
3201
- }
3202
- export {
3203
- ForgotPasswordPage as F,
3204
- HomeContent as H,
3205
- LoginPage as L,
3206
- ResetPasswordPage as R,
3207
- TemplateContent as T,
3208
- VerifyEmailPage as V,
3209
- HomePage as a,
3210
- TemplatePage as b
3211
- };