be-components 3.5.9 → 3.6.1

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.
Files changed (169) hide show
  1. package/lib/commonjs/Components/Pagination.js +37 -0
  2. package/lib/commonjs/Components/Pagination.js.map +1 -0
  3. package/lib/commonjs/ProfileManager/Components/VouchCard.js +3 -35
  4. package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
  5. package/lib/commonjs/Wallet/components/AccountCard.js +27 -28
  6. package/lib/commonjs/Wallet/components/AccountCard.js.map +1 -1
  7. package/lib/commonjs/Wallet/components/AccountLimitManager.js +60 -95
  8. package/lib/commonjs/Wallet/components/AccountLimitManager.js.map +1 -1
  9. package/lib/commonjs/Wallet/components/AccountManager.js +209 -158
  10. package/lib/commonjs/Wallet/components/AccountManager.js.map +1 -1
  11. package/lib/commonjs/Wallet/components/AccountSnoozeManager.js +53 -66
  12. package/lib/commonjs/Wallet/components/AccountSnoozeManager.js.map +1 -1
  13. package/lib/commonjs/Wallet/components/DepositCard.js +93 -99
  14. package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -1
  15. package/lib/commonjs/Wallet/components/ItemOrderCard.js +26 -29
  16. package/lib/commonjs/Wallet/components/ItemOrderCard.js.map +1 -1
  17. package/lib/commonjs/Wallet/components/ItemOrderDetailCard.js +43 -46
  18. package/lib/commonjs/Wallet/components/ItemOrderDetailCard.js.map +1 -1
  19. package/lib/commonjs/Wallet/components/ManageAccountCard.js +85 -60
  20. package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -1
  21. package/lib/commonjs/Wallet/components/OrderManager.js +61 -58
  22. package/lib/commonjs/Wallet/components/OrderManager.js.map +1 -1
  23. package/lib/commonjs/Wallet/components/RemoveAccount.js +22 -23
  24. package/lib/commonjs/Wallet/components/RemoveAccount.js.map +1 -1
  25. package/lib/commonjs/Wallet/components/WalletActionSelector.js +130 -133
  26. package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -1
  27. package/lib/commonjs/Wallet/components/WalletSettings.js +382 -547
  28. package/lib/commonjs/Wallet/components/WalletSettings.js.map +1 -1
  29. package/lib/commonjs/Wallet/components/WalletSetup.js +85 -107
  30. package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
  31. package/lib/commonjs/Wallet/components/WithdrawCard.js +91 -111
  32. package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -1
  33. package/lib/commonjs/Wallet/index.js +22 -24
  34. package/lib/commonjs/Wallet/index.js.map +1 -1
  35. package/lib/commonjs/constants/styles.js +1 -1
  36. package/lib/commonjs/constants/styles.js.map +1 -1
  37. package/lib/commonjs/constants/useColors.js +1 -1
  38. package/lib/commonjs/constants/useColors.js.map +1 -1
  39. package/lib/module/Components/Pagination.js +30 -0
  40. package/lib/module/Components/Pagination.js.map +1 -0
  41. package/lib/module/ProfileManager/Components/VouchCard.js +3 -35
  42. package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
  43. package/lib/module/Wallet/components/AccountCard.js +23 -24
  44. package/lib/module/Wallet/components/AccountCard.js.map +1 -1
  45. package/lib/module/Wallet/components/AccountLimitManager.js +43 -77
  46. package/lib/module/Wallet/components/AccountLimitManager.js.map +1 -1
  47. package/lib/module/Wallet/components/AccountManager.js +206 -155
  48. package/lib/module/Wallet/components/AccountManager.js.map +1 -1
  49. package/lib/module/Wallet/components/AccountSnoozeManager.js +35 -48
  50. package/lib/module/Wallet/components/AccountSnoozeManager.js.map +1 -1
  51. package/lib/module/Wallet/components/DepositCard.js +62 -67
  52. package/lib/module/Wallet/components/DepositCard.js.map +1 -1
  53. package/lib/module/Wallet/components/ItemOrderCard.js +17 -20
  54. package/lib/module/Wallet/components/ItemOrderCard.js.map +1 -1
  55. package/lib/module/Wallet/components/ItemOrderDetailCard.js +28 -31
  56. package/lib/module/Wallet/components/ItemOrderDetailCard.js.map +1 -1
  57. package/lib/module/Wallet/components/ManageAccountCard.js +80 -55
  58. package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -1
  59. package/lib/module/Wallet/components/OrderManager.js +59 -56
  60. package/lib/module/Wallet/components/OrderManager.js.map +1 -1
  61. package/lib/module/Wallet/components/RemoveAccount.js +16 -16
  62. package/lib/module/Wallet/components/RemoveAccount.js.map +1 -1
  63. package/lib/module/Wallet/components/WalletActionSelector.js +102 -104
  64. package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -1
  65. package/lib/module/Wallet/components/WalletSettings.js +381 -545
  66. package/lib/module/Wallet/components/WalletSettings.js.map +1 -1
  67. package/lib/module/Wallet/components/WalletSetup.js +42 -64
  68. package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
  69. package/lib/module/Wallet/components/WithdrawCard.js +52 -71
  70. package/lib/module/Wallet/components/WithdrawCard.js.map +1 -1
  71. package/lib/module/Wallet/index.js +15 -17
  72. package/lib/module/Wallet/index.js.map +1 -1
  73. package/lib/module/constants/styles.js +1 -1
  74. package/lib/module/constants/styles.js.map +1 -1
  75. package/lib/module/constants/useColors.js +1 -1
  76. package/lib/module/constants/useColors.js.map +1 -1
  77. package/lib/typescript/lib/commonjs/Components/Pagination.d.ts +11 -0
  78. package/lib/typescript/lib/commonjs/Components/Pagination.d.ts.map +1 -0
  79. package/lib/typescript/lib/commonjs/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  80. package/lib/typescript/lib/commonjs/Wallet/components/AccountCard.d.ts.map +1 -1
  81. package/lib/typescript/lib/commonjs/Wallet/components/AccountLimitManager.d.ts.map +1 -1
  82. package/lib/typescript/lib/commonjs/Wallet/components/AccountManager.d.ts.map +1 -1
  83. package/lib/typescript/lib/commonjs/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
  84. package/lib/typescript/lib/commonjs/Wallet/components/DepositCard.d.ts.map +1 -1
  85. package/lib/typescript/lib/commonjs/Wallet/components/ItemOrderCard.d.ts.map +1 -1
  86. package/lib/typescript/lib/commonjs/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
  87. package/lib/typescript/lib/commonjs/Wallet/components/ManageAccountCard.d.ts.map +1 -1
  88. package/lib/typescript/lib/commonjs/Wallet/components/OrderManager.d.ts.map +1 -1
  89. package/lib/typescript/lib/commonjs/Wallet/components/RemoveAccount.d.ts.map +1 -1
  90. package/lib/typescript/lib/commonjs/Wallet/components/WalletActionSelector.d.ts.map +1 -1
  91. package/lib/typescript/lib/commonjs/Wallet/components/WalletSettings.d.ts +1 -2
  92. package/lib/typescript/lib/commonjs/Wallet/components/WalletSettings.d.ts.map +1 -1
  93. package/lib/typescript/lib/commonjs/Wallet/components/WalletSetup.d.ts.map +1 -1
  94. package/lib/typescript/lib/commonjs/Wallet/components/WithdrawCard.d.ts.map +1 -1
  95. package/lib/typescript/lib/commonjs/Wallet/index.d.ts.map +1 -1
  96. package/lib/typescript/lib/commonjs/constants/styles.d.ts +1 -1
  97. package/lib/typescript/lib/module/Components/Pagination.d.ts +11 -0
  98. package/lib/typescript/lib/module/Components/Pagination.d.ts.map +1 -0
  99. package/lib/typescript/lib/module/ProfileManager/Components/VouchCard.d.ts +3 -1
  100. package/lib/typescript/lib/module/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  101. package/lib/typescript/lib/module/Wallet/components/AccountCard.d.ts +1 -2
  102. package/lib/typescript/lib/module/Wallet/components/AccountCard.d.ts.map +1 -1
  103. package/lib/typescript/lib/module/Wallet/components/AccountLimitManager.d.ts +1 -2
  104. package/lib/typescript/lib/module/Wallet/components/AccountLimitManager.d.ts.map +1 -1
  105. package/lib/typescript/lib/module/Wallet/components/AccountManager.d.ts +1 -2
  106. package/lib/typescript/lib/module/Wallet/components/AccountManager.d.ts.map +1 -1
  107. package/lib/typescript/lib/module/Wallet/components/AccountSnoozeManager.d.ts +1 -2
  108. package/lib/typescript/lib/module/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
  109. package/lib/typescript/lib/module/Wallet/components/DepositCard.d.ts +2 -2
  110. package/lib/typescript/lib/module/Wallet/components/DepositCard.d.ts.map +1 -1
  111. package/lib/typescript/lib/module/Wallet/components/ItemOrderCard.d.ts +1 -2
  112. package/lib/typescript/lib/module/Wallet/components/ItemOrderCard.d.ts.map +1 -1
  113. package/lib/typescript/lib/module/Wallet/components/ItemOrderDetailCard.d.ts +1 -2
  114. package/lib/typescript/lib/module/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
  115. package/lib/typescript/lib/module/Wallet/components/ManageAccountCard.d.ts +1 -2
  116. package/lib/typescript/lib/module/Wallet/components/ManageAccountCard.d.ts.map +1 -1
  117. package/lib/typescript/lib/module/Wallet/components/OrderManager.d.ts +1 -2
  118. package/lib/typescript/lib/module/Wallet/components/OrderManager.d.ts.map +1 -1
  119. package/lib/typescript/lib/module/Wallet/components/RemoveAccount.d.ts +1 -2
  120. package/lib/typescript/lib/module/Wallet/components/RemoveAccount.d.ts.map +1 -1
  121. package/lib/typescript/lib/module/Wallet/components/WalletActionSelector.d.ts +1 -2
  122. package/lib/typescript/lib/module/Wallet/components/WalletActionSelector.d.ts.map +1 -1
  123. package/lib/typescript/lib/module/Wallet/components/WalletSettings.d.ts +2 -4
  124. package/lib/typescript/lib/module/Wallet/components/WalletSettings.d.ts.map +1 -1
  125. package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts +2 -2
  126. package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts.map +1 -1
  127. package/lib/typescript/lib/module/Wallet/components/WithdrawCard.d.ts +2 -2
  128. package/lib/typescript/lib/module/Wallet/components/WithdrawCard.d.ts.map +1 -1
  129. package/lib/typescript/lib/module/Wallet/index.d.ts +1 -2
  130. package/lib/typescript/lib/module/Wallet/index.d.ts.map +1 -1
  131. package/lib/typescript/src/Components/Pagination.d.ts +12 -0
  132. package/lib/typescript/src/Components/Pagination.d.ts.map +1 -0
  133. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  134. package/lib/typescript/src/Wallet/components/AccountCard.d.ts.map +1 -1
  135. package/lib/typescript/src/Wallet/components/AccountLimitManager.d.ts.map +1 -1
  136. package/lib/typescript/src/Wallet/components/AccountManager.d.ts.map +1 -1
  137. package/lib/typescript/src/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
  138. package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -1
  139. package/lib/typescript/src/Wallet/components/ItemOrderCard.d.ts.map +1 -1
  140. package/lib/typescript/src/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
  141. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -1
  142. package/lib/typescript/src/Wallet/components/OrderManager.d.ts.map +1 -1
  143. package/lib/typescript/src/Wallet/components/RemoveAccount.d.ts.map +1 -1
  144. package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -1
  145. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts +1 -1
  146. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts.map +1 -1
  147. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
  148. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -1
  149. package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
  150. package/package.json +1 -2
  151. package/src/Components/Pagination.tsx +33 -0
  152. package/src/ProfileManager/Components/VouchCard.tsx +3 -27
  153. package/src/Wallet/components/AccountCard.tsx +22 -21
  154. package/src/Wallet/components/AccountLimitManager.tsx +36 -54
  155. package/src/Wallet/components/AccountManager.tsx +95 -61
  156. package/src/Wallet/components/AccountSnoozeManager.tsx +39 -37
  157. package/src/Wallet/components/DepositCard.tsx +55 -53
  158. package/src/Wallet/components/ItemOrderCard.tsx +13 -12
  159. package/src/Wallet/components/ItemOrderDetailCard.tsx +23 -22
  160. package/src/Wallet/components/ManageAccountCard.tsx +78 -47
  161. package/src/Wallet/components/OrderManager.tsx +47 -37
  162. package/src/Wallet/components/RemoveAccount.tsx +12 -15
  163. package/src/Wallet/components/WalletActionSelector.tsx +70 -69
  164. package/src/Wallet/components/WalletSettings.tsx +137 -139
  165. package/src/Wallet/components/WalletSetup.tsx +41 -51
  166. package/src/Wallet/components/WithdrawCard.tsx +56 -56
  167. package/src/Wallet/index.tsx +16 -15
  168. package/src/constants/styles.ts +1 -1
  169. package/src/constants/useColors.tsx +1 -1
