react-native-exp-fig 0.1.21 → 0.1.23

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 (228) hide show
  1. package/lib/commonjs/@types/as-base-component.js +12 -0
  2. package/lib/commonjs/@types/as-base-component.js.map +1 -0
  3. package/lib/commonjs/common/icons-svg/constants/index.js +2 -1
  4. package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
  5. package/lib/commonjs/common/icons-svg/eclamation-triangle/index.js +33 -0
  6. package/lib/commonjs/common/icons-svg/eclamation-triangle/index.js.map +1 -0
  7. package/lib/commonjs/common/icons-svg/index.js +8 -0
  8. package/lib/commonjs/common/icons-svg/index.js.map +1 -1
  9. package/lib/commonjs/common/icons-svg/truck/index.js +2 -2
  10. package/lib/commonjs/common/icons-svg/truck/index.js.map +1 -1
  11. package/lib/commonjs/components/activities-daily/index.js +9 -9
  12. package/lib/commonjs/components/activities-daily/index.js.map +1 -1
  13. package/lib/commonjs/components/activities-progress/index.js +14 -14
  14. package/lib/commonjs/components/activities-progress/index.js.map +1 -1
  15. package/lib/commonjs/components/avatar-profile/index.js +4 -4
  16. package/lib/commonjs/components/avatar-profile/index.js.map +1 -1
  17. package/lib/commonjs/components/box/index.js +27 -22
  18. package/lib/commonjs/components/box/index.js.map +1 -1
  19. package/lib/commonjs/components/box/interface.d.js.map +1 -1
  20. package/lib/commonjs/components/box/styles.js.map +1 -1
  21. package/lib/commonjs/components/card-history/index.js +16 -16
  22. package/lib/commonjs/components/card-history/index.js.map +1 -1
  23. package/lib/commonjs/components/card-hours/index.js +3 -3
  24. package/lib/commonjs/components/card-hours/index.js.map +1 -1
  25. package/lib/commonjs/components/card-loading/index.js +13 -13
  26. package/lib/commonjs/components/card-loading/index.js.map +1 -1
  27. package/lib/commonjs/components/card-scheduled-journey/index.js +6 -6
  28. package/lib/commonjs/components/card-scheduled-journey/index.js.map +1 -1
  29. package/lib/commonjs/components/card-work-session/index.js +12 -12
  30. package/lib/commonjs/components/card-work-session/index.js.map +1 -1
  31. package/lib/commonjs/components/check-box/index.js +5 -5
  32. package/lib/commonjs/components/check-box/index.js.map +1 -1
  33. package/lib/commonjs/components/coil/index.js +5 -5
  34. package/lib/commonjs/components/coil/index.js.map +1 -1
  35. package/lib/commonjs/components/filter-date-selector/index.js +2 -2
  36. package/lib/commonjs/components/filter-date-selector/index.js.map +1 -1
  37. package/lib/commonjs/components/header-profile/index.js +8 -8
  38. package/lib/commonjs/components/header-profile/index.js.map +1 -1
  39. package/lib/commonjs/components/history-activities-card/index.js +198 -0
  40. package/lib/commonjs/components/history-activities-card/index.js.map +1 -0
  41. package/lib/commonjs/components/history-activities-card/interface.js +6 -0
  42. package/lib/commonjs/components/history-activities-card/interface.js.map +1 -0
  43. package/lib/commonjs/components/history-details/index.js +5 -5
  44. package/lib/commonjs/components/history-details/index.js.map +1 -1
  45. package/lib/commonjs/components/image-capture-with-remove/index.js +2 -2
  46. package/lib/commonjs/components/image-capture-with-remove/index.js.map +1 -1
  47. package/lib/commonjs/components/input/index.js +11 -11
  48. package/lib/commonjs/components/input/index.js.map +1 -1
  49. package/lib/commonjs/components/loading-details/index.js +10 -10
  50. package/lib/commonjs/components/loading-details/index.js.map +1 -1
  51. package/lib/commonjs/components/loading-progress/index.js +5 -5
  52. package/lib/commonjs/components/loading-progress/index.js.map +1 -1
  53. package/lib/commonjs/components/menu-item/index.js +3 -3
  54. package/lib/commonjs/components/menu-item/index.js.map +1 -1
  55. package/lib/commonjs/components/modal-activities/index.js +5 -5
  56. package/lib/commonjs/components/modal-activities/index.js.map +1 -1
  57. package/lib/commonjs/components/modal-change-activity/index.js +217 -0
  58. package/lib/commonjs/components/modal-change-activity/index.js.map +1 -0
  59. package/lib/commonjs/components/no-data/index.js +2 -2
  60. package/lib/commonjs/components/no-data/index.js.map +1 -1
  61. package/lib/commonjs/components/notification-loading/index.js +12 -12
  62. package/lib/commonjs/components/notification-loading/index.js.map +1 -1
  63. package/lib/commonjs/components/profile-menu-option/index.js +3 -3
  64. package/lib/commonjs/components/profile-menu-option/index.js.map +1 -1
  65. package/lib/commonjs/components/scheduled-journey-indicators/index.js +4 -4
  66. package/lib/commonjs/components/scheduled-journey-indicators/index.js.map +1 -1
  67. package/lib/commonjs/components/selects/select-option/index.js +28 -11
  68. package/lib/commonjs/components/selects/select-option/index.js.map +1 -1
  69. package/lib/commonjs/components/selects/select-option/interface.d.js.map +1 -1
  70. package/lib/commonjs/components/step-indicator/index.js +45 -7
  71. package/lib/commonjs/components/step-indicator/index.js.map +1 -1
  72. package/lib/commonjs/components/user-profile/index.js +9 -9
  73. package/lib/commonjs/components/user-profile/index.js.map +1 -1
  74. package/lib/commonjs/helpers/text-utils.js +21 -0
  75. package/lib/commonjs/helpers/text-utils.js.map +1 -0
  76. package/lib/commonjs/index.js +17 -2
  77. package/lib/commonjs/index.js.map +1 -1
  78. package/lib/commonjs/stories/box/box.stories.js +2 -2
  79. package/lib/commonjs/stories/box/box.stories.js.map +1 -1
  80. package/lib/commonjs/stories/history-activities-card/history-activities-card.stories.js +104 -0
  81. package/lib/commonjs/stories/history-activities-card/history-activities-card.stories.js.map +1 -0
  82. package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js +52 -0
  83. package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -0
  84. package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -1
  85. package/lib/module/@types/as-base-component.js +6 -0
  86. package/lib/module/@types/as-base-component.js.map +1 -0
  87. package/lib/module/common/icons-svg/constants/index.js +2 -1
  88. package/lib/module/common/icons-svg/constants/index.js.map +1 -1
  89. package/lib/module/common/icons-svg/eclamation-triangle/index.js +25 -0
  90. package/lib/module/common/icons-svg/eclamation-triangle/index.js.map +1 -0
  91. package/lib/module/common/icons-svg/index.js +8 -0
  92. package/lib/module/common/icons-svg/index.js.map +1 -1
  93. package/lib/module/common/icons-svg/truck/index.js +2 -2
  94. package/lib/module/common/icons-svg/truck/index.js.map +1 -1
  95. package/lib/module/components/activities-daily/index.js +5 -5
  96. package/lib/module/components/activities-daily/index.js.map +1 -1
  97. package/lib/module/components/activities-progress/index.js +5 -5
  98. package/lib/module/components/activities-progress/index.js.map +1 -1
  99. package/lib/module/components/avatar-profile/index.js +1 -1
  100. package/lib/module/components/avatar-profile/index.js.map +1 -1
  101. package/lib/module/components/box/index.js +24 -21
  102. package/lib/module/components/box/index.js.map +1 -1
  103. package/lib/module/components/box/interface.d.js.map +1 -1
  104. package/lib/module/components/box/styles.js.map +1 -1
  105. package/lib/module/components/card-history/index.js +8 -8
  106. package/lib/module/components/card-history/index.js.map +1 -1
  107. package/lib/module/components/card-hours/index.js +1 -1
  108. package/lib/module/components/card-hours/index.js.map +1 -1
  109. package/lib/module/components/card-loading/index.js +1 -1
  110. package/lib/module/components/card-loading/index.js.map +1 -1
  111. package/lib/module/components/card-scheduled-journey/index.js +1 -1
  112. package/lib/module/components/card-scheduled-journey/index.js.map +1 -1
  113. package/lib/module/components/card-work-session/index.js +1 -1
  114. package/lib/module/components/card-work-session/index.js.map +1 -1
  115. package/lib/module/components/check-box/index.js +1 -1
  116. package/lib/module/components/check-box/index.js.map +1 -1
  117. package/lib/module/components/coil/index.js +1 -1
  118. package/lib/module/components/coil/index.js.map +1 -1
  119. package/lib/module/components/filter-date-selector/index.js +1 -1
  120. package/lib/module/components/filter-date-selector/index.js.map +1 -1
  121. package/lib/module/components/header-profile/index.js +1 -1
  122. package/lib/module/components/header-profile/index.js.map +1 -1
  123. package/lib/module/components/history-activities-card/index.js +190 -0
  124. package/lib/module/components/history-activities-card/index.js.map +1 -0
  125. package/lib/module/components/history-activities-card/interface.js +2 -0
  126. package/lib/module/components/history-activities-card/interface.js.map +1 -0
  127. package/lib/module/components/history-details/index.js +1 -1
  128. package/lib/module/components/history-details/index.js.map +1 -1
  129. package/lib/module/components/image-capture-with-remove/index.js +1 -1
  130. package/lib/module/components/image-capture-with-remove/index.js.map +1 -1
  131. package/lib/module/components/input/index.js +1 -1
  132. package/lib/module/components/input/index.js.map +1 -1
  133. package/lib/module/components/loading-details/index.js +5 -5
  134. package/lib/module/components/loading-details/index.js.map +1 -1
  135. package/lib/module/components/loading-progress/index.js +1 -1
  136. package/lib/module/components/loading-progress/index.js.map +1 -1
  137. package/lib/module/components/menu-item/index.js +1 -1
  138. package/lib/module/components/menu-item/index.js.map +1 -1
  139. package/lib/module/components/modal-activities/index.js +1 -1
  140. package/lib/module/components/modal-activities/index.js.map +1 -1
  141. package/lib/module/components/modal-change-activity/index.js +208 -0
  142. package/lib/module/components/modal-change-activity/index.js.map +1 -0
  143. package/lib/module/components/no-data/index.js +1 -1
  144. package/lib/module/components/no-data/index.js.map +1 -1
  145. package/lib/module/components/notification-loading/index.js +5 -5
  146. package/lib/module/components/notification-loading/index.js.map +1 -1
  147. package/lib/module/components/profile-menu-option/index.js +1 -1
  148. package/lib/module/components/profile-menu-option/index.js.map +1 -1
  149. package/lib/module/components/scheduled-journey-indicators/index.js +1 -1
  150. package/lib/module/components/scheduled-journey-indicators/index.js.map +1 -1
  151. package/lib/module/components/selects/select-option/index.js +28 -11
  152. package/lib/module/components/selects/select-option/index.js.map +1 -1
  153. package/lib/module/components/selects/select-option/interface.d.js.map +1 -1
  154. package/lib/module/components/step-indicator/index.js +45 -7
  155. package/lib/module/components/step-indicator/index.js.map +1 -1
  156. package/lib/module/components/user-profile/index.js +1 -1
  157. package/lib/module/components/user-profile/index.js.map +1 -1
  158. package/lib/module/helpers/text-utils.js +14 -0
  159. package/lib/module/helpers/text-utils.js.map +1 -0
  160. package/lib/module/index.js +3 -1
  161. package/lib/module/index.js.map +1 -1
  162. package/lib/module/stories/box/box.stories.js +1 -1
  163. package/lib/module/stories/box/box.stories.js.map +1 -1
  164. package/lib/module/stories/history-activities-card/history-activities-card.stories.js +97 -0
  165. package/lib/module/stories/history-activities-card/history-activities-card.stories.js.map +1 -0
  166. package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js +45 -0
  167. package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -0
  168. package/lib/module/utils/get-icon-by-property/index.js +0 -1
  169. package/lib/module/utils/get-icon-by-property/index.js.map +1 -1
  170. package/lib/typescript/src/@types/as-base-component.d.ts +2 -0
  171. package/lib/typescript/src/common/icons-svg/constants/index.d.ts +1 -0
  172. package/lib/typescript/src/common/icons-svg/eclamation-triangle/index.d.ts +4 -0
  173. package/lib/typescript/src/components/box/index.d.ts +4 -3
  174. package/lib/typescript/src/components/box/styles.d.ts +2 -2
  175. package/lib/typescript/src/components/history-activities-card/index.d.ts +76 -0
  176. package/lib/typescript/src/components/history-activities-card/interface.d.ts +120 -0
  177. package/lib/typescript/src/components/modal-change-activity/index.d.ts +24 -0
  178. package/lib/typescript/src/helpers/text-utils.d.ts +7 -0
  179. package/lib/typescript/src/index.d.ts +3 -1
  180. package/lib/typescript/src/stories/box/box.stories.d.ts +1 -1
  181. package/lib/typescript/src/stories/history-activities-card/history-activities-card.stories.d.ts +10 -0
  182. package/lib/typescript/src/stories/modal-change-activity/modal-change-activity.stories.d.ts +9 -0
  183. package/lib/typescript/src/utils/get-icon-by-property/index.d.ts +2 -1
  184. package/package.json +11 -8
  185. package/src/@types/as-base-component.ts +9 -0
  186. package/src/common/icons-svg/constants/index.ts +1 -0
  187. package/src/common/icons-svg/eclamation-triangle/index.tsx +46 -0
  188. package/src/common/icons-svg/index.tsx +5 -1
  189. package/src/common/icons-svg/truck/index.tsx +2 -2
  190. package/src/components/activities-daily/index.tsx +116 -116
  191. package/src/components/activities-progress/index.tsx +170 -170
  192. package/src/components/avatar-profile/index.tsx +1 -1
  193. package/src/components/box/index.tsx +28 -22
  194. package/src/components/box/interface.d.ts +2 -2
  195. package/src/components/box/styles.ts +2 -2
  196. package/src/components/card-history/index.tsx +221 -221
  197. package/src/components/card-hours/index.tsx +2 -1
  198. package/src/components/card-loading/index.tsx +1 -1
  199. package/src/components/card-scheduled-journey/index.tsx +1 -1
  200. package/src/components/card-work-session/index.tsx +1 -1
  201. package/src/components/check-box/index.tsx +1 -1
  202. package/src/components/coil/index.tsx +1 -1
  203. package/src/components/filter-date-selector/index.tsx +1 -1
  204. package/src/components/header-profile/index.tsx +1 -1
  205. package/src/components/history-activities-card/index.tsx +217 -0
  206. package/src/components/history-activities-card/interface.ts +147 -0
  207. package/src/components/history-details/index.tsx +1 -1
  208. package/src/components/image-capture-with-remove/index.tsx +1 -1
  209. package/src/components/input/index.tsx +1 -1
  210. package/src/components/loading-details/index.tsx +156 -156
  211. package/src/components/loading-progress/index.tsx +1 -1
  212. package/src/components/menu-item/index.tsx +1 -1
  213. package/src/components/modal-activities/index.tsx +1 -1
  214. package/src/components/modal-change-activity/index.tsx +200 -0
  215. package/src/components/no-data/index.tsx +1 -1
  216. package/src/components/notification-loading/index.tsx +157 -157
  217. package/src/components/profile-menu-option/index.tsx +1 -1
  218. package/src/components/scheduled-journey-indicators/index.tsx +1 -1
  219. package/src/components/selects/select-option/index.tsx +115 -100
  220. package/src/components/selects/select-option/interface.d.ts +18 -18
  221. package/src/components/step-indicator/index.tsx +63 -7
  222. package/src/components/user-profile/index.tsx +1 -1
  223. package/src/helpers/text-utils.ts +15 -0
  224. package/src/index.ts +3 -1
  225. package/src/stories/box/box.stories.tsx +1 -1
  226. package/src/stories/history-activities-card/history-activities-card.stories.tsx +107 -0
  227. package/src/stories/modal-change-activity/modal-change-activity.stories.tsx +51 -0
  228. package/src/utils/get-icon-by-property/index.tsx +13 -1
