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.81 kB
JavaScript
import { defineComponent as d, computed as l, openBlock as i, createElementBlock as r, createElementVNode as t, toDisplayString as n, createCommentVNode as f, normalizeStyle as h, createStaticVNode as _ } from "vue";
const m = ["viewBox"], p = /* @__PURE__ */ t("mask", { id: "500d5d1b-722a-4add-86b6-8a621ddc0637" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), k = { mask: "url(#500d5d1b-722a-4add-86b6-8a621ddc0637)" }, u = { key: 0 }, v = /* @__PURE__ */ _('<path fill="#eee" d="m0 160 256-32 256 32v192l-256 32L0 352z"></path><path fill="#ff9811" d="M0 0h512v160H0Z"></path><path fill="#6da544" d="M0 352h512v160H0Z"></path><circle cx="256" cy="256" r="72" fill="#0052b4"></circle><circle cx="256" cy="256" r="48" fill="#eee"></circle><circle cx="256" cy="256" r="24" fill="#0052b4"></circle>', 6), g = { fill: "none" }, x = ["r"], N = /* @__PURE__ */ d({
__name: "in",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(s) {
const e = s, c = l(() => 512 + 2 * e.strokeWidth), o = l(() => -e.strokeWidth), a = l(() => 256 + e.strokeWidth / 2);
return (y, w) => (i(), r("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${o.value} ${o.value} ${c.value} ${c.value}`
}, [
p,
t("g", k, [
e.flagName ? (i(), r("title", u, n(e.flagName), 1)) : f("", !0),
v
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: a.value,
fill: "none",
style: h({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, m));
}
});
export {
N as default
};
//# sourceMappingURL=in-bf47379f.js.map