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.51 kB
JavaScript
import { defineComponent as s, computed as e, openBlock as a, createElementBlock as o, createElementVNode as h, toDisplayString as f, createCommentVNode as d, normalizeStyle as r, createStaticVNode as p } from "vue";
const n = ["viewBox"], _ = /* @__PURE__ */ h("mask", { id: "a03457f1-39c5-43c0-8232-e6b2886ccb14" }, [
/* @__PURE__ */ h("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#a03457f1-39c5-43c0-8232-e6b2886ccb14)" }, k = { key: 0 }, u = /* @__PURE__ */ p('<path fill="#eee" d="M0 73V0h73l439 439v73h-73Z"></path><path fill="#ffda44" d="M73 0v73h73v73h73v73h74v74h73v73h73v73h73v-73l-73-73-73-73v-1l-73-73-74-73-73-73H73z"></path><path fill="#ff9811" d="M146 0v73h73v73h74v73h73v74h73v73h73v-73l-73-74L293 73 219 0h-73z"></path><path fill="#d80027" d="M219 0v73h74v73h73v73h73v74h73v-74l-73-73-73-73-73-73h-74z"></path><path fill="#4a1f63" d="M293 0v73h73v73h73v73h73v-73l-73-73-73-73h-73z"></path><path fill="#0052b4" d="M366 0v73h73v73h73V73L439 0h-73z"></path><path fill="#6da544" d="M439 0v73h73V0Zm0 512v-73h-74v-73h-73v-73h-73v-74h-73v-73H73V73H0v73l73 73 73 73v1l73 73 73 73 73 73z"></path><path fill="#0052b4" d="M366 512v-73h-74v-73h-73v-73h-73v-74H73v-73H0v73l73 74 146 146 73 73z"></path><path fill="#4a1f63" d="M292 512v-73h-73v-73h-73v-73H73v-74H0v74l73 73 73 73 73 73z"></path><path fill="#d80027" d="M219 512v-73h-73v-73H73v-74H0v74l73 73 73 73z"></path><path fill="#ff9811" d="M146 512v-73H73v-73H0v73l73 73z"></path><path fill="#ffda44" d="M73 512v-73H0v73z"></path>', 12), g = { fill: "none" }, z = ["r"], x = /* @__PURE__ */ s({
__name: "wiphala",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const t = i, l = e(() => 512 + 2 * t.strokeWidth), v = e(() => -t.strokeWidth), c = e(() => 256 + t.strokeWidth / 2);
return (H, M) => (a(), o("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${v.value} ${v.value} ${l.value} ${l.value}`
}, [
_,
h("g", m, [
t.flagName ? (a(), o("title", k, f(t.flagName), 1)) : d("", !0),
u
]),
h("g", g, [
h("circle", {
cx: "256",
cy: "256",
r: c.value,
fill: "none",
style: r({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, z)
])
], 8, n));
}
});
export {
x as default
};
//# sourceMappingURL=wiphala-b0d2ab07.js.map