responsive-system 1.4.3 → 1.4.5
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 +3 -3
- package/dist/responsive-system.cjs.map +1 -1
- package/dist/responsive-system.mjs +168 -194
- package/dist/responsive-system.mjs.map +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +32 -73
- package/src/components/layout/Footer.tsx +4 -35
- package/src/components/layout/Navigation.tsx +1 -1
- package/src/components/layout/Sidebar.tsx +2 -5
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as k, useCallback as d, useMemo as D, useEffect as
|
|
3
|
-
const
|
|
4
|
-
children:
|
|
1
|
+
import { jsx as t, Fragment as A, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as k, useCallback as d, useMemo as D, useEffect as oe, createContext as M, useContext as O } from "react";
|
|
3
|
+
const ie = ({
|
|
4
|
+
children: e,
|
|
5
5
|
debug: r = !1
|
|
6
|
-
}) => /* @__PURE__ */
|
|
6
|
+
}) => /* @__PURE__ */ t(A, { children: e }), u = {
|
|
7
7
|
xs: 475,
|
|
8
8
|
sm: 640,
|
|
9
9
|
md: 768,
|
|
@@ -13,18 +13,18 @@ const oe = ({
|
|
|
13
13
|
"3xl": 1920,
|
|
14
14
|
"4xl": 2560,
|
|
15
15
|
"5xl": 3840
|
|
16
|
-
}, le = (
|
|
17
|
-
function ce(
|
|
16
|
+
}, le = (e) => e >= u["5xl"] ? "5xl" : e >= u["4xl"] ? "4xl" : e >= u["3xl"] ? "3xl" : e >= u["2xl"] ? "2xl" : e >= u.xl ? "xl" : e >= u.lg ? "lg" : e >= u.md ? "md" : e >= u.sm ? "sm" : "xs", b = (e) => ["xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl"].indexOf(e), Ce = (e) => u[e];
|
|
17
|
+
function ce(e, r) {
|
|
18
18
|
let o = null;
|
|
19
|
-
return (...
|
|
20
|
-
o && clearTimeout(o), o = setTimeout(() =>
|
|
19
|
+
return (...i) => {
|
|
20
|
+
o && clearTimeout(o), o = setTimeout(() => e(...i), r);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function de(
|
|
24
|
-
return
|
|
23
|
+
function de(e, r) {
|
|
24
|
+
return e >= r ? "landscape" : "portrait";
|
|
25
25
|
}
|
|
26
26
|
const ue = () => {
|
|
27
|
-
const [
|
|
27
|
+
const [e, r] = k({
|
|
28
28
|
width: typeof window < "u" ? window.innerWidth : 1024,
|
|
29
29
|
height: typeof window < "u" ? window.innerHeight : 768
|
|
30
30
|
}), o = d(() => {
|
|
@@ -32,20 +32,20 @@ const ue = () => {
|
|
|
32
32
|
width: window.innerWidth,
|
|
33
33
|
height: window.innerHeight
|
|
34
34
|
});
|
|
35
|
-
}, []),
|
|
35
|
+
}, []), i = D(
|
|
36
36
|
() => ce(o, 100),
|
|
37
37
|
[o]
|
|
38
38
|
);
|
|
39
|
-
|
|
39
|
+
oe(() => {
|
|
40
40
|
if (!(typeof window > "u"))
|
|
41
|
-
return window.addEventListener("resize",
|
|
42
|
-
window.removeEventListener("resize",
|
|
41
|
+
return window.addEventListener("resize", i), () => {
|
|
42
|
+
window.removeEventListener("resize", i);
|
|
43
43
|
};
|
|
44
|
-
}, [
|
|
45
|
-
const { width: s, height: a } =
|
|
46
|
-
const
|
|
47
|
-
return
|
|
48
|
-
}, [n]), ee = d((c) => s >= c, [s]), te = d((c) => s <= c, [s]), ne = d((c,
|
|
44
|
+
}, [i]);
|
|
45
|
+
const { width: s, height: a } = e, n = D(() => le(s), [s]), g = D(() => de(s, a), [s, a]), m = n === "xs", w = n === "sm", x = n === "md", h = n === "lg", C = n === "xl", S = n === "2xl", L = n === "3xl", f = n === "4xl", p = n === "5xl", W = m || w, z = x, I = h || C || S || L || f || p, X = m || w || x, _ = h || C || S || L || f || p, Y = L || f || p, K = f || p, V = p, q = g === "portrait", G = g === "landscape", J = d((c) => b(n) >= b(c), [n]), Q = d((c) => b(n) <= b(c), [n]), Z = d((c, y) => {
|
|
46
|
+
const P = b(n);
|
|
47
|
+
return P >= b(c) && P <= b(y);
|
|
48
|
+
}, [n]), ee = d((c) => s >= c, [s]), te = d((c) => s <= c, [s]), ne = d((c, y) => s >= c && s <= y, [s]), se = d((c) => a >= c, [a]), re = d((c) => a <= c, [a]), ae = d((c, y) => a >= c && a <= y, [a]);
|
|
49
49
|
return {
|
|
50
50
|
// Estado básico
|
|
51
51
|
breakpoint: n,
|
|
@@ -55,17 +55,17 @@ const ue = () => {
|
|
|
55
55
|
// Helpers booleanos específicos
|
|
56
56
|
isXs: m,
|
|
57
57
|
isSm: w,
|
|
58
|
-
isMd:
|
|
59
|
-
isLg:
|
|
58
|
+
isMd: x,
|
|
59
|
+
isLg: h,
|
|
60
60
|
isXl: C,
|
|
61
61
|
is2Xl: S,
|
|
62
62
|
is3Xl: L,
|
|
63
|
-
is4Xl:
|
|
63
|
+
is4Xl: f,
|
|
64
64
|
is5Xl: p,
|
|
65
65
|
// Helpers booleanos agrupados
|
|
66
|
-
isMobile:
|
|
67
|
-
isTablet:
|
|
68
|
-
isDesktop:
|
|
66
|
+
isMobile: W,
|
|
67
|
+
isTablet: z,
|
|
68
|
+
isDesktop: I,
|
|
69
69
|
isSmall: X,
|
|
70
70
|
isLarge: _,
|
|
71
71
|
isUltraWide: Y,
|
|
@@ -87,86 +87,86 @@ const ue = () => {
|
|
|
87
87
|
// Debug
|
|
88
88
|
debug: !1
|
|
89
89
|
};
|
|
90
|
-
},
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
90
|
+
}, R = M(void 0), me = () => {
|
|
91
|
+
const e = O(R);
|
|
92
|
+
if (!e)
|
|
93
93
|
throw new Error("useResponsiveLayoutContext must be used within a ResponsiveLayoutProvider");
|
|
94
|
-
return
|
|
95
|
-
},
|
|
94
|
+
return e;
|
|
95
|
+
}, T = M(void 0), U = ({ children: e }) => {
|
|
96
96
|
const [r, o] = k(!1);
|
|
97
|
-
return /* @__PURE__ */
|
|
97
|
+
return /* @__PURE__ */ t(T.Provider, { value: { sidebarOpen: r, setSidebarOpen: o }, children: e });
|
|
98
98
|
}, B = () => {
|
|
99
|
-
const
|
|
100
|
-
if (!
|
|
99
|
+
const e = O(T);
|
|
100
|
+
if (!e)
|
|
101
101
|
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
102
|
-
return
|
|
103
|
-
},
|
|
102
|
+
return e;
|
|
103
|
+
}, $ = M({
|
|
104
104
|
currentPage: "test",
|
|
105
105
|
setCurrentPage: () => {
|
|
106
106
|
}
|
|
107
|
-
}),
|
|
108
|
-
children:
|
|
107
|
+
}), be = () => O($), Se = ({
|
|
108
|
+
children: e,
|
|
109
109
|
defaultPage: r = "test"
|
|
110
110
|
}) => {
|
|
111
|
-
const [o,
|
|
112
|
-
return /* @__PURE__ */
|
|
113
|
-
},
|
|
114
|
-
const
|
|
111
|
+
const [o, i] = k(r);
|
|
112
|
+
return /* @__PURE__ */ t($.Provider, { value: { currentPage: o, setCurrentPage: i }, children: e });
|
|
113
|
+
}, N = () => {
|
|
114
|
+
const e = me();
|
|
115
115
|
return {
|
|
116
116
|
// Todo el sistema responsivo original
|
|
117
|
-
...
|
|
117
|
+
...e.responsive,
|
|
118
118
|
// Sistema de layout
|
|
119
119
|
layout: {
|
|
120
|
-
current:
|
|
121
|
-
config:
|
|
122
|
-
setLayout:
|
|
120
|
+
current: e.layout.current,
|
|
121
|
+
config: e.layout.config,
|
|
122
|
+
setLayout: e.layout.setLayout
|
|
123
123
|
},
|
|
124
124
|
// Utilidades de layout
|
|
125
|
-
layoutUtils:
|
|
125
|
+
layoutUtils: e.layoutUtils,
|
|
126
126
|
// Helpers específicos del layout
|
|
127
|
-
isDefaultLayout: () =>
|
|
128
|
-
isSidebarLayout: () =>
|
|
129
|
-
isDashboardLayout: () =>
|
|
130
|
-
isMinimalLayout: () =>
|
|
127
|
+
isDefaultLayout: () => e.layout.current === "default",
|
|
128
|
+
isSidebarLayout: () => e.layout.current === "sidebar",
|
|
129
|
+
isDashboardLayout: () => e.layout.current === "dashboard",
|
|
130
|
+
isMinimalLayout: () => e.layout.current === "minimal",
|
|
131
131
|
// Grid helpers que usan el sistema auto-escalable
|
|
132
132
|
grid: {
|
|
133
133
|
auto: (r = "md") => `grid-cols-auto-${r}`,
|
|
134
134
|
responsive: (r) => {
|
|
135
135
|
const o = [];
|
|
136
|
-
return Object.entries(r).forEach(([
|
|
137
|
-
|
|
136
|
+
return Object.entries(r).forEach(([i, s]) => {
|
|
137
|
+
i === "base" ? o.push(`grid-cols-${s}`) : o.push(`${i}:grid-cols-${s}`);
|
|
138
138
|
}), o.join(" ");
|
|
139
139
|
},
|
|
140
140
|
fixed: (r) => `grid-cols-${r}`
|
|
141
141
|
},
|
|
142
142
|
// Spacing helpers que escalan automáticamente
|
|
143
143
|
spacing: {
|
|
144
|
-
container:
|
|
144
|
+
container: e.layoutUtils.getContainerClass(),
|
|
145
145
|
section: "mb-6",
|
|
146
146
|
card: "p-6",
|
|
147
147
|
gap: "gap-4"
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
|
-
},
|
|
151
|
-
const
|
|
150
|
+
}, he = () => {
|
|
151
|
+
const e = N();
|
|
152
152
|
return {
|
|
153
153
|
// Layout actual
|
|
154
|
-
current:
|
|
155
|
-
config:
|
|
156
|
-
setLayout:
|
|
154
|
+
current: e.layout.current,
|
|
155
|
+
config: e.layout.config,
|
|
156
|
+
setLayout: e.layout.setLayout,
|
|
157
157
|
// Utilidades
|
|
158
|
-
...
|
|
158
|
+
...e.layoutUtils,
|
|
159
159
|
// Helpers específicos
|
|
160
|
-
isDefaultLayout:
|
|
161
|
-
isSidebarLayout:
|
|
162
|
-
isDashboardLayout:
|
|
163
|
-
isMinimalLayout:
|
|
160
|
+
isDefaultLayout: e.isDefaultLayout(),
|
|
161
|
+
isSidebarLayout: e.isSidebarLayout(),
|
|
162
|
+
isDashboardLayout: e.isDashboardLayout(),
|
|
163
|
+
isMinimalLayout: e.isMinimalLayout(),
|
|
164
164
|
// Grid helpers
|
|
165
|
-
grid:
|
|
165
|
+
grid: e.grid,
|
|
166
166
|
// Spacing helpers
|
|
167
|
-
spacing:
|
|
167
|
+
spacing: e.spacing
|
|
168
168
|
};
|
|
169
|
-
},
|
|
169
|
+
}, v = {
|
|
170
170
|
default: {
|
|
171
171
|
name: "Default",
|
|
172
172
|
description: "Navbar arriba, body central, footer abajo",
|
|
@@ -211,12 +211,12 @@ const ue = () => {
|
|
|
211
211
|
desktop: "p-6"
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
},
|
|
215
|
-
children:
|
|
214
|
+
}, E = "default", De = Object.keys(v), pe = ({
|
|
215
|
+
children: e,
|
|
216
216
|
defaultLayout: r,
|
|
217
217
|
useResponsiveHook: o
|
|
218
218
|
}) => {
|
|
219
|
-
const
|
|
219
|
+
const i = ue(), a = o?.() || i, [n, g] = k(r), m = v[n] || v[E], x = {
|
|
220
220
|
responsive: a,
|
|
221
221
|
layout: {
|
|
222
222
|
current: n,
|
|
@@ -226,8 +226,8 @@ const ue = () => {
|
|
|
226
226
|
layoutUtils: {
|
|
227
227
|
getContainerClass: () => a.isMobile ? m.responsive.mobile : a.isTablet ? m.responsive.tablet : m.responsive.desktop,
|
|
228
228
|
getMainClass: () => {
|
|
229
|
-
const
|
|
230
|
-
return n === "sidebar" || n === "dashboard" ? `${
|
|
229
|
+
const h = "min-h-screen bg-black";
|
|
230
|
+
return n === "sidebar" || n === "dashboard" ? `${h} flex` : h;
|
|
231
231
|
},
|
|
232
232
|
hasSidebar: () => n === "sidebar" || n === "dashboard",
|
|
233
233
|
hasHeader: () => n === "dashboard",
|
|
@@ -235,49 +235,49 @@ const ue = () => {
|
|
|
235
235
|
hasNavigation: () => n === "default"
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
|
-
return /* @__PURE__ */
|
|
238
|
+
return /* @__PURE__ */ t(R.Provider, { value: x, children: e });
|
|
239
239
|
}, Me = ({
|
|
240
|
-
children:
|
|
241
|
-
defaultLayout: r =
|
|
240
|
+
children: e,
|
|
241
|
+
defaultLayout: r = E,
|
|
242
242
|
useResponsiveHook: o
|
|
243
|
-
}) => /* @__PURE__ */
|
|
243
|
+
}) => /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t(
|
|
244
244
|
pe,
|
|
245
245
|
{
|
|
246
246
|
defaultLayout: r,
|
|
247
247
|
useResponsiveHook: o,
|
|
248
|
-
children:
|
|
248
|
+
children: e
|
|
249
249
|
}
|
|
250
|
-
) }), Oe = ({ children:
|
|
251
|
-
const { layout: o } =
|
|
252
|
-
default:
|
|
250
|
+
) }), Oe = ({ children: e, layout: r }) => {
|
|
251
|
+
const { layout: o } = N(), i = r || o.current, a = {
|
|
252
|
+
default: j,
|
|
253
253
|
sidebar: fe,
|
|
254
254
|
dashboard: ve,
|
|
255
255
|
minimal: Ne
|
|
256
|
-
}[
|
|
257
|
-
return /* @__PURE__ */
|
|
258
|
-
},
|
|
259
|
-
const { isMobile:
|
|
256
|
+
}[i] || j;
|
|
257
|
+
return /* @__PURE__ */ t(a, { children: e });
|
|
258
|
+
}, Pe = () => {
|
|
259
|
+
const { isMobile: e } = N(), { currentPage: r, setCurrentPage: o } = be(), { sidebarOpen: i, setSidebarOpen: s } = B(), a = [
|
|
260
260
|
{ id: "test", label: "Suite de Test" },
|
|
261
261
|
{ id: "demo", label: "Demo" }
|
|
262
262
|
];
|
|
263
|
-
return /* @__PURE__ */
|
|
264
|
-
/* @__PURE__ */
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
-
|
|
263
|
+
return /* @__PURE__ */ l("div", { className: "sticky top-0 z-50", children: [
|
|
264
|
+
/* @__PURE__ */ t("header", { className: "bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl relative", children: /* @__PURE__ */ t("div", { className: "w-full", children: /* @__PURE__ */ t("div", { className: "px-4 py-4", children: /* @__PURE__ */ l("div", { className: "flex items-center justify-between", children: [
|
|
265
|
+
/* @__PURE__ */ l("div", { className: "flex items-center space-x-2", children: [
|
|
266
|
+
e && /* @__PURE__ */ t(
|
|
267
267
|
"button",
|
|
268
268
|
{
|
|
269
269
|
onClick: () => s(!0),
|
|
270
270
|
className: "p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors",
|
|
271
|
-
children: /* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ t("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }) })
|
|
272
272
|
}
|
|
273
273
|
),
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ l("div", { className: "flex items-center space-x-2", children: [
|
|
275
|
+
/* @__PURE__ */ t("div", { className: "w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse" }),
|
|
276
|
+
/* @__PURE__ */ t("h3", { className: "text-base font-black text-white tracking-tight", children: "Sistema Responsivo" })
|
|
277
277
|
] }),
|
|
278
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ t("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", children: "DASHBOARD" })
|
|
279
279
|
] }),
|
|
280
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: !e && a.map((n) => /* @__PURE__ */ t(
|
|
281
281
|
"button",
|
|
282
282
|
{
|
|
283
283
|
onClick: () => o(n.id),
|
|
@@ -287,137 +287,111 @@ const ue = () => {
|
|
|
287
287
|
n.id
|
|
288
288
|
)) })
|
|
289
289
|
] }) }) }) }),
|
|
290
|
-
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
/* @__PURE__ */
|
|
290
|
+
e && i && /* @__PURE__ */ t("div", { className: "fixed inset-0 z-40 bg-black/50", onClick: () => s(!1), children: /* @__PURE__ */ t("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", children: /* @__PURE__ */ l("div", { className: "p-6 flex flex-col h-full pt-20", children: [
|
|
291
|
+
/* @__PURE__ */ l("div", { className: "flex items-center space-x-3 mb-8", children: [
|
|
292
|
+
/* @__PURE__ */ t("div", { className: "w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ t("span", { className: "text-white font-bold text-sm", children: "RS" }) }),
|
|
293
|
+
/* @__PURE__ */ t("span", { className: "text-white font-bold text-lg", children: "Sistema Responsivo" })
|
|
294
294
|
] }),
|
|
295
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ t("nav", { className: "space-y-2", children: a.map((n) => /* @__PURE__ */ t(
|
|
296
296
|
"button",
|
|
297
297
|
{
|
|
298
298
|
onClick: () => {
|
|
299
299
|
o(n.id), s(!1);
|
|
300
300
|
},
|
|
301
301
|
className: `w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${r === n.id ? "bg-cyan-500/20 text-cyan-400 border border-cyan-500/50" : "text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10"}`,
|
|
302
|
-
children: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ t("span", { className: "font-medium", children: n.label })
|
|
303
303
|
},
|
|
304
304
|
n.id
|
|
305
305
|
)) })
|
|
306
306
|
] }) }) })
|
|
307
307
|
] });
|
|
308
308
|
}, F = () => {
|
|
309
|
-
const { isMobile:
|
|
309
|
+
const { isMobile: e, isTablet: r } = N(), { sidebarOpen: o, setSidebarOpen: i } = B(), s = [
|
|
310
310
|
{ id: "home", label: "Inicio" },
|
|
311
311
|
{ id: "about", label: "Acerca" },
|
|
312
312
|
{ id: "contact", label: "Contacto" }
|
|
313
313
|
];
|
|
314
|
-
return /* @__PURE__ */
|
|
315
|
-
|
|
314
|
+
return /* @__PURE__ */ l(A, { children: [
|
|
315
|
+
e && /* @__PURE__ */ t(
|
|
316
316
|
"button",
|
|
317
317
|
{
|
|
318
|
-
onClick: () =>
|
|
318
|
+
onClick: () => i(!0),
|
|
319
319
|
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",
|
|
320
|
-
children: /* @__PURE__ */
|
|
320
|
+
children: /* @__PURE__ */ t("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }) })
|
|
321
321
|
}
|
|
322
322
|
),
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
/* @__PURE__ */
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ t("aside", { className: `bg-gray-900 border-r border-gray-800 ${e ? "hidden" : "w-64 flex-shrink-0"} ${r ? "w-56" : "w-64"}`, children: /* @__PURE__ */ l("div", { className: "p-6 flex flex-col h-full", children: [
|
|
324
|
+
/* @__PURE__ */ l("div", { className: "flex items-center space-x-3 mb-8", children: [
|
|
325
|
+
/* @__PURE__ */ t("div", { className: "w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ t("span", { className: "text-white font-bold text-sm", children: "LO" }) }),
|
|
326
|
+
/* @__PURE__ */ t("span", { className: "text-white font-bold text-lg", children: "Tu Aplicación" })
|
|
327
327
|
] }),
|
|
328
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ t("nav", { className: "space-y-2", children: s.map((a) => /* @__PURE__ */ t(
|
|
329
329
|
"button",
|
|
330
330
|
{
|
|
331
331
|
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",
|
|
332
|
-
children: /* @__PURE__ */
|
|
332
|
+
children: /* @__PURE__ */ t("span", { className: "font-medium", children: a.label })
|
|
333
333
|
},
|
|
334
334
|
a.id
|
|
335
335
|
)) })
|
|
336
336
|
] }) }),
|
|
337
|
-
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
337
|
+
e && o && /* @__PURE__ */ t("div", { className: "fixed inset-0 z-40 bg-black/50", onClick: () => i(!1), children: /* @__PURE__ */ t("div", { className: "fixed top-0 left-0 w-64 h-full bg-gray-900 border-r border-gray-800", children: /* @__PURE__ */ l("div", { className: "p-6 flex flex-col h-full pt-20", children: [
|
|
338
|
+
/* @__PURE__ */ l("div", { className: "flex items-center space-x-3 mb-8", children: [
|
|
339
|
+
/* @__PURE__ */ t("div", { className: "w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ t("span", { className: "text-white font-bold text-sm", children: "LO" }) }),
|
|
340
|
+
/* @__PURE__ */ t("span", { className: "text-white font-bold text-lg", children: "Tu Aplicación" })
|
|
341
341
|
] }),
|
|
342
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ t("nav", { className: "space-y-2", children: s.map((a) => /* @__PURE__ */ t(
|
|
343
343
|
"button",
|
|
344
344
|
{
|
|
345
|
-
onClick: () =>
|
|
345
|
+
onClick: () => i(!1),
|
|
346
346
|
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",
|
|
347
|
-
children: /* @__PURE__ */
|
|
347
|
+
children: /* @__PURE__ */ t("span", { className: "font-medium", children: a.label })
|
|
348
348
|
},
|
|
349
349
|
a.id
|
|
350
350
|
)) })
|
|
351
351
|
] }) }) })
|
|
352
352
|
] });
|
|
353
|
-
}, H = () => {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
|
|
363
|
-
/* @__PURE__ */ i("ul", { className: "space-y-1 text-gray-400 text-sm", children: [
|
|
364
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("a", { href: "#", className: "hover:text-white", children: "Inicio" }) }),
|
|
365
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("a", { href: "#", className: "hover:text-white", children: "Acerca" }) }),
|
|
366
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("a", { href: "#", className: "hover:text-white", children: "Contacto" }) })
|
|
367
|
-
] })
|
|
368
|
-
] }),
|
|
369
|
-
/* @__PURE__ */ i("div", { children: [
|
|
370
|
-
/* @__PURE__ */ e("h3", { className: "text-white font-semibold mb-2", children: "Info" }),
|
|
371
|
-
/* @__PURE__ */ i("p", { className: "text-gray-400 text-xs", children: [
|
|
372
|
-
"Breakpoint: ",
|
|
373
|
-
/* @__PURE__ */ e("span", { className: "text-blue-400", children: t.toUpperCase() })
|
|
374
|
-
] })
|
|
375
|
-
] })
|
|
376
|
-
] }),
|
|
377
|
-
/* @__PURE__ */ e("div", { className: "border-t border-gray-800 mt-6 pt-4 text-center", children: /* @__PURE__ */ i("p", { className: "text-gray-500 text-xs", children: [
|
|
378
|
-
"© ",
|
|
379
|
-
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
380
|
-
" Tu Aplicación. Todos los derechos reservados."
|
|
381
|
-
] }) })
|
|
382
|
-
] }) }) });
|
|
383
|
-
}, xe = () => {
|
|
384
|
-
const { isMobile: t } = x();
|
|
385
|
-
return /* @__PURE__ */ e("nav", { className: "sticky top-0 z-50 bg-gray-900 border-b border-gray-800", children: /* @__PURE__ */ e("div", { className: "px-4 py-4", children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
386
|
-
/* @__PURE__ */ i("div", { className: "flex items-center space-x-3", children: [
|
|
387
|
-
/* @__PURE__ */ e("div", { className: "w-8 h-8 bg-blue-500 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-white font-bold text-sm", children: "LO" }) }),
|
|
388
|
-
/* @__PURE__ */ e("h1", { className: "text-white font-semibold text-lg", children: "Tu Aplicación" })
|
|
353
|
+
}, H = () => /* @__PURE__ */ t("footer", { className: "bg-gray-900 border-t border-gray-800", children: /* @__PURE__ */ t("div", { className: "px-4 py-6", children: /* @__PURE__ */ t("div", { className: "max-w-7xl mx-auto text-center", children: /* @__PURE__ */ l("p", { className: "text-gray-400 text-sm", children: [
|
|
354
|
+
"© ",
|
|
355
|
+
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
356
|
+
" Tu Aplicación. Todos los derechos reservados."
|
|
357
|
+
] }) }) }) }), ge = () => {
|
|
358
|
+
const { isMobile: e } = N();
|
|
359
|
+
return /* @__PURE__ */ t("nav", { className: "sticky top-0 z-50 bg-gray-900 border-b border-gray-800", children: /* @__PURE__ */ t("div", { className: "px-4 py-4", children: /* @__PURE__ */ l("div", { className: "flex items-center justify-between", children: [
|
|
360
|
+
/* @__PURE__ */ l("div", { className: "flex items-center space-x-3", children: [
|
|
361
|
+
/* @__PURE__ */ t("div", { className: "w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ t("span", { className: "text-white font-bold text-sm", children: "LO" }) }),
|
|
362
|
+
/* @__PURE__ */ t("h1", { className: "text-white font-semibold text-lg", children: "Tu Aplicación" })
|
|
389
363
|
] }),
|
|
390
|
-
|
|
364
|
+
e && /* @__PURE__ */ t("button", { className: "p-2 text-gray-400 hover:text-white", children: /* @__PURE__ */ t("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }) }) })
|
|
391
365
|
] }) }) });
|
|
392
|
-
},
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
] }),
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
] }), fe = ({ children:
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
/* @__PURE__ */
|
|
366
|
+
}, j = ({ children: e }) => /* @__PURE__ */ l("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
|
|
367
|
+
/* @__PURE__ */ t(ge, {}),
|
|
368
|
+
/* @__PURE__ */ t("main", { className: "flex-1", children: e }),
|
|
369
|
+
/* @__PURE__ */ t(H, {})
|
|
370
|
+
] }), xe = ({ children: e }) => /* @__PURE__ */ l("div", { className: "min-h-screen bg-gray-50 flex", children: [
|
|
371
|
+
/* @__PURE__ */ t(F, {}),
|
|
372
|
+
/* @__PURE__ */ t("main", { className: "flex-1 overflow-auto", children: e })
|
|
373
|
+
] }), fe = ({ children: e }) => /* @__PURE__ */ t(U, { children: /* @__PURE__ */ t(xe, { children: e }) }), ye = ({ children: e }) => /* @__PURE__ */ t("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: /* @__PURE__ */ l("div", { className: "flex flex-1", children: [
|
|
374
|
+
/* @__PURE__ */ t(F, {}),
|
|
375
|
+
/* @__PURE__ */ l("main", { className: "flex-1 overflow-auto flex flex-col", children: [
|
|
376
|
+
/* @__PURE__ */ t("div", { className: "flex-1", children: e }),
|
|
377
|
+
/* @__PURE__ */ t(H, {})
|
|
404
378
|
] })
|
|
405
|
-
] }) }), ve = ({ children:
|
|
406
|
-
const { current: r, setLayout: o, config:
|
|
407
|
-
return
|
|
408
|
-
/* @__PURE__ */
|
|
409
|
-
/* @__PURE__ */
|
|
379
|
+
] }) }), ve = ({ children: e }) => /* @__PURE__ */ t(U, { children: /* @__PURE__ */ t(ye, { children: e }) }), Ne = ({ children: e }) => /* @__PURE__ */ t("div", { className: "min-h-screen bg-gray-50", children: /* @__PURE__ */ t("main", { children: e }) }), je = ({ compact: e = !1 }) => {
|
|
380
|
+
const { current: r, setLayout: o, config: i } = he();
|
|
381
|
+
return e ? /* @__PURE__ */ l("div", { className: "bg-black/50 rounded-lg p-3 border border-gray-700", children: [
|
|
382
|
+
/* @__PURE__ */ t("div", { className: "text-xs text-gray-500 mb-2", children: "Layout:" }),
|
|
383
|
+
/* @__PURE__ */ t(
|
|
410
384
|
"select",
|
|
411
385
|
{
|
|
412
386
|
value: r,
|
|
413
387
|
onChange: (s) => o(s.target.value),
|
|
414
388
|
className: "w-full bg-gray-800 text-white text-sm p-2 rounded border border-gray-600 focus:ring-1 focus:ring-cyan-500 focus:border-transparent",
|
|
415
|
-
children: Object.entries(
|
|
389
|
+
children: Object.entries(v).map(([s, a]) => /* @__PURE__ */ t("option", { value: s, children: a.name }, s))
|
|
416
390
|
}
|
|
417
391
|
)
|
|
418
|
-
] }) : /* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
/* @__PURE__ */
|
|
392
|
+
] }) : /* @__PURE__ */ l("div", { className: "bg-black/50 backdrop-blur-sm rounded-lg p-4 border border-cyan-500/30", children: [
|
|
393
|
+
/* @__PURE__ */ t("h3", { className: "text-white font-semibold mb-3", children: "Cambiar Layout" }),
|
|
394
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3", children: Object.entries(v).map(([s, a]) => /* @__PURE__ */ l(
|
|
421
395
|
"button",
|
|
422
396
|
{
|
|
423
397
|
onClick: () => o(s),
|
|
@@ -426,45 +400,45 @@ const ue = () => {
|
|
|
426
400
|
${r === s ? "border-cyan-500 bg-cyan-500/10 text-cyan-400" : "border-gray-700 bg-black/30 text-gray-300 hover:border-gray-600"}
|
|
427
401
|
`,
|
|
428
402
|
children: [
|
|
429
|
-
/* @__PURE__ */
|
|
430
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ t("div", { className: "font-semibold mb-1", children: a.name }),
|
|
404
|
+
/* @__PURE__ */ t("div", { className: "text-xs opacity-75", children: a.description })
|
|
431
405
|
]
|
|
432
406
|
},
|
|
433
407
|
s
|
|
434
408
|
)) }),
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
/* @__PURE__ */
|
|
438
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ l("div", { className: "mt-4 p-3 bg-gray-900/50 rounded-lg", children: [
|
|
410
|
+
/* @__PURE__ */ t("div", { className: "text-xs text-gray-500 mb-1", children: "Layout Actual:" }),
|
|
411
|
+
/* @__PURE__ */ t("div", { className: "text-sm text-cyan-400 font-medium", children: i.name }),
|
|
412
|
+
/* @__PURE__ */ t("div", { className: "text-xs text-gray-400", children: i.description })
|
|
439
413
|
] })
|
|
440
414
|
] });
|
|
441
415
|
};
|
|
442
416
|
export {
|
|
443
417
|
De as AVAILABLE_LAYOUTS,
|
|
444
418
|
u as DEFAULT_BREAKPOINTS,
|
|
445
|
-
|
|
419
|
+
E as DEFAULT_LAYOUT,
|
|
446
420
|
ve as DashboardLayout,
|
|
447
|
-
|
|
421
|
+
j as DefaultLayout,
|
|
448
422
|
H as Footer,
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
423
|
+
Pe as Header,
|
|
424
|
+
v as LAYOUT_CONFIG,
|
|
425
|
+
je as LayoutSwitcher,
|
|
452
426
|
Oe as MainLayout,
|
|
453
427
|
Ne as MinimalLayout,
|
|
454
|
-
|
|
428
|
+
ge as Navigation,
|
|
455
429
|
Se as NavigationProvider,
|
|
456
430
|
Me as ResponsiveLayoutProvider,
|
|
457
|
-
|
|
431
|
+
ie as ResponsiveProvider,
|
|
458
432
|
F as Sidebar,
|
|
459
433
|
fe as SidebarLayout,
|
|
460
434
|
U as SidebarProvider,
|
|
461
|
-
|
|
435
|
+
b as getBreakpointIndex,
|
|
462
436
|
Ce as getBreakpointValue,
|
|
463
437
|
le as getCurrentBreakpoint,
|
|
464
|
-
|
|
465
|
-
|
|
438
|
+
he as useLayout,
|
|
439
|
+
be as useNavigation,
|
|
466
440
|
ue as useResponsive,
|
|
467
|
-
|
|
441
|
+
N as useResponsiveLayout,
|
|
468
442
|
me as useResponsiveLayoutContext,
|
|
469
443
|
B as useSidebar
|
|
470
444
|
};
|