1 | import * as React from 'react';
|
2 | import { Placement } from './thirdparty/popper-core';
|
3 | import '@patternfly/react-styles/css/components/Popper/Popper.css';
|
4 | export interface ToggleMenuBaseProps {
|
5 | |
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | menuAppendTo?: HTMLElement | (() => HTMLElement) | 'parent' | 'inline';
|
13 | }
|
14 | export declare const getOpacityTransition: (animationDuration: number) => string;
|
15 | export interface PopperProps {
|
16 | |
17 |
|
18 |
|
19 |
|
20 | trigger?: React.ReactNode;
|
21 | |
22 |
|
23 |
|
24 |
|
25 | reference?: HTMLElement | (() => HTMLElement) | React.RefObject<any>;
|
26 | /** The popper (menu/tooltip/popover) element */
|
27 | popper: React.ReactElement;
|
28 | /** True to set the width of the popper element to the trigger element's width */
|
29 | popperMatchesTriggerWidth?: boolean;
|
30 | /** popper direction */
|
31 | direction?: 'up' | 'down';
|
32 | /** popper position */
|
33 | position?: 'right' | 'left' | 'center';
|
34 | /** Instead of direction and position can set the placement of the popper */
|
35 | placement?: Placement;
|
36 | /** The container to append the popper to. Defaults to 'document.body' */
|
37 | appendTo?: HTMLElement | (() => HTMLElement);
|
38 | /** z-index of the popper element */
|
39 | zIndex?: number;
|
40 | /** True to make the popper visible */
|
41 | isVisible?: boolean;
|
42 | /**
|
43 | * Map class names to positions, for example:
|
44 | * {
|
45 | * top: styles.modifiers.top,
|
46 | * bottom: styles.modifiers.bottom,
|
47 | * left: styles.modifiers.left,
|
48 | * right: styles.modifiers.right
|
49 | * }
|
50 | */
|
51 | positionModifiers?: {
|
52 | top?: string;
|
53 | right?: string;
|
54 | bottom?: string;
|
55 | left?: string;
|
56 | topStart?: string;
|
57 | topEnd?: string;
|
58 | bottomStart?: string;
|
59 | bottomEnd?: string;
|
60 | leftStart?: string;
|
61 | leftEnd?: string;
|
62 | rightStart?: string;
|
63 | rightEnd?: string;
|
64 | };
|
65 | /** Distance of the popper to the trigger */
|
66 | distance?: number;
|
67 | /** Callback function when mouse enters trigger */
|
68 | onMouseEnter?: (event?: MouseEvent) => void;
|
69 |
|
70 | onMouseLeave?: (event?: MouseEvent) => void;
|
71 |
|
72 | onFocus?: (event?: FocusEvent) => void;
|
73 |
|
74 | onBlur?: (event?: FocusEvent) => void;
|
75 |
|
76 | onTriggerClick?: (event?: MouseEvent) => void;
|
77 |
|
78 | onTriggerEnter?: (event?: KeyboardEvent) => void;
|
79 |
|
80 | onPopperClick?: (event?: MouseEvent) => void;
|
81 |
|
82 | onDocumentClick?: (event?: MouseEvent, triggerElement?: HTMLElement, popperElement?: HTMLElement) => void;
|
83 |
|
84 | onDocumentKeyDown?: (event?: KeyboardEvent) => void;
|
85 |
|
86 | enableFlip?: boolean;
|
87 |
|
88 | flipBehavior?: 'flip' | ('top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end')[];
|
89 | }
|
90 | export declare const Popper: React.FunctionComponent<PopperProps>;
|
91 |
|
\ | No newline at end of file |