UNPKG

vue-circle-flags

Version:

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

40 lines (39 loc) 2.04 kB
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createStaticVNode as i, defineComponent as a, normalizeStyle as o, openBlock as s, toDisplayString as c } from "vue"; //#region src/components/flags/nu.vue?vue&type=script&setup=true&lang.ts var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "c31acc17-9ebe-4352-ad40-61a8a6f9d2ef" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), d = { mask: "url(#c31acc17-9ebe-4352-ad40-61a8a6f9d2ef)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#ffda44\" d=\"M0 256 256 0h256v512H0z\"></path><path fill=\"#eee\" d=\"M0 0v32l32 32L0 96v160h32l32-32 32 32h32l42-16 41 16h45l-8-16 8-15v-14l-16-42 16-41V96l-32-32 32-32V0H96L64 32 32 0Z\"></path><path fill=\"#0052b4\" d=\"M128 256v-83l83 83zm128-45-83-83h83z\"></path><path fill=\"#d80027\" d=\"m128 128 128 128v-31l-97-97Z\"></path><path fill=\"#d80027\" d=\"M32 0v32H0v64h32v160h64V96h160V32H96V0Z\"></path><circle cx=\"64\" cy=\"64\" r=\"48\" fill=\"#0052b4\"></circle><path fill=\"#ffda44\" d=\"m50 198 14-44 15 44-38-27h47zM162 86l14-44 15 44-38-27h47ZM64 17l28 86-73-53h90l-73 53Z\"></path>", 7), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({ __name: "nu", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { let a = i, g = e(() => 512 + 2 * a.strokeWidth), _ = e(() => -a.strokeWidth), v = e(() => 256 + a.strokeWidth / 2); return (e, i) => (s(), n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${_.value} ${_.value} ${g.value} ${g.value}` }, [ u, r("g", d, [a.flagName ? (s(), n("title", f, c(a.flagName), 1)) : t("", !0), p]), r("g", m, [r("circle", { cx: "256", cy: "256", r: v.value, fill: "none", style: o({ stroke: a.strokeColor, strokeWidth: a.strokeWidth }) }, null, 12, h)]) ], 8, l)); } }); //#endregion export { g as default }; //# sourceMappingURL=nu-DB58uMhJ.js.map