vpt-sebraeds 0.0.12 → 0.0.13

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 +1 @@
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,EAAa,MAAM,cAAc,CAAC;AAIxF,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,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;IAClB,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,MAAM,CAAC;IACjC,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;AA0QF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/NavigationItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA4C,SAAS,EAAa,MAAM,cAAc,CAAC;AAI9F,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,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;IAClB,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,MAAM,CAAC;IACjC,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,CA8NjD,CAAC;AAuRF,eAAe,cAAc,CAAC"}
@@ -1,8 +1,12 @@
1
1
  import React from 'react';
2
- import { View, StyleSheet, TouchableOpacity } from 'react-native';
2
+ import { View, Text, 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', description, layout = 'standard', iconBackgroundColor, }) => {
5
+ const NavigationItem = ({ iconName, label, variant = 'default', size = 'medium', onPress, style, iconColor, textColor, backgroundColor, borderColor, showArrow = true, badge, badgeStyle = 'standard', // Suporte para diferentes estilos de badge
6
+ description, // Texto descritivo adicional
7
+ layout = 'standard', // 'standard' | 'expanded' | 'list'
8
+ iconBackgroundColor, // Cor de fundo personalizada para o ícone
9
+ }) => {
6
10
  // Estilos dinâmicos baseados nas props
7
11
  const containerStyle = [
8
12
  styles.container,
@@ -27,8 +31,8 @@ const NavigationItem = ({ iconName, label, variant = 'default', size = 'medium',
27
31
  styles.label,
28
32
  size === 'small' ? styles.labelSmall : size === 'large' ? styles.labelLarge : styles.labelMedium,
29
33
  variant === 'selected' ? styles.labelSelected : variant === 'disabled' ? styles.labelDisabled : styles.labelDefault,
30
- textColor ? { color: textColor } : {},
31
- ].filter(Boolean);
34
+ textColor && { color: textColor },
35
+ ];
32
36
  const getIconColor = () => {
33
37
  if (iconColor)
34
38
  return iconColor;
@@ -120,31 +124,34 @@ const NavigationItem = ({ iconName, label, variant = 'default', size = 'medium',
120
124
  };
121
125
  const Content = (<>
122
126
  {layout !== 'list' && iconName && (<View style={iconContainerStyle}>
123
- <Icon name={iconName} size={getIconSize()} color={getIconColor()}/>
127
+ <Icon name={iconName} size={getIconSize()} color={getIconColor()} style={{}}/>
124
128
  </View>)}
125
129
 
126
130
  {layout === 'expanded' && description ? (<View style={styles.textContainer}>
127
- <SEText type="sm-body-semibold" color={variant === 'disabled' ? '#9CA3AF' : textColor || '#1B244B'} style={styles.labelExpanded} numberOfLines={1}>
131
+ <Text style={[styles.labelExpanded, variant === 'disabled' && { color: '#9CA3AF' }, textColor && { color: textColor }]} numberOfLines={1}>
128
132
  {label}
129
- </SEText>
133
+ </Text>
130
134
  <View style={styles.descriptionContainer}>
131
- <SEText type="xs-body" color="#6B7280" style={styles.description} numberOfLines={2}>
135
+ <Text style={styles.description} numberOfLines={2}>
132
136
  {description}
133
- </SEText>
137
+ </Text>
134
138
  </View>
135
- </View>) : (layout === 'list' ? (<SEText type="heading-4" color={textColor || '#1B244B'} style={{ flex: 1 }} numberOfLines={1}>
136
- {label}
137
- </SEText>) : (<SEText type="sm-body-semibold" color={variant === 'disabled' ? '#9CA3AF' : variant === 'selected' ? '#1B244B' : textColor || '#1B244B'} style={labelStyle} numberOfLines={1}>
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}>
138
145
  {label}
139
- </SEText>))}
146
+ </Text>))}
140
147
 
141
148
  {showArrow && variant !== 'disabled' && (<View style={styles.arrowContainer}>
142
- <Icon name={layout === 'list' ? 'arrow-right-s-line' : 'arrow-right-line'} size={getArrowSize()} color={getArrowColor()}/>
149
+ <Icon name={layout === 'list' ? 'arrow-right-s-line' : 'arrow-right-line'} size={getArrowSize()} color={getArrowColor()} style={{}}/>
143
150
  </View>)}
144
151
 
145
152
  {/* Badge "Novo" posicionado no canto direito, interno ao container */}
146
153
  {badge && (<View style={getBadgeStyle()}>
147
- <SEText type="xxxs-body" color="#FFFFFF" style={[styles.figmaBadgeText, getBadgeTextSize()]}>{badge}</SEText>
154
+ <Text style={[styles.figmaBadgeText, getBadgeTextSize()]}>{badge}</Text>
148
155
  </View>)}
149
156
  </>);
150
157
  if (onPress && variant !== 'disabled') {
@@ -272,9 +279,10 @@ const styles = StyleSheet.create({
272
279
  // Label Base
273
280
  label: {
274
281
  flex: 1,
282
+ fontWeight: '600',
275
283
  flexShrink: 1, // Permite que o texto se compresse se necessário
276
284
  },
277
- // Label Sizes (mantidos para compatibilidade, mas não mais necessários com SEText)
285
+ // Label Sizes
278
286
  labelSmall: {
279
287
  fontSize: 12,
280
288
  lineHeight: 16,
@@ -297,6 +305,8 @@ const styles = StyleSheet.create({
297
305
  labelExpanded: {
298
306
  fontSize: 16,
299
307
  lineHeight: 22,
308
+ // fontWeight: '600',
309
+ // Removido marginBottom pois agora usamos descriptionContainer para espaçamento
300
310
  },
301
311
  descriptionContainer: {
302
312
  marginTop: 6, // Espaçamento entre o título e a descrição
@@ -304,8 +314,10 @@ const styles = StyleSheet.create({
304
314
  description: {
305
315
  fontSize: 12,
306
316
  lineHeight: 18, // Aumentado para melhor legibilidade
317
+ color: '#6B7280',
318
+ // fontWeight: '400',
307
319
  },
308
- // Label Variants (não mais necessários com SEText gerenciando cores)
320
+ // Label Variants
309
321
  labelDefault: {
310
322
  color: '#1B244B',
311
323
  },
@@ -368,6 +380,7 @@ const styles = StyleSheet.create({
368
380
  borderBottomRightRadius: 10,
369
381
  },
370
382
  figmaBadgeText: {
383
+ color: '#FFFFFF',
371
384
  fontWeight: '700',
372
385
  textAlign: 'center',
373
386
  },
@@ -383,6 +396,7 @@ const styles = StyleSheet.create({
383
396
  zIndex: 10,
384
397
  },
385
398
  topBadgeText: {
399
+ color: '#FFFFFF',
386
400
  fontSize: 10,
387
401
  fontWeight: '600',
388
402
  },
@@ -400,6 +414,7 @@ const styles = StyleSheet.create({
400
414
  paddingHorizontal: 6,
401
415
  },
402
416
  badgeText: {
417
+ color: '#FFFFFF',
403
418
  fontSize: 10,
404
419
  fontWeight: '600',
405
420
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpt-sebraeds",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
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",