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.96 kB
import { defineComponent as d, computed as l, openBlock as c, createElementBlock as i, createElementVNode as t, toDisplayString as h, createCommentVNode as f, normalizeStyle as n, createStaticVNode as p } from "vue"; const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "5a6f4b81-6e7a-4651-95f6-c7d6c711101a" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), k = { mask: "url(#5a6f4b81-6e7a-4651-95f6-c7d6c711101a)" }, u = { key: 0 }, v = /* @__PURE__ */ p('<path fill="#a2001d" d="m0 256 254.8-41.8L512 256v256H0z"></path><path fill="#0052b4" d="M0 0h512v256H0z"></path><path fill="#eee" d="m345 322.8-89-11.1-89 11V189.3h178z"></path><circle cx="256" cy="267.1" r="44.5" fill="#0052b4"></circle><circle cx="256" cy="267.1" r="22.3" fill="#a2001d"></circle><path fill="#6da544" d="M222.6 211.5h66.8L256 244.9z"></path><path fill="#ffda44" d="M244.9 233.7H267v66.8h-22z"></path><path fill="#6da544" d="M291.6 293.8h-71.2l-53.4 29h178z"></path>', 8), g = { fill: "none" }, x = ["r"], N = /* @__PURE__ */ d({ __name: "ht", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const e = r, o = l(() => 512 + 2 * e.strokeWidth), a = l(() => -e.strokeWidth), s = l(() => 256 + e.strokeWidth / 2); return (y, z) => (c(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${a.value} ${a.value} ${o.value} ${o.value}` }, [ m, t("g", k, [ e.flagName ? (c(), i("title", u, h(e.flagName), 1)) : f("", !0), v ]), 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, _)); } }); export { N as default }; //# sourceMappingURL=ht-270a65e3.js.map