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.17 kB
JavaScript
import { defineComponent as r, computed as o, openBlock as a, createElementBlock as i, createElementVNode as e, toDisplayString as d, createCommentVNode as f, normalizeStyle as h } from "vue";
const _ = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "19313e79-9b9b-4194-8a3f-22baada1820a" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#19313e79-9b9b-4194-8a3f-22baada1820a)" }, k = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#338af3",
d: "M0 0h512v512H0z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "M400.7 258.8H111.3c0 20 17.4 36.2 37.4 36.2h-1.2c0 20 16.2 36.1 36.2 36.1 0 20 16.1 36.2 36.1 36.2h72.4c20 0 36.1-16.2 36.1-36.2 20 0 36.2-16.2 36.2-36.1h-1.2c20 0 37.4-16.2 37.4-36.2z"
}, null, -1), v = /* @__PURE__ */ e("path", {
fill: "#338af3",
d: "M356.2 211.5a100.2 100.2 0 0 1-200.4 0"
}, null, -1), x = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "m332.5 211.5-31.3 14.7 16.7 30.3-34-6.5-4.3 34.3L256 259l-23.6 25.3L228 250l-34 6.5 16.6-30.3-31.2-14.7 31.2-14.7-16.6-30.3 34 6.5 4.3-34.3 23.6 25.2 23.6-25.2L284 173l34-6.5-16.6 30.3z"
}, null, -1), w = { fill: "none" }, b = ["r"], B = /* @__PURE__ */ r({
__name: "kz",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(c) {
const t = c, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), n = o(() => 256 + t.strokeWidth / 2);
return (y, z) => (a(), 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", m, [
t.flagName ? (a(), i("title", k, d(t.flagName), 1)) : f("", !0),
p,
g,
v,
x
]),
e("g", w, [
e("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: h({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, b)
])
], 8, _));
}
});
export {
B as default
};
//# sourceMappingURL=kz-39afe2f1.js.map