vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
51 lines (50 loc) • 1.85 kB
JavaScript
import { defineComponent as f, computed as o, openBlock as c, createElementBlock as r, createElementVNode as e, toDisplayString as n, createCommentVNode as d, normalizeStyle as _ } from "vue";
const h = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "06dd3f44-ff30-44e4-9a2e-fcfa516ec0f4" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#06dd3f44-ff30-44e4-9a2e-fcfa516ec0f4)" }, k = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#496e2d",
d: "M0 0h512v512H0z"
}, null, -1), g = /* @__PURE__ */ e("g", { fill: "#ffda44" }, [
/* @__PURE__ */ e("path", { d: "M256 295.8a89 89 0 0 1-87-70 89.4 89.4 0 0 0-2 19 89 89 0 1 0 178 0 89.4 89.4 0 0 0-2-19 89 89 0 0 1-87 70z" }),
/* @__PURE__ */ e("path", { d: "m256 178 8.3 25.6H291l-21.7 15.8 8.3 25.5L256 229l-21.7 15.8 8.3-25.5-21.7-15.8h26.8z" })
], -1), v = { fill: "none" }, x = ["r"], z = /* @__PURE__ */ f({
__name: "mr",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const t = i, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), a = o(() => 256 + t.strokeWidth / 2);
return (w, y) => (c(), r("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
m,
e("g", u, [
t.flagName ? (c(), r("title", k, n(t.flagName), 1)) : d("", !0),
p,
g
]),
e("g", v, [
e("circle", {
cx: "256",
cy: "256",
r: a.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, x)
])
], 8, h));
}
});
export {
z as default
};
//# sourceMappingURL=mr-e04d34c9.js.map