vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
55 lines (54 loc) • 3.19 kB
JavaScript
import { defineComponent as n, computed as o, openBlock as s, createElementBlock as a, createElementVNode as e, toDisplayString as d, createCommentVNode as h, normalizeStyle as m } from "vue";
const _ = ["viewBox"], v = /* @__PURE__ */ e("mask", { id: "1c460768-cc0e-426e-96c1-c710c3dca9ee" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), f = { mask: "url(#1c460768-cc0e-426e-96c1-c710c3dca9ee)" }, u = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M0 0v51.7l32 103.4H0v103.5L32 362H0v150h150v-32l103.4 32h103.5v-32l103.4 32H512v-51.7l-32-103.4h32V253.4L480 150h32V0H362v32L258.6 0H155.1v32L51.7 0H0z"
}, null, -1), p = /* @__PURE__ */ e("path", {
fill: "#0052b4",
d: "M51.7 0 512 460.3V356.9L155.1 0H51.7zm206.9 0L512 253.4V150L362 0H258.6zM0 51.8v103.4L356.8 512h103.4L0 51.8zm0 206.9v103.4L149.9 512h103.5L0 258.7z"
}, null, -1), z = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M261.6 222.2a18 18 0 0 0-25.5 0 18 18 0 0 0-.6.6 38 38 0 0 0 53.7 53.7 18 18 0 0 0 .6-.6 18 18 0 0 0 0-25.5 18 18 0 0 0-25.4 0 2 2 0 0 1-2.8 0 2 2 0 0 1 0-2.8 18 18 0 0 0 0-25.4zm-100-100a18 18 0 0 0-25.5 0 18 18 0 0 0-.6.6 38 38 0 0 0 53.7 53.7 18 18 0 0 0 .6-.6 18 18 0 0 0 0-25.5 18 18 0 0 0-25.4 0 2 2 0 0 1-2.8 0 2 2 0 0 1 0-2.8 18 18 0 0 0 0-25.4zm200 200a18 18 0 0 0-25.5 0 18 18 0 0 0-.6.6 38 38 0 0 0 53.7 53.7 18 18 0 0 0 .6-.6 18 18 0 0 0 0-25.5 18 18 0 0 0-25.4 0 2 2 0 0 1-2.8 0 2 2 0 0 1 0-2.8 18 18 0 0 0 0-25.4zm-254-45.9a18 18 0 0 0-25.5 0 18 18 0 0 0-.6.5 38 38 0 0 0 53.7 53.8 18 18 0 0 0 .6-.6 18 18 0 0 0 0-25.5 18 18 0 0 0-25.4 0 2 2 0 0 1-2.8 0 2 2 0 0 1 0-2.9 18 18 0 0 0 0-25.3zm100 100a18 18 0 0 0-25.5 0 18 18 0 0 0-.6.6 38 38 0 0 0 53.7 53.7 18 18 0 0 0 .6-.6 18 18 0 0 0 0-25.5 18 18 0 0 0-25.4 0 2 2 0 0 1-2.8 0 2 2 0 0 1 0-2.8 18 18 0 0 0 0-25.4zm207-207a18 18 0 0 0-25.5 0 18 18 0 0 0-.6.5 38 38 0 0 0 53.7 53.8 18 18 0 0 0 .6-.6 18 18 0 0 0 0-25.5 18 18 0 0 0-25.4 0 2 2 0 0 1-2.8 0 2 2 0 0 1 0-2.9 18 18 0 0 0 0-25.3zm-100-100a18 18 0 0 0-25.5 0 18 18 0 0 0-.6.6 38 38 0 0 0 53.7 53.7 18 18 0 0 0 .6-.6 18 18 0 0 0 0-25.6 18 18 0 0 0-25.4 0 2 2 0 0 1-2.8 0 2 2 0 0 1 0-2.8 18 18 0 0 0 0-25.3z"
}, null, -1), g = { fill: "none" }, L = ["r"], y = /* @__PURE__ */ n({
__name: "nl-fr",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const t = i, l = o(() => 512 + 2 * t.strokeWidth), c = o(() => -t.strokeWidth), r = o(() => 256 + t.strokeWidth / 2);
return (x, H) => (s(), a("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${c.value} ${c.value} ${l.value} ${l.value}`
}, [
v,
e("g", f, [
t.flagName ? (s(), a("title", u, d(t.flagName), 1)) : h("", !0),
k,
p,
z
]),
e("g", g, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: m({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, L)
])
], 8, _));
}
});
export {
y as default
};
//# sourceMappingURL=nl-fr-a92dc5f3.js.map