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
@@ -1,3 +1,6 @@
1
+ /**
2
+ * IMPORTS
3
+ */
1
4
  import React, { useState, forwardRef, useImperativeHandle, useRef } from "react";
2
5
  import { View, Text, TouchableOpacity, FlatList, FlatList as FlatListType } from "react-native";
3
6
 
@@ -10,23 +13,31 @@ import { Icons } from "../../common/icons-svg";
10
13
  // helpers
11
14
  import { getIconKeyByValue } from "./helpers/get-icon-by-status";
12
15
 
13
- // typings
14
- import type { IStepIndicator } from "./interface";
15
-
16
16
  // utils
17
17
  import { formHoursMinute } from "../../utils/format-date";
18
18
 
19
+ // typings
20
+ import type { IStepIndicator } from "./interface";
21
+ import { asBaseComponent } from "../../@types/as-base-component";
22
+
19
23
  // styles
20
24
  import { styles } from "./styles";
21
25
  import { theme } from "../../styles/theme/theme";
22
- import { asBaseComponent } from "../../@types/as-base-component";
23
26
 
24
27
  /**
25
28
  * Componente StepIndicator para a interação da ui.
26
29
  */
27
30
  const StepIndicator = forwardRef<any, IStepIndicator>(
28
31
  (
29
- { data = [], type, textColorDescription, titleColor, titleNumberColor, onChangeActivity },
32
+ {
33
+ testID = "step-indicator",
34
+ data = [],
35
+ type,
36
+ textColorDescription,
37
+ titleColor,
38
+ titleNumberColor,
39
+ onChangeActivity,
40
+ },
30
41
  ref
31
42
  ) => {
32
43
  const StepDefault = () => {
@@ -83,7 +94,7 @@ const StepIndicator = forwardRef<any, IStepIndicator>(
83
94
 
84
95
  return (
85
96
  <TouchableOpacity
86
- testID="step-indicator"
97
+ testID={`${testID}-item-${index}`}
87
98
  activeOpacity={0.7}
88
99
  style={styles({}).containerIndicator}
89
100
  disabled={!canEdit}
@@ -112,13 +123,19 @@ const StepIndicator = forwardRef<any, IStepIndicator>(
112
123
  <Text style={styles({ titleColor }).title}>{history?.descricao}</Text>
113
124
 
114
125
  {history?.data_inicio && (
115
- <Text style={styles({ textColorDescription }).titleDescription}>
126
+ <Text
127
+ testID={`${testID}-data-${index}`}
128
+ style={styles({ textColorDescription }).titleDescription}
129
+ >
116
130
  {`Inicio: ${history.data_inicio} ás ${history.data_fim}`}
117
131
  </Text>
118
132
  )}
119
133
 
120
134
  {history.duracao_segundos && (
121
- <Text style={styles({ textColorDescription }).titleDescription}>
135
+ <Text
136
+ testID={`${testID}-duration-${index}`}
137
+ style={styles({ textColorDescription }).titleDescription}
138
+ >
122
139
  Duração: {formHoursMinute(history?.duracao_segundos as string)}
123
140
  </Text>
124
141
  )}
@@ -155,6 +172,7 @@ const StepIndicator = forwardRef<any, IStepIndicator>(
155
172
 
156
173
  {isModalVisible && (
157
174
  <ModalChangeActivity
175
+ testID={`${testID}-modal-change-activity`}
158
176
  visible={isModalVisible}
159
177
  modalConfirm={handleConfirmModal}
160
178
  descricao=""
@@ -23,6 +23,9 @@ type IStyleProps = {
23
23
  };
24
24
 
25
25
  interface IStepIndicator {
26
+ /**Identificador para o components */
27
+ testID: string;
28
+
26
29
  /**dados que vão ser renderizados */
27
30
  data?: IData[];
28
31
 
@@ -1,75 +1,77 @@
1
- /**
2
- * IMPORTS
3
- */
4
-
5
- import React, { forwardRef, useMemo } from "react";
6
- import { View } from "react-native";
7
-
8
- // components
9
- import Typography from "../typography";
10
-
11
- // typings
12
- import type { ToastMessageCustoProps } from "./interface";
13
- import { asBaseComponent } from "../../@types/as-base-component";
14
-
15
- import { styles } from "./styles";
16
- import { theme } from "../../styles/theme/theme";
17
-
18
- /**
19
- * Componente ToastMessage para a exibição de mensagens de conexão.
20
- */
21
- const ToastMessage = forwardRef<any, ToastMessageCustoProps>(
22
- ({ text1, text2, options }, ref): React.ReactElement => {
23
- const borderColor = useMemo(() => {
24
- const map = {
25
- success: theme.colors?.green[400] ?? "#69C779",
26
- alert: theme.colors?.blue[800] ?? "#87CEFA",
27
- error: theme.colors?.red[500] ?? "#ef4444",
28
- } as const;
29
- return map[options];
30
- }, [options, theme]);
31
-
32
- return (
33
- <View ref={ref} style={styles.wrapperToash}>
34
- <View style={styles.wrapperBorder}>
35
- <View
36
- testID="border-custom"
37
- style={[styles.borderCustom, { backgroundColor: borderColor }]}
38
- />
39
- </View>
40
-
41
- <View style={styles.wrapperText}>
42
- {!!text1 && (
43
- <Typography
44
- text={String(text1)}
45
- fontFamily={theme.fonts.inter_medium_500}
46
- color={"blue500"}
47
- size={theme.fontSizes.xs}
48
- lineHeight={theme.lineHeight["2xl"]}
49
- letterSpacing={"regular"}
50
- />
51
- )}
52
-
53
- {!!text2 && (
54
- <Typography
55
- text={String(text2)}
56
- fontFamily="inter_regular_400"
57
- color={"black25"}
58
- size={theme.fontSizes.xs}
59
- lineHeight={theme.lineHeight["2xl"]}
60
- letterSpacing={"regular"}
61
- marginBottom={4}
62
- />
63
- )}
64
- </View>
65
- </View>
66
- );
67
- }
68
- );
69
-
70
- ToastMessage.displayName = "ToastMessage";
71
-
72
- /**
73
- * EXPORT
74
- */
75
- export default asBaseComponent(ToastMessage);
1
+ /**
2
+ * IMPORTS
3
+ */
4
+
5
+ import React, { forwardRef, useMemo } from "react";
6
+ import { View } from "react-native";
7
+
8
+ // components
9
+ import Typography from "../typography";
10
+
11
+ // typings
12
+ import type { ToastMessageCustoProps } from "./interface";
13
+ import { asBaseComponent } from "../../@types/as-base-component";
14
+
15
+ import { styles } from "./styles";
16
+ import { theme } from "../../styles/theme/theme";
17
+
18
+ /**
19
+ * Componente ToastMessage para a exibição de mensagens de conexão.
20
+ */
21
+ const ToastMessage = forwardRef<any, ToastMessageCustoProps>(
22
+ ({ testID, text1, text2, options }, ref): React.ReactElement => {
23
+ const borderColor = useMemo(() => {
24
+ const map = {
25
+ success: theme.colors?.green[400] ?? "#69C779",
26
+ alert: theme.colors?.blue[800] ?? "#87CEFA",
27
+ error: theme.colors?.red[500] ?? "#ef4444",
28
+ } as const;
29
+ return map[options];
30
+ }, [options, theme]);
31
+
32
+ return (
33
+ <View testID={testID} ref={ref} style={styles.wrapperToash}>
34
+ <View style={styles.wrapperBorder}>
35
+ <View
36
+ testID="border-custom"
37
+ style={[styles.borderCustom, { backgroundColor: borderColor }]}
38
+ />
39
+ </View>
40
+
41
+ <View style={styles.wrapperText}>
42
+ {!!text1 && (
43
+ <Typography
44
+ testID={`${testID}-text1`}
45
+ text={String(text1)}
46
+ fontFamily={theme.fonts.inter_medium_500}
47
+ color={"blue500"}
48
+ size={theme.fontSizes.xs}
49
+ lineHeight={theme.lineHeight["2xl"]}
50
+ letterSpacing={"regular"}
51
+ />
52
+ )}
53
+
54
+ {!!text2 && (
55
+ <Typography
56
+ testID={`${testID}-text2`}
57
+ text={String(text2)}
58
+ fontFamily="inter_regular_400"
59
+ color={"black25"}
60
+ size={theme.fontSizes.xs}
61
+ lineHeight={theme.lineHeight["2xl"]}
62
+ letterSpacing={"regular"}
63
+ marginBottom={4}
64
+ />
65
+ )}
66
+ </View>
67
+ </View>
68
+ );
69
+ }
70
+ );
71
+
72
+ ToastMessage.displayName = "ToastMessage";
73
+
74
+ /**
75
+ * EXPORT
76
+ */
77
+ export default asBaseComponent(ToastMessage);
@@ -1,17 +1,18 @@
1
- /**
2
- * IMPORTS
3
- */
4
- type ToastMessageCustoProps = {
5
- text1?: string;
6
- text2?: string;
7
- options: "error" | "alert" | "success";
8
- };
9
-
10
- type BorderCustomToashProps = {
11
- options: "error" | "alert" | "success";
12
- };
13
-
14
- /**
15
- * EXPORTS
16
- */
17
- export type { ToastMessageCustoProps, BorderCustomToashProps };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ type ToastMessageCustoProps = {
5
+ text1?: string;
6
+ text2?: string;
7
+ testID?: string;
8
+ options: "error" | "alert" | "success";
9
+ };
10
+
11
+ type BorderCustomToashProps = {
12
+ options: "error" | "alert" | "success";
13
+ };
14
+
15
+ /**
16
+ * EXPORTS
17
+ */
18
+ export type { ToastMessageCustoProps, BorderCustomToashProps };
@@ -49,6 +49,7 @@ const ToggleFuel = forwardRef<any, ToggleFuelProps>(
49
49
 
50
50
  return (
51
51
  <View
52
+ testID={`${testIDPrefix}-view`}
52
53
  ref={ref}
53
54
  style={[styles.container]}
54
55
  accessibilityRole="tablist"
@@ -15,6 +15,7 @@ import type { ITextInterface } from "./interface";
15
15
  const Typography = forwardRef<any, ITextInterface>((props, ref): React.ReactElement => {
16
16
  // desestruturando as propiedades do componente
17
17
  const {
18
+ testID = "typography",
18
19
  text = "Hello Dev",
19
20
  color = "#1E1E1E",
20
21
  size = 23,
@@ -60,6 +61,7 @@ const Typography = forwardRef<any, ITextInterface>((props, ref): React.ReactElem
60
61
 
61
62
  return (
62
63
  <Text
64
+ testID={testID}
63
65
  ref={ref}
64
66
  numberOfLines={numberOfLines}
65
67
  ellipsizeMode={ellipsizeMode}
@@ -1,102 +1,104 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import { type TextProps as RNTextProps } from "react-native";
5
-
6
- import { theme } from "../../styles/theme/theme";
7
-
8
- type ITextInterface = RNTextProps & {
9
- /**
10
- * Propiedade texto que serar renderizado pro usuário final
11
- */
12
- text: string;
13
-
14
- /**
15
- * A propriedade CSS color define o valor da cor de primeiro plano do texto e das decorações de texto de um elemento e define o valor currentcolor. currentcolor pode ser usado como um valor indireto em outras propriedades e é o padrão para outras propriedades de cores, como border-color.
16
- */
17
- color?: string;
18
-
19
- /**
20
- * Propiedade size define o tamanho e a orientação da caixa que é usada para representar uma página. Na maioria das vezes, esse tamanho corresponde ao tamanho alvo da página impressa, se aplicável.
21
- */
22
- size?: number;
23
-
24
- align?: "center" | "left" | "right";
25
- lineHeight?: number;
26
- letterSpacing?: keyof typeof theme.letterSpacing;
27
-
28
- /**
29
- * A propriedade text-decoration do CSS é usada para definir a formatação de underline, overline, line-through ou blink. As decorações underline e overline são posicionadas abaixo e acima do texto (respectivamente), e line-through cortando-o.
30
- */
31
- textDecoration?: "line-through" | "underline" | "none";
32
-
33
- /**
34
- * A propriedade CSS font-weight define o peso (ou negrito) da fonte. Os pesos disponíveis dependem da família de fontes definida atualmente.
35
- */
36
- fontWeight?: "100" | "300" | "400" | "500" | "600" | "700";
37
-
38
- // fontFamily?: keyof typeof theme.fonts;
39
- fontFamily?: string;
40
-
41
- /**
42
- * A propriedade margin do CSS define a área de margem nos quatro lados do elemento. É uma abreviação que define todas as margens individuais de uma só vez: margin-top, margin-right (en-US), margin-bottom, e margin-left (en-US).
43
- */
44
- margin?: number;
45
-
46
- /**
47
- * A propriedade CSS define a área de margem no lado esquerdo de um elemento. Um valor positivo o coloca mais distante de seus vizinhos, enquanto um valor negativo o coloca mais próximo.margin-left
48
- */
49
- marginLeft?: number;
50
-
51
- /**
52
- * A propriedade CSS define a área de margem no lado direito de um elemento. Um valor positivo o coloca mais distante de seus vizinhos, enquanto um valor negativo o coloca mais próximo.margin-right
53
- */
54
- marginRight?: number;
55
-
56
- /**
57
- * A propriedade CSS margin-top de um elemento indica o espaço acima do elemento. Valores negativos são aceitos.
58
- */
59
- marginTop?: number;
60
-
61
- /**
62
- * A propriedade CSS margin-bottom define a margin area na parte inferior de um elemento. Um valor positivo coloca o valor mais longe de outros elementos vizinhos, enquanto um valor negativo, aproxima.
63
- */
64
- marginBottom?: number;
65
-
66
- /**
67
- * A propriedade padding define uma a distância entre o conteúdo de um elemento e suas bordas. É um atalho que evita definir uma distância para cada lado separadamente (padding-top, padding-right, padding-bottom, padding-left).
68
- */
69
- padding?: number;
70
-
71
- /**
72
- * A propriedade CSS padding-left é um elemento que define o espaço de preenchimento obrigatório no lado esquerdo de um elemento. padding area é o espaço entre o conteúdo do elemento e a borda. Um valor negativo não é permitido.
73
- */
74
- paddingLeft?: number;
75
-
76
- /**
77
- * A propriedade CSS define a largura da área de preenchimento à direita de um elemento.padding-right
78
- */
79
- paddingRight?: number;
80
-
81
- /**
82
- * A propriedade CSS define a altura da área de preenchimento na parte superior de um elemento.padding-top
83
- */
84
- paddingTop?: number;
85
-
86
- /**
87
- * A propriedade CSS define a altura da área de preenchimento na parte inferior de um elemento.padding-bottom
88
- */
89
- paddingBottom?: number;
90
-
91
- /**
92
- * Define o número máximo de linhas que o texto pode ocupar. Se o texto for maior que esse limite, ele será truncado. numberOfLines
93
- *
94
- * Define onde a elipse (...) será adicionada quando o texto for cortado devido ao numberOfLines.
95
- */
96
- numberOfLines?: number;
97
- ellipsizeMode?: "head" | "middle" | "tail" | "clip";
98
- };
99
- /**
100
- * EXPORTS
101
- */
102
- export { ITextInterface };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import { type TextProps as RNTextProps } from "react-native";
5
+
6
+ import { theme } from "../../styles/theme/theme";
7
+
8
+ type ITextInterface = RNTextProps & {
9
+ /**
10
+ * Propiedade texto que serar renderizado pro usuário final
11
+ */
12
+ text: string;
13
+
14
+ testID?: string;
15
+
16
+ /**
17
+ * A propriedade CSS color define o valor da cor de primeiro plano do texto e das decorações de texto de um elemento e define o valor currentcolor. currentcolor pode ser usado como um valor indireto em outras propriedades e é o padrão para outras propriedades de cores, como border-color.
18
+ */
19
+ color?: string;
20
+
21
+ /**
22
+ * Propiedade size define o tamanho e a orientação da caixa que é usada para representar uma página. Na maioria das vezes, esse tamanho corresponde ao tamanho alvo da página impressa, se aplicável.
23
+ */
24
+ size?: number;
25
+
26
+ align?: "center" | "left" | "right";
27
+ lineHeight?: number;
28
+ letterSpacing?: keyof typeof theme.letterSpacing;
29
+
30
+ /**
31
+ * A propriedade text-decoration do CSS é usada para definir a formatação de underline, overline, line-through ou blink. As decorações underline e overline são posicionadas abaixo e acima do texto (respectivamente), e line-through cortando-o.
32
+ */
33
+ textDecoration?: "line-through" | "underline" | "none";
34
+
35
+ /**
36
+ * A propriedade CSS font-weight define o peso (ou negrito) da fonte. Os pesos disponíveis dependem da família de fontes definida atualmente.
37
+ */
38
+ fontWeight?: "100" | "300" | "400" | "500" | "600" | "700";
39
+
40
+ // fontFamily?: keyof typeof theme.fonts;
41
+ fontFamily?: string;
42
+
43
+ /**
44
+ * A propriedade margin do CSS define a área de margem nos quatro lados do elemento. É uma abreviação que define todas as margens individuais de uma só vez: margin-top, margin-right (en-US), margin-bottom, e margin-left (en-US).
45
+ */
46
+ margin?: number;
47
+
48
+ /**
49
+ * A propriedade CSS define a área de margem no lado esquerdo de um elemento. Um valor positivo o coloca mais distante de seus vizinhos, enquanto um valor negativo o coloca mais próximo.margin-left
50
+ */
51
+ marginLeft?: number;
52
+
53
+ /**
54
+ * A propriedade CSS define a área de margem no lado direito de um elemento. Um valor positivo o coloca mais distante de seus vizinhos, enquanto um valor negativo o coloca mais próximo.margin-right
55
+ */
56
+ marginRight?: number;
57
+
58
+ /**
59
+ * A propriedade CSS margin-top de um elemento indica o espaço acima do elemento. Valores negativos são aceitos.
60
+ */
61
+ marginTop?: number;
62
+
63
+ /**
64
+ * A propriedade CSS margin-bottom define a margin area na parte inferior de um elemento. Um valor positivo coloca o valor mais longe de outros elementos vizinhos, enquanto um valor negativo, aproxima.
65
+ */
66
+ marginBottom?: number;
67
+
68
+ /**
69
+ * A propriedade padding define uma a distância entre o conteúdo de um elemento e suas bordas. É um atalho que evita definir uma distância para cada lado separadamente (padding-top, padding-right, padding-bottom, padding-left).
70
+ */
71
+ padding?: number;
72
+
73
+ /**
74
+ * A propriedade CSS padding-left é um elemento que define o espaço de preenchimento obrigatório no lado esquerdo de um elemento. padding area é o espaço entre o conteúdo do elemento e a borda. Um valor negativo não é permitido.
75
+ */
76
+ paddingLeft?: number;
77
+
78
+ /**
79
+ * A propriedade CSS define a largura da área de preenchimento à direita de um elemento.padding-right
80
+ */
81
+ paddingRight?: number;
82
+
83
+ /**
84
+ * A propriedade CSS define a altura da área de preenchimento na parte superior de um elemento.padding-top
85
+ */
86
+ paddingTop?: number;
87
+
88
+ /**
89
+ * A propriedade CSS define a altura da área de preenchimento na parte inferior de um elemento.padding-bottom
90
+ */
91
+ paddingBottom?: number;
92
+
93
+ /**
94
+ * Define o número máximo de linhas que o texto pode ocupar. Se o texto for maior que esse limite, ele será truncado. numberOfLines
95
+ *
96
+ * Define onde a elipse (...) será adicionada quando o texto for cortado devido ao numberOfLines.
97
+ */
98
+ numberOfLines?: number;
99
+ ellipsizeMode?: "head" | "middle" | "tail" | "clip";
100
+ };
101
+ /**
102
+ * EXPORTS
103
+ */
104
+ export { ITextInterface };
@@ -22,6 +22,7 @@ import { theme } from "../../styles/theme/theme";
22
22
  const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
23
23
  (props, ref): React.ReactElement => {
24
24
  const {
25
+ testID = "user-journey-work-card",
25
26
  name = "Expresso F.",
26
27
  workDate = "25/01/2025",
27
28
  initialTime = "00:40",
@@ -35,6 +36,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
35
36
  } = props;
36
37
  return (
37
38
  <Box
39
+ testID={testID}
38
40
  ref={ref}
39
41
  width={width}
40
42
  paddingStyle={{ padding: theme.paddings.md }}
@@ -57,6 +59,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
57
59
  >
58
60
  <TouchableOpacity onPress={handleNavigation}>
59
61
  <Image
62
+ testID={`${testID}-avatar`}
60
63
  style={{
61
64
  width: 50,
62
65
  height: 50,
@@ -72,6 +75,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
72
75
  <Box flexStyle={{ flexDirection: "row" }}>
73
76
  <Box>
74
77
  <Typography
78
+ testID={`${testID}-nome-label`}
75
79
  text={`Motorista(a): `}
76
80
  size={theme.fontSizes.xs}
77
81
  color={theme.colors.black[100]}
@@ -82,6 +86,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
82
86
  </Box>
83
87
  <Box>
84
88
  <Typography
89
+ testID={`${testID}-nome-value`}
85
90
  text={`${name}`}
86
91
  size={theme.fontSizes.xs}
87
92
  color={theme.colors.gray[800]}
@@ -96,6 +101,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
96
101
  <Icons icon={"CALENDAR"} size={22} />
97
102
 
98
103
  <Typography
104
+ testID={`${testID}-work-date-label`}
99
105
  text={"Jornada Trabalho: "}
100
106
  fontFamily={theme.fonts.inter_bold_700}
101
107
  size={theme.fontSizes.xs}
@@ -104,6 +110,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
104
110
  lineHeight={theme.lineHeight["2xl"]}
105
111
  />
106
112
  <Typography
113
+ testID={`${testID}-work-date-value`}
107
114
  text={workDate}
108
115
  size={theme.fontSizes.xs}
109
116
  fontFamily={theme.fonts.inter_regular_400}
@@ -127,7 +134,11 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
127
134
  </Box>
128
135
  </Box>
129
136
 
130
- <TouchableOpacity activeOpacity={0.7} onPress={handleNavigationNotification}>
137
+ <TouchableOpacity
138
+ testID={`${testID}-notification`}
139
+ activeOpacity={0.7}
140
+ onPress={handleNavigationNotification}
141
+ >
131
142
  {counterBadge > 0 && (
132
143
  <Box
133
144
  backgroundColor={theme.colors.red[500]}
@@ -141,6 +152,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
141
152
  ]}
142
153
  >
143
154
  <Typography
155
+ testID={`${testID}-notification-text`}
144
156
  text={`${counterBadge}`}
145
157
  align={"center"}
146
158
  size={theme.fontSizes["2xs"]}
@@ -151,7 +163,12 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
151
163
  />
152
164
  </Box>
153
165
  )}
154
- <Icons icon={"BELL"} size={28} style={{ position: "relative" }} />
166
+ <Icons
167
+ testID={`${testID}-notification-icon`}
168
+ icon={"BELL"}
169
+ size={28}
170
+ style={{ position: "relative" }}
171
+ />
155
172
  </TouchableOpacity>
156
173
  </Box>
157
174
 
@@ -169,6 +186,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
169
186
  >
170
187
  <Box marginStyle={{ marginRight: theme.margins.sm }}>
171
188
  <Typography
189
+ testID={`${testID}-initial-time-value`}
172
190
  text={`${initialTime}`}
173
191
  size={theme.fontSizes.md}
174
192
  align="center"
@@ -177,6 +195,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
177
195
  />
178
196
 
179
197
  <Typography
198
+ testID={`${testID}-initial-time-label`}
180
199
  text={"INÍCIO"}
181
200
  size={theme.fontSizes["2xs"]}
182
201
  align="center"
@@ -189,6 +208,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
189
208
 
190
209
  <Box>
191
210
  <Typography
211
+ testID={`${testID}-duration-value`}
192
212
  text={`${duration}`}
193
213
  size={theme.fontSizes.md}
194
214
  align="center"
@@ -197,6 +217,7 @@ const UserJourneyWorkCard = forwardRef<any, IUserJourneyWorkCard>(
197
217
  />
198
218
 
199
219
  <Typography
220
+ testID={`${testID}-duration-label`}
200
221
  text={"DURAÇÃO"}
201
222
  size={theme.fontSizes["2xs"]}
202
223
  align="center"