react-native-exp-fig 0.1.18 → 0.1.19
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/index.js +2 -1
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/components/activities-daily/index.js +6 -5
- package/lib/commonjs/components/activities-daily/index.js.map +1 -1
- package/lib/commonjs/components/activities-progress/index.js +4 -3
- 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/notification-loading/index.js +5 -6
- package/lib/commonjs/components/notification-loading/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/index.js +9 -9
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/interface.d.js.map +1 -1
- package/lib/commonjs/components/step-indicator/styles.js +6 -6
- package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
- package/lib/commonjs/stories/activities-progress/activities-progress.stories.js +4 -4
- package/lib/commonjs/stories/activities-progress/activities-progress.stories.js.map +1 -1
- package/lib/commonjs/stories/step-indicator/step-indicator.stories.js +34 -7
- package/lib/commonjs/stories/step-indicator/step-indicator.stories.js.map +1 -1
- package/lib/commonjs/utils/get-icon-by-property/index.js +4 -2
- package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -1
- package/lib/module/common/icons-svg/index.js +2 -1
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/components/activities-daily/index.js +6 -5
- package/lib/module/components/activities-daily/index.js.map +1 -1
- package/lib/module/components/activities-progress/index.js +4 -3
- 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/notification-loading/index.js +5 -6
- package/lib/module/components/notification-loading/index.js.map +1 -1
- package/lib/module/components/step-indicator/index.js +9 -9
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/step-indicator/interface.d.js.map +1 -1
- package/lib/module/components/step-indicator/styles.js +6 -6
- package/lib/module/components/step-indicator/styles.js.map +1 -1
- package/lib/module/stories/activities-progress/activities-progress.stories.js +4 -4
- package/lib/module/stories/activities-progress/activities-progress.stories.js.map +1 -1
- package/lib/module/stories/step-indicator/step-indicator.stories.js +33 -6
- package/lib/module/stories/step-indicator/step-indicator.stories.js.map +1 -1
- package/lib/module/utils/get-icon-by-property/index.js +4 -2
- package/lib/module/utils/get-icon-by-property/index.js.map +1 -1
- package/lib/typescript/src/stories/step-indicator/step-indicator.stories.d.ts +1 -0
- package/package.json +1 -1
- package/src/common/icons-svg/index.tsx +1 -1
- package/src/components/activities-daily/index.tsx +116 -116
- package/src/components/activities-progress/index.tsx +4 -3
- package/src/components/activities-progress/interface.d.ts +2 -2
- package/src/components/notification-loading/index.tsx +157 -162
- package/src/components/step-indicator/index.tsx +166 -164
- package/src/components/step-indicator/interface.d.ts +35 -34
- package/src/components/step-indicator/styles.ts +68 -68
- package/src/stories/activities-progress/activities-progress.stories.tsx +4 -4
- package/src/stories/step-indicator/step-indicator.stories.tsx +154 -124
- package/src/utils/get-icon-by-property/index.tsx +2 -1
|
@@ -1,124 +1,154 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
// components
|
|
4
|
-
import { StepIndicator } from "../../components/step-indicator";
|
|
5
|
-
|
|
6
|
-
// styles
|
|
7
|
-
import { theme } from "../../styles/theme/theme";
|
|
8
|
-
|
|
9
|
-
const meta: Meta<typeof StepIndicator> = {
|
|
10
|
-
title: "Componente/StepIndicator",
|
|
11
|
-
component: StepIndicator,
|
|
12
|
-
args: {
|
|
13
|
-
data: [
|
|
14
|
-
{
|
|
15
|
-
id: 1,
|
|
16
|
-
descricao: "Repouso Noturno",
|
|
17
|
-
data_inicio: "07/03/2024 14:52",
|
|
18
|
-
data_fim: "07/03/2024 17:52",
|
|
19
|
-
duracao_segundos: "3601",
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
titleColor: theme.colors.neutral[25],
|
|
24
|
-
titleNumberColor: theme.colors.neutral[25],
|
|
25
|
-
},
|
|
26
|
-
parameters: {
|
|
27
|
-
notes: `
|
|
28
|
-
# StepIndicator
|
|
29
|
-
|
|
30
|
-
Este é um componente de step indicator.
|
|
31
|
-
Você usa assim:
|
|
32
|
-
\`\`\`tsx
|
|
33
|
-
<StepIndicator
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: 2,
|
|
57
|
-
descricao: "Descarga",
|
|
58
|
-
data_inicio: "06/03/2024 14:52",
|
|
59
|
-
data_fim: "06/03/2024 16:52",
|
|
60
|
-
duracao_segundos: "7200",
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
{
|
|
66
|
-
id: 1,
|
|
67
|
-
descricao: "
|
|
68
|
-
data_inicio: "",
|
|
69
|
-
data_fim: "",
|
|
70
|
-
duracao_segundos: "",
|
|
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
|
-
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
// components
|
|
4
|
+
import { StepIndicator } from "../../components/step-indicator";
|
|
5
|
+
|
|
6
|
+
// styles
|
|
7
|
+
import { theme } from "../../styles/theme/theme";
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof StepIndicator> = {
|
|
10
|
+
title: "Componente/StepIndicator",
|
|
11
|
+
component: StepIndicator,
|
|
12
|
+
args: {
|
|
13
|
+
data: [
|
|
14
|
+
{
|
|
15
|
+
id: 1,
|
|
16
|
+
descricao: "Repouso Noturno",
|
|
17
|
+
data_inicio: "07/03/2024 14:52",
|
|
18
|
+
data_fim: "07/03/2024 17:52",
|
|
19
|
+
duracao_segundos: "3601",
|
|
20
|
+
sincronizado: true,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
titleColor: theme.colors.neutral[25],
|
|
24
|
+
titleNumberColor: theme.colors.neutral[25],
|
|
25
|
+
},
|
|
26
|
+
parameters: {
|
|
27
|
+
notes: `
|
|
28
|
+
# StepIndicator
|
|
29
|
+
|
|
30
|
+
Este é um componente de step indicator.
|
|
31
|
+
Você usa assim:
|
|
32
|
+
\`\`\`tsx
|
|
33
|
+
<StepIndicator
|
|
34
|
+
type="default"
|
|
35
|
+
data={dataMock}
|
|
36
|
+
/>
|
|
37
|
+
\`\`\`
|
|
38
|
+
`,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default meta;
|
|
43
|
+
|
|
44
|
+
type Story = StoryObj<typeof meta>;
|
|
45
|
+
|
|
46
|
+
const dataMock = [
|
|
47
|
+
{
|
|
48
|
+
id: 1,
|
|
49
|
+
descricao: "Repouso Noturno",
|
|
50
|
+
data_inicio: "07/03/2024 14:52",
|
|
51
|
+
data_fim: "07/03/2024 17:52",
|
|
52
|
+
duracao_segundos: "3601",
|
|
53
|
+
sincronizado: true,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 2,
|
|
57
|
+
descricao: "Descarga",
|
|
58
|
+
data_inicio: "06/03/2024 14:52",
|
|
59
|
+
data_fim: "06/03/2024 16:52",
|
|
60
|
+
duracao_segundos: "7200",
|
|
61
|
+
sincronizado: true,
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
const dataMockFalse = [
|
|
65
|
+
{
|
|
66
|
+
id: 1,
|
|
67
|
+
descricao: "Repouso Noturno",
|
|
68
|
+
data_inicio: "07/03/2024 14:52",
|
|
69
|
+
data_fim: "07/03/2024 17:52",
|
|
70
|
+
duracao_segundos: "3601",
|
|
71
|
+
sincronizado: false,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: 2,
|
|
75
|
+
descricao: "Descarga",
|
|
76
|
+
data_inicio: "06/03/2024 14:52",
|
|
77
|
+
data_fim: "06/03/2024 16:52",
|
|
78
|
+
duracao_segundos: "7200",
|
|
79
|
+
sincronizado: false,
|
|
80
|
+
},
|
|
81
|
+
];
|
|
82
|
+
|
|
83
|
+
const dataMockCustom = [
|
|
84
|
+
{
|
|
85
|
+
id: 1,
|
|
86
|
+
descricao: "Pedido Realizado",
|
|
87
|
+
data_inicio: "",
|
|
88
|
+
data_fim: "",
|
|
89
|
+
duracao_segundos: "",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 2,
|
|
93
|
+
descricao: "Pagamento Aprovado",
|
|
94
|
+
data_inicio: "07/03/2024 14:52",
|
|
95
|
+
data_fim: "07/03/2024 17:52",
|
|
96
|
+
duracao_segundos: "3601",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 3,
|
|
100
|
+
descricao: "Pedido Faturado",
|
|
101
|
+
data_inicio: "",
|
|
102
|
+
data_fim: "",
|
|
103
|
+
duracao_segundos: "",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: 4,
|
|
107
|
+
descricao: "Pedido Enviado",
|
|
108
|
+
data_inicio: "",
|
|
109
|
+
data_fim: "",
|
|
110
|
+
duracao_segundos: "",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: 4,
|
|
114
|
+
descricao: "Pedido Entregue",
|
|
115
|
+
data_inicio: "07/03/2024 14:52",
|
|
116
|
+
data_fim: "07/03/2024 17:52",
|
|
117
|
+
duracao_segundos: "3601",
|
|
118
|
+
},
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
export const StepIndicatorDefault: Story = {
|
|
122
|
+
name: "step-indicator-default",
|
|
123
|
+
args: {
|
|
124
|
+
data: dataMock,
|
|
125
|
+
type: "default",
|
|
126
|
+
sincronizado: true,
|
|
127
|
+
titleColor: theme.colors.neutral[25],
|
|
128
|
+
textColorDescription: theme.colors.gray[300],
|
|
129
|
+
titleNumberColor: theme.colors.neutral[25],
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
export const StepIndicatorSincronizadoFalse: Story = {
|
|
133
|
+
name: "step-indicator-sincronizado-false",
|
|
134
|
+
args: {
|
|
135
|
+
data: dataMockFalse,
|
|
136
|
+
type: "default",
|
|
137
|
+
sincronizado: false,
|
|
138
|
+
titleColor: theme.colors.neutral[25],
|
|
139
|
+
textColorDescription: theme.colors.gray[300],
|
|
140
|
+
titleNumberColor: theme.colors.neutral[25],
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export const StepIndicationCustom: Story = {
|
|
145
|
+
name: "step-indicator-custom",
|
|
146
|
+
args: {
|
|
147
|
+
data: dataMockCustom,
|
|
148
|
+
type: "custom",
|
|
149
|
+
backgroundColorBall: theme.colors.orange[150],
|
|
150
|
+
titleColor: theme.colors.blue[500],
|
|
151
|
+
textColorDescription: theme.colors.gray[300],
|
|
152
|
+
titleNumberColor: theme.colors.neutral[25],
|
|
153
|
+
},
|
|
154
|
+
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { Icons } from "../../common/icons-svg";
|
|
7
|
+
import { theme } from "../../styles/theme/theme";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Function that will map property types to corresponding icons in SVG 🛠️.
|
|
@@ -23,7 +24,7 @@ const getIconByProperty: React.FC<any> = (propertyType: string, color?: string)
|
|
|
23
24
|
return <Icons color={color} icon="TIMER" />;
|
|
24
25
|
|
|
25
26
|
case "disposicao_veiculo_parado":
|
|
26
|
-
return <Icons color={
|
|
27
|
+
return <Icons color={theme.colors.blue[500]} size={20} icon="TRUCK_ACTIVITY" />;
|
|
27
28
|
|
|
28
29
|
case "aguardando_descarga":
|
|
29
30
|
return <Icons color={color} icon="HOURGLASS" />;
|