@reactfast/nav 0.2.19 → 0.2.22

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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),n=require("@headlessui/react"),x=require("@heroicons/react/24/outline"),b=require("@heroicons/react/20/solid"),N=require("next/link"),P=require("@heroicons/react/24/solid"),I=[{name:"Analytics",description:"Get a better understanding of your traffic",href:"#",icon:x.ChartPieIcon},{name:"Engagement",description:"Speak directly to your customers",href:"#",icon:x.CursorArrowRaysIcon},{name:"Security",description:"Your customers’ data will be safe and secure",href:"#",icon:x.FingerPrintIcon},{name:"Integrations",description:"Connect with third-party tools",href:"#",icon:x.SquaresPlusIcon},{name:"Automations",description:"Build strategic funnels that will convert",href:"#",icon:x.ArrowPathIcon}],B=[{name:"Watch demo",href:"#",icon:b.PlayCircleIcon},{name:"Contact sales",href:"#",icon:b.PhoneIcon}],D=[{name:"About us",href:"#",description:"Learn more about our company values and mission to empower others"},{name:"Careers",href:"#",description:"Looking for you next career opportunity? See all of our open positions"},{name:"Support",href:"#",description:"Get in touch with our dedicated support team or reach out on our community forums"},{name:"Blog",href:"#",description:"Read our latest announcements and get perspectives from our team"}];function E(){const[a,u]=c.useState(!1);return e.jsxs("header",{className:"bg-white dark:bg-gray-900",children:[e.jsxs("nav",{"aria-label":"Global",className:"mx-auto flex max-w-7xl items-center justify-between p-6 lg:px-8",children:[e.jsx("div",{className:"flex lg:flex-1",children:e.jsxs("a",{href:"#",className:"-m-1.5 p-1.5",children:[e.jsx("span",{className:"sr-only",children:"Your Company"}),e.jsx("img",{alt:"",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=600",className:"h-8 w-auto dark:hidden"}),e.jsx("img",{alt:"",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=500",className:"hidden h-8 w-auto dark:block"})]})}),e.jsx("div",{className:"flex lg:hidden",children:e.jsxs("button",{type:"button",onClick:()=>u(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 dark:text-gray-400",children:[e.jsx("span",{className:"sr-only",children:"Open main menu"}),e.jsx(x.Bars3Icon,{"aria-hidden":"true",className:"size-6"})]})}),e.jsxs(n.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:[e.jsxs(n.Popover,{className:"relative",children:[e.jsxs(n.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 font-semibold text-gray-900 dark:text-white",children:["Product",e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none text-gray-400 dark:text-gray-500"})]}),e.jsxs(n.PopoverPanel,{transition:!0,className:"absolute left-1/2 z-10 mt-3 w-screen max-w-md -translate-x-1/2 overflow-hidden rounded-3xl bg-white shadow-lg outline outline-1 outline-gray-900/5 transition data-[closed]:translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in dark:bg-gray-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10",children:[e.jsx("div",{className:"p-4",children:I.map(r=>e.jsxs("div",{className:"group relative flex items-center gap-x-6 rounded-lg p-4 text-sm/6 hover:bg-gray-50 dark:hover:bg-white/5",children:[e.jsx("div",{className:"flex size-11 flex-none items-center justify-center rounded-lg bg-gray-50 group-hover:bg-white dark:bg-gray-700/50 dark:group-hover:bg-gray-700",children:e.jsx(r.icon,{"aria-hidden":"true",className:"size-6 text-gray-600 group-hover:text-indigo-600 dark:text-gray-400 dark:group-hover:text-white"})}),e.jsxs("div",{className:"flex-auto",children:[e.jsxs("a",{href:r.href,className:"block font-semibold text-gray-900 dark:text-white",children:[r.name,e.jsx("span",{className:"absolute inset-0"})]}),e.jsx("p",{className:"mt-1 text-gray-600 dark:text-gray-400",children:r.description})]})]},r.name))}),e.jsx("div",{className:"grid grid-cols-2 divide-x divide-gray-900/5 bg-gray-50 dark:divide-white/10 dark:bg-gray-700/50",children:B.map(r=>e.jsxs("a",{href:r.href,className:"flex items-center justify-center gap-x-2.5 p-3 text-sm/6 font-semibold text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700/50",children:[e.jsx(r.icon,{"aria-hidden":"true",className:"size-5 flex-none text-gray-400 dark:text-gray-500"}),r.name]},r.name))})]})]}),e.jsx("a",{href:"#",className:"text-sm/6 font-semibold text-gray-900 dark:text-white",children:"Features"}),e.jsx("a",{href:"#",className:"text-sm/6 font-semibold text-gray-900 dark:text-white",children:"Marketplace"}),e.jsxs(n.Popover,{className:"relative",children:[e.jsxs(n.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 font-semibold text-gray-900 dark:text-white",children:["Company",e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none text-gray-400 dark:text-gray-500"})]}),e.jsx(n.PopoverPanel,{transition:!0,className:"absolute left-1/2 z-10 mt-3 w-96 -translate-x-1/2 rounded-3xl bg-white p-4 shadow-lg outline outline-1 outline-gray-900/5 transition data-[closed]:translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in dark:bg-gray-800 dark:-outline-offset-1 dark:outline-white/10",children:D.map(r=>e.jsxs("div",{className:"relative rounded-lg p-4 hover:bg-gray-50 dark:hover:bg-white/5",children:[e.jsxs("a",{href:r.href,className:"block text-sm/6 font-semibold text-gray-900 dark:text-white",children:[r.name,e.jsx("span",{className:"absolute inset-0"})]}),e.jsx("p",{className:"mt-1 text-sm/6 text-gray-600 dark:text-gray-400",children:r.description})]},r.name))})]})]}),e.jsx("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:e.jsxs("a",{href:"#",className:"text-sm/6 font-semibold text-gray-900 dark:text-white",children:["Log in ",e.jsx("span",{"aria-hidden":"true",children:"→"})]})})]}),e.jsxs(n.Dialog,{open:a,onClose:u,className:"lg:hidden",children:[e.jsx("div",{className:"fixed inset-0 z-10"}),e.jsxs(n.DialogPanel,{className:"fixed inset-y-0 right-0 z-10 flex w-full flex-col justify-between overflow-y-auto bg-white sm:max-w-sm sm:ring-1 sm:ring-gray-900/10 dark:bg-gray-900 dark:sm:ring-white/10",children:[e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("a",{href:"#",className:"-m-1.5 p-1.5",children:[e.jsx("span",{className:"sr-only",children:"Your Company"}),e.jsx("img",{alt:"",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=600",className:"h-8 w-auto dark:hidden"}),e.jsx("img",{alt:"",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=500",className:"hidden h-8 w-auto dark:block"})]}),e.jsxs("button",{type:"button",onClick:()=>u(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 dark:text-gray-400",children:[e.jsx("span",{className:"sr-only",children:"Close menu"}),e.jsx(x.XMarkIcon,{"aria-hidden":"true",className:"size-6"})]})]}),e.jsx("div",{className:"mt-6 flow-root",children:e.jsxs("div",{className:"-my-6 divide-y divide-gray-500/10 dark:divide-white/10",children:[e.jsx("div",{className:"space-y-2 py-6",children:I.map(r=>e.jsxs("a",{href:r.href,className:"group -mx-3 flex items-center gap-x-6 rounded-lg p-3 text-base/7 font-semibold text-gray-900 hover:bg-gray-50 dark:text-white dark:hover:bg-white/5",children:[e.jsx("div",{className:"flex size-11 flex-none items-center justify-center rounded-lg bg-gray-50 group-hover:bg-white dark:bg-gray-800 dark:group-hover:bg-gray-700",children:e.jsx(r.icon,{"aria-hidden":"true",className:"size-6 text-gray-600 group-hover:text-indigo-600 dark:text-gray-300 dark:group-hover:text-white"})}),r.name]},r.name))}),e.jsxs("div",{className:"space-y-2 py-6",children:[e.jsx("a",{href:"#",className:"-mx-3 block rounded-lg px-3 py-2 text-base/7 font-semibold text-gray-900 hover:bg-gray-50 dark:text-white dark:hover:bg-white/5",children:"Features"}),e.jsx("a",{href:"#",className:"-mx-3 block rounded-lg px-3 py-2 text-base/7 font-semibold text-gray-900 hover:bg-gray-50 dark:text-white dark:hover:bg-white/5",children:"Marketplace"}),D.map(r=>e.jsx("a",{href:r.href,className:"-mx-3 block rounded-lg px-3 py-2 text-base/7 font-semibold text-gray-900 hover:bg-gray-50 dark:text-white dark:hover:bg-white/5",children:r.name},r.name))]}),e.jsx("div",{className:"py-6",children:e.jsx("a",{href:"#",className:"-mx-3 block rounded-lg px-3 py-2.5 text-base/7 font-semibold text-gray-900 hover:bg-gray-50 dark:text-white dark:hover:bg-white/5",children:"Log in"})})]})})]}),e.jsx("div",{className:"sticky bottom-0 grid grid-cols-2 divide-x divide-gray-900/5 bg-gray-50 text-center dark:divide-white/5 dark:bg-gray-800/50",children:item.ctas.map(r=>e.jsx("a",{href:r.href,className:"p-3 text-base/7 font-semibold text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-800",children:r.title},r.title))})]})]})]})}function R(){return e.jsxs(n.Disclosure,{as:"nav",className:"relative bg-white shadow dark:bg-gray-800/50 dark:shadow-none dark:after:pointer-events-none dark:after:absolute dark:after:inset-x-0 dark:after:bottom-0 dark:after:h-px dark:after:bg-white/10",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:"-ml-2 mr-2 flex items-center md:hidden",children:e.jsxs(n.DisclosureButton,{className:"group relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-600 dark:hover:bg-white/5 dark:hover:text-white dark:focus:ring-white",children:[e.jsx("span",{className:"absolute -inset-0.5"}),e.jsx("span",{className:"sr-only",children:"Open main menu"}),e.jsx(x.Bars3Icon,{"aria-hidden":"true",className:"block size-6 group-data-[open]:hidden"}),e.jsx(x.XMarkIcon,{"aria-hidden":"true",className:"hidden size-6 group-data-[open]:block"})]})}),e.jsxs("div",{className:"flex shrink-0 items-center",children:[e.jsx("img",{alt:"Your Company",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=600",className:"h-8 w-auto dark:hidden"}),e.jsx("img",{alt:"Your Company",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=500",className:"hidden h-8 w-auto dark:block"})]}),e.jsxs("div",{className:"hidden md:ml-6 md:flex md:space-x-8",children:[e.jsx("a",{href:"#",className:"inline-flex items-center border-b-2 border-indigo-600 px-1 pt-1 text-sm font-medium text-gray-900 dark:border-indigo-500 dark:text-white",children:"Dashboard"}),e.jsx("a",{href:"#",className:"inline-flex items-center border-b-2 border-transparent px-1 pt-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-300 dark:hover:border-white/20 dark:hover:text-white",children:"Team"}),e.jsx("a",{href:"#",className:"inline-flex items-center border-b-2 border-transparent px-1 pt-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-300 dark:hover:border-white/20 dark:hover:text-white",children:"Projects"}),e.jsx("a",{href:"#",className:"inline-flex items-center border-b-2 border-transparent px-1 pt-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-300 dark:hover:border-white/20 dark:hover:text-white",children:"Calendar"})]})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"shrink-0",children:e.jsxs("button",{type:"button",className:"relative inline-flex items-center gap-x-1.5 rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:bg-indigo-500 dark:shadow-none dark:hover:bg-indigo-400 dark:focus-visible:outline-indigo-500",children:[e.jsx(b.PlusIcon,{"aria-hidden":"true",className:"-ml-0.5 size-5"}),"New Job"]})}),e.jsxs("div",{className:"hidden md:ml-4 md:flex md:shrink-0 md:items-center",children:[e.jsxs("button",{type:"button",className:"relative rounded-full p-1 text-gray-400 hover:text-gray-500 focus:outline focus:outline-2 focus:outline-offset-2 focus:outline-indigo-600 dark:hover:text-white dark:focus:outline-indigo-500",children:[e.jsx("span",{className:"absolute -inset-1.5"}),e.jsx("span",{className:"sr-only",children:"View notifications"}),e.jsx(x.BellIcon,{"aria-hidden":"true",className:"size-6"})]}),e.jsxs(n.Menu,{as:"div",className:"relative ml-3",children:[e.jsxs(n.MenuButton,{className:"relative flex rounded-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:focus-visible:outline-indigo-500",children:[e.jsx("span",{className:"absolute -inset-1.5"}),e.jsx("span",{className:"sr-only",children:"Open user menu"}),e.jsx("img",{alt:"",src:"https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",className:"size-8 rounded-full bg-gray-100 outline outline-1 -outline-offset-1 outline-black/5 dark:bg-gray-800 dark:outline-white/10"})]}),e.jsxs(n.MenuItems,{transition:!0,className:"absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg outline outline-1 outline-black/5 transition data-[closed]:scale-95 data-[closed]:transform data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-75 data-[enter]:ease-out data-[leave]:ease-in dark:bg-gray-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10",children:[e.jsx(n.MenuItem,{children:e.jsx("a",{href:"#",className:"block px-4 py-2 text-sm text-gray-700 data-[focus]:bg-gray-100 data-[focus]:outline-none dark:text-gray-300 dark:data-[focus]:bg-white/5",children:"Your profile"})}),e.jsx(n.MenuItem,{children:e.jsx("a",{href:"#",className:"block px-4 py-2 text-sm text-gray-700 data-[focus]:bg-gray-100 data-[focus]:outline-none dark:text-gray-300 dark:data-[focus]:bg-white/5",children:"Settings"})}),e.jsx(n.MenuItem,{children:e.jsx("a",{href:"#",className:"block px-4 py-2 text-sm text-gray-700 data-[focus]:bg-gray-100 data-[focus]:outline-none dark:text-gray-300 dark:data-[focus]:bg-white/5",children:"Sign out"})})]})]})]})]})]})}),e.jsxs(n.DisclosurePanel,{className:"md:hidden",children:[e.jsxs("div",{className:"space-y-1 pb-3 pt-2",children:[e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block border-l-4 border-indigo-600 bg-indigo-50 py-2 pl-3 pr-4 text-base font-medium text-indigo-700 sm:pl-5 sm:pr-6 dark:border-indigo-500 dark:bg-indigo-600/10 dark:text-indigo-400",children:"Dashboard"}),e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block border-l-4 border-transparent py-2 pl-3 pr-4 text-base font-medium text-gray-500 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-800 sm:pl-5 sm:pr-6 dark:text-gray-300 dark:hover:border-white/20 dark:hover:bg-white/5 dark:hover:text-white",children:"Team"}),e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block border-l-4 border-transparent py-2 pl-3 pr-4 text-base font-medium text-gray-500 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-800 sm:pl-5 sm:pr-6 dark:text-gray-300 dark:hover:border-white/20 dark:hover:bg-white/5 dark:hover:text-white",children:"Projects"}),e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block border-l-4 border-transparent py-2 pl-3 pr-4 text-base font-medium text-gray-500 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-800 sm:pl-5 sm:pr-6 dark:text-gray-300 dark:hover:border-white/20 dark:hover:bg-white/5 dark:hover:text-white",children:"Calendar"})]}),e.jsxs("div",{className:"border-t border-gray-200 pb-3 pt-4 dark:border-white/10",children:[e.jsxs("div",{className:"flex items-center px-4 sm:px-6",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("img",{alt:"",src:"https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",className:"size-10 rounded-full bg-gray-100 outline outline-1 -outline-offset-1 outline-black/5 dark:bg-gray-800 dark:outline-white/10"})}),e.jsxs("div",{className:"ml-3",children:[e.jsx("div",{className:"text-base font-medium text-gray-800 dark:text-white",children:"Tom Cook"}),e.jsx("div",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"tom@example.com"})]}),e.jsxs("button",{type:"button",className:"relative ml-auto shrink-0 rounded-full p-1 text-gray-400 hover:text-gray-500 focus:outline focus:outline-2 focus:outline-offset-2 focus:outline-indigo-600 dark:hover:text-white dark:focus:outline-indigo-500",children:[e.jsx("span",{className:"absolute -inset-1.5"}),e.jsx("span",{className:"sr-only",children:"View notifications"}),e.jsx(x.BellIcon,{"aria-hidden":"true",className:"size-6"})]})]}),e.jsxs("div",{className:"mt-3 space-y-1",children:[e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",children:"Your profile"}),e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",children:"Settings"}),e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",children:"Sign out"})]})]})]})]})}function A({item:a,onHover:u}){const r=c.useRef(null);return e.jsx(n.Popover,{children:({open:g})=>e.jsxs("div",{className:"relative",onMouseEnter:()=>{var s;u&&!g&&((s=r.current)==null||s.click())},onMouseLeave:()=>{var s;u&&g&&((s=r.current)==null||s.click())},children:[e.jsxs("div",{className:"flex items-center gap-x-1",children:[a.useLink?e.jsx(N,{href:a.href,className:"text-sm/6 font-semibold text-gray-900 dark:text-white",children:a.title}):e.jsx("span",{className:"text-sm/6 font-semibold text-gray-900 dark:text-white",children:a.title}),e.jsx(n.PopoverButton,{ref:r,className:"inline-flex items-center p-1 text-gray-700 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white","aria-label":`Open ${a.title} menu`,children:e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none"})})]}),e.jsxs(n.PopoverPanel,{transition:!0,className:"absolute left-1/2 z-10 mt-3 w-screen max-w-md -translate-x-1/2 overflow-hidden rounded-3xl bg-white shadow-lg outline outline-1 outline-gray-900/5 transition data-[closed]:translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in dark:bg-gray-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10",children:[e.jsx("div",{className:"p-4",children:a.subMenu.map(s=>e.jsxs("div",{className:"group relative flex items-center gap-x-6 rounded-lg p-4 text-sm/6 hover:bg-gray-50 dark:hover:bg-white/5",children:[e.jsx("div",{className:"flex size-11 flex-none items-center justify-center rounded-lg bg-gray-50 group-hover:bg-white dark:bg-gray-700/50 dark:group-hover:bg-gray-700",children:(()=>{const i=s.icon;if(!i)return null;if(c.isValidElement(i))return c.cloneElement(i,{className:"size-6 text-gray-600 group-hover:text-primary","aria-hidden":!0});if(typeof i=="function"){const l=i;return e.jsx(l,{"aria-hidden":!0,className:"size-6 text-gray-600 group-hover:text-primary"})}return null})()}),e.jsxs("div",{className:"flex-auto",children:[e.jsxs("a",{href:s.href,className:"block font-semibold text-gray-900 dark:text-white",children:[s.title,e.jsx("span",{className:"absolute inset-0"})]}),e.jsx("p",{className:"mt-1 text-gray-600 dark:text-gray-400",children:s.description})]})]},s.title))}),e.jsx("div",{className:"grid grid-cols-2 divide-x divide-gray-900/5 bg-gray-50 dark:divide-white/10 dark:bg-gray-700/50",children:a.ctas&&a.ctas.map(s=>e.jsxs("a",{href:s.href,className:"flex items-center justify-center gap-x-2.5 p-3 text-sm/6 font-semibold text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700/50",children:[(()=>{const i=s.icon;if(!i)return null;if(c.isValidElement(i))return c.cloneElement(i,{className:"size-5 flex-none text-gray-400","aria-hidden":!0});if(typeof i=="function"){const l=i;return e.jsx(l,{"aria-hidden":!0,className:"size-5 flex-none text-gray-400"})}return null})(),s.title]},s.title))})]})]})})}function L({item:a,onHover:u}){const r=c.useRef(null);return e.jsx(n.Popover,{children:({open:g})=>e.jsxs("div",{onMouseEnter:()=>{var s;u&&!g&&((s=r.current)==null||s.click())},onMouseLeave:()=>{var s;u&&g&&((s=r.current)==null||s.click())},children:[e.jsxs("div",{className:"flex items-center gap-x-1",children:[a.useLink?e.jsx(N,{href:a.href,className:"text-sm/6 font-semibold text-gray-900",children:a.title}):e.jsx("span",{className:"text-sm/6 font-semibold text-gray-900",children:a.title}),e.jsx(n.PopoverButton,{ref:r,className:"inline-flex items-center p-1 text-gray-700 hover:text-gray-900","aria-label":`Open ${a.title} menu`,children:e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none"})})]}),e.jsxs(n.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-white pt-14 shadow-lg ring-1 ring-gray-900/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[e.jsx("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 xl:gap-x-8",children:a.subMenu.map(s=>e.jsxs("div",{className:"group relative rounded-lg p-6 text-sm/6 hover:bg-gray-50",children:[s.image?e.jsx("div",{className:"aspect-[4/3] w-full overflow-hidden rounded-md bg-gray-100",children:e.jsx("img",{alt:s.imageAlt||s.title,src:s.image,className:"h-full w-full object-cover transition-transform duration-200 group-hover:scale-105"})}):e.jsx("div",{className:"flex size-11 items-center justify-center rounded-lg bg-gray-50 group-hover:bg-white",children:(()=>{const i=s.icon;if(!i)return null;if(c.isValidElement(i))return c.cloneElement(i,{className:"size-6 text-gray-600 group-hover:text-primary","aria-hidden":!0});if(typeof i=="function"){const l=i;return e.jsx(l,{"aria-hidden":!0,className:"size-6 text-gray-600 group-hover:text-primary"})}return null})()}),e.jsxs("a",{href:s.href,className:`${s.image?"mt-4":"mt-6"} block font-semibold text-gray-900`,children:[s.title,e.jsx("span",{className:"absolute inset-0"})]}),e.jsx("p",{className:"mt-1 text-gray-600",children:s.description})]},s.title))}),e.jsx("div",{className:"bg-gray-50",children:a.ctas&&e.jsx("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:e.jsx("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.ctas.map(s=>e.jsxs("a",{href:s.href,className:"flex items-center justify-center gap-x-2.5 p-3 text-sm/6 font-semibold text-gray-900 hover:bg-gray-100",children:[(()=>{const i=s.icon;if(!i)return null;if(c.isValidElement(i))return c.cloneElement(i,{className:"size-5 flex-none text-gray-400","aria-hidden":!0});if(typeof i=="function"){const l=i;return e.jsx(l,{"aria-hidden":!0,className:"size-5 flex-none text-gray-400"})}return null})(),s.title]},s.title))})})})]})]})},a.id)}function O({item:a,onHover:u}){const r=c.useRef(null);return e.jsx(n.Popover,{children:({open:g})=>{var s,i;return e.jsxs("div",{className:"relative",onMouseEnter:()=>{var l;u&&!g&&((l=r.current)==null||l.click())},onMouseLeave:()=>{var l;u&&g&&((l=r.current)==null||l.click())},children:[e.jsxs("div",{className:"flex items-center gap-x-1",children:[a.useLink?e.jsx(N,{href:a.href,className:"text-sm/6 font-semibold text-gray-900",children:a.title}):e.jsx("span",{className:"text-sm/6 font-semibold text-gray-900",children:a.title}),e.jsx(n.PopoverButton,{ref:r,className:"inline-flex items-center p-1 text-gray-700 hover:text-gray-900","aria-label":`Open ${a.title} menu`,children:e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none"})})]}),e.jsx(n.PopoverPanel,{transition:!0,className:"absolute left-1/2 z-10 mt-3 w-72 -translate-x-1/2 overflow-hidden rounded-2xl bg-white p-2 shadow-lg ring-1 ring-gray-900/5 transition data-[closed]:translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:e.jsxs("ul",{className:"space-y-1",children:[(s=a.subMenu)==null?void 0:s.map(l=>e.jsx("li",{className:"group",children:e.jsxs(N,{href:l.href,className:"flex items-center rounded-md px-3 py-2 text-sm text-gray-400 transition-colors duration-300 group-hover:text-black",children:[(()=>{const m=l.icon;if(!m)return e.jsx(P.ChevronRightIcon,{className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary"});if(c.isValidElement(m))return c.cloneElement(m,{className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary","aria-hidden":!0});if(typeof m=="function"){const y=m;return e.jsx(y,{"aria-hidden":!0,className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary"})}return null})(),e.jsx("span",{children:l.title})]})},l.title)),(i=a.ctas)==null?void 0:i.map(l=>e.jsx("li",{className:"group",children:e.jsxs("a",{href:l.href,className:"flex items-center rounded-md px-3 py-2 text-sm text-gray-400 transition-colors duration-300 group-hover:text-black",children:[(()=>{const m=l.icon;if(!m)return e.jsx(P.ChevronRightIcon,{className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary"});if(c.isValidElement(m))return c.cloneElement(m,{className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary","aria-hidden":!0});if(typeof m=="function"){const y=m;return e.jsx(y,{"aria-hidden":!0,className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary"})}return null})(),e.jsx("span",{children:l.title})]})},l.title))]})})]})}})}function q({config:a,onScrolledChange:u,scrollThreshold:r=10,quickSearchResults:g=[]}){const[s,i]=c.useState(!1),[l,m]=c.useState(!1),[y,v]=c.useState(!1),[k,w]=c.useState("");return c.useEffect(()=>{typeof(a==null?void 0:a.onSearchOpenChange)=="function"&&a.onSearchOpenChange(y),y||(w(""),typeof(a==null?void 0:a.onClearQuickResults)=="function"&&a.onClearQuickResults())},[y]),c.useEffect(()=>{const t=()=>{const h=window.scrollY>r;m(p=>(p!==h&&typeof u=="function"&&u(h),h))};return t(),window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[u,r]),e.jsxs("header",{className:`${a!=null&&a.sticky?"sticky top-0 z-50 bg-white/95 backdrop-blur supports-[backdrop-filter]:bg-white/70":"relative z-10"} isolate bg-white`,children:[e.jsxs("nav",{"aria-label":"Global",className:"mx-auto flex max-w-7xl items-center justify-between p-6 lg:px-8",children:[e.jsx("div",{className:"flex lg:flex-1",children:e.jsx(N,{href:"/","aria-label":a.logoAlt||"Home",children:a.logo?e.jsx("img",{alt:a.logoAlt||"Logo",src:a.logo,className:`w-auto transition-all duration-300 ${l?"h-8 md:h-14":"h-12 md:h-20"}`}):e.jsx("div",{className:`h-auto transition-all duration-300 ${l?"w-28":"w-32"}`,children:e.jsx("h1",{className:`transition-all duration-300 ${l?"text-xl":"text-2xl"}`,children:a.fallbackText||"<NovaNav>"})})})}),e.jsx("div",{className:"flex lg:hidden",children:e.jsxs("button",{type:"button",onClick:()=>i(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700",children:[e.jsx("span",{className:"sr-only",children:"Open main menu"}),e.jsx(x.Bars3Icon,{"aria-hidden":"true",className:"size-6"})]})}),e.jsx(n.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:a.menuItems.map(t=>{const h=t.type||(t.full?"full":"default");return t.subMenu?h==="full"?e.jsx(L,{item:t,onHover:t.onHover},t.id||t.title):h==="simple"?e.jsx(O,{item:t,onHover:t.onHover},t.id||t.title):e.jsx(A,{item:t,onHover:t.onHover},t.id||t.title):t.useLink?e.jsx(N,{href:t.href,className:"text-sm/6 font-semibold text-gray-900",children:t.title},t.id):e.jsx("a",{href:t.href,className:"text-sm/6 font-semibold text-gray-900",children:t.title},t.id)})}),e.jsxs("div",{className:"hidden gap-4 lg:flex lg:flex-1 lg:justify-end",children:[a.search&&e.jsx("button",{type:"button",onClick:()=>v(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 hover:bg-gray-100","aria-label":"Open search",children:e.jsx(x.MagnifyingGlassIcon,{"aria-hidden":"true",className:"size-6"})}),a.login&&e.jsxs("a",{href:a.loginHref,className:"text-sm/6 font-semibold text-gray-900",children:["Log in ",e.jsx("span",{"aria-hidden":"true",children:"→"})]}),a.cta&&e.jsx("a",{href:a.ctaBtnHref,className:"rounded-md bg-gray-900 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-gray-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900",children:a.ctaTitle||"Sign up"})]})]}),e.jsxs(n.Dialog,{open:y,onClose:v,children:[e.jsx("div",{className:"fixed inset-0 z-50 bg-black/30"}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:e.jsxs(n.DialogPanel,{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-lg ring-1 ring-gray-900/10",children:[e.jsxs("div",{className:"flex items-center justify-between pb-2",children:[e.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Search"}),e.jsx("button",{type:"button",onClick:()=>v(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 hover:bg-gray-100","aria-label":"Close search",children:e.jsx(x.XMarkIcon,{"aria-hidden":"true",className:"size-5"})})]}),e.jsxs("form",{className:"mt-2",onSubmit:t=>{t.preventDefault(),typeof(a==null?void 0:a.onSearch)=="function"&&a.onSearch(k),v(!1)},children:[e.jsx("label",{htmlFor:"site-search",className:"sr-only",children:"Search"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{id:"site-search",type:"search",placeholder:"Search...",autoFocus:!0,value:k,onChange:t=>{const h=t.target.value;w(h),typeof(a==null?void 0:a.onSearchChange)=="function"&&a.onSearchChange(h)},className:"w-full rounded-md border border-gray-300 px-3 py-2 text-gray-900 shadow-sm placeholder:text-gray-400 focus:border-gray-900 focus:outline-none focus:ring-2 focus:ring-gray-900"}),e.jsx("button",{type:"submit",className:"rounded-md bg-gray-900 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-gray-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900",children:"Search"})]})]}),Array.isArray(g)&&g.length>0&&e.jsx("div",{className:"mt-4 divide-y divide-gray-200",children:g.map((t,h)=>{if(!t||typeof t!="object")return null;const p=t.title||t.q||t.name||"Result",j=t.desc||t.description||t.summary||t.a||"",d=typeof(a==null?void 0:a.searchTitleMax)=="number"?a.searchTitleMax:60,C=typeof(a==null?void 0:a.searchDescMax)=="number"?a.searchDescMax:100,z=typeof p=="string"&&p.length>d?`${p.slice(0,d-1)}…`:p,S=typeof j=="string"&&j.length>C?`${j.slice(0,C-1)}…`:j,o=typeof t.link=="string"?t.link:void 0,f=typeof o=="string"&&o.startsWith("/"),M=e.jsxs("div",{className:"flex items-start gap-3 py-3",children:[t!=null&&t.icon?e.jsx("div",{className:"mt-0.5 h-6 w-6 text-gray-500",children:t.icon}):t!=null&&t.image?e.jsx("img",{src:t.image,alt:p,className:"mt-0.5 h-6 w-6 rounded object-cover"}):e.jsx(x.MagnifyingGlassIcon,{"aria-hidden":"true",className:"mt-0.5 size-6 text-gray-400"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:z}),S?e.jsx("div",{className:"text-sm text-gray-500 truncate",children:S}):null]})]});return o?f?e.jsx("a",{href:o,className:"block hover:bg-gray-50",onClick:()=>{typeof(a==null?void 0:a.onBeginNavigate)=="function"&&a.onBeginNavigate(),typeof(a==null?void 0:a.onClearQuickResults)=="function"&&a.onClearQuickResults(),v(!1)},children:M},o||h):e.jsx("a",{href:o,className:"block hover:bg-gray-50",onClick:()=>{typeof(a==null?void 0:a.onBeginNavigate)=="function"&&a.onBeginNavigate(),typeof(a==null?void 0:a.onClearQuickResults)=="function"&&a.onClearQuickResults(),v(!1)},children:M},o||h):e.jsx("div",{className:"block hover:bg-gray-50",children:M},h)})})]})})]}),e.jsxs(n.Dialog,{open:s,onClose:i,className:"lg:hidden",children:[e.jsx("div",{className:"fixed inset-0 z-50"}),e.jsxs(n.DialogPanel,{className:"fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white p-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(N,{href:"/",className:"-m-1.5 p-1.5","aria-label":a.logoAlt||"Home",children:a.logo?e.jsx("img",{alt:a.logoAlt||"Logo",src:a.logo,className:"h-8 w-auto"}):e.jsx("span",{className:"text-lg font-semibold",children:a.fallbackText||"NEXGEN Roofing Systems"})}),e.jsxs("button",{type:"button",onClick:()=>i(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700",children:[e.jsx("span",{className:"sr-only",children:"Close menu"}),e.jsx(x.XMarkIcon,{"aria-hidden":"true",className:"size-6"})]})]}),e.jsx("div",{className:"mt-6 flow-root",children:e.jsxs("div",{className:"-my-6 divide-y divide-gray-500/10",children:[e.jsx("div",{className:"space-y-2 py-6",children:a.menuItems.map(t=>t.subMenu?e.jsxs(n.Disclosure,{as:"div",className:"-mx-3",children:[e.jsxs(n.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base/7 font-semibold text-gray-900 hover:bg-gray-50",children:[t.title,e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none group-data-[open]:rotate-180"})]}),e.jsx(n.DisclosurePanel,{className:"mt-2 space-y-2",children:[...t.subMenu,...t.ctas||[]].map(h=>e.jsx(n.DisclosureButton,{as:"a",href:h.href,className:"block rounded-lg py-2 pl-6 pr-3 text-sm/7 font-semibold text-gray-900 hover:bg-gray-50",children:h.title},h.title))})]},t.id):t.useLink?e.jsx(N,{href:t.href,className:"-mx-3 block rounded-lg px-3 py-2 text-base/7 font-semibold text-gray-900 hover:bg-gray-50",children:t.title},t.id):e.jsx("a",{href:t.href,className:"-mx-3 block rounded-lg px-3 py-2 text-base/7 font-semibold text-gray-900 hover:bg-gray-50",children:t.title},t.id))}),e.jsxs("div",{className:"space-y-2 py-6",children:[a.login&&e.jsxs("a",{href:a.loginHref,className:"-mx-3 block rounded-lg px-3 py-2.5 text-base/7 font-semibold text-gray-900 hover:bg-gray-50",children:["Log in ",e.jsx("span",{"aria-hidden":"true",children:"→"})]}),a.cta&&e.jsx("a",{href:a.ctaBtnHref,className:"-mx-3 block rounded-lg bg-gray-900 px-3 py-2.5 text-base/7 font-semibold text-white hover:bg-gray-800",children:a.ctaTitle||"Sign up"})]})]})})]})]})]})}function $(){return e.jsx(e.Fragment,{children:e.jsx("div",{className:"absolute inset-0 z-50 flex items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4",children:[e.jsx(x.CubeTransparentIcon,{className:"inset-shadow-sm 8 h-16 w-16 animate-[spin_2s_linear_infinite] rounded-full border-4 border-t-4 border-solid border-white text-5xl font-black text-primary"}),e.jsx("div",{className:"mt-16 flex w-full items-center justify-center py-8",children:e.jsx("p",{className:"text-xl font-thin uppercase tracking-widest text-primary",children:"Loading..."})})]})})})}function T({baseConfig:a}){const[u,r]=c.useState([]),[g,s]=c.useState(""),i=c.useRef(null),[l,m]=c.useState(!1),y=async h=>{const p=(h||"").trim();if(!p){r([]);return}try{const j=await fetch(`/api/search?q=${encodeURIComponent(p)}`);if(!j.ok)throw new Error("search failed");const d=await j.json(),C=[...Array.isArray(d==null?void 0:d.services)?d.services:[],...Array.isArray(d==null?void 0:d.faqs)?d.faqs:[],...Array.isArray(d==null?void 0:d.gallery)?d.gallery:[],...Array.isArray(d==null?void 0:d.posts)?d.posts:[],...Array.isArray(d==null?void 0:d.projects)?d.projects:[],...Array.isArray(d==null?void 0:d.locations)?d.locations:[]].filter(o=>o&&typeof o=="object"),z=new Set,S=C.filter(o=>{const f=`${(o.link||"").toLowerCase()}|${(o.title||o.q||"").toLowerCase()}`;return z.has(f)?!1:(z.add(f),!0)}).map(o=>{if(o!=null&&o.icon)return o;const f="h-6 w-6 text-gray-400";switch(o==null?void 0:o.kind){case"faq":return{...o,icon:e.jsx(x.QuestionMarkCircleIcon,{"aria-hidden":"true",className:f})};case"service":return{...o,icon:e.jsx(b.WrenchScrewdriverIcon,{"aria-hidden":"true",className:f})};case"project":return{...o,icon:e.jsx(x.BriefcaseIcon,{"aria-hidden":"true",className:f})};case"post":return{...o,icon:e.jsx(x.NewspaperIcon,{"aria-hidden":"true",className:f})};case"gallery":return{...o,icon:e.jsx(x.PhotoIcon,{"aria-hidden":"true",className:f})};case"location":return{...o,icon:e.jsx(x.MapPinIcon,{"aria-hidden":"true",className:f})};default:return o}});r(S)}catch{r([])}},v=h=>{s(h),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>y(h),300)},k=h=>{const p=(h||"").trim();p&&(m(!0),typeof window<"u"&&(window.location.href=`/search?q=${encodeURIComponent(p)}`))},w=h=>{h||(s(""),r([]),i.current&&clearTimeout(i.current))},t=c.useMemo(()=>({...a,search:!0,onSearchChange:v,onSearch:k,onSearchOpenChange:w,onClearQuickResults:()=>r([]),onBeginNavigate:()=>m(!0)}),[a]);return e.jsxs(e.Fragment,{children:[l&&e.jsx("div",{className:"fixed inset-0 z-[60]",children:e.jsx($,{})}),e.jsx(q,{config:t,quickSearchResults:u})]})}exports.NavController=T;exports.SimpleLight=R;exports.WithFlyout=E;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),n=require("@headlessui/react"),x=require("@heroicons/react/24/outline"),b=require("@heroicons/react/20/solid"),N=require("next/link"),P=require("@heroicons/react/24/solid"),I=[{name:"Analytics",description:"Get a better understanding of your traffic",href:"#",icon:x.ChartPieIcon},{name:"Engagement",description:"Speak directly to your customers",href:"#",icon:x.CursorArrowRaysIcon},{name:"Security",description:"Your customers’ data will be safe and secure",href:"#",icon:x.FingerPrintIcon},{name:"Integrations",description:"Connect with third-party tools",href:"#",icon:x.SquaresPlusIcon},{name:"Automations",description:"Build strategic funnels that will convert",href:"#",icon:x.ArrowPathIcon}],B=[{name:"Watch demo",href:"#",icon:b.PlayCircleIcon},{name:"Contact sales",href:"#",icon:b.PhoneIcon}],D=[{name:"About us",href:"#",description:"Learn more about our company values and mission to empower others"},{name:"Careers",href:"#",description:"Looking for you next career opportunity? See all of our open positions"},{name:"Support",href:"#",description:"Get in touch with our dedicated support team or reach out on our community forums"},{name:"Blog",href:"#",description:"Read our latest announcements and get perspectives from our team"}];function E(){const[a,u]=c.useState(!1);return e.jsxs("header",{className:"bg-white dark:bg-gray-900",children:[e.jsxs("nav",{"aria-label":"Global",className:"mx-auto flex max-w-7xl items-center justify-between p-6 lg:px-8",children:[e.jsx("div",{className:"flex lg:flex-1",children:e.jsxs("a",{href:"#",className:"-m-1.5 p-1.5",children:[e.jsx("span",{className:"sr-only",children:"Your Company"}),e.jsx("img",{alt:"",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=600",className:"h-8 w-auto dark:hidden"}),e.jsx("img",{alt:"",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=500",className:"hidden h-8 w-auto dark:block"})]})}),e.jsx("div",{className:"flex lg:hidden",children:e.jsxs("button",{type:"button",onClick:()=>u(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 dark:text-gray-400",children:[e.jsx("span",{className:"sr-only",children:"Open main menu"}),e.jsx(x.Bars3Icon,{"aria-hidden":"true",className:"size-6"})]})}),e.jsxs(n.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:[e.jsxs(n.Popover,{className:"relative",children:[e.jsxs(n.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 font-semibold text-gray-900 dark:text-white",children:["Product",e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none text-gray-400 dark:text-gray-500"})]}),e.jsxs(n.PopoverPanel,{transition:!0,className:"absolute left-1/2 z-10 mt-3 w-screen max-w-md -translate-x-1/2 overflow-hidden rounded-3xl bg-white shadow-lg outline outline-1 outline-gray-900/5 transition data-[closed]:translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in dark:bg-gray-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10",children:[e.jsx("div",{className:"p-4",children:I.map(r=>e.jsxs("div",{className:"group relative flex items-center gap-x-6 rounded-lg p-4 text-sm/6 hover:bg-gray-50 dark:hover:bg-white/5",children:[e.jsx("div",{className:"flex size-11 flex-none items-center justify-center rounded-lg bg-gray-50 group-hover:bg-white dark:bg-gray-700/50 dark:group-hover:bg-gray-700",children:e.jsx(r.icon,{"aria-hidden":"true",className:"size-6 text-gray-600 group-hover:text-indigo-600 dark:text-gray-400 dark:group-hover:text-white"})}),e.jsxs("div",{className:"flex-auto",children:[e.jsxs("a",{href:r.href,className:"block font-semibold text-gray-900 dark:text-white",children:[r.name,e.jsx("span",{className:"absolute inset-0"})]}),e.jsx("p",{className:"mt-1 text-gray-600 dark:text-gray-400",children:r.description})]})]},r.name))}),e.jsx("div",{className:"grid grid-cols-2 divide-x divide-gray-900/5 bg-gray-50 dark:divide-white/10 dark:bg-gray-700/50",children:B.map(r=>e.jsxs("a",{href:r.href,className:"flex items-center justify-center gap-x-2.5 p-3 text-sm/6 font-semibold text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700/50",children:[e.jsx(r.icon,{"aria-hidden":"true",className:"size-5 flex-none text-gray-400 dark:text-gray-500"}),r.name]},r.name))})]})]}),e.jsx("a",{href:"#",className:"text-sm/6 font-semibold text-gray-900 dark:text-white",children:"Features"}),e.jsx("a",{href:"#",className:"text-sm/6 font-semibold text-gray-900 dark:text-white",children:"Marketplace"}),e.jsxs(n.Popover,{className:"relative",children:[e.jsxs(n.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 font-semibold text-gray-900 dark:text-white",children:["Company",e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none text-gray-400 dark:text-gray-500"})]}),e.jsx(n.PopoverPanel,{transition:!0,className:"absolute left-1/2 z-10 mt-3 w-96 -translate-x-1/2 rounded-3xl bg-white p-4 shadow-lg outline outline-1 outline-gray-900/5 transition data-[closed]:translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in dark:bg-gray-800 dark:-outline-offset-1 dark:outline-white/10",children:D.map(r=>e.jsxs("div",{className:"relative rounded-lg p-4 hover:bg-gray-50 dark:hover:bg-white/5",children:[e.jsxs("a",{href:r.href,className:"block text-sm/6 font-semibold text-gray-900 dark:text-white",children:[r.name,e.jsx("span",{className:"absolute inset-0"})]}),e.jsx("p",{className:"mt-1 text-sm/6 text-gray-600 dark:text-gray-400",children:r.description})]},r.name))})]})]}),e.jsx("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:e.jsxs("a",{href:"#",className:"text-sm/6 font-semibold text-gray-900 dark:text-white",children:["Log in ",e.jsx("span",{"aria-hidden":"true",children:"→"})]})})]}),e.jsxs(n.Dialog,{open:a,onClose:u,className:"lg:hidden",children:[e.jsx("div",{className:"fixed inset-0 z-10"}),e.jsxs(n.DialogPanel,{className:"fixed inset-y-0 right-0 z-10 flex w-full flex-col justify-between overflow-y-auto bg-white sm:max-w-sm sm:ring-1 sm:ring-gray-900/10 dark:bg-gray-900 dark:sm:ring-white/10",children:[e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("a",{href:"#",className:"-m-1.5 p-1.5",children:[e.jsx("span",{className:"sr-only",children:"Your Company"}),e.jsx("img",{alt:"",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=600",className:"h-8 w-auto dark:hidden"}),e.jsx("img",{alt:"",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=500",className:"hidden h-8 w-auto dark:block"})]}),e.jsxs("button",{type:"button",onClick:()=>u(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 dark:text-gray-400",children:[e.jsx("span",{className:"sr-only",children:"Close menu"}),e.jsx(x.XMarkIcon,{"aria-hidden":"true",className:"size-6"})]})]}),e.jsx("div",{className:"mt-6 flow-root",children:e.jsxs("div",{className:"-my-6 divide-y divide-gray-500/10 dark:divide-white/10",children:[e.jsx("div",{className:"space-y-2 py-6",children:I.map(r=>e.jsxs("a",{href:r.href,className:"group -mx-3 flex items-center gap-x-6 rounded-lg p-3 text-base/7 font-semibold text-gray-900 hover:bg-gray-50 dark:text-white dark:hover:bg-white/5",children:[e.jsx("div",{className:"flex size-11 flex-none items-center justify-center rounded-lg bg-gray-50 group-hover:bg-white dark:bg-gray-800 dark:group-hover:bg-gray-700",children:e.jsx(r.icon,{"aria-hidden":"true",className:"size-6 text-gray-600 group-hover:text-indigo-600 dark:text-gray-300 dark:group-hover:text-white"})}),r.name]},r.name))}),e.jsxs("div",{className:"space-y-2 py-6",children:[e.jsx("a",{href:"#",className:"-mx-3 block rounded-lg px-3 py-2 text-base/7 font-semibold text-gray-900 hover:bg-gray-50 dark:text-white dark:hover:bg-white/5",children:"Features"}),e.jsx("a",{href:"#",className:"-mx-3 block rounded-lg px-3 py-2 text-base/7 font-semibold text-gray-900 hover:bg-gray-50 dark:text-white dark:hover:bg-white/5",children:"Marketplace"}),D.map(r=>e.jsx("a",{href:r.href,className:"-mx-3 block rounded-lg px-3 py-2 text-base/7 font-semibold text-gray-900 hover:bg-gray-50 dark:text-white dark:hover:bg-white/5",children:r.name},r.name))]}),e.jsx("div",{className:"py-6",children:e.jsx("a",{href:"#",className:"-mx-3 block rounded-lg px-3 py-2.5 text-base/7 font-semibold text-gray-900 hover:bg-gray-50 dark:text-white dark:hover:bg-white/5",children:"Log in"})})]})})]}),e.jsx("div",{className:"sticky bottom-0 grid grid-cols-2 divide-x divide-gray-900/5 bg-gray-50 text-center dark:divide-white/5 dark:bg-gray-800/50",children:item.ctas.map(r=>e.jsx("a",{href:r.href,className:"p-3 text-base/7 font-semibold text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-800",children:r.title},r.title))})]})]})]})}function R(){return e.jsxs(n.Disclosure,{as:"nav",className:"relative bg-white shadow dark:bg-gray-800/50 dark:shadow-none dark:after:pointer-events-none dark:after:absolute dark:after:inset-x-0 dark:after:bottom-0 dark:after:h-px dark:after:bg-white/10",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:"-ml-2 mr-2 flex items-center md:hidden",children:e.jsxs(n.DisclosureButton,{className:"group relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-600 dark:hover:bg-white/5 dark:hover:text-white dark:focus:ring-white",children:[e.jsx("span",{className:"absolute -inset-0.5"}),e.jsx("span",{className:"sr-only",children:"Open main menu"}),e.jsx(x.Bars3Icon,{"aria-hidden":"true",className:"block size-6 group-data-[open]:hidden"}),e.jsx(x.XMarkIcon,{"aria-hidden":"true",className:"hidden size-6 group-data-[open]:block"})]})}),e.jsxs("div",{className:"flex shrink-0 items-center",children:[e.jsx("img",{alt:"Your Company",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=600",className:"h-8 w-auto dark:hidden"}),e.jsx("img",{alt:"Your Company",src:"https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=500",className:"hidden h-8 w-auto dark:block"})]}),e.jsxs("div",{className:"hidden md:ml-6 md:flex md:space-x-8",children:[e.jsx("a",{href:"#",className:"inline-flex items-center border-b-2 border-indigo-600 px-1 pt-1 text-sm font-medium text-gray-900 dark:border-indigo-500 dark:text-white",children:"Dashboard"}),e.jsx("a",{href:"#",className:"inline-flex items-center border-b-2 border-transparent px-1 pt-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-300 dark:hover:border-white/20 dark:hover:text-white",children:"Team"}),e.jsx("a",{href:"#",className:"inline-flex items-center border-b-2 border-transparent px-1 pt-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-300 dark:hover:border-white/20 dark:hover:text-white",children:"Projects"}),e.jsx("a",{href:"#",className:"inline-flex items-center border-b-2 border-transparent px-1 pt-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-300 dark:hover:border-white/20 dark:hover:text-white",children:"Calendar"})]})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"shrink-0",children:e.jsxs("button",{type:"button",className:"relative inline-flex items-center gap-x-1.5 rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:bg-indigo-500 dark:shadow-none dark:hover:bg-indigo-400 dark:focus-visible:outline-indigo-500",children:[e.jsx(b.PlusIcon,{"aria-hidden":"true",className:"-ml-0.5 size-5"}),"New Job"]})}),e.jsxs("div",{className:"hidden md:ml-4 md:flex md:shrink-0 md:items-center",children:[e.jsxs("button",{type:"button",className:"relative rounded-full p-1 text-gray-400 hover:text-gray-500 focus:outline focus:outline-2 focus:outline-offset-2 focus:outline-indigo-600 dark:hover:text-white dark:focus:outline-indigo-500",children:[e.jsx("span",{className:"absolute -inset-1.5"}),e.jsx("span",{className:"sr-only",children:"View notifications"}),e.jsx(x.BellIcon,{"aria-hidden":"true",className:"size-6"})]}),e.jsxs(n.Menu,{as:"div",className:"relative ml-3",children:[e.jsxs(n.MenuButton,{className:"relative flex rounded-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:focus-visible:outline-indigo-500",children:[e.jsx("span",{className:"absolute -inset-1.5"}),e.jsx("span",{className:"sr-only",children:"Open user menu"}),e.jsx("img",{alt:"",src:"https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",className:"size-8 rounded-full bg-gray-100 outline outline-1 -outline-offset-1 outline-black/5 dark:bg-gray-800 dark:outline-white/10"})]}),e.jsxs(n.MenuItems,{transition:!0,className:"absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg outline outline-1 outline-black/5 transition data-[closed]:scale-95 data-[closed]:transform data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-75 data-[enter]:ease-out data-[leave]:ease-in dark:bg-gray-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10",children:[e.jsx(n.MenuItem,{children:e.jsx("a",{href:"#",className:"block px-4 py-2 text-sm text-gray-700 data-[focus]:bg-gray-100 data-[focus]:outline-none dark:text-gray-300 dark:data-[focus]:bg-white/5",children:"Your profile"})}),e.jsx(n.MenuItem,{children:e.jsx("a",{href:"#",className:"block px-4 py-2 text-sm text-gray-700 data-[focus]:bg-gray-100 data-[focus]:outline-none dark:text-gray-300 dark:data-[focus]:bg-white/5",children:"Settings"})}),e.jsx(n.MenuItem,{children:e.jsx("a",{href:"#",className:"block px-4 py-2 text-sm text-gray-700 data-[focus]:bg-gray-100 data-[focus]:outline-none dark:text-gray-300 dark:data-[focus]:bg-white/5",children:"Sign out"})})]})]})]})]})]})}),e.jsxs(n.DisclosurePanel,{className:"md:hidden",children:[e.jsxs("div",{className:"space-y-1 pb-3 pt-2",children:[e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block border-l-4 border-indigo-600 bg-indigo-50 py-2 pl-3 pr-4 text-base font-medium text-indigo-700 sm:pl-5 sm:pr-6 dark:border-indigo-500 dark:bg-indigo-600/10 dark:text-indigo-400",children:"Dashboard"}),e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block border-l-4 border-transparent py-2 pl-3 pr-4 text-base font-medium text-gray-500 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-800 sm:pl-5 sm:pr-6 dark:text-gray-300 dark:hover:border-white/20 dark:hover:bg-white/5 dark:hover:text-white",children:"Team"}),e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block border-l-4 border-transparent py-2 pl-3 pr-4 text-base font-medium text-gray-500 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-800 sm:pl-5 sm:pr-6 dark:text-gray-300 dark:hover:border-white/20 dark:hover:bg-white/5 dark:hover:text-white",children:"Projects"}),e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block border-l-4 border-transparent py-2 pl-3 pr-4 text-base font-medium text-gray-500 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-800 sm:pl-5 sm:pr-6 dark:text-gray-300 dark:hover:border-white/20 dark:hover:bg-white/5 dark:hover:text-white",children:"Calendar"})]}),e.jsxs("div",{className:"border-t border-gray-200 pb-3 pt-4 dark:border-white/10",children:[e.jsxs("div",{className:"flex items-center px-4 sm:px-6",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("img",{alt:"",src:"https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",className:"size-10 rounded-full bg-gray-100 outline outline-1 -outline-offset-1 outline-black/5 dark:bg-gray-800 dark:outline-white/10"})}),e.jsxs("div",{className:"ml-3",children:[e.jsx("div",{className:"text-base font-medium text-gray-800 dark:text-white",children:"Tom Cook"}),e.jsx("div",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"tom@example.com"})]}),e.jsxs("button",{type:"button",className:"relative ml-auto shrink-0 rounded-full p-1 text-gray-400 hover:text-gray-500 focus:outline focus:outline-2 focus:outline-offset-2 focus:outline-indigo-600 dark:hover:text-white dark:focus:outline-indigo-500",children:[e.jsx("span",{className:"absolute -inset-1.5"}),e.jsx("span",{className:"sr-only",children:"View notifications"}),e.jsx(x.BellIcon,{"aria-hidden":"true",className:"size-6"})]})]}),e.jsxs("div",{className:"mt-3 space-y-1",children:[e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",children:"Your profile"}),e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",children:"Settings"}),e.jsx(n.DisclosureButton,{as:"a",href:"#",className:"block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",children:"Sign out"})]})]})]})]})}function A({item:a,onHover:u}){const r=c.useRef(null);return e.jsx(n.Popover,{children:({open:g})=>e.jsxs("div",{className:"relative",onMouseEnter:()=>{var s;u&&!g&&((s=r.current)==null||s.click())},onMouseLeave:()=>{var s;u&&g&&((s=r.current)==null||s.click())},children:[e.jsxs("div",{className:"flex items-center gap-x-1",children:[a.useLink?e.jsx(N,{href:a.href,className:"text-sm/6 font-semibold text-gray-900 dark:text-white",children:a.title}):e.jsx("span",{className:"text-sm/6 font-semibold text-gray-900 dark:text-white",children:a.title}),e.jsx(n.PopoverButton,{ref:r,className:"inline-flex items-center p-1 text-gray-700 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white","aria-label":`Open ${a.title} menu`,children:e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none"})})]}),e.jsxs(n.PopoverPanel,{transition:!0,className:"absolute left-1/2 z-10 mt-3 w-screen max-w-md -translate-x-1/2 overflow-hidden rounded-3xl bg-white shadow-lg outline outline-1 outline-gray-900/5 transition data-[closed]:translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in dark:bg-gray-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10",children:[e.jsx("div",{className:"p-4",children:a.subMenu.map(s=>e.jsxs("div",{className:"group relative flex items-center gap-x-6 rounded-lg p-4 text-sm/6 hover:bg-gray-50 dark:hover:bg-white/5",children:[e.jsx("div",{className:"flex size-11 flex-none items-center justify-center rounded-lg bg-gray-50 group-hover:bg-white dark:bg-gray-700/50 dark:group-hover:bg-gray-700",children:(()=>{const i=s.icon;if(!i)return null;if(c.isValidElement(i))return c.cloneElement(i,{className:"size-6 text-gray-600 group-hover:text-primary","aria-hidden":!0});if(typeof i=="function"){const l=i;return e.jsx(l,{"aria-hidden":!0,className:"size-6 text-gray-600 group-hover:text-primary"})}return null})()}),e.jsxs("div",{className:"flex-auto",children:[e.jsxs("a",{href:s.href,className:"block font-semibold text-gray-900 dark:text-white",children:[s.title,e.jsx("span",{className:"absolute inset-0"})]}),e.jsx("p",{className:"mt-1 text-gray-600 dark:text-gray-400",children:s.description})]})]},s.title))}),e.jsx("div",{className:"grid grid-cols-2 divide-x divide-gray-900/5 bg-gray-50 dark:divide-white/10 dark:bg-gray-700/50",children:a.ctas&&a.ctas.map(s=>e.jsxs("a",{href:s.href,className:"flex items-center justify-center gap-x-2.5 p-3 text-sm/6 font-semibold text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700/50",children:[(()=>{const i=s.icon;if(!i)return null;if(c.isValidElement(i))return c.cloneElement(i,{className:"size-5 flex-none text-gray-400","aria-hidden":!0});if(typeof i=="function"){const l=i;return e.jsx(l,{"aria-hidden":!0,className:"size-5 flex-none text-gray-400"})}return null})(),s.title]},s.title))})]})]})})}function L({item:a,onHover:u}){const r=c.useRef(null);return e.jsx(n.Popover,{children:({open:g})=>e.jsxs("div",{onMouseEnter:()=>{var s;u&&!g&&((s=r.current)==null||s.click())},onMouseLeave:()=>{var s;u&&g&&((s=r.current)==null||s.click())},children:[e.jsxs("div",{className:"flex items-center gap-x-1",children:[a.useLink?e.jsx(N,{href:a.href,className:"text-sm/6 font-semibold text-gray-900",children:a.title}):e.jsx("span",{className:"text-sm/6 font-semibold text-gray-900",children:a.title}),e.jsx(n.PopoverButton,{ref:r,className:"inline-flex items-center p-1 text-gray-700 hover:text-gray-900","aria-label":`Open ${a.title} menu`,children:e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none"})})]}),e.jsxs(n.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-white pt-14 shadow-lg ring-1 ring-gray-900/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[e.jsx("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 xl:gap-x-8",children:a.subMenu.map(s=>e.jsxs("div",{className:"group relative rounded-lg p-6 text-sm/6 hover:bg-gray-50",children:[s.image?e.jsx("div",{className:"aspect-[4/3] w-full overflow-hidden rounded-md bg-gray-100",children:e.jsx("img",{alt:s.imageAlt||s.title,src:s.image,className:"h-full w-full object-cover transition-transform duration-200 group-hover:scale-105"})}):e.jsx("div",{className:"flex size-11 items-center justify-center rounded-lg bg-gray-50 group-hover:bg-white",children:(()=>{const i=s.icon;if(!i)return null;if(c.isValidElement(i))return c.cloneElement(i,{className:"size-6 text-gray-600 group-hover:text-primary","aria-hidden":!0});if(typeof i=="function"){const l=i;return e.jsx(l,{"aria-hidden":!0,className:"size-6 text-gray-600 group-hover:text-primary"})}return null})()}),e.jsxs("a",{href:s.href,className:`${s.image?"mt-4":"mt-6"} block font-semibold text-gray-900`,children:[s.title,e.jsx("span",{className:"absolute inset-0"})]}),e.jsx("p",{className:"mt-1 text-gray-600",children:s.description})]},s.title))}),e.jsx("div",{className:"bg-gray-50",children:a.ctas&&e.jsx("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:e.jsx("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.ctas.map(s=>e.jsxs("a",{href:s.href,className:"flex items-center justify-center gap-x-2.5 p-3 text-sm/6 font-semibold text-gray-900 hover:bg-gray-100",children:[(()=>{const i=s.icon;if(!i)return null;if(c.isValidElement(i))return c.cloneElement(i,{className:"size-5 flex-none text-gray-400","aria-hidden":!0});if(typeof i=="function"){const l=i;return e.jsx(l,{"aria-hidden":!0,className:"size-5 flex-none text-gray-400"})}return null})(),s.title]},s.title))})})})]})]})},a.id)}function O({item:a,onHover:u}){const r=c.useRef(null);return e.jsx(n.Popover,{children:({open:g})=>{var s,i;return e.jsxs("div",{className:"relative",onMouseEnter:()=>{var l;u&&!g&&((l=r.current)==null||l.click())},onMouseLeave:()=>{var l;u&&g&&((l=r.current)==null||l.click())},children:[e.jsxs("div",{className:"flex items-center gap-x-1",children:[a.useLink?e.jsx(N,{href:a.href,className:"text-sm/6 font-semibold text-gray-900",children:a.title}):e.jsx("span",{className:"text-sm/6 font-semibold text-gray-900",children:a.title}),e.jsx(n.PopoverButton,{ref:r,className:"inline-flex items-center p-1 text-gray-700 hover:text-gray-900","aria-label":`Open ${a.title} menu`,children:e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none"})})]}),e.jsx(n.PopoverPanel,{transition:!0,className:"absolute left-1/2 z-10 mt-3 w-72 -translate-x-1/2 overflow-hidden rounded-2xl bg-white p-2 shadow-lg ring-1 ring-gray-900/5 transition data-[closed]:translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:e.jsxs("ul",{className:"space-y-1",children:[(s=a.subMenu)==null?void 0:s.map(l=>e.jsx("li",{className:"group",children:e.jsxs(N,{href:l.href,className:"flex items-center rounded-md px-3 py-2 text-sm text-gray-400 transition-colors duration-300 group-hover:text-black",children:[(()=>{const m=l.icon;if(!m)return e.jsx(P.ChevronRightIcon,{className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary"});if(c.isValidElement(m))return c.cloneElement(m,{className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary","aria-hidden":!0});if(typeof m=="function"){const y=m;return e.jsx(y,{"aria-hidden":!0,className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary"})}return null})(),e.jsx("span",{children:l.title})]})},l.title)),(i=a.ctas)==null?void 0:i.map(l=>e.jsx("li",{className:"group",children:e.jsxs("a",{href:l.href,className:"flex items-center rounded-md px-3 py-2 text-sm text-gray-400 transition-colors duration-300 group-hover:text-black",children:[(()=>{const m=l.icon;if(!m)return e.jsx(P.ChevronRightIcon,{className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary"});if(c.isValidElement(m))return c.cloneElement(m,{className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary","aria-hidden":!0});if(typeof m=="function"){const y=m;return e.jsx(y,{"aria-hidden":!0,className:"mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary"})}return null})(),e.jsx("span",{children:l.title})]})},l.title))]})})]})}})}function q({config:a,onScrolledChange:u,scrollThreshold:r=10,quickSearchResults:g=[]}){const[s,i]=c.useState(!1),[l,m]=c.useState(!1),[y,v]=c.useState(!1),[k,w]=c.useState("");return c.useEffect(()=>{typeof(a==null?void 0:a.onSearchOpenChange)=="function"&&a.onSearchOpenChange(y),y||(w(""),typeof(a==null?void 0:a.onClearQuickResults)=="function"&&a.onClearQuickResults())},[y]),c.useEffect(()=>{const t=()=>{const h=window.scrollY>r;m(p=>(p!==h&&typeof u=="function"&&u(h),h))};return t(),window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[u,r]),e.jsxs("header",{className:`${a!=null&&a.sticky?"sticky top-0 z-50 bg-white/95 backdrop-blur supports-[backdrop-filter]:bg-white/70":"relative z-10"} isolate bg-white`,children:[e.jsxs("nav",{"aria-label":"Global",className:"mx-auto flex max-w-7xl items-center justify-between p-6 lg:px-8",children:[e.jsx("div",{className:"flex lg:flex-1",children:e.jsx(N,{href:"/","aria-label":a.logoAlt||"Home",children:a.logo?e.jsx("img",{alt:a.logoAlt||"Logo",src:a.logo,className:`w-auto transition-all duration-300 ${l?"h-8 md:h-14":"h-12 md:h-20"}`}):e.jsx("div",{className:`h-auto transition-all duration-300 ${l?"w-28":"w-32"}`,children:e.jsx("h1",{className:`transition-all duration-300 ${l?"text-xl":"text-2xl"}`,children:a.fallbackText||"<NovaNav>"})})})}),e.jsx("div",{className:"flex lg:hidden",children:e.jsxs("button",{type:"button",onClick:()=>i(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700",children:[e.jsx("span",{className:"sr-only",children:"Open main menu"}),e.jsx(x.Bars3Icon,{"aria-hidden":"true",className:"size-6"})]})}),e.jsx(n.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:a.menuItems.map(t=>{const h=t.type||(t.full?"full":"default");return t.subMenu?h==="full"?e.jsx(L,{item:t,onHover:t.onHover},t.id||t.title):h==="simple"?e.jsx(O,{item:t,onHover:t.onHover},t.id||t.title):e.jsx(A,{item:t,onHover:t.onHover},t.id||t.title):t.useLink?e.jsx(N,{href:t.href,className:"text-sm/6 font-semibold text-gray-900",children:t.title},t.id):e.jsx("a",{href:t.href,className:"text-sm/6 font-semibold text-gray-900",children:t.title},t.id)})}),e.jsxs("div",{className:"hidden gap-4 lg:flex lg:flex-1 lg:justify-end",children:[a.search&&e.jsx("button",{type:"button",onClick:()=>v(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 hover:bg-gray-100","aria-label":"Open search",children:e.jsx(x.MagnifyingGlassIcon,{"aria-hidden":"true",className:"size-6"})}),a.login&&e.jsxs("a",{href:a.loginHref,className:"text-sm/6 font-semibold text-gray-900",children:["Log in ",e.jsx("span",{"aria-hidden":"true",children:"→"})]}),a.cta&&e.jsx("a",{href:a.ctaBtnHref,className:"rounded-md bg-gray-900 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-gray-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900",children:a.ctaTitle||"Sign up"})]})]}),e.jsxs(n.Dialog,{open:y,onClose:v,children:[e.jsx("div",{className:"fixed inset-0 z-50 bg-black/30"}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:e.jsxs(n.DialogPanel,{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-lg ring-1 ring-gray-900/10",children:[e.jsxs("div",{className:"flex items-center justify-between pb-2",children:[e.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Search"}),e.jsx("button",{type:"button",onClick:()=>v(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 hover:bg-gray-100","aria-label":"Close search",children:e.jsx(x.XMarkIcon,{"aria-hidden":"true",className:"size-5"})})]}),e.jsxs("form",{className:"mt-2",onSubmit:t=>{t.preventDefault(),typeof(a==null?void 0:a.onSearch)=="function"&&a.onSearch(k),v(!1)},children:[e.jsx("label",{htmlFor:"site-search",className:"sr-only",children:"Search"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{id:"site-search",type:"search",placeholder:"Search...",autoFocus:!0,value:k,onChange:t=>{const h=t.target.value;w(h),typeof(a==null?void 0:a.onSearchChange)=="function"&&a.onSearchChange(h)},className:"w-full rounded-md border border-gray-300 px-3 py-2 text-gray-900 shadow-sm placeholder:text-gray-400 focus:border-gray-900 focus:outline-none focus:ring-2 focus:ring-gray-900"}),e.jsx("button",{type:"submit",className:"rounded-md bg-gray-900 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-gray-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900",children:"Search"})]})]}),Array.isArray(g)&&g.length>0&&e.jsx("div",{className:"mt-4 divide-y divide-gray-200",children:g.map((t,h)=>{if(!t||typeof t!="object")return null;const p=t.title||t.q||t.name||"Result",j=t.desc||t.description||t.summary||t.a||"",d=typeof(a==null?void 0:a.searchTitleMax)=="number"?a.searchTitleMax:60,C=typeof(a==null?void 0:a.searchDescMax)=="number"?a.searchDescMax:100,z=typeof p=="string"&&p.length>d?`${p.slice(0,d-1)}…`:p,S=typeof j=="string"&&j.length>C?`${j.slice(0,C-1)}…`:j,o=typeof t.link=="string"?t.link:void 0,f=typeof o=="string"&&o.startsWith("/"),M=e.jsxs("div",{className:"flex items-start gap-3 py-3",children:[t!=null&&t.icon?e.jsx("div",{className:"mt-0.5 h-6 w-6 text-gray-500",children:t.icon}):t!=null&&t.image?e.jsx("img",{src:t.image,alt:p,className:"mt-0.5 h-6 w-6 rounded object-cover"}):e.jsx(x.MagnifyingGlassIcon,{"aria-hidden":"true",className:"mt-0.5 size-6 text-gray-400"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:z}),S?e.jsx("div",{className:"text-sm text-gray-500 truncate",children:S}):null]})]});return o?f?e.jsx("a",{href:o,className:"block hover:bg-gray-50",onClick:()=>{typeof(a==null?void 0:a.onBeginNavigate)=="function"&&a.onBeginNavigate(),typeof(a==null?void 0:a.onClearQuickResults)=="function"&&a.onClearQuickResults(),v(!1)},children:M},o||h):e.jsx("a",{href:o,className:"block hover:bg-gray-50",onClick:()=>{typeof(a==null?void 0:a.onBeginNavigate)=="function"&&a.onBeginNavigate(),typeof(a==null?void 0:a.onClearQuickResults)=="function"&&a.onClearQuickResults(),v(!1)},children:M},o||h):e.jsx("div",{className:"block hover:bg-gray-50",children:M},h)})})]})})]}),e.jsxs(n.Dialog,{open:s,onClose:i,className:"lg:hidden",children:[e.jsx("div",{className:"fixed inset-0 z-50"}),e.jsxs(n.DialogPanel,{className:"fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white p-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(N,{href:"/",className:"-m-1.5 p-1.5","aria-label":a.logoAlt||"Home",children:a.logo?e.jsx("img",{alt:a.logoAlt||"Logo",src:a.logo,className:"h-8 w-auto"}):e.jsx("span",{className:"text-lg font-semibold",children:a.fallbackText||"NEXGEN Roofing Systems"})}),e.jsxs("button",{type:"button",onClick:()=>i(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700",children:[e.jsx("span",{className:"sr-only",children:"Close menu"}),e.jsx(x.XMarkIcon,{"aria-hidden":"true",className:"size-6"})]})]}),e.jsx("div",{className:"mt-6 flow-root",children:e.jsxs("div",{className:"-my-6 divide-y divide-gray-500/10",children:[e.jsx("div",{className:"space-y-2 py-6",children:a.menuItems.map(t=>t.subMenu?e.jsxs(n.Disclosure,{as:"div",className:"-mx-3",children:[e.jsxs(n.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base/7 font-semibold text-gray-900 hover:bg-gray-50",children:[t.title,e.jsx(b.ChevronDownIcon,{"aria-hidden":"true",className:"size-5 flex-none group-data-[open]:rotate-180"})]}),e.jsx(n.DisclosurePanel,{className:"mt-2 space-y-2",children:[...t.subMenu,...t.ctas||[]].map(h=>e.jsx(n.DisclosureButton,{as:"a",href:h.href,className:"block rounded-lg py-2 pl-6 pr-3 text-sm/7 font-semibold text-gray-900 hover:bg-gray-50",children:h.title},h.title))})]},t.id):t.useLink?e.jsx(N,{href:t.href,className:"-mx-3 block rounded-lg px-3 py-2 text-base/7 font-semibold text-gray-900 hover:bg-gray-50",children:t.title},t.id):e.jsx("a",{href:t.href,className:"-mx-3 block rounded-lg px-3 py-2 text-base/7 font-semibold text-gray-900 hover:bg-gray-50",children:t.title},t.id))}),e.jsxs("div",{className:"space-y-2 py-6",children:[a.login&&e.jsxs("a",{href:a.loginHref,className:"-mx-3 block rounded-lg px-3 py-2.5 text-base/7 font-semibold text-gray-900 hover:bg-gray-50",children:["Log in ",e.jsx("span",{"aria-hidden":"true",children:"→"})]}),a.cta&&e.jsx("a",{href:a.ctaBtnHref,className:"-mx-3 block rounded-lg bg-gray-900 px-3 py-2.5 text-base/7 font-semibold text-white hover:bg-gray-800",children:a.ctaTitle||"Sign up"})]})]})})]})]})]})}function $(){return e.jsx(e.Fragment,{children:e.jsx("div",{className:"absolute inset-0 z-50 flex items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4",children:[e.jsx(x.CubeTransparentIcon,{className:"inset-shadow-sm 8 h-16 w-16 animate-[spin_2s_linear_infinite] rounded-full border-4 border-t-4 border-solid border-white text-5xl font-black text-primary"}),e.jsx("div",{className:"mt-16 flex w-full items-center justify-center py-8",children:e.jsx("p",{className:"text-xl font-thin uppercase tracking-widest text-primary",children:"Loading..."})})]})})})}function T({baseConfig:a}){const[u,r]=c.useState([]),[g,s]=c.useState(""),i=c.useRef(null),[l,m]=c.useState(!1),y=async h=>{const p=(h||"").trim();if(!p){r([]);return}try{const j=await fetch(`/api/search?q=${encodeURIComponent(p)}`);if(!j.ok)throw new Error("search failed");const d=await j.json(),C=[...Array.isArray(d==null?void 0:d.services)?d.services:[],...Array.isArray(d==null?void 0:d.faqs)?d.faqs:[],...Array.isArray(d==null?void 0:d.gallery)?d.gallery:[],...Array.isArray(d==null?void 0:d.posts)?d.posts:[],...Array.isArray(d==null?void 0:d.projects)?d.projects:[],...Array.isArray(d==null?void 0:d.locations)?d.locations:[]].filter(o=>o&&typeof o=="object"),z=new Set,S=C.filter(o=>{const f=`${(o.link||"").toLowerCase()}|${(o.title||o.q||"").toLowerCase()}`;return z.has(f)?!1:(z.add(f),!0)}).map(o=>{if(o!=null&&o.icon)return o;const f="h-6 w-6 text-gray-400";switch(o==null?void 0:o.kind){case"faq":return{...o,icon:e.jsx(x.QuestionMarkCircleIcon,{"aria-hidden":"true",className:f})};case"service":return{...o,icon:e.jsx(b.WrenchScrewdriverIcon,{"aria-hidden":"true",className:f})};case"project":return{...o,icon:e.jsx(x.BriefcaseIcon,{"aria-hidden":"true",className:f})};case"post":return{...o,icon:e.jsx(x.NewspaperIcon,{"aria-hidden":"true",className:f})};case"gallery":return{...o,icon:e.jsx(x.PhotoIcon,{"aria-hidden":"true",className:f})};case"location":return{...o,icon:e.jsx(x.MapPinIcon,{"aria-hidden":"true",className:f})};default:return o}});r(S)}catch{r([])}},v=h=>{s(h),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>y(h),300)},k=h=>{const p=(h||"").trim();p&&(m(!0),typeof window<"u"&&(window.location.href=`/search?q=${encodeURIComponent(p)}`))},w=h=>{h||(s(""),r([]),i.current&&clearTimeout(i.current))},t=c.useMemo(()=>({...a,search:!0,onSearchChange:v,onSearch:k,onSearchOpenChange:w,onClearQuickResults:()=>r([]),onBeginNavigate:()=>m(!0)}),[a]);return e.jsxs(e.Fragment,{children:[l&&e.jsx("div",{className:"fixed inset-0 z-[60]",children:e.jsx($,{})}),e.jsx(q,{config:t,quickSearchResults:u})]})}exports.NavController=T;exports.SimpleLight=R;exports.WithFlyout=E;
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs as t, jsx as e, Fragment as Y } from "react/jsx-runtime";
2
3
  import x, { useState as N, useRef as I, useEffect as Q, useMemo as _ } from "react";
3
4
  import { PopoverGroup as G, Popover as C, PopoverButton as z, PopoverPanel as j, Dialog as B, DialogPanel as D, Disclosure as W, DisclosureButton as p, Menu as U, MenuButton as X, MenuItems as K, MenuItem as P, DisclosurePanel as J } from "@headlessui/react";
@@ -616,14 +617,27 @@ function xe({ item: a, onHover: h }) {
616
617
  },
617
618
  children: [
618
619
  /* @__PURE__ */ t("div", { className: "flex items-center gap-x-1", children: [
619
- a.useLink ? /* @__PURE__ */ e(k, { href: a.href, className: "text-sm/6 font-semibold text-gray-900 dark:text-white", children: a.title }) : /* @__PURE__ */ e("span", { className: "text-sm/6 font-semibold text-gray-900 dark:text-white", children: a.title }),
620
+ a.useLink ? /* @__PURE__ */ e(
621
+ k,
622
+ {
623
+ href: a.href,
624
+ className: "text-sm/6 font-semibold text-gray-900 dark:text-white",
625
+ children: a.title
626
+ }
627
+ ) : /* @__PURE__ */ e("span", { className: "text-sm/6 font-semibold text-gray-900 dark:text-white", children: a.title }),
620
628
  /* @__PURE__ */ e(
621
629
  z,
622
630
  {
623
631
  ref: s,
624
632
  className: "inline-flex items-center p-1 text-gray-700 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white",
625
633
  "aria-label": `Open ${a.title} menu`,
626
- children: /* @__PURE__ */ e(w, { "aria-hidden": "true", className: "size-5 flex-none" })
634
+ children: /* @__PURE__ */ e(
635
+ w,
636
+ {
637
+ "aria-hidden": "true",
638
+ className: "size-5 flex-none"
639
+ }
640
+ )
627
641
  }
628
642
  )
629
643
  ] }),
@@ -643,7 +657,13 @@ function xe({ item: a, onHover: h }) {
643
657
  return n ? x.isValidElement(n) ? x.cloneElement(n, {
644
658
  className: "size-6 text-gray-600 group-hover:text-primary",
645
659
  "aria-hidden": !0
646
- }) : typeof n == "function" ? /* @__PURE__ */ e(n, { "aria-hidden": !0, className: "size-6 text-gray-600 group-hover:text-primary" }) : null : null;
660
+ }) : typeof n == "function" ? /* @__PURE__ */ e(
661
+ n,
662
+ {
663
+ "aria-hidden": !0,
664
+ className: "size-6 text-gray-600 group-hover:text-primary"
665
+ }
666
+ ) : null : null;
647
667
  })() }),
648
668
  /* @__PURE__ */ t("div", { className: "flex-auto", children: [
649
669
  /* @__PURE__ */ t(
@@ -674,7 +694,13 @@ function xe({ item: a, onHover: h }) {
674
694
  return n ? x.isValidElement(n) ? x.cloneElement(n, {
675
695
  className: "size-5 flex-none text-gray-400",
676
696
  "aria-hidden": !0
677
- }) : typeof n == "function" ? /* @__PURE__ */ e(n, { "aria-hidden": !0, className: "size-5 flex-none text-gray-400" }) : null : null;
697
+ }) : typeof n == "function" ? /* @__PURE__ */ e(
698
+ n,
699
+ {
700
+ "aria-hidden": !0,
701
+ className: "size-5 flex-none text-gray-400"
702
+ }
703
+ ) : null : null;
678
704
  })(),
679
705
  i.title
680
706
  ]
@@ -703,14 +729,27 @@ function fe({ item: a, onHover: h }) {
703
729
  },
704
730
  children: [
705
731
  /* @__PURE__ */ t("div", { className: "flex items-center gap-x-1", children: [
706
- a.useLink ? /* @__PURE__ */ e(k, { href: a.href, className: "text-sm/6 font-semibold text-gray-900", children: a.title }) : /* @__PURE__ */ e("span", { className: "text-sm/6 font-semibold text-gray-900", children: a.title }),
732
+ a.useLink ? /* @__PURE__ */ e(
733
+ k,
734
+ {
735
+ href: a.href,
736
+ className: "text-sm/6 font-semibold text-gray-900",
737
+ children: a.title
738
+ }
739
+ ) : /* @__PURE__ */ e("span", { className: "text-sm/6 font-semibold text-gray-900", children: a.title }),
707
740
  /* @__PURE__ */ e(
708
741
  z,
709
742
  {
710
743
  ref: s,
711
744
  className: "inline-flex items-center p-1 text-gray-700 hover:text-gray-900",
712
745
  "aria-label": `Open ${a.title} menu`,
713
- children: /* @__PURE__ */ e(w, { "aria-hidden": "true", className: "size-5 flex-none" })
746
+ children: /* @__PURE__ */ e(
747
+ w,
748
+ {
749
+ "aria-hidden": "true",
750
+ className: "size-5 flex-none"
751
+ }
752
+ )
714
753
  }
715
754
  )
716
755
  ] }),
@@ -737,7 +776,13 @@ function fe({ item: a, onHover: h }) {
737
776
  return n ? x.isValidElement(n) ? x.cloneElement(n, {
738
777
  className: "size-6 text-gray-600 group-hover:text-primary",
739
778
  "aria-hidden": !0
740
- }) : typeof n == "function" ? /* @__PURE__ */ e(n, { "aria-hidden": !0, className: "size-6 text-gray-600 group-hover:text-primary" }) : null : null;
779
+ }) : typeof n == "function" ? /* @__PURE__ */ e(
780
+ n,
781
+ {
782
+ "aria-hidden": !0,
783
+ className: "size-6 text-gray-600 group-hover:text-primary"
784
+ }
785
+ ) : null : null;
741
786
  })() }),
742
787
  /* @__PURE__ */ t(
743
788
  "a",
@@ -766,7 +811,13 @@ function fe({ item: a, onHover: h }) {
766
811
  return n ? x.isValidElement(n) ? x.cloneElement(n, {
767
812
  className: "size-5 flex-none text-gray-400",
768
813
  "aria-hidden": !0
769
- }) : typeof n == "function" ? /* @__PURE__ */ e(n, { "aria-hidden": !0, className: "size-5 flex-none text-gray-400" }) : null : null;
814
+ }) : typeof n == "function" ? /* @__PURE__ */ e(
815
+ n,
816
+ {
817
+ "aria-hidden": !0,
818
+ className: "size-5 flex-none text-gray-400"
819
+ }
820
+ ) : null : null;
770
821
  })(),
771
822
  i.title
772
823
  ]
@@ -798,14 +849,27 @@ function pe({ item: a, onHover: h }) {
798
849
  },
799
850
  children: [
800
851
  /* @__PURE__ */ t("div", { className: "flex items-center gap-x-1", children: [
801
- a.useLink ? /* @__PURE__ */ e(k, { href: a.href, className: "text-sm/6 font-semibold text-gray-900", children: a.title }) : /* @__PURE__ */ e("span", { className: "text-sm/6 font-semibold text-gray-900", children: a.title }),
852
+ a.useLink ? /* @__PURE__ */ e(
853
+ k,
854
+ {
855
+ href: a.href,
856
+ className: "text-sm/6 font-semibold text-gray-900",
857
+ children: a.title
858
+ }
859
+ ) : /* @__PURE__ */ e("span", { className: "text-sm/6 font-semibold text-gray-900", children: a.title }),
802
860
  /* @__PURE__ */ e(
803
861
  z,
804
862
  {
805
863
  ref: s,
806
864
  className: "inline-flex items-center p-1 text-gray-700 hover:text-gray-900",
807
865
  "aria-label": `Open ${a.title} menu`,
808
- children: /* @__PURE__ */ e(w, { "aria-hidden": "true", className: "size-5 flex-none" })
866
+ children: /* @__PURE__ */ e(
867
+ w,
868
+ {
869
+ "aria-hidden": "true",
870
+ className: "size-5 flex-none"
871
+ }
872
+ )
809
873
  }
810
874
  )
811
875
  ] }),
@@ -826,7 +890,13 @@ function pe({ item: a, onHover: h }) {
826
890
  return m ? x.isValidElement(m) ? x.cloneElement(m, {
827
891
  className: "mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary",
828
892
  "aria-hidden": !0
829
- }) : typeof m == "function" ? /* @__PURE__ */ e(m, { "aria-hidden": !0, className: "mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary" }) : null : /* @__PURE__ */ e(F, { className: "mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary" });
893
+ }) : typeof m == "function" ? /* @__PURE__ */ e(
894
+ m,
895
+ {
896
+ "aria-hidden": !0,
897
+ className: "mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary"
898
+ }
899
+ ) : null : /* @__PURE__ */ e(F, { className: "mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary" });
830
900
  })(),
