@ornikar/kitt-universal 27.0.0 → 27.0.1-canary.e2bc67122aa41f65986d23f21317b442b05d8963.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 (70) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/definitions/Button/AnimatedContainer.d.ts +2 -1
  3. package/dist/definitions/Button/AnimatedContainer.d.ts.map +1 -1
  4. package/dist/definitions/Button/Button.d.ts +2 -17
  5. package/dist/definitions/Button/Button.d.ts.map +1 -1
  6. package/dist/definitions/Button/ButtonContent.d.ts +10 -8
  7. package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
  8. package/dist/definitions/Button/ButtonPadding.d.ts +1 -1
  9. package/dist/definitions/Button/ButtonPadding.d.ts.map +1 -1
  10. package/dist/definitions/Button/FocusBorder.d.ts +1 -4
  11. package/dist/definitions/Button/FocusBorder.d.ts.map +1 -1
  12. package/dist/definitions/Button/hooks/useNativeAnimation.d.ts +1 -1
  13. package/dist/definitions/Button/hooks/useNativeAnimation.d.ts.map +1 -1
  14. package/dist/definitions/Button/utils/getButtonTextColorByType.d.ts +12 -3
  15. package/dist/definitions/Button/utils/getButtonTextColorByType.d.ts.map +1 -1
  16. package/dist/definitions/Button/utils/getCurrentBackgroundColorForNativeBaseTheme.d.ts +3 -2
  17. package/dist/definitions/Button/utils/getCurrentBackgroundColorForNativeBaseTheme.d.ts.map +1 -1
  18. package/dist/definitions/ButtonBadge/ButtonBadge.d.ts +2 -1
  19. package/dist/definitions/ButtonBadge/ButtonBadge.d.ts.map +1 -1
  20. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +30 -23
  21. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  22. package/dist/definitions/story-components/StoryBlock.d.ts +1 -1
  23. package/dist/definitions/themes/late-ocean/button.d.ts +26 -52
  24. package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
  25. package/dist/definitions/themes/late-ocean/buttonBadge.d.ts +4 -1
  26. package/dist/definitions/themes/late-ocean/buttonBadge.d.ts.map +1 -1
  27. package/dist/definitions/themes/late-ocean/iconButton.d.ts +0 -1
  28. package/dist/definitions/themes/late-ocean/iconButton.d.ts.map +1 -1
  29. package/dist/definitions/typography/Typography.d.ts +1 -1
  30. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  31. package/dist/index-metro.es.android.js +238 -306
  32. package/dist/index-metro.es.android.js.map +1 -1
  33. package/dist/index-metro.es.ios.js +238 -306
  34. package/dist/index-metro.es.ios.js.map +1 -1
  35. package/dist/index-node-22.17.cjs.js +232 -300
  36. package/dist/index-node-22.17.cjs.js.map +1 -1
  37. package/dist/index-node-22.17.cjs.web.js +231 -284
  38. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  39. package/dist/index-node-22.17.es.mjs +232 -300
  40. package/dist/index-node-22.17.es.mjs.map +1 -1
  41. package/dist/index-node-22.17.es.web.mjs +231 -284
  42. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  43. package/dist/index.es.js +260 -322
  44. package/dist/index.es.js.map +1 -1
  45. package/dist/index.es.web.js +259 -307
  46. package/dist/index.es.web.js.map +1 -1
  47. package/dist/linaria-themes-metro.es.android.js +130 -116
  48. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  49. package/dist/linaria-themes-metro.es.ios.js +130 -116
  50. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  51. package/dist/linaria-themes-node-22.17.cjs.js +130 -116
  52. package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
  53. package/dist/linaria-themes-node-22.17.cjs.web.js +130 -116
  54. package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
  55. package/dist/linaria-themes-node-22.17.es.mjs +130 -116
  56. package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
  57. package/dist/linaria-themes-node-22.17.es.web.mjs +130 -116
  58. package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
  59. package/dist/linaria-themes.es.js +130 -116
  60. package/dist/linaria-themes.es.js.map +1 -1
  61. package/dist/linaria-themes.es.web.js +130 -116
  62. package/dist/linaria-themes.es.web.js.map +1 -1
  63. package/dist/tsbuildinfo +1 -1
  64. package/package.json +1 -1
  65. package/dist/definitions/Button/DisabledBorder.d.ts +0 -3
  66. package/dist/definitions/Button/DisabledBorder.d.ts.map +0 -1
  67. package/dist/definitions/Button/getVariantValuesIfExist.d.ts +0 -5
  68. package/dist/definitions/Button/getVariantValuesIfExist.d.ts.map +0 -1
  69. package/dist/definitions/Button/utils/getButtonSize.d.ts +0 -3
  70. package/dist/definitions/Button/utils/getButtonSize.d.ts.map +0 -1
@@ -552,15 +552,18 @@ var bottomSheet = {
552
552
  }
553
553
  };
554
554
 
