sapo-components-ui-rn 1.1.10 → 1.1.11

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.
@@ -14,10 +14,9 @@ export interface ButtonProps extends TouchableOpacityProps {
14
14
  margin?: number;
15
15
  textProps?: IText;
16
16
  textColor?: string;
17
- bold?: boolean;
18
- size?: number;
17
+ textBold?: boolean;
18
+ textSize?: number;
19
19
  textStyle?: TextStyle;
20
- medium?: boolean;
21
20
  mode?: "outlined" | "contained" | "transparent";
22
21
  transparent?: boolean;
23
22
  onPress?: (res?: any) => void;
@@ -28,5 +27,5 @@ export interface ButtonProps extends TouchableOpacityProps {
28
27
  critical?: boolean;
29
28
  width?: number;
30
29
  }
31
- declare const _default: React.MemoExoticComponent<({ style, title, border, borderColor, isLoading, left, right, margin, textStyle, textProps, onPress, disabled, backgroundColor, textColor, bold, medium, mode, transparent, full, theme: themeOverrides, buttonSize, size, critical, width, type, ...props }: ButtonProps) => React.JSX.Element>;
30
+ declare const _default: React.MemoExoticComponent<({ style, title, border, borderColor, isLoading, left, right, margin, textStyle, textProps, onPress, disabled, backgroundColor, textColor, textBold, mode, transparent, full, theme: themeOverrides, buttonSize, textSize, critical, width, type, ...props }: ButtonProps) => React.JSX.Element>;
32
31
  export default _default;
package/dist/index.esm.js CHANGED
@@ -6281,7 +6281,7 @@ var TextInput = forwardRef(function (_a, ref) {
6281
6281
  TextInput.Affix = TextInputAffix;
6282
6282
 
6283
6283
  var Button = function (_a) {
6284
- var style = _a.style, title = _a.title; _a.border; var borderColor = _a.borderColor, isLoading = _a.isLoading, left = _a.left, right = _a.right, margin = _a.margin, 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.medium, medium = _c === void 0 ? false : _c, _d = _a.mode, mode = _d === void 0 ? "contained" : _d; _a.transparent; var _f = _a.full, full = _f === void 0 ? false : _f; _a.theme; var _g = _a.buttonSize, buttonSize = _g === void 0 ? "normal" : _g, _h = _a.size, size = _h === void 0 ? buttonSize === "small" ? 14 : 16 : _h, _j = _a.critical, critical = _j === void 0 ? false : _j, width = _a.width, _k = _a.type, type = _k === void 0 ? "default" : _k, props = __rest(_a, ["style", "title", "border", "borderColor", "isLoading", "left", "right", "margin", "textStyle", "textProps", "onPress", "disabled", "backgroundColor", "textColor", "bold", "medium", "mode", "transparent", "full", "theme", "buttonSize", "size", "critical", "width", "type"]);
6284
+ var style = _a.style, title = _a.title; _a.border; var borderColor = _a.borderColor, isLoading = _a.isLoading, left = _a.left, right = _a.right, margin = _a.margin, textStyle = _a.textStyle, textProps = _a.textProps, onPress = _a.onPress, disabled = _a.disabled, backgroundColor = _a.backgroundColor, textColor = _a.textColor, _b = _a.textBold, textBold = _b === void 0 ? true : _b, _c = _a.mode, mode = _c === void 0 ? "contained" : _c; _a.transparent; var _e = _a.full, full = _e === void 0 ? false : _e; _a.theme; var _f = _a.buttonSize, buttonSize = _f === void 0 ? "normal" : _f, _g = _a.textSize, textSize = _g === void 0 ? buttonSize === "small" ? 14 : 16 : _g, _h = _a.critical, critical = _h === void 0 ? false : _h, width = _a.width, _j = _a.type, type = _j === void 0 ? "default" : _j, props = __rest(_a, ["style", "title", "border", "borderColor", "isLoading", "left", "right", "margin", "textStyle", "textProps", "onPress", "disabled", "backgroundColor", "textColor", "textBold", "mode", "transparent", "full", "theme", "buttonSize", "textSize", "critical", "width", "type"]);
6285
6285
  var theme = useInternalTheme();
6286
6286
  var colors = theme.colors;
6287
6287
  var disabledTextStyle = {
@@ -6349,7 +6349,11 @@ var Button = function (_a) {
6349
6349
  ], disabled: isLoading }, isLoading ? (React__default.createElement(ActivityIndicator, { color: (textStyle === null || textStyle === void 0 ? void 0 : textStyle.color) || colors.textBrandDefault })) : (React__default.createElement(View, { row: true },
6350
6350
  !isLoading && left,
6351
6351
  left && React__default.createElement(Spacer, { width: CONSTANTS.SPACE_4 }),
6352
- React__default.createElement(Text$1, __assign({ numberOfLines: 1, color: textColor || colors.textBrandDefault, size: size, bold: bold, medium: medium, style: [disabled && disabledTextStyle, textStyle] }, textProps), title),
6352
+ React__default.createElement(Text$1, __assign({ numberOfLines: 1, color: textColor || colors.textBrandDefault, size: textSize, bold: textBold, style: [
6353
+ disabled && disabledTextStyle,
6354
+ !textBold && styles$b.textMedium,
6355
+ textStyle,
6356
+ ] }, textProps), title),
6353
6357
  right && React__default.createElement(Spacer, { width: CONSTANTS.SPACE_4 }),
6354
6358
  !isLoading && right)))));
6355
6359
  }
