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