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.83 kB
import { defineComponent as a, computed as o, openBlock as c, createElementBlock as i, createElementVNode as e, toDisplayString as d, createCommentVNode as h, normalizeStyle as _ } from "vue"; const f = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "16e26b43-482c-408a-bdc0-520e3092324b" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#16e26b43-482c-408a-bdc0-520e3092324b)" }, v = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M0 0v512h144l112-64 112 64h144V0H368L256 64 144 0Z" }, null, -1), p = /* @__PURE__ */ e("path", { fill: "#eee", d: "M144 0h224v512H144Z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#d80027", d: "m301 289 44-22-22-11v-22l-45 22 23-44h-23l-22-34-22 33h-23l23 45-45-22v22l-22 11 45 22-12 23h45v33h22v-33h45z" }, null, -1), x = { fill: "none" }, w = ["r"], B = /* @__PURE__ */ a({ __name: "ca", 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 (b, y) => (c(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ m, e("g", u, [ t.flagName ? (c(), i("title", v, d(t.flagName), 1)) : h("", !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, w) ]) ], 8, f)); } }); export { B as default }; //# sourceMappingURL=ca-9dc1ce3f.js.map