xertica-ui 2.3.0 → 2.4.1
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 +22 -2
- package/README.md +33 -22
- package/bin/cli.ts +136 -47
- package/bin/language-config.ts +5 -8
- package/components/assistant/modern-chat-input/ModernChatInput.tsx +17 -7
- package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +1 -3
- package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +13 -3
- package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +10 -6
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +1 -3
- package/components/blocks/card-patterns/FeatureCardSkeleton.tsx +1 -6
- package/components/blocks/card-patterns/ProfileCard.tsx +1 -3
- package/components/blocks/card-patterns/ProjectCardSkeleton.tsx +1 -6
- package/components/brand/language-selector/language-selector.stories.tsx +1 -4
- package/components/brand/theme-toggle/ThemeToggle.tsx +5 -1
- package/components/brand/xertica-provider/XerticaProvider.tsx +1 -4
- package/components/index.ts +1 -5
- package/components/layout/sidebar/sidebar.tsx +9 -3
- package/components/media/audio-player/AudioPlayer.tsx +4 -2
- package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +188 -188
- package/components/pages/home-content/HomeContent.tsx +55 -55
- package/components/pages/home-page/HomePage.tsx +5 -1
- package/components/pages/login-page/LoginPage.tsx +4 -2
- package/components/pages/reset-password-page/ResetPasswordPage.tsx +7 -3
- package/components/pages/template-content/TemplateContent.tsx +268 -149
- package/components/pages/verify-email-page/VerifyEmailPage.tsx +9 -9
- package/components/shared/error-boundary.stories.tsx +114 -132
- package/components/shared/error-boundary.tsx +150 -154
- package/components/shared/error-fallbacks.tsx +222 -226
- package/components/ui/stats-card/stats-card-skeleton.tsx +1 -3
- package/components/ui/stats-card/stats-card.stories.tsx +18 -0
- package/components/ui/stats-card/stats-card.tsx +18 -2
- package/components.json +512 -892
- package/contexts/AuthContext.tsx +121 -118
- package/contexts/LanguageContext.tsx +1 -2
- package/dist/AssistantChart-BKVtGUKF.js +3383 -0
- package/dist/AssistantChart-WeycT5Pd.cjs +3551 -0
- package/dist/VerifyEmailPage-Bp1XXl3H.cjs +3305 -0
- package/dist/VerifyEmailPage-DGhuIqkb.js +3296 -0
- package/dist/XerticaProvider-BErr83Bg.js +42 -0
- package/dist/XerticaProvider-CwOkHxiT.cjs +44 -0
- package/dist/XerticaXLogo-BX3ueACh.js +255 -0
- package/dist/XerticaXLogo-qBPhwK3g.cjs +260 -0
- package/dist/assistant.cjs.js +1 -1
- package/dist/assistant.es.js +1 -1
- package/dist/brand.cjs.js +2 -2
- package/dist/brand.es.js +2 -2
- package/dist/cli.js +90 -37
- package/dist/components/brand/theme-toggle/ThemeToggle.d.ts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/ui/stats-card/stats-card.d.ts +10 -0
- package/dist/index.cjs.js +6 -6
- package/dist/index.es.js +6 -6
- 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-B4ZWaMrE.js +792 -0
- package/dist/sidebar-BS1p2V7t.cjs +795 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/xertica-assistant-B1NaSFFj.js +2173 -0
- package/dist/xertica-assistant-CIaUlbIt.cjs +2180 -0
- package/dist/xertica-ui.css +1 -1
- package/docs/architecture-improvements.md +5 -5
- package/docs/architecture.md +16 -10
- package/docs/components/card-patterns.md +19 -17
- package/docs/components/error-boundary.md +201 -191
- package/docs/components/hooks.md +15 -13
- package/docs/components/language-selector.md +20 -16
- package/docs/components/pages.md +323 -309
- package/docs/components/stats-card.md +20 -2
- package/docs/doc-audit.md +12 -11
- package/docs/getting-started.md +41 -28
- package/docs/guidelines.md +14 -12
- package/docs/i18n.md +61 -57
- package/docs/installation.md +268 -267
- package/docs/llms.md +17 -17
- package/docs/state-management.md +17 -17
- package/guidelines/Guidelines.md +17 -14
- package/llms-compact.txt +1 -1
- package/llms-full.txt +11553 -7133
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/styles/xertica/base.css +90 -84
- package/templates/CLAUDE.md +16 -1
- package/templates/guidelines/Guidelines.md +42 -18
- package/templates/package.json +3 -3
- package/templates/src/app/components/AuthGuard.tsx +131 -82
- package/templates/src/features/auth/ui/AuthPageShell.tsx +32 -32
- package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +1 -3
- package/templates/src/features/auth/ui/ResetPasswordContent.tsx +6 -2
- package/templates/src/features/auth/ui/VerifyEmailContent.tsx +2 -6
- package/templates/src/features/home/data/mock.ts +41 -35
- package/templates/src/features/home/ui/HomeContent.tsx +62 -64
- package/templates/src/features/template/ui/CrudTemplate.tsx +1 -4
- package/templates/src/features/template/ui/LoginTemplate.tsx +1 -1
- package/templates/src/features/template/ui/TemplateContent.tsx +28 -20
- package/templates/src/locales/en/pages/templates.json +17 -17
- package/templates/src/locales/es/pages/templates.json +17 -17
- package/templates/src/locales/pt-BR/pages/templates.json +17 -17
- package/templates/src/pages/AssistantPage.tsx +26 -20
- package/templates/src/pages/HomePage.tsx +5 -1
- package/templates/src/shared/error-boundary.tsx +150 -154
- package/templates/src/shared/error-fallbacks.tsx +222 -226
- package/templates/vite.config.ts +12 -9
|
@@ -45,10 +45,7 @@ export function HomeContent() {
|
|
|
45
45
|
<Header
|
|
46
46
|
showThemeToggle={true}
|
|
47
47
|
showLanguageSelector={true}
|
|
48
|
-
breadcrumbs={[
|
|
49
|
-
{ label: t('nav.designSystem'), href: '/home' },
|
|
50
|
-
{ label: t('nav.home') },
|
|
51
|
-
]}
|
|
48
|
+
breadcrumbs={[{ label: t('nav.designSystem'), href: '/home' }, { label: t('nav.home') }]}
|
|
52
49
|
renderLink={(href, props) => <Link to={href} {...props} />}
|
|
53
50
|
/>
|
|
54
51
|
|
|
@@ -56,60 +53,63 @@ export function HomeContent() {
|
|
|
56
53
|
<ScrollArea className="h-full">
|
|
57
54
|
<div className="p-5 sm:p-4 md:p-6">
|
|
58
55
|
<div className="max-w-6xl mx-auto space-y-8">
|
|
59
|
-
<PageHeader
|
|
60
|
-
title={t('home.welcome')}
|
|
61
|
-
subtitle={t('home.subtitle')}
|
|
62
|
-
/>
|
|
56
|
+
<PageHeader title={t('home.welcome')} subtitle={t('home.subtitle')} />
|
|
63
57
|
|
|
64
58
|
<SectionErrorBoundary>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
59
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
60
|
+
{isLoading ? (
|
|
61
|
+
<>
|
|
62
|
+
<FeatureCardSkeleton showAction />
|
|
63
|
+
<FeatureCardSkeleton showAction />
|
|
64
|
+
<FeatureCardSkeleton showAction />
|
|
65
|
+
</>
|
|
66
|
+
) : (
|
|
67
|
+
featureCards.map(card => (
|
|
68
|
+
<Card
|
|
69
|
+
key={card.id}
|
|
70
|
+
className="hover:shadow-xl transition-shadow duration-200 flex flex-col h-full"
|
|
71
|
+
>
|
|
72
|
+
<CardHeader>
|
|
73
|
+
<div className="flex items-center gap-3">
|
|
74
|
+
<div className="p-2 bg-[var(--chart-2)]/20 rounded-[var(--radius)]">
|
|
75
|
+
<FileText className="w-6 h-6 text-[var(--chart-2)]" />
|
|
76
|
+
</div>
|
|
77
|
+
<div className="flex items-center gap-2">
|
|
78
|
+
<CardTitle className="text-sm">
|
|
79
|
+
{t(`home.${card.id.replace(/-/g, '')}Title`, {
|
|
80
|
+
defaultValue: card.title,
|
|
81
|
+
})}
|
|
82
|
+
</CardTitle>
|
|
83
|
+
{card.badge && (
|
|
84
|
+
<Badge variant="default" className="text-xs">
|
|
85
|
+
{t(`home.${card.id.replace(/-/g, '')}badge`, {
|
|
86
|
+
defaultValue: card.badge,
|
|
87
|
+
})}
|
|
88
|
+
</Badge>
|
|
89
|
+
)}
|
|
90
|
+
</div>
|
|
82
91
|
</div>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
onClick={() => navigate(card.href)}
|
|
105
|
-
>
|
|
106
|
-
{t('common.view')}
|
|
107
|
-
</Button>
|
|
108
|
-
</CardFooter>
|
|
109
|
-
</Card>
|
|
110
|
-
))
|
|
111
|
-
)}
|
|
112
|
-
</div>
|
|
92
|
+
</CardHeader>
|
|
93
|
+
<CardContent className="flex-1">
|
|
94
|
+
<p className="text-muted-foreground">
|
|
95
|
+
{t(`home.${card.id.replace(/-/g, '')}Description`, {
|
|
96
|
+
defaultValue: card.description,
|
|
97
|
+
})}
|
|
98
|
+
</p>
|
|
99
|
+
</CardContent>
|
|
100
|
+
<CardFooter>
|
|
101
|
+
<Button
|
|
102
|
+
variant="outline"
|
|
103
|
+
className="w-full"
|
|
104
|
+
onClick={() => navigate(card.href)}
|
|
105
|
+
>
|
|
106
|
+
{t('common.view')}
|
|
107
|
+
</Button>
|
|
108
|
+
</CardFooter>
|
|
109
|
+
</Card>
|
|
110
|
+
))
|
|
111
|
+
)}
|
|
112
|
+
</div>
|
|
113
113
|
</SectionErrorBoundary>
|
|
114
114
|
</div>
|
|
115
115
|
</div>
|
|
@@ -7,7 +7,11 @@ import { gerarResposta } from '../../shared/assistant-utils';
|
|
|
7
7
|
import { routes } from '../../shared/navigation';
|
|
8
8
|
import { useOptionalLayout } from '../../../contexts/LayoutContext';
|
|
9
9
|
import { useAuth } from '../../../contexts/AuthContext';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
useAssistantConfig,
|
|
12
|
+
getMockRichSuggestions,
|
|
13
|
+
getMockFeedbackOptions,
|
|
14
|
+
} from '../../../features/assistant';
|
|
11
15
|
|
|
12
16
|
/**
|
|
13
17
|
* Root Dashboard page component.
|
|
@@ -64,7 +64,7 @@ export function LoginPage({ onLogin }: LoginPageProps) {
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
return (
|
|
67
|
-
<div className="
|
|
67
|
+
<div className="h-screen w-full flex overflow-y-auto">
|
|
68
68
|
{/* Left side - Full background image */}
|
|
69
69
|
<div className="hidden lg:flex lg:flex-1 relative overflow-hidden">
|
|
70
70
|
{/* Background image filling all space */}
|
|
@@ -153,7 +153,9 @@ export function LoginPage({ onLogin }: LoginPageProps) {
|
|
|
153
153
|
<div className="w-full border-t border-border"></div>
|
|
154
154
|
</div>
|
|
155
155
|
<div className="relative flex justify-center text-sm">
|
|
156
|
-
<span className="bg-muted px-2 text-muted-foreground">
|
|
156
|
+
<span className="bg-muted px-2 text-muted-foreground">
|
|
157
|
+
{t('login.orContinueWith')}
|
|
158
|
+
</span>
|
|
157
159
|
</div>
|
|
158
160
|
</div>
|
|
159
161
|
|
|
@@ -108,7 +108,7 @@ export function ResetPasswordPage() {
|
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
return (
|
|
111
|
-
<div className="
|
|
111
|
+
<div className="h-screen w-full flex overflow-y-auto">
|
|
112
112
|
{/* Left side - Full background image */}
|
|
113
113
|
<div className="hidden lg:flex lg:flex-1 relative overflow-hidden">
|
|
114
114
|
{/* Background image filling all space */}
|
|
@@ -210,13 +210,17 @@ export function ResetPasswordPage() {
|
|
|
210
210
|
<CheckCircle2
|
|
211
211
|
className={`w-4 h-4 ${password.length >= 6 ? 'text-[var(--chart-2)]' : 'text-muted-foreground'}`}
|
|
212
212
|
/>
|
|
213
|
-
<span className="text-sm text-muted-foreground">
|
|
213
|
+
<span className="text-sm text-muted-foreground">
|
|
214
|
+
{t('resetPassword.requirementMinChars')}
|
|
215
|
+
</span>
|
|
214
216
|
</div>
|
|
215
217
|
<div className="flex items-center gap-2">
|
|
216
218
|
<CheckCircle2
|
|
217
219
|
className={`w-4 h-4 ${password === confirmPassword && password.length > 0 ? 'text-[var(--chart-2)]' : 'text-muted-foreground'}`}
|
|
218
220
|
/>
|
|
219
|
-
<span className="text-sm text-muted-foreground">
|
|
221
|
+
<span className="text-sm text-muted-foreground">
|
|
222
|
+
{t('resetPassword.requirementMatch')}
|
|
223
|
+
</span>
|
|
220
224
|
</div>
|
|
221
225
|
</div>
|
|
222
226
|
</div>
|