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 kB
JavaScript
import { defineComponent as r, computed as l, openBlock as i, createElementBlock as c, createElementVNode as e, toDisplayString as d, createCommentVNode as h, normalizeStyle as _ } from "vue";
const f = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "f7c322d8-56af-4b07-a988-a86c99255022" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#f7c322d8-56af-4b07-a988-a86c99255022)" }, p = { key: 0 }, v = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M0 0h171l85 32 85-32h171v171l-32 85 32 85v171H341l-85-32-85 32H0V341l32-85-32-85Z"
}, null, -1), k = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M171 0h170v512H171z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#0052b4",
d: "M512 171v170H0V171z"
}, null, -1), z = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "m236 247 52-37h-64l52 37-20-61zm-45 79 52-37h-64l52 37-20-61zm90 0 52-37h-64l52 37-20-61zm74-47 52-37h-64l52 37-20-61zm-238 0 52-37h-64l52 37-20-61z"
}, null, -1), x = { fill: "none" }, w = ["r"], N = /* @__PURE__ */ r({
__name: "an",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(a) {
const t = a, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), n = l(() => 256 + t.strokeWidth / 2);
return (y, W) => (i(), c("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${o.value} ${o.value}`
}, [
m,
e("g", u, [
t.flagName ? (i(), c("title", p, d(t.flagName), 1)) : h("", !0),
v,
k,
g,
z
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, f));
}
});
export {
N as default
};
//# sourceMappingURL=an-09ab4c18.js.map