@rufous/ui 0.2.105 → 0.2.106
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/main.cjs +17 -5
- package/dist/main.js +17 -5
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -3616,15 +3616,27 @@ var DateField = ({
|
|
|
3616
3616
|
const spaceBelow = window.innerHeight - rect.bottom - GAP2;
|
|
3617
3617
|
const spaceAbove = rect.top - GAP2;
|
|
3618
3618
|
const useDropUp = spaceBelow < PICKER_H && spaceAbove > spaceBelow;
|
|
3619
|
-
|
|
3619
|
+
if (useDropUp) {
|
|
3620
|
+
return {
|
|
3621
|
+
position: "fixed",
|
|
3622
|
+
left: rect.left,
|
|
3623
|
+
// bottom anchors picker's bottom edge exactly to field top — no gap regardless of actual height
|
|
3624
|
+
bottom: window.innerHeight - rect.top + GAP2,
|
|
3625
|
+
// prevent going above viewport
|
|
3626
|
+
maxHeight: rect.top - GAP2 - 4,
|
|
3627
|
+
overflowY: "auto",
|
|
3628
|
+
zIndex: 99999,
|
|
3629
|
+
animationName: "rf-date-picker-appear-up",
|
|
3630
|
+
transformOrigin: "bottom left"
|
|
3631
|
+
};
|
|
3632
|
+
}
|
|
3620
3633
|
return {
|
|
3621
3634
|
position: "fixed",
|
|
3622
3635
|
left: rect.left,
|
|
3623
|
-
top,
|
|
3636
|
+
top: rect.bottom + GAP2,
|
|
3624
3637
|
zIndex: 99999,
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
transformOrigin: useDropUp ? "bottom left" : "top left"
|
|
3638
|
+
animationName: "rf-date-picker-appear",
|
|
3639
|
+
transformOrigin: "top left"
|
|
3628
3640
|
};
|
|
3629
3641
|
})(),
|
|
3630
3642
|
onMouseDown: (e) => e.preventDefault()
|
package/dist/main.js
CHANGED
|
@@ -3467,15 +3467,27 @@ var DateField = ({
|
|
|
3467
3467
|
const spaceBelow = window.innerHeight - rect.bottom - GAP2;
|
|
3468
3468
|
const spaceAbove = rect.top - GAP2;
|
|
3469
3469
|
const useDropUp = spaceBelow < PICKER_H && spaceAbove > spaceBelow;
|
|
3470
|
-
|
|
3470
|
+
if (useDropUp) {
|
|
3471
|
+
return {
|
|
3472
|
+
position: "fixed",
|
|
3473
|
+
left: rect.left,
|
|
3474
|
+
// bottom anchors picker's bottom edge exactly to field top — no gap regardless of actual height
|
|
3475
|
+
bottom: window.innerHeight - rect.top + GAP2,
|
|
3476
|
+
// prevent going above viewport
|
|
3477
|
+
maxHeight: rect.top - GAP2 - 4,
|
|
3478
|
+
overflowY: "auto",
|
|
3479
|
+
zIndex: 99999,
|
|
3480
|
+
animationName: "rf-date-picker-appear-up",
|
|
3481
|
+
transformOrigin: "bottom left"
|
|
3482
|
+
};
|
|
3483
|
+
}
|
|
3471
3484
|
return {
|
|
3472
3485
|
position: "fixed",
|
|
3473
3486
|
left: rect.left,
|
|
3474
|
-
top,
|
|
3487
|
+
top: rect.bottom + GAP2,
|
|
3475
3488
|
zIndex: 99999,
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
transformOrigin: useDropUp ? "bottom left" : "top left"
|
|
3489
|
+
animationName: "rf-date-picker-appear",
|
|
3490
|
+
transformOrigin: "top left"
|
|
3479
3491
|
};
|
|
3480
3492
|
})(),
|
|
3481
3493
|
onMouseDown: (e) => e.preventDefault()
|