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.14 kB
JavaScript
import { defineComponent as r, computed as o, openBlock as c, createElementBlock as s, createElementVNode as t, toDisplayString as d, createCommentVNode as n, normalizeStyle as f, createStaticVNode as p } from "vue";
const v = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "ce2c9ac1-9ea2-494a-8484-840956f0bf38" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#ce2c9ac1-9ea2-494a-8484-840956f0bf38)" }, g = { key: 0 }, k = /* @__PURE__ */ p('<path fill="#ffda44" d="M0 0h512v326.7l-19.3 76.5 19.3 77.7V512H0V185.2l21.4-76.5L0 31z"></path><path fill="#eee" d="M0 31v117.2l512 295.7V326.7L0 31z"></path><path fill="#333" d="M0 108.2v77L512 481v-77L0 108.2z"></path><g fill="#d80027"><path d="M328.3 228.2a72.3 72.3 0 1 1-136-34.4 89 89 0 1 0 127.3 0 72 72 0 0 1 8.7 34.4z"></path><path d="M239.3 144.7h33.4v167h-33.4z"></path><path d="M311.6 178H200.4c0 7.8 6.6 14 14.3 14h-.4a14 14 0 0 0 13.9 14 14 14 0 0 0 13.9 13.8h27.8a14 14 0 0 0 14-13.9 14 14 0 0 0 13.8-13.9h-.4c7.6 0 14.3-6.2 14.3-13.9zM178.1 322.9h155.8v33.4H178.1z"></path><path d="M289.4 333.9h66.8v33.4h-66.8zm-133.6 0h66.8v33.4h-66.8z"></path></g>', 4), u = { fill: "none" }, z = ["r"], y = /* @__PURE__ */ r({
__name: "bn",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(h) {
const e = h, a = o(() => 512 + 2 * e.strokeWidth), l = o(() => -e.strokeWidth), i = o(() => 256 + e.strokeWidth / 2);
return (x, M) => (c(), s("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${l.value} ${l.value} ${a.value} ${a.value}`
}, [
_,
t("g", m, [
e.flagName ? (c(), s("title", g, d(e.flagName), 1)) : n("", !0),
k
]),
t("g", u, [
t("circle", {
cx: "256",
cy: "256",
r: i.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, z)
])
], 8, v));
}
});
export {
y as default
};
//# sourceMappingURL=bn-5b2482e0.js.map