@humain/ui 2.2.2 → 2.2.3

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.
Files changed (67) hide show
  1. package/dist/components/templates/AppShell/AppShell.d.ts +4 -2
  2. package/dist/components/templates/AppShell/index.d.ts +1 -1
  3. package/dist/components/templates/AppSidebar/AppSidebar.constants.d.ts +4 -0
  4. package/dist/components/templates/AppSidebar/AppSidebar.d.ts +1 -0
  5. package/dist/index.js +19 -18
  6. package/dist/index217.js +6 -24
  7. package/dist/index217.js.map +1 -1
  8. package/dist/index218.js +20 -23
  9. package/dist/index218.js.map +1 -1
  10. package/dist/index219.js +20 -95
  11. package/dist/index219.js.map +1 -1
  12. package/dist/index220.js +92 -88
  13. package/dist/index220.js.map +1 -1
  14. package/dist/index221.js +97 -29
  15. package/dist/index221.js.map +1 -1
  16. package/dist/index222.js +24 -470
  17. package/dist/index222.js.map +1 -1
  18. package/dist/index223.js +450 -196
  19. package/dist/index223.js.map +1 -1
  20. package/dist/index224.js +199 -754
  21. package/dist/index224.js.map +1 -1
  22. package/dist/index225.js +777 -61
  23. package/dist/index225.js.map +1 -1
  24. package/dist/index226.js +58 -181
  25. package/dist/index226.js.map +1 -1
  26. package/dist/index227.js +175 -259
  27. package/dist/index227.js.map +1 -1
  28. package/dist/index228.js +246 -172
  29. package/dist/index228.js.map +1 -1
  30. package/dist/index229.js +195 -32
  31. package/dist/index229.js.map +1 -1
  32. package/dist/index230.js +12 -40
  33. package/dist/index230.js.map +1 -1
  34. package/dist/index231.js +23 -26
  35. package/dist/index231.js.map +1 -1
  36. package/dist/index232.js +45 -22
  37. package/dist/index232.js.map +1 -1
  38. package/dist/index233.js +27 -48
  39. package/dist/index233.js.map +1 -1
  40. package/dist/index234.js +52 -26
  41. package/dist/index234.js.map +1 -1
  42. package/dist/index235.js +40 -225
  43. package/dist/index235.js.map +1 -1
  44. package/dist/index236.js +217 -39
  45. package/dist/index236.js.map +1 -1
  46. package/dist/index237.js +50 -0
  47. package/dist/index237.js.map +1 -0
  48. package/dist/styles.css +1 -1
  49. package/dist/wc/{sidebar.js → AppSidebar.constants.js} +80 -78
  50. package/dist/wc/AppSidebar.constants.js.map +1 -0
  51. package/dist/wc/hf-app-shell.js +346 -343
  52. package/dist/wc/hf-app-shell.js.map +1 -1
  53. package/dist/wc/hf-app-sidebar.js +65 -62
  54. package/dist/wc/hf-app-sidebar.js.map +1 -1
  55. package/dist/wc-react/{sidebar.js → AppSidebar.constants.js} +89 -87
  56. package/dist/wc-react/AppSidebar.constants.js.map +1 -0
  57. package/dist/wc-react/hf-app-shell.js +383 -380
  58. package/dist/wc-react/hf-app-shell.js.map +1 -1
  59. package/dist/wc-react/hf-app-sidebar.js +69 -66
  60. package/dist/wc-react/hf-app-sidebar.js.map +1 -1
  61. package/package.json +1 -1
  62. package/skills/humain-ui/SKILL.md +1 -1
  63. package/skills/humain-ui-wc/SKILL.md +1 -1
  64. package/skills/humain-ui-wc.skill +0 -0
  65. package/skills/humain-ui.skill +0 -0
  66. package/dist/wc/sidebar.js.map +0 -1
  67. package/dist/wc-react/sidebar.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"hf-app-sidebar.js","names":["__iconNode","__iconNode"],"sources":["../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/panel-left-close.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/panel-left-open.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/users.mjs","../../src/components/templates/AppSidebar/AppSidebar.tsx","../../src/wc/hf-app-sidebar.ts"],"sourcesContent":["/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }],\n [\"path\", { d: \"M9 3v18\", key: \"fh3hqa\" }],\n [\"path\", { d: \"m16 15-3-3 3-3\", key: \"14y99z\" }]\n];\nconst PanelLeftClose = createLucideIcon(\"panel-left-close\", __iconNode);\n\nexport { __iconNode, PanelLeftClose as default };\n//# sourceMappingURL=panel-left-close.mjs.map\n","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }],\n [\"path\", { d: \"M9 3v18\", key: \"fh3hqa\" }],\n [\"path\", { d: \"m14 9 3 3-3 3\", key: \"8010ee\" }]\n];\nconst PanelLeftOpen = createLucideIcon(\"panel-left-open\", __iconNode);\n\nexport { __iconNode, PanelLeftOpen as default };\n//# sourceMappingURL=panel-left-open.mjs.map\n","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\", key: \"1yyitq\" }],\n [\"path\", { d: \"M16 3.128a4 4 0 0 1 0 7.744\", key: \"16gr8j\" }],\n [\"path\", { d: \"M22 21v-2a4 4 0 0 0-3-3.87\", key: \"kshegd\" }],\n [\"circle\", { cx: \"9\", cy: \"7\", r: \"4\", key: \"nufk8\" }]\n];\nconst Users = createLucideIcon(\"users\", __iconNode);\n\nexport { __iconNode, Users as default };\n//# sourceMappingURL=users.mjs.map\n","/** biome-ignore-all lint/a11y/noNoninteractiveTabindex: ChatList uses tabIndex on scrollable div for keyboard scrolling */\n/** biome-ignore-all lint/a11y/useSemanticElements: NavSection uses role=\"separator\" on inner <div>; ChatList uses role=\"list\" on scrollable div */\n/** biome-ignore-all lint/a11y/useFocusableInteractive: Non-focusable separator per WAI-ARIA spec for decorative separators */\n/** biome-ignore-all lint/a11y/useAriaPropsForRole: Non-focusable separators don't require aria-valuenow per WAI-ARIA spec */\n/** biome-ignore-all lint/a11y/noNoninteractiveElementToInteractiveRole: role=\"separator\" on <div> inside list items for semantic section boundaries */\n\n'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n ChevronRight,\n MessageCircle,\n PanelLeftClose,\n PanelLeftOpen,\n} from 'lucide-react';\nimport * as React from 'react';\nimport { Badge } from '@/components/atoms/display/Badge';\nimport { Separator } from '@/components/atoms/layout/Separator';\nimport { Avatar } from '@/components/molecules/data/Avatar';\nimport { BrandIcon } from '@/components/molecules/data/BrandIcon';\nimport {\n PopoverPopup,\n PopoverRoot,\n PopoverTrigger,\n} from '@/components/organisms/overlays/Popover';\nimport {\n Sidebar,\n SidebarAccountSkeleton,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarNavSkeleton,\n SidebarProvider,\n SidebarTrigger,\n useSidebar,\n} from '@/components/ui/sidebar';\nimport { Tooltip, TooltipPopup, TooltipTrigger } from '@/components/ui/tooltip';\nimport { cn } from '@/lib/utils';\n\nconst APP_SIDEBAR_WIDTH = '280px';\nconst APP_SIDEBAR_COLLAPSED_WIDTH = '116px';\n\nfunction formatAccessibleLabel(\n label: string,\n badge?: string | number | null,\n): string {\n if (badge == null) return label;\n return `${label}, ${typeof badge === 'number' ? `${badge} ${badge === 1 ? 'item' : 'items'}` : badge}`;\n}\n\nfunction getSidebarBgClass(\n isCollapsed: boolean,\n sidebarBgColor?: string,\n): string {\n return isCollapsed\n ? 'bg-transparent'\n : (sidebarBgColor ?? 'bg-[var(--sidebar)]');\n}\n\nfunction getSidebarSurfaceClass({\n isCollapsed,\n side,\n rounded,\n backgroundClass,\n}: {\n isCollapsed: boolean;\n side: AppSidebarSide;\n rounded: boolean;\n backgroundClass: string;\n}): string {\n return cn(\n 'flex h-full min-h-0 flex-col items-center pb-4 pt-6',\n isCollapsed\n ? 'w-full px-6'\n : [\n 'w-[calc(100%-0.75rem)] px-3',\n side === 'left' ? 'mr-3 self-start' : 'ml-3 self-end',\n ],\n backgroundClass,\n rounded && (side === 'left' ? 'rounded-r-lg' : 'rounded-l-lg'),\n );\n}\n\nfunction getSkeletonCount(count: number | undefined, fallback: number): number {\n return typeof count === 'number' && Number.isFinite(count) && count >= 0\n ? Math.floor(count)\n : fallback;\n}\n\n// ============================================\n// Slot Distribution Hook\n// ============================================\n\nconst APP_SIDEBAR_IMPLICIT_SLOT = Symbol('AppSidebarImplicitSlot');\n\ntype AppSidebarImplicitSlot = 'header' | 'content' | 'footer';\n\ninterface AppSidebarImplicitSlotComponent {\n [APP_SIDEBAR_IMPLICIT_SLOT]: AppSidebarImplicitSlot;\n}\n\ninterface AppSidebarWrappedComponent {\n type?: unknown;\n render?: unknown;\n}\n\nfunction markAppSidebarImplicitSlot<Component extends object>(\n component: Component,\n slot: AppSidebarImplicitSlot,\n): Component & AppSidebarImplicitSlotComponent {\n const slottedComponent = component as Component &\n AppSidebarImplicitSlotComponent;\n slottedComponent[APP_SIDEBAR_IMPLICIT_SLOT] = slot;\n return slottedComponent;\n}\n\nfunction isAppSidebarImplicitSlotComponent(\n value: unknown,\n): value is AppSidebarImplicitSlotComponent {\n return (\n (typeof value === 'function' ||\n (typeof value === 'object' && value !== null)) &&\n APP_SIDEBAR_IMPLICIT_SLOT in value\n );\n}\n\nfunction getAppSidebarImplicitSlot(\n childType: unknown,\n): AppSidebarImplicitSlot | undefined {\n if (isAppSidebarImplicitSlotComponent(childType)) {\n return childType[APP_SIDEBAR_IMPLICIT_SLOT];\n }\n\n if (typeof childType === 'object' && childType !== null) {\n const wrappedComponent = childType as AppSidebarWrappedComponent;\n return (\n getAppSidebarImplicitSlot(wrappedComponent.type) ??\n getAppSidebarImplicitSlot(wrappedComponent.render)\n );\n }\n\n return undefined;\n}\n\ntype SlotResult = {\n header: React.ReactNode[];\n content: React.ReactNode[];\n footer: React.ReactNode[];\n explicitHeader: React.ReactElement | null;\n explicitContent: React.ReactElement | null;\n explicitFooter: React.ReactElement | null;\n};\n\nfunction useSlotChildren(children: React.ReactNode): SlotResult {\n return React.useMemo(() => {\n const result: SlotResult = {\n header: [],\n content: [],\n footer: [],\n explicitHeader: null,\n explicitContent: null,\n explicitFooter: null,\n };\n\n React.Children.forEach(children, (child) => {\n if (!React.isValidElement(child)) return;\n\n const childType = child.type;\n\n // Check for explicit slot components\n if (childType === AppSidebarHeader) {\n result.explicitHeader = child;\n return;\n }\n if (childType === AppSidebarContent) {\n result.explicitContent = child;\n return;\n }\n if (childType === AppSidebarFooter) {\n result.explicitFooter = child;\n return;\n }\n\n // Distribute to slots based on explicit component-owned slot markers.\n const implicitSlot = getAppSidebarImplicitSlot(childType);\n if (implicitSlot === 'header') {\n result.header.push(child);\n } else if (implicitSlot === 'content') {\n result.content.push(child);\n } else if (implicitSlot === 'footer') {\n result.footer.push(child);\n } else {\n // Unknown children go to content by default\n result.content.push(child);\n }\n });\n\n return result;\n }, [children]);\n}\n\ntype AppSidebarSide = 'left' | 'right';\ntype AppSidebarDirection = 'ltr' | 'rtl';\n\nconst AppSidebarLayoutContext = React.createContext<{ side: AppSidebarSide }>({\n side: 'left',\n});\n\nfunction useAppSidebarLayout() {\n return React.useContext(AppSidebarLayoutContext);\n}\n\nfunction getAppSidebarDirection(\n element: HTMLElement | null,\n): AppSidebarDirection {\n const win = element?.ownerDocument.defaultView;\n if (!element || !win) return 'ltr';\n return win.getComputedStyle(element).direction === 'rtl' ? 'rtl' : 'ltr';\n}\n\nfunction normalizeAppSidebarDirection(\n dir: string | undefined,\n): AppSidebarDirection | undefined {\n return dir === 'rtl' || dir === 'ltr' ? dir : undefined;\n}\n\nfunction getAppSidebarSideFromDirection(\n direction: AppSidebarDirection,\n): AppSidebarSide {\n return direction === 'rtl' ? 'right' : 'left';\n}\n\nfunction getAppSidebarDirectionTargets(element: HTMLElement): Element[] {\n const targets = new Set<Element>();\n let current: Element | null = element;\n\n while (current) {\n targets.add(current);\n if (current === element.ownerDocument.documentElement) break;\n current = current.parentElement;\n }\n\n targets.add(element.ownerDocument.documentElement);\n if (element.ownerDocument.body) targets.add(element.ownerDocument.body);\n\n return Array.from(targets);\n}\n\nfunction useResolvedAppSidebarSide({\n containerRef,\n explicitDir,\n explicitSide,\n}: {\n containerRef: React.RefObject<HTMLDivElement | null>;\n explicitDir?: string;\n explicitSide?: AppSidebarSide;\n}): AppSidebarSide {\n const [detectedDirection, setDetectedDirection] =\n React.useState<AppSidebarDirection>(\n () => normalizeAppSidebarDirection(explicitDir) ?? 'ltr',\n );\n\n React.useEffect(() => {\n if (explicitSide) return;\n\n const normalizedExplicitDir = normalizeAppSidebarDirection(explicitDir);\n if (normalizedExplicitDir) {\n setDetectedDirection((current) =>\n current === normalizedExplicitDir ? current : normalizedExplicitDir,\n );\n return;\n }\n\n const container = containerRef.current;\n const win = container?.ownerDocument.defaultView;\n if (!container || !win) return;\n\n const detectDirection = () => {\n const nextDirection = getAppSidebarDirection(container);\n setDetectedDirection((current) =>\n current === nextDirection ? current : nextDirection,\n );\n };\n\n detectDirection();\n\n const Observer = win.MutationObserver;\n if (!Observer) return;\n\n const observer = new Observer(detectDirection);\n for (const target of getAppSidebarDirectionTargets(container)) {\n observer.observe(target, {\n attributes: true,\n attributeFilter: ['dir', 'class', 'style'],\n });\n }\n\n return () => observer.disconnect();\n }, [containerRef, explicitDir, explicitSide]);\n\n return explicitSide ?? getAppSidebarSideFromDirection(detectedDirection);\n}\n\n// ============================================\n// Sidebar Logo\n// ============================================\n\nexport interface AppSidebarLogoProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** Logo image or element */\n logo?: React.ReactNode;\n /** Icon to show when sidebar is compacted. Defaults to Humain logomark. */\n compactedLogo?: React.ReactNode;\n /** Subtext displayed below the logo (e.g., \"Dashboard\"). Hidden when collapsed. */\n subtext?: string;\n}\n\nconst DEFAULT_COMPACTED_LOGO = (\n <span className=\"flex size-9 items-center justify-center rounded-lg bg-primary text-primary-foreground\">\n <BrandIcon icon=\"mark\" size=\"sm\" />\n </span>\n);\n\nfunction AppSidebarLogo({\n logo,\n compactedLogo,\n subtext,\n className,\n ...props\n}: AppSidebarLogoProps) {\n const { state, toggleSidebar } = useSidebar();\n const isCollapsed = state === 'collapsed';\n const effectiveCompactedLogo = compactedLogo ?? DEFAULT_COMPACTED_LOGO;\n\n if (isCollapsed) {\n return (\n <div\n data-slot=\"app-sidebar-logo\"\n className={cn('flex items-center justify-center', className)}\n {...props}\n dir=\"ltr\"\n >\n <button\n type=\"button\"\n onClick={toggleSidebar}\n className=\"group/logo relative flex size-[52px] items-center justify-center rounded-md p-2 transition-colors duration-200 ease-smooth hover:bg-sidebar-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none\"\n aria-label=\"Expand sidebar\"\n >\n <span className=\"transition-opacity duration-200 ease-smooth group-hover/logo:opacity-0 motion-reduce:transition-none\">\n {effectiveCompactedLogo}\n </span>\n <PanelLeftOpen className=\"absolute size-5 opacity-0 transition-opacity duration-200 ease-smooth group-hover/logo:opacity-100 motion-reduce:transition-none\" />\n </button>\n </div>\n );\n }\n\n return (\n <div\n data-slot=\"app-sidebar-logo\"\n className={cn(\n 'flex h-[52px] items-center justify-between gap-2 rounded-md p-2',\n className,\n )}\n {...props}\n dir=\"ltr\"\n >\n <div className=\"flex min-w-0 flex-col gap-0\">\n <div className=\"flex items-center gap-2\">\n {logo || (\n <>\n {DEFAULT_COMPACTED_LOGO}\n <span className=\"text-lg font-semibold tracking-tight text-foreground\">\n HUMAIN\n </span>\n </>\n )}\n </div>\n {subtext && (\n <p className=\"text-sm text-sidebar-foreground\">{subtext}</p>\n )}\n </div>\n <button\n type=\"button\"\n onClick={toggleSidebar}\n className=\"relative flex size-9 items-center justify-center rounded-lg text-sidebar-foreground transition-colors duration-200 ease-smooth hover:bg-sidebar-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none after:absolute after:-inset-1\"\n aria-label=\"Collapse sidebar\"\n >\n <PanelLeftClose aria-hidden=\"true\" className=\"size-5\" />\n </button>\n </div>\n );\n}\n\nAppSidebarLogo.displayName = 'AppSidebar.Logo';\n\n// ============================================\n// Slot Components (Header, Content, Footer)\n// ============================================\n\nexport interface AppSidebarSlotProps {\n children?: React.ReactNode;\n className?: string;\n}\n\nfunction AppSidebarHeader({ children, className }: AppSidebarSlotProps) {\n return (\n <div data-slot=\"app-sidebar-header\" className={className}>\n {children}\n </div>\n );\n}\nAppSidebarHeader.displayName = 'AppSidebar.Header';\n\nfunction AppSidebarContent({ children, className }: AppSidebarSlotProps) {\n return (\n <div data-slot=\"app-sidebar-content\" className={className}>\n {children}\n </div>\n );\n}\nAppSidebarContent.displayName = 'AppSidebar.Content';\n\nfunction AppSidebarFooter({ children, className }: AppSidebarSlotProps) {\n return (\n <div data-slot=\"app-sidebar-footer\" className={className}>\n {children}\n </div>\n );\n}\nAppSidebarFooter.displayName = 'AppSidebar.Footer';\n\n// ============================================\n// Nav Component\n// ============================================\n\nexport interface AppSidebarNavProps {\n children?: React.ReactNode;\n /** Accessible label for the nav landmark (useful when multiple Nav instances exist) */\n 'aria-label'?: string;\n className?: string;\n}\n\nfunction AppSidebarNav({\n children,\n 'aria-label': ariaLabel = 'Sidebar navigation',\n className,\n}: AppSidebarNavProps) {\n const menuContent = (\n <SidebarMenu className=\"gap-0.5 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:gap-1\">\n {React.Children.map(children, (child) => (\n <SidebarMenuItem>{child}</SidebarMenuItem>\n ))}\n </SidebarMenu>\n );\n\n return (\n <SidebarGroup\n data-slot=\"app-sidebar-nav\"\n className={cn(\n 'shrink-0 p-0 group-data-[collapsible=icon]:w-auto',\n className,\n )}\n >\n <SidebarGroupContent>\n <nav aria-label={ariaLabel}>{menuContent}</nav>\n </SidebarGroupContent>\n </SidebarGroup>\n );\n}\n\nAppSidebarNav.displayName = 'AppSidebar.Nav';\nmarkAppSidebarImplicitSlot(AppSidebarNav, 'content');\n\n// ============================================\n// Nav Section (Group Label / Divider)\n// ============================================\n\nexport interface AppSidebarNavSectionProps {\n /** Section label shown when sidebar is expanded */\n label: string;\n /** Additional className */\n className?: string;\n}\n\nfunction AppSidebarNavSection({ label, className }: AppSidebarNavSectionProps) {\n return (\n <div\n data-slot=\"app-sidebar-nav-section\"\n role=\"separator\"\n aria-label={label}\n className={cn('py-2 group-data-[collapsible=icon]:w-[52px]', className)}\n >\n <div className=\"flex h-8 items-center px-2 group-data-[collapsible=icon]:hidden\">\n <span className=\"text-xs font-medium text-sidebar-foreground/80\">\n {label}\n </span>\n </div>\n <div className=\"hidden py-2 group-data-[collapsible=icon]:block\">\n <span className=\"sr-only\">{label}</span>\n <Separator className=\"mx-auto w-full\" />\n </div>\n </div>\n );\n}\n\nAppSidebarNavSection.displayName = 'AppSidebar.NavSection';\n\n// ============================================\n// Nav Item Component\n// ============================================\n\nconst navItemVariants = cva(\n 'relative flex w-full items-center gap-1.5 rounded-lg px-2 py-2 text-sm font-normal transition-[color,background-color] duration-200 ease-smooth motion-reduce:transition-none',\n {\n variants: {\n state: {\n default: 'text-sidebar-foreground hover:bg-sidebar-accent',\n active: 'bg-primary/10 text-sidebar-foreground',\n },\n },\n defaultVariants: {\n state: 'default',\n },\n },\n);\n\nexport interface AppSidebarNavItemProps {\n icon: React.ReactNode;\n label: string;\n isActive?: boolean;\n badge?: string | number;\n onClick?: () => void;\n href?: string;\n className?: string;\n /** Sub-navigation children (AppSidebar.NavSub items). When present, renders as collapsible parent. */\n children?: React.ReactNode;\n}\n\nfunction AppSidebarNavItem({\n icon,\n label,\n isActive = false,\n badge,\n onClick,\n href,\n className,\n children,\n}: AppSidebarNavItemProps) {\n const { state, containerRef } = useSidebar();\n const { side: sidebarSide } = useAppSidebarLayout();\n const isCollapsed = state === 'collapsed';\n const hasChildren = React.Children.count(children) > 0;\n const hasActiveChild = React.Children.toArray(children).some(\n (child) =>\n React.isValidElement<{ isActive?: boolean }>(child) &&\n child.props.isActive === true,\n );\n const isHighlighted = isActive || hasActiveChild;\n const [isOpen, setIsOpen] = React.useState(isHighlighted && hasChildren);\n const subNavId = React.useId();\n const floatingSide = sidebarSide === 'right' ? 'left' : 'right';\n const flyoutPanelBackground =\n 'linear-gradient(108deg, var(--opacity-white-87) 0.5219%, var(--opacity-white-75) 98.419%)';\n const flyoutFrameEdgeClassName =\n sidebarSide === 'right'\n ? 'justify-end rounded-l-xl rounded-r-none'\n : 'justify-start rounded-r-xl rounded-l-none';\n const flyoutPanelEdgeClassName =\n sidebarSide === 'right' ? 'rounded-l-xl' : 'rounded-r-xl';\n const flyoutAnchor = React.useMemo(\n () => ({\n getBoundingClientRect: () => {\n const container = containerRef.current;\n const rect = container?.getBoundingClientRect();\n const win = container?.ownerDocument.defaultView;\n const viewportHeight = win?.innerHeight ?? rect?.height ?? 0;\n const x = rect ? (sidebarSide === 'right' ? rect.left : rect.right) : 0;\n\n return {\n x,\n y: 0,\n top: 0,\n right: x,\n bottom: viewportHeight,\n left: x,\n width: 0,\n height: viewportHeight,\n };\n },\n }),\n [containerRef, sidebarSide],\n );\n\n React.useEffect(() => {\n if (isHighlighted && hasChildren) setIsOpen(true);\n }, [isHighlighted, hasChildren]);\n\n const accessibleLabel = formatAccessibleLabel(label, badge);\n\n const iconElement = (\n <span\n data-slot=\"nav-icon\"\n className=\"flex shrink-0 items-center p-0.5 [&>svg]:size-4\"\n >\n {icon}\n </span>\n );\n\n const labelElement = (\n <span className=\"flex-1 text-start group-data-[collapsible=icon]:hidden\">\n {label}\n </span>\n );\n\n const badgeElement = badge != null && (\n <Badge\n size=\"sm\"\n variant=\"soft\"\n color=\"primary\"\n className=\"px-1.5 group-data-[collapsible=icon]:hidden\"\n aria-hidden=\"true\"\n >\n {badge}\n </Badge>\n );\n\n const chevronElement = hasChildren && (\n <ChevronRight\n aria-hidden=\"true\"\n className={cn(\n 'size-4 shrink-0 text-muted-foreground transition-transform duration-200 ease-smooth group-data-[collapsible=icon]:hidden motion-reduce:transition-none',\n isOpen ? 'rotate-90' : 'rtl:rotate-180',\n isHighlighted && isOpen && 'text-primary',\n )}\n />\n );\n\n const itemClassName = cn(\n navItemVariants({ state: isHighlighted ? 'active' : 'default' }),\n 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',\n 'min-h-11 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0 group-data-[collapsible=icon]:py-2 group-data-[collapsible=icon]:w-11 group-data-[collapsible=icon]:h-11',\n className,\n );\n\n const ariaProps = isActive ? { 'aria-current': 'page' as const } : {};\n\n // --- Collapsed: icon-only with tooltip, flyout popover for children ---\n if (isCollapsed) {\n const collapsedIconElement = (\n <span\n data-slot=\"nav-icon\"\n className=\"flex shrink-0 items-center justify-center p-0.5 [&>svg]:size-4\"\n >\n {icon}\n </span>\n );\n\n const triggerElement = href ? (\n <a\n href={href}\n className={cn(itemClassName)}\n aria-label={accessibleLabel}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-item\"\n >\n {collapsedIconElement}\n </a>\n ) : (\n <button\n type=\"button\"\n onClick={hasChildren ? () => setIsOpen(!isOpen) : onClick}\n className={cn(itemClassName, 'cursor-pointer')}\n aria-label={accessibleLabel}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-item\"\n >\n {collapsedIconElement}\n </button>\n );\n\n if (!hasChildren) {\n if (!label) return triggerElement;\n return (\n <Tooltip>\n <TooltipTrigger render={triggerElement} />\n <TooltipPopup side={floatingSide} sideOffset={8}>\n {label}\n </TooltipPopup>\n </Tooltip>\n );\n }\n\n return (\n <PopoverRoot>\n <PopoverTrigger\n className={cn(itemClassName, 'cursor-pointer')}\n aria-label={accessibleLabel}\n data-slot=\"app-sidebar-nav-item\"\n >\n {collapsedIconElement}\n </PopoverTrigger>\n <PopoverPopup\n side={floatingSide}\n align=\"start\"\n sideOffset={0}\n alignOffset={0}\n anchor={flyoutAnchor}\n collisionAvoidance={{\n side: 'none',\n align: 'none',\n fallbackAxisSide: 'none',\n }}\n positionMethod=\"fixed\"\n aria-label={`${label} sub-navigation`}\n style={\n {\n '--app-sidebar-flyout-panel-bg': flyoutPanelBackground,\n } as React.CSSProperties\n }\n className={cn(\n 'flex h-[var(--anchor-height)] w-[276px] border-0 bg-transparent p-0 ring-0 shadow-none',\n 'overflow-clip',\n flyoutFrameEdgeClassName,\n )}\n >\n <div\n className={cn(\n 'flex h-full w-64 flex-col gap-0.5 overflow-y-auto p-3 shadow-[var(--shadow-hover-card)]',\n 'supports-backdrop-filter:backdrop-blur-[60px] [background-image:var(--app-sidebar-flyout-panel-bg)] delight-tooltip-stagger',\n flyoutPanelEdgeClassName,\n )}\n data-slot=\"app-sidebar-nav-flyout-panel\"\n role=\"group\"\n aria-label={label}\n >\n <p\n className=\"px-2 pb-2 pt-1 text-xs font-semibold text-primary opacity-70\"\n aria-hidden=\"true\"\n >\n {label}\n </p>\n {children}\n </div>\n </PopoverPopup>\n </PopoverRoot>\n );\n }\n\n // --- Expanded: full item with optional inline sub-nav ---\n const handleClick = () => {\n if (hasChildren) {\n setIsOpen(!isOpen);\n }\n onClick?.();\n };\n\n const mainElement =\n href && !hasChildren ? (\n <a\n href={href}\n className={itemClassName}\n aria-label={accessibleLabel}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-item\"\n >\n {iconElement}\n {labelElement}\n {badgeElement}\n {chevronElement}\n </a>\n ) : (\n <button\n type=\"button\"\n onClick={handleClick}\n className={cn(itemClassName, 'cursor-pointer')}\n aria-label={accessibleLabel}\n aria-expanded={hasChildren ? isOpen : undefined}\n aria-controls={hasChildren ? subNavId : undefined}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-item\"\n >\n {iconElement}\n {labelElement}\n {badgeElement}\n {chevronElement}\n </button>\n );\n\n if (!hasChildren) return mainElement;\n\n return (\n <>\n {mainElement}\n {isOpen && (\n <ul\n id={subNavId}\n role=\"group\"\n aria-label={`${label} sub-navigation`}\n className=\"ms-4 flex flex-col items-start border-s border-sidebar-border py-1 ps-2\"\n >\n {children}\n </ul>\n )}\n </>\n );\n}\n\nAppSidebarNavItem.displayName = 'AppSidebar.NavItem';\n\n// ============================================\n// Nav Sub Component\n// ============================================\n\nexport interface AppSidebarNavSubProps {\n label: string;\n badge?: string | number;\n isActive?: boolean;\n href?: string;\n onClick?: () => void;\n className?: string;\n}\n\nfunction AppSidebarNavSub({\n label,\n badge,\n isActive = false,\n href,\n onClick,\n className,\n}: AppSidebarNavSubProps) {\n const accessibleLabel = formatAccessibleLabel(label, badge);\n\n const itemClassName = cn(\n navItemVariants({ state: isActive ? 'active' : 'default' }),\n 'min-h-11 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',\n 'transition-[color,background-color,transform] ltr:hover:translate-x-0.5 rtl:hover:-translate-x-0.5 motion-reduce:ltr:hover:translate-x-0 motion-reduce:rtl:hover:translate-x-0',\n className,\n );\n\n const ariaProps = isActive ? { 'aria-current': 'page' as const } : {};\n\n const content = (\n <>\n <span className=\"flex-1 text-start\">{label}</span>\n {badge != null && (\n <Badge\n size=\"sm\"\n variant=\"soft\"\n color=\"primary\"\n className=\"px-1.5\"\n aria-hidden=\"true\"\n >\n {badge}\n </Badge>\n )}\n </>\n );\n\n if (href) {\n return (\n <a\n href={href}\n className={itemClassName}\n aria-label={accessibleLabel}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-sub\"\n >\n {content}\n </a>\n );\n }\n\n return (\n <button\n type=\"button\"\n onClick={onClick}\n className={cn(itemClassName, 'cursor-pointer delight-selection-press')}\n aria-label={accessibleLabel}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-sub\"\n >\n {content}\n </button>\n );\n}\nAppSidebarNavSub.displayName = 'AppSidebar.NavSub';\n\n// ============================================\n// Nav Skeleton\n// ============================================\n\nexport interface AppSidebarNavSkeletonProps {\n /** Number of skeleton items to show */\n count?: number;\n className?: string;\n}\n\nfunction AppSidebarNavSkeleton({\n count = 3,\n className,\n}: AppSidebarNavSkeletonProps) {\n const skeletonCount = getSkeletonCount(count, 3);\n\n return (\n <SidebarGroup\n className={cn(\n 'shrink-0 p-0 group-data-[collapsible=icon]:w-auto',\n className,\n )}\n >\n <SidebarGroupContent>\n <SidebarMenu className=\"gap-0.5 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:gap-2\">\n {Array.from({ length: skeletonCount }).map((_, i) => (\n <SidebarMenuItem key={`nav-skeleton-${i}`}>\n <SidebarNavSkeleton />\n </SidebarMenuItem>\n ))}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n );\n}\n\nAppSidebarNavSkeleton.displayName = 'AppSidebar.NavSkeleton';\nmarkAppSidebarImplicitSlot(AppSidebarNavSkeleton, 'content');\n\n// ============================================\n// Chat List Component\n// ============================================\n\nexport interface AppSidebarChatListProps {\n /** Section label */\n label?: string;\n children?: React.ReactNode;\n className?: string;\n}\n\nfunction AppSidebarChatList({\n label = 'Recent Chats',\n children,\n className,\n}: AppSidebarChatListProps) {\n const { state } = useSidebar();\n const isCollapsed = state === 'collapsed';\n\n // Collapsed state doesn't show chat list\n if (isCollapsed) {\n return null;\n }\n\n return (\n <SidebarGroup\n data-slot=\"app-sidebar-chat-list\"\n className={cn('mt-4 flex min-h-0 flex-1 flex-col p-0', className)}\n >\n <SidebarGroupLabel className=\"shrink-0 px-3 py-1 text-xs font-bold text-muted-foreground\">\n {label}\n </SidebarGroupLabel>\n <SidebarGroupContent className=\"flex-1 overflow-hidden\">\n <div\n className=\"flex h-full flex-col overflow-y-auto pb-5 rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n tabIndex={0}\n role=\"list\"\n aria-label={label}\n >\n {children}\n </div>\n </SidebarGroupContent>\n </SidebarGroup>\n );\n}\n\nAppSidebarChatList.displayName = 'AppSidebar.ChatList';\nmarkAppSidebarImplicitSlot(AppSidebarChatList, 'content');\n\n// ============================================\n// Chat Item Component\n// ============================================\n\nconst chatItemVariants = cva(\n 'flex w-full items-center justify-between gap-2 rounded-md px-3 py-2 min-h-11 transition-[color,background-color,transform] duration-200 ease-smooth cursor-pointer motion-reduce:transition-none ltr:hover:translate-x-0.5 rtl:hover:-translate-x-0.5 motion-reduce:ltr:hover:translate-x-0 motion-reduce:rtl:hover:translate-x-0',\n {\n variants: {\n state: {\n default: 'hover:bg-muted',\n hover: 'bg-muted',\n selected: 'bg-primary/10',\n },\n },\n defaultVariants: {\n state: 'default',\n },\n },\n);\n\nexport interface AppSidebarChatItemProps\n extends VariantProps<typeof chatItemVariants> {\n /** Chat title */\n title: string;\n /** Time indicator (e.g., \"12h ago\") */\n time?: string;\n /** Icon for collapsed view (defaults to chat bubble) */\n icon?: React.ReactNode;\n /** Whether this chat is selected */\n isSelected?: boolean;\n /** Click handler */\n onClick?: () => void;\n /** Context menu handler (right-click) */\n onContextMenu?: (event: React.MouseEvent) => void;\n /** Additional className */\n className?: string;\n}\n\nfunction AppSidebarChatItem({\n title,\n time,\n icon,\n isSelected = false,\n onClick,\n onContextMenu,\n className,\n}: AppSidebarChatItemProps) {\n const { state } = useSidebar();\n const { side: sidebarSide } = useAppSidebarLayout();\n const isCollapsed = state === 'collapsed';\n const tooltipSide = sidebarSide === 'right' ? 'left' : 'right';\n\n if (isCollapsed) {\n const collapsedButton = (\n <button\n type=\"button\"\n onClick={onClick}\n onContextMenu={onContextMenu}\n data-slot=\"app-sidebar-chat-item\"\n aria-label={title || undefined}\n className={cn(\n 'flex size-11 items-center justify-center rounded-md transition-colors duration-200 ease-smooth motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',\n isSelected ? 'bg-primary/10' : 'hover:bg-muted',\n className,\n )}\n >\n {icon || <MessageCircle className=\"size-5 text-secondary-foreground\" />}\n </button>\n );\n\n if (!title && !time) {\n return collapsedButton;\n }\n\n return (\n <Tooltip>\n <TooltipTrigger render={collapsedButton} />\n <TooltipPopup side={tooltipSide} sideOffset={8}>\n <div className=\"flex flex-col\">\n <span className=\"font-medium\">{title}</span>\n {time && (\n <span className=\"text-xs text-muted-foreground\">{time}</span>\n )}\n </div>\n </TooltipPopup>\n </Tooltip>\n );\n }\n\n return (\n <div role=\"listitem\">\n <button\n type=\"button\"\n onClick={onClick}\n onContextMenu={onContextMenu}\n data-slot=\"app-sidebar-chat-item\"\n aria-label={title}\n className={cn(\n chatItemVariants({ state: isSelected ? 'selected' : 'default' }),\n 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',\n className,\n )}\n >\n <span className=\"text-base font-semibold text-secondary-foreground truncate\">\n {title}\n </span>\n {time && (\n <span className=\"text-xs font-normal text-muted-foreground shrink-0\">\n {time}\n </span>\n )}\n </button>\n </div>\n );\n}\n\nAppSidebarChatItem.displayName = 'AppSidebar.ChatItem';\n\n// ============================================\n// Chat List Skeleton\n// ============================================\n\nexport interface AppSidebarChatListSkeletonProps {\n /** Number of skeleton items to show */\n count?: number;\n /** Section label */\n label?: string;\n className?: string;\n}\n\nfunction AppSidebarChatListSkeleton({\n count = 5,\n label = 'Recent Chats',\n className,\n}: AppSidebarChatListSkeletonProps) {\n const skeletonCount = getSkeletonCount(count, 5);\n\n return (\n <SidebarGroup\n className={cn(\n 'mt-4 flex min-h-0 flex-1 flex-col p-0 group-data-[collapsible=icon]:hidden',\n className,\n )}\n >\n <SidebarGroupLabel className=\"shrink-0 px-3 py-1 text-xs font-bold text-muted-foreground\">\n {label}\n </SidebarGroupLabel>\n <SidebarGroupContent className=\"flex-1 overflow-hidden\">\n <div className=\"flex h-full flex-col overflow-y-auto pb-5\">\n {Array.from({ length: skeletonCount }).map((_, i) => (\n <SidebarMenuSkeleton key={`chat-skeleton-${i}`} />\n ))}\n </div>\n </SidebarGroupContent>\n </SidebarGroup>\n );\n}\n\nAppSidebarChatListSkeleton.displayName = 'AppSidebar.ChatListSkeleton';\nmarkAppSidebarImplicitSlot(AppSidebarChatListSkeleton, 'content');\n\n// ============================================\n// Account Component\n// ============================================\n\nexport interface AppSidebarAccountProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** User's name */\n name: string;\n /** Subtitle text (e.g., email, role) */\n subtitle?: string;\n /** User's avatar URL */\n avatarSrc?: string;\n /** Whether user is online */\n isOnline?: boolean;\n /** Click handler for the expand button */\n onExpand?: () => void;\n}\n\nfunction AppSidebarAccount({\n name,\n subtitle,\n avatarSrc,\n isOnline = false,\n onExpand,\n className,\n}: AppSidebarAccountProps) {\n const { state } = useSidebar();\n const { side: sidebarSide } = useAppSidebarLayout();\n const isCollapsed = state === 'collapsed';\n const tooltipSide = sidebarSide === 'right' ? 'left' : 'right';\n\n if (isCollapsed) {\n const avatarButton = (\n <button\n type=\"button\"\n onClick={onExpand}\n data-slot=\"app-sidebar-account\"\n aria-label={name ? `${name} account menu` : 'Account menu'}\n aria-haspopup=\"true\"\n className={cn(\n 'flex min-h-11 min-w-11 items-center justify-center rounded-lg transition-opacity duration-200 ease-smooth hover:opacity-80 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none',\n className,\n )}\n >\n <Avatar\n src={avatarSrc}\n alt={name}\n fallback={name}\n size=\"sm\"\n className=\"size-[42px]\"\n indicator={isOnline ? 'online' : undefined}\n />\n </button>\n );\n\n if (!name && !subtitle) return avatarButton;\n\n return (\n <Tooltip>\n <TooltipTrigger render={avatarButton} />\n <TooltipPopup side={tooltipSide} sideOffset={8}>\n <div className=\"flex flex-col\">\n {name && <span className=\"font-medium\">{name}</span>}\n {subtitle && (\n <span className=\"text-xs text-muted-foreground\">{subtitle}</span>\n )}\n </div>\n </TooltipPopup>\n </Tooltip>\n );\n }\n\n return (\n <button\n type=\"button\"\n onClick={onExpand}\n data-slot=\"app-sidebar-account\"\n aria-label={name ? `${name} account menu` : 'Account menu'}\n aria-haspopup=\"true\"\n className={cn(\n 'flex w-full items-center gap-1.5 rounded-lg px-1 py-2 transition-colors duration-200 ease-smooth hover:bg-sidebar-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none',\n className,\n )}\n >\n <Avatar\n src={avatarSrc}\n alt={name}\n fallback={name}\n size=\"sm\"\n className=\"size-[42px]\"\n indicator={isOnline ? 'online' : undefined}\n />\n <div className=\"flex flex-1 flex-col items-start overflow-hidden\">\n <span className=\"w-full truncate text-start text-sm font-medium text-sidebar-foreground\">\n {name}\n </span>\n {subtitle && (\n <span className=\"w-full truncate text-start text-xs font-light text-sidebar-foreground\">\n {subtitle}\n </span>\n )}\n </div>\n </button>\n );\n}\n\nAppSidebarAccount.displayName = 'AppSidebar.Account';\nmarkAppSidebarImplicitSlot(AppSidebarAccount, 'footer');\n\n// ============================================\n// Account Skeleton\n// ============================================\n\nfunction AppSidebarAccountSkeleton({ className }: { className?: string }) {\n return <SidebarAccountSkeleton className={className} />;\n}\n\nAppSidebarAccountSkeleton.displayName = 'AppSidebar.AccountSkeleton';\nmarkAppSidebarImplicitSlot(AppSidebarAccountSkeleton, 'footer');\n\n// ============================================\n// Full Sidebar Skeleton\n// ============================================\n\nexport interface AppSidebarSkeletonProps {\n /** Number of nav skeleton items */\n navCount?: number;\n /** Number of chat skeleton items */\n chatCount?: number;\n /** Logo element */\n logo?: React.ReactNode;\n /** Icon to show when sidebar is compacted. Defaults to Humain logomark. */\n compactedLogo?: React.ReactNode;\n /** Collapsible mode */\n collapsible?: 'offcanvas' | 'icon' | 'none';\n /** Side of the screen */\n side?: 'left' | 'right';\n /** Whether to round sidebar corners */\n rounded?: boolean;\n /** Custom background color class for the sidebar (e.g., 'bg-card') */\n sidebarBgColor?: string;\n className?: string;\n}\n\nfunction AppSidebarSkeleton({\n navCount = 4,\n chatCount = 5,\n logo,\n compactedLogo,\n collapsible = 'icon',\n side,\n rounded = false,\n sidebarBgColor,\n className,\n}: AppSidebarSkeletonProps) {\n const { state, containerRef } = useSidebar();\n const isCollapsed = state === 'collapsed';\n const resolvedSide = useResolvedAppSidebarSide({\n containerRef,\n explicitSide: side,\n });\n\n const bgClass = getSidebarBgClass(isCollapsed, sidebarBgColor);\n\n return (\n <Sidebar\n collapsible={collapsible}\n side={resolvedSide}\n width={APP_SIDEBAR_WIDTH}\n collapsedWidth={APP_SIDEBAR_COLLAPSED_WIDTH}\n className={cn('bg-transparent', className)}\n >\n <div\n data-slot=\"app-sidebar-surface\"\n className={getSidebarSurfaceClass({\n isCollapsed,\n side: resolvedSide,\n rounded,\n backgroundClass: bgClass,\n })}\n >\n <SidebarHeader className=\"h-[68px] w-full p-2\">\n <AppSidebarLogo logo={logo} compactedLogo={compactedLogo} />\n </SidebarHeader>\n\n <SidebarContent className=\"flex w-full flex-col gap-0 overflow-hidden pt-3 group-data-[collapsible=icon]:items-center\">\n <AppSidebarNavSkeleton count={navCount} />\n <AppSidebarChatListSkeleton count={chatCount} />\n </SidebarContent>\n\n <SidebarFooter className=\"w-full gap-0 p-0 group-data-[collapsible=icon]:items-center\">\n <AppSidebarAccountSkeleton />\n </SidebarFooter>\n </div>\n </Sidebar>\n );\n}\n\nAppSidebarSkeleton.displayName = 'AppSidebar.Skeleton';\n\n// ============================================\n// Main App Sidebar\n// ============================================\n\nexport interface AppSidebarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Logo element or configuration */\n logo?: React.ReactNode;\n /** Icon to show when sidebar is compacted. Defaults to Humain logomark. */\n compactedLogo?: React.ReactNode;\n /** Subtext displayed below the logo (e.g., \"Dashboard\"). Hidden when collapsed. */\n logoSubtext?: string;\n /** Collapsible mode - 'icon' shows only icons when collapsed, 'none' disables collapsing */\n collapsible?: 'offcanvas' | 'icon' | 'none';\n /** Side of the screen. When omitted, resolves from the nearest DOM direction. */\n side?: 'left' | 'right';\n /** Whether to round sidebar corners */\n rounded?: boolean;\n /** Custom background color class for the sidebar (e.g., 'bg-card'). Defaults to the sidebar token when expanded, bg-transparent when collapsed. */\n sidebarBgColor?: string;\n /** Children (compound components) */\n children?: React.ReactNode;\n}\n\n/**\n * AppSidebar is a full-featured application sidebar with navigation, chat list, and account sections.\n * Supports collapsible modes with a unified logo toggle and loading skeletons.\n *\n * @llms Full-featured app sidebar with nav, chat list, account, collapsible modes\n * @example\n * ```tsx\n * <AppSidebar logo={<Logo />} collapsible=\"icon\">\n * <AppSidebar.Nav>\n * <AppSidebar.NavItem icon={<Home />} label=\"Home\" isActive />\n * </AppSidebar.Nav>\n * <AppSidebar.ChatList>\n * <AppSidebar.ChatItem title=\"Chat 1\" />\n * </AppSidebar.ChatList>\n * <AppSidebar.Account name=\"User\" subtitle=\"user@example.com\" />\n * </AppSidebar>\n * ```\n */\nfunction AppSidebarRoot({\n logo,\n compactedLogo,\n logoSubtext,\n collapsible = 'icon',\n side,\n rounded = false,\n sidebarBgColor,\n className,\n children,\n dir,\n ...props\n}: AppSidebarProps) {\n const { state, containerRef } = useSidebar();\n const isCollapsed = state === 'collapsed';\n const resolvedSide = useResolvedAppSidebarSide({\n containerRef,\n explicitDir: dir,\n explicitSide: side,\n });\n\n const bgClass = getSidebarBgClass(isCollapsed, sidebarBgColor);\n\n const slots = useSlotChildren(children);\n\n return (\n <AppSidebarLayoutContext.Provider value={{ side: resolvedSide }}>\n <Sidebar\n collapsible={collapsible}\n side={resolvedSide}\n width={APP_SIDEBAR_WIDTH}\n collapsedWidth={APP_SIDEBAR_COLLAPSED_WIDTH}\n dir={dir}\n className={cn('bg-transparent', className)}\n {...props}\n >\n <div\n data-slot=\"app-sidebar-surface\"\n className={getSidebarSurfaceClass({\n isCollapsed,\n side: resolvedSide,\n rounded,\n backgroundClass: bgClass,\n })}\n >\n <SidebarHeader className=\"h-[68px] w-full p-2\">\n <AppSidebarLogo\n logo={logo}\n compactedLogo={compactedLogo}\n subtext={logoSubtext}\n />\n </SidebarHeader>\n\n <SidebarContent className=\"flex w-full flex-col gap-0 overflow-hidden pt-3 group-data-[collapsible=icon]:items-center\">\n {slots.explicitContent\n ? (slots.explicitContent.props as AppSidebarSlotProps).children\n : slots.content}\n </SidebarContent>\n\n <SidebarFooter className=\"w-full gap-0 p-0 group-data-[collapsible=icon]:items-center\">\n {slots.explicitFooter\n ? (slots.explicitFooter.props as AppSidebarSlotProps).children\n : slots.footer}\n </SidebarFooter>\n </div>\n </Sidebar>\n </AppSidebarLayoutContext.Provider>\n );\n}\n\nAppSidebarRoot.displayName = 'AppSidebar';\n\n// ============================================\n// Compound Component Export\n// ============================================\n\nexport const AppSidebar = Object.assign(AppSidebarRoot, {\n Header: AppSidebarHeader,\n Content: AppSidebarContent,\n Footer: AppSidebarFooter,\n Nav: AppSidebarNav,\n NavSection: AppSidebarNavSection,\n NavItem: AppSidebarNavItem,\n NavSub: AppSidebarNavSub,\n NavSkeleton: AppSidebarNavSkeleton,\n ChatList: AppSidebarChatList,\n ChatItem: AppSidebarChatItem,\n ChatListSkeleton: AppSidebarChatListSkeleton,\n Account: AppSidebarAccount,\n AccountSkeleton: AppSidebarAccountSkeleton,\n Skeleton: AppSidebarSkeleton,\n});\n\n// ============================================\n// Type Exports\n// ============================================\n\n// Re-export mobile detection utilities for client use\nexport { MOBILE_BREAKPOINT, useIsMobile } from '@/hooks/use-mobile';\nexport type {\n AppSidebarAccountProps as AccountProps,\n AppSidebarChatItemProps as ChatItemProps,\n AppSidebarChatListProps as ChatListProps,\n AppSidebarChatListSkeletonProps as ChatListSkeletonProps,\n AppSidebarNavItemProps as NavItemProps,\n AppSidebarNavProps as NavProps,\n AppSidebarNavSectionProps as NavSectionProps,\n AppSidebarNavSkeletonProps as NavSkeletonProps,\n AppSidebarNavSubProps as NavSubProps,\n AppSidebarSkeletonProps as SkeletonProps,\n AppSidebarSlotProps as SlotProps,\n};\n// Re-export sidebar primitives for custom compositions\nexport {\n chatItemVariants,\n navItemVariants,\n // Re-export base components for advanced usage\n Sidebar,\n SidebarAccountSkeleton,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarNavSkeleton,\n SidebarProvider,\n SidebarTrigger,\n useSidebar,\n};\n","/**\n * Web Component wrapper for AppSidebar (hand-crafted WC adapter).\n * Custom element: <hf-app-sidebar>\n *\n * @generated by scripts/generate-wc-components.ts\n * DO NOT EDIT MANUALLY\n */\n\nimport {\n Calendar,\n Circle,\n FileText,\n Home,\n type LucideIcon,\n MessageCircle,\n Settings,\n Users,\n Workflow,\n} from 'lucide-react';\nimport React from 'react';\nimport { AppSidebar } from '../components';\nimport { SidebarInset, SidebarProvider } from '../components/ui/sidebar';\nimport {\n asArray,\n BaseCompoundWC,\n camelToKebab,\n dispatchEvent,\n installPropAccessors,\n type PropDefs,\n portalNode,\n registerWC,\n} from './_shared';\n\nconst PROP_DEFS: PropDefs = {\n navItems: 'json',\n activeNavItemId: 'string',\n account: 'json',\n logo: 'json',\n collapsible: 'string',\n connected: 'boolean',\n defaultOpen: 'boolean',\n side: 'string',\n compactedLogo: 'string',\n sidebarBgColor: 'string',\n rounded: 'boolean',\n logoSubtext: 'string',\n};\n\ntype NavSubItemDef = {\n label: string;\n badge?: string | number;\n href?: string;\n isActive?: boolean;\n};\n\ntype NavItemDef = {\n type?: 'item';\n id: string;\n icon?: string;\n label: string;\n isActive?: boolean;\n badge?: string | number;\n href?: string;\n children?: NavSubItemDef[];\n};\n\ntype NavSectionDef = {\n type: 'section';\n id?: string;\n label: string;\n};\n\ntype NavEntryDef = NavItemDef | NavSectionDef;\n\ntype LogoDef = {\n src?: string;\n alt?: string;\n};\n\nconst SIDEBAR_ICON_COMPONENTS: Record<string, LucideIcon> = {\n home: Home,\n users: Users,\n calendar: Calendar,\n 'file-text': FileText,\n settings: Settings,\n 'message-circle': MessageCircle,\n workflow: Workflow,\n};\n\nconst warnedUnsupportedIconNames = new Set<string>();\n\nfunction normalizeIconName(iconName: string | undefined): string | undefined {\n const normalizedIconName = iconName\n ?.trim()\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .replace(/[\\s_]+/g, '-')\n .toLowerCase();\n\n return normalizedIconName || undefined;\n}\n\nfunction renderNavIcon(iconName: string | undefined): React.ReactElement {\n const normalizedIconName = normalizeIconName(iconName);\n\n if (normalizedIconName) {\n const Icon = SIDEBAR_ICON_COMPONENTS[normalizedIconName];\n\n if (Icon) {\n return React.createElement(Icon, { 'aria-hidden': true });\n }\n\n if (!warnedUnsupportedIconNames.has(normalizedIconName)) {\n warnedUnsupportedIconNames.add(normalizedIconName);\n console.warn(\n `[hf-app-sidebar] Unsupported nav item icon \"${normalizedIconName}\". Falling back to \"circle\".`,\n );\n }\n }\n\n return React.createElement(Circle, { 'aria-hidden': true });\n}\n\nfunction isNavSection(item: NavEntryDef): item is NavSectionDef {\n return item.type === 'section';\n}\n\nfunction renderLogoImage(\n logo: LogoDef | undefined,\n fallbackAlt: string,\n): React.ReactElement | null | undefined {\n if (!logo) {\n return undefined;\n }\n\n if (!logo.src) {\n return null;\n }\n\n return React.createElement('img', {\n src: logo.src,\n alt: logo.alt || fallbackAlt,\n });\n}\n\nclass AppSidebarWC extends BaseCompoundWC {\n get propDefs() {\n return PROP_DEFS;\n }\n\n static get observedAttributes() {\n return Object.keys(PROP_DEFS).map(camelToKebab);\n }\n\n protected _renderReact(): React.ReactElement {\n const props = this._readAllProps();\n const contentSlot = this._getSlot('content');\n\n const navItems = asArray<NavEntryDef>(props.navItems);\n\n const account = props.account as\n | {\n name: string;\n subtitle: string;\n avatarSrc?: string;\n isOnline?: boolean;\n }\n | undefined;\n\n const logo = props.logo as LogoDef | undefined;\n const compactedLogo = props.compactedLogo\n ? renderLogoImage(\n { src: String(props.compactedLogo), alt: logo?.alt },\n logo?.alt || 'Logo',\n )\n : undefined;\n const host = this;\n\n function handleNavItemClick(item: { id: string; label: string }): void {\n dispatchEvent(host, 'nav-item-click', item);\n }\n\n function handleOpenChange(open: boolean): void {\n dispatchEvent(host, 'open-change', open);\n }\n\n const sidebarChildren: React.ReactElement[] = [];\n\n sidebarChildren.push(\n React.createElement(\n AppSidebar,\n {\n key: 'sidebar',\n collapsible:\n (props.collapsible as 'offcanvas' | 'icon' | 'none') || 'icon',\n side: (props.side as 'left' | 'right') || 'left',\n rounded: props.rounded as boolean,\n sidebarBgColor: props.sidebarBgColor as string,\n logoSubtext: props.logoSubtext as string,\n logo: renderLogoImage(logo, 'Logo'),\n compactedLogo,\n },\n navItems.length > 0 &&\n React.createElement(\n AppSidebar.Nav,\n { key: 'nav' },\n ...navItems.map((item, index) => {\n if (isNavSection(item)) {\n return React.createElement(AppSidebar.NavSection, {\n key: item.id || `section-${index}`,\n label: item.label,\n });\n }\n\n return React.createElement(\n AppSidebar.NavItem,\n {\n key: item.id,\n icon: renderNavIcon(item.icon),\n label: item.label,\n isActive: item.isActive || item.id === props.activeNavItemId,\n badge: item.badge,\n href: item.href,\n onClick: () => handleNavItemClick(item),\n },\n ...(item.children\n ? item.children.map((child, idx) =>\n React.createElement(AppSidebar.NavSub, {\n key: `${item.id}-sub-${idx}`,\n label: child.label,\n badge: child.badge,\n href: child.href,\n isActive: child.isActive,\n }),\n )\n : []),\n );\n }),\n ),\n account &&\n React.createElement(AppSidebar.Account, {\n key: 'account',\n name: account.name,\n subtitle: account.subtitle,\n avatarSrc: account.avatarSrc,\n isOnline: account.isOnline,\n }),\n ),\n );\n\n if (contentSlot) {\n sidebarChildren.push(\n React.createElement(\n SidebarInset,\n { key: 'inset', connected: props.connected as boolean },\n portalNode(contentSlot),\n ),\n );\n }\n\n return React.createElement(\n SidebarProvider,\n {\n defaultOpen: (props.defaultOpen as boolean) ?? false,\n onOpenChange: handleOpenChange,\n connected: props.connected as boolean,\n },\n ...sidebarChildren,\n );\n }\n}\n\ninstallPropAccessors(AppSidebarWC, PROP_DEFS);\nregisterWC('hf-app-sidebar', AppSidebarWC);\n\nexport { AppSidebarWC };\nexport default AppSidebarWC;\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ;AAAA,IAAE,OAAO;AAAA,IAAM,QAAQ;AAAA,IAAM,GAAG;AAAA,IAAK,GAAG;AAAA,IAAK,IAAI;AAAA,IAAK,KAAK;AAAA,EAAS,CAAC;AAAA,EAC9E,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAW,KAAK;AAAA,EAAS,CAAC;AAAA,EACxC,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAkB,KAAK;AAAA,EAAS,CAAC;AACjD,GACM,KAAiB,EAAiB,oBAAoBA,EAAU,GCLhEC,KAAa;AAAA,EACjB,CAAC,QAAQ;AAAA,IAAE,OAAO;AAAA,IAAM,QAAQ;AAAA,IAAM,GAAG;AAAA,IAAK,GAAG;AAAA,IAAK,IAAI;AAAA,IAAK,KAAK;AAAA,EAAS,CAAC;AAAA,EAC9E,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAW,KAAK;AAAA,EAAS,CAAC;AAAA,EACxC,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAiB,KAAK;AAAA,EAAS,CAAC;AAChD,GACM,KAAgB,EAAiB,mBAAmBA,EAAU,GCL9D,KAAa;AAAA,EACjB,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAA6C,KAAK;AAAA,EAAS,CAAC;AAAA,EAC1E,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAA+B,KAAK;AAAA,EAAS,CAAC;AAAA,EAC5D,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAA8B,K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AA,MACZ,UAAU,EAAK,YAAY,EAAK,OAAO,EAAM;AAAA,MAC7C,OAAO,EAAK;AAAA,MACZ,MAAM,EAAK;AAAA,MACX,SAAA,MAAe,EAAmB,CAAI;AAAA,IACxC,GACA,GAAI,EAAK,WACL,EAAK,SAAS,IAAA,CAAK,GAAO,MACxB,EAAM,cAAc,EAAW,QAAQ;AAAA,MACrC,KAAK,GAAG,EAAK,EAAA,QAAU,CAAA;AAAA,MACvB,OAAO,EAAM;AAAA,MACb,OAAO,EAAM;AAAA,MACb,MAAM,EAAM;AAAA,MACZ,UAAU,EAAM;AAAA,IAClB,CAAC,CACH,IACA,CAAC,CACP,CACD,CACH,GACF,KACE,EAAM,cAAc,EAAW,SAAS;AAAA,MACtC,KAAK;AAAA,MACL,MAAM,EAAQ;AAAA,MACd,UAAU,EAAQ;AAAA,MAClB,WAAW,EAAQ;AAAA,MACnB,UAAU,EAAQ;AAAA,IACpB,CAAC,CACL,CACF,GAEI,KACF,EAAgB,KACd,EAAM,cACJ,IACA;AAAA,MAAE,KAAK;AAAA,MAAS,WAAW,EAAM;AAAA,IAAqB,GACtD,GAAW,CAAW,CACxB,CACF,GAGK,EAAM,cACX,IACA;AAAA,MACE,aAAc,EAAM,eAA2B;AAAA,MAC/C,cAAc;AAAA,MACd,WAAW,EAAM;AAAA,IACnB,GACA,GAAG,CACL;AAAA,EACF;AACF;AAEA,GAAqB,IAAc,CAAS;AAC5C,GAAW,kBAAkB,EAAY"}
