@djangocfg/layouts 2.1.249 → 2.1.252
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/README.md +11 -9
- package/package.json +18 -18
- package/src/index.ts +4 -2
- package/src/layouts/AppLayout/AppLayout.tsx +70 -13
- package/src/layouts/AppLayout/index.ts +7 -1
- package/src/layouts/PrivateLayout/PrivateLayout.tsx +22 -66
- package/src/layouts/PrivateLayout/components/PrivateContent.tsx +28 -11
- package/src/layouts/PrivateLayout/components/PrivateSidebar.tsx +159 -116
- package/src/layouts/PrivateLayout/components/index.ts +0 -2
- package/src/layouts/PublicLayout/PublicLayout.tsx +27 -42
- package/src/layouts/PublicLayout/components/PublicFooter/FooterMenuSections.tsx +13 -2
- package/src/layouts/PublicLayout/components/PublicFooter/FooterProjectInfo.tsx +7 -5
- package/src/layouts/PublicLayout/components/PublicFooter/PublicFooter.tsx +130 -109
- package/src/layouts/PublicLayout/components/PublicFooter/types.ts +9 -4
- package/src/layouts/PublicLayout/components/PublicMobileDrawer.tsx +32 -8
- package/src/layouts/PublicLayout/components/PublicNavbar.tsx +74 -0
- package/src/layouts/PublicLayout/components/PublicNavigation.tsx +274 -113
- package/src/layouts/PublicLayout/components/index.ts +1 -0
- package/src/layouts/PublicLayout/context.tsx +0 -9
- package/src/layouts/PublicLayout/index.ts +8 -1
- package/src/layouts/_components/PrivateSidebarAccount.tsx +168 -0
- package/src/layouts/PrivateLayout/components/PrivateHeader.tsx +0 -72
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Private Layout Header
|
|
3
|
-
*
|
|
4
|
-
* Header component for PrivateLayout with sidebar trigger
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
'use client';
|
|
8
|
-
|
|
9
|
-
import React from 'react';
|
|
10
|
-
|
|
11
|
-
import { useAuth } from '@djangocfg/api/auth';
|
|
12
|
-
import { Separator } from '@djangocfg/ui-nextjs/components';
|
|
13
|
-
import { SidebarTrigger } from '@djangocfg/ui-nextjs/components';
|
|
14
|
-
import { ThemeToggle } from '@djangocfg/ui-nextjs/theme';
|
|
15
|
-
|
|
16
|
-
import { LocaleSwitcher } from '../../_components/LocaleSwitcher';
|
|
17
|
-
import { UserMenu } from '../../_components/UserMenu';
|
|
18
|
-
|
|
19
|
-
import type { HeaderConfig } from '../PrivateLayout';
|
|
20
|
-
import type { I18nLayoutConfig } from '../../AppLayout/AppLayout';
|
|
21
|
-
|
|
22
|
-
interface PrivateHeaderProps {
|
|
23
|
-
header?: HeaderConfig;
|
|
24
|
-
/** i18n configuration for locale switching */
|
|
25
|
-
i18n?: I18nLayoutConfig;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function PrivateHeader({ header, i18n }: PrivateHeaderProps) {
|
|
29
|
-
const { user: _user } = useAuth();
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<header
|
|
33
|
-
className="sticky top-0 z-10 flex items-center justify-between px-4 shrink-0 bg-background border-b border-border"
|
|
34
|
-
style={{ height: '64px', minHeight: '64px' }}
|
|
35
|
-
>
|
|
36
|
-
{/* Left side */}
|
|
37
|
-
<div className="flex items-center gap-4">
|
|
38
|
-
<SidebarTrigger className="-ml-1" />
|
|
39
|
-
<Separator orientation="vertical" className="mr-2 h-4" />
|
|
40
|
-
|
|
41
|
-
{header?.title && (
|
|
42
|
-
<h1 className="text-lg font-semibold text-foreground">
|
|
43
|
-
{header.title}
|
|
44
|
-
</h1>
|
|
45
|
-
)}
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
{/* Right side */}
|
|
49
|
-
<div className="flex items-center gap-3">
|
|
50
|
-
{/* Locale Switcher */}
|
|
51
|
-
{i18n && (
|
|
52
|
-
<LocaleSwitcher
|
|
53
|
-
locale={i18n.locale}
|
|
54
|
-
locales={i18n.locales}
|
|
55
|
-
onChange={i18n.onLocaleChange}
|
|
56
|
-
/>
|
|
57
|
-
)}
|
|
58
|
-
|
|
59
|
-
{/* Theme Toggle */}
|
|
60
|
-
<ThemeToggle />
|
|
61
|
-
|
|
62
|
-
{/* User Menu */}
|
|
63
|
-
<UserMenu
|
|
64
|
-
variant="desktop"
|
|
65
|
-
groups={header?.groups}
|
|
66
|
-
authPath={header?.authPath}
|
|
67
|
-
/>
|
|
68
|
-
</div>
|
|
69
|
-
</header>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|