@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.
Files changed (64) hide show
  1. package/{dist/es/Animation.d.ts → Animation.d.ts} +5 -1
  2. package/{dist/npm/AnimationChild.d.ts → AnimationChild.d.ts} +5 -1
  3. package/{dist/es/AnimationInterface.d.ts → AnimationInterface.d.ts} +4 -1
  4. package/{dist/npm/Expand.d.ts → Expand.d.ts} +6 -2
  5. package/{dist/es/Fade.d.ts → Fade.d.ts} +5 -1
  6. package/LICENSE.md +1 -1
  7. package/{dist/npm/Push.d.ts → Push.d.ts} +6 -2
  8. package/{dist/npm/Reveal.d.ts → Reveal.d.ts} +6 -2
  9. package/{dist/es/Slide.d.ts → Slide.d.ts} +6 -2
  10. package/{dist/npm/Zoom.d.ts → Zoom.d.ts} +6 -2
  11. package/dist/cdn/js/kendo-react-animation.js +5 -1
  12. package/hooks/useAnimation.d.ts +16 -0
  13. package/index.d.ts +14 -0
  14. package/index.js +5 -0
  15. package/index.mjs +669 -0
  16. package/package-metadata.d.ts +9 -0
  17. package/package.json +28 -27
  18. package/util.d.ts +15 -0
  19. package/about.md +0 -3
  20. package/dist/es/Animation.js +0 -98
  21. package/dist/es/AnimationChild.d.ts +0 -89
  22. package/dist/es/AnimationChild.js +0 -175
  23. package/dist/es/AnimationInterface.js +0 -2
  24. package/dist/es/Expand.d.ts +0 -81
  25. package/dist/es/Expand.js +0 -88
  26. package/dist/es/Fade.js +0 -83
  27. package/dist/es/Push.d.ts +0 -89
  28. package/dist/es/Push.js +0 -92
  29. package/dist/es/Reveal.d.ts +0 -101
  30. package/dist/es/Reveal.js +0 -152
  31. package/dist/es/Slide.js +0 -90
  32. package/dist/es/Zoom.d.ts +0 -87
  33. package/dist/es/Zoom.js +0 -90
  34. package/dist/es/hooks/useAnimation.d.ts +0 -12
  35. package/dist/es/hooks/useAnimation.js +0 -48
  36. package/dist/es/main.d.ts +0 -10
  37. package/dist/es/main.js +0 -10
  38. package/dist/es/package-metadata.d.ts +0 -5
  39. package/dist/es/package-metadata.js +0 -11
  40. package/dist/es/util.d.ts +0 -11
  41. package/dist/es/util.js +0 -138
  42. package/dist/npm/Animation.d.ts +0 -82
  43. package/dist/npm/Animation.js +0 -101
  44. package/dist/npm/AnimationChild.js +0 -178
  45. package/dist/npm/AnimationInterface.d.ts +0 -89
  46. package/dist/npm/AnimationInterface.js +0 -3
  47. package/dist/npm/Expand.js +0 -91
  48. package/dist/npm/Fade.d.ts +0 -67
  49. package/dist/npm/Fade.js +0 -86
  50. package/dist/npm/Push.js +0 -95
  51. package/dist/npm/Reveal.js +0 -155
  52. package/dist/npm/Slide.d.ts +0 -83
  53. package/dist/npm/Slide.js +0 -93
  54. package/dist/npm/Zoom.js +0 -93
  55. package/dist/npm/hooks/useAnimation.d.ts +0 -12
  56. package/dist/npm/hooks/useAnimation.js +0 -52
  57. package/dist/npm/main.d.ts +0 -10
  58. package/dist/npm/main.js +0 -21
  59. package/dist/npm/package-metadata.d.ts +0 -5
  60. package/dist/npm/package-metadata.js +0 -14
  61. package/dist/npm/util.d.ts +0 -11
  62. package/dist/npm/util.js +0 -140
  63. package/dist/systemjs/kendo-react-animation.js +0 -1
  64. package/e2e-next/basic.tests.ts +0 -25
