react-native-exp-fig 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/lib/commonjs/common/icons-svg/agent/index.js +2 -2
  2. package/lib/commonjs/common/icons-svg/agent/index.js.map +1 -1
  3. package/lib/commonjs/common/icons-svg/bed/index.js +4 -4
  4. package/lib/commonjs/common/icons-svg/bed/index.js.map +1 -1
  5. package/lib/commonjs/common/icons-svg/car/index.js +4 -4
  6. package/lib/commonjs/common/icons-svg/car/index.js.map +1 -1
  7. package/lib/commonjs/common/icons-svg/check-outline/index.js +6 -6
  8. package/lib/commonjs/common/icons-svg/check-outline/index.js.map +1 -1
  9. package/lib/commonjs/common/icons-svg/coffee/index.js +4 -4
  10. package/lib/commonjs/common/icons-svg/coffee/index.js.map +1 -1
  11. package/lib/commonjs/common/icons-svg/constants/index.js +4 -4
  12. package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
  13. package/lib/commonjs/common/icons-svg/index.js +4 -4
  14. package/lib/commonjs/common/icons-svg/index.js.map +1 -1
  15. package/lib/commonjs/common/icons-svg/pencil/index.js +4 -4
  16. package/lib/commonjs/common/icons-svg/pencil/index.js.map +1 -1
  17. package/lib/commonjs/common/icons-svg/refresh-ccw-dot/index.js +2 -2
  18. package/lib/commonjs/common/icons-svg/refresh-ccw-dot/index.js.map +1 -1
  19. package/lib/commonjs/common/icons-svg/truck-activity/index.js +4 -4
  20. package/lib/commonjs/common/icons-svg/truck-activity/index.js.map +1 -1
  21. package/lib/commonjs/components/activities-daily/index.js +4 -4
  22. package/lib/commonjs/components/activities-daily/index.js.map +1 -1
  23. package/lib/commonjs/components/activities-daily/interface.d.js.map +1 -1
  24. package/lib/commonjs/components/activities-progress/index.js +4 -4
  25. package/lib/commonjs/components/activities-progress/index.js.map +1 -1
  26. package/lib/commonjs/components/activities-progress/interface.d.js.map +1 -1
  27. package/lib/commonjs/components/avatar-profile/index.js.map +1 -1
  28. package/lib/commonjs/components/avatar-profile/interface.d.js.map +1 -1
  29. package/lib/commonjs/components/card-history/index.js +7 -7
  30. package/lib/commonjs/components/card-history/index.js.map +1 -1
  31. package/lib/commonjs/components/card-loading/index.js +7 -7
  32. package/lib/commonjs/components/card-loading/index.js.map +1 -1
  33. package/lib/commonjs/components/card-work-session/index.js +4 -4
  34. package/lib/commonjs/components/card-work-session/index.js.map +1 -1
  35. package/lib/commonjs/components/check-box/index.js +6 -6
  36. package/lib/commonjs/components/check-box/index.js.map +1 -1
  37. package/lib/commonjs/components/check-box/interface.d.js.map +1 -1
  38. package/lib/commonjs/components/coil/index.js +4 -4
  39. package/lib/commonjs/components/coil/index.js.map +1 -1
  40. package/lib/commonjs/components/coil/interface.d.js.map +1 -1
  41. package/lib/commonjs/components/filter-date-selector/index.js +7 -7
  42. package/lib/commonjs/components/filter-date-selector/index.js.map +1 -1
  43. package/lib/commonjs/components/history-details/index.js +1 -2
  44. package/lib/commonjs/components/history-details/index.js.map +1 -1
  45. package/lib/commonjs/components/history-details/interface.d.js.map +1 -1
  46. package/lib/commonjs/components/image-capture-with-remove/index.js +7 -7
  47. package/lib/commonjs/components/image-capture-with-remove/index.js.map +1 -1
  48. package/lib/commonjs/components/image-capture-with-remove/interface.d.js.map +1 -1
  49. package/lib/commonjs/components/loading-progress/index.js +12 -9
  50. package/lib/commonjs/components/loading-progress/index.js.map +1 -1
  51. package/lib/commonjs/components/notification-loading/index.js +9 -2
  52. package/lib/commonjs/components/notification-loading/index.js.map +1 -1
  53. package/lib/commonjs/components/notification-loading/interface.d.js.map +1 -1
  54. package/lib/commonjs/components/profile-menu-option/index.js.map +1 -1
  55. package/lib/commonjs/components/profile-menu-option/interface.d.js.map +1 -1
  56. package/lib/commonjs/components/step-indicator/index.js +6 -6
  57. package/lib/commonjs/components/step-indicator/index.js.map +1 -1
  58. package/lib/commonjs/components/step-indicator/interface.d.js.map +1 -1
  59. package/lib/commonjs/components/step-indicator/styles.js +9 -8
  60. package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
  61. package/lib/commonjs/components/user-profile/index.js +6 -6
  62. package/lib/commonjs/components/user-profile/index.js.map +1 -1
  63. package/lib/commonjs/index.js.map +1 -1
  64. package/lib/commonjs/stories/activities-daily/activities-daily.stories.js.map +1 -1
  65. package/lib/commonjs/stories/activities-progress/activities-progress.stories.js.map +1 -1
  66. package/lib/commonjs/stories/avatar-profile/avatar-profile.stories.js.map +1 -1
  67. package/lib/commonjs/stories/card-loading/card-loading.stories.js.map +1 -1
  68. package/lib/commonjs/stories/check-box/check-box.stories.js.map +1 -1
  69. package/lib/commonjs/stories/coil/coil.stories.js.map +1 -1
  70. package/lib/commonjs/stories/filter-date-selector/filter-date-selector.stories.js.map +1 -1
  71. package/lib/commonjs/stories/history-details/history-details.stories.js.map +1 -1
  72. package/lib/commonjs/stories/image-capture-with-remove/image-capture-with-remove.stories.js.map +1 -1
  73. package/lib/commonjs/stories/notification-loading/notification-loading.stories.js.map +1 -1
  74. package/lib/commonjs/stories/profile-menu-option/profile-menu-option.stories.js.map +1 -1
  75. package/lib/commonjs/stories/step-indicator/step-indicator.stories.js.map +1 -1
  76. package/lib/commonjs/styles/theme/theme.js +4 -4
  77. package/lib/commonjs/styles/theme/theme.js.map +1 -1
  78. package/lib/commonjs/utils/format-data/index.js +11 -11
  79. package/lib/commonjs/utils/format-data/index.js.map +1 -1
  80. package/lib/commonjs/utils/status-color/return-color.js.map +1 -1
  81. package/lib/module/common/icons-svg/agent/index.js +2 -2
  82. package/lib/module/common/icons-svg/agent/index.js.map +1 -1
  83. package/lib/module/common/icons-svg/bed/index.js +4 -4
  84. package/lib/module/common/icons-svg/bed/index.js.map +1 -1
  85. package/lib/module/common/icons-svg/car/index.js +4 -4
  86. package/lib/module/common/icons-svg/car/index.js.map +1 -1
  87. package/lib/module/common/icons-svg/check-outline/index.js +6 -6
  88. package/lib/module/common/icons-svg/check-outline/index.js.map +1 -1
  89. package/lib/module/common/icons-svg/coffee/index.js +4 -4
  90. package/lib/module/common/icons-svg/coffee/index.js.map +1 -1
  91. package/lib/module/common/icons-svg/constants/index.js +4 -4
  92. package/lib/module/common/icons-svg/constants/index.js.map +1 -1
  93. package/lib/module/common/icons-svg/index.js +4 -4
  94. package/lib/module/common/icons-svg/index.js.map +1 -1
  95. package/lib/module/common/icons-svg/pencil/index.js +4 -4
  96. package/lib/module/common/icons-svg/pencil/index.js.map +1 -1
  97. package/lib/module/common/icons-svg/refresh-ccw-dot/index.js +2 -2
  98. package/lib/module/common/icons-svg/refresh-ccw-dot/index.js.map +1 -1
  99. package/lib/module/common/icons-svg/truck-activity/index.js +4 -4
  100. package/lib/module/common/icons-svg/truck-activity/index.js.map +1 -1
  101. package/lib/module/components/activities-daily/index.js +4 -4
  102. package/lib/module/components/activities-daily/index.js.map +1 -1
  103. package/lib/module/components/activities-daily/interface.d.js.map +1 -1
  104. package/lib/module/components/activities-progress/index.js +4 -4
  105. package/lib/module/components/activities-progress/index.js.map +1 -1
  106. package/lib/module/components/activities-progress/interface.d.js.map +1 -1
  107. package/lib/module/components/avatar-profile/index.js.map +1 -1
  108. package/lib/module/components/avatar-profile/interface.d.js.map +1 -1
  109. package/lib/module/components/card-history/index.js +7 -7
  110. package/lib/module/components/card-history/index.js.map +1 -1
  111. package/lib/module/components/card-loading/index.js +7 -7
  112. package/lib/module/components/card-loading/index.js.map +1 -1
  113. package/lib/module/components/card-work-session/index.js +4 -4
  114. package/lib/module/components/card-work-session/index.js.map +1 -1
  115. package/lib/module/components/check-box/index.js +6 -6
  116. package/lib/module/components/check-box/index.js.map +1 -1
  117. package/lib/module/components/check-box/interface.d.js.map +1 -1
  118. package/lib/module/components/coil/index.js +4 -4
  119. package/lib/module/components/coil/index.js.map +1 -1
  120. package/lib/module/components/coil/interface.d.js.map +1 -1
  121. package/lib/module/components/filter-date-selector/index.js +7 -7
  122. package/lib/module/components/filter-date-selector/index.js.map +1 -1
  123. package/lib/module/components/history-details/index.js +1 -2
  124. package/lib/module/components/history-details/index.js.map +1 -1
  125. package/lib/module/components/history-details/interface.d.js.map +1 -1
  126. package/lib/module/components/image-capture-with-remove/index.js +7 -7
  127. package/lib/module/components/image-capture-with-remove/index.js.map +1 -1
  128. package/lib/module/components/image-capture-with-remove/interface.d.js.map +1 -1
  129. package/lib/module/components/loading-progress/index.js +12 -9
  130. package/lib/module/components/loading-progress/index.js.map +1 -1
  131. package/lib/module/components/notification-loading/index.js +9 -2
  132. package/lib/module/components/notification-loading/index.js.map +1 -1
  133. package/lib/module/components/notification-loading/interface.d.js.map +1 -1
  134. package/lib/module/components/profile-menu-option/index.js.map +1 -1
  135. package/lib/module/components/profile-menu-option/interface.d.js.map +1 -1
  136. package/lib/module/components/step-indicator/index.js +6 -6
  137. package/lib/module/components/step-indicator/index.js.map +1 -1
  138. package/lib/module/components/step-indicator/interface.d.js.map +1 -1
  139. package/lib/module/components/step-indicator/styles.js +9 -8
  140. package/lib/module/components/step-indicator/styles.js.map +1 -1
  141. package/lib/module/components/user-profile/index.js +6 -6
  142. package/lib/module/components/user-profile/index.js.map +1 -1
  143. package/lib/module/index.js +2 -2
  144. package/lib/module/index.js.map +1 -1
  145. package/lib/module/stories/activities-daily/activities-daily.stories.js.map +1 -1
  146. package/lib/module/stories/activities-progress/activities-progress.stories.js.map +1 -1
  147. package/lib/module/stories/avatar-profile/avatar-profile.stories.js.map +1 -1
  148. package/lib/module/stories/card-loading/card-loading.stories.js.map +1 -1
  149. package/lib/module/stories/check-box/check-box.stories.js.map +1 -1
  150. package/lib/module/stories/coil/coil.stories.js.map +1 -1
  151. package/lib/module/stories/filter-date-selector/filter-date-selector.stories.js.map +1 -1
  152. package/lib/module/stories/history-details/history-details.stories.js.map +1 -1
  153. package/lib/module/stories/image-capture-with-remove/image-capture-with-remove.stories.js.map +1 -1
  154. package/lib/module/stories/notification-loading/notification-loading.stories.js.map +1 -1
  155. package/lib/module/stories/profile-menu-option/profile-menu-option.stories.js.map +1 -1
  156. package/lib/module/stories/step-indicator/step-indicator.stories.js.map +1 -1
  157. package/lib/module/styles/theme/theme.js +4 -4
  158. package/lib/module/styles/theme/theme.js.map +1 -1
  159. package/lib/module/utils/format-data/index.js +11 -11
  160. package/lib/module/utils/format-data/index.js.map +1 -1
  161. package/lib/module/utils/status-color/return-color.js.map +1 -1
  162. package/lib/typescript/src/components/step-indicator/styles.d.ts +1 -0
  163. package/package.json +2 -2
  164. package/src/common/icons-svg/agent/index.tsx +40 -40
  165. package/src/common/icons-svg/bed/index.tsx +41 -41
  166. package/src/common/icons-svg/car/index.tsx +29 -29
  167. package/src/common/icons-svg/check-outline/index.tsx +42 -42
  168. package/src/common/icons-svg/coffee/index.tsx +43 -43
  169. package/src/common/icons-svg/constants/index.ts +63 -63
  170. package/src/common/icons-svg/index.tsx +255 -255
  171. package/src/common/icons-svg/pencil/index.tsx +32 -32
  172. package/src/common/icons-svg/refresh-ccw-dot/index.tsx +32 -32
  173. package/src/common/icons-svg/truck-activity/index.tsx +29 -29
  174. package/src/components/activities-daily/index.tsx +116 -116
  175. package/src/components/activities-daily/interface.d.ts +22 -22
  176. package/src/components/activities-progress/index.tsx +162 -162
  177. package/src/components/activities-progress/interface.d.ts +41 -41
  178. package/src/components/avatar-profile/index.tsx +95 -95
  179. package/src/components/avatar-profile/interface.d.ts +39 -39
  180. package/src/components/card-history/index.tsx +149 -149
  181. package/src/components/card-loading/index.tsx +278 -278
  182. package/src/components/card-work-session/index.tsx +187 -187
  183. package/src/components/check-box/index.tsx +94 -94
  184. package/src/components/check-box/interface.d.ts +31 -31
  185. package/src/components/coil/index.tsx +103 -103
  186. package/src/components/coil/interface.d.ts +26 -26
  187. package/src/components/filter-date-selector/index.tsx +101 -101
  188. package/src/components/history-details/index.tsx +1 -2
  189. package/src/components/history-details/interface.d.ts +18 -18
  190. package/src/components/image-capture-with-remove/index.tsx +89 -89
  191. package/src/components/image-capture-with-remove/interface.d.ts +25 -25
  192. package/src/components/loading-progress/index.tsx +92 -91
  193. package/src/components/notification-loading/index.tsx +9 -2
  194. package/src/components/notification-loading/interface.d.ts +35 -35
  195. package/src/components/profile-menu-option/index.tsx +65 -65
  196. package/src/components/profile-menu-option/interface.d.ts +42 -42
  197. package/src/components/step-indicator/index.tsx +164 -164
  198. package/src/components/step-indicator/interface.d.ts +34 -34
  199. package/src/components/step-indicator/styles.ts +68 -67
  200. package/src/components/user-profile/index.tsx +204 -204
  201. package/src/index.ts +42 -42
  202. package/src/stories/activities-daily/activities-daily.stories.tsx +40 -40
  203. package/src/stories/activities-progress/activities-progress.stories.tsx +61 -61
  204. package/src/stories/avatar-profile/avatar-profile.stories.tsx +32 -32
  205. package/src/stories/card-loading/card-loading.stories.tsx +85 -85
  206. package/src/stories/check-box/check-box.stories.tsx +81 -81
  207. package/src/stories/coil/coil.stories.tsx +98 -98
  208. package/src/stories/filter-date-selector/filter-date-selector.stories.tsx +122 -122
  209. package/src/stories/history-details/history-details.stories.tsx +36 -36
  210. package/src/stories/image-capture-with-remove/image-capture-with-remove.stories.tsx +57 -57
  211. package/src/stories/notification-loading/notification-loading.stories.tsx +88 -88
  212. package/src/stories/profile-menu-option/profile-menu-option.stories.tsx +70 -70
  213. package/src/stories/step-indicator/step-indicator.stories.tsx +124 -124
  214. package/src/styles/theme/theme.ts +170 -170
  215. package/src/utils/format-data/index.ts +66 -66
  216. package/src/utils/status-color/return-color.ts +23 -23
