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) • 2.46 kB
JavaScript
import { defineComponent as s, computed as l, openBlock as o, createElementBlock as i, createElementVNode as t, toDisplayString as c, createCommentVNode as f, normalizeStyle as p, createStaticVNode as n } from "vue";
const m = ["viewBox"], v = /* @__PURE__ */ t("mask", { id: "d0417b1c-0e5a-4d93-894d-4f70edf8252b" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), _ = { mask: "url(#d0417b1c-0e5a-4d93-894d-4f70edf8252b)" }, g = { key: 0 }, k = /* @__PURE__ */ n('<path fill="#338af3" d="M160 0h352v512H160l-32-256z"></path><path fill="#eee" d="m0 160 80-32 80 32v192l-80 32-80-32z"></path><rect width="160" height="160" fill="#d80027" ry="0"></rect><path fill="#6da544" d="M160 21V0h-20L0 139v21h20z"></path><path fill="#6da544" d="M0 21V0h20l140 139v21h-20z"></path><path fill="#eee" d="M0 64h160v32H0z"></path><path fill="#eee" d="M64 0h32v160H64z"></path><path fill="#d80027" d="M0 512h160V352H0z"></path><path fill="#ffda44" d="M340 146v158h-40c-24 0-24-32-24-32h-96v32h20l147 32 145-32v-24h-80s0 24-24 24h-32V146z"></path><path fill="#ffda44" d="M356 138v32c-31-11-61 8-80-32 33 23 51-10 80 0zm-72 46s-24 24-16 72h-72s32-56 88-72zm16 104h95c-31-48 0-104 0-104h-95s-40 56 0 104zm101-24a96 96 0 0 1 4-64h63s-16 32-1 64zm-101 40h192s-8 0-16 24-16 48-56 48H276c-39 0-52-50-76-72z"></path><rect width="96" height="32" x="32" y="384" fill="#ffda44" rx="16" ry="16"></rect><rect width="96" height="32" x="32" y="448" fill="#ffda44" rx="16" ry="16"></rect>', 12), u = { fill: "none" }, z = ["r"], M = /* @__PURE__ */ s({
__name: "pm",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(d) {
const e = d, h = l(() => 512 + 2 * e.strokeWidth), a = l(() => -e.strokeWidth), r = l(() => 256 + e.strokeWidth / 2);
return (x, y) => (o(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${h.value} ${h.value}`
}, [
v,
t("g", _, [
e.flagName ? (o(), i("title", g, c(e.flagName), 1)) : f("", !0),
k
]),
t("g", u, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: p({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, z)
])
], 8, m));
}
});
export {
M as default
};
//# sourceMappingURL=pm-755a8519.js.map