vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
59 lines (58 loc) • 2.52 kB
JavaScript
import { defineComponent as d, computed as t, openBlock as a, createElementBlock as c, createElementVNode as e, toDisplayString as n, createCommentVNode as r, normalizeStyle as _ } from "vue";
const m = ["viewBox"], v = /* @__PURE__ */ e("mask", { id: "63d1a97f-cdac-4aca-a474-bee6d5d77248" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), f = { mask: "url(#63d1a97f-cdac-4aca-a474-bee6d5d77248)" }, u = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M256.6 28.8 512 73v73.2l-30.6 37 30.6 36.1v73.2l-37.5 35.9 37.5 37.2v73.2l-242 36.7L0 438.9v-73.2l28.2-35.3L0 292.6v-73.2z"
}, null, -1), z = /* @__PURE__ */ e("path", {
fill: "#6da544",
d: "m256 0-56.1 73.1H512V0zm-56.1 146.3 56.1 73.1h256v-73.1zM0 292.6v73.1h512v-73.1zm0 146.3V512h512v-73.1z"
}, null, -1), k = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M0 0h256v219.4H0z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M128 196.3 116.9 174v-44.5l27.8-22.3 27.8 22.3v33.4l11.2-11.2V174l-22.3 22.3zM68.1 128l3 9h9.5l-7.7 5.7 3 9-7.8-5.6-7.7 5.6 3-9-7.7-5.6h9.5zm22.3-22.3 3 9.1h9.5l-7.7 5.6 3 9-7.8-5.5-7.7 5.6 3-9-7.8-5.7h9.5zm22.3-22.2 2.9 9h9.5l-7.7 5.7 3 9-7.7-5.6-7.8 5.6 3-9-7.7-5.7h9.5zM221.3 128l-3 9h-9.5l7.7 5.7-3 9 7.8-5.6 7.7 5.6-3-9 7.7-5.6h-9.5zM199 105.7l-3 9.1h-9.5l7.7 5.6-3 9 7.8-5.5 7.7 5.6-3-9 7.8-5.7h-9.6zm-22.3-22.2-3 9h-9.4l7.7 5.7-3 9 7.7-5.6 7.8 5.6-3-9 7.7-5.7h-9.5zm-32-11.2-3 9.1h-9.5L140 87l-3 9 7.8-5.5 7.7 5.6-3-9 7.8-5.7h-9.6z"
}, null, -1), x = { fill: "none" }, w = ["r"], B = /* @__PURE__ */ d({
__name: "ge-ab",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const l = i, o = t(() => 512 + 2 * l.strokeWidth), s = t(() => -l.strokeWidth), h = t(() => 256 + l.strokeWidth / 2);
return (M, y) => (a(), c("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${o.value} ${o.value}`
}, [
v,
e("g", f, [
l.flagName ? (a(), c("title", u, n(l.flagName), 1)) : r("", !0),
p,
z,
k,
g
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: h.value,
fill: "none",
style: _({ stroke: l.strokeColor, strokeWidth: l.strokeWidth })
}, null, 12, w)
])
], 8, m));
}
});
export {
B as default
};
//# sourceMappingURL=ge-ab-d8c36b0a.js.map