{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sidepanel",
  "type": "registry:ui",
  "title": "Sidepanel",
  "description": "Sidepanel is an overlay panel that slides in from the left or right edge of the viewport.",
  "dependencies": [
    "@radix-ui/react-dialog@^1.1.15",
    "class-variance-authority@^0.7.1"
  ],
  "registryDependencies": [
    "https://wideset.co/r/motion.json",
    "https://wideset.co/r/scroll-area.json",
    "https://wideset.co/r/styles.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/components/sidepanel/Sidepanel.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/sidepanel/Sidepanel.tsx",
      "content": "'use client';\n\nimport * as SidepanelPrimitive from '@radix-ui/react-dialog';\nimport * as React from 'react';\n\nimport type { SidepanelCloseProps, SidepanelProps, SidepanelTriggerProps } from './Sidepanel.types';\nimport { SidepanelActions } from './SidepanelActions';\nimport { SidepanelContent } from './SidepanelContent';\nimport { SidepanelDescription } from './SidepanelDescription';\nimport { SidepanelFooter } from './SidepanelFooter';\nimport { SidepanelHeader } from './SidepanelHeader';\nimport { SidepanelPanel } from './SidepanelPanel';\nimport { SidepanelTitle } from './SidepanelTitle';\n\n// Build the compound as its OWN component object — do NOT alias and mutate\n// SidepanelPrimitive.Root directly. @radix-ui/react-dialog's Root is a shared\n// singleton also used by Modal (and StatusModal), so aliasing + mutating it\n// makes Sidepanel and Modal the same object and collides on every shared name.\n// Wrapping Root in a fresh component keeps each namespace isolated.\nconst Sidepanel = ((props: SidepanelProps) => (\n  <SidepanelPrimitive.Root {...props} />\n)) as React.FC<SidepanelProps> & {\n  Close: typeof SidepanelClose;\n  Panel: typeof SidepanelPanel;\n  Description: typeof SidepanelDescription;\n  Footer: typeof SidepanelFooter;\n  Content: typeof SidepanelContent;\n  Header: typeof SidepanelHeader;\n  Title: typeof SidepanelTitle;\n  Actions: typeof SidepanelActions;\n  Trigger: typeof SidepanelTrigger;\n};\n\nSidepanel.displayName = 'Sidepanel';\nexport const SidepanelClose = React.forwardRef<\n  React.ComponentRef<typeof SidepanelPrimitive.Close>,\n  SidepanelCloseProps\n>((props, ref) => <SidepanelPrimitive.Close ref={ref} data-slot=\"sidepanel-close\" {...props} />);\nSidepanelClose.displayName = 'Sidepanel.Close';\nSidepanel.Close = SidepanelClose;\nSidepanel.Panel = SidepanelPanel;\nSidepanel.Description = SidepanelDescription;\nSidepanel.Footer = SidepanelFooter;\nSidepanel.Content = SidepanelContent;\nSidepanel.Header = SidepanelHeader;\nSidepanel.Title = SidepanelTitle;\nSidepanel.Actions = SidepanelActions;\nexport const SidepanelTrigger = React.forwardRef<\n  React.ComponentRef<typeof SidepanelPrimitive.Trigger>,\n  SidepanelTriggerProps\n>((props, ref) => (\n  <SidepanelPrimitive.Trigger ref={ref} data-slot=\"sidepanel-trigger\" {...props} />\n));\nSidepanelTrigger.displayName = 'Sidepanel.Trigger';\nSidepanel.Trigger = SidepanelTrigger;\n\nexport { Sidepanel };\n"
    },
    {
      "path": "src/components/sidepanel/Sidepanel.types.ts",
      "type": "registry:ui",
      "target": "components/ui/wideset/sidepanel/Sidepanel.types.ts",
      "content": "import type * as SidepanelPrimitive from '@radix-ui/react-dialog';\nimport type { VariantProps } from 'class-variance-authority';\nimport type { ComponentPropsWithoutRef, HTMLAttributes } from 'react';\n\nimport type { MotionProps } from '@/lib/wideset/motion/Motion.types';\nimport type { sidepanelPanelVariants } from './Sidepanel.variants';\n\nexport type SidepanelProps = SidepanelPrimitive.DialogProps;\n\n/** Props for the Sidepanel panel surface. Controls which edge it slides in from and its size. */\nexport type SidepanelPanelProps = ComponentPropsWithoutRef<typeof SidepanelPrimitive.Content> &\n  VariantProps<typeof sidepanelPanelVariants> &\n  MotionProps;\n\n/** The backdrop behind the dialog surface. */\nexport type SidepanelOverlayProps = ComponentPropsWithoutRef<typeof SidepanelPrimitive.Overlay> &\n  MotionProps;\n\n/** Props for the Sidepanel scrollable content area. */\nexport type SidepanelContentProps = React.HTMLAttributes<HTMLDivElement> & {\n  /** Additional className applied to the ScrollArea wrapper (outer element). */\n  wrapperClassName?: string;\n};\n\n/** Props for the Sidepanel header. */\nexport type SidepanelHeaderProps = HTMLAttributes<HTMLDivElement> & {\n  /** Draws the divider separating the header from the content. Defaults to `true`. */\n  divider?: boolean;\n};\n\n/** Props for the Sidepanel footer. */\nexport type SidepanelFooterProps = HTMLAttributes<HTMLDivElement> & {\n  /** Draws the divider separating the footer from the content. Defaults to `true`. */\n  divider?: boolean;\n};\n\n/** Props for `Sidepanel.Trigger` — the Radix Dialog trigger. */\nexport type SidepanelTriggerProps = ComponentPropsWithoutRef<typeof SidepanelPrimitive.Trigger>;\n\n/** Props for `Sidepanel.Close` — the Radix Dialog close control. */\nexport type SidepanelCloseProps = ComponentPropsWithoutRef<typeof SidepanelPrimitive.Close>;\n\n/** Props for `Sidepanel.Title`. */\nexport type SidepanelTitleProps = ComponentPropsWithoutRef<typeof SidepanelPrimitive.Title>;\n\n/** Props for `Sidepanel.Description`. */\nexport type SidepanelDescriptionProps = ComponentPropsWithoutRef<\n  typeof SidepanelPrimitive.Description\n>;\n\n/** Props for `Sidepanel.Actions` — the top-right action slot. */\nexport type SidepanelActionsProps = HTMLAttributes<HTMLDivElement>;\n"
    },
    {
      "path": "src/components/sidepanel/Sidepanel.variants.ts",
      "type": "registry:ui",
      "target": "components/ui/wideset/sidepanel/Sidepanel.variants.ts",
      "content": "import { cva } from 'class-variance-authority';\nimport { cn } from '@/lib/wideset/utils';\n\nexport const sidepanelPanelVariants = cva(\n  'bg-ws-static-container rounded-ws-container-lg z-ws-drawer fixed flex max-h-[calc(100vh-2*var(--ws-size-5))] w-full flex-col overflow-hidden',\n  {\n    variants: {\n      side: {\n        left: 'inset-y-ws-5 left-ws-5',\n        right: 'inset-y-ws-5 right-ws-5',\n      },\n      size: {\n        sm: 'max-w-[35rem]',\n        md: 'max-w-[44rem]',\n        lg: 'max-w-[60rem]',\n      },\n    },\n    defaultVariants: {\n      side: 'right',\n      size: 'md',\n    },\n  },\n);\n\nexport const sidepanelPanelMotionVariants = cva('', {\n  variants: {\n    enabled: {\n      true: cn(\n        'data-[state=open]:animate-in data-[state=closed]:animate-out',\n        'data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0',\n        'ease-(--ws-motion-ease-smooth-out) data-[state=open]:duration-(--ws-motion-duration-slow)',\n        'data-[state=closed]:duration-(--ws-motion-duration-medium)',\n      ),\n      false: '',\n    },\n    side: {\n      left: '',\n      right: '',\n    },\n  },\n  compoundVariants: [\n    {\n      enabled: true,\n      side: 'left',\n      className:\n        'data-[state=closed]:[--tw-exit-translate-x:calc(var(--ws-size-8)*-1)] data-[state=open]:[--tw-enter-translate-x:calc(var(--ws-size-8)*-1)]',\n    },\n    {\n      enabled: true,\n      side: 'right',\n      className:\n        'data-[state=open]:slide-in-from-right-ws-8 data-[state=closed]:slide-out-to-right-ws-8',\n    },\n  ],\n  defaultVariants: { enabled: true, side: 'right' },\n});\n\nexport const sidepanelOverlayClassName = 'bg-ws-static-scrim-base fixed inset-0 z-ws-drawer';\n\nexport const sidepanelOverlayMotionVariants = cva('', {\n  variants: {\n    enabled: {\n      true: cn(\n        'data-[state=open]:animate-in data-[state=closed]:animate-out',\n        'data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0',\n        'data-[state=open]:duration-(--ws-motion-duration-fast)',\n        'data-[state=closed]:duration-(--ws-motion-duration-quick)',\n      ),\n      false: '',\n    },\n  },\n  defaultVariants: { enabled: true },\n});\n"
    },
    {
      "path": "src/components/sidepanel/SidepanelActions.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/sidepanel/SidepanelActions.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\nimport { cn } from '@/lib/wideset/utils';\n\nconst SidepanelActions = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n  ({ className, ...props }, ref) => (\n    <div\n      ref={ref}\n      data-slot=\"sidepanel-actions\"\n      className={cn('top-ws-12 right-ws-12 gap-ws-5 absolute flex items-center', className)}\n      {...props}\n    />\n  ),\n);\nSidepanelActions.displayName = 'Sidepanel.Actions';\n\nexport { SidepanelActions };\n"
    },
    {
      "path": "src/components/sidepanel/SidepanelContent.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/sidepanel/SidepanelContent.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\nimport { cn } from '@/lib/wideset/utils';\n\nimport { ScrollArea } from '../scroll-area/ScrollArea';\nimport type { SidepanelContentProps } from './Sidepanel.types';\n\nconst SidepanelContent = React.forwardRef<HTMLDivElement, SidepanelContentProps>(\n  ({ className, wrapperClassName, ...props }, ref) => (\n    <ScrollArea className={cn('min-h-0 min-w-0 grow', wrapperClassName)}>\n      <div\n        ref={ref}\n        data-slot=\"sidepanel-content\"\n        className={cn('p-ws-12 min-h-full', className)}\n        {...props}\n      />\n    </ScrollArea>\n  ),\n);\n\nSidepanelContent.displayName = 'Sidepanel.Content';\n\nexport { SidepanelContent };\n"
    },
    {
      "path": "src/components/sidepanel/SidepanelDescription.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/sidepanel/SidepanelDescription.tsx",
      "content": "'use client';\n\nimport * as SidepanelPrimitive from '@radix-ui/react-dialog';\nimport * as React from 'react';\nimport { cn } from '@/lib/wideset/utils';\n\nconst SidepanelDescription = React.forwardRef<\n  React.ComponentRef<typeof SidepanelPrimitive.Description>,\n  React.ComponentPropsWithoutRef<typeof SidepanelPrimitive.Description>\n>(({ className, ...props }, ref) => (\n  <SidepanelPrimitive.Description\n    ref={ref}\n    data-slot=\"sidepanel-description\"\n    className={cn('text-ws-static-subtle typography-body-lg mt-ws-3', className)}\n    {...props}\n  />\n));\n\nSidepanelDescription.displayName = 'Sidepanel.Description';\n\nexport { SidepanelDescription };\n"
    },
    {
      "path": "src/components/sidepanel/SidepanelFooter.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/sidepanel/SidepanelFooter.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\nimport { cn } from '@/lib/wideset/utils';\n\nimport type { SidepanelFooterProps } from './Sidepanel.types';\n\nconst SidepanelFooter = React.forwardRef<HTMLDivElement, SidepanelFooterProps>(\n  ({ className, divider = true, ...props }, ref) => (\n    <div\n      ref={ref}\n      data-slot=\"sidepanel-footer\"\n      className={cn(\n        'gap-ws-5 p-ws-12 flex',\n        divider && 'border-ws-static-base border-t',\n        className,\n      )}\n      {...props}\n    />\n  ),\n);\nSidepanelFooter.displayName = 'Sidepanel.Footer';\n\nexport { SidepanelFooter };\n"
    },
    {
      "path": "src/components/sidepanel/SidepanelHeader.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/sidepanel/SidepanelHeader.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\nimport { cn } from '@/lib/wideset/utils';\n\nimport type { SidepanelHeaderProps } from './Sidepanel.types';\n\nconst SidepanelHeader = React.forwardRef<HTMLDivElement, SidepanelHeaderProps>(\n  ({ className, divider = true, ...props }, ref) => (\n    <div\n      ref={ref}\n      data-slot=\"sidepanel-header\"\n      className={cn(\n        'p-ws-12 flex flex-col',\n        divider && 'border-ws-static-base border-b',\n        className,\n      )}\n      {...props}\n    />\n  ),\n);\nSidepanelHeader.displayName = 'Sidepanel.Header';\n\nexport { SidepanelHeader };\n"
    },
    {
      "path": "src/components/sidepanel/SidepanelOverlay.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/sidepanel/SidepanelOverlay.tsx",
      "content": "'use client';\n\nimport * as SidepanelPrimitive from '@radix-ui/react-dialog';\nimport * as React from 'react';\nimport { cn } from '@/lib/wideset/utils';\n\nimport { useDefaultMotion } from '@/lib/wideset/motion/MotionProvider';\nimport type { SidepanelOverlayProps } from './Sidepanel.types';\nimport { sidepanelOverlayClassName, sidepanelOverlayMotionVariants } from './Sidepanel.variants';\n\nconst SidepanelOverlay = React.forwardRef<\n  React.ComponentRef<typeof SidepanelPrimitive.Overlay>,\n  SidepanelOverlayProps\n>(({ className, defaultMotion, ...props }, ref) => {\n  const motion = useDefaultMotion(defaultMotion);\n\n  return (\n    <SidepanelPrimitive.Overlay\n      data-slot=\"sidepanel-overlay\"\n      className={cn(\n        sidepanelOverlayClassName,\n        sidepanelOverlayMotionVariants({ enabled: motion }),\n        className,\n      )}\n      {...props}\n      ref={ref}\n    />\n  );\n});\n\nSidepanelOverlay.displayName = 'Sidepanel.Overlay';\n\nexport { SidepanelOverlay };\n"
    },
    {
      "path": "src/components/sidepanel/SidepanelPanel.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/sidepanel/SidepanelPanel.tsx",
      "content": "'use client';\n\nimport * as SidepanelPrimitive from '@radix-ui/react-dialog';\nimport * as React from 'react';\nimport { cn } from '@/lib/wideset/utils';\n\nimport { useDefaultMotion } from '@/lib/wideset/motion/MotionProvider';\nimport type { SidepanelPanelProps } from './Sidepanel.types';\nimport { sidepanelPanelMotionVariants, sidepanelPanelVariants } from './Sidepanel.variants';\nimport { SidepanelOverlay } from './SidepanelOverlay';\n\nconst SidepanelPanel = React.forwardRef<\n  React.ComponentRef<typeof SidepanelPrimitive.Content>,\n  SidepanelPanelProps\n>(({ side = 'right', size, className, children, defaultMotion, ...props }, ref) => {\n  const motion = useDefaultMotion(defaultMotion);\n\n  return (\n    <SidepanelPrimitive.Portal>\n      <SidepanelOverlay defaultMotion={motion} />\n      <SidepanelPrimitive.Content\n        ref={ref}\n        data-slot=\"sidepanel-panel\"\n        className={cn(\n          sidepanelPanelVariants({ side, size }),\n          sidepanelPanelMotionVariants({ enabled: motion, side }),\n          className,\n        )}\n        {...props}\n      >\n        {children}\n      </SidepanelPrimitive.Content>\n    </SidepanelPrimitive.Portal>\n  );\n});\n\nSidepanelPanel.displayName = 'Sidepanel.Panel';\n\nexport { SidepanelPanel };\n"
    },
    {
      "path": "src/components/sidepanel/SidepanelTitle.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/sidepanel/SidepanelTitle.tsx",
      "content": "'use client';\n\nimport * as SidepanelPrimitive from '@radix-ui/react-dialog';\nimport * as React from 'react';\nimport { cn } from '@/lib/wideset/utils';\n\nconst SidepanelTitle = React.forwardRef<\n  React.ComponentRef<typeof SidepanelPrimitive.Title>,\n  React.ComponentPropsWithoutRef<typeof SidepanelPrimitive.Title>\n>(({ className, ...props }, ref) => (\n  <SidepanelPrimitive.Title\n    ref={ref}\n    data-slot=\"sidepanel-title\"\n    className={cn('text-ws-static-strong typography-subtitle-md', className)}\n    {...props}\n  />\n));\n\nSidepanelTitle.displayName = 'Sidepanel.Title';\n\nexport { SidepanelTitle };\n"
    }
  ],
  "meta": {
    "version": "1.0.0",
    "commit": "8bb3627"
  }
}
