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) 2.13 kB
import { defineComponent as r, computed as l, openBlock as i, createElementBlock as a, createElementVNode as e, toDisplayString as d, createCommentVNode as _, normalizeStyle as f } from "vue"; const h = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "0eb4a0a0-0972-4bd1-b207-1234f36c2fa5" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#0eb4a0a0-0972-4bd1-b207-1234f36c2fa5)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#eee", d: "M0 0h155.8l35 254.6-35 257.4H0z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#a2001d", d: "M155.8 0H512v345.1l-183 37.4-173.2-37.4z" }, null, -1), v = /* @__PURE__ */ e("path", { fill: "#6da544", d: "M155.8 345.1H512V512H155.8z" }, null, -1), z = /* @__PURE__ */ e("path", { fill: "#a2001d", d: "M50 .2 22.3 50l27.8 50.4L77.9 50zm55.8 0L78 50l27.7 50.4 28-50.4zM50 137.5l-27.7 49.6 27.8 50.5 27.7-50.5zm55.8 0L78 187.1l27.7 50.5 28-50.5zM50 274.7l-27.7 49.7 27.8 50.4 27.8-50.4zm55.8 0L78 324.4l27.7 50.4 28-50.4zM50 412l-27.7 49.6 27.8 50.5 27.7-50.5zm55.8 0L78 461.6l27.7 50.5 28-50.5z" }, null, -1), x = { fill: "none" }, b = ["r"], W = /* @__PURE__ */ r({ __name: "by", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(c) { const t = c, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), n = l(() => 256 + t.strokeWidth / 2); return (w, y) => (i(), a("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${o.value} ${o.value}` }, [ m, e("g", u, [ t.flagName ? (i(), a("title", p, d(t.flagName), 1)) : _("", !0), k, g, v, z ]), e("g", x, [ e("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: f({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, b) ]) ], 8, h)); } }); export { W as default }; //# sourceMappingURL=by-86e42746.js.map