react-native-exp-fig 0.1.40 → 0.1.42
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/@types/as-base-component.js.map +1 -1
- package/lib/commonjs/common/icons-svg/arrow-down/index.js +51 -0
- package/lib/commonjs/common/icons-svg/arrow-down/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/constants/index.js +3 -1
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/user-circle/index.js +37 -0
- package/lib/commonjs/common/icons-svg/user-circle/index.js.map +1 -0
- package/lib/commonjs/components/active-loadings-summary/index.js +88 -0
- package/lib/commonjs/components/active-loadings-summary/index.js.map +1 -0
- package/lib/commonjs/components/active-loadings-summary/interface.d.js +6 -0
- package/lib/commonjs/components/active-loadings-summary/interface.d.js.map +1 -0
- package/lib/commonjs/components/alert-critical-load/index.js +64 -0
- package/lib/commonjs/components/alert-critical-load/index.js.map +1 -0
- package/lib/commonjs/components/alert-critical-load/interface.js +6 -0
- package/lib/commonjs/components/alert-critical-load/interface.js.map +1 -0
- package/lib/commonjs/components/alert-critical-load/styles.js +40 -0
- package/lib/commonjs/components/alert-critical-load/styles.js.map +1 -0
- package/lib/commonjs/components/card-available-load/index.js +131 -0
- package/lib/commonjs/components/card-available-load/index.js.map +1 -0
- package/lib/commonjs/components/card-available-load/interface.js +6 -0
- package/lib/commonjs/components/card-available-load/interface.js.map +1 -0
- package/lib/commonjs/components/card-available-load/style.js +54 -0
- package/lib/commonjs/components/card-available-load/style.js.map +1 -0
- package/lib/commonjs/components/card-driver-data/index.js +105 -0
- package/lib/commonjs/components/card-driver-data/index.js.map +1 -0
- package/lib/commonjs/components/card-driver-data/interface.js +6 -0
- package/lib/commonjs/components/card-driver-data/interface.js.map +1 -0
- package/lib/commonjs/components/card-driver-data/style.js +55 -0
- package/lib/commonjs/components/card-driver-data/style.js.map +1 -0
- package/lib/commonjs/components/card-loading/index.js +9 -9
- package/lib/commonjs/components/card-loading/index.js.map +1 -1
- package/lib/commonjs/components/card-loading/interface.d.js.map +1 -1
- package/lib/commonjs/components/document-carga-info/index.js +98 -0
- package/lib/commonjs/components/document-carga-info/index.js.map +1 -0
- package/lib/commonjs/components/document-carga-info/interface.js +2 -0
- package/lib/commonjs/components/document-carga-info/interface.js.map +1 -0
- package/lib/commonjs/components/document-carga-info/styles.js +64 -0
- package/lib/commonjs/components/document-carga-info/styles.js.map +1 -0
- package/lib/commonjs/components/driver-journey-info/index.js +141 -0
- package/lib/commonjs/components/driver-journey-info/index.js.map +1 -0
- package/lib/commonjs/components/driver-journey-info/interface.js +6 -0
- package/lib/commonjs/components/driver-journey-info/interface.js.map +1 -0
- package/lib/commonjs/components/driver-journey-info/style.js +55 -0
- package/lib/commonjs/components/driver-journey-info/style.js.map +1 -0
- package/lib/commonjs/components/user-profile/index.js +2 -1
- package/lib/commonjs/components/user-profile/index.js.map +1 -1
- package/lib/commonjs/components/user-profile/interface.d.js.map +1 -1
- package/lib/commonjs/index.js +42 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/active-loadings-summary/active-loadings-summary.stories.js +63 -0
- package/lib/commonjs/stories/active-loadings-summary/active-loadings-summary.stories.js.map +1 -0
- package/lib/commonjs/stories/alert-critical-load/alert-critical-load.stories.js +58 -0
- package/lib/commonjs/stories/alert-critical-load/alert-critical-load.stories.js.map +1 -0
- package/lib/commonjs/stories/card-available-load/card-available-load.stories.js +94 -0
- package/lib/commonjs/stories/card-available-load/card-available-load.stories.js.map +1 -0
- package/lib/commonjs/stories/card-driver-data/card-driver-data.stories.js +81 -0
- package/lib/commonjs/stories/card-driver-data/card-driver-data.stories.js.map +1 -0
- package/lib/commonjs/stories/document-carga-info/document-carga-info.stories.js +76 -0
- package/lib/commonjs/stories/document-carga-info/document-carga-info.stories.js.map +1 -0
- package/lib/commonjs/stories/driver-journey-info/driver-journey-info.stories.js +87 -0
- package/lib/commonjs/stories/driver-journey-info/driver-journey-info.stories.js.map +1 -0
- package/lib/commonjs/styles/theme/theme.js +5 -4
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/commonjs/utils/status-color/return-color.js +4 -2
- package/lib/commonjs/utils/status-color/return-color.js.map +1 -1
- package/lib/module/@types/as-base-component.js.map +1 -1
- package/lib/module/common/icons-svg/arrow-down/index.js +45 -0
- package/lib/module/common/icons-svg/arrow-down/index.js.map +1 -0
- package/lib/module/common/icons-svg/constants/index.js +3 -1
- package/lib/module/common/icons-svg/constants/index.js.map +1 -1
- package/lib/module/common/icons-svg/user-circle/index.js +29 -0
- package/lib/module/common/icons-svg/user-circle/index.js.map +1 -0
- package/lib/module/components/active-loadings-summary/index.js +81 -0
- package/lib/module/components/active-loadings-summary/index.js.map +1 -0
- package/lib/module/components/active-loadings-summary/interface.d.js +2 -0
- package/lib/module/components/active-loadings-summary/interface.d.js.map +1 -0
- package/lib/module/components/alert-critical-load/index.js +63 -0
- package/lib/module/components/alert-critical-load/index.js.map +1 -0
- package/lib/module/components/alert-critical-load/interface.js +2 -0
- package/lib/module/components/alert-critical-load/interface.js.map +1 -0
- package/lib/module/components/alert-critical-load/styles.js +34 -0
- package/lib/module/components/alert-critical-load/styles.js.map +1 -0
- package/lib/module/components/card-available-load/index.js +130 -0
- package/lib/module/components/card-available-load/index.js.map +1 -0
- package/lib/module/components/card-available-load/interface.js +2 -0
- package/lib/module/components/card-available-load/interface.js.map +1 -0
- package/lib/module/components/card-available-load/style.js +49 -0
- package/lib/module/components/card-available-load/style.js.map +1 -0
- package/lib/module/components/card-driver-data/index.js +104 -0
- package/lib/module/components/card-driver-data/index.js.map +1 -0
- package/lib/module/components/card-driver-data/interface.js +2 -0
- package/lib/module/components/card-driver-data/interface.js.map +1 -0
- package/lib/module/components/card-driver-data/style.js +50 -0
- package/lib/module/components/card-driver-data/style.js.map +1 -0
- package/lib/module/components/card-loading/index.js +9 -9
- package/lib/module/components/card-loading/index.js.map +1 -1
- package/lib/module/components/card-loading/interface.d.js.map +1 -1
- package/lib/module/components/document-carga-info/index.js +97 -0
- package/lib/module/components/document-carga-info/index.js.map +1 -0
- package/lib/module/components/document-carga-info/interface.js +2 -0
- package/lib/module/components/document-carga-info/interface.js.map +1 -0
- package/lib/module/components/document-carga-info/styles.js +60 -0
- package/lib/module/components/document-carga-info/styles.js.map +1 -0
- package/lib/module/components/driver-journey-info/index.js +140 -0
- package/lib/module/components/driver-journey-info/index.js.map +1 -0
- package/lib/module/components/driver-journey-info/interface.js +2 -0
- package/lib/module/components/driver-journey-info/interface.js.map +1 -0
- package/lib/module/components/driver-journey-info/style.js +50 -0
- package/lib/module/components/driver-journey-info/style.js.map +1 -0
- package/lib/module/components/user-profile/index.js +2 -1
- package/lib/module/components/user-profile/index.js.map +1 -1
- package/lib/module/components/user-profile/interface.d.js.map +1 -1
- package/lib/module/index.js +8 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/active-loadings-summary/active-loadings-summary.stories.js +57 -0
- package/lib/module/stories/active-loadings-summary/active-loadings-summary.stories.js.map +1 -0
- package/lib/module/stories/alert-critical-load/alert-critical-load.stories.js +50 -0
- package/lib/module/stories/alert-critical-load/alert-critical-load.stories.js.map +1 -0
- package/lib/module/stories/card-available-load/card-available-load.stories.js +86 -0
- package/lib/module/stories/card-available-load/card-available-load.stories.js.map +1 -0
- package/lib/module/stories/card-driver-data/card-driver-data.stories.js +73 -0
- package/lib/module/stories/card-driver-data/card-driver-data.stories.js.map +1 -0
- package/lib/module/stories/document-carga-info/document-carga-info.stories.js +68 -0
- package/lib/module/stories/document-carga-info/document-carga-info.stories.js.map +1 -0
- package/lib/module/stories/driver-journey-info/driver-journey-info.stories.js +79 -0
- package/lib/module/stories/driver-journey-info/driver-journey-info.stories.js.map +1 -0
- package/lib/module/styles/theme/theme.js +5 -4
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/module/utils/status-color/return-color.js +4 -2
- package/lib/module/utils/status-color/return-color.js.map +1 -1
- package/lib/typescript/src/common/icons-svg/arrow-down/index.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/constants/index.d.ts +2 -0
- package/lib/typescript/src/common/icons-svg/user-circle/index.d.ts +10 -0
- package/lib/typescript/src/components/active-loadings-summary/index.d.ts +10 -0
- package/lib/typescript/src/components/alert-critical-load/index.d.ts +11 -0
- package/lib/typescript/src/components/alert-critical-load/interface.d.ts +9 -0
- package/lib/typescript/src/components/alert-critical-load/styles.d.ts +28 -0
- package/lib/typescript/src/components/card-available-load/index.d.ts +11 -0
- package/lib/typescript/src/components/card-available-load/interface.d.ts +30 -0
- package/lib/typescript/src/components/card-available-load/style.d.ts +8 -0
- package/lib/typescript/src/components/card-driver-data/index.d.ts +11 -0
- package/lib/typescript/src/components/card-driver-data/interface.d.ts +27 -0
- package/lib/typescript/src/components/card-driver-data/style.d.ts +8 -0
- package/lib/typescript/src/components/document-carga-info/index.d.ts +11 -0
- package/lib/typescript/src/components/document-carga-info/interface.d.ts +15 -0
- package/lib/typescript/src/components/document-carga-info/styles.d.ts +50 -0
- package/lib/typescript/src/components/driver-journey-info/index.d.ts +11 -0
- package/lib/typescript/src/components/driver-journey-info/interface.d.ts +28 -0
- package/lib/typescript/src/components/driver-journey-info/style.d.ts +8 -0
- package/lib/typescript/src/components/selects/select-date-and-hours/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/stories/active-loadings-summary/active-loadings-summary.stories.d.ts +8 -0
- package/lib/typescript/src/stories/alert-critical-load/alert-critical-load.stories.d.ts +9 -0
- package/lib/typescript/src/stories/card-available-load/card-available-load.stories.d.ts +10 -0
- package/lib/typescript/src/stories/card-driver-data/card-driver-data.stories.d.ts +10 -0
- package/lib/typescript/src/stories/document-carga-info/document-carga-info.stories.d.ts +10 -0
- package/lib/typescript/src/stories/driver-journey-info/driver-journey-info.stories.d.ts +10 -0
- package/lib/typescript/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/src/utils/status-color/return-color.d.ts +1 -1
- package/package.json +1 -1
- package/src/@types/as-base-component.ts +9 -9
- package/src/common/icons-svg/arrow-down/index.tsx +44 -0
- package/src/common/icons-svg/constants/index.ts +2 -0
- package/src/common/icons-svg/user-circle/index.tsx +29 -0
- package/src/components/active-loadings-summary/index.tsx +69 -0
- package/src/components/active-loadings-summary/interface.d.ts +16 -0
- package/src/components/alert-critical-load/index.tsx +83 -0
- package/src/components/alert-critical-load/interface.ts +13 -0
- package/src/components/alert-critical-load/styles.ts +35 -0
- package/src/components/card-available-load/index.tsx +163 -0
- package/src/components/card-available-load/interface.ts +36 -0
- package/src/components/card-available-load/style.ts +51 -0
- package/src/components/card-driver-data/index.tsx +139 -0
- package/src/components/card-driver-data/interface.ts +33 -0
- package/src/components/card-driver-data/style.ts +55 -0
- package/src/components/card-loading/index.tsx +276 -294
- package/src/components/card-loading/interface.d.ts +37 -37
- package/src/components/document-carga-info/index.tsx +137 -0
- package/src/components/document-carga-info/interface.ts +19 -0
- package/src/components/document-carga-info/styles.ts +65 -0
- package/src/components/driver-journey-info/index.tsx +185 -0
- package/src/components/driver-journey-info/interface.ts +36 -0
- package/src/components/driver-journey-info/style.ts +55 -0
- package/src/components/user-profile/index.tsx +32 -29
- package/src/components/user-profile/interface.d.ts +1 -0
- package/src/index.ts +56 -50
- package/src/stories/active-loadings-summary/active-loadings-summary.stories.tsx +59 -0
- package/src/stories/alert-critical-load/alert-critical-load.stories.tsx +51 -0
- package/src/stories/card-available-load/card-available-load.stories.tsx +85 -0
- package/src/stories/card-driver-data/card-driver-data.stories.tsx +73 -0
- package/src/stories/document-carga-info/document-carga-info.stories.tsx +72 -0
- package/src/stories/driver-journey-info/driver-journey-info.stories.tsx +79 -0
- package/src/styles/theme/theme.ts +192 -191
- package/src/utils/status-color/return-color.ts +36 -34
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import Svg, { Path } from "react-native-svg";
|
|
6
|
+
|
|
7
|
+
// typings
|
|
8
|
+
import { ISvgProps } from "../interface";
|
|
9
|
+
|
|
10
|
+
const SvgIconUserCircle: React.FC<ISvgProps> = ({ color, size }) => (
|
|
11
|
+
<Svg
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
width={size ?? "33"}
|
|
15
|
+
height={size ?? "33"}
|
|
16
|
+
fill="none"
|
|
17
|
+
viewBox={`0 0 ${size ?? "33"} ${size ?? "33"}`}
|
|
18
|
+
>
|
|
19
|
+
<Path
|
|
20
|
+
fill={color ?? "#393939"}
|
|
21
|
+
d="M16.25 0A16.25 16.25 0 1 0 32.5 16.25 16.267 16.267 0 0 0 16.25 0m-5 16.25a5 5 0 1 1 10 0 5 5 0 0 1-10 0M25.044 5.688l-4.452 4.453a7.475 7.475 0 0 0-8.684 0L7.456 5.688a13.72 13.72 0 0 1 17.588 0M7.456 26.813l4.452-4.454a7.475 7.475 0 0 0 8.684 0l4.452 4.453a13.724 13.724 0 0 1-17.588 0"
|
|
22
|
+
></Path>
|
|
23
|
+
</Svg>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* EXPORTS
|
|
28
|
+
*/
|
|
29
|
+
export { SvgIconUserCircle };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
// components
|
|
7
|
+
import Box from "../box";
|
|
8
|
+
import { Typography } from "../../components/typography";
|
|
9
|
+
import { Button } from "../button";
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
// styles
|
|
13
|
+
import { theme } from "../../styles/theme/theme";
|
|
14
|
+
|
|
15
|
+
// typing
|
|
16
|
+
import { IActiveLoadingsSummary } from "./interface";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Componente para ser mosrado na tela Home com a quanttidade de carregamentos iniciados + botão de visualizar todos e acessar a ttela
|
|
20
|
+
*/
|
|
21
|
+
const ActiveLoadingsSummary: React.FC<IActiveLoadingsSummary> = ({ count, onPressView }: IActiveLoadingsSummary) => {
|
|
22
|
+
return (
|
|
23
|
+
<Box
|
|
24
|
+
width={"100%"}
|
|
25
|
+
backgroundColor={theme.colors.neutral[25]}
|
|
26
|
+
borderStyled={{
|
|
27
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
28
|
+
borderWidth: theme.borderWidths.thin,
|
|
29
|
+
borderColor: theme.colors.gray[300],
|
|
30
|
+
}}
|
|
31
|
+
paddingStyle={{ padding: theme.paddings.xs }}
|
|
32
|
+
marginStyle={{ marginBottom: theme.margins.xs }}
|
|
33
|
+
flexStyle={{ flexDirection: "column", alignItems: "flex-start", justifyContent: "flex-start" }}
|
|
34
|
+
>
|
|
35
|
+
<Box width={"100%"} flexStyle={{ alignItems: "center" }}>
|
|
36
|
+
<Typography
|
|
37
|
+
text={`${count} carregamentos iniciados`}
|
|
38
|
+
size={theme.fontSizes.sm}
|
|
39
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
40
|
+
color={theme.colors.gray[500]}
|
|
41
|
+
align={"center"}
|
|
42
|
+
/>
|
|
43
|
+
</Box>
|
|
44
|
+
<Button
|
|
45
|
+
isLoading={false}
|
|
46
|
+
title="Visualizar carregamentos"
|
|
47
|
+
width='100%'
|
|
48
|
+
height={36}
|
|
49
|
+
backgroundColor={theme.colors.blue[500]}
|
|
50
|
+
flexStyle={{ alignItems: "center", justifyContent: "center" }}
|
|
51
|
+
marginStyle={{ marginTop: theme.margins.xs }}
|
|
52
|
+
buttonTextStyle={{
|
|
53
|
+
color: theme.colors.neutral[25],
|
|
54
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
55
|
+
fontSize: theme.fontSizes.xs,
|
|
56
|
+
textAlign: "center",
|
|
57
|
+
}}
|
|
58
|
+
borderStyled={{
|
|
59
|
+
borderWidth: theme.borderWidths.thin,
|
|
60
|
+
borderColor: theme.colors.blue[500],
|
|
61
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
62
|
+
}}
|
|
63
|
+
onPress={onPressView}
|
|
64
|
+
/>
|
|
65
|
+
</Box>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export { ActiveLoadingsSummary };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
interface IActiveLoadingsSummary {
|
|
6
|
+
/**propriedade que indica a quantidade de carregamentos iniciados */
|
|
7
|
+
count: number;
|
|
8
|
+
|
|
9
|
+
/**função que é chamada ao clicar no botão de visualizar carregamentos */
|
|
10
|
+
onPressView: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* EXPORTS
|
|
15
|
+
*/
|
|
16
|
+
export { IActiveLoadingsSummary };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
|
+
import {
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
View,
|
|
8
|
+
} from "react-native";
|
|
9
|
+
|
|
10
|
+
// components
|
|
11
|
+
import Box from "../box";
|
|
12
|
+
import { Typography } from "../typography";
|
|
13
|
+
|
|
14
|
+
// commons
|
|
15
|
+
import { SvgIconWarningTriangle } from "../../common/icons-svg/eclamation-triangle";
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
// typings
|
|
19
|
+
import { IAlertCriticalLoad } from "./interface";
|
|
20
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
21
|
+
|
|
22
|
+
// styles
|
|
23
|
+
import { styles } from "./styles";
|
|
24
|
+
import { theme } from "../../styles/theme/theme";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Componente AlertCriticalLoad para interação do usuário com ui.
|
|
28
|
+
*/
|
|
29
|
+
const AlertCriticalLoad = forwardRef<View, IAlertCriticalLoad>(
|
|
30
|
+
(props, ref): React.ReactElement => {
|
|
31
|
+
const {
|
|
32
|
+
message,
|
|
33
|
+
backgroundColor = "#FCEBD3",
|
|
34
|
+
handleToggle,
|
|
35
|
+
...rest
|
|
36
|
+
} = props;
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Box
|
|
40
|
+
ref={ref}
|
|
41
|
+
style={[
|
|
42
|
+
styles.container,
|
|
43
|
+
{
|
|
44
|
+
backgroundColor,
|
|
45
|
+
borderColor: theme.colors.orange[500],
|
|
46
|
+
},
|
|
47
|
+
]}
|
|
48
|
+
{...rest}
|
|
49
|
+
>
|
|
50
|
+
<TouchableOpacity
|
|
51
|
+
activeOpacity={0.7}
|
|
52
|
+
onPress={handleToggle}
|
|
53
|
+
style={styles.header}
|
|
54
|
+
>
|
|
55
|
+
<View style={styles.content}>
|
|
56
|
+
<SvgIconWarningTriangle
|
|
57
|
+
icon="WARNING_TRIANGLE"
|
|
58
|
+
size={24}
|
|
59
|
+
color={theme.colors.orange[500]}
|
|
60
|
+
/>
|
|
61
|
+
|
|
62
|
+
<Typography
|
|
63
|
+
text={message}
|
|
64
|
+
size={theme.fontSizes.sm}
|
|
65
|
+
fontFamily={theme.fonts.inter_bold}
|
|
66
|
+
color={theme.colors.red[900]}
|
|
67
|
+
style={styles.text}
|
|
68
|
+
/>
|
|
69
|
+
</View>
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
</TouchableOpacity>
|
|
73
|
+
</Box>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
AlertCriticalLoad.displayName = "AlertCriticalLoad";
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* EXPORTS
|
|
82
|
+
*/
|
|
83
|
+
export default asBaseComponent(AlertCriticalLoad);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import { StyleSheet } from "react-native";
|
|
5
|
+
|
|
6
|
+
const styles = StyleSheet.create({
|
|
7
|
+
container: {
|
|
8
|
+
borderWidth: 2,
|
|
9
|
+
borderRadius: 12,
|
|
10
|
+
padding: 16,
|
|
11
|
+
},
|
|
12
|
+
header: {
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
justifyContent: "space-between",
|
|
16
|
+
},
|
|
17
|
+
content: {
|
|
18
|
+
flexDirection: "row",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
gap: 12,
|
|
21
|
+
flex: 1,
|
|
22
|
+
},
|
|
23
|
+
text: {
|
|
24
|
+
flex: 1,
|
|
25
|
+
},
|
|
26
|
+
arrow: {
|
|
27
|
+
marginLeft: 8,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* EXPORTS
|
|
34
|
+
*/
|
|
35
|
+
export { styles }
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { forwardRef, useState } from "react";
|
|
5
|
+
import {
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
LayoutAnimation,
|
|
8
|
+
Text,
|
|
9
|
+
View,
|
|
10
|
+
} from "react-native";
|
|
11
|
+
|
|
12
|
+
// components
|
|
13
|
+
import Box from "../box";
|
|
14
|
+
import { Typography } from "../typography";
|
|
15
|
+
|
|
16
|
+
// commons / icons
|
|
17
|
+
import { SvgIconArrowOpen } from "../../common/icons-svg/arrow-down";
|
|
18
|
+
|
|
19
|
+
// typings
|
|
20
|
+
import { ICardAvailableLoad } from "./interface";
|
|
21
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
22
|
+
|
|
23
|
+
// styles
|
|
24
|
+
import { styles } from "./style";
|
|
25
|
+
import { theme } from "../../styles/theme/theme";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Componente CardAvailableLoad para interação do usuário com ui.
|
|
29
|
+
*/
|
|
30
|
+
const CardAvailableLoad = forwardRef<View, ICardAvailableLoad>(
|
|
31
|
+
(props, ref): React.ReactElement => {
|
|
32
|
+
const {
|
|
33
|
+
backgroundColor,
|
|
34
|
+
isOpen = true,
|
|
35
|
+
carregamento,
|
|
36
|
+
...rest
|
|
37
|
+
} = props;
|
|
38
|
+
|
|
39
|
+
const [isExpanded, setIsExpanded] = useState<boolean>(isOpen);
|
|
40
|
+
|
|
41
|
+
const handleToggle = (): void => {
|
|
42
|
+
LayoutAnimation.configureNext(
|
|
43
|
+
LayoutAnimation.Presets.easeInEaseOut
|
|
44
|
+
);
|
|
45
|
+
setIsExpanded((prev) => !prev);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<Box
|
|
50
|
+
ref={ref}
|
|
51
|
+
style={styles.container(backgroundColor)}
|
|
52
|
+
{...rest}
|
|
53
|
+
>
|
|
54
|
+
{/* HEADER */}
|
|
55
|
+
<TouchableOpacity
|
|
56
|
+
style={styles.header}
|
|
57
|
+
activeOpacity={0.7}
|
|
58
|
+
onPress={handleToggle}
|
|
59
|
+
>
|
|
60
|
+
<Typography
|
|
61
|
+
text="Detalhes do carregamento"
|
|
62
|
+
size={theme.fontSizes.lg}
|
|
63
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
64
|
+
color={theme.colors.neutral[25]}
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
<SvgIconArrowOpen
|
|
68
|
+
icon="ARROW_DROP_DOWN"
|
|
69
|
+
style={[
|
|
70
|
+
styles.arrow,
|
|
71
|
+
{
|
|
72
|
+
transform: [
|
|
73
|
+
{ rotate: isExpanded ? "180deg" : "0deg" },
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
]}
|
|
77
|
+
/>
|
|
78
|
+
</TouchableOpacity>
|
|
79
|
+
|
|
80
|
+
{/* CONTENT */}
|
|
81
|
+
{isExpanded && (
|
|
82
|
+
<>
|
|
83
|
+
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
84
|
+
<Typography
|
|
85
|
+
text="Carregamento -"
|
|
86
|
+
size={theme.fontSizes.sm}
|
|
87
|
+
fontFamily={theme.fonts.inter_bold}
|
|
88
|
+
color={theme.colors.neutral[300]}
|
|
89
|
+
/>
|
|
90
|
+
<Text style={styles.textOption}>
|
|
91
|
+
#{carregamento?.numero_carregamento ?? "N/A"}
|
|
92
|
+
</Text>
|
|
93
|
+
</Box>
|
|
94
|
+
|
|
95
|
+
<Box
|
|
96
|
+
flexStyle={{ flexDirection: "row", alignItems: "flex-start" }}
|
|
97
|
+
width="92%"
|
|
98
|
+
>
|
|
99
|
+
<Typography
|
|
100
|
+
text="Local:"
|
|
101
|
+
size={theme.fontSizes.sm}
|
|
102
|
+
fontFamily={theme.fonts.inter_bold}
|
|
103
|
+
lineHeight={18}
|
|
104
|
+
color={theme.colors.neutral[300]}
|
|
105
|
+
style={styles.textSpacing}
|
|
106
|
+
/>
|
|
107
|
+
<Text style={styles.textOption}>
|
|
108
|
+
{carregamento?.local ?? "N/A"}
|
|
109
|
+
</Text>
|
|
110
|
+
</Box>
|
|
111
|
+
|
|
112
|
+
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
113
|
+
<Typography
|
|
114
|
+
text="Data previsão:"
|
|
115
|
+
size={theme.fontSizes.sm}
|
|
116
|
+
fontFamily={theme.fonts.inter_bold}
|
|
117
|
+
color={theme.colors.neutral[300]}
|
|
118
|
+
style={styles.textSpacing}
|
|
119
|
+
/>
|
|
120
|
+
<Text style={styles.textOption}>
|
|
121
|
+
{carregamento?.previsao_carregamento?.replace(
|
|
122
|
+
" ",
|
|
123
|
+
" ás "
|
|
124
|
+
) ?? "N/A"}
|
|
125
|
+
</Text>
|
|
126
|
+
</Box>
|
|
127
|
+
|
|
128
|
+
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
129
|
+
<Typography
|
|
130
|
+
text="Quantidade bobina:"
|
|
131
|
+
size={theme.fontSizes.sm}
|
|
132
|
+
fontFamily={theme.fonts.inter_bold}
|
|
133
|
+
color={theme.colors.neutral[300]}
|
|
134
|
+
/>
|
|
135
|
+
<Text style={styles.textOption}>
|
|
136
|
+
{carregamento?.qtd_bobinas ?? "N/A"} BOBINAS
|
|
137
|
+
</Text>
|
|
138
|
+
</Box>
|
|
139
|
+
|
|
140
|
+
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
141
|
+
<Typography
|
|
142
|
+
text="Peso total:"
|
|
143
|
+
size={theme.fontSizes.sm}
|
|
144
|
+
fontFamily={theme.fonts.inter_bold}
|
|
145
|
+
color={theme.colors.neutral[300]}
|
|
146
|
+
/>
|
|
147
|
+
<Text style={styles.textOption}>
|
|
148
|
+
{carregamento?.peso_total_kg ?? "N/A"} KG
|
|
149
|
+
</Text>
|
|
150
|
+
</Box>
|
|
151
|
+
</>
|
|
152
|
+
)}
|
|
153
|
+
</Box>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
CardAvailableLoad.displayName = "CardAvailableLoad";
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* EXPORTS
|
|
162
|
+
*/
|
|
163
|
+
export default asBaseComponent(CardAvailableLoad);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { TextStyle, ViewStyle } from "react-native";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* STYLES
|
|
9
|
+
*/
|
|
10
|
+
interface IStyles {
|
|
11
|
+
container: (bg?: string) => ViewStyle;
|
|
12
|
+
header: ViewStyle;
|
|
13
|
+
arrow: ViewStyle;
|
|
14
|
+
textSpacing: TextStyle;
|
|
15
|
+
buttonText: TextStyle;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
interface ICardAvailableLoad {
|
|
20
|
+
isOpen?: boolean;
|
|
21
|
+
onPress: () => void;
|
|
22
|
+
backgroundColor?: string;
|
|
23
|
+
carregamento: {
|
|
24
|
+
numero_carregamento: string;
|
|
25
|
+
local: string;
|
|
26
|
+
previsao_carregamento: string;
|
|
27
|
+
qtd_bobinas: number;
|
|
28
|
+
peso_total_kg: number;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* EXPORT
|
|
35
|
+
*/
|
|
36
|
+
export type { ICardAvailableLoad, IStyles };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { StyleSheet } from "react-native";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
// typing
|
|
9
|
+
import { IStyles } from "./interface";
|
|
10
|
+
|
|
11
|
+
// styles
|
|
12
|
+
import { theme } from "../../styles/theme/theme";
|
|
13
|
+
|
|
14
|
+
const styles = StyleSheet.create<IStyles | any>({
|
|
15
|
+
container: (bg?: string) => ({
|
|
16
|
+
width: "100%",
|
|
17
|
+
padding: theme.paddings.sm,
|
|
18
|
+
backgroundColor: bg ?? theme.colors.gray[700],
|
|
19
|
+
borderRadius: 8,
|
|
20
|
+
}),
|
|
21
|
+
header: {
|
|
22
|
+
flexDirection: "row",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
justifyContent: "space-between",
|
|
25
|
+
marginBottom: theme.margins.md,
|
|
26
|
+
},
|
|
27
|
+
arrow: {
|
|
28
|
+
width: 20,
|
|
29
|
+
height: 20,
|
|
30
|
+
},
|
|
31
|
+
textSpacing: {
|
|
32
|
+
marginTop: theme.margins["2xs"],
|
|
33
|
+
marginBottom: theme.margins["2xs"],
|
|
34
|
+
},
|
|
35
|
+
buttonText: {
|
|
36
|
+
color: theme.colors.neutral[25],
|
|
37
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
38
|
+
fontSize: theme.fontSizes.md,
|
|
39
|
+
},
|
|
40
|
+
textOption: {
|
|
41
|
+
color: theme.colors.neutral[300],
|
|
42
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
43
|
+
fontSize: 12,
|
|
44
|
+
marginLeft: 4,
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* EXPORTS
|
|
50
|
+
*/
|
|
51
|
+
export { styles}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { forwardRef, useState } from "react";
|
|
5
|
+
import {
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
LayoutAnimation,
|
|
8
|
+
Text,
|
|
9
|
+
View,
|
|
10
|
+
} from "react-native";
|
|
11
|
+
|
|
12
|
+
// components
|
|
13
|
+
import Box from "../box";
|
|
14
|
+
import { Typography } from "../typography";
|
|
15
|
+
|
|
16
|
+
// commons / icons svg
|
|
17
|
+
import { SvgIconUserCircle } from "../../common/icons-svg/user-circle";
|
|
18
|
+
import { SvgIconArrowOpen } from "../../common/icons-svg/arrow-down";
|
|
19
|
+
|
|
20
|
+
// typings
|
|
21
|
+
import { IDriverJourneyInfo } from "./interface";
|
|
22
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
23
|
+
|
|
24
|
+
// styles
|
|
25
|
+
import { styles } from "./style";
|
|
26
|
+
import { theme } from "../../styles/theme/theme";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Componente CardDriverData para interação do usuário.
|
|
30
|
+
*/
|
|
31
|
+
const CardDriverData = forwardRef<View, IDriverJourneyInfo>(
|
|
32
|
+
(props, ref): React.ReactElement => {
|
|
33
|
+
const {
|
|
34
|
+
isOpen = true,
|
|
35
|
+
backgroundColor,
|
|
36
|
+
veiculo,
|
|
37
|
+
...rest
|
|
38
|
+
} = props;
|
|
39
|
+
|
|
40
|
+
const [isExpanded, setIsExpanded] = useState<boolean>(isOpen);
|
|
41
|
+
|
|
42
|
+
const handleToggle = (): void => {
|
|
43
|
+
LayoutAnimation.configureNext(
|
|
44
|
+
LayoutAnimation.Presets.easeInEaseOut
|
|
45
|
+
);
|
|
46
|
+
setIsExpanded((prev) => !prev);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<Box
|
|
51
|
+
ref={ref}
|
|
52
|
+
style={styles.container(backgroundColor)}
|
|
53
|
+
{...rest}
|
|
54
|
+
>
|
|
55
|
+
{/* HEADER */}
|
|
56
|
+
<TouchableOpacity
|
|
57
|
+
style={styles.header}
|
|
58
|
+
activeOpacity={0.7}
|
|
59
|
+
onPress={handleToggle}
|
|
60
|
+
>
|
|
61
|
+
<SvgIconUserCircle
|
|
62
|
+
icon="USER_CIRCLE"
|
|
63
|
+
color="#393939"
|
|
64
|
+
size={32}
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
<View style={{ width: "76%" }}>
|
|
68
|
+
<Typography
|
|
69
|
+
text="Dados do veículo a ser carregado"
|
|
70
|
+
size={theme.fontSizes.lg}
|
|
71
|
+
fontFamily={theme.fonts.inter_bold}
|
|
72
|
+
color={theme.colors.black[25]}
|
|
73
|
+
/>
|
|
74
|
+
</View>
|
|
75
|
+
|
|
76
|
+
<SvgIconArrowOpen
|
|
77
|
+
icon="ARROW_DROP_DOWN"
|
|
78
|
+
color={theme.colors.black[25]}
|
|
79
|
+
style={[
|
|
80
|
+
styles.arrow,
|
|
81
|
+
{
|
|
82
|
+
transform: [
|
|
83
|
+
{ rotate: isExpanded ? "180deg" : "0deg" },
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
]}
|
|
87
|
+
/>
|
|
88
|
+
</TouchableOpacity>
|
|
89
|
+
|
|
90
|
+
{/* CONTENT */}
|
|
91
|
+
{isExpanded && (
|
|
92
|
+
<>
|
|
93
|
+
{/* Placa do veículo */}
|
|
94
|
+
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
95
|
+
<Typography
|
|
96
|
+
text="Placa do veículo:"
|
|
97
|
+
size={theme.fontSizes.sm}
|
|
98
|
+
fontFamily={theme.fonts.inter_bold}
|
|
99
|
+
color={theme.colors.black[25]}
|
|
100
|
+
/>
|
|
101
|
+
<Text style={styles.textOption}>
|
|
102
|
+
{veiculo?.placa ?? "N/A"}
|
|
103
|
+
</Text>
|
|
104
|
+
</Box>
|
|
105
|
+
|
|
106
|
+
{/* Tipo do veículo */}
|
|
107
|
+
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
108
|
+
<Typography
|
|
109
|
+
text="Tipo do veículo:"
|
|
110
|
+
size={theme.fontSizes.sm}
|
|
111
|
+
fontFamily={theme.fonts.inter_bold}
|
|
112
|
+
color={theme.colors.black[25]}
|
|
113
|
+
style={styles.textSpacing}
|
|
114
|
+
/>
|
|
115
|
+
<Text
|
|
116
|
+
style={[
|
|
117
|
+
styles.textOption,
|
|
118
|
+
{
|
|
119
|
+
color: "#0088FF",
|
|
120
|
+
fontWeight: "bold",
|
|
121
|
+
},
|
|
122
|
+
]}
|
|
123
|
+
>
|
|
124
|
+
{veiculo?.tipo ?? "N/A"}
|
|
125
|
+
</Text>
|
|
126
|
+
</Box>
|
|
127
|
+
</>
|
|
128
|
+
)}
|
|
129
|
+
</Box>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
CardDriverData.displayName = "CardDriverData";
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* EXPORTS
|
|
138
|
+
*/
|
|
139
|
+
export default asBaseComponent(CardDriverData);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { TextStyle, ViewStyle } from "react-native";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* STYLES
|
|
9
|
+
*/
|
|
10
|
+
interface IStyles {
|
|
11
|
+
container: (bg?: string) => ViewStyle;
|
|
12
|
+
header: ViewStyle;
|
|
13
|
+
arrow: ViewStyle;
|
|
14
|
+
textSpacing: TextStyle;
|
|
15
|
+
buttonText: TextStyle;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
interface IDriverJourneyInfo {
|
|
20
|
+
isOpen?: boolean;
|
|
21
|
+
onPress: () => void;
|
|
22
|
+
backgroundColor?: string;
|
|
23
|
+
veiculo: {
|
|
24
|
+
placa: string;
|
|
25
|
+
tipo: string;
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* EXPORT
|
|
32
|
+
*/
|
|
33
|
+
export type { IDriverJourneyInfo, IStyles };
|