@loafmarkets/ui 0.1.342 → 0.1.343

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
@@ -6752,62 +6752,68 @@ var LoginPopup = ({
6752
6752
  ] }) });
6753
6753
  }
6754
6754
  if (view === "otp") {
6755
- return /* @__PURE__ */ jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
6756
- /* @__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" }) }) }),
6757
- /* @__PURE__ */ jsxs(BackButton, { onClick: () => setView("email"), children: [
6758
- /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
6759
- "Back"
6760
- ] }),
6761
- /* @__PURE__ */ jsxs(Title, { children: [
6762
- /* @__PURE__ */ jsx(LogoContainer3, { children: /* @__PURE__ */ jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
6763
- "Enter Verification Code"
6764
- ] }),
6765
- /* @__PURE__ */ jsxs(InfoText, { style: { marginBottom: "1.5rem" }, children: [
6766
- "We sent a code to ",
6767
- /* @__PURE__ */ jsx("strong", { style: { color: "#eaecef" }, children: email })
6768
- ] }),
6769
- /* @__PURE__ */ jsx("form", { onSubmit: handleVerifyCode, children: /* @__PURE__ */ jsxs(EmailFormContainer, { children: [
6770
- /* @__PURE__ */ jsx(OTPContainer, { children: otp.map((digit, index) => /* @__PURE__ */ jsx(
6771
- OTPInput,
6772
- {
6773
- id: `otp-${index}`,
6774
- type: "text",
6775
- inputMode: "numeric",
6776
- maxLength: 1,
6777
- value: digit,
6778
- onChange: (event) => handleOTPChange(index, event.target.value),
6779
- onKeyDown: (event) => handleOTPKeyDown(index, event),
6780
- onInput: (event) => handleOTPInput(index, event),
6781
- onPaste: handleOTPPaste,
6782
- autoComplete: index === 0 ? "one-time-code" : "off",
6783
- autoFocus: index === 0
6784
- },
6785
- index
6786
- )) }),
6787
- /* @__PURE__ */ jsx(SubmitButton, { type: "submit", disabled: loading || otp.join("").length !== OTP_INPUT_LENGTH, children: loading ? "Verifying..." : "Verify" }),
6788
- error && /* @__PURE__ */ jsx(StatusMessage, { $error: true, children: error })
6789
- ] }) }),
6790
- /* @__PURE__ */ jsxs(InfoText, { children: [
6791
- "Didn't receive a code?",
6792
- " ",
6793
- /* @__PURE__ */ jsx(
6794
- "button",
6795
- {
6796
- type: "button",
6797
- onClick: (event) => {
6798
- event.preventDefault();
6799
- void handleSendCode(event);
6800
- },
6801
- style: {
6802
- background: "none",
6803
- border: "none",
6804
- color: "#f0b90b",
6805
- cursor: "pointer",
6806
- textDecoration: "underline"
6755
+ return /* @__PURE__ */ jsx(Overlay2, { onClick: loading ? void 0 : onClose, children: /* @__PURE__ */ jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
6756
+ !loading && /* @__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" }) }) }),
6757
+ loading ? /* @__PURE__ */ jsxs(AccountCreationLoader, { children: [
6758
+ /* @__PURE__ */ jsx(SpinnerRing, {}),
6759
+ /* @__PURE__ */ jsx(AccountCreationText, { children: isSignUp ? "Preparing your account\u2026" : "Signing you in\u2026" }),
6760
+ /* @__PURE__ */ jsx(AccountCreationSubtext, { children: "This may take a few seconds" })
6761
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
6762
+ /* @__PURE__ */ jsxs(BackButton, { onClick: () => setView("email"), children: [
6763
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
6764
+ "Back"
6765
+ ] }),
6766
+ /* @__PURE__ */ jsxs(Title, { children: [
6767
+ /* @__PURE__ */ jsx(LogoContainer3, { children: /* @__PURE__ */ jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
6768
+ "Enter Verification Code"
6769
+ ] }),
6770
+ /* @__PURE__ */ jsxs(InfoText, { style: { marginBottom: "1.5rem" }, children: [
6771
+ "We sent a code to ",
6772
+ /* @__PURE__ */ jsx("strong", { style: { color: "#eaecef" }, children: email })
6773
+ ] }),
6774
+ /* @__PURE__ */ jsx("form", { onSubmit: handleVerifyCode, children: /* @__PURE__ */ jsxs(EmailFormContainer, { children: [
6775
+ /* @__PURE__ */ jsx(OTPContainer, { children: otp.map((digit, index) => /* @__PURE__ */ jsx(
6776
+ OTPInput,
6777
+ {
6778
+ id: `otp-${index}`,
6779
+ type: "text",
6780
+ inputMode: "numeric",
6781
+ maxLength: 1,
6782
+ value: digit,
6783
+ onChange: (event) => handleOTPChange(index, event.target.value),
6784
+ onKeyDown: (event) => handleOTPKeyDown(index, event),
6785
+ onInput: (event) => handleOTPInput(index, event),
6786
+ onPaste: handleOTPPaste,
6787
+ autoComplete: index === 0 ? "one-time-code" : "off",
6788
+ autoFocus: index === 0
6807
6789
  },
6808
- children: "Resend"
6809
- }
6810
- )
6790
+ index
6791
+ )) }),
6792
+ /* @__PURE__ */ jsx(SubmitButton, { type: "submit", disabled: otp.join("").length !== OTP_INPUT_LENGTH, children: "Verify" }),
6793
+ error && /* @__PURE__ */ jsx(StatusMessage, { $error: true, children: error })
6794
+ ] }) }),
6795
+ /* @__PURE__ */ jsxs(InfoText, { children: [
6796
+ "Didn't receive a code?",
6797
+ " ",
6798
+ /* @__PURE__ */ jsx(
6799
+ "button",
6800
+ {
6801
+ type: "button",
6802
+ onClick: (event) => {
6803
+ event.preventDefault();
6804
+ void handleSendCode(event);
6805
+ },
6806
+ style: {
6807
+ background: "none",
6808
+ border: "none",
6809
+ color: "#f0b90b",
6810
+ cursor: "pointer",
6811
+ textDecoration: "underline"
6812
+ },
6813
+ children: "Resend"
6814
+ }
6815
+ )
6816
+ ] })
6811
6817
  ] })
6812
6818
  ] }) });
6813
6819
  }
@@ -7632,6 +7638,37 @@ var MiniLiveFeed = () => {
7632
7638
  }
7633
7639
  );
7634
7640
  };
7641
+ var AccountCreationLoader = styled9.div`
7642
+ display: flex;
7643
+ flex-direction: column;
7644
+ align-items: center;
7645
+ justify-content: center;
7646
+ padding: 2rem 0;
7647
+ gap: 1rem;
7648
+ `;
7649
+ var AccountCreationText = styled9.p`
7650
+ color: var(--color-text, #eaecef);
7651
+ font-size: 1rem;
7652
+ font-weight: 500;
7653
+ margin: 0;
7654
+ `;
7655
+ var AccountCreationSubtext = styled9.p`
7656
+ color: var(--color-text-secondary, #848e9c);
7657
+ font-size: 0.8rem;
7658
+ margin: 0;
7659
+ `;
7660
+ var SpinnerRing = styled9.div`
7661
+ width: 40px;
7662
+ height: 40px;
7663
+ border: 3px solid rgba(230, 198, 86, 0.2);
7664
+ border-top-color: var(--color-accent, #e6c656);
7665
+ border-radius: 50%;
7666
+ animation: spin 0.8s linear infinite;
7667
+
7668
+ @keyframes spin {
7669
+ to { transform: rotate(360deg); }
7670
+ }
7671
+ `;
7635
7672
  LoginPopup.displayName = "LoginPopup";
7636
7673
  var PropertyCompareBar = React5.forwardRef(
7637
7674
  ({