vpt-sebraeds 0.0.73 → 0.0.75

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 (67) hide show
  1. package/components/Bullet/Bullet.stories.jsx +55 -0
  2. package/components/Bullet/index.jsx +224 -0
  3. package/components/CNAESelectItem/index.jsx +1 -1
  4. package/components/Card/Card.stories.jsx +296 -296
  5. package/components/Card/index.jsx +190 -190
  6. package/components/Modal/index.jsx +2 -1
  7. package/components/Rating/Rating.stories.jsx +39 -0
  8. package/components/Rating/index.jsx +43 -2
  9. package/components/SEIcon/CustomIcon/boletoDasMei.jsx +1 -1
  10. package/components/SEIcon/CustomIcon/calculadoraPrecoIdeal.jsx +1 -1
  11. package/components/SEIcon/CustomIcon/calculadoraValuation.jsx +1 -1
  12. package/components/SEIcon/CustomIcon/capacidadePagamento.jsx +1 -1
  13. package/components/SEIcon/CustomIcon/capitalGiro.jsx +1 -1
  14. package/components/SEIcon/CustomIcon/catalogoFornecedores.jsx +1 -1
  15. package/components/SEIcon/CustomIcon/creditoPermutas.jsx +1 -1
  16. package/components/SEIcon/CustomIcon/dataValidadeEpi.jsx +1 -1
  17. package/components/SEIcon/CustomIcon/diagnosticoEstrategico.jsx +1 -1
  18. package/components/SEIcon/CustomIcon/dominandoRedesSociais.jsx +1 -1
  19. package/components/SEIcon/CustomIcon/empresaGoogle.jsx +1 -1
  20. package/components/SEIcon/CustomIcon/fluxoCaixa.jsx +1 -1
  21. package/components/SEIcon/CustomIcon/fornecedoresTi.jsx +1 -1
  22. package/components/SEIcon/CustomIcon/geradoresIdeiasIA.jsx +1 -1
  23. package/components/SEIcon/CustomIcon/gestaoAgendamento.jsx +1 -1
  24. package/components/SEIcon/CustomIcon/impostoMei.jsx +1 -1
  25. package/components/SEIcon/CustomIcon/indicadoresMercado.jsx +1 -1
  26. package/components/SEIcon/CustomIcon/listaEpi.jsx +1 -1
  27. package/components/SEIcon/CustomIcon/lucroPotencial.jsx +1 -1
  28. package/components/SEIcon/CustomIcon/melhoresRegioesComerciais.jsx +1 -1
  29. package/components/SEIcon/CustomIcon/ncmComCodigoDeBarras.jsx +1 -1
  30. package/components/SEIcon/CustomIcon/postsInteligentes.jsx +1 -1
  31. package/components/SEIcon/CustomIcon/sebraeConecta.jsx +1 -1
  32. package/components/SEIcon/CustomIcon/segurancaTrabalho.jsx +1 -1
  33. package/components/SEIcon/CustomIcon/simuladorEmprestimo.jsx +1 -1
  34. package/components/styles/index,js +2 -1
  35. package/components/styles/tokens.ts +222 -0
  36. package/dist/components/Bullet/index.d.ts +178 -0
  37. package/dist/components/Bullet/index.d.ts.map +1 -0
  38. package/dist/components/Bullet/index.js +179 -0
  39. package/dist/components/CNAESelectItem/index.js +1 -1
  40. package/dist/components/Card/index.js +12 -12
  41. package/dist/components/Header/components/Context.d.ts +7 -7
  42. package/dist/components/Header/components/Context.js +19 -19
  43. package/dist/components/Header/components/Information.d.ts +6 -6
  44. package/dist/components/Header/components/Information.js +58 -58
  45. package/dist/components/Header/components/Shortcut.d.ts +5 -5
  46. package/dist/components/Header/components/Shortcut.js +25 -25
  47. package/dist/components/Header/components/SwitchAccount.d.ts +8 -8
  48. package/dist/components/Header/components/SwitchAccount.js +138 -138
  49. package/dist/components/Header/components/Variants.d.ts +22 -22
  50. package/dist/components/Header/components/Variants.js +288 -288
  51. package/dist/components/Header/components/index.d.ts +33 -33
  52. package/dist/components/Header/components/index.js +10 -10
  53. package/dist/components/Modal/index.d.ts +2 -1
  54. package/dist/components/Modal/index.d.ts.map +1 -1
  55. package/dist/components/Modal/index.js +2 -2
  56. package/dist/components/Rating/index.d.ts.map +1 -1
  57. package/dist/components/Rating/index.js +18 -2
  58. package/dist/components/Search/Search.d.ts +14 -14
  59. package/dist/components/Search/Search.js +227 -227
  60. package/dist/components/styles/tokens.d.ts +260 -0
  61. package/dist/components/styles/tokens.d.ts.map +1 -0
  62. package/dist/components/styles/tokens.js +213 -0
  63. package/dist/src/index.d.ts +1 -0
  64. package/dist/src/index.d.ts.map +1 -1
  65. package/dist/src/index.js +1 -0
  66. package/package.json +1 -1
  67. package/src/index.ts +1 -0
