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.05 kB
JavaScript
import { defineComponent as h, computed as l, openBlock as c, createElementBlock as i, createElementVNode as t, toDisplayString as d, createCommentVNode as f, normalizeStyle as n, createStaticVNode as p } from "vue";
const v = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "c31acc17-9ebe-4352-ad40-61a8a6f9d2ef" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), _ = { mask: "url(#c31acc17-9ebe-4352-ad40-61a8a6f9d2ef)" }, u = { key: 0 }, k = /* @__PURE__ */ p('<path fill="#ffda44" d="M0 256 256 0h256v512H0z"></path><path fill="#eee" d="M0 0v32l32 32L0 96v160h32l32-32 32 32h32l42-16 41 16h45l-8-16 8-15v-14l-16-42 16-41V96l-32-32 32-32V0H96L64 32 32 0Z"></path><path fill="#0052b4" d="M128 256v-83l83 83zm128-45-83-83h83z"></path><path fill="#d80027" d="m128 128 128 128v-31l-97-97Z"></path><path fill="#d80027" d="M32 0v32H0v64h32v160h64V96h160V32H96V0Z"></path><circle cx="64" cy="64" r="48" fill="#0052b4"></circle><path fill="#ffda44" d="m50 198 14-44 15 44-38-27h47zM162 86l14-44 15 44-38-27h47ZM64 17l28 86-73-53h90l-73 53Z"></path>', 7), g = { fill: "none" }, x = ["r"], z = /* @__PURE__ */ h({
__name: "nu",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(s) {
const e = s, o = l(() => 512 + 2 * e.strokeWidth), a = l(() => -e.strokeWidth), r = l(() => 256 + e.strokeWidth / 2);
return (V, w) => (c(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${o.value} ${o.value}`
}, [
m,
t("g", _, [
e.flagName ? (c(), i("title", u, d(e.flagName), 1)) : f("", !0),
k
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: n({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, v));
}
});
export {
z as default
};
//# sourceMappingURL=nu-60535c58.js.map