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.45 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as s, createElementBlock as c, createElementVNode as t, toDisplayString as n, createCommentVNode as h, normalizeStyle as f, createStaticVNode as m } from "vue";
const p = ["viewBox"], v = /* @__PURE__ */ t("mask", { id: "51e6a377-be57-4d21-b78d-7b421a629dbf" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), _ = { mask: "url(#51e6a377-be57-4d21-b78d-7b421a629dbf)" }, g = { key: 0 }, k = /* @__PURE__ */ m('<path fill="#6da544" d="M0 0h512v512H0z"></path><g fill="#ffda44"><path d="m393 367.3 7 14.7 15.9-3.7-7.1 14.7 12.7 10-15.9 3.7V423L393 412.8 380.3 423v-16.3l-15.9-3.6 12.8-10.1-7.1-14.7L386 382zm-65.4-155.8 7 14.7 16-3.7-7.2 14.7 12.8 10-16 3.6.1 16.3-12.7-10.2-12.7 10.2v-16.3l-15.8-3.5 12.7-10.1-7-14.7 15.8 3.7zm65.4-89 7 14.6 15.9-3.6-7.1 14.6 12.7 10.1-15.9 3.6v16.3L393 167.9l-12.7 10.2v-16.3l-15.9-3.6 12.8-10-7.1-14.7L386 137zm57 66.7 7 14.7 16-3.7-7.1 14.7 12.7 10.1-15.9 3.6v16.3l-12.6-10.2-12.7 10.2v-16.3l-15.9-3.6 12.8-10.1-7.1-14.7L443 204zm-40.8 78 5.6 17h17.9l-14.5 10.4 5.5 17-14.5-10.5-14.4 10.6 5.5-17-14.5-10.6h18z"></path><path d="M283.8 328.3a72.3 72.3 0 1 1 34.4-136 89 89 0 1 0 0 127.3 72 72 0 0 1-34.4 8.7zM161 100.2a44.5 44.5 0 0 0-77.1 0h77zm.1.2-38.7 38.7-38.7-38.7a44.3 44.3 0 0 0-5.8 22 44.5 44.5 0 1 0 89 0 44.3 44.3 0 0 0-5.8-22z"></path></g><path fill="#a2001d" d="M111.3 128v37.6a44.6 44.6 0 0 0 11.1 1.4c3.9 0 7.6-.5 11.2-1.4V128h-22.3z"></path>', 3), u = { fill: "none" }, z = ["r"], y = /* @__PURE__ */ d({
__name: "cc",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const e = i, l = o(() => 512 + 2 * e.strokeWidth), a = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2);
return (b, x) => (s(), c("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${l.value} ${l.value}`
}, [
v,
t("g", _, [
e.flagName ? (s(), c("title", g, n(e.flagName), 1)) : h("", !0),
k
]),
t("g", u, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, z)
])
], 8, p));
}
});
export {
y as default
};
//# sourceMappingURL=cc-c4133f68.js.map