jornada-ui 0.4.19 → 0.4.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/lib/commonjs/components/box/index.js +5 -5
  2. package/lib/commonjs/components/box/index.js.map +1 -1
  3. package/lib/commonjs/components/button/index.js +5 -5
  4. package/lib/commonjs/components/button/index.js.map +1 -1
  5. package/lib/commonjs/components/capture-photo/index.js +1 -1
  6. package/lib/commonjs/components/capture-photo/index.js.map +1 -1
  7. package/lib/commonjs/components/card-hours/index.js +5 -5
  8. package/lib/commonjs/components/card-hours/index.js.map +1 -1
  9. package/lib/commonjs/components/card-maintenance/index.js +3 -0
  10. package/lib/commonjs/components/card-maintenance/index.js.map +1 -1
  11. package/lib/commonjs/components/maintenance-description-input/index.js +5 -1
  12. package/lib/commonjs/components/maintenance-description-input/index.js.map +1 -1
  13. package/lib/commonjs/components/modal-maintenance/index.js +2 -0
  14. package/lib/commonjs/components/modal-maintenance/index.js.map +1 -1
  15. package/lib/commonjs/components/modal-type-activities/index.js +10 -4
  16. package/lib/commonjs/components/modal-type-activities/index.js.map +1 -1
  17. package/lib/commonjs/components/modals/modal-change-activitie-history/index.js +2 -0
  18. package/lib/commonjs/components/modals/modal-change-activitie-history/index.js.map +1 -1
  19. package/lib/commonjs/components/report-bobinas/index.js +12 -6
  20. package/lib/commonjs/components/report-bobinas/index.js.map +1 -1
  21. package/lib/commonjs/components/resume-raking/index.js +5 -0
  22. package/lib/commonjs/components/resume-raking/index.js.map +1 -1
  23. package/lib/commonjs/components/step-indicator/index.js +12 -4
  24. package/lib/commonjs/components/step-indicator/index.js.map +1 -1
  25. package/lib/commonjs/components/toast-message/index.js +10 -6
  26. package/lib/commonjs/components/toast-message/index.js.map +1 -1
  27. package/lib/commonjs/components/toggle-fuel/index.js +1 -0
  28. package/lib/commonjs/components/toggle-fuel/index.js.map +1 -1
  29. package/lib/commonjs/components/typography/index.js +2 -0
  30. package/lib/commonjs/components/typography/index.js.map +1 -1
  31. package/lib/commonjs/components/user-journey-work-card/index.js +14 -0
  32. package/lib/commonjs/components/user-journey-work-card/index.js.map +1 -1
  33. package/lib/commonjs/components/user-profile/index.js +9 -1
  34. package/lib/commonjs/components/user-profile/index.js.map +1 -1
  35. package/lib/commonjs/components/weekly-hours-balance/index.js +2 -0
  36. package/lib/commonjs/components/weekly-hours-balance/index.js.map +1 -1
  37. package/lib/module/components/box/index.js +5 -5
  38. package/lib/module/components/box/index.js.map +1 -1
  39. package/lib/module/components/button/index.js +5 -5
  40. package/lib/module/components/button/index.js.map +1 -1
  41. package/lib/module/components/capture-photo/index.js +1 -1
  42. package/lib/module/components/capture-photo/index.js.map +1 -1
  43. package/lib/module/components/card-hours/index.js +5 -5
  44. package/lib/module/components/card-hours/index.js.map +1 -1
  45. package/lib/module/components/card-maintenance/index.js +3 -0
  46. package/lib/module/components/card-maintenance/index.js.map +1 -1
  47. package/lib/module/components/maintenance-description-input/index.js +5 -1
  48. package/lib/module/components/maintenance-description-input/index.js.map +1 -1
  49. package/lib/module/components/modal-maintenance/index.js +2 -0
  50. package/lib/module/components/modal-maintenance/index.js.map +1 -1
  51. package/lib/module/components/modal-type-activities/index.js +10 -4
  52. package/lib/module/components/modal-type-activities/index.js.map +1 -1
  53. package/lib/module/components/modals/modal-change-activitie-history/index.js +2 -0
  54. package/lib/module/components/modals/modal-change-activitie-history/index.js.map +1 -1
  55. package/lib/module/components/report-bobinas/index.js +12 -6
  56. package/lib/module/components/report-bobinas/index.js.map +1 -1
  57. package/lib/module/components/resume-raking/index.js +5 -0
  58. package/lib/module/components/resume-raking/index.js.map +1 -1
  59. package/lib/module/components/step-indicator/index.js +12 -4
  60. package/lib/module/components/step-indicator/index.js.map +1 -1
  61. package/lib/module/components/toast-message/index.js +10 -6
  62. package/lib/module/components/toast-message/index.js.map +1 -1
  63. package/lib/module/components/toggle-fuel/index.js +1 -0
  64. package/lib/module/components/toggle-fuel/index.js.map +1 -1
  65. package/lib/module/components/typography/index.js +2 -0
  66. package/lib/module/components/typography/index.js.map +1 -1
  67. package/lib/module/components/user-journey-work-card/index.js +14 -0
  68. package/lib/module/components/user-journey-work-card/index.js.map +1 -1
  69. package/lib/module/components/user-profile/index.js +9 -1
  70. package/lib/module/components/user-profile/index.js.map +1 -1
  71. package/lib/module/components/weekly-hours-balance/index.js +2 -0
  72. package/lib/module/components/weekly-hours-balance/index.js.map +1 -1
  73. package/lib/typescript/commonjs/src/components/box/index.d.ts.map +1 -1
  74. package/lib/typescript/commonjs/src/components/button/index.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/src/components/capture-photo/index.d.ts.map +1 -1
  76. package/lib/typescript/commonjs/src/components/card-hours/index.d.ts.map +1 -1
  77. package/lib/typescript/commonjs/src/components/card-maintenance/index.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/src/components/maintenance-description-input/index.d.ts.map +1 -1
  79. package/lib/typescript/commonjs/src/components/modal-maintenance/index.d.ts.map +1 -1
  80. package/lib/typescript/commonjs/src/components/modal-type-activities/index.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts +2 -0
  82. package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts.map +1 -1
  83. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts +4 -0
  85. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/src/components/report-bobinas/index.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/src/components/resume-raking/index.d.ts.map +1 -1
  88. package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts +13 -0
  89. package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts +3 -0
  91. package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts.map +1 -1
  92. package/lib/typescript/commonjs/src/components/toast-message/index.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/src/components/toast-message/interface.d.ts +1 -0
  94. package/lib/typescript/commonjs/src/components/toast-message/interface.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/src/components/toggle-fuel/index.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/src/components/typography/index.d.ts +1 -0
  97. package/lib/typescript/commonjs/src/components/typography/index.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/src/components/user-profile/index.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/src/components/weekly-hours-balance/index.d.ts.map +1 -1
  101. package/lib/typescript/module/src/components/box/index.d.ts.map +1 -1
  102. package/lib/typescript/module/src/components/button/index.d.ts.map +1 -1
  103. package/lib/typescript/module/src/components/capture-photo/index.d.ts.map +1 -1
  104. package/lib/typescript/module/src/components/card-hours/index.d.ts.map +1 -1
  105. package/lib/typescript/module/src/components/card-maintenance/index.d.ts.map +1 -1
  106. package/lib/typescript/module/src/components/maintenance-description-input/index.d.ts.map +1 -1
  107. package/lib/typescript/module/src/components/modal-maintenance/index.d.ts.map +1 -1
  108. package/lib/typescript/module/src/components/modal-type-activities/index.d.ts.map +1 -1
  109. package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts +2 -0
  110. package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts.map +1 -1
  111. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -1
  112. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts +4 -0
  113. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -1
  114. package/lib/typescript/module/src/components/report-bobinas/index.d.ts.map +1 -1
  115. package/lib/typescript/module/src/components/resume-raking/index.d.ts.map +1 -1
  116. package/lib/typescript/module/src/components/resume-raking/interface.d.ts +13 -0
  117. package/lib/typescript/module/src/components/resume-raking/interface.d.ts.map +1 -1
  118. package/lib/typescript/module/src/components/step-indicator/index.d.ts +3 -0
  119. package/lib/typescript/module/src/components/step-indicator/index.d.ts.map +1 -1
  120. package/lib/typescript/module/src/components/toast-message/index.d.ts.map +1 -1
  121. package/lib/typescript/module/src/components/toast-message/interface.d.ts +1 -0
  122. package/lib/typescript/module/src/components/toast-message/interface.d.ts.map +1 -1
  123. package/lib/typescript/module/src/components/toggle-fuel/index.d.ts.map +1 -1
  124. package/lib/typescript/module/src/components/typography/index.d.ts +1 -0
  125. package/lib/typescript/module/src/components/typography/index.d.ts.map +1 -1
  126. package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts.map +1 -1
  127. package/lib/typescript/module/src/components/user-profile/index.d.ts.map +1 -1
  128. package/lib/typescript/module/src/components/weekly-hours-balance/index.d.ts.map +1 -1
  129. package/package.json +2 -1
  130. package/src/components/box/index.tsx +53 -53
  131. package/src/components/button/index.tsx +76 -76
  132. package/src/components/capture-photo/index.tsx +1 -1
  133. package/src/components/card-hours/index.tsx +121 -121
  134. package/src/components/card-maintenance/index.tsx +8 -2
  135. package/src/components/card-maintenance/interface.d.ts +4 -0
  136. package/src/components/maintenance-description-input/index.tsx +11 -4
  137. package/src/components/modal-maintenance/index.tsx +2 -1
  138. package/src/components/modal-maintenance/interface.d.ts +1 -0
  139. package/src/components/modal-type-activities/index.tsx +23 -5
  140. package/src/components/modal-type-activities/interface.ts +3 -0
  141. package/src/components/modals/modal-change-activitie-history/index.tsx +2 -1
  142. package/src/components/modals/modal-change-activitie-history/interface.ts +4 -0
  143. package/src/components/report-bobinas/index.tsx +185 -175
  144. package/src/components/resume-raking/index.tsx +5 -1
  145. package/src/components/resume-raking/interface.ts +16 -0
  146. package/src/components/step-indicator/index.tsx +26 -8
  147. package/src/components/step-indicator/interface.d.ts +3 -0
  148. package/src/components/toast-message/index.tsx +77 -75
  149. package/src/components/toast-message/interface.ts +18 -17
  150. package/src/components/toggle-fuel/index.tsx +1 -0
  151. package/src/components/typography/index.tsx +2 -0
  152. package/src/components/typography/interface.d.ts +104 -102
  153. package/src/components/user-journey-work-card/index.tsx +23 -2
  154. package/src/components/user-profile/index.tsx +10 -1
  155. package/src/components/weekly-hours-balance/index.tsx +2 -1