@@ -1,278 +1,278 @@
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 { getStatusColor, StatusType } from "../../utils/status-color/return-color";
20
-
21
- /**
22
- *
23
- * Componente CardLoading para a interação do usuário com ui.
24
- */
25
- const CardLoading: React.FC<ICardLoading> = ({
26
- width,
27
- title = "Carregamento #01020304050607",
28
- local = "Doca 1, Patío 03 - Usiminas Ipatinga",
29
- vehicle = "EXP-0000",
30
- prevision = "12:34 10/03/2025",
31
- kg = 20,
32
- qtdCoils = 10,
33
- status = "Pendente",
34
- handleNavigation,
35
- testID,
36
- }: ICardLoading) => {
37
- return (
38
- <TouchableOpacity onPress={handleNavigation} activeOpacity={0.7}>
39
- <Box
40
- testID={testID}
41
- width={width ?? "100%"}
42
- backgroundColor={theme.colors.blue[400]}
43
- marginStyle={{ marginBottom: theme.margins.md }}
44
- paddingStyle={{ padding: theme.paddings["2xs"] }}
45
- borderStyled={{
46
- borderWidth: theme.borderWidths.thin,
47
- borderColor: theme.colors.blue[400],
48
- borderRadius: theme.borderWidths.thick_medium,
49
- }}
50
- flexStyle={{ flexDirection: "row", justifyContent: "flex-start", alignItems: "center" }}
51
- >
52
- <Box width={"26%"} borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}>
53
- <Image
54
- source={{
55
- uri: "https://th.bing.com/th/id/OIP.Rr9_IUNo8J66QbvQkxzXtwHaEJ?w=276&h=180&c=7&r=0&o=5&pid=1.7",
56
- }}
57
- style={{
58
- width: "100%",
59
- height: 120,
60
- borderRadius: theme.borderWidths.thick_medium,
61
- }}
62
- />
63
- </Box>
64
-
65
- <Box width={"74%"} paddingStyle={{ paddingLeft: theme.paddings["2xs"] }}>
66
- <Typography
67
- text={title}
68
- ellipsizeMode="tail"
69
- numberOfLines={1}
70
- color={theme.colors.neutral[25]}
71
- size={theme.fontSizes.sm}
72
- fontFamily={theme.fonts.inter_bold_700}
73
- lineHeight={theme.fontSizes.xl ?? 20}
74
- letterSpacing={"regular"}
75
- marginBottom={4}
76
- />
77
-
78
- <Typography
79
- text={local}
80
- color={theme.colors.neutral[25]}
81
- size={theme.fontSizes.xs}
82
- fontFamily={theme.fonts.inter_regular_400}
83
- lineHeight={theme.fontSizes.md ?? 16}
84
- letterSpacing={"regular"}
85
- marginBottom={4}
86
- />
87
-
88
- <Box
89
- flexStyle={{
90
- flexDirection: "row",
91
- justifyContent: "flex-start",
92
- alignItems: "center",
93
- }}
94
- marginStyle={{
95
- marginBottom: 4,
96
- }}
97
- >
98
- <Box
99
- flexStyle={{
100
- flexDirection: "row",
101
- alignItems: "center",
102
- justifyContent: "space-between",
103
- }}
104
- marginStyle={{
105
- marginRight: 8,
106
- }}
107
- >
108
- <Icons icon={"TIMER"} size={theme.fontSizes["sm"]} color={theme.colors.neutral[25]} />
109
- <Typography
110
- text={"AUT"}
111
- color={theme.colors.neutral[25]}
112
- size={theme.fontSizes.xs}
113
- fontFamily={theme.fonts.inter_bold_700}
114
- lineHeight={theme.fontSizes.md ?? 16}
115
- letterSpacing={"regular"}
116
- marginLeft={2}
117
- />
118
- </Box>
119
-
120
- <Box
121
- flexStyle={{
122
- flexDirection: "row",
123
- alignItems: "center",
124
- justifyContent: "space-between",
125
- }}
126
- marginStyle={{
127
- marginRight: 8,
128
- }}
129
- >
130
- <Icons icon={"TIMER"} size={theme.fontSizes["sm"]} color={theme.colors.neutral[25]} />
131
- <Typography
132
- text={`${kg}KG`}
133
- color={theme.colors.neutral[25]}
134
- size={theme.fontSizes.xs}
135
- fontFamily={theme.fonts.inter_bold_700}
136
- lineHeight={theme.fontSizes.md ?? 16}
137
- letterSpacing={"regular"}
138
- marginLeft={2}
139
- />
140
- </Box>
141
-
142
- <Box
143
- flexStyle={{
144
- flexDirection: "row",
145
- alignItems: "center",
146
- justifyContent: "space-between",
147
- }}
148
- >
149
- <Icons icon={"TIMER"} size={theme.fontSizes["sm"]} color={theme.colors.neutral[25]} />
150
- <Typography
151
- text={`${qtdCoils}QTD`}
152
- color={theme.colors.neutral[25]}
153
- size={theme.fontSizes.xs}
154
- fontFamily={theme.fonts.inter_bold_700}
155
- lineHeight={theme.fontSizes.md ?? 16}
156
- letterSpacing={"regular"}
157
- marginLeft={2}
158
- />
159
- </Box>
160
- </Box>
161
-
162
- {/**DADOS DO VEÍCULOS */}
163
- <Box
164
- flexStyle={{
165
- flexDirection: "row",
166
- justifyContent: "flex-start",
167
- alignItems: "center",
168
- }}
169
- marginStyle={{
170
- marginBottom: 4,
171
- }}
172
- >
173
- <Typography
174
- text={"Dados Veículo:"}
175
- color={theme.colors.neutral[25]}
176
- size={theme.fontSizes.xs}
177
- fontFamily={theme.fonts.inter_regular_400}
178
- lineHeight={theme.fontSizes.md ?? 16}
179
- letterSpacing={"regular"}
180
- />
181
- <Typography
182
- text={vehicle}
183
- color={theme.colors.neutral[25]}
184
- size={theme.fontSizes.xs}
185
- fontFamily={theme.fonts.inter_bold_700}
186
- lineHeight={theme.fontSizes.md ?? 16}
187
- letterSpacing={"regular"}
188
- marginLeft={4}
189
- />
190
- </Box>
191
-
192
- {/**PREVISÃO DO CARREGAMENTO */}
193
- <Box
194
- width={"100%"}
195
- flexStyle={{
196
- flexDirection: "row",
197
- alignItems: "center",
198
- justifyContent: "space-between",
199
- }}
200
- marginStyle={{
201
- marginBottom: 4,
202
- }}
203
- >
204
- <Box
205
- flexStyle={{
206
- flexDirection: "row",
207
- justifyContent: "flex-start",
208
- alignItems: "center",
209
- }}
210
- >
211
- <Typography
212
- text={"Previsão:"}
213
- color={theme.colors.neutral[25]}
214
- size={theme.fontSizes.xs}
215
- fontFamily={theme.fonts.inter_regular_400}
216
- lineHeight={theme.fontSizes.md ?? 16}
217
- letterSpacing={"regular"}
218
- />
219
- <Typography
220
- text={prevision}
221
- color={theme.colors.neutral[25]}
222
- size={theme.fontSizes.xs}
223
- fontFamily={theme.fonts.inter_bold_700}
224
- lineHeight={theme.fontSizes.md ?? 16}
225
- letterSpacing={"regular"}
226
- marginLeft={4}
227
- />
228
- </Box>
229
- </Box>
230
-
231
- {/**STATUS DO CARREGAMENTO */}
232
- <Box
233
- width={"100%"}
234
- flexStyle={{
235
- flexDirection: "row",
236
- alignItems: "center",
237
- justifyContent: "space-between",
238
- }}
239
- marginStyle={{
240
- marginBottom: 4,
241
- }}
242
- >
243
- <Box
244
- flexStyle={{
245
- flexDirection: "row",
246
- justifyContent: "flex-start",
247
- alignItems: "center",
248
- }}
249
- >
250
- <Typography
251
- text={"Status:"}
252
- color={theme.colors.neutral[25]}
253
- size={theme.fontSizes.xs}
254
- fontFamily={theme.fonts.inter_regular_400}
255
- lineHeight={theme.fontSizes.md ?? 16}
256
- letterSpacing={"regular"}
257
- />
258
- <Typography
259
- text={status}
260
- color={getStatusColor(status as StatusType)}
261
- size={theme.fontSizes.xs}
262
- fontFamily={theme.fonts.inter_bold_700}
263
- lineHeight={theme.fontSizes.md ?? 16}
264
- letterSpacing={"regular"}
265
- marginLeft={4}
266
- />
267
- </Box>
268
- </Box>
269
- </Box>
270
- </Box>
271
- </TouchableOpacity>
272
- );
273
- };
274
-
275
- /**
276
- * EXPORTS
277
- */
278
- 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 { getStatusColor, StatusType } from "../../utils/status-color/return-color";
20
+
21
+ /**
22
+ *
23
+ * Componente CardLoading para a interação do usuário com ui.
24
+ */
25
+ const CardLoading: React.FC<ICardLoading> = ({
26
+ width,
27
+ title = "Carregamento #01020304050607",
28
+ local = "Doca 1, Patío 03 - Usiminas Ipatinga",
29
+ vehicle = "EXP-0000",
30
+ prevision = "12:34 10/03/2025",
31
+ kg = 20,
32
+ qtdCoils = 10,
33
+ status = "Pendente",
34
+ handleNavigation,
35
+ testID,
36
+ }: ICardLoading) => {
37
+ return (
38
+ <TouchableOpacity onPress={handleNavigation} activeOpacity={0.7}>
39
+ <Box
40
+ testID={testID}
41
+ width={width ?? "100%"}
42
+ backgroundColor={theme.colors.blue[400]}
43
+ marginStyle={{ marginBottom: theme.margins.md }}
44
+ paddingStyle={{ padding: theme.paddings["2xs"] }}
45
+ borderStyled={{
46
+ borderWidth: theme.borderWidths.thin,
47
+ borderColor: theme.colors.blue[400],
48
+ borderRadius: theme.borderWidths.thick_medium,
49
+ }}
50
+ flexStyle={{ flexDirection: "row", justifyContent: "flex-start", alignItems: "center" }}
51
+ >
52
+ <Box width={"26%"} borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}>
53
+ <Image
54
+ source={{
55
+ uri: "https://th.bing.com/th/id/OIP.Rr9_IUNo8J66QbvQkxzXtwHaEJ?w=276&h=180&c=7&r=0&o=5&pid=1.7",
56
+ }}
57
+ style={{
58
+ width: "100%",
59
+ height: 120,
60
+ borderRadius: theme.borderWidths.thick_medium,
61
+ }}
62
+ />
63
+ </Box>
64
+
65
+ <Box width={"74%"} paddingStyle={{ paddingLeft: theme.paddings["2xs"] }}>
66
+ <Typography
67
+ text={title}
68
+ ellipsizeMode="tail"
69
+ numberOfLines={1}
70
+ color={theme.colors.neutral[25]}
71
+ size={theme.fontSizes.sm}
72
+ fontFamily={theme.fonts.inter_bold_700}
73
+ lineHeight={theme.fontSizes.xl ?? 20}
74
+ letterSpacing={"regular"}
75
+ marginBottom={4}
76
+ />
77
+
78
+ <Typography
79
+ text={local}
80
+ color={theme.colors.neutral[25]}
81
+ size={theme.fontSizes.xs}
82
+ fontFamily={theme.fonts.inter_regular_400}
83
+ lineHeight={theme.fontSizes.md ?? 16}
84
+ letterSpacing={"regular"}
85
+ marginBottom={4}
86
+ />
87
+
88
+ <Box
89
+ flexStyle={{
90
+ flexDirection: "row",
91
+ justifyContent: "flex-start",
92
+ alignItems: "center",
93
+ }}
94
+ marginStyle={{
95
+ marginBottom: 4,
96
+ }}
97
+ >
98
+ <Box
99
+ flexStyle={{
100
+ flexDirection: "row",
101
+ alignItems: "center",
102
+ justifyContent: "space-between",
103
+ }}
104
+ marginStyle={{
105
+ marginRight: 8,
106
+ }}
107
+ >
108
+ <Icons icon={"TIMER"} size={theme.fontSizes["sm"]} color={theme.colors.neutral[25]} />
109
+ <Typography
110
+ text={"AUT"}
111
+ color={theme.colors.neutral[25]}
112
+ size={theme.fontSizes.xs}
113
+ fontFamily={theme.fonts.inter_bold_700}
114
+ lineHeight={theme.fontSizes.md ?? 16}
115
+ letterSpacing={"regular"}
116
+ marginLeft={2}
117
+ />
118
+ </Box>
119
+
120
+ <Box
121
+ flexStyle={{
122
+ flexDirection: "row",
123
+ alignItems: "center",
124
+ justifyContent: "space-between",
125
+ }}
126
+ marginStyle={{
127
+ marginRight: 8,
128
+ }}
129
+ >
130
+ <Icons icon={"TIMER"} size={theme.fontSizes["sm"]} color={theme.colors.neutral[25]} />
131
+ <Typography
132
+ text={`${kg}KG`}
133
+ color={theme.colors.neutral[25]}
134
+ size={theme.fontSizes.xs}
135
+ fontFamily={theme.fonts.inter_bold_700}
136
+ lineHeight={theme.fontSizes.md ?? 16}
137
+ letterSpacing={"regular"}
138
+ marginLeft={2}
139
+ />
140
+ </Box>
141
+
142
+ <Box
143
+ flexStyle={{
144
+ flexDirection: "row",
145
+ alignItems: "center",
146
+ justifyContent: "space-between",
147
+ }}
148
+ >
149
+ <Icons icon={"TIMER"} size={theme.fontSizes["sm"]} color={theme.colors.neutral[25]} />
150
+ <Typography
151
+ text={`${qtdCoils}QTD`}
152
+ color={theme.colors.neutral[25]}
153
+ size={theme.fontSizes.xs}
154
+ fontFamily={theme.fonts.inter_bold_700}
155
+ lineHeight={theme.fontSizes.md ?? 16}
156
+ letterSpacing={"regular"}
157
+ marginLeft={2}
158
+ />
159
+ </Box>
160
+ </Box>
161
+
162
+ {/**DADOS DO VEÍCULOS */}
163
+ <Box
164
+ flexStyle={{
165
+ flexDirection: "row",
166
+ justifyContent: "flex-start",
167
+ alignItems: "center",
168
+ }}
169
+ marginStyle={{
170
+ marginBottom: 4,
171
+ }}
172
+ >
173
+ <Typography
174
+ text={"Dados Veículo:"}
175
+ color={theme.colors.neutral[25]}
176
+ size={theme.fontSizes.xs}
177
+ fontFamily={theme.fonts.inter_regular_400}
178
+ lineHeight={theme.fontSizes.md ?? 16}
179
+ letterSpacing={"regular"}
180
+ />
181
+ <Typography
182
+ text={vehicle}
183
+ color={theme.colors.neutral[25]}
184
+ size={theme.fontSizes.xs}
185
+ fontFamily={theme.fonts.inter_bold_700}
186
+ lineHeight={theme.fontSizes.md ?? 16}
187
+ letterSpacing={"regular"}
188
+ marginLeft={4}
189
+ />
190
+ </Box>
191
+
192
+ {/**PREVISÃO DO CARREGAMENTO */}
193
+ <Box
194
+ width={"100%"}
195
+ flexStyle={{
196
+ flexDirection: "row",
197
+ alignItems: "center",
198
+ justifyContent: "space-between",
199
+ }}
200
+ marginStyle={{
201
+ marginBottom: 4,
202
+ }}
203
+ >
204
+ <Box
205
+ flexStyle={{
206
+ flexDirection: "row",
207
+ justifyContent: "flex-start",
208
+ alignItems: "center",
209
+ }}
210
+ >
211
+ <Typography
212
+ text={"Previsão:"}
213
+ color={theme.colors.neutral[25]}
214
+ size={theme.fontSizes.xs}
215
+ fontFamily={theme.fonts.inter_regular_400}
216
+ lineHeight={theme.fontSizes.md ?? 16}
217
+ letterSpacing={"regular"}
218
+ />
219
+ <Typography
220
+ text={prevision}
221
+ color={theme.colors.neutral[25]}
222
+ size={theme.fontSizes.xs}
223
+ fontFamily={theme.fonts.inter_bold_700}
224
+ lineHeight={theme.fontSizes.md ?? 16}
225
+ letterSpacing={"regular"}
226
+ marginLeft={4}
227
+ />
228
+ </Box>
229
+ </Box>
230
+
231
+ {/**STATUS DO CARREGAMENTO */}
232
+ <Box
233
+ width={"100%"}
234
+ flexStyle={{
235
+ flexDirection: "row",
236
+ alignItems: "center",
237
+ justifyContent: "space-between",
238
+ }}
239
+ marginStyle={{
240
+ marginBottom: 4,
241
+ }}
242
+ >
243
+ <Box
244
+ flexStyle={{
245
+ flexDirection: "row",
246
+ justifyContent: "flex-start",
247
+ alignItems: "center",
248
+ }}
249
+ >
250
+ <Typography
251
+ text={"Status:"}
252
+ color={theme.colors.neutral[25]}
253
+ size={theme.fontSizes.xs}
254
+ fontFamily={theme.fonts.inter_regular_400}
255
+ lineHeight={theme.fontSizes.md ?? 16}
256
+ letterSpacing={"regular"}
257
+ />
258
+ <Typography
259
+ text={status}
260
+ color={getStatusColor(status as StatusType)}
261
+ size={theme.fontSizes.xs}
262
+ fontFamily={theme.fonts.inter_bold_700}
263
+ lineHeight={theme.fontSizes.md ?? 16}
264
+ letterSpacing={"regular"}
265
+ marginLeft={4}
266
+ />
267
+ </Box>
268
+ </Box>
269
+ </Box>
270
+ </Box>
271
+ </TouchableOpacity>
272
+ );
273
+ };
274
+
275
+ /**
276
+ * EXPORTS
277
+ */
278
+ export { CardLoading };