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.89 kB
import { defineComponent as c, computed as o, openBlock as s, createElementBlock as i, createElementVNode as t, toDisplayString as f, createCommentVNode as n, normalizeStyle as h, createStaticVNode as p } from "vue"; const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "5833add2-02f2-495a-9566-219faf1e9e1d" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), k = { mask: "url(#5833add2-02f2-495a-9566-219faf1e9e1d)" }, u = { key: 0 }, v = /* @__PURE__ */ p('<path fill="#0052b4" d="M0 0h512v144.7l-40.5 112.6 40.5 110V512H0V367.3l42.2-114L0 144.7z"></path><path fill="#eee" d="M0 144.7h512v222.6H0z"></path><path fill="#ffda44" d="m204.6 267.1 51.4-89 51.4 89z"></path><path fill="#6da544" d="M322.8 296.5 256 330l-66.8-33.4V252h133.6z"></path><path fill="#ffda44" d="m319 182-23.6 23.5a55.5 55.5 0 0 1-39.4 95 55.7 55.7 0 0 1-39.3-95L193 182a89 89 0 1 0 126 0z"></path>', 5), g = { fill: "none" }, x = ["r"], N = /* @__PURE__ */ c({ __name: "sv", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const e = r, l = o(() => 512 + 2 * e.strokeWidth), a = o(() => -e.strokeWidth), d = o(() => 256 + e.strokeWidth / 2); return (w, z) => (s(), i("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(), i("title", u, f(e.flagName), 1)) : n("", !0), v ]), t("g", g, [ t("circle", { cx: "256", cy: "256", r: d.value, fill: "none", style: h({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, _)); } }); export { N as default }; //# sourceMappingURL=sv-f2131343.js.map