vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
44 lines (43 loc) • 2.08 kB
JavaScript
import { defineComponent as n, computed as o, openBlock as s, createElementBlock as c, createElementVNode as t, toDisplayString as d, createCommentVNode as h, normalizeStyle as f, createStaticVNode as p } from "vue";
const v = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "2f3c2b43-ecf2-4052-9c7b-49aae2f1544a" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), _ = { mask: "url(#2f3c2b43-ecf2-4052-9c7b-49aae2f1544a)" }, g = { key: 0 }, k = /* @__PURE__ */ p('<path fill="#eee" d="M0 256 256 0h256v55.7l-19.5 33 19.5 33.7v66.8l-22.1 37.7L512 256v66.8l-20.2 38.5 20.2 28.3v66.7l-254.5 28.2L0 456.3v-66.7l26-35.1-26-31.7z"></path><path fill="#d80027" d="M256 256h256v-66.8H222.9zm-33.1-133.6H512V55.7H222.9zM512 512v-55.7H0V512zM0 389.6h512v-66.8H0z"></path><path fill="#0052b4" d="M0 0h256v256H0z"></path><g fill="#ffda44"><path d="M170.2 219.1a63.3 63.3 0 1 1 30.1-119 78 78 0 1 0 0 111.4 63 63 0 0 1-30 7.6z"></path><path d="m188 111.3 11.3 23.5 25.4-5.9-11.4 23.5 20.4 16.2-25.4 5.7.1 26-20.3-16.2-20.4 16.2.1-26-25.4-5.7 20.4-16.2-11.4-23.5 25.4 6z"></path></g>', 4), u = { fill: "none" }, z = ["r"], H = /* @__PURE__ */ n({
__name: "my",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const e = i, l = o(() => 512 + 2 * e.strokeWidth), a = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2);
return (x, w) => (s(), c("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${l.value} ${l.value}`
}, [
m,
t("g", _, [
e.flagName ? (s(), c("title", g, d(e.flagName), 1)) : h("", !0),
k
]),
t("g", u, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, z)
])
], 8, v));
}
});
export {
H as default
};
//# sourceMappingURL=my-d73e3360.js.map