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.99 kB
import { defineComponent as h, computed as l, openBlock as a, createElementBlock as i, createElementVNode as t, toDisplayString as f, createCommentVNode as d, normalizeStyle as n, createStaticVNode as p } from "vue"; const m = ["viewBox"], v = /* @__PURE__ */ t("mask", { id: "73b9345a-e41c-478a-842c-bd1f706a3e9b" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), _ = { mask: "url(#73b9345a-e41c-478a-842c-bd1f706a3e9b)" }, k = { key: 0 }, u = /* @__PURE__ */ p('<path fill="#ff9811" d="m0 160 256-32 256 32v192l-256 32L0 352Z"></path><path fill="#eee" d="m0 160 256-32 256 32v32H0Z"></path><path fill="#338af3" d="M0 0h512v160H0Z"></path><path fill="#eee" d="m0 352 256 32 256-32v-32H0Z"></path><path fill="#6da544" d="M0 352h512v160H0Z"></path><circle cx="256" cy="256" r="160" fill="#eee"></circle><circle cx="256" cy="256" r="128" fill="#338af3"></circle><path fill="#ff9811" d="M207 139v68h-68l49 49-49 49h68v68l49-49 49 49v-68h68l-49-49 49-49h-68v-68l-49 49z"></path>', 8), g = { fill: "none" }, x = ["r"], N = /* @__PURE__ */ h({ __name: "otomi", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const e = r, o = l(() => 512 + 2 * e.strokeWidth), c = l(() => -e.strokeWidth), s = l(() => 256 + e.strokeWidth / 2); return (y, w) => (a(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${c.value} ${c.value} ${o.value} ${o.value}` }, [ v, t("g", _, [ e.flagName ? (a(), i("title", k, f(e.flagName), 1)) : d("", !0), u ]), t("g", g, [ t("circle", { cx: "256", cy: "256", r: s.value, fill: "none", style: n({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, m)); } }); export { N as default }; //# sourceMappingURL=otomi-81c29448.js.map