react-native-exp-fig 0.1.16 → 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 (173) hide show
  1. package/lib/commonjs/common/icons-svg/constants/index.js +4 -2
  2. package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
  3. package/lib/commonjs/common/icons-svg/hourglass/index.js +4 -4
  4. package/lib/commonjs/common/icons-svg/hourglass/index.js.map +1 -1
  5. package/lib/commonjs/common/icons-svg/house/index.js +49 -0
  6. package/lib/commonjs/common/icons-svg/house/index.js.map +1 -0
  7. package/lib/commonjs/common/icons-svg/index.js +22 -8
  8. package/lib/commonjs/common/icons-svg/index.js.map +1 -1
  9. package/lib/commonjs/common/icons-svg/island/index.js +34 -0
  10. package/lib/commonjs/common/icons-svg/island/index.js.map +1 -0
  11. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconCallBell.js +46 -0
  12. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconCallBell.js.map +1 -0
  13. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconCoffee.js +47 -0
  14. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconCoffee.js.map +1 -0
  15. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconGear.js +47 -0
  16. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconGear.js.map +1 -0
  17. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconHourGlassMedium.js +48 -0
  18. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconHourGlassMedium.js.map +1 -0
  19. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconHouse.js +46 -0
  20. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconHouse.js.map +1 -0
  21. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconMoonStars.js +48 -0
  22. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconMoonStars.js.map +1 -0
  23. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconSteeringWheel.js +54 -0
  24. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconSteeringWheel.js.map +1 -0
  25. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconTimer.js +45 -0
  26. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconTimer.js.map +1 -0
  27. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconTruck.js +35 -0
  28. package/lib/commonjs/common/icons-svg/modal-activities/SvgIconTruck.js.map +1 -0
  29. package/lib/commonjs/common/icons-svg/modal-activities/index.js +80 -0
  30. package/lib/commonjs/common/icons-svg/modal-activities/index.js.map +1 -0
  31. package/lib/commonjs/components/activities-progress/index.js +16 -14
  32. package/lib/commonjs/components/activities-progress/index.js.map +1 -1
  33. package/lib/commonjs/components/activities-progress/interface.d.js.map +1 -1
  34. package/lib/commonjs/components/card-history/index.js +20 -9
  35. package/lib/commonjs/components/card-history/index.js.map +1 -1
  36. package/lib/commonjs/components/card-history/interface.d.js.map +1 -1
  37. package/lib/commonjs/components/history-details/index.js +4 -4
  38. package/lib/commonjs/components/history-details/index.js.map +1 -1
  39. package/lib/commonjs/components/menu-item/interface.d.js.map +1 -1
  40. package/lib/commonjs/components/modal-activities/data-activities/index.js +62 -0
  41. package/lib/commonjs/components/modal-activities/data-activities/index.js.map +1 -0
  42. package/lib/commonjs/components/modal-activities/index.js +30 -38
  43. package/lib/commonjs/components/modal-activities/index.js.map +1 -1
  44. package/lib/commonjs/components/modal-activities/interface.d.js.map +1 -1
  45. package/lib/commonjs/components/notification-loading/index.js +4 -4
  46. package/lib/commonjs/components/notification-loading/index.js.map +1 -1
  47. package/lib/commonjs/components/step-indicator/styles.js +4 -4
  48. package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
  49. package/lib/commonjs/index.js.map +1 -1
  50. package/lib/commonjs/stories/activities-progress/activities-progress.stories.js +24 -14
  51. package/lib/commonjs/stories/activities-progress/activities-progress.stories.js.map +1 -1
  52. package/lib/commonjs/stories/card-history/card-history.stories.js +5 -2
  53. package/lib/commonjs/stories/card-history/card-history.stories.js.map +1 -1
  54. package/lib/commonjs/stories/modal-activities/modal-activities.stories.js +21 -5
  55. package/lib/commonjs/stories/modal-activities/modal-activities.stories.js.map +1 -1
  56. package/lib/commonjs/styles/global/interface.d.js.map +1 -1
  57. package/lib/commonjs/utils/get-icon-by-property/index.js +85 -0
  58. package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -0
  59. package/lib/module/common/icons-svg/constants/index.js +4 -2
  60. package/lib/module/common/icons-svg/constants/index.js.map +1 -1
  61. package/lib/module/common/icons-svg/hourglass/index.js +4 -4
  62. package/lib/module/common/icons-svg/hourglass/index.js.map +1 -1
  63. package/lib/module/common/icons-svg/house/index.js +41 -0
  64. package/lib/module/common/icons-svg/house/index.js.map +1 -0
  65. package/lib/module/common/icons-svg/index.js +22 -8
  66. package/lib/module/common/icons-svg/index.js.map +1 -1
  67. package/lib/module/common/icons-svg/island/index.js +26 -0
  68. package/lib/module/common/icons-svg/island/index.js.map +1 -0
  69. package/lib/module/common/icons-svg/modal-activities/SvgIconCallBell.js +37 -0
  70. package/lib/module/common/icons-svg/modal-activities/SvgIconCallBell.js.map +1 -0
  71. package/lib/module/common/icons-svg/modal-activities/SvgIconCoffee.js +38 -0
  72. package/lib/module/common/icons-svg/modal-activities/SvgIconCoffee.js.map +1 -0
  73. package/lib/module/common/icons-svg/modal-activities/SvgIconGear.js +38 -0
  74. package/lib/module/common/icons-svg/modal-activities/SvgIconGear.js.map +1 -0
  75. package/lib/module/common/icons-svg/modal-activities/SvgIconHourGlassMedium.js +39 -0
  76. package/lib/module/common/icons-svg/modal-activities/SvgIconHourGlassMedium.js.map +1 -0
  77. package/lib/module/common/icons-svg/modal-activities/SvgIconHouse.js +37 -0
  78. package/lib/module/common/icons-svg/modal-activities/SvgIconHouse.js.map +1 -0
  79. package/lib/module/common/icons-svg/modal-activities/SvgIconMoonStars.js +40 -0
  80. package/lib/module/common/icons-svg/modal-activities/SvgIconMoonStars.js.map +1 -0
  81. package/lib/module/common/icons-svg/modal-activities/SvgIconSteeringWheel.js +45 -0
  82. package/lib/module/common/icons-svg/modal-activities/SvgIconSteeringWheel.js.map +1 -0
  83. package/lib/module/common/icons-svg/modal-activities/SvgIconTimer.js +36 -0
  84. package/lib/module/common/icons-svg/modal-activities/SvgIconTimer.js.map +1 -0
  85. package/lib/module/common/icons-svg/modal-activities/SvgIconTruck.js +26 -0
  86. package/lib/module/common/icons-svg/modal-activities/SvgIconTruck.js.map +1 -0
  87. package/lib/module/common/icons-svg/modal-activities/index.js +75 -0
  88. package/lib/module/common/icons-svg/modal-activities/index.js.map +1 -0
  89. package/lib/module/components/activities-progress/index.js +15 -14
  90. package/lib/module/components/activities-progress/index.js.map +1 -1
  91. package/lib/module/components/activities-progress/interface.d.js.map +1 -1
  92. package/lib/module/components/card-history/index.js +20 -9
  93. package/lib/module/components/card-history/index.js.map +1 -1
  94. package/lib/module/components/card-history/interface.d.js.map +1 -1
  95. package/lib/module/components/history-details/index.js +4 -4
  96. package/lib/module/components/history-details/index.js.map +1 -1
  97. package/lib/module/components/menu-item/interface.d.js.map +1 -1
  98. package/lib/module/components/modal-activities/data-activities/index.js +56 -0
  99. package/lib/module/components/modal-activities/data-activities/index.js.map +1 -0
  100. package/lib/module/components/modal-activities/index.js +29 -38
  101. package/lib/module/components/modal-activities/index.js.map +1 -1
  102. package/lib/module/components/modal-activities/interface.d.js.map +1 -1
  103. package/lib/module/components/notification-loading/index.js +4 -4
  104. package/lib/module/components/notification-loading/index.js.map +1 -1
  105. package/lib/module/components/step-indicator/styles.js +4 -4
  106. package/lib/module/components/step-indicator/styles.js.map +1 -1
  107. package/lib/module/index.js +2 -2
  108. package/lib/module/index.js.map +1 -1
  109. package/lib/module/stories/activities-progress/activities-progress.stories.js +24 -14
  110. package/lib/module/stories/activities-progress/activities-progress.stories.js.map +1 -1
  111. package/lib/module/stories/card-history/card-history.stories.js +5 -2
  112. package/lib/module/stories/card-history/card-history.stories.js.map +1 -1
  113. package/lib/module/stories/modal-activities/modal-activities.stories.js +20 -4
  114. package/lib/module/stories/modal-activities/modal-activities.stories.js.map +1 -1
  115. package/lib/module/styles/global/interface.d.js.map +1 -1
  116. package/lib/module/utils/get-icon-by-property/index.js +79 -0
  117. package/lib/module/utils/get-icon-by-property/index.js.map +1 -0
  118. package/lib/typescript/src/common/icons-svg/constants/index.d.ts +3 -1
  119. package/lib/typescript/src/common/icons-svg/house/index.d.ts +10 -0
  120. package/lib/typescript/src/common/icons-svg/island/index.d.ts +10 -0
  121. package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconCallBell.d.ts +10 -0
  122. package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconCoffee.d.ts +10 -0
  123. package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconGear.d.ts +10 -0
  124. package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconHourGlassMedium.d.ts +10 -0
  125. package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconHouse.d.ts +10 -0
  126. package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconMoonStars.d.ts +10 -0
  127. package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconSteeringWheel.d.ts +10 -0
  128. package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconTimer.d.ts +10 -0
  129. package/lib/typescript/src/common/icons-svg/modal-activities/SvgIconTruck.d.ts +10 -0
  130. package/lib/typescript/src/common/icons-svg/modal-activities/index.d.ts +23 -0
  131. package/lib/typescript/src/components/modal-activities/data-activities/index.d.ts +19 -0
  132. package/lib/typescript/src/stories/modal-activities/modal-activities.stories.d.ts +2 -1
  133. package/lib/typescript/src/utils/get-icon-by-property/index.d.ts +15 -0
  134. package/package.json +220 -221
  135. package/src/common/icons-svg/constants/index.ts +3 -1
  136. package/src/common/icons-svg/hourglass/index.tsx +28 -28
  137. package/src/common/icons-svg/house/index.tsx +41 -0
  138. package/src/common/icons-svg/index.tsx +14 -6
  139. package/src/common/icons-svg/island/index.tsx +25 -0
  140. package/src/common/icons-svg/modal-activities/SvgIconCallBell.tsx +37 -0
  141. package/src/common/icons-svg/modal-activities/SvgIconCoffee.tsx +38 -0
  142. package/src/common/icons-svg/modal-activities/SvgIconGear.tsx +38 -0
  143. package/src/common/icons-svg/modal-activities/SvgIconHourGlassMedium.tsx +38 -0
  144. package/src/common/icons-svg/modal-activities/SvgIconHouse.tsx +37 -0
  145. package/src/common/icons-svg/modal-activities/SvgIconMoonStars.tsx +39 -0
  146. package/src/common/icons-svg/modal-activities/SvgIconSteeringWheel.tsx +48 -0
  147. package/src/common/icons-svg/modal-activities/SvgIconTimer.tsx +37 -0
  148. package/src/common/icons-svg/modal-activities/SvgIconTruck.tsx +28 -0
  149. package/src/common/icons-svg/modal-activities/index.tsx +53 -0
  150. package/src/components/activities-progress/index.tsx +169 -162
  151. package/src/components/activities-progress/interface.d.ts +61 -41
  152. package/src/components/button/styles.ts +34 -34
  153. package/src/components/card-history/index.tsx +28 -18
  154. package/src/components/card-history/interface.d.ts +5 -1
  155. package/src/components/card-loading/index.tsx +290 -290
  156. package/src/components/history-details/index.tsx +99 -99
  157. package/src/components/image-capture-with-remove/index.tsx +92 -92
  158. package/src/components/image-capture-with-remove/interface.d.ts +28 -28
  159. package/src/components/loading-progress/index.tsx +93 -93
  160. package/src/components/menu-item/interface.d.ts +1 -1
  161. package/src/components/modal-activities/data-activities/index.ts +65 -0
  162. package/src/components/modal-activities/index.tsx +137 -139
  163. package/src/components/modal-activities/interface.d.ts +32 -21
  164. package/src/components/notification-loading/index.tsx +162 -162
  165. package/src/components/step-indicator/styles.ts +68 -68
  166. package/src/index.ts +43 -43
  167. package/src/stories/activities-progress/activities-progress.stories.tsx +71 -61
  168. package/src/stories/card-history/card-history.stories.tsx +3 -0
  169. package/src/stories/modal-activities/modal-activities.stories.tsx +64 -46
  170. package/src/styles/global/interface.d.ts +146 -146
  171. package/src/styles/theme/theme.ts +171 -171
  172. package/src/utils/get-icon-by-property/index.tsx +53 -0
  173. package/src/utils/status-color/return-color.ts +34 -34
