@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
72 lines (71 loc) • 1.52 kB
JavaScript
import { t as e } from "../../_plugin-vue_export-helper-BTgDAbhb.js";
import { SKELETON_SHAPES as t, SKELETON_SHAPE_SIZES as n } from "./skeleton-constants.js";
import r from "../../common/mixins/skeleton.js";
import { createElementBlock as i, normalizeClass as a, normalizeStyle as o, openBlock as s } from "vue";
//#region components/skeleton/skeleton-shape.vue
var c = {
compatConfig: { MODE: 3 },
name: "DtSkeletonShape",
mixins: [r],
props: {
shape: {
type: String,
default: "circle",
validator: (e) => Object.keys(t).includes(e)
},
size: {
type: String,
default: "md"
},
animationDuration: {
type: Number,
default: -1
},
animate: {
type: Boolean,
default: !0
},
offset: {
type: Number,
default: 1
},
contentClass: {
type: [
String,
Object,
Array
],
default: ""
}
},
data() {
return { SKELETON_SHAPES: t };
},
computed: { shapeStyles() {
let e = n[this.size] || this.size;
return {
...this.skeletonStyle,
"min-width": e,
"max-width": e,
"min-height": e,
"max-height": e
};
} }
};
function l(e, t, n, r, c, l) {
return s(), i("div", {
ref: "skeleton",
"data-qa": "skeleton-shape",
class: a([
"d-skeleton-placeholder",
c.SKELETON_SHAPES[n.shape],
{ "d-skeleton-placeholder--animate": n.animate },
n.contentClass
]),
style: o(l.shapeStyles)
}, null, 6);
}
var u = /* @__PURE__ */ e(c, [["render", l]]);
//#endregion
export { u as default };
//# sourceMappingURL=skeleton-shape.js.map