@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.
@@ -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
-