react-native-exp-fig 0.1.8 → 0.1.10

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 (110) hide show
  1. package/lib/commonjs/common/icons-svg/check-box/index.js +6 -6
  2. package/lib/commonjs/common/icons-svg/constants/index.js +4 -4
  3. package/lib/commonjs/common/icons-svg/index.js +10 -7
  4. package/lib/commonjs/common/icons-svg/index.js.map +1 -1
  5. package/lib/commonjs/components/card-work-session/index.js +35 -3
  6. package/lib/commonjs/components/card-work-session/index.js.map +1 -1
  7. package/lib/commonjs/components/check-box/index.js +6 -6
  8. package/lib/commonjs/components/coil/index.js +14 -8
  9. package/lib/commonjs/components/coil/index.js.map +1 -1
  10. package/lib/commonjs/components/header-profile/index.js +6 -6
  11. package/lib/commonjs/stories/card-work-session/card-work-session.stories.js +18 -3
  12. package/lib/commonjs/stories/card-work-session/card-work-session.stories.js.map +1 -1
  13. package/lib/commonjs/stories/coil/coil.stories.js +6 -5
  14. package/lib/commonjs/stories/coil/coil.stories.js.map +1 -1
  15. package/lib/commonjs/styles/theme/theme.js +1 -0
  16. package/lib/commonjs/styles/theme/theme.js.map +1 -1
  17. package/lib/module/common/icons-svg/check-box/index.js +6 -6
  18. package/lib/module/common/icons-svg/constants/index.js +4 -4
  19. package/lib/module/common/icons-svg/index.js +10 -7
  20. package/lib/module/common/icons-svg/index.js.map +1 -1
  21. package/lib/module/components/card-work-session/index.js +35 -3
  22. package/lib/module/components/card-work-session/index.js.map +1 -1
  23. package/lib/module/components/check-box/index.js +6 -6
  24. package/lib/module/components/coil/index.js +14 -8
  25. package/lib/module/components/coil/index.js.map +1 -1
  26. package/lib/module/components/header-profile/index.js +6 -6
  27. package/lib/module/stories/card-work-session/card-work-session.stories.js +17 -2
  28. package/lib/module/stories/card-work-session/card-work-session.stories.js.map +1 -1
  29. package/lib/module/stories/coil/coil.stories.js +6 -5
  30. package/lib/module/stories/coil/coil.stories.js.map +1 -1
  31. package/lib/module/styles/theme/theme.js +1 -0
  32. package/lib/module/styles/theme/theme.js.map +1 -1
  33. package/lib/typescript/commonjs/src/common/icons-svg/index.d.ts.map +1 -1
  34. package/lib/typescript/commonjs/src/components/card-work-session/index.d.ts.map +1 -1
  35. package/lib/typescript/commonjs/src/components/coil/index.d.ts.map +1 -1
  36. package/lib/typescript/commonjs/src/stories/card-work-session/card-work-session.stories.d.ts +1 -0
  37. package/lib/typescript/commonjs/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
  38. package/lib/typescript/commonjs/src/stories/coil/coil.stories.d.ts.map +1 -1
  39. package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts +1 -0
  40. package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts.map +1 -1
  41. package/lib/typescript/commonjs/src/styles/theme/theme.d.ts +1 -0
  42. package/lib/typescript/commonjs/src/styles/theme/theme.d.ts.map +1 -1
  43. package/lib/typescript/module/src/common/icons-svg/index.d.ts.map +1 -1
  44. package/lib/typescript/module/src/components/card-work-session/index.d.ts.map +1 -1
  45. package/lib/typescript/module/src/components/coil/index.d.ts.map +1 -1
  46. package/lib/typescript/module/src/stories/card-work-session/card-work-session.stories.d.ts +1 -0
  47. package/lib/typescript/module/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
  48. package/lib/typescript/module/src/stories/coil/coil.stories.d.ts.map +1 -1
  49. package/lib/typescript/module/src/styles/global/theme-provider.d.ts +1 -0
  50. package/lib/typescript/module/src/styles/global/theme-provider.d.ts.map +1 -1
  51. package/lib/typescript/module/src/styles/theme/theme.d.ts +1 -0
  52. package/lib/typescript/module/src/styles/theme/theme.d.ts.map +1 -1
  53. package/package.json +1 -1
  54. package/src/common/icons-svg/agent/index.tsx +40 -0
  55. package/src/common/icons-svg/bed/index.tsx +41 -0
  56. package/src/common/icons-svg/car/index.tsx +29 -0
  57. package/src/common/icons-svg/check-box/index.tsx +28 -28
  58. package/src/common/icons-svg/check-outline/index.tsx +42 -0
  59. package/src/common/icons-svg/coffee/index.tsx +43 -0
  60. package/src/common/icons-svg/constants/index.ts +8 -0
  61. package/src/common/icons-svg/index.tsx +57 -5
  62. package/src/common/icons-svg/pencil/index.tsx +32 -0
  63. package/src/common/icons-svg/refresh-ccw-dot/index.tsx +32 -0
  64. package/src/common/icons-svg/truck-activity/index.tsx +29 -0
  65. package/src/components/activities-daily/index.tsx +116 -0
  66. package/src/components/activities-daily/interface.d.ts +22 -0
  67. package/src/components/activities-progress/index.tsx +162 -0
  68. package/src/components/activities-progress/interface.d.ts +41 -0
  69. package/src/components/avatar-profile/index.tsx +95 -0
  70. package/src/components/avatar-profile/interface.d.ts +39 -0
  71. package/src/components/card-history/index.tsx +149 -150
  72. package/src/components/card-loading/index.tsx +16 -1
  73. package/src/components/card-work-session/index.tsx +187 -161
  74. package/src/components/card-work-session/interface.d.ts +5 -0
  75. package/src/components/check-box/index.tsx +22 -53
  76. package/src/components/check-box/interface.d.ts +31 -27
  77. package/src/components/coil/index.tsx +103 -90
  78. package/src/components/coil/interface.d.ts +26 -26
  79. package/src/components/filter-date-selector/index.tsx +101 -89
  80. package/src/components/header-profile/index.tsx +132 -132
  81. package/src/components/history-details/index.tsx +100 -0
  82. package/src/components/history-details/interface.d.ts +18 -0
  83. package/src/components/image-capture-with-remove/index.tsx +8 -2
  84. package/src/components/image-capture-with-remove/interface.d.ts +3 -0
  85. package/src/components/notification-loading/index.tsx +18 -7
  86. package/src/components/notification-loading/interface.d.ts +4 -0
  87. package/src/components/profile-menu-option/index.tsx +65 -0
  88. package/src/components/profile-menu-option/interface.d.ts +42 -0
  89. package/src/components/step-indicator/index.tsx +164 -164
  90. package/src/components/step-indicator/interface.d.ts +34 -34
  91. package/src/components/user-profile/index.tsx +58 -70
  92. package/src/index.ts +42 -37
  93. package/src/stories/activities-daily/activities-daily.stories.tsx +40 -0
  94. package/src/stories/activities-progress/activities-progress.stories.tsx +61 -0
  95. package/src/stories/avatar-profile/avatar-profile.stories.tsx +32 -0
  96. package/src/stories/card-loading/card-loading.stories.tsx +2 -2
  97. package/src/stories/card-work-session/card-work-session.stories.tsx +16 -1
  98. package/src/stories/check-box/check-box.stories.tsx +81 -83
  99. package/src/stories/coil/coil.stories.tsx +98 -74
  100. package/src/stories/filter-date-selector/filter-date-selector.stories.tsx +122 -93
  101. package/src/stories/header-profile/header-profile.stories.tsx +103 -103
  102. package/src/stories/history-details/history-details.stories.tsx +36 -0
  103. package/src/stories/image-capture-with-remove/image-capture-with-remove.stories.tsx +10 -0
  104. package/src/stories/notification-loading/notification-loading.stories.tsx +15 -0
  105. package/src/stories/profile-menu-option/profile-menu-option.stories.tsx +70 -0
  106. package/src/stories/step-indicator/step-indicator.stories.tsx +124 -116
  107. package/src/styles/global/interface.d.ts +10 -0
  108. package/src/styles/theme/theme.ts +3 -0
  109. package/src/utils/format-data/index.ts +66 -40
  110. package/src/utils/status-color/return-color.ts +12 -4