@@ -0,0 +1,55 @@
1
+ import React from 'react';
2
+ import Bullet from './index.jsx';
3
+
4
+ const meta = {
5
+ title: 'Atom/Bullet',
6
+ component: Bullet.Root,
7
+ tags: ['autodocs'],
8
+ parameters: {
9
+ layout: 'centered',
10
+ backgrounds: {
11
+ default: 'light',
12
+ values: [
13
+ { name: 'light', value: '#FBFAFF' },
14
+ { name: 'dark', value: '#28293D' },
15
+ ],
16
+ },
17
+ },
18
+ argTypes: {
19
+ variant: {
20
+ description: 'Variação visual',
21
+ control: 'select',
22
+ options: ['flat', 'low-outlined'],
23
+ },
24
+ },
25
+ };
26
+
27
+ export default meta;
28
+
29
+ export const Flat = {
30
+ args: { variant: 'flat' },
31
+ render: (args) => (
32
+ <Bullet.Root variant={args.variant} style={{ maxWidth: 520 }}>
33
+ <Bullet.Icon name="sparkling-2-line" color="#C167E6" />
34
+ <Bullet.Content>
35
+ <Bullet.Title>Lorem ipsum dolor sit amet</Bullet.Title>
36
+ <Bullet.Description>
37
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc id quam ac massa ullamcorper
38
+ dignissim vitae eu turpis.
39
+ </Bullet.Description>
40
+ </Bullet.Content>
41
+ </Bullet.Root>
42
+ ),
43
+ };
44
+
45
+ export const LowOutlined = {
46
+ args: { variant: 'low-outlined' },
47
+ render: (args) => (
48
+ <Bullet.Root variant={args.variant} style={{ maxWidth: 520 }}>
49
+ <Bullet.Icon name="sparkling-2-line" />
50
+ <Bullet.Content>
51
+ <Bullet.Title>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc id quam ac massa.</Bullet.Title>
52
+ </Bullet.Content>
53
+ </Bullet.Root>
54
+ ),
55
+ };
@@ -0,0 +1,224 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { View, StyleSheet } from 'react-native';
4
+
5
+ import Icon from '../Icon';
6
+ import SEText from '../SEText';
7
+ import tokens from '../styles/tokens';
8
+
9
+ const VARIANTS = {
10
+ flat: {
11
+ container: {
12
+ backgroundColor: 'transparent',
13
+ borderWidth: 0,
14
+ padding: 0,
15
+ },
16
+ },
17
+ 'low-outlined': {
18
+ container: {
19
+ backgroundColor: tokens.colors.background.light,
20
+ borderColor: tokens.colors.border.default,
21
+ borderWidth: 1,
22
+ padding: tokens.space.md,
23
+ borderRadius: tokens.borderRadius.lg,
24
+ },
25
+ },
26
+ };
27
+
28
+ // =============================================================================
29
+ // Composition API
30
+ // =============================================================================
31
+ const BulletRoot = ({ children, variant = 'flat', style }) => {
32
+ const v = VARIANTS[variant] || VARIANTS.flat;
33
+ return <View style={[styles.container, v.container, style]}>{children}</View>;
34
+ };
35
+
36
+ const BulletIcon = ({ name, size = 24, color = tokens.colors.brand.primary, style }) => {
37
+ if (!name) return null;
38
+ return (
39
+ <View style={[styles.iconWrapper, style]}>
40
+ <Icon name={name} size={size} color={color} />
41
+ </View>
42
+ );
43
+ };
44
+
45
+ const BulletContent = ({ children, style }) => {
46
+ return <View style={[styles.content, style]}>{children}</View>;
47
+ };
48
+
49
+ const BulletTitle = ({ children, style }) => {
50
+ if (!children) return null;
51
+ return (
52
+ <SEText style={[styles.title, style]}>
53
+ {children}
54
+ </SEText>
55
+ );
56
+ };
57
+
58
+ const BulletDescription = ({ children, style }) => {
59
+ if (!children) return null;
60
+ return (
61
+ <SEText
62
+ type="ns-sm-body"
63
+ color={tokens.colors.text.secondary}
64
+ style={[styles.description, style]}
65
+ >
66
+ {children}
67
+ </SEText>
68
+ );
69
+ };
70
+
71
+ /**
72
+ * Bullet (compat)
73
+ *
74
+ * Mantém a API por props (title/description/iconName) para facilitar adoção,
75
+ * mas a forma preferida é via composição:
76
+ *
77
+ * <Bullet.Root variant="low-outlined">
78
+ * <Bullet.Icon name="sparkling-2-line" />
79
+ * <Bullet.Content>
80
+ * <Bullet.Title>...</Bullet.Title>
81
+ * <Bullet.Description>...</Bullet.Description>
82
+ * </Bullet.Content>
83
+ * </Bullet.Root>
84
+ */
85
+ const Bullet = ({
86
+ children,
87
+ title,
88
+ description,
89
+ iconName,
90
+ iconColor = tokens.colors.brand.primary,
91
+ iconSize = 24,
92
+ variant = 'flat',
93
+ style,
94
+ contentStyle,
95
+ }) => {
96
+ if (children) {
97
+ return (
98
+ <BulletRoot variant={variant} style={style}>
99
+ {children}
100
+ </BulletRoot>
101
+ );
102
+ }
103
+
104
+ return (
105
+ <BulletRoot variant={variant} style={style}>
106
+ <BulletIcon name={iconName} size={iconSize} color={iconColor} />
107
+ <BulletContent style={contentStyle}>
108
+ <BulletTitle>{title}</BulletTitle>
109
+ <BulletDescription>{description}</BulletDescription>
110
+ </BulletContent>
111
+ </BulletRoot>
112
+ );
113
+ };
114
+
115
+ Bullet.propTypes = {
116
+ children: PropTypes.node,
117
+ title: PropTypes.string,
118
+ description: PropTypes.string,
119
+ iconName: PropTypes.string,
120
+ iconColor: PropTypes.string,
121
+ iconSize: PropTypes.number,
122
+ variant: PropTypes.oneOf(['flat', 'low-outlined']),
123
+ style: PropTypes.any,
124
+ contentStyle: PropTypes.any,
125
+ };
126
+
127
+ Bullet.defaultProps = {
128
+ children: null,
129
+ title: '',
130
+ description: '',
131
+ iconName: null,
132
+ iconColor: tokens.colors.brand.primary,
133
+ iconSize: 24,
134
+ variant: 'flat',
135
+ style: undefined,
136
+ contentStyle: undefined,
137
+ };
138
+
139
+ BulletRoot.propTypes = {
140
+ children: PropTypes.node,
141
+ variant: PropTypes.oneOf(['flat', 'low-outlined']),
142
+ style: PropTypes.any,
143
+ };
144
+
145
+ BulletRoot.defaultProps = {
146
+ children: null,
147
+ variant: 'flat',
148
+ style: undefined,
149
+ };
150
+
151
+ BulletIcon.propTypes = {
152
+ name: PropTypes.string,
153
+ size: PropTypes.number,
154
+ color: PropTypes.string,
155
+ style: PropTypes.any,
156
+ };
157
+
158
+ BulletIcon.defaultProps = {
159
+ name: null,
160
+ size: 24,
161
+ color: tokens.colors.brand.primary,
162
+ style: undefined,
163
+ };
164
+
165
+ BulletContent.propTypes = {
166
+ children: PropTypes.node,
167
+ style: PropTypes.any,
168
+ };
169
+
170
+ BulletContent.defaultProps = {
171
+ children: null,
172
+ style: undefined,
173
+ };
174
+
175
+ BulletTitle.propTypes = {
176
+ children: PropTypes.node,
177
+ style: PropTypes.any,
178
+ };
179
+
180
+ BulletTitle.defaultProps = {
181
+ children: null,
182
+ style: undefined,
183
+ };
184
+
185
+ BulletDescription.propTypes = {
186
+ children: PropTypes.node,
187
+ style: PropTypes.any,
188
+ };
189
+
190
+ BulletDescription.defaultProps = {
191
+ children: null,
192
+ style: undefined,
193
+ };
194
+
195
+ const styles = StyleSheet.create({
196
+ container: {
197
+ flexDirection: 'row',
198
+ alignItems: 'flex-start',
199
+ },
200
+ iconWrapper: {
201
+ marginRight: tokens.space.sm,
202
+ paddingTop: 2,
203
+ },
204
+ content: {
205
+ flex: 1,
206
+ },
207
+ title: {
208
+ marginBottom: 4,
209
+ color: tokens.colors.text.brand,
210
+ fontSize: tokens.typography.fontSize.md,
211
+ fontWeight: tokens.typography.fontWeight.bold,
212
+ },
213
+ description: {
214
+ lineHeight: 20,
215
+ },
216
+ });
217
+
218
+ Bullet.Root = BulletRoot;
219
+ Bullet.Icon = BulletIcon;
220
+ Bullet.Content = BulletContent;
221
+ Bullet.Title = BulletTitle;
222
+ Bullet.Description = BulletDescription;
223
+
224
+ export default Bullet;
@@ -64,7 +64,7 @@ function CNAESelectItem({
64
64
  ]}
65
65
  accessibilityRole={hasDetails ? 'button' : undefined}
66
66
  >
67
- <SEText type="ns-xs-body" style={styles.resultTitle} numberOfLines={3}>
67
+ <SEText type="ns-xs-body" style={styles.resultTitle}>
68
68
  {title}
69
69
  </SEText>
70
70