@@ -6384,29 +6388,28 @@ var Button = function (_a) {
6384
6388
  ? CONSTANTS.SPACE_4
6385
6389
  : CONSTANTS.SPACE_8 })),
6386
6390
  React__default.createElement(View, { center: true },
6387
- React__default.createElement(Text$1, __assign({ numberOfLines: 1, color: textColor || renderTextColor(), size: size, medium: medium, style: [disabled && disabledTextStyle, textStyle] }, textProps), title)),
6391
+ React__default.createElement(Text$1, __assign({ numberOfLines: 1, color: textColor || renderTextColor(), size: textSize, bold: textBold, style: [
6392
+ disabled && disabledTextStyle,
6393
+ !textBold && styles$b.textMedium,
6394
+ textStyle,
6395
+ ] }, textProps), title)),
6388
6396
  right && (React__default.createElement(Spacer, { width: buttonSize === "small"
6389
6397
  ? CONSTANTS.SPACE_4
6390
6398
  : CONSTANTS.SPACE_8 })),
6391
6399
  !isLoading && right,
6392
6400
  React__default.createElement(Spacer, { width: right ? CONSTANTS.SPACE_12 : CONSTANTS.SPACE_16 })))))));
6393
6401
  };
6394
- var styles$b = StyleSheet.create({
6395
- disabled: { opacity: 0.6 },
6396
- button: {
6402
+ var styles$b = StyleSheet.create(__assign(__assign({}, containerStyles), { disabled: { opacity: 0.6 }, button: {
6397
6403
  height: CONSTANTS.BUTTON_HEIGHT,
6398
6404
  alignItems: "center",
6399
6405
  justifyContent: "center",
6400
6406
  minWidth: CONSTANTS.DEVICE_WIDTH / 4.5,
6401
- },
6402
- border: {
6407
+ }, border: {
6403
6408
  borderWidth: CONSTANTS.BORDER_WIDTH_1,
6404
6409
  backgroundColor: "transparent",
6405
- },
6406
- small: {
6410
+ }, small: {
6407
6411
  height: CONSTANTS.BUTTON_HEIGHT_SMALL,
6408
- },
6409
- });
6412
+ } }));
6410
6413
  var index$3 = React__default.memo(Button);
6411
6414
 
6412
6415
  var FloatingButton = function (_a) {