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.45 kB
import { defineComponent as r, computed as l, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as h, createCommentVNode as d, normalizeStyle as f } from "vue"; const _ = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "e97994a5-1053-4c52-a2c3-5ca85f6d18f7" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#e97994a5-1053-4c52-a2c3-5ca85f6d18f7)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#ffda44", d: "M0 0h445.3l33.9 255-33.9 257-323.7-134.3L0 66.8z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M0 66.8V512h445.4z" }, null, -1), v = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M445.3 0H512v512h-66.7z" }, null, -1), z = /* @__PURE__ */ e("path", { fill: "#eee", d: "m354.6 456-8.3 25.6h-26.8l21.7 15.8-8.3 25.5 21.7-15.8 21.7 15.8-8.3-25.5 21.7-15.8h-26.8zm-55-55.4-8.3 25.5h-26.8l21.7 15.8-8.3 25.5 21.7-15.8 21.7 15.8-8.3-25.5 21.7-15.8h-26.8zM244.4 345l-8.3 25.5h-26.8l21.7 15.8-8.3 25.5 21.7-15.8 21.7 15.8-8.3-25.5 21.7-15.8h-26.8zm-55.1-55.7-8.3 25.5h-26.8l21.7 15.8-8.3 25.5 21.7-15.8L211 356l-8.3-25.5 21.7-15.8h-26.8zm-55.4-55.7-8.3 25.5H98.8l21.7 15.8-8.3 25.5 21.7-15.8 21.7 15.8-8.3-25.5L169 259h-26.8zM78.7 178l-8.3 25.5H43.6l21.7 15.8-8.3 25.5L78.7 229l21.7 15.8-8.3-25.5 21.7-15.8H87zm-55.2-55.7-8.3 25.5h-26.8l21.7 15.8L1.8 189l21.7-15.8L45.2 189l-8.3-25.5 21.7-15.8H31.8z" }, null, -1), x = { fill: "none" }, w = ["r"], B = /* @__PURE__ */ r({ __name: "ba", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(a) { const t = a, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), n = l(() => 256 + t.strokeWidth / 2); return (y, L) => (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", u, [ t.flagName ? (c(), i("title", p, h(t.flagName), 1)) : d("", !0), k, g, v, z ]), e("g", x, [ e("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: f({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, w) ]) ], 8, _)); } }); export { B as default }; //# sourceMappingURL=ba-3a4f8c4d.js.map