UNPKG

vue-circle-flags

Version:

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

59 lines (58 loc) 1.84 kB
import { defineComponent as d, computed as o, openBlock as i, createElementBlock as c, createElementVNode as e, toDisplayString as a, createCommentVNode as _, normalizeStyle as f } from "vue"; const h = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "136f6415-564d-4369-b76c-23073f00d780" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#136f6415-564d-4369-b76c-23073f00d780)" }, k = { key: 0 }, p = /* @__PURE__ */ e("path", { fill: "#eee", d: "M138.4 147 512 167v178l-373.6 20z" }, null, -1), v = /* @__PURE__ */ e("path", { fill: "#6da544", d: "m0 0 138.4 167H512V0z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#d80027", d: "m0 512 138.4-167H512v167z" }, null, -1), w = /* @__PURE__ */ e("path", { fill: "#333", d: "M167 167 0 0v512l167-167z" }, null, -1), x = { fill: "none" }, y = ["r"], N = /* @__PURE__ */ d({ __name: "kw", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(n) { const t = n, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), r = o(() => 256 + t.strokeWidth / 2); return (z, W) => (i(), c("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ m, e("g", u, [ t.flagName ? (i(), c("title", k, a(t.flagName), 1)) : _("", !0), p, v, g, w ]), e("g", x, [ e("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: f({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, y) ]) ], 8, h)); } }); export { N as default }; //# sourceMappingURL=kw-95254b4f.js.map