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.89 kB
import { defineComponent as r, computed as o, openBlock as a, createElementBlock as i, createElementVNode as e, toDisplayString as d, createCommentVNode as _, normalizeStyle as h } from "vue"; const f = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "87d3a56d-80a9-40a7-9b7c-673caf372a73" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#87d3a56d-80a9-40a7-9b7c-673caf372a73)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M0 0h512v256H0z" }, null, -1), v = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M0 256h512v256H0z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#eee", d: "M0 256 256 0l256 256-256 256z" }, null, -1), x = /* @__PURE__ */ e("path", { fill: "#ffda44", d: "m256 133.6 27.6 85H373L300.7 271l27.6 85-72.3-52.5-72.3 52.6 27.6-85-72.3-52.6h89.4z" }, null, -1), w = { fill: "none" }, y = ["r"], N = /* @__PURE__ */ r({ __name: "bq-sa", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(c) { const t = c, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), n = o(() => 256 + t.strokeWidth / 2); return (z, W) => (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", p, d(t.flagName), 1)) : _("", !0), k, v, g, x ]), e("g", w, [ e("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: h({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, y) ]) ], 8, f)); } }); export { N as default }; //# sourceMappingURL=bq-sa-ed0e662b.js.map