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.
Files changed (59) hide show
  1. package/lib/commonjs/common/icons-svg/constants/index.js +8 -6
  2. package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
  3. package/lib/commonjs/common/icons-svg/house/index.js +49 -0
  4. package/lib/commonjs/common/icons-svg/house/index.js.map +1 -0
  5. package/lib/commonjs/common/icons-svg/index.js +26 -12
  6. package/lib/commonjs/common/icons-svg/index.js.map +1 -1
  7. package/lib/commonjs/common/icons-svg/island/index.js +34 -0
  8. package/lib/commonjs/common/icons-svg/island/index.js.map +1 -0
  9. package/lib/commonjs/components/activities-progress/index.js +16 -14
  10. package/lib/commonjs/components/activities-progress/index.js.map +1 -1
  11. package/lib/commonjs/components/activities-progress/interface.d.js.map +1 -1
  12. package/lib/commonjs/components/card-history/index.js +20 -9
  13. package/lib/commonjs/components/card-history/index.js.map +1 -1
  14. package/lib/commonjs/components/card-history/interface.d.js.map +1 -1
  15. package/lib/commonjs/components/menu-item/interface.d.js.map +1 -1
  16. package/lib/commonjs/stories/activities-progress/activities-progress.stories.js +24 -14
  17. package/lib/commonjs/stories/activities-progress/activities-progress.stories.js.map +1 -1
  18. package/lib/commonjs/stories/card-history/card-history.stories.js +5 -2
  19. package/lib/commonjs/stories/card-history/card-history.stories.js.map +1 -1
  20. package/lib/commonjs/utils/get-icon-by-property/index.js +85 -0
  21. package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -0
  22. package/lib/module/common/icons-svg/constants/index.js +8 -6
  23. package/lib/module/common/icons-svg/constants/index.js.map +1 -1
  24. package/lib/module/common/icons-svg/house/index.js +41 -0
  25. package/lib/module/common/icons-svg/house/index.js.map +1 -0
  26. package/lib/module/common/icons-svg/index.js +26 -12
  27. package/lib/module/common/icons-svg/index.js.map +1 -1
  28. package/lib/module/common/icons-svg/island/index.js +26 -0
  29. package/lib/module/common/icons-svg/island/index.js.map +1 -0
  30. package/lib/module/components/activities-progress/index.js +15 -14
  31. package/lib/module/components/activities-progress/index.js.map +1 -1
  32. package/lib/module/components/activities-progress/interface.d.js.map +1 -1
  33. package/lib/module/components/card-history/index.js +20 -9
  34. package/lib/module/components/card-history/index.js.map +1 -1
  35. package/lib/module/components/card-history/interface.d.js.map +1 -1
  36. package/lib/module/components/menu-item/interface.d.js.map +1 -1
  37. package/lib/module/stories/activities-progress/activities-progress.stories.js +24 -14
  38. package/lib/module/stories/activities-progress/activities-progress.stories.js.map +1 -1
  39. package/lib/module/stories/card-history/card-history.stories.js +5 -2
  40. package/lib/module/stories/card-history/card-history.stories.js.map +1 -1
  41. package/lib/module/utils/get-icon-by-property/index.js +79 -0
  42. package/lib/module/utils/get-icon-by-property/index.js.map +1 -0
  43. package/lib/typescript/src/common/icons-svg/constants/index.d.ts +3 -1
  44. package/lib/typescript/src/common/icons-svg/house/index.d.ts +10 -0
  45. package/lib/typescript/src/common/icons-svg/island/index.d.ts +10 -0
  46. package/lib/typescript/src/utils/get-icon-by-property/index.d.ts +15 -0
  47. package/package.json +2 -3
  48. package/src/common/icons-svg/constants/index.ts +66 -64
  49. package/src/common/icons-svg/house/index.tsx +41 -0
  50. package/src/common/icons-svg/index.tsx +267 -259
  51. package/src/common/icons-svg/island/index.tsx +25 -0
  52. package/src/components/activities-progress/index.tsx +169 -162
  53. package/src/components/activities-progress/interface.d.ts +61 -41
  54. package/src/components/card-history/index.tsx +221 -211
  55. package/src/components/card-history/interface.d.ts +38 -34
  56. package/src/components/menu-item/interface.d.ts +1 -1
  57. package/src/stories/activities-progress/activities-progress.stories.tsx +71 -61
  58. package/src/stories/card-history/card-history.stories.tsx +53 -50
  59. 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
- parameters: {
17
- notes: `
18
- # CardHistory
19
-
20
- Este é um componente de CardHistory.
21
- Você usa assim:
22
- \`\`\`tsx
23
- <CardHistory
24
- width={"100%"}
25
- title="Carregamento #01020304050607"
26
- local="Doca 1, Patío 03 - Usiminas Ipatinga"
27
- vehicle="EXP-0000"
28
- prevision="12:37 10/03/2025"
29
- handleNavigation={() => {}}
30
- />
31
- \`\`\`
32
- `,
33
- },
34
- };
35
-
36
- export default meta;
37
-
38
- type Story = StoryObj<typeof meta>;
39
-
40
- export const CardHistoryAprovado: Story = {
41
- name: "card-history",
42
- args: {
43
- width: "100%",
44
- title: "Carregamento #01020304050607",
45
- local: "Doca 1, Patío 03 - Usiminas Ipatinga",
46
- vehicle: "EXP-0000",
47
- prevision: "12:37 10/03/2025",
48
- handleNavigation: () => {},
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 };