vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
61 lines (60 loc) • 2.33 kB
JavaScript
import { defineComponent as n, computed as o, openBlock as a, createElementBlock as c, createElementVNode as e, toDisplayString as f, createCommentVNode as d, normalizeStyle as _ } from "vue";
const h = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "2ff88a24-f172-4d38-a402-9e6e2ffea2df" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#2ff88a24-f172-4d38-a402-9e6e2ffea2df)" }, k = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M0 0h512v512H0z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "M381.2 256 330 280l27.3 49.6-55.6-10.6-7 56.1-38.7-41.3-38.7 41.3-7-56.1-55.6 10.6 27.3-49.5-51.2-24.1 51.2-24-27.3-49.6 55.6 10.6 7-56.1 38.7 41.3 38.7-41.3 7 56.1 55.6-10.6-27.3 49.5z"
}, null, -1), v = /* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "77.9",
fill: "#d80027"
}, null, -1), x = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "M217 256c-1.8 0-3.7.1-5.5.3a44.3 44.3 0 0 0 10.4 28.3 78 78 0 0 1 15-24.9A55.4 55.4 0 0 0 217 256zm24 42a44.4 44.4 0 0 0 30 0c-2.6-10-7.8-19-15-26-7.2 7-12.4 16-15 26zm53.6-64.3a44.5 44.5 0 0 0-77.2 0 77.4 77.4 0 0 1 38.6 10.5 77.4 77.4 0 0 1 38.6-10.5zm-19.6 26a78 78 0 0 1 15.1 25 44.3 44.3 0 0 0 10.4-28.4 55.8 55.8 0 0 0-5.5-.3 55.3 55.3 0 0 0-20 3.7z"
}, null, -1), z = { fill: "none" }, w = ["r"], N = /* @__PURE__ */ n({
__name: "kg",
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 (y, W) => (a(), c("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 ? (a(), c("title", k, f(t.flagName), 1)) : d("", !0),
p,
g,
v,
x
]),
e("g", z, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, h));
}
});
export {
N as default
};
//# sourceMappingURL=kg-64f443cd.js.map