sapo-components-ui-rn 1.0.15 → 1.0.17

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.
@@ -7,7 +7,6 @@ interface ViewProps {
7
7
  justifyBetween?: boolean;
8
8
  alignCenter?: boolean;
9
9
  center?: boolean;
10
- gap?: number;
11
10
  color?: any;
12
11
  backgroundColor?: any;
13
12
  width?: number | `${number}%`;
@@ -34,5 +33,5 @@ interface ViewProps {
34
33
  borderWidth?: number;
35
34
  borderColor?: string;
36
35
  }
37
- declare const _default: React.MemoExoticComponent<({ row, full, justifyCenter, justifyBetween, alignCenter, center, color, backgroundColor, width, height, padding, paddingHorizontal, paddingVertical, marginHorizontal, marginVertical, paddingLeft, paddingRight, paddingTop, alignEnd, wrap, borderBottomWidth, borderBottomColor, borderRadius, borderWidth, borderColor, style, onPress, activeOpacity, children, disabled, }: ViewProps) => React.JSX.Element>;
36
+ declare const _default: React.MemoExoticComponent<({ row, full, justifyCenter, justifyBetween, alignCenter, center, color, backgroundColor, width, height, padding, paddingHorizontal, paddingVertical, marginHorizontal, marginVertical, paddingLeft, paddingRight, paddingTop, alignEnd, wrap, borderBottomWidth, borderBottomColor, borderRadius, borderWidth, borderColor, style, onPress, activeOpacity, children, disabled, paddingBottom, }: ViewProps) => React.JSX.Element>;
38
37
  export default _default;
package/dist/index.esm.js CHANGED
@@ -1907,7 +1907,7 @@ var styles$g = StyleSheet.create({
1907
1907
  });
1908
1908
 
1909
1909
  var ViewCustom = function (_a) {
1910
- var row = _a.row, full = _a.full, justifyCenter = _a.justifyCenter, justifyBetween = _a.justifyBetween, alignCenter = _a.alignCenter, center = _a.center, color = _a.color, backgroundColor = _a.backgroundColor, width = _a.width, height = _a.height, padding = _a.padding, paddingHorizontal = _a.paddingHorizontal, paddingVertical = _a.paddingVertical, marginHorizontal = _a.marginHorizontal, marginVertical = _a.marginVertical, paddingLeft = _a.paddingLeft, paddingRight = _a.paddingRight, paddingTop = _a.paddingTop, alignEnd = _a.alignEnd, wrap = _a.wrap, borderBottomWidth = _a.borderBottomWidth, borderBottomColor = _a.borderBottomColor, borderRadius = _a.borderRadius, borderWidth = _a.borderWidth, borderColor = _a.borderColor, style = _a.style, onPress = _a.onPress, activeOpacity = _a.activeOpacity, children = _a.children, disabled = _a.disabled;
1910
+ var row = _a.row, full = _a.full, justifyCenter = _a.justifyCenter, justifyBetween = _a.justifyBetween, alignCenter = _a.alignCenter, center = _a.center, color = _a.color, backgroundColor = _a.backgroundColor, width = _a.width, height = _a.height, padding = _a.padding, paddingHorizontal = _a.paddingHorizontal, paddingVertical = _a.paddingVertical, marginHorizontal = _a.marginHorizontal, marginVertical = _a.marginVertical, paddingLeft = _a.paddingLeft, paddingRight = _a.paddingRight, paddingTop = _a.paddingTop, alignEnd = _a.alignEnd, wrap = _a.wrap, borderBottomWidth = _a.borderBottomWidth, borderBottomColor = _a.borderBottomColor, borderRadius = _a.borderRadius, borderWidth = _a.borderWidth, borderColor = _a.borderColor, style = _a.style, onPress = _a.onPress, activeOpacity = _a.activeOpacity, children = _a.children, disabled = _a.disabled, paddingBottom = _a.paddingBottom;
1911
1911
  var getStyle = function () {
1912
1912
  var styleCustom = {};
1913
1913
  if (row) {
@@ -1977,6 +1977,9 @@ var ViewCustom = function (_a) {
1977
1977
  if (borderBottomColor) {
1978
1978
  styleCustom.borderBottomColor = borderBottomColor;
1979
1979
  }
1980
+ if (paddingBottom) {
1981
+ styleCustom.paddingBottom = paddingBottom;
1982
+ }
1980
1983
  if (borderRadius) {
1981
1984
  styleCustom.borderRadius = borderRadius;
1982
1985
  }
@@ -5588,7 +5591,7 @@ var TextInputDefault = function (_a) {
5588
5591
  return React$3.createElement(View, null);
5589
5592
  };
5590
5593
  return (React$3.createElement(View, { style: viewStyle },
5591
- React$3.createElement(View, { row: true, alignCenter: true, style: [
5594
+ React$3.createElement(View, { row: true, alignCenter: true, justifyCenter: true, style: [
5592
5595
  {
5593
5596
  borderRadius: CONSTANTS.BORDER_RADIUS_6,
5594
5597
  borderWidth: 1,
@@ -5601,7 +5604,9 @@ var TextInputDefault = function (_a) {
5601
5604
  ] },
5602
5605
  React$3.createElement(View, { paddingLeft: CONSTANTS.SPACE_12 }, left),
5603
5606
  left && React$3.createElement(Spacer, { width: CONSTANTS.SPACE_8 }),
5604
- React$3.createElement(View, { full: true },
5607
+ React$3.createElement(View, { full: true, style: {
5608
+ height: height || 48,
5609
+ } },
5605
5610
  multiline && renderLabel(), render === null || render === void 0 ? void 0 :
5606
5611
  render(__assign(__assign({}, rest), { ref: innerRef, onChangeText: handleChangeText, value: inputValue, placeholder: ((_b = parentState.value) === null || _b === void 0 ? void 0 : _b.toString()) == ""
5607
5612
  ? parentState.focused
@@ -5616,7 +5621,7 @@ var TextInputDefault = function (_a) {
5616
5621
  : "left", height: height ? height : 48 }),
5617
5622
  contentStyle,
5618
5623
  ] }))),
5619
- !disabled && clearButton && inputValue ? (React$3.createElement(TouchableOpacity, { onPress: handleClear, style: styles$a.clearButton },
5624
+ !disabled && clearButton && inputValue ? (React$3.createElement(TouchableOpacity, { onPress: handleClear, style: multiline ? styles$a.clearButtonMultiline : styles$a.clearButton },
5620
5625
  React$3.createElement(Icon$1, { name: "IconClearText", type: "Svg", size: 24 }))) : (React$3.createElement(Spacer, { width: CONSTANTS.SPACE_12 })),
5621
5626
  right && React$3.createElement(Spacer, { width: CONSTANTS.SPACE_8 }),
5622
5627
  right && React$3.createElement(View, { paddingRight: CONSTANTS.SPACE_12 }, right))));
@@ -5629,11 +5634,14 @@ var styles$a = StyleSheet.create({
5629
5634
  paddingLeft: 0,
5630
5635
  paddingTop: Platform.OS === "ios" ? CONSTANTS.SPACE_4 : CONSTANTS.SPACE_2,
5631
5636
  },
5632
- clearButton: {
5637
+ clearButtonMultiline: {
5633
5638
  paddingRight: CONSTANTS.SPACE_12,
5634
5639
  height: "100%",
5635
5640
  paddingTop: CONSTANTS.SPACE_12,
5636
5641
  },
5642
+ clearButton: {
5643
+ justifyContent: "center",
5644
+ },
5637
5645
  });
5638
5646
 
5639
5647
  var roundLayoutSize = function (size) {
@@ -5926,9 +5934,7 @@ var Button = function (_a) {
5926
5934
  return colors.textBrandDefault;
5927
5935
  }
5928
5936
  };
5929
- return (React__default.createElement(View, { style: {
5930
- flexDirection: full ? "column" : "row",
5931
- } },
5937
+ return (React__default.createElement(View, { row: !full },
5932
5938
  React__default.createElement(ScaleButton$1, __assign({ activeOpacity: 0.8, onPress: onPress }, props, { disabled: disabled || false }),
5933
5939
  React__default.createElement(View, { style: [
5934
5940
  styles$9.button,
@@ -6744,6 +6750,9 @@ var SelectionField = function (_a) {
6744
6750
  return colors.textPlaceholder;
6745
6751
  if (error.length > 0)
6746
6752
  return colors.textErrorDefault;
6753
+ if (content.toString() === "") {
6754
+ return textColor || colors.textSecondary;
6755
+ }
6747
6756
  return textColor || colors.textDefault;
6748
6757
  };
6749
6758
  return (React__default.createElement(View, null,
@@ -6809,7 +6818,7 @@ var SearchInput = function (_a) {
6809
6818
  return (React__default.createElement(TextInput, { left: React__default.createElement(View, { paddingRight: SPACE_8 },
6810
6819
  React__default.createElement(Icon$1, { name: "IconSearch", type: "Svg", size: 24 })), disabled: disabled, value: value, clearButton: clearButton, mode: "default", placeholder: placeholder, right: rightIcon, onFocus: onFocus, onBlur: onBlur, allowFontScaling: false, onChangeText: onChangeText, contentStyle: [
6811
6820
  {
6812
- height: 36,
6821
+ height: 40,
6813
6822
  },
6814
6823
  style,
6815
6824
  ] }));