vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
55 lines (54 loc) • 1.78 kB
JavaScript
import { defineComponent as n, computed as o, openBlock as i, createElementBlock as r, createElementVNode as e, toDisplayString as a, createCommentVNode as d, normalizeStyle as h } from "vue";
const _ = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "feaff0ef-e2f6-4f23-ad2c-2068f78f8395" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#feaff0ef-e2f6-4f23-ad2c-2068f78f8395)" }, k = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M160 0h192l32 256-32 256H160l-32-256Z"
}, null, -1), v = /* @__PURE__ */ e("path", {
fill: "#333",
d: "M0 0h160v512H0Z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M352 0h160v512H352ZM229 176l107 107H176l107-107v160L176 229h160L229 336Z"
}, null, -1), x = { fill: "none" }, w = ["r"], N = /* @__PURE__ */ n({
__name: "ru-ud",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(c) {
const t = c, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), f = o(() => 256 + t.strokeWidth / 2);
return (y, W) => (i(), r("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 ? (i(), r("title", k, a(t.flagName), 1)) : d("", !0),
p,
v,
g
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: f.value,
fill: "none",
style: h({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, _));
}
});
export {
N as default
};
//# sourceMappingURL=ru-ud-129a96b8.js.map