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.95 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as c, createElementBlock as s, createElementVNode as t, toDisplayString as f, createCommentVNode as n, normalizeStyle as h, createStaticVNode as p } from "vue";
const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "ffc1ffb9-dfdb-427c-814f-81ac2c4944bd" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), k = { mask: "url(#ffc1ffb9-dfdb-427c-814f-81ac2c4944bd)" }, u = { key: 0 }, v = /* @__PURE__ */ p('<path fill="#eee" d="m0 401.9 160.6-237.1L401.9 0H449l63 63v47.3L350.3 339.2 110.3 512H63L0 449z"></path><path fill="#a2001d" d="M0 512h63L512 63V0h-63L0 449z"></path><path fill="#0052b4" d="M0 0v401.9L401.9 0z"></path><path fill="#496e2d" d="M512 512V110.3L110.3 512z"></path><path fill="#ffda44" d="m211.5 144.7-28.7 13.5L198 186l-31.2-6-4 31.5-21.6-23.2-21.7 23.2-4-31.5-31 6 15.2-27.8L71 144.7l28.7-13.5-15.3-27.8 31.1 6 4-31.5 21.7 23.2L163 78l4 31.5 31-6-15.2 27.8z"></path>', 5), g = { fill: "none" }, L = ["r"], z = /* @__PURE__ */ d({
__name: "na",
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 (x, b) => (c(), s("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${l.value} ${l.value}`
}, [
m,
t("g", k, [
e.flagName ? (c(), s("title", u, f(e.flagName), 1)) : n("", !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, L)
])
], 8, _));
}
});
export {
z as default
};
//# sourceMappingURL=na-3a320c3d.js.map