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.js CHANGED
@@ -5312,7 +5312,7 @@ var TextInputFlat = function (_a) {
5312
5312
  var font = theme.fonts.bodyLarge;
5313
5313
  var hasActiveOutline = parentState.focused || error;
5314
5314
  var _h = getConstants(), LABEL_PADDING_TOP = _h.LABEL_PADDING_TOP, FLAT_INPUT_OFFSET = _h.FLAT_INPUT_OFFSET, MIN_HEIGHT = _h.MIN_HEIGHT;
5315
- var _j = (reactNative.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"]);
5315
+ var _j = (reactNative.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"]);
5316
5316
  var fontSize = fontSizeStyle || MAXIMIZED_LABEL_FONT_SIZE;
5317
5317
  var lineHeight = lineHeightStyle || (reactNative.Platform.OS === "web" ? fontSize * 1.2 : undefined);
5318
5318
  var isPaddingHorizontalPassed = paddingHorizontal !== undefined && typeof paddingHorizontal === "number";
@@ -5532,11 +5532,7 @@ var TextInputFlat = function (_a) {
5532
5532
  renderPrefix(), render === null || render === void 0 ? void 0 :
5533
5533
  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: [
5534
5534
  styles$d.input,
5535
- __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
5536
- ? textAlign
5537
- : reactNative.I18nManager.getConstants().isRTL
5538
- ? "right"
5539
- : "left", marginTop: reactNative.Platform.OS === "android" ? SPACE_8 : SPACE_2 }),
5535
+ __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: reactNative.Platform.OS === "android" ? SPACE_8 : SPACE_2 }),
5540
5536
  contentStyle,
5541
5537
  ] })),
5542
5538
  renderSuffix())),
@@ -5786,11 +5782,7 @@ var TextInputDefault = function (_a) {
5786
5782
  ? activeColor
5787
5783
  : cursorColor, placeholderTextColor: placeholderTextColorBasedOnState, onFocus: onFocus, onBlur: onBlur, underlineColorAndroid: "transparent", multiline: multiline, style: [
5788
5784
  styles$c.input,
5789
- __assign(__assign({}, font), { fontSize: fontSize, lineHeight: lineHeight, fontWeight: fontWeight, color: inputTextColor, textAlignVertical: multiline ? "top" : "center", textAlign: textAlign
5790
- ? textAlign
5791
- : reactNative.I18nManager.getConstants().isRTL
5792
- ? "right"
5793
- : "left", height: height ? height : 48, paddingTop: getPaddingTopValue(), paddingBottom: multiline ? CONSTANTS.SPACE_4 : 0 }),
5785
+ __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 }),
5794
5786
  contentStyle,
5795
5787
  ] })),
5796
5788
  !multiline && renderSuffix()))),
@@ -6108,7 +6100,6 @@ var TextInputNumber = function (_a) {
6108
6100
  }
6109
6101
  return false;
6110
6102
  };
6111
- console.log(value, "value");
6112
6103
  var checkLabelEmpty = function () {
6113
6104
  if (label === undefined || label === null || label.toString() === "") {
6114
6105
  return true;
@@ -6934,7 +6925,7 @@ var Toast = memoWithRef(function (_props, ref) {
6934
6925
  top: top ? top : CONSTANTS.SPACE_16,
6935
6926
  },
6936
6927
  ] },
6937
- React__default["default"].createElement(View, { row: !options.title, center: !options.title, full: true, onPress: onPressToast, style: [
6928
+ React__default["default"].createElement(View, { row: !options.title, center: !options.title, full: true, activeOpacity: 0.8, onPress: onPressToast, style: [
6938
6929
  styles$8.wrapContent,
6939
6930
  {
6940
6931
  shadowColor: "black",
@@ -7144,14 +7135,14 @@ var Checkbox = function (_a) {
7144
7135
  var colors = theme.colors;
7145
7136
  var _f = React$3.useState(checked), isActive = _f[0], setActive = _f[1];
7146
7137
  var checkboxColor = useCheckboxColor(isActive, disabled);
7147
- var handlePressChipBar = React$3.useCallback(function () {
7138
+ var handlePress = React$3.useCallback(function () {
7148
7139
  // setActive(!isActive);
7149
7140
  onPress === null || onPress === void 0 ? void 0 : onPress();
7150
7141
  }, [isActive, onPress]);
7151
7142
  React$3.useEffect(function () {
7152
7143
  setActive(checked);
7153
7144
  }, [checked]);
7154
- return (React__default["default"].createElement(View, { row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePressChipBar },
7145
+ return (React__default["default"].createElement(View, { row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePress },
7155
7146
  leftIcon ? (React__default["default"].createElement(View, { paddingRight: CONSTANTS.SPACE_8 }, leftIcon)) : (React__default["default"].createElement(View, { paddingRight: CONSTANTS.SPACE_8 },
7156
7147
  React__default["default"].createElement(Icon$1, { name: isActive ? "IconCheckboxActive" : "IconCheckbox", type: "Svg", size: iconSize, color: checkboxColor }))),
7157
7148
  React__default["default"].createElement(View, null,
@@ -7173,10 +7164,9 @@ var RadioButton = function (_a) {
7173
7164
  var theme = useInternalTheme();
7174
7165
  var colors = theme.colors;
7175
7166
  var _e = React$3.useState(checked), isActive = _e[0], setActive = _e[1];
7176
- var handlePressChipBar = React$3.useCallback(function () {
7177
- setActive(!isActive);
7167
+ var handlePress = React$3.useCallback(function () {
7178
7168
  onPress === null || onPress === void 0 ? void 0 : onPress();
7179
- }, [isActive]);
7169
+ }, [onPress]);
7180
7170
  React$3.useEffect(function () {
7181
7171
  setActive(checked);
7182
7172
  }, [checked]);
@@ -7189,7 +7179,7 @@ var RadioButton = function (_a) {
7189
7179
  }
7190
7180
  return colors.surfacePrimaryDefault;
7191
7181
  }, [isActive, disabled]);
7192
- return (React__default["default"].createElement(View, { row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePressChipBar },
7182
+ return (React__default["default"].createElement(View, { row: true, disabled: disabled, alignCenter: true, style: [style], onPress: handlePress },
7193
7183
  leftIcon ? (React__default["default"].createElement(View, { paddingRight: CONSTANTS.SPACE_8 }, leftIcon)) : (React__default["default"].createElement(View, { paddingRight: CONSTANTS.SPACE_8 },
7194
7184
  React__default["default"].createElement(Icon$1, { name: disabled
7195
7185
  ? "IconRadioDisable"