react-native-exp-fig 0.1.19 → 0.1.21
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/steering-wheel/index.js +6 -6
- package/lib/commonjs/common/icons-svg/steering-wheel/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/truck/index.js +10 -8
- package/lib/commonjs/common/icons-svg/truck/index.js.map +1 -1
- package/lib/commonjs/components/activities-progress/index.js +1 -1
- package/lib/commonjs/components/activities-progress/index.js.map +1 -1
- package/lib/commonjs/components/loading-details/index.js +13 -11
- package/lib/commonjs/components/loading-details/index.js.map +1 -1
- package/lib/commonjs/components/loading-details/interface.d.js.map +1 -1
- package/lib/commonjs/stories/loading-details/loading-details.stories.js +14 -2
- package/lib/commonjs/stories/loading-details/loading-details.stories.js.map +1 -1
- package/lib/commonjs/styles/theme/theme.js +5 -4
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -1
- package/lib/module/common/icons-svg/steering-wheel/index.js +6 -6
- package/lib/module/common/icons-svg/steering-wheel/index.js.map +1 -1
- package/lib/module/common/icons-svg/truck/index.js +10 -8
- package/lib/module/common/icons-svg/truck/index.js.map +1 -1
- package/lib/module/components/activities-progress/index.js +1 -1
- package/lib/module/components/activities-progress/index.js.map +1 -1
- package/lib/module/components/loading-details/index.js +13 -11
- package/lib/module/components/loading-details/index.js.map +1 -1
- package/lib/module/components/loading-details/interface.d.js.map +1 -1
- package/lib/module/stories/loading-details/loading-details.stories.js +13 -1
- package/lib/module/stories/loading-details/loading-details.stories.js.map +1 -1
- package/lib/module/styles/theme/theme.js +5 -4
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/module/utils/get-icon-by-property/index.js.map +1 -1
- package/lib/typescript/src/stories/loading-details/loading-details.stories.d.ts +1 -0
- package/lib/typescript/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/src/styles/theme/theme.d.ts +1 -0
- package/package.json +1 -1
- package/src/common/icons-svg/steering-wheel/index.tsx +49 -49
- package/src/common/icons-svg/truck/index.tsx +41 -39
- package/src/components/activities-progress/index.tsx +1 -1
- package/src/components/loading-details/index.tsx +156 -154
- package/src/components/loading-details/interface.d.ts +31 -28
- package/src/stories/loading-details/loading-details.stories.tsx +60 -48
- package/src/styles/theme/theme.ts +172 -171
- package/src/utils/get-icon-by-property/index.tsx +1 -0
|
@@ -1,154 +1,156 @@
|
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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 };
|
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
type ILoadingDetails = {
|
|
5
|
-
/**número do carregamento */
|
|
6
|
-
numero: string;
|
|
7
|
-
/**local onde vai ser o carregamento */
|
|
8
|
-
local: string;
|
|
9
|
-
/**data de quando o carregamento vai ser realizado */
|
|
10
|
-
date: string;
|
|
11
|
-
/**duração para o carregamento */
|
|
12
|
-
duracao: string;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**função que inicia o carregamento */
|
|
22
|
-
handleClickStart: () => void;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
type ILoadingDetails = {
|
|
5
|
+
/**número do carregamento */
|
|
6
|
+
numero: string;
|
|
7
|
+
/**local onde vai ser o carregamento */
|
|
8
|
+
local: string;
|
|
9
|
+
/**data de quando o carregamento vai ser realizado */
|
|
10
|
+
date: string;
|
|
11
|
+
/**duração para o carregamento */
|
|
12
|
+
duracao: string;
|
|
13
|
+
|
|
14
|
+
/**Actions */
|
|
15
|
+
/**carregamento do inicio do start */
|
|
16
|
+
isLoadingStart?: boolean;
|
|
17
|
+
|
|
18
|
+
/**função usada para voltar usuário */
|
|
19
|
+
handleClickGoback: () => void;
|
|
20
|
+
|
|
21
|
+
/**função que inicia o carregamento */
|
|
22
|
+
handleClickStart: () => void;
|
|
23
|
+
|
|
24
|
+
/**para desabilitar o button de iniciar o carregamento*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* EXPORTS
|
|
30
|
+
*/
|
|
31
|
+
export { ILoadingDetails };
|
|
@@ -1,48 +1,60 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { StoryObj, Meta } from "@storybook/react";
|
|
3
|
-
|
|
4
|
-
import { LoadingDetails } from "../../components/loading-details";
|
|
5
|
-
|
|
6
|
-
const meta: Meta<typeof LoadingDetails> = {
|
|
7
|
-
title: "componente/LoadingDetails",
|
|
8
|
-
component: LoadingDetails as React.FC,
|
|
9
|
-
args: {
|
|
10
|
-
numero: "01",
|
|
11
|
-
local: "Doca 1, Pátio 02 - Ultrimais (Ipatinga)",
|
|
12
|
-
date: "24/03/2025",
|
|
13
|
-
duracao: "00:00",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
import { LoadingDetails } from "../../components/loading-details";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof LoadingDetails> = {
|
|
7
|
+
title: "componente/LoadingDetails",
|
|
8
|
+
component: LoadingDetails as React.FC,
|
|
9
|
+
args: {
|
|
10
|
+
numero: "01",
|
|
11
|
+
local: "Doca 1, Pátio 02 - Ultrimais (Ipatinga)",
|
|
12
|
+
date: "24/03/2025",
|
|
13
|
+
duracao: "00:00",
|
|
14
|
+
disabled: false,
|
|
15
|
+
},
|
|
16
|
+
parameters: {
|
|
17
|
+
notes: `
|
|
18
|
+
# LoadingDetails
|
|
19
|
+
|
|
20
|
+
Este é um componente de LoadingDetails.
|
|
21
|
+
Você usa assim:
|
|
22
|
+
\`\`\`tsx
|
|
23
|
+
<LoadingDetails
|
|
24
|
+
numero="01"
|
|
25
|
+
local="Doca 1, Pátio 02 - Usiminas (Ipatinga)"
|
|
26
|
+
date="24/03/2025"
|
|
27
|
+
duracao="00:00"
|
|
28
|
+
handleClickGoback={() => {}}
|
|
29
|
+
isLoadingStart={false}
|
|
30
|
+
handleClickStart={() => {}}
|
|
31
|
+
disabled={true}
|
|
32
|
+
/>
|
|
33
|
+
\`\`\`
|
|
34
|
+
`,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default meta;
|
|
39
|
+
|
|
40
|
+
type Story = StoryObj<typeof meta>;
|
|
41
|
+
|
|
42
|
+
export const Profile: Story = {
|
|
43
|
+
name: "loading-details",
|
|
44
|
+
args: {
|
|
45
|
+
numero: "01",
|
|
46
|
+
local: "Doca 1, Pátio 02 - Ultrimais (Ipatinga)",
|
|
47
|
+
date: "24/03/2025",
|
|
48
|
+
duracao: "00:00",
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
export const ProfileDisabled: Story = {
|
|
52
|
+
name: "loading-details-disabled",
|
|
53
|
+
args: {
|
|
54
|
+
numero: "01",
|
|
55
|
+
local: "Doca 1, Pátio 02 - Ultrimais (Ipatinga)",
|
|
56
|
+
date: "24/03/2025",
|
|
57
|
+
duracao: "00:00",
|
|
58
|
+
disabled: true,
|
|
59
|
+
},
|
|
60
|
+
};
|