@loafmarkets/ui 0.1.319 → 0.1.321

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -6313,6 +6313,7 @@ var LoginPopup = ({
6313
6313
  const [fundingAmount] = useState("");
6314
6314
  const [kycLoading, setKycLoading] = useState(false);
6315
6315
  const [showKycWidget, setShowKycWidget] = useState(false);
6316
+ const [showKycFooter, setShowKycFooter] = useState(false);
6316
6317
  const [cryptoFundingLoading, setCryptoFundingLoading] = useState(false);
6317
6318
  const [fiatFundingLoading, setFiatFundingLoading] = useState(false);
6318
6319
  const [fundingError, setFundingError] = useState("");
@@ -6323,6 +6324,14 @@ var LoginPopup = ({
6323
6324
  setView(initialView);
6324
6325
  }
6325
6326
  }, [initialView]);
6327
+ useEffect(() => {
6328
+ if (!showKycWidget) {
6329
+ setShowKycFooter(false);
6330
+ return;
6331
+ }
6332
+ const timer = setTimeout(() => setShowKycFooter(true), 5e3);
6333
+ return () => clearTimeout(timer);
6334
+ }, [showKycWidget]);
6326
6335
  useEffect(() => {
6327
6336
  if (!transakWidgetUrl) return;
6328
6337
  const handleTransakMessage = (event) => {
@@ -6776,7 +6785,7 @@ var LoginPopup = ({
6776
6785
  ] }) });
6777
6786
  }
6778
6787
  if (view === "kyc") {
6779
- return /* @__PURE__ */ jsx(Overlay2, { children: /* @__PURE__ */ jsxs(
6788
+ return /* @__PURE__ */ jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxs(
6780
6789
  KycPopupContainer,
6781
6790
  {
6782
6791
  onClick: (event) => event.stopPropagation(),
@@ -6785,7 +6794,7 @@ var LoginPopup = ({
6785
6794
  /* @__PURE__ */ jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
6786
6795
  renderKycWidget && /* @__PURE__ */ jsxs(KycWidgetContainer, { style: showKycWidget ? void 0 : { position: "absolute", left: "-9999px", opacity: 0, pointerEvents: "none" }, children: [
6787
6796
  renderKycWidget(handleKycWidgetResult),
6788
- /* @__PURE__ */ jsxs(KycWidgetFooter, { children: [
6797
+ showKycFooter && /* @__PURE__ */ jsxs(KycWidgetFooter, { children: [
6789
6798
  /* @__PURE__ */ jsxs(KycProgressSaved, { children: [
6790
6799
  /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "#0ecb81", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("polyline", { points: "20 6 9 17 4 12" }) }),
6791
6800
  "Progress saved"