@tap-payments/auth-jsconnect 1.0.43 → 1.0.44
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.
|
@@ -24,7 +24,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
import { BottomSheet } from 'react-spring-bottom-sheet';
|
|
26
26
|
import { styled } from '@mui/material/styles';
|
|
27
|
-
import { useWindowSize } from '../../hooks';
|
|
28
27
|
import 'react-spring-bottom-sheet/dist/style.css';
|
|
29
28
|
var BottomSheetStyled = styled(BottomSheet)(function (_a) {
|
|
30
29
|
var theme = _a.theme;
|
|
@@ -53,33 +52,14 @@ var BottomSheetStyled = styled(BottomSheet)(function (_a) {
|
|
|
53
52
|
});
|
|
54
53
|
var BottomSheetComponent = function (_a) {
|
|
55
54
|
var open = _a.open, children = _a.children, rest = __rest(_a, ["open", "children"]);
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (height >= 500 && height < 550)
|
|
61
|
-
return maxHeight * 0.93;
|
|
62
|
-
if (height >= 550 && height < 600)
|
|
63
|
-
return maxHeight * 0.87;
|
|
64
|
-
if (height >= 600 && height < 650)
|
|
65
|
-
return maxHeight * 0.8;
|
|
66
|
-
if (height >= 650 && height < 700)
|
|
67
|
-
return maxHeight * 0.75;
|
|
68
|
-
if (height >= 700 && height < 750)
|
|
69
|
-
return maxHeight * 0.7;
|
|
70
|
-
if (height >= 750 && height < 800)
|
|
71
|
-
return maxHeight * 0.65;
|
|
72
|
-
if (height >= 800 && height < 850)
|
|
73
|
-
return maxHeight * 0.6;
|
|
74
|
-
if (height >= 850 && height < 900)
|
|
75
|
-
return maxHeight * 0.57;
|
|
76
|
-
if (height >= 900 && height < 950)
|
|
77
|
-
return maxHeight * 0.55;
|
|
78
|
-
return maxHeight * 0.5;
|
|
55
|
+
var getMinHeight = function () {
|
|
56
|
+
var element = document.getElementById('main-feature-container');
|
|
57
|
+
var height = element ? element.clientHeight + 30 : 0;
|
|
58
|
+
return height || 500;
|
|
79
59
|
};
|
|
80
60
|
return (_jsx(BottomSheetStyled, __assign({ open: open, snapPoints: function (_a) {
|
|
81
61
|
var maxHeight = _a.maxHeight;
|
|
82
|
-
return [getMinHeight(
|
|
62
|
+
return [getMinHeight(), maxHeight * 0.95];
|
|
83
63
|
} }, rest, { children: children })));
|
|
84
64
|
};
|
|
85
65
|
export default React.memo(BottomSheetComponent);
|
package/build/hooks/index.d.ts
CHANGED
package/build/hooks/index.js
CHANGED