xertica-ui 2.6.0 → 2.8.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 (304) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +20 -12
  3. package/bin/generate-tokens.ts +25 -9
  4. package/components/assistant/xertica-assistant/use-assistant.ts +5 -6
  5. package/components/assistant/xertica-assistant/xertica-assistant.tsx +1 -1
  6. package/{templates/src/features/auth/ui → components/blocks/auth}/AuthPageShell.tsx +8 -3
  7. package/components/blocks/auth/PasswordStrengthMeter.tsx +41 -0
  8. package/components/blocks/auth/SocialLoginButtons.tsx +95 -0
  9. package/components/blocks/auth/index.ts +11 -0
  10. package/components/blocks/auth/usePasswordStrength.ts +13 -0
  11. package/components/blocks/index.ts +1 -0
  12. package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +45 -139
  13. package/components/pages/login-page/LoginPage.tsx +52 -145
  14. package/components/pages/reset-password-page/ResetPasswordPage.tsx +79 -169
  15. package/components/pages/verify-email-page/VerifyEmailPage.tsx +48 -150
  16. package/components/ui/button/button.test.tsx +2 -2
  17. package/components/ui/button/button.tsx +6 -6
  18. package/components/ui/card/card.tsx +14 -2
  19. package/components/ui/input/input.tsx +1 -1
  20. package/components/ui/input-otp/input-otp.tsx +1 -1
  21. package/components/ui/search/search.tsx +1 -1
  22. package/components/ui/select/select.tsx +2 -2
  23. package/components/ui/switch/switch.tsx +1 -1
  24. package/components/ui/textarea/textarea.tsx +1 -1
  25. package/contexts/BrandColorsContext.tsx +50 -2
  26. package/contexts/theme-data.ts +100 -3
  27. package/dist/AssistantChart-BFBJXVcm.js +3383 -0
  28. package/dist/AssistantChart-BTnE94FR.cjs +3551 -0
  29. package/dist/AssistantChart-BvccsQMx.cjs +3551 -0
  30. package/dist/AssistantChart-CImCNLfD.cjs +3551 -0
  31. package/dist/AssistantChart-CkskcBVD.js +3383 -0
  32. package/dist/AssistantChart-CrPkO9ip.js +3383 -0
  33. package/dist/AssistantChart-DKz2O1R8.cjs +3551 -0
  34. package/dist/AssistantChart-DYL6UEvo.cjs +3551 -0
  35. package/dist/AssistantChart-DfdIfmQr.js +3383 -0
  36. package/dist/AssistantChart-keo-ogKi.js +3383 -0
  37. package/dist/AudioPlayer-AoU5MTiM.cjs +1282 -0
  38. package/dist/AudioPlayer-Bx1vrblm.js +1278 -0
  39. package/dist/AudioPlayer-D0-I6J3J.cjs +1282 -0
  40. package/dist/AudioPlayer-DIWX_Yg7.cjs +1282 -0
  41. package/dist/AudioPlayer-DrWJnS7c.js +1278 -0
  42. package/dist/AudioPlayer-_P-Z7pAK.js +1278 -0
  43. package/dist/BrandColorsContext-B25Bpr3b.cjs +819 -0
  44. package/dist/BrandColorsContext-BCieATdW.js +812 -0
  45. package/dist/BrandColorsContext-DP0DXAXS.js +824 -0
  46. package/dist/BrandColorsContext-DjpC9wR_.cjs +798 -0
  47. package/dist/BrandColorsContext-MpXFhte7.cjs +831 -0
  48. package/dist/BrandColorsContext-V3tOc-Zw.js +791 -0
  49. package/dist/CodeBlock-CK4rO6lM.js +221 -0
  50. package/dist/CodeBlock-CKXamfVd.cjs +223 -0
  51. package/dist/CodeBlock-CVmE7isS.cjs +223 -0
  52. package/dist/CodeBlock-D7i5-cMv.js +221 -0
  53. package/dist/CodeBlock-Dg56j2ut.cjs +223 -0
  54. package/dist/CodeBlock-Dt6nUQoo.js +221 -0
  55. package/dist/CustomTooltipContent-Bxynuq7T.js +33 -0
  56. package/dist/CustomTooltipContent-BzjOSA0P.cjs +54 -0
  57. package/dist/CustomTooltipContent-C-ZeCNsf.js +33 -0
  58. package/dist/CustomTooltipContent-CON_QrXm.cjs +54 -0
  59. package/dist/CustomTooltipContent-UR_n2QfW.js +33 -0
  60. package/dist/CustomTooltipContent-v1SXjoFn.cjs +54 -0
  61. package/dist/FeatureCard-4n_8a63v.cjs +497 -0
  62. package/dist/FeatureCard-BLiAWT3w.js +485 -0
  63. package/dist/FeatureCard-BXRW97Ef.cjs +497 -0
  64. package/dist/FeatureCard-BhpfmPPx.js +485 -0
  65. package/dist/FeatureCard-CDgLlWE2.js +485 -0
  66. package/dist/FeatureCard-CgQ8lq-I.cjs +497 -0
  67. package/dist/FeatureCard-Cp8cVC6T.cjs +497 -0
  68. package/dist/FeatureCard-D-5yS_OD.cjs +497 -0
  69. package/dist/FeatureCard-D0MwrTRP.js +485 -0
  70. package/dist/FeatureCard-uE5i0in_.js +485 -0
  71. package/dist/ImageWithFallback-BOh1FM3I.js +98 -0
  72. package/dist/ImageWithFallback-BQO7952C.js +98 -0
  73. package/dist/ImageWithFallback-BkMXHCvV.cjs +122 -0
  74. package/dist/ImageWithFallback-C72nwszA.cjs +122 -0
  75. package/dist/ImageWithFallback-CCUMDuEC.cjs +122 -0
  76. package/dist/ImageWithFallback-CfkAkctC.cjs +122 -0
  77. package/dist/ImageWithFallback-DQD5TTlY.js +98 -0
  78. package/dist/ImageWithFallback-bw-CxxDc.js +98 -0
  79. package/dist/LanguageContext-CX_zdxre.js +1912 -0
  80. package/dist/LanguageContext-CjhSSqJT.cjs +1917 -0
  81. package/dist/LanguageSelector-1XhM7R1i.cjs +48 -0
  82. package/dist/LanguageSelector-B3ZVNc55.js +46 -0
  83. package/dist/LanguageSelector-BR3Ss0k_.js +46 -0
  84. package/dist/LanguageSelector-CHOLPmHr.cjs +48 -0
  85. package/dist/LanguageSelector-Cj6zl0CM.js +46 -0
  86. package/dist/LanguageSelector-DK1zD4VH.cjs +48 -0
  87. package/dist/LanguageSelector-DseCAa0p.cjs +48 -0
  88. package/dist/LanguageSelector-Du09anfM.js +46 -0
  89. package/dist/LanguageSelector-PZHlFfEs.cjs +48 -0
  90. package/dist/LanguageSelector-SB-NJSmx.js +46 -0
  91. package/dist/PasswordStrengthMeter-B3S6i_k4.cjs +179 -0
  92. package/dist/PasswordStrengthMeter-B8ky1nJI.js +173 -0
  93. package/dist/PasswordStrengthMeter-C5VEopH-.cjs +179 -0
  94. package/dist/PasswordStrengthMeter-C8irs0G1.js +173 -0
  95. package/dist/PasswordStrengthMeter-CIm7_jNT.js +173 -0
  96. package/dist/PasswordStrengthMeter-DKSAbQzu.js +173 -0
  97. package/dist/PasswordStrengthMeter-DxLu54p-.cjs +179 -0
  98. package/dist/PasswordStrengthMeter-MLzhax-d.cjs +179 -0
  99. package/dist/PasswordStrengthMeter-k-e9Pole.cjs +179 -0
  100. package/dist/PasswordStrengthMeter-pAi2viq5.js +173 -0
  101. package/dist/ThemeContext-CEY9pCn-.cjs +86 -0
  102. package/dist/ThemeContext-Dk3tH7Ym.js +83 -0
  103. package/dist/ThemeToggle-4pQbVkpK.js +215 -0
  104. package/dist/ThemeToggle-B6rIVLvC.cjs +219 -0
  105. package/dist/ThemeToggle-BUOTps5l.cjs +219 -0
  106. package/dist/ThemeToggle-BpM_iHh8.js +215 -0
  107. package/dist/ThemeToggle-CO5mPl6e.js +215 -0
  108. package/dist/ThemeToggle-CZRlv0d4.cjs +219 -0
  109. package/dist/ThemeToggle-DbZQ0JSV.cjs +219 -0
  110. package/dist/ThemeToggle-vLXEq2TS.js +215 -0
  111. package/dist/VerifyEmailPage-BKiaw2YK.js +2954 -0
  112. package/dist/VerifyEmailPage-BTjI2c9n.js +2954 -0
  113. package/dist/VerifyEmailPage-Beaicc6V.cjs +2963 -0
  114. package/dist/VerifyEmailPage-BehPBp0F.cjs +2963 -0
  115. package/dist/VerifyEmailPage-CJGfDSOx.js +2954 -0
  116. package/dist/VerifyEmailPage-DOlZUNc0.cjs +2963 -0
  117. package/dist/VerifyEmailPage-DQPRl_RJ.js +2954 -0
  118. package/dist/VerifyEmailPage-Djb6hthM.js +2954 -0
  119. package/dist/VerifyEmailPage-DrdqMbLC.cjs +2963 -0
  120. package/dist/VerifyEmailPage-hyDfeCRa.cjs +2963 -0
  121. package/dist/VerifyEmailPage-kKSXl8vu.cjs +2963 -0
  122. package/dist/VerifyEmailPage-w4N-bDhU.js +2954 -0
  123. package/dist/XerticaOrbe-B9tegV1n.js +1925 -0
  124. package/dist/XerticaOrbe-BQ_NjwPS.cjs +1927 -0
  125. package/dist/XerticaOrbe-BdUX171Q.cjs +1927 -0
  126. package/dist/XerticaOrbe-BdlKXRHU.cjs +1927 -0
  127. package/dist/XerticaOrbe-CByPAFE5.js +1925 -0
  128. package/dist/XerticaOrbe-Ccu9eFMu.js +1925 -0
  129. package/dist/XerticaProvider-BVid1oqn.cjs +46 -0
  130. package/dist/XerticaProvider-BijpC_py.cjs +46 -0
  131. package/dist/XerticaProvider-Bz_YfNY4.js +44 -0
  132. package/dist/XerticaProvider-C2wDRQhT.js +44 -0
  133. package/dist/XerticaProvider-CtvYfRbZ.cjs +46 -0
  134. package/dist/XerticaProvider-DMiyExQS.js +44 -0
  135. package/dist/XerticaProvider-DP2lzKip.cjs +46 -0
  136. package/dist/XerticaProvider-De79hhgp.js +44 -0
  137. package/dist/XerticaProvider-Dkk1Vbsy.js +44 -0
  138. package/dist/XerticaProvider-EdzH9Nrw.cjs +46 -0
  139. package/dist/alert-dialog-9XYAn5z5.js +819 -0
  140. package/dist/alert-dialog-B281hud0.cjs +872 -0
  141. package/dist/alert-dialog-BVWbrcrw.cjs +872 -0
  142. package/dist/alert-dialog-B_Ko1xpu.js +819 -0
  143. package/dist/alert-dialog-BzIcTKn_.cjs +872 -0
  144. package/dist/alert-dialog-CIxE8T-J.cjs +872 -0
  145. package/dist/alert-dialog-DW-_iPuf.js +819 -0
  146. package/dist/alert-dialog-kty5pxQp.js +819 -0
  147. package/dist/assistant.cjs.js +2 -2
  148. package/dist/assistant.es.js +2 -2
  149. package/dist/avatar-BJwIMbZ_.js +54 -0
  150. package/dist/avatar-C4Zh5fAJ.cjs +77 -0
  151. package/dist/avatar-CTEUKZUT.js +54 -0
  152. package/dist/avatar-D1bZhlhL.cjs +77 -0
  153. package/dist/avatar-DKIxHeKG.cjs +77 -0
  154. package/dist/avatar-v16eZC8p.js +54 -0
  155. package/dist/blocks.cjs.js +7 -3
  156. package/dist/blocks.es.js +2 -2
  157. package/dist/brand.cjs.js +8 -7
  158. package/dist/brand.es.js +4 -3
  159. package/dist/breadcrumb-B1mUiaWB.cjs +98 -0
  160. package/dist/breadcrumb-BIRgmem-.js +90 -0
  161. package/dist/breadcrumb-BSng-oUf.cjs +98 -0
  162. package/dist/breadcrumb-CES7furU.js +90 -0
  163. package/dist/breadcrumb-CP275kbF.cjs +98 -0
  164. package/dist/breadcrumb-D7hr1EvJ.js +90 -0
  165. package/dist/button-BYtQygX5.cjs +85 -0
  166. package/dist/button-BnAW-a_w.js +62 -0
  167. package/dist/button-CUPDQews.js +62 -0
  168. package/dist/button-DFa-rtPy.js +62 -0
  169. package/dist/button-DV1G6XrI.cjs +85 -0
  170. package/dist/button-Kd9Fj53S.cjs +85 -0
  171. package/dist/cli.js +94 -10
  172. package/dist/components/blocks/auth/AuthPageShell.d.ts +12 -0
  173. package/dist/components/blocks/auth/PasswordStrengthMeter.d.ts +7 -0
  174. package/dist/components/blocks/auth/SocialLoginButtons.d.ts +8 -0
  175. package/dist/components/blocks/auth/index.d.ts +8 -0
  176. package/dist/components/blocks/auth/usePasswordStrength.d.ts +3 -0
  177. package/dist/components/blocks/index.d.ts +1 -0
  178. package/dist/components/pages/reset-password-page/ResetPasswordPage.d.ts +1 -1
  179. package/dist/components/ui/card/card.d.ts +11 -1
  180. package/dist/contexts/theme-data.d.ts +15 -1
  181. package/dist/dropdown-menu-B9wTZ0uX.cjs +225 -0
  182. package/dist/dropdown-menu-BeBtZOrs.cjs +225 -0
  183. package/dist/dropdown-menu-D7mRDGis.js +190 -0
  184. package/dist/dropdown-menu-D8ZmqHB7.js +190 -0
  185. package/dist/dropdown-menu-_AWBeOts.cjs +225 -0
  186. package/dist/dropdown-menu-qGzLO_HO.js +190 -0
  187. package/dist/hooks.cjs.js +6 -5
  188. package/dist/hooks.es.js +3 -2
  189. package/dist/index.cjs.js +42 -37
  190. package/dist/index.es.js +25 -24
  191. package/dist/input-B53E6K8G.js +65 -0
  192. package/dist/input-B7Q7vcoG.cjs +91 -0
  193. package/dist/input-BysqLMK1.js +65 -0
  194. package/dist/input-CStdFsaH.cjs +91 -0
  195. package/dist/input-CXYth6nW.cjs +91 -0
  196. package/dist/input-CX_fWE2D.cjs +91 -0
  197. package/dist/input-CitUVnEn.js +65 -0
  198. package/dist/input-wkBYTp-B.js +65 -0
  199. package/dist/layout.cjs.js +1 -1
  200. package/dist/layout.es.js +1 -1
  201. package/dist/media.cjs.js +1 -1
  202. package/dist/media.es.js +1 -1
  203. package/dist/pages.cjs.js +1 -1
  204. package/dist/pages.es.js +1 -1
  205. package/dist/rich-text-editor-BHiRUzWZ.js +2894 -0
  206. package/dist/rich-text-editor-BWMRUMJ2.js +2894 -0
  207. package/dist/rich-text-editor-BoE6Ks5x.cjs +2968 -0
  208. package/dist/rich-text-editor-BzuEwR_X.js +2894 -0
  209. package/dist/rich-text-editor-CcopGbQ-.js +2894 -0
  210. package/dist/rich-text-editor-CmxSRJIi.cjs +2968 -0
  211. package/dist/rich-text-editor-DyYAu28v.cjs +2968 -0
  212. package/dist/rich-text-editor-JS_eMQCC.cjs +2968 -0
  213. package/dist/select-BNfFJwYp.js +130 -0
  214. package/dist/select-CN8IDjGB.js +130 -0
  215. package/dist/select-CwRzQHA7.cjs +161 -0
  216. package/dist/select-CwgD3nMD.js +130 -0
  217. package/dist/select-DEHUm_AC.cjs +161 -0
  218. package/dist/select-DJDgpVm3.cjs +161 -0
  219. package/dist/select-DSLWQLmo.cjs +161 -0
  220. package/dist/select-YFx0wCYT.js +130 -0
  221. package/dist/sidebar-B7YzwAp3.js +1151 -0
  222. package/dist/sidebar-BF7JEL7U.js +1151 -0
  223. package/dist/sidebar-Bjr2doX5.cjs +1154 -0
  224. package/dist/sidebar-CMrNCmhb.cjs +1154 -0
  225. package/dist/sidebar-CO9x8AVn.cjs +1154 -0
  226. package/dist/sidebar-Cb0U7NsV.cjs +1154 -0
  227. package/dist/sidebar-Cn_KB4c6.js +1151 -0
  228. package/dist/sidebar-Db_C30ph.cjs +1154 -0
  229. package/dist/sidebar-miPHsRz4.js +1151 -0
  230. package/dist/sidebar-pZF8mLLu.js +1151 -0
  231. package/dist/skeleton-BX2XTjMO.cjs +87 -0
  232. package/dist/skeleton-BoLK0iV7.js +78 -0
  233. package/dist/skeleton-Bysq8yeB.js +79 -0
  234. package/dist/skeleton-C7nspYnC.cjs +87 -0
  235. package/dist/skeleton-DL4V5Vub.cjs +87 -0
  236. package/dist/skeleton-DSMhdqp1.js +78 -0
  237. package/dist/skeleton-DhJswvTW.cjs +88 -0
  238. package/dist/skeleton-DicUfozA.js +78 -0
  239. package/dist/slider-77T_Eqw4.js +56 -0
  240. package/dist/slider-B6puMLXS.cjs +78 -0
  241. package/dist/slider-B785N7lZ.js +56 -0
  242. package/dist/slider-C6yssKyZ.cjs +78 -0
  243. package/dist/slider-CKZO9gVh.cjs +78 -0
  244. package/dist/slider-Cn-ImSze.js +56 -0
  245. package/dist/tooltip-BiJVGob3.cjs +72 -0
  246. package/dist/tooltip-D2OPn-1v.cjs +72 -0
  247. package/dist/tooltip-DlCHQuh1.js +48 -0
  248. package/dist/tooltip-fQ2Va0G8.cjs +72 -0
  249. package/dist/tooltip-oAw00FX2.js +48 -0
  250. package/dist/tooltip-u147L0wD.js +48 -0
  251. package/dist/ui.cjs.js +17 -17
  252. package/dist/ui.es.js +13 -13
  253. package/dist/xertica-assistant-8fh8KA2K.js +2173 -0
  254. package/dist/xertica-assistant-BjfG3zyL.cjs +2180 -0
  255. package/dist/xertica-assistant-C2A0R94j.js +2173 -0
  256. package/dist/xertica-assistant-CSUprvTR.js +2173 -0
  257. package/dist/xertica-assistant-Caubm0HR.js +2173 -0
  258. package/dist/xertica-assistant-DEexPM2u.cjs +2180 -0
  259. package/dist/xertica-assistant-Dh1dmEx3.cjs +2180 -0
  260. package/dist/xertica-assistant-GGcyHEZG.cjs +2180 -0
  261. package/dist/xertica-assistant-USefPe2L.js +2173 -0
  262. package/dist/xertica-assistant-cwSHFwfv.cjs +2180 -0
  263. package/dist/xertica-ui.css +1 -1
  264. package/docs/i18n.md +2 -0
  265. package/package.json +3 -2
  266. package/styles/xertica/base.css +38 -0
  267. package/styles/xertica/tokens.css +9 -0
  268. package/templates/package.json +2 -2
  269. package/templates/src/app/App.tsx +5 -1
  270. package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +1 -2
  271. package/templates/src/features/auth/ui/LoginContent.tsx +1 -2
  272. package/templates/src/features/auth/ui/ResetPasswordContent.tsx +3 -57
  273. package/templates/src/features/auth/ui/VerifyEmailContent.tsx +1 -2
  274. package/templates/src/features/home/index.ts +0 -10
  275. package/templates/src/features/home/ui/HomeContent.tsx +19 -74
  276. package/templates/src/features/template/index.ts +0 -4
  277. package/templates/src/features/template/ui/TemplateContent.tsx +397 -1107
  278. package/templates/src/locales/en/pages/templates.json +70 -270
  279. package/templates/src/locales/es/pages/templates.json +77 -277
  280. package/templates/src/locales/pt-BR/pages/templates.json +77 -277
  281. package/templates/src/styles/xertica/tokens.css +9 -0
  282. package/templates/vite.config.ts +25 -0
  283. package/templates/src/features/auth/ui/SocialLoginButtons.tsx +0 -78
  284. package/templates/src/features/home/data/mock.ts +0 -41
  285. package/templates/src/features/home/hooks/useFeatureCards.ts +0 -20
  286. package/templates/src/features/home/store/dashboardStore.ts +0 -25
  287. package/templates/src/features/template/ui/CrudTemplate.tsx +0 -112
  288. package/templates/src/features/template/ui/DashboardTemplate.tsx +0 -110
  289. package/templates/src/features/template/ui/FormTemplate.tsx +0 -117
  290. package/templates/src/features/template/ui/LoginTemplate.tsx +0 -59
  291. package/templates/src/locales/en/pages/crudTemplate.json +0 -25
  292. package/templates/src/locales/en/pages/dashboardTemplate.json +0 -20
  293. package/templates/src/locales/en/pages/formTemplate.json +0 -16
  294. package/templates/src/locales/en/pages/loginTemplate.json +0 -9
  295. package/templates/src/locales/es/pages/crudTemplate.json +0 -25
  296. package/templates/src/locales/es/pages/dashboardTemplate.json +0 -20
  297. package/templates/src/locales/es/pages/formTemplate.json +0 -16
  298. package/templates/src/locales/es/pages/loginTemplate.json +0 -9
  299. package/templates/src/locales/pt-BR/pages/crudTemplate.json +0 -25
  300. package/templates/src/locales/pt-BR/pages/dashboardTemplate.json +0 -20
  301. package/templates/src/locales/pt-BR/pages/formTemplate.json +0 -16
  302. package/templates/src/locales/pt-BR/pages/loginTemplate.json +0 -9
  303. package/templates/vite.config.d.ts +0 -2
  304. package/templates/vite.config.js +0 -20
