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 d, computed as o, openBlock as s, createElementBlock as i, createElementVNode as t, toDisplayString as n, createCommentVNode as h, normalizeStyle as f, createStaticVNode as p } from "vue";
const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "9449a69c-344a-40d2-820e-9ea70d24e544" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), v = { mask: "url(#9449a69c-344a-40d2-820e-9ea70d24e544)" }, k = { key: 0 }, u = /* @__PURE__ */ p('<path fill="#eee" d="M0 0h512v512H0z"></path><path fill="#ffda44" d="M399 0 167 167 0 399v45l68 68h45l232-167 167-232V68L444 0Z"></path><path fill="#333" d="M444 0 0 444v68h68L512 68V0Z"></path><path fill="#338af3" d="m113 512 399-399v399z"></path><path fill="#6da544" d="M0 399V0h399Z"></path>', 5), g = { fill: "none" }, x = ["r"], V = /* @__PURE__ */ d({
__name: "tz",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(r) {
const e = r, l = o(() => 512 + 2 * e.strokeWidth), a = o(() => -e.strokeWidth), c = o(() => 256 + e.strokeWidth / 2);
return (w, y) => (s(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${l.value} ${l.value}`
}, [
m,
t("g", v, [
e.flagName ? (s(), i("title", k, n(e.flagName), 1)) : h("", !0),
u
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: c.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, _));
}
});
export {
V as default
};
//# sourceMappingURL=tz-f7960329.js.map