UNPKG

@progress/kendo-react-animation

Version:

React Animation component assists with animating HTML elements. KendoReact Animation package

9 lines (8 loc) 1.49 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "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;