555
+ // Strongly typed theme so every new type/variant/size can't be added
556
+ // without defined color & backgroundColor or icon size
557
+
555
558
  var button = {
556
- borderRadius: 30,
559
+ borderRadius: 4,
557
560
  borderWidth: {
558
- disabled: 2,
559
561
  focus: 3
560
562
  },
561
563
  minHeight: 40,
562
564
  minWidth: 40,
563
565
  maxWidth: 335,
566
+ maxHeight: 48,
564
567
  scale: {
565
568
  base: {
566
569
  "default": 1,
@@ -571,148 +574,160 @@ var button = {
571
574
  hover: 1.05
572
575
  }
573
576
  },
574
- contentPadding: {
575
- "default": '7px 16px 7px',
576
- large: '11px 24px 11px',
577
- xLarge: '15px 24px 15px',
578
- disabled: '5px 14px 5px'
577
+ icon: {
578
+ medium: {
579
+ size: 24
580
+ },
581
+ "default": {
582
+ size: 20
583
+ }
579
584
  },
580
585
  padding: {
581
586
  "default": {
582
- hasBadge: {
583
- right: 8
584
- },
585
587
  horizontal: 16,
586
- vertical: 7
587
- },
588
- large: {
589
- hasBadge: {
590
- right: 12
591
- },
592
- horizontal: 24,
593
- vertical: 11
588
+ vertical: 8
594
589
  },
595
- xLarge: {
596
- hasBadge: {
597
- right: 12
598
- },
590
+ medium: {
599
591
  horizontal: 24,
600
- vertical: 15
592
+ vertical: 12
601
593
  }
602
594
  },
603
595
  transition: {
604
596
  duration: '200ms',
605
597
  timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
606
598
  },
607
- "default": {
608
- "default": {
609
- backgroundColor: 'rgba(0, 0, 0, 0.05)',
610
- pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
611
- hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
612
- focusBorderColor: 'rgba(0, 0, 0, 0.1)'
613
- },
614
- ghost: {
615
- backgroundColor: 'rgba(255, 255, 255, 0.1)',
616
- pressedBackgroundColor: 'rgba(255, 255, 255, 0.05)',
617
- hoverBackgroundColor: 'rgba(255, 255, 255, 0.05)',
618
- focusBorderColor: 'rgba(255, 255, 255, 0.4)',
619
- color: deepPurpleColorPalette.white,
620
- hoverColor: deepPurpleColorPalette.white,
621
- activeColor: deepPurpleColorPalette.white
622
- }
623
- },
599
+ focusBorderColor: deepPurpleColorPalette['blue.2'],
624
600
  primary: {
625
601
  "default": {
626
- backgroundColor: colors.primary,
627
- pressedBackgroundColor: colors.primaryLight,
628
- hoverBackgroundColor: colors.primaryLight,
629
- focusBorderColor: 'rgba(76, 52, 224, 0.2)'
602
+ backgroundColor: {
603
+ "default": colors.primary,
604
+ hover: deepPurpleColorPalette['deepPurple.7'],
605
+ pressed: deepPurpleColorPalette['deepPurple.7'],
606
+ disabled: deepPurpleColorPalette['grey.3'],
607
+ focus: colors.primary
608
+ },
609
+ color: {
610
+ "default": colors.white,
611
+ hover: colors.white,
612
+ pressed: colors.white,
613
+ disabled: colors.disabled,
614
+ focus: colors.white
615
+ }
630
616
  },
631
- ghost: {
632
- backgroundColor: colors.uiBackgroundLight,
633
- pressedBackgroundColor: colors.uiBackground,
634
- hoverBackgroundColor: deepPurpleColorPalette['beige.2'],
635
- focusBorderColor: 'rgba(255,255,255, 0.4)',
636
- color: colors.primary,
637
- hoverColor: deepPurpleColorPalette['beige.2'],
638
- activeColor: deepPurpleColorPalette['beige.2']
639
- }
640
- },
641
- dark: {
642
- "default": {
643
- backgroundColor: colors.black,
644
- pressedBackgroundColor: 'rgba(0, 0, 0, 0.8)',
645
- hoverBackgroundColor: 'rgba(0, 0, 0, 0.8)',
646
- focusBorderColor: 'rgba(0, 0, 0, 0.8)'
617
+ revert: {
618
+ backgroundColor: {
619
+ "default": colors.white,
620
+ hover: deepPurpleColorPalette['white-alpha.80'],
621
+ pressed: deepPurpleColorPalette['white-alpha.80'],
622
+ disabled: deepPurpleColorPalette['grey.3'],
623
+ focus: colors.white
624
+ },
625
+ color: {
626
+ "default": colors.black,
627
+ hover: colors.black,
628
+ pressed: colors.black,
629
+ disabled: colors.disabled,
630
+ focus: colors.black
631
+ }
647
632
  }
648
633
  },
649
- danger: {
634
+ secondary: {
650
635
  "default": {
651
- backgroundColor: deepPurpleColorPalette['red.1'],
652
- pressedBackgroundColor: deepPurpleColorPalette['red.2'],
653
- hoverBackgroundColor: deepPurpleColorPalette['red.2'],
654
- focusBorderColor: deepPurpleColorPalette['red.2']
636
+ backgroundColor: {
637
+ "default": deepPurpleColorPalette['beige-alpha.25'],
638
+ hover: deepPurpleColorPalette['beige-alpha.40'],
639
+ pressed: deepPurpleColorPalette['beige-alpha.40'],
640
+ disabled: colors.disabled,
641
+ focus: deepPurpleColorPalette['beige-alpha.25']
642
+ },
643
+ color: {
644
+ "default": colors.black,
645
+ hover: colors.black,
646
+ pressed: colors.black,
647
+ disabled: deepPurpleColorPalette['grey.3'],
648
+ focus: colors.black
649
+ }
655
650
  },
656
- ghost: {
657
- backgroundColor: colors.uiBackgroundLight,
658
- pressedBackgroundColor: colors.uiBackground,
659
- hoverBackgroundColor: deepPurpleColorPalette['beige.2'],
660
- focusBorderColor: 'rgba(255, 255, 255, 0.4)',
661
- color: deepPurpleColorPalette['red.6'],
662
- hoverColor: deepPurpleColorPalette['red.6'],
663
- activeColor: deepPurpleColorPalette['red.6']
664
- }
665
- },
666
- subtle: {
667
- "default": {
668
- backgroundColor: colors.transparent,
669
- pressedBackgroundColor: colors.transparent,
670
- hoverBackgroundColor: colors.transparent,
671
- focusBorderColor: 'rgba(76, 52, 224, 0.2)',
672
- color: colors.primary,
673
- hoverColor: 'rgba(76, 52, 224, 0.8)',
674
- activeColor: 'rgba(76, 52, 224, 0.8)'
675
- }
676
- },
677
- 'subtle-dark': {
678
- "default": {
679
- backgroundColor: colors.transparent,
680
- pressedBackgroundColor: colors.transparent,
681
- hoverBackgroundColor: colors.transparent,
682
- focusBorderColor: 'rgba(0, 0, 0, 0.1)',
683
- color: colors.black,
684
- hoverColor: 'rgba(0, 0, 0, 0.8)',
685
- activeColor: 'rgba(0, 0, 0, 0.8)'
651
+ revert: {
652
+ backgroundColor: {
653
+ "default": deepPurpleColorPalette['white-alpha.10'],
654
+ hover: deepPurpleColorPalette['white-alpha.20'],
655
+ pressed: deepPurpleColorPalette['white-alpha.20'],
656
+ disabled: colors.disabled,
657
+ focus: deepPurpleColorPalette['white-alpha.10']
658
+ },
659
+ color: {
660
+ "default": colors.white,
661
+ hover: deepPurpleColorPalette['white-alpha.80'],
662
+ pressed: deepPurpleColorPalette['white-alpha.80'],
663
+ disabled: deepPurpleColorPalette['grey.3'],
664
+ focus: colors.white
665
+ }
686
666
  }
687
667
  },
688
- 'subtle-revert': {
668
+ tertiary: {
689
669
  "default": {
690
- backgroundColor: colors.transparent,
691
- pressedBackgroundColor: colors.transparent,
692
- hoverBackgroundColor: colors.transparent,
693
- focusBorderColor: colors.white,
694
- color: colors.white,
695
- hoverColor: colors.white,
696
- activeColor: colors.white
670
+ backgroundColor: {
671
+ "default": 'transparent',
672
+ hover: 'transparent',
673
+ pressed: 'transparent',
674
+ disabled: 'transparent',
675
+ focus: 'transparent'
676
+ },
677
+ color: {
678
+ "default": colors.black,
679
+ hover: colors.blackAnthracite,
680
+ pressed: colors.blackAnthracite,
681
+ disabled: deepPurpleColorPalette['grey.3'],
682
+ focus: colors.black
683
+ }
684
+ },
685
+ revert: {
686
+ backgroundColor: {
687
+ "default": 'transparent',
688
+ hover: 'transparent',
689
+ pressed: 'transparent',
690
+ disabled: 'transparent',
691
+ focus: 'transparent'
692
+ },
693
+ color: {
694
+ "default": colors.white,
695
+ hover: deepPurpleColorPalette['white-alpha.80'],
696
+ pressed: deepPurpleColorPalette['white-alpha.80'],
697
+ disabled: deepPurpleColorPalette['white-alpha.20'],
698
+ focus: colors.white
699
+ }
697
700
  }
698
701
  },
699
- disabled: {
702
+ 'tertiary-danger': {
700
703
  "default": {
701
- backgroundColor: colors.disabled,
702
- pressedBackgroundColor: colors.disabled,
703
- hoverBackgroundColor: colors.disabled,
704
- focusBorderColor: deepPurpleColorPalette['beige.2'],
705
- borderColor: deepPurpleColorPalette['beige.2']
704
+ backgroundColor: {
705
+ "default": 'transparent',
706
+ hover: 'transparent',
707
+ pressed: 'transparent',
708
+ disabled: 'transparent',
709
+ focus: 'transparent'
710
+ },
711
+ color: {
712
+ "default": colors.danger,
713
+ hover: deepPurpleColorPalette['red.2'],
714
+ pressed: deepPurpleColorPalette['red.2'],
715
+ disabled: deepPurpleColorPalette['grey.3'],
716
+ focus: colors.danger
717
+ }
706
718
  }
707
719
  }
708
720
  };
709
721
 
710
722
  var buttonBadge = {
711
- backgroundColor: deepPurpleColorPalette['red.6'],
723
+ backgroundColor: {
724
+ "default": colors.danger,
725
+ disabled: colors.blackLight
726
+ },
712
727
  dimensions: {
713
728
  withBadge: {
714
- width: 10,
715
- height: 10
729
+ width: 8,
730
+ height: 8
716
731
  },
717
732
  badgeCount: {
718
733
  width: 20,
@@ -1909,14 +1924,13 @@ var iconButton = {
1909
1924
  },
1910
1925
  disabled: {
1911
1926
  scale: 1,
1912
- backgroundColor: button.disabled["default"].backgroundColor,
1913
- borderColor: button.disabled["default"].borderColor
1927
+ backgroundColor: button.primary["default"].backgroundColor.disabled
1914
1928
  },
1915
1929
  "default": {
1916
- pressedBackgroundColor: button["default"]["default"].pressedBackgroundColor
1930
+ pressedBackgroundColor: button.primary["default"].backgroundColor.disabled
1917
1931
  },
1918
1932
  ghost: {
1919
- pressedBackgroundColor: button["default"].ghost.pressedBackgroundColor
1933
+ pressedBackgroundColor: button.primary["default"].backgroundColor.disabled
1920
1934
  },
1921
1935
  primary: {
1922
1936
  pressedBackgroundColor: deepPurpleColorPalette['beige.1']
@@ -2810,31 +2824,27 @@ function createResponsiveStyleFromProp(responsiveBooleanValue, valueIfTrue, valu
2810
2824
  return responsiveValue;
2811
2825
  }
2812
2826
 
2813
- function warn(message) {
2814
- if (process.env.NODE_ENV !== 'production') {
2815
- console.warn(message);
2816
- }
2817
- }
2818
- function deprecatedMessage(symbol, deprecation, replaceBy) {
2819
- var replaceMessage = replaceBy === undefined ? '' : ", please use ".concat(replaceBy, " instead");
2820
- warn("[Deprecation] in ".concat(symbol, ": ").concat(deprecation, " is deprecated").concat(replaceMessage, "."));
2821
- }
2822
- function deprecatedInComponent(component, deprecation, replaceBy) {
2823
- deprecatedMessage("<".concat(component, " />"), deprecation, replaceBy);
2824
- }
2825
-
2826
2827
  function getCurrentBackgroundColorForNativeBaseTheme(_ref) {
2827
2828
  var type = _ref.type,
2828
2829
  variant = _ref.variant,
2829
2830
  isDisabled = _ref.isDisabled,
2830
2831
  isHovered = _ref.isHovered,
2831
- isPressed = _ref.isPressed;
2832
- if (isDisabled) return 'kitt.button.disabled.default.backgroundColor';
2833
- var baseKey = "kitt.button.".concat(type, ".").concat(variant);
2834
- if (isHovered || isPressed) {
2835
- return "".concat(baseKey, ".hoverBackgroundColor");
2832
+ isPressed = _ref.isPressed,
2833
+ isFocused = _ref.isFocused;
2834
+ var baseKey = "kitt.button.".concat(type, ".").concat(variant, ".backgroundColor");
2835
+ if (isDisabled) {
2836
+ return "".concat(baseKey, ".disabled");
2836
2837
  }
2837
- return "".concat(baseKey, ".backgroundColor");
2838
+ if (isHovered) {
2839
+ return "".concat(baseKey, ".hover");
2840
+ }
2841
+ if (isPressed) {
2842
+ return "".concat(baseKey, ".pressed");
2843
+ }
2844
+ if (isFocused) {
2845
+ return "".concat(baseKey, ".focused");
2846
+ }
2847
+ return "".concat(baseKey, ".default");
2838
2848
  }
2839
2849
 
2840
2850
  function getCurrentScale$1(_ref) {
@@ -2952,7 +2962,7 @@ var getTypographyFamilyWithAncestorValue = function (type, typographyFamilyInCon
2952
2962
  throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
2953
2963
  };
2954
2964
 
2955
- var _excluded$R = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color", "underline"];
2965
+ var _excluded$R = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
2956
2966
  var TypographyFamilyContext = /*#__PURE__*/createContext(null);
2957
2967
  var TypographyTypeContext = /*#__PURE__*/createContext(null);
2958
2968
  var TypographyColorContext = /*#__PURE__*/createContext('black');
@@ -3079,7 +3089,6 @@ function Typography(_ref2) {
3079
3089
  } : _ref2$type,
3080
3090
  variant = _ref2.variant,
3081
3091
  color = _ref2.color,
3082
- underline = _ref2.underline,
3083
3092
  otherProps = _objectWithoutProperties(_ref2, _excluded$R);
3084
3093
  var sx = useSx();
3085
3094
  var typographyFamilyInContext = useContext(TypographyFamilyContext);
@@ -3111,21 +3120,14 @@ function Typography(_ref2) {
3111
3120
  }
3112
3121
  });
3113
3122
  }
3114
- var text = /*#__PURE__*/jsx(Text, _objectSpread(_objectSpread(_objectSpread({
3123
+ var text = /*#__PURE__*/jsx(Text, _objectSpread(_objectSpread({
3115
3124
  accessibilityRole: accessibilityRole || undefined,
3116
3125
  fontSize: fontSizeForNativeBase,
3117
3126
  lineHeight: hasTypographyAncestor ? undefined : fontSizeForNativeBase,
3118
3127
  fontWeight: webFontWeight,
3119
3128
  fontFamily: nativeFontFamily,
3120
- borderBottomWidth: underline ? 1 : undefined,
3121
- borderBottomColor: underline ? currentColorValue : undefined,
3122
3129
  textTransform: typographyFamily === 'contentCaps' ? 'uppercase' : undefined
3123
- }, colorStyles), otherProps), {}, {
3124
- // The property text-underline-offset is not on native.
3125
- // To add an underline with an offset, we use a custom borderBottomWidth and color.
3126
- // and we set underline to undefined to avoid a double underline
3127
- underline: undefined
3128
- }));
3130
+ }, colorStyles), otherProps));
3129
3131
  var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(TypographyFamilyContext.Provider, {
3130
3132
  value: typographyFamily,
3131
3133
  children: /*#__PURE__*/jsx(TypographyTypeContext.Provider, {
@@ -3174,12 +3176,14 @@ Typography.Header6 = createHeading(6);
3174
3176
 
3175
3177
  function ButtonBadge(_ref) {
3176
3178
  var withBadge = _ref.withBadge,
3177
- badgeCount = _ref.badgeCount;
3179
+ badgeCount = _ref.badgeCount,
3180
+ disabled = _ref.disabled;
3181
+ var backgroundColor = disabled ? 'kitt.buttonBadge.backgroundColor.disabled' : 'kitt.buttonBadge.backgroundColor.default';
3178
3182
  if (withBadge) {
3179
3183
  return /*#__PURE__*/jsx(View, {
3180
3184
  height: "kitt.buttonBadge.dimensions.withBadge.height",
3181
3185
  width: "kitt.buttonBadge.dimensions.withBadge.width",
3182
- backgroundColor: "kitt.buttonBadge.backgroundColor",
3186
+ backgroundColor: backgroundColor,
3183
3187
  borderRadius: "kitt.buttonBadge.borderRadius.withBadge"
3184
3188
  });
3185
3189
  }
@@ -3189,7 +3193,7 @@ function ButtonBadge(_ref) {
3189
3193
  justifyContent: "center",
3190
3194
  height: "kitt.buttonBadge.dimensions.badgeCount.height",
3191
3195
  width: "kitt.buttonBadge.dimensions.badgeCount.width",
3192
- backgroundColor: "kitt.buttonBadge.backgroundColor",
3196
+ backgroundColor: backgroundColor,
3193
3197
  borderRadius: "kitt.buttonBadge.borderRadius.badgeCount",
3194
3198
  children: /*#__PURE__*/jsx(Typography.Text, {
3195
3199
  base: "body-xs",
@@ -3277,115 +3281,93 @@ function TypographyIcon(_ref2) {
3277
3281
  return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
3278
3282
  }
3279
3283
 
3280
- var getButtonTextColorByType = function (type, variant, isHovered, isPressed) {
3281
- var isButtonInteractedWith = isHovered || isPressed;
3282
- switch (type) {
3283
- case 'primary':
3284
- return variant === 'ghost' ? 'primary' : 'white';
3285
- case 'dark':
3286
- return 'white';
3287
- case 'danger':
3288
- return 'danger';
3289
- case 'subtle':
3290
- return isButtonInteractedWith ? 'primary-light' : 'primary';
3291
- case 'subtle-dark':
3292
- return isButtonInteractedWith ? 'black-light' : 'black';
3293
- case 'subtle-revert':
3294
- return 'white';
3295
- case 'default':
3296
- return variant === 'ghost' ? 'white' : 'black';
3297
- default:
3298
- return 'black';
3284
+ var getButtonTextColorByType = function (type, variant, isHovered, isPressed, isDisabled) {
3285
+ var baseKey = "kitt.button.".concat(type, ".").concat(variant, ".color");
3286
+ if (isDisabled) {
3287
+ return "".concat(baseKey, ".disabled");
3299
3288
  }
3289
+ if (isHovered || isPressed) {
3290
+ return "".concat(baseKey, ".hover");
3291
+ }
3292
+ return "".concat(baseKey, ".default");
3300
3293
  };
3301
3294
 
3302
- var _excluded$P = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing"];
3303
- function ButtonIcon(_ref) {
3304
- var icon = _ref.icon,
3305
- color = _ref.color,
3295
+ var _excluded$P = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing", "size"];
3296
+ function ButtonContentChildren(_ref) {
3297
+ var type = _ref.type,
3298
+ icon = _ref.icon,
3306
3299
  iconPosition = _ref.iconPosition,
3307
- testID = _ref.testID;
3308
- return /*#__PURE__*/jsx(View, {
3309
- marginRight: iconPosition === 'left' ? 'kitt.2' : 0,
3310
- marginLeft: iconPosition === 'right' ? 'kitt.2' : 0,
3311
- children: /*#__PURE__*/jsx(TypographyIcon, {
3312
- icon: icon,
3313
- testID: testID,
3314
- color: color
3315
- })
3316
- });
3317
- }
3318
- function ButtonContentChildren(_ref2) {
3319
- var type = _ref2.type,
3320
- icon = _ref2.icon,
3321
- iconPosition = _ref2.iconPosition,
3322
- innerSpacing = _ref2.innerSpacing,
3323
- withBadge = _ref2.withBadge,
3324
- badgeCount = _ref2.badgeCount,
3325
- color = _ref2.color,
3326
- children = _ref2.children;
3300
+ innerSpacing = _ref.innerSpacing,
3301
+ isDisabled = _ref.isDisabled,
3302
+ withBadge = _ref.withBadge,
3303
+ badgeCount = _ref.badgeCount,
3304
+ color = _ref.color,
3305
+ children = _ref.children,
3306
+ isPressed = _ref.isPressed,
3307
+ isHovered = _ref.isHovered,
3308
+ _ref$size = _ref.size,
3309
+ size = _ref$size === void 0 ? 'default' : _ref$size;
3327
3310
  if ((process.env.NODE_ENV !== "production")) {
3328
3311
  if (!(children || icon)) {
3329
3312
  throw new Error('kitt(Button): You should provide at least a children or a icon');
3330
3313
  }
3331
3314
  }
3332
- if (!children) {
3333
- return /*#__PURE__*/jsx(TypographyIcon
3334
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3335
- , {
3315
+ if (!children && icon) {
3316
+ return /*#__PURE__*/jsx(TypographyIcon, {
3336
3317
  icon: icon,
3337
3318
  color: color
3338
3319
  });
3339
3320
  }
3340
- var buttonIconSharedProps = {
3341
- type: type,
3342
- iconPosition: iconPosition,
3343
- color: color
3344
- };
3345
-
3346
3321
  // Make the multilines case work properly on native - Breaks the web implem
3347
3322
  var sharedNativeStyle = {
3348
3323
  flexShrink: 1
3349
3324
  };
3350
- return /*#__PURE__*/jsxs(View, {
3325
+ return /*#__PURE__*/jsxs(HStack$1, {
3351
3326
  alignItems: "center",
3352
3327
  justifyContent: innerSpacing,
3353
- flexDirection: "row",
3354
- children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
3328
+ space: "kitt.2",
3329
+ children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(TypographyIcon, _objectSpread(_objectSpread({}, {
3330
+ type: type,
3331
+ color: color
3332
+ }), {}, {
3355
3333
  testID: "button.ButtonContent.leftButtonIcon",
3356
- icon: icon
3334
+ icon: icon,
3335
+ color: color,
3336
+ size: "kitt.button.icon.".concat(size, ".size")
3357
3337
  })) : null, /*#__PURE__*/jsx(Typography.Text, {
3358
3338
  /* On native code, this is the only way to ensure that the text is centered */
3359
3339
  textAlign: "center",
3360
3340
  _android: sharedNativeStyle,
3361
3341
  _ios: sharedNativeStyle,
3362
- base: "body-m",
3363
- variant: "bold",
3342
+ base: "label-large",
3343
+ variant: "semibold",
3344
+ underline: (type === 'tertiary' || type === 'tertiary-danger') && !isHovered && !isPressed,
3364
3345
  color: color,
3365
3346
  children: children
3366
- }), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread(_objectSpread({}, buttonIconSharedProps), {}, {
3367
- icon: icon
3368
- })) : null, withBadge || badgeCount && badgeCount > 0 ? /*#__PURE__*/jsx(View, {
3369
- marginLeft: "kitt.2",
3370
- children: /*#__PURE__*/jsx(ButtonBadge, {
3371
- withBadge: withBadge,
3372
- badgeCount: badgeCount
3373
- })
3347
+ }), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(TypographyIcon, {
3348
+ icon: icon,
3349
+ color: color,
3350
+ size: "kitt.button.icon.".concat(size, ".size")
3351
+ }) : null, withBadge || badgeCount && badgeCount > 0 ? /*#__PURE__*/jsx(ButtonBadge, {
3352
+ disabled: isDisabled,
3353
+ withBadge: withBadge,
3354
+ badgeCount: badgeCount
3374
3355
  }) : null]
3375
3356
  });
3376
3357
  }
3377
- function ButtonContent(_ref3) {
3378
- var type = _ref3.type,
3379
- variant = _ref3.variant,
3380
- isDisabled = _ref3.isDisabled,
3381
- icon = _ref3.icon,
3382
- children = _ref3.children,
3383
- isHovered = _ref3.isHovered,
3384
- isPressed = _ref3.isPressed;
3385
- _ref3.isFocused;
3386
- var innerSpacing = _ref3.innerSpacing,
3387
- props = _objectWithoutProperties(_ref3, _excluded$P);
3388
- var color = isDisabled ? 'black-light' : getButtonTextColorByType(type, variant, isHovered, isPressed);
3358
+ function ButtonContent(_ref2) {
3359
+ var type = _ref2.type,
3360
+ variant = _ref2.variant,
3361
+ isDisabled = _ref2.isDisabled,
3362
+ icon = _ref2.icon,
3363
+ children = _ref2.children,
3364
+ isHovered = _ref2.isHovered,
3365
+ isPressed = _ref2.isPressed;
3366
+ _ref2.isFocused;
3367
+ var innerSpacing = _ref2.innerSpacing,
3368
+ size = _ref2.size,
3369
+ props = _objectWithoutProperties(_ref2, _excluded$P);
3370
+ var color = getButtonTextColorByType(type, variant, isHovered, isPressed, isDisabled);
3389
3371
  return /*#__PURE__*/jsx(View, {
3390
3372
  _web: {
3391
3373
  // Make the multilines case work properly on web
@@ -3399,65 +3381,45 @@ function ButtonContent(_ref3) {
3399
3381
  type: type,
3400
3382
  isDisabled: isDisabled,
3401
3383
  color: color,
3402
- innerSpacing: innerSpacing
3384
+ innerSpacing: innerSpacing,
3385
+ isHovered: isHovered,
3386
+ isPressed: isPressed,
3387
+ size: size
3403
3388
  }, props), {}, {
3404
3389
  children: children
3405
3390
  }))
3406
3391
  });
3407
3392
  }
3408
3393
 
3409
- function getCurrentPaddingConfig(_ref) {
3410
- var size = _ref.size;
3411
- if (size === 'large') return 'large';
3412
- if (size === 'xLarge') return 'xLarge';
3413
- return 'default';
3414
- }
3415
- function ButtonPadding(_ref2) {
3416
- var children = _ref2.children,
3417
- size = _ref2.size,
3418
- hasBadge = _ref2.hasBadge;
3419
- var currentPaddingKey = getCurrentPaddingConfig({
3420
- size: size
3421
- });
3394
+ function ButtonPadding(_ref) {
3395
+ var children = _ref.children,
3396
+ size = _ref.size;
3397
+ _ref.hasBadge;
3422
3398
  return /*#__PURE__*/jsx(View, {
3423
3399
  position: "relative",
3424
3400
  flexDirection: "row",
3425
3401
  alignItems: "center",
3426
3402
  justifyContent: "center",
3427
- paddingX: "kitt.button.padding.".concat(currentPaddingKey, ".horizontal"),
3428
- paddingY: "kitt.button.padding.".concat(currentPaddingKey, ".vertical"),
3429
- paddingRight: hasBadge ? "kitt.button.padding.".concat(currentPaddingKey, ".hasBadge.right") : undefined,
3403
+ paddingX: "kitt.button.padding.".concat(size, ".horizontal"),
3404
+ paddingY: "kitt.button.padding.".concat(size, ".vertical"),
3430
3405
  minHeight: "kitt.button.minHeight",
3431
3406
  children: children
3432
3407
  });
3433
3408
  }
3434
3409
 
3435
- function DisabledBorder() {
3436
- return /*#__PURE__*/jsx(View, {
3437
- position: "absolute",
3438
- top: 0,
3439
- left: 0,
3440
- right: 0,
3441
- bottom: 0,
3442
- borderWidth: "kitt.button.borderWidth.disabled",
3443
- borderColor: "kitt.button.disabled.default.borderColor",
3444
- borderRadius: "kitt.button.borderRadius"
3445
- });
3446
- }
3447
-
3448
3410
  function FocusBorder(_ref) {
3449
- var type = _ref.type,
3450
- variant = _ref.variant,
3451
- isFocused = _ref.isFocused,
3411
+ var isFocused = _ref.isFocused,
3452
3412
  isHovered = _ref.isHovered,
3453
3413
  isPressed = _ref.isPressed;
3454
3414
  var _useTheme = useTheme(),
3455
3415
  buttonTheme = _useTheme.kitt.button;
3416
+ var outerBorderRadius = buttonTheme.borderRadius + buttonTheme.borderWidth.focus;
3417
+ var innerBorderRadius = buttonTheme.borderRadius;
3456
3418
  return /*#__PURE__*/jsx(View, {
3457
3419
  _web: {
3458
3420
  style: {
3459
- width: "calc(100% + ".concat(buttonTheme.borderWidth.focus * 2, "px)"),
3460
- height: "calc(100% + ".concat(buttonTheme.borderWidth.focus * 2, "px)"),
3421
+ width: "calc(100% + ".concat(buttonTheme.borderRadius, "px)"),
3422
+ height: "calc(100% + ".concat(buttonTheme.borderRadius, "px)"),
3461
3423
  transitionProperty: 'opacity',
3462
3424
  transitionDuration: buttonTheme.transition.duration,
3463
3425
  transitionTimingFunction: buttonTheme.transition.timingFunction
@@ -3465,11 +3427,12 @@ function FocusBorder(_ref) {
3465
3427
  },
3466
3428
  opacity: isFocused && !(isPressed || isHovered) ? 1 : 0,
3467
3429
  position: "absolute",
3468
- left: -buttonTheme.borderWidth.focus,
3469
- top: -buttonTheme.borderWidth.focus,
3470
3430
  borderWidth: "kitt.button.borderWidth.focus",
3471
- borderColor: "kitt.button.".concat(type, ".").concat(variant, ".focusBorderColor"),
3472
- borderRadius: "kitt.button.borderRadius"
3431
+ borderColor: "kitt.button.focusBorderColor",
3432
+ borderRadius: outerBorderRadius,
3433
+ children: /*#__PURE__*/jsx(View, {
3434
+ borderRadius: innerBorderRadius
3435
+ })
3473
3436
  });
3474
3437
  }
3475
3438
 
@@ -3481,28 +3444,17 @@ function useNativeAnimation$5() {
3481
3444
  };
3482
3445
  }
3483
3446
 
3484
- var getButtonSize = function (_ref) {
3485
- var large = _ref.large,
3486
- xLarge = _ref.xLarge,
3487
- size = _ref.size;
3488
- if (large) return 'large';
3489
- if (xLarge) return 'xLarge';
3490
- return size;
3491
- };
3492
-
3493
- var allowedGhostTypes = ['primary', 'default', 'danger'];
3494
3447
  var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
3495
3448
  var _children = _ref.children,
3496
3449
  _ref$type = _ref.type,
3497
- type = _ref$type === void 0 ? 'default' : _ref$type,
3450
+ type = _ref$type === void 0 ? 'secondary' : _ref$type,
3498
3451
  _ref$variant = _ref.variant,
3499
3452
  variant = _ref$variant === void 0 ? 'default' : _ref$variant,
3500
3453
  disabled = _ref.disabled,
3501
3454
  stretch = _ref.stretch,
3502
- large = _ref.large,
3503
- xLarge = _ref.xLarge,
3504
3455
  icon = _ref.icon,
3505
- sizeProp = _ref.size,
3456
+ _ref$size = _ref.size,
3457
+ size = _ref$size === void 0 ? 'default' : _ref$size,
3506
3458
  _ref$iconPosition = _ref.iconPosition,
3507
3459
  iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
3508
3460
  testID = _ref.testID,
@@ -3526,18 +3478,9 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
3526
3478
  onPressIn = _useNativeAnimation.onPressIn,
3527
3479
  onPressOut = _useNativeAnimation.onPressOut,
3528
3480
  animatedStyles = _useNativeAnimation.animatedStyles;
3529
- if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && !allowedGhostTypes.includes(type)) {
3530
- throw new Error('variant=ghost is only allowed with type=primary or default');
3481
+ if (process.env.NODE_ENV !== 'production' && variant === 'revert' && type === 'tertiary-danger') {
3482
+ throw new Error('Invalid revert variant for tertiary-danger button type. Only default variant is allowed.');
3531
3483
  }
3532
- if (large || xLarge) {
3533
- var deprecatedProp = large ? 'large' : 'xLarge';
3534
- deprecatedInComponent('Button', "".concat(deprecatedProp, " prop"), 'size');
3535
- }
3536
- var size = getButtonSize({
3537
- large: large,
3538
- xLarge: xLarge,
3539
- size: sizeProp
3540
- });
3541
3484
  return /*#__PURE__*/jsx(Pressable, {
3542
3485
  ref: ref,
3543
3486
  disabled: disabled,
@@ -3549,6 +3492,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
3549
3492
  alignSelf: createResponsiveStyleFromProp(stretch, undefined, 'flex-start'),
3550
3493
  minWidth: "kitt.button.minWidth",
3551
3494
  maxWidth: createResponsiveStyleFromProp(stretch, '100%', 'kitt.button.maxWidth'),
3495
+ maxHeight: "kitt.button.maxHeight",
3552
3496
  width: createResponsiveStyleFromProp(stretch, '100%', 'auto'),
3553
3497
  onPress: onPress,
3554
3498
  onPressIn: onPressIn,
@@ -3584,10 +3528,9 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
3584
3528
  isPressed: isPressed,
3585
3529
  isFocused: isFocused,
3586
3530
  innerSpacing: innerSpacing,
3531
+ size: size,
3587
3532
  children: _children
3588
- }), disabled ? /*#__PURE__*/jsx(DisabledBorder, {}) : null, /*#__PURE__*/jsx(FocusBorder, {
3589
- type: type,
3590
- variant: variant,
3533
+ }), /*#__PURE__*/jsx(FocusBorder, {
3591
3534
  isFocused: isFocused || isFocusedInternal,
3592
3535
  isHovered: isHovered,
3593
3536
  isPressed: isPressed
@@ -3755,7 +3698,7 @@ function Actions(_ref) {
3755
3698
  flexGrow: 1,
3756
3699
  reversed: isReversed
3757
3700
  }, props), {}, {
3758
- space: "kitt.3",
3701
+ space: "kitt.2",
3759
3702
  children: children
3760
3703
  }));
3761
3704
  }
@@ -7999,7 +7942,8 @@ function InfoCard(_ref) {
7999
7942
  icon: /*#__PURE__*/jsx(CaretRightRegularIcon, {})
8000
7943
  }) : /*#__PURE__*/jsx(View$1, {
8001
7944
  children: /*#__PURE__*/jsx(Button, {
8002
- type: isContrastReversed ? 'subtle-revert' : 'subtle-dark',
7945
+ type: "tertiary",
7946
+ variant: isContrastReversed ? 'revert' : undefined,
8003
7947
  onPress: onPress,
8004
7948
  children: action === null || action === void 0 ? void 0 : action.label
8005
7949
  })
@@ -8624,14 +8568,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8624
8568
  }
8625
8569
  },
8626
8570
  button: {
8627
- "default": theme.button["default"],
8628
- dark: theme.button.dark,
8629
8571
  primary: theme.button.primary,
8630
- danger: theme.button.danger,
8631
- subtle: theme.button.subtle,
8632
- 'subtle-revert': theme.button['subtle-revert'],
8633
- 'subtle-dark': theme.button['subtle-dark'],
8634
- disabled: theme.button.disabled
8572
+ secondary: theme.button.secondary,
8573
+ tertiary: theme.button.tertiary,
8574
+ 'tertiary-danger': theme.button['tertiary-danger'],
8575
+ focusBorderColor: theme.button.focusBorderColor
8635
8576
  },
8636
8577
  choices: {
8637
8578
  item: {
@@ -9060,7 +9001,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
9060
9001
  iconButton: {
9061
9002
  borderColor: theme.iconButton.borderColor,
9062
9003
  disabled: {
9063
- borderColor: theme.iconButton.disabled.borderColor,
9064
9004
  backgroundColor: theme.iconButton.disabled.backgroundColor
9065
9005
  },
9066
9006
  black: {
@@ -9610,7 +9550,16 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
9610
9550
  button: {
9611
9551
  minWidth: theme.button.minWidth,
9612
9552
  maxWidth: theme.button.maxWidth,
9613
- minHeight: theme.button.minHeight
9553
+ minHeight: theme.button.minHeight,
9554
+ maxHeight: theme.button.maxHeight,
9555
+ icon: {
9556
+ "default": {
9557
+ size: theme.button.icon["default"].size
9558
+ },
9559
+ medium: {
9560
+ size: theme.button.icon.medium.size
9561
+ }
9562
+ }
9614
9563
  },
9615
9564
  buttonBadge: {
9616
9565
  dimensions: {
@@ -10003,7 +9952,10 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
10003
9952
  }
10004
9953
  },
10005
9954
  button: {
10006
- padding: theme.button.padding
9955
+ padding: {
9956
+ "default": theme.button.padding["default"],
9957
+ medium: theme.button.padding.medium
9958
+ }
10007
9959
  },
10008
9960
  cardModal: {
10009
9961
  overlayPadding: theme.cardModal.overlayPadding