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.9 kB
import { defineComponent as d, computed as o, openBlock as c, createElementBlock as a, createElementVNode as t, toDisplayString as n, createCommentVNode as h, normalizeStyle as f, createStaticVNode as p } from "vue"; const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "8b95e29d-e307-48c3-a4cb-978d5442c588" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), v = { mask: "url(#8b95e29d-e307-48c3-a4cb-978d5442c588)" }, u = { key: 0 }, k = /* @__PURE__ */ p('<path fill="#0052b4" d="M0 0h512v102.4L483.8 151l28.2 53.8v102.4l-30.5 50.7 30.5 51.7V512H0l39.8-257z"></path><path fill="#ff9811" d="M0 44.5v423V256z"></path><path fill="#eee" d="M27.2 102.4v102.4H512V102.4H27.2zm0 204.8v102.4H512V307.2H27.2z"></path><path fill="#d80027" d="M0 0v512l256-256L0 0z"></path><path fill="#eee" d="m103.6 189.2 16.6 51h53.6l-43.4 31.6 16.6 51-43.4-31.5-43.4 31.5 16.6-51-43.4-31.6H87z"></path>', 5), g = { fill: "none" }, x = ["r"], y = /* @__PURE__ */ d({ __name: "cu", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const e = i, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2); return (z, w) => (c(), a("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ m, t("g", v, [ e.flagName ? (c(), a("title", u, n(e.flagName), 1)) : h("", !0), k ]), 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=cu-58f9807e.js.map