@@ -4,18 +4,19 @@
4
4
  import React, { forwardRef, useState } from "react";
5
5
  import { View, Text, TextInput } from "react-native";
6
6
 
7
+ import Box from "../box";
8
+
7
9
  // typings
8
10
  import type { MaintenanceDescriptionInputProps } from "./interface";
9
11
  import { asBaseComponent } from "../../@types/as-base-component";
10
12
 
11
13
  // styles
12
14
  import { stylesInput } from "./styles";
13
- import Box from "../box";
14
15
 
15
16
  const MAX_LENGTH = 150;
16
17
 
17
18
  const MaintenanceDescriptionInput = forwardRef<any, MaintenanceDescriptionInputProps>(
18
- ({ label, onChangeText, error = null, ...props }, ref): React.ReactElement => {
19
+ ({ testID, label, onChangeText, error = null, ...props }, ref): React.ReactElement => {
19
20
  const [text, setText] = useState("");
20
21
 
21
22
  const handleChangeText = (value: string) => {
@@ -26,10 +27,13 @@ const MaintenanceDescriptionInput = forwardRef<any, MaintenanceDescriptionInputP
26
27
 
27
28
  return (
28
29
  <View>
29
- <Text style={stylesInput.label}>{label}</Text>
30
+ <Text testID={`${testID}-label`} style={stylesInput.label}>
31
+ {label}
32
+ </Text>
30
33
 
31
34
  <View style={stylesInput.inputWrapper}>
32
35
  <TextInput
36
+ testID={testID}
33
37
  ref={ref}
34
38
  multiline
35
39
  style={stylesInput.input}
@@ -46,7 +50,10 @@ const MaintenanceDescriptionInput = forwardRef<any, MaintenanceDescriptionInputP
46
50
  marginStyle={{ marginBottom: 16 }}
47
51
  >
48
52
  {error && <Text style={stylesInput.errorText}>{error}</Text>}
49
- <Text style={stylesInput.charCount}>{`${text.length}/${MAX_LENGTH}`}</Text>
53
+ <Text
54
+ testID={`${testID}-counter`}
55
+ style={stylesInput.charCount}
56
+ >{`${text.length}/${MAX_LENGTH}`}</Text>
50
57
  </Box>
51
58
  </View>
52
59
  );
@@ -19,6 +19,7 @@ import { theme } from "../../styles/theme/theme";
19
19
  import { getStatusColorHex } from "../../utils/get-status-color";
20
20
 
21
21
  const ModalMaintenance: React.FC<IModalMaintenanceProps> = ({
22
+ testID = "modal-maintenance",
22
23
  visible,
23
24
  onClose,
24
25
  dataRegistro,
@@ -27,7 +28,7 @@ const ModalMaintenance: React.FC<IModalMaintenanceProps> = ({
27
28
  imagemUrl,
28
29
  }) => {
29
30
  return (
30
- <Modal animationType="fade" transparent visible={visible}>
31
+ <Modal testID={testID} animationType="fade" transparent visible={visible}>
31
32
  <View
32
33
  style={{
33
34
  flex: 1,
@@ -2,6 +2,7 @@
2
2
  * IMPORTS
3
3
  */
4
4
  interface IModalMaintenanceProps {
5
+ testID?: string;
5
6
  visible: boolean;
6
7
  onClose: () => void;
7
8
  dataRegistro: string;
@@ -29,13 +29,23 @@ const NUM_COLS = 3;
29
29
  const GUTTER = 8; // espaço horizontal entre botões
30
30
  const ROW_SPACE = 12; // espaço vertical entre linhas
31
31
 
32
- const ModalTest = forwardRef<any, IModalTypeActivities>(
32
+ const ModalTypeActivities = forwardRef<any, IModalTypeActivities>(
33
33
  (
34
- { visible, onClose, driverType, handleSelectActivity, activityType, isLoading, style },
34
+ {
35
+ testID = "modal-activity",
36
+ visible,
37
+ onClose,
38
+ driverType,
39
+ handleSelectActivity,
40
+ activityType,
41
+ isLoading,
42
+ style,
43
+ },
35
44
  ref
36
45
  ): React.ReactElement => {
37
46
  return (
38
47
  <Modal
48
+ testID={testID}
39
49
  ref={ref}
40
50
  animationType="fade"
41
51
  transparent={true}
@@ -69,6 +79,7 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
69
79
  }}
70
80
  >
71
81
  <Typography
82
+ testID={`${testID}-title`}
72
83
  text="Atividades"
73
84
  size={theme.fontSizes.md}
74
85
  color={theme.colors.blue[500]}
@@ -76,7 +87,11 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
76
87
  lineHeight={theme.fontSizes.xl}
77
88
  />
78
89
 
79
- <TouchableOpacity activeOpacity={0.7} onPress={onClose} style={{}}>
90
+ <TouchableOpacity
91
+ testID={`${testID}-close-button`}
92
+ activeOpacity={0.7}
93
+ onPress={onClose}
94
+ >
80
95
  <Icons icon="CLOSED" color={theme.colors.blue[500]} />
81
96
  </TouchableOpacity>
82
97
  </Box>
@@ -100,6 +115,7 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
100
115
 
101
116
  return (
102
117
  <TouchableOpacity
118
+ testID={`${testID}-${index}`}
103
119
  style={{
104
120
  alignItems: "center",
105
121
  justifyContent: "flex-start",
@@ -114,6 +130,7 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
114
130
  {getIconByProperty(item.referencia as PropertyType)}
115
131
 
116
132
  <Typography
133
+ testID={`${testID}-description-${index}`}
117
134
  text={item.descricao}
118
135
  size={theme.fontSizes.xs}
119
136
  color={theme.colors.blue[500]}
@@ -132,6 +149,7 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
132
149
  </Box>
133
150
 
134
151
  <Button
152
+ testID={`${testID}-cancel-button`}
135
153
  title={"CANCELAR ATIVIDADE"}
136
154
  width="100%"
137
155
  height={40}
@@ -165,9 +183,9 @@ const ModalTest = forwardRef<any, IModalTypeActivities>(
165
183
  }
166
184
  );
167
185
 
168
- ModalTest.displayName = "ModalTest";
186
+ ModalTypeActivities.displayName = "ModalTypeActivities";
169
187
 
170
188
  /**
171
189
  * EXPORT
172
190
  */
173
- export default asBaseComponent(ModalTest);
191
+ export default asBaseComponent(ModalTypeActivities);
@@ -14,6 +14,9 @@ interface IActivity {
14
14
  }
15
15
 
16
16
  interface IModalTypeActivities extends ModalProps, IGlobalCss {
17
+ /** propiedade para identificar o componente*/
18
+ testID?: string;
19
+
17
20
  /** função que fecha modal */
18
21
  onClose: () => void;
19
22
 
@@ -27,6 +27,7 @@ import { theme } from "../../../styles/theme/theme";
27
27
  * Componente Modal para alteração de atividade.
28
28
  */
29
29
  export const ModalChangeActivity: React.FC<IModalChangeActivityProps> = ({
30
+ testID = "modal-change-activity",
30
31
  visible,
31
32
  onClose,
32
33
  modalConfirm,
@@ -59,7 +60,7 @@ export const ModalChangeActivity: React.FC<IModalChangeActivityProps> = ({
59
60
  };
60
61
 
61
62
  return (
62
- <Modal animationType="fade" transparent visible={visible}>
63
+ <Modal testID={testID} animationType="fade" transparent visible={visible}>
63
64
  <View
64
65
  style={{
65
66
  flex: 1,
@@ -3,6 +3,10 @@
3
3
  */
4
4
 
5
5
  interface IModalChangeActivityProps {
6
+ /**
7
+ * Identificador para components
8
+ */
9
+ testID?: string;
6
10
  visible: boolean;
7
11
  onClose: () => void;
8
12
  // eslint-disable-next-line no-unused-vars
@@ -1,175 +1,185 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React, { forwardRef } from "react";
5
-
6
- // components
7
- import Box from "../../components/box";
8
- import Typography from "../../components/typography";
9
-
10
- // commons / icons
11
- import { Icons } from "../../common/icons-svg";
12
-
13
- // typings
14
- import type { IReportCoils } from "./interface";
15
- import { asBaseComponent } from "../../@types/as-base-component";
16
-
17
- // styles
18
- import { theme } from "../../styles/theme/theme";
19
-
20
- /**
21
- * Componente ReportCoils para a interação da ui.
22
- */
23
- const ReportCoils = forwardRef<any, IReportCoils>((props, ref): React.ReactElement => {
24
- const {
25
- codeDisplayed = 4567,
26
- generatedDate = "15/07/2025",
27
- generatedTime = "10:30",
28
- status = "OK",
29
- backgroundColor,
30
- idWithdrawal = 1,
31
- } = props;
32
- return (
33
- <Box
34
- ref={ref}
35
- width={"100%"}
36
- backgroundColor={theme.colors.neutral[25]}
37
- borderStyled={{
38
- borderRadius: theme.borderWidths.thick_medium,
39
- }}
40
- marginStyle={{
41
- marginBottom: theme.margins["2xs"],
42
- }}
43
- >
44
- <Box
45
- width={"100%"}
46
- height={22}
47
- backgroundColor={backgroundColor ?? theme.colors.green[400]}
48
- borderStyled={{
49
- borderTopLeftRadius: theme.borderWidths.thin_bold,
50
- borderTopRightRadius: theme.borderWidths.thin_bold,
51
- borderColor: theme.colors.blue[400],
52
- }}
53
- flexStyle={{
54
- justifyContent: "center",
55
- }}
56
- >
57
- <Typography
58
- text={`Retirada ${idWithdrawal}`}
59
- color={theme.colors.neutral[25]}
60
- size={theme.fontSizes.sm}
61
- fontFamily={theme.fonts.inter_medium_500}
62
- fontWeight={"500"}
63
- lineHeight={theme.fontSizes.lg}
64
- marginLeft={theme.margins["2xs"]}
65
- />
66
- </Box>
67
- <Box
68
- width={"100%"}
69
- flexStyle={{
70
- flexDirection: "row",
71
- justifyContent: "space-between",
72
- }}
73
- paddingStyle={{
74
- padding: 4,
75
- }}
76
- >
77
- <Box>
78
- <Box
79
- flexStyle={{
80
- flexDirection: "row",
81
- alignItems: "center",
82
- }}
83
- marginStyle={{
84
- marginLeft: 4,
85
- }}
86
- height={45}
87
- >
88
- <Icons icon={"FILES"} size={32} color={theme.colors.blue[100]} />
89
- <Box>
90
- <Box flexStyle={{ flexDirection: "row" }}>
91
- <Typography
92
- text={`Efetuada em: `}
93
- size={12}
94
- color={theme.colors.gray[900]}
95
- fontFamily={theme.fonts.inter_bold_700}
96
- />
97
- <Typography
98
- text={`${generatedDate} ${generatedTime}`}
99
- size={12}
100
- color={theme.colors.gray[700]}
101
- fontFamily={theme.fonts.inter_regular_400}
102
- />
103
- </Box>
104
- <Box marginStyle={{ marginTop: -8 }} flexStyle={{ flexDirection: "row" }}>
105
- <Typography
106
- text={`Status: `}
107
- size={12}
108
- color={theme.colors.gray[900]}
109
- fontFamily={theme.fonts.inter_medium_500}
110
- />
111
-
112
- <Typography
113
- text={`${status}`}
114
- size={12}
115
- color={theme.colors.gray[700]}
116
- fontFamily={theme.fonts.inter_regular_400}
117
- marginLeft={2}
118
- />
119
- </Box>
120
- </Box>
121
- </Box>
122
- </Box>
123
- </Box>
124
-
125
- {/* Segunda separação */}
126
- <Box
127
- width={"100%"}
128
- height={46}
129
- flexStyle={{
130
- flexDirection: "row",
131
- justifyContent: "space-between",
132
- alignItems: "center",
133
- }}
134
- paddingStyle={{
135
- paddingLeft: theme.paddings["2xs"],
136
- paddingRight: theme.paddings["2xs"],
137
- }}
138
- borderStyled={{
139
- borderTopWidth: 2,
140
- borderTopColor: theme.colors.neutral[200],
141
- }}
142
- >
143
- <Box>
144
- <Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
145
- <Box marginStyle={{ marginRight: 2 }}>
146
- <Typography
147
- text={`Codigo apresentado:`}
148
- size={10}
149
- color={theme.colors.gray[700]}
150
- fontFamily={theme.fonts.inter_regular_400}
151
- />
152
-
153
- <Typography
154
- text={`${codeDisplayed}`}
155
- size={12}
156
- color={theme.colors.blue[100]}
157
- fontFamily={theme.fonts.inter_semi_bold_600}
158
- marginTop={-8}
159
- />
160
- </Box>
161
- </Box>
162
- </Box>
163
-
164
- <Icons icon={"CHECK_CIRCLE"} size={32} background={backgroundColor} />
165
- </Box>
166
- </Box>
167
- );
168
- });
169
-
170
- ReportCoils.displayName = "ReportCoils";
171
-
172
- /**
173
- * EXPORTS
174
- */
175
- export default asBaseComponent(ReportCoils);
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React, { forwardRef } from "react";
5
+
6
+ // components
7
+ import Box from "../../components/box";
8
+ import Typography from "../../components/typography";
9
+
10
+ // commons / icons
11
+ import { Icons } from "../../common/icons-svg";
12
+
13
+ // typings
14
+ import type { IReportCoils } from "./interface";
15
+ import { asBaseComponent } from "../../@types/as-base-component";
16
+
17
+ // styles
18
+ import { theme } from "../../styles/theme/theme";
19
+
20
+ /**
21
+ * Componente ReportCoils para a interação da ui.
22
+ */
23
+ const ReportCoils = forwardRef<any, IReportCoils>((props, ref): React.ReactElement => {
24
+ const {
25
+ testID = "report-coils",
26
+ codeDisplayed = 4567,
27
+ generatedDate = "15/07/2025",
28
+ generatedTime = "10:30",
29
+ status = "OK",
30
+ backgroundColor,
31
+ idWithdrawal = 1,
32
+ } = props;
33
+ return (
34
+ <Box
35
+ testID={testID}
36
+ ref={ref}
37
+ width={"100%"}
38
+ backgroundColor={theme.colors.neutral[25]}
39
+ borderStyled={{
40
+ borderRadius: theme.borderWidths.thick_medium,
41
+ }}
42
+ marginStyle={{
43
+ marginBottom: theme.margins["2xs"],
44
+ }}
45
+ >
46
+ <Box
47
+ width={"100%"}
48
+ height={22}
49
+ backgroundColor={backgroundColor ?? theme.colors.green[400]}
50
+ borderStyled={{
51
+ borderTopLeftRadius: theme.borderWidths.thin_bold,
52
+ borderTopRightRadius: theme.borderWidths.thin_bold,
53
+ borderColor: theme.colors.blue[400],
54
+ }}
55
+ flexStyle={{
56
+ justifyContent: "center",
57
+ }}
58
+ >
59
+ <Typography
60
+ testID={`${testID}-retirada`}
61
+ text={`Retirada ${idWithdrawal}`}
62
+ color={theme.colors.neutral[25]}
63
+ size={theme.fontSizes.sm}
64
+ fontFamily={theme.fonts.inter_medium_500}
65
+ fontWeight={"500"}
66
+ lineHeight={theme.fontSizes.lg}
67
+ marginLeft={theme.margins["2xs"]}
68
+ />
69
+ </Box>
70
+ <Box
71
+ width={"100%"}
72
+ flexStyle={{
73
+ flexDirection: "row",
74
+ justifyContent: "space-between",
75
+ }}
76
+ paddingStyle={{
77
+ padding: 4,
78
+ }}
79
+ >
80
+ <Box>
81
+ <Box
82
+ flexStyle={{
83
+ flexDirection: "row",
84
+ alignItems: "center",
85
+ }}
86
+ marginStyle={{
87
+ marginLeft: 4,
88
+ }}
89
+ height={45}
90
+ >
91
+ <Icons
92
+ testID={`${testID}-icon`}
93
+ icon={"FILES"}
94
+ size={32}
95
+ color={theme.colors.blue[100]}
96
+ />
97
+ <Box>
98
+ <Box flexStyle={{ flexDirection: "row" }}>
99
+ <Typography
100
+ testID={`${testID}-efetuada`}
101
+ text={`Efetuada em: `}
102
+ size={12}
103
+ color={theme.colors.gray[900]}
104
+ fontFamily={theme.fonts.inter_bold_700}
105
+ />
106
+ <Typography
107
+ text={`${generatedDate} ${generatedTime}`}
108
+ size={12}
109
+ color={theme.colors.gray[700]}
110
+ fontFamily={theme.fonts.inter_regular_400}
111
+ />
112
+ </Box>
113
+ <Box marginStyle={{ marginTop: -8 }} flexStyle={{ flexDirection: "row" }}>
114
+ <Typography
115
+ testID={`${testID}-status`}
116
+ text={`Status: `}
117
+ size={12}
118
+ color={theme.colors.gray[900]}
119
+ fontFamily={theme.fonts.inter_medium_500}
120
+ />
121
+
122
+ <Typography
123
+ text={`${status}`}
124
+ size={12}
125
+ color={theme.colors.gray[700]}
126
+ fontFamily={theme.fonts.inter_regular_400}
127
+ marginLeft={2}
128
+ />
129
+ </Box>
130
+ </Box>
131
+ </Box>
132
+ </Box>
133
+ </Box>
134
+
135
+ {/* Segunda separação */}
136
+ <Box
137
+ width={"100%"}
138
+ height={46}
139
+ flexStyle={{
140
+ flexDirection: "row",
141
+ justifyContent: "space-between",
142
+ alignItems: "center",
143
+ }}
144
+ paddingStyle={{
145
+ paddingLeft: theme.paddings["2xs"],
146
+ paddingRight: theme.paddings["2xs"],
147
+ }}
148
+ borderStyled={{
149
+ borderTopWidth: 2,
150
+ borderTopColor: theme.colors.neutral[200],
151
+ }}
152
+ >
153
+ <Box>
154
+ <Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
155
+ <Box marginStyle={{ marginRight: 2 }}>
156
+ <Typography
157
+ text={`Codigo apresentado:`}
158
+ size={10}
159
+ color={theme.colors.gray[700]}
160
+ fontFamily={theme.fonts.inter_regular_400}
161
+ />
162
+
163
+ <Typography
164
+ text={`${codeDisplayed}`}
165
+ size={12}
166
+ color={theme.colors.blue[100]}
167
+ fontFamily={theme.fonts.inter_semi_bold_600}
168
+ marginTop={-8}
169
+ />
170
+ </Box>
171
+ </Box>
172
+ </Box>
173
+
174
+ <Icons icon={"CHECK_CIRCLE"} size={32} background={backgroundColor} />
175
+ </Box>
176
+ </Box>
177
+ );
178
+ });
179
+
180
+ ReportCoils.displayName = "ReportCoils";
181
+
182
+ /**
183
+ * EXPORTS
184
+ */
185
+ export default asBaseComponent(ReportCoils);
@@ -18,9 +18,10 @@ import type { IRankingCard } from "./interface";
18
18
  * Componente ResumeRaking para a interação da ui.
19
19
  */
20
20
  const ResumeRaking = forwardRef<any, IRankingCard>(
21
- ({ title, value, description }, ref): React.ReactElement => {
21
+ ({ testID, title, value, description }, ref): React.ReactElement => {
22
22
  return (
23
23
  <Box
24
+ testID={testID}
24
25
  ref={ref}
25
26
  width={"100%"}
26
27
  backgroundColor={theme.colors.neutral[25]}
@@ -38,6 +39,7 @@ const ResumeRaking = forwardRef<any, IRankingCard>(
38
39
  >
39
40
  {/* título */}
40
41
  <Typography
42
+ testID={`${testID}-title`}
41
43
  text={title}
42
44
  color={theme.colors.black[100]}
43
45
  size={theme.fontSizes.sm}
@@ -48,6 +50,7 @@ const ResumeRaking = forwardRef<any, IRankingCard>(
48
50
 
49
51
  {/* valor principal */}
50
52
  <Typography
53
+ testID={`${testID}-value`}
51
54
  text={value}
52
55
  color={theme.colors.black[180]}
53
56
  size={theme.fontSizes["2xl"]}
@@ -59,6 +62,7 @@ const ResumeRaking = forwardRef<any, IRankingCard>(
59
62
  <Box flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "flex-end" }}>
60
63
  {/* descrição */}
61
64
  <Typography
65
+ testID={`${testID}-description`}
62
66
  text={description}
63
67
  color={theme.colors.red[500]}
64
68
  size={theme.fontSizes.sm}
@@ -3,8 +3,24 @@
3
3
  */
4
4
 
5
5
  interface IRankingCard {
6
+ /**
7
+ * TestID para testes automático e identificação
8
+ */
9
+ testID?: string;
10
+
11
+ /**
12
+ * Titulo para o card
13
+ */
6
14
  title: string;
15
+
16
+ /**
17
+ * Valor para o card
18
+ */
7
19
  value: string; // Ex: "53:35 H"
20
+
21
+ /**
22
+ * Descrição para o card
23
+ */
8
24
  description: string; // Ex: "3.200 KM + 60:17 HORAS"
9
25
  }
10
26