UNPKG

vue-circle-flags

Version:

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

40 lines (39 loc) 1.92 kB
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createStaticVNode as i, defineComponent as a, normalizeStyle as o, openBlock as s, toDisplayString as c } from "vue"; //#region src/components/flags/mn.vue?vue&type=script&setup=true&lang.ts var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "c9f40bc7-7c39-495a-a35a-a21d828c9b66" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), d = { mask: "url(#c9f40bc7-7c39-495a-a35a-a21d828c9b66)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#a2001d\" d=\"M0 0h167l84.9 45L345 0h167v512H345l-87.7-48.1L167 512H0z\"></path><path fill=\"#0052b4\" d=\"M167 0h178v512H167z\"></path><g fill=\"#ffda44\"><path d=\"M122.4 256h22.3v89h-22.3zm-89 0h22.3v89H33.4z\"></path><circle cx=\"89\" cy=\"289.4\" r=\"22.3\"></circle><circle cx=\"89\" cy=\"211.5\" r=\"11.1\"></circle><path d=\"M66.8 322.8h44.5V345H66.8zm0-89h44.5V256H66.8zM89 133.5l8 24.2h25.4l-20.6 15 7.9 24.3L89 182l-20.6 15 7.9-24.3-20.6-15h25.5z\"></path></g>", 3), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({ __name: "mn", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { let a = i, g = e(() => 512 + 2 * a.strokeWidth), _ = e(() => -a.strokeWidth), v = e(() => 256 + a.strokeWidth / 2); return (e, i) => (s(), n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${_.value} ${_.value} ${g.value} ${g.value}` }, [ u, r("g", d, [a.flagName ? (s(), n("title", f, c(a.flagName), 1)) : t("", !0), p]), r("g", m, [r("circle", { cx: "256", cy: "256", r: v.value, fill: "none", style: o({ stroke: a.strokeColor, strokeWidth: a.strokeWidth }) }, null, 12, h)]) ], 8, l)); } }); //#endregion export { g as default }; //# sourceMappingURL=mn-tmR9hxon.js.map