package/dist/es/Fade.js DELETED
@@ -1,83 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- var __assign = (this && this.__assign) || function () {
17
- __assign = Object.assign || function(t) {
18
- for (var s, i = 1, n = arguments.length; i < n; i++) {
19
- s = arguments[i];
20
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
- t[p] = s[p];
22
- }
23
- return t;
24
- };
25
- return __assign.apply(this, arguments);
26
- };
27
- var __rest = (this && this.__rest) || function (s, e) {
28
- var t = {};
29
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
30
- t[p] = s[p];
31
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
32
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
- t[p[i]] = s[p[i]];
35
- }
36
- return t;
37
- };
38
- import * as React from 'react';
39
- import * as PropTypes from 'prop-types';
40
- import { Animation } from './Animation';
41
- // tslint:enable:max-line-length
42
- var Fade = /** @class */ (function (_super) {
43
- __extends(Fade, _super);
44
- function Fade() {
45
- return _super !== null && _super.apply(this, arguments) || this;
46
- }
47
- /**
48
- * @hidden
49
- */
50
- Fade.prototype.render = function () {
51
- var _a = this.props, children = _a.children, other = __rest(_a, ["children"]);
52
- var animationProps = {
53
- transitionName: 'fade'
54
- };
55
- return (React.createElement(Animation, __assign({}, animationProps, other), children));
56
- };
57
- /**
58
- * @hidden
59
- */
60
- Fade.propTypes = {
61
- children: PropTypes.oneOfType([
62
- PropTypes.arrayOf(PropTypes.node),
63
- PropTypes.node
64
- ]),
65
- childFactory: PropTypes.any,
66
- className: PropTypes.string,
67
- component: PropTypes.string,
68
- id: PropTypes.string,
69
- style: PropTypes.any
70
- };
71
- /**
72
- * @hidden
73
- */
74
- Fade.defaultProps = {
75
- appear: false,
76
- enter: true,
77
- exit: false,
78
- transitionEnterDuration: 500,
79
- transitionExitDuration: 500
80
- };
81
- return Fade;
82
- }(React.Component));
83
- export { Fade };
package/dist/es/Push.d.ts DELETED
@@ -1,89 +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 Push Animation ([see example]({% slug direction_animation %}#toc-push)).
6
- *
7
- * The supported directions are:
8
- * * (Default) `right`&mdash;Pushes the content from left to right.
9
- * * `up`&mdash;Pushes the content from bottom to top.
10
- * * `down`&mdash;Pushes the content from top to bottom.
11
- * * `left`&mdash;Pushes the content from right to left.
12
- */
13
- export declare type PushDirection = 'up' | 'down' | 'left' | 'right';
14
- /**
15
- * Represent the props of the [KendoReact Push Animation component]({% slug animationtypes_animation %}#toc-push).
16
- *
17
- * {% meta %}
18
- * {% variant title:Hooks %}
19
- * {% embed_file props/push/func/main.tsx preview %}
20
- * {% embed_file props/push/func/styles.css %}
21
- * {% endvariant %}
22
- * {% variant title:Classes %}
23
- * {% embed_file props/push/class/main.tsx preview %}
24
- * {% embed_file props/push/class/styles.css %}
25
- * {% endvariant %}
26
- * {% endmeta %}
27
- *
28
- */
29
- export interface PushProps 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 Push Animation. Defaults to `out`.
40
- */
41
- direction?: PushDirection;
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
- * Specifies whether the child elements will stack on top of each other without interfering ([more information and examples]({% slug stacked_animation %})).
56
- */
57
- stackChildren?: boolean;
58
- }
59
- export declare class Push extends React.Component<PushProps, {}> {
60
- /**
61
- * @hidden
62
- */
63
- static propTypes: {
64
- children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
65
- childFactory: PropTypes.Requireable<any>;
66
- className: PropTypes.Requireable<string>;
67
- direction: PropTypes.Requireable<string>;
68
- component: PropTypes.Requireable<string>;
69
- id: PropTypes.Requireable<string>;
70
- style: PropTypes.Requireable<any>;
71
- stackChildren: PropTypes.Requireable<boolean>;
72
- };
73
- /**
74
- * @hidden
75
- */
76
- static defaultProps: {
77
- appear: boolean;
78
- enter: boolean;
79
- exit: boolean;
80
- transitionEnterDuration: number;
81
- transitionExitDuration: number;
82
- direction: string;
83
- stackChildren: boolean;
84
- };
85
- /**
86
- * @hidden
87
- */
88
- render(): JSX.Element;
89
- }
package/dist/es/Push.js DELETED
@@ -1,92 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- var __assign = (this && this.__assign) || function () {
17
- __assign = Object.assign || function(t) {
18
- for (var s, i = 1, n = arguments.length; i < n; i++) {
19
- s = arguments[i];
20
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
- t[p] = s[p];
22
- }
23
- return t;
24
- };
25
- return __assign.apply(this, arguments);
26
- };
27
- var __rest = (this && this.__rest) || function (s, e) {
28
- var t = {};
29
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
30
- t[p] = s[p];
31
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
32
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
- t[p[i]] = s[p[i]];
35
- }
36
- return t;
37
- };
38
- import * as React from 'react';
39
- import * as PropTypes from 'prop-types';
40
- import { Animation } from './Animation';
41
- var EXITING_ANIMATION_STYLE = { position: 'absolute', top: '0', left: '0' };
42
- // tslint:enable:max-line-length
43
- var Push = /** @class */ (function (_super) {
44
- __extends(Push, _super);
45
- function Push() {
46
- return _super !== null && _super.apply(this, arguments) || this;
47
- }
48
- /**
49
- * @hidden
50
- */
51
- Push.prototype.render = function () {
52
- var _a = this.props, children = _a.children, direction = _a.direction, other = __rest(_a, ["children", "direction"]);
53
- return (React.createElement(Animation, __assign({}, other, { transitionName: "push-".concat(direction), animationExitingStyle: this.props.stackChildren
54
- ? EXITING_ANIMATION_STYLE
55
- : undefined }), children));
56
- };
57
- /**
58
- * @hidden
59
- */
60
- Push.propTypes = {
61
- children: PropTypes.oneOfType([
62
- PropTypes.arrayOf(PropTypes.node),
63
- PropTypes.node
64
- ]),
65
- childFactory: PropTypes.any,
66
- className: PropTypes.string,
67
- direction: PropTypes.oneOf([
68
- 'up',
69
- 'down',
70
- 'left',
71
- 'right'
72
- ]),
73
- component: PropTypes.string,
74
- id: PropTypes.string,
75
- style: PropTypes.any,
76
- stackChildren: PropTypes.bool
77
- };
78
- /**
79
- * @hidden
80
- */
81
- Push.defaultProps = {
82
- appear: false,
83
- enter: true,
84
- exit: true,
85
- transitionEnterDuration: 300,
86
- transitionExitDuration: 300,
87
- direction: 'right',
88
- stackChildren: false
89
- };
90
- return Push;
91
- }(React.Component));
92
- export { Push };
@@ -1,101 +0,0 @@
1
- import * as React from 'react';
2
- import * as PropTypes from 'prop-types';
3
- import { AnimationInterface, AnimationEventArguments } from './AnimationInterface';
4
- /**
5
- * Specifies the direction of the Reveal Animation ([see example]({% slug direction_animation %}#toc-reveal)).
6
- *
7
- * The supported directions are:
8
- * * (Default) `vertical`&mdash;Reveals the height of the content.
9
- * * `horizontal`&mdash;Reveals the width of the content.
10
- */
11
- export declare type RevealDirection = 'horizontal' | 'vertical';
12
- /**
13
- * Represent the props of the [KendoReact Reveal Animation component]({% slug animationtypes_animation %}#toc-rveal).
14
- *
15
- * {% meta %}
16
- * {% variant title:Hooks %}
17
- * {% embed_file props/reveal/func/main.tsx preview %}
18
- * {% embed_file props/reveal/func/styles.css %}
19
- * {% endvariant %}
20
- * {% variant title:Classes %}
21
- * {% embed_file props/reveal/class/main.tsx preview %}
22
- * {% embed_file props/reveal/class/styles.css %}
23
- * {% endvariant %}
24
- * {% endmeta %}
25
- *
26
- */
27
- export interface RevealProps extends AnimationInterface {
28
- /**
29
- * 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.
30
- */
31
- childFactory?: any;
32
- /**
33
- * Specifies the CSS class names which are set to the Animation.
34
- */
35
- className?: string;
36
- /**
37
- * Specifies the direction of the Reveal Animation. Defaults to `vertical`.
38
- */
39
- direction?: RevealDirection;
40
- /**
41
- * Specifies the node type of the parent Animation. Defaults to `div`.
42
- */
43
- component?: string;
44
- /**
45
- * Specifies the id of the Animation.
46
- */
47
- id?: string;
48
- /**
49
- * Specifies the style of the parent Animation.
50
- */
51
- style?: any;
52
- /**
53
- * @hidden
54
- * This is synchronious variant of `onEnter` event.
55
- */
56
- onBeforeEnter?: (event: AnimationEventArguments) => void;
57
- }
58
- /**
59
- * @hidden
60
- */
61
- export interface RevealState {
62
- maxHeight?: number;
63
- maxWidth?: number;
64
- }
65
- export declare class Reveal extends React.Component<RevealProps, RevealState> {
66
- /**
67
- * @hidden
68
- */
69
- static propTypes: {
70
- children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
71
- childFactory: PropTypes.Requireable<any>;
72
- className: PropTypes.Requireable<string>;
73
- direction: PropTypes.Requireable<string>;
74
- component: PropTypes.Requireable<string>;
75
- id: PropTypes.Requireable<string>;
76
- style: PropTypes.Requireable<any>;
77
- };
78
- /**
79
- * @hidden
80
- */
81
- static defaultProps: {
82
- appear: boolean;
83
- enter: boolean;
84
- exit: boolean;
85
- transitionEnterDuration: number;
86
- transitionExitDuration: number;
87
- direction: string;
88
- };
89
- /**
90
- * @hidden
91
- */
92
- readonly state: RevealState;
93
- /**
94
- * @hidden
95
- */
96
- render(): JSX.Element;
97
- private componentWillEnter;
98
- private componentIsEntering;
99
- private componentWillExit;
100
- private updateContainerDimensions;
101
- }
package/dist/es/Reveal.js DELETED
@@ -1,152 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- var __assign = (this && this.__assign) || function () {
17
- __assign = Object.assign || function(t) {
18
- for (var s, i = 1, n = arguments.length; i < n; i++) {
19
- s = arguments[i];
20
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
- t[p] = s[p];
22
- }
23
- return t;
24
- };
25
- return __assign.apply(this, arguments);
26
- };
27
- var __rest = (this && this.__rest) || function (s, e) {
28
- var t = {};
29
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
30
- t[p] = s[p];
31
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
32
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
- t[p[i]] = s[p[i]];
35
- }
36
- return t;
37
- };
38
- import * as React from 'react';
39
- import * as PropTypes from 'prop-types';
40
- import { Animation } from './Animation';
41
- import { noop } from '@progress/kendo-react-common';
42
- import util from './util';
43
- var Reveal = /** @class */ (function (_super) {
44
- __extends(Reveal, _super);
45
- function Reveal() {
46
- var _this = _super !== null && _super.apply(this, arguments) || this;
47
- /**
48
- * @hidden
49
- */
50
- _this.state = {
51
- maxHeight: undefined,
52
- maxWidth: undefined
53
- };
54
- _this.componentWillEnter = function (event) {
55
- var _a = _this.props, onEnter = _a.onEnter, onBeforeEnter = _a.onBeforeEnter;
56
- if (onBeforeEnter) {
57
- onBeforeEnter.call(undefined, event);
58
- }
59
- _this.updateContainerDimensions(event.animatedElement, function () {
60
- if (onEnter) {
61
- onEnter.call(undefined, event);
62
- }
63
- });
64
- };
65
- _this.componentIsEntering = function (event) {
66
- var onEntering = _this.props.onEntering;
67
- _this.updateContainerDimensions(event.animatedElement, function () {
68
- if (onEntering) {
69
- onEntering.call(undefined, event);
70
- }
71
- });
72
- };
73
- _this.componentWillExit = function (event) {
74
- var onExit = _this.props.onExit;
75
- _this.updateContainerDimensions(event.animatedElement, function () {
76
- if (onExit) {
77
- onExit.call(undefined, event);
78
- }
79
- });
80
- };
81
- _this.updateContainerDimensions = function (node, done) {
82
- if (done === void 0) { done = noop; }
83
- var content = node.firstChild;
84
- if (content) {
85
- var newHeight = util.outerHeight(content);
86
- var newWidth = util.outerWidth(content);
87
- _this.setState({
88
- maxHeight: newHeight,
89
- maxWidth: newWidth
90
- }, done);
91
- }
92
- };
93
- return _this;
94
- }
95
- /**
96
- * @hidden
97
- */
98
- Reveal.prototype.render = function () {
99
- var _a = this.props, direction = _a.direction, children = _a.children, childFactory = _a.childFactory, other = __rest(_a, ["direction", "children", "childFactory"]);
100
- var _b = this.state, maxHeight = _b.maxHeight, maxWidth = _b.maxWidth;
101
- var maxOffset;
102
- if (direction === 'vertical') {
103
- maxOffset = { maxHeight: maxHeight ? "".concat(maxHeight, "px") : '' };
104
- }
105
- else {
106
- maxOffset = { maxWidth: maxWidth ? "".concat(maxWidth, "px") : '' };
107
- }
108
- var animationEnteringStyle = {
109
- maxHeight: maxOffset.maxHeight,
110
- maxWidth: maxOffset.maxWidth
111
- };
112
- var factory = function (child) {
113
- var result = childFactory ? childFactory(child) : child;
114
- if (!result.props.in) {
115
- return React.cloneElement(result, __assign(__assign({}, result.props), { style: __assign(__assign({}, result.props.style), { maxHeight: maxOffset.maxHeight, maxWidth: maxOffset.maxWidth }) }));
116
- }
117
- return result;
118
- };
119
- return (React.createElement(Animation, __assign({}, other, { childFactory: factory, onEnter: this.componentWillEnter, onEntering: this.componentIsEntering, onExit: this.componentWillExit, animationEnteringStyle: animationEnteringStyle, transitionName: "reveal-".concat(direction) }), children));
120
- };
121
- /**
122
- * @hidden
123
- */
124
- Reveal.propTypes = {
125
- children: PropTypes.oneOfType([
126
- PropTypes.arrayOf(PropTypes.node),
127
- PropTypes.node
128
- ]),
129
- childFactory: PropTypes.any,
130
- className: PropTypes.string,
131
- direction: PropTypes.oneOf([
132
- 'horizontal',
133
- 'vertical'
134
- ]),
135
- component: PropTypes.string,
136
- id: PropTypes.string,
137
- style: PropTypes.any
138
- };
139
- /**
140
- * @hidden
141
- */
142
- Reveal.defaultProps = {
143
- appear: false,
144
- enter: true,
145
- exit: true,
146
- transitionEnterDuration: 300,
147
- transitionExitDuration: 300,
148
- direction: 'vertical'
149
- };
150
- return Reveal;
151
- }(React.Component));
152
- export { Reveal };
package/dist/es/Slide.js DELETED
@@ -1,90 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- var __assign = (this && this.__assign) || function () {
17
- __assign = Object.assign || function(t) {
18
- for (var s, i = 1, n = arguments.length; i < n; i++) {
19
- s = arguments[i];
20
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
- t[p] = s[p];
22
- }
23
- return t;
24
- };
25
- return __assign.apply(this, arguments);
26
- };
27
- var __rest = (this && this.__rest) || function (s, e) {
28
- var t = {};
29
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
30
- t[p] = s[p];
31
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
32
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
- t[p[i]] = s[p[i]];
35
- }
36
- return t;
37
- };
38
- import * as React from 'react';
39
- import * as PropTypes from 'prop-types';
40
- import { Animation } from './Animation';
41
- // tslint:enable:max-line-length
42
- var Slide = /** @class */ (function (_super) {
43
- __extends(Slide, _super);
44
- function Slide() {
45
- return _super !== null && _super.apply(this, arguments) || this;
46
- }
47
- /**
48
- * @hidden
49
- */
50
- Slide.prototype.render = function () {
51
- var _a = this.props, direction = _a.direction, children = _a.children, other = __rest(_a, ["direction", "children"]);
52
- var animationProps = {
53
- transitionName: "slide-".concat(direction)
54
- };
55
- return (React.createElement(Animation, __assign({}, animationProps, other), children));
56
- };
57
- /**
58
- * @hidden
59
- */
60
- Slide.propTypes = {
61
- children: PropTypes.oneOfType([
62
- PropTypes.arrayOf(PropTypes.node),
63
- PropTypes.node
64
- ]),
65
- childFactory: PropTypes.any,
66
- className: PropTypes.string,
67
- direction: PropTypes.oneOf([
68
- 'up',
69
- 'down',
70
- 'left',
71
- 'right'
72
- ]),
73
- component: PropTypes.string,
74
- id: PropTypes.string,
75
- style: PropTypes.any
76
- };
77
- /**
78
- * @hidden
79
- */
80
- Slide.defaultProps = {
81
- appear: false,
82
- enter: true,
83
- exit: true,
84
- transitionEnterDuration: 300,
85
- transitionExitDuration: 300,
86
- direction: 'down'
87
- };
88
- return Slide;
89
- }(React.Component));
90
- export { Slide };
package/dist/es/Zoom.d.ts DELETED
@@ -1,87 +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 Zoom Animation ([see example]({% slug direction_animation %}#toc-zoom)).
6
- *
7
- * The supported directions are:
8
- * * (Default) `out`&mdash;Zooms the content from the outside to the inside.
9
- * * `in`&mdash;Zooms the content from the inside to the outside.
10
- */
11
- export declare type ZoomDirection = 'in' | 'out';
12
- /**
13
- * Represent the props of the [KendoReact Zoom Animation component]({% slug animationtypes_animation %}#toc-zoom).
14
- *
15
- * {% meta %}
16
- * {% variant title:Hooks %}
17
- * {% embed_file props/zoom/func/main.tsx preview %}
18
- * {% embed_file props/zoom/func/styles.css %}
19
- * {% endvariant %}
20
- * {% variant title:Classes %}
21
- * {% embed_file props/zoom/class/main.tsx preview %}
22
- * {% embed_file props/zoom/class/styles.css %}
23
- * {% endvariant %}
24
- * {% endmeta %}
25
- *
26
- */
27
- export interface ZoomProps extends AnimationInterface {
28
- /**
29
- * 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.
30
- */
31
- childFactory?: any;
32
- /**
33
- * Specifies the CSS class names which are set to the Animation.
34
- */
35
- className?: string;
36
- /**
37
- * Specifies the direction of the Zoom Animation. Defaults to `down`.
38
- */
39
- direction?: ZoomDirection;
40
- /**
41
- * Specifies the node type of the parent Asnimation. Defaults to `div`.
42
- */
43
- component?: string;
44
- /**
45
- * Specifies the id of the Animation.
46
- */
47
- id?: string;
48
- /**
49
- * Specifies the style of the parent Animation.
50
- */
51
- style?: any;
52
- /**
53
- * Specifies whether the child elements will stack on top of each other without interfering ([more information and examples]({% slug stacked_animation %})).
54
- */
55
- stackChildren?: boolean;
56
- }
57
- export declare class Zoom extends React.Component<ZoomProps, {}> {
58
- /**
59
- * @hidden
60
- */
61
- static propTypes: {
62
- children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
63
- childFactory: PropTypes.Requireable<any>;
64
- className: PropTypes.Requireable<string>;
65
- direction: PropTypes.Requireable<string>;
66
- component: PropTypes.Requireable<string>;
67
- id: PropTypes.Requireable<string>;
68
- style: PropTypes.Requireable<any>;
69
- stackChildren: PropTypes.Requireable<boolean>;
70
- };
71
- /**
72
- * @hidden
73
- */
74
- static defaultProps: {
75
- appear: boolean;
76
- enter: boolean;
77
- exit: boolean;
78
- transitionEnterDuration: number;
79
- transitionExitDuration: number;
80
- direction: string;
81
- stackChildren: boolean;
82
- };
83
- /**
84
- * @hidden
85
- */
86
- render(): JSX.Element;
87
- }