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.76 kB
import { defineComponent as c, computed as o, openBlock as a, createElementBlock as i, createElementVNode as e, toDisplayString as n, createCommentVNode as _, normalizeStyle as h } from "vue"; const f = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "ba5876b4-e1db-45ed-8daa-2afabd6e1d50" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#ba5876b4-e1db-45ed-8daa-2afabd6e1d50)" }, v = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#d80027", d: "m96 357 208-32 208 32v155H96l-32-78Z" }, null, -1), p = /* @__PURE__ */ e("path", { fill: "#496e2d", d: "M96 0h416v293l-208 32-208-32-32-147Z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#eee", d: "M0 0v512h96V357h416v-64H96V0Z" }, null, -1), b = { fill: "none" }, x = ["r"], B = /* @__PURE__ */ c({ __name: "ru-ce", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(d) { const t = d, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), r = o(() => 256 + t.strokeWidth / 2); return (w, y) => (a(), 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 ? (a(), i("title", v, n(t.flagName), 1)) : _("", !0), k, p, g ]), e("g", b, [ e("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: h({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, x) ]) ], 8, f)); } }); export { B as default }; //# sourceMappingURL=ru-ce-36bfbe41.js.map