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.9 kB
import { defineComponent as r, computed as o, openBlock as i, createElementBlock as a, createElementVNode as e, toDisplayString as c, createCommentVNode as f, normalizeStyle as _ } from "vue"; const h = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "ddb83ff8-5e3f-4305-b573-baf2a8ab90d0" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#ddb83ff8-5e3f-4305-b573-baf2a8ab90d0)" }, p = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#338af3", d: "M0 0h512v256l-153.2 35.7L210 256z" }, null, -1), v = /* @__PURE__ */ e("path", { fill: "#6da544", d: "M210 256h302v256H0z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#eee", d: "M0 0v512l256-256z" }, null, -1), b = /* @__PURE__ */ e("path", { fill: "#d80027", d: "m103.6 189.2 16.6 51h53.6l-43.4 31.6 16.6 51-43.4-31.5-43.4 31.5 16.6-51-43.4-31.6H87z" }, null, -1), x = { fill: "none" }, w = ["r"], B = /* @__PURE__ */ r({ __name: "dj", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(d) { const t = d, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), n = o(() => 256 + t.strokeWidth / 2); return (y, z) => (i(), a("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${l.value} ${l.value}` }, [ u, e("g", m, [ t.flagName ? (i(), a("title", p, c(t.flagName), 1)) : f("", !0), k, v, g, b ]), 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, h)); } }); export { B as default }; //# sourceMappingURL=dj-e68985b7.js.map