// shadcn-style DropdownMenu — Radix wrappers with kit token styling.
//
// 1:1 API with shadcn/ui reference so docs + examples lifted from
// there work without rename:
//
//
//
//
// Account
// Settings
//
//
// System
// Light
// Dark
//
//
//
//
// Not yet wrapped: CheckboxItem, Sub / SubTrigger / SubContent.
// Add when something needs them — keeps the surface lean.
import {
forwardRef,
type ComponentPropsWithoutRef,
type ComponentRef,
type ReactNode,
} from 'react'
import * as RDM from '@radix-ui/react-dropdown-menu'
import { cn } from '../cn'
// ---- Pass-through wrappers ----
export const DropdownMenu = RDM.Root
export const DropdownMenuTrigger = RDM.Trigger
export const DropdownMenuGroup = RDM.Group
export const DropdownMenuPortal = RDM.Portal
export const DropdownMenuRadioGroup = RDM.RadioGroup
// ---- Content ----
export const DropdownMenuContent = forwardRef<
ComponentRef,
ComponentPropsWithoutRef
>(({ className, sideOffset = 6, ...props }, ref) => (
))
DropdownMenuContent.displayName = 'DropdownMenuContent'
// ---- Label ----
export const DropdownMenuLabel = forwardRef<
ComponentRef,
ComponentPropsWithoutRef & { readonly inset?: boolean }
>(({ className, inset, ...props }, ref) => (
))
DropdownMenuLabel.displayName = 'DropdownMenuLabel'
// ---- Separator ----
export const DropdownMenuSeparator = forwardRef<
ComponentRef,
ComponentPropsWithoutRef
>(({ className, ...props }, ref) => (
))
DropdownMenuSeparator.displayName = 'DropdownMenuSeparator'
// ---- Item ----
//
// `destructive` opts into the destructive token — shorthand for the
// common "Sign out / Delete" use case so callers don't repeat the
// same Tailwind chain.
export const DropdownMenuItem = forwardRef<
ComponentRef,
ComponentPropsWithoutRef & {
readonly inset?: boolean
readonly destructive?: boolean
}
>(({ className, inset, destructive, ...props }, ref) => (
))
DropdownMenuItem.displayName = 'DropdownMenuItem'
// ---- RadioItem ----
//
// Indicator: filled dot on the left, slot reserved (pl-8) so
// unselected items stay aligned with selected ones.
const RadioDot = (): ReactNode => (
)
export const DropdownMenuRadioItem = forwardRef<
ComponentRef,
ComponentPropsWithoutRef
>(({ className, children, ...props }, ref) => (
{children}
))
DropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem'