UNPKG

@progress/kendo-react-animation

Version:

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

60 lines (59 loc) 1.61 kB
/** * @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 u from "react"; import t from "prop-types"; import { Animation as h } from "./Animation.mjs"; const m = { position: "absolute", top: "0", left: "0" }, f = (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: p = n.direction, children: l, ...d } = i; return /* @__PURE__ */ u.createElement( h, { appear: r, enter: e, exit: o, transitionEnterDuration: a, transitionExitDuration: s, stackChildren: c, ...d, transitionName: `push-${p}`, animationExitingStyle: i.stackChildren ? m : void 0 }, l ); }, n = { appear: !1, enter: !0, exit: !0, transitionEnterDuration: 300, transitionExitDuration: 300, direction: "right", stackChildren: !1 }; f.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 }; export { f as Push };