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.21 kB
JavaScript
import { defineComponent as n, computed as t, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as a, createCommentVNode as d, normalizeStyle as v } from "vue";
const m = ["viewBox"], _ = /* @__PURE__ */ e("mask", { id: "22883313-07a8-494f-b278-4dc6c16e1680" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), f = { mask: "url(#22883313-07a8-494f-b278-4dc6c16e1680)" }, u = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "m0 0 8 22-8 23v23l32 54-32 54v32l32 48-32 48v32l32 54-32 54v68l22-8 23 8h23l54-32 54 32h32l48-32 48 32h32l54-32 54 32h68l-8-22 8-23v-23l-32-54 32-54v-32l-32-48 32-48v-32l-32-54 32-54V0l-22 8-23-8h-23l-54 32-54-32h-32l-48 32-48-32h-32l-54 32L68 0H0z"
}, null, -1), p = /* @__PURE__ */ e("path", {
fill: "#0052b4",
d: "M336 0v108L444 0Zm176 68L404 176h108zM0 176h108L0 68ZM68 0l108 108V0Zm108 512V404L68 512ZM0 444l108-108H0Zm512-108H404l108 108Zm-68 176L336 404v108z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M0 0v45l131 131h45L0 0zm208 0v208H0v96h208v208h96V304h208v-96H304V0h-96zm259 0L336 131v45L512 0h-45zM176 336 0 512h45l131-131v-45zm160 0 176 176v-45L381 336h-45z"
}, null, -1), z = { fill: "none" }, L = ["r"], y = /* @__PURE__ */ n({
__name: "gb",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(h) {
const l = h, o = t(() => 512 + 2 * l.strokeWidth), s = t(() => -l.strokeWidth), r = t(() => 256 + l.strokeWidth / 2);
return (x, w) => (c(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${o.value} ${o.value}`
}, [
_,
e("g", f, [
l.flagName ? (c(), i("title", u, a(l.flagName), 1)) : d("", !0),
k,
p,
g
]),
e("g", z, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: v({ stroke: l.strokeColor, strokeWidth: l.strokeWidth })
}, null, 12, L)
])
], 8, m));
}
});
export {
y as default
};
//# sourceMappingURL=gb-96bcc0c1.js.map