@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
@@ -551,14 +551,6 @@ var button = {
551
551
  activeColor: colors.hover
552
552
  }
553
553
  },
554
- white: {
555
- "default": {
556
- backgroundColor: 'rgba(255, 255, 255, 0.05)',
557
- pressedBackgroundColor: 'rgba(255, 255, 255, 0.1)',
558
- hoverBackgroundColor: 'rgba(255, 255, 255, 0.1)',
559
- focusBorderColor: 'rgba(255, 255, 255, 0.1)'
560
- }
561
- },
562
554
  danger: {
563
555
  "default": {
564
556
  backgroundColor: lateOceanColorPalette.warmEmbraceLight1,
@@ -1204,8 +1196,8 @@ var iconButton = {
1204
1196
  "default": {
1205
1197
  pressedBackgroundColor: button["default"]["default"].pressedBackgroundColor
1206
1198
  },
1207
- white: {
1208
- pressedBackgroundColor: button.white["default"].hoverBackgroundColor
1199
+ ghost: {
1200
+ pressedBackgroundColor: button["default"].ghost.pressedBackgroundColor
1209
1201
  },
1210
1202
  primary: {
1211
1203
  pressedBackgroundColor: lateOceanColorPalette.moonPurpleLight1
@@ -2111,13 +2103,11 @@ function TypographyIcon(_ref2) {
2111
2103
  return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
2112
2104
  }
2113
2105
 
2114
- var getTextColorByType = function (type, variant, isHovered, isPressed) {
2106
+ var getButtonTextColorByType = function (type, variant, isHovered, isPressed) {
2115
2107
  var isButtonInteractedWith = isHovered || isPressed;
2116
2108
  switch (type) {
2117
2109
  case 'primary':
2118
2110
  return variant === 'ghost' ? 'primary' : 'white';
2119
- case 'white':
2120
- return 'white';
2121
2111
  case 'danger':
2122
2112
  return 'danger';
2123
2113
  case 'subtle':
@@ -2207,7 +2197,7 @@ function ButtonContent(_ref3) {
2207
2197
  isPressed = _ref3.isPressed;
2208
2198
  _ref3.isFocused;
2209
2199
  var props = _objectWithoutProperties(_ref3, _excluded$J);
2210
- var color = isDisabled ? 'black-light' : getTextColorByType(type, variant, isHovered, isPressed);
2200
+ var color = isDisabled ? 'black-light' : getButtonTextColorByType(type, variant, isHovered, isPressed);
2211
2201
  return /*#__PURE__*/jsx(View, {
2212
2202
  _web: {
2213
2203
  // Make the multilines case work properly on web
@@ -5893,8 +5883,8 @@ function getBackgroundColor$1(color, isDisabled) {
5893
5883
  switch (color) {
5894
5884
  case 'primary':
5895
5885
  return 'kitt.iconButton.primary.pressed.backgroundColor';
5896
- case 'white':
5897
- return 'kitt.iconButton.white.pressed.backgroundColor';
5886
+ case 'ghost':
5887
+ return 'kitt.iconButton.ghost.pressed.backgroundColor';
5898
5888
  case 'black':
5899
5889
  default:
5900
5890
  return 'kitt.iconButton.black.pressed.backgroundColor';
@@ -5999,6 +5989,18 @@ function useNativeAnimation() {
5999
5989
  };
6000
5990
  }
6001
5991
 
5992
+ var getIconButtonTextColorByColor = function (color, disabled) {
5993
+ if (disabled) {
5994
+ return 'black-light';
5995
+ }
5996
+ switch (color) {
5997
+ case 'ghost':
5998
+ return 'white';
5999
+ default:
6000
+ return color;
6001
+ }
6002
+ };
6003
+
6002
6004
  function IconButton(_ref) {
6003
6005
  var icon = _ref.icon,
6004
6006
  _ref$color = _ref.color,
@@ -6060,7 +6062,7 @@ function IconButton(_ref) {
6060
6062
  alignItems: "center",
6061
6063
  justifyContent: "center",
6062
6064
  children: /*#__PURE__*/jsx(TypographyIcon, {
6063
- color: disabled ? 'black-light' : color,
6065
+ color: getIconButtonTextColorByColor(color, disabled),
6064
6066
  icon: icon
6065
6067
  })
6066
6068
  })]
@@ -6454,7 +6456,7 @@ var getIconButtonColor = function (messageType) {
6454
6456
  switch (messageType) {
6455
6457
  case 'success':
6456
6458
  case 'danger':
6457
- return 'white';
6459
+ return 'ghost';
6458
6460
  case 'warning':
6459
6461
  default:
6460
6462
  return 'black';
@@ -6681,7 +6683,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
6681
6683
  "default": theme.button["default"],
6682
6684
  primary: theme.button.primary,
6683
6685
  danger: theme.button.danger,
6684
- white: theme.button.white,
6685
6686
  subtle: theme.button.subtle,
6686
6687
  'subtle-dark': theme.button['subtle-dark'],
6687
6688
  disabled: theme.button.disabled
@@ -6884,9 +6885,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
6884
6885
  backgroundColor: theme.iconButton["default"].pressedBackgroundColor
6885
6886
  }
6886
6887
  },
6887
- white: {
6888
+ ghost: {
6888
6889
  pressed: {
6889
- backgroundColor: theme.iconButton.white.pressedBackgroundColor
6890
+ backgroundColor: theme.iconButton.ghost.pressedBackgroundColor
6890
6891
  }
6891
6892
  },
6892
6893
  primary: {