@douyinfe/semi-animation-react 2.25.2 → 2.25.4
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.js
CHANGED
|
@@ -44,7 +44,7 @@ class Animation extends _react.PureComponent {
|
|
|
44
44
|
}, Object.assign({}, config));
|
|
45
45
|
|
|
46
46
|
_semiAnimation.events.forEach(event => {
|
|
47
|
-
const propName =
|
|
47
|
+
const propName = `on${event[0].toUpperCase() + event.slice(1)}`; // eslint-disable-next-line @typescript-eslint/no-shadow
|
|
48
48
|
|
|
49
49
|
this.animation.on(event, props => {
|
|
50
50
|
// avoid memory leak
|
|
@@ -109,11 +109,11 @@ class StyledAnimation extends _react.PureComponent {
|
|
|
109
109
|
|
|
110
110
|
const hasLoopClass = this._hasLoopClass();
|
|
111
111
|
|
|
112
|
-
const animateCls = className || (0, _classnames.default)(
|
|
113
|
-
[
|
|
114
|
-
[
|
|
115
|
-
[
|
|
116
|
-
[
|
|
112
|
+
const animateCls = className || (0, _classnames.default)(`${prefixCls}-animated`, {
|
|
113
|
+
[`${prefixCls}-${type}`]: Boolean(type),
|
|
114
|
+
[`${prefixCls}-speed-${speed}`]: hasSpeedClass,
|
|
115
|
+
[`${prefixCls}-delay-${delay}`]: hasDelayClass,
|
|
116
|
+
[`${prefixCls}-loop-${loop}`]: hasLoopClass
|
|
117
117
|
});
|
|
118
118
|
const animateStyle = {
|
|
119
119
|
animationTimingFunction: timing,
|
package/lib/es/src/Animation.js
CHANGED
|
@@ -30,7 +30,7 @@ export default class Animation extends PureComponent {
|
|
|
30
30
|
to: Object.assign({}, to)
|
|
31
31
|
}, Object.assign({}, config));
|
|
32
32
|
events.forEach(event => {
|
|
33
|
-
const propName =
|
|
33
|
+
const propName = `on${event[0].toUpperCase() + event.slice(1)}`; // eslint-disable-next-line @typescript-eslint/no-shadow
|
|
34
34
|
|
|
35
35
|
this.animation.on(event, props => {
|
|
36
36
|
// avoid memory leak
|
|
@@ -93,11 +93,11 @@ export default class StyledAnimation extends PureComponent {
|
|
|
93
93
|
|
|
94
94
|
const hasLoopClass = this._hasLoopClass();
|
|
95
95
|
|
|
96
|
-
const animateCls = className || classnames(
|
|
97
|
-
[
|
|
98
|
-
[
|
|
99
|
-
[
|
|
100
|
-
[
|
|
96
|
+
const animateCls = className || classnames(`${prefixCls}-animated`, {
|
|
97
|
+
[`${prefixCls}-${type}`]: Boolean(type),
|
|
98
|
+
[`${prefixCls}-speed-${speed}`]: hasSpeedClass,
|
|
99
|
+
[`${prefixCls}-delay-${delay}`]: hasDelayClass,
|
|
100
|
+
[`${prefixCls}-loop-${loop}`]: hasLoopClass
|
|
101
101
|
});
|
|
102
102
|
const animateStyle = {
|
|
103
103
|
animationTimingFunction: timing,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-animation-react",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.4",
|
|
4
4
|
"description": "motion library for semi-ui-react",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"motion",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"prop-types": "15.7.2",
|
|
44
44
|
"react-storybook-addon-props-combinations": "^1.1.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "52220f9714b8bc8a8cc073ae8f9c463d7850511e"
|
|
47
47
|
}
|