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) 1.84 kB
import { defineComponent as d, computed as o, openBlock as s, createElementBlock as i, createElementVNode as t, toDisplayString as n, createCommentVNode as h, normalizeStyle as f, createStaticVNode as p } from "vue"; const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "f966ebf5-836b-41cc-a7e9-d189e83aa08e" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), v = { mask: "url(#f966ebf5-836b-41cc-a7e9-d189e83aa08e)" }, k = { key: 0 }, u = /* @__PURE__ */ p('<path fill="#0052b4" d="m0 167 253.8-19.3L512 167v178l-254.9 32.3L0 345z"></path><path fill="#eee" d="M0 0h512v167H0z"></path><path fill="#d80027" d="M0 345h512v167H0z"></path><path fill="#0052b4" d="M222.7 167v-66.8H89V167l67 82.6z"></path><path fill="#eee" d="M89 167v22.2c0 51.1 66.8 66.8 66.8 66.8s66.8-15.7 66.8-66.8V167l-22.3 22.2-44.5-33.4-44.5 33.4z"></path>', 5), g = { fill: "none" }, x = ["r"], y = /* @__PURE__ */ d({ __name: "si", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(c) { const e = c, l = o(() => 512 + 2 * e.strokeWidth), a = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2); return (w, z) => (s(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${a.value} ${a.value} ${l.value} ${l.value}` }, [ m, t("g", v, [ e.flagName ? (s(), i("title", k, n(e.flagName), 1)) : h("", !0), u ]), t("g", g, [ t("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, _)); } }); export { y as default }; //# sourceMappingURL=si-35459248.js.map