@ornikar/kitt-universal 18.0.2 → 19.0.0

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/definitions/Button/Button.d.ts +1 -1
  3. package/dist/definitions/Button/Button.d.ts.map +1 -1
  4. package/dist/definitions/Button/utils/getButtonTextColorByType.d.ts +4 -0
  5. package/dist/definitions/Button/utils/getButtonTextColorByType.d.ts.map +1 -0
  6. package/dist/definitions/IconButton/IconButton.d.ts +1 -1
  7. package/dist/definitions/IconButton/IconButton.d.ts.map +1 -1
  8. package/dist/definitions/IconButton/utils/getIconButtonTextColorByColor.d.ts +4 -0
  9. package/dist/definitions/IconButton/utils/getIconButtonTextColorByColor.d.ts.map +1 -0
  10. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +1 -2
  11. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  12. package/dist/definitions/themes/late-ocean/button.d.ts +0 -1
  13. package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
  14. package/dist/definitions/themes/late-ocean/iconButton.d.ts +1 -1
  15. package/dist/index-node-18.18.cjs.js +22 -21
  16. package/dist/index-node-18.18.cjs.js.map +1 -1
  17. package/dist/index-node-18.18.cjs.web.js +22 -21
  18. package/dist/index-node-18.18.cjs.web.js.map +1 -1
  19. package/dist/index-node-18.18.es.mjs +22 -21
  20. package/dist/index-node-18.18.es.mjs.map +1 -1
  21. package/dist/index-node-18.18.es.web.mjs +22 -21
  22. package/dist/index-node-18.18.es.web.mjs.map +1 -1
  23. package/dist/index.es.android.js +22 -21
  24. package/dist/index.es.android.js.map +1 -1
  25. package/dist/index.es.ios.js +22 -21
  26. package/dist/index.es.ios.js.map +1 -1
  27. package/dist/index.es.js +22 -21
  28. package/dist/index.es.js.map +1 -1
  29. package/dist/index.es.web.js +22 -21
  30. package/dist/index.es.web.js.map +1 -1
  31. package/dist/linaria-themes-node-18.18.cjs.js +2 -10
  32. package/dist/linaria-themes-node-18.18.cjs.js.map +1 -1
  33. package/dist/linaria-themes-node-18.18.cjs.web.js +2 -10
  34. package/dist/linaria-themes-node-18.18.cjs.web.js.map +1 -1
  35. package/dist/linaria-themes-node-18.18.es.mjs +2 -10
  36. package/dist/linaria-themes-node-18.18.es.mjs.map +1 -1
  37. package/dist/linaria-themes-node-18.18.es.web.mjs +2 -10
  38. package/dist/linaria-themes-node-18.18.es.web.mjs.map +1 -1
  39. package/dist/linaria-themes.es.android.js +2 -10
  40. package/dist/linaria-themes.es.android.js.map +1 -1
  41. package/dist/linaria-themes.es.ios.js +2 -10
  42. package/dist/linaria-themes.es.ios.js.map +1 -1
  43. package/dist/linaria-themes.es.js +2 -10
  44. package/dist/linaria-themes.es.js.map +1 -1
  45. package/dist/linaria-themes.es.web.js +2 -10
  46. package/dist/linaria-themes.es.web.js.map +1 -1
  47. package/dist/tsbuildinfo +1 -1
  48. package/package.json +4 -4
  49. package/dist/definitions/Button/utils/getTextColorByType.d.ts +0 -4
  50. package/dist/definitions/Button/utils/getTextColorByType.d.ts.map +0 -1
package/dist/index.es.js CHANGED
@@ -555,14 +555,6 @@ var button = {
555
555
  activeColor: colors.hover
556
556
  }
557
557
  },
