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.91 kB
import { defineComponent as a, computed as l, openBlock as i, createElementBlock as r, createElementVNode as t, toDisplayString as d, createCommentVNode as h, normalizeStyle as f } from "vue"; const m = ["viewBox"], _ = /* @__PURE__ */ t("mask", { id: "bfb47132-17e2-4d94-931f-cdb000620982" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#bfb47132-17e2-4d94-931f-cdb000620982)" }, k = { key: 0 }, p = /* @__PURE__ */ t("path", { fill: "#0052b4", d: "M0 0h512v512H0z" }, null, -1), g = /* @__PURE__ */ t("path", { fill: "#ffda44", d: "m336.8 199.7 104-75.1h-128l104 75.1-40-122.1zM57 231.7l52-37.4H45l52 37.4-20-60.9zm85.5 31.7 52-37.4h-64l52 37.4-20-60.9zM185 309l52-37.4h-64l52 37.4-20-60.9zm43 47.6 52-37.4h-64l52 37.4-20-60.9zm-5.6 67.1 52-37.4h-64l52 37.4-20-60.9zM356 402.2l52-37.4h-64l52 37.4-20-60.9zm-37.4 53.2 52-37.4h-64l52 37.4-20-60.9z" }, null, -1), v = { fill: "none" }, z = ["r"], y = /* @__PURE__ */ a({ __name: "us-ak", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(c) { const e = c, o = l(() => 512 + 2 * e.strokeWidth), s = l(() => -e.strokeWidth), n = l(() => 256 + e.strokeWidth / 2); return (x, b) => (i(), r("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${o.value} ${o.value}` }, [ _, t("g", u, [ e.flagName ? (i(), r("title", k, d(e.flagName), 1)) : h("", !0), p, g ]), t("g", v, [ t("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, z) ]) ], 8, m)); } }); export { y as default }; //# sourceMappingURL=us-ak-0cf84022.js.map