xertica-ui 1.9.1 → 1.9.2
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/package.json
CHANGED
package/templates/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-xertica-app",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type-check": "tsc --noEmit"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"xertica-ui": "^1.9.
|
|
14
|
+
"xertica-ui": "^1.9.2",
|
|
15
15
|
"react": "^18.3.1",
|
|
16
16
|
"react-dom": "^18.3.1",
|
|
17
17
|
"react-router-dom": "^7.1.3",
|
|
@@ -12,10 +12,14 @@ import {
|
|
|
12
12
|
useLayout,
|
|
13
13
|
} from 'xertica-ui';
|
|
14
14
|
import { ChevronRight, FileText } from 'lucide-react';
|
|
15
|
-
import { useLocation, useNavigate } from 'react-router-dom';
|
|
15
|
+
import { useLocation, useNavigate, Link } from 'react-router-dom';
|
|
16
16
|
import { getRouteByPath } from '../../routes';
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
interface HomeContentProps {
|
|
19
|
+
user?: { name?: string; email?: string; avatar?: string } | null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function HomeContent({ user }: HomeContentProps) {
|
|
19
23
|
const { sidebarExpanded, sidebarWidth } = useLayout();
|
|
20
24
|
const location = useLocation();
|
|
21
25
|
const navigate = useNavigate();
|
|
@@ -38,10 +42,13 @@ export function HomeContent() {
|
|
|
38
42
|
className="flex-1 flex flex-col overflow-hidden transition-all duration-300"
|
|
39
43
|
>
|
|
40
44
|
<Header
|
|
45
|
+
showThemeToggle={true}
|
|
46
|
+
showLanguageSelector={true}
|
|
41
47
|
breadcrumbs={[
|
|
42
|
-
{ label: '
|
|
48
|
+
{ label: 'Design System', href: '/home' },
|
|
43
49
|
{ label: 'Início' },
|
|
44
50
|
]}
|
|
51
|
+
renderLink={(href: string, props: any) => <Link to={href} {...props} />}
|
|
45
52
|
/>
|
|
46
53
|
|
|
47
54
|
<main className="flex-1 overflow-hidden bg-muted">
|
|
@@ -49,7 +56,7 @@ export function HomeContent() {
|
|
|
49
56
|
<div className="p-2 sm:p-4 md:p-6">
|
|
50
57
|
<div className="max-w-6xl mx-auto space-y-8">
|
|
51
58
|
<div className="space-y-2">
|
|
52
|
-
<h2>Bem-vindo
|
|
59
|
+
<h2>{`Bem-vindo, ${user?.name || 'usuário'}!`}</h2>
|
|
53
60
|
<p className="text-muted-foreground">
|
|
54
61
|
Sua plataforma construída com Xertica UI Design System
|
|
55
62
|
</p>
|
|
@@ -38,13 +38,18 @@ export function HomePage({ user, onLogout }: HomePageProps) {
|
|
|
38
38
|
expanded={sidebarExpanded}
|
|
39
39
|
width={sidebarWidth}
|
|
40
40
|
onToggle={toggleSidebar}
|
|
41
|
-
user={
|
|
41
|
+
user={{
|
|
42
|
+
...user,
|
|
43
|
+
name: 'Ariel Santos',
|
|
44
|
+
avatar: 'https://github.com/shadcn.png'
|
|
45
|
+
}}
|
|
42
46
|
onLogout={onLogout}
|
|
47
|
+
onSettingsClick={() => navigate('/settings')}
|
|
43
48
|
location={location}
|
|
44
49
|
navigate={navigate}
|
|
45
50
|
routes={routes}
|
|
46
51
|
/>
|
|
47
|
-
<HomeContent />
|
|
52
|
+
<HomeContent user={user} />
|
|
48
53
|
<XerticaAssistant
|
|
49
54
|
isExpanded={assistenteExpanded}
|
|
50
55
|
onToggle={toggleAssistente}
|
|
@@ -56,8 +56,10 @@ import {
|
|
|
56
56
|
AlertDialogCancel,
|
|
57
57
|
useLayout,
|
|
58
58
|
Sidebar,
|
|
59
|
+
PageHeader,
|
|
59
60
|
} from 'xertica-ui';
|
|
60
61
|
import { toast } from 'sonner';
|
|
62
|
+
import { Link } from 'react-router-dom';
|
|
61
63
|
import {
|
|
62
64
|
Settings,
|
|
63
65
|
User,
|
|
@@ -100,10 +102,13 @@ export function TemplateContent() {
|
|
|
100
102
|
className="flex-1 flex flex-col overflow-hidden transition-all duration-300"
|
|
101
103
|
>
|
|
102
104
|
<Header
|
|
105
|
+
showThemeToggle={true}
|
|
106
|
+
showLanguageSelector={true}
|
|
103
107
|
breadcrumbs={[
|
|
104
|
-
{ label: '
|
|
105
|
-
{ label: 'Template
|
|
108
|
+
{ label: 'Design System', href: '/home' },
|
|
109
|
+
{ label: 'Página de Template' },
|
|
106
110
|
]}
|
|
111
|
+
renderLink={(href: string, props: any) => <Link to={href} {...props} />}
|
|
107
112
|
/>
|
|
108
113
|
|
|
109
114
|
<main className="flex-1 overflow-hidden bg-muted">
|
|
@@ -24,8 +24,13 @@ export function TemplatePage({ user, onLogout }: TemplatePageProps) {
|
|
|
24
24
|
expanded={sidebarExpanded}
|
|
25
25
|
width={sidebarWidth}
|
|
26
26
|
onToggle={toggleSidebar}
|
|
27
|
-
user={
|
|
27
|
+
user={{
|
|
28
|
+
...user,
|
|
29
|
+
name: 'Ariel Santos',
|
|
30
|
+
avatar: 'https://github.com/shadcn.png'
|
|
31
|
+
}}
|
|
28
32
|
onLogout={onLogout}
|
|
33
|
+
onSettingsClick={() => navigate('/settings')}
|
|
29
34
|
location={location}
|
|
30
35
|
navigate={navigate}
|
|
31
36
|
routes={routes}
|