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.04 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as s, createElementBlock as c, createElementVNode as t, toDisplayString as n, createCommentVNode as h, normalizeStyle as f, createStaticVNode as p } from "vue";
const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "eeda43b7-88eb-41c3-90e8-cfa6371e4ee6" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), g = { mask: "url(#eeda43b7-88eb-41c3-90e8-cfa6371e4ee6)" }, k = { key: 0 }, u = /* @__PURE__ */ p('<path fill="#d80027" d="M0 0h512v256l-253 36.6L0 256z"></path><path fill="#333" d="M0 256h512v256H0z"></path><g fill="#ffda44"><path d="m220.9 203.6 21.7 15.8-8.3 25.5L256 229l21.7 15.7-8.3-25.5 21.7-15.7h-26.8L256 178l-8.3 25.5z"></path><path d="M320 145.1a127.2 127.2 0 0 0-64-17v33.3a94 94 0 0 1 47.3 12.7 94.7 94.7 0 0 1-94.6 163.8 94 94 0 0 1-31.6-29.8l-27.9 18.4a128.1 128.1 0 0 0 217.7-6.5A128.1 128.1 0 0 0 320 145.1z"></path><path d="M182.2 233.7a33.4 33.4 0 0 0 13.3 45.4l108.4 59.2c-7.4 13.5-3.4 30 10 37.3l29.3 16a27.8 27.8 0 0 0 37.8-11l16-29.3z"></path></g>', 3), v = { fill: "none" }, x = ["r"], N = /* @__PURE__ */ d({
__name: "ao",
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 (w, z) => (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", g, [
e.flagName ? (s(), c("title", k, n(e.flagName), 1)) : h("", !0),
u
]),
t("g", v, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, _));
}
});
export {
N as default
};
//# sourceMappingURL=ao-bda7985c.js.map