vpt-sebraeds 0.0.47 → 0.0.49

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.
@@ -1,31 +1,19 @@
1
- import React, { useState } from 'react';
2
- import { View, TextInput, StyleSheet, TouchableOpacity, Platform } from 'react-native';
3
- import SelectItem from '../SelectItem';
1
+ import React, { useState, useRef } from 'react';
2
+ import {
3
+ View,
4
+ TextInput,
5
+ StyleSheet,
6
+ TouchableOpacity,
7
+ Platform,
8
+ Keyboard,
9
+ TouchableWithoutFeedback
10
+ } from 'react-native';
4
11
  import Icon from '../Icon';
5
- import ScrollBar from '../ScrollBar';
6
12
  import SEText from '../SEText';
13
+ import ScrollBar from '../ScrollBar';
14
+ import { set } from 'lodash';
7
15
 
8
16
  const CustomCheckbox = ({ selected, iconColor, size = 21 }) => {
9
- if (selected) {
10
- return (
11
- <View style={{
12
- width: size,
13
- height: size,
14
- borderWidth: 1.5,
15
- borderColor: iconColor,
16
- borderRadius: 4,
17
- backgroundColor: iconColor,
18
- alignItems: 'center',
19
- justifyContent: 'center',
20
- }}>
21
- <Icon
22
- name="check-line"
23
- size={size - 8}
24
- color="#FFFFFF"
25
- />
26
- </View>
27
- );
28
- }
29
17
  return (
30
18
  <View style={{
31
19
  width: size,
@@ -33,8 +21,12 @@ const CustomCheckbox = ({ selected, iconColor, size = 21 }) => {
33
21
  borderWidth: 1.5,
34
22
  borderColor: iconColor,
35
23
  borderRadius: 4,
36
- backgroundColor: 'transparent',
37
- }} />
24
+ backgroundColor: selected ? iconColor : 'transparent',
25
+ alignItems: 'center',
26
+ justifyContent: 'center',
27
+ }}>
28
+ {selected && <Icon name="check-line" size={size - 8} color="#FFFFFF" />}
29
+ </View>
38
30
  );
39
31
  };
40
32
 
