@djangocfg/layouts 2.1.434 → 2.1.436

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.436",
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.436",
93
+ "@djangocfg/centrifugo": "^2.1.436",
94
+ "@djangocfg/debuger": "^2.1.436",
95
+ "@djangocfg/i18n": "^2.1.436",
96
+ "@djangocfg/monitor": "^2.1.436",
97
+ "@djangocfg/ui-core": "^2.1.436",
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.436",
129
+ "@djangocfg/centrifugo": "^2.1.436",
130
+ "@djangocfg/debuger": "^2.1.436",
131
+ "@djangocfg/i18n": "^2.1.436",
132
+ "@djangocfg/monitor": "^2.1.436",
133
+ "@djangocfg/typescript-config": "^2.1.436",
134
+ "@djangocfg/ui-core": "^2.1.436",
135
+ "@djangocfg/ui-tools": "^2.1.436",
136
136
  "@types/node": "^25.2.3",
137
137
  "@types/react": "^19.2.15",
138
138
  "@types/react-dom": "^19.2.3",
@@ -53,20 +53,6 @@ export interface PublicLayoutProps {
53
53
  */
54
54
  navbar?: ReactNode;
55
55
  footer?: ReactNode;
56
- /**
57
- * Optional background layer rendered behind navbar and content.
58
- * Use `position: fixed; inset: 0; pointer-events: none` (or similar) on the element
59
- * so it fills the viewport without affecting layout flow.
60
- *
61
- * @example
62
- * ```tsx
63
- * backgroundSlot={
64
- * <div className="fixed inset-0 -z-10 pointer-events-none"
65
- * style={{ background: 'radial-gradient(ellipse 60% 50% at 10% 0%, violet, transparent)' }} />
66
- * }
67
- * ```
68
- */
69
- backgroundSlot?: ReactNode;
70
56
  /**
71
57
  * When `auto` (default), `<main>` gets a small top offset from `PublicNavigation` surface
72
58
  * (`floating` vs `flush`). Set `none` if the page controls spacing itself.
@@ -119,7 +105,6 @@ export function PublicLayout({
119
105
  children,
120
106
  navbar,
121
107
  footer,
122
- backgroundSlot,
123
108
  contentTopSpacing = 'auto',
124
109
  contentBottomSpacing = 'auto',
125
110
  }: PublicLayoutProps) {
@@ -149,9 +134,6 @@ export function PublicLayout({
149
134
 
150
135
  return (
151
136
  <PublicLayoutProvider value={contextValue}>
152
- {/* Background slot — renders behind everything, including the sticky navbar */}
153
- {backgroundSlot ?? null}
154
-
155
137
  <div className="min-h-screen flex flex-col">
156
138
  {navbar ?? null}
157
139
 
@@ -19,7 +19,6 @@ import { PublicLayout, FloatingNavbar, DefaultFooter } from '@djangocfg/layouts'
19
19
  |---|---|---|---|
20
20
  | `navbar` | `ReactNode` | — | Pick a variant (below) or drop in your own. |
21
21
  | `footer` | `ReactNode` | — | Usually `DefaultFooter`. |
22
- | `backgroundSlot` | `ReactNode` | — | Full-viewport layer behind navbar + content. Use `fixed inset-0 -z-10 pointer-events-none`. |
23
22
  | `contentTopSpacing` | `'auto' \| 'none'` | `'auto'` | Auto pads `<main>` based on the navbar variant. |
24
23
  | `contentBottomSpacing` | `'auto' \| 'none' \| 'compact'` | `'auto'` | Bottom breathing room before footer. |
25
24
 
@@ -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,