@djangocfg/layouts 2.1.434 → 2.1.435

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.434",
3
+ "version": "2.1.435",
4
4
  "description": "Simple, straightforward layout components for Next.js - import and use with props",
5
5
  "keywords": [
6
6
  "layouts",
@@ -89,12 +89,12 @@
89
89
  "check": "tsc --noEmit"
90
90
  },
91
91
  "peerDependencies": {
92
- "@djangocfg/api": "^2.1.434",
93
- "@djangocfg/centrifugo": "^2.1.434",
94
- "@djangocfg/debuger": "^2.1.434",
95
- "@djangocfg/i18n": "^2.1.434",
96
- "@djangocfg/monitor": "^2.1.434",
97
- "@djangocfg/ui-core": "^2.1.434",
92
+ "@djangocfg/api": "^2.1.435",
93
+ "@djangocfg/centrifugo": "^2.1.435",
94
+ "@djangocfg/debuger": "^2.1.435",
95
+ "@djangocfg/i18n": "^2.1.435",
96
+ "@djangocfg/monitor": "^2.1.435",
97
+ "@djangocfg/ui-core": "^2.1.435",
98
98
  "@hookform/resolvers": "^5.2.2",
99
99
  "consola": "^3.4.2",
100
100
  "lucide-react": "^0.545.0",
@@ -125,14 +125,14 @@
125
125
  "uuid": "^11.1.0"
126
126
  },
127
127
  "devDependencies": {
128
- "@djangocfg/api": "^2.1.434",
129
- "@djangocfg/centrifugo": "^2.1.434",
130
- "@djangocfg/debuger": "^2.1.434",
131
- "@djangocfg/i18n": "^2.1.434",
132
- "@djangocfg/monitor": "^2.1.434",
133
- "@djangocfg/typescript-config": "^2.1.434",
134
- "@djangocfg/ui-core": "^2.1.434",
135
- "@djangocfg/ui-tools": "^2.1.434",
128
+ "@djangocfg/api": "^2.1.435",
129
+ "@djangocfg/centrifugo": "^2.1.435",
130
+ "@djangocfg/debuger": "^2.1.435",
131
+ "@djangocfg/i18n": "^2.1.435",
132
+ "@djangocfg/monitor": "^2.1.435",
133
+ "@djangocfg/typescript-config": "^2.1.435",
134
+ "@djangocfg/ui-core": "^2.1.435",
135
+ "@djangocfg/ui-tools": "^2.1.435",
136
136
  "@types/node": "^25.2.3",
137
137
  "@types/react": "^19.2.15",
138
138
  "@types/react-dom": "^19.2.3",
@@ -149,20 +149,33 @@ export function PublicLayout({
149
149
 
150
150
  return (
151
151
  <PublicLayoutProvider value={contextValue}>
152
- {/* Background slot — renders behind everything, including the sticky navbar */}
153
- {backgroundSlot ?? null}
154
-
155
- <div className="min-h-screen flex flex-col">
156
- {navbar ?? null}
157
-
158
- <PublicMain
159
- contentTopSpacing={contentTopSpacing}
160
- contentBottomSpacing={contentBottomSpacing}
161
- >
162
- {children}
163
- </PublicMain>
164
-
165
- {footer ?? null}
152
+ {/*
153
+ `isolate` creates a self-contained stacking context on the layout root,
154
+ so the background slot and content stack against each other — NOT against
155
+ the host's <body>/<html> background. This is what lets a consumer drop in
156
+ a `backgroundSlot` (e.g. a fixed full-bleed canvas) and have it show
157
+ through the translucent navbar WITHOUT needing to make <body> transparent.
158
+ */}
159
+ <div className="isolate">
160
+ {/* Background slot — its own layer at z-0, behind navbar + content but
161
+ inside this isolation context (so it can't fall behind the page bg). */}
162
+ {backgroundSlot ? (
163
+ <div className="pointer-events-none absolute inset-0 z-0">{backgroundSlot}</div>
164
+ ) : null}
165
+
166
+ {/* Content sits above the background within the same isolation context. */}
167
+ <div className="relative z-10 min-h-screen flex flex-col">
168
+ {navbar ?? null}
169
+
170
+ <PublicMain
171
+ contentTopSpacing={contentTopSpacing}
172
+ contentBottomSpacing={contentBottomSpacing}
173
+ >
174
+ {children}
175
+ </PublicMain>
176
+
177
+ {footer ?? null}
178
+ </div>
166
179
  </div>
167
180
  </PublicLayoutProvider>
168
181
  );
@@ -98,7 +98,9 @@ export function NavControls({
98
98
  {showThemeSwitcher && <ThemeModeControl size={size} />}
99
99
  {renderLocale && (
100
100
  <LocaleSwitcher
101
- variant="dialog"
101
+ // Navbars use the compact dropdown list (not the fullscreen dialog) —
102
+ // a popover menu fits a dense top bar far better than a modal.
103
+ variant="dropdown"
102
104
  buttonVariant="outline"
103
105
  size={size === 'compact' ? 'sm' : 'default'}
104
106
  showTriggerLabel={false}
@@ -45,8 +45,12 @@ function subMenuLinkCls(active: boolean) {
45
45
  );
46
46
  }
47
47
 
48
+ // Surface mirrors the navbar shell's glass (bg-background/72 + 10px blur,
49
+ // card-tinted in dark) so the dropdown reads as the same translucent material
50
+ // as the bar it drops from — previously it was bg-background/95 + blur-sm, i.e.
51
+ // near-opaque with nothing to blur, so it looked flat next to the glassy bar.
48
52
  const popoverCls =
49
- 'absolute left-0 top-full mt-1 z-[1200] min-w-[14.5rem] rounded-xl border border-border/70 bg-background/95 backdrop-blur-sm p-1.5 shadow-[0_1px_2px_rgba(0,0,0,0.05),0_6px_18px_rgba(0,0,0,0.035)] dark:shadow-[0_6px_20px_rgba(0,0,0,0.12)]';
53
+ 'absolute left-0 top-full mt-1 z-[1200] min-w-[14.5rem] rounded-xl border border-border/70 bg-background/72 backdrop-blur-[10px] dark:bg-card/80 p-1.5 shadow-[0_1px_2px_rgba(0,0,0,0.05),0_6px_18px_rgba(0,0,0,0.035)] dark:shadow-[0_6px_20px_rgba(0,0,0,0.12)]';
50
54
 
51
55
  function NavDesktopItemsRaw({
52
56
  items,