react-native-exp-fig 2.0.2 → 2.0.4

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 (55) hide show
  1. package/lib/commonjs/components/activities-daily/index.js +4 -4
  2. package/lib/commonjs/components/header-profile/index.js +3 -3
  3. package/lib/commonjs/components/header-profile/index.js.map +1 -1
  4. package/lib/commonjs/components/loading-details/index.js +6 -6
  5. package/lib/commonjs/components/loading-details/index.js.map +1 -1
  6. package/lib/commonjs/components/modal-activities/data-activities/index.js +47 -15
  7. package/lib/commonjs/components/modal-activities/data-activities/index.js.map +1 -1
  8. package/lib/commonjs/components/modal-activities/helpers/index.js +30 -0
  9. package/lib/commonjs/components/modal-activities/helpers/index.js.map +1 -0
  10. package/lib/commonjs/components/modal-activities/index.js +6 -6
  11. package/lib/commonjs/components/modal-activities/index.js.map +1 -1
  12. package/lib/commonjs/stories/modal-activities/modal-activities.stories.js +15 -7
  13. package/lib/commonjs/stories/modal-activities/modal-activities.stories.js.map +1 -1
  14. package/lib/commonjs/utils/get-icon-by-property/index.js +22 -12
  15. package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -1
  16. package/lib/commonjs/utils/options-activity/index.js +24 -0
  17. package/lib/commonjs/utils/options-activity/index.js.map +1 -0
  18. package/lib/module/components/activities-daily/index.js +4 -4
  19. package/lib/module/components/header-profile/index.js +3 -3
  20. package/lib/module/components/header-profile/index.js.map +1 -1
  21. package/lib/module/components/loading-details/index.js +6 -6
  22. package/lib/module/components/loading-details/index.js.map +1 -1
  23. package/lib/module/components/modal-activities/data-activities/index.js +46 -14
  24. package/lib/module/components/modal-activities/data-activities/index.js.map +1 -1
  25. package/lib/module/components/modal-activities/helpers/index.js +26 -0
  26. package/lib/module/components/modal-activities/helpers/index.js.map +1 -0
  27. package/lib/module/components/modal-activities/index.js +6 -6
  28. package/lib/module/components/modal-activities/index.js.map +1 -1
  29. package/lib/module/stories/modal-activities/modal-activities.stories.js +15 -7
  30. package/lib/module/stories/modal-activities/modal-activities.stories.js.map +1 -1
  31. package/lib/module/utils/get-icon-by-property/index.js +21 -13
  32. package/lib/module/utils/get-icon-by-property/index.js.map +1 -1
  33. package/lib/module/utils/options-activity/index.js +21 -0
  34. package/lib/module/utils/options-activity/index.js.map +1 -0
  35. package/lib/typescript/src/components/modal-activities/data-activities/index.d.ts +16 -17
  36. package/lib/typescript/src/components/modal-activities/data-activities/index.d.ts.map +1 -1
  37. package/lib/typescript/src/components/modal-activities/helpers/index.d.ts +12 -0
  38. package/lib/typescript/src/components/modal-activities/helpers/index.d.ts.map +1 -0
  39. package/lib/typescript/src/stories/modal-activities/modal-activities.stories.d.ts +3 -0
  40. package/lib/typescript/src/stories/modal-activities/modal-activities.stories.d.ts.map +1 -1
  41. package/lib/typescript/src/utils/get-icon-by-property/index.d.ts +2 -1
  42. package/lib/typescript/src/utils/get-icon-by-property/index.d.ts.map +1 -1
  43. package/lib/typescript/src/utils/options-activity/index.d.ts +18 -0
  44. package/lib/typescript/src/utils/options-activity/index.d.ts.map +1 -0
  45. package/package.json +1 -1
  46. package/src/components/activities-daily/index.tsx +116 -116
  47. package/src/components/header-profile/index.tsx +3 -3
  48. package/src/components/loading-details/index.tsx +156 -156
  49. package/src/components/modal-activities/data-activities/index.ts +107 -65
  50. package/src/components/modal-activities/helpers/index.ts +25 -0
  51. package/src/components/modal-activities/index.tsx +137 -137
  52. package/src/components/modal-activities/interface.d.ts +34 -32
  53. package/src/stories/modal-activities/modal-activities.stories.tsx +73 -64
  54. package/src/utils/get-icon-by-property/index.tsx +73 -54
  55. package/src/utils/options-activity/index.ts +13 -0
