UNPKG

vue-circle-flags

Version:

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

59 lines (58 loc) 1.94 kB
import { defineComponent as a, computed as o, openBlock as i, createElementBlock as n, createElementVNode as e, toDisplayString as d, createCommentVNode as _, normalizeStyle as f } from "vue"; const h = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "4d55ad06-9e28-4568-952e-7f37e3698f30" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#4d55ad06-9e28-4568-952e-7f37e3698f30)" }, v = { key: 0 }, p = /* @__PURE__ */ e("path", { fill: "#eee", d: "M189.2 0H512v167l-347.5 24.6z" }, null, -1), k = /* @__PURE__ */ e("path", { fill: "#6da544", d: "m163 320 349 25v167H189.2z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M0 0h189.2v167H512v178H189.2v167H0z" }, null, -1), x = /* @__PURE__ */ e("path", { fill: "#eee", d: "M156.6 112.7 133 89l-15.7 15.8L101.5 89 78 112.7l15.8 15.7L78 144l23.6 23.6 15.8-15.7 15.7 15.7 23.6-23.6-15.7-15.7z" }, null, -1), w = { fill: "none" }, y = ["r"], H = /* @__PURE__ */ a({ __name: "om", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const t = r, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), c = o(() => 256 + t.strokeWidth / 2); return (z, W) => (i(), n("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 ? (i(), n("title", v, d(t.flagName), 1)) : _("", !0), p, k, g, x ]), e("g", w, [ e("circle", { cx: "256", cy: "256", r: c.value, fill: "none", style: f({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, y) ]) ], 8, h)); } }); export { H as default }; //# sourceMappingURL=om-bd656073.js.map