UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

120 lines (119 loc) 3.46 kB
import React, { Component, PropsWithChildren } from 'react'; import Modal from 'react-modal'; interface GetChildPosProps { offsets: Partial<{ topOffset: number; leftOffset: number; rightOffset: number; }>; rect: DOMRect; childRect: DOMRect; pageOffset: { x: number; y: number; }; padding: number; } export declare const getChildPos: ({ offsets, rect, childRect, pageOffset, padding }: GetChildPosProps) => { left: number; top: number; } | { right: number; top: number; }; declare const defaultModalStyle: { content: { top: number; left: number; border: number; right: string; bottom: string; padding: string; }; overlay: { right: string; bottom: string; width: string; height: string; backgroundColor: string; }; }; declare type PortaledProps = PropsWithChildren<{ right?: number; left?: number; top?: number; component?: React.ElementType<any>; onClose?: (event: React.MouseEvent<Element, globalThis.MouseEvent> | React.KeyboardEvent<Element>) => void; topOffset?: number; leftOffset?: number; rightOffset?: number; overlayZIndex?: number; isOpened?: boolean; modalProps?: Partial<ReactModal.Props>; modalStyle?: Partial<typeof defaultModalStyle>; theme?: any; }>; interface PortaledState { pos: { left: number; top: number; } | { right: number; top: number; } | null; isVisible: boolean; } declare class Portaled extends Component<PortaledProps, PortaledState> { static getDerivedStateFromError(): { hasError: boolean; }; static defaultProps: PortaledProps; state: { pos: null; isVisible: boolean; }; unsubscribe: (() => boolean) | undefined; _unmounted: boolean; componentDidMount(): void; componentDidUpdate(prevProps: PortaledProps): void; componentDidCatch(): void; componentWillUnmount(): void; element: React.RefObject<HTMLDivElement>; child: React.RefObject<HTMLDivElement>; handleScroll: () => void; render(): JSX.Element; } declare const _default: React.ForwardRefExoticComponent<Pick<import("styled-components").ExecutionProps, "as" | "forwardedAs"> & { theme?: import("styled-components").DefaultTheme | undefined; } & { children?: React.ReactNode; onClose?: ((event: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void) | undefined; left?: number | undefined; right?: number | undefined; top?: number | undefined; component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined; topOffset?: number | undefined; leftOffset?: number | undefined; rightOffset?: number | undefined; overlayZIndex?: number | undefined; isOpened?: boolean | undefined; modalProps?: Partial<Modal.Props> | undefined; modalStyle?: Partial<{ content: { top: number; left: number; border: number; right: string; bottom: string; padding: string; }; overlay: { right: string; bottom: string; width: string; height: string; backgroundColor: string; }; }> | undefined; } & React.RefAttributes<typeof Portaled>> & {}; export default _default;