@progress/kendo-react-animation 7.2.4-develop.3 → 7.3.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.
package/Zoom.mjs ADDED
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as i from "react";
10
+ import t from "prop-types";
11
+ import { Animation as a } from "./Animation.mjs";
12
+ const p = { position: "absolute", top: "0", left: "0" }, e = class e extends i.Component {
13
+ /**
14
+ * @hidden
15
+ */
16
+ render() {
17
+ const {
18
+ children: r,
19
+ direction: o,
20
+ ...s
21
+ } = this.props;
22
+ return /* @__PURE__ */ i.createElement(
23
+ a,
24
+ {
25
+ ...s,
26
+ transitionName: `zoom-${o}`,
27
+ animationExitingStyle: this.props.stackChildren ? p : void 0
28
+ },
29
+ r
30
+ );
31
+ }
32
+ };
33
+ e.propTypes = {
34
+ children: t.oneOfType([
35
+ t.arrayOf(t.node),
36
+ t.node
37
+ ]),
38
+ childFactory: t.any,
39
+ className: t.string,
40
+ direction: t.oneOf([
41
+ "in",
42
+ "out"
43
+ ]),
44
+ component: t.string,
45
+ id: t.string,
46
+ style: t.any,
47
+ stackChildren: t.bool
48
+ }, e.defaultProps = {
49
+ appear: !1,
50
+ enter: !0,
51
+ exit: !0,
52
+ transitionEnterDuration: 300,
53
+ transitionExitDuration: 300,
54
+ direction: "out",
55
+ stackChildren: !1
56
+ };
57
+ let n = e;
58
+ export {
59
+ n as Zoom
60
+ };
@@ -1,5 +1,8 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- (function(s,k){typeof exports=="object"&&typeof module!="undefined"?k(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("react-transition-group")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","react-transition-group"],k):(s=typeof globalThis!="undefined"?globalThis:s||self,k(s.KendoReactAnimation={},s.React,s.PropTypes,s.KendoReactCommon,s.ReactTransitionGroup))})(this,function(s,k,e,u,$){"use strict";"use client";function q(a){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(i,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return i.default=a,Object.freeze(i)}const r=q(k),w={outerHeight:a=>{if(!a||!a.ownerDocument.defaultView)return 0;const t=a.ownerDocument.defaultView.getComputedStyle(a),n=parseFloat(t.marginTop),l=parseFloat(t.marginBottom);return a.offsetHeight+n+l},outerWidth:a=>{if(!a||!a.ownerDocument.defaultView)return 0;const t=a.ownerDocument.defaultView.getComputedStyle(a),n=parseFloat(t.marginLeft),l=parseFloat(t.marginRight);return a.offsetWidth+n+l},styles:{"animation-container":"k-animation-container","animation-container-shown":"k-animation-container-shown","animation-container-relative":"k-animation-container-relative","animation-container-fixed":"k-animation-container-fixed","push-right-enter":"k-push-right-enter","push-right-appear":"k-push-right-appear","push-right-enter-active":"k-push-right-enter-active","push-right-appear-active":"k-push-right-appear-active","push-right-exit":"k-push-right-exit","push-right-exit-active":"k-push-right-exit-active","push-left-enter":"k-push-left-enter","push-left-appear":"k-push-left-appear","push-left-enter-active":"k-push-left-enter-active","push-left-appear-active":"k-push-left-appear-active","push-left-exit":"k-push-left-exit","push-left-exit-active":"k-push-left-exit-active","push-down-enter":"k-push-down-enter","push-down-appear":"k-push-down-appear","push-down-enter-active":"k-push-down-enter-active","push-down-appear-active":"k-push-down-appear-active","push-down-exit":"k-push-down-exit","push-down-exit-active":"k-push-down-exit-active","push-up-enter":"k-push-up-enter","push-up-appear":"k-push-up-appear","push-up-enter-active":"k-push-up-enter-active","push-up-appear-active":"k-push-up-appear-active","push-up-exit":"k-push-up-exit","push-up-exit-active":"k-push-up-exit-active",expand:"k-expand","expand-vertical-enter":"k-expand-vertical-enter","expand-vertical-appear":"k-expand-vertical-appear","expand-vertical-enter-active":"k-expand-vertical-enter-active","expand-vertical-appear-active":"k-expand-vertical-appear-active","expand-vertical-exit":"k-expand-vertical-exit","expand-vertical-exit-active":"k-expand-vertical-exit-active","expand-horizontal-enter":"k-expand-horizontal-enter","expand-horizontal-appear":"k-expand-horizontal-appear","expand-horizontal-enter-active":"k-expand-horizontal-enter-active","expand-horizontal-appear-active":"k-expand-horizontal-appear-active","expand-horizontal-exit":"k-expand-horizontal-exit","expand-horizontal-exit-active":"k-expand-horizontal-exit-active","child-animation-container":"k-child-animation-container","fade-enter":"k-fade-enter","fade-appear":"k-fade-appear","fade-enter-active":"k-fade-enter-active","fade-appear-active":"k-fade-appear-active","fade-exit":"k-fade-exit","fade-exit-active":"k-fade-exit-active","zoom-in-enter":"k-zoom-in-enter","zoom-in-appear":"k-zoom-in-appear","zoom-in-enter-active":"k-zoom-in-enter-active","zoom-in-appear-active":"k-zoom-in-appear-active","zoom-in-exit":"k-zoom-in-exit","zoom-in-exit-active":"k-zoom-in-exit-active","zoom-out-enter":"k-zoom-out-enter","zoom-out-appear":"k-zoom-out-appear","zoom-out-enter-active":"k-zoom-out-enter-active","zoom-out-appear-active":"k-zoom-out-appear-active","zoom-out-exit":"k-zoom-out-exit","zoom-out-exit-active":"k-zoom-out-exit-active","slide-in-appear":"k-slide-in-appear",centered:"k-centered","slide-in-appear-active":"k-slide-in-appear-active","slide-down-enter":"k-slide-down-enter","slide-down-appear":"k-slide-down-appear","slide-down-enter-active":"k-slide-down-enter-active","slide-down-appear-active":"k-slide-down-appear-active","slide-down-exit":"k-slide-down-exit","slide-down-exit-active":"k-slide-down-exit-active","slide-up-enter":"k-slide-up-enter","slide-up-appear":"k-slide-up-appear","slide-up-enter-active":"k-slide-up-enter-active","slide-up-appear-active":"k-slide-up-appear-active","slide-up-exit":"k-slide-up-exit","slide-up-exit-active":"k-slide-up-exit-active","slide-right-enter":"k-slide-right-enter","slide-right-appear":"k-slide-right-appear","slide-right-enter-active":"k-slide-right-enter-active","slide-right-appear-active":"k-slide-right-appear-active","slide-right-exit":"k-slide-right-exit","slide-right-exit-active":"k-slide-right-exit-active","slide-left-enter":"k-slide-left-enter","slide-left-appear":"k-slide-left-appear","slide-left-enter-active":"k-slide-left-enter-active","slide-left-appear-active":"k-slide-left-appear-active","slide-left-exit":"k-slide-left-exit","slide-left-exit-active":"k-slide-left-exit-active","reveal-vertical-enter":"k-reveal-vertical-enter","reveal-vertical-appear":"k-reveal-vertical-appear","reveal-vertical-enter-active":"k-reveal-vertical-enter-active","reveal-vertical-appear-active":"k-reveal-vertical-appear-active","reveal-vertical-exit":"k-reveal-vertical-exit","reveal-vertical-exit-active":"k-reveal-vertical-exit-active","reveal-horizontal-enter":"k-reveal-horizontal-enter","reveal-horizontal-appear":"k-reveal-horizontal-appear","reveal-horizontal-enter-active":"k-reveal-horizontal-enter-active","reveal-horizontal-appear-active":"k-reveal-horizontal-appear-active","reveal-horizontal-exit":"k-reveal-horizontal-exit","reveal-horizontal-exit-active":"k-reveal-horizontal-exit-active"}},g=w.styles;class z extends r.Component{constructor(){super(...arguments),this.elementRef=r.createRef()}get element(){return this.elementRef.current}render(){const{children:i,style:t,appear:n,enter:l,exit:p,transitionName:o,transitionEnterDuration:d,transitionExitDuration:h,className:x,onEnter:v,onEntering:c,onEntered:E,onExit:f,onExiting:F,onExited:R,onAfterExited:W,mountOnEnter:M,unmountOnExit:_,animationEnteringStyle:K,animationEnteredStyle:L,animationExitingStyle:U,animationExitedStyle:V,...B}=this.props,G=u.classNames(x,g["child-animation-container"]),X={transitionDelay:"0ms",...t},Y={entering:{transitionDuration:`${d}ms`,...K},entered:{...L},exiting:{transitionDuration:`${h}ms`,...U},exited:{...V}},Z={in:this.props.in,appear:n,enter:l,exit:p,mountOnEnter:M,unmountOnExit:_,timeout:{enter:d,exit:h},onEnter:()=>{v&&v.call(void 0,{animatedElement:this.element,target:this})},onEntering:()=>{c&&c.call(void 0,{animatedElement:this.element,target:this})},onEntered:()=>{E&&E.call(void 0,{animatedElement:this.element,target:this})},onExit:()=>{f&&f.call(void 0,{animatedElement:this.element,target:this})},onExiting:()=>{F&&F.call(void 0,{animatedElement:this.element,target:this})},onExited:()=>{W&&W.call(void 0,{animatedElement:this.element,target:this}),R&&R.call(void 0,{animatedElement:this.element,target:this})},classNames:{appear:g[`${o}-appear`]||`${o}-appear`,appearActive:g[`${o}-appear-active`]||`${o}-appear-active`,enter:g[`${o}-enter`]||`${o}-enter`,enterActive:g[`${o}-enter-active`]||`${o}-enter-active`,exit:g[`${o}-exit`]||`${o}-exit`,exitActive:g[`${o}-exit-active`]||`${o}-exit-active`}};return r.createElement($.CSSTransition,{...Z,...B,nodeRef:this.elementRef},J=>r.createElement("div",{style:{...X,...Y[J]},className:G,ref:this.elementRef},i))}}z.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},z.defaultProps={mountOnEnter:!0,unmountOnExit:!1,onEnter:u.noop,onEntering:u.noop,onEntered:u.noop,onExit:u.noop,onExiting:u.noop,onExited:u.noop,onAfterExited:u.noop,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}};const H={name:"@progress/kendo-react-animation",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},A=w.styles;class m extends r.Component{constructor(i){super(i),u.validatePackage(H)}render(){const{id:i,style:t,children:n,component:l,className:p,childFactory:o,stackChildren:d,componentChildStyle:h,componentChildClassName:x,...v}=this.props,c={id:i,style:t,component:l,childFactory:o,className:u.classNames(A["animation-container"],A["animation-container-relative"],p)},E=r.Children.map(n||null,f=>r.createElement(z,{...v,style:h,className:x},f));return r.createElement($.TransitionGroup,{...c},E)}}m.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},m.defaultProps={component:"div"};class O extends r.Component{render(){const{children:i,...t}=this.props,n={transitionName:"fade"};return r.createElement(m,{...n,...t},i)}}O.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},O.defaultProps={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500};class N extends r.Component{render(){const{direction:i,children:t,...n}=this.props,l={transitionName:`expand-${i}`};return r.createElement(m,{...l,...n},t)}}N.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},N.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};const y={position:"absolute",top:"0",left:"0"};class D extends r.Component{render(){const{children:i,direction:t,...n}=this.props;return r.createElement(m,{...n,transitionName:`push-${t}`,animationExitingStyle:this.props.stackChildren?y:void 0},i)}}D.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},D.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1};class S extends r.Component{render(){const{direction:i,children:t,...n}=this.props,l={transitionName:`slide-${i}`};return r.createElement(m,{...l,...n},t)}}S.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},S.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"};const I={position:"absolute",top:"0",left:"0"};class b extends r.Component{render(){const{children:i,direction:t,...n}=this.props;return r.createElement(m,{...n,transitionName:`zoom-${t}`,animationExitingStyle:this.props.stackChildren?I:void 0},i)}}b.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},b.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1};class C extends r.Component{constructor(){super(...arguments),this.state={maxHeight:void 0,maxWidth:void 0},this.componentWillEnter=i=>{const{onEnter:t,onBeforeEnter:n}=this.props;n&&n.call(void 0,i),this.updateContainerDimensions(i.animatedElement,()=>{t&&t.call(void 0,i)})},this.componentIsEntering=i=>{const{onEntering:t}=this.props;this.updateContainerDimensions(i.animatedElement,()=>{t&&t.call(void 0,i)})},this.componentWillExit=i=>{const{onExit:t}=this.props;this.updateContainerDimensions(i.animatedElement,()=>{t&&t.call(void 0,i)})},this.updateContainerDimensions=(i,t=u.noop)=>{const n=i.firstChild;if(n){const l=w.outerHeight(n),p=w.outerWidth(n);this.setState({maxHeight:l,maxWidth:p},t)}}}render(){const{direction:i,children:t,childFactory:n,...l}=this.props,{maxHeight:p,maxWidth:o}=this.state;let d;i==="vertical"?d={maxHeight:p?`${p}px`:""}:d={maxWidth:o?`${o}px`:""};const h={maxHeight:d.maxHeight,maxWidth:d.maxWidth},x=v=>{let c=n?n(v):v;return c.props.in?c:r.cloneElement(c,{...c.props,style:{...c.props.style,maxHeight:d.maxHeight,maxWidth:d.maxWidth}})};return r.createElement(m,{...l,childFactory:x,onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:h,transitionName:`reveal-${i}`},t)}}C.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},C.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};const j=(a,i)=>{const t=r.useRef(0),n=r.useRef(!1),l=r.useRef(),p=o=>{const d=o.duration;let h,x,v=t.current&&1-t.current;o.onStart&&o.onStart();const c=E=>{h||(h=E),x=E-h+1;const f=x/d+v;f<=1?(o.onUpdate&&o.onUpdate(f),l.current=window.requestAnimationFrame(c),t.current=f):(o.onEnd&&o.onEnd(1),t.current=0)};l.current=window.requestAnimationFrame(c)};r.useEffect(()=>(p(a),()=>{l.current&&window.cancelAnimationFrame(l.current)}),i),r.useEffect(()=>{n.current=!0},[])};s.Animation=m,s.AnimationChild=z,s.Expand=N,s.Fade=O,s.Push=D,s.Reveal=C,s.Slide=S,s.Zoom=b,s.useAnimation=j,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(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"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactAnimation={},e.React,e.PropTypes,e.KendoReactCommon,e.ReactTransitionGroup)}(this,(function(e,t,i,n,a){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}var o=r(t);const s=e=>{if(!e||!e.ownerDocument.defaultView)return 0;const t=e.ownerDocument.defaultView.getComputedStyle(e),i=parseFloat(t.marginTop),n=parseFloat(t.marginBottom);return e.offsetHeight+i+n},p=e=>{if(!e||!e.ownerDocument.defaultView)return 0;const t=e.ownerDocument.defaultView.getComputedStyle(e),i=parseFloat(t.marginLeft),n=parseFloat(t.marginRight);return e.offsetWidth+i+n},l={"animation-container":"k-animation-container","animation-container-shown":"k-animation-container-shown","animation-container-relative":"k-animation-container-relative","animation-container-fixed":"k-animation-container-fixed","push-right-enter":"k-push-right-enter","push-right-appear":"k-push-right-appear","push-right-enter-active":"k-push-right-enter-active","push-right-appear-active":"k-push-right-appear-active","push-right-exit":"k-push-right-exit","push-right-exit-active":"k-push-right-exit-active","push-left-enter":"k-push-left-enter","push-left-appear":"k-push-left-appear","push-left-enter-active":"k-push-left-enter-active","push-left-appear-active":"k-push-left-appear-active","push-left-exit":"k-push-left-exit","push-left-exit-active":"k-push-left-exit-active","push-down-enter":"k-push-down-enter","push-down-appear":"k-push-down-appear","push-down-enter-active":"k-push-down-enter-active","push-down-appear-active":"k-push-down-appear-active","push-down-exit":"k-push-down-exit","push-down-exit-active":"k-push-down-exit-active","push-up-enter":"k-push-up-enter","push-up-appear":"k-push-up-appear","push-up-enter-active":"k-push-up-enter-active","push-up-appear-active":"k-push-up-appear-active","push-up-exit":"k-push-up-exit","push-up-exit-active":"k-push-up-exit-active",expand:"k-expand","expand-vertical-enter":"k-expand-vertical-enter","expand-vertical-appear":"k-expand-vertical-appear","expand-vertical-enter-active":"k-expand-vertical-enter-active","expand-vertical-appear-active":"k-expand-vertical-appear-active","expand-vertical-exit":"k-expand-vertical-exit","expand-vertical-exit-active":"k-expand-vertical-exit-active","expand-horizontal-enter":"k-expand-horizontal-enter","expand-horizontal-appear":"k-expand-horizontal-appear","expand-horizontal-enter-active":"k-expand-horizontal-enter-active","expand-horizontal-appear-active":"k-expand-horizontal-appear-active","expand-horizontal-exit":"k-expand-horizontal-exit","expand-horizontal-exit-active":"k-expand-horizontal-exit-active","child-animation-container":"k-child-animation-container","fade-enter":"k-fade-enter","fade-appear":"k-fade-appear","fade-enter-active":"k-fade-enter-active","fade-appear-active":"k-fade-appear-active","fade-exit":"k-fade-exit","fade-exit-active":"k-fade-exit-active","zoom-in-enter":"k-zoom-in-enter","zoom-in-appear":"k-zoom-in-appear","zoom-in-enter-active":"k-zoom-in-enter-active","zoom-in-appear-active":"k-zoom-in-appear-active","zoom-in-exit":"k-zoom-in-exit","zoom-in-exit-active":"k-zoom-in-exit-active","zoom-out-enter":"k-zoom-out-enter","zoom-out-appear":"k-zoom-out-appear","zoom-out-enter-active":"k-zoom-out-enter-active","zoom-out-appear-active":"k-zoom-out-appear-active","zoom-out-exit":"k-zoom-out-exit","zoom-out-exit-active":"k-zoom-out-exit-active","slide-in-appear":"k-slide-in-appear",centered:"k-centered","slide-in-appear-active":"k-slide-in-appear-active","slide-down-enter":"k-slide-down-enter","slide-down-appear":"k-slide-down-appear","slide-down-enter-active":"k-slide-down-enter-active","slide-down-appear-active":"k-slide-down-appear-active","slide-down-exit":"k-slide-down-exit","slide-down-exit-active":"k-slide-down-exit-active","slide-up-enter":"k-slide-up-enter","slide-up-appear":"k-slide-up-appear","slide-up-enter-active":"k-slide-up-enter-active","slide-up-appear-active":"k-slide-up-appear-active","slide-up-exit":"k-slide-up-exit","slide-up-exit-active":"k-slide-up-exit-active","slide-right-enter":"k-slide-right-enter","slide-right-appear":"k-slide-right-appear","slide-right-enter-active":"k-slide-right-enter-active","slide-right-appear-active":"k-slide-right-appear-active","slide-right-exit":"k-slide-right-exit","slide-right-exit-active":"k-slide-right-exit-active","slide-left-enter":"k-slide-left-enter","slide-left-appear":"k-slide-left-appear","slide-left-enter-active":"k-slide-left-enter-active","slide-left-appear-active":"k-slide-left-appear-active","slide-left-exit":"k-slide-left-exit","slide-left-exit-active":"k-slide-left-exit-active","reveal-vertical-enter":"k-reveal-vertical-enter","reveal-vertical-appear":"k-reveal-vertical-appear","reveal-vertical-enter-active":"k-reveal-vertical-enter-active","reveal-vertical-appear-active":"k-reveal-vertical-appear-active","reveal-vertical-exit":"k-reveal-vertical-exit","reveal-vertical-exit-active":"k-reveal-vertical-exit-active","reveal-horizontal-enter":"k-reveal-horizontal-enter","reveal-horizontal-appear":"k-reveal-horizontal-appear","reveal-horizontal-enter-active":"k-reveal-horizontal-enter-active","reveal-horizontal-appear-active":"k-reveal-horizontal-appear-active","reveal-horizontal-exit":"k-reveal-horizontal-exit","reveal-horizontal-exit-active":"k-reveal-horizontal-exit-active"},c=l,d=class extends o.Component{constructor(){super(...arguments),this.elementRef=o.createRef()}get element(){return this.elementRef.current}render(){const{children:e,style:t,appear:i,enter:r,exit:s,transitionName:p,transitionEnterDuration:l,transitionExitDuration:d,className:u,onEnter:m,onEntering:h,onEntered:v,onExit:x,onExiting:f,onExited:k,onAfterExited:g,mountOnEnter:E,unmountOnExit:y,animationEnteringStyle:z,animationEnteredStyle:w,animationExitingStyle:O,animationExitedStyle:D,...C}=this.props,b=n.classNames(u,c["child-animation-container"]),N={transitionDelay:"0ms",...t},R={entering:{transitionDuration:`${l}ms`,...z},entered:{...w},exiting:{transitionDuration:`${d}ms`,...O},exited:{...D}},T={in:this.props.in,appear:i,enter:r,exit:s,mountOnEnter:E,unmountOnExit:y,timeout:{enter:l,exit:d},onEnter:()=>{m&&m.call(void 0,{animatedElement:this.element,target:this})},onEntering:()=>{h&&h.call(void 0,{animatedElement:this.element,target:this})},onEntered:()=>{v&&v.call(void 0,{animatedElement:this.element,target:this})},onExit:()=>{x&&x.call(void 0,{animatedElement:this.element,target:this})},onExiting:()=>{f&&f.call(void 0,{animatedElement:this.element,target:this})},onExited:()=>{g&&g.call(void 0,{animatedElement:this.element,target:this}),k&&k.call(void 0,{animatedElement:this.element,target:this})},classNames:{appear:c[`${p}-appear`]||`${p}-appear`,appearActive:c[`${p}-appear-active`]||`${p}-appear-active`,enter:c[`${p}-enter`]||`${p}-enter`,enterActive:c[`${p}-enter-active`]||`${p}-enter-active`,exit:c[`${p}-exit`]||`${p}-exit`,exitActive:c[`${p}-exit-active`]||`${p}-exit-active`}};return o.createElement(a.CSSTransition,{...T,...C,nodeRef:this.elementRef},(t=>o.createElement("div",{style:{...N,...R[t]},className:b,ref:this.elementRef},e)))}};d.propTypes={in:i.bool,children:i.oneOfType([i.arrayOf(i.node),i.node]),transitionName:i.string.isRequired,className:i.string,appear:i.bool,enter:i.bool,exit:i.bool,transitionEnterDuration:i.number.isRequired,transitionExitDuration:i.number.isRequired,mountOnEnter:i.bool,unmountOnExit:i.bool,animationEnteringStyle:i.object,animationEnteredStyle:i.object,animationExitingStyle:i.object,animationExitedStyle:i.object},d.defaultProps={mountOnEnter:!0,unmountOnExit:!1,onEnter:n.noop,onEntering:n.noop,onEntered:n.noop,onExit:n.noop,onExiting:n.noop,onExited:n.noop,onAfterExited:n.noop,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}};let u=d;const m={name:"@progress/kendo-react-animation",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},h=l,v=class extends o.Component{constructor(e){super(e),n.validatePackage(m)}render(){const{id:e,style:t,children:i,component:r,className:s,childFactory:p,stackChildren:l,componentChildStyle:c,componentChildClassName:d,...m}=this.props,v={id:e,style:t,component:r,childFactory:p,className:n.classNames(h["animation-container"],h["animation-container-relative"],s)},x=o.Children.map(i||null,(e=>o.createElement(u,{...m,style:c,className:d},e)));return o.createElement(a.TransitionGroup,{...v},x)}};v.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,component:i.string,id:i.string,style:i.any,transitionName:i.string.isRequired,appear:i.bool.isRequired,enter:i.bool.isRequired,exit:i.bool.isRequired,transitionEnterDuration:i.number.isRequired,transitionExitDuration:i.number.isRequired},v.defaultProps={component:"div"};let x=v;const f=class extends o.Component{render(){const{children:e,...t}=this.props;return o.createElement(x,{transitionName:"fade",...t},e)}};f.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,component:i.string,id:i.string,style:i.any},f.defaultProps={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500};let k=f;const g=class extends o.Component{render(){const{direction:e,children:t,...i}=this.props,n={transitionName:`expand-${e}`};return o.createElement(x,{...n,...i},t)}};g.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["horizontal","vertical"]),component:i.string,id:i.string,style:i.any},g.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};let E=g;const y={position:"absolute",top:"0",left:"0"},z=class extends o.Component{render(){const{children:e,direction:t,...i}=this.props;return o.createElement(x,{...i,transitionName:`push-${t}`,animationExitingStyle:this.props.stackChildren?y:void 0},e)}};z.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["up","down","left","right"]),component:i.string,id:i.string,style:i.any,stackChildren:i.bool},z.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1};let w=z;const O=class extends o.Component{render(){const{direction:e,children:t,...i}=this.props,n={transitionName:`slide-${e}`};return o.createElement(x,{...n,...i},t)}};O.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["up","down","left","right"]),component:i.string,id:i.string,style:i.any},O.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"};let D=O;const C={position:"absolute",top:"0",left:"0"},b=class extends o.Component{render(){const{children:e,direction:t,...i}=this.props;return o.createElement(x,{...i,transitionName:`zoom-${t}`,animationExitingStyle:this.props.stackChildren?C:void 0},e)}};b.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["in","out"]),component:i.string,id:i.string,style:i.any,stackChildren:i.bool},b.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1};let N=b;const R=class extends o.Component{constructor(){super(...arguments),this.state={maxHeight:void 0,maxWidth:void 0},this.componentWillEnter=e=>{const{onEnter:t,onBeforeEnter:i}=this.props;i&&i.call(void 0,e),this.updateContainerDimensions(e.animatedElement,(()=>{t&&t.call(void 0,e)}))},this.componentIsEntering=e=>{const{onEntering:t}=this.props;this.updateContainerDimensions(e.animatedElement,(()=>{t&&t.call(void 0,e)}))},this.componentWillExit=e=>{const{onExit:t}=this.props;this.updateContainerDimensions(e.animatedElement,(()=>{t&&t.call(void 0,e)}))},this.updateContainerDimensions=(e,t=n.noop)=>{const i=e.firstChild;if(i){const e=s(i),n=p(i);this.setState({maxHeight:e,maxWidth:n},t)}}}render(){const{direction:e,children:t,childFactory:i,...n}=this.props,{maxHeight:a,maxWidth:r}=this.state;let s;s="vertical"===e?{maxHeight:a?`${a}px`:""}:{maxWidth:r?`${r}px`:""};const p={maxHeight:s.maxHeight,maxWidth:s.maxWidth};return o.createElement(x,{...n,childFactory:e=>{let t=i?i(e):e;return t.props.in?t:o.cloneElement(t,{...t.props,style:{...t.props.style,maxHeight:s.maxHeight,maxWidth:s.maxWidth}})},onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:p,transitionName:`reveal-${e}`},t)}};R.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["horizontal","vertical"]),component:i.string,id:i.string,style:i.any},R.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};let T=R;e.Animation=x,e.AnimationChild=u,e.Expand=E,e.Fade=k,e.Push=w,e.Reveal=T,e.Slide=D,e.Zoom=N,e.useAnimation=(e,t)=>{const i=o.useRef(0),n=o.useRef(!1),a=o.useRef();o.useEffect((()=>((e=>{const t=e.duration;let n,r,o=i.current&&1-i.current;e.onStart&&e.onStart();const s=p=>{n||(n=p),r=p-n+1;const l=r/t+o;l<=1?(e.onUpdate&&e.onUpdate(l),a.current=window.requestAnimationFrame(s),i.current=l):(e.onEnd&&e.onEnd(1),i.current=0)};a.current=window.requestAnimationFrame(s)})(e),()=>{a.current&&window.cancelAnimationFrame(a.current)})),t),o.useEffect((()=>{n.current=!0}),[])}}));
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react");function g(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const c=g(b),w=(t,r)=>{const e=c.useRef(0),o=c.useRef(!1),u=c.useRef(),d=n=>{const m=n.duration;let a,f,p=e.current&&1-e.current;n.onStart&&n.onStart();const i=l=>{a||(a=l),f=l-a+1;const s=f/m+p;s<=1?(n.onUpdate&&n.onUpdate(s),u.current=window.requestAnimationFrame(i),e.current=s):(n.onEnd&&n.onEnd(1),e.current=0)};u.current=window.requestAnimationFrame(i)};c.useEffect(()=>(d(t),()=>{u.current&&window.cancelAnimationFrame(u.current)}),r),c.useEffect(()=>{o.current=!0},[])};exports.useAnimation=w;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ const p = (s, i) => {
11
+ const n = t.useRef(0), m = t.useRef(!1), r = t.useRef(), d = (e) => {
12
+ const l = e.duration;
13
+ let o, u, w = n.current && 1 - n.current;
14
+ e.onStart && e.onStart();
15
+ const a = (f) => {
16
+ o || (o = f), u = f - o + 1;
17
+ const c = u / l + w;
18
+ c <= 1 ? (e.onUpdate && e.onUpdate(c), r.current = window.requestAnimationFrame(a), n.current = c) : (e.onEnd && e.onEnd(1), n.current = 0);
19
+ };
20
+ r.current = window.requestAnimationFrame(a);
21
+ };
22
+ t.useEffect(
23
+ () => (d(s), () => {
24
+ r.current && window.cancelAnimationFrame(r.current);
25
+ }),
26
+ i
27
+ ), t.useEffect(
28
+ () => {
29
+ m.current = !0;
30
+ },
31
+ []
32
+ );
33
+ };
34
+ export {
35
+ p as useAnimation
36
+ };