1
+ {"version":3,"file":"hf-app-sidebar.js","names":["__iconNode","__iconNode"],"sources":["../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/panel-left-close.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/panel-left-open.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/users.mjs","../../src/components/templates/AppSidebar/AppSidebar.tsx","../../src/wc/hf-app-sidebar.ts"],"sourcesContent":["/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }],\n [\"path\", { d: \"M9 3v18\", key: \"fh3hqa\" }],\n [\"path\", { d: \"m16 15-3-3 3-3\", key: \"14y99z\" }]\n];\nconst PanelLeftClose = createLucideIcon(\"panel-left-close\", __iconNode);\n\nexport { __iconNode, PanelLeftClose as default };\n//# sourceMappingURL=panel-left-close.mjs.map\n","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }],\n [\"path\", { d: \"M9 3v18\", key: \"fh3hqa\" }],\n [\"path\", { d: \"m14 9 3 3-3 3\", key: \"8010ee\" }]\n];\nconst PanelLeftOpen = createLucideIcon(\"panel-left-open\", __iconNode);\n\nexport { __iconNode, PanelLeftOpen as default };\n//# sourceMappingURL=panel-left-open.mjs.map\n","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\", key: \"1yyitq\" }],\n [\"path\", { d: \"M16 3.128a4 4 0 0 1 0 7.744\", key: \"16gr8j\" }],\n [\"path\", { d: \"M22 21v-2a4 4 0 0 0-3-3.87\", key: \"kshegd\" }],\n [\"circle\", { cx: \"9\", cy: \"7\", r: \"4\", key: \"nufk8\" }]\n];\nconst Users = createLucideIcon(\"users\", __iconNode);\n\nexport { __iconNode, Users as default };\n//# sourceMappingURL=users.mjs.map\n","/** biome-ignore-all lint/a11y/noNoninteractiveTabindex: ChatList uses tabIndex on scrollable div for keyboard scrolling */\n/** biome-ignore-all lint/a11y/useSemanticElements: NavSection uses role=\"separator\" on inner <div>; ChatList uses role=\"list\" on scrollable div */\n/** biome-ignore-all lint/a11y/useFocusableInteractive: Non-focusable separator per WAI-ARIA spec for decorative separators */\n/** biome-ignore-all lint/a11y/useAriaPropsForRole: Non-focusable separators don't require aria-valuenow per WAI-ARIA spec */\n/** biome-ignore-all lint/a11y/noNoninteractiveElementToInteractiveRole: role=\"separator\" on <div> inside list items for semantic section boundaries */\n\n'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n ChevronRight,\n MessageCircle,\n PanelLeftClose,\n PanelLeftOpen,\n} from 'lucide-react';\nimport * as React from 'react';\nimport { Badge } from '@/components/atoms/display/Badge';\nimport { Separator } from '@/components/atoms/layout/Separator';\nimport { Avatar } from '@/components/molecules/data/Avatar';\nimport { BrandIcon } from '@/components/molecules/data/BrandIcon';\nimport {\n PopoverPopup,\n PopoverRoot,\n PopoverTrigger,\n} from '@/components/organisms/overlays/Popover';\nimport {\n Sidebar,\n SidebarAccountSkeleton,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarNavSkeleton,\n SidebarProvider,\n SidebarTrigger,\n useSidebar,\n} from '@/components/ui/sidebar';\nimport { Tooltip, TooltipPopup, TooltipTrigger } from '@/components/ui/tooltip';\nimport { cn } from '@/lib/utils';\nimport {\n APP_SIDEBAR_COLLAPSED_WIDTH,\n APP_SIDEBAR_EXPANDED_WIDTH,\n} from './AppSidebar.constants';\n\nfunction formatAccessibleLabel(\n label: string,\n badge?: string | number | null,\n): string {\n if (badge == null) return label;\n return `${label}, ${typeof badge === 'number' ? `${badge} ${badge === 1 ? 'item' : 'items'}` : badge}`;\n}\n\nfunction getSidebarBgClass(\n isCollapsed: boolean,\n sidebarBgColor?: string,\n): string {\n return isCollapsed\n ? 'bg-transparent'\n : (sidebarBgColor ?? 'bg-[var(--sidebar)]');\n}\n\nfunction getSidebarSurfaceClass({\n isCollapsed,\n side,\n rounded,\n backgroundClass,\n}: {\n isCollapsed: boolean;\n side: AppSidebarSide;\n rounded: boolean;\n backgroundClass: string;\n}): string {\n return cn(\n 'flex h-full min-h-0 flex-col items-center pb-4 pt-6',\n isCollapsed\n ? 'w-full px-6'\n : [\n 'w-[calc(100%-0.75rem)] px-3',\n side === 'left' ? 'mr-3 self-start' : 'ml-3 self-end',\n ],\n backgroundClass,\n rounded && (side === 'left' ? 'rounded-r-lg' : 'rounded-l-lg'),\n );\n}\n\nfunction getSkeletonCount(count: number | undefined, fallback: number): number {\n return typeof count === 'number' && Number.isFinite(count) && count >= 0\n ? Math.floor(count)\n : fallback;\n}\n\n// ============================================\n// Slot Distribution Hook\n// ============================================\n\nconst APP_SIDEBAR_IMPLICIT_SLOT = Symbol('AppSidebarImplicitSlot');\n\ntype AppSidebarImplicitSlot = 'header' | 'content' | 'footer';\n\ninterface AppSidebarImplicitSlotComponent {\n [APP_SIDEBAR_IMPLICIT_SLOT]: AppSidebarImplicitSlot;\n}\n\ninterface AppSidebarWrappedComponent {\n type?: unknown;\n render?: unknown;\n}\n\nfunction markAppSidebarImplicitSlot<Component extends object>(\n component: Component,\n slot: AppSidebarImplicitSlot,\n): Component & AppSidebarImplicitSlotComponent {\n const slottedComponent = component as Component &\n AppSidebarImplicitSlotComponent;\n slottedComponent[APP_SIDEBAR_IMPLICIT_SLOT] = slot;\n return slottedComponent;\n}\n\nfunction isAppSidebarImplicitSlotComponent(\n value: unknown,\n): value is AppSidebarImplicitSlotComponent {\n return (\n (typeof value === 'function' ||\n (typeof value === 'object' && value !== null)) &&\n APP_SIDEBAR_IMPLICIT_SLOT in value\n );\n}\n\nfunction getAppSidebarImplicitSlot(\n childType: unknown,\n): AppSidebarImplicitSlot | undefined {\n if (isAppSidebarImplicitSlotComponent(childType)) {\n return childType[APP_SIDEBAR_IMPLICIT_SLOT];\n }\n\n if (typeof childType === 'object' && childType !== null) {\n const wrappedComponent = childType as AppSidebarWrappedComponent;\n return (\n getAppSidebarImplicitSlot(wrappedComponent.type) ??\n getAppSidebarImplicitSlot(wrappedComponent.render)\n );\n }\n\n return undefined;\n}\n\ntype SlotResult = {\n header: React.ReactNode[];\n content: React.ReactNode[];\n footer: React.ReactNode[];\n explicitHeader: React.ReactElement | null;\n explicitContent: React.ReactElement | null;\n explicitFooter: React.ReactElement | null;\n};\n\nfunction useSlotChildren(children: React.ReactNode): SlotResult {\n return React.useMemo(() => {\n const result: SlotResult = {\n header: [],\n content: [],\n footer: [],\n explicitHeader: null,\n explicitContent: null,\n explicitFooter: null,\n };\n\n React.Children.forEach(children, (child) => {\n if (!React.isValidElement(child)) return;\n\n const childType = child.type;\n\n // Check for explicit slot components\n if (childType === AppSidebarHeader) {\n result.explicitHeader = child;\n return;\n }\n if (childType === AppSidebarContent) {\n result.explicitContent = child;\n return;\n }\n if (childType === AppSidebarFooter) {\n result.explicitFooter = child;\n return;\n }\n\n // Distribute to slots based on explicit component-owned slot markers.\n const implicitSlot = getAppSidebarImplicitSlot(childType);\n if (implicitSlot === 'header') {\n result.header.push(child);\n } else if (implicitSlot === 'content') {\n result.content.push(child);\n } else if (implicitSlot === 'footer') {\n result.footer.push(child);\n } else {\n // Unknown children go to content by default\n result.content.push(child);\n }\n });\n\n return result;\n }, [children]);\n}\n\ntype AppSidebarSide = 'left' | 'right';\ntype AppSidebarDirection = 'ltr' | 'rtl';\n\nconst AppSidebarLayoutContext = React.createContext<{ side: AppSidebarSide }>({\n side: 'left',\n});\n\nfunction useAppSidebarLayout() {\n return React.useContext(AppSidebarLayoutContext);\n}\n\nfunction getAppSidebarDirection(\n element: HTMLElement | null,\n): AppSidebarDirection {\n const win = element?.ownerDocument.defaultView;\n if (!element || !win) return 'ltr';\n return win.getComputedStyle(element).direction === 'rtl' ? 'rtl' : 'ltr';\n}\n\nfunction normalizeAppSidebarDirection(\n dir: string | undefined,\n): AppSidebarDirection | undefined {\n return dir === 'rtl' || dir === 'ltr' ? dir : undefined;\n}\n\nfunction getAppSidebarSideFromDirection(\n direction: AppSidebarDirection,\n): AppSidebarSide {\n return direction === 'rtl' ? 'right' : 'left';\n}\n\nfunction getAppSidebarDirectionTargets(element: HTMLElement): Element[] {\n const targets = new Set<Element>();\n let current: Element | null = element;\n\n while (current) {\n targets.add(current);\n if (current === element.ownerDocument.documentElement) break;\n current = current.parentElement;\n }\n\n targets.add(element.ownerDocument.documentElement);\n if (element.ownerDocument.body) targets.add(element.ownerDocument.body);\n\n return Array.from(targets);\n}\n\nfunction useResolvedAppSidebarSide({\n containerRef,\n explicitDir,\n explicitSide,\n}: {\n containerRef: React.RefObject<HTMLDivElement | null>;\n explicitDir?: string;\n explicitSide?: AppSidebarSide;\n}): AppSidebarSide {\n const [detectedDirection, setDetectedDirection] =\n React.useState<AppSidebarDirection>(\n () => normalizeAppSidebarDirection(explicitDir) ?? 'ltr',\n );\n\n React.useEffect(() => {\n if (explicitSide) return;\n\n const normalizedExplicitDir = normalizeAppSidebarDirection(explicitDir);\n if (normalizedExplicitDir) {\n setDetectedDirection((current) =>\n current === normalizedExplicitDir ? current : normalizedExplicitDir,\n );\n return;\n }\n\n const container = containerRef.current;\n const win = container?.ownerDocument.defaultView;\n if (!container || !win) return;\n\n const detectDirection = () => {\n const nextDirection = getAppSidebarDirection(container);\n setDetectedDirection((current) =>\n current === nextDirection ? current : nextDirection,\n );\n };\n\n detectDirection();\n\n const Observer = win.MutationObserver;\n if (!Observer) return;\n\n const observer = new Observer(detectDirection);\n for (const target of getAppSidebarDirectionTargets(container)) {\n observer.observe(target, {\n attributes: true,\n attributeFilter: ['dir', 'class', 'style'],\n });\n }\n\n return () => observer.disconnect();\n }, [containerRef, explicitDir, explicitSide]);\n\n return explicitSide ?? getAppSidebarSideFromDirection(detectedDirection);\n}\n\n// ============================================\n// Sidebar Logo\n// ============================================\n\nexport interface AppSidebarLogoProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** Logo image or element */\n logo?: React.ReactNode;\n /** Icon to show when sidebar is compacted. Defaults to Humain logomark. */\n compactedLogo?: React.ReactNode;\n /** Subtext displayed below the logo (e.g., \"Dashboard\"). Hidden when collapsed. */\n subtext?: string;\n}\n\nconst DEFAULT_COMPACTED_LOGO = (\n <span className=\"flex size-9 items-center justify-center rounded-lg bg-primary text-primary-foreground\">\n <BrandIcon icon=\"mark\" size=\"sm\" />\n </span>\n);\n\nfunction AppSidebarLogo({\n logo,\n compactedLogo,\n subtext,\n className,\n ...props\n}: AppSidebarLogoProps) {\n const { state, toggleSidebar } = useSidebar();\n const isCollapsed = state === 'collapsed';\n const effectiveCompactedLogo = compactedLogo ?? DEFAULT_COMPACTED_LOGO;\n\n if (isCollapsed) {\n return (\n <div\n data-slot=\"app-sidebar-logo\"\n className={cn('flex items-center justify-center', className)}\n {...props}\n dir=\"ltr\"\n >\n <button\n type=\"button\"\n onClick={toggleSidebar}\n className=\"group/logo relative flex size-[52px] items-center justify-center rounded-md p-2 transition-colors duration-200 ease-smooth hover:bg-sidebar-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none\"\n aria-label=\"Expand sidebar\"\n >\n <span className=\"transition-opacity duration-200 ease-smooth group-hover/logo:opacity-0 motion-reduce:transition-none\">\n {effectiveCompactedLogo}\n </span>\n <PanelLeftOpen className=\"absolute size-5 opacity-0 transition-opacity duration-200 ease-smooth group-hover/logo:opacity-100 motion-reduce:transition-none\" />\n </button>\n </div>\n );\n }\n\n return (\n <div\n data-slot=\"app-sidebar-logo\"\n className={cn(\n 'flex h-[52px] items-center justify-between gap-2 rounded-md p-2',\n className,\n )}\n {...props}\n dir=\"ltr\"\n >\n <div className=\"flex min-w-0 flex-col gap-0\">\n <div className=\"flex items-center gap-2\">\n {logo || (\n <>\n {DEFAULT_COMPACTED_LOGO}\n <span className=\"text-lg font-semibold tracking-tight text-foreground\">\n HUMAIN\n </span>\n </>\n )}\n </div>\n {subtext && (\n <p className=\"ps-11 text-sm text-sidebar-foreground\">\n <span data-slot=\"app-sidebar-logo-subtext\">{subtext}</span>\n </p>\n )}\n </div>\n <button\n type=\"button\"\n onClick={toggleSidebar}\n className=\"relative flex size-9 items-center justify-center rounded-lg text-sidebar-foreground transition-colors duration-200 ease-smooth hover:bg-sidebar-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none after:absolute after:-inset-1\"\n aria-label=\"Collapse sidebar\"\n >\n <PanelLeftClose aria-hidden=\"true\" className=\"size-5\" />\n </button>\n </div>\n );\n}\n\nAppSidebarLogo.displayName = 'AppSidebar.Logo';\n\n// ============================================\n// Slot Components (Header, Content, Footer)\n// ============================================\n\nexport interface AppSidebarSlotProps {\n children?: React.ReactNode;\n className?: string;\n}\n\nfunction AppSidebarHeader({ children, className }: AppSidebarSlotProps) {\n return (\n <div data-slot=\"app-sidebar-header\" className={className}>\n {children}\n </div>\n );\n}\nAppSidebarHeader.displayName = 'AppSidebar.Header';\n\nfunction AppSidebarContent({ children, className }: AppSidebarSlotProps) {\n return (\n <div data-slot=\"app-sidebar-content\" className={className}>\n {children}\n </div>\n );\n}\nAppSidebarContent.displayName = 'AppSidebar.Content';\n\nfunction AppSidebarFooter({ children, className }: AppSidebarSlotProps) {\n return (\n <div data-slot=\"app-sidebar-footer\" className={className}>\n {children}\n </div>\n );\n}\nAppSidebarFooter.displayName = 'AppSidebar.Footer';\n\n// ============================================\n// Nav Component\n// ============================================\n\nexport interface AppSidebarNavProps {\n children?: React.ReactNode;\n /** Accessible label for the nav landmark (useful when multiple Nav instances exist) */\n 'aria-label'?: string;\n className?: string;\n}\n\nfunction AppSidebarNav({\n children,\n 'aria-label': ariaLabel = 'Sidebar navigation',\n className,\n}: AppSidebarNavProps) {\n const menuContent = (\n <SidebarMenu className=\"gap-0.5 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:gap-1\">\n {React.Children.map(children, (child) => (\n <SidebarMenuItem>{child}</SidebarMenuItem>\n ))}\n </SidebarMenu>\n );\n\n return (\n <SidebarGroup\n data-slot=\"app-sidebar-nav\"\n className={cn(\n 'shrink-0 p-0 group-data-[collapsible=icon]:w-auto',\n className,\n )}\n >\n <SidebarGroupContent>\n <nav aria-label={ariaLabel}>{menuContent}</nav>\n </SidebarGroupContent>\n </SidebarGroup>\n );\n}\n\nAppSidebarNav.displayName = 'AppSidebar.Nav';\nmarkAppSidebarImplicitSlot(AppSidebarNav, 'content');\n\n// ============================================\n// Nav Section (Group Label / Divider)\n// ============================================\n\nexport interface AppSidebarNavSectionProps {\n /** Section label shown when sidebar is expanded */\n label: string;\n /** Additional className */\n className?: string;\n}\n\nfunction AppSidebarNavSection({ label, className }: AppSidebarNavSectionProps) {\n return (\n <div\n data-slot=\"app-sidebar-nav-section\"\n role=\"separator\"\n aria-label={label}\n className={cn('py-2 group-data-[collapsible=icon]:w-[52px]', className)}\n >\n <div className=\"flex h-8 items-center px-2 group-data-[collapsible=icon]:hidden\">\n <span className=\"text-xs font-medium text-sidebar-foreground/80\">\n {label}\n </span>\n </div>\n <div className=\"hidden py-2 group-data-[collapsible=icon]:block\">\n <span className=\"sr-only\">{label}</span>\n <Separator className=\"mx-auto w-full\" />\n </div>\n </div>\n );\n}\n\nAppSidebarNavSection.displayName = 'AppSidebar.NavSection';\n\n// ============================================\n// Nav Item Component\n// ============================================\n\nconst navItemVariants = cva(\n 'relative flex w-full items-center gap-1.5 rounded-lg px-2 py-2 text-sm font-normal transition-[color,background-color] duration-200 ease-smooth motion-reduce:transition-none',\n {\n variants: {\n state: {\n default: 'text-sidebar-foreground hover:bg-sidebar-accent',\n active: 'bg-primary/10 text-sidebar-foreground',\n },\n },\n defaultVariants: {\n state: 'default',\n },\n },\n);\n\nexport interface AppSidebarNavItemProps {\n icon: React.ReactNode;\n label: string;\n isActive?: boolean;\n badge?: string | number;\n onClick?: () => void;\n href?: string;\n className?: string;\n /** Sub-navigation children (AppSidebar.NavSub items). When present, renders as collapsible parent. */\n children?: React.ReactNode;\n}\n\nfunction AppSidebarNavItem({\n icon,\n label,\n isActive = false,\n badge,\n onClick,\n href,\n className,\n children,\n}: AppSidebarNavItemProps) {\n const { state, containerRef } = useSidebar();\n const { side: sidebarSide } = useAppSidebarLayout();\n const isCollapsed = state === 'collapsed';\n const hasChildren = React.Children.count(children) > 0;\n const hasActiveChild = React.Children.toArray(children).some(\n (child) =>\n React.isValidElement<{ isActive?: boolean }>(child) &&\n child.props.isActive === true,\n );\n const isHighlighted = isActive || hasActiveChild;\n const [isOpen, setIsOpen] = React.useState(isHighlighted && hasChildren);\n const subNavId = React.useId();\n const floatingSide = sidebarSide === 'right' ? 'left' : 'right';\n const flyoutPanelBackground =\n 'linear-gradient(108deg, var(--opacity-white-87) 0.5219%, var(--opacity-white-75) 98.419%)';\n const flyoutFrameEdgeClassName =\n sidebarSide === 'right'\n ? 'justify-end rounded-l-xl rounded-r-none'\n : 'justify-start rounded-r-xl rounded-l-none';\n const flyoutPanelEdgeClassName =\n sidebarSide === 'right' ? 'rounded-l-xl' : 'rounded-r-xl';\n const flyoutAnchor = React.useMemo(\n () => ({\n getBoundingClientRect: () => {\n const container = containerRef.current;\n const rect = container?.getBoundingClientRect();\n const win = container?.ownerDocument.defaultView;\n const viewportHeight = win?.innerHeight ?? rect?.height ?? 0;\n const x = rect ? (sidebarSide === 'right' ? rect.left : rect.right) : 0;\n\n return {\n x,\n y: 0,\n top: 0,\n right: x,\n bottom: viewportHeight,\n left: x,\n width: 0,\n height: viewportHeight,\n };\n },\n }),\n [containerRef, sidebarSide],\n );\n\n React.useEffect(() => {\n if (isHighlighted && hasChildren) setIsOpen(true);\n }, [isHighlighted, hasChildren]);\n\n const accessibleLabel = formatAccessibleLabel(label, badge);\n\n const iconElement = (\n <span\n data-slot=\"nav-icon\"\n className=\"flex shrink-0 items-center p-0.5 [&>svg]:size-4\"\n >\n {icon}\n </span>\n );\n\n const labelElement = (\n <span className=\"flex-1 text-start group-data-[collapsible=icon]:hidden\">\n {label}\n </span>\n );\n\n const badgeElement = badge != null && (\n <Badge\n size=\"sm\"\n variant=\"soft\"\n color=\"primary\"\n className=\"px-1.5 group-data-[collapsible=icon]:hidden\"\n aria-hidden=\"true\"\n >\n {badge}\n </Badge>\n );\n\n const chevronElement = hasChildren && (\n <ChevronRight\n aria-hidden=\"true\"\n className={cn(\n 'size-4 shrink-0 text-muted-foreground transition-transform duration-200 ease-smooth group-data-[collapsible=icon]:hidden motion-reduce:transition-none',\n isOpen ? 'rotate-90' : 'rtl:rotate-180',\n isHighlighted && isOpen && 'text-primary',\n )}\n />\n );\n\n const itemClassName = cn(\n navItemVariants({ state: isHighlighted ? 'active' : 'default' }),\n 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',\n 'min-h-11 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0 group-data-[collapsible=icon]:py-2 group-data-[collapsible=icon]:w-11 group-data-[collapsible=icon]:h-11',\n className,\n );\n\n const ariaProps = isActive ? { 'aria-current': 'page' as const } : {};\n\n // --- Collapsed: icon-only with tooltip, flyout popover for children ---\n if (isCollapsed) {\n const collapsedIconElement = (\n <span\n data-slot=\"nav-icon\"\n className=\"flex shrink-0 items-center justify-center p-0.5 [&>svg]:size-4\"\n >\n {icon}\n </span>\n );\n\n const triggerElement = href ? (\n <a\n href={href}\n className={cn(itemClassName)}\n aria-label={accessibleLabel}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-item\"\n >\n {collapsedIconElement}\n </a>\n ) : (\n <button\n type=\"button\"\n onClick={hasChildren ? () => setIsOpen(!isOpen) : onClick}\n className={cn(itemClassName, 'cursor-pointer')}\n aria-label={accessibleLabel}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-item\"\n >\n {collapsedIconElement}\n </button>\n );\n\n if (!hasChildren) {\n if (!label) return triggerElement;\n return (\n <Tooltip>\n <TooltipTrigger render={triggerElement} />\n <TooltipPopup side={floatingSide} sideOffset={8}>\n {label}\n </TooltipPopup>\n </Tooltip>\n );\n }\n\n return (\n <PopoverRoot>\n <PopoverTrigger\n className={cn(itemClassName, 'cursor-pointer')}\n aria-label={accessibleLabel}\n data-slot=\"app-sidebar-nav-item\"\n >\n {collapsedIconElement}\n </PopoverTrigger>\n <PopoverPopup\n side={floatingSide}\n align=\"start\"\n sideOffset={0}\n alignOffset={0}\n anchor={flyoutAnchor}\n collisionAvoidance={{\n side: 'none',\n align: 'none',\n fallbackAxisSide: 'none',\n }}\n positionMethod=\"fixed\"\n aria-label={`${label} sub-navigation`}\n style={\n {\n '--app-sidebar-flyout-panel-bg': flyoutPanelBackground,\n } as React.CSSProperties\n }\n className={cn(\n 'flex h-[var(--anchor-height)] w-[276px] border-0 bg-transparent p-0 ring-0 shadow-none',\n 'overflow-clip',\n flyoutFrameEdgeClassName,\n )}\n >\n <div\n className={cn(\n 'flex h-full w-64 flex-col gap-0.5 overflow-y-auto p-3 shadow-[var(--shadow-hover-card)]',\n 'supports-backdrop-filter:backdrop-blur-[60px] [background-image:var(--app-sidebar-flyout-panel-bg)] delight-tooltip-stagger',\n flyoutPanelEdgeClassName,\n )}\n data-slot=\"app-sidebar-nav-flyout-panel\"\n role=\"group\"\n aria-label={label}\n >\n <p\n className=\"px-2 pb-2 pt-1 text-xs font-semibold text-primary opacity-70\"\n aria-hidden=\"true\"\n >\n {label}\n </p>\n {children}\n </div>\n </PopoverPopup>\n </PopoverRoot>\n );\n }\n\n // --- Expanded: full item with optional inline sub-nav ---\n const handleClick = () => {\n if (hasChildren) {\n setIsOpen(!isOpen);\n }\n onClick?.();\n };\n\n const mainElement =\n href && !hasChildren ? (\n <a\n href={href}\n className={itemClassName}\n aria-label={accessibleLabel}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-item\"\n >\n {iconElement}\n {labelElement}\n {badgeElement}\n {chevronElement}\n </a>\n ) : (\n <button\n type=\"button\"\n onClick={handleClick}\n className={cn(itemClassName, 'cursor-pointer')}\n aria-label={accessibleLabel}\n aria-expanded={hasChildren ? isOpen : undefined}\n aria-controls={hasChildren ? subNavId : undefined}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-item\"\n >\n {iconElement}\n {labelElement}\n {badgeElement}\n {chevronElement}\n </button>\n );\n\n if (!hasChildren) return mainElement;\n\n return (\n <>\n {mainElement}\n {isOpen && (\n <ul\n id={subNavId}\n role=\"group\"\n aria-label={`${label} sub-navigation`}\n className=\"ms-4 flex flex-col items-start border-s border-sidebar-border py-1 ps-2\"\n >\n {children}\n </ul>\n )}\n </>\n );\n}\n\nAppSidebarNavItem.displayName = 'AppSidebar.NavItem';\n\n// ============================================\n// Nav Sub Component\n// ============================================\n\nexport interface AppSidebarNavSubProps {\n label: string;\n badge?: string | number;\n isActive?: boolean;\n href?: string;\n onClick?: () => void;\n className?: string;\n}\n\nfunction AppSidebarNavSub({\n label,\n badge,\n isActive = false,\n href,\n onClick,\n className,\n}: AppSidebarNavSubProps) {\n const accessibleLabel = formatAccessibleLabel(label, badge);\n\n const itemClassName = cn(\n navItemVariants({ state: isActive ? 'active' : 'default' }),\n 'min-h-11 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',\n 'transition-[color,background-color,transform] ltr:hover:translate-x-0.5 rtl:hover:-translate-x-0.5 motion-reduce:ltr:hover:translate-x-0 motion-reduce:rtl:hover:translate-x-0',\n className,\n );\n\n const ariaProps = isActive ? { 'aria-current': 'page' as const } : {};\n\n const content = (\n <>\n <span className=\"flex-1 text-start\">{label}</span>\n {badge != null && (\n <Badge\n size=\"sm\"\n variant=\"soft\"\n color=\"primary\"\n className=\"px-1.5\"\n aria-hidden=\"true\"\n >\n {badge}\n </Badge>\n )}\n </>\n );\n\n if (href) {\n return (\n <a\n href={href}\n className={itemClassName}\n aria-label={accessibleLabel}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-sub\"\n >\n {content}\n </a>\n );\n }\n\n return (\n <button\n type=\"button\"\n onClick={onClick}\n className={cn(itemClassName, 'cursor-pointer delight-selection-press')}\n aria-label={accessibleLabel}\n {...ariaProps}\n data-slot=\"app-sidebar-nav-sub\"\n >\n {content}\n </button>\n );\n}\nAppSidebarNavSub.displayName = 'AppSidebar.NavSub';\n\n// ============================================\n// Nav Skeleton\n// ============================================\n\nexport interface AppSidebarNavSkeletonProps {\n /** Number of skeleton items to show */\n count?: number;\n className?: string;\n}\n\nfunction AppSidebarNavSkeleton({\n count = 3,\n className,\n}: AppSidebarNavSkeletonProps) {\n const skeletonCount = getSkeletonCount(count, 3);\n\n return (\n <SidebarGroup\n className={cn(\n 'shrink-0 p-0 group-data-[collapsible=icon]:w-auto',\n className,\n )}\n >\n <SidebarGroupContent>\n <SidebarMenu className=\"gap-0.5 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:gap-2\">\n {Array.from({ length: skeletonCount }).map((_, i) => (\n <SidebarMenuItem key={`nav-skeleton-${i}`}>\n <SidebarNavSkeleton />\n </SidebarMenuItem>\n ))}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n );\n}\n\nAppSidebarNavSkeleton.displayName = 'AppSidebar.NavSkeleton';\nmarkAppSidebarImplicitSlot(AppSidebarNavSkeleton, 'content');\n\n// ============================================\n// Chat List Component\n// ============================================\n\nexport interface AppSidebarChatListProps {\n /** Section label */\n label?: string;\n children?: React.ReactNode;\n className?: string;\n}\n\nfunction AppSidebarChatList({\n label = 'Recent Chats',\n children,\n className,\n}: AppSidebarChatListProps) {\n const { state } = useSidebar();\n const isCollapsed = state === 'collapsed';\n\n // Collapsed state doesn't show chat list\n if (isCollapsed) {\n return null;\n }\n\n return (\n <SidebarGroup\n data-slot=\"app-sidebar-chat-list\"\n className={cn('mt-4 flex min-h-0 flex-1 flex-col p-0', className)}\n >\n <SidebarGroupLabel className=\"shrink-0 px-3 py-1 text-xs font-bold text-muted-foreground\">\n {label}\n </SidebarGroupLabel>\n <SidebarGroupContent className=\"flex-1 overflow-hidden\">\n <div\n className=\"flex h-full flex-col overflow-y-auto pb-5 rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n tabIndex={0}\n role=\"list\"\n aria-label={label}\n >\n {children}\n </div>\n </SidebarGroupContent>\n </SidebarGroup>\n );\n}\n\nAppSidebarChatList.displayName = 'AppSidebar.ChatList';\nmarkAppSidebarImplicitSlot(AppSidebarChatList, 'content');\n\n// ============================================\n// Chat Item Component\n// ============================================\n\nconst chatItemVariants = cva(\n 'flex w-full items-center justify-between gap-2 rounded-md px-3 py-2 min-h-11 transition-[color,background-color,transform] duration-200 ease-smooth cursor-pointer motion-reduce:transition-none ltr:hover:translate-x-0.5 rtl:hover:-translate-x-0.5 motion-reduce:ltr:hover:translate-x-0 motion-reduce:rtl:hover:translate-x-0',\n {\n variants: {\n state: {\n default: 'hover:bg-muted',\n hover: 'bg-muted',\n selected: 'bg-primary/10',\n },\n },\n defaultVariants: {\n state: 'default',\n },\n },\n);\n\nexport interface AppSidebarChatItemProps\n extends VariantProps<typeof chatItemVariants> {\n /** Chat title */\n title: string;\n /** Time indicator (e.g., \"12h ago\") */\n time?: string;\n /** Icon for collapsed view (defaults to chat bubble) */\n icon?: React.ReactNode;\n /** Whether this chat is selected */\n isSelected?: boolean;\n /** Click handler */\n onClick?: () => void;\n /** Context menu handler (right-click) */\n onContextMenu?: (event: React.MouseEvent) => void;\n /** Additional className */\n className?: string;\n}\n\nfunction AppSidebarChatItem({\n title,\n time,\n icon,\n isSelected = false,\n onClick,\n onContextMenu,\n className,\n}: AppSidebarChatItemProps) {\n const { state } = useSidebar();\n const { side: sidebarSide } = useAppSidebarLayout();\n const isCollapsed = state === 'collapsed';\n const tooltipSide = sidebarSide === 'right' ? 'left' : 'right';\n\n if (isCollapsed) {\n const collapsedButton = (\n <button\n type=\"button\"\n onClick={onClick}\n onContextMenu={onContextMenu}\n data-slot=\"app-sidebar-chat-item\"\n aria-label={title || undefined}\n className={cn(\n 'flex size-11 items-center justify-center rounded-md transition-colors duration-200 ease-smooth motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',\n isSelected ? 'bg-primary/10' : 'hover:bg-muted',\n className,\n )}\n >\n {icon || <MessageCircle className=\"size-5 text-secondary-foreground\" />}\n </button>\n );\n\n if (!title && !time) {\n return collapsedButton;\n }\n\n return (\n <Tooltip>\n <TooltipTrigger render={collapsedButton} />\n <TooltipPopup side={tooltipSide} sideOffset={8}>\n <div className=\"flex flex-col\">\n <span className=\"font-medium\">{title}</span>\n {time && (\n <span className=\"text-xs text-muted-foreground\">{time}</span>\n )}\n </div>\n </TooltipPopup>\n </Tooltip>\n );\n }\n\n return (\n <div role=\"listitem\">\n <button\n type=\"button\"\n onClick={onClick}\n onContextMenu={onContextMenu}\n data-slot=\"app-sidebar-chat-item\"\n aria-label={title}\n className={cn(\n chatItemVariants({ state: isSelected ? 'selected' : 'default' }),\n 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',\n className,\n )}\n >\n <span className=\"text-base font-semibold text-secondary-foreground truncate\">\n {title}\n </span>\n {time && (\n <span className=\"text-xs font-normal text-muted-foreground shrink-0\">\n {time}\n </span>\n )}\n </button>\n </div>\n );\n}\n\nAppSidebarChatItem.displayName = 'AppSidebar.ChatItem';\n\n// ============================================\n// Chat List Skeleton\n// ============================================\n\nexport interface AppSidebarChatListSkeletonProps {\n /** Number of skeleton items to show */\n count?: number;\n /** Section label */\n label?: string;\n className?: string;\n}\n\nfunction AppSidebarChatListSkeleton({\n count = 5,\n label = 'Recent Chats',\n className,\n}: AppSidebarChatListSkeletonProps) {\n const skeletonCount = getSkeletonCount(count, 5);\n\n return (\n <SidebarGroup\n className={cn(\n 'mt-4 flex min-h-0 flex-1 flex-col p-0 group-data-[collapsible=icon]:hidden',\n className,\n )}\n >\n <SidebarGroupLabel className=\"shrink-0 px-3 py-1 text-xs font-bold text-muted-foreground\">\n {label}\n </SidebarGroupLabel>\n <SidebarGroupContent className=\"flex-1 overflow-hidden\">\n <div className=\"flex h-full flex-col overflow-y-auto pb-5\">\n {Array.from({ length: skeletonCount }).map((_, i) => (\n <SidebarMenuSkeleton key={`chat-skeleton-${i}`} />\n ))}\n </div>\n </SidebarGroupContent>\n </SidebarGroup>\n );\n}\n\nAppSidebarChatListSkeleton.displayName = 'AppSidebar.ChatListSkeleton';\nmarkAppSidebarImplicitSlot(AppSidebarChatListSkeleton, 'content');\n\n// ============================================\n// Account Component\n// ============================================\n\nexport interface AppSidebarAccountProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** User's name */\n name: string;\n /** Subtitle text (e.g., email, role) */\n subtitle?: string;\n /** User's avatar URL */\n avatarSrc?: string;\n /** Whether user is online */\n isOnline?: boolean;\n /** Click handler for the expand button */\n onExpand?: () => void;\n}\n\nfunction AppSidebarAccount({\n name,\n subtitle,\n avatarSrc,\n isOnline = false,\n onExpand,\n className,\n}: AppSidebarAccountProps) {\n const { state } = useSidebar();\n const { side: sidebarSide } = useAppSidebarLayout();\n const isCollapsed = state === 'collapsed';\n const tooltipSide = sidebarSide === 'right' ? 'left' : 'right';\n\n if (isCollapsed) {\n const avatarButton = (\n <button\n type=\"button\"\n onClick={onExpand}\n data-slot=\"app-sidebar-account\"\n aria-label={name ? `${name} account menu` : 'Account menu'}\n aria-haspopup=\"true\"\n className={cn(\n 'flex min-h-11 min-w-11 items-center justify-center rounded-lg transition-opacity duration-200 ease-smooth hover:opacity-80 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none',\n className,\n )}\n >\n <Avatar\n src={avatarSrc}\n alt={name}\n fallback={name}\n size=\"sm\"\n className=\"size-[42px]\"\n indicator={isOnline ? 'online' : undefined}\n />\n </button>\n );\n\n if (!name && !subtitle) return avatarButton;\n\n return (\n <Tooltip>\n <TooltipTrigger render={avatarButton} />\n <TooltipPopup side={tooltipSide} sideOffset={8}>\n <div className=\"flex flex-col\">\n {name && <span className=\"font-medium\">{name}</span>}\n {subtitle && (\n <span className=\"text-xs text-muted-foreground\">{subtitle}</span>\n )}\n </div>\n </TooltipPopup>\n </Tooltip>\n );\n }\n\n return (\n <button\n type=\"button\"\n onClick={onExpand}\n data-slot=\"app-sidebar-account\"\n aria-label={name ? `${name} account menu` : 'Account menu'}\n aria-haspopup=\"true\"\n className={cn(\n 'flex w-full items-center gap-1.5 rounded-lg px-1 py-2 transition-colors duration-200 ease-smooth hover:bg-sidebar-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none',\n className,\n )}\n >\n <Avatar\n src={avatarSrc}\n alt={name}\n fallback={name}\n size=\"sm\"\n className=\"size-[42px]\"\n indicator={isOnline ? 'online' : undefined}\n />\n <div className=\"flex flex-1 flex-col items-start overflow-hidden\">\n <span className=\"w-full truncate text-start text-sm font-medium text-sidebar-foreground\">\n {name}\n </span>\n {subtitle && (\n <span className=\"w-full truncate text-start text-xs font-light text-sidebar-foreground\">\n {subtitle}\n </span>\n )}\n </div>\n </button>\n );\n}\n\nAppSidebarAccount.displayName = 'AppSidebar.Account';\nmarkAppSidebarImplicitSlot(AppSidebarAccount, 'footer');\n\n// ============================================\n// Account Skeleton\n// ============================================\n\nfunction AppSidebarAccountSkeleton({ className }: { className?: string }) {\n return <SidebarAccountSkeleton className={className} />;\n}\n\nAppSidebarAccountSkeleton.displayName = 'AppSidebar.AccountSkeleton';\nmarkAppSidebarImplicitSlot(AppSidebarAccountSkeleton, 'footer');\n\n// ============================================\n// Full Sidebar Skeleton\n// ============================================\n\nexport interface AppSidebarSkeletonProps {\n /** Number of nav skeleton items */\n navCount?: number;\n /** Number of chat skeleton items */\n chatCount?: number;\n /** Logo element */\n logo?: React.ReactNode;\n /** Icon to show when sidebar is compacted. Defaults to Humain logomark. */\n compactedLogo?: React.ReactNode;\n /** Collapsible mode */\n collapsible?: 'offcanvas' | 'icon' | 'none';\n /** Side of the screen */\n side?: 'left' | 'right';\n /** Whether to round sidebar corners */\n rounded?: boolean;\n /** Custom background color class for the sidebar (e.g., 'bg-card') */\n sidebarBgColor?: string;\n className?: string;\n}\n\nfunction AppSidebarSkeleton({\n navCount = 4,\n chatCount = 5,\n logo,\n compactedLogo,\n collapsible = 'icon',\n side,\n rounded = false,\n sidebarBgColor,\n className,\n}: AppSidebarSkeletonProps) {\n const { state, containerRef } = useSidebar();\n const isCollapsed = state === 'collapsed';\n const resolvedSide = useResolvedAppSidebarSide({\n containerRef,\n explicitSide: side,\n });\n\n const bgClass = getSidebarBgClass(isCollapsed, sidebarBgColor);\n\n return (\n <Sidebar\n collapsible={collapsible}\n side={resolvedSide}\n width={APP_SIDEBAR_EXPANDED_WIDTH}\n collapsedWidth={APP_SIDEBAR_COLLAPSED_WIDTH}\n className={cn('bg-transparent', className)}\n >\n <div\n data-slot=\"app-sidebar-surface\"\n className={getSidebarSurfaceClass({\n isCollapsed,\n side: resolvedSide,\n rounded,\n backgroundClass: bgClass,\n })}\n >\n <SidebarHeader className=\"h-[68px] w-full p-2\">\n <AppSidebarLogo logo={logo} compactedLogo={compactedLogo} />\n </SidebarHeader>\n\n <SidebarContent className=\"flex w-full flex-col gap-0 overflow-hidden pt-3 group-data-[collapsible=icon]:items-center\">\n <AppSidebarNavSkeleton count={navCount} />\n <AppSidebarChatListSkeleton count={chatCount} />\n </SidebarContent>\n\n <SidebarFooter className=\"w-full gap-0 p-0 group-data-[collapsible=icon]:items-center\">\n <AppSidebarAccountSkeleton />\n </SidebarFooter>\n </div>\n </Sidebar>\n );\n}\n\nAppSidebarSkeleton.displayName = 'AppSidebar.Skeleton';\n\n// ============================================\n// Main App Sidebar\n// ============================================\n\nexport interface AppSidebarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Logo element or configuration */\n logo?: React.ReactNode;\n /** Icon to show when sidebar is compacted. Defaults to Humain logomark. */\n compactedLogo?: React.ReactNode;\n /** Subtext displayed below the logo (e.g., \"Dashboard\"). Hidden when collapsed. */\n logoSubtext?: string;\n /** Collapsible mode - 'icon' shows only icons when collapsed, 'none' disables collapsing */\n collapsible?: 'offcanvas' | 'icon' | 'none';\n /** Side of the screen. When omitted, resolves from the nearest DOM direction. */\n side?: 'left' | 'right';\n /** Whether to round sidebar corners */\n rounded?: boolean;\n /** Custom background color class for the sidebar (e.g., 'bg-card'). Defaults to the sidebar token when expanded, bg-transparent when collapsed. */\n sidebarBgColor?: string;\n /** Children (compound components) */\n children?: React.ReactNode;\n}\n\n/**\n * AppSidebar is a full-featured application sidebar with navigation, chat list, and account sections.\n * Supports collapsible modes with a unified logo toggle and loading skeletons.\n *\n * @llms Full-featured app sidebar with nav, chat list, account, collapsible modes\n * @example\n * ```tsx\n * <AppSidebar logo={<Logo />} collapsible=\"icon\">\n * <AppSidebar.Nav>\n * <AppSidebar.NavItem icon={<Home />} label=\"Home\" isActive />\n * </AppSidebar.Nav>\n * <AppSidebar.ChatList>\n * <AppSidebar.ChatItem title=\"Chat 1\" />\n * </AppSidebar.ChatList>\n * <AppSidebar.Account name=\"User\" subtitle=\"user@example.com\" />\n * </AppSidebar>\n * ```\n */\nfunction AppSidebarRoot({\n logo,\n compactedLogo,\n logoSubtext,\n collapsible = 'icon',\n side,\n rounded = false,\n sidebarBgColor,\n className,\n children,\n dir,\n ...props\n}: AppSidebarProps) {\n const { state, containerRef } = useSidebar();\n const isCollapsed = state === 'collapsed';\n const resolvedSide = useResolvedAppSidebarSide({\n containerRef,\n explicitDir: dir,\n explicitSide: side,\n });\n\n const bgClass = getSidebarBgClass(isCollapsed, sidebarBgColor);\n\n const slots = useSlotChildren(children);\n\n return (\n <AppSidebarLayoutContext.Provider value={{ side: resolvedSide }}>\n <Sidebar\n collapsible={collapsible}\n side={resolvedSide}\n width={APP_SIDEBAR_EXPANDED_WIDTH}\n collapsedWidth={APP_SIDEBAR_COLLAPSED_WIDTH}\n dir={dir}\n className={cn('bg-transparent', className)}\n {...props}\n >\n <div\n data-slot=\"app-sidebar-surface\"\n className={getSidebarSurfaceClass({\n isCollapsed,\n side: resolvedSide,\n rounded,\n backgroundClass: bgClass,\n })}\n >\n <SidebarHeader className=\"h-[68px] w-full p-2\">\n <AppSidebarLogo\n logo={logo}\n compactedLogo={compactedLogo}\n subtext={logoSubtext}\n />\n </SidebarHeader>\n\n <SidebarContent className=\"flex w-full flex-col gap-0 overflow-hidden pt-3 group-data-[collapsible=icon]:items-center\">\n {slots.explicitContent\n ? (slots.explicitContent.props as AppSidebarSlotProps).children\n : slots.content}\n </SidebarContent>\n\n <SidebarFooter className=\"w-full gap-0 p-0 group-data-[collapsible=icon]:items-center\">\n {slots.explicitFooter\n ? (slots.explicitFooter.props as AppSidebarSlotProps).children\n : slots.footer}\n </SidebarFooter>\n </div>\n </Sidebar>\n </AppSidebarLayoutContext.Provider>\n );\n}\n\nAppSidebarRoot.displayName = 'AppSidebar';\n\n// ============================================\n// Compound Component Export\n// ============================================\n\nexport const AppSidebar = Object.assign(AppSidebarRoot, {\n Header: AppSidebarHeader,\n Content: AppSidebarContent,\n Footer: AppSidebarFooter,\n Nav: AppSidebarNav,\n NavSection: AppSidebarNavSection,\n NavItem: AppSidebarNavItem,\n NavSub: AppSidebarNavSub,\n NavSkeleton: AppSidebarNavSkeleton,\n ChatList: AppSidebarChatList,\n ChatItem: AppSidebarChatItem,\n ChatListSkeleton: AppSidebarChatListSkeleton,\n Account: AppSidebarAccount,\n AccountSkeleton: AppSidebarAccountSkeleton,\n Skeleton: AppSidebarSkeleton,\n});\n\n// ============================================\n// Type Exports\n// ============================================\n\n// Re-export mobile detection utilities for client use\nexport { MOBILE_BREAKPOINT, useIsMobile } from '@/hooks/use-mobile';\nexport {\n APP_SIDEBAR_COLLAPSED_WIDTH,\n APP_SIDEBAR_EXPANDED_WIDTH,\n} from './AppSidebar.constants';\nexport type {\n AppSidebarAccountProps as AccountProps,\n AppSidebarChatItemProps as ChatItemProps,\n AppSidebarChatListProps as ChatListProps,\n AppSidebarChatListSkeletonProps as ChatListSkeletonProps,\n AppSidebarNavItemProps as NavItemProps,\n AppSidebarNavProps as NavProps,\n AppSidebarNavSectionProps as NavSectionProps,\n AppSidebarNavSkeletonProps as NavSkeletonProps,\n AppSidebarNavSubProps as NavSubProps,\n AppSidebarSkeletonProps as SkeletonProps,\n AppSidebarSlotProps as SlotProps,\n};\n// Re-export sidebar primitives for custom compositions\nexport {\n chatItemVariants,\n navItemVariants,\n // Re-export base components for advanced usage\n Sidebar,\n SidebarAccountSkeleton,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarNavSkeleton,\n SidebarProvider,\n SidebarTrigger,\n useSidebar,\n};\n","/**\n * Web Component wrapper for AppSidebar (hand-crafted WC adapter).\n * Custom element: <hf-app-sidebar>\n *\n * @generated by scripts/generate-wc-components.ts\n * DO NOT EDIT MANUALLY\n */\n\nimport {\n Calendar,\n Circle,\n FileText,\n Home,\n type LucideIcon,\n MessageCircle,\n Settings,\n Users,\n Workflow,\n} from 'lucide-react';\nimport React from 'react';\nimport { AppSidebar } from '../components';\nimport { SidebarInset, SidebarProvider } from '../components/ui/sidebar';\nimport {\n asArray,\n BaseCompoundWC,\n camelToKebab,\n dispatchEvent,\n installPropAccessors,\n type PropDefs,\n portalNode,\n registerWC,\n} from './_shared';\n\nconst PROP_DEFS: PropDefs = {\n navItems: 'json',\n activeNavItemId: 'string',\n account: 'json',\n logo: 'json',\n collapsible: 'string',\n connected: 'boolean',\n defaultOpen: 'boolean',\n side: 'string',\n compactedLogo: 'string',\n sidebarBgColor: 'string',\n rounded: 'boolean',\n logoSubtext: 'string',\n};\n\ntype NavSubItemDef = {\n label: string;\n badge?: string | number;\n href?: string;\n isActive?: boolean;\n};\n\ntype NavItemDef = {\n type?: 'item';\n id: string;\n icon?: string;\n label: string;\n isActive?: boolean;\n badge?: string | number;\n href?: string;\n children?: NavSubItemDef[];\n};\n\ntype NavSectionDef = {\n type: 'section';\n id?: string;\n label: string;\n};\n\ntype NavEntryDef = NavItemDef | NavSectionDef;\n\ntype LogoDef = {\n src?: string;\n alt?: string;\n};\n\nconst SIDEBAR_ICON_COMPONENTS: Record<string, LucideIcon> = {\n home: Home,\n users: Users,\n calendar: Calendar,\n 'file-text': FileText,\n settings: Settings,\n 'message-circle': MessageCircle,\n workflow: Workflow,\n};\n\nconst warnedUnsupportedIconNames = new Set<string>();\n\nfunction normalizeIconName(iconName: string | undefined): string | undefined {\n const normalizedIconName = iconName\n ?.trim()\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .replace(/[\\s_]+/g, '-')\n .toLowerCase();\n\n return normalizedIconName || undefined;\n}\n\nfunction renderNavIcon(iconName: string | undefined): React.ReactElement {\n const normalizedIconName = normalizeIconName(iconName);\n\n if (normalizedIconName) {\n const Icon = SIDEBAR_ICON_COMPONENTS[normalizedIconName];\n\n if (Icon) {\n return React.createElement(Icon, { 'aria-hidden': true });\n }\n\n if (!warnedUnsupportedIconNames.has(normalizedIconName)) {\n warnedUnsupportedIconNames.add(normalizedIconName);\n console.warn(\n `[hf-app-sidebar] Unsupported nav item icon \"${normalizedIconName}\". Falling back to \"circle\".`,\n );\n }\n }\n\n return React.createElement(Circle, { 'aria-hidden': true });\n}\n\nfunction isNavSection(item: NavEntryDef): item is NavSectionDef {\n return item.type === 'section';\n}\n\nfunction renderLogoImage(\n logo: LogoDef | undefined,\n fallbackAlt: string,\n): React.ReactElement | null | undefined {\n if (!logo) {\n return undefined;\n }\n\n if (!logo.src) {\n return null;\n }\n\n return React.createElement('img', {\n src: logo.src,\n alt: logo.alt || fallbackAlt,\n });\n}\n\nclass AppSidebarWC extends BaseCompoundWC {\n get propDefs() {\n return PROP_DEFS;\n }\n\n static get observedAttributes() {\n return Object.keys(PROP_DEFS).map(camelToKebab);\n }\n\n protected _renderReact(): React.ReactElement {\n const props = this._readAllProps();\n const contentSlot = this._getSlot('content');\n\n const navItems = asArray<NavEntryDef>(props.navItems);\n\n const account = props.account as\n | {\n name: string;\n subtitle: string;\n avatarSrc?: string;\n isOnline?: boolean;\n }\n | undefined;\n\n const logo = props.logo as LogoDef | undefined;\n const compactedLogo = props.compactedLogo\n ? renderLogoImage(\n { src: String(props.compactedLogo), alt: logo?.alt },\n logo?.alt || 'Logo',\n )\n : undefined;\n const host = this;\n\n function handleNavItemClick(item: { id: string; label: string }): void {\n dispatchEvent(host, 'nav-item-click', item);\n }\n\n function handleOpenChange(open: boolean): void {\n dispatchEvent(host, 'open-change', open);\n }\n\n const sidebarChildren: React.ReactElement[] = [];\n\n sidebarChildren.push(\n React.createElement(\n AppSidebar,\n {\n key: 'sidebar',\n collapsible:\n (props.collapsible as 'offcanvas' | 'icon' | 'none') || 'icon',\n side: (props.side as 'left' | 'right') || 'left',\n rounded: props.rounded as boolean,\n sidebarBgColor: props.sidebarBgColor as string,\n logoSubtext: props.logoSubtext as string,\n logo: renderLogoImage(logo, 'Logo'),\n compactedLogo,\n },\n navItems.length > 0 &&\n React.createElement(\n AppSidebar.Nav,\n { key: 'nav' },\n ...navItems.map((item, index) => {\n if (isNavSection(item)) {\n return React.createElement(AppSidebar.NavSection, {\n key: item.id || `section-${index}`,\n label: item.label,\n });\n }\n\n return React.createElement(\n AppSidebar.NavItem,\n {\n key: item.id,\n icon: renderNavIcon(item.icon),\n label: item.label,\n isActive: item.isActive || item.id === props.activeNavItemId,\n badge: item.badge,\n href: item.href,\n onClick: () => handleNavItemClick(item),\n },\n ...(item.children\n ? item.children.map((child, idx) =>\n React.createElement(AppSidebar.NavSub, {\n key: `${item.id}-sub-${idx}`,\n label: child.label,\n badge: child.badge,\n href: child.href,\n isActive: child.isActive,\n }),\n )\n : []),\n );\n }),\n ),\n account &&\n React.createElement(AppSidebar.Account, {\n key: 'account',\n name: account.name,\n subtitle: account.subtitle,\n avatarSrc: account.avatarSrc,\n isOnline: account.isOnline,\n }),\n ),\n );\n\n if (contentSlot) {\n sidebarChildren.push(\n React.createElement(\n SidebarInset,\n { key: 'inset', connected: props.connected as boolean },\n portalNode(contentSlot),\n ),\n );\n }\n\n return React.createElement(\n SidebarProvider,\n {\n defaultOpen: (props.defaultOpen as boolean) ?? false,\n onOpenChange: handleOpenChange,\n connected: props.connected as boolean,\n },\n ...sidebarChildren,\n );\n }\n}\n\ninstallPropAccessors(AppSidebarWC, PROP_DEFS);\nregisterWC('hf-app-sidebar', AppSidebarWC);\n\nexport { AppSidebarWC };\nexport default AppSidebarWC;\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ;AAAA,IAAE,OAAO;AAAA,IAAM,QAAQ;AAAA,IAAM,GAAG;AAAA,IAAK,GAAG;AAAA,IAAK,IAAI;AAAA,IAAK,KAAK;AAAA,EAAS,CAAC;AAAA,EAC9E,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAW,KAAK;AAAA,EAAS,CAAC;AAAA,EACxC,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAkB,KAAK;AAAA,EAAS,CAAC;AACjD,GACM,KAAiB,EAAiB,oBAAoBA,EAAU,GCLhEC,KAAa;AAAA,EACjB,CAAC,QAAQ;AAAA,IAAE,OAAO;AAAA,IAAM,QAAQ;AAAA,IAAM,GAAG;AAAA,IAAK,GAAG;AAAA,IAAK,IAAI;AAAA,IAAK,KAAK;AAAA,EAAS,CAAC;AAAA,EAC9E,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAW,KAAK;AAAA,EAAS,CAAC;AA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AAA,EACF;AACF;AAEA,GAAqB,IAAc,CAAS;AAC5C,GAAW,kBAAkB,EAAY"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humain/ui",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "HUMAIN UI React components, design tokens, Web Components, and agent skills.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -3,7 +3,7 @@ name: humain-ui
3
3
  description: Use when building, migrating, auditing, or bootstrapping React UI with @humain/ui, including pages, dashboards, app shells, forms, dialogs, data tables, charts, AI chat workspaces, or Figma-to-Humain mapping.
4
4
  ---
5
5
 
6
- # Humain Foundation UI (v2.2.2)
6
+ # Humain Foundation UI (v2.2.3)
7
7
 
8
8
  Build product UI with `@humain/ui`, a React 18/19 component library with Tailwind v4, dark mode, design tokens, Web Component projections, and AI-facing references.
9
9
 
@@ -3,7 +3,7 @@ name: humain-ui-wc
3
3
  description: Use when building browser-native prototypes, iframe artifacts, static HTML, custom-element demos, framework-neutral integrations, or any HUMAIN UI that must use hf-* Web Components instead of React JSX.
4
4
  ---
5
5
 
6
- # Humain Foundation UI Web Components (v2.2.2)
6
+ # Humain Foundation UI Web Components (v2.2.3)
7
7
 
8
8
  **Identity** - You build HUMAIN interfaces with `hf-*` custom elements. You keep the same product taste, spacing discipline, and component intent as the React `humain-ui` skill, but you only use Web Component APIs that actually exist in the manifest.
9
9
 
Binary file
Binary file
@@ -1 +0,0 @@
1
- {"version":3,"file":"sidebar.js","names":[],"sources":["../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/panel-left.mjs","../../src/components/ui/sheet.tsx","../../src/hooks/use-mobile.ts","../../src/components/ui/sidebar.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }],\n [\"path\", { d: \"M9 3v18\", key: \"fh3hqa\" }]\n];\nconst PanelLeft = createLucideIcon(\"panel-left\", __iconNode);\n\nexport { __iconNode, PanelLeft as default };\n//# sourceMappingURL=panel-left.mjs.map\n","'use client';\n\nimport { Dialog as SheetPrimitive } from '@base-ui/react/dialog';\nimport type * as React from 'react';\nimport { CloseButton } from '@/components/ui/close-button';\nimport { cn } from '@/lib/utils';\n\nfunction Sheet({ ...props }: SheetPrimitive.Root.Props) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\nfunction SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nfunction SheetClose({ ...props }: SheetPrimitive.Close.Props) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nfunction SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\nexport interface SheetOverlayProps extends SheetPrimitive.Backdrop.Props {\n /** Disables open/close animations */\n disableAnimation?: boolean;\n /** Disables backdrop blur effect */\n disableBackdropBlur?: boolean;\n}\n\nfunction SheetOverlay({\n className,\n disableAnimation,\n disableBackdropBlur,\n ...props\n}: SheetOverlayProps) {\n return (\n <SheetPrimitive.Backdrop\n data-slot=\"sheet-overlay\"\n className={cn(\n 'bg-background/80/10 fixed inset-0 z-50',\n !disableAnimation &&\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0',\n !disableBackdropBlur && 'supports-backdrop-filter:backdrop-blur-xs',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport interface SheetContentProps extends SheetPrimitive.Popup.Props {\n side?: 'top' | 'right' | 'bottom' | 'left';\n showCloseButton?: boolean;\n /** Disables open/close animations */\n disableAnimation?: boolean;\n /** Disables backdrop blur effect */\n disableBackdropBlur?: boolean;\n}\n\nfunction SheetContent({\n className,\n children,\n side = 'right',\n showCloseButton = true,\n disableAnimation,\n disableBackdropBlur,\n ...props\n}: SheetContentProps) {\n return (\n <SheetPortal>\n <SheetOverlay\n disableAnimation={disableAnimation}\n disableBackdropBlur={disableBackdropBlur}\n />\n <SheetPrimitive.Popup\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n 'bg-background fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm',\n !disableAnimation &&\n 'data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 transition duration-200 ease-in-out',\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close\n render={<CloseButton className=\"absolute top-4 end-4\" />}\n />\n )}\n </SheetPrimitive.Popup>\n </SheetPortal>\n );\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn('gap-1.5 p-4 flex flex-col', className)}\n {...props}\n />\n );\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn('gap-2 p-4 mt-auto flex flex-col', className)}\n {...props}\n />\n );\n}\n\nfunction SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('text-foreground font-medium', className)}\n {...props}\n />\n );\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: SheetPrimitive.Description.Props) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nSheetTrigger.displayName = 'Sheet.Trigger';\nSheetClose.displayName = 'Sheet.Close';\nSheetPortal.displayName = 'Sheet.Portal';\nSheetOverlay.displayName = 'Sheet.Overlay';\nSheetContent.displayName = 'Sheet.Content';\nSheetHeader.displayName = 'Sheet.Header';\nSheetFooter.displayName = 'Sheet.Footer';\nSheetTitle.displayName = 'Sheet.Title';\nSheetDescription.displayName = 'Sheet.Description';\nSheet.displayName = 'Sheet';\n\nconst SheetNamespace = Object.assign(Sheet, {\n Trigger: SheetTrigger,\n Close: SheetClose,\n Portal: SheetPortal,\n Overlay: SheetOverlay,\n Content: SheetContent,\n Header: SheetHeader,\n Footer: SheetFooter,\n Title: SheetTitle,\n Description: SheetDescription,\n});\n\nexport {\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetNamespace as Sheet,\n SheetTitle,\n SheetTrigger,\n};\n","import * as React from 'react';\n\nexport const MOBILE_BREAKPOINT = 768;\n\nfunction getClientWindow(): Window | undefined {\n return typeof window === 'undefined' ? undefined : window;\n}\n\nexport function useIsMobile() {\n // SSR-safe: always return false on server for consistent hydration\n const [isMobile, setIsMobile] = React.useState<boolean>(false);\n\n React.useEffect(() => {\n const clientWindow = getClientWindow();\n if (!clientWindow?.matchMedia) {\n return;\n }\n\n const mql = clientWindow.matchMedia(\n `(max-width: ${MOBILE_BREAKPOINT - 1}px)`,\n );\n\n const onChange = (e: MediaQueryListEvent | MediaQueryList) => {\n setIsMobile(e.matches);\n };\n\n // Initial sync on mount\n onChange(mql);\n\n // Safari < 14 compatibility: use addListener/removeListener as fallback\n if (mql.addEventListener) {\n mql.addEventListener('change', onChange);\n } else if ('addListener' in mql) {\n (mql as { addListener: (cb: typeof onChange) => void }).addListener(\n onChange,\n );\n }\n\n return () => {\n if (mql.removeEventListener) {\n mql.removeEventListener('change', onChange);\n } else if ('removeListener' in mql) {\n (\n mql as { removeListener: (cb: typeof onChange) => void }\n ).removeListener(onChange);\n }\n };\n }, []);\n\n return isMobile;\n}\n","'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { PanelLeft } from 'lucide-react';\nimport * as React from 'react';\nimport { Button } from '@/components/ui/button';\nimport { Input } from '@/components/ui/input';\nimport { Separator } from '@/components/ui/separator';\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from '@/components/ui/sheet';\nimport { Skeleton } from '@/components/ui/skeleton';\nimport { Tooltip, TooltipPopup, TooltipTrigger } from '@/components/ui/tooltip';\nimport { useIsMobile } from '@/hooks/use-mobile';\nimport { createSafeContext } from '@/lib/create-safe-context';\nimport { cn } from '@/lib/utils';\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state';\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nconst SIDEBAR_WIDTH = '324px';\nconst SIDEBAR_WIDTH_MOBILE = '18rem';\n// Collapsed width: 76px content + 16px padding + 16px spacing-xl = 108px\nconst SIDEBAR_WIDTH_ICON = '108px';\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b';\n\ntype SidebarContextProps = {\n state: 'expanded' | 'collapsed';\n open: boolean;\n setOpen: (open: boolean) => void;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n isMobile: boolean;\n toggleSidebar: () => void;\n /** Whether the sidebar is in connected layout mode */\n connected: boolean;\n /** Whether the sidebar is in a loading state */\n loading: boolean;\n /** Custom background color class for the content/inset area */\n contentBgColor?: string;\n /** Ref to the visible sidebar rail element. Use to anchor flyouts/popovers to the sidebar edge. */\n containerRef: React.RefObject<HTMLDivElement | null>;\n};\n\nconst [SidebarContext, useSidebar] =\n createSafeContext<SidebarContextProps>('SidebarProvider');\n\nfunction SidebarProvider({\n defaultOpen = false,\n open: openProp,\n onOpenChange: setOpenProp,\n connected = true,\n loading = false,\n contentBgColor,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /**\n * Enable connected layout mode for use inside AppShell.\n *\n * In connected mode:\n * - Sidebar fills its parent container (no fixed positioning)\n * - Width is controlled by the parent container\n * - Collapse/expand is not supported (sidebar always visible)\n * - The `side` prop is handled by DOM order\n */\n connected?: boolean;\n /** Whether the sidebar is in a loading state */\n loading?: boolean;\n /** Custom background color class for the content/inset area (e.g., 'bg-destructive') */\n contentBgColor?: string;\n}) {\n const isMobile = useIsMobile();\n const [openMobile, setOpenMobile] = React.useState(false);\n // Ref for portal-proof document/window access.\n const wrapperRef = React.useRef<HTMLDivElement>(null);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen);\n const open = openProp ?? _open;\n const openRef = React.useRef(open);\n openRef.current = open;\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState =\n typeof value === 'function' ? value(openRef.current) : value;\n if (setOpenProp) {\n setOpenProp(openState);\n } else {\n _setOpen(openState);\n }\n\n // This sets the cookie to keep the sidebar state.\n const ownerDocument = wrapperRef.current?.ownerDocument;\n if (ownerDocument) {\n ownerDocument.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n }\n },\n [setOpenProp],\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);\n }, [isMobile, setOpen]);\n\n // Ref to the visible sidebar rail element (set by Sidebar). Exposed via context for anchoring flyouts.\n const containerRef = React.useRef<HTMLDivElement | null>(null);\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault();\n toggleSidebar();\n }\n };\n\n // Use ownerDocument.defaultView for portal/iframe compatibility (ADR-010)\n const win = wrapperRef.current?.ownerDocument.defaultView;\n if (!win) return;\n win.addEventListener('keydown', handleKeyDown);\n return () => win.removeEventListener('keydown', handleKeyDown);\n }, [toggleSidebar]);\n\n // Set CSS variables on :root when mobile state changes\n // Use concrete values so consumers can use these variables globally\n React.useEffect(() => {\n const root = wrapperRef.current?.ownerDocument.documentElement;\n if (!root) return;\n\n // Set global sidebar width values for consumer use\n root.style.setProperty('--sidebar-width', SIDEBAR_WIDTH);\n root.style.setProperty('--sidebar-width-mobile', SIDEBAR_WIDTH_MOBILE);\n root.style.setProperty('--sidebar-width-icon', SIDEBAR_WIDTH_ICON);\n\n if (isMobile) {\n root.style.setProperty('--sidebar-mobile', '1');\n root.style.setProperty('--sidebar-width-current', SIDEBAR_WIDTH_MOBILE);\n root.dataset.sidebarMobile = 'true';\n } else {\n root.style.setProperty('--sidebar-mobile', '0');\n root.style.setProperty('--sidebar-width-current', SIDEBAR_WIDTH);\n root.dataset.sidebarMobile = 'false';\n }\n\n return () => {\n root.style.removeProperty('--sidebar-mobile');\n root.style.removeProperty('--sidebar-width');\n root.style.removeProperty('--sidebar-width-mobile');\n root.style.removeProperty('--sidebar-width-icon');\n root.style.removeProperty('--sidebar-width-current');\n delete root.dataset.sidebarMobile;\n };\n }, [isMobile]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed';\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n connected,\n loading,\n contentBgColor,\n containerRef,\n }),\n [\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n toggleSidebar,\n connected,\n loading,\n contentBgColor,\n ],\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <div\n ref={wrapperRef}\n data-slot=\"sidebar-wrapper\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n 'group/sidebar-wrapper flex w-full',\n // Only impose min-h-svh in default mode; connected mode inherits height from parent\n connected ? 'h-full' : 'min-h-svh',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n </SidebarContext.Provider>\n );\n}\nSidebarProvider.displayName = 'SidebarProvider';\n\n/**\n * Sidebar is a responsive navigation container.\n * Supports mobile sheet mode, keyboard shortcuts, and persistent state via cookies.\n *\n * @llms Responsive sidebar with mobile sheet mode\n * @example\n * ```tsx\n * <SidebarProvider>\n * <Sidebar collapsible=\"icon\">\n * <SidebarHeader />\n * <SidebarContent>...</SidebarContent>\n * <SidebarFooter />\n * </Sidebar>\n * </SidebarProvider>\n * ```\n */\nfunction Sidebar({\n side = 'left',\n collapsible = 'offcanvas',\n width = SIDEBAR_WIDTH,\n collapsedWidth = SIDEBAR_WIDTH_ICON,\n mobileWidth = SIDEBAR_WIDTH_MOBILE,\n offsetTop = '0px',\n offsetBottom = '0px',\n rounded = false,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n side?: 'left' | 'right';\n collapsible?: 'offcanvas' | 'icon' | 'none';\n width?: string;\n collapsedWidth?: string;\n mobileWidth?: string;\n offsetTop?: string;\n offsetBottom?: string;\n rounded?: boolean;\n}) {\n const {\n isMobile,\n state,\n openMobile,\n setOpenMobile,\n connected,\n containerRef,\n } = useSidebar();\n\n const roundedClass = React.useMemo(() => {\n if (!rounded) return '';\n // Inner edge: the edge facing content (left sidebar → right edge, right sidebar → left edge)\n return side === 'left'\n ? 'rounded-r-(--sidebar-radius,0.5rem)'\n : 'rounded-l-(--sidebar-radius,0.5rem)';\n }, [rounded, side]);\n\n // Connected mode: simplified layout for use inside AppShell\n if (connected) {\n return (\n <div\n ref={containerRef}\n data-slot=\"sidebar\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-connected=\"true\"\n className={cn(\n 'group text-sidebar-foreground flex h-full w-full flex-col overflow-hidden',\n className,\n )}\n style={\n {\n '--sidebar-width': width,\n '--sidebar-width-icon': collapsedWidth,\n ...style,\n } as React.CSSProperties\n }\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (collapsible === 'none') {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n 'bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden\"\n style={\n {\n '--sidebar-width': mobileWidth,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n );\n }\n\n const effectiveCollapsible = state === 'collapsed' ? collapsible : '';\n\n return (\n <div\n className=\"group peer text-sidebar-foreground hidden md:block\"\n data-state={state}\n data-collapsible={effectiveCollapsible}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n {/* Uses CSS grid with grid-template-columns transition instead of width\n transition to avoid layout thrashing (grid-template-columns is a\n composite-friendly property that doesn't trigger document reflow). */}\n <div\n data-slot=\"sidebar-gap-container\"\n className={cn(\n 'grid transition-[grid-template-columns] duration-200 ease-linear motion-reduce:transition-none',\n 'grid-cols-[var(--sidebar-width)]',\n 'group-data-[collapsible=offcanvas]:grid-cols-[0fr]',\n 'group-data-[side=right]:rotate-180',\n 'group-data-[collapsible=icon]:grid-cols-[var(--sidebar-width-icon)]',\n )}\n >\n <div\n data-slot=\"sidebar-gap\"\n className=\"overflow-hidden bg-transparent\"\n />\n </div>\n <div\n ref={containerRef}\n data-slot=\"sidebar-container\"\n style={\n {\n '--sidebar-width': width,\n '--sidebar-width-icon': collapsedWidth,\n '--sidebar-offset-top': offsetTop,\n '--sidebar-offset-bottom': offsetBottom,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n 'fixed z-10 hidden transition-[left,right,width,height,top,bottom] duration-200 ease-linear will-change-[width,transform] motion-reduce:transition-none md:flex',\n 'w-(--sidebar-width)',\n 'top-[var(--sidebar-offset-top)] bottom-[var(--sidebar-offset-bottom)] h-[calc(100svh-var(--sidebar-offset-top)-var(--sidebar-offset-bottom))]',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',\n className,\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className={cn('flex size-full flex-col', roundedClass)}\n >\n {children}\n </div>\n </div>\n </div>\n );\n}\nSidebar.displayName = 'Sidebar';\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { toggleSidebar, open } = useSidebar();\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n appearance=\"ghost\"\n variant=\"secondary\"\n size=\"icon-sm\"\n aria-label=\"Toggle sidebar\"\n aria-expanded={open}\n className={cn(className)}\n onClick={(event) => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n <PanelLeft aria-hidden=\"true\" />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n );\n}\nSidebarTrigger.displayName = 'SidebarTrigger';\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n 'hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear motion-reduce:transition-none group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className,\n )}\n {...props}\n />\n );\n}\nSidebarRail.displayName = 'SidebarRail';\n\nfunction SidebarInset({\n className,\n connected: connectedProp,\n contentBgColor: contentBgColorProp,\n ...props\n}: React.ComponentProps<'main'> & {\n /** Enable connected layout mode directly, without needing SidebarProvider */\n connected?: boolean;\n /** Custom background color class (e.g., 'bg-destructive'). Overrides context value. */\n contentBgColor?: string;\n}) {\n const context = React.useContext(SidebarContext);\n // Prefer prop over context, fallback to false\n const connected = connectedProp ?? context?.connected ?? false;\n const isMobile = context?.isMobile ?? false;\n // Prefer prop over context, fallback to 'bg-background'\n const bgColor =\n contentBgColorProp ?? context?.contentBgColor ?? 'bg-background';\n\n // Connected mode: simplified layout for use inside AppShell\n if (connected) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n data-connected=\"true\"\n data-mobile={isMobile ? 'true' : 'false'}\n className={cn(\n 'relative flex h-full w-full flex-1 flex-col overflow-hidden',\n bgColor,\n isMobile && 'p-0',\n className,\n )}\n {...props}\n />\n );\n }\n\n return (\n <main\n data-slot=\"sidebar-inset\"\n data-mobile={isMobile ? 'true' : 'false'}\n className={cn(bgColor, 'relative flex w-full flex-1 flex-col', className)}\n {...props}\n />\n );\n}\nSidebarInset.displayName = 'SidebarInset';\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn('bg-background h-8 w-full shadow-none', className)}\n {...props}\n />\n );\n}\nSidebarInput.displayName = 'SidebarInput';\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\n 'gap-[var(--sidebar-gap,0.5rem)] p-[var(--sidebar-padding-inner,0.5rem)] flex shrink-0 flex-col',\n className,\n )}\n {...props}\n />\n );\n}\nSidebarHeader.displayName = 'SidebarHeader';\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\n 'gap-[var(--sidebar-gap,0.5rem)] p-[var(--sidebar-padding-inner,0.5rem)] flex shrink-0 flex-col',\n className,\n )}\n {...props}\n />\n );\n}\nSidebarFooter.displayName = 'SidebarFooter';\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn('bg-sidebar-border mx-2 w-auto', className)}\n {...props}\n />\n );\n}\nSidebarSeparator.displayName = 'SidebarSeparator';\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n 'no-scrollbar gap-[var(--sidebar-gap,0.5rem)] flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className,\n )}\n {...props}\n />\n );\n}\nSidebarContent.displayName = 'SidebarContent';\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\n 'p-[var(--sidebar-padding-inner,0.5rem)] relative flex w-full min-w-0 flex-col',\n className,\n )}\n {...props}\n />\n );\n}\nSidebarGroup.displayName = 'SidebarGroup';\n\nfunction SidebarGroupLabel({\n className,\n render,\n ...props\n}: useRender.ComponentProps<'div'> & React.ComponentProps<'div'>) {\n return useRender({\n defaultTagName: 'div',\n props: mergeProps<'div'>(\n {\n className: cn(\n 'text-sidebar-foreground/80 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[transform,opacity] duration-200 ease-linear motion-reduce:transition-none group-data-[collapsible=icon]:-translate-y-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0',\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: 'sidebar-group-label',\n sidebar: 'group-label',\n },\n });\n}\nSidebarGroupLabel.displayName = 'SidebarGroupLabel';\n\nfunction SidebarGroupAction({\n className,\n render,\n ...props\n}: useRender.ComponentProps<'button'> & React.ComponentProps<'button'>) {\n return useRender({\n defaultTagName: 'button',\n props: mergeProps<'button'>(\n {\n className: cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 end-3 w-5 rounded-md p-0 focus-visible:ring-2 [&>svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform motion-reduce:transition-none [&>svg]:shrink-0 after:absolute after:-inset-2 group-data-[collapsible=icon]:hidden',\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: 'sidebar-group-action',\n sidebar: 'group-action',\n },\n });\n}\nSidebarGroupAction.displayName = 'SidebarGroupAction';\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn('text-sm w-full', className)}\n {...props}\n />\n );\n}\nSidebarGroupContent.displayName = 'SidebarGroupContent';\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn(\n 'gap-[var(--sidebar-gap,0.5rem)] flex w-full min-w-0 flex-col',\n className,\n )}\n {...props}\n />\n );\n}\nSidebarMenu.displayName = 'SidebarMenu';\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n );\n}\nSidebarMenuItem.displayName = 'SidebarMenuItem';\n\nconst sidebarMenuButtonVariants = cva(\n 'ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] motion-reduce:transition-none group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]',\n },\n size: {\n default: 'min-h-11 text-sm',\n sm: 'min-h-8 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nfunction SidebarMenuButton({\n render,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n ...props\n}: useRender.ComponentProps<'button'> &\n React.ComponentProps<'button'> & {\n isActive?: boolean;\n tooltip?: string | React.ComponentProps<typeof TooltipPopup>;\n } & VariantProps<typeof sidebarMenuButtonVariants>) {\n const { isMobile, state } = useSidebar();\n const comp = useRender({\n defaultTagName: 'button',\n props: mergeProps<'button'>(\n {\n className: cn(sidebarMenuButtonVariants({ variant, size }), className),\n },\n props,\n ),\n render: !tooltip ? render : TooltipTrigger,\n state: {\n slot: 'sidebar-menu-button',\n sidebar: 'menu-button',\n size,\n active: isActive,\n },\n });\n\n if (!tooltip) {\n return comp;\n }\n\n if (typeof tooltip === 'string') {\n tooltip = {\n children: tooltip,\n };\n }\n\n return (\n <Tooltip>\n {comp}\n <TooltipPopup\n side=\"right\"\n align=\"center\"\n hidden={state !== 'collapsed' || isMobile}\n {...tooltip}\n />\n </Tooltip>\n );\n}\nSidebarMenuButton.displayName = 'SidebarMenuButton';\n\nfunction SidebarMenuAction({\n className,\n render,\n showOnHover = false,\n ...props\n}: useRender.ComponentProps<'button'> &\n React.ComponentProps<'button'> & {\n showOnHover?: boolean;\n }) {\n return useRender({\n defaultTagName: 'button',\n props: mergeProps<'button'>(\n {\n className: cn(\n '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 aspect-square w-5 rounded-md p-0 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 focus-visible:ring-2 [&>svg]:size-4 flex items-center justify-center outline-hidden transition-transform motion-reduce:transition-none group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 [&>svg]:shrink-0',\n showOnHover &&\n 'peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0',\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: 'sidebar-menu-action',\n sidebar: 'menu-action',\n },\n });\n}\nSidebarMenuAction.displayName = 'SidebarMenuAction';\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n 'text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute end-1 flex h-5 min-w-5 rounded-md px-1 text-xs font-medium peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 flex items-center justify-center tabular-nums select-none group-data-[collapsible=icon]:hidden',\n className,\n )}\n {...props}\n />\n );\n}\nSidebarMenuBadge.displayName = 'SidebarMenuBadge';\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<'div'> & {\n showIcon?: boolean;\n}) {\n const width = showIcon ? '72%' : '64%';\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn('h-8 gap-2 rounded-md px-2 flex items-center', className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width,\n } as React.CSSProperties\n }\n />\n </div>\n );\n}\nSidebarMenuSkeleton.displayName = 'SidebarMenuSkeleton';\n\nfunction SidebarNavSkeleton({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-nav-skeleton\"\n data-sidebar=\"nav-skeleton\"\n className={cn(\n 'flex h-10 w-full items-center gap-3 rounded-md px-3 py-2',\n 'group-data-[collapsible=icon]:h-11 group-data-[collapsible=icon]:w-[76px] group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0 group-data-[collapsible=icon]:py-3',\n className,\n )}\n {...props}\n >\n <Skeleton className=\"size-5 shrink-0 rounded\" />\n <Skeleton className=\"h-4 flex-1 group-data-[collapsible=icon]:hidden\" />\n </div>\n );\n}\nSidebarNavSkeleton.displayName = 'SidebarNavSkeleton';\n\nfunction SidebarAccountSkeleton({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-account-skeleton\"\n data-sidebar=\"account-skeleton\"\n className={cn('flex w-full items-center gap-2 rounded-md p-2', className)}\n {...props}\n >\n <Skeleton className=\"size-8 shrink-0 rounded-lg\" />\n <div className=\"flex flex-1 flex-col gap-1 group-data-[collapsible=icon]:hidden\">\n <Skeleton className=\"h-3.5 w-20\" />\n <Skeleton className=\"h-3 w-16\" />\n </div>\n </div>\n );\n}\nSidebarAccountSkeleton.displayName = 'SidebarAccountSkeleton';\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n 'border-sidebar-border mx-3.5 translate-x-px gap-[var(--sidebar-gap,0.5rem)] border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col',\n className,\n )}\n {...props}\n />\n );\n}\nSidebarMenuSub.displayName = 'SidebarMenuSub';\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n );\n}\nSidebarMenuSubItem.displayName = 'SidebarMenuSubItem';\n\nfunction SidebarMenuSubButton({\n render,\n size = 'md',\n isActive = false,\n className,\n ...props\n}: useRender.ComponentProps<'a'> &\n React.ComponentProps<'a'> & {\n size?: 'sm' | 'md';\n isActive?: boolean;\n }) {\n return useRender({\n defaultTagName: 'a',\n props: mergeProps<'a'>(\n {\n className: cn(\n '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-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground min-h-9 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0',\n className,\n ),\n },\n props,\n ),\n render,\n state: {\n slot: 'sidebar-menu-sub-button',\n sidebar: 'menu-sub-button',\n size,\n active: isActive,\n },\n });\n}\nSidebarMenuSubButton.displayName = 'SidebarMenuSubButton';\n\n// ============================================\n// Compound Component Export\n// ============================================\n\n/**\n * Sidebar compound component with dot notation access to all parts.\n *\n * Usage:\n * - `Sidebar.Root` - Main sidebar container (alias for Sidebar)\n * - `Sidebar.Header` - Header section\n * - `Sidebar.Content` - Scrollable content area\n * - `Sidebar.Footer` - Footer section\n * - `Sidebar.Group` - Group container for menu items\n * - `Sidebar.GroupLabel` - Label for a group\n * - `Sidebar.GroupContent` - Content within a group\n * - `Sidebar.GroupAction` - Action button for a group\n * - `Sidebar.Menu` - Menu container\n * - `Sidebar.MenuItem` - Menu item wrapper\n * - `Sidebar.MenuButton` - Clickable menu button\n * - `Sidebar.MenuAction` - Action within a menu item\n * - `Sidebar.MenuBadge` - Badge within a menu item\n * - `Sidebar.MenuSkeleton` - Loading skeleton for menu\n * - `Sidebar.MenuSub` - Submenu container\n * - `Sidebar.MenuSubItem` - Submenu item\n * - `Sidebar.MenuSubButton` - Submenu button\n * - `Sidebar.Input` - Input within sidebar\n * - `Sidebar.Separator` - Visual separator\n * - `Sidebar.Rail` - Resize/toggle rail\n * - `Sidebar.Inset` - Main content inset area\n * - `Sidebar.Trigger` - Toggle button\n */\nconst SidebarCompound = Object.assign(Sidebar, {\n Root: Sidebar,\n Header: SidebarHeader,\n Content: SidebarContent,\n Footer: SidebarFooter,\n Group: SidebarGroup,\n GroupLabel: SidebarGroupLabel,\n GroupContent: SidebarGroupContent,\n GroupAction: SidebarGroupAction,\n Menu: SidebarMenu,\n MenuItem: SidebarMenuItem,\n MenuButton: SidebarMenuButton,\n MenuAction: SidebarMenuAction,\n MenuBadge: SidebarMenuBadge,\n MenuSkeleton: SidebarMenuSkeleton,\n MenuSub: SidebarMenuSub,\n MenuSubItem: SidebarMenuSubItem,\n MenuSubButton: SidebarMenuSubButton,\n Input: SidebarInput,\n Separator: SidebarSeparator,\n Rail: SidebarRail,\n Inset: SidebarInset,\n Trigger: SidebarTrigger,\n // Skeletons\n NavSkeleton: SidebarNavSkeleton,\n AccountSkeleton: SidebarAccountSkeleton,\n});\n\nexport {\n SidebarAccountSkeleton,\n SidebarCompound as Sidebar,\n SidebarContent,\n SidebarContext,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarNavSkeleton,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n};\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;AASA,IAAM,KAAa,CACjB,CAAC,QAAQ;AAAA,EAAE,OAAO;AAAA,EAAM,QAAQ;AAAA,EAAM,GAAG;AAAA,EAAK,GAAG;AAAA,EAAK,IAAI;AAAA,EAAK,KAAK;AAAS,CAAC,GAC9E,CAAC,QAAQ;AAAA,EAAE,GAAG;AAAA,EAAW,KAAK;AAAS,CAAC,CAC1C,GACM,KAAY,GAAiB,cAAc,EAAU;ACN3D,SAAS,EAAM,EAAE,GAAG,EAAA,GAAoC;AACtD,SAAO,oBAAA,EAAA,KAAC,IAAD;AAAA,IAAqB,aAAU;AAAA,IAAQ,GAAI;AAAA,EAAQ,CAAA;AAC5D;AAEA,SAAS,EAAa,EAAE,GAAG,EAAA,GAAuC;AAChE,SAAO,oBAAA,EAAA,KAAC,IAAD;AAAA,IAAwB,aAAU;AAAA,IAAgB,GAAI;AAAA,EAAQ,CAAA;AACvE;AAEA,SAAS,EAAW,EAAE,GAAG,EAAA,GAAqC;AAC5D,SAAO,oBAAA,EAAA,KAAC,GAAD;AAAA,IAAsB,aAAU;AAAA,IAAc,GAAI;AAAA,EAAQ,CAAA;AACnE;AAEA,SAAS,EAAY,EAAE,GAAG,EAAA,GAAsC;AAC9D,SAAO,oBAAA,EAAA,KAAC,IAAD;AAAA,IAAuB,aAAU;AAAA,IAAe,GAAI;AAAA,EAAQ,CAAA;AACrE;AASA,SAAS,EAAa,EACpB,WAAA,GACA,kBAAA,GACA,qBAAA,GACA,GAAG,EAAA,GACiB;AACpB,SACE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