react-native-exp-fig 0.1.21 → 0.1.23
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 +12 -0
- package/lib/commonjs/@types/as-base-component.js.map +1 -0
- package/lib/commonjs/common/icons-svg/constants/index.js +2 -1
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/eclamation-triangle/index.js +33 -0
- package/lib/commonjs/common/icons-svg/eclamation-triangle/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/index.js +8 -0
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/truck/index.js +2 -2
- package/lib/commonjs/common/icons-svg/truck/index.js.map +1 -1
- package/lib/commonjs/components/activities-daily/index.js +9 -9
- package/lib/commonjs/components/activities-daily/index.js.map +1 -1
- package/lib/commonjs/components/activities-progress/index.js +14 -14
- package/lib/commonjs/components/activities-progress/index.js.map +1 -1
- package/lib/commonjs/components/avatar-profile/index.js +4 -4
- package/lib/commonjs/components/avatar-profile/index.js.map +1 -1
- package/lib/commonjs/components/box/index.js +27 -22
- package/lib/commonjs/components/box/index.js.map +1 -1
- package/lib/commonjs/components/box/interface.d.js.map +1 -1
- package/lib/commonjs/components/box/styles.js.map +1 -1
- package/lib/commonjs/components/card-history/index.js +16 -16
- package/lib/commonjs/components/card-history/index.js.map +1 -1
- package/lib/commonjs/components/card-hours/index.js +3 -3
- package/lib/commonjs/components/card-hours/index.js.map +1 -1
- package/lib/commonjs/components/card-loading/index.js +13 -13
- package/lib/commonjs/components/card-loading/index.js.map +1 -1
- package/lib/commonjs/components/card-scheduled-journey/index.js +6 -6
- package/lib/commonjs/components/card-scheduled-journey/index.js.map +1 -1
- package/lib/commonjs/components/card-work-session/index.js +12 -12
- package/lib/commonjs/components/card-work-session/index.js.map +1 -1
- package/lib/commonjs/components/check-box/index.js +5 -5
- package/lib/commonjs/components/check-box/index.js.map +1 -1
- package/lib/commonjs/components/coil/index.js +5 -5
- package/lib/commonjs/components/coil/index.js.map +1 -1
- package/lib/commonjs/components/filter-date-selector/index.js +2 -2
- package/lib/commonjs/components/filter-date-selector/index.js.map +1 -1
- package/lib/commonjs/components/header-profile/index.js +8 -8
- package/lib/commonjs/components/header-profile/index.js.map +1 -1
- package/lib/commonjs/components/history-activities-card/index.js +198 -0
- package/lib/commonjs/components/history-activities-card/index.js.map +1 -0
- package/lib/commonjs/components/history-activities-card/interface.js +6 -0
- package/lib/commonjs/components/history-activities-card/interface.js.map +1 -0
- package/lib/commonjs/components/history-details/index.js +5 -5
- package/lib/commonjs/components/history-details/index.js.map +1 -1
- package/lib/commonjs/components/image-capture-with-remove/index.js +2 -2
- package/lib/commonjs/components/image-capture-with-remove/index.js.map +1 -1
- package/lib/commonjs/components/input/index.js +11 -11
- package/lib/commonjs/components/input/index.js.map +1 -1
- package/lib/commonjs/components/loading-details/index.js +10 -10
- package/lib/commonjs/components/loading-details/index.js.map +1 -1
- package/lib/commonjs/components/loading-progress/index.js +5 -5
- package/lib/commonjs/components/loading-progress/index.js.map +1 -1
- package/lib/commonjs/components/menu-item/index.js +3 -3
- package/lib/commonjs/components/menu-item/index.js.map +1 -1
- package/lib/commonjs/components/modal-activities/index.js +5 -5
- package/lib/commonjs/components/modal-activities/index.js.map +1 -1
- package/lib/commonjs/components/modal-change-activity/index.js +217 -0
- package/lib/commonjs/components/modal-change-activity/index.js.map +1 -0
- package/lib/commonjs/components/no-data/index.js +2 -2
- package/lib/commonjs/components/no-data/index.js.map +1 -1
- package/lib/commonjs/components/notification-loading/index.js +12 -12
- package/lib/commonjs/components/notification-loading/index.js.map +1 -1
- package/lib/commonjs/components/profile-menu-option/index.js +3 -3
- package/lib/commonjs/components/profile-menu-option/index.js.map +1 -1
- package/lib/commonjs/components/scheduled-journey-indicators/index.js +4 -4
- package/lib/commonjs/components/scheduled-journey-indicators/index.js.map +1 -1
- package/lib/commonjs/components/selects/select-option/index.js +28 -11
- package/lib/commonjs/components/selects/select-option/index.js.map +1 -1
- package/lib/commonjs/components/selects/select-option/interface.d.js.map +1 -1
- package/lib/commonjs/components/step-indicator/index.js +45 -7
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/user-profile/index.js +9 -9
- package/lib/commonjs/components/user-profile/index.js.map +1 -1
- package/lib/commonjs/helpers/text-utils.js +21 -0
- package/lib/commonjs/helpers/text-utils.js.map +1 -0
- package/lib/commonjs/index.js +17 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/box/box.stories.js +2 -2
- package/lib/commonjs/stories/box/box.stories.js.map +1 -1
- package/lib/commonjs/stories/history-activities-card/history-activities-card.stories.js +104 -0
- package/lib/commonjs/stories/history-activities-card/history-activities-card.stories.js.map +1 -0
- package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js +52 -0
- package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -0
- package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -1
- package/lib/module/@types/as-base-component.js +6 -0
- package/lib/module/@types/as-base-component.js.map +1 -0
- package/lib/module/common/icons-svg/constants/index.js +2 -1
- package/lib/module/common/icons-svg/constants/index.js.map +1 -1
- package/lib/module/common/icons-svg/eclamation-triangle/index.js +25 -0
- package/lib/module/common/icons-svg/eclamation-triangle/index.js.map +1 -0
- package/lib/module/common/icons-svg/index.js +8 -0
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/common/icons-svg/truck/index.js +2 -2
- package/lib/module/common/icons-svg/truck/index.js.map +1 -1
- package/lib/module/components/activities-daily/index.js +5 -5
- package/lib/module/components/activities-daily/index.js.map +1 -1
- package/lib/module/components/activities-progress/index.js +5 -5
- package/lib/module/components/activities-progress/index.js.map +1 -1
- package/lib/module/components/avatar-profile/index.js +1 -1
- package/lib/module/components/avatar-profile/index.js.map +1 -1
- package/lib/module/components/box/index.js +24 -21
- package/lib/module/components/box/index.js.map +1 -1
- package/lib/module/components/box/interface.d.js.map +1 -1
- package/lib/module/components/box/styles.js.map +1 -1
- package/lib/module/components/card-history/index.js +8 -8
- package/lib/module/components/card-history/index.js.map +1 -1
- package/lib/module/components/card-hours/index.js +1 -1
- package/lib/module/components/card-hours/index.js.map +1 -1
- package/lib/module/components/card-loading/index.js +1 -1
- package/lib/module/components/card-loading/index.js.map +1 -1
- package/lib/module/components/card-scheduled-journey/index.js +1 -1
- package/lib/module/components/card-scheduled-journey/index.js.map +1 -1
- package/lib/module/components/card-work-session/index.js +1 -1
- package/lib/module/components/card-work-session/index.js.map +1 -1
- package/lib/module/components/check-box/index.js +1 -1
- package/lib/module/components/check-box/index.js.map +1 -1
- package/lib/module/components/coil/index.js +1 -1
- package/lib/module/components/coil/index.js.map +1 -1
- package/lib/module/components/filter-date-selector/index.js +1 -1
- package/lib/module/components/filter-date-selector/index.js.map +1 -1
- package/lib/module/components/header-profile/index.js +1 -1
- package/lib/module/components/header-profile/index.js.map +1 -1
- package/lib/module/components/history-activities-card/index.js +190 -0
- package/lib/module/components/history-activities-card/index.js.map +1 -0
- package/lib/module/components/history-activities-card/interface.js +2 -0
- package/lib/module/components/history-activities-card/interface.js.map +1 -0
- package/lib/module/components/history-details/index.js +1 -1
- package/lib/module/components/history-details/index.js.map +1 -1
- package/lib/module/components/image-capture-with-remove/index.js +1 -1
- package/lib/module/components/image-capture-with-remove/index.js.map +1 -1
- package/lib/module/components/input/index.js +1 -1
- package/lib/module/components/input/index.js.map +1 -1
- package/lib/module/components/loading-details/index.js +5 -5
- package/lib/module/components/loading-details/index.js.map +1 -1
- package/lib/module/components/loading-progress/index.js +1 -1
- package/lib/module/components/loading-progress/index.js.map +1 -1
- package/lib/module/components/menu-item/index.js +1 -1
- package/lib/module/components/menu-item/index.js.map +1 -1
- package/lib/module/components/modal-activities/index.js +1 -1
- package/lib/module/components/modal-activities/index.js.map +1 -1
- package/lib/module/components/modal-change-activity/index.js +208 -0
- package/lib/module/components/modal-change-activity/index.js.map +1 -0
- package/lib/module/components/no-data/index.js +1 -1
- package/lib/module/components/no-data/index.js.map +1 -1
- package/lib/module/components/notification-loading/index.js +5 -5
- package/lib/module/components/notification-loading/index.js.map +1 -1
- package/lib/module/components/profile-menu-option/index.js +1 -1
- package/lib/module/components/profile-menu-option/index.js.map +1 -1
- package/lib/module/components/scheduled-journey-indicators/index.js +1 -1
- package/lib/module/components/scheduled-journey-indicators/index.js.map +1 -1
- package/lib/module/components/selects/select-option/index.js +28 -11
- package/lib/module/components/selects/select-option/index.js.map +1 -1
- package/lib/module/components/selects/select-option/interface.d.js.map +1 -1
- package/lib/module/components/step-indicator/index.js +45 -7
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/user-profile/index.js +1 -1
- package/lib/module/components/user-profile/index.js.map +1 -1
- package/lib/module/helpers/text-utils.js +14 -0
- package/lib/module/helpers/text-utils.js.map +1 -0
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/box/box.stories.js +1 -1
- package/lib/module/stories/box/box.stories.js.map +1 -1
- package/lib/module/stories/history-activities-card/history-activities-card.stories.js +97 -0
- package/lib/module/stories/history-activities-card/history-activities-card.stories.js.map +1 -0
- package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js +45 -0
- package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -0
- package/lib/module/utils/get-icon-by-property/index.js +0 -1
- package/lib/module/utils/get-icon-by-property/index.js.map +1 -1
- package/lib/typescript/src/@types/as-base-component.d.ts +2 -0
- package/lib/typescript/src/common/icons-svg/constants/index.d.ts +1 -0
- package/lib/typescript/src/common/icons-svg/eclamation-triangle/index.d.ts +4 -0
- package/lib/typescript/src/components/box/index.d.ts +4 -3
- package/lib/typescript/src/components/box/styles.d.ts +2 -2
- package/lib/typescript/src/components/history-activities-card/index.d.ts +76 -0
- package/lib/typescript/src/components/history-activities-card/interface.d.ts +120 -0
- package/lib/typescript/src/components/modal-change-activity/index.d.ts +24 -0
- package/lib/typescript/src/helpers/text-utils.d.ts +7 -0
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/stories/box/box.stories.d.ts +1 -1
- package/lib/typescript/src/stories/history-activities-card/history-activities-card.stories.d.ts +10 -0
- package/lib/typescript/src/stories/modal-change-activity/modal-change-activity.stories.d.ts +9 -0
- package/lib/typescript/src/utils/get-icon-by-property/index.d.ts +2 -1
- package/package.json +11 -8
- package/src/@types/as-base-component.ts +9 -0
- package/src/common/icons-svg/constants/index.ts +1 -0
- package/src/common/icons-svg/eclamation-triangle/index.tsx +46 -0
- package/src/common/icons-svg/index.tsx +5 -1
- package/src/common/icons-svg/truck/index.tsx +2 -2
- package/src/components/activities-daily/index.tsx +116 -116
- package/src/components/activities-progress/index.tsx +170 -170
- package/src/components/avatar-profile/index.tsx +1 -1
- package/src/components/box/index.tsx +28 -22
- package/src/components/box/interface.d.ts +2 -2
- package/src/components/box/styles.ts +2 -2
- package/src/components/card-history/index.tsx +221 -221
- package/src/components/card-hours/index.tsx +2 -1
- package/src/components/card-loading/index.tsx +1 -1
- package/src/components/card-scheduled-journey/index.tsx +1 -1
- package/src/components/card-work-session/index.tsx +1 -1
- package/src/components/check-box/index.tsx +1 -1
- package/src/components/coil/index.tsx +1 -1
- package/src/components/filter-date-selector/index.tsx +1 -1
- package/src/components/header-profile/index.tsx +1 -1
- package/src/components/history-activities-card/index.tsx +217 -0
- package/src/components/history-activities-card/interface.ts +147 -0
- package/src/components/history-details/index.tsx +1 -1
- package/src/components/image-capture-with-remove/index.tsx +1 -1
- package/src/components/input/index.tsx +1 -1
- package/src/components/loading-details/index.tsx +156 -156
- package/src/components/loading-progress/index.tsx +1 -1
- package/src/components/menu-item/index.tsx +1 -1
- package/src/components/modal-activities/index.tsx +1 -1
- package/src/components/modal-change-activity/index.tsx +200 -0
- package/src/components/no-data/index.tsx +1 -1
- package/src/components/notification-loading/index.tsx +157 -157
- package/src/components/profile-menu-option/index.tsx +1 -1
- package/src/components/scheduled-journey-indicators/index.tsx +1 -1
- package/src/components/selects/select-option/index.tsx +115 -100
- package/src/components/selects/select-option/interface.d.ts +18 -18
- package/src/components/step-indicator/index.tsx +63 -7
- package/src/components/user-profile/index.tsx +1 -1
- package/src/helpers/text-utils.ts +15 -0
- package/src/index.ts +3 -1
- package/src/stories/box/box.stories.tsx +1 -1
- package/src/stories/history-activities-card/history-activities-card.stories.tsx +107 -0
- package/src/stories/modal-change-activity/modal-change-activity.stories.tsx +51 -0
- package/src/utils/get-icon-by-property/index.tsx +13 -1
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* IMPORTS
|
|
3
3
|
*/
|
|
4
|
-
import React from "react";
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
5
|
import { View } from "react-native";
|
|
6
6
|
|
|
7
7
|
// typings
|
|
8
|
-
import {
|
|
8
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
9
|
+
import type { IBoxInterface } from "./interface";
|
|
9
10
|
|
|
10
11
|
// styles
|
|
11
12
|
import { styles } from "./styles";
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// Criando o objeto de estilos dinamicamente
|
|
30
|
-
const styleProps: Partial<IBoxProps> = {
|
|
14
|
+
const Box = forwardRef<any, IBoxInterface>((props, ref): React.ReactElement => {
|
|
15
|
+
const {
|
|
16
|
+
children,
|
|
17
|
+
width,
|
|
18
|
+
height,
|
|
19
|
+
backgroundColor,
|
|
20
|
+
borderStyled,
|
|
21
|
+
flexStyle,
|
|
22
|
+
paddingStyle,
|
|
23
|
+
marginStyle,
|
|
24
|
+
opacity = 1,
|
|
25
|
+
testID = "box",
|
|
26
|
+
style,
|
|
27
|
+
} = props;
|
|
28
|
+
|
|
29
|
+
const styleProps = {
|
|
31
30
|
width,
|
|
32
31
|
height,
|
|
33
32
|
backgroundColor,
|
|
@@ -40,8 +39,15 @@ export const Box: React.FC<IBoxProps> = ({
|
|
|
40
39
|
};
|
|
41
40
|
|
|
42
41
|
return (
|
|
43
|
-
<View testID={testID} style={[styles(styleProps).boxStyle, style]}>
|
|
42
|
+
<View ref={ref} testID={testID} style={[styles(styleProps).boxStyle, style]}>
|
|
44
43
|
{children}
|
|
45
44
|
</View>
|
|
46
45
|
);
|
|
47
|
-
};
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
Box.displayName = "Box";
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Componente Box para a interação da ui.
|
|
52
|
+
*/
|
|
53
|
+
export default asBaseComponent(Box);
|
|
@@ -8,7 +8,7 @@ import { type ViewProps } from "react-native";
|
|
|
8
8
|
*/
|
|
9
9
|
import { IGlobalCss } from "../../styles/global/interface";
|
|
10
10
|
|
|
11
|
-
interface
|
|
11
|
+
interface IBoxInterface extends ViewProps, IGlobalCss {
|
|
12
12
|
/**
|
|
13
13
|
* A propriedade CSS de Shadow Box adiciona efeitos de sombra em torno da estrutura de um elemento. Você pode definir vários efeitos separados por vírgulas. Uma sombra de caixa é descrita por compensações x e y em relação ao elemento, borrão e raio espalhado e cor.
|
|
14
14
|
*/
|
|
@@ -28,4 +28,4 @@ interface IBoxProps extends ViewProps, IGlobalCss {
|
|
|
28
28
|
/**
|
|
29
29
|
* EXPORT
|
|
30
30
|
*/
|
|
31
|
-
export type {
|
|
31
|
+
export type { IBoxInterface };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { StyleSheet, ViewProps } from "react-native";
|
|
2
|
-
import {
|
|
2
|
+
import { IBoxInterface } from "./interface.d";
|
|
3
3
|
|
|
4
4
|
// typing
|
|
5
5
|
import { IGlobalCss } from "../../styles/global/interface";
|
|
6
6
|
|
|
7
7
|
import { stylesGlobal } from "../../styles/global/styles";
|
|
8
8
|
|
|
9
|
-
interface BoxProps extends
|
|
9
|
+
interface BoxProps extends IBoxInterface, IGlobalCss {}
|
|
10
10
|
const styles = (props: BoxProps) =>
|
|
11
11
|
StyleSheet.create({
|
|
12
12
|
boxStyle: {
|
|
@@ -1,221 +1,221 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { Image, TouchableOpacity } from "react-native";
|
|
6
|
-
|
|
7
|
-
// components
|
|
8
|
-
import
|
|
9
|
-
import { Typography } from "../typography";
|
|
10
|
-
|
|
11
|
-
// typings
|
|
12
|
-
import { ICardHistory } from "./interface";
|
|
13
|
-
|
|
14
|
-
// styles
|
|
15
|
-
import { theme } from "../../styles/theme/theme";
|
|
16
|
-
import { Icons } from "../../common/icons-svg";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* Componente CardLoading para a interação do usuário com ui.
|
|
21
|
-
*/
|
|
22
|
-
const CardHistory: React.FC<ICardHistory> = ({
|
|
23
|
-
width,
|
|
24
|
-
title = "Carregamento #01020304050607",
|
|
25
|
-
local = "Doca 1, Patío 03 - Usiminas Ipatinga",
|
|
26
|
-
vehicle = "EXP-0000",
|
|
27
|
-
data_start = "12:34 10/03/2025",
|
|
28
|
-
data_end = "13:34 10/03/2025",
|
|
29
|
-
duration = "01:34",
|
|
30
|
-
testID,
|
|
31
|
-
handleNavigation,
|
|
32
|
-
status_carregamento,
|
|
33
|
-
}: ICardHistory) => {
|
|
34
|
-
return (
|
|
35
|
-
<TouchableOpacity onPress={handleNavigation} activeOpacity={0.7}>
|
|
36
|
-
<Box
|
|
37
|
-
testID={testID}
|
|
38
|
-
width={width ?? "100%"}
|
|
39
|
-
backgroundColor={theme.colors.blue[400]}
|
|
40
|
-
marginStyle={{ marginBottom: theme.margins.md }}
|
|
41
|
-
paddingStyle={{ padding: theme.paddings["2xs"] }}
|
|
42
|
-
borderStyled={{
|
|
43
|
-
borderWidth: theme.borderWidths.thin,
|
|
44
|
-
borderColor: theme.colors.blue[400],
|
|
45
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
46
|
-
}}
|
|
47
|
-
flexStyle={{ flexDirection: "row", justifyContent: "flex-start", alignItems: "center" }}
|
|
48
|
-
>
|
|
49
|
-
<Box width={"25%"} borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}>
|
|
50
|
-
<Image
|
|
51
|
-
source={{
|
|
52
|
-
uri: "https://th.bing.com/th/id/OIP.Rr9_IUNo8J66QbvQkxzXtwHaEJ?w=276&h=180&c=7&r=0&o=5&pid=1.7",
|
|
53
|
-
}}
|
|
54
|
-
style={{
|
|
55
|
-
width: "100%",
|
|
56
|
-
flex: 1,
|
|
57
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
58
|
-
}}
|
|
59
|
-
/>
|
|
60
|
-
</Box>
|
|
61
|
-
|
|
62
|
-
<Box width={"75%"} paddingStyle={{ paddingLeft: theme.paddings["2xs"] }}>
|
|
63
|
-
<Typography
|
|
64
|
-
text={title}
|
|
65
|
-
ellipsizeMode="tail"
|
|
66
|
-
numberOfLines={1}
|
|
67
|
-
color={theme.colors.neutral[25]}
|
|
68
|
-
size={theme.fontSizes.sm}
|
|
69
|
-
fontFamily={theme.fonts.inter_bold_700}
|
|
70
|
-
lineHeight={theme.fontSizes.xl ?? 20}
|
|
71
|
-
letterSpacing={"regular"}
|
|
72
|
-
marginBottom={4}
|
|
73
|
-
/>
|
|
74
|
-
|
|
75
|
-
<Typography
|
|
76
|
-
text={local}
|
|
77
|
-
color={theme.colors.neutral[25]}
|
|
78
|
-
size={theme.fontSizes.xs}
|
|
79
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
80
|
-
lineHeight={theme.fontSizes.md ?? 16}
|
|
81
|
-
letterSpacing={"regular"}
|
|
82
|
-
marginBottom={4}
|
|
83
|
-
/>
|
|
84
|
-
|
|
85
|
-
{/**DADOS DO VEÍCULOS */}
|
|
86
|
-
<Box
|
|
87
|
-
flexStyle={{
|
|
88
|
-
flexDirection: "row",
|
|
89
|
-
justifyContent: "space-between",
|
|
90
|
-
alignItems: "center",
|
|
91
|
-
}}
|
|
92
|
-
marginStyle={{
|
|
93
|
-
marginBottom: 4,
|
|
94
|
-
}}
|
|
95
|
-
>
|
|
96
|
-
<Box
|
|
97
|
-
flexStyle={{
|
|
98
|
-
flexDirection: "row",
|
|
99
|
-
alignItems: "center",
|
|
100
|
-
}}
|
|
101
|
-
>
|
|
102
|
-
<Typography
|
|
103
|
-
text={"Dados Veículo:"}
|
|
104
|
-
color={theme.colors.neutral[25]}
|
|
105
|
-
size={theme.fontSizes.xs}
|
|
106
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
107
|
-
lineHeight={theme.fontSizes.md ?? 16}
|
|
108
|
-
letterSpacing={"regular"}
|
|
109
|
-
/>
|
|
110
|
-
<Typography
|
|
111
|
-
text={vehicle}
|
|
112
|
-
color={theme.colors.neutral[25]}
|
|
113
|
-
size={theme.fontSizes.xs}
|
|
114
|
-
fontFamily={theme.fonts.inter_bold_700}
|
|
115
|
-
lineHeight={theme.fontSizes.md ?? 16}
|
|
116
|
-
letterSpacing={"regular"}
|
|
117
|
-
marginLeft={4}
|
|
118
|
-
/>
|
|
119
|
-
</Box>
|
|
120
|
-
<Icons size={9} color={status_carregamento} icon={"ELLIPSE"} />
|
|
121
|
-
</Box>
|
|
122
|
-
|
|
123
|
-
{/**DATA INICIO DO CARREGAMENTO */}
|
|
124
|
-
<Box
|
|
125
|
-
flexStyle={{
|
|
126
|
-
flexDirection: "row",
|
|
127
|
-
justifyContent: "flex-start",
|
|
128
|
-
alignItems: "center",
|
|
129
|
-
}}
|
|
130
|
-
marginStyle={{
|
|
131
|
-
marginBottom: 4,
|
|
132
|
-
}}
|
|
133
|
-
>
|
|
134
|
-
<Typography
|
|
135
|
-
text={"Data Inicio:"}
|
|
136
|
-
color={theme.colors.neutral[25]}
|
|
137
|
-
size={theme.fontSizes.xs}
|
|
138
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
139
|
-
lineHeight={theme.fontSizes.md ?? 16}
|
|
140
|
-
letterSpacing={"regular"}
|
|
141
|
-
/>
|
|
142
|
-
<Typography
|
|
143
|
-
text={data_start}
|
|
144
|
-
color={theme.colors.neutral[25]}
|
|
145
|
-
size={theme.fontSizes.xs}
|
|
146
|
-
fontFamily={theme.fonts.inter_bold_700}
|
|
147
|
-
lineHeight={theme.fontSizes.md ?? 16}
|
|
148
|
-
letterSpacing={"regular"}
|
|
149
|
-
marginLeft={4}
|
|
150
|
-
/>
|
|
151
|
-
</Box>
|
|
152
|
-
|
|
153
|
-
{/**DATA FIM DO CARREGAMENTO */}
|
|
154
|
-
<Box
|
|
155
|
-
flexStyle={{
|
|
156
|
-
flexDirection: "row",
|
|
157
|
-
justifyContent: "flex-start",
|
|
158
|
-
alignItems: "center",
|
|
159
|
-
}}
|
|
160
|
-
marginStyle={{
|
|
161
|
-
marginBottom: 4,
|
|
162
|
-
}}
|
|
163
|
-
>
|
|
164
|
-
<Typography
|
|
165
|
-
text={"Data Fim:"}
|
|
166
|
-
color={theme.colors.neutral[25]}
|
|
167
|
-
size={theme.fontSizes.xs}
|
|
168
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
169
|
-
lineHeight={theme.fontSizes.md ?? 16}
|
|
170
|
-
letterSpacing={"regular"}
|
|
171
|
-
/>
|
|
172
|
-
<Typography
|
|
173
|
-
text={data_end}
|
|
174
|
-
color={theme.colors.neutral[25]}
|
|
175
|
-
size={theme.fontSizes.xs}
|
|
176
|
-
fontFamily={theme.fonts.inter_bold_700}
|
|
177
|
-
lineHeight={theme.fontSizes.md ?? 16}
|
|
178
|
-
letterSpacing={"regular"}
|
|
179
|
-
marginLeft={4}
|
|
180
|
-
/>
|
|
181
|
-
</Box>
|
|
182
|
-
|
|
183
|
-
{/**DURAÇÃO DO CARREGAMENTO */}
|
|
184
|
-
<Box
|
|
185
|
-
flexStyle={{
|
|
186
|
-
flexDirection: "row",
|
|
187
|
-
justifyContent: "flex-start",
|
|
188
|
-
alignItems: "center",
|
|
189
|
-
}}
|
|
190
|
-
marginStyle={{
|
|
191
|
-
marginBottom: 4,
|
|
192
|
-
}}
|
|
193
|
-
>
|
|
194
|
-
<Typography
|
|
195
|
-
text={"Duração:"}
|
|
196
|
-
color={theme.colors.neutral[25]}
|
|
197
|
-
size={theme.fontSizes.xs}
|
|
198
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
199
|
-
lineHeight={theme.fontSizes.md ?? 16}
|
|
200
|
-
letterSpacing={"regular"}
|
|
201
|
-
/>
|
|
202
|
-
<Typography
|
|
203
|
-
text={duration}
|
|
204
|
-
color={theme.colors.neutral[25]}
|
|
205
|
-
size={theme.fontSizes.xs}
|
|
206
|
-
fontFamily={theme.fonts.inter_bold_700}
|
|
207
|
-
lineHeight={theme.fontSizes.md ?? 16}
|
|
208
|
-
letterSpacing={"regular"}
|
|
209
|
-
marginLeft={4}
|
|
210
|
-
/>
|
|
211
|
-
</Box>
|
|
212
|
-
</Box>
|
|
213
|
-
</Box>
|
|
214
|
-
</TouchableOpacity>
|
|
215
|
-
);
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* EXPORTS
|
|
220
|
-
*/
|
|
221
|
-
export { CardHistory };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Image, TouchableOpacity } from "react-native";
|
|
6
|
+
|
|
7
|
+
// components
|
|
8
|
+
import Box from "../box";
|
|
9
|
+
import { Typography } from "../typography";
|
|
10
|
+
|
|
11
|
+
// typings
|
|
12
|
+
import { ICardHistory } from "./interface";
|
|
13
|
+
|
|
14
|
+
// styles
|
|
15
|
+
import { theme } from "../../styles/theme/theme";
|
|
16
|
+
import { Icons } from "../../common/icons-svg";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* Componente CardLoading para a interação do usuário com ui.
|
|
21
|
+
*/
|
|
22
|
+
const CardHistory: React.FC<ICardHistory> = ({
|
|
23
|
+
width,
|
|
24
|
+
title = "Carregamento #01020304050607",
|
|
25
|
+
local = "Doca 1, Patío 03 - Usiminas Ipatinga",
|
|
26
|
+
vehicle = "EXP-0000",
|
|
27
|
+
data_start = "12:34 10/03/2025",
|
|
28
|
+
data_end = "13:34 10/03/2025",
|
|
29
|
+
duration = "01:34",
|
|
30
|
+
testID,
|
|
31
|
+
handleNavigation,
|
|
32
|
+
status_carregamento,
|
|
33
|
+
}: ICardHistory) => {
|
|
34
|
+
return (
|
|
35
|
+
<TouchableOpacity onPress={handleNavigation} activeOpacity={0.7}>
|
|
36
|
+
<Box
|
|
37
|
+
testID={testID}
|
|
38
|
+
width={width ?? "100%"}
|
|
39
|
+
backgroundColor={theme.colors.blue[400]}
|
|
40
|
+
marginStyle={{ marginBottom: theme.margins.md }}
|
|
41
|
+
paddingStyle={{ padding: theme.paddings["2xs"] }}
|
|
42
|
+
borderStyled={{
|
|
43
|
+
borderWidth: theme.borderWidths.thin,
|
|
44
|
+
borderColor: theme.colors.blue[400],
|
|
45
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
46
|
+
}}
|
|
47
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start", alignItems: "center" }}
|
|
48
|
+
>
|
|
49
|
+
<Box width={"25%"} borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}>
|
|
50
|
+
<Image
|
|
51
|
+
source={{
|
|
52
|
+
uri: "https://th.bing.com/th/id/OIP.Rr9_IUNo8J66QbvQkxzXtwHaEJ?w=276&h=180&c=7&r=0&o=5&pid=1.7",
|
|
53
|
+
}}
|
|
54
|
+
style={{
|
|
55
|
+
width: "100%",
|
|
56
|
+
flex: 1,
|
|
57
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
58
|
+
}}
|
|
59
|
+
/>
|
|
60
|
+
</Box>
|
|
61
|
+
|
|
62
|
+
<Box width={"75%"} paddingStyle={{ paddingLeft: theme.paddings["2xs"] }}>
|
|
63
|
+
<Typography
|
|
64
|
+
text={title}
|
|
65
|
+
ellipsizeMode="tail"
|
|
66
|
+
numberOfLines={1}
|
|
67
|
+
color={theme.colors.neutral[25]}
|
|
68
|
+
size={theme.fontSizes.sm}
|
|
69
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
70
|
+
lineHeight={theme.fontSizes.xl ?? 20}
|
|
71
|
+
letterSpacing={"regular"}
|
|
72
|
+
marginBottom={4}
|
|
73
|
+
/>
|
|
74
|
+
|
|
75
|
+
<Typography
|
|
76
|
+
text={local}
|
|
77
|
+
color={theme.colors.neutral[25]}
|
|
78
|
+
size={theme.fontSizes.xs}
|
|
79
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
80
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
81
|
+
letterSpacing={"regular"}
|
|
82
|
+
marginBottom={4}
|
|
83
|
+
/>
|
|
84
|
+
|
|
85
|
+
{/**DADOS DO VEÍCULOS */}
|
|
86
|
+
<Box
|
|
87
|
+
flexStyle={{
|
|
88
|
+
flexDirection: "row",
|
|
89
|
+
justifyContent: "space-between",
|
|
90
|
+
alignItems: "center",
|
|
91
|
+
}}
|
|
92
|
+
marginStyle={{
|
|
93
|
+
marginBottom: 4,
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
<Box
|
|
97
|
+
flexStyle={{
|
|
98
|
+
flexDirection: "row",
|
|
99
|
+
alignItems: "center",
|
|
100
|
+
}}
|
|
101
|
+
>
|
|
102
|
+
<Typography
|
|
103
|
+
text={"Dados Veículo:"}
|
|
104
|
+
color={theme.colors.neutral[25]}
|
|
105
|
+
size={theme.fontSizes.xs}
|
|
106
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
107
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
108
|
+
letterSpacing={"regular"}
|
|
109
|
+
/>
|
|
110
|
+
<Typography
|
|
111
|
+
text={vehicle}
|
|
112
|
+
color={theme.colors.neutral[25]}
|
|
113
|
+
size={theme.fontSizes.xs}
|
|
114
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
115
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
116
|
+
letterSpacing={"regular"}
|
|
117
|
+
marginLeft={4}
|
|
118
|
+
/>
|
|
119
|
+
</Box>
|
|
120
|
+
<Icons size={9} color={status_carregamento} icon={"ELLIPSE"} />
|
|
121
|
+
</Box>
|
|
122
|
+
|
|
123
|
+
{/**DATA INICIO DO CARREGAMENTO */}
|
|
124
|
+
<Box
|
|
125
|
+
flexStyle={{
|
|
126
|
+
flexDirection: "row",
|
|
127
|
+
justifyContent: "flex-start",
|
|
128
|
+
alignItems: "center",
|
|
129
|
+
}}
|
|
130
|
+
marginStyle={{
|
|
131
|
+
marginBottom: 4,
|
|
132
|
+
}}
|
|
133
|
+
>
|
|
134
|
+
<Typography
|
|
135
|
+
text={"Data Inicio:"}
|
|
136
|
+
color={theme.colors.neutral[25]}
|
|
137
|
+
size={theme.fontSizes.xs}
|
|
138
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
139
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
140
|
+
letterSpacing={"regular"}
|
|
141
|
+
/>
|
|
142
|
+
<Typography
|
|
143
|
+
text={data_start}
|
|
144
|
+
color={theme.colors.neutral[25]}
|
|
145
|
+
size={theme.fontSizes.xs}
|
|
146
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
147
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
148
|
+
letterSpacing={"regular"}
|
|
149
|
+
marginLeft={4}
|
|
150
|
+
/>
|
|
151
|
+
</Box>
|
|
152
|
+
|
|
153
|
+
{/**DATA FIM DO CARREGAMENTO */}
|
|
154
|
+
<Box
|
|
155
|
+
flexStyle={{
|
|
156
|
+
flexDirection: "row",
|
|
157
|
+
justifyContent: "flex-start",
|
|
158
|
+
alignItems: "center",
|
|
159
|
+
}}
|
|
160
|
+
marginStyle={{
|
|
161
|
+
marginBottom: 4,
|
|
162
|
+
}}
|
|
163
|
+
>
|
|
164
|
+
<Typography
|
|
165
|
+
text={"Data Fim:"}
|
|
166
|
+
color={theme.colors.neutral[25]}
|
|
167
|
+
size={theme.fontSizes.xs}
|
|
168
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
169
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
170
|
+
letterSpacing={"regular"}
|
|
171
|
+
/>
|
|
172
|
+
<Typography
|
|
173
|
+
text={data_end}
|
|
174
|
+
color={theme.colors.neutral[25]}
|
|
175
|
+
size={theme.fontSizes.xs}
|
|
176
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
177
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
178
|
+
letterSpacing={"regular"}
|
|
179
|
+
marginLeft={4}
|
|
180
|
+
/>
|
|
181
|
+
</Box>
|
|
182
|
+
|
|
183
|
+
{/**DURAÇÃO DO CARREGAMENTO */}
|
|
184
|
+
<Box
|
|
185
|
+
flexStyle={{
|
|
186
|
+
flexDirection: "row",
|
|
187
|
+
justifyContent: "flex-start",
|
|
188
|
+
alignItems: "center",
|
|
189
|
+
}}
|
|
190
|
+
marginStyle={{
|
|
191
|
+
marginBottom: 4,
|
|
192
|
+
}}
|
|
193
|
+
>
|
|
194
|
+
<Typography
|
|
195
|
+
text={"Duração:"}
|
|
196
|
+
color={theme.colors.neutral[25]}
|
|
197
|
+
size={theme.fontSizes.xs}
|
|
198
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
199
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
200
|
+
letterSpacing={"regular"}
|
|
201
|
+
/>
|
|
202
|
+
<Typography
|
|
203
|
+
text={duration}
|
|
204
|
+
color={theme.colors.neutral[25]}
|
|
205
|
+
size={theme.fontSizes.xs}
|
|
206
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
207
|
+
lineHeight={theme.fontSizes.md ?? 16}
|
|
208
|
+
letterSpacing={"regular"}
|
|
209
|
+
marginLeft={4}
|
|
210
|
+
/>
|
|
211
|
+
</Box>
|
|
212
|
+
</Box>
|
|
213
|
+
</Box>
|
|
214
|
+
</TouchableOpacity>
|
|
215
|
+
);
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* EXPORTS
|
|
220
|
+
*/
|
|
221
|
+
export { CardHistory };
|