jornada-ui 0.4.18 → 0.4.20
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/components/box/index.js +5 -5
- package/lib/commonjs/components/box/index.js.map +1 -1
- package/lib/commonjs/components/button/index.js +5 -5
- package/lib/commonjs/components/button/index.js.map +1 -1
- package/lib/commonjs/components/capture-photo/index.js +1 -1
- package/lib/commonjs/components/capture-photo/index.js.map +1 -1
- package/lib/commonjs/components/card-hours/index.js +5 -5
- package/lib/commonjs/components/card-hours/index.js.map +1 -1
- package/lib/commonjs/components/card-maintenance/index.js +3 -0
- package/lib/commonjs/components/card-maintenance/index.js.map +1 -1
- package/lib/commonjs/components/list-supplies/index.js +132 -111
- package/lib/commonjs/components/list-supplies/index.js.map +1 -1
- package/lib/commonjs/components/maintenance-description-input/index.js +5 -1
- package/lib/commonjs/components/maintenance-description-input/index.js.map +1 -1
- package/lib/commonjs/components/modal-maintenance/index.js +2 -0
- package/lib/commonjs/components/modal-maintenance/index.js.map +1 -1
- package/lib/commonjs/components/modal-type-activities/index.js +10 -4
- package/lib/commonjs/components/modal-type-activities/index.js.map +1 -1
- package/lib/commonjs/components/modals/modal-change-activitie-history/index.js +2 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/index.js.map +1 -1
- package/lib/commonjs/components/notification-details-card/index.js +6 -6
- package/lib/commonjs/components/report-bobinas/index.js +12 -6
- package/lib/commonjs/components/report-bobinas/index.js.map +1 -1
- package/lib/commonjs/components/resume-raking/index.js +5 -0
- package/lib/commonjs/components/resume-raking/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/index.js +12 -4
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/toast-message/index.js +10 -6
- package/lib/commonjs/components/toast-message/index.js.map +1 -1
- package/lib/commonjs/components/toggle-fuel/index.js +1 -0
- package/lib/commonjs/components/toggle-fuel/index.js.map +1 -1
- package/lib/commonjs/components/trip-details-card/index.js +218 -182
- package/lib/commonjs/components/trip-details-card/index.js.map +1 -1
- package/lib/commonjs/components/typography/index.js +2 -0
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/commonjs/components/user-journey-work-card/index.js +14 -0
- package/lib/commonjs/components/user-journey-work-card/index.js.map +1 -1
- package/lib/commonjs/components/user-profile/index.js +9 -1
- package/lib/commonjs/components/user-profile/index.js.map +1 -1
- package/lib/commonjs/components/weekly-hours-balance/index.js +2 -0
- package/lib/commonjs/components/weekly-hours-balance/index.js.map +1 -1
- package/lib/commonjs/index.js +32 -32
- package/lib/module/components/box/index.js +5 -5
- package/lib/module/components/box/index.js.map +1 -1
- package/lib/module/components/button/index.js +5 -5
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/capture-photo/index.js +1 -1
- package/lib/module/components/capture-photo/index.js.map +1 -1
- package/lib/module/components/card-hours/index.js +5 -5
- package/lib/module/components/card-hours/index.js.map +1 -1
- package/lib/module/components/card-maintenance/index.js +3 -0
- package/lib/module/components/card-maintenance/index.js.map +1 -1
- package/lib/module/components/list-supplies/index.js +134 -113
- package/lib/module/components/list-supplies/index.js.map +1 -1
- package/lib/module/components/maintenance-description-input/index.js +5 -1
- package/lib/module/components/maintenance-description-input/index.js.map +1 -1
- package/lib/module/components/modal-maintenance/index.js +2 -0
- package/lib/module/components/modal-maintenance/index.js.map +1 -1
- package/lib/module/components/modal-type-activities/index.js +10 -4
- package/lib/module/components/modal-type-activities/index.js.map +1 -1
- package/lib/module/components/modals/modal-change-activitie-history/index.js +2 -0
- package/lib/module/components/modals/modal-change-activitie-history/index.js.map +1 -1
- package/lib/module/components/notification-details-card/index.js +6 -6
- package/lib/module/components/report-bobinas/index.js +12 -6
- package/lib/module/components/report-bobinas/index.js.map +1 -1
- package/lib/module/components/resume-raking/index.js +5 -0
- package/lib/module/components/resume-raking/index.js.map +1 -1
- package/lib/module/components/step-indicator/index.js +12 -4
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/toast-message/index.js +10 -6
- package/lib/module/components/toast-message/index.js.map +1 -1
- package/lib/module/components/toggle-fuel/index.js +1 -0
- package/lib/module/components/toggle-fuel/index.js.map +1 -1
- package/lib/module/components/trip-details-card/index.js +221 -184
- package/lib/module/components/trip-details-card/index.js.map +1 -1
- package/lib/module/components/typography/index.js +2 -0
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/components/user-journey-work-card/index.js +14 -0
- package/lib/module/components/user-journey-work-card/index.js.map +1 -1
- package/lib/module/components/user-profile/index.js +9 -1
- package/lib/module/components/user-profile/index.js.map +1 -1
- package/lib/module/components/weekly-hours-balance/index.js +2 -0
- package/lib/module/components/weekly-hours-balance/index.js.map +1 -1
- package/lib/module/index.js +4 -4
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/components/box/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/capture-photo/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-hours/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-maintenance/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/list-supplies/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/maintenance-description-input/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-maintenance/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-type-activities/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts +4 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/report-bobinas/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/resume-raking/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/toast-message/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/toast-message/interface.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/toast-message/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/toggle-fuel/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/trip-details-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/typography/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-profile/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/weekly-hours-balance/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/box/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/capture-photo/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-hours/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-maintenance/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/list-supplies/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/maintenance-description-input/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-maintenance/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-type-activities/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts +2 -0
- package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts +4 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/report-bobinas/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/resume-raking/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/resume-raking/interface.d.ts +13 -0
- package/lib/typescript/module/src/components/resume-raking/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/step-indicator/index.d.ts +3 -0
- package/lib/typescript/module/src/components/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/toast-message/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/toast-message/interface.d.ts +1 -0
- package/lib/typescript/module/src/components/toast-message/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/toggle-fuel/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/trip-details-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/typography/index.d.ts +1 -0
- package/lib/typescript/module/src/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-profile/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/weekly-hours-balance/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +4 -4
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/components/box/index.tsx +53 -53
- package/src/components/button/index.tsx +76 -76
- package/src/components/capture-photo/index.tsx +1 -1
- package/src/components/card-hours/index.tsx +121 -121
- package/src/components/card-maintenance/index.tsx +8 -2
- package/src/components/card-maintenance/interface.d.ts +4 -0
- package/src/components/list-supplies/index.tsx +178 -153
- package/src/components/maintenance-description-input/index.tsx +11 -4
- package/src/components/modal-maintenance/index.tsx +2 -1
- package/src/components/modal-maintenance/interface.d.ts +1 -0
- package/src/components/modal-type-activities/index.tsx +23 -5
- package/src/components/modal-type-activities/interface.ts +3 -0
- package/src/components/modals/modal-change-activitie-history/index.tsx +2 -1
- package/src/components/modals/modal-change-activitie-history/interface.ts +4 -0
- package/src/components/notification-details-card/index.tsx +180 -180
- package/src/components/report-bobinas/index.tsx +185 -175
- package/src/components/resume-raking/index.tsx +5 -1
- package/src/components/resume-raking/interface.ts +16 -0
- package/src/components/step-indicator/index.tsx +26 -8
- package/src/components/step-indicator/interface.d.ts +3 -0
- package/src/components/toast-message/index.tsx +77 -75
- package/src/components/toast-message/interface.ts +18 -17
- package/src/components/toggle-fuel/index.tsx +1 -0
- package/src/components/trip-details-card/index.tsx +65 -32
- package/src/components/typography/index.tsx +2 -0
- package/src/components/typography/interface.d.ts +104 -102
- package/src/components/user-journey-work-card/index.tsx +23 -2
- package/src/components/user-profile/index.tsx +10 -1
- package/src/components/weekly-hours-balance/index.tsx +2 -1
- package/src/index.tsx +4 -4
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
type ToastMessageCustoProps = {
|
|
5
|
-
text1?: string;
|
|
6
|
-
text2?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
type ToastMessageCustoProps = {
|
|
5
|
+
text1?: string;
|
|
6
|
+
text2?: string;
|
|
7
|
+
testID?: string;
|
|
8
|
+
options: "error" | "alert" | "success";
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
type BorderCustomToashProps = {
|
|
12
|
+
options: "error" | "alert" | "success";
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* EXPORTS
|
|
17
|
+
*/
|
|
18
|
+
export type { ToastMessageCustoProps, BorderCustomToashProps };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* IMPORTS
|
|
3
3
|
*/
|
|
4
|
-
import React, { useState } from "react";
|
|
5
|
-
import { View, TouchableOpacity,
|
|
4
|
+
import React, { useRef, useState } from "react";
|
|
5
|
+
import { View, TouchableOpacity, Animated, Easing } from "react-native";
|
|
6
6
|
|
|
7
7
|
// components
|
|
8
8
|
import Box from "../../components/box";
|
|
@@ -16,11 +16,9 @@ import { Icons } from "../../common/icons-svg";
|
|
|
16
16
|
import type { ITripDetailsCard } from "./interface";
|
|
17
17
|
import { asBaseComponent } from "../../@types/as-base-component";
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Components de details de viagem
|
|
21
|
+
*/
|
|
24
22
|
const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
25
23
|
dataRegistro,
|
|
26
24
|
numeroCte,
|
|
@@ -34,17 +32,33 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
34
32
|
kmVazio,
|
|
35
33
|
}) => {
|
|
36
34
|
const [expanded, setExpanded] = useState(true);
|
|
35
|
+
const animation = useRef(new Animated.Value(1)).current;
|
|
37
36
|
|
|
38
37
|
const toggleExpand = () => {
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
Animated.timing(animation, {
|
|
39
|
+
toValue: expanded ? 0 : 1,
|
|
40
|
+
duration: 300,
|
|
41
|
+
easing: Easing.out(Easing.ease),
|
|
42
|
+
useNativeDriver: false, // false pois animaremos altura (layout)
|
|
43
|
+
}).start();
|
|
44
|
+
setExpanded(!expanded);
|
|
41
45
|
};
|
|
42
46
|
|
|
43
47
|
const formatPeso = (v?: number) =>
|
|
44
|
-
v
|
|
48
|
+
v == null ? "Não informado" : `${v.toLocaleString("pt-BR")} kg`;
|
|
45
49
|
|
|
46
50
|
const formatBase = (v?: number) =>
|
|
47
|
-
v
|
|
51
|
+
v == null ? "Não informado" : `R$ ${v.toLocaleString("pt-BR")}`;
|
|
52
|
+
|
|
53
|
+
// altura animada e opacidade
|
|
54
|
+
const heightInterpolate = animation.interpolate({
|
|
55
|
+
inputRange: [0, 1],
|
|
56
|
+
outputRange: [0, 1],
|
|
57
|
+
});
|
|
58
|
+
const opacityInterpolate = animation.interpolate({
|
|
59
|
+
inputRange: [0, 1],
|
|
60
|
+
outputRange: [0, 1],
|
|
61
|
+
});
|
|
48
62
|
|
|
49
63
|
return (
|
|
50
64
|
<Box
|
|
@@ -84,20 +98,39 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
84
98
|
size={theme.fontSizes.md}
|
|
85
99
|
/>
|
|
86
100
|
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
101
|
+
<Animated.View
|
|
102
|
+
style={{
|
|
103
|
+
transform: [
|
|
104
|
+
{
|
|
105
|
+
rotate: animation.interpolate({
|
|
106
|
+
inputRange: [0, 1],
|
|
107
|
+
outputRange: ["180deg", "0deg"],
|
|
108
|
+
}),
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
}}
|
|
112
|
+
>
|
|
113
|
+
<Icons icon={"CHEVRON_UP"} color={theme.colors.gray[700]} size={20} />
|
|
114
|
+
</Animated.View>
|
|
92
115
|
</Box>
|
|
93
116
|
</TouchableOpacity>
|
|
94
117
|
|
|
95
|
-
{/*
|
|
96
|
-
|
|
97
|
-
|
|
118
|
+
{/* Conteúdo animado */}
|
|
119
|
+
<Animated.View
|
|
120
|
+
style={{
|
|
121
|
+
overflow: "hidden",
|
|
122
|
+
opacity: opacityInterpolate,
|
|
123
|
+
transform: [
|
|
124
|
+
{
|
|
125
|
+
scaleY: heightInterpolate,
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
}}
|
|
129
|
+
>
|
|
130
|
+
<Box marginStyle={{ marginTop: theme.margins["1xs"] }}>
|
|
98
131
|
<Box
|
|
99
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
100
132
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
133
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
101
134
|
>
|
|
102
135
|
<Typography
|
|
103
136
|
text={"Número CTE: "}
|
|
@@ -114,8 +147,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
114
147
|
</Box>
|
|
115
148
|
|
|
116
149
|
<Box
|
|
117
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
118
150
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
151
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
119
152
|
>
|
|
120
153
|
<Typography
|
|
121
154
|
text="Data carregamento: "
|
|
@@ -132,8 +165,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
132
165
|
</Box>
|
|
133
166
|
|
|
134
167
|
<Box
|
|
135
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
136
168
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
169
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
137
170
|
>
|
|
138
171
|
<Typography
|
|
139
172
|
text="Origem: "
|
|
@@ -150,8 +183,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
150
183
|
</Box>
|
|
151
184
|
|
|
152
185
|
<Box
|
|
153
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
154
186
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
187
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
155
188
|
>
|
|
156
189
|
<Typography
|
|
157
190
|
text="Destino: "
|
|
@@ -168,8 +201,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
168
201
|
</Box>
|
|
169
202
|
|
|
170
203
|
<Box
|
|
171
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
172
204
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
205
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
173
206
|
>
|
|
174
207
|
<Typography
|
|
175
208
|
text="Próximo carregamento: "
|
|
@@ -186,8 +219,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
186
219
|
</Box>
|
|
187
220
|
|
|
188
221
|
<Box
|
|
189
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
190
222
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
223
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
191
224
|
>
|
|
192
225
|
<Typography
|
|
193
226
|
text={"Peso: "}
|
|
@@ -196,7 +229,7 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
196
229
|
size={theme.fontSizes.xs}
|
|
197
230
|
/>
|
|
198
231
|
<Typography
|
|
199
|
-
text={`${formatPeso(peso)
|
|
232
|
+
text={`${formatPeso(peso)}`}
|
|
200
233
|
color={theme.colors.gray[700]}
|
|
201
234
|
fontFamily={theme.fonts.inter_regular_400}
|
|
202
235
|
size={theme.fontSizes.xs}
|
|
@@ -204,8 +237,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
204
237
|
</Box>
|
|
205
238
|
|
|
206
239
|
<Box
|
|
207
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
208
240
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
241
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
209
242
|
>
|
|
210
243
|
<Typography
|
|
211
244
|
text={"Km carregado: "}
|
|
@@ -222,8 +255,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
222
255
|
</Box>
|
|
223
256
|
|
|
224
257
|
<Box
|
|
225
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
226
258
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
259
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
227
260
|
>
|
|
228
261
|
<Typography
|
|
229
262
|
text={"Km vazio: "}
|
|
@@ -240,8 +273,8 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
240
273
|
</Box>
|
|
241
274
|
|
|
242
275
|
<Box
|
|
243
|
-
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
244
276
|
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
277
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
245
278
|
>
|
|
246
279
|
<Typography
|
|
247
280
|
text="Base para cálculo do PRO: "
|
|
@@ -250,14 +283,14 @@ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
|
250
283
|
size={theme.fontSizes.xs}
|
|
251
284
|
/>
|
|
252
285
|
<Typography
|
|
253
|
-
text={`${formatBase(baseCalculo)
|
|
286
|
+
text={`${formatBase(baseCalculo)}`}
|
|
254
287
|
color={theme.colors.gray[700]}
|
|
255
288
|
fontFamily={theme.fonts.inter_regular_400}
|
|
256
289
|
size={theme.fontSizes.xs}
|
|
257
290
|
/>
|
|
258
291
|
</Box>
|
|
259
|
-
|
|
260
|
-
|
|
292
|
+
</Box>
|
|
293
|
+
</Animated.View>
|
|
261
294
|
</Box>
|
|
262
295
|
</Box>
|
|
263
296
|
);
|
|
@@ -15,6 +15,7 @@ import type { ITextInterface } from "./interface";
|
|
|
15
15
|
const Typography = forwardRef<any, ITextInterface>((props, ref): React.ReactElement => {
|
|
16
16
|
// desestruturando as propiedades do componente
|
|
17
17
|
const {
|
|
18
|
+
testID = "typography",
|
|
18
19
|
text = "Hello Dev",
|
|
19
20
|
color = "#1E1E1E",
|
|
20
21
|
size = 23,
|
|
@@ -60,6 +61,7 @@ const Typography = forwardRef<any, ITextInterface>((props, ref): React.ReactElem
|
|
|
60
61
|
|
|
61
62
|
return (
|
|
62
63
|
<Text
|
|
64
|
+
testID={testID}
|
|
63
65
|
ref={ref}
|
|
64
66
|
numberOfLines={numberOfLines}
|
|
65
67
|
ellipsizeMode={ellipsizeMode}
|
|
@@ -1,102 +1,104 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import { type TextProps as RNTextProps } from "react-native";
|
|
5
|
-
|
|
6
|
-
import { theme } from "../../styles/theme/theme";
|
|
7
|
-
|
|
8
|
-
type ITextInterface = RNTextProps & {
|
|
9
|
-
/**
|
|
10
|
-
* Propiedade texto que serar renderizado pro usuário final
|
|
11
|
-
*/
|
|
12
|
-
text: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
* Define
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import { type TextProps as RNTextProps } from "react-native";
|
|
5
|
+
|
|
6
|
+
import { theme } from "../../styles/theme/theme";
|
|
7
|
+
|
|
8
|
+
type ITextInterface = RNTextProps & {
|
|
9
|
+
/**
|
|
10
|
+
* Propiedade texto que serar renderizado pro usuário final
|
|
11
|
+
*/
|
|
12
|
+
text: string;
|
|
13
|
+
|
|
14
|
+
testID?: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A propriedade CSS color define o valor da cor de primeiro plano do texto e das decorações de texto de um elemento e define o valor currentcolor. currentcolor pode ser usado como um valor indireto em outras propriedades e é o padrão para outras propriedades de cores, como border-color.
|
|
18
|
+
*/
|
|
19
|
+
color?: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Propiedade size define o tamanho e a orientação da caixa que é usada para representar uma página. Na maioria das vezes, esse tamanho corresponde ao tamanho alvo da página impressa, se aplicável.
|
|
23
|
+
*/
|
|
24
|
+
size?: number;
|
|
25
|
+
|
|
26
|
+
align?: "center" | "left" | "right";
|
|
27
|
+
lineHeight?: number;
|
|
28
|
+
letterSpacing?: keyof typeof theme.letterSpacing;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A propriedade text-decoration do CSS é usada para definir a formatação de underline, overline, line-through ou blink. As decorações underline e overline são posicionadas abaixo e acima do texto (respectivamente), e line-through cortando-o.
|
|
32
|
+
*/
|
|
33
|
+
textDecoration?: "line-through" | "underline" | "none";
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A propriedade CSS font-weight define o peso (ou negrito) da fonte. Os pesos disponíveis dependem da família de fontes definida atualmente.
|
|
37
|
+
*/
|
|
38
|
+
fontWeight?: "100" | "300" | "400" | "500" | "600" | "700";
|
|
39
|
+
|
|
40
|
+
// fontFamily?: keyof typeof theme.fonts;
|
|
41
|
+
fontFamily?: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A propriedade margin do CSS define a área de margem nos quatro lados do elemento. É uma abreviação que define todas as margens individuais de uma só vez: margin-top, margin-right (en-US), margin-bottom, e margin-left (en-US).
|
|
45
|
+
*/
|
|
46
|
+
margin?: number;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* A propriedade CSS define a área de margem no lado esquerdo de um elemento. Um valor positivo o coloca mais distante de seus vizinhos, enquanto um valor negativo o coloca mais próximo.margin-left
|
|
50
|
+
*/
|
|
51
|
+
marginLeft?: number;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A propriedade CSS define a área de margem no lado direito de um elemento. Um valor positivo o coloca mais distante de seus vizinhos, enquanto um valor negativo o coloca mais próximo.margin-right
|
|
55
|
+
*/
|
|
56
|
+
marginRight?: number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* A propriedade CSS margin-top de um elemento indica o espaço acima do elemento. Valores negativos são aceitos.
|
|
60
|
+
*/
|
|
61
|
+
marginTop?: number;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* A propriedade CSS margin-bottom define a margin area na parte inferior de um elemento. Um valor positivo coloca o valor mais longe de outros elementos vizinhos, enquanto um valor negativo, aproxima.
|
|
65
|
+
*/
|
|
66
|
+
marginBottom?: number;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* A propriedade padding define uma a distância entre o conteúdo de um elemento e suas bordas. É um atalho que evita definir uma distância para cada lado separadamente (padding-top, padding-right, padding-bottom, padding-left).
|
|
70
|
+
*/
|
|
71
|
+
padding?: number;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* A propriedade CSS padding-left é um elemento que define o espaço de preenchimento obrigatório no lado esquerdo de um elemento. padding area é o espaço entre o conteúdo do elemento e a borda. Um valor negativo não é permitido.
|
|
75
|
+
*/
|
|
76
|
+
paddingLeft?: number;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* A propriedade CSS define a largura da área de preenchimento à direita de um elemento.padding-right
|
|
80
|
+
*/
|
|
81
|
+
paddingRight?: number;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* A propriedade CSS define a altura da área de preenchimento na parte superior de um elemento.padding-top
|
|
85
|
+
*/
|
|
86
|
+
paddingTop?: number;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* A propriedade CSS define a altura da área de preenchimento na parte inferior de um elemento.padding-bottom
|
|
90
|
+
*/
|
|
91
|
+
paddingBottom?: number;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Define o número máximo de linhas que o texto pode ocupar. Se o texto for maior que esse limite, ele será truncado. numberOfLines
|
|
95
|
+
*
|
|
96
|
+
* Define onde a elipse (...) será adicionada quando o texto for cortado devido ao numberOfLines.
|
|
97
|
+
*/
|
|
98
|
+
numberOfLines?: number;
|
|
99
|
+
ellipsizeMode?: "head" | "middle" | "tail" | "clip";
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* EXPORTS
|
|
103
|
+
*/
|
|
104
|
+
export { ITextInterface };
|
|
@@ -22,6 +22,7 @@ import { theme } from "../../styles/theme/theme";
|
|
|
22
22
|
const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
23
23
|
(props, ref): React.ReactElement => {
|
|
24
24
|
const {
|
|
25
|
+
testID = "user-journey-work-card",
|
|
25
26
|
name = "Expresso F.",
|
|
26
27
|
workDate = "25/01/2025",
|
|
27
28
|
initialTime = "00:40",
|
|
@@ -35,6 +36,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
35
36
|
} = props;
|
|
36
37
|
return (
|
|
37
38
|
<Box
|
|
39
|
+
testID={testID}
|
|
38
40
|
ref={ref}
|
|
39
41
|
width={width}
|
|
40
42
|
paddingStyle={{ padding: theme.paddings.md }}
|
|
@@ -57,6 +59,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
57
59
|
>
|
|
58
60
|
<TouchableOpacity onPress={handleNavigation}>
|
|
59
61
|
<Image
|
|
62
|
+
testID={`${testID}-avatar`}
|
|
60
63
|
style={{
|
|
61
64
|
width: 50,
|
|
62
65
|
height: 50,
|
|
@@ -72,6 +75,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
72
75
|
<Box flexStyle={{ flexDirection: "row" }}>
|
|
73
76
|
<Box>
|
|
74
77
|
<Typography
|
|
78
|
+
testID={`${testID}-nome-label`}
|
|
75
79
|
text={`Motorista(a): `}
|
|
76
80
|
size={theme.fontSizes.xs}
|
|
77
81
|
color={theme.colors.black[100]}
|
|
@@ -82,6 +86,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
82
86
|
</Box>
|
|
83
87
|
<Box>
|
|
84
88
|
<Typography
|
|
89
|
+
testID={`${testID}-nome-value`}
|
|
85
90
|
text={`${name}`}
|
|
86
91
|
size={theme.fontSizes.xs}
|
|
87
92
|
color={theme.colors.gray[800]}
|
|
@@ -96,6 +101,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
96
101
|
<Icons icon={"CALENDAR"} size={22} />
|
|
97
102
|
|
|
98
103
|
<Typography
|
|
104
|
+
testID={`${testID}-work-date-label`}
|
|
99
105
|
text={"Jornada Trabalho: "}
|
|
100
106
|
fontFamily={theme.fonts.inter_bold_700}
|
|
101
107
|
size={theme.fontSizes.xs}
|
|
@@ -104,6 +110,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
104
110
|
lineHeight={theme.lineHeight["2xl"]}
|
|
105
111
|
/>
|
|
106
112
|
<Typography
|
|
113
|
+
testID={`${testID}-work-date-value`}
|
|
107
114
|
text={workDate}
|
|
108
115
|
size={theme.fontSizes.xs}
|
|
109
116
|
fontFamily={theme.fonts.inter_regular_400}
|
|
@@ -127,7 +134,11 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
127
134
|
</Box>
|
|
128
135
|
</Box>
|
|
129
136
|
|
|
130
|
-
<TouchableOpacity
|
|
137
|
+
<TouchableOpacity
|
|
138
|
+
testID={`${testID}-notification`}
|
|
139
|
+
activeOpacity={0.7}
|
|
140
|
+
onPress={handleNavigationNotification}
|
|
141
|
+
>
|
|
131
142
|
{counterBadge > 0 && (
|
|
132
143
|
<Box
|
|
133
144
|
backgroundColor={theme.colors.red[500]}
|
|
@@ -141,6 +152,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
141
152
|
]}
|
|
142
153
|
>
|
|
143
154
|
<Typography
|
|
155
|
+
testID={`${testID}-notification-text`}
|
|
144
156
|
text={`${counterBadge}`}
|
|
145
157
|
align={"center"}
|
|
146
158
|
size={theme.fontSizes["2xs"]}
|
|
@@ -151,7 +163,12 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
151
163
|
/>
|
|
152
164
|
</Box>
|
|
153
165
|
)}
|
|
154
|
-
<Icons
|
|
166
|
+
<Icons
|
|
167
|
+
testID={`${testID}-notification-icon`}
|
|
168
|
+
icon={"BELL"}
|
|
169
|
+
size={28}
|
|
170
|
+
style={{ position: "relative" }}
|
|
171
|
+
/>
|
|
155
172
|
</TouchableOpacity>
|
|
156
173
|
</Box>
|
|
157
174
|
|
|
@@ -169,6 +186,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
169
186
|
>
|
|
170
187
|
<Box marginStyle={{ marginRight: theme.margins.sm }}>
|
|
171
188
|
<Typography
|
|
189
|
+
testID={`${testID}-initial-time-value`}
|
|
172
190
|
text={`${initialTime}`}
|
|
173
191
|
size={theme.fontSizes.md}
|
|
174
192
|
align="center"
|
|
@@ -177,6 +195,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
177
195
|
/>
|
|
178
196
|
|
|
179
197
|
<Typography
|
|
198
|
+
testID={`${testID}-initial-time-label`}
|
|
180
199
|
text={"INÍCIO"}
|
|
181
200
|
size={theme.fontSizes["2xs"]}
|
|
182
201
|
align="center"
|
|
@@ -189,6 +208,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
189
208
|
|
|
190
209
|
<Box>
|
|
191
210
|
<Typography
|
|
211
|
+
testID={`${testID}-duration-value`}
|
|
192
212
|
text={`${duration}`}
|
|
193
213
|
size={theme.fontSizes.md}
|
|
194
214
|
align="center"
|
|
@@ -197,6 +217,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
|
|
|
197
217
|
/>
|
|
198
218
|
|
|
199
219
|
<Typography
|
|
220
|
+
testID={`${testID}-duration-label`}
|
|
200
221
|
text={"DURAÇÃO"}
|
|
201
222
|
size={theme.fontSizes["2xs"]}
|
|
202
223
|
align="center"
|