sapo-components-ui-rn 1.1.6 → 1.1.8

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.esm.js CHANGED
@@ -6846,11 +6846,32 @@ var Badge = React__default.memo(function (_a) {
6846
6846
  return null;
6847
6847
  return BADGE_CONFIGS.sizes[badgeSize];
6848
6848
  }, [badgeSize]);
6849
+ var getColorProgress = useMemo(function () {
6850
+ var configs = {
6851
+ success: {
6852
+ color: colors.borderSuccessDefault,
6853
+ },
6854
+ error: {
6855
+ color: colors.borderErrorDefault,
6856
+ },
6857
+ info: {
6858
+ color: colors.iconPrimaryDefault,
6859
+ },
6860
+ warning: {
6861
+ color: colors.borderWarningDefault,
6862
+ },
6863
+ default: {
6864
+ color: colors.borderInfoDefault,
6865
+ },
6866
+ };
6867
+ return configs[type];
6868
+ }, [colors, type]);
6849
6869
  var typeStyles = useMemo(function () {
6850
6870
  var configs = {
6851
6871
  success: {
6852
6872
  default: {
6853
6873
  borderWidth: 0,
6874
+ borderColor: borderColor || colors.borderSuccessDefault,
6854
6875
  backgroundColor: backgroundColor || colors.surfaceSuccessDefault,
6855
6876
  },
6856
6877
  outline: {
@@ -6861,6 +6882,7 @@ var Badge = React__default.memo(function (_a) {
6861
6882
  error: {
6862
6883
  default: {
6863
6884
  borderWidth: 0,
6885
+ borderColor: borderColor || colors.borderErrorDefault,
6864
6886
  backgroundColor: backgroundColor || colors.surfaceCriticalDefault,
6865
6887
  },
6866
6888
  outline: {
@@ -6871,6 +6893,7 @@ var Badge = React__default.memo(function (_a) {
6871
6893
  info: {
6872
6894
  default: {
6873
6895
  borderWidth: 0,
6896
+ borderColor: borderColor || colors.borderPrimaryDefault,
6874
6897
  backgroundColor: backgroundColor || colors.surfacePrimaryInverseDefault,
6875
6898
  },
6876
6899
  outline: {
@@ -6881,6 +6904,7 @@ var Badge = React__default.memo(function (_a) {
6881
6904
  warning: {
6882
6905
  default: {
6883
6906
  borderWidth: 0,
6907
+ borderColor: borderColor || colors.borderWarningDefault,
6884
6908
  backgroundColor: backgroundColor || colors.surfaceWarningDefault,
6885
6909
  },
6886
6910
  outline: {
@@ -6891,6 +6915,7 @@ var Badge = React__default.memo(function (_a) {
6891
6915
  default: {
6892
6916
  default: {
6893
6917
  borderWidth: 0,
6918
+ borderColor: borderColor || colors.borderInfoDefault,
6894
6919
  backgroundColor: backgroundColor || colors.surfaceInfoDefault,
6895
6920
  },
6896
6921
  outline: {
@@ -6939,7 +6964,7 @@ var Badge = React__default.memo(function (_a) {
6939
6964
  return (React__default.createElement(View, { row: true },
6940
6965
  React__default.createElement(View, { row: true, center: true, borderRadius: 999, borderWidth: CONSTANTS.BORDER_WIDTH_1, style: [sizeStyles, typeStyles, style] },
6941
6966
  leftIcon && React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_4 }, leftIcon),
6942
- progressType !== "none" && (React__default.createElement(ProgressCircle, { progress: progressType, color: textColorStyle })),
6967
+ progressType !== "none" && (React__default.createElement(ProgressCircle, { progress: progressType, color: getColorProgress.color })),
6943
6968
  React__default.createElement(View, { paddingLeft: progressType !== "none" ? CONSTANTS.SPACE_4 : 0 },
6944
6969
  React__default.createElement(Text$1, { size: finalTextSize, color: textColor || textColorStyle, style: [styles$8.textMedium, textStyle] }, value)))));
6945
6970
  });