@dialpad/dialtone-icons
Version:
Dialtone icon library
82 lines (81 loc) • 3.02 kB
JavaScript
import { g as d } from "../../utils-BOfnFgIH.js";
import { I as l } from "../../constants-DeVuDy8J.js";
import { openBlock as n, createElementBlock as o, normalizeClass as s, createElementVNode as a } from "vue";
import { _ as u } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
const c = {
name: "DtIconEye",
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 = d();
}
}, p = ["aria-label", "data-qa", "aria-hidden"], f = ["clip-path"], m = ["id"];
function _(e, t, r, h, g, i) {
return n(), o("svg", {
"aria-label": r.ariaLabel,
class: s([i.iconSizeClass, "d-icon d-icon--eye"]),
"data-qa": i.dataQA,
"aria-hidden": i.ariaHidden,
role: "img",
"data-name": "Eye",
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 12 12"
}, [
a("g", {
"clip-path": `url(#${e.uniqueID}a)`,
fill: "currentColor",
"fill-rule": "evenodd",
"clip-rule": "evenodd"
}, [...t[0] || (t[0] = [
a("path", { d: "M1.556 6a6.694 6.694 0 0 0 .998 1.41C3.308 8.222 4.434 9 6 9c1.566 0 2.693-.778 3.446-1.59A6.693 6.693 0 0 0 10.444 6a6.693 6.693 0 0 0-.998-1.41C8.693 3.78 7.566 3 6 3c-1.566 0-2.692.779-3.446 1.59A6.694 6.694 0 0 0 1.556 6ZM11 6l.46-.197-.001-.002-.002-.003-.004-.011a3.795 3.795 0 0 0-.077-.16A7.687 7.687 0 0 0 10.18 3.91C9.308 2.97 7.934 2 6 2c-1.934 0-3.307.97-4.179 1.909A7.693 7.693 0 0 0 .624 5.626a4.515 4.515 0 0 0-.076.16l-.005.012-.001.003v.001C.54 5.802.54 5.803 1 6l-.46-.197a.5.5 0 0 0 0 .394L1 6l-.46.197.001.001v.001l.002.004.005.01a2.73 2.73 0 0 0 .076.161A7.694 7.694 0 0 0 1.821 8.09c.872.94 2.245 1.91 4.18 1.91 1.933 0 3.307-.971 4.178-1.91a7.688 7.688 0 0 0 1.197-1.716 4.737 4.737 0 0 0 .077-.16l.004-.011.002-.004v-.001L11 6Zm0 0 .46.197a.501.501 0 0 0 0-.394L11 6Z" }, null, -1),
a("path", { d: "M6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM4 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z" }, null, -1)
])], 8, f),
a("defs", null, [
a("clipPath", {
id: `${e.uniqueID}a`
}, [...t[1] || (t[1] = [
a("path", {
fill: "#fff",
d: "M0 0h12v12H0z"
}, null, -1)
])], 8, m)
])
], 10, p);
}
const q = /* @__PURE__ */ u(c, [["render", _]]);
export {
q as default
};
//# sourceMappingURL=eye.js.map