@progress/kendo-vue-animation
Version:
Kendo UI for Vue Animation package
104 lines (103 loc) • 2.68 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 { defineComponent as i, createVNode as o, isVNode as r } from "vue";
import { Animation as a } from "./Animation.mjs";
import { getDefaultSlots as s } from "@progress/kendo-vue-common";
function d(t) {
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !r(t);
}
const u = /* @__PURE__ */ i({
props: {
appear: {
type: Boolean,
default: !1
},
enter: {
type: Boolean,
default: !0
},
exit: {
type: Boolean,
default: !0
},
transitionEnterDuration: {
type: Number,
default: 300
},
transitionExitDuration: {
type: Number,
default: 300
},
componentChildClassName: [Array],
childFactory: Object,
componentChildStyle: Object,
className: String,
direction: {
type: String,
default: "down"
},
tag: String,
id: String,
role: String,
onBeforeenter: Function,
onEntering: 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);
}
},
render() {
const t = s(this), {
direction: l,
id: e,
...p
} = this.$props, n = `slide-${this.$props.direction}`;
return o(a, {
id: e,
transitionName: n,
componentChildClassName: this.$props.componentChildClassName,
componentChildStyle: this.$props.componentChildStyle,
appear: this.$props.appear,
enter: this.$props.enter,
exit: this.$props.exit,
onEnter: this.handleEnter,
onEntering: this.handleEntering,
onEntered: this.handleEntered,
onExit: this.handleExit,
onExiting: this.handleExiting,
onExited: this.handleExited,
transitionEnterDuration: this.$props.transitionEnterDuration,
transitionExitDuration: this.$props.transitionExitDuration
}, d(t) ? t : {
default: () => [t]
});
}
});
export {
u as Slide
};