@brightlocal/ui-components 2.6.0 → 2.6.1

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "Machine-readable registry of all components in the BrightLocal Design System",
5
5
  "components": [
6
6
  {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),Ne=require("react"),y=require("@radix-ui/react-slot"),D=require("class-variance-authority"),b=require("@brightlocal/icons"),d=require("@brightlocal/ui-components/lib/utils"),_=require("../button.cjs"),ye=require("../input.cjs"),ke=require("../separator.cjs"),T=require("../sheet.cjs"),N=require("../drawer.cjs"),R=require("../accordion.cjs"),je=require("@radix-ui/react-accordion"),Ce=require("../scroll-area.cjs"),z=require("../skeleton.cjs"),M=require("../tooltip.cjs"),Me=require("../hooks/use-mobile.cjs");function B(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const n=B(Ne),Re=B(je);var L=(e=>(e.LEFT="left",e))(L||{}),q=(e=>(e.SIDEBAR="sidebar",e))(q||{}),P=(e=>(e.OFFCANVAS="offcanvas",e.ICON="icon",e.NONE="none",e))(P||{}),G=(e=>(e.DEFAULT="default",e.SM="sm",e.XS="xs",e))(G||{}),F=(e=>(e.DEFAULT="default",e.COLLAPSIBLE="collapsible",e.ACTION="action",e))(F||{}),H=(e=>(e.SIMPLE="simple",e.COLLAPSIBLE="collapsible",e.DROPDOWN="dropdown",e.TREE="tree",e.BADGE="badge",e.BIG_ICON="bigIcon",e.CHECKBOX="checkbox",e))(H||{}),K=(e=>(e.DEFAULT="default",e.SM="sm",e.LG="lg",e))(K||{}),U=(e=>(e.DEFAULT="default",e.BORDER="border",e.INDENT="indent",e))(U||{}),V=(e=>(e.SM="sm",e.MD="md",e))(V||{}),W=(e=>(e.CARET="caret",e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e.UP_DOWN="upDown",e.PLUS_MINUS="plusMinus",e.DOTS="dots",e))(W||{});const De="sidebar:state",Ie=3600*24*7,Ae="256px",Oe="288px",Ee="48px",Te="b",X=n.createContext(null);function k(){const e=n.useContext(X);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Y=n.forwardRef(({dataHook:e,trackingEl:t,trackingLabel:r,defaultOpen:o=!0,open:i,onOpenChange:s,className:l,style:c,children:p,...g},h)=>{const f=Me.useIsMobile(),[u,x]=n.useState(!1),[S,Se]=n.useState(o),w=i??S,j=n.useCallback(m=>{const v=typeof m=="function"?m(w):m;s?s(v):Se(v),document.cookie=`${De}=${v}; path=/; max-age=${Ie}`},[s,w]),C=n.useCallback(()=>f?x(m=>!m):j(m=>!m),[f,j,x]);n.useEffect(()=>{const m=v=>{v.key===Te&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),C())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[C]);const E=w?"expanded":"collapsed",we=n.useMemo(()=>({state:E,open:w,setOpen:j,isMobile:f,openMobile:u,setOpenMobile:x,toggleSidebar:C}),[E,w,j,f,u,x,C]);return a.jsx(X.Provider,{value:we,children:a.jsx(M.TooltipProvider,{delayDuration:0,children:a.jsx("div",{ref:h,className:d.cn("group/sidebar-wrapper flex min-h-svh w-full",l),"data-hook":e,"data-slot":"sidebar-provider","data-tracking-el":t||"sidebar-provider","data-tracking-label":r,style:{"--sidebar-width":Ae,"--sidebar-width-icon":Ee,...c},...g,children:p})})})});Y.displayName="SidebarProvider";const Z=n.forwardRef(({dataHook:e,trackingEl:t,trackingLabel:r,side:o="left",variant:i="sidebar",collapsible:s="offcanvas",embedded:l=!1,className:c,children:p,...g},h)=>{const{isMobile:f,state:u,openMobile:x,setOpenMobile:S}=k();return s==="none"?a.jsx("div",{ref:h,className:d.cn("bg-sidebar text-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",c),"data-hook":e,"data-slot":"sidebar","data-tracking-el":t||"sidebar","data-tracking-label":r,...g,children:p}):l?a.jsx("div",{ref:h,className:d.cn("group bg-sidebar text-sidebar-foreground flex h-full shrink-0 flex-col overflow-hidden transition-[width] duration-200 ease-linear",u==="expanded"&&"w-[var(--sidebar-width)]",s==="icon"&&u==="collapsed"&&"w-[var(--sidebar-width-icon)]",s==="offcanvas"&&u==="collapsed"&&"w-0",c),"data-collapsible":u==="collapsed"?s:"","data-hook":e,"data-side":o,"data-slot":"sidebar","data-state":u,"data-tracking-el":t||"sidebar","data-tracking-label":r,"data-variant":i,...g,children:p}):f?a.jsx(T.Sheet,{open:x,onOpenChange:S,children:a.jsx(T.SheetContent,{className:"bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden","data-hook":`${e}-mobile-content`,"data-mobile":"true","data-sidebar":"sidebar",side:"left",style:{"--sidebar-width":Oe},children:a.jsx("div",{className:"flex h-full w-full flex-col",children:p})})}):a.jsxs("div",{ref:h,className:"group peer text-sidebar-foreground hidden md:block","data-collapsible":u==="collapsed"?s:"","data-hook":e,"data-side":o,"data-slot":"sidebar","data-state":u,"data-tracking-el":t||"sidebar","data-tracking-label":r,"data-variant":i,children:[a.jsx("div",{className:d.cn("relative h-svh w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")}),a.jsx("div",{className:d.cn("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex","left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]","group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]",c),...g,children:a.jsx("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:p})})]})});Z.displayName="Sidebar";const $=n.forwardRef(({className:e,onClick:t,dataHook:r="sidebar-trigger",...o},i)=>{const{toggleSidebar:s}=k();return a.jsxs(_.Button,{ref:i,"aria-label":"Toggle Sidebar",className:d.cn("h-7 w-7",e),"data-slot":"sidebar-trigger",dataHook:r,size:"sm",variant:"ghost",onClick:l=>{t?.(l),s()},...o,children:[a.jsx(b.PanelLeft,{}),a.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});$.displayName="SidebarTrigger";const J=n.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:o}=k();return a.jsx("button",{ref:r,"aria-label":"Toggle Sidebar",className:d.cn("hover:after:bg-sidebar-border absolute inset-y-0 -right-4 z-20 hidden w-4 -translate-x-1/2 transition-transform ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","cursor-w-resize","[[data-state=collapsed]_&]:cursor-e-resize","group-data-[collapsible=offcanvas]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-collapsible=offcanvas]_&]:-right-2",e),"data-slot":"sidebar-rail",tabIndex:-1,title:"Toggle Sidebar",onClick:o,...t})});J.displayName="SidebarRail";const Q=n.forwardRef(({className:e,dataHook:t,trackingEl:r,trackingLabel:o,...i},s)=>a.jsx("main",{ref:s,className:d.cn("bg-background relative flex min-h-svh flex-1 flex-col",e),"data-hook":t,"data-slot":"sidebar-inset","data-tracking-el":r||"sidebar-inset","data-tracking-label":o,...i}));Q.displayName="SidebarInset";const ee=n.forwardRef(({className:e,...t},r)=>a.jsx(ye.Input,{ref:r,className:d.cn("bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2",e),"data-slot":"sidebar-input",dataHook:"sidebar-input",...t}));ee.displayName="SidebarInput";const ae=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("div",{ref:o,className:d.cn("px-section-xs flex flex-col gap-2 pt-2 pb-9",e),"data-hook":t,"data-slot":"sidebar-header",...r}));ae.displayName="SidebarHeader";const te=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("div",{ref:o,className:d.cn("flex flex-col gap-2 p-2",e),"data-hook":t,"data-slot":"sidebar-footer",...r}));te.displayName="SidebarFooter";const re=n.forwardRef(({className:e,...t},r)=>a.jsx(ke.Separator,{ref:r,className:d.cn("bg-sidebar-border mx-2 my-2 w-auto group-data-[collapsible=icon]:mx-0",e),"data-slot":"sidebar-separator",...t}));re.displayName="SidebarSeparator";const oe=n.forwardRef(({className:e,dataHook:t,children:r,...o},i)=>a.jsx(Ce.ScrollArea,{ref:i,className:d.cn("min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden [&>[data-slot=scroll-area-viewport]]:p-0",e),dataHook:t??"sidebar-content-scroll",...o,children:a.jsx("nav",{"aria-label":"Sidebar",className:"flex flex-col gap-2","data-slot":"sidebar-content",children:r})}));oe.displayName="SidebarContent";const ie=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("div",{ref:o,className:d.cn("relative flex w-full min-w-0 flex-col p-2",e),"data-hook":t,"data-slot":"sidebar-group",...r}));ie.displayName="SidebarGroup";const ze=D.cva("flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",{variants:{size:{default:"text-sm",sm:"text-sm",xs:"text-xs"},variant:{default:"",collapsible:"w-full justify-between cursor-pointer hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",action:"w-full justify-between cursor-pointer hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}},defaultVariants:{size:"sm",variant:"default"}}),se=n.forwardRef(({className:e,dataHook:t,asChild:r=!1,size:o="sm",variant:i="default",isOpen:s=!1,onToggle:l,onAction:c,children:p,...g},h)=>{const f=r?y.Slot:"div",u=()=>{i==="collapsible"&&l?l():i==="action"&&c&&c()},x=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),u())};return a.jsxs(f,{ref:h,className:d.cn(ze({size:o,variant:i}),e),"data-hook":t,"data-slot":"sidebar-group-label","data-variant":i,role:i!=="default"?"button":void 0,tabIndex:i!=="default"?0:void 0,onClick:i!=="default"?u:void 0,onKeyDown:i!=="default"?x:void 0,...g,children:[a.jsx("span",{children:p}),i==="collapsible"&&a.jsx(b.ChevronDown,{className:d.cn("shrink-0 transition-transform duration-200",s&&"rotate-180"),size:16}),i==="action"&&a.jsx(b.Plus,{className:"shrink-0",size:16})]})});se.displayName="SidebarGroupLabel";const ne=n.forwardRef(({className:e,asChild:t=!1,...r},o)=>{const i=t?y.Slot:"button";return a.jsx(i,{ref:o,className:d.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-group-action",...r})});ne.displayName="SidebarGroupAction";const de=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("div",{ref:o,className:d.cn("w-full text-sm",e),"data-hook":t,"data-slot":"sidebar-group-content",...r}));de.displayName="SidebarGroupContent";const le=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("ul",{ref:o,className:d.cn("flex w-full min-w-0 flex-col gap-1",e),"data-hook":t,"data-slot":"sidebar-menu",...r}));le.displayName="SidebarMenu";const I=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("li",{ref:o,className:d.cn("group/menu-item relative",e),"data-hook":t,"data-slot":"sidebar-menu-item",...r}));I.displayName="SidebarMenuItem";const ce=n.forwardRef(({type:e="caret",isActive:t=!1,className:r,...o},i)=>{const s={ref:i,className:d.cn("shrink-0 transition-transform",t&&e==="caret"&&"rotate-90",r),"data-slot":"sidebar-collapse-icon",...o};switch(e){case"horizontal":return a.jsx(b.ChevronRight,{...s});case"vertical":return a.jsx(b.ChevronDown,{...s});case"upDown":return a.jsx(b.ChevronsUpDown,{...s});case"plusMinus":return t?a.jsx(b.Minus,{...s}):a.jsx(b.Plus,{...s});case"dots":return a.jsx(b.Ellipsis,{...s});default:return a.jsx(b.ChevronRight,{...s})}});ce.displayName="SidebarCollapseIcon";const _e=D.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-full px-6 py-2 text-left text-sm font-medium outline-none ring-sidebar-ring transition-[color,background-color,border-color,box-shadow,opacity,width,height,padding] duration-150 ease-in-out hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-semibold data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:rounded-md [&>span:last-child]:truncate [&>svg]:shrink-0 [&>svg]:opacity-70 data-[active=true]:[&>svg]:opacity-100 group-data-[collapsible=icon]:[&>span]:hidden group-data-[collapsible=icon]:[&>div]:hidden",{variants:{variant:{simple:"",collapsible:"[&>[data-collapse-icon]]:ml-auto [&>[data-collapse-icon]]:transition-transform data-[state=open]:[&>[data-collapse-icon]]:rotate-90",dropdown:"group-has-[[data-sidebar=menu-action]]/menu-item:pr-8",tree:"[&>[data-tree-icon]]:size-4 [&>[data-tree-icon]]:shrink-0 [&>[data-tree-icon]]:opacity-70 [&>[data-tree-icon]]:transition-transform data-[state=open]:[&>[data-tree-icon]]:rotate-90 group-data-[collapsible=icon]:[&>[data-tree-icon]]:hidden",badge:"group-has-[[data-sidebar=menu-badge]]/menu-item:pr-16",bigIcon:"h-auto flex-col items-start gap-1 rounded-lg p-3 [&>svg]:size-6 [&>svg]:rounded-md [&>svg]:bg-sidebar-foreground [&>svg]:p-1 [&>svg]:text-sidebar [&>svg]:opacity-100 hover:[&>svg]:bg-sidebar-foreground hover:[&>svg]:text-sidebar group-data-[collapsible=icon]:!size-10 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:[&>svg]:size-6",checkbox:"[&>[data-checkbox]]:size-4 [&>[data-checkbox]]:shrink-0 [&>[data-checkbox]]:rounded [&>[data-checkbox]]:border [&>[data-checkbox]]:border-sidebar-foreground/30 data-[checked=true]:[&>[data-checkbox]]:bg-primary data-[checked=true]:[&>[data-checkbox]]:border-primary data-[checked=true]:[&>[data-checkbox]]:text-primary-foreground"},size:{default:"h-12 text-sm/4",sm:"h-7 text-xs/4",lg:"h-12 text-sm/4 group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"simple",size:"default"}}),A=n.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="simple",size:o="default",tooltip:i,className:s,dataHook:l,...c},p)=>{const g=e?y.Slot:"button",{isMobile:h,state:f}=k(),u=a.jsx(g,{ref:p,className:d.cn(_e({variant:r,size:o}),s),"data-active":t,"data-hook":l,"data-size":o,"data-slot":"sidebar-menu-button","data-variant":r,...c});return i?(typeof i=="string"&&(i={children:i,dataHook:"sidebar-menu-button-tooltip"}),a.jsxs(M.Tooltip,{children:[a.jsx(M.TooltipTrigger,{asChild:!0,children:u}),a.jsx(M.TooltipContent,{hideArrow:!0,...i,align:"center",className:d.cn("bg-foreground text-background border-none",i.className),hidden:f!=="collapsed"||h,side:"right",sideOffset:8})]})):u});A.displayName="SidebarMenuButton";const ue=n.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...o},i)=>{const s=t?y.Slot:"button";return a.jsx(s,{ref:i,className:d.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","peer-data-[size=bigIcon]/menu-button:top-2.5","peer-data-[size=tree]/menu-button:top-1.5","group-data-[collapsible=icon]:hidden",r&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),"data-slot":"sidebar-menu-action",...o})});ue.displayName="SidebarMenuAction";const be=n.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:d.cn("text-sidebar-foreground pointer-events-none absolute inset-y-0 right-4 my-auto flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-menu-badge",...t}));be.displayName="SidebarMenuBadge";const pe=n.forwardRef(({className:e,showIcon:t=!1,...r},o)=>{const i=n.useId(),s=n.useMemo(()=>{let l=0;for(let c=0;c<i.length;c++)l=(l<<5)-l+i.charCodeAt(c),l|=0;return`${Math.abs(l)%40+50}%`},[i]);return a.jsxs("div",{ref:o,className:d.cn("flex h-8 items-center gap-2 rounded-md px-2",e),"data-slot":"sidebar-menu-skeleton",...r,children:[t&&a.jsx(z.Skeleton,{className:"size-4 rounded-md","data-slot":"sidebar-menu-skeleton-icon"}),a.jsx(z.Skeleton,{className:"h-4 max-w-[--skeleton-width] flex-1","data-slot":"sidebar-menu-skeleton-text",style:{"--skeleton-width":s}})]})});pe.displayName="SidebarMenuSkeleton";const Be=D.cva("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",{variants:{variant:{default:"",border:"border-l border-sidebar-border",indent:"ml-0 border-l-0"}},defaultVariants:{variant:"border"}}),O=n.forwardRef(({className:e,variant:t="border",dataHook:r,...o},i)=>a.jsx("ul",{ref:i,className:d.cn(Be({variant:t}),e),"data-hook":r,"data-slot":"sidebar-menu-sub",...o}));O.displayName="SidebarMenuSub";const fe=n.forwardRef(({dataHook:e,...t},r)=>a.jsx("li",{ref:r,"data-hook":e,"data-slot":"sidebar-menu-sub-item",...t}));fe.displayName="SidebarMenuSubItem";const me=n.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:o,dataHook:i,...s},l)=>{const c=e?y.Slot:"a";return a.jsx(c,{ref:l,className:d.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 transition-[color,background-color,box-shadow,opacity] duration-150 ease-in-out outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),"data-active":r,"data-hook":i,"data-size":t,"data-slot":"sidebar-menu-sub-button",...s})});me.displayName="SidebarMenuSubButton";function ge({dataHook:e,className:t,children:r,defaultOpen:o,open:i,onOpenChange:s}){return a.jsx(I,{children:a.jsx(R.Accordion,{collapsible:!0,className:t,dataHook:e??"sidebar-menu-collapsible",defaultValue:o?"item":void 0,type:"single",value:i!==void 0?i?"item":"":void 0,onValueChange:s?l=>s(l==="item"):void 0,children:a.jsx(R.AccordionItem,{className:"group/collapsible border-none",value:"item",children:r})})})}ge.displayName="SidebarMenuCollapsible";const he=n.forwardRef(({children:e,className:t,...r},o)=>a.jsx(Re.Trigger,{asChild:!0,children:a.jsxs(A,{ref:o,className:d.cn("relative",t),variant:"collapsible",...r,children:[a.jsx(b.ChevronRight,{"data-collapse-icon":!0,className:"absolute left-2.5 !opacity-100 transition-transform duration-200 ease-out group-data-[state=open]/collapsible:rotate-90",size:12}),e]})}));he.displayName="SidebarMenuCollapsibleTrigger";const xe=n.forwardRef(({dataHook:e,children:t,...r},o)=>a.jsx(R.AccordionContent,{className:"p-0",children:a.jsx(O,{ref:o,dataHook:e,...r,children:t})}));xe.displayName="SidebarMenuCollapsibleContent";function ve({dataHook:e,title:t="Navigation",description:r="Main navigation menu",trackingEl:o,trackingLabel:i,children:s,className:l,...c}){return a.jsxs(N.Drawer,{direction:"left",children:[a.jsx(N.DrawerTrigger,{asChild:!0,children:a.jsx(_.Button,{iconOnly:!0,"aria-label":"Open menu",dataHook:`${e}-trigger`,size:"sm",trackingEl:o,trackingLabel:i,variant:"ghost",children:a.jsx(b.Menu,{size:24})})}),a.jsxs(N.DrawerContent,{className:d.cn("max-w-96",l),dataHook:e,...c,children:[a.jsx(N.DrawerTitle,{className:"sr-only",children:t}),a.jsx(N.DrawerDescription,{className:"sr-only",children:r}),a.jsx("div",{className:"flex h-full flex-col p-6",children:s})]})]})}ve.displayName="SidebarDrawer";exports.Sidebar=Z;exports.SidebarCollapseIcon=ce;exports.SidebarCollapseIconType=W;exports.SidebarCollapsible=P;exports.SidebarContent=oe;exports.SidebarDrawer=ve;exports.SidebarFooter=te;exports.SidebarGroup=ie;exports.SidebarGroupAction=ne;exports.SidebarGroupContent=de;exports.SidebarGroupLabel=se;exports.SidebarGroupLabelSize=G;exports.SidebarGroupLabelVariant=F;exports.SidebarHeader=ae;exports.SidebarInput=ee;exports.SidebarInset=Q;exports.SidebarMenu=le;exports.SidebarMenuAction=ue;exports.SidebarMenuBadge=be;exports.SidebarMenuButton=A;exports.SidebarMenuButtonSize=K;exports.SidebarMenuButtonVariant=H;exports.SidebarMenuCollapsible=ge;exports.SidebarMenuCollapsibleContent=xe;exports.SidebarMenuCollapsibleTrigger=he;exports.SidebarMenuItem=I;exports.SidebarMenuSkeleton=pe;exports.SidebarMenuSub=O;exports.SidebarMenuSubButton=me;exports.SidebarMenuSubButtonSize=V;exports.SidebarMenuSubItem=fe;exports.SidebarMenuSubVariant=U;exports.SidebarProvider=Y;exports.SidebarRail=J;exports.SidebarSeparator=re;exports.SidebarSide=L;exports.SidebarTrigger=$;exports.SidebarVariant=q;exports.useSidebar=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),Ne=require("react"),y=require("@radix-ui/react-slot"),D=require("class-variance-authority"),b=require("@brightlocal/icons"),d=require("@brightlocal/ui-components/lib/utils"),_=require("../button.cjs"),ye=require("../input.cjs"),ke=require("../separator.cjs"),T=require("../sheet.cjs"),N=require("../drawer.cjs"),R=require("../accordion.cjs"),je=require("@radix-ui/react-accordion"),Ce=require("../scroll-area.cjs"),z=require("../skeleton.cjs"),M=require("../tooltip.cjs"),Me=require("../hooks/use-mobile.cjs");function B(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const n=B(Ne),Re=B(je);var L=(e=>(e.LEFT="left",e))(L||{}),q=(e=>(e.SIDEBAR="sidebar",e))(q||{}),P=(e=>(e.OFFCANVAS="offcanvas",e.ICON="icon",e.NONE="none",e))(P||{}),G=(e=>(e.DEFAULT="default",e.SM="sm",e.XS="xs",e))(G||{}),F=(e=>(e.DEFAULT="default",e.COLLAPSIBLE="collapsible",e.ACTION="action",e))(F||{}),H=(e=>(e.SIMPLE="simple",e.COLLAPSIBLE="collapsible",e.DROPDOWN="dropdown",e.TREE="tree",e.BADGE="badge",e.BIG_ICON="bigIcon",e.CHECKBOX="checkbox",e))(H||{}),K=(e=>(e.DEFAULT="default",e.SM="sm",e.LG="lg",e))(K||{}),U=(e=>(e.DEFAULT="default",e.BORDER="border",e.INDENT="indent",e))(U||{}),V=(e=>(e.SM="sm",e.MD="md",e))(V||{}),W=(e=>(e.CARET="caret",e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e.UP_DOWN="upDown",e.PLUS_MINUS="plusMinus",e.DOTS="dots",e))(W||{});const De="sidebar:state",Ie=3600*24*7,Ae="256px",Oe="288px",Ee="48px",Te="b",X=n.createContext(null);function k(){const e=n.useContext(X);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Y=n.forwardRef(({dataHook:e,trackingEl:t,trackingLabel:r,defaultOpen:o=!0,open:i,onOpenChange:s,className:l,style:c,children:p,...g},h)=>{const f=Me.useIsMobile(),[u,x]=n.useState(!1),[S,Se]=n.useState(o),w=i??S,j=n.useCallback(m=>{const v=typeof m=="function"?m(w):m;s?s(v):Se(v),document.cookie=`${De}=${v}; path=/; max-age=${Ie}`},[s,w]),C=n.useCallback(()=>f?x(m=>!m):j(m=>!m),[f,j,x]);n.useEffect(()=>{const m=v=>{v.key===Te&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),C())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[C]);const E=w?"expanded":"collapsed",we=n.useMemo(()=>({state:E,open:w,setOpen:j,isMobile:f,openMobile:u,setOpenMobile:x,toggleSidebar:C}),[E,w,j,f,u,x,C]);return a.jsx(X.Provider,{value:we,children:a.jsx(M.TooltipProvider,{delayDuration:0,children:a.jsx("div",{ref:h,className:d.cn("group/sidebar-wrapper flex min-h-svh w-full",l),"data-hook":e,"data-slot":"sidebar-provider","data-tracking-el":t||"sidebar-provider","data-tracking-label":r,style:{"--sidebar-width":Ae,"--sidebar-width-icon":Ee,...c},...g,children:p})})})});Y.displayName="SidebarProvider";const Z=n.forwardRef(({dataHook:e,trackingEl:t,trackingLabel:r,side:o="left",variant:i="sidebar",collapsible:s="offcanvas",embedded:l=!1,className:c,children:p,...g},h)=>{const{isMobile:f,state:u,openMobile:x,setOpenMobile:S}=k();return s==="none"?a.jsx("div",{ref:h,className:d.cn("bg-sidebar text-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",c),"data-hook":e,"data-slot":"sidebar","data-tracking-el":t||"sidebar","data-tracking-label":r,...g,children:p}):l?a.jsx("div",{ref:h,className:d.cn("group bg-sidebar text-sidebar-foreground flex h-full shrink-0 flex-col overflow-hidden transition-[width] duration-200 ease-linear",u==="expanded"&&"w-[var(--sidebar-width)]",s==="icon"&&u==="collapsed"&&"w-[var(--sidebar-width-icon)]",s==="offcanvas"&&u==="collapsed"&&"w-0",c),"data-collapsible":u==="collapsed"?s:"","data-hook":e,"data-side":o,"data-slot":"sidebar","data-state":u,"data-tracking-el":t||"sidebar","data-tracking-label":r,"data-variant":i,...g,children:p}):f?a.jsx(T.Sheet,{open:x,onOpenChange:S,children:a.jsx(T.SheetContent,{className:"bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden","data-hook":`${e}-mobile-content`,"data-mobile":"true","data-sidebar":"sidebar",side:"left",style:{"--sidebar-width":Oe},children:a.jsx("div",{className:"flex h-full w-full flex-col",children:p})})}):a.jsxs("div",{ref:h,className:"group peer text-sidebar-foreground hidden md:block","data-collapsible":u==="collapsed"?s:"","data-hook":e,"data-side":o,"data-slot":"sidebar","data-state":u,"data-tracking-el":t||"sidebar","data-tracking-label":r,"data-variant":i,children:[a.jsx("div",{className:d.cn("relative h-svh w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")}),a.jsx("div",{className:d.cn("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex","left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]","group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]",c),...g,children:a.jsx("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:p})})]})});Z.displayName="Sidebar";const $=n.forwardRef(({className:e,onClick:t,dataHook:r="sidebar-trigger",...o},i)=>{const{toggleSidebar:s}=k();return a.jsxs(_.Button,{ref:i,"aria-label":"Toggle Sidebar",className:d.cn("h-7 w-7",e),"data-slot":"sidebar-trigger",dataHook:r,size:"sm",variant:"ghost",onClick:l=>{t?.(l),s()},...o,children:[a.jsx(b.PanelLeft,{}),a.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});$.displayName="SidebarTrigger";const J=n.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:o}=k();return a.jsx("button",{ref:r,"aria-label":"Toggle Sidebar",className:d.cn("hover:after:bg-sidebar-border absolute inset-y-0 -right-4 z-20 hidden w-4 -translate-x-1/2 transition-transform ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","cursor-w-resize","[[data-state=collapsed]_&]:cursor-e-resize","group-data-[collapsible=offcanvas]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-collapsible=offcanvas]_&]:-right-2",e),"data-slot":"sidebar-rail",tabIndex:-1,title:"Toggle Sidebar",onClick:o,...t})});J.displayName="SidebarRail";const Q=n.forwardRef(({className:e,dataHook:t,trackingEl:r,trackingLabel:o,...i},s)=>a.jsx("main",{ref:s,className:d.cn("bg-background relative flex min-h-svh flex-1 flex-col",e),"data-hook":t,"data-slot":"sidebar-inset","data-tracking-el":r||"sidebar-inset","data-tracking-label":o,...i}));Q.displayName="SidebarInset";const ee=n.forwardRef(({className:e,...t},r)=>a.jsx(ye.Input,{ref:r,className:d.cn("bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2",e),"data-slot":"sidebar-input",dataHook:"sidebar-input",...t}));ee.displayName="SidebarInput";const ae=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("div",{ref:o,className:d.cn("px-section-xs flex flex-col gap-2 pt-2 pb-9",e),"data-hook":t,"data-slot":"sidebar-header",...r}));ae.displayName="SidebarHeader";const te=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("div",{ref:o,className:d.cn("flex flex-col gap-2 p-2",e),"data-hook":t,"data-slot":"sidebar-footer",...r}));te.displayName="SidebarFooter";const re=n.forwardRef(({className:e,...t},r)=>a.jsx(ke.Separator,{ref:r,className:d.cn("bg-sidebar-border mx-2 my-2 w-auto group-data-[collapsible=icon]:mx-0",e),"data-slot":"sidebar-separator",...t}));re.displayName="SidebarSeparator";const oe=n.forwardRef(({className:e,dataHook:t,ariaLabel:r="Sidebar",children:o,...i},s)=>a.jsx(Ce.ScrollArea,{ref:s,className:d.cn("min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden [&>[data-slot=scroll-area-viewport]]:p-0",e),dataHook:t??"sidebar-content-scroll",...i,children:a.jsx("nav",{"aria-label":r,className:"flex flex-col gap-2","data-slot":"sidebar-content",children:o})}));oe.displayName="SidebarContent";const ie=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("div",{ref:o,className:d.cn("relative flex w-full min-w-0 flex-col p-2",e),"data-hook":t,"data-slot":"sidebar-group",...r}));ie.displayName="SidebarGroup";const ze=D.cva("flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",{variants:{size:{default:"text-sm",sm:"text-sm",xs:"text-xs"},variant:{default:"",collapsible:"w-full justify-between cursor-pointer hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",action:"w-full justify-between cursor-pointer hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}},defaultVariants:{size:"sm",variant:"default"}}),se=n.forwardRef(({className:e,dataHook:t,asChild:r=!1,size:o="sm",variant:i="default",isOpen:s=!1,onToggle:l,onAction:c,children:p,...g},h)=>{const f=r?y.Slot:"div",u=()=>{i==="collapsible"&&l?l():i==="action"&&c&&c()},x=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),u())};return a.jsxs(f,{ref:h,className:d.cn(ze({size:o,variant:i}),e),"data-hook":t,"data-slot":"sidebar-group-label","data-variant":i,role:i!=="default"?"button":void 0,tabIndex:i!=="default"?0:void 0,onClick:i!=="default"?u:void 0,onKeyDown:i!=="default"?x:void 0,...g,children:[a.jsx("span",{children:p}),i==="collapsible"&&a.jsx(b.ChevronDown,{className:d.cn("shrink-0 transition-transform duration-200",s&&"rotate-180"),size:16}),i==="action"&&a.jsx(b.Plus,{className:"shrink-0",size:16})]})});se.displayName="SidebarGroupLabel";const ne=n.forwardRef(({className:e,asChild:t=!1,...r},o)=>{const i=t?y.Slot:"button";return a.jsx(i,{ref:o,className:d.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-group-action",...r})});ne.displayName="SidebarGroupAction";const de=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("div",{ref:o,className:d.cn("w-full text-sm",e),"data-hook":t,"data-slot":"sidebar-group-content",...r}));de.displayName="SidebarGroupContent";const le=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("ul",{ref:o,className:d.cn("flex w-full min-w-0 flex-col gap-1",e),"data-hook":t,"data-slot":"sidebar-menu",...r}));le.displayName="SidebarMenu";const I=n.forwardRef(({className:e,dataHook:t,...r},o)=>a.jsx("li",{ref:o,className:d.cn("group/menu-item relative",e),"data-hook":t,"data-slot":"sidebar-menu-item",...r}));I.displayName="SidebarMenuItem";const ce=n.forwardRef(({type:e="caret",isActive:t=!1,className:r,...o},i)=>{const s={ref:i,className:d.cn("shrink-0 transition-transform",t&&e==="caret"&&"rotate-90",r),"data-slot":"sidebar-collapse-icon",...o};switch(e){case"horizontal":return a.jsx(b.ChevronRight,{...s});case"vertical":return a.jsx(b.ChevronDown,{...s});case"upDown":return a.jsx(b.ChevronsUpDown,{...s});case"plusMinus":return t?a.jsx(b.Minus,{...s}):a.jsx(b.Plus,{...s});case"dots":return a.jsx(b.Ellipsis,{...s});default:return a.jsx(b.ChevronRight,{...s})}});ce.displayName="SidebarCollapseIcon";const _e=D.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-full px-6 py-2 text-left text-sm font-medium outline-none ring-sidebar-ring transition-[color,background-color,border-color,box-shadow,opacity,width,height,padding] duration-150 ease-in-out hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-semibold data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:rounded-md [&>span:last-child]:truncate [&>svg]:shrink-0 [&>svg]:opacity-70 data-[active=true]:[&>svg]:opacity-100 group-data-[collapsible=icon]:[&>span]:hidden group-data-[collapsible=icon]:[&>div]:hidden",{variants:{variant:{simple:"",collapsible:"[&>[data-collapse-icon]]:ml-auto [&>[data-collapse-icon]]:transition-transform data-[state=open]:[&>[data-collapse-icon]]:rotate-90",dropdown:"group-has-[[data-sidebar=menu-action]]/menu-item:pr-8",tree:"[&>[data-tree-icon]]:size-4 [&>[data-tree-icon]]:shrink-0 [&>[data-tree-icon]]:opacity-70 [&>[data-tree-icon]]:transition-transform data-[state=open]:[&>[data-tree-icon]]:rotate-90 group-data-[collapsible=icon]:[&>[data-tree-icon]]:hidden",badge:"group-has-[[data-sidebar=menu-badge]]/menu-item:pr-16",bigIcon:"h-auto flex-col items-start gap-1 rounded-lg p-3 [&>svg]:size-6 [&>svg]:rounded-md [&>svg]:bg-sidebar-foreground [&>svg]:p-1 [&>svg]:text-sidebar [&>svg]:opacity-100 hover:[&>svg]:bg-sidebar-foreground hover:[&>svg]:text-sidebar group-data-[collapsible=icon]:!size-10 group-data-[collapsible=icon]:!p-2 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:[&>svg]:size-6",checkbox:"[&>[data-checkbox]]:size-4 [&>[data-checkbox]]:shrink-0 [&>[data-checkbox]]:rounded [&>[data-checkbox]]:border [&>[data-checkbox]]:border-sidebar-foreground/30 data-[checked=true]:[&>[data-checkbox]]:bg-primary data-[checked=true]:[&>[data-checkbox]]:border-primary data-[checked=true]:[&>[data-checkbox]]:text-primary-foreground"},size:{default:"h-12 text-sm/4",sm:"h-7 text-xs/4",lg:"h-12 text-sm/4 group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"simple",size:"default"}}),A=n.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="simple",size:o="default",tooltip:i,className:s,dataHook:l,...c},p)=>{const g=e?y.Slot:"button",{isMobile:h,state:f}=k(),u=a.jsx(g,{ref:p,className:d.cn(_e({variant:r,size:o}),s),"data-active":t,"data-hook":l,"data-size":o,"data-slot":"sidebar-menu-button","data-variant":r,...c});return i?(typeof i=="string"&&(i={children:i,dataHook:"sidebar-menu-button-tooltip"}),a.jsxs(M.Tooltip,{children:[a.jsx(M.TooltipTrigger,{asChild:!0,children:u}),a.jsx(M.TooltipContent,{hideArrow:!0,...i,align:"center",className:d.cn("bg-foreground text-background border-none",i.className),hidden:f!=="collapsed"||h,side:"right",sideOffset:8})]})):u});A.displayName="SidebarMenuButton";const ue=n.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...o},i)=>{const s=t?y.Slot:"button";return a.jsx(s,{ref:i,className:d.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 transition-transform outline-none focus-visible:ring-2 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","peer-data-[size=bigIcon]/menu-button:top-2.5","peer-data-[size=tree]/menu-button:top-1.5","group-data-[collapsible=icon]:hidden",r&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),"data-slot":"sidebar-menu-action",...o})});ue.displayName="SidebarMenuAction";const be=n.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:d.cn("text-sidebar-foreground pointer-events-none absolute inset-y-0 right-4 my-auto flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","group-data-[collapsible=icon]:hidden",e),"data-slot":"sidebar-menu-badge",...t}));be.displayName="SidebarMenuBadge";const pe=n.forwardRef(({className:e,showIcon:t=!1,...r},o)=>{const i=n.useId(),s=n.useMemo(()=>{let l=0;for(let c=0;c<i.length;c++)l=(l<<5)-l+i.charCodeAt(c),l|=0;return`${Math.abs(l)%40+50}%`},[i]);return a.jsxs("div",{ref:o,className:d.cn("flex h-8 items-center gap-2 rounded-md px-2",e),"data-slot":"sidebar-menu-skeleton",...r,children:[t&&a.jsx(z.Skeleton,{className:"size-4 rounded-md","data-slot":"sidebar-menu-skeleton-icon"}),a.jsx(z.Skeleton,{className:"h-4 max-w-[--skeleton-width] flex-1","data-slot":"sidebar-menu-skeleton-text",style:{"--skeleton-width":s}})]})});pe.displayName="SidebarMenuSkeleton";const Be=D.cva("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",{variants:{variant:{default:"",border:"border-l border-sidebar-border",indent:"ml-0 border-l-0"}},defaultVariants:{variant:"border"}}),O=n.forwardRef(({className:e,variant:t="border",dataHook:r,...o},i)=>a.jsx("ul",{ref:i,className:d.cn(Be({variant:t}),e),"data-hook":r,"data-slot":"sidebar-menu-sub",...o}));O.displayName="SidebarMenuSub";const fe=n.forwardRef(({dataHook:e,...t},r)=>a.jsx("li",{ref:r,"data-hook":e,"data-slot":"sidebar-menu-sub-item",...t}));fe.displayName="SidebarMenuSubItem";const me=n.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:o,dataHook:i,...s},l)=>{const c=e?y.Slot:"a";return a.jsx(c,{ref:l,className:d.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 transition-[color,background-color,box-shadow,opacity] duration-150 ease-in-out outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),"data-active":r,"data-hook":i,"data-size":t,"data-slot":"sidebar-menu-sub-button",...s})});me.displayName="SidebarMenuSubButton";function ge({dataHook:e,className:t,children:r,defaultOpen:o,open:i,onOpenChange:s}){return a.jsx(I,{children:a.jsx(R.Accordion,{collapsible:!0,className:t,dataHook:e??"sidebar-menu-collapsible",defaultValue:o?"item":void 0,type:"single",value:i!==void 0?i?"item":"":void 0,onValueChange:s?l=>s(l==="item"):void 0,children:a.jsx(R.AccordionItem,{className:"group/collapsible border-none",value:"item",children:r})})})}ge.displayName="SidebarMenuCollapsible";const he=n.forwardRef(({children:e,className:t,...r},o)=>a.jsx(Re.Trigger,{asChild:!0,children:a.jsxs(A,{ref:o,className:d.cn("relative",t),variant:"collapsible",...r,children:[a.jsx(b.ChevronRight,{"data-collapse-icon":!0,className:"absolute left-2.5 !opacity-100 transition-transform duration-200 ease-out group-data-[state=open]/collapsible:rotate-90",size:12}),e]})}));he.displayName="SidebarMenuCollapsibleTrigger";const xe=n.forwardRef(({dataHook:e,children:t,...r},o)=>a.jsx(R.AccordionContent,{className:"p-0",children:a.jsx(O,{ref:o,dataHook:e,...r,children:t})}));xe.displayName="SidebarMenuCollapsibleContent";function ve({dataHook:e,title:t="Navigation",description:r="Main navigation menu",trackingEl:o,trackingLabel:i,children:s,className:l,...c}){return a.jsxs(N.Drawer,{direction:"left",children:[a.jsx(N.DrawerTrigger,{asChild:!0,children:a.jsx(_.Button,{iconOnly:!0,"aria-label":"Open menu",dataHook:`${e}-trigger`,size:"sm",trackingEl:o,trackingLabel:i,variant:"ghost",children:a.jsx(b.Menu,{size:24})})}),a.jsxs(N.DrawerContent,{className:d.cn("max-w-96",l),dataHook:e,...c,children:[a.jsx(N.DrawerTitle,{className:"sr-only",children:t}),a.jsx(N.DrawerDescription,{className:"sr-only",children:r}),a.jsx("div",{className:"flex h-full flex-col p-6",children:s})]})]})}ve.displayName="SidebarDrawer";exports.Sidebar=Z;exports.SidebarCollapseIcon=ce;exports.SidebarCollapseIconType=W;exports.SidebarCollapsible=P;exports.SidebarContent=oe;exports.SidebarDrawer=ve;exports.SidebarFooter=te;exports.SidebarGroup=ie;exports.SidebarGroupAction=ne;exports.SidebarGroupContent=de;exports.SidebarGroupLabel=se;exports.SidebarGroupLabelSize=G;exports.SidebarGroupLabelVariant=F;exports.SidebarHeader=ae;exports.SidebarInput=ee;exports.SidebarInset=Q;exports.SidebarMenu=le;exports.SidebarMenuAction=ue;exports.SidebarMenuBadge=be;exports.SidebarMenuButton=A;exports.SidebarMenuButtonSize=K;exports.SidebarMenuButtonVariant=H;exports.SidebarMenuCollapsible=ge;exports.SidebarMenuCollapsibleContent=xe;exports.SidebarMenuCollapsibleTrigger=he;exports.SidebarMenuItem=I;exports.SidebarMenuSkeleton=pe;exports.SidebarMenuSub=O;exports.SidebarMenuSubButton=me;exports.SidebarMenuSubButtonSize=V;exports.SidebarMenuSubItem=fe;exports.SidebarMenuSubVariant=U;exports.SidebarProvider=Y;exports.SidebarRail=J;exports.SidebarSeparator=re;exports.SidebarSide=L;exports.SidebarTrigger=$;exports.SidebarVariant=q;exports.useSidebar=k;
