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.79 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as a, createCommentVNode as f, normalizeStyle as _ } from "vue";
const h = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "e697a0b3-cde3-4c79-85ff-ec794d58dd45" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#e697a0b3-cde3-4c79-85ff-ec794d58dd45)" }, v = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#338af3",
d: "M0 0h512v178l-31 76.9 31 79.1v178H0V334l37-80.7L0 178z"
}, null, -1), p = /* @__PURE__ */ e("path", {
fill: "#333",
d: "m0 211.5 256-19.2 256 19.2v89l-254.6 20.7L0 300.5z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M0 178h512v33.5H0zm0 122.5h512V334H0z"
}, null, -1), w = { fill: "none" }, x = ["r"], B = /* @__PURE__ */ d({
__name: "bw",
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, z) => (c(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
m,
e("g", u, [
t.flagName ? (c(), i("title", v, a(t.flagName), 1)) : f("", !0),
k,
p,
g
]),
e("g", w, [
e("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, x)
])
], 8, h));
}
});
export {
B as default
};
//# sourceMappingURL=bw-769df1f1.js.map