react-native-exp-fig 0.1.17 → 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 +8 -6
- package/lib/commonjs/common/icons-svg/constants/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 +26 -12
- 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/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/menu-item/interface.d.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/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 +8 -6
- package/lib/module/common/icons-svg/constants/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 +26 -12
- 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/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/menu-item/interface.d.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/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/utils/get-icon-by-property/index.d.ts +15 -0
- package/package.json +2 -3
- package/src/common/icons-svg/constants/index.ts +66 -64
- package/src/common/icons-svg/house/index.tsx +41 -0
- package/src/common/icons-svg/index.tsx +267 -259
- package/src/common/icons-svg/island/index.tsx +25 -0
- package/src/components/activities-progress/index.tsx +169 -162
- package/src/components/activities-progress/interface.d.ts +61 -41
- package/src/components/card-history/index.tsx +221 -211
- package/src/components/card-history/interface.d.ts +38 -34
- package/src/components/menu-item/interface.d.ts +1 -1
- package/src/stories/activities-progress/activities-progress.stories.tsx +71 -61
- package/src/stories/card-history/card-history.stories.tsx +53 -50
- package/src/utils/get-icon-by-property/index.tsx +53 -0
|
@@ -1,50 +1,53 @@
|
|
|
1
|
-
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
import { CardHistory } from "../../components/card-history";
|
|
4
|
-
import { theme } from "../../styles/theme/theme";
|
|
5
|
-
|
|
6
|
-
const meta: Meta<typeof CardHistory> = {
|
|
7
|
-
title: "componente/CardHistory",
|
|
8
|
-
component: CardHistory,
|
|
9
|
-
args: {
|
|
10
|
-
width: 120,
|
|
11
|
-
height: 90,
|
|
12
|
-
title: "Carregamento #01020304050607",
|
|
13
|
-
backgroundColor: theme.colors.blue[400],
|
|
14
|
-
handleNavigation: () => {},
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { CardHistory } from "../../components/card-history";
|
|
4
|
+
import { theme } from "../../styles/theme/theme";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof CardHistory> = {
|
|
7
|
+
title: "componente/CardHistory",
|
|
8
|
+
component: CardHistory,
|
|
9
|
+
args: {
|
|
10
|
+
width: 120,
|
|
11
|
+
height: 90,
|
|
12
|
+
title: "Carregamento #01020304050607",
|
|
13
|
+
backgroundColor: theme.colors.blue[400],
|
|
14
|
+
handleNavigation: () => {},
|
|
15
|
+
status_carregamento: "Concluido",
|
|
16
|
+
},
|
|
17
|
+
parameters: {
|
|
18
|
+
notes: `
|
|
19
|
+
# CardHistory
|
|
20
|
+
|
|
21
|
+
Este é um componente de CardHistory.
|
|
22
|
+
Você usa assim:
|
|
23
|
+
\`\`\`tsx
|
|
24
|
+
<CardHistory
|
|
25
|
+
width={"100%"}
|
|
26
|
+
title="Carregamento #01020304050607"
|
|
27
|
+
local="Doca 1, Patío 03 - Usiminas Ipatinga"
|
|
28
|
+
vehicle="EXP-0000"
|
|
29
|
+
prevision="12:37 10/03/2025"
|
|
30
|
+
handleNavigation={() => {}}
|
|
31
|
+
status={""}
|
|
32
|
+
/>
|
|
33
|
+
\`\`\`
|
|
34
|
+
`,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default meta;
|
|
39
|
+
|
|
40
|
+
type Story = StoryObj<typeof meta>;
|
|
41
|
+
|
|
42
|
+
export const CardHistoryAprovado: Story = {
|
|
43
|
+
name: "card-history",
|
|
44
|
+
args: {
|
|
45
|
+
width: "100%",
|
|
46
|
+
title: "Carregamento #01020304050607",
|
|
47
|
+
local: "Doca 1, Patío 03 - Usiminas Ipatinga",
|
|
48
|
+
vehicle: "EXP-0000",
|
|
49
|
+
prevision: "12:37 10/03/2025",
|
|
50
|
+
handleNavigation: () => {},
|
|
51
|
+
status_carregamento: "red",
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { Icons } from "../../common/icons-svg";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Function that will map property types to corresponding icons in SVG 🛠️.
|
|
10
|
+
* @param propertyType
|
|
11
|
+
* @param color
|
|
12
|
+
* @returns SVG
|
|
13
|
+
*/
|
|
14
|
+
const getIconByProperty: React.FC<any> = (propertyType: string, color?: string) => {
|
|
15
|
+
switch (propertyType) {
|
|
16
|
+
case "operacao_veiculo":
|
|
17
|
+
return <Icons color={color} icon="STEERING_WHEEL" />;
|
|
18
|
+
|
|
19
|
+
case "manutencao":
|
|
20
|
+
return <Icons color={color} icon="GEAR" />;
|
|
21
|
+
|
|
22
|
+
case "aguardando_carga":
|
|
23
|
+
return <Icons color={color} icon="TIMER" />;
|
|
24
|
+
|
|
25
|
+
case "disposicao_veiculo_parado":
|
|
26
|
+
return <Icons color={color} icon="TRUCK" />;
|
|
27
|
+
|
|
28
|
+
case "aguardando_descarga":
|
|
29
|
+
return <Icons color={color} icon="HOURGLASS" />;
|
|
30
|
+
|
|
31
|
+
case "descanso":
|
|
32
|
+
return <Icons color={color} icon="COFFEE" />;
|
|
33
|
+
|
|
34
|
+
case "repouso_semanal":
|
|
35
|
+
return <Icons color={color} icon="HOUSE" />;
|
|
36
|
+
|
|
37
|
+
case "repouso_noturno":
|
|
38
|
+
return <Icons color={color} icon="MOON_STARS" />;
|
|
39
|
+
|
|
40
|
+
case "refeicao":
|
|
41
|
+
return <Icons color={color} icon="CALL_BELL" />;
|
|
42
|
+
|
|
43
|
+
case "ferias":
|
|
44
|
+
return <Icons color={color} icon="ISLAND" />;
|
|
45
|
+
default:
|
|
46
|
+
return <Icons color={color} icon="STEERING_WHEEL" />; // Retorna uma Svg default caso o tipo de propriedade não for reconhecido.
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* EXPORTS
|
|
52
|
+
*/
|
|
53
|
+
export { getIconByProperty };
|