@dialpad/dialtone-icons
Version:
Dialtone icon library
83 lines (82 loc) • 2.51 kB
JavaScript
import { g as d } from "../../utils-BOfnFgIH.js";
import { I as r } 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: "DtIconCopy",
props: {
/**
* The size of the icon.
* @values 100, 200, 300, 400, 500, 600, 700, 800
*/
size: {
type: String,
default: "500",
validator: (e) => Object.keys(r).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 r[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 h(e, t, l, _, g, i) {
return n(), o("svg", {
"aria-label": l.ariaLabel,
class: s([i.iconSizeClass, "d-icon d-icon--copy"]),
"data-qa": i.dataQA,
"aria-hidden": i.ariaHidden,
role: "img",
"data-name": "Copy",
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 12 12"
}, [
a("g", {
"clip-path": `url(#${e.uniqueID}a)`
}, [...t[0] || (t[0] = [
a("path", {
fill: "currentColor",
"fill-rule": "evenodd",
d: "M2 1.5a.5.5 0 0 0-.5.5v4.5A.5.5 0 0 0 2 7h.5a.5.5 0 0 1 0 1H2A1.5 1.5 0 0 1 .5 6.5V2A1.5 1.5 0 0 1 2 .5h4.5A1.5 1.5 0 0 1 8 2v.5a.5.5 0 0 1-1 0V2a.5.5 0 0 0-.5-.5H2ZM5.5 5a.5.5 0 0 0-.5.5V10a.5.5 0 0 0 .5.5H10a.5.5 0 0 0 .5-.5V5.5A.5.5 0 0 0 10 5H5.5ZM4 5.5A1.5 1.5 0 0 1 5.5 4H10a1.5 1.5 0 0 1 1.5 1.5V10a1.5 1.5 0 0 1-1.5 1.5H5.5A1.5 1.5 0 0 1 4 10V5.5Z",
"clip-rule": "evenodd"
}, 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 b = /* @__PURE__ */ u(c, [["render", h]]);
export {
b as default
};
//# sourceMappingURL=copy.js.map