sapo-components-ui-rn 1.0.78 → 1.0.80

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.
package/dist/index.esm.js CHANGED
@@ -5279,7 +5279,7 @@ var TextInputFlat = function (_a) {
5279
5279
  var font = theme.fonts.bodyLarge;
5280
5280
  var hasActiveOutline = parentState.focused || error;
5281
5281
  var _h = getConstants(), LABEL_PADDING_TOP = _h.LABEL_PADDING_TOP, FLAT_INPUT_OFFSET = _h.FLAT_INPUT_OFFSET, MIN_HEIGHT = _h.MIN_HEIGHT;
5282
- var _j = (StyleSheet.flatten(style) || {}), fontSizeStyle = _j.fontSize, lineHeightStyle = _j.lineHeight, fontWeight = _j.fontWeight, height = _j.height, paddingHorizontal = _j.paddingHorizontal, textAlign = _j.textAlign; __rest(_j, ["fontSize", "lineHeight", "fontWeight", "height", "paddingHorizontal", "textAlign"]);
5282
+ var _j = (StyleSheet.flatten(style) || {}), fontSizeStyle = _j.fontSize, lineHeightStyle = _j.lineHeight, fontWeight = _j.fontWeight, height = _j.height, paddingHorizontal = _j.paddingHorizontal; _j.textAlign; __rest(_j, ["fontSize", "lineHeight", "fontWeight", "height", "paddingHorizontal", "textAlign"]);
5283
5283
  var fontSize = fontSizeStyle || MAXIMIZED_LABEL_FONT_SIZE;
5284
5284
  var lineHeight = lineHeightStyle || (Platform.OS === "web" ? fontSize * 1.2 : undefined);
5285
5285
  var isPaddingHorizontalPassed = paddingHorizontal !== undefined && typeof paddingHorizontal === "number";
@@ -5499,11 +5499,7 @@ var TextInputFlat = function (_a) {
5499
5499
  renderPrefix(), render === null || render === void 0 ? void 0 :
5500
5500
  render(__assign(__assign({}, rest), { ref: innerRef, onChangeText: handleChangeText, value: inputValue, placeholder: rest.placeholder, editable: !disabled && editable, selectionColor: selectionColor, cursorColor: typeof cursorColor === "undefined" ? activeColor : cursorColor, placeholderTextColor: placeholderTextColorBasedOnState, onFocus: onFocus, onBlur: onBlur, underlineColorAndroid: "transparent", multiline: multiline, style: [
5501
5501
  styles$d.input,
5502
- __assign(__assign({ paddingLeft: paddingLeft, paddingRight: paddingRight, paddingTop: parentState.focused || parentState.value ? SPACE_12 : 0 }, font), { fontSize: fontSize, lineHeight: lineHeight, fontWeight: fontWeight, color: inputTextColor, textAlignVertical: multiline ? "top" : "center", textAlign: textAlign
5503
- ? textAlign
5504
- : I18nManager.getConstants().isRTL
5505
- ? "right"
5506
- : "left", marginTop: Platform.OS === "android" ? SPACE_8 : SPACE_2 }),
5502
+ __assign(__assign({ paddingLeft: paddingLeft, paddingRight: paddingRight, paddingTop: parentState.focused || parentState.value ? SPACE_12 : 0 }, font), { fontSize: fontSize, lineHeight: lineHeight, fontWeight: fontWeight, color: inputTextColor, textAlignVertical: multiline ? "top" : "center", marginTop: Platform.OS === "android" ? SPACE_8 : SPACE_2 }),
5507
5503
  contentStyle,
5508
5504
  ] })),
5509
5505
  renderSuffix())),
