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.03 kB
JavaScript
import { defineComponent as r, computed as l, openBlock as s, createElementBlock as c, createElementVNode as t, toDisplayString as h, createCommentVNode as n, normalizeStyle as m, createStaticVNode as f } from "vue";
const p = ["viewBox"], v = /* @__PURE__ */ t("mask", { id: "c3a490d0-3dcd-494d-b6c4-bd00ed9168c7" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), _ = { mask: "url(#c3a490d0-3dcd-494d-b6c4-bd00ed9168c7)" }, u = { key: 0 }, k = /* @__PURE__ */ f('<path fill="#d80027" d="M512 0v171l-64 85 64 85v171H0V341L341 0Z"></path><path fill="#eee" d="M341 171h171v170H341l-64-85z"></path><path fill="#0052b4" d="M0 0h341v341H0Z"></path><path fill="#ffda44" d="M184 133a40 40 0 0 0-40 40v60h80v-60a40 40 0 0 0-40-40z"></path><path fill="#eee" d="m167 105 52-37h-64l52 37-20-61zm101 62 37 52v-64l-37 52 61-20zm-62 101-52 37h64l-52-37 20 61zm-101-61-37-52v64l37-52-61 20zm125-92 63 10-45-45 10 63 29-57zm28 115-10 63 45-45-63 10 57 29zm-115 28-63-10 45 45-10-63-29 57Zm-28-115 10-63-45 45 63-10-57-29Z"></path>', 5), g = { fill: "none" }, z = ["r"], N = /* @__PURE__ */ r({
__name: "us-ga",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(d) {
const e = d, o = l(() => 512 + 2 * e.strokeWidth), a = l(() => -e.strokeWidth), i = l(() => 256 + e.strokeWidth / 2);
return (x, w) => (s(), c("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${a.value} ${a.value} ${o.value} ${o.value}`
}, [
v,
t("g", _, [
e.flagName ? (s(), c("title", u, h(e.flagName), 1)) : n("", !0),
k
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: i.value,
fill: "none",
style: m({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, z)
])
], 8, p));
}
});
export {
N as default
};
//# sourceMappingURL=us-ga-d2ccd706.js.map