@dialpad/dialtone-icons
Version:
Dialtone icon library
83 lines (82 loc) • 2.55 kB
JavaScript
import { g as l } from "../utils-BOfnFgIH.js";
import { I as i } from "../constants-DeVuDy8J.js";
import { openBlock as d, createElementBlock as s, normalizeClass as n, createElementVNode as e } from "vue";
import { _ as o } from "../_plugin-vue_export-helper-CHgC5LLL.js";
const c = {
name: "DtIconEraser",
props: {
/**
* The size of the icon.
* @values 100, 200, 300, 400, 500, 600, 700, 800
*/
size: {
type: String,
default: "500",
validator: (a) => Object.keys(i).includes(a)
},
/**
* 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 = l();
}
}, _ = ["aria-label", "data-qa", "aria-hidden"], u = ["clip-path"], h = /* @__PURE__ */ e("path", {
"fill-rule": "evenodd",
"clip-rule": "evenodd",
d: "M3.5 11a.48.48 0 0 1-.191-.038.498.498 0 0 1-.162-.108l-2.15-2.15c-.681-.681-.713-1.757.008-2.416l4.792-4.792c.68-.68 1.756-.712 2.415.009l2.792 2.791c.68.681.712 1.757-.009 2.416L7.707 10H11a.5.5 0 1 1 0 1H3.5ZM1.704 7.004a.501.501 0 0 1-.02.018c-.268.241-.296.659.02.974L3.707 10h2.586L2.5 6.207l-.796.797Zm4.8-4.8c.315-.316.733-.288.975-.02a.486.486 0 0 0 .018.02l2.8 2.8c.315.315.287.733.019.974a.515.515 0 0 0-.02.018L7 9.293 3.207 5.5l3.297-3.296Z",
fill: "currentColor"
}, null, -1), f = [
h
], m = ["id"], p = /* @__PURE__ */ e("path", {
fill: "#fff",
d: "M0 0h12v12H0z"
}, null, -1), g = [
p
];
function I(a, v, r, b, q, t) {
return d(), s("svg", {
"aria-label": r.ariaLabel,
class: n([t.iconSizeClass, "d-icon d-icon--eraser"]),
"data-qa": t.dataQA,
"aria-hidden": t.ariaHidden,
role: "img",
"data-name": "Eraser",
viewBox: "0 0 12 12",
xmlns: "http://www.w3.org/2000/svg"
}, [
e("g", {
"clip-path": `url(#${a.uniqueID}a)`
}, f, 8, u),
e("defs", null, [
e("clipPath", {
id: `${a.uniqueID}a`
}, g, 8, m)
])
], 10, _);
}
const w = /* @__PURE__ */ o(c, [["render", I]]);
export {
w as default
};
//# sourceMappingURL=eraser.js.map