UNPKG

vue-circle-flags

Version:

A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags

51 lines (50 loc) 2.04 kB
import { defineComponent as a, computed as o, openBlock as c, createElementBlock as i, createElementVNode as t, toDisplayString as d, createCommentVNode as f, normalizeStyle as m } from "vue"; const _ = ["viewBox"], h = /* @__PURE__ */ t("mask", { id: "c0419994-ffef-4d80-b470-67feebe7b472" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#c0419994-ffef-4d80-b470-67feebe7b472)" }, k = { key: 0 }, p = /* @__PURE__ */ t("path", { fill: "#d80027", d: "M0 0h512v512H0z" }, null, -1), g = /* @__PURE__ */ t("path", { fill: "#ffda44", d: "m140.1 155.8 22.1 68h71.5l-57.8 42.1 22.1 68-57.9-42-57.9 42 22.2-68-57.9-42.1H118zm163.4 240.7-16.9-20.8-25 9.7 14.5-22.5-16.9-20.9 25.9 6.9 14.6-22.5 1.4 26.8 26 6.9-25.1 9.6zm33.6-61 8-25.6-21.9-15.5 26.8-.4 7.9-25.6 8.7 25.4 26.8-.3-21.5 16 8.6 25.4-21.9-15.5zm45.3-147.6L370.6 212l19.2 18.7-26.5-3.8-11.8 24-4.6-26.4-26.6-3.8 23.8-12.5-4.6-26.5 19.2 18.7zm-78.2-73-2 26.7 24.9 10.1-26.1 6.4-1.9 26.8-14.1-22.8-26.1 6.4 17.3-20.5-14.2-22.7 24.9 10.1z" }, null, -1), v = { fill: "none" }, x = ["r"], y = /* @__PURE__ */ a({ __name: "cn", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const e = r, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), n = o(() => 256 + e.strokeWidth / 2); return (z, w) => (c(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ h, t("g", u, [ e.flagName ? (c(), i("title", k, d(e.flagName), 1)) : f("", !0), p, g ]), t("g", v, [ t("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: m({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, _)); } }); export { y as default }; //# sourceMappingURL=cn-adbdfa16.js.map