react-native-exp-fig 0.1.17 → 0.1.18

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 (59) hide show
  1. package/lib/commonjs/common/icons-svg/constants/index.js +8 -6
  2. package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
  3. package/lib/commonjs/common/icons-svg/house/index.js +49 -0
  4. package/lib/commonjs/common/icons-svg/house/index.js.map +1 -0
  5. package/lib/commonjs/common/icons-svg/index.js +26 -12
  6. package/lib/commonjs/common/icons-svg/index.js.map +1 -1
  7. package/lib/commonjs/common/icons-svg/island/index.js +34 -0
  8. package/lib/commonjs/common/icons-svg/island/index.js.map +1 -0
  9. package/lib/commonjs/components/activities-progress/index.js +16 -14
  10. package/lib/commonjs/components/activities-progress/index.js.map +1 -1
  11. package/lib/commonjs/components/activities-progress/interface.d.js.map +1 -1
  12. package/lib/commonjs/components/card-history/index.js +20 -9
  13. package/lib/commonjs/components/card-history/index.js.map +1 -1
  14. package/lib/commonjs/components/card-history/interface.d.js.map +1 -1
  15. package/lib/commonjs/components/menu-item/interface.d.js.map +1 -1
  16. package/lib/commonjs/stories/activities-progress/activities-progress.stories.js +24 -14
  17. package/lib/commonjs/stories/activities-progress/activities-progress.stories.js.map +1 -1
  18. package/lib/commonjs/stories/card-history/card-history.stories.js +5 -2
  19. package/lib/commonjs/stories/card-history/card-history.stories.js.map +1 -1
  20. package/lib/commonjs/utils/get-icon-by-property/index.js +85 -0
  21. package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -0
  22. package/lib/module/common/icons-svg/constants/index.js +8 -6
  23. package/lib/module/common/icons-svg/constants/index.js.map +1 -1
  24. package/lib/module/common/icons-svg/house/index.js +41 -0
  25. package/lib/module/common/icons-svg/house/index.js.map +1 -0
  26. package/lib/module/common/icons-svg/index.js +26 -12
  27. package/lib/module/common/icons-svg/index.js.map +1 -1
  28. package/lib/module/common/icons-svg/island/index.js +26 -0
  29. package/lib/module/common/icons-svg/island/index.js.map +1 -0
  30. package/lib/module/components/activities-progress/index.js +15 -14
  31. package/lib/module/components/activities-progress/index.js.map +1 -1
  32. package/lib/module/components/activities-progress/interface.d.js.map +1 -1
  33. package/lib/module/components/card-history/index.js +20 -9
  34. package/lib/module/components/card-history/index.js.map +1 -1
  35. package/lib/module/components/card-history/interface.d.js.map +1 -1
  36. package/lib/module/components/menu-item/interface.d.js.map +1 -1
  37. package/lib/module/stories/activities-progress/activities-progress.stories.js +24 -14
  38. package/lib/module/stories/activities-progress/activities-progress.stories.js.map +1 -1
  39. package/lib/module/stories/card-history/card-history.stories.js +5 -2
  40. package/lib/module/stories/card-history/card-history.stories.js.map +1 -1
  41. package/lib/module/utils/get-icon-by-property/index.js +79 -0
  42. package/lib/module/utils/get-icon-by-property/index.js.map +1 -0
  43. package/lib/typescript/src/common/icons-svg/constants/index.d.ts +3 -1
  44. package/lib/typescript/src/common/icons-svg/house/index.d.ts +10 -0
  45. package/lib/typescript/src/common/icons-svg/island/index.d.ts +10 -0
  46. package/lib/typescript/src/utils/get-icon-by-property/index.d.ts +15 -0
  47. package/package.json +2 -3
  48. package/src/common/icons-svg/constants/index.ts +66 -64
  49. package/src/common/icons-svg/house/index.tsx +41 -0
  50. package/src/common/icons-svg/index.tsx +267 -259
  51. package/src/common/icons-svg/island/index.tsx +25 -0
  52. package/src/components/activities-progress/index.tsx +169 -162
  53. package/src/components/activities-progress/interface.d.ts +61 -41
  54. package/src/components/card-history/index.tsx +221 -211
  55. package/src/components/card-history/interface.d.ts +38 -34
  56. package/src/components/menu-item/interface.d.ts +1 -1
  57. package/src/stories/activities-progress/activities-progress.stories.tsx +71 -61
  58. package/src/stories/card-history/card-history.stories.tsx +53 -50
  59. package/src/utils/get-icon-by-property/index.tsx +53 -0
