UNPKG

vue-circle-flags

Version:

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

50 lines (49 loc) 1.83 kB
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeStyle as a, openBlock as o, toDisplayString as s } from "vue"; //#region src/components/flags/fm.vue?vue&type=script&setup=true&lang.ts var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "1d142f8a-55b2-4d4e-8dc2-0a8f1f8e07b9" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), u = { mask: "url(#1d142f8a-55b2-4d4e-8dc2-0a8f1f8e07b9)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", { fill: "#338af3", d: "M0 0h512v512H0z" }, null, -1), p = /*#__PURE__*/ r("path", { fill: "#eee", d: "m256 111.3 11 34h35.8l-29 21 11.1 34-28.9-21-29 21 11.1-34-29-21H245zM111.3 256l34-11v-35.8l21 29 34-11.1-21 28.9 21 29-34-11.1-21 29V267zM256 400.7l-11-34h-35.8l29-21-11.1-34 28.9 21 29-21-11.1 34 29 21H267zM400.7 256l-34 11v35.8l-21-29-34 11.1 21-28.9-21-29 34 11.1 21-29V245z" }, null, -1), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ i({ __name: "fm", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { let g = i, _ = e(() => 512 + 2 * g.strokeWidth), v = e(() => -g.strokeWidth), y = e(() => 256 + g.strokeWidth / 2); return (e, i) => (o(), n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${v.value} ${v.value} ${_.value} ${_.value}` }, [ l, r("g", u, [ g.flagName ? (o(), n("title", d, s(g.flagName), 1)) : t("", !0), f, p ]), r("g", m, [r("circle", { cx: "256", cy: "256", r: y.value, fill: "none", style: a({ stroke: g.strokeColor, strokeWidth: g.strokeWidth }) }, null, 12, h)]) ], 8, c)); } }); //#endregion export { g as default }; //# sourceMappingURL=fm-Ba9EdT69.js.map