import * as React from "react"; import { DismissableLayer } from "@radix-ui/react-dismissable-layer"; import { FocusScope } from "@radix-ui/react-focus-scope"; import * as PopperPrimitive from "@radix-ui/react-popper"; import { Portal as _Portal1 } from "@radix-ui/react-portal"; import * as Radix from "@radix-ui/react-primitive"; import { Primitive } from "@radix-ui/react-primitive"; import * as RovingFocusGroup from "@radix-ui/react-roving-focus"; type Direction = 'ltr' | 'rtl'; export const createMenuScope: import("@radix-ui/react-context").CreateScope; export interface MenuProps { children?: React.ReactNode; open?: boolean; onOpenChange?(open: boolean): void; dir?: Direction; modal?: boolean; } export const Menu: React.FC; type PopperAnchorProps = Radix.ComponentPropsWithoutRef; export interface MenuAnchorProps extends PopperAnchorProps { } export const MenuAnchor: React.ForwardRefExoticComponent>; type PortalProps = React.ComponentPropsWithoutRef; export interface MenuPortalProps { children?: React.ReactNode; /** * Specify a container element to portal the content into. */ container?: PortalProps['container']; /** * Used to force mounting when more control is needed. Useful when * controlling animation with React animation libraries. */ forceMount?: true; } export const MenuPortal: React.FC; /** * We purposefully don't union MenuRootContent and MenuSubContent props here because * they have conflicting prop types. We agreed that we would allow MenuSubContent to * accept props that it would just ignore. */ export interface MenuContentProps extends MenuRootContentTypeProps { /** * Used to force mounting when more control is needed. Useful when * controlling animation with React animation libraries. */ forceMount?: true; } export const MenuContent: React.ForwardRefExoticComponent>; interface MenuRootContentTypeProps extends Omit { } type FocusScopeProps = Radix.ComponentPropsWithoutRef; type DismissableLayerProps = Radix.ComponentPropsWithoutRef; type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef; type PopperContentProps = Radix.ComponentPropsWithoutRef; type MenuContentImplPrivateProps = { onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus']; onDismiss?: DismissableLayerProps['onDismiss']; disableOutsidePointerEvents?: DismissableLayerProps['disableOutsidePointerEvents']; /** * Whether scrolling outside the `MenuContent` should be prevented * (default: `false`) */ disableOutsideScroll?: boolean; /** * Whether focus should be trapped within the `MenuContent` * (default: false) */ trapFocus?: FocusScopeProps['trapped']; }; interface MenuContentImplProps extends MenuContentImplPrivateProps, Omit { /** * Event handler called when auto-focusing on close. * Can be prevented. */ onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']; /** * Whether keyboard navigation should loop around * @defaultValue false */ loop?: RovingFocusGroupProps['loop']; onEntryFocus?: RovingFocusGroupProps['onEntryFocus']; onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside']; onFocusOutside?: DismissableLayerProps['onFocusOutside']; onInteractOutside?: DismissableLayerProps['onInteractOutside']; } type PrimitiveDivProps = Radix.ComponentPropsWithoutRef; export interface MenuGroupProps extends PrimitiveDivProps { } export const MenuGroup: React.ForwardRefExoticComponent>; export interface MenuLabelProps extends PrimitiveDivProps { } export const MenuLabel: React.ForwardRefExoticComponent>; export interface MenuItemProps extends Omit { onSelect?: (event: Event) => void; } export const MenuItem: React.ForwardRefExoticComponent>; interface MenuItemImplProps extends PrimitiveDivProps { disabled?: boolean; textValue?: string; } type CheckedState = boolean | 'indeterminate'; export interface MenuCheckboxItemProps extends MenuItemProps { checked?: CheckedState; onCheckedChange?: (checked: boolean) => void; } export const MenuCheckboxItem: React.ForwardRefExoticComponent>; export interface MenuRadioGroupProps extends MenuGroupProps { value?: string; onValueChange?: (value: string) => void; } export const MenuRadioGroup: React.ForwardRefExoticComponent>; export interface MenuRadioItemProps extends MenuItemProps { value: string; } export const MenuRadioItem: React.ForwardRefExoticComponent>; type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef; export interface MenuItemIndicatorProps extends PrimitiveSpanProps { /** * Used to force mounting when more control is needed. Useful when * controlling animation with React animation libraries. */ forceMount?: true; } export const MenuItemIndicator: React.ForwardRefExoticComponent>; export interface MenuSeparatorProps extends PrimitiveDivProps { } export const MenuSeparator: React.ForwardRefExoticComponent>; type PopperArrowProps = Radix.ComponentPropsWithoutRef; export interface MenuArrowProps extends PopperArrowProps { } export const MenuArrow: React.ForwardRefExoticComponent>; export interface MenuSubProps { children?: React.ReactNode; open?: boolean; onOpenChange?(open: boolean): void; } export const MenuSub: React.FC; export interface MenuSubTriggerProps extends MenuItemImplProps { } export const MenuSubTrigger: React.ForwardRefExoticComponent>; export interface MenuSubContentProps extends Omit { /** * Used to force mounting when more control is needed. Useful when * controlling animation with React animation libraries. */ forceMount?: true; } export const MenuSubContent: React.ForwardRefExoticComponent>; export const Root: React.FC; export const Anchor: React.ForwardRefExoticComponent>; export const Portal: React.FC; export const Content: React.ForwardRefExoticComponent>; export const Group: React.ForwardRefExoticComponent>; export const Label: React.ForwardRefExoticComponent>; export const Item: React.ForwardRefExoticComponent>; export const CheckboxItem: React.ForwardRefExoticComponent>; export const RadioGroup: React.ForwardRefExoticComponent>; export const RadioItem: React.ForwardRefExoticComponent>; export const ItemIndicator: React.ForwardRefExoticComponent>; export const Separator: React.ForwardRefExoticComponent>; export const Arrow: React.ForwardRefExoticComponent>; export const Sub: React.FC; export const SubTrigger: React.ForwardRefExoticComponent>; export const SubContent: React.ForwardRefExoticComponent>; //# sourceMappingURL=index.d.ts.map