@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
73 lines (72 loc) • 1.72 kB
JavaScript
import { n } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
const s = {
name: "DtLazyShow",
/******************
* PROPS *
******************/
props: {
/**
* Whether the child slot is shown.
* @values true, false
*/
show: {
type: Boolean,
default: !1
},
/**
* A valid Vue enter/leave CSS transition name.
*/
transition: {
type: String,
default: null
},
/**
* Enable/Disable transition animation
* @values true, false
*/
appear: {
type: Boolean,
default: !1
}
},
/******************
* DATA *
******************/
data() {
return {
initialized: !!this.show
};
},
computed: {
/**
* Set the css property to false when running tests only.
* Refer to: https://vuejs.org/guide/built-ins/transition.html#javascript-hooks for details about
* transition `css` property
* @returns {boolean}
*/
isCSSEnabled() {
return process.env.NODE_ENV !== "test";
}
},
/******************
* WATCH *
******************/
watch: {
show: function(t) {
!t || this.initialized || (this.initialized = !0);
}
}
};
var i = function() {
var e = this, a = e._self._c;
return a("transition", e._g({ attrs: { name: e.transition, appear: e.appear, css: e.isCSSEnabled } }, e.$listeners), [a("div", e._g({ directives: [{ name: "show", rawName: "v-show", value: e.show, expression: "show" }] }, e.$listeners), [e.initialized ? e._t("default") : e._e()], 2)]);
}, r = [], o = /* @__PURE__ */ n(
s,
i,
r
);
const p = o.exports;
export {
p as default
};
//# sourceMappingURL=lazy-show.js.map