@@ -1,116 +1,116 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React from "react";
5
- import { TouchableOpacity } from "react-native";
6
-
7
- // components
8
- import { Box } from "../../components/box";
9
- import { Typography } from "../../components/typography";
10
-
11
- //commons/ icons
12
- import { Icons } from "../../common/icons-svg";
13
-
14
- // styles
15
- import { theme } from "../../styles/theme/theme";
16
-
17
- // typings
18
- import { IActivitiesDaily } from "./interface";
19
-
20
- const ActivitiesDaily: React.FC<IActivitiesDaily> = ({ handleActivity }) => {
21
- return (
22
- <Box
23
- testID={"activities-daily"}
24
- width={"100%"}
25
- height={100}
26
- backgroundColor={theme.colors.neutral[25]}
27
- borderStyled={{
28
- borderRadius: theme.borderWidths.thick_medium,
29
- }}
30
- >
31
- <Box
32
- width={"100%"}
33
- height={30}
34
- backgroundColor={theme.colors.blue[400]}
35
- borderStyled={{
36
- borderTopLeftRadius: theme.borderWidths.thin_bold,
37
- borderTopRightRadius: theme.borderWidths.thin_bold,
38
- borderColor: theme.colors.blue[400],
39
- }}
40
- flexStyle={{
41
- justifyContent: "center",
42
- }}
43
- >
44
- <Typography
45
- text={"Atividades diárias"}
46
- color={theme.colors.neutral[25]}
47
- size={theme.fontSizes.sm}
48
- fontFamily={theme.fonts.inter_medium_500}
49
- fontWeight={"500"}
50
- lineHeight={theme.fontSizes.lg}
51
- marginLeft={theme.margins["2xs"]}
52
- />
53
- </Box>
54
- <Box
55
- width={"100%"}
56
- flexStyle={{
57
- flexDirection: "row",
58
- justifyContent: "space-between",
59
- }}
60
- paddingStyle={{
61
- padding: theme.paddings["2xs"],
62
- }}
63
- >
64
- <Typography
65
- text={"Selecione uma das opções"}
66
- color={theme.colors.blue[500]}
67
- size={theme.fontSizes.xs}
68
- fontFamily={theme.fonts.inter_bold_700}
69
- fontWeight={"700"}
70
- lineHeight={theme.fontSizes.md}
71
- />
72
-
73
- <Box flexStyle={{ flexDirection: "row" }} marginStyle={{ marginTop: 5 }}>
74
- <TouchableOpacity
75
- activeOpacity={0.7}
76
- style={{ marginRight: theme.margins.xl, alignItems: "center" }}
77
- onPress={() => handleActivity("trabalho")}
78
- >
79
- <Icons icon={"TRUCK"} color={theme.colors.blue[525]} />
80
- <Typography
81
- text={"Trabalho"}
82
- color={theme.colors.black[25]}
83
- size={theme.fontSizes.xs}
84
- fontFamily={theme.fonts.inter_bold_700}
85
- fontWeight={"700"}
86
- lineHeight={theme.fontSizes.sm}
87
- marginTop={4}
88
- />
89
- </TouchableOpacity>
90
-
91
- <TouchableOpacity
92
- activeOpacity={0.7}
93
- style={{ alignItems: "center" }}
94
- onPress={() => handleActivity("descanso")}
95
- >
96
- <Icons icon={"BED"} />
97
- <Typography
98
- text={"Descanso"}
99
- color={theme.colors.black[25]}
100
- size={theme.fontSizes.xs}
101
- fontFamily={theme.fonts.inter_bold_700}
102
- fontWeight={"700"}
103
- lineHeight={theme.fontSizes.sm}
104
- marginTop={4}
105
- />
106
- </TouchableOpacity>
107
- </Box>
108
- </Box>
109
- </Box>
110
- );
111
- };
112
-
113
- /**
114
- * EXPORTS
115
- */
116
- export { ActivitiesDaily };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React from "react";
5
+ import { TouchableOpacity } from "react-native";
6
+
7
+ // components
8
+ import { Box } from "../../components/box";
9
+ import { Typography } from "../../components/typography";
10
+
11
+ //commons/ icons
12
+ import { Icons } from "../../common/icons-svg";
13
+
14
+ // styles
15
+ import { theme } from "../../styles/theme/theme";
16
+
17
+ // typings
18
+ import { IActivitiesDaily } from "./interface";
19
+
20
+ const ActivitiesDaily: React.FC<IActivitiesDaily> = ({ handleActivity }) => {
21
+ return (
22
+ <Box
23
+ testID={"activities-daily"}
24
+ width={"100%"}
25
+ height={100}
26
+ backgroundColor={theme.colors.neutral[25]}
27
+ borderStyled={{
28
+ borderRadius: theme.borderWidths.thick_medium,
29
+ }}
30
+ >
31
+ <Box
32
+ width={"100%"}
33
+ height={30}
34
+ backgroundColor={theme.colors.blue[400]}
35
+ borderStyled={{
36
+ borderTopLeftRadius: theme.borderWidths.thin_bold,
37
+ borderTopRightRadius: theme.borderWidths.thin_bold,
38
+ borderColor: theme.colors.blue[400],
39
+ }}
40
+ flexStyle={{
41
+ justifyContent: "center",
42
+ }}
43
+ >
44
+ <Typography
45
+ text={"Atividades diárias"}
46
+ color={theme.colors.neutral[25]}
47
+ size={theme.fontSizes.sm}
48
+ fontFamily={theme.fonts.inter_medium_500}
49
+ fontWeight={"500"}
50
+ lineHeight={theme.fontSizes.lg}
51
+ marginLeft={theme.margins["2xs"]}
52
+ />
53
+ </Box>
54
+ <Box
55
+ width={"100%"}
56
+ flexStyle={{
57
+ flexDirection: "row",
58
+ justifyContent: "space-between",
59
+ }}
60
+ paddingStyle={{
61
+ padding: theme.paddings["2xs"],
62
+ }}
63
+ >
64
+ <Typography
65
+ text={"Selecione uma das opções"}
66
+ color={theme.colors.blue[500]}
67
+ size={theme.fontSizes.xs}
68
+ fontFamily={theme.fonts.inter_bold_700}
69
+ fontWeight={"700"}
70
+ lineHeight={theme.fontSizes.md}
71
+ />
72
+
73
+ <Box flexStyle={{ flexDirection: "row" }} marginStyle={{ marginTop: 5 }}>
74
+ <TouchableOpacity
75
+ activeOpacity={0.7}
76
+ style={{ marginRight: theme.margins.xl, alignItems: "center" }}
77
+ onPress={() => handleActivity("trabalho")}
78
+ >
79
+ <Icons icon={"TRUCK"} color={theme.colors.blue[525]} />
80
+ <Typography
81
+ text={"Trabalho"}
82
+ color={theme.colors.black[25]}
83
+ size={theme.fontSizes.xs}
84
+ fontFamily={theme.fonts.inter_bold_700}
85
+ fontWeight={"700"}
86
+ lineHeight={theme.fontSizes.sm}
87
+ marginTop={4}
88
+ />
89
+ </TouchableOpacity>
90
+
91
+ <TouchableOpacity
92
+ activeOpacity={0.7}
93
+ style={{ alignItems: "center" }}
94
+ onPress={() => handleActivity("descanso")}
95
+ >
96
+ <Icons icon={"BED"} />
97
+ <Typography
98
+ text={"Descanso"}
99
+ color={theme.colors.black[25]}
100
+ size={theme.fontSizes.xs}
101
+ fontFamily={theme.fonts.inter_bold_700}
102
+ fontWeight={"700"}
103
+ lineHeight={theme.fontSizes.sm}
104
+ marginTop={4}
105
+ />
106
+ </TouchableOpacity>
107
+ </Box>
108
+ </Box>
109
+ </Box>
110
+ );
111
+ };
112
+
113
+ /**
114
+ * EXPORTS
115
+ */
116
+ export { ActivitiesDaily };
@@ -47,7 +47,7 @@ const HeaderNavigation = forwardRef<any, IHeaderProps>((props, ref): React.React
47
47
  flexStyle={{ flexDirection: "row", justifyContent: "space-between", alignItems: "center" }}
48
48
  >
49
49
  <Box
50
- width={"20%"}
50
+ width={"15%"}
51
51
  backgroundColor={theme.colors.blue[525]}
52
52
  flexStyle={{ flexDirection: "column", justifyContent: "center", alignItems: "flex-start" }}
53
53
  paddingStyle={{ paddingLeft: 16 }}
@@ -65,7 +65,7 @@ const HeaderNavigation = forwardRef<any, IHeaderProps>((props, ref): React.React
65
65
  justifyContent: "center",
66
66
  }}
