sapo-components-ui-rn 1.1.50 → 1.1.51

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,5 +1,5 @@
1
1
  import React from "react";
2
- import { StyleProp, ViewStyle, TouchableOpacityProps } from "react-native";
2
+ import { StyleProp, ViewStyle, TouchableOpacityProps, TextStyle } from "react-native";
3
3
  import { ThemeProp } from "../../types";
4
4
  export interface TextInputNumberProps extends TouchableOpacityProps {
5
5
  style?: StyleProp<ViewStyle>;
@@ -19,6 +19,7 @@ export interface TextInputNumberProps extends TouchableOpacityProps {
19
19
  type?: "integer" | "float";
20
20
  formatDecimal?: 1 | 2 | 3;
21
21
  required?: boolean;
22
+ labelStyle?: StyleProp<TextStyle>;
22
23
  }
23
- declare const _default: React.MemoExoticComponent<({ style, value, label, textError, left, right, onChangeText, disabled, theme: themeOverrides, prefix, suffix, clearButton, maxValue, minValue, type, formatDecimal, required, ...props }: TextInputNumberProps) => React.JSX.Element>;
24
+ declare const _default: React.MemoExoticComponent<({ style, value, label, textError, left, right, onChangeText, disabled, theme: themeOverrides, prefix, suffix, clearButton, maxValue, minValue, type, formatDecimal, required, labelStyle, ...props }: TextInputNumberProps) => React.JSX.Element>;
24
25
  export default _default;
package/dist/index.esm.js CHANGED
@@ -5664,7 +5664,7 @@ function formatNumberInput$1(value, formatDecimal) {
5664
5664
  return result;
5665
5665
  }
5666
5666
  var TextInputNumber = function (_a) {
5667
- var style = _a.style, _b = _a.value, value = _b === void 0 ? "" : _b, _c = _a.label, label = _c === void 0 ? "" : _c, _d = _a.textError, textError = _d === void 0 ? "" : _d, left = _a.left, right = _a.right, onChangeText = _a.onChangeText, _e = _a.disabled, disabled = _e === void 0 ? false : _e; _a.theme; var _f = _a.prefix, prefix = _f === void 0 ? "" : _f, _g = _a.suffix, suffix = _g === void 0 ? "" : _g, _h = _a.clearButton, clearButton = _h === void 0 ? false : _h, _j = _a.maxValue, maxValue = _j === void 0 ? 999999999999 : _j, _k = _a.minValue, minValue = _k === void 0 ? 0 : _k, _l = _a.type, type = _l === void 0 ? "integer" : _l, _m = _a.formatDecimal, formatDecimal = _m === void 0 ? 3 : _m, _o = _a.required, required = _o === void 0 ? false : _o, props = __rest(_a, ["style", "value", "label", "textError", "left", "right", "onChangeText", "disabled", "theme", "prefix", "suffix", "clearButton", "maxValue", "minValue", "type", "formatDecimal", "required"]);
5667
+ var style = _a.style, _b = _a.value, value = _b === void 0 ? "" : _b, _c = _a.label, label = _c === void 0 ? "" : _c, _d = _a.textError, textError = _d === void 0 ? "" : _d, left = _a.left, right = _a.right, onChangeText = _a.onChangeText, _e = _a.disabled, disabled = _e === void 0 ? false : _e; _a.theme; var _f = _a.prefix, prefix = _f === void 0 ? "" : _f, _g = _a.suffix, suffix = _g === void 0 ? "" : _g, _h = _a.clearButton, clearButton = _h === void 0 ? false : _h, _j = _a.maxValue, maxValue = _j === void 0 ? 999999999999 : _j, _k = _a.minValue, minValue = _k === void 0 ? 0 : _k, _l = _a.type, type = _l === void 0 ? "integer" : _l, _m = _a.formatDecimal, formatDecimal = _m === void 0 ? 3 : _m, _o = _a.required, required = _o === void 0 ? false : _o, labelStyle = _a.labelStyle, props = __rest(_a, ["style", "value", "label", "textError", "left", "right", "onChangeText", "disabled", "theme", "prefix", "suffix", "clearButton", "maxValue", "minValue", "type", "formatDecimal", "required", "labelStyle"]);
5668
5668
  var theme = useInternalTheme();
5669
5669
  var colors = theme.colors;
5670
5670
  var _p = useState(false), isShowModalKeyboard = _p[0], setIsShowModalKeyboard = _p[1];
@@ -6040,6 +6040,7 @@ var TextInputNumber = function (_a) {
6040
6040
  React__default.createElement(View, { full: true, paddingRight: SPACE_4 },
6041
6041
  !checkValueEmpty() && !checkLabelEmpty() && (React__default.createElement(View, null,
6042
6042
  React__default.createElement(Text$1, { size: 12, color: colors.textSecondary, style: [
6043
+ labelStyle,
6043
6044
  disabled && {
6044
6045
  color: colors.textPlaceholder,
6045
6046
  },
@@ -6048,7 +6049,9 @@ var TextInputNumber = function (_a) {
6048
6049
  },
6049
6050
  ] },
6050
6051
  label,
6051
- required && React__default.createElement(Text$1, { color: colors.textErrorDefault }, " *")))),
6052
+ required && (React__default.createElement(Text$1, { style: [labelStyle], color: colors.textErrorDefault },
6053
+ " ",
6054
+ "*"))))),
6052
6055
  React__default.createElement(View, { row: true, alignCenter: true },
6053
6056
  !checkValueEmpty() && prefix.toString() !== "" && (React__default.createElement(Text$1, { numberOfLines: 1, color: colors.textSecondary, style: [disabled && disabledTextStyle] },
6054
6057
  prefix, " ")),
@@ -7337,7 +7340,7 @@ var styles$3 = StyleSheet.create({
7337
7340
  });
7338
7341
 
7339
7342
  var SelectionField = function (_a) {
7340
- var style = _a.style, _b = _a.content, content = _b === void 0 ? "" : _b, _c = _a.label, label = _c === void 0 ? "" : _c, _d = _a.error, error = _d === void 0 ? "" : _d, borderColor = _a.borderColor; _a.left; var right = _a.right, textStyle = _a.textStyle; _a.labelStyle; var textProps = _a.textProps, onPress = _a.onPress, _e = _a.disabled, disabled = _e === void 0 ? false : _e, textColor = _a.textColor, labelColor = _a.labelColor; _a.theme; var _f = _a.required, required = _f === void 0 ? false : _f, props = __rest(_a, ["style", "content", "label", "error", "borderColor", "left", "right", "textStyle", "labelStyle", "textProps", "onPress", "disabled", "textColor", "labelColor", "theme", "required"]);
7343
+ var style = _a.style, _b = _a.content, content = _b === void 0 ? "" : _b, _c = _a.label, label = _c === void 0 ? "" : _c, _d = _a.error, error = _d === void 0 ? "" : _d, borderColor = _a.borderColor; _a.left; var right = _a.right, textStyle = _a.textStyle, labelStyle = _a.labelStyle, textProps = _a.textProps, onPress = _a.onPress, _e = _a.disabled, disabled = _e === void 0 ? false : _e, textColor = _a.textColor, labelColor = _a.labelColor; _a.theme; var _f = _a.required, required = _f === void 0 ? false : _f, props = __rest(_a, ["style", "content", "label", "error", "borderColor", "left", "right", "textStyle", "labelStyle", "textProps", "onPress", "disabled", "textColor", "labelColor", "theme", "required"]);
7341
7344
  var theme = useInternalTheme();
7342
7345
  var colors = theme.colors;
7343
7346
  var disabledTextStyle = {
@@ -7381,6 +7384,7 @@ var SelectionField = function (_a) {
7381
7384
  React__default.createElement(View, { full: true },
7382
7385
  content.toString() !== "" && label.toString() !== "" && (React__default.createElement(Text$1, { color: labelColor || colors.textSecondary, style: [
7383
7386
  styles$2.text12,
7387
+ labelStyle,
7384
7388
  disabled && {
7385
7389
  color: colors.textPlaceholder,
7386
7390
  },
@@ -7389,7 +7393,9 @@ var SelectionField = function (_a) {
7389
7393
  },
7390
7394
  ] },
7391
7395
  label,
7392
- required && React__default.createElement(Text$1, { color: colors.textErrorDefault }, " *"))),
7396
+ required && (React__default.createElement(Text$1, { style: [labelStyle], color: colors.textErrorDefault },
7397
+ " ",
7398
+ "*")))),
7393
7399
  React__default.createElement(Text$1, __assign({ numberOfLines: 1, color: getColor(), style: [disabled && disabledTextStyle, textStyle] }, textProps),
7394
7400
  content.toString() === "" ? label : content,
7395
7401
  required && content.toString() === "" && (React__default.createElement(Text$1, { color: colors.textErrorDefault }, " *")))),