@@ -0,0 +1,179 @@
1
+ 'use strict';
2
+
3
+ const jsxRuntime = require('react/jsx-runtime');
4
+ const skeleton = require('./skeleton-DjiHerJn.cjs');
5
+ const button = require('./button-0BlA47It.cjs');
6
+ const ImageWithFallback = require('./ImageWithFallback-CfkAkctC.cjs');
7
+ const LanguageSelector = require('./LanguageSelector-CHOLPmHr.cjs');
8
+ const reactI18next = require('react-i18next');
9
+ const lucideReact = require('lucide-react');
10
+ const React = require('react');
11
+
12
+ function FeatureCardSkeleton({
13
+ showAction = true,
14
+ className,
15
+ ...props
16
+ }) {
17
+ return /* @__PURE__ */ jsxRuntime.jsxs(skeleton.Card, { className: button.cn("flex flex-col h-full", className), ...props, children: [
18
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
19
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "size-10 rounded-[var(--radius)] shrink-0" }),
20
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2 min-w-0", children: [
21
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-28" }),
22
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-12 rounded-full" })
23
+ ] })
24
+ ] }) }),
25
+ /* @__PURE__ */ jsxRuntime.jsxs(skeleton.CardContent, { className: "flex-1 space-y-2", children: [
26
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-3.5 w-full" }),
27
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-3.5 w-5/6" }),
28
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-3.5 w-4/6" })
29
+ ] }),
30
+ showAction && /* @__PURE__ */ jsxRuntime.jsx(skeleton.CardFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-9 w-full rounded-md" }) })
31
+ ] });
32
+ }
33
+
34
+ function AuthPageShell({ imageSrc, imageAlt, children }) {
35
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-screen w-full flex overflow-y-auto", children: [
36
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
37
+ /* @__PURE__ */ jsxRuntime.jsx(
38
+ ImageWithFallback.ImageWithFallback,
39
+ {
40
+ src: imageSrc,
41
+ alt: imageAlt,
42
+ className: "absolute inset-0 w-full h-full object-cover"
43
+ }
44
+ ),
45
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
46
+ ] }),
47
+ /* @__PURE__ */ jsxRuntime.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: [
48
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsxRuntime.jsx(LanguageSelector.LanguageSelector, { variant: "minimal", showIcon: false }) }),
49
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
50
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full max-w-sm space-y-6 relative z-10", children })
51
+ ] })
52
+ ] });
53
+ }
54
+
55
+ const DEFAULT_PROVIDERS = ["google", "mtLogin", "govBr"];
56
+ function SocialLoginButtons({
57
+ onSocialLogin,
58
+ providers = DEFAULT_PROVIDERS
59
+ }) {
60
+ const { t } = reactI18next.useTranslation();
61
+ if (providers.length === 0) return null;
62
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
63
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
64
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full border-t border-border" }) }),
65
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex justify-center text-sm", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-muted px-2 text-muted-foreground", children: t("login.orContinueWith") }) })
66
+ ] }),
67
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
68
+ providers.includes("google") && /* @__PURE__ */ jsxRuntime.jsxs(
69
+ button.Button,
70
+ {
71
+ type: "button",
72
+ variant: "outline",
73
+ className: "w-full justify-center",
74
+ onClick: () => onSocialLogin("Google"),
75
+ children: [
76
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "w-5 h-5 mr-2", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
77
+ /* @__PURE__ */ jsxRuntime.jsx(
78
+ "path",
79
+ {
80
+ fill: "#EA4335",
81
+ 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"
82
+ }
83
+ ),
84
+ /* @__PURE__ */ jsxRuntime.jsx(
85
+ "path",
86
+ {
87
+ fill: "#4285F4",
88
+ 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"
89
+ }
90
+ ),
91
+ /* @__PURE__ */ jsxRuntime.jsx(
92
+ "path",
93
+ {
94
+ fill: "#FBBC05",
95
+ 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"
96
+ }
97
+ ),
98
+ /* @__PURE__ */ jsxRuntime.jsx(
99
+ "path",
100
+ {
101
+ fill: "#34A853",
102
+ 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"
103
+ }
104
+ ),
105
+ /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
106
+ ] }),
107
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: t("login.signInWithGoogle") })
108
+ ]
109
+ }
110
+ ),
111
+ providers.includes("mtLogin") && /* @__PURE__ */ jsxRuntime.jsxs(
112
+ button.Button,
113
+ {
114
+ type: "button",
115
+ variant: "outline",
116
+ className: "w-full justify-center",
117
+ onClick: () => onSocialLogin("MT Login"),
118
+ children: [
119
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "w-5 h-5 mr-2 text-[var(--chart-4)]" }),
120
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: t("login.signInWithMTLogin") })
121
+ ]
122
+ }
123
+ ),
124
+ providers.includes("govBr") && /* @__PURE__ */ jsxRuntime.jsx(
125
+ button.Button,
126
+ {
127
+ type: "button",
128
+ variant: "outline",
129
+ className: "w-full justify-center font-normal",
130
+ onClick: () => onSocialLogin("gov.br"),
131
+ children: /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
132
+ t("login.signInWithGovBr").split("gov.br")[0],
133
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "font-semibold", children: "gov.br" }),
134
+ t("login.signInWithGovBr").split("gov.br")[1] || ""
135
+ ] })
136
+ }
137
+ )
138
+ ] })
139
+ ] });
140
+ }
141
+
142
+ function usePasswordStrength(password) {
143
+ return React.useMemo(() => {
144
+ if (password.length === 0) return null;
145
+ if (password.length < 6) return "weak";
146
+ if (password.length < 10) return "medium";
147
+ return "strong";
148
+ }, [password]);
149
+ }
150
+
151
+ const BAR_WIDTH = {
152
+ weak: "w-1/3 bg-destructive",
153
+ medium: "w-2/3 bg-[var(--chart-3)]",
154
+ strong: "w-full bg-[var(--chart-2)]"
155
+ };
156
+ const TEXT_COLOR = {
157
+ weak: "text-destructive",
158
+ medium: "text-[var(--chart-3)]",
159
+ strong: "text-[var(--chart-2)]"
160
+ };
161
+ const LABEL_KEY = {
162
+ weak: "resetPassword.strengthWeak",
163
+ medium: "resetPassword.strengthMedium",
164
+ strong: "resetPassword.strengthStrong"
165
+ };
166
+ function PasswordStrengthMeter({ strength }) {
167
+ const { t } = reactI18next.useTranslation();
168
+ if (!strength) return null;
169
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
170
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-1 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-full transition-all duration-300 ${BAR_WIDTH[strength]}` }) }),
171
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-small ${TEXT_COLOR[strength]}`, children: t(LABEL_KEY[strength]) })
172
+ ] });
173
+ }
174
+
175
+ exports.AuthPageShell = AuthPageShell;
176
+ exports.FeatureCardSkeleton = FeatureCardSkeleton;
177
+ exports.PasswordStrengthMeter = PasswordStrengthMeter;
178
+ exports.SocialLoginButtons = SocialLoginButtons;
179
+ exports.usePasswordStrength = usePasswordStrength;
@@ -0,0 +1,179 @@
1
+ 'use strict';
2
+
3
+ const jsxRuntime = require('react/jsx-runtime');
4
+ const skeleton = require('./skeleton-DhJswvTW.cjs');
5
+ const button = require('./button-Kd9Fj53S.cjs');
6
+ const ImageWithFallback = require('./ImageWithFallback-BkMXHCvV.cjs');
7
+ const LanguageSelector = require('./LanguageSelector-1XhM7R1i.cjs');
8
+ const reactI18next = require('react-i18next');
9
+ const lucideReact = require('lucide-react');
10
+ const React = require('react');
11
+
12
+ function FeatureCardSkeleton({
13
+ showAction = true,
14
+ className,
15
+ ...props
16
+ }) {
17
+ return /* @__PURE__ */ jsxRuntime.jsxs(skeleton.Card, { className: button.cn("flex flex-col h-full", className), ...props, children: [
18
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
19
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "size-10 rounded-[var(--radius)] shrink-0" }),
20
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2 min-w-0", children: [
21
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-28" }),
22
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-12 rounded-full" })
23
+ ] })
24
+ ] }) }),
25
+ /* @__PURE__ */ jsxRuntime.jsxs(skeleton.CardContent, { className: "flex-1 space-y-2", children: [
26
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-3.5 w-full" }),
27
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-3.5 w-5/6" }),
28
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-3.5 w-4/6" })
29
+ ] }),
30
+ showAction && /* @__PURE__ */ jsxRuntime.jsx(skeleton.CardFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-9 w-full rounded-md" }) })
31
+ ] });
32
+ }
33
+
34
+ function AuthPageShell({ imageSrc, imageAlt, children }) {
35
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-screen w-full flex overflow-y-auto", children: [
36
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
37
+ /* @__PURE__ */ jsxRuntime.jsx(
38
+ ImageWithFallback.ImageWithFallback,
39
+ {
40
+ src: imageSrc,
41
+ alt: imageAlt,
42
+ className: "absolute inset-0 w-full h-full object-cover"
43
+ }
44
+ ),
45
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
46
+ ] }),
47
+ /* @__PURE__ */ jsxRuntime.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: [
48
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsxRuntime.jsx(LanguageSelector.LanguageSelector, { variant: "minimal", showIcon: false }) }),
49
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
50
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full max-w-sm space-y-6 relative z-10", children })
51
+ ] })
52
+ ] });
53
+ }
54
+
55
+ const DEFAULT_PROVIDERS = ["google", "mtLogin", "govBr"];
56
+ function SocialLoginButtons({
57
+ onSocialLogin,
58
+ providers = DEFAULT_PROVIDERS
59
+ }) {
60
+ const { t } = reactI18next.useTranslation();
61
+ if (providers.length === 0) return null;
62
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
63
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
64
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full border-t border-border" }) }),
65
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex justify-center text-sm", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-muted px-2 text-muted-foreground", children: t("login.orContinueWith") }) })
66
+ ] }),
67
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
68
+ providers.includes("google") && /* @__PURE__ */ jsxRuntime.jsxs(
69
+ button.Button,
70
+ {
71
+ type: "button",
72
+ variant: "outline",
73
+ className: "w-full justify-center",
74
+ onClick: () => onSocialLogin("Google"),
75
+ children: [
76
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "w-5 h-5 mr-2", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
77
+ /* @__PURE__ */ jsxRuntime.jsx(
78
+ "path",
79
+ {
80
+ fill: "#EA4335",
81
+ 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"
82
+ }
83
+ ),
84
+ /* @__PURE__ */ jsxRuntime.jsx(
85
+ "path",
86
+ {
87
+ fill: "#4285F4",
88
+ 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"
89
+ }
90
+ ),
91
+ /* @__PURE__ */ jsxRuntime.jsx(
92
+ "path",
93
+ {
94
+ fill: "#FBBC05",
95
+ 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"
96
+ }
97
+ ),
98
+ /* @__PURE__ */ jsxRuntime.jsx(
99
+ "path",
100
+ {
101
+ fill: "#34A853",
102
+ 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"
103
+ }
104
+ ),
105
+ /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
106
+ ] }),
107
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: t("login.signInWithGoogle") })
108
+ ]
109
+ }
110
+ ),
111
+ providers.includes("mtLogin") && /* @__PURE__ */ jsxRuntime.jsxs(
112
+ button.Button,
113
+ {
114
+ type: "button",
115
+ variant: "outline",
116
+ className: "w-full justify-center",
117
+ onClick: () => onSocialLogin("MT Login"),
118
+ children: [
119
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "w-5 h-5 mr-2 text-[var(--chart-4)]" }),
120
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: t("login.signInWithMTLogin") })
121
+ ]
122
+ }
123
+ ),
124
+ providers.includes("govBr") && /* @__PURE__ */ jsxRuntime.jsx(
125
+ button.Button,
126
+ {
127
+ type: "button",
128
+ variant: "outline",
129
+ className: "w-full justify-center font-normal",
130
+ onClick: () => onSocialLogin("gov.br"),
131
+ children: /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
132
+ t("login.signInWithGovBr").split("gov.br")[0],
133
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "font-semibold", children: "gov.br" }),
134
+ t("login.signInWithGovBr").split("gov.br")[1] || ""
135
+ ] })
136
+ }
137
+ )
138
+ ] })
139
+ ] });
140
+ }
141
+
142
+ function usePasswordStrength(password) {
143
+ return React.useMemo(() => {
144
+ if (password.length === 0) return null;
145
+ if (password.length < 6) return "weak";
146
+ if (password.length < 10) return "medium";
147
+ return "strong";
148
+ }, [password]);
149
+ }
150
+
151
+ const BAR_WIDTH = {
152
+ weak: "w-1/3 bg-destructive",
153
+ medium: "w-2/3 bg-[var(--chart-3)]",
154
+ strong: "w-full bg-[var(--chart-2)]"
155
+ };
156
+ const TEXT_COLOR = {
157
+ weak: "text-destructive",
158
+ medium: "text-[var(--chart-3)]",
159
+ strong: "text-[var(--chart-2)]"
160
+ };
161
+ const LABEL_KEY = {
162
+ weak: "resetPassword.strengthWeak",
163
+ medium: "resetPassword.strengthMedium",
164
+ strong: "resetPassword.strengthStrong"
165
+ };
166
+ function PasswordStrengthMeter({ strength }) {
167
+ const { t } = reactI18next.useTranslation();
168
+ if (!strength) return null;
169
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
170
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-1 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-full transition-all duration-300 ${BAR_WIDTH[strength]}` }) }),
171
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-small ${TEXT_COLOR[strength]}`, children: t(LABEL_KEY[strength]) })
172
+ ] });
173
+ }
174
+
175
+ exports.AuthPageShell = AuthPageShell;
176
+ exports.FeatureCardSkeleton = FeatureCardSkeleton;
177
+ exports.PasswordStrengthMeter = PasswordStrengthMeter;
178
+ exports.SocialLoginButtons = SocialLoginButtons;
179
+ exports.usePasswordStrength = usePasswordStrength;
@@ -0,0 +1,173 @@
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
+ import { C as Card, e as CardHeader, S as Skeleton, b as CardContent, d as CardFooter } from './skeleton-DSMhdqp1.js';
3
+ import { c as cn, B as Button } from './button-DFa-rtPy.js';
4
+ import { I as ImageWithFallback } from './ImageWithFallback-BOh1FM3I.js';
5
+ import { L as LanguageSelector } from './LanguageSelector-Du09anfM.js';
6
+ import { useTranslation } from 'react-i18next';
7
+ import { Lock } from 'lucide-react';
8
+ import { useMemo } from 'react';
9
+
10
+ function FeatureCardSkeleton({
11
+ showAction = true,
12
+ className,
13
+ ...props
14
+ }) {
15
+ return /* @__PURE__ */ jsxs(Card, { className: cn("flex flex-col h-full", className), ...props, children: [
16
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
17
+ /* @__PURE__ */ jsx(Skeleton, { className: "size-10 rounded-[var(--radius)] shrink-0" }),
18
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 min-w-0", children: [
19
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-28" }),
20
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-12 rounded-full" })
21
+ ] })
22
+ ] }) }),
23
+ /* @__PURE__ */ jsxs(CardContent, { className: "flex-1 space-y-2", children: [
24
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-full" }),
25
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-5/6" }),
26
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-4/6" })
27
+ ] }),
28
+ showAction && /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-full rounded-md" }) })
29
+ ] });
30
+ }
31
+
32
+ function AuthPageShell({ imageSrc, imageAlt, children }) {
33
+ return /* @__PURE__ */ jsxs("div", { className: "h-screen w-full flex overflow-y-auto", children: [
34
+ /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex lg:flex-1 relative overflow-hidden", children: [
35
+ /* @__PURE__ */ jsx(
36
+ ImageWithFallback,
37
+ {
38
+ src: imageSrc,
39
+ alt: imageAlt,
40
+ className: "absolute inset-0 w-full h-full object-cover"
41
+ }
42
+ ),
43
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" })
44
+ ] }),
45
+ /* @__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: [
46
+ /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-20", children: /* @__PURE__ */ jsx(LanguageSelector, { variant: "minimal", showIcon: false }) }),
47
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 lg:hidden bg-[image:var(--gradient-diagonal)] opacity-10 dark:opacity-5" }),
48
+ /* @__PURE__ */ jsx("div", { className: "w-full max-w-sm space-y-6 relative z-10", children })
49
+ ] })
50
+ ] });
51
+ }
52
+
53
+ const DEFAULT_PROVIDERS = ["google", "mtLogin", "govBr"];
54
+ function SocialLoginButtons({
55
+ onSocialLogin,
56
+ providers = DEFAULT_PROVIDERS
57
+ }) {
58
+ const { t } = useTranslation();
59
+ if (providers.length === 0) return null;
60
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
61
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
62
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsx("div", { className: "w-full border-t border-border" }) }),
63
+ /* @__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") }) })
64
+ ] }),
65
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
66
+ providers.includes("google") && /* @__PURE__ */ jsxs(
67
+ Button,
68
+ {
69
+ type: "button",
70
+ variant: "outline",
71
+ className: "w-full justify-center",
72
+ onClick: () => onSocialLogin("Google"),
73
+ children: [
74
+ /* @__PURE__ */ jsxs("svg", { className: "w-5 h-5 mr-2", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", children: [
75
+ /* @__PURE__ */ jsx(
76
+ "path",
77
+ {
78
+ fill: "#EA4335",
79
+ 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"
80
+ }
81
+ ),
82
+ /* @__PURE__ */ jsx(
83
+ "path",
84
+ {
85
+ fill: "#4285F4",
86
+ 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"
87
+ }
88
+ ),
89
+ /* @__PURE__ */ jsx(
90
+ "path",
91
+ {
92
+ fill: "#FBBC05",
93
+ 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"
94
+ }
95
+ ),
96
+ /* @__PURE__ */ jsx(
97
+ "path",
98
+ {
99
+ fill: "#34A853",
100
+ 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"
101
+ }
102
+ ),
103
+ /* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
104
+ ] }),
105
+ /* @__PURE__ */ jsx("span", { children: t("login.signInWithGoogle") })
106
+ ]
107
+ }
108
+ ),
109
+ providers.includes("mtLogin") && /* @__PURE__ */ jsxs(
110
+ Button,
111
+ {
112
+ type: "button",
113
+ variant: "outline",
114
+ className: "w-full justify-center",
115
+ onClick: () => onSocialLogin("MT Login"),
116
+ children: [
117
+ /* @__PURE__ */ jsx(Lock, { className: "w-5 h-5 mr-2 text-[var(--chart-4)]" }),
118
+ /* @__PURE__ */ jsx("span", { children: t("login.signInWithMTLogin") })
119
+ ]
120
+ }
121
+ ),
122
+ providers.includes("govBr") && /* @__PURE__ */ jsx(
123
+ Button,
124
+ {
125
+ type: "button",
126
+ variant: "outline",
127
+ className: "w-full justify-center font-normal",
128
+ onClick: () => onSocialLogin("gov.br"),
129
+ children: /* @__PURE__ */ jsxs("span", { children: [
130
+ t("login.signInWithGovBr").split("gov.br")[0],
131
+ /* @__PURE__ */ jsx("strong", { className: "font-semibold", children: "gov.br" }),
132
+ t("login.signInWithGovBr").split("gov.br")[1] || ""
133
+ ] })
134
+ }
135
+ )
136
+ ] })
137
+ ] });
138
+ }
139
+
140
+ function usePasswordStrength(password) {
141
+ return useMemo(() => {
142
+ if (password.length === 0) return null;
143
+ if (password.length < 6) return "weak";
144
+ if (password.length < 10) return "medium";
145
+ return "strong";
146
+ }, [password]);
147
+ }
148
+
149
+ const BAR_WIDTH = {
150
+ weak: "w-1/3 bg-destructive",
151
+ medium: "w-2/3 bg-[var(--chart-3)]",
152
+ strong: "w-full bg-[var(--chart-2)]"
153
+ };
154
+ const TEXT_COLOR = {
155
+ weak: "text-destructive",
156
+ medium: "text-[var(--chart-3)]",
157
+ strong: "text-[var(--chart-2)]"
158
+ };
159
+ const LABEL_KEY = {
160
+ weak: "resetPassword.strengthWeak",
161
+ medium: "resetPassword.strengthMedium",
162
+ strong: "resetPassword.strengthStrong"
163
+ };
164
+ function PasswordStrengthMeter({ strength }) {
165
+ const { t } = useTranslation();
166
+ if (!strength) return null;
167
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
168
+ /* @__PURE__ */ jsx("div", { className: "flex-1 h-1 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: `h-full transition-all duration-300 ${BAR_WIDTH[strength]}` }) }),
169
+ /* @__PURE__ */ jsx("span", { className: `text-small ${TEXT_COLOR[strength]}`, children: t(LABEL_KEY[strength]) })
170
+ ] });
171
+ }
172
+
173
+ export { AuthPageShell as A, FeatureCardSkeleton as F, PasswordStrengthMeter as P, SocialLoginButtons as S, usePasswordStrength as u };
@@ -0,0 +1,86 @@
1
+ 'use strict';
2
+
3
+ const jsxRuntime = require('react/jsx-runtime');
4
+ const React = require('react');
5
+
6
+ const ThemeContext = React.createContext(void 0);
7
+ function ThemeProvider({
8
+ children,
9
+ disableDarkMode = false,
10
+ defaultTheme,
11
+ storageKey = "xertica-theme"
12
+ }) {
13
+ const getInitialTheme = () => {
14
+ if (disableDarkMode) return "light";
15
+ if (defaultTheme) return defaultTheme;
16
+ if (typeof window !== "undefined") {
17
+ const savedTheme = window.localStorage?.getItem(storageKey);
18
+ if (savedTheme && (savedTheme === "light" || savedTheme === "dark")) {
19
+ return savedTheme;
20
+ }
21
+ if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
22
+ return "dark";
23
+ }
24
+ }
25
+ return "light";
26
+ };
27
+ const [theme, setThemeState] = React.useState(getInitialTheme);
28
+ React.useEffect(() => {
29
+ if (disableDarkMode && theme === "dark") {
30
+ setThemeState("light");
31
+ }
32
+ }, [disableDarkMode, theme]);
33
+ React.useEffect(() => {
34
+ if (typeof document === "undefined") return;
35
+ const root = document.documentElement;
36
+ root.classList.remove("light", "dark");
37
+ if (theme === "dark") {
38
+ root.classList.add("dark");
39
+ } else {
40
+ root.classList.add("light");
41
+ }
42
+ if (typeof window !== "undefined") {
43
+ window.localStorage?.setItem(storageKey, theme);
44
+ }
45
+ }, [theme, storageKey]);
46
+ React.useEffect(() => {
47
+ if (disableDarkMode) return;
48
+ if (typeof window === "undefined" || !window.matchMedia) return;
49
+ if (!window.localStorage?.getItem(storageKey)) {
50
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
51
+ const handleChange = (e) => {
52
+ setThemeState(e.matches ? "dark" : "light");
53
+ };
54
+ mediaQuery.addEventListener("change", handleChange);
55
+ return () => mediaQuery.removeEventListener("change", handleChange);
56
+ }
57
+ }, [disableDarkMode, storageKey]);
58
+ const toggleTheme = () => {
59
+ if (disableDarkMode) return;
60
+ setThemeState((prevTheme) => prevTheme === "light" ? "dark" : "light");
61
+ };
62
+ const setTheme = (newTheme) => {
63
+ if (disableDarkMode && newTheme === "dark") return;
64
+ setThemeState(newTheme);
65
+ };
66
+ const setThemeMode = setTheme;
67
+ const value = {
68
+ theme,
69
+ toggleTheme,
70
+ setTheme,
71
+ setThemeMode,
72
+ isDark: theme === "dark",
73
+ disableDarkMode
74
+ };
75
+ return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value, children });
76
+ }
77
+ function useTheme() {
78
+ const context = React.useContext(ThemeContext);
79
+ if (context === void 0) {
80
+ throw new Error("useTheme must be used within a ThemeProvider");
81
+ }
82
+ return context;
83
+ }
84
+
85
+ exports.ThemeProvider = ThemeProvider;
86
+ exports.useTheme = useTheme;