react-native-exp-fig 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/common/icons-svg/constants/index.js +4 -2
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/hourglass/index.js +4 -4
- package/lib/commonjs/common/icons-svg/hourglass/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/house/index.js +49 -0
- package/lib/commonjs/common/icons-svg/house/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/index.js +22 -8
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/island/index.js +34 -0
- package/lib/commonjs/common/icons-svg/island/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconCallBell.js +46 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconCallBell.js.map +1 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconCoffee.js +47 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconCoffee.js.map +1 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconGear.js +47 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconGear.js.map +1 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconHourGlassMedium.js +48 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconHourGlassMedium.js.map +1 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconHouse.js +46 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconHouse.js.map +1 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconMoonStars.js +48 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconMoonStars.js.map +1 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconSteeringWheel.js +54 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconSteeringWheel.js.map +1 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconTimer.js +45 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconTimer.js.map +1 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconTruck.js +35 -0
- package/lib/commonjs/common/icons-svg/modal-activities/SvgIconTruck.js.map +1 -0
- package/lib/commonjs/common/icons-svg/modal-activities/index.js +80 -0
- package/lib/commonjs/common/icons-svg/modal-activities/index.js.map +1 -0
- package/lib/commonjs/components/activities-progress/index.js +16 -14
- package/lib/commonjs/components/activities-progress/index.js.map +1 -1
- package/lib/commonjs/components/activities-progress/interface.d.js.map +1 -1
- package/lib/commonjs/components/card-history/index.js +20 -9
- package/lib/commonjs/components/card-history/index.js.map +1 -1
- package/lib/commonjs/components/card-history/interface.d.js.map +1 -1
- package/lib/commonjs/components/history-details/index.js +4 -4
- package/lib/commonjs/components/history-details/index.js.map +1 -1
- package/lib/commonjs/components/menu-item/interface.d.js.map +1 -1
- package/lib/commonjs/components/modal-activities/data-activities/index.js +62 -0
- package/lib/commonjs/components/modal-activities/data-activities/index.js.map +1 -0
- package/lib/commonjs/components/modal-activities/index.js +30 -38
- package/lib/commonjs/components/modal-activities/index.js.map +1 -1
- package/lib/commonjs/components/modal-activities/interface.d.js.map +1 -1
- package/lib/commonjs/components/notification-loading/index.js +4 -4
- package/lib/commonjs/components/notification-loading/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/styles.js +4 -4
- package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/activities-progress/activities-progress.stories.js +24 -14
- package/lib/commonjs/stories/activities-progress/activities-progress.stories.js.map +1 -1
- package/lib/commonjs/stories/card-history/card-history.stories.js +5 -2
- package/lib/commonjs/stories/card-history/card-history.stories.js.map +1 -1
- package/lib/commonjs/stories/modal-activities/modal-activities.stories.js +21 -5
- package/lib/commonjs/stories/modal-activities/modal-activities.stories.js.map +1 -1
- package/lib/commonjs/styles/global/interface.d.js.map +1 -1
- package/lib/commonjs/utils/get-icon-by-property/index.js +85 -0
- package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -0
- package/lib/module/common/icons-svg/constants/index.js +4 -2
- package/lib/module/common/icons-svg/constants/index.js.map +1 -1
- package/lib/module/common/icons-svg/hourglass/index.js +4 -4
- package/lib/module/common/icons-svg/hourglass/index.js.map +1 -1
- package/lib/module/common/icons-svg/house/index.js +41 -0
- package/lib/module/common/icons-svg/house/index.js.map +1 -0
- package/lib/module/common/icons-svg/index.js +22 -8
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/common/icons-svg/island/index.js +26 -0
- package/lib/module/common/icons-svg/island/index.js.map +1 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconCallBell.js +37 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconCallBell.js.map +1 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconCoffee.js +38 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconCoffee.js.map +1 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconGear.js +38 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconGear.js.map +1 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconHourGlassMedium.js +39 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconHourGlassMedium.js.map +1 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconHouse.js +37 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconHouse.js.map +1 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconMoonStars.js +40 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconMoonStars.js.map +1 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconSteeringWheel.js +45 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconSteeringWheel.js.map +1 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconTimer.js +36 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconTimer.js.map +1 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconTruck.js +26 -0
- package/lib/module/common/icons-svg/modal-activities/SvgIconTruck.js.map +1 -0
- package/lib/module/common/icons-svg/modal-activities/index.js +75 -0
- package/lib/module/common/icons-svg/modal-activities/index.js.map +1 -0
- package/lib/module/components/activities-progress/index.js +15 -14
- package/lib/module/components/activities-progress/index.js.map +1 -1
- package/lib/module/components/activities-progress/interface.d.js.map +1 -1
- package/lib/module/components/card-history/index.js +20 -9
- package/lib/module/components/card-history/index.js.map +1 -1
- package/lib/module/components/card-history/interface.d.js.map +1 -1
- package/lib/module/components/history-details/index.js +4 -4
- package/lib/module/components/history-details/index.js.map +1 -1
- package/lib/module/components/menu-item/interface.d.js.map +1 -1
- package/lib/module/components/modal-activities/data-activities/index.js +56 -0
- package/lib/module/components/modal-activities/data-activities/index.js.map +1 -0
- package/lib/module/components/modal-activities/index.js +29 -38
- package/lib/module/components/modal-activities/index.js.map +1 -1
- package/lib/module/components/modal-activities/interface.d.js.map +1 -1
- package/lib/module/components/notification-loading/index.js +4 -4
- package/lib/module/components/notification-loading/index.js.map +1 -1
- package/lib/module/components/step-indicator/styles.js +4 -4
- package/lib/module/components/step-indicator/styles.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/activities-progress/activities-progress.stories.js +24 -14
- package/lib/module/stories/activities-progress/activities-progress.stories.js.map +1 -1
- package/lib/module/stories/card-history/card-history.stories.js +5 -2
- package/lib/module/stories/card-history/card-history.stories.js.map +1 -1
- package/lib/module/stories/modal-activities/modal-activities.stories.js +20 -4
- package/lib/module/stories/modal-activities/modal-activities.stories.js.map +1 -1
- package/lib/module/styles/global/interface.d.js.map +1 -1
- package/lib/module/utils/get-icon-by-property/index.js +79 -0
- package/lib/module/utils/get-icon-by-property/index.js.map +1 -0
- package/lib/typescript/src/common/icons-svg/constants/index.d.ts +3 -1
- package/lib/typescript/src/common/icons-svg/house/index.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/island/index.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconCallBell.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconCoffee.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconGear.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconHourGlassMedium.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconHouse.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconMoonStars.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconSteeringWheel.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconTimer.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconTruck.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/modal-activities/index.d.ts +23 -0
- package/lib/typescript/src/components/modal-activities/data-activities/index.d.ts +19 -0
- package/lib/typescript/src/stories/modal-activities/modal-activities.stories.d.ts +2 -1
- package/lib/typescript/src/utils/get-icon-by-property/index.d.ts +15 -0
- package/package.json +220 -221
- package/src/common/icons-svg/constants/index.ts +3 -1
- package/src/common/icons-svg/hourglass/index.tsx +28 -28
- package/src/common/icons-svg/house/index.tsx +41 -0
- package/src/common/icons-svg/index.tsx +14 -6
- package/src/common/icons-svg/island/index.tsx +25 -0
- package/src/common/icons-svg/modal-activities/SvgIconCallBell.tsx +37 -0
- package/src/common/icons-svg/modal-activities/SvgIconCoffee.tsx +38 -0
- package/src/common/icons-svg/modal-activities/SvgIconGear.tsx +38 -0
- package/src/common/icons-svg/modal-activities/SvgIconHourGlassMedium.tsx +38 -0
- package/src/common/icons-svg/modal-activities/SvgIconHouse.tsx +37 -0
- package/src/common/icons-svg/modal-activities/SvgIconMoonStars.tsx +39 -0
- package/src/common/icons-svg/modal-activities/SvgIconSteeringWheel.tsx +48 -0
- package/src/common/icons-svg/modal-activities/SvgIconTimer.tsx +37 -0
- package/src/common/icons-svg/modal-activities/SvgIconTruck.tsx +28 -0
- package/src/common/icons-svg/modal-activities/index.tsx +53 -0
- package/src/components/activities-progress/index.tsx +169 -162
- package/src/components/activities-progress/interface.d.ts +61 -41
- package/src/components/button/styles.ts +34 -34
- package/src/components/card-history/index.tsx +28 -18
- package/src/components/card-history/interface.d.ts +5 -1
- package/src/components/card-loading/index.tsx +290 -290
- package/src/components/history-details/index.tsx +99 -99
- package/src/components/image-capture-with-remove/index.tsx +92 -92
- package/src/components/image-capture-with-remove/interface.d.ts +28 -28
- package/src/components/loading-progress/index.tsx +93 -93
- package/src/components/menu-item/interface.d.ts +1 -1
- package/src/components/modal-activities/data-activities/index.ts +65 -0
- package/src/components/modal-activities/index.tsx +137 -139
- package/src/components/modal-activities/interface.d.ts +32 -21
- package/src/components/notification-loading/index.tsx +162 -162
- package/src/components/step-indicator/styles.ts +68 -68
- package/src/index.ts +43 -43
- package/src/stories/activities-progress/activities-progress.stories.tsx +71 -61
- package/src/stories/card-history/card-history.stories.tsx +3 -0
- package/src/stories/modal-activities/modal-activities.stories.tsx +64 -46
- package/src/styles/global/interface.d.ts +146 -146
- package/src/styles/theme/theme.ts +171 -171
- package/src/utils/get-icon-by-property/index.tsx +53 -0
- package/src/utils/status-color/return-color.ts +34 -34
|
@@ -1,99 +1,99 @@
|
|
|
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
|
-
|
|
16
|
-
const HistoryDetails: React.FC<IHistoryDetails> = ({
|
|
17
|
-
numero = "01020304050607",
|
|
18
|
-
local = "Doca 1, Pátio 02 - Usimais (Ipatinga)",
|
|
19
|
-
date = "24/03/2025",
|
|
20
|
-
duracao = "00:30",
|
|
21
|
-
}) => {
|
|
22
|
-
return (
|
|
23
|
-
<Box width="100%" borderStyled={{ borderRadius: 8 }} backgroundColor={theme.colors.blue[400]}>
|
|
24
|
-
<Box
|
|
25
|
-
flexStyle={{
|
|
26
|
-
flexDirection: "column",
|
|
27
|
-
justifyContent: "flex-start",
|
|
28
|
-
alignItems: "flex-start",
|
|
29
|
-
}}
|
|
30
|
-
paddingStyle={{ padding: theme.paddings.xs }}
|
|
31
|
-
>
|
|
32
|
-
<Typography
|
|
33
|
-
text={`Carregamento - #${numero}`}
|
|
34
|
-
size={theme.fontSizes.sm}
|
|
35
|
-
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
36
|
-
fontWeight="600"
|
|
37
|
-
color={theme.colors.neutral[25]}
|
|
38
|
-
lineHeight={theme.fontSizes.xl}
|
|
39
|
-
letterSpacing={"regular"}
|
|
40
|
-
/>
|
|
41
|
-
|
|
42
|
-
<Typography
|
|
43
|
-
text={local}
|
|
44
|
-
color={theme.colors.neutral[25]}
|
|
45
|
-
size={theme.fontSizes.xs}
|
|
46
|
-
lineHeight={theme.fontSizes.lg}
|
|
47
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
48
|
-
letterSpacing={"regular"}
|
|
49
|
-
numberOfLines={1}
|
|
50
|
-
/>
|
|
51
|
-
<Typography
|
|
52
|
-
text={`Data carregamento: ${date}`}
|
|
53
|
-
color={theme.colors.neutral[25]}
|
|
54
|
-
size={theme.fontSizes.xs}
|
|
55
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
56
|
-
lineHeight={theme.fontSizes.lg}
|
|
57
|
-
letterSpacing={"regular"}
|
|
58
|
-
numberOfLines={1}
|
|
59
|
-
/>
|
|
60
|
-
</Box>
|
|
61
|
-
|
|
62
|
-
<Box height={1} backgroundColor={theme.colors.gray[950]} />
|
|
63
|
-
|
|
64
|
-
<Box
|
|
65
|
-
flexStyle={{
|
|
66
|
-
flexDirection: "row",
|
|
67
|
-
justifyContent: "space-between",
|
|
68
|
-
alignItems: "center",
|
|
69
|
-
}}
|
|
70
|
-
paddingStyle={{ padding: theme.paddings.xs }}
|
|
71
|
-
>
|
|
72
|
-
<Typography
|
|
73
|
-
text={"DURAÇÃO:"}
|
|
74
|
-
color={theme.colors.neutral[25]}
|
|
75
|
-
size={24}
|
|
76
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
77
|
-
fontWeight="400"
|
|
78
|
-
lineHeight={theme.fontSizes["3xl"]}
|
|
79
|
-
letterSpacing={"regular"}
|
|
80
|
-
/>
|
|
81
|
-
<Typography
|
|
82
|
-
text={duracao}
|
|
83
|
-
color={theme.colors.neutral[25]}
|
|
84
|
-
size={26}
|
|
85
|
-
align="left"
|
|
86
|
-
fontFamily={theme.fonts.inter_medium_500}
|
|
87
|
-
fontWeight="500"
|
|
88
|
-
lineHeight={theme.fontSizes["3xl"]}
|
|
89
|
-
letterSpacing={"regular"}
|
|
90
|
-
/>
|
|
91
|
-
</Box>
|
|
92
|
-
</Box>
|
|
93
|
-
);
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* EXPORTS
|
|
98
|
-
*/
|
|
99
|
-
export { HistoryDetails };
|
|
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
|
+
|
|
16
|
+
const HistoryDetails: React.FC<IHistoryDetails> = ({
|
|
17
|
+
numero = "01020304050607",
|
|
18
|
+
local = "Doca 1, Pátio 02 - Usimais (Ipatinga)",
|
|
19
|
+
date = "24/03/2025",
|
|
20
|
+
duracao = "00:30",
|
|
21
|
+
}) => {
|
|
22
|
+
return (
|
|
23
|
+
<Box width="100%" borderStyled={{ borderRadius: 8 }} backgroundColor={theme.colors.blue[400]}>
|
|
24
|
+
<Box
|
|
25
|
+
flexStyle={{
|
|
26
|
+
flexDirection: "column",
|
|
27
|
+
justifyContent: "flex-start",
|
|
28
|
+
alignItems: "flex-start",
|
|
29
|
+
}}
|
|
30
|
+
paddingStyle={{ padding: theme.paddings.xs }}
|
|
31
|
+
>
|
|
32
|
+
<Typography
|
|
33
|
+
text={`Carregamento - #${numero}`}
|
|
34
|
+
size={theme.fontSizes.sm}
|
|
35
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
36
|
+
fontWeight="600"
|
|
37
|
+
color={theme.colors.neutral[25]}
|
|
38
|
+
lineHeight={theme.fontSizes.xl}
|
|
39
|
+
letterSpacing={"regular"}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<Typography
|
|
43
|
+
text={local}
|
|
44
|
+
color={theme.colors.neutral[25]}
|
|
45
|
+
size={theme.fontSizes.xs}
|
|
46
|
+
lineHeight={theme.fontSizes.lg}
|
|
47
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
48
|
+
letterSpacing={"regular"}
|
|
49
|
+
numberOfLines={1}
|
|
50
|
+
/>
|
|
51
|
+
<Typography
|
|
52
|
+
text={`Data carregamento: ${date}`}
|
|
53
|
+
color={theme.colors.neutral[25]}
|
|
54
|
+
size={theme.fontSizes.xs}
|
|
55
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
56
|
+
lineHeight={theme.fontSizes.lg}
|
|
57
|
+
letterSpacing={"regular"}
|
|
58
|
+
numberOfLines={1}
|
|
59
|
+
/>
|
|
60
|
+
</Box>
|
|
61
|
+
|
|
62
|
+
<Box height={1} backgroundColor={theme.colors.gray[950]} />
|
|
63
|
+
|
|
64
|
+
<Box
|
|
65
|
+
flexStyle={{
|
|
66
|
+
flexDirection: "row",
|
|
67
|
+
justifyContent: "space-between",
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
}}
|
|
70
|
+
paddingStyle={{ padding: theme.paddings.xs }}
|
|
71
|
+
>
|
|
72
|
+
<Typography
|
|
73
|
+
text={"DURAÇÃO:"}
|
|
74
|
+
color={theme.colors.neutral[25]}
|
|
75
|
+
size={24}
|
|
76
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
77
|
+
fontWeight="400"
|
|
78
|
+
lineHeight={theme.fontSizes["3xl"]}
|
|
79
|
+
letterSpacing={"regular"}
|
|
80
|
+
/>
|
|
81
|
+
<Typography
|
|
82
|
+
text={duracao}
|
|
83
|
+
color={theme.colors.neutral[25]}
|
|
84
|
+
size={26}
|
|
85
|
+
align="left"
|
|
86
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
87
|
+
fontWeight="500"
|
|
88
|
+
lineHeight={theme.fontSizes["3xl"]}
|
|
89
|
+
letterSpacing={"regular"}
|
|
90
|
+
/>
|
|
91
|
+
</Box>
|
|
92
|
+
</Box>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* EXPORTS
|
|
98
|
+
*/
|
|
99
|
+
export { HistoryDetails };
|
|
@@ -1,92 +1,92 @@
|
|
|
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
|
-
|
|
10
|
-
// comons / icons
|
|
11
|
-
import { Icons } from "../../common/icons-svg";
|
|
12
|
-
|
|
13
|
-
// typings
|
|
14
|
-
import { IImageCaptureWithRemoveProps } from "./interface";
|
|
15
|
-
|
|
16
|
-
// styles
|
|
17
|
-
import { theme } from "../../styles/theme/theme";
|
|
18
|
-
|
|
19
|
-
// utils
|
|
20
|
-
import { getBorderColor } from "../../utils/status-color/return-color";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* Componente ImageCaptureWithRemove para a interação do usuário com ui.
|
|
25
|
-
*/
|
|
26
|
-
const ImageCaptureWithRemove: React.FC<IImageCaptureWithRemoveProps> = ({
|
|
27
|
-
width = 50,
|
|
28
|
-
height = 50,
|
|
29
|
-
foto = null,
|
|
30
|
-
useRemove = true,
|
|
31
|
-
status,
|
|
32
|
-
handleTakePhoto,
|
|
33
|
-
onRemove,
|
|
34
|
-
}: IImageCaptureWithRemoveProps) => {
|
|
35
|
-
const statusColor = status === "Cancelado" || status === "Pendente";
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<TouchableOpacity
|
|
39
|
-
testID="image-capture-touchable"
|
|
40
|
-
activeOpacity={0.7}
|
|
41
|
-
style={{ position: "relative" }}
|
|
42
|
-
onPress={handleTakePhoto}
|
|
43
|
-
disabled={!!foto}
|
|
44
|
-
>
|
|
45
|
-
<Box
|
|
46
|
-
width={width}
|
|
47
|
-
height={height}
|
|
48
|
-
flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }}
|
|
49
|
-
testID="plus-icon-box"
|
|
50
|
-
borderStyled={{
|
|
51
|
-
borderWidth: statusColor ? theme.borderWidths.thick : theme.borderWidths.thin,
|
|
52
|
-
borderRadius: theme.fontSizes.md,
|
|
53
|
-
borderColor: statusColor ? getBorderColor(status) : theme.colors.blue[400],
|
|
54
|
-
}}
|
|
55
|
-
>
|
|
56
|
-
{foto ? (
|
|
57
|
-
<>
|
|
58
|
-
<Image
|
|
59
|
-
testID="captured-image"
|
|
60
|
-
style={{
|
|
61
|
-
width: "100%",
|
|
62
|
-
height: "100%",
|
|
63
|
-
borderRadius: theme.fontSizes.md,
|
|
64
|
-
resizeMode: "cover",
|
|
65
|
-
}}
|
|
66
|
-
source={{
|
|
67
|
-
uri: foto,
|
|
68
|
-
}}
|
|
69
|
-
/>
|
|
70
|
-
|
|
71
|
-
{useRemove && (
|
|
72
|
-
<TouchableOpacity
|
|
73
|
-
testID="remove-button"
|
|
74
|
-
style={{ position: "absolute", top: 2, right: 4 }}
|
|
75
|
-
onPress={onRemove}
|
|
76
|
-
>
|
|
77
|
-
<Icons icon="X_CIRCLE" color={theme.colors.red[400]} size={18} />
|
|
78
|
-
</TouchableOpacity>
|
|
79
|
-
)}
|
|
80
|
-
</>
|
|
81
|
-
) : (
|
|
82
|
-
<Icons icon="PLUS" color={theme.colors.blue[400]} />
|
|
83
|
-
)}
|
|
84
|
-
</Box>
|
|
85
|
-
</TouchableOpacity>
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* EXPORTS
|
|
91
|
-
*/
|
|
92
|
-
export { ImageCaptureWithRemove };
|
|
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
|
+
|
|
10
|
+
// comons / icons
|
|
11
|
+
import { Icons } from "../../common/icons-svg";
|
|
12
|
+
|
|
13
|
+
// typings
|
|
14
|
+
import { IImageCaptureWithRemoveProps } from "./interface";
|
|
15
|
+
|
|
16
|
+
// styles
|
|
17
|
+
import { theme } from "../../styles/theme/theme";
|
|
18
|
+
|
|
19
|
+
// utils
|
|
20
|
+
import { getBorderColor } from "../../utils/status-color/return-color";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* Componente ImageCaptureWithRemove para a interação do usuário com ui.
|
|
25
|
+
*/
|
|
26
|
+
const ImageCaptureWithRemove: React.FC<IImageCaptureWithRemoveProps> = ({
|
|
27
|
+
width = 50,
|
|
28
|
+
height = 50,
|
|
29
|
+
foto = null,
|
|
30
|
+
useRemove = true,
|
|
31
|
+
status,
|
|
32
|
+
handleTakePhoto,
|
|
33
|
+
onRemove,
|
|
34
|
+
}: IImageCaptureWithRemoveProps) => {
|
|
35
|
+
const statusColor = status === "Cancelado" || status === "Pendente";
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<TouchableOpacity
|
|
39
|
+
testID="image-capture-touchable"
|
|
40
|
+
activeOpacity={0.7}
|
|
41
|
+
style={{ position: "relative" }}
|
|
42
|
+
onPress={handleTakePhoto}
|
|
43
|
+
disabled={!!foto}
|
|
44
|
+
>
|
|
45
|
+
<Box
|
|
46
|
+
width={width}
|
|
47
|
+
height={height}
|
|
48
|
+
flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }}
|
|
49
|
+
testID="plus-icon-box"
|
|
50
|
+
borderStyled={{
|
|
51
|
+
borderWidth: statusColor ? theme.borderWidths.thick : theme.borderWidths.thin,
|
|
52
|
+
borderRadius: theme.fontSizes.md,
|
|
53
|
+
borderColor: statusColor ? getBorderColor(status) : theme.colors.blue[400],
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
{foto ? (
|
|
57
|
+
<>
|
|
58
|
+
<Image
|
|
59
|
+
testID="captured-image"
|
|
60
|
+
style={{
|
|
61
|
+
width: "100%",
|
|
62
|
+
height: "100%",
|
|
63
|
+
borderRadius: theme.fontSizes.md,
|
|
64
|
+
resizeMode: "cover",
|
|
65
|
+
}}
|
|
66
|
+
source={{
|
|
67
|
+
uri: foto,
|
|
68
|
+
}}
|
|
69
|
+
/>
|
|
70
|
+
|
|
71
|
+
{useRemove && (
|
|
72
|
+
<TouchableOpacity
|
|
73
|
+
testID="remove-button"
|
|
74
|
+
style={{ position: "absolute", top: 2, right: 4 }}
|
|
75
|
+
onPress={onRemove}
|
|
76
|
+
>
|
|
77
|
+
<Icons icon="X_CIRCLE" color={theme.colors.red[400]} size={18} />
|
|
78
|
+
</TouchableOpacity>
|
|
79
|
+
)}
|
|
80
|
+
</>
|
|
81
|
+
) : (
|
|
82
|
+
<Icons icon="PLUS" color={theme.colors.blue[400]} />
|
|
83
|
+
)}
|
|
84
|
+
</Box>
|
|
85
|
+
</TouchableOpacity>
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* EXPORTS
|
|
91
|
+
*/
|
|
92
|
+
export { ImageCaptureWithRemove };
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
type IImageCaptureWithRemoveProps = {
|
|
5
|
-
/**define o tamanho */
|
|
6
|
-
width?: number;
|
|
7
|
-
/**define o altura */
|
|
8
|
-
height?: number;
|
|
9
|
-
/**Imagem capturada */
|
|
10
|
-
foto?: string | null;
|
|
11
|
-
|
|
12
|
-
/**Define o status das fotos */
|
|
13
|
-
status?: "Pendente" | "Concluido" | "Cancelado" | "Andamento";
|
|
14
|
-
|
|
15
|
-
/**propiedade que define se e para utilizar o metódo de remover */
|
|
16
|
-
useRemove?: boolean;
|
|
17
|
-
|
|
18
|
-
/**Remove a imagem capturada */
|
|
19
|
-
onRemove: () => void;
|
|
20
|
-
|
|
21
|
-
/**Captura a imagem */
|
|
22
|
-
handleTakePhoto: () => void;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* EXPORTS
|
|
27
|
-
*/
|
|
28
|
-
export { IImageCaptureWithRemoveProps };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
type IImageCaptureWithRemoveProps = {
|
|
5
|
+
/**define o tamanho */
|
|
6
|
+
width?: number;
|
|
7
|
+
/**define o altura */
|
|
8
|
+
height?: number;
|
|
9
|
+
/**Imagem capturada */
|
|
10
|
+
foto?: string | null;
|
|
11
|
+
|
|
12
|
+
/**Define o status das fotos */
|
|
13
|
+
status?: "Pendente" | "Concluido" | "Cancelado" | "Andamento";
|
|
14
|
+
|
|
15
|
+
/**propiedade que define se e para utilizar o metódo de remover */
|
|
16
|
+
useRemove?: boolean;
|
|
17
|
+
|
|
18
|
+
/**Remove a imagem capturada */
|
|
19
|
+
onRemove: () => void;
|
|
20
|
+
|
|
21
|
+
/**Captura a imagem */
|
|
22
|
+
handleTakePhoto: () => void;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* EXPORTS
|
|
27
|
+
*/
|
|
28
|
+
export { IImageCaptureWithRemoveProps };
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
|
|
6
|
-
// component
|
|
7
|
-
import { Box } from "../box";
|
|
8
|
-
import { Typography } from "../typography";
|
|
9
|
-
import { Button } from "../button";
|
|
10
|
-
|
|
11
|
-
// typings
|
|
12
|
-
import { ILoadingProgress } from "./interface";
|
|
13
|
-
|
|
14
|
-
// styles
|
|
15
|
-
import { theme } from "../../styles/theme/theme";
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* Componente LoadingProgress para a interação do usuário com ui.
|
|
20
|
-
*/
|
|
21
|
-
const LoadingProgress: React.FC<ILoadingProgress> = ({
|
|
22
|
-
textLoading,
|
|
23
|
-
handleClick,
|
|
24
|
-
backgroundColor,
|
|
25
|
-
}: ILoadingProgress) => {
|
|
26
|
-
const truncatedText =
|
|
27
|
-
textLoading.length > 15 ? textLoading.substring(0, 13) + "..." : textLoading;
|
|
28
|
-
return (
|
|
29
|
-
<Box>
|
|
30
|
-
<Typography
|
|
31
|
-
text="Carregamento em Andamento"
|
|
32
|
-
size={theme.fontSizes.lg}
|
|
33
|
-
fontFamily={theme.fonts.inter_medium_500}
|
|
34
|
-
color={theme.colors.gray[800]}
|
|
35
|
-
/>
|
|
36
|
-
<Box
|
|
37
|
-
paddingStyle={{ padding: theme.paddings["2xs"] }}
|
|
38
|
-
backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
|
|
39
|
-
borderStyled={{
|
|
40
|
-
borderWidth: theme.borderWidths.thin,
|
|
41
|
-
borderRadius: theme.borderWidths.thick_large,
|
|
42
|
-
borderStyle: "dashed",
|
|
43
|
-
borderColor: theme.colors.neutral[200],
|
|
44
|
-
}}
|
|
45
|
-
marginStyle={{ marginTop: theme.margins["2xs"], marginBottom: theme.margins["2xs"] }}
|
|
46
|
-
>
|
|
47
|
-
<Box flexStyle={{ flexDirection: "row", textAlign: "center" }}>
|
|
48
|
-
<Typography
|
|
49
|
-
text={"N° Carregamento: "}
|
|
50
|
-
size={theme.fontSizes.md}
|
|
51
|
-
fontFamily={theme.fonts.inter_bold_700}
|
|
52
|
-
color={theme.colors.blue[400]}
|
|
53
|
-
/>
|
|
54
|
-
|
|
55
|
-
<Typography
|
|
56
|
-
text={truncatedText}
|
|
57
|
-
size={theme.fontSizes.md}
|
|
58
|
-
fontFamily={theme.fonts.inter_medium_500}
|
|
59
|
-
color={theme.colors.gray[800]}
|
|
60
|
-
letterSpacing={"regular"}
|
|
61
|
-
/>
|
|
62
|
-
</Box>
|
|
63
|
-
<Box
|
|
64
|
-
flexStyle={{ alignItems: "center", justifyContent: "center", flexDirection: "row" }}
|
|
65
|
-
marginStyle={{ marginTop: theme.margins["2xs"] }}
|
|
66
|
-
>
|
|
67
|
-
<Button
|
|
68
|
-
title={"Visualizar"}
|
|
69
|
-
onPress={handleClick}
|
|
70
|
-
backgroundColor={theme.colors.blue[400]}
|
|
71
|
-
isLoading={false}
|
|
72
|
-
height={32}
|
|
73
|
-
width={"75%"}
|
|
74
|
-
buttonTextStyle={{
|
|
75
|
-
color: theme.colors.neutral[25],
|
|
76
|
-
fontFamily: theme.fonts.inter_medium_500,
|
|
77
|
-
fontSize: theme.fontSizes.lg,
|
|
78
|
-
}}
|
|
79
|
-
flexStyle={{ alignItems: "center", justifyContent: "center", flexDirection: "row" }}
|
|
80
|
-
borderStyled={{
|
|
81
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
82
|
-
}}
|
|
83
|
-
/>
|
|
84
|
-
</Box>
|
|
85
|
-
</Box>
|
|
86
|
-
</Box>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* EXPORTS
|
|
92
|
-
*/
|
|
93
|
-
export { LoadingProgress };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
// component
|
|
7
|
+
import { Box } from "../box";
|
|
8
|
+
import { Typography } from "../typography";
|
|
9
|
+
import { Button } from "../button";
|
|
10
|
+
|
|
11
|
+
// typings
|
|
12
|
+
import { ILoadingProgress } from "./interface";
|
|
13
|
+
|
|
14
|
+
// styles
|
|
15
|
+
import { theme } from "../../styles/theme/theme";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* Componente LoadingProgress para a interação do usuário com ui.
|
|
20
|
+
*/
|
|
21
|
+
const LoadingProgress: React.FC<ILoadingProgress> = ({
|
|
22
|
+
textLoading,
|
|
23
|
+
handleClick,
|
|
24
|
+
backgroundColor,
|
|
25
|
+
}: ILoadingProgress) => {
|
|
26
|
+
const truncatedText =
|
|
27
|
+
textLoading.length > 15 ? textLoading.substring(0, 13) + "..." : textLoading;
|
|
28
|
+
return (
|
|
29
|
+
<Box>
|
|
30
|
+
<Typography
|
|
31
|
+
text="Carregamento em Andamento"
|
|
32
|
+
size={theme.fontSizes.lg}
|
|
33
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
34
|
+
color={theme.colors.gray[800]}
|
|
35
|
+
/>
|
|
36
|
+
<Box
|
|
37
|
+
paddingStyle={{ padding: theme.paddings["2xs"] }}
|
|
38
|
+
backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
|
|
39
|
+
borderStyled={{
|
|
40
|
+
borderWidth: theme.borderWidths.thin,
|
|
41
|
+
borderRadius: theme.borderWidths.thick_large,
|
|
42
|
+
borderStyle: "dashed",
|
|
43
|
+
borderColor: theme.colors.neutral[200],
|
|
44
|
+
}}
|
|
45
|
+
marginStyle={{ marginTop: theme.margins["2xs"], marginBottom: theme.margins["2xs"] }}
|
|
46
|
+
>
|
|
47
|
+
<Box flexStyle={{ flexDirection: "row", textAlign: "center" }}>
|
|
48
|
+
<Typography
|
|
49
|
+
text={"N° Carregamento: "}
|
|
50
|
+
size={theme.fontSizes.md}
|
|
51
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
52
|
+
color={theme.colors.blue[400]}
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<Typography
|
|
56
|
+
text={truncatedText}
|
|
57
|
+
size={theme.fontSizes.md}
|
|
58
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
59
|
+
color={theme.colors.gray[800]}
|
|
60
|
+
letterSpacing={"regular"}
|
|
61
|
+
/>
|
|
62
|
+
</Box>
|
|
63
|
+
<Box
|
|
64
|
+
flexStyle={{ alignItems: "center", justifyContent: "center", flexDirection: "row" }}
|
|
65
|
+
marginStyle={{ marginTop: theme.margins["2xs"] }}
|
|
66
|
+
>
|
|
67
|
+
<Button
|
|
68
|
+
title={"Visualizar"}
|
|
69
|
+
onPress={handleClick}
|
|
70
|
+
backgroundColor={theme.colors.blue[400]}
|
|
71
|
+
isLoading={false}
|
|
72
|
+
height={32}
|
|
73
|
+
width={"75%"}
|
|
74
|
+
buttonTextStyle={{
|
|
75
|
+
color: theme.colors.neutral[25],
|
|
76
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
77
|
+
fontSize: theme.fontSizes.lg,
|
|
78
|
+
}}
|
|
79
|
+
flexStyle={{ alignItems: "center", justifyContent: "center", flexDirection: "row" }}
|
|
80
|
+
borderStyled={{
|
|
81
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
82
|
+
}}
|
|
83
|
+
/>
|
|
84
|
+
</Box>
|
|
85
|
+
</Box>
|
|
86
|
+
</Box>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* EXPORTS
|
|
92
|
+
*/
|
|
93
|
+
export { LoadingProgress };
|