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.08 kB
JavaScript
import { defineComponent as a, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as d, createCommentVNode as f, normalizeStyle as _ } from "vue";
const h = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "954cbda6-fc92-4c47-99f4-176b208d5c61" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#954cbda6-fc92-4c47-99f4-176b208d5c61)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#0052b4",
d: "M0 0h512v512H0Z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#fff",
d: "m256 52 204 204-204 204L52 256Z"
}, null, -1), v = /* @__PURE__ */ e("path", {
fill: "#ff9811",
d: "m232 463 12-299h24l12 299z"
}, null, -1), x = /* @__PURE__ */ e("path", {
fill: "#6da544",
d: "M293 172c31-14 42-23 90-22-40-18-77-23-108 0 9-23 27-54 59-77-55 9-82 36-86 68-14-32-55-45-100-45 50 27 36 27 73 63-32-5-68 9-104 50 49-27 72-18 104-14a90 90 0 0 0-41 86c36-45 31-32 77-72 18 40 40 49 49 86 9-37 0-77-18-91 36 14 68 23 86 50-9-63-50-72-81-82z"
}, null, -1), w = { fill: "none" }, y = ["r"], N = /* @__PURE__ */ a({
__name: "fr-cp",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(r) {
const t = r, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), n = o(() => 256 + t.strokeWidth / 2);
return (W, b) => (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)) : f("", !0),
k,
g,
v,
x
]),
e("g", w, [
e("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, y)
])
], 8, h));
}
});
export {
N as default
};
//# sourceMappingURL=fr-cp-78bde53e.js.map