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.07 kB
import { defineComponent as d, computed as l, openBlock as c, createElementBlock as s, createElementVNode as t, toDisplayString as h, createCommentVNode as f, normalizeStyle as n, createStaticVNode as p } from "vue"; const v = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "6e9d9f78-1900-42a9-8cda-a747ba90a46f" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#6e9d9f78-1900-42a9-8cda-a747ba90a46f)" }, g = { key: 0 }, k = /* @__PURE__ */ p('<path fill="#d80027" d="M0 0h512v256l-265 45.2z"></path><path fill="#0052b4" d="M210 256h302v256H0z"></path><path fill="#eee" d="M0 0v512l256-256z"></path><g fill="#ffda44"><path d="M28 256a73.1 73.1 0 0 0-.2 5.6 72.3 72.3 0 1 0 144.5-5.6z"></path><circle cx="100.2" cy="200.3" r="22.3"></circle></g><path fill="#d80027" d="M50 194.8V267c0 38.4 50.2 50 50.2 50s50-11.6 50-50v-72.3h-100z"></path><path fill="#338af3" d="M100.2 294c-9.3-3.4-28-12-28-27v-50H128v50c0 15-18.6 23.6-27.8 26.9z"></path><path fill="#eee" d="M111.3 244.9v-11.2l-11.1-5.5-11.2 5.5V245l-5.5 5.5v22.3h33.4v-22.3z"></path>', 7), u = { fill: "none" }, x = ["r"], M = /* @__PURE__ */ d({ __name: "sx", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const e = i, a = l(() => 512 + 2 * e.strokeWidth), o = l(() => -e.strokeWidth), r = l(() => 256 + e.strokeWidth / 2); return (z, w) => (c(), s("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${o.value} ${o.value} ${a.value} ${a.value}` }, [ _, t("g", m, [ e.flagName ? (c(), s("title", g, h(e.flagName), 1)) : f("", !0), k ]), t("g", u, [ t("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: n({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, v)); } }); export { M as default }; //# sourceMappingURL=sx-ff0bb622.js.map