@progress/kendo-vue-indicators
Version:
67 lines (66 loc) • 1.85 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 n, createVNode as a } from "vue";
import { validatePackage as s, isObject as t } from "@progress/kendo-vue-common";
import { packageMetadata as i } from "../package-metadata.mjs";
const p = /* @__PURE__ */ n({
name: "KendoSkeleton",
props: {
animation: {
type: [Object, Boolean],
default: function() {
return {
type: "pulse"
};
},
validator: function(e) {
return e === !1 || ["wave", "pulse"].includes(e.type);
}
},
shape: {
type: String,
default: "text",
validator: function(e) {
return ["circle", "rectangle", "text"].includes(e);
}
},
ariaBusy: {
type: Boolean,
default: void 0
},
role: {
type: String,
default: void 0
}
},
created() {
s(i);
},
computed: {
skeletonClasses() {
return {
"k-skeleton": !0,
"k-skeleton-circle": this.shape === "circle",
"k-skeleton-rect": this.shape === "rectangle",
"k-skeleton-text": this.shape === "text",
"k-skeleton-pulse": t(this.animation) && this.animation.type === "pulse",
"k-skeleton-wave": t(this.animation) && this.animation.type === "wave" || this.animation === !0
};
}
},
render() {
return a("span", {
role: this.$props.role,
class: this.skeletonClasses,
"aria-busy": this.$props.ariaBusy
}, null);
}
});
export {
p as Skeleton
};