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.64 kB
import { defineComponent as n, computed as o, openBlock as c, createElementBlock as i, createElementVNode as t, toDisplayString as d, createCommentVNode as h, normalizeStyle as f } from "vue"; const _ = ["viewBox"], v = /* @__PURE__ */ t("mask", { id: "a7898712-59fb-45b9-b5db-6792a8c1af15" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#a7898712-59fb-45b9-b5db-6792a8c1af15)" }, u = { key: 0 }, k = /* @__PURE__ */ t("path", { fill: "#d80027", d: "M0 0h512v512H0z" }, null, -1), p = /* @__PURE__ */ t("path", { fill: "#eee", d: "M389.6 211.5h-89v-89h-89.1v89h-89v89h89v89h89v-89h89z" }, null, -1), g = { fill: "none" }, b = ["r"], W = /* @__PURE__ */ n({ __name: "ch", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const e = r, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), a = o(() => 256 + e.strokeWidth / 2); return (x, w) => (c(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ v, t("g", m, [ e.flagName ? (c(), i("title", u, d(e.flagName), 1)) : h("", !0), k, p ]), t("g", g, [ t("circle", { cx: "256", cy: "256", r: a.value, fill: "none", style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, b) ]) ], 8, _)); } }); export { W as default }; //# sourceMappingURL=ch-e3b3f278.js.map