@djangocfg/layouts 1.4.13 → 1.4.15

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": "1.4.13",
3
+ "version": "1.4.15",
4
4
  "description": "Layout system and components for Unrealon applications",
5
5
  "author": {
6
6
  "name": "DjangoCFG",
@@ -63,9 +63,9 @@
63
63
  "check": "tsc --noEmit"
64
64
  },
65
65
  "peerDependencies": {
66
- "@djangocfg/api": "^1.4.13",
67
- "@djangocfg/og-image": "^1.4.13",
68
- "@djangocfg/ui": "^1.4.13",
66
+ "@djangocfg/api": "^1.4.15",
67
+ "@djangocfg/og-image": "^1.4.15",
68
+ "@djangocfg/ui": "^1.4.15",
69
69
  "@hookform/resolvers": "^5.2.0",
70
70
  "consola": "^3.4.2",
71
71
  "lucide-react": "^0.468.0",
@@ -86,7 +86,7 @@
86
86
  "vidstack": "0.6.15"
87
87
  },
88
88
  "devDependencies": {
89
- "@djangocfg/typescript-config": "^1.4.13",
89
+ "@djangocfg/typescript-config": "^1.4.15",
90
90
  "@types/node": "^24.7.2",
91
91
  "@types/react": "19.2.2",
92
92
  "@types/react-dom": "19.2.1",
@@ -240,14 +240,14 @@ export function UserMenu({ variant, onNavigate }: UserMenuProps) {
240
240
  <>
241
241
  {/* Backdrop */}
242
242
  <div
243
- className="fixed inset-0 z-[9995] bg-transparent"
243
+ className="fixed inset-0 z-9995 bg-transparent"
244
244
  onClick={closeUserMenu}
245
245
  aria-hidden="true"
246
246
  style={{ cursor: 'default' }}
247
247
  />
248
248
  {/* Dropdown */}
249
249
  <div
250
- className="absolute top-full right-0 mt-2 w-52 rounded-sm shadow-sm backdrop-blur-xl z-[9996] bg-popover border border-border"
250
+ className="absolute top-full right-0 mt-2 w-52 rounded-sm shadow-sm backdrop-blur-xl z-9996 bg-popover border border-border"
251
251
  role="menu"
252
252
  aria-label="User menu"
253
253
  >
@@ -87,16 +87,17 @@ export function MobileDrawer() {
87
87
  <>
88
88
  {/* Backdrop with fade animation */}
89
89
  <div
90
- className={`fixed inset-0 z-[150] bg-black/50 backdrop-blur-sm transition-opacity duration-300 ease-in-out lg:hidden ${
90
+ className={`fixed inset-0 z-150 backdrop-blur-sm transition-opacity duration-300 ease-in-out lg:hidden ${
91
91
  isOpen ? 'opacity-100' : 'opacity-0'
92
92
  }`}
93
+ style={{ backgroundColor: 'rgb(0 0 0 / 0.5)' }}
93
94
  onClick={handleClose}
94
95
  aria-hidden="true"
95
96
  />
96
97
 
97
98
  {/* Menu Content with slide animation */}
98
99
  <div
99
- className={`fixed top-0 right-0 bottom-0 w-80 z-[200] bg-popover border-l border-border shadow-2xl transition-transform duration-300 ease-in-out lg:hidden ${
100
+ className={`fixed top-0 right-0 bottom-0 w-80 z-200 bg-popover border-l border-border shadow-2xl transition-transform duration-300 ease-in-out lg:hidden ${
100
101
  isOpen ? 'translate-x-0' : 'translate-x-full'
101
102
  }`}
102
103
  role="dialog"
@@ -45,7 +45,7 @@ export function Navigation() {
45
45
  const { app, publicLayout } = config;
46
46
 
47
47
  return (
48
- <nav className="sticky top-0 w-full border-b backdrop-blur-xl z-[100] bg-background/80 border-border/30 isolate">
48
+ <nav className="sticky top-0 w-full border-b backdrop-blur-xl z-100 isolate" style={{ backgroundColor: 'hsl(var(--background) / 0.8)', borderColor: 'hsl(var(--border) / 0.3)' }}>
49
49
  <div className="w-full px-4 sm:px-6 lg:px-8">
50
50
  <div className="flex items-center justify-between py-2 min-h-[40px]">
51
51
  {/* Left side - Logo and Navigation Menu */}
@@ -35,9 +35,10 @@ export function MobileOverlay({ isOpen = false, onClose }: MobileOverlayProps) {
35
35
  return createPortal(
36
36
  <div
37
37
  className={cn(
38
- 'fixed inset-0 bg-black/50 z-[150] transition-opacity duration-300',
38
+ 'fixed inset-0 z-150 transition-opacity duration-300',
39
39
  isOpen ? 'opacity-100' : 'opacity-0 pointer-events-none'
40
40
  )}
41
+ style={{ backgroundColor: 'rgb(0 0 0 / 0.5)' }}
41
42
  onClick={onClose}
42
43
  aria-hidden="true"
43
44
  />,
@@ -76,7 +76,7 @@ export function Sidebar({
76
76
  return createPortal(
77
77
  <aside
78
78
  className={cn(
79
- 'fixed inset-y-0 left-0 w-64 z-[200] bg-background border-r shadow-lg transition-transform duration-300',
79
+ 'fixed inset-y-0 left-0 w-64 z-200 bg-background border-r shadow-lg transition-transform duration-300',
80
80
  isOpen ? 'translate-x-0' : '-translate-x-full'
81
81
  )}
82
82
  >
@@ -30,10 +30,13 @@ export const TAILWIND_GUIDE: TailwindGuide = {
30
30
  "Use standard Tailwind classes only: py-16 sm:py-20 md:py-24 lg:py-32",
31
31
  "Responsive patterns: px-4 sm:px-6 lg:px-8",
32
32
  "Container pattern: container max-w-7xl mx-auto",
33
- "IMPORTANT: Arbitrary values like h-[80px] may NOT work in v4 due to changed syntax",
33
+ "IMPORTANT: Arbitrary values like h-[80px], z-[100] may NOT work in v4 - define tokens in @theme instead",
34
34
  "For fixed sizes: Use inline styles style={{ width: '80px', height: '80px' }} - always reliable",
35
- "Spacing utilities (h-20, p-4, etc.) require --spacing-* variables defined in @theme block before Tailwind import",
36
- "Import order is critical but hard to fix: changing order breaks other styles",
35
+ "Spacing utilities (h-20, p-4, etc.) require --spacing-* variables defined in @theme block",
36
+ "Z-index utilities (z-50, z-100) require --z-* variables defined in @theme block",
37
+ "OPACITY MODIFIERS: bg-background/80 does NOT work with HSL colors in v4! Use inline styles: style={{ backgroundColor: 'hsl(var(--background) / 0.8)' }}",
38
+ "Border opacity: border-border/30 does NOT work - use style={{ borderColor: 'hsl(var(--border) / 0.3)' }}",
39
+ "Import order is critical: theme variables MUST come before @import 'tailwindcss'",
37
40
  "Use aspect-square for maintaining 1:1 ratio (circles, squares)",
38
41
  "Use overflow-hidden with rounded-full for perfect circles",
39
42
  "Avoid custom utilities like: section-padding, animate-*, shadow-brand",
@@ -89,6 +92,40 @@ export const TAILWIND_GUIDE: TailwindGuide = {
89
92
  code: `<button className="px-6 py-3 bg-primary text-primary-foreground rounded-md shadow-lg hover:shadow-xl transition-all duration-300">
90
93
  Click me
91
94
  </button>`
95
+ },
96
+ {
97
+ title: "Z-Index Theme Tokens",
98
+ description: "Define z-index values in @theme for z-50, z-100 to work",
99
+ code: `@theme {
100
+ --z-0: 0;
101
+ --z-10: 10;
102
+ --z-20: 20;
103
+ --z-30: 30;
104
+ --z-40: 40;
105
+ --z-50: 50;
106
+ --z-100: 100;
107
+ --z-auto: auto;
108
+ }
109
+
110
+ /* Now z-50, z-100 classes work */
111
+ <nav className="sticky top-0 z-100">...</nav>`
112
+ },
113
+ {
114
+ title: "Opacity with HSL Colors (BROKEN in v4)",
115
+ description: "bg-background/80 does NOT work with HSL - use inline styles",
116
+ code: `/* ❌ BROKEN - does not work in Tailwind v4 */
117
+ <nav className="bg-background/80 border-border/30">
118
+
119
+ /* ✅ WORKING - use inline styles for opacity */
120
+ <nav
121
+ className="sticky top-0 z-100 backdrop-blur-xl"
122
+ style={{
123
+ backgroundColor: 'hsl(var(--background) / 0.8)',
124
+ borderColor: 'hsl(var(--border) / 0.3)'
125
+ }}
126
+ >
127
+ ...
128
+ </nav>`
92
129
  }
93
130
  ]
94
131
  };
@@ -225,7 +225,7 @@ export const ChatWidget: React.FC<ChatWidgetProps> = ({
225
225
  const mobileContent = (
226
226
  <>
227
227
  <div
228
- className={`fixed inset-0 z-[9999] bg-background ${
228
+ className={`fixed inset-0 z-9999 bg-background ${
229
229
  uiState.isOpen ? 'block' : 'hidden'
230
230
  } ${className}`}
231
231
  >