react-native-exp-fig 0.1.13 → 0.1.15
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/lib/commonjs/common/icons-svg/agent/index.js +2 -2
- package/lib/commonjs/common/icons-svg/agent/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/bed/index.js +4 -4
- package/lib/commonjs/common/icons-svg/bed/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/car/index.js +4 -4
- package/lib/commonjs/common/icons-svg/car/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/check-outline/index.js +6 -6
- package/lib/commonjs/common/icons-svg/check-outline/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/coffee/index.js +4 -4
- package/lib/commonjs/common/icons-svg/coffee/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/constants/index.js +4 -4
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/index.js +4 -4
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/pencil/index.js +4 -4
- package/lib/commonjs/common/icons-svg/pencil/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/refresh-ccw-dot/index.js +2 -2
- package/lib/commonjs/common/icons-svg/refresh-ccw-dot/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/truck-activity/index.js +4 -4
- package/lib/commonjs/common/icons-svg/truck-activity/index.js.map +1 -1
- package/lib/commonjs/components/activities-daily/index.js +4 -4
- package/lib/commonjs/components/activities-daily/index.js.map +1 -1
- package/lib/commonjs/components/activities-daily/interface.d.js.map +1 -1
- package/lib/commonjs/components/activities-progress/index.js +4 -4
- package/lib/commonjs/components/activities-progress/index.js.map +1 -1
- package/lib/commonjs/components/activities-progress/interface.d.js.map +1 -1
- package/lib/commonjs/components/avatar-profile/index.js.map +1 -1
- package/lib/commonjs/components/avatar-profile/interface.d.js.map +1 -1
- package/lib/commonjs/components/card-history/index.js +7 -7
- package/lib/commonjs/components/card-history/index.js.map +1 -1
- package/lib/commonjs/components/card-loading/index.js +7 -7
- package/lib/commonjs/components/card-loading/index.js.map +1 -1
- package/lib/commonjs/components/card-work-session/index.js +4 -4
- package/lib/commonjs/components/card-work-session/index.js.map +1 -1
- package/lib/commonjs/components/check-box/index.js +6 -6
- package/lib/commonjs/components/check-box/index.js.map +1 -1
- package/lib/commonjs/components/check-box/interface.d.js.map +1 -1
- package/lib/commonjs/components/coil/index.js +4 -4
- package/lib/commonjs/components/coil/index.js.map +1 -1
- package/lib/commonjs/components/coil/interface.d.js.map +1 -1
- package/lib/commonjs/components/filter-date-selector/index.js +7 -7
- package/lib/commonjs/components/filter-date-selector/index.js.map +1 -1
- package/lib/commonjs/components/history-details/index.js +1 -2
- package/lib/commonjs/components/history-details/index.js.map +1 -1
- package/lib/commonjs/components/history-details/interface.d.js.map +1 -1
- package/lib/commonjs/components/image-capture-with-remove/index.js +7 -7
- package/lib/commonjs/components/image-capture-with-remove/index.js.map +1 -1
- package/lib/commonjs/components/image-capture-with-remove/interface.d.js.map +1 -1
- package/lib/commonjs/components/loading-progress/index.js +12 -9
- package/lib/commonjs/components/loading-progress/index.js.map +1 -1
- package/lib/commonjs/components/notification-loading/index.js +9 -2
- package/lib/commonjs/components/notification-loading/index.js.map +1 -1
- package/lib/commonjs/components/notification-loading/interface.d.js.map +1 -1
- package/lib/commonjs/components/profile-menu-option/index.js.map +1 -1
- package/lib/commonjs/components/profile-menu-option/interface.d.js.map +1 -1
- package/lib/commonjs/components/step-indicator/index.js +6 -6
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/interface.d.js.map +1 -1
- package/lib/commonjs/components/step-indicator/styles.js +9 -8
- package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
- package/lib/commonjs/components/user-profile/index.js +6 -6
- package/lib/commonjs/components/user-profile/index.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/activities-daily/activities-daily.stories.js.map +1 -1
- package/lib/commonjs/stories/activities-progress/activities-progress.stories.js.map +1 -1
- package/lib/commonjs/stories/avatar-profile/avatar-profile.stories.js.map +1 -1
- package/lib/commonjs/stories/card-loading/card-loading.stories.js.map +1 -1
- package/lib/commonjs/stories/check-box/check-box.stories.js.map +1 -1
- package/lib/commonjs/stories/coil/coil.stories.js.map +1 -1
- package/lib/commonjs/stories/filter-date-selector/filter-date-selector.stories.js.map +1 -1
- package/lib/commonjs/stories/history-details/history-details.stories.js.map +1 -1
- package/lib/commonjs/stories/image-capture-with-remove/image-capture-with-remove.stories.js.map +1 -1
- package/lib/commonjs/stories/notification-loading/notification-loading.stories.js.map +1 -1
- package/lib/commonjs/stories/profile-menu-option/profile-menu-option.stories.js.map +1 -1
- package/lib/commonjs/stories/step-indicator/step-indicator.stories.js.map +1 -1
- package/lib/commonjs/styles/theme/theme.js +4 -4
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/commonjs/utils/format-data/index.js +11 -11
- package/lib/commonjs/utils/format-data/index.js.map +1 -1
- package/lib/commonjs/utils/status-color/return-color.js.map +1 -1
- package/lib/module/common/icons-svg/agent/index.js +2 -2
- package/lib/module/common/icons-svg/agent/index.js.map +1 -1
- package/lib/module/common/icons-svg/bed/index.js +4 -4
- package/lib/module/common/icons-svg/bed/index.js.map +1 -1
- package/lib/module/common/icons-svg/car/index.js +4 -4
- package/lib/module/common/icons-svg/car/index.js.map +1 -1
- package/lib/module/common/icons-svg/check-outline/index.js +6 -6
- package/lib/module/common/icons-svg/check-outline/index.js.map +1 -1
- package/lib/module/common/icons-svg/coffee/index.js +4 -4
- package/lib/module/common/icons-svg/coffee/index.js.map +1 -1
- package/lib/module/common/icons-svg/constants/index.js +4 -4
- package/lib/module/common/icons-svg/constants/index.js.map +1 -1
- package/lib/module/common/icons-svg/index.js +4 -4
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/common/icons-svg/pencil/index.js +4 -4
- package/lib/module/common/icons-svg/pencil/index.js.map +1 -1
- package/lib/module/common/icons-svg/refresh-ccw-dot/index.js +2 -2
- package/lib/module/common/icons-svg/refresh-ccw-dot/index.js.map +1 -1
- package/lib/module/common/icons-svg/truck-activity/index.js +4 -4
- package/lib/module/common/icons-svg/truck-activity/index.js.map +1 -1
- package/lib/module/components/activities-daily/index.js +4 -4
- package/lib/module/components/activities-daily/index.js.map +1 -1
- package/lib/module/components/activities-daily/interface.d.js.map +1 -1
- package/lib/module/components/activities-progress/index.js +4 -4
- package/lib/module/components/activities-progress/index.js.map +1 -1
- package/lib/module/components/activities-progress/interface.d.js.map +1 -1
- package/lib/module/components/avatar-profile/index.js.map +1 -1
- package/lib/module/components/avatar-profile/interface.d.js.map +1 -1
- package/lib/module/components/card-history/index.js +7 -7
- package/lib/module/components/card-history/index.js.map +1 -1
- package/lib/module/components/card-loading/index.js +7 -7
- package/lib/module/components/card-loading/index.js.map +1 -1
- package/lib/module/components/card-work-session/index.js +4 -4
- package/lib/module/components/card-work-session/index.js.map +1 -1
- package/lib/module/components/check-box/index.js +6 -6
- package/lib/module/components/check-box/index.js.map +1 -1
- package/lib/module/components/check-box/interface.d.js.map +1 -1
- package/lib/module/components/coil/index.js +4 -4
- package/lib/module/components/coil/index.js.map +1 -1
- package/lib/module/components/coil/interface.d.js.map +1 -1
- package/lib/module/components/filter-date-selector/index.js +7 -7
- package/lib/module/components/filter-date-selector/index.js.map +1 -1
- package/lib/module/components/history-details/index.js +1 -2
- package/lib/module/components/history-details/index.js.map +1 -1
- package/lib/module/components/history-details/interface.d.js.map +1 -1
- package/lib/module/components/image-capture-with-remove/index.js +7 -7
- package/lib/module/components/image-capture-with-remove/index.js.map +1 -1
- package/lib/module/components/image-capture-with-remove/interface.d.js.map +1 -1
- package/lib/module/components/loading-progress/index.js +12 -9
- package/lib/module/components/loading-progress/index.js.map +1 -1
- package/lib/module/components/notification-loading/index.js +9 -2
- package/lib/module/components/notification-loading/index.js.map +1 -1
- package/lib/module/components/notification-loading/interface.d.js.map +1 -1
- package/lib/module/components/profile-menu-option/index.js.map +1 -1
- package/lib/module/components/profile-menu-option/interface.d.js.map +1 -1
- package/lib/module/components/step-indicator/index.js +6 -6
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/step-indicator/interface.d.js.map +1 -1
- package/lib/module/components/step-indicator/styles.js +9 -8
- package/lib/module/components/step-indicator/styles.js.map +1 -1
- package/lib/module/components/user-profile/index.js +6 -6
- package/lib/module/components/user-profile/index.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/activities-daily/activities-daily.stories.js.map +1 -1
- package/lib/module/stories/activities-progress/activities-progress.stories.js.map +1 -1
- package/lib/module/stories/avatar-profile/avatar-profile.stories.js.map +1 -1
- package/lib/module/stories/card-loading/card-loading.stories.js.map +1 -1
- package/lib/module/stories/check-box/check-box.stories.js.map +1 -1
- package/lib/module/stories/coil/coil.stories.js.map +1 -1
- package/lib/module/stories/filter-date-selector/filter-date-selector.stories.js.map +1 -1
- package/lib/module/stories/history-details/history-details.stories.js.map +1 -1
- package/lib/module/stories/image-capture-with-remove/image-capture-with-remove.stories.js.map +1 -1
- package/lib/module/stories/notification-loading/notification-loading.stories.js.map +1 -1
- package/lib/module/stories/profile-menu-option/profile-menu-option.stories.js.map +1 -1
- package/lib/module/stories/step-indicator/step-indicator.stories.js.map +1 -1
- package/lib/module/styles/theme/theme.js +4 -4
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/module/utils/format-data/index.js +11 -11
- package/lib/module/utils/format-data/index.js.map +1 -1
- package/lib/module/utils/status-color/return-color.js.map +1 -1
- package/lib/typescript/src/components/step-indicator/styles.d.ts +1 -0
- package/package.json +5 -5
- package/src/common/icons-svg/agent/index.tsx +40 -40
- package/src/common/icons-svg/bed/index.tsx +41 -41
- package/src/common/icons-svg/car/index.tsx +29 -29
- package/src/common/icons-svg/check-outline/index.tsx +42 -42
- package/src/common/icons-svg/coffee/index.tsx +43 -43
- package/src/common/icons-svg/constants/index.ts +63 -63
- package/src/common/icons-svg/index.tsx +255 -255
- package/src/common/icons-svg/pencil/index.tsx +32 -32
- package/src/common/icons-svg/refresh-ccw-dot/index.tsx +32 -32
- package/src/common/icons-svg/truck-activity/index.tsx +29 -29
- package/src/components/activities-daily/index.tsx +116 -116
- package/src/components/activities-daily/interface.d.ts +22 -22
- package/src/components/activities-progress/index.tsx +162 -162
- package/src/components/activities-progress/interface.d.ts +41 -41
- package/src/components/avatar-profile/index.tsx +95 -95
- package/src/components/avatar-profile/interface.d.ts +39 -39
- package/src/components/card-history/index.tsx +149 -149
- package/src/components/card-loading/index.tsx +278 -278
- package/src/components/card-work-session/index.tsx +187 -187
- package/src/components/check-box/index.tsx +94 -94
- package/src/components/check-box/interface.d.ts +31 -31
- package/src/components/coil/index.tsx +103 -103
- package/src/components/coil/interface.d.ts +26 -26
- package/src/components/filter-date-selector/index.tsx +101 -101
- package/src/components/history-details/index.tsx +1 -2
- package/src/components/history-details/interface.d.ts +18 -18
- package/src/components/image-capture-with-remove/index.tsx +89 -89
- package/src/components/image-capture-with-remove/interface.d.ts +25 -25
- package/src/components/loading-progress/index.tsx +92 -91
- package/src/components/notification-loading/index.tsx +9 -2
- package/src/components/notification-loading/interface.d.ts +35 -35
- package/src/components/profile-menu-option/index.tsx +65 -65
- package/src/components/profile-menu-option/interface.d.ts +42 -42
- package/src/components/step-indicator/index.tsx +164 -164
- package/src/components/step-indicator/interface.d.ts +34 -34
- package/src/components/step-indicator/styles.ts +68 -67
- package/src/components/user-profile/index.tsx +204 -204
- package/src/index.ts +42 -42
- package/src/stories/activities-daily/activities-daily.stories.tsx +40 -40
- package/src/stories/activities-progress/activities-progress.stories.tsx +61 -61
- package/src/stories/avatar-profile/avatar-profile.stories.tsx +32 -32
- package/src/stories/card-loading/card-loading.stories.tsx +85 -85
- package/src/stories/check-box/check-box.stories.tsx +81 -81
- package/src/stories/coil/coil.stories.tsx +98 -98
- package/src/stories/filter-date-selector/filter-date-selector.stories.tsx +122 -122
- package/src/stories/history-details/history-details.stories.tsx +36 -36
- package/src/stories/image-capture-with-remove/image-capture-with-remove.stories.tsx +57 -57
- package/src/stories/notification-loading/notification-loading.stories.tsx +88 -88
- package/src/stories/profile-menu-option/profile-menu-option.stories.tsx +70 -70
- package/src/stories/step-indicator/step-indicator.stories.tsx +124 -124
- package/src/styles/theme/theme.ts +170 -170
- package/src/utils/format-data/index.ts +66 -66
- package/src/utils/status-color/return-color.ts +23 -23
|
@@ -1,204 +1,204 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { Image, TouchableOpacity } from "react-native";
|
|
6
|
-
|
|
7
|
-
// components
|
|
8
|
-
import { Box } from "../box";
|
|
9
|
-
import { Typography } from "../typography";
|
|
10
|
-
|
|
11
|
-
// comons / constants
|
|
12
|
-
import { IMAGES } from "../../common/constants";
|
|
13
|
-
|
|
14
|
-
// typings
|
|
15
|
-
import { IUserProfile } from "./interface";
|
|
16
|
-
|
|
17
|
-
// styles
|
|
18
|
-
import { theme } from "../../styles/theme/theme";
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Componente Header para a interação do usuário com ui.
|
|
22
|
-
*/
|
|
23
|
-
const UserProfile: React.FC<IUserProfile> = ({
|
|
24
|
-
nome,
|
|
25
|
-
avatar,
|
|
26
|
-
cpf,
|
|
27
|
-
placa_cavalo,
|
|
28
|
-
bluetoothIsConnected,
|
|
29
|
-
app_version,
|
|
30
|
-
color,
|
|
31
|
-
width,
|
|
32
|
-
height,
|
|
33
|
-
handleProfileView,
|
|
34
|
-
testID,
|
|
35
|
-
}: IUserProfile) => {
|
|
36
|
-
return (
|
|
37
|
-
<Box
|
|
38
|
-
testID={testID}
|
|
39
|
-
width={width ?? "100%"}
|
|
40
|
-
height={height}
|
|
41
|
-
backgroundColor={theme.colors.blue[525]}
|
|
42
|
-
paddingStyle={{
|
|
43
|
-
paddingLeft: theme.paddings.md,
|
|
44
|
-
paddingRight: theme.paddings.md,
|
|
45
|
-
paddingBottom: theme.paddings["2xs"],
|
|
46
|
-
}}
|
|
47
|
-
>
|
|
48
|
-
<Box
|
|
49
|
-
width={"100%"}
|
|
50
|
-
flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }}
|
|
51
|
-
marginStyle={{ marginTop: theme.margins.md }}
|
|
52
|
-
>
|
|
53
|
-
<TouchableOpacity activeOpacity={0.7} onPress={handleProfileView}>
|
|
54
|
-
<Image
|
|
55
|
-
testID="user-profile-avatar"
|
|
56
|
-
source={{
|
|
57
|
-
uri: avatar || IMAGES.IMAGE_ANONIMA,
|
|
58
|
-
}}
|
|
59
|
-
style={{
|
|
60
|
-
width: 120,
|
|
61
|
-
height: 120,
|
|
62
|
-
borderRadius: 60,
|
|
63
|
-
borderWidth: theme.borderWidths.thin_medium,
|
|
64
|
-
borderColor: theme.colors.green[400],
|
|
65
|
-
}}
|
|
66
|
-
/>
|
|
67
|
-
</TouchableOpacity>
|
|
68
|
-
</Box>
|
|
69
|
-
|
|
70
|
-
<Box
|
|
71
|
-
width={"100%"}
|
|
72
|
-
flexStyle={{ flexDirection: "column", alignItems: "center", justifyContent: "center" }}
|
|
73
|
-
>
|
|
74
|
-
<Box
|
|
75
|
-
width={"100%"}
|
|
76
|
-
flexStyle={{
|
|
77
|
-
flexDirection: "row",
|
|
78
|
-
alignItems: "center",
|
|
79
|
-
justifyContent: "flex-start",
|
|
80
|
-
textAlign: "center",
|
|
81
|
-
}}
|
|
82
|
-
paddingStyle={{ paddingTop: theme.paddings["2xs"] }}
|
|
83
|
-
>
|
|
84
|
-
<Typography
|
|
85
|
-
text={"Olá, "}
|
|
86
|
-
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
87
|
-
size={theme.fontSizes.md}
|
|
88
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
89
|
-
fontWeight="400"
|
|
90
|
-
lineHeight={theme.fontSizes.lg ?? 18}
|
|
91
|
-
letterSpacing={"regular"}
|
|
92
|
-
/>
|
|
93
|
-
<Box width={"89%"}>
|
|
94
|
-
<Typography
|
|
95
|
-
text={nome}
|
|
96
|
-
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
97
|
-
size={theme.fontSizes.sm}
|
|
98
|
-
fontFamily="inter_medium_500"
|
|
99
|
-
fontWeight="500"
|
|
100
|
-
ellipsizeMode="tail"
|
|
101
|
-
numberOfLines={1}
|
|
102
|
-
lineHeight={theme.fontSizes.lg ?? 18}
|
|
103
|
-
letterSpacing={"regular"}
|
|
104
|
-
/>
|
|
105
|
-
</Box>
|
|
106
|
-
</Box>
|
|
107
|
-
<Box
|
|
108
|
-
width={"100%"}
|
|
109
|
-
flexStyle={{
|
|
110
|
-
flexDirection: "row",
|
|
111
|
-
alignItems: "center",
|
|
112
|
-
justifyContent: "flex-start",
|
|
113
|
-
textAlign: "center",
|
|
114
|
-
}}
|
|
115
|
-
paddingStyle={{ paddingTop: 5 }}
|
|
116
|
-
>
|
|
117
|
-
<Typography
|
|
118
|
-
text={"CPF: "}
|
|
119
|
-
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
120
|
-
size={theme.fontSizes.md}
|
|
121
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
122
|
-
lineHeight={theme.fontSizes.lg ?? 18}
|
|
123
|
-
letterSpacing={"regular"}
|
|
124
|
-
/>
|
|
125
|
-
|
|
126
|
-
<Typography
|
|
127
|
-
text={cpf}
|
|
128
|
-
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
129
|
-
size={theme.fontSizes.sm}
|
|
130
|
-
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
131
|
-
fontWeight="600"
|
|
132
|
-
lineHeight={theme.fontSizes.lg ?? 18}
|
|
133
|
-
letterSpacing={"regular"}
|
|
134
|
-
/>
|
|
135
|
-
</Box>
|
|
136
|
-
<Box
|
|
137
|
-
width={"100%"}
|
|
138
|
-
flexStyle={{
|
|
139
|
-
flexDirection: "row",
|
|
140
|
-
alignItems: "center",
|
|
141
|
-
justifyContent: "flex-start",
|
|
142
|
-
textAlign: "center",
|
|
143
|
-
}}
|
|
144
|
-
paddingStyle={{ paddingTop: 5 }}
|
|
145
|
-
>
|
|
146
|
-
<Typography
|
|
147
|
-
text={"CONECTADO: "}
|
|
148
|
-
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
149
|
-
size={theme.fontSizes.sm}
|
|
150
|
-
fontFamily={theme.fonts.inter_medium_500}
|
|
151
|
-
fontWeight="500"
|
|
152
|
-
lineHeight={theme.fontSizes.lg ?? 18}
|
|
153
|
-
letterSpacing={"regular"}
|
|
154
|
-
/>
|
|
155
|
-
|
|
156
|
-
<Typography
|
|
157
|
-
text={bluetoothIsConnected ? placa_cavalo : ""}
|
|
158
|
-
color={theme.colors.green[400]}
|
|
159
|
-
size={theme.fontSizes.sm}
|
|
160
|
-
fontFamily={theme.fonts.inter_bold_700}
|
|
161
|
-
fontWeight="700"
|
|
162
|
-
lineHeight={theme.fontSizes.lg ?? 18}
|
|
163
|
-
letterSpacing={"regular"}
|
|
164
|
-
/>
|
|
165
|
-
</Box>
|
|
166
|
-
</Box>
|
|
167
|
-
|
|
168
|
-
<Box
|
|
169
|
-
width={"100%"}
|
|
170
|
-
flexStyle={{
|
|
171
|
-
flexDirection: "row",
|
|
172
|
-
alignItems: "center",
|
|
173
|
-
justifyContent: "flex-end",
|
|
174
|
-
}}
|
|
175
|
-
marginStyle={{ marginTop: theme.margins.md }}
|
|
176
|
-
>
|
|
177
|
-
<Typography
|
|
178
|
-
text={"Versão: "}
|
|
179
|
-
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
180
|
-
size={theme.fontSizes.md}
|
|
181
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
182
|
-
fontWeight="400"
|
|
183
|
-
lineHeight={theme.fontSizes.lg ?? 18}
|
|
184
|
-
letterSpacing={"regular"}
|
|
185
|
-
/>
|
|
186
|
-
|
|
187
|
-
<Typography
|
|
188
|
-
text={app_version}
|
|
189
|
-
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
190
|
-
size={theme.fontSizes.sm}
|
|
191
|
-
fontWeight="300"
|
|
192
|
-
fontFamily={theme.fonts.inter_light_300}
|
|
193
|
-
lineHeight={theme.fontSizes.lg ?? 18}
|
|
194
|
-
letterSpacing={"regular"}
|
|
195
|
-
/>
|
|
196
|
-
</Box>
|
|
197
|
-
</Box>
|
|
198
|
-
);
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* EXPORTS
|
|
203
|
-
*/
|
|
204
|
-
export { UserProfile };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Image, TouchableOpacity } from "react-native";
|
|
6
|
+
|
|
7
|
+
// components
|
|
8
|
+
import { Box } from "../box";
|
|
9
|
+
import { Typography } from "../typography";
|
|
10
|
+
|
|
11
|
+
// comons / constants
|
|
12
|
+
import { IMAGES } from "../../common/constants";
|
|
13
|
+
|
|
14
|
+
// typings
|
|
15
|
+
import { IUserProfile } from "./interface";
|
|
16
|
+
|
|
17
|
+
// styles
|
|
18
|
+
import { theme } from "../../styles/theme/theme";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Componente Header para a interação do usuário com ui.
|
|
22
|
+
*/
|
|
23
|
+
const UserProfile: React.FC<IUserProfile> = ({
|
|
24
|
+
nome,
|
|
25
|
+
avatar,
|
|
26
|
+
cpf,
|
|
27
|
+
placa_cavalo,
|
|
28
|
+
bluetoothIsConnected,
|
|
29
|
+
app_version,
|
|
30
|
+
color,
|
|
31
|
+
width,
|
|
32
|
+
height,
|
|
33
|
+
handleProfileView,
|
|
34
|
+
testID,
|
|
35
|
+
}: IUserProfile) => {
|
|
36
|
+
return (
|
|
37
|
+
<Box
|
|
38
|
+
testID={testID}
|
|
39
|
+
width={width ?? "100%"}
|
|
40
|
+
height={height}
|
|
41
|
+
backgroundColor={theme.colors.blue[525]}
|
|
42
|
+
paddingStyle={{
|
|
43
|
+
paddingLeft: theme.paddings.md,
|
|
44
|
+
paddingRight: theme.paddings.md,
|
|
45
|
+
paddingBottom: theme.paddings["2xs"],
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
48
|
+
<Box
|
|
49
|
+
width={"100%"}
|
|
50
|
+
flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }}
|
|
51
|
+
marginStyle={{ marginTop: theme.margins.md }}
|
|
52
|
+
>
|
|
53
|
+
<TouchableOpacity activeOpacity={0.7} onPress={handleProfileView}>
|
|
54
|
+
<Image
|
|
55
|
+
testID="user-profile-avatar"
|
|
56
|
+
source={{
|
|
57
|
+
uri: avatar || IMAGES.IMAGE_ANONIMA,
|
|
58
|
+
}}
|
|
59
|
+
style={{
|
|
60
|
+
width: 120,
|
|
61
|
+
height: 120,
|
|
62
|
+
borderRadius: 60,
|
|
63
|
+
borderWidth: theme.borderWidths.thin_medium,
|
|
64
|
+
borderColor: theme.colors.green[400],
|
|
65
|
+
}}
|
|
66
|
+
/>
|
|
67
|
+
</TouchableOpacity>
|
|
68
|
+
</Box>
|
|
69
|
+
|
|
70
|
+
<Box
|
|
71
|
+
width={"100%"}
|
|
72
|
+
flexStyle={{ flexDirection: "column", alignItems: "center", justifyContent: "center" }}
|
|
73
|
+
>
|
|
74
|
+
<Box
|
|
75
|
+
width={"100%"}
|
|
76
|
+
flexStyle={{
|
|
77
|
+
flexDirection: "row",
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
justifyContent: "flex-start",
|
|
80
|
+
textAlign: "center",
|
|
81
|
+
}}
|
|
82
|
+
paddingStyle={{ paddingTop: theme.paddings["2xs"] }}
|
|
83
|
+
>
|
|
84
|
+
<Typography
|
|
85
|
+
text={"Olá, "}
|
|
86
|
+
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
87
|
+
size={theme.fontSizes.md}
|
|
88
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
89
|
+
fontWeight="400"
|
|
90
|
+
lineHeight={theme.fontSizes.lg ?? 18}
|
|
91
|
+
letterSpacing={"regular"}
|
|
92
|
+
/>
|
|
93
|
+
<Box width={"89%"}>
|
|
94
|
+
<Typography
|
|
95
|
+
text={nome}
|
|
96
|
+
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
97
|
+
size={theme.fontSizes.sm}
|
|
98
|
+
fontFamily="inter_medium_500"
|
|
99
|
+
fontWeight="500"
|
|
100
|
+
ellipsizeMode="tail"
|
|
101
|
+
numberOfLines={1}
|
|
102
|
+
lineHeight={theme.fontSizes.lg ?? 18}
|
|
103
|
+
letterSpacing={"regular"}
|
|
104
|
+
/>
|
|
105
|
+
</Box>
|
|
106
|
+
</Box>
|
|
107
|
+
<Box
|
|
108
|
+
width={"100%"}
|
|
109
|
+
flexStyle={{
|
|
110
|
+
flexDirection: "row",
|
|
111
|
+
alignItems: "center",
|
|
112
|
+
justifyContent: "flex-start",
|
|
113
|
+
textAlign: "center",
|
|
114
|
+
}}
|
|
115
|
+
paddingStyle={{ paddingTop: 5 }}
|
|
116
|
+
>
|
|
117
|
+
<Typography
|
|
118
|
+
text={"CPF: "}
|
|
119
|
+
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
120
|
+
size={theme.fontSizes.md}
|
|
121
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
122
|
+
lineHeight={theme.fontSizes.lg ?? 18}
|
|
123
|
+
letterSpacing={"regular"}
|
|
124
|
+
/>
|
|
125
|
+
|
|
126
|
+
<Typography
|
|
127
|
+
text={cpf}
|
|
128
|
+
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
129
|
+
size={theme.fontSizes.sm}
|
|
130
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
131
|
+
fontWeight="600"
|
|
132
|
+
lineHeight={theme.fontSizes.lg ?? 18}
|
|
133
|
+
letterSpacing={"regular"}
|
|
134
|
+
/>
|
|
135
|
+
</Box>
|
|
136
|
+
<Box
|
|
137
|
+
width={"100%"}
|
|
138
|
+
flexStyle={{
|
|
139
|
+
flexDirection: "row",
|
|
140
|
+
alignItems: "center",
|
|
141
|
+
justifyContent: "flex-start",
|
|
142
|
+
textAlign: "center",
|
|
143
|
+
}}
|
|
144
|
+
paddingStyle={{ paddingTop: 5 }}
|
|
145
|
+
>
|
|
146
|
+
<Typography
|
|
147
|
+
text={"CONECTADO: "}
|
|
148
|
+
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
149
|
+
size={theme.fontSizes.sm}
|
|
150
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
151
|
+
fontWeight="500"
|
|
152
|
+
lineHeight={theme.fontSizes.lg ?? 18}
|
|
153
|
+
letterSpacing={"regular"}
|
|
154
|
+
/>
|
|
155
|
+
|
|
156
|
+
<Typography
|
|
157
|
+
text={bluetoothIsConnected ? placa_cavalo : ""}
|
|
158
|
+
color={theme.colors.green[400]}
|
|
159
|
+
size={theme.fontSizes.sm}
|
|
160
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
161
|
+
fontWeight="700"
|
|
162
|
+
lineHeight={theme.fontSizes.lg ?? 18}
|
|
163
|
+
letterSpacing={"regular"}
|
|
164
|
+
/>
|
|
165
|
+
</Box>
|
|
166
|
+
</Box>
|
|
167
|
+
|
|
168
|
+
<Box
|
|
169
|
+
width={"100%"}
|
|
170
|
+
flexStyle={{
|
|
171
|
+
flexDirection: "row",
|
|
172
|
+
alignItems: "center",
|
|
173
|
+
justifyContent: "flex-end",
|
|
174
|
+
}}
|
|
175
|
+
marginStyle={{ marginTop: theme.margins.md }}
|
|
176
|
+
>
|
|
177
|
+
<Typography
|
|
178
|
+
text={"Versão: "}
|
|
179
|
+
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
180
|
+
size={theme.fontSizes.md}
|
|
181
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
182
|
+
fontWeight="400"
|
|
183
|
+
lineHeight={theme.fontSizes.lg ?? 18}
|
|
184
|
+
letterSpacing={"regular"}
|
|
185
|
+
/>
|
|
186
|
+
|
|
187
|
+
<Typography
|
|
188
|
+
text={app_version}
|
|
189
|
+
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
190
|
+
size={theme.fontSizes.sm}
|
|
191
|
+
fontWeight="300"
|
|
192
|
+
fontFamily={theme.fonts.inter_light_300}
|
|
193
|
+
lineHeight={theme.fontSizes.lg ?? 18}
|
|
194
|
+
letterSpacing={"regular"}
|
|
195
|
+
/>
|
|
196
|
+
</Box>
|
|
197
|
+
</Box>
|
|
198
|
+
);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* EXPORTS
|
|
203
|
+
*/
|
|
204
|
+
export { UserProfile };
|
package/src/index.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EXPORTS
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
// Components
|
|
6
|
-
export { Box } from "./components/box";
|
|
7
|
-
export { Button } from "./components/button";
|
|
8
|
-
export { StepIndicator } from "./components/step-indicator";
|
|
9
|
-
export { Typography } from "./components/typography";
|
|
10
|
-
export { Input } from "./components/input";
|
|
11
|
-
export { CapturePhoto } from "./components/capture-photo";
|
|
12
|
-
export { CardHours } from "./components/card-hours";
|
|
13
|
-
export { SelectOption } from "./components/selects/select-option";
|
|
14
|
-
export { Header } from "./components/header-profile";
|
|
15
|
-
export { ScheduledJourneyIndicators } from "./components/scheduled-journey-indicators";
|
|
16
|
-
export { CardScheduledJourney } from "./components/card-scheduled-journey";
|
|
17
|
-
export { UserProfile } from "./components/user-profile";
|
|
18
|
-
export { MenuItem } from "./components/menu-item";
|
|
19
|
-
export { CardLoading } from "./components/card-loading";
|
|
20
|
-
export { CardWorkSession } from "./components/card-work-session";
|
|
21
|
-
export { LoadingProgress } from "./components/loading-progress";
|
|
22
|
-
export { NoData } from "./components/no-data";
|
|
23
|
-
export { FilterJourney } from "./components/filter-journey";
|
|
24
|
-
export { Coil } from "./components/coil";
|
|
25
|
-
export { FilterDateSelector } from "./components/filter-date-selector";
|
|
26
|
-
export { CardHistory } from "./components/card-history";
|
|
27
|
-
export { NotificationLoading } from "./components/notification-loading";
|
|
28
|
-
export { CheckBox } from "./components/check-box";
|
|
29
|
-
export { ImageCaptureWithRemove } from "./components/image-capture-with-remove";
|
|
30
|
-
export { LoadingDetails } from "./components/loading-details";
|
|
31
|
-
export { AvatarProfile } from "./components/avatar-profile";
|
|
32
|
-
export { HistoryDetails } from "./components/history-details";
|
|
33
|
-
export { ActivitiesDaily } from "./components/activities-daily";
|
|
34
|
-
export { ActivitiesProgress } from "./components/activities-progress";
|
|
35
|
-
export { ProfileMenuOption } from "./components/profile-menu-option";
|
|
36
|
-
|
|
37
|
-
// Utilities
|
|
38
|
-
export { multiply } from "./utils/mutiply";
|
|
39
|
-
export { formatDate, getLastSevenDays, formHoursMinute } from "./utils/format-data";
|
|
40
|
-
|
|
41
|
-
// Styles
|
|
42
|
-
export { theme } from "./styles/theme/theme";
|
|
1
|
+
/**
|
|
2
|
+
* EXPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Components
|
|
6
|
+
export { Box } from "./components/box";
|
|
7
|
+
export { Button } from "./components/button";
|
|
8
|
+
export { StepIndicator } from "./components/step-indicator";
|
|
9
|
+
export { Typography } from "./components/typography";
|
|
10
|
+
export { Input } from "./components/input";
|
|
11
|
+
export { CapturePhoto } from "./components/capture-photo";
|
|
12
|
+
export { CardHours } from "./components/card-hours";
|
|
13
|
+
export { SelectOption } from "./components/selects/select-option";
|
|
14
|
+
export { Header } from "./components/header-profile";
|
|
15
|
+
export { ScheduledJourneyIndicators } from "./components/scheduled-journey-indicators";
|
|
16
|
+
export { CardScheduledJourney } from "./components/card-scheduled-journey";
|
|
17
|
+
export { UserProfile } from "./components/user-profile";
|
|
18
|
+
export { MenuItem } from "./components/menu-item";
|
|
19
|
+
export { CardLoading } from "./components/card-loading";
|
|
20
|
+
export { CardWorkSession } from "./components/card-work-session";
|
|
21
|
+
export { LoadingProgress } from "./components/loading-progress";
|
|
22
|
+
export { NoData } from "./components/no-data";
|
|
23
|
+
export { FilterJourney } from "./components/filter-journey";
|
|
24
|
+
export { Coil } from "./components/coil";
|
|
25
|
+
export { FilterDateSelector } from "./components/filter-date-selector";
|
|
26
|
+
export { CardHistory } from "./components/card-history";
|
|
27
|
+
export { NotificationLoading } from "./components/notification-loading";
|
|
28
|
+
export { CheckBox } from "./components/check-box";
|
|
29
|
+
export { ImageCaptureWithRemove } from "./components/image-capture-with-remove";
|
|
30
|
+
export { LoadingDetails } from "./components/loading-details";
|
|
31
|
+
export { AvatarProfile } from "./components/avatar-profile";
|
|
32
|
+
export { HistoryDetails } from "./components/history-details";
|
|
33
|
+
export { ActivitiesDaily } from "./components/activities-daily";
|
|
34
|
+
export { ActivitiesProgress } from "./components/activities-progress";
|
|
35
|
+
export { ProfileMenuOption } from "./components/profile-menu-option";
|
|
36
|
+
|
|
37
|
+
// Utilities
|
|
38
|
+
export { multiply } from "./utils/mutiply";
|
|
39
|
+
export { formatDate, getLastSevenDays, formHoursMinute } from "./utils/format-data";
|
|
40
|
+
|
|
41
|
+
// Styles
|
|
42
|
+
export { theme } from "./styles/theme/theme";
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
import { ActivitiesDaily } from "../../components/activities-daily";
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof ActivitiesDaily> = {
|
|
6
|
-
title: "componente/ActivitiesDaily",
|
|
7
|
-
component: ActivitiesDaily,
|
|
8
|
-
args: {
|
|
9
|
-
handleActivity: (typeActivity) => {
|
|
10
|
-
return typeActivity;
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
parameters: {
|
|
14
|
-
notes: `
|
|
15
|
-
# ActivitiesDaily
|
|
16
|
-
|
|
17
|
-
Este é um componente de Card de atividades diárias.
|
|
18
|
-
Você usa assim:
|
|
19
|
-
\`\`\`tsx
|
|
20
|
-
<ActivitiesDaily
|
|
21
|
-
handleActivity={handleActivity}
|
|
22
|
-
/>
|
|
23
|
-
\`\`\`
|
|
24
|
-
`,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export default meta;
|
|
29
|
-
|
|
30
|
-
type Story = StoryObj<typeof meta>;
|
|
31
|
-
|
|
32
|
-
export const ActivitiesDailySimples: Story = {
|
|
33
|
-
name: "activities-daily",
|
|
34
|
-
args: {
|
|
35
|
-
handleActivity: (typeActivity: any) => {
|
|
36
|
-
/* global alert */
|
|
37
|
-
alert(typeActivity);
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
};
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { ActivitiesDaily } from "../../components/activities-daily";
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof ActivitiesDaily> = {
|
|
6
|
+
title: "componente/ActivitiesDaily",
|
|
7
|
+
component: ActivitiesDaily,
|
|
8
|
+
args: {
|
|
9
|
+
handleActivity: (typeActivity) => {
|
|
10
|
+
return typeActivity;
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
parameters: {
|
|
14
|
+
notes: `
|
|
15
|
+
# ActivitiesDaily
|
|
16
|
+
|
|
17
|
+
Este é um componente de Card de atividades diárias.
|
|
18
|
+
Você usa assim:
|
|
19
|
+
\`\`\`tsx
|
|
20
|
+
<ActivitiesDaily
|
|
21
|
+
handleActivity={handleActivity}
|
|
22
|
+
/>
|
|
23
|
+
\`\`\`
|
|
24
|
+
`,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default meta;
|
|
29
|
+
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
|
|
32
|
+
export const ActivitiesDailySimples: Story = {
|
|
33
|
+
name: "activities-daily",
|
|
34
|
+
args: {
|
|
35
|
+
handleActivity: (typeActivity: any) => {
|
|
36
|
+
/* global alert */
|
|
37
|
+
alert(typeActivity);
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|