sapo-components-ui-rn 1.0.11 → 1.0.13

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.
@@ -22,7 +22,8 @@ export interface ButtonProps extends TouchableOpacityProps {
22
22
  mode?: "outlined" | "contained" | "transparent";
23
23
  transparent?: boolean;
24
24
  onPress?: (res?: any) => void;
25
+ full?: boolean;
25
26
  theme?: ThemeProp;
26
27
  }
27
- declare const _default: React.MemoExoticComponent<({ style, title, border, borderColor, isLoading, left, right, small, margin, textStyle, textProps, onPress, disabled, backgroundColor, textColor, bold, size, medium, mode, transparent, theme: themeOverrides, ...props }: ButtonProps) => React.JSX.Element>;
28
+ declare const _default: React.MemoExoticComponent<({ style, title, border, borderColor, isLoading, left, right, small, margin, textStyle, textProps, onPress, disabled, backgroundColor, textColor, bold, size, medium, mode, transparent, full, theme: themeOverrides, ...props }: ButtonProps) => React.JSX.Element>;
28
29
  export default _default;
package/dist/index.esm.js CHANGED
@@ -5894,7 +5894,7 @@ var ScaleButton = function (_a) {
5894
5894
  var ScaleButton$1 = React__default.memo(ScaleButton);
5895
5895
 
5896
5896
  var Button = function (_a) {
5897
- var style = _a.style, title = _a.title; _a.border; var borderColor = _a.borderColor, isLoading = _a.isLoading, left = _a.left, right = _a.right, small = _a.small; _a.margin; var textStyle = _a.textStyle, textProps = _a.textProps, onPress = _a.onPress, disabled = _a.disabled, backgroundColor = _a.backgroundColor, textColor = _a.textColor, _b = _a.bold, bold = _b === void 0 ? true : _b, _c = _a.size, size = _c === void 0 ? 16 : _c, _d = _a.medium, medium = _d === void 0 ? false : _d, _e = _a.mode, mode = _e === void 0 ? "contained" : _e; _a.transparent; _a.theme; var props = __rest(_a, ["style", "title", "border", "borderColor", "isLoading", "left", "right", "small", "margin", "textStyle", "textProps", "onPress", "disabled", "backgroundColor", "textColor", "bold", "size", "medium", "mode", "transparent", "theme"]);
5897
+ var style = _a.style, title = _a.title; _a.border; var borderColor = _a.borderColor, isLoading = _a.isLoading, left = _a.left, right = _a.right, small = _a.small; _a.margin; var textStyle = _a.textStyle, textProps = _a.textProps, onPress = _a.onPress, disabled = _a.disabled, backgroundColor = _a.backgroundColor, textColor = _a.textColor, _b = _a.bold, bold = _b === void 0 ? true : _b, _c = _a.size, size = _c === void 0 ? 16 : _c, _d = _a.medium, medium = _d === void 0 ? false : _d, _e = _a.mode, mode = _e === void 0 ? "contained" : _e; _a.transparent; var _g = _a.full, full = _g === void 0 ? false : _g; _a.theme; var props = __rest(_a, ["style", "title", "border", "borderColor", "isLoading", "left", "right", "small", "margin", "textStyle", "textProps", "onPress", "disabled", "backgroundColor", "textColor", "bold", "size", "medium", "mode", "transparent", "full", "theme"]);
5898
5898
  var theme = useInternalTheme();
5899
5899
  var colors = theme.colors;
5900
5900
  var disabledTextStyle = {
@@ -5923,7 +5923,9 @@ var Button = function (_a) {
5923
5923
  return colors.textBrandDefault;
5924
5924
  }
5925
5925
  };
5926
- return (React__default.createElement(View, { style: styles$9.container },
5926
+ return (React__default.createElement(View, { style: {
5927
+ flexDirection: full ? "column" : "row",
5928
+ } },
5927
5929
  React__default.createElement(ScaleButton$1, __assign({ activeOpacity: 0.8, onPress: onPress }, props, { disabled: disabled || false }),
5928
5930
  React__default.createElement(View, { style: [
5929
5931
  styles$9.button,
@@ -5950,21 +5952,19 @@ var Button = function (_a) {
5950
5952
  React__default.createElement(Spacer, { width: left ? CONSTANTS.SPACE_12 : CONSTANTS.SPACE_16 }),
5951
5953
  !isLoading && left,
5952
5954
  left && React__default.createElement(Spacer, { width: CONSTANTS.SPACE_8 }),
5953
- isLoading ? (React__default.createElement(ActivityIndicator$1, { color: (textStyle === null || textStyle === void 0 ? void 0 : textStyle.color) || colors.borderBrandDefault })) : (React__default.createElement(Text$1, __assign({ numberOfLines: 1, color: textColor || renderTextColor(), size: size, bold: bold, medium: medium, style: [disabled && disabledTextStyle, textStyle] }, textProps), title)),
5955
+ isLoading ? (React__default.createElement(ActivityIndicator$1, { color: (textStyle === null || textStyle === void 0 ? void 0 : textStyle.color) || renderTextColor() })) : (React__default.createElement(Text$1, __assign({ numberOfLines: 1, color: textColor || renderTextColor(), size: size, bold: bold, medium: medium, style: [disabled && disabledTextStyle, textStyle] }, textProps), title)),
5954
5956
  right && React__default.createElement(Spacer, { width: CONSTANTS.SPACE_8 }),
5955
5957
  !isLoading && right,
5956
5958
  React__default.createElement(Spacer, { width: right ? CONSTANTS.SPACE_12 : CONSTANTS.SPACE_16 })))));
5957
5959
  };
5958
5960
  var styles$9 = StyleSheet.create({
5959
- container: {
5960
- flexDirection: "row",
5961
- },
5962
5961
  disabled: { opacity: 0.6 },
5963
5962
  button: {
5964
5963
  height: CONSTANTS.BUTTON_HEIGHT,
5965
5964
  flexDirection: "row",
5966
5965
  alignItems: "center",
5967
5966
  justifyContent: "space-between",
5967
+ minWidth: CONSTANTS.DEVICE_WIDTH / 4.5,
5968
5968
  },
5969
5969
  border: {
5970
5970
  borderWidth: CONSTANTS.BORDER_WIDTH_1,
@@ -6779,11 +6779,10 @@ var SelectionField = function (_a) {
6779
6779
  },
6780
6780
  ] },
6781
6781
  label,
6782
- " ",
6783
- required && React__default.createElement(Text$1, { color: colors.textErrorDefault }, "*"))),
6782
+ required && React__default.createElement(Text$1, { color: colors.textErrorDefault }, " *"))),
6784
6783
  React__default.createElement(Text$1, __assign({ numberOfLines: 1, color: getColor(), size: size, style: [disabled && disabledTextStyle, textStyle] }, textProps),
6785
6784
  content.toString() === "" ? label : content,
6786
- required && content.toString() === "" && (React__default.createElement(Text$1, { color: colors.textErrorDefault }, "*")))),
6785
+ required && content.toString() === "" && (React__default.createElement(Text$1, { color: colors.textErrorDefault }, " *")))),
6787
6786
  right || React__default.createElement(Icon$1, { name: "IconArrowDown", type: "Svg", size: 24 }),
6788
6787
  React__default.createElement(Spacer, { width: SPACE_12 }))),
6789
6788
  error.length > 0 && (React__default.createElement(View, { paddingHorizontal: SPACE_12, paddingVertical: SPACE_4 },