UNPKG

@progress/kendo-vue-animation

Version:

Kendo UI for Vue Animation package

120 lines (119 loc) 3.24 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 { defineComponent as s, createVNode as n, isVNode as l } from "vue"; import { AnimationChild as p } from "./AnimationChild.mjs"; import { validatePackage as d, getDefaultSlots as h } from "@progress/kendo-vue-common"; import { packageMetadata as m } from "./package-metadata.mjs"; import c from "./util.mjs"; function E(t) { return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !l(t); } const e = c.styles, F = /* @__PURE__ */ s({ props: { componentChildStyle: Object, childFactory: Object, className: String, tag: String, id: String, animationEnteringStyle: Object, animationExitingStyle: Object, componentChildClassName: [Array], transitionName: { type: String, required: !0 }, appear: { type: Boolean, default: !0 }, enter: { type: Boolean, default: !0 }, exit: { type: Boolean, default: !0 }, transitionEnterDuration: { type: Number }, transitionExitDuration: { type: Number }, onEntering: Function, onEnter: Function, onEntered: Function, onExit: Function, onExiting: Function, onExited: Function }, methods: { handleEntering(t) { this.$emit("entering", t); }, handleEnter(t) { this.$emit("enter", t); }, handleEntered(t) { this.$emit("entered", t); }, handleExit(t) { this.$emit("exit", t); }, handleExiting(t) { this.$emit("exiting", t); }, handleExited(t) { this.$emit("exited", t); } }, created: function() { d(m); }, render() { const t = h(this), { id: u, tag: g, role: i, className: o, childFactory: x, stackChildren: y, componentChildStyle: r, componentChildClassName: f, ...$ } = this.$props, a = [e["animation-container"], e["animation-container-relative"], o]; return n("div", { id: this.$props.id, class: a, role: i }, [n(p, { key: "some", style: r, appear: this.$props.appear, enter: this.$props.enter, exit: this.$props.exit, transitionName: this.$props.transitionName, componentChildClassName: this.$props.componentChildClassName, onBeforeenter: this.handleEnter, onEntering: this.handleEntering, onEntered: this.handleEntered, onExit: this.handleExit, onExiting: this.handleExiting, onExited: this.handleExited, animationEnteringStyle: this.$props.animationEnteringStyle, animationExitingStyle: this.$props.animationExitingStyle, transitionEnterDuration: this.$props.transitionEnterDuration, transitionExitDuration: this.$props.transitionExitDuration }, E(t) ? t : { default: () => [t] })]); } }); export { F as Animation };