UNPKG

vue-circle-flags

Version:

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

55 lines (54 loc) 1.79 kB
import { defineComponent as d, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as a, createCommentVNode as f, normalizeStyle as _ } from "vue"; const h = ["viewBox"], v = /* @__PURE__ */ e("mask", { id: "235d8cb7-571a-480d-b537-bdff001f5c77" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#235d8cb7-571a-480d-b537-bdff001f5c77)" }, m = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M0 0h512v89l-66.3 167.5L512 423v89H0v-89l69.7-167.3L0 89z" }, null, -1), p = /* @__PURE__ */ e("path", { fill: "#eee", d: "M0 89h512v78l-39.7 91.1L512 345v78H0v-78l36.3-85.6L0 167z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M0 167h512v178H0z" }, null, -1), x = { fill: "none" }, b = ["r"], z = /* @__PURE__ */ d({ __name: "cr", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const t = r, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), n = o(() => 256 + t.strokeWidth / 2); return (w, y) => (c(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ v, e("g", u, [ t.flagName ? (c(), i("title", m, a(t.flagName), 1)) : f("", !0), k, p, g ]), e("g", x, [ e("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: _({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, b) ]) ], 8, h)); } }); export { z as default }; //# sourceMappingURL=cr-a34722d7.js.map