@@ -1,33 +1,32 @@
1
1
  /**
2
2
  * IMPORTS
3
3
  */
4
- import React from "react";
4
+ import React, { forwardRef } from "react";
5
5
  import { View } from "react-native";
6
6
 
7
7
  // typings
8
- import { IBoxProps } from "./interface";
8
+ import { asBaseComponent } from "../../@types/as-base-component";
9
+ import type { IBoxInterface } from "./interface";
9
10
 
10
11
  // styles
11
12
  import { styles } from "./styles";
12
13
 
13
- /**
14
- * Componente Box para envolver outros componentes de forma flexível.
15
- */
16
- export const Box: React.FC<IBoxProps> = ({
17
- children,
18
- width,
19
- height,
20
- backgroundColor,
21
- borderStyled,
22
- flexStyle,
23
- paddingStyle,
24
- marginStyle,
25
- opacity = 1,
26
- testID = "box",
27
- style,
28
- }) => {
29
- // Criando o objeto de estilos dinamicamente
30
- const styleProps: Partial<IBoxProps> = {
14
+ const Box = forwardRef<any, IBoxInterface>((props, ref): React.ReactElement => {
15
+ const {
16
+ children,
17
+ width,
18
+ height,
19
+ backgroundColor,
20
+ borderStyled,
21
+ flexStyle,
22
+ paddingStyle,
23
+ marginStyle,
24
+ opacity = 1,
25
+ testID = "box",
26
+ style,
27
+ } = props;
28
+
29
+ const styleProps = {
31
30
  width,
32
31
  height,
33
32
  backgroundColor,
@@ -40,8 +39,15 @@ export const Box: React.FC<IBoxProps> = ({
40
39
  };
41
40
 
42
41
  return (
43
- <View testID={testID} style={[styles(styleProps).boxStyle, style]}>
42
+ <View ref={ref} testID={testID} style={[styles(styleProps).boxStyle, style]}>
44
43
  {children}
45
44
  </View>
46
45
  );
47
- };
46
+ });
47
+
48
+ Box.displayName = "Box";
49
+
50
+ /**
51
+ * Componente Box para a interação da ui.
52
+ */
53
+ export default asBaseComponent(Box);
@@ -8,7 +8,7 @@ import { type ViewProps } from "react-native";
8
8
  */
9
9
  import { IGlobalCss } from "../../styles/global/interface";
10
10
 
11
- interface IBoxProps extends ViewProps, IGlobalCss {
11
+ interface IBoxInterface extends ViewProps, IGlobalCss {
12
12
  /**
13
13
  * A propriedade CSS de Shadow Box adiciona efeitos de sombra em torno da estrutura de um elemento. Você pode definir vários efeitos separados por vírgulas. Uma sombra de caixa é descrita por compensações x e y em relação ao elemento, borrão e raio espalhado e cor.
14
14
  */
@@ -28,4 +28,4 @@ interface IBoxProps extends ViewProps, IGlobalCss {
28
28
  /**
29
29
  * EXPORT
30
30
  */
31
- export type { IBoxProps };
31
+ export type { IBoxInterface };
@@ -1,12 +1,12 @@
1
1
  import { StyleSheet, ViewProps } from "react-native";
2
- import { IBoxProps } from "./interface.d";
2
+ import { IBoxInterface } from "./interface.d";
3
3
 
4
4
  // typing
5
5
  import { IGlobalCss } from "../../styles/global/interface";
6
6
 
7
7
  import { stylesGlobal } from "../../styles/global/styles";
8
8
 
9
- interface BoxProps extends IBoxProps, IGlobalCss {}
9
+ interface BoxProps extends IBoxInterface, IGlobalCss {}
10
10
  const styles = (props: BoxProps) =>
11
11
  StyleSheet.create({
12
12
  boxStyle: {
@@ -1,221 +1,221 @@
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
- // typings
12
- import { ICardHistory } from "./interface";
13
-
14
- // styles
15
- import { theme } from "../../styles/theme/theme";
16
- import { Icons } from "../../common/icons-svg";
17
-
18
- /**
19
- *
20
- * Componente CardLoading para a interação do usuário com ui.
21
- */
22
- const CardHistory: React.FC<ICardHistory> = ({
23
- width,
24
- title = "Carregamento #01020304050607",
25
- local = "Doca 1, Patío 03 - Usiminas Ipatinga",
26
- vehicle = "EXP-0000",
27
- data_start = "12:34 10/03/2025",
28
- data_end = "13:34 10/03/2025",
29
- duration = "01:34",
30
- testID,
31
- handleNavigation,
32
- status_carregamento,
33
- }: ICardHistory) => {
34
- return (
35
- <TouchableOpacity onPress={handleNavigation} activeOpacity={0.7}>
36
- <Box
37
- testID={testID}
38
- width={width ?? "100%"}
39
- backgroundColor={theme.colors.blue[400]}
40
- marginStyle={{ marginBottom: theme.margins.md }}
41
- paddingStyle={{ padding: theme.paddings["2xs"] }}
42
- borderStyled={{
43
- borderWidth: theme.borderWidths.thin,
44
- borderColor: theme.colors.blue[400],
45
- borderRadius: theme.borderWidths.thick_medium,
46
- }}
47
- flexStyle={{ flexDirection: "row", justifyContent: "flex-start", alignItems: "center" }}
48
- >
49
- <Box width={"25%"} borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}>
50
- <Image
51
- source={{
52
- uri: "https://th.bing.com/th/id/OIP.Rr9_IUNo8J66QbvQkxzXtwHaEJ?w=276&h=180&c=7&r=0&o=5&pid=1.7",
53
- }}
54
- style={{
55
- width: "100%",
56
- flex: 1,
57
- borderRadius: theme.borderWidths.thick_medium,
58
- }}
59
- />
60
- </Box>
61
-
62
- <Box width={"75%"} paddingStyle={{ paddingLeft: theme.paddings["2xs"] }}>
63
- <Typography
64
- text={title}
65
- ellipsizeMode="tail"
66
- numberOfLines={1}
67
- color={theme.colors.neutral[25]}
68
- size={theme.fontSizes.sm}
69
- fontFamily={theme.fonts.inter_bold_700}
70
- lineHeight={theme.fontSizes.xl ?? 20}
71
- letterSpacing={"regular"}
72
- marginBottom={4}
73
- />
74
-
75
- <Typography
76
- text={local}
77
- color={theme.colors.neutral[25]}
78
- size={theme.fontSizes.xs}
79
- fontFamily={theme.fonts.inter_regular_400}
80
- lineHeight={theme.fontSizes.md ?? 16}
81
- letterSpacing={"regular"}
82
- marginBottom={4}
83
- />
84
-
85
- {/**DADOS DO VEÍCULOS */}
86
- <Box
87
- flexStyle={{
88
- flexDirection: "row",
89
- justifyContent: "space-between",
90
- alignItems: "center",
91
- }}
92
- marginStyle={{
93
- marginBottom: 4,
94
- }}
95
- >
96
- <Box
97
- flexStyle={{
98
- flexDirection: "row",
99
- alignItems: "center",
100
- }}
101
- >
102
- <Typography
103
- text={"Dados Veículo:"}
104
- color={theme.colors.neutral[25]}
105
- size={theme.fontSizes.xs}
106
- fontFamily={theme.fonts.inter_regular_400}
107
- lineHeight={theme.fontSizes.md ?? 16}
108
- letterSpacing={"regular"}
109
- />
110
- <Typography
111
- text={vehicle}
112
- color={theme.colors.neutral[25]}
113
- size={theme.fontSizes.xs}
114
- fontFamily={theme.fonts.inter_bold_700}
115
- lineHeight={theme.fontSizes.md ?? 16}
116
- letterSpacing={"regular"}
117
- marginLeft={4}
118
- />
119
- </Box>
120
- <Icons size={9} color={status_carregamento} icon={"ELLIPSE"} />
121
- </Box>
122
-
123
- {/**DATA INICIO DO CARREGAMENTO */}
124
- <Box
125
- flexStyle={{
126
- flexDirection: "row",
127
- justifyContent: "flex-start",
128
- alignItems: "center",
129
- }}
130
- marginStyle={{
131
- marginBottom: 4,
132
- }}
133
- >
134
- <Typography
135
- text={"Data Inicio:"}
136
- color={theme.colors.neutral[25]}
137
- size={theme.fontSizes.xs}
138
- fontFamily={theme.fonts.inter_regular_400}
139
- lineHeight={theme.fontSizes.md ?? 16}
140
- letterSpacing={"regular"}
141
- />
142
- <Typography
143
- text={data_start}
144
- color={theme.colors.neutral[25]}
145
- size={theme.fontSizes.xs}
146
- fontFamily={theme.fonts.inter_bold_700}
147
- lineHeight={theme.fontSizes.md ?? 16}
148
- letterSpacing={"regular"}
149
- marginLeft={4}
150
- />
151
- </Box>
152
-
153
- {/**DATA FIM DO CARREGAMENTO */}
154
- <Box
155
- flexStyle={{
156
- flexDirection: "row",
157
- justifyContent: "flex-start",
158
- alignItems: "center",
159
- }}
160
- marginStyle={{
161
- marginBottom: 4,
162
- }}
163
- >
164
- <Typography
165
- text={"Data Fim:"}
166
- color={theme.colors.neutral[25]}
167
- size={theme.fontSizes.xs}
168
- fontFamily={theme.fonts.inter_regular_400}
169
- lineHeight={theme.fontSizes.md ?? 16}
170
- letterSpacing={"regular"}
171
- />
172
- <Typography
173
- text={data_end}
174
- color={theme.colors.neutral[25]}
175
- size={theme.fontSizes.xs}
176
- fontFamily={theme.fonts.inter_bold_700}
177
- lineHeight={theme.fontSizes.md ?? 16}
178
- letterSpacing={"regular"}
179
- marginLeft={4}
180
- />
181
- </Box>
182
-
183
- {/**DURAÇÃO DO CARREGAMENTO */}
184
- <Box
185
- flexStyle={{
186
- flexDirection: "row",
187
- justifyContent: "flex-start",
188
- alignItems: "center",
189
- }}
190
- marginStyle={{
191
- marginBottom: 4,
192
- }}
193
- >
194
- <Typography
195
- text={"Duração:"}
196
- color={theme.colors.neutral[25]}
197
- size={theme.fontSizes.xs}
198
- fontFamily={theme.fonts.inter_regular_400}
199
- lineHeight={theme.fontSizes.md ?? 16}
200
- letterSpacing={"regular"}
201
- />
202
- <Typography
203
- text={duration}
204
- color={theme.colors.neutral[25]}
205
- size={theme.fontSizes.xs}
206
- fontFamily={theme.fonts.inter_bold_700}
207
- lineHeight={theme.fontSizes.md ?? 16}
208
- letterSpacing={"regular"}
209
- marginLeft={4}
210
- />
211
- </Box>
212
- </Box>
213
- </Box>
214
- </TouchableOpacity>
215
- );
216
- };
217
-
218
- /**
219
- * EXPORTS
220
- */
221
- export { CardHistory };
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
+ // typings
12
+ import { ICardHistory } from "./interface";
13
+
14
+ // styles
15
+ import { theme } from "../../styles/theme/theme";
16
+ import { Icons } from "../../common/icons-svg";
17
+
18
+ /**
19
+ *
20
+ * Componente CardLoading para a interação do usuário com ui.
21
+ */
22
+ const CardHistory: React.FC<ICardHistory> = ({
23
+ width,
24
+ title = "Carregamento #01020304050607",
25
+ local = "Doca 1, Patío 03 - Usiminas Ipatinga",
26
+ vehicle = "EXP-0000",
27
+ data_start = "12:34 10/03/2025",
28
+ data_end = "13:34 10/03/2025",
29
+ duration = "01:34",
30
+ testID,
31
+ handleNavigation,
32
+ status_carregamento,
33
+ }: ICardHistory) => {
34
+ return (
35
+ <TouchableOpacity onPress={handleNavigation} activeOpacity={0.7}>
36
+ <Box
37
+ testID={testID}
38
+ width={width ?? "100%"}
39
+ backgroundColor={theme.colors.blue[400]}
40
+ marginStyle={{ marginBottom: theme.margins.md }}
41
+ paddingStyle={{ padding: theme.paddings["2xs"] }}
42
+ borderStyled={{
43
+ borderWidth: theme.borderWidths.thin,
44
+ borderColor: theme.colors.blue[400],
45
+ borderRadius: theme.borderWidths.thick_medium,
46
+ }}
47
+ flexStyle={{ flexDirection: "row", justifyContent: "flex-start", alignItems: "center" }}
48
+ >
49
+ <Box width={"25%"} borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}>
50
+ <Image
51
+ source={{
52
+ uri: "https://th.bing.com/th/id/OIP.Rr9_IUNo8J66QbvQkxzXtwHaEJ?w=276&h=180&c=7&r=0&o=5&pid=1.7",
53
+ }}
54
+ style={{
55
+ width: "100%",
56
+ flex: 1,
57
+ borderRadius: theme.borderWidths.thick_medium,
58
+ }}
59
+ />
60
+ </Box>
61
+
62
+ <Box width={"75%"} paddingStyle={{ paddingLeft: theme.paddings["2xs"] }}>
63
+ <Typography
64
+ text={title}
65
+ ellipsizeMode="tail"
66
+ numberOfLines={1}
67
+ color={theme.colors.neutral[25]}
68
+ size={theme.fontSizes.sm}
69
+ fontFamily={theme.fonts.inter_bold_700}
70
+ lineHeight={theme.fontSizes.xl ?? 20}
71
+ letterSpacing={"regular"}
72
+ marginBottom={4}
73
+ />
74
+
75
+ <Typography
76
+ text={local}
77
+ color={theme.colors.neutral[25]}
78
+ size={theme.fontSizes.xs}
79
+ fontFamily={theme.fonts.inter_regular_400}
80
+ lineHeight={theme.fontSizes.md ?? 16}
81
+ letterSpacing={"regular"}
82
+ marginBottom={4}
83
+ />
84
+
85
+ {/**DADOS DO VEÍCULOS */}
86
+ <Box
87
+ flexStyle={{
88
+ flexDirection: "row",
89
+ justifyContent: "space-between",
90
+ alignItems: "center",
91
+ }}
92
+ marginStyle={{
93
+ marginBottom: 4,
94
+ }}
95
+ >
96
+ <Box
97
+ flexStyle={{
98
+ flexDirection: "row",
99
+ alignItems: "center",
100
+ }}
101
+ >
102
+ <Typography
103
+ text={"Dados Veículo:"}
104
+ color={theme.colors.neutral[25]}
105
+ size={theme.fontSizes.xs}
106
+ fontFamily={theme.fonts.inter_regular_400}
107
+ lineHeight={theme.fontSizes.md ?? 16}
108
+ letterSpacing={"regular"}
109
+ />
110
+ <Typography
111
+ text={vehicle}
112
+ color={theme.colors.neutral[25]}
113
+ size={theme.fontSizes.xs}
114
+ fontFamily={theme.fonts.inter_bold_700}
115
+ lineHeight={theme.fontSizes.md ?? 16}
116
+ letterSpacing={"regular"}
117
+ marginLeft={4}
118
+ />
119
+ </Box>
120
+ <Icons size={9} color={status_carregamento} icon={"ELLIPSE"} />
121
+ </Box>
122
+
123
+ {/**DATA INICIO DO CARREGAMENTO */}
124
+ <Box
125
+ flexStyle={{
126
+ flexDirection: "row",
127
+ justifyContent: "flex-start",
128
+ alignItems: "center",
129
+ }}
130
+ marginStyle={{
131
+ marginBottom: 4,
132
+ }}
133
+ >
134
+ <Typography
135
+ text={"Data Inicio:"}
136
+ color={theme.colors.neutral[25]}
137
+ size={theme.fontSizes.xs}
138
+ fontFamily={theme.fonts.inter_regular_400}
139
+ lineHeight={theme.fontSizes.md ?? 16}
140
+ letterSpacing={"regular"}
141
+ />
142
+ <Typography
143
+ text={data_start}
144
+ color={theme.colors.neutral[25]}
145
+ size={theme.fontSizes.xs}
146
+ fontFamily={theme.fonts.inter_bold_700}
147
+ lineHeight={theme.fontSizes.md ?? 16}
148
+ letterSpacing={"regular"}
149
+ marginLeft={4}
150
+ />
151
+ </Box>
152
+
153
+ {/**DATA FIM DO CARREGAMENTO */}
154
+ <Box
155
+ flexStyle={{
156
+ flexDirection: "row",
157
+ justifyContent: "flex-start",
158
+ alignItems: "center",
159
+ }}
160
+ marginStyle={{
161
+ marginBottom: 4,
162
+ }}
163
+ >
164
+ <Typography
165
+ text={"Data Fim:"}
166
+ color={theme.colors.neutral[25]}
167
+ size={theme.fontSizes.xs}
168
+ fontFamily={theme.fonts.inter_regular_400}
169
+ lineHeight={theme.fontSizes.md ?? 16}
170
+ letterSpacing={"regular"}
171
+ />
172
+ <Typography
173
+ text={data_end}
174
+ color={theme.colors.neutral[25]}
175
+ size={theme.fontSizes.xs}
176
+ fontFamily={theme.fonts.inter_bold_700}
177
+ lineHeight={theme.fontSizes.md ?? 16}
178
+ letterSpacing={"regular"}
179
+ marginLeft={4}
180
+ />
181
+ </Box>
182
+
183
+ {/**DURAÇÃO DO CARREGAMENTO */}
184
+ <Box
185
+ flexStyle={{
186
+ flexDirection: "row",
187
+ justifyContent: "flex-start",
188
+ alignItems: "center",
189
+ }}
190
+ marginStyle={{
191
+ marginBottom: 4,
192
+ }}
193
+ >
194
+ <Typography
195
+ text={"Duração:"}
196
+ color={theme.colors.neutral[25]}
197
+ size={theme.fontSizes.xs}
198
+ fontFamily={theme.fonts.inter_regular_400}
199
+ lineHeight={theme.fontSizes.md ?? 16}
200
+ letterSpacing={"regular"}
201
+ />
202
+ <Typography
203
+ text={duration}
204
+ color={theme.colors.neutral[25]}
205
+ size={theme.fontSizes.xs}
206
+ fontFamily={theme.fonts.inter_bold_700}
207
+ lineHeight={theme.fontSizes.md ?? 16}
208
+ letterSpacing={"regular"}
209
+ marginLeft={4}
210
+ />
211
+ </Box>
212
+ </Box>
213
+ </Box>
214
+ </TouchableOpacity>
215
+ );
216
+ };
217
+
218
+ /**
219
+ * EXPORTS
220
+ */
221
+ export { CardHistory };
@@ -3,7 +3,8 @@
3
3
  */ import React from "react";
4
4
 
5
5
  // components
6
- import { Box } from "../box";
6
+ import Box from "../box";
7
+
7
8
  import { Typography } from "../typography";
8
9
 
9
10
  // typing
@@ -5,7 +5,7 @@ import React from "react";
5
5
  import { Image, TouchableOpacity } from "react-native";
6
6
 
7
7
  // components
8
- import { Box } from "../box";
8
+ import Box from "../box";
9
9
  import { Typography } from "../typography";
10
10
 
11
11
  // comons / icons
@@ -5,7 +5,7 @@ import React from "react";
5
5
  import { Dimensions } from "react-native";
6
6
 
7
7
  // components
8
- import { Box } from "../box";
8
+ import Box from "../box";
9
9
  import { Typography } from "../typography";
10
10
 
11
11
  // typings
@@ -5,7 +5,7 @@ import React from "react";
5
5
  import { Image, TouchableOpacity } from "react-native";
6
6
 
7
7
  // components
8
- import { Box } from "../box";
8
+ import Box from "../box";
9
9
  import { Typography } from "../typography";
10
10
 
11
11
  // commons / icons
@@ -14,7 +14,7 @@ import { Icons } from "../../common/icons-svg";
14
14
  import { ICheckBoxProps } from "./interface";
15
15
 
16
16
  // styles
17
- import { Box } from "../box";
17
+ import Box from "../box";
18
18
 
19
19
  /**
20
20
  * Componente CheckBox para a interação da ui.
@@ -5,7 +5,7 @@ import React from "react";
5
5
  import { TouchableOpacity } from "react-native";
6
6
 
7
7
  // components
8
- import { Box } from "../box";
8
+ import Box from "../box";
9
9
  import { Typography } from "../typography";
10
10
 
11
11
  // icons
@@ -5,7 +5,7 @@ import React from "react";
5
5
  import { TouchableOpacity, ActivityIndicator, FlatList } from "react-native";
6
6
 
7
7
  // components
8
- import { Box } from "../box";
8
+ import Box from "../box";
9
9
  import { Typography } from "../typography";
10
10
 
11
11
  // styles
@@ -5,7 +5,7 @@ import React from "react";
5
5
  import { Dimensions, TouchableOpacity } from "react-native";
6
6
 
7
7
  // components
8
- import { Box } from "../box";
8
+ import Box from "../box";
9
9
  import { Typography } from "../typography";
10
10
 
11
11
  // typings