@@ -271,6 +271,10 @@ declare const SidebarSeparator: React.ForwardRefExoticComponent<Omit<Omit<import
271
271
  interface SidebarContentProps extends Omit<React.ComponentProps<"div">, "dir"> {
272
272
  /** Data hook for automated testing */
273
273
  dataHook?: string;
274
+ /** Accessible label for the sidebar navigation landmark. Override for i18n.
275
+ * @default "Sidebar"
276
+ */
277
+ ariaLabel?: string;
274
278
  }
275
279
  declare const SidebarContent: React.ForwardRefExoticComponent<Omit<SidebarContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
276
280
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/blocks/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAalE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAiBpD,OAAO,EAEL,cAAc,EAGf,MAAM,uBAAuB,CAAC;AAG/B;;GAEG;AACH,oBAAY,WAAW;IACrB,qCAAqC;IACrC,IAAI,SAAS;CACd;AAED;;GAEG;AACH,oBAAY,cAAc;IAC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,EACrB,QAAQ,EACR,KAAoB,EACpB,WAAoC,EACpC,UAAU,EACV,aAAa,EACb,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,2CA2BpB;kBApCQ,aAAa;;;AAwCtB,OAAO,EACL,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,6BAA6B,EAC7B,6BAA6B,EAC7B,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,CAAC;AAGF,YAAY,EACV,oBAAoB,EACpB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,kCAAkC,EAClC,kCAAkC,EAClC,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,GAC1B,CAAC"}
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/blocks/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAalE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAA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yB,GAC1B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as t, jsxs as x } from "react/jsx-runtime";
2
- import * as s from "react";
2
+ import * as d from "react";
3
3
  import { Slot as S } from "@radix-ui/react-slot";
