UNPKG

vue-circle-flags

Version:

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

44 lines (43 loc) 1.78 kB
import { defineComponent as d, computed as o, openBlock as s, createElementBlock as c, createElementVNode as t, toDisplayString as n, createCommentVNode as h, normalizeStyle as f, createStaticVNode as p } from "vue"; const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "5005112f-eea7-4c5d-9cc2-3392844bba6d" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), k = { mask: "url(#5005112f-eea7-4c5d-9cc2-3392844bba6d)" }, u = { key: 0 }, v = /* @__PURE__ */ p('<path fill="#eee" d="m0 160 256-32 256 32v192l-256 32L0 352Z"></path><path fill="#d80027" d="M0 0h512v160H0Z"></path><path fill="#ffda44" d="M0 352h512v160H0Z"></path><path fill="#333" d="M144 423 256 79l112 344L75 211h362z"></path><path fill="#eee" d="m175 381 81-250 81 250-213-154h264z"></path>', 5), g = { fill: "none" }, x = ["r"], W = /* @__PURE__ */ d({ __name: "kongo", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const e = i, l = o(() => 512 + 2 * e.strokeWidth), a = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2); return (w, y) => (s(), c("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${a.value} ${a.value} ${l.value} ${l.value}` }, [ m, t("g", k, [ e.flagName ? (s(), c("title", u, n(e.flagName), 1)) : h("", !0), v ]), 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, _)); } }); export { W as default }; //# sourceMappingURL=kongo-a7466d1b.js.map