UNPKG

@clubmed/trident-ui

Version:

Shared ClubMed React UI components

78 lines (77 loc) 5.88 kB
"use client"; import { jsx as l, jsxs as a } from "react/jsx-runtime"; import { useTransition as n, animated as r } from "@react-spring/web"; import { Backdrop as o } from "./Backdrop.js"; const h = /* @__PURE__ */ a("svg", { viewBox: "0 0 140 140", width: 140, children: [ /* @__PURE__ */ l("defs", { children: /* @__PURE__ */ l( "path", { id: "a", d: "m70 74.1-9.6 9.6 9.6 9.5 9.5-9.5L70 74Zm6.6-70.7c-.7-2.7-6.9 1.1-20.1 13 5.3 5.8 7.9 2.5 12.1 1 3.4 6.4 4.8 35.4-17.3 44 .6-29.1.9-60.4.9-60.4a1 1 0 0 0-1.3-1c-6.1.8-17 11.6-25.3 20.6 4.6 7.5 10.4.8 15-1.1 0 1.2-1 22.8-.6 44.7C17.3 66 21 19.5 22.2 13.6 22.8 8.9 7.6 19.3 0 26.4c2.4 4.3 5.7 3.4 10 1.8C8.3 49 23 67.9 40 67.5c.6 21.4 2.9 42.2 9 43.7 1 .2 1.6-21.8 2-46.1C92 52.4 76.5 3.4 76.5 3.4" } ) }), /* @__PURE__ */ a("g", { fill: "none", fillRule: "evenodd", transform: "translate(27 14)", children: [ /* @__PURE__ */ l("mask", { id: "b", fill: "#fff", children: /* @__PURE__ */ l("use", { xlinkHref: "#a" }) }), /* @__PURE__ */ a("g", { mask: "url(#b)", children: [ /* @__PURE__ */ l( "path", { fill: "#1E2643", fillRule: "nonzero", d: "M-83.1-23s6.7 3 11.2 3c4.6 0 6.7-3 11.3-3 4.5 0 6.7 3 11.2 3 4.6 0 6.7-3 11.3-3 4.5 0 6.7 3 11.2 3 4.6 0 6.7-3 11.3-3 4.5 0 6.7 3 11.2 3C.2-20 2.3-23 7-23c4.5 0 6.7 3 11.2 3 4.6 0 6.7-3 11.3-3 4.5 0 6.7 3 11.2 3 4.6 0 6.7-3 11.3-3 4.5 0 6.7 3 11.2 3 4.6 0 6.7-3 11.3-3 4.5 0 6.7 3 11.2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-5.2 1.2-.7 0-1.3-.2-1.9-.6-.5-.4-1-1-1.6-2l-1.8 1Zm9.6 1a41.8 41.8 0 0 0 8.4 28.3c5.7 7.5 14 12.3 22.9 12v-2a26 26 0 0 1-21.3-11.2 40 40 0 0 1-8-27H9ZM39 67.4c.3 10.7 1 21.3 2.5 29.5.7 4 1.6 7.5 2.7 10.1 1.1 2.6 2.6 4.6 4.7 5l.4-2c-1-.2-2.2-1.3-3.2-3.8-1-2.3-2-5.7-2.7-9.7-1.4-8-2-18.5-2.4-29.1h-2Zm9.8 44.6c.7.2 1.1-.3 1.2-.4l.2-.4.2-.9.3-2.8.5-10.2.9-32.3h-2a1859.2 1859.2 0 0 1-1.4 42.3 38 38 0 0 1-.4 3.2c0-.1.4-.6 1-.4l-.5 2Zm2.6-46a39.2 39.2 0 0 0 21.8-15.4 46 46 0 0 0 7-21.1 73 73 0 0 0-2.6-25.9l-.1-.4v-.1l-1 .2-1 .3a14.2 14.2 0 0 1 .2.6 51 51 0 0 1 1.6 7.1 71 71 0 0 1 .9 18A37.2 37.2 0 0 1 50.8 64l.6 2Z", mask: "url(#a)" } ) ] }) ] }) ] }), f = ({ isVisible: e, label: t }) => { const s = n(e, { from: { x: "-600px", opacity: 0.3 }, enter: { x: "0px", opacity: 1 }, leave: { x: "600px", opacity: 0 }, config: { tension: e ? 280 : 380, // we make it fling off faster when closing friction: 50 } }); return /* @__PURE__ */ l(o, { isVisible: e, sweep: !0, children: s( ({ x: c, opacity: m }, i) => i && /* @__PURE__ */ a("div", { className: "flex flex-col items-center", role: "alert", children: [ /* @__PURE__ */ l( r.div, { style: { x: c, opacity: m, // the masks prevent subpixel flickering on transitions (and covid), please don't remove them maskImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2 2'%3E%3Cellipse cx='1' cy='1' rx='1' ry='1'/%3E%3C/svg%3E")`, WebkitMaskImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2 2'%3E%3Cellipse cx='1' cy='1' rx='1' ry='1'/%3E%3C/svg%3E")` }, className: "relative", children: h } ), /* @__PURE__ */ l( r.div, { className: "text-b3 mx-auto max-w-[320px] px-20 text-center", style: { x: c.to((Z) => `calc(${Z} / 2)`), opacity: m }, children: t } ) ] }) ) }); }; export { f as Loader }; //# sourceMappingURL=Loader.js.map