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) • 1.95 kB
JavaScript
import { defineComponent as h, computed as o, openBlock as s, createElementBlock as i, createElementVNode as t, toDisplayString as d, createCommentVNode as f, normalizeStyle as n, createStaticVNode as p } from "vue";
const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "14917d65-7844-4bba-8f2a-465460bf2c1f" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), k = { mask: "url(#14917d65-7844-4bba-8f2a-465460bf2c1f)" }, u = { key: 0 }, v = /* @__PURE__ */ p('<path fill="#496e2d" d="M0 0h512v256L256 512H0z"></path><path fill="#ff9811" d="M473 167h-66.7a22.3 22.3 0 0 0-44.6 0H295a23 23 0 0 0 23 22.2h-.8c0 12.3 10 22.3 22.3 22.3 0 12.3 10 22.2 22.2 22.2h44.6c12.3 0 22.2-10 22.2-22.2 12.3 0 22.3-10 22.3-22.3h-.8a23 23 0 0 0 23-22.2z"></path><path fill="#333" d="M341.3 256h85.4l21.1 126.3L426.7 512h-85.4l-23.5-128z"></path><path fill="#d80027" d="M256 256h85.3v256H256z"></path><path fill="#ff9811" d="M426.7 256H512v256h-85.3z"></path>', 5), g = { fill: "none" }, x = ["r"], y = /* @__PURE__ */ h({
__name: "zm",
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 (z, w) => (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", k, [
e.flagName ? (s(), i("title", u, d(e.flagName), 1)) : f("", !0),
v
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: n({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, _));
}
});
export {
y as default
};
//# sourceMappingURL=zm-f26eaead.js.map