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.75 kB
import { defineComponent as n, computed as o, openBlock as i, createElementBlock as r, createElementVNode as t, toDisplayString as d, createCommentVNode as h, normalizeStyle as _ } from "vue"; const f = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "ae2be9e0-5325-4503-8bc6-87166918efa0" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#ae2be9e0-5325-4503-8bc6-87166918efa0)" }, k = { key: 0 }, v = /* @__PURE__ */ t("path", { fill: "#d80027", d: "M0 0h133.6l32.7 20.3 34-20.3H512v222.6L491.4 256l20.6 33.4V512H200.3l-31.7-20.4-35 20.4H0V289.4l29.4-33L0 222.7z" }, null, -1), p = /* @__PURE__ */ t("path", { fill: "#eee", d: "M133.6 0v222.6H0v66.8h133.6V512h66.7V289.4H512v-66.8H200.3V0h-66.7z" }, null, -1), g = { fill: "none" }, x = ["r"], H = /* @__PURE__ */ n({ __name: "dk", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(c) { const e = c, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), a = o(() => 256 + e.strokeWidth / 2); return (w, V) => (i(), r("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ m, t("g", u, [ e.flagName ? (i(), r("title", k, d(e.flagName), 1)) : h("", !0), v, p ]), t("g", g, [ t("circle", { cx: "256", cy: "256", r: a.value, fill: "none", style: _({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, f)); } }); export { H as default }; //# sourceMappingURL=dk-2c530e76.js.map