jornada-ui 0.4.4 → 0.4.6

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 (122) hide show
  1. package/lib/commonjs/components/capture-photo/index.js +4 -4
  2. package/lib/commonjs/components/card-report/index.js +139 -127
  3. package/lib/commonjs/components/card-report/index.js.map +1 -1
  4. package/lib/commonjs/components/card-with-draw-coil/index.js +5 -5
  5. package/lib/commonjs/components/card-with-draw-coil/index.js.map +1 -1
  6. package/lib/commonjs/components/coil-removel-code/index.js +5 -5
  7. package/lib/commonjs/components/coil-removel-code/index.js.map +1 -1
  8. package/lib/commonjs/components/history-activities-card/index.js +15 -18
  9. package/lib/commonjs/components/history-activities-card/index.js.map +1 -1
  10. package/lib/commonjs/components/resume-raking/index.js +79 -0
  11. package/lib/commonjs/components/resume-raking/index.js.map +1 -0
  12. package/lib/commonjs/components/resume-raking/interface.js +2 -0
  13. package/lib/commonjs/components/resume-raking/interface.js.map +1 -0
  14. package/lib/commonjs/components/resume-raking/styles.js +2 -0
  15. package/lib/commonjs/components/resume-raking/styles.js.map +1 -0
  16. package/lib/commonjs/components/travel-history/index.js +248 -237
  17. package/lib/commonjs/components/travel-history/index.js.map +1 -1
  18. package/lib/commonjs/components/user-profile/index.js +1 -1
  19. package/lib/commonjs/components/user-profile/index.js.map +1 -1
  20. package/lib/commonjs/components/weekly-table/helpers/calcular-total-horas.js +48 -10
  21. package/lib/commonjs/components/weekly-table/helpers/calcular-total-horas.js.map +1 -1
  22. package/lib/commonjs/components/weekly-table/index.js +9 -10
  23. package/lib/commonjs/components/weekly-table/index.js.map +1 -1
  24. package/lib/commonjs/index.js +11 -4
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/styles/theme/theme.js +1 -0
  27. package/lib/commonjs/styles/theme/theme.js.map +1 -1
  28. package/lib/module/components/capture-photo/index.js +4 -4
  29. package/lib/module/components/card-report/index.js +139 -127
  30. package/lib/module/components/card-report/index.js.map +1 -1
  31. package/lib/module/components/card-with-draw-coil/index.js +5 -5
  32. package/lib/module/components/card-with-draw-coil/index.js.map +1 -1
  33. package/lib/module/components/coil-removel-code/index.js +5 -5
  34. package/lib/module/components/coil-removel-code/index.js.map +1 -1
  35. package/lib/module/components/history-activities-card/index.js +13 -16
  36. package/lib/module/components/history-activities-card/index.js.map +1 -1
  37. package/lib/module/components/resume-raking/index.js +72 -0
  38. package/lib/module/components/resume-raking/index.js.map +1 -0
  39. package/lib/module/components/resume-raking/interface.js +2 -0
  40. package/lib/module/components/resume-raking/interface.js.map +1 -0
  41. package/lib/module/components/resume-raking/styles.js +2 -0
  42. package/lib/module/components/resume-raking/styles.js.map +1 -0
  43. package/lib/module/components/travel-history/index.js +248 -237
  44. package/lib/module/components/travel-history/index.js.map +1 -1
  45. package/lib/module/components/user-profile/index.js +1 -1
  46. package/lib/module/components/user-profile/index.js.map +1 -1
  47. package/lib/module/components/weekly-table/helpers/calcular-total-horas.js +46 -9
  48. package/lib/module/components/weekly-table/helpers/calcular-total-horas.js.map +1 -1
  49. package/lib/module/components/weekly-table/index.js +10 -11
  50. package/lib/module/components/weekly-table/index.js.map +1 -1
  51. package/lib/module/index.js +1 -0
  52. package/lib/module/index.js.map +1 -1
  53. package/lib/module/styles/theme/theme.js +1 -0
  54. package/lib/module/styles/theme/theme.js.map +1 -1
  55. package/lib/typescript/commonjs/src/components/capture-photo/index.d.ts.map +1 -1
  56. package/lib/typescript/commonjs/src/components/card-report/index.d.ts +1 -0
  57. package/lib/typescript/commonjs/src/components/card-report/index.d.ts.map +1 -1
  58. package/lib/typescript/commonjs/src/components/card-with-draw-coil/index.d.ts.map +1 -1
  59. package/lib/typescript/commonjs/src/components/history-activities-card/index.d.ts +1 -0
  60. package/lib/typescript/commonjs/src/components/history-activities-card/index.d.ts.map +1 -1
  61. package/lib/typescript/commonjs/src/components/history-activities-card/interface.d.ts +2 -0
  62. package/lib/typescript/commonjs/src/components/history-activities-card/interface.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/src/components/resume-raking/index.d.ts +8 -0
  64. package/lib/typescript/commonjs/src/components/resume-raking/index.d.ts.map +1 -0
  65. package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts +13 -0
  66. package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts.map +1 -0
  67. package/lib/typescript/commonjs/src/components/resume-raking/styles.d.ts +1 -0
  68. package/lib/typescript/commonjs/src/components/resume-raking/styles.d.ts.map +1 -0
  69. package/lib/typescript/commonjs/src/components/travel-history/index.d.ts +1 -0
  70. package/lib/typescript/commonjs/src/components/travel-history/index.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/src/components/weekly-table/helpers/calcular-total-horas.d.ts +2 -1
  72. package/lib/typescript/commonjs/src/components/weekly-table/helpers/calcular-total-horas.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/src/components/weekly-table/index.d.ts.map +1 -1
  74. package/lib/typescript/commonjs/src/index.d.ts +1 -0
  75. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  76. package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts +1 -0
  77. package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/src/styles/theme/theme.d.ts +1 -0
  79. package/lib/typescript/commonjs/src/styles/theme/theme.d.ts.map +1 -1
  80. package/lib/typescript/module/src/components/capture-photo/index.d.ts.map +1 -1
  81. package/lib/typescript/module/src/components/card-report/index.d.ts +1 -0
  82. package/lib/typescript/module/src/components/card-report/index.d.ts.map +1 -1
  83. package/lib/typescript/module/src/components/card-with-draw-coil/index.d.ts.map +1 -1
  84. package/lib/typescript/module/src/components/history-activities-card/index.d.ts +1 -0
  85. package/lib/typescript/module/src/components/history-activities-card/index.d.ts.map +1 -1
  86. package/lib/typescript/module/src/components/history-activities-card/interface.d.ts +2 -0
  87. package/lib/typescript/module/src/components/history-activities-card/interface.d.ts.map +1 -1
  88. package/lib/typescript/module/src/components/resume-raking/index.d.ts +8 -0
  89. package/lib/typescript/module/src/components/resume-raking/index.d.ts.map +1 -0
  90. package/lib/typescript/module/src/components/resume-raking/interface.d.ts +13 -0
  91. package/lib/typescript/module/src/components/resume-raking/interface.d.ts.map +1 -0
  92. package/lib/typescript/module/src/components/resume-raking/styles.d.ts +1 -0
  93. package/lib/typescript/module/src/components/resume-raking/styles.d.ts.map +1 -0
  94. package/lib/typescript/module/src/components/travel-history/index.d.ts +1 -0
  95. package/lib/typescript/module/src/components/travel-history/index.d.ts.map +1 -1
  96. package/lib/typescript/module/src/components/weekly-table/helpers/calcular-total-horas.d.ts +2 -1
  97. package/lib/typescript/module/src/components/weekly-table/helpers/calcular-total-horas.d.ts.map +1 -1
  98. package/lib/typescript/module/src/components/weekly-table/index.d.ts.map +1 -1
  99. package/lib/typescript/module/src/index.d.ts +1 -0
  100. package/lib/typescript/module/src/index.d.ts.map +1 -1
  101. package/lib/typescript/module/src/styles/global/theme-provider.d.ts +1 -0
  102. package/lib/typescript/module/src/styles/global/theme-provider.d.ts.map +1 -1
  103. package/lib/typescript/module/src/styles/theme/theme.d.ts +1 -0
  104. package/lib/typescript/module/src/styles/theme/theme.d.ts.map +1 -1
  105. package/package.json +1 -1
  106. package/src/components/capture-photo/index.tsx +133 -133
  107. package/src/components/card-report/index.tsx +175 -168
  108. package/src/components/card-report/interface.d.ts +140 -136
  109. package/src/components/card-with-draw-coil/index.tsx +165 -165
  110. package/src/components/coil-removel-code/index.tsx +50 -50
  111. package/src/components/history-activities-card/index.tsx +211 -209
  112. package/src/components/history-activities-card/interface.ts +147 -145
  113. package/src/components/resume-raking/index.tsx +75 -0
  114. package/src/components/resume-raking/interface.ts +14 -0
  115. package/src/components/resume-raking/styles.ts +0 -0
  116. package/src/components/travel-history/index.tsx +330 -314
  117. package/src/components/travel-history/interface.d.ts +153 -149
  118. package/src/components/user-profile/index.tsx +1 -1
  119. package/src/components/weekly-table/helpers/calcular-total-horas.ts +89 -50
  120. package/src/components/weekly-table/index.tsx +138 -142
  121. package/src/index.tsx +1 -0
  122. package/src/styles/theme/theme.ts +1 -0
