@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/Zoom.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
- var EXITING_ANIMATION_STYLE = { position: 'absolute', top: '0', left: '0' };
42
- // tslint:enable:max-line-length
43
- var Zoom = /** @class */ (function (_super) {
44
- __extends(Zoom, _super);
45
- function Zoom() {
46
- return _super !== null && _super.apply(this, arguments) || this;
47
- }
48
- /**
49
- * @hidden
50
- */
51
- Zoom.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: "zoom-".concat(direction), animationExitingStyle: this.props.stackChildren
54
- ? EXITING_ANIMATION_STYLE
55
- : undefined }), children));
56
- };
57
- /**
58
- * @hidden
59
- */
60
- Zoom.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
- 'in',
69
- 'out'
70
- ]),
71
- component: PropTypes.string,
72
- id: PropTypes.string,
73
- style: PropTypes.any,
74
- stackChildren: PropTypes.bool
75
- };
76
- /**
77
- * @hidden
78
- */
79
- Zoom.defaultProps = {
80
- appear: false,
81
- enter: true,
82
- exit: true,
83
- transitionEnterDuration: 300,
84
- transitionExitDuration: 300,
85
- direction: 'out',
86
- stackChildren: false
87
- };
88
- return Zoom;
89
- }(React.Component));
90
- export { 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,48 +0,0 @@
1
- import * as React from 'react';
2
- /** @hidden */
3
- export var useAnimation = function (config, deps) {
4
- var offset = React.useRef(0);
5
- var mount = React.useRef(false);
6
- var animationFrame = React.useRef();
7
- var animate = function (transition) {
8
- var duration = transition.duration;
9
- var start;
10
- var progress;
11
- var skip = offset.current && 1 - offset.current;
12
- if (transition.onStart) {
13
- transition.onStart();
14
- }
15
- var frame = function (timestamp) {
16
- if (!start) {
17
- start = timestamp;
18
- }
19
- progress = timestamp - start + 1;
20
- var rate = progress / duration + skip;
21
- if (rate <= 1) {
22
- if (transition.onUpdate) {
23
- transition.onUpdate(rate);
24
- }
25
- animationFrame.current = window.requestAnimationFrame(frame);
26
- offset.current = rate;
27
- }
28
- else {
29
- if (transition.onEnd) {
30
- transition.onEnd(1);
31
- }
32
- offset.current = 0;
33
- }
34
- };
35
- animationFrame.current = window.requestAnimationFrame(frame);
36
- };
37
- React.useEffect(function () {
38
- animate(config);
39
- return function () {
40
- if (animationFrame.current) {
41
- window.cancelAnimationFrame(animationFrame.current);
42
- }
43
- };
44
- }, deps);
45
- React.useEffect(function () {
46
- mount.current = true;
47
- }, []);
48
- };
package/dist/es/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/es/main.js DELETED
@@ -1,10 +0,0 @@
1
- import { Animation } from './Animation';
2
- import { AnimationChild } from './AnimationChild';
3
- import { Fade } from './Fade';
4
- import { Expand } from './Expand';
5
- import { Push } from './Push';
6
- import { Slide } from './Slide';
7
- import { Zoom } from './Zoom';
8
- import { Reveal } from './Reveal';
9
- import { useAnimation } from './hooks/useAnimation';
10
- export { Animation, AnimationChild, Fade, Expand, Push, Slide, Zoom, Reveal, useAnimation };
@@ -1,5 +0,0 @@
1
- import { PackageMetadata } from '@progress/kendo-licensing';
2
- /**
3
- * @hidden
4
- */
5
- export declare const packageMetadata: PackageMetadata;
@@ -1,11 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- export var packageMetadata = {
5
- name: '@progress/kendo-react-animation',
6
- productName: 'KendoReact',
7
- productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1700063333,
9
- version: '',
10
- 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'
11
- };
package/dist/es/util.d.ts DELETED
@@ -1,11 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- declare const stylesMap: {
5
- outerHeight: (element: any) => any;
6
- outerWidth: (element: any) => any;
7
- styles: {
8
- [name: string]: string;
9
- };
10
- };
11
- export default stylesMap;
package/dist/es/util.js DELETED
@@ -1,138 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- var outerHeight = function (element) {
5
- if (!element || !element.ownerDocument.defaultView) {
6
- return 0;
7
- }
8
- var wnd = element.ownerDocument.defaultView;
9
- var computedStyles = wnd.getComputedStyle(element);
10
- var marginTop = parseFloat(computedStyles.marginTop);
11
- var marginBottom = parseFloat(computedStyles.marginBottom);
12
- return element.offsetHeight + marginTop + marginBottom;
13
- };
14
- /**
15
- * @hidden
16
- */
17
- var outerWidth = function (element) {
18
- if (!element || !element.ownerDocument.defaultView) {
19
- return 0;
20
- }
21
- var wnd = element.ownerDocument.defaultView;
22
- var computedStyles = wnd.getComputedStyle(element);
23
- var marginLeft = parseFloat(computedStyles.marginLeft);
24
- var marginRight = parseFloat(computedStyles.marginRight);
25
- return element.offsetWidth + marginLeft + marginRight;
26
- };
27
- /**
28
- * @hidden
29
- */
30
- var styles = {
31
- 'animation-container': 'k-animation-container',
32
- 'animation-container-relative': 'k-animation-container-relative',
33
- 'animation-container-fixed': 'k-animation-container-fixed',
34
- 'push-right-enter': 'k-push-right-enter',
35
- 'push-right-appear': 'k-push-right-appear',
36
- 'push-right-enter-active': 'k-push-right-enter-active',
37
- 'push-right-appear-active': 'k-push-right-appear-active',
38
- 'push-right-exit': 'k-push-right-exit',
39
- 'push-right-exit-active': 'k-push-right-exit-active',
40
- 'push-left-enter': 'k-push-left-enter',
41
- 'push-left-appear': 'k-push-left-appear',
42
- 'push-left-enter-active': 'k-push-left-enter-active',
43
- 'push-left-appear-active': 'k-push-left-appear-active',
44
- 'push-left-exit': 'k-push-left-exit',
45
- 'push-left-exit-active': 'k-push-left-exit-active',
46
- 'push-down-enter': 'k-push-down-enter',
47
- 'push-down-appear': 'k-push-down-appear',
48
- 'push-down-enter-active': 'k-push-down-enter-active',
49
- 'push-down-appear-active': 'k-push-down-appear-active',
50
- 'push-down-exit': 'k-push-down-exit',
51
- 'push-down-exit-active': 'k-push-down-exit-active',
52
- 'push-up-enter': 'k-push-up-enter',
53
- 'push-up-appear': 'k-push-up-appear',
54
- 'push-up-enter-active': 'k-push-up-enter-active',
55
- 'push-up-appear-active': 'k-push-up-appear-active',
56
- 'push-up-exit': 'k-push-up-exit',
57
- 'push-up-exit-active': 'k-push-up-exit-active',
58
- 'expand': 'k-expand',
59
- 'expand-vertical-enter': 'k-expand-vertical-enter',
60
- 'expand-vertical-appear': 'k-expand-vertical-appear',
61
- 'expand-vertical-enter-active': 'k-expand-vertical-enter-active',
62
- 'expand-vertical-appear-active': 'k-expand-vertical-appear-active',
63
- 'expand-vertical-exit': 'k-expand-vertical-exit',
64
- 'expand-vertical-exit-active': 'k-expand-vertical-exit-active',
65
- 'expand-horizontal-enter': 'k-expand-horizontal-enter',
66
- 'expand-horizontal-appear': 'k-expand-horizontal-appear',
67
- 'expand-horizontal-enter-active': 'k-expand-horizontal-enter-active',
68
- 'expand-horizontal-appear-active': 'k-expand-horizontal-appear-active',
69
- 'expand-horizontal-exit': 'k-expand-horizontal-exit',
70
- 'expand-horizontal-exit-active': 'k-expand-horizontal-exit-active',
71
- 'child-animation-container': 'k-child-animation-container',
72
- 'fade-enter': 'k-fade-enter',
73
- 'fade-appear': 'k-fade-appear',
74
- 'fade-enter-active': 'k-fade-enter-active',
75
- 'fade-appear-active': 'k-fade-appear-active',
76
- 'fade-exit': 'k-fade-exit',
77
- 'fade-exit-active': 'k-fade-exit-active',
78
- 'zoom-in-enter': 'k-zoom-in-enter',
79
- 'zoom-in-appear': 'k-zoom-in-appear',
80
- 'zoom-in-enter-active': 'k-zoom-in-enter-active',
81
- 'zoom-in-appear-active': 'k-zoom-in-appear-active',
82
- 'zoom-in-exit': 'k-zoom-in-exit',
83
- 'zoom-in-exit-active': 'k-zoom-in-exit-active',
84
- 'zoom-out-enter': 'k-zoom-out-enter',
85
- 'zoom-out-appear': 'k-zoom-out-appear',
86
- 'zoom-out-enter-active': 'k-zoom-out-enter-active',
87
- 'zoom-out-appear-active': 'k-zoom-out-appear-active',
88
- 'zoom-out-exit': 'k-zoom-out-exit',
89
- 'zoom-out-exit-active': 'k-zoom-out-exit-active',
90
- 'slide-in-appear': 'k-slide-in-appear',
91
- 'centered': 'k-centered',
92
- 'slide-in-appear-active': 'k-slide-in-appear-active',
93
- 'slide-down-enter': 'k-slide-down-enter',
94
- 'slide-down-appear': 'k-slide-down-appear',
95
- 'slide-down-enter-active': 'k-slide-down-enter-active',
96
- 'slide-down-appear-active': 'k-slide-down-appear-active',
97
- 'slide-down-exit': 'k-slide-down-exit',
98
- 'slide-down-exit-active': 'k-slide-down-exit-active',
99
- 'slide-up-enter': 'k-slide-up-enter',
100
- 'slide-up-appear': 'k-slide-up-appear',
101
- 'slide-up-enter-active': 'k-slide-up-enter-active',
102
- 'slide-up-appear-active': 'k-slide-up-appear-active',
103
- 'slide-up-exit': 'k-slide-up-exit',
104
- 'slide-up-exit-active': 'k-slide-up-exit-active',
105
- 'slide-right-enter': 'k-slide-right-enter',
106
- 'slide-right-appear': 'k-slide-right-appear',
107
- 'slide-right-enter-active': 'k-slide-right-enter-active',
108
- 'slide-right-appear-active': 'k-slide-right-appear-active',
109
- 'slide-right-exit': 'k-slide-right-exit',
110
- 'slide-right-exit-active': 'k-slide-right-exit-active',
111
- 'slide-left-enter': 'k-slide-left-enter',
112
- 'slide-left-appear': 'k-slide-left-appear',
113
- 'slide-left-enter-active': 'k-slide-left-enter-active',
114
- 'slide-left-appear-active': 'k-slide-left-appear-active',
115
- 'slide-left-exit': 'k-slide-left-exit',
116
- 'slide-left-exit-active': 'k-slide-left-exit-active',
117
- 'reveal-vertical-enter': 'k-reveal-vertical-enter',
118
- 'reveal-vertical-appear': 'k-reveal-vertical-appear',
119
- 'reveal-vertical-enter-active': 'k-reveal-vertical-enter-active',
120
- 'reveal-vertical-appear-active': 'k-reveal-vertical-appear-active',
121
- 'reveal-vertical-exit': 'k-reveal-vertical-exit',
122
- 'reveal-vertical-exit-active': 'k-reveal-vertical-exit-active',
123
- 'reveal-horizontal-enter': 'k-reveal-horizontal-enter',
124
- 'reveal-horizontal-appear': 'k-reveal-horizontal-appear',
125
- 'reveal-horizontal-enter-active': 'k-reveal-horizontal-enter-active',
126
- 'reveal-horizontal-appear-active': 'k-reveal-horizontal-appear-active',
127
- 'reveal-horizontal-exit': 'k-reveal-horizontal-exit',
128
- 'reveal-horizontal-exit-active': 'k-reveal-horizontal-exit-active'
129
- };
130
- /**
131
- * @hidden
132
- */
133
- var stylesMap = {
134
- outerHeight: outerHeight,
135
- outerWidth: outerWidth,
136
- styles: styles
137
- };
138
- export default stylesMap;
@@ -1,82 +0,0 @@
1
- import * as React from 'react';
2
- import * as PropTypes from 'prop-types';
3
- import { AnimationInterface } from './AnimationInterface';
4
- /**
5
- * Represents the props of the [KendoReact Animation component]({% slug overview_animation %}).
6
- */
7
- export interface AnimationProps extends AnimationInterface {
8
- /**
9
- * When the element reaches its exit state, it is no longer available in the DOM ([see example]({% slug exitingchildcomponents_animation %})).
10
- */
11
- childFactory?: any;
12
- /**
13
- * Specifies the name of the CSS class which is set to the Animation.
14
- */
15
- className?: string;
16
- /**
17
- * Specifies the node type of the parent Animation. Defaults to `div`.
18
- */
19
- component?: string;
20
- /**
21
- * Specifies the id of the Animation.
22
- */
23
- id?: string;
24
- /**
25
- * Specifies the style of the parent Animation.
26
- */
27
- style?: any;
28
- /**
29
- * Specifies whether the Animation children will stack on top of each other without interfering ([see example]({% slug stacked_animation %})).
30
- */
31
- stackChildren?: boolean;
32
- /**
33
- * Specifies the `classNames` which will be applied during the transition ([see example]({% slug customizing_animation %})).
34
- */
35
- transitionName: string;
36
- /**
37
- * Specifies the style which will be applied when the Animation reaches its entering state.
38
- */
39
- animationEnteringStyle?: any;
40
- /**
41
- * Specifies the style which will be applied when the Animation reaches its entered state.
42
- */
43
- animationEnteredStyle?: any;
44
- /**
45
- * Specifies the style which will be applied when the Animation reaches its exiting state.
46
- */
47
- animationExitingStyle?: any;
48
- /**
49
- * Specifies the style which will be applied when the Animation reaches its exited state.
50
- */
51
- animationExitedStyle?: any;
52
- }
53
- export declare class Animation extends React.Component<AnimationProps, {}> {
54
- /**
55
- * @hidden
56
- */
57
- static propTypes: {
58
- children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
59
- childFactory: PropTypes.Requireable<any>;
60
- className: PropTypes.Requireable<string>;
61
- component: PropTypes.Requireable<string>;
62
- id: PropTypes.Requireable<string>;
63
- style: PropTypes.Requireable<any>;
64
- transitionName: PropTypes.Validator<string>;
65
- appear: PropTypes.Validator<boolean>;
66
- enter: PropTypes.Validator<boolean>;
67
- exit: PropTypes.Validator<boolean>;
68
- transitionEnterDuration: PropTypes.Validator<number>;
69
- transitionExitDuration: PropTypes.Validator<number>;
70
- };
71
- /**
72
- * @hidden
73
- */
74
- static defaultProps: {
75
- component: string;
76
- };
77
- constructor(props: AnimationProps);
78
- /**
79
- * @hidden
80
- */
81
- render(): JSX.Element;
82
- }
@@ -1,101 +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.Animation = 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 AnimationChild_1 = require("./AnimationChild");
45
- var react_transition_group_1 = require("react-transition-group");
46
- var kendo_react_common_2 = require("@progress/kendo-react-common");
47
- var package_metadata_1 = require("./package-metadata");
48
- var util_1 = require("./util");
49
- var styles = util_1.default.styles;
50
- // tslint:enable:max-line-length
51
- var Animation = /** @class */ (function (_super) {
52
- __extends(Animation, _super);
53
- function Animation(props) {
54
- var _this = _super.call(this, props) || this;
55
- (0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
56
- return _this;
57
- }
58
- /**
59
- * @hidden
60
- */
61
- Animation.prototype.render = function () {
62
- var _a = this.props, id = _a.id, style = _a.style, children = _a.children, component = _a.component, className = _a.className, childFactory = _a.childFactory, stackChildren = _a.stackChildren, componentChildStyle = _a.componentChildStyle, componentChildClassName = _a.componentChildClassName, other = __rest(_a, ["id", "style", "children", "component", "className", "childFactory", "stackChildren", "componentChildStyle", "componentChildClassName"]);
63
- var transitionProps = {
64
- id: id,
65
- style: style,
66
- component: component,
67
- childFactory: childFactory,
68
- className: (0, kendo_react_common_1.classNames)(styles['animation-container'], styles['animation-container-relative'], className)
69
- };
70
- var content = React.Children.map(children || null, function (child) { return (React.createElement(AnimationChild_1.AnimationChild, __assign({}, other, { style: componentChildStyle, className: componentChildClassName }), child)); });
71
- return (React.createElement(react_transition_group_1.TransitionGroup, __assign({}, transitionProps), content));
72
- };
73
- /**
74
- * @hidden
75
- */
76
- Animation.propTypes = {
77
- children: PropTypes.oneOfType([
78
- PropTypes.arrayOf(PropTypes.node),
79
- PropTypes.node
80
- ]),
81
- childFactory: PropTypes.any,
82
- className: PropTypes.string,
83
- component: PropTypes.string,
84
- id: PropTypes.string,
85
- style: PropTypes.any,
86
- transitionName: PropTypes.string.isRequired,
87
- appear: PropTypes.bool.isRequired,
88
- enter: PropTypes.bool.isRequired,
89
- exit: PropTypes.bool.isRequired,
90
- transitionEnterDuration: PropTypes.number.isRequired,
91
- transitionExitDuration: PropTypes.number.isRequired
92
- };
93
- /**
94
- * @hidden
95
- */
96
- Animation.defaultProps = {
97
- component: 'div'
98
- };
99
- return Animation;
100
- }(React.Component));
101
- exports.Animation = Animation;