UNPKG

vue-circle-flags

Version:

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

44 lines (43 loc) 2.52 kB
import { defineComponent as r, computed as l, openBlock as a, createElementBlock as s, createElementVNode as t, toDisplayString as d, createCommentVNode as m, normalizeStyle as n, createStaticVNode as v } from "vue"; const f = ["viewBox"], p = /* @__PURE__ */ t("mask", { id: "cdce931b-3ef1-42d5-a6c1-38845006ef47" }, [ /* @__PURE__ */ t("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), z = { mask: "url(#cdce931b-3ef1-42d5-a6c1-38845006ef47)" }, _ = { key: 0 }, k = /* @__PURE__ */ v('<path fill="#eee" d="m0 167 253.8-19.3L512 167v178l-254.9 32.3L0 345z"></path><path fill="#d80027" d="M0 0h512v167H0z"></path><path fill="#0052b4" d="M0 345h512v167H0z"></path><path fill="#338af3" d="M322.8 178h-44.5l7.4-55.7 29.7-22.2 29.6 22.2V167zm-133.6 0h44.5l-7.4-55.7-29.7-22.2-29.6 22.2V167z"></path><path fill="#0052b4" d="M285.7 178h-59.4v-55.7l29.7-22.2 29.7 22.2z"></path><path fill="#eee" d="M167 167v122.3a89 89 0 0 0 35.8 71.3l15.5-3.9 19.7 19.8a89.1 89.1 0 0 0 18 1.8 89 89 0 0 0 17.9-1.8l22.4-18.7 13 2.8a89 89 0 0 0 35.7-71.3V167z"></path><path fill="#d80027" d="M167 167h35.6v35.5H167zm71.2 0h35.6v35.5h-35.6zm71.2 0H345v35.5h-35.6zm-106.8 35.5h35.6v35.6h-35.6zm71.2 0h35.6v35.6h-35.6zM167 238.1h35.6v35.6H167zm35.6 35.6h35.6v35.6h-35.6zm35.6-35.6h35.6v35.6h-35.6zm71.2 0H345v35.6h-35.6zm-35.6 35.6h35.6v35.6h-35.6zm-35.6 35.6h35.6V345h-35.6zm-35.6 0h-33.3c3 13.3 9 25.4 17.3 35.6h16zM309.4 345h16a88.8 88.8 0 0 0 17.3-35.6h-33.3zm-106.8 0v15.6a88.7 88.7 0 0 0 35.6 16V345zm71.2 0v31.6a88.7 88.7 0 0 0 35.6-16V345z"></path>', 7), u = { fill: "none" }, g = ["r"], w = /* @__PURE__ */ r({ __name: "hr", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(c) { const e = c, h = l(() => 512 + 2 * e.strokeWidth), o = l(() => -e.strokeWidth), i = l(() => 256 + e.strokeWidth / 2); return (V, x) => (a(), s("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${o.value} ${o.value} ${h.value} ${h.value}` }, [ p, t("g", z, [ e.flagName ? (a(), s("title", _, d(e.flagName), 1)) : m("", !0), k ]), t("g", u, [ t("circle", { cx: "256", cy: "256", r: i.value, fill: "none", style: n({ stroke: e.strokeColor, strokeWidth: e.strokeWidth }) }, null, 12, g) ]) ], 8, f)); } }); export { w as default }; //# sourceMappingURL=hr-dcc0ccdc.js.map