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) • 1.86 kB
JavaScript
import { defineComponent as r, computed as o, openBlock as a, createElementBlock as i, createElementVNode as e, toDisplayString as d, createCommentVNode as _, normalizeStyle as h } from "vue";
const f = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "34cad71d-3fc5-4671-af56-5a6a2b82a374" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#34cad71d-3fc5-4671-af56-5a6a2b82a374)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#a2001d",
d: "M0 0h167l52.3 252L167 512H0z"
}, null, -1), v = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "m167 167 170.8-44.6L512 167v178l-173.2 36.9L167 345z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#6da544",
d: "M167 0h345v167H167z"
}, null, -1), x = /* @__PURE__ */ e("path", {
fill: "#333",
d: "M167 345h345v167H167z"
}, null, -1), w = { fill: "none" }, y = ["r"], N = /* @__PURE__ */ r({
__name: "ae",
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 (z, W) => (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", p, d(t.flagName), 1)) : _("", !0),
k,
v,
g,
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, y)
])
], 8, f));
}
});
export {
N as default
};
//# sourceMappingURL=ae-19a4e35b.js.map