responsive-system 1.4.2 → 1.4.3

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.
@@ -1,14 +1,14 @@
1
1
  import { useResponsiveLayout } from '../../hooks'
2
- import { useNavigation, useSidebar } from '../../context'
2
+ import { useSidebar } from '../../context'
3
3
 
4
4
  const Sidebar = () => {
5
- const { isMobile, isTablet, breakpoint } = useResponsiveLayout()
6
- const { currentPage, setCurrentPage } = useNavigation()
5
+ const { isMobile, isTablet } = useResponsiveLayout()
7
6
  const { sidebarOpen, setSidebarOpen } = useSidebar()
8
7
 
9
8
  const menuItems = [
10
- { id: 'test', label: 'Suite de Test' },
11
- { id: 'demo', label: 'Demo' },
9
+ { id: 'home', label: 'Inicio' },
10
+ { id: 'about', label: 'Acerca' },
11
+ { id: 'contact', label: 'Contacto' },
12
12
  ]
13
13
 
14
14
  return (
@@ -17,7 +17,7 @@ const Sidebar = () => {
17
17
  {isMobile && (
18
18
  <button
19
19
  onClick={() => setSidebarOpen(true)}
20
- className="fixed top-4 left-4 z-50 p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors bg-black/50 border border-gray-700"
20
+ className="fixed top-4 left-4 z-50 p-2 rounded-lg text-gray-300 hover:text-white hover:bg-gray-800 bg-gray-900 border border-gray-700"
21
21
  >
22
22
  <svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
23
23
  <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
@@ -26,72 +26,46 @@ const Sidebar = () => {
26
26
  )}
27
27
 
28
28
  {/* Sidebar desktop */}
29
- <aside className={`
30
- bg-gradient-to-b from-gray-900 to-black border-r border-cyan-500/20
31
- ${isMobile ? 'hidden' : 'w-64 flex-shrink-0'}
32
- ${isTablet ? 'w-56' : 'w-64'}
33
- `}>
34
- <div className="p-6 flex flex-col h-full">
35
- {/* Logo y Breakpoint */}
36
- <div className="flex items-center space-x-3 mb-8">
37
- <div className="w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center">
38
- <span className="text-white font-bold text-sm">RS</span>
39
- </div>
40
- <div>
41
- <span className="text-white font-bold text-lg">Sistema Responsivo</span>
42
- <div className="px-2 py-0.5 text-cyan-400 font-mono bg-black/50 border border-cyan-500/30 rounded text-xs font-bold tracking-widest mt-1">
43
- {breakpoint.toUpperCase()}
29
+ <aside className={`bg-gray-900 border-r border-gray-800 ${isMobile ? 'hidden' : 'w-64 flex-shrink-0'} ${isTablet ? 'w-56' : 'w-64'}`}>
30
+ <div className="p-6 flex flex-col h-full">
31
+ <div className="flex items-center space-x-3 mb-8">
32
+ <div className="w-8 h-8 bg-blue-500 rounded-lg flex items-center justify-center">
33
+ <span className="text-white font-bold text-sm">LO</span>
44
34
  </div>
35
+ <span className="text-white font-bold text-lg">Tu Aplicación</span>
45
36
  </div>
37
+
38
+ <nav className="space-y-2">
39
+ {menuItems.map((item) => (
40
+ <button
41
+ key={item.id}
42
+ className="w-full flex items-center px-4 py-3 rounded-lg transition-all text-left text-gray-300 hover:text-white hover:bg-gray-800"
43
+ >
44
+ <span className="font-medium">{item.label}</span>
45
+ </button>
46
+ ))}
47
+ </nav>
46
48
  </div>
47
-
48
- {/* Navigation */}
49
- <nav className="space-y-2">
50
- {menuItems.map((item) => (
51
- <button
52
- key={item.id}
53
- onClick={() => setCurrentPage(item.id as 'demo' | 'test')}
54
- className={`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${
55
- currentPage === item.id
56
- ? 'bg-cyan-500/20 text-cyan-400 border border-cyan-500/50'
57
- : 'text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10'
58
- }`}
59
- >
60
- <span className="font-medium">{item.label}</span>
61
- </button>
62
- ))}
63
- </nav>
64
-
65
- </div>
66
49
  </aside>
67
50
 
68
51
  {/* Sidebar móvil desplegable */}
69
52
  {isMobile && sidebarOpen && (
70
53
  <div className="fixed inset-0 z-40 bg-black/50" onClick={() => setSidebarOpen(false)}>
71
- <div className="fixed top-0 left-0 w-64 h-full bg-gradient-to-b from-gray-900 to-black border-r border-cyan-500/20">
54
+ <div className="fixed top-0 left-0 w-64 h-full bg-gray-900 border-r border-gray-800">
72
55
  <div className="p-6 flex flex-col h-full pt-20">
73
- {/* Logo */}
74
56
  <div className="flex items-center space-x-3 mb-8">
75
- <div className="w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center">
76
- <span className="text-white font-bold text-sm">RS</span>
57
+ <div className="w-8 h-8 bg-blue-500 rounded-lg flex items-center justify-center">
58
+ <span className="text-white font-bold text-sm">LO</span>
77
59
  </div>
78
- <span className="text-white font-bold text-lg">Sistema Responsivo</span>
60
+ <span className="text-white font-bold text-lg">Tu Aplicación</span>
79
61
  </div>
80
62
 
81
- {/* Navigation */}
82
63
  <nav className="space-y-2">
83
64
  {menuItems.map((item) => (
84
65
  <button
85
66
  key={item.id}
86
- onClick={() => {
87
- setCurrentPage(item.id as 'demo' | 'test')
88
- setSidebarOpen(false)
89
- }}
90
- className={`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${
91
- currentPage === item.id
92
- ? 'bg-cyan-500/20 text-cyan-400 border border-cyan-500/50'
93
- : 'text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10'
94
- }`}
67
+ onClick={() => setSidebarOpen(false)}
68
+ className="w-full flex items-center px-4 py-3 rounded-lg transition-all text-left text-gray-300 hover:text-white hover:bg-gray-800"
95
69
  >
96
70
  <span className="font-medium">{item.label}</span>
97
71
  </button>
@@ -1,66 +1,29 @@
1
1
  import React from 'react'
2
- import { useResponsiveLayout } from '../hooks'
3
2
  import { Sidebar, Footer } from '../components/layout'
4
- import { SidebarProvider, useSidebar } from '../context'
3
+ import { SidebarProvider } from '../context'
5
4
 
6
5
  interface DashboardLayoutProps {
7
6
  children: React.ReactNode
8
7
  }
9
8
 
10
9
  const DashboardLayoutContent: React.FC<{ children: React.ReactNode }> = ({ children }) => {
11
- const { layoutUtils } = useResponsiveLayout()
12
- const { setSidebarOpen } = useSidebar()
13
-
14
10
  return (
15
- <div className="min-h-screen bg-black flex flex-col">
16
- {/* Navbar para móvil (igual que SidebarLayout) */}
17
- <div className="sticky top-0 z-50">
18
- <nav className="bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl relative">
19
- <div className="w-full">
20
- <div className="px-4 py-4">
21
- <div className="flex items-center justify-between">
22
- <div className="flex items-center space-x-2">
23
- {/* Hamburger button para móvil - A LA IZQUIERDA */}
24
- <button
25
- onClick={() => setSidebarOpen(true)}
26
- className="p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors"
27
- >
28
- <svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
29
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
30
- </svg>
31
- </button>
32
-
33
- <div className="flex items-center space-x-2">
34
- <div className="w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse"></div>
35
- <h3 className="text-base font-black text-white tracking-tight">
36
- Sistema Responsivo
37
- </h3>
38
- </div>
39
- <div className="px-2 py-0.5 text-cyan-400 font-mono bg-black/50 border border-cyan-500/30 rounded text-xs font-bold tracking-widest">
40
- DASHBOARD
41
- </div>
42
- </div>
43
- </div>
44
- </div>
45
- </div>
46
- </nav>
47
- </div>
48
-
11
+ <div className="min-h-screen bg-gray-50 flex flex-col">
49
12
  {/* Content area con sidebar */}
50
13
  <div className="flex flex-1">
51
14
  {/* Sidebar */}
52
15
  <Sidebar />
53
16
 
54
17
  {/* Main content */}
55
- <main className="flex-1 overflow-auto">
56
- <div className={layoutUtils.getContainerClass()}>
18
+ <main className="flex-1 overflow-auto flex flex-col">
19
+ <div className="flex-1">
57
20
  {children}
58
21
  </div>
22
+
23
+ {/* Footer */}
24
+ <Footer />
59
25
  </main>
60
26
  </div>
61
-
62
- {/* Footer */}
63
- <Footer />
64
27
  </div>
65
28
  )
66
29
  }
@@ -1,24 +1,19 @@
1
1
  import React from 'react'
2
2
  import { Navigation, Footer } from '../components/layout'
3
- import { useResponsiveLayout } from '../hooks'
4
3
 
5
4
  interface DefaultLayoutProps {
6
5
  children: React.ReactNode
7
6
  }
8
7
 
9
8
  const DefaultLayout: React.FC<DefaultLayoutProps> = ({ children }) => {
10
- const { layoutUtils } = useResponsiveLayout()
11
-
12
9
  return (
13
- <div className="min-h-screen bg-black flex flex-col">
10
+ <div className="min-h-screen bg-gray-50 flex flex-col">
14
11
  {/* Navigation fijo arriba */}
15
12
  <Navigation />
16
13
 
17
- {/* Main content con padding-top para la navigation */}
14
+ {/* Main content */}
18
15
  <main className="flex-1">
19
- <div className={layoutUtils.getContainerClass()}>
20
- {children}
21
- </div>
16
+ {children}
22
17
  </main>
23
18
 
24
19
  {/* Footer fijo abajo */}
@@ -1,16 +1,13 @@
1
1
  import React from 'react'
2
- import { useResponsiveLayout } from '../hooks'
3
2
 
4
3
  interface MinimalLayoutProps {
5
4
  children: React.ReactNode
6
5
  }
7
6
 
8
7
  const MinimalLayout: React.FC<MinimalLayoutProps> = ({ children }) => {
9
- const { layoutUtils } = useResponsiveLayout()
10
-
11
8
  return (
12
- <div className="min-h-screen bg-black">
13
- <main className={layoutUtils.getContainerClass()}>
9
+ <div className="min-h-screen bg-gray-50">
10
+ <main>
14
11
  {children}
15
12
  </main>
16
13
  </div>
@@ -1,5 +1,4 @@
1
1
  import React from 'react'
2
- import { useResponsiveLayout } from '../hooks'
3
2
  import { Sidebar } from '../components/layout'
4
3
  import { SidebarProvider } from '../context'
5
4
 
@@ -8,18 +7,14 @@ interface SidebarLayoutProps {
8
7
  }
9
8
 
10
9
  const SidebarLayoutContent: React.FC<{ children: React.ReactNode }> = ({ children }) => {
11
- const { layoutUtils } = useResponsiveLayout()
12
-
13
10
  return (
14
- <div className="min-h-screen bg-black flex">
11
+ <div className="min-h-screen bg-gray-50 flex">
15
12
  {/* Sidebar */}
16
13
  <Sidebar />
17
14
 
18
15
  {/* Main content */}
19
16
  <main className="flex-1 overflow-auto">
20
- <div className={layoutUtils.getContainerClass()}>
21
- {children}
22
- </div>
17
+ {children}
23
18
  </main>
24
19
  </div>
25
20
  )