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.81 kB
import { defineComponent as f, computed as o, openBlock as a, createElementBlock as c, createElementVNode as t, toDisplayString as d, createCommentVNode as n, normalizeStyle as h, createStaticVNode as p } from "vue"; const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "64cf18f9-3cf9-4ff6-a06f-e604c80bf0e2" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), v = { mask: "url(#64cf18f9-3cf9-4ff6-a06f-e604c80bf0e2)" }, k = { key: 0 }, u = /* @__PURE__ */ p('<path fill="#0052b4" d="M0 0v332l150.9-138.5L225.2 0z"></path><path fill="#ffda44" d="M273.1 253.3 512 0H225.2L0 332v80.2z"></path><path fill="#d80027" d="M512 0 0 412.2v50.4L277.9 390 512 256z"></path><path fill="#eee" d="M0 462.6 512 256v133.5l-223.9 78.8L0 488.4z"></path><path fill="#6da544" d="m512 389.5-512 99V512h512z"></path>', 5), g = { fill: "none" }, x = ["r"], N = /* @__PURE__ */ f({ __name: "sc", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const e = i, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2); return (w, z) => (a(), c("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ m, t("g", v, [ e.flagName ? (a(), c("title", k, d(e.flagName), 1)) : n("", !0), u ]), t("g", g, [ t("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: h({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, _)); } }); export { N as default }; //# sourceMappingURL=sc-f69cb792.js.map