@acrool/react-picker 0.0.10-alpha.3 → 0.0.10-alpha.5
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.
|
@@ -5538,21 +5538,23 @@ const Zs = ({
|
|
|
5538
5538
|
const v = p.bottom, T = p.top, P = p.left, y = p.right, x = window.pageYOffset || document.documentElement.scrollTop, w = window.pageXOffset || document.documentElement.scrollLeft, A = window.innerWidth || document.documentElement.clientWidth, L = window.innerHeight || document.documentElement.clientHeight, $ = 15, R = v + f < L, _ = T - (f + $) > 0;
|
|
5539
5539
|
o === st.bottom ? !R && _ && (o = st.top) : o === st.top && (R && !_ || !R && !_) && (o = st.bottom);
|
|
5540
5540
|
const U = P + d < A, M = y - (d + $) > 0;
|
|
5541
|
-
r === mt.left ? !U && M && (r = mt.right) : r === mt.right && (U && !M || !U && !M) && (r = mt.left), s.setVertical(o), i.current.style.top = o === st.bottom ? `${v + x}px` : `${v + x - (f + g)}px`, i.current.style.left = r === mt.left ? `${P + w}px` : `${y + w - d}px`, i.current.style.transformOrigin = o === st.bottom ? "top" : "bottom", i.current.style.
|
|
5541
|
+
r === mt.left ? !U && M && (r = mt.right) : r === mt.right && (U && !M || !U && !M) && (r = mt.left), s.setVertical(o), i.current.style.top = o === st.bottom ? `${v + x}px` : `${v + x - (f + g)}px`, i.current.style.left = r === mt.left ? `${P + w}px` : `${y + w - d}px`, i.current.style.transformOrigin = o === st.bottom ? "top" : "bottom", i.current.style.display = "block", requestAnimationFrame(a);
|
|
5542
5542
|
}
|
|
5543
5543
|
};
|
|
5544
5544
|
if (e.current && i.current) {
|
|
5545
5545
|
const l = new ResizeObserver(a);
|
|
5546
|
-
return l.observe(i.current),
|
|
5546
|
+
return l.observe(i.current), window.requestAnimationFrame(() => {
|
|
5547
|
+
i.current && (i.current.style.display = "block");
|
|
5548
|
+
}), () => {
|
|
5547
5549
|
l.disconnect();
|
|
5548
5550
|
};
|
|
5549
5551
|
}
|
|
5550
|
-
}, [s.isVisible
|
|
5552
|
+
}, [s.isVisible]), /* @__PURE__ */ j.jsx(j.Fragment, { children: /* @__PURE__ */ j.jsx(
|
|
5551
5553
|
If.div,
|
|
5552
5554
|
{
|
|
5553
5555
|
ref: Do(n, i),
|
|
5554
5556
|
transition: { type: "spring", duration: 0.2 },
|
|
5555
|
-
style: { display: "none"
|
|
5557
|
+
style: { display: "none" },
|
|
5556
5558
|
className: sh.motionAnimationWrapper,
|
|
5557
5559
|
variants: rh.variants,
|
|
5558
5560
|
initial: "initial",
|