@kushagradhawan/kookie-ui 0.1.49 → 0.1.50

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 (45) hide show
  1. package/components.css +235 -64
  2. package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
  3. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  4. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  5. package/dist/cjs/components/shell.context.d.ts +1 -0
  6. package/dist/cjs/components/shell.context.d.ts.map +1 -1
  7. package/dist/cjs/components/shell.context.js +1 -1
  8. package/dist/cjs/components/shell.context.js.map +2 -2
  9. package/dist/cjs/components/shell.d.ts.map +1 -1
  10. package/dist/cjs/components/shell.js +1 -1
  11. package/dist/cjs/components/shell.js.map +3 -3
  12. package/dist/cjs/components/sidebar.d.ts +7 -1
  13. package/dist/cjs/components/sidebar.d.ts.map +1 -1
  14. package/dist/cjs/components/sidebar.js +1 -1
  15. package/dist/cjs/components/sidebar.js.map +3 -3
  16. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  17. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  18. package/dist/esm/components/_internal/shell-sidebar.js.map +3 -3
  19. package/dist/esm/components/shell.context.d.ts +1 -0
  20. package/dist/esm/components/shell.context.d.ts.map +1 -1
  21. package/dist/esm/components/shell.context.js.map +2 -2
  22. package/dist/esm/components/shell.d.ts.map +1 -1
  23. package/dist/esm/components/shell.js +1 -1
  24. package/dist/esm/components/shell.js.map +3 -3
  25. package/dist/esm/components/sidebar.d.ts +7 -1
  26. package/dist/esm/components/sidebar.d.ts.map +1 -1
  27. package/dist/esm/components/sidebar.js +1 -1
  28. package/dist/esm/components/sidebar.js.map +3 -3
  29. package/package.json +1 -1
  30. package/schemas/base-button.json +1 -1
  31. package/schemas/button.json +1 -1
  32. package/schemas/icon-button.json +1 -1
  33. package/schemas/index.json +6 -6
  34. package/schemas/toggle-button.json +1 -1
  35. package/schemas/toggle-icon-button.json +1 -1
  36. package/src/components/_internal/base-menu.css +4 -5
  37. package/src/components/_internal/base-sidebar-menu.css +0 -1
  38. package/src/components/_internal/base-sidebar.css +7 -0
  39. package/src/components/_internal/shell-sidebar.tsx +24 -1
  40. package/src/components/shell.context.tsx +3 -0
  41. package/src/components/shell.css +28 -1
  42. package/src/components/shell.tsx +24 -3
  43. package/src/components/sidebar.css +233 -33
  44. package/src/components/sidebar.tsx +247 -213
  45. package/styles.css +235 -64
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/shell.tsx"],
4
- "sourcesContent": ["/**\n * Shell Component - Layout Engine + Chrome\n *\n * Philosophy:\n * - Shell = layout engine + chrome\n * - Manages layout state: expanded/collapsed, fixed/overlay, sizes\n * - Does not manage content/navigation state\n * - Provides unstyled primitives (slots, triggers)\n * - Enforces composition rules (Rail \u2194 Panel dependency, Sidebar exclusivity)\n *\n * Core Slots:\n * - Header: global top bar\n * - Rail: slim nav strip\n * - Panel: sidebar next to rail\n * - Sidebar: alternative to Rail+Panel (exclusive)\n * - Content: main work area\n * - Inspector: right-side panel\n * - Bottom: bottom panel\n *\n * Composition Rules:\n * - Rail + Panel: valid together (Rail collapse \u2192 Panel collapse)\n * - Sidebar: cannot coexist with Rail or Panel\n * - Content: always required\n * - Inspector/Bottom: optional, independent\n */\n'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport * as Sheet from './sheet.js';\nimport { Inset } from './inset.js';\nimport { VisuallyHidden } from './visually-hidden.js';\nimport { useResponsivePresentation } from './shell.hooks.js';\nimport { PaneResizeContext } from './_internal/shell-resize.js';\nimport { PaneHandle, PanelHandle, SidebarHandle, InspectorHandle, BottomHandle } from './_internal/shell-handles.js';\nimport { Sidebar } from './_internal/shell-sidebar.js';\nimport { Bottom } from './_internal/shell-bottom.js';\nimport { Inspector } from './_internal/shell-inspector.js';\nimport type { PresentationValue, ResponsivePresentation, PaneMode, SidebarMode, ResponsiveMode, ResponsiveSidebarMode, PaneSizePersistence, Breakpoint, PaneTarget } from './shell.types.js';\nimport { BREAKPOINTS } from './shell.types.js';\nimport { ShellProvider, useShell } from './shell.context.js';\n\n// Shell context is provided via ShellProvider (see shell.context.tsx)\n\n// Pane resize context moved to ./_internal/shell-resize\n\n// Local PaneHandle moved to ./_internal/shell-handles\n// Removed local PaneHandle implementation; using internal PaneHandle\n\n// Composed Handle wrappers per pane\n// Handles moved to ./_internal/shell-handles\n\n// Hook to resolve responsive presentation\n// useResponsivePresentation moved to shell.hooks.ts\n\n// Hook to resolve responsive mode defaults\n// Removed: defaultMode responsiveness\n\n// Hook to get current breakpoint\nfunction useBreakpoint(): { bp: Breakpoint; ready: boolean } {\n const [currentBp, setCurrentBp] = React.useState<Breakpoint>('initial');\n const [ready, setReady] = React.useState(false);\n\n React.useEffect(() => {\n if (typeof window === 'undefined') return;\n\n const queries: [key: keyof typeof BREAKPOINTS, query: string][] = Object.entries(BREAKPOINTS) as any;\n const mqls = queries.map(([k, q]) => [k, window.matchMedia(q)] as const);\n\n const compute = () => {\n // Highest matched wins\n const matched = mqls.filter(([, m]) => m.matches).map(([k]) => k);\n const next = (matched[matched.length - 1] as Breakpoint | undefined) ?? 'initial';\n setCurrentBp(next);\n setReady(true);\n };\n\n compute();\n mqls.forEach(([, m]) => m.addEventListener('change', compute));\n\n return () => {\n mqls.forEach(([, m]) => m.removeEventListener('change', compute));\n };\n }, []);\n\n return { bp: currentBp, ready };\n}\n\n// Root Component\ninterface ShellRootProps extends React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n height?: 'full' | 'auto' | string | number;\n}\n\nconst Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, children, height = 'full', ...props }, ref) => {\n const { bp: currentBreakpoint, ready: currentBreakpointReady } = useBreakpoint();\n\n // Pane state management\n const [leftMode, setLeftMode] = React.useState<PaneMode>('collapsed');\n const [panelMode, setPanelMode] = React.useState<PaneMode>('collapsed');\n const [sidebarMode, setSidebarMode] = React.useState<SidebarMode>('expanded');\n const [inspectorMode, setInspectorMode] = React.useState<PaneMode>('collapsed');\n const [bottomMode, setBottomMode] = React.useState<PaneMode>('collapsed');\n\n // Removed: defaultMode responsiveness and manual change tracking\n\n // Composition detection\n const [hasLeft, setHasLeft] = React.useState(false);\n const [hasSidebar, setHasSidebar] = React.useState(false);\n\n // Customizable sidebar toggle sequencing\n const sidebarToggleComputerRef = React.useRef<(current: SidebarMode) => SidebarMode>((current) => (current === 'collapsed' ? 'thin' : current === 'thin' ? 'expanded' : 'collapsed'));\n const setSidebarToggleComputer = React.useCallback((fn: (current: SidebarMode) => SidebarMode) => {\n sidebarToggleComputerRef.current = fn;\n }, []);\n\n // Left collapse cascades to Panel\n React.useEffect(() => {\n if (leftMode === 'collapsed') {\n setPanelMode('collapsed');\n }\n }, [leftMode]);\n\n // Composition validation\n React.useEffect(() => {\n if (hasSidebar && hasLeft) {\n console.warn('Shell: Sidebar cannot coexist with Rail or Panel. Use either Rail+Panel OR Sidebar.');\n }\n }, [hasSidebar, hasLeft]);\n\n // Left presentation + defaults from children\n const [devLeftPres, setDevLeftPres] = React.useState<PresentationValue | undefined>(undefined);\n const onLeftPres = React.useCallback((p: PresentationValue) => setDevLeftPres(p), []);\n const railDefaultSizeRef = React.useRef<number>(64);\n const panelDefaultSizeRef = React.useRef<number>(288);\n const onRailDefaults = React.useCallback((size: number) => {\n railDefaultSizeRef.current = size;\n }, []);\n const onPanelDefaults = React.useCallback((size: number) => {\n panelDefaultSizeRef.current = size;\n }, []);\n\n // Determine children presence for left composition\n const hasLeftChildren = React.useMemo(() => {\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const isType = (el: React.ReactElement, comp: any) => React.isValidElement(el) && (el.type === comp || (el as any).type?.displayName === comp.displayName);\n return childArray.some((el) => isType(el, Rail) || isType(el, Panel));\n }, [children]);\n\n const hasSidebarChildren = React.useMemo(() => {\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const isType = (el: React.ReactElement, comp: any) => React.isValidElement(el) && (el.type === comp || (el as any).type?.displayName === comp.displayName);\n return childArray.some((el) => isType(el, Sidebar));\n }, [children]);\n\n const togglePane = React.useCallback(\n (target: PaneTarget) => {\n switch (target) {\n case 'left':\n case 'rail':\n setLeftMode((prev) => (prev === 'expanded' ? 'collapsed' : 'expanded'));\n break;\n case 'panel':\n // Panel toggle: expand left if collapsed, then toggle panel\n if (leftMode === 'collapsed') {\n setLeftMode('expanded');\n setPanelMode('expanded');\n } else {\n setPanelMode((prev) => (prev === 'expanded' ? 'collapsed' : 'expanded'));\n }\n break;\n case 'sidebar':\n setSidebarMode((prev) => sidebarToggleComputerRef.current(prev as SidebarMode));\n break;\n case 'inspector':\n setInspectorMode((prev) => (prev === 'expanded' ? 'collapsed' : 'expanded'));\n break;\n case 'bottom':\n setBottomMode((prev) => (prev === 'expanded' ? 'collapsed' : 'expanded'));\n break;\n }\n },\n [leftMode],\n );\n\n const expandPane = React.useCallback((target: PaneTarget) => {\n switch (target) {\n case 'left':\n case 'rail':\n setLeftMode('expanded');\n break;\n case 'panel':\n setLeftMode('expanded');\n setPanelMode('expanded');\n break;\n case 'sidebar':\n setSidebarMode('expanded');\n break;\n case 'inspector':\n setInspectorMode('expanded');\n break;\n case 'bottom':\n setBottomMode('expanded');\n break;\n }\n }, []);\n\n const collapsePane = React.useCallback((target: PaneTarget) => {\n switch (target) {\n case 'left':\n case 'rail':\n setLeftMode('collapsed');\n break;\n case 'panel':\n setPanelMode('collapsed');\n break;\n case 'sidebar':\n setSidebarMode('collapsed');\n break;\n case 'inspector':\n setInspectorMode('collapsed');\n break;\n case 'bottom':\n setBottomMode('collapsed');\n break;\n }\n }, []);\n\n const baseContextValue = React.useMemo(\n () => ({\n leftMode,\n setLeftMode,\n panelMode,\n setPanelMode,\n sidebarMode,\n setSidebarMode,\n inspectorMode,\n setInspectorMode,\n bottomMode,\n setBottomMode,\n hasLeft,\n setHasLeft,\n hasSidebar,\n setHasSidebar,\n currentBreakpoint,\n currentBreakpointReady,\n leftResolvedPresentation: devLeftPres,\n togglePane,\n expandPane,\n collapsePane,\n setSidebarToggleComputer,\n onLeftPres,\n onRailDefaults,\n onPanelDefaults,\n }),\n [\n leftMode,\n panelMode,\n sidebarMode,\n inspectorMode,\n bottomMode,\n hasLeft,\n hasSidebar,\n currentBreakpoint,\n currentBreakpointReady,\n devLeftPres,\n togglePane,\n expandPane,\n collapsePane,\n setSidebarToggleComputer,\n onLeftPres,\n onRailDefaults,\n onPanelDefaults,\n ],\n );\n\n // Organize children by type\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const isType = (el: React.ReactElement, comp: any) => React.isValidElement(el) && (el.type === comp || (el as any).type?.displayName === comp.displayName);\n\n const headerEls = childArray.filter((el) => isType(el, Header));\n const railEls = childArray.filter((el) => isType(el, Rail));\n const panelEls = childArray.filter((el) => isType(el, Panel));\n const sidebarEls = childArray.filter((el) => isType(el, Sidebar));\n const contentEls = childArray.filter((el) => isType(el, Content));\n const inspectorEls = childArray.filter((el) => isType(el, Inspector));\n const bottomEls = childArray.filter((el) => isType(el, Bottom));\n\n const heightStyle = React.useMemo(() => {\n if (height === 'full') return { height: '100vh' };\n if (height === 'auto') return { height: 'auto' };\n if (typeof height === 'string') return { height };\n if (typeof height === 'number') return { height: `${height}px` };\n return {};\n }, [height]);\n\n // Peek state (layout-only overlay without mode changes)\n const [peekTarget, setPeekTarget] = React.useState<PaneTarget | null>(null);\n const peekPane = React.useCallback((target: PaneTarget) => setPeekTarget(target), []);\n const clearPeek = React.useCallback(() => setPeekTarget(null), []);\n\n return (\n <div {...props} ref={ref} className={classNames('rt-ShellRoot', className)} style={{ ...heightStyle, ...props.style }}>\n <ShellProvider\n value={{\n ...baseContextValue,\n peekTarget,\n setPeekTarget,\n peekPane,\n clearPeek,\n }}\n >\n {headerEls}\n <div\n className=\"rt-ShellBody\"\n data-peek-target={peekTarget ?? undefined}\n style={\n peekTarget === 'rail' || peekTarget === 'panel'\n ? ({\n ['--peek-rail-width' as any]: `${railDefaultSizeRef.current}px`,\n } as React.CSSProperties)\n : undefined\n }\n >\n {hasLeftChildren && !hasSidebarChildren\n ? (() => {\n const firstRail = railEls[0] as any;\n const passthroughProps = firstRail\n ? {\n mode: firstRail.props?.mode,\n defaultMode: firstRail.props?.defaultMode,\n onModeChange: firstRail.props?.onModeChange,\n presentation: firstRail.props?.presentation,\n collapsible: firstRail.props?.collapsible,\n onExpand: firstRail.props?.onExpand,\n onCollapse: firstRail.props?.onCollapse,\n }\n : {};\n return (\n <Left {...(passthroughProps as any)}>\n {railEls}\n {panelEls}\n </Left>\n );\n })()\n : sidebarEls}\n {contentEls}\n {inspectorEls}\n </div>\n {bottomEls}\n </ShellProvider>\n </div>\n );\n});\nRoot.displayName = 'Shell.Root';\n\n// Header\ninterface ShellHeaderProps extends React.ComponentPropsWithoutRef<'header'> {\n height?: number;\n}\n\nconst Header = React.forwardRef<HTMLElement, ShellHeaderProps>(({ className, height = 64, style, ...props }, ref) => (\n <header\n {...props}\n ref={ref}\n className={classNames('rt-ShellHeader', className)}\n style={{\n ...style,\n ['--shell-header-height' as any]: `${height}px`,\n }}\n />\n));\nHeader.displayName = 'Shell.Header';\n\n// Pane Props Interface (shared by Panel, Sidebar, Inspector, Bottom)\ninterface PaneProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n mode?: PaneMode;\n defaultMode?: ResponsiveMode;\n onModeChange?: (mode: PaneMode) => void;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n /** Optional custom content inside the resizer handle (kept unstyled). */\n resizer?: React.ReactNode;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n snapPoints?: number[];\n snapTolerance?: number;\n collapseThreshold?: number;\n paneId?: string;\n persistence?: PaneSizePersistence;\n}\n\n// Left container (auto-created for Rail+Panel)\ninterface LeftProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n mode?: PaneMode;\n defaultMode?: ResponsiveMode;\n onModeChange?: (mode: PaneMode) => void;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n}\n\n// Rail (special case)\ninterface RailProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n mode?: PaneMode;\n defaultMode?: ResponsiveMode;\n onModeChange?: (mode: PaneMode) => void;\n expandedSize?: number;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n}\n\n// Left container - behaves like Inspector but contains Rail+Panel\nconst Left = React.forwardRef<HTMLDivElement, LeftProps>(\n ({ className, presentation = { initial: 'overlay', sm: 'fixed' }, mode, defaultMode = 'collapsed', onModeChange, collapsible = true, onExpand, onCollapse, children, style, ...props }, ref) => {\n const shell = useShell();\n const resolvedPresentation = useResponsivePresentation(presentation);\n const isOverlay = resolvedPresentation === 'overlay';\n const isStacked = resolvedPresentation === 'stacked';\n const localRef = React.useRef<HTMLDivElement | null>(null);\n // Publish resolved presentation so Root can gate peeking in overlay\n React.useEffect(() => {\n (shell as any).onLeftPres?.(resolvedPresentation);\n }, [shell, resolvedPresentation]);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n\n // Register with shell\n React.useEffect(() => {\n shell.setHasLeft(true);\n return () => shell.setHasLeft(false);\n }, [shell]);\n\n // Always-follow responsive defaultMode for uncontrolled Left (Rail stack)\n const resolveResponsiveMode = React.useCallback((): PaneMode => {\n if (typeof defaultMode === 'string') return defaultMode as PaneMode;\n const dm = defaultMode as Partial<Record<Breakpoint, PaneMode>> | undefined;\n if (dm && dm[shell.currentBreakpoint as Breakpoint]) {\n return dm[shell.currentBreakpoint as Breakpoint] as PaneMode;\n }\n const bpKeys = Object.keys(BREAKPOINTS) as Array<keyof typeof BREAKPOINTS>;\n const order: Breakpoint[] = ([...bpKeys].reverse() as Breakpoint[]).concat('initial' as Breakpoint);\n const startIdx = order.indexOf(shell.currentBreakpoint as Breakpoint);\n for (let i = startIdx + 1; i < order.length; i++) {\n const bp = order[i];\n if (dm && dm[bp]) {\n return dm[bp] as PaneMode;\n }\n }\n return 'collapsed';\n }, [defaultMode, shell.currentBreakpoint]);\n\n const lastBpRef = React.useRef<Breakpoint | null>(null);\n React.useEffect(() => {\n if (mode !== undefined) return; // controlled wins\n if (!shell.currentBreakpointReady) return; // avoid SSR mismatch\n if (lastBpRef.current === shell.currentBreakpoint) return; // only on bp change\n lastBpRef.current = shell.currentBreakpoint as Breakpoint;\n const next = resolveResponsiveMode();\n if (next !== shell.leftMode) {\n shell.setLeftMode(next);\n }\n }, [mode, shell.currentBreakpoint, shell.currentBreakpointReady, resolveResponsiveMode, shell.leftMode, shell.setLeftMode]);\n\n // Sync controlled mode\n React.useEffect(() => {\n if (mode !== undefined && shell.leftMode !== mode) {\n shell.setLeftMode(mode);\n }\n }, [mode, shell]);\n\n // Emit mode changes\n React.useEffect(() => {\n if (mode === undefined) {\n onModeChange?.(shell.leftMode);\n }\n }, [shell.leftMode, mode, onModeChange]);\n\n // Emit expand/collapse events\n React.useEffect(() => {\n if (shell.leftMode === 'expanded') {\n onExpand?.();\n } else {\n onCollapse?.();\n }\n }, [shell.leftMode, onExpand, onCollapse]);\n\n const isExpanded = shell.leftMode === 'expanded';\n\n // Left is not resizable; width derives from Rail/Panel.\n\n if (isOverlay) {\n const open = shell.leftMode === 'expanded';\n // Compute overlay width from child Rail/Panel expanded sizes\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const isType = (el: React.ReactElement, comp: any) => React.isValidElement(el) && el.type === comp;\n const railEl = childArray.find((el) => isType(el, Rail));\n const panelEl = childArray.find((el) => isType(el, Panel));\n const railSize = typeof (railEl as any)?.props?.expandedSize === 'number' ? (railEl as any).props.expandedSize : 64;\n const panelSize = typeof (panelEl as any)?.props?.expandedSize === 'number' ? (panelEl as any).props.expandedSize : 288;\n const hasRail = Boolean(railEl);\n const hasPanel = Boolean(panelEl);\n const overlayPx = (hasRail ? railSize : 0) + (shell.panelMode === 'expanded' && hasPanel ? panelSize : 0);\n return (\n <Sheet.Root open={open} onOpenChange={(o) => shell.setLeftMode(o ? 'expanded' : 'collapsed')}>\n <Sheet.Content\n side=\"start\"\n style={{ padding: 0 }}\n width={{\n initial: `${overlayPx}px`,\n }}\n >\n <VisuallyHidden>\n <Sheet.Title>Navigation</Sheet.Title>\n </VisuallyHidden>\n <div className=\"rt-ShellLeft\">{children}</div>\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n if (isStacked) {\n const open = shell.leftMode === 'expanded';\n // Compute floating width from child Rail/Panel expanded sizes (like overlay)\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const isType = (el: React.ReactElement, comp: any) => React.isValidElement(el) && el.type === comp;\n const railEl = childArray.find((el) => isType(el, Rail));\n const panelEl = childArray.find((el) => isType(el, Panel));\n const railSize = typeof (railEl as any)?.props?.expandedSize === 'number' ? (railEl as any).props.expandedSize : 64;\n const panelSize = typeof (panelEl as any)?.props?.expandedSize === 'number' ? (panelEl as any).props.expandedSize : 288;\n const hasRail = Boolean(railEl);\n const hasPanel = Boolean(panelEl);\n const includePanel = hasPanel && (shell.panelMode === 'expanded' || shell.peekTarget === 'panel');\n const floatingWidthPx = (hasRail ? railSize : 0) + (includePanel ? panelSize : 0);\n\n return (\n <div\n {...props}\n ref={setRef}\n className={classNames('rt-ShellLeft', className)}\n data-mode={shell.leftMode}\n data-peek={shell.peekTarget === 'left' || shell.peekTarget === 'rail' || shell.peekTarget === 'panel' || undefined}\n data-presentation={resolvedPresentation}\n style={{\n ...style,\n }}\n data-open={open || undefined}\n >\n {children}\n </div>\n );\n }\n\n return (\n <div\n {...props}\n ref={setRef}\n className={classNames('rt-ShellLeft', className)}\n data-mode={shell.leftMode}\n data-peek={shell.peekTarget === 'left' || shell.peekTarget === 'rail' || shell.peekTarget === 'panel' || undefined}\n data-presentation={resolvedPresentation}\n style={{\n ...style,\n }}\n >\n {children}\n </div>\n );\n },\n);\nLeft.displayName = 'Shell.Left';\n\nconst Rail = React.forwardRef<HTMLDivElement, RailProps>(\n ({ className, presentation, mode, defaultMode, onModeChange, expandedSize = 64, collapsible, onExpand, onCollapse, children, style, ...props }, ref) => {\n const shell = useShell();\n\n // Register expanded size with Left container\n React.useEffect(() => {\n (shell as any).onRailDefaults?.(expandedSize);\n }, [shell, expandedSize]);\n\n const isExpanded = shell.leftMode === 'expanded';\n\n return (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-ShellRail', className)}\n data-mode={shell.leftMode}\n data-peek={(shell.leftResolvedPresentation !== 'overlay' && shell.peekTarget === 'rail') || undefined}\n style={{\n ...style,\n ['--rail-size' as any]: `${expandedSize}px`,\n }}\n >\n <div className=\"rt-ShellRailContent\" data-visible={isExpanded || (shell.leftResolvedPresentation !== 'overlay' && shell.peekTarget === 'rail') || undefined}>\n {children}\n </div>\n </div>\n );\n },\n);\nRail.displayName = 'Shell.Rail';\n\n// Panel\ntype HandleComponent = React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<'div'> & React.RefAttributes<HTMLDivElement>>;\n\ntype PanelComponent = React.ForwardRefExoticComponent<Omit<PaneProps, 'defaultMode'> & React.RefAttributes<HTMLDivElement>> & { Handle: HandleComponent };\n\ntype SidebarComponent = React.ForwardRefExoticComponent<\n (Omit<PaneProps, 'mode' | 'defaultMode' | 'onModeChange'> & {\n mode?: SidebarMode;\n defaultMode?: ResponsiveSidebarMode;\n onModeChange?: (mode: SidebarMode) => void;\n thinSize?: number;\n toggleModes?: 'both' | 'single';\n }) &\n React.RefAttributes<HTMLDivElement>\n> & { Handle: HandleComponent };\n\ntype InspectorComponent = React.ForwardRefExoticComponent<PaneProps & React.RefAttributes<HTMLDivElement>> & { Handle: HandleComponent };\n\ntype BottomComponent = React.ForwardRefExoticComponent<PaneProps & React.RefAttributes<HTMLDivElement>> & { Handle: HandleComponent };\n\nconst Panel = React.forwardRef<HTMLDivElement, Omit<PaneProps, 'presentation' | 'defaultMode'>>(\n (\n {\n className,\n mode,\n onModeChange,\n expandedSize = 288,\n minSize,\n maxSize,\n resizable,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n ...props\n },\n ref,\n ) => {\n const shell = useShell();\n React.useEffect(() => {\n (shell as any).onPanelDefaults?.(expandedSize);\n }, [shell, expandedSize]);\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const handleChildren = childArray.filter((el: React.ReactElement) => React.isValidElement(el) && el.type === PanelHandle);\n const contentChildren = childArray.filter((el: React.ReactElement) => !(React.isValidElement(el) && el.type === PanelHandle));\n\n const isOverlay = shell.leftResolvedPresentation === 'overlay';\n\n // Derive a default persistence adapter from paneId if none provided\n const persistenceAdapter = React.useMemo(() => {\n if (!paneId || persistence) return persistence;\n const key = `kookie-ui:shell:panel:${paneId}`;\n const adapter: PaneSizePersistence = {\n load: () => {\n if (typeof window === 'undefined') return undefined;\n const v = window.localStorage.getItem(key);\n return v ? Number(v) : undefined;\n },\n save: (size: number) => {\n if (typeof window === 'undefined') return;\n window.localStorage.setItem(key, String(size));\n },\n };\n return adapter;\n }, [paneId, persistence]);\n\n // Load persisted size if configured (only in fixed presentation)\n React.useEffect(() => {\n let mounted = true;\n (async () => {\n if (!resizable || !persistenceAdapter?.load || isOverlay) return;\n const loaded = await persistenceAdapter.load();\n if (mounted && typeof loaded === 'number' && localRef.current) {\n localRef.current.style.setProperty('--panel-size', `${loaded}px`);\n onResize?.(loaded);\n }\n })();\n return () => {\n mounted = false;\n };\n }, [resizable, persistenceAdapter, onResize, isOverlay]);\n\n // In overlay, ensure panel uses the fixed expandedSize, ignoring any persisted size\n React.useEffect(() => {\n if (!localRef.current) return;\n if (isOverlay) {\n localRef.current.style.setProperty('--panel-size', `${expandedSize}px`);\n }\n }, [isOverlay, expandedSize]);\n\n // Ensure Left container width is auto whenever Panel is expanded in fixed presentation\n React.useEffect(() => {\n if (!localRef.current) return;\n if (shell.leftResolvedPresentation !== 'overlay' && shell.leftMode === 'expanded' && shell.panelMode === 'expanded') {\n const leftEl = (localRef.current.parentElement as HTMLElement) || null;\n try {\n leftEl?.style.removeProperty('width');\n } catch {}\n }\n }, [shell.leftResolvedPresentation, shell.leftMode, shell.panelMode]);\n\n const isExpanded = shell.leftMode === 'expanded' && shell.panelMode === 'expanded';\n\n // Provide resizer handle when fixed (not overlay)\n const handleEl =\n resizable && shell.leftResolvedPresentation !== 'overlay' && isExpanded ? (\n <PaneResizeContext.Provider\n value={{\n containerRef: localRef,\n cssVarName: '--panel-size',\n minSize: typeof minSize === 'number' ? minSize : 100,\n maxSize: typeof maxSize === 'number' ? maxSize : 800,\n defaultSize: expandedSize,\n orientation: 'vertical',\n edge: 'end',\n computeNext: (client, startClient, startSize) => {\n const isRtl = getComputedStyle(localRef.current!).direction === 'rtl';\n const delta = client - startClient;\n return startSize + (isRtl ? -delta : delta);\n },\n onResize,\n onResizeStart: (size) => {\n // Ensure Left container is not stuck with a fixed width in stacked\n const panelEl = localRef.current as HTMLElement | null;\n const leftEl = panelEl?.parentElement as HTMLElement | null;\n try {\n leftEl?.style.removeProperty('width');\n } catch {}\n onResizeStart?.(size);\n },\n onResizeEnd: (size) => {\n onResizeEnd?.(size);\n persistenceAdapter?.save?.(size);\n },\n target: 'panel',\n collapsible: Boolean(collapsible),\n snapPoints,\n snapTolerance: snapTolerance ?? 8,\n collapseThreshold,\n requestCollapse: () => shell.setPanelMode('collapsed'),\n requestToggle: () => shell.togglePane('panel'),\n }}\n >\n {handleChildren.length > 0 ? handleChildren.map((el, i) => React.cloneElement(el, { key: el.key ?? i })) : <PaneHandle />}\n </PaneResizeContext.Provider>\n ) : null;\n\n return (\n <div\n {...props}\n ref={setRef}\n className={classNames('rt-ShellPanel', className)}\n data-mode={shell.panelMode}\n data-visible={isExpanded || (shell.leftResolvedPresentation !== 'overlay' && shell.peekTarget === 'panel') || undefined}\n data-peek={(shell.leftResolvedPresentation !== 'overlay' && shell.peekTarget === 'panel') || undefined}\n style={{\n ...style,\n ['--panel-size' as any]: `${expandedSize}px`,\n }}\n >\n <div className=\"rt-ShellPanelContent\" data-visible={isExpanded || undefined}>\n {contentChildren}\n </div>\n {handleEl}\n </div>\n );\n },\n) as PanelComponent;\nPanel.displayName = 'Shell.Panel';\nPanel.Handle = PanelHandle;\n\n// Sidebar moved to ./_internal/shell-sidebar\n\n// Content (always required)\ninterface ShellContentProps extends React.ComponentPropsWithoutRef<'main'> {}\n\nconst Content = React.forwardRef<HTMLElement, ShellContentProps>(({ className, ...props }, ref) => <main {...props} ref={ref} className={classNames('rt-ShellContent', className)} />);\nContent.displayName = 'Shell.Content';\n\n// Inspector moved to ./_internal/shell-inspector\n\n// Bottom\n// Bottom moved to ./_internal/shell-bottom\n// (Bottom implementation extracted)\n\n// Trigger\n// PaneTarget type moved to shell.types.ts\ntype TriggerAction = 'toggle' | 'expand' | 'collapse';\n\ninterface TriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n target: PaneTarget;\n action?: TriggerAction;\n /**\n * Whether to show peek preview on hover when the target pane is collapsed.\n * Defaults to false.\n */\n peekOnHover?: boolean;\n}\n\nconst Trigger = React.forwardRef<HTMLButtonElement, TriggerProps>(({ target, action = 'toggle', peekOnHover, onClick, onMouseEnter, onMouseLeave, children, ...props }, ref) => {\n const shell = useShell();\n\n const handleClick = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n\n // Clear any active peek on this target before toggling to avoid sticky peek state\n if ((shell as any).peekTarget === target) {\n shell.clearPeek();\n }\n\n switch (action) {\n case 'toggle':\n shell.togglePane(target);\n break;\n case 'expand':\n shell.expandPane(target);\n break;\n case 'collapse':\n shell.collapsePane(target);\n break;\n }\n },\n [shell, target, action, onClick],\n );\n\n const isCollapsed = (() => {\n switch (target) {\n case 'left':\n case 'rail':\n return shell.leftMode === 'collapsed';\n case 'panel':\n return shell.leftMode === 'collapsed' || shell.panelMode === 'collapsed';\n case 'sidebar':\n return shell.sidebarMode === 'collapsed';\n case 'inspector':\n return shell.inspectorMode === 'collapsed';\n case 'bottom':\n return shell.bottomMode === 'collapsed';\n }\n })();\n\n const handleMouseEnter = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseEnter?.(event);\n if (!peekOnHover || !isCollapsed) return;\n // Use the actual target for peek behavior (not mapped to left)\n shell.peekPane(target);\n },\n [onMouseEnter, peekOnHover, isCollapsed, shell, target],\n );\n\n const handleMouseLeave = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseLeave?.(event);\n if (!peekOnHover) return;\n if ((shell as any).peekTarget === target) {\n shell.clearPeek();\n }\n },\n [onMouseLeave, peekOnHover, shell, target],\n );\n\n return (\n <button {...props} ref={ref} onClick={handleClick} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave} data-shell-trigger={target} data-shell-action={action}>\n {children}\n </button>\n );\n});\nTrigger.displayName = 'Shell.Trigger';\n\n// Exports\nexport {\n Root,\n Header,\n Left,\n Rail,\n Panel,\n Sidebar,\n Content,\n Inspector,\n Bottom,\n Trigger,\n useShell,\n useResponsivePresentation,\n type PaneMode,\n type SidebarMode,\n type ResponsivePresentation,\n type PaneTarget,\n type TriggerAction,\n};\n"],
5
- "mappings": "aA2BA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,UAAYC,MAAW,aACvB,MAAsB,aACtB,OAAS,kBAAAC,OAAsB,uBAC/B,OAAS,6BAA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,YACH,OAAOA,EAAM,gBAAkB,YACjC,IAAK,SACH,OAAOA,EAAM,aAAe,WAChC,CACF,GAAG,EAEG6D,EAAmBjK,EAAM,YAC5B+J,GAA+C,CAC9CH,IAAeG,CAAK,EAChB,GAACL,GAAe,CAACM,IAErB5D,EAAM,SAAS9B,CAAM,CACvB,EACA,CAACsF,EAAcF,EAAaM,EAAa5D,EAAO9B,CAAM,CACxD,EAEM4F,EAAmBlK,EAAM,YAC5B+J,GAA+C,CAC9CF,IAAeE,CAAK,EACfL,GACAtD,EAAc,aAAe9B,GAChC8B,EAAM,UAAU,CAEpB,EACA,CAACyD,EAAcH,EAAatD,EAAO9B,CAAM,CAC3C,EAEA,OACEtE,EAAA,cAAC,UAAQ,GAAG8B,EAAO,IAAKC,EAAK,QAAS+H,EAAa,aAAcG,EAAkB,aAAcC,EAAkB,qBAAoB5F,EAAQ,oBAAmBmF,GAC/J7H,CACH,CAEJ,CAAC,EACD4H,GAAQ,YAAc",
6
- "names": ["React", "classNames", "Sheet", "VisuallyHidden", "useResponsivePresentation", "PaneResizeContext", "PaneHandle", "PanelHandle", "Sidebar", "Bottom", "Inspector", "BREAKPOINTS", "ShellProvider", "useShell", "useBreakpoint", "currentBp", "setCurrentBp", "ready", "setReady", "mqls", "k", "q", "compute", "matched", "m", "next", "Root", "className", "children", "height", "props", "ref", "currentBreakpoint", "currentBreakpointReady", "leftMode", "setLeftMode", "panelMode", "setPanelMode", "sidebarMode", "setSidebarMode", "inspectorMode", "setInspectorMode", "bottomMode", "setBottomMode", "hasLeft", "setHasLeft", "hasSidebar", "setHasSidebar", "sidebarToggleComputerRef", "current", "setSidebarToggleComputer", "fn", "devLeftPres", "setDevLeftPres", "onLeftPres", "p", "railDefaultSizeRef", "panelDefaultSizeRef", "onRailDefaults", "size", "onPanelDefaults", "hasLeftChildren", "childArray", "isType", "el", "comp", "Rail", "Panel", "hasSidebarChildren", "togglePane", "target", "prev", "expandPane", "collapsePane", "baseContextValue", "headerEls", "Header", "railEls", "panelEls", "sidebarEls", "contentEls", "Content", "inspectorEls", "bottomEls", "heightStyle", "peekTarget", "setPeekTarget", "peekPane", "clearPeek", "firstRail", "passthroughProps", "Left", "style", "presentation", "mode", "defaultMode", "onModeChange", "collapsible", "onExpand", "onCollapse", "shell", "resolvedPresentation", "isOverlay", "isStacked", "localRef", "setRef", "node", "resolveResponsiveMode", "dm", "order", "startIdx", "i", "bp", "lastBpRef", "isExpanded", "open", "railEl", "panelEl", "railSize", "panelSize", "hasRail", "hasPanel", "overlayPx", "o", "includePanel", "floatingWidthPx", "expandedSize", "minSize", "maxSize", "resizable", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "handleChildren", "contentChildren", "persistenceAdapter", "key", "v", "mounted", "loaded", "leftEl", "handleEl", "client", "startClient", "startSize", "isRtl", "delta", "Trigger", "action", "peekOnHover", "onClick", "onMouseEnter", "onMouseLeave", "handleClick", "event", "isCollapsed", "handleMouseEnter", "handleMouseLeave"]
4
+ "sourcesContent": ["/**\n * Shell Component - Layout Engine + Chrome\n *\n * Philosophy:\n * - Shell = layout engine + chrome\n * - Manages layout state: expanded/collapsed, fixed/overlay, sizes\n * - Does not manage content/navigation state\n * - Provides unstyled primitives (slots, triggers)\n * - Enforces composition rules (Rail \u2194 Panel dependency, Sidebar exclusivity)\n *\n * Core Slots:\n * - Header: global top bar\n * - Rail: slim nav strip\n * - Panel: sidebar next to rail\n * - Sidebar: alternative to Rail+Panel (exclusive)\n * - Content: main work area\n * - Inspector: right-side panel\n * - Bottom: bottom panel\n *\n * Composition Rules:\n * - Rail + Panel: valid together (Rail collapse \u2192 Panel collapse)\n * - Sidebar: cannot coexist with Rail or Panel\n * - Content: always required\n * - Inspector/Bottom: optional, independent\n */\n'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport * as Sheet from './sheet.js';\nimport { Inset } from './inset.js';\nimport { VisuallyHidden } from './visually-hidden.js';\nimport { useResponsivePresentation } from './shell.hooks.js';\nimport { PaneResizeContext } from './_internal/shell-resize.js';\nimport { PaneHandle, PanelHandle, SidebarHandle, InspectorHandle, BottomHandle } from './_internal/shell-handles.js';\nimport { Sidebar } from './_internal/shell-sidebar.js';\nimport { Bottom } from './_internal/shell-bottom.js';\nimport { Inspector } from './_internal/shell-inspector.js';\nimport type { PresentationValue, ResponsivePresentation, PaneMode, SidebarMode, ResponsiveMode, ResponsiveSidebarMode, PaneSizePersistence, Breakpoint, PaneTarget } from './shell.types.js';\nimport { BREAKPOINTS } from './shell.types.js';\nimport { ShellProvider, useShell } from './shell.context.js';\n\n// Shell context is provided via ShellProvider (see shell.context.tsx)\n\n// Pane resize context moved to ./_internal/shell-resize\n\n// Local PaneHandle moved to ./_internal/shell-handles\n// Removed local PaneHandle implementation; using internal PaneHandle\n\n// Composed Handle wrappers per pane\n// Handles moved to ./_internal/shell-handles\n\n// Hook to resolve responsive presentation\n// useResponsivePresentation moved to shell.hooks.ts\n\n// Hook to resolve responsive mode defaults\n// Removed: defaultMode responsiveness\n\n// Hook to get current breakpoint\nfunction useBreakpoint(): { bp: Breakpoint; ready: boolean } {\n const [currentBp, setCurrentBp] = React.useState<Breakpoint>('initial');\n const [ready, setReady] = React.useState(false);\n\n React.useEffect(() => {\n if (typeof window === 'undefined') return;\n\n const queries: [key: keyof typeof BREAKPOINTS, query: string][] = Object.entries(BREAKPOINTS) as any;\n const mqls = queries.map(([k, q]) => [k, window.matchMedia(q)] as const);\n\n const compute = () => {\n // Highest matched wins\n const matched = mqls.filter(([, m]) => m.matches).map(([k]) => k);\n const next = (matched[matched.length - 1] as Breakpoint | undefined) ?? 'initial';\n setCurrentBp(next);\n setReady(true);\n };\n\n compute();\n mqls.forEach(([, m]) => m.addEventListener('change', compute));\n\n return () => {\n mqls.forEach(([, m]) => m.removeEventListener('change', compute));\n };\n }, []);\n\n return { bp: currentBp, ready };\n}\n\n// Root Component\ninterface ShellRootProps extends React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n height?: 'full' | 'auto' | string | number;\n}\n\nconst Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, children, height = 'full', ...props }, ref) => {\n const { bp: currentBreakpoint, ready: currentBreakpointReady } = useBreakpoint();\n\n // Pane state management\n const [leftMode, setLeftMode] = React.useState<PaneMode>('collapsed');\n const [panelMode, setPanelMode] = React.useState<PaneMode>('collapsed');\n const [sidebarMode, setSidebarMode] = React.useState<SidebarMode>('expanded');\n // Library-managed phase for sidebar presentation changes (thin \u2194 expanded)\n const [sidebarPhase, setSidebarPhase] = React.useState<'idle' | 'hiding' | 'resizing' | 'showing'>('idle');\n const [inspectorMode, setInspectorMode] = React.useState<PaneMode>('collapsed');\n const [bottomMode, setBottomMode] = React.useState<PaneMode>('collapsed');\n\n // Removed: defaultMode responsiveness and manual change tracking\n\n // Composition detection\n const [hasLeft, setHasLeft] = React.useState(false);\n const [hasSidebar, setHasSidebar] = React.useState(false);\n\n // Customizable sidebar toggle sequencing\n const sidebarToggleComputerRef = React.useRef<(current: SidebarMode) => SidebarMode>((current) => (current === 'collapsed' ? 'thin' : current === 'thin' ? 'expanded' : 'collapsed'));\n const setSidebarToggleComputer = React.useCallback((fn: (current: SidebarMode) => SidebarMode) => {\n sidebarToggleComputerRef.current = fn;\n }, []);\n\n // Left collapse cascades to Panel\n React.useEffect(() => {\n if (leftMode === 'collapsed') {\n setPanelMode('collapsed');\n }\n }, [leftMode]);\n\n // Composition validation\n React.useEffect(() => {\n if (hasSidebar && hasLeft) {\n console.warn('Shell: Sidebar cannot coexist with Rail or Panel. Use either Rail+Panel OR Sidebar.');\n }\n }, [hasSidebar, hasLeft]);\n\n // Left presentation + defaults from children\n const [devLeftPres, setDevLeftPres] = React.useState<PresentationValue | undefined>(undefined);\n const onLeftPres = React.useCallback((p: PresentationValue) => setDevLeftPres(p), []);\n const railDefaultSizeRef = React.useRef<number>(64);\n const panelDefaultSizeRef = React.useRef<number>(288);\n const onRailDefaults = React.useCallback((size: number) => {\n railDefaultSizeRef.current = size;\n }, []);\n const onPanelDefaults = React.useCallback((size: number) => {\n panelDefaultSizeRef.current = size;\n }, []);\n\n // Determine children presence for left composition\n const hasLeftChildren = React.useMemo(() => {\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const isType = (el: React.ReactElement, comp: any) => React.isValidElement(el) && (el.type === comp || (el as any).type?.displayName === comp.displayName);\n return childArray.some((el) => isType(el, Rail) || isType(el, Panel));\n }, [children]);\n\n const hasSidebarChildren = React.useMemo(() => {\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const isType = (el: React.ReactElement, comp: any) => React.isValidElement(el) && (el.type === comp || (el as any).type?.displayName === comp.displayName);\n return childArray.some((el) => isType(el, Sidebar));\n }, [children]);\n\n const togglePane = React.useCallback(\n (target: PaneTarget) => {\n switch (target) {\n case 'left':\n case 'rail':\n setLeftMode((prev) => (prev === 'expanded' ? 'collapsed' : 'expanded'));\n break;\n case 'panel':\n // Panel toggle: expand left if collapsed, then toggle panel\n if (leftMode === 'collapsed') {\n setLeftMode('expanded');\n setPanelMode('expanded');\n } else {\n setPanelMode((prev) => (prev === 'expanded' ? 'collapsed' : 'expanded'));\n }\n break;\n case 'sidebar': {\n // Orchestrate thin \u2194 expanded sequencing: fade out \u2192 change mode \u2192 fade in\n const next = sidebarToggleComputerRef.current(sidebarMode as SidebarMode);\n const isWidthOnlyChange = sidebarMode !== next && sidebarMode !== 'collapsed' && next !== 'collapsed';\n if (!isWidthOnlyChange) {\n setSidebarMode(next);\n break;\n }\n const SMALL_MS = 150;\n setSidebarPhase('hiding');\n window.setTimeout(() => {\n setSidebarPhase('resizing');\n setSidebarMode(next);\n window.setTimeout(() => {\n setSidebarPhase('showing');\n window.setTimeout(() => setSidebarPhase('idle'), SMALL_MS);\n }, SMALL_MS);\n }, SMALL_MS);\n break;\n }\n case 'inspector':\n setInspectorMode((prev) => (prev === 'expanded' ? 'collapsed' : 'expanded'));\n break;\n case 'bottom':\n setBottomMode((prev) => (prev === 'expanded' ? 'collapsed' : 'expanded'));\n break;\n }\n },\n [leftMode, sidebarMode],\n );\n\n const expandPane = React.useCallback((target: PaneTarget) => {\n switch (target) {\n case 'left':\n case 'rail':\n setLeftMode('expanded');\n break;\n case 'panel':\n setLeftMode('expanded');\n setPanelMode('expanded');\n break;\n case 'sidebar':\n setSidebarMode('expanded');\n break;\n case 'inspector':\n setInspectorMode('expanded');\n break;\n case 'bottom':\n setBottomMode('expanded');\n break;\n }\n }, []);\n\n const collapsePane = React.useCallback((target: PaneTarget) => {\n switch (target) {\n case 'left':\n case 'rail':\n setLeftMode('collapsed');\n break;\n case 'panel':\n setPanelMode('collapsed');\n break;\n case 'sidebar':\n setSidebarMode('collapsed');\n break;\n case 'inspector':\n setInspectorMode('collapsed');\n break;\n case 'bottom':\n setBottomMode('collapsed');\n break;\n }\n }, []);\n\n const baseContextValue = React.useMemo(\n () => ({\n leftMode,\n setLeftMode,\n panelMode,\n setPanelMode,\n sidebarMode,\n setSidebarMode,\n inspectorMode,\n setInspectorMode,\n bottomMode,\n setBottomMode,\n sidebarPhase,\n hasLeft,\n setHasLeft,\n hasSidebar,\n setHasSidebar,\n currentBreakpoint,\n currentBreakpointReady,\n leftResolvedPresentation: devLeftPres,\n togglePane,\n expandPane,\n collapsePane,\n setSidebarToggleComputer,\n onLeftPres,\n onRailDefaults,\n onPanelDefaults,\n }),\n [\n leftMode,\n panelMode,\n sidebarMode,\n inspectorMode,\n bottomMode,\n sidebarPhase,\n hasLeft,\n hasSidebar,\n currentBreakpoint,\n currentBreakpointReady,\n devLeftPres,\n togglePane,\n expandPane,\n collapsePane,\n setSidebarToggleComputer,\n onLeftPres,\n onRailDefaults,\n onPanelDefaults,\n ],\n );\n\n // Organize children by type\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const isType = (el: React.ReactElement, comp: any) => React.isValidElement(el) && (el.type === comp || (el as any).type?.displayName === comp.displayName);\n\n const headerEls = childArray.filter((el) => isType(el, Header));\n const railEls = childArray.filter((el) => isType(el, Rail));\n const panelEls = childArray.filter((el) => isType(el, Panel));\n const sidebarEls = childArray.filter((el) => isType(el, Sidebar));\n const contentEls = childArray.filter((el) => isType(el, Content));\n const inspectorEls = childArray.filter((el) => isType(el, Inspector));\n const bottomEls = childArray.filter((el) => isType(el, Bottom));\n\n const heightStyle = React.useMemo(() => {\n if (height === 'full') return { height: '100vh' };\n if (height === 'auto') return { height: 'auto' };\n if (typeof height === 'string') return { height };\n if (typeof height === 'number') return { height: `${height}px` };\n return {};\n }, [height]);\n\n // Peek state (layout-only overlay without mode changes)\n const [peekTarget, setPeekTarget] = React.useState<PaneTarget | null>(null);\n const peekPane = React.useCallback((target: PaneTarget) => setPeekTarget(target), []);\n const clearPeek = React.useCallback(() => setPeekTarget(null), []);\n\n return (\n <div {...props} ref={ref} className={classNames('rt-ShellRoot', className)} style={{ ...heightStyle, ...props.style }}>\n <ShellProvider\n value={{\n ...baseContextValue,\n peekTarget,\n setPeekTarget,\n peekPane,\n clearPeek,\n }}\n >\n {headerEls}\n <div\n className=\"rt-ShellBody\"\n data-peek-target={peekTarget ?? undefined}\n style={\n peekTarget === 'rail' || peekTarget === 'panel'\n ? ({\n ['--peek-rail-width' as any]: `${railDefaultSizeRef.current}px`,\n } as React.CSSProperties)\n : undefined\n }\n >\n {hasLeftChildren && !hasSidebarChildren\n ? (() => {\n const firstRail = railEls[0] as any;\n const passthroughProps = firstRail\n ? {\n mode: firstRail.props?.mode,\n defaultMode: firstRail.props?.defaultMode,\n onModeChange: firstRail.props?.onModeChange,\n presentation: firstRail.props?.presentation,\n collapsible: firstRail.props?.collapsible,\n onExpand: firstRail.props?.onExpand,\n onCollapse: firstRail.props?.onCollapse,\n }\n : {};\n return (\n <Left {...(passthroughProps as any)}>\n {railEls}\n {panelEls}\n </Left>\n );\n })()\n : sidebarEls}\n {contentEls}\n {inspectorEls}\n </div>\n {bottomEls}\n </ShellProvider>\n </div>\n );\n});\nRoot.displayName = 'Shell.Root';\n\n// Header\ninterface ShellHeaderProps extends React.ComponentPropsWithoutRef<'header'> {\n height?: number;\n}\n\nconst Header = React.forwardRef<HTMLElement, ShellHeaderProps>(({ className, height = 64, style, ...props }, ref) => (\n <header\n {...props}\n ref={ref}\n className={classNames('rt-ShellHeader', className)}\n style={{\n ...style,\n ['--shell-header-height' as any]: `${height}px`,\n }}\n />\n));\nHeader.displayName = 'Shell.Header';\n\n// Pane Props Interface (shared by Panel, Sidebar, Inspector, Bottom)\ninterface PaneProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n mode?: PaneMode;\n defaultMode?: ResponsiveMode;\n onModeChange?: (mode: PaneMode) => void;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n /** Optional custom content inside the resizer handle (kept unstyled). */\n resizer?: React.ReactNode;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n snapPoints?: number[];\n snapTolerance?: number;\n collapseThreshold?: number;\n paneId?: string;\n persistence?: PaneSizePersistence;\n}\n\n// Left container (auto-created for Rail+Panel)\ninterface LeftProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n mode?: PaneMode;\n defaultMode?: ResponsiveMode;\n onModeChange?: (mode: PaneMode) => void;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n}\n\n// Rail (special case)\ninterface RailProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n mode?: PaneMode;\n defaultMode?: ResponsiveMode;\n onModeChange?: (mode: PaneMode) => void;\n expandedSize?: number;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n}\n\n// Left container - behaves like Inspector but contains Rail+Panel\nconst Left = React.forwardRef<HTMLDivElement, LeftProps>(\n ({ className, presentation = { initial: 'overlay', sm: 'fixed' }, mode, defaultMode = 'collapsed', onModeChange, collapsible = true, onExpand, onCollapse, children, style, ...props }, ref) => {\n const shell = useShell();\n const resolvedPresentation = useResponsivePresentation(presentation);\n const isOverlay = resolvedPresentation === 'overlay';\n const isStacked = resolvedPresentation === 'stacked';\n const localRef = React.useRef<HTMLDivElement | null>(null);\n // Publish resolved presentation so Root can gate peeking in overlay\n React.useEffect(() => {\n (shell as any).onLeftPres?.(resolvedPresentation);\n }, [shell, resolvedPresentation]);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n\n // Register with shell\n React.useEffect(() => {\n shell.setHasLeft(true);\n return () => shell.setHasLeft(false);\n }, [shell]);\n\n // Always-follow responsive defaultMode for uncontrolled Left (Rail stack)\n const resolveResponsiveMode = React.useCallback((): PaneMode => {\n if (typeof defaultMode === 'string') return defaultMode as PaneMode;\n const dm = defaultMode as Partial<Record<Breakpoint, PaneMode>> | undefined;\n if (dm && dm[shell.currentBreakpoint as Breakpoint]) {\n return dm[shell.currentBreakpoint as Breakpoint] as PaneMode;\n }\n const bpKeys = Object.keys(BREAKPOINTS) as Array<keyof typeof BREAKPOINTS>;\n const order: Breakpoint[] = ([...bpKeys].reverse() as Breakpoint[]).concat('initial' as Breakpoint);\n const startIdx = order.indexOf(shell.currentBreakpoint as Breakpoint);\n for (let i = startIdx + 1; i < order.length; i++) {\n const bp = order[i];\n if (dm && dm[bp]) {\n return dm[bp] as PaneMode;\n }\n }\n return 'collapsed';\n }, [defaultMode, shell.currentBreakpoint]);\n\n const lastBpRef = React.useRef<Breakpoint | null>(null);\n React.useEffect(() => {\n if (mode !== undefined) return; // controlled wins\n if (!shell.currentBreakpointReady) return; // avoid SSR mismatch\n if (lastBpRef.current === shell.currentBreakpoint) return; // only on bp change\n lastBpRef.current = shell.currentBreakpoint as Breakpoint;\n const next = resolveResponsiveMode();\n if (next !== shell.leftMode) {\n shell.setLeftMode(next);\n }\n }, [mode, shell.currentBreakpoint, shell.currentBreakpointReady, resolveResponsiveMode, shell.leftMode, shell.setLeftMode]);\n\n // Sync controlled mode\n React.useEffect(() => {\n if (mode !== undefined && shell.leftMode !== mode) {\n shell.setLeftMode(mode);\n }\n }, [mode, shell]);\n\n // Emit mode changes\n React.useEffect(() => {\n if (mode === undefined) {\n onModeChange?.(shell.leftMode);\n }\n }, [shell.leftMode, mode, onModeChange]);\n\n // Emit expand/collapse events\n React.useEffect(() => {\n if (shell.leftMode === 'expanded') {\n onExpand?.();\n } else {\n onCollapse?.();\n }\n }, [shell.leftMode, onExpand, onCollapse]);\n\n const isExpanded = shell.leftMode === 'expanded';\n\n // Left is not resizable; width derives from Rail/Panel.\n\n if (isOverlay) {\n const open = shell.leftMode === 'expanded';\n // Compute overlay width from child Rail/Panel expanded sizes\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const isType = (el: React.ReactElement, comp: any) => React.isValidElement(el) && el.type === comp;\n const railEl = childArray.find((el) => isType(el, Rail));\n const panelEl = childArray.find((el) => isType(el, Panel));\n const railSize = typeof (railEl as any)?.props?.expandedSize === 'number' ? (railEl as any).props.expandedSize : 64;\n const panelSize = typeof (panelEl as any)?.props?.expandedSize === 'number' ? (panelEl as any).props.expandedSize : 288;\n const hasRail = Boolean(railEl);\n const hasPanel = Boolean(panelEl);\n const overlayPx = (hasRail ? railSize : 0) + (shell.panelMode === 'expanded' && hasPanel ? panelSize : 0);\n return (\n <Sheet.Root open={open} onOpenChange={(o) => shell.setLeftMode(o ? 'expanded' : 'collapsed')}>\n <Sheet.Content\n side=\"start\"\n style={{ padding: 0 }}\n width={{\n initial: `${overlayPx}px`,\n }}\n >\n <VisuallyHidden>\n <Sheet.Title>Navigation</Sheet.Title>\n </VisuallyHidden>\n <div className=\"rt-ShellLeft\">{children}</div>\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n if (isStacked) {\n const open = shell.leftMode === 'expanded';\n // Compute floating width from child Rail/Panel expanded sizes (like overlay)\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const isType = (el: React.ReactElement, comp: any) => React.isValidElement(el) && el.type === comp;\n const railEl = childArray.find((el) => isType(el, Rail));\n const panelEl = childArray.find((el) => isType(el, Panel));\n const railSize = typeof (railEl as any)?.props?.expandedSize === 'number' ? (railEl as any).props.expandedSize : 64;\n const panelSize = typeof (panelEl as any)?.props?.expandedSize === 'number' ? (panelEl as any).props.expandedSize : 288;\n const hasRail = Boolean(railEl);\n const hasPanel = Boolean(panelEl);\n const includePanel = hasPanel && (shell.panelMode === 'expanded' || shell.peekTarget === 'panel');\n const floatingWidthPx = (hasRail ? railSize : 0) + (includePanel ? panelSize : 0);\n\n return (\n <div\n {...props}\n ref={setRef}\n className={classNames('rt-ShellLeft', className)}\n data-mode={shell.leftMode}\n data-peek={shell.peekTarget === 'left' || shell.peekTarget === 'rail' || shell.peekTarget === 'panel' || undefined}\n data-presentation={resolvedPresentation}\n style={{\n ...style,\n }}\n data-open={open || undefined}\n >\n {children}\n </div>\n );\n }\n\n return (\n <div\n {...props}\n ref={setRef}\n className={classNames('rt-ShellLeft', className)}\n data-mode={shell.leftMode}\n data-peek={shell.peekTarget === 'left' || shell.peekTarget === 'rail' || shell.peekTarget === 'panel' || undefined}\n data-presentation={resolvedPresentation}\n style={{\n ...style,\n }}\n >\n {children}\n </div>\n );\n },\n);\nLeft.displayName = 'Shell.Left';\n\nconst Rail = React.forwardRef<HTMLDivElement, RailProps>(\n ({ className, presentation, mode, defaultMode, onModeChange, expandedSize = 64, collapsible, onExpand, onCollapse, children, style, ...props }, ref) => {\n const shell = useShell();\n\n // Register expanded size with Left container\n React.useEffect(() => {\n (shell as any).onRailDefaults?.(expandedSize);\n }, [shell, expandedSize]);\n\n const isExpanded = shell.leftMode === 'expanded';\n\n return (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-ShellRail', className)}\n data-mode={shell.leftMode}\n data-peek={(shell.leftResolvedPresentation !== 'overlay' && shell.peekTarget === 'rail') || undefined}\n style={{\n ...style,\n ['--rail-size' as any]: `${expandedSize}px`,\n }}\n >\n <div className=\"rt-ShellRailContent\" data-visible={isExpanded || (shell.leftResolvedPresentation !== 'overlay' && shell.peekTarget === 'rail') || undefined}>\n {children}\n </div>\n </div>\n );\n },\n);\nRail.displayName = 'Shell.Rail';\n\n// Panel\ntype HandleComponent = React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<'div'> & React.RefAttributes<HTMLDivElement>>;\n\ntype PanelComponent = React.ForwardRefExoticComponent<Omit<PaneProps, 'defaultMode'> & React.RefAttributes<HTMLDivElement>> & { Handle: HandleComponent };\n\ntype SidebarComponent = React.ForwardRefExoticComponent<\n (Omit<PaneProps, 'mode' | 'defaultMode' | 'onModeChange'> & {\n mode?: SidebarMode;\n defaultMode?: ResponsiveSidebarMode;\n onModeChange?: (mode: SidebarMode) => void;\n thinSize?: number;\n toggleModes?: 'both' | 'single';\n }) &\n React.RefAttributes<HTMLDivElement>\n> & { Handle: HandleComponent };\n\ntype InspectorComponent = React.ForwardRefExoticComponent<PaneProps & React.RefAttributes<HTMLDivElement>> & { Handle: HandleComponent };\n\ntype BottomComponent = React.ForwardRefExoticComponent<PaneProps & React.RefAttributes<HTMLDivElement>> & { Handle: HandleComponent };\n\nconst Panel = React.forwardRef<HTMLDivElement, Omit<PaneProps, 'presentation' | 'defaultMode'>>(\n (\n {\n className,\n mode,\n onModeChange,\n expandedSize = 288,\n minSize,\n maxSize,\n resizable,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n ...props\n },\n ref,\n ) => {\n const shell = useShell();\n React.useEffect(() => {\n (shell as any).onPanelDefaults?.(expandedSize);\n }, [shell, expandedSize]);\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const handleChildren = childArray.filter((el: React.ReactElement) => React.isValidElement(el) && el.type === PanelHandle);\n const contentChildren = childArray.filter((el: React.ReactElement) => !(React.isValidElement(el) && el.type === PanelHandle));\n\n const isOverlay = shell.leftResolvedPresentation === 'overlay';\n\n // Derive a default persistence adapter from paneId if none provided\n const persistenceAdapter = React.useMemo(() => {\n if (!paneId || persistence) return persistence;\n const key = `kookie-ui:shell:panel:${paneId}`;\n const adapter: PaneSizePersistence = {\n load: () => {\n if (typeof window === 'undefined') return undefined;\n const v = window.localStorage.getItem(key);\n return v ? Number(v) : undefined;\n },\n save: (size: number) => {\n if (typeof window === 'undefined') return;\n window.localStorage.setItem(key, String(size));\n },\n };\n return adapter;\n }, [paneId, persistence]);\n\n // Load persisted size if configured (only in fixed presentation)\n React.useEffect(() => {\n let mounted = true;\n (async () => {\n if (!resizable || !persistenceAdapter?.load || isOverlay) return;\n const loaded = await persistenceAdapter.load();\n if (mounted && typeof loaded === 'number' && localRef.current) {\n localRef.current.style.setProperty('--panel-size', `${loaded}px`);\n onResize?.(loaded);\n }\n })();\n return () => {\n mounted = false;\n };\n }, [resizable, persistenceAdapter, onResize, isOverlay]);\n\n // In overlay, ensure panel uses the fixed expandedSize, ignoring any persisted size\n React.useEffect(() => {\n if (!localRef.current) return;\n if (isOverlay) {\n localRef.current.style.setProperty('--panel-size', `${expandedSize}px`);\n }\n }, [isOverlay, expandedSize]);\n\n // Ensure Left container width is auto whenever Panel is expanded in fixed presentation\n React.useEffect(() => {\n if (!localRef.current) return;\n if (shell.leftResolvedPresentation !== 'overlay' && shell.leftMode === 'expanded' && shell.panelMode === 'expanded') {\n const leftEl = (localRef.current.parentElement as HTMLElement) || null;\n try {\n leftEl?.style.removeProperty('width');\n } catch {}\n }\n }, [shell.leftResolvedPresentation, shell.leftMode, shell.panelMode]);\n\n const isExpanded = shell.leftMode === 'expanded' && shell.panelMode === 'expanded';\n\n // Provide resizer handle when fixed (not overlay)\n const handleEl =\n resizable && shell.leftResolvedPresentation !== 'overlay' && isExpanded ? (\n <PaneResizeContext.Provider\n value={{\n containerRef: localRef,\n cssVarName: '--panel-size',\n minSize: typeof minSize === 'number' ? minSize : 100,\n maxSize: typeof maxSize === 'number' ? maxSize : 800,\n defaultSize: expandedSize,\n orientation: 'vertical',\n edge: 'end',\n computeNext: (client, startClient, startSize) => {\n const isRtl = getComputedStyle(localRef.current!).direction === 'rtl';\n const delta = client - startClient;\n return startSize + (isRtl ? -delta : delta);\n },\n onResize,\n onResizeStart: (size) => {\n // Ensure Left container is not stuck with a fixed width in stacked\n const panelEl = localRef.current as HTMLElement | null;\n const leftEl = panelEl?.parentElement as HTMLElement | null;\n try {\n leftEl?.style.removeProperty('width');\n } catch {}\n onResizeStart?.(size);\n },\n onResizeEnd: (size) => {\n onResizeEnd?.(size);\n persistenceAdapter?.save?.(size);\n },\n target: 'panel',\n collapsible: Boolean(collapsible),\n snapPoints,\n snapTolerance: snapTolerance ?? 8,\n collapseThreshold,\n requestCollapse: () => shell.setPanelMode('collapsed'),\n requestToggle: () => shell.togglePane('panel'),\n }}\n >\n {handleChildren.length > 0 ? handleChildren.map((el, i) => React.cloneElement(el, { key: el.key ?? i })) : <PaneHandle />}\n </PaneResizeContext.Provider>\n ) : null;\n\n return (\n <div\n {...props}\n ref={setRef}\n className={classNames('rt-ShellPanel', className)}\n data-mode={shell.panelMode}\n data-visible={isExpanded || (shell.leftResolvedPresentation !== 'overlay' && shell.peekTarget === 'panel') || undefined}\n data-peek={(shell.leftResolvedPresentation !== 'overlay' && shell.peekTarget === 'panel') || undefined}\n style={{\n ...style,\n ['--panel-size' as any]: `${expandedSize}px`,\n }}\n >\n <div className=\"rt-ShellPanelContent\" data-visible={isExpanded || undefined}>\n {contentChildren}\n </div>\n {handleEl}\n </div>\n );\n },\n) as PanelComponent;\nPanel.displayName = 'Shell.Panel';\nPanel.Handle = PanelHandle;\n\n// Sidebar moved to ./_internal/shell-sidebar\n\n// Content (always required)\ninterface ShellContentProps extends React.ComponentPropsWithoutRef<'main'> {}\n\nconst Content = React.forwardRef<HTMLElement, ShellContentProps>(({ className, ...props }, ref) => <main {...props} ref={ref} className={classNames('rt-ShellContent', className)} />);\nContent.displayName = 'Shell.Content';\n\n// Inspector moved to ./_internal/shell-inspector\n\n// Bottom\n// Bottom moved to ./_internal/shell-bottom\n// (Bottom implementation extracted)\n\n// Trigger\n// PaneTarget type moved to shell.types.ts\ntype TriggerAction = 'toggle' | 'expand' | 'collapse';\n\ninterface TriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n target: PaneTarget;\n action?: TriggerAction;\n /**\n * Whether to show peek preview on hover when the target pane is collapsed.\n * Defaults to false.\n */\n peekOnHover?: boolean;\n}\n\nconst Trigger = React.forwardRef<HTMLButtonElement, TriggerProps>(({ target, action = 'toggle', peekOnHover, onClick, onMouseEnter, onMouseLeave, children, ...props }, ref) => {\n const shell = useShell();\n\n const handleClick = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n\n // Clear any active peek on this target before toggling to avoid sticky peek state\n if ((shell as any).peekTarget === target) {\n shell.clearPeek();\n }\n\n switch (action) {\n case 'toggle':\n shell.togglePane(target);\n break;\n case 'expand':\n shell.expandPane(target);\n break;\n case 'collapse':\n shell.collapsePane(target);\n break;\n }\n },\n [shell, target, action, onClick],\n );\n\n const isCollapsed = (() => {\n switch (target) {\n case 'left':\n case 'rail':\n return shell.leftMode === 'collapsed';\n case 'panel':\n return shell.leftMode === 'collapsed' || shell.panelMode === 'collapsed';\n case 'sidebar':\n return shell.sidebarMode === 'collapsed';\n case 'inspector':\n return shell.inspectorMode === 'collapsed';\n case 'bottom':\n return shell.bottomMode === 'collapsed';\n }\n })();\n\n const handleMouseEnter = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseEnter?.(event);\n if (!peekOnHover || !isCollapsed) return;\n // Use the actual target for peek behavior (not mapped to left)\n shell.peekPane(target);\n },\n [onMouseEnter, peekOnHover, isCollapsed, shell, target],\n );\n\n const handleMouseLeave = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseLeave?.(event);\n if (!peekOnHover) return;\n if ((shell as any).peekTarget === target) {\n shell.clearPeek();\n }\n },\n [onMouseLeave, peekOnHover, shell, target],\n );\n\n return (\n <button {...props} ref={ref} onClick={handleClick} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave} data-shell-trigger={target} data-shell-action={action}>\n {children}\n </button>\n );\n});\nTrigger.displayName = 'Shell.Trigger';\n\n// Exports\nexport {\n Root,\n Header,\n Left,\n Rail,\n Panel,\n Sidebar,\n Content,\n Inspector,\n Bottom,\n Trigger,\n useShell,\n useResponsivePresentation,\n type PaneMode,\n type SidebarMode,\n type ResponsivePresentation,\n type PaneTarget,\n type TriggerAction,\n};\n"],
5
+ "mappings": "aA2BA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,UAAYC,MAAW,aACvB,MAAsB,aACtB,OAAS,kBAAAC,OAAsB,uBAC/B,OAAS,6BAAAC,OAAiC,mBAC1C,OAAS,qBAAAC,OAAyB,8BAClC,OAAS,cAAAC,GAAY,eAAAC,MAAiE,+BACtF,OAAS,WAAAC,MAAe,+BACxB,OAAS,UAAAC,OAAc,8BACvB,OAAS,aAAAC,OAAiB,iCAE1B,OAAS,eAAAC,OAAmB,mBAC5B,OAAS,iBAAAC,GAAe,YAAAC,MAAgB,qBAmBxC,SAASC,IAAoD,CAC3D,KAAM,CAACC,EAAWC,CAAY,EAAIhB,EAAM,SAAqB,SAAS,EAChE,CAACiB,EAAOC,CAAQ,EAAIlB,EAAM,SAAS,EAAK,EAE9C,OAAAA,EAAM,UAAU,IAAM,CACpB,GAAI,OAAO,OAAW,IAAa,OAGnC,MAAMmB,EAD4D,OAAO,QAAQR,EAAW,EACvE,IAAI,CAAC,CAACS,EAAGC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C,CACF,GAAG,EAEG6D,EAAmBpK,EAAM,YAC5BkK,GAA+C,CAC9CH,IAAeG,CAAK,EAChB,GAACL,GAAe,CAACM,IAErB5D,EAAM,SAAS/B,CAAM,CACvB,EACA,CAACuF,EAAcF,EAAaM,EAAa5D,EAAO/B,CAAM,CACxD,EAEM6F,EAAmBrK,EAAM,YAC5BkK,GAA+C,CAC9CF,IAAeE,CAAK,EACfL,GACAtD,EAAc,aAAe/B,GAChC+B,EAAM,UAAU,CAEpB,EACA,CAACyD,EAAcH,EAAatD,EAAO/B,CAAM,CAC3C,EAEA,OACExE,EAAA,cAAC,UAAQ,GAAG8B,EAAO,IAAKC,EAAK,QAASkI,EAAa,aAAcG,EAAkB,aAAcC,EAAkB,qBAAoB7F,EAAQ,oBAAmBoF,GAC/JhI,CACH,CAEJ,CAAC,EACD+H,GAAQ,YAAc",
6
+ "names": ["React", "classNames", "Sheet", "VisuallyHidden", "useResponsivePresentation", "PaneResizeContext", "PaneHandle", "PanelHandle", "Sidebar", "Bottom", "Inspector", "BREAKPOINTS", "ShellProvider", "useShell", "useBreakpoint", "currentBp", "setCurrentBp", "ready", "setReady", "mqls", "k", "q", "compute", "matched", "m", "next", "Root", "className", "children", "height", "props", "ref", "currentBreakpoint", "currentBreakpointReady", "leftMode", "setLeftMode", "panelMode", "setPanelMode", "sidebarMode", "setSidebarMode", "sidebarPhase", "setSidebarPhase", "inspectorMode", "setInspectorMode", "bottomMode", "setBottomMode", "hasLeft", "setHasLeft", "hasSidebar", "setHasSidebar", "sidebarToggleComputerRef", "current", "setSidebarToggleComputer", "fn", "devLeftPres", "setDevLeftPres", "onLeftPres", "p", "railDefaultSizeRef", "panelDefaultSizeRef", "onRailDefaults", "size", "onPanelDefaults", "hasLeftChildren", "childArray", "isType", "el", "comp", "Rail", "Panel", "hasSidebarChildren", "togglePane", "target", "prev", "SMALL_MS", "expandPane", "collapsePane", "baseContextValue", "headerEls", "Header", "railEls", "panelEls", "sidebarEls", "contentEls", "Content", "inspectorEls", "bottomEls", "heightStyle", "peekTarget", "setPeekTarget", "peekPane", "clearPeek", "firstRail", "passthroughProps", "Left", "style", "presentation", "mode", "defaultMode", "onModeChange", "collapsible", "onExpand", "onCollapse", "shell", "resolvedPresentation", "isOverlay", "isStacked", "localRef", "setRef", "node", "resolveResponsiveMode", "dm", "order", "startIdx", "i", "bp", "lastBpRef", "isExpanded", "open", "railEl", "panelEl", "railSize", "panelSize", "hasRail", "hasPanel", "overlayPx", "o", "includePanel", "floatingWidthPx", "expandedSize", "minSize", "maxSize", "resizable", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "handleChildren", "contentChildren", "persistenceAdapter", "key", "v", "mounted", "loaded", "leftEl", "handleEl", "client", "startClient", "startSize", "isRtl", "delta", "Trigger", "action", "peekOnHover", "onClick", "onMouseEnter", "onMouseLeave", "handleClick", "event", "isCollapsed", "handleMouseEnter", "handleMouseLeave"]
7
7
  }
