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.92 kB
import { defineComponent as r, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as d, createCommentVNode as _, normalizeStyle as h } from "vue"; const f = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "a10c679a-cc7c-4d93-9e54-47249a8047de" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#a10c679a-cc7c-4d93-9e54-47249a8047de)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M0 0h189.2l54 257.6-54 254.4H0z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#ffda44", d: "M189.2 0H512v256l-159 53.5L189.1 256z" }, null, -1), v = /* @__PURE__ */ e("path", { fill: "#6da544", d: "M189.2 256H512v256H189.2z" }, null, -1), w = /* @__PURE__ */ e("path", { fill: "#333", d: "m96.7 189.2 16.6 51H167l-43.4 31.6 16.5 51-43.4-31.5-43.4 31.5 16.6-51-43.4-31.6h53.7z" }, null, -1), x = { fill: "none" }, y = ["r"], H = /* @__PURE__ */ r({ __name: "gw", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(a) { const t = a, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), n = o(() => 256 + t.strokeWidth / 2); return (z, W) => (c(), 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 ? (c(), i("title", p, d(t.flagName), 1)) : _("", !0), k, g, v, w ]), e("g", x, [ 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 { H as default }; //# sourceMappingURL=gw-c6155eb7.js.map