@@ -1,10 +1,11 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { FlatList, TouchableOpacity, View, ScrollView } from 'react-native';
2
+ import { FlatList } from 'react-native';
3
3
  import type { AccountProps, AccountSnoozeProps } from '../../types';
4
4
  import { WalletApi } from '../api';
5
- import { Button, Icons, Text } from '../../Components';
6
- import Colors from '../../constants/colors';
5
+ import { Icons } from '../../Components';
7
6
  import moment from 'moment-mini';
7
+ import { useColors } from '../../constants/useColors';
8
+ import { Button, Text, View } from '../../Components/Themed';
8
9
 
9
10
  const duration_options = [1,7,14,30]
10
11
 
@@ -15,6 +16,7 @@ type AccountSnoozeManagerProps = {
15
16
  }
16
17
 
17
18
  const AccountSnoozeManager = ({ account, onCancel, onSnooze } : AccountSnoozeManagerProps) => {
19
+ const Colors = useColors();
18
20
  const [ loading, setLoading ] = useState(false);
19
21
  const [ dropdown_visible, setDropdownVisible ] = useState(false);
20
22
  const [ disclaimer, setDisclaimer ] = useState(false);
@@ -66,58 +68,56 @@ const AccountSnoozeManager = ({ account, onCancel, onSnooze } : AccountSnoozeMan
66
68
 
67
69
  const renderOptions = (data: { item:number, index:number }) => {
68
70
  return (
69
- <TouchableOpacity style={{ padding:10 }} onPress={() => {
71
+ <Button style={{ padding:10, borderBottomWidth:1, borderColor:Colors.borders.light }} onPress={() => {
70
72
  setActiveDuration(data.item);
71
73
  setDropdownVisible(false);
72
74
  }}>
73
- <Text color={Colors.brand.midnight} weight='semibold' size={14}>{data.item} days</Text>
74
- </TouchableOpacity>
75
+ <Text theme='h2' size={14}>{data.item} days</Text>
76
+ </Button>
75
77
  )
76
78
  }
77
79
  const valid = active_duration ? true : false;
78
80
  return (
79
81
  <View style={{ flex:1 }}>
80
82
  <View style={{ padding:20 }}>
81
- <Text size={30} color={Colors.brand.midnight} weight='bold'>Snooze Account</Text>
82
- <Text style={{ marginTop:15 }} size={16} color={Colors.brand.midnight} weight='regular'>Take a break from the real money features of BettorEdge using this account.</Text>
83
+ <Text size={30} theme='h2'>Snooze Account</Text>
84
+ <Text style={{ marginTop:15 }} size={16} theme='description'>Take a break from the real money features of BettorEdge using this account.</Text>
83
85
  </View>
84
- <ScrollView style={{ flex:1, padding:16}}>
85
- <Text size={16} color={Colors.brand.cobalt} weight='semibold'>Amount</Text>
86
- <TouchableOpacity
86
+ <View style={{ flex:1, padding:16}}>
87
+ <Text size={16} theme='h2'>Amount</Text>
88
+ <Button
89
+ float
87
90
  onPress={() => setDropdownVisible(!dropdown_visible)}
88
- style={{marginTop:8, flexDirection:'row', alignItems:'center', justifyContent:'space-between', padding:15, backgroundColor:Colors.shades.shade100}}>
89
- <Text color={Colors.brand.cobalt} size={14} weight='semibold'>{active_duration?`${active_duration} Days`:'Select Duration'}</Text>
90
- <Icons.ChevronIcon direction='down' color={Colors.brand.cobalt} size={8} />
91
- </TouchableOpacity>
91
+ style={{marginTop:8, flexDirection:'row', alignItems:'center', justifyContent:'space-between', padding:15 }}>
92
+ <Text theme='h2'>{active_duration?`${active_duration} Days`:'Select Duration'}</Text>
93
+ <Icons.ChevronIcon direction='down' color={Colors.text.h1} size={8} />
94
+ </Button>
92
95
  {dropdown_visible ?
93
- <View style={{ borderBottomRightRadius:8, borderBottomLeftRadius:8, padding:10, borderWidth:1, borderTopWidth:1, borderColor:Colors.shades.shade600 }}>
96
+ <View style={{ borderBottomRightRadius:8, borderBottomLeftRadius:8, padding:10, borderWidth:1, borderTopWidth:1, borderColor:Colors.borders.light }}>
94
97
  <FlatList
95
98
  data={duration_options}
96
99
  renderItem={renderOptions}
97
100
  />
98
101
  </View>
99
102
  :<></>}
100
- </ScrollView>
103
+ </View>
101
104
  { valid ?
102
105
  <View nativeID='snooze_disclaimer' style={{ margin:10 }}>
103
- <TouchableOpacity style={{ flexDirection:'row', padding:5 }} onPress={() => setDisclaimer(!disclaimer)}>
104
- <View style={{ justifyContent:'center', marginRight:10, alignItems:'center', height:25, width:25, borderRadius:4, backgroundColor: disclaimer ? Colors.brand.midnight : 'transparent', borderWidth:1, borderColor:Colors.brand.midnight }}>
106
+ <Button style={{ flexDirection:'row', padding:5 }} onPress={() => setDisclaimer(!disclaimer)}>
107
+ <View style={{ justifyContent:'center', marginRight:10, alignItems:'center', height:25, width:25, borderRadius:4, backgroundColor: disclaimer ? Colors.text.h1 : 'transparent', borderWidth:1, borderColor:Colors.text.h1 }}>
105
108
  {disclaimer ?
106
- <Icons.CheckIcon color={Colors.shades.white} size={14} />
109
+ <Icons.CheckIcon color={Colors.text.h1} size={14} />
107
110
  :<></>}
108
111
  </View>
109
- <Text size={14} color={Colors.brand.midnight} weight='regular'>I confirm I wwould like to snooze my account for {active_duration} days. This cannot be undone!</Text>
110
- </TouchableOpacity>
112
+ <Text size={14} theme='description'>I confirm I wwould like to snooze my account for {active_duration} days. This cannot be undone!</Text>
113
+ </Button>
111
114
  </View>
112
115
  :<></>}
113
116
  <View nativeID='action_row' style={{ flexDirection:'row', padding:20 }}>
114
117
  <Button
115
118
  style={{ flex:1, marginRight:5, opacity: 1 }}
116
119
  title={'CLOSE'}
117
- title_color={Colors.brand.electric}
118
- borderColor={Colors.brand.electric}
119
- borderWidth={1}
120
- padding={15}
120
+ type='close'
121
121
  onPress={() => onCancel()}
122
122
  />
123
123
  <Button
@@ -125,24 +125,26 @@ const AccountSnoozeManager = ({ account, onCancel, onSnooze } : AccountSnoozeMan
125
125
  title={'SAVE SNOOZE'}
126
126
  disabled={!valid||!disclaimer}
127
127
  loading={loading}
128
- title_color={Colors.shades.white}
129
- backgroundColor={Colors.brand.electric}
130
- padding={15}
128
+ type='success'
131
129
  onPress={() => handleSetSnooze()}
132
130
  />
133
131
  </View>
134
132
 
135
133
  {account_snooze ?
136
- <View style={{ position:'absolute', top:0, right:0, left:0, bottom:0, backgroundColor:Colors.shades.black_faded, justifyContent:'center', alignItems:'center' }}>
137
- <View style={{ backgroundColor:Colors.shades.white, borderRadius:8, padding:20}}>
138
- <View style={{ padding:10, backgroundColor:Colors.brand.cyan, borderRadius:8, alignSelf:'center' }}>
139
- <Icons.SnoozeIcon size={24} color={Colors.shades.white} />
134
+ <View type='blur' style={{ position:'absolute', top:0, right:0, left:0, bottom:0, justifyContent:'center', alignItems:'center' }}>
135
+ <View style={{ borderRadius:8, padding:20}}>
136
+ <View float style={{ padding:10, borderRadius:8, alignSelf:'center' }}>
137
+ <Icons.SnoozeIcon size={24} color={Colors.text.h1} />
140
138
  </View>
141
139
  <Text style={{ padding:10 }} size={18} weight='bold' textAlign='center'>Account is Snoozing</Text>
142
- <Text size={14} color={Colors.brand.midnight} weight='semibold' textAlign='center'>Snooze ends {moment(account_snooze.end_datetime).fromNow()}</Text>
143
- <TouchableOpacity style={{ marginTop:10, padding:10, borderWidth:1, borderColor:Colors.brand.electric, borderRadius:8 }} onPress={() => onCancel()}>
144
- <Text size={14} color={Colors.brand.electric} textAlign='center'>Go Back</Text>
145
- </TouchableOpacity>
140
+ <Text size={14} theme='h1' textAlign='center'>Snooze ends {moment(account_snooze.end_datetime).fromNow()}</Text>
141
+ <Button
142
+ type='close'
143
+ style={{ marginTop:10 }}
144
+ onPress={() => onCancel()}
145
+ >
146
+ <Text size={14} theme='action' textAlign='center'>Go Back</Text>
147
+ </Button>
146
148
  </View>
147
149
  </View>
148
150
  :<></>}
@@ -1,10 +1,10 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { View, ActivityIndicator, Image, ScrollView } from "react-native";
2
+ import { ActivityIndicator, Image, Keyboard, KeyboardAvoidingView, Platform, TouchableWithoutFeedback } from "react-native";
3
3
  import type { AccountProps, AccountSnoozeProps, CodeRequestProps, ItemOrderProps, MyPlayerProps, PlayerDepositLimitProps, PlayerReferralProps, PromoProps, PublicPlayerProps, RewardOptionProps, WalletSettingsProps } from '../../types';
4
4
  import { ItemOrderApi, ItemOrderHelpers, WalletApi } from '../api';
5
- import Colors from '../../constants/colors';
6
- import { Button, Icons, Text, TextInput } from '../../Components';
7
- import { view_styles } from '../../constants/styles';
5
+ import { Icons } from '../../Components';
6
+ import { Button, Text, TextInput, View } from '../../Components/Themed';
7
+ import { useColors } from '../../constants/useColors';
8
8
 
9
9
  type DepositCardProps = {
10
10
  player:MyPlayerProps,
@@ -23,6 +23,7 @@ type DepositCardProps = {
23
23
  }
24
24
 
25
25
  const DepositCard = ({ wallet_settings, code_details, account, deposit_limit, onTransact, onCancel }:DepositCardProps) => {
26
+ const Colors = useColors();
26
27
  const [ draft_order, setDraftOrder ] = useState<ItemOrderProps>();
27
28
  const [ account_snooze, setAccountSnooze ] = useState<AccountSnoozeProps>();
28
29
 
@@ -48,7 +49,7 @@ const DepositCard = ({ wallet_settings, code_details, account, deposit_limit, on
48
49
  if(!draft_order){
49
50
  return (
50
51
  <View style={{ padding:20 }}>
51
- <ActivityIndicator style={{ alignSelf:'center' }} size='large' color={Colors.brand.midnight} />
52
+ <ActivityIndicator style={{ alignSelf:'center' }} size='large' color={Colors.text.h1} />
52
53
  </View>
53
54
  )
54
55
  }
@@ -56,62 +57,65 @@ const DepositCard = ({ wallet_settings, code_details, account, deposit_limit, on
56
57
  let order_amount = parseFloat(draft_order.amount as string);
57
58
 
58
59
  return (
60
+ <TouchableWithoutFeedback style={{ flex:1 }} onPress={() => Keyboard.dismiss()}>
59
61
  <View style={{ flex:1 }}>
60
- <View style={{ padding:20 }}>
61
- <Text size={26} color={Colors.brand.midnight} weight='bold'>MAKE A DEPOSIT</Text>
62
- <Text style={{ marginTop:10 }} size={16} color={Colors.brand.midnight} weight='regular'>In order to participate in real-money activities, you will need to fund your BettorEdge Wallet. Please enter the amount you wish to deposit below.</Text>
62
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:15 }}>
63
+ <View transparent style={{flex:1}}>
64
+ <Text size={20} theme='h1'>MAKE A DEPOSIT</Text>
65
+ <Text style={{ marginTop:5}} theme='description'>In order to participate in real-money activities, you will need to fund your BettorEdge Wallet. Please enter the amount you wish to deposit below</Text>
66
+ </View>
63
67
  </View>
64
- <ScrollView style={{ flex:1 }}>
68
+ <View style={{ flex:1 }}>
65
69
  <View nativeID='deposit_amount' style={{ justifyContent:'center', alignItems:'center', padding:20 }}>
66
- <Text style={{ marginBottom:5 }} size={14} color={Colors.brand.midnight} weight='regular'>Minumum $25 / Maximum ${ItemOrderHelpers.getDepositAvailable(deposit_limit, account).toFixed(2)}</Text>
70
+ <Text style={{ marginBottom:15 }} size={14} theme='description'>Minumum $25 / Maximum ${ItemOrderHelpers.getDepositAvailable(deposit_limit, account).toFixed(2)}</Text>
67
71
  <TextInput
68
- style={{ flex:1 }}
72
+ style={{ flexGrow:1, width:200, textAlign:'center', color:Colors.text.success, fontSize:28 }}
69
73
  placeholder='25'
70
- placeholderTextColor={Colors.brand.slate}
74
+ keyboardType='decimal-pad'
71
75
  value={draft_order.amount as string}
72
76
  onChangeText={(text) => setDraftOrder({ ...draft_order, amount:text })}
73
77
  />
74
- <Text style={{ marginTop:5 }} size={14} color={Colors.brand.midnight} weight='regular' textAlign='center'>*All deposits are held for {deposit_limit.hold_days} days before they are eligible for withdraw</Text>
78
+ <Text style={{ marginTop:15 }} size={14} theme='warning' textAlign='center'>*All deposits are held for {deposit_limit.hold_days} days before they are eligible for withdraw</Text>
75
79
 
76
80
  </View>
77
81
  {errors.length == 0 && order_amount > deposit_limit.instant_available ?
78
- <View nativeID='instant_available' style={{ backgroundColor:Colors.shades.shade100, padding:5, borderRadius:8, margin:10 }}>
79
- <View style={{ padding:10, borderBottomWidth:1, borderColor:Colors.highlights.highlight200Faded }}>
82
+ <View nativeID='instant_available' style={{ padding:5, borderRadius:8, margin:10 }}>
83
+ <View style={{ padding:10, borderBottomWidth:1 }}>
80
84
  <View style={{flexDirection:'row', marginBottom:5 }}>
81
- <Icons.AlertIcon color={Colors.utility.warning} size={16}/>
82
- <Text style={{ marginLeft:10 }} size={14} color={Colors.utility.warning} weight='bold'>INSTANT DEPOSIT NOTICE</Text>
85
+ <Icons.AlertIcon color={Colors.text.warning} size={16}/>
86
+ <Text style={{ marginLeft:10 }} size={14} color={Colors.text.warning} weight='bold'>INSTANT DEPOSIT NOTICE</Text>
83
87
  </View>
84
- <Text size={14} color={Colors.brand.midnight} weight='regular'>Transactions take time to leave your account and settle in ours. In order to get you started before they arrive, we allow for some to be instantly available. The remainder is available after settlement.</Text>
88
+ <Text size={14} theme='description'>Transactions take time to leave your account and settle in ours. In order to get you started before they arrive, we allow for some to be instantly available. The remainder is available after settlement.</Text>
85
89
  </View>
86
90
  <View style={{ padding:5 }}>
87
91
  <View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
88
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight}>Available Instantly</Text>
89
- <Text size={14} color={Colors.brand.midnight} weight='bold'>${deposit_limit.instant_available.toFixed(2)}</Text>
92
+ <Text style={{ flex:1 }} size={14} theme='h2'>Available Instantly</Text>
93
+ <Text size={14} theme='h1'>${deposit_limit.instant_available.toFixed(2)}</Text>
90
94
  </View>
91
95
  <View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
92
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight}>Available after settlement ({deposit_limit.hold_days} days)</Text>
93
- <Text size={14} color={Colors.brand.midnight}>${(order_amount - deposit_limit.instant_available).toFixed(2)}</Text>
96
+ <Text style={{ flex:1 }} theme='h2'>Available after settlement ({deposit_limit.hold_days} days)</Text>
97
+ <Text size={14} theme='h1'>${(order_amount - deposit_limit.instant_available).toFixed(2)}</Text>
94
98
  </View>
95
99
  <View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
96
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight}>Total Deposit</Text>
97
- <Text size={14} color={Colors.brand.midnight} weight='bold'>${order_amount.toFixed(2)}</Text>
100
+ <Text style={{ flex:1 }} theme='h2'>Total Deposit</Text>
101
+ <Text size={14} theme='h1'>${order_amount.toFixed(2)}</Text>
98
102
  </View>
99
103
  </View>
100
104
  </View>
101
105
  :<></>}
102
106
  {errors.length > 0 ?
103
- <View style={{ margin:20, borderRadius:8, padding:20, backgroundColor:Colors.shades.white, ...view_styles.float }}>
104
- <Text style={{ marginBottom:10 }} size={14} color={Colors.brand.midnight}>Please fix the following before continuing</Text>
107
+ <View float style={{ margin:20, borderRadius:8, padding:20 }}>
108
+ <Text style={{ marginBottom:10 }} theme='h2'>Please fix the following before continuing</Text>
105
109
  {errors.map(e => {
106
110
  return (
107
- <Text size={14} color={Colors.utility.warning}>{e}</Text>
111
+ <Text size={14} color={Colors.text.warning}>{e}</Text>
108
112
  )
109
113
  })}
110
114
  </View>
111
115
  :<></>}
112
- </ScrollView>
116
+ </View>
113
117
  {code_details && code_details.code_request?.pending_deposit && code_details.promo && code_details.referrer && ['referral_code','referral_sweepstakes'].includes(code_details.promo.type) ?
114
- <View style={{ margin:15, flexDirection:'row', backgroundColor:Colors.shades.white, borderRadius:8, ...view_styles.float }}>
118
+ <View style={{ margin:15, flexDirection:'row' }}>
115
119
  <View style={{ justifyContent:'center' }}>
116
120
  {code_details.referrer?.profile_pic?
117
121
  <Image
@@ -120,36 +124,34 @@ const DepositCard = ({ wallet_settings, code_details, account, deposit_limit, on
120
124
  resizeMode='cover'
121
125
  />
122
126
  :
123
- <Icons.GiftIcon size={40} color={Colors.incentive.gold} />
127
+ <Icons.GiftIcon size={40} color={Colors.text.gold} />
124
128
  }
125
129
  </View>
126
- <View style={{flex:1, backgroundColor:Colors.incentive.gold_faded, padding:10 }}>
127
- <Text style={{ paddingBottom:10, borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }} size={14} color={Colors.brand.midnight} weight='bold'>Give back to {code_details.referrer?.username}</Text>
128
- <Text style={{ paddingTop:5 }} size={12} color={Colors.brand.midnight} weight='semibold'>Make a qualifying deposit and {code_details.referrer.username} will receive a reward!</Text>
130
+ <View style={{flex:1, backgroundColor:Colors.absolutes.incentive.gold_faded, padding:10 }}>
131
+ <Text style={{ paddingBottom:10, borderBottomWidth:1, borderBottomColor:Colors.borders.light }} theme='h1'>Give back to {code_details.referrer?.username}</Text>
132
+ <Text style={{ paddingTop:5 }} size={12} theme='h2'>Make a qualifying deposit and {code_details.referrer.username} will receive a reward!</Text>
129
133
  </View>
130
134
  </View>
131
135
  :<></>}
132
- <View nativeID='action_row' style={{ flexDirection:'row', padding:20 }}>
133
- <Button
134
- style={{ flex:1, marginRight:5, opacity: 1 }}
135
- title={'CANCEL'}
136
- title_color={Colors.brand.electric}
137
- borderWidth={1}
138
- borderColor={Colors.brand.electric}
139
- padding={15}
140
- onPress={() => onCancel()}
141
- />
142
- <Button
143
- style={{ flex:3, opacity: errors.length > 0 ? 0.5: 1 }}
144
- disabled={errors.length > 0 ? true : false}
145
- title={'REVIEW DEPOSIT'}
146
- title_color={Colors.shades.white}
147
- backgroundColor={Colors.brand.electric}
148
- padding={15}
149
- onPress={() => handleTransact()}
150
- />
151
- </View>
136
+ <KeyboardAvoidingView behavior={Platform.OS == 'ios' ? 'padding':'height'}>
137
+ <View nativeID='action_row' style={{ flexDirection:'row', padding:20 }}>
138
+ <Button
139
+ style={{ flex:1, marginRight:5, opacity: 1 }}
140
+ title={'CANCEL'}
141
+ type='close'
142
+ onPress={() => onCancel()}
143
+ />
144
+ <Button
145
+ style={{ flex:3, opacity: errors.length > 0 ? 0.5: 1 }}
146
+ disabled={errors.length > 0 ? true : false}
147
+ title={'REVIEW DEPOSIT'}
148
+ type='success'
149
+ onPress={() => handleTransact()}
150
+ />
151
+ </View>
152
+ </KeyboardAvoidingView>
152
153
  </View>
154
+ </TouchableWithoutFeedback>
153
155
  )
154
156
  }
155
157
 
@@ -1,37 +1,38 @@
1
1
  import React, { useState } from 'react';
2
- import { View, TouchableOpacity } from 'react-native';
3
- import { Icons, Text } from '../../Components';
4
- import Colors from '../../constants/colors';
2
+ import { Icons } from '../../Components';
5
3
  import moment from 'moment-mini';
6
4
  import { ItemOrderHelpers } from '../api';
7
5
  import type { ItemOrderProps } from '../../types';
8
6
  import ItemOrderDetails from './ItemOrderDetailCard';
7
+ import { useColors } from '../../constants/useColors';
8
+ import { Button, View, Text } from '../../Components/Themed';
9
9
 
10
10
  type ItemOrderCardProps = {
11
11
  item_order:ItemOrderProps
12
12
  }
13
13
  const ItemOrderCard = ({ item_order }:ItemOrderCardProps) => {
14
+ const Colors = useColors();
14
15
  const [ expanded, setExpanded ] = useState(false);
15
16
 
16
17
  const status_label = ItemOrderHelpers.getStatusLabel(item_order);
17
18
 
18
19
  return (
19
- <View style={{ backgroundColor:expanded?Colors.shades.shade600:undefined, borderRadius:8 }}>
20
- <TouchableOpacity style={{ flex:1, flexDirection:'row', alignItems:'center', padding:10, borderBottomWidth:1, borderBottomColor:Colors.shades.shade100 }} onPress={() => setExpanded(!expanded)}>
21
- <View nativeID='item_order_info' style={{ flex:3, borderRightWidth:1, borderColor:Colors.shades.shade600 }}>
22
- <Text size={14} color={Colors.brand.midnight} weight='semibold'>{item_order.description}</Text>
23
- <Text style={{ marginTop:4 }} size={12} color={Colors.brand.midnight} weight='regular'>Created at {moment(item_order.create_datetime).format('YYYY-MM-DD hh:mm a')}</Text>
20
+ <View float style={{ borderRadius:0 }}>
21
+ <Button style={{ flex:1, flexDirection:'row', alignItems:'center', padding:10, borderRadius:0, borderBottomWidth:1, borderBottomColor:Colors.borders.light }} onPress={() => setExpanded(!expanded)}>
22
+ <View nativeID='item_order_info' style={{ flex:3, borderRightWidth:1, borderColor:Colors.borders.light }}>
23
+ <Text theme='h2'>{item_order.description}</Text>
24
+ <Text style={{ marginTop:4 }} theme='light'>Created at {moment(item_order.create_datetime).format('YYYY-MM-DD hh:mm a')}</Text>
24
25
  </View>
25
26
  <View nativeID='item_order_amount' style={{ flex:1, padding:5 }}>
26
- <Text size={14} color={Colors.brand.midnight} weight='bold' textAlign='center'>${item_order.total_amount.toFixed(2)}</Text>
27
+ <Text size={14} theme='h1' textAlign='center'>${item_order.total_amount.toFixed(2)}</Text>
27
28
  <View style={{ marginTop:3, padding:3, paddingRight:10, paddingLeft:10, backgroundColor:status_label.color, borderRadius:8}}>
28
- <Text color={Colors.shades.white} weight='regular' textAlign='center'>{status_label.text}</Text>
29
+ <Text theme='description' color={Colors.text.white} textAlign='center'>{status_label.text}</Text>
29
30
  </View>
30
31
  </View>
31
32
  <View style={{ padding:10 }}>
32
- <Icons.ChevronIcon direction={expanded?'up':'down'} size={10} color={Colors.brand.midnight}/>
33
+ <Icons.ChevronIcon direction={expanded?'up':'down'} size={8} color={Colors.text.h1}/>
33
34
  </View>
34
- </TouchableOpacity>
35
+ </Button>
35
36
  {expanded ?
36
37
  <View style={{ padding:20 }}>
37
38
  <ItemOrderDetails
@@ -1,16 +1,17 @@
1
1
  import React, { useEffect, useState } from "react"
2
- import { FlatList, View, ActivityIndicator} from "react-native"
3
- import { Text } from '../../Components';
2
+ import { FlatList, ActivityIndicator} from "react-native"
4
3
  import { ItemOrderApi, WalletApi } from '../api';
5
4
  import type { AccountProps, ItemOrderProps, TransactionDetailProps, TransactionProps } from '../../types';
6
- import Colors from '../../constants/colors';
7
5
  import moment from 'moment-mini';
6
+ import { useColors } from "../../constants/useColors";
7
+ import { Text, View } from "../../Components/Themed";
8
8
 
9
9
  type ItemOrderDetailsProps = {
10
10
  item_order: ItemOrderProps,
11
11
  }
12
12
 
13
13
  const ItemOrderDetails = ({ item_order }:ItemOrderDetailsProps) => {
14
+ const Colors = useColors();
14
15
  const [ loading, setLoading ] = useState(false);
15
16
  const [ data, setData ] = useState<{
16
17
  account?:AccountProps,
@@ -43,8 +44,8 @@ const ItemOrderDetails = ({ item_order }:ItemOrderDetailsProps) => {
43
44
  const renderTransactionDetails = (data : { item:TransactionDetailProps, index:number }) => {
44
45
  return (
45
46
  <View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
46
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='regular'>{data.item.description}</Text>
47
- <Text size={14} color={Colors.brand.midnight} weight="bold">${data.item.amount.toFixed(2)}</Text>
47
+ <Text style={{ flex:1 }} theme="description">{data.item.description}</Text>
48
+ <Text size={14} theme="h1">${data.item.amount.toFixed(2)}</Text>
48
49
  </View>
49
50
  )
50
51
  }
@@ -58,40 +59,40 @@ const ItemOrderDetails = ({ item_order }:ItemOrderDetailsProps) => {
58
59
 
59
60
 
60
61
  return (
61
- <View nativeID="item_order_details">
62
+ <View float style={{ padding:5 }}>
62
63
  {account ?
63
- <View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
64
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='regular'>Account</Text>
65
- <Text size={14} color={Colors.brand.midnight} weight="bold">{account.account_label}</Text>
64
+ <View transparent style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
65
+ <Text style={{ flex:1 }} theme="description">Account</Text>
66
+ <Text size={14} theme="h1">{account.account_label}</Text>
66
67
  </View>
67
68
  :<></>}
68
69
  {loading ?
69
- <ActivityIndicator size='small' color={Colors.brand.midnight} />
70
+ <ActivityIndicator size='small' color={Colors.text.h1} />
70
71
  :<></>}
71
72
  <FlatList
72
73
  data={transaction_details}
73
74
  renderItem={renderTransactionDetails}
74
75
  />
75
76
  {transaction?.status == 'posted' && transaction?.estimated_settle_datetime && moment().isBefore(moment(transaction.estimated_settle_datetime)) ?
76
- <View>
77
- <View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
78
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='regular'>Estimated Settle Time</Text>
79
- <Text size={14} color={Colors.brand.midnight} weight="bold">{moment(transaction.estimated_settle_datetime).format('MM/DD @ h a')}</Text>
77
+ <View transparent>
78
+ <View transparent style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
79
+ <Text style={{ flex:1 }} size={14} theme="h2">Estimated Settle Time</Text>
80
+ <Text size={14} theme="h1">{moment(transaction.estimated_settle_datetime).format('MM/DD @ h a')}</Text>
80
81
  </View>
81
82
  {unsettled > 0 ?
82
- <View style={{ padding:10, backgroundColor:Colors.shades.shade100, borderRadius:8, marginTop:10 }}>
83
- <View style={{ flexDirection:'row', alignItems:'center' }}>
84
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='regular'>Awaiting Settlement</Text>
85
- <Text size={14} color={Colors.utility.warning} weight="bold">${unsettled.toFixed(2)}</Text>
83
+ <View transparent style={{ padding:10, borderRadius:8, marginTop:10 }}>
84
+ <View transparent style={{ flexDirection:'row', alignItems:'center' }}>
85
+ <Text style={{ flex:1 }} theme="h2">Awaiting Settlement</Text>
86
+ <Text size={14} color={Colors.text.warning} weight="bold">${unsettled.toFixed(2)}</Text>
86
87
  </View>
87
- <Text style={{ marginTop:10 }} size={12} color={Colors.brand.midnight} weight='regular'>This amount exceeded your <Text size={12} weight='bold'>Instant Deposit Limit</Text> and will be added to your wallet after the transaction settles based on the date noted above.</Text>
88
+ <Text style={{ marginTop:10 }} theme="description">This amount exceeded your <Text size={12} weight='bold'>Instant Deposit Limit</Text> and will be added to your wallet after the transaction settles based on the date noted above.</Text>
88
89
  </View>
89
90
  :<></>}
90
91
  </View>
91
92
  :<></>}
92
- {false && item_order.type == 'wallet' && transaction?.status == 'posted' ?
93
- <View style={{ borderRadius:8, backgroundColor:Colors.utility.warning, padding:10, marginTop:10 }}>
94
- <Text size={14} color={Colors.shades.white} weight='semibold' textAlign="center">Deposits in posted status are not eligible for withdraw until they settle.</Text>
93
+ {item_order.type == 'wallet' && transaction?.status == 'posted' ?
94
+ <View style={{ borderRadius:8, backgroundColor:Colors.text.warning, padding:10, marginTop:10 }}>
95
+ <Text size={14} color={Colors.text.white} weight='semibold' textAlign="center">Deposits in posted status are not eligible for withdraw until they settle.</Text>
95
96
  </View>
96
97
  :<></>}
97
98
  </View>