react-native-exp-fig 0.1.41 → 0.1.43
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/@types/as-base-component.js.map +1 -1
- package/lib/commonjs/common/icons-svg/arrow-down/index.js +51 -0
- package/lib/commonjs/common/icons-svg/arrow-down/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/constants/index.js +3 -1
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/user-circle/index.js +37 -0
- package/lib/commonjs/common/icons-svg/user-circle/index.js.map +1 -0
- package/lib/commonjs/components/active-loadings-summary/index.js +88 -0
- package/lib/commonjs/components/active-loadings-summary/index.js.map +1 -0
- package/lib/commonjs/components/active-loadings-summary/interface.d.js +6 -0
- package/lib/commonjs/components/active-loadings-summary/interface.d.js.map +1 -0
- package/lib/commonjs/components/alert-critical-load/index.js +64 -0
- package/lib/commonjs/components/alert-critical-load/index.js.map +1 -0
- package/lib/commonjs/components/alert-critical-load/interface.js +6 -0
- package/lib/commonjs/components/alert-critical-load/interface.js.map +1 -0
- package/lib/commonjs/components/alert-critical-load/styles.js +40 -0
- package/lib/commonjs/components/alert-critical-load/styles.js.map +1 -0
- package/lib/commonjs/components/card-available-load/index.js +131 -0
- package/lib/commonjs/components/card-available-load/index.js.map +1 -0
- package/lib/commonjs/components/card-available-load/interface.js +6 -0
- package/lib/commonjs/components/card-available-load/interface.js.map +1 -0
- package/lib/commonjs/components/card-available-load/style.js +54 -0
- package/lib/commonjs/components/card-available-load/style.js.map +1 -0
- package/lib/commonjs/components/card-driver-data/index.js +105 -0
- package/lib/commonjs/components/card-driver-data/index.js.map +1 -0
- package/lib/commonjs/components/card-driver-data/interface.js +6 -0
- package/lib/commonjs/components/card-driver-data/interface.js.map +1 -0
- package/lib/commonjs/components/card-driver-data/style.js +55 -0
- package/lib/commonjs/components/card-driver-data/style.js.map +1 -0
- package/lib/commonjs/components/card-loading/index.js +9 -9
- package/lib/commonjs/components/card-loading/index.js.map +1 -1
- package/lib/commonjs/components/card-loading/interface.d.js.map +1 -1
- package/lib/commonjs/components/document-carga-info/index.js +98 -0
- package/lib/commonjs/components/document-carga-info/index.js.map +1 -0
- package/lib/commonjs/components/document-carga-info/interface.js +2 -0
- package/lib/commonjs/components/document-carga-info/interface.js.map +1 -0
- package/lib/commonjs/components/document-carga-info/styles.js +64 -0
- package/lib/commonjs/components/document-carga-info/styles.js.map +1 -0
- package/lib/commonjs/components/driver-journey-info/index.js +141 -0
- package/lib/commonjs/components/driver-journey-info/index.js.map +1 -0
- package/lib/commonjs/components/driver-journey-info/interface.js +6 -0
- package/lib/commonjs/components/driver-journey-info/interface.js.map +1 -0
- package/lib/commonjs/components/driver-journey-info/style.js +55 -0
- package/lib/commonjs/components/driver-journey-info/style.js.map +1 -0
- package/lib/commonjs/index.js +42 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/active-loadings-summary/active-loadings-summary.stories.js +63 -0
- package/lib/commonjs/stories/active-loadings-summary/active-loadings-summary.stories.js.map +1 -0
- package/lib/commonjs/stories/alert-critical-load/alert-critical-load.stories.js +58 -0
- package/lib/commonjs/stories/alert-critical-load/alert-critical-load.stories.js.map +1 -0
- package/lib/commonjs/stories/card-available-load/card-available-load.stories.js +94 -0
- package/lib/commonjs/stories/card-available-load/card-available-load.stories.js.map +1 -0
- package/lib/commonjs/stories/card-driver-data/card-driver-data.stories.js +81 -0
- package/lib/commonjs/stories/card-driver-data/card-driver-data.stories.js.map +1 -0
- package/lib/commonjs/stories/document-carga-info/document-carga-info.stories.js +76 -0
- package/lib/commonjs/stories/document-carga-info/document-carga-info.stories.js.map +1 -0
- package/lib/commonjs/stories/driver-journey-info/driver-journey-info.stories.js +87 -0
- package/lib/commonjs/stories/driver-journey-info/driver-journey-info.stories.js.map +1 -0
- package/lib/commonjs/styles/theme/theme.js +5 -4
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/commonjs/utils/status-color/return-color.js +4 -2
- package/lib/commonjs/utils/status-color/return-color.js.map +1 -1
- package/lib/module/@types/as-base-component.js.map +1 -1
- package/lib/module/common/icons-svg/arrow-down/index.js +45 -0
- package/lib/module/common/icons-svg/arrow-down/index.js.map +1 -0
- package/lib/module/common/icons-svg/constants/index.js +3 -1
- package/lib/module/common/icons-svg/constants/index.js.map +1 -1
- package/lib/module/common/icons-svg/user-circle/index.js +29 -0
- package/lib/module/common/icons-svg/user-circle/index.js.map +1 -0
- package/lib/module/components/active-loadings-summary/index.js +81 -0
- package/lib/module/components/active-loadings-summary/index.js.map +1 -0
- package/lib/module/components/active-loadings-summary/interface.d.js +2 -0
- package/lib/module/components/active-loadings-summary/interface.d.js.map +1 -0
- package/lib/module/components/alert-critical-load/index.js +63 -0
- package/lib/module/components/alert-critical-load/index.js.map +1 -0
- package/lib/module/components/alert-critical-load/interface.js +2 -0
- package/lib/module/components/alert-critical-load/interface.js.map +1 -0
- package/lib/module/components/alert-critical-load/styles.js +34 -0
- package/lib/module/components/alert-critical-load/styles.js.map +1 -0
- package/lib/module/components/card-available-load/index.js +130 -0
- package/lib/module/components/card-available-load/index.js.map +1 -0
- package/lib/module/components/card-available-load/interface.js +2 -0
- package/lib/module/components/card-available-load/interface.js.map +1 -0
- package/lib/module/components/card-available-load/style.js +49 -0
- package/lib/module/components/card-available-load/style.js.map +1 -0
- package/lib/module/components/card-driver-data/index.js +104 -0
- package/lib/module/components/card-driver-data/index.js.map +1 -0
- package/lib/module/components/card-driver-data/interface.js +2 -0
- package/lib/module/components/card-driver-data/interface.js.map +1 -0
- package/lib/module/components/card-driver-data/style.js +50 -0
- package/lib/module/components/card-driver-data/style.js.map +1 -0
- package/lib/module/components/card-loading/index.js +9 -9
- package/lib/module/components/card-loading/index.js.map +1 -1
- package/lib/module/components/card-loading/interface.d.js.map +1 -1
- package/lib/module/components/document-carga-info/index.js +97 -0
- package/lib/module/components/document-carga-info/index.js.map +1 -0
- package/lib/module/components/document-carga-info/interface.js +2 -0
- package/lib/module/components/document-carga-info/interface.js.map +1 -0
- package/lib/module/components/document-carga-info/styles.js +60 -0
- package/lib/module/components/document-carga-info/styles.js.map +1 -0
- package/lib/module/components/driver-journey-info/index.js +140 -0
- package/lib/module/components/driver-journey-info/index.js.map +1 -0
- package/lib/module/components/driver-journey-info/interface.js +2 -0
- package/lib/module/components/driver-journey-info/interface.js.map +1 -0
- package/lib/module/components/driver-journey-info/style.js +50 -0
- package/lib/module/components/driver-journey-info/style.js.map +1 -0
- package/lib/module/index.js +8 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/active-loadings-summary/active-loadings-summary.stories.js +57 -0
- package/lib/module/stories/active-loadings-summary/active-loadings-summary.stories.js.map +1 -0
- package/lib/module/stories/alert-critical-load/alert-critical-load.stories.js +50 -0
- package/lib/module/stories/alert-critical-load/alert-critical-load.stories.js.map +1 -0
- package/lib/module/stories/card-available-load/card-available-load.stories.js +86 -0
- package/lib/module/stories/card-available-load/card-available-load.stories.js.map +1 -0
- package/lib/module/stories/card-driver-data/card-driver-data.stories.js +73 -0
- package/lib/module/stories/card-driver-data/card-driver-data.stories.js.map +1 -0
- package/lib/module/stories/document-carga-info/document-carga-info.stories.js +68 -0
- package/lib/module/stories/document-carga-info/document-carga-info.stories.js.map +1 -0
- package/lib/module/stories/driver-journey-info/driver-journey-info.stories.js +79 -0
- package/lib/module/stories/driver-journey-info/driver-journey-info.stories.js.map +1 -0
- package/lib/module/styles/theme/theme.js +5 -4
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/module/utils/status-color/return-color.js +4 -2
- package/lib/module/utils/status-color/return-color.js.map +1 -1
- package/lib/typescript/src/common/icons-svg/arrow-down/index.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/constants/index.d.ts +2 -0
- package/lib/typescript/src/common/icons-svg/user-circle/index.d.ts +10 -0
- package/lib/typescript/src/components/active-loadings-summary/index.d.ts +10 -0
- package/lib/typescript/src/components/alert-critical-load/index.d.ts +11 -0
- package/lib/typescript/src/components/alert-critical-load/interface.d.ts +9 -0
- package/lib/typescript/src/components/alert-critical-load/styles.d.ts +28 -0
- package/lib/typescript/src/components/card-available-load/index.d.ts +11 -0
- package/lib/typescript/src/components/card-available-load/interface.d.ts +30 -0
- package/lib/typescript/src/components/card-available-load/style.d.ts +8 -0
- package/lib/typescript/src/components/card-driver-data/index.d.ts +11 -0
- package/lib/typescript/src/components/card-driver-data/interface.d.ts +27 -0
- package/lib/typescript/src/components/card-driver-data/style.d.ts +8 -0
- package/lib/typescript/src/components/document-carga-info/index.d.ts +11 -0
- package/lib/typescript/src/components/document-carga-info/interface.d.ts +15 -0
- package/lib/typescript/src/components/document-carga-info/styles.d.ts +50 -0
- package/lib/typescript/src/components/driver-journey-info/index.d.ts +11 -0
- package/lib/typescript/src/components/driver-journey-info/interface.d.ts +28 -0
- package/lib/typescript/src/components/driver-journey-info/style.d.ts +8 -0
- package/lib/typescript/src/components/selects/select-date-and-hours/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/stories/active-loadings-summary/active-loadings-summary.stories.d.ts +8 -0
- package/lib/typescript/src/stories/alert-critical-load/alert-critical-load.stories.d.ts +9 -0
- package/lib/typescript/src/stories/card-available-load/card-available-load.stories.d.ts +10 -0
- package/lib/typescript/src/stories/card-driver-data/card-driver-data.stories.d.ts +10 -0
- package/lib/typescript/src/stories/document-carga-info/document-carga-info.stories.d.ts +10 -0
- package/lib/typescript/src/stories/driver-journey-info/driver-journey-info.stories.d.ts +10 -0
- package/lib/typescript/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/src/utils/status-color/return-color.d.ts +1 -1
- package/package.json +1 -1
- package/src/@types/as-base-component.ts +9 -9
- package/src/common/icons-svg/arrow-down/index.tsx +44 -0
- package/src/common/icons-svg/constants/index.ts +2 -0
- package/src/common/icons-svg/user-circle/index.tsx +29 -0
- package/src/components/active-loadings-summary/index.tsx +69 -0
- package/src/components/active-loadings-summary/interface.d.ts +16 -0
- package/src/components/alert-critical-load/index.tsx +83 -0
- package/src/components/alert-critical-load/interface.ts +13 -0
- package/src/components/alert-critical-load/styles.ts +35 -0
- package/src/components/card-available-load/index.tsx +163 -0
- package/src/components/card-available-load/interface.ts +36 -0
- package/src/components/card-available-load/style.ts +51 -0
- package/src/components/card-driver-data/index.tsx +139 -0
- package/src/components/card-driver-data/interface.ts +33 -0
- package/src/components/card-driver-data/style.ts +55 -0
- package/src/components/card-loading/index.tsx +276 -294
- package/src/components/card-loading/interface.d.ts +37 -37
- package/src/components/document-carga-info/index.tsx +137 -0
- package/src/components/document-carga-info/interface.ts +19 -0
- package/src/components/document-carga-info/styles.ts +65 -0
- package/src/components/driver-journey-info/index.tsx +185 -0
- package/src/components/driver-journey-info/interface.ts +36 -0
- package/src/components/driver-journey-info/style.ts +55 -0
- package/src/index.ts +56 -50
- package/src/stories/active-loadings-summary/active-loadings-summary.stories.tsx +59 -0
- package/src/stories/alert-critical-load/alert-critical-load.stories.tsx +51 -0
- package/src/stories/card-available-load/card-available-load.stories.tsx +85 -0
- package/src/stories/card-driver-data/card-driver-data.stories.tsx +73 -0
- package/src/stories/document-carga-info/document-carga-info.stories.tsx +72 -0
- package/src/stories/driver-journey-info/driver-journey-info.stories.tsx +79 -0
- package/src/styles/theme/theme.ts +192 -191
- package/src/utils/status-color/return-color.ts +3 -1
|
@@ -1,294 +1,276 @@
|
|
|
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 / icons
|
|
12
|
-
import { Icons } from "../../common/icons-svg";
|
|
13
|
-
|
|
14
|
-
// typings
|
|
15
|
-
import { ICardLoading } from "./interface";
|
|
16
|
-
|
|
17
|
-
// styles
|
|
18
|
-
import { theme } from "../../styles/theme/theme";
|
|
19
|
-
import {
|
|
20
|
-
getStatusTextColor,
|
|
21
|
-
getStatusColor,
|
|
22
|
-
StatusType,
|
|
23
|
-
} from "../../utils/status-color/return-color";
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* Componente CardLoading para a interação do usuário com ui.
|
|
28
|
-
*/
|
|
29
|
-
const CardLoading: React.FC<ICardLoading> = ({
|
|
30
|
-
width,
|
|
31
|
-
title = "Carregamento #01020304050607",
|
|
32
|
-
local = "Doca 1, Patío 03 - Usiminas Ipatinga",
|
|
33
|
-
vehicle = "EXP-0000",
|
|
34
|
-
prevision = "12:34 10/03/2025",
|
|
35
|
-
kg = 20,
|
|
36
|
-
qtdCoils = 10,
|
|
37
|
-
status = "Pendente",
|
|
38
|
-
handleNavigation,
|
|
39
|
-
testID,
|
|
40
|
-
}: ICardLoading) => {
|
|
41
|
-
return (
|
|
42
|
-
<TouchableOpacity onPress={handleNavigation} activeOpacity={0.7}>
|
|
43
|
-
<Box
|
|
44
|
-
testID={testID}
|
|
45
|
-
width={width ?? "100%"}
|
|
46
|
-
backgroundColor={theme.colors.blue[400]}
|
|
47
|
-
marginStyle={{ marginBottom: theme.margins.md }}
|
|
48
|
-
paddingStyle={{ padding: theme.paddings["2xs"] }}
|
|
49
|
-
borderStyled={{
|
|
50
|
-
borderWidth: theme.borderWidths.thin,
|
|
51
|
-
borderColor: theme.colors.blue[400],
|
|
52
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
53
|
-
}}
|
|
54
|
-
flexStyle={{ flexDirection: "row", justifyContent: "flex-start", alignItems: "center" }}
|
|
55
|
-
>
|
|
56
|
-
<Box width={"26%"} borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}>
|
|
57
|
-
<Image
|
|
58
|
-
source={{
|
|
59
|
-
uri: "https://th.bing.com/th/id/OIP.Rr9_IUNo8J66QbvQkxzXtwHaEJ?w=276&h=180&c=7&r=0&o=5&pid=1.7",
|
|
60
|
-
}}
|
|
61
|
-
style={{
|
|
62
|
-
width: "100%",
|
|
63
|
-
flex: 1,
|
|
64
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
65
|
-
}}
|
|
66
|
-
/>
|
|
67
|
-
</Box>
|
|
68
|
-
|
|
69
|
-
<Box width={"74%"} paddingStyle={{ paddingLeft: theme.paddings["2xs"] }}>
|
|
70
|
-
<Typography
|
|
71
|
-
text={title}
|
|
72
|
-
ellipsizeMode="tail"
|
|
73
|
-
numberOfLines={1}
|
|
74
|
-
color={theme.colors.neutral[25]}
|
|
75
|
-
size={theme.fontSizes.sm}
|
|
76
|
-
fontFamily={theme.fonts.inter_bold_700}
|
|
77
|
-
lineHeight={theme.fontSizes.xl ?? 20}
|
|
78
|
-
letterSpacing={"regular"}
|
|
79
|
-
marginBottom={4}
|
|
80
|
-
/>
|
|
81
|
-
|
|
82
|
-
<Typography
|
|
83
|
-
text={local}
|
|
84
|
-
color={theme.colors.neutral[25]}
|
|
85
|
-
size={theme.fontSizes.xs}
|
|
86
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
87
|
-
lineHeight={theme.fontSizes.md ?? 16}
|
|
88
|
-
letterSpacing={"regular"}
|
|
89
|
-
marginBottom={4}
|
|
90
|
-
/>
|
|
91
|
-
|
|
92
|
-
<Box
|
|
93
|
-
flexStyle={{
|
|
94
|
-
flexDirection: "row",
|
|
95
|
-
justifyContent: "flex-start",
|
|
96
|
-
alignItems: "center",
|
|
97
|
-
}}
|
|
98
|
-
marginStyle={{
|
|
99
|
-
marginBottom: 4,
|
|
100
|
-
}}
|
|
101
|
-
>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
size={theme.fontSizes
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
>
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
size={theme.fontSizes.xs}
|
|
278
|
-
fontFamily={theme.fonts.inter_bold_700}
|
|
279
|
-
lineHeight={theme.fontSizes.md ?? 16}
|
|
280
|
-
letterSpacing={"regular"}
|
|
281
|
-
marginLeft={4}
|
|
282
|
-
/>
|
|
283
|
-
</Box>
|
|
284
|
-
</Box>
|
|
285
|
-
</Box>
|
|
286
|
-
</Box>
|
|
287
|
-
</TouchableOpacity>
|
|
288
|
-
);
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* EXPORTS
|
|
293
|
-
*/
|
|
294
|
-
export { CardLoading };
|
|
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 / icons
|
|
12
|
+
import { Icons } from "../../common/icons-svg";
|
|
13
|
+
|
|
14
|
+
// typings
|
|
15
|
+
import { ICardLoading } from "./interface";
|
|
16
|
+
|
|
17
|
+
// styles
|
|
18
|
+
import { theme } from "../../styles/theme/theme";
|
|
19
|
+
import {
|
|
20
|
+
getStatusTextColor,
|
|
21
|
+
getStatusColor,
|
|
22
|
+
StatusType,
|
|
23
|
+
} from "../../utils/status-color/return-color";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* Componente CardLoading para a interação do usuário com ui.
|
|
28
|
+
*/
|
|
29
|
+
const CardLoading: React.FC<ICardLoading> = ({
|
|
30
|
+
width,
|
|
31
|
+
title = "Carregamento #01020304050607",
|
|
32
|
+
local = "Doca 1, Patío 03 - Usiminas Ipatinga",
|
|
33
|
+
vehicle = "EXP-0000",
|
|
34
|
+
prevision = "12:34 10/03/2025",
|
|
35
|
+
kg = 20,
|
|
36
|
+
qtdCoils = 10,
|
|
37
|
+
status = "Pendente",
|
|
38
|
+
handleNavigation,
|
|
39
|
+
testID,
|
|
40
|
+
}: ICardLoading) => {
|
|
41
|
+
return (
|
|
42
|
+
<TouchableOpacity onPress={handleNavigation} activeOpacity={0.7}>
|
|
43
|
+
<Box
|
|
44
|
+
testID={testID}
|
|
45
|
+
width={width ?? "100%"}
|
|
46
|
+
backgroundColor={theme.colors.blue[400]}
|
|
47
|
+
marginStyle={{ marginBottom: theme.margins.md }}
|
|
48
|
+
paddingStyle={{ padding: theme.paddings["2xs"] }}
|
|
49
|
+
borderStyled={{
|
|
50
|
+
borderWidth: theme.borderWidths.thin,
|
|
51
|
+
borderColor: theme.colors.blue[400],
|
|
52
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
53
|
+
}}
|
|
54
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start", alignItems: "center" }}
|
|
55
|
+
>
|
|
56
|
+
<Box width={"26%"} borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}>
|
|
57
|
+
<Image
|
|
58
|
+
source={{
|
|
59
|
+
uri: "https://th.bing.com/th/id/OIP.Rr9_IUNo8J66QbvQkxzXtwHaEJ?w=276&h=180&c=7&r=0&o=5&pid=1.7",
|
|
60
|
+
}}
|
|
61
|
+
style={{
|
|
62
|
+
width: "100%",
|
|
63
|
+
flex: 1,
|
|
64
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
65
|
+
}}
|
|
66
|
+
/>
|
|
67
|
+
</Box>
|
|
68
|
+
|
|
69
|
+
<Box width={"74%"} paddingStyle={{ paddingLeft: theme.paddings["2xs"] }}>
|
|
70
|
+
<Typography
|
|
71
|
+
text={title}
|
|
72
|
+
ellipsizeMode="tail"
|
|
73
|
+
numberOfLines={1}
|
|
74
|
+
color={theme.colors.neutral[25]}
|
|
75
|
+
size={theme.fontSizes.sm}
|
|
76
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
77
|
+
lineHeight={theme.fontSizes.xl ?? 20}
|
|
78
|
+
letterSpacing={"regular"}
|
|
79
|
+
marginBottom={4}
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
<Typography
|
|
83
|
+
text={local}
|
|
84
|
+
color={theme.colors.neutral[25]}
|
|
85
|
+
size={theme.fontSizes.xs}
|
|
86
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
87
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
88
|
+
letterSpacing={"regular"}
|
|
89
|
+
marginBottom={4}
|
|
90
|
+
/>
|
|
91
|
+
|
|
92
|
+
<Box
|
|
93
|
+
flexStyle={{
|
|
94
|
+
flexDirection: "row",
|
|
95
|
+
justifyContent: "flex-start",
|
|
96
|
+
alignItems: "center",
|
|
97
|
+
}}
|
|
98
|
+
marginStyle={{
|
|
99
|
+
marginBottom: 4,
|
|
100
|
+
}}
|
|
101
|
+
>
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
<Box
|
|
105
|
+
flexStyle={{
|
|
106
|
+
flexDirection: "row",
|
|
107
|
+
alignItems: "center",
|
|
108
|
+
justifyContent: "space-between",
|
|
109
|
+
}}
|
|
110
|
+
marginStyle={{
|
|
111
|
+
marginRight: 8,
|
|
112
|
+
}}
|
|
113
|
+
>
|
|
114
|
+
<Icons
|
|
115
|
+
icon={"SCALES"}
|
|
116
|
+
size={theme.fontSizes["sm"]}
|
|
117
|
+
color={theme.colors.neutral[25]}
|
|
118
|
+
/>
|
|
119
|
+
<Typography
|
|
120
|
+
text={`${kg}KG`}
|
|
121
|
+
color={theme.colors.neutral[25]}
|
|
122
|
+
size={theme.fontSizes.xs}
|
|
123
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
124
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
125
|
+
letterSpacing={"regular"}
|
|
126
|
+
marginLeft={2}
|
|
127
|
+
/>
|
|
128
|
+
</Box>
|
|
129
|
+
|
|
130
|
+
<Box
|
|
131
|
+
flexStyle={{
|
|
132
|
+
flexDirection: "row",
|
|
133
|
+
alignItems: "center",
|
|
134
|
+
justifyContent: "space-between",
|
|
135
|
+
}}
|
|
136
|
+
>
|
|
137
|
+
<Icons icon={"TIMER"} size={theme.fontSizes["sm"]} color={theme.colors.neutral[25]} />
|
|
138
|
+
<Typography
|
|
139
|
+
text={`${qtdCoils}QTD`}
|
|
140
|
+
color={theme.colors.neutral[25]}
|
|
141
|
+
size={theme.fontSizes.xs}
|
|
142
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
143
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
144
|
+
letterSpacing={"regular"}
|
|
145
|
+
marginLeft={2}
|
|
146
|
+
/>
|
|
147
|
+
</Box>
|
|
148
|
+
</Box>
|
|
149
|
+
|
|
150
|
+
{/**DADOS DO VEÍCULOS */}
|
|
151
|
+
<Box
|
|
152
|
+
flexStyle={{
|
|
153
|
+
flexDirection: "row",
|
|
154
|
+
justifyContent: "flex-start",
|
|
155
|
+
alignItems: "center",
|
|
156
|
+
}}
|
|
157
|
+
marginStyle={{
|
|
158
|
+
marginBottom: 4,
|
|
159
|
+
}}
|
|
160
|
+
>
|
|
161
|
+
<Typography
|
|
162
|
+
text={"Dados Veículo:"}
|
|
163
|
+
color={theme.colors.neutral[25]}
|
|
164
|
+
size={theme.fontSizes.xs}
|
|
165
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
166
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
167
|
+
letterSpacing={"regular"}
|
|
168
|
+
/>
|
|
169
|
+
<Typography
|
|
170
|
+
text={vehicle}
|
|
171
|
+
color={theme.colors.neutral[25]}
|
|
172
|
+
size={theme.fontSizes.xs}
|
|
173
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
174
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
175
|
+
letterSpacing={"regular"}
|
|
176
|
+
marginLeft={4}
|
|
177
|
+
/>
|
|
178
|
+
</Box>
|
|
179
|
+
|
|
180
|
+
{/**PREVISÃO DO CARREGAMENTO */}
|
|
181
|
+
<Box
|
|
182
|
+
width={"100%"}
|
|
183
|
+
flexStyle={{
|
|
184
|
+
flexDirection: "row",
|
|
185
|
+
alignItems: "center",
|
|
186
|
+
justifyContent: "space-between",
|
|
187
|
+
}}
|
|
188
|
+
marginStyle={{
|
|
189
|
+
marginBottom: 8,
|
|
190
|
+
}}
|
|
191
|
+
>
|
|
192
|
+
<Box
|
|
193
|
+
flexStyle={{
|
|
194
|
+
flexDirection: "row",
|
|
195
|
+
justifyContent: "flex-start",
|
|
196
|
+
alignItems: "center",
|
|
197
|
+
}}
|
|
198
|
+
>
|
|
199
|
+
<Typography
|
|
200
|
+
text={"Previsão:"}
|
|
201
|
+
color={theme.colors.neutral[25]}
|
|
202
|
+
size={theme.fontSizes.xs}
|
|
203
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
204
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
205
|
+
letterSpacing={"regular"}
|
|
206
|
+
/>
|
|
207
|
+
<Typography
|
|
208
|
+
text={prevision}
|
|
209
|
+
color={theme.colors.neutral[25]}
|
|
210
|
+
size={theme.fontSizes.xs}
|
|
211
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
212
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
213
|
+
letterSpacing={"regular"}
|
|
214
|
+
marginLeft={4}
|
|
215
|
+
/>
|
|
216
|
+
</Box>
|
|
217
|
+
</Box>
|
|
218
|
+
|
|
219
|
+
{/**STATUS DO CARREGAMENTO */}
|
|
220
|
+
{status && (
|
|
221
|
+
<Box
|
|
222
|
+
width={"100%"}
|
|
223
|
+
flexStyle={{
|
|
224
|
+
flexDirection: "row",
|
|
225
|
+
alignItems: "center",
|
|
226
|
+
justifyContent: "space-between",
|
|
227
|
+
}}
|
|
228
|
+
marginStyle={{
|
|
229
|
+
marginBottom: 4,
|
|
230
|
+
}}
|
|
231
|
+
>
|
|
232
|
+
<Box
|
|
233
|
+
flexStyle={{
|
|
234
|
+
flexDirection: "row",
|
|
235
|
+
justifyContent: "flex-start",
|
|
236
|
+
alignItems: "center",
|
|
237
|
+
}}
|
|
238
|
+
backgroundColor={getStatusColor(status as StatusType)}
|
|
239
|
+
height={22}
|
|
240
|
+
borderStyled={{
|
|
241
|
+
borderWidth: 1,
|
|
242
|
+
borderRadius: 11,
|
|
243
|
+
borderColor: "transparent",
|
|
244
|
+
}}
|
|
245
|
+
paddingStyle={{ paddingLeft: 8, paddingRight: 8 }}
|
|
246
|
+
>
|
|
247
|
+
<Typography
|
|
248
|
+
text={"Status:"}
|
|
249
|
+
color={theme.colors.neutral[25]}
|
|
250
|
+
size={theme.fontSizes.xs}
|
|
251
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
252
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
253
|
+
letterSpacing={"regular"}
|
|
254
|
+
/>
|
|
255
|
+
<Typography
|
|
256
|
+
text={status ?? "N/A"}
|
|
257
|
+
color={getStatusTextColor(status as StatusType)}
|
|
258
|
+
size={theme.fontSizes.xs}
|
|
259
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
260
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
261
|
+
letterSpacing={"regular"}
|
|
262
|
+
marginLeft={4}
|
|
263
|
+
/>
|
|
264
|
+
</Box>
|
|
265
|
+
</Box>
|
|
266
|
+
)}
|
|
267
|
+
</Box>
|
|
268
|
+
</Box>
|
|
269
|
+
</TouchableOpacity>
|
|
270
|
+
);
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* EXPORTS
|
|
275
|
+
*/
|
|
276
|
+
export { CardLoading };
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import { TouchableOpacityProps } from "react-native";
|
|
5
|
-
|
|
6
|
-
// typing
|
|
7
|
-
import { IGlobalCss } from "../../styles/global/interface";
|
|
8
|
-
|
|
9
|
-
interface ICardLoading extends TouchableOpacityProps, IGlobalCss {
|
|
10
|
-
/**propriedade que indica o título do carregamento */
|
|
11
|
-
title?: string;
|
|
12
|
-
|
|
13
|
-
/**propriedade que indica o local do carregamento */
|
|
14
|
-
local?: string;
|
|
15
|
-
|
|
16
|
-
/**propriedade que indica o veiculo */
|
|
17
|
-
vehicle?: string;
|
|
18
|
-
|
|
19
|
-
/**propriedade que indica a previsão do carregamento */
|
|
20
|
-
prevision?: string;
|
|
21
|
-
|
|
22
|
-
/**propriedade que indica o peso do carregamento */
|
|
23
|
-
kg: number;
|
|
24
|
-
|
|
25
|
-
/**propriedade que indica a quantidade de bobinas do carregamento */
|
|
26
|
-
qtdCoils: number;
|
|
27
|
-
|
|
28
|
-
/**propriedade que indica o status do carregamento */
|
|
29
|
-
status?: string;
|
|
30
|
-
|
|
31
|
-
handleNavigation: () => void;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* EXPORTS
|
|
36
|
-
*/
|
|
37
|
-
export { ICardLoading };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import { TouchableOpacityProps } from "react-native";
|
|
5
|
+
|
|
6
|
+
// typing
|
|
7
|
+
import { IGlobalCss } from "../../styles/global/interface";
|
|
8
|
+
|
|
9
|
+
interface ICardLoading extends TouchableOpacityProps, IGlobalCss {
|
|
10
|
+
/**propriedade que indica o título do carregamento */
|
|
11
|
+
title?: string;
|
|
12
|
+
|
|
13
|
+
/**propriedade que indica o local do carregamento */
|
|
14
|
+
local?: string;
|
|
15
|
+
|
|
16
|
+
/**propriedade que indica o veiculo */
|
|
17
|
+
vehicle?: string;
|
|
18
|
+
|
|
19
|
+
/**propriedade que indica a previsão do carregamento */
|
|
20
|
+
prevision?: string;
|
|
21
|
+
|
|
22
|
+
/**propriedade que indica o peso do carregamento */
|
|
23
|
+
kg: number;
|
|
24
|
+
|
|
25
|
+
/**propriedade que indica a quantidade de bobinas do carregamento */
|
|
26
|
+
qtdCoils: number;
|
|
27
|
+
|
|
28
|
+
/**propriedade que indica o status do carregamento */
|
|
29
|
+
status?: string | null;
|
|
30
|
+
|
|
31
|
+
handleNavigation: () => void;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* EXPORTS
|
|
36
|
+
*/
|
|
37
|
+
export { ICardLoading };
|