UNPKG

vue-circle-flags

Version:

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

51 lines (50 loc) 2.04 kB
import { defineComponent as d, computed as o, openBlock as s, createElementBlock as a, createElementVNode as t, toDisplayString as n, createCommentVNode as _, normalizeStyle as f } from "vue"; const h = ["viewBox"], m = /* @__PURE__ */ t("mask", { id: "ce22e3fc-18ad-462d-b6ab-b8dd882c9d35" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#ce22e3fc-18ad-462d-b6ab-b8dd882c9d35)" }, k = { key: 0 }, p = /* @__PURE__ */ t("path", { fill: "#d80027", d: "M0 0h512v512H0z" }, null, -1), g = /* @__PURE__ */ t("path", { fill: "#eee", d: "M282.4 193.7c-5.8 24.2-16.1 19.6-21.2 40.7a55.7 55.7 0 0 1 26-108.3c-10.1 42.2.4 46-4.8 67.6zM205 211.6c21.2 13 13.6 21.4 32.1 32.8a55.7 55.7 0 0 1-94.9-58.2c37 22.7 43.8 13.8 62.8 25.4zm-7 79.3c19-16.2 24.7-6.4 41.2-20.4a55.7 55.7 0 0 1-84.7 72.2c33-28.2 26.6-37.4 43.6-51.8zm73.4 31c-9.6-23 1.5-25.3-6.8-45.3a55.7 55.7 0 0 1 42.6 102.8c-16.6-40-27.3-36.9-35.8-57.4zm52.2-60c-24.9 2-23.7-9.3-45.3-7.6a55.7 55.7 0 0 1 111-8.7c-43.3 3.4-43.6 14.5-65.7 16.3z" }, null, -1), v = { fill: "none" }, x = ["r"], y = /* @__PURE__ */ d({ __name: "hk", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { const e = i, c = o(() => 512 + 2 * e.strokeWidth), l = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2); return (z, w) => (s(), a("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${l.value} ${l.value} ${c.value} ${c.value}` }, [ m, t("g", u, [ e.flagName ? (s(), a("title", k, n(e.flagName), 1)) : _("", !0), p, g ]), t("g", v, [ t("circle", { cx: "256", cy: "256", r: r.value, fill: "none", style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, x) ]) ], 8, h)); } }); export { y as default }; //# sourceMappingURL=hk-97f30935.js.map