@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 CHANGED
@@ -6674,6 +6674,20 @@ var LoginPopup = ({
6674
6674
  const [signInMode, setSignInMode] = React5.useState(false);
6675
6675
  const [loading, setLoading] = React5.useState(false);
6676
6676
  const [isSignUp, setIsSignUp] = React5.useState(false);
6677
+ const [gateViewportH, setGateViewportH] = React5.useState(void 0);
6678
+ React5.useEffect(() => {
6679
+ if (!gate || typeof window === "undefined") return;
6680
+ const vv = window.visualViewport;
6681
+ if (!vv) return;
6682
+ const sync = () => setGateViewportH(vv.height);
6683
+ sync();
6684
+ vv.addEventListener("resize", sync);
6685
+ vv.addEventListener("scroll", sync);
6686
+ return () => {
6687
+ vv.removeEventListener("resize", sync);
6688
+ vv.removeEventListener("scroll", sync);
6689
+ };
6690
+ }, [gate]);
6677
6691
  const [fundingAmount] = React5.useState("");
6678
6692
  const [kycLoading, setKycLoading] = React5.useState(false);
6679
6693
  const [showKycWidget, setShowKycWidget] = React5.useState(false);
@@ -7195,7 +7209,7 @@ var LoginPopup = ({
7195
7209
  }
7196
7210
  if (view === "otp") {
7197
7211
  if (gate) {
7198
- return /* @__PURE__ */ jsxRuntime.jsxs(GateShell, { children: [
7212
+ return /* @__PURE__ */ jsxRuntime.jsxs(GateShell, { $h: gateViewportH, children: [
7199
7213
  /* @__PURE__ */ jsxRuntime.jsx(GateTint, { $reveal: otpStatus === "valid" ? 3 : 2 }),
7200
7214
  /* @__PURE__ */ jsxRuntime.jsxs(GateForm, { children: [
7201
7215
  /* @__PURE__ */ jsxRuntime.jsxs(GateBrand, { children: [
@@ -7576,7 +7590,7 @@ var LoginPopup = ({
7576
7590
  if (gate) {
7577
7591
  const codeAccepted = codeStatus === "valid";
7578
7592
  const showSignIn = signInMode || signInRevealed;
7579
- return /* @__PURE__ */ jsxRuntime.jsxs(GateShell, { children: [
7593
+ return /* @__PURE__ */ jsxRuntime.jsxs(GateShell, { $h: gateViewportH, children: [
7580
7594
  /* @__PURE__ */ jsxRuntime.jsx(GateTint, { $reveal: showSignIn ? 1 : 0 }),
7581
7595
  /* @__PURE__ */ jsxRuntime.jsxs(GateForm, { children: [
7582
7596
  /* @__PURE__ */ jsxRuntime.jsxs(GateBrand, { children: [
@@ -8203,12 +8217,21 @@ var GateForm = styled10__default.default.div`
8203
8217
  `;
8204
8218
  var GateShell = styled10__default.default.div`
8205
8219
  position: fixed;
8206
- inset: 0;
8220
+ top: 0;
8221
+ left: 0;
8222
+ right: 0;
8223
+ /* Visual-viewport height when available (see gateViewportH) so the gate ends
8224
+ at the keyboard top with nothing hidden below it to scroll to; 100% else. */
8225
+ height: ${(props) => props.$h ? `${props.$h}px` : "100%"};
8207
8226
  display: flex;
8208
8227
  align-items: center;
8209
8228
  justify-content: center;
8210
8229
  z-index: 10000;
8211
8230
  background-color: rgba(10, 10, 12, 0.66);
8231
+ /* If content can't fit the visible area (very short screen + keyboard), scroll
8232
+ WITHIN the gate only — never chain to the platform underneath. */
8233
+ overflow-y: auto;
8234
+ overscroll-behavior: contain;
8212
8235
  `;
8213
8236
  var GateTint = styled10__default.default.div`
8214
8237
  position: absolute;