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.19 kB
JavaScript
import { defineComponent as a, computed as l, openBlock as i, createElementBlock as d, createElementVNode as e, toDisplayString as n, createCommentVNode as h, normalizeStyle as v } from "vue";
const _ = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "e612d4cd-67b8-40b5-a9ab-d546e6dda595" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), f = { mask: "url(#e612d4cd-67b8-40b5-a9ab-d546e6dda595)" }, u = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M0 232.7 256 0h256l-19.2 24L512 46.4v46.7l-19.6 22.6 19.6 23.9v46.5L493.8 209l18.2 23.7v46.6L493 304l19 21.8v46.6l-18 23.5 18 23v46.6l-253.3 21L0 465.5v-46.6l18.8-21.6L0 372.4v-46.6l19.6-21.9L0 279.3z"
}, null, -1), k = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "m256 0-22 46.5h278V0zm-17.1 93.2v46.5H512V93.2zm-4.9 93 22 46.5h256v-46.5zM0 279.3v46.5h512v-46.5zm0 93.1v46.5h512v-46.5zm0 93.1V512h512v-46.5z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#0052b4",
d: "M0 0h256v232.7H0z"
}, null, -1), z = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "m152.4 66.8 16.6 51h53.6l-43.4 31.5 16.6 51-43.4-31.5-43.4 31.5 16.6-51-43.4-31.5h53.6z"
}, null, -1), x = { fill: "none" }, b = ["r"], W = /* @__PURE__ */ a({
__name: "lr",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(c) {
const t = c, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), r = l(() => 256 + t.strokeWidth / 2);
return (w, y) => (i(), d("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${o.value} ${o.value}`
}, [
m,
e("g", f, [
t.flagName ? (i(), d("title", u, n(t.flagName), 1)) : h("", !0),
p,
k,
g,
z
]),
e("g", x, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: v({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, b)
])
], 8, _));
}
});
export {
W as default
};
//# sourceMappingURL=lr-230c06fa.js.map