vpt-sebraeds 0.0.17 → 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
- <DonutChart progress={progress} label={progressLabel} />
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',
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;sBAsLC;kBA/LiB,OAAO"}
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 ? (<DonutChart progress={progress} label={progressLabel}/>) : (
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',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpt-sebraeds",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Biblioteca de componentes React Native do Sebrae",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",