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.14 kB
JavaScript
import { defineComponent as r, computed as l, openBlock as s, createElementBlock as i, createElementVNode as t, toDisplayString as h, createCommentVNode as f, normalizeStyle as n, createStaticVNode as p } from "vue";
const m = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "aebc1ef4-29d5-473a-8b0d-ff22abe23866" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), v = { mask: "url(#aebc1ef4-29d5-473a-8b0d-ff22abe23866)" }, k = { key: 0 }, u = /* @__PURE__ */ p('<path fill="#6da544" d="M31.4 0H512v512H31.4z"></path><path fill="#ffda44" d="M57.8 73.3H512v73.3l-65.1 110 65.1 110v73.3H57.8z"></path><path fill="#d80027" d="M132 146.6h380v73.3l-27 36 27 37.3v73.3H132z"></path><path fill="#eee" d="M0 0v512l279.8-256z"></path><path fill="#d80027" d="m103 189.2 16.5 51h53.6l-43.4 31.6 16.6 51-43.4-31.5-43.4 31.5 16.6-51-43.4-31.6h53.6z"></path><path fill="#ffda44" d="m148.5 260.2-43.2-15.3-3.4-31a16.7 16.7 0 1 0-32.5 7.6l-12 12.1h21.5c0 22.4-16.7 22.4-16.7 44.7l9.2 22.2h55.7l9.3-22.2a22.2 22.2 0 0 0 1.7-6.6c8-3.2 10.4-11.5 10.4-11.5z"></path><path fill="#333" d="m31.4 0 220 220H512v73.2H250.2L31.4 512H0l256-256L0 0z"></path>', 7), g = { fill: "none" }, z = ["r"], b = /* @__PURE__ */ r({
__name: "zw",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(c) {
const e = c, a = l(() => 512 + 2 * e.strokeWidth), o = l(() => -e.strokeWidth), d = l(() => 256 + e.strokeWidth / 2);
return (w, x) => (s(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${o.value} ${o.value} ${a.value} ${a.value}`
}, [
_,
t("g", v, [
e.flagName ? (s(), i("title", k, h(e.flagName), 1)) : f("", !0),
u
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: d.value,
fill: "none",
style: n({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, z)
])
], 8, m));
}
});
export {
b as default
};
//# sourceMappingURL=zw-9d9ad178.js.map