@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
|
@@ -1,178 +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.AnimationChild = void 0;
|
|
41
|
-
var React = require("react");
|
|
42
|
-
var PropTypes = require("prop-types");
|
|
43
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
44
|
-
var react_transition_group_1 = require("react-transition-group");
|
|
45
|
-
var util_1 = require("./util");
|
|
46
|
-
var styles = util_1.default.styles;
|
|
47
|
-
var AnimationChild = /** @class */ (function (_super) {
|
|
48
|
-
__extends(AnimationChild, _super);
|
|
49
|
-
function AnimationChild() {
|
|
50
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
51
|
-
_this.elementRef = React.createRef();
|
|
52
|
-
return _this;
|
|
53
|
-
}
|
|
54
|
-
Object.defineProperty(AnimationChild.prototype, "element", {
|
|
55
|
-
/**
|
|
56
|
-
* The element that is being animated.
|
|
57
|
-
*/
|
|
58
|
-
get: function () {
|
|
59
|
-
return this.elementRef.current;
|
|
60
|
-
},
|
|
61
|
-
enumerable: false,
|
|
62
|
-
configurable: true
|
|
63
|
-
});
|
|
64
|
-
/**
|
|
65
|
-
* @hidden
|
|
66
|
-
*/
|
|
67
|
-
AnimationChild.prototype.render = function () {
|
|
68
|
-
var _this = this;
|
|
69
|
-
var _a = this.props, children = _a.children, style = _a.style, appear = _a.appear, enter = _a.enter, exit = _a.exit, transitionName = _a.transitionName, transitionEnterDuration = _a.transitionEnterDuration, transitionExitDuration = _a.transitionExitDuration, className = _a.className, onEnter = _a.onEnter, onEntering = _a.onEntering, onEntered = _a.onEntered, onExit = _a.onExit, onExiting = _a.onExiting, onExited = _a.onExited, onAfterExited = _a.onAfterExited, mountOnEnter = _a.mountOnEnter, unmountOnExit = _a.unmountOnExit, animationEnteringStyle = _a.animationEnteringStyle, animationEnteredStyle = _a.animationEnteredStyle, animationExitingStyle = _a.animationExitingStyle, animationExitedStyle = _a.animationExitedStyle, other = __rest(_a, ["children", "style", "appear", "enter", "exit", "transitionName", "transitionEnterDuration", "transitionExitDuration", "className", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "onAfterExited", "mountOnEnter", "unmountOnExit", "animationEnteringStyle", "animationEnteredStyle", "animationExitingStyle", "animationExitedStyle"]);
|
|
70
|
-
var childAnimationContainerClassNames = (0, kendo_react_common_1.classNames)(className, styles['child-animation-container']);
|
|
71
|
-
var defaultStyle = __assign({ transitionDelay: '0ms' }, style);
|
|
72
|
-
var animationStyle = {
|
|
73
|
-
entering: __assign({ transitionDuration: "".concat(transitionEnterDuration, "ms") }, animationEnteringStyle),
|
|
74
|
-
entered: __assign({}, animationEnteredStyle),
|
|
75
|
-
exiting: __assign({ transitionDuration: "".concat(transitionExitDuration, "ms") }, animationExitingStyle),
|
|
76
|
-
exited: __assign({}, animationExitedStyle)
|
|
77
|
-
};
|
|
78
|
-
var transitionProps = {
|
|
79
|
-
in: this.props.in,
|
|
80
|
-
appear: appear,
|
|
81
|
-
enter: enter,
|
|
82
|
-
exit: exit,
|
|
83
|
-
mountOnEnter: mountOnEnter,
|
|
84
|
-
unmountOnExit: unmountOnExit,
|
|
85
|
-
timeout: {
|
|
86
|
-
enter: transitionEnterDuration,
|
|
87
|
-
exit: transitionExitDuration
|
|
88
|
-
},
|
|
89
|
-
onEnter: (function () {
|
|
90
|
-
if (onEnter) {
|
|
91
|
-
onEnter.call(undefined, { animatedElement: _this.element, target: _this });
|
|
92
|
-
}
|
|
93
|
-
}),
|
|
94
|
-
onEntering: (function () {
|
|
95
|
-
if (onEntering) {
|
|
96
|
-
onEntering.call(undefined, { animatedElement: _this.element, target: _this });
|
|
97
|
-
}
|
|
98
|
-
}),
|
|
99
|
-
onEntered: (function () {
|
|
100
|
-
if (onEntered) {
|
|
101
|
-
onEntered.call(undefined, { animatedElement: _this.element, target: _this });
|
|
102
|
-
}
|
|
103
|
-
}),
|
|
104
|
-
onExit: (function () {
|
|
105
|
-
if (onExit) {
|
|
106
|
-
onExit.call(undefined, { animatedElement: _this.element, target: _this });
|
|
107
|
-
}
|
|
108
|
-
}),
|
|
109
|
-
onExiting: (function () {
|
|
110
|
-
if (onExiting) {
|
|
111
|
-
onExiting.call(undefined, { animatedElement: _this.element, target: _this });
|
|
112
|
-
}
|
|
113
|
-
}),
|
|
114
|
-
onExited: (function () {
|
|
115
|
-
if (onAfterExited) {
|
|
116
|
-
onAfterExited.call(undefined, { animatedElement: _this.element, target: _this });
|
|
117
|
-
}
|
|
118
|
-
if (onExited) {
|
|
119
|
-
onExited.call(undefined, { animatedElement: _this.element, target: _this });
|
|
120
|
-
}
|
|
121
|
-
}),
|
|
122
|
-
classNames: {
|
|
123
|
-
appear: styles["".concat(transitionName, "-appear")] || "".concat(transitionName, "-appear"),
|
|
124
|
-
appearActive: styles["".concat(transitionName, "-appear-active")] || "".concat(transitionName, "-appear-active"),
|
|
125
|
-
enter: styles["".concat(transitionName, "-enter")] || "".concat(transitionName, "-enter"),
|
|
126
|
-
enterActive: styles["".concat(transitionName, "-enter-active")] || "".concat(transitionName, "-enter-active"),
|
|
127
|
-
exit: styles["".concat(transitionName, "-exit")] || "".concat(transitionName, "-exit"),
|
|
128
|
-
exitActive: styles["".concat(transitionName, "-exit-active")] || "".concat(transitionName, "-exit-active")
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
return (React.createElement(react_transition_group_1.CSSTransition, __assign({}, transitionProps, other, { nodeRef: this.elementRef }), function (status) {
|
|
132
|
-
return (React.createElement("div", { style: __assign(__assign({}, defaultStyle), animationStyle[status]), className: childAnimationContainerClassNames, ref: _this.elementRef }, children));
|
|
133
|
-
}));
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* @hidden
|
|
137
|
-
*/
|
|
138
|
-
AnimationChild.propTypes = {
|
|
139
|
-
in: PropTypes.bool,
|
|
140
|
-
children: PropTypes.oneOfType([
|
|
141
|
-
PropTypes.arrayOf(PropTypes.node),
|
|
142
|
-
PropTypes.node
|
|
143
|
-
]),
|
|
144
|
-
transitionName: PropTypes.string.isRequired,
|
|
145
|
-
className: PropTypes.string,
|
|
146
|
-
appear: PropTypes.bool,
|
|
147
|
-
enter: PropTypes.bool,
|
|
148
|
-
exit: PropTypes.bool,
|
|
149
|
-
transitionEnterDuration: PropTypes.number.isRequired,
|
|
150
|
-
transitionExitDuration: PropTypes.number.isRequired,
|
|
151
|
-
mountOnEnter: PropTypes.bool,
|
|
152
|
-
unmountOnExit: PropTypes.bool,
|
|
153
|
-
animationEnteringStyle: PropTypes.object,
|
|
154
|
-
animationEnteredStyle: PropTypes.object,
|
|
155
|
-
animationExitingStyle: PropTypes.object,
|
|
156
|
-
animationExitedStyle: PropTypes.object
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* @hidden
|
|
160
|
-
*/
|
|
161
|
-
AnimationChild.defaultProps = {
|
|
162
|
-
mountOnEnter: true,
|
|
163
|
-
unmountOnExit: false,
|
|
164
|
-
onEnter: kendo_react_common_1.noop,
|
|
165
|
-
onEntering: kendo_react_common_1.noop,
|
|
166
|
-
onEntered: kendo_react_common_1.noop,
|
|
167
|
-
onExit: kendo_react_common_1.noop,
|
|
168
|
-
onExiting: kendo_react_common_1.noop,
|
|
169
|
-
onExited: kendo_react_common_1.noop,
|
|
170
|
-
onAfterExited: kendo_react_common_1.noop,
|
|
171
|
-
animationEnteringStyle: {},
|
|
172
|
-
animationEnteredStyle: {},
|
|
173
|
-
animationExitingStyle: {},
|
|
174
|
-
animationExitedStyle: {}
|
|
175
|
-
};
|
|
176
|
-
return AnimationChild;
|
|
177
|
-
}(React.Component));
|
|
178
|
-
exports.AnimationChild = AnimationChild;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AnimationChild } from './AnimationChild';
|
|
3
|
-
/**
|
|
4
|
-
* The arguments that are passed to the life-cycle hooks.
|
|
5
|
-
*/
|
|
6
|
-
export interface AnimationEventArguments {
|
|
7
|
-
/**
|
|
8
|
-
* The element that is currently being animated.
|
|
9
|
-
*/
|
|
10
|
-
animatedElement: HTMLElement;
|
|
11
|
-
/**
|
|
12
|
-
* The AnimationChild component which controls the animation.
|
|
13
|
-
*/
|
|
14
|
-
target: AnimationChild;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Inherited by all Animations. Represents the properties which can be set to an Animation.
|
|
18
|
-
*/
|
|
19
|
-
export interface AnimationInterface {
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* Specifies the CSS class names which are set to each of the animated children elements.
|
|
26
|
-
*/
|
|
27
|
-
componentChildClassName?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Specifies the styles which are set to each of the animated children elements.
|
|
30
|
-
*/
|
|
31
|
-
componentChildStyle?: any;
|
|
32
|
-
/**
|
|
33
|
-
* Called when a component is added to an existing Animation component and the Animation has not started yet ([more information and example]({% slug lifecyclehooks_animation %}#toc-adding-child-elements)).
|
|
34
|
-
*/
|
|
35
|
-
onEnter?: (event: AnimationEventArguments) => void;
|
|
36
|
-
/**
|
|
37
|
-
* Called when a component is added to an existing Animation component and the Animation is now happening ([more information and example]({% slug lifecyclehooks_animation %}#toc-adding-child-elements)).
|
|
38
|
-
*/
|
|
39
|
-
onEntering?: (event: AnimationEventArguments) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Called when a component is added to an existing Animation component and the Animation is now finished ([more information and example]({% slug lifecyclehooks_animation %}#toc-adding-child-elements)).
|
|
42
|
-
*/
|
|
43
|
-
onEntered?: (event: AnimationEventArguments) => void;
|
|
44
|
-
/**
|
|
45
|
-
* An event that is called after the Animation has reached its exit state ([more information and example]({% slug lifecyclehooks_animation %}#toc-removing-child-elements)).
|
|
46
|
-
*/
|
|
47
|
-
onExit?: (event: AnimationEventArguments) => void;
|
|
48
|
-
/**
|
|
49
|
-
* An event that is called after the Animation has reached its exiting state ([more information and example]({% slug lifecyclehooks_animation %}#toc-removing-child-elements)).
|
|
50
|
-
*/
|
|
51
|
-
onExiting?: (event: AnimationEventArguments) => void;
|
|
52
|
-
/**
|
|
53
|
-
* An event that is called after the Animation has reached its exited state ([more information and example]({% slug lifecyclehooks_animation %}#toc-removing-child-elements)).
|
|
54
|
-
*/
|
|
55
|
-
onExited?: (event: AnimationEventArguments) => void;
|
|
56
|
-
/**
|
|
57
|
-
* @hidden
|
|
58
|
-
* This event is always triggered in contrast to `onExited` which TransitionGroup prevents when target element is not removed from DOM.
|
|
59
|
-
*/
|
|
60
|
-
onAfterExited?: (event: AnimationEventArguments) => void;
|
|
61
|
-
/**
|
|
62
|
-
* Defines whether a transition should happen on the first mount. Defaults to `false`.
|
|
63
|
-
*/
|
|
64
|
-
appear?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Specifies whether to animate the entering (showing) element ([see example]({% slug disabledstate_animation %})). Defaults to `true`.
|
|
67
|
-
*/
|
|
68
|
-
enter?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Specifies whether to animate a leaving (disappearing) element ([see example]({% slug disabledstate_animation %})). Defaults to `true`.
|
|
71
|
-
*/
|
|
72
|
-
exit?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Specifies the duration of the transition for the entering (`animation in`) Animation ([see example]({% slug duration_animation %})). After the time runs out, the Animation is terminated. Defaults to `300ms`.
|
|
75
|
-
*/
|
|
76
|
-
transitionEnterDuration?: number;
|
|
77
|
-
/**
|
|
78
|
-
* Specifies the duration of the transition for the exiting (`animation out`) Animation ([see example]({% slug duration_animation %})). After the time runs out, the Animation is terminated. Defaults to `300ms`.
|
|
79
|
-
*/
|
|
80
|
-
transitionExitDuration?: number;
|
|
81
|
-
/**
|
|
82
|
-
* Specifies if the Animation will use lazy-mounting on the first `in={true}`. Defaults to `false`.
|
|
83
|
-
*/
|
|
84
|
-
mountOnEnter?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Specifies if the Animation will unmount after it reaches its exited state. Defaults to `false`.
|
|
87
|
-
*/
|
|
88
|
-
unmountOnExit?: boolean;
|
|
89
|
-
}
|
package/dist/npm/Expand.js
DELETED
|
@@ -1,91 +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.Expand = 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 Expand = /** @class */ (function (_super) {
|
|
46
|
-
__extends(Expand, _super);
|
|
47
|
-
function Expand() {
|
|
48
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @hidden
|
|
52
|
-
*/
|
|
53
|
-
Expand.prototype.render = function () {
|
|
54
|
-
var _a = this.props, direction = _a.direction, children = _a.children, other = __rest(_a, ["direction", "children"]);
|
|
55
|
-
var animationProps = {
|
|
56
|
-
transitionName: "expand-".concat(direction)
|
|
57
|
-
};
|
|
58
|
-
return (React.createElement(Animation_1.Animation, __assign({}, animationProps, other), children));
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* @hidden
|
|
62
|
-
*/
|
|
63
|
-
Expand.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
|
-
'horizontal',
|
|
72
|
-
'vertical'
|
|
73
|
-
]),
|
|
74
|
-
component: PropTypes.string,
|
|
75
|
-
id: PropTypes.string,
|
|
76
|
-
style: PropTypes.any
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* @hidden
|
|
80
|
-
*/
|
|
81
|
-
Expand.defaultProps = {
|
|
82
|
-
appear: false,
|
|
83
|
-
enter: true,
|
|
84
|
-
exit: true,
|
|
85
|
-
transitionEnterDuration: 300,
|
|
86
|
-
transitionExitDuration: 300,
|
|
87
|
-
direction: 'vertical'
|
|
88
|
-
};
|
|
89
|
-
return Expand;
|
|
90
|
-
}(React.Component));
|
|
91
|
-
exports.Expand = Expand;
|
package/dist/npm/Fade.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as PropTypes from 'prop-types';
|
|
3
|
-
import { AnimationInterface } from './AnimationInterface';
|
|
4
|
-
/**
|
|
5
|
-
* Represent the props of the [KendoReact Fade Animation component]({% slug animationtypes_animation %}#toc-fade).
|
|
6
|
-
*
|
|
7
|
-
* {% meta %}
|
|
8
|
-
* {% variant title:Hooks %}
|
|
9
|
-
* {% embed_file props/fade/func/main.tsx preview %}
|
|
10
|
-
* {% embed_file props/fade/func/styles.css %}
|
|
11
|
-
* {% endvariant %}
|
|
12
|
-
* {% variant title:Classes %}
|
|
13
|
-
* {% embed_file props/fade/class/main.tsx preview %}
|
|
14
|
-
* {% embed_file props/fade/class/styles.css %}
|
|
15
|
-
* {% endvariant %}
|
|
16
|
-
* {% endmeta %}
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
export interface FadeProps extends AnimationInterface {
|
|
20
|
-
/**
|
|
21
|
-
* 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.
|
|
22
|
-
*/
|
|
23
|
-
childFactory?: any;
|
|
24
|
-
/**
|
|
25
|
-
* Specifies CSS class names which are set to the Animation.
|
|
26
|
-
*/
|
|
27
|
-
className?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Specifies the node type of the parent Animation. Defaults to `div`.
|
|
30
|
-
*/
|
|
31
|
-
component?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Specifies the id of the Animation.
|
|
34
|
-
*/
|
|
35
|
-
id?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Specifies the style of the parent Animation.
|
|
38
|
-
*/
|
|
39
|
-
style?: any;
|
|
40
|
-
}
|
|
41
|
-
export declare class Fade extends React.Component<FadeProps, {}> {
|
|
42
|
-
/**
|
|
43
|
-
* @hidden
|
|
44
|
-
*/
|
|
45
|
-
static propTypes: {
|
|
46
|
-
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
47
|
-
childFactory: PropTypes.Requireable<any>;
|
|
48
|
-
className: PropTypes.Requireable<string>;
|
|
49
|
-
component: PropTypes.Requireable<string>;
|
|
50
|
-
id: PropTypes.Requireable<string>;
|
|
51
|
-
style: PropTypes.Requireable<any>;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* @hidden
|
|
55
|
-
*/
|
|
56
|
-
static defaultProps: {
|
|
57
|
-
appear: boolean;
|
|
58
|
-
enter: boolean;
|
|
59
|
-
exit: boolean;
|
|
60
|
-
transitionEnterDuration: number;
|
|
61
|
-
transitionExitDuration: number;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* @hidden
|
|
65
|
-
*/
|
|
66
|
-
render(): JSX.Element;
|
|
67
|
-
}
|
package/dist/npm/Fade.js
DELETED
|
@@ -1,86 +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.Fade = 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 Fade = /** @class */ (function (_super) {
|
|
46
|
-
__extends(Fade, _super);
|
|
47
|
-
function Fade() {
|
|
48
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @hidden
|
|
52
|
-
*/
|
|
53
|
-
Fade.prototype.render = function () {
|
|
54
|
-
var _a = this.props, children = _a.children, other = __rest(_a, ["children"]);
|
|
55
|
-
var animationProps = {
|
|
56
|
-
transitionName: 'fade'
|
|
57
|
-
};
|
|
58
|
-
return (React.createElement(Animation_1.Animation, __assign({}, animationProps, other), children));
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* @hidden
|
|
62
|
-
*/
|
|
63
|
-
Fade.propTypes = {
|
|
64
|
-
children: PropTypes.oneOfType([
|
|
65
|
-
PropTypes.arrayOf(PropTypes.node),
|
|
66
|
-
PropTypes.node
|
|
67
|
-
]),
|
|
68
|
-
childFactory: PropTypes.any,
|
|
69
|
-
className: PropTypes.string,
|
|
70
|
-
component: PropTypes.string,
|
|
71
|
-
id: PropTypes.string,
|
|
72
|
-
style: PropTypes.any
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* @hidden
|
|
76
|
-
*/
|
|
77
|
-
Fade.defaultProps = {
|
|
78
|
-
appear: false,
|
|
79
|
-
enter: true,
|
|
80
|
-
exit: false,
|
|
81
|
-
transitionEnterDuration: 500,
|
|
82
|
-
transitionExitDuration: 500
|
|
83
|
-
};
|
|
84
|
-
return Fade;
|
|
85
|
-
}(React.Component));
|
|
86
|
-
exports.Fade = Fade;
|
package/dist/npm/Push.js
DELETED
|
@@ -1,95 +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.Push = 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 Push = /** @class */ (function (_super) {
|
|
47
|
-
__extends(Push, _super);
|
|
48
|
-
function Push() {
|
|
49
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @hidden
|
|
53
|
-
*/
|
|
54
|
-
Push.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: "push-".concat(direction), animationExitingStyle: this.props.stackChildren
|
|
57
|
-
? EXITING_ANIMATION_STYLE
|
|
58
|
-
: undefined }), children));
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* @hidden
|
|
62
|
-
*/
|
|
63
|
-
Push.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
|
-
stackChildren: PropTypes.bool
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* @hidden
|
|
83
|
-
*/
|
|
84
|
-
Push.defaultProps = {
|
|
85
|
-
appear: false,
|
|
86
|
-
enter: true,
|
|
87
|
-
exit: true,
|
|
88
|
-
transitionEnterDuration: 300,
|
|
89
|
-
transitionExitDuration: 300,
|
|
90
|
-
direction: 'right',
|
|
91
|
-
stackChildren: false
|
|
92
|
-
};
|
|
93
|
-
return Push;
|
|
94
|
-
}(React.Component));
|
|
95
|
-
exports.Push = Push;
|