xertica-ui 2.7.0 → 2.9.6

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 (480) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/README.md +20 -12
  3. package/bin/cli.ts +327 -87
  4. package/bin/generate-tokens.ts +25 -9
  5. package/bin/language-config.ts +58 -18
  6. package/components/assistant/xertica-assistant/xertica-assistant.tsx +1 -1
  7. package/components/blocks/auth/AuthPageShell.tsx +63 -18
  8. package/components/blocks/auth/SocialLoginButtons.tsx +3 -3
  9. package/components/blocks/index.ts +1 -0
  10. package/components/blocks/marketing/CTASection.tsx +73 -0
  11. package/components/blocks/marketing/ComplianceBadgeRow.tsx +49 -0
  12. package/components/blocks/marketing/EvidenceTimeline.tsx +91 -0
  13. package/components/blocks/marketing/FeatureRow.tsx +78 -0
  14. package/components/blocks/marketing/Hero.tsx +125 -0
  15. package/components/blocks/marketing/HowItWorksSteps.tsx +90 -0
  16. package/components/blocks/marketing/LogoCloud.tsx +47 -0
  17. package/components/blocks/marketing/MarketingFooter.tsx +109 -0
  18. package/components/blocks/marketing/MarketingNavbar.tsx +192 -0
  19. package/components/blocks/marketing/PillBadge.tsx +96 -0
  20. package/components/blocks/marketing/SectionHeading.tsx +82 -0
  21. package/components/blocks/marketing/ServiceCardGrid.tsx +238 -0
  22. package/components/blocks/marketing/StatBand.tsx +99 -0
  23. package/components/blocks/marketing/TopAccentCards.tsx +91 -0
  24. package/components/blocks/marketing/index.ts +41 -0
  25. package/components/brand/index.ts +1 -0
  26. package/components/brand/isotype/Isotype.tsx +64 -0
  27. package/components/brand/isotype/IsotypeDiagonal.tsx +51 -0
  28. package/components/brand/isotype/IsotypeFrames.tsx +82 -0
  29. package/components/brand/isotype/IsotypeMini.tsx +65 -0
  30. package/components/brand/isotype/IsotypeTwist.tsx +68 -0
  31. package/components/brand/isotype/frame-variants.ts +20 -0
  32. package/components/brand/isotype/index.ts +9 -0
  33. package/components/brand/isotype/isotype-diagonal.mdx +52 -0
  34. package/components/brand/isotype/isotype-diagonal.stories.tsx +44 -0
  35. package/components/brand/isotype/isotype-diagonal.test.tsx +180 -0
  36. package/components/brand/isotype/isotype-frames.mdx +50 -0
  37. package/components/brand/isotype/isotype-frames.stories.tsx +63 -0
  38. package/components/brand/isotype/isotype-frames.test.tsx +92 -0
  39. package/components/brand/isotype/isotype-mini.mdx +61 -0
  40. package/components/brand/isotype/isotype-mini.stories.tsx +75 -0
  41. package/components/brand/isotype/isotype-mini.test.tsx +45 -0
  42. package/components/brand/isotype/isotype-twist.test.tsx +71 -0
  43. package/components/brand/isotype/isotype.mdx +61 -0
  44. package/components/brand/isotype/isotype.stories.tsx +74 -0
  45. package/components/brand/isotype/isotype.test.tsx +41 -0
  46. package/components/brand/isotype/mini-patterns.ts +50 -0
  47. package/components/brand/isotype/patterns.ts +83 -0
  48. package/components/brand/isotype/twist-variants.ts +20 -0
  49. package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +3 -6
  50. package/components/pages/index.ts +1 -0
  51. package/components/pages/landing-page/LandingPage.tsx +360 -0
  52. package/components/pages/landing-page/index.ts +1 -0
  53. package/components/pages/login-page/LoginPage.tsx +3 -6
  54. package/components/pages/reset-password-page/ResetPasswordPage.tsx +1 -4
  55. package/components/pages/verify-email-page/VerifyEmailPage.tsx +2 -5
  56. package/components/ui/button/button.test.tsx +3 -3
  57. package/components/ui/button/button.tsx +5 -4
  58. package/components/ui/card/card.test.tsx +12 -0
  59. package/components/ui/card/card.tsx +16 -2
  60. package/components/ui/input/input.tsx +1 -1
  61. package/components/ui/input-otp/input-otp.tsx +1 -1
  62. package/components/ui/search/search.tsx +1 -1
  63. package/components/ui/select/select.tsx +2 -2
  64. package/components/ui/switch/switch.tsx +1 -1
  65. package/components/ui/textarea/textarea.tsx +1 -1
  66. package/contexts/BrandColorsContext.tsx +59 -7
  67. package/contexts/theme-data.ts +127 -3
  68. package/dist/AssistantChart-BFBJXVcm.js +3383 -0
  69. package/dist/AssistantChart-BTnE94FR.cjs +3551 -0
  70. package/dist/AssistantChart-BU48lxL2.js +3383 -0
  71. package/dist/AssistantChart-BvccsQMx.cjs +3551 -0
  72. package/dist/AssistantChart-CkskcBVD.js +3383 -0
  73. package/dist/AssistantChart-CoN6ga6Z.js +3383 -0
  74. package/dist/AssistantChart-CrPkO9ip.js +3383 -0
  75. package/dist/AssistantChart-DIRYJ7WY.js +3383 -0
  76. package/dist/AssistantChart-DKz2O1R8.cjs +3551 -0
  77. package/dist/AssistantChart-DOnY1ZlD.cjs +3551 -0
  78. package/dist/AssistantChart-DYL6UEvo.cjs +3551 -0
  79. package/dist/AssistantChart-DjM3qnp5.cjs +3551 -0
  80. package/dist/AssistantChart-hxPyE1S9.cjs +3551 -0
  81. package/dist/AssistantChart-keo-ogKi.js +3383 -0
  82. package/dist/AudioPlayer-AoU5MTiM.cjs +1282 -0
  83. package/dist/AudioPlayer-Bx1vrblm.js +1278 -0
  84. package/dist/AudioPlayer-CpihsbaD.js +1278 -0
  85. package/dist/AudioPlayer-CvGajzMC.cjs +1282 -0
  86. package/dist/AudioPlayer-CvHpFqDG.cjs +1282 -0
  87. package/dist/AudioPlayer-D0-I6J3J.cjs +1282 -0
  88. package/dist/AudioPlayer-D4S7GQou.js +1278 -0
  89. package/dist/AudioPlayer-DIWX_Yg7.cjs +1282 -0
  90. package/dist/AudioPlayer-DrWJnS7c.js +1278 -0
  91. package/dist/AudioPlayer-_P-Z7pAK.js +1278 -0
  92. package/dist/BrandColorsContext-B25Bpr3b.cjs +819 -0
  93. package/dist/BrandColorsContext-BCieATdW.js +812 -0
  94. package/dist/BrandColorsContext-BNKLUVcU.js +829 -0
  95. package/dist/BrandColorsContext-DNZGHItQ.cjs +836 -0
  96. package/dist/BrandColorsContext-DP0DXAXS.js +824 -0
  97. package/dist/BrandColorsContext-DjpC9wR_.cjs +798 -0
  98. package/dist/BrandColorsContext-MpXFhte7.cjs +831 -0
  99. package/dist/BrandColorsContext-Ug_TZ8yn.cjs +846 -0
  100. package/dist/BrandColorsContext-V3tOc-Zw.js +791 -0
  101. package/dist/BrandColorsContext-z0O2LlZz.js +839 -0
  102. package/dist/CodeBlock-BkaZf-R8.cjs +223 -0
  103. package/dist/CodeBlock-CK4rO6lM.js +221 -0
  104. package/dist/CodeBlock-CKXamfVd.cjs +223 -0
  105. package/dist/CodeBlock-CKu8LgbP.cjs +223 -0
  106. package/dist/CodeBlock-CVmE7isS.cjs +223 -0
  107. package/dist/CodeBlock-D7i5-cMv.js +221 -0
  108. package/dist/CodeBlock-Dg56j2ut.cjs +223 -0
  109. package/dist/CodeBlock-DiLS5LLI.js +221 -0
  110. package/dist/CodeBlock-Dt6nUQoo.js +221 -0
  111. package/dist/CodeBlock-zdylBGdZ.js +221 -0
  112. package/dist/CustomTooltipContent-BAR5qCQg.js +33 -0
  113. package/dist/CustomTooltipContent-Bxynuq7T.js +33 -0
  114. package/dist/CustomTooltipContent-BzjOSA0P.cjs +54 -0
  115. package/dist/CustomTooltipContent-C-ZeCNsf.js +33 -0
  116. package/dist/CustomTooltipContent-CBLHBxX8.cjs +54 -0
  117. package/dist/CustomTooltipContent-CON_QrXm.cjs +54 -0
  118. package/dist/CustomTooltipContent-CjWm3jjV.js +33 -0
  119. package/dist/CustomTooltipContent-DTV9MN9E.cjs +54 -0
  120. package/dist/CustomTooltipContent-UR_n2QfW.js +33 -0
  121. package/dist/CustomTooltipContent-v1SXjoFn.cjs +54 -0
  122. package/dist/EvidenceTimeline-DrRk4yqb.cjs +560 -0
  123. package/dist/EvidenceTimeline-l4MaV4C7.js +546 -0
  124. package/dist/FeatureCard-4n_8a63v.cjs +497 -0
  125. package/dist/FeatureCard-BLiAWT3w.js +485 -0
  126. package/dist/FeatureCard-BXRW97Ef.cjs +497 -0
  127. package/dist/FeatureCard-CDgLlWE2.js +485 -0
  128. package/dist/FeatureCard-CIbBHqeY.cjs +497 -0
  129. package/dist/FeatureCard-CgQ8lq-I.cjs +497 -0
  130. package/dist/FeatureCard-Cp8cVC6T.cjs +497 -0
  131. package/dist/FeatureCard-D0MwrTRP.js +485 -0
  132. package/dist/FeatureCard-DtoKPSfW.cjs +497 -0
  133. package/dist/FeatureCard-P4iEpBmB.js +485 -0
  134. package/dist/FeatureCard-e3f8bnF0.js +485 -0
  135. package/dist/FeatureCard-uE5i0in_.js +485 -0
  136. package/dist/ImageWithFallback-BOh1FM3I.js +98 -0
  137. package/dist/ImageWithFallback-BQO7952C.js +98 -0
  138. package/dist/ImageWithFallback-BkMXHCvV.cjs +122 -0
  139. package/dist/ImageWithFallback-C1ww9Hg3.cjs +122 -0
  140. package/dist/ImageWithFallback-C72nwszA.cjs +122 -0
  141. package/dist/ImageWithFallback-CBrkAEo3.cjs +122 -0
  142. package/dist/ImageWithFallback-CCUMDuEC.cjs +122 -0
  143. package/dist/ImageWithFallback-CGk5zPH-.js +98 -0
  144. package/dist/ImageWithFallback-CfnoFFSP.js +98 -0
  145. package/dist/ImageWithFallback-DQD5TTlY.js +98 -0
  146. package/dist/Isotype--fRZWwS6.js +85 -0
  147. package/dist/Isotype-0dpLqetB.js +85 -0
  148. package/dist/Isotype-B8XLEXSB.cjs +92 -0
  149. package/dist/Isotype-ChKwN7e-.cjs +91 -0
  150. package/dist/IsotypeDiagonal-CuPYPP4f.js +84 -0
  151. package/dist/IsotypeDiagonal-eNcOXRAc.cjs +91 -0
  152. package/dist/IsotypeDiagonal-oiwpXZhE.js +104 -0
  153. package/dist/IsotypeDiagonal-xMFoFXkb.cjs +109 -0
  154. package/dist/IsotypeFrames-BcWtyAWp.cjs +83 -0
  155. package/dist/IsotypeFrames-BnvSJKiH.cjs +73 -0
  156. package/dist/IsotypeFrames-iDRTRuIu.js +79 -0
  157. package/dist/IsotypeFrames-qoXOvOJt.js +69 -0
  158. package/dist/IsotypeMini-CQtWVo3h.js +126 -0
  159. package/dist/IsotypeMini-Cu_sW5yN.cjs +134 -0
  160. package/dist/IsotypeTwist-BTdNL4iV.js +106 -0
  161. package/dist/IsotypeTwist-DvsUgZs_.cjs +115 -0
  162. package/dist/LanguageContext-B1aOXO-K.js +1987 -0
  163. package/dist/LanguageContext-BP0k7AzI.js +1993 -0
  164. package/dist/LanguageContext-CChcIHIG.cjs +1998 -0
  165. package/dist/LanguageContext-ubC7TSs_.cjs +1992 -0
  166. package/dist/LanguageSelector-1XhM7R1i.cjs +48 -0
  167. package/dist/LanguageSelector-B3ZVNc55.js +46 -0
  168. package/dist/LanguageSelector-BLFPXGo8.cjs +48 -0
  169. package/dist/LanguageSelector-CYRzWkRZ.cjs +48 -0
  170. package/dist/LanguageSelector-Cj6zl0CM.js +46 -0
  171. package/dist/LanguageSelector-CyHjZgC4.cjs +48 -0
  172. package/dist/LanguageSelector-DE8lIySO.js +46 -0
  173. package/dist/LanguageSelector-DK1zD4VH.cjs +48 -0
  174. package/dist/LanguageSelector-DUr1hjBW.js +46 -0
  175. package/dist/LanguageSelector-DjbWIKWC.js +46 -0
  176. package/dist/LanguageSelector-DseCAa0p.cjs +48 -0
  177. package/dist/LanguageSelector-Du09anfM.js +46 -0
  178. package/dist/LanguageSelector-PZHlFfEs.cjs +48 -0
  179. package/dist/LanguageSelector-SB-NJSmx.js +46 -0
  180. package/dist/LogoCloud-C_uMKVNg.cjs +513 -0
  181. package/dist/LogoCloud-DJsMPNPh.js +500 -0
  182. package/dist/MarketingFooter-B_ycEdTJ.cjs +727 -0
  183. package/dist/MarketingFooter-Bhx-2Vlr.cjs +727 -0
  184. package/dist/MarketingFooter-Br1MGK9e.js +699 -0
  185. package/dist/MarketingFooter-BwE1vmeX.cjs +700 -0
  186. package/dist/MarketingFooter-CsZ1_xL9.js +709 -0
  187. package/dist/MarketingFooter-DCwf78Q4.cjs +716 -0
  188. package/dist/MarketingFooter-KH2r-OOL.js +709 -0
  189. package/dist/MarketingFooter-nB7G7gQ5.js +682 -0
  190. package/dist/PasswordStrengthMeter-B3S6i_k4.cjs +179 -0
  191. package/dist/PasswordStrengthMeter-B8ky1nJI.js +173 -0
  192. package/dist/PasswordStrengthMeter-C5VEopH-.cjs +179 -0
  193. package/dist/PasswordStrengthMeter-CIm7_jNT.js +173 -0
  194. package/dist/PasswordStrengthMeter-DKSAbQzu.js +173 -0
  195. package/dist/PasswordStrengthMeter-DxLu54p-.cjs +179 -0
  196. package/dist/PasswordStrengthMeter-k-e9Pole.cjs +179 -0
  197. package/dist/PasswordStrengthMeter-pAi2viq5.js +173 -0
  198. package/dist/SectionHeading-DEeOKcAd.cjs +857 -0
  199. package/dist/SectionHeading-DMNObcwm.js +838 -0
  200. package/dist/ThemeToggle--CGJjQJv.cjs +219 -0
  201. package/dist/ThemeToggle-4pQbVkpK.js +215 -0
  202. package/dist/ThemeToggle-B6rIVLvC.cjs +219 -0
  203. package/dist/ThemeToggle-BUOTps5l.cjs +219 -0
  204. package/dist/ThemeToggle-Bn_7Pmfe.js +215 -0
  205. package/dist/ThemeToggle-CO5mPl6e.js +215 -0
  206. package/dist/ThemeToggle-CoL8Ady7.js +215 -0
  207. package/dist/ThemeToggle-D2Wzm5bn.cjs +219 -0
  208. package/dist/ThemeToggle-DbZQ0JSV.cjs +219 -0
  209. package/dist/ThemeToggle-vLXEq2TS.js +215 -0
  210. package/dist/VerifyEmailPage-90lK6pP4.js +3258 -0
  211. package/dist/VerifyEmailPage-BJX1Rter.cjs +3320 -0
  212. package/dist/VerifyEmailPage-BSWvOgry.js +3310 -0
  213. package/dist/VerifyEmailPage-BTjI2c9n.js +2954 -0
  214. package/dist/VerifyEmailPage-CDqIkhx-.js +3224 -0
  215. package/dist/VerifyEmailPage-CJGfDSOx.js +2954 -0
  216. package/dist/VerifyEmailPage-Crxje3ZB.js +3323 -0
  217. package/dist/VerifyEmailPage-D2ShbuEN.cjs +3333 -0
  218. package/dist/VerifyEmailPage-DEBZXQ7c.cjs +3310 -0
  219. package/dist/VerifyEmailPage-DGaX-jZv.cjs +3268 -0
  220. package/dist/VerifyEmailPage-DOlZUNc0.cjs +2963 -0
  221. package/dist/VerifyEmailPage-DQPRl_RJ.js +2954 -0
  222. package/dist/VerifyEmailPage-DrdqMbLC.cjs +2963 -0
  223. package/dist/VerifyEmailPage-ZtOPkgOA.cjs +3234 -0
  224. package/dist/VerifyEmailPage-hyDfeCRa.cjs +2963 -0
  225. package/dist/VerifyEmailPage-kKSXl8vu.cjs +2963 -0
  226. package/dist/VerifyEmailPage-s927GSiR.js +3300 -0
  227. package/dist/VerifyEmailPage-w4N-bDhU.js +2954 -0
  228. package/dist/XerticaOrbe-B9tegV1n.js +1925 -0
  229. package/dist/XerticaOrbe-BHex09xs.js +1925 -0
  230. package/dist/XerticaOrbe-BKW3LJEz.js +1925 -0
  231. package/dist/XerticaOrbe-BQ_NjwPS.cjs +1927 -0
  232. package/dist/XerticaOrbe-BdUX171Q.cjs +1927 -0
  233. package/dist/XerticaOrbe-BdlKXRHU.cjs +1927 -0
  234. package/dist/XerticaOrbe-Br2i99U_.cjs +1927 -0
  235. package/dist/XerticaOrbe-CByPAFE5.js +1925 -0
  236. package/dist/XerticaOrbe-Ccu9eFMu.js +1925 -0
  237. package/dist/XerticaOrbe-kjFmuyx-.cjs +1927 -0
  238. package/dist/XerticaProvider-BVid1oqn.cjs +46 -0
  239. package/dist/XerticaProvider-Bi5lKC9N.js +44 -0
  240. package/dist/XerticaProvider-BrPMVhiv.js +44 -0
  241. package/dist/XerticaProvider-Bz_YfNY4.js +44 -0
  242. package/dist/XerticaProvider-CnX5kt5W.cjs +46 -0
  243. package/dist/XerticaProvider-CtvYfRbZ.cjs +46 -0
  244. package/dist/XerticaProvider-DEKNJTlN.js +44 -0
  245. package/dist/XerticaProvider-DMiyExQS.js +44 -0
  246. package/dist/XerticaProvider-DP2lzKip.cjs +46 -0
  247. package/dist/XerticaProvider-De79hhgp.js +44 -0
  248. package/dist/XerticaProvider-Dkk1Vbsy.js +44 -0
  249. package/dist/XerticaProvider-EdzH9Nrw.cjs +46 -0
  250. package/dist/XerticaProvider-X_wavDYA.cjs +46 -0
  251. package/dist/XerticaProvider-b3n_oL8w.cjs +46 -0
  252. package/dist/alert-dialog--qdlmB5i.cjs +872 -0
  253. package/dist/alert-dialog-9XYAn5z5.js +819 -0
  254. package/dist/alert-dialog-B281hud0.cjs +872 -0
  255. package/dist/alert-dialog-BVWbrcrw.cjs +872 -0
  256. package/dist/alert-dialog-B_Ko1xpu.js +819 -0
  257. package/dist/alert-dialog-C48TOdYU.cjs +872 -0
  258. package/dist/alert-dialog-CEPpnpXt.js +819 -0
  259. package/dist/alert-dialog-CIxE8T-J.cjs +872 -0
  260. package/dist/alert-dialog-DW-_iPuf.js +819 -0
  261. package/dist/alert-dialog-NjflitDa.js +819 -0
  262. package/dist/assistant.cjs.js +2 -2
  263. package/dist/assistant.es.js +2 -2
  264. package/dist/avatar-BJwIMbZ_.js +54 -0
  265. package/dist/avatar-C4Zh5fAJ.cjs +77 -0
  266. package/dist/avatar-CTEUKZUT.js +54 -0
  267. package/dist/avatar-CtEKgg7s.cjs +77 -0
  268. package/dist/avatar-D03MNQxs.js +54 -0
  269. package/dist/avatar-D1bZhlhL.cjs +77 -0
  270. package/dist/avatar-DKIxHeKG.cjs +77 -0
  271. package/dist/avatar-Df7KgSvs.js +54 -0
  272. package/dist/avatar-Gy0_Xu9i.cjs +77 -0
  273. package/dist/avatar-v16eZC8p.js +54 -0
  274. package/dist/blocks.cjs.js +33 -18
  275. package/dist/blocks.es.js +2 -2
  276. package/dist/brand.cjs.js +110 -4
  277. package/dist/brand.es.js +98 -4
  278. package/dist/breadcrumb-B1mUiaWB.cjs +98 -0
  279. package/dist/breadcrumb-BGO5PZPG.js +90 -0
  280. package/dist/breadcrumb-BIRgmem-.js +90 -0
  281. package/dist/breadcrumb-BSng-oUf.cjs +98 -0
  282. package/dist/breadcrumb-BvGAY4ne.cjs +98 -0
  283. package/dist/breadcrumb-CES7furU.js +90 -0
  284. package/dist/breadcrumb-CP275kbF.cjs +98 -0
  285. package/dist/breadcrumb-CU-punra.js +90 -0
  286. package/dist/breadcrumb-D7hr1EvJ.js +90 -0
  287. package/dist/breadcrumb-DjV9wfX1.cjs +98 -0
  288. package/dist/button-B05czY_8.js +62 -0
  289. package/dist/button-B3SE1liJ.js +62 -0
  290. package/dist/button-BMDlWZR8.cjs +85 -0
  291. package/dist/button-BYtQygX5.cjs +85 -0
  292. package/dist/button-BnAW-a_w.js +62 -0
  293. package/dist/button-CUPDQews.js +62 -0
  294. package/dist/button-DFa-rtPy.js +62 -0
  295. package/dist/button-DV1G6XrI.cjs +85 -0
  296. package/dist/button-DVhloDtr.cjs +85 -0
  297. package/dist/button-Kd9Fj53S.cjs +85 -0
  298. package/dist/cli.js +367 -65
  299. package/dist/components/blocks/auth/AuthPageShell.d.ts +21 -5
  300. package/dist/components/blocks/index.d.ts +1 -0
  301. package/dist/components/blocks/marketing/CTASection.d.ts +28 -0
  302. package/dist/components/blocks/marketing/ComplianceBadgeRow.d.ts +23 -0
  303. package/dist/components/blocks/marketing/EvidenceTimeline.d.ts +26 -0
  304. package/dist/components/blocks/marketing/FeatureRow.d.ts +25 -0
  305. package/dist/components/blocks/marketing/Hero.d.ts +35 -0
  306. package/dist/components/blocks/marketing/HowItWorksSteps.d.ts +29 -0
  307. package/dist/components/blocks/marketing/LogoCloud.d.ts +22 -0
  308. package/dist/components/blocks/marketing/MarketingFooter.d.ts +42 -0
  309. package/dist/components/blocks/marketing/MarketingNavbar.d.ts +47 -0
  310. package/dist/components/blocks/marketing/PillBadge.d.ts +21 -0
  311. package/dist/components/blocks/marketing/SectionHeading.d.ts +23 -0
  312. package/dist/components/blocks/marketing/ServiceCardGrid.d.ts +65 -0
  313. package/dist/components/blocks/marketing/StatBand.d.ts +25 -0
  314. package/dist/components/blocks/marketing/TopAccentCards.d.ts +29 -0
  315. package/dist/components/blocks/marketing/index.d.ts +28 -0
  316. package/dist/components/brand/index.d.ts +1 -0
  317. package/dist/components/brand/isotype/Isotype.d.ts +27 -0
  318. package/dist/components/brand/isotype/IsotypeDiagonal.d.ts +19 -0
  319. package/dist/components/brand/isotype/IsotypeFrames.d.ts +21 -0
  320. package/dist/components/brand/isotype/IsotypeMini.d.ts +26 -0
  321. package/dist/components/brand/isotype/IsotypeTwist.d.ts +22 -0
  322. package/dist/components/brand/isotype/frame-variants.d.ts +11 -0
  323. package/dist/components/brand/isotype/index.d.ts +9 -0
  324. package/dist/components/brand/isotype/mini-patterns.d.ts +25 -0
  325. package/dist/components/brand/isotype/patterns.d.ts +42 -0
  326. package/dist/components/brand/isotype/twist-variants.d.ts +11 -0
  327. package/dist/components/pages/forgot-password-page/ForgotPasswordPage.d.ts +2 -2
  328. package/dist/components/pages/index.d.ts +1 -0
  329. package/dist/components/pages/landing-page/LandingPage.d.ts +18 -0
  330. package/dist/components/pages/landing-page/index.d.ts +1 -0
  331. package/dist/components/pages/login-page/LoginPage.d.ts +2 -2
  332. package/dist/components/pages/verify-email-page/VerifyEmailPage.d.ts +1 -1
  333. package/dist/components/ui/card/card.d.ts +13 -1
  334. package/dist/contexts/theme-data.d.ts +21 -1
  335. package/dist/dropdown-menu-B9wTZ0uX.cjs +225 -0
  336. package/dist/dropdown-menu-BeBtZOrs.cjs +225 -0
  337. package/dist/dropdown-menu-ChQa9zW3.cjs +225 -0
  338. package/dist/dropdown-menu-D7mRDGis.js +190 -0
  339. package/dist/dropdown-menu-D8ZmqHB7.js +190 -0
  340. package/dist/dropdown-menu-DRvnsQAt.cjs +225 -0
  341. package/dist/dropdown-menu-DUk81i5Y.js +190 -0
  342. package/dist/dropdown-menu-NlUHhVmK.js +190 -0
  343. package/dist/dropdown-menu-_AWBeOts.cjs +225 -0
  344. package/dist/dropdown-menu-qGzLO_HO.js +190 -0
  345. package/dist/hooks.cjs.js +2 -2
  346. package/dist/hooks.es.js +2 -2
  347. package/dist/index.cjs.js +57 -41
  348. package/dist/index.es.js +25 -25
  349. package/dist/input-B53E6K8G.js +65 -0
  350. package/dist/input-B7Q7vcoG.cjs +91 -0
  351. package/dist/input-BysqLMK1.js +65 -0
  352. package/dist/input-CStdFsaH.cjs +91 -0
  353. package/dist/input-CXYth6nW.cjs +91 -0
  354. package/dist/input-CX_fWE2D.cjs +91 -0
  355. package/dist/input-CitUVnEn.js +65 -0
  356. package/dist/input-Csp_Metb.cjs +91 -0
  357. package/dist/input-DVRwGVLx.js +65 -0
  358. package/dist/input-Dqyj7Hdw.cjs +91 -0
  359. package/dist/input-dOgrFQ-3.js +65 -0
  360. package/dist/input-wkBYTp-B.js +65 -0
  361. package/dist/layout.cjs.js +1 -1
  362. package/dist/layout.es.js +1 -1
  363. package/dist/media.cjs.js +1 -1
  364. package/dist/media.es.js +1 -1
  365. package/dist/pages.cjs.js +2 -1
  366. package/dist/pages.es.js +1 -1
  367. package/dist/rich-text-editor-7K7UjLJN.cjs +2968 -0
  368. package/dist/rich-text-editor-B3jLP2bm.cjs +2968 -0
  369. package/dist/rich-text-editor-BHiRUzWZ.js +2894 -0
  370. package/dist/rich-text-editor-BWMRUMJ2.js +2894 -0
  371. package/dist/rich-text-editor-BntMVQsB.js +2894 -0
  372. package/dist/rich-text-editor-BoE6Ks5x.cjs +2968 -0
  373. package/dist/rich-text-editor-BzuEwR_X.js +2894 -0
  374. package/dist/rich-text-editor-CcopGbQ-.js +2894 -0
  375. package/dist/rich-text-editor-CmxSRJIi.cjs +2968 -0
  376. package/dist/rich-text-editor-Diz_onyB.js +2894 -0
  377. package/dist/rich-text-editor-DyYAu28v.cjs +2968 -0
  378. package/dist/rich-text-editor-JS_eMQCC.cjs +2968 -0
  379. package/dist/rich-text-editor-RWvK4hd3.cjs +2968 -0
  380. package/dist/rich-text-editor-gauEkzPM.js +2894 -0
  381. package/dist/select-B6PygS38.cjs +161 -0
  382. package/dist/select-BD763J5Y.cjs +161 -0
  383. package/dist/select-BNfFJwYp.js +130 -0
  384. package/dist/select-CN8IDjGB.js +130 -0
  385. package/dist/select-CwRzQHA7.cjs +161 -0
  386. package/dist/select-CwgD3nMD.js +130 -0
  387. package/dist/select-DEHUm_AC.cjs +161 -0
  388. package/dist/select-DJDgpVm3.cjs +161 -0
  389. package/dist/select-DSLWQLmo.cjs +161 -0
  390. package/dist/select-QJDKZITN.js +130 -0
  391. package/dist/select-YFx0wCYT.js +130 -0
  392. package/dist/select-q7aDfuPn.js +130 -0
  393. package/dist/sidebar-BF7JEL7U.js +1151 -0
  394. package/dist/sidebar-Bjr2doX5.cjs +1154 -0
  395. package/dist/sidebar-Bkk1YAsD.cjs +1154 -0
  396. package/dist/sidebar-CMrNCmhb.cjs +1154 -0
  397. package/dist/sidebar-CO9x8AVn.cjs +1154 -0
  398. package/dist/sidebar-Cn_KB4c6.js +1151 -0
  399. package/dist/sidebar-CuzYeOSz.cjs +1154 -0
  400. package/dist/sidebar-CwlW3LXE.js +1151 -0
  401. package/dist/sidebar-DNkf-Ug6.js +1151 -0
  402. package/dist/sidebar-DaS3fplw.cjs +1154 -0
  403. package/dist/sidebar-Db_C30ph.cjs +1154 -0
  404. package/dist/sidebar-FDCY42oP.js +1151 -0
  405. package/dist/sidebar-miPHsRz4.js +1151 -0
  406. package/dist/sidebar-pZF8mLLu.js +1151 -0
  407. package/dist/skeleton-BX2XTjMO.cjs +87 -0
  408. package/dist/skeleton-BoLK0iV7.js +78 -0
  409. package/dist/skeleton-BtBwJ39W.js +79 -0
  410. package/dist/skeleton-Bysq8yeB.js +79 -0
  411. package/dist/skeleton-C7nspYnC.cjs +87 -0
  412. package/dist/skeleton-CJyg0eJ1.cjs +88 -0
  413. package/dist/skeleton-D8WaauK0.cjs +88 -0
  414. package/dist/skeleton-DBYtjaZW.cjs +88 -0
  415. package/dist/skeleton-DL4V5Vub.cjs +87 -0
  416. package/dist/skeleton-DSMhdqp1.js +78 -0
  417. package/dist/skeleton-DY_lSFWf.js +79 -0
  418. package/dist/skeleton-Df65Ox10.js +79 -0
  419. package/dist/skeleton-DhJswvTW.cjs +88 -0
  420. package/dist/skeleton-DicUfozA.js +78 -0
  421. package/dist/slider-77T_Eqw4.js +56 -0
  422. package/dist/slider-B6puMLXS.cjs +78 -0
  423. package/dist/slider-B785N7lZ.js +56 -0
  424. package/dist/slider-BKV_vvsh.cjs +78 -0
  425. package/dist/slider-B_lUjFNa.cjs +78 -0
  426. package/dist/slider-C6yssKyZ.cjs +78 -0
  427. package/dist/slider-CKZO9gVh.cjs +78 -0
  428. package/dist/slider-Cn-ImSze.js +56 -0
  429. package/dist/slider-CtBpIaU4.js +56 -0
  430. package/dist/slider-KgWmSJbx.js +56 -0
  431. package/dist/tooltip-BPttuPxU.js +48 -0
  432. package/dist/tooltip-BiJVGob3.cjs +72 -0
  433. package/dist/tooltip-CIKRzQqE.cjs +72 -0
  434. package/dist/tooltip-CoDByjE_.cjs +72 -0
  435. package/dist/tooltip-D2OPn-1v.cjs +72 -0
  436. package/dist/tooltip-DlCHQuh1.js +48 -0
  437. package/dist/tooltip-_MAwsiOL.js +48 -0
  438. package/dist/tooltip-fQ2Va0G8.cjs +72 -0
  439. package/dist/tooltip-oAw00FX2.js +48 -0
  440. package/dist/tooltip-u147L0wD.js +48 -0
  441. package/dist/ui.cjs.js +13 -13
  442. package/dist/ui.es.js +13 -13
  443. package/dist/xertica-assistant-B1xAl2Vn.js +2173 -0
  444. package/dist/xertica-assistant-BBUMaUXw.js +2173 -0
  445. package/dist/xertica-assistant-C2A0R94j.js +2173 -0
  446. package/dist/xertica-assistant-CSUprvTR.js +2173 -0
  447. package/dist/xertica-assistant-CWuBwfzt.cjs +2180 -0
  448. package/dist/xertica-assistant-Caubm0HR.js +2173 -0
  449. package/dist/xertica-assistant-D2hlwiEP.js +2173 -0
  450. package/dist/xertica-assistant-DEexPM2u.cjs +2180 -0
  451. package/dist/xertica-assistant-DN2J_sQQ.cjs +2180 -0
  452. package/dist/xertica-assistant-DdYS6WXT.cjs +2180 -0
  453. package/dist/xertica-assistant-Dh1dmEx3.cjs +2180 -0
  454. package/dist/xertica-assistant-GGcyHEZG.cjs +2180 -0
  455. package/dist/xertica-assistant-USefPe2L.js +2173 -0
  456. package/dist/xertica-assistant-cwSHFwfv.cjs +2180 -0
  457. package/dist/xertica-ui.css +1 -1
  458. package/llms-compact.txt +1 -1
  459. package/llms.txt +1 -1
  460. package/package.json +3 -2
  461. package/styles/xertica/base.css +46 -0
  462. package/styles/xertica/tokens.css +10 -0
  463. package/templates/package.json +1 -1
  464. package/templates/src/app/App.tsx +5 -1
  465. package/templates/src/app/components/AuthGuard.tsx +6 -0
  466. package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +1 -4
  467. package/templates/src/features/auth/ui/LoginContent.tsx +1 -4
  468. package/templates/src/features/auth/ui/ResetPasswordContent.tsx +1 -4
  469. package/templates/src/features/auth/ui/VerifyEmailContent.tsx +1 -4
  470. package/templates/src/features/home/ui/HomeContent.tsx +12 -13
  471. package/templates/src/features/template/ui/TemplateContent.tsx +569 -26
  472. package/templates/src/locales/en/pages/landing.json +175 -0
  473. package/templates/src/locales/en/pages/templates.json +112 -4
  474. package/templates/src/locales/es/pages/landing.json +175 -0
  475. package/templates/src/locales/es/pages/templates.json +112 -4
  476. package/templates/src/locales/pt-BR/pages/landing.json +175 -0
  477. package/templates/src/locales/pt-BR/pages/templates.json +112 -4
  478. package/templates/src/pages/LandingPage.tsx +3 -0
  479. package/templates/src/styles/xertica/tokens.css +10 -0
  480. package/templates/vite.config.ts +25 -0
