jornada-ui 0.4.12 → 0.4.13

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 (66) hide show
  1. package/lib/commonjs/components/coil-removel-code/index.js +4 -3
  2. package/lib/commonjs/components/coil-removel-code/index.js.map +1 -1
  3. package/lib/commonjs/components/list-devices/index.js +23 -16
  4. package/lib/commonjs/components/list-devices/index.js.map +1 -1
  5. package/lib/commonjs/components/modals/modal-to-confimations/index.js +1 -1
  6. package/lib/commonjs/components/modals/modal-to-confimations/index.js.map +1 -1
  7. package/lib/commonjs/components/selects/select-option/index.js +22 -7
  8. package/lib/commonjs/components/selects/select-option/index.js.map +1 -1
  9. package/lib/commonjs/components/step-indicator/index.js +54 -40
  10. package/lib/commonjs/components/step-indicator/index.js.map +1 -1
  11. package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
  12. package/lib/commonjs/components/trip-details-card/index.js +8 -9
  13. package/lib/commonjs/components/trip-details-card/index.js.map +1 -1
  14. package/lib/commonjs/stories/step-indicator/step-indicator.stories.js +1 -0
  15. package/lib/commonjs/stories/step-indicator/step-indicator.stories.js.map +1 -1
  16. package/lib/commonjs/utils/text-limit/index.js +37 -0
  17. package/lib/commonjs/utils/text-limit/index.js.map +1 -0
  18. package/lib/module/components/coil-removel-code/index.js +4 -3
  19. package/lib/module/components/coil-removel-code/index.js.map +1 -1
  20. package/lib/module/components/list-devices/index.js +25 -18
  21. package/lib/module/components/list-devices/index.js.map +1 -1
  22. package/lib/module/components/modals/modal-to-confimations/index.js +1 -1
  23. package/lib/module/components/modals/modal-to-confimations/index.js.map +1 -1
  24. package/lib/module/components/selects/select-option/index.js +22 -7
  25. package/lib/module/components/selects/select-option/index.js.map +1 -1
  26. package/lib/module/components/step-indicator/index.js +55 -41
  27. package/lib/module/components/step-indicator/index.js.map +1 -1
  28. package/lib/module/components/step-indicator/styles.js.map +1 -1
  29. package/lib/module/components/trip-details-card/index.js +11 -11
  30. package/lib/module/components/trip-details-card/index.js.map +1 -1
  31. package/lib/module/stories/step-indicator/step-indicator.stories.js +1 -0
  32. package/lib/module/stories/step-indicator/step-indicator.stories.js.map +1 -1
  33. package/lib/module/utils/text-limit/index.js +32 -0
  34. package/lib/module/utils/text-limit/index.js.map +1 -0
  35. package/lib/typescript/commonjs/src/components/coil-removel-code/index.d.ts.map +1 -1
  36. package/lib/typescript/commonjs/src/components/list-devices/index.d.ts.map +1 -1
  37. package/lib/typescript/commonjs/src/components/selects/select-option/index.d.ts.map +1 -1
  38. package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts.map +1 -1
  39. package/lib/typescript/commonjs/src/components/step-indicator/styles.d.ts +2 -2
  40. package/lib/typescript/commonjs/src/components/step-indicator/styles.d.ts.map +1 -1
  41. package/lib/typescript/commonjs/src/components/trip-details-card/index.d.ts.map +1 -1
  42. package/lib/typescript/commonjs/src/stories/step-indicator/step-indicator.stories.d.ts.map +1 -1
  43. package/lib/typescript/commonjs/src/utils/text-limit/index.d.ts +14 -0
  44. package/lib/typescript/commonjs/src/utils/text-limit/index.d.ts.map +1 -0
  45. package/lib/typescript/module/src/components/coil-removel-code/index.d.ts.map +1 -1
  46. package/lib/typescript/module/src/components/list-devices/index.d.ts.map +1 -1
  47. package/lib/typescript/module/src/components/selects/select-option/index.d.ts.map +1 -1
  48. package/lib/typescript/module/src/components/step-indicator/index.d.ts.map +1 -1
  49. package/lib/typescript/module/src/components/step-indicator/styles.d.ts +2 -2
  50. package/lib/typescript/module/src/components/step-indicator/styles.d.ts.map +1 -1
  51. package/lib/typescript/module/src/components/trip-details-card/index.d.ts.map +1 -1
  52. package/lib/typescript/module/src/stories/step-indicator/step-indicator.stories.d.ts.map +1 -1
  53. package/lib/typescript/module/src/utils/text-limit/index.d.ts +14 -0
  54. package/lib/typescript/module/src/utils/text-limit/index.d.ts.map +1 -0
  55. package/package.json +1 -1
  56. package/src/components/coil-removel-code/index.tsx +8 -3
  57. package/src/components/coil-removel-code/interface.d.ts +14 -13
  58. package/src/components/list-devices/index.tsx +103 -102
  59. package/src/components/modals/modal-to-confimations/index.tsx +1 -1
  60. package/src/components/selects/select-option/index.tsx +124 -95
  61. package/src/components/step-indicator/index.tsx +56 -36
  62. package/src/components/step-indicator/interface.d.ts +14 -3
  63. package/src/components/step-indicator/styles.ts +2 -2
  64. package/src/components/trip-details-card/index.tsx +267 -270
  65. package/src/stories/step-indicator/step-indicator.stories.tsx +1 -0
  66. package/src/utils/text-limit/index.ts +28 -0
