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.09 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as s, createElementBlock as i, createElementVNode as t, toDisplayString as n, createCommentVNode as h, normalizeStyle as f, createStaticVNode as p } from "vue";
const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "b6d095bf-ab1b-4565-a36a-028e08428ebd" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), v = { mask: "url(#b6d095bf-ab1b-4565-a36a-028e08428ebd)" }, u = { key: 0 }, g = /* @__PURE__ */ p('<path fill="#d80027" d="M512 222.6V0H0l215.6 239.4z"></path><path fill="#6da544" d="M512 289.4V512H0l216.5-240z"></path><path fill="#333" d="m0 0 222.6 222.6H512v22.2l-10.9 11.8L512 267v22.4H222.6L0 512v-31.5l8-23-8-8.6V63l9.5-10.4-9.5-21z"></path><g fill="#ffda44"><path d="M512 244.8H213.2L0 31.7V63l192.8 193L0 449v31.5L213.2 267H512z"></path><path d="M62.2 310.6V289a38.8 38.8 0 0 0 38.8-38.8A27.5 27.5 0 0 0 73.5 223a18.7 18.7 0 0 0-18.7 18.7 12 12 0 0 0 12 12c3.7 0 6.8-3 6.8-6.8H95A28.2 28.2 0 0 1 66.8 275c-18.4 0-33.4-15-33.4-33.4 0-22.2 18-40.2 40-40.2a49 49 0 0 1 49 49c0 33.1-27 60.2-60.2 60.2z"></path></g>', 4), k = { fill: "none" }, b = ["r"], z = /* @__PURE__ */ d({
__name: "vu",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(c) {
const e = c, l = o(() => 512 + 2 * e.strokeWidth), a = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2);
return (x, V) => (s(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${l.value} ${l.value}`
}, [
m,
t("g", v, [
e.flagName ? (s(), i("title", u, n(e.flagName), 1)) : h("", !0),
g
]),
t("g", k, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, b)
])
], 8, _));
}
});
export {
z as default
};
//# sourceMappingURL=vu-309b6cf4.js.map