|
| 1 | +declare namespace _default { |
| 2 | + export { Box }; |
| 3 | + export { Trigger }; |
| 4 | + export { Body }; |
| 5 | +} |
| 6 | +export default _default; |
| 7 | +export type BoxProps = { |
| 8 | + onShowBody?: () => void; |
| 9 | + onHideBody?: () => void; |
| 10 | + allowBodyInteractions?: boolean; |
| 11 | + top?: boolean; |
| 12 | + right?: boolean; |
| 13 | + scrolling_parent?: string; |
| 14 | + children: [React.ReactElement<TriggerProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>, React.ReactElement<{}, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)> | ((props: {}) => JSX.Element)]; |
| 15 | + className?: string; |
| 16 | +}; |
| 17 | +export type BoxState = Object; |
| 18 | +export type top = boolean; |
| 19 | +export type show_body = boolean; |
| 20 | +export type TriggerProps = { |
| 21 | + onClick?: (event?: React.MouseEvent<Element, MouseEvent>) => void; |
| 22 | +}; |
| 23 | +/** |
| 24 | + * @typedef {Object} BoxProps |
| 25 | + * @property {() => void} [onShowBody] |
| 26 | + * @property {() => void} [onHideBody] |
| 27 | + * @property {boolean} [allowBodyInteractions] |
| 28 | + * @property {boolean} [top] |
| 29 | + * @property {boolean} [right] |
| 30 | + * @property {string} [scrolling_parent] |
| 31 | + * @property {[React.ReactElement<TriggerProps>, React.ReactElement<{}> | ((props: {}) => JSX.Element)]} children |
| 32 | + * @property {string} [className] |
| 33 | + */ |
| 34 | +/** |
| 35 | + * @typedef {Object} BoxState |
| 36 | + * @typedef {boolean} top |
| 37 | + * @typedef {boolean} show_body |
| 38 | + */ |
| 39 | +/** @extends {React.Component<BoxProps, BoxState>} */ |
| 40 | +declare class Box extends React.Component<BoxProps, Object, any> { |
| 41 | + /** |
| 42 | + * @param {BoxProps} props |
| 43 | + * @param {unknown} context |
| 44 | + */ |
| 45 | + constructor(props: BoxProps, context: unknown); |
| 46 | + state: { |
| 47 | + show_body: boolean; |
| 48 | + top: boolean; |
| 49 | + }; |
| 50 | + /** |
| 51 | + * @param {MouseEvent} event |
| 52 | + */ |
| 53 | + _handleClickOutside(event: MouseEvent): void; |
| 54 | + /** |
| 55 | + * @param {HTMLElement} body |
| 56 | + */ |
| 57 | + _setPosition(body: HTMLElement): void; |
| 58 | + _toggleShowBody(): void; |
| 59 | + _timeout: NodeJS.Timeout; |
| 60 | + componentWillUnmount(): void; |
| 61 | + _getTriggerComponent(): React.ReactElement<TriggerProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>; |
| 62 | + _getBodyComponent(): JSX.Element; |
| 63 | + render(): JSX.Element; |
| 64 | +} |
| 65 | +declare namespace Box { |
| 66 | + export const displayName: string; |
| 67 | + export namespace propTypes { |
| 68 | + export const top: PropTypes.Requireable<boolean>; |
| 69 | + export const right: PropTypes.Requireable<boolean>; |
| 70 | + export const scrolling_parent: PropTypes.Requireable<string>; |
| 71 | + export const allowBodyInteractions: PropTypes.Requireable<boolean>; |
| 72 | + export const onShowBody: PropTypes.Requireable<(...args: any[]) => any>; |
| 73 | + export const onHideBody: PropTypes.Requireable<(...args: any[]) => any>; |
| 74 | + export const className: PropTypes.Requireable<string>; |
| 75 | + export const children: PropTypes.Requireable<any>; |
| 76 | + } |
| 77 | +} |
| 78 | +/** |
| 79 | + * @typedef {Object} TriggerProps |
| 80 | + * @property {(event?: React.MouseEvent) => void} [onClick] |
| 81 | + */ |
| 82 | +/** @extends {React.Component<TriggerProps>} */ |
| 83 | +declare class Trigger extends React.Component<TriggerProps, any, any> { |
| 84 | + /** |
| 85 | + * @param {TriggerProps} props |
| 86 | + * @param {unknown} context |
| 87 | + */ |
| 88 | + constructor(props: TriggerProps, context: unknown); |
| 89 | + /** |
| 90 | + * @param {React.MouseEvent} event |
| 91 | + */ |
| 92 | + _onClick(event: React.MouseEvent<Element, MouseEvent>): void; |
| 93 | + render(): JSX.Element; |
| 94 | +} |
| 95 | +declare namespace Trigger { |
| 96 | + const displayName_1: string; |
| 97 | + export { displayName_1 as displayName }; |
| 98 | + export namespace propTypes_1 { |
| 99 | + export const onClick: PropTypes.Requireable<(...args: any[]) => any>; |
| 100 | + const children_1: PropTypes.Requireable<any>; |
| 101 | + export { children_1 as children }; |
| 102 | + } |
| 103 | + export { propTypes_1 as propTypes }; |
| 104 | +} |
| 105 | +declare class Body extends React.Component<any, any, any> { |
| 106 | + constructor(props: Readonly<any>); |
| 107 | + constructor(props: any, context?: any); |
| 108 | + render(): JSX.Element; |
| 109 | +} |
| 110 | +declare namespace Body { |
| 111 | + const displayName_2: string; |
| 112 | + export { displayName_2 as displayName }; |
| 113 | + export namespace propTypes_2 { |
| 114 | + const top_1: PropTypes.Requireable<boolean>; |
| 115 | + export { top_1 as top }; |
| 116 | + const right_1: PropTypes.Requireable<boolean>; |
| 117 | + export { right_1 as right }; |
| 118 | + export const setPosition: PropTypes.Requireable<(...args: any[]) => any>; |
| 119 | + const children_2: PropTypes.Requireable<any>; |
| 120 | + export { children_2 as children }; |
| 121 | + } |
| 122 | + export { propTypes_2 as propTypes }; |
| 123 | +} |
| 124 | +import React from "react"; |
| 125 | +import PropTypes from "prop-types"; |
0 commit comments