/** @packageDocumentation * @module ContextMenu */ import "./PopupContextMenu.scss"; import * as React from "react"; import { RelativePosition } from "@itwin/appui-abstract"; import type { CommonProps } from "../utils/Props.js"; /** Properties for [[PopupContextMenu]] component * @public * @deprecated in 4.16.0. Props of deprecated {@link PopupContextMenu} component. */ export interface PopupContextMenuProps extends CommonProps { /** Indicates whether the popup is shown or not (defaults to false) */ isOpen: boolean; /** Direction (relative to the target) to which the popup is expanded (defaults to Bottom) */ position?: RelativePosition; /** Target element to position popup */ target?: HTMLElement | null; /** Function called when the popup is opened */ onOpen?: () => void; /** Function called when user clicks outside the popup */ onOutsideClick?: (e: MouseEvent) => void; /** Function called when the popup is closed */ onClose?: () => void; /** Function called when the popup is closed on Enter */ onEnter?: () => void; /** Top position (absolute positioning - defaults to 0) */ top?: number; /** Left position (absolute positioning - defaults to 0) */ left?: number; /** Offset from the parent (defaults to 4) */ offset?: number; /** accessibility label */ ariaLabel?: string; /** Indicates whether to use animation for open/close (defaults to true) */ animate?: boolean; /** When list item or submenu is selected */ onSelect?: (event: React.MouseEvent | undefined) => void; /** when Escape button is pressed */ onEsc?: (event: React.KeyboardEvent) => void; /** Whether menu flips directions based on screen edge. Default: true */ autoflip?: boolean; /** Whether menu hugs screen edge when autoflip is off. Default: true */ edgeLimit?: boolean; /** Whether Hotkey press selects item, or just highlights item. Default: true */ hotkeySelect?: boolean; /** starting menu item selected index Default: -1 */ selectedIndex?: number; /** ContextMenu items */ children?: React.ReactNode; } /** Component that displays a ContextMenu within a Popup component, allowing the target element to be specified. * @public * @deprecated in 4.16.0. Use {@link https://itwinui.bentley.com/docs/dropdownmenu iTwinUI DropdownMenu} component instead. */ export declare function PopupContextMenu(props: PopupContextMenuProps): React.JSX.Element; //# sourceMappingURL=PopupContextMenu.d.ts.map