@@ -1,99 +1,99 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React from "react";
5
-
6
- // components
7
- import { Box } from "../box";
8
- import { Typography } from "../typography";
9
-
10
- // typings
11
- import { IHistoryDetails } from "./interface";
12
-
13
- // styles
14
- import { theme } from "../../styles/theme/theme";
15
-
16
- const HistoryDetails: React.FC<IHistoryDetails> = ({
17
- numero = "01020304050607",
18
- local = "Doca 1, Pátio 02 - Usimais (Ipatinga)",
19
- date = "24/03/2025",
20
- duracao = "00:30",
21
- }) => {
22
- return (
23
- <Box width="100%" borderStyled={{ borderRadius: 8 }} backgroundColor={theme.colors.blue[400]}>
24
- <Box
25
- flexStyle={{
26
- flexDirection: "column",
27
- justifyContent: "flex-start",
28
- alignItems: "flex-start",
29
- }}
30
- paddingStyle={{ padding: theme.paddings.xs }}
31
- >
32
- <Typography
33
- text={`Carregamento - #${numero}`}
34
- size={theme.fontSizes.sm}
35
- fontFamily={theme.fonts.inter_semi_bold_600}
36
- fontWeight="600"
37
- color={theme.colors.neutral[25]}
38
- lineHeight={theme.fontSizes.xl}
39
- letterSpacing={"regular"}
40
- />
41
-
42
- <Typography
43
- text={local}
44
- color={theme.colors.neutral[25]}
45
- size={theme.fontSizes.xs}
46
- lineHeight={theme.fontSizes.lg}
47
- fontFamily={theme.fonts.inter_regular_400}
48
- letterSpacing={"regular"}
49
- numberOfLines={1}
50
- />
51
- <Typography
52
- text={`Data carregamento: ${date}`}
53
- color={theme.colors.neutral[25]}
54
- size={theme.fontSizes.xs}
55
- fontFamily={theme.fonts.inter_regular_400}
56
- lineHeight={theme.fontSizes.lg}
57
- letterSpacing={"regular"}
58
- numberOfLines={1}
59
- />
60
- </Box>
61
-
62
- <Box height={1} backgroundColor={theme.colors.gray[950]} />
63
-
64
- <Box
65
- flexStyle={{
66
- flexDirection: "row",
67
- justifyContent: "space-between",
68
- alignItems: "center",
69
- }}
70
- paddingStyle={{ padding: theme.paddings.xs }}
71
- >
72
- <Typography
73
- text={"DURAÇÃO:"}
74
- color={theme.colors.neutral[25]}
75
- size={24}
76
- fontFamily={theme.fonts.inter_regular_400}
77
- fontWeight="400"
78
- lineHeight={theme.fontSizes["3xl"]}
79
- letterSpacing={"regular"}
80
- />
81
- <Typography
82
- text={duracao}
83
- color={theme.colors.neutral[25]}
84
- size={26}
85
- align="left"
86
- fontFamily={theme.fonts.inter_medium_500}
87
- fontWeight="500"
88
- lineHeight={theme.fontSizes["3xl"]}
89
- letterSpacing={"regular"}
90
- />
91
- </Box>
92
- </Box>
93
- );
94
- };
95
-
96
- /**
97
- * EXPORTS
98
- */
99
- export { HistoryDetails };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React from "react";
5
+
6
+ // components
7
+ import { Box } from "../box";
8
+ import { Typography } from "../typography";
9
+
10
+ // typings
11
+ import { IHistoryDetails } from "./interface";
12
+
13
+ // styles
14
+ import { theme } from "../../styles/theme/theme";
15
+
16
+ const HistoryDetails: React.FC<IHistoryDetails> = ({
17
+ numero = "01020304050607",
18
+ local = "Doca 1, Pátio 02 - Usimais (Ipatinga)",
19
+ date = "24/03/2025",
20
+ duracao = "00:30",
21
+ }) => {
22
+ return (
23
+ <Box width="100%" borderStyled={{ borderRadius: 8 }} backgroundColor={theme.colors.blue[400]}>
24
+ <Box
25
+ flexStyle={{
26
+ flexDirection: "column",
27
+ justifyContent: "flex-start",
28
+ alignItems: "flex-start",
29
+ }}
30
+ paddingStyle={{ padding: theme.paddings.xs }}
31
+ >
32
+ <Typography
33
+ text={`Carregamento - #${numero}`}
34
+ size={theme.fontSizes.sm}
35
+ fontFamily={theme.fonts.inter_semi_bold_600}
36
+ fontWeight="600"
37
+ color={theme.colors.neutral[25]}
38
+ lineHeight={theme.fontSizes.xl}
39
+ letterSpacing={"regular"}
40
+ />
41
+
42
+ <Typography
43
+ text={local}
44
+ color={theme.colors.neutral[25]}
45
+ size={theme.fontSizes.xs}
46
+ lineHeight={theme.fontSizes.lg}
47
+ fontFamily={theme.fonts.inter_regular_400}
48
+ letterSpacing={"regular"}
49
+ numberOfLines={1}
50
+ />
51
+ <Typography
52
+ text={`Data carregamento: ${date}`}
53
+ color={theme.colors.neutral[25]}
54
+ size={theme.fontSizes.xs}
55
+ fontFamily={theme.fonts.inter_regular_400}
56
+ lineHeight={theme.fontSizes.lg}
57
+ letterSpacing={"regular"}
58
+ numberOfLines={1}
59
+ />
60
+ </Box>
61
+
62
+ <Box height={1} backgroundColor={theme.colors.gray[950]} />
63
+
64
+ <Box
65
+ flexStyle={{
66
+ flexDirection: "row",
67
+ justifyContent: "space-between",
68
+ alignItems: "center",
69
+ }}
70
+ paddingStyle={{ padding: theme.paddings.xs }}
71
+ >
72
+ <Typography
73
+ text={"DURAÇÃO:"}
74
+ color={theme.colors.neutral[25]}
75
+ size={24}
76
+ fontFamily={theme.fonts.inter_regular_400}
77
+ fontWeight="400"
78
+ lineHeight={theme.fontSizes["3xl"]}
79
+ letterSpacing={"regular"}
80
+ />
81
+ <Typography
82
+ text={duracao}
83
+ color={theme.colors.neutral[25]}
84
+ size={26}
85
+ align="left"
86
+ fontFamily={theme.fonts.inter_medium_500}
87
+ fontWeight="500"
88
+ lineHeight={theme.fontSizes["3xl"]}
89
+ letterSpacing={"regular"}
90
+ />
91
+ </Box>
92
+ </Box>
93
+ );
94
+ };
95
+
96
+ /**
97
+ * EXPORTS
98
+ */
99
+ export { HistoryDetails };
@@ -1,92 +1,92 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React from "react";
5
- import { Image, TouchableOpacity } from "react-native";
6
-
7
- // components
8
- import { Box } from "../box";
9
-
10
- // comons / icons
11
- import { Icons } from "../../common/icons-svg";
12
-
13
- // typings
14
- import { IImageCaptureWithRemoveProps } from "./interface";
15
-
16
- // styles
17
- import { theme } from "../../styles/theme/theme";
18
-
19
- // utils
20
- import { getBorderColor } from "../../utils/status-color/return-color";
21
-
22
- /**
23
- *
24
- * Componente ImageCaptureWithRemove para a interação do usuário com ui.
25
- */
26
- const ImageCaptureWithRemove: React.FC<IImageCaptureWithRemoveProps> = ({
27
- width = 50,
28
- height = 50,
29
- foto = null,
30
- useRemove = true,
31
- status,
32
- handleTakePhoto,
33
- onRemove,
34
- }: IImageCaptureWithRemoveProps) => {
35
- const statusColor = status === "Cancelado" || status === "Pendente";
36
-
37
- return (
38
- <TouchableOpacity
39
- testID="image-capture-touchable"
40
- activeOpacity={0.7}
41
- style={{ position: "relative" }}
42
- onPress={handleTakePhoto}
43
- disabled={!!foto}
44
- >
45
- <Box
46
- width={width}
47
- height={height}
48
- flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }}
49
- testID="plus-icon-box"
50
- borderStyled={{
51
- borderWidth: statusColor ? theme.borderWidths.thick : theme.borderWidths.thin,
52
- borderRadius: theme.fontSizes.md,
53
- borderColor: statusColor ? getBorderColor(status) : theme.colors.blue[400],
54
- }}
55
- >
56
- {foto ? (
57
- <>
58
- <Image
59
- testID="captured-image"
60
- style={{
61
- width: "100%",
62
- height: "100%",
63
- borderRadius: theme.fontSizes.md,
64
- resizeMode: "cover",
65
- }}
66
- source={{
67
- uri: foto,
68
- }}
69
- />
70
-
71
- {useRemove && (
72
- <TouchableOpacity
73
- testID="remove-button"
74
- style={{ position: "absolute", top: 2, right: 4 }}
75
- onPress={onRemove}
76
- >
77
- <Icons icon="X_CIRCLE" color={theme.colors.red[400]} size={18} />
78
- </TouchableOpacity>
79
- )}
80
- </>
81
- ) : (
82
- <Icons icon="PLUS" color={theme.colors.blue[400]} />
83
- )}
84
- </Box>
85
- </TouchableOpacity>
86
- );
87
- };
88
-
89
- /**
90
- * EXPORTS
91
- */
92
- export { ImageCaptureWithRemove };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React from "react";
5
+ import { Image, TouchableOpacity } from "react-native";
6
+
7
+ // components
8
+ import { Box } from "../box";
9
+
10
+ // comons / icons
11
+ import { Icons } from "../../common/icons-svg";
12
+
13
+ // typings
14
+ import { IImageCaptureWithRemoveProps } from "./interface";
15
+
16
+ // styles
17
+ import { theme } from "../../styles/theme/theme";
18
+
19
+ // utils
20
+ import { getBorderColor } from "../../utils/status-color/return-color";
21
+
22
+ /**
23
+ *
24
+ * Componente ImageCaptureWithRemove para a interação do usuário com ui.
25
+ */
26
+ const ImageCaptureWithRemove: React.FC<IImageCaptureWithRemoveProps> = ({
27
+ width = 50,
28
+ height = 50,
29
+ foto = null,
30
+ useRemove = true,
31
+ status,
32
+ handleTakePhoto,
33
+ onRemove,
34
+ }: IImageCaptureWithRemoveProps) => {
35
+ const statusColor = status === "Cancelado" || status === "Pendente";
36
+
37
+ return (
38
+ <TouchableOpacity
39
+ testID="image-capture-touchable"
40
+ activeOpacity={0.7}
41
+ style={{ position: "relative" }}
42
+ onPress={handleTakePhoto}
43
+ disabled={!!foto}
44
+ >
45
+ <Box
46
+ width={width}
47
+ height={height}
48
+ flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }}
49
+ testID="plus-icon-box"
50
+ borderStyled={{
51
+ borderWidth: statusColor ? theme.borderWidths.thick : theme.borderWidths.thin,
52
+ borderRadius: theme.fontSizes.md,
53
+ borderColor: statusColor ? getBorderColor(status) : theme.colors.blue[400],
54
+ }}
55
+ >
56
+ {foto ? (
57
+ <>
58
+ <Image
59
+ testID="captured-image"
60
+ style={{
61
+ width: "100%",
62
+ height: "100%",
63
+ borderRadius: theme.fontSizes.md,
64
+ resizeMode: "cover",
65
+ }}
66
+ source={{
67
+ uri: foto,
68
+ }}
69
+ />
70
+
71
+ {useRemove && (
72
+ <TouchableOpacity
73
+ testID="remove-button"
74
+ style={{ position: "absolute", top: 2, right: 4 }}
75
+ onPress={onRemove}
76
+ >
77
+ <Icons icon="X_CIRCLE" color={theme.colors.red[400]} size={18} />
78
+ </TouchableOpacity>
79
+ )}
80
+ </>
81
+ ) : (
82
+ <Icons icon="PLUS" color={theme.colors.blue[400]} />
83
+ )}
84
+ </Box>
85
+ </TouchableOpacity>
86
+ );
87
+ };
88
+
89
+ /**
90
+ * EXPORTS
91
+ */
92
+ export { ImageCaptureWithRemove };
@@ -1,28 +1,28 @@
1
- /**
2
- * IMPORTS
3
- */
4
- type IImageCaptureWithRemoveProps = {
5
- /**define o tamanho */
6
- width?: number;
7
- /**define o altura */
8
- height?: number;
9
- /**Imagem capturada */
10
- foto?: string | null;
11
-
12
- /**Define o status das fotos */
13
- status?: "Pendente" | "Concluido" | "Cancelado" | "Andamento";
14
-
15
- /**propiedade que define se e para utilizar o metódo de remover */
16
- useRemove?: boolean;
17
-
18
- /**Remove a imagem capturada */
19
- onRemove: () => void;
20
-
21
- /**Captura a imagem */
22
- handleTakePhoto: () => void;
23
- };
24
-
25
- /**
26
- * EXPORTS
27
- */
28
- export { IImageCaptureWithRemoveProps };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ type IImageCaptureWithRemoveProps = {
5
+ /**define o tamanho */
6
+ width?: number;
7
+ /**define o altura */
8
+ height?: number;
9
+ /**Imagem capturada */
10
+ foto?: string | null;
11
+
12
+ /**Define o status das fotos */
13
+ status?: "Pendente" | "Concluido" | "Cancelado" | "Andamento";
14
+
15
+ /**propiedade que define se e para utilizar o metódo de remover */
16
+ useRemove?: boolean;
17
+
18
+ /**Remove a imagem capturada */
19
+ onRemove: () => void;
20
+
21
+ /**Captura a imagem */
22
+ handleTakePhoto: () => void;
23
+ };
24
+
25
+ /**
26
+ * EXPORTS
27
+ */
28
+ export { IImageCaptureWithRemoveProps };
@@ -1,93 +1,93 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React from "react";
5
-
6
- // component
7
- import { Box } from "../box";
8
- import { Typography } from "../typography";
9
- import { Button } from "../button";
10
-
11
- // typings
12
- import { ILoadingProgress } from "./interface";
13
-
14
- // styles
15
- import { theme } from "../../styles/theme/theme";
16
-
17
- /**
18
- *
19
- * Componente LoadingProgress para a interação do usuário com ui.
20
- */
21
- const LoadingProgress: React.FC<ILoadingProgress> = ({
22
- textLoading,
23
- handleClick,
24
- backgroundColor,
25
- }: ILoadingProgress) => {
26
- const truncatedText =
27
- textLoading.length > 15 ? textLoading.substring(0, 13) + "..." : textLoading;
28
- return (
29
- <Box>
30
- <Typography
31
- text="Carregamento em Andamento"
32
- size={theme.fontSizes.lg}
33
- fontFamily={theme.fonts.inter_medium_500}
34
- color={theme.colors.gray[800]}
35
- />
36
- <Box
37
- paddingStyle={{ padding: theme.paddings["2xs"] }}
38
- backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
39
- borderStyled={{
40
- borderWidth: theme.borderWidths.thin,
41
- borderRadius: theme.borderWidths.thick_large,
42
- borderStyle: "dashed",
43
- borderColor: theme.colors.neutral[200],
44
- }}
45
- marginStyle={{ marginTop: theme.margins["2xs"], marginBottom: theme.margins["2xs"] }}
46
- >
47
- <Box flexStyle={{ flexDirection: "row", textAlign: "center" }}>
48
- <Typography
49
- text={"N° Carregamento: "}
50
- size={theme.fontSizes.md}
51
- fontFamily={theme.fonts.inter_bold_700}
52
- color={theme.colors.blue[400]}
53
- />
54
-
55
- <Typography
56
- text={truncatedText}
57
- size={theme.fontSizes.md}
58
- fontFamily={theme.fonts.inter_medium_500}
59
- color={theme.colors.gray[800]}
60
- letterSpacing={"regular"}
61
- />
62
- </Box>
63
- <Box
64
- flexStyle={{ alignItems: "center", justifyContent: "center", flexDirection: "row" }}
65
- marginStyle={{ marginTop: theme.margins["2xs"] }}
66
- >
67
- <Button
68
- title={"Visualizar"}
69
- onPress={handleClick}
70
- backgroundColor={theme.colors.blue[400]}
71
- isLoading={false}
72
- height={32}
73
- width={"75%"}
74
- buttonTextStyle={{
75
- color: theme.colors.neutral[25],
76
- fontFamily: theme.fonts.inter_medium_500,
77
- fontSize: theme.fontSizes.lg,
78
- }}
79
- flexStyle={{ alignItems: "center", justifyContent: "center", flexDirection: "row" }}
80
- borderStyled={{
81
- borderRadius: theme.borderWidths.thick_medium,
82
- }}
83
- />
84
- </Box>
85
- </Box>
86
- </Box>
87
- );
88
- };
89
-
90
- /**
91
- * EXPORTS
92
- */
93
- export { LoadingProgress };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React from "react";
5
+
6
+ // component
7
+ import { Box } from "../box";
8
+ import { Typography } from "../typography";
9
+ import { Button } from "../button";
10
+
11
+ // typings
12
+ import { ILoadingProgress } from "./interface";
13
+
14
+ // styles
15
+ import { theme } from "../../styles/theme/theme";
16
+
17
+ /**
18
+ *
19
+ * Componente LoadingProgress para a interação do usuário com ui.
20
+ */
21
+ const LoadingProgress: React.FC<ILoadingProgress> = ({
22
+ textLoading,
23
+ handleClick,
24
+ backgroundColor,
25
+ }: ILoadingProgress) => {
26
+ const truncatedText =
27
+ textLoading.length > 15 ? textLoading.substring(0, 13) + "..." : textLoading;
28
+ return (
29
+ <Box>
30
+ <Typography
31
+ text="Carregamento em Andamento"
32
+ size={theme.fontSizes.lg}
33
+ fontFamily={theme.fonts.inter_medium_500}
34
+ color={theme.colors.gray[800]}
35
+ />
36
+ <Box
37
+ paddingStyle={{ padding: theme.paddings["2xs"] }}
38
+ backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
39
+ borderStyled={{
40
+ borderWidth: theme.borderWidths.thin,
41
+ borderRadius: theme.borderWidths.thick_large,
42
+ borderStyle: "dashed",
43
+ borderColor: theme.colors.neutral[200],
44
+ }}
45
+ marginStyle={{ marginTop: theme.margins["2xs"], marginBottom: theme.margins["2xs"] }}
46
+ >
47
+ <Box flexStyle={{ flexDirection: "row", textAlign: "center" }}>
48
+ <Typography
49
+ text={"N° Carregamento: "}
50
+ size={theme.fontSizes.md}
51
+ fontFamily={theme.fonts.inter_bold_700}
52
+ color={theme.colors.blue[400]}
53
+ />
54
+
55
+ <Typography
56
+ text={truncatedText}
57
+ size={theme.fontSizes.md}
58
+ fontFamily={theme.fonts.inter_medium_500}
59
+ color={theme.colors.gray[800]}
60
+ letterSpacing={"regular"}
61
+ />
62
+ </Box>
63
+ <Box
64
+ flexStyle={{ alignItems: "center", justifyContent: "center", flexDirection: "row" }}
65
+ marginStyle={{ marginTop: theme.margins["2xs"] }}
66
+ >
67
+ <Button
68
+ title={"Visualizar"}
69
+ onPress={handleClick}
70
+ backgroundColor={theme.colors.blue[400]}
71
+ isLoading={false}
72
+ height={32}
73
+ width={"75%"}
74
+ buttonTextStyle={{
75
+ color: theme.colors.neutral[25],
76
+ fontFamily: theme.fonts.inter_medium_500,
77
+ fontSize: theme.fontSizes.lg,
78
+ }}
79
+ flexStyle={{ alignItems: "center", justifyContent: "center", flexDirection: "row" }}
80
+ borderStyled={{
81
+ borderRadius: theme.borderWidths.thick_medium,
82
+ }}
83
+ />
84
+ </Box>
85
+ </Box>
86
+ </Box>
87
+ );
88
+ };
89
+
90
+ /**
91
+ * EXPORTS
92
+ */
93
+ export { LoadingProgress };
@@ -10,7 +10,7 @@ interface IMenuItem extends ViewProps, IGlobalCss {
10
10
  title?: string;
11
11
  handleNavigation: () => void;
12
12
  selected: boolean;
13
- typeSelected: "LOADING" | "COIL" | "HISTORY";
13
+ typeSelected: "LOADING" | "ACTIVITY" | "HISTORY";
14
14
  }
15
15
 
16
16
  /**