vpt-sebraeds 0.0.45 → 0.0.47
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.
- package/components/Icon/index.jsx +1 -1
- package/components/Tools/SearchResult/SearchResult.stories.jsx +118 -0
- package/components/Tools/SearchResult/index.jsx +114 -0
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/Tools/SearchResult/index.d.ts +13 -0
- package/dist/components/Tools/SearchResult/index.d.ts.map +1 -0
- package/dist/components/Tools/SearchResult/index.js +81 -0
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ const Icon = ({
|
|
|
26
26
|
|
|
27
27
|
switch (custom) {
|
|
28
28
|
case 'boletoDasMei':
|
|
29
|
-
const BoletoDasMei = require('../
|
|
29
|
+
const BoletoDasMei = require('../SEIcon/CustomIcon/boletoDasMei').default;
|
|
30
30
|
return <BoletoDasMei width={size} height={size} style={style} />;
|
|
31
31
|
// Adicione mais casos aqui para outros ícones customizados
|
|
32
32
|
default:
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import SearchResult from './index.jsx';
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Tools/SearchResult',
|
|
7
|
+
component: SearchResult,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'padded',
|
|
11
|
+
backgrounds: {
|
|
12
|
+
default: 'light',
|
|
13
|
+
values: [
|
|
14
|
+
{ name: 'light', value: '#ffffff' },
|
|
15
|
+
{ name: 'gray', value: '#f4f4f4' },
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
argTypes: {
|
|
20
|
+
title: {
|
|
21
|
+
description: 'Título do resultado',
|
|
22
|
+
control: 'text',
|
|
23
|
+
},
|
|
24
|
+
description: {
|
|
25
|
+
description: 'Descrição do resultado',
|
|
26
|
+
control: 'text',
|
|
27
|
+
},
|
|
28
|
+
iconType: {
|
|
29
|
+
description: 'Tipo do ícone customizado (SEIcon)',
|
|
30
|
+
control: 'select',
|
|
31
|
+
options: [
|
|
32
|
+
null,
|
|
33
|
+
'boletoDasMei',
|
|
34
|
+
'listaEpi',
|
|
35
|
+
'indicadorPorRegiao',
|
|
36
|
+
'dominandoRedesSociais',
|
|
37
|
+
'fluxoCaixa',
|
|
38
|
+
'capitalGiro',
|
|
39
|
+
'catalogoFornecedores',
|
|
40
|
+
'gestaoAgendamento',
|
|
41
|
+
'melhoresRegioesComerciais',
|
|
42
|
+
'geradoresIdeiasIA',
|
|
43
|
+
'simuladorEmprestimo',
|
|
44
|
+
'impostoMei',
|
|
45
|
+
'fornecedoresTi',
|
|
46
|
+
'diagnosticoEstrategico',
|
|
47
|
+
'postsInteligentes',
|
|
48
|
+
'indicadoresMercado',
|
|
49
|
+
'capacidadePagamento',
|
|
50
|
+
'calculadoraPrecoIdeal',
|
|
51
|
+
'segurancaTrabalho',
|
|
52
|
+
'empresaGoogle',
|
|
53
|
+
'planoNegocios',
|
|
54
|
+
'lucroPotencial',
|
|
55
|
+
'ncmComCodigoDeBarras',
|
|
56
|
+
'dataValidadeEpi',
|
|
57
|
+
'sebraeConecta',
|
|
58
|
+
'pesquisaRegistroDeMarca',
|
|
59
|
+
'creditoPermutas',
|
|
60
|
+
'calculadoraValuation',
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
iconName: {
|
|
64
|
+
description: 'Nome do ícone Remix (quando iconType é null)',
|
|
65
|
+
control: 'text',
|
|
66
|
+
},
|
|
67
|
+
variant: {
|
|
68
|
+
description: 'Variante visual',
|
|
69
|
+
control: 'select',
|
|
70
|
+
options: ['default', 'filled'],
|
|
71
|
+
},
|
|
72
|
+
showArrow: {
|
|
73
|
+
description: 'Mostrar seta à direita',
|
|
74
|
+
control: 'boolean',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export default meta;
|
|
80
|
+
|
|
81
|
+
export const Default = {
|
|
82
|
+
render: () => (
|
|
83
|
+
<View style={{ padding: 16 }}>
|
|
84
|
+
<SearchResult
|
|
85
|
+
title="Boleto DAS-MEI"
|
|
86
|
+
description="Seu histórico de pagamentos mensais e boletos DAS-MEI em um só lugar."
|
|
87
|
+
iconType="boletoDasMei"
|
|
88
|
+
variant="default"
|
|
89
|
+
/>
|
|
90
|
+
<SearchResult
|
|
91
|
+
title="Fluxo de caixa"
|
|
92
|
+
description="Registre suas entradas e saídas e controle suas finanças com nossa ferramenta gratuita."
|
|
93
|
+
iconType="fluxoCaixa"
|
|
94
|
+
variant="default"
|
|
95
|
+
/>
|
|
96
|
+
<SearchResult
|
|
97
|
+
title="Meu capital de giro"
|
|
98
|
+
description="Calcule quanto você precisa ter disponível em caixa para manter sua empresa funcionando com tranquilidade."
|
|
99
|
+
iconType="capitalGiro"
|
|
100
|
+
variant="filled"
|
|
101
|
+
style={{ marginVertical: 8 }}
|
|
102
|
+
/>
|
|
103
|
+
<SearchResult
|
|
104
|
+
title="Simulador de empréstimo"
|
|
105
|
+
description="Informe o valor, prazo e juros de um possível empréstimo e descubra o valor das parcelas."
|
|
106
|
+
iconType="simuladorEmprestimo"
|
|
107
|
+
variant="default"
|
|
108
|
+
/>
|
|
109
|
+
<SearchResult
|
|
110
|
+
title="PNbox - Plano de negócio"
|
|
111
|
+
description="Conheça seu público e crie um plano de negócio completo. Crie do zero ou adapte modelos para se destacar no mercado."
|
|
112
|
+
iconType="planoNegocios"
|
|
113
|
+
variant="filled"
|
|
114
|
+
style={{ marginVertical: 8 }}
|
|
115
|
+
/>
|
|
116
|
+
</View>
|
|
117
|
+
),
|
|
118
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
+
import SEText from '../../SEText';
|
|
4
|
+
import Icon from '../../Icon';
|
|
5
|
+
import SEIcon from '../../SEIcon';
|
|
6
|
+
|
|
7
|
+
const SearchResult = ({
|
|
8
|
+
title = 'Title',
|
|
9
|
+
description = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et quam sit.',
|
|
10
|
+
iconType = null,
|
|
11
|
+
iconName = 'image-line',
|
|
12
|
+
variant = 'default',
|
|
13
|
+
onPress,
|
|
14
|
+
style,
|
|
15
|
+
showArrow = true,
|
|
16
|
+
}) => {
|
|
17
|
+
const isCustomIcon = iconType && iconType !== 'Remix';
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<TouchableOpacity
|
|
21
|
+
style={[
|
|
22
|
+
styles.container,
|
|
23
|
+
variant === 'filled' && styles.containerFilled,
|
|
24
|
+
style,
|
|
25
|
+
]}
|
|
26
|
+
onPress={onPress}
|
|
27
|
+
activeOpacity={0.7}
|
|
28
|
+
>
|
|
29
|
+
<View style={styles.iconContainer}>
|
|
30
|
+
{isCustomIcon ? (
|
|
31
|
+
<SEIcon type={iconType} size={60} />
|
|
32
|
+
) : (
|
|
33
|
+
<View style={styles.iconPlaceholder}>
|
|
34
|
+
<Icon name={iconName} size={24} color="#3B5BDB" />
|
|
35
|
+
</View>
|
|
36
|
+
)}
|
|
37
|
+
</View>
|
|
38
|
+
|
|
39
|
+
<View style={styles.contentContainer}>
|
|
40
|
+
<SEText
|
|
41
|
+
type="ns-sm-body-bold"
|
|
42
|
+
color="#1B244B"
|
|
43
|
+
style={styles.title}
|
|
44
|
+
>
|
|
45
|
+
{title}
|
|
46
|
+
</SEText>
|
|
47
|
+
<SEText
|
|
48
|
+
type="ns-xs-body"
|
|
49
|
+
color="#485274"
|
|
50
|
+
style={styles.description}
|
|
51
|
+
>
|
|
52
|
+
{description}
|
|
53
|
+
</SEText>
|
|
54
|
+
</View>
|
|
55
|
+
|
|
56
|
+
{showArrow && (
|
|
57
|
+
<View style={styles.arrowContainer}>
|
|
58
|
+
<Icon name="arrow-right-line" size={20} color="#1B244B" />
|
|
59
|
+
</View>
|
|
60
|
+
)}
|
|
61
|
+
</TouchableOpacity>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const styles = StyleSheet.create({
|
|
66
|
+
container: {
|
|
67
|
+
flexDirection: 'row',
|
|
68
|
+
alignItems: 'flex-start',
|
|
69
|
+
backgroundColor: '#FFFFFF',
|
|
70
|
+
paddingHorizontal: 12,
|
|
71
|
+
paddingVertical: 16,
|
|
72
|
+
minHeight: 92,
|
|
73
|
+
width: '100%',
|
|
74
|
+
borderBottomWidth: 1,
|
|
75
|
+
borderBottomColor: '#E2E9FC',
|
|
76
|
+
},
|
|
77
|
+
containerFilled: {
|
|
78
|
+
backgroundColor: '#E2E9FC',
|
|
79
|
+
borderBottomWidth: 0,
|
|
80
|
+
},
|
|
81
|
+
iconContainer: {
|
|
82
|
+
marginRight: 16,
|
|
83
|
+
justifyContent: 'flex-start',
|
|
84
|
+
alignItems: 'center',
|
|
85
|
+
width: 60,
|
|
86
|
+
height: 60,
|
|
87
|
+
},
|
|
88
|
+
iconPlaceholder: {
|
|
89
|
+
width: 48,
|
|
90
|
+
height: 48,
|
|
91
|
+
borderRadius: 8,
|
|
92
|
+
backgroundColor: '#E6ECFF',
|
|
93
|
+
justifyContent: 'center',
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
},
|
|
96
|
+
contentContainer: {
|
|
97
|
+
flex: 1,
|
|
98
|
+
justifyContent: 'flex-start',
|
|
99
|
+
},
|
|
100
|
+
title: {
|
|
101
|
+
marginBottom: 4,
|
|
102
|
+
},
|
|
103
|
+
description: {
|
|
104
|
+
lineHeight: 20,
|
|
105
|
+
},
|
|
106
|
+
arrowContainer: {
|
|
107
|
+
marginLeft: 12,
|
|
108
|
+
justifyContent: 'flex-start',
|
|
109
|
+
alignItems: 'center',
|
|
110
|
+
paddingTop: 2,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
export default SearchResult;
|
|
@@ -19,7 +19,7 @@ const Icon = ({ name, size = 24, color = '#4F7CFE', style = {}, custom = null, }
|
|
|
19
19
|
}
|
|
20
20
|
switch (custom) {
|
|
21
21
|
case 'boletoDasMei':
|
|
22
|
-
const BoletoDasMei = require('../
|
|
22
|
+
const BoletoDasMei = require('../SEIcon/CustomIcon/boletoDasMei').default;
|
|
23
23
|
return <BoletoDasMei width={size} height={size} style={style}/>;
|
|
24
24
|
// Adicione mais casos aqui para outros ícones customizados
|
|
25
25
|
default:
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default SearchResult;
|
|
2
|
+
declare function SearchResult({ title, description, iconType, iconName, variant, onPress, style, showArrow, }: {
|
|
3
|
+
title?: string | undefined;
|
|
4
|
+
description?: string | undefined;
|
|
5
|
+
iconType?: null | undefined;
|
|
6
|
+
iconName?: string | undefined;
|
|
7
|
+
variant?: string | undefined;
|
|
8
|
+
onPress: any;
|
|
9
|
+
style: any;
|
|
10
|
+
showArrow?: boolean | undefined;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
import React from 'react';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/Tools/SearchResult/index.jsx"],"names":[],"mappings":";AAMA;;;;;;;;;sBAwDC;kBA9DiB,OAAO"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
+
import SEText from '../../SEText';
|
|
4
|
+
import Icon from '../../Icon';
|
|
5
|
+
import SEIcon from '../../SEIcon';
|
|
6
|
+
const SearchResult = ({ title = 'Title', description = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et quam sit.', iconType = null, iconName = 'image-line', variant = 'default', onPress, style, showArrow = true, }) => {
|
|
7
|
+
const isCustomIcon = iconType && iconType !== 'Remix';
|
|
8
|
+
return (<TouchableOpacity style={[
|
|
9
|
+
styles.container,
|
|
10
|
+
variant === 'filled' && styles.containerFilled,
|
|
11
|
+
style,
|
|
12
|
+
]} onPress={onPress} activeOpacity={0.7}>
|
|
13
|
+
<View style={styles.iconContainer}>
|
|
14
|
+
{isCustomIcon ? (<SEIcon type={iconType} size={60}/>) : (<View style={styles.iconPlaceholder}>
|
|
15
|
+
<Icon name={iconName} size={24} color="#3B5BDB"/>
|
|
16
|
+
</View>)}
|
|
17
|
+
</View>
|
|
18
|
+
|
|
19
|
+
<View style={styles.contentContainer}>
|
|
20
|
+
<SEText type="ns-sm-body-bold" color="#1B244B" style={styles.title}>
|
|
21
|
+
{title}
|
|
22
|
+
</SEText>
|
|
23
|
+
<SEText type="ns-xs-body" color="#485274" style={styles.description}>
|
|
24
|
+
{description}
|
|
25
|
+
</SEText>
|
|
26
|
+
</View>
|
|
27
|
+
|
|
28
|
+
{showArrow && (<View style={styles.arrowContainer}>
|
|
29
|
+
<Icon name="arrow-right-line" size={20} color="#1B244B"/>
|
|
30
|
+
</View>)}
|
|
31
|
+
</TouchableOpacity>);
|
|
32
|
+
};
|
|
33
|
+
const styles = StyleSheet.create({
|
|
34
|
+
container: {
|
|
35
|
+
flexDirection: 'row',
|
|
36
|
+
alignItems: 'flex-start',
|
|
37
|
+
backgroundColor: '#FFFFFF',
|
|
38
|
+
paddingHorizontal: 12,
|
|
39
|
+
paddingVertical: 16,
|
|
40
|
+
minHeight: 92,
|
|
41
|
+
width: '100%',
|
|
42
|
+
borderBottomWidth: 1,
|
|
43
|
+
borderBottomColor: '#E2E9FC',
|
|
44
|
+
},
|
|
45
|
+
containerFilled: {
|
|
46
|
+
backgroundColor: '#E2E9FC',
|
|
47
|
+
borderBottomWidth: 0,
|
|
48
|
+
},
|
|
49
|
+
iconContainer: {
|
|
50
|
+
marginRight: 16,
|
|
51
|
+
justifyContent: 'flex-start',
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
width: 60,
|
|
54
|
+
height: 60,
|
|
55
|
+
},
|
|
56
|
+
iconPlaceholder: {
|
|
57
|
+
width: 48,
|
|
58
|
+
height: 48,
|
|
59
|
+
borderRadius: 8,
|
|
60
|
+
backgroundColor: '#E6ECFF',
|
|
61
|
+
justifyContent: 'center',
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
},
|
|
64
|
+
contentContainer: {
|
|
65
|
+
flex: 1,
|
|
66
|
+
justifyContent: 'flex-start',
|
|
67
|
+
},
|
|
68
|
+
title: {
|
|
69
|
+
marginBottom: 4,
|
|
70
|
+
},
|
|
71
|
+
description: {
|
|
72
|
+
lineHeight: 20,
|
|
73
|
+
},
|
|
74
|
+
arrowContainer: {
|
|
75
|
+
marginLeft: 12,
|
|
76
|
+
justifyContent: 'flex-start',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
paddingTop: 2,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
export default SearchResult;
|