558
- white: {
559
- "default": {
560
- backgroundColor: 'rgba(255, 255, 255, 0.05)',
561
- pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
562
- hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
563
- focusBorderColor: 'rgba(255, 255, 255, 0.1)'
564
- }
565
- },
566
558
  danger: {
567
559
  "default": {
568
560
  backgroundColor: lateOceanColorPalette.warmEmbraceLight1,
@@ -1208,8 +1200,8 @@ var iconButton = {
1208
1200
  "default": {
1209
1201
  pressedBackgroundColor: button["default"]["default"].pressedBackgroundColor
1210
1202
  },
1211
- white: {
1212
- pressedBackgroundColor: button.white["default"].hoverBackgroundColor
1203
+ ghost: {
1204
+ pressedBackgroundColor: button["default"].ghost.pressedBackgroundColor
1213
1205
  },
1214
1206
  primary: {
1215
1207
  pressedBackgroundColor: lateOceanColorPalette.moonPurpleLight1
@@ -2069,13 +2061,11 @@ function TypographyIcon(_ref2) {
2069
2061
  return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
2070
2062
  }
2071
2063
 
2072
- var getTextColorByType = function (type, variant, isHovered, isPressed) {
2064
+ var getButtonTextColorByType = function (type, variant, isHovered, isPressed) {
2073
2065
  var isButtonInteractedWith = isHovered || isPressed;
2074
2066
  switch (type) {
2075
2067
  case 'primary':
2076
2068
  return variant === 'ghost' ? 'primary' : 'white';
2077
- case 'white':
2078
- return 'white';
2079
2069
  case 'danger':
2080
2070
  return 'danger';
2081
2071
  case 'subtle':
@@ -2165,7 +2155,7 @@ function ButtonContent(_ref3) {
2165
2155
  isPressed = _ref3.isPressed;
2166
2156
  _ref3.isFocused;
2167
2157
  var props = _objectWithoutProperties(_ref3, _excluded$J);
2168
- var color = isDisabled ? 'black-light' : getTextColorByType(type, variant, isHovered, isPressed);
2158
+ var color = isDisabled ? 'black-light' : getButtonTextColorByType(type, variant, isHovered, isPressed);
2169
2159
  return /*#__PURE__*/jsx(View, {
2170
2160
  _web: {
2171
2161
  // Make the multilines case work properly on web
@@ -6892,8 +6882,8 @@ function getBackgroundColor(color, isDisabled) {
6892
6882
  switch (color) {
6893
6883
  case 'primary':
6894
6884
  return 'kitt.iconButton.primary.pressed.backgroundColor';
6895
- case 'white':
6896
- return 'kitt.iconButton.white.pressed.backgroundColor';
6885
+ case 'ghost':
6886
+ return 'kitt.iconButton.ghost.pressed.backgroundColor';
6897
6887
  case 'black':
6898
6888
  default:
6899
6889
  return 'kitt.iconButton.black.pressed.backgroundColor';
@@ -7020,6 +7010,18 @@ function useNativeAnimation(_ref) {
7020
7010
  };
7021
7011
  }
7022
7012
 
7013
+ var getIconButtonTextColorByColor = function (color, disabled) {
7014
+ if (disabled) {
7015
+ return 'black-light';
7016
+ }
7017
+ switch (color) {
7018
+ case 'ghost':
7019
+ return 'white';
7020
+ default:
7021
+ return color;
7022
+ }
7023
+ };
7024
+
7023
7025
  function IconButton(_ref) {
7024
7026
  var icon = _ref.icon,
7025
7027
  _ref$color = _ref.color,
@@ -7084,7 +7086,7 @@ function IconButton(_ref) {
7084
7086
  alignItems: "center",
7085
7087
  justifyContent: "center",
7086
7088
  children: /*#__PURE__*/jsx(TypographyIcon, {
7087
- color: disabled ? 'black-light' : color,
7089
+ color: getIconButtonTextColorByColor(color, disabled),
7088
7090
  icon: icon
7089
7091
  })
7090
7092
  })]
@@ -7478,7 +7480,7 @@ var getIconButtonColor = function (messageType) {
7478
7480
  switch (messageType) {
7479
7481
  case 'success':
7480
7482
  case 'danger':
7481
- return 'white';
7483
+ return 'ghost';
7482
7484
  case 'warning':
7483
7485
  default:
7484
7486
  return 'black';
@@ -7705,7 +7707,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7705
7707
  "default": theme.button["default"],
7706
7708
  primary: theme.button.primary,
7707
7709
  danger: theme.button.danger,
7708
- white: theme.button.white,
7709
7710
  subtle: theme.button.subtle,
7710
7711
  'subtle-dark': theme.button['subtle-dark'],
7711
7712
  disabled: theme.button.disabled
@@ -7908,9 +7909,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7908
7909
  backgroundColor: theme.iconButton["default"].pressedBackgroundColor
7909
7910
  }
7910
7911
  },
7911
- white: {
7912
+ ghost: {
7912
7913
  pressed: {
7913
- backgroundColor: theme.iconButton.white.pressedBackgroundColor
7914
+ backgroundColor: theme.iconButton.ghost.pressedBackgroundColor
7914
7915
  }
7915
7916
  },
7916
7917
  primary: {