vpt-sebraeds 0.0.2 → 0.0.3
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/assets/Vector.png +0 -0
- package/assets/edit-icon.png +0 -0
- package/components/BottomSheet/index.jsx +44 -26
- package/components/Button/index.jsx +37 -152
- package/components/FilterableMultiSelect/index.jsx +25 -14
- package/components/MenuAccordion/index.jsx +1 -1
- package/components/NavigationItem/index.tsx +498 -478
- package/components/SEIcon/index.js +30 -0
- package/components/SEText/index.js +160 -0
- package/components/SEText/styles.js +333 -0
- package/components/ShuffleItem/index.jsx +321 -325
- package/components/TaskCard/components/EditIcon.jsx +1 -1
- package/components/styles/colors.js +204 -0
- package/components/styles/fonts.js +15 -0
- package/components/styles/index,js +6 -0
- package/components/styles/metrics.js +13 -0
- package/dist/components/BottomSheet/index.d.ts +3 -1
- package/dist/components/BottomSheet/index.d.ts.map +1 -1
- package/dist/components/BottomSheet/index.js +39 -19
- package/dist/components/Button/index.d.ts +1 -11
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +37 -146
- package/dist/components/FilterableMultiSelect/index.d.ts.map +1 -1
- package/dist/components/FilterableMultiSelect/index.js +23 -14
- package/dist/components/MenuAccordion/index.js +1 -1
- package/dist/components/NavigationItem/index.d.ts +4 -4
- package/dist/components/NavigationItem/index.d.ts.map +1 -1
- package/dist/components/NavigationItem/index.js +58 -49
- package/dist/components/SEIcon/index.d.ts +18 -0
- package/dist/components/SEIcon/index.d.ts.map +1 -0
- package/dist/components/SEIcon/index.js +18 -0
- package/dist/components/SEText/index.d.ts +58 -0
- package/dist/components/SEText/index.d.ts.map +1 -0
- package/dist/components/SEText/index.js +118 -0
- package/dist/components/SEText/styles.d.ts +429 -0
- package/dist/components/SEText/styles.d.ts.map +1 -0
- package/dist/components/SEText/styles.js +321 -0
- package/dist/components/ShuffleItem/index.d.ts +3 -1
- package/dist/components/ShuffleItem/index.d.ts.map +1 -1
- package/dist/components/ShuffleItem/index.js +243 -289
- package/dist/components/TaskCard/components/EditIcon.js +1 -1
- package/dist/components/styles/colors.d.ts +182 -0
- package/dist/components/styles/colors.d.ts.map +1 -0
- package/dist/components/styles/colors.js +180 -0
- package/dist/components/styles/fonts.d.ts +15 -0
- package/dist/components/styles/fonts.d.ts.map +1 -0
- package/dist/components/styles/fonts.js +14 -0
- package/dist/components/styles/metrics.d.ts +10 -0
- package/dist/components/styles/metrics.d.ts.map +1 -0
- package/dist/components/styles/metrics.js +11 -0
- package/package.json +3 -2
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useState, useCallback } from 'react';
|
|
2
|
-
import { View,
|
|
2
|
+
import { View, TouchableOpacity, FlatList, StyleSheet, Modal, Dimensions, Platform, ScrollView, KeyboardAvoidingView, Pressable } from 'react-native';
|
|
3
3
|
import { useSafeAreaInsets } from 'react-native-safe-area-context'; // Adicione esta dependência
|
|
4
|
-
import
|
|
4
|
+
import SEIcon from '../SEIcon';
|
|
5
|
+
import SEText from '../SEText';
|
|
5
6
|
|
|
6
7
|
const { height: screenHeight, width: screenWidth } = Dimensions.get('window');
|
|
7
8
|
|
|
@@ -13,6 +14,8 @@ const BottomSheet = ({
|
|
|
13
14
|
subtitle,
|
|
14
15
|
showHeader = true,
|
|
15
16
|
fullScreen = false,
|
|
17
|
+
tall = false, // quando true, aumenta a altura máxima do sheet sem ir para full screen
|
|
18
|
+
headerIcon = null, // Nova prop para o ícone no header
|
|
16
19
|
}) => {
|
|
17
20
|
const insets = useSafeAreaInsets();
|
|
18
21
|
|
|
@@ -30,6 +33,9 @@ const BottomSheet = ({
|
|
|
30
33
|
borderTopLeftRadius: 0,
|
|
31
34
|
borderTopRightRadius: 0,
|
|
32
35
|
paddingBottom: 20,
|
|
36
|
+
},
|
|
37
|
+
!fullScreen && tall && {
|
|
38
|
+
maxHeight: screenHeight * 0.92,
|
|
33
39
|
}
|
|
34
40
|
];
|
|
35
41
|
|
|
@@ -41,6 +47,9 @@ const BottomSheet = ({
|
|
|
41
47
|
borderTopLeftRadius: 0,
|
|
42
48
|
borderTopRightRadius: 0,
|
|
43
49
|
flex: 1,
|
|
50
|
+
},
|
|
51
|
+
!fullScreen && tall && {
|
|
52
|
+
maxHeight: screenHeight * 0.92,
|
|
44
53
|
}
|
|
45
54
|
];
|
|
46
55
|
|
|
@@ -56,11 +65,8 @@ const BottomSheet = ({
|
|
|
56
65
|
{};
|
|
57
66
|
|
|
58
67
|
const handleOverlayPress = () => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const handleModalPress = () => {
|
|
63
|
-
// Não faz nada - previne que o toque no modal feche o sheet
|
|
68
|
+
// Fecha apenas se não estiver em fullScreen
|
|
69
|
+
if (!fullScreen) setIsOpen(false);
|
|
64
70
|
};
|
|
65
71
|
|
|
66
72
|
return (
|
|
@@ -77,34 +83,36 @@ const BottomSheet = ({
|
|
|
77
83
|
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
78
84
|
style={{ flex: 1 }}
|
|
79
85
|
>
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
style={
|
|
89
|
-
>
|
|
90
|
-
<View style={modalContainerStyle}>
|
|
91
|
-
<View style={bottomSheetListStyle}>
|
|
86
|
+
<View style={overlayStyle}>
|
|
87
|
+
{/* Overlay absoluto atrás do conteúdo para capturar toques fora do modal */}
|
|
88
|
+
<Pressable
|
|
89
|
+
onPress={handleOverlayPress}
|
|
90
|
+
style={[StyleSheet.absoluteFill, { zIndex: 0 }]}
|
|
91
|
+
/>
|
|
92
|
+
{/* Conteúdo do modal acima do overlay para evitar interferência nos gestos */}
|
|
93
|
+
<View style={[modalContainerStyle, { zIndex: 1 }]}>
|
|
94
|
+
<View style={bottomSheetListStyle}>
|
|
92
95
|
{showHeader && (
|
|
93
96
|
<View style={[styles.modalHeader, fullScreen && { paddingTop: insets.top }]}>
|
|
94
97
|
<TouchableOpacity
|
|
95
98
|
onPress={() => setIsOpen(false)}
|
|
96
99
|
style={styles.closeButton}
|
|
97
100
|
>
|
|
98
|
-
<
|
|
101
|
+
<SEIcon name="close-line" size={20} color="#666666" />
|
|
99
102
|
</TouchableOpacity>
|
|
100
103
|
</View>
|
|
101
104
|
)}
|
|
102
105
|
|
|
103
106
|
{validTitle.length > 0 && (
|
|
104
107
|
<View style={styles.titleContainer}>
|
|
105
|
-
|
|
108
|
+
{headerIcon && (
|
|
109
|
+
<View style={styles.iconContainer}>
|
|
110
|
+
<SEIcon name={headerIcon} size={32} color="#2A4FDA" />
|
|
111
|
+
</View>
|
|
112
|
+
)}
|
|
113
|
+
<SEText bold campuni style={styles.modalTitle}>{validTitle}</SEText>
|
|
106
114
|
{validSubtitle.length > 0 && (
|
|
107
|
-
<
|
|
115
|
+
<SEText campuni style={styles.modalSubtitle}>{validSubtitle}</SEText>
|
|
108
116
|
)}
|
|
109
117
|
</View>
|
|
110
118
|
)}
|
|
@@ -114,16 +122,17 @@ const BottomSheet = ({
|
|
|
114
122
|
contentContainerStyle={styles.scrollContent}
|
|
115
123
|
style={scrollViewStyle}
|
|
116
124
|
keyboardShouldPersistTaps="handled"
|
|
117
|
-
bounces={Platform.OS === 'ios'}
|
|
125
|
+
bounces={Platform.OS === 'ios'}
|
|
126
|
+
nestedScrollEnabled
|
|
127
|
+
scrollEventThrottle={16}
|
|
118
128
|
>
|
|
119
129
|
<View style={styles.contentContainer}>
|
|
120
130
|
{children}
|
|
121
131
|
</View>
|
|
122
132
|
</ScrollView>
|
|
123
|
-
</View>
|
|
124
133
|
</View>
|
|
125
|
-
</
|
|
126
|
-
</
|
|
134
|
+
</View>
|
|
135
|
+
</View>
|
|
127
136
|
</KeyboardAvoidingView>
|
|
128
137
|
</Modal>
|
|
129
138
|
</View>
|
|
@@ -179,6 +188,15 @@ const styles = StyleSheet.create({
|
|
|
179
188
|
paddingBottom: 16,
|
|
180
189
|
alignItems: 'flex-start',
|
|
181
190
|
},
|
|
191
|
+
iconContainer: {
|
|
192
|
+
width: 48,
|
|
193
|
+
height: 48,
|
|
194
|
+
borderRadius: 24,
|
|
195
|
+
// alignItems: 'center',
|
|
196
|
+
// justifyContent: 'center',
|
|
197
|
+
marginBottom: 10,
|
|
198
|
+
marginTop:20,
|
|
199
|
+
},
|
|
182
200
|
modalTitle: {
|
|
183
201
|
fontSize: 24,
|
|
184
202
|
// fontWeight: '700',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useMemo, useState } from 'react';
|
|
2
2
|
import { TouchableOpacity, Text, StyleSheet, View } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import SEIcon from '../SEIcon';
|
|
4
|
+
import SEText from '../SEText';
|
|
4
5
|
|
|
5
6
|
const Button = ({
|
|
6
7
|
label,
|
|
@@ -13,17 +14,6 @@ const Button = ({
|
|
|
13
14
|
iconPosition = 'both',
|
|
14
15
|
expand = false,
|
|
15
16
|
iconColor,
|
|
16
|
-
// Novas props para flexibilidade
|
|
17
|
-
backgroundColor,
|
|
18
|
-
borderColor,
|
|
19
|
-
textColor,
|
|
20
|
-
borderWidth,
|
|
21
|
-
borderRadius,
|
|
22
|
-
borderStyle = 'solid', // 'solid', 'dashed', 'dotted', 'none'
|
|
23
|
-
customStyle, // Estilo customizado adicional
|
|
24
|
-
contentAlignment = 'center', // 'left', 'center', 'right'
|
|
25
|
-
fontSize,
|
|
26
|
-
fontWeight,
|
|
27
17
|
}) => {
|
|
28
18
|
const [isFocused, setIsFocused] = useState(false);
|
|
29
19
|
const iconOnly = useMemo(() => !label && iconName, [label, iconName]);
|
|
@@ -69,6 +59,16 @@ const Button = ({
|
|
|
69
59
|
styles.containerFocused
|
|
70
60
|
]
|
|
71
61
|
},
|
|
62
|
+
transparentColorBlack: {
|
|
63
|
+
active: styles.containerTertiary,
|
|
64
|
+
color: styles['labelOutlineBlack'],
|
|
65
|
+
disabled: styles.containerTransparentDisabled,
|
|
66
|
+
focused: [
|
|
67
|
+
styles.containerTransparentFocused,
|
|
68
|
+
styles[inverseStyle ? 'containerInverseFocused' : 'containerOutlineFocused'],
|
|
69
|
+
styles.containerFocused
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
72
|
highlighted: {
|
|
73
73
|
active: styles.containerHighlighted,
|
|
74
74
|
color: styles.labelHighlighted,
|
|
@@ -81,118 +81,33 @@ const Button = ({
|
|
|
81
81
|
disabled: [styles.containerDashedDisabled, styles.labelDashedDisabled],
|
|
82
82
|
focused: styles.containerDashedFocused,
|
|
83
83
|
},
|
|
84
|
-
danger: {
|
|
85
|
-
active: styles.containerDanger,
|
|
86
|
-
color: styles.labelDanger,
|
|
87
|
-
disabled: [styles.containerDangerDisabled, styles.labelDangerDisabled],
|
|
88
|
-
focused: styles.containerDangerFocused,
|
|
89
|
-
},
|
|
90
84
|
}
|
|
91
85
|
|
|
92
86
|
const getContainerStyle = () => {
|
|
93
87
|
const baseStyle = [styles.container];
|
|
94
88
|
|
|
95
89
|
// Tamanho
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
// Se o alinhamento não for center, aplicamos padding customizado
|
|
99
|
-
if (contentAlignment !== 'center' && !expand) {
|
|
100
|
-
// Adicionar apenas height, sem paddingHorizontal (exceto quando expand está ativo)
|
|
101
|
-
baseStyle.push({ height: sizeStyle.height });
|
|
102
|
-
} else {
|
|
103
|
-
// Usar o estilo completo quando centralizado ou quando expand está ativo
|
|
104
|
-
baseStyle.push(sizeStyle);
|
|
105
|
-
}
|
|
90
|
+
baseStyle.push(sizeOptions[size].container);
|
|
106
91
|
|
|
107
92
|
// Variante
|
|
108
93
|
baseStyle.push(variantOptions[variant][disabled ? 'disabled' : 'active']);
|
|
109
94
|
|
|
110
|
-
// Estilos customizados (aplicados antes do foco para permitir override)
|
|
111
|
-
const customContainerStyle = {};
|
|
112
|
-
if (backgroundColor) customContainerStyle.backgroundColor = backgroundColor;
|
|
113
|
-
if (borderRadius !== undefined) customContainerStyle.borderRadius = Number(borderRadius);
|
|
114
|
-
if (borderStyle) {
|
|
115
|
-
if (borderStyle === 'none') {
|
|
116
|
-
customContainerStyle.borderWidth = 0;
|
|
117
|
-
customContainerStyle.borderColor = 'transparent';
|
|
118
|
-
} else {
|
|
119
|
-
customContainerStyle.borderStyle = borderStyle;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// Estado de foco (aplicado apenas se borderColor não for customizado)
|
|
124
|
-
if (isFocused && !disabled && !borderColor) {
|
|
125
|
-
baseStyle.push(variantOptions[variant].focused);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// Ajustar padding baseado no alinhamento
|
|
129
|
-
if (contentAlignment === 'left' && !expand) {
|
|
130
|
-
customContainerStyle.paddingLeft = 0; // Padding zero na esquerda para colar completamente
|
|
131
|
-
customContainerStyle.paddingRight = sizeStyle.paddingHorizontal || 14; // Manter padding normal na direita
|
|
132
|
-
customContainerStyle.alignItems = 'flex-start'; // Alinhar todo o conteúdo à esquerda
|
|
133
|
-
customContainerStyle.justifyContent = 'flex-start'; // Remover centralização
|
|
134
|
-
} else if (contentAlignment === 'right' && !expand) {
|
|
135
|
-
customContainerStyle.paddingRight = 0; // Padding zero na direita para colar completamente
|
|
136
|
-
customContainerStyle.paddingLeft = sizeStyle.paddingHorizontal || 14; // Manter padding normal na esquerda
|
|
137
|
-
customContainerStyle.alignItems = 'flex-end'; // Alinhar todo o conteúdo à direita
|
|
138
|
-
customContainerStyle.justifyContent = 'flex-end'; // Remover centralização
|
|
139
|
-
}
|
|
140
95
|
|
|
141
|
-
//
|
|
142
|
-
if (
|
|
143
|
-
|
|
144
|
-
}
|
|
96
|
+
// Estado
|
|
97
|
+
// if (disabled) baseStyle.push(styles.containerDisabled);
|
|
98
|
+
if (isFocused && !disabled) baseStyle.push(variantOptions[variant].focused);
|
|
145
99
|
|
|
146
|
-
// Estilo customizado adicional
|
|
147
|
-
if (customStyle) {
|
|
148
|
-
baseStyle.push(customStyle);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// borderColor e borderWidth aplicados por último para garantir prioridade absoluta
|
|
152
|
-
const finalBorderStyle = {};
|
|
153
|
-
if (borderColor) finalBorderStyle.borderColor = borderColor;
|
|
154
|
-
if (borderWidth !== undefined) finalBorderStyle.borderWidth = Number(borderWidth);
|
|
155
|
-
if (Object.keys(finalBorderStyle).length > 0) {
|
|
156
|
-
baseStyle.push(finalBorderStyle);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
return baseStyle;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
const getContentContainerStyle = () => {
|
|
163
|
-
const baseStyle = [styles.contentContainer];
|
|
164
|
-
// O alinhamento agora é controlado pelo container principal
|
|
165
100
|
return baseStyle;
|
|
166
101
|
};
|
|
167
102
|
|
|
168
103
|
const getLabelStyle = () => {
|
|
169
104
|
const baseStyle = [styles.label];
|
|
170
105
|
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
baseStyle.push(styles.labelOutline);
|
|
174
|
-
} else if (variant === 'danger') {
|
|
175
|
-
baseStyle.push(styles.labelDanger);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// Aplicar estilo de disabled
|
|
179
|
-
if (disabled) {
|
|
180
|
-
baseStyle.push(styles.labelDisabled);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// Aplicar textColor se fornecido e não estiver desabilitado (tem prioridade máxima)
|
|
184
|
-
if (textColor && !disabled) {
|
|
185
|
-
baseStyle.push({ color: textColor });
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// Aplicar fontSize e fontWeight customizados
|
|
189
|
-
const customTextStyle = {};
|
|
190
|
-
if (fontSize) customTextStyle.fontSize = fontSize;
|
|
191
|
-
if (fontWeight) customTextStyle.fontWeight = fontWeight;
|
|
106
|
+
// Variante
|
|
107
|
+
baseStyle.push(variantOptions[variant].color);
|
|
192
108
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
109
|
+
// Estado
|
|
110
|
+
if (disabled) baseStyle.push(styles.labelDisabled);
|
|
196
111
|
|
|
197
112
|
return baseStyle;
|
|
198
113
|
};
|
|
@@ -212,7 +127,6 @@ const Button = ({
|
|
|
212
127
|
|
|
213
128
|
const getIconColor = () => {
|
|
214
129
|
if (iconColor) return iconColor;
|
|
215
|
-
if (textColor && !disabled) return textColor; // Usar textColor se fornecido
|
|
216
130
|
if (disabled) return styles.labelDisabled.color;
|
|
217
131
|
if (variant === 'filled') return inverseStyle ? styles.labelInverse.color : styles.label.color;
|
|
218
132
|
|
|
@@ -221,10 +135,8 @@ const Button = ({
|
|
|
221
135
|
|
|
222
136
|
const renderIcon = () => {
|
|
223
137
|
if (!iconName) return null;
|
|
224
|
-
|
|
225
|
-
// Usar espaçamento padrão do ícone sempre
|
|
226
138
|
return (
|
|
227
|
-
<
|
|
139
|
+
<SEIcon
|
|
228
140
|
name={iconName}
|
|
229
141
|
size={getIconSize()}
|
|
230
142
|
color={getIconColor()}
|
|
@@ -238,10 +150,7 @@ const Button = ({
|
|
|
238
150
|
style={[
|
|
239
151
|
getContainerStyle(),
|
|
240
152
|
iconOnly && styles.iconOnlyContainer,
|
|
241
|
-
expand && styles.expand
|
|
242
|
-
// Aplicar borderColor e borderWidth como último estilo para máxima prioridade
|
|
243
|
-
borderColor && { borderColor },
|
|
244
|
-
borderWidth !== undefined && { borderWidth: Number(borderWidth) }
|
|
153
|
+
expand && styles.expand
|
|
245
154
|
]}
|
|
246
155
|
onPress={onPress}
|
|
247
156
|
disabled={disabled}
|
|
@@ -249,7 +158,7 @@ const Button = ({
|
|
|
249
158
|
onPressOut={() => setIsFocused(false)}
|
|
250
159
|
activeOpacity={0.95}
|
|
251
160
|
>
|
|
252
|
-
<View style={
|
|
161
|
+
<View style={styles.contentContainer}>
|
|
253
162
|
{iconOnly && renderIcon()}
|
|
254
163
|
|
|
255
164
|
{!iconOnly && (
|
|
@@ -259,7 +168,7 @@ const Button = ({
|
|
|
259
168
|
iconPosition === 'both') &&
|
|
260
169
|
renderIcon()
|
|
261
170
|
}
|
|
262
|
-
<
|
|
171
|
+
<SEText bold campuni style={getLabelStyle()}>{label}</SEText>
|
|
263
172
|
{(
|
|
264
173
|
iconPosition === 'right' ||
|
|
265
174
|
iconPosition === 'both') &&
|
|
@@ -275,8 +184,6 @@ const Button = ({
|
|
|
275
184
|
const styles = StyleSheet.create({
|
|
276
185
|
contentContainer: {
|
|
277
186
|
flexDirection: 'row',
|
|
278
|
-
alignItems: 'center',
|
|
279
|
-
flex: 1, // Volta a ocupar toda a largura disponível
|
|
280
187
|
},
|
|
281
188
|
container: {
|
|
282
189
|
alignItems: 'center',
|
|
@@ -285,7 +192,8 @@ const styles = StyleSheet.create({
|
|
|
285
192
|
borderWidth: 2,
|
|
286
193
|
},
|
|
287
194
|
containerFilled: {
|
|
288
|
-
|
|
195
|
+
borderWidth: 0,
|
|
196
|
+
// borderColor: '#2A4FDA',
|
|
289
197
|
backgroundColor: '#2A4FDA',
|
|
290
198
|
},
|
|
291
199
|
containerInverse: {
|
|
@@ -326,16 +234,16 @@ const styles = StyleSheet.create({
|
|
|
326
234
|
borderColor: '#193ABB',
|
|
327
235
|
},
|
|
328
236
|
containerLarge: {
|
|
329
|
-
height: 56,
|
|
330
|
-
paddingHorizontal:
|
|
237
|
+
height: 56,
|
|
238
|
+
paddingHorizontal: 16,
|
|
331
239
|
},
|
|
332
240
|
containerMedium: {
|
|
333
|
-
height:
|
|
334
|
-
paddingHorizontal:
|
|
241
|
+
height: 40,
|
|
242
|
+
paddingHorizontal: 14,
|
|
335
243
|
},
|
|
336
244
|
containerSmall: {
|
|
337
|
-
height:
|
|
338
|
-
paddingHorizontal:
|
|
245
|
+
height: 32,
|
|
246
|
+
paddingHorizontal: 12,
|
|
339
247
|
},
|
|
340
248
|
icon: {
|
|
341
249
|
paddingHorizontal: 16,
|
|
@@ -351,10 +259,10 @@ const styles = StyleSheet.create({
|
|
|
351
259
|
aspectRatio: 1,
|
|
352
260
|
},
|
|
353
261
|
label: {
|
|
262
|
+
|
|
354
263
|
fontSize: 14,
|
|
355
|
-
fontWeight: '500',
|
|
264
|
+
// fontWeight: '500',
|
|
356
265
|
color: '#E7F79E',
|
|
357
|
-
fontFamily: 'Nunito Sans',
|
|
358
266
|
},
|
|
359
267
|
labelLight: {
|
|
360
268
|
color: '#FFFFFF',
|
|
@@ -368,6 +276,9 @@ const styles = StyleSheet.create({
|
|
|
368
276
|
labelOutline: {
|
|
369
277
|
color: '#4F7CFE',
|
|
370
278
|
},
|
|
279
|
+
labelOutlineBlack: {
|
|
280
|
+
color: '#1B244B',
|
|
281
|
+
},
|
|
371
282
|
labelOutlineDisabled: {
|
|
372
283
|
color: '#C0C9E5',
|
|
373
284
|
},
|
|
@@ -444,35 +355,9 @@ const styles = StyleSheet.create({
|
|
|
444
355
|
labelDashedDisabled: {
|
|
445
356
|
color: '#C0C9E5',
|
|
446
357
|
},
|
|
447
|
-
// Variação Danger (baseada no Figma)
|
|
448
|
-
containerDanger: {
|
|
449
|
-
backgroundColor: '#FFE5E5',
|
|
450
|
-
borderColor: 'transparent',
|
|
451
|
-
borderWidth: 0,
|
|
452
|
-
},
|
|
453
|
-
labelDanger: {
|
|
454
|
-
color: '#B20000',
|
|
455
|
-
fontWeight: '500',
|
|
456
|
-
},
|
|
457
|
-
containerDangerDisabled: {
|
|
458
|
-
backgroundColor: '#F5F5F5',
|
|
459
|
-
borderColor: 'transparent',
|
|
460
|
-
},
|
|
461
|
-
labelDangerDisabled: {
|
|
462
|
-
color: '#BFBFBF',
|
|
463
|
-
},
|
|
464
|
-
containerDangerFocused: {
|
|
465
|
-
backgroundColor: '#FFD5D5',
|
|
466
|
-
borderColor: '#B20000',
|
|
467
|
-
borderWidth: 1,
|
|
468
|
-
outlineWidth: 2,
|
|
469
|
-
outlineStyle: 'solid',
|
|
470
|
-
outlineColor: '#FF6B6B',
|
|
471
|
-
},
|
|
472
358
|
expand: {
|
|
473
359
|
width: '100%',
|
|
474
360
|
alignSelf: 'stretch',
|
|
475
|
-
minWidth: 100, // Garantir largura mínima para o botão aparecer
|
|
476
361
|
},
|
|
477
362
|
});
|
|
478
363
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { View, TextInput, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
+
import SelectItem from '../SelectItem';
|
|
3
4
|
import ScrollBar from '../ScrollBar';
|
|
4
|
-
import SelectItem from '../SelectItem';
|
|
5
5
|
import Icon from '../Icon';
|
|
6
6
|
|
|
7
7
|
const CustomCheckbox = ({ selected, iconColor, size = 21 }) => {
|
|
@@ -67,7 +67,7 @@ const FilterableMultiSelect = ({
|
|
|
67
67
|
|
|
68
68
|
return (
|
|
69
69
|
<View style={styles.container}>
|
|
70
|
-
<View
|
|
70
|
+
<View>
|
|
71
71
|
<View style={[
|
|
72
72
|
styles.inputWrapper,
|
|
73
73
|
isActive && styles.inputWrapperActive
|
|
@@ -105,11 +105,22 @@ const FilterableMultiSelect = ({
|
|
|
105
105
|
style={styles.scroll}
|
|
106
106
|
barColor="#C9D5FF"
|
|
107
107
|
barThickness={6}
|
|
108
|
-
height={464}
|
|
109
108
|
>
|
|
110
|
-
|
|
109
|
+
{/* Ajuste AQUI: Remova ou condicione o paddingBottom.
|
|
110
|
+
Manter um paddingVertical ou marginBottom no último item pode ser mais limpo.
|
|
111
|
+
Vamos remover o paddingBottom da View e garantir que o último item não tenha marginBottom se for o último.
|
|
112
|
+
Alternativamente, podemos colocar um padding bottom no ScrollBar, se ele não for interferir com a barra de rolagem.
|
|
113
|
+
*/}
|
|
114
|
+
<View style={{ paddingRight: 5 }}> {/* Removido paddingBottom: 16 */}
|
|
111
115
|
{filteredOptions.map((option, idx) => (
|
|
112
|
-
<View
|
|
116
|
+
<View
|
|
117
|
+
key={option.value}
|
|
118
|
+
style={{
|
|
119
|
+
width: '100%',
|
|
120
|
+
// Adiciona marginBottom apenas se não for o último item
|
|
121
|
+
marginBottom: idx === filteredOptions.length - 1 ? 0 : 8,
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
113
124
|
<TouchableOpacity
|
|
114
125
|
style={{
|
|
115
126
|
flexDirection: 'row',
|
|
@@ -149,7 +160,7 @@ const FilterableMultiSelect = ({
|
|
|
149
160
|
|
|
150
161
|
const styles = StyleSheet.create({
|
|
151
162
|
container: {
|
|
152
|
-
width: '
|
|
163
|
+
width: '100%',
|
|
153
164
|
alignSelf: 'center',
|
|
154
165
|
backgroundColor: '#fff',
|
|
155
166
|
borderRadius: 8,
|
|
@@ -158,14 +169,11 @@ const styles = StyleSheet.create({
|
|
|
158
169
|
},
|
|
159
170
|
inputWrapper: {
|
|
160
171
|
position: 'relative',
|
|
161
|
-
|
|
162
|
-
borderRadius: 11,
|
|
163
|
-
borderWidth: 3,
|
|
164
|
-
borderColor: 'transparent',
|
|
172
|
+
borderRadius: 8,
|
|
165
173
|
marginBottom: 24,
|
|
166
174
|
},
|
|
167
175
|
inputWrapperActive: {
|
|
168
|
-
|
|
176
|
+
// Remove borda do wrapper para evitar duplicação
|
|
169
177
|
},
|
|
170
178
|
input: {
|
|
171
179
|
width: '100%',
|
|
@@ -184,14 +192,17 @@ const styles = StyleSheet.create({
|
|
|
184
192
|
marginBottom: 0,
|
|
185
193
|
},
|
|
186
194
|
inputActive: {
|
|
187
|
-
|
|
195
|
+
borderWidth: 2,
|
|
196
|
+
borderColor: '#2A4FDA',
|
|
188
197
|
color: '#1B244B',
|
|
189
198
|
},
|
|
190
199
|
scroll: {
|
|
191
|
-
paddingTop:
|
|
200
|
+
paddingTop: 0,
|
|
192
201
|
flex: 1,
|
|
193
|
-
minHeight:
|
|
202
|
+
minHeight: 0,
|
|
194
203
|
paddingRight: 5,
|
|
204
|
+
// Podemos adicionar um paddingBottom aqui se necessário,
|
|
205
|
+
// mas é melhor que os próprios itens controlem seu espaçamento.
|
|
195
206
|
},
|
|
196
207
|
});
|
|
197
208
|
|