@@ -15,6 +15,12 @@ type BadgeConfig = {
15
15
  };
16
16
  type SidebarOwnProps = GetPropDefTypes<typeof sidebarPropDefs>;
17
17
  interface SidebarProps extends ComponentPropsWithout<'div', RemovedProps>, SidebarOwnProps {
18
+ /**
19
+ * Presentational mode independent of Shell.
20
+ * 'thin' renders a rail-style sidebar, 'expanded' renders a panel-style sidebar.
21
+ * If both `presentation` and `layout` are provided, `presentation` takes precedence.
22
+ */
23
+ presentation?: 'thin' | 'expanded';
18
24
  }
19
25
  declare const Sidebar: React.ForwardRefExoticComponent<SidebarProps & React.RefAttributes<HTMLDivElement>>;
20
26
  interface SidebarContentProps extends React.ComponentPropsWithoutRef<'div'> {
@@ -129,5 +135,5 @@ export { Sidebar as Root, SidebarContent as Content, SidebarHeader as Header, Si
129
135
  * - Justification: rt-justify-between, rt-justify-center, rt-justify-start, rt-justify-end
130
136
  * - Gap: rt-gap-1, rt-gap-2, rt-gap-3, rt-gap-4
131
137
  */
132
- export type { SidebarProps as RootProps, SidebarContentProps as ContentProps, SidebarHeaderProps as HeaderProps, SidebarFooterProps as FooterProps, BadgeConfig, };
138
+ export type { SidebarProps as RootProps, SidebarContentProps as ContentProps, SidebarHeaderProps as HeaderProps, SidebarFooterProps as FooterProps, BadgeConfig };
133
139
  //# sourceMappingURL=sidebar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAIrD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAM3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1B,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,YAAY,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAC1C,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;CAC/B,CAAC;AAeF,KAAK,eAAe,GAAG,eAAe,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/D,UAAU,YAAa,SAAQ,qBAAqB,CAAC,KAAK,EAAE,YAAY,CAAC,EAAE,eAAe;CAAG;AAE7F,QAAA,MAAM,OAAO,qFAmDX,CAAC;AAIH,UAAU,mBAAoB,SAAQ,KAAK,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BAAkB,IAAI,WAAW,EAAE,WAAW,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- "use client";import*as e from"react";import i from"classnames";import{Slot as N}from"./slot.js";import*as C from"@radix-ui/react-accordion";import{sidebarPropDefs as b}from"./sidebar.props.js";import{useThemeContext as F}from"./theme.js";import{ScrollArea as j}from"./scroll-area.js";import{Separator as K}from"./separator.js";import{ThickChevronRightIcon as O}from"./icons.js";import{extractProps as _}from"../helpers/extract-props.js";import{Kbd as q}from"./kbd.js";import{Badge as T}from"./badge.js";const B=e.createContext(null);function P(){return e.useContext(B)}const H=e.forwardRef((r,o)=>{const t=F(),{size:a=b.size.default,variant:s=b.variant.default,menuVariant:d=b.menuVariant.default,layout:u=b.layout.default,panelBackground:m,color:l,highContrast:p=b.highContrast.default}=r,{className:M,children:h,...v}=_(r,b),{asChild:$,panelBackground:g,...y}=v,f=l||t.accentColor,c=u||"panel",n=typeof a=="object"?a.initial||"2":a;return e.createElement("div",{...y,ref:o,"data-accent-color":f,className:i("rt-SidebarRoot",M)},e.createElement(B.Provider,{value:{size:n,menuVariant:d}},e.createElement("div",{className:i("rt-SidebarContainer",`rt-variant-${s}`,`rt-r-size-${n}`,`rt-menu-variant-${d}`,c&&`rt-layout-${c}`),"data-accent-color":f,"data-high-contrast":p||void 0,"data-panel-background":m,"data-layout":c},h)))});H.displayName="Sidebar.Root";const L=e.forwardRef(({className:r,children:o,role:t="navigation","aria-label":a="Main navigation",id:s,...d},u)=>{const m=P(),l=m?.size??"2",p=m?.menuVariant??"soft";return e.createElement(j,{type:"hover"},e.createElement("div",{...d,ref:u,id:s,role:t,"aria-label":a,className:i("rt-BaseMenuContent","rt-SidebarContent",`rt-r-size-${l}`,`rt-menu-variant-${p}`,r)},e.createElement("div",{className:"rt-BaseMenuViewport"},o)))});L.displayName="Sidebar.Content";const R=e.forwardRef(({className:r,asContainer:o=!0,...t},a)=>{const s=P(),d=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...t,ref:a,className:i("rt-SidebarHeader",`rt-r-size-${d}`,`rt-menu-variant-${u}`,{"rt-SidebarHeader--container":o},r)})});R.displayName="Sidebar.Header";const x=e.forwardRef(({className:r,asContainer:o=!0,...t},a)=>{const s=P(),d=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...t,ref:a,className:i("rt-SidebarFooter",`rt-r-size-${d}`,`rt-menu-variant-${u}`,{"rt-SidebarFooter--container":o},r)})});x.displayName="Sidebar.Footer";const E=e.forwardRef(({className:r,...o},t)=>e.createElement(K,{...o,ref:t,className:i("rt-SidebarSeparator",r)}));E.displayName="Sidebar.Separator";const z=e.forwardRef(({className:r,...o},t)=>e.createElement("ul",{...o,ref:t,role:"menu",className:i("rt-SidebarMenu",r)}));z.displayName="Sidebar.Menu";const w=e.forwardRef(({className:r,...o},t)=>e.createElement("li",{...o,ref:t,className:i("rt-SidebarMenuItem",r)}));w.displayName="Sidebar.MenuItem";const G=e.forwardRef(({asChild:r=!1,isActive:o=!1,shortcut:t,badge:a,className:s,children:d,onMouseEnter:u,onMouseLeave:m,onKeyDown:l,...p},M)=>{const[h,v]=e.useState(!1),g=P()?.size??"2",y=r?N:"button",{onClick:f}=p,c=e.useCallback(n=>{switch(n.key){case"Enter":case" ":n.preventDefault(),f&&f(n);break;case"ArrowDown":{n.preventDefault();const S=n.currentTarget.nextElementSibling?.querySelector('[role="menuitem"]');S&&S.focus();break}case"ArrowUp":{n.preventDefault();const S=n.currentTarget.previousElementSibling?.querySelector('[role="menuitem"]');S&&S.focus();break}}l?.(n)},[f,l]);return e.createElement(y,{...p,ref:M,role:"menuitem","aria-current":o?"page":void 0,className:i("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton",s),"data-active":o||void 0,"data-highlighted":h||void 0,onKeyDown:c,onMouseEnter:n=>{v(!0),u?.(n)},onMouseLeave:n=>{v(!1),m?.(n)}},r?d:e.createElement(e.Fragment,null,d,a&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof a=="string"?e.createElement(T,{size:g,variant:"soft"},a):e.createElement(T,{size:a.size||g,variant:a.variant||"soft",color:a.color,highContrast:a.highContrast,radius:a.radius},a.content)),t&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(q,{size:g},t))))});G.displayName="Sidebar.MenuButton";const I=e.forwardRef(({defaultOpen:r=!1,children:o,...t},a)=>e.createElement("div",{...t,ref:a},e.createElement(C.Root,{type:"single",collapsible:!0,defaultValue:r?"item":void 0},e.createElement(C.Item,{value:"item"},o))));I.displayName="Sidebar.MenuSub";const V=e.forwardRef(({asChild:r=!1,className:o,children:t,onMouseEnter:a,onMouseLeave:s,...d},u)=>{const[m,l]=e.useState(!1);return e.createElement(C.Header,{asChild:!0},e.createElement("div",null,e.createElement(C.Trigger,{...d,ref:u,asChild:r,role:"menuitem","aria-haspopup":"true",className:i("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",o),"data-highlighted":m||void 0,onMouseEnter:p=>{l(!0),a?.(p)},onMouseLeave:p=>{l(!1),s?.(p)}},r?t:e.createElement(e.Fragment,null,t,e.createElement(O,{className:i("rt-BaseMenuSubTriggerIcon","rt-SidebarMenuSubTriggerIcon")})))))});V.displayName="Sidebar.MenuSubTrigger";const D=e.forwardRef(({className:r,children:o,...t},a)=>e.createElement(C.Content,{...t,ref:a,className:i("rt-SidebarMenuSubContent",r)},e.createElement("div",{className:"rt-SidebarMenuSubList"},o)));D.displayName="Sidebar.MenuSubContent";const W=e.forwardRef(({className:r,...o},t)=>e.createElement("div",{...o,ref:t,className:i("rt-BaseMenuGroup","rt-SidebarGroup",r)}));W.displayName="Sidebar.Group";const A=e.forwardRef(({asChild:r=!1,className:o,...t},a)=>e.createElement(r?N:"div",{...t,ref:a,role:"group",className:i("rt-BaseMenuLabel","rt-SidebarGroupLabel",o)}));A.displayName="Sidebar.GroupLabel";const k=e.forwardRef(({className:r,...o},t)=>e.createElement("div",{...o,ref:t,className:i("rt-SidebarGroupContent",r)}));k.displayName="Sidebar.GroupContent";export{L as Content,x as Footer,W as Group,k as GroupContent,A as GroupLabel,R as Header,z as Menu,G as MenuButton,w as MenuItem,I as MenuSub,D as MenuSubContent,V as MenuSubTrigger,H as Root,E as Separator};
1
+ "use client";import*as e from"react";import l from"classnames";import{Slot as z}from"./slot.js";import*as P from"@radix-ui/react-accordion";import*as y from"./dropdown-menu.js";import{sidebarPropDefs as C}from"./sidebar.props.js";import{useThemeContext as Q}from"./theme.js";import{ScrollArea as X}from"./scroll-area.js";import{Separator as Y}from"./separator.js";import{ThickChevronRightIcon as Z}from"./icons.js";import{extractProps as ee}from"../helpers/extract-props.js";import{Kbd as R}from"./kbd.js";import{Badge as w}from"./badge.js";const D=e.createContext(null);function v(){return e.useContext(D)}const I=e.forwardRef((o,n)=>{const t=Q(),{size:r=C.size.default,variant:s=C.variant.default,menuVariant:m=C.menuVariant.default,layout:u=C.layout.default,presentation:c,panelBackground:a,color:f,highContrast:d=C.highContrast.default}=o,{className:g,children:N,...L}=ee(o,C),{asChild:b,panelBackground:H,presentation:B,...E}=L,M=f||t.accentColor,S=c==="thin"?"rail":c==="expanded"?"panel":u||"panel",T=typeof r=="object"?r.initial||"2":r;return e.createElement("div",{...E,ref:n,"data-accent-color":M,className:l("rt-SidebarRoot",g)},e.createElement(D.Provider,{value:{size:T,menuVariant:m,presentation:c,color:M}},e.createElement("div",{className:l("rt-SidebarContainer",`rt-variant-${s}`,`rt-r-size-${T}`,`rt-menu-variant-${m}`,S&&`rt-layout-${S}`),"data-accent-color":M,"data-high-contrast":d||void 0,"data-panel-background":a,"data-presentation":c,"data-layout":S},N)))});I.displayName="Sidebar.Root";const G=e.forwardRef(({className:o,children:n,role:t="navigation","aria-label":r="Main navigation",id:s,...m},u)=>{const c=v(),a=c?.size??"2",f=c?.menuVariant??"soft";return e.createElement(X,{type:"hover"},e.createElement("div",{...m,ref:u,id:s,role:t,"aria-label":r,className:l("rt-BaseMenuContent","rt-SidebarContent",`rt-r-size-${a}`,`rt-menu-variant-${f}`,o)},e.createElement("div",{className:"rt-BaseMenuViewport"},n)))});G.displayName="Sidebar.Content";const V=e.forwardRef(({className:o,asContainer:n=!0,...t},r)=>{const s=v(),m=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...t,ref:r,className:l("rt-SidebarHeader",`rt-r-size-${m}`,`rt-menu-variant-${u}`,{"rt-SidebarHeader--container":n},o)})});V.displayName="Sidebar.Header";const A=e.forwardRef(({className:o,asContainer:n=!0,...t},r)=>{const s=v(),m=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...t,ref:r,className:l("rt-SidebarFooter",`rt-r-size-${m}`,`rt-menu-variant-${u}`,{"rt-SidebarFooter--container":n},o)})});A.displayName="Sidebar.Footer";const W=e.forwardRef(({className:o,...n},t)=>e.createElement(Y,{...n,ref:t,className:l("rt-SidebarSeparator",o)}));W.displayName="Sidebar.Separator";const k=e.forwardRef(({className:o,...n},t)=>e.createElement("ul",{...n,ref:t,role:"menu",className:l("rt-SidebarMenu",o)}));k.displayName="Sidebar.Menu";const F=e.forwardRef(({className:o,...n},t)=>e.createElement("li",{...n,ref:t,className:l("rt-SidebarMenuItem",o)}));F.displayName="Sidebar.MenuItem";const $=e.forwardRef(({asChild:o=!1,isActive:n=!1,shortcut:t,badge:r,className:s,children:m,onMouseEnter:u,onMouseLeave:c,onKeyDown:a,...f},d)=>{const[g,N]=e.useState(!1),b=v()?.size??"2",H=o?z:"button",{onClick:B}=f,E=e.useCallback(i=>{switch(i.key){case"Enter":case" ":i.preventDefault(),B&&B(i);break;case"ArrowDown":{i.preventDefault();const p=i.currentTarget.nextElementSibling?.querySelector('[role="menuitem"]');p&&p.focus();break}case"ArrowUp":{i.preventDefault();const p=i.currentTarget.previousElementSibling?.querySelector('[role="menuitem"]');p&&p.focus();break}}a?.(i)},[B,a]),M=i=>{if(typeof i=="string"||typeof i=="number")return e.createElement("span",{className:"rt-SidebarMenuLabel"},i);if(Array.isArray(i))return i.map((p,h)=>e.createElement(e.Fragment,{key:h},M(p)));if(e.isValidElement(i)){const p=i,h=p.props&&p.props.className||"";if(typeof p.type=="string"&&h.split(" ").includes("rt-SidebarMenuLabel"))return p;const J=M(p.props?.children);return e.cloneElement(p,{...p.props},J)}return i},S=M(m),T=e.useMemo(()=>{if(!o)return null;try{const i=e.Children.only(S),p=i.props?.children,h=e.createElement(e.Fragment,null,p,r&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof r=="string"?e.createElement(w,{size:b,variant:"soft"},r):e.createElement(w,{size:r.size||b,variant:r.variant||"soft",color:r.color,highContrast:r.highContrast,radius:r.radius},r.content)),t&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(R,{size:b},t)));return e.cloneElement(i,{...i.props},h)}catch{return S}},[o,S,r,t,b]);return e.createElement(H,{...f,ref:d,role:"menuitem","aria-current":n?"page":void 0,className:l("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton",s),"data-active":n||void 0,"data-highlighted":g||void 0,onKeyDown:E,onMouseEnter:i=>{N(!0),u?.(i)},onMouseLeave:i=>{N(!1),c?.(i)}},o?T:e.createElement(e.Fragment,null,S,r&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof r=="string"?e.createElement(w,{size:b,variant:"soft"},r):e.createElement(w,{size:r.size||b,variant:r.variant||"soft",color:r.color,highContrast:r.highContrast,radius:r.radius},r.content)),t&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(R,{size:b},t))))});$.displayName="Sidebar.MenuButton";const x=e.createContext("accordion"),_=e.forwardRef(({defaultOpen:o=!1,children:n,...t},r)=>(v()?.presentation==="thin"?"dropdown":"accordion")==="dropdown"?e.createElement("div",{...t,ref:r},e.createElement(y.Root,null,e.createElement(x.Provider,{value:"dropdown"},n))):e.createElement("div",{...t,ref:r},e.createElement(x.Provider,{value:"accordion"},e.createElement(P.Root,{type:"single",collapsible:!0,defaultValue:o?"item":void 0},e.createElement(P.Item,{value:"item"},n)))));_.displayName="Sidebar.MenuSub";const K=e.forwardRef(({asChild:o=!1,className:n,children:t,onMouseEnter:r,onMouseLeave:s,...m},u)=>{const[c,a]=e.useState(!1);return e.useContext(x)==="dropdown"?e.createElement(y.Trigger,null,e.createElement("button",{...m,ref:u,type:"button",role:"menuitem","aria-haspopup":"menu",className:l("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",n),"data-highlighted":c||void 0,onMouseEnter:d=>{a(!0),r?.(d)},onMouseLeave:d=>{a(!1),s?.(d)}},t)):e.createElement(P.Header,{asChild:!0},e.createElement("div",null,e.createElement(P.Trigger,{...m,ref:u,asChild:o,role:"menuitem","aria-haspopup":"true",className:l("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",n),"data-highlighted":c||void 0,onMouseEnter:d=>{a(!0),r?.(d)},onMouseLeave:d=>{a(!1),s?.(d)}},o?t:e.createElement(e.Fragment,null,t,e.createElement(Z,{className:l("rt-BaseMenuSubTriggerIcon","rt-SidebarMenuSubTriggerIcon")})))))});K.displayName="Sidebar.MenuSubTrigger";const j=e.forwardRef(({className:o,children:n,...t},r)=>{const s=v();if(e.useContext(x)==="dropdown"){const u=a=>{if(Array.isArray(a))return a.map((f,d)=>e.createElement(e.Fragment,{key:d},u(f)));if(e.isValidElement(a)){if(a.type?.displayName==="Sidebar.MenuButton")return a.props?.children;const d=a.props?.children;if(d!==void 0)return e.cloneElement(a,{...a.props,children:u(d)})}return a},c=e.Children.map(n,(a,f)=>{if(e.isValidElement(a)&&a.type?.displayName==="Sidebar.MenuItem"){const d=a.props?.children,g=u(d);return e.createElement(y.Item,{key:f,asChild:!0},g)}return e.createElement(y.Item,{key:f,asChild:!0},u(a))});return e.createElement(y.Content,{size:s?.size,variant:s?.menuVariant,className:l(o)},e.createElement(y.Group,null,c))}return e.createElement(P.Content,{...t,ref:r,className:l("rt-SidebarMenuSubContent",o)},e.createElement("div",{className:"rt-SidebarMenuSubList"},n))});j.displayName="Sidebar.MenuSubContent";const O=e.forwardRef(({className:o,...n},t)=>e.createElement("div",{...n,ref:t,className:l("rt-BaseMenuGroup","rt-SidebarGroup",o)}));O.displayName="Sidebar.Group";const q=e.forwardRef(({asChild:o=!1,className:n,...t},r)=>e.createElement(o?z:"div",{...t,ref:r,role:"group",className:l("rt-BaseMenuLabel","rt-SidebarGroupLabel",n)}));q.displayName="Sidebar.GroupLabel";const U=e.forwardRef(({className:o,...n},t)=>e.createElement("div",{...n,ref:t,className:l("rt-SidebarGroupContent",o)}));U.displayName="Sidebar.GroupContent";export{G as Content,A as Footer,O as Group,U as GroupContent,q as GroupLabel,V as Header,k as Menu,$ as MenuButton,F as MenuItem,_ as MenuSub,j as MenuSubContent,K as MenuSubTrigger,I as Root,W as Separator};
2
2
  //# sourceMappingURL=sidebar.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/sidebar.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot.js';\nimport * as Accordion from '@radix-ui/react-accordion';\n\nimport { sidebarPropDefs } from './sidebar.props.js';\nimport { useThemeContext } from './theme.js';\n// import { IconButton } from './icon-button.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Separator } from './separator.js';\nimport { ThickChevronRightIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { Kbd } from './kbd.js';\nimport { Badge } from './badge.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { BadgeProps } from './badge.js';\n\n// Badge configuration type for sidebar menu buttons\ntype BadgeConfig = {\n content: React.ReactNode;\n variant?: BadgeProps['variant'];\n size?: BadgeProps['size'];\n color?: BadgeProps['color'];\n highContrast?: BadgeProps['highContrast'];\n radius?: BadgeProps['radius'];\n};\n\n// Internal presentational context (not exported) for size/menu variant\ntype SidebarVisualContextValue = {\n size: '1' | '2';\n menuVariant: 'solid' | 'soft';\n};\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n// Sidebar is now independent of Shell - no integration needed\n\n// Main Sidebar component\ntype SidebarOwnProps = GetPropDefTypes<typeof sidebarPropDefs>;\ninterface SidebarProps extends ComponentPropsWithout<'div', RemovedProps>, SidebarOwnProps {}\n\nconst Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>((props, forwardedRef) => {\n const themeContext = useThemeContext();\n\n const {\n size = sidebarPropDefs.size.default,\n variant = sidebarPropDefs.variant.default,\n menuVariant = sidebarPropDefs.menuVariant.default,\n layout = sidebarPropDefs.layout.default,\n // type = sidebarPropDefs.type.default,\n // side = sidebarPropDefs.side.default,\n // collapsible = sidebarPropDefs.collapsible.default,\n panelBackground,\n color,\n highContrast = sidebarPropDefs.highContrast.default,\n } = props;\n\n const { className, children, ...rootProps } = extractProps(props, sidebarPropDefs);\n const { asChild: _, panelBackground: __, ...safeRootProps } = rootProps; // Remove asChild and panelBackground from DOM props\n const resolvedColor = color || themeContext.accentColor;\n\n // Resolve layout (default to 'panel')\n const resolvedLayout = layout || 'panel';\n\n // Update context with current props - we'll pass the resolved values\n const resolvedSize = typeof size === 'object' ? size.initial || '2' : size;\n return (\n <div\n {...safeRootProps}\n ref={forwardedRef}\n data-accent-color={resolvedColor}\n className={classNames('rt-SidebarRoot', className)}\n >\n <SidebarVisualContext.Provider value={{ size: resolvedSize, menuVariant }}>\n <div\n className={classNames(\n 'rt-SidebarContainer',\n `rt-variant-${variant}`,\n `rt-r-size-${resolvedSize}`,\n `rt-menu-variant-${menuVariant}`,\n resolvedLayout && `rt-layout-${resolvedLayout}`,\n )}\n data-accent-color={resolvedColor}\n data-high-contrast={highContrast || undefined}\n data-panel-background={panelBackground}\n data-layout={resolvedLayout}\n >\n {children}\n </div>\n </SidebarVisualContext.Provider>\n </div>\n );\n});\nSidebar.displayName = 'Sidebar.Root';\n\n// Sidebar content area\ninterface SidebarContentProps extends React.ComponentPropsWithoutRef<'div'> {\n id?: string;\n role?: 'navigation' | 'none';\n 'aria-label'?: string;\n}\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, SidebarContentProps>(\n (\n {\n className,\n children,\n role = 'navigation',\n 'aria-label': ariaLabel = 'Main navigation',\n id,\n ...props\n },\n forwardedRef,\n ) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <ScrollArea type=\"hover\">\n <div\n {...props}\n ref={forwardedRef}\n id={id}\n role={role}\n aria-label={ariaLabel}\n className={classNames(\n 'rt-BaseMenuContent',\n 'rt-SidebarContent',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n className,\n )}\n >\n <div className=\"rt-BaseMenuViewport\">{children}</div>\n </div>\n </ScrollArea>\n );\n },\n);\nSidebarContent.displayName = 'Sidebar.Content';\n\n// Sidebar header\ninterface SidebarHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, SidebarHeaderProps>(\n ({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarHeader',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarHeader--container': asContainer,\n },\n className,\n )}\n />\n );\n },\n);\nSidebarHeader.displayName = 'Sidebar.Header';\n\n// Sidebar footer\ninterface SidebarFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, SidebarFooterProps>(\n ({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarFooter',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarFooter--container': asContainer,\n },\n className,\n )}\n />\n );\n },\n);\nSidebarFooter.displayName = 'Sidebar.Footer';\n\n// Sidebar trigger button\n// removed Trigger in presentational-only Sidebar\n\n// Removed SidebarInset - not needed\n\n// Sidebar separator\ninterface SidebarSeparatorProps extends ComponentPropsWithout<typeof Separator, RemovedProps> {}\n\nconst SidebarSeparator = React.forwardRef<\n React.ComponentRef<typeof Separator>,\n SidebarSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <Separator\n {...props}\n ref={forwardedRef}\n className={classNames('rt-SidebarSeparator', className)}\n />\n));\nSidebarSeparator.displayName = 'Sidebar.Separator';\n\n// Menu components - reusing dropdown menu structure\ninterface SidebarMenuProps extends React.ComponentPropsWithoutRef<'ul'> {}\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, SidebarMenuProps>(\n ({ className, ...props }, forwardedRef) => (\n <ul\n {...props}\n ref={forwardedRef}\n role=\"menu\"\n className={classNames('rt-SidebarMenu', className)}\n />\n ),\n);\nSidebarMenu.displayName = 'Sidebar.Menu';\n\ninterface SidebarMenuItemProps extends React.ComponentPropsWithoutRef<'li'> {}\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, SidebarMenuItemProps>(\n ({ className, ...props }, forwardedRef) => (\n <li {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuItem', className)} />\n ),\n);\nSidebarMenuItem.displayName = 'Sidebar.MenuItem';\n\ninterface SidebarMenuButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n isActive?: boolean;\n shortcut?: React.ReactNode;\n badge?: string | BadgeConfig;\n}\n\nconst SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n (\n {\n asChild = false,\n isActive = false,\n shortcut,\n badge,\n className,\n children,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n ...props\n },\n forwardedRef,\n ) => {\n const [isHighlighted, setIsHighlighted] = React.useState(false);\n const visual = useSidebarVisual();\n const sidebarSize = visual?.size ?? '2';\n\n const Comp = asChild ? Slot : 'button';\n\n const { onClick } = props;\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (onClick) onClick(event as any);\n break;\n case 'ArrowDown': {\n event.preventDefault();\n // Focus next menu item\n const nextItem = (event.currentTarget as HTMLElement).nextElementSibling?.querySelector(\n '[role=\"menuitem\"]',\n ) as HTMLElement;\n if (nextItem) nextItem.focus();\n break;\n }\n case 'ArrowUp': {\n event.preventDefault();\n // Focus previous menu item\n const prevItem = (\n event.currentTarget as HTMLElement\n ).previousElementSibling?.querySelector('[role=\"menuitem\"]') as HTMLElement;\n if (prevItem) prevItem.focus();\n break;\n }\n }\n onKeyDown?.(event);\n },\n [onClick, onKeyDown],\n );\n\n return (\n <Comp\n {...props}\n ref={forwardedRef}\n role=\"menuitem\"\n aria-current={isActive ? 'page' : undefined}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', className)}\n data-active={isActive || undefined}\n data-highlighted={isHighlighted || undefined}\n onKeyDown={handleKeyDown}\n onMouseEnter={(event) => {\n setIsHighlighted(true);\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n setIsHighlighted(false);\n onMouseLeave?.(event);\n }}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n {/* Badge with soft variant default and size mapping to sidebar size */}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge\n size={badge.size || sidebarSize}\n variant={badge.variant || 'soft'}\n color={badge.color}\n highContrast={badge.highContrast}\n radius={badge.radius}\n >\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n )}\n </Comp>\n );\n },\n);\nSidebarMenuButton.displayName = 'Sidebar.MenuButton';\n\n// Sub-menu components using Radix Accordion\ninterface SidebarMenuSubProps extends React.ComponentPropsWithoutRef<'div'> {\n defaultOpen?: boolean;\n}\n\nconst SidebarMenuSub = React.forwardRef<HTMLDivElement, SidebarMenuSubProps>(\n ({ defaultOpen = false, children, ...props }, forwardedRef) => {\n return (\n <div {...props} ref={forwardedRef}>\n <Accordion.Root type=\"single\" collapsible defaultValue={defaultOpen ? 'item' : undefined}>\n <Accordion.Item value=\"item\">{children}</Accordion.Item>\n </Accordion.Root>\n </div>\n );\n },\n);\nSidebarMenuSub.displayName = 'Sidebar.MenuSub';\n\ninterface SidebarMenuSubTriggerProps\n extends React.ComponentPropsWithoutRef<typeof Accordion.Trigger> {\n asChild?: boolean;\n}\n\nconst SidebarMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof Accordion.Trigger>,\n SidebarMenuSubTriggerProps\n>(\n (\n { asChild = false, className, children, onMouseEnter, onMouseLeave, ...props },\n forwardedRef,\n ) => {\n const [isHighlighted, setIsHighlighted] = React.useState(false);\n\n return (\n <Accordion.Header asChild>\n <div>\n <Accordion.Trigger\n {...props}\n ref={forwardedRef}\n asChild={asChild}\n role=\"menuitem\"\n aria-haspopup=\"true\"\n className={classNames(\n 'rt-reset',\n 'rt-BaseMenuItem',\n 'rt-SidebarMenuButton',\n 'rt-SidebarMenuSubTrigger',\n className,\n )}\n data-highlighted={isHighlighted || undefined}\n onMouseEnter={(event) => {\n setIsHighlighted(true);\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n setIsHighlighted(false);\n onMouseLeave?.(event);\n }}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <ThickChevronRightIcon\n className={classNames(\n 'rt-BaseMenuSubTriggerIcon',\n 'rt-SidebarMenuSubTriggerIcon',\n )}\n />\n </>\n )}\n </Accordion.Trigger>\n </div>\n </Accordion.Header>\n );\n },\n);\nSidebarMenuSubTrigger.displayName = 'Sidebar.MenuSubTrigger';\n\ninterface SidebarMenuSubContentProps\n extends React.ComponentPropsWithoutRef<typeof Accordion.Content> {}\n\nconst SidebarMenuSubContent = React.forwardRef<\n React.ElementRef<typeof Accordion.Content>,\n SidebarMenuSubContentProps\n>(({ className, children, ...props }, forwardedRef) => {\n return (\n <Accordion.Content\n {...props}\n ref={forwardedRef}\n className={classNames('rt-SidebarMenuSubContent', className)}\n >\n <div className=\"rt-SidebarMenuSubList\">{children}</div>\n </Accordion.Content>\n );\n});\nSidebarMenuSubContent.displayName = 'Sidebar.MenuSubContent';\n\n// Group components\ninterface SidebarGroupProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, SidebarGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuGroup', 'rt-SidebarGroup', className)}\n />\n ),\n);\nSidebarGroup.displayName = 'Sidebar.Group';\n\ninterface SidebarGroupLabelProps extends React.ComponentPropsWithoutRef<'div'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>(\n ({ asChild = false, className, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n {...props}\n ref={forwardedRef}\n role=\"group\"\n className={classNames('rt-BaseMenuLabel', 'rt-SidebarGroupLabel', className)}\n />\n );\n },\n);\nSidebarGroupLabel.displayName = 'Sidebar.GroupLabel';\n\ninterface SidebarGroupContentProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, SidebarGroupContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames('rt-SidebarGroupContent', className)}\n />\n ),\n);\nSidebarGroupContent.displayName = 'Sidebar.GroupContent';\n\n// Export all components following shadcn's pattern\nexport {\n Sidebar as Root,\n SidebarContent as Content,\n SidebarHeader as Header,\n SidebarFooter as Footer,\n SidebarSeparator as Separator,\n SidebarMenu as Menu,\n SidebarMenuItem as MenuItem,\n SidebarMenuButton as MenuButton,\n SidebarMenuSub as MenuSub,\n SidebarMenuSubTrigger as MenuSubTrigger,\n SidebarMenuSubContent as MenuSubContent,\n SidebarGroup as Group,\n SidebarGroupLabel as GroupLabel,\n SidebarGroupContent as GroupContent,\n};\n\n/**\n * Enhanced Sidebar Header and Footer Usage Examples:\n *\n * 1. Simple default container (backwards compatible):\n * <Sidebar.Header>\n * <Logo />\n * <span>App Name</span>\n * </Sidebar.Header>\n *\n * 2. Custom flex layout:\n * <Sidebar.Header className=\"rt-justify-between rt-gap-3\">\n * <Logo />\n * <Sidebar.MenuButton>\n * <SettingsIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 3. Column layout for multiple rows:\n * <Sidebar.Header className=\"rt-flex-col rt-gap-2\" asContainer={false}>\n * <div className=\"rt-flex rt-items-center rt-gap-2\">\n * <Logo />\n * <span>App Name</span>\n * </div>\n * <Sidebar.MenuButton>\n * <UserAvatar />\n * <span>John Doe</span>\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 4. Interactive footer with menu button:\n * <Sidebar.Footer>\n * <Sidebar.MenuButton>\n * <UserIcon />\n * <span>Settings</span>\n * <ChevronUpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * 5. Custom footer layout:\n * <Sidebar.Footer className=\"rt-justify-between\">\n * <span>v1.0.0</span>\n * <Sidebar.MenuButton>\n * <HelpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * Available utility classes:\n * - Layout: rt-flex-row, rt-flex-col\n * - Alignment: rt-items-center, rt-items-start, rt-items-end\n * - Justification: rt-justify-between, rt-justify-center, rt-justify-start, rt-justify-end\n * - Gap: rt-gap-1, rt-gap-2, rt-gap-3, rt-gap-4\n */\n\nexport type {\n SidebarProps as RootProps,\n SidebarContentProps as ContentProps,\n SidebarHeaderProps as HeaderProps,\n SidebarFooterProps as FooterProps,\n BadgeConfig,\n};\n"],
