import { ConfigureOverlayContainerContext, OverlayBase, OverlayConfig, OverlayInstance } from "./Overlay"; import { StringProp } from "../../ui/Prop"; import { RenderingContext } from "../../ui/RenderingContext"; export interface DropdownConfig extends OverlayConfig { /** Placement option for the dropdown relative to the trigger element. */ placement?: StringProp | null; /** Offset distance from the trigger element. */ offset?: number; /** Match the dropdown width to the trigger element. */ matchWidth?: boolean; /** Match the dropdown max-width to the trigger element. */ matchMaxWidth?: boolean; /** Placement preference order. */ placementOrder?: string; /** Constrain the dropdown within the viewport. */ constrain?: boolean; /** Positioning strategy - "fixed", "absolute", or "auto". */ positioning?: string; /** Use touch-friendly positioning on touch devices. */ touchFriendly?: boolean; /** Show an arrow pointing to the trigger element. */ arrow?: boolean; /** Shift the dropdown so the arrow tip lines up with the target point (e.g. the mouse cursor for context menus). Only applies when `arrow` is also set. */ alignArrow?: boolean; /** Distance of the arrow tip from the dropdown's edge, in pixels. Override for the theme's default. */ arrowOffset?: number; /** Add padding around the dropdown. */ pad?: boolean; /** Element explosion distance for positioning. */ elementExplode?: number; /** Padding from screen edges. */ screenPadding?: number; /** First child element defines the height. */ firstChildDefinesHeight?: boolean; /** First child element defines the width. */ firstChildDefinesWidth?: boolean; /** The dropdown will be automatically closed if the page is scrolled a certain distance. */ closeOnScrollDistance?: number; /** The element to position the dropdown relative to. */ relatedElement?: Element; /** Callback to resolve the related element. */ onResolveRelatedElement?: string | ((beaconEl: Element, instance: any) => Element); /** Callback to measure natural content size. */ onMeasureNaturalContentSize?: string | ((el: Element, instance: any) => { width?: number; height?: number; }); /** Callback when dropdown mounts. */ onDropdownDidMount?: string; /** Callback to validate dropdown position. */ pipeValidateDropdownPosition?: string; /** Callback when dropdown is dismissed after scroll. */ onDismissAfterScroll?: string; /** Track mouse position for dropdowns. */ trackMouse?: boolean; /** Track mouse X position. */ trackMouseX?: boolean; /** Track mouse Y position. */ trackMouseY?: boolean; /** Cover the related element with dropdown. */ cover?: boolean; } export declare class DropdownInstance = Dropdown> extends OverlayInstance { mousePosition?: any; parentPositionChangeEvent?: any; initialScreenPosition?: any; relatedElement?: HTMLElement; needsBeacon?: boolean; } export declare class DropdownBase = DropdownInstance> extends OverlayBase { trackMouse?: boolean; trackMouseX?: boolean; trackMouseY?: boolean; offset: number; matchWidth?: boolean; matchMaxWidth?: boolean; placementOrder: string; placement?: StringProp | null; constrain?: boolean; positioning?: string; touchFriendly?: boolean; arrow?: boolean; alignArrow?: boolean; arrowOffset?: number; elementExplode?: number; screenPadding: number; firstChildDefinesHeight?: boolean; firstChildDefinesWidth?: boolean; closeOnScrollDistance: number; relatedElement?: HTMLElement; onResolveRelatedElement?: string | ((beaconEl: Element, instance: any) => Element); onMeasureNaturalContentSize?: string | ((el: Element, instance: any) => { width?: number; height?: number; }); onDropdownDidMount?: string; pipeValidateDropdownPosition?: string; onDismissAfterScroll?: string; onKeyDown?: string; cover?: boolean; mousePosition?: any; mouseTrap?: boolean; createDelay?: number; init(): void; declareData(...args: any[]): void; initInstance(context: RenderingContext, instance: InstanceType): void; prepareData(context: RenderingContext, instance: InstanceType): void; explore(context: RenderingContext, instance: InstanceType): void; exploreCleanup(context: RenderingContext, instance: InstanceType): void; overlayDidMount(instance: InstanceType, component: any): void; overlayDidUpdate(instance: InstanceType, component: any): void; overlayWillUnmount(instance: InstanceType, component: any): void; dismissAfterScroll(data: any, instance: InstanceType, component: any): void; updateDropdownPosition(instance: InstanceType, component: any): void; getArrowAdjust(component: any): number; applyFixedPositioningPlacementStyles(style: any, placement: string, contentSize: any, rel: any, el: HTMLElement, noAuto: boolean, arrowAdjust?: number): void; applyAbsolutePositioningPlacementStyles(style: any, placement: string, contentSize: any, rel: any, el: HTMLElement, noAuto: boolean, arrowAdjust?: number): void; applyPositioningPlacementStyles(style: any, placement: string, contentSize: any, parentBounds: any, el: HTMLElement, noAuto: boolean, arrowAdjust?: number): void; setDirectionClass(component: any, placement: string): void; measureNaturalDropdownSize(instance: InstanceType, component: any): any; findOptimalPlacement(contentSize: any, target: any, placement: string, lastPlacement: any): any; handleKeyDown(e: React.KeyboardEvent, instance: InstanceType): void; renderContents(context: RenderingContext, instance: InstanceType): any[]; render(context: RenderingContext, instance: InstanceType, key: string): any[]; getOverlayContainer(): HTMLElement; getConfigureOverlayContainerContext(instance?: DropdownInstance): ConfigureOverlayContainerContext; } export declare class Dropdown extends DropdownBase { } //# sourceMappingURL=Dropdown.d.ts.map