import { DataTestId } from '../../core/types/data-props.js'; import { MaskingProps } from '../../core/types/masking-props.js'; import { WithChildren } from '../../core/types/with-children.js'; /** * @public */ export interface MenuContentProps extends WithChildren, MaskingProps, DataTestId { /** * The preferred side where the menu content should be rendered relative to the * trigger element. This value may be ignored if collisions occur. * This prop is ignored within submenus. * * @defaultValue 'bottom' */ side?: 'bottom' | 'top' | 'right' | 'left'; /** * The horizontal position where the menu content should be rendered relative * to the trigger element. This value may be ignored if collisions occur * or when `side` is set to `'right'` or `'left'`. * This prop is ignored within submenus. * * @defaultValue 'start' */ alignment?: 'start' | 'center' | 'end'; /** * Event handler called when focus moves to the trigger after closing. * It can be prevented by calling event.preventDefault. */ onCloseAutoFocus?: (event: Event) => void; /** * When true, overrides the side and align preferences to prevent collisions * with boundary edges. * * @defaultValue true */ avoidCollisions?: boolean; /** * Additional elements can be provided to be included in the boundary check for menu. * By default this is the viewport. */ collisionBoundary?: Element | null | Array; } /** * @public */ export interface MenuSubProps extends WithChildren { /** * The open state of the dropdown menu when it is initially rendered. Use when * you do not need to control its open state. */ defaultOpen?: boolean; /** * The controlled open state of the dropdown menu. Must be used in conjunction * with onOpenChange. */ open?: boolean; /** * Event handler called when the open state of the dropdown menu changes. * @param isOpen - true if the menu has been opened */ onOpenChange?: (isOpen: boolean) => void; } //# sourceMappingURL=types.d.ts.map