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.
Files changed (187) hide show
  1. package/lib/commonjs/@types/as-base-component.js.map +1 -1
  2. package/lib/commonjs/common/icons-svg/arrow-down/index.js +51 -0
  3. package/lib/commonjs/common/icons-svg/arrow-down/index.js.map +1 -0
  4. package/lib/commonjs/common/icons-svg/constants/index.js +3 -1
  5. package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
  6. package/lib/commonjs/common/icons-svg/user-circle/index.js +37 -0
  7. package/lib/commonjs/common/icons-svg/user-circle/index.js.map +1 -0
  8. package/lib/commonjs/components/active-loadings-summary/index.js +88 -0
  9. package/lib/commonjs/components/active-loadings-summary/index.js.map +1 -0
  10. package/lib/commonjs/components/active-loadings-summary/interface.d.js +6 -0
  11. package/lib/commonjs/components/active-loadings-summary/interface.d.js.map +1 -0
  12. package/lib/commonjs/components/alert-critical-load/index.js +64 -0
  13. package/lib/commonjs/components/alert-critical-load/index.js.map +1 -0
  14. package/lib/commonjs/components/alert-critical-load/interface.js +6 -0
  15. package/lib/commonjs/components/alert-critical-load/interface.js.map +1 -0
  16. package/lib/commonjs/components/alert-critical-load/styles.js +40 -0
  17. package/lib/commonjs/components/alert-critical-load/styles.js.map +1 -0
  18. package/lib/commonjs/components/card-available-load/index.js +131 -0
  19. package/lib/commonjs/components/card-available-load/index.js.map +1 -0
  20. package/lib/commonjs/components/card-available-load/interface.js +6 -0
  21. package/lib/commonjs/components/card-available-load/interface.js.map +1 -0
  22. package/lib/commonjs/components/card-available-load/style.js +54 -0
  23. package/lib/commonjs/components/card-available-load/style.js.map +1 -0
  24. package/lib/commonjs/components/card-driver-data/index.js +105 -0
  25. package/lib/commonjs/components/card-driver-data/index.js.map +1 -0
  26. package/lib/commonjs/components/card-driver-data/interface.js +6 -0
  27. package/lib/commonjs/components/card-driver-data/interface.js.map +1 -0
  28. package/lib/commonjs/components/card-driver-data/style.js +55 -0
  29. package/lib/commonjs/components/card-driver-data/style.js.map +1 -0
  30. package/lib/commonjs/components/card-loading/index.js +9 -9
  31. package/lib/commonjs/components/card-loading/index.js.map +1 -1
  32. package/lib/commonjs/components/card-loading/interface.d.js.map +1 -1
  33. package/lib/commonjs/components/document-carga-info/index.js +98 -0
  34. package/lib/commonjs/components/document-carga-info/index.js.map +1 -0
  35. package/lib/commonjs/components/document-carga-info/interface.js +2 -0
  36. package/lib/commonjs/components/document-carga-info/interface.js.map +1 -0
  37. package/lib/commonjs/components/document-carga-info/styles.js +64 -0
  38. package/lib/commonjs/components/document-carga-info/styles.js.map +1 -0
  39. package/lib/commonjs/components/driver-journey-info/index.js +141 -0
  40. package/lib/commonjs/components/driver-journey-info/index.js.map +1 -0
  41. package/lib/commonjs/components/driver-journey-info/interface.js +6 -0
  42. package/lib/commonjs/components/driver-journey-info/interface.js.map +1 -0
  43. package/lib/commonjs/components/driver-journey-info/style.js +55 -0
  44. package/lib/commonjs/components/driver-journey-info/style.js.map +1 -0
  45. package/lib/commonjs/index.js +42 -0
  46. package/lib/commonjs/index.js.map +1 -1
  47. package/lib/commonjs/stories/active-loadings-summary/active-loadings-summary.stories.js +63 -0
  48. package/lib/commonjs/stories/active-loadings-summary/active-loadings-summary.stories.js.map +1 -0
  49. package/lib/commonjs/stories/alert-critical-load/alert-critical-load.stories.js +58 -0
  50. package/lib/commonjs/stories/alert-critical-load/alert-critical-load.stories.js.map +1 -0
  51. package/lib/commonjs/stories/card-available-load/card-available-load.stories.js +94 -0
  52. package/lib/commonjs/stories/card-available-load/card-available-load.stories.js.map +1 -0
  53. package/lib/commonjs/stories/card-driver-data/card-driver-data.stories.js +81 -0
  54. package/lib/commonjs/stories/card-driver-data/card-driver-data.stories.js.map +1 -0
  55. package/lib/commonjs/stories/document-carga-info/document-carga-info.stories.js +76 -0
  56. package/lib/commonjs/stories/document-carga-info/document-carga-info.stories.js.map +1 -0
  57. package/lib/commonjs/stories/driver-journey-info/driver-journey-info.stories.js +87 -0
  58. package/lib/commonjs/stories/driver-journey-info/driver-journey-info.stories.js.map +1 -0
  59. package/lib/commonjs/styles/theme/theme.js +5 -4
  60. package/lib/commonjs/styles/theme/theme.js.map +1 -1
  61. package/lib/commonjs/utils/status-color/return-color.js +4 -2
  62. package/lib/commonjs/utils/status-color/return-color.js.map +1 -1
  63. package/lib/module/@types/as-base-component.js.map +1 -1
  64. package/lib/module/common/icons-svg/arrow-down/index.js +45 -0
  65. package/lib/module/common/icons-svg/arrow-down/index.js.map +1 -0
  66. package/lib/module/common/icons-svg/constants/index.js +3 -1
  67. package/lib/module/common/icons-svg/constants/index.js.map +1 -1
  68. package/lib/module/common/icons-svg/user-circle/index.js +29 -0
  69. package/lib/module/common/icons-svg/user-circle/index.js.map +1 -0
  70. package/lib/module/components/active-loadings-summary/index.js +81 -0
  71. package/lib/module/components/active-loadings-summary/index.js.map +1 -0
  72. package/lib/module/components/active-loadings-summary/interface.d.js +2 -0
  73. package/lib/module/components/active-loadings-summary/interface.d.js.map +1 -0
  74. package/lib/module/components/alert-critical-load/index.js +63 -0
  75. package/lib/module/components/alert-critical-load/index.js.map +1 -0
  76. package/lib/module/components/alert-critical-load/interface.js +2 -0
  77. package/lib/module/components/alert-critical-load/interface.js.map +1 -0
  78. package/lib/module/components/alert-critical-load/styles.js +34 -0
  79. package/lib/module/components/alert-critical-load/styles.js.map +1 -0
  80. package/lib/module/components/card-available-load/index.js +130 -0
  81. package/lib/module/components/card-available-load/index.js.map +1 -0
  82. package/lib/module/components/card-available-load/interface.js +2 -0
  83. package/lib/module/components/card-available-load/interface.js.map +1 -0
  84. package/lib/module/components/card-available-load/style.js +49 -0
  85. package/lib/module/components/card-available-load/style.js.map +1 -0
  86. package/lib/module/components/card-driver-data/index.js +104 -0
  87. package/lib/module/components/card-driver-data/index.js.map +1 -0
  88. package/lib/module/components/card-driver-data/interface.js +2 -0
  89. package/lib/module/components/card-driver-data/interface.js.map +1 -0
  90. package/lib/module/components/card-driver-data/style.js +50 -0
  91. package/lib/module/components/card-driver-data/style.js.map +1 -0
  92. package/lib/module/components/card-loading/index.js +9 -9
  93. package/lib/module/components/card-loading/index.js.map +1 -1
  94. package/lib/module/components/card-loading/interface.d.js.map +1 -1
  95. package/lib/module/components/document-carga-info/index.js +97 -0
  96. package/lib/module/components/document-carga-info/index.js.map +1 -0
  97. package/lib/module/components/document-carga-info/interface.js +2 -0
  98. package/lib/module/components/document-carga-info/interface.js.map +1 -0
  99. package/lib/module/components/document-carga-info/styles.js +60 -0
  100. package/lib/module/components/document-carga-info/styles.js.map +1 -0
  101. package/lib/module/components/driver-journey-info/index.js +140 -0
  102. package/lib/module/components/driver-journey-info/index.js.map +1 -0
  103. package/lib/module/components/driver-journey-info/interface.js +2 -0
  104. package/lib/module/components/driver-journey-info/interface.js.map +1 -0
  105. package/lib/module/components/driver-journey-info/style.js +50 -0
  106. package/lib/module/components/driver-journey-info/style.js.map +1 -0
  107. package/lib/module/index.js +8 -2
  108. package/lib/module/index.js.map +1 -1
  109. package/lib/module/stories/active-loadings-summary/active-loadings-summary.stories.js +57 -0
  110. package/lib/module/stories/active-loadings-summary/active-loadings-summary.stories.js.map +1 -0
  111. package/lib/module/stories/alert-critical-load/alert-critical-load.stories.js +50 -0
  112. package/lib/module/stories/alert-critical-load/alert-critical-load.stories.js.map +1 -0
  113. package/lib/module/stories/card-available-load/card-available-load.stories.js +86 -0
  114. package/lib/module/stories/card-available-load/card-available-load.stories.js.map +1 -0
  115. package/lib/module/stories/card-driver-data/card-driver-data.stories.js +73 -0
  116. package/lib/module/stories/card-driver-data/card-driver-data.stories.js.map +1 -0
  117. package/lib/module/stories/document-carga-info/document-carga-info.stories.js +68 -0
  118. package/lib/module/stories/document-carga-info/document-carga-info.stories.js.map +1 -0
  119. package/lib/module/stories/driver-journey-info/driver-journey-info.stories.js +79 -0
  120. package/lib/module/stories/driver-journey-info/driver-journey-info.stories.js.map +1 -0
  121. package/lib/module/styles/theme/theme.js +5 -4
  122. package/lib/module/styles/theme/theme.js.map +1 -1
  123. package/lib/module/utils/status-color/return-color.js +4 -2
  124. package/lib/module/utils/status-color/return-color.js.map +1 -1
  125. package/lib/typescript/src/common/icons-svg/arrow-down/index.d.ts +10 -0
  126. package/lib/typescript/src/common/icons-svg/constants/index.d.ts +2 -0
  127. package/lib/typescript/src/common/icons-svg/user-circle/index.d.ts +10 -0
  128. package/lib/typescript/src/components/active-loadings-summary/index.d.ts +10 -0
  129. package/lib/typescript/src/components/alert-critical-load/index.d.ts +11 -0
  130. package/lib/typescript/src/components/alert-critical-load/interface.d.ts +9 -0
  131. package/lib/typescript/src/components/alert-critical-load/styles.d.ts +28 -0
  132. package/lib/typescript/src/components/card-available-load/index.d.ts +11 -0
  133. package/lib/typescript/src/components/card-available-load/interface.d.ts +30 -0
  134. package/lib/typescript/src/components/card-available-load/style.d.ts +8 -0
  135. package/lib/typescript/src/components/card-driver-data/index.d.ts +11 -0
  136. package/lib/typescript/src/components/card-driver-data/interface.d.ts +27 -0
  137. package/lib/typescript/src/components/card-driver-data/style.d.ts +8 -0
  138. package/lib/typescript/src/components/document-carga-info/index.d.ts +11 -0
  139. package/lib/typescript/src/components/document-carga-info/interface.d.ts +15 -0
  140. package/lib/typescript/src/components/document-carga-info/styles.d.ts +50 -0
  141. package/lib/typescript/src/components/driver-journey-info/index.d.ts +11 -0
  142. package/lib/typescript/src/components/driver-journey-info/interface.d.ts +28 -0
  143. package/lib/typescript/src/components/driver-journey-info/style.d.ts +8 -0
  144. package/lib/typescript/src/components/selects/select-date-and-hours/index.d.ts +1 -1
  145. package/lib/typescript/src/index.d.ts +6 -0
  146. package/lib/typescript/src/stories/active-loadings-summary/active-loadings-summary.stories.d.ts +8 -0
  147. package/lib/typescript/src/stories/alert-critical-load/alert-critical-load.stories.d.ts +9 -0
  148. package/lib/typescript/src/stories/card-available-load/card-available-load.stories.d.ts +10 -0
  149. package/lib/typescript/src/stories/card-driver-data/card-driver-data.stories.d.ts +10 -0
  150. package/lib/typescript/src/stories/document-carga-info/document-carga-info.stories.d.ts +10 -0
  151. package/lib/typescript/src/stories/driver-journey-info/driver-journey-info.stories.d.ts +10 -0
  152. package/lib/typescript/src/styles/global/theme-provider.d.ts +1 -0
  153. package/lib/typescript/src/styles/theme/theme.d.ts +1 -0
  154. package/lib/typescript/src/utils/status-color/return-color.d.ts +1 -1
  155. package/package.json +1 -1
  156. package/src/@types/as-base-component.ts +9 -9
  157. package/src/common/icons-svg/arrow-down/index.tsx +44 -0
  158. package/src/common/icons-svg/constants/index.ts +2 -0
  159. package/src/common/icons-svg/user-circle/index.tsx +29 -0
  160. package/src/components/active-loadings-summary/index.tsx +69 -0
  161. package/src/components/active-loadings-summary/interface.d.ts +16 -0
  162. package/src/components/alert-critical-load/index.tsx +83 -0
  163. package/src/components/alert-critical-load/interface.ts +13 -0
  164. package/src/components/alert-critical-load/styles.ts +35 -0
  165. package/src/components/card-available-load/index.tsx +163 -0
  166. package/src/components/card-available-load/interface.ts +36 -0
  167. package/src/components/card-available-load/style.ts +51 -0
  168. package/src/components/card-driver-data/index.tsx +139 -0
  169. package/src/components/card-driver-data/interface.ts +33 -0
  170. package/src/components/card-driver-data/style.ts +55 -0
  171. package/src/components/card-loading/index.tsx +276 -294
  172. package/src/components/card-loading/interface.d.ts +37 -37
  173. package/src/components/document-carga-info/index.tsx +137 -0
  174. package/src/components/document-carga-info/interface.ts +19 -0
  175. package/src/components/document-carga-info/styles.ts +65 -0
  176. package/src/components/driver-journey-info/index.tsx +185 -0
  177. package/src/components/driver-journey-info/interface.ts +36 -0
  178. package/src/components/driver-journey-info/style.ts +55 -0
  179. package/src/index.ts +56 -50
  180. package/src/stories/active-loadings-summary/active-loadings-summary.stories.tsx +59 -0
  181. package/src/stories/alert-critical-load/alert-critical-load.stories.tsx +51 -0
  182. package/src/stories/card-available-load/card-available-load.stories.tsx +85 -0
  183. package/src/stories/card-driver-data/card-driver-data.stories.tsx +73 -0
  184. package/src/stories/document-carga-info/document-carga-info.stories.tsx +72 -0
  185. package/src/stories/driver-journey-info/driver-journey-info.stories.tsx +79 -0
  186. package/src/styles/theme/theme.ts +192 -191
  187. 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
