import * as React from 'react'; import { ClosablePopover, ClosablePopoverProps, ClosablePopoverActions, Placement, AppendTo } from './ClosablePopover'; import { Appearance } from './constants'; export { Placement, AppendTo }; export interface FloatingHelperOwnProps { /** Width HTML attribute of the content. If a number is passed then it defaults to px. e.g width={400} => width="400px" */ width?: string | number; /** The target of the popover */ target: React.ReactNode; /** A `` component */ content: React.ReactNode; /** In Controlled mode - called when the close button is clicked. In Uncontrolled mode - called when the popover is closed */ onClose?: Function; /** Appearance : `dark` or `light` */ appearance?: Appearance; } export interface PickedClosablePopoverPropsHack { /** Controls wether the popover's content is initially opened (In Uncontrolled mode only) */ initiallyOpened?: boolean; /** Controls wether the popover's content is shown or not (aka Controlled mode). * When undefined, then the component is Uncontrolled. See open/close behaviour section in docs. */ opened?: boolean; /** The location to display the content. possible values: 'auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start' */ placement: Placement; /** Enables calculations in relation to a dom element. possible values: 'scrollParent', 'viewport', 'window' or an Element. See PopperJs docs: https://popper.js.org/popper-documentation.html#modifiers..preventOverflow.boundariesElement */ appendTo?: AppendTo; /** Callback to call when the popover content is requested to be opened (Uncontrolled mode only)*/ onOpen?: Function; } export declare type PickedClosablePopoverProps = Pick; export declare type FloatingHelperProps = PickedClosablePopoverProps & FloatingHelperOwnProps & PickedClosablePopoverPropsHack; export declare class FloatingHelper extends React.Component { static displayName: string; closablePopoverRef: ClosablePopover; static Content: React.SFC; static defaultProps: Partial; open: () => void; close: () => void; isControlled(): boolean; getCloseButtonHandler(closableActions: ClosablePopoverActions): Function; renderContent(closableActions: ClosablePopoverActions, { width, content, appearance }: Partial): JSX.Element; render(): JSX.Element; }