vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
44 lines (43 loc) • 2.15 kB
JavaScript
import { defineComponent as d, computed as o, openBlock as a, createElementBlock as s, createElementVNode as t, toDisplayString as f, createCommentVNode as h, normalizeStyle as n, createStaticVNode as v } from "vue";
const p = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "ef8076f2-bccf-4b0d-8bcb-6dfc577a5cd1" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#ef8076f2-bccf-4b0d-8bcb-6dfc577a5cd1)" }, k = { key: 0 }, u = /* @__PURE__ */ v('<path fill="#ff9811" d="M81.4 27.2h135.2v456.5H81.4z"></path><path fill="#6da544" d="m0 44.5 100.2-22v463L0 467.5z"></path><path fill="#a2001d" d="m218.6 26.5 293.4 18v93.2l-18.6 106.2 18.6 97.4v126.2l-293.4 18z"></path><path fill="#ffda44" d="M0 0v44.5h200.3v423H0V512h512v-44.5H233.7v-423H512V0z"></path><path fill="#ffda44" d="M300.5 94.6c-18.4 0-33.4 15-33.4 33.4v144.6a33 33 0 0 0 11.2 25v53h22.2v-27.8h100.2v44.5h-22.3v22.3H423V345l20.4-22.2h48.2a72.9 72.9 0 0 0 20.4 18.5V137.7a66 66 0 0 0-22.5 13.1 67.8 67.8 0 0 0-13.2 82.9c-21.3-.1-41 .2-53.3 0V167c0-11.2-16.7-22.3-16.7-22.3s-16.7 11.1-16.7 22.3h-66.8v66.7h33.4v33.4c0 7.1 1.4 14.1 4.1 20.7L345 300.6h-44.5v-206z"></path>', 5), g = { fill: "none" }, b = ["r"], z = /* @__PURE__ */ d({
__name: "lk",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const e = i, l = o(() => 512 + 2 * e.strokeWidth), c = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2);
return (x, V) => (a(), s("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${c.value} ${c.value} ${l.value} ${l.value}`
}, [
_,
t("g", m, [
e.flagName ? (a(), s("title", k, f(e.flagName), 1)) : h("", !0),
u
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: n({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, b)
])
], 8, p));
}
});
export {
z as default
};
//# sourceMappingURL=lk-ba1ec9f1.js.map