@vertesia/ui 0.66.0 → 0.67.0

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,2 +1,2 @@
1
- import{jsx as e,jsxs as l,Fragment as r}from"react/jsx-runtime";import i from"clsx";import{Transition as t,Dialog as n,TransitionChild as a,DialogPanel as s}from"@headlessui/react";import{Menu as o,Search as c,Dot as d,X as h}from"lucide-react";import{createContext as m,useContext as u,useState as f,useEffect as x,Fragment as g}from"react";import{Button as p,TooltipProvider as v,Tooltip as N,TooltipTrigger as b,TooltipContent as w}from"@vertesia/ui/core";import{Nav as y}from"@vertesia/ui/router";function k({className:l,children:r}){return e("div",{className:i("flex flex-col","h-full","overflow-y-auto",l),children:r})}k.Fixed=function({heightClass:l,className:r,children:t}){return e("div",{className:i("w-full",l,r),children:t})},k.Body=function({className:l,children:r}){return e("div",{className:i("grow overflow-auto","min-h-0","px-4 py-2",l),children:r})},k.VR=function({}){return e("div",{className:"w-[1px] border border-red-200"})},k.HR=function({}){return e("div",{className:"w-full h-1 border-b border-red-200"})};const C=m({isOpen:!1,toggleMobile:()=>{},toggleDesktop:()=>{}});function S(){return u(C)}function z({title:l}){return e("div",{className:"self-center text-lg font-semibold",children:l})}function O({children:r,logo:i,onSearch:t,title:n}){return l("div",{className:"sticky top-0 z-40 flex h-16 shrink-0 items-center gap-x-4 border-b px-4 shadow-2xs sm:gap-x-6 sm:px-6 lg:px-8",children:[e(T,{}),e("div",{className:"lg:hidden",children:i}),t&&e(D,{visible:"mobile"}),l("div",{className:"flex flex-1 gap-x-4 self-stretch lg:gap-x-6",children:[e(z,{title:n}),t&&e(F,{onSearch:t}),e("div",{className:"flex items-center gap-x-4 lg:gap-x-6 ml-auto",children:r})]})]})}function F({}){return l("form",{className:"relative flex flex-1",action:"#",method:"GET",children:[e("label",{htmlFor:"search-field",className:"sr-only",children:"Search"}),e(c,{className:"pointer-events-none absolute inset-y-0 left-0 h-full w-5 text-gray-400","aria-hidden":"true"}),e("input",{id:"search-field",className:"block h-full w-full border-0 py-0 pl-8 pr-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm",placeholder:"Search...",type:"search",name:"search"})]})}function T(){const{toggleDesktop:l,toggleMobile:i}=S();return e(r,{children:e(p,{variant:"ghost",size:"icon",onClick:()=>{window.innerWidth<1024?i():l()},className:"p-2 rounded-full transition-colors w-full text-center ",children:e(o,{"aria-hidden":"true",size:24})})})}function D({visible:l}){let r="";return l&&(r="mobile"===l?"lg:hidden":"hidden lg:block"),e("div",{className:`h-6 w-px bg-gray-900/10 dark:bg-slate-900/0.1 ${r}`,"aria-hidden":"true"})}function I({title:r,icon:i,onClick:t}){return l("button",{type:"button",className:"-m-2.5 p-2.5 text-gray-400 dark:text-slate-50 hover:text-gray-500",onClick:t,children:[e("span",{className:"sr-only",children:r}),e(i,{className:"size-6","aria-hidden":"true",title:r})]})}function M({children:l,onClick:r}){return e(p,{onClick:r,children:l})}function E({href:l,onClick:r,children:i}){return e("a",{className:"dark:text-slate-50",href:l,onClick:r,children:i})}function W({children:r,logo:t,className:n}){return l("div",{className:i(n||"bg-indigo-600 dark:bg-indigo-950","flex flex-col h-full"),children:[t&&e("div",{className:"-mx-2 flex h-auto my-4 shrink-0 self-start",children:t}),e("div",{className:"flex-1 min-h-0 overflow-hidden px-2",children:e("nav",{className:"h-full flex flex-col",children:e("ul",{role:"list",className:"flex flex-col gap-y-2 overflow-y-auto h-full",children:r})})})]})}function j({children:i,title:t,action:n,isFooter:a=!1}){const{isOpen:s}=S();let o=s?l(r,{children:[t||"",n]}):e(d,{className:"size-6"});return l("li",{className:a?"mt-auto":"",children:[t&&e("div",{className:"text-xs font-medium h-8 flex items-center gap-x-2 px-2 text-sidebar-foreground/70",children:o}),e("ul",{"data-sidebar":"menu",className:"flex w-full min-w-0 flex-col gap-1",children:i})]})}function L({children:i,text:t}){const{isOpen:n}=S();return n?e(r,{children:i}):e(v,{children:l(N,{children:[e(b,{asChild:!0,children:i}),e(w,{side:"right",children:t})]})})}function P({external:r,className:t,tools:n,children:a,icon:s,href:o,current:c,onClick:d}){const{toggleMobile:h}=S();return e("li",{children:e(y,{onClick:()=>{setTimeout((()=>{h(!1)}),100)},children:e(L,{text:a,children:l("a",{href:o,onClick:e=>{r?(window.open(o,"_blank"),e.preventDefault(),e.stopPropagation()):d&&d(e)},className:i(c?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:text-sidebar-accent-foreground hover:bg-sidebar-accent","group flex gap-x-3 rounded-md px-2 py-1.5 text-sm items-center h-8",t),children:[s&&e(s,{className:i(c?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:text-sidebar-accent-foreground hover:bg-sidebar-accent","size-4 shrink-0"),"aria-hidden":"true"}),a,n&&e("div",{className:"flex items-center ml-auto",children:n})]})})})})}function R({sidebarClassName:o,className:c,title:d,children:m,logo:u,navbar:p,sidebar:v,mainNav:N}){null===localStorage.getItem("desktopSidebarOpen")&&localStorage.setItem("desktopSidebarOpen","true");const[b,w]=f(!1),[y,k]=f("true"===localStorage.getItem("desktopSidebarOpen")),[S,z]=f(window.innerWidth>=1024);x((()=>{const e=()=>{z(window.innerWidth>=1024)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const F={isOpen:S?y:b,toggleDesktop:e=>{k(void 0===e?!y:e),localStorage.setItem("desktopSidebarOpen",JSON.stringify(!y))},toggleMobile:e=>{w(void 0===e?!b:e)}};return e(r,{children:e("div",{className:"flex flex-col h-screen overflow-y-hidden",children:l(C.Provider,{value:F,children:[e("div",{className:"w-full",children:N}),l("div",{className:"flex h-full overflow-y-auto w-full",children:[e(t,{show:b,as:g,children:l(n,{as:"div",className:"relative z-50 lg:hidden",onClose:w,children:[e(a,{as:g,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("div",{className:"fixed inset-0 bg-gray-900/80"})}),e("div",{className:"fixed inset-0 flex",children:e(a,{as:g,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:l(s,{className:"relative flex w-full max-w-xs flex-1",children:[e(W,{logo:u,className:o,children:v}),e("div",{className:"flex w-16 justify-center pt-5 items-start",children:l("button",{type:"button",className:"-m-2.5 p-2.5",onClick:()=>w(!1),children:[e("span",{className:"sr-only",children:"Close sidebar"}),e(h,{className:"size-6 text-white","aria-hidden":"true"})]})})]})})})]})}),e("div",{className:"hidden lg:block relative transition-all duration-300 "+(y?"w-72":"w-12"),children:e(W,{logo:u,className:o,children:v})}),l("div",{className:"w-full h-full overflow-y-hidden",children:[p?e(O,{title:d,logo:u,children:p}):null,e("main",{className:i("flex-1 h-full w-full relative flex flex-col",c),children:m})]})]})]})})})}export{R as AppLayout,k as FullHeightLayout,T as HamburgerButton,O as Navbar,M as NavbarButton,I as NavbarIconButton,E as NavbarLink,D as NavbarSeparator,W as Sidebar,C as SidebarContext,P as SidebarItem,j as SidebarSection,L as SidebarTooltip,z as TitleBar,S as useSidebarToggle};
1
+ import{jsx as e,jsxs as l,Fragment as r}from"react/jsx-runtime";import i from"clsx";import{Transition as t,Dialog as n,TransitionChild as a,DialogPanel as s}from"@headlessui/react";import{Menu as o,Search as c,Dot as d,X as h}from"lucide-react";import{createContext as m,useContext as u,useState as f,useEffect as x,Fragment as g}from"react";import{Button as p,TooltipProvider as v,Tooltip as N,TooltipTrigger as b,TooltipContent as w}from"@vertesia/ui/core";import{Nav as y}from"@vertesia/ui/router";function k({className:l,children:r}){return e("div",{className:i("flex flex-col","h-full","overflow-y-auto","px-2",l),children:r})}k.Fixed=function({heightClass:l,className:r,children:t}){return e("div",{className:i("w-full",l,r),children:t})},k.Body=function({className:l,children:r}){return e("div",{className:i("grow overflow-auto","min-h-0","p-2",l),children:r})},k.VR=function({}){return e("div",{className:"w-[1px] border border-red-200"})},k.HR=function({}){return e("div",{className:"w-full h-1 border-b border-red-200"})};const C=m({isOpen:!1,toggleMobile:()=>{},toggleDesktop:()=>{}});function S(){return u(C)}function z({title:l}){return e("div",{className:"self-center text-lg font-semibold",children:l})}function O({children:r,logo:i,onSearch:t,title:n}){return l("div",{className:"sticky top-0 z-40 flex h-16 shrink-0 items-center gap-x-4 border-b px-4 shadow-2xs sm:gap-x-6 sm:px-6 lg:px-8",children:[e(T,{}),e("div",{className:"lg:hidden",children:i}),t&&e(D,{visible:"mobile"}),l("div",{className:"flex flex-1 gap-x-4 self-stretch lg:gap-x-6",children:[e(z,{title:n}),t&&e(F,{onSearch:t}),e("div",{className:"flex items-center gap-x-4 lg:gap-x-6 ml-auto",children:r})]})]})}function F({}){return l("form",{className:"relative flex flex-1",action:"#",method:"GET",children:[e("label",{htmlFor:"search-field",className:"sr-only",children:"Search"}),e(c,{className:"pointer-events-none absolute inset-y-0 left-0 h-full w-5 text-gray-400","aria-hidden":"true"}),e("input",{id:"search-field",className:"block h-full w-full border-0 py-0 pl-8 pr-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm",placeholder:"Search...",type:"search",name:"search"})]})}function T(){const{toggleDesktop:l,toggleMobile:i}=S();return e(r,{children:e(p,{variant:"ghost",size:"icon",onClick:()=>{window.innerWidth<1024?i():l()},className:"p-2 rounded-full transition-colors w-full text-center ",children:e(o,{"aria-hidden":"true",size:24})})})}function D({visible:l}){let r="";return l&&(r="mobile"===l?"lg:hidden":"hidden lg:block"),e("div",{className:`h-6 w-px bg-gray-900/10 dark:bg-slate-900/0.1 ${r}`,"aria-hidden":"true"})}function I({title:r,icon:i,onClick:t}){return l("button",{type:"button",className:"-m-2.5 p-2.5 text-gray-400 dark:text-slate-50 hover:text-gray-500",onClick:t,children:[e("span",{className:"sr-only",children:r}),e(i,{className:"size-6","aria-hidden":"true",title:r})]})}function M({children:l,onClick:r}){return e(p,{onClick:r,children:l})}function E({href:l,onClick:r,children:i}){return e("a",{className:"dark:text-slate-50",href:l,onClick:r,children:i})}function W({children:r,logo:t,className:n}){return l("div",{className:i(n||"bg-indigo-600 dark:bg-indigo-950","flex flex-col h-full"),children:[t&&e("div",{className:"-mx-2 flex h-auto my-4 shrink-0 self-start",children:t}),e("div",{className:"flex-1 min-h-0 overflow-hidden px-2",children:e("nav",{className:"h-full flex flex-col",children:e("ul",{role:"list",className:"flex flex-col gap-y-2 overflow-y-auto h-full",children:r})})})]})}function j({children:i,title:t,action:n,isFooter:a=!1}){const{isOpen:s}=S();let o=s?l(r,{children:[t||"",n]}):e(d,{className:"size-6"});return l("li",{className:a?"mt-auto":"",children:[t&&e("div",{className:"text-xs font-medium h-8 flex items-center gap-x-2 px-2 text-sidebar-foreground/70",children:o}),e("ul",{"data-sidebar":"menu",className:"flex w-full min-w-0 flex-col gap-1",children:i})]})}function L({children:i,text:t}){const{isOpen:n}=S();return n?e(r,{children:i}):e(v,{children:l(N,{children:[e(b,{asChild:!0,children:i}),e(w,{side:"right",children:t})]})})}function P({external:r,className:t,tools:n,children:a,icon:s,href:o,current:c,onClick:d}){const{toggleMobile:h}=S();return e("li",{children:e(y,{onClick:()=>{setTimeout((()=>{h(!1)}),100)},children:e(L,{text:a,children:l("a",{href:o,onClick:e=>{r?(window.open(o,"_blank"),e.preventDefault(),e.stopPropagation()):d&&d(e)},className:i(c?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:text-sidebar-accent-foreground hover:bg-sidebar-accent","group flex gap-x-3 rounded-md px-2 py-1.5 text-sm items-center h-8",t),children:[s&&e(s,{className:i(c?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:text-sidebar-accent-foreground hover:bg-sidebar-accent","size-4 shrink-0"),"aria-hidden":"true"}),a,n&&e("div",{className:"flex items-center ml-auto",children:n})]})})})})}function R({sidebarClassName:o,className:c,title:d,children:m,logo:u,navbar:p,sidebar:v,mainNav:N}){null===localStorage.getItem("desktopSidebarOpen")&&localStorage.setItem("desktopSidebarOpen","true");const[b,w]=f(!1),[y,k]=f("true"===localStorage.getItem("desktopSidebarOpen")),[S,z]=f(window.innerWidth>=1024);x((()=>{const e=()=>{z(window.innerWidth>=1024)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const F={isOpen:S?y:b,toggleDesktop:e=>{k(void 0===e?!y:e),localStorage.setItem("desktopSidebarOpen",JSON.stringify(!y))},toggleMobile:e=>{w(void 0===e?!b:e)}};return e(r,{children:e("div",{className:"flex flex-col h-screen overflow-y-hidden",children:l(C.Provider,{value:F,children:[e("div",{className:"w-full",children:N}),l("div",{className:"flex h-full overflow-y-auto w-full",children:[e(t,{show:b,as:g,children:l(n,{as:"div",className:"relative z-50 lg:hidden",onClose:w,children:[e(a,{as:g,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("div",{className:"fixed inset-0 bg-gray-900/80"})}),e("div",{className:"fixed inset-0 flex",children:e(a,{as:g,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:l(s,{className:"relative flex w-full max-w-xs flex-1",children:[e(W,{logo:u,className:o,children:v}),e("div",{className:"flex w-16 justify-center pt-5 items-start",children:l("button",{type:"button",className:"-m-2.5 p-2.5",onClick:()=>w(!1),children:[e("span",{className:"sr-only",children:"Close sidebar"}),e(h,{className:"size-6 text-white","aria-hidden":"true"})]})})]})})})]})}),e("div",{className:"hidden lg:block relative transition-all duration-300 "+(y?"w-72":"w-12"),children:e(W,{logo:u,className:o,children:v})}),l("div",{className:"w-full h-full overflow-y-hidden",children:[p?e(O,{title:d,logo:u,children:p}):null,e("main",{className:i("flex-1 h-full w-full relative flex flex-col",c),children:m})]})]})]})})})}export{R as AppLayout,k as FullHeightLayout,T as HamburgerButton,O as Navbar,M as NavbarButton,I as NavbarIconButton,E as NavbarLink,D as NavbarSeparator,W as Sidebar,C as SidebarContext,P as SidebarItem,j as SidebarSection,L as SidebarTooltip,z as TitleBar,S as useSidebarToggle};
2
2
  //# sourceMappingURL=vertesia-ui-layout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vertesia-ui-layout.js","sources":["esm/layout/FullHeightLayout.js","esm/layout/SidebarContext.js","esm/layout/TitleBar.js","esm/layout/Navbar.js","esm/layout/Sidebar.js","esm/layout/AppLayout.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nexport function FullHeightLayout({ className, children }) {\n return (_jsx(\"div\", { className: clsx(\"flex flex-col\", \"h-full\", \"overflow-y-auto\", \n // \"dark:bg-slate-900 text-slate-950 dark:text-slate-200\",\n className), children: children }));\n}\nFullHeightLayout.Fixed = function Fixed({ heightClass, className, children }) {\n return (_jsx(\"div\", { className: clsx(\"w-full\", heightClass, className), children: children }));\n};\nFullHeightLayout.Body = function Body({ className, children }) {\n return (_jsx(\"div\", { className: clsx(\"grow overflow-auto\", \"min-h-0\", \"px-4 py-2\", className), children: children }));\n};\nFullHeightLayout.VR = function VDivider({}) {\n return (_jsx(\"div\", { className: \"w-[1px] border border-red-200\" }));\n};\nFullHeightLayout.HR = function HDivider({}) {\n return (_jsx(\"div\", { className: \"w-full h-1 border-b border-red-200\" }));\n};\n//# sourceMappingURL=FullHeightLayout.js.map","import { createContext, useContext } from \"react\";\nexport const SidebarContext = createContext({\n isOpen: false,\n toggleMobile: () => void 0,\n toggleDesktop: () => void 0,\n});\nexport function useSidebarToggle() {\n return useContext(SidebarContext);\n}\n//# sourceMappingURL=SidebarContext.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nexport function TitleBar({ title }) {\n return _jsx(\"div\", { className: 'self-center text-lg font-semibold', children: title });\n}\n//# sourceMappingURL=TitleBar.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Menu, Search } from 'lucide-react';\nimport { Button } from '@vertesia/ui/core';\nimport { useSidebarToggle } from './SidebarContext.js';\nimport { TitleBar } from './TitleBar.js';\nexport function Navbar({ children, logo, onSearch, title }) {\n return (_jsxs(\"div\", { className: \"sticky top-0 z-40 flex h-16 shrink-0 items-center gap-x-4 border-b px-4 shadow-2xs sm:gap-x-6 sm:px-6 lg:px-8\", children: [_jsx(HamburgerButton, {}), _jsx(\"div\", { className: \"lg:hidden\", children: logo }), onSearch && _jsx(NavbarSeparator, { visible: 'mobile' }), _jsxs(\"div\", { className: \"flex flex-1 gap-x-4 self-stretch lg:gap-x-6\", children: [_jsx(TitleBar, { title: title }), onSearch && _jsx(SearchBox, { onSearch: onSearch }), _jsx(\"div\", { className: \"flex items-center gap-x-4 lg:gap-x-6 ml-auto\", children: children })] })] }));\n}\nfunction SearchBox({}) {\n return (_jsxs(\"form\", { className: \"relative flex flex-1\", action: \"#\", method: \"GET\", children: [_jsx(\"label\", { htmlFor: \"search-field\", className: \"sr-only\", children: \"Search\" }), _jsx(Search, { className: \"pointer-events-none absolute inset-y-0 left-0 h-full w-5 text-gray-400\", \"aria-hidden\": \"true\" }), _jsx(\"input\", { id: \"search-field\", className: \"block h-full w-full border-0 py-0 pl-8 pr-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm\", placeholder: \"Search...\", type: \"search\", name: \"search\" })] }));\n}\nexport function HamburgerButton() {\n const { toggleDesktop, toggleMobile } = useSidebarToggle();\n const toggle = () => {\n if (window.innerWidth < 1024) {\n toggleMobile();\n }\n else {\n toggleDesktop();\n }\n };\n return (_jsx(_Fragment, { children: _jsx(Button, { variant: 'ghost', size: 'icon', onClick: () => toggle(), className: \"p-2 rounded-full transition-colors w-full text-center \", children: _jsx(Menu, { \"aria-hidden\": \"true\", size: 24 }) }) }));\n}\nexport function NavbarSeparator({ visible }) {\n let visibility = \"\";\n if (visible) {\n visibility = visible === \"mobile\" ? \"lg:hidden\" : \"hidden lg:block\";\n }\n return (_jsx(\"div\", { className: `h-6 w-px bg-gray-900/10 dark:bg-slate-900/0.1 ${visibility}`, \"aria-hidden\": \"true\" }));\n}\nexport function NavbarIconButton({ title, icon: Icon, onClick }) {\n return (_jsxs(\"button\", { type: \"button\", className: \"-m-2.5 p-2.5 text-gray-400 dark:text-slate-50 hover:text-gray-500\", onClick: onClick, children: [_jsx(\"span\", { className: \"sr-only\", children: title }), _jsx(Icon, { className: \"size-6\", \"aria-hidden\": \"true\", title: title })] }));\n}\nexport function NavbarButton({ children, onClick }) {\n return (_jsx(Button, { onClick: onClick, children: children }));\n}\nexport function NavbarLink({ href, onClick, children }) {\n return (_jsx(\"a\", { className: \"dark:text-slate-50\", href: href, onClick: onClick, children: children }));\n}\n//# sourceMappingURL=Navbar.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport { useSidebarToggle } from './SidebarContext';\nimport { Dot } from 'lucide-react';\nimport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from '@vertesia/ui/core';\nimport { Nav } from \"@vertesia/ui/router\";\nexport function Sidebar({ children, logo, className }) {\n return (_jsxs(\"div\", { className: clsx(className || \"bg-indigo-600 dark:bg-indigo-950\", \"flex flex-col h-full\"), children: [logo &&\n _jsx(\"div\", { className: \"-mx-2 flex h-auto my-4 shrink-0 self-start\", children: logo }), _jsx(\"div\", { className: \"flex-1 min-h-0 overflow-hidden px-2\", children: _jsx(\"nav\", { className: \"h-full flex flex-col\", children: _jsx(\"ul\", { role: \"list\", className: \"flex flex-col gap-y-2 overflow-y-auto h-full\", children: children }) }) })] }));\n}\nexport function SidebarSection({ children, title, action, isFooter = false }) {\n const { isOpen } = useSidebarToggle();\n let header = isOpen ? _jsxs(_Fragment, { children: [title || \"\", action] }) : _jsx(Dot, { className: 'size-6' });\n return (_jsxs(\"li\", { className: isFooter ? 'mt-auto' : '', children: [title && _jsx(\"div\", { className: \"text-xs font-medium h-8 flex items-center gap-x-2 px-2 text-sidebar-foreground/70\", children: header }), _jsx(\"ul\", { \"data-sidebar\": \"menu\", className: \"flex w-full min-w-0 flex-col gap-1\", children: children })] }));\n}\nexport function SidebarTooltip({ children, text }) {\n const { isOpen } = useSidebarToggle();\n return (isOpen ? _jsx(_Fragment, { children: children }) :\n _jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: children }), _jsx(TooltipContent, { side: 'right', children: text })] }) }));\n}\nexport function SidebarItem({ external, className, tools, children, icon: Icon, href, current, onClick }) {\n const { toggleMobile } = useSidebarToggle();\n const _closeSideBar = () => {\n setTimeout(() => {\n toggleMobile(false);\n }, 100);\n };\n const onClickWrapper = (event) => {\n if (external) {\n window.open(href, '_blank');\n event.preventDefault(); // Prevent default link behavior\n event.stopPropagation(); // Stop the event from propagating\n }\n else if (onClick) {\n onClick(event);\n }\n };\n return (_jsx(\"li\", { children: _jsx(Nav, { onClick: _closeSideBar, children: _jsx(SidebarTooltip, { text: children, children: _jsxs(\"a\", { href: href, onClick: onClickWrapper, className: clsx(current\n ? 'bg-sidebar-accent text-sidebar-accent-foreground'\n : 'text-sidebar-foreground hover:text-sidebar-accent-foreground hover:bg-sidebar-accent', 'group flex gap-x-3 rounded-md px-2 py-1.5 text-sm items-center h-8', className), children: [Icon &&\n _jsx(Icon, { className: clsx(current\n ? 'bg-sidebar-accent text-sidebar-accent-foreground'\n : 'text-sidebar-foreground hover:text-sidebar-accent-foreground hover:bg-sidebar-accent', 'size-4 shrink-0'), \"aria-hidden\": \"true\" }), children, tools && _jsx(\"div\", { className: 'flex items-center ml-auto', children: tools })] }) }) }) }));\n}\n//# sourceMappingURL=Sidebar.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react';\nimport { X } from 'lucide-react';\nimport clsx from 'clsx';\nimport { Fragment, useEffect, useState } from 'react';\n// import { FullHeightLayout } from './FullHeightLayout.js'\nimport { Navbar } from './Navbar.js';\nimport { Sidebar } from './Sidebar.js';\nimport { SidebarContext } from './SidebarContext.js';\nexport function AppLayout({ sidebarClassName, className, title, children, logo, navbar, sidebar, mainNav }) {\n if (localStorage.getItem('desktopSidebarOpen') === null) {\n localStorage.setItem('desktopSidebarOpen', 'true');\n }\n const [sidebarOpen, setSidebarOpen] = useState(false);\n const [desktopSidebarOpen, setDesktopSidebarOpen] = useState(localStorage.getItem('desktopSidebarOpen') === 'true');\n const [isLargeScreen, setIsLargeScreen] = useState(window.innerWidth >= 1024);\n useEffect(() => {\n const handleResize = () => {\n setIsLargeScreen(window.innerWidth >= 1024);\n };\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n const sidebarContextValue = {\n isOpen: isLargeScreen ? desktopSidebarOpen : sidebarOpen,\n toggleDesktop: (value) => {\n if (value === undefined) {\n setDesktopSidebarOpen(!desktopSidebarOpen);\n }\n else {\n setDesktopSidebarOpen(value);\n }\n localStorage.setItem('desktopSidebarOpen', JSON.stringify(!desktopSidebarOpen));\n },\n toggleMobile: (value) => {\n if (value === undefined) {\n setSidebarOpen(!sidebarOpen);\n }\n else {\n setSidebarOpen(value);\n }\n },\n };\n return (_jsx(_Fragment, { children: _jsx(\"div\", { className: 'flex flex-col h-screen overflow-y-hidden', children: _jsxs(SidebarContext.Provider, { value: sidebarContextValue, children: [_jsx(\"div\", { className: 'w-full', children: mainNav }), _jsxs(\"div\", { className: 'flex h-full overflow-y-auto w-full', children: [_jsx(Transition, { show: sidebarOpen, as: Fragment, children: _jsxs(Dialog, { as: \"div\", className: \"relative z-50 lg:hidden\", onClose: setSidebarOpen, children: [_jsx(TransitionChild, { as: Fragment, enter: \"transition-opacity ease-linear duration-300\", enterFrom: \"opacity-0\", enterTo: \"opacity-100\", leave: \"transition-opacity ease-linear duration-300\", leaveFrom: \"opacity-100\", leaveTo: \"opacity-0\", children: _jsx(\"div\", { className: \"fixed inset-0 bg-gray-900/80\" }) }), _jsx(\"div\", { className: \"fixed inset-0 flex\", children: _jsx(TransitionChild, { as: Fragment, enter: \"transition ease-in-out duration-300 transform\", enterFrom: \"-translate-x-full\", enterTo: \"translate-x-0\", leave: \"transition ease-in-out duration-300 transform\", leaveFrom: \"translate-x-0\", leaveTo: \"-translate-x-full\", children: _jsxs(DialogPanel, { className: \"relative flex w-full max-w-xs flex-1\", children: [_jsx(Sidebar, { logo: logo, className: sidebarClassName, children: sidebar }), _jsx(\"div\", { className: \"flex w-16 justify-center pt-5 items-start\", children: _jsxs(\"button\", { type: \"button\", className: \"-m-2.5 p-2.5\", onClick: () => setSidebarOpen(false), children: [_jsx(\"span\", { className: \"sr-only\", children: \"Close sidebar\" }), _jsx(X, { className: \"size-6 text-white\", \"aria-hidden\": \"true\" })] }) })] }) }) })] }) }), _jsx(\"div\", { className: `hidden lg:block relative transition-all duration-300 ${desktopSidebarOpen ? 'w-72' : 'w-12'}`, children: _jsx(Sidebar, { logo: logo, className: sidebarClassName, children: sidebar }) }), _jsxs(\"div\", { className: \"w-full h-full overflow-y-hidden\", children: [navbar ? (_jsx(Navbar, { title: title, logo: logo, children: navbar })) : null, _jsx(\"main\", { className: clsx(\"flex-1 h-full w-full relative flex flex-col\", className), children: children })] })] })] }) }) }));\n}\n//# sourceMappingURL=AppLayout.js.map"],"names":["FullHeightLayout","className","children","_jsx","clsx","Fixed","heightClass","Body","VR","HR","SidebarContext","createContext","isOpen","toggleMobile","toggleDesktop","useSidebarToggle","useContext","TitleBar","title","Navbar","logo","onSearch","_jsxs","HamburgerButton","NavbarSeparator","visible","SearchBox","action","method","htmlFor","Search","id","placeholder","type","name","_Fragment","Button","variant","size","onClick","window","innerWidth","Menu","visibility","NavbarIconButton","icon","Icon","NavbarButton","NavbarLink","href","Sidebar","role","SidebarSection","isFooter","header","Dot","SidebarTooltip","text","TooltipProvider","Tooltip","TooltipTrigger","asChild","TooltipContent","side","SidebarItem","external","tools","current","Nav","setTimeout","event","open","preventDefault","stopPropagation","AppLayout","sidebarClassName","navbar","sidebar","mainNav","localStorage","getItem","setItem","sidebarOpen","setSidebarOpen","useState","desktopSidebarOpen","setDesktopSidebarOpen","isLargeScreen","setIsLargeScreen","useEffect","handleResize","addEventListener","removeEventListener","sidebarContextValue","value","undefined","JSON","stringify","Provider","Transition","show","as","Fragment","Dialog","onClose","TransitionChild","enter","enterFrom","enterTo","leave","leaveFrom","leaveTo","DialogPanel","X"],"mappings":"qfAEO,SAASA,GAAiBC,UAAEA,EAASC,SAAEA,IAC1C,OAAQC,EAAK,MAAO,CAAEF,UAAWG,EAAK,gBAAiB,SAAU,kBAE7DH,GAAYC,SAAUA,GAC9B,CACAF,EAAiBK,MAAQ,UAAeC,YAAEA,EAAWL,UAAEA,EAASC,SAAEA,IAC9D,OAAQC,EAAK,MAAO,CAAEF,UAAWG,EAAK,SAAUE,EAAaL,GAAYC,SAAUA,GACvF,EACAF,EAAiBO,KAAO,UAAcN,UAAEA,EAASC,SAAEA,IAC/C,OAAQC,EAAK,MAAO,CAAEF,UAAWG,EAAK,qBAAsB,UAAW,YAAaH,GAAYC,SAAUA,GAC9G,EACAF,EAAiBQ,GAAK,aAClB,OAAQL,EAAK,MAAO,CAAEF,UAAW,iCACrC,EACAD,EAAiBS,GAAK,aAClB,OAAQN,EAAK,MAAO,CAAEF,UAAW,sCACrC,ECjBY,MAACS,EAAiBC,EAAc,CACxCC,QAAQ,EACRC,aAAc,OACdC,cAAe,SAEZ,SAASC,IACZ,OAAOC,EAAWN,EACtB,CCPO,SAASO,GAASC,MAAEA,IACvB,OAAOf,EAAK,MAAO,CAAEF,UAAW,oCAAqCC,SAAUgB,GACnF,CCEO,SAASC,GAAOjB,SAAEA,EAAQkB,KAAEA,EAAIC,SAAEA,EAAQH,MAAEA,IAC/C,OAAQI,EAAM,MAAO,CAAErB,UAAW,gHAAiHC,SAAU,CAACC,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AU,CAAEW,KAAM,SAAUhC,UAAW,eAAgBsC,QAAS,IAAM4C,GAAe,GAAQjF,SAAU,CAACC,EAAK,OAAQ,CAAEF,UAAW,UAAWC,SAAU,kBAAoBC,EAAK8G,EAAG,CAAEhH,UAAW,oBAAqB,cAAe,0BAAmCE,EAAK,MAAO,CAAEF,UAAW,yDAAwDoF,EAAqB,OAAS,QAAUnF,SAAUC,EAAK+C,EAAS,CAAE9B,KAAMA,EAAMnB,UAAW0E,EAAkBzE,SAAU2E,MAAevD,EAAM,MAAO,CAAErB,UAAW,kCAAmCC,SAAU,CAAC0E,EAAUzE,EAAKgB,EAAQ,CAAED,MAAOA,EAAOE,KAAMA,EAAMlB,SAAU0E,IAAa,KAAMzE,EAAK,OAAQ,CAAEF,UAAWG,EAAK,8CAA+CH,GAAYC,SAAUA,gBAC9jE"}
1
+ {"version":3,"file":"vertesia-ui-layout.js","sources":["esm/layout/FullHeightLayout.js","esm/layout/SidebarContext.js","esm/layout/TitleBar.js","esm/layout/Navbar.js","esm/layout/Sidebar.js","esm/layout/AppLayout.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nexport function FullHeightLayout({ className, children }) {\n return (_jsx(\"div\", { className: clsx(\"flex flex-col\", \"h-full\", \"overflow-y-auto\", \"px-2\", className), children: children }));\n}\nFullHeightLayout.Fixed = function Fixed({ heightClass, className, children }) {\n return (_jsx(\"div\", { className: clsx(\"w-full\", heightClass, className), children: children }));\n};\nFullHeightLayout.Body = function Body({ className, children }) {\n return (_jsx(\"div\", { className: clsx(\"grow overflow-auto\", \"min-h-0\", \"p-2\", className), children: children }));\n};\nFullHeightLayout.VR = function VDivider({}) {\n return (_jsx(\"div\", { className: \"w-[1px] border border-red-200\" }));\n};\nFullHeightLayout.HR = function HDivider({}) {\n return (_jsx(\"div\", { className: \"w-full h-1 border-b border-red-200\" }));\n};\n//# sourceMappingURL=FullHeightLayout.js.map","import { createContext, useContext } from \"react\";\nexport const SidebarContext = createContext({\n isOpen: false,\n toggleMobile: () => void 0,\n toggleDesktop: () => void 0,\n});\nexport function useSidebarToggle() {\n return useContext(SidebarContext);\n}\n//# sourceMappingURL=SidebarContext.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nexport function TitleBar({ title }) {\n return _jsx(\"div\", { className: 'self-center text-lg font-semibold', children: title });\n}\n//# sourceMappingURL=TitleBar.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Menu, Search } from 'lucide-react';\nimport { Button } from '@vertesia/ui/core';\nimport { useSidebarToggle } from './SidebarContext.js';\nimport { TitleBar } from './TitleBar.js';\nexport function Navbar({ children, logo, onSearch, title }) {\n return (_jsxs(\"div\", { className: \"sticky top-0 z-40 flex h-16 shrink-0 items-center gap-x-4 border-b px-4 shadow-2xs sm:gap-x-6 sm:px-6 lg:px-8\", children: [_jsx(HamburgerButton, {}), _jsx(\"div\", { className: \"lg:hidden\", children: logo }), onSearch && _jsx(NavbarSeparator, { visible: 'mobile' }), _jsxs(\"div\", { className: \"flex flex-1 gap-x-4 self-stretch lg:gap-x-6\", children: [_jsx(TitleBar, { title: title }), onSearch && _jsx(SearchBox, { onSearch: onSearch }), _jsx(\"div\", { className: \"flex items-center gap-x-4 lg:gap-x-6 ml-auto\", children: children })] })] }));\n}\nfunction SearchBox({}) {\n return (_jsxs(\"form\", { className: \"relative flex flex-1\", action: \"#\", method: \"GET\", children: [_jsx(\"label\", { htmlFor: \"search-field\", className: \"sr-only\", children: \"Search\" }), _jsx(Search, { className: \"pointer-events-none absolute inset-y-0 left-0 h-full w-5 text-gray-400\", \"aria-hidden\": \"true\" }), _jsx(\"input\", { id: \"search-field\", className: \"block h-full w-full border-0 py-0 pl-8 pr-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm\", placeholder: \"Search...\", type: \"search\", name: \"search\" })] }));\n}\nexport function HamburgerButton() {\n const { toggleDesktop, toggleMobile } = useSidebarToggle();\n const toggle = () => {\n if (window.innerWidth < 1024) {\n toggleMobile();\n }\n else {\n toggleDesktop();\n }\n };\n return (_jsx(_Fragment, { children: _jsx(Button, { variant: 'ghost', size: 'icon', onClick: () => toggle(), className: \"p-2 rounded-full transition-colors w-full text-center \", children: _jsx(Menu, { \"aria-hidden\": \"true\", size: 24 }) }) }));\n}\nexport function NavbarSeparator({ visible }) {\n let visibility = \"\";\n if (visible) {\n visibility = visible === \"mobile\" ? \"lg:hidden\" : \"hidden lg:block\";\n }\n return (_jsx(\"div\", { className: `h-6 w-px bg-gray-900/10 dark:bg-slate-900/0.1 ${visibility}`, \"aria-hidden\": \"true\" }));\n}\nexport function NavbarIconButton({ title, icon: Icon, onClick }) {\n return (_jsxs(\"button\", { type: \"button\", className: \"-m-2.5 p-2.5 text-gray-400 dark:text-slate-50 hover:text-gray-500\", onClick: onClick, children: [_jsx(\"span\", { className: \"sr-only\", children: title }), _jsx(Icon, { className: \"size-6\", \"aria-hidden\": \"true\", title: title })] }));\n}\nexport function NavbarButton({ children, onClick }) {\n return (_jsx(Button, { onClick: onClick, children: children }));\n}\nexport function NavbarLink({ href, onClick, children }) {\n return (_jsx(\"a\", { className: \"dark:text-slate-50\", href: href, onClick: onClick, children: children }));\n}\n//# sourceMappingURL=Navbar.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport { useSidebarToggle } from './SidebarContext';\nimport { Dot } from 'lucide-react';\nimport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from '@vertesia/ui/core';\nimport { Nav } from \"@vertesia/ui/router\";\nexport function Sidebar({ children, logo, className }) {\n return (_jsxs(\"div\", { className: clsx(className || \"bg-indigo-600 dark:bg-indigo-950\", \"flex flex-col h-full\"), children: [logo &&\n _jsx(\"div\", { className: \"-mx-2 flex h-auto my-4 shrink-0 self-start\", children: logo }), _jsx(\"div\", { className: \"flex-1 min-h-0 overflow-hidden px-2\", children: _jsx(\"nav\", { className: \"h-full flex flex-col\", children: _jsx(\"ul\", { role: \"list\", className: \"flex flex-col gap-y-2 overflow-y-auto h-full\", children: children }) }) })] }));\n}\nexport function SidebarSection({ children, title, action, isFooter = false }) {\n const { isOpen } = useSidebarToggle();\n let header = isOpen ? _jsxs(_Fragment, { children: [title || \"\", action] }) : _jsx(Dot, { className: 'size-6' });\n return (_jsxs(\"li\", { className: isFooter ? 'mt-auto' : '', children: [title && _jsx(\"div\", { className: \"text-xs font-medium h-8 flex items-center gap-x-2 px-2 text-sidebar-foreground/70\", children: header }), _jsx(\"ul\", { \"data-sidebar\": \"menu\", className: \"flex w-full min-w-0 flex-col gap-1\", children: children })] }));\n}\nexport function SidebarTooltip({ children, text }) {\n const { isOpen } = useSidebarToggle();\n return (isOpen ? _jsx(_Fragment, { children: children }) :\n _jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: children }), _jsx(TooltipContent, { side: 'right', children: text })] }) }));\n}\nexport function SidebarItem({ external, className, tools, children, icon: Icon, href, current, onClick }) {\n const { toggleMobile } = useSidebarToggle();\n const _closeSideBar = () => {\n setTimeout(() => {\n toggleMobile(false);\n }, 100);\n };\n const onClickWrapper = (event) => {\n if (external) {\n window.open(href, '_blank');\n event.preventDefault(); // Prevent default link behavior\n event.stopPropagation(); // Stop the event from propagating\n }\n else if (onClick) {\n onClick(event);\n }\n };\n return (_jsx(\"li\", { children: _jsx(Nav, { onClick: _closeSideBar, children: _jsx(SidebarTooltip, { text: children, children: _jsxs(\"a\", { href: href, onClick: onClickWrapper, className: clsx(current\n ? 'bg-sidebar-accent text-sidebar-accent-foreground'\n : 'text-sidebar-foreground hover:text-sidebar-accent-foreground hover:bg-sidebar-accent', 'group flex gap-x-3 rounded-md px-2 py-1.5 text-sm items-center h-8', className), children: [Icon &&\n _jsx(Icon, { className: clsx(current\n ? 'bg-sidebar-accent text-sidebar-accent-foreground'\n : 'text-sidebar-foreground hover:text-sidebar-accent-foreground hover:bg-sidebar-accent', 'size-4 shrink-0'), \"aria-hidden\": \"true\" }), children, tools && _jsx(\"div\", { className: 'flex items-center ml-auto', children: tools })] }) }) }) }));\n}\n//# sourceMappingURL=Sidebar.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react';\nimport { X } from 'lucide-react';\nimport clsx from 'clsx';\nimport { Fragment, useEffect, useState } from 'react';\n// import { FullHeightLayout } from './FullHeightLayout.js'\nimport { Navbar } from './Navbar.js';\nimport { Sidebar } from './Sidebar.js';\nimport { SidebarContext } from './SidebarContext.js';\nexport function AppLayout({ sidebarClassName, className, title, children, logo, navbar, sidebar, mainNav }) {\n if (localStorage.getItem('desktopSidebarOpen') === null) {\n localStorage.setItem('desktopSidebarOpen', 'true');\n }\n const [sidebarOpen, setSidebarOpen] = useState(false);\n const [desktopSidebarOpen, setDesktopSidebarOpen] = useState(localStorage.getItem('desktopSidebarOpen') === 'true');\n const [isLargeScreen, setIsLargeScreen] = useState(window.innerWidth >= 1024);\n useEffect(() => {\n const handleResize = () => {\n setIsLargeScreen(window.innerWidth >= 1024);\n };\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n const sidebarContextValue = {\n isOpen: isLargeScreen ? desktopSidebarOpen : sidebarOpen,\n toggleDesktop: (value) => {\n if (value === undefined) {\n setDesktopSidebarOpen(!desktopSidebarOpen);\n }\n else {\n setDesktopSidebarOpen(value);\n }\n localStorage.setItem('desktopSidebarOpen', JSON.stringify(!desktopSidebarOpen));\n },\n toggleMobile: (value) => {\n if (value === undefined) {\n setSidebarOpen(!sidebarOpen);\n }\n else {\n setSidebarOpen(value);\n }\n },\n };\n return (_jsx(_Fragment, { children: _jsx(\"div\", { className: 'flex flex-col h-screen overflow-y-hidden', children: _jsxs(SidebarContext.Provider, { value: sidebarContextValue, children: [_jsx(\"div\", { className: 'w-full', children: mainNav }), _jsxs(\"div\", { className: 'flex h-full overflow-y-auto w-full', children: [_jsx(Transition, { show: sidebarOpen, as: Fragment, children: _jsxs(Dialog, { as: \"div\", className: \"relative z-50 lg:hidden\", onClose: setSidebarOpen, children: [_jsx(TransitionChild, { as: Fragment, enter: \"transition-opacity ease-linear duration-300\", enterFrom: \"opacity-0\", enterTo: \"opacity-100\", leave: \"transition-opacity ease-linear duration-300\", leaveFrom: \"opacity-100\", leaveTo: \"opacity-0\", children: _jsx(\"div\", { className: \"fixed inset-0 bg-gray-900/80\" }) }), _jsx(\"div\", { className: \"fixed inset-0 flex\", children: _jsx(TransitionChild, { as: Fragment, enter: \"transition ease-in-out duration-300 transform\", enterFrom: \"-translate-x-full\", enterTo: \"translate-x-0\", leave: \"transition ease-in-out duration-300 transform\", leaveFrom: \"translate-x-0\", leaveTo: \"-translate-x-full\", children: _jsxs(DialogPanel, { className: \"relative flex w-full max-w-xs flex-1\", children: [_jsx(Sidebar, { logo: logo, className: sidebarClassName, children: sidebar }), _jsx(\"div\", { className: \"flex w-16 justify-center pt-5 items-start\", children: _jsxs(\"button\", { type: \"button\", className: \"-m-2.5 p-2.5\", onClick: () => setSidebarOpen(false), children: [_jsx(\"span\", { className: \"sr-only\", children: \"Close sidebar\" }), _jsx(X, { className: \"size-6 text-white\", \"aria-hidden\": \"true\" })] }) })] }) }) })] }) }), _jsx(\"div\", { className: `hidden lg:block relative transition-all duration-300 ${desktopSidebarOpen ? 'w-72' : 'w-12'}`, children: _jsx(Sidebar, { logo: logo, className: sidebarClassName, children: sidebar }) }), _jsxs(\"div\", { className: \"w-full h-full overflow-y-hidden\", children: [navbar ? (_jsx(Navbar, { title: title, logo: logo, children: navbar })) : null, _jsx(\"main\", { className: clsx(\"flex-1 h-full w-full relative flex flex-col\", className), children: children })] })] })] }) }) }));\n}\n//# sourceMappingURL=AppLayout.js.map"],"names":["FullHeightLayout","className","children","_jsx","clsx","Fixed","heightClass","Body","VR","HR","SidebarContext","createContext","isOpen","toggleMobile","toggleDesktop","useSidebarToggle","useContext","TitleBar","title","Navbar","logo","onSearch","_jsxs","HamburgerButton","NavbarSeparator","visible","SearchBox","action","method","htmlFor","Search","id","placeholder","type","name","_Fragment","Button","variant","size","onClick","window","innerWidth","Menu","visibility","NavbarIconButton","icon","Icon","NavbarButton","NavbarLink","href","Sidebar","role","SidebarSection","isFooter","header","Dot","SidebarTooltip","text","TooltipProvider","Tooltip","TooltipTrigger","asChild","TooltipContent","side","SidebarItem","external","tools","current","Nav","setTimeout","event","open","preventDefault","stopPropagation","AppLayout","sidebarClassName","navbar","sidebar","mainNav","localStorage","getItem","setItem","sidebarOpen","setSidebarOpen","useState","desktopSidebarOpen","setDesktopSidebarOpen","isLargeScreen","setIsLargeScreen","useEffect","handleResize","addEventListener","removeEventListener","sidebarContextValue","value","undefined","JSON","stringify","Provider","Transition","show","as","Fragment","Dialog","onClose","TransitionChild","enter","enterFrom","enterTo","leave","leaveFrom","leaveTo","DialogPanel","X"],"mappings":"qfAEO,SAASA,GAAiBC,UAAEA,EAASC,SAAEA,IAC1C,OAAQC,EAAK,MAAO,CAAEF,UAAWG,EAAK,gBAAiB,SAAU,kBAAmB,OAAQH,GAAYC,SAAUA,GACtH,CACAF,EAAiBK,MAAQ,UAAeC,YAAEA,EAAWL,UAAEA,EAASC,SAAEA,IAC9D,OAAQC,EAAK,MAAO,CAAEF,UAAWG,EAAK,SAAUE,EAAaL,GAAYC,SAAUA,GACvF,EACAF,EAAiBO,KAAO,UAAcN,UAAEA,EAASC,SAAEA,IAC/C,OAAQC,EAAK,MAAO,CAAEF,UAAWG,EAAK,qBAAsB,UAAW,MAAOH,GAAYC,SAAUA,GACxG,EACAF,EAAiBQ,GAAK,aAClB,OAAQL,EAAK,MAAO,CAAEF,UAAW,iCACrC,EACAD,EAAiBS,GAAK,aAClB,OAAQN,EAAK,MAAO,CAAEF,UAAW,sCACrC,ECfY,MAACS,EAAiBC,EAAc,CACxCC,QAAQ,EACRC,aAAc,OACdC,c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C,UAAW,oBAAqBC,QAAS,gBAAiBC,MAAO,gDAAiDC,UAAW,gBAAiBC,QAAS,oBAAqB7G,SAAUoB,EAAM0F,EAAa,CAAE/G,UAAW,uCAAwCC,SAAU,CAACC,EAAK+C,EAAS,CAAE9B,KAAMA,EAAMnB,UAAW0E,EAAkBzE,SAAU2E,IAAY1E,EAAK,MAAO,CAAEF,UAAW,4CAA6CC,SAAUoB,EAAM,SAAU,CAAEW,KAAM,SAAUhC,UAAW,eAAgBsC,QAAS,IAAM4C,GAAe,GAAQjF,SAAU,CAACC,EAAK,OAAQ,CAAEF,UAAW,UAAWC,SAAU,kBAAoBC,EAAK8G,EAAG,CAAEhH,UAAW,oBAAqB,cAAe,0BAAmCE,EAAK,MAAO,CAAEF,UAAW,yDAAwDoF,EAAqB,OAAS,QAAUnF,SAAUC,EAAK+C,EAAS,CAAE9B,KAAMA,EAAMnB,UAAW0E,EAAkBzE,SAAU2E,MAAevD,EAAM,MAAO,CAAErB,UAAW,kCAAmCC,SAAU,CAAC0E,EAAUzE,EAAKgB,EAAQ,CAAED,MAAOA,EAAOE,KAAMA,EAAMlB,SAAU0E,IAAa,KAAMzE,EAAK,OAAQ,CAAEF,UAAWG,EAAK,8CAA+CH,GAAYC,SAAUA,gBAC9jE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertesia/ui",
3
- "version": "0.66.0",
3
+ "version": "0.67.0",
4
4
  "description": "Vertesia UI components and and hooks",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -56,9 +56,9 @@
56
56
  "tailwind-merge": "^3.3.0",
57
57
  "ts-md5": "^1.3.1",
58
58
  "json-schema": "^0.4.0",
59
- "@vertesia/client": "0.66.0",
60
- "@vertesia/common": "0.66.0",
61
- "@vertesia/json": "0.66.0"
59
+ "@vertesia/client": "0.67.0",
60
+ "@vertesia/common": "0.67.0",
61
+ "@vertesia/json": "0.67.0"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@eslint/js": "^9.27.0",