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.33 kB
import { defineComponent as n, computed as t, openBlock as s, createElementBlock as h, createElementVNode as e, toDisplayString as d, createCommentVNode as a, normalizeStyle as m } from "vue"; const _ = ["viewBox"], f = /* @__PURE__ */ e("mask", { id: "d45f7ccc-18c3-4681-9cd5-255c0c40b898" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), v = { mask: "url(#d45f7ccc-18c3-4681-9cd5-255c0c40b898)" }, u = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M256 0h256v512H0V256Z" }, null, -1), p = /* @__PURE__ */ e("path", { fill: "#eee", d: "M0 0v32l32 32L0 96v160h32l32-32 32 32h32v-83l83 83h45l-8-16 8-15v-14l-83-83h83V96l-32-32 32-32V0H96L64 32 32 0Zm382 92-11 35h-37l30 21-12 35 30-22 30 22-12-35 30-21h-37l-11-35Zm61 72-11 35h-37l30 21-11 35 29-21 30 21-12-35 30-21h-37Zm-123 10-11 35h-37l30 22-11 35 29-22 30 22-11-35 29-22h-36zm59 130-11 35h-37l30 21-11 35 29-21 30 21-11-35 29-21h-36z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M32 0v32H0v64h32v160h64V96h160V32H96V0Zm96 128 128 128v-31l-97-97zm251 201-5 18h-19l15 10-6 18 15-11 15 11-5-18 14-10h-18Zm-59-129-5 17h-19l15 11-6 17 15-11 15 11-6-17 15-11h-18l-6-17zm123-11-6 18h-18l15 11-6 17 15-11 15 11-6-17 15-11h-18l-6-18zm-61-72-6 17h-18l15 11-6 17 15-10 15 10-6-17 15-11h-18z" }, null, -1), z = { fill: "none" }, x = ["r"], W = /* @__PURE__ */ n({ __name: "nz", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const l = i, o = t(() => 512 + 2 * l.strokeWidth), c = t(() => -l.strokeWidth), r = t(() => 256 + l.strokeWidth / 2); return (V, w) => (s(), h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${c.value} ${c.value} ${o.value} ${o.value}` }, [ f, e("g", v, [ l.flagName ? (s(), h("title", u, d(l.flagName), 1)) : a("", !0), k, p, g ]), e("g", z, [ e("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: m({ stroke: l.strokeColor, strokeWidth: l.strokeWidth }) }, null, 12, x) ]) ], 8, _)); } }); export { W as default }; //# sourceMappingURL=nz-2eabc236.js.map