sapo-components-ui-rn 1.1.75 → 1.1.77

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
@@ -5131,7 +5131,7 @@ var styles$e = StyleSheet.create({
5131
5131
 
5132
5132
  var TextInputDefault = function (_a) {
5133
5133
  var _b;
5134
- var _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.editable, editable = _d === void 0 ? true : _d, label = _a.label, _e = _a.error, error = _e === void 0 ? false : _e, customSelectionColor = _a.selectionColor, cursorColor = _a.cursorColor, customOutlineColor = _a.outlineColor, activeOutlineColor = _a.activeOutlineColor; _a.outlineStyle; var textColor = _a.textColor; _a.dense; var style = _a.style, theme = _a.theme, _f = _a.render, render = _f === void 0 ? function (props) { return React$3.createElement(TextInput$1, __assign({}, props)); } : _f, _g = _a.multiline, multiline = _g === void 0 ? false : _g, parentState = _a.parentState, innerRef = _a.innerRef, onFocus = _a.onFocus; _a.forceFocus; var onBlur = _a.onBlur, onChangeText = _a.onChangeText; _a.onLayout; var left = _a.left, right = _a.right, prefix = _a.prefix, suffix = _a.suffix, placeholderTextColor = _a.placeholderTextColor, _h = _a.clearButton, clearButton = _h === void 0 ? false : _h, contentStyle = _a.contentStyle, _j = _a.value, value = _j === void 0 ? "" : _j, textError = _a.textError, required = _a.required, rest = __rest(_a, ["disabled", "editable", "label", "error", "selectionColor", "cursorColor", "outlineColor", "activeOutlineColor", "outlineStyle", "textColor", "dense", "style", "theme", "render", "multiline", "parentState", "innerRef", "onFocus", "forceFocus", "onBlur", "onChangeText", "onLayout", "left", "right", "prefix", "suffix", "placeholderTextColor", "clearButton", "contentStyle", "value", "textError", "required"]);
5134
+ var _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.editable, editable = _d === void 0 ? true : _d, label = _a.label, _e = _a.error, error = _e === void 0 ? false : _e, customSelectionColor = _a.selectionColor, cursorColor = _a.cursorColor, customOutlineColor = _a.outlineColor, activeOutlineColor = _a.activeOutlineColor; _a.outlineStyle; var textColor = _a.textColor; _a.dense; var style = _a.style, theme = _a.theme, _f = _a.render, render = _f === void 0 ? function (props) { return React$3.createElement(TextInput$1, __assign({}, props)); } : _f, _g = _a.multiline, multiline = _g === void 0 ? false : _g, parentState = _a.parentState, innerRef = _a.innerRef, onFocus = _a.onFocus, forceFocus = _a.forceFocus, onBlur = _a.onBlur, onChangeText = _a.onChangeText; _a.onLayout; var left = _a.left, right = _a.right, prefix = _a.prefix, suffix = _a.suffix, placeholderTextColor = _a.placeholderTextColor, _h = _a.clearButton, clearButton = _h === void 0 ? false : _h, contentStyle = _a.contentStyle, _j = _a.value, value = _j === void 0 ? "" : _j, textError = _a.textError, required = _a.required, rest = __rest(_a, ["disabled", "editable", "label", "error", "selectionColor", "cursorColor", "outlineColor", "activeOutlineColor", "outlineStyle", "textColor", "dense", "style", "theme", "render", "multiline", "parentState", "innerRef", "onFocus", "forceFocus", "onBlur", "onChangeText", "onLayout", "left", "right", "prefix", "suffix", "placeholderTextColor", "clearButton", "contentStyle", "value", "textError", "required"]);
5135
5135
  var colors = theme.colors;
5136
5136
  var font = theme.fonts.bodyLarge;
5137
5137
  var _k = (StyleSheet.flatten(style) || {}), fontSizeStyle = _k.fontSize, fontWeight = _k.fontWeight, lineHeightStyle = _k.lineHeight, height = _k.height, _l = _k.backgroundColor; _l === void 0 ? colors === null || colors === void 0 ? void 0 : colors.backgroundPrimary : _l; var textAlign = _k.textAlign; _k.minHeight; var viewStyle = __rest(_k, ["fontSize", "fontWeight", "lineHeight", "height", "backgroundColor", "textAlign", "minHeight"]);
@@ -5197,13 +5197,17 @@ var TextInputDefault = function (_a) {
5197
5197
  var _a, _b;
5198
5198
  if (parentState.focused ||
5199
5199
  (parentState.value !== undefined && ((_a = parentState.value) === null || _a === void 0 ? void 0 : _a.toString()) !== "")) {
5200
- return (React$3.createElement(View, { paddingTop: CONSTANTS.SPACE_6 },
5200
+ return (React$3.createElement(View, { paddingTop: CONSTANTS.SPACE_6, onPress: function () {
5201
+ forceFocus();
5202
+ } },
5201
5203
  React$3.createElement(Text$1, { color: getLabelColor(), size: MINIMIZED_LABEL_FONT_SIZE },
5202
5204
  label,
5203
5205
  required && React$3.createElement(Text$1, { color: theme.colors.textErrorDefault }, " *"))));
5204
5206
  }
5205
5207
  else if (((_b = parentState.value) === null || _b === void 0 ? void 0 : _b.toString()) == "") {
5206
- return (React$3.createElement(View, { paddingTop: CONSTANTS.SPACE_12 },
5208
+ return (React$3.createElement(View, { paddingTop: CONSTANTS.SPACE_12, onPress: function () {
5209
+ forceFocus();
5210
+ } },
5207
5211
  React$3.createElement(Text$1, { color: getLabelColor(), style: [contentStyle] },
5208
5212
  label,
5209
5213
  required && (React$3.createElement(Text$1, { style: [contentStyle], color: theme.colors.textErrorDefault },
@@ -5793,7 +5797,7 @@ var TextInputNumber = function (_a) {
5793
5797
  left && (React__default.createElement(View, { center: true, paddingRight: SPACE_8, height: "100%" }, left)),
5794
5798
  React__default.createElement(View, { full: true, paddingRight: SPACE_4 },
5795
5799
  !checkValueEmpty() && !checkLabelEmpty() && (React__default.createElement(View, null,
5796
- React__default.createElement(Text$1, { size: 14, color: colors.textSecondary, style: [
5800
+ React__default.createElement(Text$1, { numberOfLines: 1, size: 14, color: colors.textSecondary, style: [
5797
5801
  labelStyle,
5798
5802
  disabled && {
5799
5803
  color: colors.textPlaceholder,
@@ -5971,7 +5975,7 @@ var DefaultRenderer = function (props) { return React__default.createElement(Tex
5971
5975
  * @extends TextInput props https://reactnative.dev/docs/textinput#props
5972
5976
  */
5973
5977
  var TextInput = forwardRef(function (_a, ref) {
5974
- 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"]);
5978
+ 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"]);
5975
5979
  var theme = useInternalTheme();
5976
5980
  var isControlled = rest.value !== undefined;
5977
5981
  var validInputValue = isControlled ? rest.value : rest.defaultValue;
@@ -6173,7 +6177,7 @@ var TextInput = forwardRef(function (_a, ref) {
6173
6177
  }, 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 })));
6174
6178
  }
6175
6179
  if (mode === "number") {
6176
- 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 }));
6180
+ 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 }));
6177
6181
  }
6178
6182
  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: {
6179
6183
  labeled: labeled,