UNPKG

@dialpad/dialtone

Version:

Dialpad's Dialtone design system monorepo

106 lines (105 loc) 2.68 kB
import { DtIconUsers as i } from "@dialpad/dialtone-icons/vue3"; import { safeConcatStrings as s, extractVueListeners as u } from "../../common/utils/index.js"; import { resolveComponent as n, openBlock as c, createBlock as l, mergeProps as d, toHandlers as p, withCtx as m, createVNode as f } from "vue"; import { _ } from "../../_plugin-vue_export-helper-CHgC5LLL.js"; import g from "../general-row/general-row.js"; const y = { compatConfig: { MODE: 3 }, name: "DtRecipeGroupRow", components: { DtIconUsers: i, DtRecipeGeneralRow: g }, inheritAttrs: !1, props: { /** * Screen reader will read out the number of users in the group using this text. Ex: "2 users" */ groupCountText: { type: String, default: "" }, /** * Names of the group members */ names: { type: String, required: !0 }, /** * Number of unread messages */ unreadCount: { type: String, default: null }, /** * Number of unread mention messages */ unreadMentionCount: { type: String, default: null }, /** * Text shown when the unread count is hovered. */ unreadCountTooltip: { type: String, default: null }, /** * Styles the row with an increased font weight to convey it has unreads. This must be true to see * the unread count badge. */ hasUnreads: { type: Boolean, default: !1 }, /** * Determines if the row is selected */ selected: { type: Boolean, default: !1 }, /** * Shows an "is typing" animation over the avatar when true. */ isTyping: { type: Boolean, default: !1 } }, emits: [], computed: { ariaLabel() { return s([this.groupCountText, this.names]); }, contactRowListeners() { return u(this.$attrs); } } }; function C(o, h, e, w, x, t) { const r = n("dt-icon-users"), a = n("dt-recipe-general-row"); return c(), l(a, d({ description: e.names, "aria-label": t.ariaLabel, "unread-count": e.unreadCount, "has-unreads": e.hasUnreads, "unread-mention-count": e.unreadMentionCount, "unread-count-tooltip": e.unreadCountTooltip, selected: e.selected, "is-typing": e.isTyping }, o.$attrs, p(t.contactRowListeners)), { left: m(() => [ f(r, { size: "300" }) ]), _: 1 }, 16, ["description", "aria-label", "unread-count", "has-unreads", "unread-mention-count", "unread-count-tooltip", "selected", "is-typing"]); } const b = /* @__PURE__ */ _(y, [["render", C]]); export { b as default }; //# sourceMappingURL=group-row.js.map