UNPKG

vue-circle-flags

Version:

A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags

51 lines (50 loc) 1.8 kB
import { defineComponent as n, computed as o, openBlock as c, createElementBlock as a, createElementVNode as t, toDisplayString as d, createCommentVNode as _, normalizeStyle as f } from "vue"; const h = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "3ae62738-f2b4-41c7-bcd4-7a0651fc3a11" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#3ae62738-f2b4-41c7-bcd4-7a0651fc3a11)" }, k = { key: 0 }, v = /* @__PURE__ */ t("path", { fill: "#eee", d: "M0 0h512v512H0z" }, null, -1), p = /* @__PURE__ */ t("path", { fill: "#d80027", d: "M334 211.5v22.2h30.5a134.2 134.2 0 0 1-49.5 42 27.7 27.7 0 0 0-47.2 13.2 134.8 134.8 0 0 1-23.6 0 27.8 27.8 0 0 0-47.2-13.2 134.2 134.2 0 0 1-49.5-42h30.6v-22.2h-78a155.8 155.8 0 0 0 311.7 0H334z" }, null, -1), g = { fill: "none" }, x = ["r"], B = /* @__PURE__ */ n({ __name: "easter_island", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const e = i, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2); return (w, y) => (c(), a("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ m, t("g", u, [ e.flagName ? (c(), a("title", k, d(e.flagName), 1)) : _("", !0), v, p ]), t("g", g, [ t("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, h)); } }); export { B as default }; //# sourceMappingURL=easter_island-98c886a4.js.map