UNPKG

@dialpad/dialtone-icons

Version:
85 lines (84 loc) 2.35 kB
import { g as n } from "../../utils-BOfnFgIH.js"; import { I as r } from "../../constants-DeVuDy8J.js"; import { openBlock as d, createElementBlock as o, normalizeClass as s, createElementVNode as e } from "vue"; import { _ as u } from "../../_plugin-vue_export-helper-CHgC5LLL.js"; const c = { name: "DtIconAttestation", props: { /** * The size of the icon. * @values 100, 200, 300, 400, 500, 600, 700, 800 */ size: { type: String, default: "500", validator: (t) => Object.keys(r).includes(t) }, /** * The label of the icon as read out by a screenreader. Leave this unset if your icon is purely presentational */ ariaLabel: { type: String, default: void 0 } }, /** * @TODO: Remove this emit once the icons migration is complete, * they will no longer need this event. * */ emits: ["loaded"], computed: { iconSizeClass() { return r[this.size]; }, ariaHidden() { return this.ariaLabel ? "false" : "true"; }, dataQA() { return this.$attrs["data-qa"] ?? "dt-icon"; } }, created() { this.$emit("loaded"), this.uniqueID = n(); } }, f = ["aria-label", "data-qa", "aria-hidden"], m = ["clip-path"], p = ["id"]; function h(t, a, l, _, g, i) { return d(), o("svg", { "aria-label": l.ariaLabel, class: s([i.iconSizeClass, "d-icon d-icon--attestation"]), "data-qa": i.dataQA, "aria-hidden": i.ariaHidden, role: "img", "data-name": "Attestation", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" }, [ e("g", { "clip-path": `url(#${t.uniqueID}a)` }, [...a[0] || (a[0] = [ e("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12 0H0v12h12V0ZM9.442 4.442a.625.625 0 1 0-.884-.884L5 7.116 3.442 5.558a.625.625 0 1 0-.884.884l2 2c.244.244.64.244.884 0l4-4Z", fill: "currentColor" }, null, -1) ])], 8, m), e("defs", null, [ e("clipPath", { id: `${t.uniqueID}a` }, [...a[1] || (a[1] = [ e("rect", { width: "12", height: "12", rx: "4", fill: "#fff" }, null, -1) ])], 8, p) ]) ], 10, f); } const S = /* @__PURE__ */ u(c, [["render", h]]); export { S as default }; //# sourceMappingURL=attestation.js.map