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