xertica-ui 2.9.7 → 2.9.9
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/bin/language-config.ts +17 -9
- package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +19 -5
- package/components/pages/login-page/LoginPage.tsx +19 -5
- package/components/pages/reset-password-page/ResetPasswordPage.tsx +15 -2
- package/components/pages/verify-email-page/VerifyEmailPage.tsx +17 -3
- package/dist/AssistenteContext-Bm8_RJTB.js +200 -0
- package/dist/AssistenteContext-CLK8tgdt.cjs +205 -0
- package/dist/BrandColorsContext-D3Y0CYZF.js +643 -0
- package/dist/BrandColorsContext-SeOZd2Cq.cjs +646 -0
- package/dist/VerifyEmailPage-BInYcjRd.cjs +3305 -0
- package/dist/VerifyEmailPage-Z-cA_IIo.js +3295 -0
- package/dist/XerticaProvider-Ck996htf.cjs +47 -0
- package/dist/XerticaProvider-kE5l0MQn.js +45 -0
- package/dist/brand.cjs.js +1 -1
- package/dist/brand.es.js +1 -1
- package/dist/cli.js +12 -7
- package/dist/components/pages/forgot-password-page/ForgotPasswordPage.d.ts +4 -3
- package/dist/components/pages/login-page/LoginPage.d.ts +4 -3
- package/dist/components/pages/verify-email-page/VerifyEmailPage.d.ts +2 -1
- package/dist/hooks.cjs.js +6 -5
- package/dist/hooks.es.js +2 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +2 -2
- package/dist/pages.cjs.js +1 -1
- package/dist/pages.es.js +1 -1
- package/package.json +1 -1
- package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +15 -2
- package/templates/src/features/auth/ui/LoginContent.tsx +15 -2
- package/templates/src/features/auth/ui/ResetPasswordContent.tsx +15 -2
- package/templates/src/features/auth/ui/VerifyEmailContent.tsx +15 -2
- package/templates/src/styles/index.css +5 -0
- package/templates/tsconfig.node.json +1 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
const AssistenteContext = require('./AssistenteContext-CLK8tgdt.cjs');
|
|
5
|
+
const BrandColorsContext = require('./BrandColorsContext-SeOZd2Cq.cjs');
|
|
6
|
+
const LanguageContext = require('./LanguageContext-ubC7TSs_.cjs');
|
|
7
|
+
const LayoutContext = require('./LayoutContext-BEq_-n98.cjs');
|
|
8
|
+
const ThemeContext = require('./ThemeContext-CEY9pCn-.cjs');
|
|
9
|
+
const googleMapsLoader = require('./google-maps-loader-DfeBRI8Q.cjs');
|
|
10
|
+
const sonner = require('./sonner-B-jWlik1.cjs');
|
|
11
|
+
const tooltip = require('./tooltip-CIKRzQqE.cjs');
|
|
12
|
+
|
|
13
|
+
function XerticaProvider({
|
|
14
|
+
children,
|
|
15
|
+
apiKey,
|
|
16
|
+
googleMapsApiKey,
|
|
17
|
+
defaultBrandTheme,
|
|
18
|
+
defaultColorTheme,
|
|
19
|
+
primaryColor,
|
|
20
|
+
useCustomTokens,
|
|
21
|
+
disableDarkMode,
|
|
22
|
+
availableLanguages,
|
|
23
|
+
defaultLanguage
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.ThemeProvider, { disableDarkMode, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
26
|
+
BrandColorsContext.BrandColorsProvider,
|
|
27
|
+
{
|
|
28
|
+
defaultTheme: defaultColorTheme || defaultBrandTheme,
|
|
29
|
+
primaryColor,
|
|
30
|
+
useCustomTokens,
|
|
31
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(LanguageContext.LanguageProvider, { availableLanguages, defaultLanguage, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32
|
+
AssistenteContext.ApiKeyProvider,
|
|
33
|
+
{
|
|
34
|
+
initialApiKey: apiKey,
|
|
35
|
+
initialGeminiApiKey: apiKey,
|
|
36
|
+
initialGoogleMapsApiKey: googleMapsApiKey,
|
|
37
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(googleMapsLoader.GoogleMapsLoaderProvider, { apiKey: googleMapsApiKey, children: /* @__PURE__ */ jsxRuntime.jsx(AssistenteContext.AssistenteProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(LayoutContext.LayoutProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(tooltip.TooltipProvider, { children: [
|
|
38
|
+
children,
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsx(sonner.Toaster, { position: "top-right", richColors: true })
|
|
40
|
+
] }) }) }) })
|
|
41
|
+
}
|
|
42
|
+
) })
|
|
43
|
+
}
|
|
44
|
+
) });
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
exports.XerticaProvider = XerticaProvider;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { A as ApiKeyProvider, a as AssistenteProvider } from './AssistenteContext-Bm8_RJTB.js';
|
|
3
|
+
import { B as BrandColorsProvider } from './BrandColorsContext-D3Y0CYZF.js';
|
|
4
|
+
import { L as LanguageProvider } from './LanguageContext-B1aOXO-K.js';
|
|
5
|
+
import { L as LayoutProvider } from './LayoutContext-DNl1xSoX.js';
|
|
6
|
+
import { T as ThemeProvider } from './ThemeContext-Dk3tH7Ym.js';
|
|
7
|
+
import { b as GoogleMapsLoaderProvider } from './google-maps-loader-BOug999f.js';
|
|
8
|
+
import { T as Toaster } from './sonner-C9tiqj4f.js';
|
|
9
|
+
import { b as TooltipProvider } from './tooltip-_MAwsiOL.js';
|
|
10
|
+
|
|
11
|
+
function XerticaProvider({
|
|
12
|
+
children,
|
|
13
|
+
apiKey,
|
|
14
|
+
googleMapsApiKey,
|
|
15
|
+
defaultBrandTheme,
|
|
16
|
+
defaultColorTheme,
|
|
17
|
+
primaryColor,
|
|
18
|
+
useCustomTokens,
|
|
19
|
+
disableDarkMode,
|
|
20
|
+
availableLanguages,
|
|
21
|
+
defaultLanguage
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ jsx(ThemeProvider, { disableDarkMode, children: /* @__PURE__ */ jsx(
|
|
24
|
+
BrandColorsProvider,
|
|
25
|
+
{
|
|
26
|
+
defaultTheme: defaultColorTheme || defaultBrandTheme,
|
|
27
|
+
primaryColor,
|
|
28
|
+
useCustomTokens,
|
|
29
|
+
children: /* @__PURE__ */ jsx(LanguageProvider, { availableLanguages, defaultLanguage, children: /* @__PURE__ */ jsx(
|
|
30
|
+
ApiKeyProvider,
|
|
31
|
+
{
|
|
32
|
+
initialApiKey: apiKey,
|
|
33
|
+
initialGeminiApiKey: apiKey,
|
|
34
|
+
initialGoogleMapsApiKey: googleMapsApiKey,
|
|
35
|
+
children: /* @__PURE__ */ jsx(GoogleMapsLoaderProvider, { apiKey: googleMapsApiKey, children: /* @__PURE__ */ jsx(AssistenteProvider, { children: /* @__PURE__ */ jsx(LayoutProvider, { children: /* @__PURE__ */ jsxs(TooltipProvider, { children: [
|
|
36
|
+
children,
|
|
37
|
+
/* @__PURE__ */ jsx(Toaster, { position: "top-right", richColors: true })
|
|
38
|
+
] }) }) }) })
|
|
39
|
+
}
|
|
40
|
+
) })
|
|
41
|
+
}
|
|
42
|
+
) });
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { XerticaProvider as X };
|
package/dist/brand.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const XerticaProvider = require('./XerticaProvider-
|
|
5
|
+
const XerticaProvider = require('./XerticaProvider-Ck996htf.cjs');
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
const button = require('./button-BMDlWZR8.cjs');
|
|
8
8
|
const IsotypeTwist = require('./IsotypeTwist-DvsUgZs_.cjs');
|
package/dist/brand.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { X as XerticaProvider } from './XerticaProvider-
|
|
1
|
+
export { X as XerticaProvider } from './XerticaProvider-kE5l0MQn.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { c as cn } from './button-B05czY_8.js';
|
|
4
4
|
import { I as ISOTYPE_PATTERNS, g as getIsotypeVariant, a as ISOTYPE_COLORS, m as mulberry32 } from './IsotypeTwist-BTdNL4iV.js';
|
package/dist/cli.js
CHANGED
|
@@ -901,19 +901,24 @@ export default function App() {
|
|
|
901
901
|
}
|
|
902
902
|
function generateLandingAppTsx(selectedCodes, disableDarkMode = false) {
|
|
903
903
|
const disableDarkModeProp = disableDarkMode ? `
|
|
904
|
-
|
|
905
|
-
const availableLanguagesProp = buildAvailableLanguagesProp(selectedCodes, "
|
|
904
|
+
disableDarkMode={true}` : "";
|
|
905
|
+
const availableLanguagesProp = buildAvailableLanguagesProp(selectedCodes, " ");
|
|
906
906
|
return `import React from 'react';
|
|
907
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
907
908
|
import { XerticaProvider } from 'xertica-ui/brand';
|
|
908
909
|
import { LandingPage } from '../pages/LandingPage';
|
|
909
910
|
|
|
911
|
+
const queryClient = new QueryClient();
|
|
912
|
+
|
|
910
913
|
export default function App() {
|
|
911
914
|
return (
|
|
912
|
-
<
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
915
|
+
<QueryClientProvider client={queryClient}>
|
|
916
|
+
<XerticaProvider
|
|
917
|
+
useCustomTokens={true}${availableLanguagesProp}${disableDarkModeProp}
|
|
918
|
+
>
|
|
919
|
+
<LandingPage />
|
|
920
|
+
</XerticaProvider>
|
|
921
|
+
</QueryClientProvider>
|
|
917
922
|
);
|
|
918
923
|
}
|
|
919
924
|
`;
|
|
@@ -4,11 +4,12 @@ import React from 'react';
|
|
|
4
4
|
*
|
|
5
5
|
* @description
|
|
6
6
|
* A screen that allows users to request a password reset link via email.
|
|
7
|
-
* Includes
|
|
8
|
-
*
|
|
7
|
+
* Includes a side-panel (desktop) and alternative social login options
|
|
8
|
+
* similar to the main Login page.
|
|
9
9
|
*
|
|
10
10
|
* @ai-rules
|
|
11
11
|
* 1. Navigation: Successfully submitting the email triggers a navigation to `/verify-email`.
|
|
12
|
-
* 2. Visuals: Keeps consistency with `LoginPage` in terms of layout and branding
|
|
12
|
+
* 2. Visuals: Keeps consistency with `LoginPage` in terms of layout and branding, including
|
|
13
|
+
* the theme-conditional isotype/hero-image left panel.
|
|
13
14
|
*/
|
|
14
15
|
export declare function ForgotPasswordPage(): React.JSX.Element;
|
|
@@ -13,13 +13,14 @@ interface LoginPageProps {
|
|
|
13
13
|
* Standard Login Page component.
|
|
14
14
|
*
|
|
15
15
|
* @description
|
|
16
|
-
* A complete, responsive login screen featuring a
|
|
17
|
-
*
|
|
16
|
+
* A complete, responsive login screen featuring a side-panel (on desktop) and a
|
|
17
|
+
* focused authentication form. Supports email/password login and placeholders
|
|
18
18
|
* for Social/SSO providers (Google, MT Login, gov.br).
|
|
19
19
|
*
|
|
20
20
|
* @ai-rules
|
|
21
21
|
* 1. State Management: You must provide the `onLogin` callback to handle the actual authentication logic.
|
|
22
|
-
* 2. Visuals: Left panel renders
|
|
22
|
+
* 2. Visuals: Left panel renders the brand isotype only when the `xertica` theme is active
|
|
23
|
+
* (`AuthPageShell`'s `leftPanel="isotype"`); every other theme shows the original hero image.
|
|
23
24
|
* 3. Routing: Uses `react-router` for navigation to the forgot-password flow.
|
|
24
25
|
*/
|
|
25
26
|
export declare function LoginPage({ onLogin }: LoginPageProps): React.JSX.Element;
|
|
@@ -5,7 +5,8 @@ import React from 'react';
|
|
|
5
5
|
* @description
|
|
6
6
|
* An informative screen shown after a password reset request. It instructs
|
|
7
7
|
* the user to check their email and provides a "Resend email" feature.
|
|
8
|
-
* Includes the same consistent layout
|
|
8
|
+
* Includes the same consistent layout as the other auth pages, including the
|
|
9
|
+
* theme-conditional isotype/hero-image left panel.
|
|
9
10
|
*
|
|
10
11
|
* @ai-rules
|
|
11
12
|
* 1. Data Source: It retrieves the email from the router's `location.state`.
|
package/dist/hooks.cjs.js
CHANGED
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const LayoutContext = require('./LayoutContext-BEq_-n98.cjs');
|
|
6
6
|
const ThemeContext = require('./ThemeContext-CEY9pCn-.cjs');
|
|
7
7
|
const LanguageContext = require('./LanguageContext-ubC7TSs_.cjs');
|
|
8
|
-
const BrandColorsContext = require('./BrandColorsContext-
|
|
8
|
+
const BrandColorsContext = require('./BrandColorsContext-SeOZd2Cq.cjs');
|
|
9
|
+
const AssistenteContext = require('./AssistenteContext-CLK8tgdt.cjs');
|
|
9
10
|
const useMobile = require('./use-mobile-BdXTRb0Z.cjs');
|
|
10
11
|
const React = require('react');
|
|
11
12
|
const useAudioPlayer = require('./use-audio-player-DGvhPrgR.cjs');
|
|
@@ -34,12 +35,12 @@ exports.useTheme = ThemeContext.useTheme;
|
|
|
34
35
|
exports.DEFAULT_LANGUAGES = LanguageContext.DEFAULT_LANGUAGES;
|
|
35
36
|
exports.LanguageProvider = LanguageContext.LanguageProvider;
|
|
36
37
|
exports.useLanguage = LanguageContext.useLanguage;
|
|
37
|
-
exports.ApiKeyProvider = BrandColorsContext.ApiKeyProvider;
|
|
38
|
-
exports.AssistenteProvider = BrandColorsContext.AssistenteProvider;
|
|
39
38
|
exports.BrandColorsProvider = BrandColorsContext.BrandColorsProvider;
|
|
40
|
-
exports.useApiKey = BrandColorsContext.useApiKey;
|
|
41
|
-
exports.useAssistente = BrandColorsContext.useAssistente;
|
|
42
39
|
exports.useBrandColors = BrandColorsContext.useBrandColors;
|
|
40
|
+
exports.ApiKeyProvider = AssistenteContext.ApiKeyProvider;
|
|
41
|
+
exports.AssistenteProvider = AssistenteContext.AssistenteProvider;
|
|
42
|
+
exports.useApiKey = AssistenteContext.useApiKey;
|
|
43
|
+
exports.useAssistente = AssistenteContext.useAssistente;
|
|
43
44
|
exports.useIsMobile = useMobile.useIsMobile;
|
|
44
45
|
exports.useMobile = useMobile.useMobile;
|
|
45
46
|
exports.useAudioPlayer = useAudioPlayer.useAudioPlayer;
|
package/dist/hooks.es.js
CHANGED
|
@@ -2,7 +2,8 @@ import { u as useLayout } from './LayoutContext-DNl1xSoX.js';
|
|
|
2
2
|
export { L as LayoutProvider, a as useOptionalLayout } from './LayoutContext-DNl1xSoX.js';
|
|
3
3
|
export { T as ThemeProvider, u as useTheme } from './ThemeContext-Dk3tH7Ym.js';
|
|
4
4
|
export { D as DEFAULT_LANGUAGES, L as LanguageProvider, u as useLanguage } from './LanguageContext-B1aOXO-K.js';
|
|
5
|
-
export {
|
|
5
|
+
export { B as BrandColorsProvider, u as useBrandColors } from './BrandColorsContext-D3Y0CYZF.js';
|
|
6
|
+
export { A as ApiKeyProvider, a as AssistenteProvider, u as useApiKey, b as useAssistente } from './AssistenteContext-Bm8_RJTB.js';
|
|
6
7
|
export { u as useIsMobile, a as useMobile } from './use-mobile-Ce2cBAQe.js';
|
|
7
8
|
import { useEffect } from 'react';
|
|
8
9
|
export { u as useAudioPlayer } from './use-audio-player-B78fd2ct.js';
|
package/dist/index.cjs.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const xerticaAssistant = require('./xertica-assistant-DdYS6WXT.cjs');
|
|
6
|
-
const XerticaProvider = require('./XerticaProvider-
|
|
7
|
-
const VerifyEmailPage = require('./VerifyEmailPage-
|
|
6
|
+
const XerticaProvider = require('./XerticaProvider-Ck996htf.cjs');
|
|
7
|
+
const VerifyEmailPage = require('./VerifyEmailPage-BInYcjRd.cjs');
|
|
8
8
|
const button = require('./button-BMDlWZR8.cjs');
|
|
9
9
|
const skeleton = require('./skeleton-D8WaauK0.cjs');
|
|
10
10
|
const alertDialog = require('./alert-dialog-C48TOdYU.cjs');
|
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { F as FormattedDocument, M as MarkdownMessage, a as ModernChatInput, X as XerticaAssistant, g as generateDemoResponse, g as gerarResposta } from './xertica-assistant-B1xAl2Vn.js';
|
|
2
|
-
export { X as XerticaProvider } from './XerticaProvider-
|
|
3
|
-
export { F as ForgotPasswordPage, H as HomeContent, a as HomePage, L as LandingPage, b as LoginPage, R as ResetPasswordPage, T as TemplateContent, c as TemplatePage, V as VerifyEmailPage } from './VerifyEmailPage-
|
|
2
|
+
export { X as XerticaProvider } from './XerticaProvider-kE5l0MQn.js';
|
|
3
|
+
export { F as ForgotPasswordPage, H as HomeContent, a as HomePage, L as LandingPage, b as LoginPage, R as ResetPasswordPage, T as TemplateContent, c as TemplatePage, V as VerifyEmailPage } from './VerifyEmailPage-Z-cA_IIo.js';
|
|
4
4
|
export { B as Button, b as buttonVariants, c as cn } from './button-B05czY_8.js';
|
|
5
5
|
export { C as Card, a as CardAction, b as CardContent, c as CardDescription, d as CardFooter, e as CardHeader, f as CardTitle, S as Skeleton } from './skeleton-BtBwJ39W.js';
|
|
6
6
|
export { A as AlertDialog, a as AlertDialogAction, b as AlertDialogCancel, c as AlertDialogContent, d as AlertDialogDescription, e as AlertDialogFooter, f as AlertDialogHeader, g as AlertDialogOverlay, h as AlertDialogPortal, i as AlertDialogTitle, j as AlertDialogTrigger, C as Checkbox, L as Label, M as Map, P as PageHeader, k as PageHeaderDescription, l as PageHeaderHeading, R as RadioGroup, m as RadioGroupItem, S as Separator, n as Switch, T as Tabs, o as TabsContent, p as TabsList, q as TabsTrigger, u as useMapLayers } from './alert-dialog-NjflitDa.js';
|
package/dist/pages.cjs.js
CHANGED
package/dist/pages.es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { F as ForgotPasswordPage, H as HomeContent, a as HomePage, L as LandingPage, b as LoginPage, R as ResetPasswordPage, T as TemplateContent, c as TemplatePage, V as VerifyEmailPage } from './VerifyEmailPage-
|
|
1
|
+
export { F as ForgotPasswordPage, H as HomeContent, a as HomePage, L as LandingPage, b as LoginPage, R as ResetPasswordPage, T as TemplateContent, c as TemplatePage, V as VerifyEmailPage } from './VerifyEmailPage-Z-cA_IIo.js';
|
package/package.json
CHANGED
|
@@ -5,10 +5,12 @@ import { ArrowLeft } from 'lucide-react';
|
|
|
5
5
|
import { useNavigate } from 'react-router-dom';
|
|
6
6
|
import { AuthPageShell, SocialLoginButtons } from 'xertica-ui/blocks';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
|
+
import { useBrandColors } from 'xertica-ui/hooks';
|
|
8
9
|
|
|
9
10
|
export function ForgotPasswordContent() {
|
|
10
11
|
const navigate = useNavigate();
|
|
11
12
|
const { t } = useTranslation();
|
|
13
|
+
const { currentTheme } = useBrandColors();
|
|
12
14
|
const [email, setEmail] = useState('');
|
|
13
15
|
const [isLoading, setIsLoading] = useState(false);
|
|
14
16
|
|
|
@@ -20,8 +22,8 @@ export function ForgotPasswordContent() {
|
|
|
20
22
|
setIsLoading(false);
|
|
21
23
|
};
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
const content = (
|
|
26
|
+
<>
|
|
25
27
|
<div className="text-center">
|
|
26
28
|
<div className="flex items-center justify-center mb-4">
|
|
27
29
|
<XerticaLogo className="h-12 w-auto text-primary dark:text-foreground" variant="theme" />
|
|
@@ -61,6 +63,17 @@ export function ForgotPasswordContent() {
|
|
|
61
63
|
</form>
|
|
62
64
|
|
|
63
65
|
<SocialLoginButtons onSocialLogin={provider => console.log(`Login com ${provider}`)} />
|
|
66
|
+
</>
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
return currentTheme === 'xertica' ? (
|
|
70
|
+
<AuthPageShell leftPanel="isotype">{content}</AuthPageShell>
|
|
71
|
+
) : (
|
|
72
|
+
<AuthPageShell
|
|
73
|
+
imageSrc="https://images.unsplash.com/photo-1557804506-669a67965ba0?w=1200&h=800&fit=crop&auto=format"
|
|
74
|
+
imageAlt={t('forgotPassword.heroImageAlt')}
|
|
75
|
+
>
|
|
76
|
+
{content}
|
|
64
77
|
</AuthPageShell>
|
|
65
78
|
);
|
|
66
79
|
}
|
|
@@ -4,6 +4,7 @@ import { XerticaLogo } from 'xertica-ui/brand';
|
|
|
4
4
|
import { useNavigate } from 'react-router-dom';
|
|
5
5
|
import { AuthPageShell, SocialLoginButtons } from 'xertica-ui/blocks';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
+
import { useBrandColors } from 'xertica-ui/hooks';
|
|
7
8
|
|
|
8
9
|
interface LoginContentProps {
|
|
9
10
|
onLogin: (email: string, password: string) => boolean;
|
|
@@ -12,6 +13,7 @@ interface LoginContentProps {
|
|
|
12
13
|
export function LoginContent({ onLogin }: LoginContentProps) {
|
|
13
14
|
const navigate = useNavigate();
|
|
14
15
|
const { t } = useTranslation();
|
|
16
|
+
const { currentTheme } = useBrandColors();
|
|
15
17
|
const [email, setEmail] = useState('');
|
|
16
18
|
const [password, setPassword] = useState('');
|
|
17
19
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -26,8 +28,8 @@ export function LoginContent({ onLogin }: LoginContentProps) {
|
|
|
26
28
|
setIsLoading(false);
|
|
27
29
|
};
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
const content = (
|
|
32
|
+
<>
|
|
31
33
|
<div className="text-center">
|
|
32
34
|
<div className="flex items-center justify-center mb-4">
|
|
33
35
|
<XerticaLogo className="h-12 w-auto text-primary dark:text-foreground" variant="theme" />
|
|
@@ -83,6 +85,17 @@ export function LoginContent({ onLogin }: LoginContentProps) {
|
|
|
83
85
|
onLogin('social@user.com', 'social-auth');
|
|
84
86
|
}}
|
|
85
87
|
/>
|
|
88
|
+
</>
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
return currentTheme === 'xertica' ? (
|
|
92
|
+
<AuthPageShell leftPanel="isotype">{content}</AuthPageShell>
|
|
93
|
+
) : (
|
|
94
|
+
<AuthPageShell
|
|
95
|
+
imageSrc="https://images.unsplash.com/photo-1551434678-e076c223a692?w=1200&h=800&fit=crop&auto=format"
|
|
96
|
+
imageAlt={t('login.heroImageAlt')}
|
|
97
|
+
>
|
|
98
|
+
{content}
|
|
86
99
|
</AuthPageShell>
|
|
87
100
|
);
|
|
88
101
|
}
|
|
@@ -5,10 +5,12 @@ import { AuthPageShell, usePasswordStrength, PasswordStrengthMeter } from 'xerti
|
|
|
5
5
|
import { ArrowLeft, CheckCircle2, AlertCircle } from 'lucide-react';
|
|
6
6
|
import { useNavigate } from 'react-router-dom';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
|
+
import { useBrandColors } from 'xertica-ui/hooks';
|
|
8
9
|
|
|
9
10
|
export function ResetPasswordContent() {
|
|
10
11
|
const navigate = useNavigate();
|
|
11
12
|
const { t } = useTranslation();
|
|
13
|
+
const { currentTheme } = useBrandColors();
|
|
12
14
|
const [password, setPassword] = useState('');
|
|
13
15
|
const [confirmPassword, setConfirmPassword] = useState('');
|
|
14
16
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -37,8 +39,8 @@ export function ResetPasswordContent() {
|
|
|
37
39
|
setIsLoading(false);
|
|
38
40
|
};
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
const content = (
|
|
43
|
+
<>
|
|
42
44
|
<button
|
|
43
45
|
onClick={() => navigate('/login')}
|
|
44
46
|
className="flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors"
|
|
@@ -121,6 +123,17 @@ export function ResetPasswordContent() {
|
|
|
121
123
|
{isLoading ? t('resetPassword.submitting') : t('resetPassword.submit')}
|
|
122
124
|
</Button>
|
|
123
125
|
</form>
|
|
126
|
+
</>
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
return currentTheme === 'xertica' ? (
|
|
130
|
+
<AuthPageShell leftPanel="isotype">{content}</AuthPageShell>
|
|
131
|
+
) : (
|
|
132
|
+
<AuthPageShell
|
|
133
|
+
imageSrc="https://images.unsplash.com/photo-1555949963-aa79dcee981c?w=1200&h=800&fit=crop&auto=format"
|
|
134
|
+
imageAlt={t('resetPassword.heroImageAlt')}
|
|
135
|
+
>
|
|
136
|
+
{content}
|
|
124
137
|
</AuthPageShell>
|
|
125
138
|
);
|
|
126
139
|
}
|
|
@@ -5,11 +5,13 @@ import { ArrowLeft, Mail, CheckCircle2 } from 'lucide-react';
|
|
|
5
5
|
import { useNavigate, useLocation } from 'react-router-dom';
|
|
6
6
|
import { AuthPageShell, SocialLoginButtons } from 'xertica-ui/blocks';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
|
+
import { useBrandColors } from 'xertica-ui/hooks';
|
|
8
9
|
|
|
9
10
|
export function VerifyEmailContent() {
|
|
10
11
|
const navigate = useNavigate();
|
|
11
12
|
const location = useLocation();
|
|
12
13
|
const { t } = useTranslation();
|
|
14
|
+
const { currentTheme } = useBrandColors();
|
|
13
15
|
const email = location.state?.email || 'seu@email.com';
|
|
14
16
|
const [isResending, setIsResending] = useState(false);
|
|
15
17
|
const [resendSuccess, setResendSuccess] = useState(false);
|
|
@@ -23,8 +25,8 @@ export function VerifyEmailContent() {
|
|
|
23
25
|
setTimeout(() => setResendSuccess(false), 3000);
|
|
24
26
|
};
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
const content = (
|
|
29
|
+
<>
|
|
28
30
|
<div className="text-center">
|
|
29
31
|
<div className="flex items-center justify-center mb-4">
|
|
30
32
|
<XerticaLogo className="h-12 w-auto text-primary dark:text-foreground" variant="theme" />
|
|
@@ -71,6 +73,17 @@ export function VerifyEmailContent() {
|
|
|
71
73
|
</div>
|
|
72
74
|
|
|
73
75
|
<SocialLoginButtons onSocialLogin={provider => console.log(`Login com ${provider}`)} />
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
return currentTheme === 'xertica' ? (
|
|
80
|
+
<AuthPageShell leftPanel="isotype">{content}</AuthPageShell>
|
|
81
|
+
) : (
|
|
82
|
+
<AuthPageShell
|
|
83
|
+
imageSrc="https://images.unsplash.com/photo-1563986768609-322da13575f3?w=1200&h=800&fit=crop&auto=format"
|
|
84
|
+
imageAlt={t('verifyEmail.heroImageAlt')}
|
|
85
|
+
>
|
|
86
|
+
{content}
|
|
74
87
|
</AuthPageShell>
|
|
75
88
|
);
|
|
76
89
|
}
|