UNPKG

@dialpad/dialtone-vue

Version:

Vue component library for Dialpad's design system Dialtone

45 lines (44 loc) 1.57 kB
import { PRESENCE_STATES as n, PRESENCE_STATES_LIST as t } from "./presence-constants.js"; import { n as a } from "../../_plugin-vue2_normalizer-DSLOjnn3.js"; const c = { name: "DtPresence", props: { /** * Determines the color of the inner presence circle, indicating status. * Accepts one of 4 values: 'busy', 'away', 'active', 'offline' * @values busy, away, active, offline */ presence: { type: String, default: n.ACTIVE, validator: (s) => t.includes(s) }, /** * Since Presence is a visual element, we need SRs to read out any state changes * that occur. * Text entered here will be read by assistive technology. If null this component will be ignored by AT. */ srText: { type: String, default: null } } }; var _ = function() { var e = this, r = e._self._c; return r("div", { staticClass: "d-presence", attrs: { "data-qa": "dt-presence", role: "status", "aria-live": e.$attrs.ariaLive || "off" } }, [e.srText ? r("span", { staticClass: "sr-only", attrs: { "data-qa": "dt-presence-sr-text" } }, [e._v(e._s(e.srText) + " ")]) : e._e(), r("div", { staticClass: "d-presence__inner", class: { "d-presence__inner--active": e.presence === "active", "d-presence__inner--away": e.presence === "away", "d-presence__inner--busy": e.presence === "busy", "d-presence__inner--offline": e.presence === "offline" } })]); }, i = [], p = /* @__PURE__ */ a( c, _, i ); const l = p.exports; export { l as default }; //# sourceMappingURL=presence.js.map