import { DismissableLayer } from "@loke/ui/dismissable-layer"; import { FocusScope } from "@loke/ui/focus-scope"; import * as PopperPrimitive from "@loke/ui/popper"; import { Portal as PortalPrimitive } from "@loke/ui/portal"; import { Primitive } from "@loke/ui/primitive"; import * as RovingFocusGroup from "@loke/ui/roving-focus"; import { type ComponentPropsWithoutRef, type FC, type ReactNode } from "react"; type Direction = "ltr" | "rtl"; declare const createMenuScope: import("@loke/ui/context").CreateScope; interface MenuProps { children?: ReactNode; dir?: Direction; modal?: boolean; onOpenChange?(open: boolean): void; open?: boolean; } declare const Menu: FC; type PopperAnchorProps = ComponentPropsWithoutRef; interface MenuAnchorProps extends PopperAnchorProps { } declare const MenuAnchor: import("react").ForwardRefExoticComponent>; type PortalProps = ComponentPropsWithoutRef; interface MenuPortalProps { children?: 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; } declare const MenuPortal: 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. */ interface MenuContentProps extends MenuRootContentTypeProps { /** * Used to force mounting when more control is needed. Useful when * controlling animation with React animation libraries. */ forceMount?: true; } declare const MenuContent: import("react").ForwardRefExoticComponent>; interface MenuRootContentTypeProps extends Omit { } type FocusScopeProps = ComponentPropsWithoutRef; type DismissableLayerProps = ComponentPropsWithoutRef; type RovingFocusGroupProps = ComponentPropsWithoutRef; type PopperContentProps = 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 { /** * Whether keyboard navigation should loop around * @defaultValue false */ loop?: RovingFocusGroupProps["loop"]; /** * Event handler called when auto-focusing on close. * Can be prevented. */ onCloseAutoFocus?: FocusScopeProps["onUnmountAutoFocus"]; onEntryFocus?: RovingFocusGroupProps["onEntryFocus"]; onEscapeKeyDown?: DismissableLayerProps["onEscapeKeyDown"]; onFocusOutside?: DismissableLayerProps["onFocusOutside"]; onInteractOutside?: DismissableLayerProps["onInteractOutside"]; onPointerDownOutside?: DismissableLayerProps["onPointerDownOutside"]; } type PrimitiveDivProps = ComponentPropsWithoutRef; interface MenuGroupProps extends PrimitiveDivProps { } declare const MenuGroup: import("react").ForwardRefExoticComponent>; interface MenuLabelProps extends PrimitiveDivProps { } declare const MenuLabel: import("react").ForwardRefExoticComponent>; interface MenuItemProps extends Omit { onSelect?: (event: Event) => void; } declare const MenuItem: import("react").ForwardRefExoticComponent>; interface MenuItemImplProps extends PrimitiveDivProps { disabled?: boolean; textValue?: string; } type CheckedState = boolean | "indeterminate"; interface MenuCheckboxItemProps extends MenuItemProps { checked?: CheckedState; onCheckedChange?: (checked: boolean) => void; } declare const MenuCheckboxItem: import("react").ForwardRefExoticComponent>; interface MenuRadioGroupProps extends MenuGroupProps { onValueChange?: (value: string) => void; value?: string; } declare const MenuRadioGroup: import("react").ForwardRefExoticComponent>; interface MenuRadioItemProps extends MenuItemProps { value: string; } declare const MenuRadioItem: import("react").ForwardRefExoticComponent>; type PrimitiveSpanProps = ComponentPropsWithoutRef; interface MenuItemIndicatorProps extends PrimitiveSpanProps { /** * Used to force mounting when more control is needed. Useful when * controlling animation with React animation libraries. */ forceMount?: true; } declare const MenuItemIndicator: import("react").ForwardRefExoticComponent>; interface MenuSeparatorProps extends PrimitiveDivProps { } declare const MenuSeparator: import("react").ForwardRefExoticComponent>; type PopperArrowProps = ComponentPropsWithoutRef; interface MenuArrowProps extends PopperArrowProps { } declare const MenuArrow: import("react").ForwardRefExoticComponent>; interface MenuSubProps { children?: ReactNode; onOpenChange?(open: boolean): void; open?: boolean; } declare const MenuSub: FC; interface MenuSubTriggerProps extends MenuItemImplProps { } declare const MenuSubTrigger: import("react").ForwardRefExoticComponent>; interface MenuSubContentProps extends Omit { /** * Used to force mounting when more control is needed. Useful when * controlling animation with React animation libraries. */ forceMount?: true; } declare const MenuSubContent: import("react").ForwardRefExoticComponent>; declare const Root: FC; declare const Anchor: import("react").ForwardRefExoticComponent>; declare const Portal: FC; declare const Content: import("react").ForwardRefExoticComponent>; declare const Group: import("react").ForwardRefExoticComponent>; declare const Label: import("react").ForwardRefExoticComponent>; declare const Item: import("react").ForwardRefExoticComponent>; declare const CheckboxItem: import("react").ForwardRefExoticComponent>; declare const RadioGroup: import("react").ForwardRefExoticComponent>; declare const RadioItem: import("react").ForwardRefExoticComponent>; declare const ItemIndicator: import("react").ForwardRefExoticComponent>; declare const Separator: import("react").ForwardRefExoticComponent>; declare const Arrow: import("react").ForwardRefExoticComponent>; declare const Sub: FC; declare const SubTrigger: import("react").ForwardRefExoticComponent>; declare const SubContent: import("react").ForwardRefExoticComponent>; export { createMenuScope, Menu, MenuAnchor, MenuPortal, MenuContent, MenuGroup, MenuLabel, MenuItem, MenuCheckboxItem, MenuRadioGroup, MenuRadioItem, MenuItemIndicator, MenuSeparator, MenuArrow, MenuSub, MenuSubTrigger, MenuSubContent, Root, Anchor, Portal, Content, Group, Label, Item, CheckboxItem, RadioGroup, RadioItem, ItemIndicator, Separator, Arrow, Sub, SubTrigger, SubContent, }; export type { MenuProps, MenuAnchorProps, MenuPortalProps, MenuContentProps, MenuGroupProps, MenuLabelProps, MenuItemProps, MenuCheckboxItemProps, MenuRadioGroupProps, MenuRadioItemProps, MenuItemIndicatorProps, MenuSeparatorProps, MenuArrowProps, MenuSubProps, MenuSubTriggerProps, MenuSubContentProps, };