1 |
|
2 |
|
3 | export declare type AlignPoint = string;
|
4 | export interface AlignType {
|
5 | |
6 |
|
7 |
|
8 |
|
9 | points?: AlignPoint[];
|
10 | |
11 |
|
12 |
|
13 |
|
14 | offset?: number[];
|
15 | |
16 |
|
17 |
|
18 |
|
19 | targetOffset?: number[];
|
20 | |
21 |
|
22 |
|
23 |
|
24 | overflow?: {
|
25 | adjustX?: boolean | number;
|
26 | adjustY?: boolean | number;
|
27 | };
|
28 | |
29 |
|
30 |
|
31 | useCssRight?: boolean;
|
32 | |
33 |
|
34 |
|
35 | useCssBottom?: boolean;
|
36 | |
37 |
|
38 |
|
39 |
|
40 | useCssTransform?: boolean;
|
41 | ignoreShake?: boolean;
|
42 | }
|
43 | export interface BuildInPlacements {
|
44 | [placement: string]: AlignType;
|
45 | }
|
46 | export declare type StretchType = string;
|
47 | export declare type ActionType = string;
|
48 | export declare type AnimationType = string;
|
49 | export declare type TransitionNameType = string;
|
50 | export interface Point {
|
51 | pageX: number;
|
52 | pageY: number;
|
53 | }
|
54 | export interface CommonEventHandler {
|
55 | remove: () => void;
|
56 | }
|
57 | declare type MotionStatus = 'none' | 'appear' | 'enter' | 'leave';
|
58 | declare type MotionActiveStatus = 'appear-active' | 'enter-active' | 'leave-active';
|
59 | declare type MotionNameObject = {
|
60 | [key in MotionStatus | MotionActiveStatus]?: string;
|
61 | };
|
62 | declare type MotionEventHandler = (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement> | undefined) => React.CSSProperties | false | null | undefined | void;
|
63 | export interface MotionType {
|
64 | motionName?: string | MotionNameObject;
|
65 | motionAppear?: boolean;
|
66 | motionEnter?: boolean;
|
67 | motionLeave?: boolean;
|
68 | motionLeaveImmediately?: boolean;
|
69 | removeOnLeave?: boolean;
|
70 | leavedClassName?: string;
|
71 | onAppearStart?: MotionEventHandler;
|
72 | onAppearActive?: MotionEventHandler;
|
73 | onAppearEnd?: MotionEventHandler;
|
74 | onEnterStart?: MotionEventHandler;
|
75 | onEnterActive?: MotionEventHandler;
|
76 | onEnterEnd?: MotionEventHandler;
|
77 | onLeaveStart?: MotionEventHandler;
|
78 | onLeaveActive?: MotionEventHandler;
|
79 | onLeaveEnd?: MotionEventHandler;
|
80 | }
|
81 | export interface MotionProps extends MotionType {
|
82 | visible?: boolean;
|
83 | children: (props: {
|
84 | className: string;
|
85 | style: React.CSSProperties;
|
86 | }, ref: React.Ref<any>) => React.ReactElement;
|
87 | }
|
88 | export declare type CSSMotionClass = React.ComponentClass<MotionProps>;
|
89 | export {};
|