responsive-system 1.4.3 → 1.4.7
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/dist/responsive-system.cjs +2 -2
- package/dist/responsive-system.cjs.map +1 -1
- package/dist/responsive-system.mjs +223 -245
- package/dist/responsive-system.mjs.map +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +786 -827
- package/src/components/layout/Footer.tsx +4 -35
- package/src/components/layout/Navigation.tsx +1 -1
- package/src/components/layout/Sidebar.tsx +2 -5
- package/src/providers/ResponsiveLayoutProvider.tsx +7 -2
|
@@ -1,42 +1,11 @@
|
|
|
1
|
-
import { useResponsiveLayout } from '../../hooks'
|
|
2
|
-
|
|
3
1
|
const Footer = () => {
|
|
4
|
-
const { breakpoint } = useResponsiveLayout()
|
|
5
|
-
|
|
6
2
|
return (
|
|
7
3
|
<footer className="bg-gray-900 border-t border-gray-800">
|
|
8
4
|
<div className="px-4 py-6">
|
|
9
|
-
<div className="max-w-7xl mx-auto">
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<p className="text-gray-400 text-sm">
|
|
14
|
-
Descripción de tu aplicación aquí.
|
|
15
|
-
</p>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<div>
|
|
19
|
-
<h3 className="text-white font-semibold mb-2">Enlaces</h3>
|
|
20
|
-
<ul className="space-y-1 text-gray-400 text-sm">
|
|
21
|
-
<li><a href="#" className="hover:text-white">Inicio</a></li>
|
|
22
|
-
<li><a href="#" className="hover:text-white">Acerca</a></li>
|
|
23
|
-
<li><a href="#" className="hover:text-white">Contacto</a></li>
|
|
24
|
-
</ul>
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
<div>
|
|
28
|
-
<h3 className="text-white font-semibold mb-2">Info</h3>
|
|
29
|
-
<p className="text-gray-400 text-xs">
|
|
30
|
-
Breakpoint: <span className="text-blue-400">{breakpoint.toUpperCase()}</span>
|
|
31
|
-
</p>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<div className="border-t border-gray-800 mt-6 pt-4 text-center">
|
|
36
|
-
<p className="text-gray-500 text-xs">
|
|
37
|
-
© {new Date().getFullYear()} Tu Aplicación. Todos los derechos reservados.
|
|
38
|
-
</p>
|
|
39
|
-
</div>
|
|
5
|
+
<div className="max-w-7xl mx-auto text-center">
|
|
6
|
+
<p className="text-gray-400 text-sm">
|
|
7
|
+
© {new Date().getFullYear()} Tu Aplicación. Todos los derechos reservados.
|
|
8
|
+
</p>
|
|
40
9
|
</div>
|
|
41
10
|
</div>
|
|
42
11
|
</footer>
|
|
@@ -8,7 +8,7 @@ const Navigation = () => {
|
|
|
8
8
|
<div className="px-4 py-4">
|
|
9
9
|
<div className="flex items-center justify-between">
|
|
10
10
|
<div className="flex items-center space-x-3">
|
|
11
|
-
<div className="w-8 h-8 bg-
|
|
11
|
+
<div className="w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center">
|
|
12
12
|
<span className="text-white font-bold text-sm">LO</span>
|
|
13
13
|
</div>
|
|
14
14
|
<h1 className="text-white font-semibold text-lg">Tu Aplicación</h1>
|
|
@@ -13,7 +13,6 @@ const Sidebar = () => {
|
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<>
|
|
16
|
-
{/* Hamburger button para móvil */}
|
|
17
16
|
{isMobile && (
|
|
18
17
|
<button
|
|
19
18
|
onClick={() => setSidebarOpen(true)}
|
|
@@ -25,11 +24,10 @@ const Sidebar = () => {
|
|
|
25
24
|
</button>
|
|
26
25
|
)}
|
|
27
26
|
|
|
28
|
-
{/* Sidebar desktop */}
|
|
29
27
|
<aside className={`bg-gray-900 border-r border-gray-800 ${isMobile ? 'hidden' : 'w-64 flex-shrink-0'} ${isTablet ? 'w-56' : 'w-64'}`}>
|
|
30
28
|
<div className="p-6 flex flex-col h-full">
|
|
31
29
|
<div className="flex items-center space-x-3 mb-8">
|
|
32
|
-
<div className="w-8 h-8 bg-
|
|
30
|
+
<div className="w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center">
|
|
33
31
|
<span className="text-white font-bold text-sm">LO</span>
|
|
34
32
|
</div>
|
|
35
33
|
<span className="text-white font-bold text-lg">Tu Aplicación</span>
|
|
@@ -48,13 +46,12 @@ const Sidebar = () => {
|
|
|
48
46
|
</div>
|
|
49
47
|
</aside>
|
|
50
48
|
|
|
51
|
-
{/* Sidebar móvil desplegable */}
|
|
52
49
|
{isMobile && sidebarOpen && (
|
|
53
50
|
<div className="fixed inset-0 z-40 bg-black/50" onClick={() => setSidebarOpen(false)}>
|
|
54
51
|
<div className="fixed top-0 left-0 w-64 h-full bg-gray-900 border-r border-gray-800">
|
|
55
52
|
<div className="p-6 flex flex-col h-full pt-20">
|
|
56
53
|
<div className="flex items-center space-x-3 mb-8">
|
|
57
|
-
<div className="w-8 h-8 bg-
|
|
54
|
+
<div className="w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center">
|
|
58
55
|
<span className="text-white font-bold text-sm">LO</span>
|
|
59
56
|
</div>
|
|
60
57
|
<span className="text-white font-bold text-lg">Tu Aplicación</span>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { ResponsiveProvider } from './index'
|
|
3
3
|
import { useResponsive } from '../hooks'
|
|
4
4
|
import { ResponsiveLayoutContext } from '../context'
|
|
@@ -32,7 +32,12 @@ const ResponsiveLayoutProviderInner: React.FC<ResponsiveLayoutProviderInnerProps
|
|
|
32
32
|
const customResponsive = useResponsiveHook?.()
|
|
33
33
|
const responsive = customResponsive || internalResponsive
|
|
34
34
|
|
|
35
|
-
const [currentLayout, setCurrentLayout] = useState(defaultLayout)
|
|
35
|
+
const [currentLayout, setCurrentLayout] = useState(() => defaultLayout)
|
|
36
|
+
|
|
37
|
+
// Asegurar que el layout se inicialice correctamente con el defaultLayout
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
setCurrentLayout(defaultLayout)
|
|
40
|
+
}, [defaultLayout])
|
|
36
41
|
|
|
37
42
|
const layoutConfig = LAYOUT_CONFIG[currentLayout] || LAYOUT_CONFIG[DEFAULT_LAYOUT]
|
|
38
43
|
|