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,156 +1,156 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
|
|
6
|
-
// components
|
|
7
|
-
import
|
|
8
|
-
import { Button } from "../button";
|
|
9
|
-
import { Typography } from "../typography";
|
|
10
|
-
|
|
11
|
-
// typings
|
|
12
|
-
import { ILoadingDetails } from "./interface";
|
|
13
|
-
|
|
14
|
-
// styles
|
|
15
|
-
import { theme } from "../../styles/theme/theme";
|
|
16
|
-
|
|
17
|
-
const LoadingDetails: React.FC<ILoadingDetails> = ({
|
|
18
|
-
numero = "01020304050607",
|
|
19
|
-
local = "Doca 1, Pátio 02 - Usimais (Ipatinga)",
|
|
20
|
-
date = "24/03/2025",
|
|
21
|
-
duracao = "00:00",
|
|
22
|
-
isLoadingStart = false,
|
|
23
|
-
disabled,
|
|
24
|
-
handleClickGoback,
|
|
25
|
-
handleClickStart,
|
|
26
|
-
}: ILoadingDetails) => {
|
|
27
|
-
return (
|
|
28
|
-
<Box
|
|
29
|
-
width="100%"
|
|
30
|
-
borderStyled={{ borderRadius: 8 }}
|
|
31
|
-
style={{
|
|
32
|
-
shadowColor: theme.colors.black[10],
|
|
33
|
-
shadowOpacity: 0.1,
|
|
34
|
-
shadowOffset: { width: 0, height: 2 },
|
|
35
|
-
shadowRadius: 4,
|
|
36
|
-
elevation: 2,
|
|
37
|
-
}}
|
|
38
|
-
backgroundColor={theme.colors.blue[400]}
|
|
39
|
-
>
|
|
40
|
-
<Box
|
|
41
|
-
width={"100%"}
|
|
42
|
-
flexStyle={{
|
|
43
|
-
flexDirection: "row",
|
|
44
|
-
alignItems: "center",
|
|
45
|
-
justifyContent: "space-between",
|
|
46
|
-
}}
|
|
47
|
-
paddingStyle={{ padding: theme.paddings.md }}
|
|
48
|
-
>
|
|
49
|
-
<Box
|
|
50
|
-
width={"78%"}
|
|
51
|
-
flexStyle={{
|
|
52
|
-
flexDirection: "column",
|
|
53
|
-
justifyContent: "flex-start",
|
|
54
|
-
alignItems: "flex-start",
|
|
55
|
-
}}
|
|
56
|
-
>
|
|
57
|
-
<Typography
|
|
58
|
-
text={`Carregamento - #${numero}`}
|
|
59
|
-
size={theme.fontSizes.sm}
|
|
60
|
-
fontFamily={theme.fonts.inter_bold}
|
|
61
|
-
fontWeight="700"
|
|
62
|
-
color={theme.colors.neutral[25]}
|
|
63
|
-
lineHeight={theme.fontSizes["lg"]}
|
|
64
|
-
letterSpacing={"regular"}
|
|
65
|
-
/>
|
|
66
|
-
|
|
67
|
-
<Typography
|
|
68
|
-
text={local}
|
|
69
|
-
color={theme.colors.neutral[25]}
|
|
70
|
-
size={theme.fontSizes.xs}
|
|
71
|
-
lineHeight={theme.fontSizes["2xl"]}
|
|
72
|
-
letterSpacing={"regular"}
|
|
73
|
-
numberOfLines={1}
|
|
74
|
-
/>
|
|
75
|
-
<Typography
|
|
76
|
-
text={`Data carregamento: ${date}`}
|
|
77
|
-
color={theme.colors.neutral[25]}
|
|
78
|
-
size={theme.fontSizes.xs}
|
|
79
|
-
lineHeight={theme.fontSizes["2xl"]}
|
|
80
|
-
letterSpacing={"regular"}
|
|
81
|
-
numberOfLines={1}
|
|
82
|
-
/>
|
|
83
|
-
</Box>
|
|
84
|
-
|
|
85
|
-
<Typography
|
|
86
|
-
text={duracao}
|
|
87
|
-
color={theme.colors.neutral[25]}
|
|
88
|
-
size={24}
|
|
89
|
-
align="left"
|
|
90
|
-
fontFamily="inter_bold"
|
|
91
|
-
fontWeight="700"
|
|
92
|
-
lineHeight={theme.fontSizes["3xl"]}
|
|
93
|
-
letterSpacing={"regular"}
|
|
94
|
-
/>
|
|
95
|
-
</Box>
|
|
96
|
-
|
|
97
|
-
<Box
|
|
98
|
-
height={1}
|
|
99
|
-
backgroundColor={theme.colors.gray[950]}
|
|
100
|
-
marginStyle={{ marginTop: theme.margins.xs, marginBottom: theme.margins.xs }}
|
|
101
|
-
/>
|
|
102
|
-
|
|
103
|
-
<Box style={{ flexDirection: "row", gap: 12, marginBottom: 8, padding: theme.paddings.md }}>
|
|
104
|
-
<Button
|
|
105
|
-
testID="iniciar-button"
|
|
106
|
-
title="INICIAR"
|
|
107
|
-
onPress={handleClickStart}
|
|
108
|
-
height={40}
|
|
109
|
-
isLoading={isLoadingStart}
|
|
110
|
-
disabled={disabled}
|
|
111
|
-
backgroundColor={disabled ? theme.colors.green[100] : theme.colors.green[250]}
|
|
112
|
-
flexStyle={{ flex: 1, alignItems: "center", justifyContent: "center" }}
|
|
113
|
-
buttonTextStyle={{
|
|
114
|
-
color: theme.colors.neutral[25],
|
|
115
|
-
fontFamily: theme.fonts.inter_semi_bold_600,
|
|
116
|
-
fontSize: theme.fontSizes.md,
|
|
117
|
-
fontWeight: "600",
|
|
118
|
-
textAlign: "center",
|
|
119
|
-
}}
|
|
120
|
-
borderStyled={{
|
|
121
|
-
borderWidth: theme.borderWidths.thin,
|
|
122
|
-
borderColor: disabled ? theme.colors.green[100] : theme.colors.green[250],
|
|
123
|
-
borderRadius: theme.fontSizes["2xl"],
|
|
124
|
-
}}
|
|
125
|
-
/>
|
|
126
|
-
|
|
127
|
-
<Button
|
|
128
|
-
title="VOLTAR"
|
|
129
|
-
onPress={handleClickGoback}
|
|
130
|
-
height={40}
|
|
131
|
-
isLoading={false}
|
|
132
|
-
disabled={isLoadingStart}
|
|
133
|
-
backgroundColor={theme.colors.yellow[75]}
|
|
134
|
-
flexStyle={{ flex: 1, alignItems: "center", justifyContent: "center" }}
|
|
135
|
-
buttonTextStyle={{
|
|
136
|
-
color: theme.colors.neutral[25],
|
|
137
|
-
fontFamily: theme.fonts.inter_semi_bold_600,
|
|
138
|
-
fontSize: theme.fontSizes.md,
|
|
139
|
-
fontWeight: "600",
|
|
140
|
-
textAlign: "center",
|
|
141
|
-
}}
|
|
142
|
-
borderStyled={{
|
|
143
|
-
borderWidth: theme.borderWidths.thin,
|
|
144
|
-
borderColor: theme.colors.yellow[75],
|
|
145
|
-
borderRadius: theme.fontSizes["2xl"],
|
|
146
|
-
}}
|
|
147
|
-
/>
|
|
148
|
-
</Box>
|
|
149
|
-
</Box>
|
|
150
|
-
);
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* EXPORTS
|
|
155
|
-
*/
|
|
156
|
-
export { LoadingDetails };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
// components
|
|
7
|
+
import Box from "../box";
|
|
8
|
+
import { Button } from "../button";
|
|
9
|
+
import { Typography } from "../typography";
|
|
10
|
+
|
|
11
|
+
// typings
|
|
12
|
+
import { ILoadingDetails } from "./interface";
|
|
13
|
+
|
|
14
|
+
// styles
|
|
15
|
+
import { theme } from "../../styles/theme/theme";
|
|
16
|
+
|
|
17
|
+
const LoadingDetails: React.FC<ILoadingDetails> = ({
|
|
18
|
+
numero = "01020304050607",
|
|
19
|
+
local = "Doca 1, Pátio 02 - Usimais (Ipatinga)",
|
|
20
|
+
date = "24/03/2025",
|
|
21
|
+
duracao = "00:00",
|
|
22
|
+
isLoadingStart = false,
|
|
23
|
+
disabled,
|
|
24
|
+
handleClickGoback,
|
|
25
|
+
handleClickStart,
|
|
26
|
+
}: ILoadingDetails) => {
|
|
27
|
+
return (
|
|
28
|
+
<Box
|
|
29
|
+
width="100%"
|
|
30
|
+
borderStyled={{ borderRadius: 8 }}
|
|
31
|
+
style={{
|
|
32
|
+
shadowColor: theme.colors.black[10],
|
|
33
|
+
shadowOpacity: 0.1,
|
|
34
|
+
shadowOffset: { width: 0, height: 2 },
|
|
35
|
+
shadowRadius: 4,
|
|
36
|
+
elevation: 2,
|
|
37
|
+
}}
|
|
38
|
+
backgroundColor={theme.colors.blue[400]}
|
|
39
|
+
>
|
|
40
|
+
<Box
|
|
41
|
+
width={"100%"}
|
|
42
|
+
flexStyle={{
|
|
43
|
+
flexDirection: "row",
|
|
44
|
+
alignItems: "center",
|
|
45
|
+
justifyContent: "space-between",
|
|
46
|
+
}}
|
|
47
|
+
paddingStyle={{ padding: theme.paddings.md }}
|
|
48
|
+
>
|
|
49
|
+
<Box
|
|
50
|
+
width={"78%"}
|
|
51
|
+
flexStyle={{
|
|
52
|
+
flexDirection: "column",
|
|
53
|
+
justifyContent: "flex-start",
|
|
54
|
+
alignItems: "flex-start",
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
<Typography
|
|
58
|
+
text={`Carregamento - #${numero}`}
|
|
59
|
+
size={theme.fontSizes.sm}
|
|
60
|
+
fontFamily={theme.fonts.inter_bold}
|
|
61
|
+
fontWeight="700"
|
|
62
|
+
color={theme.colors.neutral[25]}
|
|
63
|
+
lineHeight={theme.fontSizes["lg"]}
|
|
64
|
+
letterSpacing={"regular"}
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
<Typography
|
|
68
|
+
text={local}
|
|
69
|
+
color={theme.colors.neutral[25]}
|
|
70
|
+
size={theme.fontSizes.xs}
|
|
71
|
+
lineHeight={theme.fontSizes["2xl"]}
|
|
72
|
+
letterSpacing={"regular"}
|
|
73
|
+
numberOfLines={1}
|
|
74
|
+
/>
|
|
75
|
+
<Typography
|
|
76
|
+
text={`Data carregamento: ${date}`}
|
|
77
|
+
color={theme.colors.neutral[25]}
|
|
78
|
+
size={theme.fontSizes.xs}
|
|
79
|
+
lineHeight={theme.fontSizes["2xl"]}
|
|
80
|
+
letterSpacing={"regular"}
|
|
81
|
+
numberOfLines={1}
|
|
82
|
+
/>
|
|
83
|
+
</Box>
|
|
84
|
+
|
|
85
|
+
<Typography
|
|
86
|
+
text={duracao}
|
|
87
|
+
color={theme.colors.neutral[25]}
|
|
88
|
+
size={24}
|
|
89
|
+
align="left"
|
|
90
|
+
fontFamily="inter_bold"
|
|
91
|
+
fontWeight="700"
|
|
92
|
+
lineHeight={theme.fontSizes["3xl"]}
|
|
93
|
+
letterSpacing={"regular"}
|
|
94
|
+
/>
|
|
95
|
+
</Box>
|
|
96
|
+
|
|
97
|
+
<Box
|
|
98
|
+
height={1}
|
|
99
|
+
backgroundColor={theme.colors.gray[950]}
|
|
100
|
+
marginStyle={{ marginTop: theme.margins.xs, marginBottom: theme.margins.xs }}
|
|
101
|
+
/>
|
|
102
|
+
|
|
103
|
+
<Box style={{ flexDirection: "row", gap: 12, marginBottom: 8, padding: theme.paddings.md }}>
|
|
104
|
+
<Button
|
|
105
|
+
testID="iniciar-button"
|
|
106
|
+
title="INICIAR"
|
|
107
|
+
onPress={handleClickStart}
|
|
108
|
+
height={40}
|
|
109
|
+
isLoading={isLoadingStart}
|
|
110
|
+
disabled={disabled}
|
|
111
|
+
backgroundColor={disabled ? theme.colors.green[100] : theme.colors.green[250]}
|
|
112
|
+
flexStyle={{ flex: 1, alignItems: "center", justifyContent: "center" }}
|
|
113
|
+
buttonTextStyle={{
|
|
114
|
+
color: theme.colors.neutral[25],
|
|
115
|
+
fontFamily: theme.fonts.inter_semi_bold_600,
|
|
116
|
+
fontSize: theme.fontSizes.md,
|
|
117
|
+
fontWeight: "600",
|
|
118
|
+
textAlign: "center",
|
|
119
|
+
}}
|
|
120
|
+
borderStyled={{
|
|
121
|
+
borderWidth: theme.borderWidths.thin,
|
|
122
|
+
borderColor: disabled ? theme.colors.green[100] : theme.colors.green[250],
|
|
123
|
+
borderRadius: theme.fontSizes["2xl"],
|
|
124
|
+
}}
|
|
125
|
+
/>
|
|
126
|
+
|
|
127
|
+
<Button
|
|
128
|
+
title="VOLTAR"
|
|
129
|
+
onPress={handleClickGoback}
|
|
130
|
+
height={40}
|
|
131
|
+
isLoading={false}
|
|
132
|
+
disabled={isLoadingStart}
|
|
133
|
+
backgroundColor={theme.colors.yellow[75]}
|
|
134
|
+
flexStyle={{ flex: 1, alignItems: "center", justifyContent: "center" }}
|
|
135
|
+
buttonTextStyle={{
|
|
136
|
+
color: theme.colors.neutral[25],
|
|
137
|
+
fontFamily: theme.fonts.inter_semi_bold_600,
|
|
138
|
+
fontSize: theme.fontSizes.md,
|
|
139
|
+
fontWeight: "600",
|
|
140
|
+
textAlign: "center",
|
|
141
|
+
}}
|
|
142
|
+
borderStyled={{
|
|
143
|
+
borderWidth: theme.borderWidths.thin,
|
|
144
|
+
borderColor: theme.colors.yellow[75],
|
|
145
|
+
borderRadius: theme.fontSizes["2xl"],
|
|
146
|
+
}}
|
|
147
|
+
/>
|
|
148
|
+
</Box>
|
|
149
|
+
</Box>
|
|
150
|
+
);
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* EXPORTS
|
|
155
|
+
*/
|
|
156
|
+
export { LoadingDetails };
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
/**
|
|
3
|
+
* IMPORTS
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
// libs RN
|
|
7
|
+
import { Modal, View } from "react-native";
|
|
8
|
+
|
|
9
|
+
// componentes internos
|
|
10
|
+
import Box from "../box";
|
|
11
|
+
import { Typography } from "../typography";
|
|
12
|
+
import { SelectOption } from "../selects/select-option";
|
|
13
|
+
import { Button } from "../button";
|
|
14
|
+
|
|
15
|
+
// styles / theme
|
|
16
|
+
import { theme } from "../../styles/theme/theme";
|
|
17
|
+
|
|
18
|
+
// assets / icons
|
|
19
|
+
import { Icons } from "../../common/icons-svg";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* TYPES
|
|
23
|
+
*/
|
|
24
|
+
interface IModalChangeActivityProps {
|
|
25
|
+
visible: boolean;
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
modalConfirm: (newData: { label: string; value: string; key: number }) => void;
|
|
28
|
+
dataRegistro: string;
|
|
29
|
+
descricao: string;
|
|
30
|
+
imagemUrl?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* CONSTANTS
|
|
35
|
+
*/
|
|
36
|
+
const options = [
|
|
37
|
+
{ label: "Selecione atividade", value: "none", key: 0 },
|
|
38
|
+
{ label: "Descanso", value: "descanso", key: 5 },
|
|
39
|
+
{ label: "Repouso Noturno", value: "repouso_noturno", key: 6 },
|
|
40
|
+
{ label: "Refeição", value: "refeição", key: 7 },
|
|
41
|
+
{ label: "Repouso Semanal", value: "repouso_semanal", key: 9 },
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* COMPONENT
|
|
46
|
+
*/
|
|
47
|
+
export const ModalChangeActivity: React.FC<IModalChangeActivityProps> = ({
|
|
48
|
+
visible,
|
|
49
|
+
onClose,
|
|
50
|
+
modalConfirm,
|
|
51
|
+
descricao,
|
|
52
|
+
}) => {
|
|
53
|
+
const [isLoading] = React.useState(false);
|
|
54
|
+
|
|
55
|
+
const initial = (descricao ?? "").toLowerCase().replace(/\s+/g, "_");
|
|
56
|
+
const [selectedOption, setSelectedOption] = React.useState(initial || "none");
|
|
57
|
+
|
|
58
|
+
const handleConfirm = () => {
|
|
59
|
+
const selected = options.find((opt) => opt.value === selectedOption);
|
|
60
|
+
if (selected && selected.value !== "none") {
|
|
61
|
+
modalConfirm({
|
|
62
|
+
label: selected.label,
|
|
63
|
+
value: selected.value,
|
|
64
|
+
key: selected.key,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
onClose();
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<Modal animationType="fade" transparent visible={visible}>
|
|
72
|
+
<View
|
|
73
|
+
style={{
|
|
74
|
+
flex: 1,
|
|
75
|
+
justifyContent: "center",
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
backgroundColor: "rgba(0,0,0,0.6)",
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
<Box
|
|
81
|
+
width={346}
|
|
82
|
+
backgroundColor={theme.colors.orange[500]}
|
|
83
|
+
borderStyled={{
|
|
84
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
85
|
+
}}
|
|
86
|
+
paddingStyle={{
|
|
87
|
+
paddingLeft: theme.paddings["2xs"],
|
|
88
|
+
paddingRight: theme.paddings["2xs"],
|
|
89
|
+
paddingTop: theme.paddings.sm,
|
|
90
|
+
paddingBottom: theme.paddings.sm,
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
<Box
|
|
94
|
+
marginStyle={{ marginBottom: theme.margins["2xs"], marginLeft: theme.margins["1xs"] }}
|
|
95
|
+
flexStyle={{ flexDirection: "row", alignItems: "center" }}
|
|
96
|
+
>
|
|
97
|
+
<Icons
|
|
98
|
+
icon="EXCLAMATION_TRIANGLE"
|
|
99
|
+
color={theme.colors.black[10]}
|
|
100
|
+
background={theme.colors.yellow[50]}
|
|
101
|
+
size={22}
|
|
102
|
+
/>
|
|
103
|
+
<Typography
|
|
104
|
+
text="Alterar Atividade"
|
|
105
|
+
color="#fff"
|
|
106
|
+
marginLeft={theme.margins["2xs"]}
|
|
107
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
108
|
+
size={theme.fontSizes.md}
|
|
109
|
+
/>
|
|
110
|
+
</Box>
|
|
111
|
+
|
|
112
|
+
<Box
|
|
113
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
114
|
+
paddingStyle={{ padding: theme.paddings.xs }}
|
|
115
|
+
borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
|
|
116
|
+
>
|
|
117
|
+
<Box flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }} width={"90%"}>
|
|
118
|
+
<Typography
|
|
119
|
+
text={`Deseja realmente alterar sua atividade de ${descricao || "atividade atual"}?`}
|
|
120
|
+
color={theme.colors.black[25]}
|
|
121
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
122
|
+
size={theme.fontSizes.xs}
|
|
123
|
+
style={{ flexWrap: "wrap", maxWidth: "100%" }}
|
|
124
|
+
/>
|
|
125
|
+
</Box>
|
|
126
|
+
|
|
127
|
+
<SelectOption
|
|
128
|
+
titleLabel="Selecione atividade"
|
|
129
|
+
sizeTitleLabel={theme.fontSizes.xs}
|
|
130
|
+
dataOption={options}
|
|
131
|
+
handleSelectDown={(opt) => {
|
|
132
|
+
const option = options.find((o) => o.label === opt || o.value === opt);
|
|
133
|
+
if (option) setSelectedOption(option.value);
|
|
134
|
+
}}
|
|
135
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
136
|
+
/>
|
|
137
|
+
|
|
138
|
+
<Box
|
|
139
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
140
|
+
flexStyle={{ flexDirection: "row", justifyContent: "space-between" }}
|
|
141
|
+
>
|
|
142
|
+
<Button
|
|
143
|
+
title="CANCELAR"
|
|
144
|
+
onPress={onClose}
|
|
145
|
+
width={"48%"}
|
|
146
|
+
height={36}
|
|
147
|
+
isLoading={isLoading}
|
|
148
|
+
disabled={isLoading}
|
|
149
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
150
|
+
buttonTextStyle={{
|
|
151
|
+
color: theme.colors.blue[100],
|
|
152
|
+
fontFamily: "Inter-Medium",
|
|
153
|
+
fontSize: theme.fontSizes.xs,
|
|
154
|
+
fontWeight: "500",
|
|
155
|
+
}}
|
|
156
|
+
flexStyle={{
|
|
157
|
+
flexDirection: "row",
|
|
158
|
+
alignItems: "center",
|
|
159
|
+
justifyContent: "center",
|
|
160
|
+
textAlign: "center",
|
|
161
|
+
}}
|
|
162
|
+
borderStyled={{
|
|
163
|
+
borderWidth: theme.borderWidths.thin,
|
|
164
|
+
borderColor: theme.colors.blue[100],
|
|
165
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
166
|
+
}}
|
|
167
|
+
/>
|
|
168
|
+
<Button
|
|
169
|
+
title="CONFIRMAR"
|
|
170
|
+
onPress={handleConfirm}
|
|
171
|
+
width={"48%"}
|
|
172
|
+
height={36}
|
|
173
|
+
isLoading={isLoading}
|
|
174
|
+
disabled={isLoading}
|
|
175
|
+
backgroundColor={theme.colors.blue[100]}
|
|
176
|
+
buttonTextStyle={{
|
|
177
|
+
color: "#fff",
|
|
178
|
+
fontFamily: "Inter-Medium",
|
|
179
|
+
fontSize: theme.fontSizes.xs,
|
|
180
|
+
fontWeight: "500",
|
|
181
|
+
}}
|
|
182
|
+
flexStyle={{
|
|
183
|
+
flexDirection: "row",
|
|
184
|
+
alignItems: "center",
|
|
185
|
+
justifyContent: "center",
|
|
186
|
+
textAlign: "center",
|
|
187
|
+
}}
|
|
188
|
+
borderStyled={{
|
|
189
|
+
borderWidth: theme.borderWidths.thin,
|
|
190
|
+
borderColor: theme.colors.blue[100],
|
|
191
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
192
|
+
}}
|
|
193
|
+
/>
|
|
194
|
+
</Box>
|
|
195
|
+
</Box>
|
|
196
|
+
</Box>
|
|
197
|
+
</View>
|
|
198
|
+
</Modal>
|
|
199
|
+
);
|
|
200
|
+
};
|