@@ -1,162 +1,169 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React 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
- // styles
14
- import { theme } from "../../styles/theme/theme";
15
-
16
- // typings
17
- import { IActivitiesProgress } from "./interface";
18
-
19
- const ActivitiesProgress: React.FC<IActivitiesProgress> = ({
20
- data_fim = "11/05/2025",
21
- duracao = "00:30",
22
- data_inicio = "17:20",
23
- titleLabel = "Descanso",
24
- situation = true,
25
- }) => {
26
- return (
27
- <Box
28
- width={"100%"}
29
- height={100}
30
- backgroundColor={theme.colors.neutral[25]}
31
- borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
32
- >
33
- <Box
34
- width={"100%"}
35
- height={30}
36
- backgroundColor={theme.colors.blue[400]}
37
- borderStyled={{
38
- borderTopLeftRadius: theme.borderWidths.thin_bold,
39
- borderTopRightRadius: theme.borderWidths.thin_bold,
40
- borderColor: theme.colors.blue[400],
41
- }}
42
- flexStyle={{
43
- justifyContent: "space-between",
44
- flexDirection: "row",
45
- }}
46
- >
47
- <Box
48
- flexStyle={{
49
- flexDirection: "row",
50
- alignItems: "center",
51
- }}
52
- >
53
- <Typography
54
- text={"Status: "}
55
- color={theme.colors.neutral[25]}
56
- size={theme.fontSizes.sm}
57
- fontFamily={theme.fonts.inter_medium_500}
58
- fontWeight={"500"}
59
- lineHeight={theme.fontSizes.lg}
60
- marginLeft={theme.margins["2xs"]}
61
- />
62
- <Typography
63
- text={titleLabel}
64
- color={titleLabel === "Trabalho" ? theme.colors.green[400] : theme.colors.orange[500]}
65
- size={theme.fontSizes.sm}
66
- fontFamily={theme.fonts.inter_semi_bold_600}
67
- fontWeight={"600"}
68
- lineHeight={theme.fontSizes.lg}
69
- />
70
- </Box>
71
-
72
- <Box
73
- style={{ marginRight: theme.margins["2xs"], marginTop: theme.margins["1xs"] }}
74
- height={20}
75
- width={20}
76
- >
77
- <Icons
78
- icon={"CHECK_OUTLINE"}
79
- color={situation ? theme.colors.green[400] : theme.colors.orange[500]}
80
- />
81
- </Box>
82
- </Box>
83
-
84
- <Box
85
- width={"100%"}
86
- flexStyle={{
87
- flexDirection: "row",
88
- justifyContent: "space-between",
89
- }}
90
- paddingStyle={{
91
- padding: theme.paddings["2xs"],
92
- }}
93
- >
94
- <Box height={20} flexStyle={{ flexDirection: "row", alignItems: "center" }}>
95
- <Icons icon={"COFFEE"} size={24} />
96
- <Typography
97
- text={data_fim}
98
- color={theme.colors.black[25]}
99
- size={theme.fontSizes.xs}
100
- fontFamily={theme.fonts.inter_bold_700}
101
- fontWeight={"700"}
102
- lineHeight={theme.fontSizes.lg}
103
- marginLeft={4}
104
- />
105
- </Box>
106
-
107
- <Box height={50} flexStyle={{ flexDirection: "row", alignItems: "flex-end" }}>
108
- <Box
109
- flexStyle={{ alignItems: "center" }}
110
- marginStyle={{ marginRight: theme.margins["2xs"] }}
111
- >
112
- <Typography
113
- text={data_inicio}
114
- color={theme.colors.blue[500]}
115
- size={theme.fontSizes.sm}
116
- fontFamily={theme.fonts.inter_bold}
117
- fontWeight={"700"}
118
- lineHeight={theme.fontSizes.md}
119
- />
120
- <Typography
121
- text={"INICIO"}
122
- color={theme.colors.gray[600]}
123
- size={theme.fontSizes["2xs"]}
124
- fontFamily={theme.fonts.inter_medium_500}
125
- fontWeight={"500"}
126
- lineHeight={theme.fontSizes.xs}
127
- marginTop={4}
128
- />
129
- </Box>
130
-
131
- <Box
132
- flexStyle={{ alignItems: "center" }}
133
- marginStyle={{ marginRight: theme.margins["2xs"] }}
134
- >
135
- <Typography
136
- text={duracao}
137
- color={theme.colors.blue[500]}
138
- size={theme.fontSizes.sm}
139
- fontFamily={theme.fonts.inter_bold}
140
- fontWeight={"700"}
141
- lineHeight={theme.fontSizes.md}
142
- />
143
- <Typography
144
- text={"DURAÇÃO"}
145
- color={theme.colors.gray[600]}
146
- size={theme.fontSizes["2xs"]}
147
- fontFamily={theme.fonts.inter_medium_500}
148
- fontWeight={"500"}
149
- lineHeight={theme.fontSizes.xs}
150
- marginTop={4}
151
- />
152
- </Box>
153
- </Box>
154
- </Box>
155
- </Box>
156
- );
157
- };
158
-
159
- /**
160
- * EXPORTS
161
- */
162
- export { ActivitiesProgress };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React 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
+ // styles
14
+ import { theme } from "../../styles/theme/theme";
15
+
16
+ // typings
17
+ import { IActivitiesProgress } from "./interface";
18
+
19
+ // utils
20
+ import { getIconByProperty } from "../../utils/get-icon-by-property";
21
+
22
+ const ActivitiesProgress: React.FC<IActivitiesProgress> = ({
23
+ data_inicio_horario = "11/05/2025",
24
+ duracao = "00:30",
25
+ data_inicio = "17:20",
26
+ titleLabel = "Descanso",
27
+ criado_ofiline = true,
28
+ tipo_atividade = "Descanso",
29
+ referencia = "repouso_noturno",
30
+ }) => {
31
+ return (
32
+ <Box
33
+ width={"100%"}
34
+ height={100}
35
+ backgroundColor={theme.colors.neutral[25]}
36
+ borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
37
+ >
38
+ <Box
39
+ width={"100%"}
40
+ height={30}
41
+ backgroundColor={theme.colors.blue[400]}
42
+ borderStyled={{
43
+ borderTopLeftRadius: theme.borderWidths.thin_bold,
44
+ borderTopRightRadius: theme.borderWidths.thin_bold,
45
+ borderColor: theme.colors.blue[400],
46
+ }}
47
+ flexStyle={{
48
+ justifyContent: "space-between",
49
+ flexDirection: "row",
50
+ }}
51
+ >
52
+ <Box
53
+ flexStyle={{
54
+ flexDirection: "row",
55
+ alignItems: "center",
56
+ }}
57
+ >
58
+ <Typography
59
+ text={"Status: "}
60
+ color={theme.colors.neutral[25]}
61
+ size={theme.fontSizes.sm}
62
+ fontFamily={theme.fonts.inter_medium_500}
63
+ fontWeight={"500"}
64
+ lineHeight={theme.fontSizes.lg}
65
+ marginLeft={theme.margins["2xs"]}
66
+ />
67
+ <Typography
68
+ text={titleLabel}
69
+ color={
70
+ tipo_atividade === "trabalho" ? theme.colors.green[400] : theme.colors.orange[500]
71
+ }
72
+ size={theme.fontSizes.sm}
73
+ fontFamily={theme.fonts.inter_semi_bold_600}
74
+ fontWeight={"600"}
75
+ lineHeight={theme.fontSizes.lg}
76
+ />
77
+ </Box>
78
+
79
+ <Box
80
+ style={{ marginRight: theme.margins["2xs"], marginTop: theme.margins["1xs"] }}
81
+ height={20}
82
+ width={20}
83
+ >
84
+ <Icons
85
+ icon={"CHECK_OUTLINE"}
86
+ color={criado_ofiline ? theme.colors.green[400] : theme.colors.orange[500]}
87
+ />
88
+ </Box>
89
+ </Box>
90
+
91
+ <Box
92
+ width={"100%"}
93
+ flexStyle={{
94
+ flexDirection: "row",
95
+ justifyContent: "space-between",
96
+ }}
97
+ paddingStyle={{
98
+ padding: theme.paddings["2xs"],
99
+ }}
100
+ >
101
+ <Box height={20} flexStyle={{ flexDirection: "row", alignItems: "center" }}>
102
+ {getIconByProperty(referencia)}
103
+ <Typography
104
+ text={data_inicio}
105
+ color={theme.colors.black[25]}
106
+ size={theme.fontSizes.xs}
107
+ fontFamily={theme.fonts.inter_bold_700}
108
+ fontWeight={"700"}
109
+ lineHeight={theme.fontSizes.lg}
110
+ marginLeft={4}
111
+ />
112
+ </Box>
113
+
114
+ <Box height={50} flexStyle={{ flexDirection: "row", alignItems: "flex-end" }}>
115
+ <Box
116
+ flexStyle={{ alignItems: "center" }}
117
+ marginStyle={{ marginRight: theme.margins["2xs"] }}
118
+ >
119
+ <Typography
120
+ text={data_inicio_horario}
121
+ color={theme.colors.blue[500]}
122
+ size={theme.fontSizes.sm}
123
+ fontFamily={theme.fonts.inter_bold}
124
+ fontWeight={"700"}
125
+ lineHeight={theme.fontSizes.md}
126
+ />
127
+ <Typography
128
+ text={"INICIO"}
129
+ color={theme.colors.gray[600]}
130
+ size={theme.fontSizes["2xs"]}
131
+ fontFamily={theme.fonts.inter_medium_500}
132
+ fontWeight={"500"}
133
+ lineHeight={theme.fontSizes.xs}
134
+ marginTop={4}
135
+ />
136
+ </Box>
137
+
138
+ <Box
139
+ flexStyle={{ alignItems: "center" }}
140
+ marginStyle={{ marginRight: theme.margins["2xs"] }}
141
+ >
142
+ <Typography
143
+ text={duracao}
144
+ color={theme.colors.blue[500]}
145
+ size={theme.fontSizes.sm}
146
+ fontFamily={theme.fonts.inter_bold}
147
+ fontWeight={"700"}
148
+ lineHeight={theme.fontSizes.md}
149
+ />
150
+ <Typography
151
+ text={"DURAÇÃO"}
152
+ color={theme.colors.gray[600]}
153
+ size={theme.fontSizes["2xs"]}
154
+ fontFamily={theme.fonts.inter_medium_500}
155
+ fontWeight={"500"}
156
+ lineHeight={theme.fontSizes.xs}
157
+ marginTop={4}
158
+ />
159
+ </Box>
160
+ </Box>
161
+ </Box>
162
+ </Box>
163
+ );
164
+ };
165
+
166
+ /**
167
+ * EXPORTS
168
+ */
169
+ export { ActivitiesProgress };
@@ -1,41 +1,61 @@
1
- /**
2
- * IMPORTS
3
- */
4
-
5
- import { type ViewProps } from "react-native";
6
- /**
7
- * INTERFACE
8
- */
9
- import { IGlobalCss } from "../../styles/global/interface";
10
-
11
- interface IActivitiesProgress extends ViewProps, IGlobalCss {
12
- /**
13
- * Data de fim da atividade
14
- */
15
- data_fim?: string;
16
-
17
- /**
18
- * Duração da atividade
19
- */
20
- duracao?: string;
21
-
22
- /**
23
- * Horário de início da atividade
24
- */
25
- data_inicio?: string;
26
-
27
- /**
28
- * Título/label da atividade
29
- */
30
- titleLabel?: string;
31
-
32
- /**
33
- * Situação da atividade
34
- */
35
- situation: boolean;
36
- }
37
-
38
- /**
39
- * EXPORT
40
- */
41
- export type { IActivitiesProgress };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+
5
+ import { type ViewProps } from "react-native";
6
+ /**
7
+ * INTERFACE
8
+ */
9
+ import { IGlobalCss } from "../../styles/global/interface";
10
+
11
+ interface IActivitiesProgress extends ViewProps, IGlobalCss {
12
+ /**
13
+ * Data de fim da atividade
14
+ */
15
+ data_inicio_horario: string;
16
+
17
+ /**
18
+ * Duração da atividade
19
+ */
20
+ duracao: string;
21
+
22
+ /**
23
+ * Horário de início da atividade
24
+ */
25
+ data_inicio: string;
26
+
27
+ /**
28
+ * Título/label da atividade
29
+ */
30
+ titleLabel: string;
31
+
32
+ /**
33
+ * criado offiline conectado
34
+ */
35
+ criado_ofiline: boolean;
36
+
37
+ /**
38
+ * tipo da atividade (trabalho | descanso)
39
+ */
40
+ tipo_atividade: string;
41
+
42
+ /**
43
+ * tipo da atividade por referencia como (descanso| operacao_veiculo)
44
+ */
45
+ referencia:
46
+ | "operacao_veiculo"
47
+ | "manutencao"
48
+ | "aguardando_carga"
49
+ | "disposicao_veiculo_parado"
50
+ | "aguardando_descarga"
51
+ | "descanso"
52
+ | "repouso_semanal"
53
+ | "repouso_noturno"
54
+ | "refeicao"
55
+ | "ferias";
56
+ }
57
+
58
+ /**
59
+ * EXPORT
60
+ */
61
+ export type { IActivitiesProgress };