sapo-components-ui-rn 1.1.76 → 1.1.78

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.
@@ -15,10 +15,6 @@ export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
15
15
  type?: "integer" | "float";
16
16
  formatDecimal?: 1 | 2 | 3;
17
17
  required?: boolean;
18
- labelScaleValue?: number;
19
- labelStyle?: StyleProp<TextStyle>;
20
- textErrorStyle?: StyleProp<TextStyle>;
21
- height?: number;
22
18
  /**
23
19
  * If true, user won't be able to interact with the component.
24
20
  */
package/dist/index.esm.js CHANGED
@@ -4827,9 +4827,10 @@ var TextInputFlat = function (_a) {
4827
4827
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText("");
4828
4828
  }
4829
4829
  else {
4830
- setInputValue(value || "");
4830
+ if (inputValue !== value)
4831
+ setInputValue(value || "");
4831
4832
  }
4832
- }, [value]);
4833
+ }, [value, inputValue]);
4833
4834
  var handleChangeText = function (text) {
4834
4835
  setInputValue(text);
4835
4836
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);
@@ -5026,7 +5027,7 @@ var TextInputFlat = function (_a) {
5026
5027
  }
5027
5028
  return false;
5028
5029
  };
5029
- return (React$3.createElement(View$1, { style: { flex: 1 } },
5030
+ return (React$3.createElement(View$1, null,
5030
5031
  React$3.createElement(View$1, { style: {
5031
5032
  flexDirection: "row",
5032
5033
  alignItems: "center",
@@ -5153,9 +5154,10 @@ var TextInputDefault = function (_a) {
5153
5154
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText("");
5154
5155
  }
5155
5156
  else {
5156
- setInputValue(value || "");
5157
+ if (inputValue !== value)
5158
+ setInputValue(value || "");
5157
5159
  }
5158
- }, [value]);
5160
+ }, [value, inputValue]);
5159
5161
  var handleChangeText = function (text) {
5160
5162
  setInputValue(text);
5161
5163
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);
@@ -5281,7 +5283,7 @@ var TextInputDefault = function (_a) {
5281
5283
  }
5282
5284
  return false;
5283
5285
  };
5284
- return (React$3.createElement(View, { style: [{ flex: 1 }, viewStyle] },
5286
+ return (React$3.createElement(View, { style: viewStyle },
5285
5287
  React$3.createElement(View, { row: true, alignCenter: !multiline, justifyCenter: true, style: [
5286
5288
  {
5287
5289
  borderRadius: CONSTANTS.BORDER_RADIUS_6,
@@ -5354,6 +5356,7 @@ var styles$d = StyleSheet.create({
5354
5356
  clearButton: {
5355
5357
  justifyContent: "center",
5356
5358
  paddingHorizontal: CONSTANTS.SPACE_8,
5359
+ // alignItems: "center",
5357
5360
  },
5358
5361
  vError: {
5359
5362
  paddingTop: CONSTANTS.SPACE_4,
@@ -5756,7 +5759,7 @@ var TextInputNumber = function (_a) {
5756
5759
  setInputValue((value === null || value === void 0 ? void 0 : value.toString()) || "");
5757
5760
  }, 300);
5758
5761
  };
5759
- return (React__default.createElement(View, { style: { flex: 1 } },
5762
+ return (React__default.createElement(View, null,
5760
5763
  React__default.createElement(ScaleButton$1, __assign({ activeOpacity: 0.8, onPress: onShowModalKeyboard }, props, { disabled: disabled || false }),
5761
5764
  React__default.createElement(View, { style: [
5762
5765
  styles$c.container,
@@ -5974,7 +5977,7 @@ var DefaultRenderer = function (props) { return React__default.createElement(Tex
5974
5977
  * @extends TextInput props https://reactnative.dev/docs/textinput#props
5975
5978
  */
5976
5979
  var TextInput = forwardRef(function (_a, ref) {
5977
- var _b = _a.mode, mode = _b === void 0 ? "flat" : _b, _c = _a.dense, dense = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.error, errorProp = _e === void 0 ? false : _e, _f = _a.multiline, multiline = _f === void 0 ? false : _f, _g = _a.editable, editable = _g === void 0 ? true : _g, contentStyle = _a.contentStyle, _h = _a.render, render = _h === void 0 ? DefaultRenderer : _h; _a.theme; var placeholderTextColor = _a.placeholderTextColor, clearButton = _a.clearButton, textError = _a.textError, prefix = _a.prefix, suffix = _a.suffix, maxValue = _a.maxValue, minValue = _a.minValue, type = _a.type, _j = _a.required, required = _j === void 0 ? false : _j, labelStyle = _a.labelStyle, textErrorStyle = _a.textErrorStyle, height = _a.height, rest = __rest(_a, ["mode", "dense", "disabled", "error", "multiline", "editable", "contentStyle", "render", "theme", "placeholderTextColor", "clearButton", "textError", "prefix", "suffix", "maxValue", "minValue", "type", "required", "labelStyle", "textErrorStyle", "height"]);
5980
+ var _b = _a.mode, mode = _b === void 0 ? "flat" : _b, _c = _a.dense, dense = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.error, errorProp = _e === void 0 ? false : _e, _f = _a.multiline, multiline = _f === void 0 ? false : _f, _g = _a.editable, editable = _g === void 0 ? true : _g, contentStyle = _a.contentStyle, _h = _a.render, render = _h === void 0 ? DefaultRenderer : _h; _a.theme; var placeholderTextColor = _a.placeholderTextColor, clearButton = _a.clearButton, textError = _a.textError, prefix = _a.prefix, suffix = _a.suffix, maxValue = _a.maxValue, minValue = _a.minValue, type = _a.type, _j = _a.required, required = _j === void 0 ? false : _j, rest = __rest(_a, ["mode", "dense", "disabled", "error", "multiline", "editable", "contentStyle", "render", "theme", "placeholderTextColor", "clearButton", "textError", "prefix", "suffix", "maxValue", "minValue", "type", "required"]);
5978
5981
  var theme = useInternalTheme();
5979
5982
  var isControlled = rest.value !== undefined;
5980
5983
  var validInputValue = isControlled ? rest.value : rest.defaultValue;
@@ -6176,7 +6179,7 @@ var TextInput = forwardRef(function (_a, ref) {
6176
6179
  }, onFocus: handleFocus, forceFocus: forceFocus, onBlur: handleBlur, allowFontScaling: false, onChangeText: handleChangeText, onLayoutAnimatedText: handleLayoutAnimatedText, onInputLayout: handleInputContainerLayout, onLabelTextLayout: handleLabelTextLayout, onLeftAffixLayoutChange: onLeftAffixLayoutChange, onRightAffixLayoutChange: onRightAffixLayoutChange, maxFontSizeMultiplier: maxFontSizeMultiplier, contentStyle: contentStyle, scaledLabel: scaledLabel })));
6177
6180
  }
6178
6181
  if (mode === "number") {
6179
- return (React__default.createElement(TextInputNumber$1, { textError: textError, disabled: disabled, prefix: prefix, suffix: suffix, value: value, right: rest.right, left: rest.left, required: required, label: rest.label, clearButton: clearButton, onChangeText: handleChangeText, maxValue: maxValue, minValue: minValue, formatDecimal: rest.formatDecimal, type: type, labelStyle: labelStyle, textErrorStyle: textErrorStyle, contentStyle: contentStyle, height: height }));
6182
+ return (React__default.createElement(TextInputNumber$1, { textError: textError, disabled: disabled, prefix: prefix, suffix: suffix, value: value, right: rest.right, left: rest.left, required: required, label: rest.label, clearButton: clearButton, onChangeText: handleChangeText, maxValue: maxValue, minValue: minValue, formatDecimal: rest.formatDecimal, type: type }));
6180
6183
  }
6181
6184
  return (React__default.createElement(TextInputFlat, __assign({ dense: dense, disabled: disabled, error: errorProp, textError: textError, editable: editable, prefix: prefix, suffix: suffix, clearButton: clearButton, required: required, render: render }, rest, { theme: theme, value: value, parentState: {
6182
6185
  labeled: labeled,