vpt-sebraeds 0.0.17 → 0.0.19

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 }} />
@@ -136,6 +143,7 @@ const ContentCard = ({
136
143
  onPress={onPrimaryAction}
137
144
  expand
138
145
  iconName={primaryActionIconName || undefined}
146
+ iconPosition={iconPosition || undefined}
139
147
  />
140
148
  </>
141
149
  ) : (
@@ -256,6 +264,14 @@ const styles = StyleSheet.create({
256
264
  gap: 8,
257
265
  marginBottom: 16, // Reduz margem
258
266
  },
267
+ infoContainerCentered: {
268
+ alignItems: 'center',
269
+ },
270
+ donutCenteredContainer: {
271
+ width: '100%',
272
+ alignItems: 'center',
273
+ justifyContent: 'center',
274
+ },
259
275
  dateContainer: {
260
276
  flexDirection: 'row',
261
277
  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;;;;;;;;;;;;;;;;;;;;;;;;;sBA8LC;kBAvMiB,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,13 +72,15 @@ 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>
78
81
  {showButtons && (<View style={styles.actionsContainer}>
79
82
  {singleButton ? (<>
80
- <Button label={primaryActionLabel} variant="outlined" size="medium" onPress={onPrimaryAction} expand iconName={primaryActionIconName || undefined}/>
83
+ <Button label={primaryActionLabel} variant="outlined" size="medium" onPress={onPrimaryAction} expand iconName={primaryActionIconName || undefined} iconPosition={iconPosition || undefined}/>
81
84
  </>) : (<>
82
85
  <Button label={primaryActionLabel} variant="outlined" size="medium" onPress={onPrimaryAction} expand iconName={primaryActionIconName || undefined} iconPosition={iconPosition || undefined}/>
83
86
  {secondaryActionLabel && secondaryActionLabel !== "Label" ? (<Button label={secondaryActionLabel} variant="transparent" size="medium" onPress={onSecondaryAction} expand iconName={secondaryActionIconName || undefined} iconPosition={iconPosition || undefined}/>) : (
@@ -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.19",
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",