vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
63 lines (62 loc) • 2.2 kB
JavaScript
import { defineComponent as a, computed as l, 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: "c74e6020-895d-46ea-bc6b-5737570f39a7" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#c74e6020-895d-46ea-bc6b-5737570f39a7)" }, k = { key: 0 }, v = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "M0 0h68.2l86 33.6L216.5 0h78.8l61.2 34.8L443.8 0H512v68.3l-31.4 88 31.4 60.2v78.8L477.4 356l34.6 87.8V512h-68.2l-77-37.3-71.3 37.3h-78.8l-61-39.7L68.2 512H0v-68l40.3-88.2L0 295.5v-78.8L40.3 157 0 68.2z"
}, null, -1), p = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "M295.5 512h148.3L256 256zm-79-512H68.2L256 256zm.2 512L256 256 68.2 512zM0 216.7 256 256 0 68.2zm0 227.2L256 256 0 295.5zM512 68.3 256 256l256-39.5zM443.8 0H295.3L256 256zM512 443.8V295.3L256 256z"
}, null, -1), g = /* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "89",
fill: "#d80027"
}, null, -1), L = /* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "66.8",
fill: "#ffda44"
}, null, -1), z = { fill: "none" }, x = ["r"], W = /* @__PURE__ */ a({
__name: "mk",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(r) {
const t = r, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), n = l(() => 256 + t.strokeWidth / 2);
return (y, w) => (c(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${o.value} ${o.value}`
}, [
m,
e("g", u, [
t.flagName ? (c(), i("title", k, d(t.flagName), 1)) : f("", !0),
v,
p,
g,
L
]),
e("g", z, [
e("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, x)
])
], 8, h));
}
});
export {
W as default
};
//# sourceMappingURL=mk-67bff5a4.js.map