maz-ui
Version:
A standalone components library for Vue.Js 3 & Nuxt.Js 3
48 lines (47 loc) • 1.61 kB
JavaScript
import { defineComponent as e, useCssVars as p, openBlock as d, createBlock as h, TransitionGroup as u, withCtx as y, renderSlot as g, nextTick as s } from "vue";
import { _ as f } from "./MazCard.D4R5VJTH.mjs";
import '../assets/MazTransitionExpand.CvCjUYCg.css';const l = /* @__PURE__ */ e({
__name: "MazTransitionExpand",
props: {
animationDuration: { default: "300ms" }
},
setup(x) {
p((t) => ({
"6402c434": t.animationDuration
}));
function n(t) {
const i = getComputedStyle(t).width;
t.style.width = i, t.style.position = "absolute", t.style.visibility = "hidden", t.style.height = "auto", t.style.top = "bottom";
const o = getComputedStyle(t).height;
t.style.width = "", t.style.position = "", t.style.visibility = "", t.style.height = "0px", getComputedStyle(t).height, s(() => {
t.style.height = o;
});
}
function a(t) {
t.style.height = "auto";
}
function r(t) {
const i = getComputedStyle(t).height;
t.style.height = i, getComputedStyle(t).height, s(() => {
t.style.height = "0px";
});
}
return (t, i) => (d(), h(u, {
class: "m-transition-expand m-reset-css",
name: "maz-expand",
tag: "div",
onEnter: i[0] || (i[0] = (o) => n(o)),
onAfterEnter: i[1] || (i[1] = (o) => a(o)),
onLeave: i[2] || (i[2] = (o) => r(o))
}, {
default: y(() => [
g(t.$slots, "default", {}, void 0, !0)
]),
_: 3
/* FORWARDED */
}));
}
}), v = /* @__PURE__ */ f(l, [["__scopeId", "data-v-fbd5f8a0"]]);
export {
v as default
};