@djangocfg/layouts 2.1.259 → 2.1.260
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.
|
|
3
|
+
"version": "2.1.260",
|
|
4
4
|
"description": "Simple, straightforward layout components for Next.js - import and use with props",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"layouts",
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
"check": "tsc --noEmit"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@djangocfg/api": "^2.1.
|
|
78
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
79
|
-
"@djangocfg/i18n": "^2.1.
|
|
80
|
-
"@djangocfg/monitor": "^2.1.
|
|
81
|
-
"@djangocfg/debuger": "^2.1.
|
|
82
|
-
"@djangocfg/ui-core": "^2.1.
|
|
83
|
-
"@djangocfg/ui-nextjs": "^2.1.
|
|
84
|
-
"@djangocfg/ui-tools": "^2.1.
|
|
77
|
+
"@djangocfg/api": "^2.1.260",
|
|
78
|
+
"@djangocfg/centrifugo": "^2.1.260",
|
|
79
|
+
"@djangocfg/i18n": "^2.1.260",
|
|
80
|
+
"@djangocfg/monitor": "^2.1.260",
|
|
81
|
+
"@djangocfg/debuger": "^2.1.260",
|
|
82
|
+
"@djangocfg/ui-core": "^2.1.260",
|
|
83
|
+
"@djangocfg/ui-nextjs": "^2.1.260",
|
|
84
|
+
"@djangocfg/ui-tools": "^2.1.260",
|
|
85
85
|
"@hookform/resolvers": "^5.2.2",
|
|
86
86
|
"consola": "^3.4.2",
|
|
87
87
|
"lucide-react": "^0.545.0",
|
|
@@ -109,15 +109,15 @@
|
|
|
109
109
|
"uuid": "^11.1.0"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
|
-
"@djangocfg/api": "^2.1.
|
|
113
|
-
"@djangocfg/i18n": "^2.1.
|
|
114
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
115
|
-
"@djangocfg/monitor": "^2.1.
|
|
116
|
-
"@djangocfg/debuger": "^2.1.
|
|
117
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
118
|
-
"@djangocfg/ui-core": "^2.1.
|
|
119
|
-
"@djangocfg/ui-nextjs": "^2.1.
|
|
120
|
-
"@djangocfg/ui-tools": "^2.1.
|
|
112
|
+
"@djangocfg/api": "^2.1.260",
|
|
113
|
+
"@djangocfg/i18n": "^2.1.260",
|
|
114
|
+
"@djangocfg/centrifugo": "^2.1.260",
|
|
115
|
+
"@djangocfg/monitor": "^2.1.260",
|
|
116
|
+
"@djangocfg/debuger": "^2.1.260",
|
|
117
|
+
"@djangocfg/typescript-config": "^2.1.260",
|
|
118
|
+
"@djangocfg/ui-core": "^2.1.260",
|
|
119
|
+
"@djangocfg/ui-nextjs": "^2.1.260",
|
|
120
|
+
"@djangocfg/ui-tools": "^2.1.260",
|
|
121
121
|
"@types/node": "^24.7.2",
|
|
122
122
|
"@types/react": "^19.1.0",
|
|
123
123
|
"@types/react-dom": "^19.1.0",
|
|
@@ -35,12 +35,20 @@ export function PrivateContent({
|
|
|
35
35
|
? 'max-md:pt-[max(3.75rem,calc(3rem+env(safe-area-inset-top,0px)))]'
|
|
36
36
|
: 'max-md:pt-[max(4rem,calc(3.25rem+env(safe-area-inset-top,0px)))]');
|
|
37
37
|
|
|
38
|
+
const contentTopPaddingClass =
|
|
39
|
+
padding === 'default'
|
|
40
|
+
? hasSidebar
|
|
41
|
+
? 'md:pt-6 lg:pt-8'
|
|
42
|
+
: 'pt-4 sm:pt-6 lg:pt-8'
|
|
43
|
+
: undefined;
|
|
44
|
+
|
|
38
45
|
const scrollAreaClass = cn(
|
|
39
46
|
'min-h-0 flex-1 overflow-y-auto',
|
|
40
47
|
padding === 'default' && [
|
|
41
|
-
'
|
|
48
|
+
'px-4 sm:px-6 lg:px-8',
|
|
42
49
|
'pb-[calc(1rem+env(safe-area-inset-bottom,0px))] sm:pb-[calc(1.5rem+env(safe-area-inset-bottom,0px))] lg:pb-[calc(2rem+env(safe-area-inset-bottom,0px))]',
|
|
43
50
|
],
|
|
51
|
+
contentTopPaddingClass,
|
|
44
52
|
mobileFabClearance,
|
|
45
53
|
);
|
|
46
54
|
|
|
@@ -114,6 +114,7 @@ export function PrivateSidebar({ sidebar, header, i18n, pathname: pathnameProp }
|
|
|
114
114
|
}, [pathname, isMobile, setOpenMobile]);
|
|
115
115
|
const brandTitle = header?.title?.trim() || 'Dashboard';
|
|
116
116
|
const brandMonogram = (header?.brandLetter?.trim().charAt(0) || brandTitle.charAt(0) || 'D').toUpperCase();
|
|
117
|
+
const customBrand = header?.brand;
|
|
117
118
|
|
|
118
119
|
const allItems = React.useMemo(
|
|
119
120
|
() => sidebar.groups.flatMap((g) => g.items),
|
|
@@ -203,13 +204,28 @@ export function PrivateSidebar({ sidebar, header, i18n, pathname: pathnameProp }
|
|
|
203
204
|
|
|
204
205
|
const expandedHeader = (
|
|
205
206
|
<div className={headerRowClass}>
|
|
206
|
-
<
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
<div className="min-w-0 flex-1">
|
|
208
|
+
{customBrand != null && customBrand !== false
|
|
209
|
+
? typeof customBrand === 'string'
|
|
210
|
+
? (
|
|
211
|
+
<Link
|
|
212
|
+
href={homeHref}
|
|
213
|
+
className="flex min-w-0 items-center gap-2 rounded-md py-0.5 outline-none ring-sidebar-ring focus-visible:ring-2"
|
|
214
|
+
>
|
|
215
|
+
<span className="truncate text-sm font-semibold tracking-tight text-sidebar-foreground">{customBrand}</span>
|
|
216
|
+
</Link>
|
|
217
|
+
)
|
|
218
|
+
: customBrand
|
|
219
|
+
: (
|
|
220
|
+
<Link
|
|
221
|
+
href={homeHref}
|
|
222
|
+
className="flex min-w-0 items-center gap-2 rounded-md py-0.5 outline-none ring-sidebar-ring focus-visible:ring-2"
|
|
223
|
+
>
|
|
224
|
+
<div className="flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-sidebar-primary">{brandMark}</div>
|
|
225
|
+
<span className="truncate text-sm font-semibold tracking-tight text-sidebar-foreground">{brandTitle}</span>
|
|
226
|
+
</Link>
|
|
227
|
+
)}
|
|
228
|
+
</div>
|
|
213
229
|
{!isMobile && <SidebarTrigger className="shrink-0" aria-label="Collapse sidebar" />}
|
|
214
230
|
</div>
|
|
215
231
|
);
|
|
@@ -223,13 +239,28 @@ export function PrivateSidebar({ sidebar, header, i18n, pathname: pathnameProp }
|
|
|
223
239
|
/** Mobile drawer: menu open/close only from the main column trigger — no duplicate toggle in the sheet. */
|
|
224
240
|
const mobileHeader = (
|
|
225
241
|
<div className="flex items-center gap-3">
|
|
226
|
-
<
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
242
|
+
<div className="min-w-0 flex-1">
|
|
243
|
+
{customBrand != null && customBrand !== false
|
|
244
|
+
? typeof customBrand === 'string'
|
|
245
|
+
? (
|
|
246
|
+
<Link
|
|
247
|
+
href={homeHref}
|
|
248
|
+
className="flex min-w-0 items-center gap-3 rounded-md py-1 outline-none ring-sidebar-ring focus-visible:ring-2"
|
|
249
|
+
>
|
|
250
|
+
<span className="truncate text-sm font-semibold tracking-tight text-sidebar-foreground">{customBrand}</span>
|
|
251
|
+
</Link>
|
|
252
|
+
)
|
|
253
|
+
: customBrand
|
|
254
|
+
: (
|
|
255
|
+
<Link
|
|
256
|
+
href={homeHref}
|
|
257
|
+
className="flex min-w-0 items-center gap-3 rounded-md py-1 outline-none ring-sidebar-ring focus-visible:ring-2"
|
|
258
|
+
>
|
|
259
|
+
<div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-sidebar-primary">{brandMark}</div>
|
|
260
|
+
<span className="truncate text-sm font-semibold tracking-tight text-sidebar-foreground">{brandTitle}</span>
|
|
261
|
+
</Link>
|
|
262
|
+
)}
|
|
263
|
+
</div>
|
|
233
264
|
</div>
|
|
234
265
|
);
|
|
235
266
|
|