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.89 kB
import { defineComponent as a, computed as o, openBlock as i, createElementBlock as c, createElementVNode as e, toDisplayString as d, createCommentVNode as _, normalizeStyle as f } from "vue"; const h = ["viewBox"], u = /* @__PURE__ */ e("mask", { id: "3592082c-ff37-4370-8ed6-9507e8890004" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#3592082c-ff37-4370-8ed6-9507e8890004)" }, v = { key: 0 }, p = /* @__PURE__ */ e("path", { fill: "#eee", d: "M0 63 63 0h449v449l-63 63H0z" }, null, -1), k = /* @__PURE__ */ e("path", { fill: "#338af3", d: "M0 0v63l449 449h63v-63L63 0H0z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#d80027", d: "m211 181 46 16.4 44-16.4v-38l-18 9-27-27-27 27-18-9z" }, null, -1), x = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M186 181v103a70 70 0 0 0 140 0V181z" }, null, -1), w = { fill: "none" }, y = ["r"], N = /* @__PURE__ */ a({ __name: "es-ga", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(n) { const t = n, l = o(() => 512 + 2 * t.strokeWidth), s = o(() => -t.strokeWidth), r = o(() => 256 + t.strokeWidth / 2); return (z, W) => (i(), c("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(), c("title", v, d(t.flagName), 1)) : _("", !0), p, k, g, x ]), e("g", w, [ e("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: f({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, y) ]) ], 8, h)); } }); export { N as default }; //# sourceMappingURL=es-ga-081f9fa8.js.map