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.82 kB
import { defineComponent as v, computed as o, openBlock as c, createElementBlock as r, createElementVNode as t, toDisplayString as a, createCommentVNode as d, normalizeStyle as f } from "vue"; const h = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "20f3b585-ecf0-4bcd-8758-f12864fdf58c" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#20f3b585-ecf0-4bcd-8758-f12864fdf58c)" }, u = { key: 0 }, k = /* @__PURE__ */ t("path", { fill: "#0052b4", d: "M0 0h99l29 32 28-32h356v57l-32 28 32 29v57l-32 28 32 29v57l-32 28 32 28v57l-32 29 32 28v57H0v-57l32-28-32-29v-56l32-29-32-28V171l32-29-32-28Z" }, null, -1), g = /* @__PURE__ */ t("path", { fill: "#eee", d: "M99 0v114H0v57h99v114H0v57h512v-57H156V171h100v-57H156V0Zm157 57v57h256V57Zm0 114v57h256v-57ZM0 398v57h512v-57z" }, null, -1), p = { fill: "none" }, x = ["r"], W = /* @__PURE__ */ v({ __name: "gr", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const e = i, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), n = o(() => 256 + e.strokeWidth / 2); return (w, y) => (c(), r("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(), r("title", u, a(e.flagName), 1)) : d("", !0), k, g ]), t("g", p, [ t("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, h)); } }); export { W as default }; //# sourceMappingURL=gr-731ff16f.js.map