responsive-system 1.4.5 → 1.4.8

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