jornada-ui 0.4.16 → 0.4.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/components/modal-type-activities/index.js +7 -6
  2. package/lib/commonjs/components/modal-type-activities/index.js.map +1 -1
  3. package/lib/commonjs/components/modal-type-activities/mock/index.js +34 -3
  4. package/lib/commonjs/components/modal-type-activities/mock/index.js.map +1 -1
  5. package/lib/commonjs/components/modals/modal-change-activitie-history/helpers/index.js +35 -0
  6. package/lib/commonjs/components/modals/modal-change-activitie-history/helpers/index.js.map +1 -0
  7. package/lib/commonjs/components/modals/modal-change-activitie-history/index.js +203 -0
  8. package/lib/commonjs/components/modals/modal-change-activitie-history/index.js.map +1 -0
  9. package/lib/commonjs/components/modals/modal-change-activitie-history/interface.js +6 -0
  10. package/lib/commonjs/components/modals/modal-change-activitie-history/interface.js.map +1 -0
  11. package/lib/commonjs/components/step-indicator/index.js +131 -68
  12. package/lib/commonjs/components/step-indicator/index.js.map +1 -1
  13. package/lib/module/components/modal-type-activities/index.js +8 -7
  14. package/lib/module/components/modal-type-activities/index.js.map +1 -1
  15. package/lib/module/components/modal-type-activities/mock/index.js +33 -2
  16. package/lib/module/components/modal-type-activities/mock/index.js.map +1 -1
  17. package/lib/module/components/modals/modal-change-activitie-history/helpers/index.js +32 -0
  18. package/lib/module/components/modals/modal-change-activitie-history/helpers/index.js.map +1 -0
  19. package/lib/module/components/modals/modal-change-activitie-history/index.js +196 -0
  20. package/lib/module/components/modals/modal-change-activitie-history/index.js.map +1 -0
  21. package/lib/module/components/modals/modal-change-activitie-history/interface.js +4 -0
  22. package/lib/module/components/modals/modal-change-activitie-history/interface.js.map +1 -0
  23. package/lib/module/components/step-indicator/index.js +129 -65
  24. package/lib/module/components/step-indicator/index.js.map +1 -1
  25. package/lib/typescript/commonjs/src/components/modal-type-activities/index.d.ts.map +1 -1
  26. package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts +1 -0
  27. package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts.map +1 -1
  28. package/lib/typescript/commonjs/src/components/modal-type-activities/mock/index.d.ts +17 -0
  29. package/lib/typescript/commonjs/src/components/modal-type-activities/mock/index.d.ts.map +1 -1
  30. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/helpers/index.d.ts +13 -0
  31. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/helpers/index.d.ts.map +1 -0
  32. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts +10 -0
  33. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -0
  34. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts +18 -0
  35. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -0
  36. package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts +3 -9
  37. package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts.map +1 -1
  38. package/lib/typescript/module/src/components/modal-type-activities/index.d.ts.map +1 -1
  39. package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts +1 -0
  40. package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts.map +1 -1
  41. package/lib/typescript/module/src/components/modal-type-activities/mock/index.d.ts +17 -0
  42. package/lib/typescript/module/src/components/modal-type-activities/mock/index.d.ts.map +1 -1
  43. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/helpers/index.d.ts +13 -0
  44. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/helpers/index.d.ts.map +1 -0
  45. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts +10 -0
  46. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -0
  47. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts +18 -0
  48. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -0
  49. package/lib/typescript/module/src/components/step-indicator/index.d.ts +3 -9
  50. package/lib/typescript/module/src/components/step-indicator/index.d.ts.map +1 -1
  51. package/package.json +1 -1
  52. package/src/components/modal-type-activities/index.tsx +173 -169
  53. package/src/components/modal-type-activities/interface.ts +36 -34
  54. package/src/components/modal-type-activities/mock/index.ts +103 -65
  55. package/src/components/modals/modal-change-activitie-history/helpers/index.ts +15 -0
  56. package/src/components/modals/modal-change-activitie-history/index.tsx +189 -0
  57. package/src/components/modals/modal-change-activitie-history/interface.ts +16 -0
  58. package/src/components/step-indicator/index.tsx +226 -155
  59. package/src/components/step-indicator/interface.d.ts +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal-type-activities/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAGhE,UAAU,SAAS;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;CAC/B;AAED,UAAU,oBAAqB,SAAQ,UAAU,EAAE,UAAU;IAC3D,6BAA6B;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,yBAAyB;IACzB,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAEhC,yBAAyB;IACzB,SAAS,EAAE,OAAO,CAAC;IAEnB,qCAAqC;IAErC,oBAAoB,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC;CACrD;AAED;;GAEG;AACH,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal-type-activities/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAGhE,UAAU,SAAS;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;CAC/B;AAED,UAAU,oBAAqB,SAAQ,UAAU,EAAE,UAAU;IAC3D,6BAA6B;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,yBAAyB;IACzB,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAEhC,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAElC,yBAAyB;IACzB,SAAS,EAAE,OAAO,CAAC;IAEnB,qCAAqC;IAErC,oBAAoB,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC;CACrD;AAED;;GAEG;AACH,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,CAAC"}
