import React from "react"; import { Portal } from "../../../portal/index.js"; import { DismissableLayer } from "../dismissablelayer/DismissableLayer.js"; import { Floating } from "../floating/Floating.js"; import { FocusBoundary } from "../focus-boundary/FocusBoundary.js"; import { RovingFocusProps } from "./parts/RovingFocus.js"; import { SlottedDivElementRef, SlottedDivProps } from "./parts/SlottedDivElement.js"; type CheckedState = boolean | "indeterminate"; interface MenuProps { children?: React.ReactNode; open?: boolean; onOpenChange?: (open: boolean) => void; modal?: boolean; } interface MenuComponent extends React.FC { Anchor: typeof MenuAnchor; Portal: typeof MenuPortal; Content: typeof MenuContent; Group: typeof MenuGroup; Item: typeof MenuItem; CheckboxItem: typeof MenuCheckboxItem; RadioGroup: typeof MenuRadioGroup; RadioItem: typeof MenuRadioItem; Divider: typeof MenuDivider; Sub: typeof MenuSub; SubTrigger: typeof MenuSubTrigger; SubContent: typeof MenuSubContent; ItemIndicator: typeof MenuItemIndicator; } declare const Menu: MenuComponent; type MenuAnchorProps = React.ComponentPropsWithoutRef; declare const MenuAnchor: React.ForwardRefExoticComponent>; type MenuContentProps = MenuContentInternalTypeProps; declare const MenuContent: React.ForwardRefExoticComponent>; type FocusScopeProps = React.ComponentPropsWithoutRef; type DismissableLayerProps = React.ComponentPropsWithoutRef; type MenuContentInternalPrivateProps = { initialFocus?: FocusScopeProps["initialFocus"]; onDismiss?: DismissableLayerProps["onDismiss"]; disableOutsidePointerEvents?: DismissableLayerProps["disableOutsidePointerEvents"]; }; interface MenuContentInternalProps extends MenuContentInternalPrivateProps, Omit, "dir" | "onPlaced"> { returnFocus?: FocusScopeProps["returnFocus"]; onEntryFocus?: RovingFocusProps["onEntryFocus"]; onEscapeKeyDown?: DismissableLayerProps["onEscapeKeyDown"]; onPointerDownOutside?: DismissableLayerProps["onPointerDownOutside"]; onFocusOutside?: DismissableLayerProps["onFocusOutside"]; onInteractOutside?: DismissableLayerProps["onInteractOutside"]; safeZone?: DismissableLayerProps["safeZone"]; } type MenuContentInternalTypeProps = Omit; type MenuItemElement = MenuItemInternalElement; interface MenuItemProps extends Omit { onSelect?: (event: Event) => void; } declare const MenuItem: React.ForwardRefExoticComponent>; type MenuItemInternalElement = SlottedDivElementRef; interface MenuItemInternalProps extends SlottedDivProps { disabled?: boolean; } type MenuGroupProps = SlottedDivProps; declare const MenuGroup: React.ForwardRefExoticComponent>; type PortalProps = React.ComponentPropsWithoutRef; type MenuPortalProps = PortalProps & { children: React.ReactElement; }; declare const MenuPortal: React.ForwardRefExoticComponent, "ref"> & { children: React.ReactElement; } & React.RefAttributes>; interface MenuRadioGroupProps extends MenuGroupProps { value?: string; onValueChange?: (value: string) => void; } declare const MenuRadioGroup: React.ForwardRefExoticComponent>; type MenuItemIndicatorProps = SlottedDivProps; declare const MenuItemIndicator: React.ForwardRefExoticComponent>; interface MenuRadioItemProps extends MenuItemProps { value: string; } declare const MenuRadioItem: React.ForwardRefExoticComponent>; interface MenuCheckboxItemProps extends MenuItemProps { checked?: CheckedState; onCheckedChange?: (checked: boolean) => void; } declare const MenuCheckboxItem: React.ForwardRefExoticComponent>; type MenuDividerProps = SlottedDivProps; declare const MenuDivider: React.ForwardRefExoticComponent>; interface MenuSubProps { children?: React.ReactNode; open?: boolean; onOpenChange?: (open: boolean) => void; } declare const MenuSub: React.FC; type MenuSubTriggerProps = MenuItemInternalProps; declare const MenuSubTrigger: React.ForwardRefExoticComponent>; type MenuSubContentProps = Omit; declare const MenuSubContent: React.ForwardRefExoticComponent>; export { Menu, MenuAnchor, MenuCheckboxItem, MenuContent, MenuDivider, MenuGroup, MenuItem, MenuItemIndicator, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuSub, MenuSubContent, MenuSubTrigger, type MenuAnchorProps, type MenuCheckboxItemProps, type MenuContentProps, type MenuDividerProps, type MenuGroupProps, type MenuItemElement, type MenuItemIndicatorProps, type MenuPortalProps, type MenuProps, type MenuRadioGroupProps, type MenuRadioItemProps, type MenuSubContentProps, type MenuSubProps, type MenuSubTriggerProps, };