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.92 kB
JavaScript
import { defineComponent as c, computed as l, openBlock as i, createElementBlock as r, createElementVNode as e, toDisplayString as d, createCommentVNode as f, normalizeStyle as h } from "vue";
const _ = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "892348e1-fabb-4f40-b76a-6433e7237680" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#892348e1-fabb-4f40-b76a-6433e7237680)" }, v = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#0052b4",
d: "M64 0 0 64v160l32 32-32 32v224l256-32 256 32V288l-32-32 32-32V64L448 0H288l-32 32-32-32H64z"
}, null, -1), k = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M256 256 0 512h512z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "M0 224v64l512-64v64z"
}, null, -1), x = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "M256 256 0 64V0h64zm0 0L448 0h64v64zm0 0L224 0h64z"
}, null, -1), z = { fill: "none" }, b = ["r"], B = /* @__PURE__ */ c({
__name: "re",
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 (w, y) => (i(), r("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(), r("title", v, d(t.flagName), 1)) : f("", !0),
p,
k,
g,
x
]),
e("g", z, [
e("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: h({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, b)
])
], 8, _));
}
});
export {
B as default
};
//# sourceMappingURL=re-9612cef4.js.map