xertica-ui 2.7.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.
- package/CHANGELOG.md +16 -0
- package/README.md +19 -11
- package/bin/generate-tokens.ts +25 -9
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +1 -1
- package/components/ui/button/button.test.tsx +2 -2
- package/components/ui/button/button.tsx +6 -6
- package/components/ui/card/card.tsx +14 -2
- package/components/ui/input/input.tsx +1 -1
- package/components/ui/input-otp/input-otp.tsx +1 -1
- package/components/ui/search/search.tsx +1 -1
- package/components/ui/select/select.tsx +2 -2
- package/components/ui/switch/switch.tsx +1 -1
- package/components/ui/textarea/textarea.tsx +1 -1
- package/contexts/BrandColorsContext.tsx +50 -2
- package/contexts/theme-data.ts +100 -3
- package/dist/AssistantChart-BFBJXVcm.js +3383 -0
- package/dist/AssistantChart-BTnE94FR.cjs +3551 -0
- package/dist/AssistantChart-BvccsQMx.cjs +3551 -0
- package/dist/AssistantChart-CkskcBVD.js +3383 -0
- package/dist/AssistantChart-CrPkO9ip.js +3383 -0
- package/dist/AssistantChart-DKz2O1R8.cjs +3551 -0
- package/dist/AssistantChart-DYL6UEvo.cjs +3551 -0
- package/dist/AssistantChart-keo-ogKi.js +3383 -0
- package/dist/AudioPlayer-AoU5MTiM.cjs +1282 -0
- package/dist/AudioPlayer-Bx1vrblm.js +1278 -0
- package/dist/AudioPlayer-D0-I6J3J.cjs +1282 -0
- package/dist/AudioPlayer-DIWX_Yg7.cjs +1282 -0
- package/dist/AudioPlayer-DrWJnS7c.js +1278 -0
- package/dist/AudioPlayer-_P-Z7pAK.js +1278 -0
- package/dist/BrandColorsContext-B25Bpr3b.cjs +819 -0
- package/dist/BrandColorsContext-BCieATdW.js +812 -0
- package/dist/BrandColorsContext-DP0DXAXS.js +824 -0
- package/dist/BrandColorsContext-DjpC9wR_.cjs +798 -0
- package/dist/BrandColorsContext-MpXFhte7.cjs +831 -0
- package/dist/BrandColorsContext-V3tOc-Zw.js +791 -0
- package/dist/CodeBlock-CK4rO6lM.js +221 -0
- package/dist/CodeBlock-CKXamfVd.cjs +223 -0
- package/dist/CodeBlock-CVmE7isS.cjs +223 -0
- package/dist/CodeBlock-D7i5-cMv.js +221 -0
- package/dist/CodeBlock-Dg56j2ut.cjs +223 -0
- package/dist/CodeBlock-Dt6nUQoo.js +221 -0
- package/dist/CustomTooltipContent-Bxynuq7T.js +33 -0
- package/dist/CustomTooltipContent-BzjOSA0P.cjs +54 -0
- package/dist/CustomTooltipContent-C-ZeCNsf.js +33 -0
- package/dist/CustomTooltipContent-CON_QrXm.cjs +54 -0
- package/dist/CustomTooltipContent-UR_n2QfW.js +33 -0
- package/dist/CustomTooltipContent-v1SXjoFn.cjs +54 -0
- package/dist/FeatureCard-4n_8a63v.cjs +497 -0
- package/dist/FeatureCard-BLiAWT3w.js +485 -0
- package/dist/FeatureCard-BXRW97Ef.cjs +497 -0
- package/dist/FeatureCard-CDgLlWE2.js +485 -0
- package/dist/FeatureCard-CgQ8lq-I.cjs +497 -0
- package/dist/FeatureCard-Cp8cVC6T.cjs +497 -0
- package/dist/FeatureCard-D0MwrTRP.js +485 -0
- package/dist/FeatureCard-uE5i0in_.js +485 -0
- package/dist/ImageWithFallback-BOh1FM3I.js +98 -0
- package/dist/ImageWithFallback-BQO7952C.js +98 -0
- package/dist/ImageWithFallback-BkMXHCvV.cjs +122 -0
- package/dist/ImageWithFallback-C72nwszA.cjs +122 -0
- package/dist/ImageWithFallback-CCUMDuEC.cjs +122 -0
- package/dist/ImageWithFallback-DQD5TTlY.js +98 -0
- package/dist/LanguageSelector-1XhM7R1i.cjs +48 -0
- package/dist/LanguageSelector-B3ZVNc55.js +46 -0
- package/dist/LanguageSelector-Cj6zl0CM.js +46 -0
- package/dist/LanguageSelector-DK1zD4VH.cjs +48 -0
- package/dist/LanguageSelector-DseCAa0p.cjs +48 -0
- package/dist/LanguageSelector-Du09anfM.js +46 -0
- package/dist/LanguageSelector-PZHlFfEs.cjs +48 -0
- package/dist/LanguageSelector-SB-NJSmx.js +46 -0
- package/dist/PasswordStrengthMeter-B3S6i_k4.cjs +179 -0
- package/dist/PasswordStrengthMeter-B8ky1nJI.js +173 -0
- package/dist/PasswordStrengthMeter-C5VEopH-.cjs +179 -0
- package/dist/PasswordStrengthMeter-CIm7_jNT.js +173 -0
- package/dist/PasswordStrengthMeter-DKSAbQzu.js +173 -0
- package/dist/PasswordStrengthMeter-DxLu54p-.cjs +179 -0
- package/dist/PasswordStrengthMeter-k-e9Pole.cjs +179 -0
- package/dist/PasswordStrengthMeter-pAi2viq5.js +173 -0
- package/dist/ThemeToggle-4pQbVkpK.js +215 -0
- package/dist/ThemeToggle-B6rIVLvC.cjs +219 -0
- package/dist/ThemeToggle-BUOTps5l.cjs +219 -0
- package/dist/ThemeToggle-CO5mPl6e.js +215 -0
- package/dist/ThemeToggle-DbZQ0JSV.cjs +219 -0
- package/dist/ThemeToggle-vLXEq2TS.js +215 -0
- package/dist/VerifyEmailPage-BTjI2c9n.js +2954 -0
- package/dist/VerifyEmailPage-CJGfDSOx.js +2954 -0
- package/dist/VerifyEmailPage-DOlZUNc0.cjs +2963 -0
- package/dist/VerifyEmailPage-DQPRl_RJ.js +2954 -0
- package/dist/VerifyEmailPage-DrdqMbLC.cjs +2963 -0
- package/dist/VerifyEmailPage-hyDfeCRa.cjs +2963 -0
- package/dist/VerifyEmailPage-kKSXl8vu.cjs +2963 -0
- package/dist/VerifyEmailPage-w4N-bDhU.js +2954 -0
- package/dist/XerticaOrbe-B9tegV1n.js +1925 -0
- package/dist/XerticaOrbe-BQ_NjwPS.cjs +1927 -0
- package/dist/XerticaOrbe-BdUX171Q.cjs +1927 -0
- package/dist/XerticaOrbe-BdlKXRHU.cjs +1927 -0
- package/dist/XerticaOrbe-CByPAFE5.js +1925 -0
- package/dist/XerticaOrbe-Ccu9eFMu.js +1925 -0
- package/dist/XerticaProvider-BVid1oqn.cjs +46 -0
- package/dist/XerticaProvider-Bz_YfNY4.js +44 -0
- package/dist/XerticaProvider-CtvYfRbZ.cjs +46 -0
- package/dist/XerticaProvider-DMiyExQS.js +44 -0
- package/dist/XerticaProvider-DP2lzKip.cjs +46 -0
- package/dist/XerticaProvider-De79hhgp.js +44 -0
- package/dist/XerticaProvider-Dkk1Vbsy.js +44 -0
- package/dist/XerticaProvider-EdzH9Nrw.cjs +46 -0
- package/dist/alert-dialog-9XYAn5z5.js +819 -0
- package/dist/alert-dialog-B281hud0.cjs +872 -0
- package/dist/alert-dialog-BVWbrcrw.cjs +872 -0
- package/dist/alert-dialog-B_Ko1xpu.js +819 -0
- package/dist/alert-dialog-CIxE8T-J.cjs +872 -0
- package/dist/alert-dialog-DW-_iPuf.js +819 -0
- package/dist/assistant.cjs.js +2 -2
- package/dist/assistant.es.js +2 -2
- package/dist/avatar-BJwIMbZ_.js +54 -0
- package/dist/avatar-C4Zh5fAJ.cjs +77 -0
- package/dist/avatar-CTEUKZUT.js +54 -0
- package/dist/avatar-D1bZhlhL.cjs +77 -0
- package/dist/avatar-DKIxHeKG.cjs +77 -0
- package/dist/avatar-v16eZC8p.js +54 -0
- package/dist/blocks.cjs.js +2 -2
- package/dist/blocks.es.js +2 -2
- package/dist/brand.cjs.js +4 -4
- package/dist/brand.es.js +4 -4
- package/dist/breadcrumb-B1mUiaWB.cjs +98 -0
- package/dist/breadcrumb-BIRgmem-.js +90 -0
- package/dist/breadcrumb-BSng-oUf.cjs +98 -0
- package/dist/breadcrumb-CES7furU.js +90 -0
- package/dist/breadcrumb-CP275kbF.cjs +98 -0
- package/dist/breadcrumb-D7hr1EvJ.js +90 -0
- package/dist/button-BYtQygX5.cjs +85 -0
- package/dist/button-BnAW-a_w.js +62 -0
- package/dist/button-CUPDQews.js +62 -0
- package/dist/button-DFa-rtPy.js +62 -0
- package/dist/button-DV1G6XrI.cjs +85 -0
- package/dist/button-Kd9Fj53S.cjs +85 -0
- package/dist/cli.js +94 -10
- package/dist/components/ui/card/card.d.ts +11 -1
- package/dist/contexts/theme-data.d.ts +15 -1
- package/dist/dropdown-menu-B9wTZ0uX.cjs +225 -0
- package/dist/dropdown-menu-BeBtZOrs.cjs +225 -0
- package/dist/dropdown-menu-D7mRDGis.js +190 -0
- package/dist/dropdown-menu-D8ZmqHB7.js +190 -0
- package/dist/dropdown-menu-_AWBeOts.cjs +225 -0
- package/dist/dropdown-menu-qGzLO_HO.js +190 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +1 -1
- package/dist/index.cjs.js +24 -24
- package/dist/index.es.js +24 -24
- package/dist/input-B53E6K8G.js +65 -0
- package/dist/input-B7Q7vcoG.cjs +91 -0
- package/dist/input-BysqLMK1.js +65 -0
- package/dist/input-CStdFsaH.cjs +91 -0
- package/dist/input-CXYth6nW.cjs +91 -0
- package/dist/input-CX_fWE2D.cjs +91 -0
- package/dist/input-CitUVnEn.js +65 -0
- package/dist/input-wkBYTp-B.js +65 -0
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +1 -1
- package/dist/media.cjs.js +1 -1
- package/dist/media.es.js +1 -1
- package/dist/pages.cjs.js +1 -1
- package/dist/pages.es.js +1 -1
- package/dist/rich-text-editor-BHiRUzWZ.js +2894 -0
- package/dist/rich-text-editor-BWMRUMJ2.js +2894 -0
- package/dist/rich-text-editor-BoE6Ks5x.cjs +2968 -0
- package/dist/rich-text-editor-BzuEwR_X.js +2894 -0
- package/dist/rich-text-editor-CcopGbQ-.js +2894 -0
- package/dist/rich-text-editor-CmxSRJIi.cjs +2968 -0
- package/dist/rich-text-editor-DyYAu28v.cjs +2968 -0
- package/dist/rich-text-editor-JS_eMQCC.cjs +2968 -0
- package/dist/select-BNfFJwYp.js +130 -0
- package/dist/select-CN8IDjGB.js +130 -0
- package/dist/select-CwRzQHA7.cjs +161 -0
- package/dist/select-CwgD3nMD.js +130 -0
- package/dist/select-DEHUm_AC.cjs +161 -0
- package/dist/select-DJDgpVm3.cjs +161 -0
- package/dist/select-DSLWQLmo.cjs +161 -0
- package/dist/select-YFx0wCYT.js +130 -0
- package/dist/sidebar-BF7JEL7U.js +1151 -0
- package/dist/sidebar-Bjr2doX5.cjs +1154 -0
- package/dist/sidebar-CMrNCmhb.cjs +1154 -0
- package/dist/sidebar-CO9x8AVn.cjs +1154 -0
- package/dist/sidebar-Cn_KB4c6.js +1151 -0
- package/dist/sidebar-Db_C30ph.cjs +1154 -0
- package/dist/sidebar-miPHsRz4.js +1151 -0
- package/dist/sidebar-pZF8mLLu.js +1151 -0
- package/dist/skeleton-BX2XTjMO.cjs +87 -0
- package/dist/skeleton-BoLK0iV7.js +78 -0
- package/dist/skeleton-Bysq8yeB.js +79 -0
- package/dist/skeleton-C7nspYnC.cjs +87 -0
- package/dist/skeleton-DL4V5Vub.cjs +87 -0
- package/dist/skeleton-DSMhdqp1.js +78 -0
- package/dist/skeleton-DhJswvTW.cjs +88 -0
- package/dist/skeleton-DicUfozA.js +78 -0
- package/dist/slider-77T_Eqw4.js +56 -0
- package/dist/slider-B6puMLXS.cjs +78 -0
- package/dist/slider-B785N7lZ.js +56 -0
- package/dist/slider-C6yssKyZ.cjs +78 -0
- package/dist/slider-CKZO9gVh.cjs +78 -0
- package/dist/slider-Cn-ImSze.js +56 -0
- package/dist/tooltip-BiJVGob3.cjs +72 -0
- package/dist/tooltip-D2OPn-1v.cjs +72 -0
- package/dist/tooltip-DlCHQuh1.js +48 -0
- package/dist/tooltip-fQ2Va0G8.cjs +72 -0
- package/dist/tooltip-oAw00FX2.js +48 -0
- package/dist/tooltip-u147L0wD.js +48 -0
- package/dist/ui.cjs.js +13 -13
- package/dist/ui.es.js +13 -13
- package/dist/xertica-assistant-C2A0R94j.js +2173 -0
- package/dist/xertica-assistant-CSUprvTR.js +2173 -0
- package/dist/xertica-assistant-Caubm0HR.js +2173 -0
- package/dist/xertica-assistant-DEexPM2u.cjs +2180 -0
- package/dist/xertica-assistant-Dh1dmEx3.cjs +2180 -0
- package/dist/xertica-assistant-GGcyHEZG.cjs +2180 -0
- package/dist/xertica-assistant-USefPe2L.js +2173 -0
- package/dist/xertica-assistant-cwSHFwfv.cjs +2180 -0
- package/dist/xertica-ui.css +1 -1
- package/package.json +3 -2
- package/styles/xertica/base.css +38 -0
- package/styles/xertica/tokens.css +9 -0
- package/templates/src/app/App.tsx +5 -1
- package/templates/src/features/home/ui/HomeContent.tsx +12 -13
- package/templates/src/features/template/ui/TemplateContent.tsx +569 -26
- package/templates/src/locales/en/pages/templates.json +112 -4
- package/templates/src/locales/es/pages/templates.json +112 -4
- package/templates/src/locales/pt-BR/pages/templates.json +112 -4
- package/templates/src/styles/xertica/tokens.css +9 -0
- package/templates/vite.config.ts +25 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
const skeleton = require('./skeleton-BX2XTjMO.cjs');
|
|
5
|
+
const button = require('./button-BYtQygX5.cjs');
|
|
6
|
+
const ImageWithFallback = require('./ImageWithFallback-CCUMDuEC.cjs');
|
|
7
|
+
const LanguageSelector = require('./LanguageSelector-DseCAa0p.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 };
|