1 |
|
2 |
|
3 |
|
4 |
|
5 | import * as React from 'react';
|
6 |
|
7 | export type IQueueType = 'alpha' | 'left' | 'right' | 'top' | 'bottom' | 'scale' | 'scaleBig' | 'scaleX' | 'scaleY';
|
8 | export type INumberOrArrayOrFunc = number | [number, number] | ((e: { key: string, index: number }) => number | [number, number]);
|
9 | export type IEaseType = 'linear' |
|
10 | 'easeInSine' | 'easeOutSine' | 'easeInOutSine' |
|
11 | 'easeInQuad' | 'easeOutQuad' | 'easeInOutQuad' |
|
12 | 'easeInCubic' | 'easeOutCubic' | 'easeInOutCubic' |
|
13 | 'easeInQuart' | 'easeOutQuart' | 'easeInOutQuart' |
|
14 | 'easeInQuint' | 'easeOutQuint' | 'easeInOutQuint' |
|
15 | 'easeInExpo' | 'easeInOutExpo' | 'easeInOutExpo' |
|
16 | 'easeInCirc' | 'easeOutCirc' | 'easeInOutCirc' |
|
17 | 'easeInBack' | 'easeOutBack' | 'easeInOutBack' |
|
18 | 'easeInElastic' | 'easeOutElastic' | 'easeInOutElastic' |
|
19 | 'easeInBounce' | 'easeOutBounce' | 'easeInOutBounce' | [number, number, number, number] |
|
20 | ((t: number, b: number, c: number, d: number) => number); // TweenOne ease path;
|
21 |
|
22 | export type IQueueTypeOrArrayOrFunc = IQueueType | [IQueueType, IQueueType] | ((e: { key: string, index: number }) => IQueueType | [IQueueType, IQueueType]);
|
23 | export type IEaseTypeOrArrayOrFunc = IEaseType | [IEaseType, IEaseType] | ((e: { key: string, index: number }) => IEaseType | [IEaseType, IEaseType]);
|
24 | export type IAnimConfigOrArrayOrFunc = {} | [{}] | ((e: { key: string, index: number }) => {} | [{}, {}]);
|
25 | export interface IProps<T> extends React.HTMLAttributes<T> {
|
26 | type?: IQueueTypeOrArrayOrFunc;
|
27 | animConfig?: IAnimConfigOrArrayOrFunc;
|
28 | delay?: INumberOrArrayOrFunc;
|
29 | duration?: INumberOrArrayOrFunc;
|
30 | interval?: INumberOrArrayOrFunc;
|
31 | leaveReverse?: boolean;
|
32 | ease?: IEaseTypeOrArrayOrFunc;
|
33 | appear?: boolean;
|
34 | component?: string | React.ReactNode;
|
35 | componentProps?: {};
|
36 | animatingClassName?: [string, string];
|
37 | forcedReplay?: boolean;
|
38 | onEnd?: (e: { key: string, type: string, target: HTMLElement }) => void;
|
39 | }
|
40 |
|
41 | export default class RcQueueAnim<T> extends React.Component<IProps<T>> { }
|