xertica-ui 2.4.0 → 2.4.1

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 (524) hide show
  1. package/CHANGELOG.md +572 -564
  2. package/README.md +417 -417
  3. package/assets/xertica-logo.svg +37 -37
  4. package/assets/xertica-x-logo.svg +20 -20
  5. package/bin/cli.ts +1244 -1244
  6. package/bin/language-config.ts +358 -358
  7. package/components/assistant/code-block/CodeBlock.tsx +268 -268
  8. package/components/assistant/formatted-document/FormattedDocument.tsx +147 -147
  9. package/components/assistant/modern-chat-input/ModernChatInput.tsx +564 -564
  10. package/components/assistant/xertica-assistant/parts/AssistantCollapsedView.tsx +99 -99
  11. package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +104 -104
  12. package/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.tsx +81 -81
  13. package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +88 -88
  14. package/components/assistant/xertica-assistant/parts/AssistantHeader.tsx +75 -75
  15. package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +564 -564
  16. package/components/assistant/xertica-assistant/parts/AssistantTabBar.tsx +67 -67
  17. package/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.tsx +103 -103
  18. package/components/assistant/xertica-assistant/use-assistant.ts +615 -615
  19. package/components/assistant/xertica-assistant/xertica-assistant.tsx +611 -611
  20. package/components/blocks/card-patterns/ActivityCard.tsx +100 -100
  21. package/components/blocks/card-patterns/ActivityCardSkeleton.tsx +56 -56
  22. package/components/blocks/card-patterns/FeatureCardSkeleton.tsx +58 -58
  23. package/components/blocks/card-patterns/NotificationCard.tsx +140 -140
  24. package/components/blocks/card-patterns/NotificationCardSkeleton.tsx +81 -81
  25. package/components/blocks/card-patterns/ProfileCard.tsx +112 -112
  26. package/components/blocks/card-patterns/ProfileCardSkeleton.tsx +69 -69
  27. package/components/blocks/card-patterns/ProjectCard.tsx +123 -123
  28. package/components/blocks/card-patterns/ProjectCardSkeleton.tsx +67 -67
  29. package/components/blocks/card-patterns/QuickActionCardSkeleton.tsx +44 -44
  30. package/components/blocks/card-patterns/card-patterns.stories.tsx +594 -594
  31. package/components/blocks/card-patterns/index.ts +29 -29
  32. package/components/brand/language-selector/LanguageSelector.tsx +102 -102
  33. package/components/brand/language-selector/language-selector.stories.tsx +111 -111
  34. package/components/brand/language-selector/language-selector.test.tsx +101 -101
  35. package/components/brand/theme-toggle/ThemeToggle.tsx +74 -74
  36. package/components/brand/xertica-provider/XerticaProvider.tsx +109 -109
  37. package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
  38. package/components/index.ts +86 -86
  39. package/components/layout/sidebar/sidebar.mdx +1 -1
  40. package/components/layout/sidebar/sidebar.tsx +1079 -1079
  41. package/components/media/FloatingMediaWrapper.tsx +371 -371
  42. package/components/media/audio-player/AudioPlayer.tsx +768 -768
  43. package/components/media/video-player/VideoPlayer.tsx +310 -310
  44. package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +188 -188
  45. package/components/pages/home-content/HomeContent.tsx +120 -120
  46. package/components/pages/home-content/home-content.mdx +62 -62
  47. package/components/pages/home-page/HomePage.tsx +78 -78
  48. package/components/pages/home-page/home-page.mdx +53 -53
  49. package/components/pages/login-page/LoginPage.tsx +218 -218
  50. package/components/pages/reset-password-page/ResetPasswordPage.tsx +243 -243
  51. package/components/pages/template-content/TemplateContent.tsx +1354 -1354
  52. package/components/pages/template-content/template-content.mdx +61 -61
  53. package/components/pages/template-page/template-page.mdx +53 -53
  54. package/components/pages/verify-email-page/VerifyEmailPage.tsx +206 -206
  55. package/components/shared/error-boundary.stories.tsx +114 -114
  56. package/components/shared/error-boundary.tsx +150 -150
  57. package/components/shared/error-fallbacks.tsx +222 -222
  58. package/components/ui/accordion/accordion.mdx +8 -8
  59. package/components/ui/alert/alert.mdx +8 -8
  60. package/components/ui/alert-dialog/alert-dialog.mdx +8 -8
  61. package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -8
  62. package/components/ui/assistant-chart/assistant-chart.mdx +8 -8
  63. package/components/ui/avatar/avatar.mdx +8 -8
  64. package/components/ui/badge/badge.mdx +8 -8
  65. package/components/ui/breadcrumb/breadcrumb.mdx +8 -8
  66. package/components/ui/button/button.mdx +8 -8
  67. package/components/ui/calendar/calendar.mdx +8 -8
  68. package/components/ui/card/card.mdx +8 -8
  69. package/components/ui/carousel/carousel.mdx +8 -8
  70. package/components/ui/chart/chart.mdx +8 -8
  71. package/components/ui/checkbox/checkbox.mdx +8 -8
  72. package/components/ui/collapsible/collapsible.mdx +8 -8
  73. package/components/ui/command/command.mdx +8 -8
  74. package/components/ui/context-menu/context-menu.mdx +8 -8
  75. package/components/ui/dialog/dialog.mdx +8 -8
  76. package/components/ui/drawer/drawer.mdx +8 -8
  77. package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -8
  78. package/components/ui/empty/empty.mdx +8 -8
  79. package/components/ui/file-upload/file-upload.mdx +8 -8
  80. package/components/ui/hover-card/hover-card.mdx +8 -8
  81. package/components/ui/input/input.mdx +8 -8
  82. package/components/ui/input-otp/input-otp.mdx +8 -8
  83. package/components/ui/label/label.mdx +8 -8
  84. package/components/ui/map/map.mdx +8 -8
  85. package/components/ui/menubar/menubar.mdx +8 -8
  86. package/components/ui/navigation-menu/navigation-menu.mdx +8 -8
  87. package/components/ui/notification-badge/notification-badge.mdx +8 -8
  88. package/components/ui/pagination/pagination.mdx +8 -8
  89. package/components/ui/popover/popover.mdx +8 -8
  90. package/components/ui/progress/progress.mdx +8 -8
  91. package/components/ui/radio-group/radio-group.mdx +8 -8
  92. package/components/ui/rating/rating.mdx +8 -8
  93. package/components/ui/resizable/resizable.mdx +8 -8
  94. package/components/ui/route-map/route-map.mdx +8 -8
  95. package/components/ui/scroll-area/scroll-area.mdx +8 -8
  96. package/components/ui/search/search.mdx +8 -8
  97. package/components/ui/select/select.mdx +8 -8
  98. package/components/ui/separator/separator.mdx +8 -8
  99. package/components/ui/sheet/sheet.mdx +8 -8
  100. package/components/ui/simple-map/simple-map.mdx +8 -8
  101. package/components/ui/skeleton/skeleton.mdx +8 -8
  102. package/components/ui/slider/slider.mdx +8 -8
  103. package/components/ui/sonner/sonner.mdx +8 -8
  104. package/components/ui/stats-card/index.ts +2 -2
  105. package/components/ui/stats-card/stats-card-skeleton.tsx +60 -60
  106. package/components/ui/stats-card/stats-card.mdx +8 -8
  107. package/components/ui/stats-card/stats-card.stories.tsx +117 -99
  108. package/components/ui/stats-card/stats-card.tsx +18 -2
  109. package/components/ui/stepper/stepper.mdx +8 -8
  110. package/components/ui/switch/switch.mdx +8 -8
  111. package/components/ui/table/table.mdx +8 -8
  112. package/components/ui/tabs/tabs.mdx +8 -8
  113. package/components/ui/textarea/textarea.mdx +8 -8
  114. package/components/ui/timeline/timeline.mdx +8 -8
  115. package/components/ui/toggle/toggle.mdx +8 -8
  116. package/components/ui/toggle-group/toggle-group.mdx +8 -8
  117. package/components/ui/tooltip/tooltip.mdx +8 -8
  118. package/components/ui/tree-view/tree-view.mdx +8 -8
  119. package/components.json +153 -533
  120. package/contexts/AuthContext.tsx +121 -121
  121. package/contexts/LanguageContext.test.tsx +121 -121
  122. package/contexts/LanguageContext.tsx +250 -250
  123. package/dist/AssistantChart-BKVtGUKF.js +3383 -0
  124. package/dist/{AssistantChart-BAx9VQvb.cjs → AssistantChart-Bdd44uBn.cjs} +388 -127
  125. package/dist/{AssistantChart-CVko2A1W.js → AssistantChart-CFhDdGyU.js} +391 -130
  126. package/dist/{AssistantChart-CVzmmhx4.js → AssistantChart-C_hwFRRr.js} +4 -4
  127. package/dist/{AssistantChart-BAudAfne.cjs → AssistantChart-CldVCVDe.cjs} +5 -5
  128. package/dist/{AssistantChart-BP8upjMk.js → AssistantChart-Cu3m7RBo.js} +5 -5
  129. package/dist/AssistantChart-CxGjH7Qk.js +3477 -0
  130. package/dist/AssistantChart-DIpshm3i.js +4784 -0
  131. package/dist/AssistantChart-D_PTeu8P.cjs +3503 -0
  132. package/dist/{AssistantChart-9w31gdAb.cjs → AssistantChart-DoZCyS5r.cjs} +4 -4
  133. package/dist/AssistantChart-WeycT5Pd.cjs +3551 -0
  134. package/dist/AssistantChart-zjsy2GaZ.cjs +4810 -0
  135. package/dist/AudioPlayer-B1lt5cPl.cjs +989 -0
  136. package/dist/AudioPlayer-BZ7bibzU.cjs +982 -0
  137. package/dist/AudioPlayer-BpRPS4-1.cjs +1277 -0
  138. package/dist/AudioPlayer-C12BjQBV.cjs +997 -0
  139. package/dist/{AudioPlayer-1ypwE2Wh.cjs → AudioPlayer-CFeV8t-5.cjs} +1 -1
  140. package/dist/{AudioPlayer-DuKXrCfy.js → AudioPlayer-CGRUtUdN.js} +1 -1
  141. package/dist/AudioPlayer-Coly3q5R.js +1278 -0
  142. package/dist/AudioPlayer-CySJIyvL.js +937 -0
  143. package/dist/AudioPlayer-DMcG_c7L.js +990 -0
  144. package/dist/AudioPlayer-DcFKRJE_.js +998 -0
  145. package/dist/AudioPlayer-IAU5q5T1.cjs +936 -0
  146. package/dist/AudioPlayer-e8LfNoqO.js +983 -0
  147. package/dist/BrandColorsContext-565dDHd5.js +660 -0
  148. package/dist/BrandColorsContext-BcJbtkqn.cjs +659 -0
  149. package/dist/{xertica-assistant-Qp3ydksa.cjs → CodeBlock-7TTgmdGG.cjs} +263 -51
  150. package/dist/{xertica-assistant-gnCJdcZY.js → CodeBlock-BeSt1h5P.js} +219 -7
  151. package/dist/CodeBlock-BgfYL_rD.cjs +2094 -0
  152. package/dist/CodeBlock-BlcqlA9M.cjs +2094 -0
  153. package/dist/CodeBlock-Bnmeu5ez.cjs +2094 -0
  154. package/dist/CodeBlock-BtfPlbAI.js +2078 -0
  155. package/dist/CodeBlock-CIySIuYr.js +2078 -0
  156. package/dist/CodeBlock-CuPtUM-7.cjs +2094 -0
  157. package/dist/CodeBlock-D6ffWXgc.js +2078 -0
  158. package/dist/CodeBlock-D8dcwbit.cjs +2094 -0
  159. package/dist/CodeBlock-DMZrFnlw.cjs +2094 -0
  160. package/dist/CodeBlock-DlBehYN8.js +2078 -0
  161. package/dist/CodeBlock-DnYNI8rQ.js +2078 -0
  162. package/dist/CodeBlock-DvKWbSnE.cjs +2094 -0
  163. package/dist/CodeBlock-DwMCfkFY.js +2078 -0
  164. package/dist/CodeBlock-Dy6CNYyj.js +2078 -0
  165. package/dist/CodeBlock-U1pPOQI7.cjs +2094 -0
  166. package/dist/CodeBlock-f_GpNhEB.js +2078 -0
  167. package/dist/CodeBlock-oB6u8nI1.js +2078 -0
  168. package/dist/CodeBlock-tZC31B73.cjs +2094 -0
  169. package/dist/FeatureCard-CxC-7C-C.cjs +300 -0
  170. package/dist/FeatureCard-DbHWCb4E.js +301 -0
  171. package/dist/ImageWithFallback-CGtidP6B.cjs +4542 -0
  172. package/dist/ImageWithFallback-lsg3pdFg.js +4508 -0
  173. package/dist/{LanguageContext-DvUt5jBg.cjs → LanguageContext-B_KFTCzT.cjs} +2 -2
  174. package/dist/{LanguageContext-BwhwC3G2.js → LanguageContext-CS14yCpi.js} +2 -2
  175. package/dist/{XerticaXLogo-DHz5SugF.js → LanguageSelector-B5YfbHra.js} +115 -136
  176. package/dist/{XerticaXLogo-DTee_y8X.cjs → LanguageSelector-D6uacAIM.cjs} +115 -136
  177. package/dist/LayoutContext-B45-e9DI.cjs +93 -0
  178. package/dist/LayoutContext-BAql6ZRY.js +97 -0
  179. package/dist/LayoutContext-Bav3UMEA.js +94 -0
  180. package/dist/LayoutContext-BvK-ggDa.cjs +96 -0
  181. package/dist/{ThemeContext-Bo-W2WZH.js → ThemeContext-BWq9ACPo.js} +8 -13
  182. package/dist/{ThemeContext-ept8jhXI.js → ThemeContext-BXjrgUjW.js} +261 -200
  183. package/dist/{ThemeContext-BblcjQup.cjs → ThemeContext-Bmod0Cg2.cjs} +8 -13
  184. package/dist/ThemeContext-BoH4NLfN.js +734 -0
  185. package/dist/{ThemeContext-BbBNoFTG.js → ThemeContext-C2EwAPDt.js} +2 -2
  186. package/dist/{ThemeContext-U4dEYc6C.cjs → ThemeContext-CGk3KK0k.cjs} +1 -8
  187. package/dist/{ThemeContext-D3LzacmG.js → ThemeContext-CQSo4Iwc.js} +1 -8
  188. package/dist/{ThemeContext-CP3a0jxy.cjs → ThemeContext-j5aGtPky.cjs} +262 -193
  189. package/dist/ThemeContext-r69W20Xg.cjs +733 -0
  190. package/dist/{ThemeContext-Cmr8Ex8H.cjs → ThemeContext-vTjumZeM.cjs} +2 -2
  191. package/dist/{VerifyEmailPage-BRSP-Pwt.cjs → VerifyEmailPage--1Vurewl.cjs} +3 -3
  192. package/dist/{VerifyEmailPage-CbgjOF0v.js → VerifyEmailPage-1WwWczAn.js} +12 -22
  193. package/dist/{VerifyEmailPage-DF2ilhum.cjs → VerifyEmailPage-B4peJjAT.cjs} +356 -334
  194. package/dist/{VerifyEmailPage-CR7kb5df.cjs → VerifyEmailPage-BComraR7.cjs} +12 -22
  195. package/dist/{VerifyEmailPage-u_Dn7t1U.cjs → VerifyEmailPage-Bp1XXl3H.cjs} +4 -4
  196. package/dist/{VerifyEmailPage-CkBYfsNy.cjs → VerifyEmailPage-By3Jf__L.cjs} +4 -4
  197. package/dist/{VerifyEmailPage-Bv8Ah_TK.cjs → VerifyEmailPage-ByerOcm4.cjs} +20 -23
  198. package/dist/{VerifyEmailPage-BE-L9mB7.js → VerifyEmailPage-C0c2e5n0.js} +7 -7
  199. package/dist/{VerifyEmailPage-EhudUdqF.js → VerifyEmailPage-C5TNQTBa.js} +355 -343
  200. package/dist/{VerifyEmailPage-Dt7zgA4w.cjs → VerifyEmailPage-CFLMls1p.cjs} +4 -4
  201. package/dist/{VerifyEmailPage-Cyl55sJb.js → VerifyEmailPage-CJLz3jrn.js} +20 -23
  202. package/dist/VerifyEmailPage-COiyNl1y.js +2825 -0
  203. package/dist/{VerifyEmailPage-DMBh4NM9.cjs → VerifyEmailPage-CYXtbKi3.cjs} +1 -1
  204. package/dist/{VerifyEmailPage-DTtFfC-J.js → VerifyEmailPage-CgMxRb4z.js} +3 -3
  205. package/dist/VerifyEmailPage-CqKsR2v8.js +2827 -0
  206. package/dist/{VerifyEmailPage-Bae2cBXT.cjs → VerifyEmailPage-Cwi3kbol.cjs} +7 -7
  207. package/dist/{VerifyEmailPage-X14vhdyl.js → VerifyEmailPage-DGhuIqkb.js} +4 -4
  208. package/dist/{VerifyEmailPage-BIBOKV7Z.js → VerifyEmailPage-DSBMRHtl.js} +36 -41
  209. package/dist/{VerifyEmailPage-D-FRj5TU.cjs → VerifyEmailPage-De6bQjrz.cjs} +36 -41
  210. package/dist/{VerifyEmailPage-BJjAMUTW.js → VerifyEmailPage-DgIid028.js} +4 -4
  211. package/dist/VerifyEmailPage-DjQKRlUS.cjs +2824 -0
  212. package/dist/{VerifyEmailPage-CdYPSJoO.js → VerifyEmailPage-DvMLZgFt.js} +1 -1
  213. package/dist/{VerifyEmailPage-C_ihbcth.js → VerifyEmailPage-MTD7AG1Z.js} +4 -4
  214. package/dist/VerifyEmailPage-s-1X3LDJ.cjs +2826 -0
  215. package/dist/XerticaOrbe-KL1RBHzw.cjs +1354 -0
  216. package/dist/XerticaOrbe-zwS1p2a8.js +1355 -0
  217. package/dist/XerticaProvider-6btlAlzc.js +17 -0
  218. package/dist/{XerticaProvider-siSt9uG2.js → XerticaProvider-B7EVH-NF.js} +2 -2
  219. package/dist/{XerticaProvider-AbWlr7Af.cjs → XerticaProvider-BIrqfZ-i.cjs} +11 -8
  220. package/dist/XerticaProvider-BNoNOxQ5.cjs +16 -0
  221. package/dist/XerticaProvider-BlY2limY.cjs +38 -0
  222. package/dist/{XerticaProvider-CWgby5mY.js → XerticaProvider-C1DKnvLh.js} +4 -4
  223. package/dist/{XerticaProvider-AChwphCO.cjs → XerticaProvider-CBGc4EMA.cjs} +4 -4
  224. package/dist/{XerticaProvider-BITjgC5p.js → XerticaProvider-CEoWMTxu.js} +2 -2
  225. package/dist/{XerticaProvider-By8q3Roe.cjs → XerticaProvider-CllrbMEJ.cjs} +2 -2
  226. package/dist/{XerticaProvider-B8CaV7xu.cjs → XerticaProvider-D-yNhF94.cjs} +1 -1
  227. package/dist/XerticaProvider-DDuiIcKo.js +39 -0
  228. package/dist/{XerticaProvider-DQtvJU7m.js → XerticaProvider-DYq4JWtg.js} +1 -1
  229. package/dist/{XerticaProvider-CWs6EwNa.js → XerticaProvider-Dt5HEzbQ.js} +10 -10
  230. package/dist/{XerticaProvider-CW9hpCdF.cjs → XerticaProvider-ET0ihewn.cjs} +2 -2
  231. package/dist/XerticaProvider-cI9hSs27.cjs +38 -0
  232. package/dist/XerticaProvider-hSwhNQex.js +39 -0
  233. package/dist/{XerticaXLogo-ChryA6xj.js → XerticaXLogo-B7xQ5dhi.js} +1 -1
  234. package/dist/{XerticaXLogo-CziKMQil.cjs → XerticaXLogo-CQUUjXoH.cjs} +8 -8
  235. package/dist/{XerticaXLogo-DfUvz-lD.js → XerticaXLogo-Cmsp-Eey.js} +9 -9
  236. package/dist/{XerticaXLogo-CFuIlYFH.js → XerticaXLogo-DZbo4vOE.js} +12 -12
  237. package/dist/{XerticaXLogo-8TTzBjHw.cjs → XerticaXLogo-Zw2B276b.cjs} +1 -1
  238. package/dist/{XerticaXLogo-kslQ8Tk_.cjs → XerticaXLogo-bvZSgwGF.cjs} +13 -7
  239. package/dist/alert-dialog-BOje--vD.js +847 -0
  240. package/dist/alert-dialog-BtEuQqrg.cjs +870 -0
  241. package/dist/{alert-dialog-yckpaOpy.cjs → alert-dialog-DSKByiKZ.cjs} +3 -3
  242. package/dist/{alert-dialog-iDe5VE5o.js → alert-dialog-s-vmNkJ_.js} +3 -3
  243. package/dist/breadcrumb-CqJ7bHY5.js +161 -0
  244. package/dist/breadcrumb-m9Hb2_XN.cjs +177 -0
  245. package/dist/components/assistant/xertica-assistant/hooks/index.d.ts +6 -0
  246. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-conversations.d.ts +21 -0
  247. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-messages.d.ts +49 -0
  248. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-suggestions.d.ts +16 -0
  249. package/dist/components/blocks/audio-player/AudioPlayer.d.ts +35 -0
  250. package/dist/components/blocks/audio-player/index.d.ts +1 -0
  251. package/dist/components/blocks/document-editor/DocumentEditor.d.ts +26 -0
  252. package/dist/components/blocks/document-editor/index.d.ts +1 -0
  253. package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +41 -0
  254. package/dist/components/blocks/podcast-player/index.d.ts +1 -0
  255. package/dist/components/ui/chart/parts/chart-dashboard.d.ts +113 -0
  256. package/dist/components/ui/chart/parts/chart-metric.d.ts +118 -0
  257. package/dist/components/ui/chart/parts/chart-primitives.d.ts +101 -0
  258. package/dist/components/ui/chart/parts/chart-shared.d.ts +20 -0
  259. package/dist/components/ui/chart/parts/chart-utils.d.ts +12 -0
  260. package/dist/components/ui/chart/parts/index.d.ts +5 -0
  261. package/dist/components/ui/stats-card/stats-card.d.ts +10 -0
  262. package/dist/dropdown-menu-BDB5CmQs.cjs +247 -0
  263. package/dist/dropdown-menu-DQidbKBD.js +231 -0
  264. package/dist/google-maps-loader-BFWp6VPd.js +287 -0
  265. package/dist/google-maps-loader-BKcdgFbu.cjs +312 -0
  266. package/dist/{google-maps-loader-t2IlYBzw.js → google-maps-loader-CTYySAun.js} +4 -0
  267. package/dist/google-maps-loader-CumCNXeG.js +312 -0
  268. package/dist/{google-maps-loader-BqsYL48U.cjs → google-maps-loader-Y-QkD-Li.cjs} +5 -0
  269. package/dist/google-maps-loader-eS3uQ5TA.cjs +287 -0
  270. package/dist/header-Cgy6vYPk.cjs +731 -0
  271. package/dist/header-DRlT4jgI.js +715 -0
  272. package/dist/header-Dux00SI4.cjs +731 -0
  273. package/dist/header-EkGKXPsD.js +715 -0
  274. package/dist/header-WfEywpyc.cjs +731 -0
  275. package/dist/header-tifNQn2U.js +715 -0
  276. package/dist/index-BhapVLVj.js +8 -0
  277. package/dist/{index-D3RLKRAs.cjs → index-COtD8bRW.cjs} +1 -1
  278. package/dist/index-D6fxYEY8.cjs +7 -0
  279. package/dist/index-DAIp0_HK.js +8 -0
  280. package/dist/index-DW5tYe26.js +8 -0
  281. package/dist/index-GA__GvnG.cjs +7 -0
  282. package/dist/index.cjs.js +2 -2
  283. package/dist/index.es.js +2 -2
  284. package/dist/index.umd.js +1043 -470
  285. package/dist/input-2R4loU86.js +127 -0
  286. package/dist/input-DWANSKGb.cjs +145 -0
  287. package/dist/pages.cjs.js +1 -1
  288. package/dist/pages.es.js +1 -1
  289. package/dist/progress-DPtzoVV8.js +175 -0
  290. package/dist/progress-EeaoqqUs.cjs +191 -0
  291. package/dist/rich-text-editor-0mraWT5y.cjs +2376 -0
  292. package/dist/rich-text-editor-B-IkcPD0.js +2874 -0
  293. package/dist/rich-text-editor-B6jMRLzk.cjs +1939 -0
  294. package/dist/rich-text-editor-B8_oYcIR.js +1730 -0
  295. package/dist/rich-text-editor-B9UbSXNb.js +1203 -0
  296. package/dist/rich-text-editor-BYuRBNBU.js +2373 -0
  297. package/dist/rich-text-editor-Bb9pySTs.cjs +2374 -0
  298. package/dist/rich-text-editor-BcL6L3cm.cjs +2374 -0
  299. package/dist/rich-text-editor-BoVZYtTs.cjs +2391 -0
  300. package/dist/rich-text-editor-Bp3zQqMC.js +2954 -0
  301. package/dist/rich-text-editor-CMgSN_w2.js +1189 -0
  302. package/dist/rich-text-editor-CPV1lEPH.cjs +1748 -0
  303. package/dist/rich-text-editor-CeucBdIv.cjs +2971 -0
  304. package/dist/rich-text-editor-CoKqbCtu.cjs +1799 -0
  305. package/dist/rich-text-editor-Cw56T_mB.js +2356 -0
  306. package/dist/rich-text-editor-Cyt8qs2b.js +1921 -0
  307. package/dist/rich-text-editor-D6H84OcX.cjs +1220 -0
  308. package/dist/rich-text-editor-D76gD-QI.js +2328 -0
  309. package/dist/rich-text-editor-DKkokOnA.js +1781 -0
  310. package/dist/rich-text-editor-DNsdpN64.cjs +2359 -0
  311. package/dist/rich-text-editor-DfG8bCyY.js +2358 -0
  312. package/dist/rich-text-editor-Dxjw31Z4.js +2341 -0
  313. package/dist/rich-text-editor-DzP0Epmb.js +2356 -0
  314. package/dist/rich-text-editor-bRkNoeZY.cjs +2891 -0
  315. package/dist/rich-text-editor-lyYE2ZG5.cjs +1207 -0
  316. package/dist/rich-text-editor-skplNlBM.cjs +2345 -0
  317. package/dist/select-Bkbr0f-Z.cjs +162 -0
  318. package/dist/select-CvIVdX2n.js +145 -0
  319. package/dist/{sidebar-CA6_ek3f.js → sidebar-B6SlKZYN.js} +40 -49
  320. package/dist/{sidebar-CmvwjnVb.js → sidebar-BViy8Eeu.js} +17 -9
  321. package/dist/{sidebar-Dz7bd3zP.js → sidebar-BbVIQvlP.js} +1 -1
  322. package/dist/{sidebar-CVUGHOS_.cjs → sidebar-BxGXsDAd.cjs} +16 -8
  323. package/dist/sidebar-CK_0ZQHj.cjs +803 -0
  324. package/dist/sidebar-CUuOvYhK.js +787 -0
  325. package/dist/{sidebar-KIS0C2JH.js → sidebar-CrQDDdcz.js} +24 -33
  326. package/dist/{sidebar-zowjejT2.cjs → sidebar-DAaY8bRU.cjs} +24 -33
  327. package/dist/{sidebar-B3EYhli0.cjs → sidebar-DQj1z3jG.cjs} +227 -269
  328. package/dist/{sidebar-B9NR0lCe.cjs → sidebar-Djn5syhi.cjs} +295 -309
  329. package/dist/{sidebar-CplprZpM.js → sidebar-LluMXfam.js} +227 -269
  330. package/dist/sidebar-_rT7rBMk.js +787 -0
  331. package/dist/{sidebar-BvF5I2Ue.cjs → sidebar-nzPoVHBQ.cjs} +41 -46
  332. package/dist/{sidebar-C5B_LHek.cjs → sidebar-q7P2Godd.cjs} +1 -1
  333. package/dist/slider-Bc5Hd0y1.js +56 -0
  334. package/dist/slider-N7hFFj6X.cjs +73 -0
  335. package/dist/tooltip-Ded96neP.cjs +137 -0
  336. package/dist/tooltip-HDOoD2-0.js +120 -0
  337. package/dist/ui.cjs.js +1 -1
  338. package/dist/ui.es.js +1 -1
  339. package/dist/use-audio-player-B31J-aqh.cjs +187 -0
  340. package/dist/use-audio-player-BkmEmj8Q.js +185 -0
  341. package/dist/use-audio-player-CLFTWFW1.cjs +184 -0
  342. package/dist/use-audio-player-CLLn00I6.js +188 -0
  343. package/dist/{use-audio-player-Dn1NR9xN.cjs → use-audio-player-NKsWyjWu.cjs} +7 -3
  344. package/dist/{use-audio-player-Bkh23vQ3.js → use-audio-player-nv8ZSGa1.js} +7 -3
  345. package/dist/use-file-upload-BcjEo2S5.js +404 -0
  346. package/dist/use-file-upload-CRJR68Tj.cjs +403 -0
  347. package/dist/use-mobile-B0hNy_Y6.cjs +4303 -0
  348. package/dist/use-mobile-BXuYROXM.js +4202 -0
  349. package/dist/use-mobile-Bbd51ASU.cjs +4392 -0
  350. package/dist/use-mobile-Bk6CX-TC.js +4359 -0
  351. package/dist/use-mobile-BvYdisLP.js +4202 -0
  352. package/dist/use-mobile-BzuxjzNX.cjs +4392 -0
  353. package/dist/use-mobile-CG2-SdXV.cjs +4235 -0
  354. package/dist/use-mobile-CKb5pqTs.js +4269 -0
  355. package/dist/use-mobile-CYuAuGDl.js +4202 -0
  356. package/dist/use-mobile-CaENcqm-.js +4508 -0
  357. package/dist/use-mobile-CbrYgJGJ.js +4203 -0
  358. package/dist/use-mobile-Cd4xPrKq.cjs +46 -0
  359. package/dist/use-mobile-DMOvImGQ.cjs +4542 -0
  360. package/dist/use-mobile-DRB3BQgD.cjs +4235 -0
  361. package/dist/use-mobile-DZvv7QMR.js +4359 -0
  362. package/dist/use-mobile-DdI_TXam.cjs +4235 -0
  363. package/dist/use-mobile-DlceKf8a.js +4359 -0
  364. package/dist/use-mobile-DsOnow1o.cjs +4236 -0
  365. package/dist/use-mobile-Kcj6jSnK.cjs +4392 -0
  366. package/dist/use-mobile-bnKcua_i.js +4202 -0
  367. package/dist/use-mobile-j4w2Jrf1.js +30 -0
  368. package/dist/use-mobile-ncXBeE2z.cjs +4235 -0
  369. package/dist/use-rich-text-editor-DjiddBGv.js +282 -0
  370. package/dist/use-rich-text-editor-lpeswbCs.cjs +281 -0
  371. package/dist/xertica-assistant-BdiZag0h.js +2187 -0
  372. package/dist/xertica-assistant-CrgTb6Hs.cjs +2155 -0
  373. package/dist/xertica-assistant-DCsnQyi5.js +2156 -0
  374. package/dist/xertica-assistant-DUBpmEgo.cjs +2186 -0
  375. package/dist/{xertica-assistant-Bj3vBCq_.cjs → xertica-assistant-V_IdW4WF.cjs} +27 -9
  376. package/dist/{xertica-assistant-BMqdyRVi.js → xertica-assistant-ciJaWqm1.js} +28 -10
  377. package/dist/{xertica-assistant-B1IaHXnB.cjs → xertica-assistant-dyP7KHM5.cjs} +533 -392
  378. package/dist/{xertica-assistant-DPsESB6t.js → xertica-assistant-yX1CFBBo.js} +535 -394
  379. package/dist/xertica-ui.css +2 -2
  380. package/docs/architecture-improvements.md +456 -456
  381. package/docs/architecture.md +312 -312
  382. package/docs/components/assistant.md +428 -428
  383. package/docs/components/branding.md +252 -252
  384. package/docs/components/card-patterns.md +447 -447
  385. package/docs/components/error-boundary.md +201 -201
  386. package/docs/components/hooks.md +432 -432
  387. package/docs/components/language-selector.md +176 -176
  388. package/docs/components/pages.md +323 -323
  389. package/docs/components/stats-card.md +20 -2
  390. package/docs/doc-audit.md +244 -244
  391. package/docs/getting-started.md +616 -616
  392. package/docs/guidelines.md +330 -330
  393. package/docs/i18n.md +480 -480
  394. package/docs/installation.md +268 -268
  395. package/docs/llms.md +295 -295
  396. package/docs/state-management.md +289 -289
  397. package/guidelines/Guidelines.md +409 -409
  398. package/llms-compact.txt +1 -1
  399. package/llms-full.txt +11553 -7133
  400. package/llms.txt +1 -1
  401. package/package.json +219 -219
  402. package/styles/xertica/base.css +90 -90
  403. package/templates/.prettierignore +4 -4
  404. package/templates/.prettierrc +10 -10
  405. package/templates/CLAUDE.md +180 -180
  406. package/templates/guidelines/Guidelines.md +577 -577
  407. package/templates/package.json +69 -69
  408. package/templates/src/app/App.tsx +46 -46
  409. package/templates/src/app/components/AuthGuard.tsx +131 -131
  410. package/templates/src/features/assistant/data/mock.ts +75 -75
  411. package/templates/src/features/assistant/hooks/useAssistantConfig.ts +20 -20
  412. package/templates/src/features/assistant/index.ts +5 -5
  413. package/templates/src/features/auth/ui/AuthPageShell.tsx +32 -32
  414. package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -70
  415. package/templates/src/features/auth/ui/LoginContent.tsx +92 -92
  416. package/templates/src/features/auth/ui/ResetPasswordContent.tsx +183 -183
  417. package/templates/src/features/auth/ui/SocialLoginButtons.tsx +78 -78
  418. package/templates/src/features/auth/ui/VerifyEmailContent.tsx +80 -80
  419. package/templates/src/features/home/data/mock.ts +41 -41
  420. package/templates/src/features/home/hooks/useFeatureCards.ts +20 -20
  421. package/templates/src/features/home/index.ts +11 -11
  422. package/templates/src/features/home/ui/HomeContent.tsx +117 -117
  423. package/templates/src/features/template/ui/CrudTemplate.tsx +112 -112
  424. package/templates/src/features/template/ui/DashboardTemplate.tsx +110 -110
  425. package/templates/src/features/template/ui/FormTemplate.tsx +117 -117
  426. package/templates/src/features/template/ui/LoginTemplate.tsx +59 -59
  427. package/templates/src/features/template/ui/TemplateContent.tsx +1322 -1322
  428. package/templates/src/i18n.ts +124 -124
  429. package/templates/src/locales/en/common.json +21 -21
  430. package/templates/src/locales/en/components/activityCard.json +10 -10
  431. package/templates/src/locales/en/components/assistant.json +119 -119
  432. package/templates/src/locales/en/components/media.json +29 -29
  433. package/templates/src/locales/en/components/notificationCard.json +5 -5
  434. package/templates/src/locales/en/components/profileCard.json +8 -8
  435. package/templates/src/locales/en/components/projectCard.json +10 -10
  436. package/templates/src/locales/en/components/sidebar.json +14 -14
  437. package/templates/src/locales/en/components/stats.json +8 -8
  438. package/templates/src/locales/en/components/team.json +14 -14
  439. package/templates/src/locales/en/errors.json +9 -9
  440. package/templates/src/locales/en/languageSelector.json +7 -7
  441. package/templates/src/locales/en/nav.json +6 -6
  442. package/templates/src/locales/en/pages/crudTemplate.json +25 -25
  443. package/templates/src/locales/en/pages/dashboardTemplate.json +20 -20
  444. package/templates/src/locales/en/pages/forgotPassword.json +10 -10
  445. package/templates/src/locales/en/pages/formTemplate.json +16 -16
  446. package/templates/src/locales/en/pages/home.json +7 -7
  447. package/templates/src/locales/en/pages/login.json +15 -15
  448. package/templates/src/locales/en/pages/loginTemplate.json +9 -9
  449. package/templates/src/locales/en/pages/resetPassword.json +18 -18
  450. package/templates/src/locales/en/pages/templates.json +317 -317
  451. package/templates/src/locales/en/pages/verifyEmail.json +12 -12
  452. package/templates/src/locales/en/themeToggle.json +6 -6
  453. package/templates/src/locales/es/common.json +21 -21
  454. package/templates/src/locales/es/components/activityCard.json +10 -10
  455. package/templates/src/locales/es/components/assistant.json +119 -119
  456. package/templates/src/locales/es/components/media.json +29 -29
  457. package/templates/src/locales/es/components/notificationCard.json +5 -5
  458. package/templates/src/locales/es/components/profileCard.json +8 -8
  459. package/templates/src/locales/es/components/projectCard.json +10 -10
  460. package/templates/src/locales/es/components/sidebar.json +14 -14
  461. package/templates/src/locales/es/components/stats.json +8 -8
  462. package/templates/src/locales/es/components/team.json +14 -14
  463. package/templates/src/locales/es/errors.json +9 -9
  464. package/templates/src/locales/es/languageSelector.json +7 -7
  465. package/templates/src/locales/es/nav.json +6 -6
  466. package/templates/src/locales/es/pages/crudTemplate.json +25 -25
  467. package/templates/src/locales/es/pages/dashboardTemplate.json +20 -20
  468. package/templates/src/locales/es/pages/forgotPassword.json +10 -10
  469. package/templates/src/locales/es/pages/formTemplate.json +16 -16
  470. package/templates/src/locales/es/pages/home.json +7 -7
  471. package/templates/src/locales/es/pages/login.json +15 -15
  472. package/templates/src/locales/es/pages/loginTemplate.json +9 -9
  473. package/templates/src/locales/es/pages/resetPassword.json +18 -18
  474. package/templates/src/locales/es/pages/templates.json +317 -317
  475. package/templates/src/locales/es/pages/verifyEmail.json +12 -12
  476. package/templates/src/locales/es/themeToggle.json +6 -6
  477. package/templates/src/locales/pt-BR/common.json +21 -21
  478. package/templates/src/locales/pt-BR/components/activityCard.json +10 -10
  479. package/templates/src/locales/pt-BR/components/assistant.json +119 -119
  480. package/templates/src/locales/pt-BR/components/media.json +29 -29
  481. package/templates/src/locales/pt-BR/components/notificationCard.json +5 -5
  482. package/templates/src/locales/pt-BR/components/profileCard.json +8 -8
  483. package/templates/src/locales/pt-BR/components/projectCard.json +10 -10
  484. package/templates/src/locales/pt-BR/components/sidebar.json +14 -14
  485. package/templates/src/locales/pt-BR/components/stats.json +8 -8
  486. package/templates/src/locales/pt-BR/components/team.json +14 -14
  487. package/templates/src/locales/pt-BR/errors.json +9 -9
  488. package/templates/src/locales/pt-BR/languageSelector.json +7 -7
  489. package/templates/src/locales/pt-BR/nav.json +6 -6
  490. package/templates/src/locales/pt-BR/pages/crudTemplate.json +25 -25
  491. package/templates/src/locales/pt-BR/pages/dashboardTemplate.json +20 -20
  492. package/templates/src/locales/pt-BR/pages/forgotPassword.json +10 -10
  493. package/templates/src/locales/pt-BR/pages/formTemplate.json +16 -16
  494. package/templates/src/locales/pt-BR/pages/home.json +7 -7
  495. package/templates/src/locales/pt-BR/pages/login.json +15 -15
  496. package/templates/src/locales/pt-BR/pages/loginTemplate.json +9 -9
  497. package/templates/src/locales/pt-BR/pages/resetPassword.json +18 -18
  498. package/templates/src/locales/pt-BR/pages/templates.json +317 -317
  499. package/templates/src/locales/pt-BR/pages/verifyEmail.json +12 -12
  500. package/templates/src/locales/pt-BR/themeToggle.json +6 -6
  501. package/templates/src/pages/AssistantPage.tsx +470 -470
  502. package/templates/src/pages/HomePage.tsx +53 -53
  503. package/templates/src/shared/error-boundary.tsx +150 -150
  504. package/templates/src/shared/error-fallbacks.tsx +222 -222
  505. package/templates/vite.config.js +20 -20
  506. package/templates/vite.config.ts +55 -55
  507. package/dist/ThemeContext-CpqYShLq.cjs +0 -324
  508. package/dist/ThemeContext-Du2nE1PL.js +0 -325
  509. package/dist/ThemeContext-GeEBTJ3q.cjs +0 -1621
  510. package/dist/ThemeContext-JyLK9B1o.js +0 -1622
  511. package/dist/VerifyEmailPage-BiRm7Nh4.cjs +0 -3213
  512. package/dist/VerifyEmailPage-Bvfv8HVQ.js +0 -3214
  513. package/dist/VerifyEmailPage-hdB8JQGv.cjs +0 -3213
  514. package/dist/VerifyEmailPage-vYHbYK3q.js +0 -3214
  515. package/dist/XerticaProvider-CUYJZc32.js +0 -49
  516. package/dist/XerticaProvider-CjQAQPcn.cjs +0 -48
  517. package/dist/XerticaProvider-D5lLumH-.js +0 -49
  518. package/dist/XerticaProvider-qQUDop71.cjs +0 -48
  519. package/dist/XerticaXLogo-BWaag64t.js +0 -252
  520. package/dist/XerticaXLogo-CU-U-GP4.cjs +0 -251
  521. package/dist/index-CkTUgOwX.js +0 -8
  522. package/dist/sidebar-OTO_up7Z.js +0 -801
  523. package/dist/{rich-text-editor-BmsjY03B.js → rich-text-editor-DgF8s7xW.js} +26 -26
  524. package/dist/{rich-text-editor-GS2kpTAK.cjs → rich-text-editor-mWoaSCE4.cjs} +26 -26
