be-components 3.5.4 → 3.5.5

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 (99) hide show
  1. package/lib/commonjs/Bracket/components/BracketCompetitionCard.js +167 -169
  2. package/lib/commonjs/Bracket/components/BracketCompetitionCard.js.map +1 -1
  3. package/lib/commonjs/Bracket/components/BracketCompetitionSelector.js +61 -49
  4. package/lib/commonjs/Bracket/components/BracketCompetitionSelector.js.map +1 -1
  5. package/lib/commonjs/Bracket/components/BracketPlay/BracketRound.js +9 -11
  6. package/lib/commonjs/Bracket/components/BracketPlay/BracketRound.js.map +1 -1
  7. package/lib/commonjs/Bracket/components/BracketPlay/RoundEvent.js +87 -90
  8. package/lib/commonjs/Bracket/components/BracketPlay/RoundEvent.js.map +1 -1
  9. package/lib/commonjs/Bracket/components/BracketPlay/index.js +45 -53
  10. package/lib/commonjs/Bracket/components/BracketPlay/index.js.map +1 -1
  11. package/lib/commonjs/Bracket/components/BracketSelector.js +35 -29
  12. package/lib/commonjs/Bracket/components/BracketSelector.js.map +1 -1
  13. package/lib/commonjs/Bracket/components/CompetitionLeaderboard.js +53 -56
  14. package/lib/commonjs/Bracket/components/CompetitionLeaderboard.js.map +1 -1
  15. package/lib/commonjs/Bracket/components/PlayerBracketManager.js +110 -133
  16. package/lib/commonjs/Bracket/components/PlayerBracketManager.js.map +1 -1
  17. package/lib/commonjs/Bracket/components/PlayerBrackets.js +41 -31
  18. package/lib/commonjs/Bracket/components/PlayerBrackets.js.map +1 -1
  19. package/lib/commonjs/Bracket/components/RoomMenu.js +21 -19
  20. package/lib/commonjs/Bracket/components/RoomMenu.js.map +1 -1
  21. package/lib/commonjs/Bracket/index.js +3 -5
  22. package/lib/commonjs/Bracket/index.js.map +1 -1
  23. package/lib/module/Bracket/components/BracketCompetitionCard.js +110 -112
  24. package/lib/module/Bracket/components/BracketCompetitionCard.js.map +1 -1
  25. package/lib/module/Bracket/components/BracketCompetitionSelector.js +41 -29
  26. package/lib/module/Bracket/components/BracketCompetitionSelector.js.map +1 -1
  27. package/lib/module/Bracket/components/BracketPlay/BracketRound.js +3 -5
  28. package/lib/module/Bracket/components/BracketPlay/BracketRound.js.map +1 -1
  29. package/lib/module/Bracket/components/BracketPlay/RoundEvent.js +53 -56
  30. package/lib/module/Bracket/components/BracketPlay/RoundEvent.js.map +1 -1
  31. package/lib/module/Bracket/components/BracketPlay/index.js +31 -39
  32. package/lib/module/Bracket/components/BracketPlay/index.js.map +1 -1
  33. package/lib/module/Bracket/components/BracketSelector.js +26 -20
  34. package/lib/module/Bracket/components/BracketSelector.js.map +1 -1
  35. package/lib/module/Bracket/components/CompetitionLeaderboard.js +34 -36
  36. package/lib/module/Bracket/components/CompetitionLeaderboard.js.map +1 -1
  37. package/lib/module/Bracket/components/PlayerBracketManager.js +56 -78
  38. package/lib/module/Bracket/components/PlayerBracketManager.js.map +1 -1
  39. package/lib/module/Bracket/components/PlayerBrackets.js +29 -19
  40. package/lib/module/Bracket/components/PlayerBrackets.js.map +1 -1
  41. package/lib/module/Bracket/components/RoomMenu.js +15 -13
  42. package/lib/module/Bracket/components/RoomMenu.js.map +1 -1
  43. package/lib/module/Bracket/index.js +2 -4
  44. package/lib/module/Bracket/index.js.map +1 -1
  45. package/lib/typescript/lib/commonjs/Bracket/components/BracketCompetitionCard.d.ts.map +1 -1
  46. package/lib/typescript/lib/commonjs/Bracket/components/BracketCompetitionSelector.d.ts.map +1 -1
  47. package/lib/typescript/lib/commonjs/Bracket/components/BracketPlay/BracketRound.d.ts.map +1 -1
  48. package/lib/typescript/lib/commonjs/Bracket/components/BracketPlay/RoundEvent.d.ts.map +1 -1
  49. package/lib/typescript/lib/commonjs/Bracket/components/BracketPlay/index.d.ts.map +1 -1
  50. package/lib/typescript/lib/commonjs/Bracket/components/BracketSelector.d.ts.map +1 -1
  51. package/lib/typescript/lib/commonjs/Bracket/components/CompetitionLeaderboard.d.ts.map +1 -1
  52. package/lib/typescript/lib/commonjs/Bracket/components/PlayerBracketManager.d.ts.map +1 -1
  53. package/lib/typescript/lib/commonjs/Bracket/components/PlayerBrackets.d.ts.map +1 -1
  54. package/lib/typescript/lib/commonjs/Bracket/components/RoomMenu.d.ts.map +1 -1
  55. package/lib/typescript/lib/commonjs/Bracket/index.d.ts.map +1 -1
  56. package/lib/typescript/lib/module/Bracket/components/BracketCompetitionCard.d.ts +1 -2
  57. package/lib/typescript/lib/module/Bracket/components/BracketCompetitionCard.d.ts.map +1 -1
  58. package/lib/typescript/lib/module/Bracket/components/BracketCompetitionSelector.d.ts +1 -2
  59. package/lib/typescript/lib/module/Bracket/components/BracketCompetitionSelector.d.ts.map +1 -1
  60. package/lib/typescript/lib/module/Bracket/components/BracketPlay/BracketRound.d.ts +1 -2
  61. package/lib/typescript/lib/module/Bracket/components/BracketPlay/BracketRound.d.ts.map +1 -1
  62. package/lib/typescript/lib/module/Bracket/components/BracketPlay/RoundEvent.d.ts +1 -2
  63. package/lib/typescript/lib/module/Bracket/components/BracketPlay/RoundEvent.d.ts.map +1 -1
  64. package/lib/typescript/lib/module/Bracket/components/BracketPlay/index.d.ts +1 -2
  65. package/lib/typescript/lib/module/Bracket/components/BracketPlay/index.d.ts.map +1 -1
  66. package/lib/typescript/lib/module/Bracket/components/BracketSelector.d.ts +1 -2
  67. package/lib/typescript/lib/module/Bracket/components/BracketSelector.d.ts.map +1 -1
  68. package/lib/typescript/lib/module/Bracket/components/CompetitionLeaderboard.d.ts +1 -2
  69. package/lib/typescript/lib/module/Bracket/components/CompetitionLeaderboard.d.ts.map +1 -1
  70. package/lib/typescript/lib/module/Bracket/components/PlayerBracketManager.d.ts +1 -2
  71. package/lib/typescript/lib/module/Bracket/components/PlayerBracketManager.d.ts.map +1 -1
  72. package/lib/typescript/lib/module/Bracket/components/PlayerBrackets.d.ts +1 -2
  73. package/lib/typescript/lib/module/Bracket/components/PlayerBrackets.d.ts.map +1 -1
  74. package/lib/typescript/lib/module/Bracket/components/RoomMenu.d.ts +1 -2
  75. package/lib/typescript/lib/module/Bracket/components/RoomMenu.d.ts.map +1 -1
  76. package/lib/typescript/lib/module/Bracket/index.d.ts +1 -2
  77. package/lib/typescript/lib/module/Bracket/index.d.ts.map +1 -1
  78. package/lib/typescript/src/Bracket/components/BracketCompetitionCard.d.ts.map +1 -1
  79. package/lib/typescript/src/Bracket/components/BracketCompetitionSelector.d.ts.map +1 -1
  80. package/lib/typescript/src/Bracket/components/BracketPlay/BracketRound.d.ts.map +1 -1
  81. package/lib/typescript/src/Bracket/components/BracketPlay/RoundEvent.d.ts.map +1 -1
  82. package/lib/typescript/src/Bracket/components/BracketSelector.d.ts.map +1 -1
  83. package/lib/typescript/src/Bracket/components/CompetitionLeaderboard.d.ts.map +1 -1
  84. package/lib/typescript/src/Bracket/components/PlayerBracketManager.d.ts.map +1 -1
  85. package/lib/typescript/src/Bracket/components/PlayerBrackets.d.ts.map +1 -1
  86. package/lib/typescript/src/Bracket/components/RoomMenu.d.ts.map +1 -1
  87. package/lib/typescript/src/Bracket/index.d.ts.map +1 -1
  88. package/package.json +1 -1
  89. package/src/Bracket/components/BracketCompetitionCard.tsx +85 -98
  90. package/src/Bracket/components/BracketCompetitionSelector.tsx +37 -36
  91. package/src/Bracket/components/BracketPlay/BracketRound.tsx +3 -6
  92. package/src/Bracket/components/BracketPlay/RoundEvent.tsx +39 -39
  93. package/src/Bracket/components/BracketPlay/index.tsx +28 -28
  94. package/src/Bracket/components/BracketSelector.tsx +21 -21
  95. package/src/Bracket/components/CompetitionLeaderboard.tsx +35 -36
  96. package/src/Bracket/components/PlayerBracketManager.tsx +55 -59
  97. package/src/Bracket/components/PlayerBrackets.tsx +26 -25
  98. package/src/Bracket/components/RoomMenu.tsx +16 -15
  99. package/src/Bracket/index.tsx +2 -3
