@progress/kendo-react-animation 11.0.0-develop.9 → 11.0.0
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/Animation.js +1 -1
- package/Animation.mjs +5 -5
- package/Expand.js +1 -1
- package/Expand.mjs +1 -1
- package/Fade.js +1 -1
- package/Fade.mjs +1 -1
- package/Push.js +1 -1
- package/Push.mjs +9 -9
- package/Reveal.js +1 -1
- package/Reveal.mjs +11 -11
- package/Slide.js +1 -1
- package/Slide.mjs +1 -1
- package/Zoom.js +1 -1
- package/Zoom.mjs +13 -13
- package/dist/cdn/js/kendo-react-animation.js +1 -1
- package/index.d.mts +14 -14
- package/index.d.ts +14 -14
- package/package.json +3 -3
package/Animation.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),e=require("prop-types"),s=require("@progress/kendo-react-common"),C=require("./AnimationChild.js"),N=require("react-transition-group");function O(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(i,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return i.default=t,Object.freeze(i)}const a=O(R),c=t=>{const{id:i,style:n,children:o,component:l="div",className:u,childFactory:d,stackChildren:A,componentChildStyle:m,componentChildClassName:p,...y}=t,b=s.useUnstyled(),r=t.unstyled||b,f=r&&r.uAnimation,h={id:i,style:n,component:l,childFactory:d,className:s.classNames(s.uAnimation.child({c:f}),u)},
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),e=require("prop-types"),s=require("@progress/kendo-react-common"),C=require("./AnimationChild.js"),N=require("react-transition-group");function O(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(i,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return i.default=t,Object.freeze(i)}const a=O(R),c=t=>{const{id:i,style:n,children:o,component:l="div",className:u,childFactory:d,stackChildren:A,componentChildStyle:m,componentChildClassName:p,...y}=t,b=s.useUnstyled(),r=t.unstyled||b,f=r&&r.uAnimation,h={id:i,style:n,component:l,childFactory:d,className:s.classNames(s.uAnimation.child({c:f}),u)},q=a.Children.map(o||null,g=>a.createElement(C.AnimationChild,{...y,unstyled:r,style:m,className:p},g));return a.createElement(N.TransitionGroup,{...h},q)};c.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,component:e.node,id:e.string,style:e.any,transitionName:e.string.isRequired,appear:e.bool.isRequired,enter:e.bool.isRequired,exit:e.bool.isRequired,transitionEnterDuration:e.number.isRequired,transitionExitDuration:e.number.isRequired};exports.Animation=c;
|
package/Animation.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import e from "prop-types";
|
|
|
10
10
|
import { useUnstyled as R, classNames as q, uAnimation as C } from "@progress/kendo-react-common";
|
|
11
11
|
import { AnimationChild as b } from "./AnimationChild.mjs";
|
|
12
12
|
import { TransitionGroup as A } from "react-transition-group";
|
|
13
|
-
const
|
|
13
|
+
const x = (i) => {
|
|
14
14
|
const {
|
|
15
15
|
id: o,
|
|
16
16
|
style: r,
|
|
@@ -18,7 +18,7 @@ const g = (i) => {
|
|
|
18
18
|
component: a = "div",
|
|
19
19
|
className: l,
|
|
20
20
|
childFactory: c,
|
|
21
|
-
stackChildren:
|
|
21
|
+
stackChildren: E,
|
|
22
22
|
componentChildStyle: m,
|
|
23
23
|
componentChildClassName: d,
|
|
24
24
|
...p
|
|
@@ -31,11 +31,11 @@ const g = (i) => {
|
|
|
31
31
|
}, f = t.Children.map(s || null, (N) => /* @__PURE__ */ t.createElement(b, { ...p, unstyled: n, style: m, className: d }, N));
|
|
32
32
|
return /* @__PURE__ */ t.createElement(A, { ...h }, f);
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
x.propTypes = {
|
|
35
35
|
children: e.oneOfType([e.arrayOf(e.node), e.node]),
|
|
36
36
|
childFactory: e.any,
|
|
37
37
|
className: e.string,
|
|
38
|
-
component: e.
|
|
38
|
+
component: e.node,
|
|
39
39
|
id: e.string,
|
|
40
40
|
style: e.any,
|
|
41
41
|
transitionName: e.string.isRequired,
|
|
@@ -46,5 +46,5 @@ g.propTypes = {
|
|
|
46
46
|
transitionExitDuration: e.number.isRequired
|
|
47
47
|
};
|
|
48
48
|
export {
|
|
49
|
-
|
|
49
|
+
x as Animation
|
|
50
50
|
};
|
package/Expand.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),t=require("prop-types"),y=require("./Animation.js");function m(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(i,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return i.default=e,Object.freeze(i)}const g=m(f),a=e=>{const{appear:i=r.appear,enter:n=r.enter,exit:o=r.exit,transitionEnterDuration:c=r.transitionEnterDuration,transitionExitDuration:s=r.transitionExitDuration,direction:u=r.direction,children:p,...l}=e,d={transitionName:`expand-${u}`};return g.createElement(y.Animation,{...d,appear:i,enter:n,exit:o,transitionEnterDuration:c,transitionExitDuration:s,...l},p)},r={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};a.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,direction:t.oneOf(["horizontal","vertical"]),component:t.
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),t=require("prop-types"),y=require("./Animation.js");function m(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(i,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return i.default=e,Object.freeze(i)}const g=m(f),a=e=>{const{appear:i=r.appear,enter:n=r.enter,exit:o=r.exit,transitionEnterDuration:c=r.transitionEnterDuration,transitionExitDuration:s=r.transitionExitDuration,direction:u=r.direction,children:p,...l}=e,d={transitionName:`expand-${u}`};return g.createElement(y.Animation,{...d,appear:i,enter:n,exit:o,transitionEnterDuration:c,transitionExitDuration:s,...l},p)},r={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};a.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,direction:t.oneOf(["horizontal","vertical"]),component:t.node,id:t.string,style:t.any};exports.Expand=a;
|
package/Expand.mjs
CHANGED
package/Fade.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),t=require("prop-types"),f=require("./Animation.js");function y(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const m=y(d),o=e=>{const{appear:r=a.appear,enter:n=a.enter,exit:i=a.exit,transitionEnterDuration:s=a.transitionEnterDuration,transitionExitDuration:c=a.transitionExitDuration,children:u,...p}=e,l={transitionName:"fade"};return m.createElement(f.Animation,{...l,appear:r,enter:n,exit:i,transitionEnterDuration:s,transitionExitDuration:c,...p},u)},a={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500};o.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,component:t.
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),t=require("prop-types"),f=require("./Animation.js");function y(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const m=y(d),o=e=>{const{appear:r=a.appear,enter:n=a.enter,exit:i=a.exit,transitionEnterDuration:s=a.transitionEnterDuration,transitionExitDuration:c=a.transitionExitDuration,children:u,...p}=e,l={transitionName:"fade"};return m.createElement(f.Animation,{...l,appear:r,enter:n,exit:i,transitionEnterDuration:s,transitionExitDuration:c,...p},u)},a={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500};o.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,component:t.node,id:t.string,style:t.any};exports.Fade=o;
|
package/Fade.mjs
CHANGED
package/Push.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),t=require("prop-types"),h=require("./Animation.js");function y(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(i,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return i.default=e,Object.freeze(i)}const g=y(f),m={position:"absolute",top:"0",left:"0"},a=e=>{const{appear:i=n.appear,enter:r=n.enter,exit:o=n.exit,transitionEnterDuration:s=n.transitionEnterDuration,transitionExitDuration:c=n.transitionExitDuration,stackChildren:l=n.stackChildren,direction:u=n.direction,children:d,...p}=e;return g.createElement(h.Animation,{appear:i,enter:r,exit:o,transitionEnterDuration:s,transitionExitDuration:c,stackChildren:l,...p,transitionName:`push-${u}`,animationExitingStyle:e.stackChildren?m:void 0},d)},n={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1};a.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,direction:t.oneOf(["up","down","left","right"]),component:t.
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),t=require("prop-types"),h=require("./Animation.js");function y(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(i,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return i.default=e,Object.freeze(i)}const g=y(f),m={position:"absolute",top:"0",left:"0"},a=e=>{const{appear:i=n.appear,enter:r=n.enter,exit:o=n.exit,transitionEnterDuration:s=n.transitionEnterDuration,transitionExitDuration:c=n.transitionExitDuration,stackChildren:l=n.stackChildren,direction:u=n.direction,children:d,...p}=e;return g.createElement(h.Animation,{appear:i,enter:r,exit:o,transitionEnterDuration:s,transitionExitDuration:c,stackChildren:l,...p,transitionName:`push-${u}`,animationExitingStyle:e.stackChildren?m:void 0},d)},n={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1};a.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,direction:t.oneOf(["up","down","left","right"]),component:t.node,id:t.string,style:t.any,stackChildren:t.bool};exports.Push=a;
|
package/Push.mjs
CHANGED
|
@@ -10,30 +10,30 @@ import t from "prop-types";
|
|
|
10
10
|
import { Animation as h } from "./Animation.mjs";
|
|
11
11
|
const m = { position: "absolute", top: "0", left: "0" }, f = (i) => {
|
|
12
12
|
const {
|
|
13
|
-
appear:
|
|
14
|
-
enter:
|
|
13
|
+
appear: e = n.appear,
|
|
14
|
+
enter: r = n.enter,
|
|
15
15
|
exit: o = n.exit,
|
|
16
16
|
transitionEnterDuration: a = n.transitionEnterDuration,
|
|
17
17
|
transitionExitDuration: s = n.transitionExitDuration,
|
|
18
18
|
stackChildren: c = n.stackChildren,
|
|
19
19
|
direction: p = n.direction,
|
|
20
|
-
children:
|
|
21
|
-
...
|
|
20
|
+
children: d,
|
|
21
|
+
...l
|
|
22
22
|
} = i;
|
|
23
23
|
return /* @__PURE__ */ u.createElement(
|
|
24
24
|
h,
|
|
25
25
|
{
|
|
26
|
-
appear:
|
|
27
|
-
enter:
|
|
26
|
+
appear: e,
|
|
27
|
+
enter: r,
|
|
28
28
|
exit: o,
|
|
29
29
|
transitionEnterDuration: a,
|
|
30
30
|
transitionExitDuration: s,
|
|
31
31
|
stackChildren: c,
|
|
32
|
-
...
|
|
32
|
+
...l,
|
|
33
33
|
transitionName: `push-${p}`,
|
|
34
34
|
animationExitingStyle: i.stackChildren ? m : void 0
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
d
|
|
37
37
|
);
|
|
38
38
|
}, n = {
|
|
39
39
|
appear: !1,
|
|
@@ -49,7 +49,7 @@ f.propTypes = {
|
|
|
49
49
|
childFactory: t.any,
|
|
50
50
|
className: t.string,
|
|
51
51
|
direction: t.oneOf(["up", "down", "left", "right"]),
|
|
52
|
-
component: t.
|
|
52
|
+
component: t.node,
|
|
53
53
|
id: t.string,
|
|
54
54
|
style: t.any,
|
|
55
55
|
stackChildren: t.bool
|
package/Reveal.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),i=require("prop-types"),F=require("./Animation.js"),x=require("./util.js");function N(e){const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),i=require("prop-types"),F=require("./Animation.js"),x=require("./util.js");function N(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const s=N(w),h=e=>{const[o,r]=s.useState(),[a,p]=s.useState(),[u,E]=s.useState({}),{appear:y=l.appear,enter:v=l.enter,exit:W=l.exit,transitionEnterDuration:O=l.transitionEnterDuration,transitionExitDuration:D=l.transitionExitDuration,direction:f=l.direction,children:H,childFactory:g,...T}=e;let c;f==="vertical"?c={maxHeight:o?`${o}px`:""}:c={maxWidth:a?`${a}px`:""};const b={maxHeight:c.maxHeight,maxWidth:c.maxWidth};s.useEffect(()=>{e&&u.name&&e[u.name]&&e[u.name].call(void 0,u.event)},[o,a,u]);const S=t=>{const{onBeforeEnter:n}=e;n&&n.call(void 0,t),m(t,"onEnter")},j=t=>{m(t,"onEntering")},P=t=>{m(t,"onExit")},m=(t,n)=>{const d=t.animatedElement.firstChild;if(d){const M=x.outerHeight(d),R=x.outerWidth(d);r(M),p(R),E({name:n,event:t})}},q=t=>{const n=g?g(t):t;return n.props.in?n:s.cloneElement(n,{...n.props,style:{...n.props.style,maxHeight:c.maxHeight,maxWidth:c.maxWidth}})};return s.createElement(F.Animation,{...T,appear:y,enter:v,exit:W,transitionEnterDuration:O,transitionExitDuration:D,childFactory:q,onEnter:S,onEntering:j,onExit:P,animationEnteringStyle:b,transitionName:`reveal-${f}`},H)},l={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};h.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["horizontal","vertical"]),component:i.node,id:i.string,style:i.any};exports.Reveal=h;
|
package/Reveal.mjs
CHANGED
|
@@ -10,19 +10,19 @@ import n from "prop-types";
|
|
|
10
10
|
import { Animation as N } from "./Animation.mjs";
|
|
11
11
|
import p from "./util.mjs";
|
|
12
12
|
const P = (a) => {
|
|
13
|
-
const [c, E] = o.useState(), [m, f] = o.useState(), [s,
|
|
14
|
-
appear:
|
|
13
|
+
const [c, E] = o.useState(), [m, f] = o.useState(), [s, u] = o.useState({}), {
|
|
14
|
+
appear: g = r.appear,
|
|
15
15
|
enter: y = r.enter,
|
|
16
16
|
exit: W = r.exit,
|
|
17
17
|
transitionEnterDuration: H = r.transitionEnterDuration,
|
|
18
18
|
transitionExitDuration: v = r.transitionExitDuration,
|
|
19
|
-
direction:
|
|
19
|
+
direction: x = r.direction,
|
|
20
20
|
children: D,
|
|
21
21
|
childFactory: h,
|
|
22
22
|
...T
|
|
23
23
|
} = a;
|
|
24
24
|
let i;
|
|
25
|
-
|
|
25
|
+
x === "vertical" ? i = { maxHeight: c ? `${c}px` : "" } : i = { maxWidth: m ? `${m}px` : "" };
|
|
26
26
|
const O = {
|
|
27
27
|
maxHeight: i.maxHeight,
|
|
28
28
|
maxWidth: i.maxWidth
|
|
@@ -38,10 +38,10 @@ const P = (a) => {
|
|
|
38
38
|
}, M = (t) => {
|
|
39
39
|
l(t, "onExit");
|
|
40
40
|
}, l = (t, e) => {
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
const w = p.outerHeight(
|
|
44
|
-
E(w), f(C),
|
|
41
|
+
const d = t.animatedElement.firstChild;
|
|
42
|
+
if (d) {
|
|
43
|
+
const w = p.outerHeight(d), C = p.outerWidth(d);
|
|
44
|
+
E(w), f(C), u({
|
|
45
45
|
name: e,
|
|
46
46
|
event: t
|
|
47
47
|
});
|
|
@@ -61,7 +61,7 @@ const P = (a) => {
|
|
|
61
61
|
N,
|
|
62
62
|
{
|
|
63
63
|
...T,
|
|
64
|
-
appear:
|
|
64
|
+
appear: g,
|
|
65
65
|
enter: y,
|
|
66
66
|
exit: W,
|
|
67
67
|
transitionEnterDuration: H,
|
|
@@ -71,7 +71,7 @@ const P = (a) => {
|
|
|
71
71
|
onEntering: F,
|
|
72
72
|
onExit: M,
|
|
73
73
|
animationEnteringStyle: O,
|
|
74
|
-
transitionName: `reveal-${
|
|
74
|
+
transitionName: `reveal-${x}`
|
|
75
75
|
},
|
|
76
76
|
D
|
|
77
77
|
);
|
|
@@ -88,7 +88,7 @@ P.propTypes = {
|
|
|
88
88
|
childFactory: n.any,
|
|
89
89
|
className: n.string,
|
|
90
90
|
direction: n.oneOf(["horizontal", "vertical"]),
|
|
91
|
-
component: n.
|
|
91
|
+
component: n.node,
|
|
92
92
|
id: n.string,
|
|
93
93
|
style: n.any
|
|
94
94
|
};
|
package/Slide.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),t=require("prop-types"),y=require("./Animation.js");function m(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(i,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return i.default=e,Object.freeze(i)}const g=m(f),a=e=>{const{appear:i=r.appear,enter:n=r.enter,exit:o=r.exit,transitionEnterDuration:c=r.transitionEnterDuration,transitionExitDuration:s=r.transitionExitDuration,direction:u=r.direction,children:l
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),t=require("prop-types"),y=require("./Animation.js");function m(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(i,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return i.default=e,Object.freeze(i)}const g=m(f),a=e=>{const{appear:i=r.appear,enter:n=r.enter,exit:o=r.exit,transitionEnterDuration:c=r.transitionEnterDuration,transitionExitDuration:s=r.transitionExitDuration,direction:u=r.direction,children:d,...l}=e,p={transitionName:`slide-${u}`};return g.createElement(y.Animation,{...p,appear:i,enter:n,exit:o,transitionEnterDuration:c,transitionExitDuration:s,...l},d)},r={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"};a.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,direction:t.oneOf(["up","down","left","right"]),component:t.node,id:t.string,style:t.any};exports.Slide=a;
|
package/Slide.mjs
CHANGED
package/Zoom.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),t=require("prop-types"),m=require("./Animation.js");function y(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>e[i]})}}return r.default=e,Object.freeze(r)}const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),t=require("prop-types"),m=require("./Animation.js");function y(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>e[i]})}}return r.default=e,Object.freeze(r)}const b=y(f),g={position:"absolute",top:"0",left:"0"},a=e=>{const{appear:r=n.appear,enter:i=n.enter,exit:o=n.exit,transitionEnterDuration:c=n.transitionEnterDuration,transitionExitDuration:s=n.transitionExitDuration,stackChildren:l=n.stackChildren,direction:u=n.direction,children:d,...p}=e;return b.createElement(m.Animation,{appear:r,enter:i,exit:o,transitionEnterDuration:c,transitionExitDuration:s,stackChildren:l,...p,transitionName:`zoom-${u}`,animationExitingStyle:e.stackChildren?g:void 0},d)},n={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1};a.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,direction:t.oneOf(["in","out"]),component:t.node,id:t.string,style:t.any,stackChildren:t.bool};exports.Zoom=a;
|
package/Zoom.mjs
CHANGED
|
@@ -10,30 +10,30 @@ import t from "prop-types";
|
|
|
10
10
|
import { Animation as u } from "./Animation.mjs";
|
|
11
11
|
const f = { position: "absolute", top: "0", left: "0" }, E = (i) => {
|
|
12
12
|
const {
|
|
13
|
-
appear:
|
|
14
|
-
enter:
|
|
15
|
-
exit:
|
|
13
|
+
appear: e = n.appear,
|
|
14
|
+
enter: o = n.enter,
|
|
15
|
+
exit: r = n.exit,
|
|
16
16
|
transitionEnterDuration: a = n.transitionEnterDuration,
|
|
17
17
|
transitionExitDuration: s = n.transitionExitDuration,
|
|
18
18
|
stackChildren: c = n.stackChildren,
|
|
19
|
-
direction:
|
|
20
|
-
children:
|
|
21
|
-
...
|
|
19
|
+
direction: d = n.direction,
|
|
20
|
+
children: l,
|
|
21
|
+
...p
|
|
22
22
|
} = i;
|
|
23
23
|
return /* @__PURE__ */ m.createElement(
|
|
24
24
|
u,
|
|
25
25
|
{
|
|
26
|
-
appear:
|
|
27
|
-
enter:
|
|
28
|
-
exit:
|
|
26
|
+
appear: e,
|
|
27
|
+
enter: o,
|
|
28
|
+
exit: r,
|
|
29
29
|
transitionEnterDuration: a,
|
|
30
30
|
transitionExitDuration: s,
|
|
31
31
|
stackChildren: c,
|
|
32
|
-
...
|
|
33
|
-
transitionName: `zoom-${
|
|
32
|
+
...p,
|
|
33
|
+
transitionName: `zoom-${d}`,
|
|
34
34
|
animationExitingStyle: i.stackChildren ? f : void 0
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
l
|
|
37
37
|
);
|
|
38
38
|
}, n = {
|
|
39
39
|
appear: !1,
|
|
@@ -49,7 +49,7 @@ E.propTypes = {
|
|
|
49
49
|
childFactory: t.any,
|
|
50
50
|
className: t.string,
|
|
51
51
|
direction: t.oneOf(["in", "out"]),
|
|
52
|
-
component: t.
|
|
52
|
+
component: t.node,
|
|
53
53
|
id: t.string,
|
|
54
54
|
style: t.any,
|
|
55
55
|
stackChildren: t.bool
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("react-transition-group")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","react-transition-group"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).KendoReactAnimation={},t.React,t.PropTypes,t.KendoReactCommon,t.ReactTransitionGroup)}(this,(function(t,n,e,i,r){"use strict";function a(t){var n=Object.create(null);return t&&Object.keys(t).forEach((function(e){if("default"!==e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})}})),n.default=t,Object.freeze(n)}var o=a(n);const s=o.forwardRef(((t,n)=>{const e=o.useRef(null),{mountOnEnter:a=c.mountOnEnter,unmountOnExit:s=c.unmountOnExit,onEnter:l=c.onEnter,onEntering:u=c.onEntering,onEntered:d=c.onEntered,onExit:m=c.onExit,onExiting:p=c.onExiting,onExited:E=c.onExited,onAfterExited:x=c.onAfterExited,animationEnteringStyle:y=c.animationEnteringStyle,animationEnteredStyle:f=c.animationEnteredStyle,animationExitingStyle:g=c.animationExitingStyle,animationExitedStyle:h=c.animationExitedStyle,children:D,style:N,appear:O,enter:v,exit:S,transitionName:b,transitionEnterDuration:A,transitionExitDuration:C,className:R,unstyled:T,...w}=t,F={transitionDelay:"0ms",...N},k=T&&T.uAnimation,q=i.classNames(R,i.uAnimation.childContainer({c:k})),j=o.useRef({element:e.current,props:t}),$=o.useRef(null);o.useImperativeHandle($,(()=>({element:e.current,props:t}))),o.useImperativeHandle(n,(()=>$.current),[]);const H={entering:{transitionDuration:`${A}ms`,...y},entered:{...f},exiting:{transitionDuration:`${C}ms`,...g},exited:{...h}},W={in:t.in,appear:O,enter:v,exit:S,mountOnEnter:a,unmountOnExit:s,timeout:{enter:A,exit:C},onEnter:()=>{l&&l.call(void 0,{animatedElement:e.current,target:$.current||j.current})},onEntering:()=>{u&&u.call(void 0,{animatedElement:e.current,target:$.current||j.current})},onEntered:()=>{d&&d.call(void 0,{animatedElement:e.current,target:$.current||j.current})},onExit:()=>{m&&m.call(void 0,{animatedElement:e.current,target:$.current||j.current})},onExiting:()=>{p&&p.call(void 0,{animatedElement:e.current,target:$.current||j.current})},onExited:()=>{x&&x.call(void 0,{animatedElement:e.current,target:$.current||j.current}),E&&E.call(void 0,{animatedElement:e.current,target:$.current||j.current})},classNames:{appear:i.classNames(i.uAnimation.appear({c:k,transitionName:b})),appearActive:i.classNames(i.uAnimation.appearActive({c:k,transitionName:b})),enter:i.classNames(i.uAnimation.enter({c:k,transitionName:b})),enterActive:i.classNames(i.uAnimation.enterActive({c:k,transitionName:b})),exit:i.classNames(i.uAnimation.exit({c:k,transitionName:b})),exitActive:i.classNames(i.uAnimation.exitActive({c:k,transitionName:b}))}};return o.createElement(r.CSSTransition,{...W,...w,nodeRef:e},(t=>o.createElement("div",{style:{...F,...H[t]},className:q,ref:t=>{e.current=t,j.current.element=t}},D)))})),c={mountOnEnter:!0,unmountOnExit:!1,onEnter:i.noop,onEntering:i.noop,onEntered:i.noop,onExit:i.noop,onExiting:i.noop,onExited:i.noop,onAfterExited:i.noop,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}};s.displayName="KendoReactAnimationChild",s.propTypes={in:e.bool,children:e.oneOfType([e.arrayOf(e.node),e.node]),transitionName:e.string.isRequired,className:e.string,appear:e.bool,enter:e.bool,exit:e.bool,transitionEnterDuration:e.number.isRequired,transitionExitDuration:e.number.isRequired,mountOnEnter:e.bool,unmountOnExit:e.bool,animationEnteringStyle:e.object,animationEnteredStyle:e.object,animationExitingStyle:e.object,animationExitedStyle:e.object};const l=t=>{const{id:n,style:e,children:a,component:c="div",className:l,childFactory:u,stackChildren:d,componentChildStyle:m,componentChildClassName:p,...E}=t,x=i.useUnstyled(),y=t.unstyled||x,f=y&&y.uAnimation,g={id:n,style:e,component:c,childFactory:u,className:i.classNames(i.uAnimation.child({c:f}),l)},h=o.Children.map(a||null,(t=>o.createElement(s,{...E,unstyled:y,style:m,className:p},t)));return o.createElement(r.TransitionGroup,{...g},h)};l.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,component:e.string,id:e.string,style:e.any,transitionName:e.string.isRequired,appear:e.bool.isRequired,enter:e.bool.isRequired,exit:e.bool.isRequired,transitionEnterDuration:e.number.isRequired,transitionExitDuration:e.number.isRequired};const u=t=>{const{appear:n=d.appear,enter:e=d.enter,exit:i=d.exit,transitionEnterDuration:r=d.transitionEnterDuration,transitionExitDuration:a=d.transitionExitDuration,children:s,...c}=t;return o.createElement(l,{transitionName:"fade",appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,...c},s)},d={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500};u.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,component:e.string,id:e.string,style:e.any};const m=t=>{const{appear:n=p.appear,enter:e=p.enter,exit:i=p.exit,transitionEnterDuration:r=p.transitionEnterDuration,transitionExitDuration:a=p.transitionExitDuration,direction:s=p.direction,children:c,...u}=t,d={transitionName:`expand-${s}`};return o.createElement(l,{...d,appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,...u},c)},p={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};m.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,direction:e.oneOf(["horizontal","vertical"]),component:e.string,id:e.string,style:e.any};const E={position:"absolute",top:"0",left:"0"},x=t=>{const{appear:n=y.appear,enter:e=y.enter,exit:i=y.exit,transitionEnterDuration:r=y.transitionEnterDuration,transitionExitDuration:a=y.transitionExitDuration,stackChildren:s=y.stackChildren,direction:c=y.direction,children:u,...d}=t;return o.createElement(l,{appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,stackChildren:s,...d,transitionName:`push-${c}`,animationExitingStyle:t.stackChildren?E:void 0},u)},y={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1};x.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,direction:e.oneOf(["up","down","left","right"]),component:e.string,id:e.string,style:e.any,stackChildren:e.bool};const f=t=>{const{appear:n=g.appear,enter:e=g.enter,exit:i=g.exit,transitionEnterDuration:r=g.transitionEnterDuration,transitionExitDuration:a=g.transitionExitDuration,direction:s=g.direction,children:c,...u}=t,d={transitionName:`slide-${s}`};return o.createElement(l,{...d,appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,...u},c)},g={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"};f.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,direction:e.oneOf(["up","down","left","right"]),component:e.string,id:e.string,style:e.any};const h={position:"absolute",top:"0",left:"0"},D=t=>{const{appear:n=N.appear,enter:e=N.enter,exit:i=N.exit,transitionEnterDuration:r=N.transitionEnterDuration,transitionExitDuration:a=N.transitionExitDuration,stackChildren:s=N.stackChildren,direction:c=N.direction,children:u,...d}=t;return o.createElement(l,{appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,stackChildren:s,...d,transitionName:`zoom-${c}`,animationExitingStyle:t.stackChildren?h:void 0},u)},N={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1};D.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,direction:e.oneOf(["in","out"]),component:e.string,id:e.string,style:e.any,stackChildren:e.bool};const O=t=>{if(!t||!t.ownerDocument.defaultView)return 0;const n=t.ownerDocument.defaultView.getComputedStyle(t),e=parseFloat(n.marginTop),i=parseFloat(n.marginBottom);return t.offsetHeight+e+i},v=t=>{if(!t||!t.ownerDocument.defaultView)return 0;const n=t.ownerDocument.defaultView.getComputedStyle(t),e=parseFloat(n.marginLeft),i=parseFloat(n.marginRight);return t.offsetWidth+e+i},S=(i.animationStyles,t=>{const[n,e]=o.useState(),[i,r]=o.useState(),[a,s]=o.useState({}),{appear:c=b.appear,enter:u=b.enter,exit:d=b.exit,transitionEnterDuration:m=b.transitionEnterDuration,transitionExitDuration:p=b.transitionExitDuration,direction:E=b.direction,children:x,childFactory:y,...f}=t;let g;g="vertical"===E?{maxHeight:n?`${n}px`:""}:{maxWidth:i?`${i}px`:""};const h={maxHeight:g.maxHeight,maxWidth:g.maxWidth};o.useEffect((()=>{t&&a.name&&t[a.name]&&t[a.name].call(void 0,a.event)}),[n,i,a]);const D=(t,n)=>{const i=t.animatedElement.firstChild;if(i){const a=O(i),o=v(i);e(a),r(o),s({name:n,event:t})}};return o.createElement(l,{...f,appear:c,enter:u,exit:d,transitionEnterDuration:m,transitionExitDuration:p,childFactory:t=>{const n=y?y(t):t;return n.props.in?n:o.cloneElement(n,{...n.props,style:{...n.props.style,maxHeight:g.maxHeight,maxWidth:g.maxWidth}})},onEnter:n=>{const{onBeforeEnter:e}=t;e&&e.call(void 0,n),D(n,"onEnter")},onEntering:t=>{D(t,"onEntering")},onExit:t=>{D(t,"onExit")},animationEnteringStyle:h,transitionName:`reveal-${E}`},x)}),b={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};S.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,direction:e.oneOf(["horizontal","vertical"]),component:e.string,id:e.string,style:e.any};t.Animation=l,t.AnimationChild=s,t.Expand=m,t.Fade=u,t.Push=x,t.Reveal=S,t.Slide=f,t.Zoom=D,t.useAnimation=(t,n)=>{const e=o.useRef(0),i=o.useRef(!1),r=o.useRef(null);o.useEffect((()=>((t=>{const n=t.duration;let i,a;const o=e.current&&1-e.current;t.onStart&&t.onStart();const s=c=>{i||(i=c),a=c-i+1;const l=a/n+o;l<=1?(t.onUpdate&&t.onUpdate(l),r.current=window.requestAnimationFrame(s),e.current=l):(t.onEnd&&t.onEnd(1),e.current=0)};r.current=window.requestAnimationFrame(s)})(t),()=>{r.current&&window.cancelAnimationFrame(r.current)})),n),o.useEffect((()=>{i.current=!0}),[])}}));
|
|
15
|
+
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("react-transition-group")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","react-transition-group"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).KendoReactAnimation={},t.React,t.PropTypes,t.KendoReactCommon,t.ReactTransitionGroup)}(this,(function(t,n,e,i,r){"use strict";function a(t){var n=Object.create(null);return t&&Object.keys(t).forEach((function(e){if("default"!==e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})}})),n.default=t,Object.freeze(n)}var o=a(n);const s=o.forwardRef(((t,n)=>{const e=o.useRef(null),{mountOnEnter:a=c.mountOnEnter,unmountOnExit:s=c.unmountOnExit,onEnter:l=c.onEnter,onEntering:u=c.onEntering,onEntered:d=c.onEntered,onExit:m=c.onExit,onExiting:p=c.onExiting,onExited:E=c.onExited,onAfterExited:x=c.onAfterExited,animationEnteringStyle:y=c.animationEnteringStyle,animationEnteredStyle:f=c.animationEnteredStyle,animationExitingStyle:g=c.animationExitingStyle,animationExitedStyle:h=c.animationExitedStyle,children:D,style:N,appear:O,enter:v,exit:S,transitionName:b,transitionEnterDuration:A,transitionExitDuration:C,className:R,unstyled:T,...w}=t,F={transitionDelay:"0ms",...N},k=T&&T.uAnimation,q=i.classNames(R,i.uAnimation.childContainer({c:k})),j=o.useRef({element:e.current,props:t}),$=o.useRef(null);o.useImperativeHandle($,(()=>({element:e.current,props:t}))),o.useImperativeHandle(n,(()=>$.current),[]);const H={entering:{transitionDuration:`${A}ms`,...y},entered:{...f},exiting:{transitionDuration:`${C}ms`,...g},exited:{...h}},W={in:t.in,appear:O,enter:v,exit:S,mountOnEnter:a,unmountOnExit:s,timeout:{enter:A,exit:C},onEnter:()=>{l&&l.call(void 0,{animatedElement:e.current,target:$.current||j.current})},onEntering:()=>{u&&u.call(void 0,{animatedElement:e.current,target:$.current||j.current})},onEntered:()=>{d&&d.call(void 0,{animatedElement:e.current,target:$.current||j.current})},onExit:()=>{m&&m.call(void 0,{animatedElement:e.current,target:$.current||j.current})},onExiting:()=>{p&&p.call(void 0,{animatedElement:e.current,target:$.current||j.current})},onExited:()=>{x&&x.call(void 0,{animatedElement:e.current,target:$.current||j.current}),E&&E.call(void 0,{animatedElement:e.current,target:$.current||j.current})},classNames:{appear:i.classNames(i.uAnimation.appear({c:k,transitionName:b})),appearActive:i.classNames(i.uAnimation.appearActive({c:k,transitionName:b})),enter:i.classNames(i.uAnimation.enter({c:k,transitionName:b})),enterActive:i.classNames(i.uAnimation.enterActive({c:k,transitionName:b})),exit:i.classNames(i.uAnimation.exit({c:k,transitionName:b})),exitActive:i.classNames(i.uAnimation.exitActive({c:k,transitionName:b}))}};return o.createElement(r.CSSTransition,{...W,...w,nodeRef:e},(t=>o.createElement("div",{style:{...F,...H[t]},className:q,ref:t=>{e.current=t,j.current.element=t}},D)))})),c={mountOnEnter:!0,unmountOnExit:!1,onEnter:i.noop,onEntering:i.noop,onEntered:i.noop,onExit:i.noop,onExiting:i.noop,onExited:i.noop,onAfterExited:i.noop,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}};s.displayName="KendoReactAnimationChild",s.propTypes={in:e.bool,children:e.oneOfType([e.arrayOf(e.node),e.node]),transitionName:e.string.isRequired,className:e.string,appear:e.bool,enter:e.bool,exit:e.bool,transitionEnterDuration:e.number.isRequired,transitionExitDuration:e.number.isRequired,mountOnEnter:e.bool,unmountOnExit:e.bool,animationEnteringStyle:e.object,animationEnteredStyle:e.object,animationExitingStyle:e.object,animationExitedStyle:e.object};const l=t=>{const{id:n,style:e,children:a,component:c="div",className:l,childFactory:u,stackChildren:d,componentChildStyle:m,componentChildClassName:p,...E}=t,x=i.useUnstyled(),y=t.unstyled||x,f=y&&y.uAnimation,g={id:n,style:e,component:c,childFactory:u,className:i.classNames(i.uAnimation.child({c:f}),l)},h=o.Children.map(a||null,(t=>o.createElement(s,{...E,unstyled:y,style:m,className:p},t)));return o.createElement(r.TransitionGroup,{...g},h)};l.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,component:e.node,id:e.string,style:e.any,transitionName:e.string.isRequired,appear:e.bool.isRequired,enter:e.bool.isRequired,exit:e.bool.isRequired,transitionEnterDuration:e.number.isRequired,transitionExitDuration:e.number.isRequired};const u=t=>{const{appear:n=d.appear,enter:e=d.enter,exit:i=d.exit,transitionEnterDuration:r=d.transitionEnterDuration,transitionExitDuration:a=d.transitionExitDuration,children:s,...c}=t;return o.createElement(l,{transitionName:"fade",appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,...c},s)},d={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500};u.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,component:e.node,id:e.string,style:e.any};const m=t=>{const{appear:n=p.appear,enter:e=p.enter,exit:i=p.exit,transitionEnterDuration:r=p.transitionEnterDuration,transitionExitDuration:a=p.transitionExitDuration,direction:s=p.direction,children:c,...u}=t,d={transitionName:`expand-${s}`};return o.createElement(l,{...d,appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,...u},c)},p={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};m.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,direction:e.oneOf(["horizontal","vertical"]),component:e.node,id:e.string,style:e.any};const E={position:"absolute",top:"0",left:"0"},x=t=>{const{appear:n=y.appear,enter:e=y.enter,exit:i=y.exit,transitionEnterDuration:r=y.transitionEnterDuration,transitionExitDuration:a=y.transitionExitDuration,stackChildren:s=y.stackChildren,direction:c=y.direction,children:u,...d}=t;return o.createElement(l,{appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,stackChildren:s,...d,transitionName:`push-${c}`,animationExitingStyle:t.stackChildren?E:void 0},u)},y={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1};x.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,direction:e.oneOf(["up","down","left","right"]),component:e.node,id:e.string,style:e.any,stackChildren:e.bool};const f=t=>{const{appear:n=g.appear,enter:e=g.enter,exit:i=g.exit,transitionEnterDuration:r=g.transitionEnterDuration,transitionExitDuration:a=g.transitionExitDuration,direction:s=g.direction,children:c,...u}=t,d={transitionName:`slide-${s}`};return o.createElement(l,{...d,appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,...u},c)},g={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"};f.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,direction:e.oneOf(["up","down","left","right"]),component:e.node,id:e.string,style:e.any};const h={position:"absolute",top:"0",left:"0"},D=t=>{const{appear:n=N.appear,enter:e=N.enter,exit:i=N.exit,transitionEnterDuration:r=N.transitionEnterDuration,transitionExitDuration:a=N.transitionExitDuration,stackChildren:s=N.stackChildren,direction:c=N.direction,children:u,...d}=t;return o.createElement(l,{appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,stackChildren:s,...d,transitionName:`zoom-${c}`,animationExitingStyle:t.stackChildren?h:void 0},u)},N={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1};D.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,direction:e.oneOf(["in","out"]),component:e.node,id:e.string,style:e.any,stackChildren:e.bool};const O=t=>{if(!t||!t.ownerDocument.defaultView)return 0;const n=t.ownerDocument.defaultView.getComputedStyle(t),e=parseFloat(n.marginTop),i=parseFloat(n.marginBottom);return t.offsetHeight+e+i},v=t=>{if(!t||!t.ownerDocument.defaultView)return 0;const n=t.ownerDocument.defaultView.getComputedStyle(t),e=parseFloat(n.marginLeft),i=parseFloat(n.marginRight);return t.offsetWidth+e+i},S=(i.animationStyles,t=>{const[n,e]=o.useState(),[i,r]=o.useState(),[a,s]=o.useState({}),{appear:c=b.appear,enter:u=b.enter,exit:d=b.exit,transitionEnterDuration:m=b.transitionEnterDuration,transitionExitDuration:p=b.transitionExitDuration,direction:E=b.direction,children:x,childFactory:y,...f}=t;let g;g="vertical"===E?{maxHeight:n?`${n}px`:""}:{maxWidth:i?`${i}px`:""};const h={maxHeight:g.maxHeight,maxWidth:g.maxWidth};o.useEffect((()=>{t&&a.name&&t[a.name]&&t[a.name].call(void 0,a.event)}),[n,i,a]);const D=(t,n)=>{const i=t.animatedElement.firstChild;if(i){const a=O(i),o=v(i);e(a),r(o),s({name:n,event:t})}};return o.createElement(l,{...f,appear:c,enter:u,exit:d,transitionEnterDuration:m,transitionExitDuration:p,childFactory:t=>{const n=y?y(t):t;return n.props.in?n:o.cloneElement(n,{...n.props,style:{...n.props.style,maxHeight:g.maxHeight,maxWidth:g.maxWidth}})},onEnter:n=>{const{onBeforeEnter:e}=t;e&&e.call(void 0,n),D(n,"onEnter")},onEntering:t=>{D(t,"onEntering")},onExit:t=>{D(t,"onExit")},animationEnteringStyle:h,transitionName:`reveal-${E}`},x)}),b={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};S.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,direction:e.oneOf(["horizontal","vertical"]),component:e.node,id:e.string,style:e.any};t.Animation=l,t.AnimationChild=s,t.Expand=m,t.Fade=u,t.Push=x,t.Reveal=S,t.Slide=f,t.Zoom=D,t.useAnimation=(t,n)=>{const e=o.useRef(0),i=o.useRef(!1),r=o.useRef(null);o.useEffect((()=>((t=>{const n=t.duration;let i,a;const o=e.current&&1-e.current;t.onStart&&t.onStart();const s=c=>{i||(i=c),a=c-i+1;const l=a/n+o;l<=1?(t.onUpdate&&t.onUpdate(l),r.current=window.requestAnimationFrame(s),e.current=l):(t.onEnd&&t.onEnd(1),e.current=0)};r.current=window.requestAnimationFrame(s)})(t),()=>{r.current&&window.cancelAnimationFrame(r.current)})),n),o.useEffect((()=>{i.current=!0}),[])}}));
|
package/index.d.mts
CHANGED
|
@@ -16,7 +16,7 @@ declare const Animation_2: {
|
|
|
16
16
|
children: default_2.Requireable<NonNullable<default_2.ReactNodeLike>>;
|
|
17
17
|
childFactory: default_2.Requireable<any>;
|
|
18
18
|
className: default_2.Requireable<string>;
|
|
19
|
-
component: default_2.Requireable<
|
|
19
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
20
20
|
id: default_2.Requireable<string>;
|
|
21
21
|
style: default_2.Requireable<any>;
|
|
22
22
|
transitionName: default_2.Validator<string>;
|
|
@@ -236,7 +236,7 @@ export declare interface AnimationProps extends AnimationInterface {
|
|
|
236
236
|
* @example
|
|
237
237
|
* <Animation component="main" />
|
|
238
238
|
*/
|
|
239
|
-
component?:
|
|
239
|
+
component?: React_2.ReactNode;
|
|
240
240
|
/**
|
|
241
241
|
* Specifies the `id` attribute of the Animation container.
|
|
242
242
|
*
|
|
@@ -309,7 +309,7 @@ export declare const Expand: {
|
|
|
309
309
|
childFactory: default_2.Requireable<any>;
|
|
310
310
|
className: default_2.Requireable<string>;
|
|
311
311
|
direction: default_2.Requireable<string>;
|
|
312
|
-
component: default_2.Requireable<
|
|
312
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
313
313
|
id: default_2.Requireable<string>;
|
|
314
314
|
style: default_2.Requireable<any>;
|
|
315
315
|
};
|
|
@@ -356,7 +356,7 @@ export declare interface ExpandProps extends AnimationInterface {
|
|
|
356
356
|
* @example
|
|
357
357
|
* <Expand component="nav" />
|
|
358
358
|
*/
|
|
359
|
-
component?:
|
|
359
|
+
component?: React_2.ReactNode;
|
|
360
360
|
/**
|
|
361
361
|
* Specifies the `id` attribute of the Animation container.
|
|
362
362
|
*
|
|
@@ -379,7 +379,7 @@ export declare const Fade: {
|
|
|
379
379
|
children: default_2.Requireable<NonNullable<default_2.ReactNodeLike>>;
|
|
380
380
|
childFactory: default_2.Requireable<any>;
|
|
381
381
|
className: default_2.Requireable<string>;
|
|
382
|
-
component: default_2.Requireable<
|
|
382
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
383
383
|
id: default_2.Requireable<string>;
|
|
384
384
|
style: default_2.Requireable<any>;
|
|
385
385
|
};
|
|
@@ -409,7 +409,7 @@ export declare interface FadeProps extends AnimationInterface {
|
|
|
409
409
|
* @example
|
|
410
410
|
* <Fade component="header" />
|
|
411
411
|
*/
|
|
412
|
-
component?:
|
|
412
|
+
component?: React_2.ReactNode;
|
|
413
413
|
/**
|
|
414
414
|
* Specifies the `id` attribute of the Animation container.
|
|
415
415
|
*
|
|
@@ -433,7 +433,7 @@ export declare const Push: {
|
|
|
433
433
|
childFactory: default_2.Requireable<any>;
|
|
434
434
|
className: default_2.Requireable<string>;
|
|
435
435
|
direction: default_2.Requireable<string>;
|
|
436
|
-
component: default_2.Requireable<
|
|
436
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
437
437
|
id: default_2.Requireable<string>;
|
|
438
438
|
style: default_2.Requireable<any>;
|
|
439
439
|
stackChildren: default_2.Requireable<boolean>;
|
|
@@ -482,7 +482,7 @@ export declare interface PushProps extends AnimationInterface {
|
|
|
482
482
|
* @example
|
|
483
483
|
* <Push component="footer" />
|
|
484
484
|
*/
|
|
485
|
-
component?:
|
|
485
|
+
component?: React_2.ReactNode;
|
|
486
486
|
/**
|
|
487
487
|
* Specifies the `id` attribute of the Animation container.
|
|
488
488
|
*
|
|
@@ -513,7 +513,7 @@ export declare const Reveal: {
|
|
|
513
513
|
childFactory: default_2.Requireable<any>;
|
|
514
514
|
className: default_2.Requireable<string>;
|
|
515
515
|
direction: default_2.Requireable<string>;
|
|
516
|
-
component: default_2.Requireable<
|
|
516
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
517
517
|
id: default_2.Requireable<string>;
|
|
518
518
|
style: default_2.Requireable<any>;
|
|
519
519
|
};
|
|
@@ -559,7 +559,7 @@ export declare interface RevealProps extends AnimationInterface {
|
|
|
559
559
|
* @example
|
|
560
560
|
* <Reveal component="aside" />
|
|
561
561
|
*/
|
|
562
|
-
component?:
|
|
562
|
+
component?: React_2.ReactNode;
|
|
563
563
|
/**
|
|
564
564
|
* Specifies the `id` attribute of the Animation container.
|
|
565
565
|
*
|
|
@@ -588,7 +588,7 @@ export declare const Slide: {
|
|
|
588
588
|
childFactory: default_2.Requireable<any>;
|
|
589
589
|
className: default_2.Requireable<string>;
|
|
590
590
|
direction: default_2.Requireable<string>;
|
|
591
|
-
component: default_2.Requireable<
|
|
591
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
592
592
|
id: default_2.Requireable<string>;
|
|
593
593
|
style: default_2.Requireable<any>;
|
|
594
594
|
};
|
|
@@ -636,7 +636,7 @@ export declare interface SlideProps extends AnimationInterface {
|
|
|
636
636
|
* @example
|
|
637
637
|
* <Slide component="article" />
|
|
638
638
|
*/
|
|
639
|
-
component?:
|
|
639
|
+
component?: React_2.ReactNode;
|
|
640
640
|
/**
|
|
641
641
|
* Specifies the `id` attribute of the Animation container.
|
|
642
642
|
*
|
|
@@ -663,7 +663,7 @@ export declare const Zoom: {
|
|
|
663
663
|
childFactory: default_2.Requireable<any>;
|
|
664
664
|
className: default_2.Requireable<string>;
|
|
665
665
|
direction: default_2.Requireable<string>;
|
|
666
|
-
component: default_2.Requireable<
|
|
666
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
667
667
|
id: default_2.Requireable<string>;
|
|
668
668
|
style: default_2.Requireable<any>;
|
|
669
669
|
stackChildren: default_2.Requireable<boolean>;
|
|
@@ -710,7 +710,7 @@ export declare interface ZoomProps extends AnimationInterface {
|
|
|
710
710
|
* @example
|
|
711
711
|
* <Zoom component="section" />
|
|
712
712
|
*/
|
|
713
|
-
component?:
|
|
713
|
+
component?: React_2.ReactNode;
|
|
714
714
|
/**
|
|
715
715
|
* Specifies the `id` attribute of the Animation container.
|
|
716
716
|
*
|
package/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ declare const Animation_2: {
|
|
|
16
16
|
children: default_2.Requireable<NonNullable<default_2.ReactNodeLike>>;
|
|
17
17
|
childFactory: default_2.Requireable<any>;
|
|
18
18
|
className: default_2.Requireable<string>;
|
|
19
|
-
component: default_2.Requireable<
|
|
19
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
20
20
|
id: default_2.Requireable<string>;
|
|
21
21
|
style: default_2.Requireable<any>;
|
|
22
22
|
transitionName: default_2.Validator<string>;
|
|
@@ -236,7 +236,7 @@ export declare interface AnimationProps extends AnimationInterface {
|
|
|
236
236
|
* @example
|
|
237
237
|
* <Animation component="main" />
|
|
238
238
|
*/
|
|
239
|
-
component?:
|
|
239
|
+
component?: React_2.ReactNode;
|
|
240
240
|
/**
|
|
241
241
|
* Specifies the `id` attribute of the Animation container.
|
|
242
242
|
*
|
|
@@ -309,7 +309,7 @@ export declare const Expand: {
|
|
|
309
309
|
childFactory: default_2.Requireable<any>;
|
|
310
310
|
className: default_2.Requireable<string>;
|
|
311
311
|
direction: default_2.Requireable<string>;
|
|
312
|
-
component: default_2.Requireable<
|
|
312
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
313
313
|
id: default_2.Requireable<string>;
|
|
314
314
|
style: default_2.Requireable<any>;
|
|
315
315
|
};
|
|
@@ -356,7 +356,7 @@ export declare interface ExpandProps extends AnimationInterface {
|
|
|
356
356
|
* @example
|
|
357
357
|
* <Expand component="nav" />
|
|
358
358
|
*/
|
|
359
|
-
component?:
|
|
359
|
+
component?: React_2.ReactNode;
|
|
360
360
|
/**
|
|
361
361
|
* Specifies the `id` attribute of the Animation container.
|
|
362
362
|
*
|
|
@@ -379,7 +379,7 @@ export declare const Fade: {
|
|
|
379
379
|
children: default_2.Requireable<NonNullable<default_2.ReactNodeLike>>;
|
|
380
380
|
childFactory: default_2.Requireable<any>;
|
|
381
381
|
className: default_2.Requireable<string>;
|
|
382
|
-
component: default_2.Requireable<
|
|
382
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
383
383
|
id: default_2.Requireable<string>;
|
|
384
384
|
style: default_2.Requireable<any>;
|
|
385
385
|
};
|
|
@@ -409,7 +409,7 @@ export declare interface FadeProps extends AnimationInterface {
|
|
|
409
409
|
* @example
|
|
410
410
|
* <Fade component="header" />
|
|
411
411
|
*/
|
|
412
|
-
component?:
|
|
412
|
+
component?: React_2.ReactNode;
|
|
413
413
|
/**
|
|
414
414
|
* Specifies the `id` attribute of the Animation container.
|
|
415
415
|
*
|
|
@@ -433,7 +433,7 @@ export declare const Push: {
|
|
|
433
433
|
childFactory: default_2.Requireable<any>;
|
|
434
434
|
className: default_2.Requireable<string>;
|
|
435
435
|
direction: default_2.Requireable<string>;
|
|
436
|
-
component: default_2.Requireable<
|
|
436
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
437
437
|
id: default_2.Requireable<string>;
|
|
438
438
|
style: default_2.Requireable<any>;
|
|
439
439
|
stackChildren: default_2.Requireable<boolean>;
|
|
@@ -482,7 +482,7 @@ export declare interface PushProps extends AnimationInterface {
|
|
|
482
482
|
* @example
|
|
483
483
|
* <Push component="footer" />
|
|
484
484
|
*/
|
|
485
|
-
component?:
|
|
485
|
+
component?: React_2.ReactNode;
|
|
486
486
|
/**
|
|
487
487
|
* Specifies the `id` attribute of the Animation container.
|
|
488
488
|
*
|
|
@@ -513,7 +513,7 @@ export declare const Reveal: {
|
|
|
513
513
|
childFactory: default_2.Requireable<any>;
|
|
514
514
|
className: default_2.Requireable<string>;
|
|
515
515
|
direction: default_2.Requireable<string>;
|
|
516
|
-
component: default_2.Requireable<
|
|
516
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
517
517
|
id: default_2.Requireable<string>;
|
|
518
518
|
style: default_2.Requireable<any>;
|
|
519
519
|
};
|
|
@@ -559,7 +559,7 @@ export declare interface RevealProps extends AnimationInterface {
|
|
|
559
559
|
* @example
|
|
560
560
|
* <Reveal component="aside" />
|
|
561
561
|
*/
|
|
562
|
-
component?:
|
|
562
|
+
component?: React_2.ReactNode;
|
|
563
563
|
/**
|
|
564
564
|
* Specifies the `id` attribute of the Animation container.
|
|
565
565
|
*
|
|
@@ -588,7 +588,7 @@ export declare const Slide: {
|
|
|
588
588
|
childFactory: default_2.Requireable<any>;
|
|
589
589
|
className: default_2.Requireable<string>;
|
|
590
590
|
direction: default_2.Requireable<string>;
|
|
591
|
-
component: default_2.Requireable<
|
|
591
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
592
592
|
id: default_2.Requireable<string>;
|
|
593
593
|
style: default_2.Requireable<any>;
|
|
594
594
|
};
|
|
@@ -636,7 +636,7 @@ export declare interface SlideProps extends AnimationInterface {
|
|
|
636
636
|
* @example
|
|
637
637
|
* <Slide component="article" />
|
|
638
638
|
*/
|
|
639
|
-
component?:
|
|
639
|
+
component?: React_2.ReactNode;
|
|
640
640
|
/**
|
|
641
641
|
* Specifies the `id` attribute of the Animation container.
|
|
642
642
|
*
|
|
@@ -663,7 +663,7 @@ export declare const Zoom: {
|
|
|
663
663
|
childFactory: default_2.Requireable<any>;
|
|
664
664
|
className: default_2.Requireable<string>;
|
|
665
665
|
direction: default_2.Requireable<string>;
|
|
666
|
-
component: default_2.Requireable<
|
|
666
|
+
component: default_2.Requireable<default_2.ReactNodeLike>;
|
|
667
667
|
id: default_2.Requireable<string>;
|
|
668
668
|
style: default_2.Requireable<any>;
|
|
669
669
|
stackChildren: default_2.Requireable<boolean>;
|
|
@@ -710,7 +710,7 @@ export declare interface ZoomProps extends AnimationInterface {
|
|
|
710
710
|
* @example
|
|
711
711
|
* <Zoom component="section" />
|
|
712
712
|
*/
|
|
713
|
-
component?:
|
|
713
|
+
component?: React_2.ReactNode;
|
|
714
714
|
/**
|
|
715
715
|
* Specifies the `id` attribute of the Animation container.
|
|
716
716
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-animation",
|
|
3
|
-
"version": "11.0.0
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "React Animation component assists with animating HTML elements. KendoReact Animation package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@progress/kendo-licensing": "^1.
|
|
29
|
-
"@progress/kendo-react-common": "11.0.0
|
|
28
|
+
"@progress/kendo-licensing": "^1.6.0",
|
|
29
|
+
"@progress/kendo-react-common": "11.0.0",
|
|
30
30
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
31
31
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
32
32
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|