@dialpad/dialtone-icons
Version:
Dialtone icon library
81 lines (80 loc) • 2.6 kB
JavaScript
import { g as n } from "../../utils-BOfnFgIH.js";
import { I as l } from "../../constants-DeVuDy8J.js";
import { openBlock as d, createElementBlock as o, normalizeClass as s, createElementVNode as a } from "vue";
import { _ as u } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
const f = {
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(l).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 l[this.size];
},
ariaHidden() {
return this.ariaLabel ? "false" : "true";
},
dataQA() {
return this.$attrs["data-qa"] ?? "dt-icon";
}
},
created() {
this.$emit("loaded"), this.uniqueID = n();
}
}, c = ["aria-label", "data-qa", "aria-hidden"], m = ["clip-path"], p = ["id"];
function h(e, t, r, _, L, i) {
return d(), o("svg", {
"aria-label": r.ariaLabel,
class: s([i.iconSizeClass, "d-icon d-icon--snowflake"]),
"data-qa": i.dataQA,
"aria-hidden": i.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)`
}, [...t[0] || (t[0] = [
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)
])], 8, m),
a("defs", null, [
a("clipPath", {
id: `${e.uniqueID}a`
}, [...t[1] || (t[1] = [
a("path", {
fill: "#fff",
d: "M0 0h12v12H0z"
}, null, -1)
])], 8, p)
])
], 10, c);
}
const w = /* @__PURE__ */ u(f, [["render", h]]);
export {
w as default
};
//# sourceMappingURL=snowflake.js.map