vpt-sebraeds 0.0.13 → 0.0.15
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/iconEnums.ts +262 -8
- package/components/Icon/index.jsx +13 -2
- package/components/NavigationItem/index.tsx +33 -44
- package/components/SEText/index.d.ts +15 -2
- package/dist/components/Icon/iconEnums.d.ts +1 -1
- package/dist/components/Icon/iconEnums.d.ts.map +1 -1
- package/dist/components/Icon/iconEnums.js +262 -8
- package/dist/components/Icon/index.d.ts +1 -1
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +15 -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 +16 -31
- package/package.json +3 -3
|
@@ -1,30 +1,284 @@
|
|
|
1
1
|
|
|
2
2
|
export const iconEnums = [
|
|
3
|
+
'account-circle-fill',
|
|
4
|
+
'add-circle-fill',
|
|
3
5
|
'add-circle-line',
|
|
6
|
+
'add-fill',
|
|
7
|
+
'add-line',
|
|
8
|
+
'alert-line',
|
|
9
|
+
'arrow-down-circle-fill',
|
|
10
|
+
'arrow-down-fill',
|
|
11
|
+
'arrow-down-line',
|
|
12
|
+
'arrow-down-s-fill',
|
|
13
|
+
'arrow-down-s-line',
|
|
14
|
+
'arrow-drop-down-line',
|
|
15
|
+
'arrow-drop-up-line',
|
|
16
|
+
'arrow-left-circle-line',
|
|
17
|
+
'arrow-left-line',
|
|
18
|
+
'arrow-left-s-line',
|
|
4
19
|
'arrow-right-line',
|
|
20
|
+
'arrow-right-s-line',
|
|
21
|
+
'arrow-right-up-line',
|
|
22
|
+
'arrow-up-circle-fill',
|
|
23
|
+
'arrow-up-fill',
|
|
24
|
+
'arrow-up-line',
|
|
5
25
|
'arrow-up-s-line',
|
|
6
|
-
'
|
|
26
|
+
'at-line',
|
|
27
|
+
'attachment-2',
|
|
28
|
+
'bank-card-fill',
|
|
29
|
+
'bank-line',
|
|
30
|
+
'bar-chart-box-line',
|
|
31
|
+
'bar-chart-grouped-fill',
|
|
32
|
+
'bar-chart-grouped-line',
|
|
7
33
|
'barcode-line',
|
|
34
|
+
'bookmark-fill',
|
|
35
|
+
'bookmark-line',
|
|
36
|
+
'briefcase-2-line',
|
|
37
|
+
'briefcase-fill',
|
|
38
|
+
'brush-2-line',
|
|
39
|
+
'building-2-line',
|
|
40
|
+
'calculator-line',
|
|
41
|
+
'calendar-2-line',
|
|
42
|
+
'calendar-check-line',
|
|
43
|
+
'calendar-event-line',
|
|
44
|
+
'calendar-line',
|
|
45
|
+
'calendar-todo-fill',
|
|
46
|
+
'camera-2-line',
|
|
47
|
+
'camera-line',
|
|
48
|
+
'camera-off-line',
|
|
8
49
|
'chat-3-line',
|
|
50
|
+
'chat-ai-line',
|
|
51
|
+
'chat-heart-line',
|
|
52
|
+
'chat-history-line',
|
|
53
|
+
'checkbox-blank-circle-fill',
|
|
54
|
+
'checkbox-blank-line',
|
|
55
|
+
'checkbox-circle-fill',
|
|
56
|
+
'checkbox-circle-line',
|
|
57
|
+
'checkbox-fill',
|
|
58
|
+
'checkbox-line',
|
|
59
|
+
'check-fill',
|
|
9
60
|
'check-line',
|
|
61
|
+
'chevron-down',
|
|
62
|
+
'chevron-left',
|
|
63
|
+
'chevron-small-left',
|
|
64
|
+
'chevron-small-right',
|
|
65
|
+
'chevron-up',
|
|
66
|
+
'close-circle-fill',
|
|
67
|
+
'close-circle-line',
|
|
68
|
+
'closecircleo',
|
|
69
|
+
'close-fill',
|
|
10
70
|
'close-line',
|
|
71
|
+
'coins-line',
|
|
72
|
+
'community-line',
|
|
73
|
+
'compass-fill',
|
|
74
|
+
'computer-line',
|
|
75
|
+
'customer-service-2-fill',
|
|
76
|
+
'delete-bin-2-line',
|
|
77
|
+
'delete-bin-5-line',
|
|
78
|
+
'delete-bin-7-line',
|
|
79
|
+
'delete-bin-line',
|
|
80
|
+
'design-line',
|
|
81
|
+
'download-2-line',
|
|
11
82
|
'download-line',
|
|
83
|
+
'draft-line',
|
|
84
|
+
'drag-drop-line',
|
|
85
|
+
'earth-line',
|
|
86
|
+
'edit-2-line',
|
|
12
87
|
'edit-line',
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
88
|
+
'emotion-2-line',
|
|
89
|
+
'emotion-happy-line',
|
|
90
|
+
'emotion-line',
|
|
91
|
+
'emotion-normal-line',
|
|
92
|
+
'emotion-unhappy-line',
|
|
93
|
+
'equalizer-line',
|
|
94
|
+
'error-warning-fill',
|
|
95
|
+
'error-warning-line',
|
|
96
|
+
'exchange-dollar-line',
|
|
97
|
+
'external-link-line',
|
|
98
|
+
'facebook-box-fill',
|
|
99
|
+
'facebook-circle-fill',
|
|
100
|
+
'facebook-circle-line',
|
|
101
|
+
'facebook-fill',
|
|
17
102
|
'file-copy-2-line',
|
|
18
|
-
'
|
|
19
|
-
'
|
|
103
|
+
'file-copy-line',
|
|
104
|
+
'file-list-3-line',
|
|
105
|
+
'file-pdf-line',
|
|
106
|
+
'file-text',
|
|
107
|
+
'filter-3-line',
|
|
108
|
+
'folder-download-line',
|
|
109
|
+
'folder-shared-line',
|
|
110
|
+
'funds-line',
|
|
111
|
+
'google-line',
|
|
112
|
+
'google-play-fill',
|
|
113
|
+
'group-line',
|
|
114
|
+
'guide-line',
|
|
115
|
+
'heart-3-line',
|
|
116
|
+
'heart-fill',
|
|
117
|
+
'heart-line',
|
|
118
|
+
'history-line',
|
|
119
|
+
'home-4-line',
|
|
20
120
|
'home-fill',
|
|
21
121
|
'home-line',
|
|
122
|
+
'hotel-line',
|
|
123
|
+
'image-2-line',
|
|
124
|
+
'indeterminate-circle-line',
|
|
22
125
|
'information-line',
|
|
126
|
+
'instagram-fill',
|
|
127
|
+
'instagram-line',
|
|
128
|
+
'lightbulb-line',
|
|
129
|
+
'like2',
|
|
130
|
+
'line-chart-line',
|
|
131
|
+
'linkedin-box-fill',
|
|
132
|
+
'linkedin-fill',
|
|
133
|
+
'list-check-2',
|
|
134
|
+
'list-settings-line',
|
|
135
|
+
'list-unordered',
|
|
136
|
+
'loader-3-fill',
|
|
137
|
+
'loader-3-line',
|
|
138
|
+
'loader-4-line',
|
|
139
|
+
'locked',
|
|
140
|
+
'lock-line',
|
|
141
|
+
'logout-box-line',
|
|
142
|
+
'magnifying-glass',
|
|
143
|
+
'mail-line',
|
|
144
|
+
'map-2-fill',
|
|
145
|
+
'map-2-line',
|
|
146
|
+
'map-pin-2-line',
|
|
147
|
+
'map-pin-line',
|
|
148
|
+
'medal-line',
|
|
149
|
+
'menu-2-fill',
|
|
150
|
+
'menu-2-line',
|
|
151
|
+
'money-dollar-circle-fill',
|
|
152
|
+
'money-dollar-circle-line',
|
|
153
|
+
'more-2-fill',
|
|
23
154
|
'more-2-line',
|
|
24
155
|
'notification-2-line',
|
|
156
|
+
'notification-line',
|
|
157
|
+
'pencil-fill',
|
|
158
|
+
'pencil-line',
|
|
159
|
+
'pen-nib-line',
|
|
160
|
+
'percent-line',
|
|
161
|
+
'phone-fill',
|
|
162
|
+
'phone-line',
|
|
163
|
+
'pie-chart-2-line',
|
|
164
|
+
'pinterest-fill',
|
|
165
|
+
'play-circle-line',
|
|
166
|
+
'play-fill',
|
|
167
|
+
'price-tag-3-line',
|
|
168
|
+
'price-tag-line',
|
|
169
|
+
'profile-fill',
|
|
170
|
+
'pushpin-line',
|
|
171
|
+
'qr-code-fill',
|
|
172
|
+
'qr-code-line',
|
|
173
|
+
'question-answer-fill',
|
|
174
|
+
'question-fill',
|
|
175
|
+
'question-line',
|
|
176
|
+
'question-mark',
|
|
177
|
+
'refresh-line',
|
|
178
|
+
'reset-left-line',
|
|
179
|
+
'restart-line',
|
|
180
|
+
'ri-add-circle-line',
|
|
181
|
+
'ri-add-line',
|
|
182
|
+
'ri-alert-fill',
|
|
183
|
+
'ri-alert-line',
|
|
184
|
+
'ri-align-justify',
|
|
185
|
+
'ri-arrow-down-circle-line',
|
|
186
|
+
'ri-arrow-drop-down-line',
|
|
187
|
+
'ri-arrow-go-back-line',
|
|
188
|
+
'ri-arrow-left-line',
|
|
189
|
+
'ri-arrow-left-s-line',
|
|
190
|
+
'ri-arrow-right-s-line',
|
|
191
|
+
'ri-arrow-up-circle-line',
|
|
192
|
+
'ri-attachment-line',
|
|
193
|
+
'ri-calendar-2-line',
|
|
194
|
+
'ri-calendar-event-line',
|
|
195
|
+
'ri-calendar-todo-line',
|
|
196
|
+
'ri-camera-off-line',
|
|
197
|
+
'ri-checkbox-circle-line',
|
|
198
|
+
'ri-close-circle-line',
|
|
199
|
+
'ri-close-line',
|
|
200
|
+
'ri-delete-bin-7-line',
|
|
201
|
+
'ri-delete-bin-line',
|
|
202
|
+
'ri-edit-line',
|
|
203
|
+
'ri-error-warning-line',
|
|
204
|
+
'ri-external-link-line',
|
|
205
|
+
'ri-eye-line',
|
|
206
|
+
'ri-facebook-box-line',
|
|
207
|
+
'ri-file-line',
|
|
208
|
+
'ri-global-line',
|
|
209
|
+
'ri-guide-line',
|
|
210
|
+
'ri-heart-line',
|
|
211
|
+
'ri-history-line',
|
|
212
|
+
'ri-image-add-line',
|
|
213
|
+
'ri-information-line',
|
|
214
|
+
'ri-instagram-line',
|
|
215
|
+
'ri-linkedin-box-line',
|
|
216
|
+
'ri-lock-line',
|
|
217
|
+
'ri-mail-add-line',
|
|
218
|
+
'ri-map-2-line',
|
|
219
|
+
'ri-message-3-line',
|
|
220
|
+
'ri-more-2-fill',
|
|
221
|
+
'ri-more-2-line',
|
|
222
|
+
'ri-pencil-fill',
|
|
223
|
+
'ri-pencil-line',
|
|
224
|
+
'ri-pushpin-fill',
|
|
225
|
+
'ri-question-answer-line',
|
|
226
|
+
'ri-refresh-line',
|
|
227
|
+
'ri-road-map-line',
|
|
228
|
+
'ri-search-line',
|
|
229
|
+
'ri-send-plane-fill',
|
|
230
|
+
'ri-share-line',
|
|
231
|
+
'ri-sound-module-line',
|
|
232
|
+
'ri-subtract-line',
|
|
233
|
+
'ri-time-line',
|
|
234
|
+
'ri-user-location-line',
|
|
235
|
+
'screenshot-2-line',
|
|
236
|
+
'search',
|
|
237
|
+
'search-2-line',
|
|
238
|
+
'search-eye-line',
|
|
239
|
+
'search-line',
|
|
240
|
+
'send-plane-fill',
|
|
241
|
+
'settings-5-fill',
|
|
242
|
+
'settings-5-line',
|
|
243
|
+
'shake-hands-line',
|
|
244
|
+
'share-line',
|
|
245
|
+
'shield-check-line',
|
|
246
|
+
'shopping-cart',
|
|
247
|
+
'slideshow-line',
|
|
248
|
+
'snapchat-fill',
|
|
249
|
+
'sound-mix',
|
|
250
|
+
'sound-module-fill',
|
|
251
|
+
'sound-module-line',
|
|
252
|
+
'spam-2-line',
|
|
253
|
+
'speed-fill',
|
|
254
|
+
'star-fill',
|
|
255
|
+
'star-half-s-fill',
|
|
256
|
+
'star-line',
|
|
257
|
+
'star-s-fill',
|
|
258
|
+
'star-s-line',
|
|
259
|
+
'store-2-line',
|
|
260
|
+
'subtract-fill',
|
|
25
261
|
'subtract-line',
|
|
26
|
-
'
|
|
262
|
+
't-box-line',
|
|
263
|
+
'threads-fill',
|
|
264
|
+
'thumb-down-line',
|
|
265
|
+
'thumb-up-line',
|
|
266
|
+
'time-fill',
|
|
27
267
|
'time-line',
|
|
268
|
+
'timer-fill',
|
|
269
|
+
'timer-line',
|
|
270
|
+
'twitter-fill',
|
|
271
|
+
'upload-2-line',
|
|
272
|
+
'user-3-fill',
|
|
273
|
+
'user-3-line',
|
|
274
|
+
'user-line',
|
|
275
|
+
'user-settings-line',
|
|
276
|
+
'video',
|
|
277
|
+
'whatsapp-fill',
|
|
278
|
+
'whatsapp-line',
|
|
279
|
+
'x',
|
|
280
|
+
'x-circle',
|
|
281
|
+
'youtube-fill',
|
|
28
282
|
] as const;
|
|
29
283
|
|
|
30
284
|
export type IconName = typeof iconEnums[number];
|
|
@@ -7,7 +7,18 @@ const Icon = ({
|
|
|
7
7
|
size = 24,
|
|
8
8
|
color = '#4F7CFE',
|
|
9
9
|
style = {},
|
|
10
|
-
}) =>
|
|
11
|
-
|
|
10
|
+
}) => {
|
|
11
|
+
try {
|
|
12
|
+
return <IconRemix {...{ style, size, color, name }} />;
|
|
13
|
+
} catch (error) {
|
|
14
|
+
// Se der erro, tenta usar question-mark como fallback
|
|
15
|
+
try {
|
|
16
|
+
return <IconRemix {...{ style, size, color, name: 'question-mark' }} />;
|
|
17
|
+
} catch {
|
|
18
|
+
// Se tudo falhar, retorna null para não quebrar
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
12
23
|
|
|
13
24
|
export default Icon;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View,
|
|
2
|
+
import { View, StyleSheet, TouchableOpacity, ViewStyle, StyleProp, TextStyle } from 'react-native';
|
|
3
3
|
import Icon from '../Icon';
|
|
4
4
|
import SEText from '../SEText';
|
|
5
5
|
|
|
6
6
|
interface NavigationItemProps {
|
|
7
|
-
iconName
|
|
7
|
+
iconName?: string;
|
|
8
8
|
label: string;
|
|
9
9
|
variant?: 'default' | 'selected' | 'disabled';
|
|
10
10
|
size?: 'small' | 'medium' | 'large';
|
|
11
11
|
onPress?: () => void;
|
|
12
|
-
style?: ViewStyle
|
|
12
|
+
style?: StyleProp<ViewStyle>;
|
|
13
13
|
iconColor?: string;
|
|
14
14
|
textColor?: string;
|
|
15
15
|
backgroundColor?: string;
|
|
16
16
|
borderColor?: string;
|
|
17
17
|
showArrow?: boolean;
|
|
18
18
|
badge?: string;
|
|
19
|
-
badgeStyle?: 'standard' |
|
|
19
|
+
badgeStyle?: 'standard' | 'rounded';
|
|
20
20
|
description?: string;
|
|
21
21
|
layout?: 'standard' | 'expanded' | 'list';
|
|
22
22
|
iconBackgroundColor?: string;
|
|
@@ -35,10 +35,10 @@ const NavigationItem: React.FC<NavigationItemProps> = ({
|
|
|
35
35
|
borderColor,
|
|
36
36
|
showArrow = true,
|
|
37
37
|
badge,
|
|
38
|
-
badgeStyle = 'standard',
|
|
39
|
-
description,
|
|
40
|
-
layout = 'standard',
|
|
41
|
-
iconBackgroundColor,
|
|
38
|
+
badgeStyle = 'standard',
|
|
39
|
+
description,
|
|
40
|
+
layout = 'standard',
|
|
41
|
+
iconBackgroundColor,
|
|
42
42
|
}) => {
|
|
43
43
|
// Estilos dinâmicos baseados nas props
|
|
44
44
|
const containerStyle = [
|
|
@@ -62,11 +62,11 @@ const NavigationItem: React.FC<NavigationItemProps> = ({
|
|
|
62
62
|
iconBackgroundColor && { backgroundColor: iconBackgroundColor },
|
|
63
63
|
];
|
|
64
64
|
|
|
65
|
-
const labelStyle = [
|
|
65
|
+
const labelStyle: TextStyle[] = [
|
|
66
66
|
styles.label,
|
|
67
67
|
size === 'small' ? styles.labelSmall : size === 'large' ? styles.labelLarge : styles.labelMedium,
|
|
68
68
|
variant === 'selected' ? styles.labelSelected : variant === 'disabled' ? styles.labelDisabled : styles.labelDefault,
|
|
69
|
-
textColor && { color: textColor },
|
|
69
|
+
...(textColor != null && textColor !== '' ? [{ color: textColor } as TextStyle] : []),
|
|
70
70
|
];
|
|
71
71
|
|
|
72
72
|
const getIconColor = () => {
|
|
@@ -173,36 +173,40 @@ const NavigationItem: React.FC<NavigationItemProps> = ({
|
|
|
173
173
|
name={iconName}
|
|
174
174
|
size={getIconSize()}
|
|
175
175
|
color={getIconColor()}
|
|
176
|
-
style={{}}
|
|
177
176
|
/>
|
|
178
177
|
</View>
|
|
179
178
|
)}
|
|
180
179
|
|
|
181
180
|
{layout === 'expanded' && description ? (
|
|
182
181
|
<View style={styles.textContainer}>
|
|
183
|
-
<
|
|
182
|
+
<SEText
|
|
183
|
+
type="ns-sm-body-semibold"
|
|
184
|
+
color={variant === 'disabled' ? '#9CA3AF' : textColor || '#1B244B'}
|
|
185
|
+
style={styles.labelExpanded}
|
|
186
|
+
numberOfLines={1}
|
|
187
|
+
>
|
|
184
188
|
{label}
|
|
185
|
-
</
|
|
189
|
+
</SEText>
|
|
186
190
|
<View style={styles.descriptionContainer}>
|
|
187
|
-
<
|
|
191
|
+
<SEText type="ns-xs-body" color="#6B7280" style={styles.description} numberOfLines={2}>
|
|
188
192
|
{description}
|
|
189
|
-
</
|
|
193
|
+
</SEText>
|
|
190
194
|
</View>
|
|
191
195
|
</View>
|
|
192
196
|
) : (
|
|
193
197
|
layout === 'list' ? (
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
<SEText type={'ns-heading-4' as any} style={seTextStyle} numberOfLines={1}>
|
|
198
|
-
{label}
|
|
199
|
-
</SEText>
|
|
200
|
-
);
|
|
201
|
-
})()
|
|
198
|
+
<SEText type="ns-heading-4" color={textColor || '#1B244B'} style={{ flex: 1 }} numberOfLines={1}>
|
|
199
|
+
{label}
|
|
200
|
+
</SEText>
|
|
202
201
|
) : (
|
|
203
|
-
<
|
|
202
|
+
<SEText
|
|
203
|
+
type="ns-sm-body-semibold"
|
|
204
|
+
color={variant === 'disabled' ? '#9CA3AF' : variant === 'selected' ? '#1B244B' : textColor || '#1B244B'}
|
|
205
|
+
style={labelStyle}
|
|
206
|
+
numberOfLines={1}
|
|
207
|
+
>
|
|
204
208
|
{label}
|
|
205
|
-
</
|
|
209
|
+
</SEText>
|
|
206
210
|
)
|
|
207
211
|
)}
|
|
208
212
|
|
|
@@ -212,7 +216,6 @@ const NavigationItem: React.FC<NavigationItemProps> = ({
|
|
|
212
216
|
name={layout === 'list' ? 'arrow-right-s-line' : 'arrow-right-line'}
|
|
213
217
|
size={getArrowSize()}
|
|
214
218
|
color={getArrowColor()}
|
|
215
|
-
style={{}}
|
|
216
219
|
/>
|
|
217
220
|
</View>
|
|
218
221
|
)}
|
|
@@ -220,7 +223,7 @@ const NavigationItem: React.FC<NavigationItemProps> = ({
|
|
|
220
223
|
{/* Badge "Novo" posicionado no canto direito, interno ao container */}
|
|
221
224
|
{badge && (
|
|
222
225
|
<View style={getBadgeStyle()}>
|
|
223
|
-
<
|
|
226
|
+
<SEText type="ns-xxxs-body" color="#FFFFFF" style={[styles.figmaBadgeText, getBadgeTextSize()]}>{badge}</SEText>
|
|
224
227
|
</View>
|
|
225
228
|
)}
|
|
226
229
|
</>
|
|
@@ -369,12 +372,10 @@ const styles = StyleSheet.create({
|
|
|
369
372
|
// Label Base
|
|
370
373
|
label: {
|
|
371
374
|
flex: 1,
|
|
372
|
-
|
|
373
|
-
fontWeight: '600',
|
|
374
375
|
flexShrink: 1, // Permite que o texto se compresse se necessário
|
|
375
376
|
},
|
|
376
377
|
|
|
377
|
-
// Label Sizes
|
|
378
|
+
// Label Sizes (mantidos para compatibilidade, mas não mais necessários com SEText)
|
|
378
379
|
labelSmall: {
|
|
379
380
|
fontSize: 12,
|
|
380
381
|
lineHeight: 16,
|
|
@@ -398,9 +399,6 @@ const styles = StyleSheet.create({
|
|
|
398
399
|
labelExpanded: {
|
|
399
400
|
fontSize: 16,
|
|
400
401
|
lineHeight: 22,
|
|
401
|
-
// fontWeight: '600',
|
|
402
|
-
|
|
403
|
-
// Removido marginBottom pois agora usamos descriptionContainer para espaçamento
|
|
404
402
|
},
|
|
405
403
|
descriptionContainer: {
|
|
406
404
|
marginTop: 6, // Espaçamento entre o título e a descrição
|
|
@@ -408,12 +406,9 @@ const styles = StyleSheet.create({
|
|
|
408
406
|
description: {
|
|
409
407
|
fontSize: 12,
|
|
410
408
|
lineHeight: 18, // Aumentado para melhor legibilidade
|
|
411
|
-
color: '#6B7280',
|
|
412
|
-
|
|
413
|
-
// fontWeight: '400',
|
|
414
409
|
},
|
|
415
410
|
|
|
416
|
-
// Label Variants
|
|
411
|
+
// Label Variants (não mais necessários com SEText gerenciando cores)
|
|
417
412
|
labelDefault: {
|
|
418
413
|
color: '#1B244B',
|
|
419
414
|
},
|
|
@@ -478,9 +473,7 @@ const styles = StyleSheet.create({
|
|
|
478
473
|
borderBottomRightRadius: 10,
|
|
479
474
|
},
|
|
480
475
|
figmaBadgeText: {
|
|
481
|
-
color: '#FFFFFF',
|
|
482
476
|
fontWeight: '700',
|
|
483
|
-
|
|
484
477
|
textAlign: 'center',
|
|
485
478
|
},
|
|
486
479
|
|
|
@@ -496,10 +489,8 @@ const styles = StyleSheet.create({
|
|
|
496
489
|
zIndex: 10,
|
|
497
490
|
},
|
|
498
491
|
topBadgeText: {
|
|
499
|
-
color: '#FFFFFF',
|
|
500
492
|
fontSize: 10,
|
|
501
493
|
fontWeight: '600',
|
|
502
|
-
|
|
503
494
|
},
|
|
504
495
|
|
|
505
496
|
// Badge antigo (mantido para compatibilidade)
|
|
@@ -516,11 +507,9 @@ const styles = StyleSheet.create({
|
|
|
516
507
|
paddingHorizontal: 6,
|
|
517
508
|
},
|
|
518
509
|
badgeText: {
|
|
519
|
-
color: '#FFFFFF',
|
|
520
510
|
fontSize: 10,
|
|
521
511
|
fontWeight: '600',
|
|
522
|
-
|
|
523
512
|
},
|
|
524
513
|
});
|
|
525
514
|
|
|
526
|
-
export default NavigationItem;
|
|
515
|
+
export default NavigationItem;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TextStyle, TextProps } from 'react-native';
|
|
1
|
+
import { TextStyle, TextProps, StyleProp } from 'react-native';
|
|
2
2
|
|
|
3
3
|
export interface SETextProps extends TextProps {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
style?: TextStyle
|
|
5
|
+
style?: StyleProp<TextStyle>;
|
|
6
6
|
bold?: boolean;
|
|
7
7
|
semiBold?: boolean;
|
|
8
8
|
center?: boolean;
|
|
@@ -42,6 +42,19 @@ export interface SETextProps extends TextProps {
|
|
|
42
42
|
| 'ns-heading-4'
|
|
43
43
|
| 'ns-heading-5'
|
|
44
44
|
| 'ns-heading-6'
|
|
45
|
+
| 'ns-subtitle'
|
|
46
|
+
| 'ns-sm-body'
|
|
47
|
+
| 'ns-sm-body-semibold'
|
|
48
|
+
| 'ns-sm-body-bold'
|
|
49
|
+
| 'ns-xs-body'
|
|
50
|
+
| 'ns-xs-body-semibold'
|
|
51
|
+
| 'ns-xs-body-bold'
|
|
52
|
+
| 'ns-xxs-body'
|
|
53
|
+
| 'ns-xxs-body-semibold'
|
|
54
|
+
| 'ns-xxs-body-bold'
|
|
55
|
+
| 'ns-xxxs-body'
|
|
56
|
+
| 'ns-xxxs-body-semibold'
|
|
57
|
+
| 'ns-xxxs-body-bold'
|
|
45
58
|
| null;
|
|
46
59
|
mt?: number | null;
|
|
47
60
|
mb?: number | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const iconEnums: readonly ["add-circle-line", "arrow-
|
|
1
|
+
export declare const iconEnums: readonly ["account-circle-fill", "add-circle-fill", "add-circle-line", "add-fill", "add-line", "alert-line", "arrow-down-circle-fill", "arrow-down-fill", "arrow-down-line", "arrow-down-s-fill", "arrow-down-s-line", "arrow-drop-down-line", "arrow-drop-up-line", "arrow-left-circle-line", "arrow-left-line", "arrow-left-s-line", "arrow-right-line", "arrow-right-s-line", "arrow-right-up-line", "arrow-up-circle-fill", "arrow-up-fill", "arrow-up-line", "arrow-up-s-line", "at-line", "attachment-2", "bank-card-fill", "bank-line", "bar-chart-box-line", "bar-chart-grouped-fill", "bar-chart-grouped-line", "barcode-line", "bookmark-fill", "bookmark-line", "briefcase-2-line", "briefcase-fill", "brush-2-line", "building-2-line", "calculator-line", "calendar-2-line", "calendar-check-line", "calendar-event-line", "calendar-line", "calendar-todo-fill", "camera-2-line", "camera-line", "camera-off-line", "chat-3-line", "chat-ai-line", "chat-heart-line", "chat-history-line", "checkbox-blank-circle-fill", "checkbox-blank-line", "checkbox-circle-fill", "checkbox-circle-line", "checkbox-fill", "checkbox-line", "check-fill", "check-line", "chevron-down", "chevron-left", "chevron-small-left", "chevron-small-right", "chevron-up", "close-circle-fill", "close-circle-line", "closecircleo", "close-fill", "close-line", "coins-line", "community-line", "compass-fill", "computer-line", "customer-service-2-fill", "delete-bin-2-line", "delete-bin-5-line", "delete-bin-7-line", "delete-bin-line", "design-line", "download-2-line", "download-line", "draft-line", "drag-drop-line", "earth-line", "edit-2-line", "edit-line", "emotion-2-line", "emotion-happy-line", "emotion-line", "emotion-normal-line", "emotion-unhappy-line", "equalizer-line", "error-warning-fill", "error-warning-line", "exchange-dollar-line", "external-link-line", "facebook-box-fill", "facebook-circle-fill", "facebook-circle-line", "facebook-fill", "file-copy-2-line", "file-copy-line", "file-list-3-line", "file-pdf-line", "file-text", "filter-3-line", "folder-download-line", "folder-shared-line", "funds-line", "google-line", "google-play-fill", "group-line", "guide-line", "heart-3-line", "heart-fill", "heart-line", "history-line", "home-4-line", "home-fill", "home-line", "hotel-line", "image-2-line", "indeterminate-circle-line", "information-line", "instagram-fill", "instagram-line", "lightbulb-line", "like2", "line-chart-line", "linkedin-box-fill", "linkedin-fill", "list-check-2", "list-settings-line", "list-unordered", "loader-3-fill", "loader-3-line", "loader-4-line", "locked", "lock-line", "logout-box-line", "magnifying-glass", "mail-line", "map-2-fill", "map-2-line", "map-pin-2-line", "map-pin-line", "medal-line", "menu-2-fill", "menu-2-line", "money-dollar-circle-fill", "money-dollar-circle-line", "more-2-fill", "more-2-line", "notification-2-line", "notification-line", "pencil-fill", "pencil-line", "pen-nib-line", "percent-line", "phone-fill", "phone-line", "pie-chart-2-line", "pinterest-fill", "play-circle-line", "play-fill", "price-tag-3-line", "price-tag-line", "profile-fill", "pushpin-line", "qr-code-fill", "qr-code-line", "question-answer-fill", "question-fill", "question-line", "question-mark", "refresh-line", "reset-left-line", "restart-line", "ri-add-circle-line", "ri-add-line", "ri-alert-fill", "ri-alert-line", "ri-align-justify", "ri-arrow-down-circle-line", "ri-arrow-drop-down-line", "ri-arrow-go-back-line", "ri-arrow-left-line", "ri-arrow-left-s-line", "ri-arrow-right-s-line", "ri-arrow-up-circle-line", "ri-attachment-line", "ri-calendar-2-line", "ri-calendar-event-line", "ri-calendar-todo-line", "ri-camera-off-line", "ri-checkbox-circle-line", "ri-close-circle-line", "ri-close-line", "ri-delete-bin-7-line", "ri-delete-bin-line", "ri-edit-line", "ri-error-warning-line", "ri-external-link-line", "ri-eye-line", "ri-facebook-box-line", "ri-file-line", "ri-global-line", "ri-guide-line", "ri-heart-line", "ri-history-line", "ri-image-add-line", "ri-information-line", "ri-instagram-line", "ri-linkedin-box-line", "ri-lock-line", "ri-mail-add-line", "ri-map-2-line", "ri-message-3-line", "ri-more-2-fill", "ri-more-2-line", "ri-pencil-fill", "ri-pencil-line", "ri-pushpin-fill", "ri-question-answer-line", "ri-refresh-line", "ri-road-map-line", "ri-search-line", "ri-send-plane-fill", "ri-share-line", "ri-sound-module-line", "ri-subtract-line", "ri-time-line", "ri-user-location-line", "screenshot-2-line", "search", "search-2-line", "search-eye-line", "search-line", "send-plane-fill", "settings-5-fill", "settings-5-line", "shake-hands-line", "share-line", "shield-check-line", "shopping-cart", "slideshow-line", "snapchat-fill", "sound-mix", "sound-module-fill", "sound-module-line", "spam-2-line", "speed-fill", "star-fill", "star-half-s-fill", "star-line", "star-s-fill", "star-s-line", "store-2-line", "subtract-fill", "subtract-line", "t-box-line", "threads-fill", "thumb-down-line", "thumb-up-line", "time-fill", "time-line", "timer-fill", "timer-line", "twitter-fill", "upload-2-line", "user-3-fill", "user-3-line", "user-line", "user-settings-line", "video", "whatsapp-fill", "whatsapp-line", "x", "x-circle", "youtube-fill"];
|
|
2
2
|
export type IconName = typeof iconEnums[number];
|
|
3
3
|
//# sourceMappingURL=iconEnums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconEnums.d.ts","sourceRoot":"","sources":["../../../components/Icon/iconEnums.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"iconEnums.d.ts","sourceRoot":"","sources":["../../../components/Icon/iconEnums.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,0hKAwRZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,27 +1,281 @@
|
|
|
1
1
|
export const iconEnums = [
|
|
2
|
+
'account-circle-fill',
|
|
3
|
+
'add-circle-fill',
|
|
2
4
|
'add-circle-line',
|
|
5
|
+
'add-fill',
|
|
6
|
+
'add-line',
|
|
7
|
+
'alert-line',
|
|
8
|
+
'arrow-down-circle-fill',
|
|
9
|
+
'arrow-down-fill',
|
|
10
|
+
'arrow-down-line',
|
|
11
|
+
'arrow-down-s-fill',
|
|
12
|
+
'arrow-down-s-line',
|
|
13
|
+
'arrow-drop-down-line',
|
|
14
|
+
'arrow-drop-up-line',
|
|
15
|
+
'arrow-left-circle-line',
|
|
16
|
+
'arrow-left-line',
|
|
17
|
+
'arrow-left-s-line',
|
|
3
18
|
'arrow-right-line',
|
|
19
|
+
'arrow-right-s-line',
|
|
20
|
+
'arrow-right-up-line',
|
|
21
|
+
'arrow-up-circle-fill',
|
|
22
|
+
'arrow-up-fill',
|
|
23
|
+
'arrow-up-line',
|
|
4
24
|
'arrow-up-s-line',
|
|
5
|
-
'
|
|
25
|
+
'at-line',
|
|
26
|
+
'attachment-2',
|
|
27
|
+
'bank-card-fill',
|
|
28
|
+
'bank-line',
|
|
29
|
+
'bar-chart-box-line',
|
|
30
|
+
'bar-chart-grouped-fill',
|
|
31
|
+
'bar-chart-grouped-line',
|
|
6
32
|
'barcode-line',
|
|
33
|
+
'bookmark-fill',
|
|
34
|
+
'bookmark-line',
|
|
35
|
+
'briefcase-2-line',
|
|
36
|
+
'briefcase-fill',
|
|
37
|
+
'brush-2-line',
|
|
38
|
+
'building-2-line',
|
|
39
|
+
'calculator-line',
|
|
40
|
+
'calendar-2-line',
|
|
41
|
+
'calendar-check-line',
|
|
42
|
+
'calendar-event-line',
|
|
43
|
+
'calendar-line',
|
|
44
|
+
'calendar-todo-fill',
|
|
45
|
+
'camera-2-line',
|
|
46
|
+
'camera-line',
|
|
47
|
+
'camera-off-line',
|
|
7
48
|
'chat-3-line',
|
|
49
|
+
'chat-ai-line',
|
|
50
|
+
'chat-heart-line',
|
|
51
|
+
'chat-history-line',
|
|
52
|
+
'checkbox-blank-circle-fill',
|
|
53
|
+
'checkbox-blank-line',
|
|
54
|
+
'checkbox-circle-fill',
|
|
55
|
+
'checkbox-circle-line',
|
|
56
|
+
'checkbox-fill',
|
|
57
|
+
'checkbox-line',
|
|
58
|
+
'check-fill',
|
|
8
59
|
'check-line',
|
|
60
|
+
'chevron-down',
|
|
61
|
+
'chevron-left',
|
|
62
|
+
'chevron-small-left',
|
|
63
|
+
'chevron-small-right',
|
|
64
|
+
'chevron-up',
|
|
65
|
+
'close-circle-fill',
|
|
66
|
+
'close-circle-line',
|
|
67
|
+
'closecircleo',
|
|
68
|
+
'close-fill',
|
|
9
69
|
'close-line',
|
|
70
|
+
'coins-line',
|
|
71
|
+
'community-line',
|
|
72
|
+
'compass-fill',
|
|
73
|
+
'computer-line',
|
|
74
|
+
'customer-service-2-fill',
|
|
75
|
+
'delete-bin-2-line',
|
|
76
|
+
'delete-bin-5-line',
|
|
77
|
+
'delete-bin-7-line',
|
|
78
|
+
'delete-bin-line',
|
|
79
|
+
'design-line',
|
|
80
|
+
'download-2-line',
|
|
10
81
|
'download-line',
|
|
82
|
+
'draft-line',
|
|
83
|
+
'drag-drop-line',
|
|
84
|
+
'earth-line',
|
|
85
|
+
'edit-2-line',
|
|
11
86
|
'edit-line',
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
87
|
+
'emotion-2-line',
|
|
88
|
+
'emotion-happy-line',
|
|
89
|
+
'emotion-line',
|
|
90
|
+
'emotion-normal-line',
|
|
91
|
+
'emotion-unhappy-line',
|
|
92
|
+
'equalizer-line',
|
|
93
|
+
'error-warning-fill',
|
|
94
|
+
'error-warning-line',
|
|
95
|
+
'exchange-dollar-line',
|
|
96
|
+
'external-link-line',
|
|
97
|
+
'facebook-box-fill',
|
|
98
|
+
'facebook-circle-fill',
|
|
99
|
+
'facebook-circle-line',
|
|
100
|
+
'facebook-fill',
|
|
16
101
|
'file-copy-2-line',
|
|
17
|
-
'
|
|
18
|
-
'
|
|
102
|
+
'file-copy-line',
|
|
103
|
+
'file-list-3-line',
|
|
104
|
+
'file-pdf-line',
|
|
105
|
+
'file-text',
|
|
106
|
+
'filter-3-line',
|
|
107
|
+
'folder-download-line',
|
|
108
|
+
'folder-shared-line',
|
|
109
|
+
'funds-line',
|
|
110
|
+
'google-line',
|
|
111
|
+
'google-play-fill',
|
|
112
|
+
'group-line',
|
|
113
|
+
'guide-line',
|
|
114
|
+
'heart-3-line',
|
|
115
|
+
'heart-fill',
|
|
116
|
+
'heart-line',
|
|
117
|
+
'history-line',
|
|
118
|
+
'home-4-line',
|
|
19
119
|
'home-fill',
|
|
20
120
|
'home-line',
|
|
121
|
+
'hotel-line',
|
|
122
|
+
'image-2-line',
|
|
123
|
+
'indeterminate-circle-line',
|
|
21
124
|
'information-line',
|
|
125
|
+
'instagram-fill',
|
|
126
|
+
'instagram-line',
|
|
127
|
+
'lightbulb-line',
|
|
128
|
+
'like2',
|
|
129
|
+
'line-chart-line',
|
|
130
|
+
'linkedin-box-fill',
|
|
131
|
+
'linkedin-fill',
|
|
132
|
+
'list-check-2',
|
|
133
|
+
'list-settings-line',
|
|
134
|
+
'list-unordered',
|
|
135
|
+
'loader-3-fill',
|
|
136
|
+
'loader-3-line',
|
|
137
|
+
'loader-4-line',
|
|
138
|
+
'locked',
|
|
139
|
+
'lock-line',
|
|
140
|
+
'logout-box-line',
|
|
141
|
+
'magnifying-glass',
|
|
142
|
+
'mail-line',
|
|
143
|
+
'map-2-fill',
|
|
144
|
+
'map-2-line',
|
|
145
|
+
'map-pin-2-line',
|
|
146
|
+
'map-pin-line',
|
|
147
|
+
'medal-line',
|
|
148
|
+
'menu-2-fill',
|
|
149
|
+
'menu-2-line',
|
|
150
|
+
'money-dollar-circle-fill',
|
|
151
|
+
'money-dollar-circle-line',
|
|
152
|
+
'more-2-fill',
|
|
22
153
|
'more-2-line',
|
|
23
154
|
'notification-2-line',
|
|
155
|
+
'notification-line',
|
|
156
|
+
'pencil-fill',
|
|
157
|
+
'pencil-line',
|
|
158
|
+
'pen-nib-line',
|
|
159
|
+
'percent-line',
|
|
160
|
+
'phone-fill',
|
|
161
|
+
'phone-line',
|
|
162
|
+
'pie-chart-2-line',
|
|
163
|
+
'pinterest-fill',
|
|
164
|
+
'play-circle-line',
|
|
165
|
+
'play-fill',
|
|
166
|
+
'price-tag-3-line',
|
|
167
|
+
'price-tag-line',
|
|
168
|
+
'profile-fill',
|
|
169
|
+
'pushpin-line',
|
|
170
|
+
'qr-code-fill',
|
|
171
|
+
'qr-code-line',
|
|
172
|
+
'question-answer-fill',
|
|
173
|
+
'question-fill',
|
|
174
|
+
'question-line',
|
|
175
|
+
'question-mark',
|
|
176
|
+
'refresh-line',
|
|
177
|
+
'reset-left-line',
|
|
178
|
+
'restart-line',
|
|
179
|
+
'ri-add-circle-line',
|
|
180
|
+
'ri-add-line',
|
|
181
|
+
'ri-alert-fill',
|
|
182
|
+
'ri-alert-line',
|
|
183
|
+
'ri-align-justify',
|
|
184
|
+
'ri-arrow-down-circle-line',
|
|
185
|
+
'ri-arrow-drop-down-line',
|
|
186
|
+
'ri-arrow-go-back-line',
|
|
187
|
+
'ri-arrow-left-line',
|
|
188
|
+
'ri-arrow-left-s-line',
|
|
189
|
+
'ri-arrow-right-s-line',
|
|
190
|
+
'ri-arrow-up-circle-line',
|
|
191
|
+
'ri-attachment-line',
|
|
192
|
+
'ri-calendar-2-line',
|
|
193
|
+
'ri-calendar-event-line',
|
|
194
|
+
'ri-calendar-todo-line',
|
|
195
|
+
'ri-camera-off-line',
|
|
196
|
+
'ri-checkbox-circle-line',
|
|
197
|
+
'ri-close-circle-line',
|
|
198
|
+
'ri-close-line',
|
|
199
|
+
'ri-delete-bin-7-line',
|
|
200
|
+
'ri-delete-bin-line',
|
|
201
|
+
'ri-edit-line',
|
|
202
|
+
'ri-error-warning-line',
|
|
203
|
+
'ri-external-link-line',
|
|
204
|
+
'ri-eye-line',
|
|
205
|
+
'ri-facebook-box-line',
|
|
206
|
+
'ri-file-line',
|
|
207
|
+
'ri-global-line',
|
|
208
|
+
'ri-guide-line',
|
|
209
|
+
'ri-heart-line',
|
|
210
|
+
'ri-history-line',
|
|
211
|
+
'ri-image-add-line',
|
|
212
|
+
'ri-information-line',
|
|
213
|
+
'ri-instagram-line',
|
|
214
|
+
'ri-linkedin-box-line',
|
|
215
|
+
'ri-lock-line',
|
|
216
|
+
'ri-mail-add-line',
|
|
217
|
+
'ri-map-2-line',
|
|
218
|
+
'ri-message-3-line',
|
|
219
|
+
'ri-more-2-fill',
|
|
220
|
+
'ri-more-2-line',
|
|
221
|
+
'ri-pencil-fill',
|
|
222
|
+
'ri-pencil-line',
|
|
223
|
+
'ri-pushpin-fill',
|
|
224
|
+
'ri-question-answer-line',
|
|
225
|
+
'ri-refresh-line',
|
|
226
|
+
'ri-road-map-line',
|
|
227
|
+
'ri-search-line',
|
|
228
|
+
'ri-send-plane-fill',
|
|
229
|
+
'ri-share-line',
|
|
230
|
+
'ri-sound-module-line',
|
|
231
|
+
'ri-subtract-line',
|
|
232
|
+
'ri-time-line',
|
|
233
|
+
'ri-user-location-line',
|
|
234
|
+
'screenshot-2-line',
|
|
235
|
+
'search',
|
|
236
|
+
'search-2-line',
|
|
237
|
+
'search-eye-line',
|
|
238
|
+
'search-line',
|
|
239
|
+
'send-plane-fill',
|
|
240
|
+
'settings-5-fill',
|
|
241
|
+
'settings-5-line',
|
|
242
|
+
'shake-hands-line',
|
|
243
|
+
'share-line',
|
|
244
|
+
'shield-check-line',
|
|
245
|
+
'shopping-cart',
|
|
246
|
+
'slideshow-line',
|
|
247
|
+
'snapchat-fill',
|
|
248
|
+
'sound-mix',
|
|
249
|
+
'sound-module-fill',
|
|
250
|
+
'sound-module-line',
|
|
251
|
+
'spam-2-line',
|
|
252
|
+
'speed-fill',
|
|
253
|
+
'star-fill',
|
|
254
|
+
'star-half-s-fill',
|
|
255
|
+
'star-line',
|
|
256
|
+
'star-s-fill',
|
|
257
|
+
'star-s-line',
|
|
258
|
+
'store-2-line',
|
|
259
|
+
'subtract-fill',
|
|
24
260
|
'subtract-line',
|
|
25
|
-
'
|
|
261
|
+
't-box-line',
|
|
262
|
+
'threads-fill',
|
|
263
|
+
'thumb-down-line',
|
|
264
|
+
'thumb-up-line',
|
|
265
|
+
'time-fill',
|
|
26
266
|
'time-line',
|
|
267
|
+
'timer-fill',
|
|
268
|
+
'timer-line',
|
|
269
|
+
'twitter-fill',
|
|
270
|
+
'upload-2-line',
|
|
271
|
+
'user-3-fill',
|
|
272
|
+
'user-3-line',
|
|
273
|
+
'user-line',
|
|
274
|
+
'user-settings-line',
|
|
275
|
+
'video',
|
|
276
|
+
'whatsapp-fill',
|
|
277
|
+
'whatsapp-line',
|
|
278
|
+
'x',
|
|
279
|
+
'x-circle',
|
|
280
|
+
'youtube-fill',
|
|
27
281
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Icon/index.jsx"],"names":[],"mappings":";AAIA;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Icon/index.jsx"],"names":[],"mappings":";AAIA;;;;;6BAiBC;kBArBiB,OAAO"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import IconRemix from 'react-native-remix-icon';
|
|
3
3
|
import { iconEnums } from './iconEnums';
|
|
4
|
-
const Icon = ({ name, size = 24, color = '#4F7CFE', style = {}, }) =>
|
|
4
|
+
const Icon = ({ name, size = 24, color = '#4F7CFE', style = {}, }) => {
|
|
5
|
+
try {
|
|
6
|
+
return <IconRemix {...{ style, size, color, name }}/>;
|
|
7
|
+
}
|
|
8
|
+
catch (error) {
|
|
9
|
+
// Se der erro, tenta usar question-mark como fallback
|
|
10
|
+
try {
|
|
11
|
+
return <IconRemix {...{ style, size, color, name: 'question-mark' }}/>;
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
// Se tudo falhar, retorna null para não quebrar
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
5
19
|
export default Icon;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ViewStyle } from 'react-native';
|
|
2
|
+
import { ViewStyle, StyleProp } from 'react-native';
|
|
3
3
|
interface NavigationItemProps {
|
|
4
|
-
iconName
|
|
4
|
+
iconName?: string;
|
|
5
5
|
label: string;
|
|
6
6
|
variant?: 'default' | 'selected' | 'disabled';
|
|
7
7
|
size?: 'small' | 'medium' | 'large';
|
|
8
8
|
onPress?: () => void;
|
|
9
|
-
style?: ViewStyle
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
10
|
iconColor?: string;
|
|
11
11
|
textColor?: string;
|
|
12
12
|
backgroundColor?: string;
|
|
13
13
|
borderColor?: string;
|
|
14
14
|
showArrow?: boolean;
|
|
15
15
|
badge?: string;
|
|
16
|
-
badgeStyle?: 'standard' |
|
|
16
|
+
badgeStyle?: 'standard' | 'rounded';
|
|
17
17
|
description?: string;
|
|
18
18
|
layout?: 'standard' | 'expanded' | 'list';
|
|
19
19
|
iconBackgroundColor?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/NavigationItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/NavigationItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsC,SAAS,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AAInG,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC9C,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAiOjD,CAAC;AAyQF,eAAe,cAAc,CAAC"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View,
|
|
2
|
+
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
3
|
import Icon from '../Icon';
|
|
4
4
|
import SEText from '../SEText';
|
|
5
|
-
const NavigationItem = ({ iconName, label, variant = 'default', size = 'medium', onPress, style, iconColor, textColor, backgroundColor, borderColor, showArrow = true, badge, badgeStyle = 'standard',
|
|
6
|
-
description, // Texto descritivo adicional
|
|
7
|
-
layout = 'standard', // 'standard' | 'expanded' | 'list'
|
|
8
|
-
iconBackgroundColor, // Cor de fundo personalizada para o ícone
|
|
9
|
-
}) => {
|
|
5
|
+
const NavigationItem = ({ iconName, label, variant = 'default', size = 'medium', onPress, style, iconColor, textColor, backgroundColor, borderColor, showArrow = true, badge, badgeStyle = 'standard', description, layout = 'standard', iconBackgroundColor, }) => {
|
|
10
6
|
// Estilos dinâmicos baseados nas props
|
|
11
7
|
const containerStyle = [
|
|
12
8
|
styles.container,
|
|
@@ -31,7 +27,7 @@ iconBackgroundColor, // Cor de fundo personalizada para o ícone
|
|
|
31
27
|
styles.label,
|
|
32
28
|
size === 'small' ? styles.labelSmall : size === 'large' ? styles.labelLarge : styles.labelMedium,
|
|
33
29
|
variant === 'selected' ? styles.labelSelected : variant === 'disabled' ? styles.labelDisabled : styles.labelDefault,
|
|
34
|
-
textColor && { color: textColor },
|
|
30
|
+
...(textColor != null && textColor !== '' ? [{ color: textColor }] : []),
|
|
35
31
|
];
|
|
36
32
|
const getIconColor = () => {
|
|
37
33
|
if (iconColor)
|
|
@@ -124,34 +120,31 @@ iconBackgroundColor, // Cor de fundo personalizada para o ícone
|
|
|
124
120
|
};
|
|
125
121
|
const Content = (<>
|
|
126
122
|
{layout !== 'list' && iconName && (<View style={iconContainerStyle}>
|
|
127
|
-
<Icon name={iconName} size={getIconSize()} color={getIconColor()}
|
|
123
|
+
<Icon name={iconName} size={getIconSize()} color={getIconColor()}/>
|
|
128
124
|
</View>)}
|
|
129
125
|
|
|
130
126
|
{layout === 'expanded' && description ? (<View style={styles.textContainer}>
|
|
131
|
-
<
|
|
127
|
+
<SEText type="ns-sm-body-semibold" color={variant === 'disabled' ? '#9CA3AF' : textColor || '#1B244B'} style={styles.labelExpanded} numberOfLines={1}>
|
|
132
128
|
{label}
|
|
133
|
-
</
|
|
129
|
+
</SEText>
|
|
134
130
|
<View style={styles.descriptionContainer}>
|
|
135
|
-
<
|
|
131
|
+
<SEText type="ns-xs-body" color="#6B7280" style={styles.description} numberOfLines={2}>
|
|
136
132
|
{description}
|
|
137
|
-
</
|
|
133
|
+
</SEText>
|
|
138
134
|
</View>
|
|
139
|
-
</View>) : (layout === 'list' ? (
|
|
140
|
-
const seTextStyle = [{ flex: 1 }, ...(textColor ? [{ color: textColor }] : [])];
|
|
141
|
-
return (<SEText type={'ns-heading-4'} style={seTextStyle} numberOfLines={1}>
|
|
142
|
-
{label}
|
|
143
|
-
</SEText>);
|
|
144
|
-
})()) : (<Text style={labelStyle} numberOfLines={1}>
|
|
135
|
+
</View>) : (layout === 'list' ? (<SEText type="ns-heading-4" color={textColor || '#1B244B'} style={{ flex: 1 }} numberOfLines={1}>
|
|
145
136
|
{label}
|
|
146
|
-
</
|
|
137
|
+
</SEText>) : (<SEText type="ns-sm-body-semibold" color={variant === 'disabled' ? '#9CA3AF' : variant === 'selected' ? '#1B244B' : textColor || '#1B244B'} style={labelStyle} numberOfLines={1}>
|
|
138
|
+
{label}
|
|
139
|
+
</SEText>))}
|
|
147
140
|
|
|
148
141
|
{showArrow && variant !== 'disabled' && (<View style={styles.arrowContainer}>
|
|
149
|
-
<Icon name={layout === 'list' ? 'arrow-right-s-line' : 'arrow-right-line'} size={getArrowSize()} color={getArrowColor()}
|
|
142
|
+
<Icon name={layout === 'list' ? 'arrow-right-s-line' : 'arrow-right-line'} size={getArrowSize()} color={getArrowColor()}/>
|
|
150
143
|
</View>)}
|
|
151
144
|
|
|
152
145
|
{/* Badge "Novo" posicionado no canto direito, interno ao container */}
|
|
153
146
|
{badge && (<View style={getBadgeStyle()}>
|
|
154
|
-
<
|
|
147
|
+
<SEText type="ns-xxxs-body" color="#FFFFFF" style={[styles.figmaBadgeText, getBadgeTextSize()]}>{badge}</SEText>
|
|
155
148
|
</View>)}
|
|
156
149
|
</>);
|
|
157
150
|
if (onPress && variant !== 'disabled') {
|
|
@@ -279,10 +272,9 @@ const styles = StyleSheet.create({
|
|
|
279
272
|
// Label Base
|
|
280
273
|
label: {
|
|
281
274
|
flex: 1,
|
|
282
|
-
fontWeight: '600',
|
|
283
275
|
flexShrink: 1, // Permite que o texto se compresse se necessário
|
|
284
276
|
},
|
|
285
|
-
// Label Sizes
|
|
277
|
+
// Label Sizes (mantidos para compatibilidade, mas não mais necessários com SEText)
|
|
286
278
|
labelSmall: {
|
|
287
279
|
fontSize: 12,
|
|
288
280
|
lineHeight: 16,
|
|
@@ -305,8 +297,6 @@ const styles = StyleSheet.create({
|
|
|
305
297
|
labelExpanded: {
|
|
306
298
|
fontSize: 16,
|
|
307
299
|
lineHeight: 22,
|
|
308
|
-
// fontWeight: '600',
|
|
309
|
-
// Removido marginBottom pois agora usamos descriptionContainer para espaçamento
|
|
310
300
|
},
|
|
311
301
|
descriptionContainer: {
|
|
312
302
|
marginTop: 6, // Espaçamento entre o título e a descrição
|
|
@@ -314,10 +304,8 @@ const styles = StyleSheet.create({
|
|
|
314
304
|
description: {
|
|
315
305
|
fontSize: 12,
|
|
316
306
|
lineHeight: 18, // Aumentado para melhor legibilidade
|
|
317
|
-
color: '#6B7280',
|
|
318
|
-
// fontWeight: '400',
|
|
319
307
|
},
|
|
320
|
-
// Label Variants
|
|
308
|
+
// Label Variants (não mais necessários com SEText gerenciando cores)
|
|
321
309
|
labelDefault: {
|
|
322
310
|
color: '#1B244B',
|
|
323
311
|
},
|
|
@@ -380,7 +368,6 @@ const styles = StyleSheet.create({
|
|
|
380
368
|
borderBottomRightRadius: 10,
|
|
381
369
|
},
|
|
382
370
|
figmaBadgeText: {
|
|
383
|
-
color: '#FFFFFF',
|
|
384
371
|
fontWeight: '700',
|
|
385
372
|
textAlign: 'center',
|
|
386
373
|
},
|
|
@@ -396,7 +383,6 @@ const styles = StyleSheet.create({
|
|
|
396
383
|
zIndex: 10,
|
|
397
384
|
},
|
|
398
385
|
topBadgeText: {
|
|
399
|
-
color: '#FFFFFF',
|
|
400
386
|
fontSize: 10,
|
|
401
387
|
fontWeight: '600',
|
|
402
388
|
},
|
|
@@ -414,7 +400,6 @@ const styles = StyleSheet.create({
|
|
|
414
400
|
paddingHorizontal: 6,
|
|
415
401
|
},
|
|
416
402
|
badgeText: {
|
|
417
|
-
color: '#FFFFFF',
|
|
418
403
|
fontSize: 10,
|
|
419
404
|
fontWeight: '600',
|
|
420
405
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vpt-sebraeds",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
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",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=18.0.0",
|
|
45
45
|
"react-native": ">=0.70.0",
|
|
46
|
-
"react-native-svg": ">=13.0.0",
|
|
47
|
-
"react-native-reanimated": ">=3.0.0",
|
|
48
46
|
"react-native-gesture-handler": ">=2.0.0",
|
|
47
|
+
"react-native-reanimated": ">=3.0.0",
|
|
48
|
+
"react-native-svg": ">=13.0.0",
|
|
49
49
|
"react-native-web": ">=0.18.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|