@progress/kendo-react-animation 6.1.1 → 7.0.0-develop.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/{dist/es/Animation.d.ts → Animation.d.ts} +5 -1
- package/{dist/npm/AnimationChild.d.ts → AnimationChild.d.ts} +5 -1
- package/{dist/es/AnimationInterface.d.ts → AnimationInterface.d.ts} +4 -1
- package/{dist/npm/Expand.d.ts → Expand.d.ts} +6 -2
- package/{dist/es/Fade.d.ts → Fade.d.ts} +5 -1
- package/LICENSE.md +1 -1
- package/{dist/npm/Push.d.ts → Push.d.ts} +6 -2
- package/{dist/npm/Reveal.d.ts → Reveal.d.ts} +6 -2
- package/{dist/es/Slide.d.ts → Slide.d.ts} +6 -2
- package/{dist/npm/Zoom.d.ts → Zoom.d.ts} +6 -2
- package/dist/cdn/js/kendo-react-animation.js +5 -1
- package/hooks/useAnimation.d.ts +16 -0
- package/index.d.ts +14 -0
- package/index.js +5 -0
- package/index.mjs +669 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +28 -27
- package/util.d.ts +15 -0
- package/about.md +0 -3
- package/dist/es/Animation.js +0 -98
- package/dist/es/AnimationChild.d.ts +0 -89
- package/dist/es/AnimationChild.js +0 -175
- package/dist/es/AnimationInterface.js +0 -2
- package/dist/es/Expand.d.ts +0 -81
- package/dist/es/Expand.js +0 -88
- package/dist/es/Fade.js +0 -83
- package/dist/es/Push.d.ts +0 -89
- package/dist/es/Push.js +0 -92
- package/dist/es/Reveal.d.ts +0 -101
- package/dist/es/Reveal.js +0 -152
- package/dist/es/Slide.js +0 -90
- package/dist/es/Zoom.d.ts +0 -87
- package/dist/es/Zoom.js +0 -90
- package/dist/es/hooks/useAnimation.d.ts +0 -12
- package/dist/es/hooks/useAnimation.js +0 -48
- package/dist/es/main.d.ts +0 -10
- package/dist/es/main.js +0 -10
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/util.d.ts +0 -11
- package/dist/es/util.js +0 -138
- package/dist/npm/Animation.d.ts +0 -82
- package/dist/npm/Animation.js +0 -101
- package/dist/npm/AnimationChild.js +0 -178
- package/dist/npm/AnimationInterface.d.ts +0 -89
- package/dist/npm/AnimationInterface.js +0 -3
- package/dist/npm/Expand.js +0 -91
- package/dist/npm/Fade.d.ts +0 -67
- package/dist/npm/Fade.js +0 -86
- package/dist/npm/Push.js +0 -95
- package/dist/npm/Reveal.js +0 -155
- package/dist/npm/Slide.d.ts +0 -83
- package/dist/npm/Slide.js +0 -93
- package/dist/npm/Zoom.js +0 -93
- package/dist/npm/hooks/useAnimation.d.ts +0 -12
- package/dist/npm/hooks/useAnimation.js +0 -52
- package/dist/npm/main.d.ts +0 -10
- package/dist/npm/main.js +0 -21
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/util.d.ts +0 -11
- package/dist/npm/util.js +0 -140
- package/dist/systemjs/kendo-react-animation.js +0 -1
- package/e2e-next/basic.tests.ts +0 -25
package/dist/npm/Reveal.js
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
29
|
-
var t = {};
|
|
30
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
31
|
-
t[p] = s[p];
|
|
32
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
33
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
34
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
35
|
-
t[p[i]] = s[p[i]];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.Reveal = void 0;
|
|
41
|
-
var React = require("react");
|
|
42
|
-
var PropTypes = require("prop-types");
|
|
43
|
-
var Animation_1 = require("./Animation");
|
|
44
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
45
|
-
var util_1 = require("./util");
|
|
46
|
-
var Reveal = /** @class */ (function (_super) {
|
|
47
|
-
__extends(Reveal, _super);
|
|
48
|
-
function Reveal() {
|
|
49
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
50
|
-
/**
|
|
51
|
-
* @hidden
|
|
52
|
-
*/
|
|
53
|
-
_this.state = {
|
|
54
|
-
maxHeight: undefined,
|
|
55
|
-
maxWidth: undefined
|
|
56
|
-
};
|
|
57
|
-
_this.componentWillEnter = function (event) {
|
|
58
|
-
var _a = _this.props, onEnter = _a.onEnter, onBeforeEnter = _a.onBeforeEnter;
|
|
59
|
-
if (onBeforeEnter) {
|
|
60
|
-
onBeforeEnter.call(undefined, event);
|
|
61
|
-
}
|
|
62
|
-
_this.updateContainerDimensions(event.animatedElement, function () {
|
|
63
|
-
if (onEnter) {
|
|
64
|
-
onEnter.call(undefined, event);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
_this.componentIsEntering = function (event) {
|
|
69
|
-
var onEntering = _this.props.onEntering;
|
|
70
|
-
_this.updateContainerDimensions(event.animatedElement, function () {
|
|
71
|
-
if (onEntering) {
|
|
72
|
-
onEntering.call(undefined, event);
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
_this.componentWillExit = function (event) {
|
|
77
|
-
var onExit = _this.props.onExit;
|
|
78
|
-
_this.updateContainerDimensions(event.animatedElement, function () {
|
|
79
|
-
if (onExit) {
|
|
80
|
-
onExit.call(undefined, event);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
_this.updateContainerDimensions = function (node, done) {
|
|
85
|
-
if (done === void 0) { done = kendo_react_common_1.noop; }
|
|
86
|
-
var content = node.firstChild;
|
|
87
|
-
if (content) {
|
|
88
|
-
var newHeight = util_1.default.outerHeight(content);
|
|
89
|
-
var newWidth = util_1.default.outerWidth(content);
|
|
90
|
-
_this.setState({
|
|
91
|
-
maxHeight: newHeight,
|
|
92
|
-
maxWidth: newWidth
|
|
93
|
-
}, done);
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
return _this;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* @hidden
|
|
100
|
-
*/
|
|
101
|
-
Reveal.prototype.render = function () {
|
|
102
|
-
var _a = this.props, direction = _a.direction, children = _a.children, childFactory = _a.childFactory, other = __rest(_a, ["direction", "children", "childFactory"]);
|
|
103
|
-
var _b = this.state, maxHeight = _b.maxHeight, maxWidth = _b.maxWidth;
|
|
104
|
-
var maxOffset;
|
|
105
|
-
if (direction === 'vertical') {
|
|
106
|
-
maxOffset = { maxHeight: maxHeight ? "".concat(maxHeight, "px") : '' };
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
maxOffset = { maxWidth: maxWidth ? "".concat(maxWidth, "px") : '' };
|
|
110
|
-
}
|
|
111
|
-
var animationEnteringStyle = {
|
|
112
|
-
maxHeight: maxOffset.maxHeight,
|
|
113
|
-
maxWidth: maxOffset.maxWidth
|
|
114
|
-
};
|
|
115
|
-
var factory = function (child) {
|
|
116
|
-
var result = childFactory ? childFactory(child) : child;
|
|
117
|
-
if (!result.props.in) {
|
|
118
|
-
return React.cloneElement(result, __assign(__assign({}, result.props), { style: __assign(__assign({}, result.props.style), { maxHeight: maxOffset.maxHeight, maxWidth: maxOffset.maxWidth }) }));
|
|
119
|
-
}
|
|
120
|
-
return result;
|
|
121
|
-
};
|
|
122
|
-
return (React.createElement(Animation_1.Animation, __assign({}, other, { childFactory: factory, onEnter: this.componentWillEnter, onEntering: this.componentIsEntering, onExit: this.componentWillExit, animationEnteringStyle: animationEnteringStyle, transitionName: "reveal-".concat(direction) }), children));
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* @hidden
|
|
126
|
-
*/
|
|
127
|
-
Reveal.propTypes = {
|
|
128
|
-
children: PropTypes.oneOfType([
|
|
129
|
-
PropTypes.arrayOf(PropTypes.node),
|
|
130
|
-
PropTypes.node
|
|
131
|
-
]),
|
|
132
|
-
childFactory: PropTypes.any,
|
|
133
|
-
className: PropTypes.string,
|
|
134
|
-
direction: PropTypes.oneOf([
|
|
135
|
-
'horizontal',
|
|
136
|
-
'vertical'
|
|
137
|
-
]),
|
|
138
|
-
component: PropTypes.string,
|
|
139
|
-
id: PropTypes.string,
|
|
140
|
-
style: PropTypes.any
|
|
141
|
-
};
|
|
142
|
-
/**
|
|
143
|
-
* @hidden
|
|
144
|
-
*/
|
|
145
|
-
Reveal.defaultProps = {
|
|
146
|
-
appear: false,
|
|
147
|
-
enter: true,
|
|
148
|
-
exit: true,
|
|
149
|
-
transitionEnterDuration: 300,
|
|
150
|
-
transitionExitDuration: 300,
|
|
151
|
-
direction: 'vertical'
|
|
152
|
-
};
|
|
153
|
-
return Reveal;
|
|
154
|
-
}(React.Component));
|
|
155
|
-
exports.Reveal = Reveal;
|
package/dist/npm/Slide.d.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as PropTypes from 'prop-types';
|
|
3
|
-
import { AnimationInterface } from './AnimationInterface';
|
|
4
|
-
/**
|
|
5
|
-
* Specifies the direction of the Slide Animation ([see example]({% slug direction_animation %}#toc-slide)).
|
|
6
|
-
*
|
|
7
|
-
* The supported directions are:
|
|
8
|
-
* * (Default) `down`—On showing, slides the content from top to bottom, and vice-versa.
|
|
9
|
-
* * `up`—On showing, slides the content from bottom to top, and vice-versa.
|
|
10
|
-
* * `left`—On showing, slides the content from right to left, and vice-versa.
|
|
11
|
-
* * `right`—On showing, slides the content from left to right, and vice-versa.
|
|
12
|
-
*/
|
|
13
|
-
export declare type SlideDirection = 'up' | 'down' | 'left' | 'right';
|
|
14
|
-
/**
|
|
15
|
-
* Represent the props of the [KendoReact Slide Animation component]({% slug animationtypes_animation %}#toc-slide).
|
|
16
|
-
*
|
|
17
|
-
* {% meta %}
|
|
18
|
-
* {% variant title:Hooks %}
|
|
19
|
-
* {% embed_file props/slide/func/main.tsx preview %}
|
|
20
|
-
* {% embed_file props/slide/func/styles.css %}
|
|
21
|
-
* {% endvariant %}
|
|
22
|
-
* {% variant title:Classes %}
|
|
23
|
-
* {% embed_file props/slide/class/main.tsx preview %}
|
|
24
|
-
* {% embed_file props/slide/class/styles.css %}
|
|
25
|
-
* {% endvariant %}
|
|
26
|
-
* {% endmeta %}
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
export interface SlideProps extends AnimationInterface {
|
|
30
|
-
/**
|
|
31
|
-
* After the element reaches its exit state, it is no longer available in the DOM. If a DOM operation is required, access it trough the `childFactory` function.
|
|
32
|
-
*/
|
|
33
|
-
childFactory?: any;
|
|
34
|
-
/**
|
|
35
|
-
* Specifies the CSS class names which are set to the Animation.
|
|
36
|
-
*/
|
|
37
|
-
className?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Specifies the direction of the Slide Animation. Defaults to `down`.
|
|
40
|
-
*/
|
|
41
|
-
direction?: SlideDirection;
|
|
42
|
-
/**
|
|
43
|
-
* Specifies the node type of the parent Animation. Defaults to `div`.
|
|
44
|
-
*/
|
|
45
|
-
component?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Specifies the id of the Animation.
|
|
48
|
-
*/
|
|
49
|
-
id?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Specifies the style of the parent Animation.
|
|
52
|
-
*/
|
|
53
|
-
style?: any;
|
|
54
|
-
}
|
|
55
|
-
export declare class Slide extends React.Component<SlideProps, {}> {
|
|
56
|
-
/**
|
|
57
|
-
* @hidden
|
|
58
|
-
*/
|
|
59
|
-
static propTypes: {
|
|
60
|
-
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
61
|
-
childFactory: PropTypes.Requireable<any>;
|
|
62
|
-
className: PropTypes.Requireable<string>;
|
|
63
|
-
direction: PropTypes.Requireable<string>;
|
|
64
|
-
component: PropTypes.Requireable<string>;
|
|
65
|
-
id: PropTypes.Requireable<string>;
|
|
66
|
-
style: PropTypes.Requireable<any>;
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* @hidden
|
|
70
|
-
*/
|
|
71
|
-
static defaultProps: {
|
|
72
|
-
appear: boolean;
|
|
73
|
-
enter: boolean;
|
|
74
|
-
exit: boolean;
|
|
75
|
-
transitionEnterDuration: number;
|
|
76
|
-
transitionExitDuration: number;
|
|
77
|
-
direction: string;
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* @hidden
|
|
81
|
-
*/
|
|
82
|
-
render(): JSX.Element;
|
|
83
|
-
}
|
package/dist/npm/Slide.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
29
|
-
var t = {};
|
|
30
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
31
|
-
t[p] = s[p];
|
|
32
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
33
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
34
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
35
|
-
t[p[i]] = s[p[i]];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.Slide = void 0;
|
|
41
|
-
var React = require("react");
|
|
42
|
-
var PropTypes = require("prop-types");
|
|
43
|
-
var Animation_1 = require("./Animation");
|
|
44
|
-
// tslint:enable:max-line-length
|
|
45
|
-
var Slide = /** @class */ (function (_super) {
|
|
46
|
-
__extends(Slide, _super);
|
|
47
|
-
function Slide() {
|
|
48
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @hidden
|
|
52
|
-
*/
|
|
53
|
-
Slide.prototype.render = function () {
|
|
54
|
-
var _a = this.props, direction = _a.direction, children = _a.children, other = __rest(_a, ["direction", "children"]);
|
|
55
|
-
var animationProps = {
|
|
56
|
-
transitionName: "slide-".concat(direction)
|
|
57
|
-
};
|
|
58
|
-
return (React.createElement(Animation_1.Animation, __assign({}, animationProps, other), children));
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* @hidden
|
|
62
|
-
*/
|
|
63
|
-
Slide.propTypes = {
|
|
64
|
-
children: PropTypes.oneOfType([
|
|
65
|
-
PropTypes.arrayOf(PropTypes.node),
|
|
66
|
-
PropTypes.node
|
|
67
|
-
]),
|
|
68
|
-
childFactory: PropTypes.any,
|
|
69
|
-
className: PropTypes.string,
|
|
70
|
-
direction: PropTypes.oneOf([
|
|
71
|
-
'up',
|
|
72
|
-
'down',
|
|
73
|
-
'left',
|
|
74
|
-
'right'
|
|
75
|
-
]),
|
|
76
|
-
component: PropTypes.string,
|
|
77
|
-
id: PropTypes.string,
|
|
78
|
-
style: PropTypes.any
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* @hidden
|
|
82
|
-
*/
|
|
83
|
-
Slide.defaultProps = {
|
|
84
|
-
appear: false,
|
|
85
|
-
enter: true,
|
|
86
|
-
exit: true,
|
|
87
|
-
transitionEnterDuration: 300,
|
|
88
|
-
transitionExitDuration: 300,
|
|
89
|
-
direction: 'down'
|
|
90
|
-
};
|
|
91
|
-
return Slide;
|
|
92
|
-
}(React.Component));
|
|
93
|
-
exports.Slide = Slide;
|
package/dist/npm/Zoom.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
29
|
-
var t = {};
|
|
30
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
31
|
-
t[p] = s[p];
|
|
32
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
33
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
34
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
35
|
-
t[p[i]] = s[p[i]];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.Zoom = void 0;
|
|
41
|
-
var React = require("react");
|
|
42
|
-
var PropTypes = require("prop-types");
|
|
43
|
-
var Animation_1 = require("./Animation");
|
|
44
|
-
var EXITING_ANIMATION_STYLE = { position: 'absolute', top: '0', left: '0' };
|
|
45
|
-
// tslint:enable:max-line-length
|
|
46
|
-
var Zoom = /** @class */ (function (_super) {
|
|
47
|
-
__extends(Zoom, _super);
|
|
48
|
-
function Zoom() {
|
|
49
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @hidden
|
|
53
|
-
*/
|
|
54
|
-
Zoom.prototype.render = function () {
|
|
55
|
-
var _a = this.props, children = _a.children, direction = _a.direction, other = __rest(_a, ["children", "direction"]);
|
|
56
|
-
return (React.createElement(Animation_1.Animation, __assign({}, other, { transitionName: "zoom-".concat(direction), animationExitingStyle: this.props.stackChildren
|
|
57
|
-
? EXITING_ANIMATION_STYLE
|
|
58
|
-
: undefined }), children));
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* @hidden
|
|
62
|
-
*/
|
|
63
|
-
Zoom.propTypes = {
|
|
64
|
-
children: PropTypes.oneOfType([
|
|
65
|
-
PropTypes.arrayOf(PropTypes.node),
|
|
66
|
-
PropTypes.node
|
|
67
|
-
]),
|
|
68
|
-
childFactory: PropTypes.any,
|
|
69
|
-
className: PropTypes.string,
|
|
70
|
-
direction: PropTypes.oneOf([
|
|
71
|
-
'in',
|
|
72
|
-
'out'
|
|
73
|
-
]),
|
|
74
|
-
component: PropTypes.string,
|
|
75
|
-
id: PropTypes.string,
|
|
76
|
-
style: PropTypes.any,
|
|
77
|
-
stackChildren: PropTypes.bool
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* @hidden
|
|
81
|
-
*/
|
|
82
|
-
Zoom.defaultProps = {
|
|
83
|
-
appear: false,
|
|
84
|
-
enter: true,
|
|
85
|
-
exit: true,
|
|
86
|
-
transitionEnterDuration: 300,
|
|
87
|
-
transitionExitDuration: 300,
|
|
88
|
-
direction: 'out',
|
|
89
|
-
stackChildren: false
|
|
90
|
-
};
|
|
91
|
-
return Zoom;
|
|
92
|
-
}(React.Component));
|
|
93
|
-
exports.Zoom = Zoom;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
export declare type AnimationConfig = {
|
|
4
|
-
initial?: React.CSSProperties;
|
|
5
|
-
duration?: number;
|
|
6
|
-
appear?: boolean;
|
|
7
|
-
onStart?: any;
|
|
8
|
-
onUpdate?: any;
|
|
9
|
-
onEnd?: any;
|
|
10
|
-
};
|
|
11
|
-
/** @hidden */
|
|
12
|
-
export declare const useAnimation: (config: AnimationConfig, deps: any[]) => void;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useAnimation = void 0;
|
|
4
|
-
var React = require("react");
|
|
5
|
-
/** @hidden */
|
|
6
|
-
var useAnimation = function (config, deps) {
|
|
7
|
-
var offset = React.useRef(0);
|
|
8
|
-
var mount = React.useRef(false);
|
|
9
|
-
var animationFrame = React.useRef();
|
|
10
|
-
var animate = function (transition) {
|
|
11
|
-
var duration = transition.duration;
|
|
12
|
-
var start;
|
|
13
|
-
var progress;
|
|
14
|
-
var skip = offset.current && 1 - offset.current;
|
|
15
|
-
if (transition.onStart) {
|
|
16
|
-
transition.onStart();
|
|
17
|
-
}
|
|
18
|
-
var frame = function (timestamp) {
|
|
19
|
-
if (!start) {
|
|
20
|
-
start = timestamp;
|
|
21
|
-
}
|
|
22
|
-
progress = timestamp - start + 1;
|
|
23
|
-
var rate = progress / duration + skip;
|
|
24
|
-
if (rate <= 1) {
|
|
25
|
-
if (transition.onUpdate) {
|
|
26
|
-
transition.onUpdate(rate);
|
|
27
|
-
}
|
|
28
|
-
animationFrame.current = window.requestAnimationFrame(frame);
|
|
29
|
-
offset.current = rate;
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
if (transition.onEnd) {
|
|
33
|
-
transition.onEnd(1);
|
|
34
|
-
}
|
|
35
|
-
offset.current = 0;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
animationFrame.current = window.requestAnimationFrame(frame);
|
|
39
|
-
};
|
|
40
|
-
React.useEffect(function () {
|
|
41
|
-
animate(config);
|
|
42
|
-
return function () {
|
|
43
|
-
if (animationFrame.current) {
|
|
44
|
-
window.cancelAnimationFrame(animationFrame.current);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
}, deps);
|
|
48
|
-
React.useEffect(function () {
|
|
49
|
-
mount.current = true;
|
|
50
|
-
}, []);
|
|
51
|
-
};
|
|
52
|
-
exports.useAnimation = useAnimation;
|
package/dist/npm/main.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Animation, AnimationProps } from './Animation';
|
|
2
|
-
import { AnimationChild, AnimationChildProps } from './AnimationChild';
|
|
3
|
-
import { Fade, FadeProps } from './Fade';
|
|
4
|
-
import { Expand, ExpandDirection, ExpandProps } from './Expand';
|
|
5
|
-
import { Push, PushDirection, PushProps } from './Push';
|
|
6
|
-
import { Slide, SlideDirection, SlideProps } from './Slide';
|
|
7
|
-
import { Zoom, ZoomDirection, ZoomProps } from './Zoom';
|
|
8
|
-
import { Reveal, RevealDirection, RevealProps } from './Reveal';
|
|
9
|
-
import { useAnimation } from './hooks/useAnimation';
|
|
10
|
-
export { Animation, AnimationProps, AnimationChild, AnimationChildProps, Fade, FadeProps, Expand, ExpandProps, ExpandDirection, Push, PushProps, PushDirection, Slide, SlideProps, SlideDirection, Zoom, ZoomProps, ZoomDirection, Reveal, RevealProps, RevealDirection, useAnimation };
|
package/dist/npm/main.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useAnimation = exports.Reveal = exports.Zoom = exports.Slide = exports.Push = exports.Expand = exports.Fade = exports.AnimationChild = exports.Animation = void 0;
|
|
4
|
-
var Animation_1 = require("./Animation");
|
|
5
|
-
Object.defineProperty(exports, "Animation", { enumerable: true, get: function () { return Animation_1.Animation; } });
|
|
6
|
-
var AnimationChild_1 = require("./AnimationChild");
|
|
7
|
-
Object.defineProperty(exports, "AnimationChild", { enumerable: true, get: function () { return AnimationChild_1.AnimationChild; } });
|
|
8
|
-
var Fade_1 = require("./Fade");
|
|
9
|
-
Object.defineProperty(exports, "Fade", { enumerable: true, get: function () { return Fade_1.Fade; } });
|
|
10
|
-
var Expand_1 = require("./Expand");
|
|
11
|
-
Object.defineProperty(exports, "Expand", { enumerable: true, get: function () { return Expand_1.Expand; } });
|
|
12
|
-
var Push_1 = require("./Push");
|
|
13
|
-
Object.defineProperty(exports, "Push", { enumerable: true, get: function () { return Push_1.Push; } });
|
|
14
|
-
var Slide_1 = require("./Slide");
|
|
15
|
-
Object.defineProperty(exports, "Slide", { enumerable: true, get: function () { return Slide_1.Slide; } });
|
|
16
|
-
var Zoom_1 = require("./Zoom");
|
|
17
|
-
Object.defineProperty(exports, "Zoom", { enumerable: true, get: function () { return Zoom_1.Zoom; } });
|
|
18
|
-
var Reveal_1 = require("./Reveal");
|
|
19
|
-
Object.defineProperty(exports, "Reveal", { enumerable: true, get: function () { return Reveal_1.Reveal; } });
|
|
20
|
-
var useAnimation_1 = require("./hooks/useAnimation");
|
|
21
|
-
Object.defineProperty(exports, "useAnimation", { enumerable: true, get: function () { return useAnimation_1.useAnimation; } });
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.packageMetadata = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
exports.packageMetadata = {
|
|
8
|
-
name: '@progress/kendo-react-animation',
|
|
9
|
-
productName: 'KendoReact',
|
|
10
|
-
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate: 1700063333,
|
|
12
|
-
version: '',
|
|
13
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
|
-
};
|