UNPKG

vue-circle-flags

Version:

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

55 lines (54 loc) 1.75 kB
import { defineComponent as n, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as a, createCommentVNode as f, normalizeStyle as _ } from "vue"; const h = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "b84e3c66-ed6a-497f-96cf-5402d6b036dd" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#b84e3c66-ed6a-497f-96cf-5402d6b036dd)" }, v = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#338af3", d: "M0 0h512v167l-37.4 89 37.4 89v167H0l49.6-252z" }, null, -1), p = /* @__PURE__ */ e("path", { fill: "#ffda44", d: "M108.3 167H512v178H108.3z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#333", d: "M0 0v512l256-256L0 0z" }, null, -1), x = { fill: "none" }, w = ["r"], z = /* @__PURE__ */ n({ __name: "bs", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const t = r, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), d = o(() => 256 + t.strokeWidth / 2); return (y, W) => (c(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ u, e("g", m, [ t.flagName ? (c(), i("title", v, a(t.flagName), 1)) : f("", !0), k, p, g ]), e("g", x, [ e("circle", { cx: "256", cy: "256", r: d.value, fill: "none", style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, w) ]) ], 8, h)); } }); export { z as default }; //# sourceMappingURL=bs-c92ce61f.js.map