67
67
  >
68
- {title === "Controle de Jornada" ? (
68
+ {title === "Controle de Carregamento" ? (
69
69
  <>
70
70
  <Icons icon="LIST" color={theme.colors.neutral[25]} />
71
71
  <Box marginStyle={{ marginBottom: 8 }} />
@@ -99,7 +99,7 @@ const HeaderNavigation = forwardRef<any, IHeaderProps>((props, ref): React.React
99
99
 
100
100
  <Box
101
101
  backgroundColor={theme.colors.blue[525]}
102
- width={"20%"}
102
+ width={"15%"}
103
103
  flexStyle={{
104
104
  alignItems: "center",
105
105
  justifyContent: "flex-end",
@@ -1,156 +1,156 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React from "react";
5
-
6
- // components
7
- import { Box } from "../box";
8
- import { Button } from "../button";
9
- import { Typography } from "../typography";
10
-
11
- // typings
12
- import { ILoadingDetails } from "./interface";
13
-
14
- // styles
15
- import { theme } from "../../styles/theme/theme";
16
-
17
- const LoadingDetails: React.FC<ILoadingDetails> = ({
18
- numero = "01020304050607",
19
- local = "Doca 1, Pátio 02 - Usimais (Ipatinga)",
20
- date = "24/03/2025",
21
- duracao = "00:00",
22
- isLoadingStart = false,
23
- disabled,
24
- handleClickGoback,
25
- handleClickStart,
26
- }: ILoadingDetails) => {
27
- return (
28
- <Box
29
- width="100%"
30
- borderStyled={{ borderRadius: 8 }}
31
- style={{
32
- shadowColor: theme.colors.black[10],
33
- shadowOpacity: 0.1,
34
- shadowOffset: { width: 0, height: 2 },
35
- shadowRadius: 4,
36
- elevation: 2,
37
- }}
38
- backgroundColor={theme.colors.blue[400]}
39
- >
40
- <Box
41
- width={"100%"}
42
- flexStyle={{
43
- flexDirection: "row",
44
- alignItems: "center",
45
- justifyContent: "space-between",
46
- }}
47
- paddingStyle={{ padding: theme.paddings.md }}
48
- >
49
- <Box
50
- width={"78%"}
51
- flexStyle={{
52
- flexDirection: "column",
53
- justifyContent: "flex-start",
54
- alignItems: "flex-start",
55
- }}
56
- >
57
- <Typography
58
- text={`Carregamento - #${numero}`}
59
- size={theme.fontSizes.sm}
60
- fontFamily={theme.fonts.inter_bold}
61
- fontWeight="700"
62
- color={theme.colors.neutral[25]}
63
- lineHeight={theme.fontSizes["lg"]}
64
- letterSpacing={"regular"}
65
- />
66
-
67
- <Typography
68
- text={local}
69
- color={theme.colors.neutral[25]}
70
- size={theme.fontSizes.xs}
71
- lineHeight={theme.fontSizes["2xl"]}
72
- letterSpacing={"regular"}
73
- numberOfLines={1}
74
- />
75
- <Typography
76
- text={`Data carregamento: ${date}`}
77
- color={theme.colors.neutral[25]}
78
- size={theme.fontSizes.xs}
79
- lineHeight={theme.fontSizes["2xl"]}
80
- letterSpacing={"regular"}
81
- numberOfLines={1}
82
- />
83
- </Box>
84
-
85
- <Typography
86
- text={duracao}
87
- color={theme.colors.neutral[25]}
88
- size={24}
89
- align="left"
90
- fontFamily="inter_bold"
91
- fontWeight="700"
92
- lineHeight={theme.fontSizes["3xl"]}
93
- letterSpacing={"regular"}
94
- />
95
- </Box>
96
-
97
- <Box
98
- height={1}
99
- backgroundColor={theme.colors.gray[950]}
100
- marginStyle={{ marginTop: theme.margins.xs, marginBottom: theme.margins.xs }}
101
- />
102
-
103
- <Box style={{ flexDirection: "row", gap: 12, marginBottom: 8, padding: theme.paddings.md }}>
104
- <Button
105
- testID="iniciar-button"
106
- title="INICIAR"
107
- onPress={handleClickStart}
108
- height={40}
109
- isLoading={isLoadingStart}
110
- disabled={disabled}
111
- backgroundColor={disabled ? theme.colors.green[100] : theme.colors.green[250]}
112
- flexStyle={{ flex: 1, alignItems: "center", justifyContent: "center" }}
113
- buttonTextStyle={{
114
- color: theme.colors.neutral[25],
115
- fontFamily: theme.fonts.inter_semi_bold_600,
116
- fontSize: theme.fontSizes.md,
117
- fontWeight: "600",
118
- textAlign: "center",
119
- }}
120
- borderStyled={{
121
- borderWidth: theme.borderWidths.thin,
122
- borderColor: disabled ? theme.colors.green[100] : theme.colors.green[250],
123
- borderRadius: theme.fontSizes["2xl"],
124
- }}
125
- />
126
-
127
- <Button
128
- title="VOLTAR"
129
- onPress={handleClickGoback}
130
- height={40}
131
- isLoading={false}
132
- disabled={isLoadingStart}
133
- backgroundColor={theme.colors.yellow[75]}
134
- flexStyle={{ flex: 1, alignItems: "center", justifyContent: "center" }}
135
- buttonTextStyle={{
136
- color: theme.colors.neutral[25],
137
- fontFamily: theme.fonts.inter_semi_bold_600,
138
- fontSize: theme.fontSizes.md,
139
- fontWeight: "600",
140
- textAlign: "center",
141
- }}
142
- borderStyled={{
143
- borderWidth: theme.borderWidths.thin,
144
- borderColor: theme.colors.yellow[75],
145
- borderRadius: theme.fontSizes["2xl"],
146
- }}
147
- />
148
- </Box>
149
- </Box>
150
- );
151
- };
152
-
153
- /**
154
- * EXPORTS
155
- */
156
- export { LoadingDetails };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React from "react";
5
+
6
+ // components
7
+ import { Box } from "../box";
8
+ import { Button } from "../button";
9
+ import { Typography } from "../typography";
10
+
11
+ // typings
12
+ import { ILoadingDetails } from "./interface";
13
+
14
+ // styles
15
+ import { theme } from "../../styles/theme/theme";
16
+
17
+ const LoadingDetails: React.FC<ILoadingDetails> = ({
18
+ numero = "01020304050607",
19
+ local = "Doca 1, Pátio 02 - Usimais (Ipatinga)",
20
+ date = "24/03/2025",
21
+ duracao = "00:00",
22
+ isLoadingStart = false,
23
+ disabled,
24
+ handleClickGoback,
25
+ handleClickStart,
26
+ }: ILoadingDetails) => {
27
+ return (
28
+ <Box
29
+ width="100%"
30
+ borderStyled={{ borderRadius: 8 }}
31
+ style={{
32
+ shadowColor: theme.colors.black[10],
33
+ shadowOpacity: 0.1,
34
+ shadowOffset: { width: 0, height: 2 },
35
+ shadowRadius: 4,
36
+ elevation: 2,
37
+ }}
38
+ backgroundColor={theme.colors.blue[400]}
39
+ >
40
+ <Box
41
+ width={"100%"}
42
+ flexStyle={{
43
+ flexDirection: "row",
44
+ alignItems: "center",
45
+ justifyContent: "space-between",
46
+ }}
47
+ paddingStyle={{ padding: theme.paddings.md }}
48
+ >
49
+ <Box
50
+ width={"78%"}
51
+ flexStyle={{
52
+ flexDirection: "column",
53
+ justifyContent: "flex-start",
54
+ alignItems: "flex-start",
55
+ }}
56
+ >
57
+ <Typography
58
+ text={`Carregamento - #${numero}`}
59
+ size={theme.fontSizes.sm}
60
+ fontFamily={theme.fonts.inter_bold}
61
+ fontWeight="700"
62
+ color={theme.colors.neutral[25]}
63
+ lineHeight={theme.fontSizes["lg"]}
64
+ letterSpacing={"regular"}
65
+ />
66
+
67
+ <Typography
68
+ text={local}
69
+ color={theme.colors.neutral[25]}
70
+ size={theme.fontSizes.xs}
71
+ lineHeight={theme.fontSizes["2xl"]}
72
+ letterSpacing={"regular"}
73
+ numberOfLines={1}
74
+ />
75
+ <Typography
76
+ text={`Data carregamento: ${date}`}
77
+ color={theme.colors.neutral[25]}
78
+ size={theme.fontSizes.xs}
79
+ lineHeight={theme.fontSizes["2xl"]}
80
+ letterSpacing={"regular"}
81
+ numberOfLines={1}
82
+ />
83
+ </Box>
84
+
85
+ <Typography
86
+ text={duracao}
87
+ color={theme.colors.neutral[25]}
88
+ size={24}
89
+ align="left"
90
+ fontFamily="inter_bold"
91
+ fontWeight="700"
92
+ lineHeight={theme.fontSizes["3xl"]}
93
+ letterSpacing={"regular"}
94
+ />
95
+ </Box>
96
+
97
+ <Box
98
+ height={1}
99
+ backgroundColor={theme.colors.gray[950]}
100
+ marginStyle={{ marginTop: theme.margins.xs, marginBottom: theme.margins.xs }}
101
+ />
102
+
103
+ <Box style={{ flexDirection: "row", gap: 12, marginBottom: 8, padding: theme.paddings.md }}>
104
+ <Button
105
+ testID="iniciar-button"
106
+ title="INICIAR"
107
+ onPress={handleClickStart}
108
+ height={40}
109
+ isLoading={isLoadingStart}
110
+ disabled={disabled}
111
+ backgroundColor={disabled ? theme.colors.gray[900] : theme.colors.green[250]}
112
+ flexStyle={{ flex: 1, alignItems: "center", justifyContent: "center" }}
113
+ buttonTextStyle={{
114
+ color: theme.colors.neutral[25],
115
+ fontFamily: theme.fonts.inter_semi_bold_600,
116
+ fontSize: theme.fontSizes.md,
117
+ fontWeight: "600",
118
+ textAlign: "center",
119
+ }}
120
+ borderStyled={{
121
+ borderWidth: theme.borderWidths.thin,
122
+ borderColor: disabled ? theme.colors.gray[900] : theme.colors.green[250],
123
+ borderRadius: theme.fontSizes["2xl"],
124
+ }}
125
+ />
126
+
127
+ <Button
128
+ title="VOLTAR"
129
+ onPress={handleClickGoback}
130
+ height={40}
131
+ isLoading={false}
132
+ disabled={isLoadingStart}
133
+ backgroundColor={theme.colors.yellow[75]}
134
+ flexStyle={{ flex: 1, alignItems: "center", justifyContent: "center" }}
135
+ buttonTextStyle={{
136
+ color: theme.colors.neutral[25],
137
+ fontFamily: theme.fonts.inter_semi_bold_600,
138
+ fontSize: theme.fontSizes.md,
139
+ fontWeight: "600",
140
+ textAlign: "center",
141
+ }}
142
+ borderStyled={{
143
+ borderWidth: theme.borderWidths.thin,
144
+ borderColor: theme.colors.yellow[75],
145
+ borderRadius: theme.fontSizes["2xl"],
146
+ }}
147
+ />
148
+ </Box>
149
+ </Box>
150
+ );
151
+ };
152
+
153
+ /**
154
+ * EXPORTS
155
+ */
156
+ export { LoadingDetails };