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.83 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as a, createCommentVNode as f, normalizeStyle as _ } from "vue";
const h = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "8f12de6b-cbe8-4fc3-bb3b-c11b62d53f49" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#8f12de6b-cbe8-4fc3-bb3b-c11b62d53f49)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M43.6 109.4 512 144.7v222.6L43.8 397.2z"
}, null, -1), v = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M0 0h512v144.7H111z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#333",
d: "M111 367.3h401V512H0z"
}, null, -1), b = /* @__PURE__ */ e("path", {
fill: "#496e2d",
d: "M0 0v512l256-256z"
}, null, -1), x = { fill: "none" }, w = ["r"], B = /* @__PURE__ */ d({
__name: "sd",
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}`
}, [
u,
e("g", m, [
t.flagName ? (c(), i("title", p, a(t.flagName), 1)) : f("", !0),
k,
v,
g,
b
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, h));
}
});
export {
B as default
};
//# sourceMappingURL=sd-07d0dd40.js.map