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) • 2.23 kB
JavaScript
import { defineComponent as h, computed as l, openBlock as s, createElementBlock as i, createElementVNode as e, toDisplayString as n, createCommentVNode as d, normalizeStyle as _ } from "vue";
const v = ["viewBox"], f = /* @__PURE__ */ e("mask", { id: "8631b44d-6b07-490c-9ba0-359c4a705c15" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#8631b44d-6b07-490c-9ba0-359c4a705c15)" }, u = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#6da544",
d: "m0 256 256-64 256 64v256H0Z"
}, null, -1), p = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M0 0h512v256H0Z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M166 149c-12 0-21 9-21 21h-14c-19 0-35 15-35 34h25c3 8 10 14 17 14h7v48l2 14-16 5c-1-15-13-26-27-26-4 0-8 3-8 6v56c0 4 4 7 8 7l12-3 56-15c6 3 14 5 22 5h6v14h-13c-16 0-28 12-28 27 0 4 3 7 7 7h62c4 0 7-3 7-7v-41l9-1h49l9 15h-5c-15 0-27 12-27 27 0 4 3 7 7 7h69c4 0 7-3 7-7 0-6-2-11-5-16l-15-26h23c29 0 52-23 52-52v-3l8 2h6c3-3 4-7 2-10l-28-40-1-1c-3-2-8-2-10 1l-27 40c-1 2-2 4-1 6 1 4 5 6 9 5l8-3v3c0 10-8 18-18 18h-37c12-12 22-26 28-41l25-57 1-5c0-8-6-14-14-14h-95c-15 0-28 12-28 27v17a11 11 0 1 1-22 0v-31c12-4 21-14 21-27h-41z"
}, null, -1), w = { fill: "none" }, x = ["r"], B = /* @__PURE__ */ h({
__name: "gb-wls",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(r) {
const t = r, c = l(() => 512 + 2 * t.strokeWidth), o = l(() => -t.strokeWidth), a = l(() => 256 + t.strokeWidth / 2);
return (b, y) => (s(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${o.value} ${o.value} ${c.value} ${c.value}`
}, [
f,
e("g", m, [
t.flagName ? (s(), i("title", u, n(t.flagName), 1)) : d("", !0),
k,
p,
g
]),
e("g", w, [
e("circle", {
cx: "256",
cy: "256",
r: a.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, x)
])
], 8, v));
}
});
export {
B as default
};
//# sourceMappingURL=gb-wls-3a4b0eff.js.map