5
- "mappings": "aAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,YACrB,UAAYC,MAAe,4BAE3B,OAAS,mBAAAC,MAAuB,qBAChC,OAAS,mBAAAC,MAAuB,aAEhC,OAAS,cAAAC,MAAkB,mBAC3B,OAAS,aAAAC,MAAiB,iBAC1B,OAAS,yBAAAC,MAA6B,aACtC,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,OAAAC,MAAW,WACpB,OAAS,SAAAC,MAAa,aAqBtB,MAAMC,EAAuBZ,EAAM,cAAgD,IAAI,EACvF,SAASa,GAAmB,CAC1B,OAAOb,EAAM,WAAWY,CAAoB,CAC9C,CAQA,MAAME,EAAUd,EAAM,WAAyC,CAACe,EAAOC,IAAiB,CACtF,MAAMC,EAAeZ,EAAgB,EAE/B,CACJ,KAAAa,EAAOd,EAAgB,KAAK,QAC5B,QAAAe,EAAUf,EAAgB,QAAQ,QAClC,YAAAgB,EAAchB,EAAgB,YAAY,QAC1C,OAAAiB,EAASjB,EAAgB,OAAO,QAIhC,gBAAAkB,EACA,MAAAC,EACA,aAAAC,EAAepB,EAAgB,aAAa,OAC9C,EAAIW,EAEE,CAAE,UAAAU,EAAW,SAAAC,EAAU,GAAGC,CAAU,EAAIlB,EAAaM,EAAOX,CAAe,EAC3E,CAAE,QAASwB,EAAG,gBAAiBC,EAAI,GAAGC,CAAc,EAAIH,EACxDI,EAAgBR,GAASN,EAAa,YAG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,EAAK,EACtBH,IAAeQ,CAAK,CACtB,GAECb,EACCpB,EAEA1B,EAAA,cAAAA,EAAA,cACG0B,EACD1B,EAAA,cAACQ,EAAA,CACC,UAAWP,EACT,4BACA,8BACF,EACF,CACF,CAEJ,CACF,CACF,CAEJ,CACF,EACA+D,EAAsB,YAAc,yBAKpC,MAAMC,EAAwBjE,EAAM,WAGlC,CAAC,CAAE,UAAAyB,EAAW,SAAAC,EAAU,GAAGX,CAAM,EAAGC,IAElChB,EAAA,cAACG,EAAU,QAAV,CACE,GAAGY,EACJ,IAAKC,EACL,UAAWf,EAAW,2BAA4BwB,CAAS,GAE3DzB,EAAA,cAAC,OAAI,UAAU,yBAAyB0B,CAAS,CACnD,CAEH,EACDuC,EAAsB,YAAc,yBAKpC,MAAMC,EAAelE,EAAM,WACzB,CAAC,CAAE,UAAAyB,EAAW,GAAGV,CAAM,EAAGC,IACxBhB,EAAA,cAAC,OACE,GAAGe,EACJ,IAAKC,EACL,UAAWf,EAAW,mBAAoB,kBAAmBwB,CAAS,EACxE,CAEJ,EACAyC,EAAa,YAAc,gBAM3B,MAAMC,EAAoBnE,EAAM,WAC9B,CAAC,CAAE,QAAA8C,EAAU,GAAO,UAAArB,EAAW,GAAGV,CAAM,EAAGC,IAIvChB,EAAA,cAHW8C,EAAU5C,EAAO,MAG3B,CACE,GAAGa,EACJ,IAAKC,EACL,KAAK,QACL,UAAWf,EAAW,mBAAoB,uBAAwBwB,CAAS,EAC7E,CAGN,EACA0C,EAAkB,YAAc,qBAIhC,MAAMC,EAAsBpE,EAAM,WAChC,CAAC,CAAE,UAAAyB,EAAW,GAAGV,CAAM,EAAGC,IACxBhB,EAAA,cAAC,OACE,GAAGe,EACJ,IAAKC,EACL,UAAWf,EAAW,yBAA0BwB,CAAS,EAC3D,CAEJ,EACA2C,EAAoB,YAAc",
6
- "names": ["React", "classNames", "Slot", "Accordion", "sidebarPropDefs", "useThemeContext", "ScrollArea", "Separator", "ThickChevronRightIcon", "extractProps", "Kbd", "Badge", "SidebarVisualContext", "useSidebarVisual", "Sidebar", "props", "forwardedRef", "themeContext", "size", "variant", "menuVariant", "layout", "panelBackground", "color", "highContrast", "className", "children", "rootProps", "_", "__", "safeRootProps", "resolvedColor", "resolvedLayout", "resolvedSize", "SidebarContent", "role", "ariaLabel", "id", "visual", "SidebarHeader", "asContainer", "SidebarFooter", "SidebarSeparator", "SidebarMenu", "SidebarMenuItem", "SidebarMenuButton", "asChild", "isActive", "shortcut", "badge", "onMouseEnter", "onMouseLeave", "onKeyDown", "isHighlighted", "setIsHighlighted", "sidebarSize", "Comp", "onClick", "handleKeyDown", "event", "nextItem", "prevItem", "SidebarMenuSub", "defaultOpen", "SidebarMenuSubTrigger", "SidebarMenuSubContent", "SidebarGroup", "SidebarGroupLabel", "SidebarGroupContent"]
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot.js';\nimport * as Accordion from '@radix-ui/react-accordion';\nimport * as DropdownMenu from './dropdown-menu.js';\n\nimport { sidebarPropDefs } from './sidebar.props.js';\nimport { useThemeContext } from './theme.js';\n// import { IconButton } from './icon-button.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Separator } from './separator.js';\nimport { ThickChevronRightIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { Kbd } from './kbd.js';\nimport { Badge } from './badge.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { BadgeProps } from './badge.js';\n\n// Badge configuration type for sidebar menu buttons\ntype BadgeConfig = {\n content: React.ReactNode;\n variant?: BadgeProps['variant'];\n size?: BadgeProps['size'];\n color?: BadgeProps['color'];\n highContrast?: BadgeProps['highContrast'];\n radius?: BadgeProps['radius'];\n};\n\n// Internal presentational context (not exported) for size/menu variant\ntype SidebarVisualContextValue = {\n size: '1' | '2';\n menuVariant: 'solid' | 'soft';\n presentation?: 'thin' | 'expanded';\n color?: string;\n};\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n// Sidebar is now independent of Shell - no integration needed\n\n// Main Sidebar component\ntype SidebarOwnProps = GetPropDefTypes<typeof sidebarPropDefs>;\ninterface SidebarProps extends ComponentPropsWithout<'div', RemovedProps>, SidebarOwnProps {\n /**\n * Presentational mode independent of Shell.\n * 'thin' renders a rail-style sidebar, 'expanded' renders a panel-style sidebar.\n * If both `presentation` and `layout` are provided, `presentation` takes precedence.\n */\n presentation?: 'thin' | 'expanded';\n}\n\nconst Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>((props, forwardedRef) => {\n const themeContext = useThemeContext();\n\n const {\n size = sidebarPropDefs.size.default,\n variant = sidebarPropDefs.variant.default,\n menuVariant = sidebarPropDefs.menuVariant.default,\n layout = sidebarPropDefs.layout.default,\n presentation,\n // type = sidebarPropDefs.type.default,\n // side = sidebarPropDefs.side.default,\n // collapsible = sidebarPropDefs.collapsible.default,\n panelBackground,\n color,\n highContrast = sidebarPropDefs.highContrast.default,\n } = props;\n\n const { className, children, ...rootProps } = extractProps(props, sidebarPropDefs);\n // Remove internal-only props from DOM\n const { asChild: _, panelBackground: __, presentation: ___, ...safeRootProps } = rootProps;\n const resolvedColor = color || themeContext.accentColor;\n\n // Resolve layout (default to 'panel'). `presentation` takes precedence over `layout`.\n const resolvedLayout = presentation === 'thin' ? 'rail' : presentation === 'expanded' ? 'panel' : layout || 'panel';\n\n // Update context with current props - we'll pass the resolved values\n const resolvedSize = typeof size === 'object' ? size.initial || '2' : size;\n return (\n <div {...safeRootProps} ref={forwardedRef} data-accent-color={resolvedColor} className={classNames('rt-SidebarRoot', className)}>\n <SidebarVisualContext.Provider value={{ size: resolvedSize, menuVariant, presentation, color: resolvedColor }}>\n <div\n className={classNames('rt-SidebarContainer', `rt-variant-${variant}`, `rt-r-size-${resolvedSize}`, `rt-menu-variant-${menuVariant}`, resolvedLayout && `rt-layout-${resolvedLayout}`)}\n data-accent-color={resolvedColor}\n data-high-contrast={highContrast || undefined}\n data-panel-background={panelBackground}\n data-presentation={presentation}\n data-layout={resolvedLayout}\n >\n {children}\n </div>\n </SidebarVisualContext.Provider>\n </div>\n );\n});\nSidebar.displayName = 'Sidebar.Root';\n\n// Sidebar content area\ninterface SidebarContentProps extends React.ComponentPropsWithoutRef<'div'> {\n id?: string;\n role?: 'navigation' | 'none';\n 'aria-label'?: string;\n}\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, SidebarContentProps>(\n ({ className, children, role = 'navigation', 'aria-label': ariaLabel = 'Main navigation', id, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <ScrollArea type=\"hover\">\n <div\n {...props}\n ref={forwardedRef}\n id={id}\n role={role}\n aria-label={ariaLabel}\n className={classNames('rt-BaseMenuContent', 'rt-SidebarContent', `rt-r-size-${size}`, `rt-menu-variant-${menuVariant}`, className)}\n >\n <div className=\"rt-BaseMenuViewport\">{children}</div>\n </div>\n </ScrollArea>\n );\n },\n);\nSidebarContent.displayName = 'Sidebar.Content';\n\n// Sidebar header\ninterface SidebarHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, SidebarHeaderProps>(({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarHeader',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarHeader--container': asContainer,\n },\n className,\n )}\n />\n );\n});\nSidebarHeader.displayName = 'Sidebar.Header';\n\n// Sidebar footer\ninterface SidebarFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, SidebarFooterProps>(({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarFooter',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarFooter--container': asContainer,\n },\n className,\n )}\n />\n );\n});\nSidebarFooter.displayName = 'Sidebar.Footer';\n\n// Sidebar trigger button\n// removed Trigger in presentational-only Sidebar\n\n// Removed SidebarInset - not needed\n\n// Sidebar separator\ninterface SidebarSeparatorProps extends ComponentPropsWithout<typeof Separator, RemovedProps> {}\n\nconst SidebarSeparator = React.forwardRef<React.ComponentRef<typeof Separator>, SidebarSeparatorProps>(({ className, ...props }, forwardedRef) => (\n <Separator {...props} ref={forwardedRef} className={classNames('rt-SidebarSeparator', className)} />\n));\nSidebarSeparator.displayName = 'Sidebar.Separator';\n\n// Menu components - reusing dropdown menu structure\ninterface SidebarMenuProps extends React.ComponentPropsWithoutRef<'ul'> {}\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, SidebarMenuProps>(({ className, ...props }, forwardedRef) => (\n <ul {...props} ref={forwardedRef} role=\"menu\" className={classNames('rt-SidebarMenu', className)} />\n));\nSidebarMenu.displayName = 'Sidebar.Menu';\n\ninterface SidebarMenuItemProps extends React.ComponentPropsWithoutRef<'li'> {}\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, SidebarMenuItemProps>(({ className, ...props }, forwardedRef) => (\n <li {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuItem', className)} />\n));\nSidebarMenuItem.displayName = 'Sidebar.MenuItem';\n\ninterface SidebarMenuButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n isActive?: boolean;\n shortcut?: React.ReactNode;\n badge?: string | BadgeConfig;\n}\n\nconst SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n ({ asChild = false, isActive = false, shortcut, badge, className, children, onMouseEnter, onMouseLeave, onKeyDown, ...props }, forwardedRef) => {\n const [isHighlighted, setIsHighlighted] = React.useState(false);\n const visual = useSidebarVisual();\n const sidebarSize = visual?.size ?? '2';\n\n const Comp = asChild ? Slot : 'button';\n\n const { onClick } = props;\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (onClick) onClick(event as any);\n break;\n case 'ArrowDown': {\n event.preventDefault();\n // Focus next menu item\n const nextItem = (event.currentTarget as HTMLElement).nextElementSibling?.querySelector('[role=\"menuitem\"]') as HTMLElement;\n if (nextItem) nextItem.focus();\n break;\n }\n case 'ArrowUp': {\n event.preventDefault();\n // Focus previous menu item\n const prevItem = (event.currentTarget as HTMLElement).previousElementSibling?.querySelector('[role=\"menuitem\"]') as HTMLElement;\n if (prevItem) prevItem.focus();\n break;\n }\n }\n onKeyDown?.(event);\n },\n [onClick, onKeyDown],\n );\n\n // Wrap bare text nodes so CSS can target labels (e.g., for truncation in thin mode)\n const wrapTextNodes = (node: React.ReactNode): React.ReactNode => {\n if (typeof node === 'string' || typeof node === 'number') {\n return <span className=\"rt-SidebarMenuLabel\">{node}</span>;\n }\n if (Array.isArray(node)) {\n return node.map((child, index) => <React.Fragment key={index}>{wrapTextNodes(child)}</React.Fragment>);\n }\n if (React.isValidElement(node)) {\n const el = node as React.ReactElement<any>;\n const className: string = (el.props && (el.props as any).className) || '';\n const isAlreadyLabel = typeof el.type === 'string' && className.split(' ').includes('rt-SidebarMenuLabel');\n if (isAlreadyLabel) return el;\n const newChildren = wrapTextNodes((el.props as any)?.children);\n return React.cloneElement(el, { ...(el.props as any) }, newChildren);\n }\n return node;\n };\n\n const processedChildren = wrapTextNodes(children);\n\n // When rendering asChild, Slot expects a single child element. We still want to\n // append optional badge/shortcut inside that element so they render with Link.\n const slottedChildren = React.useMemo(() => {\n if (!asChild) return null;\n try {\n const onlyChild = React.Children.only(processedChildren as React.ReactElement<any>) as React.ReactElement<any>;\n const originalInnerChildren = (onlyChild.props as any)?.children;\n const enhancedInnerChildren = (\n <>\n {originalInnerChildren}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge size={badge.size || sidebarSize} variant={badge.variant || 'soft'} color={badge.color} highContrast={badge.highContrast} radius={badge.radius}>\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n );\n return React.cloneElement(onlyChild, { ...(onlyChild.props as any) }, enhancedInnerChildren);\n } catch {\n // Fallback: if multiple children were passed incorrectly, just return processedChildren\n return processedChildren as React.ReactNode;\n }\n }, [asChild, processedChildren, badge, shortcut, sidebarSize]);\n\n return (\n <Comp\n {...props}\n ref={forwardedRef}\n role=\"menuitem\"\n aria-current={isActive ? 'page' : undefined}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', className)}\n data-active={isActive || undefined}\n data-highlighted={isHighlighted || undefined}\n onKeyDown={handleKeyDown}\n onMouseEnter={(event) => {\n setIsHighlighted(true);\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n setIsHighlighted(false);\n onMouseLeave?.(event);\n }}\n >\n {asChild ? (\n slottedChildren\n ) : (\n <>\n {processedChildren}\n {/* Badge with soft variant default and size mapping to sidebar size */}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge size={badge.size || sidebarSize} variant={badge.variant || 'soft'} color={badge.color} highContrast={badge.highContrast} radius={badge.radius}>\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n )}\n </Comp>\n );\n },\n);\nSidebarMenuButton.displayName = 'Sidebar.MenuButton';\n\n// Sub-menu components: Accordion in expanded, Dropdown in thin\nconst SidebarSubMenuModeContext = React.createContext<'accordion' | 'dropdown'>('accordion');\ninterface SidebarMenuSubProps extends React.ComponentPropsWithoutRef<'div'> {\n defaultOpen?: boolean;\n}\n\nconst SidebarMenuSub = React.forwardRef<HTMLDivElement, SidebarMenuSubProps>(({ defaultOpen = false, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode: 'accordion' | 'dropdown' = visual?.presentation === 'thin' ? 'dropdown' : 'accordion';\n\n if (mode === 'dropdown') {\n return (\n <div {...props} ref={forwardedRef}>\n <DropdownMenu.Root>\n <SidebarSubMenuModeContext.Provider value=\"dropdown\">{children}</SidebarSubMenuModeContext.Provider>\n </DropdownMenu.Root>\n </div>\n );\n }\n\n return (\n <div {...props} ref={forwardedRef}>\n <SidebarSubMenuModeContext.Provider value=\"accordion\">\n <Accordion.Root type=\"single\" collapsible defaultValue={defaultOpen ? 'item' : undefined}>\n <Accordion.Item value=\"item\">{children}</Accordion.Item>\n </Accordion.Root>\n </SidebarSubMenuModeContext.Provider>\n </div>\n );\n});\nSidebarMenuSub.displayName = 'Sidebar.MenuSub';\n\ninterface SidebarMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof Accordion.Trigger> {\n asChild?: boolean;\n}\n\nconst SidebarMenuSubTrigger = React.forwardRef<React.ElementRef<typeof Accordion.Trigger>, SidebarMenuSubTriggerProps>(\n ({ asChild = false, className, children, onMouseEnter, onMouseLeave, ...props }, forwardedRef) => {\n const [isHighlighted, setIsHighlighted] = React.useState(false);\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n return (\n <DropdownMenu.Trigger>\n <button\n {...(props as any)}\n ref={forwardedRef as any}\n type=\"button\"\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}\n data-highlighted={isHighlighted || undefined}\n onMouseEnter={(event) => {\n setIsHighlighted(true);\n onMouseEnter?.(event as any);\n }}\n onMouseLeave={(event) => {\n setIsHighlighted(false);\n onMouseLeave?.(event as any);\n }}\n >\n {children}\n </button>\n </DropdownMenu.Trigger>\n );\n }\n\n return (\n <Accordion.Header asChild>\n <div>\n <Accordion.Trigger\n {...props}\n ref={forwardedRef}\n asChild={asChild}\n role=\"menuitem\"\n aria-haspopup=\"true\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}\n data-highlighted={isHighlighted || undefined}\n onMouseEnter={(event) => {\n setIsHighlighted(true);\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n setIsHighlighted(false);\n onMouseLeave?.(event);\n }}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <ThickChevronRightIcon className={classNames('rt-BaseMenuSubTriggerIcon', 'rt-SidebarMenuSubTriggerIcon')} />\n </>\n )}\n </Accordion.Trigger>\n </div>\n </Accordion.Header>\n );\n },\n);\nSidebarMenuSubTrigger.displayName = 'Sidebar.MenuSubTrigger';\n\ninterface SidebarMenuSubContentProps extends React.ComponentPropsWithoutRef<typeof Accordion.Content> {}\n\nconst SidebarMenuSubContent = React.forwardRef<React.ElementRef<typeof Accordion.Content>, SidebarMenuSubContentProps>(({ className, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n const unwrapMenuButton = (node: React.ReactNode): React.ReactNode => {\n if (Array.isArray(node)) {\n return node.map((n, i) => <React.Fragment key={i}>{unwrapMenuButton(n)}</React.Fragment>);\n }\n if (React.isValidElement(node)) {\n const typeDisplay = (node.type as any)?.displayName;\n if (typeDisplay === 'Sidebar.MenuButton') {\n return (node.props as any)?.children;\n }\n const child = (node.props as any)?.children;\n if (child !== undefined) {\n return React.cloneElement(node as any, { ...(node.props as any), children: unwrapMenuButton(child) });\n }\n }\n return node;\n };\n\n const normalized = React.Children.map(children as React.ReactNode, (child, index) => {\n if (React.isValidElement(child) && (child.type as any)?.displayName === 'Sidebar.MenuItem') {\n const itemChildren = (child.props as any)?.children;\n const content = unwrapMenuButton(itemChildren);\n return (\n <DropdownMenu.Item key={index} asChild>\n {content as any}\n </DropdownMenu.Item>\n );\n }\n // Fallback: wrap raw nodes too for consistent menu styling\n return (\n <DropdownMenu.Item key={index} asChild>\n {unwrapMenuButton(child) as any}\n </DropdownMenu.Item>\n );\n });\n\n return (\n <DropdownMenu.Content size={visual?.size} variant={visual?.menuVariant} className={classNames(className)}>\n <DropdownMenu.Group>{normalized}</DropdownMenu.Group>\n </DropdownMenu.Content>\n );\n }\n\n return (\n <Accordion.Content {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuSubContent', className)}>\n <div className=\"rt-SidebarMenuSubList\">{children}</div>\n </Accordion.Content>\n );\n});\nSidebarMenuSubContent.displayName = 'Sidebar.MenuSubContent';\n\n// Group components\ninterface SidebarGroupProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, SidebarGroupProps>(({ className, ...props }, forwardedRef) => (\n <div {...props} ref={forwardedRef} className={classNames('rt-BaseMenuGroup', 'rt-SidebarGroup', className)} />\n));\nSidebarGroup.displayName = 'Sidebar.Group';\n\ninterface SidebarGroupLabelProps extends React.ComponentPropsWithoutRef<'div'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>(({ asChild = false, className, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : 'div';\n\n return <Comp {...props} ref={forwardedRef} role=\"group\" className={classNames('rt-BaseMenuLabel', 'rt-SidebarGroupLabel', className)} />;\n});\nSidebarGroupLabel.displayName = 'Sidebar.GroupLabel';\n\ninterface SidebarGroupContentProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, SidebarGroupContentProps>(({ className, ...props }, forwardedRef) => (\n <div {...props} ref={forwardedRef} className={classNames('rt-SidebarGroupContent', className)} />\n));\nSidebarGroupContent.displayName = 'Sidebar.GroupContent';\n\n// Export all components following shadcn's pattern\nexport {\n Sidebar as Root,\n SidebarContent as Content,\n SidebarHeader as Header,\n SidebarFooter as Footer,\n SidebarSeparator as Separator,\n SidebarMenu as Menu,\n SidebarMenuItem as MenuItem,\n SidebarMenuButton as MenuButton,\n SidebarMenuSub as MenuSub,\n SidebarMenuSubTrigger as MenuSubTrigger,\n SidebarMenuSubContent as MenuSubContent,\n SidebarGroup as Group,\n SidebarGroupLabel as GroupLabel,\n SidebarGroupContent as GroupContent,\n};\n\n/**\n * Enhanced Sidebar Header and Footer Usage Examples:\n *\n * 1. Simple default container (backwards compatible):\n * <Sidebar.Header>\n * <Logo />\n * <span>App Name</span>\n * </Sidebar.Header>\n *\n * 2. Custom flex layout:\n * <Sidebar.Header className=\"rt-justify-between rt-gap-3\">\n * <Logo />\n * <Sidebar.MenuButton>\n * <SettingsIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 3. Column layout for multiple rows:\n * <Sidebar.Header className=\"rt-flex-col rt-gap-2\" asContainer={false}>\n * <div className=\"rt-flex rt-items-center rt-gap-2\">\n * <Logo />\n * <span>App Name</span>\n * </div>\n * <Sidebar.MenuButton>\n * <UserAvatar />\n * <span>John Doe</span>\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 4. Interactive footer with menu button:\n * <Sidebar.Footer>\n * <Sidebar.MenuButton>\n * <UserIcon />\n * <span>Settings</span>\n * <ChevronUpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * 5. Custom footer layout:\n * <Sidebar.Footer className=\"rt-justify-between\">\n * <span>v1.0.0</span>\n * <Sidebar.MenuButton>\n * <HelpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * Available utility classes:\n * - Layout: rt-flex-row, rt-flex-col\n * - Alignment: rt-items-center, rt-items-start, rt-items-end\n * - Justification: rt-justify-between, rt-justify-center, rt-justify-start, rt-justify-end\n * - Gap: rt-gap-1, rt-gap-2, rt-gap-3, rt-gap-4\n */\n\nexport type { SidebarProps as RootProps, SidebarContentProps as ContentProps, SidebarHeaderProps as HeaderProps, SidebarFooterProps as FooterProps, BadgeConfig };\n"],
5
+ "mappings": "aAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,YACrB,UAAYC,MAAe,4BAC3B,UAAYC,MAAkB,qBAE9B,OAAS,mBAAAC,MAAuB,qBAChC,OAAS,mBAAAC,MAAuB,aAEhC,OAAS,cAAAC,MAAkB,mBAC3B,OAAS,aAAAC,MAAiB,iBAC1B,OAAS,yBAAAC,MAA6B,aACtC,OAAS,gBAAAC,OAAoB,8BAC7B,OAAS,OAAAC,MAAW,WACpB,OAAS,SAAAC,MAAa,aAuBtB,MAAMC,EAAuBb,EAAM,cAAgD,IAAI,EACvF,SAASc,GAAmB,CAC1B,OAAOd,EAAM,WAAWa,CAAoB,CAC9C,CAeA,MAAME,EAAUf,EAAM,WAAyC,CAACgB,EAAOC,IAAiB,CACtF,MAAMC,EAAeZ,EAAgB,EAE/B,CACJ,KAAAa,EAAOd,EAAgB,KAAK,QAC5B,QAAAe,EAAUf,EAAgB,QAAQ,QAClC,YAAAgB,EAAchB,EAAgB,YAAY,QAC1C,OAAAiB,EAASjB,EAAgB,OAAO,QAChC,aAAAkB,EAIA,gBAAAC,EACA,MAAAC,EACA,aAAAC,EAAer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,EAAO,QAAO,IACnCa,EAAiBd,CAAK,CACzB,CAEJ,CAAC,EAED,OACEnE,EAAA,cAACI,EAAa,QAAb,CAAqB,KAAMqC,GAAQ,KAAM,QAASA,GAAQ,YAAa,UAAWxC,EAAW0B,CAAS,GACrG3B,EAAA,cAACI,EAAa,MAAb,KAAoBgF,CAAW,CAClC,CAEJ,CAEA,OACEpF,EAAA,cAACG,EAAU,QAAV,CAAmB,GAAGa,EAAO,IAAKC,EAAc,UAAWhB,EAAW,2BAA4B0B,CAAS,GAC1G3B,EAAA,cAAC,OAAI,UAAU,yBAAyB4B,CAAS,CACnD,CAEJ,CAAC,EACDoD,EAAsB,YAAc,yBAKpC,MAAMO,EAAevF,EAAM,WAA8C,CAAC,CAAE,UAAA2B,EAAW,GAAGX,CAAM,EAAGC,IACjGjB,EAAA,cAAC,OAAK,GAAGgB,EAAO,IAAKC,EAAc,UAAWhB,EAAW,mBAAoB,kBAAmB0B,CAAS,EAAG,CAC7G,EACD4D,EAAa,YAAc,gBAM3B,MAAMC,EAAoBxF,EAAM,WAAmD,CAAC,CAAE,QAAAiD,EAAU,GAAO,UAAAtB,EAAW,GAAGX,CAAM,EAAGC,IAGrHjB,EAAA,cAFMiD,EAAU/C,EAAO,MAEtB,CAAM,GAAGc,EAAO,IAAKC,EAAc,KAAK,QAAQ,UAAWhB,EAAW,mBAAoB,uBAAwB0B,CAAS,EAAG,CACvI,EACD6D,EAAkB,YAAc,qBAIhC,MAAMC,EAAsBzF,EAAM,WAAqD,CAAC,CAAE,UAAA2B,EAAW,GAAGX,CAAM,EAAGC,IAC/GjB,EAAA,cAAC,OAAK,GAAGgB,EAAO,IAAKC,EAAc,UAAWhB,EAAW,yBAA0B0B,CAAS,EAAG,CAChG,EACD8D,EAAoB,YAAc",
6
+ "names": ["React", "classNames", "Slot", "Accordion", "DropdownMenu", "sidebarPropDefs", "useThemeContext", "ScrollArea", "Separator", "ThickChevronRightIcon", "extractProps", "Kbd", "Badge", "SidebarVisualContext", "useSidebarVisual", "Sidebar", "props", "forwardedRef", "themeContext", "size", "variant", "menuVariant", "layout", "presentation", "panelBackground", "color", "highContrast", "className", "children", "rootProps", "_", "__", "___", "safeRootProps", "resolvedColor", "resolvedLayout", "resolvedSize", "SidebarContent", "role", "ariaLabel", "id", "visual", "SidebarHeader", "asContainer", "SidebarFooter", "SidebarSeparator", "SidebarMenu", "SidebarMenuItem", "SidebarMenuButton", "asChild", "isActive", "shortcut", "badge", "onMouseEnter", "onMouseLeave", "onKeyDown", "isHighlighted", "setIsHighlighted", "sidebarSize", "Comp", "onClick", "handleKeyDown", "event", "nextItem", "prevItem", "wrapTextNodes", "node", "child", "index", "el", "newChildren", "processedChildren", "slottedChildren", "onlyChild", "originalInnerChildren", "enhancedInnerChildren", "SidebarSubMenuModeContext", "SidebarMenuSub", "defaultOpen", "SidebarMenuSubTrigger", "SidebarMenuSubContent", "unwrapMenuButton", "n", "i", "normalized", "itemChildren", "content", "SidebarGroup", "SidebarGroupLabel", "SidebarGroupContent"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kushagradhawan/kookie-ui",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "description": "A modern React component library with beautiful design tokens, flexible theming, and comprehensive docs",
5
5
  "keywords": [
6
6
  "react",
@@ -279,6 +279,6 @@
279
279
  "title": "Base-button Component Props",
280
280
  "description": "Props schema for the base-button component in Kookie UI",
281
281
  "version": "1.0.0",
282
- "generatedAt": "2025-09-11T22:13:16.352Z",
282
+ "generatedAt": "2025-09-12T18:14:42.763Z",
283
283
  "source": "Zod schema"
284
284
  }
@@ -530,6 +530,6 @@
530
530
  "title": "Button Component Props",
531
531
  "description": "Props schema for the button component in Kookie UI",
532
532
  "version": "1.0.0",
533
- "generatedAt": "2025-09-11T22:13:16.358Z",
533
+ "generatedAt": "2025-09-12T18:14:42.768Z",
534
534
  "source": "Zod schema"
535
535
  }
@@ -313,6 +313,6 @@
313
313
  "title": "Icon-button Component Props",
314
314
  "description": "Props schema for the icon-button component in Kookie UI",
315
315
  "version": "1.0.0",
316
- "generatedAt": "2025-09-11T22:13:16.359Z",
316
+ "generatedAt": "2025-09-12T18:14:42.770Z",
317
317
  "source": "Zod schema"
318
318
  }