ordering-ui-react-native 0.17.54 → 0.17.55

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.
@@ -1,5 +1,18 @@
1
1
  import styled from 'styled-components/native';
2
2
 
3
+ export const LoginWith = styled.View`
4
+ display: flex;
5
+ width: 100%;
6
+ margin-bottom: 30px;
7
+ `;
8
+
9
+ export const TabsContainer = styled.View`
10
+ min-width: ${({ width }: { width: number }) => `${width}px`};
11
+ width: auto;
12
+ display: flex;
13
+ flex-direction: row;
14
+ `;
15
+
3
16
  export const LogoWrapper = styled.View`
4
17
  align-items: center;
5
18
  `;
@@ -11,4 +24,4 @@ export const RecaptchaButton = styled.View`
11
24
  flex-direction: row;
12
25
  align-items: center;
13
26
  margin-bottom: 10px;
14
- `
27
+ `
@@ -86,6 +86,7 @@ export const PhoneInputNumber = (props: PhoneInputParams) => {
86
86
  return (
87
87
  <Wrapper>
88
88
  <PhoneInput
89
+ containerStyle={{ width: '100%' }}
89
90
  ref={phoneInput}
90
91
  defaultValue={userphoneNumber || defaultValue}
91
92
  defaultCode={defaultCode ? transformCountryCode(defaultCode) : configs?.default_country_code?.value}
@@ -1,5 +1,3 @@
1
1
  import styled from 'styled-components/native';
2
2
 
3
- export const Wrapper = styled.View`
4
- flex: 1
5
- `
3
+ export const Wrapper = styled.View``;
@@ -95,14 +95,14 @@ const styles = StyleSheet.create({
95
95
  position: 'relative',
96
96
  width: '100%',
97
97
  },
98
- titleSection: {
99
- width: '100%',
100
- height: 30,
101
- display: 'flex',
102
- justifyContent: 'space-between',
103
- alignItems: 'center',
104
- marginBottom: 20,
105
- },
98
+ titleSection: {
99
+ width: '100%',
100
+ justifyContent: 'space-between',
101
+ alignItems: 'flex-start',
102
+ paddingLeft: 40,
103
+ paddingRight: 40,
104
+ marginBottom: 40,
105
+ },
106
106
  cancelBtn: {
107
107
  position: 'absolute',
108
108
  left: 0,
@@ -111,9 +111,12 @@ const styles = StyleSheet.create({
111
111
  },
112
112
  modalText: {
113
113
  marginTop: 15,
114
- fontSize: 25,
115
- textAlign: "center",
116
- zIndex: 10
114
+ fontSize: 20,
115
+ lineHeight: 30,
116
+ fontWeight: '600',
117
+ textAlign: "center",
118
+ zIndex: 10,
119
+ width: '100%'
117
120
  },
118
121
  wrapperIcon: {
119
122
  overflow: 'hidden',
@@ -22,7 +22,13 @@ export const Container = (props: Props) => {
22
22
  <SafeAreStyled
23
23
  nestedScrollEnabled={props.nestedScrollEnabled}
24
24
  >
25
- <ContainerStyled {...props} ref={props?.forwardRef}>{props.children}</ContainerStyled>
25
+ <ContainerStyled
26
+ {...props}
27
+ keyboardShouldPersistTaps="handled"
28
+ ref={props?.forwardRef}
29
+ >
30
+ {props.children}
31
+ </ContainerStyled>
26
32
  </SafeAreStyled>
27
33
  );
28
34
  };
@@ -84,6 +84,12 @@ export interface LoginParams {
84
84
  useRootPoint?: any;
85
85
  enableReCaptcha?: boolean;
86
86
  handleReCaptcha?: (vlaue: any) => void;
87
+ useLoginOtp?: any;
88
+ otpType?: any;
89
+ setOtpType?: any;
90
+ generateOtpCode?: any;
91
+ useLoginOtpEmail?: any;
92
+ useLoginOtpCellphone?: any;
87
93
  }
88
94
 
89
95
  export interface ProductItemAccordionParams {
@@ -482,3 +488,10 @@ export interface Cart {
482
488
  export interface NoNetworkParams {
483
489
  image?: any;
484
490
  }
491
+ export interface otpParams {
492
+ willVerifyOtpState: boolean,
493
+ setWillVerifyOtpState: (val : boolean) => void,
494
+ onSubmit: any,
495
+ handleLoginOtp: (code : string) => void,
496
+ setAlertState: any
497
+ }
@@ -0,0 +1,15 @@
1
+ export const formatSeconds = (seconds : number) => {
2
+ // Hours, minutes and seconds
3
+ const hrs = Math.floor(seconds / 3600)
4
+ const mins = Math.floor((seconds % 3600) / 60)
5
+ const secs = Math.floor(seconds % 60)
6
+
7
+ // Output like '1:01' or '4:03:59' or '123:03:59'
8
+ let ret = ''
9
+ if (hrs > 0) {
10
+ ret += '' + hrs + ':' + (mins < 10 ? '0' : '')
11
+ }
12
+ ret += '' + mins + ':' + (secs < 10 ? '0' : '')
13
+ ret += '' + secs
14
+ return ret
15
+ }