vpt-sebraeds 0.0.81 → 0.0.84

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.
@@ -0,0 +1,88 @@
1
+ import React from 'react';
2
+ import { Image, View } from 'react-native';
3
+
4
+ import MiniEventCard from './index';
5
+
6
+ export default {
7
+ title: 'Molecules/MiniEventCard',
8
+ component: MiniEventCard,
9
+ argTypes: {
10
+ title: { control: 'text' },
11
+ date: { control: 'text' },
12
+ subtitle: { control: 'text' },
13
+ meta: { control: 'text' },
14
+ location: { control: 'text' },
15
+ flatTop: { control: 'boolean' },
16
+ },
17
+ };
18
+
19
+ const Template = (args) => (
20
+ <View style={{ padding: 16 }}>
21
+ <MiniEventCard {...args} />
22
+ </View>
23
+ );
24
+
25
+ export const Default = Template.bind({});
26
+ Default.storyName = 'Com data';
27
+ Default.args = {
28
+ title: 'Semana do MEI - DF',
29
+ date: '25 a 29 de Maio',
30
+ location: 'Presencial e Online - Gratuito',
31
+ };
32
+
33
+ export const WithoutDate = Template.bind({});
34
+ WithoutDate.storyName = 'Sem data';
35
+ WithoutDate.args = {
36
+ title: 'Feira do Empreendedor 2026',
37
+ subtitle: 'Comunidade',
38
+ meta: '0 Publicações · 4 Perguntas',
39
+ };
40
+
41
+ export const Composition = () => (
42
+ <View style={{ padding: 16 }}>
43
+ <MiniEventCard flatTop>
44
+ <MiniEventCard.Icon />
45
+ <MiniEventCard.Content>
46
+ <MiniEventCard.Title>Semana do MEI - DF</MiniEventCard.Title>
47
+ <MiniEventCard.DateRow date="25 a 29 de Maio" />
48
+ <MiniEventCard.Location>Presencial e Online - Gratuito</MiniEventCard.Location>
49
+ </MiniEventCard.Content>
50
+ </MiniEventCard>
51
+ </View>
52
+ );
53
+
54
+ Composition.storyName = 'Composição';
55
+
56
+ export const WithImage = () => (
57
+ <View style={{ padding: 16 }}>
58
+ <View
59
+ style={{
60
+ borderWidth: 1,
61
+ borderColor: '#E2E9FC',
62
+ borderRadius: 12,
63
+ overflow: 'hidden',
64
+ backgroundColor: '#FFFFFF',
65
+ }}
66
+ >
67
+ <Image
68
+ source={{ uri: 'https://picsum.photos/600/240' }}
69
+ style={{ width: '100%', height: 160 }}
70
+ resizeMode="cover"
71
+ />
72
+ <MiniEventCard
73
+ flatTop
74
+ title="Feira do Empreendedor 2026"
75
+ date="19 a 22 de Outubro"
76
+ location="São Paulo, SP"
77
+ style={{
78
+ borderWidth: 0,
79
+ borderRadius: 0,
80
+ backgroundColor: '#FFFFFF',
81
+ padding: 16,
82
+ }}
83
+ />
84
+ </View>
85
+ </View>
86
+ );
87
+
88
+ WithImage.storyName = 'Com imagem';
@@ -0,0 +1,135 @@
1
+ import React from 'react';
2
+ import { StyleSheet, View } from 'react-native';
3
+
4
+ import Icon from '../Icon';
5
+ import SEText from '../SEText';
6
+
7
+ const MiniEventCardIcon = ({
8
+ name = 'calendar-event-line',
9
+ size = 32,
10
+ color = '#4F7CFE',
11
+ backgroundColor = '#EEF1FF',
12
+ style,
13
+ containerStyle,
14
+ }) => {
15
+ return (
16
+ <View style={[styles.iconContainer, { backgroundColor }, containerStyle]}>
17
+ <Icon name={name} size={size} color={color} style={style} />
18
+ </View>
19
+ );
20
+ };
21
+
22
+ const MiniEventCardContent = ({ children, style }) => {
23
+ return <View style={[styles.content, style]}>{children}</View>;
24
+ };
25
+
26
+ const MiniEventCardTitle = ({ children, style }) => {
27
+ return (
28
+ <SEText type="ns-sm-body-bold" style={style}>
29
+ {children}
30
+ </SEText>
31
+ );
32
+ };
33
+
34
+ const MiniEventCardDateRow = ({ date, iconName = 'calendar-line', iconColor = '#C167E6', style }) => {
35
+ return date ? (
36
+ <View style={[styles.dateRow, style]}>
37
+ <Icon name={iconName} size={16} color={iconColor} />
38
+ <SEText type="ns-sm-body-bold" style={styles.dateText}>
39
+ {date}
40
+ </SEText>
41
+ </View>
42
+ ) : null;
43
+ };
44
+
45
+ const MiniEventCardSubtitle = ({ children, style }) => {
46
+ return children ? <SEText style={[styles.subtitle, style]}>{children}</SEText> : null;
47
+ };
48
+
49
+ const MiniEventCardMeta = ({ children, style }) => {
50
+ return children ? <SEText style={[styles.meta, style]}>{children}</SEText> : null;
51
+ };
52
+
53
+ const MiniEventCardLocation = ({ children, style }) => {
54
+ return children ? <SEText style={[styles.location, style]}>{children}</SEText> : null;
55
+ };
56
+
57
+ const MiniEventCard = ({ children, title, date, subtitle, meta, location, flatTop = false, style }) => {
58
+ return (
59
+ <View style={[styles.container, flatTop && styles.flatTop, style]}>
60
+ {children || (
61
+ <>
62
+ <MiniEventCardIcon />
63
+ <MiniEventCardContent>
64
+ <MiniEventCardTitle>{title}</MiniEventCardTitle>
65
+ <MiniEventCardDateRow date={date} />
66
+ <MiniEventCardSubtitle>{subtitle}</MiniEventCardSubtitle>
67
+ <MiniEventCardMeta>{meta}</MiniEventCardMeta>
68
+ <MiniEventCardLocation>{location}</MiniEventCardLocation>
69
+ </MiniEventCardContent>
70
+ </>
71
+ )}
72
+ </View>
73
+ );
74
+ };
75
+
76
+ const styles = StyleSheet.create({
77
+ container: {
78
+ flexDirection: 'row',
79
+ alignItems: 'center',
80
+ borderWidth: 1,
81
+ borderColor: '#E2E9FC',
82
+ borderRadius: 12,
83
+ padding: 12,
84
+ backgroundColor: '#FAFBFF',
85
+ },
86
+ flatTop: {
87
+ borderTopLeftRadius: 0,
88
+ borderTopRightRadius: 0,
89
+ },
90
+ iconContainer: {
91
+ width: 64,
92
+ height: 64,
93
+ alignItems: 'center',
94
+ justifyContent: 'center',
95
+ backgroundColor: '#EEF1FF',
96
+ borderRadius: 8,
97
+ },
98
+ content: {
99
+ flex: 1,
100
+ marginLeft: 12,
101
+ },
102
+ dateRow: {
103
+ flexDirection: 'row',
104
+ alignItems: 'center',
105
+ marginTop: 4,
106
+ },
107
+ dateText: {
108
+ marginLeft: 4,
109
+ },
110
+ subtitle: {
111
+ color: '#687499',
112
+ fontSize: 12,
113
+ marginTop: 4,
114
+ },
115
+ meta: {
116
+ color: '#687499',
117
+ fontSize: 12,
118
+ marginTop: 2,
119
+ },
120
+ location: {
121
+ color: '#687499',
122
+ fontSize: 12,
123
+ marginTop: 4,
124
+ },
125
+ });
126
+
127
+ MiniEventCard.Icon = MiniEventCardIcon;
128
+ MiniEventCard.Content = MiniEventCardContent;
129
+ MiniEventCard.Title = MiniEventCardTitle;
130
+ MiniEventCard.DateRow = MiniEventCardDateRow;
131
+ MiniEventCard.Subtitle = MiniEventCardSubtitle;
132
+ MiniEventCard.Meta = MiniEventCardMeta;
133
+ MiniEventCard.Location = MiniEventCardLocation;
134
+
135
+ export default MiniEventCard;
@@ -10,7 +10,8 @@ const ProgressBar = ({
10
10
  total,
11
11
  completed = 0,
12
12
  color = '#193AB8',
13
- showLabel = true
13
+ showLabel = true,
14
+ style,
14
15
  }) => {
15
16
  const percent = Math.round(progress * 100);
16
17
 
@@ -18,7 +19,7 @@ const ProgressBar = ({
18
19
  const progressPercent = (completed / total) * 100;
19
20
 
20
21
  return (
21
- <View style={[styles.container, { opacity }]}>
22
+ <View style={[styles.container, { opacity }, style]}>
22
23
  <View style={styles.barBackground}>
23
24
  <View style={[styles.barFill, { width: `${progressPercent}%`, backgroundColor: color }]} />
24
25
  </View>
@@ -34,7 +35,7 @@ const ProgressBar = ({
34
35
  }
35
36
 
36
37
  return (
37
- <View style={[styles.container, { opacity }]}>
38
+ <View style={[styles.container, { opacity }, style]}>
38
39
  <View style={styles.barBackground}>
39
40
  <View style={[styles.barFill, { width: `${percent}%`, backgroundColor: color }]} />
40
41
  </View>
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import { View, Text } from 'react-native';
3
3
  import TaskCard from './index';
4
4
  import Icon from '../Icon';
5
- import SEText from '../SEText';
6
5
  import Button from '../Button';
6
+ import MiniEventCard from '../MiniEventCard';
7
7
  import { SuccessContent, TaskDescription, EditIcon, Tag, TagGroup } from './components';
8
8
  import { fontFamily } from '../utils/fontFamily';
9
9
 
@@ -468,27 +468,6 @@ DefineGoalWithChangeButton.args = {
468
468
  onFooterPress: () => console.log('Footer pressed'),
469
469
  };
470
470
 
471
- // Helper para exemplificar mini-cards de evento nos stories
472
- const MiniEventCard = ({ title: cardTitle, date, subtitle: cardSubtitle, meta, location, flatTop = false }) => (
473
- <View style={{ flexDirection: 'row', alignItems: 'center', borderWidth: 1, borderColor: '#E2E9FC', borderRadius: 12, padding: 12, backgroundColor: '#FAFBFF', ...(flatTop && { borderTopLeftRadius: 0, borderTopRightRadius: 0 }) }}>
474
- <View style={{ width: 64, height: 64, alignItems: 'center', justifyContent: 'center', backgroundColor: '#EEF1FF', borderRadius: 8 }}>
475
- <Icon name="calendar-event-line" size={32} color="#4F7CFE" />
476
- </View>
477
- <View style={{ flex: 1, marginLeft: 12 }}>
478
- <SEText type="ns-sm-body-bold">{cardTitle}</SEText>
479
- {date ? (
480
- <View style={{ flexDirection: 'row', alignItems: 'center', marginTop: 4 }}>
481
- <Icon name="calendar-line" size={16} color="#C167E6" />
482
- <SEText type="ns-sm-body-bold" style={{ marginLeft: 4 }}>{date}</SEText>
483
- </View>
484
- ) : null}
485
- {cardSubtitle ? <SEText style={{ color: '#687499', fontSize: 12, marginTop: 4 }}>{cardSubtitle}</SEText> : null}
486
- {meta ? <SEText style={{ color: '#687499', fontSize: 12, marginTop: 2 }}>{meta}</SEText> : null}
487
- {location ? <SEText style={{ color: '#687499', fontSize: 12, marginTop: 4 }}>{location}</SEText> : null}
488
- </View>
489
- </View>
490
- );
491
-
492
471
  // Banner com imagem + children sobrepondo
493
472
  export const WithBannerImage = () => (
494
473
  <TaskCard
@@ -0,0 +1,56 @@
1
+ export default MiniEventCard;
2
+ declare function MiniEventCard({ children, title, date, subtitle, meta, location, flatTop, style }: {
3
+ children: any;
4
+ title: any;
5
+ date: any;
6
+ subtitle: any;
7
+ meta: any;
8
+ location: any;
9
+ flatTop?: boolean | undefined;
10
+ style: any;
11
+ }): React.JSX.Element;
12
+ declare namespace MiniEventCard {
13
+ export { MiniEventCardIcon as Icon };
14
+ export { MiniEventCardContent as Content };
15
+ export { MiniEventCardTitle as Title };
16
+ export { MiniEventCardDateRow as DateRow };
17
+ export { MiniEventCardSubtitle as Subtitle };
18
+ export { MiniEventCardMeta as Meta };
19
+ export { MiniEventCardLocation as Location };
20
+ }
21
+ import React from 'react';
22
+ declare function MiniEventCardIcon({ name, size, color, backgroundColor, style, containerStyle, }: {
23
+ name?: string | undefined;
24
+ size?: number | undefined;
25
+ color?: string | undefined;
26
+ backgroundColor?: string | undefined;
27
+ style: any;
28
+ containerStyle: any;
29
+ }): React.JSX.Element;
30
+ declare function MiniEventCardContent({ children, style }: {
31
+ children: any;
32
+ style: any;
33
+ }): React.JSX.Element;
34
+ declare function MiniEventCardTitle({ children, style }: {
35
+ children: any;
36
+ style: any;
37
+ }): React.JSX.Element;
38
+ declare function MiniEventCardDateRow({ date, iconName, iconColor, style }: {
39
+ date: any;
40
+ iconName?: string | undefined;
41
+ iconColor?: string | undefined;
42
+ style: any;
43
+ }): React.JSX.Element | null;
44
+ declare function MiniEventCardSubtitle({ children, style }: {
45
+ children: any;
46
+ style: any;
47
+ }): React.JSX.Element | null;
48
+ declare function MiniEventCardMeta({ children, style }: {
49
+ children: any;
50
+ style: any;
51
+ }): React.JSX.Element | null;
52
+ declare function MiniEventCardLocation({ children, style }: {
53
+ children: any;
54
+ style: any;
55
+ }): React.JSX.Element | null;
56
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/MiniEventCard/index.jsx"],"names":[],"mappings":";AAwDA;;;;;;;;;sBAiBC;;;;;;;;;;kBAzEiB,OAAO;AAMzB;;;;;;;sBAaC;AAED;;;sBAEC;AAED;;;sBAMC;AAED;;;;;6BASC;AAED;;;6BAEC;AAED;;;6BAEC;AAED;;;6BAEC"}
@@ -0,0 +1,106 @@
1
+ import React from 'react';
2
+ import { StyleSheet, View } from 'react-native';
3
+ import Icon from '../Icon';
4
+ import SEText from '../SEText';
5
+ const MiniEventCardIcon = ({ name = 'calendar-event-line', size = 32, color = '#4F7CFE', backgroundColor = '#EEF1FF', style, containerStyle, }) => {
6
+ return (<View style={[styles.iconContainer, { backgroundColor }, containerStyle]}>
7
+ <Icon name={name} size={size} color={color} style={style}/>
8
+ </View>);
9
+ };
10
+ const MiniEventCardContent = ({ children, style }) => {
11
+ return <View style={[styles.content, style]}>{children}</View>;
12
+ };
13
+ const MiniEventCardTitle = ({ children, style }) => {
14
+ return (<SEText type="ns-sm-body-bold" style={style}>
15
+ {children}
16
+ </SEText>);
17
+ };
18
+ const MiniEventCardDateRow = ({ date, iconName = 'calendar-line', iconColor = '#C167E6', style }) => {
19
+ return date ? (<View style={[styles.dateRow, style]}>
20
+ <Icon name={iconName} size={16} color={iconColor}/>
21
+ <SEText type="ns-sm-body-bold" style={styles.dateText}>
22
+ {date}
23
+ </SEText>
24
+ </View>) : null;
25
+ };
26
+ const MiniEventCardSubtitle = ({ children, style }) => {
27
+ return children ? <SEText style={[styles.subtitle, style]}>{children}</SEText> : null;
28
+ };
29
+ const MiniEventCardMeta = ({ children, style }) => {
30
+ return children ? <SEText style={[styles.meta, style]}>{children}</SEText> : null;
31
+ };
32
+ const MiniEventCardLocation = ({ children, style }) => {
33
+ return children ? <SEText style={[styles.location, style]}>{children}</SEText> : null;
34
+ };
35
+ const MiniEventCard = ({ children, title, date, subtitle, meta, location, flatTop = false, style }) => {
36
+ return (<View style={[styles.container, flatTop && styles.flatTop, style]}>
37
+ {children || (<>
38
+ <MiniEventCardIcon />
39
+ <MiniEventCardContent>
40
+ <MiniEventCardTitle>{title}</MiniEventCardTitle>
41
+ <MiniEventCardDateRow date={date}/>
42
+ <MiniEventCardSubtitle>{subtitle}</MiniEventCardSubtitle>
43
+ <MiniEventCardMeta>{meta}</MiniEventCardMeta>
44
+ <MiniEventCardLocation>{location}</MiniEventCardLocation>
45
+ </MiniEventCardContent>
46
+ </>)}
47
+ </View>);
48
+ };
49
+ const styles = StyleSheet.create({
50
+ container: {
51
+ flexDirection: 'row',
52
+ alignItems: 'center',
53
+ borderWidth: 1,
54
+ borderColor: '#E2E9FC',
55
+ borderRadius: 12,
56
+ padding: 12,
57
+ backgroundColor: '#FAFBFF',
58
+ },
59
+ flatTop: {
60
+ borderTopLeftRadius: 0,
61
+ borderTopRightRadius: 0,
62
+ },
63
+ iconContainer: {
64
+ width: 64,
65
+ height: 64,
66
+ alignItems: 'center',
67
+ justifyContent: 'center',
68
+ backgroundColor: '#EEF1FF',
69
+ borderRadius: 8,
70
+ },
71
+ content: {
72
+ flex: 1,
73
+ marginLeft: 12,
74
+ },
75
+ dateRow: {
76
+ flexDirection: 'row',
77
+ alignItems: 'center',
78
+ marginTop: 4,
79
+ },
80
+ dateText: {
81
+ marginLeft: 4,
82
+ },
83
+ subtitle: {
84
+ color: '#687499',
85
+ fontSize: 12,
86
+ marginTop: 4,
87
+ },
88
+ meta: {
89
+ color: '#687499',
90
+ fontSize: 12,
91
+ marginTop: 2,
92
+ },
93
+ location: {
94
+ color: '#687499',
95
+ fontSize: 12,
96
+ marginTop: 4,
97
+ },
98
+ });
99
+ MiniEventCard.Icon = MiniEventCardIcon;
100
+ MiniEventCard.Content = MiniEventCardContent;
101
+ MiniEventCard.Title = MiniEventCardTitle;
102
+ MiniEventCard.DateRow = MiniEventCardDateRow;
103
+ MiniEventCard.Subtitle = MiniEventCardSubtitle;
104
+ MiniEventCard.Meta = MiniEventCardMeta;
105
+ MiniEventCard.Location = MiniEventCardLocation;
106
+ export default MiniEventCard;
@@ -1,5 +1,5 @@
1
1
  export default ProgressBar;
2
- declare function ProgressBar({ progress, label, opacity, variant, total, completed, color, showLabel }: {
2
+ declare function ProgressBar({ progress, label, opacity, variant, total, completed, color, showLabel, style, }: {
3
3
  progress: any;
4
4
  label: any;
5
5
  opacity?: number | undefined;
@@ -8,6 +8,7 @@ declare function ProgressBar({ progress, label, opacity, variant, total, complet
8
8
  completed?: number | undefined;
9
9
  color?: string | undefined;
10
10
  showLabel?: boolean | undefined;
11
+ style: any;
11
12
  }): React.JSX.Element;
12
13
  import React from 'react';
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ProgressBar/index.jsx"],"names":[],"mappings":";AAIA;;;;;;;;;sBAyCC;kBA7CiB,OAAO"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ProgressBar/index.jsx"],"names":[],"mappings":";AAIA;;;;;;;;;;sBA0CC;kBA9CiB,OAAO"}
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { View, Text, StyleSheet } from 'react-native';
3
3
  import { fontFamily } from '../utils/fontFamily';
4
- const ProgressBar = ({ progress, label, opacity = 1, variant = 'continuous', total, completed = 0, color = '#193AB8', showLabel = true }) => {
4
+ const ProgressBar = ({ progress, label, opacity = 1, variant = 'continuous', total, completed = 0, color = '#193AB8', showLabel = true, style, }) => {
5
5
  const percent = Math.round(progress * 100);
6
6
  if (variant === 'segmented') {
7
7
  const progressPercent = (completed / total) * 100;
8
- return (<View style={[styles.container, { opacity }]}>
8
+ return (<View style={[styles.container, { opacity }, style]}>
9
9
  <View style={styles.barBackground}>
10
10
  <View style={[styles.barFill, { width: `${progressPercent}%`, backgroundColor: color }]}/>
11
11
  </View>
@@ -16,7 +16,7 @@ const ProgressBar = ({ progress, label, opacity = 1, variant = 'continuous', tot
16
16
  </View>)}
17
17
  </View>);
18
18
  }
19
- return (<View style={[styles.container, { opacity }]}>
19
+ return (<View style={[styles.container, { opacity }, style]}>
20
20
  <View style={styles.barBackground}>
21
21
  <View style={[styles.barFill, { width: `${percent}%`, backgroundColor: color }]}/>
22
22
  </View>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpt-sebraeds",
3
- "version": "0.0.81",
3
+ "version": "0.0.84",
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",
@@ -90,6 +90,7 @@
90
90
  "eslint": "^8.19.0",
91
91
  "jest": "^29.6.3",
92
92
  "prettier": "2.8.8",
93
+ "prop-types": "^15.8.1",
93
94
  "react": "19.0.0",
94
95
  "react-native": "0.79.2",
95
96
  "react-native-gesture-handler": "^2.25.0",
@@ -121,4 +122,4 @@
121
122
  "react-native-web": "^0.20.0"
122
123
  }
123
124
  }
124
- }
125
+ }