vpt-sebraeds 0.0.62 → 0.0.63
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/ListItem/index.jsx +17 -7
- package/components/Shortcut/index.jsx +36 -31
- package/dist/components/ListItem/index.d.ts.map +1 -1
- package/dist/components/ListItem/index.js +13 -3
- package/dist/components/Shortcut/index.d.ts.map +1 -1
- package/dist/components/Shortcut/index.js +19 -14
- package/package.json +2 -2
|
@@ -92,11 +92,13 @@ const ListItem = ({
|
|
|
92
92
|
hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}
|
|
93
93
|
style={styles.bookmarkButton}
|
|
94
94
|
>
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
<View style={styles.bookmarkCircle}>
|
|
96
|
+
<RemixIcon
|
|
97
|
+
name={bookmarked ? 'bookmark-fill' : 'bookmark-line'}
|
|
98
|
+
size={16}
|
|
99
|
+
color="#687499"
|
|
100
|
+
/>
|
|
101
|
+
</View>
|
|
100
102
|
</TouchableOpacity>
|
|
101
103
|
)}
|
|
102
104
|
|
|
@@ -186,8 +188,16 @@ const styles = StyleSheet.create({
|
|
|
186
188
|
},
|
|
187
189
|
bookmarkButton: {
|
|
188
190
|
position: 'absolute',
|
|
189
|
-
top:
|
|
190
|
-
right:
|
|
191
|
+
top: 12,
|
|
192
|
+
right: 12,
|
|
193
|
+
},
|
|
194
|
+
bookmarkCircle: {
|
|
195
|
+
width: 24,
|
|
196
|
+
height: 24,
|
|
197
|
+
borderRadius: 12,
|
|
198
|
+
backgroundColor: '#F7F9FF',
|
|
199
|
+
alignItems: 'center',
|
|
200
|
+
justifyContent: 'center',
|
|
191
201
|
},
|
|
192
202
|
arrowButton: {
|
|
193
203
|
position: 'absolute',
|
|
@@ -191,34 +191,36 @@ const Shortcut = ({
|
|
|
191
191
|
};
|
|
192
192
|
|
|
193
193
|
return (
|
|
194
|
-
<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
194
|
+
<View style={styles.wrapper}>
|
|
195
|
+
<TouchableOpacity
|
|
196
|
+
style={[
|
|
197
|
+
styles.container,
|
|
198
|
+
containerStyle,
|
|
199
|
+
customContainerStyle,
|
|
200
|
+
isFocused && getContainerStyle(variant),
|
|
201
|
+
style
|
|
202
|
+
]}
|
|
203
|
+
onPress={onPress}
|
|
204
|
+
onPressIn={() => setIsFocused(true)}
|
|
205
|
+
onPressOut={() => setIsFocused(false)}
|
|
206
|
+
activeOpacity={0.95}
|
|
207
|
+
>
|
|
208
|
+
<Icon name={finalIconName} size={32} color={finalIconColor} style={styles.icon} />
|
|
209
|
+
<SEText
|
|
210
|
+
type="ns-sm-body-bold"
|
|
211
|
+
style={[styles.label, { color: finalLabelColor }]}
|
|
212
|
+
numberOfLines={2}
|
|
213
|
+
ellipsizeMode="tail"
|
|
214
|
+
>
|
|
215
|
+
{label}
|
|
216
|
+
</SEText>
|
|
217
|
+
</TouchableOpacity>
|
|
207
218
|
{badge && (
|
|
208
|
-
<View style={[styles.badge, { backgroundColor: v.badge.backgroundColor }]}>
|
|
219
|
+
<View pointerEvents="none" style={[styles.badge, { backgroundColor: v.badge.backgroundColor }]}>
|
|
209
220
|
<SEText type="ns-sm-body-semibold" style={[styles.badgeText, { color: v.badge.color }]}>{badge}</SEText>
|
|
210
221
|
</View>
|
|
211
222
|
)}
|
|
212
|
-
|
|
213
|
-
<SEText
|
|
214
|
-
type="ns-sm-body-bold"
|
|
215
|
-
style={[styles.label, { color: finalLabelColor }]}
|
|
216
|
-
numberOfLines={2}
|
|
217
|
-
ellipsizeMode="tail"
|
|
218
|
-
>
|
|
219
|
-
{label}
|
|
220
|
-
</SEText>
|
|
221
|
-
</TouchableOpacity>
|
|
223
|
+
</View>
|
|
222
224
|
);
|
|
223
225
|
};
|
|
224
226
|
|
|
@@ -231,18 +233,21 @@ const getContainerStyle = (variant) => {
|
|
|
231
233
|
}
|
|
232
234
|
|
|
233
235
|
const styles = StyleSheet.create({
|
|
236
|
+
wrapper: {
|
|
237
|
+
margin: 8,
|
|
238
|
+
overflow: 'hidden',
|
|
239
|
+
borderRadius: 12,
|
|
240
|
+
},
|
|
234
241
|
container: {
|
|
235
242
|
width: 128,
|
|
236
243
|
height: 120,
|
|
237
244
|
borderRadius: 12,
|
|
238
|
-
justifyContent: 'space-between',
|
|
239
|
-
margin: 8,
|
|
245
|
+
justifyContent: 'space-between',
|
|
240
246
|
borderWidth: 2,
|
|
241
247
|
borderColor: '#001A70',
|
|
242
248
|
padding: 16,
|
|
243
|
-
position: 'relative',
|
|
244
249
|
backgroundColor: '#001A70',
|
|
245
|
-
overflow: '
|
|
250
|
+
overflow: 'hidden',
|
|
246
251
|
},
|
|
247
252
|
containerWide: {
|
|
248
253
|
width: 156, // Mantém a mesma altura e ajusta largura para aspect ratio 39/34
|
|
@@ -259,11 +264,11 @@ const styles = StyleSheet.create({
|
|
|
259
264
|
},
|
|
260
265
|
badge: {
|
|
261
266
|
position: 'absolute',
|
|
262
|
-
top: -
|
|
263
|
-
right: -
|
|
267
|
+
top: -1,
|
|
268
|
+
right: -1,
|
|
264
269
|
paddingHorizontal: 12,
|
|
265
270
|
paddingVertical: 4,
|
|
266
|
-
borderTopRightRadius:
|
|
271
|
+
borderTopRightRadius: 14,
|
|
267
272
|
borderBottomLeftRadius: 8,
|
|
268
273
|
zIndex: 2,
|
|
269
274
|
minWidth: 40,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ListItem/index.jsx"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,+JAVW,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ListItem/index.jsx"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,+JAVW,MAAM,qBAiGhB;kBArH+B,OAAO"}
|
|
@@ -57,7 +57,9 @@ const ListItem = ({ title = '', descriptions = [], imageSource, selected = false
|
|
|
57
57
|
|
|
58
58
|
{/* Bookmark (top-right) */}
|
|
59
59
|
{showBookmark && !selected && (<TouchableOpacity onPress={onBookmarkPress} hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }} style={styles.bookmarkButton}>
|
|
60
|
-
<
|
|
60
|
+
<View style={styles.bookmarkCircle}>
|
|
61
|
+
<RemixIcon name={bookmarked ? 'bookmark-fill' : 'bookmark-line'} size={16} color="#687499"/>
|
|
62
|
+
</View>
|
|
61
63
|
</TouchableOpacity>)}
|
|
62
64
|
|
|
63
65
|
{/* Arrow (bottom-right) */}
|
|
@@ -138,8 +140,16 @@ const styles = StyleSheet.create({
|
|
|
138
140
|
},
|
|
139
141
|
bookmarkButton: {
|
|
140
142
|
position: 'absolute',
|
|
141
|
-
top:
|
|
142
|
-
right:
|
|
143
|
+
top: 12,
|
|
144
|
+
right: 12,
|
|
145
|
+
},
|
|
146
|
+
bookmarkCircle: {
|
|
147
|
+
width: 24,
|
|
148
|
+
height: 24,
|
|
149
|
+
borderRadius: 12,
|
|
150
|
+
backgroundColor: '#F7F9FF',
|
|
151
|
+
alignItems: 'center',
|
|
152
|
+
justifyContent: 'center',
|
|
143
153
|
},
|
|
144
154
|
arrowButton: {
|
|
145
155
|
position: 'absolute',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Shortcut/index.jsx"],"names":[],"mappings":";AAwIA;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Shortcut/index.jsx"],"names":[],"mappings":";AAwIA;;;;;;;;;;;;;sBAwFC;kBAhO+B,OAAO"}
|
|
@@ -171,21 +171,23 @@ iconColor = null, labelColor = null, borderColor = null, backgroundColor = null,
|
|
|
171
171
|
borderColor: finalBorderColor,
|
|
172
172
|
backgroundColor: finalBackgroundColor,
|
|
173
173
|
};
|
|
174
|
-
return (<
|
|
174
|
+
return (<View style={styles.wrapper}>
|
|
175
|
+
<TouchableOpacity style={[
|
|
175
176
|
styles.container,
|
|
176
177
|
containerStyle,
|
|
177
178
|
customContainerStyle,
|
|
178
179
|
isFocused && getContainerStyle(variant),
|
|
179
180
|
style
|
|
180
181
|
]} onPress={onPress} onPressIn={() => setIsFocused(true)} onPressOut={() => setIsFocused(false)} activeOpacity={0.95}>
|
|
181
|
-
|
|
182
|
+
<Icon name={finalIconName} size={32} color={finalIconColor} style={styles.icon}/>
|
|
183
|
+
<SEText type="ns-sm-body-bold" style={[styles.label, { color: finalLabelColor }]} numberOfLines={2} ellipsizeMode="tail">
|
|
184
|
+
{label}
|
|
185
|
+
</SEText>
|
|
186
|
+
</TouchableOpacity>
|
|
187
|
+
{badge && (<View pointerEvents="none" style={[styles.badge, { backgroundColor: v.badge.backgroundColor }]}>
|
|
182
188
|
<SEText type="ns-sm-body-semibold" style={[styles.badgeText, { color: v.badge.color }]}>{badge}</SEText>
|
|
183
189
|
</View>)}
|
|
184
|
-
|
|
185
|
-
<SEText type="ns-sm-body-bold" style={[styles.label, { color: finalLabelColor }]} numberOfLines={2} ellipsizeMode="tail">
|
|
186
|
-
{label}
|
|
187
|
-
</SEText>
|
|
188
|
-
</TouchableOpacity>);
|
|
190
|
+
</View>);
|
|
189
191
|
};
|
|
190
192
|
const getContainerStyle = (variant) => {
|
|
191
193
|
if (variant === 'filled' || variant === 'filledAlt') {
|
|
@@ -196,18 +198,21 @@ const getContainerStyle = (variant) => {
|
|
|
196
198
|
}
|
|
197
199
|
};
|
|
198
200
|
const styles = StyleSheet.create({
|
|
201
|
+
wrapper: {
|
|
202
|
+
margin: 8,
|
|
203
|
+
overflow: 'hidden',
|
|
204
|
+
borderRadius: 12,
|
|
205
|
+
},
|
|
199
206
|
container: {
|
|
200
207
|
width: 128,
|
|
201
208
|
height: 120,
|
|
202
209
|
borderRadius: 12,
|
|
203
|
-
justifyContent: 'space-between',
|
|
204
|
-
margin: 8,
|
|
210
|
+
justifyContent: 'space-between',
|
|
205
211
|
borderWidth: 2,
|
|
206
212
|
borderColor: '#001A70',
|
|
207
213
|
padding: 16,
|
|
208
|
-
position: 'relative',
|
|
209
214
|
backgroundColor: '#001A70',
|
|
210
|
-
overflow: '
|
|
215
|
+
overflow: 'hidden',
|
|
211
216
|
},
|
|
212
217
|
containerWide: {
|
|
213
218
|
width: 156, // Mantém a mesma altura e ajusta largura para aspect ratio 39/34
|
|
@@ -224,11 +229,11 @@ const styles = StyleSheet.create({
|
|
|
224
229
|
},
|
|
225
230
|
badge: {
|
|
226
231
|
position: 'absolute',
|
|
227
|
-
top: -
|
|
228
|
-
right: -
|
|
232
|
+
top: -1,
|
|
233
|
+
right: -1,
|
|
229
234
|
paddingHorizontal: 12,
|
|
230
235
|
paddingVertical: 4,
|
|
231
|
-
borderTopRightRadius:
|
|
236
|
+
borderTopRightRadius: 14,
|
|
232
237
|
borderBottomLeftRadius: 8,
|
|
233
238
|
zIndex: 2,
|
|
234
239
|
minWidth: 40,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vpt-sebraeds",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.63",
|
|
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",
|
|
@@ -122,4 +122,4 @@
|
|
|
122
122
|
"react-native-web": "^0.20.0"
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
}
|
|
125
|
+
}
|