@brightlocal/ui-components 2.5.0 → 2.6.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.
- package/component-meta.json +1 -1
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +77 -3
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +403 -283
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +65 -21
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +128 -66
- package/dist/hooks/use-mobile.cjs +1 -1
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +17 -12
- package/dist/index.cjs +1 -1
- package/dist/index.js +356 -347
- package/package.json +1 -1
- package/src/blocks/sidebar.tsx +259 -21
- package/src/components/global-layout.tsx +190 -42
- package/src/hooks/use-mobile.ts +7 -1
package/component-meta.json
CHANGED
package/dist/blocks/sidebar.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),fe=require("react"),k=require("@radix-ui/react-slot"),R=require("class-variance-authority"),f=require("@brightlocal/icons"),d=require("@brightlocal/ui-components/lib/utils"),ge=require("../button.cjs"),me=require("../input.cjs"),he=require("../separator.cjs"),C=require("../sheet.cjs"),D=require("../skeleton.cjs"),M=require("../tooltip.cjs"),xe=require("../hooks/use-mobile.cjs");function ve(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const i=ve(fe);var E=(e=>(e.LEFT="left",e))(E||{}),O=(e=>(e.SIDEBAR="sidebar",e))(O||{}),A=(e=>(e.OFFCANVAS="offcanvas",e.ICON="icon",e.NONE="none",e))(A||{}),z=(e=>(e.DEFAULT="default",e.SM="sm",e.XS="xs",e))(z||{}),T=(e=>(e.DEFAULT="default",e.COLLAPSIBLE="collapsible",e.ACTION="action",e))(T||{}),_=(e=>(e.SIMPLE="simple",e.COLLAPSIBLE="collapsible",e.DROPDOWN="dropdown",e.TREE="tree",e.BADGE="badge",e.BIG_ICON="bigIcon",e.CHECKBOX="checkbox",e))(_||{}),L=(e=>(e.DEFAULT="default",e.SM="sm",e.LG="lg",e))(L||{}),B=(e=>(e.DEFAULT="default",e.BORDER="border",e.INDENT="indent",e))(B||{}),P=(e=>(e.SM="sm",e.MD="md",e))(P||{}),q=(e=>(e.CARET="caret",e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e.UP_DOWN="upDown",e.PLUS_MINUS="plusMinus",e.DOTS="dots",e))(q||{});const Se="sidebar:state",we=3600*24*7,ke="256px",Ne="288px",ye="48px",je="b",G=i.createContext(null);function N(){const e=i.useContext(G);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const F=i.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:t,defaultOpen:o=!0,open:s,onOpenChange:n,className:l,style:c,children:g,...m},v)=>{const u=xe.useIsMobile(),[b,h]=i.useState(!1),[S,be]=i.useState(o),w=s??S,y=i.useCallback(p=>{const x=typeof p=="function"?p(w):p;n?n(x):be(x),document.cookie=`${Se}=${x}; path=/; max-age=${we}`},[n,w]),j=i.useCallback(()=>u?h(p=>!p):y(p=>!p),[u,y,h]);i.useEffect(()=>{const p=x=>{x.key===je&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),j())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[j]);const I=w?"expanded":"collapsed",pe=i.useMemo(()=>({state:I,open:w,setOpen:y,isMobile:u,openMobile:b,setOpenMobile:h,toggleSidebar:j}),[I,w,y,u,b,h,j]);return r.jsx(G.Provider,{value:pe,children:r.jsx(M.TooltipProvider,{delayDuration:0,children:r.jsx("div",{ref:v,className:d.cn("group/sidebar-wrapper flex min-h-svh w-full",l),"data-hook":e,"data-slot":"sidebar-provider","data-tracking-el":a||"sidebar-provider","data-tracking-label":t,style:{"--sidebar-width":ke,"--sidebar-width-icon":ye,...c},...m,children:g})})})});F.displayName="SidebarProvider";const H=i.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:t,side:o="left",variant:s="sidebar",collapsible:n="offcanvas",className:l,children:c,...g},m)=>{const{isMobile:v,state:u,openMobile:b,setOpenMobile:h}=N();return n==="none"?r.jsx("div",{ref:m,className:d.cn("bg-sidebar text-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",l),"data-hook":e,"data-slot":"sidebar","data-tracking-el":a||"sidebar","data-tracking-label":t,...g,children:c}):v?r.jsx(C.Sheet,{open:b,onOpenChange:h,children:r.jsx(C.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":Ne},children:r.jsx("div",{className:"flex h-full w-full flex-col",children:c})})}):r.jsxs("div",{ref:m,className:"group peer text-sidebar-foreground hidden md:block","data-collapsible":u==="collapsed"?n:"","data-hook":e,"data-side":o,"data-slot":"sidebar","data-state":u,"data-tracking-el":a||"sidebar","data-tracking-label":t,"data-variant":s,children:[r.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)]")}),r.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)]",l),...g,children:r.jsx("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:c})})]})});H.displayName="Sidebar";const K=i.forwardRef(({className:e,onClick:a,dataHook:t="sidebar-trigger",...o},s)=>{const{toggleSidebar:n}=N();return r.jsxs(ge.Button,{ref:s,"aria-label":"Toggle Sidebar",className:d.cn("h-7 w-7",e),"data-slot":"sidebar-trigger",dataHook:t,size:"sm",variant:"ghost",onClick:l=>{a?.(l),n()},...o,children:[r.jsx(f.PanelLeft,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});K.displayName="SidebarTrigger";const U=i.forwardRef(({className:e,...a},t)=>{const{toggleSidebar:o}=N();return r.jsx("button",{ref:t,"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,...a})});U.displayName="SidebarRail";const W=i.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:o,...s},n)=>r.jsx("main",{ref:n,className:d.cn("bg-background relative flex min-h-svh flex-1 flex-col",e),"data-hook":a,"data-slot":"sidebar-inset","data-tracking-el":t||"sidebar-inset","data-tracking-label":o,...s}));W.displayName="SidebarInset";const V=i.forwardRef(({className:e,...a},t)=>r.jsx(me.Input,{ref:t,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",...a}));V.displayName="SidebarInput";const X=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("flex flex-col gap-2 p-2",e),"data-hook":a,"data-slot":"sidebar-header",...t}));X.displayName="SidebarHeader";const Y=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("flex flex-col gap-2 p-2",e),"data-hook":a,"data-slot":"sidebar-footer",...t}));Y.displayName="SidebarFooter";const Z=i.forwardRef(({className:e,...a},t)=>r.jsx(he.Separator,{ref:t,className:d.cn("bg-sidebar-border mx-2 w-auto group-data-[collapsible=icon]:mx-0",e),"data-slot":"sidebar-separator",...a}));Z.displayName="SidebarSeparator";const J=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),"data-hook":a,"data-slot":"sidebar-content",...t}));J.displayName="SidebarContent";const Q=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("relative flex w-full min-w-0 flex-col p-2",e),"data-hook":a,"data-slot":"sidebar-group",...t}));Q.displayName="SidebarGroup";const Me=R.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"}}),$=i.forwardRef(({className:e,dataHook:a,asChild:t=!1,size:o="sm",variant:s="default",isOpen:n=!1,onToggle:l,onAction:c,children:g,...m},v)=>{const u=t?k.Slot:"div",b=()=>{s==="collapsible"&&l?l():s==="action"&&c&&c()},h=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),b())};return r.jsxs(u,{ref:v,className:d.cn(Me({size:o,variant:s}),e),"data-hook":a,"data-slot":"sidebar-group-label","data-variant":s,role:s!=="default"?"button":void 0,tabIndex:s!=="default"?0:void 0,onClick:s!=="default"?b:void 0,onKeyDown:s!=="default"?h:void 0,...m,children:[r.jsx("span",{children:g}),s==="collapsible"&&r.jsx(f.ChevronDown,{className:d.cn("shrink-0 transition-transform duration-200",n&&"rotate-180"),size:16}),s==="action"&&r.jsx(f.Plus,{className:"shrink-0",size:16})]})});$.displayName="SidebarGroupLabel";const ee=i.forwardRef(({className:e,asChild:a=!1,...t},o)=>{const s=a?k.Slot:"button";return r.jsx(s,{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",...t})});ee.displayName="SidebarGroupAction";const ae=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("div",{ref:o,className:d.cn("w-full text-sm",e),"data-hook":a,"data-slot":"sidebar-group-content",...t}));ae.displayName="SidebarGroupContent";const te=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("ul",{ref:o,className:d.cn("flex w-full min-w-0 flex-col gap-1",e),"data-hook":a,"data-slot":"sidebar-menu",...t}));te.displayName="SidebarMenu";const re=i.forwardRef(({className:e,dataHook:a,...t},o)=>r.jsx("li",{ref:o,className:d.cn("group/menu-item relative",e),"data-hook":a,"data-slot":"sidebar-menu-item",...t}));re.displayName="SidebarMenuItem";const oe=i.forwardRef(({type:e="caret",isActive:a=!1,className:t,...o},s)=>{const n={ref:s,className:d.cn("shrink-0 transition-transform",a&&e==="caret"&&"rotate-90",t),"data-slot":"sidebar-collapse-icon",...o};switch(e){case"horizontal":return r.jsx(f.ChevronRight,{...n});case"vertical":return r.jsx(f.ChevronDown,{...n});case"upDown":return r.jsx(f.ChevronsUpDown,{...n});case"plusMinus":return a?r.jsx(f.Minus,{...n}):r.jsx(f.Plus,{...n});case"dots":return r.jsx(f.Ellipsis,{...n});default:return r.jsx(f.ChevronRight,{...n})}});oe.displayName="SidebarCollapseIcon";const Re=R.cva("peer/menu-button flex w-full items-center gap-3 overflow-hidden rounded-full px-6 py-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] 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-medium 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]:size-4.5 [&>svg]:shrink-0 [&>svg]:stroke-2 [&>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-8",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-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"simple",size:"default"}}),se=i.forwardRef(({asChild:e=!1,isActive:a=!1,variant:t="simple",size:o="default",tooltip:s,className:n,dataHook:l,...c},g)=>{const m=e?k.Slot:"button",{isMobile:v,state:u}=N(),b=r.jsx(m,{ref:g,className:d.cn(Re({variant:t,size:o}),n),"data-active":a,"data-hook":l,"data-size":o,"data-slot":"sidebar-menu-button","data-variant":t,...c});return s?(typeof s=="string"&&(s={children:s,dataHook:"sidebar-menu-button-tooltip"}),r.jsxs(M.Tooltip,{children:[r.jsx(M.TooltipTrigger,{asChild:!0,children:b}),r.jsx(M.TooltipContent,{hideArrow:!0,...s,align:"center",className:d.cn("bg-foreground text-background border-none",s.className),hidden:u!=="collapsed"||v,side:"right",sideOffset:8})]})):b});se.displayName="SidebarMenuButton";const ie=i.forwardRef(({className:e,asChild:a=!1,showOnHover:t=!1,...o},s)=>{const n=a?k.Slot:"button";return r.jsx(n,{ref:s,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",t&&"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})});ie.displayName="SidebarMenuAction";const ne=i.forwardRef(({className:e,...a},t)=>r.jsx("div",{ref:t,className:d.cn("text-sidebar-foreground pointer-events-none absolute right-1 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","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",e),"data-slot":"sidebar-menu-badge",...a}));ne.displayName="SidebarMenuBadge";const de=i.forwardRef(({className:e,showIcon:a=!1,...t},o)=>{const s=i.useId(),n=i.useMemo(()=>{let l=0;for(let c=0;c<s.length;c++)l=(l<<5)-l+s.charCodeAt(c),l|=0;return`${Math.abs(l)%40+50}%`},[s]);return r.jsxs("div",{ref:o,className:d.cn("flex h-8 items-center gap-2 rounded-md px-2",e),"data-slot":"sidebar-menu-skeleton",...t,children:[a&&r.jsx(D.Skeleton,{className:"size-4 rounded-md","data-slot":"sidebar-menu-skeleton-icon"}),r.jsx(D.Skeleton,{className:"h-4 max-w-[--skeleton-width] flex-1","data-slot":"sidebar-menu-skeleton-text",style:{"--skeleton-width":n}})]})});de.displayName="SidebarMenuSkeleton";const Ie=R.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"}}),le=i.forwardRef(({className:e,variant:a="border",dataHook:t,...o},s)=>r.jsx("ul",{ref:s,className:d.cn(Ie({variant:a}),e),"data-hook":t,"data-slot":"sidebar-menu-sub",...o}));le.displayName="SidebarMenuSub";const ce=i.forwardRef(({dataHook:e,...a},t)=>r.jsx("li",{ref:t,"data-hook":e,"data-slot":"sidebar-menu-sub-item",...a}));ce.displayName="SidebarMenuSubItem";const ue=i.forwardRef(({asChild:e=!1,size:a="md",isActive:t,className:o,dataHook:s,...n},l)=>{const c=e?k.Slot:"a";return r.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 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",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),"data-active":t,"data-hook":s,"data-size":a,"data-slot":"sidebar-menu-sub-button",...n})});ue.displayName="SidebarMenuSubButton";exports.Sidebar=H;exports.SidebarCollapseIcon=oe;exports.SidebarCollapseIconType=q;exports.SidebarCollapsible=A;exports.SidebarContent=J;exports.SidebarFooter=Y;exports.SidebarGroup=Q;exports.SidebarGroupAction=ee;exports.SidebarGroupContent=ae;exports.SidebarGroupLabel=$;exports.SidebarGroupLabelSize=z;exports.SidebarGroupLabelVariant=T;exports.SidebarHeader=X;exports.SidebarInput=V;exports.SidebarInset=W;exports.SidebarMenu=te;exports.SidebarMenuAction=ie;exports.SidebarMenuBadge=ne;exports.SidebarMenuButton=se;exports.SidebarMenuButtonSize=L;exports.SidebarMenuButtonVariant=_;exports.SidebarMenuItem=re;exports.SidebarMenuSkeleton=de;exports.SidebarMenuSub=le;exports.SidebarMenuSubButton=ue;exports.SidebarMenuSubButtonSize=P;exports.SidebarMenuSubItem=ce;exports.SidebarMenuSubVariant=B;exports.SidebarProvider=F;exports.SidebarRail=U;exports.SidebarSeparator=Z;exports.SidebarSide=E;exports.SidebarTrigger=K;exports.SidebarVariant=O;exports.useSidebar=N;
|
|
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;
|
package/dist/blocks/sidebar.d.ts
CHANGED
|
@@ -195,6 +195,12 @@ interface SidebarProps extends React.ComponentProps<"div"> {
|
|
|
195
195
|
* @default SidebarCollapsible.OFFCANVAS
|
|
196
196
|
*/
|
|
197
197
|
collapsible?: SidebarCollapsible;
|
|
198
|
+
/**
|
|
199
|
+
* Render in flow layout instead of fixed positioning.
|
|
200
|
+
* Use when the Sidebar is placed inside a layout container (e.g. GlobalLayout).
|
|
201
|
+
* Mobile rendering (Sheet) is skipped — handle mobile navigation separately with Drawer.
|
|
202
|
+
*/
|
|
203
|
+
embedded?: boolean;
|
|
198
204
|
}
|
|
199
205
|
declare const Sidebar: React.ForwardRefExoticComponent<Omit<SidebarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
200
206
|
/**
|
|
@@ -262,7 +268,7 @@ declare const SidebarSeparator: React.ForwardRefExoticComponent<Omit<Omit<import
|
|
|
262
268
|
/**
|
|
263
269
|
* Props for the SidebarContent component
|
|
264
270
|
*/
|
|
265
|
-
interface SidebarContentProps extends React.ComponentProps<"div"> {
|
|
271
|
+
interface SidebarContentProps extends Omit<React.ComponentProps<"div">, "dir"> {
|
|
266
272
|
/** Data hook for automated testing */
|
|
267
273
|
dataHook?: string;
|
|
268
274
|
}
|
|
@@ -470,6 +476,74 @@ interface SidebarMenuSubButtonProps extends React.ComponentProps<"a"> {
|
|
|
470
476
|
isActive?: boolean;
|
|
471
477
|
}
|
|
472
478
|
declare const SidebarMenuSubButton: React.ForwardRefExoticComponent<Omit<SidebarMenuSubButtonProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
473
|
-
|
|
474
|
-
|
|
479
|
+
/**
|
|
480
|
+
* Props for the SidebarMenuCollapsible component
|
|
481
|
+
*/
|
|
482
|
+
interface SidebarMenuCollapsibleProps {
|
|
483
|
+
/**
|
|
484
|
+
* Data hook for automated testing
|
|
485
|
+
*/
|
|
486
|
+
dataHook?: string;
|
|
487
|
+
/**
|
|
488
|
+
* Whether the collapsible is open by default
|
|
489
|
+
*/
|
|
490
|
+
defaultOpen?: boolean;
|
|
491
|
+
/**
|
|
492
|
+
* Controlled open state
|
|
493
|
+
*/
|
|
494
|
+
open?: boolean;
|
|
495
|
+
/**
|
|
496
|
+
* Callback when open state changes
|
|
497
|
+
*/
|
|
498
|
+
onOpenChange?: (open: boolean) => void;
|
|
499
|
+
/**
|
|
500
|
+
* Additional CSS classes
|
|
501
|
+
*/
|
|
502
|
+
className?: string;
|
|
503
|
+
children?: React.ReactNode;
|
|
504
|
+
}
|
|
505
|
+
declare function SidebarMenuCollapsible({ dataHook, className, children, defaultOpen, open, onOpenChange, }: SidebarMenuCollapsibleProps): import("react/jsx-runtime").JSX.Element;
|
|
506
|
+
declare namespace SidebarMenuCollapsible {
|
|
507
|
+
var displayName: string;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Props for the SidebarMenuCollapsibleTrigger component
|
|
511
|
+
*/
|
|
512
|
+
type SidebarMenuCollapsibleTriggerProps = Omit<SidebarMenuButtonProps, "variant">;
|
|
513
|
+
declare const SidebarMenuCollapsibleTrigger: React.ForwardRefExoticComponent<Omit<SidebarMenuCollapsibleTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
514
|
+
/**
|
|
515
|
+
* Props for the SidebarMenuCollapsibleContent component
|
|
516
|
+
*/
|
|
517
|
+
type SidebarMenuCollapsibleContentProps = SidebarMenuSubProps;
|
|
518
|
+
declare const SidebarMenuCollapsibleContent: React.ForwardRefExoticComponent<Omit<SidebarMenuSubProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
519
|
+
interface SidebarDrawerProps extends React.ComponentProps<"div"> {
|
|
520
|
+
/**
|
|
521
|
+
* Data hook for automated testing (required)
|
|
522
|
+
*/
|
|
523
|
+
dataHook: string;
|
|
524
|
+
/**
|
|
525
|
+
* Accessible label for the drawer
|
|
526
|
+
* @default "Navigation"
|
|
527
|
+
*/
|
|
528
|
+
title?: string;
|
|
529
|
+
/**
|
|
530
|
+
* Accessible description for the drawer
|
|
531
|
+
* @default "Main navigation menu"
|
|
532
|
+
*/
|
|
533
|
+
description?: string;
|
|
534
|
+
/**
|
|
535
|
+
* Tracking element identifier for analytics
|
|
536
|
+
*/
|
|
537
|
+
trackingEl?: string;
|
|
538
|
+
/**
|
|
539
|
+
* Tracking label for analytics context
|
|
540
|
+
*/
|
|
541
|
+
trackingLabel?: string;
|
|
542
|
+
}
|
|
543
|
+
declare function SidebarDrawer({ dataHook, title, description, trackingEl, trackingLabel, children, className, ...props }: SidebarDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
544
|
+
declare namespace SidebarDrawer {
|
|
545
|
+
var displayName: string;
|
|
546
|
+
}
|
|
547
|
+
export { Sidebar, SidebarCollapseIcon, SidebarContent, SidebarDrawer, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuCollapsible, SidebarMenuCollapsibleContent, SidebarMenuCollapsibleTrigger, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
548
|
+
export type { SidebarProviderProps, SidebarProps, SidebarTriggerProps, SidebarRailProps, SidebarInsetProps, SidebarInputProps, SidebarHeaderProps, SidebarFooterProps, SidebarSeparatorProps, SidebarContentProps, SidebarDrawerProps, SidebarGroupProps, SidebarGroupLabelProps, SidebarGroupActionProps, SidebarGroupContentProps, SidebarMenuProps, SidebarMenuItemProps, SidebarCollapseIconProps, SidebarMenuButtonProps, SidebarMenuCollapsibleProps, SidebarMenuCollapsibleTriggerProps, SidebarMenuCollapsibleContentProps, SidebarMenuActionProps, SidebarMenuBadgeProps, SidebarMenuSkeletonProps, SidebarMenuSubProps, SidebarMenuSubItemProps, SidebarMenuSubButtonProps, };
|
|
475
549
|
//# sourceMappingURL=sidebar.d.ts.map
|
|
@@ -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;
|
|
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;IACxB,wCAAwC;IACxC,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC5B,uCAAuC;IACvC,SAAS,cAAc;IACvB,kCAAkC;IAClC,IAAI,SAAS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