831
901
  /* @__PURE__ */ e("span", { children: c.title })
832
902
  ]
@@ -843,7 +913,13 @@ function pe({ item: a, onHover: h }) {
843
913
  return m ? x.isValidElement(m) ? x.cloneElement(m, {
844
914
  className: "mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary",
845
915
  "aria-hidden": !0
846
- }) : typeof m == "function" ? /* @__PURE__ */ e(m, { "aria-hidden": !0, className: "mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary" }) : null : /* @__PURE__ */ e(F, { className: "mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary" });
916
+ }) : typeof m == "function" ? /* @__PURE__ */ e(
917
+ m,
918
+ {
919
+ "aria-hidden": !0,
920
+ className: "mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary"
921
+ }
922
+ ) : null : /* @__PURE__ */ e(F, { className: "mr-2 h-5 w-5 text-gray-500 transition-all duration-300 group-hover:mr-3 group-hover:text-primary" });
847
923
  })(),
848
924
  /* @__PURE__ */ e("span", { children: c.title })
849
925
  ]
@@ -857,7 +933,12 @@ function pe({ item: a, onHover: h }) {
857
933
  );
858
934
  } });
859
935
  }
860
- function ye({ config: a, onScrolledChange: h, scrollThreshold: s = 10, quickSearchResults: u = [] }) {
936
+ function ye({
937
+ config: a,
938
+ onScrolledChange: h,
939
+ scrollThreshold: s = 10,
940
+ quickSearchResults: u = []
941
+ }) {
861
942
  const [i, n] = N(!1), [c, m] = N(!1), [y, b] = N(!1), [S, M] = N("");
862
943
  return Q(() => {
863
944
  typeof (a == null ? void 0 : a.onSearchOpenChange) == "function" && a.onSearchOpenChange(y), y || (M(""), typeof (a == null ? void 0 : a.onClearQuickResults) == "function" && a.onClearQuickResults());
@@ -885,7 +966,19 @@ function ye({ config: a, onScrolledChange: h, scrollThreshold: s = 10, quickSear
885
966
  src: a.logo,
886
967
  className: `w-auto transition-all duration-300 ${c ? "h-8 md:h-14" : "h-12 md:h-20"}`
887
968
  }
888
- ) : /* @__PURE__ */ e("div", { className: `h-auto transition-all duration-300 ${c ? "w-28" : "w-32"}`, children: /* @__PURE__ */ e("h1", { className: `transition-all duration-300 ${c ? "text-xl" : "text-2xl"}`, children: a.fallbackText || "<NovaNav>" }) }) }) }),
969
+ ) : /* @__PURE__ */ e(
970
+ "div",
971
+ {
972
+ className: `h-auto transition-all duration-300 ${c ? "w-28" : "w-32"}`,
973
+ children: /* @__PURE__ */ e(
974
+ "h1",
975
+ {
976
+ className: `transition-all duration-300 ${c ? "text-xl" : "text-2xl"}`,
977
+ children: a.fallbackText || "<NovaNav>"
978
+ }
979
+ )
980
+ }
981
+ ) }) }),
889
982
  /* @__PURE__ */ e("div", { className: "flex lg:hidden", children: /* @__PURE__ */ t(
890
983
  "button",
891
984
  {
@@ -900,7 +993,28 @@ function ye({ config: a, onScrolledChange: h, scrollThreshold: s = 10, quickSear
900
993
  ) }),
901
994
  /* @__PURE__ */ e(G, { className: "hidden lg:flex lg:gap-x-12", children: a.menuItems.map((r) => {
902
995
  const d = r.type || (r.full ? "full" : "default");
903
- return r.subMenu ? d === "full" ? /* @__PURE__ */ e(fe, { item: r, onHover: r.onHover }, r.id || r.title) : d === "simple" ? /* @__PURE__ */ e(pe, { item: r, onHover: r.onHover }, r.id || r.title) : /* @__PURE__ */ e(xe, { item: r, onHover: r.onHover }, r.id || r.title) : r.useLink ? /* @__PURE__ */ e(
996
+ return r.subMenu ? d === "full" ? /* @__PURE__ */ e(
997
+ fe,
998
+ {
999
+ item: r,
1000
+ onHover: r.onHover
1001
+ },
1002
+ r.id || r.title
1003
+ ) : d === "simple" ? /* @__PURE__ */ e(
1004
+ pe,
1005
+ {
1006
+ item: r,
1007
+ onHover: r.onHover
1008
+ },
1009
+ r.id || r.title
1010
+ ) : /* @__PURE__ */ e(
1011
+ xe,
1012
+ {
1013
+ item: r,
1014
+ onHover: r.onHover
1015
+ },
1016
+ r.id || r.title
1017
+ ) : r.useLink ? /* @__PURE__ */ e(
904
1018
  k,
905
1019
  {
906
1020
  href: r.href,
@@ -1008,7 +1122,20 @@ function ye({ config: a, onScrolledChange: h, scrollThreshold: s = 10, quickSear
1008
1122
  Array.isArray(u) && u.length > 0 && /* @__PURE__ */ e("div", { className: "mt-4 divide-y divide-gray-200", children: u.map((r, d) => {
1009
1123
  if (!r || typeof r != "object") return null;
1010
1124
  const g = r.title || r.q || r.name || "Result", v = r.desc || r.description || r.summary || r.a || "", o = typeof (a == null ? void 0 : a.searchTitleMax) == "number" ? a.searchTitleMax : 60, E = typeof (a == null ? void 0 : a.searchDescMax) == "number" ? a.searchDescMax : 100, A = typeof g == "string" && g.length > o ? `${g.slice(0, o - 1)}…` : g, L = typeof v == "string" && v.length > E ? `${v.slice(0, E - 1)}…` : v, l = typeof r.link == "string" ? r.link : void 0, f = typeof l == "string" && l.startsWith("/"), O = /* @__PURE__ */ t("div", { className: "flex items-start gap-3 py-3", children: [
1011
- r != null && r.icon ? /* @__PURE__ */ e("div", { className: "mt-0.5 h-6 w-6 text-gray-500", children: r.icon }) : r != null && r.image ? /* @__PURE__ */ e("img", { src: r.image, alt: g, className: "mt-0.5 h-6 w-6 rounded object-cover" }) : /* @__PURE__ */ e(q, { "aria-hidden": "true", className: "mt-0.5 size-6 text-gray-400" }),
1125
+ r != null && r.icon ? /* @__PURE__ */ e("div", { className: "mt-0.5 h-6 w-6 text-gray-500", children: r.icon }) : r != null && r.image ? /* @__PURE__ */ e(
1126
+ "img",
1127
+ {
1128
+ src: r.image,
1129
+ alt: g,
1130
+ className: "mt-0.5 h-6 w-6 rounded object-cover"
1131
+ }
1132
+ ) : /* @__PURE__ */ e(
1133
+ q,
1134
+ {
1135
+ "aria-hidden": "true",
1136
+ className: "mt-0.5 size-6 text-gray-400"
1137
+ }
1138
+ ),
1012
1139
  /* @__PURE__ */ t("div", { children: [
1013
1140
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-gray-900 truncate", children: A }),
1014
1141
  L ? /* @__PURE__ */ e("div", { className: "text-sm text-gray-500 truncate", children: L }) : null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactfast/nav",
3
- "version": "0.2.19",
3
+ "version": "0.2.22",
4
4
  "description": "Composable React navigation bars, headers, and footers with Headless UI.",
5
5
  "main": "dist/realfastnav.cjs.js",
6
6
  "module": "dist/realfastnav.es.js",