xertica-ui 2.5.3 → 2.7.0

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