UNPKG

@dialpad/dialtone-icons

Version:

Dialtone icon library

81 lines (80 loc) 2.55 kB
import { g as n } from "../utils-BOfnFgIH.js"; import { I as i } from "../constants-DeVuDy8J.js"; import { openBlock as o, createElementBlock as r, normalizeClass as s, createElementVNode as a } from "vue"; import { _ as d } from "../_plugin-vue_export-helper-CHgC5LLL.js"; const c = { name: "DtIconSnowflake", props: { /** * The size of the icon. * @values 100, 200, 300, 400, 500, 600, 700, 800 */ size: { type: String, default: "500", validator: (e) => Object.keys(i).includes(e) }, /** * 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 = n(); } }, _ = ["aria-label", "data-qa", "aria-hidden"], h = ["clip-path"], u = /* @__PURE__ */ a("path", { d: "M1 5.5a.5.5 0 0 0 0 1h1.793L1.646 7.646a.5.5 0 1 0 .708.708L4.207 6.5h1.147l.146.024v1.269L3.646 9.646a.5.5 0 0 0 .708.708L5.5 9.207V11a.5.5 0 0 0 1 0V9.207l1.146 1.147a.5.5 0 0 0 .708-.708L6.5 7.793V6.5h1.293l1.853 1.854a.5.5 0 0 0 .708-.708L9.207 6.5H11a.5.5 0 0 0 0-1H9.207l1.147-1.146a.5.5 0 0 0-.708-.708L7.793 5.5H6.5V4.207l1.854-1.853a.5.5 0 1 0-.708-.708L6.5 2.793V1a.5.5 0 0 0-1 0v1.793L4.354 1.646a.5.5 0 1 0-.708.708L5.5 4.207V5.5H4.207L2.354 3.646a.5.5 0 1 0-.708.708L2.793 5.5H1Z", fill: "currentColor" }, null, -1), f = [ u ], m = ["id"], p = /* @__PURE__ */ a("path", { fill: "#fff", d: "M0 0h12v12H0z" }, null, -1), L = [ p ]; function g(e, I, l, S, v, t) { return o(), r("svg", { "aria-label": l.ariaLabel, class: s([t.iconSizeClass, "d-icon d-icon--snowflake"]), "data-qa": t.dataQA, "aria-hidden": t.ariaHidden, role: "img", "data-name": "Snowflake", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" }, [ a("g", { "clip-path": `url(#${e.uniqueID}a)` }, f, 8, h), a("defs", null, [ a("clipPath", { id: `${e.uniqueID}a` }, L, 8, m) ]) ], 10, _); } const V = /* @__PURE__ */ d(c, [["render", g]]); export { V as default }; //# sourceMappingURL=snowflake.js.map