@@ -1,3214 +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-BWaag64t.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-CplprZpM.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-ept8jhXI.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(t2("templates.formSubmitSuccess"));
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: t2("nav.designSystem"), href: "/home", icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" }) },
2086
- { label: t2("templates.breadcrumb") }
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: t2("templates.title"),
2096
- subtitle: t2("templates.subtitle")
2097
- }
2098
- ),
2099
- /* @__PURE__ */ jsxs("section", { children: [
2100
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t2("templates.headerWithBreadcrumbs.sectionTitle") }),
2101
- /* @__PURE__ */ jsxs(Card, { children: [
2102
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2103
- /* @__PURE__ */ jsx(CardTitle, { children: t2("templates.headerWithBreadcrumbs.cardTitle") }),
2104
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.headerWithBreadcrumbs.cardDescription") })
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: t2("templates.headerWithBreadcrumbs.breadcrumbs.dashboard"), href: "#", icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" }) },
2113
- { label: t2("templates.headerWithBreadcrumbs.breadcrumbs.settings"), href: "#", icon: /* @__PURE__ */ jsx(Settings, { className: "w-4 h-4" }) },
2114
- { label: t2("templates.headerWithBreadcrumbs.breadcrumbs.users"), href: "#", icon: /* @__PURE__ */ jsx(Users, { className: "w-4 h-4" }) },
2115
- { label: t2("templates.headerWithBreadcrumbs.breadcrumbs.accessProfile") }
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: t2("templates.headerWithBreadcrumbs.exampleContentTitle") }),
2123
- /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
2124
- t2("templates.headerWithBreadcrumbs.exampleContentDescriptionPart1"),
2125
- /* @__PURE__ */ jsx("strong", { children: "Header" }),
2126
- t2("templates.headerWithBreadcrumbs.exampleContentDescriptionPart2")
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: t2("templates.sections.alerts") }),
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: t2("templates.alerts.infoTitle") }),
2138
- /* @__PURE__ */ jsx(AlertDescription, { children: t2("templates.alerts.infoDescription") })
2139
- ] }),
2140
- /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
2141
- /* @__PURE__ */ jsx(AlertTitle, { children: t2("templates.alerts.errorTitle") }),
2142
- /* @__PURE__ */ jsx(AlertDescription, { children: t2("templates.alerts.errorDescription") })
2143
- ] }),
2144
- /* @__PURE__ */ jsxs(Alert, { variant: "success", children: [
2145
- /* @__PURE__ */ jsx(AlertTitle, { children: t2("templates.alerts.successTitle") }),
2146
- /* @__PURE__ */ jsx(AlertDescription, { children: t2("templates.alerts.successDescription") })
2147
- ] }),
2148
- /* @__PURE__ */ jsxs(Alert, { variant: "warning", children: [
2149
- /* @__PURE__ */ jsx(AlertTitle, { children: t2("templates.alerts.warningTitle") }),
2150
- /* @__PURE__ */ jsx(AlertDescription, { children: t2("templates.alerts.warningDescription") })
2151
- ] })
2152
- ] })
2153
- ] }),
2154
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2155
- /* @__PURE__ */ jsxs("section", { children: [
2156
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t2("templates.sections.cardsAndTabs") }),
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: t2("templates.tabs.overview") }),
2160
- /* @__PURE__ */ jsx(TabsTrigger, { value: "forms", children: t2("templates.tabs.forms") }),
2161
- /* @__PURE__ */ jsx(TabsTrigger, { value: "data", children: t2("templates.tabs.data") }),
2162
- /* @__PURE__ */ jsx(TabsTrigger, { value: "settings", children: t2("templates.tabs.settings") })
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: t2("stats.totalUsers") }),
2169
- /* @__PURE__ */ jsx(CardDescription, { children: t2("stats.last30Days") })
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: t2("stats.totalRevenue") }),
2179
- /* @__PURE__ */ jsx(CardDescription, { children: t2("stats.currentMonth") })
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: t2("stats.conversionRate") }),
2189
- /* @__PURE__ */ jsx(CardDescription, { children: t2("stats.currentWeek") })
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: t2("templates.overview.progressTitle") }),
2200
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.overview.progressDescription") })
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: t2("templates.overview.projectProgress") }),
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: t2("templates.overview.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": t2("templates.overview.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: t2("templates.forms.registrationTitle") }),
2259
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.forms.registrationDescription") })
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: t2("templates.forms.firstName") }),
2265
- /* @__PURE__ */ jsx(Input, { id: "firstName", placeholder: t2("templates.forms.firstNamePlaceholder") })
2266
- ] }),
2267
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2268
- /* @__PURE__ */ jsx(Label, { htmlFor: "lastName", children: t2("templates.forms.lastName") }),
2269
- /* @__PURE__ */ jsx(Input, { id: "lastName", placeholder: t2("templates.forms.lastNamePlaceholder") })
2270
- ] })
2271
- ] }),
2272
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2273
- /* @__PURE__ */ jsx(Label, { htmlFor: "email", children: t2("templates.forms.email") }),
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: t2("templates.forms.emailPlaceholder"),
2282
- className: "pl-10"
2283
- }
2284
- )
2285
- ] })
2286
- ] }),
2287
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2288
- /* @__PURE__ */ jsx(Label, { htmlFor: "phone", children: t2("templates.forms.phone") }),
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: t2("templates.forms.phonePlaceholder"),
2297
- className: "pl-10"
2298
- }
2299
- )
2300
- ] })
2301
- ] }),
2302
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2303
- /* @__PURE__ */ jsx(Label, { htmlFor: "role", children: t2("templates.forms.role") }),
2304
- /* @__PURE__ */ jsxs(Select, { children: [
2305
- /* @__PURE__ */ jsx(SelectTrigger, { id: "role", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: t2("templates.forms.rolePlaceholder") }) }),
2306
- /* @__PURE__ */ jsxs(SelectContent, { children: [
2307
- /* @__PURE__ */ jsx(SelectItem, { value: "developer", children: t2("templates.forms.roles.developer") }),
2308
- /* @__PURE__ */ jsx(SelectItem, { value: "designer", children: t2("templates.forms.roles.designer") }),
2309
- /* @__PURE__ */ jsx(SelectItem, { value: "manager", children: t2("templates.forms.roles.manager") }),
2310
- /* @__PURE__ */ jsx(SelectItem, { value: "analyst", children: t2("templates.forms.roles.analyst") })
2311
- ] })
2312
- ] })
2313
- ] }),
2314
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2315
- /* @__PURE__ */ jsx(Label, { htmlFor: "bio", children: t2("templates.forms.bio") }),
2316
- /* @__PURE__ */ jsx(
2317
- Textarea,
2318
- {
2319
- id: "bio",
2320
- placeholder: t2("templates.forms.bioPlaceholder"),
2321
- rows: 4
2322
- }
2323
- )
2324
- ] }),
2325
- /* @__PURE__ */ jsx(Separator, {}),
2326
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
2327
- /* @__PURE__ */ jsx("h4", { children: t2("templates.forms.preferences") }),
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: t2("templates.forms.newsletter") })
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: t2("templates.forms.pushNotifications") })
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: t2("templates.forms.featureUpdates") })
2340
- ] })
2341
- ] }),
2342
- /* @__PURE__ */ jsx(Separator, {}),
2343
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2344
- /* @__PURE__ */ jsx(Label, { children: t2("templates.forms.accountType") }),
2345
- /* @__PURE__ */ jsxs(RadioGroup, { defaultValue: "personal", "aria-label": t2("templates.forms.accountType"), 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: t2("templates.forms.accountPersonal") })
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: t2("templates.forms.accountBusiness") })
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: t2("templates.forms.accountEnterprise") })
2357
- ] })
2358
- ] })
2359
- ] })
2360
- ] })
2361
- ] }) }),
2362
- /* @__PURE__ */ jsxs(CardFooter, { className: "flex justify-between", children: [
2363
- /* @__PURE__ */ jsx(Button, { variant: "outline", children: t2("templates.forms.cancel") }),
2364
- /* @__PURE__ */ jsx(Button, { onClick: handleFormSubmit, children: t2("templates.forms.createAccount") })
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: t2("templates.data.title") }),
2370
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.data.description") })
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: t2("templates.data.searchPlaceholder"),
2379
- "aria-label": t2("templates.data.searchPlaceholder"),
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: t2("common.previous") }),
2420
- /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", children: t2("common.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: t2("templates.settings.title") }),
2427
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.settings.description") })
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: t2("templates.settings.darkMode") }),
2433
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t2("templates.settings.darkModeDescription") })
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: t2("templates.settings.emailNotifications") }),
2448
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t2("templates.settings.emailNotificationsDescription") })
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: t2("templates.settings.pushNotifications") }),
2456
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t2("templates.settings.pushNotificationsDescription") })
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: t2("templates.settings.language") }),
2463
- /* @__PURE__ */ jsxs(Select, { defaultValue: "pt-br", children: [
2464
- /* @__PURE__ */ jsx(SelectTrigger, { "aria-label": t2("templates.settings.language"), children: /* @__PURE__ */ jsx(SelectValue, {}) }),
2465
- /* @__PURE__ */ jsxs(SelectContent, { children: [
2466
- /* @__PURE__ */ jsx(SelectItem, { value: "pt-br", children: t2("templates.settings.languages.ptBR") }),
2467
- /* @__PURE__ */ jsx(SelectItem, { value: "en", children: t2("templates.settings.languages.en") }),
2468
- /* @__PURE__ */ jsx(SelectItem, { value: "es", children: t2("templates.settings.languages.es") })
2469
- ] })
2470
- ] })
2471
- ] }),
2472
- /* @__PURE__ */ jsx(Separator, {}),
2473
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2474
- /* @__PURE__ */ jsx(Label, { children: t2("templates.settings.timezone") }),
2475
- /* @__PURE__ */ jsxs(Select, { defaultValue: "america-sao-paulo", children: [
2476
- /* @__PURE__ */ jsx(SelectTrigger, { "aria-label": t2("templates.settings.timezone"), children: /* @__PURE__ */ jsx(SelectValue, {}) }),
2477
- /* @__PURE__ */ jsxs(SelectContent, { children: [
2478
- /* @__PURE__ */ jsx(SelectItem, { value: "america-sao-paulo", children: t2("templates.settings.timezones.saoPaulo") }),
2479
- /* @__PURE__ */ jsx(SelectItem, { value: "america-new-york", children: t2("templates.settings.timezones.newYork") }),
2480
- /* @__PURE__ */ jsx(SelectItem, { value: "europe-london", children: t2("templates.settings.timezones.london") })
2481
- ] })
2482
- ] })
2483
- ] })
2484
- ] }),
2485
- /* @__PURE__ */ jsxs(CardFooter, { className: "flex justify-between", children: [
2486
- /* @__PURE__ */ jsx(Button, { variant: "outline", children: t2("templates.settings.restoreDefaults") }),
2487
- /* @__PURE__ */ jsx(Button, { children: t2("templates.settings.saveChanges") })
2488
- ] })
2489
- ] }) })
2490
- ] })
2491
- ] }),
2492
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2493
- /* @__PURE__ */ jsxs("section", { children: [
2494
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t2("templates.sections.buttons") }),
2495
- /* @__PURE__ */ jsxs(Card, { children: [
2496
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2497
- /* @__PURE__ */ jsx(CardTitle, { children: t2("templates.buttons.title") }),
2498
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.buttons.description") })
2499
- ] }),
2500
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2501
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2502
- /* @__PURE__ */ jsx(Label, { children: t2("templates.buttons.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: t2("templates.buttons.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": t2("nav.settings"), 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: t2("templates.buttons.withIcons") }),
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
- t2("templates.buttons.profile")
2529
- ] }),
2530
- /* @__PURE__ */ jsxs(Button, { variant: "secondary", children: [
2531
- /* @__PURE__ */ jsx(Mail, { className: "mr-2 h-4 w-4" }),
2532
- t2("templates.buttons.messages")
2533
- ] }),
2534
- /* @__PURE__ */ jsxs(Button, { variant: "outline", children: [
2535
- /* @__PURE__ */ jsx(Calendar, { className: "mr-2 h-4 w-4" }),
2536
- t2("templates.buttons.schedule")
2537
- ] })
2538
- ] })
2539
- ] }),
2540
- /* @__PURE__ */ jsx(Separator, {}),
2541
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2542
- /* @__PURE__ */ jsx(Label, { children: t2("templates.buttons.states") }),
2543
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2544
- /* @__PURE__ */ jsx(Button, { disabled: true, children: t2("templates.buttons.disabled") }),
2545
- /* @__PURE__ */ jsx(Button, { variant: "outline", disabled: true, children: t2("templates.buttons.outlineDisabled") })
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: t2("templates.sections.badges") }),
2554
- /* @__PURE__ */ jsxs(Card, { children: [
2555
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2556
- /* @__PURE__ */ jsx(CardTitle, { children: t2("templates.badges.title") }),
2557
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.badges.description") })
2558
- ] }),
2559
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2560
- /* @__PURE__ */ jsx(Badge, { variant: "default", children: "Default" }),
2561
- /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: "Secondary" }),
2562
- /* @__PURE__ */ jsx(Badge, { variant: "outline", children: "Outline" }),
2563
- /* @__PURE__ */ jsx(Badge, { variant: "destructive", children: "Destructive" }),
2564
- /* @__PURE__ */ jsx(Badge, { className: "bg-success text-success-foreground", children: "Success" }),
2565
- /* @__PURE__ */ jsx(Badge, { className: "bg-warning text-warning-foreground", children: "Warning" }),
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: t2("templates.sections.dialogs") }),
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: t2("templates.dialogs.dialogTitle") }),
2577
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.dialogs.dialogDescription") })
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: t2("templates.dialogs.editProfile") }) }),
2581
- /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [
2582
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
2583
- /* @__PURE__ */ jsx(DialogTitle, { children: t2("templates.dialogs.editProfile") }),
2584
- /* @__PURE__ */ jsx(DialogDescription, { children: t2("templates.dialogs.editProfileDescription") })
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: t2("templates.dialogs.name") }),
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: t2("templates.dialogs.username") }),
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: t2("templates.dialogs.update") }) })
2597
- ] })
2598
- ] }) })
2599
- ] }),
2600
- /* @__PURE__ */ jsxs(Card, { children: [
2601
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2602
- /* @__PURE__ */ jsx(CardTitle, { children: t2("templates.dialogs.alertDialogTitle") }),
2603
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.dialogs.alertDialogDescription") })
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: t2("templates.dialogs.deleteAccount") }) }),
2607
- /* @__PURE__ */ jsxs(AlertDialogContent, { className: "sm:max-w-[425px]", children: [
2608
- /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
2609
- /* @__PURE__ */ jsx(AlertDialogTitle, { children: t2("templates.dialogs.areYouSure") }),
2610
- /* @__PURE__ */ jsx(AlertDialogDescription, { children: t2("templates.dialogs.deleteWarning") })
2611
- ] }),
2612
- /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
2613
- /* @__PURE__ */ jsx(AlertDialogCancel, { children: t2("templates.dialogs.cancel") }),
2614
- /* @__PURE__ */ jsx(AlertDialogAction, { className: "bg-destructive text-destructive-foreground hover:bg-destructive/90", children: t2("templates.dialogs.continue") })
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: t2("templates.headerVariations.sectionTitle") }),
2626
- /* @__PURE__ */ jsxs(Card, { children: [
2627
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2628
- /* @__PURE__ */ jsx(CardTitle, { children: t2("templates.headerVariations.cardTitle") }),
2629
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.headerVariations.cardDescription") })
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: t2("templates.headerVariations.visibleElements") }),
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: t2("templates.headerVariations.actionButtons") })
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: t2("templates.headerVariations.breadcrumbsLabel") })
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: t2("templates.headerVariations.preview") }),
2661
- /* @__PURE__ */ jsx(
2662
- Header,
2663
- {
2664
- title: !showHeaderBreadcrumbs ? t2("templates.headerVariations.currentPage") : void 0,
2665
- breadcrumbs: showHeaderBreadcrumbs ? [
2666
- {
2667
- label: t2("templates.headerVariations.breadcrumbBrand"),
2668
- href: "#",
2669
- icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" })
2670
- },
2671
- { label: t2("templates.headerVariations.breadcrumbSettings"), href: "#" },
2672
- { label: t2("templates.headerVariations.breadcrumbProfile") }
2673
- ] : void 0,
2674
- actions: showHeaderActions ? [
2675
- {
2676
- id: "notify",
2677
- icon: /* @__PURE__ */ jsx(Bell, { className: "w-5 h-5" }),
2678
- onClick: () => toast(t2("templates.headerVariations.notificationsOpenedToast"))
2679
- },
2680
- {
2681
- id: "mail",
2682
- label: t2("templates.headerVariations.messagesLabel"),
2683
- icon: /* @__PURE__ */ jsx(Mail, { className: "w-5 h-5" }),
2684
- onClick: () => toast(t2("templates.headerVariations.messagesOpenedToast"))
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: t2("templates.headerVariations.contentArea") })
2690
- ] })
2691
- ] })
2692
- ] })
2693
- ] }),
2694
- /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2695
- /* @__PURE__ */ jsxs("section", { children: [
2696
- /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t2("templates.sections.sidebarVariations") }),
2697
- /* @__PURE__ */ jsxs(Card, { children: [
2698
- /* @__PURE__ */ jsxs(CardHeader, { children: [
2699
- /* @__PURE__ */ jsx(CardTitle, { children: t2("templates.sidebar.title") }),
2700
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.sidebar.description") })
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: t2("templates.sidebar.assistantMode") }),
2705
- /* @__PURE__ */ jsx(TabsTrigger, { value: "default", children: t2("templates.sidebar.defaultMode") })
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: t2("templates.sidebarControls.footerSettings") }),
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: t2("templates.sidebarControls.userProfile") })
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: t2("templates.sidebarControls.settings") })
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: t2("templates.sidebarControls.logoutButton") })
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: t2("templates.sidebarControls.sidebarWidthDesktop") }),
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": t2("templates.sidebarControls.sidebarWidthAriaLabel")
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(t2("templates.sidebar.logoutToast")),
2785
- location: { pathname: "/assistant/current" },
2786
- navigate: () => {
2787
- },
2788
- variant: "assistant",
2789
- search: {
2790
- show: true,
2791
- placeholder: t2("templates.sidebar.searchTopicsPlaceholder"),
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: t2("templates.sidebarControls.filterByStatus") }),
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: t2("templates.sidebarControls.filterActive") }),
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: t2("templates.sidebarControls.filterArchived")
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: t2("templates.sidebarControls.filterPending")
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
- t2("templates.sidebar.newConversation")
2823
- ] })
2824
- },
2825
- navigationGroups: [
2826
- {
2827
- id: "recent",
2828
- label: t2("templates.sidebar.recent"),
2829
- icon: Clock,
2830
- items: [
2831
- {
2832
- path: "/assistant/refatoracao",
2833
- label: t2("templates.sidebar.items.sidebarRefactor"),
2834
- description: t2("templates.sidebar.items.sidebarRefactorDescription"),
2835
- actions: [
2836
- {
2837
- label: t2("templates.sidebar.actions.rename"),
2838
- icon: FileEdit,
2839
- onClick: () => toast(t2("templates.sidebar.actions.renameToast"))
2840
- },
2841
- {
2842
- label: t2("templates.sidebar.actions.move"),
2843
- icon: ArrowRightLeft,
2844
- children: [
2845
- {
2846
- label: t2("templates.sidebar.actions.moveActive"),
2847
- onClick: () => toast(t2("templates.sidebar.actions.moveActiveToast"))
2848
- },
2849
- {
2850
- label: t2("templates.sidebar.actions.moveMonitoring"),
2851
- onClick: () => toast(t2("templates.sidebar.actions.moveMonitoringToast"))
2852
- },
2853
- {
2854
- label: t2("templates.sidebar.actions.moveArchive"),
2855
- onClick: () => toast(t2("templates.sidebar.actions.moveArchiveToast"))
2856
- }
2857
- ]
2858
- },
2859
- {
2860
- label: t2("templates.sidebar.actions.clear"),
2861
- icon: Trash2,
2862
- onClick: () => toast(t2("templates.sidebar.actions.clearToast")),
2863
- variant: "destructive"
2864
- }
2865
- ]
2866
- }
2867
- ]
2868
- },
2869
- {
2870
- id: "projects",
2871
- label: t2("templates.sidebar.constructionMonitoring"),
2872
- icon: Map$1,
2873
- actions: [
2874
- {
2875
- label: t2("templates.sidebar.actions.newCategory"),
2876
- icon: Plus,
2877
- onClick: () => toast(t2("templates.sidebar.actions.newCategoryToast"))
2878
- },
2879
- {
2880
- label: t2("templates.sidebar.actions.archiveGroup"),
2881
- icon: Archive,
2882
- onClick: () => toast(t2("templates.sidebar.actions.archiveGroupToast"))
2883
- }
2884
- ],
2885
- items: [
2886
- {
2887
- path: "/assistant/br163",
2888
- label: t2("templates.sidebar.items.br163Restoration"),
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: t2("templates.sidebar.items.br163Location") }),
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: t2("templates.sidebar.assistantContent") })
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(t2("templates.sidebar.logoutToast")),
2944
- onSettingsClick: () => toast(t2("templates.sidebar.settingsClickedToast")),
2945
- location: { pathname: "/home" },
2946
- navigate: () => {
2947
- },
2948
- variant: "default",
2949
- routes: [
2950
- { path: "/home", label: t2("templates.sidebar.routes.home"), icon: Home },
2951
- { path: "/dashboard", label: t2("templates.sidebar.routes.dashboard"), icon: Users },
2952
- { path: "/settings", label: t2("templates.sidebar.routes.settings"), 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: t2("templates.sidebar.defaultContent") })
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: t2("templates.footer.title") }),
2979
- /* @__PURE__ */ jsx(CardDescription, { children: t2("templates.footer.subtitle") })
2980
- ] }),
2981
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
2982
- /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
2983
- t2("templates.footer.descriptionPart1"),
2984
- /* @__PURE__ */ jsx("code", { className: "bg-muted px-2 py-1 rounded-[var(--radius-sm)] [font-size:var(--text-small)]", children: "xertica-ui" }),
2985
- t2("templates.footer.descriptionPart2")
2986
- ] }),
2987
- /* @__PURE__ */ jsxs(Alert, { variant: "info", children: [
2988
- /* @__PURE__ */ jsx(AlertTitle, { children: t2("templates.footer.tipTitle") }),
2989
- /* @__PURE__ */ jsxs(AlertDescription, { children: [
2990
- t2("templates.footer.tipDescriptionPart1"),
2991
- /* @__PURE__ */ jsx("code", { className: "bg-muted px-1 rounded", children: "styles/xertica/tokens.css" }),
2992
- t2("templates.footer.tipDescriptionPart2")
2993
- ] })
2994
- ] })
2995
- ] })
2996
- ] })
2997
- ] }) }) }) })
2998
- ]
2999
- }
3000
- );
3001
- }
3002
- function TemplatePage() {
3003
- const { user, logout } = useAuth();
3004
- const layout = useOptionalLayout();
3005
- const [localSidebarExpanded, setLocalSidebarExpanded] = React__default.useState(false);
3006
- const [localAssistantExpanded, setLocalAssistantExpanded] = React__default.useState(false);
3007
- const sidebarExpanded = (layout == null ? void 0 : layout.sidebarExpanded) ?? localSidebarExpanded;
3008
- const sidebarWidth = (layout == null ? void 0 : layout.sidebarWidth) ?? 280;
3009
- const assistenteExpanded = (layout == null ? void 0 : layout.assistenteExpanded) ?? localAssistantExpanded;
3010
- const toggleSidebar = (layout == null ? void 0 : layout.toggleSidebar) ?? (() => setLocalSidebarExpanded((value) => !value));
3011
- const toggleAssistente = (layout == null ? void 0 : layout.toggleAssistente) ?? (() => setLocalAssistantExpanded((value) => !value));
3012
- const location = useLocation();
3013
- const navigate = useNavigate();
3014
- return /* @__PURE__ */ jsxs("div", { className: "h-screen flex bg-muted overflow-hidden relative", children: [
3015
- /* @__PURE__ */ jsx(
3016
- Sidebar,
3017
- {
3018
- expanded: sidebarExpanded,
3019
- width: sidebarWidth,
3020
- onToggle: toggleSidebar,
3021
- user: {
3022
- ...user,
3023
- name: "Ariel Santos",
3024
- avatar: "https://github.com/shadcn.png"
3025
- },
3026
- onLogout: logout,
3027
- onSettingsClick: () => navigate("/settings"),
3028
- location,
3029
- navigate,
3030
- routes
3031
- }
3032
- ),
3033
- /* @__PURE__ */ jsx(TemplateContent, {}),
3034
- /* @__PURE__ */ jsx(
3035
- XerticaAssistant,
3036
- {
3037
- isExpanded: assistenteExpanded,
3038
- onToggle: toggleAssistente,
3039
- onEvaluation: () => {
3040
- }
3041
- }
3042
- )
3043
- ] });
3044
- }
3045
- function VerifyEmailPage() {
3046
- var _a;
3047
- const navigate = useNavigate();
3048
- const location = useLocation();
3049
- const { t: t2 } = useTranslation();
3050
- const email = ((_a = location.state) == null ? void 0 : _a.email) || "your@email.com";
3051
- const [isResending, setIsResending] = useState(false);
3052
- const [resendSuccess, setResendSuccess] = useState(false);
3053
- const handleResend = async () => {
3054
- setIsResending(true);
3055
- setResendSuccess(false);
3056
- await new Promise((resolve) => setTimeout(resolve, 1500));
3057
- setIsResending(false);
3058
- setResendSuccess(true);
3059
- setTimeout(() => setResendSuccess(false), 3e3);
3060
- };
3061
- const handleSocialLogin = (_provider) => {
3062
- };
3063
- return /* @__PURE__ */ jsxs("div", { className: "min-h-screen flex", children: [
3064
- /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
3065
- /* @__PURE__ */ jsx(
3066
- ImageWithFallback,
3067
- {
3068
- src: "https://images.unsplash.com/photo-1563986768609-322da13575f3?w=1200&h=800&fit=crop&auto=format",
3069
- alt: t2("verifyEmail.heroImageAlt"),
3070
- className: "absolute inset-0 w-full h-full object-cover"
3071
- }
3072
- ),
3073
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
3074
- ] }),
3075
- /* @__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: [
3076
- /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsx(LanguageSelector, { variant: "minimal", showIcon: false }) }),
3077
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
3078
- /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm space-y-6 relative z-10", children: [
3079
- /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
3080
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(
3081
- XerticaLogo,
3082
- {
3083
- className: "h-12 w-auto text-primary dark:text-foreground",
3084
- variant: "theme"
3085
- }
3086
- ) }),
3087
- /* @__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" }) }) }),
3088
- /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: t2("verifyEmail.heading") }),
3089
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: t2("verifyEmail.instructionsSent") }),
3090
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-primary", children: email })
3091
- ] }),
3092
- /* @__PURE__ */ jsxs("div", { className: "bg-accent rounded-[var(--radius)] p-4 space-y-3", children: [
3093
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t2("verifyEmail.instructions") }),
3094
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-muted-foreground", children: [
3095
- /* @__PURE__ */ jsx(CheckCircle2, { className: "w-4 h-4 mt-0.5 flex-shrink-0 text-[var(--chart-2)]" }),
3096
- /* @__PURE__ */ jsx("span", { className: "text-sm", children: t2("verifyEmail.checkSpam") })
3097
- ] })
3098
- ] }),
3099
- 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: [
3100
- /* @__PURE__ */ jsx(CheckCircle2, { className: "w-5 h-5 text-[var(--chart-2)] flex-shrink-0" }),
3101
- /* @__PURE__ */ jsx("span", { className: "text-sm text-[var(--chart-2)]", children: t2("verifyEmail.resentSuccess") })
3102
- ] }),
3103
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
3104
- /* @__PURE__ */ jsx("p", { className: "text-center text-muted-foreground", children: t2("verifyEmail.notReceived") }),
3105
- /* @__PURE__ */ jsx(
3106
- Button,
3107
- {
3108
- variant: "outline",
3109
- className: "w-full",
3110
- onClick: handleResend,
3111
- disabled: isResending,
3112
- children: isResending ? t2("verifyEmail.resending") : t2("verifyEmail.resend")
3113
- }
3114
- ),
3115
- /* @__PURE__ */ jsxs(
3116
- Button,
3117
- {
3118
- type: "button",
3119
- onClick: () => navigate("/login"),
3120
- variant: "outline",
3121
- className: "w-full text-muted-foreground hover:text-foreground",
3122
- children: [
3123
- /* @__PURE__ */ jsx(ArrowLeft, { className: "w-4 h-4 mr-2" }),
3124
- t2("verifyEmail.backToLogin")
3125
- ]
3126
- }
3127
- )
3128
- ] }),
3129
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
3130
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsx("div", { className: "w-full border-t border-border" }) }),
3131
- /* @__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") }) })
3132
- ] }),
3133
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
3134
- /* @__PURE__ */ jsxs(
3135
- Button,
3136
- {
3137
- type: "button",
3138
- variant: "outline",
3139
- className: "w-full justify-center",
3140
- onClick: () => handleSocialLogin(),
3141
- children: [
3142
- /* @__PURE__ */ jsxs("svg", { className: "w-5 h-5 mr-2", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
3143
- /* @__PURE__ */ jsx(
3144
- "path",
3145
- {
3146
- fill: "#EA4335",
3147
- 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"
3148
- }
3149
- ),
3150
- /* @__PURE__ */ jsx(
3151
- "path",
3152
- {
3153
- fill: "#4285F4",
3154
- 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"
3155
- }
3156
- ),
3157
- /* @__PURE__ */ jsx(
3158
- "path",
3159
- {
3160
- fill: "#FBBC05",
3161
- 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"
3162
- }
3163
- ),
3164
- /* @__PURE__ */ jsx(
3165
- "path",
3166
- {
3167
- fill: "#34A853",
3168
- 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"
3169
- }
3170
- ),
3171
- /* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
3172
- ] }),
3173
- /* @__PURE__ */ jsx("span", { children: t2("login.signInWithGoogle") })
3174
- ]
3175
- }
3176
- ),
3177
- /* @__PURE__ */ jsxs(
3178
- Button,
3179
- {
3180
- type: "button",
3181
- variant: "outline",
3182
- className: "w-full justify-center",
3183
- onClick: () => handleSocialLogin(),
3184
- children: [
3185
- /* @__PURE__ */ jsx(Lock, { className: "w-5 h-5 mr-2 text-[var(--chart-4)]" }),
3186
- /* @__PURE__ */ jsx("span", { children: t2("login.signInWithMTLogin") })
3187
- ]
3188
- }
3189
- ),
3190
- /* @__PURE__ */ jsx(
3191
- Button,
3192
- {
3193
- type: "button",
3194
- variant: "outline",
3195
- className: "w-full justify-center font-normal",
3196
- onClick: () => handleSocialLogin(),
3197
- children: /* @__PURE__ */ jsx("span", { children: t2("login.signInWithGovBr") })
3198
- }
3199
- )
3200
- ] })
3201
- ] })
3202
- ] })
3203
- ] });
3204
- }
3205
- export {
3206
- ForgotPasswordPage as F,
3207
- HomeContent as H,
3208
- LoginPage as L,
3209
- ResetPasswordPage as R,
3210
- TemplateContent as T,
3211
- VerifyEmailPage as V,
3212
- HomePage as a,
3213
- TemplatePage as b
3214
- };