@@ -17,4 +17,21 @@ export declare const activities: {
17
17
  tipo: string;
18
18
  }[];
19
19
  };
20
+ export declare const activitiesReserva: {
21
+ trabalho: {
22
+ id: number;
23
+ referencia: string;
24
+ cor_hex: string;
25
+ descricao: string;
26
+ tipo: string;
27
+ }[];
28
+ descanso: {
29
+ id: number;
30
+ atividade_id: number;
31
+ referencia: string;
32
+ cor_hex: string;
33
+ descricao: string;
34
+ tipo: string;
35
+ }[];
36
+ };
20
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modal-type-activities/mock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;CA6DtB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modal-type-activities/mock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;CA6DtB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;CAoC7B,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * CONSTANTS
3
+ */
4
+ declare const optionsActivities: {
5
+ label: string;
6
+ value: string;
7
+ key: number;
8
+ }[];
9
+ /**
10
+ * EXPORTS
11
+ */
12
+ export { optionsActivities };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/modals/modal-change-activitie-history/helpers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,QAAA,MAAM,iBAAiB;;;;GAMtB,CAAC;AAEF;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React from "react";
5
+ import type { IModalChangeActivityProps } from "./interface";
6
+ /**
7
+ * Componente Modal para alteração de atividade.
8
+ */
9
+ export declare const ModalChangeActivity: React.FC<IModalChangeActivityProps>;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modals/modal-change-activitie-history/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAgKnE,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * IMPROTS
3
+ */
4
+ interface IModalChangeActivityProps {
5
+ visible: boolean;
6
+ onClose: () => void;
7
+ modalConfirm: (newData: {
8
+ label: string;
9
+ value: string;
10
+ key: number;
11
+ }) => void;
12
+ descricao: string;
13
+ }
14
+ /**
15
+ * EXPORTS
16
+ */
17
+ export { type IModalChangeActivityProps };
18
+ //# sourceMappingURL=interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modals/modal-change-activitie-history/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,YAAY,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,OAAO,EAAE,KAAK,yBAAyB,EAAE,CAAC"}
@@ -1,14 +1,8 @@
1
- /**
2
- * IMPORTS
3
- */
4
1
  import React from "react";
5
2
  import type { IStepIndicator } from "./interface";
6
3
  /**
7
- * Componente StepIndicator para a interação da ui.
8
- */
9
- declare const StepIndicator: React.FC<IStepIndicator>;
10
- /**
11
- * EXPORTS
4
+ * Componente StepIndicator para a interação da ui.
12
5
  */
