@progress/kendo-react-animation 6.1.1 → 7.0.0-develop.1

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/package.json CHANGED
@@ -1,20 +1,30 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-animation",
3
+ "version": "7.0.0-develop.1",
3
4
  "description": "React Animation component assists with animating HTML elements. KendoReact Animation package",
4
- "version": "6.1.1",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/telerik/kendo-react.git"
5
+ "author": "Progress",
6
+ "license": "SEE LICENSE IN LICENSE.md",
7
+ "homepage": "https://www.telerik.com/kendo-react-ui",
8
+ "main": "./index.js",
9
+ "types": "./index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./index.mjs",
13
+ "require": "./index.js"
14
+ }
15
+ },
16
+ "sideEffects": false,
17
+ "peerDependencies": {
18
+ "@progress/kendo-licensing": "^1.3.0",
19
+ "@progress/kendo-react-common": "7.0.0-develop.1",
20
+ "@progress/kendo-svg-icons": "^2.0.0",
21
+ "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
22
+ "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0",
23
+ "react-transition-group": "4.4.2"
8
24
  },
9
- "main": "dist/npm/main.js",
10
- "types": "dist/npm/main.d.ts",
11
- "module": "dist/es/main.js",
12
- "jsnext:main": "dist/es/main.js",
13
- "scripts": {
14
- "test": "cd ../../ && npm run test -- --testPathPattern=/packages/animation/.*",
15
- "build-package": "gulp build-package"
25
+ "dependencies": {
26
+ "prop-types": "^15.6.0"
16
27
  },
17
- "homepage": "https://www.telerik.com/kendo-react-ui",
18
28
  "keywords": [
19
29
  "Kendo UI",
20
30
  "React",
@@ -27,24 +37,15 @@
27
37
  "React component",
28
38
  "Telerik"
29
39
  ],
30
- "peerDependencies": {
31
- "@progress/kendo-licensing": "^1.3.0",
32
- "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
33
- "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
34
- },
35
- "dependencies": {
36
- "@progress/kendo-react-common": "6.1.1",
37
- "prop-types": "^15.6.0",
38
- "react-transition-group": "4.4.2"
39
- },
40
40
  "@progress": {
41
41
  "friendlyName": "Animations",
42
42
  "framework": "KendoReact"
43
43
  },
44
- "author": "Progress",
45
- "license": "SEE LICENSE IN LICENSE.md",
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "https://github.com/telerik/kendo-react.git"
47
+ },
46
48
  "publishConfig": {
47
49
  "access": "public"
48
- },
49
- "sideEffects": false
50
- }
50
+ }
51
+ }
package/util.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * @hidden
7
+ */
8
+ declare const stylesMap: {
9
+ outerHeight: (element: any) => any;
10
+ outerWidth: (element: any) => any;
11
+ styles: {
12
+ [name: string]: string;
13
+ };
14
+ };
15
+ export default stylesMap;
package/about.md DELETED
@@ -1,3 +0,0 @@
1
- <a href="https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation&utm_content=banner" target="_blank">
2
- <img src="https://www.telerik.com/kendo-react-ui/components/npm-banner.svg" alt="KendoReact NPM Banner">
3
- </a>
@@ -1,98 +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 { classNames } from '@progress/kendo-react-common';
41
- import { AnimationChild } from './AnimationChild';
42
- import { TransitionGroup } from 'react-transition-group';
43
- import { validatePackage } from '@progress/kendo-react-common';
44
- import { packageMetadata } from './package-metadata';
45
- import util from './util';
46
- var styles = util.styles;
47
- // tslint:enable:max-line-length
48
- var Animation = /** @class */ (function (_super) {
49
- __extends(Animation, _super);
50
- function Animation(props) {
51
- var _this = _super.call(this, props) || this;
52
- validatePackage(packageMetadata);
53
- return _this;
54
- }
55
- /**
56
- * @hidden
57
- */
58
- Animation.prototype.render = function () {
59
- 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"]);
60
- var transitionProps = {
61
- id: id,
62
- style: style,
63
- component: component,
64
- childFactory: childFactory,
65
- className: classNames(styles['animation-container'], styles['animation-container-relative'], className)
66
- };
67
- var content = React.Children.map(children || null, function (child) { return (React.createElement(AnimationChild, __assign({}, other, { style: componentChildStyle, className: componentChildClassName }), child)); });
68
- return (React.createElement(TransitionGroup, __assign({}, transitionProps), content));
69
- };
70
- /**
71
- * @hidden
72
- */
73
- Animation.propTypes = {
74
- children: PropTypes.oneOfType([
75
- PropTypes.arrayOf(PropTypes.node),
76
- PropTypes.node
77
- ]),
78
- childFactory: PropTypes.any,
79
- className: PropTypes.string,
80
- component: PropTypes.string,
81
- id: PropTypes.string,
82
- style: PropTypes.any,
83
- transitionName: PropTypes.string.isRequired,
84
- appear: PropTypes.bool.isRequired,
85
- enter: PropTypes.bool.isRequired,
86
- exit: PropTypes.bool.isRequired,
87
- transitionEnterDuration: PropTypes.number.isRequired,
88
- transitionExitDuration: PropTypes.number.isRequired
89
- };
90
- /**
91
- * @hidden
92
- */
93
- Animation.defaultProps = {
94
- component: 'div'
95
- };
96
- return Animation;
97
- }(React.Component));
98
- export { Animation };
@@ -1,89 +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 child Animation elements.
6
- */
7
- export interface AnimationChildProps extends AnimationInterface {
8
- /**
9
- * Controlled by `TransitionGroup` if present. Otherwise, sets the state of the enter or exit Animations.
10
- */
11
- in?: boolean;
12
- /**
13
- * @hidden
14
- */
15
- style?: any;
16
- /**
17
- * @hidden
18
- */
19
- className?: string;
20
- /**
21
- * Specifies the transition class which will be applied on the appear, enter, and exit transition.
22
- */
23
- transitionName: string;
24
- /**
25
- * Specifies the style which will be applied when the Animation reaches its entering state.
26
- */
27
- animationEnteringStyle?: any;
28
- /**
29
- * Specifies the style which will be applied when the Animation reaches its entered state.
30
- */
31
- animationEnteredStyle?: any;
32
- /**
33
- * Specifies the style which will be applied when the Animation reaches its exiting state.
34
- */
35
- animationExitingStyle?: any;
36
- /**
37
- * Specifies the style which will be applied when the Animation reaches its exited state.
38
- */
39
- animationExitedStyle?: any;
40
- }
41
- export declare class AnimationChild extends React.Component<AnimationChildProps, {}> {
42
- /**
43
- * @hidden
44
- */
45
- static propTypes: {
46
- in: PropTypes.Requireable<boolean>;
47
- children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
48
- transitionName: PropTypes.Validator<string>;
49
- className: PropTypes.Requireable<string>;
50
- appear: PropTypes.Requireable<boolean>;
51
- enter: PropTypes.Requireable<boolean>;
52
- exit: PropTypes.Requireable<boolean>;
53
- transitionEnterDuration: PropTypes.Validator<number>;
54
- transitionExitDuration: PropTypes.Validator<number>;
55
- mountOnEnter: PropTypes.Requireable<boolean>;
56
- unmountOnExit: PropTypes.Requireable<boolean>;
57
- animationEnteringStyle: PropTypes.Requireable<object>;
58
- animationEnteredStyle: PropTypes.Requireable<object>;
59
- animationExitingStyle: PropTypes.Requireable<object>;
60
- animationExitedStyle: PropTypes.Requireable<object>;
61
- };
62
- /**
63
- * @hidden
64
- */
65
- static defaultProps: {
66
- mountOnEnter: boolean;
67
- unmountOnExit: boolean;
68
- onEnter: () => void;
69
- onEntering: () => void;
70
- onEntered: () => void;
71
- onExit: () => void;
72
- onExiting: () => void;
73
- onExited: () => void;
74
- onAfterExited: () => void;
75
- animationEnteringStyle: {};
76
- animationEnteredStyle: {};
77
- animationExitingStyle: {};
78
- animationExitedStyle: {};
79
- };
80
- private elementRef;
81
- /**
82
- * The element that is being animated.
83
- */
84
- get element(): HTMLDivElement | null;
85
- /**
86
- * @hidden
87
- */
88
- render(): JSX.Element;
89
- }
@@ -1,175 +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 { classNames, noop } from '@progress/kendo-react-common';
41
- import { CSSTransition } from 'react-transition-group';
42
- import util from './util';
43
- var styles = util.styles;
44
- var AnimationChild = /** @class */ (function (_super) {
45
- __extends(AnimationChild, _super);
46
- function AnimationChild() {
47
- var _this = _super !== null && _super.apply(this, arguments) || this;
48
- _this.elementRef = React.createRef();
49
- return _this;
50
- }
51
- Object.defineProperty(AnimationChild.prototype, "element", {
52
- /**
53
- * The element that is being animated.
54
- */
55
- get: function () {
56
- return this.elementRef.current;
57
- },
58
- enumerable: false,
59
- configurable: true
60
- });
61
- /**
62
- * @hidden
63
- */
64
- AnimationChild.prototype.render = function () {
65
- var _this = this;
66
- 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"]);
67
- var childAnimationContainerClassNames = classNames(className, styles['child-animation-container']);
68
- var defaultStyle = __assign({ transitionDelay: '0ms' }, style);
69
- var animationStyle = {
70
- entering: __assign({ transitionDuration: "".concat(transitionEnterDuration, "ms") }, animationEnteringStyle),
71
- entered: __assign({}, animationEnteredStyle),
72
- exiting: __assign({ transitionDuration: "".concat(transitionExitDuration, "ms") }, animationExitingStyle),
73
- exited: __assign({}, animationExitedStyle)
74
- };
75
- var transitionProps = {
76
- in: this.props.in,
77
- appear: appear,
78
- enter: enter,
79
- exit: exit,
80
- mountOnEnter: mountOnEnter,
81
- unmountOnExit: unmountOnExit,
82
- timeout: {
83
- enter: transitionEnterDuration,
84
- exit: transitionExitDuration
85
- },
86
- onEnter: (function () {
87
- if (onEnter) {
88
- onEnter.call(undefined, { animatedElement: _this.element, target: _this });
89
- }
90
- }),
91
- onEntering: (function () {
92
- if (onEntering) {
93
- onEntering.call(undefined, { animatedElement: _this.element, target: _this });
94
- }
95
- }),
96
- onEntered: (function () {
97
- if (onEntered) {
98
- onEntered.call(undefined, { animatedElement: _this.element, target: _this });
99
- }
100
- }),
101
- onExit: (function () {
102
- if (onExit) {
103
- onExit.call(undefined, { animatedElement: _this.element, target: _this });
104
- }
105
- }),
106
- onExiting: (function () {
107
- if (onExiting) {
108
- onExiting.call(undefined, { animatedElement: _this.element, target: _this });
109
- }
110
- }),
111
- onExited: (function () {
112
- if (onAfterExited) {
113
- onAfterExited.call(undefined, { animatedElement: _this.element, target: _this });
114
- }
115
- if (onExited) {
116
- onExited.call(undefined, { animatedElement: _this.element, target: _this });
117
- }
118
- }),
119
- classNames: {
120
- appear: styles["".concat(transitionName, "-appear")] || "".concat(transitionName, "-appear"),
121
- appearActive: styles["".concat(transitionName, "-appear-active")] || "".concat(transitionName, "-appear-active"),
122
- enter: styles["".concat(transitionName, "-enter")] || "".concat(transitionName, "-enter"),
123
- enterActive: styles["".concat(transitionName, "-enter-active")] || "".concat(transitionName, "-enter-active"),
124
- exit: styles["".concat(transitionName, "-exit")] || "".concat(transitionName, "-exit"),
125
- exitActive: styles["".concat(transitionName, "-exit-active")] || "".concat(transitionName, "-exit-active")
126
- }
127
- };
128
- return (React.createElement(CSSTransition, __assign({}, transitionProps, other, { nodeRef: this.elementRef }), function (status) {
129
- return (React.createElement("div", { style: __assign(__assign({}, defaultStyle), animationStyle[status]), className: childAnimationContainerClassNames, ref: _this.elementRef }, children));
130
- }));
131
- };
132
- /**
133
- * @hidden
134
- */
135
- AnimationChild.propTypes = {
136
- in: PropTypes.bool,
137
- children: PropTypes.oneOfType([
138
- PropTypes.arrayOf(PropTypes.node),
139
- PropTypes.node
140
- ]),
141
- transitionName: PropTypes.string.isRequired,
142
- className: PropTypes.string,
143
- appear: PropTypes.bool,
144
- enter: PropTypes.bool,
145
- exit: PropTypes.bool,
146
- transitionEnterDuration: PropTypes.number.isRequired,
147
- transitionExitDuration: PropTypes.number.isRequired,
148
- mountOnEnter: PropTypes.bool,
149
- unmountOnExit: PropTypes.bool,
150
- animationEnteringStyle: PropTypes.object,
151
- animationEnteredStyle: PropTypes.object,
152
- animationExitingStyle: PropTypes.object,
153
- animationExitedStyle: PropTypes.object
154
- };
155
- /**
156
- * @hidden
157
- */
158
- AnimationChild.defaultProps = {
159
- mountOnEnter: true,
160
- unmountOnExit: false,
161
- onEnter: noop,
162
- onEntering: noop,
163
- onEntered: noop,
164
- onExit: noop,
165
- onExiting: noop,
166
- onExited: noop,
167
- onAfterExited: noop,
168
- animationEnteringStyle: {},
169
- animationEnteredStyle: {},
170
- animationExitingStyle: {},
171
- animationExitedStyle: {}
172
- };
173
- return AnimationChild;
174
- }(React.Component));
175
- export { AnimationChild };
@@ -1,2 +0,0 @@
1
- export {};
2
- // tslint:enable:max-line-length
@@ -1,81 +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 Expand Animation ([see example]({% slug direction_animation %}#toc-expand)).
6
- *
7
- * The supported directions are:
8
- * * (Default) `vertical`&mdash;Expands the content from center to top and bottom, and vice-versa.
9
- * * `horizontal`&mdash;Expands the content from center to left and right, and vice-versa.
10
- */
11
- export declare type ExpandDirection = 'horizontal' | 'vertical';
12
- /**
13
- * Represent the props of the [KendoReact Expand Animation component]({% slug animationtypes_animation %}#toc-expand).
14
- *
15
- * {% meta %}
16
- * {% variant title:Hooks %}
17
- * {% embed_file props/expand/func/main.tsx preview %}
18
- * {% embed_file props/expand/func/styles.css %}
19
- * {% endvariant %}
20
- * {% variant title:Classes %}
21
- * {% embed_file props/expand/class/main.tsx preview %}
22
- * {% embed_file props/expand/class/styles.css %}
23
- * {% endvariant %}
24
- * {% endmeta %}
25
- *
26
- */
27
- export interface ExpandProps extends AnimationInterface {
28
- /**
29
- * After the element reached 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 Expand Animation. Defaults to `vertical`.
38
- */
39
- direction?: ExpandDirection;
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
- export declare class Expand extends React.Component<ExpandProps, {}> {
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
- direction: PropTypes.Requireable<string>;
62
- component: PropTypes.Requireable<string>;
63
- id: PropTypes.Requireable<string>;
64
- style: PropTypes.Requireable<any>;
65
- };
66
- /**
67
- * @hidden
68
- */
69
- static defaultProps: {
70
- appear: boolean;
71
- enter: boolean;
72
- exit: boolean;
73
- transitionEnterDuration: number;
74
- transitionExitDuration: number;
75
- direction: string;
76
- };
77
- /**
78
- * @hidden
79
- */
80
- render(): JSX.Element;
81
- }
package/dist/es/Expand.js DELETED
@@ -1,88 +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 Expand = /** @class */ (function (_super) {
43
- __extends(Expand, _super);
44
- function Expand() {
45
- return _super !== null && _super.apply(this, arguments) || this;
46
- }
47
- /**
48
- * @hidden
49
- */
50
- Expand.prototype.render = function () {
51
- var _a = this.props, direction = _a.direction, children = _a.children, other = __rest(_a, ["direction", "children"]);
52
- var animationProps = {
53
- transitionName: "expand-".concat(direction)
54
- };
55
- return (React.createElement(Animation, __assign({}, animationProps, other), children));
56
- };
57
- /**
58
- * @hidden
59
- */
60
- Expand.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
- 'horizontal',
69
- 'vertical'
70
- ]),
71
- component: PropTypes.string,
72
- id: PropTypes.string,
73
- style: PropTypes.any
74
- };
75
- /**
76
- * @hidden
77
- */
78
- Expand.defaultProps = {
79
- appear: false,
80
- enter: true,
81
- exit: true,
82
- transitionEnterDuration: 300,
83
- transitionExitDuration: 300,
84
- direction: 'vertical'
85
- };
86
- return Expand;
87
- }(React.Component));
88
- export { Expand };