@douyinfe/semi-animation-react 2.8.0-beta.1 → 2.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/src/Animation.d.ts +2 -2
- package/lib/cjs/src/KeyFrames.d.ts +2 -1
- package/lib/cjs/src/StyledAnimation.d.ts +9 -0
- package/lib/cjs/src/StyledTransition.d.ts +9 -4
- package/lib/cjs/src/Transition.d.ts +3 -3
- package/lib/es/src/Animation.d.ts +2 -2
- package/lib/es/src/KeyFrames.d.ts +2 -1
- package/lib/es/src/StyledAnimation.d.ts +9 -0
- package/lib/es/src/StyledTransition.d.ts +9 -4
- package/lib/es/src/Transition.d.ts +3 -3
- package/package.json +4 -4
|
@@ -8,7 +8,7 @@ export interface AnimationProps {
|
|
|
8
8
|
onResume?: Function;
|
|
9
9
|
onStop?: Function;
|
|
10
10
|
onRest?: Function;
|
|
11
|
-
children?: React.ReactNode;
|
|
11
|
+
children?: React.ReactNode | ((AnimationChildProps?: any) => React.ReactNode);
|
|
12
12
|
from?: Record<string, any>;
|
|
13
13
|
to?: Record<string, any>;
|
|
14
14
|
reverse?: boolean;
|
|
@@ -66,5 +66,5 @@ export default class Animation extends PureComponent<AnimationProps> {
|
|
|
66
66
|
componentDidUpdate(prevProps?: AnimationProps): void;
|
|
67
67
|
initAnimation: (props?: AnimationProps) => void;
|
|
68
68
|
bindEvents: () => void;
|
|
69
|
-
render():
|
|
69
|
+
render(): React.ReactNode;
|
|
70
70
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import noop from './utils/noop';
|
|
4
4
|
export interface KeyFramesProps {
|
|
5
5
|
frames?: any[];
|
|
6
6
|
loop?: boolean;
|
|
7
|
+
children?: React.ReactNode | ((KeyFramesProps: any) => React.ReactNode);
|
|
7
8
|
forwardInstance?: (value: any) => void;
|
|
8
9
|
onFrame?: (value: any) => void;
|
|
9
10
|
onKeyRest?: (value: Record<string, any>) => void;
|
|
@@ -18,6 +18,15 @@ export interface StyledAnimationProps {
|
|
|
18
18
|
duration?: string | number;
|
|
19
19
|
fillMode?: string;
|
|
20
20
|
}
|
|
21
|
+
export interface StyledAnimateStyleType {
|
|
22
|
+
animationTimingFunction: string;
|
|
23
|
+
animationName: any;
|
|
24
|
+
animationDuration: string | number;
|
|
25
|
+
animationDelay: string | number;
|
|
26
|
+
animationIterationCount: string | number;
|
|
27
|
+
animationDirection: string;
|
|
28
|
+
animationFillMode: string;
|
|
29
|
+
}
|
|
21
30
|
export default class StyledAnimation extends PureComponent<StyledAnimationProps> {
|
|
22
31
|
static propTypes: {
|
|
23
32
|
className: PropTypes.Requireable<string>;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { StyledAnimationProps } from './StyledAnimation';
|
|
3
|
+
import { StyledAnimationProps, StyledAnimateStyleType } from './StyledAnimation';
|
|
4
4
|
import noop from './utils/noop';
|
|
5
|
+
export interface ChildFCType {
|
|
6
|
+
animateCls?: string;
|
|
7
|
+
animateStyle?: StyledAnimateStyleType;
|
|
8
|
+
animateEvents?: (eventProps?: any) => void;
|
|
9
|
+
}
|
|
5
10
|
export interface StyledTransitionProps extends StyledAnimationProps {
|
|
6
11
|
state?: string | boolean;
|
|
7
12
|
enter?: string;
|
|
8
13
|
leave?: string;
|
|
9
|
-
children?: React.ReactNode;
|
|
14
|
+
children?: React.ReactNode | ((TransitionProps: ChildFCType) => React.ReactNode | any);
|
|
10
15
|
willEnter?: (value: any) => void;
|
|
11
16
|
didEnter?: (value: any) => void;
|
|
12
17
|
willLeave?: (value: any) => void;
|
|
@@ -16,8 +21,8 @@ export interface StyledTransitionProps extends StyledAnimationProps {
|
|
|
16
21
|
}
|
|
17
22
|
export interface StyledTransitionState {
|
|
18
23
|
state: string | boolean;
|
|
19
|
-
lastChildren: React.ReactNode;
|
|
20
|
-
currentChildren: React.ReactNode;
|
|
24
|
+
lastChildren: React.ReactNode | ((TransitionProps: ChildFCType) => React.ReactNode | any);
|
|
25
|
+
currentChildren: React.ReactNode | ((TransitionProps: ChildFCType) => React.ReactNode | any);
|
|
21
26
|
}
|
|
22
27
|
export default class StyledTransition extends Component<StyledTransitionProps, StyledTransitionState> {
|
|
23
28
|
static propTypes: {
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import React, { Component } from 'react';
|
|
4
4
|
import noop from './utils/noop';
|
|
5
5
|
export interface TransitionProps extends AnimationProps {
|
|
6
|
-
children?: React.ReactNode;
|
|
6
|
+
children?: React.ReactNode | ((TransitionProps: any) => any);
|
|
7
7
|
from?: Record<string, any>;
|
|
8
8
|
enter?: Record<string, any>;
|
|
9
9
|
leave?: Record<string, any>;
|
|
@@ -17,8 +17,8 @@ export interface TransitionProps extends AnimationProps {
|
|
|
17
17
|
}
|
|
18
18
|
export interface TransitionState {
|
|
19
19
|
state: string | boolean;
|
|
20
|
-
lastChildren: React.ReactNode;
|
|
21
|
-
currentChildren: React.ReactNode;
|
|
20
|
+
lastChildren: React.ReactNode | ((TransitionProps: any) => React.ReactNode | any);
|
|
21
|
+
currentChildren: React.ReactNode | ((TransitionProps: any) => React.ReactNode | any);
|
|
22
22
|
}
|
|
23
23
|
export default class Transition extends Component<TransitionProps, TransitionState> {
|
|
24
24
|
static propTypes: {
|
|
@@ -8,7 +8,7 @@ export interface AnimationProps {
|
|
|
8
8
|
onResume?: Function;
|
|
9
9
|
onStop?: Function;
|
|
10
10
|
onRest?: Function;
|
|
11
|
-
children?: React.ReactNode;
|
|
11
|
+
children?: React.ReactNode | ((AnimationChildProps?: any) => React.ReactNode);
|
|
12
12
|
from?: Record<string, any>;
|
|
13
13
|
to?: Record<string, any>;
|
|
14
14
|
reverse?: boolean;
|
|
@@ -66,5 +66,5 @@ export default class Animation extends PureComponent<AnimationProps> {
|
|
|
66
66
|
componentDidUpdate(prevProps?: AnimationProps): void;
|
|
67
67
|
initAnimation: (props?: AnimationProps) => void;
|
|
68
68
|
bindEvents: () => void;
|
|
69
|
-
render():
|
|
69
|
+
render(): React.ReactNode;
|
|
70
70
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import noop from './utils/noop';
|
|
4
4
|
export interface KeyFramesProps {
|
|
5
5
|
frames?: any[];
|
|
6
6
|
loop?: boolean;
|
|
7
|
+
children?: React.ReactNode | ((KeyFramesProps: any) => React.ReactNode);
|
|
7
8
|
forwardInstance?: (value: any) => void;
|
|
8
9
|
onFrame?: (value: any) => void;
|
|
9
10
|
onKeyRest?: (value: Record<string, any>) => void;
|
|
@@ -18,6 +18,15 @@ export interface StyledAnimationProps {
|
|
|
18
18
|
duration?: string | number;
|
|
19
19
|
fillMode?: string;
|
|
20
20
|
}
|
|
21
|
+
export interface StyledAnimateStyleType {
|
|
22
|
+
animationTimingFunction: string;
|
|
23
|
+
animationName: any;
|
|
24
|
+
animationDuration: string | number;
|
|
25
|
+
animationDelay: string | number;
|
|
26
|
+
animationIterationCount: string | number;
|
|
27
|
+
animationDirection: string;
|
|
28
|
+
animationFillMode: string;
|
|
29
|
+
}
|
|
21
30
|
export default class StyledAnimation extends PureComponent<StyledAnimationProps> {
|
|
22
31
|
static propTypes: {
|
|
23
32
|
className: PropTypes.Requireable<string>;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { StyledAnimationProps } from './StyledAnimation';
|
|
3
|
+
import { StyledAnimationProps, StyledAnimateStyleType } from './StyledAnimation';
|
|
4
4
|
import noop from './utils/noop';
|
|
5
|
+
export interface ChildFCType {
|
|
6
|
+
animateCls?: string;
|
|
7
|
+
animateStyle?: StyledAnimateStyleType;
|
|
8
|
+
animateEvents?: (eventProps?: any) => void;
|
|
9
|
+
}
|
|
5
10
|
export interface StyledTransitionProps extends StyledAnimationProps {
|
|
6
11
|
state?: string | boolean;
|
|
7
12
|
enter?: string;
|
|
8
13
|
leave?: string;
|
|
9
|
-
children?: React.ReactNode;
|
|
14
|
+
children?: React.ReactNode | ((TransitionProps: ChildFCType) => React.ReactNode | any);
|
|
10
15
|
willEnter?: (value: any) => void;
|
|
11
16
|
didEnter?: (value: any) => void;
|
|
12
17
|
willLeave?: (value: any) => void;
|
|
@@ -16,8 +21,8 @@ export interface StyledTransitionProps extends StyledAnimationProps {
|
|
|
16
21
|
}
|
|
17
22
|
export interface StyledTransitionState {
|
|
18
23
|
state: string | boolean;
|
|
19
|
-
lastChildren: React.ReactNode;
|
|
20
|
-
currentChildren: React.ReactNode;
|
|
24
|
+
lastChildren: React.ReactNode | ((TransitionProps: ChildFCType) => React.ReactNode | any);
|
|
25
|
+
currentChildren: React.ReactNode | ((TransitionProps: ChildFCType) => React.ReactNode | any);
|
|
21
26
|
}
|
|
22
27
|
export default class StyledTransition extends Component<StyledTransitionProps, StyledTransitionState> {
|
|
23
28
|
static propTypes: {
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import React, { Component } from 'react';
|
|
4
4
|
import noop from './utils/noop';
|
|
5
5
|
export interface TransitionProps extends AnimationProps {
|
|
6
|
-
children?: React.ReactNode;
|
|
6
|
+
children?: React.ReactNode | ((TransitionProps: any) => any);
|
|
7
7
|
from?: Record<string, any>;
|
|
8
8
|
enter?: Record<string, any>;
|
|
9
9
|
leave?: Record<string, any>;
|
|
@@ -17,8 +17,8 @@ export interface TransitionProps extends AnimationProps {
|
|
|
17
17
|
}
|
|
18
18
|
export interface TransitionState {
|
|
19
19
|
state: string | boolean;
|
|
20
|
-
lastChildren: React.ReactNode;
|
|
21
|
-
currentChildren: React.ReactNode;
|
|
20
|
+
lastChildren: React.ReactNode | ((TransitionProps: any) => React.ReactNode | any);
|
|
21
|
+
currentChildren: React.ReactNode | ((TransitionProps: any) => React.ReactNode | any);
|
|
22
22
|
}
|
|
23
23
|
export default class Transition extends Component<TransitionProps, TransitionState> {
|
|
24
24
|
static propTypes: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-animation-react",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.2",
|
|
4
4
|
"description": "motion library for semi-ui-react",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"motion",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@babel/runtime-corejs3": "^7.15.4",
|
|
29
|
-
"@douyinfe/semi-animation": "2.8.
|
|
30
|
-
"@douyinfe/semi-animation-styled": "2.8.
|
|
29
|
+
"@douyinfe/semi-animation": "2.8.2",
|
|
30
|
+
"@douyinfe/semi-animation-styled": "2.8.2",
|
|
31
31
|
"classnames": "^2.2.6"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"prop-types": "15.7.2",
|
|
52
52
|
"react-storybook-addon-props-combinations": "^1.1.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "436e0a2bd28a1d641c26cd9a35269e05abe205cd"
|
|
55
55
|
}
|