@@ -5753,11 +5749,7 @@ var TextInputDefault = function (_a) {
5753
5749
  ? activeColor
5754
5750
  : cursorColor, placeholderTextColor: placeholderTextColorBasedOnState, onFocus: onFocus, onBlur: onBlur, underlineColorAndroid: "transparent", multiline: multiline, style: [
5755
5751
  styles$c.input,
5756
- __assign(__assign({}, font), { fontSize: fontSize, lineHeight: lineHeight, fontWeight: fontWeight, color: inputTextColor, textAlignVertical: multiline ? "top" : "center", textAlign: textAlign
5757
- ? textAlign
5758
- : I18nManager.getConstants().isRTL
5759
- ? "right"
5760
- : "left", height: height ? height : 48, paddingTop: getPaddingTopValue(), paddingBottom: multiline ? CONSTANTS.SPACE_4 : 0 }),
5752
+ __assign(__assign({}, font), { fontSize: fontSize, lineHeight: lineHeight, fontWeight: fontWeight, color: inputTextColor, textAlignVertical: multiline ? "top" : "center", height: height ? height : 48, paddingTop: getPaddingTopValue(), paddingBottom: multiline ? CONSTANTS.SPACE_4 : 0 }),
5761
5753
  contentStyle,
5762
5754
  ] })),
5763
5755
  !multiline && renderSuffix()))),
@@ -6075,7 +6067,6 @@ var TextInputNumber = function (_a) {
6075
6067
  }
6076
6068
  return false;
6077
6069
  };
6078
- console.log(value, "value");
6079
6070
  var checkLabelEmpty = function () {
6080
6071
  if (label === undefined || label === null || label.toString() === "") {
6081
6072
  return true;
@@ -6901,7 +6892,7 @@ var Toast = memoWithRef(function (_props, ref) {
6901
6892
  top: top ? top : CONSTANTS.SPACE_16,
6902
6893
  },
6903
6894
  ] },
6904
- React__default.createElement(View, { row: !options.title, center: !options.title, full: true, onPress: onPressToast, style: [
6895
+ React__default.createElement(View, { row: !options.title, center: !options.title, full: true, activeOpacity: 0.8, onPress: onPressToast, style: [
6905
6896
  styles$8.wrapContent,
6906
6897
  {
6907
6898
  shadowColor: "black",
@@ -7111,14 +7102,14 @@ var Checkbox = function (_a) {
7111
7102
  var colors = theme.colors;
7112
7103
  var _f = useState(checked), isActive = _f[0], setActive = _f[1];
7113
7104
  var checkboxColor = useCheckboxColor(isActive, disabled);
7114
- var handlePressChipBar = useCallback(function () {
7105
+ var handlePress = useCallback(function () {
7115
7106
  // setActive(!isActive);
7116
7107
  onPress === null || onPress === void 0 ? void 0 : onPress();
7117
7108
  }, [isActive, onPress]);
7118
7109
  useEffect(function () {
7119
7110
  setActive(checked);
7120
7111
  }, [checked]);
7121
- return (React__default.createElement(View, { row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePressChipBar },
7112
+ return (React__default.createElement(View, { row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePress },
7122
7113
  leftIcon ? (React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_8 }, leftIcon)) : (React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_8 },
7123
7114
  React__default.createElement(Icon$1, { name: isActive ? "IconCheckboxActive" : "IconCheckbox", type: "Svg", size: iconSize, color: checkboxColor }))),
7124
7115
  React__default.createElement(View, null,
@@ -7140,10 +7131,9 @@ var RadioButton = function (_a) {
7140
7131
  var theme = useInternalTheme();
7141
7132
  var colors = theme.colors;
7142
7133
  var _e = useState(checked), isActive = _e[0], setActive = _e[1];
7143
- var handlePressChipBar = useCallback(function () {
7144
- setActive(!isActive);
7134
+ var handlePress = useCallback(function () {
7145
7135
  onPress === null || onPress === void 0 ? void 0 : onPress();
7146
- }, [isActive]);
7136
+ }, [onPress]);
7147
7137
  useEffect(function () {
7148
7138
  setActive(checked);
7149
7139
  }, [checked]);
@@ -7156,7 +7146,7 @@ var RadioButton = function (_a) {
7156
7146
  }
7157
7147
  return colors.surfacePrimaryDefault;
7158
7148
  }, [isActive, disabled]);
7159
- return (React__default.createElement(View, { row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePressChipBar },
7149
+ return (React__default.createElement(View, { row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePress },
7160
7150
  leftIcon ? (React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_8 }, leftIcon)) : (React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_8 },
7161
7151
  React__default.createElement(Icon$1, { name: disabled
7162
7152
  ? "IconRadioDisable"