react-native-exp-fig 0.1.8 → 0.1.10
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.
- package/lib/commonjs/common/icons-svg/check-box/index.js +6 -6
- package/lib/commonjs/common/icons-svg/constants/index.js +4 -4
- package/lib/commonjs/common/icons-svg/index.js +10 -7
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/components/card-work-session/index.js +35 -3
- package/lib/commonjs/components/card-work-session/index.js.map +1 -1
- package/lib/commonjs/components/check-box/index.js +6 -6
- package/lib/commonjs/components/coil/index.js +14 -8
- package/lib/commonjs/components/coil/index.js.map +1 -1
- package/lib/commonjs/components/header-profile/index.js +6 -6
- package/lib/commonjs/stories/card-work-session/card-work-session.stories.js +18 -3
- package/lib/commonjs/stories/card-work-session/card-work-session.stories.js.map +1 -1
- package/lib/commonjs/stories/coil/coil.stories.js +6 -5
- package/lib/commonjs/stories/coil/coil.stories.js.map +1 -1
- package/lib/commonjs/styles/theme/theme.js +1 -0
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/module/common/icons-svg/check-box/index.js +6 -6
- package/lib/module/common/icons-svg/constants/index.js +4 -4
- package/lib/module/common/icons-svg/index.js +10 -7
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/components/card-work-session/index.js +35 -3
- package/lib/module/components/card-work-session/index.js.map +1 -1
- package/lib/module/components/check-box/index.js +6 -6
- package/lib/module/components/coil/index.js +14 -8
- package/lib/module/components/coil/index.js.map +1 -1
- package/lib/module/components/header-profile/index.js +6 -6
- package/lib/module/stories/card-work-session/card-work-session.stories.js +17 -2
- package/lib/module/stories/card-work-session/card-work-session.stories.js.map +1 -1
- package/lib/module/stories/coil/coil.stories.js +6 -5
- package/lib/module/stories/coil/coil.stories.js.map +1 -1
- package/lib/module/styles/theme/theme.js +1 -0
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-work-session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/coil/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/card-work-session/card-work-session.stories.d.ts +1 -0
- package/lib/typescript/commonjs/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/coil/coil.stories.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/theme/theme.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-work-session/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/coil/index.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/card-work-session/card-work-session.stories.d.ts +1 -0
- package/lib/typescript/module/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/coil/coil.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/module/src/styles/theme/theme.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/common/icons-svg/agent/index.tsx +40 -0
- package/src/common/icons-svg/bed/index.tsx +41 -0
- package/src/common/icons-svg/car/index.tsx +29 -0
- package/src/common/icons-svg/check-box/index.tsx +28 -28
- package/src/common/icons-svg/check-outline/index.tsx +42 -0
- package/src/common/icons-svg/coffee/index.tsx +43 -0
- package/src/common/icons-svg/constants/index.ts +8 -0
- package/src/common/icons-svg/index.tsx +57 -5
- package/src/common/icons-svg/pencil/index.tsx +32 -0
- package/src/common/icons-svg/refresh-ccw-dot/index.tsx +32 -0
- package/src/common/icons-svg/truck-activity/index.tsx +29 -0
- package/src/components/activities-daily/index.tsx +116 -0
- package/src/components/activities-daily/interface.d.ts +22 -0
- package/src/components/activities-progress/index.tsx +162 -0
- package/src/components/activities-progress/interface.d.ts +41 -0
- package/src/components/avatar-profile/index.tsx +95 -0
- package/src/components/avatar-profile/interface.d.ts +39 -0
- package/src/components/card-history/index.tsx +149 -150
- package/src/components/card-loading/index.tsx +16 -1
- package/src/components/card-work-session/index.tsx +187 -161
- package/src/components/card-work-session/interface.d.ts +5 -0
- package/src/components/check-box/index.tsx +22 -53
- package/src/components/check-box/interface.d.ts +31 -27
- package/src/components/coil/index.tsx +103 -90
- package/src/components/coil/interface.d.ts +26 -26
- package/src/components/filter-date-selector/index.tsx +101 -89
- package/src/components/header-profile/index.tsx +132 -132
- package/src/components/history-details/index.tsx +100 -0
- package/src/components/history-details/interface.d.ts +18 -0
- package/src/components/image-capture-with-remove/index.tsx +8 -2
- package/src/components/image-capture-with-remove/interface.d.ts +3 -0
- package/src/components/notification-loading/index.tsx +18 -7
- package/src/components/notification-loading/interface.d.ts +4 -0
- package/src/components/profile-menu-option/index.tsx +65 -0
- package/src/components/profile-menu-option/interface.d.ts +42 -0
- package/src/components/step-indicator/index.tsx +164 -164
- package/src/components/step-indicator/interface.d.ts +34 -34
- package/src/components/user-profile/index.tsx +58 -70
- package/src/index.ts +42 -37
- package/src/stories/activities-daily/activities-daily.stories.tsx +40 -0
- package/src/stories/activities-progress/activities-progress.stories.tsx +61 -0
- package/src/stories/avatar-profile/avatar-profile.stories.tsx +32 -0
- package/src/stories/card-loading/card-loading.stories.tsx +2 -2
- package/src/stories/card-work-session/card-work-session.stories.tsx +16 -1
- package/src/stories/check-box/check-box.stories.tsx +81 -83
- package/src/stories/coil/coil.stories.tsx +98 -74
- package/src/stories/filter-date-selector/filter-date-selector.stories.tsx +122 -93
- package/src/stories/header-profile/header-profile.stories.tsx +103 -103
- package/src/stories/history-details/history-details.stories.tsx +36 -0
- package/src/stories/image-capture-with-remove/image-capture-with-remove.stories.tsx +10 -0
- package/src/stories/notification-loading/notification-loading.stories.tsx +15 -0
- package/src/stories/profile-menu-option/profile-menu-option.stories.tsx +70 -0
- package/src/stories/step-indicator/step-indicator.stories.tsx +124 -116
- package/src/styles/global/interface.d.ts +10 -0
- package/src/styles/theme/theme.ts +3 -0
- package/src/utils/format-data/index.ts +66 -40
- package/src/utils/status-color/return-color.ts +12 -4
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { Dimensions, TouchableOpacity } from "react-native";
|
|
6
|
-
|
|
7
|
-
// components
|
|
8
|
-
import { Box } from "../box";
|
|
9
|
-
import { Typography } from "../typography";
|
|
10
|
-
|
|
11
|
-
// typings
|
|
12
|
-
import { IHeaderProps } from "./interface";
|
|
13
|
-
|
|
14
|
-
// commons
|
|
15
|
-
import { Icons } from "../../common/icons-svg";
|
|
16
|
-
|
|
17
|
-
// styles
|
|
18
|
-
import { theme } from "../../styles/theme/theme";
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Componente Header para a interação do usuário com ui.
|
|
22
|
-
*/
|
|
23
|
-
const Header: React.FC<IHeaderProps> = ({
|
|
24
|
-
title,
|
|
25
|
-
color,
|
|
26
|
-
testID,
|
|
27
|
-
arrow,
|
|
28
|
-
// propsNav,
|
|
29
|
-
permission,
|
|
30
|
-
bluetoothIsConnected,
|
|
31
|
-
isInternetReachable,
|
|
32
|
-
handleNavigation,
|
|
33
|
-
backgroundColor,
|
|
34
|
-
isBluetooth = false,
|
|
35
|
-
}) => {
|
|
36
|
-
const { width: widthScreen } = Dimensions.get("window");
|
|
37
|
-
const isMobile = widthScreen < 768;
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<Box
|
|
41
|
-
testID={testID}
|
|
42
|
-
width={"100%"}
|
|
43
|
-
height={45}
|
|
44
|
-
backgroundColor={backgroundColor ?? theme.colors.blue[400]}
|
|
45
|
-
flexStyle={{ flexDirection: "row", justifyContent: "space-between", alignItems: "center" }}
|
|
46
|
-
>
|
|
47
|
-
<Box
|
|
48
|
-
width={"10%"}
|
|
49
|
-
height={45}
|
|
50
|
-
flexStyle={{ flexDirection: "column", justifyContent: "center", alignItems: "flex-start" }}
|
|
51
|
-
paddingStyle={{ paddingLeft: theme.paddings.md }}
|
|
52
|
-
>
|
|
53
|
-
{arrow && title !== "Login" && (
|
|
54
|
-
<TouchableOpacity
|
|
55
|
-
disabled={!arrow}
|
|
56
|
-
onPress={handleNavigation}
|
|
57
|
-
style={{
|
|
58
|
-
width: 50,
|
|
59
|
-
height: 45,
|
|
60
|
-
flexDirection: "column",
|
|
61
|
-
alignItems: "flex-start",
|
|
62
|
-
justifyContent: "center",
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
{title === "Controle de Jornada" || title === "Controle de Carregamento" ? (
|
|
66
|
-
<>
|
|
67
|
-
<Icons icon="LIST" color="#fff" />
|
|
68
|
-
<Box marginStyle={{ marginBottom: 8 }} />
|
|
69
|
-
</>
|
|
70
|
-
) : (
|
|
71
|
-
arrow && <Icons icon="ARROW_LEFT" />
|
|
72
|
-
)}
|
|
73
|
-
</TouchableOpacity>
|
|
74
|
-
)}
|
|
75
|
-
</Box>
|
|
76
|
-
|
|
77
|
-
<Box
|
|
78
|
-
height={45}
|
|
79
|
-
flexStyle={{
|
|
80
|
-
flexDirection: "row",
|
|
81
|
-
justifyContent: "center",
|
|
82
|
-
alignItems: "center",
|
|
83
|
-
flex: 0.9,
|
|
84
|
-
}}
|
|
85
|
-
>
|
|
86
|
-
<Typography
|
|
87
|
-
text={title ? title : "Login"}
|
|
88
|
-
size={15.4}
|
|
89
|
-
fontFamily={theme.fonts.inter_bold_700}
|
|
90
|
-
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
91
|
-
fontWeight="700"
|
|
92
|
-
align="center"
|
|
93
|
-
lineHeight={theme.fontSizes.lg}
|
|
94
|
-
letterSpacing={"regular"}
|
|
95
|
-
marginLeft={theme.margins["2xl"]}
|
|
96
|
-
/>
|
|
97
|
-
</Box>
|
|
98
|
-
|
|
99
|
-
<Box
|
|
100
|
-
marginStyle={{ marginRight: isMobile ? 10 : 60 }}
|
|
101
|
-
borderStyled={{ borderRadius: 10 }}
|
|
102
|
-
width={50}
|
|
103
|
-
height={24}
|
|
104
|
-
>
|
|
105
|
-
{permission ? (
|
|
106
|
-
<Box marginStyle={{ marginTop: 2 }} />
|
|
107
|
-
) : (
|
|
108
|
-
<Box
|
|
109
|
-
marginStyle={{ marginTop: 2 }}
|
|
110
|
-
flexStyle={{ flexDirection: "row", justifyContent: "flex-end" }}
|
|
111
|
-
>
|
|
112
|
-
{isBluetooth && (
|
|
113
|
-
<Icons
|
|
114
|
-
icon={bluetoothIsConnected ? "BLUETOOTH_CONNECTED" : "BLUETOOTH"}
|
|
115
|
-
color={bluetoothIsConnected ? theme.colors.green[400] : theme.colors.red[900]}
|
|
116
|
-
/>
|
|
117
|
-
)}
|
|
118
|
-
<Icons
|
|
119
|
-
icon={isInternetReachable ? "WIFI_HIGH" : "WIFI_X"}
|
|
120
|
-
color={isInternetReachable ? theme.colors.orange[150] : theme.colors.red[800]}
|
|
121
|
-
/>
|
|
122
|
-
</Box>
|
|
123
|
-
)}
|
|
124
|
-
</Box>
|
|
125
|
-
</Box>
|
|
126
|
-
);
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* EXPORTS
|
|
131
|
-
*/
|
|
132
|
-
export { Header };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Dimensions, TouchableOpacity } from "react-native";
|
|
6
|
+
|
|
7
|
+
// components
|
|
8
|
+
import { Box } from "../box";
|
|
9
|
+
import { Typography } from "../typography";
|
|
10
|
+
|
|
11
|
+
// typings
|
|
12
|
+
import { IHeaderProps } from "./interface";
|
|
13
|
+
|
|
14
|
+
// commons
|
|
15
|
+
import { Icons } from "../../common/icons-svg";
|
|
16
|
+
|
|
17
|
+
// styles
|
|
18
|
+
import { theme } from "../../styles/theme/theme";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Componente Header para a interação do usuário com ui.
|
|
22
|
+
*/
|
|
23
|
+
const Header: React.FC<IHeaderProps> = ({
|
|
24
|
+
title,
|
|
25
|
+
color,
|
|
26
|
+
testID,
|
|
27
|
+
arrow,
|
|
28
|
+
// propsNav,
|
|
29
|
+
permission,
|
|
30
|
+
bluetoothIsConnected,
|
|
31
|
+
isInternetReachable,
|
|
32
|
+
handleNavigation,
|
|
33
|
+
backgroundColor,
|
|
34
|
+
isBluetooth = false,
|
|
35
|
+
}) => {
|
|
36
|
+
const { width: widthScreen } = Dimensions.get("window");
|
|
37
|
+
const isMobile = widthScreen < 768;
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Box
|
|
41
|
+
testID={testID}
|
|
42
|
+
width={"100%"}
|
|
43
|
+
height={45}
|
|
44
|
+
backgroundColor={backgroundColor ?? theme.colors.blue[400]}
|
|
45
|
+
flexStyle={{ flexDirection: "row", justifyContent: "space-between", alignItems: "center" }}
|
|
46
|
+
>
|
|
47
|
+
<Box
|
|
48
|
+
width={"10%"}
|
|
49
|
+
height={45}
|
|
50
|
+
flexStyle={{ flexDirection: "column", justifyContent: "center", alignItems: "flex-start" }}
|
|
51
|
+
paddingStyle={{ paddingLeft: theme.paddings.md }}
|
|
52
|
+
>
|
|
53
|
+
{arrow && title !== "Login" && (
|
|
54
|
+
<TouchableOpacity
|
|
55
|
+
disabled={!arrow}
|
|
56
|
+
onPress={handleNavigation}
|
|
57
|
+
style={{
|
|
58
|
+
width: 50,
|
|
59
|
+
height: 45,
|
|
60
|
+
flexDirection: "column",
|
|
61
|
+
alignItems: "flex-start",
|
|
62
|
+
justifyContent: "center",
|
|
63
|
+
}}
|
|
64
|
+
>
|
|
65
|
+
{title === "Controle de Jornada" || title === "Controle de Carregamento" ? (
|
|
66
|
+
<>
|
|
67
|
+
<Icons icon="LIST" color="#fff" />
|
|
68
|
+
<Box marginStyle={{ marginBottom: 8 }} />
|
|
69
|
+
</>
|
|
70
|
+
) : (
|
|
71
|
+
arrow && <Icons icon="ARROW_LEFT" />
|
|
72
|
+
)}
|
|
73
|
+
</TouchableOpacity>
|
|
74
|
+
)}
|
|
75
|
+
</Box>
|
|
76
|
+
|
|
77
|
+
<Box
|
|
78
|
+
height={45}
|
|
79
|
+
flexStyle={{
|
|
80
|
+
flexDirection: "row",
|
|
81
|
+
justifyContent: "center",
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
flex: 0.9,
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
<Typography
|
|
87
|
+
text={title ? title : "Login"}
|
|
88
|
+
size={15.4}
|
|
89
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
90
|
+
color={color?.colorText ?? theme.colors.neutral[25]}
|
|
91
|
+
fontWeight="700"
|
|
92
|
+
align="center"
|
|
93
|
+
lineHeight={theme.fontSizes.lg}
|
|
94
|
+
letterSpacing={"regular"}
|
|
95
|
+
marginLeft={theme.margins["2xl"]}
|
|
96
|
+
/>
|
|
97
|
+
</Box>
|
|
98
|
+
|
|
99
|
+
<Box
|
|
100
|
+
marginStyle={{ marginRight: isMobile ? 10 : 60 }}
|
|
101
|
+
borderStyled={{ borderRadius: 10 }}
|
|
102
|
+
width={50}
|
|
103
|
+
height={24}
|
|
104
|
+
>
|
|
105
|
+
{permission ? (
|
|
106
|
+
<Box marginStyle={{ marginTop: 2 }} />
|
|
107
|
+
) : (
|
|
108
|
+
<Box
|
|
109
|
+
marginStyle={{ marginTop: 2 }}
|
|
110
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-end" }}
|
|
111
|
+
>
|
|
112
|
+
{isBluetooth && (
|
|
113
|
+
<Icons
|
|
114
|
+
icon={bluetoothIsConnected ? "BLUETOOTH_CONNECTED" : "BLUETOOTH"}
|
|
115
|
+
color={bluetoothIsConnected ? theme.colors.green[400] : theme.colors.red[900]}
|
|
116
|
+
/>
|
|
117
|
+
)}
|
|
118
|
+
<Icons
|
|
119
|
+
icon={isInternetReachable ? "WIFI_HIGH" : "WIFI_X"}
|
|
120
|
+
color={isInternetReachable ? theme.colors.orange[150] : theme.colors.red[800]}
|
|
121
|
+
/>
|
|
122
|
+
</Box>
|
|
123
|
+
)}
|
|
124
|
+
</Box>
|
|
125
|
+
</Box>
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* EXPORTS
|
|
131
|
+
*/
|
|
132
|
+
export { Header };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
// components
|
|
7
|
+
import { Box } from "../box";
|
|
8
|
+
import { Typography } from "../typography";
|
|
9
|
+
|
|
10
|
+
// typings
|
|
11
|
+
import { IHistoryDetails } from "./interface";
|
|
12
|
+
|
|
13
|
+
// styles
|
|
14
|
+
import { theme } from "../../styles/theme/theme";
|
|
15
|
+
import { formatDate } from "../../utils/format-data";
|
|
16
|
+
|
|
17
|
+
const HistoryDetails: React.FC<IHistoryDetails> = ({
|
|
18
|
+
numero = "01020304050607",
|
|
19
|
+
local = "Doca 1, Pátio 02 - Usimais (Ipatinga)",
|
|
20
|
+
date = "24/03/2025",
|
|
21
|
+
duracao = "00:30",
|
|
22
|
+
}) => {
|
|
23
|
+
return (
|
|
24
|
+
<Box width="100%" borderStyled={{ borderRadius: 8 }} backgroundColor={theme.colors.blue[400]}>
|
|
25
|
+
<Box
|
|
26
|
+
flexStyle={{
|
|
27
|
+
flexDirection: "column",
|
|
28
|
+
justifyContent: "flex-start",
|
|
29
|
+
alignItems: "flex-start",
|
|
30
|
+
}}
|
|
31
|
+
paddingStyle={{ padding: theme.paddings.xs }}
|
|
32
|
+
>
|
|
33
|
+
<Typography
|
|
34
|
+
text={`Carregamento - #${numero}`}
|
|
35
|
+
size={theme.fontSizes.sm}
|
|
36
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
37
|
+
fontWeight="600"
|
|
38
|
+
color={theme.colors.neutral[25]}
|
|
39
|
+
lineHeight={theme.fontSizes.xl}
|
|
40
|
+
letterSpacing={"regular"}
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
<Typography
|
|
44
|
+
text={local}
|
|
45
|
+
color={theme.colors.neutral[25]}
|
|
46
|
+
size={theme.fontSizes.xs}
|
|
47
|
+
lineHeight={theme.fontSizes.lg}
|
|
48
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
49
|
+
letterSpacing={"regular"}
|
|
50
|
+
numberOfLines={1}
|
|
51
|
+
/>
|
|
52
|
+
<Typography
|
|
53
|
+
text={`Data carregamento: ${formatDate(new Date(date))}`}
|
|
54
|
+
color={theme.colors.neutral[25]}
|
|
55
|
+
size={theme.fontSizes.xs}
|
|
56
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
57
|
+
lineHeight={theme.fontSizes.lg}
|
|
58
|
+
letterSpacing={"regular"}
|
|
59
|
+
numberOfLines={1}
|
|
60
|
+
/>
|
|
61
|
+
</Box>
|
|
62
|
+
|
|
63
|
+
<Box height={1} backgroundColor={theme.colors.gray[950]} />
|
|
64
|
+
|
|
65
|
+
<Box
|
|
66
|
+
flexStyle={{
|
|
67
|
+
flexDirection: "row",
|
|
68
|
+
justifyContent: "space-between",
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
}}
|
|
71
|
+
paddingStyle={{ padding: theme.paddings.xs }}
|
|
72
|
+
>
|
|
73
|
+
<Typography
|
|
74
|
+
text={"DURAÇÃO:"}
|
|
75
|
+
color={theme.colors.neutral[25]}
|
|
76
|
+
size={24}
|
|
77
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
78
|
+
fontWeight="400"
|
|
79
|
+
lineHeight={theme.fontSizes["3xl"]}
|
|
80
|
+
letterSpacing={"regular"}
|
|
81
|
+
/>
|
|
82
|
+
<Typography
|
|
83
|
+
text={duracao}
|
|
84
|
+
color={theme.colors.neutral[25]}
|
|
85
|
+
size={26}
|
|
86
|
+
align="left"
|
|
87
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
88
|
+
fontWeight="500"
|
|
89
|
+
lineHeight={theme.fontSizes["3xl"]}
|
|
90
|
+
letterSpacing={"regular"}
|
|
91
|
+
/>
|
|
92
|
+
</Box>
|
|
93
|
+
</Box>
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* EXPORTS
|
|
99
|
+
*/
|
|
100
|
+
export { HistoryDetails };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
type IHistoryDetails = {
|
|
5
|
+
/**número do carregamento */
|
|
6
|
+
numero: string;
|
|
7
|
+
/**local onde vai ser o carregamento */
|
|
8
|
+
local: string;
|
|
9
|
+
/**data de quando o carregamento vai ser realizado */
|
|
10
|
+
date: string;
|
|
11
|
+
/**duração para o carregamento */
|
|
12
|
+
duracao: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* EXPORTS
|
|
17
|
+
*/
|
|
18
|
+
export { IHistoryDetails };
|
|
@@ -16,6 +16,9 @@ import { IImageCaptureWithRemoveProps } from "./interface";
|
|
|
16
16
|
// styles
|
|
17
17
|
import { theme } from "../../styles/theme/theme";
|
|
18
18
|
|
|
19
|
+
// utils
|
|
20
|
+
import { getBorderColor } from "../../utils/status-color/return-color";
|
|
21
|
+
|
|
19
22
|
/**
|
|
20
23
|
*
|
|
21
24
|
* Componente ImageCaptureWithRemove para a interação do usuário com ui.
|
|
@@ -26,7 +29,10 @@ const ImageCaptureWithRemove: React.FC<IImageCaptureWithRemoveProps> = ({
|
|
|
26
29
|
foto = null,
|
|
27
30
|
handleTakePhoto,
|
|
28
31
|
onRemove,
|
|
32
|
+
status,
|
|
29
33
|
}: IImageCaptureWithRemoveProps) => {
|
|
34
|
+
const statusColor = status === "Cancelado" || status === "Pendente";
|
|
35
|
+
|
|
30
36
|
return (
|
|
31
37
|
<TouchableOpacity
|
|
32
38
|
testID="image-capture-touchable"
|
|
@@ -41,9 +47,9 @@ const ImageCaptureWithRemove: React.FC<IImageCaptureWithRemoveProps> = ({
|
|
|
41
47
|
flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }}
|
|
42
48
|
testID="plus-icon-box"
|
|
43
49
|
borderStyled={{
|
|
44
|
-
borderWidth:
|
|
50
|
+
borderWidth: statusColor ? theme.borderWidths.thick : theme.borderWidths.thin,
|
|
45
51
|
borderRadius: theme.fontSizes.md,
|
|
46
|
-
borderColor: theme.colors.blue[400],
|
|
52
|
+
borderColor: statusColor ? getBorderColor(status) : theme.colors.blue[400],
|
|
47
53
|
}}
|
|
48
54
|
>
|
|
49
55
|
{foto ? (
|
|
@@ -26,21 +26,26 @@ const NotificationLoading: React.FC<INotificationLoading> = ({
|
|
|
26
26
|
notification,
|
|
27
27
|
dataStart,
|
|
28
28
|
style,
|
|
29
|
+
readonly,
|
|
29
30
|
}) => {
|
|
30
|
-
// const truncatedText = title.length > 13 ? title.substring(0, 11) + "..." : title;
|
|
31
31
|
return (
|
|
32
|
-
<TouchableOpacity
|
|
32
|
+
<TouchableOpacity
|
|
33
|
+
activeOpacity={0.7}
|
|
34
|
+
testID={testID}
|
|
35
|
+
onPress={handleNavigation}
|
|
36
|
+
disabled={readonly}
|
|
37
|
+
>
|
|
33
38
|
<Box
|
|
34
39
|
width={"100%"}
|
|
35
40
|
flexStyle={{ flexDirection: "row", alignItems: "center" }}
|
|
36
|
-
backgroundColor={theme.colors.blue[400]}
|
|
41
|
+
backgroundColor={readonly ? theme.colors.blue[40050] : theme.colors.blue[400]}
|
|
37
42
|
borderStyled={{
|
|
38
|
-
borderWidth:
|
|
43
|
+
borderWidth: theme.borderWidths.thin,
|
|
39
44
|
borderRadius: theme.borderWidths.thick_medium,
|
|
40
|
-
borderColor: theme.colors.blue[400],
|
|
45
|
+
borderColor: readonly ? theme.colors.blue[40050] : theme.colors.blue[400],
|
|
41
46
|
}}
|
|
42
47
|
paddingStyle={{ padding: theme.paddings["2xs"] }}
|
|
43
|
-
style={
|
|
48
|
+
style={style}
|
|
44
49
|
>
|
|
45
50
|
<Box width={"9%"}>
|
|
46
51
|
<Icons icon={"BELL"} size={32} color={theme.colors.neutral[25]} />
|
|
@@ -117,7 +122,13 @@ const NotificationLoading: React.FC<INotificationLoading> = ({
|
|
|
117
122
|
marginRight={8}
|
|
118
123
|
/>
|
|
119
124
|
|
|
120
|
-
<Icons
|
|
125
|
+
<Icons
|
|
126
|
+
icon={"ELLIPSE"}
|
|
127
|
+
color={
|
|
128
|
+
readonly ? theme.colors.neutral[25] : getStatusColor(statusNotify as StatusType)
|
|
129
|
+
}
|
|
130
|
+
size={9}
|
|
131
|
+
/>
|
|
121
132
|
</Box>
|
|
122
133
|
</Box>
|
|
123
134
|
|
|
@@ -22,7 +22,11 @@ interface INotificationLoading extends ViewProps, IGlobalCss {
|
|
|
22
22
|
/**propriedade que indica o status da notificação */
|
|
23
23
|
statusNotify: string;
|
|
24
24
|
|
|
25
|
+
/**propriedade que indica a data da notificação */
|
|
25
26
|
dataStart: string | Date;
|
|
27
|
+
|
|
28
|
+
/**propriedade que indica se a notificação está lida ou não */
|
|
29
|
+
readonly?: boolean;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
/**
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TouchableOpacity } from "react-native";
|
|
3
|
+
|
|
4
|
+
// components
|
|
5
|
+
import { Box } from "../box";
|
|
6
|
+
import { Typography } from "../typography";
|
|
7
|
+
|
|
8
|
+
// icons
|
|
9
|
+
import { Icons } from "../../common/icons-svg";
|
|
10
|
+
|
|
11
|
+
// theme
|
|
12
|
+
import { theme } from "../../styles/theme/theme";
|
|
13
|
+
|
|
14
|
+
// typing
|
|
15
|
+
import { IProfileMenuOption } from "./interface";
|
|
16
|
+
|
|
17
|
+
const ProfileMenuOption: React.FC<IProfileMenuOption> = ({
|
|
18
|
+
handleNavigation,
|
|
19
|
+
icon,
|
|
20
|
+
text,
|
|
21
|
+
backgroundColor,
|
|
22
|
+
colorIcon,
|
|
23
|
+
}) => {
|
|
24
|
+
return (
|
|
25
|
+
<TouchableOpacity onPress={handleNavigation} activeOpacity={0.7}>
|
|
26
|
+
<Box
|
|
27
|
+
flexStyle={{
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
flexDirection: "row",
|
|
30
|
+
justifyContent: "space-between",
|
|
31
|
+
}}
|
|
32
|
+
width={"100%"}
|
|
33
|
+
backgroundColor={backgroundColor ?? theme.colors.blue[400]}
|
|
34
|
+
paddingStyle={{ padding: theme.paddings["2xs"] }}
|
|
35
|
+
borderStyled={{
|
|
36
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
37
|
+
borderColor: theme.colors.blue[400],
|
|
38
|
+
}}
|
|
39
|
+
marginStyle={{ marginBottom: theme.margins.xs }}
|
|
40
|
+
>
|
|
41
|
+
<Box flexStyle={{ alignItems: "center", flexDirection: "row" }}>
|
|
42
|
+
<Icons icon={icon ?? "AGENT"} color={colorIcon ?? theme.colors.neutral[25]} />
|
|
43
|
+
<Typography
|
|
44
|
+
text={text}
|
|
45
|
+
size={theme.fontSizes.sm}
|
|
46
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
47
|
+
fontWeight={"700"}
|
|
48
|
+
lineHeight={theme.fontSizes.lg}
|
|
49
|
+
color={theme.colors.neutral[25]}
|
|
50
|
+
marginLeft={theme.margins.xs}
|
|
51
|
+
/>
|
|
52
|
+
</Box>
|
|
53
|
+
<Typography
|
|
54
|
+
text="›"
|
|
55
|
+
size={theme.fontSizes["2xl"]}
|
|
56
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
57
|
+
fontWeight={"500"}
|
|
58
|
+
color={theme.colors.neutral[25]}
|
|
59
|
+
/>
|
|
60
|
+
</Box>
|
|
61
|
+
</TouchableOpacity>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export { ProfileMenuOption };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import { TouchableOpacityProps } from "react-native";
|
|
5
|
+
|
|
6
|
+
// typing
|
|
7
|
+
import { IGlobalCss } from "../../styles/global/interface";
|
|
8
|
+
|
|
9
|
+
// svg
|
|
10
|
+
import { SVG_NAME } from "../../common/icons-svg/constants";
|
|
11
|
+
|
|
12
|
+
interface IProfileMenuOption extends TouchableOpacityProps, IGlobalCss {
|
|
13
|
+
/**
|
|
14
|
+
* nome do ícone
|
|
15
|
+
*/
|
|
16
|
+
icon: keyof typeof SVG_NAME;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Propriedade texto do menu
|
|
20
|
+
*/
|
|
21
|
+
text: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* função de navegação
|
|
25
|
+
*/
|
|
26
|
+
handleNavigation: () => void;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* cor de fundo
|
|
30
|
+
*/
|
|
31
|
+
backgroundColor?: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* cor do ícone
|
|
35
|
+
*/
|
|
36
|
+
colorIcon?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* EXPORTS
|
|
41
|
+
*/
|
|
42
|
+
export { IProfileMenuOption };
|