responsive-system 1.6.1 → 1.7.1

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