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.
Files changed (53) hide show
  1. package/lib/commonjs/common/icons-svg/index.js +2 -1
  2. package/lib/commonjs/common/icons-svg/index.js.map +1 -1
  3. package/lib/commonjs/components/activities-daily/index.js +6 -5
  4. package/lib/commonjs/components/activities-daily/index.js.map +1 -1
  5. package/lib/commonjs/components/activities-progress/index.js +4 -3
  6. package/lib/commonjs/components/activities-progress/index.js.map +1 -1
  7. package/lib/commonjs/components/activities-progress/interface.d.js.map +1 -1
  8. package/lib/commonjs/components/notification-loading/index.js +5 -6
  9. package/lib/commonjs/components/notification-loading/index.js.map +1 -1
  10. package/lib/commonjs/components/step-indicator/index.js +9 -9
  11. package/lib/commonjs/components/step-indicator/index.js.map +1 -1
  12. package/lib/commonjs/components/step-indicator/interface.d.js.map +1 -1
  13. package/lib/commonjs/components/step-indicator/styles.js +6 -6
  14. package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
  15. package/lib/commonjs/stories/activities-progress/activities-progress.stories.js +4 -4
  16. package/lib/commonjs/stories/activities-progress/activities-progress.stories.js.map +1 -1
  17. package/lib/commonjs/stories/step-indicator/step-indicator.stories.js +34 -7
  18. package/lib/commonjs/stories/step-indicator/step-indicator.stories.js.map +1 -1
  19. package/lib/commonjs/utils/get-icon-by-property/index.js +4 -2
  20. package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -1
  21. package/lib/module/common/icons-svg/index.js +2 -1
  22. package/lib/module/common/icons-svg/index.js.map +1 -1
  23. package/lib/module/components/activities-daily/index.js +6 -5
  24. package/lib/module/components/activities-daily/index.js.map +1 -1
  25. package/lib/module/components/activities-progress/index.js +4 -3
  26. package/lib/module/components/activities-progress/index.js.map +1 -1
  27. package/lib/module/components/activities-progress/interface.d.js.map +1 -1
  28. package/lib/module/components/notification-loading/index.js +5 -6
  29. package/lib/module/components/notification-loading/index.js.map +1 -1
  30. package/lib/module/components/step-indicator/index.js +9 -9
  31. package/lib/module/components/step-indicator/index.js.map +1 -1
  32. package/lib/module/components/step-indicator/interface.d.js.map +1 -1
  33. package/lib/module/components/step-indicator/styles.js +6 -6
  34. package/lib/module/components/step-indicator/styles.js.map +1 -1
  35. package/lib/module/stories/activities-progress/activities-progress.stories.js +4 -4
  36. package/lib/module/stories/activities-progress/activities-progress.stories.js.map +1 -1
  37. package/lib/module/stories/step-indicator/step-indicator.stories.js +33 -6
  38. package/lib/module/stories/step-indicator/step-indicator.stories.js.map +1 -1
  39. package/lib/module/utils/get-icon-by-property/index.js +4 -2
  40. package/lib/module/utils/get-icon-by-property/index.js.map +1 -1
  41. package/lib/typescript/src/stories/step-indicator/step-indicator.stories.d.ts +1 -0
  42. package/package.json +1 -1
  43. package/src/common/icons-svg/index.tsx +1 -1
  44. package/src/components/activities-daily/index.tsx +116 -116
  45. package/src/components/activities-progress/index.tsx +4 -3
  46. package/src/components/activities-progress/interface.d.ts +2 -2
  47. package/src/components/notification-loading/index.tsx +157 -162
  48. package/src/components/step-indicator/index.tsx +166 -164
  49. package/src/components/step-indicator/interface.d.ts +35 -34
  50. package/src/components/step-indicator/styles.ts +68 -68
  51. package/src/stories/activities-progress/activities-progress.stories.tsx +4 -4
  52. package/src/stories/step-indicator/step-indicator.stories.tsx +154 -124
  53. 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
- backgroundColorBall: theme.colors.blue[500],
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
- backgroundColorBall="#050022"
35
- type="default"
36
- data={dataMock}
37
- />
38
- \`\`\`
39
- `,
40
- },
41
- };
42
-
43
- export default meta;
44
-
45
- type Story = StoryObj<typeof meta>;
46
-
47
- const dataMock = [
48
- {
49
- id: 1,
50
- descricao: "Repouso Noturno",
51
- data_inicio: "07/03/2024 14:52",
52
- data_fim: "07/03/2024 17:52",
53
- duracao_segundos: "3601",
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 dataMockCustom = [
65
- {
66
- id: 1,
67
- descricao: "Pedido Realizado",
68
- data_inicio: "",
69
- data_fim: "",
70
- duracao_segundos: "",
71
- },
72
- {
73
- id: 2,
74
- descricao: "Pagamento Aprovado",
75
- data_inicio: "07/03/2024 14:52",
76
- data_fim: "07/03/2024 17:52",
77
- duracao_segundos: "3601",
78
- },
79
- {
80
- id: 3,
81
- descricao: "Pedido Faturado",
82
- data_inicio: "",
83
- data_fim: "",
84
- duracao_segundos: "",
85
- },
86
- {
87
- id: 4,
88
- descricao: "Pedido Enviado",
89
- data_inicio: "",
90
- data_fim: "",
91
- duracao_segundos: "",
92
- },
93
- {
94
- id: 4,
95
- descricao: "Pedido Entregue",
96
- data_inicio: "07/03/2024 14:52",
97
- data_fim: "07/03/2024 17:52",
98
- duracao_segundos: "3601",
99
- },
100
- ];
101
-
102
- export const StepIndicatorDefault: Story = {
103
- name: "step-indicator-default",
104
- args: {
105
- data: dataMock,
106
- type: "default",
107
- backgroundColorBall: theme.colors.blue[500],
108
- titleColor: theme.colors.neutral[25],
109
- textColorDescription: theme.colors.gray[300],
110
- titleNumberColor: theme.colors.neutral[25],
111
- },
112
- };
113
-
114
- export const StepIndicationCustom: Story = {
115
- name: "step-indicator-custom",
116
- args: {
117
- data: dataMockCustom,
118
- type: "custom",
119
- backgroundColorBall: theme.colors.orange[150],
120
- titleColor: theme.colors.blue[500],
121
- textColorDescription: theme.colors.gray[300],
122
- titleNumberColor: theme.colors.neutral[25],
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={color} icon="TRUCK" />;
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" />;