responsive-system 1.4.8 → 1.4.9

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,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),P=({children:s,debug:t=!1})=>e.jsx(e.Fragment,{children:s}),u={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536,"3xl":1920,"4xl":2560,"5xl":3840},R=s=>s>=u["5xl"]?"5xl":s>=u["4xl"]?"4xl":s>=u["3xl"]?"3xl":s>=u["2xl"]?"2xl":s>=u.xl?"xl":s>=u.lg?"lg":s>=u.md?"md":s>=u.sm?"sm":"xs",m=s=>["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl"].indexOf(s),de=s=>u[s];function ue(s,t){let a=null;return(...l)=>{a&&clearTimeout(a),a=setTimeout(()=>s(...l),t)}}function xe(s,t){return s>=t?"landscape":"portrait"}const T=()=>{const[s,t]=i.useState({width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768}),a=i.useCallback(()=>{t({width:window.innerWidth,height:window.innerHeight})},[]),l=i.useMemo(()=>ue(a,100),[a]);i.useEffect(()=>{if(!(typeof window>"u"))return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[l]);const{width:n,height:r}=s,o=i.useMemo(()=>R(n),[n]),d=i.useMemo(()=>xe(n,r),[n,r]),p=o==="xs",b=o==="sm",w=o==="md",f=o==="lg",x=o==="xl",k=o==="2xl",L=o==="3xl",v=o==="4xl",g=o==="5xl",Y=p||b,V=w,X=f||x||k||L||v||g,K=p||b||w,q=f||x||k||L||v||g,G=L||v||g,J=v||g,Q=g,Z=d==="portrait",ee=d==="landscape",se=i.useCallback(c=>m(o)>=m(c),[o]),te=i.useCallback(c=>m(o)<=m(c),[o]),ne=i.useCallback((c,j)=>{const A=m(o);return A>=m(c)&&A<=m(j)},[o]),re=i.useCallback(c=>n>=c,[n]),ae=i.useCallback(c=>n<=c,[n]),oe=i.useCallback((c,j)=>n>=c&&n<=j,[n]),ie=i.useCallback(c=>r>=c,[r]),le=i.useCallback(c=>r<=c,[r]),ce=i.useCallback((c,j)=>r>=c&&r<=j,[r]);return{breakpoint:o,width:n,height:r,orientation:d,isXs:p,isSm:b,isMd:w,isLg:f,isXl:x,is2Xl:k,is3Xl:L,is4Xl:v,is5Xl:g,isMobile:Y,isTablet:V,isDesktop:X,isSmall:K,isLarge:q,isUltraWide:G,is4K:J,is5K:Q,isPortrait:Z,isLandscape:ee,isBreakpointUp:se,isBreakpointDown:te,isBreakpointBetween:ne,isWidthUp:re,isWidthDown:ae,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},E=i.createContext(void 0),S=({children:s})=>{const[t,a]=i.useState(!1);return e.jsx(E.Provider,{value:{sidebarOpen:t,setSidebarOpen:a},children:s})},M=()=>{const s=i.useContext(E);if(!s)throw new Error("useSidebar must be used within a SidebarProvider");return s},F=i.createContext({currentPage:"test",setCurrentPage:()=>{}}),I=()=>i.useContext(F),be=({children:s,defaultPage:t="test"})=>{const[a,l]=i.useState(t);return e.jsx(F.Provider,{value:{currentPage:a,setCurrentPage:l},children:s})},y=()=>{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:(t="md")=>`grid-cols-auto-${t}`,responsive:t=>{const a=[];return Object.entries(t).forEach(([l,n])=>{l==="base"?a.push(`grid-cols-${n}`):a.push(`${l}:grid-cols-${n}`)}),a.join(" ")},fixed:t=>`grid-cols-${t}`},spacing:{container:s.layoutUtils.getContainerClass(),section:"mb-6",card:"p-6",gap:"gap-4"}}},H=()=>{const s=y();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"}}},N="default",me=Object.keys(h),he=({children:s,defaultLayout:t,useResponsiveHook:a})=>{const l=T(),r=a?.()||l,o=t&&h[t]?t:N,[d,p]=i.useState(o);i.useEffect(()=>{const x=t&&h[t]?t:N;x!==d&&p(x)},[t,d]);const b=h[d]||h[N],f={responsive:r,layout:{current:d,config:b,setLayout:p},layoutUtils:{getContainerClass:()=>r.isMobile?b.responsive.mobile:r.isTablet?b.responsive.tablet:b.responsive.desktop,getMainClass:()=>{const x="min-h-screen bg-black";return d==="sidebar"||d==="dashboard"?`${x} flex`:x},hasSidebar:()=>d==="sidebar"||d==="dashboard",hasHeader:()=>d==="dashboard",hasFooter:()=>d==="default"||d==="dashboard",hasNavigation:()=>d==="default"}};return e.jsx(U.Provider,{value:f,children:s})},pe=({children:s,defaultLayout:t=N,useResponsiveHook:a})=>e.jsx(P,{children:e.jsx(he,{defaultLayout:t,useResponsiveHook:a,children:s})}),ge=({children:s,layout:t})=>{const{layout:a}=y(),l=t||a.current,r={default:C,sidebar:W,dashboard:_,minimal:z}[l]||C;return e.jsx(r,{children:s})},ye=()=>{const{isMobile:s}=y(),{currentPage:t,setCurrentPage:a}=I(),{sidebarOpen:l,setSidebarOpen:n}=M(),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(o=>e.jsx("button",{onClick:()=>a(o.id),className:`px-3 py-1.5 rounded-lg transition-all font-bold text-xs tracking-wide border ${t===o.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:o.label},o.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(o=>e.jsx("button",{onClick:()=>{a(o.id),n(!1)},className:`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${t===o.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:o.label})},o.id))})]})})})]})},D=()=>{const{isMobile:s,isTablet:t}=y(),{sidebarOpen:a,setSidebarOpen:l}=M(),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"} ${t?"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&&a&&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}=y();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"})})})]})})})},C=({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(S,{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(S,{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:t,setLayout:a,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:t,onChange:n=>a(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:()=>a(n),className:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),P=({children:s,debug:t=!1})=>e.jsx(e.Fragment,{children:s}),u={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536,"3xl":1920,"4xl":2560,"5xl":3840},R=s=>s>=u["5xl"]?"5xl":s>=u["4xl"]?"4xl":s>=u["3xl"]?"3xl":s>=u["2xl"]?"2xl":s>=u.xl?"xl":s>=u.lg?"lg":s>=u.md?"md":s>=u.sm?"sm":"xs",m=s=>["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl"].indexOf(s),de=s=>u[s];function ue(s,t){let o=null;return(...i)=>{o&&clearTimeout(o),o=setTimeout(()=>s(...i),t)}}function xe(s,t){return s>=t?"landscape":"portrait"}const T=()=>{const[s,t]=l.useState({width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768}),o=l.useCallback(()=>{t({width:window.innerWidth,height:window.innerHeight})},[]),i=l.useMemo(()=>ue(o,100),[o]);l.useEffect(()=>{if(!(typeof window>"u"))return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[i]);const{width:n,height:a}=s,r=l.useMemo(()=>R(n),[n]),d=l.useMemo(()=>xe(n,a),[n,a]),p=r==="xs",b=r==="sm",L=r==="md",f=r==="lg",x=r==="xl",k=r==="2xl",w=r==="3xl",v=r==="4xl",g=r==="5xl",Y=p||b,V=L,X=f||x||k||w||v||g,K=p||b||L,q=f||x||k||w||v||g,G=w||v||g,J=v||g,Q=g,Z=d==="portrait",ee=d==="landscape",se=l.useCallback(c=>m(r)>=m(c),[r]),te=l.useCallback(c=>m(r)<=m(c),[r]),ne=l.useCallback((c,j)=>{const A=m(r);return A>=m(c)&&A<=m(j)},[r]),ae=l.useCallback(c=>n>=c,[n]),re=l.useCallback(c=>n<=c,[n]),oe=l.useCallback((c,j)=>n>=c&&n<=j,[n]),ie=l.useCallback(c=>a>=c,[a]),le=l.useCallback(c=>a<=c,[a]),ce=l.useCallback((c,j)=>a>=c&&a<=j,[a]);return{breakpoint:r,width:n,height:a,orientation:d,isXs:p,isSm:b,isMd:L,isLg:f,isXl:x,is2Xl:k,is3Xl:w,is4Xl:v,is5Xl:g,isMobile:Y,isTablet:V,isDesktop:X,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=l.createContext(void 0),B=()=>{const s=l.useContext(U);if(!s)throw new Error("useResponsiveLayoutContext must be used within a ResponsiveLayoutProvider");return s},E=l.createContext(void 0),S=({children:s})=>{const[t,o]=l.useState(!1);return e.jsx(E.Provider,{value:{sidebarOpen:t,setSidebarOpen:o},children:s})},M=()=>{const s=l.useContext(E);if(!s)throw new Error("useSidebar must be used within a SidebarProvider");return s},F=l.createContext({currentPage:"test",setCurrentPage:()=>{}}),I=()=>l.useContext(F),be=({children:s,defaultPage:t="test"})=>{const[o,i]=l.useState(t);return e.jsx(F.Provider,{value:{currentPage:o,setCurrentPage:i},children:s})},y=()=>{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:(t="md")=>`grid-cols-auto-${t}`,responsive:t=>{const o=[];return Object.entries(t).forEach(([i,n])=>{i==="base"?o.push(`grid-cols-${n}`):o.push(`${i}:grid-cols-${n}`)}),o.join(" ")},fixed:t=>`grid-cols-${t}`},spacing:{container:s.layoutUtils.getContainerClass(),section:"mb-6",card:"p-6",gap:"gap-4"}}},H=()=>{const s=y();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"}}},N="default",me=Object.keys(h),he=({children:s,defaultLayout:t,useResponsiveHook:o})=>{const i=T(),a=o?.()||i,r=t&&h[t]?t:N,[d,p]=l.useState(r);l.useEffect(()=>{const x=t&&h[t]?t:N;x!==d&&p(x)},[t,d]);const b=h[d]||h[N],f={responsive:a,layout:{current:d,config:b,setLayout:p},layoutUtils:{getContainerClass:()=>a.isMobile?b.responsive.mobile:a.isTablet?b.responsive.tablet:b.responsive.desktop,getMainClass:()=>{const x="min-h-screen bg-black";return d==="sidebar"||d==="dashboard"?`${x} flex`:x},hasSidebar:()=>d==="sidebar"||d==="dashboard",hasHeader:()=>d==="dashboard",hasFooter:()=>d==="default"||d==="dashboard",hasNavigation:()=>d==="default"}};return e.jsx(U.Provider,{value:f,children:s})},pe=({children:s,defaultLayout:t=N,useResponsiveHook:o})=>e.jsx(P,{children:e.jsx(he,{defaultLayout:t,useResponsiveHook:o,children:s})}),ge=({children:s,layout:t})=>{const{layout:o}=y(),i=t||o.current,n={default:C,sidebar:W,dashboard:_,minimal:z},a=i&&n[i]?i:"default",r=n[a]||C;return e.jsx(r,{children:s})},ye=()=>{const{isMobile:s}=y(),{currentPage:t,setCurrentPage:o}=I(),{sidebarOpen:i,setSidebarOpen:n}=M(),a=[{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&&a.map(r=>e.jsx("button",{onClick:()=>o(r.id),className:`px-3 py-1.5 rounded-lg transition-all font-bold text-xs tracking-wide border ${t===r.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:r.label},r.id))})]})})})}),s&&i&&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:a.map(r=>e.jsx("button",{onClick:()=>{o(r.id),n(!1)},className:`w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${t===r.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:r.label})},r.id))})]})})})]})},D=()=>{const{isMobile:s,isTablet:t}=y(),{sidebarOpen:o,setSidebarOpen:i}=M(),n=[{id:"home",label:"Inicio"},{id:"about",label:"Acerca"},{id:"contact",label:"Contacto"}];return e.jsxs(e.Fragment,{children:[s&&e.jsx("button",{onClick:()=>i(!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"} ${t?"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(a=>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:a.label})},a.id))})]})}),s&&o&&e.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:()=>i(!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(a=>e.jsx("button",{onClick:()=>i(!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:a.label})},a.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}=y();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"})})})]})})})},C=({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(S,{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(S,{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:t,setLayout:o,config:i}=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:t,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,a])=>e.jsx("option",{value:n,children:a.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,a])=>e.jsxs("button",{onClick:()=>o(n),className:`
2
2
  p-4 rounded-lg border transition-all text-left
3
3
  ${t===n?"border-cyan-500 bg-cyan-500/10 text-cyan-400":"border-gray-700 bg-black/30 text-gray-300 hover:border-gray-600"}
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=u;exports.DEFAULT_LAYOUT=N;exports.DashboardLayout=_;exports.DefaultLayout=C;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=S;exports.getBreakpointIndex=m;exports.getBreakpointValue=de;exports.getCurrentBreakpoint=R;exports.useLayout=H;exports.useNavigation=I;exports.useResponsive=T;exports.useResponsiveLayout=y;exports.useResponsiveLayoutContext=B;exports.useSidebar=M;
4
+ `,children:[e.jsx("div",{className:"font-semibold mb-1",children:a.name}),e.jsx("div",{className:"text-xs opacity-75",children:a.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:i.name}),e.jsx("div",{className:"text-xs text-gray-400",children:i.description})]})]})};exports.AVAILABLE_LAYOUTS=me;exports.DEFAULT_BREAKPOINTS=u;exports.DEFAULT_LAYOUT=N;exports.DashboardLayout=_;exports.DefaultLayout=C;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=S;exports.getBreakpointIndex=m;exports.getBreakpointValue=de;exports.getCurrentBreakpoint=R;exports.useLayout=H;exports.useNavigation=I;exports.useResponsive=T;exports.useResponsiveLayout=y;exports.useResponsiveLayoutContext=B;exports.useSidebar=M;
5
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, useEffect } 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 // Inicializar el estado con el defaultLayout, asegurando que sea válido\r\n const validLayout = (defaultLayout && LAYOUT_CONFIG[defaultLayout]) ? defaultLayout : DEFAULT_LAYOUT\r\n const [currentLayout, setCurrentLayout] = useState(validLayout)\r\n \r\n // Sincronizar si el defaultLayout cambia (aunque no debería en la mayoría de casos)\r\n useEffect(() => {\r\n const newValidLayout = (defaultLayout && LAYOUT_CONFIG[defaultLayout]) ? defaultLayout : DEFAULT_LAYOUT\r\n if (newValidLayout !== currentLayout) {\r\n setCurrentLayout(newValidLayout)\r\n }\r\n }, [defaultLayout, currentLayout])\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","validLayout","currentLayout","setCurrentLayout","newValidLayout","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,sBAGY,SAAAD,EAAS,ECVRE,EAAkD,CAC7D,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,KACJ,GAAI,KACJ,MAAO,KACP,MAAO,KACP,MAAO,KACP,MAAO,IACT,EAKaC,EAAwBC,GAC/BA,GAASF,EAAoB,KAAK,EAAU,MAC5CE,GAASF,EAAoB,KAAK,EAAU,MAC5CE,GAASF,EAAoB,KAAK,EAAU,MAC5CE,GAASF,EAAoB,KAAK,EAAU,MAC5CE,GAASF,EAAoB,GAAW,KACxCE,GAASF,EAAoB,GAAW,KACxCE,GAASF,EAAoB,GAAW,KACxCE,GAASF,EAAoB,GAAW,KACrC,KAMIG,EAAsBC,GACC,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,MAAO,MAAO,MAAO,KAAK,EACxE,QAAQA,CAAU,EAM1BC,GAAsBD,GAC1BJ,EAAoBI,CAAU,EChCvC,SAASE,GACPC,EACAC,EACkC,CAClC,IAAIC,EAAgD,KACpD,MAAO,IAAIC,IAAwB,CAC7BD,gBAAsBA,CAAO,EACjCA,EAAU,WAAW,IAAMF,EAAK,GAAGG,CAAI,EAAGF,CAAI,CAChD,CACF,CAKA,SAASG,GAAeT,EAAeU,EAA0C,CAC/E,OAAOV,GAASU,EAAS,YAAc,UACzC,CAMO,MAAMC,EAAgB,IAAuB,CAClD,KAAM,CAACC,EAAYC,CAAa,EAAIC,WAAS,CAC3C,MAAO,OAAO,OAAW,IAAc,OAAO,WAAa,KAC3D,OAAQ,OAAO,OAAW,IAAc,OAAO,YAAc,GAAA,CAC9D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AAA,CAAA,EAXzDsD,CAAA,CAaR,EACH,EAEAd,EAAAA,KAAC,MAAA,CAAI,UAAU,qCACb,SAAA,CAAAxC,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, useEffect } 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 // Inicializar el estado con el defaultLayout, asegurando que sea válido\r\n const validLayout = (defaultLayout && LAYOUT_CONFIG[defaultLayout]) ? defaultLayout : DEFAULT_LAYOUT\r\n const [currentLayout, setCurrentLayout] = useState(validLayout)\r\n \r\n // Sincronizar si el defaultLayout cambia (aunque no debería en la mayoría de casos)\r\n useEffect(() => {\r\n const newValidLayout = (defaultLayout && LAYOUT_CONFIG[defaultLayout]) ? defaultLayout : DEFAULT_LAYOUT\r\n if (newValidLayout !== currentLayout) {\r\n setCurrentLayout(newValidLayout)\r\n }\r\n }, [defaultLayout, currentLayout])\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 // Validar que el layout sea válido, si no, usar default\r\n const validLayout = (currentLayout && layouts[currentLayout as keyof typeof layouts]) \r\n ? currentLayout \r\n : 'default'\r\n \r\n const LayoutComponent = layouts[validLayout 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","validLayout","currentLayout","setCurrentLayout","newValidLayout","layoutConfig","contextValue","baseClass","ResponsiveLayoutProvider","MainLayout","layoutProp","layout","layouts","DefaultLayout","SidebarLayout","DashboardLayout","MinimalLayout","LayoutComponent","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,sBAGY,SAAAD,EAAS,ECVRE,EAAkD,CAC7D,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,KACJ,GAAI,KACJ,MAAO,KACP,MAAO,KACP,MAAO,KACP,MAAO,IACT,EAKaC,EAAwBC,GAC/BA,GAASF,EAAoB,KAAK,EAAU,MAC5CE,GAASF,EAAoB,KAAK,EAAU,MAC5CE,GAASF,EAAoB,KAAK,EAAU,MAC5CE,GAASF,EAAoB,KAAK,EAAU,MAC5CE,GAASF,EAAoB,GAAW,KACxCE,GAASF,EAAoB,GAAW,KACxCE,GAASF,EAAoB,GAAW,KACxCE,GAASF,EAAoB,GAAW,KACrC,KAMIG,EAAsBC,GACC,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,MAAO,MAAO,MAAO,KAAK,EACxE,QAAQA,CAAU,EAM1BC,GAAsBD,GAC1BJ,EAAoBI,CAAU,EChCvC,SAASE,GACPC,EACAC,EACkC,CAClC,IAAIC,EAAgD,KACpD,MAAO,IAAIC,IAAwB,CAC7BD,gBAAsBA,CAAO,EACjCA,EAAU,WAAW,IAAMF,EAAK,GAAGG,CAAI,EAAGF,CAAI,CAChD,CACF,CAKA,SAASG,GAAeT,EAAeU,EAA0C,CAC/E,OAAOV,GAASU,EAAS,YAAc,UACzC,CAMO,MAAMC,EAAgB,IAAuB,CAClD,KAAM,CAACC,EAAYC,CAAa,EAAIC,WAAS,CAC3C,MAAO,OAAO,OAAW,IAAc,OAAO,WAAa,KAC3D,OAAQ,OAAO,OAAW,IAAc,OAAO,YAAc,GAAA,CAC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K,EACvD1B,EAAAA,IAAC,MAAA,CAAI,UAAU,qBAAsB,WAAa,WAAA,CAAY,CAAA,CAAA,EAXzDuD,CAAA,CAaR,EACH,EAEAd,EAAAA,KAAC,MAAA,CAAI,UAAU,qCACb,SAAA,CAAAzC,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"}
@@ -15,9 +15,9 @@ const oe = ({
15
15
  "5xl": 3840
16
16
  }, le = (e) => e >= b["5xl"] ? "5xl" : e >= b["4xl"] ? "4xl" : e >= b["3xl"] ? "3xl" : e >= b["2xl"] ? "2xl" : e >= b.xl ? "xl" : e >= b.lg ? "lg" : e >= b.md ? "md" : e >= b.sm ? "sm" : "xs", p = (e) => ["xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl"].indexOf(e), Ce = (e) => b[e];
17
17
  function ce(e, n) {
18
- let a = null;
18
+ let i = null;
19
19
  return (...o) => {
20
- a && clearTimeout(a), a = setTimeout(() => e(...o), n);
20
+ i && clearTimeout(i), i = setTimeout(() => e(...o), n);
21
21
  };
22
22
  }
23
23
  function de(e, n) {
@@ -27,14 +27,14 @@ const ue = () => {
27
27
  const [e, n] = S({
28
28
  width: typeof window < "u" ? window.innerWidth : 1024,
29
29
  height: typeof window < "u" ? window.innerHeight : 768
30
- }), a = u(() => {
30
+ }), i = u(() => {
31
31
  n({
32
32
  width: window.innerWidth,
33
33
  height: window.innerHeight
34
34
  });
35
35
  }, []), o = M(
36
- () => ce(a, 100),
37
- [a]
36
+ () => ce(i, 100),
37
+ [i]
38
38
  );
39
39
  T(() => {
40
40
  if (!(typeof window > "u"))
@@ -42,13 +42,13 @@ const ue = () => {
42
42
  window.removeEventListener("resize", o);
43
43
  };
44
44
  }, [o]);
45
- const { width: s, height: r } = e, i = M(() => le(s), [s]), d = M(() => de(s, r), [s, r]), x = i === "xs", h = i === "sm", L = i === "md", f = i === "lg", m = i === "xl", D = i === "2xl", k = i === "3xl", v = i === "4xl", y = i === "5xl", z = x || h, I = L, X = f || m || D || k || v || y, _ = x || h || L, V = f || m || D || k || v || y, Y = k || v || y, K = v || y, q = y, G = d === "portrait", J = d === "landscape", Q = u((c) => p(i) >= p(c), [i]), Z = u((c) => p(i) <= p(c), [i]), ee = u((c, N) => {
46
- const j = p(i);
45
+ const { width: s, height: r } = e, a = M(() => le(s), [s]), d = M(() => de(s, r), [s, r]), x = a === "xs", h = a === "sm", L = a === "md", y = a === "lg", m = a === "xl", D = a === "2xl", k = a === "3xl", v = a === "4xl", f = a === "5xl", z = x || h, I = L, X = y || m || D || k || v || f, _ = x || h || L, V = y || m || D || k || v || f, Y = k || v || f, K = v || f, q = f, G = d === "portrait", J = d === "landscape", Q = u((c) => p(a) >= p(c), [a]), Z = u((c) => p(a) <= p(c), [a]), ee = u((c, N) => {
46
+ const j = p(a);
47
47
  return j >= p(c) && j <= p(N);
48
- }, [i]), te = u((c) => s >= c, [s]), ne = u((c) => s <= c, [s]), se = u((c, N) => s >= c && s <= N, [s]), re = u((c) => r >= c, [r]), ae = u((c) => r <= c, [r]), ie = u((c, N) => r >= c && r <= N, [r]);
48
+ }, [a]), te = u((c) => s >= c, [s]), ne = u((c) => s <= c, [s]), se = u((c, N) => s >= c && s <= N, [s]), re = u((c) => r >= c, [r]), ae = u((c) => r <= c, [r]), ie = u((c, N) => r >= c && r <= N, [r]);
49
49
  return {
50
50
  // Estado básico
51
- breakpoint: i,
51
+ breakpoint: a,
52
52
  width: s,
53
53
  height: r,
54
54
  orientation: d,
@@ -56,12 +56,12 @@ const ue = () => {
56
56
  isXs: x,
57
57
  isSm: h,
58
58
  isMd: L,
59
- isLg: f,
59
+ isLg: y,
60
60
  isXl: m,
61
61
  is2Xl: D,
62
62
  is3Xl: k,
63
63
  is4Xl: v,
64
- is5Xl: y,
64
+ is5Xl: f,
65
65
  // Helpers booleanos agrupados
66
66
  isMobile: z,
67
67
  isTablet: I,
@@ -93,8 +93,8 @@ const ue = () => {
93
93
  throw new Error("useResponsiveLayoutContext must be used within a ResponsiveLayoutProvider");
94
94
  return e;
95
95
  }, B = O(void 0), $ = ({ children: e }) => {
96
- const [n, a] = S(!1);
97
- return /* @__PURE__ */ t(B.Provider, { value: { sidebarOpen: n, setSidebarOpen: a }, children: e });
96
+ const [n, i] = S(!1);
97
+ return /* @__PURE__ */ t(B.Provider, { value: { sidebarOpen: n, setSidebarOpen: i }, children: e });
98
98
  }, E = () => {
99
99
  const e = P(B);
100
100
  if (!e)
@@ -108,8 +108,8 @@ const ue = () => {
108
108
  children: e,
109
109
  defaultPage: n = "test"
110
110
  }) => {
111
- const [a, o] = S(n);
112
- return /* @__PURE__ */ t(F.Provider, { value: { currentPage: a, setCurrentPage: o }, children: e });
111
+ const [i, o] = S(n);
112
+ return /* @__PURE__ */ t(F.Provider, { value: { currentPage: i, setCurrentPage: o }, children: e });
113
113
  }, w = () => {
114
114
  const e = me();
115
115
  return {
@@ -132,10 +132,10 @@ const ue = () => {
132
132
  grid: {
133
133
  auto: (n = "md") => `grid-cols-auto-${n}`,
134
134
  responsive: (n) => {
135
- const a = [];
135
+ const i = [];
136
136
  return Object.entries(n).forEach(([o, s]) => {
137
- o === "base" ? a.push(`grid-cols-${s}`) : a.push(`${o}:grid-cols-${s}`);
138
- }), a.join(" ");
137
+ o === "base" ? i.push(`grid-cols-${s}`) : i.push(`${o}:grid-cols-${s}`);
138
+ }), i.join(" ");
139
139
  },
140
140
  fixed: (n) => `grid-cols-${n}`
141
141
  },
@@ -214,14 +214,14 @@ const ue = () => {
214
214
  }, C = "default", De = Object.keys(g), pe = ({
215
215
  children: e,
216
216
  defaultLayout: n,
217
- useResponsiveHook: a
217
+ useResponsiveHook: i
218
218
  }) => {
219
- const o = ue(), r = a?.() || o, i = n && g[n] ? n : C, [d, x] = S(i);
219
+ const o = ue(), r = i?.() || o, a = n && g[n] ? n : C, [d, x] = S(a);
220
220
  T(() => {
221
221
  const m = n && g[n] ? n : C;
222
222
  m !== d && x(m);
223
223
  }, [n, d]);
224
- const h = g[d] || g[C], f = {
224
+ const h = g[d] || g[C], y = {
225
225
  responsive: r,
226
226
  layout: {
227
227
  current: d,
@@ -240,28 +240,28 @@ const ue = () => {
240
240
  hasNavigation: () => d === "default"
241
241
  }
242
242
  };
243
- return /* @__PURE__ */ t(U.Provider, { value: f, children: e });
243
+ return /* @__PURE__ */ t(U.Provider, { value: y, children: e });
244
244
  }, Me = ({
245
245
  children: e,
246
246
  defaultLayout: n = C,
247
- useResponsiveHook: a
247
+ useResponsiveHook: i
248
248
  }) => /* @__PURE__ */ t(oe, { children: /* @__PURE__ */ t(
249
249
  pe,
250
250
  {
251
251
  defaultLayout: n,
252
- useResponsiveHook: a,
252
+ useResponsiveHook: i,
253
253
  children: e
254
254
  }
255
255
  ) }), Oe = ({ children: e, layout: n }) => {
256
- const { layout: a } = w(), o = n || a.current, r = {
256
+ const { layout: i } = w(), o = n || i.current, s = {
257
257
  default: A,
258
- sidebar: ye,
258
+ sidebar: fe,
259
259
  dashboard: ve,
260
260
  minimal: Ne
261
- }[o] || A;
262
- return /* @__PURE__ */ t(r, { children: e });
261
+ }, r = o && s[o] ? o : "default", a = s[r] || A;
262
+ return /* @__PURE__ */ t(a, { children: e });
263
263
  }, Pe = () => {
264
- const { isMobile: e } = w(), { currentPage: n, setCurrentPage: a } = be(), { sidebarOpen: o, setSidebarOpen: s } = E(), r = [
264
+ const { isMobile: e } = w(), { currentPage: n, setCurrentPage: i } = be(), { sidebarOpen: o, setSidebarOpen: s } = E(), r = [
265
265
  { id: "test", label: "Suite de Test" },
266
266
  { id: "demo", label: "Demo" }
267
267
  ];
@@ -282,14 +282,14 @@ const ue = () => {
282
282
  ] }),
283
283
  /* @__PURE__ */ t("div", { className: "px-2 py-0.5 text-cyan-400 font-mono bg-black/50 border border-cyan-500/30 rounded text-xs font-bold tracking-widest", children: "DASHBOARD" })
284
284
  ] }),
285
- /* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: !e && r.map((i) => /* @__PURE__ */ t(
285
+ /* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: !e && r.map((a) => /* @__PURE__ */ t(
286
286
  "button",
287
287
  {
288
- onClick: () => a(i.id),
289
- className: `px-3 py-1.5 rounded-lg transition-all font-bold text-xs tracking-wide border ${n === i.id ? "bg-cyan-500/20 text-cyan-400 border-cyan-500/50" : "bg-black/50 text-gray-400 hover:text-gray-300 border-gray-700 hover:border-gray-600"}`,
290
- children: i.label
288
+ onClick: () => i(a.id),
289
+ className: `px-3 py-1.5 rounded-lg transition-all font-bold text-xs tracking-wide border ${n === a.id ? "bg-cyan-500/20 text-cyan-400 border-cyan-500/50" : "bg-black/50 text-gray-400 hover:text-gray-300 border-gray-700 hover:border-gray-600"}`,
290
+ children: a.label
291
291
  },
292
- i.id
292
+ a.id
293
293
  )) })
294
294
  ] }) }) }) }),
