4 lines
18 KiB
JavaScript
4 lines
18 KiB
JavaScript
import{c as e,d as t,i as n,o as r,r as i,t as a}from"./app-DqWc0bf2.js";var o=t(e(),1),s=a();function c({theme:e}){let{auth:t}=r().props,{user:n,permissions:a}=t,o=window.location.pathname,c=e=>e?a.includes(e):!0,l=`${n.first_name?.charAt(0)||``}${n.last_name?.charAt(0)||``}`.toUpperCase(),u=[{label:`Governance`,items:[{href:`/dashboard`,label:`Dashboard`,ability:null,icon:(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6`})})},{href:`/notifications`,label:`Notifications`,ability:`role.manage`,icon:(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9`})})}]},{label:`Management`,items:[{href:`/users`,label:`Users`,ability:`user.view`,icon:(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z`})})},{href:`/roles`,label:`Roles`,ability:`role.view`,icon:(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z`})})},{href:`/activity-logs`,label:`Activity Logs`,ability:`user.view`,icon:(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{d:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`})})}]},{label:`Account`,items:[{href:`/settings`,label:`Settings`,ability:null,icon:(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`})})}]},{label:`Systems`,adminOnly:!0,items:[{href:`/system-settings`,label:`System Settings`,ability:null,icon:(0,s.jsxs)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:[(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z`}),(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15 12a3 3 0 11-6 0 3 3 0 016 0z`})]})},{href:`/documentation`,label:`Dokumentasi`,ability:null,icon:(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253`})})}]}],d=a.includes(`settings.manage`);return(0,s.jsx)(`aside`,{className:`w-[260px] h-screen p-4 shrink-0 relative z-20 flex flex-col anim-left`,children:(0,s.jsxs)(`div`,{className:`bg-[#3D4E4B] flex-1 rounded-[2rem] flex flex-col relative`,children:[(0,s.jsxs)(`div`,{className:`p-8 flex flex-col items-center text-center`,children:[(0,s.jsxs)(`div`,{className:`relative mb-4`,children:[(0,s.jsx)(`div`,{className:`w-16 h-16 rounded-full border border-[#D4A017] p-1 flex items-center justify-center`,children:(0,s.jsx)(`div`,{className:`w-full h-full rounded-full bg-[#2D3A38] overflow-hidden flex items-center justify-center font-bold text-white/40 text-lg`,children:n.avatar_url?(0,s.jsx)(`img`,{src:n.avatar_url,className:`w-full h-full object-cover`}):l})}),(0,s.jsx)(`div`,{className:`absolute bottom-0 right-0 w-4 h-4 bg-[#21A59F] border-2 border-[#3D4E4B] rounded-full`})]}),(0,s.jsxs)(`h3`,{className:`text-white text-sm font-bold tracking-tight`,children:[n.first_name,` `,n.last_name]}),(0,s.jsx)(`p`,{className:`text-[#E3EBE8]/40 text-sm font-medium mt-0.5`,children:n.email})]}),(0,s.jsx)(`nav`,{className:`flex-1 px-3 space-y-6 overflow-y-auto custom-scrollbar pb-10`,children:u.map(e=>{if(e.adminOnly&&!d)return null;let t=e.items.filter(e=>c(e.ability));return t.length===0?null:(0,s.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,s.jsx)(`div`,{className:`px-5 text-xs font-semibold text-[#E3EBE8]/30 tracking-widest uppercase mb-2`,children:e.label}),t.map(e=>{let t=o===e.href||o.startsWith(e.href+`/`);return(0,s.jsxs)(i,{href:e.href,className:`flex items-center gap-4 py-3 transition-[color,background-color,box-shadow,opacity] duration-200 relative group
|
|
${t?`text-[#3D4E4B] bg-[#E3EBE8] dark:bg-[#1A2120] dark:text-white -mr-3 pr-6 pl-5 rounded-l-[15px] w-[calc(100%+0.75rem)] shadow-sm`:`text-[#E3EBE8]/60 hover:text-white hover:bg-white/5 px-5 rounded-[15px]`}`,children:[(0,s.jsx)(`span`,{className:`shrink-0 z-10 transition-colors duration-300 ${t?`text-[#D4A017]`:`group-hover:text-[#D4A017]`}`,children:e.icon}),(0,s.jsx)(`span`,{className:`text-sm font-semibold tracking-tight z-10`,children:e.label})]},e.href)})]},e.label)})}),(0,s.jsx)(`div`,{className:`p-6 pb-8`,children:(0,s.jsxs)(`div`,{className:`px-4 py-3 rounded-2xl bg-white/5 border border-white/5 flex items-center justify-between group hover:bg-white/10 transition-colors cursor-default`,children:[(0,s.jsx)(`span`,{className:`text-sm font-semibold tracking-tight text-[#D4A017]`,children:`biiproject kit`}),(0,s.jsx)(`span`,{className:`text-sm font-bold text-white`,children:`v2`})]})})]})})}function l({theme:e,onThemeToggle:t,onMenuToggle:a,sidebarOpen:c}){let{auth:l,system_settings:u,unread_notifications:d}=r().props,{user:f,roles:p}=l,[m,h]=(0,o.useState)(!1),g=(0,o.useRef)(null),[_,v]=(0,o.useState)(``),[y,b]=(0,o.useState)([]),[x,S]=(0,o.useState)(!1),C=(0,o.useRef)(null),w=window.location.pathname;(0,o.useEffect)(()=>{function e(e){g.current&&!g.current.contains(e.target)&&h(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,o.useEffect)(()=>{if(_.length<2){b([]);return}let e=setTimeout(async()=>{S(!0);try{b(await(await fetch(`/api/search?query=${encodeURIComponent(_)}`)).json())}catch(e){console.error(`Search error:`,e)}finally{S(!1)}},300);return()=>clearTimeout(e)},[_]),(0,o.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&e.key===`k`&&(e.preventDefault(),C.current?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let T=()=>{n.post(`/logout`)},E=`${f?.first_name?.charAt(0)||``}${f?.last_name?.charAt(0)||``}`.toUpperCase(),D=w.split(`/`).filter(Boolean),O=e=>e.replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),k=D.length>0?O(D[0]):`Dashboard`,A=D.length>1?D.map((e,t)=>({label:O(e),href:`/`+D.slice(0,t+1).join(`/`)})):null;return(0,s.jsxs)(`header`,{className:`h-16 flex items-center justify-between px-6 shrink-0 relative z-30 transition-colors duration-300 bg-transparent`,children:[(0,s.jsxs)(`div`,{className:`flex items-center gap-6`,children:[(0,s.jsx)(`button`,{onClick:a,className:`lg:hidden p-2 rounded-xl bg-white dark:bg-white/5 border border-gray-100 dark:border-white/5 text-gray-500 dark:text-gray-400 hover:text-[#3D4E4B] dark:hover:text-white transition-all`,"aria-label":`Toggle menu`,children:c?(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 18L18 6M6 6l12 12`})}):(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M4 6h16M4 12h16M4 18h16`})})}),(0,s.jsxs)(`div`,{className:`hidden lg:block`,children:[(0,s.jsx)(`h2`,{className:`text-sm font-bold text-[#3D4E4B] dark:text-white tracking-tight leading-none`,children:k}),(0,s.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-semibold text-gray-400 tracking-tight mt-1`,children:[(0,s.jsx)(i,{href:`/dashboard`,className:`hover:text-[#3D4E4B] dark:hover:text-white transition-colors`,children:u?.app_name||`biiproject kit`}),A?A.map((e,t)=>(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(`svg`,{className:`w-1 h-1 shrink-0`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,s.jsx)(`circle`,{cx:`12`,cy:`12`,r:`12`})}),t===A.length-1?(0,s.jsx)(`span`,{className:`text-[#D4A017] font-bold`,children:e.label}):(0,s.jsx)(i,{href:e.href,className:`hover:text-[#3D4E4B] dark:hover:text-white transition-colors`,children:e.label})]},e.href)):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`svg`,{className:`w-1 h-1 shrink-0`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,s.jsx)(`circle`,{cx:`12`,cy:`12`,r:`12`})}),(0,s.jsx)(`span`,{className:`text-[#D4A017] font-bold`,children:k})]})]})]}),(0,s.jsxs)(`div`,{className:`relative group ml-4`,children:[(0,s.jsxs)(`div`,{className:`relative w-[300px]`,children:[(0,s.jsx)(`svg`,{className:`absolute left-3.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400 pointer-events-none group-focus-within:text-[#D4A017] transition-colors`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:3,children:(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z`})}),(0,s.jsx)(`input`,{ref:C,type:`text`,placeholder:`Search anything... (Ctrl+K)`,value:_,onChange:e=>v(e.target.value),className:`w-full h-10 pl-10 pr-4 rounded-xl border border-gray-100 dark:border-white/5 bg-white dark:bg-white/5 text-xs font-bold text-[#3D4E4B] dark:text-white placeholder-gray-400 focus:outline-none focus:border-[#D4A017] focus:ring-4 focus:ring-[#D4A017]/5 transition-all`}),x&&(0,s.jsx)(`div`,{className:`absolute right-3.5 top-1/2 -translate-y-1/2`,children:(0,s.jsx)(`div`,{className:`w-3.5 h-3.5 border-2 border-[#D4A017] border-t-transparent rounded-full animate-spin`})})]}),y.length>0&&(0,s.jsx)(`div`,{className:`absolute left-0 right-0 mt-3 bg-white dark:bg-[#232D2B] rounded-2xl shadow-2xl border border-gray-100 dark:border-white/5 overflow-hidden anim-up z-50`,children:(0,s.jsx)(`div`,{className:`p-2 max-h-[400px] overflow-y-auto custom-scrollbar`,children:y.map((e,t)=>(0,s.jsxs)(i,{href:e.url,onClick:()=>v(``),className:`flex items-center gap-3 p-3 rounded-xl hover:bg-gray-50 dark:hover:bg-white/5 transition-all group`,children:[(0,s.jsxs)(`div`,{className:`w-9 h-9 rounded-lg bg-gray-100 dark:bg-white/5 flex items-center justify-center text-gray-400 group-hover:text-[#D4A017] transition-colors shrink-0`,children:[e.icon===`user`&&(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{d:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`})}),e.icon===`shield`&&(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{d:`M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z`})}),e.icon===`clock`&&(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{d:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`})})]}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`div`,{className:`text-xs font-bold text-[#3D4E4B] dark:text-white tracking-tight`,children:e.title}),(0,s.jsxs)(`div`,{className:`text-[10px] text-gray-400 font-bold uppercase tracking-widest mt-0.5`,children:[e.type,` • `,e.subtitle]})]})]},t))})})]})]}),(0,s.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,s.jsx)(`button`,{onClick:t,className:`p-2.5 rounded-xl bg-white dark:bg-white/5 text-gray-400 hover:text-[#D4A017] transition-all border border-gray-100 dark:border-white/5`,title:`Switch to ${e===`dark`?`Light`:`Dark`} Mode`,children:e===`dark`?(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{d:`M12 3v1m0 16v1m9-9h-1M4 12H3m15.364-6.364l-.707.707M6.343 17.657l-.707.707m12.728 0l-.707-.707M6.343 6.343l-.707.707M12 5a7 7 0 100 14 7 7 0 000-14z`})}):(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{d:`M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z`})})}),(0,s.jsxs)(i,{href:`/notifications`,className:`relative p-2.5 rounded-xl bg-white dark:bg-white/5 text-gray-400 hover:text-[#3D4E4B] dark:hover:text-white transition-all border border-gray-100 dark:border-white/5 flex items-center justify-center`,children:[(0,s.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9`})}),d>0&&(0,s.jsx)(`span`,{className:`absolute top-1.5 right-1.5 min-w-[1rem] h-4 px-0.5 bg-red-500 rounded-full flex items-center justify-center text-[9px] font-black text-white leading-none`,children:d>99?`99+`:d})]}),(0,s.jsxs)(`div`,{className:`relative`,ref:g,children:[(0,s.jsxs)(`button`,{onClick:()=>h(!m),className:`flex items-center gap-3 p-1.5 rounded-xl bg-white dark:bg-white/5 border border-gray-100 dark:border-white/5 hover:bg-gray-50 dark:hover:bg-white/10 transition-all group`,children:[(0,s.jsx)(`div`,{className:`w-8 h-8 rounded-lg bg-[#3D4E4B] flex items-center justify-center font-bold text-white text-sm`,children:f?.avatar_url?(0,s.jsx)(`img`,{src:f.avatar_url,className:`w-full h-full object-cover rounded-lg`}):E}),(0,s.jsxs)(`div`,{className:`hidden sm:block text-left pr-2`,children:[(0,s.jsx)(`div`,{className:`text-xs font-bold text-[#3D4E4B] dark:text-white leading-none`,children:f?.first_name}),(0,s.jsx)(`div`,{className:`text-[10px] text-[#D4A017] font-black uppercase tracking-widest mt-1`,children:p?.[0]?.replace(`-`,` `)||`User`})]})]}),m&&(0,s.jsxs)(`div`,{className:`absolute right-0 mt-3 w-56 bg-white dark:bg-[#232D2B] rounded-2xl shadow-2xl border border-gray-50 dark:border-white/5 py-2 z-50 anim-up`,children:[(0,s.jsxs)(`div`,{className:`px-5 py-3 border-b border-gray-50 dark:border-white/5 mb-1`,children:[(0,s.jsxs)(`div`,{className:`text-xs font-black text-[#3D4E4B] dark:text-white tracking-tight`,children:[f?.first_name,` `,f?.last_name]}),(0,s.jsx)(`div`,{className:`text-[10px] text-gray-400 font-bold truncate mt-1 uppercase tracking-widest`,children:f?.email})]}),(0,s.jsxs)(i,{href:`/profile`,className:`flex items-center gap-2.5 px-5 py-3 text-xs font-bold text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-white/5 transition-all`,children:[(0,s.jsx)(`svg`,{className:`w-4 h-4 opacity-50`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{d:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`})}),`Account Settings`]}),(0,s.jsxs)(`button`,{onClick:T,className:`w-full flex items-center gap-2.5 px-5 py-3 text-xs font-bold text-red-600 hover:bg-red-50 dark:hover:bg-red-500/10 transition-all text-left border-t border-gray-50 dark:border-white/5 mt-1`,children:[(0,s.jsx)(`svg`,{className:`w-4 h-4 opacity-50`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,s.jsx)(`path`,{d:`M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1`})}),`Sign Out Session`]})]})]})]})]})}function u({children:e}){let{system_settings:t}=r().props,n=t?.primary_color,[i,a]=o.useState(()=>typeof window<`u`&&localStorage.getItem(`theme`)||`light`),[u,d]=o.useState(!1);o.useEffect(()=>{i===`dark`?document.documentElement.classList.add(`dark`):document.documentElement.classList.remove(`dark`),localStorage.setItem(`theme`,i)},[i]);let f=r().url;return o.useEffect(()=>{d(!1)},[f]),(0,s.jsxs)(`div`,{className:`flex h-screen overflow-hidden transition-colors duration-300 bg-[#E3EBE8] dark:bg-[#1A2120]`,style:n?{"--color-primary-500":n,"--color-accent-gold":n}:{},children:[(0,s.jsx)(`div`,{onClick:()=>d(!1),className:`fixed inset-0 z-10 bg-black/40 backdrop-blur-sm lg:hidden transition-opacity duration-300
|
|
${u?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`}`}),(0,s.jsx)(`div`,{className:`hidden lg:block shrink-0`,children:(0,s.jsx)(c,{theme:i})}),(0,s.jsx)(`div`,{className:`fixed inset-y-0 left-0 z-20 lg:hidden transition-transform duration-300 ease-in-out
|
|
${u?`translate-x-0`:`-translate-x-full`}`,children:(0,s.jsx)(c,{theme:i})}),(0,s.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0 h-full relative`,children:[(0,s.jsx)(l,{theme:i,onThemeToggle:()=>a(e=>e===`dark`?`light`:`dark`),onMenuToggle:()=>d(e=>!e),sidebarOpen:u}),(0,s.jsx)(`main`,{className:`flex-1 overflow-y-auto px-6 pt-6 pb-6 custom-scrollbar`,children:(0,s.jsx)(`div`,{className:`max-w-[1600px] mx-auto anim-page`,children:e},f)})]})]})}export{u as t}; |