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.19 kB
import { defineComponent as a, computed as l, openBlock as i, createElementBlock as c, createElementVNode as e, toDisplayString as d, createCommentVNode as h, normalizeStyle as _ } from "vue"; const f = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "44fd6754-6fc4-4b98-ab46-0b2db6876a5b" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#44fd6754-6fc4-4b98-ab46-0b2db6876a5b)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#eee", d: "M228.4 0H512v512h-27.4L159.4 258.5z" }, null, -1), v = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M510.5 283.8 228.5 0h-39.3l-70.9 253.8L445.2 512h39.4L256.4 283.8h254z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M445.2 256 189.2 0H0v512h445.2l-256-256z" }, null, -1), b = /* @__PURE__ */ e("path", { fill: "#eee", d: "m243.5 378-31.3-14.7L229 333l-34 6.5-4.3-34.3-23.6 25.2-23.7-25.2-4.3 34.3-34-6.5 16.7 30.3L90.4 378l31.3 14.7-16.6 30.3 34-6.5 4.2 34.3 23.7-25.2 23.6 25.2 4.3-34.3 34 6.5-16.7-30.3zM149.8 89l-3.2 25-24.7-4.7 12.1 22-22.7 10.7h-11.1a66.8 66.8 0 0 0 133.5 0h-11.1L200 131.3l12-22-24.6 4.7-3.1-25-17.2 18.4z" }, null, -1), x = { fill: "none" }, w = ["r"], W = /* @__PURE__ */ a({ __name: "np", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(n) { const t = n, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), r = l(() => 256 + t.strokeWidth / 2); return (z, y) => (i(), c("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${o.value} ${o.value}` }, [ u, e("g", m, [ t.flagName ? (i(), c("title", p, d(t.flagName), 1)) : h("", !0), k, v, g, b ]), e("g", x, [ e("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, w) ]) ], 8, f)); } }); export { W as default }; //# sourceMappingURL=np-90cd5744.js.map