@loafmarkets/ui 0.1.379 → 0.1.380
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 +26 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6649,6 +6649,20 @@ var LoginPopup = ({
|
|
|
6649
6649
|
const [signInMode, setSignInMode] = useState(false);
|
|
6650
6650
|
const [loading, setLoading] = useState(false);
|
|
6651
6651
|
const [isSignUp, setIsSignUp] = useState(false);
|
|
6652
|
+
const [gateViewportH, setGateViewportH] = useState(void 0);
|
|
6653
|
+
useEffect(() => {
|
|
6654
|
+
if (!gate || typeof window === "undefined") return;
|
|
6655
|
+
const vv = window.visualViewport;
|
|
6656
|
+
if (!vv) return;
|
|
6657
|
+
const sync = () => setGateViewportH(vv.height);
|
|
6658
|
+
sync();
|
|
6659
|
+
vv.addEventListener("resize", sync);
|
|
6660
|
+
vv.addEventListener("scroll", sync);
|
|
6661
|
+
return () => {
|
|
6662
|
+
vv.removeEventListener("resize", sync);
|
|
6663
|
+
vv.removeEventListener("scroll", sync);
|
|
6664
|
+
};
|
|
6665
|
+
}, [gate]);
|
|
6652
6666
|
const [fundingAmount] = useState("");
|
|
6653
6667
|
const [kycLoading, setKycLoading] = useState(false);
|
|
6654
6668
|
const [showKycWidget, setShowKycWidget] = useState(false);
|
|
@@ -7170,7 +7184,7 @@ var LoginPopup = ({
|
|
|
7170
7184
|
}
|
|
7171
7185
|
if (view === "otp") {
|
|
7172
7186
|
if (gate) {
|
|
7173
|
-
return /* @__PURE__ */ jsxs(GateShell, { children: [
|
|
7187
|
+
return /* @__PURE__ */ jsxs(GateShell, { $h: gateViewportH, children: [
|
|
7174
7188
|
/* @__PURE__ */ jsx(GateTint, { $reveal: otpStatus === "valid" ? 3 : 2 }),
|
|
7175
7189
|
/* @__PURE__ */ jsxs(GateForm, { children: [
|
|
7176
7190
|
/* @__PURE__ */ jsxs(GateBrand, { children: [
|
|
@@ -7551,7 +7565,7 @@ var LoginPopup = ({
|
|
|
7551
7565
|
if (gate) {
|
|
7552
7566
|
const codeAccepted = codeStatus === "valid";
|
|
7553
7567
|
const showSignIn = signInMode || signInRevealed;
|
|
7554
|
-
return /* @__PURE__ */ jsxs(GateShell, { children: [
|
|
7568
|
+
return /* @__PURE__ */ jsxs(GateShell, { $h: gateViewportH, children: [
|
|
7555
7569
|
/* @__PURE__ */ jsx(GateTint, { $reveal: showSignIn ? 1 : 0 }),
|
|
7556
7570
|
/* @__PURE__ */ jsxs(GateForm, { children: [
|
|
7557
7571
|
/* @__PURE__ */ jsxs(GateBrand, { children: [
|
|
@@ -8178,12 +8192,21 @@ var GateForm = styled10.div`
|
|
|
8178
8192
|
`;
|
|
8179
8193
|
var GateShell = styled10.div`
|
|
8180
8194
|
position: fixed;
|
|
8181
|
-
|
|
8195
|
+
top: 0;
|
|
8196
|
+
left: 0;
|
|
8197
|
+
right: 0;
|
|
8198
|
+
/* Visual-viewport height when available (see gateViewportH) so the gate ends
|
|
8199
|
+
at the keyboard top with nothing hidden below it to scroll to; 100% else. */
|
|
8200
|
+
height: ${(props) => props.$h ? `${props.$h}px` : "100%"};
|
|
8182
8201
|
display: flex;
|
|
8183
8202
|
align-items: center;
|
|
8184
8203
|
justify-content: center;
|
|
8185
8204
|
z-index: 10000;
|
|
8186
8205
|
background-color: rgba(10, 10, 12, 0.66);
|
|
8206
|
+
/* If content can't fit the visible area (very short screen + keyboard), scroll
|
|
8207
|
+
WITHIN the gate only — never chain to the platform underneath. */
|
|
8208
|
+
overflow-y: auto;
|
|
8209
|
+
overscroll-behavior: contain;
|
|
8187
8210
|
`;
|
|
8188
8211
|
var GateTint = styled10.div`
|
|
8189
8212
|
position: absolute;
|