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.24 kB
JavaScript
import { defineComponent as d, computed as l, openBlock as s, createElementBlock as i, createElementVNode as t, toDisplayString as n, createCommentVNode as h, normalizeStyle as f, createStaticVNode as m } from "vue";
const p = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "754868d5-e866-44a1-8455-635050e8b14b" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), v = { mask: "url(#754868d5-e866-44a1-8455-635050e8b14b)" }, k = { key: 0 }, u = /* @__PURE__ */ m('<path fill="#eee" d="m12.4 481.9 491.1.6-247-247.3z"></path><path fill="#d80027" d="M45 467.4 193.1 319l63-107.5 80.2 105.1L512 362.1V256l-27.8-50 27.8-56V44.7l-260-28-252 28 38.5 58.8L0 150v106.1l37 50.7-37 55.4v105.2l23.6 15.8z"></path><path fill="#0052b4" d="m512 362-206.4-85.4L319 319l148.3 148.4 23 18.1 21.6-18.1zm0-105.9v-106l-255.8 106zM467.7 44.6l-60.9-17.8-63 17.8-87.6 211.5zm-211.5 0L214.7 27l-46.1 17.7 87.6 211.5zm-211.5 0L23.9 28.8 0 44.6V150l256.2 106.1zM0 256.1v106.1l256.2-106z"></path><path fill="#ffda44" d="m256.2 256.1 63 63a89 89 0 1 0-126 0zm39 128-38.8 19.5-39.2-19.5a39 39 0 1 1 78 0z"></path><path fill="#0052b4" d="M295.2 384.1a39 39 0 0 1-78 0"></path><path fill="#ffda44" d="M0 0v44.6h512V0H0zm0 467.4V512h512v-44.6H0z"></path>', 6), z = { fill: "none" }, g = ["r"], w = /* @__PURE__ */ d({
__name: "tibet",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(r) {
const e = r, o = l(() => 512 + 2 * e.strokeWidth), a = l(() => -e.strokeWidth), c = l(() => 256 + e.strokeWidth / 2);
return (x, V) => (s(), i("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${o.value} ${o.value}`
}, [
_,
t("g", v, [
e.flagName ? (s(), i("title", k, n(e.flagName), 1)) : h("", !0),
u
]),
t("g", z, [
t("circle", {
cx: "256",
cy: "256",
r: c.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, g)
])
], 8, p));
}
});
export {
w as default
};
//# sourceMappingURL=tibet-f5216c2b.js.map