vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
44 lines (43 loc) • 1.77 kB
JavaScript
import { defineComponent as f, computed as o, openBlock as c, createElementBlock as s, createElementVNode as t, toDisplayString as n, createCommentVNode as d, normalizeStyle as h, createStaticVNode as m } from "vue";
const p = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "1e040a27-46e5-4e5f-9af9-74fe3874fcab" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), k = { mask: "url(#1e040a27-46e5-4e5f-9af9-74fe3874fcab)" }, u = { key: 0 }, v = /* @__PURE__ */ m('<path fill="#eee" d="M0 128V0h512v128L299 512h-86z"></path><circle cx="256" cy="213" r="57" fill="#ffda44"></circle><path fill="#eee" d="M185 213h142l-71 128Z"></path><path fill="#d80027" d="M256 341 142 235h228z"></path><path fill="#0052b4" d="m0 128 213 213v171H0Zm512 0L299 341v171h213z"></path>', 5), g = { fill: "none" }, x = ["r"], W = /* @__PURE__ */ f({
__name: "mf",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const e = i, l = o(() => 512 + 2 * e.strokeWidth), a = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2);
return (w, y) => (c(), s("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${l.value} ${l.value}`
}, [
_,
t("g", k, [
e.flagName ? (c(), s("title", u, n(e.flagName), 1)) : d("", !0),
v
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: h({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, p));
}
});
export {
W as default
};
//# sourceMappingURL=mf-0d6d8d3d.js.map