@@ -1,145 +1,147 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import type React from "react";
5
- import { type DimensionValue, type ViewProps } from "react-native";
6
-
7
- /**
8
- * INTERFACE
9
- */
10
-
11
- type ICardActivitiesWeek = ViewProps & {
12
- /**
13
- * props que mostra o nome do usuário
14
- */
15
- name?: string;
16
-
17
- /**
18
- * props que mostra o ciclo do relatório - DIÁRIA OU SEMANAL
19
- */
20
- ciclo?: string;
21
-
22
- /**
23
- * props que mostra a data
24
- */
25
- data_start: string;
26
- data_end?: string | null;
27
- duration: string;
28
- status?: string;
29
- name_activitie: string;
30
- type_activitie: string;
31
- avatar?: string;
32
- idAtividade: number;
33
-
34
- children?: React.ReactNode;
35
-
36
- /**
37
- * TestID para testes automático e identificação
38
- */
39
- testID?: string;
40
-
41
- /**
42
- * A propriedade CSS abreviada border define a borda de um elemento. Ele define os valores de largura da borda, estilo da borda e cor da borda.
43
- */
44
- borderStyled?: {
45
- borderStyle?: "solid" | "dotted" | "dashed";
46
-
47
- borderRadius?: number | DimensionValue;
48
- borderTopRightRadius?: number | DimensionValue;
49
- borderTopLeftRadius?: number | DimensionValue;
50
- borderBottomRightRadius?: number | DimensionValue;
51
- borderBottomLeftRadius?: number | DimensionValue;
52
-
53
- borderWidth?: number | DimensionValue;
54
- borderLeftWidth?: number | DimensionValue;
55
- borderRightWidth?: number | DimensionValue;
56
- borderTopWidth?: number | DimensionValue;
57
- borderBottomWidth?: number | DimensionValue;
58
-
59
- borderColor?: string;
60
- borderBottomColor?: string;
61
- borderLeftColor?: string;
62
- borderRightColor?: string;
63
- borderTopColor?: string;
64
- };
65
-
66
- /**
67
- * Propriedades que define a orientação do button que é usada para representar uma página. Na maioria das vezes, esse valores corresponde ao posicionamento alvo da página impressa, se aplicável.
68
- */
69
- flexStyle?: {
70
- alignItems?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
71
- alignSelf?: "auto" | "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
72
- flex?: string | number;
73
- flexDirection?: "column" | "column-reverse" | "row" | "row-reverse";
74
- flexWrap?: "nowrap" | "wrap" | "wrap-reverse";
75
- textAlign?: "auto" | "center" | "left" | "right" | "justify";
76
- justifyContent?:
77
- | "flex-start"
78
- | "flex-end"
79
- | "center"
80
- | "space-between"
81
- | "space-around"
82
- | "space-evenly";
83
- };
84
-
85
- /**
86
- * A propriedade margin do CSS define a área de margem nos quatro lados do elemento. É uma abreviação que define todas as margens individuais de uma só vez: margin-top, margin-right (en-US), margin-bottom, e margin-left (en-US).
87
- */
88
- marginStyle?: {
89
- margin?: number | DimensionValue;
90
- marginLeft?: number | DimensionValue;
91
- marginRight?: number | DimensionValue;
92
- marginTop?: number | DimensionValue;
93
- marginBottom?: number | DimensionValue;
94
- };
95
-
96
- /**
97
- * A propriedade padding define uma a distância entre o conteúdo de um elemento e suas bordas. É um atalho que evita definir uma distância para cada lado separadamente (padding-top, padding-right, padding-bottom, padding-left).
98
- */
99
- paddingStyle?: {
100
- padding?: number | DimensionValue;
101
- paddingLeft?: number | DimensionValue;
102
- paddingRight?: number | DimensionValue;
103
- paddingTop?: number | DimensionValue;
104
- paddingBottom?: number | DimensionValue;
105
- };
106
-
107
- /**
108
- * A propriedade CSS height define a altura de um elemento. A altura de um elemento é a distância do topo da borda superior do elemento ao fundo da borda inferior.
109
- */
110
- height?: number | DimensionValue;
111
-
112
- /**
113
- * A propriedade CSS width define a largura de um elemento. A largura de um elemento é a distância do topo da borda esquerda do elemento ao fundo da borda direita.
114
- */
115
- width?: number | DimensionValue;
116
-
117
- /**
118
- * O fundo abreviado CSS Propriedade define todas as propriedades do estilo de fundo de uma só vez, como cor, imagem, origem e tamanho ou método de repetição. As propriedades dos componentes não definidas no fundo da declaração de valor da propriedade abreviada são definidas como seus valores padrão..
119
- * A Propriedade Background está sendo utilizada para definir a cor de fundo do cabeçalho do card e do ícone check.
120
- */
121
- backgroundColor?: string;
122
-
123
- /**
124
- * Propriedade texto que sera renderizado pro usuário final
125
- */
126
- text?: string;
127
-
128
- /**
129
- * A propriedade CSS color define o valor da cor de primeiro plano do texto e das decorações de texto de um elemento e define o valor currentcolor. currentcolor pode ser usado como um valor indireto em outras propriedades e é o padrão para outras propriedades de cores, como border-color.
130
- */
131
- color?: {
132
- colorSvg?: string;
133
- colorText?: string;
134
- colorTextBold?: string;
135
- colorTextData?: string;
136
- };
137
-
138
- // Cor do ícone CHECK
139
- iconColor?: string;
140
- };
141
-
142
- /**
143
- * EXPORT
144
- */
145
- export type { ICardActivitiesWeek };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import type React from "react";
5
+ import { type DimensionValue, type ViewProps } from "react-native";
6
+ import type { PropertyType } from "../../utils/get-icon-by-property";
7
+
8
+ /**
9
+ * INTERFACE
10
+ */
11
+
12
+ type ICardActivitiesWeek = ViewProps & {
13
+ /**
14
+ * props que mostra o nome do usuário
15
+ */
16
+ name?: string;
17
+
18
+ /**
19
+ * props que mostra o ciclo do relatório - DIÁRIA OU SEMANAL
20
+ */
21
+ ciclo?: string;
22
+
23
+ /**
24
+ * props que mostra a data
25
+ */
26
+ data_start: string;
27
+ data_end?: string | null;
28
+ duration: string;
29
+ status?: string;
30
+ name_activitie: string;
31
+ referencia: PropertyType;
32
+ type_activitie: string;
33
+ avatar?: string;
34
+ idAtividade: number;
35
+
36
+ children?: React.ReactNode;
37
+
38
+ /**
39
+ * TestID para testes automático e identificação
40
+ */
41
+ testID?: string;
42
+
43
+ /**
44
+ * A propriedade CSS abreviada border define a borda de um elemento. Ele define os valores de largura da borda, estilo da borda e cor da borda.
45
+ */
46
+ borderStyled?: {
47
+ borderStyle?: "solid" | "dotted" | "dashed";
48
+
49
+ borderRadius?: number | DimensionValue;
50
+ borderTopRightRadius?: number | DimensionValue;
51
+ borderTopLeftRadius?: number | DimensionValue;
52
+ borderBottomRightRadius?: number | DimensionValue;
53
+ borderBottomLeftRadius?: number | DimensionValue;
54
+
55
+ borderWidth?: number | DimensionValue;
56
+ borderLeftWidth?: number | DimensionValue;
57
+ borderRightWidth?: number | DimensionValue;
58
+ borderTopWidth?: number | DimensionValue;
59
+ borderBottomWidth?: number | DimensionValue;
60
+
61
+ borderColor?: string;
62
+ borderBottomColor?: string;
63
+ borderLeftColor?: string;
64
+ borderRightColor?: string;
65
+ borderTopColor?: string;
66
+ };
67
+
68
+ /**
69
+ * Propriedades que define a orientação do button que é usada para representar uma página. Na maioria das vezes, esse valores corresponde ao posicionamento alvo da página impressa, se aplicável.
70
+ */
71
+ flexStyle?: {
72
+ alignItems?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
73
+ alignSelf?: "auto" | "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
74
+ flex?: string | number;
75
+ flexDirection?: "column" | "column-reverse" | "row" | "row-reverse";
76
+ flexWrap?: "nowrap" | "wrap" | "wrap-reverse";
77
+ textAlign?: "auto" | "center" | "left" | "right" | "justify";
78
+ justifyContent?:
79
+ | "flex-start"
80
+ | "flex-end"
81
+ | "center"
82
+ | "space-between"
83
+ | "space-around"
84
+ | "space-evenly";
85
+ };
86
+
87
+ /**
88
+ * A propriedade margin do CSS define a área de margem nos quatro lados do elemento. É uma abreviação que define todas as margens individuais de uma só vez: margin-top, margin-right (en-US), margin-bottom, e margin-left (en-US).
89
+ */
90
+ marginStyle?: {
91
+ margin?: number | DimensionValue;
92
+ marginLeft?: number | DimensionValue;
93
+ marginRight?: number | DimensionValue;
94
+ marginTop?: number | DimensionValue;
95
+ marginBottom?: number | DimensionValue;
96
+ };
97
+
98
+ /**
99
+ * A propriedade padding define uma a distância entre o conteúdo de um elemento e suas bordas. É um atalho que evita definir uma distância para cada lado separadamente (padding-top, padding-right, padding-bottom, padding-left).
100
+ */
101
+ paddingStyle?: {
102
+ padding?: number | DimensionValue;
103
+ paddingLeft?: number | DimensionValue;
104
+ paddingRight?: number | DimensionValue;
105
+ paddingTop?: number | DimensionValue;
106
+ paddingBottom?: number | DimensionValue;
107
+ };
108
+
109
+ /**
110
+ * A propriedade CSS height define a altura de um elemento. A altura de um elemento é a distância do topo da borda superior do elemento ao fundo da borda inferior.
111
+ */
112
+ height?: number | DimensionValue;
113
+
114
+ /**
115
+ * A propriedade CSS width define a largura de um elemento. A largura de um elemento é a distância do topo da borda esquerda do elemento ao fundo da borda direita.
116
+ */
117
+ width?: number | DimensionValue;
118
+
119
+ /**
120
+ * O fundo abreviado CSS Propriedade define todas as propriedades do estilo de fundo de uma só vez, como cor, imagem, origem e tamanho ou método de repetição. As propriedades dos componentes não definidas no fundo da declaração de valor da propriedade abreviada são definidas como seus valores padrão..
121
+ * A Propriedade Background está sendo utilizada para definir a cor de fundo do cabeçalho do card e do ícone check.
122
+ */
123
+ backgroundColor?: string;
124
+
125
+ /**
126
+ * Propriedade texto que sera renderizado pro usuário final
127
+ */
128
+ text?: string;
129
+
130
+ /**
131
+ * A propriedade CSS color define o valor da cor de primeiro plano do texto e das decorações de texto de um elemento e define o valor currentcolor. currentcolor pode ser usado como um valor indireto em outras propriedades e é o padrão para outras propriedades de cores, como border-color.
132
+ */
133
+ color?: {
134
+ colorSvg?: string;
135
+ colorText?: string;
136
+ colorTextBold?: string;
137
+ colorTextData?: string;
138
+ };
139
+
140
+ // Cor do ícone CHECK
141
+ iconColor?: string;
142
+ };
143
+
144
+ /**
145
+ * EXPORT
146
+ */
147
+ export type { ICardActivitiesWeek };
@@ -0,0 +1,75 @@
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React, { forwardRef } from "react";
5
+
6
+ // components
7
+ import Box from "../box";
8
+ import Typography from "../typography";
9
+
10
+ // styles
11
+ import { theme } from "../../styles/theme/theme";
12
+
13
+ // typings
14
+ import { asBaseComponent } from "../../@types/as-base-component";
15
+ import type { IRankingCard } from "./interface";
16
+
17
+ /**
18
+ * Componente ResumeRaking para a interação da ui.
19
+ */
20
+ const ResumeRaking = forwardRef<any, IRankingCard>(
21
+ ({ title, value, description }, ref): React.ReactElement => {
22
+ return (
23
+ <Box
24
+ ref={ref}
25
+ width={"100%"}
26
+ backgroundColor={theme.colors.neutral[25]}
27
+ borderStyled={{
28
+ borderRadius: theme.borderWidths.thick_medium,
29
+ borderWidth: 1,
30
+ borderColor: theme.colors.neutral[300],
31
+ }}
32
+ paddingStyle={{
33
+ padding: theme.paddings.xs,
34
+ }}
35
+ marginStyle={{
36
+ marginBottom: theme.margins.xs,
37
+ }}
38
+ >
39
+ {/* título */}
40
+ <Typography
41
+ text={title}
42
+ color={theme.colors.black[100]}
43
+ size={theme.fontSizes.sm}
44
+ fontFamily={theme.fonts.inter_bold_700}
45
+ fontWeight={"500"}
46
+ marginBottom={theme.margins.xs}
47
+ />
48
+
49
+ {/* valor principal */}
50
+ <Typography
51
+ text={value}
52
+ color={theme.colors.black[180]}
53
+ size={theme.fontSizes["2xl"]}
54
+ fontFamily={theme.fonts.inter_bold_700}
55
+ fontWeight={"700"}
56
+ marginBottom={theme.margins.xs}
57
+ />
58
+
59
+ <Box flexStyle={{ flexDirection: "row", alignItems: "center", justifyContent: "flex-end" }}>
60
+ {/* descrição */}
61
+ <Typography
62
+ text={description}
63
+ color={theme.colors.red[500]}
64
+ size={theme.fontSizes.sm}
65
+ fontFamily={theme.fonts.inter_regular_400}
66
+ />
67
+ </Box>
68
+ </Box>
69
+ );
70
+ }
71
+ );
72
+
73
+ ResumeRaking.displayName = "ResumeRaking";
74
+
75
+ export default asBaseComponent(ResumeRaking);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * IMPORTS
3
+ */
4
+
5
+ interface IRankingCard {
6
+ title: string;
7
+ value: string; // Ex: "53:35 H"
8
+ description: string; // Ex: "3.200 KM + 60:17 HORAS"
9
+ }
10
+
11
+ /**
12
+ * EXPORT
13
+ */
14
+ export type { IRankingCard };
File without changes