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.92 kB
import { defineComponent as n, computed as o, openBlock as c, createElementBlock as s, createElementVNode as e, toDisplayString as d, createCommentVNode as _, normalizeStyle as f } from "vue"; const h = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "6eeeaa0c-d7ac-42a9-a1bc-0ca2c88caab3" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#6eeeaa0c-d7ac-42a9-a1bc-0ca2c88caab3)" }, k = { key: 0 }, p = /* @__PURE__ */ e("path", { fill: "#338af3", d: "M0 0h512v144.7L488 256l24 111.3V512H0V367.3L26 256 0 144.7z" }, null, -1), v = /* @__PURE__ */ e("path", { fill: "#eee", d: "M0 144.7h512v222.6H0z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#ffda44", d: "m332.4 256-31.2 14.7 16.7 30.3-34-6.5-4.2 34.3-23.7-25.2-23.6 25.2-4.3-34.3-34 6.5 16.6-30.3-31.2-14.7 31.3-14.7L194 211l34 6.5 4.3-34.3 23.6 25.2 23.6-25.2 4.4 34.3 34-6.5-16.7 30.3z" }, null, -1), x = { fill: "none" }, w = ["r"], B = /* @__PURE__ */ n({ __name: "ar", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const t = i, l = o(() => 512 + 2 * t.strokeWidth), a = o(() => -t.strokeWidth), r = o(() => 256 + t.strokeWidth / 2); return (y, W) => (c(), s("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${a.value} ${a.value} ${l.value} ${l.value}` }, [ m, e("g", u, [ t.flagName ? (c(), s("title", k, d(t.flagName), 1)) : _("", !0), p, v, g ]), e("g", x, [ e("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: f({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, w) ]) ], 8, h)); } }); export { B as default }; //# sourceMappingURL=ar-c2c23060.js.map