vpt-sebraeds 0.0.86 → 0.0.87

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.
@@ -39,6 +39,9 @@ const Input = React.forwardRef((
39
39
  labelIconStyle = {},
40
40
  onLabelIconPress = null,
41
41
  labelStyle,
42
+ inputStyle,
43
+ containerStyle,
44
+ showInfoIcon = true,
42
45
  ...textInputProps
43
46
  } = props;
44
47
 
@@ -188,10 +191,10 @@ const Input = React.forwardRef((
188
191
  return (
189
192
  <View style={styles.wrapper}>
190
193
  {renderLabel()}
191
- <View style={getContainerStyle()}>
194
+ <View style={[getContainerStyle(), containerStyle]}>
192
195
  <TextInput
193
196
  ref={ref}
194
- style={getInputStyle()}
197
+ style={[getInputStyle(), inputStyle]}
195
198
  placeholder={placeholder}
196
199
  value={value}
197
200
  onChangeText={handleChangeText}
@@ -203,14 +206,14 @@ const Input = React.forwardRef((
203
206
  placeholderTextColor="#BFBFBF"
204
207
  {...textInputProps}
205
208
  />
206
- {!disabled && tooltipProps ? (
209
+ {showInfoIcon && !disabled && tooltipProps ? (
207
210
  <TooltipCard
208
211
  {...tooltipProps}
209
212
  trigger={
210
213
  <Icon name="information-line" size={20} color="#687499" />
211
214
  }
212
215
  />
213
- ) : !disabled && (
216
+ ) : showInfoIcon && !disabled && (
214
217
  <Icon name="information-line" size={20} color="#687499" />
215
218
  )}
216
219
  {error && <Icon name="close-line" size={20} color="#FF4D4F" />}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Input/index.jsx"],"names":[],"mappings":";AAQA;;;;;GAKG;AACH,+EA+MG;kBA7N0C,OAAO"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Input/index.jsx"],"names":[],"mappings":";AAQA;;;;;GAKG;AACH,+EAkNG;kBAhO0C,OAAO"}
@@ -16,7 +16,7 @@ const Input = React.forwardRef((props, ref) => {
16
16
  const { label, placeholder, value, onChangeText, error, success, disabled, supportText, mask, maskType, tooltipProps, // <-- Adicione esta prop para receber o tooltip]
17
17
  variant = 'default',
18
18
  // Props para ícone ao lado do label
19
- labelIcon = false, labelIconName = 'information-line', labelIconSize = 16, labelIconColor = null, labelIconStyle = {}, onLabelIconPress = null, labelStyle, ...textInputProps } = props;
19
+ labelIcon = false, labelIconName = 'information-line', labelIconSize = 16, labelIconColor = null, labelIconStyle = {}, onLabelIconPress = null, labelStyle, inputStyle, containerStyle, showInfoIcon = true, ...textInputProps } = props;
20
20
  const handleChangeText = (text) => {
21
21
  const maskedText = applyMask(text, maskType);
22
22
  if (onChangeText) {
@@ -156,9 +156,9 @@ const Input = React.forwardRef((props, ref) => {
156
156
  };
157
157
  return (<View style={styles.wrapper}>
158
158
  {renderLabel()}
159
- <View style={getContainerStyle()}>
160
- <TextInput ref={ref} style={getInputStyle()} placeholder={placeholder} value={value} onChangeText={handleChangeText} onFocus={() => setIsFocused(true)} onBlur={() => setIsFocused(false)} editable={!disabled} keyboardType={getKeyboardType()} maxLength={getMaxLength()} placeholderTextColor="#BFBFBF" {...textInputProps}/>
161
- {!disabled && tooltipProps ? (<TooltipCard {...tooltipProps} trigger={<Icon name="information-line" size={20} color="#687499"/>}/>) : !disabled && (<Icon name="information-line" size={20} color="#687499"/>)}
159
+ <View style={[getContainerStyle(), containerStyle]}>
160
+ <TextInput ref={ref} style={[getInputStyle(), inputStyle]} placeholder={placeholder} value={value} onChangeText={handleChangeText} onFocus={() => setIsFocused(true)} onBlur={() => setIsFocused(false)} editable={!disabled} keyboardType={getKeyboardType()} maxLength={getMaxLength()} placeholderTextColor="#BFBFBF" {...textInputProps}/>
161
+ {showInfoIcon && !disabled && tooltipProps ? (<TooltipCard {...tooltipProps} trigger={<Icon name="information-line" size={20} color="#687499"/>}/>) : showInfoIcon && !disabled && (<Icon name="information-line" size={20} color="#687499"/>)}
162
162
  {error && <Icon name="close-line" size={20} color="#FF4D4F"/>}
163
163
  {success && <Icon name="check-line" size={20} color="#52C41A"/>}
164
164
  </View>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpt-sebraeds",
3
- "version": "0.0.86",
3
+ "version": "0.0.87",
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",