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.99 kB
JavaScript
import { defineComponent as d, computed as a, openBlock as s, createElementBlock as i, createElementVNode as e, toDisplayString as c, createCommentVNode as f, normalizeStyle as h } from "vue";
const _ = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "6deffaed-a4af-460b-ad88-df651236a228" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#6deffaed-a4af-460b-ad88-df651236a228)" }, v = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "m0 167 256-32 256 32v178l-256 32L0 345Z"
}, null, -1), k = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M0 0h512v167H0Z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#0052b4",
d: "M0 345h512v167H0Z"
}, null, -1), x = /* @__PURE__ */ e("path", {
fill: "#333",
d: "M256 80A176 176 0 0 0 80 256a176 176 0 0 0 176 176 176 176 0 0 0 176-176A176 176 0 0 0 256 80Zm0 16a160 160 0 0 1 160 160 160 160 0 0 1-160 160A160 160 0 0 1 96 256 160 160 0 0 1 256 96Zm0 7a32 32 0 0 0-32 32 32 32 0 0 0 20 30v28a64 64 0 0 0-24 10l-20-20a32 32 0 0 0-7-35 32 32 0 0 0-23-10 32 32 0 0 0-22 10 32 32 0 0 0 0 45 32 32 0 0 0 35 7l20 20a64 64 0 0 0-10 24h-29a32 32 0 0 0-29-20 32 32 0 0 0-32 32 32 32 0 0 0 32 32 32 32 0 0 0 29-20h29a64 64 0 0 0 10 24l-20 20a32 32 0 0 0-35 7 32 32 0 0 0 0 45 32 32 0 0 0 45 0 32 32 0 0 0 7-35l20-20a64 64 0 0 0 24 10v28a32 32 0 0 0-20 30 32 32 0 0 0 32 32 32 32 0 0 0 32-32 32 32 0 0 0-20-30v-28a64 64 0 0 0 24-10l20 20a32 32 0 0 0 7 35 32 32 0 0 0 45 0 32 32 0 0 0 0-45 32 32 0 0 0-35-7l-20-20a64 64 0 0 0 10-24h28a32 32 0 0 0 30 20 32 32 0 0 0 32-32 32 32 0 0 0-32-32 32 32 0 0 0-30 20h-28a64 64 0 0 0-10-24l20-20a32 32 0 0 0 35-7 32 32 0 0 0 0-45 32 32 0 0 0-22-10 32 32 0 0 0-23 10 32 32 0 0 0-7 35l-20 20a64 64 0 0 0-24-10v-28a32 32 0 0 0 20-30 32 32 0 0 0-32-32Zm0 105a48 48 0 0 1 48 48 48 48 0 0 1-48 48 48 48 0 0 1-48-48 48 48 0 0 1 48-48zm0 16a32 32 0 0 0-32 32 32 32 0 0 0 32 32 32 32 0 0 0 32-32 32 32 0 0 0-32-32z"
}, null, -1), w = { fill: "none" }, y = ["r"], N = /* @__PURE__ */ d({
__name: "guarani",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(n) {
const t = n, l = a(() => 512 + 2 * t.strokeWidth), o = a(() => -t.strokeWidth), r = a(() => 256 + t.strokeWidth / 2);
return (W, Z) => (s(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${o.value} ${o.value} ${l.value} ${l.value}`
}, [
m,
e("g", u, [
t.flagName ? (s(), i("title", v, c(t.flagName), 1)) : f("", !0),
p,
k,
g,
x
]),
e("g", w, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: h({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, y)
])
], 8, _));
}
});
export {
N as default
};
//# sourceMappingURL=guarani-72d9381d.js.map