xertica-ui 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/components/assistant/xertica-assistant/use-assistant.ts +5 -6
- package/{templates/src/features/auth/ui → components/blocks/auth}/AuthPageShell.tsx +8 -3
- package/components/blocks/auth/PasswordStrengthMeter.tsx +41 -0
- package/components/blocks/auth/SocialLoginButtons.tsx +95 -0
- package/components/blocks/auth/index.ts +11 -0
- package/components/blocks/auth/usePasswordStrength.ts +13 -0
- package/components/blocks/index.ts +1 -0
- package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +45 -139
- package/components/pages/login-page/LoginPage.tsx +52 -145
- package/components/pages/reset-password-page/ResetPasswordPage.tsx +79 -169
- package/components/pages/verify-email-page/VerifyEmailPage.tsx +48 -150
- package/dist/AssistantChart-CImCNLfD.cjs +3551 -0
- package/dist/AssistantChart-DfdIfmQr.js +3383 -0
- package/dist/FeatureCard-BhpfmPPx.js +485 -0
- package/dist/FeatureCard-D-5yS_OD.cjs +497 -0
- package/dist/ImageWithFallback-CfkAkctC.cjs +122 -0
- package/dist/ImageWithFallback-bw-CxxDc.js +98 -0
- package/dist/LanguageContext-CX_zdxre.js +1912 -0
- package/dist/LanguageContext-CjhSSqJT.cjs +1917 -0
- package/dist/LanguageSelector-BR3Ss0k_.js +46 -0
- package/dist/LanguageSelector-CHOLPmHr.cjs +48 -0
- package/dist/PasswordStrengthMeter-C8irs0G1.js +173 -0
- package/dist/PasswordStrengthMeter-MLzhax-d.cjs +179 -0
- package/dist/ThemeContext-CEY9pCn-.cjs +86 -0
- package/dist/ThemeContext-Dk3tH7Ym.js +83 -0
- package/dist/ThemeToggle-BpM_iHh8.js +215 -0
- package/dist/ThemeToggle-CZRlv0d4.cjs +219 -0
- package/dist/VerifyEmailPage-BKiaw2YK.js +2954 -0
- package/dist/VerifyEmailPage-Beaicc6V.cjs +2963 -0
- package/dist/VerifyEmailPage-BehPBp0F.cjs +2963 -0
- package/dist/VerifyEmailPage-Djb6hthM.js +2954 -0
- package/dist/XerticaProvider-BijpC_py.cjs +46 -0
- package/dist/XerticaProvider-C2wDRQhT.js +44 -0
- package/dist/alert-dialog-BzIcTKn_.cjs +872 -0
- package/dist/alert-dialog-kty5pxQp.js +819 -0
- package/dist/assistant.cjs.js +1 -1
- package/dist/assistant.es.js +1 -1
- package/dist/blocks.cjs.js +7 -3
- package/dist/blocks.es.js +2 -2
- package/dist/brand.cjs.js +7 -6
- package/dist/brand.es.js +3 -2
- package/dist/components/blocks/auth/AuthPageShell.d.ts +12 -0
- package/dist/components/blocks/auth/PasswordStrengthMeter.d.ts +7 -0
- package/dist/components/blocks/auth/SocialLoginButtons.d.ts +8 -0
- package/dist/components/blocks/auth/index.d.ts +8 -0
- package/dist/components/blocks/auth/usePasswordStrength.d.ts +3 -0
- package/dist/components/blocks/index.d.ts +1 -0
- package/dist/components/pages/reset-password-page/ResetPasswordPage.d.ts +1 -1
- package/dist/hooks.cjs.js +5 -4
- package/dist/hooks.es.js +2 -1
- package/dist/index.cjs.js +29 -24
- package/dist/index.es.js +12 -11
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +1 -1
- package/dist/pages.cjs.js +1 -1
- package/dist/pages.es.js +1 -1
- package/dist/sidebar-B7YzwAp3.js +1151 -0
- package/dist/sidebar-Cb0U7NsV.cjs +1154 -0
- package/dist/ui.cjs.js +7 -7
- package/dist/ui.es.js +3 -3
- package/dist/xertica-assistant-8fh8KA2K.js +2173 -0
- package/dist/xertica-assistant-BjfG3zyL.cjs +2180 -0
- package/docs/i18n.md +2 -0
- package/package.json +1 -1
- package/templates/package.json +2 -2
- package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +1 -2
- package/templates/src/features/auth/ui/LoginContent.tsx +1 -2
- package/templates/src/features/auth/ui/ResetPasswordContent.tsx +3 -57
- package/templates/src/features/auth/ui/VerifyEmailContent.tsx +1 -2
- package/templates/src/features/home/index.ts +0 -10
- package/templates/src/features/home/ui/HomeContent.tsx +21 -75
- package/templates/src/features/template/index.ts +0 -4
- package/templates/src/features/template/ui/TemplateContent.tsx +26 -1279
- package/templates/src/locales/en/pages/templates.json +5 -313
- package/templates/src/locales/es/pages/templates.json +5 -313
- package/templates/src/locales/pt-BR/pages/templates.json +5 -313
- package/templates/src/features/auth/ui/SocialLoginButtons.tsx +0 -78
- package/templates/src/features/home/data/mock.ts +0 -41
- package/templates/src/features/home/hooks/useFeatureCards.ts +0 -20
- package/templates/src/features/home/store/dashboardStore.ts +0 -25
- package/templates/src/features/template/ui/CrudTemplate.tsx +0 -112
- package/templates/src/features/template/ui/DashboardTemplate.tsx +0 -110
- package/templates/src/features/template/ui/FormTemplate.tsx +0 -117
- package/templates/src/features/template/ui/LoginTemplate.tsx +0 -59
- package/templates/src/locales/en/pages/crudTemplate.json +0 -25
- package/templates/src/locales/en/pages/dashboardTemplate.json +0 -20
- package/templates/src/locales/en/pages/formTemplate.json +0 -16
- package/templates/src/locales/en/pages/loginTemplate.json +0 -9
- package/templates/src/locales/es/pages/crudTemplate.json +0 -25
- package/templates/src/locales/es/pages/dashboardTemplate.json +0 -20
- package/templates/src/locales/es/pages/formTemplate.json +0 -16
- package/templates/src/locales/es/pages/loginTemplate.json +0 -9
- package/templates/src/locales/pt-BR/pages/crudTemplate.json +0 -25
- package/templates/src/locales/pt-BR/pages/dashboardTemplate.json +0 -20
- package/templates/src/locales/pt-BR/pages/formTemplate.json +0 -16
- package/templates/src/locales/pt-BR/pages/loginTemplate.json +0 -9
- package/templates/vite.config.d.ts +0 -2
- package/templates/vite.config.js +0 -20
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { Button } from '../../ui/button';
|
|
3
3
|
import { XerticaLogo } from '../../brand/xertica-logo';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { ArrowLeft, Mail, CheckCircle2, Lock } from 'lucide-react';
|
|
4
|
+
import { AuthPageShell, SocialLoginButtons } from '../../blocks/auth';
|
|
5
|
+
import { ArrowLeft, Mail, CheckCircle2 } from 'lucide-react';
|
|
7
6
|
import { useNavigate, useLocation } from 'react-router-dom';
|
|
8
7
|
import { useTranslation } from 'react-i18next';
|
|
9
8
|
|
|
@@ -47,160 +46,59 @@ export function VerifyEmailPage() {
|
|
|
47
46
|
};
|
|
48
47
|
|
|
49
48
|
return (
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
className="absolute inset-0 w-full h-full object-cover"
|
|
58
|
-
/>
|
|
59
|
-
|
|
60
|
-
{/* Gradient overlay */}
|
|
61
|
-
<div className="absolute inset-0 bg-[image:var(--gradient-diagonal)] opacity-80" />
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
{/* Right side - Content */}
|
|
65
|
-
<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">
|
|
66
|
-
{/* Language selector in the top right corner */}
|
|
67
|
-
<div className="absolute top-4 right-4 z-20">
|
|
68
|
-
<LanguageSelector variant="minimal" showIcon={false} />
|
|
49
|
+
<AuthPageShell
|
|
50
|
+
imageSrc="https://images.unsplash.com/photo-1563986768609-322da13575f3?w=1200&h=800&fit=crop&auto=format"
|
|
51
|
+
imageAlt={t('verifyEmail.heroImageAlt')}
|
|
52
|
+
>
|
|
53
|
+
<div className="text-center">
|
|
54
|
+
<div className="flex items-center justify-center mb-4">
|
|
55
|
+
<XerticaLogo className="h-12 w-auto text-primary dark:text-foreground" variant="theme" />
|
|
69
56
|
</div>
|
|
70
57
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<div className="w-full max-w-sm space-y-6 relative z-10">
|
|
75
|
-
{/* Form header */}
|
|
76
|
-
<div className="text-center">
|
|
77
|
-
<div className="flex items-center justify-center mb-4">
|
|
78
|
-
<XerticaLogo
|
|
79
|
-
className="h-12 w-auto text-primary dark:text-foreground"
|
|
80
|
-
variant="theme"
|
|
81
|
-
/>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
{/* Email icon */}
|
|
85
|
-
<div className="flex items-center justify-center mb-4">
|
|
86
|
-
<div className="p-4 bg-primary/10 rounded-[var(--radius)]">
|
|
87
|
-
<Mail className="w-12 h-12 text-primary" />
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<h2 className="text-sm text-muted-foreground">{t('verifyEmail.heading')}</h2>
|
|
92
|
-
<p className="mt-2 text-muted-foreground">{t('verifyEmail.instructionsSent')}</p>
|
|
93
|
-
<p className="mt-1 text-primary">{email}</p>
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
{/* Instructions */}
|
|
97
|
-
<div className="bg-accent rounded-[var(--radius)] p-4 space-y-3">
|
|
98
|
-
<p className="text-muted-foreground">{t('verifyEmail.instructions')}</p>
|
|
99
|
-
<div className="flex items-start gap-2 text-muted-foreground">
|
|
100
|
-
<CheckCircle2 className="w-4 h-4 mt-0.5 flex-shrink-0 text-[var(--chart-2)]" />
|
|
101
|
-
<span className="text-sm">{t('verifyEmail.checkSpam')}</span>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
{/* Success message on resend */}
|
|
106
|
-
{resendSuccess && (
|
|
107
|
-
<div className="bg-[var(--chart-2)]/10 border border-[var(--chart-2)]/20 rounded-[var(--radius)] p-3 flex items-center gap-2">
|
|
108
|
-
<CheckCircle2 className="w-5 h-5 text-[var(--chart-2)] flex-shrink-0" />
|
|
109
|
-
<span className="text-sm text-[var(--chart-2)]">
|
|
110
|
-
{t('verifyEmail.resentSuccess')}
|
|
111
|
-
</span>
|
|
112
|
-
</div>
|
|
113
|
-
)}
|
|
114
|
-
|
|
115
|
-
{/* Action buttons */}
|
|
116
|
-
<div className="space-y-3">
|
|
117
|
-
<p className="text-center text-muted-foreground">{t('verifyEmail.notReceived')}</p>
|
|
118
|
-
<Button
|
|
119
|
-
variant="outline"
|
|
120
|
-
className="w-full"
|
|
121
|
-
onClick={handleResend}
|
|
122
|
-
disabled={isResending}
|
|
123
|
-
>
|
|
124
|
-
{isResending ? t('verifyEmail.resending') : t('verifyEmail.resend')}
|
|
125
|
-
</Button>
|
|
126
|
-
|
|
127
|
-
<Button
|
|
128
|
-
type="button"
|
|
129
|
-
onClick={() => navigate('/login')}
|
|
130
|
-
variant="outline"
|
|
131
|
-
className="w-full text-muted-foreground hover:text-foreground"
|
|
132
|
-
>
|
|
133
|
-
<ArrowLeft className="w-4 h-4 mr-2" />
|
|
134
|
-
{t('verifyEmail.backToLogin')}
|
|
135
|
-
</Button>
|
|
136
|
-
</div>
|
|
137
|
-
|
|
138
|
-
{/* Divider */}
|
|
139
|
-
<div className="relative">
|
|
140
|
-
<div className="absolute inset-0 flex items-center">
|
|
141
|
-
<div className="w-full border-t border-border"></div>
|
|
142
|
-
</div>
|
|
143
|
-
<div className="relative flex justify-center text-sm">
|
|
144
|
-
<span className="bg-muted px-2 text-muted-foreground">
|
|
145
|
-
{t('login.orContinueWith')}
|
|
146
|
-
</span>
|
|
147
|
-
</div>
|
|
58
|
+
<div className="flex items-center justify-center mb-4">
|
|
59
|
+
<div className="p-4 bg-primary/10 rounded-[var(--radius)]">
|
|
60
|
+
<Mail className="w-12 h-12 text-primary" />
|
|
148
61
|
</div>
|
|
62
|
+
</div>
|
|
149
63
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
type="button"
|
|
155
|
-
variant="outline"
|
|
156
|
-
className="w-full justify-center"
|
|
157
|
-
onClick={() => handleSocialLogin('Google')}
|
|
158
|
-
>
|
|
159
|
-
<svg className="w-5 h-5 mr-2" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
|
|
160
|
-
<path
|
|
161
|
-
fill="#EA4335"
|
|
162
|
-
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"
|
|
163
|
-
></path>
|
|
164
|
-
<path
|
|
165
|
-
fill="#4285F4"
|
|
166
|
-
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"
|
|
167
|
-
></path>
|
|
168
|
-
<path
|
|
169
|
-
fill="#FBBC05"
|
|
170
|
-
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"
|
|
171
|
-
></path>
|
|
172
|
-
<path
|
|
173
|
-
fill="#34A853"
|
|
174
|
-
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"
|
|
175
|
-
></path>
|
|
176
|
-
<path fill="none" d="M0 0h48v48H0z"></path>
|
|
177
|
-
</svg>
|
|
178
|
-
<span>{t('login.signInWithGoogle')}</span>
|
|
179
|
-
</Button>
|
|
64
|
+
<h2 className="text-sm text-muted-foreground">{t('verifyEmail.heading')}</h2>
|
|
65
|
+
<p className="mt-2 text-muted-foreground">{t('verifyEmail.instructionsSent')}</p>
|
|
66
|
+
<p className="mt-1 text-primary">{email}</p>
|
|
67
|
+
</div>
|
|
180
68
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
<Lock className="w-5 h-5 mr-2 text-[var(--chart-4)]" />
|
|
189
|
-
<span>{t('login.signInWithMTLogin')}</span>
|
|
190
|
-
</Button>
|
|
69
|
+
<div className="bg-accent rounded-[var(--radius)] p-4 space-y-3">
|
|
70
|
+
<p className="text-muted-foreground">{t('verifyEmail.instructions')}</p>
|
|
71
|
+
<div className="flex items-start gap-2 text-muted-foreground">
|
|
72
|
+
<CheckCircle2 className="w-4 h-4 mt-0.5 flex-shrink-0 text-[var(--chart-2)]" />
|
|
73
|
+
<span className="text-sm">{t('verifyEmail.checkSpam')}</span>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
191
76
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
className="w-full justify-center font-normal"
|
|
197
|
-
onClick={() => handleSocialLogin('gov.br')}
|
|
198
|
-
>
|
|
199
|
-
<span>{t('login.signInWithGovBr')}</span>
|
|
200
|
-
</Button>
|
|
201
|
-
</div>
|
|
77
|
+
{resendSuccess && (
|
|
78
|
+
<div className="bg-[var(--chart-2)]/10 border border-[var(--chart-2)]/20 rounded-[var(--radius)] p-3 flex items-center gap-2">
|
|
79
|
+
<CheckCircle2 className="w-5 h-5 text-[var(--chart-2)] flex-shrink-0" />
|
|
80
|
+
<span className="text-sm text-[var(--chart-2)]">{t('verifyEmail.resentSuccess')}</span>
|
|
202
81
|
</div>
|
|
82
|
+
)}
|
|
83
|
+
|
|
84
|
+
<div className="space-y-3">
|
|
85
|
+
<p className="text-center text-muted-foreground">{t('verifyEmail.notReceived')}</p>
|
|
86
|
+
<Button variant="outline" className="w-full" onClick={handleResend} disabled={isResending}>
|
|
87
|
+
{isResending ? t('verifyEmail.resending') : t('verifyEmail.resend')}
|
|
88
|
+
</Button>
|
|
89
|
+
|
|
90
|
+
<Button
|
|
91
|
+
type="button"
|
|
92
|
+
onClick={() => navigate('/login')}
|
|
93
|
+
variant="outline"
|
|
94
|
+
className="w-full text-muted-foreground hover:text-foreground"
|
|
95
|
+
>
|
|
96
|
+
<ArrowLeft className="w-4 h-4 mr-2" />
|
|
97
|
+
{t('verifyEmail.backToLogin')}
|
|
98
|
+
</Button>
|
|
203
99
|
</div>
|
|
204
|
-
|
|
100
|
+
|
|
101
|
+
<SocialLoginButtons onSocialLogin={handleSocialLogin} />
|
|
102
|
+
</AuthPageShell>
|
|
205
103
|
);
|
|
206
104
|
}
|