UNPKG

@dialpad/dialtone

Version:

Dialpad's Dialtone design system monorepo

157 lines (156 loc) 3.88 kB
import { t as e } from "../../_plugin-vue_export-helper-BTgDAbhb.js"; import t from "../avatar/avatar.js"; import n from "../item-layout/item-layout.js"; import { Fragment as r, createBlock as i, createElementBlock as a, createElementVNode as o, createSlots as s, openBlock as c, renderList as l, renderSlot as u, resolveComponent as d, resolveDynamicComponent as f, withCtx as p } from "vue"; //#region recipes/item_layout/contact_info/contact_info.vue var m = { compatConfig: { MODE: 3 }, name: "DtRecipeContactInfo", components: { DtAvatar: t, DtItemLayout: n }, props: { role: { type: String, default: "" }, showAvatar: { type: Boolean, default: !0 }, avatarSrc: { type: String, default: "" }, avatarSeed: { type: String, default: null }, avatarFullName: { type: String, default: "" }, avatarSize: { type: String, default: "lg" }, avatarLabelledBy: { type: String, default: "" }, avatarColor: { type: String, default: null }, presence: { type: String, default: null }, avatarList: { type: Array, default: null } }, emits: ["avatar-click"], methods: { avatarClick() { this.$emit("avatar-click"); } } }, h = ["aria-labelledby"], g = { key: 0, class: "d-recipe-contact-info__avatars" }, _ = { class: "d-recipe-contact-info__header", "data-qa": "contact-info-header" }, v = { class: "d-recipe-contact-info__subtitle", "data-qa": "contact-info-subtitle" }, y = { class: "d-recipe-contact-info__bottom", "data-qa": "contact-info-bottom" }, b = { "data-qa": "contact-info-right" }; function x(e, t, n, m, x, S) { let C = d("dt-avatar"), w = d("dt-item-layout"); return c(), i(w, { role: n.role, "data-qa": "contact-info", class: "d-recipe-contact-info", "content-class": "d-recipe-contact-info__content", "right-class": "d-recipe-contact-info__right", unstyled: "" }, s({ default: p(() => [o("div", _, [u(e.$slots, "header")])]), subtitle: p(() => [o("div", v, [u(e.$slots, "subtitle")])]), _: 2 }, [ n.showAvatar ? { name: "left", fn: p(() => [o("button", { class: "d-recipe-contact-info__left", "data-qa": "contact-info-left", "aria-labelledby": n.avatarLabelledBy, onClick: t[0] || (t[0] = (...e) => S.avatarClick && S.avatarClick(...e)) }, [n.avatarList ? (c(), a("span", g, [(c(!0), a(r, null, l(n.avatarList, (t, r) => (c(), i(C, { key: r, size: n.avatarSize, seed: t.seed, "full-name": t.fullName, "image-src": t.src, "image-alt": "", "overlay-text": t.text, "avatar-class": [{ "d-recipe-contact-info__avatar-stacked": r > 0, "d-recipe-contact-info__avatar-halo": !!t.halo }] }, s({ icon: p(({ iconSize: t }) => [u(e.$slots, "avatarIcon", { iconSize: t })]), _: 2 }, [t.icon ? { name: "overlayIcon", fn: p(() => [(c(), i(f(t.icon)))]), key: "0" } : void 0]), 1032, [ "size", "seed", "full-name", "image-src", "overlay-text", "avatar-class" ]))), 128))])) : (c(), i(C, { key: 1, size: n.avatarSize, "full-name": n.avatarFullName, "image-src": n.avatarSrc, "image-alt": "", seed: n.avatarSeed, color: n.avatarColor, presence: n.presence }, { icon: p(({ iconSize: t }) => [u(e.$slots, "avatarIcon", { iconSize: t })]), _: 3 }, 8, [ "size", "full-name", "image-src", "seed", "color", "presence" ]))], 8, h)]), key: "0" } : void 0, e.$slots.bottom ? { name: "bottom", fn: p(() => [o("div", y, [u(e.$slots, "bottom")])]), key: "1" } : void 0, e.$slots.right ? { name: "right", fn: p(() => [o("div", b, [u(e.$slots, "right")])]), key: "2" } : void 0 ]), 1032, ["role"]); } var S = /* @__PURE__ */ e(m, [["render", x]]); //#endregion export { S as default }; //# sourceMappingURL=contact-info.js.map