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) 1.8 kB
import { defineComponent as d, computed as o, openBlock as s, createElementBlock as r, createElementVNode as e, toDisplayString as n, createCommentVNode as _, normalizeStyle as f } from "vue"; const h = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "39d5a341-a6de-4a26-baad-a07a14a0b5fd" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#39d5a341-a6de-4a26-baad-a07a14a0b5fd)" }, k = { key: 0 }, p = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M0 0h512v512H0z" }, null, -1), g = /* @__PURE__ */ e("g", { fill: "#eee" }, [ /* @__PURE__ */ e("path", { d: "m245.5 209.2 21 29 34-11.1-21 29 21 28.9-34-11.1-21 29V267l-34-11.1 34-11z" }), /* @__PURE__ */ e("path", { d: "M188.2 328.3a72.3 72.3 0 1 1 34.4-136 89 89 0 1 0 0 127.3 72 72 0 0 1-34.4 8.7z" }) ], -1), v = { fill: "none" }, x = ["r"], z = /* @__PURE__ */ d({ __name: "tr", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const t = i, a = o(() => 512 + 2 * t.strokeWidth), l = o(() => -t.strokeWidth), c = o(() => 256 + t.strokeWidth / 2); return (w, y) => (s(), r("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${l.value} ${l.value} ${a.value} ${a.value}` }, [ m, e("g", u, [ t.flagName ? (s(), r("title", k, n(t.flagName), 1)) : _("", !0), p, g ]), e("g", v, [ e("circle", { cx: "256", cy: "256", r: c.value, fill: "none", style: f({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, x) ]) ], 8, h)); } }); export { z as default }; //# sourceMappingURL=tr-6385b35e.js.map