UNPKG

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.26 kB
import { defineComponent as h, computed as l, openBlock as s, createElementBlock as i, createElementVNode as t, toDisplayString as d, createCommentVNode as f, normalizeStyle as n, createStaticVNode as p } from "vue"; const m = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "ff22c1de-aa6a-47c8-9450-26854b4f41ff" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), k = { mask: "url(#ff22c1de-aa6a-47c8-9450-26854b4f41ff)" }, g = { key: 0 }, u = /* @__PURE__ */ p('<path fill="#ffda44" d="M124.4 149.7 512 132.8V0H0z"></path><path fill="#eee" d="M112.5 132.8H512v122.4l-294.2 16.6z"></path><path fill="#d80027" d="M512 255.3H234.5l-136 139.8L512 377.7V256z"></path><path fill="#0052b4" d="M108.2 377.7 0 511.2l512 .8V377.7z"></path><path fill="#6da544" d="M.8 0 0 511.2l256-256z"></path><g fill="#eee"><path d="M67.5 255.3a78 78 0 0 1 61.2-76 78.2 78.2 0 0 0-16.7-2 78 78 0 1 0 16.7 154 78 78 0 0 1-61.2-76z"></path><path d="m127.9 188.5 4.1 12.7h13.4l-10.8 8 4.1 12.7-10.8-8-10.9 8 4.2-12.8-10.9-7.9h13.4zm0 33.4 4.1 12.7h13.4l-10.8 8 4.1 12.7-10.8-8-10.9 8 4.2-12.8-10.9-7.9h13.4zm0 33.4L132 268h13.4l-10.8 8 4.1 12.6-10.8-7.8-10.9 7.8 4.2-12.7-10.9-7.9h13.4zm0 33.3 4.1 12.8h13.4l-10.8 8 4.1 12.6-10.8-7.8L117 322l4.2-12.7-10.9-7.9h13.4z"></path></g>', 6), v = { fill: "none" }, z = ["r"], M = /* @__PURE__ */ h({ __name: "km", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(c) { const e = c, o = l(() => 512 + 2 * e.strokeWidth), a = l(() => -e.strokeWidth), r = l(() => 256 + e.strokeWidth / 2); return (x, w) => (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", k, [ e.flagName ? (s(), i("title", g, d(e.flagName), 1)) : f("", !0), u ]), t("g", v, [ t("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: n({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, z) ]) ], 8, m)); } }); export { M as default }; //# sourceMappingURL=km-355c893f.js.map