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.62 kB
JavaScript
import { defineComponent as r, computed as l, openBlock as c, createElementBlock as a, createElementVNode as e, toDisplayString as d, createCommentVNode as h, normalizeStyle as f } from "vue";
const _ = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "230284dc-fcee-4e79-83e3-c79309f1bf5a" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#230284dc-fcee-4e79-83e3-c79309f1bf5a)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#333",
d: "M512 512 301.3 226.6 0 0v512z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#a2001d",
d: "m0 0 512 512V0z"
}, null, -1), v = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "m195 346 4.2 12.9h13.6l-11 8 4.2 12.8-11-7.9-11 7.9 4.2-12.9-11-8h13.6zm-34.6-123.7 7 21.5h22.5L171.7 257l7 21.5-18.3-13.3-18.2 13.3 6.9-21.5-18.2-13.2h22.5zm0 157.4 7 21.5h22.5l-18.2 13.2 7 21.6-18.3-13.4-18.2 13.4 6.9-21.6-18.2-13.2h22.5zm66-101.2 7 21.5H256l-18.2 13.3 6.9 21.4-18.2-13.2-18.3 13.2 7-21.4-18.3-13.3h22.5zm-132 0 7 21.5h22.5l-18.2 13.3 7 21.4-18.3-13.2-18.3 13.2 7-21.4L64.8 300h22.5z"
}, null, -1), z = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "M430.3 189a67 67 0 0 0-42.6-19.7l48.2-37.6a89.7 89.7 0 0 0-70.3-26A67.2 67.2 0 0 0 348.5 76l-19.2 38.2a28 28 0 0 0-4.8-6.3 28 28 0 1 0-39.7 39.7 28 28 0 0 0 6.3 4.8L253 171.5a67.2 67.2 0 0 0 29.6 17.2 89.7 89.7 0 0 0 26 70.2l42.2-54.2a16.8 16.8 0 0 1 11.9-4.9c4.4 0 8.7 1.7 12 5a16.8 16.8 0 0 1 4.8 11.9c0 4.5-1.7 8.8-4.9 12l15.9 15.9a39.1 39.1 0 0 0 3.7-51.4 44.7 44.7 0 0 1 20.2 11.6 45 45 0 0 1 0 63.6l15.9 15.9a67 67 0 0 0 0-95.4z"
}, null, -1), x = { fill: "none" }, w = ["r"], N = /* @__PURE__ */ r({
__name: "pg",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const t = i, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), n = l(() => 256 + t.strokeWidth / 2);
return (y, W) => (c(), a("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${o.value} ${o.value}`
}, [
m,
e("g", u, [
t.flagName ? (c(), a("title", p, d(t.flagName), 1)) : h("", !0),
k,
g,
v,
z
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: f({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, _));
}
});
export {
N as default
};
//# sourceMappingURL=pg-8371326f.js.map