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.77 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as s, createElementBlock as i, createElementVNode as t, toDisplayString as h, createCommentVNode as n, normalizeStyle as f, createStaticVNode as p } from "vue";
const m = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "78560bb5-caca-4b40-813f-d5e81da3b7a4" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), v = { mask: "url(#78560bb5-caca-4b40-813f-d5e81da3b7a4)" }, k = { key: 0 }, u = /* @__PURE__ */ p('<path fill="#d80027" d="M256 0h256v512H0V256Z"></path><path fill="#eee" d="M0 0h256v256H0Z"></path><path fill="#0052b4" d="M0 0h75v224H0Z"></path><path fill="#d80027" d="M149 0h75v224h-75z"></path><path fill="#eee" d="m384 232-72-72h144zm-24 24-72-72v144zm24 24-72 72h144zm24-24 72-72v144z"></path>', 5), g = { fill: "none" }, b = ["r"], y = /* @__PURE__ */ d({
__name: "wf",
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 (w, x) => (s(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${l.value} ${l.value}`
}, [
_,
t("g", v, [
e.flagName ? (s(), i("title", k, h(e.flagName), 1)) : n("", !0),
u
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, b)
])
], 8, m));
}
});
export {
y as default
};
//# sourceMappingURL=wf-28b3574e.js.map