responsive-system 1.4.2 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),U=({children:s,debug:a=!1})=>e.jsx(e.Fragment,{children:s}),m={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536,"3xl":1920,"4xl":2560,"5xl":3840},A=s=>s>=m["5xl"]?"5xl":s>=m["4xl"]?"4xl":s>=m["3xl"]?"3xl":s>=m["2xl"]?"2xl":s>=m.xl?"xl":s>=m.lg?"lg":s>=m.md?"md":s>=m.sm?"sm":"xs",b=s=>["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl"].indexOf(s),de=s=>m[s];function xe(s,a){let r=null;return(...o)=>{r&&clearTimeout(r),r=setTimeout(()=>s(...o),a)}}function ue(s,a){return s>=a?"landscape":"portrait"}const B=()=>{const[s,a]=l.useState({width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768}),r=l.useCallback(()=>{a({width:window.innerWidth,height:window.innerHeight})},[]),o=l.useMemo(()=>xe(r,100),[r]);l.useEffect(()=>{if(!(typeof window>"u"))return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[o]);const{width:n,height:i}=s,t=l.useMemo(()=>A(n),[n]),c=l.useMemo(()=>ue(n,i),[n,i]),d=t==="xs",j=t==="sm",y=t==="md",h=t==="lg",L=t==="xl",C=t==="2xl",N=t==="3xl",f=t==="4xl",p=t==="5xl",X=d||j,Y=y,V=h||L||C||N||f||p,K=d||j||y,q=h||L||C||N||f||p,G=N||f||p,J=f||p,Q=p,Z=c==="portrait",ee=c==="landscape",se=l.useCallback(x=>b(t)>=b(x),[t]),te=l.useCallback(x=>b(t)<=b(x),[t]),ae=l.useCallback((x,v)=>{const P=b(t);return P>=b(x)&&P<=b(v)},[t]),ne=l.useCallback(x=>n>=x,[n]),re=l.useCallback(x=>n<=x,[n]),ie=l.useCallback((x,v)=>n>=x&&n<=v,[n]),oe=l.useCallback(x=>i>=x,[i]),le=l.useCallback(x=>i<=x,[i]),ce=l.useCallback((x,v)=>i>=x&&i<=v,[i]);return{breakpoint:t,width:n,height:i,orientation:c,isXs:d,isSm:j,isMd:y,isLg:h,isXl:L,is2Xl:C,is3Xl:N,is4Xl:f,is5Xl:p,isMobile:X,isTablet:Y,isDesktop:V,isSmall:K,isLarge:q,isUltraWide:G,is4K:J,is5K:Q,isPortrait:Z,isLandscape:ee,isBreakpointUp:se,isBreakpointDown:te,isBreakpointBetween:ae,isWidthUp:ne,isWidthDown:re,isWidthBetween:ie,isHeightUp:oe,isHeightDown:le,isHeightBetween:ce,debug:!1}},T=l.createContext(void 0),F=()=>{const s=l.useContext(T);if(!s)throw new Error("useResponsiveLayoutContext must be used within a ResponsiveLayoutProvider");return s},$=l.createContext(void 0),R=({children:s})=>{const[a,r]=l.useState(!1);return e.jsx($.Provider,{value:{sidebarOpen:a,setSidebarOpen:r},children:s})},k=()=>{const s=l.useContext($);if(!s)throw new Error("useSidebar must be used within a SidebarProvider");return s},E=l.createContext({currentPage:"test",setCurrentPage:()=>{}}),w=()=>l.useContext(E),me=({children:s,defaultPage:a="test"})=>{const[r,o]=l.useState(a);return e.jsx(E.Provider,{value:{currentPage:r,setCurrentPage:o},children:s})},u=()=>{const s=F();return{...s.responsive,layout:{current:s.layout.current,config:s.layout.config,setLayout:s.layout.setLayout},layoutUtils:s.layoutUtils,isDefaultLayout:()=>s.layout.current==="default",isSidebarLayout:()=>s.layout.current==="sidebar",isDashboardLayout:()=>s.layout.current==="dashboard",isMinimalLayout:()=>s.layout.current==="minimal",grid:{auto:(a="md")=>`grid-cols-auto-${a}`,responsive:a=>{const r=[];return Object.entries(a).forEach(([o,n])=>{o==="base"?r.push(`grid-cols-${n}`):r.push(`${o}:grid-cols-${n}`)}),r.join(" ")},fixed:a=>`grid-cols-${a}`},spacing:{container:s.layoutUtils.getContainerClass(),section:"mb-6",card:"p-6",gap:"gap-4"}}},H=()=>{const s=u();return{current:s.layout.current,config:s.layout.config,setLayout:s.layout.setLayout,...s.layoutUtils,isDefaultLayout:s.isDefaultLayout(),isSidebarLayout:s.isSidebarLayout(),isDashboardLayout:s.isDashboardLayout(),isMinimalLayout:s.isMinimalLayout(),grid:s.grid,spacing:s.spacing}},g={default:{name:"Default",description:"Navbar arriba, body central, footer abajo",components:["Navigation","Footer"],spacing:"p-4 md:p-6 lg:p-8",responsive:{mobile:"p-4",tablet:"p-6",desktop:"p-8"}},sidebar:{name:"Sidebar",description:"Sidebar izquierda, contenido principal",components:["Sidebar"],spacing:"p-4 md:p-6",responsive:{mobile:"p-4",tablet:"p-6",desktop:"p-6"}},dashboard:{name:"Dashboard",description:"Header + Sidebar + Main + Footer",components:["Header","Sidebar","Footer"],spacing:"p-4 md:p-6 lg:p-8",responsive:{mobile:"p-4",tablet:"p-6",desktop:"p-8"}},minimal:{name:"Minimal",description:"Solo contenido, sin navegación",components:[],spacing:"p-4 md:p-6",responsive:{mobile:"p-4",tablet:"p-6",desktop:"p-6"}}},D="default",be=Object.keys(g),he=({children:s,defaultLayout:a,useResponsiveHook:r})=>{const o=B(),i=r?.()||o,[t,c]=l.useState(a),d=g[t]||g[D],y={responsive:i,layout:{current:t,config:d,setLayout:c},layoutUtils:{getContainerClass:()=>i.isMobile?d.responsive.mobile:i.isTablet?d.responsive.tablet:d.responsive.desktop,getMainClass:()=>{const h="min-h-screen bg-black";return t==="sidebar"||t==="dashboard"?`${h} flex`:h},hasSidebar:()=>t==="sidebar"||t==="dashboard",hasHeader:()=>t==="dashboard",hasFooter:()=>t==="default"||t==="dashboard",hasNavigation:()=>t==="default"}};return e.jsx(T.Provider,{value:y,children:s})},pe=({children:s,defaultLayout:a=D,useResponsiveHook:r})=>e.jsx(U,{children:e.jsx(he,{defaultLayout:a,useResponsiveHook:r,children:s})}),ge=({children:s,layout:a})=>{const{layout:r}=u(),o=a||r.current,i={default:S,sidebar:z,dashboard:W,minimal:_}[o]||S;return e.jsx(i,{children:s})},ye=()=>{const{isMobile:s}=u(),{currentPage:a,setCurrentPage:r}=w(),{sidebarOpen:o,setSidebarOpen:n}=k(),i=[{id:"test",label:"Suite de Test"},{id:"demo",label:"Demo"}];return e.jsxs("div",{className:"sticky top-0 z-50",children:[e.jsx("header",{className:"bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl relative",children:e.jsx("div",{className:"w-full",children:e.jsx("div",{className:"px-4 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[s&&e.jsx("button",{onClick:()=>n(!0),className:"p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse"}),e.jsx("h3",{className:"text-base font-black text-white tracking-tight",children:"Sistema Responsivo"})]}),e.jsx("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"})]}),e.jsx("div",{className:"flex items-center space-x-2",children:!s&&i.map(t=>e.jsx("button",{onClick:()=>r(t.id),className:`px-3 py-1.5 rounded-lg transition-all font-bold text-xs tracking-wide border ${a===t.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"}`,children:t.label},t.id))})]})})})}),s&&o&&e.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:()=>n(!1),children:e.jsx("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:e.jsxs("div",{className:"p-6 flex flex-col h-full pt-20",children:[e.jsxs("div",{className:"flex items-center space-x-3 mb-8",children:[e.jsx("div",{className:"w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center",children:e.jsx("span",{className:"text-white font-bold text-sm",children:"RS"})}),e.jsx("span",{className:"text-white font-bold text-lg",children:"Sistema Responsivo"})]}),e.jsx("nav",{className:"space-y-2",children:i.map(t=>e.jsx("button",{onClick:()=>{r(t.id),n(!1)},className:`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${a===t.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"}`,children:e.jsx("span",{className:"font-medium",children:t.label})},t.id))})]})})})]})},M=()=>{const{isMobile:s,isTablet:a,breakpoint:r}=u(),{currentPage:o,setCurrentPage:n}=w(),{sidebarOpen:i,setSidebarOpen:t}=k(),c=[{id:"test",label:"Suite de Test"},{id:"demo",label:"Demo"}];return e.jsxs(e.Fragment,{children:[s&&e.jsx("button",{onClick:()=>t(!0),className:"fixed top-4 left-4 z-50 p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors bg-black/50 border border-gray-700",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),e.jsx("aside",{className:`
2
- bg-gradient-to-b from-gray-900 to-black border-r border-cyan-500/20
3
- ${s?"hidden":"w-64 flex-shrink-0"}
4
- ${a?"w-56":"w-64"}
5
- `,children:e.jsxs("div",{className:"p-6 flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center space-x-3 mb-8",children:[e.jsx("div",{className:"w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center",children:e.jsx("span",{className:"text-white font-bold text-sm",children:"RS"})}),e.jsxs("div",{children:[e.jsx("span",{className:"text-white font-bold text-lg",children:"Sistema Responsivo"}),e.jsx("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 mt-1",children:r.toUpperCase()})]})]}),e.jsx("nav",{className:"space-y-2",children:c.map(d=>e.jsx("button",{onClick:()=>n(d.id),className:`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${o===d.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"}`,children:e.jsx("span",{className:"font-medium",children:d.label})},d.id))})]})}),s&&i&&e.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:()=>t(!1),children:e.jsx("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:e.jsxs("div",{className:"p-6 flex flex-col h-full pt-20",children:[e.jsxs("div",{className:"flex items-center space-x-3 mb-8",children:[e.jsx("div",{className:"w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center",children:e.jsx("span",{className:"text-white font-bold text-sm",children:"RS"})}),e.jsx("span",{className:"text-white font-bold text-lg",children:"Sistema Responsivo"})]}),e.jsx("nav",{className:"space-y-2",children:c.map(d=>e.jsx("button",{onClick:()=>{n(d.id),t(!1)},className:`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${o===d.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"}`,children:e.jsx("span",{className:"font-medium",children:d.label})},d.id))})]})})})]})},O=()=>{const{layout:s,breakpoint:a,width:r,height:o}=u();return e.jsx("footer",{className:"bg-gradient-to-r from-gray-900 to-black border-t border-cyan-500/20",children:e.jsxs("div",{className:`${s.config.spacing} py-6`,children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[e.jsx("div",{className:"w-5 h-5 bg-cyan-500 rounded flex items-center justify-center",children:e.jsx("span",{className:"text-white font-bold text-xs",children:"RS"})}),e.jsx("span",{className:"text-white font-semibold text-sm",children:"Responsive System"})]}),e.jsx("p",{className:"text-gray-400 text-xs leading-relaxed",children:"Sistema completo de auto-escalado para aplicaciones React + Tailwind CSS"})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-semibold text-sm mb-2",children:"Estado del Sistema"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsx("span",{className:"text-gray-400",children:"Breakpoint:"}),e.jsx("span",{className:"text-cyan-400 font-medium",children:a.toUpperCase()})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsx("span",{className:"text-gray-400",children:"Layout:"}),e.jsx("span",{className:"text-cyan-400 font-medium",children:s.config.name})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsx("span",{className:"text-gray-400",children:"Resolución:"}),e.jsxs("span",{className:"text-cyan-400 font-medium",children:[r," × ",o]})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-semibold text-sm mb-2",children:"Desarrollador"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-white font-medium text-xs",children:"Felipe Caroca"}),e.jsx("p",{className:"text-gray-400 text-xs",children:"Frontend Developer"})]})]})]}),e.jsx("div",{className:"border-t border-gray-800 mt-4 pt-4 flex flex-col items-center text-center",children:e.jsx("p",{className:"text-gray-500 text-xs",children:"© 2025 Responsive System. Todos los derechos reservados."})})]})})},I=()=>{const{isMobile:s,breakpoint:a}=u(),{currentPage:r,setCurrentPage:o}=w(),[n,i]=l.useState(!1),t=[{id:"demo",name:"Demo"},{id:"test",name:"Suite de Test"}];return e.jsx("div",{className:"sticky top-0 z-50",children:e.jsxs("nav",{className:"bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl relative",children:[e.jsx("div",{className:"w-full",children:e.jsx("div",{className:"px-4 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse"}),e.jsx("h3",{className:"text-base font-black text-white tracking-tight",children:"Sistema Responsivo"})]}),e.jsx("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:a.toUpperCase()})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[!s&&t.map(c=>e.jsx("button",{onClick:()=>o(c.id),className:`px-3 py-1.5 rounded-lg transition-all font-bold text-xs tracking-wide border ${r===c.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"}`,children:c.name},c.id)),s&&e.jsx("button",{onClick:()=>i(!n),className:"p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]})})}),s&&n&&e.jsx("div",{className:"absolute top-full left-0 right-0 bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl z-50",children:e.jsx("div",{className:"p-4",children:e.jsx("nav",{className:"space-y-2",children:t.map(c=>e.jsx("button",{onClick:()=>{o(c.id),i(!1)},className:`w-full text-left px-4 py-3 rounded-lg transition-all font-bold text-sm tracking-wide border ${r===c.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"}`,children:c.name},c.id))})})})]})})},S=({children:s})=>{const{layoutUtils:a}=u();return e.jsxs("div",{className:"min-h-screen bg-black flex flex-col",children:[e.jsx(I,{}),e.jsx("main",{className:"flex-1",children:e.jsx("div",{className:a.getContainerClass(),children:s})}),e.jsx(O,{})]})},fe=({children:s})=>{const{layoutUtils:a}=u();return e.jsxs("div",{className:"min-h-screen bg-black flex",children:[e.jsx(M,{}),e.jsx("main",{className:"flex-1 overflow-auto",children:e.jsx("div",{className:a.getContainerClass(),children:s})})]})},z=({children:s})=>e.jsx(R,{children:e.jsx(fe,{children:s})}),ve=({children:s})=>{const{layoutUtils:a}=u(),{setSidebarOpen:r}=k();return e.jsxs("div",{className:"min-h-screen bg-black flex flex-col",children:[e.jsx("div",{className:"sticky top-0 z-50",children:e.jsx("nav",{className:"bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl relative",children:e.jsx("div",{className:"w-full",children:e.jsx("div",{className:"px-4 py-4",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("button",{onClick:()=>r(!0),className:"p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse"}),e.jsx("h3",{className:"text-base font-black text-white tracking-tight",children:"Sistema Responsivo"})]}),e.jsx("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"})]})})})})})}),e.jsxs("div",{className:"flex flex-1",children:[e.jsx(M,{}),e.jsx("main",{className:"flex-1 overflow-auto",children:e.jsx("div",{className:a.getContainerClass(),children:s})})]}),e.jsx(O,{})]})},W=({children:s})=>e.jsx(R,{children:e.jsx(ve,{children:s})}),_=({children:s})=>{const{layoutUtils:a}=u();return e.jsx("div",{className:"min-h-screen bg-black",children:e.jsx("main",{className:a.getContainerClass(),children:s})})},je=({compact:s=!1})=>{const{current:a,setLayout:r,config:o}=H();return s?e.jsxs("div",{className:"bg-black/50 rounded-lg p-3 border border-gray-700",children:[e.jsx("div",{className:"text-xs text-gray-500 mb-2",children:"Layout:"}),e.jsx("select",{value:a,onChange:n=>r(n.target.value),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",children:Object.entries(g).map(([n,i])=>e.jsx("option",{value:n,children:i.name},n))})]}):e.jsxs("div",{className:"bg-black/50 backdrop-blur-sm rounded-lg p-4 border border-cyan-500/30",children:[e.jsx("h3",{className:"text-white font-semibold mb-3",children:"Cambiar Layout"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:Object.entries(g).map(([n,i])=>e.jsxs("button",{onClick:()=>r(n),className:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),P=({children:s,debug:a=!1})=>e.jsx(e.Fragment,{children:s}),d={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536,"3xl":1920,"4xl":2560,"5xl":3840},R=s=>s>=d["5xl"]?"5xl":s>=d["4xl"]?"4xl":s>=d["3xl"]?"3xl":s>=d["2xl"]?"2xl":s>=d.xl?"xl":s>=d.lg?"lg":s>=d.md?"md":s>=d.sm?"sm":"xs",x=s=>["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl"].indexOf(s),de=s=>d[s];function ue(s,a){let o=null;return(...l)=>{o&&clearTimeout(o),o=setTimeout(()=>s(...l),a)}}function xe(s,a){return s>=a?"landscape":"portrait"}const T=()=>{const[s,a]=i.useState({width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768}),o=i.useCallback(()=>{a({width:window.innerWidth,height:window.innerHeight})},[]),l=i.useMemo(()=>ue(o,100),[o]);i.useEffect(()=>{if(!(typeof window>"u"))return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[l]);const{width:n,height:r}=s,t=i.useMemo(()=>R(n),[n]),g=i.useMemo(()=>xe(n,r),[n,r]),u=t==="xs",j=t==="sm",y=t==="md",b=t==="lg",L=t==="xl",w=t==="2xl",N=t==="3xl",f=t==="4xl",m=t==="5xl",Y=u||j,X=y,V=b||L||w||N||f||m,K=u||j||y,q=b||L||w||N||f||m,G=N||f||m,J=f||m,Q=m,Z=g==="portrait",ee=g==="landscape",se=i.useCallback(c=>x(t)>=x(c),[t]),te=i.useCallback(c=>x(t)<=x(c),[t]),ne=i.useCallback((c,v)=>{const A=x(t);return A>=x(c)&&A<=x(v)},[t]),ae=i.useCallback(c=>n>=c,[n]),re=i.useCallback(c=>n<=c,[n]),oe=i.useCallback((c,v)=>n>=c&&n<=v,[n]),ie=i.useCallback(c=>r>=c,[r]),le=i.useCallback(c=>r<=c,[r]),ce=i.useCallback((c,v)=>r>=c&&r<=v,[r]);return{breakpoint:t,width:n,height:r,orientation:g,isXs:u,isSm:j,isMd:y,isLg:b,isXl:L,is2Xl:w,is3Xl:N,is4Xl:f,is5Xl:m,isMobile:Y,isTablet:X,isDesktop:V,isSmall:K,isLarge:q,isUltraWide:G,is4K:J,is5K:Q,isPortrait:Z,isLandscape:ee,isBreakpointUp:se,isBreakpointDown:te,isBreakpointBetween:ne,isWidthUp:ae,isWidthDown:re,isWidthBetween:oe,isHeightUp:ie,isHeightDown:le,isHeightBetween:ce,debug:!1}},U=i.createContext(void 0),B=()=>{const s=i.useContext(U);if(!s)throw new Error("useResponsiveLayoutContext must be used within a ResponsiveLayoutProvider");return s},F=i.createContext(void 0),C=({children:s})=>{const[a,o]=i.useState(!1);return e.jsx(F.Provider,{value:{sidebarOpen:a,setSidebarOpen:o},children:s})},S=()=>{const s=i.useContext(F);if(!s)throw new Error("useSidebar must be used within a SidebarProvider");return s},E=i.createContext({currentPage:"test",setCurrentPage:()=>{}}),I=()=>i.useContext(E),be=({children:s,defaultPage:a="test"})=>{const[o,l]=i.useState(a);return e.jsx(E.Provider,{value:{currentPage:o,setCurrentPage:l},children:s})},p=()=>{const s=B();return{...s.responsive,layout:{current:s.layout.current,config:s.layout.config,setLayout:s.layout.setLayout},layoutUtils:s.layoutUtils,isDefaultLayout:()=>s.layout.current==="default",isSidebarLayout:()=>s.layout.current==="sidebar",isDashboardLayout:()=>s.layout.current==="dashboard",isMinimalLayout:()=>s.layout.current==="minimal",grid:{auto:(a="md")=>`grid-cols-auto-${a}`,responsive:a=>{const o=[];return Object.entries(a).forEach(([l,n])=>{l==="base"?o.push(`grid-cols-${n}`):o.push(`${l}:grid-cols-${n}`)}),o.join(" ")},fixed:a=>`grid-cols-${a}`},spacing:{container:s.layoutUtils.getContainerClass(),section:"mb-6",card:"p-6",gap:"gap-4"}}},H=()=>{const s=p();return{current:s.layout.current,config:s.layout.config,setLayout:s.layout.setLayout,...s.layoutUtils,isDefaultLayout:s.isDefaultLayout(),isSidebarLayout:s.isSidebarLayout(),isDashboardLayout:s.isDashboardLayout(),isMinimalLayout:s.isMinimalLayout(),grid:s.grid,spacing:s.spacing}},h={default:{name:"Default",description:"Navbar arriba, body central, footer abajo",components:["Navigation","Footer"],spacing:"p-4 md:p-6 lg:p-8",responsive:{mobile:"p-4",tablet:"p-6",desktop:"p-8"}},sidebar:{name:"Sidebar",description:"Sidebar izquierda, contenido principal",components:["Sidebar"],spacing:"p-4 md:p-6",responsive:{mobile:"p-4",tablet:"p-6",desktop:"p-6"}},dashboard:{name:"Dashboard",description:"Header + Sidebar + Main + Footer",components:["Header","Sidebar","Footer"],spacing:"p-4 md:p-6 lg:p-8",responsive:{mobile:"p-4",tablet:"p-6",desktop:"p-8"}},minimal:{name:"Minimal",description:"Solo contenido, sin navegación",components:[],spacing:"p-4 md:p-6",responsive:{mobile:"p-4",tablet:"p-6",desktop:"p-6"}}},M="default",me=Object.keys(h),he=({children:s,defaultLayout:a,useResponsiveHook:o})=>{const l=T(),r=o?.()||l,[t,g]=i.useState(a),u=h[t]||h[M],y={responsive:r,layout:{current:t,config:u,setLayout:g},layoutUtils:{getContainerClass:()=>r.isMobile?u.responsive.mobile:r.isTablet?u.responsive.tablet:u.responsive.desktop,getMainClass:()=>{const b="min-h-screen bg-black";return t==="sidebar"||t==="dashboard"?`${b} flex`:b},hasSidebar:()=>t==="sidebar"||t==="dashboard",hasHeader:()=>t==="dashboard",hasFooter:()=>t==="default"||t==="dashboard",hasNavigation:()=>t==="default"}};return e.jsx(U.Provider,{value:y,children:s})},pe=({children:s,defaultLayout:a=M,useResponsiveHook:o})=>e.jsx(P,{children:e.jsx(he,{defaultLayout:a,useResponsiveHook:o,children:s})}),ge=({children:s,layout:a})=>{const{layout:o}=p(),l=a||o.current,r={default:k,sidebar:W,dashboard:_,minimal:z}[l]||k;return e.jsx(r,{children:s})},ye=()=>{const{isMobile:s}=p(),{currentPage:a,setCurrentPage:o}=I(),{sidebarOpen:l,setSidebarOpen:n}=S(),r=[{id:"test",label:"Suite de Test"},{id:"demo",label:"Demo"}];return e.jsxs("div",{className:"sticky top-0 z-50",children:[e.jsx("header",{className:"bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl relative",children:e.jsx("div",{className:"w-full",children:e.jsx("div",{className:"px-4 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[s&&e.jsx("button",{onClick:()=>n(!0),className:"p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse"}),e.jsx("h3",{className:"text-base font-black text-white tracking-tight",children:"Sistema Responsivo"})]}),e.jsx("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"})]}),e.jsx("div",{className:"flex items-center space-x-2",children:!s&&r.map(t=>e.jsx("button",{onClick:()=>o(t.id),className:`px-3 py-1.5 rounded-lg transition-all font-bold text-xs tracking-wide border ${a===t.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"}`,children:t.label},t.id))})]})})})}),s&&l&&e.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:()=>n(!1),children:e.jsx("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:e.jsxs("div",{className:"p-6 flex flex-col h-full pt-20",children:[e.jsxs("div",{className:"flex items-center space-x-3 mb-8",children:[e.jsx("div",{className:"w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center",children:e.jsx("span",{className:"text-white font-bold text-sm",children:"RS"})}),e.jsx("span",{className:"text-white font-bold text-lg",children:"Sistema Responsivo"})]}),e.jsx("nav",{className:"space-y-2",children:r.map(t=>e.jsx("button",{onClick:()=>{o(t.id),n(!1)},className:`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${a===t.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"}`,children:e.jsx("span",{className:"font-medium",children:t.label})},t.id))})]})})})]})},D=()=>{const{isMobile:s,isTablet:a}=p(),{sidebarOpen:o,setSidebarOpen:l}=S(),n=[{id:"home",label:"Inicio"},{id:"about",label:"Acerca"},{id:"contact",label:"Contacto"}];return e.jsxs(e.Fragment,{children:[s&&e.jsx("button",{onClick:()=>l(!0),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",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),e.jsx("aside",{className:`bg-gray-900 border-r border-gray-800 ${s?"hidden":"w-64 flex-shrink-0"} ${a?"w-56":"w-64"}`,children:e.jsxs("div",{className:"p-6 flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center space-x-3 mb-8",children:[e.jsx("div",{className:"w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center",children:e.jsx("span",{className:"text-white font-bold text-sm",children:"LO"})}),e.jsx("span",{className:"text-white font-bold text-lg",children:"Tu Aplicación"})]}),e.jsx("nav",{className:"space-y-2",children:n.map(r=>e.jsx("button",{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",children:e.jsx("span",{className:"font-medium",children:r.label})},r.id))})]})}),s&&o&&e.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:()=>l(!1),children:e.jsx("div",{className:"fixed top-0 left-0 w-64 h-full bg-gray-900 border-r border-gray-800",children:e.jsxs("div",{className:"p-6 flex flex-col h-full pt-20",children:[e.jsxs("div",{className:"flex items-center space-x-3 mb-8",children:[e.jsx("div",{className:"w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center",children:e.jsx("span",{className:"text-white font-bold text-sm",children:"LO"})}),e.jsx("span",{className:"text-white font-bold text-lg",children:"Tu Aplicación"})]}),e.jsx("nav",{className:"space-y-2",children:n.map(r=>e.jsx("button",{onClick:()=>l(!1),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",children:e.jsx("span",{className:"font-medium",children:r.label})},r.id))})]})})})]})},O=()=>e.jsx("footer",{className:"bg-gray-900 border-t border-gray-800",children:e.jsx("div",{className:"px-4 py-6",children:e.jsx("div",{className:"max-w-7xl mx-auto text-center",children:e.jsxs("p",{className:"text-gray-400 text-sm",children:["© ",new Date().getFullYear()," Tu Aplicación. Todos los derechos reservados."]})})})}),$=()=>{const{isMobile:s}=p();return e.jsx("nav",{className:"sticky top-0 z-50 bg-gray-900 border-b border-gray-800",children:e.jsx("div",{className:"px-4 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center",children:e.jsx("span",{className:"text-white font-bold text-sm",children:"LO"})}),e.jsx("h1",{className:"text-white font-semibold text-lg",children:"Tu Aplicación"})]}),s&&e.jsx("button",{className:"p-2 text-gray-400 hover:text-white",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})})})},k=({children:s})=>e.jsxs("div",{className:"min-h-screen bg-gray-50 flex flex-col",children:[e.jsx($,{}),e.jsx("main",{className:"flex-1",children:s}),e.jsx(O,{})]}),fe=({children:s})=>e.jsxs("div",{className:"min-h-screen bg-gray-50 flex",children:[e.jsx(D,{}),e.jsx("main",{className:"flex-1 overflow-auto",children:s})]}),W=({children:s})=>e.jsx(C,{children:e.jsx(fe,{children:s})}),ve=({children:s})=>e.jsx("div",{className:"min-h-screen bg-gray-50 flex flex-col",children:e.jsxs("div",{className:"flex flex-1",children:[e.jsx(D,{}),e.jsxs("main",{className:"flex-1 overflow-auto flex flex-col",children:[e.jsx("div",{className:"flex-1",children:s}),e.jsx(O,{})]})]})}),_=({children:s})=>e.jsx(C,{children:e.jsx(ve,{children:s})}),z=({children:s})=>e.jsx("div",{className:"min-h-screen bg-gray-50",children:e.jsx("main",{children:s})}),je=({compact:s=!1})=>{const{current:a,setLayout:o,config:l}=H();return s?e.jsxs("div",{className:"bg-black/50 rounded-lg p-3 border border-gray-700",children:[e.jsx("div",{className:"text-xs text-gray-500 mb-2",children:"Layout:"}),e.jsx("select",{value:a,onChange:n=>o(n.target.value),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",children:Object.entries(h).map(([n,r])=>e.jsx("option",{value:n,children:r.name},n))})]}):e.jsxs("div",{className:"bg-black/50 backdrop-blur-sm rounded-lg p-4 border border-cyan-500/30",children:[e.jsx("h3",{className:"text-white font-semibold mb-3",children:"Cambiar Layout"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:Object.entries(h).map(([n,r])=>e.jsxs("button",{onClick:()=>o(n),className:`
6
2
  p-4 rounded-lg border transition-all text-left
7
3
  ${a===n?"border-cyan-500 bg-cyan-500/10 text-cyan-400":"border-gray-700 bg-black/30 text-gray-300 hover:border-gray-600"}
8
- `,children:[e.jsx("div",{className:"font-semibold mb-1",children:i.name}),e.jsx("div",{className:"text-xs opacity-75",children:i.description})]},n))}),e.jsxs("div",{className:"mt-4 p-3 bg-gray-900/50 rounded-lg",children:[e.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Layout Actual:"}),e.jsx("div",{className:"text-sm text-cyan-400 font-medium",children:o.name}),e.jsx("div",{className:"text-xs text-gray-400",children:o.description})]})]})};exports.AVAILABLE_LAYOUTS=be;exports.DEFAULT_BREAKPOINTS=m;exports.DEFAULT_LAYOUT=D;exports.DashboardLayout=W;exports.DefaultLayout=S;exports.Footer=O;exports.Header=ye;exports.LAYOUT_CONFIG=g;exports.LayoutSwitcher=je;exports.MainLayout=ge;exports.MinimalLayout=_;exports.Navigation=I;exports.NavigationProvider=me;exports.ResponsiveLayoutProvider=pe;exports.ResponsiveProvider=U;exports.Sidebar=M;exports.SidebarLayout=z;exports.SidebarProvider=R;exports.getBreakpointIndex=b;exports.getBreakpointValue=de;exports.getCurrentBreakpoint=A;exports.useLayout=H;exports.useNavigation=w;exports.useResponsive=B;exports.useResponsiveLayout=u;exports.useResponsiveLayoutContext=F;exports.useSidebar=k;
4
+ `,children:[e.jsx("div",{className:"font-semibold mb-1",children:r.name}),e.jsx("div",{className:"text-xs opacity-75",children:r.description})]},n))}),e.jsxs("div",{className:"mt-4 p-3 bg-gray-900/50 rounded-lg",children:[e.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Layout Actual:"}),e.jsx("div",{className:"text-sm text-cyan-400 font-medium",children:l.name}),e.jsx("div",{className:"text-xs text-gray-400",children:l.description})]})]})};exports.AVAILABLE_LAYOUTS=me;exports.DEFAULT_BREAKPOINTS=d;exports.DEFAULT_LAYOUT=M;exports.DashboardLayout=_;exports.DefaultLayout=k;exports.Footer=O;exports.Header=ye;exports.LAYOUT_CONFIG=h;exports.LayoutSwitcher=je;exports.MainLayout=ge;exports.MinimalLayout=z;exports.Navigation=$;exports.NavigationProvider=be;exports.ResponsiveLayoutProvider=pe;exports.ResponsiveProvider=P;exports.Sidebar=D;exports.SidebarLayout=W;exports.SidebarProvider=C;exports.getBreakpointIndex=x;exports.getBreakpointValue=de;exports.getCurrentBreakpoint=R;exports.useLayout=H;exports.useNavigation=I;exports.useResponsive=T;exports.useResponsiveLayout=p;exports.useResponsiveLayoutContext=B;exports.useSidebar=S;
9
5
  //# sourceMappingURL=responsive-system.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-system.cjs","sources":["../src/providers/ResponsiveProvider.tsx","../src/constants/breakpoints.ts","../src/hooks/useResponsive.ts","../src/context/ResponsiveLayoutContext.tsx","../src/context/SidebarContext.tsx","../src/context/NavigationContext.tsx","../src/hooks/useResponsiveLayout.ts","../src/hooks/useLayout.ts","../src/config/layout.ts","../src/providers/ResponsiveLayoutProvider.tsx","../src/layouts/MainLayout.tsx","../src/components/layout/Header.tsx","../src/components/layout/Sidebar.tsx","../src/components/layout/Footer.tsx","../src/components/layout/Navigation.tsx","../src/layouts/DefaultLayout.tsx","../src/layouts/SidebarLayout.tsx","../src/layouts/DashboardLayout.tsx","../src/layouts/MinimalLayout.tsx","../src/components/LayoutSwitcher.tsx"],"sourcesContent":["import React from 'react'\r\nimport type { ResponsiveProviderProps } from '../types/responsive'\r\n\r\n/**\r\n * ResponsiveProvider - Provider simplificado para el sistema responsive\r\n * \r\n * Nota: Con el sistema de auto-scaling mediante plugin de Tailwind,\r\n * este Provider es OPCIONAL y solo se necesita si quieres acceder\r\n * al hook useResponsive() en tus componentes.\r\n */\r\nexport const ResponsiveProvider: React.FC<ResponsiveProviderProps> = ({\r\n children,\r\n debug: _debug = false\r\n}) => {\r\n // El Provider ahora solo envuelve children sin context\r\n // El auto-scaling funciona mediante el plugin de Tailwind\r\n return <>{children}</>\r\n}\r\n","import type { Breakpoint } from '../types/responsive'\r\n\r\n/**\r\n * Default breakpoint values\r\n * Deben coincidir con tailwind.config.js\r\n */\r\nexport const DEFAULT_BREAKPOINTS: Record<Breakpoint, number> = {\r\n xs: 475,\r\n sm: 640,\r\n md: 768,\r\n lg: 1024,\r\n xl: 1280,\r\n '2xl': 1536,\r\n '3xl': 1920,\r\n '4xl': 2560,\r\n '5xl': 3840\r\n}\r\n\r\n/**\r\n * Get current breakpoint based on window width\r\n */\r\nexport const getCurrentBreakpoint = (width: number): Breakpoint => {\r\n if (width >= DEFAULT_BREAKPOINTS['5xl']) return '5xl'\r\n if (width >= DEFAULT_BREAKPOINTS['4xl']) return '4xl'\r\n if (width >= DEFAULT_BREAKPOINTS['3xl']) return '3xl'\r\n if (width >= DEFAULT_BREAKPOINTS['2xl']) return '2xl'\r\n if (width >= DEFAULT_BREAKPOINTS.xl) return 'xl'\r\n if (width >= DEFAULT_BREAKPOINTS.lg) return 'lg'\r\n if (width >= DEFAULT_BREAKPOINTS.md) return 'md'\r\n if (width >= DEFAULT_BREAKPOINTS.sm) return 'sm'\r\n return 'xs'\r\n}\r\n\r\n/**\r\n * Get breakpoint index (for comparisons)\r\n */\r\nexport const getBreakpointIndex = (breakpoint: Breakpoint): number => {\r\n const breakpoints: Breakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl']\r\n return breakpoints.indexOf(breakpoint)\r\n}\r\n\r\n/**\r\n * Get breakpoint value in pixels\r\n */\r\nexport const getBreakpointValue = (breakpoint: Breakpoint): number => {\r\n return DEFAULT_BREAKPOINTS[breakpoint]\r\n}\r\n\r\n","import { useState, useEffect, useCallback, useMemo } from 'react'\r\nimport type { \r\n ResponsiveState, \r\n Breakpoint\r\n} from '../types/responsive'\r\nimport { \r\n getCurrentBreakpoint,\r\n getBreakpointIndex\r\n} from '../constants/breakpoints'\r\n\r\n/**\r\n * Debounce utility\r\n */\r\nfunction debounce<T extends (...args: unknown[]) => void>(\r\n func: T,\r\n wait: number\r\n): (...args: Parameters<T>) => void {\r\n let timeout: ReturnType<typeof setTimeout> | null = null\r\n return (...args: Parameters<T>) => {\r\n if (timeout) clearTimeout(timeout)\r\n timeout = setTimeout(() => func(...args), wait)\r\n }\r\n}\r\n\r\n/**\r\n * Get orientation based on dimensions\r\n */\r\nfunction getOrientation(width: number, height: number): 'landscape' | 'portrait' {\r\n return width >= height ? 'landscape' : 'portrait'\r\n}\r\n\r\n/**\r\n * Hook principal useResponsive\r\n * Provee información sobre el breakpoint actual y helpers para responsive\r\n */\r\nexport const useResponsive = (): ResponsiveState => {\r\n const [dimensions, setDimensions] = useState({\r\n width: typeof window !== 'undefined' ? window.innerWidth : 1024,\r\n height: typeof window !== 'undefined' ? window.innerHeight : 768\r\n })\r\n\r\n // Función para actualizar dimensiones\r\n const updateDimensions = useCallback(() => {\r\n setDimensions({\r\n width: window.innerWidth,\r\n height: window.innerHeight\r\n })\r\n }, [])\r\n\r\n // Debounced update para optimizar performance\r\n const debouncedUpdateDimensions = useMemo(\r\n () => debounce(updateDimensions, 100),\r\n [updateDimensions]\r\n )\r\n\r\n // Effect para escuchar cambios de tamaño\r\n useEffect(() => {\r\n if (typeof window === 'undefined') return\r\n\r\n window.addEventListener('resize', debouncedUpdateDimensions)\r\n \r\n return () => {\r\n window.removeEventListener('resize', debouncedUpdateDimensions)\r\n }\r\n }, [debouncedUpdateDimensions])\r\n\r\n const { width, height } = dimensions\r\n\r\n // Calcular breakpoint actual\r\n const breakpoint = useMemo(() => getCurrentBreakpoint(width), [width])\r\n \r\n // Calcular orientación\r\n const orientation = useMemo(() => getOrientation(width, height), [width, height])\r\n\r\n // Helpers booleanos por breakpoint específico\r\n const isXs = breakpoint === 'xs'\r\n const isSm = breakpoint === 'sm'\r\n const isMd = breakpoint === 'md'\r\n const isLg = breakpoint === 'lg'\r\n const isXl = breakpoint === 'xl'\r\n const is2Xl = breakpoint === '2xl'\r\n const is3Xl = breakpoint === '3xl'\r\n const is4Xl = breakpoint === '4xl'\r\n const is5Xl = breakpoint === '5xl'\r\n\r\n // Helpers booleanos agrupados\r\n const isMobile = isXs || isSm\r\n const isTablet = isMd\r\n const isDesktop = isLg || isXl || is2Xl || is3Xl || is4Xl || is5Xl\r\n const isSmall = isXs || isSm || isMd\r\n const isLarge = isLg || isXl || is2Xl || is3Xl || is4Xl || is5Xl\r\n const isUltraWide = is3Xl || is4Xl || is5Xl\r\n const is4K = is4Xl || is5Xl\r\n const is5K = is5Xl\r\n\r\n // Helpers de orientación\r\n const isPortrait = orientation === 'portrait'\r\n const isLandscape = orientation === 'landscape'\r\n\r\n // Funciones de comparación de breakpoints\r\n const isBreakpointUp = useCallback((bp: Breakpoint): boolean => {\r\n return getBreakpointIndex(breakpoint) >= getBreakpointIndex(bp)\r\n }, [breakpoint])\r\n\r\n const isBreakpointDown = useCallback((bp: Breakpoint): boolean => {\r\n return getBreakpointIndex(breakpoint) <= getBreakpointIndex(bp)\r\n }, [breakpoint])\r\n\r\n const isBreakpointBetween = useCallback((min: Breakpoint, max: Breakpoint): boolean => {\r\n const current = getBreakpointIndex(breakpoint)\r\n return current >= getBreakpointIndex(min) && current <= getBreakpointIndex(max)\r\n }, [breakpoint])\r\n\r\n // Funciones de comparación de ancho\r\n const isWidthUp = useCallback((minWidth: number): boolean => {\r\n return width >= minWidth\r\n }, [width])\r\n\r\n const isWidthDown = useCallback((maxWidth: number): boolean => {\r\n return width <= maxWidth\r\n }, [width])\r\n\r\n const isWidthBetween = useCallback((minWidth: number, maxWidth: number): boolean => {\r\n return width >= minWidth && width <= maxWidth\r\n }, [width])\r\n\r\n // Funciones de comparación de altura\r\n const isHeightUp = useCallback((minHeight: number): boolean => {\r\n return height >= minHeight\r\n }, [height])\r\n\r\n const isHeightDown = useCallback((maxHeight: number): boolean => {\r\n return height <= maxHeight\r\n }, [height])\r\n\r\n const isHeightBetween = useCallback((minHeight: number, maxHeight: number): boolean => {\r\n return height >= minHeight && height <= maxHeight\r\n }, [height])\r\n\r\n // Debug mode\r\n const debug = false\r\n\r\n return {\r\n // Estado básico\r\n breakpoint,\r\n width,\r\n height,\r\n orientation,\r\n \r\n // Helpers booleanos específicos\r\n isXs,\r\n isSm,\r\n isMd,\r\n isLg,\r\n isXl,\r\n is2Xl,\r\n is3Xl,\r\n is4Xl,\r\n is5Xl,\r\n \r\n // Helpers booleanos agrupados\r\n isMobile,\r\n isTablet,\r\n isDesktop,\r\n isSmall,\r\n isLarge,\r\n isUltraWide,\r\n is4K,\r\n is5K,\r\n \r\n // Helpers de orientación\r\n isPortrait,\r\n isLandscape,\r\n \r\n // Funciones de comparación\r\n isBreakpointUp,\r\n isBreakpointDown,\r\n isBreakpointBetween,\r\n isWidthUp,\r\n isWidthDown,\r\n isWidthBetween,\r\n isHeightUp,\r\n isHeightDown,\r\n isHeightBetween,\r\n \r\n // Debug\r\n debug\r\n }\r\n}\r\n","import { createContext, useContext } from 'react'\r\nimport type { ResponsiveState } from '../types/responsive'\r\nimport type { LayoutConfig } from '../config/layout'\r\n\r\nexport interface ResponsiveLayoutState {\r\n // Estado del sistema responsivo\r\n responsive: ResponsiveState\r\n \r\n // Estado del layout\r\n layout: {\r\n current: string\r\n config: LayoutConfig\r\n setLayout: (layout: string) => void\r\n }\r\n \r\n // Utilidades de layout\r\n layoutUtils: {\r\n getContainerClass: () => string\r\n getMainClass: () => string\r\n hasSidebar: () => boolean\r\n hasHeader: () => boolean\r\n hasFooter: () => boolean\r\n hasNavigation: () => boolean\r\n }\r\n}\r\n\r\nconst ResponsiveLayoutContext = createContext<ResponsiveLayoutState | undefined>(undefined)\r\n\r\nexport const useResponsiveLayoutContext = () => {\r\n const context = useContext(ResponsiveLayoutContext)\r\n if (!context) {\r\n throw new Error('useResponsiveLayoutContext must be used within a ResponsiveLayoutProvider')\r\n }\r\n return context\r\n}\r\n\r\nexport { ResponsiveLayoutContext }\r\n","import React, { createContext, useContext, useState } from 'react'\r\n\r\ninterface SidebarContextType {\r\n sidebarOpen: boolean\r\n setSidebarOpen: (open: boolean) => void\r\n}\r\n\r\nconst SidebarContext = createContext<SidebarContextType | undefined>(undefined)\r\n\r\nexport const SidebarProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {\r\n const [sidebarOpen, setSidebarOpen] = useState(false)\r\n\r\n return (\r\n <SidebarContext.Provider value={{ sidebarOpen, setSidebarOpen }}>\r\n {children}\r\n </SidebarContext.Provider>\r\n )\r\n}\r\n\r\nexport const useSidebar = () => {\r\n const context = useContext(SidebarContext)\r\n if (!context) {\r\n throw new Error('useSidebar must be used within a SidebarProvider')\r\n }\r\n return context\r\n}\r\n","import React, { createContext, useContext, useState } from 'react'\r\n\r\ninterface NavigationContextType {\r\n currentPage: 'demo' | 'test'\r\n setCurrentPage: (page: 'demo' | 'test') => void\r\n}\r\n\r\nconst NavigationContext = createContext<NavigationContextType>({\r\n currentPage: 'test',\r\n setCurrentPage: () => {}\r\n})\r\n\r\nexport const useNavigation = () => useContext(NavigationContext)\r\n\r\ninterface NavigationProviderProps {\r\n children: React.ReactNode\r\n defaultPage?: 'demo' | 'test'\r\n}\r\n\r\nexport const NavigationProvider: React.FC<NavigationProviderProps> = ({ \r\n children, \r\n defaultPage = 'test' \r\n}) => {\r\n const [currentPage, setCurrentPage] = useState<'demo' | 'test'>(defaultPage)\r\n\r\n return (\r\n <NavigationContext.Provider value={{ currentPage, setCurrentPage }}>\r\n {children}\r\n </NavigationContext.Provider>\r\n )\r\n}\r\n\r\n","import { useResponsiveLayoutContext } from '../context'\r\n\r\nexport const useResponsiveLayout = () => {\r\n const context = useResponsiveLayoutContext()\r\n \r\n return {\r\n // Todo el sistema responsivo original\r\n ...context.responsive,\r\n \r\n // Sistema de layout\r\n layout: {\r\n current: context.layout.current,\r\n config: context.layout.config,\r\n setLayout: context.layout.setLayout,\r\n },\r\n \r\n // Utilidades de layout\r\n layoutUtils: context.layoutUtils,\r\n \r\n // Helpers específicos del layout\r\n isDefaultLayout: () => context.layout.current === 'default',\r\n isSidebarLayout: () => context.layout.current === 'sidebar',\r\n isDashboardLayout: () => context.layout.current === 'dashboard',\r\n isMinimalLayout: () => context.layout.current === 'minimal',\r\n \r\n // Grid helpers que usan el sistema auto-escalable\r\n grid: {\r\n auto: (minWidth = 'md') => `grid-cols-auto-${minWidth}`,\r\n responsive: (breakpoints: Record<string, number>) => {\r\n const classes: string[] = []\r\n Object.entries(breakpoints).forEach(([breakpoint, cols]) => {\r\n if (breakpoint === 'base') {\r\n classes.push(`grid-cols-${cols}`)\r\n } else {\r\n classes.push(`${breakpoint}:grid-cols-${cols}`)\r\n }\r\n })\r\n return classes.join(' ')\r\n },\r\n fixed: (cols: number) => `grid-cols-${cols}`,\r\n },\r\n \r\n // Spacing helpers que escalan automáticamente\r\n spacing: {\r\n container: context.layoutUtils.getContainerClass(),\r\n section: 'mb-6',\r\n card: 'p-6',\r\n gap: 'gap-4',\r\n },\r\n }\r\n}\r\n","import { useResponsiveLayout } from './index'\r\n\r\nexport const useLayout = () => {\r\n const responsiveLayout = useResponsiveLayout()\r\n \r\n return {\r\n // Layout actual\r\n current: responsiveLayout.layout.current,\r\n config: responsiveLayout.layout.config,\r\n setLayout: responsiveLayout.layout.setLayout,\r\n \r\n // Utilidades\r\n ...responsiveLayout.layoutUtils,\r\n \r\n // Helpers específicos\r\n isDefaultLayout: responsiveLayout.isDefaultLayout(),\r\n isSidebarLayout: responsiveLayout.isSidebarLayout(),\r\n isDashboardLayout: responsiveLayout.isDashboardLayout(),\r\n isMinimalLayout: responsiveLayout.isMinimalLayout(),\r\n \r\n // Grid helpers\r\n grid: responsiveLayout.grid,\r\n \r\n // Spacing helpers\r\n spacing: responsiveLayout.spacing,\r\n }\r\n}\r\n","export interface LayoutConfig {\r\n name: string\r\n description: string\r\n components: string[]\r\n spacing: string\r\n responsive: {\r\n mobile: string\r\n tablet: string\r\n desktop: string\r\n }\r\n}\r\n\r\nexport const LAYOUT_CONFIG: Record<string, LayoutConfig> = {\r\n default: {\r\n name: 'Default',\r\n description: 'Navbar arriba, body central, footer abajo',\r\n components: ['Navigation', 'Footer'],\r\n spacing: 'p-4 md:p-6 lg:p-8',\r\n responsive: {\r\n mobile: 'p-4',\r\n tablet: 'p-6',\r\n desktop: 'p-8'\r\n }\r\n },\r\n sidebar: {\r\n name: 'Sidebar',\r\n description: 'Sidebar izquierda, contenido principal',\r\n components: ['Sidebar'],\r\n spacing: 'p-4 md:p-6',\r\n responsive: {\r\n mobile: 'p-4',\r\n tablet: 'p-6',\r\n desktop: 'p-6'\r\n }\r\n },\r\n dashboard: {\r\n name: 'Dashboard',\r\n description: 'Header + Sidebar + Main + Footer',\r\n components: ['Header', 'Sidebar', 'Footer'],\r\n spacing: 'p-4 md:p-6 lg:p-8',\r\n responsive: {\r\n mobile: 'p-4',\r\n tablet: 'p-6',\r\n desktop: 'p-8'\r\n }\r\n },\r\n minimal: {\r\n name: 'Minimal',\r\n description: 'Solo contenido, sin navegación',\r\n components: [],\r\n spacing: 'p-4 md:p-6',\r\n responsive: {\r\n mobile: 'p-4',\r\n tablet: 'p-6',\r\n desktop: 'p-6'\r\n }\r\n }\r\n}\r\n\r\nexport const DEFAULT_LAYOUT = 'default'\r\nexport const AVAILABLE_LAYOUTS = Object.keys(LAYOUT_CONFIG)\r\n","import React, { useState } from 'react'\r\nimport { ResponsiveProvider } from './index'\r\nimport { useResponsive } from '../hooks'\r\nimport { ResponsiveLayoutContext } from '../context'\r\nimport { LAYOUT_CONFIG, DEFAULT_LAYOUT } from '../config/layout'\r\nimport type { ResponsiveState } from '../types/responsive'\r\n\r\ninterface ResponsiveLayoutProviderProps {\r\n children: React.ReactNode\r\n defaultLayout?: string\r\n /**\r\n * Hook responsivo personalizado del proyecto consumidor.\r\n * Si se proporciona, se usará en lugar del hook interno del paquete.\r\n * Debe retornar un objeto compatible con ResponsiveState.\r\n */\r\n useResponsiveHook?: () => ResponsiveState\r\n}\r\n\r\ninterface ResponsiveLayoutProviderInnerProps {\r\n children: React.ReactNode\r\n defaultLayout: string\r\n useResponsiveHook?: () => ResponsiveState\r\n}\r\n\r\nconst ResponsiveLayoutProviderInner: React.FC<ResponsiveLayoutProviderInnerProps> = ({ \r\n children, \r\n defaultLayout,\r\n useResponsiveHook\r\n}) => {\r\n // Usar hook personalizado si se proporciona, sino usar el hook interno\r\n const internalResponsive = useResponsive()\r\n const customResponsive = useResponsiveHook?.()\r\n const responsive = customResponsive || internalResponsive\r\n \r\n const [currentLayout, setCurrentLayout] = useState(defaultLayout)\r\n \r\n const layoutConfig = LAYOUT_CONFIG[currentLayout] || LAYOUT_CONFIG[DEFAULT_LAYOUT]\r\n \r\n const layoutUtils = {\r\n getContainerClass: () => {\r\n if (responsive.isMobile) return layoutConfig.responsive.mobile\r\n if (responsive.isTablet) return layoutConfig.responsive.tablet\r\n return layoutConfig.responsive.desktop\r\n },\r\n \r\n getMainClass: () => {\r\n const baseClass = 'min-h-screen bg-black'\r\n if (currentLayout === 'sidebar' || currentLayout === 'dashboard') {\r\n return `${baseClass} flex`\r\n }\r\n return baseClass\r\n },\r\n \r\n hasSidebar: () => currentLayout === 'sidebar' || currentLayout === 'dashboard',\r\n hasHeader: () => currentLayout === 'dashboard',\r\n hasFooter: () => currentLayout === 'default' || currentLayout === 'dashboard',\r\n hasNavigation: () => currentLayout === 'default',\r\n }\r\n \r\n const contextValue = {\r\n responsive,\r\n layout: {\r\n current: currentLayout,\r\n config: layoutConfig,\r\n setLayout: setCurrentLayout,\r\n },\r\n layoutUtils,\r\n }\r\n \r\n return (\r\n <ResponsiveLayoutContext.Provider value={contextValue}>\r\n {children}\r\n </ResponsiveLayoutContext.Provider>\r\n )\r\n}\r\n\r\nexport const ResponsiveLayoutProvider: React.FC<ResponsiveLayoutProviderProps> = ({ \r\n children, \r\n defaultLayout = DEFAULT_LAYOUT,\r\n useResponsiveHook\r\n}) => {\r\n return (\r\n <ResponsiveProvider>\r\n <ResponsiveLayoutProviderInner \r\n defaultLayout={defaultLayout}\r\n useResponsiveHook={useResponsiveHook}\r\n >\r\n {children}\r\n </ResponsiveLayoutProviderInner>\r\n </ResponsiveProvider>\r\n )\r\n}\r\n","import React from 'react'\r\nimport { useResponsiveLayout } from '../hooks'\r\nimport { \r\n DefaultLayout, \r\n SidebarLayout, \r\n DashboardLayout, \r\n MinimalLayout \r\n} from './index'\r\n\r\ninterface MainLayoutProps {\r\n children: React.ReactNode\r\n /**\r\n * Layout específico a usar. Si se proporciona, sobrescribe el layout del contexto.\r\n * Valores posibles: 'default', 'sidebar', 'dashboard', 'minimal'\r\n */\r\n layout?: 'default' | 'sidebar' | 'dashboard' | 'minimal'\r\n}\r\n\r\nconst MainLayout: React.FC<MainLayoutProps> = ({ children, layout: layoutProp }) => {\r\n const { layout } = useResponsiveLayout()\r\n \r\n // Usar el layout del prop si se proporciona, sino usar el del contexto\r\n const currentLayout = layoutProp || layout.current\r\n \r\n // Seleccionar el layout apropiado basado en el estado del contexto o prop\r\n const layouts = {\r\n default: DefaultLayout,\r\n sidebar: SidebarLayout,\r\n dashboard: DashboardLayout,\r\n minimal: MinimalLayout,\r\n }\r\n \r\n const LayoutComponent = layouts[currentLayout as keyof typeof layouts] || DefaultLayout\r\n \r\n return <LayoutComponent>{children}</LayoutComponent>\r\n}\r\n\r\nexport default MainLayout\r\n","import { useResponsiveLayout } from '../../hooks'\r\nimport { useNavigation, useSidebar } from '../../context'\r\n\r\nconst Header = () => {\r\n const { isMobile } = useResponsiveLayout()\r\n const { currentPage, setCurrentPage } = useNavigation()\r\n const { sidebarOpen, setSidebarOpen } = useSidebar()\r\n \r\n const menuItems = [\r\n { id: 'test', label: 'Suite de Test' },\r\n { id: 'demo', label: 'Demo' },\r\n ]\r\n \r\n return (\r\n <div className=\"sticky top-0 z-50\">\r\n <header className=\"bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl relative\">\r\n <div className=\"w-full\">\r\n <div className=\"px-4 py-4\">\r\n <div className=\"flex items-center justify-between\">\r\n <div className=\"flex items-center space-x-2\">\r\n {/* Hamburger button para móvil - A LA IZQUIERDA */}\r\n {isMobile && (\r\n <button\r\n onClick={() => setSidebarOpen(true)}\r\n className=\"p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors\"\r\n >\r\n <svg className=\"w-6 h-6\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 6h16M4 12h16M4 18h16\" />\r\n </svg>\r\n </button>\r\n )}\r\n \r\n <div className=\"flex items-center space-x-2\">\r\n <div className=\"w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse\"></div>\r\n <h3 className=\"text-base font-black text-white tracking-tight\">\r\n Sistema Responsivo\r\n </h3>\r\n </div>\r\n <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\">\r\n DASHBOARD\r\n </div>\r\n </div>\r\n \r\n <div className=\"flex items-center space-x-2\">\r\n {/* Botones visibles solo en desktop */}\r\n {!isMobile && menuItems.map((page) => (\r\n <button\r\n key={page.id}\r\n onClick={() => setCurrentPage(page.id as 'demo' | 'test')}\r\n className={`px-3 py-1.5 rounded-lg transition-all font-bold text-xs tracking-wide border ${\r\n currentPage === page.id \r\n ? 'bg-cyan-500/20 text-cyan-400 border-cyan-500/50' \r\n : 'bg-black/50 text-gray-400 hover:text-gray-300 border-gray-700 hover:border-gray-600'\r\n }`}\r\n >\r\n {page.label}\r\n </button>\r\n ))}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </header>\r\n\r\n {/* Sidebar móvil desplegable */}\r\n {isMobile && sidebarOpen && (\r\n <div className=\"fixed inset-0 z-40 bg-black/50\" onClick={() => setSidebarOpen(false)}>\r\n <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\">\r\n <div className=\"p-6 flex flex-col h-full pt-20\">\r\n {/* Logo */}\r\n <div className=\"flex items-center space-x-3 mb-8\">\r\n <div className=\"w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center\">\r\n <span className=\"text-white font-bold text-sm\">RS</span>\r\n </div>\r\n <span className=\"text-white font-bold text-lg\">Sistema Responsivo</span>\r\n </div>\r\n \r\n {/* Navigation */}\r\n <nav className=\"space-y-2\">\r\n {menuItems.map((item) => (\r\n <button\r\n key={item.id}\r\n onClick={() => {\r\n setCurrentPage(item.id as 'demo' | 'test')\r\n setSidebarOpen(false)\r\n }}\r\n className={`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${\r\n currentPage === item.id \r\n ? 'bg-cyan-500/20 text-cyan-400 border border-cyan-500/50' \r\n : 'text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10'\r\n }`}\r\n >\r\n <span className=\"font-medium\">{item.label}</span>\r\n </button>\r\n ))}\r\n </nav>\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Header\r\n","import { useResponsiveLayout } from '../../hooks'\r\nimport { useNavigation, useSidebar } from '../../context'\r\n\r\nconst Sidebar = () => {\r\n const { isMobile, isTablet, breakpoint } = useResponsiveLayout()\r\n const { currentPage, setCurrentPage } = useNavigation()\r\n const { sidebarOpen, setSidebarOpen } = useSidebar()\r\n \r\n const menuItems = [\r\n { id: 'test', label: 'Suite de Test' },\r\n { id: 'demo', label: 'Demo' },\r\n ]\r\n \r\n return (\r\n <>\r\n {/* Hamburger button para móvil */}\r\n {isMobile && (\r\n <button\r\n onClick={() => setSidebarOpen(true)}\r\n className=\"fixed top-4 left-4 z-50 p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors bg-black/50 border border-gray-700\"\r\n >\r\n <svg className=\"w-6 h-6\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 6h16M4 12h16M4 18h16\" />\r\n </svg>\r\n </button>\r\n )}\r\n\r\n {/* Sidebar desktop */}\r\n <aside className={`\r\n bg-gradient-to-b from-gray-900 to-black border-r border-cyan-500/20\r\n ${isMobile ? 'hidden' : 'w-64 flex-shrink-0'}\r\n ${isTablet ? 'w-56' : 'w-64'}\r\n `}>\r\n <div className=\"p-6 flex flex-col h-full\">\r\n {/* Logo y Breakpoint */}\r\n <div className=\"flex items-center space-x-3 mb-8\">\r\n <div className=\"w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center\">\r\n <span className=\"text-white font-bold text-sm\">RS</span>\r\n </div>\r\n <div>\r\n <span className=\"text-white font-bold text-lg\">Sistema Responsivo</span>\r\n <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 mt-1\">\r\n {breakpoint.toUpperCase()}\r\n </div>\r\n </div>\r\n </div>\r\n \r\n {/* Navigation */}\r\n <nav className=\"space-y-2\">\r\n {menuItems.map((item) => (\r\n <button\r\n key={item.id}\r\n onClick={() => setCurrentPage(item.id as 'demo' | 'test')}\r\n className={`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${\r\n currentPage === item.id \r\n ? 'bg-cyan-500/20 text-cyan-400 border border-cyan-500/50' \r\n : 'text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10'\r\n }`}\r\n >\r\n <span className=\"font-medium\">{item.label}</span>\r\n </button>\r\n ))}\r\n </nav>\r\n \r\n </div>\r\n </aside>\r\n\r\n {/* Sidebar móvil desplegable */}\r\n {isMobile && sidebarOpen && (\r\n <div className=\"fixed inset-0 z-40 bg-black/50\" onClick={() => setSidebarOpen(false)}>\r\n <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\">\r\n <div className=\"p-6 flex flex-col h-full pt-20\">\r\n {/* Logo */}\r\n <div className=\"flex items-center space-x-3 mb-8\">\r\n <div className=\"w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center\">\r\n <span className=\"text-white font-bold text-sm\">RS</span>\r\n </div>\r\n <span className=\"text-white font-bold text-lg\">Sistema Responsivo</span>\r\n </div>\r\n \r\n {/* Navigation */}\r\n <nav className=\"space-y-2\">\r\n {menuItems.map((item) => (\r\n <button\r\n key={item.id}\r\n onClick={() => {\r\n setCurrentPage(item.id as 'demo' | 'test')\r\n setSidebarOpen(false)\r\n }}\r\n className={`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${\r\n currentPage === item.id \r\n ? 'bg-cyan-500/20 text-cyan-400 border border-cyan-500/50' \r\n : 'text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10'\r\n }`}\r\n >\r\n <span className=\"font-medium\">{item.label}</span>\r\n </button>\r\n ))}\r\n </nav>\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </>\r\n )\r\n}\r\n\r\nexport default Sidebar\r\n","import { useResponsiveLayout } from '../../hooks'\r\n\r\nconst Footer = () => {\r\n const { layout, breakpoint, width, height } = useResponsiveLayout()\r\n \r\n return (\r\n <footer className=\"bg-gradient-to-r from-gray-900 to-black border-t border-cyan-500/20\">\r\n <div className={`${layout.config.spacing} py-6`}>\r\n <div className=\"grid grid-cols-1 md:grid-cols-3 gap-6\">\r\n \r\n {/* Brand */}\r\n <div>\r\n <div className=\"flex items-center space-x-2 mb-2\">\r\n <div className=\"w-5 h-5 bg-cyan-500 rounded flex items-center justify-center\">\r\n <span className=\"text-white font-bold text-xs\">RS</span>\r\n </div>\r\n <span className=\"text-white font-semibold text-sm\">Responsive System</span>\r\n </div>\r\n <p className=\"text-gray-400 text-xs leading-relaxed\">\r\n Sistema completo de auto-escalado para aplicaciones React + Tailwind CSS\r\n </p>\r\n </div>\r\n \r\n {/* Status */}\r\n <div>\r\n <h3 className=\"text-white font-semibold text-sm mb-2\">Estado del Sistema</h3>\r\n <div className=\"space-y-1\">\r\n <div className=\"flex items-center justify-between text-xs\">\r\n <span className=\"text-gray-400\">Breakpoint:</span>\r\n <span className=\"text-cyan-400 font-medium\">{breakpoint.toUpperCase()}</span>\r\n </div>\r\n <div className=\"flex items-center justify-between text-xs\">\r\n <span className=\"text-gray-400\">Layout:</span>\r\n <span className=\"text-cyan-400 font-medium\">{layout.config.name}</span>\r\n </div>\r\n <div className=\"flex items-center justify-between text-xs\">\r\n <span className=\"text-gray-400\">Resolución:</span>\r\n <span className=\"text-cyan-400 font-medium\">{width} × {height}</span>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n {/* Developer */}\r\n <div>\r\n <h3 className=\"text-white font-semibold text-sm mb-2\">Desarrollador</h3>\r\n <div className=\"space-y-1\">\r\n <p className=\"text-white font-medium text-xs\">Felipe Caroca</p>\r\n <p className=\"text-gray-400 text-xs\">Frontend Developer</p>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n {/* Bottom */}\r\n <div className=\"border-t border-gray-800 mt-4 pt-4 flex flex-col items-center text-center\">\r\n <p className=\"text-gray-500 text-xs\">\r\n © 2025 Responsive System. Todos los derechos reservados.\r\n </p>\r\n </div>\r\n </div>\r\n </footer>\r\n )\r\n}\r\n\r\nexport default Footer\r\n","import { useState } from 'react'\r\nimport { useResponsiveLayout } from '../../hooks'\r\nimport { useNavigation } from '../../context'\r\n\r\nconst Navigation = () => {\r\n const { isMobile, breakpoint } = useResponsiveLayout()\r\n const { currentPage, setCurrentPage } = useNavigation()\r\n const [sidebarOpen, setSidebarOpen] = useState(false)\r\n\r\n const pages = [\r\n { id: 'demo', name: 'Demo' },\r\n { id: 'test', name: 'Suite de Test' }\r\n ]\r\n\r\n return (\r\n <div className=\"sticky top-0 z-50\">\r\n <nav className=\"bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl relative\">\r\n <div className=\"w-full\">\r\n <div className=\"px-4 py-4\">\r\n <div className=\"flex items-center justify-between\">\r\n <div className=\"flex items-center space-x-2\">\r\n <div className=\"flex items-center space-x-2\">\r\n <div className=\"w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse\"></div>\r\n <h3 className=\"text-base font-black text-white tracking-tight\">\r\n Sistema Responsivo\r\n </h3>\r\n </div>\r\n <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\">\r\n {breakpoint.toUpperCase()}\r\n </div>\r\n </div>\r\n \r\n <div className=\"flex items-center space-x-2\">\r\n {/* Botones visibles solo en desktop */}\r\n {!isMobile && pages.map(page => (\r\n <button\r\n key={page.id}\r\n onClick={() => setCurrentPage(page.id as 'demo' | 'test')}\r\n className={`px-3 py-1.5 rounded-lg transition-all font-bold text-xs tracking-wide border ${\r\n currentPage === page.id \r\n ? 'bg-cyan-500/20 text-cyan-400 border-cyan-500/50' \r\n : 'bg-black/50 text-gray-400 hover:text-gray-300 border-gray-700 hover:border-gray-600'\r\n }`}\r\n >\r\n {page.name}\r\n </button>\r\n ))}\r\n \r\n {/* Menú hamburguesa para móvil - A LA DERECHA */}\r\n {isMobile && (\r\n <button\r\n onClick={() => setSidebarOpen(!sidebarOpen)}\r\n className=\"p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors\"\r\n >\r\n <svg className=\"w-6 h-6\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 6h16M4 12h16M4 18h16\" />\r\n </svg>\r\n </button>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n {/* Menú móvil desplegable - TRADICIONAL */}\r\n {isMobile && sidebarOpen && (\r\n <div className=\"absolute top-full left-0 right-0 bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl z-50\">\r\n <div className=\"p-4\">\r\n {/* Navigation - VERTICAL como menú tradicional */}\r\n <nav className=\"space-y-2\">\r\n {pages.map((page) => (\r\n <button\r\n key={page.id}\r\n onClick={() => {\r\n setCurrentPage(page.id as 'demo' | 'test')\r\n setSidebarOpen(false)\r\n }}\r\n className={`w-full text-left px-4 py-3 rounded-lg transition-all font-bold text-sm tracking-wide border ${\r\n currentPage === page.id \r\n ? 'bg-cyan-500/20 text-cyan-400 border-cyan-500/50' \r\n : 'bg-black/50 text-gray-400 hover:text-gray-300 border-gray-700 hover:border-gray-600'\r\n }`}\r\n >\r\n {page.name}\r\n </button>\r\n ))}\r\n </nav>\r\n </div>\r\n </div>\r\n )}\r\n </nav>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Navigation\r\n","import React from 'react'\r\nimport { Navigation, Footer } from '../components/layout'\r\nimport { useResponsiveLayout } from '../hooks'\r\n\r\ninterface DefaultLayoutProps {\r\n children: React.ReactNode\r\n}\r\n\r\nconst DefaultLayout: React.FC<DefaultLayoutProps> = ({ children }) => {\r\n const { layoutUtils } = useResponsiveLayout()\r\n \r\n return (\r\n <div className=\"min-h-screen bg-black flex flex-col\">\r\n {/* Navigation fijo arriba */}\r\n <Navigation />\r\n \r\n {/* Main content con padding-top para la navigation */}\r\n <main className=\"flex-1\">\r\n <div className={layoutUtils.getContainerClass()}>\r\n {children}\r\n </div>\r\n </main>\r\n \r\n {/* Footer fijo abajo */}\r\n <Footer />\r\n </div>\r\n )\r\n}\r\n\r\nexport default DefaultLayout\r\n","import React from 'react'\r\nimport { useResponsiveLayout } from '../hooks'\r\nimport { Sidebar } from '../components/layout'\r\nimport { SidebarProvider } from '../context'\r\n\r\ninterface SidebarLayoutProps {\r\n children: React.ReactNode\r\n}\r\n\r\nconst SidebarLayoutContent: React.FC<{ children: React.ReactNode }> = ({ children }) => {\r\n const { layoutUtils } = useResponsiveLayout()\r\n \r\n return (\r\n <div className=\"min-h-screen bg-black flex\">\r\n {/* Sidebar */}\r\n <Sidebar />\r\n \r\n {/* Main content */}\r\n <main className=\"flex-1 overflow-auto\">\r\n <div className={layoutUtils.getContainerClass()}>\r\n {children}\r\n </div>\r\n </main>\r\n </div>\r\n )\r\n}\r\n\r\nconst SidebarLayout: React.FC<SidebarLayoutProps> = ({ children }) => {\r\n return (\r\n <SidebarProvider>\r\n <SidebarLayoutContent>{children}</SidebarLayoutContent>\r\n </SidebarProvider>\r\n )\r\n}\r\n\r\nexport default SidebarLayout\r\n","import React from 'react'\r\nimport { useResponsiveLayout } from '../hooks'\r\nimport { Sidebar, Footer } from '../components/layout'\r\nimport { SidebarProvider, useSidebar } from '../context'\r\n\r\ninterface DashboardLayoutProps {\r\n children: React.ReactNode\r\n}\r\n\r\nconst DashboardLayoutContent: React.FC<{ children: React.ReactNode }> = ({ children }) => {\r\n const { layoutUtils } = useResponsiveLayout()\r\n const { setSidebarOpen } = useSidebar()\r\n \r\n return (\r\n <div className=\"min-h-screen bg-black flex flex-col\">\r\n {/* Navbar para móvil (igual que SidebarLayout) */}\r\n <div className=\"sticky top-0 z-50\">\r\n <nav className=\"bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl relative\">\r\n <div className=\"w-full\">\r\n <div className=\"px-4 py-4\">\r\n <div className=\"flex items-center justify-between\">\r\n <div className=\"flex items-center space-x-2\">\r\n {/* Hamburger button para móvil - A LA IZQUIERDA */}\r\n <button\r\n onClick={() => setSidebarOpen(true)}\r\n className=\"p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors\"\r\n >\r\n <svg className=\"w-6 h-6\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 6h16M4 12h16M4 18h16\" />\r\n </svg>\r\n </button>\r\n \r\n <div className=\"flex items-center space-x-2\">\r\n <div className=\"w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse\"></div>\r\n <h3 className=\"text-base font-black text-white tracking-tight\">\r\n Sistema Responsivo\r\n </h3>\r\n </div>\r\n <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\">\r\n DASHBOARD\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </nav>\r\n </div>\r\n \r\n {/* Content area con sidebar */}\r\n <div className=\"flex flex-1\">\r\n {/* Sidebar */}\r\n <Sidebar />\r\n \r\n {/* Main content */}\r\n <main className=\"flex-1 overflow-auto\">\r\n <div className={layoutUtils.getContainerClass()}>\r\n {children}\r\n </div>\r\n </main>\r\n </div>\r\n \r\n {/* Footer */}\r\n <Footer />\r\n </div>\r\n )\r\n}\r\n\r\nconst DashboardLayout: React.FC<DashboardLayoutProps> = ({ children }) => {\r\n return (\r\n <SidebarProvider>\r\n <DashboardLayoutContent>{children}</DashboardLayoutContent>\r\n </SidebarProvider>\r\n )\r\n}\r\n\r\nexport default DashboardLayout\r\n","import React from 'react'\r\nimport { useResponsiveLayout } from '../hooks'\r\n\r\ninterface MinimalLayoutProps {\r\n children: React.ReactNode\r\n}\r\n\r\nconst MinimalLayout: React.FC<MinimalLayoutProps> = ({ children }) => {\r\n const { layoutUtils } = useResponsiveLayout()\r\n \r\n return (\r\n <div className=\"min-h-screen bg-black\">\r\n <main className={layoutUtils.getContainerClass()}>\r\n {children}\r\n </main>\r\n </div>\r\n )\r\n}\r\n\r\nexport default MinimalLayout\r\n","import { useLayout } from '../hooks'\r\nimport { LAYOUT_CONFIG } from '../config/layout'\r\n\r\ninterface LayoutSwitcherProps {\r\n compact?: boolean\r\n}\r\n\r\nconst LayoutSwitcher = ({ compact = false }: LayoutSwitcherProps) => {\r\n const { current, setLayout, config } = useLayout()\r\n \r\n if (compact) {\r\n return (\r\n <div className=\"bg-black/50 rounded-lg p-3 border border-gray-700\">\r\n <div className=\"text-xs text-gray-500 mb-2\">Layout:</div>\r\n <select\r\n value={current}\r\n onChange={(e) => setLayout(e.target.value)}\r\n 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\"\r\n >\r\n {Object.entries(LAYOUT_CONFIG).map(([key, layoutConfig]) => (\r\n <option key={key} value={key}>\r\n {layoutConfig.name}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n )\r\n }\r\n \r\n return (\r\n <div className=\"bg-black/50 backdrop-blur-sm rounded-lg p-4 border border-cyan-500/30\">\r\n <h3 className=\"text-white font-semibold mb-3\">Cambiar Layout</h3>\r\n \r\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3\">\r\n {Object.entries(LAYOUT_CONFIG).map(([key, layoutConfig]) => (\r\n <button\r\n key={key}\r\n onClick={() => setLayout(key)}\r\n className={`\r\n p-4 rounded-lg border transition-all text-left\r\n ${current === key \r\n ? 'border-cyan-500 bg-cyan-500/10 text-cyan-400' \r\n : 'border-gray-700 bg-black/30 text-gray-300 hover:border-gray-600'\r\n }\r\n `}\r\n >\r\n <div className=\"font-semibold mb-1\">{layoutConfig.name}</div>\r\n <div className=\"text-xs opacity-75\">{layoutConfig.description}</div>\r\n </button>\r\n ))}\r\n </div>\r\n \r\n <div className=\"mt-4 p-3 bg-gray-900/50 rounded-lg\">\r\n <div className=\"text-xs text-gray-500 mb-1\">Layout Actual:</div>\r\n <div className=\"text-sm text-cyan-400 font-medium\">{config.name}</div>\r\n <div className=\"text-xs text-gray-400\">{config.description}</div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default LayoutSwitcher\r\n"],"names":["ResponsiveProvider","children","_debug","DEFAULT_BREAKPOINTS","getCurrentBreakpoint","width","getBreakpointIndex","breakpoint","getBreakpointValue","debounce","func","wait","timeout","args","getOrientation","height","useResponsive","dimensions","setDimensions","useState","updateDimensions","useCallback","debouncedUpdateDimensions","useMemo","useEffect","orientation","isXs","isSm","isMd","isLg","isXl","is2Xl","is3Xl","is4Xl","is5Xl","isMobile","isTablet","isDesktop","isSmall","isLarge","isUltraWide","is4K","is5K","isPortrait","isLandscape","isBreakpointUp","bp","isBreakpointDown","isBreakpointBetween","min","max","current","isWidthUp","minWidth","isWidthDown","maxWidth","isWidthBetween","isHeightUp","minHeight","isHeightDown","maxHeight","isHeightBetween","ResponsiveLayoutContext","createContext","useResponsiveLayoutContext","context","useContext","SidebarContext","SidebarProvider","sidebarOpen","setSidebarOpen","jsx","useSidebar","NavigationContext","useNavigation","NavigationProvider","defaultPage","currentPage","setCurrentPage","useResponsiveLayout","breakpoints","classes","cols","useLayout","responsiveLayout","LAYOUT_CONFIG","DEFAULT_LAYOUT","AVAILABLE_LAYOUTS","ResponsiveLayoutProviderInner","defaultLayout","useResponsiveHook","internalResponsive","responsive","currentLayout","setCurrentLayout","layoutConfig","contextValue","baseClass","ResponsiveLayoutProvider","MainLayout","layoutProp","layout","LayoutComponent","DefaultLayout","SidebarLayout","DashboardLayout","MinimalLayout","Header","menuItems","jsxs","page","item","Sidebar","Fragment","Footer","Navigation","pages","layoutUtils","SidebarLayoutContent","DashboardLayoutContent","Layo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,IAAY0E,EACV,+CACA,iEACJ;AAAA,cAGF,SAAA,CAAAtD,EAAAA,IAAC,MAAA,CAAI,UAAU,qBAAsB,SAAAwB,EAAa,KAAK,EACvDxB,EAAAA,IAAC,MAAA,CAAI,UAAU,qBAAsB,WAAa,WAAA,CAAY,CAAA,CAAA,EAXzDsD,CAAA,CAaR,EACH,EAEAhB,EAAAA,KAAC,MAAA,CAAI,UAAU,qCACb,SAAA,CAAAtC,EAAAA,IAAC,MAAA,CAAI,UAAU,6BAA6B,SAAA,iBAAc,EAC1DA,EAAAA,IAAC,MAAA,CAAI,UAAU,oCAAqC,WAAO,KAAK,EAChEA,EAAAA,IAAC,MAAA,CAAI,UAAU,wBAAyB,WAAO,WAAA,CAAY,CAAA,CAAA,CAC7D,CAAA,EACF,CAEJ"}
1
+ {"version":3,"file":"responsive-system.cjs","sources":["../src/providers/ResponsiveProvider.tsx","../src/constants/breakpoints.ts","../src/hooks/useResponsive.ts","../src/context/ResponsiveLayoutContext.tsx","../src/context/SidebarContext.tsx","../src/context/NavigationContext.tsx","../src/hooks/useResponsiveLayout.ts","../src/hooks/useLayout.ts","../src/config/layout.ts","../src/providers/ResponsiveLayoutProvider.tsx","../src/layouts/MainLayout.tsx","../src/components/layout/Header.tsx","../src/components/layout/Sidebar.tsx","../src/components/layout/Footer.tsx","../src/components/layout/Navigation.tsx","../src/layouts/DefaultLayout.tsx","../src/layouts/SidebarLayout.tsx","../src/layouts/DashboardLayout.tsx","../src/layouts/MinimalLayout.tsx","../src/components/LayoutSwitcher.tsx"],"sourcesContent":["import React from 'react'\r\nimport type { ResponsiveProviderProps } from '../types/responsive'\r\n\r\n/**\r\n * ResponsiveProvider - Provider simplificado para el sistema responsive\r\n * \r\n * Nota: Con el sistema de auto-scaling mediante plugin de Tailwind,\r\n * este Provider es OPCIONAL y solo se necesita si quieres acceder\r\n * al hook useResponsive() en tus componentes.\r\n */\r\nexport const ResponsiveProvider: React.FC<ResponsiveProviderProps> = ({\r\n children,\r\n debug: _debug = false\r\n}) => {\r\n // El Provider ahora solo envuelve children sin context\r\n // El auto-scaling funciona mediante el plugin de Tailwind\r\n return <>{children}</>\r\n}\r\n","import type { Breakpoint } from '../types/responsive'\r\n\r\n/**\r\n * Default breakpoint values\r\n * Deben coincidir con tailwind.config.js\r\n */\r\nexport const DEFAULT_BREAKPOINTS: Record<Breakpoint, number> = {\r\n xs: 475,\r\n sm: 640,\r\n md: 768,\r\n lg: 1024,\r\n xl: 1280,\r\n '2xl': 1536,\r\n '3xl': 1920,\r\n '4xl': 2560,\r\n '5xl': 3840\r\n}\r\n\r\n/**\r\n * Get current breakpoint based on window width\r\n */\r\nexport const getCurrentBreakpoint = (width: number): Breakpoint => {\r\n if (width >= DEFAULT_BREAKPOINTS['5xl']) return '5xl'\r\n if (width >= DEFAULT_BREAKPOINTS['4xl']) return '4xl'\r\n if (width >= DEFAULT_BREAKPOINTS['3xl']) return '3xl'\r\n if (width >= DEFAULT_BREAKPOINTS['2xl']) return '2xl'\r\n if (width >= DEFAULT_BREAKPOINTS.xl) return 'xl'\r\n if (width >= DEFAULT_BREAKPOINTS.lg) return 'lg'\r\n if (width >= DEFAULT_BREAKPOINTS.md) return 'md'\r\n if (width >= DEFAULT_BREAKPOINTS.sm) return 'sm'\r\n return 'xs'\r\n}\r\n\r\n/**\r\n * Get breakpoint index (for comparisons)\r\n */\r\nexport const getBreakpointIndex = (breakpoint: Breakpoint): number => {\r\n const breakpoints: Breakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl']\r\n return breakpoints.indexOf(breakpoint)\r\n}\r\n\r\n/**\r\n * Get breakpoint value in pixels\r\n */\r\nexport const getBreakpointValue = (breakpoint: Breakpoint): number => {\r\n return DEFAULT_BREAKPOINTS[breakpoint]\r\n}\r\n\r\n","import { useState, useEffect, useCallback, useMemo } from 'react'\r\nimport type { \r\n ResponsiveState, \r\n Breakpoint\r\n} from '../types/responsive'\r\nimport { \r\n getCurrentBreakpoint,\r\n getBreakpointIndex\r\n} from '../constants/breakpoints'\r\n\r\n/**\r\n * Debounce utility\r\n */\r\nfunction debounce<T extends (...args: unknown[]) => void>(\r\n func: T,\r\n wait: number\r\n): (...args: Parameters<T>) => void {\r\n let timeout: ReturnType<typeof setTimeout> | null = null\r\n return (...args: Parameters<T>) => {\r\n if (timeout) clearTimeout(timeout)\r\n timeout = setTimeout(() => func(...args), wait)\r\n }\r\n}\r\n\r\n/**\r\n * Get orientation based on dimensions\r\n */\r\nfunction getOrientation(width: number, height: number): 'landscape' | 'portrait' {\r\n return width >= height ? 'landscape' : 'portrait'\r\n}\r\n\r\n/**\r\n * Hook principal useResponsive\r\n * Provee información sobre el breakpoint actual y helpers para responsive\r\n */\r\nexport const useResponsive = (): ResponsiveState => {\r\n const [dimensions, setDimensions] = useState({\r\n width: typeof window !== 'undefined' ? window.innerWidth : 1024,\r\n height: typeof window !== 'undefined' ? window.innerHeight : 768\r\n })\r\n\r\n // Función para actualizar dimensiones\r\n const updateDimensions = useCallback(() => {\r\n setDimensions({\r\n width: window.innerWidth,\r\n height: window.innerHeight\r\n })\r\n }, [])\r\n\r\n // Debounced update para optimizar performance\r\n const debouncedUpdateDimensions = useMemo(\r\n () => debounce(updateDimensions, 100),\r\n [updateDimensions]\r\n )\r\n\r\n // Effect para escuchar cambios de tamaño\r\n useEffect(() => {\r\n if (typeof window === 'undefined') return\r\n\r\n window.addEventListener('resize', debouncedUpdateDimensions)\r\n \r\n return () => {\r\n window.removeEventListener('resize', debouncedUpdateDimensions)\r\n }\r\n }, [debouncedUpdateDimensions])\r\n\r\n const { width, height } = dimensions\r\n\r\n // Calcular breakpoint actual\r\n const breakpoint = useMemo(() => getCurrentBreakpoint(width), [width])\r\n \r\n // Calcular orientación\r\n const orientation = useMemo(() => getOrientation(width, height), [width, height])\r\n\r\n // Helpers booleanos por breakpoint específico\r\n const isXs = breakpoint === 'xs'\r\n const isSm = breakpoint === 'sm'\r\n const isMd = breakpoint === 'md'\r\n const isLg = breakpoint === 'lg'\r\n const isXl = breakpoint === 'xl'\r\n const is2Xl = breakpoint === '2xl'\r\n const is3Xl = breakpoint === '3xl'\r\n const is4Xl = breakpoint === '4xl'\r\n const is5Xl = breakpoint === '5xl'\r\n\r\n // Helpers booleanos agrupados\r\n const isMobile = isXs || isSm\r\n const isTablet = isMd\r\n const isDesktop = isLg || isXl || is2Xl || is3Xl || is4Xl || is5Xl\r\n const isSmall = isXs || isSm || isMd\r\n const isLarge = isLg || isXl || is2Xl || is3Xl || is4Xl || is5Xl\r\n const isUltraWide = is3Xl || is4Xl || is5Xl\r\n const is4K = is4Xl || is5Xl\r\n const is5K = is5Xl\r\n\r\n // Helpers de orientación\r\n const isPortrait = orientation === 'portrait'\r\n const isLandscape = orientation === 'landscape'\r\n\r\n // Funciones de comparación de breakpoints\r\n const isBreakpointUp = useCallback((bp: Breakpoint): boolean => {\r\n return getBreakpointIndex(breakpoint) >= getBreakpointIndex(bp)\r\n }, [breakpoint])\r\n\r\n const isBreakpointDown = useCallback((bp: Breakpoint): boolean => {\r\n return getBreakpointIndex(breakpoint) <= getBreakpointIndex(bp)\r\n }, [breakpoint])\r\n\r\n const isBreakpointBetween = useCallback((min: Breakpoint, max: Breakpoint): boolean => {\r\n const current = getBreakpointIndex(breakpoint)\r\n return current >= getBreakpointIndex(min) && current <= getBreakpointIndex(max)\r\n }, [breakpoint])\r\n\r\n // Funciones de comparación de ancho\r\n const isWidthUp = useCallback((minWidth: number): boolean => {\r\n return width >= minWidth\r\n }, [width])\r\n\r\n const isWidthDown = useCallback((maxWidth: number): boolean => {\r\n return width <= maxWidth\r\n }, [width])\r\n\r\n const isWidthBetween = useCallback((minWidth: number, maxWidth: number): boolean => {\r\n return width >= minWidth && width <= maxWidth\r\n }, [width])\r\n\r\n // Funciones de comparación de altura\r\n const isHeightUp = useCallback((minHeight: number): boolean => {\r\n return height >= minHeight\r\n }, [height])\r\n\r\n const isHeightDown = useCallback((maxHeight: number): boolean => {\r\n return height <= maxHeight\r\n }, [height])\r\n\r\n const isHeightBetween = useCallback((minHeight: number, maxHeight: number): boolean => {\r\n return height >= minHeight && height <= maxHeight\r\n }, [height])\r\n\r\n // Debug mode\r\n const debug = false\r\n\r\n return {\r\n // Estado básico\r\n breakpoint,\r\n width,\r\n height,\r\n orientation,\r\n \r\n // Helpers booleanos específicos\r\n isXs,\r\n isSm,\r\n isMd,\r\n isLg,\r\n isXl,\r\n is2Xl,\r\n is3Xl,\r\n is4Xl,\r\n is5Xl,\r\n \r\n // Helpers booleanos agrupados\r\n isMobile,\r\n isTablet,\r\n isDesktop,\r\n isSmall,\r\n isLarge,\r\n isUltraWide,\r\n is4K,\r\n is5K,\r\n \r\n // Helpers de orientación\r\n isPortrait,\r\n isLandscape,\r\n \r\n // Funciones de comparación\r\n isBreakpointUp,\r\n isBreakpointDown,\r\n isBreakpointBetween,\r\n isWidthUp,\r\n isWidthDown,\r\n isWidthBetween,\r\n isHeightUp,\r\n isHeightDown,\r\n isHeightBetween,\r\n \r\n // Debug\r\n debug\r\n }\r\n}\r\n","import { createContext, useContext } from 'react'\r\nimport type { ResponsiveState } from '../types/responsive'\r\nimport type { LayoutConfig } from '../config/layout'\r\n\r\nexport interface ResponsiveLayoutState {\r\n // Estado del sistema responsivo\r\n responsive: ResponsiveState\r\n \r\n // Estado del layout\r\n layout: {\r\n current: string\r\n config: LayoutConfig\r\n setLayout: (layout: string) => void\r\n }\r\n \r\n // Utilidades de layout\r\n layoutUtils: {\r\n getContainerClass: () => string\r\n getMainClass: () => string\r\n hasSidebar: () => boolean\r\n hasHeader: () => boolean\r\n hasFooter: () => boolean\r\n hasNavigation: () => boolean\r\n }\r\n}\r\n\r\nconst ResponsiveLayoutContext = createContext<ResponsiveLayoutState | undefined>(undefined)\r\n\r\nexport const useResponsiveLayoutContext = () => {\r\n const context = useContext(ResponsiveLayoutContext)\r\n if (!context) {\r\n throw new Error('useResponsiveLayoutContext must be used within a ResponsiveLayoutProvider')\r\n }\r\n return context\r\n}\r\n\r\nexport { ResponsiveLayoutContext }\r\n","import React, { createContext, useContext, useState } from 'react'\r\n\r\ninterface SidebarContextType {\r\n sidebarOpen: boolean\r\n setSidebarOpen: (open: boolean) => void\r\n}\r\n\r\nconst SidebarContext = createContext<SidebarContextType | undefined>(undefined)\r\n\r\nexport const SidebarProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {\r\n const [sidebarOpen, setSidebarOpen] = useState(false)\r\n\r\n return (\r\n <SidebarContext.Provider value={{ sidebarOpen, setSidebarOpen }}>\r\n {children}\r\n </SidebarContext.Provider>\r\n )\r\n}\r\n\r\nexport const useSidebar = () => {\r\n const context = useContext(SidebarContext)\r\n if (!context) {\r\n throw new Error('useSidebar must be used within a SidebarProvider')\r\n }\r\n return context\r\n}\r\n","import React, { createContext, useContext, useState } from 'react'\r\n\r\ninterface NavigationContextType {\r\n currentPage: 'demo' | 'test'\r\n setCurrentPage: (page: 'demo' | 'test') => void\r\n}\r\n\r\nconst NavigationContext = createContext<NavigationContextType>({\r\n currentPage: 'test',\r\n setCurrentPage: () => {}\r\n})\r\n\r\nexport const useNavigation = () => useContext(NavigationContext)\r\n\r\ninterface NavigationProviderProps {\r\n children: React.ReactNode\r\n defaultPage?: 'demo' | 'test'\r\n}\r\n\r\nexport const NavigationProvider: React.FC<NavigationProviderProps> = ({ \r\n children, \r\n defaultPage = 'test' \r\n}) => {\r\n const [currentPage, setCurrentPage] = useState<'demo' | 'test'>(defaultPage)\r\n\r\n return (\r\n <NavigationContext.Provider value={{ currentPage, setCurrentPage }}>\r\n {children}\r\n </NavigationContext.Provider>\r\n )\r\n}\r\n\r\n","import { useResponsiveLayoutContext } from '../context'\r\n\r\nexport const useResponsiveLayout = () => {\r\n const context = useResponsiveLayoutContext()\r\n \r\n return {\r\n // Todo el sistema responsivo original\r\n ...context.responsive,\r\n \r\n // Sistema de layout\r\n layout: {\r\n current: context.layout.current,\r\n config: context.layout.config,\r\n setLayout: context.layout.setLayout,\r\n },\r\n \r\n // Utilidades de layout\r\n layoutUtils: context.layoutUtils,\r\n \r\n // Helpers específicos del layout\r\n isDefaultLayout: () => context.layout.current === 'default',\r\n isSidebarLayout: () => context.layout.current === 'sidebar',\r\n isDashboardLayout: () => context.layout.current === 'dashboard',\r\n isMinimalLayout: () => context.layout.current === 'minimal',\r\n \r\n // Grid helpers que usan el sistema auto-escalable\r\n grid: {\r\n auto: (minWidth = 'md') => `grid-cols-auto-${minWidth}`,\r\n responsive: (breakpoints: Record<string, number>) => {\r\n const classes: string[] = []\r\n Object.entries(breakpoints).forEach(([breakpoint, cols]) => {\r\n if (breakpoint === 'base') {\r\n classes.push(`grid-cols-${cols}`)\r\n } else {\r\n classes.push(`${breakpoint}:grid-cols-${cols}`)\r\n }\r\n })\r\n return classes.join(' ')\r\n },\r\n fixed: (cols: number) => `grid-cols-${cols}`,\r\n },\r\n \r\n // Spacing helpers que escalan automáticamente\r\n spacing: {\r\n container: context.layoutUtils.getContainerClass(),\r\n section: 'mb-6',\r\n card: 'p-6',\r\n gap: 'gap-4',\r\n },\r\n }\r\n}\r\n","import { useResponsiveLayout } from './index'\r\n\r\nexport const useLayout = () => {\r\n const responsiveLayout = useResponsiveLayout()\r\n \r\n return {\r\n // Layout actual\r\n current: responsiveLayout.layout.current,\r\n config: responsiveLayout.layout.config,\r\n setLayout: responsiveLayout.layout.setLayout,\r\n \r\n // Utilidades\r\n ...responsiveLayout.layoutUtils,\r\n \r\n // Helpers específicos\r\n isDefaultLayout: responsiveLayout.isDefaultLayout(),\r\n isSidebarLayout: responsiveLayout.isSidebarLayout(),\r\n isDashboardLayout: responsiveLayout.isDashboardLayout(),\r\n isMinimalLayout: responsiveLayout.isMinimalLayout(),\r\n \r\n // Grid helpers\r\n grid: responsiveLayout.grid,\r\n \r\n // Spacing helpers\r\n spacing: responsiveLayout.spacing,\r\n }\r\n}\r\n","export interface LayoutConfig {\r\n name: string\r\n description: string\r\n components: string[]\r\n spacing: string\r\n responsive: {\r\n mobile: string\r\n tablet: string\r\n desktop: string\r\n }\r\n}\r\n\r\nexport const LAYOUT_CONFIG: Record<string, LayoutConfig> = {\r\n default: {\r\n name: 'Default',\r\n description: 'Navbar arriba, body central, footer abajo',\r\n components: ['Navigation', 'Footer'],\r\n spacing: 'p-4 md:p-6 lg:p-8',\r\n responsive: {\r\n mobile: 'p-4',\r\n tablet: 'p-6',\r\n desktop: 'p-8'\r\n }\r\n },\r\n sidebar: {\r\n name: 'Sidebar',\r\n description: 'Sidebar izquierda, contenido principal',\r\n components: ['Sidebar'],\r\n spacing: 'p-4 md:p-6',\r\n responsive: {\r\n mobile: 'p-4',\r\n tablet: 'p-6',\r\n desktop: 'p-6'\r\n }\r\n },\r\n dashboard: {\r\n name: 'Dashboard',\r\n description: 'Header + Sidebar + Main + Footer',\r\n components: ['Header', 'Sidebar', 'Footer'],\r\n spacing: 'p-4 md:p-6 lg:p-8',\r\n responsive: {\r\n mobile: 'p-4',\r\n tablet: 'p-6',\r\n desktop: 'p-8'\r\n }\r\n },\r\n minimal: {\r\n name: 'Minimal',\r\n description: 'Solo contenido, sin navegación',\r\n components: [],\r\n spacing: 'p-4 md:p-6',\r\n responsive: {\r\n mobile: 'p-4',\r\n tablet: 'p-6',\r\n desktop: 'p-6'\r\n }\r\n }\r\n}\r\n\r\nexport const DEFAULT_LAYOUT = 'default'\r\nexport const AVAILABLE_LAYOUTS = Object.keys(LAYOUT_CONFIG)\r\n","import React, { useState } from 'react'\r\nimport { ResponsiveProvider } from './index'\r\nimport { useResponsive } from '../hooks'\r\nimport { ResponsiveLayoutContext } from '../context'\r\nimport { LAYOUT_CONFIG, DEFAULT_LAYOUT } from '../config/layout'\r\nimport type { ResponsiveState } from '../types/responsive'\r\n\r\ninterface ResponsiveLayoutProviderProps {\r\n children: React.ReactNode\r\n defaultLayout?: string\r\n /**\r\n * Hook responsivo personalizado del proyecto consumidor.\r\n * Si se proporciona, se usará en lugar del hook interno del paquete.\r\n * Debe retornar un objeto compatible con ResponsiveState.\r\n */\r\n useResponsiveHook?: () => ResponsiveState\r\n}\r\n\r\ninterface ResponsiveLayoutProviderInnerProps {\r\n children: React.ReactNode\r\n defaultLayout: string\r\n useResponsiveHook?: () => ResponsiveState\r\n}\r\n\r\nconst ResponsiveLayoutProviderInner: React.FC<ResponsiveLayoutProviderInnerProps> = ({ \r\n children, \r\n defaultLayout,\r\n useResponsiveHook\r\n}) => {\r\n // Usar hook personalizado si se proporciona, sino usar el hook interno\r\n const internalResponsive = useResponsive()\r\n const customResponsive = useResponsiveHook?.()\r\n const responsive = customResponsive || internalResponsive\r\n \r\n const [currentLayout, setCurrentLayout] = useState(defaultLayout)\r\n \r\n const layoutConfig = LAYOUT_CONFIG[currentLayout] || LAYOUT_CONFIG[DEFAULT_LAYOUT]\r\n \r\n const layoutUtils = {\r\n getContainerClass: () => {\r\n if (responsive.isMobile) return layoutConfig.responsive.mobile\r\n if (responsive.isTablet) return layoutConfig.responsive.tablet\r\n return layoutConfig.responsive.desktop\r\n },\r\n \r\n getMainClass: () => {\r\n const baseClass = 'min-h-screen bg-black'\r\n if (currentLayout === 'sidebar' || currentLayout === 'dashboard') {\r\n return `${baseClass} flex`\r\n }\r\n return baseClass\r\n },\r\n \r\n hasSidebar: () => currentLayout === 'sidebar' || currentLayout === 'dashboard',\r\n hasHeader: () => currentLayout === 'dashboard',\r\n hasFooter: () => currentLayout === 'default' || currentLayout === 'dashboard',\r\n hasNavigation: () => currentLayout === 'default',\r\n }\r\n \r\n const contextValue = {\r\n responsive,\r\n layout: {\r\n current: currentLayout,\r\n config: layoutConfig,\r\n setLayout: setCurrentLayout,\r\n },\r\n layoutUtils,\r\n }\r\n \r\n return (\r\n <ResponsiveLayoutContext.Provider value={contextValue}>\r\n {children}\r\n </ResponsiveLayoutContext.Provider>\r\n )\r\n}\r\n\r\nexport const ResponsiveLayoutProvider: React.FC<ResponsiveLayoutProviderProps> = ({ \r\n children, \r\n defaultLayout = DEFAULT_LAYOUT,\r\n useResponsiveHook\r\n}) => {\r\n return (\r\n <ResponsiveProvider>\r\n <ResponsiveLayoutProviderInner \r\n defaultLayout={defaultLayout}\r\n useResponsiveHook={useResponsiveHook}\r\n >\r\n {children}\r\n </ResponsiveLayoutProviderInner>\r\n </ResponsiveProvider>\r\n )\r\n}\r\n","import React from 'react'\r\nimport { useResponsiveLayout } from '../hooks'\r\nimport { \r\n DefaultLayout, \r\n SidebarLayout, \r\n DashboardLayout, \r\n MinimalLayout \r\n} from './index'\r\n\r\ninterface MainLayoutProps {\r\n children: React.ReactNode\r\n /**\r\n * Layout específico a usar. Si se proporciona, sobrescribe el layout del contexto.\r\n * Valores posibles: 'default', 'sidebar', 'dashboard', 'minimal'\r\n */\r\n layout?: 'default' | 'sidebar' | 'dashboard' | 'minimal'\r\n}\r\n\r\nconst MainLayout: React.FC<MainLayoutProps> = ({ children, layout: layoutProp }) => {\r\n const { layout } = useResponsiveLayout()\r\n \r\n // Usar el layout del prop si se proporciona, sino usar el del contexto\r\n const currentLayout = layoutProp || layout.current\r\n \r\n // Seleccionar el layout apropiado basado en el estado del contexto o prop\r\n const layouts = {\r\n default: DefaultLayout,\r\n sidebar: SidebarLayout,\r\n dashboard: DashboardLayout,\r\n minimal: MinimalLayout,\r\n }\r\n \r\n const LayoutComponent = layouts[currentLayout as keyof typeof layouts] || DefaultLayout\r\n \r\n return <LayoutComponent>{children}</LayoutComponent>\r\n}\r\n\r\nexport default MainLayout\r\n","import { useResponsiveLayout } from '../../hooks'\r\nimport { useNavigation, useSidebar } from '../../context'\r\n\r\nconst Header = () => {\r\n const { isMobile } = useResponsiveLayout()\r\n const { currentPage, setCurrentPage } = useNavigation()\r\n const { sidebarOpen, setSidebarOpen } = useSidebar()\r\n \r\n const menuItems = [\r\n { id: 'test', label: 'Suite de Test' },\r\n { id: 'demo', label: 'Demo' },\r\n ]\r\n \r\n return (\r\n <div className=\"sticky top-0 z-50\">\r\n <header className=\"bg-gradient-to-r from-gray-900 via-black to-gray-900 border-b border-cyan-500/20 shadow-2xl relative\">\r\n <div className=\"w-full\">\r\n <div className=\"px-4 py-4\">\r\n <div className=\"flex items-center justify-between\">\r\n <div className=\"flex items-center space-x-2\">\r\n {/* Hamburger button para móvil - A LA IZQUIERDA */}\r\n {isMobile && (\r\n <button\r\n onClick={() => setSidebarOpen(true)}\r\n className=\"p-2 rounded-lg text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10 transition-colors\"\r\n >\r\n <svg className=\"w-6 h-6\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 6h16M4 12h16M4 18h16\" />\r\n </svg>\r\n </button>\r\n )}\r\n \r\n <div className=\"flex items-center space-x-2\">\r\n <div className=\"w-1.5 h-1.5 bg-cyan-400 rounded-full shadow-lg shadow-cyan-400/50 animate-pulse\"></div>\r\n <h3 className=\"text-base font-black text-white tracking-tight\">\r\n Sistema Responsivo\r\n </h3>\r\n </div>\r\n <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\">\r\n DASHBOARD\r\n </div>\r\n </div>\r\n \r\n <div className=\"flex items-center space-x-2\">\r\n {/* Botones visibles solo en desktop */}\r\n {!isMobile && menuItems.map((page) => (\r\n <button\r\n key={page.id}\r\n onClick={() => setCurrentPage(page.id as 'demo' | 'test')}\r\n className={`px-3 py-1.5 rounded-lg transition-all font-bold text-xs tracking-wide border ${\r\n currentPage === page.id \r\n ? 'bg-cyan-500/20 text-cyan-400 border-cyan-500/50' \r\n : 'bg-black/50 text-gray-400 hover:text-gray-300 border-gray-700 hover:border-gray-600'\r\n }`}\r\n >\r\n {page.label}\r\n </button>\r\n ))}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </header>\r\n\r\n {/* Sidebar móvil desplegable */}\r\n {isMobile && sidebarOpen && (\r\n <div className=\"fixed inset-0 z-40 bg-black/50\" onClick={() => setSidebarOpen(false)}>\r\n <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\">\r\n <div className=\"p-6 flex flex-col h-full pt-20\">\r\n {/* Logo */}\r\n <div className=\"flex items-center space-x-3 mb-8\">\r\n <div className=\"w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center\">\r\n <span className=\"text-white font-bold text-sm\">RS</span>\r\n </div>\r\n <span className=\"text-white font-bold text-lg\">Sistema Responsivo</span>\r\n </div>\r\n \r\n {/* Navigation */}\r\n <nav className=\"space-y-2\">\r\n {menuItems.map((item) => (\r\n <button\r\n key={item.id}\r\n onClick={() => {\r\n setCurrentPage(item.id as 'demo' | 'test')\r\n setSidebarOpen(false)\r\n }}\r\n className={`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${\r\n currentPage === item.id \r\n ? 'bg-cyan-500/20 text-cyan-400 border border-cyan-500/50' \r\n : 'text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10'\r\n }`}\r\n >\r\n <span className=\"font-medium\">{item.label}</span>\r\n </button>\r\n ))}\r\n </nav>\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Header\r\n","import { useResponsiveLayout } from '../../hooks'\r\nimport { useSidebar } from '../../context'\r\n\r\nconst Sidebar = () => {\r\n const { isMobile, isTablet } = useResponsiveLayout()\r\n const { sidebarOpen, setSidebarOpen } = useSidebar()\r\n \r\n const menuItems = [\r\n { id: 'home', label: 'Inicio' },\r\n { id: 'about', label: 'Acerca' },\r\n { id: 'contact', label: 'Contacto' },\r\n ]\r\n \r\n return (\r\n <>\r\n {isMobile && (\r\n <button\r\n onClick={() => setSidebarOpen(true)}\r\n 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\"\r\n >\r\n <svg className=\"w-6 h-6\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 6h16M4 12h16M4 18h16\" />\r\n </svg>\r\n </button>\r\n )}\r\n\r\n <aside className={`bg-gray-900 border-r border-gray-800 ${isMobile ? 'hidden' : 'w-64 flex-shrink-0'} ${isTablet ? 'w-56' : 'w-64'}`}>\r\n <div className=\"p-6 flex flex-col h-full\">\r\n <div className=\"flex items-center space-x-3 mb-8\">\r\n <div className=\"w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center\">\r\n <span className=\"text-white font-bold text-sm\">LO</span>\r\n </div>\r\n <span className=\"text-white font-bold text-lg\">Tu Aplicación</span>\r\n </div>\r\n \r\n <nav className=\"space-y-2\">\r\n {menuItems.map((item) => (\r\n <button\r\n key={item.id}\r\n 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\"\r\n >\r\n <span className=\"font-medium\">{item.label}</span>\r\n </button>\r\n ))}\r\n </nav>\r\n </div>\r\n </aside>\r\n\r\n {isMobile && sidebarOpen && (\r\n <div className=\"fixed inset-0 z-40 bg-black/50\" onClick={() => setSidebarOpen(false)}>\r\n <div className=\"fixed top-0 left-0 w-64 h-full bg-gray-900 border-r border-gray-800\">\r\n <div className=\"p-6 flex flex-col h-full pt-20\">\r\n <div className=\"flex items-center space-x-3 mb-8\">\r\n <div className=\"w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center\">\r\n <span className=\"text-white font-bold text-sm\">LO</span>\r\n </div>\r\n <span className=\"text-white font-bold text-lg\">Tu Aplicación</span>\r\n </div>\r\n \r\n <nav className=\"space-y-2\">\r\n {menuItems.map((item) => (\r\n <button\r\n key={item.id}\r\n onClick={() => setSidebarOpen(false)}\r\n 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\"\r\n >\r\n <span className=\"font-medium\">{item.label}</span>\r\n </button>\r\n ))}\r\n </nav>\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </>\r\n )\r\n}\r\n\r\nexport default Sidebar\r\n","const Footer = () => {\r\n return (\r\n <footer className=\"bg-gray-900 border-t border-gray-800\">\r\n <div className=\"px-4 py-6\">\r\n <div className=\"max-w-7xl mx-auto text-center\">\r\n <p className=\"text-gray-400 text-sm\">\r\n © {new Date().getFullYear()} Tu Aplicación. Todos los derechos reservados.\r\n </p>\r\n </div>\r\n </div>\r\n </footer>\r\n )\r\n}\r\n\r\nexport default Footer\r\n","import { useResponsiveLayout } from '../../hooks'\r\n\r\nconst Navigation = () => {\r\n const { isMobile } = useResponsiveLayout()\r\n \r\n return (\r\n <nav className=\"sticky top-0 z-50 bg-gray-900 border-b border-gray-800\">\r\n <div className=\"px-4 py-4\">\r\n <div className=\"flex items-center justify-between\">\r\n <div className=\"flex items-center space-x-3\">\r\n <div className=\"w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center\">\r\n <span className=\"text-white font-bold text-sm\">LO</span>\r\n </div>\r\n <h1 className=\"text-white font-semibold text-lg\">Tu Aplicación</h1>\r\n </div>\r\n \r\n {isMobile && (\r\n <button className=\"p-2 text-gray-400 hover:text-white\">\r\n <svg className=\"w-6 h-6\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 6h16M4 12h16M4 18h16\" />\r\n </svg>\r\n </button>\r\n )}\r\n </div>\r\n </div>\r\n </nav>\r\n )\r\n}\r\n\r\nexport default Navigation\r\n","import React from 'react'\r\nimport { Navigation, Footer } from '../components/layout'\r\n\r\ninterface DefaultLayoutProps {\r\n children: React.ReactNode\r\n}\r\n\r\nconst DefaultLayout: React.FC<DefaultLayoutProps> = ({ children }) => {\r\n return (\r\n <div className=\"min-h-screen bg-gray-50 flex flex-col\">\r\n {/* Navigation fijo arriba */}\r\n <Navigation />\r\n \r\n {/* Main content */}\r\n <main className=\"flex-1\">\r\n {children}\r\n </main>\r\n \r\n {/* Footer fijo abajo */}\r\n <Footer />\r\n </div>\r\n )\r\n}\r\n\r\nexport default DefaultLayout\r\n","import React from 'react'\r\nimport { Sidebar } from '../components/layout'\r\nimport { SidebarProvider } from '../context'\r\n\r\ninterface SidebarLayoutProps {\r\n children: React.ReactNode\r\n}\r\n\r\nconst SidebarLayoutContent: React.FC<{ children: React.ReactNode }> = ({ children }) => {\r\n return (\r\n <div className=\"min-h-screen bg-gray-50 flex\">\r\n {/* Sidebar */}\r\n <Sidebar />\r\n \r\n {/* Main content */}\r\n <main className=\"flex-1 overflow-auto\">\r\n {children}\r\n </main>\r\n </div>\r\n )\r\n}\r\n\r\nconst SidebarLayout: React.FC<SidebarLayoutProps> = ({ children }) => {\r\n return (\r\n <SidebarProvider>\r\n <SidebarLayoutContent>{children}</SidebarLayoutContent>\r\n </SidebarProvider>\r\n )\r\n}\r\n\r\nexport default SidebarLayout\r\n","import React from 'react'\r\nimport { Sidebar, Footer } from '../components/layout'\r\nimport { SidebarProvider } from '../context'\r\n\r\ninterface DashboardLayoutProps {\r\n children: React.ReactNode\r\n}\r\n\r\nconst DashboardLayoutContent: React.FC<{ children: React.ReactNode }> = ({ children }) => {\r\n return (\r\n <div className=\"min-h-screen bg-gray-50 flex flex-col\">\r\n {/* Content area con sidebar */}\r\n <div className=\"flex flex-1\">\r\n {/* Sidebar */}\r\n <Sidebar />\r\n \r\n {/* Main content */}\r\n <main className=\"flex-1 overflow-auto flex flex-col\">\r\n <div className=\"flex-1\">\r\n {children}\r\n </div>\r\n \r\n {/* Footer */}\r\n <Footer />\r\n </main>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nconst DashboardLayout: React.FC<DashboardLayoutProps> = ({ children }) => {\r\n return (\r\n <SidebarProvider>\r\n <DashboardLayoutContent>{children}</DashboardLayoutContent>\r\n </SidebarProvider>\r\n )\r\n}\r\n\r\nexport default DashboardLayout\r\n","import React from 'react'\r\n\r\ninterface MinimalLayoutProps {\r\n children: React.ReactNode\r\n}\r\n\r\nconst MinimalLayout: React.FC<MinimalLayoutProps> = ({ children }) => {\r\n return (\r\n <div className=\"min-h-screen bg-gray-50\">\r\n <main>\r\n {children}\r\n </main>\r\n </div>\r\n )\r\n}\r\n\r\nexport default MinimalLayout\r\n","import { useLayout } from '../hooks'\r\nimport { LAYOUT_CONFIG } from '../config/layout'\r\n\r\ninterface LayoutSwitcherProps {\r\n compact?: boolean\r\n}\r\n\r\nconst LayoutSwitcher = ({ compact = false }: LayoutSwitcherProps) => {\r\n const { current, setLayout, config } = useLayout()\r\n \r\n if (compact) {\r\n return (\r\n <div className=\"bg-black/50 rounded-lg p-3 border border-gray-700\">\r\n <div className=\"text-xs text-gray-500 mb-2\">Layout:</div>\r\n <select\r\n value={current}\r\n onChange={(e) => setLayout(e.target.value)}\r\n 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\"\r\n >\r\n {Object.entries(LAYOUT_CONFIG).map(([key, layoutConfig]) => (\r\n <option key={key} value={key}>\r\n {layoutConfig.name}\r\n </option>\r\n ))}\r\n </select>\r\n </div>\r\n )\r\n }\r\n \r\n return (\r\n <div className=\"bg-black/50 backdrop-blur-sm rounded-lg p-4 border border-cyan-500/30\">\r\n <h3 className=\"text-white font-semibold mb-3\">Cambiar Layout</h3>\r\n \r\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3\">\r\n {Object.entries(LAYOUT_CONFIG).map(([key, layoutConfig]) => (\r\n <button\r\n key={key}\r\n onClick={() => setLayout(key)}\r\n className={`\r\n p-4 rounded-lg border transition-all text-left\r\n ${current === key \r\n ? 'border-cyan-500 bg-cyan-500/10 text-cyan-400' \r\n : 'border-gray-700 bg-black/30 text-gray-300 hover:border-gray-600'\r\n }\r\n `}\r\n >\r\n <div className=\"font-semibold mb-1\">{layoutConfig.name}</div>\r\n <div className=\"text-xs opacity-75\">{layoutConfig.description}</div>\r\n </button>\r\n ))}\r\n </div>\r\n \r\n <div className=\"mt-4 p-3 bg-gray-900/50 rounded-lg\">\r\n <div className=\"text-xs text-gray-500 mb-1\">Layout Actual:</div>\r\n <div className=\"text-sm text-cyan-400 font-medium\">{config.name}</div>\r\n <div className=\"text-xs text-gray-400\">{config.description}</div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default LayoutSwitcher\r\n"],"names":["ResponsiveProvider","children","_debug","DEFAULT_BREAKPOINTS","getCurrentBreakpoint","width","getBreakpointIndex","breakpoint","getBreakpointValue","debounce","func","wait","timeout","args","getOrientation","height","useResponsive","dimensions","setDimensions","useState","updateDimensions","useCallback","debouncedUpdateDimensions","useMemo","useEffect","orientation","isXs","isSm","isMd","isLg","isXl","is2Xl","is3Xl","is4Xl","is5Xl","isMobile","isTablet","isDesktop","isSmall","isLarge","isUltraWide","is4K","is5K","isPortrait","isLandscape","isBreakpointUp","bp","isBreakpointDown","isBreakpointBetween","min","max","current","isWidthUp","minWidth","isWidthDown","maxWidth","isWidthBetween","isHeightUp","minHeight","isHeightDown","maxHeight","isHeightBetween","ResponsiveLayoutContext","createContext","useResponsiveLayoutContext","context","useContext","SidebarContext","SidebarProvider","sidebarOpen","setSidebarOpen","jsx","useSidebar","NavigationContext","useNavigation","NavigationProvider","defaultPage","currentPage","setCurrentPage","useResponsiveLayout","breakpoints","classes","cols","useLayout","responsiveLayout","LAYOUT_CONFIG","DEFAULT_LAYOUT","AVAILABLE_LAYOUTS","ResponsiveLayoutProviderInner","defaultLayout","useResponsiveHook","internalResponsive","responsive","currentLayout","setCurrentLayout","layoutConfig","contextValue","baseClass","ResponsiveLayoutProvider","MainLayout","layoutProp","layout","LayoutComponent","DefaultLayout","SidebarLayout","DashboardLayout","MinimalLayout","Header","menuItems","jsxs","page","item","Sidebar","Fragment","Footer","Navigation","SidebarLayoutContent","DashboardLayoutContent","LayoutSwitcher","compact","setLayout","config","e","key"],"mappings":"wIAUaA,EAAwD,CAAC,CACpE,SAAAC,EACA,MAAOC,EAAS,EAClB,sBAG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