xertica-ui 2.5.2 → 2.5.3
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 +8 -0
- package/README.md +1 -1
- package/bin/language-config.ts +359 -359
- package/components/layout/sidebar/sidebar.tsx +10 -5
- package/components/pages/home-content/HomeContent.tsx +119 -120
- package/components/pages/template-content/TemplateContent.tsx +1353 -1354
- package/dist/AssistantChart-BW9JK6jw.cjs +3551 -0
- package/dist/AssistantChart-DNdwuS-t.js +3383 -0
- package/dist/VerifyEmailPage-Bci0bA-P.js +3296 -0
- package/dist/VerifyEmailPage-C7KiYXrm.cjs +3305 -0
- package/dist/assistant.cjs.js +1 -1
- package/dist/assistant.es.js +1 -1
- package/dist/index.cjs.js +8 -8
- package/dist/index.es.js +6 -6
- package/dist/input-B0_vbA3g.js +65 -0
- package/dist/input-ByYuOv8A.cjs +91 -0
- 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/rich-text-editor-DV1SixzE.js +2890 -0
- package/dist/rich-text-editor-DnSDglzW.cjs +2964 -0
- package/dist/sidebar-CQn_rwxP.cjs +1150 -0
- package/dist/sidebar-QwCoeoZ_.js +1147 -0
- package/dist/ui.cjs.js +5 -5
- package/dist/ui.es.js +3 -3
- package/dist/xertica-assistant-BrF9jScR.cjs +2180 -0
- package/dist/xertica-assistant-CsBsxTsI.js +2173 -0
- package/llms-compact.txt +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/templates/package.json +2 -2
- package/templates/src/features/home/ui/HomeContent.tsx +116 -117
- package/templates/src/features/template/ui/TemplateContent.tsx +1321 -1322
|
@@ -23,7 +23,6 @@ import {
|
|
|
23
23
|
DropdownMenuSubContent,
|
|
24
24
|
DropdownMenuPortal,
|
|
25
25
|
} from '../../ui/dropdown-menu';
|
|
26
|
-
import { ScrollArea } from '../../ui/scroll-area';
|
|
27
26
|
import { Input } from '../../ui/input';
|
|
28
27
|
import { Search as SearchIcon } from 'lucide-react';
|
|
29
28
|
import { cn } from '../../shared/utils';
|
|
@@ -926,9 +925,12 @@ function SidebarNav({
|
|
|
926
925
|
if (variant === 'assistant') {
|
|
927
926
|
return (
|
|
928
927
|
<div className="flex-1 min-h-0 overflow-hidden">
|
|
929
|
-
<
|
|
928
|
+
<div
|
|
929
|
+
className="h-full px-4"
|
|
930
|
+
style={{ overflowY: 'auto', overflowX: 'hidden' }}
|
|
931
|
+
>
|
|
930
932
|
{navigationGroups.map(group => renderAssistantGroup(group))}
|
|
931
|
-
</
|
|
933
|
+
</div>
|
|
932
934
|
</div>
|
|
933
935
|
);
|
|
934
936
|
}
|
|
@@ -936,7 +938,10 @@ function SidebarNav({
|
|
|
936
938
|
if (isMobileViewport && isOverflowAccordionOpen) {
|
|
937
939
|
return (
|
|
938
940
|
<div className="flex-1 min-h-0 overflow-hidden">
|
|
939
|
-
<
|
|
941
|
+
<div
|
|
942
|
+
className="h-full"
|
|
943
|
+
style={{ overflowY: 'auto', overflowX: 'hidden' }}
|
|
944
|
+
>
|
|
940
945
|
<nav
|
|
941
946
|
id="sidebar-nav"
|
|
942
947
|
aria-label={t('sidebar.mainNavigation')}
|
|
@@ -1008,7 +1013,7 @@ function SidebarNav({
|
|
|
1008
1013
|
</div>
|
|
1009
1014
|
)}
|
|
1010
1015
|
</nav>
|
|
1011
|
-
</
|
|
1016
|
+
</div>
|
|
1012
1017
|
</div>
|
|
1013
1018
|
);
|
|
1014
1019
|
}
|
|
@@ -1,120 +1,119 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '../../ui/card';
|
|
3
|
-
import { Header } from '../../layout/header';
|
|
4
|
-
import { Button } from '../../ui/button';
|
|
5
|
-
import { FileText } from 'lucide-react';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<FeatureCardSkeleton showAction />
|
|
63
|
-
<FeatureCardSkeleton showAction />
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '../../ui/card';
|
|
3
|
+
import { Header } from '../../layout/header';
|
|
4
|
+
import { Button } from '../../ui/button';
|
|
5
|
+
import { FileText } from 'lucide-react';
|
|
6
|
+
import { useLocation, useNavigate, Link } from 'react-router-dom';
|
|
7
|
+
import { Badge } from '../../ui/badge';
|
|
8
|
+
import { PageHeader } from '../../ui/page-header';
|
|
9
|
+
import { useOptionalLayout } from '../../../contexts/LayoutContext';
|
|
10
|
+
import { SIDEBAR_EXPANDED_WIDTH, SIDEBAR_COLLAPSED_WIDTH } from '../../shared/layout-constants';
|
|
11
|
+
import { useFeatureCards } from '../../../features/home';
|
|
12
|
+
import { useTranslation } from 'react-i18next';
|
|
13
|
+
import { SectionErrorBoundary } from '../../shared/error-boundary';
|
|
14
|
+
import { FeatureCardSkeleton } from '../../blocks/card-patterns/FeatureCardSkeleton';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Main dashboard content area for the landing page.
|
|
18
|
+
*
|
|
19
|
+
* @description
|
|
20
|
+
* Fetches feature cards via `useFeatureCards` (React Query). All UI strings are
|
|
21
|
+
* translated via `useTranslation()` — change language via `LanguageSelector`.
|
|
22
|
+
*
|
|
23
|
+
* @ai-rules
|
|
24
|
+
* 1. Data: Feature cards come from `useFeatureCards()` — never hardcode them here.
|
|
25
|
+
* 2. i18n: Use `t('home.*')` for all UI strings — never hardcode text in JSX.
|
|
26
|
+
* 3. Loading: Renders a skeleton card while the query is in-flight.
|
|
27
|
+
*/
|
|
28
|
+
export function HomeContent() {
|
|
29
|
+
const { t } = useTranslation();
|
|
30
|
+
const layout = useOptionalLayout();
|
|
31
|
+
const sidebarExpanded = layout?.sidebarExpanded ?? false;
|
|
32
|
+
const sidebarWidth = layout?.sidebarWidth ?? 256;
|
|
33
|
+
const navigate = useNavigate();
|
|
34
|
+
|
|
35
|
+
const { data: featureCards = [], isLoading } = useFeatureCards();
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div
|
|
39
|
+
style={{
|
|
40
|
+
paddingLeft: sidebarExpanded ? `${sidebarWidth}px` : SIDEBAR_COLLAPSED_WIDTH,
|
|
41
|
+
}}
|
|
42
|
+
className="flex-1 flex flex-col overflow-hidden transition-all duration-300"
|
|
43
|
+
>
|
|
44
|
+
<Header
|
|
45
|
+
showThemeToggle={true}
|
|
46
|
+
showLanguageSelector={true}
|
|
47
|
+
breadcrumbs={[{ label: t('nav.designSystem'), href: '/home' }, { label: t('nav.home') }]}
|
|
48
|
+
renderLink={(href, props) => <Link to={href} {...props} />}
|
|
49
|
+
/>
|
|
50
|
+
|
|
51
|
+
<main className="flex-1 overflow-hidden bg-muted">
|
|
52
|
+
<div className="h-full" style={{ overflowY: 'auto', overflowX: 'hidden' }}>
|
|
53
|
+
<div className="p-5 sm:p-4 md:p-6">
|
|
54
|
+
<div className="max-w-6xl mx-auto space-y-8">
|
|
55
|
+
<PageHeader title={t('home.welcome')} subtitle={t('home.subtitle')} />
|
|
56
|
+
|
|
57
|
+
<SectionErrorBoundary>
|
|
58
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
59
|
+
{isLoading ? (
|
|
60
|
+
<>
|
|
61
|
+
<FeatureCardSkeleton showAction />
|
|
62
|
+
<FeatureCardSkeleton showAction />
|
|
63
|
+
<FeatureCardSkeleton showAction />
|
|
64
|
+
</>
|
|
65
|
+
) : (
|
|
66
|
+
featureCards.map(card => (
|
|
67
|
+
<Card
|
|
68
|
+
key={card.id}
|
|
69
|
+
className="hover:shadow-xl transition-shadow duration-200 flex flex-col h-full"
|
|
70
|
+
>
|
|
71
|
+
<CardHeader>
|
|
72
|
+
<div className="flex items-center gap-3">
|
|
73
|
+
<div className="p-2 bg-[var(--chart-2)]/20 rounded-[var(--radius)]">
|
|
74
|
+
<FileText className="w-6 h-6 text-[var(--chart-2)]" />
|
|
75
|
+
</div>
|
|
76
|
+
<div className="flex items-center gap-2">
|
|
77
|
+
<CardTitle className="text-sm">
|
|
78
|
+
{t(`home.${card.id.replace(/-/g, '')}Title`, {
|
|
79
|
+
defaultValue: card.title,
|
|
80
|
+
})}
|
|
81
|
+
</CardTitle>
|
|
82
|
+
{card.badge && (
|
|
83
|
+
<Badge variant="default" className="text-xs">
|
|
84
|
+
{t(`home.${card.id.replace(/-/g, '')}badge`, {
|
|
85
|
+
defaultValue: card.badge,
|
|
86
|
+
})}
|
|
87
|
+
</Badge>
|
|
88
|
+
)}
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</CardHeader>
|
|
92
|
+
<CardContent className="flex-1">
|
|
93
|
+
<p className="text-muted-foreground">
|
|
94
|
+
{t(`home.${card.id.replace(/-/g, '')}Description`, {
|
|
95
|
+
defaultValue: card.description,
|
|
96
|
+
})}
|
|
97
|
+
</p>
|
|
98
|
+
</CardContent>
|
|
99
|
+
<CardFooter>
|
|
100
|
+
<Button
|
|
101
|
+
variant="outline"
|
|
102
|
+
className="w-full"
|
|
103
|
+
onClick={() => navigate(card.href)}
|
|
104
|
+
>
|
|
105
|
+
{t('common.view')}
|
|
106
|
+
</Button>
|
|
107
|
+
</CardFooter>
|
|
108
|
+
</Card>
|
|
109
|
+
))
|
|
110
|
+
)}
|
|
111
|
+
</div>
|
|
112
|
+
</SectionErrorBoundary>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</main>
|
|
117
|
+
</div>
|
|
118
|
+
);
|
|
119
|
+
}
|