UNPKG

vue-circle-flags

Version:

A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags

51 lines (50 loc) 1.79 kB
import { defineComponent as a, computed as o, openBlock as c, createElementBlock as i, createElementVNode as t, toDisplayString as d, createCommentVNode as v, normalizeStyle as h } from "vue"; const f = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "e8eb1911-c913-46b1-a91b-679f769d51d7" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#e8eb1911-c913-46b1-a91b-679f769d51d7)" }, u = { key: 0 }, k = /* @__PURE__ */ t("path", { fill: "#ffda44", d: "M0 0v57l32 29-32 28v57l32 29-32 28v57l32 28-32 28v57l32 29-32 28v57h512v-57l-32-28 32-29v-57l-32-28 32-28v-57l-32-28 32-29v-57l-32-28 32-29V0H0z" }, null, -1), p = /* @__PURE__ */ t("path", { fill: "#d80027", d: "M0 57h512v57H0Zm0 114h512v57H0Zm0 114h512v56H0Zm0 113h512v57H0Z" }, null, -1), g = { fill: "none" }, x = ["r"], W = /* @__PURE__ */ a({ __name: "es-ct", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const e = r, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), n = o(() => 256 + e.strokeWidth / 2); return (w, b) => (c(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ _, t("g", m, [ e.flagName ? (c(), i("title", u, d(e.flagName), 1)) : v("", !0), k, p ]), t("g", g, [ t("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: h({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, f)); } }); export { W as default }; //# sourceMappingURL=es-ct-bf9b1d44.js.map