sapo-components-ui-rn 1.0.47 → 1.0.48

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
@@ -356,6 +356,8 @@ var ref = {
356
356
  borderPrimaryFocused: blue.BLUE100,
357
357
  borderWarningInverseDefault: yellow.YELLOW40,
358
358
  borderSuccessInverseDefault: green.GREEN40,
359
+ toggleBackgroundDefault: ink.INK10,
360
+ toggleBackgroundActive: green.GREEN80,
359
361
  },
360
362
  },
361
363
  light: {
@@ -498,6 +500,8 @@ var ref = {
498
500
  borderPrimaryFocused: blue.BLUE100,
499
501
  borderWarningInverseDefault: yellow.YELLOW40,
500
502
  borderSuccessInverseDefault: green.GREEN40,
503
+ toggleBackgroundDefault: ink.INK10,
504
+ toggleBackgroundActive: green.GREEN80,
501
505
  },
502
506
  },
503
507
  },
@@ -1265,6 +1269,8 @@ var LightTheme = {
1265
1269
  borderPrimaryFocused: blue.BLUE100,
1266
1270
  borderWarningInverseDefault: yellow.YELLOW40,
1267
1271
  borderSuccessInverseDefault: green.GREEN40,
1272
+ toggleBackgroundDefault: ink.INK10,
1273
+ toggleBackgroundActive: green.GREEN80,
1268
1274
  },
1269
1275
  fonts: configureFonts(),
1270
1276
  animation: {
@@ -1411,6 +1417,8 @@ var DarkTheme = __assign(__assign({}, LightTheme), { dark: true, mode: "adaptive
1411
1417
  borderPrimaryFocused: blue.BLUE100,
1412
1418
  borderWarningInverseDefault: yellow.YELLOW40,
1413
1419
  borderSuccessInverseDefault: green.GREEN40,
1420
+ toggleBackgroundDefault: ink.INK10,
1421
+ toggleBackgroundActive: green.GREEN80,
1414
1422
  } });
1415
1423
 
1416
1424
  var DefaultTheme = LightTheme;
@@ -2027,7 +2035,7 @@ var getCheckedColor = function (_a) {
2027
2035
  if (color) {
2028
2036
  return color;
2029
2037
  }
2030
- return theme.colors.surfaceBrandDefault;
2038
+ return theme.colors.toggleBackgroundActive;
2031
2039
  };
2032
2040
  var getThumbTintColor = function (_a) {
2033
2041
  var theme = _a.theme, disabled = _a.disabled, value = _a.value, checkedColor = _a.checkedColor;
@@ -2037,17 +2045,17 @@ var getThumbTintColor = function (_a) {
2037
2045
  }
2038
2046
  if (disabled) {
2039
2047
  if (theme.dark) {
2040
- return theme.colors.backgroundPrimary;
2048
+ return theme.colors.toggleBackgroundDefault;
2041
2049
  }
2042
- return theme.colors.backgroundPrimary;
2050
+ return theme.colors.toggleBackgroundDefault;
2043
2051
  }
2044
2052
  if (value) {
2045
2053
  return checkedColor;
2046
2054
  }
2047
2055
  if (theme.dark) {
2048
- return theme.colors.backgroundPrimary;
2056
+ return theme.colors.toggleBackgroundDefault;
2049
2057
  }
2050
- return theme.colors.backgroundPrimary;
2058
+ return theme.colors.toggleBackgroundDefault;
2051
2059
  };
2052
2060
  var getOnTintColor = function (_a) {
2053
2061
  var theme = _a.theme, disabled = _a.disabled, value = _a.value, checkedColor = _a.checkedColor;
@@ -2057,17 +2065,17 @@ var getOnTintColor = function (_a) {
2057
2065
  }
2058
2066
  if (disabled) {
2059
2067
  if (theme.dark) {
2060
- return theme.colors.backgroundPrimary;
2068
+ return theme.colors.toggleBackgroundDefault;
2061
2069
  }
2062
- return theme.colors.backgroundPrimary;
2070
+ return theme.colors.toggleBackgroundDefault;
2063
2071
  }
2064
2072
  if (value) {
2065
2073
  return checkedColor;
2066
2074
  }
2067
2075
  if (theme.dark) {
2068
- return theme.colors.backgroundPrimary;
2076
+ return theme.colors.toggleBackgroundDefault;
2069
2077
  }
2070
- return theme.colors.backgroundPrimary;
2078
+ return theme.colors.toggleBackgroundDefault;
2071
2079
  };
2072
2080
  var getSwitchColor = function (_a) {
2073
2081
  var theme = _a.theme, disabled = _a.disabled, value = _a.value, color = _a.color;
@@ -2109,25 +2117,19 @@ var Switch = function (_a) {
2109
2117
  disabled: disabled,
2110
2118
  value: value,
2111
2119
  color: color,
2112
- }), checkedColor = _b.checkedColor, onTintColor = _b.onTintColor, thumbTintColor = _b.thumbTintColor;
2120
+ }), onTintColor = _b.onTintColor, thumbTintColor = _b.thumbTintColor;
2113
2121
  var props = version && version.major === 0 && version.minor <= 56
2114
2122
  ? {
2115
2123
  onTintColor: onTintColor,
2116
2124
  thumbTintColor: thumbTintColor,
2117
2125
  }
2118
- : Platform.OS === "web"
2119
- ? {
2120
- activeTrackColor: onTintColor,
2121
- thumbColor: thumbTintColor,
2122
- activeThumbColor: checkedColor,
2123
- }
2124
- : {
2125
- thumbColor: thumbTintColor,
2126
- trackColor: {
2127
- true: onTintColor,
2128
- false: onTintColor,
2129
- },
2130
- };
2126
+ : {
2127
+ thumbColor: thumbTintColor,
2128
+ trackColor: {
2129
+ true: onTintColor,
2130
+ false: onTintColor,
2131
+ },
2132
+ };
2131
2133
  return (React$3.createElement(View, { row: true },
2132
2134
  React$3.createElement(Switch$1, __assign({ value: value, disabled: disabled, onValueChange: disabled ? undefined : onValueChange }, props, rest))));
2133
2135
  };