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.87 kB
JavaScript
import { defineComponent as h, computed as o, openBlock as a, createElementBlock as c, createElementVNode as t, toDisplayString as n, createCommentVNode as d, normalizeStyle as f, createStaticVNode as p } from "vue";
const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "576147fe-1fc0-4eae-9cb2-e749c0624e4f" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), k = { mask: "url(#576147fe-1fc0-4eae-9cb2-e749c0624e4f)" }, u = { key: 0 }, v = /* @__PURE__ */ p('<path fill="#eee" d="M0 0h256l256 256v256H256L0 256z"></path><path fill="#0052b4" d="M0 256v256h256V256z"></path><path fill="#d80027" d="M256 0h256v256H256z"></path><path fill="#0052b4" d="m152.4 89 16.6 51h53.6l-43.4 31.6 16.6 51-43.4-31.5-43.4 31.5 16.6-51L82.2 140h53.6z"></path><path fill="#d80027" d="m359.6 289.4 16.6 51h53.6L386.4 372l16.6 51-43.4-31.5-43.4 31.6 16.6-51-43.4-31.6H343z"></path>', 5), g = { fill: "none" }, x = ["r"], N = /* @__PURE__ */ h({
__name: "pa",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const e = i, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2);
return (w, z) => (a(), c("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
m,
t("g", k, [
e.flagName ? (a(), c("title", u, n(e.flagName), 1)) : d("", !0),
v
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, _));
}
});
export {
N as default
};
//# sourceMappingURL=pa-87f25291.js.map