vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
69 lines (68 loc) • 2.15 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as s, createElementBlock as a, createElementVNode as e, toDisplayString as n, createCommentVNode as h, normalizeStyle as _ } from "vue";
const f = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "a6bcadd4-241c-4232-ab7e-78eaed3ddca3" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), v = { mask: "url(#a6bcadd4-241c-4232-ab7e-78eaed3ddca3)" }, m = { key: 0 }, g = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M0 0h512v512H0z"
}, null, -1), k = /* @__PURE__ */ e("path", {
fill: "#333",
d: "M256 112c-22 0-40 18-40 40-7-12-20-20-34-20a40 40 0 1 0 0 80h6v126h-2c-10 0-20 8-20 20v16c0 10 10 20 20 20h2v2c0 12 10 20 20 20h96c12 0 20-8 20-20v-2h2c12 0 20-10 20-20v-16c0-12-8-20-20-20h-2V212h6a40 40 0 1 0 0-80c-14 1-27 9-34 22v-2c0-22-18-40-40-40z"
}, null, -1), p = /* @__PURE__ */ e("rect", {
width: "224",
height: "32",
x: "144",
y: "448",
fill: "#acabb1",
rx: "16",
ry: "16"
}, null, -1), x = /* @__PURE__ */ e("rect", {
width: "192",
height: "48",
x: "160",
y: "32",
fill: "#acabb1",
rx: "24",
ry: "24"
}, null, -1), y = { fill: "none" }, w = ["r"], N = /* @__PURE__ */ d({
__name: "in-as",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const t = i, c = o(() => 512 + 2 * t.strokeWidth), l = o(() => -t.strokeWidth), r = o(() => 256 + t.strokeWidth / 2);
return (b, W) => (s(), a("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${l.value} ${l.value} ${c.value} ${c.value}`
}, [
u,
e("g", v, [
t.flagName ? (s(), a("title", m, n(t.flagName), 1)) : h("", !0),
g,
k,
p,
x
]),
e("g", y, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, w)
])
], 8, f));
}
});
export {
N as default
};
//# sourceMappingURL=in-as-1d025095.js.map