"use client"; import { type ComponentProps } from "react"; import { Menu as MenuPrimitive } from "@base-ui/react/menu"; import { cn } from "./cn"; /* * Base UI stays behind this file, as with Dialog. * * The primitive owns everything hard about a menu: roving focus across items, * arrow-key navigation, typeahead, Escape, outside-click, focus return to the * trigger, and anchored positioning. This wrapper adds styling and slots only. * * `container` is here for the same reason it is on DialogContent — a portal * re-parents to document.body and would otherwise escape the `data-brand` * subtree that supplies the theme. */ // Menu.Root renders no DOM of its own, so it takes no `data-slot` marker. function Menu(props: MenuPrimitive.Root.Props) { return ; } function MenuTrigger(props: MenuPrimitive.Trigger.Props) { return ; } function MenuGroup(props: MenuPrimitive.Group.Props) { return ; } export interface MenuContentProps extends MenuPrimitive.Popup.Props, Pick< MenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" > { container?: MenuPrimitive.Portal.Props["container"]; } function MenuContent({ className, container, align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }: MenuContentProps) { return ( ); } export interface MenuItemProps extends MenuPrimitive.Item.Props { variant?: "default" | "destructive"; } function MenuItem({ className, variant = "default", ...props }: MenuItemProps) { return ( ); } function MenuLabel({ className, ...props }: MenuPrimitive.GroupLabel.Props) { return ( ); } function MenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props) { return ( ); } /** Right-aligned keyboard hint. Presentational only. */ function MenuShortcut({ className, ...props }: ComponentProps<"span">) { return ( ); } export { Menu, MenuTrigger, MenuGroup, MenuContent, MenuItem, MenuLabel, MenuSeparator, MenuShortcut, };