@djangocfg/layouts 2.1.25 → 2.1.26

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/layouts",
3
- "version": "2.1.25",
3
+ "version": "2.1.26",
4
4
  "description": "Simple, straightforward layout components for Next.js - import and use with props",
5
5
  "keywords": [
6
6
  "layouts",
@@ -92,9 +92,9 @@
92
92
  "check": "tsc --noEmit"
93
93
  },
94
94
  "peerDependencies": {
95
- "@djangocfg/api": "^2.1.25",
96
- "@djangocfg/centrifugo": "^2.1.25",
97
- "@djangocfg/ui-nextjs": "^2.1.25",
95
+ "@djangocfg/api": "^2.1.26",
96
+ "@djangocfg/centrifugo": "^2.1.26",
97
+ "@djangocfg/ui-nextjs": "^2.1.26",
98
98
  "@hookform/resolvers": "^5.2.0",
99
99
  "consola": "^3.4.2",
100
100
  "lucide-react": "^0.545.0",
@@ -114,7 +114,7 @@
114
114
  "uuid": "^11.1.0"
115
115
  },
116
116
  "devDependencies": {
117
- "@djangocfg/typescript-config": "^2.1.25",
117
+ "@djangocfg/typescript-config": "^2.1.26",
118
118
  "@types/node": "^24.7.2",
119
119
  "@types/react": "^19.1.0",
120
120
  "@types/react-dom": "^19.1.0",
@@ -28,7 +28,8 @@
28
28
 
29
29
  'use client';
30
30
 
31
- import { ReactNode, useState } from 'react';
31
+ import { ReactNode, useState, useEffect } from 'react';
32
+ import { usePathname } from 'next/navigation';
32
33
  import type { NavigationItem, UserMenuConfig } from '../shared/types';
33
34
  import {
34
35
  PublicNavigation,
@@ -55,6 +56,12 @@ export function PublicLayout({
55
56
  userMenu,
56
57
  }: PublicLayoutProps) {
57
58
  const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
59
+ const pathname = usePathname();
60
+
61
+ // Close mobile menu on route change
62
+ useEffect(() => {
63
+ setMobileMenuOpen(false);
64
+ }, [pathname]);
58
65
 
59
66
  return (
60
67
  <div className="min-h-screen flex flex-col">
@@ -41,10 +41,6 @@ export function PublicMobileDrawer({
41
41
  }: PublicMobileDrawerProps) {
42
42
  const { isAuthenticated } = useAuth();
43
43
 
44
- const handleNavigate = () => {
45
- onClose();
46
- };
47
-
48
44
  return (
49
45
  <Drawer open={isOpen} onOpenChange={(open) => !open && onClose()} direction="right">
50
46
  <DrawerContent direction="right" className="w-80 lg:hidden">
@@ -55,7 +51,7 @@ export function PublicMobileDrawer({
55
51
  <img
56
52
  src={logo}
57
53
  alt={`${siteName} Logo`}
58
- className="h-8 w-auto object-contain"
54
+ className="h-6 w-auto object-contain"
59
55
  />
60
56
  )}
61
57
  <DrawerTitle className="text-lg font-bold text-foreground">
@@ -70,12 +66,6 @@ export function PublicMobileDrawer({
70
66
 
71
67
  {/* Scrollable Content */}
72
68
  <div className="flex-1 overflow-y-auto p-4 space-y-6">
73
- {/* Theme Toggle */}
74
- <div className="flex items-center justify-between px-4 py-3 border-b border-border/30">
75
- <span className="text-sm font-medium text-foreground">Theme</span>
76
- <ThemeToggle />
77
- </div>
78
-
79
69
  {/* User Menu */}
80
70
  <UserMenu
81
71
  variant="mobile"
@@ -84,7 +74,7 @@ export function PublicMobileDrawer({
84
74
  />
85
75
 
86
76
  {/* Navigation Items */}
87
- <div className="space-y-3">
77
+ <div className="space-y-3 pt-3">
88
78
  <h3 className="px-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground">
89
79
  Menu
90
80
  </h3>
@@ -94,16 +84,20 @@ export function PublicMobileDrawer({
94
84
  key={item.href}
95
85
  href={item.href}
96
86
  className="block px-4 py-3 rounded-sm text-base font-medium transition-colors text-foreground hover:bg-accent hover:text-accent-foreground"
97
- onClick={handleNavigate}
98
87
  >
99
88
  {item.label}
100
89
  </Link>
101
90
  ))}
102
91
  </div>
103
92
  </div>
93
+ </div>
104
94
 
105
- {/* Bottom spacer */}
106
- <div style={{ height: '15vh' }}></div>
95
+ {/* Theme Toggle - Fixed at bottom */}
96
+ <div className="border-t border-border/30 p-4">
97
+ <div className="flex items-center justify-between px-4 py-3">
98
+ <span className="text-sm font-medium text-foreground">Theme</span>
99
+ <ThemeToggle />
100
+ </div>
107
101
  </div>
108
102
  </DrawerContent>
109
103
  </Drawer>
@@ -42,7 +42,7 @@ export function PublicNavigation({
42
42
  {/* Logo */}
43
43
  <Link href="/" className="flex items-center gap-2">
44
44
  {logo && (
45
- <img src={logo} alt={siteName} className="h-8 w-8" />
45
+ <img src={logo} alt={siteName} className="h-6 w-auto object-contain" />
46
46
  )}
47
47
  <span className="font-bold text-lg">{siteName}</span>
48
48
  </Link>