@hedia/recommendation-screen 2.1.49-alpha.3 → 2.1.49
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.
- package/dist/src/RecommendationScreen.js +4 -4
- package/dist/src/components/Header.js +4 -4
- package/dist/src/components/InfoBars.js +5 -5
- package/dist/src/components/RecentInsulin.js +3 -4
- package/dist/src/components/RecommendationModal.js +16 -16
- package/dist/src/components/RecommendedCarbs.js +11 -11
- package/dist/src/components/RecommendedInsulin.js +4 -5
- package/dist/src/components/Remeasure.js +3 -3
- package/dist/src/components/TransferToLogbook.js +5 -31
- package/dist/src/components/TwoOptionModal.js +14 -14
- package/dist/src/components/activity/Activity.js +2 -3
- package/dist/src/components/activity/ActivityIcon.js +1 -2
- package/dist/src/components/activity/ActivityIntensity.js +3 -4
- package/dist/src/components/mood/Emotion.js +1 -2
- package/dist/src/utils/Constants.d.ts +6 -24
- package/dist/src/utils/Constants.js +6 -24
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AppState, BackHandler, LogBox, StyleSheet, View } from "react-native";
|
|
3
3
|
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
4
|
+
import { BACKGROUND_COLOUR_PURPLE, BORDER_COLOUR_GREY, BORDER_COLOUR_TEAL } from "./utils/Constants";
|
|
4
5
|
import Header from "./components/Header";
|
|
5
6
|
import InfoBars, { infoStyles } from "./components/InfoBars";
|
|
6
7
|
import RecentInsulin from "./components/RecentInsulin";
|
|
@@ -12,7 +13,6 @@ import { Milliseconds, } from "@hedia/types";
|
|
|
12
13
|
import { I18nProvider } from "@lingui/react";
|
|
13
14
|
import Emotion from "./components/mood/Emotion";
|
|
14
15
|
import TransferToLogbook from "./components/TransferToLogbook";
|
|
15
|
-
import { colors } from "./utils/Constants";
|
|
16
16
|
import { t } from "@lingui/macro";
|
|
17
17
|
import Activity from "./components/activity/Activity";
|
|
18
18
|
import LimitationMessage from "./components/LimitationMessage";
|
|
@@ -477,7 +477,7 @@ export default class RecommendationScreen extends React.Component {
|
|
|
477
477
|
<View style={[
|
|
478
478
|
containerStyles.calcBorder,
|
|
479
479
|
{
|
|
480
|
-
borderColor: recommendedCarbs ?
|
|
480
|
+
borderColor: recommendedCarbs ? BORDER_COLOUR_TEAL : BORDER_COLOUR_GREY,
|
|
481
481
|
},
|
|
482
482
|
]}>
|
|
483
483
|
<RecommendedCarbs enteredCarbs={`${providedCarbs}`} changedRecommendedCarbs={this.updateCarbRecommendation} recommendedCarbs={`${recommendedCarbs}`} removeRecommendedCarbs={this.removeCarbRecommendation}/>
|
|
@@ -502,7 +502,7 @@ export default class RecommendationScreen extends React.Component {
|
|
|
502
502
|
const containerStyles = StyleSheet.create({
|
|
503
503
|
container: {
|
|
504
504
|
flex: 1,
|
|
505
|
-
backgroundColor:
|
|
505
|
+
backgroundColor: BACKGROUND_COLOUR_PURPLE,
|
|
506
506
|
},
|
|
507
507
|
calcContainer: {
|
|
508
508
|
flex: 1,
|
|
@@ -514,6 +514,6 @@ const containerStyles = StyleSheet.create({
|
|
|
514
514
|
},
|
|
515
515
|
calcBorder: {
|
|
516
516
|
...infoStyles.border,
|
|
517
|
-
borderColor:
|
|
517
|
+
borderColor: BORDER_COLOUR_TEAL,
|
|
518
518
|
},
|
|
519
519
|
});
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { Dimensions, SafeAreaView, StyleSheet, TouchableOpacity, View } from "react-native";
|
|
4
4
|
import { i18n } from "../locale/i18nUtils";
|
|
5
5
|
import { Testing } from "../types/enum";
|
|
6
|
-
import {
|
|
6
|
+
import { BACKGROUND_COLOUR_PURPLE, BORDER_COLOUR_GREY } from "../utils/Constants";
|
|
7
7
|
import Icon from "./Icon";
|
|
8
8
|
import TextBold from "./text/TextBold";
|
|
9
9
|
/** Component to display a header text along with a cancel-button that triggers a callback function. */
|
|
@@ -35,7 +35,7 @@ export default class Header extends React.Component {
|
|
|
35
35
|
}
|
|
36
36
|
const headerStyles = StyleSheet.create({
|
|
37
37
|
backgroundColour: {
|
|
38
|
-
backgroundColor:
|
|
38
|
+
backgroundColor: BACKGROUND_COLOUR_PURPLE,
|
|
39
39
|
},
|
|
40
40
|
margin: {
|
|
41
41
|
margin: `1%`,
|
|
@@ -56,7 +56,7 @@ const headerStyles = StyleSheet.create({
|
|
|
56
56
|
},
|
|
57
57
|
iconStyle: {
|
|
58
58
|
fontSize: Dimensions.get(`screen`).width / 12,
|
|
59
|
-
color:
|
|
59
|
+
color: BORDER_COLOUR_GREY,
|
|
60
60
|
},
|
|
61
61
|
headerTextContainer: {
|
|
62
62
|
flex: 6,
|
|
@@ -67,7 +67,7 @@ const headerStyles = StyleSheet.create({
|
|
|
67
67
|
headerText: {
|
|
68
68
|
fontSize: Dimensions.get(`screen`).width / 18,
|
|
69
69
|
textAlign: `center`,
|
|
70
|
-
color:
|
|
70
|
+
color: `white`,
|
|
71
71
|
},
|
|
72
72
|
headerFiller: {
|
|
73
73
|
flex: 1,
|
|
@@ -3,7 +3,7 @@ import { t } from "@lingui/macro";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Dimensions, StyleSheet, View } from "react-native";
|
|
5
5
|
import { i18n } from "../locale/i18nUtils";
|
|
6
|
-
import {
|
|
6
|
+
import { BORDER_COLOUR_GREY } from "../utils/Constants";
|
|
7
7
|
import { Utils } from "../utils/Utils";
|
|
8
8
|
import TextBold from "./text/TextBold";
|
|
9
9
|
import TextRegular from "./text/TextRegular";
|
|
@@ -80,7 +80,7 @@ export const infoStyles = StyleSheet.create({
|
|
|
80
80
|
},
|
|
81
81
|
border: {
|
|
82
82
|
borderWidth: 2,
|
|
83
|
-
borderColor:
|
|
83
|
+
borderColor: BORDER_COLOUR_GREY,
|
|
84
84
|
borderRadius: 5,
|
|
85
85
|
paddingVertical: `1%`,
|
|
86
86
|
},
|
|
@@ -95,7 +95,7 @@ export const infoStyles = StyleSheet.create({
|
|
|
95
95
|
justifyContent: `center`,
|
|
96
96
|
},
|
|
97
97
|
label: {
|
|
98
|
-
color:
|
|
98
|
+
color: `white`,
|
|
99
99
|
fontSize: Dimensions.get(`screen`).width / 22,
|
|
100
100
|
},
|
|
101
101
|
valueUnitContainer: {
|
|
@@ -108,7 +108,7 @@ export const infoStyles = StyleSheet.create({
|
|
|
108
108
|
justifyContent: `flex-end`,
|
|
109
109
|
},
|
|
110
110
|
value: {
|
|
111
|
-
color:
|
|
111
|
+
color: `white`,
|
|
112
112
|
fontSize: Dimensions.get(`screen`).width / 15,
|
|
113
113
|
textAlign: `right`,
|
|
114
114
|
},
|
|
@@ -118,7 +118,7 @@ export const infoStyles = StyleSheet.create({
|
|
|
118
118
|
paddingBottom: `3%`,
|
|
119
119
|
},
|
|
120
120
|
units: {
|
|
121
|
-
color:
|
|
121
|
+
color: `white`,
|
|
122
122
|
fontSize: Dimensions.get(`screen`).width / 30,
|
|
123
123
|
textAlign: `left`,
|
|
124
124
|
paddingLeft: `5%`,
|
|
@@ -3,7 +3,6 @@ import React from "react";
|
|
|
3
3
|
import { Dimensions, StyleSheet, TouchableOpacity, View } from "react-native";
|
|
4
4
|
import { i18n } from "../locale/i18nUtils";
|
|
5
5
|
import { Testing } from "../types/enum";
|
|
6
|
-
import { colors } from "../utils/Constants";
|
|
7
6
|
import { infoStyles } from "./InfoBars";
|
|
8
7
|
import TextBold from "./text/TextBold";
|
|
9
8
|
/** Display a card that prompts the user to recall if they injected insulin recently. */
|
|
@@ -42,7 +41,7 @@ export default class RecentInsulin extends React.Component {
|
|
|
42
41
|
const recentInsulinStyles = StyleSheet.create({
|
|
43
42
|
container: {
|
|
44
43
|
...infoStyles.margin,
|
|
45
|
-
backgroundColor:
|
|
44
|
+
backgroundColor: `rgba(118, 82, 255, 0.5)`,
|
|
46
45
|
borderRadius: 5,
|
|
47
46
|
},
|
|
48
47
|
titleContainer: {
|
|
@@ -75,7 +74,7 @@ const recentInsulinStyles = StyleSheet.create({
|
|
|
75
74
|
},
|
|
76
75
|
yesNoContainer: {
|
|
77
76
|
flex: 1,
|
|
78
|
-
borderColor:
|
|
77
|
+
borderColor: `white`,
|
|
79
78
|
borderRadius: 100,
|
|
80
79
|
borderWidth: 2,
|
|
81
80
|
paddingHorizontal: `2%`,
|
|
@@ -85,7 +84,7 @@ const recentInsulinStyles = StyleSheet.create({
|
|
|
85
84
|
textAlign: `center`,
|
|
86
85
|
paddingTop: `1%`,
|
|
87
86
|
paddingBottom: `1%`,
|
|
88
|
-
color:
|
|
87
|
+
color: `white`,
|
|
89
88
|
fontSize: Dimensions.get(`screen`).width / 25,
|
|
90
89
|
},
|
|
91
90
|
filler: {
|
|
@@ -4,7 +4,7 @@ import { Dimensions, StyleSheet, TouchableOpacity, View } from "react-native";
|
|
|
4
4
|
import ReactNativeModal from "react-native-modal";
|
|
5
5
|
import { i18n } from "../locale/i18nUtils";
|
|
6
6
|
import { Testing } from "../types/enum";
|
|
7
|
-
import {
|
|
7
|
+
import { BORDER_COLOUR_TEAL } from "../utils/Constants";
|
|
8
8
|
import LimitationMessage from "./LimitationMessage";
|
|
9
9
|
import TextBold from "./text/TextBold";
|
|
10
10
|
import TextRegular from "./text/TextRegular";
|
|
@@ -153,20 +153,20 @@ export const stylesModal = StyleSheet.create({
|
|
|
153
153
|
modalStyle: { margin: 0 },
|
|
154
154
|
container: {
|
|
155
155
|
flex: 4,
|
|
156
|
-
backgroundColor:
|
|
156
|
+
backgroundColor: `rgba(30, 35, 87, 0.9)`,
|
|
157
157
|
justifyContent: `center`,
|
|
158
158
|
paddingHorizontal: `4%`,
|
|
159
159
|
},
|
|
160
160
|
containerAcceptButton: {
|
|
161
161
|
flex: 1,
|
|
162
|
-
backgroundColor:
|
|
162
|
+
backgroundColor: `rgba(30, 35, 87, 0.9)`,
|
|
163
163
|
justifyContent: `flex-start`,
|
|
164
164
|
},
|
|
165
165
|
titleContainer: { marginBottom: `5%` },
|
|
166
166
|
recommendationRow: { justifyContent: `center`, alignContent: `center`, marginBottom: `3%` },
|
|
167
|
-
textTittleMessage: { color:
|
|
168
|
-
textMessage: { color:
|
|
169
|
-
buttonText: { color:
|
|
167
|
+
textTittleMessage: { color: `white`, fontSize: titleFontSize, textAlign: `center` },
|
|
168
|
+
textMessage: { color: `white`, fontSize: textFontSize, textAlign: `center` },
|
|
169
|
+
buttonText: { color: BORDER_COLOUR_TEAL, fontSize: buttonFontSize, textAlign: `center` },
|
|
170
170
|
addToCalculationContainer: { justifyContent: `flex-start`, marginVertical: `5%` },
|
|
171
171
|
innerView: {
|
|
172
172
|
alignContent: `center`,
|
|
@@ -175,22 +175,22 @@ export const stylesModal = StyleSheet.create({
|
|
|
175
175
|
marginTop: `5%`,
|
|
176
176
|
borderRadius: height / 80,
|
|
177
177
|
borderWidth: height / 300,
|
|
178
|
-
borderColor:
|
|
178
|
+
borderColor: BORDER_COLOUR_TEAL,
|
|
179
179
|
},
|
|
180
180
|
suggestedContainer: { justifyContent: `center`, flexDirection: `row`, marginBottom: `3%` },
|
|
181
|
-
suggestedCarbs: { color:
|
|
181
|
+
suggestedCarbs: { color: `white`, fontSize: sugestionFontSize },
|
|
182
182
|
textCenter: { textAlign: `center` },
|
|
183
|
-
recommendEatingText: { color:
|
|
184
|
-
carbohydrateText: { color:
|
|
185
|
-
addToCalculation: { color:
|
|
183
|
+
recommendEatingText: { color: `#C5D0E7`, fontSize: recommendEatingFontSize, textAlign: `center` },
|
|
184
|
+
carbohydrateText: { color: `white`, fontSize: sugestionFontSize },
|
|
185
|
+
addToCalculation: { color: `white`, fontSize: textFontSize, textAlign: `center` },
|
|
186
186
|
recommendationButtonsContainer: { justifyContent: `center`, flexDirection: `row`, margin: `3%` },
|
|
187
|
-
affirmativeCarbsText: { color:
|
|
188
|
-
negativeCarbsText: { color:
|
|
187
|
+
affirmativeCarbsText: { color: BORDER_COLOUR_TEAL, fontSize: buttonFontSize, textAlign: `center` },
|
|
188
|
+
negativeCarbsText: { color: `white`, fontSize: buttonFontSize, textAlign: `center` },
|
|
189
189
|
affirmativeCarbsButton: {
|
|
190
190
|
marginTop: `2%`,
|
|
191
191
|
borderRadius: buttonBorderRadius,
|
|
192
192
|
borderWidth: buttonBorderWidth,
|
|
193
|
-
borderColor:
|
|
193
|
+
borderColor: BORDER_COLOUR_TEAL,
|
|
194
194
|
width: buttonWidth,
|
|
195
195
|
height: buttonHeight,
|
|
196
196
|
alignSelf: `center`,
|
|
@@ -201,7 +201,7 @@ export const stylesModal = StyleSheet.create({
|
|
|
201
201
|
marginTop: `2%`,
|
|
202
202
|
borderRadius: buttonBorderRadius,
|
|
203
203
|
borderWidth: buttonBorderWidth,
|
|
204
|
-
borderColor:
|
|
204
|
+
borderColor: `white`,
|
|
205
205
|
width: buttonWidth,
|
|
206
206
|
height: buttonHeight,
|
|
207
207
|
alignSelf: `center`,
|
|
@@ -212,7 +212,7 @@ export const stylesModal = StyleSheet.create({
|
|
|
212
212
|
marginTop: `6%`,
|
|
213
213
|
borderRadius: buttonBorderRadius,
|
|
214
214
|
borderWidth: buttonBorderWidth,
|
|
215
|
-
borderColor:
|
|
215
|
+
borderColor: BORDER_COLOUR_TEAL,
|
|
216
216
|
width: buttonWidth,
|
|
217
217
|
height: buttonHeight,
|
|
218
218
|
alignSelf: `center`,
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { Alert, Dimensions, StyleSheet, TouchableOpacity, View } from "react-native";
|
|
4
4
|
import { i18n } from "../locale/i18nUtils";
|
|
5
5
|
import { Testing } from "../types/enum";
|
|
6
|
-
import {
|
|
6
|
+
import { BORDER_COLOUR_GREY, BORDER_COLOUR_TEAL } from "../utils/Constants";
|
|
7
7
|
import { CarbohydrateLimitError } from "../utils/RecommendationError";
|
|
8
8
|
import Icon from "./Icon";
|
|
9
9
|
import { infoStyles } from "./InfoBars";
|
|
@@ -90,7 +90,7 @@ export default class RecommendedCarbs extends React.Component {
|
|
|
90
90
|
const shownCarbs = this.state.partialInput ?? Math.round(Number(this.props.recommendedCarbs));
|
|
91
91
|
const totalCarbs = Math.round(parseFloat(this.props.enteredCarbs) + Number(shownCarbs));
|
|
92
92
|
return (<React.Fragment>
|
|
93
|
-
<LineSeparator color={
|
|
93
|
+
<LineSeparator color={BORDER_COLOUR_GREY}/>
|
|
94
94
|
<View style={calculationStyles.borderContainer}>
|
|
95
95
|
<View style={calculationStyles.recommendedContainer}>
|
|
96
96
|
<TouchableOpacity testID={RecommendedCarbsTestIds.RemoveRecommendation} style={calculationStyles.removeRecommended} onPress={this.props.removeRecommendedCarbs}>
|
|
@@ -106,7 +106,7 @@ export default class RecommendedCarbs extends React.Component {
|
|
|
106
106
|
<View style={calculationStyles.valueUnitContainer}>
|
|
107
107
|
<TouchableOpacity testID={RecommendedCarbsTestIds.EditRecommendedCarbs} onPress={this.showTextInput} style={[calculationStyles.valueUnitContainer]}>
|
|
108
108
|
<View style={calculationStyles.valueContainer}>
|
|
109
|
-
<TextBold testID={RecommendedCarbsTestIds.RecommendedCarbs} style={{ ...calculationStyles.value, color:
|
|
109
|
+
<TextBold testID={RecommendedCarbsTestIds.RecommendedCarbs} style={{ ...calculationStyles.value, color: BORDER_COLOUR_TEAL }}>
|
|
110
110
|
{shownCarbs}
|
|
111
111
|
</TextBold>
|
|
112
112
|
</View>
|
|
@@ -114,14 +114,14 @@ export default class RecommendedCarbs extends React.Component {
|
|
|
114
114
|
<View style={calculationStyles.editIconContainer}>
|
|
115
115
|
<Icon style={calculationStyles.editIcon} iconIdentifier={`Feather/edit`}/>
|
|
116
116
|
</View>
|
|
117
|
-
<TextRegular style={{ ...calculationStyles.units, color:
|
|
117
|
+
<TextRegular style={{ ...calculationStyles.units, color: BORDER_COLOUR_TEAL }}>
|
|
118
118
|
{i18n._(t `grams`)}
|
|
119
119
|
</TextRegular>
|
|
120
120
|
</View>
|
|
121
121
|
</TouchableOpacity>
|
|
122
122
|
</View>
|
|
123
123
|
</View>
|
|
124
|
-
<LineSeparator color={
|
|
124
|
+
<LineSeparator color={BORDER_COLOUR_TEAL}/>
|
|
125
125
|
{this.renderRow({
|
|
126
126
|
label: i18n._(t `Total`),
|
|
127
127
|
value: totalCarbs.toString(),
|
|
@@ -191,14 +191,14 @@ const calculationStyles = StyleSheet.create({
|
|
|
191
191
|
},
|
|
192
192
|
foodUnitsLabel: {
|
|
193
193
|
...infoStyles.units,
|
|
194
|
-
color:
|
|
194
|
+
color: `rgba(160, 180, 240, 1)`,
|
|
195
195
|
paddingLeft: `1%`,
|
|
196
196
|
},
|
|
197
197
|
rowContainer: {
|
|
198
198
|
flex: 7,
|
|
199
199
|
},
|
|
200
200
|
rowLabel: {
|
|
201
|
-
color:
|
|
201
|
+
color: `white`,
|
|
202
202
|
fontSize: Dimensions.get(`screen`).width / 25,
|
|
203
203
|
},
|
|
204
204
|
enteredContainer: {
|
|
@@ -206,7 +206,7 @@ const calculationStyles = StyleSheet.create({
|
|
|
206
206
|
alignItems: `flex-end`,
|
|
207
207
|
},
|
|
208
208
|
entered: {
|
|
209
|
-
color:
|
|
209
|
+
color: `white`,
|
|
210
210
|
fontSize: Dimensions.get(`screen`).width / 23,
|
|
211
211
|
},
|
|
212
212
|
valueUnitContainer: {
|
|
@@ -230,7 +230,7 @@ const calculationStyles = StyleSheet.create({
|
|
|
230
230
|
flexDirection: `row`,
|
|
231
231
|
},
|
|
232
232
|
editIcon: {
|
|
233
|
-
color:
|
|
233
|
+
color: BORDER_COLOUR_TEAL,
|
|
234
234
|
fontSize: Dimensions.get(`screen`).width / 30,
|
|
235
235
|
},
|
|
236
236
|
recommendedContainer: {
|
|
@@ -238,7 +238,7 @@ const calculationStyles = StyleSheet.create({
|
|
|
238
238
|
flexDirection: `row`,
|
|
239
239
|
},
|
|
240
240
|
recommendedLabel: {
|
|
241
|
-
color:
|
|
241
|
+
color: BORDER_COLOUR_TEAL,
|
|
242
242
|
fontSize: Dimensions.get(`screen`).width / 25,
|
|
243
243
|
alignSelf: `center`,
|
|
244
244
|
},
|
|
@@ -248,7 +248,7 @@ const calculationStyles = StyleSheet.create({
|
|
|
248
248
|
marginTop: `1%`,
|
|
249
249
|
},
|
|
250
250
|
removeRecommendedIcon: {
|
|
251
|
-
color:
|
|
251
|
+
color: BORDER_COLOUR_TEAL,
|
|
252
252
|
fontSize: Dimensions.get(`screen`).width / 20,
|
|
253
253
|
paddingBottom: `0.5%`,
|
|
254
254
|
},
|
|
@@ -6,7 +6,6 @@ import LinearGradient from "react-native-linear-gradient";
|
|
|
6
6
|
import { i18n } from "../locale/i18nUtils";
|
|
7
7
|
import { Testing } from "../types/enum";
|
|
8
8
|
import { Messages } from "../utils/AttentionMessages";
|
|
9
|
-
import { colors } from "../utils/Constants";
|
|
10
9
|
import { Utils } from "../utils/Utils";
|
|
11
10
|
import Icon from "./Icon";
|
|
12
11
|
import { infoStyles } from "./InfoBars";
|
|
@@ -107,7 +106,7 @@ export default class RecommendedInsulin extends React.Component {
|
|
|
107
106
|
const shownInsulin = this.state.partialInput ?? this.props.insulinRecommendation ?? `0`;
|
|
108
107
|
return (<React.Fragment>
|
|
109
108
|
<TouchableOpacity testID={RecommendedInsulinTestIds.EditRecommendedInsulin} onPress={this.handleOnPress}>
|
|
110
|
-
<LinearGradient style={recommendedInsulinStyles.container} colors={[
|
|
109
|
+
<LinearGradient style={recommendedInsulinStyles.container} colors={[`#a200ff`, `#578aff`]} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }}>
|
|
111
110
|
<View style={recommendedInsulinStyles.recommendedTextContainer}>
|
|
112
111
|
<TextBold style={recommendedInsulinStyles.recommendedText}>
|
|
113
112
|
{i18n._(t `Recommended amount of insulin`)}
|
|
@@ -155,17 +154,17 @@ const recommendedInsulinStyles = StyleSheet.create({
|
|
|
155
154
|
minHeight: Dimensions.get(`screen`).width / 4,
|
|
156
155
|
},
|
|
157
156
|
value: {
|
|
158
|
-
color:
|
|
157
|
+
color: `white`,
|
|
159
158
|
fontSize: Dimensions.get(`screen`).width / 5,
|
|
160
159
|
},
|
|
161
160
|
units: {
|
|
162
161
|
alignSelf: `flex-end`,
|
|
163
|
-
color:
|
|
162
|
+
color: `white`,
|
|
164
163
|
fontSize: Dimensions.get(`screen`).width / 28,
|
|
165
164
|
paddingBottom: `6%`,
|
|
166
165
|
},
|
|
167
166
|
editIcon: {
|
|
168
|
-
color:
|
|
167
|
+
color: `white`,
|
|
169
168
|
fontSize: Dimensions.get(`screen`).width / 28,
|
|
170
169
|
textAlignVertical: `center`,
|
|
171
170
|
paddingBottom: `10%`,
|
|
@@ -4,7 +4,7 @@ import React from "react";
|
|
|
4
4
|
import { Dimensions, Platform, StyleSheet, View } from "react-native";
|
|
5
5
|
import { i18n } from "../locale/i18nUtils";
|
|
6
6
|
import { Testing } from "../types/enum";
|
|
7
|
-
import {
|
|
7
|
+
import { BORDER_COLOUR_GREY, BORDER_COLOUR_TEAL } from "../utils/Constants";
|
|
8
8
|
import { infoStyles } from "./InfoBars";
|
|
9
9
|
import TextBold from "./text/TextBold";
|
|
10
10
|
import TextRegular from "./text/TextRegular";
|
|
@@ -81,7 +81,7 @@ export default class Remeasure extends React.Component {
|
|
|
81
81
|
if (slider !== null) {
|
|
82
82
|
this.slider = slider;
|
|
83
83
|
}
|
|
84
|
-
}} testID={Testing.Id.RemeasureTestIds.RemeasureSlider} maximumTrackTintColor={
|
|
84
|
+
}} testID={Testing.Id.RemeasureTestIds.RemeasureSlider} maximumTrackTintColor={BORDER_COLOUR_GREY} minimumTrackTintColor={BORDER_COLOUR_TEAL} thumbTintColor={BORDER_COLOUR_TEAL} maximumValue={6} minimumValue={0} step={0.5} style={[remeasureStyles.sliderStyle, { marginHorizontal }]} onValueChange={this.handleSliderChange}/>
|
|
85
85
|
</View>);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -98,7 +98,7 @@ const remeasureStyles = StyleSheet.create({
|
|
|
98
98
|
flex: 7,
|
|
99
99
|
},
|
|
100
100
|
remeasureLabel: {
|
|
101
|
-
color:
|
|
101
|
+
color: `white`,
|
|
102
102
|
fontSize: Dimensions.get(`screen`).width / 25,
|
|
103
103
|
},
|
|
104
104
|
valueUnitContainer: {
|
|
@@ -3,8 +3,6 @@ import { Dimensions, StyleSheet, TouchableOpacity, View } from "react-native";
|
|
|
3
3
|
import { t } from "@lingui/macro";
|
|
4
4
|
import { i18n } from "../locale/i18nUtils";
|
|
5
5
|
import { Testing } from "../types/enum";
|
|
6
|
-
import { colors } from "../utils/Constants";
|
|
7
|
-
import Icon from "./Icon";
|
|
8
6
|
import TextBold from "./text/TextBold";
|
|
9
7
|
/**
|
|
10
8
|
* Render a button for transferring the recommendation to a logbook entry.
|
|
@@ -39,14 +37,9 @@ export default class TransferToLogbook extends React.Component {
|
|
|
39
37
|
return <View style={addToLogbookStyles.marginContainer}/>;
|
|
40
38
|
}
|
|
41
39
|
return (<TouchableOpacity testID={Testing.Id.TransferToLogbookTestIds.TransferButton} onPress={this.handlePress} disabled={this.state.pressed} style={addToLogbookStyles.container}>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<Icon style={addToLogbookStyles.icon} iconIdentifier={`Feather/check`}/>
|
|
46
|
-
<TextBold style={addToLogbookStyles.transferTextActive}>
|
|
47
|
-
{i18n._(t `Transferred to logbook`)}
|
|
48
|
-
</TextBold>
|
|
49
|
-
</View>)}
|
|
40
|
+
<View style={addToLogbookStyles.textContainer}>
|
|
41
|
+
<TextBold style={addToLogbookStyles.transferText}>{i18n._(t `Transfer to logbook`)}</TextBold>
|
|
42
|
+
</View>
|
|
50
43
|
</TouchableOpacity>);
|
|
51
44
|
}
|
|
52
45
|
}
|
|
@@ -65,29 +58,10 @@ const addToLogbookStyles = StyleSheet.create({
|
|
|
65
58
|
borderRadius: 100,
|
|
66
59
|
marginHorizontal: `4%`,
|
|
67
60
|
paddingVertical: `4%`,
|
|
68
|
-
borderColor:
|
|
61
|
+
borderColor: `#01FFFC`,
|
|
69
62
|
},
|
|
70
63
|
transferText: {
|
|
71
|
-
color:
|
|
72
|
-
fontSize: Dimensions.get(`screen`).width / 22,
|
|
73
|
-
},
|
|
74
|
-
textContainerActive: {
|
|
75
|
-
flexDirection: `row`,
|
|
76
|
-
backgroundColor: colors.teal,
|
|
77
|
-
justifyContent: `center`,
|
|
78
|
-
borderWidth: 1,
|
|
79
|
-
borderRadius: 100,
|
|
80
|
-
marginHorizontal: `4%`,
|
|
81
|
-
paddingVertical: `4%`,
|
|
82
|
-
},
|
|
83
|
-
icon: {
|
|
84
|
-
paddingTop: `1.3%`,
|
|
85
|
-
color: colors.darkBlue,
|
|
86
|
-
fontSize: Dimensions.get(`screen`).width / 22,
|
|
87
|
-
marginRight: `1%`,
|
|
88
|
-
},
|
|
89
|
-
transferTextActive: {
|
|
90
|
-
color: colors.darkBlue,
|
|
64
|
+
color: `#01FFFC`,
|
|
91
65
|
fontSize: Dimensions.get(`screen`).width / 22,
|
|
92
66
|
},
|
|
93
67
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Dimensions, StatusBar, StyleSheet, TouchableOpacity, View } from "react-native";
|
|
3
3
|
import { Testing } from "../types/enum";
|
|
4
|
-
import {
|
|
4
|
+
import { BACKGROUND_COLOUR_PURPLE, BORDER_COLOUR_GREY, BORDER_COLOUR_TEAL } from "../utils/Constants";
|
|
5
5
|
import Icon from "./Icon";
|
|
6
6
|
import { stylesModal } from "./RecommendationModal";
|
|
7
7
|
import TextBold from "./text/TextBold";
|
|
@@ -13,11 +13,11 @@ export default class TwoOptionModal extends React.Component {
|
|
|
13
13
|
render() {
|
|
14
14
|
const { rowAsButtonLayout, isCancelable } = this.props;
|
|
15
15
|
return (<View style={modalStyle.container}>
|
|
16
|
-
<StatusBar backgroundColor={
|
|
16
|
+
<StatusBar backgroundColor={`rgba(0, 0, 0, 1)`}/>
|
|
17
17
|
<View style={modalStyle.modalContainer}>
|
|
18
|
-
{isCancelable
|
|
18
|
+
{isCancelable ? (<TouchableOpacity onPress={this.props.onClose} testID={TwoOptionModalTestIds.ExitButton} style={modalStyle.iconWrapper}>
|
|
19
19
|
<Icon iconIdentifier={`Ionicons/ios-close-circle-outline`} style={modalStyle.icon}/>
|
|
20
|
-
</TouchableOpacity>)}
|
|
20
|
+
</TouchableOpacity>) : null}
|
|
21
21
|
|
|
22
22
|
<View style={isCancelable ? modalStyle.textContainer : modalStyle.textContainerNotCancelable}>
|
|
23
23
|
<TextBold style={rowAsButtonLayout ? modalStyle.titleRowLayout : modalStyle.titleColumnLayout}>
|
|
@@ -47,11 +47,11 @@ export const modalStyle = StyleSheet.create({
|
|
|
47
47
|
container: {
|
|
48
48
|
...StyleSheet.absoluteFillObject,
|
|
49
49
|
justifyContent: `center`,
|
|
50
|
-
backgroundColor:
|
|
50
|
+
backgroundColor: `rgba(0, 0, 0, 0.9)`,
|
|
51
51
|
},
|
|
52
52
|
modalContainer: {
|
|
53
53
|
margin: `4%`,
|
|
54
|
-
backgroundColor:
|
|
54
|
+
backgroundColor: BACKGROUND_COLOUR_PURPLE,
|
|
55
55
|
borderRadius: width / 25,
|
|
56
56
|
},
|
|
57
57
|
iconWrapper: {
|
|
@@ -60,7 +60,7 @@ export const modalStyle = StyleSheet.create({
|
|
|
60
60
|
marginTop: `3%`,
|
|
61
61
|
},
|
|
62
62
|
icon: {
|
|
63
|
-
color:
|
|
63
|
+
color: BORDER_COLOUR_GREY,
|
|
64
64
|
fontSize: width / 12,
|
|
65
65
|
},
|
|
66
66
|
textContainer: {
|
|
@@ -75,19 +75,19 @@ export const modalStyle = StyleSheet.create({
|
|
|
75
75
|
alignSelf: `flex-start`,
|
|
76
76
|
},
|
|
77
77
|
titleRowLayout: {
|
|
78
|
-
color:
|
|
78
|
+
color: `rgba(139, 144, 196, 1)`,
|
|
79
79
|
fontSize: width / 17,
|
|
80
80
|
textAlign: `center`,
|
|
81
81
|
marginBottom: `10%`,
|
|
82
82
|
},
|
|
83
83
|
titleColumnLayout: {
|
|
84
|
-
color:
|
|
84
|
+
color: `rgba(139, 144, 196, 1)`,
|
|
85
85
|
fontSize: width / 17,
|
|
86
86
|
textAlign: `center`,
|
|
87
87
|
marginBottom: `5%`,
|
|
88
88
|
},
|
|
89
89
|
message: {
|
|
90
|
-
color:
|
|
90
|
+
color: `rgba(245, 242, 242, 1)`,
|
|
91
91
|
fontSize: width / 22,
|
|
92
92
|
textAlign: `center`,
|
|
93
93
|
},
|
|
@@ -112,7 +112,7 @@ export const modalStyle = StyleSheet.create({
|
|
|
112
112
|
height: height / 18,
|
|
113
113
|
width: width / 1.5,
|
|
114
114
|
marginTop: 0,
|
|
115
|
-
backgroundColor:
|
|
115
|
+
backgroundColor: BORDER_COLOUR_TEAL,
|
|
116
116
|
},
|
|
117
117
|
secondButtonColumn: {
|
|
118
118
|
alignSelf: `center`,
|
|
@@ -124,17 +124,17 @@ export const modalStyle = StyleSheet.create({
|
|
|
124
124
|
textButtonRow: {
|
|
125
125
|
textAlign: `center`,
|
|
126
126
|
fontSize: width / 24,
|
|
127
|
-
color:
|
|
127
|
+
color: `white`,
|
|
128
128
|
},
|
|
129
129
|
textFirstButtonColumn: {
|
|
130
130
|
textAlign: `center`,
|
|
131
131
|
fontSize: width / 22,
|
|
132
132
|
paddingHorizontal: 15,
|
|
133
|
-
color:
|
|
133
|
+
color: `#1B1F48`,
|
|
134
134
|
},
|
|
135
135
|
textSecondButtonColumn: {
|
|
136
136
|
textAlign: `center`,
|
|
137
137
|
fontSize: width / 26,
|
|
138
|
-
color:
|
|
138
|
+
color: BORDER_COLOUR_TEAL,
|
|
139
139
|
},
|
|
140
140
|
});
|
|
@@ -3,7 +3,6 @@ import React from "react";
|
|
|
3
3
|
import { Dimensions, StyleSheet, View } from "react-native";
|
|
4
4
|
import { i18n } from "../../locale/i18nUtils";
|
|
5
5
|
import { Testing } from "../../types/enum";
|
|
6
|
-
import { colors } from "../../utils/Constants";
|
|
7
6
|
import { infoStyles } from "../InfoBars";
|
|
8
7
|
import TextBold from "../text/TextBold";
|
|
9
8
|
import TextRegular from "../text/TextRegular";
|
|
@@ -74,11 +73,11 @@ const activityStyles = StyleSheet.create({
|
|
|
74
73
|
marginBottom: `2%`,
|
|
75
74
|
},
|
|
76
75
|
infoText: {
|
|
77
|
-
color:
|
|
76
|
+
color: `rgba(160, 180, 240, 1)`,
|
|
78
77
|
fontSize: width / 24,
|
|
79
78
|
},
|
|
80
79
|
reductionPercentage: {
|
|
81
|
-
color:
|
|
80
|
+
color: `white`,
|
|
82
81
|
marginTop: `2%`,
|
|
83
82
|
fontSize: width / 18,
|
|
84
83
|
},
|
|
@@ -3,7 +3,6 @@ import { t } from "@lingui/macro";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Dimensions, Image, StyleSheet, View } from "react-native";
|
|
5
5
|
import { i18n } from "../../locale/i18nUtils";
|
|
6
|
-
import { colors } from "../../utils/Constants";
|
|
7
6
|
import TextRegular from "../text/TextRegular";
|
|
8
7
|
const { Other } = Activity.Enums.ActivityEnum;
|
|
9
8
|
/** Mapping from ActivityEnums to corresponding image resource. */
|
|
@@ -53,7 +52,7 @@ const activityIconStyles = StyleSheet.create({
|
|
|
53
52
|
height: Dimensions.get(`screen`).width / 16,
|
|
54
53
|
},
|
|
55
54
|
activityTitle: {
|
|
56
|
-
color:
|
|
55
|
+
color: `white`,
|
|
57
56
|
fontSize: Dimensions.get(`screen`).width / 25,
|
|
58
57
|
},
|
|
59
58
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Activity } from "@hedia/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Dimensions, StyleSheet, View } from "react-native";
|
|
4
|
-
import { colors } from "../../utils/Constants";
|
|
5
4
|
import { ActivityIntensityTranslations } from "../../utils/Translations";
|
|
6
5
|
import { infoStyles } from "../InfoBars";
|
|
7
6
|
import TextBold from "../text/TextBold";
|
|
@@ -39,13 +38,13 @@ const activityIntensityStyles = StyleSheet.create({
|
|
|
39
38
|
borderRadius: 5,
|
|
40
39
|
},
|
|
41
40
|
[Activity.Enums.ActivityIntensity.light]: {
|
|
42
|
-
backgroundColor:
|
|
41
|
+
backgroundColor: `#A5D871`,
|
|
43
42
|
},
|
|
44
43
|
[Activity.Enums.ActivityIntensity.moderate]: {
|
|
45
|
-
backgroundColor:
|
|
44
|
+
backgroundColor: `#F9BD5A`,
|
|
46
45
|
},
|
|
47
46
|
[Activity.Enums.ActivityIntensity.hard]: {
|
|
48
|
-
backgroundColor:
|
|
47
|
+
backgroundColor: `#EC5466`,
|
|
49
48
|
},
|
|
50
49
|
intensityContainer: {
|
|
51
50
|
flex: 5,
|
|
@@ -3,7 +3,6 @@ import { t } from "@lingui/macro";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Dimensions, StyleSheet, View } from "react-native";
|
|
5
5
|
import { i18n } from "../../locale/i18nUtils";
|
|
6
|
-
import { colors } from "../../utils/Constants";
|
|
7
6
|
import TextBold from "../text/TextBold";
|
|
8
7
|
import MoodIcon from "./MoodIcon";
|
|
9
8
|
const MoodEnum = Logbook.Enums.MoodEnum;
|
|
@@ -56,7 +55,7 @@ const emotionStyles = StyleSheet.create({
|
|
|
56
55
|
},
|
|
57
56
|
feelingText: {
|
|
58
57
|
textAlign: `center`,
|
|
59
|
-
color:
|
|
58
|
+
color: `white`,
|
|
60
59
|
fontSize: Dimensions.get(`screen`).width / 26,
|
|
61
60
|
},
|
|
62
61
|
moodIconContainer: { flex: 1, flexDirection: `row`, justifyContent: `center` },
|
|
@@ -1,28 +1,10 @@
|
|
|
1
1
|
import { IInterval } from "../types/types";
|
|
2
|
-
/** Reusable color
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
dustyBlue: string;
|
|
9
|
-
fadeBlue: string;
|
|
10
|
-
lightBlue: string;
|
|
11
|
-
mistBlue: string;
|
|
12
|
-
purple: string;
|
|
13
|
-
teal: string;
|
|
14
|
-
gradientMain: string[];
|
|
15
|
-
gradientPurple: string[];
|
|
16
|
-
white: string;
|
|
17
|
-
black: string;
|
|
18
|
-
transparentWhite: string;
|
|
19
|
-
transparentBlack: string;
|
|
20
|
-
transparentDarkBlue: string;
|
|
21
|
-
transparentLightBlue: string;
|
|
22
|
-
activityGreen: string;
|
|
23
|
-
activityOrange: string;
|
|
24
|
-
activityRed: string;
|
|
25
|
-
};
|
|
2
|
+
/** Reusable color definition. */
|
|
3
|
+
export declare const BACKGROUND_COLOUR_PURPLE = "rgba(27, 31, 72, 1)";
|
|
4
|
+
/** Reusable color definition. */
|
|
5
|
+
export declare const BORDER_COLOUR_GREY = "rgba(74, 91, 134, 1)";
|
|
6
|
+
/** Reusable color definition. */
|
|
7
|
+
export declare const BORDER_COLOUR_TEAL = "rgba(1, 255, 252, 0.8)";
|
|
26
8
|
/** The threshold above which hyperglycemia is considered to be severe in mmol/L */
|
|
27
9
|
export declare const SEVERE_HYPERGLYCEMIA_START_MMOL = 15;
|
|
28
10
|
/** The number of seconds in four hours. */
|
|
@@ -1,28 +1,10 @@
|
|
|
1
1
|
import { BolusCalculator } from "@hedia/types";
|
|
2
|
-
/** Reusable color
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
dustyBlue: `#C5D0E7`,
|
|
9
|
-
fadeBlue: `#8388C8`,
|
|
10
|
-
lightBlue: `#C8CCFA`,
|
|
11
|
-
mistBlue: `#4A5B86`,
|
|
12
|
-
purple: `#a200ff`,
|
|
13
|
-
teal: `#01FFFC`,
|
|
14
|
-
gradientMain: [`#8B38F5`, `#D593E5`],
|
|
15
|
-
gradientPurple: [`#a200ff`, `#578aff`],
|
|
16
|
-
white: `#FFFFFF`,
|
|
17
|
-
black: `#000000`,
|
|
18
|
-
transparentWhite: `#FFFFFF00`,
|
|
19
|
-
transparentBlack: `#000000E6`,
|
|
20
|
-
transparentDarkBlue: `#0F123120`,
|
|
21
|
-
transparentLightBlue: `#578AFF1A`,
|
|
22
|
-
activityGreen: `#A5D871`,
|
|
23
|
-
activityOrange: `#F9BD5A`,
|
|
24
|
-
activityRed: `#EC5466`,
|
|
25
|
-
};
|
|
2
|
+
/** Reusable color definition. */
|
|
3
|
+
export const BACKGROUND_COLOUR_PURPLE = `rgba(27, 31, 72, 1)`;
|
|
4
|
+
/** Reusable color definition. */
|
|
5
|
+
export const BORDER_COLOUR_GREY = `rgba(74, 91, 134, 1)`;
|
|
6
|
+
/** Reusable color definition. */
|
|
7
|
+
export const BORDER_COLOUR_TEAL = `rgba(1, 255, 252, 0.8)`;
|
|
26
8
|
/** The threshold above which hyperglycemia is considered to be severe in mmol/L */
|
|
27
9
|
export const SEVERE_HYPERGLYCEMIA_START_MMOL = 15;
|
|
28
10
|
/** The number of seconds in four hours. */
|