sapo-components-ui-rn 1.1.9 → 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.
package/dist/.DS_Store ADDED
Binary file
@@ -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;
@@ -8,7 +8,8 @@ export interface IText extends TextProps {
8
8
  center?: boolean;
9
9
  bold?: boolean;
10
10
  medium?: boolean;
11
- children?: any;
11
+ semibold?: boolean;
12
+ children?: React.ReactNode;
12
13
  theme?: ThemeProp;
13
14
  }
14
15
  declare const _default: React.MemoExoticComponent<React.ComponentType<IText>>;
package/dist/index.esm.js CHANGED
@@ -4776,7 +4776,7 @@ var Text = function (props) {
4776
4776
  fontSize: 14,
4777
4777
  lineHeight: 20,
4778
4778
  };
4779
- var _a = props.size, size = _a === void 0 ? 14 : _a, lineHeight = props.lineHeight, center = props.center, color = props.color, bold = props.bold, medium = props.medium;
4779
+ var _a = props.size, size = _a === void 0 ? 14 : _a, lineHeight = props.lineHeight, center = props.center, color = props.color, bold = props.bold, medium = props.medium, semibold = props.semibold;
4780
4780
  style.color = theme.colors.textDefault || "black";
4781
4781
  if (size) {
4782
4782
  style.fontSize = size;
@@ -4797,6 +4797,12 @@ var Text = function (props) {
4797
4797
  }
4798
4798
  }
4799
4799
  if (medium) {
4800
+ style.fontFamily = "Inter-Medium";
4801
+ if (Platform.OS === "ios") {
4802
+ style.fontWeight = "500";
4803
+ }
4804
+ }
4805
+ if (semibold) {
4800
4806
  style.fontFamily = "Inter-SemiBold";
4801
4807
  if (Platform.OS === "ios") {
4802
4808
  style.fontWeight = "600";
@@ -5481,7 +5487,7 @@ var TextInputDefault = function (_a) {
5481
5487
  if (height && typeof height !== "number") {
5482
5488
  console.warn("Currently we support only numbers in height prop");
5483
5489
  }
5484
- var placeholderTextColorBasedOnState = placeholderTextColor || colors.textSecondary;
5490
+ var placeholderTextColorBasedOnState = placeholderTextColor || colors.textPlaceholder;
5485
5491
  var getBorderColor = function () {
5486
5492
  if (disabled) {
5487
5493
  return theme.colors.surfacePrimaryDisabled;
@@ -6275,7 +6281,7 @@ var TextInput = forwardRef(function (_a, ref) {
6275
6281
  TextInput.Affix = TextInputAffix;
6276
6282
 
6277
6283
  var Button = function (_a) {
6278
- 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"]);
6279
6285
  var theme = useInternalTheme();
6280
6286
  var colors = theme.colors;
6281
6287
  var disabledTextStyle = {
@@ -6343,7 +6349,11 @@ var Button = function (_a) {
6343
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 },
6344
6350
  !isLoading && left,
6345
6351
  left && React__default.createElement(Spacer, { width: CONSTANTS.SPACE_4 }),
6346
- 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),
6347
6357
  right && React__default.createElement(Spacer, { width: CONSTANTS.SPACE_4 }),
6348
6358
  !isLoading && right)))));
6349
6359
  }
@@ -6378,29 +6388,28 @@ var Button = function (_a) {
6378
6388
  ? CONSTANTS.SPACE_4
6379
6389
  : CONSTANTS.SPACE_8 })),
6380
6390
  React__default.createElement(View, { center: true },
6381
- React__default.createElement(Text$1, __assign({ numberOfLines: 1, color: textColor || renderTextColor(), size: size, bold: bold, 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)),
6382
6396
  right && (React__default.createElement(Spacer, { width: buttonSize === "small"
6383
6397
  ? CONSTANTS.SPACE_4
6384
6398
  : CONSTANTS.SPACE_8 })),
6385
6399
  !isLoading && right,
6386
6400
  React__default.createElement(Spacer, { width: right ? CONSTANTS.SPACE_12 : CONSTANTS.SPACE_16 })))))));
6387
6401
  };
6388
- var styles$b = StyleSheet.create({
6389
- disabled: { opacity: 0.6 },
6390
- button: {
6402
+ var styles$b = StyleSheet.create(__assign(__assign({}, containerStyles), { disabled: { opacity: 0.6 }, button: {
6391
6403
  height: CONSTANTS.BUTTON_HEIGHT,
6392
6404
  alignItems: "center",
6393
6405
  justifyContent: "center",
6394
6406
  minWidth: CONSTANTS.DEVICE_WIDTH / 4.5,
6395
- },
6396
- border: {
6407
+ }, border: {
6397
6408
  borderWidth: CONSTANTS.BORDER_WIDTH_1,
6398
6409
  backgroundColor: "transparent",
6399
- },
6400
- small: {
6410
+ }, small: {
6401
6411
  height: CONSTANTS.BUTTON_HEIGHT_SMALL,
6402
- },
6403
- });
6412
+ } }));
6404
6413
  var index$3 = React__default.memo(Button);
6405
6414
 
6406
6415
  var FloatingButton = function (_a) {
@@ -7247,7 +7256,7 @@ var SearchInput = function (_a) {
7247
7256
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);
7248
7257
  }, debounceTime);
7249
7258
  return (React__default.createElement(TextInput, { left: React__default.createElement(View, null,
7250
- React__default.createElement(Icon$1, { name: "IconSearch", type: "Svg", size: 18 })), disabled: disabled, value: value, clearButton: clearButton, mode: "default", label: placeholder, placeholder: placeholder, right: rightIcon, onFocus: onFocus, onBlur: onBlur, allowFontScaling: false, onChangeText: debouncedOnChangeText, style: [
7259
+ React__default.createElement(Icon$1, { name: "IconSearch", type: "Svg", size: 18 })), disabled: disabled, value: value, clearButton: clearButton, mode: "default", label: placeholder, placeholder: placeholder, placeholderTextColor: colors.textPlaceholder, right: rightIcon, onFocus: onFocus, onBlur: onBlur, allowFontScaling: false, onChangeText: debouncedOnChangeText, style: [
7251
7260
  {
7252
7261
  height: height || 36,
7253
7262
  },