@womp/kookie-ui 0.8.0 → 0.8.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.
- package/README.md +1 -1
- package/components.css +1 -1
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/sidebar.d.ts.map +1 -1
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +3 -3
- package/dist/esm/chunk-VUNNS3ZU.js +2 -0
- package/dist/esm/chunk-VUNNS3ZU.js.map +7 -0
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/sidebar.d.ts.map +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/src/components/_internal/base-sidebar-menu.css +2 -1
- package/src/components/sidebar.tsx +17 -28
- package/styles.css +1 -1
- package/dist/esm/chunk-3AOFY2B4.js +0 -2
- package/dist/esm/chunk-3AOFY2B4.js.map +0 -7
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as x}from"./chunk-2CMM7MEL.js";import{a as q}from"./chunk-GGSJXOKR.js";import{a as j,b as O,c as _,e as k,f as U}from"./chunk-HBIF43PT.js";import{a as F,b as K,c as $}from"./chunk-7NYODT3Z.js";import{a as V}from"./chunk-4WU2WKUJ.js";import{d as W}from"./chunk-IX5HIHVI.js";import{a as B}from"./chunk-JRFZ535T.js";import{b as G}from"./chunk-SEY4NA45.js";import{b as L}from"./chunk-FWB47YCH.js";import{a as E}from"./chunk-JDWCQ2XP.js";import{a as H}from"./chunk-UBSLEGQZ.js";import{a as le}from"./chunk-OS3FCYZY.js";var fe={};le(fe,{Content:()=>Y,Footer:()=>ee,Group:()=>ce,GroupContent:()=>ue,GroupLabel:()=>de,Header:()=>Z,Menu:()=>re,MenuButton:()=>oe,MenuItem:()=>ae,MenuSub:()=>ne,MenuSubContent:()=>ie,MenuSubTrigger:()=>se,Root:()=>Q,Search:()=>pe,Separator:()=>te});import*as e from"react";import d from"classnames";import*as S from"@radix-ui/react-accordion";var J=e.createContext(null);function g(){return e.useContext(J)}var Q=e.forwardRef((t,a)=>{let o=G(),{size:r=x.size.default,variant:s=x.variant.default,menuVariant:c=x.menuVariant.default,layout:u=x.layout.default,presentation:l,panelBackground:R,color:i}=t,{className:p,children:m,...v}=H(t,x),{asChild:T,panelBackground:M,presentation:C,...P}=v,h=i||o.accentColor,n=l==="thin"?"rail":l==="expanded"?"panel":u||"panel",f=typeof r=="object"?r.initial||"2":r,y=e.useMemo(()=>({size:f,menuVariant:c,presentation:l,color:h}),[f,c,l,h]);return e.createElement("div",{...P,ref:a,"data-accent-color":h,className:d("rt-SidebarRoot",p)},e.createElement(J.Provider,{value:y},e.createElement("div",{className:d("rt-SidebarContainer",`rt-variant-${s}`,`rt-r-size-${f}`,`rt-menu-variant-${c}`,n&&`rt-layout-${n}`),"data-accent-color":h,"data-panel-background":R,"data-presentation":l,"data-layout":n},m)))});Q.displayName="Sidebar.Root";var Y=e.forwardRef(({className:t,children:a,role:o="navigation","aria-label":r="Main navigation",id:s,...c},u)=>{let l=g(),R=l?.size??"2",i=l?.menuVariant??"soft";return e.createElement(V,{type:"hover"},e.createElement("div",{...c,ref:u,id:s,role:o,"aria-label":r,className:d("rt-BaseMenuContent","rt-SidebarContent",`rt-r-size-${R}`,`rt-menu-variant-${i}`,t)},e.createElement("div",{className:"rt-BaseMenuViewport"},a)))});Y.displayName="Sidebar.Content";var Z=e.forwardRef(({className:t,asContainer:a=!0,...o},r)=>{let s=g(),c=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...o,ref:r,className:d("rt-SidebarHeader",`rt-r-size-${c}`,`rt-menu-variant-${u}`,{"rt-SidebarHeader--container":a},t)})});Z.displayName="Sidebar.Header";var ee=e.forwardRef(({className:t,asContainer:a=!0,...o},r)=>{let s=g(),c=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...o,ref:r,className:d("rt-SidebarFooter",`rt-r-size-${c}`,`rt-menu-variant-${u}`,{"rt-SidebarFooter--container":a},t)})});ee.displayName="Sidebar.Footer";var te=e.forwardRef(({className:t,...a},o)=>e.createElement(q,{...a,ref:o,className:d("rt-SidebarSeparator",t)}));te.displayName="Sidebar.Separator";var re=e.forwardRef(({className:t,...a},o)=>e.createElement("ul",{...a,ref:o,className:d("rt-SidebarMenu",t)}));re.displayName="Sidebar.Menu";var ae=e.forwardRef(({className:t,...a},o)=>e.createElement("li",{...a,ref:o,className:d("rt-SidebarMenuItem",t)}));ae.displayName="Sidebar.MenuItem";function me(t){let a=[],o=[];return e.Children.forEach(t,r=>{if(typeof r=="string"||typeof r=="number")o.push(e.createElement("span",{key:o.length,className:"rt-SidebarMenuLabel"},r));else if(e.isValidElement(r)){let s=r;s.type==="svg"||s.props&&s.props.icon||typeof s.type=="function"&&(s.type.displayName?.includes("Icon")||s.type.name?.includes("Icon"))?a.push(r):o.push(r)}else r&&o.push(r)}),{icons:a,labels:o}}function A(t){if(typeof t=="string"||typeof t=="number")return e.createElement("span",{className:"rt-SidebarMenuLabel"},t);if(Array.isArray(t))return t.map((a,o)=>e.createElement(e.Fragment,{key:o},A(a)));if(e.isValidElement(t)){let a=t,o=a.props&&a.props.className||"";if(typeof a.type=="string"&&o.split(" ").includes("rt-SidebarMenuLabel"))return a;let s=A(a.props?.children);return e.cloneElement(a,{...a.props},s)}return t}var oe=e.forwardRef(({asChild:t=!1,isActive:a=!1,shortcut:o,badge:r,className:s,children:c,onKeyDown:u,...l},R)=>{let i=g(),p=i?.size??"2",m=i?.presentation==="thin",v=t?L:"button",T=e.useCallback(n=>{if(n.key==="ArrowDown"||n.key==="ArrowUp"){let f=n.currentTarget.closest(".rt-SidebarContent, .rt-SidebarSearchPopover"),y=f?Array.from(f.querySelectorAll(".rt-SidebarMenuButton")).filter(N=>N.offsetParent!==null):[],b=y.indexOf(n.currentTarget),D=y[b+(n.key==="ArrowDown"?1:-1)];b!==-1&&D&&(n.preventDefault(),D.focus())}u?.(n)},[u]),M=e.useMemo(()=>A(c),[c]),{icons:C,labels:P}=e.useMemo(()=>m?me(c):{icons:[],labels:[]},[m,c]),h=e.useMemo(()=>{if(!t)return null;try{let n=e.Children.only(M),f=n.props?.children,y=e.createElement(e.Fragment,null,f,r&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof r=="string"?e.createElement(B,{size:p,variant:"soft"},r):e.createElement(B,{size:r.size||p,variant:r.variant||"soft",color:r.color,radius:r.radius},r.content)),o&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(E,{size:p},o)));return e.cloneElement(n,{...n.props},y)}catch{return M}},[t,M,r,o,p]);return e.createElement(v,{...l,ref:R,"aria-current":a?"page":void 0,className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton",s),"data-active":a||void 0,onKeyDown:T},t?h:m&&C.length>0?e.createElement(e.Fragment,null,e.createElement("span",{className:"rt-SidebarMenuIconWrapper"},C),P.map((n,f)=>e.createElement(e.Fragment,{key:f},typeof n=="string"||typeof n=="number"?e.createElement("span",{className:"rt-SidebarMenuLabel"},n):n))):e.createElement(e.Fragment,null,M,r&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof r=="string"?e.createElement(B,{size:p,variant:"soft"},r):e.createElement(B,{size:r.size||p,variant:r.variant||"soft",color:r.color,radius:r.radius},r.content)),o&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(E,{size:p},o))))});oe.displayName="Sidebar.MenuButton";var I=e.createContext("accordion"),ne=e.forwardRef(({defaultOpen:t=!1,children:a,...o},r)=>(g()?.presentation==="thin"?"dropdown":"accordion")==="dropdown"?e.createElement("div",{...o,ref:r},e.createElement(j,null,e.createElement(I.Provider,{value:"dropdown"},a))):e.createElement("div",{...o,ref:r},e.createElement(I.Provider,{value:"accordion"},e.createElement(S.Root,{type:"single",collapsible:!0,defaultValue:t?"item":void 0},e.createElement(S.Item,{value:"item"},a)))));ne.displayName="Sidebar.MenuSub";var se=e.forwardRef(({asChild:t=!1,className:a,children:o,...r},s)=>e.useContext(I)==="dropdown"?e.createElement(O,null,e.createElement("button",{...r,ref:s,type:"button","aria-haspopup":"menu",className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",a)},o)):e.createElement(S.Header,{asChild:!0},e.createElement("div",null,e.createElement(S.Trigger,{...r,ref:s,asChild:t,className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",a)},t?o:e.createElement(e.Fragment,null,o,e.createElement(W,{className:d("rt-BaseMenuSubTriggerIcon","rt-SidebarMenuSubTriggerIcon")}))))));se.displayName="Sidebar.MenuSubTrigger";var ie=e.forwardRef(({className:t,children:a,...o},r)=>{let s=g();if(e.useContext(I)==="dropdown"){let u=i=>{if(Array.isArray(i))return i.map((p,m)=>e.createElement(e.Fragment,{key:m},u(p)));if(e.isValidElement(i)){if(i.type?.displayName==="Sidebar.MenuButton")return i.props?.children;let m=i.props?.children;if(m!==void 0)return e.cloneElement(i,{...i.props,children:u(m)})}return i},l=e.Children.map(a,(i,p)=>{if(e.isValidElement(i)&&i.type?.displayName==="Sidebar.MenuItem"){let m=i.props?.children,v=u(m);return e.createElement(k,{key:p,asChild:!0},v)}return e.createElement(k,{key:p,asChild:!0},u(i))}),R=s?.size==="3"?"2":s?.size;return e.createElement(_,{size:R,variant:s?.menuVariant,className:d(t)},e.createElement(U,null,l))}return e.createElement(S.Content,{...o,ref:r,className:d("rt-SidebarMenuSubContent",t)},e.createElement("div",{className:"rt-SidebarMenuSubList"},a))});ie.displayName="Sidebar.MenuSubContent";var ce=e.forwardRef(({className:t,...a},o)=>e.createElement("div",{...a,ref:o,className:d("rt-BaseMenuGroup","rt-SidebarGroup",t)}));ce.displayName="Sidebar.Group";var de=e.forwardRef(({asChild:t=!1,className:a,...o},r)=>e.createElement(t?L:"div",{...o,ref:r,className:d("rt-BaseMenuLabel","rt-SidebarGroupLabel",a)}));de.displayName="Sidebar.GroupLabel";var ue=e.forwardRef(({className:t,...a},o)=>e.createElement("div",{...a,ref:o,className:d("rt-SidebarGroupContent",t)}));ue.displayName="Sidebar.GroupContent";var z=({className:t})=>e.createElement("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("circle",{cx:"11",cy:"11",r:"8"}),e.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})),X=({className:t})=>e.createElement("svg",{className:t,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),pe=e.forwardRef(({value:t,onValueChange:a,placeholder:o="Search...",children:r,className:s,...c},u)=>{let R=g()?.presentation==="thin",i=e.useRef(null),p=e.useRef(null),v=`${e.useId()}-results`,T=e.useRef(t);T.current=t;let M=e.useRef(a);M.current=a;let C=o.replace(/\.+$/,""),P=e.useCallback(n=>{n.key==="Escape"&&T.current&&(n.preventDefault(),n.stopPropagation(),M.current(""),i.current?.focus())},[]),h=e.useCallback(n=>{let f=p.current;if(!f)return;let y=f.querySelector('[role="group"]');if(!y)return;let b=Array.from(y.querySelectorAll("a, button"));if(b.length===0)return;let D=document.activeElement,N=D===i.current,w=b.indexOf(D);if(n.key.length===1&&!n.ctrlKey&&!n.metaKey&&!n.altKey&&!N&&w!==-1){i.current?.focus();return}switch(n.key){case"ArrowDown":{n.preventDefault(),N||w===-1?b[0]?.focus():w<b.length-1&&b[w+1]?.focus();break}case"ArrowUp":{n.preventDefault(),w<=0?i.current?.focus():b[w-1]?.focus();break}case"Home":{N||(n.preventDefault(),b[0]?.focus());break}case"End":{N||(n.preventDefault(),b[b.length-1]?.focus());break}}},[]);return R?e.createElement("div",{...c,ref:u,className:d("rt-SidebarSearch","rt-SidebarSearch--thin",s)},e.createElement(F,null,e.createElement(K,null,e.createElement("button",{type:"button",className:d("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarSearchTrigger"),"aria-label":C},e.createElement("span",{className:"rt-SidebarMenuIconWrapper"},e.createElement(z,null)),e.createElement("span",{className:"rt-SidebarMenuLabel"},"Search"))),e.createElement($,{side:"right",align:"start",size:"2",width:"280px","aria-label":C},e.createElement("div",{ref:p,className:"rt-SidebarSearchPopover",role:"search",onKeyDown:h},e.createElement("div",{className:"rt-SidebarSearchInputWrapper"},e.createElement(z,{className:"rt-SidebarSearchIcon"}),e.createElement("input",{ref:i,type:"search",className:"rt-SidebarSearchInput",value:t,onChange:n=>a(n.target.value),onKeyDown:P,placeholder:o,"aria-label":C,"aria-controls":r?v:void 0,autoFocus:!0}),t&&e.createElement("button",{type:"button",className:"rt-reset rt-SidebarSearchClear",onClick:()=>{a(""),i.current?.focus()},"aria-label":"Clear search"},e.createElement(X,null))),r&&e.createElement("div",{id:v,role:"group","aria-label":"Search results"},r))))):e.createElement("div",{...c,ref:u,className:d("rt-SidebarSearch","rt-SidebarSearch--expanded",s),role:"search"},e.createElement("div",{className:"rt-SidebarSearchInputWrapper"},e.createElement(z,{className:"rt-SidebarSearchIcon"}),e.createElement("input",{ref:i,type:"search",className:"rt-SidebarSearchInput",value:t,onChange:n=>a(n.target.value),onKeyDown:P,placeholder:o,"aria-label":C}),t&&e.createElement("button",{type:"button",className:"rt-reset rt-SidebarSearchClear",onClick:()=>{a(""),i.current?.focus()},"aria-label":"Clear search"},e.createElement(X,null))))});pe.displayName="Sidebar.Search";export{Q as a,Y as b,Z as c,ee as d,te as e,re as f,ae as g,oe as h,ne as i,se as j,ie as k,ce as l,de as m,ue as n,pe as o,fe as p};
|
|
2
|
+
//# sourceMappingURL=chunk-VUNNS3ZU.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/sidebar.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot.js';\nimport * as Accordion from '@radix-ui/react-accordion';\nimport * as DropdownMenu from './dropdown-menu.js';\nimport * as Popover from './popover.js';\n\nimport { sidebarPropDefs } from './sidebar.props.js';\nimport { useThemeContext } from './theme.js';\n// import { IconButton } from './icon-button.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Separator } from './separator.js';\nimport { ThickChevronRightIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { Kbd } from './kbd.js';\nimport { Badge } from './badge.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { BadgeProps } from './badge.js';\n\n// Badge configuration type for sidebar menu buttons\ntype BadgeConfig = {\n content: React.ReactNode;\n variant?: BadgeProps['variant'];\n size?: BadgeProps['size'];\n color?: BadgeProps['color'];\n radius?: BadgeProps['radius'];\n};\n\n// Internal presentational context (not exported) for size/menu variant\ntype SidebarVisualContextValue = {\n size: '1' | '2' | '3';\n menuVariant: 'solid' | 'soft';\n presentation?: 'thin' | 'expanded';\n color?: string;\n};\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n// Sidebar is now independent of Shell - no integration needed\n\n// Main Sidebar component\ntype SidebarOwnProps = GetPropDefTypes<typeof sidebarPropDefs>;\ninterface SidebarProps extends ComponentPropsWithout<'div', RemovedProps>, SidebarOwnProps {\n /**\n * Presentational mode independent of Shell.\n * 'thin' renders a rail-style sidebar, 'expanded' renders a panel-style sidebar.\n * If both `presentation` and `layout` are provided, `presentation` takes precedence.\n */\n presentation?: 'thin' | 'expanded';\n}\n\nconst Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>((props, forwardedRef) => {\n const themeContext = useThemeContext();\n\n const {\n size = sidebarPropDefs.size.default,\n variant = sidebarPropDefs.variant.default,\n menuVariant = sidebarPropDefs.menuVariant.default,\n layout = sidebarPropDefs.layout.default,\n presentation,\n // type = sidebarPropDefs.type.default,\n // side = sidebarPropDefs.side.default,\n // collapsible = sidebarPropDefs.collapsible.default,\n panelBackground,\n color,\n } = props;\n\n const { className, children, ...rootProps } = extractProps(props, sidebarPropDefs);\n // Remove internal-only props from DOM\n const { asChild: _, panelBackground: __, presentation: ___, ...safeRootProps } = rootProps;\n const resolvedColor = color || themeContext.accentColor;\n\n // Resolve layout (default to 'panel'). `presentation` takes precedence over `layout`.\n const resolvedLayout = presentation === 'thin' ? 'rail' : presentation === 'expanded' ? 'panel' : layout || 'panel';\n\n // Update context with current props - we'll pass the resolved values\n const resolvedSize = typeof size === 'object' ? size.initial || '2' : size;\n const visualContextValue = React.useMemo(\n () => ({ size: resolvedSize, menuVariant, presentation, color: resolvedColor }),\n [resolvedSize, menuVariant, presentation, resolvedColor],\n );\n return (\n <div {...safeRootProps} ref={forwardedRef} data-accent-color={resolvedColor} className={classNames('rt-SidebarRoot', className)}>\n <SidebarVisualContext.Provider value={visualContextValue}>\n <div\n className={classNames('rt-SidebarContainer', `rt-variant-${variant}`, `rt-r-size-${resolvedSize}`, `rt-menu-variant-${menuVariant}`, resolvedLayout && `rt-layout-${resolvedLayout}`)}\n data-accent-color={resolvedColor}\n data-panel-background={panelBackground}\n data-presentation={presentation}\n data-layout={resolvedLayout}\n >\n {children}\n </div>\n </SidebarVisualContext.Provider>\n </div>\n );\n});\nSidebar.displayName = 'Sidebar.Root';\n\n// Sidebar content area\ninterface SidebarContentProps extends React.ComponentPropsWithoutRef<'div'> {\n id?: string;\n role?: 'navigation' | 'none';\n 'aria-label'?: string;\n}\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, SidebarContentProps>(\n ({ className, children, role = 'navigation', 'aria-label': ariaLabel = 'Main navigation', id, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <ScrollArea type=\"hover\">\n <div\n {...props}\n ref={forwardedRef}\n id={id}\n role={role}\n aria-label={ariaLabel}\n className={classNames('rt-BaseMenuContent', 'rt-SidebarContent', `rt-r-size-${size}`, `rt-menu-variant-${menuVariant}`, className)}\n >\n <div className=\"rt-BaseMenuViewport\">{children}</div>\n </div>\n </ScrollArea>\n );\n },\n);\nSidebarContent.displayName = 'Sidebar.Content';\n\n// Sidebar header\ninterface SidebarHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, SidebarHeaderProps>(({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarHeader',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarHeader--container': asContainer,\n },\n className,\n )}\n />\n );\n});\nSidebarHeader.displayName = 'Sidebar.Header';\n\n// Sidebar footer\ninterface SidebarFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, SidebarFooterProps>(({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarFooter',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarFooter--container': asContainer,\n },\n className,\n )}\n />\n );\n});\nSidebarFooter.displayName = 'Sidebar.Footer';\n\n// Sidebar trigger button\n// removed Trigger in presentational-only Sidebar\n\n// Removed SidebarInset - not needed\n\n// Sidebar separator\ninterface SidebarSeparatorProps extends ComponentPropsWithout<typeof Separator, RemovedProps> {}\n\nconst SidebarSeparator = React.forwardRef<React.ComponentRef<typeof Separator>, SidebarSeparatorProps>(({ className, ...props }, forwardedRef) => (\n <Separator {...props} ref={forwardedRef} className={classNames('rt-SidebarSeparator', className)} />\n));\nSidebarSeparator.displayName = 'Sidebar.Separator';\n\n// Menu components - styled like dropdown menus, but semantically a navigation list.\n// No menu/menuitem roles: those promise an application menu, which a list of links is not.\ninterface SidebarMenuProps extends React.ComponentPropsWithoutRef<'ul'> {}\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, SidebarMenuProps>(({ className, ...props }, forwardedRef) => (\n <ul {...props} ref={forwardedRef} className={classNames('rt-SidebarMenu', className)} />\n));\nSidebarMenu.displayName = 'Sidebar.Menu';\n\ninterface SidebarMenuItemProps extends React.ComponentPropsWithoutRef<'li'> {}\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, SidebarMenuItemProps>(({ className, ...props }, forwardedRef) => (\n <li {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuItem', className)} />\n));\nSidebarMenuItem.displayName = 'Sidebar.MenuItem';\n\ninterface SidebarMenuButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n isActive?: boolean;\n shortcut?: React.ReactNode;\n badge?: string | BadgeConfig;\n}\n\n// Extracted to module scope to avoid re-creation on every render\nfunction separateIconsAndLabels(node: React.ReactNode): { icons: React.ReactNode[]; labels: React.ReactNode[] } {\n const icons: React.ReactNode[] = [];\n const labels: React.ReactNode[] = [];\n\n React.Children.forEach(node, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n labels.push(<span key={labels.length} className=\"rt-SidebarMenuLabel\">{child}</span>);\n } else if (React.isValidElement(child)) {\n const el = child as React.ReactElement<any>;\n if (el.type === 'svg' || (el.props && el.props.icon) || (typeof el.type === 'function' && ((el.type as any).displayName?.includes('Icon') || (el.type as any).name?.includes('Icon')))) {\n icons.push(child);\n } else {\n labels.push(child);\n }\n } else if (child) {\n labels.push(child);\n }\n });\n\n return { icons, labels };\n}\n\nfunction wrapTextNodes(node: React.ReactNode): React.ReactNode {\n if (typeof node === 'string' || typeof node === 'number') {\n return <span className=\"rt-SidebarMenuLabel\">{node}</span>;\n }\n if (Array.isArray(node)) {\n return node.map((child, index) => <React.Fragment key={index}>{wrapTextNodes(child)}</React.Fragment>);\n }\n if (React.isValidElement(node)) {\n const el = node as React.ReactElement<any>;\n const className: string = (el.props && (el.props as any).className) || '';\n const isAlreadyLabel = typeof el.type === 'string' && className.split(' ').includes('rt-SidebarMenuLabel');\n if (isAlreadyLabel) return el;\n const newChildren = wrapTextNodes((el.props as any)?.children);\n return React.cloneElement(el, { ...(el.props as any) }, newChildren);\n }\n return node;\n}\n\nconst SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n ({ asChild = false, isActive = false, shortcut, badge, className, children, onKeyDown, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const sidebarSize = visual?.size ?? '2';\n const isThinMode = visual?.presentation === 'thin';\n\n const Comp = asChild ? Slot : 'button';\n\n // Enter and Space are left to the native button or link. Arrow keys move between\n // the visible buttons of the same sidebar, as a convenience on top of Tab.\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n const scope = event.currentTarget.closest('.rt-SidebarContent, .rt-SidebarSearchPopover');\n const buttons = scope\n ? Array.from(scope.querySelectorAll<HTMLElement>('.rt-SidebarMenuButton')).filter((el) => el.offsetParent !== null)\n : [];\n const index = buttons.indexOf(event.currentTarget);\n const next = buttons[index + (event.key === 'ArrowDown' ? 1 : -1)];\n if (index !== -1 && next) {\n event.preventDefault();\n next.focus();\n }\n }\n onKeyDown?.(event);\n },\n [onKeyDown],\n );\n\n // Memoize child processing to avoid re-traversal on every render\n const processedChildren = React.useMemo(() => wrapTextNodes(children), [children]);\n\n // For thin mode, separate icons into a wrapper for targeted background styling\n const { icons, labels } = React.useMemo(\n () => isThinMode ? separateIconsAndLabels(children) : { icons: [] as React.ReactNode[], labels: [] as React.ReactNode[] },\n [isThinMode, children],\n );\n\n // When rendering asChild, Slot expects a single child element. We still want to\n // append optional badge/shortcut inside that element so they render with Link.\n const slottedChildren = React.useMemo(() => {\n if (!asChild) return null;\n try {\n const onlyChild = React.Children.only(processedChildren as React.ReactElement<any>) as React.ReactElement<any>;\n const originalInnerChildren = (onlyChild.props as any)?.children;\n const enhancedInnerChildren = (\n <>\n {originalInnerChildren}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge size={badge.size || sidebarSize} variant={badge.variant || 'soft'} color={badge.color} radius={badge.radius}>\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n );\n return React.cloneElement(onlyChild, { ...(onlyChild.props as any) }, enhancedInnerChildren);\n } catch {\n // Fallback: if multiple children were passed incorrectly, just return processedChildren\n return processedChildren as React.ReactNode;\n }\n }, [asChild, processedChildren, badge, shortcut, sidebarSize]);\n\n return (\n <Comp\n {...props}\n ref={forwardedRef}\n aria-current={isActive ? 'page' : undefined}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', className)}\n data-active={isActive || undefined}\n onKeyDown={handleKeyDown}\n >\n {asChild ? (\n slottedChildren\n ) : isThinMode && icons.length > 0 ? (\n <>\n <span className=\"rt-SidebarMenuIconWrapper\">{icons}</span>\n {labels.map((label, index) => (\n <React.Fragment key={index}>\n {typeof label === 'string' || typeof label === 'number' ? (\n <span className=\"rt-SidebarMenuLabel\">{label}</span>\n ) : (\n label\n )}\n </React.Fragment>\n ))}\n </>\n ) : (\n <>\n {processedChildren}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge size={badge.size || sidebarSize} variant={badge.variant || 'soft'} color={badge.color} radius={badge.radius}>\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n )}\n </Comp>\n );\n },\n);\nSidebarMenuButton.displayName = 'Sidebar.MenuButton';\n\n// Sub-menu components: Accordion in expanded, Dropdown in thin\nconst SidebarSubMenuModeContext = React.createContext<'accordion' | 'dropdown'>('accordion');\ninterface SidebarMenuSubProps extends React.ComponentPropsWithoutRef<'div'> {\n defaultOpen?: boolean;\n}\n\nconst SidebarMenuSub = React.forwardRef<HTMLDivElement, SidebarMenuSubProps>(({ defaultOpen = false, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode: 'accordion' | 'dropdown' = visual?.presentation === 'thin' ? 'dropdown' : 'accordion';\n\n if (mode === 'dropdown') {\n return (\n <div {...props} ref={forwardedRef}>\n <DropdownMenu.Root>\n <SidebarSubMenuModeContext.Provider value=\"dropdown\">{children}</SidebarSubMenuModeContext.Provider>\n </DropdownMenu.Root>\n </div>\n );\n }\n\n return (\n <div {...props} ref={forwardedRef}>\n <SidebarSubMenuModeContext.Provider value=\"accordion\">\n <Accordion.Root type=\"single\" collapsible defaultValue={defaultOpen ? 'item' : undefined}>\n <Accordion.Item value=\"item\">{children}</Accordion.Item>\n </Accordion.Root>\n </SidebarSubMenuModeContext.Provider>\n </div>\n );\n});\nSidebarMenuSub.displayName = 'Sidebar.MenuSub';\n\ninterface SidebarMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof Accordion.Trigger> {\n asChild?: boolean;\n}\n\nconst SidebarMenuSubTrigger = React.forwardRef<React.ElementRef<typeof Accordion.Trigger>, SidebarMenuSubTriggerProps>(\n ({ asChild = false, className, children, ...props }, forwardedRef) => {\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n return (\n <DropdownMenu.Trigger>\n <button\n {...(props as any)}\n ref={forwardedRef as any}\n type=\"button\"\n aria-haspopup=\"menu\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}\n >\n {children}\n </button>\n </DropdownMenu.Trigger>\n );\n }\n\n return (\n <Accordion.Header asChild>\n <div>\n <Accordion.Trigger\n {...props}\n ref={forwardedRef}\n asChild={asChild}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <ThickChevronRightIcon className={classNames('rt-BaseMenuSubTriggerIcon', 'rt-SidebarMenuSubTriggerIcon')} />\n </>\n )}\n </Accordion.Trigger>\n </div>\n </Accordion.Header>\n );\n },\n);\nSidebarMenuSubTrigger.displayName = 'Sidebar.MenuSubTrigger';\n\ninterface SidebarMenuSubContentProps extends React.ComponentPropsWithoutRef<typeof Accordion.Content> {}\n\nconst SidebarMenuSubContent = React.forwardRef<React.ElementRef<typeof Accordion.Content>, SidebarMenuSubContentProps>(({ className, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n const unwrapMenuButton = (node: React.ReactNode): React.ReactNode => {\n if (Array.isArray(node)) {\n return node.map((n, i) => <React.Fragment key={i}>{unwrapMenuButton(n)}</React.Fragment>);\n }\n if (React.isValidElement(node)) {\n const typeDisplay = (node.type as any)?.displayName;\n if (typeDisplay === 'Sidebar.MenuButton') {\n return (node.props as any)?.children;\n }\n const child = (node.props as any)?.children;\n if (child !== undefined) {\n return React.cloneElement(node as any, { ...(node.props as any), children: unwrapMenuButton(child) });\n }\n }\n return node;\n };\n\n const normalized = React.Children.map(children as React.ReactNode, (child, index) => {\n if (React.isValidElement(child) && (child.type as any)?.displayName === 'Sidebar.MenuItem') {\n const itemChildren = (child.props as any)?.children;\n const content = unwrapMenuButton(itemChildren);\n return (\n <DropdownMenu.Item key={index} asChild>\n {content as any}\n </DropdownMenu.Item>\n );\n }\n // Fallback: wrap raw nodes too for consistent menu styling\n return (\n <DropdownMenu.Item key={index} asChild>\n {unwrapMenuButton(child) as any}\n </DropdownMenu.Item>\n );\n });\n\n // DropdownMenu only supports sizes 1 and 2, so map size 3 to 2\n const dropdownSize = visual?.size === '3' ? '2' : visual?.size;\n return (\n <DropdownMenu.Content size={dropdownSize} variant={visual?.menuVariant} className={classNames(className)}>\n <DropdownMenu.Group>{normalized}</DropdownMenu.Group>\n </DropdownMenu.Content>\n );\n }\n\n return (\n <Accordion.Content {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuSubContent', className)}>\n <div className=\"rt-SidebarMenuSubList\">{children}</div>\n </Accordion.Content>\n );\n});\nSidebarMenuSubContent.displayName = 'Sidebar.MenuSubContent';\n\n// Group components. The label is plain text: no role, so it isn't announced as an empty group.\ninterface SidebarGroupProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, SidebarGroupProps>(({ className, ...props }, forwardedRef) => (\n <div {...props} ref={forwardedRef} className={classNames('rt-BaseMenuGroup', 'rt-SidebarGroup', className)} />\n));\nSidebarGroup.displayName = 'Sidebar.Group';\n\ninterface SidebarGroupLabelProps extends React.ComponentPropsWithoutRef<'div'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>(({ asChild = false, className, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : 'div';\n\n return <Comp {...props} ref={forwardedRef} className={classNames('rt-BaseMenuLabel', 'rt-SidebarGroupLabel', className)} />;\n});\nSidebarGroupLabel.displayName = 'Sidebar.GroupLabel';\n\ninterface SidebarGroupContentProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, SidebarGroupContentProps>(({ className, ...props }, forwardedRef) => (\n <div {...props} ref={forwardedRef} className={classNames('rt-SidebarGroupContent', className)} />\n));\nSidebarGroupContent.displayName = 'Sidebar.GroupContent';\n\n// Search component: inline input in expanded, popover trigger in thin\ninterface SidebarSearchProps extends React.ComponentPropsWithoutRef<'div'> {\n value: string;\n onValueChange: (value: string) => void;\n placeholder?: string;\n children?: React.ReactNode;\n}\n\nconst SearchIcon = ({ className }: { className?: string }) => (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\" />\n </svg>\n);\n\nconst ClearIcon = ({ className }: { className?: string }) => (\n <svg className={className} width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n);\n\nconst SidebarSearch = React.forwardRef<HTMLDivElement, SidebarSearchProps>(\n ({ value, onValueChange, placeholder = 'Search...', children, className, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const isThin = visual?.presentation === 'thin';\n const inputRef = React.useRef<HTMLInputElement>(null);\n const popoverRef = React.useRef<HTMLDivElement>(null);\n const searchId = React.useId();\n const resultsId = `${searchId}-results`;\n\n // Stable refs for values used in callbacks \u2014 avoids recreating handlers on every keystroke\n const valueRef = React.useRef(value);\n valueRef.current = value;\n const onValueChangeRef = React.useRef(onValueChange);\n onValueChangeRef.current = onValueChange;\n\n // Derive a clean aria-label from placeholder (strip trailing dots/ellipsis)\n const searchLabel = placeholder.replace(/\\.+$/, '');\n\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Escape' && valueRef.current) {\n e.preventDefault();\n e.stopPropagation();\n onValueChangeRef.current('');\n inputRef.current?.focus();\n }\n },\n [],\n );\n\n // Arrow key navigation within the popover (input \u2194 results)\n const handlePopoverKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLDivElement>) => {\n const container = popoverRef.current;\n if (!container) return;\n\n const resultsGroup = container.querySelector('[role=\"group\"]');\n if (!resultsGroup) return;\n\n const items = Array.from(\n resultsGroup.querySelectorAll<HTMLElement>('a, button'),\n );\n if (items.length === 0) return;\n\n const active = document.activeElement as HTMLElement;\n const isOnInput = active === inputRef.current;\n const currentIndex = items.indexOf(active);\n\n // Typing while a result is focused \u2192 redirect focus to input\n if (\n e.key.length === 1 &&\n !e.ctrlKey &&\n !e.metaKey &&\n !e.altKey &&\n !isOnInput &&\n currentIndex !== -1\n ) {\n inputRef.current?.focus();\n return;\n }\n\n switch (e.key) {\n case 'ArrowDown': {\n e.preventDefault();\n if (isOnInput || currentIndex === -1) {\n items[0]?.focus();\n } else if (currentIndex < items.length - 1) {\n items[currentIndex + 1]?.focus();\n }\n break;\n }\n case 'ArrowUp': {\n e.preventDefault();\n if (currentIndex <= 0) {\n inputRef.current?.focus();\n } else {\n items[currentIndex - 1]?.focus();\n }\n break;\n }\n case 'Home': {\n // Only intercept when focused on a result, not the input (where Home moves cursor)\n if (!isOnInput) {\n e.preventDefault();\n items[0]?.focus();\n }\n break;\n }\n case 'End': {\n if (!isOnInput) {\n e.preventDefault();\n items[items.length - 1]?.focus();\n }\n break;\n }\n }\n },\n [],\n );\n\n if (isThin) {\n return (\n <div {...props} ref={forwardedRef} className={classNames('rt-SidebarSearch', 'rt-SidebarSearch--thin', className)}>\n <Popover.Root>\n <Popover.Trigger>\n <button\n type=\"button\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarSearchTrigger')}\n aria-label={searchLabel}\n >\n <span className=\"rt-SidebarMenuIconWrapper\">\n <SearchIcon />\n </span>\n <span className=\"rt-SidebarMenuLabel\">Search</span>\n </button>\n </Popover.Trigger>\n <Popover.Content side=\"right\" align=\"start\" size=\"2\" width=\"280px\" aria-label={searchLabel}>\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- keyDown manages arrow-key navigation between input and results, which is accessibility-enhancing */}\n <div\n ref={popoverRef}\n className=\"rt-SidebarSearchPopover\"\n role=\"search\"\n onKeyDown={handlePopoverKeyDown}\n >\n <div className=\"rt-SidebarSearchInputWrapper\">\n <SearchIcon className=\"rt-SidebarSearchIcon\" />\n <input\n ref={inputRef}\n type=\"search\"\n className=\"rt-SidebarSearchInput\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n aria-label={searchLabel}\n aria-controls={children ? resultsId : undefined}\n // eslint-disable-next-line jsx-a11y/no-autofocus -- intentional: popover opens on user action, focusing the input is expected UX\n autoFocus\n />\n {value && (\n <button\n type=\"button\"\n className=\"rt-reset rt-SidebarSearchClear\"\n onClick={() => {\n onValueChange('');\n inputRef.current?.focus();\n }}\n aria-label=\"Clear search\"\n >\n <ClearIcon />\n </button>\n )}\n </div>\n {children && (\n <div id={resultsId} role=\"group\" aria-label=\"Search results\">\n {children}\n </div>\n )}\n </div>\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n }\n\n // Expanded mode: inline input\n return (\n <div {...props} ref={forwardedRef} className={classNames('rt-SidebarSearch', 'rt-SidebarSearch--expanded', className)} role=\"search\">\n <div className=\"rt-SidebarSearchInputWrapper\">\n <SearchIcon className=\"rt-SidebarSearchIcon\" />\n <input\n ref={inputRef}\n type=\"search\"\n className=\"rt-SidebarSearchInput\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n aria-label={searchLabel}\n />\n {value && (\n <button\n type=\"button\"\n className=\"rt-reset rt-SidebarSearchClear\"\n onClick={() => {\n onValueChange('');\n inputRef.current?.focus();\n }}\n aria-label=\"Clear search\"\n >\n <ClearIcon />\n </button>\n )}\n </div>\n </div>\n );\n },\n);\nSidebarSearch.displayName = 'Sidebar.Search';\n\n// Export all components following shadcn's pattern\nexport {\n Sidebar as Root,\n SidebarContent as Content,\n SidebarHeader as Header,\n SidebarFooter as Footer,\n SidebarSeparator as Separator,\n SidebarMenu as Menu,\n SidebarMenuItem as MenuItem,\n SidebarMenuButton as MenuButton,\n SidebarMenuSub as MenuSub,\n SidebarMenuSubTrigger as MenuSubTrigger,\n SidebarMenuSubContent as MenuSubContent,\n SidebarGroup as Group,\n SidebarGroupLabel as GroupLabel,\n SidebarGroupContent as GroupContent,\n SidebarSearch as Search,\n};\n\n/**\n * Enhanced Sidebar Header and Footer Usage Examples:\n *\n * 1. Simple default container (backwards compatible):\n * <Sidebar.Header>\n * <Logo />\n * <span>App Name</span>\n * </Sidebar.Header>\n *\n * 2. Custom flex layout:\n * <Sidebar.Header className=\"rt-justify-between rt-gap-3\">\n * <Logo />\n * <Sidebar.MenuButton>\n * <SettingsIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 3. Column layout for multiple rows:\n * <Sidebar.Header className=\"rt-flex-col rt-gap-2\" asContainer={false}>\n * <div className=\"rt-flex rt-items-center rt-gap-2\">\n * <Logo />\n * <span>App Name</span>\n * </div>\n * <Sidebar.MenuButton>\n * <UserAvatar />\n * <span>John Doe</span>\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 4. Interactive footer with menu button:\n * <Sidebar.Footer>\n * <Sidebar.MenuButton>\n * <UserIcon />\n * <span>Settings</span>\n * <ChevronUpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * 5. Custom footer layout:\n * <Sidebar.Footer className=\"rt-justify-between\">\n * <span>v1.0.0</span>\n * <Sidebar.MenuButton>\n * <HelpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * Available utility classes:\n * - Layout: rt-flex-row, rt-flex-col\n * - Alignment: rt-items-center, rt-items-start, rt-items-end\n * - Justification: rt-justify-between, rt-justify-center, rt-justify-start, rt-justify-end\n * - Gap: rt-gap-1, rt-gap-2, rt-gap-3, rt-gap-4\n */\n\nexport type { SidebarProps as RootProps, SidebarContentProps as ContentProps, SidebarHeaderProps as HeaderProps, SidebarFooterProps as FooterProps, BadgeConfig };\n"],
|
|
5
|
+
"mappings": "2gBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,EAAA,WAAAC,GAAA,UAAAC,GAAA,iBAAAC,GAAA,eAAAC,GAAA,WAAAC,EAAA,SAAAC,GAAA,eAAAC,GAAA,aAAAC,GAAA,YAAAC,GAAA,mBAAAC,GAAA,mBAAAC,GAAA,SAAAC,EAAA,WAAAC,GAAA,cAAAC,KAEA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aAEvB,UAAYC,MAAe,4BAkC3B,IAAMC,EAA6B,gBAAgD,IAAI,EACvF,SAASC,GAAmB,CAC1B,OAAa,aAAWD,CAAoB,CAC9C,CAeA,IAAME,EAAgB,aAAyC,CAACC,EAAOC,IAAiB,CACtF,IAAMC,EAAeC,EAAgB,EAE/B,CACJ,KAAAC,EAAOC,EAAgB,KAAK,QAC5B,QAAAC,EAAUD,EAAgB,QAAQ,QAClC,YAAAE,EAAcF,EAAgB,YAAY,QAC1C,OAAAG,EAASH,EAAgB,OAAO,QAChC,aAAAI,EAIA,gBAAAC,EACA,MAAAC,CACF,EAAIX,EAEE,CAAE,UAAAY,EAAW,SAAAC,EAAU,GAAGC,CAAU,EAAIC,EAAaf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GACC,gBAAC,UACC,KAAK,SACL,UAAU,iCACV,QAAS,IAAM,CACbC,EAAc,EAAE,EAChBG,EAAS,SAAS,MAAM,CAC1B,EACA,aAAW,gBAEX,gBAACN,EAAA,IAAU,CACb,CAEJ,EACC/E,GACC,gBAAC,OAAI,GAAIuF,EAAW,KAAK,QAAQ,aAAW,kBACzCvF,CACH,CAEJ,CACF,CACF,CACF,EAMF,gBAAC,OAAK,GAAGb,EAAO,IAAKC,EAAc,UAAWuB,EAAW,mBAAoB,6BAA8BZ,CAAS,EAAG,KAAK,UAC1H,gBAAC,OAAI,UAAU,gCACb,gBAAC+E,EAAA,CAAW,UAAU,uBAAuB,EAC7C,gBAAC,SACC,IAAKO,EACL,KAAK,SACL,UAAU,wBACV,MAAOJ,EACP,SAAWU,GAAMT,EAAcS,EAAE,OAAO,KAAK,EAC7C,UAAW/C,EACX,YAAauC,EACb,aAAYO,EACd,EACCT,GACC,gBAAC,UACC,KAAK,SACL,UAAU,iCACV,QAAS,IAAM,CACbC,EAAc,EAAE,EAChBG,EAAS,SAAS,MAAM,CAC1B,EACA,aAAW,gBAEX,gBAACN,EAAA,IAAU,CACb,CAEJ,CACF,CAEJ,CACF,EACAC,GAAc,YAAc",
|
|
6
|
+
"names": ["sidebar_exports", "__export", "SidebarContent", "SidebarFooter", "SidebarGroup", "SidebarGroupContent", "SidebarGroupLabel", "SidebarHeader", "SidebarMenu", "SidebarMenuButton", "SidebarMenuItem", "SidebarMenuSub", "SidebarMenuSubContent", "SidebarMenuSubTrigger", "Sidebar", "SidebarSearch", "SidebarSeparator", "React", "classNames", "Accordion", "SidebarVisualContext", "useSidebarVisual", "Sidebar", "props", "forwardedRef", "themeContext", "useThemeContext", "size", "sidebarPropDefs", "variant", "menuVariant", "layout", "presentation", "panelBackground", "color", "className", "children", "rootProps", "extractProps", "_", "__", "___", "safeRootProps", "resolvedColor", "resolvedLayout", "resolvedSize", "visualContextValue", "classNames", "SidebarContent", "role", "ariaLabel", "id", "visual", "ScrollArea", "SidebarHeader", "asContainer", "SidebarFooter", "SidebarSeparator", "Separator", "SidebarMenu", "SidebarMenuItem", "separateIconsAndLabels", "node", "icons", "labels", "child", "el", "wrapTextNodes", "index", "newChildren", "SidebarMenuButton", "asChild", "isActive", "shortcut", "badge", "onKeyDown", "sidebarSize", "isThinMode", "Comp", "Slot", "handleKeyDown", "event", "scope", "buttons", "next", "processedChildren", "slottedChildren", "onlyChild", "originalInnerChildren", "enhancedInnerChildren", "Badge", "Kbd", "label", "SidebarSubMenuModeContext", "SidebarMenuSub", "defaultOpen", "DropdownMenuRoot", "SidebarMenuSubTrigger", "DropdownMenuTrigger", "ThickChevronRightIcon", "SidebarMenuSubContent", "unwrapMenuButton", "n", "i", "normalized", "itemChildren", "content", "DropdownMenuItem", "dropdownSize", "DropdownMenuContent", "DropdownMenuGroup", "SidebarGroup", "SidebarGroupLabel", "SidebarGroupContent", "SearchIcon", "ClearIcon", "SidebarSearch", "value", "onValueChange", "placeholder", "isThin", "inputRef", "popoverRef", "resultsId", "valueRef", "onValueChangeRef", "searchLabel", "e", "handlePopoverKeyDown", "container", "resultsGroup", "items", "active", "isOnInput", "currentIndex", "PopoverRoot", "PopoverTrigger", "PopoverContent"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-QDW5ZG5E.js";import{a as ta}from"../chunk-HMSSFU6I.js";import"../chunk-4WVNMGI5.js";import{a as ua}from"../chunk-GDAKJS64.js";import{a as oa,b as pa}from"../chunk-44JZYS7A.js";import{a as qa}from"../chunk-YG66IRW4.js";import{a as ra}from"../chunk-POG3YABW.js";import"../chunk-VK7RNXUO.js";import"../chunk-EE54S7YV.js";import{f as sa}from"../chunk-FEAOFF77.js";import{h as ka}from"../chunk-OJSOX3AX.js";import{e as la}from"../chunk-QEGEUD4D.js";import"../chunk-TZTUPQYK.js";import{a as ma}from"../chunk-WIDJYVZF.js";import"../chunk-CLMOWP5T.js";import{c as na}from"../chunk-W2LD2YE6.js";import"../chunk-MN3XALXD.js";import{a as ha}from"../chunk-EHBAK3LQ.js";import"../chunk-XDDKT4NF.js";import{a as ia}from"../chunk-AIHQ3MVK.js";import"../chunk-AF6XKU3W.js";import{c as ja}from"../chunk-F3AXE27Q.js";import"../chunk-AUV6B4AH.js";import"../chunk-BALS3AVM.js";import{p as va}from"../chunk-
|
|
1
|
+
import"../chunk-QDW5ZG5E.js";import{a as ta}from"../chunk-HMSSFU6I.js";import"../chunk-4WVNMGI5.js";import{a as ua}from"../chunk-GDAKJS64.js";import{a as oa,b as pa}from"../chunk-44JZYS7A.js";import{a as qa}from"../chunk-YG66IRW4.js";import{a as ra}from"../chunk-POG3YABW.js";import"../chunk-VK7RNXUO.js";import"../chunk-EE54S7YV.js";import{f as sa}from"../chunk-FEAOFF77.js";import{h as ka}from"../chunk-OJSOX3AX.js";import{e as la}from"../chunk-QEGEUD4D.js";import"../chunk-TZTUPQYK.js";import{a as ma}from"../chunk-WIDJYVZF.js";import"../chunk-CLMOWP5T.js";import{c as na}from"../chunk-W2LD2YE6.js";import"../chunk-MN3XALXD.js";import{a as ha}from"../chunk-EHBAK3LQ.js";import"../chunk-XDDKT4NF.js";import{a as ia}from"../chunk-AIHQ3MVK.js";import"../chunk-AF6XKU3W.js";import{c as ja}from"../chunk-F3AXE27Q.js";import"../chunk-AUV6B4AH.js";import"../chunk-BALS3AVM.js";import{p as va}from"../chunk-VUNNS3ZU.js";import"../chunk-2CMM7MEL.js";import{a as ga}from"../chunk-G4YKBAZT.js";import"../chunk-OJU5GCDZ.js";import{h as ea}from"../chunk-DCIQHXAR.js";import{a as fa}from"../chunk-GGSJXOKR.js";import"../chunk-CRSHBENJ.js";import{g as xa}from"../chunk-P27KV2LS.js";import{h as wa}from"../chunk-PYHEBG5I.js";import"../chunk-ADXZNG4F.js";import"../chunk-2EQWBT2S.js";import{a as da}from"../chunk-ZW26J2SA.js";import"../chunk-NIX6Z3JG.js";import{c as ca}from"../chunk-LJCUPAOI.js";import"../chunk-FC2DBBJ3.js";import"../chunk-EBQZ3Z22.js";import{a as aa}from"../chunk-IK3MQHA5.js";import{a as ba}from"../chunk-FHEHX7CE.js";import{a as Y}from"../chunk-KEEPKI2X.js";import{a as Z}from"../chunk-2Q7BJ7YG.js";import"../chunk-QEL55MLF.js";import{c as _}from"../chunk-TLGXIWAS.js";import"../chunk-OWMA6GTG.js";import{c as $}from"../chunk-WGWUEU4K.js";import"../chunk-VLTXI4A7.js";import"../chunk-STPMPY3X.js";import{a as V}from"../chunk-WZFVTC7P.js";import"../chunk-7FKKGUHK.js";import{e as W}from"../chunk-CRBOJ7N7.js";import"../chunk-Y3A6ZU24.js";import{a as X}from"../chunk-XEZXKPLE.js";import"../chunk-5XV4QEP5.js";import{a as T}from"../chunk-CBNTPHYK.js";import{a as S}from"../chunk-IDUVJJYG.js";import"../chunk-IBF5U4QW.js";import"../chunk-L6UXAITB.js";import"../chunk-GFOSP3PZ.js";import{a as U}from"../chunk-NTNMJX5M.js";import"../chunk-JAMLW534.js";import{d as R}from"../chunk-JQW4XYBS.js";import"../chunk-VJSZG35J.js";import{g as O}from"../chunk-PDUHBDFC.js";import"../chunk-MHANZINI.js";import{o as P}from"../chunk-HBIF43PT.js";import"../chunk-WOR3JCLX.js";import{a as Q}from"../chunk-WQCB7KSH.js";import"../chunk-GM7KMQDI.js";import{l as K}from"../chunk-RY67WG3O.js";import{g as J}from"../chunk-7NYODT3Z.js";import"../chunk-72AHPGPN.js";import"../chunk-RDAMYQFF.js";import{a as L}from"../chunk-O4CSXNST.js";import"../chunk-PPNWGWN3.js";import{n as M}from"../chunk-NV3P2CKH.js";import"../chunk-OA7C34MJ.js";import{e as N}from"../chunk-6J6YX2VX.js";import"../chunk-NIIEIZKQ.js";import{c as F}from"../chunk-Z7AZNMNX.js";import{a as E}from"../chunk-ODCVOXEV.js";import{c as G}from"../chunk-JQSZF3E2.js";import"../chunk-V32EP3S7.js";import"../chunk-5SNHUVDA.js";import{a as H}from"../chunk-FB3PD4Z3.js";import"../chunk-UICSVJ3B.js";import{a as I}from"../chunk-MBCQA7UZ.js";import"../chunk-5M7STAH3.js";import{a as u}from"../chunk-KV4SZP3F.js";import{d as v}from"../chunk-JDEBKA56.js";import"../chunk-OGVKSYLL.js";import{a as w}from"../chunk-C5RVO3C3.js";import"../chunk-OO652UQW.js";import{l as D}from"../chunk-3PTSRBVY.js";import{a as x}from"../chunk-OEEF6KJG.js";import{a as C}from"../chunk-4WU2WKUJ.js";import"../chunk-AO32NT75.js";import"../chunk-5GXFBLBJ.js";import"../chunk-5KICSAT7.js";import{a as y,b as z,c as A,d as B}from"../chunk-IX5HIHVI.js";import"../chunk-2N2AQNJH.js";import"../chunk-667BKCUG.js";import"../chunk-HAGKI7NA.js";import{a as p}from"../chunk-25X75TI7.js";import"../chunk-PS6NEG5A.js";import"../chunk-QFPHEY77.js";import{a as r}from"../chunk-JRFZ535T.js";import{a as q}from"../chunk-WJBOOAIO.js";import"../chunk-BPVVFHYD.js";import"../chunk-QQ62LO3X.js";import{a as s}from"../chunk-QJVAS7AK.js";import{a as t}from"../chunk-MM5IHQFM.js";import"../chunk-FGORMEAO.js";import"../chunk-ROSWI2CL.js";import{a as j}from"../chunk-ERNM3KVF.js";import{f as k}from"../chunk-NQXRWBQM.js";import"../chunk-EDKQURDU.js";import{h as n}from"../chunk-H4GR4262.js";import{a as l}from"../chunk-PYXMGEO7.js";import"../chunk-OTKQN2KY.js";import"../chunk-MJJ7XDIP.js";import{a as m}from"../chunk-5TAHT6VC.js";import"../chunk-26I257HE.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-ZE2KAVXW.js";import"../chunk-WYADYDPN.js";import"../chunk-ZWZGUBL4.js";import"../chunk-XKBLNVOD.js";import"../chunk-GCUGJXI2.js";import{a as o}from"../chunk-Y7LT3F6R.js";import"../chunk-UNWPH3SO.js";import{a as g,b as h,c as i}from"../chunk-SEY4NA45.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-XYVLQDGR.js";import"../chunk-YAQBIO2B.js";import"../chunk-AGNIFHOE.js";import"../chunk-HCNO7PX6.js";import"../chunk-GMHA5CFH.js";import"../chunk-A2XVR7GL.js";import"../chunk-BZZXXZ3O.js";import"../chunk-2LYX5S7H.js";import"../chunk-HWQ3NTJP.js";import"../chunk-3J6AUDID.js";import"../chunk-VTIL55SR.js";import{a as d}from"../chunk-OQU2SKLN.js";import"../chunk-3KB2XWBE.js";import{a as c}from"../chunk-ZJ33QP5N.js";import"../chunk-SMGDH54W.js";import{a as e}from"../chunk-AGAQC4HH.js";import"../chunk-5T6K7VPP.js";import"../chunk-SNR5VFWG.js";import{b as a,c as b}from"../chunk-FWB47YCH.js";import"../chunk-K53W3ELO.js";import"../chunk-TTFUM47A.js";import"../chunk-VX44UTQ5.js";import"../chunk-ERGJN7FJ.js";import"../chunk-5TXQLK4G.js";import"../chunk-JFWMAYEH.js";import"../chunk-KRJTW535.js";import"../chunk-F6V7GBNQ.js";import"../chunk-3KSGRY6I.js";import"../chunk-7PMMYHZV.js";import{a as f}from"../chunk-JDWCQ2XP.js";import"../chunk-ARIV4AT5.js";import"../chunk-3XSB7YIM.js";import"../chunk-YA5DF67M.js";import"../chunk-GSTOGDAJ.js";import"../chunk-UBSLEGQZ.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-PBFSBHBS.js";import"../chunk-WRWNN2NW.js";import"../chunk-RZCX6IBE.js";import"../chunk-QM3RCK5P.js";import"../chunk-NZJGC6ZW.js";import"../chunk-WMGIFPI2.js";import"../chunk-CFNESRYI.js";import"../chunk-ZNK6AH2G.js";import"../chunk-JSW6J6RS.js";import"../chunk-OS3FCYZY.js";export{j as AccessibleIcon,k as Accordion,n as AlertDialog,o as AspectRatio,p as Avatar,r as Badge,s as Blockquote,t as Box,u as Button,v as Callout,w as Card,D as Chatbar,H as Checkbox,F as CheckboxCards,G as CheckboxGroup,A as ChevronDownIcon,I as Code,K as Combobox,L as Container,M as ContextMenu,N as DataList,O as Dialog,P as DropdownMenu,Q as Em,c as Flex,E as Grid,l as Heading,R as HoverCard,x as IconButton,T as Image,U as Inset,f as Kbd,V as Link,W as Navbar,J as Popover,X as Portal,Y as Progress,Z as Quote,aa as Radio,_ as RadioCards,$ as RadioGroup,ba as Reset,C as ScrollArea,da as Section,ca as SegmentedControl,ea as Select,fa as Separator,xa as Sheet,wa as Shell,va as Sidebar,S as Skeleton,ga as Slider,a as Slot,b as Slottable,d as Spinner,ha as Strong,ia as Switch,ja as TabNav,ka as Table,la as Tabs,m as Text,ma as TextArea,na as TextField,i as Theme,g as ThemeContext,oa as ThemePanel,pa as ThemePanelContent,z as ThickCheckIcon,B as ThickChevronRightIcon,y as ThickDividerHorizontalIcon,qa as ToggleButton,ra as ToggleIconButton,sa as Toolbar,q as Tooltip,ta as UserCard,ua as VirtualMenu,e as VisuallyHidden,h as useThemeContext};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAIrD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAM3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,UAAU,CAAC,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EAAE,mBAAmB,IAAI,YAAY,EAAE,kBAAkB,IAAI,WAAW,EAAE,kBAAkB,IAAI,WAAW,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../chunk-
|
|
1
|
+
"use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../chunk-VUNNS3ZU.js";import"../chunk-2CMM7MEL.js";import"../chunk-GGSJXOKR.js";import"../chunk-CRSHBENJ.js";import"../chunk-HBIF43PT.js";import"../chunk-WOR3JCLX.js";import"../chunk-7NYODT3Z.js";import"../chunk-72AHPGPN.js";import"../chunk-4WU2WKUJ.js";import"../chunk-AO32NT75.js";import"../chunk-5GXFBLBJ.js";import"../chunk-5KICSAT7.js";import"../chunk-IX5HIHVI.js";import"../chunk-PS6NEG5A.js";import"../chunk-JRFZ535T.js";import"../chunk-WJBOOAIO.js";import"../chunk-BPVVFHYD.js";import"../chunk-QQ62LO3X.js";import"../chunk-MJJ7XDIP.js";import"../chunk-5TAHT6VC.js";import"../chunk-26I257HE.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-ZE2KAVXW.js";import"../chunk-WYADYDPN.js";import"../chunk-ZWZGUBL4.js";import"../chunk-UNWPH3SO.js";import"../chunk-SEY4NA45.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-XYVLQDGR.js";import"../chunk-FWB47YCH.js";import"../chunk-VX44UTQ5.js";import"../chunk-ERGJN7FJ.js";import"../chunk-5TXQLK4G.js";import"../chunk-KRJTW535.js";import"../chunk-3KSGRY6I.js";import"../chunk-7PMMYHZV.js";import"../chunk-JDWCQ2XP.js";import"../chunk-ARIV4AT5.js";import"../chunk-3XSB7YIM.js";import"../chunk-YA5DF67M.js";import"../chunk-GSTOGDAJ.js";import"../chunk-UBSLEGQZ.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-PBFSBHBS.js";import"../chunk-WRWNN2NW.js";import"../chunk-RZCX6IBE.js";import"../chunk-QM3RCK5P.js";import"../chunk-NZJGC6ZW.js";import"../chunk-ZNK6AH2G.js";import"../chunk-JSW6J6RS.js";import"../chunk-OS3FCYZY.js";export{b as Content,d as Footer,l as Group,n as GroupContent,m as GroupLabel,c as Header,f as Menu,h as MenuButton,g as MenuItem,i as MenuSub,k as MenuSubContent,j as MenuSubTrigger,a as Root,o as Search,e as Separator};
|
|
2
2
|
//# sourceMappingURL=sidebar.js.map
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-EL7YGOTY.js";import"./chunk-QDW5ZG5E.js";import{a as yo}from"./chunk-HMSSFU6I.js";import"./chunk-4WVNMGI5.js";import{a as zo}from"./chunk-GDAKJS64.js";import{a as lo,b as no}from"./chunk-44JZYS7A.js";import{a as uo}from"./chunk-YG66IRW4.js";import{a as vo}from"./chunk-POG3YABW.js";import{a as so}from"./chunk-VK7RNXUO.js";import{a as qo}from"./chunk-EE54S7YV.js";import{f as wo}from"./chunk-FEAOFF77.js";import{h as ho}from"./chunk-OJSOX3AX.js";import{e as io}from"./chunk-QEGEUD4D.js";import"./chunk-TZTUPQYK.js";import{a as jo}from"./chunk-WIDJYVZF.js";import"./chunk-CLMOWP5T.js";import{c as ko}from"./chunk-W2LD2YE6.js";import"./chunk-MN3XALXD.js";import{a as bo}from"./chunk-EHBAK3LQ.js";import"./chunk-XDDKT4NF.js";import{a as co}from"./chunk-AIHQ3MVK.js";import"./chunk-AF6XKU3W.js";import{c as go}from"./chunk-F3AXE27Q.js";import"./chunk-AUV6B4AH.js";import"./chunk-BALS3AVM.js";import{p as Ao}from"./chunk-
|
|
1
|
+
import"./chunk-EL7YGOTY.js";import"./chunk-QDW5ZG5E.js";import{a as yo}from"./chunk-HMSSFU6I.js";import"./chunk-4WVNMGI5.js";import{a as zo}from"./chunk-GDAKJS64.js";import{a as lo,b as no}from"./chunk-44JZYS7A.js";import{a as uo}from"./chunk-YG66IRW4.js";import{a as vo}from"./chunk-POG3YABW.js";import{a as so}from"./chunk-VK7RNXUO.js";import{a as qo}from"./chunk-EE54S7YV.js";import{f as wo}from"./chunk-FEAOFF77.js";import{h as ho}from"./chunk-OJSOX3AX.js";import{e as io}from"./chunk-QEGEUD4D.js";import"./chunk-TZTUPQYK.js";import{a as jo}from"./chunk-WIDJYVZF.js";import"./chunk-CLMOWP5T.js";import{c as ko}from"./chunk-W2LD2YE6.js";import"./chunk-MN3XALXD.js";import{a as bo}from"./chunk-EHBAK3LQ.js";import"./chunk-XDDKT4NF.js";import{a as co}from"./chunk-AIHQ3MVK.js";import"./chunk-AF6XKU3W.js";import{c as go}from"./chunk-F3AXE27Q.js";import"./chunk-AUV6B4AH.js";import"./chunk-BALS3AVM.js";import{p as Ao}from"./chunk-VUNNS3ZU.js";import"./chunk-2CMM7MEL.js";import{a as ao}from"./chunk-G4YKBAZT.js";import"./chunk-OJU5GCDZ.js";import{h as to}from"./chunk-DCIQHXAR.js";import{a as xo}from"./chunk-GGSJXOKR.js";import"./chunk-CRSHBENJ.js";import{g as Co}from"./chunk-P27KV2LS.js";import{h as Bo}from"./chunk-PYHEBG5I.js";import"./chunk-ADXZNG4F.js";import"./chunk-2EQWBT2S.js";import{a as po}from"./chunk-ZW26J2SA.js";import"./chunk-NIX6Z3JG.js";import{c as mo}from"./chunk-LJCUPAOI.js";import"./chunk-FC2DBBJ3.js";import"./chunk-EBQZ3Z22.js";import{a as eo}from"./chunk-IK3MQHA5.js";import{a as fo}from"./chunk-FHEHX7CE.js";import{a as _}from"./chunk-KEEPKI2X.js";import{a as $}from"./chunk-2Q7BJ7YG.js";import"./chunk-QEL55MLF.js";import{c as oo}from"./chunk-TLGXIWAS.js";import"./chunk-OWMA6GTG.js";import{c as ro}from"./chunk-WGWUEU4K.js";import"./chunk-VLTXI4A7.js";import"./chunk-STPMPY3X.js";import{a as X}from"./chunk-WZFVTC7P.js";import"./chunk-7FKKGUHK.js";import{e as Y}from"./chunk-CRBOJ7N7.js";import"./chunk-Y3A6ZU24.js";import{a as Z}from"./chunk-XEZXKPLE.js";import"./chunk-5XV4QEP5.js";import{a as V}from"./chunk-CBNTPHYK.js";import{a as U}from"./chunk-IDUVJJYG.js";import"./chunk-IBF5U4QW.js";import"./chunk-L6UXAITB.js";import"./chunk-GFOSP3PZ.js";import{a as W}from"./chunk-NTNMJX5M.js";import"./chunk-JAMLW534.js";import{d as T}from"./chunk-JQW4XYBS.js";import"./chunk-VJSZG35J.js";import{g as Q}from"./chunk-PDUHBDFC.js";import{a as P}from"./chunk-MHANZINI.js";import{o as R}from"./chunk-HBIF43PT.js";import"./chunk-WOR3JCLX.js";import{a as S}from"./chunk-WQCB7KSH.js";import"./chunk-GM7KMQDI.js";import{l as L}from"./chunk-RY67WG3O.js";import{g as K}from"./chunk-7NYODT3Z.js";import"./chunk-72AHPGPN.js";import"./chunk-RDAMYQFF.js";import{a as M}from"./chunk-O4CSXNST.js";import"./chunk-PPNWGWN3.js";import{n as N}from"./chunk-NV3P2CKH.js";import"./chunk-OA7C34MJ.js";import{e as O}from"./chunk-6J6YX2VX.js";import"./chunk-NIIEIZKQ.js";import{c as G}from"./chunk-Z7AZNMNX.js";import{a as F}from"./chunk-ODCVOXEV.js";import{c as H}from"./chunk-JQSZF3E2.js";import"./chunk-V32EP3S7.js";import"./chunk-5SNHUVDA.js";import{a as I}from"./chunk-FB3PD4Z3.js";import"./chunk-UICSVJ3B.js";import{a as J}from"./chunk-MBCQA7UZ.js";import"./chunk-5M7STAH3.js";import{a as u}from"./chunk-KV4SZP3F.js";import{d as v}from"./chunk-JDEBKA56.js";import"./chunk-OGVKSYLL.js";import{a as w}from"./chunk-C5RVO3C3.js";import"./chunk-OO652UQW.js";import{l as E}from"./chunk-3PTSRBVY.js";import{a as y}from"./chunk-OEEF6KJG.js";import{a as D}from"./chunk-4WU2WKUJ.js";import"./chunk-AO32NT75.js";import"./chunk-5GXFBLBJ.js";import"./chunk-5KICSAT7.js";import{a as z,b as A,c as B,d as C}from"./chunk-IX5HIHVI.js";import{a as s}from"./chunk-2N2AQNJH.js";import"./chunk-667BKCUG.js";import"./chunk-HAGKI7NA.js";import{a as j}from"./chunk-25X75TI7.js";import"./chunk-PS6NEG5A.js";import"./chunk-QFPHEY77.js";import{a as l}from"./chunk-JRFZ535T.js";import{a as k}from"./chunk-WJBOOAIO.js";import"./chunk-BPVVFHYD.js";import"./chunk-QQ62LO3X.js";import{a as n}from"./chunk-QJVAS7AK.js";import{a as q}from"./chunk-MM5IHQFM.js";import"./chunk-FGORMEAO.js";import"./chunk-ROSWI2CL.js";import{a as b}from"./chunk-ERNM3KVF.js";import{f as c}from"./chunk-NQXRWBQM.js";import"./chunk-EDKQURDU.js";import{h}from"./chunk-H4GR4262.js";import{a as d}from"./chunk-PYXMGEO7.js";import"./chunk-OTKQN2KY.js";import"./chunk-MJJ7XDIP.js";import{a as g}from"./chunk-5TAHT6VC.js";import"./chunk-26I257HE.js";import"./chunk-G2CKYO2I.js";import"./chunk-AXUDFYLY.js";import"./chunk-KNQBAOMV.js";import"./chunk-FD2TR343.js";import"./chunk-ZE2KAVXW.js";import"./chunk-WYADYDPN.js";import"./chunk-ZWZGUBL4.js";import"./chunk-XKBLNVOD.js";import"./chunk-GCUGJXI2.js";import{a as i}from"./chunk-Y7LT3F6R.js";import"./chunk-UNWPH3SO.js";import{a as t,b as x,c as a}from"./chunk-SEY4NA45.js";import"./chunk-WAURCNAS.js";import"./chunk-F22ZRNWL.js";import"./chunk-XYVLQDGR.js";import"./chunk-YAQBIO2B.js";import"./chunk-AGNIFHOE.js";import"./chunk-HCNO7PX6.js";import"./chunk-GMHA5CFH.js";import"./chunk-A2XVR7GL.js";import"./chunk-BZZXXZ3O.js";import"./chunk-2LYX5S7H.js";import"./chunk-HWQ3NTJP.js";import"./chunk-3J6AUDID.js";import"./chunk-VTIL55SR.js";import{a as f}from"./chunk-OQU2SKLN.js";import"./chunk-3KB2XWBE.js";import{a as e}from"./chunk-ZJ33QP5N.js";import"./chunk-SMGDH54W.js";import{a as m}from"./chunk-AGAQC4HH.js";import"./chunk-5T6K7VPP.js";import"./chunk-SNR5VFWG.js";import{b as o,c as r}from"./chunk-FWB47YCH.js";import"./chunk-K53W3ELO.js";import"./chunk-TTFUM47A.js";import"./chunk-VX44UTQ5.js";import"./chunk-ERGJN7FJ.js";import"./chunk-5TXQLK4G.js";import"./chunk-JFWMAYEH.js";import"./chunk-KRJTW535.js";import"./chunk-F6V7GBNQ.js";import"./chunk-3KSGRY6I.js";import"./chunk-7PMMYHZV.js";import{a as p}from"./chunk-JDWCQ2XP.js";import"./chunk-ARIV4AT5.js";import"./chunk-3XSB7YIM.js";import"./chunk-YA5DF67M.js";import"./chunk-GSTOGDAJ.js";import"./chunk-UBSLEGQZ.js";import"./chunk-AX5S56DS.js";import"./chunk-E23RKOQJ.js";import"./chunk-PBFSBHBS.js";import"./chunk-WRWNN2NW.js";import"./chunk-RZCX6IBE.js";import"./chunk-QM3RCK5P.js";import"./chunk-NZJGC6ZW.js";import"./chunk-WMGIFPI2.js";import"./chunk-CFNESRYI.js";import"./chunk-ZNK6AH2G.js";import"./chunk-JSW6J6RS.js";import"./chunk-OS3FCYZY.js";export{b as AccessibleIcon,c as Accordion,h as AlertDialog,i as AspectRatio,j as Avatar,l as Badge,n as Blockquote,q as Box,u as Button,v as Callout,w as Card,E as Chatbar,I as Checkbox,G as CheckboxCards,H as CheckboxGroup,B as ChevronDownIcon,J as Code,L as Combobox,M as Container,N as ContextMenu,O as DataList,Q as Dialog,R as DropdownMenu,S as Em,e as Flex,F as Grid,d as Heading,T as HoverCard,y as IconButton,V as Image,W as Inset,p as Kbd,X as Link,Y as Navbar,K as Popover,Z as Portal,_ as Progress,$ as Quote,eo as Radio,oo as RadioCards,ro as RadioGroup,fo as Reset,D as ScrollArea,po as Section,mo as SegmentedControl,to as Select,xo as Separator,Co as Sheet,Bo as Shell,Ao as Sidebar,U as Skeleton,ao as Slider,o as Slot,r as Slottable,f as Spinner,bo as Strong,co as Switch,go as TabNav,ho as Table,io as Tabs,g as Text,jo as TextArea,ko as TextField,a as Theme,t as ThemeContext,lo as ThemePanel,no as ThemePanelContent,A as ThickCheckIcon,C as ThickChevronRightIcon,z as ThickDividerHorizontalIcon,uo as ToggleButton,vo as ToggleIconButton,wo as Toolbar,k as Tooltip,yo as UserCard,zo as VirtualMenu,m as VisuallyHidden,P as useBodyPointerEventsCleanup,qo as useLiveAnnouncer,x as useThemeContext,so as useToggleState,s as useTooltipWrapper};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -189,7 +189,8 @@
|
|
|
189
189
|
padding-inline-start: var(--base-menu-item-padding-left);
|
|
190
190
|
padding-inline-end: var(--base-menu-item-padding-right);
|
|
191
191
|
box-sizing: border-box;
|
|
192
|
-
|
|
192
|
+
/* a11 keeps the label above 4.5:1 on every sidebar background. */
|
|
193
|
+
color: var(--gray-a11);
|
|
193
194
|
user-select: none;
|
|
194
195
|
cursor: default;
|
|
195
196
|
|
|
@@ -211,11 +211,12 @@ const SidebarSeparator = React.forwardRef<React.ComponentRef<typeof Separator>,
|
|
|
211
211
|
));
|
|
212
212
|
SidebarSeparator.displayName = 'Sidebar.Separator';
|
|
213
213
|
|
|
214
|
-
// Menu components -
|
|
214
|
+
// Menu components - styled like dropdown menus, but semantically a navigation list.
|
|
215
|
+
// No menu/menuitem roles: those promise an application menu, which a list of links is not.
|
|
215
216
|
interface SidebarMenuProps extends React.ComponentPropsWithoutRef<'ul'> {}
|
|
216
217
|
|
|
217
218
|
const SidebarMenu = React.forwardRef<HTMLUListElement, SidebarMenuProps>(({ className, ...props }, forwardedRef) => (
|
|
218
|
-
<ul {...props} ref={forwardedRef}
|
|
219
|
+
<ul {...props} ref={forwardedRef} className={classNames('rt-SidebarMenu', className)} />
|
|
219
220
|
));
|
|
220
221
|
SidebarMenu.displayName = 'Sidebar.Menu';
|
|
221
222
|
|
|
@@ -282,33 +283,25 @@ const SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonP
|
|
|
282
283
|
|
|
283
284
|
const Comp = asChild ? Slot : 'button';
|
|
284
285
|
|
|
285
|
-
|
|
286
|
+
// Enter and Space are left to the native button or link. Arrow keys move between
|
|
287
|
+
// the visible buttons of the same sidebar, as a convenience on top of Tab.
|
|
286
288
|
const handleKeyDown = React.useCallback(
|
|
287
289
|
(event: React.KeyboardEvent<HTMLButtonElement>) => {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
290
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
291
|
+
const scope = event.currentTarget.closest('.rt-SidebarContent, .rt-SidebarSearchPopover');
|
|
292
|
+
const buttons = scope
|
|
293
|
+
? Array.from(scope.querySelectorAll<HTMLElement>('.rt-SidebarMenuButton')).filter((el) => el.offsetParent !== null)
|
|
294
|
+
: [];
|
|
295
|
+
const index = buttons.indexOf(event.currentTarget);
|
|
296
|
+
const next = buttons[index + (event.key === 'ArrowDown' ? 1 : -1)];
|
|
297
|
+
if (index !== -1 && next) {
|
|
291
298
|
event.preventDefault();
|
|
292
|
-
|
|
293
|
-
break;
|
|
294
|
-
case 'ArrowDown': {
|
|
295
|
-
event.preventDefault();
|
|
296
|
-
// Focus next menu item
|
|
297
|
-
const nextItem = (event.currentTarget as HTMLElement).nextElementSibling?.querySelector('[role="menuitem"]') as HTMLElement;
|
|
298
|
-
if (nextItem) nextItem.focus();
|
|
299
|
-
break;
|
|
300
|
-
}
|
|
301
|
-
case 'ArrowUp': {
|
|
302
|
-
event.preventDefault();
|
|
303
|
-
// Focus previous menu item
|
|
304
|
-
const prevItem = (event.currentTarget as HTMLElement).previousElementSibling?.querySelector('[role="menuitem"]') as HTMLElement;
|
|
305
|
-
if (prevItem) prevItem.focus();
|
|
306
|
-
break;
|
|
299
|
+
next.focus();
|
|
307
300
|
}
|
|
308
301
|
}
|
|
309
302
|
onKeyDown?.(event);
|
|
310
303
|
},
|
|
311
|
-
[
|
|
304
|
+
[onKeyDown],
|
|
312
305
|
);
|
|
313
306
|
|
|
314
307
|
// Memoize child processing to avoid re-traversal on every render
|
|
@@ -361,7 +354,6 @@ const SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonP
|
|
|
361
354
|
<Comp
|
|
362
355
|
{...props}
|
|
363
356
|
ref={forwardedRef}
|
|
364
|
-
role="menuitem"
|
|
365
357
|
aria-current={isActive ? 'page' : undefined}
|
|
366
358
|
className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', className)}
|
|
367
359
|
data-active={isActive || undefined}
|
|
@@ -458,7 +450,6 @@ const SidebarMenuSubTrigger = React.forwardRef<React.ElementRef<typeof Accordion
|
|
|
458
450
|
{...(props as any)}
|
|
459
451
|
ref={forwardedRef as any}
|
|
460
452
|
type="button"
|
|
461
|
-
role="menuitem"
|
|
462
453
|
aria-haspopup="menu"
|
|
463
454
|
className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}
|
|
464
455
|
>
|
|
@@ -475,8 +466,6 @@ const SidebarMenuSubTrigger = React.forwardRef<React.ElementRef<typeof Accordion
|
|
|
475
466
|
{...props}
|
|
476
467
|
ref={forwardedRef}
|
|
477
468
|
asChild={asChild}
|
|
478
|
-
role="menuitem"
|
|
479
|
-
aria-haspopup="true"
|
|
480
469
|
className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}
|
|
481
470
|
>
|
|
482
471
|
{asChild ? (
|
|
@@ -554,7 +543,7 @@ const SidebarMenuSubContent = React.forwardRef<React.ElementRef<typeof Accordion
|
|
|
554
543
|
});
|
|
555
544
|
SidebarMenuSubContent.displayName = 'Sidebar.MenuSubContent';
|
|
556
545
|
|
|
557
|
-
// Group components
|
|
546
|
+
// Group components. The label is plain text: no role, so it isn't announced as an empty group.
|
|
558
547
|
interface SidebarGroupProps extends React.ComponentPropsWithoutRef<'div'> {}
|
|
559
548
|
|
|
560
549
|
const SidebarGroup = React.forwardRef<HTMLDivElement, SidebarGroupProps>(({ className, ...props }, forwardedRef) => (
|
|
@@ -569,7 +558,7 @@ interface SidebarGroupLabelProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
|
569
558
|
const SidebarGroupLabel = React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>(({ asChild = false, className, ...props }, forwardedRef) => {
|
|
570
559
|
const Comp = asChild ? Slot : 'div';
|
|
571
560
|
|
|
572
|
-
return <Comp {...props} ref={forwardedRef}
|
|
561
|
+
return <Comp {...props} ref={forwardedRef} className={classNames('rt-BaseMenuLabel', 'rt-SidebarGroupLabel', className)} />;
|
|
573
562
|
});
|
|
574
563
|
SidebarGroupLabel.displayName = 'Sidebar.GroupLabel';
|
|
575
564
|
|
package/styles.css
CHANGED
|
@@ -21889,7 +21889,7 @@
|
|
|
21889
21889
|
padding-inline-end: var(--base-menu-item-padding-right);
|
|
21890
21890
|
-webkit-box-sizing: border-box;
|
|
21891
21891
|
box-sizing: border-box;
|
|
21892
|
-
color: var(--gray-
|
|
21892
|
+
color: var(--gray-a11);
|
|
21893
21893
|
-webkit-user-select: none;
|
|
21894
21894
|
-moz-user-select: none;
|
|
21895
21895
|
-ms-user-select: none;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as w}from"./chunk-2CMM7MEL.js";import{a as U}from"./chunk-GGSJXOKR.js";import{a as j,b as _,c as O,e as B,f as q}from"./chunk-HBIF43PT.js";import{a as F,b as K,c as $}from"./chunk-7NYODT3Z.js";import{a as V}from"./chunk-4WU2WKUJ.js";import{d as W}from"./chunk-IX5HIHVI.js";import{a as T}from"./chunk-JRFZ535T.js";import{b as G}from"./chunk-SEY4NA45.js";import{b as E}from"./chunk-FWB47YCH.js";import{a as I}from"./chunk-JDWCQ2XP.js";import{a as A}from"./chunk-UBSLEGQZ.js";import{a as le}from"./chunk-OS3FCYZY.js";var fe={};le(fe,{Content:()=>Y,Footer:()=>ee,Group:()=>ce,GroupContent:()=>ue,GroupLabel:()=>de,Header:()=>Z,Menu:()=>re,MenuButton:()=>ne,MenuItem:()=>ae,MenuSub:()=>oe,MenuSubContent:()=>ie,MenuSubTrigger:()=>se,Root:()=>Q,Search:()=>pe,Separator:()=>te});import*as e from"react";import u from"classnames";import*as v from"@radix-ui/react-accordion";var J=e.createContext(null);function P(){return e.useContext(J)}var Q=e.forwardRef((t,a)=>{let n=G(),{size:r=w.size.default,variant:o=w.variant.default,menuVariant:d=w.menuVariant.default,layout:p=w.layout.default,presentation:m,panelBackground:y,color:s}=t,{className:l,children:b,...M}=A(t,w),{asChild:h,panelBackground:x,presentation:R,...g}=M,C=s||n.accentColor,c=m==="thin"?"rail":m==="expanded"?"panel":p||"panel",i=typeof r=="object"?r.initial||"2":r,f=e.useMemo(()=>({size:i,menuVariant:d,presentation:m,color:C}),[i,d,m,C]);return e.createElement("div",{...g,ref:a,"data-accent-color":C,className:u("rt-SidebarRoot",l)},e.createElement(J.Provider,{value:f},e.createElement("div",{className:u("rt-SidebarContainer",`rt-variant-${o}`,`rt-r-size-${i}`,`rt-menu-variant-${d}`,c&&`rt-layout-${c}`),"data-accent-color":C,"data-panel-background":y,"data-presentation":m,"data-layout":c},b)))});Q.displayName="Sidebar.Root";var Y=e.forwardRef(({className:t,children:a,role:n="navigation","aria-label":r="Main navigation",id:o,...d},p)=>{let m=P(),y=m?.size??"2",s=m?.menuVariant??"soft";return e.createElement(V,{type:"hover"},e.createElement("div",{...d,ref:p,id:o,role:n,"aria-label":r,className:u("rt-BaseMenuContent","rt-SidebarContent",`rt-r-size-${y}`,`rt-menu-variant-${s}`,t)},e.createElement("div",{className:"rt-BaseMenuViewport"},a)))});Y.displayName="Sidebar.Content";var Z=e.forwardRef(({className:t,asContainer:a=!0,...n},r)=>{let o=P(),d=o?.size??"2",p=o?.menuVariant??"soft";return e.createElement("div",{...n,ref:r,className:u("rt-SidebarHeader",`rt-r-size-${d}`,`rt-menu-variant-${p}`,{"rt-SidebarHeader--container":a},t)})});Z.displayName="Sidebar.Header";var ee=e.forwardRef(({className:t,asContainer:a=!0,...n},r)=>{let o=P(),d=o?.size??"2",p=o?.menuVariant??"soft";return e.createElement("div",{...n,ref:r,className:u("rt-SidebarFooter",`rt-r-size-${d}`,`rt-menu-variant-${p}`,{"rt-SidebarFooter--container":a},t)})});ee.displayName="Sidebar.Footer";var te=e.forwardRef(({className:t,...a},n)=>e.createElement(U,{...a,ref:n,className:u("rt-SidebarSeparator",t)}));te.displayName="Sidebar.Separator";var re=e.forwardRef(({className:t,...a},n)=>e.createElement("ul",{...a,ref:n,role:"menu",className:u("rt-SidebarMenu",t)}));re.displayName="Sidebar.Menu";var ae=e.forwardRef(({className:t,...a},n)=>e.createElement("li",{...a,ref:n,className:u("rt-SidebarMenuItem",t)}));ae.displayName="Sidebar.MenuItem";function me(t){let a=[],n=[];return e.Children.forEach(t,r=>{if(typeof r=="string"||typeof r=="number")n.push(e.createElement("span",{key:n.length,className:"rt-SidebarMenuLabel"},r));else if(e.isValidElement(r)){let o=r;o.type==="svg"||o.props&&o.props.icon||typeof o.type=="function"&&(o.type.displayName?.includes("Icon")||o.type.name?.includes("Icon"))?a.push(r):n.push(r)}else r&&n.push(r)}),{icons:a,labels:n}}function H(t){if(typeof t=="string"||typeof t=="number")return e.createElement("span",{className:"rt-SidebarMenuLabel"},t);if(Array.isArray(t))return t.map((a,n)=>e.createElement(e.Fragment,{key:n},H(a)));if(e.isValidElement(t)){let a=t,n=a.props&&a.props.className||"";if(typeof a.type=="string"&&n.split(" ").includes("rt-SidebarMenuLabel"))return a;let o=H(a.props?.children);return e.cloneElement(a,{...a.props},o)}return t}var ne=e.forwardRef(({asChild:t=!1,isActive:a=!1,shortcut:n,badge:r,className:o,children:d,onKeyDown:p,...m},y)=>{let s=P(),l=s?.size??"2",b=s?.presentation==="thin",M=t?E:"button",{onClick:h}=m,x=e.useCallback(i=>{switch(i.key){case"Enter":case" ":i.preventDefault(),h&&h(i);break;case"ArrowDown":{i.preventDefault();let f=i.currentTarget.nextElementSibling?.querySelector('[role="menuitem"]');f&&f.focus();break}case"ArrowUp":{i.preventDefault();let f=i.currentTarget.previousElementSibling?.querySelector('[role="menuitem"]');f&&f.focus();break}}p?.(i)},[h,p]),R=e.useMemo(()=>H(d),[d]),{icons:g,labels:C}=e.useMemo(()=>b?me(d):{icons:[],labels:[]},[b,d]),c=e.useMemo(()=>{if(!t)return null;try{let i=e.Children.only(R),f=i.props?.children,S=e.createElement(e.Fragment,null,f,r&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof r=="string"?e.createElement(T,{size:l,variant:"soft"},r):e.createElement(T,{size:r.size||l,variant:r.variant||"soft",color:r.color,radius:r.radius},r.content)),n&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(I,{size:l},n)));return e.cloneElement(i,{...i.props},S)}catch{return R}},[t,R,r,n,l]);return e.createElement(M,{...m,ref:y,role:"menuitem","aria-current":a?"page":void 0,className:u("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton",o),"data-active":a||void 0,onKeyDown:x},t?c:b&&g.length>0?e.createElement(e.Fragment,null,e.createElement("span",{className:"rt-SidebarMenuIconWrapper"},g),C.map((i,f)=>e.createElement(e.Fragment,{key:f},typeof i=="string"||typeof i=="number"?e.createElement("span",{className:"rt-SidebarMenuLabel"},i):i))):e.createElement(e.Fragment,null,R,r&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof r=="string"?e.createElement(T,{size:l,variant:"soft"},r):e.createElement(T,{size:r.size||l,variant:r.variant||"soft",color:r.color,radius:r.radius},r.content)),n&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(I,{size:l},n))))});ne.displayName="Sidebar.MenuButton";var D=e.createContext("accordion"),oe=e.forwardRef(({defaultOpen:t=!1,children:a,...n},r)=>(P()?.presentation==="thin"?"dropdown":"accordion")==="dropdown"?e.createElement("div",{...n,ref:r},e.createElement(j,null,e.createElement(D.Provider,{value:"dropdown"},a))):e.createElement("div",{...n,ref:r},e.createElement(D.Provider,{value:"accordion"},e.createElement(v.Root,{type:"single",collapsible:!0,defaultValue:t?"item":void 0},e.createElement(v.Item,{value:"item"},a)))));oe.displayName="Sidebar.MenuSub";var se=e.forwardRef(({asChild:t=!1,className:a,children:n,...r},o)=>e.useContext(D)==="dropdown"?e.createElement(_,null,e.createElement("button",{...r,ref:o,type:"button",role:"menuitem","aria-haspopup":"menu",className:u("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",a)},n)):e.createElement(v.Header,{asChild:!0},e.createElement("div",null,e.createElement(v.Trigger,{...r,ref:o,asChild:t,role:"menuitem","aria-haspopup":"true",className:u("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",a)},t?n:e.createElement(e.Fragment,null,n,e.createElement(W,{className:u("rt-BaseMenuSubTriggerIcon","rt-SidebarMenuSubTriggerIcon")}))))));se.displayName="Sidebar.MenuSubTrigger";var ie=e.forwardRef(({className:t,children:a,...n},r)=>{let o=P();if(e.useContext(D)==="dropdown"){let p=s=>{if(Array.isArray(s))return s.map((l,b)=>e.createElement(e.Fragment,{key:b},p(l)));if(e.isValidElement(s)){if(s.type?.displayName==="Sidebar.MenuButton")return s.props?.children;let b=s.props?.children;if(b!==void 0)return e.cloneElement(s,{...s.props,children:p(b)})}return s},m=e.Children.map(a,(s,l)=>{if(e.isValidElement(s)&&s.type?.displayName==="Sidebar.MenuItem"){let b=s.props?.children,M=p(b);return e.createElement(B,{key:l,asChild:!0},M)}return e.createElement(B,{key:l,asChild:!0},p(s))}),y=o?.size==="3"?"2":o?.size;return e.createElement(O,{size:y,variant:o?.menuVariant,className:u(t)},e.createElement(q,null,m))}return e.createElement(v.Content,{...n,ref:r,className:u("rt-SidebarMenuSubContent",t)},e.createElement("div",{className:"rt-SidebarMenuSubList"},a))});ie.displayName="Sidebar.MenuSubContent";var ce=e.forwardRef(({className:t,...a},n)=>e.createElement("div",{...a,ref:n,className:u("rt-BaseMenuGroup","rt-SidebarGroup",t)}));ce.displayName="Sidebar.Group";var de=e.forwardRef(({asChild:t=!1,className:a,...n},r)=>e.createElement(t?E:"div",{...n,ref:r,role:"group",className:u("rt-BaseMenuLabel","rt-SidebarGroupLabel",a)}));de.displayName="Sidebar.GroupLabel";var ue=e.forwardRef(({className:t,...a},n)=>e.createElement("div",{...a,ref:n,className:u("rt-SidebarGroupContent",t)}));ue.displayName="Sidebar.GroupContent";var k=({className:t})=>e.createElement("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("circle",{cx:"11",cy:"11",r:"8"}),e.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})),X=({className:t})=>e.createElement("svg",{className:t,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),pe=e.forwardRef(({value:t,onValueChange:a,placeholder:n="Search...",children:r,className:o,...d},p)=>{let y=P()?.presentation==="thin",s=e.useRef(null),l=e.useRef(null),M=`${e.useId()}-results`,h=e.useRef(t);h.current=t;let x=e.useRef(a);x.current=a;let R=n.replace(/\.+$/,""),g=e.useCallback(c=>{c.key==="Escape"&&h.current&&(c.preventDefault(),c.stopPropagation(),x.current(""),s.current?.focus())},[]),C=e.useCallback(c=>{let i=l.current;if(!i)return;let f=i.querySelector('[role="group"]');if(!f)return;let S=Array.from(f.querySelectorAll("a, button"));if(S.length===0)return;let z=document.activeElement,L=z===s.current,N=S.indexOf(z);if(c.key.length===1&&!c.ctrlKey&&!c.metaKey&&!c.altKey&&!L&&N!==-1){s.current?.focus();return}switch(c.key){case"ArrowDown":{c.preventDefault(),L||N===-1?S[0]?.focus():N<S.length-1&&S[N+1]?.focus();break}case"ArrowUp":{c.preventDefault(),N<=0?s.current?.focus():S[N-1]?.focus();break}case"Home":{L||(c.preventDefault(),S[0]?.focus());break}case"End":{L||(c.preventDefault(),S[S.length-1]?.focus());break}}},[]);return y?e.createElement("div",{...d,ref:p,className:u("rt-SidebarSearch","rt-SidebarSearch--thin",o)},e.createElement(F,null,e.createElement(K,null,e.createElement("button",{type:"button",className:u("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarSearchTrigger"),"aria-label":R},e.createElement("span",{className:"rt-SidebarMenuIconWrapper"},e.createElement(k,null)),e.createElement("span",{className:"rt-SidebarMenuLabel"},"Search"))),e.createElement($,{side:"right",align:"start",size:"2",width:"280px","aria-label":R},e.createElement("div",{ref:l,className:"rt-SidebarSearchPopover",role:"search",onKeyDown:C},e.createElement("div",{className:"rt-SidebarSearchInputWrapper"},e.createElement(k,{className:"rt-SidebarSearchIcon"}),e.createElement("input",{ref:s,type:"search",className:"rt-SidebarSearchInput",value:t,onChange:c=>a(c.target.value),onKeyDown:g,placeholder:n,"aria-label":R,"aria-controls":r?M:void 0,autoFocus:!0}),t&&e.createElement("button",{type:"button",className:"rt-reset rt-SidebarSearchClear",onClick:()=>{a(""),s.current?.focus()},"aria-label":"Clear search"},e.createElement(X,null))),r&&e.createElement("div",{id:M,role:"group","aria-label":"Search results"},r))))):e.createElement("div",{...d,ref:p,className:u("rt-SidebarSearch","rt-SidebarSearch--expanded",o),role:"search"},e.createElement("div",{className:"rt-SidebarSearchInputWrapper"},e.createElement(k,{className:"rt-SidebarSearchIcon"}),e.createElement("input",{ref:s,type:"search",className:"rt-SidebarSearchInput",value:t,onChange:c=>a(c.target.value),onKeyDown:g,placeholder:n,"aria-label":R}),t&&e.createElement("button",{type:"button",className:"rt-reset rt-SidebarSearchClear",onClick:()=>{a(""),s.current?.focus()},"aria-label":"Clear search"},e.createElement(X,null))))});pe.displayName="Sidebar.Search";export{Q as a,Y as b,Z as c,ee as d,te as e,re as f,ae as g,ne as h,oe as i,se as j,ie as k,ce as l,de as m,ue as n,pe as o,fe as p};
|
|
2
|
-
//# sourceMappingURL=chunk-3AOFY2B4.js.map
|