UNPKG

@dialpad/dialtone-icons

Version:

Dialtone icon library

85 lines (84 loc) 2.26 kB
import { g as r } from "../utils-BOfnFgIH.js"; import { I as i } from "../constants-DeVuDy8J.js"; import { openBlock as d, createElementBlock as o, normalizeClass as s, createElementVNode as e } from "vue"; import { _ as l } 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(i).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 i[this.size]; }, ariaHidden() { return this.ariaLabel ? "false" : "true"; }, dataQA() { return this.$attrs["data-qa"] ?? "dt-icon"; } }, created() { this.$emit("loaded"), this.uniqueID = r(); } }, _ = ["aria-label", "data-qa", "aria-hidden"], u = ["clip-path"], h = /* @__PURE__ */ 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), f = [ h ], m = ["id"], p = /* @__PURE__ */ e("rect", { width: "12", height: "12", rx: "4", fill: "#fff" }, null, -1), g = [ p ]; function I(t, v, n, b, q, a) { return d(), o("svg", { "aria-label": n.ariaLabel, class: s([a.iconSizeClass, "d-icon d-icon--attestation"]), "data-qa": a.dataQA, "aria-hidden": a.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)` }, f, 8, u), e("defs", null, [ e("clipPath", { id: `${t.uniqueID}a` }, g, 8, m) ]) ], 10, _); } const D = /* @__PURE__ */ l(c, [["render", I]]); export { D as default }; //# sourceMappingURL=attestation.js.map