13
- export default StepIndicator;
6
+ declare const _default: React.ComponentType<IStepIndicator & React.RefAttributes<any>>;
7
+ export default _default;
14
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/step-indicator/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlD;;GAEG;AAEH,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA+J3C,CAAC;AAEF;;GAEG;AACH,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/step-indicator/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAajF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAqPlD;;GAEG;;AACH,wBAA8C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jornada-ui",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "description": "Biblioteca para desenvolvimento dos componentes para utilizar nos app",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -1,169 +1,173 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React, { forwardRef } from "react";
5
- import { Modal, TouchableOpacity, FlatList } from "react-native";
6
-
7
- // components
8
- import Box from "../box";
9
- import Button from "../button";
10
- import Typography from "../typography";
11
-
12
- // commons / icons
13
- import { Icons } from "../../common/icons-svg";
14
-
15
- // styles
16
- import { theme } from "../../styles/theme/theme";
17
-
18
- //typing
19
- import type { IModalTypeActivities, IActivity } from "./interface";
20
-
21
- // atividades
22
- import { activities } from "./mock";
23
-
24
- // utils
25
- import { getIconByProperty, type PropertyType } from "../../utils/get-icon-by-property";
26
- import { asBaseComponent } from "../../@types/as-base-component";
27
-
28
- const NUM_COLS = 3;
29
- const GUTTER = 8; // espaço horizontal entre botões
30
- const ROW_SPACE = 12; // espaço vertical entre linhas
31
-
32
- const ModalTest = forwardRef<any, IModalTypeActivities>(
33
- (
34
- { visible, onClose, handleSelectActivity, activityType, isLoading, style },
35
- ref
36
- ): React.ReactElement => {
37
- return (
38
- <Modal
39
- ref={ref}
40
- animationType="fade"
41
- transparent={true}
42
- onRequestClose={onClose}
43
- visible={visible}
44
- >
45
- <Box
46
- backgroundColor={"rgba(0, 0, 0, 0.7)"}
47
- flexStyle={{ flex: 1, justifyContent: "center", alignItems: "center" }}
48
- >
49
- <Box
50
- height={330}
51
- width={"92%"}
52
- backgroundColor={theme.colors.neutral[25]}
53
- borderStyled={{
54
- borderColor: theme.colors.blue[500],
55
- borderWidth: theme.borderWidths.thick,
56
- borderRadius: theme.borderWidths.thick_medium,
57
- }}
58
- paddingStyle={{
59
- padding: theme.paddings.md,
60
- }}
61
- style={{ position: "relative" }}
62
- >
63
- <Box
64
- width={"100%"}
65
- flexStyle={{
66
- flexDirection: "row",
67
- justifyContent: "space-between",
68
- alignItems: "center",
69
- }}
70
- >
71
- <Typography
72
- text="Atividades"
73
- size={theme.fontSizes.md}
74
- color={theme.colors.blue[500]}
75
- fontFamily={theme.fonts.inter_bold_700}
76
- lineHeight={theme.fontSizes.xl}
77
- />
78
-
79
- <TouchableOpacity activeOpacity={0.7} onPress={onClose} style={{}}>
80
- <Icons icon="CLOSED" color={theme.colors.blue[500]} />
81
- </TouchableOpacity>
82
- </Box>
83
-
84
- {/* as atividades */}
85
- <Box
86
- marginStyle={{ marginTop: theme.margins["2xl"] }}
87
- flexStyle={{ flex: 1, justifyContent: "center", alignItems: "center" }}
88
- >
89
- <FlatList
90
- data={activities[activityType]}
91
- numColumns={NUM_COLS}
92
- keyExtractor={(item) => String(item.id)}
93
- scrollEnabled={false}
94
- renderItem={({ item, index }) => {
95
- const isLastCol = (index + 1) % NUM_COLS === 0;
96
-
97
- return (
98
- <TouchableOpacity
99
- style={{
100
- alignItems: "center",
101
- justifyContent: "flex-start",
102
- width: 110,
103
- marginRight: isLastCol ? 0 : GUTTER, // espaço entre colunas
104
- marginBottom: ROW_SPACE, // espaço entre linhas
105
- paddingVertical: 12,
106
- borderRadius: 8,
107
- }}
108
- onPress={() => handleSelectActivity(item as IActivity)}
109
- >
110
- {getIconByProperty(item.referencia as PropertyType)}
111
-
112
- <Typography
113
- text={item.descricao}
114
- size={theme.fontSizes.xs}
115
- color={theme.colors.blue[500]}
116
- lineHeight={theme.fontSizes.lg}
117
- fontFamily={theme.fonts.inter_medium_500}
118
- fontWeight="500"
119
- align="center"
120
- marginTop={5}
121
- numberOfLines={3} // <= limita a 2 linhas
122
- ellipsizeMode="tail" // <= se passar, coloca “...”
123
- />
124
- </TouchableOpacity>
125
- );
126
- }}
127
- />
128
- </Box>
129
-
130
- <Button
131
- title={"CANCELAR ATIVIDADE"}
132
- width="100%"
133
- height={40}
134
- activeOpacity={0.7}
135
- onPress={onClose}
136
- backgroundColor={theme.colors.blue[500]}
137
- buttonTextStyle={{
138
- color: theme.colors.neutral[25],
139
- fontFamily: theme.fonts.inter_medium_500,
140
- fontSize: theme.fontSizes.md,
141
- fontWeight: "500",
142
- }}
143
- flexStyle={{
144
- flexDirection: "row",
145
- alignItems: "center",
146
- justifyContent: "center",
147
- }}
148
- borderStyled={{
149
- borderWidth: theme.borderWidths.thin,
150
- borderColor: theme.colors.blue[500],
151
- borderRadius: theme.borderWidths.thick_medium,
152
- }}
153
- marginStyle={{ marginLeft: theme.margins.md }}
154
- isLoading={isLoading ?? false}
155
- style={[style, { position: "absolute", bottom: 10, left: 0 }]}
156
- />
157
- </Box>
158
- </Box>
159
- </Modal>
160
- );
161
- }
162
- );
163
-
164
- ModalTest.displayName = "ModalTest";
165
-
166
- /**
167
- * EXPORT
168
- */
169
- export default asBaseComponent(ModalTest);
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React, { forwardRef } from "react";
5
+ import { Modal, TouchableOpacity, FlatList } from "react-native";
6
+
7
+ // components
8
+ import Box from "../box";
9
+ import Button from "../button";
10
+ import Typography from "../typography";
11
+
12
+ // commons / icons
13
+ import { Icons } from "../../common/icons-svg";
14
+
15
+ // styles
16
+ import { theme } from "../../styles/theme/theme";
17
+
18
+ //typing
19
+ import type { IModalTypeActivities, IActivity } from "./interface";
20
+
21
+ // atividades
22
+ import { activities, activitiesReserva } from "./mock";
23
+
24
+ // utils
25
+ import { getIconByProperty, type PropertyType } from "../../utils/get-icon-by-property";
26
+ import { asBaseComponent } from "../../@types/as-base-component";
27
+
28
+ const NUM_COLS = 3;
29
+ const GUTTER = 8; // espaço horizontal entre botões
30
+ const ROW_SPACE = 12; // espaço vertical entre linhas
31
+
32
+ const ModalTest = forwardRef<any, IModalTypeActivities>(
33
+ (
34
+ { visible, onClose, driverType, handleSelectActivity, activityType, isLoading, style },
35
+ ref
36
+ ): React.ReactElement => {
37
+ return (
38
+ <Modal
39
+ ref={ref}
40
+ animationType="fade"
41
+ transparent={true}
42
+ onRequestClose={onClose}
43
+ visible={visible}
44
+ >
45
+ <Box
46
+ backgroundColor={"rgba(0, 0, 0, 0.7)"}
47
+ flexStyle={{ flex: 1, justifyContent: "center", alignItems: "center" }}
48
+ >
49
+ <Box
50
+ height={330}
51
+ width={"92%"}
52
+ backgroundColor={theme.colors.neutral[25]}
53
+ borderStyled={{
54
+ borderColor: theme.colors.blue[500],
55
+ borderWidth: theme.borderWidths.thick,
56
+ borderRadius: theme.borderWidths.thick_medium,
57
+ }}
58
+ paddingStyle={{
59
+ padding: theme.paddings.md,
60
+ }}
61
+ style={{ position: "relative" }}
62
+ >
63
+ <Box
64
+ width={"100%"}
65
+ flexStyle={{
66
+ flexDirection: "row",
67
+ justifyContent: "space-between",
68
+ alignItems: "center",
69
+ }}
70
+ >
71
+ <Typography
72
+ text="Atividades"
73
+ size={theme.fontSizes.md}
74
+ color={theme.colors.blue[500]}
75
+ fontFamily={theme.fonts.inter_bold_700}
76
+ lineHeight={theme.fontSizes.xl}
77
+ />
78
+
79
+ <TouchableOpacity activeOpacity={0.7} onPress={onClose} style={{}}>
80
+ <Icons icon="CLOSED" color={theme.colors.blue[500]} />
81
+ </TouchableOpacity>
82
+ </Box>
83
+
84
+ {/* as atividades */}
85
+ <Box
86
+ marginStyle={{ marginTop: theme.margins["2xl"] }}
87
+ flexStyle={{ flex: 1, justifyContent: "center", alignItems: "flex-start" }}
88
+ >
89
+ <FlatList
90
+ data={
91
+ driverType === "normal"
92
+ ? activities[activityType]
93
+ : activitiesReserva[activityType]
94
+ }
95
+ numColumns={NUM_COLS}
96
+ keyExtractor={(item) => String(item.id)}
97
+ scrollEnabled={false}
98
+ renderItem={({ item, index }) => {
99
+ const isLastCol = (index + 1) % NUM_COLS === 0;
100
+
101
+ return (
102
+ <TouchableOpacity
103
+ style={{
104
+ alignItems: "center",
105
+ justifyContent: "flex-start",
106
+ width: 110,
107
+ marginRight: isLastCol ? 0 : GUTTER, // espaço entre colunas
108
+ marginBottom: ROW_SPACE, // espaço entre linhas
109
+ paddingVertical: 12,
110
+ borderRadius: 8,
111
+ }}
112
+ onPress={() => handleSelectActivity(item as IActivity)}
113
+ >
114
+ {getIconByProperty(item.referencia as PropertyType)}
115
+
116
+ <Typography
117
+ text={item.descricao}
118
+ size={theme.fontSizes.xs}
119
+ color={theme.colors.blue[500]}
120
+ lineHeight={theme.fontSizes.lg}
121
+ fontFamily={theme.fonts.inter_medium_500}
122
+ fontWeight="500"
123
+ align="center"
124
+ marginTop={5}
125
+ numberOfLines={3} // <= limita a 2 linhas
126
+ ellipsizeMode="tail" // <= se passar, coloca “...”
127
+ />
128
+ </TouchableOpacity>
129
+ );
130
+ }}
131
+ />
132
+ </Box>
133
+
134
+ <Button
135
+ title={"CANCELAR ATIVIDADE"}
136
+ width="100%"
137
+ height={40}
138
+ activeOpacity={0.7}
139
+ onPress={onClose}
140
+ backgroundColor={theme.colors.blue[500]}
141
+ buttonTextStyle={{
142
+ color: theme.colors.neutral[25],
143
+ fontFamily: theme.fonts.inter_medium_500,
144
+ fontSize: theme.fontSizes.md,
145
+ fontWeight: "500",
146
+ }}
147
+ flexStyle={{
148
+ flexDirection: "row",
149
+ alignItems: "center",
150
+ justifyContent: "center",
151
+ }}
152
+ borderStyled={{
153
+ borderWidth: theme.borderWidths.thin,
154
+ borderColor: theme.colors.blue[500],
155
+ borderRadius: theme.borderWidths.thick_medium,
156
+ }}
157
+ marginStyle={{ marginLeft: theme.margins.md }}
158
+ isLoading={isLoading ?? false}
159
+ style={[style, { position: "absolute", bottom: 10, left: 0 }]}
160
+ />
161
+ </Box>
162
+ </Box>
163
+ </Modal>
164
+ );
165
+ }
166
+ );
167
+
168
+ ModalTest.displayName = "ModalTest";
169
+
170
+ /**
171
+ * EXPORT
172
+ */
173
+ export default asBaseComponent(ModalTest);
@@ -1,34 +1,36 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import type { ModalProps } from "react-native";
5
- import type { IGlobalCss } from "../../styles/global/interface";
6
-
7
- // typing
8
- interface IActivity {
9
- id: number;
10
- referencia: string;
11
- cor_hex: string;
12
- descricao: string;
13
- tipo: "trabalho" | "descanso";
14
- }
15
-
16
- interface IModalTypeActivities extends ModalProps, IGlobalCss {
17
- /** função que fecha modal */
18
- onClose: () => void;
19
-
20
- /** tipo de atividades */
21
- activityType: IActivity["tipo"];
22
-
23
- /** se está carregando */
24
- isLoading: boolean;
25
-
26
- /** função que seleciona atividade */
27
- // eslint-disable-next-line no-unused-vars
28
- handleSelectActivity: (activity: IActivity) => void;
29
- }
30
-
31
- /**
32
- * EXPORTS
33
- */
34
- export type { IModalTypeActivities, IActivity };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import type { ModalProps } from "react-native";
5
+ import type { IGlobalCss } from "../../styles/global/interface";
6
+
7
+ // typing
8
+ interface IActivity {
9
+ id: number;
10
+ referencia: string;
11
+ cor_hex: string;
12
+ descricao: string;
13
+ tipo: "trabalho" | "descanso";
14
+ }
15
+
16
+ interface IModalTypeActivities extends ModalProps, IGlobalCss {
17
+ /** função que fecha modal */
18
+ onClose: () => void;
19
+
20
+ /** tipo de atividades */
21
+ activityType: IActivity["tipo"];
22
+
23
+ driverType?: "normal" | "reserva";
24
+
25
+ /** se está carregando */
26
+ isLoading: boolean;
27
+
28
+ /** função que seleciona atividade */
29
+ // eslint-disable-next-line no-unused-vars
30
+ handleSelectActivity: (activity: IActivity) => void;
31
+ }
32
+
33
+ /**
34
+ * EXPORTS
35
+ */
36
+ export type { IModalTypeActivities, IActivity };