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) 2.28 kB
import { defineComponent as h, computed as l, openBlock as c, createElementBlock as i, createElementVNode as t, toDisplayString as d, createCommentVNode as f, normalizeStyle as n, createStaticVNode as p } from "vue"; const m = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "d104ca52-b829-4a6a-be94-18103f1fd858" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), v = { mask: "url(#d104ca52-b829-4a6a-be94-18103f1fd858)" }, g = { key: 0 }, k = /* @__PURE__ */ p('<path fill="#ffda44" d="m0 144.7 256-20.5 256 20.5V178l-37.4 79 37.4 77v33.3l-256 24.1L0 367.3V334l37.7-77.3L0 178z"></path><path fill="#333" d="M0 0h512v144.7H0z"></path><path fill="#0052b4" d="M0 367.3h512V512H0z"></path><path fill="#a2001d" d="M0 178h512v156H0z"></path><path fill="#ffda44" d="M89.2 244.9h334V267h-334zm44.6-44.6h244.8v22.3H133.8z"></path><path fill="#eee" d="m256.2 189.2-18 65.2 18 68.4c66.8 0 124-66.8 124-66.8s-57.2-66.8-124-66.8z"></path><path fill="#333" d="M256.2 322.8c-66.8 0-124-66.8-124-66.8s57.2-66.8 124-66.8"></path><path fill="#eee" d="M211.7 233.7h22.2v44.6h-22.2z"></path><path fill="#333" d="M278.5 233.7h22.2v44.6h-22.2z"></path><g fill="#0052b4" transform="translate(.2)"><circle cx="89" cy="256" r="22.3"></circle><circle cx="423" cy="256" r="22.3"></circle></g>', 10), u = { fill: "none" }, z = ["r"], M = /* @__PURE__ */ h({ __name: "sz", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(s) { const e = s, a = l(() => 512 + 2 * e.strokeWidth), o = l(() => -e.strokeWidth), r = l(() => 256 + e.strokeWidth / 2); return (x, y) => (c(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${o.value} ${o.value} ${a.value} ${a.value}` }, [ _, t("g", v, [ e.flagName ? (c(), i("title", g, d(e.flagName), 1)) : f("", !0), k ]), t("g", u, [ t("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: n({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, z) ]) ], 8, m)); } }); export { M as default }; //# sourceMappingURL=sz-6897e002.js.map