{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "popover",
  "type": "registry:ui",
  "title": "Popover",
  "description": "Displays rich content in a animated portal, triggered by a button.",
  "author": "Ahdeetai <https://aditya.is-cool.dev>",
  "registryDependencies": [],
  "dependencies": [
    "motion",
    "@radix-ui/react-popover",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "type": "registry:ui",
      "path": "components/ui/popover.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport { motion } from 'motion/react';\nimport { cn } from '@/lib/utils';\n\nfunction Popover({\n  ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n  return <PopoverPrimitive.Root data-slot='popover' {...props} />;\n}\n\nfunction PopoverTrigger({\n  ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n  return <PopoverPrimitive.Trigger data-slot='popover-trigger' {...props} />;\n}\n\nfunction PopoverContent({\n  className,\n  align = 'center',\n  sideOffset = 4,\n  children,\n  ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n  return (\n    <PopoverPrimitive.Portal>\n      <PopoverPrimitive.Content\n        data-slot='popover-content'\n        align={align}\n        sideOffset={sideOffset}\n        asChild\n        {...props}\n      >\n        <motion.div\n          initial={{ opacity: 0, scale: 0.3, y: 20 }}\n          animate={{\n            opacity: 1,\n            scale: 1,\n            y: 0,\n            x: [0, -4, 4, -3, 3, -2, 2, -1, 1, 0],\n          }}\n          exit={{\n            opacity: 0,\n            scale: 0.8,\n            y: 10,\n            x: [0, -3, 3, -2, 2, -1, 1, 0],\n            transition: {\n              opacity: { duration: 0.25 },\n              scale: { duration: 0.25, ease: 'easeIn' },\n              y: { duration: 0.25, ease: 'easeIn' },\n              x: {\n                duration: 0.4,\n                ease: 'easeOut',\n                times: [0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 1],\n              },\n            },\n          }}\n          transition={{\n            opacity: { duration: 0.2 },\n            scale: {\n              duration: 0.6,\n              type: 'spring',\n              damping: 12,\n              stiffness: 400,\n              mass: 0.8,\n            },\n            y: {\n              duration: 0.5,\n              type: 'spring',\n              damping: 10,\n              stiffness: 300,\n              mass: 0.9,\n            },\n            x: {\n              duration: 0.7,\n              delay: 0.2,\n              ease: 'easeOut',\n              times: [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 1],\n            },\n          }}\n          className={cn(\n            'bg-popover text-popover-foreground z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n            className,\n          )}\n        >\n          {children}\n        </motion.div>\n      </PopoverPrimitive.Content>\n    </PopoverPrimitive.Portal>\n  );\n}\n\nfunction PopoverAnchor({\n  ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n  return <PopoverPrimitive.Anchor data-slot='popover-anchor' {...props} />;\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"
    },
    {
      "type": "registry:lib",
      "path": "lib/utils.ts",
      "content": "import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}"
    }
  ]
}
