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.79 kB
import { defineComponent as a, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as d, createCommentVNode as h, normalizeStyle as _ } from "vue"; const f = ["viewBox"], v = /* @__PURE__ */ e("mask", { id: "367bc3b5-5310-4bb6-884e-5ce7f879c6a8" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#367bc3b5-5310-4bb6-884e-5ce7f879c6a8)" }, m = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M0 0h512v89l-79.2 163.7L512 423v89H0v-89l82.7-169.6L0 89z" }, null, -1), p = /* @__PURE__ */ e("path", { fill: "#eee", d: "M0 89h512v78l-42.6 91.2L512 345v78H0v-78l40-92.5L0 167z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M0 167h512v178H0z" }, null, -1), b = { fill: "none" }, x = ["r"], z = /* @__PURE__ */ a({ __name: "th", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const t = r, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), n = o(() => 256 + t.strokeWidth / 2); return (w, y) => (c(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ v, e("g", u, [ t.flagName ? (c(), i("title", m, d(t.flagName), 1)) : h("", !0), k, p, g ]), e("g", b, [ e("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, x) ]) ], 8, f)); } }); export { z as default }; //# sourceMappingURL=th-852caead.js.map