vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
59 lines (58 loc) • 2.13 kB
JavaScript
import { defineComponent as v, computed as l, openBlock as i, createElementBlock as c, createElementVNode as e, toDisplayString as d, createCommentVNode as a, normalizeStyle as h } from "vue";
const _ = ["viewBox"], f = /* @__PURE__ */ e("mask", { id: "d79154d5-59ed-4e55-9863-17ce3c3122a5" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#d79154d5-59ed-4e55-9863-17ce3c3122a5)" }, u = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "M0 256 256 0h256v56.8l-14.7 29.8 14.7 27.2v56.8L496.2 199l15.8 28.6v56.8l-18.4 29.4 18.4 27.5v56.9L495.3 427l16.7 28.1V512H0v-56.9l24.2-27.4L0 398.2v-56.9l21-27.7-21-29.2z"
}, null, -1), k = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M242 56.8v57h270v-57zm0 113.8v57h270v-57zM0 284.4v56.9h512v-56.9zm0 113.8v56.9h512v-56.9z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#4a1f63",
d: "M0 0h256v256H0z"
}, null, -1), z = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M211.5 133.6v22.2h-11.2v-22.2h-22.2v22.2H167v-44.5h-44.6v44.5h-11v-22.2H89v22.2H78v-22.2H55.6v66.7h178v-66.7z"
}, null, -1), x = { fill: "none" }, w = ["r"], B = /* @__PURE__ */ v({
__name: "es-ib",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(n) {
const t = n, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), r = l(() => 256 + t.strokeWidth / 2);
return (y, H) => (i(), c("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${o.value} ${o.value}`
}, [
f,
e("g", m, [
t.flagName ? (i(), c("title", u, d(t.flagName), 1)) : a("", !0),
p,
k,
g,
z
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: h({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, _));
}
});
export {
B as default
};
//# sourceMappingURL=es-ib-108e656f.js.map