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.79 kB
import { defineComponent as d, computed as o, openBlock as a, createElementBlock as c, createElementVNode as t, toDisplayString as n, createCommentVNode as h, normalizeStyle as f, createStaticVNode as p } from "vue"; const _ = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "84eec927-8578-47d3-b1ef-3ac042038b31" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), g = { mask: "url(#84eec927-8578-47d3-b1ef-3ac042038b31)" }, k = { key: 0 }, u = /* @__PURE__ */ p('<path fill="#496e2d" d="M0 0h256l45.3 251.8L256 512H0z"></path><path fill="#eee" d="M256 0h256v512H256z"></path><g fill="#d80027"><path d="m311 206.9-21 29-34-11 21 28.8-21 29 34-11.1 21 29v-35.8l34-11.1-34-11z"></path><path d="M277.2 328.3a72.3 72.3 0 1 1 34.5-136 89 89 0 1 0 0 127.3 72 72 0 0 1-34.5 8.7z"></path></g>', 3), v = { fill: "none" }, x = ["r"], N = /* @__PURE__ */ d({ __name: "dz", 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", g, [ e.flagName ? (a(), c("title", k, n(e.flagName), 1)) : h("", !0), u ]), t("g", v, [ t("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, _)); } }); export { N as default }; //# sourceMappingURL=dz-708f9fcd.js.map