{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dropdown-menu",
  "type": "registry:ui",
  "title": "Dropdown Menu",
  "description": "Compact action menu with separators, shortcuts, and keyboard controls.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "components/ui/dropdown-menu.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { Check, ChevronRight, MoreHorizontal } from 'lucide-react'\nimport { cn } from '@/lib/utils'\n\nexport const DropdownMenuRoot = DropdownMenuPrimitive.Root\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nexport const DropdownMenuSubTrigger = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n    inset?: boolean\n  }\n>(({ className, inset, children, ...props }, ref) => (\n  <DropdownMenuPrimitive.SubTrigger\n    ref={ref}\n    className={cn(\n      'flex cursor-default select-none items-center gap-2 rounded-xl px-3 py-2 text-sm font-extrabold outline-none focus:bg-rk-primary data-[state=open]:bg-rk-primary [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n      inset && 'pl-8',\n      className\n    )}\n    {...props}\n  >\n    {children}\n    <ChevronRight className=\"ml-auto\" />\n  </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nexport const DropdownMenuSubContent = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n  <DropdownMenuPrimitive.SubContent\n    ref={ref}\n    className={cn(\n      'z-50 min-w-52 overflow-hidden rounded-2xl border-3 border-rk-ink bg-white p-2 font-sans text-rk-ink rk-shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n      className\n    )}\n    {...props}\n  />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nexport const DropdownMenuContent = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 6, ...props }, ref) => (\n  <DropdownMenuPrimitive.Portal>\n    <DropdownMenuPrimitive.Content\n      ref={ref}\n      sideOffset={sideOffset}\n      className={cn(\n        'z-50 min-w-52 overflow-hidden rounded-2xl border-3 border-rk-ink bg-white p-2 font-sans text-rk-ink rk-shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n        className\n      )}\n      {...props}\n    />\n  </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nexport const DropdownMenuItem = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n    inset?: boolean\n    shortcut?: string\n  }\n>(({ className, inset, shortcut, children, ...props }, ref) => (\n  <DropdownMenuPrimitive.Item\n    ref={ref}\n    className={cn(\n      'relative flex min-h-10 cursor-default select-none items-center gap-3 rounded-xl px-3 text-left text-sm font-extrabold outline-none transition-colors focus:bg-rk-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-40 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n      inset && 'pl-8',\n      className\n    )}\n    {...props}\n  >\n    {children}\n    {shortcut && (\n      <span className=\"ml-auto font-mono text-[10px] text-black/50\">{shortcut}</span>\n    )}\n  </DropdownMenuPrimitive.Item>\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nexport const DropdownMenuCheckboxItem = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n  <DropdownMenuPrimitive.CheckboxItem\n    ref={ref}\n    className={cn(\n      'relative flex cursor-default select-none items-center rounded-xl py-2 pl-8 pr-3 text-sm font-extrabold outline-none transition-colors focus:bg-rk-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-40',\n      className\n    )}\n    checked={checked}\n    {...props}\n  >\n    <span className=\"absolute left-3 flex h-4 w-4 items-center justify-center\">\n      <DropdownMenuPrimitive.ItemIndicator>\n        <Check className=\"h-4 w-4 stroke-[3]\" />\n      </DropdownMenuPrimitive.ItemIndicator>\n    </span>\n    {children}\n  </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nexport const DropdownMenuRadioItem = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n  <DropdownMenuPrimitive.RadioItem\n    ref={ref}\n    className={cn(\n      'relative flex cursor-default select-none items-center rounded-xl py-2 pl-8 pr-3 text-sm font-extrabold outline-none transition-colors focus:bg-rk-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-40',\n      className\n    )}\n    {...props}\n  >\n    <span className=\"absolute left-3 flex h-4 w-4 items-center justify-center\">\n      <DropdownMenuPrimitive.ItemIndicator>\n        <span className=\"h-2.5 w-2.5 rounded-full bg-rk-ink\" />\n      </DropdownMenuPrimitive.ItemIndicator>\n    </span>\n    {children}\n  </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nexport const DropdownMenuLabel = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n    inset?: boolean\n  }\n>(({ className, inset, ...props }, ref) => (\n  <DropdownMenuPrimitive.Label\n    ref={ref}\n    className={cn(\n      'px-3 py-2 font-mono text-[10px] font-black uppercase tracking-wider text-rk-secondary',\n      inset && 'pl-8',\n      className\n    )}\n    {...props}\n  />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nexport const DropdownMenuSeparator = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n  <DropdownMenuPrimitive.Separator\n    ref={ref}\n    className={cn('-mx-1 my-1 border-t-2 border-rk-ink/10', className)}\n    {...props}\n  />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nexport const DropdownMenuShortcut = ({\n  className,\n  ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n  return (\n    <span\n      className={cn('ml-auto font-mono text-[10px] text-black/50', className)}\n      {...props}\n    />\n  )\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\n/* ------------------------------------------------------------------ */\n/* Legacy compatibility wrapper                                        */\n/* ------------------------------------------------------------------ */\n\nexport interface DropdownMenuLegacyItem {\n  label: React.ReactNode\n  onSelect?: () => void\n  shortcut?: string\n  icon?: React.ReactNode\n  disabled?: boolean\n  separator?: boolean\n}\n\nexport interface DropdownMenuProps {\n  trigger?: React.ReactNode\n  items: DropdownMenuLegacyItem[]\n  align?: 'start' | 'end'\n  className?: string\n}\n\nexport function DropdownMenu({ trigger, items, align = 'start', className }: DropdownMenuProps) {\n  return (\n    <DropdownMenuRoot>\n      <DropdownMenuTrigger asChild>\n        <button\n          type=\"button\"\n          className={cn(\n            'flex h-10 items-center gap-2 rounded-full bg-white px-4 text-sm font-extrabold rk-border-sm rk-shadow-sm hover:bg-rk-primary focus:outline-none focus:ring-4 focus:ring-black focus:ring-offset-2 cursor-pointer',\n            className\n          )}\n        >\n          {trigger ?? <><MoreHorizontal className=\"h-4 w-4\" aria-hidden=\"true\" /> Menu</>}\n        </button>\n      </DropdownMenuTrigger>\n      <DropdownMenuContent align={align} className={className}>\n        {items.map((item, index) =>\n          item.separator ? (\n            <DropdownMenuSeparator key={`separator-${index}`} />\n          ) : (\n            <DropdownMenuItem\n              key={`${index}-${typeof item.label === 'string' ? item.label : index}`}\n              disabled={item.disabled}\n              shortcut={item.shortcut}\n              onSelect={() => {\n                item.onSelect?.()\n              }}\n            >\n              <span className=\"flex h-5 w-5 shrink-0 items-center justify-center\">{item.icon}</span>\n              <span className=\"min-w-0 flex-1 truncate\">{item.label}</span>\n            </DropdownMenuItem>\n          )\n        )}\n      </DropdownMenuContent>\n    </DropdownMenuRoot>\n  )\n}\n",
      "type": "registry:ui",
      "target": "components/ui/dropdown-menu.tsx"
    }
  ]
}