@@ -48,6 +40,10 @@ const FilterableMultiSelect = ({
48
40
  }) => {
49
41
  const [search, setSearch] = useState(searchedValue);
50
42
  const [isFocused, setIsFocused] = useState(false);
43
+ const [onPressIn, setOnPressIn] = useState(false);
44
+
45
+ // 1. Criamos uma referência para o input
46
+ const inputRef = useRef(null);
51
47
 
52
48
  const handleSearch = (value) => {
53
49
  setSearch(value);
@@ -59,31 +55,35 @@ const FilterableMultiSelect = ({
59
55
  onSearch('');
60
56
  };
61
57
 
62
- const isActive = isFocused || search.length > 0;
58
+ // 2. Função para fechar o teclado e tirar o foco
59
+ const dismissAll = () => {
60
+ Keyboard.dismiss();
61
+ inputRef.current?.blur();
62
+ };
63
63
 
64
- // Filtrar opções baseado na busca
65
64
  const filteredOptions = options.filter(option =>
66
65
  option.label.toLowerCase().includes(search.toLowerCase())
67
66
  );
68
67
 
69
68
  return (
70
- <View style={styles.container}>
71
- <View>
69
+ /* 3. O TouchableWithoutFeedback aqui garante que o clique fora feche o teclado */
70
+ <TouchableWithoutFeedback onPress={dismissAll}>
71
+ <View style={styles.container}>
72
72
  <View style={[
73
73
  styles.inputWrapper,
74
- isActive && styles.inputWrapperActive
74
+ isFocused && styles.inputWrapperActive,
75
+ onPressIn && styles.inputOnpressIn
75
76
  ]}>
76
77
  <View style={styles.searchIconWrapper}>
77
- <Icon
78
- name="search-line"
79
- size={16}
80
- color="#687499"
81
- />
78
+ <Icon name="search-line" size={16} color="#687499" />
82
79
  </View>
83
80
  <TextInput
84
- style={[styles.input, isActive && styles.inputActive]}
81
+ ref={inputRef} // Atribuindo a ref
82
+ style={[styles.input, search.length > 0 && styles.inputActive]}
85
83
  value={search}
86
84
  onChangeText={handleSearch}
85
+ onPressIn={()=> setOnPressIn(true)}
86
+ onPressOut={()=> setOnPressIn(false)}
87
87
  onFocus={() => setIsFocused(true)}
88
88
  onBlur={() => setIsFocused(false)}
89
89
  placeholder={placeholder}
@@ -91,53 +91,32 @@ const FilterableMultiSelect = ({
91
91
  cursorColor="#1B244B"
92
92
  autoCorrect={false}
93
93
  underlineColorAndroid="transparent"
94
+ returnKeyType="done" // Muda o botão do teclado para "Concluído"
95
+ onSubmitEditing={dismissAll} // CORREÇÃO: Fecha o teclado no botão circulado
94
96
  />
95
- {isActive && (
96
- <TouchableOpacity
97
- onPress={handleClear}
98
- style={styles.clearIconWrapper}
99
- >
100
- <Icon
101
- name="close-line"
102
- size={14}
103
- color="#2A4FDA"
104
- />
97
+ {search.length > 0 && (
98
+ <TouchableOpacity onPress={handleClear} style={styles.clearIconWrapper}>
99
+ <Icon name="close-line" size={14} color="#2A4FDA" />
105
100
  </TouchableOpacity>
106
101
  )}
107
102
  </View>
108
- </View>
109
- <ScrollBar
110
- style={styles.scroll}
111
- barColor="#C9D5FF"
112
- barThickness={6}
113
- >
114
- <View style={{ paddingRight: 5 }}>
115
- {filteredOptions.length === 0 ? (
116
- <View style={styles.emptyContainer}>
117
- <SEText
118
- type="ns-sm-body-bold"
119
- style={styles.emptyTitle}
120
- >
121
- Nenhum resultado
122
- </SEText>
123
- <SEText
124
- type="ns-sm-body"
125
- style={styles.emptySubtitle}
126
- >
127
- Escreva palavras diferentes
128
- </SEText>
129
- </View>
130
- ) : (
131
- filteredOptions.map((option, idx) => (
132
- <View
133
- key={option.value}
134
- style={{
135
- width: '100%',
136
- // Adiciona marginBottom apenas se não for o último item
137
- marginBottom: idx === filteredOptions.length - 1 ? 0 : 8,
138
- }}
139
- >
103
+
104
+ <ScrollBar
105
+ style={styles.scroll}
106
+ barColor="#C9D5FF"
107
+ barThickness={6}
108
+ >
109
+ {/* 4. View de conteúdo com paddingBottom para não colar no teclado */}
110
+ <View style={{ paddingRight: 5, paddingBottom: 20 }}>
111
+ {filteredOptions.length === 0 ? (
112
+ <View style={styles.emptyContainer}>
113
+ <SEText type="ns-sm-body-bold" style={styles.emptyTitle}>Nenhum resultado</SEText>
114
+ <SEText type="ns-sm-body" style={styles.emptySubtitle}>Escreva palavras diferentes</SEText>
115
+ </View>
116
+ ) : (
117
+ filteredOptions.map((option, idx) => (
140
118
  <TouchableOpacity
119
+ key={option.value}
141
120
  style={{
142
121
  flexDirection: 'row',
143
122
  alignItems: 'center',
@@ -148,13 +127,17 @@ const FilterableMultiSelect = ({
148
127
  borderColor: selected.includes(option.value) ? '#2A4FDA' : '#E2E9FC',
149
128
  backgroundColor: selected.includes(option.value) ? '#E3E9FF' : '#FFFFFF',
150
129
  paddingHorizontal: 16,
130
+ marginBottom: 8,
131
+ }}
132
+ onPress={() => {
133
+ // 5. Opcional: Se quiser que o teclado feche ao selecionar
134
+ // dismissAll();
135
+ onSelect(option.value);
151
136
  }}
152
- disabled={option.disabled}
153
- onPress={() => onSelect(option.value)}
154
137
  >
155
138
  <CustomCheckbox
156
139
  selected={selected.includes(option.value)}
157
- iconColor={selected.includes(option.value) ? '#2A4FDA' : '#2A4FDA'}
140
+ iconColor={'#2A4FDA'}
158
141
  size={20}
159
142
  />
160
143
  <SEText
@@ -167,86 +150,59 @@ const FilterableMultiSelect = ({
167
150
  {option.label}
168
151
  </SEText>
169
152
  </TouchableOpacity>
170
- </View>
171
- ))
172
- )}
173
- </View>
174
- </ScrollBar>
175
- </View>
153
+ ))
154
+ )}
155
+ </View>
156
+ </ScrollBar>
157
+ </View>
158
+ </TouchableWithoutFeedback>
176
159
  );
177
160
  };
178
161
 
179
162
  const styles = StyleSheet.create({
180
163
  container: {
164
+ flex: 1,
181
165
  width: '100%',
182
- alignSelf: 'center',
183
166
  backgroundColor: '#fff',
184
- borderRadius: 8,
185
- padding: 0,
186
- flex: 1,
187
167
  },
188
168
  inputWrapper: {
189
- position: 'relative',
190
169
  flexDirection: 'row',
191
170
  alignItems: 'center',
192
171
  borderRadius: 8,
193
- borderWidth: 1.5,
194
- borderColor: '#C9D5FF',
172
+ borderWidth: 2,
173
+ borderColor: '#96ACFF',
195
174
  marginBottom: 24,
196
175
  height: 49,
197
176
  backgroundColor: '#FFFFFF',
198
177
  },
199
178
  inputWrapperActive: {
179
+ borderWidth: 2,
200
180
  borderColor: '#2A4FDA',
181
+ outlineColor: '#96ACFF',
182
+ outlineWidth: 3,
201
183
  },
202
- searchIconWrapper: {
203
- paddingLeft: 16,
204
- paddingBottom:2,
205
- },
206
- clearIconWrapper: {
207
- position: 'absolute',
208
- right: 16,
209
- top: 17,
184
+ inputOnpressIn:{
185
+ borderWidth: 2,
186
+ borderColor: '#2A4FDA',
210
187
  },
188
+ searchIconWrapper: { paddingLeft: 16 },
189
+ clearIconWrapper: { position: 'absolute', right: 16 },
211
190
  input: {
212
191
  flex: 1,
213
192
  height: '100%',
214
193
  paddingHorizontal: 12,
215
- paddingRight: 40,
194
+ fontSize: 16,
195
+ color: '#687499',
216
196
  ...Platform.select({
217
197
  ios: { fontFamily: 'Nunito Sans 10pt Regular' },
218
198
  android: { fontFamily: 'NunitoSans_10pt-Regular' },
219
199
  }),
220
- fontSize: 16,
221
- lineHeight: 24,
222
- letterSpacing: 0,
223
- color: '#687499',
224
- backgroundColor: 'transparent',
225
- },
226
- inputActive: {
227
- color: '#1B244B',
228
- },
229
- scroll: {
230
- zIndex : 1,
231
- paddingTop: 0,
232
- flex: 1,
233
- minHeight: 0,
234
- paddingRight: 5,
235
- },
236
- emptyContainer: {
237
- alignItems: 'center',
238
- justifyContent: 'center',
239
- paddingVertical: 12,
240
- },
241
- emptyTitle: {
242
- color: '#1B244B',
243
- fontSize: 16,
244
- marginBottom: 4,
245
- },
246
- emptySubtitle: {
247
- color: '#687499',
248
- fontSize: 14,
249
200
  },
201
+ inputActive: { color: '#1B244B' },
202
+ scroll: { flex: 1 },
203
+ emptyContainer: { alignItems: 'center', marginTop: 20 },
204
+ emptyTitle: { color: '#1B244B', fontSize: 16 },
205
+ emptySubtitle: { color: '#687499', fontSize: 14 },
250
206
  });
251
207
 
252
208
  export default FilterableMultiSelect;
@@ -0,0 +1,140 @@
1
+ import React from 'react';
2
+ import { View, ScrollView } from 'react-native';
3
+ import NavigationButton from './index';
4
+ import SEText from '../../SEText';
5
+
6
+ export default {
7
+ title: 'Tools/NavigationButton',
8
+ component: NavigationButton,
9
+ parameters: {
10
+ layout: 'fullscreen',
11
+ },
12
+ };
13
+
14
+ export const Default = {
15
+ render: () => (
16
+ <ScrollView style={{ flex: 1, backgroundColor: '#F8F9FC' }}>
17
+ <View style={{ padding: 16 }}>
18
+ {/* Structural variants */}
19
+ <SEText type="ns-sm-body-bold" color="#3B5BDB" style={{ marginBottom: 16 }}>
20
+ Structural variants
21
+ </SEText>
22
+
23
+ {/* Dois botões */}
24
+ <NavigationButton
25
+ title="Tool's Name"
26
+ description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et quam sit."
27
+ labels={[
28
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
29
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
30
+ ]}
31
+ style={{ marginBottom: 12 }}
32
+ />
33
+
34
+ {/* Um botão */}
35
+ <NavigationButton
36
+ title="Tool's Name"
37
+ description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et quam sit."
38
+ labels={[
39
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
40
+ ]}
41
+ style={{ marginBottom: 12 }}
42
+ />
43
+
44
+ {/* Sem botão */}
45
+ <NavigationButton
46
+ title="Tool's Name"
47
+ description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et quam sit."
48
+ labels={[]}
49
+ style={{ marginBottom: 32 }}
50
+ />
51
+
52
+ {/* Structural configurations */}
53
+ <SEText type="ns-sm-body-bold" color="#3B5BDB" style={{ marginBottom: 16, marginTop: 8 }}>
54
+ Structural configurations
55
+ </SEText>
56
+
57
+ {/* default status */}
58
+ <NavigationButton
59
+ title="Tool's Name"
60
+ description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et quam sit."
61
+ labels={[
62
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
63
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
64
+ ]}
65
+ variant="filled"
66
+ style={{ marginBottom: 12 }}
67
+ />
68
+
69
+ {/* alert status */}
70
+ <NavigationButton
71
+ title="Tool's Name"
72
+ alertMessage="Lorem ipsum dolor sit amet."
73
+ labels={[
74
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
75
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
76
+ ]}
77
+ variant="filled"
78
+ style={{ marginBottom: 12 }}
79
+ />
80
+
81
+ {/* default status com info */}
82
+ <SEText type="ns-xs-body" color="#485274" style={{ marginTop: 16, marginBottom: 8 }}>
83
+ default status
84
+ </SEText>
85
+ <NavigationButton
86
+ title="Tool's Name"
87
+ description="R$ 5.021,01"
88
+ showValueIcon={true}
89
+ labels={[
90
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
91
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
92
+ ]}
93
+ style={{ marginBottom: 12 }}
94
+ />
95
+
96
+ {/* hidden content (masked) */}
97
+ <NavigationButton
98
+ title="Tool's Name"
99
+ maskedContent={true}
100
+ labels={[
101
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
102
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
103
+ ]}
104
+ style={{ marginBottom: 12 }}
105
+ />
106
+
107
+ {/* Hide content */}
108
+ <SEText type="ns-xs-body" color="#485274" style={{ marginTop: 16, marginBottom: 8 }}>
109
+ Hide content / Hidden content
110
+ </SEText>
111
+ <NavigationButton
112
+ title="Tool's Name"
113
+ hideContent={true}
114
+ labels={[]}
115
+ />
116
+
117
+ <NavigationButton
118
+ title="Tool's Name"
119
+ maskedContent={true}
120
+ labels={[]}
121
+ />
122
+
123
+ {/* notification message */}
124
+ <SEText type="ns-xs-body" color="#485274" style={{ marginTop: 16, marginBottom: 8 }}>
125
+ notification message
126
+ </SEText>
127
+ <NavigationButton
128
+ title="Tool's Name"
129
+ alertMessage="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
130
+ labels={[
131
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
132
+ { text: 'Label', leftIcon: 'home-4-line', rightIcon: 'home-4-line' },
133
+ ]}
134
+ variant="filled"
135
+ style={{ marginVertical: 8 }}
136
+ />
137
+ </View>
138
+ </ScrollView>
139
+ ),
140
+ };
@@ -0,0 +1,317 @@
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 NavigationButton = ({
8
+ // Conteúdo
9
+ title = "Tool's Name",
10
+ description = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
11
+ alertMessage = null,
12
+ hideContent = false,
13
+ maskedContent = false,
14
+ showValueIcon = false,
15
+
16
+ // Ícone principal
17
+ iconType = null,
18
+ iconName = 'image-line',
19
+ iconSize = 16,
20
+ iconColor = '#3B5BDB',
21
+ iconContainerSize = 32,
22
+ iconContainerRadius = 6,
23
+ iconContainerColor = '#E6ECFF',
24
+
25
+ // Título
26
+ titleType = 'ns-sm-body-bold',
27
+ titleColor = '#1B244B',
28
+
29
+ // Descrição
30
+ descriptionType = 'ns-xs-body',
31
+ descriptionColor = '#485274',
32
+
33
+ // Alerta
34
+ alertIconName = 'alert-line',
35
+ alertIconSize = 16,
36
+ alertColor = '#E53935',
37
+
38
+ // Valor com ícone
39
+ valueIconName = 'eye-line',
40
+ valueIconSize = 16,
41
+ valueIconColor = '#485274',
42
+
43
+ // Seta
44
+ showArrow = true,
45
+ arrowIconName = 'arrow-right-line',
46
+ arrowIconSize = 20,
47
+ arrowIconColor = '#1B244B',
48
+
49
+ // Labels
50
+ labels = [],
51
+ labelTextType = 'ns-xs-body',
52
+ labelTextColor = '#3B5BDB',
53
+ labelIconSize = 16,
54
+ labelIconColor = '#3B5BDB',
55
+
56
+ // Dividers
57
+ dividerColor = '#E2E9FC',
58
+
59
+ // Container
60
+ variant = 'default',
61
+ backgroundColor = '#FFFFFF',
62
+ filledBackgroundColor = '#E2E9FC',
63
+ borderColor = '#E2E9FC',
64
+ borderWidth = 1.5,
65
+ borderRadius = 8,
66
+ paddingHorizontal = 12,
67
+ paddingVertical = 16,
68
+ minHeight = 92,
69
+
70
+ // Outros
71
+ onPress,
72
+ style,
73
+ }) => {
74
+ // labels pode ser array de strings ou array de objetos { text, leftIcon, rightIcon }
75
+ const normalizeLabel = (label) => {
76
+ if (typeof label === 'string') {
77
+ return { text: label, leftIcon: 'home-4-line', rightIcon: 'home-4-line' };
78
+ }
79
+ return {
80
+ text: label.text || 'Label',
81
+ leftIcon: label.leftIcon,
82
+ rightIcon: label.rightIcon,
83
+ };
84
+ };
85
+
86
+ const isCustomIcon = iconType && iconType !== 'Remix';
87
+
88
+ const renderDescription = () => {
89
+ if (hideContent) {
90
+ return null;
91
+ }
92
+
93
+ if (maskedContent) {
94
+ return (
95
+ <View style={styles.valueContainer}>
96
+ <Icon name={valueIconName} size={valueIconSize} color={valueIconColor} />
97
+ <SEText
98
+ type={descriptionType}
99
+ color={descriptionColor}
100
+ style={styles.valueText}
101
+ >
102
+ ••••••
103
+ </SEText>
104
+ </View>
105
+ );
106
+ }
107
+
108
+ if (alertMessage) {
109
+ return (
110
+ <View style={styles.alertContainer}>
111
+ <Icon name={alertIconName} size={alertIconSize} color={alertColor} />
112
+ <SEText
113
+ type={descriptionType}
114
+ color={alertColor}
115
+ style={styles.alertText}
116
+ >
117
+ {alertMessage}
118
+ </SEText>
119
+ </View>
120
+ );
121
+ }
122
+
123
+ if (showValueIcon) {
124
+ return (
125
+ <View style={styles.valueContainer}>
126
+ <Icon name={valueIconName} size={valueIconSize} color={valueIconColor} />
127
+ <SEText
128
+ type={descriptionType}
129
+ color={descriptionColor}
130
+ style={styles.valueText}
131
+ >
132
+ {description}
133
+ </SEText>
134
+ </View>
135
+ );
136
+ }
137
+
138
+ return (
139
+ <SEText
140
+ type={descriptionType}
141
+ color={descriptionColor}
142
+ style={styles.description}
143
+ >
144
+ {description}
145
+ </SEText>
146
+ );
147
+ };
148
+
149
+ const renderLabels = () => {
150
+ if (labels.length === 0) return null;
151
+
152
+ const labelsDividerStyle = {
153
+ height: 1,
154
+ backgroundColor: dividerColor,
155
+ marginTop: 12,
156
+ marginLeft: -(iconContainerSize + 16),
157
+ marginRight: -24,
158
+ };
159
+
160
+ const labelsContainerStyle = {
161
+ flexDirection: 'row',
162
+ marginLeft: -(iconContainerSize + 16 + paddingHorizontal),
163
+ marginRight: -(paddingHorizontal + 12 + arrowIconSize),
164
+ marginBottom: -paddingVertical,
165
+ paddingBottom: 12,
166
+ backgroundColor: '#FFFFFF',
167
+ borderBottomLeftRadius: borderRadius,
168
+ borderBottomRightRadius: borderRadius,
169
+ };
170
+
171
+ const labelVerticalDividerStyle = {
172
+ width: 1,
173
+ backgroundColor: dividerColor,
174
+ marginTop: 8,
175
+ marginBottom: 0,
176
+ };
177
+
178
+ return (
179
+ <>
180
+ <View style={labelsDividerStyle} />
181
+ <View style={labelsContainerStyle}>
182
+ {labels.map((label, index) => {
183
+ const normalizedLabel = normalizeLabel(label);
184
+ return (
185
+ <React.Fragment key={index}>
186
+ {index > 0 && <View style={labelVerticalDividerStyle} />}
187
+ <View style={styles.labelButton}>
188
+ {normalizedLabel.leftIcon && (
189
+ <Icon name={normalizedLabel.leftIcon} size={labelIconSize} color={labelIconColor} />
190
+ )}
191
+ <SEText type={labelTextType} color={labelTextColor} style={styles.labelText}>
192
+ {normalizedLabel.text}
193
+ </SEText>
194
+ {normalizedLabel.rightIcon && (
195
+ <Icon name={normalizedLabel.rightIcon} size={labelIconSize} color={labelIconColor} style={{ marginLeft: 4 }} />
196
+ )}
197
+ </View>
198
+ </React.Fragment>
199
+ );
200
+ })}
201
+ </View>
202
+ </>
203
+ );
204
+ };
205
+
206
+ const containerStyle = {
207
+ flexDirection: 'row',
208
+ alignItems: 'flex-start',
209
+ backgroundColor: variant === 'filled' ? filledBackgroundColor : backgroundColor,
210
+ paddingHorizontal,
211
+ paddingVertical,
212
+ minHeight,
213
+ width: '100%',
214
+ borderWidth: variant === 'filled' ? 0 : borderWidth,
215
+ borderColor,
216
+ borderRadius,
217
+ };
218
+
219
+ const iconContainerStyle = {
220
+ marginRight: 16,
221
+ justifyContent: 'flex-start',
222
+ alignItems: 'center',
223
+ width: iconContainerSize,
224
+ height: iconContainerSize,
225
+ };
226
+
227
+ const iconPlaceholderStyle = {
228
+ width: iconContainerSize,
229
+ height: iconContainerSize,
230
+ borderRadius: iconContainerRadius,
231
+ backgroundColor: iconContainerColor,
232
+ justifyContent: 'center',
233
+ alignItems: 'center',
234
+ };
235
+
236
+ return (
237
+ <TouchableOpacity
238
+ style={[containerStyle, style]}
239
+ onPress={onPress}
240
+ activeOpacity={0.7}
241
+ >
242
+ <View style={iconContainerStyle}>
243
+ {isCustomIcon ? (
244
+ <SEIcon type={iconType} size={iconContainerSize} />
245
+ ) : (
246
+ <View style={iconPlaceholderStyle}>
247
+ <Icon name={iconName} size={iconSize} color={iconColor} />
248
+ </View>
249
+ )}
250
+ </View>
251
+
252
+ <View style={styles.contentContainer}>
253
+ <SEText
254
+ type={titleType}
255
+ color={titleColor}
256
+ style={styles.title}
257
+ >
258
+ {title}
259
+ </SEText>
260
+ {renderDescription()}
261
+ {renderLabels()}
262
+ </View>
263
+
264
+ {showArrow && (
265
+ <View style={styles.arrowContainer}>
266
+ <Icon name={arrowIconName} size={arrowIconSize} color={arrowIconColor} />
267
+ </View>
268
+ )}
269
+ </TouchableOpacity>
270
+ );
271
+ };
272
+
273
+ const styles = StyleSheet.create({
274
+ contentContainer: {
275
+ flex: 1,
276
+ justifyContent: 'flex-start',
277
+ },
278
+ title: {
279
+ marginBottom: 4,
280
+ },
281
+ description: {
282
+ lineHeight: 20,
283
+ },
284
+ alertContainer: {
285
+ flexDirection: 'row',
286
+ alignItems: 'center',
287
+ },
288
+ alertText: {
289
+ marginLeft: 4,
290
+ },
291
+ valueContainer: {
292
+ flexDirection: 'row',
293
+ alignItems: 'center',
294
+ },
295
+ valueText: {
296
+ marginLeft: 4,
297
+ },
298
+ labelButton: {
299
+ flex: 1,
300
+ flexDirection: 'row',
301
+ alignItems: 'center',
302
+ justifyContent: 'center',
303
+ paddingTop: 16,
304
+ paddingBottom: 4,
305
+ },
306
+ labelText: {
307
+ marginLeft: 4,
308
+ },
309
+ arrowContainer: {
310
+ marginLeft: 12,
311
+ justifyContent: 'flex-start',
312
+ alignItems: 'center',
313
+ paddingTop: 2,
314
+ },
315
+ });
316
+
317
+ export default NavigationButton;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/FilterableMultiSelect/index.jsx"],"names":[],"mappings":";AAwCA;;;;;;;sBAwIC;kBAhL+B,OAAO"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/FilterableMultiSelect/index.jsx"],"names":[],"mappings":";AAgCA;;;;;;;sBA+HC;kBA/JuC,OAAO"}
@@ -1,36 +1,29 @@
1
- import React, { useState } from 'react';
2
- import { View, TextInput, StyleSheet, TouchableOpacity, Platform } from 'react-native';
3
- import SelectItem from '../SelectItem';
1
+ import React, { useState, useRef } from 'react';
2
+ import { View, TextInput, StyleSheet, TouchableOpacity, Platform, Keyboard, TouchableWithoutFeedback } from 'react-native';
4
3
  import Icon from '../Icon';
5
- import ScrollBar from '../ScrollBar';
6
4
  import SEText from '../SEText';
5
+ import ScrollBar from '../ScrollBar';
6
+ import { set } from 'lodash';
7
7
  const CustomCheckbox = ({ selected, iconColor, size = 21 }) => {
8
- if (selected) {
9
- return (<View style={{
10
- width: size,
11
- height: size,
12
- borderWidth: 1.5,
13
- borderColor: iconColor,
14
- borderRadius: 4,
15
- backgroundColor: iconColor,
16
- alignItems: 'center',
17
- justifyContent: 'center',
18
- }}>
19
- <Icon name="check-line" size={size - 8} color="#FFFFFF"/>
20
- </View>);
21
- }
22
8
  return (<View style={{
23
9
  width: size,
24
10
  height: size,
25
11
  borderWidth: 1.5,
26
12
  borderColor: iconColor,
27
13
  borderRadius: 4,
28
- backgroundColor: 'transparent',
29
- }}/>);
14
+ backgroundColor: selected ? iconColor : 'transparent',
15
+ alignItems: 'center',
16
+ justifyContent: 'center',
17
+ }}>
18
+ {selected && <Icon name="check-line" size={size - 8} color="#FFFFFF"/>}
19
+ </View>);
30
20
  };
31
21
  const FilterableMultiSelect = ({ options = [], placeholder = 'O que você procura?', searchedValue = '', onSearch = () => { }, selected = [], onSelect = () => { }, }) => {
32
22
  const [search, setSearch] = useState(searchedValue);
33
23
  const [isFocused, setIsFocused] = useState(false);
24
+ const [onPressIn, setOnPressIn] = useState(false);
25
+ // 1. Criamos uma referência para o input
26
+ const inputRef = useRef(null);
34
27
  const handleSearch = (value) => {
35
28
  setSearch(value);
36
29
  onSearch(value);
@@ -39,39 +32,40 @@ const FilterableMultiSelect = ({ options = [], placeholder = 'O que você procur
39
32
  setSearch('');
40
33
  onSearch('');
41
34
  };
42
- const isActive = isFocused || search.length > 0;
43
- // Filtrar opções baseado na busca
35
+ // 2. Função para fechar o teclado e tirar o foco
36
+ const dismissAll = () => {
37
+ Keyboard.dismiss();
38
+ inputRef.current?.blur();
39
+ };
44
40
  const filteredOptions = options.filter(option => option.label.toLowerCase().includes(search.toLowerCase()));
45
- return (<View style={styles.container}>
46
- <View>
41
+ return (
42
+ /* 3. O TouchableWithoutFeedback aqui garante que o clique fora feche o teclado */
43
+ <TouchableWithoutFeedback onPress={dismissAll}>
44
+ <View style={styles.container}>
47
45
  <View style={[
48
46
  styles.inputWrapper,
49
- isActive && styles.inputWrapperActive
47
+ isFocused && styles.inputWrapperActive,
48
+ onPressIn && styles.inputOnpressIn
50
49
  ]}>
51
50
  <View style={styles.searchIconWrapper}>
52
51
  <Icon name="search-line" size={16} color="#687499"/>
53
52
  </View>
54
- <TextInput style={[styles.input, isActive && styles.inputActive]} value={search} onChangeText={handleSearch} onFocus={() => setIsFocused(true)} onBlur={() => setIsFocused(false)} placeholder={placeholder} placeholderTextColor="#687499" cursorColor="#1B244B" autoCorrect={false} underlineColorAndroid="transparent"/>
55
- {isActive && (<TouchableOpacity onPress={handleClear} style={styles.clearIconWrapper}>
53
+ <TextInput ref={inputRef} // Atribuindo a ref
54
+ style={[styles.input, search.length > 0 && styles.inputActive]} value={search} onChangeText={handleSearch} onPressIn={() => setOnPressIn(true)} onPressOut={() => setOnPressIn(false)} onFocus={() => setIsFocused(true)} onBlur={() => setIsFocused(false)} placeholder={placeholder} placeholderTextColor="#687499" cursorColor="#1B244B" autoCorrect={false} underlineColorAndroid="transparent" returnKeyType="done" // Muda o botão do teclado para "Concluído"
55
+ onSubmitEditing={dismissAll} // CORREÇÃO: Fecha o teclado no botão circulado
56
+ />
57
+ {search.length > 0 && (<TouchableOpacity onPress={handleClear} style={styles.clearIconWrapper}>
56
58
  <Icon name="close-line" size={14} color="#2A4FDA"/>
57
59
  </TouchableOpacity>)}
58
60
  </View>
59
- </View>
60
- <ScrollBar style={styles.scroll} barColor="#C9D5FF" barThickness={6}>
61
- <View style={{ paddingRight: 5 }}>
62
- {filteredOptions.length === 0 ? (<View style={styles.emptyContainer}>
63
- <SEText type="ns-sm-body-bold" style={styles.emptyTitle}>
64
- Nenhum resultado
65
- </SEText>
66
- <SEText type="ns-sm-body" style={styles.emptySubtitle}>
67
- Escreva palavras diferentes
68
- </SEText>
69
- </View>) : (filteredOptions.map((option, idx) => (<View key={option.value} style={{
70
- width: '100%',
71
- // Adiciona marginBottom apenas se não for o último item
72
- marginBottom: idx === filteredOptions.length - 1 ? 0 : 8,
73
- }}>
74
- <TouchableOpacity style={{
61
+
62
+ <ScrollBar style={styles.scroll} barColor="#C9D5FF" barThickness={6}>
63
+ {/* 4. View de conteúdo com paddingBottom para não colar no teclado */}
64
+ <View style={{ paddingRight: 5, paddingBottom: 20 }}>
65
+ {filteredOptions.length === 0 ? (<View style={styles.emptyContainer}>
66
+ <SEText type="ns-sm-body-bold" style={styles.emptyTitle}>Nenhum resultado</SEText>
67
+ <SEText type="ns-sm-body" style={styles.emptySubtitle}>Escreva palavras diferentes</SEText>
68
+ </View>) : (filteredOptions.map((option, idx) => (<TouchableOpacity key={option.value} style={{
75
69
  flexDirection: 'row',
76
70
  alignItems: 'center',
77
71
  width: '100%',
@@ -81,90 +75,68 @@ const FilterableMultiSelect = ({ options = [], placeholder = 'O que você procur
81
75
  borderColor: selected.includes(option.value) ? '#2A4FDA' : '#E2E9FC',
82
76
  backgroundColor: selected.includes(option.value) ? '#E3E9FF' : '#FFFFFF',
83
77
  paddingHorizontal: 16,
84
- }} disabled={option.disabled} onPress={() => onSelect(option.value)}>
85
- <CustomCheckbox selected={selected.includes(option.value)} iconColor={selected.includes(option.value) ? '#2A4FDA' : '#2A4FDA'} size={20}/>
78
+ marginBottom: 8,
79
+ }} onPress={() => {
80
+ // 5. Opcional: Se quiser que o teclado feche ao selecionar
81
+ // dismissAll();
82
+ onSelect(option.value);
83
+ }}>
84
+ <CustomCheckbox selected={selected.includes(option.value)} iconColor={'#2A4FDA'} size={20}/>
86
85
  <SEText type="ns-sm-body" style={{
87
86
  color: selected.includes(option.value) ? '#2A4FDA' : '#485274',
88
87
  marginLeft: 12,
89
88
  }}>
90
89
  {option.label}
91
90
  </SEText>
92
- </TouchableOpacity>
93
- </View>)))}
94
- </View>
95
- </ScrollBar>
96
- </View>);
91
+ </TouchableOpacity>)))}
92
+ </View>
93
+ </ScrollBar>
94
+ </View>
95
+ </TouchableWithoutFeedback>);
97
96
  };
98
97
  const styles = StyleSheet.create({
99
98
  container: {
99
+ flex: 1,
100
100
  width: '100%',
101
- alignSelf: 'center',
102
101
  backgroundColor: '#fff',
103
- borderRadius: 8,
104
- padding: 0,
105
- flex: 1,
106
102
  },
107
103
  inputWrapper: {
108
- position: 'relative',
109
104
  flexDirection: 'row',
110
105
  alignItems: 'center',
111
106
  borderRadius: 8,
112
- borderWidth: 1.5,
113
- borderColor: '#C9D5FF',
107
+ borderWidth: 2,
108
+ borderColor: '#96ACFF',
114
109
  marginBottom: 24,
115
110
  height: 49,
116
111
  backgroundColor: '#FFFFFF',
117
112
  },
118
113
  inputWrapperActive: {
114
+ borderWidth: 2,
119
115
  borderColor: '#2A4FDA',
116
+ outlineColor: '#96ACFF',
117
+ outlineWidth: 3,
120
118
  },
121
- searchIconWrapper: {
122
- paddingLeft: 16,
123
- paddingBottom: 2,
124
- },
125
- clearIconWrapper: {
126
- position: 'absolute',
127
- right: 16,
128
- top: 17,
119
+ inputOnpressIn: {
120
+ borderWidth: 2,
121
+ borderColor: '#2A4FDA',
129
122
  },
123
+ searchIconWrapper: { paddingLeft: 16 },
124
+ clearIconWrapper: { position: 'absolute', right: 16 },
130
125
  input: {
131
126
  flex: 1,
132
127
  height: '100%',
133
128
  paddingHorizontal: 12,
134
- paddingRight: 40,
129
+ fontSize: 16,
130
+ color: '#687499',
135
131
  ...Platform.select({
136
132
  ios: { fontFamily: 'Nunito Sans 10pt Regular' },
137
133
  android: { fontFamily: 'NunitoSans_10pt-Regular' },
138
134
  }),
139
- fontSize: 16,
140
- lineHeight: 24,
141
- letterSpacing: 0,
142
- color: '#687499',
143
- backgroundColor: 'transparent',
144
- },
145
- inputActive: {
146
- color: '#1B244B',
147
- },
148
- scroll: {
149
- zIndex: 1,
150
- paddingTop: 0,
151
- flex: 1,
152
- minHeight: 0,
153
- paddingRight: 5,
154
- },
155
- emptyContainer: {
156
- alignItems: 'center',
157
- justifyContent: 'center',
158
- paddingVertical: 12,
159
- },
160
- emptyTitle: {
161
- color: '#1B244B',
162
- fontSize: 16,
163
- marginBottom: 4,
164
- },
165
- emptySubtitle: {
166
- color: '#687499',
167
- fontSize: 14,
168
135
  },
136
+ inputActive: { color: '#1B244B' },
137
+ scroll: { flex: 1 },
138
+ emptyContainer: { alignItems: 'center', marginTop: 20 },
139
+ emptyTitle: { color: '#1B244B', fontSize: 16 },
140
+ emptySubtitle: { color: '#687499', fontSize: 14 },
169
141
  });
170
142
  export default FilterableMultiSelect;
@@ -0,0 +1,49 @@
1
+ export default NavigationButton;
2
+ declare function NavigationButton({ title, description, alertMessage, hideContent, maskedContent, showValueIcon, iconType, iconName, iconSize, iconColor, iconContainerSize, iconContainerRadius, iconContainerColor, titleType, titleColor, descriptionType, descriptionColor, alertIconName, alertIconSize, alertColor, valueIconName, valueIconSize, valueIconColor, showArrow, arrowIconName, arrowIconSize, arrowIconColor, labels, labelTextType, labelTextColor, labelIconSize, labelIconColor, dividerColor, variant, backgroundColor, filledBackgroundColor, borderColor, borderWidth, borderRadius, paddingHorizontal, paddingVertical, minHeight, onPress, style, }: {
3
+ title?: string | undefined;
4
+ description?: string | undefined;
5
+ alertMessage?: null | undefined;
6
+ hideContent?: boolean | undefined;
7
+ maskedContent?: boolean | undefined;
8
+ showValueIcon?: boolean | undefined;
9
+ iconType?: null | undefined;
10
+ iconName?: string | undefined;
11
+ iconSize?: number | undefined;
12
+ iconColor?: string | undefined;
13
+ iconContainerSize?: number | undefined;
14
+ iconContainerRadius?: number | undefined;
15
+ iconContainerColor?: string | undefined;
16
+ titleType?: string | undefined;
17
+ titleColor?: string | undefined;
18
+ descriptionType?: string | undefined;
19
+ descriptionColor?: string | undefined;
20
+ alertIconName?: string | undefined;
21
+ alertIconSize?: number | undefined;
22
+ alertColor?: string | undefined;
23
+ valueIconName?: string | undefined;
24
+ valueIconSize?: number | undefined;
25
+ valueIconColor?: string | undefined;
26
+ showArrow?: boolean | undefined;
27
+ arrowIconName?: string | undefined;
28
+ arrowIconSize?: number | undefined;
29
+ arrowIconColor?: string | undefined;
30
+ labels?: never[] | undefined;
31
+ labelTextType?: string | undefined;
32
+ labelTextColor?: string | undefined;
33
+ labelIconSize?: number | undefined;
34
+ labelIconColor?: string | undefined;
35
+ dividerColor?: string | undefined;
36
+ variant?: string | undefined;
37
+ backgroundColor?: string | undefined;
38
+ filledBackgroundColor?: string | undefined;
39
+ borderColor?: string | undefined;
40
+ borderWidth?: number | undefined;
41
+ borderRadius?: number | undefined;
42
+ paddingHorizontal?: number | undefined;
43
+ paddingVertical?: number | undefined;
44
+ minHeight?: number | undefined;
45
+ onPress: any;
46
+ style: any;
47
+ }): React.JSX.Element;
48
+ import React from 'react';
49
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/Tools/NavigationButton/index.jsx"],"names":[],"mappings":";AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAwQC;kBA9QiB,OAAO"}
@@ -0,0 +1,208 @@
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 NavigationButton = ({
7
+ // Conteúdo
8
+ title = "Tool's Name", description = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', alertMessage = null, hideContent = false, maskedContent = false, showValueIcon = false,
9
+ // Ícone principal
10
+ iconType = null, iconName = 'image-line', iconSize = 16, iconColor = '#3B5BDB', iconContainerSize = 32, iconContainerRadius = 6, iconContainerColor = '#E6ECFF',
11
+ // Título
12
+ titleType = 'ns-sm-body-bold', titleColor = '#1B244B',
13
+ // Descrição
14
+ descriptionType = 'ns-xs-body', descriptionColor = '#485274',
15
+ // Alerta
16
+ alertIconName = 'alert-line', alertIconSize = 16, alertColor = '#E53935',
17
+ // Valor com ícone
18
+ valueIconName = 'eye-line', valueIconSize = 16, valueIconColor = '#485274',
19
+ // Seta
20
+ showArrow = true, arrowIconName = 'arrow-right-line', arrowIconSize = 20, arrowIconColor = '#1B244B',
21
+ // Labels
22
+ labels = [], labelTextType = 'ns-xs-body', labelTextColor = '#3B5BDB', labelIconSize = 16, labelIconColor = '#3B5BDB',
23
+ // Dividers
24
+ dividerColor = '#E2E9FC',
25
+ // Container
26
+ variant = 'default', backgroundColor = '#FFFFFF', filledBackgroundColor = '#E2E9FC', borderColor = '#E2E9FC', borderWidth = 1.5, borderRadius = 8, paddingHorizontal = 12, paddingVertical = 16, minHeight = 92,
27
+ // Outros
28
+ onPress, style, }) => {
29
+ // labels pode ser array de strings ou array de objetos { text, leftIcon, rightIcon }
30
+ const normalizeLabel = (label) => {
31
+ if (typeof label === 'string') {
32
+ return { text: label, leftIcon: 'home-4-line', rightIcon: 'home-4-line' };
33
+ }
34
+ return {
35
+ text: label.text || 'Label',
36
+ leftIcon: label.leftIcon,
37
+ rightIcon: label.rightIcon,
38
+ };
39
+ };
40
+ const isCustomIcon = iconType && iconType !== 'Remix';
41
+ const renderDescription = () => {
42
+ if (hideContent) {
43
+ return null;
44
+ }
45
+ if (maskedContent) {
46
+ return (<View style={styles.valueContainer}>
47
+ <Icon name={valueIconName} size={valueIconSize} color={valueIconColor}/>
48
+ <SEText type={descriptionType} color={descriptionColor} style={styles.valueText}>
49
+ ••••••
50
+ </SEText>
51
+ </View>);
52
+ }
53
+ if (alertMessage) {
54
+ return (<View style={styles.alertContainer}>
55
+ <Icon name={alertIconName} size={alertIconSize} color={alertColor}/>
56
+ <SEText type={descriptionType} color={alertColor} style={styles.alertText}>
57
+ {alertMessage}
58
+ </SEText>
59
+ </View>);
60
+ }
61
+ if (showValueIcon) {
62
+ return (<View style={styles.valueContainer}>
63
+ <Icon name={valueIconName} size={valueIconSize} color={valueIconColor}/>
64
+ <SEText type={descriptionType} color={descriptionColor} style={styles.valueText}>
65
+ {description}
66
+ </SEText>
67
+ </View>);
68
+ }
69
+ return (<SEText type={descriptionType} color={descriptionColor} style={styles.description}>
70
+ {description}
71
+ </SEText>);
72
+ };
73
+ const renderLabels = () => {
74
+ if (labels.length === 0)
75
+ return null;
76
+ const labelsDividerStyle = {
77
+ height: 1,
78
+ backgroundColor: dividerColor,
79
+ marginTop: 12,
80
+ marginLeft: -(iconContainerSize + 16),
81
+ marginRight: -24,
82
+ };
83
+ const labelsContainerStyle = {
84
+ flexDirection: 'row',
85
+ marginLeft: -(iconContainerSize + 16 + paddingHorizontal),
86
+ marginRight: -(paddingHorizontal + 12 + arrowIconSize),
87
+ marginBottom: -paddingVertical,
88
+ paddingBottom: 12,
89
+ backgroundColor: '#FFFFFF',
90
+ borderBottomLeftRadius: borderRadius,
91
+ borderBottomRightRadius: borderRadius,
92
+ };
93
+ const labelVerticalDividerStyle = {
94
+ width: 1,
95
+ backgroundColor: dividerColor,
96
+ marginTop: 8,
97
+ marginBottom: 0,
98
+ };
99
+ return (<>
100
+ <View style={labelsDividerStyle}/>
101
+ <View style={labelsContainerStyle}>
102
+ {labels.map((label, index) => {
103
+ const normalizedLabel = normalizeLabel(label);
104
+ return (<React.Fragment key={index}>
105
+ {index > 0 && <View style={labelVerticalDividerStyle}/>}
106
+ <View style={styles.labelButton}>
107
+ {normalizedLabel.leftIcon && (<Icon name={normalizedLabel.leftIcon} size={labelIconSize} color={labelIconColor}/>)}
108
+ <SEText type={labelTextType} color={labelTextColor} style={styles.labelText}>
109
+ {normalizedLabel.text}
110
+ </SEText>
111
+ {normalizedLabel.rightIcon && (<Icon name={normalizedLabel.rightIcon} size={labelIconSize} color={labelIconColor} style={{ marginLeft: 4 }}/>)}
112
+ </View>
113
+ </React.Fragment>);
114
+ })}
115
+ </View>
116
+ </>);
117
+ };
118
+ const containerStyle = {
119
+ flexDirection: 'row',
120
+ alignItems: 'flex-start',
121
+ backgroundColor: variant === 'filled' ? filledBackgroundColor : backgroundColor,
122
+ paddingHorizontal,
123
+ paddingVertical,
124
+ minHeight,
125
+ width: '100%',
126
+ borderWidth: variant === 'filled' ? 0 : borderWidth,
127
+ borderColor,
128
+ borderRadius,
129
+ };
130
+ const iconContainerStyle = {
131
+ marginRight: 16,
132
+ justifyContent: 'flex-start',
133
+ alignItems: 'center',
134
+ width: iconContainerSize,
135
+ height: iconContainerSize,
136
+ };
137
+ const iconPlaceholderStyle = {
138
+ width: iconContainerSize,
139
+ height: iconContainerSize,
140
+ borderRadius: iconContainerRadius,
141
+ backgroundColor: iconContainerColor,
142
+ justifyContent: 'center',
143
+ alignItems: 'center',
144
+ };
145
+ return (<TouchableOpacity style={[containerStyle, style]} onPress={onPress} activeOpacity={0.7}>
146
+ <View style={iconContainerStyle}>
147
+ {isCustomIcon ? (<SEIcon type={iconType} size={iconContainerSize}/>) : (<View style={iconPlaceholderStyle}>
148
+ <Icon name={iconName} size={iconSize} color={iconColor}/>
149
+ </View>)}
150
+ </View>
151
+
152
+ <View style={styles.contentContainer}>
153
+ <SEText type={titleType} color={titleColor} style={styles.title}>
154
+ {title}
155
+ </SEText>
156
+ {renderDescription()}
157
+ {renderLabels()}
158
+ </View>
159
+
160
+ {showArrow && (<View style={styles.arrowContainer}>
161
+ <Icon name={arrowIconName} size={arrowIconSize} color={arrowIconColor}/>
162
+ </View>)}
163
+ </TouchableOpacity>);
164
+ };
165
+ const styles = StyleSheet.create({
166
+ contentContainer: {
167
+ flex: 1,
168
+ justifyContent: 'flex-start',
169
+ },
170
+ title: {
171
+ marginBottom: 4,
172
+ },
173
+ description: {
174
+ lineHeight: 20,
175
+ },
176
+ alertContainer: {
177
+ flexDirection: 'row',
178
+ alignItems: 'center',
179
+ },
180
+ alertText: {
181
+ marginLeft: 4,
182
+ },
183
+ valueContainer: {
184
+ flexDirection: 'row',
185
+ alignItems: 'center',
186
+ },
187
+ valueText: {
188
+ marginLeft: 4,
189
+ },
190
+ labelButton: {
191
+ flex: 1,
192
+ flexDirection: 'row',
193
+ alignItems: 'center',
194
+ justifyContent: 'center',
195
+ paddingTop: 16,
196
+ paddingBottom: 4,
197
+ },
198
+ labelText: {
199
+ marginLeft: 4,
200
+ },
201
+ arrowContainer: {
202
+ marginLeft: 12,
203
+ justifyContent: 'flex-start',
204
+ alignItems: 'center',
205
+ paddingTop: 2,
206
+ },
207
+ });
208
+ export default NavigationButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpt-sebraeds",
3
- "version": "0.0.47",
3
+ "version": "0.0.49",
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",