{
  "name": "popover",
  "type": "registry:ui",
  "framework": "react",
  "title": "Popover",
  "description": "A small panel anchored to the button that opens it, closed by Escape or a press outside.",
  "dependencies": [
    "radix-ui"
  ],
  "files": [
    {
      "path": "ui/popover.tsx",
      "content": "\"use client\"\n\nimport { Popover as PopoverPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n/*\n * Radix owns the behaviour: open state, Escape and outside press, focus\n * return to the trigger, and collision-aware placement. Only the look is\n * newt/ui's.\n */\nconst Popover = PopoverPrimitive.Root\n\n/*\n * It has no look of its own. Pass `asChild` to put the state on your own\n * button, or the classes of the button it should be, for example\n * `className={buttonVariants({ variant: \"secondary\" })}`.\n */\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nconst PopoverContent = React.forwardRef<\n  React.ComponentRef<typeof PopoverPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n    /**\n     * The element the panel is portalled into. Defaults to `document.body`;\n     * pass the enclosing native `<dialog>` or a themed wrapper to keep it there.\n     */\n    container?: React.ComponentProps<\n      typeof PopoverPrimitive.Portal\n    >[\"container\"]\n  }\n>(\n  (\n    { className, align = \"start\", sideOffset = 8, container, ...props },\n    ref\n  ) => (\n    <PopoverPrimitive.Portal container={container}>\n      <PopoverPrimitive.Content\n        ref={ref}\n        align={align}\n        sideOffset={sideOffset}\n        className={cn(\n          \"z-[110] flex w-[280px] max-w-[90vw] flex-col items-start gap-2 rounded-[var(--newt-radius-md)] border border-newt-border bg-newt-bg-floating p-3 text-sm leading-5 text-newt-text-secondary shadow-elevation-high outline-none\",\n          className\n        )}\n        {...props}\n      />\n    </PopoverPrimitive.Portal>\n  )\n)\nPopoverContent.displayName = \"PopoverContent\"\n\nexport { Popover, PopoverTrigger, PopoverAnchor, PopoverContent }\n",
      "type": "registry:ui"
    }
  ]
}