UNPKG

vue-circle-flags

Version:

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

53 lines (52 loc) 1.63 kB
import { defineComponent as n, computed as o, openBlock as c, createElementBlock as r, createElementVNode as t, toDisplayString as d, createCommentVNode as _, normalizeStyle as f } from "vue"; const h = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "bd63990a-36a3-49eb-8be6-89e76becd252" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#bd63990a-36a3-49eb-8be6-89e76becd252)" }, k = { key: 0 }, p = /* @__PURE__ */ t("path", { fill: "#338af3", d: "M0 0h512v512H0z" }, null, -1), g = /* @__PURE__ */ t("circle", { cx: "200.3", cy: "256", r: "111.3", fill: "#ffda44" }, null, -1), v = { fill: "none" }, x = ["r"], W = /* @__PURE__ */ n({ __name: "pw", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const e = i, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), a = o(() => 256 + e.strokeWidth / 2); return (b, w) => (c(), 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 ? (c(), r("title", k, d(e.flagName), 1)) : _("", !0), p, g ]), t("g", v, [ t("circle", { cx: "256", cy: "256", r: a.value, fill: "none", style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, h)); } }); export { W as default }; //# sourceMappingURL=pw-e42319c3.js.map