@tap-payments/auth-jsconnect 1.0.35 → 1.0.36
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.
|
@@ -53,7 +53,7 @@ var BottomSheetComponent = function (_a) {
|
|
|
53
53
|
var open = _a.open, children = _a.children, rest = __rest(_a, ["open", "children"]);
|
|
54
54
|
return (_jsx(BottomSheetStyled, __assign({ open: open, snapPoints: function (_a) {
|
|
55
55
|
var maxHeight = _a.maxHeight;
|
|
56
|
-
return [maxHeight * 0.9];
|
|
56
|
+
return [maxHeight * 0.7, maxHeight * 0.9];
|
|
57
57
|
} }, rest, { children: children })));
|
|
58
58
|
};
|
|
59
59
|
export default React.memo(BottomSheetComponent);
|
|
@@ -443,7 +443,7 @@ export var connectSlice = createSlice({
|
|
|
443
443
|
state.data.nidData = __assign(__assign({}, state.data.nidData), initialState.data.nidData);
|
|
444
444
|
},
|
|
445
445
|
resetOTPScreen: function (state) {
|
|
446
|
-
state.data.otpData = __assign(__assign({}, state.data.otpData), initialState.data.otpData);
|
|
446
|
+
state.data.otpData = __assign(__assign(__assign({}, state.data.otpData), initialState.data.otpData), { isAbsher: state.data.otpData.isAbsher });
|
|
447
447
|
},
|
|
448
448
|
resetPasswordScreen: function (state) {
|
|
449
449
|
state.data.passwordData = initialState.data.passwordData;
|
|
@@ -54,15 +54,23 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
|
|
|
54
54
|
return ({
|
|
55
55
|
margin: theme.spacing(0, 2.5, 2.5, 2.5),
|
|
56
56
|
marginBlockStart: theme.spacing(5),
|
|
57
|
-
display: 'flex'
|
|
57
|
+
display: 'flex',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
justifyContent: 'center'
|
|
58
60
|
});
|
|
59
61
|
});
|
|
60
|
-
var ButtonStyled = styled(Button, {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
var ButtonStyled = styled(Button, {
|
|
63
|
+
shouldForwardProp: function (prop) { return prop !== 'isBack' && prop !== 'isLoading'; }
|
|
64
|
+
})(function (_a) {
|
|
65
|
+
var theme = _a.theme, isBack = _a.isBack, isLoading = _a.isLoading;
|
|
66
|
+
return (__assign({ paddingInlineStart: theme.spacing(2.5), marginInlineStart: isBack ? theme.spacing(-5) : theme.spacing(0), paddingLeft: isLoading ? 8 : 'auto', paddingRight: isLoading ? 8 : 'auto', transition: theme.transitions.create(['width', 'padding'], {
|
|
67
|
+
easing: theme.transitions.easing.easeInOut,
|
|
68
|
+
duration: theme.transitions.duration.complex * 2
|
|
69
|
+
}) }, (isLoading && {
|
|
70
|
+
minWidth: 0,
|
|
71
|
+
width: theme.spacing(6),
|
|
72
|
+
borderRadius: 30
|
|
73
|
+
})));
|
|
66
74
|
});
|
|
67
75
|
var BackButtonStyled = styled(Button, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
68
76
|
var theme = _a.theme, isAr = _a.isAr;
|
|
@@ -77,8 +85,5 @@ var BackButtonStyled = styled(Button, { shouldForwardProp: function (prop) { ret
|
|
|
77
85
|
export default function CustomButton(_a) {
|
|
78
86
|
var children = _a.children, disabled = _a.disabled, isAr = _a.isAr, loading = _a.loading, disableBack = _a.disableBack, onBackClicked = _a.onBackClicked, error = _a.error, props = __rest(_a, ["children", "disabled", "isAr", "loading", "disableBack", "onBackClicked", "error"]);
|
|
79
87
|
var isBackEnabled = !disableBack && !loading;
|
|
80
|
-
return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); }, isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props))), _jsx(ButtonStyled, __assign({ disabled: disabled
|
|
81
|
-
visibility: disableBack && !loading ? 'hidden' : loading ? 'visible' : 'hidden',
|
|
82
|
-
display: !disableBack && !loading ? 'none' : 'block'
|
|
83
|
-
}, innerColor: 'white', outerColor: 'white', size: 30, toggleAnimation: !!loading }) }, props, { children: _jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '20px' } }, { children: [" ", children] })) }))] })] }));
|
|
88
|
+
return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); }, isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props))), _jsx(ButtonStyled, __assign({ disabled: disabled, isLoading: loading, type: !loading ? 'submit' : 'button', isBack: isBackEnabled, endIcon: !loading && _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props, { children: !loading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 25, toggleAnimation: !!loading })) }))] })] }));
|
|
84
89
|
}
|