@dialpad/dialtone-icons
Version:
Dialtone icon library
83 lines (82 loc) • 2.5 kB
JavaScript
import { g as l } from "../../utils-BOfnFgIH.js";
import { I as d } from "../../constants-DeVuDy8J.js";
import { openBlock as n, createElementBlock as s, normalizeClass as o, createElementVNode as a } from "vue";
import { _ as u } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
const c = {
name: "DtIconAddTask",
props: {
/**
* The size of the icon.
* @values 100, 200, 300, 400, 500, 600, 700, 800
*/
size: {
type: String,
default: "500",
validator: (e) => Object.keys(d).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 d[this.size];
},
ariaHidden() {
return this.ariaLabel ? "false" : "true";
},
dataQA() {
return this.$attrs["data-qa"] ?? "dt-icon";
}
},
created() {
this.$emit("loaded"), this.uniqueID = l();
}
}, f = ["aria-label", "data-qa", "aria-hidden"], m = ["clip-path"], p = ["id"];
function h(e, t, r, _, v, i) {
return n(), s("svg", {
"aria-label": r.ariaLabel,
class: o([i.iconSizeClass, "d-icon d-icon--add-task"]),
"data-qa": i.dataQA,
"aria-hidden": i.ariaHidden,
role: "img",
"data-name": "Add Task",
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", {
"fill-rule": "evenodd",
"clip-rule": "evenodd",
d: "M7.497 2.228A4.058 4.058 0 1 0 6 10.058a.5.5 0 1 1 0 1 5.06 5.06 0 1 1 1.866-9.76.5.5 0 1 1-.369.93Zm3.404-.082a.5.5 0 0 1 0 .708L6.354 7.4a.5.5 0 0 1-.71-.002L4.098 5.837a.5.5 0 0 1 .71-.704L6.003 6.34l4.192-4.193a.5.5 0 0 1 .707 0ZM9 7a.5.5 0 0 1 .5.5v1h1a.5.5 0 1 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 1 1 0-1h1v-1A.5.5 0 0 1 9 7Z",
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, f);
}
const S = /* @__PURE__ */ u(c, [["render", h]]);
export {
S as default
};
//# sourceMappingURL=add-task.js.map