@@ -0,0 +1,3310 @@
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-B3SE1liJ.js';
4
+ import { I as Input } from './input-dOgrFQ-3.js';
5
+ import { 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-CEPpnpXt.js';
6
+ import { X as XerticaLogo } from './ThemeToggle-CoL8Ady7.js';
7
+ import { A as AuthPageShell, f as SocialLoginButtons, F as FeatureCardSkeleton, c as MarketingNavbar, H as Hero, L as LogoCloud, g as StatBand, e as ServiceCardGrid, b as FeatureRow, E as EvidenceTimeline, a as ComplianceBadgeRow, C as CTASection, M as MarketingFooter, u as usePasswordStrength, P as PasswordStrengthMeter } from './MarketingFooter-KH2r-OOL.js';
8
+ import { useTranslation } from 'react-i18next';
9
+ import { ArrowLeft, FileText, Home, Sparkles, Palette, ShieldCheck, Blocks, Terminal, Figma, FileCode2, Component, Github, SwatchBook, Layers, Braces, SquareTerminal, ShoppingCart, Building2, Landmark, Code2, Package, BookOpen, CheckCircle2, AlertCircle, Coffee, ShoppingBag, Hotel, Utensils, MapPin, Filter, X, MousePointer2, Circle, Square, Hexagon, Undo, Trash2, Save, Check, Pencil, Settings, Users, Mail, Phone, Search, User, Calendar, Bell, FileEdit, ArrowRightLeft, Clock, Plus, Archive, Map as Map$1 } from 'lucide-react';
10
+ import { useNavigate, Link, useLocation } from 'react-router-dom';
11
+ import { H as Header, S as Sidebar } from './sidebar-FDCY42oP.js';
12
+ import { C as Card, e as CardHeader, f as CardTitle, b as CardContent, d as CardFooter, c as CardDescription, S as Skeleton } from './skeleton-DY_lSFWf.js';
13
+ import { B as Badge, P as Progress } from './ImageWithFallback-CfnoFFSP.js';
14
+ import 'clsx';
15
+ import 'tailwind-merge';
16
+ import { e as IsotypeMini, d as IsotypeFrames } from './IsotypeMini-CQtWVo3h.js';
17
+ import { a as useOptionalLayout } from './LayoutContext-DNl1xSoX.js';
18
+ import { u as useLanguage } from './LanguageContext-CX_zdxre.js';
19
+ import { useQuery } from '@tanstack/react-query';
20
+ import { X as XerticaAssistant, g as gerarResposta } from './xertica-assistant-D2hlwiEP.js';
21
+ import i18n from 'i18next';
22
+ import { c as Isotype } from './Isotype--fRZWwS6.js';
23
+ import { A as Avatar, a as AvatarFallback } from './avatar-D03MNQxs.js';
24
+ import { S as ScrollArea, k as Dialog, n as DialogContent, q as DialogHeader, t as DialogTitle, o as DialogDescription, A as Alert, b as AlertTitle, a as AlertDescription, X as Textarea, T as Table, V as TableHeader, W as TableRow, U as TableHead, M as TableBody, O as TableCell, u as DialogTrigger, p as DialogFooter } from './rich-text-editor-BntMVQsB.js';
25
+ import { S as Select, h as SelectTrigger, i as SelectValue, a as SelectContent, c as SelectItem } from './select-QJDKZITN.js';
26
+ import { S as Slider } from './slider-CtBpIaU4.js';
27
+ import { toast } from 'sonner';
28
+ import { u as useTheme } from './ThemeContext-Dk3tH7Ym.js';
29
+ import { create } from 'zustand';
30
+
31
+ function ForgotPasswordPage() {
32
+ const navigate = useNavigate();
33
+ const { t } = useTranslation();
34
+ const [email, setEmail] = useState("");
35
+ const [isLoading, setIsLoading] = useState(false);
36
+ const handleSubmit = async (e) => {
37
+ e.preventDefault();
38
+ setIsLoading(true);
39
+ await new Promise((resolve) => setTimeout(resolve, 1500));
40
+ navigate("/verify-email", { state: { email } });
41
+ setIsLoading(false);
42
+ };
43
+ const handleSocialLogin = (_provider) => {
44
+ };
45
+ return /* @__PURE__ */ jsxs(
46
+ AuthPageShell,
47
+ {
48
+ imageSrc: "https://images.unsplash.com/photo-1557804506-669a67965ba0?w=1200&h=800&fit=crop&auto=format",
49
+ imageAlt: t("forgotPassword.heroImageAlt"),
50
+ children: [
51
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
52
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(XerticaLogo, { className: "h-12 w-auto text-primary dark:text-foreground", variant: "theme" }) }),
53
+ /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: t("forgotPassword.heading") }),
54
+ /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: t("forgotPassword.subheading") })
55
+ ] }),
56
+ /* @__PURE__ */ jsxs("form", { className: "space-y-6", onSubmit: handleSubmit, children: [
57
+ /* @__PURE__ */ jsxs("div", { className: "form-group space-y-2", children: [
58
+ /* @__PURE__ */ jsx(Label, { htmlFor: "email", children: t("forgotPassword.emailLabel") }),
59
+ /* @__PURE__ */ jsx(
60
+ Input,
61
+ {
62
+ id: "email",
63
+ name: "email",
64
+ type: "email",
65
+ required: true,
66
+ className: "w-full",
67
+ placeholder: t("forgotPassword.emailPlaceholder"),
68
+ value: email,
69
+ onChange: (e) => setEmail(e.target.value)
70
+ }
71
+ )
72
+ ] }),
73
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
74
+ /* @__PURE__ */ jsx(Button, { type: "submit", className: "w-full", disabled: isLoading, children: isLoading ? t("forgotPassword.submitting") : t("forgotPassword.submit") }),
75
+ /* @__PURE__ */ jsxs(
76
+ Button,
77
+ {
78
+ type: "button",
79
+ onClick: () => navigate("/login"),
80
+ variant: "outline",
81
+ className: "w-full text-muted-foreground hover:text-foreground",
82
+ children: [
83
+ /* @__PURE__ */ jsx(ArrowLeft, { className: "w-4 h-4 mr-2" }),
84
+ t("forgotPassword.backToLogin")
85
+ ]
86
+ }
87
+ )
88
+ ] })
89
+ ] }),
90
+ /* @__PURE__ */ jsx(SocialLoginButtons, { onSocialLogin: handleSocialLogin })
91
+ ]
92
+ }
93
+ );
94
+ }
95
+
96
+ const SIDEBAR_COLLAPSED_WIDTH = 80;
97
+
98
+ const t = (key, options) => i18n.t(key, options);
99
+ const MOCK_TEAM_MEMBERS = [
100
+ {
101
+ id: "1",
102
+ name: "Ana Silva",
103
+ email: "ana.silva@example.com",
104
+ role: "Developer",
105
+ status: "active"
106
+ },
107
+ {
108
+ id: "2",
109
+ name: "Bruno Costa",
110
+ email: "bruno.costa@example.com",
111
+ role: "Designer",
112
+ status: "active"
113
+ },
114
+ {
115
+ id: "3",
116
+ name: "Carla Oliveira",
117
+ email: "carla.oliveira@example.com",
118
+ role: "Manager",
119
+ status: "away"
120
+ },
121
+ {
122
+ id: "4",
123
+ name: "Diego Santos",
124
+ email: "diego.santos@example.com",
125
+ role: "Analyst",
126
+ status: "inactive"
127
+ }
128
+ ];
129
+ async function fetchTeamMembers() {
130
+ await new Promise((resolve) => setTimeout(resolve, 250));
131
+ return MOCK_TEAM_MEMBERS;
132
+ }
133
+ async function fetchFeatureCards() {
134
+ await new Promise((resolve) => setTimeout(resolve, 100));
135
+ return [
136
+ {
137
+ id: "template-cli",
138
+ title: t("home.templateCliTitle"),
139
+ description: t("home.templateCliDescription"),
140
+ badge: t("home.templateClibadge"),
141
+ href: "/template"
142
+ }
143
+ ];
144
+ }
145
+
146
+ function useTeamMembers() {
147
+ const { language } = useLanguage();
148
+ return useQuery({
149
+ // Language is part of the key so each locale has its own cache slot.
150
+ queryKey: ["home", "team-members", language],
151
+ queryFn: fetchTeamMembers,
152
+ staleTime: 2 * 60 * 1e3
153
+ // 2 min
154
+ });
155
+ }
156
+
157
+ function useFeatureCards() {
158
+ const { language } = useLanguage();
159
+ return useQuery({
160
+ // Language is part of the key so each locale has its own cache slot.
161
+ queryKey: ["home", "feature-cards", language],
162
+ queryFn: fetchFeatureCards,
163
+ staleTime: 10 * 60 * 1e3
164
+ // 10 min — feature list is fairly static
165
+ });
166
+ }
167
+
168
+ const useDashboardStore = create((set) => ({
169
+ // Filters
170
+ activeTab: "overview",
171
+ setActiveTab: (tab) => set({ activeTab: tab }),
172
+ // UI toggles
173
+ statsExpanded: true,
174
+ toggleStats: () => set((state) => ({ statsExpanded: !state.statsExpanded })),
175
+ // Showcase controls
176
+ progress: 45,
177
+ setProgress: (value) => set({ progress: value }),
178
+ sliderValue: [50],
179
+ setSliderValue: (value) => set({ sliderValue: value }),
180
+ switchEnabled: false,
181
+ toggleSwitch: () => set((state) => ({ switchEnabled: !state.switchEnabled }))
182
+ }));
183
+
184
+ function isDev() {
185
+ return false;
186
+ }
187
+ function SectionErrorFallback({ error, reset }) {
188
+ return /* @__PURE__ */ jsxs(
189
+ "div",
190
+ {
191
+ role: "alert",
192
+ 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",
193
+ children: [
194
+ /* @__PURE__ */ jsxs(
195
+ "svg",
196
+ {
197
+ width: "24",
198
+ height: "24",
199
+ viewBox: "0 0 24 24",
200
+ fill: "none",
201
+ stroke: "currentColor",
202
+ strokeWidth: "2",
203
+ strokeLinecap: "round",
204
+ strokeLinejoin: "round",
205
+ className: "text-destructive shrink-0",
206
+ "aria-hidden": "true",
207
+ children: [
208
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
209
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
210
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
211
+ ]
212
+ }
213
+ ),
214
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
215
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Não foi possível carregar este conteúdo" }),
216
+ isDev()
217
+ ] }),
218
+ /* @__PURE__ */ jsx(
219
+ "button",
220
+ {
221
+ onClick: reset,
222
+ 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",
223
+ children: "Tentar novamente"
224
+ }
225
+ )
226
+ ]
227
+ }
228
+ );
229
+ }
230
+
231
+ class ErrorBoundary extends React__default.Component {
232
+ constructor(props) {
233
+ super(props);
234
+ this.state = { hasError: false, error: null };
235
+ this.reset = this.reset.bind(this);
236
+ }
237
+ static getDerivedStateFromError(error) {
238
+ return { hasError: true, error };
239
+ }
240
+ componentDidCatch(error, info) {
241
+ this.props.onError?.(error, info);
242
+ }
243
+ componentDidUpdate(prevProps) {
244
+ if (!this.state.hasError) return;
245
+ const { resetKeys } = this.props;
246
+ if (!resetKeys?.length) return;
247
+ const prevKeys = prevProps.resetKeys ?? [];
248
+ const changed = resetKeys.some((key, i) => key !== prevKeys[i]);
249
+ if (changed) this.reset();
250
+ }
251
+ reset() {
252
+ this.setState({ hasError: false, error: null });
253
+ }
254
+ render() {
255
+ const { hasError, error } = this.state;
256
+ const { children, fallback: Fallback } = this.props;
257
+ if (hasError && error) {
258
+ return /* @__PURE__ */ jsx(Fallback, { error, reset: this.reset });
259
+ }
260
+ return children;
261
+ }
262
+ }
263
+ function SectionErrorBoundary({ children, onError, resetKeys }) {
264
+ return /* @__PURE__ */ jsx(ErrorBoundary, { fallback: SectionErrorFallback, onError, resetKeys, children });
265
+ }
266
+
267
+ function HomeContent() {
268
+ const { t } = useTranslation();
269
+ const layout = useOptionalLayout();
270
+ const sidebarExpanded = layout?.sidebarExpanded ?? false;
271
+ const sidebarWidth = layout?.sidebarWidth ?? 256;
272
+ const navigate = useNavigate();
273
+ const { data: featureCards = [], isLoading } = useFeatureCards();
274
+ return /* @__PURE__ */ jsxs(
275
+ "div",
276
+ {
277
+ style: {
278
+ paddingLeft: sidebarExpanded ? `${sidebarWidth}px` : SIDEBAR_COLLAPSED_WIDTH
279
+ },
280
+ className: "flex-1 flex flex-col overflow-hidden transition-all duration-300",
281
+ children: [
282
+ /* @__PURE__ */ jsx(
283
+ Header,
284
+ {
285
+ showThemeToggle: true,
286
+ showLanguageSelector: true,
287
+ breadcrumbs: [{ label: t("nav.designSystem"), href: "/home" }, { label: t("nav.home") }],
288
+ renderLink: (href, props) => /* @__PURE__ */ jsx(Link, { to: href, ...props })
289
+ }
290
+ ),
291
+ /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-hidden bg-muted", children: /* @__PURE__ */ jsx("div", { className: "h-full", style: { overflowY: "auto", overflowX: "hidden" }, children: /* @__PURE__ */ jsx("div", { className: "p-5 sm:p-4 md:p-6", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto space-y-8", children: [
292
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
293
+ /* @__PURE__ */ jsx(IsotypeMini, { className: "w-14 shrink-0" }),
294
+ /* @__PURE__ */ jsx(
295
+ PageHeader,
296
+ {
297
+ title: t("home.welcome"),
298
+ subtitle: t("home.subtitle"),
299
+ className: "flex-1"
300
+ }
301
+ )
302
+ ] }),
303
+ /* @__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: [
304
+ /* @__PURE__ */ jsx(FeatureCardSkeleton, { showAction: true }),
305
+ /* @__PURE__ */ jsx(FeatureCardSkeleton, { showAction: true }),
306
+ /* @__PURE__ */ jsx(FeatureCardSkeleton, { showAction: true })
307
+ ] }) : featureCards.map((card) => /* @__PURE__ */ jsxs(
308
+ Card,
309
+ {
310
+ className: "hover:shadow-xl transition-shadow duration-200 flex flex-col h-full",
311
+ children: [
312
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
313
+ /* @__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)]" }) }),
314
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
315
+ /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: t(`home.${card.id.replace(/-/g, "")}Title`, {
316
+ defaultValue: card.title
317
+ }) }),
318
+ card.badge && /* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-xs", children: t(`home.${card.id.replace(/-/g, "")}badge`, {
319
+ defaultValue: card.badge
320
+ }) })
321
+ ] })
322
+ ] }) }),
323
+ /* @__PURE__ */ jsx(CardContent, { className: "flex-1", children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t(`home.${card.id.replace(/-/g, "")}Description`, {
324
+ defaultValue: card.description
325
+ }) }) }),
326
+ /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(
327
+ Button,
328
+ {
329
+ variant: "outline",
330
+ className: "w-full",
331
+ onClick: () => navigate(card.href),
332
+ children: t("common.view")
333
+ }
334
+ ) })
335
+ ]
336
+ },
337
+ card.id
338
+ )) }) })
339
+ ] }) }) }) })
340
+ ]
341
+ }
342
+ );
343
+ }
344
+
345
+ const routes = [
346
+ { path: "/home", label: "Home", icon: Home },
347
+ { path: "/template", label: "Template", icon: FileText }
348
+ ];
349
+
350
+ const AuthContext = createContext(null);
351
+ function useAuth() {
352
+ const ctx = useContext(AuthContext);
353
+ if (!ctx) throw new Error("useAuth must be used within <AuthProvider>");
354
+ return ctx;
355
+ }
356
+
357
+ async function fetchAssistantConfig() {
358
+ await new Promise((resolve) => setTimeout(resolve, 150));
359
+ const t = (key) => i18n.t(key);
360
+ return {
361
+ suggestions: [
362
+ { id: "1", text: t("assistant.suggestions.whatCanIAsk") },
363
+ { id: "2", text: t("assistant.suggestions.whatDoYouDo") },
364
+ { id: "3", text: t("assistant.suggestions.whichProjects") },
365
+ { id: "4", text: t("assistant.suggestions.nextProject") }
366
+ ],
367
+ richSuggestions: [
368
+ { id: "rich-1", text: t("assistant.richSuggestions.viewPerformance") },
369
+ { id: "rich-2", text: t("assistant.richSuggestions.generateReport") },
370
+ { id: "rich-3", text: t("assistant.richSuggestions.createDocument") },
371
+ { id: "rich-4", text: t("assistant.richSuggestions.generatePodcast") }
372
+ ],
373
+ feedbackOptions: [
374
+ t("assistant.feedback.notWhatIWanted"),
375
+ t("assistant.feedback.incorrectInfo"),
376
+ t("assistant.feedback.incompleteAnswer")
377
+ ]
378
+ };
379
+ }
380
+ function getMockRichSuggestions() {
381
+ return [
382
+ { id: "rich-1", text: i18n.t("assistant.richSuggestions.viewPerformance") },
383
+ { id: "rich-2", text: i18n.t("assistant.richSuggestions.generateReport") },
384
+ { id: "rich-3", text: i18n.t("assistant.richSuggestions.createDocument") },
385
+ { id: "rich-4", text: i18n.t("assistant.richSuggestions.generatePodcast") }
386
+ ];
387
+ }
388
+ function getMockFeedbackOptions() {
389
+ return [
390
+ i18n.t("assistant.feedback.notWhatIWanted"),
391
+ i18n.t("assistant.feedback.incorrectInfo"),
392
+ i18n.t("assistant.feedback.incompleteAnswer")
393
+ ];
394
+ }
395
+
396
+ function useAssistantConfig() {
397
+ const { language } = useLanguage();
398
+ return useQuery({
399
+ // Language is part of the key so each locale has its own cache slot.
400
+ queryKey: ["assistant", "config", language],
401
+ queryFn: fetchAssistantConfig,
402
+ staleTime: 30 * 60 * 1e3
403
+ // 30 min — config rarely changes
404
+ });
405
+ }
406
+
407
+ function HomePage() {
408
+ const { user, logout } = useAuth();
409
+ const layout = useOptionalLayout();
410
+ const [localSidebarExpanded, setLocalSidebarExpanded] = React__default.useState(false);
411
+ const [localAssistantExpanded, setLocalAssistantExpanded] = React__default.useState(false);
412
+ const sidebarExpanded = layout?.sidebarExpanded ?? localSidebarExpanded;
413
+ const sidebarWidth = layout?.sidebarWidth ?? 280;
414
+ const assistenteExpanded = layout?.assistenteExpanded ?? localAssistantExpanded;
415
+ const toggleSidebar = layout?.toggleSidebar ?? (() => setLocalSidebarExpanded((value) => !value));
416
+ const toggleAssistente = layout?.toggleAssistente ?? (() => setLocalAssistantExpanded((value) => !value));
417
+ const location = useLocation();
418
+ const navigate = useNavigate();
419
+ const { data: assistantConfig } = useAssistantConfig();
420
+ return /* @__PURE__ */ jsxs("div", { className: "h-screen flex bg-muted overflow-hidden relative", children: [
421
+ /* @__PURE__ */ jsx(
422
+ Sidebar,
423
+ {
424
+ expanded: sidebarExpanded,
425
+ width: sidebarWidth,
426
+ onToggle: toggleSidebar,
427
+ user: {
428
+ ...user,
429
+ name: "Ariel Santos",
430
+ avatar: "https://github.com/shadcn.png"
431
+ },
432
+ onLogout: logout,
433
+ onSettingsClick: () => navigate("/settings"),
434
+ location,
435
+ navigate,
436
+ routes
437
+ }
438
+ ),
439
+ /* @__PURE__ */ jsx(HomeContent, {}),
440
+ /* @__PURE__ */ jsx(
441
+ XerticaAssistant,
442
+ {
443
+ isExpanded: assistenteExpanded,
444
+ onToggle: toggleAssistente,
445
+ defaultTab: "chat",
446
+ demoMode: true,
447
+ responseGenerator: gerarResposta,
448
+ suggestions: assistantConfig?.suggestions,
449
+ richSuggestions: assistantConfig?.richSuggestions ?? getMockRichSuggestions(),
450
+ feedbackOptions: assistantConfig?.feedbackOptions ?? getMockFeedbackOptions(),
451
+ onEvaluation: () => {
452
+ }
453
+ }
454
+ )
455
+ ] });
456
+ }
457
+
458
+ function placeholderLogoSrc(label) {
459
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="120" height="32" viewBox="0 0 120 32"><rect width="120" height="32" rx="6" fill="#71717a"/><text x="60" y="20" font-family="Arial, sans-serif" font-size="12" font-weight="600" fill="#ffffff" text-anchor="middle">${label}</text></svg>`;
460
+ return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}`;
461
+ }
462
+ const logoCloudLogos = [
463
+ { src: placeholderLogoSrc("Acme"), alt: "Acme" },
464
+ { src: placeholderLogoSrc("Globex"), alt: "Globex" },
465
+ { src: placeholderLogoSrc("Initech"), alt: "Initech" },
466
+ { src: placeholderLogoSrc("Umbrella"), alt: "Umbrella" },
467
+ { src: placeholderLogoSrc("Soylent"), alt: "Soylent" }
468
+ ];
469
+ function LandingPage() {
470
+ return /* @__PURE__ */ jsxs("div", { className: "h-full w-full overflow-y-auto bg-background", children: [
471
+ /* @__PURE__ */ jsx(
472
+ MarketingNavbar,
473
+ {
474
+ logo: /* @__PURE__ */ jsx(XerticaLogo, { className: "h-8 w-auto text-primary dark:text-foreground", variant: "theme" }),
475
+ links: [
476
+ { label: "Produto", href: "#" },
477
+ { label: "Recursos", href: "#" },
478
+ { label: "Preços", href: "#" },
479
+ { label: "Contato", href: "#" }
480
+ ],
481
+ cta: { label: "Entrar", href: "#" }
482
+ }
483
+ ),
484
+ /* @__PURE__ */ jsx(
485
+ Hero,
486
+ {
487
+ decorative: true,
488
+ eyebrow: { label: "DESIGN SYSTEM", icon: /* @__PURE__ */ jsx(Sparkles, {}) },
489
+ title: "O design system da Xertica para produto e web",
490
+ description: "Tokens de tema, componentes acessíveis e blocos prontos para construir experiências consistentes — do protótipo à produção, em qualquer time.",
491
+ primaryCta: { label: "Começar agora", href: "#" },
492
+ secondaryCta: { label: "Ver componentes", href: "#" },
493
+ visual: /* @__PURE__ */ jsx(Isotype, { className: "mx-auto w-full max-w-md" })
494
+ }
495
+ ),
496
+ /* @__PURE__ */ jsx("div", { className: "mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsx(LogoCloud, { title: "Usado por times em toda a Xertica", logos: logoCloudLogos }) }),
497
+ /* @__PURE__ */ jsx("section", { className: "mx-auto max-w-7xl px-4 py-16 sm:px-6 lg:px-8 md:py-24", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-12 lg:grid-cols-2 lg:items-center", children: [
498
+ /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6 pt-6", children: [
499
+ /* @__PURE__ */ jsx("p", { className: "text-lg leading-relaxed text-foreground", children: "“O xertica-ui virou nossa base para tudo: cada tema novo e cada tela nova saem consistentes desde o primeiro protótipo, sem retrabalho de design.”" }),
500
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
501
+ /* @__PURE__ */ jsx(Avatar, { children: /* @__PURE__ */ jsx(AvatarFallback, { children: "MF" }) }),
502
+ /* @__PURE__ */ jsxs("div", { children: [
503
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground", children: "Mariana Ferraz" }),
504
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Head de Produto, Xertica" })
505
+ ] })
506
+ ] })
507
+ ] }) }),
508
+ /* @__PURE__ */ jsx(
509
+ StatBand,
510
+ {
511
+ stats: [
512
+ { value: "80+", label: "Componentes", color: "primary" },
513
+ { value: "10", label: "Temas", color: "chart-2" },
514
+ { value: "25k+", label: "Downloads", color: "chart-3" }
515
+ ]
516
+ }
517
+ )
518
+ ] }) }),
519
+ /* @__PURE__ */ jsx("section", { className: "mx-auto max-w-7xl px-4 py-16 sm:px-6 lg:px-8 md:py-24", children: /* @__PURE__ */ jsx(
520
+ ServiceCardGrid,
521
+ {
522
+ variant: "card",
523
+ columns: 4,
524
+ items: [
525
+ {
526
+ icon: /* @__PURE__ */ jsx(Palette, {}),
527
+ color: "primary",
528
+ title: "Tokens de tema",
529
+ description: "10 temas prontos, com suporte a modo claro e escuro em toda a UI.",
530
+ className: "border"
531
+ },
532
+ {
533
+ icon: /* @__PURE__ */ jsx(ShieldCheck, {}),
534
+ color: "chart-2",
535
+ title: "Componentes acessíveis",
536
+ description: "Construídos sobre Radix UI, com foco em teclado e leitores de tela.",
537
+ className: "border"
538
+ },
539
+ {
540
+ icon: /* @__PURE__ */ jsx(Blocks, {}),
541
+ color: "chart-1",
542
+ title: "Blocos prontos",
543
+ description: "Seções de marketing, autenticação e dashboards prontas para compor.",
544
+ className: "border"
545
+ },
546
+ {
547
+ icon: /* @__PURE__ */ jsx(Terminal, {}),
548
+ color: "chart-4",
549
+ title: "CLI de scaffolding",
550
+ description: "Gere páginas e projetos completos com um único comando.",
551
+ className: "border"
552
+ }
553
+ ]
554
+ }
555
+ ) }),
556
+ /* @__PURE__ */ jsx(
557
+ FeatureRow,
558
+ {
559
+ eyebrow: "TEMATIZAÇÃO",
560
+ title: "10 temas e modo escuro em cada componente",
561
+ description: "Cada componente é escrito sobre tokens de design — cores, raios e espaçamentos trocam de tema sem alterar uma linha de código do produto.",
562
+ bullets: [
563
+ "10 temas prontos, incluindo a identidade Xertica",
564
+ "Modo claro e escuro nativos em todo o sistema",
565
+ "Tokens centralizados em CSS custom properties"
566
+ ],
567
+ visual: /* @__PURE__ */ jsx(IsotypeFrames, { variant: "blue-magenta", className: "mx-auto w-full max-w-md" })
568
+ }
569
+ ),
570
+ /* @__PURE__ */ jsx(
571
+ FeatureRow,
572
+ {
573
+ tone: "muted",
574
+ reverse: true,
575
+ eyebrow: "COMPOSIÇÃO",
576
+ title: "Blocos prontos para montar páginas inteiras",
577
+ description: "Navbar, hero, grids de serviço, timelines e CTAs se combinam como peças — como esta própria página, montada inteiramente a partir de blocos do design system.",
578
+ bullets: [
579
+ "Blocos de marketing, autenticação e dashboard",
580
+ "Props tipadas e documentadas para cada bloco",
581
+ "Composição livre, sem lock-in de layout"
582
+ ],
583
+ visual: /* @__PURE__ */ jsx(Isotype, { variantSeed: 5, className: "mx-auto w-full max-w-md" })
584
+ }
585
+ ),
586
+ /* @__PURE__ */ jsx(
587
+ FeatureRow,
588
+ {
589
+ reverse: true,
590
+ eyebrow: "ONBOARDING",
591
+ title: "CLI para scaffolding e integração rápida",
592
+ description: "Gere páginas, temas e projetos completos via CLI, com uma configuração inicial guiada e templates prontos para produção.",
593
+ bullets: [
594
+ "Scaffolding de páginas e projetos em segundos",
595
+ "Templates com App.tsx e temas pré-configurados",
596
+ "Zero configuração manual de build para começar"
597
+ ],
598
+ visual: /* @__PURE__ */ jsx(IsotypeFrames, { variant: "magenta-yellow", className: "mx-auto w-full max-w-md" })
599
+ }
600
+ ),
601
+ /* @__PURE__ */ jsx("section", { className: "bg-muted", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-7xl px-4 py-16 sm:px-6 lg:px-8 md:py-24", children: [
602
+ /* @__PURE__ */ jsxs("div", { className: "mb-12 max-w-2xl", children: [
603
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground", children: "ECOSSISTEMA" }),
604
+ /* @__PURE__ */ jsx("h2", { className: "mt-2 text-2xl font-bold text-foreground md:text-3xl", children: "Se conecta com as ferramentas que seu time já usa" })
605
+ ] }),
606
+ /* @__PURE__ */ jsx(
607
+ ServiceCardGrid,
608
+ {
609
+ variant: "card",
610
+ columns: 4,
611
+ items: [
612
+ {
613
+ icon: /* @__PURE__ */ jsx(Figma, {}),
614
+ color: "primary",
615
+ title: "Figma",
616
+ description: "Handoff de design para código sem perder tokens no caminho.",
617
+ bullets: ["Biblioteca de componentes espelhada", "Tokens exportados 1:1"]
618
+ },
619
+ {
620
+ icon: /* @__PURE__ */ jsx(FileCode2, {}),
621
+ color: "chart-1",
622
+ title: "VS Code",
623
+ description: "Snippets e autocomplete para compor telas mais rápido.",
624
+ bullets: ["Extensão com preview de props", "Autoimport dos componentes"]
625
+ },
626
+ {
627
+ icon: /* @__PURE__ */ jsx(Component, {}),
628
+ color: "chart-5",
629
+ title: "Storybook",
630
+ description: "Cada componente documentado e navegável isoladamente.",
631
+ bullets: ["Todas as variantes catalogadas", "Playground de props ao vivo"]
632
+ },
633
+ {
634
+ icon: /* @__PURE__ */ jsx(Github, {}),
635
+ color: "chart-2",
636
+ title: "GitHub",
637
+ description: "Código aberto, com contribuição e releases públicos.",
638
+ bullets: ["Changelog versionado", "Issues e roadmap abertos"]
639
+ }
640
+ ]
641
+ }
642
+ )
643
+ ] }) }),
644
+ /* @__PURE__ */ jsx("section", { className: "bg-sidebar text-sidebar-foreground", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-5xl px-4 py-16 sm:px-6 lg:px-8 md:py-24", children: [
645
+ /* @__PURE__ */ jsxs("div", { className: "mb-12 max-w-2xl", children: [
646
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold uppercase tracking-wide text-sidebar-foreground/70", children: "METODOLOGIA" }),
647
+ /* @__PURE__ */ jsx("h2", { className: "mt-2 text-2xl font-bold md:text-3xl", children: "Como construímos o design system" })
648
+ ] }),
649
+ /* @__PURE__ */ jsx(
650
+ EvidenceTimeline,
651
+ {
652
+ items: [
653
+ {
654
+ icon: /* @__PURE__ */ jsx(SwatchBook, {}),
655
+ title: "Tokens primeiro",
656
+ description: "Definimos cores, tipografia, espaçamento e raios como tokens compartilhados entre todos os temas.",
657
+ color: "chart-1"
658
+ },
659
+ {
660
+ icon: /* @__PURE__ */ jsx(Layers, {}),
661
+ title: "Componentes primitivos",
662
+ description: "Construímos sobre Radix UI, garantindo acessibilidade e comportamento consistente por padrão.",
663
+ color: "chart-2"
664
+ },
665
+ {
666
+ icon: /* @__PURE__ */ jsx(Braces, {}),
667
+ title: "Blocos de composição",
668
+ description: "Combinamos primitivos em blocos maiores — navbars, heros, grids — prontos para páginas reais.",
669
+ color: "chart-3"
670
+ },
671
+ {
672
+ icon: /* @__PURE__ */ jsx(SquareTerminal, {}),
673
+ title: "CLI e templates",
674
+ description: "Empacotamos tudo em uma CLI de scaffolding, para times começarem em minutos, não semanas.",
675
+ color: "chart-4"
676
+ }
677
+ ]
678
+ }
679
+ )
680
+ ] }) }),
681
+ /* @__PURE__ */ jsxs("section", { className: "mx-auto max-w-7xl px-4 py-16 sm:px-6 lg:px-8 md:py-24", children: [
682
+ /* @__PURE__ */ jsxs("div", { className: "mb-12 max-w-2xl", children: [
683
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground", children: "CASOS DE USO" }),
684
+ /* @__PURE__ */ jsx("h2", { className: "mt-2 text-2xl font-bold text-foreground md:text-3xl", children: "Feito para produtos de qualquer escala" })
685
+ ] }),
686
+ /* @__PURE__ */ jsx(
687
+ ServiceCardGrid,
688
+ {
689
+ variant: "card",
690
+ columns: 3,
691
+ items: [
692
+ {
693
+ icon: /* @__PURE__ */ jsx(ShoppingCart, {}),
694
+ color: "chart-2",
695
+ title: "E-commerce",
696
+ description: "Catálogos e checkouts consistentes em qualquer tema da loja.",
697
+ checklist: ["Temas por marca/whitelabel", "Componentes de carrinho e catálogo"],
698
+ className: "border"
699
+ },
700
+ {
701
+ icon: /* @__PURE__ */ jsx(Building2, {}),
702
+ color: "primary",
703
+ title: "SaaS B2B",
704
+ description: "Dashboards e onboarding prontos para produtos multi-tenant.",
705
+ checklist: ["Layouts de dashboard prontos", "Onboarding guiado via CLI"],
706
+ className: "border"
707
+ },
708
+ {
709
+ icon: /* @__PURE__ */ jsx(Landmark, {}),
710
+ color: "chart-4",
711
+ title: "Fintech",
712
+ description: "Componentes acessíveis com trilha de auditoria visual clara.",
713
+ checklist: ["WCAG 2.1 AA por padrão", "Estados de erro e validação nativos"],
714
+ className: "border"
715
+ }
716
+ ]
717
+ }
718
+ )
719
+ ] }),
720
+ /* @__PURE__ */ jsxs("section", { className: "mx-auto max-w-7xl space-y-12 px-4 py-16 sm:px-6 lg:px-8 md:py-24", children: [
721
+ /* @__PURE__ */ jsx(
722
+ ComplianceBadgeRow,
723
+ {
724
+ badges: [
725
+ {
726
+ icon: /* @__PURE__ */ jsx(ShieldCheck, {}),
727
+ label: "WCAG 2.1 AA",
728
+ description: "Componentes auditados para acessibilidade."
729
+ },
730
+ {
731
+ icon: /* @__PURE__ */ jsx(Code2, {}),
732
+ label: "TypeScript",
733
+ description: "Tipagem completa em toda a biblioteca."
734
+ },
735
+ {
736
+ icon: /* @__PURE__ */ jsx(Package, {}),
737
+ label: "Tree-shakeable",
738
+ description: "Importe só o que for usar."
739
+ },
740
+ {
741
+ icon: /* @__PURE__ */ jsx(BookOpen, {}),
742
+ label: "Themeable",
743
+ description: "Reskin completo via tokens de tema."
744
+ }
745
+ ]
746
+ }
747
+ ),
748
+ /* @__PURE__ */ jsx(
749
+ StatBand,
750
+ {
751
+ columns: 3,
752
+ stats: [
753
+ { value: "99.9%", label: "Uptime da documentação", color: "success" },
754
+ { value: "<24h", label: "Tempo médio de resposta", color: "info" },
755
+ { value: "100%", label: "Componentes tipados", color: "chart-5" }
756
+ ]
757
+ }
758
+ )
759
+ ] }),
760
+ /* @__PURE__ */ jsx("section", { className: "mx-auto max-w-7xl px-4 pb-16 sm:px-6 lg:px-8 md:pb-24", children: /* @__PURE__ */ jsx(
761
+ CTASection,
762
+ {
763
+ title: "Pronto para começar?",
764
+ description: "Instale o xertica-ui, escolha um tema e monte sua primeira página em minutos.",
765
+ cta: { label: "Começar agora", href: "#" },
766
+ secondaryCta: { label: "Ver componentes", href: "#" }
767
+ }
768
+ ) }),
769
+ /* @__PURE__ */ jsx(
770
+ MarketingFooter,
771
+ {
772
+ logo: /* @__PURE__ */ jsx(XerticaLogo, { className: "h-8 w-auto text-primary dark:text-foreground", variant: "theme" }),
773
+ tagline: "O design system da Xertica para construir produtos e sites consistentes, de ponta a ponta.",
774
+ columns: [
775
+ {
776
+ heading: "Produto",
777
+ links: [
778
+ { label: "Componentes", href: "#" },
779
+ { label: "Blocos", href: "#" },
780
+ { label: "Temas", href: "#" }
781
+ ]
782
+ },
783
+ {
784
+ heading: "Recursos",
785
+ links: [
786
+ { label: "Documentação", href: "#" },
787
+ { label: "CLI", href: "#" },
788
+ { label: "Changelog", href: "#" }
789
+ ]
790
+ },
791
+ {
792
+ heading: "Empresa",
793
+ links: [
794
+ { label: "Sobre", href: "#" },
795
+ { label: "Contato", href: "#" },
796
+ { label: "Carreiras", href: "#" }
797
+ ]
798
+ }
799
+ ],
800
+ copyright: "© 2026 Xertica. Todos os direitos reservados."
801
+ }
802
+ )
803
+ ] });
804
+ }
805
+
806
+ function LoginPage({ onLogin }) {
807
+ const navigate = useNavigate();
808
+ const { t } = useTranslation();
809
+ const [email, setEmail] = useState("");
810
+ const [password, setPassword] = useState("");
811
+ const [isLoading, setIsLoading] = useState(false);
812
+ const [error, setError] = useState("");
813
+ const handleSubmit = async (e) => {
814
+ e.preventDefault();
815
+ setError("");
816
+ setIsLoading(true);
817
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
818
+ const success = onLogin(email, password);
819
+ if (!success) {
820
+ setError(t("login.errorFillFields"));
821
+ }
822
+ setIsLoading(false);
823
+ };
824
+ const handleSocialLogin = (_provider) => {
825
+ onLogin("social@user.com", "social-auth");
826
+ };
827
+ return /* @__PURE__ */ jsxs(AuthPageShell, { leftPanel: "isotype", children: [
828
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
829
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(XerticaLogo, { className: "h-12 w-auto text-primary dark:text-foreground", variant: "theme" }) }),
830
+ /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: t("login.heading") })
831
+ ] }),
832
+ /* @__PURE__ */ jsxs("form", { className: "space-y-6", onSubmit: handleSubmit, children: [
833
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
834
+ /* @__PURE__ */ jsx(Label, { htmlFor: "email", children: t("login.emailLabel") }),
835
+ /* @__PURE__ */ jsx(
836
+ Input,
837
+ {
838
+ id: "email",
839
+ name: "email",
840
+ type: "email",
841
+ required: true,
842
+ className: "w-full",
843
+ placeholder: t("login.emailPlaceholder"),
844
+ value: email,
845
+ onChange: (e) => setEmail(e.target.value)
846
+ }
847
+ )
848
+ ] }),
849
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
850
+ /* @__PURE__ */ jsx(Label, { htmlFor: "password", children: t("login.passwordLabel") }),
851
+ /* @__PURE__ */ jsx(
852
+ Input,
853
+ {
854
+ id: "password",
855
+ name: "password",
856
+ type: "password",
857
+ required: true,
858
+ className: "w-full",
859
+ placeholder: "••••••••",
860
+ value: password,
861
+ onChange: (e) => setPassword(e.target.value)
862
+ }
863
+ )
864
+ ] }),
865
+ error && /* @__PURE__ */ jsx("div", { className: "text-destructive text-sm text-center", children: error }),
866
+ /* @__PURE__ */ jsx(Button, { type: "submit", className: "w-full", disabled: isLoading, children: isLoading ? t("login.submitting") : t("login.submit") }),
867
+ /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx(
868
+ "button",
869
+ {
870
+ type: "button",
871
+ onClick: () => navigate("/forgot-password"),
872
+ className: "text-sm text-primary hover:opacity-80 transition-colors",
873
+ children: t("login.forgotPassword")
874
+ }
875
+ ) })
876
+ ] }),
877
+ /* @__PURE__ */ jsx(SocialLoginButtons, { onSocialLogin: handleSocialLogin })
878
+ ] });
879
+ }
880
+
881
+ function ResetPasswordPage() {
882
+ const navigate = useNavigate();
883
+ const { t } = useTranslation();
884
+ const [password, setPassword] = useState("");
885
+ const [confirmPassword, setConfirmPassword] = useState("");
886
+ const [isLoading, setIsLoading] = useState(false);
887
+ const [error, setError] = useState("");
888
+ const passwordStrength = usePasswordStrength(password);
889
+ const handlePasswordChange = (value) => {
890
+ setPassword(value);
891
+ setError("");
892
+ };
893
+ const handleSubmit = async (e) => {
894
+ e.preventDefault();
895
+ setError("");
896
+ if (password.length < 6) {
897
+ setError(t("resetPassword.errorMinLength"));
898
+ return;
899
+ }
900
+ if (password !== confirmPassword) {
901
+ setError(t("resetPassword.errorMismatch"));
902
+ return;
903
+ }
904
+ setIsLoading(true);
905
+ await new Promise((resolve) => setTimeout(resolve, 1500));
906
+ navigate("/login", { state: { resetSuccess: true } });
907
+ setIsLoading(false);
908
+ };
909
+ return /* @__PURE__ */ jsxs(
910
+ AuthPageShell,
911
+ {
912
+ imageSrc: "https://images.unsplash.com/photo-1555949963-aa79dcee981c?w=1200&h=800&fit=crop&auto=format",
913
+ imageAlt: t("resetPassword.heroImageAlt"),
914
+ children: [
915
+ /* @__PURE__ */ jsxs(
916
+ "button",
917
+ {
918
+ onClick: () => navigate("/login"),
919
+ className: "flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",
920
+ children: [
921
+ /* @__PURE__ */ jsx(ArrowLeft, { className: "w-4 h-4" }),
922
+ /* @__PURE__ */ jsx("span", { className: "text-small", children: t("resetPassword.backToLogin") })
923
+ ]
924
+ }
925
+ ),
926
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
927
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(XerticaLogo, { className: "h-12 w-auto text-primary dark:text-foreground", variant: "theme" }) }),
928
+ /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: t("resetPassword.heading") }),
929
+ /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: t("resetPassword.subheading") })
930
+ ] }),
931
+ /* @__PURE__ */ jsxs("form", { className: "space-y-6", onSubmit: handleSubmit, children: [
932
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
933
+ /* @__PURE__ */ jsx(Label, { htmlFor: "password", children: t("resetPassword.newPasswordLabel") }),
934
+ /* @__PURE__ */ jsx(
935
+ Input,
936
+ {
937
+ id: "password",
938
+ name: "password",
939
+ type: "password",
940
+ required: true,
941
+ className: "w-full",
942
+ placeholder: "••••••••",
943
+ value: password,
944
+ onChange: (e) => handlePasswordChange(e.target.value)
945
+ }
946
+ ),
947
+ /* @__PURE__ */ jsx(PasswordStrengthMeter, { strength: passwordStrength })
948
+ ] }),
949
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
950
+ /* @__PURE__ */ jsx(Label, { htmlFor: "confirmPassword", children: t("resetPassword.confirmPasswordLabel") }),
951
+ /* @__PURE__ */ jsx(
952
+ Input,
953
+ {
954
+ id: "confirmPassword",
955
+ name: "confirmPassword",
956
+ type: "password",
957
+ required: true,
958
+ className: "w-full",
959
+ placeholder: "••••••••",
960
+ value: confirmPassword,
961
+ onChange: (e) => {
962
+ setConfirmPassword(e.target.value);
963
+ setError("");
964
+ }
965
+ }
966
+ )
967
+ ] }),
968
+ /* @__PURE__ */ jsxs("div", { className: "bg-accent rounded-[var(--radius)] p-4 space-y-2", children: [
969
+ /* @__PURE__ */ jsx("p", { className: "text-sm", children: t("resetPassword.requirements") }),
970
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
971
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
972
+ /* @__PURE__ */ jsx(
973
+ CheckCircle2,
974
+ {
975
+ className: `w-4 h-4 ${password.length >= 6 ? "text-[var(--chart-2)]" : "text-muted-foreground"}`
976
+ }
977
+ ),
978
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: t("resetPassword.requirementMinChars") })
979
+ ] }),
980
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
981
+ /* @__PURE__ */ jsx(
982
+ CheckCircle2,
983
+ {
984
+ className: `w-4 h-4 ${password === confirmPassword && password.length > 0 ? "text-[var(--chart-2)]" : "text-muted-foreground"}`
985
+ }
986
+ ),
987
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: t("resetPassword.requirementMatch") })
988
+ ] })
989
+ ] })
990
+ ] }),
991
+ error && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-destructive bg-destructive/10 rounded-[var(--radius)] p-3", children: [
992
+ /* @__PURE__ */ jsx(AlertCircle, { className: "w-4 h-4 flex-shrink-0" }),
993
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: error })
994
+ ] }),
995
+ /* @__PURE__ */ jsx(Button, { type: "submit", className: "w-full", disabled: isLoading, children: isLoading ? t("resetPassword.submitting") : t("resetPassword.submit") })
996
+ ] })
997
+ ]
998
+ }
999
+ );
1000
+ }
1001
+
1002
+ function createLucideIconSvg(iconName) {
1003
+ const iconPaths = {
1004
+ 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>',
1005
+ 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>',
1006
+ 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>',
1007
+ 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>',
1008
+ 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>'
1009
+ };
1010
+ const path = iconPaths[iconName] || "";
1011
+ 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>`;
1012
+ }
1013
+ const markerGroups = {
1014
+ restaurant: {
1015
+ id: "restaurant",
1016
+ name: "Restaurantes",
1017
+ color: "var(--destructive)",
1018
+ // red
1019
+ iconColor: "#FFFFFF",
1020
+ // white para contraste
1021
+ iconName: "utensils",
1022
+ icon: Utensils
1023
+ },
1024
+ hotel: {
1025
+ id: "hotel",
1026
+ name: "Hotéis",
1027
+ color: "var(--info)",
1028
+ // blue
1029
+ iconColor: "#FFFFFF",
1030
+ iconName: "hotel",
1031
+ icon: Hotel
1032
+ },
1033
+ landmark: {
1034
+ id: "landmark",
1035
+ name: "Pontos Turísticos",
1036
+ color: "var(--success)",
1037
+ // green
1038
+ iconColor: "#FFFFFF",
1039
+ iconName: "landmark",
1040
+ icon: Landmark
1041
+ },
1042
+ shopping: {
1043
+ id: "shopping",
1044
+ name: "Compras",
1045
+ color: "var(--warning)",
1046
+ // orange
1047
+ iconColor: "#FFFFFF",
1048
+ iconName: "shopping",
1049
+ icon: ShoppingBag
1050
+ },
1051
+ cafe: {
1052
+ id: "cafe",
1053
+ name: "Cafeterias",
1054
+ color: "var(--primary)",
1055
+ // purple
1056
+ iconColor: "#FFFFFF",
1057
+ iconName: "coffee",
1058
+ icon: Coffee
1059
+ }
1060
+ };
1061
+ const sampleLocations = [
1062
+ // Restaurantes
1063
+ {
1064
+ position: { lat: -23.5505, lng: -46.6333 },
1065
+ title: "Restaurante Italiano",
1066
+ info: "Melhor pizza da cidade",
1067
+ group: "restaurant"
1068
+ },
1069
+ {
1070
+ position: { lat: -23.5485, lng: -46.635 },
1071
+ title: "Sushi Bar",
1072
+ info: "Comida japonesa autêntica",
1073
+ group: "restaurant"
1074
+ },
1075
+ {
1076
+ position: { lat: -23.552, lng: -46.631 },
1077
+ title: "Churrascaria Premium",
1078
+ info: "Rodízio tradicional brasileiro",
1079
+ group: "restaurant"
1080
+ },
1081
+ // Hotéis
1082
+ {
1083
+ position: { lat: -23.5475, lng: -46.6361 },
1084
+ title: "Hotel Luxo",
1085
+ info: "5 estrelas - Vista panorâmica",
1086
+ group: "hotel"
1087
+ },
1088
+ {
1089
+ position: { lat: -23.553, lng: -46.634 },
1090
+ title: "Hotel Boutique",
1091
+ info: "Design moderno e aconchegante",
1092
+ group: "hotel"
1093
+ },
1094
+ // Pontos Turísticos
1095
+ {
1096
+ position: { lat: -23.5613, lng: -46.6563 },
1097
+ title: "Parque Ibirapuera",
1098
+ info: "Maior parque urbano da cidade",
1099
+ group: "landmark"
1100
+ },
1101
+ {
1102
+ position: { lat: -23.5558, lng: -46.6396 },
1103
+ title: "MASP",
1104
+ info: "Museu de Arte de São Paulo",
1105
+ group: "landmark"
1106
+ },
1107
+ {
1108
+ position: { lat: -23.5489, lng: -46.6388 },
1109
+ title: "Avenida Paulista",
1110
+ info: "Centro financeiro e cultural",
1111
+ group: "landmark"
1112
+ },
1113
+ // Shopping
1114
+ {
1115
+ position: { lat: -23.5465, lng: -46.64 },
1116
+ title: "Shopping Center",
1117
+ info: "Mais de 300 lojas",
1118
+ group: "shopping"
1119
+ },
1120
+ {
1121
+ position: { lat: -23.554, lng: -46.638 },
1122
+ title: "Galeria de Arte",
1123
+ info: "Arte contemporânea e design",
1124
+ group: "shopping"
1125
+ },
1126
+ // Cafeterias
1127
+ {
1128
+ position: { lat: -23.5495, lng: -46.6345 },
1129
+ title: "Café Artesanal",
1130
+ info: "Café especial e brunch",
1131
+ group: "cafe"
1132
+ },
1133
+ {
1134
+ position: { lat: -23.551, lng: -46.637 },
1135
+ title: "Coffee House",
1136
+ info: "Café gourmet e wi-fi",
1137
+ group: "cafe"
1138
+ },
1139
+ {
1140
+ position: { lat: -23.5525, lng: -46.6355 },
1141
+ title: "Café Cultural",
1142
+ info: "Livros e café",
1143
+ group: "cafe"
1144
+ }
1145
+ ];
1146
+ function FilterableMapExample({ apiKey }) {
1147
+ const [activeFilters, setActiveFilters] = useState(
1148
+ new Set(Object.keys(markerGroups))
1149
+ );
1150
+ const [showFilters, setShowFilters] = useState(true);
1151
+ const filteredLocations = useMemo(() => {
1152
+ return sampleLocations.filter((location) => activeFilters.has(location.group));
1153
+ }, [activeFilters]);
1154
+ const toggleFilter = (groupId) => {
1155
+ setActiveFilters((prev) => {
1156
+ const newFilters = new Set(prev);
1157
+ if (newFilters.has(groupId)) {
1158
+ newFilters.delete(groupId);
1159
+ } else {
1160
+ newFilters.add(groupId);
1161
+ }
1162
+ return newFilters;
1163
+ });
1164
+ };
1165
+ const toggleAll = () => {
1166
+ if (activeFilters.size === Object.keys(markerGroups).length) {
1167
+ setActiveFilters(/* @__PURE__ */ new Set());
1168
+ } else {
1169
+ setActiveFilters(new Set(Object.keys(markerGroups)));
1170
+ }
1171
+ };
1172
+ const markersWithCustomization = filteredLocations.map((location) => ({
1173
+ ...location,
1174
+ customColor: markerGroups[location.group].color,
1175
+ iconSvg: createLucideIconSvg(markerGroups[location.group].iconName),
1176
+ iconColor: markerGroups[location.group].iconColor
1177
+ }));
1178
+ const getGroupCount = (groupId) => {
1179
+ return sampleLocations.filter((loc) => loc.group === groupId).length;
1180
+ };
1181
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
1182
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
1183
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1184
+ /* @__PURE__ */ jsx(MapPin, { className: "w-5 h-5 text-primary" }),
1185
+ /* @__PURE__ */ jsx("h3", { children: "Filtro por Categorias" })
1186
+ ] }),
1187
+ /* @__PURE__ */ jsxs(Badge, { variant: "secondary", children: [
1188
+ filteredLocations.length,
1189
+ " de ",
1190
+ sampleLocations.length,
1191
+ " locais"
1192
+ ] })
1193
+ ] }),
1194
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Use os filtros compactos no canto superior esquerdo do mapa para visualizar marcadores por categoria" }),
1195
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1196
+ /* @__PURE__ */ jsx(
1197
+ Map,
1198
+ {
1199
+ center: { lat: -23.5505, lng: -46.6333 },
1200
+ zoom: 14,
1201
+ markers: markersWithCustomization,
1202
+ height: "500px",
1203
+ zoomControl: true,
1204
+ fullscreenControl: true,
1205
+ apiKey
1206
+ }
1207
+ ),
1208
+ /* @__PURE__ */ jsx(
1209
+ "div",
1210
+ {
1211
+ className: cn(
1212
+ "absolute top-4 left-4 z-10 transition-all duration-300",
1213
+ showFilters ? "translate-x-0" : "-translate-x-full"
1214
+ ),
1215
+ children: /* @__PURE__ */ jsxs("div", { className: "p-2.5 rounded-lg shadow-[var(--shadow-elevation-sm)] bg-card border border-border max-w-[220px]", children: [
1216
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
1217
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
1218
+ /* @__PURE__ */ jsx(Filter, { className: "w-3.5 h-3.5 text-foreground" }),
1219
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: "Filtros" })
1220
+ ] }),
1221
+ /* @__PURE__ */ jsx(
1222
+ Button,
1223
+ {
1224
+ size: "sm",
1225
+ variant: "ghost",
1226
+ onClick: () => setShowFilters(false),
1227
+ className: "h-5 w-5 p-0",
1228
+ children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
1229
+ }
1230
+ )
1231
+ ] }),
1232
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
1233
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 py-0.5", children: [
1234
+ /* @__PURE__ */ jsx(
1235
+ Checkbox,
1236
+ {
1237
+ id: "filter-all",
1238
+ checked: activeFilters.size === Object.keys(markerGroups).length,
1239
+ onCheckedChange: toggleAll
1240
+ }
1241
+ ),
1242
+ /* @__PURE__ */ jsxs(
1243
+ Label,
1244
+ {
1245
+ htmlFor: "filter-all",
1246
+ className: "flex items-center gap-1.5 cursor-pointer text-sm",
1247
+ children: [
1248
+ /* @__PURE__ */ jsx(MapPin, { className: "w-3.5 h-3.5" }),
1249
+ "Todos",
1250
+ /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs h-4 px-1", children: sampleLocations.length })
1251
+ ]
1252
+ }
1253
+ )
1254
+ ] }),
1255
+ Object.entries(markerGroups).map(([id, group]) => {
1256
+ const groupId = id;
1257
+ const Icon = group.icon;
1258
+ const isActive = activeFilters.has(groupId);
1259
+ const count = getGroupCount(groupId);
1260
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 py-0.5", children: [
1261
+ /* @__PURE__ */ jsx(
1262
+ Checkbox,
1263
+ {
1264
+ id: `filter-${id}`,
1265
+ checked: isActive,
1266
+ onCheckedChange: () => toggleFilter(groupId)
1267
+ }
1268
+ ),
1269
+ /* @__PURE__ */ jsxs(
1270
+ Label,
1271
+ {
1272
+ htmlFor: `filter-${id}`,
1273
+ className: "flex items-center gap-1.5 cursor-pointer text-sm",
1274
+ children: [
1275
+ /* @__PURE__ */ jsx(Icon, { className: "w-3.5 h-3.5", style: { color: group.color } }),
1276
+ /* @__PURE__ */ jsx("span", { className: isActive ? "text-foreground" : "text-muted-foreground", children: group.name }),
1277
+ /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-xs h-4 px-1", children: count })
1278
+ ]
1279
+ }
1280
+ )
1281
+ ] }, id);
1282
+ })
1283
+ ] })
1284
+ ] })
1285
+ }
1286
+ ),
1287
+ !showFilters && /* @__PURE__ */ jsxs(
1288
+ Button,
1289
+ {
1290
+ size: "sm",
1291
+ onClick: () => setShowFilters(true),
1292
+ className: "absolute top-4 left-4 z-10 h-8 bg-primary text-primary-foreground",
1293
+ children: [
1294
+ /* @__PURE__ */ jsx(Filter, { className: "w-3.5 h-3.5 mr-1.5" }),
1295
+ "Filtros"
1296
+ ]
1297
+ }
1298
+ )
1299
+ ] }),
1300
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-3 justify-center pt-2 border-t border-border", children: Object.entries(markerGroups).map(([id, group]) => {
1301
+ const Icon = group.icon;
1302
+ const count = getGroupCount(id);
1303
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-1 rounded-lg bg-muted", children: [
1304
+ /* @__PURE__ */ jsx("div", { className: "w-3 h-3 rounded-full", style: { backgroundColor: group.color } }),
1305
+ /* @__PURE__ */ jsx(Icon, { className: "w-4 h-4", style: { color: group.color } }),
1306
+ /* @__PURE__ */ jsx("span", { className: "text-sm", style: { color: "var(--foreground)" }, children: group.name }),
1307
+ /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs h-5", children: count })
1308
+ ] }, id);
1309
+ }) }),
1310
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-3", children: [
1311
+ /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1312
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Total de Locais" }),
1313
+ /* @__PURE__ */ jsx("p", { className: "text-2xl text-foreground", children: sampleLocations.length })
1314
+ ] }),
1315
+ /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1316
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Visíveis" }),
1317
+ /* @__PURE__ */ jsx("p", { className: "text-2xl text-primary", children: filteredLocations.length })
1318
+ ] }),
1319
+ /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1320
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Categorias" }),
1321
+ /* @__PURE__ */ jsx("p", { className: "text-2xl text-foreground", children: Object.keys(markerGroups).length })
1322
+ ] }),
1323
+ /* @__PURE__ */ jsxs("div", { className: "text-center p-3 rounded-lg bg-muted", children: [
1324
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Filtros Ativos" }),
1325
+ /* @__PURE__ */ jsx("p", { className: "text-2xl text-chart-2", children: activeFilters.size })
1326
+ ] })
1327
+ ] })
1328
+ ] });
1329
+ }
1330
+
1331
+ function DrawingMapExample({ apiKey }) {
1332
+ const [mapInstance, setMapInstance] = useState(null);
1333
+ const [selectedMode, setSelectedMode] = useState(null);
1334
+ const [shapes, setShapes] = useState([]);
1335
+ const [showSaveDialog, setShowSaveDialog] = useState(false);
1336
+ const [savedData, setSavedData] = useState("");
1337
+ const [isDrawingPolygon, setIsDrawingPolygon] = useState(false);
1338
+ const tempPolylineRef = useRef(null);
1339
+ const polygonPathRef = useRef([]);
1340
+ const mapListenersRef = useRef([]);
1341
+ const colors = {
1342
+ fill: "#2C275B",
1343
+ // Primary do CSS
1344
+ stroke: "#2C275B",
1345
+ fillOpacity: 0.2,
1346
+ strokeWeight: 2,
1347
+ editable: true,
1348
+ draggable: true
1349
+ };
1350
+ const addMarker = useCallback(
1351
+ (position) => {
1352
+ if (!mapInstance) return;
1353
+ const marker = new google.maps.marker.AdvancedMarkerElement({
1354
+ position,
1355
+ map: mapInstance,
1356
+ gmpDraggable: true,
1357
+ // Propriedade correta para AdvancedMarkerElement
1358
+ title: "Marcador"
1359
+ });
1360
+ marker.addListener("dragend", () => {
1361
+ toast.info("Posição do marcador atualizada");
1362
+ });
1363
+ const newShape = { type: "marker", overlay: marker };
1364
+ setShapes((prev) => [...prev, newShape]);
1365
+ toast.success("Marcador adicionado");
1366
+ },
1367
+ [mapInstance]
1368
+ );
1369
+ const addCircle = useCallback(
1370
+ (center) => {
1371
+ if (!mapInstance) return;
1372
+ const circle = new google.maps.Circle({
1373
+ map: mapInstance,
1374
+ center,
1375
+ radius: 500,
1376
+ fillColor: colors.fill,
1377
+ fillOpacity: colors.fillOpacity,
1378
+ strokeColor: colors.stroke,
1379
+ strokeWeight: colors.strokeWeight,
1380
+ editable: true,
1381
+ draggable: true
1382
+ });
1383
+ const newShape = { type: "circle", overlay: circle };
1384
+ setShapes((prev) => [...prev, newShape]);
1385
+ toast.success("Círculo adicionado");
1386
+ },
1387
+ [mapInstance, colors]
1388
+ );
1389
+ const addRectangle = useCallback(
1390
+ (center) => {
1391
+ if (!mapInstance) return;
1392
+ const offset = 5e-3;
1393
+ const bounds = {
1394
+ north: center.lat() + offset,
1395
+ south: center.lat() - offset,
1396
+ east: center.lng() + offset,
1397
+ west: center.lng() - offset
1398
+ };
1399
+ const rectangle = new google.maps.Rectangle({
1400
+ map: mapInstance,
1401
+ bounds,
1402
+ fillColor: colors.fill,
1403
+ fillOpacity: colors.fillOpacity,
1404
+ strokeColor: colors.stroke,
1405
+ strokeWeight: colors.strokeWeight,
1406
+ editable: true,
1407
+ draggable: true
1408
+ });
1409
+ const newShape = { type: "rectangle", overlay: rectangle };
1410
+ setShapes((prev) => [...prev, newShape]);
1411
+ toast.success("Retângulo adicionado");
1412
+ },
1413
+ [mapInstance, colors]
1414
+ );
1415
+ const cancelPolygonDrawing = useCallback(() => {
1416
+ if (tempPolylineRef.current) {
1417
+ tempPolylineRef.current.setMap(null);
1418
+ tempPolylineRef.current = null;
1419
+ }
1420
+ polygonPathRef.current = [];
1421
+ setIsDrawingPolygon(false);
1422
+ }, []);
1423
+ const finishPolygon = useCallback(() => {
1424
+ if (!mapInstance || polygonPathRef.current.length < 3) {
1425
+ if (polygonPathRef.current.length < 3 && polygonPathRef.current.length > 0) {
1426
+ toast.error("Polígono precisa de pelo menos 3 pontos.");
1427
+ }
1428
+ return;
1429
+ }
1430
+ const polygon = new google.maps.Polygon({
1431
+ map: mapInstance,
1432
+ paths: polygonPathRef.current,
1433
+ fillColor: colors.fill,
1434
+ fillOpacity: colors.fillOpacity,
1435
+ strokeColor: colors.stroke,
1436
+ strokeWeight: colors.strokeWeight,
1437
+ editable: true,
1438
+ draggable: true
1439
+ });
1440
+ const newShape = { type: "polygon", overlay: polygon };
1441
+ setShapes((prev) => [...prev, newShape]);
1442
+ cancelPolygonDrawing();
1443
+ toast.success("Polígono criado com sucesso!");
1444
+ }, [mapInstance, colors, cancelPolygonDrawing]);
1445
+ const addPolygonPoint = useCallback(
1446
+ (point) => {
1447
+ if (!mapInstance) return;
1448
+ if (!isDrawingPolygon) {
1449
+ setIsDrawingPolygon(true);
1450
+ polygonPathRef.current = [point];
1451
+ tempPolylineRef.current = new google.maps.Polyline({
1452
+ map: mapInstance,
1453
+ path: polygonPathRef.current,
1454
+ strokeColor: colors.stroke,
1455
+ strokeOpacity: 0.8,
1456
+ strokeWeight: 2,
1457
+ geodesic: true,
1458
+ clickable: false
1459
+ // Importante: não capturar cliques para não atrapalhar o mapa
1460
+ });
1461
+ toast.info("Clique para adicionar pontos. Duplo clique ou botão check para fechar.", {
1462
+ duration: 4e3
1463
+ });
1464
+ } else {
1465
+ polygonPathRef.current.push(point);
1466
+ tempPolylineRef.current?.setPath(polygonPathRef.current);
1467
+ }
1468
+ },
1469
+ [mapInstance, isDrawingPolygon, colors]
1470
+ );
1471
+ const clearListeners = () => {
1472
+ mapListenersRef.current.forEach((listener) => google.maps.event.removeListener(listener));
1473
+ mapListenersRef.current = [];
1474
+ };
1475
+ useEffect(() => {
1476
+ if (!mapInstance) return;
1477
+ clearListeners();
1478
+ if (!selectedMode) {
1479
+ mapInstance.setOptions({ draggableCursor: "grab", clickableIcons: true });
1480
+ return;
1481
+ }
1482
+ mapInstance.setOptions({
1483
+ draggableCursor: "crosshair",
1484
+ clickableIcons: false
1485
+ });
1486
+ const clickListener = mapInstance.addListener("click", (e) => {
1487
+ if (!e.latLng) return;
1488
+ switch (selectedMode) {
1489
+ case "marker":
1490
+ addMarker(e.latLng);
1491
+ break;
1492
+ case "circle":
1493
+ addCircle(e.latLng);
1494
+ break;
1495
+ case "rectangle":
1496
+ addRectangle(e.latLng);
1497
+ break;
1498
+ case "polygon":
1499
+ addPolygonPoint(e.latLng);
1500
+ break;
1501
+ }
1502
+ });
1503
+ mapListenersRef.current.push(clickListener);
1504
+ if (selectedMode === "polygon") {
1505
+ const dblClickListener = mapInstance.addListener("dblclick", (e) => {
1506
+ if (e.domEvent) e.domEvent.stopPropagation();
1507
+ finishPolygon();
1508
+ });
1509
+ mapListenersRef.current.push(dblClickListener);
1510
+ }
1511
+ return () => {
1512
+ clearListeners();
1513
+ };
1514
+ }, [
1515
+ mapInstance,
1516
+ selectedMode,
1517
+ addMarker,
1518
+ addCircle,
1519
+ addRectangle,
1520
+ addPolygonPoint,
1521
+ finishPolygon
1522
+ ]);
1523
+ const handleModeChange = (mode) => {
1524
+ if (isDrawingPolygon) {
1525
+ cancelPolygonDrawing();
1526
+ }
1527
+ setSelectedMode(mode);
1528
+ };
1529
+ const clearAll = () => {
1530
+ shapes.forEach((shape) => {
1531
+ if ("setMap" in shape.overlay) shape.overlay.setMap(null);
1532
+ else shape.overlay.map = null;
1533
+ });
1534
+ setShapes([]);
1535
+ if (isDrawingPolygon) cancelPolygonDrawing();
1536
+ toast.info("Mapa limpo");
1537
+ };
1538
+ const undoLast = () => {
1539
+ if (isDrawingPolygon) {
1540
+ if (polygonPathRef.current.length > 0) {
1541
+ polygonPathRef.current.pop();
1542
+ tempPolylineRef.current?.setPath(polygonPathRef.current);
1543
+ if (polygonPathRef.current.length === 0) {
1544
+ cancelPolygonDrawing();
1545
+ }
1546
+ }
1547
+ return;
1548
+ }
1549
+ if (shapes.length === 0) return;
1550
+ const lastShape = shapes[shapes.length - 1];
1551
+ if ("setMap" in lastShape.overlay) lastShape.overlay.setMap(null);
1552
+ else lastShape.overlay.map = null;
1553
+ setShapes((prev) => prev.slice(0, prev.length - 1));
1554
+ };
1555
+ const handleSave = () => {
1556
+ if (shapes.length === 0) {
1557
+ toast.error("Adicione desenhos ao mapa antes de salvar.");
1558
+ return;
1559
+ }
1560
+ const exportData = shapes.map((s) => {
1561
+ let data = {};
1562
+ if (s.type === "marker") {
1563
+ const marker = s.overlay;
1564
+ const pos = marker.position;
1565
+ if (pos) {
1566
+ const lat = typeof pos.lat === "function" ? pos.lat() : pos.lat;
1567
+ const lng = typeof pos.lng === "function" ? pos.lng() : pos.lng;
1568
+ data = { lat, lng };
1569
+ }
1570
+ } else if (s.type === "circle") {
1571
+ const circle = s.overlay;
1572
+ data = {
1573
+ center: { lat: circle.getCenter()?.lat(), lng: circle.getCenter()?.lng() },
1574
+ radius: circle.getRadius()
1575
+ };
1576
+ } else if (s.type === "rectangle") {
1577
+ const rect = s.overlay;
1578
+ const bounds = rect.getBounds();
1579
+ data = {
1580
+ north: bounds?.getNorthEast().lat(),
1581
+ south: bounds?.getSouthWest().lat(),
1582
+ east: bounds?.getNorthEast().lng(),
1583
+ west: bounds?.getSouthWest().lng()
1584
+ };
1585
+ } else if (s.type === "polygon") {
1586
+ const poly = s.overlay;
1587
+ const path = poly.getPath();
1588
+ data = path.getArray().map((coord) => ({ lat: coord.lat(), lng: coord.lng() }));
1589
+ }
1590
+ return { type: s.type, data };
1591
+ });
1592
+ setSavedData(JSON.stringify(exportData, null, 2));
1593
+ setShowSaveDialog(true);
1594
+ };
1595
+ const ToolButton = ({
1596
+ active,
1597
+ onClick,
1598
+ icon: Icon,
1599
+ label
1600
+ }) => /* @__PURE__ */ jsxs(
1601
+ Button,
1602
+ {
1603
+ variant: active ? "default" : "ghost",
1604
+ className: `w-full justify-start gap-3 ${active ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground"}`,
1605
+ onClick,
1606
+ children: [
1607
+ /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" }),
1608
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: label })
1609
+ ]
1610
+ }
1611
+ );
1612
+ return /* @__PURE__ */ jsxs(Card, { className: "h-full border-0 shadow-none md:border md:shadow-sm", children: [
1613
+ /* @__PURE__ */ jsx(CardHeader, { className: "border-b bg-muted/20 pb-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
1614
+ /* @__PURE__ */ jsxs("div", { children: [
1615
+ /* @__PURE__ */ jsx(CardTitle, { children: "Ferramentas de Desenho" }),
1616
+ /* @__PURE__ */ jsx(CardDescription, { className: "mt-1", children: "Crie geometrias personalizadas no mapa" })
1617
+ ] }),
1618
+ /* @__PURE__ */ jsxs(Badge, { variant: "outline", className: "h-6", children: [
1619
+ shapes.length,
1620
+ " ",
1621
+ shapes.length === 1 ? "elemento" : "elementos"
1622
+ ] })
1623
+ ] }) }),
1624
+ /* @__PURE__ */ jsxs(CardContent, { className: "p-0 flex flex-col md:flex-row h-[600px] bg-background", children: [
1625
+ /* @__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: [
1626
+ /* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsxs("div", { className: "p-4 space-y-6", children: [
1627
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
1628
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider px-2", children: "Ferramentas" }),
1629
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
1630
+ /* @__PURE__ */ jsx(
1631
+ ToolButton,
1632
+ {
1633
+ active: selectedMode === null,
1634
+ onClick: () => handleModeChange(null),
1635
+ icon: MousePointer2,
1636
+ label: "Navegar"
1637
+ }
1638
+ ),
1639
+ /* @__PURE__ */ jsx(
1640
+ ToolButton,
1641
+ {
1642
+ active: selectedMode === "marker",
1643
+ onClick: () => handleModeChange("marker"),
1644
+ icon: MapPin,
1645
+ label: "Marcador"
1646
+ }
1647
+ ),
1648
+ /* @__PURE__ */ jsx(
1649
+ ToolButton,
1650
+ {
1651
+ active: selectedMode === "circle",
1652
+ onClick: () => handleModeChange("circle"),
1653
+ icon: Circle,
1654
+ label: "Círculo"
1655
+ }
1656
+ ),
1657
+ /* @__PURE__ */ jsx(
1658
+ ToolButton,
1659
+ {
1660
+ active: selectedMode === "rectangle",
1661
+ onClick: () => handleModeChange("rectangle"),
1662
+ icon: Square,
1663
+ label: "Retângulo"
1664
+ }
1665
+ ),
1666
+ /* @__PURE__ */ jsx(
1667
+ ToolButton,
1668
+ {
1669
+ active: selectedMode === "polygon",
1670
+ onClick: () => handleModeChange("polygon"),
1671
+ icon: Hexagon,
1672
+ label: "Polígono"
1673
+ }
1674
+ )
1675
+ ] })
1676
+ ] }),
1677
+ /* @__PURE__ */ jsx(Separator, {}),
1678
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
1679
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider px-2", children: "Ações" }),
1680
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
1681
+ /* @__PURE__ */ jsxs(
1682
+ Button,
1683
+ {
1684
+ variant: "outline",
1685
+ onClick: undoLast,
1686
+ disabled: shapes.length === 0 && !isDrawingPolygon,
1687
+ className: "w-full",
1688
+ title: "Desfazer último",
1689
+ "aria-label": "Desfazer último",
1690
+ children: [
1691
+ /* @__PURE__ */ jsx(Undo, { className: "h-4 w-4 mr-2" }),
1692
+ "Desfazer"
1693
+ ]
1694
+ }
1695
+ ),
1696
+ /* @__PURE__ */ jsxs(
1697
+ Button,
1698
+ {
1699
+ variant: "destructive",
1700
+ onClick: clearAll,
1701
+ disabled: shapes.length === 0 && !isDrawingPolygon,
1702
+ className: "w-full bg-destructive/10 text-destructive hover:bg-destructive hover:text-destructive-foreground border-0 shadow-none",
1703
+ children: [
1704
+ /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4 mr-2" }),
1705
+ "Limpar"
1706
+ ]
1707
+ }
1708
+ )
1709
+ ] }),
1710
+ /* @__PURE__ */ jsxs(
1711
+ Button,
1712
+ {
1713
+ variant: "default",
1714
+ onClick: handleSave,
1715
+ disabled: shapes.length === 0,
1716
+ className: "w-full mt-2",
1717
+ children: [
1718
+ /* @__PURE__ */ jsx(Save, { className: "h-4 w-4 mr-2" }),
1719
+ "Salvar GeoJSON"
1720
+ ]
1721
+ }
1722
+ )
1723
+ ] })
1724
+ ] }) }),
1725
+ isDrawingPolygon && /* @__PURE__ */ jsxs("div", { className: "p-4 bg-primary/5 border-t border-primary/10", children: [
1726
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2 text-primary text-xs font-medium", children: [
1727
+ /* @__PURE__ */ jsxs("span", { className: "relative flex h-2 w-2", children: [
1728
+ /* @__PURE__ */ jsx("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75" }),
1729
+ /* @__PURE__ */ jsx("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-primary" })
1730
+ ] }),
1731
+ "Desenhando Polígono..."
1732
+ ] }),
1733
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
1734
+ /* @__PURE__ */ jsxs(
1735
+ Button,
1736
+ {
1737
+ size: "sm",
1738
+ className: "w-full bg-green-600 hover:bg-green-700 text-white",
1739
+ onClick: finishPolygon,
1740
+ children: [
1741
+ /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 mr-1" }),
1742
+ " Concluir"
1743
+ ]
1744
+ }
1745
+ ),
1746
+ /* @__PURE__ */ jsxs(
1747
+ Button,
1748
+ {
1749
+ size: "sm",
1750
+ variant: "outline",
1751
+ className: "w-full",
1752
+ onClick: cancelPolygonDrawing,
1753
+ children: [
1754
+ /* @__PURE__ */ jsx(X, { className: "h-3 w-3 mr-1" }),
1755
+ " Cancelar"
1756
+ ]
1757
+ }
1758
+ )
1759
+ ] })
1760
+ ] })
1761
+ ] }),
1762
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 relative bg-muted/5 min-h-[400px]", children: [
1763
+ /* @__PURE__ */ jsx(
1764
+ Map,
1765
+ {
1766
+ className: "h-full w-full rounded-none md:rounded-br-lg",
1767
+ center: { lat: -23.5505, lng: -46.6333 },
1768
+ zoom: 13,
1769
+ height: "100%",
1770
+ mapContainerClassName: "h-full w-full rounded-none md:rounded-br-lg",
1771
+ disableDefaultUI: true,
1772
+ zoomControl: true,
1773
+ onMapLoad: setMapInstance,
1774
+ apiKey
1775
+ }
1776
+ ),
1777
+ 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: [
1778
+ selectedMode === "marker" && "Clique no mapa para adicionar um marcador",
1779
+ selectedMode === "circle" && "Clique no mapa para definir o centro do círculo",
1780
+ selectedMode === "rectangle" && "Clique no mapa para criar um retângulo",
1781
+ selectedMode === "polygon" && "Clique sequencialmente para desenhar a área"
1782
+ ] })
1783
+ ] }),
1784
+ /* @__PURE__ */ jsx(Dialog, { open: showSaveDialog, onOpenChange: setShowSaveDialog, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-md", children: [
1785
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
1786
+ /* @__PURE__ */ jsx(DialogTitle, { children: "Dados Geográficos (GeoJSON)" }),
1787
+ /* @__PURE__ */ jsx(DialogDescription, { children: "Copie os dados das formas desenhadas abaixo." })
1788
+ ] }),
1789
+ /* @__PURE__ */ jsx("div", { className: "relative mt-2", children: /* @__PURE__ */ jsx("pre", { className: "p-4 rounded-lg bg-muted overflow-auto max-h-[300px] text-xs font-mono scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent", children: savedData }) }),
1790
+ /* @__PURE__ */ jsx("div", { className: "flex justify-end mt-4", children: /* @__PURE__ */ jsx(Button, { onClick: () => setShowSaveDialog(false), children: "Fechar" }) })
1791
+ ] }) })
1792
+ ] })
1793
+ ] });
1794
+ }
1795
+
1796
+ function MapShowcase() {
1797
+ const [activeTab, setActiveTab] = useState("simple");
1798
+ const [isTransitioning, setIsTransitioning] = useState(false);
1799
+ const [apiKey, setApiKey] = useState("");
1800
+ const [inputApiKey, setInputApiKey] = useState("");
1801
+ const [showTraffic, setShowTraffic] = useState(false);
1802
+ const [showTransit, setShowTransit] = useState(false);
1803
+ const [showBicycling, setShowBicycling] = useState(false);
1804
+ const [showZoomControl, setShowZoomControl] = useState(true);
1805
+ const [showMapTypeControl, setShowMapTypeControl] = useState(false);
1806
+ const [showStreetViewControl, setShowStreetViewControl] = useState(false);
1807
+ const [showFullscreenControl, setShowFullscreenControl] = useState(true);
1808
+ const handleTabChange = (value) => {
1809
+ if (value === activeTab) return;
1810
+ setIsTransitioning(true);
1811
+ setTimeout(() => {
1812
+ setActiveTab(value);
1813
+ setIsTransitioning(false);
1814
+ }, 50);
1815
+ };
1816
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-8", children: [
1817
+ /* @__PURE__ */ jsx(
1818
+ PageHeader,
1819
+ {
1820
+ title: "Mapas",
1821
+ 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.",
1822
+ actions: /* @__PURE__ */ jsx(Badge, { children: "Design System" })
1823
+ }
1824
+ ),
1825
+ /* @__PURE__ */ jsxs(Card, { children: [
1826
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
1827
+ /* @__PURE__ */ jsx(CardTitle, { children: "Configuração da API Key" }),
1828
+ /* @__PURE__ */ jsx(CardDescription, { children: "Insira sua Google Maps API Key para renderizar os mapas abaixo." })
1829
+ ] }),
1830
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-md items-center space-x-2", children: [
1831
+ /* @__PURE__ */ jsx(
1832
+ Input,
1833
+ {
1834
+ type: "password",
1835
+ placeholder: "Cole sua Google Maps API Key aqui",
1836
+ "aria-label": "Google Maps API Key",
1837
+ value: inputApiKey,
1838
+ onChange: (e) => setInputApiKey(e.target.value),
1839
+ className: "max-w-md h-10"
1840
+ }
1841
+ ),
1842
+ /* @__PURE__ */ jsx(Button, { onClick: () => setApiKey(inputApiKey), children: "Salvar" })
1843
+ ] }) })
1844
+ ] }),
1845
+ /* @__PURE__ */ jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "w-full", children: [
1846
+ /* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-4 mb-8", children: [
1847
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "simple", children: "Mapas Simples" }),
1848
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "markers", children: "Marcadores" }),
1849
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "controls", children: "Controles" }),
1850
+ /* @__PURE__ */ jsxs(TabsTrigger, { value: "drawing", className: "flex items-center gap-2", children: [
1851
+ /* @__PURE__ */ jsx(Pencil, { className: "w-3 h-3" }),
1852
+ " Desenho"
1853
+ ] })
1854
+ ] }),
1855
+ /* @__PURE__ */ jsx(TabsContent, { value: "simple", className: "space-y-8", children: !isTransitioning && activeTab === "simple" && /* @__PURE__ */ jsxs(Fragment, { children: [
1856
+ /* @__PURE__ */ jsxs(Card, { children: [
1857
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
1858
+ /* @__PURE__ */ jsx(CardTitle, { children: "Mapa Padrão" }),
1859
+ /* @__PURE__ */ jsx(CardDescription, { children: "Configuração básica do mapa centralizado em uma coordenada específica." })
1860
+ ] }),
1861
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
1862
+ Map,
1863
+ {
1864
+ center: { lat: -23.5505, lng: -46.6333 },
1865
+ zoom: 13,
1866
+ height: "400px",
1867
+ apiKey
1868
+ }
1869
+ ) })
1870
+ ] }),
1871
+ /* @__PURE__ */ jsxs(Card, { children: [
1872
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
1873
+ /* @__PURE__ */ jsx(CardTitle, { children: "Camadas (Layers)" }),
1874
+ /* @__PURE__ */ jsx(CardDescription, { children: "Sobreposição de informações como tráfego, transporte público e ciclovias." })
1875
+ ] }),
1876
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
1877
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-6 p-4 border rounded-lg bg-muted/50", children: [
1878
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1879
+ /* @__PURE__ */ jsx(Switch, { id: "traffic", checked: showTraffic, onCheckedChange: setShowTraffic }),
1880
+ /* @__PURE__ */ jsxs(Label, { htmlFor: "traffic", className: "flex items-center gap-2", children: [
1881
+ /* @__PURE__ */ jsx(Layers, { className: "w-4 h-4" }),
1882
+ " Trânsito"
1883
+ ] })
1884
+ ] }),
1885
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1886
+ /* @__PURE__ */ jsx(Switch, { id: "transit", checked: showTransit, onCheckedChange: setShowTransit }),
1887
+ /* @__PURE__ */ jsxs(Label, { htmlFor: "transit", className: "flex items-center gap-2", children: [
1888
+ /* @__PURE__ */ jsx(Layers, { className: "w-4 h-4" }),
1889
+ " Transporte"
1890
+ ] })
1891
+ ] }),
1892
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1893
+ /* @__PURE__ */ jsx(
1894
+ Switch,
1895
+ {
1896
+ id: "bicycling",
1897
+ checked: showBicycling,
1898
+ onCheckedChange: setShowBicycling
1899
+ }
1900
+ ),
1901
+ /* @__PURE__ */ jsxs(Label, { htmlFor: "bicycling", className: "flex items-center gap-2", children: [
1902
+ /* @__PURE__ */ jsx(Layers, { className: "w-4 h-4" }),
1903
+ " Ciclovias"
1904
+ ] })
1905
+ ] })
1906
+ ] }),
1907
+ /* @__PURE__ */ jsx(
1908
+ Map,
1909
+ {
1910
+ center: { lat: -23.5505, lng: -46.6333 },
1911
+ zoom: 12,
1912
+ height: "500px",
1913
+ layers: {
1914
+ traffic: showTraffic,
1915
+ transit: showTransit,
1916
+ bicycling: showBicycling
1917
+ },
1918
+ apiKey
1919
+ }
1920
+ )
1921
+ ] })
1922
+ ] }),
1923
+ /* @__PURE__ */ jsxs("div", { className: "grid md:grid-cols-3 gap-4", children: [
1924
+ /* @__PURE__ */ jsxs(Card, { children: [
1925
+ /* @__PURE__ */ jsx(CardHeader, { className: "p-4 pb-2", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: "São Paulo" }) }),
1926
+ /* @__PURE__ */ jsx(CardContent, { className: "p-4 pt-0", children: /* @__PURE__ */ jsx(
1927
+ Map,
1928
+ {
1929
+ center: { lat: -23.5505, lng: -46.6333 },
1930
+ zoom: 11,
1931
+ height: "200px",
1932
+ disableDefaultUI: true,
1933
+ apiKey
1934
+ }
1935
+ ) })
1936
+ ] }),
1937
+ /* @__PURE__ */ jsxs(Card, { children: [
1938
+ /* @__PURE__ */ jsx(CardHeader, { className: "p-4 pb-2", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: "Rio de Janeiro" }) }),
1939
+ /* @__PURE__ */ jsx(CardContent, { className: "p-4 pt-0", children: /* @__PURE__ */ jsx(
1940
+ Map,
1941
+ {
1942
+ center: { lat: -22.9068, lng: -43.1729 },
1943
+ zoom: 11,
1944
+ height: "200px",
1945
+ disableDefaultUI: true,
1946
+ apiKey
1947
+ }
1948
+ ) })
1949
+ ] }),
1950
+ /* @__PURE__ */ jsxs(Card, { children: [
1951
+ /* @__PURE__ */ jsx(CardHeader, { className: "p-4 pb-2", children: /* @__PURE__ */ jsx(CardTitle, { className: "text-sm", children: "New York" }) }),
1952
+ /* @__PURE__ */ jsx(CardContent, { className: "p-4 pt-0", children: /* @__PURE__ */ jsx(
1953
+ Map,
1954
+ {
1955
+ center: { lat: 40.7128, lng: -74.006 },
1956
+ zoom: 11,
1957
+ height: "200px",
1958
+ disableDefaultUI: true,
1959
+ apiKey
1960
+ }
1961
+ ) })
1962
+ ] })
1963
+ ] })
1964
+ ] }) }),
1965
+ /* @__PURE__ */ jsx(TabsContent, { value: "markers", className: "space-y-8", children: !isTransitioning && activeTab === "markers" && /* @__PURE__ */ jsxs(Fragment, { children: [
1966
+ /* @__PURE__ */ jsxs(Card, { children: [
1967
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
1968
+ /* @__PURE__ */ jsx(CardTitle, { children: "Marcadores e Pins" }),
1969
+ /* @__PURE__ */ jsx(CardDescription, { children: "Exemplos de marcadores personalizados com diferentes cores e informações." })
1970
+ ] }),
1971
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
1972
+ Map,
1973
+ {
1974
+ center: { lat: -23.5505, lng: -46.6333 },
1975
+ zoom: 13,
1976
+ height: "500px",
1977
+ apiKey,
1978
+ markers: [
1979
+ {
1980
+ position: { lat: -23.5505, lng: -46.6333 },
1981
+ title: "Principal",
1982
+ info: "Marcador padrão",
1983
+ customColor: "#4F46E5"
1984
+ },
1985
+ {
1986
+ position: { lat: -23.54, lng: -46.64 },
1987
+ title: "Secundário",
1988
+ info: "Marcador de alerta",
1989
+ customColor: "#EF4444",
1990
+ icon: "!"
1991
+ },
1992
+ {
1993
+ position: { lat: -23.56, lng: -46.62 },
1994
+ title: "Loja",
1995
+ info: "Ponto de venda",
1996
+ customColor: "#10B981",
1997
+ icon: "S"
1998
+ }
1999
+ ]
2000
+ }
2001
+ ) })
2002
+ ] }),
2003
+ /* @__PURE__ */ jsxs(Card, { children: [
2004
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2005
+ /* @__PURE__ */ jsx(CardTitle, { children: "Marcador com Ações" }),
2006
+ /* @__PURE__ */ jsx(CardDescription, { children: "Marcador interativo que exibe conteúdo rico (texto, imagem, botões) ao ser clicado." })
2007
+ ] }),
2008
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
2009
+ Map,
2010
+ {
2011
+ center: { lat: -23.5505, lng: -46.6333 },
2012
+ zoom: 13,
2013
+ height: "500px",
2014
+ apiKey,
2015
+ markers: [
2016
+ {
2017
+ position: { lat: -23.5505, lng: -46.6333 },
2018
+ label: "🏢",
2019
+ richContent: /* @__PURE__ */ jsxs("div", { className: "p-4 max-w-[260px]", children: [
2020
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
2021
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-base", children: "Xertica HQ" }),
2022
+ /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-[10px] h-5", children: "Open" })
2023
+ ] }),
2024
+ /* @__PURE__ */ jsxs("div", { className: "w-full h-32 bg-muted rounded-md mb-3 overflow-hidden relative", children: [
2025
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" }),
2026
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center text-white font-medium", children: "Office View" })
2027
+ ] }),
2028
+ /* @__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." }),
2029
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
2030
+ /* @__PURE__ */ jsx(Button, { size: "sm", className: "w-full h-8 text-xs shadow-sm", children: "Navegar" }),
2031
+ /* @__PURE__ */ jsx(
2032
+ Button,
2033
+ {
2034
+ size: "sm",
2035
+ variant: "outline",
2036
+ className: "w-full h-8 text-xs bg-background",
2037
+ children: "Detalhes"
2038
+ }
2039
+ )
2040
+ ] })
2041
+ ] })
2042
+ }
2043
+ ]
2044
+ }
2045
+ ) })
2046
+ ] }),
2047
+ /* @__PURE__ */ jsxs(Card, { children: [
2048
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2049
+ /* @__PURE__ */ jsx(CardTitle, { children: "Áreas e Zonas" }),
2050
+ /* @__PURE__ */ jsx(CardDescription, { children: "Delimitação de áreas geográficas usando círculos e polígonos." })
2051
+ ] }),
2052
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
2053
+ Map,
2054
+ {
2055
+ center: { lat: -23.5505, lng: -46.6333 },
2056
+ zoom: 12,
2057
+ height: "500px",
2058
+ apiKey,
2059
+ markers: [
2060
+ {
2061
+ position: { lat: -23.5505, lng: -46.6333 },
2062
+ title: "Centro da Zona",
2063
+ info: "Raio de 3km",
2064
+ customColor: "#6366F1"
2065
+ }
2066
+ ],
2067
+ circle: {
2068
+ center: { lat: -23.5505, lng: -46.6333 },
2069
+ radius: 3e3,
2070
+ fillColor: "#6366F1",
2071
+ strokeColor: "#4F46E5"
2072
+ },
2073
+ polygon: {
2074
+ paths: [
2075
+ [
2076
+ { lat: -23.52, lng: -46.6 },
2077
+ { lat: -23.52, lng: -46.66 },
2078
+ { lat: -23.58, lng: -46.66 },
2079
+ { lat: -23.58, lng: -46.6 }
2080
+ ]
2081
+ ],
2082
+ fillColor: "#10B981",
2083
+ strokeColor: "#059669"
2084
+ }
2085
+ }
2086
+ ) })
2087
+ ] })
2088
+ ] }) }),
2089
+ /* @__PURE__ */ jsx(TabsContent, { value: "controls", className: "space-y-8", children: !isTransitioning && activeTab === "controls" && /* @__PURE__ */ jsxs(Fragment, { children: [
2090
+ /* @__PURE__ */ jsxs(Card, { children: [
2091
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2092
+ /* @__PURE__ */ jsx(CardTitle, { children: "Controles do Mapa" }),
2093
+ /* @__PURE__ */ jsx(CardDescription, { children: "Personalize a interface do mapa ativando ou desativando controles nativos." })
2094
+ ] }),
2095
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
2096
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4 p-4 border rounded-lg bg-muted/50", children: [
2097
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2098
+ /* @__PURE__ */ jsx(
2099
+ Checkbox,
2100
+ {
2101
+ id: "zoom",
2102
+ checked: showZoomControl,
2103
+ onCheckedChange: (c) => setShowZoomControl(!!c)
2104
+ }
2105
+ ),
2106
+ /* @__PURE__ */ jsx(Label, { htmlFor: "zoom", children: "Zoom Control" })
2107
+ ] }),
2108
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2109
+ /* @__PURE__ */ jsx(
2110
+ Checkbox,
2111
+ {
2112
+ id: "maptype",
2113
+ checked: showMapTypeControl,
2114
+ onCheckedChange: (c) => setShowMapTypeControl(!!c)
2115
+ }
2116
+ ),
2117
+ /* @__PURE__ */ jsx(Label, { htmlFor: "maptype", children: "Map Type" })
2118
+ ] }),
2119
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2120
+ /* @__PURE__ */ jsx(
2121
+ Checkbox,
2122
+ {
2123
+ id: "streetview",
2124
+ checked: showStreetViewControl,
2125
+ onCheckedChange: (c) => setShowStreetViewControl(!!c)
2126
+ }
2127
+ ),
2128
+ /* @__PURE__ */ jsx(Label, { htmlFor: "streetview", children: "Street View" })
2129
+ ] }),
2130
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2131
+ /* @__PURE__ */ jsx(
2132
+ Checkbox,
2133
+ {
2134
+ id: "fullscreen",
2135
+ checked: showFullscreenControl,
2136
+ onCheckedChange: (c) => setShowFullscreenControl(!!c)
2137
+ }
2138
+ ),
2139
+ /* @__PURE__ */ jsx(Label, { htmlFor: "fullscreen", children: "Fullscreen" })
2140
+ ] })
2141
+ ] }),
2142
+ /* @__PURE__ */ jsx(
2143
+ Map,
2144
+ {
2145
+ center: { lat: -23.5505, lng: -46.6333 },
2146
+ zoom: 13,
2147
+ height: "400px",
2148
+ apiKey,
2149
+ zoomControl: showZoomControl,
2150
+ mapTypeControl: showMapTypeControl,
2151
+ streetViewControl: showStreetViewControl,
2152
+ fullscreenControl: showFullscreenControl
2153
+ }
2154
+ )
2155
+ ] })
2156
+ ] }),
2157
+ /* @__PURE__ */ jsxs(Card, { children: [
2158
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2159
+ /* @__PURE__ */ jsx(CardTitle, { children: "Filtros Interativos" }),
2160
+ /* @__PURE__ */ jsx(CardDescription, { children: "Exemplo avançado de mapa com controles customizados para filtragem de marcadores." })
2161
+ ] }),
2162
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(FilterableMapExample, { apiKey }) })
2163
+ ] })
2164
+ ] }) }),
2165
+ /* @__PURE__ */ jsx(TabsContent, { value: "drawing", className: "space-y-8", children: !isTransitioning && activeTab === "drawing" && /* @__PURE__ */ jsx(DrawingMapExample, { apiKey }) })
2166
+ ] }),
2167
+ /* @__PURE__ */ jsxs("div", { className: "grid md:grid-cols-3 gap-6 pt-8 border-t", children: [
2168
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2169
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm", children: "Documentação" }),
2170
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
2171
+ "Verifique ",
2172
+ /* @__PURE__ */ jsx("code", { children: "MAP_SETUP.md" }),
2173
+ " para configuração inicial e requisitos de API."
2174
+ ] })
2175
+ ] }),
2176
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2177
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm", children: "Performance" }),
2178
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Utiliza carregamento assíncrono e AdvancedMarkerElement para melhor desempenho." })
2179
+ ] }),
2180
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2181
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm", children: "Design System" }),
2182
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
2183
+ "Componentes seguem estritamente as variáveis de tokens do ",
2184
+ /* @__PURE__ */ jsx("code", { children: "globals.css" }),
2185
+ "."
2186
+ ] })
2187
+ ] })
2188
+ ] })
2189
+ ] });
2190
+ }
2191
+
2192
+ function TemplateContent() {
2193
+ const { t } = useTranslation();
2194
+ const layout = useOptionalLayout();
2195
+ const { disableDarkMode } = useTheme();
2196
+ const [localSidebarExpanded, setLocalSidebarExpanded] = useState(false);
2197
+ const [localSidebarWidth, setLocalSidebarWidth] = useState(280);
2198
+ const sidebarExpanded = layout?.sidebarExpanded ?? localSidebarExpanded;
2199
+ const sidebarWidth = layout?.sidebarWidth ?? localSidebarWidth;
2200
+ const setSidebarWidth = layout?.setSidebarWidth ?? setLocalSidebarWidth;
2201
+ layout?.toggleSidebar ?? (() => setLocalSidebarExpanded((value) => !value));
2202
+ useNavigate();
2203
+ const { data: teamMembers = [], isLoading: teamLoading } = useTeamMembers();
2204
+ const progress = useDashboardStore((s) => s.progress);
2205
+ const setProgress = useDashboardStore((s) => s.setProgress);
2206
+ const sliderValue = useDashboardStore((s) => s.sliderValue);
2207
+ const setSliderValue = useDashboardStore((s) => s.setSliderValue);
2208
+ const switchEnabled = useDashboardStore((s) => s.switchEnabled);
2209
+ const toggleSwitch = useDashboardStore((s) => s.toggleSwitch);
2210
+ const [showSidebarUser, setShowSidebarUser] = useState(true);
2211
+ const [showSidebarSettings, setShowSidebarSettings] = useState(true);
2212
+ const [showSidebarLogout, setShowSidebarLogout] = useState(true);
2213
+ const [showHeaderActions, setShowHeaderActions] = useState(true);
2214
+ const [showHeaderBreadcrumbs, setShowHeaderBreadcrumbs] = useState(true);
2215
+ const handleFormSubmit = (e) => {
2216
+ e.preventDefault();
2217
+ toast.success(t("templates.formSubmitSuccess"));
2218
+ };
2219
+ return /* @__PURE__ */ jsxs(
2220
+ "div",
2221
+ {
2222
+ className: "flex-1 flex flex-col overflow-hidden transition-all duration-300",
2223
+ style: {
2224
+ paddingLeft: sidebarExpanded ? `${sidebarWidth}px` : "80px"
2225
+ },
2226
+ children: [
2227
+ /* @__PURE__ */ jsx(
2228
+ Header,
2229
+ {
2230
+ showThemeToggle: true,
2231
+ showLanguageSelector: true,
2232
+ breadcrumbs: [
2233
+ { label: t("nav.designSystem"), href: "/home", icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" }) },
2234
+ { label: t("templates.breadcrumb") }
2235
+ ],
2236
+ renderLink: (href, props) => /* @__PURE__ */ jsx(Link, { to: href, ...props })
2237
+ }
2238
+ ),
2239
+ /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-hidden bg-muted", children: /* @__PURE__ */ jsx("div", { className: "h-full", style: { overflowY: "auto", overflowX: "hidden" }, children: /* @__PURE__ */ jsx("div", { className: "p-5 sm:p-4 md:p-6", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto space-y-8", children: [
2240
+ /* @__PURE__ */ jsx(PageHeader, { title: t("templates.title"), subtitle: t("templates.subtitle") }),
2241
+ /* @__PURE__ */ jsxs("section", { children: [
2242
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.headerWithBreadcrumbs.sectionTitle") }),
2243
+ /* @__PURE__ */ jsxs(Card, { children: [
2244
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2245
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.headerWithBreadcrumbs.cardTitle") }),
2246
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.headerWithBreadcrumbs.cardDescription") })
2247
+ ] }),
2248
+ /* @__PURE__ */ jsxs(CardContent, { className: "p-0 border-t bg-background overflow-hidden rounded-b-[var(--radius-lg)]", children: [
2249
+ /* @__PURE__ */ jsx(
2250
+ Header,
2251
+ {
2252
+ className: "border-b",
2253
+ breadcrumbs: [
2254
+ {
2255
+ label: t("templates.headerWithBreadcrumbs.breadcrumbs.dashboard"),
2256
+ href: "#",
2257
+ icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" })
2258
+ },
2259
+ {
2260
+ label: t("templates.headerWithBreadcrumbs.breadcrumbs.settings"),
2261
+ href: "#",
2262
+ icon: /* @__PURE__ */ jsx(Settings, { className: "w-4 h-4" })
2263
+ },
2264
+ {
2265
+ label: t("templates.headerWithBreadcrumbs.breadcrumbs.users"),
2266
+ href: "#",
2267
+ icon: /* @__PURE__ */ jsx(Users, { className: "w-4 h-4" })
2268
+ },
2269
+ { label: t("templates.headerWithBreadcrumbs.breadcrumbs.accessProfile") }
2270
+ ],
2271
+ showLanguageSelector: true,
2272
+ showThemeToggle: true
2273
+ }
2274
+ ),
2275
+ /* @__PURE__ */ jsxs("div", { className: "p-6 min-h-[200px]", children: [
2276
+ /* @__PURE__ */ jsx("h4", { className: "text-lg font-semibold mb-2", children: t("templates.headerWithBreadcrumbs.exampleContentTitle") }),
2277
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
2278
+ t("templates.headerWithBreadcrumbs.exampleContentDescriptionPart1"),
2279
+ /* @__PURE__ */ jsx("strong", { children: "Header" }),
2280
+ t("templates.headerWithBreadcrumbs.exampleContentDescriptionPart2")
2281
+ ] })
2282
+ ] })
2283
+ ] })
2284
+ ] })
2285
+ ] }),
2286
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2287
+ /* @__PURE__ */ jsxs("section", { children: [
2288
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.alerts") }),
2289
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [
2290
+ /* @__PURE__ */ jsxs(Alert, { variant: "info", children: [
2291
+ /* @__PURE__ */ jsx(AlertTitle, { children: t("templates.alerts.infoTitle") }),
2292
+ /* @__PURE__ */ jsx(AlertDescription, { children: t("templates.alerts.infoDescription") })
2293
+ ] }),
2294
+ /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
2295
+ /* @__PURE__ */ jsx(AlertTitle, { children: t("templates.alerts.errorTitle") }),
2296
+ /* @__PURE__ */ jsx(AlertDescription, { children: t("templates.alerts.errorDescription") })
2297
+ ] }),
2298
+ /* @__PURE__ */ jsxs(Alert, { variant: "success", children: [
2299
+ /* @__PURE__ */ jsx(AlertTitle, { children: t("templates.alerts.successTitle") }),
2300
+ /* @__PURE__ */ jsx(AlertDescription, { children: t("templates.alerts.successDescription") })
2301
+ ] }),
2302
+ /* @__PURE__ */ jsxs(Alert, { variant: "warning", children: [
2303
+ /* @__PURE__ */ jsx(AlertTitle, { children: t("templates.alerts.warningTitle") }),
2304
+ /* @__PURE__ */ jsx(AlertDescription, { children: t("templates.alerts.warningDescription") })
2305
+ ] })
2306
+ ] })
2307
+ ] }),
2308
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2309
+ /* @__PURE__ */ jsxs("section", { children: [
2310
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.cardsAndTabs") }),
2311
+ /* @__PURE__ */ jsxs(Tabs, { defaultValue: "overview", className: "w-full", children: [
2312
+ /* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-4", children: [
2313
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "overview", children: t("templates.tabs.overview") }),
2314
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "forms", children: t("templates.tabs.forms") }),
2315
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "data", children: t("templates.tabs.data") }),
2316
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "settings", children: t("templates.tabs.settings") })
2317
+ ] }),
2318
+ /* @__PURE__ */ jsxs(TabsContent, { value: "overview", className: "space-y-4", children: [
2319
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-3", children: [
2320
+ /* @__PURE__ */ jsxs(Card, { children: [
2321
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2322
+ /* @__PURE__ */ jsx(CardTitle, { children: t("stats.totalUsers") }),
2323
+ /* @__PURE__ */ jsx(CardDescription, { children: t("stats.last30Days") })
2324
+ ] }),
2325
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "text-foreground", children: [
2326
+ /* @__PURE__ */ jsx("span", { className: "[font-size:var(--text-stats)] [font-weight:var(--font-weight-bold)]", children: "1,234" }),
2327
+ /* @__PURE__ */ jsx(Badge, { variant: "default", className: "ml-2", children: "+12%" })
2328
+ ] }) })
2329
+ ] }),
2330
+ /* @__PURE__ */ jsxs(Card, { children: [
2331
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2332
+ /* @__PURE__ */ jsx(CardTitle, { children: t("stats.totalRevenue") }),
2333
+ /* @__PURE__ */ jsx(CardDescription, { children: t("stats.currentMonth") })
2334
+ ] }),
2335
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "text-foreground", children: [
2336
+ /* @__PURE__ */ jsx("span", { className: "[font-size:var(--text-stats)] [font-weight:var(--font-weight-bold)]", children: "$ 45.2k" }),
2337
+ /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "ml-2", children: "+8%" })
2338
+ ] }) })
2339
+ ] }),
2340
+ /* @__PURE__ */ jsxs(Card, { children: [
2341
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2342
+ /* @__PURE__ */ jsx(CardTitle, { children: t("stats.conversionRate") }),
2343
+ /* @__PURE__ */ jsx(CardDescription, { children: t("stats.currentWeek") })
2344
+ ] }),
2345
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "text-foreground", children: [
2346
+ /* @__PURE__ */ jsx("span", { className: "[font-size:var(--text-stats)] [font-weight:var(--font-weight-bold)]", children: "3.2%" }),
2347
+ /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "ml-2", children: "-2%" })
2348
+ ] }) })
2349
+ ] })
2350
+ ] }),
2351
+ /* @__PURE__ */ jsxs(Card, { children: [
2352
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2353
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.overview.progressTitle") }),
2354
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.overview.progressDescription") })
2355
+ ] }),
2356
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2357
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2358
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2359
+ /* @__PURE__ */ jsx(Label, { children: t("templates.overview.projectProgress") }),
2360
+ /* @__PURE__ */ jsxs("span", { className: "[font-size:var(--text-small)] text-muted-foreground", children: [
2361
+ progress,
2362
+ "%"
2363
+ ] })
2364
+ ] }),
2365
+ /* @__PURE__ */ jsx(Progress, { value: progress, className: "w-full" }),
2366
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
2367
+ /* @__PURE__ */ jsx(
2368
+ Button,
2369
+ {
2370
+ size: "sm",
2371
+ onClick: () => setProgress(Math.max(0, progress - 10)),
2372
+ children: "-10%"
2373
+ }
2374
+ ),
2375
+ /* @__PURE__ */ jsx(
2376
+ Button,
2377
+ {
2378
+ size: "sm",
2379
+ onClick: () => setProgress(Math.min(100, progress + 10)),
2380
+ children: "+10%"
2381
+ }
2382
+ )
2383
+ ] })
2384
+ ] }),
2385
+ /* @__PURE__ */ jsx(Separator, {}),
2386
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2387
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2388
+ /* @__PURE__ */ jsx(Label, { children: t("templates.overview.volume") }),
2389
+ /* @__PURE__ */ jsxs("span", { className: "[font-size:var(--text-small)] text-muted-foreground", children: [
2390
+ sliderValue[0],
2391
+ "%"
2392
+ ] })
2393
+ ] }),
2394
+ /* @__PURE__ */ jsx(
2395
+ Slider,
2396
+ {
2397
+ value: sliderValue,
2398
+ onValueChange: setSliderValue,
2399
+ min: 0,
2400
+ max: 100,
2401
+ step: 1,
2402
+ className: "w-full",
2403
+ "aria-label": t("templates.overview.volume")
2404
+ }
2405
+ )
2406
+ ] })
2407
+ ] })
2408
+ ] })
2409
+ ] }),
2410
+ /* @__PURE__ */ jsx(TabsContent, { value: "forms", className: "space-y-4", children: /* @__PURE__ */ jsxs(Card, { children: [
2411
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2412
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.forms.registrationTitle") }),
2413
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.forms.registrationDescription") })
2414
+ ] }),
2415
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("form", { onSubmit: handleFormSubmit, className: "space-y-4", children: [
2416
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [
2417
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2418
+ /* @__PURE__ */ jsx(Label, { htmlFor: "firstName", children: t("templates.forms.firstName") }),
2419
+ /* @__PURE__ */ jsx(
2420
+ Input,
2421
+ {
2422
+ id: "firstName",
2423
+ placeholder: t("templates.forms.firstNamePlaceholder")
2424
+ }
2425
+ )
2426
+ ] }),
2427
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2428
+ /* @__PURE__ */ jsx(Label, { htmlFor: "lastName", children: t("templates.forms.lastName") }),
2429
+ /* @__PURE__ */ jsx(
2430
+ Input,
2431
+ {
2432
+ id: "lastName",
2433
+ placeholder: t("templates.forms.lastNamePlaceholder")
2434
+ }
2435
+ )
2436
+ ] })
2437
+ ] }),
2438
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2439
+ /* @__PURE__ */ jsx(Label, { htmlFor: "email", children: t("templates.forms.email") }),
2440
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2441
+ /* @__PURE__ */ jsx(Mail, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
2442
+ /* @__PURE__ */ jsx(
2443
+ Input,
2444
+ {
2445
+ id: "email",
2446
+ type: "email",
2447
+ placeholder: t("templates.forms.emailPlaceholder"),
2448
+ className: "pl-10"
2449
+ }
2450
+ )
2451
+ ] })
2452
+ ] }),
2453
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2454
+ /* @__PURE__ */ jsx(Label, { htmlFor: "phone", children: t("templates.forms.phone") }),
2455
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2456
+ /* @__PURE__ */ jsx(Phone, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
2457
+ /* @__PURE__ */ jsx(
2458
+ Input,
2459
+ {
2460
+ id: "phone",
2461
+ type: "tel",
2462
+ placeholder: t("templates.forms.phonePlaceholder"),
2463
+ className: "pl-10"
2464
+ }
2465
+ )
2466
+ ] })
2467
+ ] }),
2468
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2469
+ /* @__PURE__ */ jsx(Label, { htmlFor: "role", children: t("templates.forms.role") }),
2470
+ /* @__PURE__ */ jsxs(Select, { children: [
2471
+ /* @__PURE__ */ jsx(SelectTrigger, { id: "role", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: t("templates.forms.rolePlaceholder") }) }),
2472
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
2473
+ /* @__PURE__ */ jsx(SelectItem, { value: "developer", children: t("templates.forms.roles.developer") }),
2474
+ /* @__PURE__ */ jsx(SelectItem, { value: "designer", children: t("templates.forms.roles.designer") }),
2475
+ /* @__PURE__ */ jsx(SelectItem, { value: "manager", children: t("templates.forms.roles.manager") }),
2476
+ /* @__PURE__ */ jsx(SelectItem, { value: "analyst", children: t("templates.forms.roles.analyst") })
2477
+ ] })
2478
+ ] })
2479
+ ] }),
2480
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2481
+ /* @__PURE__ */ jsx(Label, { htmlFor: "bio", children: t("templates.forms.bio") }),
2482
+ /* @__PURE__ */ jsx(
2483
+ Textarea,
2484
+ {
2485
+ id: "bio",
2486
+ placeholder: t("templates.forms.bioPlaceholder"),
2487
+ rows: 4
2488
+ }
2489
+ )
2490
+ ] }),
2491
+ /* @__PURE__ */ jsx(Separator, {}),
2492
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
2493
+ /* @__PURE__ */ jsx("h4", { children: t("templates.forms.preferences") }),
2494
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2495
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2496
+ /* @__PURE__ */ jsx(Checkbox, { id: "newsletter" }),
2497
+ /* @__PURE__ */ jsx(Label, { htmlFor: "newsletter", className: "font-normal", children: t("templates.forms.newsletter") })
2498
+ ] }),
2499
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2500
+ /* @__PURE__ */ jsx(Checkbox, { id: "notifications" }),
2501
+ /* @__PURE__ */ jsx(Label, { htmlFor: "notifications", className: "font-normal", children: t("templates.forms.pushNotifications") })
2502
+ ] }),
2503
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2504
+ /* @__PURE__ */ jsx(Checkbox, { id: "updates" }),
2505
+ /* @__PURE__ */ jsx(Label, { htmlFor: "updates", className: "font-normal", children: t("templates.forms.featureUpdates") })
2506
+ ] })
2507
+ ] }),
2508
+ /* @__PURE__ */ jsx(Separator, {}),
2509
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2510
+ /* @__PURE__ */ jsx(Label, { children: t("templates.forms.accountType") }),
2511
+ /* @__PURE__ */ jsxs(
2512
+ RadioGroup,
2513
+ {
2514
+ defaultValue: "personal",
2515
+ "aria-label": t("templates.forms.accountType"),
2516
+ children: [
2517
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2518
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: "personal", id: "personal" }),
2519
+ /* @__PURE__ */ jsx(Label, { htmlFor: "personal", className: "font-normal", children: t("templates.forms.accountPersonal") })
2520
+ ] }),
2521
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2522
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: "business", id: "business" }),
2523
+ /* @__PURE__ */ jsx(Label, { htmlFor: "business", className: "font-normal", children: t("templates.forms.accountBusiness") })
2524
+ ] }),
2525
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2526
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: "enterprise", id: "enterprise" }),
2527
+ /* @__PURE__ */ jsx(Label, { htmlFor: "enterprise", className: "font-normal", children: t("templates.forms.accountEnterprise") })
2528
+ ] })
2529
+ ]
2530
+ }
2531
+ )
2532
+ ] })
2533
+ ] })
2534
+ ] }) }),
2535
+ /* @__PURE__ */ jsxs(CardFooter, { className: "flex justify-between", children: [
2536
+ /* @__PURE__ */ jsx(Button, { variant: "outline", children: t("templates.forms.cancel") }),
2537
+ /* @__PURE__ */ jsx(Button, { onClick: handleFormSubmit, children: t("templates.forms.createAccount") })
2538
+ ] })
2539
+ ] }) }),
2540
+ /* @__PURE__ */ jsx(TabsContent, { value: "data", className: "space-y-4", children: /* @__PURE__ */ jsx(SectionErrorBoundary, { children: /* @__PURE__ */ jsxs(Card, { children: [
2541
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2542
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.data.title") }),
2543
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.data.description") })
2544
+ ] }),
2545
+ /* @__PURE__ */ jsxs(CardContent, { children: [
2546
+ /* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
2547
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
2548
+ /* @__PURE__ */ jsx(
2549
+ Input,
2550
+ {
2551
+ placeholder: t("templates.data.searchPlaceholder"),
2552
+ "aria-label": t("templates.data.searchPlaceholder"),
2553
+ className: "pl-10"
2554
+ }
2555
+ )
2556
+ ] }) }),
2557
+ /* @__PURE__ */ jsx("div", { className: "rounded-[var(--radius-lg)] border border-border overflow-hidden", children: /* @__PURE__ */ jsxs(Table, { children: [
2558
+ /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
2559
+ /* @__PURE__ */ jsx(TableHead, { children: t("team.name") }),
2560
+ /* @__PURE__ */ jsx(TableHead, { children: t("team.email") }),
2561
+ /* @__PURE__ */ jsx(TableHead, { children: t("team.role") }),
2562
+ /* @__PURE__ */ jsx(TableHead, { children: t("team.status") }),
2563
+ /* @__PURE__ */ jsx(TableHead, { className: "text-right", children: t("team.actions") })
2564
+ ] }) }),
2565
+ /* @__PURE__ */ jsx(TableBody, { children: teamLoading ? /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxs(TableRow, { children: [
2566
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2567
+ /* @__PURE__ */ jsx(Skeleton, { className: "size-8 rounded-full shrink-0" }),
2568
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-28" })
2569
+ ] }) }),
2570
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-36" }) }),
2571
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-20" }) }),
2572
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-16 rounded-full" }) }),
2573
+ /* @__PURE__ */ jsx(TableCell, { className: "text-right", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-7 w-14 ml-auto" }) })
2574
+ ] }, i)) }) : teamMembers.map((member) => /* @__PURE__ */ jsxs(TableRow, { children: [
2575
+ /* @__PURE__ */ jsx(TableCell, { children: member.name }),
2576
+ /* @__PURE__ */ jsx(TableCell, { children: member.email }),
2577
+ /* @__PURE__ */ jsx(TableCell, { children: t(`team.roles.${member.role}`) }),
2578
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(
2579
+ Badge,
2580
+ {
2581
+ variant: member.status === "active" ? "default" : member.status === "away" ? "secondary" : "outline",
2582
+ children: t(`common.${member.status}`)
2583
+ }
2584
+ ) }),
2585
+ /* @__PURE__ */ jsx(TableCell, { className: "text-right", children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", children: t("common.edit") }) })
2586
+ ] }, member.id)) })
2587
+ ] }) })
2588
+ ] }),
2589
+ /* @__PURE__ */ jsxs(CardFooter, { className: "flex justify-between items-center", children: [
2590
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t("team.showing", {
2591
+ count: teamMembers.length,
2592
+ total: teamMembers.length
2593
+ }) }),
2594
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
2595
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", children: t("common.previous") }),
2596
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", children: t("common.next") })
2597
+ ] })
2598
+ ] })
2599
+ ] }) }) }),
2600
+ /* @__PURE__ */ jsx(TabsContent, { value: "settings", className: "space-y-4", children: /* @__PURE__ */ jsxs(Card, { children: [
2601
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2602
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.settings.title") }),
2603
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.settings.description") })
2604
+ ] }),
2605
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2606
+ !disableDarkMode && /* @__PURE__ */ jsxs(Fragment, { children: [
2607
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2608
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
2609
+ /* @__PURE__ */ jsx(Label, { htmlFor: "dark-mode", children: t("templates.settings.darkMode") }),
2610
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t("templates.settings.darkModeDescription") })
2611
+ ] }),
2612
+ /* @__PURE__ */ jsx(
2613
+ Switch,
2614
+ {
2615
+ id: "dark-mode",
2616
+ checked: switchEnabled,
2617
+ onCheckedChange: toggleSwitch
2618
+ }
2619
+ )
2620
+ ] }),
2621
+ /* @__PURE__ */ jsx(Separator, {})
2622
+ ] }),
2623
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2624
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
2625
+ /* @__PURE__ */ jsx(Label, { htmlFor: "email-notifications", children: t("templates.settings.emailNotifications") }),
2626
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t("templates.settings.emailNotificationsDescription") })
2627
+ ] }),
2628
+ /* @__PURE__ */ jsx(Switch, { id: "email-notifications", defaultChecked: true })
2629
+ ] }),
2630
+ /* @__PURE__ */ jsx(Separator, {}),
2631
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2632
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
2633
+ /* @__PURE__ */ jsx(Label, { htmlFor: "push-notifications", children: t("templates.settings.pushNotifications") }),
2634
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t("templates.settings.pushNotificationsDescription") })
2635
+ ] }),
2636
+ /* @__PURE__ */ jsx(Switch, { id: "push-notifications" })
2637
+ ] }),
2638
+ /* @__PURE__ */ jsx(Separator, {}),
2639
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2640
+ /* @__PURE__ */ jsx(Label, { children: t("templates.settings.language") }),
2641
+ /* @__PURE__ */ jsxs(Select, { defaultValue: "pt-br", children: [
2642
+ /* @__PURE__ */ jsx(SelectTrigger, { "aria-label": t("templates.settings.language"), children: /* @__PURE__ */ jsx(SelectValue, {}) }),
2643
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
2644
+ /* @__PURE__ */ jsx(SelectItem, { value: "pt-br", children: t("templates.settings.languages.ptBR") }),
2645
+ /* @__PURE__ */ jsx(SelectItem, { value: "en", children: t("templates.settings.languages.en") }),
2646
+ /* @__PURE__ */ jsx(SelectItem, { value: "es", children: t("templates.settings.languages.es") })
2647
+ ] })
2648
+ ] })
2649
+ ] }),
2650
+ /* @__PURE__ */ jsx(Separator, {}),
2651
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2652
+ /* @__PURE__ */ jsx(Label, { children: t("templates.settings.timezone") }),
2653
+ /* @__PURE__ */ jsxs(Select, { defaultValue: "america-sao-paulo", children: [
2654
+ /* @__PURE__ */ jsx(SelectTrigger, { "aria-label": t("templates.settings.timezone"), children: /* @__PURE__ */ jsx(SelectValue, {}) }),
2655
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
2656
+ /* @__PURE__ */ jsx(SelectItem, { value: "america-sao-paulo", children: t("templates.settings.timezones.saoPaulo") }),
2657
+ /* @__PURE__ */ jsx(SelectItem, { value: "america-new-york", children: t("templates.settings.timezones.newYork") }),
2658
+ /* @__PURE__ */ jsx(SelectItem, { value: "europe-london", children: t("templates.settings.timezones.london") })
2659
+ ] })
2660
+ ] })
2661
+ ] })
2662
+ ] }),
2663
+ /* @__PURE__ */ jsxs(CardFooter, { className: "flex justify-between", children: [
2664
+ /* @__PURE__ */ jsx(Button, { variant: "outline", children: t("templates.settings.restoreDefaults") }),
2665
+ /* @__PURE__ */ jsx(Button, { children: t("templates.settings.saveChanges") })
2666
+ ] })
2667
+ ] }) })
2668
+ ] })
2669
+ ] }),
2670
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2671
+ /* @__PURE__ */ jsxs("section", { children: [
2672
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.buttons") }),
2673
+ /* @__PURE__ */ jsxs(Card, { children: [
2674
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2675
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.buttons.title") }),
2676
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.buttons.description") })
2677
+ ] }),
2678
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2679
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2680
+ /* @__PURE__ */ jsx(Label, { children: t("templates.buttons.variants") }),
2681
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2682
+ /* @__PURE__ */ jsx(Button, { variant: "default", children: "Default" }),
2683
+ /* @__PURE__ */ jsx(Button, { variant: "secondary", children: "Secondary" }),
2684
+ /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Outline" }),
2685
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", children: "Ghost" }),
2686
+ /* @__PURE__ */ jsx(Button, { variant: "link", children: "Link" }),
2687
+ /* @__PURE__ */ jsx(Button, { variant: "destructive", children: "Destructive" })
2688
+ ] })
2689
+ ] }),
2690
+ /* @__PURE__ */ jsx(Separator, {}),
2691
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2692
+ /* @__PURE__ */ jsx(Label, { children: t("templates.buttons.sizes") }),
2693
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
2694
+ /* @__PURE__ */ jsx(Button, { size: "sm", children: "Small" }),
2695
+ /* @__PURE__ */ jsx(Button, { size: "default", children: "Default" }),
2696
+ /* @__PURE__ */ jsx(Button, { size: "lg", children: "Large" }),
2697
+ /* @__PURE__ */ jsx(Button, { size: "icon", "aria-label": t("nav.settings"), children: /* @__PURE__ */ jsx(Settings, { className: "h-4 w-4" }) })
2698
+ ] })
2699
+ ] }),
2700
+ /* @__PURE__ */ jsx(Separator, {}),
2701
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2702
+ /* @__PURE__ */ jsx(Label, { children: t("templates.buttons.withIcons") }),
2703
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2704
+ /* @__PURE__ */ jsxs(Button, { children: [
2705
+ /* @__PURE__ */ jsx(User, { className: "mr-2 h-4 w-4" }),
2706
+ t("templates.buttons.profile")
2707
+ ] }),
2708
+ /* @__PURE__ */ jsxs(Button, { variant: "secondary", children: [
2709
+ /* @__PURE__ */ jsx(Mail, { className: "mr-2 h-4 w-4" }),
2710
+ t("templates.buttons.messages")
2711
+ ] }),
2712
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", children: [
2713
+ /* @__PURE__ */ jsx(Calendar, { className: "mr-2 h-4 w-4" }),
2714
+ t("templates.buttons.schedule")
2715
+ ] })
2716
+ ] })
2717
+ ] }),
2718
+ /* @__PURE__ */ jsx(Separator, {}),
2719
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2720
+ /* @__PURE__ */ jsx(Label, { children: t("templates.buttons.states") }),
2721
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2722
+ /* @__PURE__ */ jsx(Button, { disabled: true, children: t("templates.buttons.disabled") }),
2723
+ /* @__PURE__ */ jsx(Button, { variant: "outline", disabled: true, children: t("templates.buttons.outlineDisabled") })
2724
+ ] })
2725
+ ] })
2726
+ ] })
2727
+ ] })
2728
+ ] }),
2729
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2730
+ /* @__PURE__ */ jsxs("section", { children: [
2731
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.badges") }),
2732
+ /* @__PURE__ */ jsxs(Card, { children: [
2733
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2734
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.badges.title") }),
2735
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.badges.description") })
2736
+ ] }),
2737
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2738
+ /* @__PURE__ */ jsx(Badge, { variant: "default", children: "Default" }),
2739
+ /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: "Secondary" }),
2740
+ /* @__PURE__ */ jsx(Badge, { variant: "outline", children: "Outline" }),
2741
+ /* @__PURE__ */ jsx(Badge, { variant: "destructive", children: "Destructive" }),
2742
+ /* @__PURE__ */ jsx(Badge, { className: "bg-success text-success-foreground", children: "Success" }),
2743
+ /* @__PURE__ */ jsx(Badge, { className: "bg-warning text-warning-foreground", children: "Warning" }),
2744
+ /* @__PURE__ */ jsx(Badge, { className: "bg-info text-info-foreground", children: "Info" })
2745
+ ] }) })
2746
+ ] })
2747
+ ] }),
2748
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2749
+ /* @__PURE__ */ jsxs("section", { children: [
2750
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.dialogs") }),
2751
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [
2752
+ /* @__PURE__ */ jsxs(Card, { children: [
2753
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2754
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.dialogs.dialogTitle") }),
2755
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.dialogs.dialogDescription") })
2756
+ ] }),
2757
+ /* @__PURE__ */ jsx(CardContent, { className: "flex justify-center py-6", children: /* @__PURE__ */ jsxs(Dialog, { children: [
2758
+ /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", children: t("templates.dialogs.editProfile") }) }),
2759
+ /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [
2760
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
2761
+ /* @__PURE__ */ jsx(DialogTitle, { children: t("templates.dialogs.editProfile") }),
2762
+ /* @__PURE__ */ jsx(DialogDescription, { children: t("templates.dialogs.editProfileDescription") })
2763
+ ] }),
2764
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 py-4", children: [
2765
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [
2766
+ /* @__PURE__ */ jsx(Label, { htmlFor: "name", className: "text-right", children: t("templates.dialogs.name") }),
2767
+ /* @__PURE__ */ jsx(Input, { id: "name", defaultValue: "John Doe", className: "col-span-3" })
2768
+ ] }),
2769
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [
2770
+ /* @__PURE__ */ jsx(Label, { htmlFor: "username", className: "text-right", children: t("templates.dialogs.username") }),
2771
+ /* @__PURE__ */ jsx(Input, { id: "username", defaultValue: "@johndoe", className: "col-span-3" })
2772
+ ] })
2773
+ ] }),
2774
+ /* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsx(Button, { type: "submit", children: t("templates.dialogs.update") }) })
2775
+ ] })
2776
+ ] }) })
2777
+ ] }),
2778
+ /* @__PURE__ */ jsxs(Card, { children: [
2779
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2780
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.dialogs.alertDialogTitle") }),
2781
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.dialogs.alertDialogDescription") })
2782
+ ] }),
2783
+ /* @__PURE__ */ jsx(CardContent, { className: "flex justify-center py-6", children: /* @__PURE__ */ jsxs(AlertDialog, { children: [
2784
+ /* @__PURE__ */ jsx(AlertDialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "destructive", children: t("templates.dialogs.deleteAccount") }) }),
2785
+ /* @__PURE__ */ jsxs(AlertDialogContent, { className: "sm:max-w-[425px]", children: [
2786
+ /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
2787
+ /* @__PURE__ */ jsx(AlertDialogTitle, { children: t("templates.dialogs.areYouSure") }),
2788
+ /* @__PURE__ */ jsx(AlertDialogDescription, { children: t("templates.dialogs.deleteWarning") })
2789
+ ] }),
2790
+ /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
2791
+ /* @__PURE__ */ jsx(AlertDialogCancel, { children: t("templates.dialogs.cancel") }),
2792
+ /* @__PURE__ */ jsx(AlertDialogAction, { className: "bg-destructive text-destructive-foreground hover:bg-destructive/90", children: t("templates.dialogs.continue") })
2793
+ ] })
2794
+ ] })
2795
+ ] }) })
2796
+ ] })
2797
+ ] })
2798
+ ] }),
2799
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2800
+ /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsx(MapShowcase, {}) }),
2801
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2802
+ /* @__PURE__ */ jsxs("section", { children: [
2803
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.headerVariations.sectionTitle") }),
2804
+ /* @__PURE__ */ jsxs(Card, { children: [
2805
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2806
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.headerVariations.cardTitle") }),
2807
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.headerVariations.cardDescription") })
2808
+ ] }),
2809
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-6", children: [
2810
+ /* @__PURE__ */ jsxs("div", { className: "p-4 border rounded-[var(--radius-lg)] bg-muted/30", children: [
2811
+ /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold mb-4", children: t("templates.headerVariations.visibleElements") }),
2812
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-6", children: [
2813
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2814
+ /* @__PURE__ */ jsx(
2815
+ Switch,
2816
+ {
2817
+ id: "header-actions",
2818
+ checked: showHeaderActions,
2819
+ onCheckedChange: setShowHeaderActions
2820
+ }
2821
+ ),
2822
+ /* @__PURE__ */ jsx(Label, { htmlFor: "header-actions", className: "cursor-pointer", children: t("templates.headerVariations.actionButtons") })
2823
+ ] }),
2824
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2825
+ /* @__PURE__ */ jsx(
2826
+ Switch,
2827
+ {
2828
+ id: "header-bread",
2829
+ checked: showHeaderBreadcrumbs,
2830
+ onCheckedChange: setShowHeaderBreadcrumbs
2831
+ }
2832
+ ),
2833
+ /* @__PURE__ */ jsx(Label, { htmlFor: "header-bread", className: "cursor-pointer", children: t("templates.headerVariations.breadcrumbsLabel") })
2834
+ ] })
2835
+ ] })
2836
+ ] }),
2837
+ /* @__PURE__ */ jsxs("div", { className: "relative border rounded-[var(--radius-lg)] bg-muted/10 overflow-hidden shadow-inner", children: [
2838
+ /* @__PURE__ */ jsx("div", { className: "p-4 bg-background/50 border-b text-xs font-mono text-muted-foreground", children: t("templates.headerVariations.preview") }),
2839
+ /* @__PURE__ */ jsx(
2840
+ Header,
2841
+ {
2842
+ title: !showHeaderBreadcrumbs ? t("templates.headerVariations.currentPage") : void 0,
2843
+ breadcrumbs: showHeaderBreadcrumbs ? [
2844
+ {
2845
+ label: t("templates.headerVariations.breadcrumbBrand"),
2846
+ href: "#",
2847
+ icon: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" })
2848
+ },
2849
+ {
2850
+ label: t("templates.headerVariations.breadcrumbSettings"),
2851
+ href: "#"
2852
+ },
2853
+ { label: t("templates.headerVariations.breadcrumbProfile") }
2854
+ ] : void 0,
2855
+ actions: showHeaderActions ? [
2856
+ {
2857
+ id: "notify",
2858
+ icon: /* @__PURE__ */ jsx(Bell, { className: "w-5 h-5" }),
2859
+ onClick: () => toast(t("templates.headerVariations.notificationsOpenedToast"))
2860
+ },
2861
+ {
2862
+ id: "mail",
2863
+ label: t("templates.headerVariations.messagesLabel"),
2864
+ icon: /* @__PURE__ */ jsx(Mail, { className: "w-5 h-5" }),
2865
+ onClick: () => toast(t("templates.headerVariations.messagesOpenedToast"))
2866
+ }
2867
+ ] : void 0
2868
+ }
2869
+ ),
2870
+ /* @__PURE__ */ jsx("div", { className: "h-32 flex items-center justify-center text-muted-foreground text-sm italic", children: t("templates.headerVariations.contentArea") })
2871
+ ] })
2872
+ ] })
2873
+ ] })
2874
+ ] }),
2875
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
2876
+ /* @__PURE__ */ jsxs("section", { children: [
2877
+ /* @__PURE__ */ jsx("h3", { className: "mb-4", children: t("templates.sections.sidebarVariations") }),
2878
+ /* @__PURE__ */ jsxs(Card, { children: [
2879
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
2880
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.sidebar.title") }),
2881
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.sidebar.description") })
2882
+ ] }),
2883
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: "assistant", className: "w-full", children: [
2884
+ /* @__PURE__ */ jsxs(TabsList, { className: "mb-4", children: [
2885
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "assistant", children: t("templates.sidebar.assistantMode") }),
2886
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "default", children: t("templates.sidebar.defaultMode") })
2887
+ ] }),
2888
+ /* @__PURE__ */ jsxs("div", { className: "mb-6 p-4 border rounded-[var(--radius-lg)] bg-muted/30", children: [
2889
+ /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold mb-4", children: t("templates.sidebarControls.footerSettings") }),
2890
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-6 mt-2", children: [
2891
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2892
+ /* @__PURE__ */ jsx(
2893
+ Switch,
2894
+ {
2895
+ id: "show-user",
2896
+ checked: showSidebarUser,
2897
+ onCheckedChange: setShowSidebarUser
2898
+ }
2899
+ ),
2900
+ /* @__PURE__ */ jsx(Label, { htmlFor: "show-user", className: "cursor-pointer", children: t("templates.sidebarControls.userProfile") })
2901
+ ] }),
2902
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2903
+ /* @__PURE__ */ jsx(
2904
+ Switch,
2905
+ {
2906
+ id: "show-settings",
2907
+ checked: showSidebarSettings,
2908
+ onCheckedChange: setShowSidebarSettings
2909
+ }
2910
+ ),
2911
+ /* @__PURE__ */ jsx(Label, { htmlFor: "show-settings", className: "cursor-pointer", children: t("templates.sidebarControls.settings") })
2912
+ ] }),
2913
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
2914
+ /* @__PURE__ */ jsx(
2915
+ Switch,
2916
+ {
2917
+ id: "show-logout",
2918
+ checked: showSidebarLogout,
2919
+ onCheckedChange: setShowSidebarLogout
2920
+ }
2921
+ ),
2922
+ /* @__PURE__ */ jsx(Label, { htmlFor: "show-logout", className: "cursor-pointer", children: t("templates.sidebarControls.logoutButton") })
2923
+ ] })
2924
+ ] }),
2925
+ /* @__PURE__ */ jsxs("div", { className: "mt-6 pt-6 border-t", children: [
2926
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-4", children: [
2927
+ /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold", children: t("templates.sidebarControls.sidebarWidthDesktop") }),
2928
+ /* @__PURE__ */ jsxs("span", { className: "text-xs font-mono bg-muted px-2 py-1 rounded", children: [
2929
+ sidebarWidth,
2930
+ "px"
2931
+ ] })
2932
+ ] }),
2933
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
2934
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground w-12 text-right", children: "240px" }),
2935
+ /* @__PURE__ */ jsx(
2936
+ Slider,
2937
+ {
2938
+ value: [sidebarWidth],
2939
+ onValueChange: (val) => setSidebarWidth(val[0]),
2940
+ min: 240,
2941
+ max: 450,
2942
+ step: 10,
2943
+ className: "flex-1",
2944
+ "aria-label": t("templates.sidebarControls.sidebarWidthAriaLabel")
2945
+ }
2946
+ ),
2947
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground w-12", children: "450px" })
2948
+ ] })
2949
+ ] })
2950
+ ] }),
2951
+ /* @__PURE__ */ jsx(TabsContent, { value: "assistant", children: /* @__PURE__ */ jsxs(
2952
+ "div",
2953
+ {
2954
+ className: "relative h-[600px] border rounded-[var(--radius-lg)] bg-muted/20 overflow-hidden",
2955
+ style: { transform: "translateZ(0)" },
2956
+ children: [
2957
+ /* @__PURE__ */ jsx(
2958
+ Sidebar,
2959
+ {
2960
+ expanded: true,
2961
+ width: sidebarWidth,
2962
+ onToggle: () => {
2963
+ },
2964
+ user: { email: "admin@xertica.com" },
2965
+ onLogout: () => toast(t("templates.sidebar.logoutToast")),
2966
+ location: { pathname: "/assistant/current" },
2967
+ navigate: () => {
2968
+ },
2969
+ variant: "assistant",
2970
+ search: {
2971
+ show: true,
2972
+ placeholder: t("templates.sidebar.searchTopicsPlaceholder"),
2973
+ filter: {
2974
+ show: true,
2975
+ content: /* @__PURE__ */ jsxs("div", { className: "p-2 space-y-2", children: [
2976
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase text-muted-foreground px-2", children: t("templates.sidebarControls.filterByStatus") }),
2977
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2 p-1", children: [
2978
+ /* @__PURE__ */ jsx(Badge, { className: "bg-sidebar-foreground/20 text-sidebar-foreground border-none cursor-pointer hover:bg-sidebar-foreground/30", children: t("templates.sidebarControls.filterActive") }),
2979
+ /* @__PURE__ */ jsx(
2980
+ Badge,
2981
+ {
2982
+ variant: "outline",
2983
+ className: "text-sidebar-foreground/70 border-sidebar-foreground/20 cursor-pointer hover:bg-sidebar-foreground/10",
2984
+ children: t("templates.sidebarControls.filterArchived")
2985
+ }
2986
+ ),
2987
+ /* @__PURE__ */ jsx(
2988
+ Badge,
2989
+ {
2990
+ variant: "outline",
2991
+ className: "text-sidebar-foreground/70 border-sidebar-foreground/20 cursor-pointer hover:bg-sidebar-foreground/10",
2992
+ children: t("templates.sidebarControls.filterPending")
2993
+ }
2994
+ )
2995
+ ] })
2996
+ ] })
2997
+ }
2998
+ },
2999
+ fixedArea: {
3000
+ show: true,
3001
+ 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: [
3002
+ /* @__PURE__ */ jsx(Plus, { className: "w-4 h-4 mr-2" }),
3003
+ t("templates.sidebar.newConversation")
3004
+ ] })
3005
+ },
3006
+ navigationGroups: [
3007
+ {
3008
+ id: "recent",
3009
+ label: t("templates.sidebar.recent"),
3010
+ icon: Clock,
3011
+ items: [
3012
+ {
3013
+ path: "/assistant/refatoracao",
3014
+ label: t("templates.sidebar.items.sidebarRefactor"),
3015
+ description: t(
3016
+ "templates.sidebar.items.sidebarRefactorDescription"
3017
+ ),
3018
+ actions: [
3019
+ {
3020
+ label: t("templates.sidebar.actions.rename"),
3021
+ icon: FileEdit,
3022
+ onClick: () => toast(t("templates.sidebar.actions.renameToast"))
3023
+ },
3024
+ {
3025
+ label: t("templates.sidebar.actions.move"),
3026
+ icon: ArrowRightLeft,
3027
+ children: [
3028
+ {
3029
+ label: t("templates.sidebar.actions.moveActive"),
3030
+ onClick: () => toast(t("templates.sidebar.actions.moveActiveToast"))
3031
+ },
3032
+ {
3033
+ label: t("templates.sidebar.actions.moveMonitoring"),
3034
+ onClick: () => toast(
3035
+ t("templates.sidebar.actions.moveMonitoringToast")
3036
+ )
3037
+ },
3038
+ {
3039
+ label: t("templates.sidebar.actions.moveArchive"),
3040
+ onClick: () => toast(
3041
+ t("templates.sidebar.actions.moveArchiveToast")
3042
+ )
3043
+ }
3044
+ ]
3045
+ },
3046
+ {
3047
+ label: t("templates.sidebar.actions.clear"),
3048
+ icon: Trash2,
3049
+ onClick: () => toast(t("templates.sidebar.actions.clearToast")),
3050
+ variant: "destructive"
3051
+ }
3052
+ ]
3053
+ }
3054
+ ]
3055
+ },
3056
+ {
3057
+ id: "projects",
3058
+ label: t("templates.sidebar.constructionMonitoring"),
3059
+ icon: Map$1,
3060
+ actions: [
3061
+ {
3062
+ label: t("templates.sidebar.actions.newCategory"),
3063
+ icon: Plus,
3064
+ onClick: () => toast(t("templates.sidebar.actions.newCategoryToast"))
3065
+ },
3066
+ {
3067
+ label: t("templates.sidebar.actions.archiveGroup"),
3068
+ icon: Archive,
3069
+ onClick: () => toast(t("templates.sidebar.actions.archiveGroupToast"))
3070
+ }
3071
+ ],
3072
+ items: [
3073
+ {
3074
+ path: "/assistant/br163",
3075
+ label: t("templates.sidebar.items.br163Restoration"),
3076
+ icon: () => /* @__PURE__ */ jsx("div", { className: "w-2 h-2 rounded-full bg-yellow-500" }),
3077
+ description: /* @__PURE__ */ jsxs("div", { className: "space-y-1.5 min-w-[160px]", children: [
3078
+ /* @__PURE__ */ jsx(
3079
+ Progress,
3080
+ {
3081
+ value: 67,
3082
+ className: "h-1.5 bg-sidebar-foreground/10"
3083
+ }
3084
+ ),
3085
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center text-[10px] text-sidebar-foreground/60", children: [
3086
+ /* @__PURE__ */ jsx("span", { children: t("templates.sidebar.items.br163Location") }),
3087
+ /* @__PURE__ */ jsx("span", { children: "67%" })
3088
+ ] })
3089
+ ] })
3090
+ }
3091
+ ]
3092
+ }
3093
+ ],
3094
+ footer: {
3095
+ showUser: showSidebarUser,
3096
+ showSettings: showSidebarSettings,
3097
+ showLogout: showSidebarLogout
3098
+ }
3099
+ }
3100
+ ),
3101
+ /* @__PURE__ */ jsx(
3102
+ "div",
3103
+ {
3104
+ className: "absolute inset-y-0 right-0 p-8 flex items-center justify-center transition-all duration-300",
3105
+ style: { left: `${sidebarWidth}px` },
3106
+ children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-center", children: t("templates.sidebar.assistantContent") })
3107
+ }
3108
+ )
3109
+ ]
3110
+ }
3111
+ ) }),
3112
+ /* @__PURE__ */ jsx(TabsContent, { value: "default", children: /* @__PURE__ */ jsxs(
3113
+ "div",
3114
+ {
3115
+ className: "relative h-[600px] border rounded-[var(--radius-lg)] bg-muted/20 overflow-hidden",
3116
+ style: { transform: "translateZ(0)" },
3117
+ children: [
3118
+ /* @__PURE__ */ jsx(
3119
+ Sidebar,
3120
+ {
3121
+ expanded: true,
3122
+ width: sidebarWidth,
3123
+ onToggle: () => {
3124
+ },
3125
+ user: {
3126
+ name: "Ariel Santos",
3127
+ email: "admin@xertica.com",
3128
+ avatar: "https://github.com/shadcn.png"
3129
+ },
3130
+ onLogout: () => toast(t("templates.sidebar.logoutToast")),
3131
+ onSettingsClick: () => toast(t("templates.sidebar.settingsClickedToast")),
3132
+ location: { pathname: "/home" },
3133
+ navigate: () => {
3134
+ },
3135
+ variant: "default",
3136
+ routes: [
3137
+ {
3138
+ path: "/home",
3139
+ label: t("templates.sidebar.routes.home"),
3140
+ icon: Home
3141
+ },
3142
+ {
3143
+ path: "/dashboard",
3144
+ label: t("templates.sidebar.routes.dashboard"),
3145
+ icon: Users
3146
+ },
3147
+ {
3148
+ path: "/settings",
3149
+ label: t("templates.sidebar.routes.settings"),
3150
+ icon: Settings
3151
+ }
3152
+ ],
3153
+ footer: {
3154
+ showUser: showSidebarUser,
3155
+ showSettings: showSidebarSettings,
3156
+ showLogout: showSidebarLogout
3157
+ }
3158
+ }
3159
+ ),
3160
+ /* @__PURE__ */ jsx(
3161
+ "div",
3162
+ {
3163
+ className: "absolute inset-y-0 right-0 p-8 flex items-center justify-center transition-all duration-300",
3164
+ style: { left: `${sidebarWidth}px` },
3165
+ children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-center", children: t("templates.sidebar.defaultContent") })
3166
+ }
3167
+ )
3168
+ ]
3169
+ }
3170
+ ) })
3171
+ ] }) })
3172
+ ] })
3173
+ ] }),
3174
+ /* @__PURE__ */ jsx(Separator, { className: "my-8" }),
3175
+ /* @__PURE__ */ jsxs(Card, { className: "mt-8", children: [
3176
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
3177
+ /* @__PURE__ */ jsx(CardTitle, { children: t("templates.footer.title") }),
3178
+ /* @__PURE__ */ jsx(CardDescription, { children: t("templates.footer.subtitle") })
3179
+ ] }),
3180
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
3181
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
3182
+ t("templates.footer.descriptionPart1"),
3183
+ /* @__PURE__ */ jsx("code", { className: "bg-muted px-2 py-1 rounded-[var(--radius-sm)] [font-size:var(--text-small)]", children: "xertica-ui" }),
3184
+ t("templates.footer.descriptionPart2")
3185
+ ] }),
3186
+ /* @__PURE__ */ jsxs(Alert, { variant: "info", children: [
3187
+ /* @__PURE__ */ jsx(AlertTitle, { children: t("templates.footer.tipTitle") }),
3188
+ /* @__PURE__ */ jsxs(AlertDescription, { children: [
3189
+ t("templates.footer.tipDescriptionPart1"),
3190
+ /* @__PURE__ */ jsx("code", { className: "bg-muted px-1 rounded", children: "styles/xertica/tokens.css" }),
3191
+ t("templates.footer.tipDescriptionPart2")
3192
+ ] })
3193
+ ] })
3194
+ ] })
3195
+ ] })
3196
+ ] }) }) }) })
3197
+ ]
3198
+ }
3199
+ );
3200
+ }
3201
+
3202
+ function TemplatePage() {
3203
+ const { user, logout } = useAuth();
3204
+ const layout = useOptionalLayout();
3205
+ const [localSidebarExpanded, setLocalSidebarExpanded] = React__default.useState(false);
3206
+ const [localAssistantExpanded, setLocalAssistantExpanded] = React__default.useState(false);
3207
+ const sidebarExpanded = layout?.sidebarExpanded ?? localSidebarExpanded;
3208
+ const sidebarWidth = layout?.sidebarWidth ?? 280;
3209
+ const assistenteExpanded = layout?.assistenteExpanded ?? localAssistantExpanded;
3210
+ const toggleSidebar = layout?.toggleSidebar ?? (() => setLocalSidebarExpanded((value) => !value));
3211
+ const toggleAssistente = layout?.toggleAssistente ?? (() => setLocalAssistantExpanded((value) => !value));
3212
+ const location = useLocation();
3213
+ const navigate = useNavigate();
3214
+ return /* @__PURE__ */ jsxs("div", { className: "h-screen flex bg-muted overflow-hidden relative", children: [
3215
+ /* @__PURE__ */ jsx(
3216
+ Sidebar,
3217
+ {
3218
+ expanded: sidebarExpanded,
3219
+ width: sidebarWidth,
3220
+ onToggle: toggleSidebar,
3221
+ user: {
3222
+ ...user,
3223
+ name: "Ariel Santos",
3224
+ avatar: "https://github.com/shadcn.png"
3225
+ },
3226
+ onLogout: logout,
3227
+ onSettingsClick: () => navigate("/settings"),
3228
+ location,
3229
+ navigate,
3230
+ routes
3231
+ }
3232
+ ),
3233
+ /* @__PURE__ */ jsx(TemplateContent, {}),
3234
+ /* @__PURE__ */ jsx(
3235
+ XerticaAssistant,
3236
+ {
3237
+ isExpanded: assistenteExpanded,
3238
+ onToggle: toggleAssistente,
3239
+ onEvaluation: () => {
3240
+ }
3241
+ }
3242
+ )
3243
+ ] });
3244
+ }
3245
+
3246
+ function VerifyEmailPage() {
3247
+ const navigate = useNavigate();
3248
+ const location = useLocation();
3249
+ const { t } = useTranslation();
3250
+ const email = location.state?.email || "your@email.com";
3251
+ const [isResending, setIsResending] = useState(false);
3252
+ const [resendSuccess, setResendSuccess] = useState(false);
3253
+ const handleResend = async () => {
3254
+ setIsResending(true);
3255
+ setResendSuccess(false);
3256
+ await new Promise((resolve) => setTimeout(resolve, 1500));
3257
+ setIsResending(false);
3258
+ setResendSuccess(true);
3259
+ setTimeout(() => setResendSuccess(false), 3e3);
3260
+ };
3261
+ const handleSocialLogin = (_provider) => {
3262
+ };
3263
+ return /* @__PURE__ */ jsxs(
3264
+ AuthPageShell,
3265
+ {
3266
+ imageSrc: "https://images.unsplash.com/photo-1563986768609-322da13575f3?w=1200&h=800&fit=crop&auto=format",
3267
+ imageAlt: t("verifyEmail.heroImageAlt"),
3268
+ children: [
3269
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
3270
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(XerticaLogo, { className: "h-12 w-auto text-primary dark:text-foreground", variant: "theme" }) }),
3271
+ /* @__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" }) }) }),
3272
+ /* @__PURE__ */ jsx("h2", { className: "text-sm text-muted-foreground", children: t("verifyEmail.heading") }),
3273
+ /* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: t("verifyEmail.instructionsSent") }),
3274
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-primary", children: email })
3275
+ ] }),
3276
+ /* @__PURE__ */ jsxs("div", { className: "bg-accent rounded-[var(--radius)] p-4 space-y-3", children: [
3277
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t("verifyEmail.instructions") }),
3278
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-muted-foreground", children: [
3279
+ /* @__PURE__ */ jsx(CheckCircle2, { className: "w-4 h-4 mt-0.5 flex-shrink-0 text-[var(--chart-2)]" }),
3280
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: t("verifyEmail.checkSpam") })
3281
+ ] })
3282
+ ] }),
3283
+ 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: [
3284
+ /* @__PURE__ */ jsx(CheckCircle2, { className: "w-5 h-5 text-[var(--chart-2)] flex-shrink-0" }),
3285
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-[var(--chart-2)]", children: t("verifyEmail.resentSuccess") })
3286
+ ] }),
3287
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
3288
+ /* @__PURE__ */ jsx("p", { className: "text-center text-muted-foreground", children: t("verifyEmail.notReceived") }),
3289
+ /* @__PURE__ */ jsx(Button, { variant: "outline", className: "w-full", onClick: handleResend, disabled: isResending, children: isResending ? t("verifyEmail.resending") : t("verifyEmail.resend") }),
3290
+ /* @__PURE__ */ jsxs(
3291
+ Button,
3292
+ {
3293
+ type: "button",
3294
+ onClick: () => navigate("/login"),
3295
+ variant: "outline",
3296
+ className: "w-full text-muted-foreground hover:text-foreground",
3297
+ children: [
3298
+ /* @__PURE__ */ jsx(ArrowLeft, { className: "w-4 h-4 mr-2" }),
3299
+ t("verifyEmail.backToLogin")
3300
+ ]
3301
+ }
3302
+ )
3303
+ ] }),
3304
+ /* @__PURE__ */ jsx(SocialLoginButtons, { onSocialLogin: handleSocialLogin })
3305
+ ]
3306
+ }
3307
+ );
3308
+ }
3309
+
3310
+ export { ForgotPasswordPage as F, HomeContent as H, LandingPage as L, ResetPasswordPage as R, TemplateContent as T, VerifyEmailPage as V, HomePage as a, LoginPage as b, TemplatePage as c };