@progress/kendo-react-animation
Advanced tools
Comparing version 9.0.0-develop.2 to 9.0.0-develop.3
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),e=require("prop-types"),s=require("@progress/kendo-react-common"),C=require("./AnimationChild.js"),R=require("react-transition-group"),N=require("./package-metadata.js");function O(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>r[n]})}}return t.default=r,Object.freeze(t)}const i=O(q),c=class c extends i.Component{constructor(t){super(t),s.validatePackage(N.packageMetadata)}render(){const{id:t,style:n,children:o,component:l,className:u,childFactory:d,stackChildren:T,componentChildStyle:p,componentChildClassName:m,...y}=this.props,h=this.context&&this.context.uAnimation,g={id:t,style:n,component:l,childFactory:d,className:s.classNames(s.uAnimation.child({c:h}),u)},b=i.Children.map(o||null,f=>i.createElement(C.AnimationChild,{...y,style:p,className:m},f));return i.createElement(R.TransitionGroup,{...g},b)}};c.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},c.defaultProps={component:"div"};let a=c;a.contextType=s.UnstyledContext;exports.Animation=a; | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),e=require("prop-types"),r=require("@progress/kendo-react-common"),C=require("./AnimationChild.js"),N=require("react-transition-group"),O=require("./package-metadata.js");function A(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 s=A(R),c=t=>{r.validatePackage(O.packageMetadata);const{id:i,style:n,children:o,component:l="div",className:u,childFactory:d,stackChildren:T,componentChildStyle:m,componentChildClassName:y,...p}=t,g=r.useUnstyled()||t.unstyled,a=t.unstyled||g,b=a&&a.uAnimation,f={id:i,style:n,component:l,childFactory:d,className:r.classNames(r.uAnimation.child({c:b}),u)},h=s.Children.map(o||null,q=>s.createElement(C.AnimationChild,{...p,unstyled:a,style:m,className:y},q));return s.createElement(N.TransitionGroup,{...f},h)};c.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};exports.Animation=c; |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),e=require("prop-types"),t=require("@progress/kendo-react-common"),w=require("react-transition-group");function z(a){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const i in a)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(a,i);Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:()=>a[i]})}}return r.default=a,Object.freeze(r)}const l=z($),c=class c extends l.Component{constructor(){super(...arguments),this.elementRef=l.createRef()}get element(){return this.elementRef.current}render(){const{children:r,style:i,appear:s,enter:b,exit:S,transitionName:o,transitionEnterDuration:u,transitionExitDuration:d,className:v,onEnter:E,onEntering:p,onEntered:x,onExit:g,onExiting:f,onExited:y,onAfterExited:h,mountOnEnter:A,unmountOnExit:N,animationEnteringStyle:O,animationEnteredStyle:R,animationExitingStyle:j,animationExitedStyle:D,...T}=this.props,n=this.context&&this.context.uAnimation,q=t.classNames(v,t.uAnimation.childContainer({c:n})),P={transitionDelay:"0ms",...i},C={entering:{transitionDuration:`${u}ms`,...O},entered:{...R},exiting:{transitionDuration:`${d}ms`,...j},exited:{...D}},k={in:this.props.in,appear:s,enter:b,exit:S,mountOnEnter:A,unmountOnExit:N,timeout:{enter:u,exit:d},onEnter:()=>{E&&E.call(void 0,{animatedElement:this.element,target:this})},onEntering:()=>{p&&p.call(void 0,{animatedElement:this.element,target:this})},onEntered:()=>{x&&x.call(void 0,{animatedElement:this.element,target:this})},onExit:()=>{g&&g.call(void 0,{animatedElement:this.element,target:this})},onExiting:()=>{f&&f.call(void 0,{animatedElement:this.element,target:this})},onExited:()=>{h&&h.call(void 0,{animatedElement:this.element,target:this}),y&&y.call(void 0,{animatedElement:this.element,target:this})},classNames:{appear:t.classNames(t.uAnimation.appear({c:n,transitionName:o})),appearActive:t.classNames(t.uAnimation.appearActive({c:n,transitionName:o})),enter:t.classNames(t.uAnimation.enter({c:n,transitionName:o})),enterActive:t.classNames(t.uAnimation.enterActive({c:n,transitionName:o})),exit:t.classNames(t.uAnimation.exit({c:n,transitionName:o})),exitActive:t.classNames(t.uAnimation.exitActive({c:n,transitionName:o}))}};return l.createElement(w.CSSTransition,{...k,...T,nodeRef:this.elementRef},M=>l.createElement("div",{style:{...P,...C[M]},className:q,ref:this.elementRef},r))}};c.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},c.defaultProps={mountOnEnter:!0,unmountOnExit:!1,onEnter:t.noop,onEntering:t.noop,onEntered:t.noop,onExit:t.noop,onExiting:t.noop,onExited:t.noop,onAfterExited:t.noop,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}};let m=c;m.contextType=t.UnstyledContext;exports.AnimationChild=m; | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),t=require("prop-types"),n=require("@progress/kendo-react-common"),B=require("react-transition-group");function F(r){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const m=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(s,e,m.get?m:{enumerable:!0,get:()=>r[e]})}}return s.default=r,Object.freeze(s)}const c=F(G),d=c.forwardRef((r,s)=>{const e=c.useRef(null),{mountOnEnter:m=i.mountOnEnter,unmountOnExit:O=i.unmountOnExit,onEnter:E=i.onEnter,onEntering:x=i.onEntering,onEntered:g=i.onEntered,onExit:f=i.onExit,onExiting:p=i.onExiting,onExited:y=i.onExited,onAfterExited:S=i.onAfterExited,animationEnteringStyle:R=i.animationEnteringStyle,animationEnteredStyle:j=i.animationEnteredStyle,animationExitingStyle:D=i.animationExitingStyle,animationExitedStyle:h=i.animationExitedStyle,children:C,style:T,appear:q,enter:P,exit:_,transitionName:u,transitionEnterDuration:A,transitionExitDuration:b,className:k,unstyled:v,...w}=r,H={transitionDelay:"0ms",...T},l=v&&v.uAnimation,I=n.classNames(k,n.uAnimation.childContainer({c:l})),o=c.useRef({element:e.current,props:r}),a=c.useRef(null);c.useImperativeHandle(a,()=>({element:e.current,props:r})),c.useImperativeHandle(s,()=>a.current,[]);const M={entering:{transitionDuration:`${A}ms`,...R},entered:{...j},exiting:{transitionDuration:`${b}ms`,...D},exited:{...h}},$={in:r.in,appear:q,enter:P,exit:_,mountOnEnter:m,unmountOnExit:O,timeout:{enter:A,exit:b},onEnter:()=>{E&&E.call(void 0,{animatedElement:e.current,target:a.current||o.current})},onEntering:()=>{x&&x.call(void 0,{animatedElement:e.current,target:a.current||o.current})},onEntered:()=>{g&&g.call(void 0,{animatedElement:e.current,target:a.current||o.current})},onExit:()=>{f&&f.call(void 0,{animatedElement:e.current,target:a.current||o.current})},onExiting:()=>{p&&p.call(void 0,{animatedElement:e.current,target:a.current||o.current})},onExited:()=>{S&&S.call(void 0,{animatedElement:e.current,target:a.current||o.current}),y&&y.call(void 0,{animatedElement:e.current,target:a.current||o.current})},classNames:{appear:n.classNames(n.uAnimation.appear({c:l,transitionName:u})),appearActive:n.classNames(n.uAnimation.appearActive({c:l,transitionName:u})),enter:n.classNames(n.uAnimation.enter({c:l,transitionName:u})),enterActive:n.classNames(n.uAnimation.enterActive({c:l,transitionName:u})),exit:n.classNames(n.uAnimation.exit({c:l,transitionName:u})),exitActive:n.classNames(n.uAnimation.exitActive({c:l,transitionName:u}))}};return c.createElement(B.CSSTransition,{...$,...w,nodeRef:e},z=>c.createElement("div",{style:{...H,...M[z]},className:I,ref:N=>{e.current=N,o.current.element=N}},C))}),i={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:{}};d.displayName="AnimationChild";d.propTypes={in:t.bool,children:t.oneOfType([t.arrayOf(t.node),t.node]),transitionName:t.string.isRequired,className:t.string,appear:t.bool,enter:t.bool,exit:t.bool,transitionEnterDuration:t.number.isRequired,transitionExitDuration:t.number.isRequired,mountOnEnter:t.bool,unmountOnExit:t.bool,animationEnteringStyle:t.object,animationEnteredStyle:t.object,animationExitingStyle:t.object,animationExitedStyle:t.object};exports.AnimationChild=d; |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(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"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).KendoReactAnimation={},t.React,t.PropTypes,t.KendoReactCommon,t.ReactTransitionGroup)}(this,(function(t,e,n,i,o){"use strict";function r(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var a=r(e);const s=class extends a.Component{constructor(){super(...arguments),this.elementRef=a.createRef()}get element(){return this.elementRef.current}render(){const{children:t,style:e,appear:n,enter:r,exit:s,transitionName:c,transitionEnterDuration:l,transitionExitDuration:d,className:m,onEnter:p,onEntering:u,onEntered:h,onExit:E,onExiting:y,onExited:x,onAfterExited:f,mountOnEnter:g,unmountOnExit:N,animationEnteringStyle:O,animationEnteredStyle:v,animationExitingStyle:C,animationExitedStyle:D,...b}=this.props,T=this.context&&this.context.uAnimation,A=i.classNames(m,i.uAnimation.childContainer({c:T})),R={transitionDelay:"0ms",...e},S={entering:{transitionDuration:`${l}ms`,...O},entered:{...v},exiting:{transitionDuration:`${d}ms`,...C},exited:{...D}},w={in:this.props.in,appear:n,enter:r,exit:s,mountOnEnter:g,unmountOnExit:N,timeout:{enter:l,exit:d},onEnter:()=>{p&&p.call(void 0,{animatedElement:this.element,target:this})},onEntering:()=>{u&&u.call(void 0,{animatedElement:this.element,target:this})},onEntered:()=>{h&&h.call(void 0,{animatedElement:this.element,target:this})},onExit:()=>{E&&E.call(void 0,{animatedElement:this.element,target:this})},onExiting:()=>{y&&y.call(void 0,{animatedElement:this.element,target:this})},onExited:()=>{f&&f.call(void 0,{animatedElement:this.element,target:this}),x&&x.call(void 0,{animatedElement:this.element,target:this})},classNames:{appear:i.classNames(i.uAnimation.appear({c:T,transitionName:c})),appearActive:i.classNames(i.uAnimation.appearActive({c:T,transitionName:c})),enter:i.classNames(i.uAnimation.enter({c:T,transitionName:c})),enterActive:i.classNames(i.uAnimation.enterActive({c:T,transitionName:c})),exit:i.classNames(i.uAnimation.exit({c:T,transitionName:c})),exitActive:i.classNames(i.uAnimation.exitActive({c:T,transitionName:c}))}};return a.createElement(o.CSSTransition,{...w,...b,nodeRef:this.elementRef},(e=>a.createElement("div",{style:{...R,...S[e]},className:A,ref:this.elementRef},t)))}};s.propTypes={in:n.bool,children:n.oneOfType([n.arrayOf(n.node),n.node]),transitionName:n.string.isRequired,className:n.string,appear:n.bool,enter:n.bool,exit:n.bool,transitionEnterDuration:n.number.isRequired,transitionExitDuration:n.number.isRequired,mountOnEnter:n.bool,unmountOnExit:n.bool,animationEnteringStyle:n.object,animationEnteredStyle:n.object,animationExitingStyle:n.object,animationExitedStyle:n.object},s.defaultProps={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:{}};let c=s;c.contextType=i.UnstyledContext;const l={name:"@progress/kendo-react-animation",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},d=class extends a.Component{constructor(t){super(t),i.validatePackage(l)}render(){const{id:t,style:e,children:n,component:r,className:s,childFactory:l,stackChildren:d,componentChildStyle:m,componentChildClassName:p,...u}=this.props,h=this.context&&this.context.uAnimation,E={id:t,style:e,component:r,childFactory:l,className:i.classNames(i.uAnimation.child({c:h}),s)},y=a.Children.map(n||null,(t=>a.createElement(c,{...u,style:m,className:p},t)));return a.createElement(o.TransitionGroup,{...E},y)}};d.propTypes={children:n.oneOfType([n.arrayOf(n.node),n.node]),childFactory:n.any,className:n.string,component:n.string,id:n.string,style:n.any,transitionName:n.string.isRequired,appear:n.bool.isRequired,enter:n.bool.isRequired,exit:n.bool.isRequired,transitionEnterDuration:n.number.isRequired,transitionExitDuration:n.number.isRequired},d.defaultProps={component:"div"};let m=d;m.contextType=i.UnstyledContext;const p=class extends a.Component{render(){const{children:t,...e}=this.props;return a.createElement(m,{transitionName:"fade",...e},t)}};p.propTypes={children:n.oneOfType([n.arrayOf(n.node),n.node]),childFactory:n.any,className:n.string,component:n.string,id:n.string,style:n.any},p.defaultProps={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500};let u=p;const h=class extends a.Component{render(){const{direction:t,children:e,...n}=this.props,i={transitionName:`expand-${t}`};return a.createElement(m,{...i,...n},e)}};h.propTypes={children:n.oneOfType([n.arrayOf(n.node),n.node]),childFactory:n.any,className:n.string,direction:n.oneOf(["horizontal","vertical"]),component:n.string,id:n.string,style:n.any},h.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};let E=h;const y={position:"absolute",top:"0",left:"0"},x=class extends a.Component{render(){const{children:t,direction:e,...n}=this.props;return a.createElement(m,{...n,transitionName:`push-${e}`,animationExitingStyle:this.props.stackChildren?y:void 0},t)}};x.propTypes={children:n.oneOfType([n.arrayOf(n.node),n.node]),childFactory:n.any,className:n.string,direction:n.oneOf(["up","down","left","right"]),component:n.string,id:n.string,style:n.any,stackChildren:n.bool},x.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1};let f=x;const g=class extends a.Component{render(){const{direction:t,children:e,...n}=this.props,i={transitionName:`slide-${t}`};return a.createElement(m,{...i,...n},e)}};g.propTypes={children:n.oneOfType([n.arrayOf(n.node),n.node]),childFactory:n.any,className:n.string,direction:n.oneOf(["up","down","left","right"]),component:n.string,id:n.string,style:n.any},g.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"};let N=g;const O={position:"absolute",top:"0",left:"0"},v=class extends a.Component{render(){const{children:t,direction:e,...n}=this.props;return a.createElement(m,{...n,transitionName:`zoom-${e}`,animationExitingStyle:this.props.stackChildren?O:void 0},t)}};v.propTypes={children:n.oneOfType([n.arrayOf(n.node),n.node]),childFactory:n.any,className:n.string,direction:n.oneOf(["in","out"]),component:n.string,id:n.string,style:n.any,stackChildren:n.bool},v.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1};let C=v;const D=t=>{if(!t||!t.ownerDocument.defaultView)return 0;const e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop),i=parseFloat(e.marginBottom);return t.offsetHeight+n+i},b=t=>{if(!t||!t.ownerDocument.defaultView)return 0;const e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginLeft),i=parseFloat(e.marginRight);return t.offsetWidth+n+i},T=(i.animationStyles,class extends a.Component{constructor(){super(...arguments),this.state={maxHeight:void 0,maxWidth:void 0},this.componentWillEnter=t=>{const{onEnter:e,onBeforeEnter:n}=this.props;n&&n.call(void 0,t),this.updateContainerDimensions(t.animatedElement,(()=>{e&&e.call(void 0,t)}))},this.componentIsEntering=t=>{const{onEntering:e}=this.props;this.updateContainerDimensions(t.animatedElement,(()=>{e&&e.call(void 0,t)}))},this.componentWillExit=t=>{const{onExit:e}=this.props;this.updateContainerDimensions(t.animatedElement,(()=>{e&&e.call(void 0,t)}))},this.updateContainerDimensions=(t,e=i.noop)=>{const n=t.firstChild;if(n){const t=D(n),i=b(n);this.setState({maxHeight:t,maxWidth:i},e)}}}render(){const{direction:t,children:e,childFactory:n,...i}=this.props,{maxHeight:o,maxWidth:r}=this.state;let s;s="vertical"===t?{maxHeight:o?`${o}px`:""}:{maxWidth:r?`${r}px`:""};const c={maxHeight:s.maxHeight,maxWidth:s.maxWidth};return a.createElement(m,{...i,childFactory:t=>{let e=n?n(t):t;return e.props.in?e:a.cloneElement(e,{...e.props,style:{...e.props.style,maxHeight:s.maxHeight,maxWidth:s.maxWidth}})},onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:c,transitionName:`reveal-${t}`},e)}});T.propTypes={children:n.oneOfType([n.arrayOf(n.node),n.node]),childFactory:n.any,className:n.string,direction:n.oneOf(["horizontal","vertical"]),component:n.string,id:n.string,style:n.any},T.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};let A=T;t.Animation=m,t.AnimationChild=c,t.Expand=E,t.Fade=u,t.Push=f,t.Reveal=A,t.Slide=N,t.Zoom=C,t.useAnimation=(t,e)=>{const n=a.useRef(0),i=a.useRef(!1),o=a.useRef();a.useEffect((()=>((t=>{const e=t.duration;let i,r,a=n.current&&1-n.current;t.onStart&&t.onStart();const s=c=>{i||(i=c),r=c-i+1;const l=r/e+a;l<=1?(t.onUpdate&&t.onUpdate(l),o.current=window.requestAnimationFrame(s),n.current=l):(t.onEnd&&t.onEnd(1),n.current=0)};o.current=window.requestAnimationFrame(s)})(t),()=>{o.current&&window.cancelAnimationFrame(o.current)})),e),a.useEffect((()=>{i.current=!0}),[])}})); | ||
!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:g=c.animationEnteredStyle,animationExitingStyle:f=c.animationExitingStyle,animationExitedStyle:h=c.animationExitedStyle,children:D,style:N,appear:O,enter:v,exit:b,transitionName:S,transitionEnterDuration:A,transitionExitDuration:C,className:R,unstyled:T,...w}=t,k={transitionDelay:"0ms",...N},F=T&&T.uAnimation,q=i.classNames(R,i.uAnimation.childContainer({c:F})),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:{...g},exiting:{transitionDuration:`${C}ms`,...f},exited:{...h}},P={in:t.in,appear:O,enter:v,exit:b,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:F,transitionName:S})),appearActive:i.classNames(i.uAnimation.appearActive({c:F,transitionName:S})),enter:i.classNames(i.uAnimation.enter({c:F,transitionName:S})),enterActive:i.classNames(i.uAnimation.enterActive({c:F,transitionName:S})),exit:i.classNames(i.uAnimation.exit({c:F,transitionName:S})),exitActive:i.classNames(i.uAnimation.exitActive({c:F,transitionName:S}))}};return o.createElement(r.CSSTransition,{...P,...w,nodeRef:e},(t=>o.createElement("div",{style:{...k,...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="AnimationChild",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={name:"@progress/kendo-react-animation",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},u=t=>{i.validatePackage(l);const{id:n,style:e,children:a,component:c="div",className:u,childFactory:d,stackChildren:m,componentChildStyle:p,componentChildClassName:E,...x}=t,y=i.useUnstyled()||t.unstyled,g=t.unstyled||y,f=g&&g.uAnimation,h={id:n,style:e,component:c,childFactory:d,className:i.classNames(i.uAnimation.child({c:f}),u)},D=o.Children.map(a||null,(t=>o.createElement(s,{...x,unstyled:g,style:p,className:E},t)));return o.createElement(r.TransitionGroup,{...h},D)};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,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 d=t=>{const{appear:n=m.appear,enter:e=m.enter,exit:i=m.exit,transitionEnterDuration:r=m.transitionEnterDuration,transitionExitDuration:a=m.transitionExitDuration,children:s,...c}=t;return o.createElement(u,{transitionName:"fade",appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,...c},s)},m={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500};d.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 p=t=>{const{appear:n=E.appear,enter:e=E.enter,exit:i=E.exit,transitionEnterDuration:r=E.transitionEnterDuration,transitionExitDuration:a=E.transitionExitDuration,direction:s=E.direction,children:c,...l}=t,d={transitionName:`expand-${s}`};return o.createElement(u,{...d,appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,...l},c)},E={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};p.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 x={position:"absolute",top:"0",left:"0"},y=t=>{const{appear:n=g.appear,enter:e=g.enter,exit:i=g.exit,transitionEnterDuration:r=g.transitionEnterDuration,transitionExitDuration:a=g.transitionExitDuration,stackChildren:s=g.stackChildren,direction:c=g.direction,children:l,...d}=t;return o.createElement(u,{appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,stackChildren:s,...d,transitionName:`push-${c}`,animationExitingStyle:t.stackChildren?x:void 0},l)},g={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1};y.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=h.appear,enter:e=h.enter,exit:i=h.exit,transitionEnterDuration:r=h.transitionEnterDuration,transitionExitDuration:a=h.transitionExitDuration,direction:s=h.direction,children:c,...l}=t,d={transitionName:`slide-${s}`};return o.createElement(u,{...d,appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,...l},c)},h={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 D={position:"absolute",top:"0",left:"0"},N=t=>{const{appear:n=O.appear,enter:e=O.enter,exit:i=O.exit,transitionEnterDuration:r=O.transitionEnterDuration,transitionExitDuration:a=O.transitionExitDuration,stackChildren:s=O.stackChildren,direction:c=O.direction,children:l,...d}=t;return o.createElement(u,{appear:n,enter:e,exit:i,transitionEnterDuration:r,transitionExitDuration:a,stackChildren:s,...d,transitionName:`zoom-${c}`,animationExitingStyle:t.stackChildren?D:void 0},l)},O={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1};N.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 v=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},b=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=A.appear,enter:l=A.enter,exit:d=A.exit,transitionEnterDuration:m=A.transitionEnterDuration,transitionExitDuration:p=A.transitionExitDuration,direction:E=A.direction,children:x,childFactory:y,...g}=t;let f;f="vertical"===E?{maxHeight:n?`${n}px`:""}:{maxWidth:i?`${i}px`:""};const h={maxHeight:f.maxHeight,maxWidth:f.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=v(i),o=b(i);e(a),r(o),s({name:n,event:t})}};return o.createElement(u,{...g,appear:c,enter:l,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:f.maxHeight,maxWidth:f.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)}),A={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=u,t.AnimationChild=s,t.Expand=p,t.Fade=d,t.Push=y,t.Reveal=S,t.Slide=f,t.Zoom=N,t.useAnimation=(t,n)=>{const e=o.useRef(0),i=o.useRef(!1),r=o.useRef();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}),[])}})); |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),e=require("prop-types"),u=require("./Animation.js");function p(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:()=>n[t]})}}return r.default=n,Object.freeze(r)}const c=p(l),o=class o extends c.Component{render(){const{direction:r,children:t,...i}=this.props,s={transitionName:`expand-${r}`};return c.createElement(u.Animation,{...s,...i},t)}};o.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},o.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};let a=o;exports.Expand=a; | ||
"use client";"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.string,id:t.string,style:t.any};exports.Expand=a; |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),e=require("prop-types"),l=require("./Animation.js");function u(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>n[t]})}}return r.default=n,Object.freeze(r)}const s=u(c),i=class i extends s.Component{render(){const{children:r,...t}=this.props,o={transitionName:"fade"};return s.createElement(l.Animation,{...o,...t},r)}};i.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},i.defaultProps={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500};let a=i;exports.Fade=a; | ||
"use client";"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 a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const m=y(d),o=e=>{const{appear:r=i.appear,enter:n=i.enter,exit:a=i.exit,transitionEnterDuration:s=i.transitionEnterDuration,transitionExitDuration:c=i.transitionExitDuration,children:u,...l}=e,p={transitionName:"fade"};return m.createElement(f.Animation,{...p,appear:r,enter:n,exit:a,transitionEnterDuration:s,transitionExitDuration:c,...l},u)},i={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.string,id:t.string,style:t.any};exports.Fade=o; |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
"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; | ||
"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;const 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; |
255
index.d.ts
@@ -8,2 +8,3 @@ /** | ||
*/ | ||
import { AnimationsClassStructure } from '@progress/kendo-react-common'; | ||
import { JSX as JSX_2 } from 'react/jsx-runtime'; | ||
@@ -13,7 +14,5 @@ import PropTypes from 'prop-types'; | ||
declare class Animation_2 extends React_2.Component<AnimationProps, {}> { | ||
/** | ||
* @hidden | ||
*/ | ||
static propTypes: { | ||
declare const Animation_2: { | ||
(props: AnimationProps): JSX_2.Element; | ||
propTypes: { | ||
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; | ||
@@ -32,64 +31,19 @@ childFactory: PropTypes.Requireable<any>; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
static defaultProps: { | ||
component: string; | ||
}; | ||
constructor(props: AnimationProps); | ||
/** | ||
* @hidden | ||
*/ | ||
render(): JSX_2.Element; | ||
} | ||
}; | ||
export { Animation_2 as Animation } | ||
export declare class AnimationChild extends React_2.Component<AnimationChildProps, {}> { | ||
export declare const AnimationChild: React_2.ForwardRefExoticComponent<AnimationChildProps & React_2.RefAttributes<AnimationChildHandle | null>>; | ||
/** | ||
* Represents the AnimationChild handle. | ||
*/ | ||
export declare interface AnimationChildHandle { | ||
/** | ||
* @hidden | ||
* Gets the element. | ||
*/ | ||
static propTypes: { | ||
in: PropTypes.Requireable<boolean>; | ||
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; | ||
transitionName: PropTypes.Validator<string>; | ||
className: PropTypes.Requireable<string>; | ||
appear: PropTypes.Requireable<boolean>; | ||
enter: PropTypes.Requireable<boolean>; | ||
exit: PropTypes.Requireable<boolean>; | ||
transitionEnterDuration: PropTypes.Validator<number>; | ||
transitionExitDuration: PropTypes.Validator<number>; | ||
mountOnEnter: PropTypes.Requireable<boolean>; | ||
unmountOnExit: PropTypes.Requireable<boolean>; | ||
animationEnteringStyle: PropTypes.Requireable<object>; | ||
animationEnteredStyle: PropTypes.Requireable<object>; | ||
animationExitingStyle: PropTypes.Requireable<object>; | ||
animationExitedStyle: PropTypes.Requireable<object>; | ||
}; | ||
element: HTMLDivElement | null; | ||
/** | ||
* @hidden | ||
* Gets the props. | ||
*/ | ||
static defaultProps: { | ||
mountOnEnter: boolean; | ||
unmountOnExit: boolean; | ||
onEnter: () => void; | ||
onEntering: () => void; | ||
onEntered: () => void; | ||
onExit: () => void; | ||
onExiting: () => void; | ||
onExited: () => void; | ||
onAfterExited: () => void; | ||
animationEnteringStyle: {}; | ||
animationEnteredStyle: {}; | ||
animationExitingStyle: {}; | ||
animationExitedStyle: {}; | ||
}; | ||
private elementRef; | ||
/** | ||
* The element that is being animated. | ||
*/ | ||
get element(): HTMLDivElement | null; | ||
/** | ||
* @hidden | ||
*/ | ||
render(): JSX_2.Element; | ||
props: AnimationChildProps; | ||
} | ||
@@ -133,2 +87,6 @@ | ||
animationExitedStyle?: any; | ||
/** | ||
* The unstyled option classes. | ||
*/ | ||
unstyled?: AnimationsClassStructure; | ||
} | ||
@@ -157,3 +115,3 @@ | ||
*/ | ||
target: AnimationChild; | ||
target: AnimationChildHandle; | ||
} | ||
@@ -284,9 +242,11 @@ | ||
animationExitedStyle?: any; | ||
/** | ||
* The unstyled option classes. | ||
*/ | ||
unstyled?: AnimationsClassStructure; | ||
} | ||
export declare class Expand extends React_2.Component<ExpandProps, {}> { | ||
/** | ||
* @hidden | ||
*/ | ||
static propTypes: { | ||
export declare const Expand: { | ||
(props: ExpandProps): JSX_2.Element; | ||
propTypes: { | ||
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; | ||
@@ -300,18 +260,3 @@ childFactory: PropTypes.Requireable<any>; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
static defaultProps: { | ||
appear: boolean; | ||
enter: boolean; | ||
exit: boolean; | ||
transitionEnterDuration: number; | ||
transitionExitDuration: number; | ||
direction: string; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
render(): JSX_2.Element; | ||
} | ||
}; | ||
@@ -364,7 +309,5 @@ /** | ||
export declare class Fade extends React_2.Component<FadeProps, {}> { | ||
/** | ||
* @hidden | ||
*/ | ||
static propTypes: { | ||
export declare const Fade: { | ||
(props: FadeProps): JSX_2.Element; | ||
propTypes: { | ||
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; | ||
@@ -377,17 +320,3 @@ childFactory: PropTypes.Requireable<any>; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
static defaultProps: { | ||
appear: boolean; | ||
enter: boolean; | ||
exit: boolean; | ||
transitionEnterDuration: number; | ||
transitionExitDuration: number; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
render(): JSX_2.Element; | ||
} | ||
}; | ||
@@ -427,7 +356,5 @@ /** | ||
export declare class Push extends React_2.Component<PushProps, {}> { | ||
/** | ||
* @hidden | ||
*/ | ||
static propTypes: { | ||
export declare const Push: { | ||
(props: PushProps): JSX_2.Element; | ||
propTypes: { | ||
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; | ||
@@ -442,19 +369,3 @@ childFactory: PropTypes.Requireable<any>; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
static defaultProps: { | ||
appear: boolean; | ||
enter: boolean; | ||
exit: boolean; | ||
transitionEnterDuration: number; | ||
transitionExitDuration: number; | ||
direction: string; | ||
stackChildren: boolean; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
render(): JSX_2.Element; | ||
} | ||
}; | ||
@@ -513,7 +424,5 @@ /** | ||
export declare class Reveal extends React_2.Component<RevealProps, RevealState> { | ||
/** | ||
* @hidden | ||
*/ | ||
static propTypes: { | ||
export declare const Reveal: { | ||
(props: RevealProps): JSX_2.Element; | ||
propTypes: { | ||
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; | ||
@@ -527,26 +436,3 @@ childFactory: PropTypes.Requireable<any>; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
static defaultProps: { | ||
appear: boolean; | ||
enter: boolean; | ||
exit: boolean; | ||
transitionEnterDuration: number; | ||
transitionExitDuration: number; | ||
direction: string; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
readonly state: RevealState; | ||
/** | ||
* @hidden | ||
*/ | ||
render(): JSX_2.Element; | ||
private componentWillEnter; | ||
private componentIsEntering; | ||
private componentWillExit; | ||
private updateContainerDimensions; | ||
} | ||
}; | ||
@@ -604,15 +490,5 @@ /** | ||
/** | ||
* @hidden | ||
*/ | ||
declare interface RevealState { | ||
maxHeight?: number; | ||
maxWidth?: number; | ||
} | ||
export declare class Slide extends React_2.Component<SlideProps, {}> { | ||
/** | ||
* @hidden | ||
*/ | ||
static propTypes: { | ||
export declare const Slide: { | ||
(props: SlideProps): JSX_2.Element; | ||
propTypes: { | ||
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; | ||
@@ -626,18 +502,3 @@ childFactory: PropTypes.Requireable<any>; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
static defaultProps: { | ||
appear: boolean; | ||
enter: boolean; | ||
exit: boolean; | ||
transitionEnterDuration: number; | ||
transitionExitDuration: number; | ||
direction: string; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
render(): JSX_2.Element; | ||
} | ||
}; | ||
@@ -695,7 +556,5 @@ /** | ||
export declare class Zoom extends React_2.Component<ZoomProps, {}> { | ||
/** | ||
* @hidden | ||
*/ | ||
static propTypes: { | ||
export declare const Zoom: { | ||
(props: ZoomProps): JSX_2.Element; | ||
propTypes: { | ||
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; | ||
@@ -710,19 +569,3 @@ childFactory: PropTypes.Requireable<any>; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
static defaultProps: { | ||
appear: boolean; | ||
enter: boolean; | ||
exit: boolean; | ||
transitionEnterDuration: number; | ||
transitionExitDuration: number; | ||
direction: string; | ||
stackChildren: boolean; | ||
}; | ||
/** | ||
* @hidden | ||
*/ | ||
render(): JSX_2.Element; | ||
} | ||
}; | ||
@@ -762,3 +605,3 @@ /** | ||
/** | ||
* Specifies the node type of the parent Asnimation. Defaults to `div`. | ||
* Specifies the node type of the parent Animation. Defaults to `div`. | ||
*/ | ||
@@ -765,0 +608,0 @@ component?: string; |
{ | ||
"name": "@progress/kendo-react-animation", | ||
"version": "9.0.0-develop.2", | ||
"version": "9.0.0-develop.3", | ||
"description": "React Animation component assists with animating HTML elements. KendoReact Animation package", | ||
@@ -26,3 +26,3 @@ "author": "Progress", | ||
"@progress/kendo-licensing": "^1.3.4", | ||
"@progress/kendo-react-common": "9.0.0-develop.2", | ||
"@progress/kendo-react-common": "9.0.0-develop.3", | ||
"@progress/kendo-svg-icons": "^3.0.0", | ||
@@ -29,0 +29,0 @@ "react": "^16.8.2 || ^17.0.0 || ^18.0.0", |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),t=require("prop-types"),l=require("./Animation.js");function p(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>n[e]})}}return r.default=n,Object.freeze(r)}const s=p(c),d={position:"absolute",top:"0",left:"0"},o=class o extends s.Component{render(){const{children:r,direction:e,...i}=this.props;return s.createElement(l.Animation,{...i,transitionName:`push-${e}`,animationExitingStyle:this.props.stackChildren?d:void 0},r)}};o.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.string,id:t.string,style:t.any,stackChildren:t.bool},o.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1};let a=o;exports.Push=a; | ||
"use client";"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 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 g=y(f),m={position:"absolute",top:"0",left:"0"},a=e=>{const{appear:r=n.appear,enter:i=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:r,enter:i,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.string,id:t.string,style:t.any,stackChildren:t.bool};exports.Push=a; |
@@ -8,7 +8,8 @@ <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"> | ||
> **Important** | ||
> * This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—a commercial UI library. | ||
> * You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation). | ||
> * To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation). | ||
> * The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team! | ||
> | ||
> - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—a commercial UI library. | ||
> - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation). | ||
> - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation). | ||
> - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team! | ||
> | ||
> [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) and speed up your development process! | ||
@@ -20,10 +21,10 @@ | ||
* [Types](https://www.telerik.com/kendo-react-ui/components/animation/types/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The Animation components animate their content by using various animation effects (Fade, Expand, Push, Reveal, Slide and Zoom). | ||
* [Disabled animations](https://www.telerik.com/kendo-react-ui/components/animation/disabled-state/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The Animations allow you to enable or disable their showing or hiding effect. | ||
* [Stacked animations](https://www.telerik.com/kendo-react-ui/components/animation/stacked/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—All Animations extend the Animation component. However, the Push and Zoom Animations further extend Animation by using [the `stackChildren`](https://www.telerik.com/kendo-react-ui/components/animation/api/PushProps/#toc-stackchildren/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) options and enable you to stack animations. | ||
* [Life-cycle hooks](https://www.telerik.com/kendo-react-ui/components/animation/hooks/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—When you declaratively add or remove a child element, all Animations call specific hooks during the entering or exiting of the element. | ||
* [Duration](https://www.telerik.com/kendo-react-ui/components/animation/duration/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—All Animation types enable you to control the duration of the entering and exiting animation effects. | ||
* [Direction](https://www.telerik.com/kendo-react-ui/components/animation/direction/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—Except for the Fade Animation, the Animations provide a set of the predefined directions which allow you to control their entering and exiting effect | ||
* [Exiting child components](https://www.telerik.com/kendo-react-ui/components/animation/exiting-components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—While an exiting child component is rendered because it still exists in the React Virtual DOM, it is no longer available in the DOM. | ||
* [Theme support](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The KendoReact Animation, as well as all 100+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, and Default) and can be further customized to match your specific design guidelines. | ||
- [Types](https://www.telerik.com/kendo-react-ui/components/animation/types/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The Animation components animate their content by using various animation effects (Fade, Expand, Push, Reveal, Slide and Zoom). | ||
- [Disabled animations](https://www.telerik.com/kendo-react-ui/components/animation/disabled-state/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The Animations allow you to enable or disable their showing or hiding effect. | ||
- [Stacked animations](https://www.telerik.com/kendo-react-ui/components/animation/stacked/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—All Animations extend the Animation component. However, the Push and Zoom Animations further extend Animation by using [the `stackChildren`](https://www.telerik.com/kendo-react-ui/components/animation/api/PushProps/#toc-stackchildren/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) options and enable you to stack animations. | ||
- [Life-cycle hooks](https://www.telerik.com/kendo-react-ui/components/animation/hooks/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—When you declaratively add or remove a child element, all Animations call specific hooks during the entering or exiting of the element. | ||
- [Duration](https://www.telerik.com/kendo-react-ui/components/animation/duration/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—All Animation types enable you to control the duration of the entering and exiting animation effects. | ||
- [Direction](https://www.telerik.com/kendo-react-ui/components/animation/direction/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—Except for the Fade Animation, the Animations provide a set of the predefined directions which allow you to control their entering and exiting effect | ||
- [Exiting child components](https://www.telerik.com/kendo-react-ui/components/animation/exiting-components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—While an exiting child component is rendered because it still exists in the React Virtual DOM, it is no longer available in the DOM. | ||
- [Theme support](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The KendoReact Animation, as well as all 100+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, and Default) and can be further customized to match your specific design guidelines. | ||
@@ -34,23 +35,23 @@ ## Support Options | ||
* Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation). | ||
* Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) are part of the free support you can get from the community and from the KendoReact team. | ||
* Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) is where you can request and vote for new features to be added. | ||
- Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation). | ||
- Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) are part of the free support you can get from the community and from the KendoReact team. | ||
- Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) is where you can request and vote for new features to be added. | ||
## Resources | ||
* [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
* [Get Started with the KendoReact Аnimation](https://www.telerik.com/kendo-react-ui/components/animation/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
* [API Reference of the KendoReact Аnimation](https://www.telerik.com/kendo-react-ui/components/animation/api/АnimationProps/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
* [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
* [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
* [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
* [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
* [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
- [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
- [Get Started with the KendoReact Аnimation](https://www.telerik.com/kendo-react-ui/components/animation/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
- [API Reference of the KendoReact Аnimation](https://www.telerik.com/kendo-react-ui/components/animation/api/АnimationProps/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
- [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
- [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
- [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
- [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
- [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) | ||
High-level component overview pages | ||
* [React Animation Component](https://www.telerik.com/kendo-react-ui/animation) | ||
- [React Animation Component](https://www.telerik.com/kendo-react-ui/animation) | ||
*Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.* | ||
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._ | ||
*Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.* | ||
_Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._ |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),i=require("prop-types"),E=require("./Animation.js"),y=require("@progress/kendo-react-common"),u=require("./util.js");function W(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const m=W(x),c=class c extends m.Component{constructor(){super(...arguments),this.state={maxHeight:void 0,maxWidth:void 0},this.componentWillEnter=t=>{const{onEnter:e,onBeforeEnter:n}=this.props;n&&n.call(void 0,t),this.updateContainerDimensions(t.animatedElement,()=>{e&&e.call(void 0,t)})},this.componentIsEntering=t=>{const{onEntering:e}=this.props;this.updateContainerDimensions(t.animatedElement,()=>{e&&e.call(void 0,t)})},this.componentWillExit=t=>{const{onExit:e}=this.props;this.updateContainerDimensions(t.animatedElement,()=>{e&&e.call(void 0,t)})},this.updateContainerDimensions=(t,e=y.noop)=>{const n=t.firstChild;if(n){const l=u.outerHeight(n),a=u.outerWidth(n);this.setState({maxHeight:l,maxWidth:a},e)}}}render(){const{direction:t,children:e,childFactory:n,...l}=this.props,{maxHeight:a,maxWidth:p}=this.state;let o;t==="vertical"?o={maxHeight:a?`${a}px`:""}:o={maxWidth:p?`${p}px`:""};const f={maxHeight:o.maxHeight,maxWidth:o.maxWidth},g=d=>{let s=n?n(d):d;return s.props.in?s:m.cloneElement(s,{...s.props,style:{...s.props.style,maxHeight:o.maxHeight,maxWidth:o.maxWidth}})};return m.createElement(E.Animation,{...l,childFactory:g,onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:f,transitionName:`reveal-${t}`},e)}};c.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},c.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};let h=c;exports.Reveal=h; | ||
"use client";"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 r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,a.get?a:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const s=N(w),h=e=>{const[r,o]=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:r?`${r}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)},[r,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);o(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.string,id:i.string,style:i.any};exports.Reveal=h; |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),e=require("prop-types"),l=require("./Animation.js");function p(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>n[t]})}}return r.default=n,Object.freeze(r)}const s=p(u),i=class i extends s.Component{render(){const{direction:r,children:t,...o}=this.props,c={transitionName:`slide-${r}`};return s.createElement(l.Animation,{...c,...o},t)}};i.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},i.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"};let a=i;exports.Slide=a; | ||
"use client";"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,...d}=e,p={transitionName:`slide-${u}`};return g.createElement(y.Animation,{...p,appear:i,enter:n,exit:o,transitionEnterDuration:c,transitionExitDuration:s,...d},l)},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.string,id:t.string,style:t.any};exports.Slide=a; |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),t=require("prop-types"),l=require("./Animation.js");function u(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>n[e]})}}return r.default=n,Object.freeze(r)}const s=u(c),p={position:"absolute",top:"0",left:"0"},o=class o extends s.Component{render(){const{children:r,direction:e,...i}=this.props;return s.createElement(l.Animation,{...i,transitionName:`zoom-${e}`,animationExitingStyle:this.props.stackChildren?p:void 0},r)}};o.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,direction:t.oneOf(["in","out"]),component:t.string,id:t.string,style:t.any,stackChildren:t.bool},o.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1};let a=o;exports.Zoom=a; | ||
"use client";"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 g=y(f),b={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 g.createElement(m.Animation,{appear:r,enter:i,exit:o,transitionEnterDuration:c,transitionExitDuration:s,stackChildren:l,...p,transitionName:`zoom-${u}`,animationExitingStyle:e.stackChildren?b: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.string,id:t.string,style:t.any,stackChildren:t.bool};exports.Zoom=a; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
55
118107
1488