@@ -1,11 +1,10 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { FlatList, View, TouchableOpacity, Image, ScrollView, ActivityIndicator } from 'react-native';
2
+ import { FlatList, Image, ScrollView, ActivityIndicator } from 'react-native';
3
3
  import type { AthleteProps, CompetitionPlayerBracketProps, PlayerBracketProps, PublicPlayerProps, TeamProps } from '../../types';
4
4
  import { BracketApi, BracketComeptitionApi } from '../api';
5
- import Colors from '../../constants/colors';
6
- import { Button, Text } from '../../Components';
7
5
  import { CompetitionHelpers } from '../../Competition/api';
8
- import { view_styles } from '../../constants/styles';
6
+ import { Button, Text, View } from '../../Components/Themed';
7
+ import { useColors } from '../../constants/useColors';
9
8
 
10
9
  type CompetitionLeaderboardProps = {
11
10
  bracket_competition_id:string,
@@ -18,6 +17,7 @@ type CompetitionLeaderboardProps = {
18
17
  }
19
18
 
20
19
  const CompetitionLeaderboard = ({ bracket_competition_id, my_competition_player_brackets, my_player_brackets, view_mode, show_champions, onViewFull, onClose }:CompetitionLeaderboardProps) => {
20
+ const Colors = useColors();
21
21
  const [ leaders_data, setData ] = useState<{
22
22
  loading:boolean,
23
23
  offset:number,
@@ -74,23 +74,23 @@ const CompetitionLeaderboard = ({ bracket_competition_id, my_competition_player_
74
74
  if(show_champions && player_bracket.champion_id_type == 'team'){ champ_team = teams.find(t => t.team_id == player_bracket.champion_id) }
75
75
  if(show_champions && player_bracket.champion_id_type == 'athlete'){ champ_athlete = athletes.find(t => t.athlete_id == player_bracket.champion_id) }
76
76
  return (
77
- <TouchableOpacity style={{ flexDirection:'row', alignItems:'center', borderRadius:22, margin:6, backgroundColor:Colors.shades.white, padding:4 }}>
78
- <View style={{ padding:5 }}>
79
- <Text size={14} color={Colors.brand.midnight} weight='bold'>{CompetitionHelpers.formatPlace(data.item.place)}</Text>
77
+ <Button float style={{ flexDirection:'row', alignItems:'center', borderRadius:22, margin:6, padding:4 }}>
78
+ <View transparent style={{ padding:5 }}>
79
+ <Text size={14} theme='h1'>{CompetitionHelpers.formatPlace(data.item.place)}</Text>
80
80
  </View>
81
- <View>
81
+ <View transparent>
82
82
  <Image
83
83
  source={{ uri: player.profile_pic }}
84
84
  style={{ height:40, width:40, borderRadius:100 }}
85
85
  resizeMode='cover'
86
86
  />
87
87
  </View>
88
- <View style={{ flex:1, marginLeft:5, marginRight:5 }}>
89
- <Text size={14} weight='bold' color={Colors.brand.midnight}>{player_bracket.bracket_name}</Text>
90
- <Text style={{ marginTop:3 }} size={12} weight='regular' color={Colors.brand.slate}>{data.item.points_scored} Points ({data.item.possible_points} Possible)</Text>
88
+ <View transparent style={{ flex:1, marginLeft:5, marginRight:5 }}>
89
+ <Text size={14} theme='h1'>{player_bracket.bracket_name}</Text>
90
+ <Text style={{ marginTop:3 }} size={12} theme='light'>{data.item.points_scored} Points ({data.item.possible_points} Possible)</Text>
91
91
  </View>
92
92
  {champ_team ?
93
- <View style={{ padding:5 }}>
93
+ <View transparent style={{ padding:5 }}>
94
94
  <Image
95
95
  source={{ uri: champ_team.image?.url }}
96
96
  style={{ height:25, width:25, borderRadius:4 }}
@@ -98,7 +98,7 @@ const CompetitionLeaderboard = ({ bracket_competition_id, my_competition_player_
98
98
  />
99
99
  </View>
100
100
  :champ_athlete ?
101
- <View style={{ padding:5 }}>
101
+ <View transparent style={{ padding:5 }}>
102
102
  <Image
103
103
  source={{ uri: champ_athlete.image?.url }}
104
104
  style={{ height:25, width:25, borderRadius:4 }}
@@ -106,10 +106,10 @@ const CompetitionLeaderboard = ({ bracket_competition_id, my_competition_player_
106
106
  />
107
107
  </View>
108
108
  :<></>}
109
- <View style={{ padding:5 }}>
110
- <Text size={14} color={Colors.brand.midnight} weight='semibold'>${data.item.winnings.toFixed(2)}</Text>
109
+ <View transparent style={{ padding:5 }}>
110
+ <Text size={14} theme='h2'>${data.item.winnings.toFixed(2)}</Text>
111
111
  </View>
112
- </TouchableOpacity>
112
+ </Button>
113
113
  )
114
114
  }
115
115
 
@@ -117,9 +117,9 @@ const CompetitionLeaderboard = ({ bracket_competition_id, my_competition_player_
117
117
  <View style={{ flex:1 }}>
118
118
  <ScrollView style={{ flex:1 }}>
119
119
  {my_competition_player_brackets.length > 0 ?
120
- <View style={{ backgroundColor:Colors.brand.midnight, padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
121
- <View style={{ marginBottom:5 }}>
122
- <Text size={14} color={Colors.shades.white}>MY RESULTS</Text>
120
+ <View style={{ padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
121
+ <View transparent style={{ marginBottom:5 }}>
122
+ <Text size={14} color={Colors.text.h1}>MY RESULTS</Text>
123
123
  </View>
124
124
  <FlatList
125
125
  data={my_competition_player_brackets}
@@ -128,12 +128,12 @@ const CompetitionLeaderboard = ({ bracket_competition_id, my_competition_player_
128
128
  />
129
129
  </View>
130
130
  :<></>}
131
- <View style={{ padding:10, backgroundColor:Colors.shades.shade100, borderRadius:8 }}>
131
+ <View style={{ padding:10, borderRadius:8 }}>
132
132
  <View style={{ marginBottom:5 }}>
133
- <Text size={14} color={Colors.brand.midnight}>RESULTS</Text>
133
+ <Text size={14} theme='h2'>RESULTS</Text>
134
134
  </View>
135
135
  {loading ?
136
- <ActivityIndicator size='large' color={Colors.brand.midnight} style={{ padding:25, alignSelf:'center' }} />
136
+ <ActivityIndicator size='large' color={Colors.text.h1} style={{ padding:25, alignSelf:'center' }} />
137
137
  :
138
138
  <FlatList
139
139
  data={visible_leaders}
@@ -145,38 +145,37 @@ const CompetitionLeaderboard = ({ bracket_competition_id, my_competition_player_
145
145
  <View style={{ padding:10 }}>
146
146
  <Button
147
147
  title='View Full Leaderboard'
148
- title_color={Colors.brand.electric}
149
- backgroundColor='transparent'
148
+ type='text'
150
149
  onPress={() => onViewFull()}
151
150
  />
152
151
  </View>
153
152
  :<></>}
154
153
  </ScrollView>
155
154
  {onClose ?
156
- <View style={{ padding:10, ...view_styles.float }}>
155
+ <View>
157
156
  <View style={{ padding:10, flexDirection:'row', alignItems:'center', justifyContent:'space-between' }}>
158
157
  {offset > 0 ?
159
158
  <Button
160
159
  title='PREV'
161
- title_color={Colors.brand.electric}
162
- backgroundColor='transparent'
160
+ type='text'
163
161
  onPress={() => getLeaders(bracket_competition_id, offset - 1)}
164
162
  />
165
163
  :<View/>}
166
164
  <Button
167
165
  title='NEXT'
168
- title_color={Colors.brand.electric}
169
- backgroundColor='transparent'
166
+ type='text'
170
167
  onPress={() => getLeaders(bracket_competition_id, offset + 1)}
171
168
  />
172
169
  </View>
173
- <Button
174
- title='Close'
175
- style={{ padding:15 }}
176
- title_color={Colors.shades.white}
177
- backgroundColor={Colors.utility.error}
178
- onPress={() => onClose()}
179
- />
170
+ <View type='footer' style={{ padding:10 }}>
171
+
172
+ <Button
173
+ title='Close'
174
+ style={{ padding:15 }}
175
+ type='error'
176
+ onPress={() => onClose()}
177
+ />
178
+ </View>
180
179
  </View>
181
180
  :<></>}
182
181
  </View>
@@ -1,9 +1,10 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { View, TouchableOpacity, FlatList, Image, ScrollView } from "react-native";
2
+ import { FlatList, Image, ScrollView } from "react-native";
3
3
  import type { AthleteProps, BracketCompetitionProps, CompetitionPlayerBracketProps, PlayerBracketProps, TeamProps } from '../../types';
4
- import Colors from '../../constants/colors';
5
- import { Button, Icons, Text, TextInput } from '../../Components';
4
+ import { Icons } from '../../Components';
6
5
  import { BracketComeptitionApi, BracketCompetitionHelpers } from '../api';
6
+ import { Button, Text, TextInput, View } from '../../Components/Themed';
7
+ import { useColors } from '../../constants/useColors';
7
8
 
8
9
  type PlayerBracketManagerProps = {
9
10
  visible:boolean,
@@ -20,6 +21,7 @@ type PlayerBracketManagerProps = {
20
21
  }
21
22
 
22
23
  const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracket_competitions, competition_player_brackets, onEditPicks, onSelectCompetition, onUpdateBracket, onClose }:PlayerBracketManagerProps) => {
24
+ const Colors = useColors();
23
25
  const [ search_value, setSearchValue ] = useState('');
24
26
  const [ search_error, setSearchError ] = useState<string|undefined>(undefined)
25
27
  const [ info_expanded, setInfoExpanded ] = useState(true);
@@ -53,7 +55,7 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
53
55
  const renderCompetitions = (data: { item:BracketCompetitionProps, index:number }) => {
54
56
  const payout = BracketCompetitionHelpers.getPayout(data.item)
55
57
  return (
56
- <TouchableOpacity style={{ flexDirection:'row', alignItems:'center', padding:10, borderBottomWidth:1, borderColor:Colors.shades.shade600 }}
58
+ <Button style={{ flexDirection:'row', alignItems:'center', padding:10, borderBottomWidth:1, borderColor:Colors.borders.light }}
57
59
  onPress={() => onSelectCompetition(data.item)}>
58
60
  <View>
59
61
  <Image
@@ -63,15 +65,15 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
63
65
  />
64
66
  </View>
65
67
  <View style={{ flex:1, marginLeft:5 }}>
66
- <Text size={14} color={Colors.brand.midnight} weight='bold'>{data.item.competition_name}</Text>
67
- <Text style={{ marginTop:5 }} size={14} color={Colors.brand.midnight} weight='regular'>Current Payout: ${payout.toFixed(2)}</Text>
68
+ <Text size={14} theme='h1'>{data.item.competition_name}</Text>
69
+ <Text style={{ marginTop:5 }} size={14} theme='description'>Current Payout: ${payout.toFixed(2)}</Text>
68
70
  </View>
69
71
  <View style={{ padding:10 }}>
70
- <Text size={16} weight='bold' color={Colors.brand.midnight} textAlign='center'>${data.item.buy_in}</Text>
71
- <Text style={{ marginTop:5 }} size={12} weight='bold' color={Colors.brand.slate} textAlign='center'>{data.item.tickets_sold} / {data.item.max_brackets}</Text>
72
+ <Text size={16} theme='h1' textAlign='center'>${data.item.buy_in}</Text>
73
+ <Text style={{ marginTop:5 }} size={12} weight='bold' theme='light' textAlign='center'>{data.item.tickets_sold} / {data.item.max_brackets}</Text>
72
74
  </View>
73
- <Icons.ChevronIcon direction='right' color={Colors.brand.midnight} size={12} />
74
- </TouchableOpacity>
75
+ <Icons.ChevronIcon direction='right' color={Colors.text.h1} size={12} />
76
+ </Button>
75
77
  )
76
78
  }
77
79
 
@@ -79,7 +81,7 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
79
81
  const bracket_competition = bracket_competitions.find(c => c.bracket_competition_id == data.item.bracket_competition_id);
80
82
  if(!bracket_competition){ return <></> }
81
83
  return (
82
- <TouchableOpacity style={{ flexDirection:'row', alignItems:'center', padding:10, borderBottomWidth:1, borderColor:Colors.shades.shade600 }}
84
+ <Button style={{ flexDirection:'row', alignItems:'center', padding:10, borderBottomWidth:1, borderColor:Colors.borders.light }}
83
85
  onPress={() => onSelectCompetition(bracket_competition)}>
84
86
  <View>
85
87
  <Image
@@ -89,15 +91,15 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
89
91
  />
90
92
  </View>
91
93
  <View style={{ flex:1, marginLeft:5 }}>
92
- <Text size={14} color={Colors.brand.midnight} weight='bold'>{bracket_competition.competition_name}</Text>
93
- <Text style={{ marginTop:5 }} size={14} color={Colors.brand.midnight} weight='regular'>{data.item.points_scored} Points ({data.item.possible_points} possible)</Text>
94
+ <Text size={14} theme='h1'>{bracket_competition.competition_name}</Text>
95
+ <Text style={{ marginTop:5 }} size={14} theme='description'>{data.item.points_scored} Points ({data.item.possible_points} possible)</Text>
94
96
  </View>
95
97
  <View style={{ padding:10 }}>
96
- <Text size={16} weight='bold' color={Colors.brand.midnight} textAlign='center'>{BracketCompetitionHelpers.formatPlace(data.item.place)}</Text>
97
- <Text style={{ marginTop:5 }} size={12} weight='bold' color={Colors.brand.slate} textAlign='center'>${data.item.winnings.toFixed(2)}</Text>
98
+ <Text size={16} weight='bold' theme='h1'>{BracketCompetitionHelpers.formatPlace(data.item.place)}</Text>
99
+ <Text style={{ marginTop:5 }} size={12} weight='bold' theme='light' textAlign='center'>${data.item.winnings.toFixed(2)}</Text>
98
100
  </View>
99
- <Icons.ChevronIcon direction='right' color={Colors.brand.midnight} size={12} />
100
- </TouchableOpacity>
101
+ <Icons.ChevronIcon direction='right' color={Colors.text.h1} size={12} />
102
+ </Button>
101
103
  )
102
104
  }
103
105
 
@@ -110,24 +112,24 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
110
112
 
111
113
  return (
112
114
  <View style={{ flex:1 }}>
113
- <TouchableOpacity style={{ flexDirection:'row', alignItems:'center', padding:20, borderBottomWidth:1, borderColor:Colors.shades.shade100 }} onPress={() => onClose()}>
114
- <Icons.ChevronIcon direction='left' size={12} color={Colors.brand.midnight} />
115
+ <Button style={{ flexDirection:'row', alignItems:'center', padding:20, borderBottomWidth:1, borderColor:Colors.borders.light }} onPress={() => onClose()}>
116
+ <Icons.ChevronIcon direction='left' size={12} color={Colors.text.h1} />
115
117
  <View style={{ flex:1, marginLeft:20 }}>
116
- <Text size={18} color={Colors.brand.midnight} weight='bold'>{player_bracket.bracket_name}</Text>
117
- <Text style={{ marginTop:4 }} size={14} color={Colors.brand.slate} weight='regular'>Manage your bracket and enter competitions</Text>
118
+ <Text size={18} theme='h1'>{player_bracket.bracket_name}</Text>
119
+ <Text style={{ marginTop:4 }} size={14} theme='light'>Manage your bracket and enter competitions</Text>
118
120
  </View>
119
- </TouchableOpacity>
121
+ </Button>
120
122
  <ScrollView style={{ flex:1}}>
121
123
 
122
124
  <View nativeID='bracket_info'>
123
- <TouchableOpacity style={{ padding:20, flexDirection:'row', alignItems:'center', backgroundColor:Colors.shades.shade100 }} onPress={() => setInfoExpanded(!info_expanded)}>
124
- <Text style={{flex:1}} size={16} color={Colors.brand.midnight} weight='bold'>Bracket Details</Text>
125
- <Icons.ChevronIcon direction={info_expanded?'up':'down'} color={Colors.brand.midnight} size={10} />
126
- </TouchableOpacity>
125
+ <Button style={{ padding:20, flexDirection:'row', alignItems:'center'}} onPress={() => setInfoExpanded(!info_expanded)}>
126
+ <Text style={{flex:1}} size={16} theme='h1'>Bracket Details</Text>
127
+ <Icons.ChevronIcon direction={info_expanded?'up':'down'} color={Colors.text.h1} size={10} />
128
+ </Button>
127
129
  {info_expanded ?
128
- <View style={{ padding:10, borderRadius:8, backgroundColor:Colors.shades.white }}>
130
+ <View style={{ padding:10, borderRadius:8 }}>
129
131
  <View style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
130
- <Text style={{ flex:1 }} size={14} weight='bold' color={Colors.brand.midnight}>Name</Text>
132
+ <Text style={{ flex:1 }} size={14} weight='bold' color={Colors.text.h1}>Name</Text>
131
133
  <TextInput
132
134
  editable={player_bracket.status == 'active' ? true : false}
133
135
  value={draft_bracket.bracket_name}
@@ -136,11 +138,11 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
136
138
  />
137
139
  </View>
138
140
  <View style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
139
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='bold'>% Complete</Text>
140
- <Text size={14} color={Colors.brand.midnight} weight='bold'>{(player_bracket.completion_pct * 100).toFixed(2)}%</Text>
141
+ <Text style={{ flex:1 }} size={14} theme='h1'>% Complete</Text>
142
+ <Text size={14} theme='h1'>{(player_bracket.completion_pct * 100).toFixed(2)}%</Text>
141
143
  </View>
142
144
  <View style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
143
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='bold'>Champion</Text>
145
+ <Text style={{ flex:1 }} size={14} theme='h1'>Champion</Text>
144
146
  {player_bracket.champion_id_type == 'team' && champion_team ?
145
147
  <View style={{ flexDirection:'row', alignItems:'center' }}>
146
148
  <Image
@@ -148,7 +150,7 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
148
150
  style={{ height:25, width:25, marginRight:10 }}
149
151
  resizeMode='cover'
150
152
  />
151
- <Text size={14} color={Colors.brand.midnight} weight='bold'>{champion_team.market_name} {champion_team.name}</Text>
153
+ <Text size={14} theme='h1'>{champion_team.market_name} {champion_team.name}</Text>
152
154
  </View>
153
155
  :player_bracket.champion_id_type == 'athlete' && champion_athlete ?
154
156
  <View style={{ flexDirection:'row', alignItems:'center' }}>
@@ -157,7 +159,7 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
157
159
  style={{ height:25, width:25, marginRight:10 }}
158
160
  resizeMode='cover'
159
161
  />
160
- <Text size={14} color={Colors.brand.midnight} weight='bold'>{champion_athlete.first_name} {champion_athlete.last_name}</Text>
162
+ <Text size={14} theme='h1'>{champion_athlete.first_name} {champion_athlete.last_name}</Text>
161
163
  </View>
162
164
  :<></>}
163
165
  </View>
@@ -168,8 +170,7 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
168
170
  <Button
169
171
  title='DELETE'
170
172
  style={{ marginRight:4 }}
171
- title_color={Colors.shades.white}
172
- backgroundColor={Colors.utility.error}
173
+ type='error'
173
174
  onPress={async() => {
174
175
  const new_b = await BracketComeptitionApi.deletePlayerBracket(draft_bracket.player_bracket_id);
175
176
  onUpdateBracket(new_b)
@@ -179,8 +180,7 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
179
180
  {is_changed ?
180
181
  <Button
181
182
  title='SAVE'
182
- title_color={Colors.shades.white}
183
- backgroundColor={Colors.utility.success}
183
+ type='success'
184
184
  onPress={async() => {
185
185
  const new_b = await BracketComeptitionApi.updatePlayerBracket(draft_bracket);
186
186
  onUpdateBracket(new_b)
@@ -189,8 +189,7 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
189
189
  : player_bracket.status == 'active' ?
190
190
  <Button
191
191
  title='UPDATE PICKS'
192
- title_color={Colors.shades.white}
193
- backgroundColor={Colors.brand.electric}
192
+ type='info'
194
193
  onPress={() => onEditPicks(player_bracket)}
195
194
  />
196
195
  :<></>}
@@ -198,9 +197,9 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
198
197
  </View>
199
198
  :<></>}
200
199
  {player_bracket.status == 'deleted' ?
201
- <View style={{ position:'absolute', top:0, bottom:0, left:0, right:0, backgroundColor:Colors.shades.black_faded_heavy, justifyContent:'center', alignItems:'center' }}>
202
- <View style={{ borderRadius:8, backgroundColor:Colors.shades.white, height:120, width:200, padding:10, justifyContent:'center', alignItems:'center' }}>
203
- <Text size={18} weight='bold' color={Colors.utility.error}>DELETED!</Text>
200
+ <View type='blur' style={{ position:'absolute', top:0, bottom:0, left:0, right:0, justifyContent:'center', alignItems:'center' }}>
201
+ <View float style={{ borderRadius:8, height:120, width:200, padding:10, justifyContent:'center', alignItems:'center' }}>
202
+ <Text size={18} weight='bold' color={Colors.text.error}>DELETED!</Text>
204
203
  </View>
205
204
  </View>
206
205
  :<></>}
@@ -208,15 +207,15 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
208
207
  {player_bracket.status != 'deleted' ?
209
208
  <View>
210
209
  <View nativeID='competitions'>
211
- <View style={{ padding:10, paddingLeft:20, flexDirection:'row', alignItems:'center', backgroundColor:Colors.shades.shade100 }}>
212
- <Text style={{flex:1}} size={16} color={Colors.brand.midnight} weight='bold'>Competitions</Text>
213
- <View style={{ flexDirection:'row', alignItems:'center', borderRadius:22, backgroundColor:Colors.shades.white }}>
214
- <TouchableOpacity style={{ padding:10, borderTopLeftRadius:22, borderBottomLeftRadius:22, backgroundColor:active_comp_toggle=='entered' ? Colors.brand.midnight: 'transparent' }} onPress={() => setData({ ...manage_data, active_comp_toggle: 'entered' })}>
215
- <Text size={14} textAlign='center' color={active_comp_toggle=='entered'?Colors.shades.white:Colors.brand.midnight} weight={active_comp_toggle=='entered'?'bold':'regular'}>ENTERED</Text>
216
- </TouchableOpacity>
217
- <TouchableOpacity style={{ padding:10, borderTopRightRadius:22, borderBottomRightRadius:22, backgroundColor:active_comp_toggle=='eligible' ? Colors.brand.midnight: 'transparent' }} onPress={() => setData({ ...manage_data, active_comp_toggle: 'eligible' })}>
218
- <Text size={14} textAlign='center' color={active_comp_toggle=='eligible'?Colors.shades.white:Colors.brand.midnight} weight={active_comp_toggle=='eligible'?'bold':'regular'}>ELIGIBLE</Text>
219
- </TouchableOpacity>
210
+ <View style={{ padding:10, paddingLeft:20, flexDirection:'row', alignItems:'center', backgroundColor:Colors.borders.light }}>
211
+ <Text style={{flex:1}} size={16} theme='h1'>Competitions</Text>
212
+ <View style={{ flexDirection:'row', alignItems:'center', borderRadius:22, backgroundColor:Colors.text.white }}>
213
+ <Button style={{ padding:10, borderTopLeftRadius:22, borderBottomLeftRadius:22, backgroundColor:active_comp_toggle=='entered' ? Colors.absolutes.brand.midnight: 'transparent' }} onPress={() => setData({ ...manage_data, active_comp_toggle: 'entered' })}>
214
+ <Text size={14} textAlign='center' color={active_comp_toggle=='entered'?Colors.text.white:Colors.absolutes.brand.midnight} weight={active_comp_toggle=='entered'?'bold':'regular'}>ENTERED</Text>
215
+ </Button>
216
+ <Button style={{ padding:10, borderTopRightRadius:22, borderBottomRightRadius:22, backgroundColor:active_comp_toggle=='eligible' ? Colors.absolutes.brand.midnight: 'transparent' }} onPress={() => setData({ ...manage_data, active_comp_toggle: 'eligible' })}>
217
+ <Text size={14} textAlign='center' color={active_comp_toggle=='eligible'?Colors.text.white:Colors.absolutes.brand.midnight} weight={active_comp_toggle=='eligible'?'bold':'regular'}>ELIGIBLE</Text>
218
+ </Button>
220
219
  </View>
221
220
  </View>
222
221
  </View>
@@ -229,10 +228,10 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
229
228
  />
230
229
  : active_comp_toggle == 'eligible' ?
231
230
  <View>
232
- <View style={{ padding:20, borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }}>
231
+ <View style={{ padding:20, borderBottomWidth:1, borderBottomColor:Colors.borders.light }}>
233
232
  <View style={{ marginBottom:10 }}>
234
- <Text size={14} color={Colors.brand.midnight} weight='semibold'>Have a private code?</Text>
235
- <Text style={{ marginTop:3 }} size={12} color={Colors.brand.slate}>Enter it below and select search. If found, we will send you to the competition.</Text>
233
+ <Text size={14} theme='h2'>Have a private code?</Text>
234
+ <Text style={{ marginTop:3 }} size={12} theme='light'>Enter it below and select search. If found, we will send you to the competition.</Text>
236
235
  </View>
237
236
  <View style={{ flexDirection:'row', alignItems:'center' }}>
238
237
  <TextInput
@@ -243,21 +242,18 @@ const PlayerBracketManager = ({ visible, teams, athletes, player_bracket, bracke
243
242
  setSearchValue(text)
244
243
  }}
245
244
  placeholder='Search or Enter Private Code'
246
- placeholderTextColor={Colors.brand.slate}
247
245
  />
248
246
  {search_value ?
249
247
  <Button
250
248
  title='Find Private'
251
249
  style={{ marginLeft:5 }}
252
- padding={15}
253
- title_color={Colors.shades.white}
254
- backgroundColor={Colors.brand.electric}
250
+ type='info'
255
251
  onPress={() => handleFindPrivate()}
256
252
  />
257
253
  :<></>}
258
254
  </View>
259
255
  {search_error ?
260
- <Text style={{ padding:10 }} size={14} color={Colors.utility.warning} weight='regular' textAlign='center'>{search_error}</Text>
256
+ <Text style={{ padding:10 }} size={14} color={Colors.text.warning} weight='regular' textAlign='center'>{search_error}</Text>
261
257
  :<></>}
262
258
  </View>
263
259
  <FlatList
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- import { View, FlatList, TouchableOpacity, Image, ScrollView } from "react-native"
2
+ import { FlatList, Image, ScrollView } from "react-native"
3
3
  import type { AthleteProps, BracketCompetitionProps, BracketProps, CompetitionPlayerBracketProps, LeagueProps, PlayerBracketProps, TeamProps } from '../../types';
4
- import { Button, Icons, Text } from '../../Components';
5
- import Colors from '../../constants/colors';
4
+ import { Icons } from '../../Components';
6
5
  import moment from 'moment-mini';
6
+ import { Button, Text, View } from '../../Components/Themed';
7
+ import { useColors } from '../../constants/useColors';
7
8
 
8
9
  type PlayerBracketSelectorProps = {
9
10
  visible:boolean,
@@ -19,6 +20,7 @@ type PlayerBracketSelectorProps = {
19
20
  }
20
21
 
21
22
  const PlayerBracketSelector = ({ visible, brackets, leagues, teams, athletes, player_brackets, onSelect, onClose }:PlayerBracketSelectorProps) => {
23
+ const Colors = useColors();
22
24
 
23
25
  const active_brackets = player_brackets.filter(pb => pb.status == 'active');
24
26
 
@@ -29,9 +31,9 @@ const PlayerBracketSelector = ({ visible, brackets, leagues, teams, athletes, pl
29
31
  const champion_team = data.item.champion_id_type == 'team' ? teams.find(t => t.team_id == data.item.champion_id) : undefined
30
32
  const champion_athlete = data.item.champion_id_type == 'athlete' ? athletes.find(t => t.team_id == data.item.champion_id) : undefined
31
33
  return (
32
- <TouchableOpacity style={{ padding:10, flexDirection:'row', alignItems:'center', borderBottomWidth:1, borderColor:Colors.shades.shade600 }} onPress={() => onSelect(data.item)}>
34
+ <Button style={{ padding:10, flexDirection:'row', alignItems:'center', borderBottomWidth:1, borderColor:Colors.borders.light }} onPress={() => onSelect(data.item)}>
33
35
  {champion_team ?
34
- <View style={{ marginRight:5 }}>
36
+ <View transparent style={{ marginRight:5 }}>
35
37
  <Image
36
38
  source={{ uri: champion_team.image?.url }}
37
39
  style={{ height:35, width:35, borderRadius:4 }}
@@ -39,7 +41,7 @@ const PlayerBracketSelector = ({ visible, brackets, leagues, teams, athletes, pl
39
41
  />
40
42
  </View>
41
43
  :champion_athlete ?
42
- <View style={{ marginRight:5 }}>
44
+ <View transparent style={{ marginRight:5 }}>
43
45
  <Image
44
46
  source={{ uri: champion_athlete.image?.url }}
45
47
  style={{ height:35, width:35, borderRadius:4 }}
@@ -47,18 +49,17 @@ const PlayerBracketSelector = ({ visible, brackets, leagues, teams, athletes, pl
47
49
  />
48
50
  </View>
49
51
  :<></>}
50
- <View style={{ flex:1 }}>
51
- <Text size={14} color={Colors.brand.midnight} weight='bold'>{data.item.bracket_name}</Text>
52
- <Text style={{ marginTop:4 }} size={12} color={Colors.brand.slate} weight='regular'>{(data.item.completion_pct*100).toFixed()}% Complete</Text>
52
+ <View transparent style={{ flex:1 }}>
53
+ <Text size={14} theme='h1' weight='bold'>{data.item.bracket_name}</Text>
54
+ <Text style={{ marginTop:4 }} size={12} theme='light' weight='regular'>{(data.item.completion_pct*100).toFixed()}% Complete</Text>
53
55
  </View>
54
56
  <Button
55
57
  title='VIEW'
56
- title_color={Colors.shades.white}
57
- backgroundColor={Colors.brand.electric}
58
+ type='info'
58
59
  disabled
59
60
  onPress={() => console.log('')}
60
61
  />
61
- </TouchableOpacity>
62
+ </Button>
62
63
  )
63
64
  }
64
65
 
@@ -70,20 +71,20 @@ const PlayerBracketSelector = ({ visible, brackets, leagues, teams, athletes, pl
70
71
  const b_pbs = player_brackets.filter(pb => pb.bracket_id == data.item);
71
72
  const started = moment().isAfter(moment(bracket.scheduled_datetime)) ? true : false
72
73
  return (
73
- <View>
74
- <TouchableOpacity style={{ padding:10, backgroundColor:Colors.shades.shade100, flexDirection:'row', alignItems:'center' }}>
75
- <View>
74
+ <View transparent>
75
+ <View type='header' style={{ padding:10, flexDirection:'row', alignItems:'center' }}>
76
+ <View transparent>
76
77
  <Image
77
78
  source={{ uri: league.league_image }}
78
79
  style={{ height:35, width:35, borderRadius:4 }}
79
80
  />
80
81
  </View>
81
- <View style={{ flex:1 }}>
82
- <Text size={14} color={Colors.brand.midnight} weight='bold'>{bracket.bracket_name}</Text>
83
- <Text style={{ marginTop:4 }} size={12} color={Colors.brand.slate} weight='bold'>{started?'In Progress':`Starts at ${moment(bracket.scheduled_datetime).format('MMM DD YYYY hh:mm a')}`}</Text>
82
+ <View transparent style={{ flex:1 }}>
83
+ <Text size={14} theme='h1' weight='bold'>{bracket.bracket_name}</Text>
84
+ <Text style={{ marginTop:4 }} size={12} theme='light' weight='bold'>{started?'In Progress':`Starts at ${moment(bracket.scheduled_datetime).format('MMM DD YYYY hh:mm a')}`}</Text>
84
85
  </View>
85
- </TouchableOpacity>
86
- <View style={{ padding:10 }}>
86
+ </View>
87
+ <View transparent style={{ padding:10 }}>
87
88
  <FlatList
88
89
  data={b_pbs}
89
90
  renderItem={renderPlayerBrackets}
@@ -98,13 +99,13 @@ const PlayerBracketSelector = ({ visible, brackets, leagues, teams, athletes, pl
98
99
 
99
100
  return (
100
101
  <View style={{ flex:1 }}>
101
- <TouchableOpacity style={{ flexDirection:'row', alignItems:'center', padding:20, borderBottomWidth:1, borderColor:Colors.shades.shade100 }} onPress={() => onClose()}>
102
- <Icons.ChevronIcon direction='left' size={12} color={Colors.brand.midnight} />
102
+ <Button style={{ flexDirection:'row', alignItems:'center', padding:20, borderBottomWidth:1, borderColor:Colors.borders.light }} onPress={() => onClose()}>
103
+ <Icons.ChevronIcon direction='left' size={12} color={Colors.text.h1} />
103
104
  <View style={{ flex:1, marginLeft:20 }}>
104
- <Text size={18} color={Colors.brand.midnight} weight='bold'>My Brackets</Text>
105
- <Text style={{ marginTop:4 }} size={14} color={Colors.brand.slate} weight='regular'>Select a filled bracket below to manage it</Text>
105
+ <Text size={18} theme='h1' weight='bold'>My Brackets</Text>
106
+ <Text style={{ marginTop:4 }} size={14} theme='light' weight='regular'>Select a filled bracket below to manage it</Text>
106
107
  </View>
107
- </TouchableOpacity>
108
+ </Button>
108
109
  <ScrollView style={{flex:1}}>
109
110
  <FlatList
110
111
  data={unique_bracket_ids}
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import { FlatList, TouchableOpacity, View, Image } from 'react-native';
3
- import { Icons, Text } from '../../Components';
4
- import Colors from '../../constants/colors';
2
+ import { FlatList, Image } from 'react-native';
3
+ import { Icons } from '../../Components';
4
+ import { Button, Text, View } from '../../Components/Themed';
5
+ import { useColors } from '../../constants/useColors';
5
6
 
6
7
  type OptionType = { key:string, label:string, description: string }
7
8
  const options:OptionType[] = [
@@ -17,43 +18,43 @@ type RoomMenuProps = {
17
18
  }
18
19
 
19
20
  const RoomMenu = ({ visible, onOptionSelect, onClose }: RoomMenuProps ) => {
20
-
21
+ const Colors = useColors();
21
22
  const renderOptions = (data: { item:OptionType, index:number }) => {
22
23
  return (
23
- <TouchableOpacity style={{ flexDirection:'row', padding:20, alignItems:'center', borderBottomWidth:1, borderColor:Colors.shades.shade600 }}
24
+ <Button style={{ flexDirection:'row', padding:20, alignItems:'center', borderBottomWidth:1, borderColor:Colors.borders.light }}
24
25
  onPress={() => onOptionSelect(data.item)}>
25
26
  <View style={{ flex:1 }}>
26
- <Text size={16} color={Colors.brand.midnight} weight='bold'>{data.item.label}</Text>
27
- <Text style={{ marginTop:3 }} size={14} color={Colors.brand.slate} weight='regular'>{data.item.description}</Text>
27
+ <Text size={16} theme='h1' weight='bold'>{data.item.label}</Text>
28
+ <Text style={{ marginTop:3 }} size={14} theme='light' weight='regular'>{data.item.description}</Text>
28
29
  </View>
29
- <Icons.ChevronIcon direction='right' color={Colors.brand.midnight} size={12} />
30
- </TouchableOpacity>
30
+ <Icons.ChevronIcon direction='right' color={Colors.text.h1} size={12} />
31
+ </Button>
31
32
  )
32
33
  }
33
34
 
34
35
  if(!visible){ return <></> }
35
36
  return (
36
37
  <View>
37
- <TouchableOpacity
38
+ <Button
38
39
  disabled={!onClose}
39
- style={{ flexDirection:'row', alignItems:'center', padding:20, borderBottomWidth:1, borderColor:Colors.shades.shade100 }}
40
+ style={{ flexDirection:'row', alignItems:'center', padding:20, borderBottomWidth:1, borderBottomColor:Colors.borders.light }}
40
41
  onPress={() => onClose ? onClose() : console.log('')}
41
42
  >
42
43
  {onClose ?
43
44
  <View style={{ marginRight:20 }}>
44
- <Icons.ChevronIcon direction='left' color={Colors.brand.midnight} size={12} />
45
+ <Icons.ChevronIcon direction='left' color={Colors.text.h1} size={12} />
45
46
  </View>
46
47
  :<></>}
47
48
  <View style={{ flex:1 }}>
48
- <Text size={18} color={Colors.brand.midnight} weight='bold'>Bracket Room</Text>
49
- <Text style={{ marginTop:4 }} size={14} color={Colors.brand.slate} weight='regular'>Select an option below to continue</Text>
49
+ <Text size={18} theme='h1' weight='bold'>Bracket Room</Text>
50
+ <Text style={{ marginTop:4 }} size={14} theme='light' weight='regular'>Select an option below to continue</Text>
50
51
  </View>
51
52
  <Image
52
53
  source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1677259366/Bracket_image_h0fkku.webp' }}
53
54
  style={{ width:70, height:45, borderRadius:4 }}
54
55
  resizeMode='cover'
55
56
  />
56
- </TouchableOpacity>
57
+ </Button>
57
58
  <View style={{ padding:10 }}>
58
59
  <FlatList
59
60
  data={options}