@loafmarkets/ui 0.1.329 → 0.1.331
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.js +10 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -43
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6640,13 +6640,18 @@ var LoginPopup = ({
|
|
|
6640
6640
|
}
|
|
6641
6641
|
setFundingError("");
|
|
6642
6642
|
setFiatFundingLoading(true);
|
|
6643
|
+
if (typeof window !== "undefined") {
|
|
6644
|
+
window.dispatchEvent(new CustomEvent("loaf:prefetch-kyc"));
|
|
6645
|
+
}
|
|
6643
6646
|
try {
|
|
6644
6647
|
const result = await onFundWallet({ amount: fundingAmount, mode: "fiat" });
|
|
6645
6648
|
if (result?.widgetUrl) {
|
|
6646
6649
|
setTransakWidgetUrl(result.widgetUrl);
|
|
6647
6650
|
} else if (result?.requiresKyc) {
|
|
6648
|
-
|
|
6649
|
-
|
|
6651
|
+
onClose();
|
|
6652
|
+
if (typeof window !== "undefined") {
|
|
6653
|
+
window.dispatchEvent(new CustomEvent("loaf:open-login-popup", { detail: { initialView: "kyc" } }));
|
|
6654
|
+
}
|
|
6650
6655
|
} else if (result?.funded) {
|
|
6651
6656
|
onClose();
|
|
6652
6657
|
}
|
|
@@ -6834,9 +6839,9 @@ var LoginPopup = ({
|
|
|
6834
6839
|
$expanded: showKycWidget,
|
|
6835
6840
|
children: [
|
|
6836
6841
|
/* @__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" }) }) }),
|
|
6837
|
-
renderKycWidget &&
|
|
6842
|
+
renderKycWidget && /* @__PURE__ */ jsxs(KycWidgetContainer, { style: showKycWidget ? {} : { position: "absolute", visibility: "hidden", pointerEvents: "none" }, children: [
|
|
6838
6843
|
renderKycWidget(handleKycWidgetResult),
|
|
6839
|
-
showKycFooter && /* @__PURE__ */ jsxs(KycWidgetFooter, { children: [
|
|
6844
|
+
showKycWidget && showKycFooter && /* @__PURE__ */ jsxs(KycWidgetFooter, { children: [
|
|
6840
6845
|
/* @__PURE__ */ jsxs(KycProgressSaved, { children: [
|
|
6841
6846
|
/* @__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" }) }),
|
|
6842
6847
|
"Progress saved"
|
|
@@ -7077,9 +7082,6 @@ var KycLandingContainer = styled9.div`
|
|
|
7077
7082
|
align-items: center;
|
|
7078
7083
|
text-align: center;
|
|
7079
7084
|
`;
|
|
7080
|
-
styled9.div`
|
|
7081
|
-
display: none;
|
|
7082
|
-
`;
|
|
7083
7085
|
var KycLockIcon = styled9.div`
|
|
7084
7086
|
width: 44px;
|
|
7085
7087
|
height: 44px;
|
|
@@ -7104,12 +7106,6 @@ var KycSubline = styled9.p`
|
|
|
7104
7106
|
margin: 0 0 1.75rem;
|
|
7105
7107
|
line-height: 1.5;
|
|
7106
7108
|
`;
|
|
7107
|
-
styled9.div`
|
|
7108
|
-
display: none;
|
|
7109
|
-
`;
|
|
7110
|
-
styled9.div`
|
|
7111
|
-
display: none;
|
|
7112
|
-
`;
|
|
7113
7109
|
var KycStartButton = styled9.button`
|
|
7114
7110
|
width: 100%;
|
|
7115
7111
|
padding: 0.8rem 1rem;
|
|
@@ -7147,35 +7143,6 @@ var KycExitLink = styled9.button`
|
|
|
7147
7143
|
transition: color 0.15s ease;
|
|
7148
7144
|
&:hover { color: rgba(255,255,255,0.6); }
|
|
7149
7145
|
`;
|
|
7150
|
-
styled9.div`
|
|
7151
|
-
display: none;
|
|
7152
|
-
`;
|
|
7153
|
-
styled9.button`
|
|
7154
|
-
position: absolute;
|
|
7155
|
-
top: -12px;
|
|
7156
|
-
right: -12px;
|
|
7157
|
-
background: rgba(0, 0, 0, 0.4);
|
|
7158
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
7159
|
-
border-radius: 999px;
|
|
7160
|
-
color: var(--color-text-secondary, #848e9c);
|
|
7161
|
-
width: 32px;
|
|
7162
|
-
height: 32px;
|
|
7163
|
-
display: flex;
|
|
7164
|
-
align-items: center;
|
|
7165
|
-
justify-content: center;
|
|
7166
|
-
cursor: pointer;
|
|
7167
|
-
transition: color 0.2s ease, background 0.2s ease;
|
|
7168
|
-
|
|
7169
|
-
&:hover {
|
|
7170
|
-
background: rgba(0, 0, 0, 0.6);
|
|
7171
|
-
color: var(--color-accent, #e6c656);
|
|
7172
|
-
}
|
|
7173
|
-
|
|
7174
|
-
svg {
|
|
7175
|
-
width: 18px;
|
|
7176
|
-
height: 18px;
|
|
7177
|
-
}
|
|
7178
|
-
`;
|
|
7179
7146
|
var CloseButton = styled9.button`
|
|
7180
7147
|
position: absolute;
|
|
7181
7148
|
top: 1rem;
|
|
@@ -13522,7 +13489,7 @@ var formatTimestamp = (unix) => {
|
|
|
13522
13489
|
});
|
|
13523
13490
|
};
|
|
13524
13491
|
var formatAddress = (address) => `${address.slice(0, 6)}...${address.slice(-4)}`;
|
|
13525
|
-
var prettyLabel = (value) => value.split("_").map((part) => part.charAt(0) + part.slice(1).toLowerCase()).join(" ");
|
|
13492
|
+
var prettyLabel = (value) => (value ?? "").split("_").map((part) => part.charAt(0) + part.slice(1).toLowerCase()).join(" ");
|
|
13526
13493
|
var sideLabel = (side) => side?.toUpperCase() === "SELL" ? "Sell" : "Buy";
|
|
13527
13494
|
var getOrderStatusMeta = (statusRaw) => {
|
|
13528
13495
|
const status = statusRaw.toUpperCase();
|