UNPKG

@progress/kendo-vue-layout

Version:
88 lines (87 loc) 2.27 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { defineComponent as l, createVNode as o } from "vue"; import { avatarType as s } from "./interfaces/Enums.mjs"; import { packageMetadata as d } from "../package-metadata.mjs"; import { getDefaultSlots as p, kendoThemeMaps as i, validatePackage as u } from "@progress/kendo-vue-common"; const g = /* @__PURE__ */ l({ name: "KendoAvatar", props: { type: { type: String, default: s.TEXT, validator: function(e) { return ["text", "image", "icon"].includes(e); } }, border: Boolean, rounded: { type: String, validator: function(e) { return ["none", "small", "medium", "large", "full"].includes(e); } }, fillMode: { type: String, validator: function(e) { return ["solid", "outline"].includes(e); } }, size: { type: String, validator: function(e) { return ["none", "small", "medium", "large", null].includes(e); } }, themeColor: { type: String, validator: function(e) { return ["base", "primary", "secondary", "tertiary"].includes(e); } } }, created() { u(d); }, computed: { wrapperClass() { const { border: e, type: c, size: r, rounded: t, fillMode: a, themeColor: n } = this.$props; return { "k-avatar-bordered": e, "k-avatar": !0, [`k-avatar-${i.sizeMap[r] || r}`]: r, [`k-rounded-${i.roundedMap[t] || t}`]: t, [`k-avatar-${a}`]: a, [`k-avatar-${n}`]: !!n }; }, innerClass() { return { [`k-avatar-${this.$props.type}`]: this.$props.type }; } }, render() { const e = p(this); return o("div", { class: this.wrapperClass }, [o("span", { class: this.innerClass }, [e])]); } }); export { g as Avatar };