vpt-sebraeds 0.0.16 → 0.0.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.
|
@@ -31,6 +31,7 @@ const ContentCard = ({
|
|
|
31
31
|
iconPosition = '', // Posição do ícone
|
|
32
32
|
cardHeight, // NOVO: permite passar altura customizada
|
|
33
33
|
style, // NOVO: permite passar estilos customizados
|
|
34
|
+
centerDonut = false, // NOVO: centraliza o DonutChart
|
|
34
35
|
}) => {
|
|
35
36
|
console.log("Chegou isso:", progress);
|
|
36
37
|
const containerStyle = [
|
|
@@ -109,7 +110,7 @@ const ContentCard = ({
|
|
|
109
110
|
{/* Validação para todo o conteúdo após o título quando NÃO há imagem */}
|
|
110
111
|
{!imageSource && (
|
|
111
112
|
<>
|
|
112
|
-
<View style={styles.infoContainer}>
|
|
113
|
+
<View style={[styles.infoContainer, centerDonut && styles.infoContainerCentered]}>
|
|
113
114
|
<View style={styles.dateContainer}>
|
|
114
115
|
{verifyIfShowIconCalendar(time, date, location) && <Icon name="calendar-line" size={30} color="#081032" />}
|
|
115
116
|
<View style={styles.paddingRow}>
|
|
@@ -119,7 +120,13 @@ const ContentCard = ({
|
|
|
119
120
|
</View>
|
|
120
121
|
</View>
|
|
121
122
|
{showProgressBar ? (
|
|
122
|
-
|
|
123
|
+
centerDonut ? (
|
|
124
|
+
<View style={styles.donutCenteredContainer}>
|
|
125
|
+
<DonutChart progress={progress} label={progressLabel} />
|
|
126
|
+
</View>
|
|
127
|
+
) : (
|
|
128
|
+
<DonutChart progress={progress} label={progressLabel} />
|
|
129
|
+
)
|
|
123
130
|
) : (
|
|
124
131
|
// Placeholder para manter a altura igual
|
|
125
132
|
<View style={{ height: 0 }} />
|
|
@@ -256,6 +263,14 @@ const styles = StyleSheet.create({
|
|
|
256
263
|
gap: 8,
|
|
257
264
|
marginBottom: 16, // Reduz margem
|
|
258
265
|
},
|
|
266
|
+
infoContainerCentered: {
|
|
267
|
+
alignItems: 'center',
|
|
268
|
+
},
|
|
269
|
+
donutCenteredContainer: {
|
|
270
|
+
width: '100%',
|
|
271
|
+
alignItems: 'center',
|
|
272
|
+
justifyContent: 'center',
|
|
273
|
+
},
|
|
259
274
|
dateContainer: {
|
|
260
275
|
flexDirection: 'row',
|
|
261
276
|
alignItems: 'center',
|
|
@@ -17,45 +17,48 @@ export interface SETextProps extends TextProps {
|
|
|
17
17
|
justify?: boolean;
|
|
18
18
|
limit?: number | null;
|
|
19
19
|
type?:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
20
|
+
| 'heading-1'
|
|
21
|
+
| 'heading-2'
|
|
22
|
+
| 'heading-3'
|
|
23
|
+
| 'heading-4'
|
|
24
|
+
| 'heading-5'
|
|
25
|
+
| 'heading-6'
|
|
26
|
+
| 'subtitle'
|
|
27
|
+
| 'sm-body'
|
|
28
|
+
| 'sm-body-semibold'
|
|
29
|
+
| 'sm-body-bold'
|
|
30
|
+
| 'xs-body'
|
|
31
|
+
| 'xs-body-semibold'
|
|
32
|
+
| 'xs-body-bold'
|
|
33
|
+
| 'xxs-body'
|
|
34
|
+
| 'xxs-body-semibold'
|
|
35
|
+
| 'xxs-body-bold'
|
|
36
|
+
| 'xxxs-body'
|
|
37
|
+
| 'xxxs-body-semibold'
|
|
38
|
+
| 'xxxs-body-bold'
|
|
39
|
+
| 'ns-heading-1'
|
|
40
|
+
| 'ns-heading-2'
|
|
41
|
+
| 'ns-heading-3'
|
|
42
|
+
| 'ns-heading-4'
|
|
43
|
+
| 'ns-heading-5'
|
|
44
|
+
| 'ns-heading-6'
|
|
45
|
+
| 'ns-subtitle'
|
|
46
|
+
| 'ns-sm-body'
|
|
47
|
+
| 'ns-sm-body-semibold'
|
|
48
|
+
| 'ns-sm-body-bold'
|
|
49
|
+
| 'ns-xs-body'
|
|
50
|
+
| 'ns-xs-body-semibold'
|
|
51
|
+
| 'ns-xs-body-bold'
|
|
52
|
+
| 'ns-xxs-body'
|
|
53
|
+
| 'ns-xxs-body-semibold'
|
|
54
|
+
| 'ns-xxs-body-bold'
|
|
55
|
+
| 'ns-xxxs-body'
|
|
56
|
+
| 'ns-xxxs-body-semibold'
|
|
57
|
+
| 'ns-xxxs-body-bold'
|
|
58
|
+
| 'button-large'
|
|
59
|
+
| 'button-medium'
|
|
60
|
+
| 'button-small'
|
|
61
|
+
| null;
|
|
59
62
|
mt?: number | null;
|
|
60
63
|
mb?: number | null;
|
|
61
64
|
ml?: number | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default ContentCard;
|
|
2
|
-
declare function ContentCard({ title, date, time, location, tags, onPrimaryAction, onSecondaryAction, primaryActionLabel, secondaryActionLabel, primaryActionIconName, secondaryActionIconName, variant, showButtons, showProgressBar, progress, singleButton, onPressCard, imageSource, imageHeight, timeInfo, iconPosition, cardHeight, style, }: {
|
|
2
|
+
declare function ContentCard({ title, date, time, location, tags, onPrimaryAction, onSecondaryAction, primaryActionLabel, secondaryActionLabel, primaryActionIconName, secondaryActionIconName, variant, showButtons, showProgressBar, progress, singleButton, onPressCard, imageSource, imageHeight, timeInfo, iconPosition, cardHeight, style, centerDonut, }: {
|
|
3
3
|
title: any;
|
|
4
4
|
date: any;
|
|
5
5
|
time: any;
|
|
@@ -23,6 +23,7 @@ declare function ContentCard({ title, date, time, location, tags, onPrimaryActio
|
|
|
23
23
|
iconPosition?: string | undefined;
|
|
24
24
|
cardHeight: any;
|
|
25
25
|
style: any;
|
|
26
|
+
centerDonut?: boolean | undefined;
|
|
26
27
|
}): React.JSX.Element;
|
|
27
28
|
import React from 'react';
|
|
28
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ContentCard/index.jsx"],"names":[],"mappings":";AASA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ContentCard/index.jsx"],"names":[],"mappings":";AASA;;;;;;;;;;;;;;;;;;;;;;;;;sBA6LC;kBAtMiB,OAAO"}
|
|
@@ -12,6 +12,7 @@ variant = 'default', showButtons = true, showProgressBar = true, progress = 0.4,
|
|
|
12
12
|
iconPosition = '', // Posição do ícone
|
|
13
13
|
cardHeight, // NOVO: permite passar altura customizada
|
|
14
14
|
style, // NOVO: permite passar estilos customizados
|
|
15
|
+
centerDonut = false, // NOVO: centraliza o DonutChart
|
|
15
16
|
}) => {
|
|
16
17
|
console.log("Chegou isso:", progress);
|
|
17
18
|
const containerStyle = [
|
|
@@ -62,7 +63,7 @@ style, // NOVO: permite passar estilos customizados
|
|
|
62
63
|
|
|
63
64
|
{/* Validação para todo o conteúdo após o título quando NÃO há imagem */}
|
|
64
65
|
{!imageSource && (<>
|
|
65
|
-
<View style={styles.infoContainer}>
|
|
66
|
+
<View style={[styles.infoContainer, centerDonut && styles.infoContainerCentered]}>
|
|
66
67
|
<View style={styles.dateContainer}>
|
|
67
68
|
{verifyIfShowIconCalendar(time, date, location) && <Icon name="calendar-line" size={30} color="#081032"/>}
|
|
68
69
|
<View style={styles.paddingRow}>
|
|
@@ -71,7 +72,9 @@ style, // NOVO: permite passar estilos customizados
|
|
|
71
72
|
{location ? <Text style={styles.timeText}>{location}</Text> : null}
|
|
72
73
|
</View>
|
|
73
74
|
</View>
|
|
74
|
-
{showProgressBar ? (<
|
|
75
|
+
{showProgressBar ? (centerDonut ? (<View style={styles.donutCenteredContainer}>
|
|
76
|
+
<DonutChart progress={progress} label={progressLabel}/>
|
|
77
|
+
</View>) : (<DonutChart progress={progress} label={progressLabel}/>)) : (
|
|
75
78
|
// Placeholder para manter a altura igual
|
|
76
79
|
<View style={{ height: 0 }}/>)}
|
|
77
80
|
</View>
|
|
@@ -160,6 +163,14 @@ const styles = StyleSheet.create({
|
|
|
160
163
|
gap: 8,
|
|
161
164
|
marginBottom: 16, // Reduz margem
|
|
162
165
|
},
|
|
166
|
+
infoContainerCentered: {
|
|
167
|
+
alignItems: 'center',
|
|
168
|
+
},
|
|
169
|
+
donutCenteredContainer: {
|
|
170
|
+
width: '100%',
|
|
171
|
+
alignItems: 'center',
|
|
172
|
+
justifyContent: 'center',
|
|
173
|
+
},
|
|
163
174
|
dateContainer: {
|
|
164
175
|
flexDirection: 'row',
|
|
165
176
|
alignItems: 'center',
|