import { Menu as BaseMenu } from '@base-ui/react/menu'; import * as React from 'react'; declare const menuItemVariants: (props?: ({ hasIcon?: boolean | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; export interface MenuRootProps extends React.ComponentPropsWithoutRef { /** Selected item value, when the menu is being used to pick one of a set. */ value?: TSelection; onValueChange?: (value: TSelection) => void; } export interface MenuTriggerProps extends React.ComponentPropsWithoutRef { /** * Show the chevron that rotates while the menu is open. * @default true */ showChevron?: boolean; chevronIcon?: React.ReactNode; } /** * Merges Base UI's trigger behavior into the caller's element rather than wrapping * it, and appends the chevron inside that element so it inherits the button's ink. */ declare const MenuTrigger: React.ForwardRefExoticComponent>; declare const MenuPortal: React.ForwardRefExoticComponent & React.RefAttributes>; export interface MenuPositionerProps extends React.ComponentPropsWithoutRef { } declare const MenuPositioner: React.ForwardRefExoticComponent>; export interface MenuPopupProps extends React.ComponentPropsWithoutRef { } /** * **Portalled.** Stamps the active theme, since the popup renders into * `document.body`, outside the element carrying `data-theme`. */ declare const MenuPopup: React.ForwardRefExoticComponent>; export interface MenuItemProps extends BaseMenu.Item.Props { /** * Makes this item a selection rather than an action: it renders a check when * chosen and becomes a `menuitemradio`. * * Wrap selectable items in a {@link MenuGroup}. WAI-ARIA APG expects * `menuitemradio` items inside a `role="group"`, or a screen reader announces each * one with no sense of the set it belongs to. */ value?: TSelection; icon?: React.ReactNode; } declare function MenuItemInner({ children, className, icon, onClick, value, ...props }: MenuItemProps, ref: React.ForwardedRef): React.JSX.Element; declare const MenuItem: (props: MenuItemProps & { ref?: React.ForwardedRef; }) => ReturnType; export interface MenuSeparatorProps extends React.ComponentPropsWithoutRef { } declare const MenuSeparator: React.ForwardRefExoticComponent>; export interface MenuGroupProps extends React.ComponentPropsWithoutRef { } declare const MenuGroup: React.ForwardRefExoticComponent>; export interface MenuGroupLabelProps extends React.ComponentPropsWithoutRef { } declare const MenuGroupLabel: React.ForwardRefExoticComponent>; /** * A menu of actions, or of one-of-a-set selections. * * Compound: `Menu` / `Trigger` / `Portal` / `Positioner` / `Popup`, with `Item`, * `Separator`, `Group` and `GroupLabel` inside. The portal and positioner are * explicit rather than folded into the popup, because a menu is the one overlay whose * placement callers routinely need to control. * * Give an `Item` a `value` and it becomes a selection: checked state, a check glyph * and `menuitemradio` semantics, reported through the root's `onValueChange`. * * @example * * * * Duplicate * * Archive * * */ export declare const Menu: { ({ value, onValueChange, children, ...rest }: MenuRootProps): React.JSX.Element; displayName: string; }; export interface MenuCheckboxItemProps extends React.ComponentPropsWithoutRef { } /** * A menu row that toggles. * * The indicator is `BaseMenu.CheckboxItemIndicator`, which renders only when checked — so the * check mark is absent rather than transparent, and a screen reader reads the row's `aria-checked` * rather than inferring state from an icon. */ export declare const MenuCheckboxItem: React.ForwardRefExoticComponent>; export interface MenuRadioGroupProps extends React.ComponentPropsWithoutRef { } /** Single-selection group of menu rows. Base UI owns the value bookkeeping. */ export declare const MenuRadioGroup: React.ForwardRefExoticComponent>; export interface MenuRadioItemProps extends React.ComponentPropsWithoutRef { } export declare const MenuRadioItem: React.ForwardRefExoticComponent>; export interface MenuSubProps extends React.ComponentPropsWithoutRef { } /** * A submenu. * * Base UI calls this `SubmenuRoot` and shadcn calls it `Sub`; both names are exported. It owns the * hover intent and the safe triangle between trigger and popup — the two things a hand-rolled * submenu gets wrong, where moving diagonally toward the popup closes it. */ export declare const MenuSub: typeof BaseMenu.SubmenuRoot; export interface MenuSubTriggerProps extends React.ComponentPropsWithoutRef { } export declare const MenuSubTrigger: React.ForwardRefExoticComponent>; /** * A submenu's popup, portalled and positioned. * * Unlike the top-level popup, this bundles portal and positioner: a submenu is always anchored to * its trigger, so there is no composition decision left for a caller to make, and leaving three * parts to assemble per submenu is how nesting gets wrong. */ export declare const MenuSubContent: React.ForwardRefExoticComponent>; export declare const DropdownMenu: { ({ value, onValueChange, children, ...rest }: MenuRootProps): React.JSX.Element; displayName: string; }; export declare const DropdownMenuTrigger: React.ForwardRefExoticComponent>; export declare const DropdownMenuContent: React.ForwardRefExoticComponent>; export declare const DropdownMenuItem: (props: MenuItemProps & { ref?: React.ForwardedRef; }) => ReturnType; export declare const DropdownMenuSeparator: React.ForwardRefExoticComponent>; export declare const DropdownMenuGroup: React.ForwardRefExoticComponent>; export declare const DropdownMenuLabel: React.ForwardRefExoticComponent>; export declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent>; export declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent>; export declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent>; export declare const DropdownMenuSub: typeof BaseMenu.SubmenuRoot; export declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent>; export declare const DropdownMenuSubContent: React.ForwardRefExoticComponent>; export { MenuTrigger, MenuPortal, MenuPositioner, MenuPopup, MenuItem, MenuSeparator, MenuGroup, MenuGroupLabel, menuItemVariants, }; //# sourceMappingURL=menu.d.ts.map