@progress/kendo-react-animation
Version:
React Animation component assists with animating HTML elements. KendoReact Animation package
60 lines (59 loc) • 1.59 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import * as m from "react";
import t from "prop-types";
import { Animation as u } from "./Animation.mjs";
const f = { position: "absolute", top: "0", left: "0" }, E = (i) => {
const {
appear: r = n.appear,
enter: e = n.enter,
exit: o = n.exit,
transitionEnterDuration: a = n.transitionEnterDuration,
transitionExitDuration: s = n.transitionExitDuration,
stackChildren: c = n.stackChildren,
direction: l = n.direction,
children: p,
...d
} = i;
return /* @__PURE__ */ m.createElement(
u,
{
appear: r,
enter: e,
exit: o,
transitionEnterDuration: a,
transitionExitDuration: s,
stackChildren: c,
...d,
transitionName: `zoom-${l}`,
animationExitingStyle: i.stackChildren ? f : void 0
},
p
);
}, n = {
appear: !1,
enter: !0,
exit: !0,
transitionEnterDuration: 300,
transitionExitDuration: 300,
direction: "out",
stackChildren: !1
};
E.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
};
export {
E as Zoom
};