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) • 1.9 kB
JavaScript
import { defineComponent as a, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as d, createCommentVNode as _, normalizeStyle as f } from "vue";
const h = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "1a8cee3c-7e6c-4835-b9ae-b4e7b4bbf722" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#1a8cee3c-7e6c-4835-b9ae-b4e7b4bbf722)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "m0 0 214 251.8L0 512l418-256z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M512 0H0l367.3 256L0 512h512z"
}, null, -1), v = /* @__PURE__ */ e("path", {
fill: "#333",
d: "M0 0v512l256-256z"
}, null, -1), b = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "m71 197.4 39 36.8 47-25.6-23 48.4 39 36.9-53.2-7-23 48.5-9.9-52.7-53.2-7 47.1-25.6z"
}, null, -1), x = { fill: "none" }, w = ["r"], B = /* @__PURE__ */ a({
__name: "tl",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(n) {
const t = n, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), r = o(() => 256 + t.strokeWidth / 2);
return (y, z) => (c(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
m,
e("g", u, [
t.flagName ? (c(), i("title", p, d(t.flagName), 1)) : _("", !0),
k,
g,
v,
b
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: f({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, h));
}
});
export {
B as default
};
//# sourceMappingURL=tl-bc8c0a3a.js.map