UNPKG

klioso

Version:

Multi-Service Provider Management System for WordPress and Web Development with Enhanced Scanner

2 lines (1 loc) 6.28 kB
import{a as l,j as e,L as c,c as h}from"./app-DZ07njAd.js";import{A as g}from"./ApplicationLogo-GDc3W5ND.js";import{z as p}from"./transition-BCwV6od8.js";const x=l.createContext(),o=({children:r})=>{const[n,s]=l.useState(!1),i=()=>{s(a=>!a)};return e.jsx(x.Provider,{value:{open:n,setOpen:s,toggleOpen:i},children:e.jsx("div",{className:"relative",children:r})})},f=({children:r})=>{const{open:n,setOpen:s,toggleOpen:i}=l.useContext(x);return e.jsxs(e.Fragment,{children:[e.jsx("div",{onClick:i,children:r}),n&&e.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>s(!1)})]})},j=({align:r="right",width:n="48",contentClasses:s="py-1 bg-white",children:i})=>{const{open:a,setOpen:d}=l.useContext(x);let t="origin-top";r==="left"?t="ltr:origin-top-left rtl:origin-top-right start-0":r==="right"&&(t="ltr:origin-top-right rtl:origin-top-left end-0");let u="";return n==="48"&&(u="w-48"),e.jsx(e.Fragment,{children:e.jsx(p,{show:a,enter:"transition ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:e.jsx("div",{className:`absolute z-50 mt-2 rounded-md shadow-lg ${t} ${u}`,onClick:()=>d(!1),children:e.jsx("div",{className:"rounded-md ring-1 ring-black ring-opacity-5 "+s,children:i})})})})},v=({className:r="",children:n,...s})=>e.jsx(c,{...s,className:"block w-full px-4 py-2 text-start text-sm leading-5 text-gray-700 transition duration-150 ease-in-out hover:bg-gray-100 focus:bg-gray-100 focus:outline-none "+r,children:n});o.Trigger=f;o.Content=j;o.Link=v;function b({active:r=!1,className:n="",children:s,...i}){return e.jsx(c,{...i,className:"inline-flex items-center border-b-2 px-1 pt-1 text-sm font-medium leading-5 transition duration-150 ease-in-out focus:outline-none "+(r?"border-indigo-400 text-gray-900 focus:border-indigo-700":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 focus:border-gray-300 focus:text-gray-700")+n,children:s})}function m({active:r=!1,className:n="",children:s,...i}){return e.jsx(c,{...i,className:`flex w-full items-start border-l-4 py-2 pe-4 ps-3 ${r?"border-indigo-400 bg-indigo-50 text-indigo-700 focus:border-indigo-700 focus:bg-indigo-100 focus:text-indigo-800":"border-transparent text-gray-600 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-800 focus:border-gray-300 focus:bg-gray-50 focus:text-gray-800"} text-base font-medium transition duration-150 ease-in-out focus:outline-none ${n}`,children:s})}function L({header:r,children:n}){const s=h().props.auth.user,[i,a]=l.useState(!1),d=[{name:"Dashboard",route:"dashboard"},{name:"Clients",route:"clients.index",match:"clients.*"},{name:"Hosting Providers",route:"hosting-providers.index",match:"hosting-providers.*"},{name:"Websites",route:"websites.index",match:"websites.*"},{name:"Plugins",route:"plugins.index",match:"plugins.*"},{name:"Templates",route:"templates.index",match:"templates.*"},{name:"WP Scanner",route:"scanner.index",match:"scanner.*"}];return e.jsxs("div",{className:"min-h-screen bg-gray-100",children:[e.jsxs("nav",{className:"border-b border-gray-100 bg-white",children:[e.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex h-16 justify-between",children:[e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:"flex shrink-0 items-center",children:e.jsx(c,{href:"/",children:e.jsx(g,{className:"block h-9 w-auto fill-current text-gray-800"})})}),e.jsx("div",{className:"hidden space-x-8 sm:-my-px sm:ms-10 sm:flex",children:d.map(t=>e.jsx(b,{href:route(t.route),active:route().current(t.match??t.route),children:t.name},t.name))})]}),e.jsx("div",{className:"hidden sm:ms-6 sm:flex sm:items-center",children:e.jsx("div",{className:"relative ms-3",children:e.jsxs(o,{children:[e.jsx(o.Trigger,{children:e.jsx("span",{className:"inline-flex rounded-md",children:e.jsxs("button",{type:"button",className:"inline-flex items-center rounded-md border border-transparent bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-500 transition duration-150 ease-in-out hover:text-gray-700 focus:outline-none",children:[s.name,e.jsx("svg",{className:"-me-0.5 ms-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})]})})}),e.jsxs(o.Content,{children:[e.jsx(o.Link,{href:route("profile.edit"),children:"Profile"}),e.jsx(o.Link,{href:route("logout"),method:"post",as:"button",children:"Log Out"})]})]})})}),e.jsx("div",{className:"-me-2 flex items-center sm:hidden",children:e.jsx("button",{onClick:()=>a(t=>!t),className:"inline-flex items-center justify-center rounded-md p-2 text-gray-400 transition duration-150 ease-in-out hover:bg-gray-100 hover:text-gray-500 focus:bg-gray-100 focus:text-gray-500 focus:outline-none",children:e.jsxs("svg",{className:"h-6 w-6",stroke:"currentColor",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("path",{className:i?"hidden":"inline-flex",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16M4 12h16M4 18h16"}),e.jsx("path",{className:i?"inline-flex":"hidden",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})]})})})]})}),e.jsxs("div",{className:(i?"block":"hidden")+" sm:hidden",children:[e.jsx("div",{className:"space-y-1 pb-3 pt-2",children:d.map(t=>e.jsx(m,{href:route(t.route),active:route().current(t.match??t.route),children:t.name},t.name))}),e.jsxs("div",{className:"border-t border-gray-200 pb-1 pt-4",children:[e.jsxs("div",{className:"px-4",children:[e.jsx("div",{className:"text-base font-medium text-gray-800",children:s.name}),e.jsx("div",{className:"text-sm font-medium text-gray-500",children:s.email})]}),e.jsxs("div",{className:"mt-3 space-y-1",children:[e.jsx(m,{href:route("profile.edit"),children:"Profile"}),e.jsx(m,{method:"post",href:route("logout"),as:"button",children:"Log Out"})]})]})]})]}),r&&e.jsx("header",{className:"bg-white shadow",children:e.jsx("div",{className:"mx-auto max-w-7xl px-4 py-6 sm:px-6 lg:px-8",children:r})}),e.jsx("main",{children:n})]})}export{L as A};