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) 2.1 kB
import { defineComponent as r, computed as o, openBlock as c, createElementBlock as a, createElementVNode as e, toDisplayString as d, createCommentVNode as f, normalizeStyle as _ } from "vue"; const h = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "9efe0c19-7ac3-43cc-8127-4b12347e78f0" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#9efe0c19-7ac3-43cc-8127-4b12347e78f0)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#ffda44", d: "M0 0h256l51.7 254.7L256 512H0z" }, null, -1), v = /* @__PURE__ */ e("path", { fill: "#eee", d: "M256 0h256v512H256z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#acabb1", d: "m354 222.8 48.1 63.6A33.4 33.4 0 1 0 420 273l-75-99.2-17.7 13.4-26.7 20.2 26.9 35.5 26.6-20.1zm69.3 73.1a11.1 11.1 0 1 1 13.4 17.8 11.1 11.1 0 0 1-13.4-17.8z" }, null, -1), x = /* @__PURE__ */ e("path", { fill: "#ffda44", d: "m436.6 242.9 26.8-35.5-26.6-20.2-17.8-13.4-75 99.2a33.4 33.4 0 1 0 17.8 13.4l48-63.6 26.8 20zm-93.8 68.6a11.1 11.1 0 1 1-17.8-13.4 11.1 11.1 0 0 1 17.8 13.4z" }, null, -1), z = { fill: "none" }, w = ["r"], N = /* @__PURE__ */ r({ __name: "va", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const t = i, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), n = o(() => 256 + t.strokeWidth / 2); return (y, W) => (c(), a("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ m, e("g", u, [ t.flagName ? (c(), a("title", p, d(t.flagName), 1)) : f("", !0), k, v, g, x ]), e("g", z, [ e("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, w) ]) ], 8, h)); } }); export { N as default }; //# sourceMappingURL=va-46e84e83.js.map