295
295
  e && o && /* @__PURE__ */ t("div", { className: "fixed inset-0 z-40 bg-black/50", onClick: () => s(!1), children: /* @__PURE__ */ t("div", { className: "fixed top-0 left-0 w-64 h-full bg-gradient-to-b from-gray-900 to-black border-r border-cyan-500/20", children: /* @__PURE__ */ l("div", { className: "p-6 flex flex-col h-full pt-20", children: [
@@ -297,21 +297,21 @@ const ue = () => {
297
297
  /* @__PURE__ */ t("div", { className: "w-8 h-8 bg-cyan-500 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ t("span", { className: "text-white font-bold text-sm", children: "RS" }) }),
298
298
  /* @__PURE__ */ t("span", { className: "text-white font-bold text-lg", children: "Sistema Responsivo" })
299
299
  ] }),
300
- /* @__PURE__ */ t("nav", { className: "space-y-2", children: r.map((i) => /* @__PURE__ */ t(
300
+ /* @__PURE__ */ t("nav", { className: "space-y-2", children: r.map((a) => /* @__PURE__ */ t(
301
301
  "button",
302
302
  {
303
303
  onClick: () => {
304
- a(i.id), s(!1);
304
+ i(a.id), s(!1);
305
305
  },
306
- className: `w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${n === i.id ? "bg-cyan-500/20 text-cyan-400 border border-cyan-500/50" : "text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10"}`,
307
- children: /* @__PURE__ */ t("span", { className: "font-medium", children: i.label })
306
+ className: `w-full flex items-center px-4 py-3 rounded-lg transition-all group text-left ${n === a.id ? "bg-cyan-500/20 text-cyan-400 border border-cyan-500/50" : "text-gray-300 hover:text-cyan-400 hover:bg-cyan-500/10"}`,
307
+ children: /* @__PURE__ */ t("span", { className: "font-medium", children: a.label })
308
308
  },
309
- i.id
309
+ a.id
310
310
  )) })
311
311
  ] }) }) })
312
312
  ] });
313
313
  }, H = () => {
314
- const { isMobile: e, isTablet: n } = w(), { sidebarOpen: a, setSidebarOpen: o } = E(), s = [
314
+ const { isMobile: e, isTablet: n } = w(), { sidebarOpen: i, setSidebarOpen: o } = E(), s = [
315
315
  { id: "home", label: "Inicio" },
316
316
  { id: "about", label: "Acerca" },
317
317
  { id: "contact", label: "Contacto" }
@@ -339,7 +339,7 @@ const ue = () => {
339
339
  r.id
340
340
  )) })
