@loafmarkets/ui 0.1.298 → 0.1.300
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.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +52 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -558,6 +558,8 @@ type LoginPopupProps = {
|
|
|
558
558
|
initialView?: LoginPopupView;
|
|
559
559
|
/** Handler invoked when the user selects "Sign in with Wallet". */
|
|
560
560
|
onWalletLogin?: () => Promise<void> | void;
|
|
561
|
+
/** Current KYC status — used to show "Resume Verification" when previously started. */
|
|
562
|
+
kycStatus?: 'NOT_STARTED' | 'PENDING' | 'ON_HOLD' | 'VERIFIED' | 'REJECTED';
|
|
561
563
|
};
|
|
562
564
|
declare const LoginPopup: React__default.FC<LoginPopupProps>;
|
|
563
565
|
|
package/dist/index.d.ts
CHANGED
|
@@ -558,6 +558,8 @@ type LoginPopupProps = {
|
|
|
558
558
|
initialView?: LoginPopupView;
|
|
559
559
|
/** Handler invoked when the user selects "Sign in with Wallet". */
|
|
560
560
|
onWalletLogin?: () => Promise<void> | void;
|
|
561
|
+
/** Current KYC status — used to show "Resume Verification" when previously started. */
|
|
562
|
+
kycStatus?: 'NOT_STARTED' | 'PENDING' | 'ON_HOLD' | 'VERIFIED' | 'REJECTED';
|
|
561
563
|
};
|
|
562
564
|
declare const LoginPopup: React__default.FC<LoginPopupProps>;
|
|
563
565
|
|
package/dist/index.js
CHANGED
|
@@ -6326,7 +6326,8 @@ var LoginPopup = ({
|
|
|
6326
6326
|
onKycStart,
|
|
6327
6327
|
renderKycWidget,
|
|
6328
6328
|
onFundWallet,
|
|
6329
|
-
initialView
|
|
6329
|
+
initialView,
|
|
6330
|
+
kycStatus: kycStatusProp
|
|
6330
6331
|
}) => {
|
|
6331
6332
|
const [view, setView] = React5.useState(() => initialView ?? "main");
|
|
6332
6333
|
const [email, setEmail] = React5.useState("");
|
|
@@ -6563,10 +6564,6 @@ var LoginPopup = ({
|
|
|
6563
6564
|
setView("kyc-failed");
|
|
6564
6565
|
}
|
|
6565
6566
|
};
|
|
6566
|
-
const handleKycWidgetClose = () => {
|
|
6567
|
-
setShowKycWidget(false);
|
|
6568
|
-
onClose();
|
|
6569
|
-
};
|
|
6570
6567
|
const handleKycStart = async () => {
|
|
6571
6568
|
if (renderKycWidget) {
|
|
6572
6569
|
setShowKycWidget(true);
|
|
@@ -6812,19 +6809,26 @@ var LoginPopup = ({
|
|
|
6812
6809
|
$expanded: showKycWidget,
|
|
6813
6810
|
children: [
|
|
6814
6811
|
/* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.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" }) }) }),
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6812
|
+
renderKycWidget && /* @__PURE__ */ jsxRuntime.jsxs(KycWidgetContainer, { style: showKycWidget ? void 0 : { position: "absolute", left: "-9999px", opacity: 0, pointerEvents: "none" }, children: [
|
|
6813
|
+
renderKycWidget(handleKycWidgetResult),
|
|
6814
|
+
/* @__PURE__ */ jsxRuntime.jsxs(KycWidgetFooter, { children: [
|
|
6815
|
+
/* @__PURE__ */ jsxRuntime.jsxs(KycProgressSaved, { children: [
|
|
6816
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "#0ecb81", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" }) }),
|
|
6817
|
+
"Progress saved"
|
|
6818
|
+
] }),
|
|
6819
|
+
/* @__PURE__ */ jsxRuntime.jsx(KycExitButton, { type: "button", onClick: onClose, children: "Save & Exit" })
|
|
6820
|
+
] })
|
|
6821
|
+
] }),
|
|
6822
|
+
!showKycWidget && /* @__PURE__ */ jsxRuntime.jsxs(OnboardingStepContainer, { style: { alignItems: "stretch", textAlign: "left" }, children: [
|
|
6819
6823
|
/* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { style: { textAlign: "center" }, children: "Verify to Gain Access" }),
|
|
6820
6824
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: /* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: handleKycStart, disabled: kycLoading, children: [
|
|
6821
6825
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", style: { color: "rgba(255,255,255,0.6)", flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }) }),
|
|
6822
6826
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
|
|
6823
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#fff", fontWeight: 600, fontSize: "0.95rem", marginBottom: "0.25rem" }, children: kycLoading ? "Verifying\u2026" : "Start Verification" }),
|
|
6827
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#fff", fontWeight: 600, fontSize: "0.95rem", marginBottom: "0.25rem" }, children: kycLoading ? "Verifying\u2026" : kycStatusProp === "PENDING" || kycStatusProp === "ON_HOLD" ? "Resume Verification" : "Start Verification" }),
|
|
6824
6828
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.8rem" }, children: "Takes about 2 minutes" })
|
|
6825
6829
|
] })
|
|
6826
6830
|
] }) }),
|
|
6827
|
-
/* @__PURE__ */ jsxRuntime.jsx(OnboardingSkipButton, { onClick: handleKycSkip, style: { marginTop: "1rem" }, children: "
|
|
6831
|
+
/* @__PURE__ */ jsxRuntime.jsx(OnboardingSkipButton, { onClick: handleKycSkip, style: { marginTop: "1rem" }, children: "Exit" }),
|
|
6828
6832
|
error && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: error })
|
|
6829
6833
|
] })
|
|
6830
6834
|
]
|
|
@@ -7010,7 +7014,38 @@ var KycWidgetContainer = styled9__default.default.div`
|
|
|
7010
7014
|
position: relative;
|
|
7011
7015
|
gap: 0.75rem;
|
|
7012
7016
|
`;
|
|
7013
|
-
var
|
|
7017
|
+
var KycWidgetFooter = styled9__default.default.div`
|
|
7018
|
+
display: flex;
|
|
7019
|
+
justify-content: space-between;
|
|
7020
|
+
align-items: center;
|
|
7021
|
+
padding-top: 0.75rem;
|
|
7022
|
+
border-top: 1px solid rgba(255,255,255,0.08);
|
|
7023
|
+
margin-top: 0.5rem;
|
|
7024
|
+
`;
|
|
7025
|
+
var KycProgressSaved = styled9__default.default.div`
|
|
7026
|
+
display: flex;
|
|
7027
|
+
align-items: center;
|
|
7028
|
+
gap: 0.4rem;
|
|
7029
|
+
font-size: 0.75rem;
|
|
7030
|
+
font-weight: 500;
|
|
7031
|
+
color: #0ecb81;
|
|
7032
|
+
`;
|
|
7033
|
+
var KycExitButton = styled9__default.default.button`
|
|
7034
|
+
background: rgba(255,255,255,0.06);
|
|
7035
|
+
border: 1px solid rgba(255,255,255,0.1);
|
|
7036
|
+
border-radius: 6px;
|
|
7037
|
+
padding: 0.4rem 0.85rem;
|
|
7038
|
+
font-size: 0.75rem;
|
|
7039
|
+
font-weight: 500;
|
|
7040
|
+
color: rgba(255,255,255,0.6);
|
|
7041
|
+
cursor: pointer;
|
|
7042
|
+
transition: all 0.15s ease;
|
|
7043
|
+
&:hover {
|
|
7044
|
+
background: rgba(255,255,255,0.1);
|
|
7045
|
+
color: rgba(255,255,255,0.8);
|
|
7046
|
+
}
|
|
7047
|
+
`;
|
|
7048
|
+
styled9__default.default.button`
|
|
7014
7049
|
position: absolute;
|
|
7015
7050
|
top: -12px;
|
|
7016
7051
|
right: -12px;
|
|
@@ -7040,8 +7075,10 @@ var CloseButton = styled9__default.default.button`
|
|
|
7040
7075
|
position: absolute;
|
|
7041
7076
|
top: 1rem;
|
|
7042
7077
|
right: 1rem;
|
|
7043
|
-
|
|
7044
|
-
|
|
7078
|
+
z-index: 10;
|
|
7079
|
+
background: rgba(0, 0, 0, 0.6);
|
|
7080
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
7081
|
+
border-radius: 999px;
|
|
7045
7082
|
color: var(--color-text-secondary, #848e9c);
|
|
7046
7083
|
font-size: 1.5rem;
|
|
7047
7084
|
cursor: pointer;
|
|
@@ -7049,7 +7086,7 @@ var CloseButton = styled9__default.default.button`
|
|
|
7049
7086
|
display: flex;
|
|
7050
7087
|
align-items: center;
|
|
7051
7088
|
justify-content: center;
|
|
7052
|
-
transition: color 0.2s ease;
|
|
7089
|
+
transition: color 0.2s ease, background 0.2s ease;
|
|
7053
7090
|
|
|
7054
7091
|
&:hover {
|
|
7055
7092
|
color: var(--color-accent, #e6c656);
|