@loafmarkets/ui 0.1.378 → 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 +30 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -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: [
|
|
@@ -8119,6 +8133,10 @@ var CodeSuffixInput = styled10.input`
|
|
|
8119
8133
|
letter-spacing: 0.22em;
|
|
8120
8134
|
text-transform: uppercase;
|
|
8121
8135
|
font-family: 'Space Grotesk', monospace;
|
|
8136
|
+
/* Explicit line-height so iOS in-app WebViews size the caret to the text
|
|
8137
|
+
box instead of rendering a short, top-aligned caret (line-height: normal
|
|
8138
|
+
+ webfont + letter-spacing miscomputes it in some WebViews). */
|
|
8139
|
+
line-height: 1.5;
|
|
8122
8140
|
|
|
8123
8141
|
&:focus {
|
|
8124
8142
|
outline: none;
|
|
@@ -8174,12 +8192,21 @@ var GateForm = styled10.div`
|
|
|
8174
8192
|
`;
|
|
8175
8193
|
var GateShell = styled10.div`
|
|
8176
8194
|
position: fixed;
|
|
8177
|
-
|
|
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%"};
|
|
8178
8201
|
display: flex;
|
|
8179
8202
|
align-items: center;
|
|
8180
8203
|
justify-content: center;
|
|
8181
8204
|
z-index: 10000;
|
|
8182
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;
|
|
8183
8210
|
`;
|
|
8184
8211
|
var GateTint = styled10.div`
|
|
8185
8212
|
position: absolute;
|