@@ -1,90 +1,103 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React from "react";
5
- import { TouchableOpacity } from "react-native";
6
-
7
- // components
8
- import { Box } from "../box";
9
- import { Typography } from "../typography";
10
-
11
- // icons
12
- import { Icons } from "../../common/icons-svg";
13
-
14
- // theme
15
- import { theme } from "../../styles/theme/theme";
16
-
17
- import { ICoil } from "./interface";
18
-
19
- const Coil: React.FC<ICoil> = ({
20
- description,
21
- handleNavigation,
22
- title,
23
- testID,
24
- status,
25
- backgroundColor,
26
- style,
27
- }) => {
28
- return (
29
- <TouchableOpacity activeOpacity={0.7} testID={testID} onPress={handleNavigation}>
30
- <Box
31
- width={"100%"}
32
- flexStyle={{ flexDirection: "row", alignItems: "center" }}
33
- height={70}
34
- backgroundColor={backgroundColor ?? theme.colors.blue[400]}
35
- borderStyled={{
36
- borderWidth: theme.borderWidths.thin,
37
- borderRadius: theme.borderWidths.thick_medium,
38
- borderColor: backgroundColor ?? theme.colors.blue[400],
39
- }}
40
- paddingStyle={{ padding: theme.paddings["2xs"] }}
41
- marginStyle={{ marginBottom: theme.margins.md }}
42
- style={[style, { elevation: 5 }]}
43
- >
44
- <Box
45
- width={"80%"}
46
- height={70}
47
- flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "flex-start" }}
48
- >
49
- <Icons icon={"LIFEBUOY"} size={32} />
50
-
51
- <Box
52
- flexStyle={{ flexDirection: "column", flexWrap: "wrap" }}
53
- marginStyle={{ marginLeft: theme.margins.lg }}
54
- >
55
- <Typography
56
- text={title}
57
- size={theme.fontSizes["2xl"]}
58
- fontFamily={theme.fonts.inter_bold_700}
59
- color={theme.colors.neutral[25]}
60
- letterSpacing={"regular"}
61
- paddingTop={theme.paddings.md}
62
- />
63
- <Typography
64
- text={description}
65
- size={theme.fontSizes["2xs"]}
66
- fontFamily={theme.fonts.inter_semi_bold_600}
67
- color={theme.colors.neutral[25]}
68
- letterSpacing={"regular"}
69
- />
70
- </Box>
71
- </Box>
72
-
73
- <Box
74
- width={"20%"}
75
- flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "flex-end" }}
76
- height={70}
77
- >
78
- {status === "recused" && <Icons icon={"RECUSED"} size={32} />}
79
- {status === "approved" && <Icons icon={"CHECK_CIRCLE"} size={32} />}
80
- {status === "pending" && <Icons icon={"EXCLAMATION_CIRCLE"} size={32} />}
81
- </Box>
82
- </Box>
83
- </TouchableOpacity>
84
- );
85
- };
86
-
87
- /**
88
- * EXPORTS
89
- */
90
- export { Coil };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React from "react";
5
+ import { TouchableOpacity } from "react-native";
6
+
7
+ // components
8
+ import { Box } from "../box";
9
+ import { Typography } from "../typography";
10
+
11
+ // icons
12
+ import { Icons } from "../../common/icons-svg";
13
+
14
+ // theme
15
+ import { theme } from "../../styles/theme/theme";
16
+
17
+ import { ICoil } from "./interface";
18
+
19
+ const Coil: React.FC<ICoil> = ({
20
+ description,
21
+ handleNavigation,
22
+ title,
23
+ testID,
24
+ status,
25
+ backgroundColor,
26
+ style,
27
+ disabled,
28
+ backgroundColorIcon,
29
+ }) => {
30
+ return (
31
+ <TouchableOpacity
32
+ disabled={disabled}
33
+ activeOpacity={0.7}
34
+ testID={testID}
35
+ onPress={handleNavigation}
36
+ >
37
+ <Box
38
+ width={"100%"}
39
+ flexStyle={{ flexDirection: "row", alignItems: "center" }}
40
+ height={70}
41
+ backgroundColor={backgroundColor ?? theme.colors.blue[400]}
42
+ borderStyled={{
43
+ borderWidth: theme.borderWidths.thin,
44
+ borderRadius: theme.borderWidths.thick_medium,
45
+ borderColor: backgroundColor ?? theme.colors.blue[400],
46
+ }}
47
+ paddingStyle={{ padding: theme.paddings["2xs"] }}
48
+ marginStyle={{ marginBottom: theme.margins.md }}
49
+ style={[style, { elevation: 5 }]}
50
+ >
51
+ <Box
52
+ width={"80%"}
53
+ height={70}
54
+ flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "flex-start" }}
55
+ >
56
+ <Icons icon={"LIFEBUOY"} size={32} />
57
+
58
+ <Box
59
+ flexStyle={{ flexDirection: "column", flexWrap: "wrap" }}
60
+ marginStyle={{ marginLeft: theme.margins.lg }}
61
+ >
62
+ <Typography
63
+ text={title}
64
+ size={theme.fontSizes["2xl"]}
65
+ fontFamily={theme.fonts.inter_bold_700}
66
+ color={theme.colors.neutral[25]}
67
+ letterSpacing={"regular"}
68
+ paddingTop={theme.paddings.md}
69
+ />
70
+ <Typography
71
+ text={description}
72
+ size={theme.fontSizes["2xs"]}
73
+ fontFamily={theme.fonts.inter_semi_bold_600}
74
+ color={theme.colors.neutral[25]}
75
+ letterSpacing={"regular"}
76
+ />
77
+ </Box>
78
+ </Box>
79
+
80
+ <Box
81
+ width={"20%"}
82
+ flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "flex-end" }}
83
+ height={70}
84
+ >
85
+ {status === "Cancelado" && (
86
+ <Icons icon={"RECUSED"} size={32} background={backgroundColorIcon} />
87
+ )}
88
+ {status === "Concluido" && (
89
+ <Icons icon={"CHECK_CIRCLE"} size={32} background={backgroundColorIcon} />
90
+ )}
91
+ {(status === "Pendente" || status === "Andamento") && (
92
+ <Icons icon={"EXCLAMATION_CIRCLE"} size={32} background={backgroundColorIcon} />
93
+ )}
94
+ </Box>
95
+ </Box>
96
+ </TouchableOpacity>
97
+ );
98
+ };
99
+
100
+ /**
101
+ * EXPORTS
102
+ */
103
+ export { Coil };
@@ -1,26 +1,26 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import { ViewProps } from "react-native";
5
-
6
- // typing
7
- import { IGlobalCss } from "../../styles/global/interface";
8
-
9
- interface ICoil extends ViewProps, IGlobalCss {
10
- /**propriedade que indica o título da bobina */
11
- title: string;
12
-
13
- /**propriedade que indica a descrição da bobina */
14
- description: string;
15
-
16
- /**propriedade que indica que levar para tela da bobina */
17
- handleNavigation: () => void;
18
-
19
- /**propriedade que indica status da bobina */
20
- status?: "recused" | "pending" | "approved";
21
- }
22
-
23
- /**
24
- * EXPORTS
25
- */
26
- export { ICoil };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import { ViewProps } from "react-native";
5
+
6
+ // typing
7
+ import { IGlobalCss } from "../../styles/global/interface";
8
+
9
+ interface ICoil extends ViewProps, IGlobalCss {
10
+ /**propriedade que indica o título da bobina */
11
+ title: string;
12
+
13
+ /**propriedade que indica a descrição da bobina */
14
+ description: string;
15
+
16
+ /**propriedade que indica que levar para tela da bobina */
17
+ handleNavigation: () => void;
18
+
19
+ /**propriedade que indica status da bobina */
20
+ status?: "Cancelado" | "Pendente" | "Concluido" | "Andamento";
21
+ }
22
+
23
+ /**
24
+ * EXPORTS
25
+ */
26
+ export { ICoil };
@@ -1,89 +1,101 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React from "react";
5
- import { TouchableOpacity, ActivityIndicator, FlatList } from "react-native";
6
-
7
- // components
8
- import { Box } from "../box";
9
- import { Typography } from "../typography";
10
-
11
- // styles
12
- import { theme } from "../../styles/theme/theme";
13
-
14
- //typing
15
- import { IFilterDateSelector, ISelectedDay } from "./interface";
16
-
17
- /**
18
- *
19
- * Componente FilterDateSelector para a interação do usuário com ui.
20
- */
21
- const FilterDateSelector: React.FC<IFilterDateSelector> = ({
22
- selectedDay,
23
- handleSelectedDay,
24
- days,
25
- isLoading,
26
- testID,
27
- }) => {
28
- const renderDayBlock = ({ item: day, index }: { item: ISelectedDay; index: number }) => {
29
- const isSelected = selectedDay && selectedDay.date === day.date;
30
- return (
31
- <TouchableOpacity
32
- disabled={isSelected}
33
- key={index}
34
- activeOpacity={0.7}
35
- onPress={() => handleSelectedDay(day)}
36
- >
37
- <Box
38
- testID={testID}
39
- width={60}
40
- height={75}
41
- flexStyle={{ alignItems: "center", justifyContent: "center" }}
42
- backgroundColor={isSelected ? theme.colors.blue[400] : theme.colors.gray[350]}
43
- borderStyled={{
44
- borderRadius: theme.borderWidths.thick_large,
45
- borderColor: isSelected ? theme.colors.blue[400] : theme.colors.gray[350],
46
- borderWidth: theme.borderWidths.thin,
47
- }}
48
- marginStyle={{ marginRight: theme.margins["2xs"] }}
49
- >
50
- {isSelected && isLoading ? (
51
- <ActivityIndicator size="small" color="white" />
52
- ) : (
53
- <>
54
- <Typography
55
- text={day.date.toString().padStart(2, "0")}
56
- size={theme.fontSizes.lg}
57
- color={theme.colors.neutral[25]}
58
- fontFamily={theme.fonts.inter_bold_700}
59
- />
60
- <Typography
61
- text={day.dayName.slice(0, 3)}
62
- size={theme.fontSizes.lg}
63
- color={theme.colors.neutral[25]}
64
- fontFamily={theme.fonts.inter_bold_700}
65
- letterSpacing="o_16"
66
- />
67
- </>
68
- )}
69
- </Box>
70
- </TouchableOpacity>
71
- );
72
- };
73
- const daySorted = days.sort(
74
- (a, b) => new Date(b.fullDate).getTime() - new Date(a.fullDate).getTime()
75
- );
76
- return (
77
- <FlatList
78
- horizontal
79
- data={daySorted}
80
- showsHorizontalScrollIndicator={false}
81
- renderItem={renderDayBlock}
82
- />
83
- );
84
- };
85
-
86
- /**
87
- * EXPORTS
88
- */
89
- export { FilterDateSelector };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React from "react";
5
+ import { TouchableOpacity, ActivityIndicator, FlatList } from "react-native";
6
+
7
+ // components
8
+ import { Box } from "../box";
9
+ import { Typography } from "../typography";
10
+
11
+ // styles
12
+ import { theme } from "../../styles/theme/theme";
13
+
14
+ //typing
15
+ import { IFilterDateSelector, ISelectedDay } from "./interface";
16
+ import { Icons } from "../../common/icons-svg";
17
+
18
+ /**
19
+ *
20
+ * Componente FilterDateSelector para a interação do usuário com ui.
21
+ */
22
+ const FilterDateSelector: React.FC<IFilterDateSelector> = ({
23
+ selectedDay,
24
+ handleSelectedDay,
25
+ days,
26
+ isLoading,
27
+ testID,
28
+ }) => {
29
+ const renderDayBlock = ({ item: day, index }: { item: ISelectedDay; index: number }) => {
30
+ const isSelected = selectedDay && selectedDay.date === day.date;
31
+ return (
32
+ <TouchableOpacity
33
+ disabled={isSelected}
34
+ key={index}
35
+ activeOpacity={0.7}
36
+ onPress={() => handleSelectedDay(day)}
37
+ >
38
+ <Box
39
+ testID={testID}
40
+ width={65}
41
+ height={75}
42
+ flexStyle={{ alignItems: "center", justifyContent: "center" }}
43
+ backgroundColor={isSelected ? theme.colors.blue[400] : theme.colors.gray[350]}
44
+ borderStyled={{
45
+ borderRadius: theme.borderWidths.thick_large,
46
+ borderColor: isSelected ? theme.colors.blue[400] : theme.colors.gray[350],
47
+ borderWidth: theme.borderWidths.thin,
48
+ }}
49
+ marginStyle={{ marginRight: theme.margins["2xs"], marginTop: theme.margins["2xs"] }}
50
+ >
51
+ {isSelected && isLoading ? (
52
+ <ActivityIndicator size="small" color="white" />
53
+ ) : (
54
+ <>
55
+ {day.date === "all" ? (
56
+ <Icons icon="REFRESH_CCW_DOT" color={theme.colors.neutral[25]} />
57
+ ) : (
58
+ <>
59
+ <Typography
60
+ text={day.date === "all" ? "" : day.date.toString().padStart(2, "0")}
61
+ size={theme.fontSizes.lg}
62
+ color={theme.colors.neutral[25]}
63
+ fontFamily={theme.fonts.inter_bold_700}
64
+ />
65
+ <Typography
66
+ text={day.date === "all" ? "Todos" : day.dayName.slice(0, 3)}
67
+ size={theme.fontSizes.lg}
68
+ color={theme.colors.neutral[25]}
69
+ fontFamily={theme.fonts.inter_bold_700}
70
+ marginBottom={day.date === "all" ? theme.margins["3xl"] : 0}
71
+ letterSpacing="o_16"
72
+ />
73
+ </>
74
+ )}
75
+ </>
76
+ )}
77
+ </Box>
78
+ </TouchableOpacity>
79
+ );
80
+ };
81
+ const daySorted = days.sort(
82
+ (a, b) => new Date(b.fullDate).getTime() - new Date(a.fullDate).getTime()
83
+ );
84
+
85
+ // Adiciona a opção "Todos" no início da lista
86
+ const dataWithAllOption = [...daySorted];
87
+
88
+ return (
89
+ <FlatList
90
+ horizontal
91
+ data={dataWithAllOption}
92
+ showsHorizontalScrollIndicator={false}
93
+ renderItem={renderDayBlock}
94
+ />
95
+ );
96
+ };
97
+
98
+ /**
99
+ * EXPORTS
100
+ */
101
+ export { FilterDateSelector };