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.51 kB
JavaScript
import { defineComponent as n, computed as l, openBlock as c, createElementBlock as a, createElementVNode as e, toDisplayString as r, createCommentVNode as d, normalizeStyle as _ } from "vue";
const f = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "20aa2ba3-cee0-4a99-9225-c9e34570f29c" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#20aa2ba3-cee0-4a99-9225-c9e34570f29c)" }, k = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#0052b4",
d: "M0 0h512v512H0z"
}, null, -1), v = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "m188 133.6 5.6 17h17.9L197 161l5.5 17-14.4-10.5-14.5 10.5 5.5-17-14.4-10.5h17.8zM115.5 256l7 21.3h22.3l-18 13 6.8 21.4-18-13.2-18.1 13.2 6.9-21.3-18.1-13.1h22.3zm0-178 7 21.2h22.3l-18 13.1 6.8 21.3-18-13.2-18.1 13.2 6.9-21.3-18.1-13.1h22.3zM59.8 178l6.9 21.3H89l-18 13.2 6.9 21.2-18.1-13.1-18.1 13.1 7-21.2-18.2-13.2H53z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "m188 133.6 5.6 17h17.9L197 161l5.5 17-14.4-10.5-14.5 10.5 5.5-17-14.4-10.5h17.8zM115.5 256l7 21.3h22.3l-18 13 6.8 21.4-18-13.2-18.1 13.2 6.9-21.3-18.1-13.1h22.3zm0-178 7 21.2h22.3l-18 13.1 6.8 21.3-18-13.2-18.1 13.2 6.9-21.3-18.1-13.1h22.3zM59.8 178l6.9 21.3H89l-18 13.2 6.9 21.2-18.1-13.1-18.1 13.1 7-21.2-18.2-13.2H53z"
}, null, -1), z = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "M411.8 122.4 144.7 345h361.7v-35.8a167.4 167.4 0 0 1-97.9-152.3c0-11.7 1-23.5 3.3-34.5zm94.6 244.9H144.7v33.4h361.7z"
}, null, -1), x = { fill: "none" }, w = ["r"], W = /* @__PURE__ */ n({
__name: "tk",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const t = i, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), h = l(() => 256 + t.strokeWidth / 2);
return (y, H) => (c(), a("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${o.value} ${o.value}`
}, [
m,
e("g", u, [
t.flagName ? (c(), a("title", k, r(t.flagName), 1)) : d("", !0),
p,
v,
g,
z
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: h.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, f));
}
});
export {
W as default
};
//# sourceMappingURL=tk-38bf686f.js.map