@loafmarkets/ui 0.1.346 → 0.1.348
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 +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +211 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +211 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -524,7 +524,7 @@ type DemoLoginResult = {
|
|
|
524
524
|
success: boolean;
|
|
525
525
|
};
|
|
526
526
|
type DemoLoginHandler = (email: string, handle?: string | null) => Promise<DemoLoginResult | void> | DemoLoginResult | void;
|
|
527
|
-
type LoginPopupView = "main" | "email" | "otp" | "kyc" | "kyc-success" | "kyc-failed" | "funding";
|
|
527
|
+
type LoginPopupView = "main" | "email" | "otp" | "kyc" | "kyc-success" | "kyc-failed" | "funding" | "receive" | "referral";
|
|
528
528
|
type FundWalletParams = {
|
|
529
529
|
amount: string;
|
|
530
530
|
mode?: "crypto" | "fiat";
|
|
@@ -580,6 +580,10 @@ type LoginPopupProps = {
|
|
|
580
580
|
onFundWallet?: (params: FundWalletParams) => Promise<FundWalletResult> | void;
|
|
581
581
|
/** Optional view to show immediately when the popup opens. */
|
|
582
582
|
initialView?: LoginPopupView;
|
|
583
|
+
/** Wallet address used for the receive funds view (bypasses Privy modal). */
|
|
584
|
+
walletAddress?: string | null;
|
|
585
|
+
/** Called when the user submits a referral code during onboarding. */
|
|
586
|
+
onSubmitReferralCode?: (code: string) => Promise<void> | void;
|
|
583
587
|
/** Handler invoked when the user selects "Sign in with Wallet". */
|
|
584
588
|
onWalletLogin?: () => Promise<void> | void;
|
|
585
589
|
/** Current KYC status — used to show "Resume Verification" when previously started. */
|
|
@@ -841,6 +845,7 @@ interface OfferingOrder {
|
|
|
841
845
|
readonly price: number;
|
|
842
846
|
readonly quantity: number;
|
|
843
847
|
readonly status: string;
|
|
848
|
+
readonly rejectionReason?: string | null;
|
|
844
849
|
readonly imageUrl?: string;
|
|
845
850
|
readonly createdAt: number;
|
|
846
851
|
}
|
|
@@ -973,6 +978,8 @@ type ToastData = {
|
|
|
973
978
|
};
|
|
974
979
|
type ToastContextValue = {
|
|
975
980
|
toast: (data: Omit<ToastData, 'id'>) => string;
|
|
981
|
+
/** Patch an existing toast in place (e.g. a climbing partial-fill count). No-op if the id is gone. Does not reset the auto-dismiss timer. */
|
|
982
|
+
update: (id: string, patch: Partial<Omit<ToastData, 'id'>>) => void;
|
|
976
983
|
dismiss: (id: string) => void;
|
|
977
984
|
};
|
|
978
985
|
declare function ToastProvider({ children }: {
|
package/dist/index.d.ts
CHANGED
|
@@ -524,7 +524,7 @@ type DemoLoginResult = {
|
|
|
524
524
|
success: boolean;
|
|
525
525
|
};
|
|
526
526
|
type DemoLoginHandler = (email: string, handle?: string | null) => Promise<DemoLoginResult | void> | DemoLoginResult | void;
|
|
527
|
-
type LoginPopupView = "main" | "email" | "otp" | "kyc" | "kyc-success" | "kyc-failed" | "funding";
|
|
527
|
+
type LoginPopupView = "main" | "email" | "otp" | "kyc" | "kyc-success" | "kyc-failed" | "funding" | "receive" | "referral";
|
|
528
528
|
type FundWalletParams = {
|
|
529
529
|
amount: string;
|
|
530
530
|
mode?: "crypto" | "fiat";
|
|
@@ -580,6 +580,10 @@ type LoginPopupProps = {
|
|
|
580
580
|
onFundWallet?: (params: FundWalletParams) => Promise<FundWalletResult> | void;
|
|
581
581
|
/** Optional view to show immediately when the popup opens. */
|
|
582
582
|
initialView?: LoginPopupView;
|
|
583
|
+
/** Wallet address used for the receive funds view (bypasses Privy modal). */
|
|
584
|
+
walletAddress?: string | null;
|
|
585
|
+
/** Called when the user submits a referral code during onboarding. */
|
|
586
|
+
onSubmitReferralCode?: (code: string) => Promise<void> | void;
|
|
583
587
|
/** Handler invoked when the user selects "Sign in with Wallet". */
|
|
584
588
|
onWalletLogin?: () => Promise<void> | void;
|
|
585
589
|
/** Current KYC status — used to show "Resume Verification" when previously started. */
|
|
@@ -841,6 +845,7 @@ interface OfferingOrder {
|
|
|
841
845
|
readonly price: number;
|
|
842
846
|
readonly quantity: number;
|
|
843
847
|
readonly status: string;
|
|
848
|
+
readonly rejectionReason?: string | null;
|
|
844
849
|
readonly imageUrl?: string;
|
|
845
850
|
readonly createdAt: number;
|
|
846
851
|
}
|
|
@@ -973,6 +978,8 @@ type ToastData = {
|
|
|
973
978
|
};
|
|
974
979
|
type ToastContextValue = {
|
|
975
980
|
toast: (data: Omit<ToastData, 'id'>) => string;
|
|
981
|
+
/** Patch an existing toast in place (e.g. a climbing partial-fill count). No-op if the id is gone. Does not reset the auto-dismiss timer. */
|
|
982
|
+
update: (id: string, patch: Partial<Omit<ToastData, 'id'>>) => void;
|
|
976
983
|
dismiss: (id: string) => void;
|
|
977
984
|
};
|
|
978
985
|
declare function ToastProvider({ children }: {
|
package/dist/index.js
CHANGED
|
@@ -6457,13 +6457,19 @@ var LoginPopup = ({
|
|
|
6457
6457
|
renderKycWidget,
|
|
6458
6458
|
onFundWallet,
|
|
6459
6459
|
initialView,
|
|
6460
|
-
kycStatus: kycStatusProp
|
|
6460
|
+
kycStatus: kycStatusProp,
|
|
6461
|
+
walletAddress,
|
|
6462
|
+
onSubmitReferralCode
|
|
6461
6463
|
}) => {
|
|
6462
6464
|
const [view, setView] = React5.useState(() => initialView ?? "main");
|
|
6463
6465
|
const [email, setEmail] = React5.useState("");
|
|
6464
6466
|
const [handle, setHandle] = React5.useState("");
|
|
6465
6467
|
const [otp, setOtp] = React5.useState(Array(OTP_INPUT_LENGTH).fill(""));
|
|
6466
6468
|
const [error, setError] = React5.useState("");
|
|
6469
|
+
const [copied, setCopied] = React5.useState(false);
|
|
6470
|
+
const [referralCode, setReferralCode] = React5.useState("");
|
|
6471
|
+
const [referralLoading, setReferralLoading] = React5.useState(false);
|
|
6472
|
+
const [referralError, setReferralError] = React5.useState("");
|
|
6467
6473
|
const [loading, setLoading] = React5.useState(false);
|
|
6468
6474
|
const [isSignUp, setIsSignUp] = React5.useState(false);
|
|
6469
6475
|
const [fundingAmount] = React5.useState("");
|
|
@@ -6520,7 +6526,7 @@ var LoginPopup = ({
|
|
|
6520
6526
|
if (suppressAutoCloseRef.current) {
|
|
6521
6527
|
return;
|
|
6522
6528
|
}
|
|
6523
|
-
if (view === "kyc" || view === "kyc-success" || view === "kyc-failed" || view === "funding") {
|
|
6529
|
+
if (view === "kyc" || view === "kyc-success" || view === "kyc-failed" || view === "funding" || view === "receive" || view === "referral") {
|
|
6524
6530
|
return;
|
|
6525
6531
|
}
|
|
6526
6532
|
if (isAuthenticated || currentUser) {
|
|
@@ -6683,7 +6689,7 @@ var LoginPopup = ({
|
|
|
6683
6689
|
try {
|
|
6684
6690
|
await onVerifyEmailCode({ code, email });
|
|
6685
6691
|
if (isSignUp) {
|
|
6686
|
-
setView("funding");
|
|
6692
|
+
setView(onSubmitReferralCode ? "referral" : "funding");
|
|
6687
6693
|
setLoading(false);
|
|
6688
6694
|
return;
|
|
6689
6695
|
}
|
|
@@ -7046,7 +7052,13 @@ var LoginPopup = ({
|
|
|
7046
7052
|
/* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { style: { textAlign: "center" }, children: "Deposit Funds" }),
|
|
7047
7053
|
/* @__PURE__ */ jsxRuntime.jsx(OnboardingSubtext, { style: { textAlign: "center", marginBottom: "1rem" }, children: "Choose how you'd like to fund your account." }),
|
|
7048
7054
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
|
|
7049
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick:
|
|
7055
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: () => {
|
|
7056
|
+
if (walletAddress) {
|
|
7057
|
+
setView("receive");
|
|
7058
|
+
} else {
|
|
7059
|
+
void handleCryptoFund();
|
|
7060
|
+
}
|
|
7061
|
+
}, disabled: cryptoFundingLoading, children: [
|
|
7050
7062
|
/* @__PURE__ */ jsxRuntime.jsxs("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: [
|
|
7051
7063
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "6", width: "20", height: "12", rx: "2" }),
|
|
7052
7064
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M22 10H18a2 2 0 0 0 0 4h4" })
|
|
@@ -7078,6 +7090,193 @@ var LoginPopup = ({
|
|
|
7078
7090
|
}
|
|
7079
7091
|
) });
|
|
7080
7092
|
}
|
|
7093
|
+
if (view === "referral") {
|
|
7094
|
+
const handleReferralSubmit = async () => {
|
|
7095
|
+
const trimmed = referralCode.trim();
|
|
7096
|
+
if (!trimmed) {
|
|
7097
|
+
setReferralError("Please enter a referral code");
|
|
7098
|
+
return;
|
|
7099
|
+
}
|
|
7100
|
+
setReferralError("");
|
|
7101
|
+
setReferralLoading(true);
|
|
7102
|
+
try {
|
|
7103
|
+
await onSubmitReferralCode?.(trimmed);
|
|
7104
|
+
setView("funding");
|
|
7105
|
+
} catch (err) {
|
|
7106
|
+
setReferralError(err instanceof Error ? err.message : "Invalid referral code. Please try again.");
|
|
7107
|
+
} finally {
|
|
7108
|
+
setReferralLoading(false);
|
|
7109
|
+
}
|
|
7110
|
+
};
|
|
7111
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
7112
|
+
/* @__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" }) }) }),
|
|
7113
|
+
/* @__PURE__ */ jsxRuntime.jsxs(OnboardingStepContainer, { children: [
|
|
7114
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
7115
|
+
width: 52,
|
|
7116
|
+
height: 52,
|
|
7117
|
+
borderRadius: 14,
|
|
7118
|
+
background: "linear-gradient(135deg, rgba(230,200,126,0.15) 0%, rgba(230,200,126,0.08) 100%)",
|
|
7119
|
+
border: "1px solid rgba(230,200,126,0.25)",
|
|
7120
|
+
display: "flex",
|
|
7121
|
+
alignItems: "center",
|
|
7122
|
+
justifyContent: "center",
|
|
7123
|
+
marginBottom: "1.1rem"
|
|
7124
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#e6c87e", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
7125
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
|
|
7126
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "9", cy: "7", r: "4" }),
|
|
7127
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }),
|
|
7128
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
7129
|
+
] }) }),
|
|
7130
|
+
/* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { children: "Do you have a referral code?" }),
|
|
7131
|
+
/* @__PURE__ */ jsxRuntime.jsx(OnboardingSubtext, { style: { marginBottom: "1.5rem" }, children: "Enter your code to unlock full access, or skip to continue." }),
|
|
7132
|
+
/* @__PURE__ */ jsxRuntime.jsxs(EmailFormContainer, { style: { width: "100%", marginBottom: 0 }, children: [
|
|
7133
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7134
|
+
EmailInput,
|
|
7135
|
+
{
|
|
7136
|
+
type: "text",
|
|
7137
|
+
placeholder: "e.g. LOAF-XXXX",
|
|
7138
|
+
value: referralCode,
|
|
7139
|
+
onChange: (e) => {
|
|
7140
|
+
setReferralCode(e.target.value.toUpperCase());
|
|
7141
|
+
setReferralError("");
|
|
7142
|
+
},
|
|
7143
|
+
onKeyDown: (e) => {
|
|
7144
|
+
if (e.key === "Enter") void handleReferralSubmit();
|
|
7145
|
+
},
|
|
7146
|
+
autoFocus: true
|
|
7147
|
+
}
|
|
7148
|
+
),
|
|
7149
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7150
|
+
SubmitButton,
|
|
7151
|
+
{
|
|
7152
|
+
type: "button",
|
|
7153
|
+
onClick: () => void handleReferralSubmit(),
|
|
7154
|
+
disabled: referralLoading || !referralCode.trim(),
|
|
7155
|
+
children: referralLoading ? "Verifying\u2026" : "Apply Code"
|
|
7156
|
+
}
|
|
7157
|
+
),
|
|
7158
|
+
referralError && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: referralError })
|
|
7159
|
+
] }),
|
|
7160
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7161
|
+
OnboardingSkipButton,
|
|
7162
|
+
{
|
|
7163
|
+
type: "button",
|
|
7164
|
+
onClick: () => setView("funding"),
|
|
7165
|
+
style: { marginTop: "0.75rem" },
|
|
7166
|
+
children: "Skip for now"
|
|
7167
|
+
}
|
|
7168
|
+
)
|
|
7169
|
+
] })
|
|
7170
|
+
] }) });
|
|
7171
|
+
}
|
|
7172
|
+
if (view === "receive") {
|
|
7173
|
+
const handleCopy = () => {
|
|
7174
|
+
if (walletAddress) {
|
|
7175
|
+
navigator.clipboard.writeText(walletAddress).then(() => {
|
|
7176
|
+
setCopied(true);
|
|
7177
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
7178
|
+
}).catch(() => {
|
|
7179
|
+
});
|
|
7180
|
+
}
|
|
7181
|
+
};
|
|
7182
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
7183
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close", 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" }) }) }),
|
|
7184
|
+
/* @__PURE__ */ jsxRuntime.jsxs(BackButton, { onClick: () => setView("funding"), children: [
|
|
7185
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
|
|
7186
|
+
"Back"
|
|
7187
|
+
] }),
|
|
7188
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", paddingTop: "0.5rem" }, children: [
|
|
7189
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
7190
|
+
width: 52,
|
|
7191
|
+
height: 52,
|
|
7192
|
+
borderRadius: 14,
|
|
7193
|
+
background: "linear-gradient(135deg, rgba(230,200,126,0.15) 0%, rgba(230,200,126,0.08) 100%)",
|
|
7194
|
+
border: "1px solid rgba(230,200,126,0.25)",
|
|
7195
|
+
display: "flex",
|
|
7196
|
+
alignItems: "center",
|
|
7197
|
+
justifyContent: "center",
|
|
7198
|
+
marginBottom: "1.1rem"
|
|
7199
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#e6c87e", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
7200
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2L12 16M12 16L7 11M12 16L17 11" }),
|
|
7201
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 20H21" })
|
|
7202
|
+
] }) }),
|
|
7203
|
+
/* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { style: { marginBottom: "0.35rem" }, children: "Receive USDC" }),
|
|
7204
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
7205
|
+
display: "inline-flex",
|
|
7206
|
+
alignItems: "center",
|
|
7207
|
+
gap: "0.35rem",
|
|
7208
|
+
background: "rgba(0,82,255,0.12)",
|
|
7209
|
+
border: "1px solid rgba(0,82,255,0.3)",
|
|
7210
|
+
borderRadius: 20,
|
|
7211
|
+
padding: "0.2rem 0.65rem",
|
|
7212
|
+
marginBottom: "1.25rem"
|
|
7213
|
+
}, children: [
|
|
7214
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: 7, height: 7, borderRadius: "50%", background: "#0052FF", flexShrink: 0 } }),
|
|
7215
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.72rem", fontWeight: 600, color: "#6b9fff", letterSpacing: "0.02em" }, children: "Base Sepolia" })
|
|
7216
|
+
] }),
|
|
7217
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { style: { fontSize: "0.82rem", color: "rgba(255,255,255,0.5)", textAlign: "center", marginBottom: "1.1rem", lineHeight: 1.5, maxWidth: 320 }, children: [
|
|
7218
|
+
"Send ",
|
|
7219
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { style: { color: "rgba(255,255,255,0.8)" }, children: "USDC" }),
|
|
7220
|
+
" on Base Sepolia to the address below. Only send on this network."
|
|
7221
|
+
] }),
|
|
7222
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
7223
|
+
width: "100%",
|
|
7224
|
+
background: "rgba(255,255,255,0.03)",
|
|
7225
|
+
border: "1px solid rgba(255,255,255,0.09)",
|
|
7226
|
+
borderRadius: 10,
|
|
7227
|
+
padding: "0.85rem 1rem",
|
|
7228
|
+
marginBottom: "0.75rem"
|
|
7229
|
+
}, children: [
|
|
7230
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: "0.65rem", color: "rgba(255,255,255,0.35)", textTransform: "uppercase", letterSpacing: "0.06em", marginBottom: "0.4rem", fontWeight: 600 }, children: "Your wallet address" }),
|
|
7231
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
|
|
7232
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: {
|
|
7233
|
+
flex: 1,
|
|
7234
|
+
fontFamily: "monospace",
|
|
7235
|
+
fontSize: "0.76rem",
|
|
7236
|
+
color: "#eaecef",
|
|
7237
|
+
wordBreak: "break-all",
|
|
7238
|
+
lineHeight: 1.6
|
|
7239
|
+
}, children: walletAddress }),
|
|
7240
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7241
|
+
"button",
|
|
7242
|
+
{
|
|
7243
|
+
type: "button",
|
|
7244
|
+
onClick: handleCopy,
|
|
7245
|
+
style: {
|
|
7246
|
+
background: copied ? "rgba(14,203,129,0.15)" : "rgba(230,200,126,0.1)",
|
|
7247
|
+
border: "1px solid " + (copied ? "rgba(14,203,129,0.35)" : "rgba(230,200,126,0.3)"),
|
|
7248
|
+
borderRadius: 6,
|
|
7249
|
+
padding: "0.4rem 0.8rem",
|
|
7250
|
+
color: copied ? "#0ecb81" : "#e6c87e",
|
|
7251
|
+
fontSize: "0.78rem",
|
|
7252
|
+
fontWeight: 600,
|
|
7253
|
+
cursor: "pointer",
|
|
7254
|
+
whiteSpace: "nowrap",
|
|
7255
|
+
flexShrink: 0,
|
|
7256
|
+
transition: "all 0.15s ease"
|
|
7257
|
+
},
|
|
7258
|
+
children: copied ? "\u2713 Copied" : "Copy"
|
|
7259
|
+
}
|
|
7260
|
+
)
|
|
7261
|
+
] })
|
|
7262
|
+
] }),
|
|
7263
|
+
/* @__PURE__ */ jsxRuntime.jsx(SubmitButton, { onClick: onClose, style: { marginBottom: "1.1rem" }, children: "Done" }),
|
|
7264
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
7265
|
+
display: "flex",
|
|
7266
|
+
alignItems: "center",
|
|
7267
|
+
gap: "0.4rem",
|
|
7268
|
+
color: "rgba(255,255,255,0.28)",
|
|
7269
|
+
fontSize: "0.72rem"
|
|
7270
|
+
}, children: [
|
|
7271
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }) }),
|
|
7272
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
7273
|
+
"Wallet secured by ",
|
|
7274
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { style: { color: "rgba(255,255,255,0.45)", fontWeight: 600 }, children: "Privy" })
|
|
7275
|
+
] })
|
|
7276
|
+
] })
|
|
7277
|
+
] })
|
|
7278
|
+
] }) });
|
|
7279
|
+
}
|
|
7081
7280
|
return null;
|
|
7082
7281
|
};
|
|
7083
7282
|
var Overlay2 = styled9__default.default.div`
|
|
@@ -13908,7 +14107,10 @@ function PortfolioActivityPanel({
|
|
|
13908
14107
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { children: formatNumber2(order.quantity) }) }),
|
|
13909
14108
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: formatCurrency4(order.price) }) }),
|
|
13910
14109
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { children: formatCurrency4(order.price * order.quantity) }) }),
|
|
13911
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14110
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GridCell, { children: [
|
|
14111
|
+
/* @__PURE__ */ jsxRuntime.jsx(ActivityTag, { $color: meta.color, $bg: meta.bg, title: order.status === "REJECTED" && order.rejectionReason ? order.rejectionReason : void 0, children: prettyLabel(order.status) }),
|
|
14112
|
+
order.status === "REJECTED" && order.rejectionReason && /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, style: { fontSize: "0.62rem", marginTop: "0.2rem", maxWidth: "120px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, title: order.rejectionReason, children: order.rejectionReason })
|
|
14113
|
+
] }),
|
|
13912
14114
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: formatTimestamp(order.createdAt) }) }),
|
|
13913
14115
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: order.txHash && /* @__PURE__ */ jsxRuntime.jsx(TxLink, { href: `${_blockExplorerBaseUrl}/${order.txHash}`, target: "_blank", rel: "noopener noreferrer", title: "View on BaseScan", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
13914
14116
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
@@ -17867,10 +18069,13 @@ function ToastProvider({ children }) {
|
|
|
17867
18069
|
setToasts((prev) => [...prev, { ...data, id }]);
|
|
17868
18070
|
return id;
|
|
17869
18071
|
}, []);
|
|
18072
|
+
const update = React5.useCallback((id, patch) => {
|
|
18073
|
+
setToasts((prev) => prev.map((t) => t.id === id ? { ...t, ...patch } : t));
|
|
18074
|
+
}, []);
|
|
17870
18075
|
const dismiss = React5.useCallback((id) => {
|
|
17871
18076
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
17872
18077
|
}, []);
|
|
17873
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value: { toast: addToast, dismiss }, children: [
|
|
18078
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value: { toast: addToast, update, dismiss }, children: [
|
|
17874
18079
|
children,
|
|
17875
18080
|
/* @__PURE__ */ jsxRuntime.jsx(Container3, { children: toasts.map((t) => /* @__PURE__ */ jsxRuntime.jsx(ToastItem, { toast: t, onDismiss: dismiss }, t.id)) })
|
|
17876
18081
|
] });
|