4
4
  import { cva as D } from "class-variance-authority";
5
5
  import { ChevronRight as R, Ellipsis as F, Minus as G, Plus as E, ChevronsUpDown as H, ChevronDown as A, Menu as K, PanelLeft as U } from "@brightlocal/icons";
@@ -16,40 +16,40 @@ import { Skeleton as I } from "../skeleton.js";
16
16
  import { Tooltip as oe, TooltipTrigger as ie, TooltipContent as se, TooltipProvider as de } from "../tooltip.js";
17
17
  import { useIsMobile as ne } from "../hooks/use-mobile.js";
18
18
  var le = /* @__PURE__ */ ((e) => (e.LEFT = "left", e))(le || {}), ce = /* @__PURE__ */ ((e) => (e.SIDEBAR = "sidebar", e))(ce || {}), ue = /* @__PURE__ */ ((e) => (e.OFFCANVAS = "offcanvas", e.ICON = "icon", e.NONE = "none", e))(ue || {}), be = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.XS = "xs", e))(be || {}), pe = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.COLLAPSIBLE = "collapsible", e.ACTION = "action", e))(pe || {}), fe = /* @__PURE__ */ ((e) => (e.SIMPLE = "simple", e.COLLAPSIBLE = "collapsible", e.DROPDOWN = "dropdown", e.TREE = "tree", e.BADGE = "badge", e.BIG_ICON = "bigIcon", e.CHECKBOX = "checkbox", e))(fe || {}), me = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.LG = "lg", e))(me || {}), ge = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.BORDER = "border", e.INDENT = "indent", e))(ge || {}), he = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e))(he || {}), ve = /* @__PURE__ */ ((e) => (e.CARET = "caret", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.UP_DOWN = "upDown", e.PLUS_MINUS = "plusMinus", e.DOTS = "dots", e))(ve || {});