341
341
  ] }) }),
342
- e && a && /* @__PURE__ */ t("div", { className: "fixed inset-0 z-40 bg-black/50", onClick: () => o(!1), children: /* @__PURE__ */ t("div", { className: "fixed top-0 left-0 w-64 h-full bg-gray-900 border-r border-gray-800", children: /* @__PURE__ */ l("div", { className: "p-6 flex flex-col h-full pt-20", children: [
342
+ e && i && /* @__PURE__ */ t("div", { className: "fixed inset-0 z-40 bg-black/50", onClick: () => o(!1), children: /* @__PURE__ */ t("div", { className: "fixed top-0 left-0 w-64 h-full bg-gray-900 border-r border-gray-800", children: /* @__PURE__ */ l("div", { className: "p-6 flex flex-col h-full pt-20", children: [
343
343
  /* @__PURE__ */ l("div", { className: "flex items-center space-x-3 mb-8", children: [
344
344
  /* @__PURE__ */ t("div", { className: "w-8 h-8 bg-gray-700 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ t("span", { className: "text-white font-bold text-sm", children: "LO" }) }),
345
345
  /* @__PURE__ */ t("span", { className: "text-white font-bold text-lg", children: "Tu Aplicación" })
@@ -375,21 +375,21 @@ const ue = () => {
375
375
  ] }), xe = ({ children: e }) => /* @__PURE__ */ l("div", { className: "min-h-screen bg-gray-50 flex", children: [
376
376
  /* @__PURE__ */ t(H, {}),
377
377
  /* @__PURE__ */ t("main", { className: "flex-1 overflow-auto", children: e })
378
- ] }), ye = ({ children: e }) => /* @__PURE__ */ t($, { children: /* @__PURE__ */ t(xe, { children: e }) }), fe = ({ children: e }) => /* @__PURE__ */ t("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: /* @__PURE__ */ l("div", { className: "flex flex-1", children: [
378
+ ] }), fe = ({ children: e }) => /* @__PURE__ */ t($, { children: /* @__PURE__ */ t(xe, { children: e }) }), ye = ({ children: e }) => /* @__PURE__ */ t("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: /* @__PURE__ */ l("div", { className: "flex flex-1", children: [
379
379
  /* @__PURE__ */ t(H, {}),
380
380
  /* @__PURE__ */ l("main", { className: "flex-1 overflow-auto flex flex-col", children: [
381
381
  /* @__PURE__ */ t("div", { className: "flex-1", children: e }),
382
382
  /* @__PURE__ */ t(W, {})
383
383
  ] })
384
- ] }) }), ve = ({ children: e }) => /* @__PURE__ */ t($, { children: /* @__PURE__ */ t(fe, { children: e }) }), Ne = ({ children: e }) => /* @__PURE__ */ t("div", { className: "min-h-screen bg-gray-50", children: /* @__PURE__ */ t("main", { children: e }) }), je = ({ compact: e = !1 }) => {
385
- const { current: n, setLayout: a, config: o } = he();
384
+ ] }) }), ve = ({ children: e }) => /* @__PURE__ */ t($, { children: /* @__PURE__ */ t(ye, { children: e }) }), Ne = ({ children: e }) => /* @__PURE__ */ t("div", { className: "min-h-screen bg-gray-50", children: /* @__PURE__ */ t("main", { children: e }) }), je = ({ compact: e = !1 }) => {
385
+ const { current: n, setLayout: i, config: o } = he();
386
386
  return e ? /* @__PURE__ */ l("div", { className: "bg-black/50 rounded-lg p-3 border border-gray-700", children: [
387
387
  /* @__PURE__ */ t("div", { className: "text-xs text-gray-500 mb-2", children: "Layout:" }),
388
388
  /* @__PURE__ */ t(
389
389
  "select",
390
390
  {
391
391
  value: n,
392
- onChange: (s) => a(s.target.value),
392
+ onChange: (s) => i(s.target.value),
393
393
  className: "w-full bg-gray-800 text-white text-sm p-2 rounded border border-gray-600 focus:ring-1 focus:ring-cyan-500 focus:border-transparent",
394
394
  children: Object.entries(g).map(([s, r]) => /* @__PURE__ */ t("option", { value: s, children: r.name }, s))
395
395
  }
@@ -399,7 +399,7 @@ const ue = () => {
399
399
  /* @__PURE__ */ t("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3", children: Object.entries(g).map(([s, r]) => /* @__PURE__ */ l(
400
400
  "button",
401
401
  {
402
- onClick: () => a(s),
402
+ onClick: () => i(s),
403
403
  className: `
404
404
  p-4 rounded-lg border transition-all text-left
405
405
  ${n === s ? "border-cyan-500 bg-cyan-500/10 text-cyan-400" : "border-gray-700 bg-black/30 text-gray-300 hover:border-gray-600"}
@@ -435,7 +435,7 @@ export {
435
435
  Me as ResponsiveLayoutProvider,
436
436
  oe as ResponsiveProvider,
437
437
  H as Sidebar,
438
- ye as SidebarLayout,
438
+ fe as SidebarLayout,
439
439
  $ as SidebarProvider,
440
440
  p as getBreakpointIndex,
441
441
  Ce as getBreakpointValue,
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-system.mjs","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, useEffect } 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 // Inicializar el estado con el defaultLayout, asegurando que sea válido\r\n const validLayout = (defaultLayout && LAYOUT_CONFIG[defaultLayout]) ? defaultLayout : DEFAULT_LAYOUT\r\n const [currentLayout, setCurrentLayout] = useState(validLayout)\r\n \r\n // Sincronizar si el defaultLayout cambia (aunque no debería en la mayoría de casos)\r\n useEffect(() => {\r\n const newValidLayout = (defaultLayout && LAYOUT_CONFIG[defaultLayout]) ? defaultLayout : DEFAULT_LAYOUT\r\n if (newValidLayout !== currentLayout) {\r\n setCurrentLayout(newValidLayout)\r\n }\r\n }, [defaultLayout, currentLayout])\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","validLayout","currentLayout","setCurrentLayout","newValidLayout","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":";;AAUO,MAAMA,KAAwD,CAAC;AAAA,EACpE,UAAAC;AAAA,EACA,OAAOC,IAAS;AAClB,6BAGY,UAAAD,GAAS,GCVRE,IAAkD;AAAA,EAC7D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT,GAKaC,KAAuB,CAACC,MAC/BA,KAASF,EAAoB,KAAK,IAAU,QAC5CE,KAASF,EAAoB,KAAK,IAAU,QAC5CE,KAASF,EAAoB,KAAK,IAAU,QAC5CE,KAASF,EAAoB,KAAK,IAAU,QAC5CE,KAASF,EAAoB,KAAW,OACxCE,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AAA,UAAA,gBAAAtD,EAAC,OAAA,EAAI,WAAU,sBAAsB,UAAA0B,EAAa,MAAK;AAAA,UACvD,gBAAA1B,EAAC,OAAA,EAAI,WAAU,sBAAsB,YAAa,YAAA,CAAY;AAAA,QAAA;AAAA,MAAA;AAAA,MAXzDsD;AAAA,IAAA,CAaR,GACH;AAAA,IAEA,gBAAAd,EAAC,OAAA,EAAI,WAAU,sCACb,UAAA;AAAA,MAAA,gBAAAxC,EAAC,OAAA,EAAI,WAAU,8BAA6B,UAAA,kBAAc;AAAA,MAC1D,gBAAAA,EAAC,OAAA,EAAI,WAAU,qCAAqC,YAAO,MAAK;AAAA,MAChE,gBAAAA,EAAC,OAAA,EAAI,WAAU,yBAAyB,YAAO,YAAA,CAAY;AAAA,IAAA,EAAA,CAC7D;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"responsive-system.mjs","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, useEffect } 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 // Inicializar el estado con el defaultLayout, asegurando que sea válido\r\n const validLayout = (defaultLayout && LAYOUT_CONFIG[defaultLayout]) ? defaultLayout : DEFAULT_LAYOUT\r\n const [currentLayout, setCurrentLayout] = useState(validLayout)\r\n \r\n // Sincronizar si el defaultLayout cambia (aunque no debería en la mayoría de casos)\r\n useEffect(() => {\r\n const newValidLayout = (defaultLayout && LAYOUT_CONFIG[defaultLayout]) ? defaultLayout : DEFAULT_LAYOUT\r\n if (newValidLayout !== currentLayout) {\r\n setCurrentLayout(newValidLayout)\r\n }\r\n }, [defaultLayout, currentLayout])\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 // Validar que el layout sea válido, si no, usar default\r\n const validLayout = (currentLayout && layouts[currentLayout as keyof typeof layouts]) \r\n ? currentLayout \r\n : 'default'\r\n \r\n const LayoutComponent = layouts[validLayout 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","validLayout","currentLayout","setCurrentLayout","newValidLayout","layoutConfig","contextValue","baseClass","ResponsiveLayoutProvider","MainLayout","layoutProp","layout","layouts","DefaultLayout","SidebarLayout","DashboardLayout","MinimalLayout","LayoutComponent","Header","menuItems","jsxs","page","item","Sidebar","Fragment","Footer","Navigation","SidebarLayoutContent","DashboardLayoutContent","LayoutSwitcher","compact","setLayout","config","e","key"],"mappings":";;AAUO,MAAMA,KAAwD,CAAC;AAAA,EACpE,UAAAC;AAAA,EACA,OAAOC,IAAS;AAClB,6BAGY,UAAAD,GAAS,GCVRE,IAAkD;AAAA,EAC7D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT,GAKaC,KAAuB,CAACC,MAC/BA,KAASF,EAAoB,KAAK,IAAU,QAC5CE,KAASF,EAAoB,KAAK,IAAU,QAC5CE,KAASF,EAAoB,KAAK,IAAU,QAC5CE,KAASF,EAAoB,KAAK,IAAU,QAC5CE,KAASF,EAAoB,KAAW,OACxCE,KAASF,EAAoB,KAAW,OACxCE,KAASF,EAAoB,KAAW,OACxCE,KAASF,EAAoB,KAAW,OACrC,MAMIG,IAAqB,CAACC,MACC,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,OAAO,OAAO,OAAO,KAAK,EACxE,QAAQA,CAAU,GAM1BC,KAAqB,CAACD,MAC1BJ,EAAoBI,CAAU;AChCvC,SAASE,GACPC,GACAC,GACkC;AAClC,MAAIC,IAAgD;AACpD,SAAO,IAAIC,MAAwB;AACjC,IAAID,kBAAsBA,CAAO,GACjCA,IAAU,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AAAzC,EAAC,OAAA,EAAI,WAAU,8BAA6B,UAAA,kBAAc;AAAA,MAC1D,gBAAAA,EAAC,OAAA,EAAI,WAAU,qCAAqC,YAAO,MAAK;AAAA,MAChE,gBAAAA,EAAC,OAAA,EAAI,WAAU,yBAAyB,YAAO,YAAA,CAAY;AAAA,IAAA,EAAA,CAC7D;AAAA,EAAA,GACF;AAEJ;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "responsive-system",
3
- "version": "1.4.8",
3
+ "version": "1.4.9",
4
4
  "description": "Sistema de layout responsivo con auto-scaling para Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/responsive-system.cjs",
@@ -30,7 +30,12 @@ const MainLayout: React.FC<MainLayoutProps> = ({ children, layout: layoutProp })
30
30
  minimal: MinimalLayout,
31
31
  }
32
32
 
33
- const LayoutComponent = layouts[currentLayout as keyof typeof layouts] || DefaultLayout
33
+ // Validar que el layout sea válido, si no, usar default
34
+ const validLayout = (currentLayout && layouts[currentLayout as keyof typeof layouts])
35
+ ? currentLayout
36
+ : 'default'
37
+
38
+ const LayoutComponent = layouts[validLayout as keyof typeof layouts] || DefaultLayout
34
39
 
35
40
  return <LayoutComponent>{children}</LayoutComponent>
36
41
  }