vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
59 lines (58 loc) • 2.14 kB
JavaScript
import { defineComponent as n, computed as o, openBlock as a, createElementBlock as c, createElementVNode as e, toDisplayString as d, createCommentVNode as f, normalizeStyle as _ } from "vue";
const h = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "8271ecdf-2ebd-4c4e-8149-8a6df5b00a2e" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#8271ecdf-2ebd-4c4e-8149-8a6df5b00a2e)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#6da544",
d: "M0 0h512v512H0z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "M256 100.2 467.5 256 256 411.8 44.5 256z"
}, null, -1), v = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M174.2 221a87 87 0 0 0-7.2 36.3l162 49.8a88.5 88.5 0 0 0 14.4-34c-40.6-65.3-119.7-80.3-169.1-52z"
}, null, -1), x = /* @__PURE__ */ e("path", {
fill: "#0052b4",
d: "M255.7 167a89 89 0 0 0-41.9 10.6 89 89 0 0 0-39.6 43.4 181.7 181.7 0 0 1 169.1 52.2 89 89 0 0 0-9-59.4 89 89 0 0 0-78.6-46.8zM212 250.5a149 149 0 0 0-45 6.8 89 89 0 0 0 10.5 40.9 89 89 0 0 0 120.6 36.2 89 89 0 0 0 30.7-27.3A151 151 0 0 0 212 250.5z"
}, null, -1), w = { fill: "none" }, z = ["r"], B = /* @__PURE__ */ n({
__name: "br",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const t = i, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), r = o(() => 256 + t.strokeWidth / 2);
return (b, y) => (a(), c("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
u,
e("g", m, [
t.flagName ? (a(), c("title", p, d(t.flagName), 1)) : f("", !0),
k,
g,
v,
x
]),
e("g", w, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, z)
])
], 8, h));
}
});
export {
B as default
};
//# sourceMappingURL=br-1298d1db.js.map