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.69 kB
import { defineComponent as a, computed as o, openBlock as i, createElementBlock as r, createElementVNode as t, toDisplayString as d, createCommentVNode as f, normalizeStyle as _ } from "vue"; const h = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "2b18f4bf-6b2a-4c66-84e5-ed557de24735" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#2b18f4bf-6b2a-4c66-84e5-ed557de24735)" }, v = { key: 0 }, k = /* @__PURE__ */ t("path", { fill: "#eee", d: "M256 96 0 128v128l256 32 256-32V128L256 96zm0 256L0 384v128h512V384l-256-32z" }, null, -1), g = /* @__PURE__ */ t("path", { fill: "#d80027", d: "M0 0h512v128H0zm0 256h512v128H0z" }, null, -1), p = { fill: "none" }, x = ["r"], z = /* @__PURE__ */ a({ __name: "in-gj", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(c) { const e = c, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), n = o(() => 256 + e.strokeWidth / 2); return (w, b) => (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", v, d(e.flagName), 1)) : f("", !0), k, g ]), t("g", p, [ t("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: _({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, h)); } }); export { z as default }; //# sourceMappingURL=in-gj-72e879da.js.map