- {/* <Box
103
- flexStyle={{
104
- flexDirection: "row",
105
- alignItems: "center",
106
- justifyContent: "space-between",
107
- }}
108
- marginStyle={{
109
- marginRight: 8,
110
- }}
111
- >
112
- <Icons icon={"TIMER"} size={theme.fontSizes["sm"]} color={theme.colors.neutral[25]} />
113
- <Typography
114
- text={"AUT"}
115
- color={theme.colors.neutral[25]}
116
- size={theme.fontSizes.xs}
117
- fontFamily={theme.fonts.inter_bold_700}
118
- lineHeight={theme.fontSizes.md ?? 16}
119
- letterSpacing={"regular"}
120
- marginLeft={2}
121
- />
122
- </Box> */}
123
-
124
- <Box
125
- flexStyle={{
126
- flexDirection: "row",
127
- alignItems: "center",
128
- justifyContent: "space-between",
129
- }}
130
- marginStyle={{
131
- marginRight: 8,
132
- }}
133
- >
134
- <Icons
135
- icon={"SCALES"}
136
- size={theme.fontSizes["sm"]}
137
- color={theme.colors.neutral[25]}
138
- />
139
- <Typography
140
- text={`${kg}KG`}
141
- color={theme.colors.neutral[25]}
142
- size={theme.fontSizes.xs}
143
- fontFamily={theme.fonts.inter_bold_700}
144
- lineHeight={theme.fontSizes.md ?? 16}
145
- letterSpacing={"regular"}
146
- marginLeft={2}
147
- />
148
- </Box>
149
-
150
- <Box
151
- flexStyle={{
152
- flexDirection: "row",
153
- alignItems: "center",
154
- justifyContent: "space-between",
155
- }}
156
- >
157
- <Icons icon={"TIMER"} size={theme.fontSizes["sm"]} color={theme.colors.neutral[25]} />
158
- <Typography
159
- text={`${qtdCoils}QTD`}
160
- color={theme.colors.neutral[25]}
161
- size={theme.fontSizes.xs}
162
- fontFamily={theme.fonts.inter_bold_700}
163
- lineHeight={theme.fontSizes.md ?? 16}
164
- letterSpacing={"regular"}
165
- marginLeft={2}
166
- />
167
- </Box>
168
- </Box>
169
-
170
- {/**DADOS DO VEÍCULOS */}
171
- <Box
172
- flexStyle={{
173
- flexDirection: "row",
174
- justifyContent: "flex-start",
175
- alignItems: "center",
176
- }}
177
- marginStyle={{
178
- marginBottom: 4,
179
- }}
180
- >
181
- <Typography
182
- text={"Dados Veículo:"}
183
- color={theme.colors.neutral[25]}
184
- size={theme.fontSizes.xs}
185
- fontFamily={theme.fonts.inter_regular_400}
186
- lineHeight={theme.fontSizes.md ?? 16}
187
- letterSpacing={"regular"}
188
- />
189
- <Typography
190
- text={vehicle}
191
- color={theme.colors.neutral[25]}
192
- size={theme.fontSizes.xs}
193
- fontFamily={theme.fonts.inter_bold_700}
194
- lineHeight={theme.fontSizes.md ?? 16}
195
- letterSpacing={"regular"}
196
- marginLeft={4}
197
- />
198
- </Box>
199
-
200
- {/**PREVISÃO DO CARREGAMENTO */}
201
- <Box
202
- width={"100%"}
203
- flexStyle={{
204
- flexDirection: "row",
205
- alignItems: "center",
206
- justifyContent: "space-between",
207
- }}
208
- marginStyle={{
209
- marginBottom: 8,
210
- }}
211
- >
212
- <Box
213
- flexStyle={{
214
- flexDirection: "row",
215
- justifyContent: "flex-start",
216
- alignItems: "center",
217
- }}
218
- >
219
- <Typography
220
- text={"Previsão:"}
221
- color={theme.colors.neutral[25]}
222
- size={theme.fontSizes.xs}
223
- fontFamily={theme.fonts.inter_regular_400}
224
- lineHeight={theme.fontSizes.md ?? 16}
225
- letterSpacing={"regular"}
226
- />
227
- <Typography
228
- text={prevision}
229
- color={theme.colors.neutral[25]}
230
- size={theme.fontSizes.xs}
231
- fontFamily={theme.fonts.inter_bold_700}
232
- lineHeight={theme.fontSizes.md ?? 16}
233
- letterSpacing={"regular"}
234
- marginLeft={4}
235
- />
236
- </Box>
237
- </Box>
238
-
239
- {/**STATUS DO CARREGAMENTO */}
240
- <Box
241
- width={"100%"}
242
- flexStyle={{
243
- flexDirection: "row",
244
- alignItems: "center",
245
- justifyContent: "space-between",
246
- }}
247
- marginStyle={{
248
- marginBottom: 4,
249
- }}
250
- >
251
- <Box
252
- flexStyle={{
253
- flexDirection: "row",
254
- justifyContent: "flex-start",
255
- alignItems: "center",
256
- }}
257
- backgroundColor={getStatusColor(status as StatusType)}
258
- height={22}
259
- borderStyled={{
260
- borderWidth: 1,
261
- borderRadius: 11,
262
- borderColor: "transparent",
263
- }}
264
- paddingStyle={{ paddingLeft: 8, paddingRight: 8 }}
265
- >
266
- <Typography
267
- text={"Status:"}
268
- color={theme.colors.neutral[25]}
269
- size={theme.fontSizes.xs}
270
- fontFamily={theme.fonts.inter_regular_400}
271
- lineHeight={theme.fontSizes.md ?? 16}
272
- letterSpacing={"regular"}
273
- />
274
- <Typography
275
- text={status}
276
- color={getStatusTextColor(status as StatusType)}
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 };