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) 2.26 kB
import { defineComponent as n, computed as t, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as a, createCommentVNode as h, normalizeStyle as v } from "vue"; const f = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "4bede729-23dc-4fef-bda1-9f8d7b9c9895" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), _ = { mask: "url(#4bede729-23dc-4fef-bda1-9f8d7b9c9895)" }, u = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M0 0h512v512H0z" }, null, -1), p = /* @__PURE__ */ e("path", { fill: "#eee", d: "m154 300 14 30 32-8-14 30 25 20-32 7 1 33-26-21-26 21 1-33-33-7 26-20-14-30 32 8zm222-27h47l-38 27 15-44 14 44zm7-162 7 15 16-4-7 15 12 10-15 3v17l-13-11-13 11v-17l-15-3 12-10-7-15 16 4zm57 67 7 15 16-4-7 15 12 10-15 3v16l-13-10-13 11v-17l-15-3 12-10-7-15 16 4zm-122 22 7 15 16-4-7 15 12 10-15 3v16l-13-10-13 11v-17l-15-3 12-10-7-15 16 4zm65 156 7 15 16-4-7 15 12 10-15 3v17l-13-11-13 11v-17l-15-3 12-10-7-15 16 4zM0 0v32l32 32L0 96v160h32l32-32 32 32h32v-83l83 83h45l-8-16 8-15v-14l-83-83h83V96l-32-32 32-32V0H96L64 32 32 0Z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M32 0v32H0v64h32v160h64V96h160V32H96V0Zm96 128 128 128v-31l-97-97z" }, null, -1), z = { fill: "none" }, x = ["r"], y = /* @__PURE__ */ n({ __name: "au", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const l = r, o = t(() => 512 + 2 * l.strokeWidth), s = t(() => -l.strokeWidth), d = t(() => 256 + l.strokeWidth / 2); return (b, w) => (c(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${o.value} ${o.value}` }, [ m, e("g", _, [ l.flagName ? (c(), i("title", u, a(l.flagName), 1)) : h("", !0), k, p, g ]), e("g", z, [ e("circle", { cx: "256", cy: "256", r: d.value, fill: "none", style: v({ stroke: l.strokeColor, strokeWidth: l.strokeWidth }) }, null, 12, x) ]) ], 8, f)); } }); export { y as default }; //# sourceMappingURL=au-b09c8afa.js.map