@@ -1,270 +1,267 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React, { useEffect, useState } from "react";
5
- import { View, TouchableOpacity, LayoutAnimation, UIManager, Platform } from "react-native";
6
-
7
- // components
8
- import Box from "../../components/box";
9
- import Typography from "../../components/typography";
10
-
11
- // style
12
- import { theme } from "../../styles/theme/theme";
13
- import { Icons } from "../../common/icons-svg";
14
-
15
- // typings
16
- import type { ITripDetailsCard } from "./interface";
17
- import { asBaseComponent } from "../../@types/as-base-component";
18
-
19
- const TripDetailsCard: React.FC<ITripDetailsCard> = ({
20
- dataRegistro,
21
- numeroCte,
22
- origem,
23
- destino,
24
- proximoCarregamento,
25
- peso,
26
- baseCalculo,
27
- corBarra,
28
- kmCarregado,
29
- kmVazio,
30
- }) => {
31
- const [expanded, setExpanded] = useState(false);
32
-
33
- useEffect(() => {
34
- if (Platform.OS === "android" && UIManager.setLayoutAnimationEnabledExperimental) {
35
- UIManager.setLayoutAnimationEnabledExperimental(true);
36
- }
37
- }, []);
38
-
39
- const toggleExpand = () => {
40
- LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
41
- setExpanded((prev) => !prev);
42
- };
43
-
44
- const formatPeso = (v?: number) =>
45
- v === undefined || v === null ? "Não informado" : `${v.toLocaleString("pt-BR")} kg`;
46
-
47
- const formatBase = (v?: number) =>
48
- v === undefined || v === null ? "Não informado" : `R$ ${v.toLocaleString("pt-BR")}`;
49
-
50
- return (
51
- <Box
52
- width={"100%"}
53
- flexStyle={{ flexDirection: "row" }}
54
- backgroundColor={theme.colors.neutral[25]}
55
- borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
56
- >
57
- {/* faixa lateral */}
58
- <View
59
- style={{
60
- width: 15,
61
- backgroundColor: corBarra ?? theme.colors.orange[150],
62
- borderTopLeftRadius: theme.borderWidths.thick_medium,
63
- borderBottomLeftRadius: theme.borderWidths.thick_medium,
64
- }}
65
- />
66
-
67
- <Box flexStyle={{ flex: 1 }} paddingStyle={{ padding: theme.paddings["2xs"] }}>
68
- {/* Cabeçalho: botão que abre/fecha a sanfona */}
69
- <TouchableOpacity
70
- onPress={toggleExpand}
71
- activeOpacity={0.9}
72
- accessibilityRole="button"
73
- accessibilityLabel="Detalhes da viagem"
74
- >
75
- <Box
76
- flexStyle={{
77
- flexDirection: "row",
78
- justifyContent: "space-between",
79
- alignItems: "center",
80
- }}
81
- >
82
- <Typography
83
- text="Detalhes da viagem"
84
- color={theme.colors.black[25]}
85
- fontFamily={theme.fonts.inter_bold}
86
- size={theme.fontSizes.md}
87
- />
88
-
89
- {/* Alterna seta */}
90
- <Icons
91
- icon={expanded ? "CHEVRON_UP" : "CHEVRON_DOWN"}
92
- color={theme.colors.gray[700]}
93
- size={20}
94
- />
95
- </Box>
96
- </TouchableOpacity>
97
-
98
- {/* Aparece somente quando clicado */}
99
- {expanded && (
100
- <>
101
- <Box
102
- marginStyle={{ marginTop: theme.margins["1xs"] }}
103
- flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
104
- >
105
- <Typography
106
- text={"Número CTE: "}
107
- color={theme.colors.black[25]}
108
- fontFamily={theme.fonts.inter_medium_500}
109
- size={theme.fontSizes.sm}
110
- />
111
- <Typography
112
- text={`${numeroCte || "Não informado"}`}
113
- color={theme.colors.gray[700]}
114
- fontFamily={theme.fonts.inter_regular_400}
115
- size={theme.fontSizes.xs}
116
- />
117
- </Box>
118
-
119
- <Box
120
- marginStyle={{ marginTop: theme.margins["1xs"] }}
121
- flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
122
- >
123
- <Typography
124
- text="Data carregamento: "
125
- color={theme.colors.black[25]}
126
- fontFamily={theme.fonts.inter_medium_500}
127
- size={theme.fontSizes.sm}
128
- />
129
- <Typography
130
- text={`${dataRegistro || "Não informado"}`}
131
- color={theme.colors.gray[700]}
132
- fontFamily={theme.fonts.inter_regular_400}
133
- size={theme.fontSizes.xs}
134
- />
135
- </Box>
136
-
137
- <Box
138
- marginStyle={{ marginTop: theme.margins["1xs"] }}
139
- flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
140
- >
141
- <Typography
142
- text="Origem: "
143
- color={theme.colors.black[25]}
144
- fontFamily={theme.fonts.inter_medium_500}
145
- size={theme.fontSizes.sm}
146
- />
147
- <Typography
148
- text={`${origem || "Não informado"}`}
149
- color={theme.colors.gray[700]}
150
- fontFamily={theme.fonts.inter_regular_400}
151
- size={theme.fontSizes.xs}
152
- />
153
- </Box>
154
-
155
- <Box
156
- marginStyle={{ marginTop: theme.margins["1xs"] }}
157
- flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
158
- >
159
- <Typography
160
- text="Destino: "
161
- color={theme.colors.black[25]}
162
- fontFamily={theme.fonts.inter_medium_500}
163
- size={theme.fontSizes.xs}
164
- />
165
- <Typography
166
- text={`${destino || "Não informado"}`}
167
- color={theme.colors.gray[700]}
168
- fontFamily={theme.fonts.inter_regular_400}
169
- size={theme.fontSizes.xs}
170
- />
171
- </Box>
172
-
173
- <Box
174
- marginStyle={{ marginTop: theme.margins["1xs"] }}
175
- flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
176
- >
177
- <Typography
178
- text="Próximo carregamento: "
179
- color={theme.colors.black[25]}
180
- fontFamily={theme.fonts.inter_medium_500}
181
- size={theme.fontSizes.xs}
182
- />
183
- <Typography
184
- text={`${proximoCarregamento || "Não informado"}`}
185
- color={theme.colors.gray[700]}
186
- fontFamily={theme.fonts.inter_regular_400}
187
- size={theme.fontSizes.xs}
188
- />
189
- </Box>
190
-
191
- <Box
192
- marginStyle={{ marginTop: theme.margins["1xs"] }}
193
- flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
194
- >
195
- <Typography
196
- text={"Peso: "}
197
- color={theme.colors.black[25]}
198
- fontFamily={theme.fonts.inter_medium_500}
199
- size={theme.fontSizes.xs}
200
- />
201
- <Typography
202
- text={`${formatPeso(peso) || "Não informado"}`}
203
- color={theme.colors.gray[700]}
204
- fontFamily={theme.fonts.inter_regular_400}
205
- size={theme.fontSizes.xs}
206
- />
207
- </Box>
208
-
209
- <Box
210
- marginStyle={{ marginTop: theme.margins["1xs"] }}
211
- flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
212
- >
213
- <Typography
214
- text={"Km carregado: "}
215
- color={theme.colors.black[25]}
216
- fontFamily={theme.fonts.inter_medium_500}
217
- size={theme.fontSizes.xs}
218
- />
219
- <Typography
220
- text={`${kmCarregado || "Não informado"}`}
221
- color={theme.colors.gray[700]}
222
- fontFamily={theme.fonts.inter_regular_400}
223
- size={theme.fontSizes.xs}
224
- />
225
- </Box>
226
-
227
- <Box
228
- marginStyle={{ marginTop: theme.margins["1xs"] }}
229
- flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
230
- >
231
- <Typography
232
- text={"Km vazio: "}
233
- color={theme.colors.black[25]}
234
- fontFamily={theme.fonts.inter_medium_500}
235
- size={theme.fontSizes.xs}
236
- />
237
- <Typography
238
- text={`${kmVazio || "Não informado"}`}
239
- color={theme.colors.gray[700]}
240
- fontFamily={theme.fonts.inter_regular_400}
241
- size={theme.fontSizes.xs}
242
- />
243
- </Box>
244
-
245
- <Box
246
- marginStyle={{ marginTop: theme.margins["1xs"] }}
247
- flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
248
- >
249
- <Typography
250
- text="Base para cálculo do PRO: "
251
- color={theme.colors.black[25]}
252
- fontFamily={theme.fonts.inter_medium_500}
253
- size={theme.fontSizes.xs}
254
- />
255
- <Typography
256
- text={`${formatBase(baseCalculo) || "Não informado"}`}
257
- color={theme.colors.gray[700]}
258
- fontFamily={theme.fonts.inter_regular_400}
259
- size={theme.fontSizes.xs}
260
- />
261
- </Box>
262
- </>
263
- )}
264
- </Box>
265
- </Box>
266
- );
267
- };
268
-
269
- TripDetailsCard.displayName = "TripDetailsCard";
270
- export default asBaseComponent(TripDetailsCard);
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React, { useState } from "react";
5
+ import { View, TouchableOpacity, LayoutAnimation, Platform, UIManager } from "react-native";
6
+
7
+ // components
8
+ import Box from "../../components/box";
9
+ import Typography from "../../components/typography";
10
+
11
+ // style
12
+ import { theme } from "../../styles/theme/theme";
13
+ import { Icons } from "../../common/icons-svg";
14
+
15
+ // typings
16
+ import type { ITripDetailsCard } from "./interface";
17
+ import { asBaseComponent } from "../../@types/as-base-component";
18
+
19
+ // Ativa animação no Android
20
+ if (Platform.OS === "android" && UIManager.setLayoutAnimationEnabledExperimental) {
21
+ UIManager.setLayoutAnimationEnabledExperimental(true);
22
+ }
23
+
24
+ const TripDetailsCard: React.FC<ITripDetailsCard> = ({
25
+ dataRegistro,
26
+ numeroCte,
27
+ origem,
28
+ destino,
29
+ proximoCarregamento,
30
+ peso,
31
+ baseCalculo,
32
+ corBarra,
33
+ kmCarregado,
34
+ kmVazio,
35
+ }) => {
36
+ const [expanded, setExpanded] = useState(true);
37
+
38
+ const toggleExpand = () => {
39
+ LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
40
+ setExpanded((prev) => !prev);
41
+ };
42
+
43
+ const formatPeso = (v?: number) =>
44
+ v === undefined || v === null ? "Não informado" : `${v.toLocaleString("pt-BR")} kg`;
45
+
46
+ const formatBase = (v?: number) =>
47
+ v === undefined || v === null ? "Não informado" : `R$ ${v.toLocaleString("pt-BR")}`;
48
+
49
+ return (
50
+ <Box
51
+ width={"100%"}
52
+ flexStyle={{ flexDirection: "row" }}
53
+ backgroundColor={theme.colors.neutral[25]}
54
+ borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
55
+ >
56
+ {/* faixa lateral */}
57
+ <View
58
+ style={{
59
+ width: 8,
60
+ backgroundColor: corBarra ?? theme.colors.orange[150],
61
+ borderTopLeftRadius: theme.borderWidths.thick_medium,
62
+ borderBottomLeftRadius: theme.borderWidths.thick_medium,
63
+ }}
64
+ />
65
+
66
+ <Box flexStyle={{ flex: 1 }} paddingStyle={{ padding: theme.paddings["2xs"] }}>
67
+ <TouchableOpacity
68
+ onPress={toggleExpand}
69
+ activeOpacity={0.9}
70
+ accessibilityRole="button"
71
+ accessibilityLabel="Detalhes da viagem"
72
+ >
73
+ <Box
74
+ flexStyle={{
75
+ flexDirection: "row",
76
+ justifyContent: "space-between",
77
+ alignItems: "center",
78
+ }}
79
+ >
80
+ <Typography
81
+ text="Detalhes da viagem"
82
+ color={theme.colors.black[25]}
83
+ fontFamily={theme.fonts.inter_bold}
84
+ size={theme.fontSizes.md}
85
+ />
86
+
87
+ <Icons
88
+ icon={expanded ? "CHEVRON_UP" : "CHEVRON_DOWN"}
89
+ color={theme.colors.gray[700]}
90
+ size={20}
91
+ />
92
+ </Box>
93
+ </TouchableOpacity>
94
+
95
+ {/* Bloco que será expandido/colapsado com animação */}
96
+ {expanded && (
97
+ <>
98
+ <Box
99
+ marginStyle={{ marginTop: theme.margins["1xs"] }}
100
+ flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
101
+ >
102
+ <Typography
103
+ text={"Número CTE: "}
104
+ color={theme.colors.black[25]}
105
+ fontFamily={theme.fonts.inter_medium_500}
106
+ size={theme.fontSizes.sm}
107
+ />
108
+ <Typography
109
+ text={`${numeroCte || "Não informado"}`}
110
+ color={theme.colors.gray[700]}
111
+ fontFamily={theme.fonts.inter_regular_400}
112
+ size={theme.fontSizes.xs}
113
+ />
114
+ </Box>
115
+
116
+ <Box
117
+ marginStyle={{ marginTop: theme.margins["1xs"] }}
118
+ flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
119
+ >
120
+ <Typography
121
+ text="Data carregamento: "
122
+ color={theme.colors.black[25]}
123
+ fontFamily={theme.fonts.inter_medium_500}
124
+ size={theme.fontSizes.sm}
125
+ />
126
+ <Typography
127
+ text={`${dataRegistro || "Não informado"}`}
128
+ color={theme.colors.gray[700]}
129
+ fontFamily={theme.fonts.inter_regular_400}
130
+ size={theme.fontSizes.xs}
131
+ />
132
+ </Box>
133
+
134
+ <Box
135
+ marginStyle={{ marginTop: theme.margins["1xs"] }}
136
+ flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
137
+ >
138
+ <Typography
139
+ text="Origem: "
140
+ color={theme.colors.black[25]}
141
+ fontFamily={theme.fonts.inter_medium_500}
142
+ size={theme.fontSizes.sm}
143
+ />
144
+ <Typography
145
+ text={`${origem || "Não informado"}`}
146
+ color={theme.colors.gray[700]}
147
+ fontFamily={theme.fonts.inter_regular_400}
148
+ size={theme.fontSizes.xs}
149
+ />
150
+ </Box>
151
+
152
+ <Box
153
+ marginStyle={{ marginTop: theme.margins["1xs"] }}
154
+ flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
155
+ >
156
+ <Typography
157
+ text="Destino: "
158
+ color={theme.colors.black[25]}
159
+ fontFamily={theme.fonts.inter_medium_500}
160
+ size={theme.fontSizes.xs}
161
+ />
162
+ <Typography
163
+ text={`${destino || "Não informado"}`}
164
+ color={theme.colors.gray[700]}
165
+ fontFamily={theme.fonts.inter_regular_400}
166
+ size={theme.fontSizes.xs}
167
+ />
168
+ </Box>
169
+
170
+ <Box
171
+ marginStyle={{ marginTop: theme.margins["1xs"] }}
172
+ flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
173
+ >
174
+ <Typography
175
+ text="Próximo carregamento: "
176
+ color={theme.colors.black[25]}
177
+ fontFamily={theme.fonts.inter_medium_500}
178
+ size={theme.fontSizes.xs}
179
+ />
180
+ <Typography
181
+ text={`${proximoCarregamento || "Não informado"}`}
182
+ color={theme.colors.gray[700]}
183
+ fontFamily={theme.fonts.inter_regular_400}
184
+ size={theme.fontSizes.xs}
185
+ />
186
+ </Box>
187
+
188
+ <Box
189
+ marginStyle={{ marginTop: theme.margins["1xs"] }}
190
+ flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
191
+ >
192
+ <Typography
193
+ text={"Peso: "}
194
+ color={theme.colors.black[25]}
195
+ fontFamily={theme.fonts.inter_medium_500}
196
+ size={theme.fontSizes.xs}
197
+ />
198
+ <Typography
199
+ text={`${formatPeso(peso) || "Não informado"}`}
200
+ color={theme.colors.gray[700]}
201
+ fontFamily={theme.fonts.inter_regular_400}
202
+ size={theme.fontSizes.xs}
203
+ />
204
+ </Box>
205
+
206
+ <Box
207
+ marginStyle={{ marginTop: theme.margins["1xs"] }}
208
+ flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
209
+ >
210
+ <Typography
211
+ text={"Km carregado: "}
212
+ color={theme.colors.black[25]}
213
+ fontFamily={theme.fonts.inter_medium_500}
214
+ size={theme.fontSizes.xs}
215
+ />
216
+ <Typography
217
+ text={`${kmCarregado || "Não informado"}`}
218
+ color={theme.colors.gray[700]}
219
+ fontFamily={theme.fonts.inter_regular_400}
220
+ size={theme.fontSizes.xs}
221
+ />
222
+ </Box>
223
+
224
+ <Box
225
+ marginStyle={{ marginTop: theme.margins["1xs"] }}
226
+ flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
227
+ >
228
+ <Typography
229
+ text={"Km vazio: "}
230
+ color={theme.colors.black[25]}
231
+ fontFamily={theme.fonts.inter_medium_500}
232
+ size={theme.fontSizes.xs}
233
+ />
234
+ <Typography
235
+ text={`${kmVazio || "Não informado"}`}
236
+ color={theme.colors.gray[700]}
237
+ fontFamily={theme.fonts.inter_regular_400}
238
+ size={theme.fontSizes.xs}
239
+ />
240
+ </Box>
241
+
242
+ <Box
243
+ marginStyle={{ marginTop: theme.margins["1xs"] }}
244
+ flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
245
+ >
246
+ <Typography
247
+ text="Base para cálculo do PRO: "
248
+ color={theme.colors.black[25]}
249
+ fontFamily={theme.fonts.inter_medium_500}
250
+ size={theme.fontSizes.xs}
251
+ />
252
+ <Typography
253
+ text={`${formatBase(baseCalculo) || "Não informado"}`}
254
+ color={theme.colors.gray[700]}
255
+ fontFamily={theme.fonts.inter_regular_400}
256
+ size={theme.fontSizes.xs}
257
+ />
258
+ </Box>
259
+ </>
260
+ )}
261
+ </Box>
262
+ </Box>
263
+ );
264
+ };
265
+
266
+ TripDetailsCard.displayName = "TripDetailsCard";
267
+ export default asBaseComponent(TripDetailsCard);
@@ -26,6 +26,7 @@ Você usa assim:
26
26
  backgroundColorBall="#050022"
27
27
  type="default"
28
28
  data={dataMock}
29
+ handleOnPressActivitie: (data)=> console.log(data)
29
30
  />
30
31
  \`\`\`
31
32
  `,
@@ -0,0 +1,28 @@
1
+ /**
2
+ * IMPORTS
3
+ */
4
+
5
+ interface ILimitProps {
6
+ text: string;
7
+ limit: number;
8
+ }
9
+ const handleLimitTextdisplayByAmount = ({ text, limit }: ILimitProps) => {
10
+ if (text?.length > limit) {
11
+ return `${text.substring(0, limit)}...`;
12
+ } else {
13
+ return text;
14
+ }
15
+ };
16
+
17
+ const handleLimitTextDate = ({ text, limit }: ILimitProps) => {
18
+ if (text?.length > limit) {
19
+ return `${text.substring(0, limit)}`;
20
+ } else {
21
+ return text;
22
+ }
23
+ };
24
+
25
+ /**
26
+ * EXPORTS
27
+ */
28
+ export { handleLimitTextdisplayByAmount, handleLimitTextDate };