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.64 kB
JavaScript
import { defineComponent as n, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as r, createCommentVNode as f, normalizeStyle as h } from "vue";
const _ = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "edd6c3f6-d943-44c3-984f-09b8aa5fa53d" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#edd6c3f6-d943-44c3-984f-09b8aa5fa53d)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#496e2d",
d: "M0 0h512v512H0z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M300.5 245.3c-6.3 0-12.2 1.3-17.8 3.3 3-6.8 5.1-14.3 5.1-22.4 0-31.8-31.8-55.6-31.8-55.6s-31.8 23.8-31.8 55.6c0 8 2 15.6 5 22.4-5.5-2-11.4-3.3-17.7-3.3-31.8 0-55.7 31.8-55.7 31.8s23.9 31.8 55.7 31.8C230 309 246 298 256 289c10 9.1 25.9 20 44.5 20 31.8 0 55.7-31.8 55.7-31.8s-23.9-31.8-55.7-31.8z"
}, null, -1), v = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "m256 100.2 6.6 20.2h21.2l-17.2 12.5 6.6 20.2-17.2-12.5-17.2 12.5 6.6-20.2-17.2-12.5h21.2zm-80.8 35.3 12.6 11.4 14.7-8.5-6.9 15.5 12.7 11.4-17-1.8-6.9 15.6-3.5-16.7-17-1.7 14.8-8.5zM116 194.7l16.6 3.5 8.5-14.7 1.8 17 16.6 3.5-15.5 6.9 1.8 16.9-11.4-12.6-15.5 6.9 8.5-14.8zm220.8-59.2L324.2 147l-14.7-8.5 6.9 15.5-12.7 11.4 17-1.8 6.9 15.6 3.5-16.7 17-1.7-14.8-8.5zm59.2 59.2-16.6 3.5-8.5-14.7-1.8 17-16.6 3.5 15.5 6.9-1.8 16.9 11.4-12.6 15.5 6.9-8.5-14.8z"
}, null, -1), z = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M256 398c25.3 0 48.5-8.5 67.2-22.6H188.8c18.7 14.1 42 22.6 67.2 22.6zm-102-66.8a111.3 111.3 0 0 0 13.2 22.6h177.6a111.3 111.3 0 0 0 13.2-22.6z"
}, null, -1), x = { fill: "none" }, w = ["r"], C = /* @__PURE__ */ n({
__name: "mo",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(a) {
const t = a, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), d = 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}`
}, [
m,
e("g", u, [
t.flagName ? (c(), i("title", p, r(t.flagName), 1)) : f("", !0),
k,
g,
v,
z
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: d.value,
fill: "none",
style: h({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, _));
}
});
export {
C as default
};
//# sourceMappingURL=mo-e7525ade.js.map