19
- const xe = "sidebar:state", we = 3600 * 24 * 7, Ne = "256px", Se = "288px", ye = "48px", ke = "b", T = s.createContext(null);
19
+ const xe = "sidebar:state", we = 3600 * 24 * 7, Ne = "256px", Se = "288px", ye = "48px", ke = "b", T = d.createContext(null);
20
20
  function C() {
21
- const e = s.useContext(T);
21
+ const e = d.useContext(T);
22
22
  if (!e)
23
23
  throw new Error("useSidebar must be used within a SidebarProvider.");
24
24
  return e;
25
25
  }
26
- const Ce = s.forwardRef(
26
+ const Ce = d.forwardRef(
27
27
  ({
28
28
  dataHook: e,
29
29
  trackingEl: a,
30
30
  trackingLabel: r,
31
31
  defaultOpen: o = !0,
32
32
  open: i,
33
- onOpenChange: d,
33
+ onOpenChange: s,
34
34
  className: l,
35
35
  style: c,
36
36
  children: b,
37
37
  ...m
38
38
  }, g) => {
39
- const p = ne(), [u, h] = s.useState(!1), [w, B] = s.useState(o), N = i ?? w, y = s.useCallback(
39
+ const p = ne(), [u, h] = d.useState(!1), [w, B] = d.useState(o), N = i ?? w, y = d.useCallback(
40
40
  (f) => {
41
41
  const v = typeof f == "function" ? f(N) : f;
42
- d ? d(v) : B(v), document.cookie = `${xe}=${v}; path=/; max-age=${we}`;
42
+ s ? s(v) : B(v), document.cookie = `${xe}=${v}; path=/; max-age=${we}`;
43
43
  },
44
- [d, N]
45
- ), k = s.useCallback(() => p ? h((f) => !f) : y((f) => !f), [p, y, h]);
46
- s.useEffect(() => {
44
+ [s, N]
45
+ ), k = d.useCallback(() => p ? h((f) => !f) : y((f) => !f), [p, y, h]);
46
+ d.useEffect(() => {
47
47
  const f = (v) => {
48
48
  v.key === ke && (v.metaKey || v.ctrlKey) && (v.preventDefault(), k());
49
49
  };
50
50
  return window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f);
51
51
  }, [k]);
52
- const M = N ? "expanded" : "collapsed", P = s.useMemo(
52
+ const M = N ? "expanded" : "collapsed", P = d.useMemo(
53
53
  () => ({
54
54
  state: M,
55
55
  open: N,
@@ -85,21 +85,21 @@ const Ce = s.forwardRef(
85
85
  }
86
86
  );
87
87
  Ce.displayName = "SidebarProvider";
88
- const Re = s.forwardRef(
88
+ const Re = d.forwardRef(
89
89
  ({
90
90
  dataHook: e,
91
91
  trackingEl: a,
92
92
  trackingLabel: r,
93
93
  side: o = "left",
94
94
  variant: i = "sidebar",
95
- collapsible: d = "offcanvas",
95
+ collapsible: s = "offcanvas",
96
96
  embedded: l = !1,
97
97
  className: c,
98
98
  children: b,
99
99
  ...m
100
100
  }, g) => {
101
101
  const { isMobile: p, state: u, openMobile: h, setOpenMobile: w } = C();
102
- return d === "none" ? /* @__PURE__ */ t(
102
+ return s === "none" ? /* @__PURE__ */ t(
103
103
  "div",
104
104
  {
105
105
  ref: g,
@@ -121,11 +121,11 @@ const Re = s.forwardRef(
121
121
  className: n(
122
122
  "group bg-sidebar text-sidebar-foreground flex h-full shrink-0 flex-col overflow-hidden transition-[width] duration-200 ease-linear",
123
123
  u === "expanded" && "w-[var(--sidebar-width)]",
124
- d === "icon" && u === "collapsed" && "w-[var(--sidebar-width-icon)]",
125
- d === "offcanvas" && u === "collapsed" && "w-0",
124
+ s === "icon" && u === "collapsed" && "w-[var(--sidebar-width-icon)]",
125
+ s === "offcanvas" && u === "collapsed" && "w-0",
126
126
  c
127
127
  ),
128
- "data-collapsible": u === "collapsed" ? d : "",
128
+ "data-collapsible": u === "collapsed" ? s : "",
129
129
  "data-hook": e,
130
130
  "data-side": o,
131
131
  "data-slot": "sidebar",
@@ -154,7 +154,7 @@ const Re = s.forwardRef(
154
154
  {
155
155
  ref: g,
156
156
  className: "group peer text-sidebar-foreground hidden md:block",
157
- "data-collapsible": u === "collapsed" ? d : "",
157
+ "data-collapsible": u === "collapsed" ? s : "",
158
158
  "data-hook": e,
159
159
  "data-side": o,
160
160
  "data-slot": "sidebar",
@@ -199,8 +199,8 @@ const Re = s.forwardRef(
199
199
  }
200
200
  );
201
201
  Re.displayName = "Sidebar";
202
- const De = s.forwardRef(({ className: e, onClick: a, dataHook: r = "sidebar-trigger", ...o }, i) => {
203
- const { toggleSidebar: d } = C();
202
+ const De = d.forwardRef(({ className: e, onClick: a, dataHook: r = "sidebar-trigger", ...o }, i) => {
203
+ const { toggleSidebar: s } = C();
204
204
  return /* @__PURE__ */ x(
205
205
  O,
206
206
  {
@@ -212,7 +212,7 @@ const De = s.forwardRef(({ className: e, onClick: a, dataHook: r = "sidebar-trig
212
212
  size: "sm",
213
213
  variant: "ghost",
214
214
  onClick: (l) => {
215
- a?.(l), d();
215
+ a?.(l), s();
216
216
  },
217
217
  ...o,
218
218
  children: [
@@ -223,7 +223,7 @@ const De = s.forwardRef(({ className: e, onClick: a, dataHook: r = "sidebar-trig
223
223
  );
224
224
  });
225
225
  De.displayName = "SidebarTrigger";
226
- const Me = s.forwardRef(
226
+ const Me = d.forwardRef(
227
227
  ({ className: e, ...a }, r) => {
228
228
  const { toggleSidebar: o } = C();
229
229
  return /* @__PURE__ */ t(
@@ -249,11 +249,11 @@ const Me = s.forwardRef(
249
249
  }
250
250
  );
251
251
  Me.displayName = "SidebarRail";
252
- const Ie = s.forwardRef(
253
- ({ className: e, dataHook: a, trackingEl: r, trackingLabel: o, ...i }, d) => /* @__PURE__ */ t(
252
+ const Ie = d.forwardRef(
253
+ ({ className: e, dataHook: a, trackingEl: r, trackingLabel: o, ...i }, s) => /* @__PURE__ */ t(
254
254
  "main",
255
255
  {
256
- ref: d,
256
+ ref: s,
257
257
  className: n(
258
258
  "bg-background relative flex min-h-svh flex-1 flex-col",
259
259
  e
@@ -267,7 +267,7 @@ const Ie = s.forwardRef(
267
267
  )
268
268
  );
269
269
  Ie.displayName = "SidebarInset";
270
- const Ee = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
270
+ const Ee = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
271
271
  j,
272
272
  {
273
273
  ref: r,
@@ -281,7 +281,7 @@ const Ee = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
281
281
  }
282
282
  ));
283
283
  Ee.displayName = "SidebarInput";
284
- const Ae = s.forwardRef(
284
+ const Ae = d.forwardRef(
285
285
  ({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
286
286
  "div",
287
287
  {
@@ -294,7 +294,7 @@ const Ae = s.forwardRef(
294
294
  )
295
295
  );
296
296
  Ae.displayName = "SidebarHeader";
297
- const Oe = s.forwardRef(
297
+ const Oe = d.forwardRef(
298
298
  ({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
299
299
  "div",
300
300
  {
@@ -307,7 +307,7 @@ const Oe = s.forwardRef(
307
307
  )
308
308
  );
309
309
  Oe.displayName = "SidebarFooter";
310
- const Te = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
310
+ const Te = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
311
311
  $,
312
312
  {
313
313
  ref: r,
@@ -320,31 +320,31 @@ const Te = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
320
320
  }
321
321
  ));
322
322
  Te.displayName = "SidebarSeparator";
323
- const ze = s.forwardRef(
324
- ({ className: e, dataHook: a, children: r, ...o }, i) => /* @__PURE__ */ t(
323
+ const ze = d.forwardRef(
324
+ ({ className: e, dataHook: a, ariaLabel: r = "Sidebar", children: o, ...i }, s) => /* @__PURE__ */ t(
325
325
  re,
326
326
  {
327
- ref: i,
327
+ ref: s,
328
328
  className: n(
329
329
  "min-h-0 flex-1 group-data-[collapsible=icon]:overflow-hidden [&>[data-slot=scroll-area-viewport]]:p-0",
330
330
  e
331
331
  ),
332
332
  dataHook: a ?? "sidebar-content-scroll",
333
- ...o,
333
+ ...i,
334
334
  children: /* @__PURE__ */ t(
335
335
  "nav",
336
336
  {
337
- "aria-label": "Sidebar",
337
+ "aria-label": r,
338
338
  className: "flex flex-col gap-2",
339
339
  "data-slot": "sidebar-content",
340
- children: r
340
+ children: o
341
341
  }
342
342
  )
343
343
  }
344
344
  )
345
345
  );
346
346
  ze.displayName = "SidebarContent";
347
- const _e = s.forwardRef(
347
+ const _e = d.forwardRef(
348
348
  ({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
349
349
  "div",
350
350
  {
@@ -377,14 +377,14 @@ const Le = D(
377
377
  variant: "default"
378
378
  }
379
379
  }
380
- ), Be = s.forwardRef(
380
+ ), Be = d.forwardRef(
381
381
  ({
382
382
  className: e,
383
383
  dataHook: a,
384
384
  asChild: r = !1,
385
385
  size: o = "sm",
386
386
  variant: i = "default",
387
- isOpen: d = !1,
387
+ isOpen: s = !1,
388
388
  onToggle: l,
389
389
  onAction: c,
390
390
  children: b,
@@ -415,7 +415,7 @@ const Le = D(
415
415
  {
416
416
  className: n(
417
417
  "shrink-0 transition-transform duration-200",
418
- d && "rotate-180"
418
+ s && "rotate-180"
419
419
  ),
420
420
  size: 16
421
421
  }
@@ -427,7 +427,7 @@ const Le = D(
427
427
  }
428
428
  );
429
429
  Be.displayName = "SidebarGroupLabel";
430
- const Pe = s.forwardRef(({ className: e, asChild: a = !1, ...r }, o) => /* @__PURE__ */ t(
430
+ const Pe = d.forwardRef(({ className: e, asChild: a = !1, ...r }, o) => /* @__PURE__ */ t(
431
431
  a ? S : "button",
432
432
  {
433
433
  ref: o,
@@ -443,7 +443,7 @@ const Pe = s.forwardRef(({ className: e, asChild: a = !1, ...r }, o) => /* @__PU
443
443
  }
444
444
  ));
445
445
  Pe.displayName = "SidebarGroupAction";
446
- const Fe = s.forwardRef(({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
446
+ const Fe = d.forwardRef(({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
447
447
  "div",
448
448
  {
449
449
  ref: o,
@@ -454,7 +454,7 @@ const Fe = s.forwardRef(({ className: e, dataHook: a, ...r }, o) => /* @__PURE__
454
454
  }
455
455
  ));
456
456
  Fe.displayName = "SidebarGroupContent";
457
- const Ge = s.forwardRef(
457
+ const Ge = d.forwardRef(
458
458
  ({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
459
459
  "ul",
460
460
  {
@@ -467,7 +467,7 @@ const Ge = s.forwardRef(
467
467
  )
468
468
  );
469
469
  Ge.displayName = "SidebarMenu";
470
- const z = s.forwardRef(
470
+ const z = d.forwardRef(
471
471
  ({ className: e, dataHook: a, ...r }, o) => /* @__PURE__ */ t(
472
472
  "li",
473
473
  {
@@ -480,14 +480,14 @@ const z = s.forwardRef(
480
480
  )
481
481
  );
482
482
  z.displayName = "SidebarMenuItem";
483
- const He = s.forwardRef(
483
+ const He = d.forwardRef(
484
484
  ({
485
485
  type: e = "caret",
486
486
  isActive: a = !1,
487
487
  className: r,
488
488
  ...o
489
489
  }, i) => {
490
- const d = {
490
+ const s = {
491
491
  ref: i,
492
492
  className: n(
493
493
  "shrink-0 transition-transform",
@@ -499,17 +499,17 @@ const He = s.forwardRef(
499
499
  };
500
500
  switch (e) {
501
501
  case "horizontal":
502
- return /* @__PURE__ */ t(R, { ...d });
502
+ return /* @__PURE__ */ t(R, { ...s });
503
503
  case "vertical":
504
- return /* @__PURE__ */ t(A, { ...d });
504
+ return /* @__PURE__ */ t(A, { ...s });
505
505
  case "upDown":
506
- return /* @__PURE__ */ t(H, { ...d });
506
+ return /* @__PURE__ */ t(H, { ...s });
507
507
  case "plusMinus":
508
- return a ? /* @__PURE__ */ t(G, { ...d }) : /* @__PURE__ */ t(E, { ...d });
508
+ return a ? /* @__PURE__ */ t(G, { ...s }) : /* @__PURE__ */ t(E, { ...s });
509
509
  case "dots":
510
- return /* @__PURE__ */ t(F, { ...d });
510
+ return /* @__PURE__ */ t(F, { ...s });
511
511
  default:
512
- return /* @__PURE__ */ t(R, { ...d });
512
+ return /* @__PURE__ */ t(R, { ...s });
513
513
  }
514
514
  }
515
515
  );
@@ -545,14 +545,14 @@ const Ke = D(
545
545
  size: "default"
546
546
  }
547
547
  }
548
- ), _ = s.forwardRef(
548
+ ), _ = d.forwardRef(
549
549
  ({
550
550
  asChild: e = !1,
551
551
  isActive: a = !1,
552
552
  variant: r = "simple",
553
553
  size: o = "default",
554
554
  tooltip: i,
555
- className: d,
555
+ className: s,
556
556
  dataHook: l,
557
557
  ...c
558
558
  }, b) => {
@@ -560,7 +560,7 @@ const Ke = D(
560
560
  m,
561
561
  {
562
562
  ref: b,
563
- className: n(Ke({ variant: r, size: o }), d),
563
+ className: n(Ke({ variant: r, size: o }), s),
564
564
  "data-active": a,
565
565
  "data-hook": l,
566
566
  "data-size": o,
@@ -593,7 +593,7 @@ const Ke = D(
593
593
  }
594
594
  );
595
595
  _.displayName = "SidebarMenuButton";
596
- const Ue = s.forwardRef(({ className: e, asChild: a = !1, showOnHover: r = !1, ...o }, i) => /* @__PURE__ */ t(
596
+ const Ue = d.forwardRef(({ className: e, asChild: a = !1, showOnHover: r = !1, ...o }, i) => /* @__PURE__ */ t(
597
597
  a ? S : "button",
598
598
  {
599
599
  ref: i,
@@ -615,7 +615,7 @@ const Ue = s.forwardRef(({ className: e, asChild: a = !1, showOnHover: r = !1, .
615
615
  }
616
616
  ));
617
617
  Ue.displayName = "SidebarMenuAction";
618
- const je = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
618
+ const je = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
619
619
  "div",
620
620
  {
621
621
  ref: r,
@@ -630,8 +630,8 @@ const je = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
630
630
  }
631
631
  ));
632
632
  je.displayName = "SidebarMenuBadge";
633
- const $e = s.forwardRef(({ className: e, showIcon: a = !1, ...r }, o) => {
634
- const i = s.useId(), d = s.useMemo(() => {
633
+ const $e = d.forwardRef(({ className: e, showIcon: a = !1, ...r }, o) => {
634
+ const i = d.useId(), s = d.useMemo(() => {
635
635
  let l = 0;
636
636
  for (let c = 0; c < i.length; c++)
637
637
  l = (l << 5) - l + i.charCodeAt(c), l |= 0;
@@ -658,7 +658,7 @@ const $e = s.forwardRef(({ className: e, showIcon: a = !1, ...r }, o) => {
658
658
  className: "h-4 max-w-[--skeleton-width] flex-1",
659
659
  "data-slot": "sidebar-menu-skeleton-text",
660
660
  style: {
661
- "--skeleton-width": d
661
+ "--skeleton-width": s
662
662
  }
663
663
  }
664
664
  )
@@ -681,7 +681,7 @@ const We = D(
681
681
  variant: "border"
682
682
  }
683
683
  }
684
- ), L = s.forwardRef(
684
+ ), L = d.forwardRef(
685
685
  ({ className: e, variant: a = "border", dataHook: r, ...o }, i) => /* @__PURE__ */ t(
686
686
  "ul",
687
687
  {
@@ -694,7 +694,7 @@ const We = D(
694
694
  )
695
695
  );
696
696
  L.displayName = "SidebarMenuSub";
697
- const Xe = s.forwardRef(({ dataHook: e, ...a }, r) => /* @__PURE__ */ t(
697
+ const Xe = d.forwardRef(({ dataHook: e, ...a }, r) => /* @__PURE__ */ t(
698
698
  "li",
699
699
  {
700
700
  ref: r,
@@ -704,14 +704,14 @@ const Xe = s.forwardRef(({ dataHook: e, ...a }, r) => /* @__PURE__ */ t(
704
704
  }
705
705
  ));
706
706
  Xe.displayName = "SidebarMenuSubItem";
707
- const qe = s.forwardRef(
707
+ const qe = d.forwardRef(
708
708
  ({
709
709
  asChild: e = !1,
710
710
  size: a = "md",
711
711
  isActive: r,
712
712
  className: o,
713
713
  dataHook: i,
714
- ...d
714
+ ...s
715
715
  }, l) => /* @__PURE__ */ t(
716
716
  e ? S : "a",
717
717
  {
@@ -728,7 +728,7 @@ const qe = s.forwardRef(
728
728
  "data-hook": i,
729
729
  "data-size": a,
730
730
  "data-slot": "sidebar-menu-sub-button",
731
- ...d
731
+ ...s
732
732
  }
733
733
  )
734
734
  );
@@ -739,7 +739,7 @@ function Ve({
739
739
  children: r,
740
740
  defaultOpen: o,
741
741
  open: i,
742
- onOpenChange: d
742
+ onOpenChange: s
743
743
  }) {
744
744
  return /* @__PURE__ */ t(z, { children: /* @__PURE__ */ t(
745
745
  Q,
@@ -750,13 +750,13 @@ function Ve({
750
750
  defaultValue: o ? "item" : void 0,
751
751
  type: "single",
752
752
  value: i !== void 0 ? i ? "item" : "" : void 0,
753
- onValueChange: d ? (l) => d(l === "item") : void 0,
753
+ onValueChange: s ? (l) => s(l === "item") : void 0,
754
754
  children: /* @__PURE__ */ t(ee, { className: "group/collapsible border-none", value: "item", children: r })
755
755
  }
756
756
  ) });
757
757
  }
758
758
  Ve.displayName = "SidebarMenuCollapsible";
759
- const Ye = s.forwardRef(({ children: e, className: a, ...r }, o) => /* @__PURE__ */ t(te.Trigger, { asChild: !0, children: /* @__PURE__ */ x(
759
+ const Ye = d.forwardRef(({ children: e, className: a, ...r }, o) => /* @__PURE__ */ t(te.Trigger, { asChild: !0, children: /* @__PURE__ */ x(
760
760
  _,
761
761
  {
762
762
  ref: o,
@@ -777,7 +777,7 @@ const Ye = s.forwardRef(({ children: e, className: a, ...r }, o) => /* @__PURE__
777
777
  }
778
778
  ) }));
779
779
  Ye.displayName = "SidebarMenuCollapsibleTrigger";
780
- const Ze = s.forwardRef(({ dataHook: e, children: a, ...r }, o) => /* @__PURE__ */ t(ae, { className: "p-0", children: /* @__PURE__ */ t(L, { ref: o, dataHook: e, ...r, children: a }) }));
780
+ const Ze = d.forwardRef(({ dataHook: e, children: a, ...r }, o) => /* @__PURE__ */ t(ae, { className: "p-0", children: /* @__PURE__ */ t(L, { ref: o, dataHook: e, ...r, children: a }) }));
781
781
  Ze.displayName = "SidebarMenuCollapsibleContent";
782
782
  function Je({
783
783
  dataHook: e,
@@ -785,7 +785,7 @@ function Je({
785
785
  description: r = "Main navigation menu",
786
786
  trackingEl: o,
787
787
  trackingLabel: i,
788
- children: d,
788
+ children: s,
789
789
  className: l,
790
790
  ...c
791
791
  }) {
@@ -812,7 +812,7 @@ function Je({
812
812
  children: [
813
813
  /* @__PURE__ */ t(Z, { className: "sr-only", children: a }),
814
814
  /* @__PURE__ */ t(J, { className: "sr-only", children: r }),
815
- /* @__PURE__ */ t("div", { className: "flex h-full flex-col p-6", children: d })
815
+ /* @__PURE__ */ t("div", { className: "flex h-full flex-col p-6", children: s })
816
816
  ]
817
817
  }
818
818
  )
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),v=require("react"),d=require("@brightlocal/ui-components/lib/utils"),i=require("./header.cjs");function w(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const c=w(v),G={xl:"var(--ds-breakpoint-xl)",lg:"var(--ds-breakpoint-lg)",sm:"var(--ds-breakpoint-sm)"},u=c.forwardRef(({className:a,variant:t="xl",maxWidth:e,dataHook:o,trackingEl:l,trackingLabel:n,children:r,...x},g)=>{const h=e!=null?typeof e=="number"?`${e}px`:e:G[t];return s.jsx("div",{ref:g,className:d.cn("py-section-sm pl-section-sm flex h-dvh w-full flex-col overflow-hidden",a),"data-hook":o,"data-slot":"global-layout","data-tracking-el":l,"data-tracking-label":n,...x,children:s.jsx("div",{className:"mx-auto flex h-full w-full","data-slot":"global-container",style:{maxWidth:h},children:r})})});u.displayName="GlobalLayout";const L="256px",b=c.forwardRef(({className:a,width:t=L,dataHook:e,children:o,...l},n)=>{const r=typeof t=="number"?`${t}px`:t;return s.jsx("aside",{ref:n,className:d.cn("focus-visible:shadow-default hidden h-full shrink-0 overflow-y-auto outline-none lg:block",a),"data-hook":e,"data-slot":"sidebar-container",style:{width:r},tabIndex:0,...l,children:o})});b.displayName="GlobalLayoutSidebar";const k={lg:"var(--ds-breakpoint-lg)",md:"var(--ds-breakpoint-md)",sm:"var(--ds-breakpoint-sm)"},f=c.forwardRef(({className:a,variant:t="lg",padding:e,dataHook:o,children:l,...n},r)=>s.jsx("div",{ref:r,className:d.cn("focus-visible:shadow-default flex h-full min-h-0 min-w-0 flex-1 overflow-y-auto outline-none",a),"data-hook":o,"data-slot":"content-wrapper",tabIndex:0,...n,children:s.jsx("div",{className:"pr-section-sm mx-auto w-full","data-slot":"content-container",style:{maxWidth:k[t],padding:e},children:l})}));f.displayName="GlobalLayoutContent";const y=c.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,children:l,...n},r)=>s.jsx(i.Header,{ref:r,className:d.cn("px-content justify-between gap-6 pb-9",a),"data-slot":"content-header",dataHook:t,trackingEl:e,trackingLabel:o,...n,children:l}));y.displayName="GlobalLayoutContentHeader";const p=c.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,children:l,...n},r)=>s.jsx("div",{ref:r,className:d.cn("px-content flex flex-col gap-6",a),"data-hook":t,"data-slot":"content-body","data-tracking-el":e,"data-tracking-label":o,...n,children:l}));p.displayName="GlobalLayoutContentBody";const m=c.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,children:l,...n},r)=>s.jsx(i.Header,{ref:r,className:d.cn("gap-2.5 px-2.5 py-2 lg:hidden",a),"data-slot":"mobile-header",dataHook:t,trackingEl:e,trackingLabel:o,...n,children:l}));m.displayName="GlobalLayoutMobileHeader";exports.GlobalLayout=u;exports.GlobalLayoutContent=f;exports.GlobalLayoutContentBody=p;exports.GlobalLayoutContentHeader=y;exports.GlobalLayoutMobileHeader=m;exports.GlobalLayoutSidebar=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),G=require("react"),d=require("@brightlocal/ui-components/lib/utils"),u=require("./header.cjs");function L(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const c=L(G),b=c.forwardRef(({className:a,maxWidth:e="var(--ds-breakpoint-xl)",dataHook:t,trackingEl:o,trackingLabel:l,children:n,...r},i)=>{const g=typeof e=="number"?`${e}px`:e;return s.jsx("div",{ref:i,className:d.cn("py-section-sm pl-section-sm flex min-h-dvh w-full flex-col",a),"data-hook":t,"data-slot":"global-layout","data-tracking-el":o,"data-tracking-label":l,...r,children:s.jsx("div",{className:"mx-auto flex w-full flex-1","data-slot":"global-container",style:{maxWidth:g},children:n})})});b.displayName="GlobalLayout";const j="256px",y=c.forwardRef(({className:a,width:e=j,dataHook:t,children:o,...l},n)=>{const r=typeof e=="number"?`${e}px`:e;return s.jsx("aside",{ref:n,className:d.cn("sticky hidden shrink-0 self-start outline-none lg:block",a),"data-hook":t,"data-slot":"sidebar-container",style:{width:r,top:"var(--ds-section-padding-y-sm)"},...l,children:o})});y.displayName="GlobalLayoutSidebar";const f=c.forwardRef(({className:a,maxWidth:e="var(--ds-breakpoint-lg)",padding:t,dataHook:o,children:l,...n},r)=>{const i=typeof e=="number"?`${e}px`:e;return s.jsx("div",{ref:r,className:d.cn("flex min-w-0 flex-1",a),"data-hook":o,"data-slot":"content-wrapper",...n,children:s.jsx("div",{className:"pr-section-sm mx-auto w-full","data-slot":"content-container",style:{maxWidth:i,padding:t},children:l})})});f.displayName="GlobalLayoutContent";const p=c.forwardRef(({className:a,dataHook:e,trackingEl:t,trackingLabel:o,children:l,...n},r)=>s.jsx(u.Header,{ref:r,className:d.cn("px-content justify-between gap-6 pb-9",a),"data-slot":"content-header",dataHook:e,trackingEl:t,trackingLabel:o,...n,children:l}));p.displayName="GlobalLayoutContentHeader";const m=c.forwardRef(({className:a,dataHook:e,trackingEl:t,trackingLabel:o,children:l,...n},r)=>s.jsx("div",{ref:r,className:d.cn("px-content flex flex-col gap-6",a),"data-hook":e,"data-slot":"content-body","data-tracking-el":t,"data-tracking-label":o,...n,children:l}));m.displayName="GlobalLayoutContentBody";const x=c.forwardRef(({className:a,dataHook:e,trackingEl:t,trackingLabel:o,children:l,...n},r)=>s.jsx(u.Header,{ref:r,className:d.cn("gap-2.5 px-2.5 py-2 lg:hidden",a),"data-slot":"mobile-header",dataHook:e,trackingEl:t,trackingLabel:o,...n,children:l}));x.displayName="GlobalLayoutMobileHeader";exports.GlobalLayout=b;exports.GlobalLayoutContent=f;exports.GlobalLayoutContentBody=m;exports.GlobalLayoutContentHeader=p;exports.GlobalLayoutMobileHeader=x;exports.GlobalLayoutSidebar=y;
@@ -1,11 +1,4 @@
1
1
  import * as React from "react";
2
- /**
3
- * Container width variants for GlobalLayout, matching Figma GlobalContainer `width` property.
4
- * - "xl": 1280px max-width
5
- * - "lg": 1024px max-width
6
- * - "sm": 640px max-width
7
- */
8
- type ContainerVariant = "xl" | "lg" | "sm";
9
2
  interface GlobalLayoutProps extends React.ComponentProps<"div"> {
10
3
  /**
11
4
  * Data hook for automated testing (required)
@@ -20,12 +13,8 @@ interface GlobalLayoutProps extends React.ComponentProps<"div"> {
20
13
  */
21
14
  trackingLabel?: string;
22
15
  /**
23
- * Container max-width variant, matching Figma GlobalContainer `width` property.
24
- * @default "xl"
25
- */
26
- variant?: ContainerVariant;
27
- /**
28
- * Custom maximum width for the global container. Overrides `variant` when set.
16
+ * Maximum width of the global container. Use `breakpoint` tokens from `@brightlocal/tokens/breakpoints`.
17
+ * @default breakpoint.xl
29
18
  */
30
19
  maxWidth?: string | number;
31
20
  }
@@ -41,23 +30,16 @@ interface GlobalLayoutSidebarProps extends React.ComponentProps<"aside"> {
41
30
  width?: string | number;
42
31
  }
43
32
  declare const GlobalLayoutSidebar: React.ForwardRefExoticComponent<Omit<GlobalLayoutSidebarProps, "ref"> & React.RefAttributes<HTMLElement>>;
44
- /**
45
- * Content width variants for GlobalLayoutContent, matching Figma Content `width` property.
46
- * - "lg": 1024px max-width
47
- * - "md": 768px max-width
48
- * - "sm": 640px max-width
49
- */
50
- type ContentVariant = "lg" | "md" | "sm";
51
33
  interface GlobalLayoutContentProps extends React.ComponentProps<"div"> {
52
34
  /**
53
35
  * Data hook for automated testing
54
36
  */
55
37
  dataHook?: string;
56
38
  /**
57
- * Content max-width variant, matching Figma Content `width` property.
58
- * @default "lg"
39
+ * Maximum width of the content area. Use `breakpoint` tokens from `@brightlocal/tokens/breakpoints`.
40
+ * @default breakpoint.lg
59
41
  */
60
- variant?: ContentVariant;
42
+ maxWidth?: string | number;
61
43
  /**
62
44
  * Custom padding for the content wrapper
63
45
  */
@@ -110,5 +92,5 @@ interface GlobalLayoutMobileHeaderProps extends React.ComponentProps<"header"> {
110
92
  }
111
93
  declare const GlobalLayoutMobileHeader: React.ForwardRefExoticComponent<Omit<GlobalLayoutMobileHeaderProps, "ref"> & React.RefAttributes<HTMLElement>>;
112
94
  export { GlobalLayout, GlobalLayoutSidebar, GlobalLayoutContent, GlobalLayoutContentHeader, GlobalLayoutContentBody, GlobalLayoutMobileHeader, };
113
- export type { ContainerVariant, ContentVariant, GlobalLayoutProps, GlobalLayoutSidebarProps, GlobalLayoutContentProps, GlobalLayoutContentHeaderProps, GlobalLayoutContentBodyProps, GlobalLayoutMobileHeaderProps, };
95
+ export type { GlobalLayoutProps, GlobalLayoutSidebarProps, GlobalLayoutContentProps, GlobalLayoutContentHeaderProps, GlobalLayoutContentBodyProps, GlobalLayoutMobileHeaderProps, };
114
96
  //# sourceMappingURL=global-layout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-layout.d.ts","sourceRoot":"","sources":["../../src/components/global-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;GAKG;AACH,KAAK,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAQ3C,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC7D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,QAAQ,C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AM,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,mBAAmB,8GAuCxB,CAAC;AAIF,UAAU,8BAA+B,SAAQ,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;IAC7E;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,yBAAyB,iHAsB9B,CAAC;AAIF,UAAU,4BAA6B,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACxE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,uBAAuB,kHAsB5B,CAAC;AAIF,UAAU,6BAA8B,SAAQ,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;IAC5E;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,wBAAwB,gHAsB7B,CAAC;AAIF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,GACzB,CAAC;AAEF,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,6BAA6B,GAC9B,CAAC"}
@@ -1,156 +1,155 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import * as s from "react";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import * as d from "react";
3
3
  import { cn as i } from "@brightlocal/ui-components/lib/utils";
4
- import { Header as c } from "./header.js";
5
- const m = {
6
- xl: "var(--ds-breakpoint-xl)",
7
- lg: "var(--ds-breakpoint-lg)",
8
- sm: "var(--ds-breakpoint-sm)"
9
- }, p = s.forwardRef(
4
+ import { Header as p } from "./header.js";
5
+ const f = d.forwardRef(
10
6
  ({
11
7
  className: t,
12
- variant: o = "xl",
13
- maxWidth: a,
14
- dataHook: e,
15
- trackingEl: l,
16
- trackingLabel: n,
17
- children: r,
18
- ...f
19
- }, u) => {
20
- const b = a != null ? typeof a == "number" ? `${a}px` : a : m[o];
21
- return /* @__PURE__ */ d(
8
+ maxWidth: a = "var(--ds-breakpoint-xl)",
9
+ dataHook: o,
10
+ trackingEl: e,
11
+ trackingLabel: l,
12
+ children: n,
13
+ ...r
14
+ }, c) => {
15
+ const y = typeof a == "number" ? `${a}px` : a;
16
+ return /* @__PURE__ */ s(
22
17
  "div",
23
18
  {
24
- ref: u,
19
+ ref: c,
25
20
  className: i(
26
- "py-section-sm pl-section-sm flex h-dvh w-full flex-col overflow-hidden",
21
+ "py-section-sm pl-section-sm flex min-h-dvh w-full flex-col",
27
22
  t
28
23
  ),
29
- "data-hook": e,
24
+ "data-hook": o,
30
25
  "data-slot": "global-layout",
31
- "data-tracking-el": l,
32
- "data-tracking-label": n,
33
- ...f,
34
- children: /* @__PURE__ */ d(
26
+ "data-tracking-el": e,
27
+ "data-tracking-label": l,
28
+ ...r,
29
+ children: /* @__PURE__ */ s(
35
30
  "div",
36
31
  {
37
- className: "mx-auto flex h-full w-full",
32
+ className: "mx-auto flex w-full flex-1",
38
33
  "data-slot": "global-container",
39
- style: { maxWidth: b },
40
- children: r
34
+ style: { maxWidth: y },
35
+ children: n
41
36
  }
42
37
  )
43
38
  }
44
39
  );
45
40
  }
46
41
  );
47
- p.displayName = "GlobalLayout";
48
- const y = "256px", x = s.forwardRef(({ className: t, width: o = y, dataHook: a, children: e, ...l }, n) => {
49
- const r = typeof o == "number" ? `${o}px` : o;
50
- return /* @__PURE__ */ d(
42
+ f.displayName = "GlobalLayout";
43
+ const m = "256px", b = d.forwardRef(({ className: t, width: a = m, dataHook: o, children: e, ...l }, n) => {
44
+ const r = typeof a == "number" ? `${a}px` : a;
45
+ return /* @__PURE__ */ s(
51
46
  "aside",
52
47
  {
53
48
  ref: n,
54
49
  className: i(
55
- "focus-visible:shadow-default hidden h-full shrink-0 overflow-y-auto outline-none lg:block",
50
+ "sticky hidden shrink-0 self-start outline-none lg:block",
56
51
  t
57
52
  ),
58
- "data-hook": a,
53
+ "data-hook": o,
59
54
  "data-slot": "sidebar-container",
60
- style: { width: r },
61
- tabIndex: 0,
55
+ style: {
56
+ width: r,
57
+ top: "var(--ds-section-padding-y-sm)"
58
+ },
62
59
  ...l,
63
60
  children: e
64
61
  }
65
62
  );
66
63
  });
67
- x.displayName = "GlobalLayoutSidebar";
68
- const h = {
69
- lg: "var(--ds-breakpoint-lg)",
70
- md: "var(--ds-breakpoint-md)",
71
- sm: "var(--ds-breakpoint-sm)"
72
- }, v = s.forwardRef(
73
- ({ className: t, variant: o = "lg", padding: a, dataHook: e, children: l, ...n }, r) => /* @__PURE__ */ d(
74
- "div",
75
- {
76
- ref: r,
77
- className: i(
78
- "focus-visible:shadow-default flex h-full min-h-0 min-w-0 flex-1 overflow-y-auto outline-none",
79
- t
80
- ),
81
- "data-hook": e,
82
- "data-slot": "content-wrapper",
83
- tabIndex: 0,
84
- ...n,
85
- children: /* @__PURE__ */ d(
86
- "div",
87
- {
88
- className: "pr-section-sm mx-auto w-full",
89
- "data-slot": "content-container",
90
- style: {
91
- maxWidth: h[o],
92
- padding: a
93
- },
94
- children: l
95
- }
96
- )
97
- }
98
- )
64
+ b.displayName = "GlobalLayoutSidebar";
65
+ const u = d.forwardRef(
66
+ ({
67
+ className: t,
68
+ maxWidth: a = "var(--ds-breakpoint-lg)",
69
+ padding: o,
70
+ dataHook: e,
71
+ children: l,
72
+ ...n
73
+ }, r) => {
74
+ const c = typeof a == "number" ? `${a}px` : a;
75
+ return /* @__PURE__ */ s(
76
+ "div",
77
+ {
78
+ ref: r,
79
+ className: i("flex min-w-0 flex-1", t),
80
+ "data-hook": e,
81
+ "data-slot": "content-wrapper",
82
+ ...n,
83
+ children: /* @__PURE__ */ s(
84
+ "div",
85
+ {
86
+ className: "pr-section-sm mx-auto w-full",
87
+ "data-slot": "content-container",
88
+ style: {
89
+ maxWidth: c,
90
+ padding: o
91
+ },
92
+ children: l
93
+ }
94
+ )
95
+ }
96
+ );
97
+ }
99
98
  );
100
- v.displayName = "GlobalLayoutContent";
101
- const w = s.forwardRef(
102
- ({ className: t, dataHook: o, trackingEl: a, trackingLabel: e, children: l, ...n }, r) => /* @__PURE__ */ d(
103
- c,
99
+ u.displayName = "GlobalLayoutContent";
100
+ const x = d.forwardRef(
101
+ ({ className: t, dataHook: a, trackingEl: o, trackingLabel: e, children: l, ...n }, r) => /* @__PURE__ */ s(
102
+ p,
104
103
  {
105
104
  ref: r,
106
105
  className: i("px-content justify-between gap-6 pb-9", t),
107
106
  "data-slot": "content-header",
108
- dataHook: o,
109
- trackingEl: a,
107
+ dataHook: a,
108
+ trackingEl: o,
110
109
  trackingLabel: e,
111
110
  ...n,
112
111
  children: l
113
112
  }
114
113
  )
115
114
  );
116
- w.displayName = "GlobalLayoutContentHeader";
117
- const g = s.forwardRef(
118
- ({ className: t, dataHook: o, trackingEl: a, trackingLabel: e, children: l, ...n }, r) => /* @__PURE__ */ d(
115
+ x.displayName = "GlobalLayoutContentHeader";
116
+ const N = d.forwardRef(
117
+ ({ className: t, dataHook: a, trackingEl: o, trackingLabel: e, children: l, ...n }, r) => /* @__PURE__ */ s(
119
118
  "div",
120
119
  {
121
120
  ref: r,
122
121
  className: i("px-content flex flex-col gap-6", t),
123
- "data-hook": o,
122
+ "data-hook": a,
124
123
  "data-slot": "content-body",
125
- "data-tracking-el": a,
124
+ "data-tracking-el": o,
126
125
  "data-tracking-label": e,
127
126
  ...n,
128
127
  children: l
129
128
  }
130
129
  )
131
130
  );
132
- g.displayName = "GlobalLayoutContentBody";
133
- const k = s.forwardRef(
134
- ({ className: t, dataHook: o, trackingEl: a, trackingLabel: e, children: l, ...n }, r) => /* @__PURE__ */ d(
135
- c,
131
+ N.displayName = "GlobalLayoutContentBody";
132
+ const g = d.forwardRef(
133
+ ({ className: t, dataHook: a, trackingEl: o, trackingLabel: e, children: l, ...n }, r) => /* @__PURE__ */ s(
134
+ p,
136
135
  {
137
136
  ref: r,
138
137
  className: i("gap-2.5 px-2.5 py-2 lg:hidden", t),
139
138
  "data-slot": "mobile-header",
140
- dataHook: o,
141
- trackingEl: a,
139
+ dataHook: a,
140
+ trackingEl: o,
142
141
  trackingLabel: e,
143
142
  ...n,
144
143
  children: l
145
144
  }
146
145
  )
147
146
  );
148
- k.displayName = "GlobalLayoutMobileHeader";
147
+ g.displayName = "GlobalLayoutMobileHeader";
149
148
  export {
150
- p as GlobalLayout,
151
- v as GlobalLayoutContent,
152
- g as GlobalLayoutContentBody,
153
- w as GlobalLayoutContentHeader,
154
- k as GlobalLayoutMobileHeader,
155
- x as GlobalLayoutSidebar
149
+ f as GlobalLayout,
150
+ u as GlobalLayoutContent,
151
+ N as GlobalLayoutContentBody,
152
+ x as GlobalLayoutContentHeader,
153
+ g as GlobalLayoutMobileHeader,
154
+ b as GlobalLayoutSidebar
156
155
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "BrightLocal Design System UI Components",
5
5
  "type": "module",
6
6
  "private": false,
@@ -130,8 +130,8 @@
130
130
  "vite-bundle-visualizer": "^1.2.1",
131
131
  "vite-plugin-dts": "^4.5.4",
132
132
  "vite-plugin-lib-inject-css": "^2.2.2",
133
- "@workspace/eslint-config": "0.0.0",
134
- "@workspace/typescript-config": "0.0.0"
133
+ "@workspace/typescript-config": "0.0.0",
134
+ "@workspace/eslint-config": "0.0.0"
135
135
  },
136
136
  "publishConfig": {
137
137
  "access": "public",
@@ -719,10 +719,14 @@ SidebarSeparator.displayName = "SidebarSeparator";
719
719
  interface SidebarContentProps extends Omit<React.ComponentProps<"div">, "dir"> {
720
720
  /** Data hook for automated testing */
721
721
  dataHook?: string;
722
+ /** Accessible label for the sidebar navigation landmark. Override for i18n.
723
+ * @default "Sidebar"
724
+ */
725
+ ariaLabel?: string;
722
726
  }
723
727
 
724
728
  const SidebarContent = React.forwardRef<HTMLDivElement, SidebarContentProps>(
725
- ({ className, dataHook, children, ...props }, ref) => {
729
+ ({ className, dataHook, ariaLabel = "Sidebar", children, ...props }, ref) => {
726
730
  return (
727
731
  <ScrollArea
728
732
  ref={ref}
@@ -734,7 +738,7 @@ const SidebarContent = React.forwardRef<HTMLDivElement, SidebarContentProps>(
734
738
  {...props}
735
739
  >
736
740
  <nav
737
- aria-label="Sidebar"
741
+ aria-label={ariaLabel}
738
742
  className="flex flex-col gap-2"
739
743
  data-slot="sidebar-content"
740
744
  >
@@ -3,20 +3,6 @@ import * as React from "react";
3
3
  import { cn } from "@brightlocal/ui-components/lib/utils";
4
4
  import { Header } from "./header";
5
5
 
6
- /**
7
- * Container width variants for GlobalLayout, matching Figma GlobalContainer `width` property.
8
- * - "xl": 1280px max-width
9
- * - "lg": 1024px max-width
10
- * - "sm": 640px max-width
11
- */
12
- type ContainerVariant = "xl" | "lg" | "sm";
13
-
14
- const containerMaxWidth: Record<ContainerVariant, string> = {
15
- xl: "var(--ds-breakpoint-xl)",
16
- lg: "var(--ds-breakpoint-lg)",
17
- sm: "var(--ds-breakpoint-sm)",
18
- };
19
-
20
6
  interface GlobalLayoutProps extends React.ComponentProps<"div"> {
21
7
  /**
22
8
  * Data hook for automated testing (required)
@@ -31,12 +17,8 @@ interface GlobalLayoutProps extends React.ComponentProps<"div"> {
31
17
  */
32
18
  trackingLabel?: string;
33
19
  /**
34
- * Container max-width variant, matching Figma GlobalContainer `width` property.
35
- * @default "xl"
36
- */
37
- variant?: ContainerVariant;
38
- /**
39
- * Custom maximum width for the global container. Overrides `variant` when set.
20
+ * Maximum width of the global container. Use `breakpoint` tokens from `@brightlocal/tokens/breakpoints`.
21
+ * @default breakpoint.xl
40
22
  */
41
23
  maxWidth?: string | number;
42
24
  }
@@ -45,8 +27,7 @@ const GlobalLayout = React.forwardRef<HTMLDivElement, GlobalLayoutProps>(
45
27
  (
46
28
  {
47
29
  className,
48
- variant = "xl",
49
- maxWidth,
30
+ maxWidth = "var(--ds-breakpoint-xl)",
50
31
  dataHook,
51
32
  trackingEl,
52
33
  trackingLabel,
@@ -56,17 +37,13 @@ const GlobalLayout = React.forwardRef<HTMLDivElement, GlobalLayoutProps>(
56
37
  ref
57
38
  ) => {
58
39
  const resolvedMaxWidth =
59
- maxWidth != null
60
- ? typeof maxWidth === "number"
61
- ? `${maxWidth}px`
62
- : maxWidth
63
- : containerMaxWidth[variant];
40
+ typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth;
64
41
 
65
42
  return (
66
43
  <div
67
44
  ref={ref}
68
45
  className={cn(
69
- "py-section-sm pl-section-sm flex h-dvh w-full flex-col overflow-hidden",
46
+ "py-section-sm pl-section-sm flex min-h-dvh w-full flex-col",
70
47
  className
71
48
  )}
72
49
  data-hook={dataHook}
@@ -76,7 +53,7 @@ const GlobalLayout = React.forwardRef<HTMLDivElement, GlobalLayoutProps>(
76
53
  {...props}
77
54
  >
78
55
  <div
79
- className="mx-auto flex h-full w-full"
56
+ className="mx-auto flex w-full flex-1"
80
57
  data-slot="global-container"
81
58
  style={{ maxWidth: resolvedMaxWidth }}
82
59
  >
@@ -113,13 +90,15 @@ const GlobalLayoutSidebar = React.forwardRef<
113
90
  <aside
114
91
  ref={ref}
115
92
  className={cn(
116
- "focus-visible:shadow-default hidden h-full shrink-0 overflow-y-auto outline-none lg:block",
93
+ "sticky hidden shrink-0 self-start outline-none lg:block",
117
94
  className
118
95
  )}
119
96
  data-hook={dataHook}
120
97
  data-slot="sidebar-container"
121
- style={{ width: widthStyle }}
122
- tabIndex={0}
98
+ style={{
99
+ width: widthStyle,
100
+ top: "var(--ds-section-padding-y-sm)",
101
+ }}
123
102
  {...props}
124
103
  >
125
104
  {children}
@@ -129,30 +108,16 @@ const GlobalLayoutSidebar = React.forwardRef<
129
108
 
130
109
  GlobalLayoutSidebar.displayName = "GlobalLayoutSidebar";
131
110
 
132
- /**
133
- * Content width variants for GlobalLayoutContent, matching Figma Content `width` property.
134
- * - "lg": 1024px max-width
135
- * - "md": 768px max-width
136
- * - "sm": 640px max-width
137
- */
138
- type ContentVariant = "lg" | "md" | "sm";
139
-
140
- const contentMaxWidth: Record<ContentVariant, string> = {
141
- lg: "var(--ds-breakpoint-lg)",
142
- md: "var(--ds-breakpoint-md)",
143
- sm: "var(--ds-breakpoint-sm)",
144
- };
145
-
146
111
  interface GlobalLayoutContentProps extends React.ComponentProps<"div"> {
147
112
  /**
148
113
  * Data hook for automated testing
149
114
  */
150
115
  dataHook?: string;
151
116
  /**
152
- * Content max-width variant, matching Figma Content `width` property.
153
- * @default "lg"
117
+ * Maximum width of the content area. Use `breakpoint` tokens from `@brightlocal/tokens/breakpoints`.
118
+ * @default breakpoint.lg
154
119
  */
155
- variant?: ContentVariant;
120
+ maxWidth?: string | number;
156
121
  /**
157
122
  * Custom padding for the content wrapper
158
123
  */
@@ -164,26 +129,32 @@ const GlobalLayoutContent = React.forwardRef<
164
129
  GlobalLayoutContentProps
165
130
  >(
166
131
  (
167
- { className, variant = "lg", padding, dataHook, children, ...props },
132
+ {
133
+ className,
134
+ maxWidth = "var(--ds-breakpoint-lg)",
135
+ padding,
136
+ dataHook,
137
+ children,
138
+ ...props
139
+ },
168
140
  ref
169
141
  ) => {
142
+ const resolvedMaxWidth =
143
+ typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth;
144
+
170
145
  return (
171
146
  <div
172
147
  ref={ref}
173
- className={cn(
174
- "focus-visible:shadow-default flex h-full min-h-0 min-w-0 flex-1 overflow-y-auto outline-none",
175
- className
176
- )}
148
+ className={cn("flex min-w-0 flex-1", className)}
177
149
  data-hook={dataHook}
178
150
  data-slot="content-wrapper"
179
- tabIndex={0}
180
151
  {...props}
181
152
  >
182
153
  <div
183
154
  className="pr-section-sm mx-auto w-full"
184
155
  data-slot="content-container"
185
156
  style={{
186
- maxWidth: contentMaxWidth[variant],
157
+ maxWidth: resolvedMaxWidth,
187
158
  padding,
188
159
  }}
189
160
  >
@@ -329,8 +300,6 @@ export {
329
300
  };
330
301
 
331
302
  export type {
332
- ContainerVariant,
333
- ContentVariant,
334
303
  GlobalLayoutProps,
335
304
  GlobalLayoutSidebarProps,
336
305
  GlobalLayoutContentProps,