vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
55 lines (54 loc) • 1.76 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as a, createCommentVNode as h, normalizeStyle as _ } from "vue";
const f = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "d15468e3-1d64-4df5-9061-233c562812cb" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), v = { mask: "url(#d15468e3-1d64-4df5-9061-233c562812cb)" }, m = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M0 256 256 0h256v512H0z"
}, null, -1), p = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M0 0h256v256H0z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M167 133.6v-33.4h-33.4v33.4h-33.4V167h33.4v33.3H167V167h33.3v-33.4z"
}, null, -1), x = { fill: "none" }, w = ["r"], B = /* @__PURE__ */ d({
__name: "to",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(r) {
const t = r, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), n = o(() => 256 + t.strokeWidth / 2);
return (y, W) => (c(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
u,
e("g", v, [
t.flagName ? (c(), i("title", m, a(t.flagName), 1)) : h("", !0),
k,
p,
g
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, f));
}
});
export {
B as default
};
//# sourceMappingURL=to-5a22e18f.js.map