@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.
- package/CHANGELOG.md +14 -0
- package/dist/definitions/Button/AnimatedContainer.d.ts +2 -1
- package/dist/definitions/Button/AnimatedContainer.d.ts.map +1 -1
- package/dist/definitions/Button/Button.d.ts +2 -17
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts +10 -8
- package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonPadding.d.ts +1 -1
- package/dist/definitions/Button/ButtonPadding.d.ts.map +1 -1
- package/dist/definitions/Button/FocusBorder.d.ts +1 -4
- package/dist/definitions/Button/FocusBorder.d.ts.map +1 -1
- package/dist/definitions/Button/hooks/useNativeAnimation.d.ts +1 -1
- package/dist/definitions/Button/hooks/useNativeAnimation.d.ts.map +1 -1
- package/dist/definitions/Button/utils/getButtonTextColorByType.d.ts +12 -3
- package/dist/definitions/Button/utils/getButtonTextColorByType.d.ts.map +1 -1
- package/dist/definitions/Button/utils/getCurrentBackgroundColorForNativeBaseTheme.d.ts +3 -2
- package/dist/definitions/Button/utils/getCurrentBackgroundColorForNativeBaseTheme.d.ts.map +1 -1
- package/dist/definitions/ButtonBadge/ButtonBadge.d.ts +2 -1
- package/dist/definitions/ButtonBadge/ButtonBadge.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +30 -23
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryBlock.d.ts +1 -1
- package/dist/definitions/themes/late-ocean/button.d.ts +26 -52
- package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/buttonBadge.d.ts +4 -1
- package/dist/definitions/themes/late-ocean/buttonBadge.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/iconButton.d.ts +0 -1
- package/dist/definitions/themes/late-ocean/iconButton.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +1 -1
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +238 -306
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +238 -306
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +232 -300
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +231 -284
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +232 -300
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +231 -284
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +260 -322
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +259 -307
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +130 -116
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +130 -116
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +130 -116
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +130 -116
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +130 -116
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +130 -116
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +130 -116
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +130 -116
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/definitions/Button/DisabledBorder.d.ts +0 -3
- package/dist/definitions/Button/DisabledBorder.d.ts.map +0 -1
- package/dist/definitions/Button/getVariantValuesIfExist.d.ts +0 -5
- package/dist/definitions/Button/getVariantValuesIfExist.d.ts.map +0 -1
- package/dist/definitions/Button/utils/getButtonSize.d.ts +0 -3
- package/dist/definitions/Button/utils/getButtonSize.d.ts.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -556,15 +556,18 @@ var bottomSheet = {
|
|
|
556
556
|
}
|
|
557
557
|
};
|
|
558
558
|
|
|
559
|
+
// Strongly typed theme so every new type/variant/size can't be added
|
|
560
|
+
// without defined color & backgroundColor or icon size
|
|
561
|
+
|
|
559
562
|
var button = {
|
|
560
|
-
borderRadius:
|
|
563
|
+
borderRadius: 4,
|
|
561
564
|
borderWidth: {
|
|
562
|
-
disabled: 2,
|
|
563
565
|
focus: 3
|
|
564
566
|
},
|
|
565
567
|
minHeight: 40,
|
|
566
568
|
minWidth: 40,
|
|
567
569
|
maxWidth: 335,
|
|
570
|
+
maxHeight: 48,
|
|
568
571
|
scale: {
|
|
569
572
|
base: {
|
|
570
573
|
"default": 1,
|
|
@@ -575,148 +578,160 @@ var button = {
|
|
|
575
578
|
hover: 1.05
|
|
576
579
|
}
|
|
577
580
|
},
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
581
|
+
icon: {
|
|
582
|
+
medium: {
|
|
583
|
+
size: 24
|
|
584
|
+
},
|
|
585
|
+
"default": {
|
|
586
|
+
size: 20
|
|
587
|
+
}
|
|
583
588
|
},
|
|
584
589
|
padding: {
|
|
585
590
|
"default": {
|
|
586
|
-
hasBadge: {
|
|
587
|
-
right: 8
|
|
588
|
-
},
|
|
589
591
|
horizontal: 16,
|
|
590
|
-
vertical:
|
|
591
|
-
},
|
|
592
|
-
large: {
|
|
593
|
-
hasBadge: {
|
|
594
|
-
right: 12
|
|
595
|
-
},
|
|
596
|
-
horizontal: 24,
|
|
597
|
-
vertical: 11
|
|
592
|
+
vertical: 8
|
|
598
593
|
},
|
|
599
|
-
|
|
600
|
-
hasBadge: {
|
|
601
|
-
right: 12
|
|
602
|
-
},
|
|
594
|
+
medium: {
|
|
603
595
|
horizontal: 24,
|
|
604
|
-
vertical:
|
|
596
|
+
vertical: 12
|
|
605
597
|
}
|
|
606
598
|
},
|
|
607
599
|
transition: {
|
|
608
600
|
duration: '200ms',
|
|
609
601
|
timingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
610
602
|
},
|
|
611
|
-
|
|
612
|
-
"default": {
|
|
613
|
-
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
614
|
-
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
615
|
-
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
616
|
-
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
617
|
-
},
|
|
618
|
-
ghost: {
|
|
619
|
-
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
620
|
-
pressedBackgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
621
|
-
hoverBackgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
622
|
-
focusBorderColor: 'rgba(255, 255, 255, 0.4)',
|
|
623
|
-
color: deepPurpleColorPalette.white,
|
|
624
|
-
hoverColor: deepPurpleColorPalette.white,
|
|
625
|
-
activeColor: deepPurpleColorPalette.white
|
|
626
|
-
}
|
|
627
|
-
},
|
|
603
|
+
focusBorderColor: deepPurpleColorPalette['blue.2'],
|
|
628
604
|
primary: {
|
|
629
605
|
"default": {
|
|
630
|
-
backgroundColor:
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
606
|
+
backgroundColor: {
|
|
607
|
+
"default": colors.primary,
|
|
608
|
+
hover: deepPurpleColorPalette['deepPurple.7'],
|
|
609
|
+
pressed: deepPurpleColorPalette['deepPurple.7'],
|
|
610
|
+
disabled: deepPurpleColorPalette['grey.3'],
|
|
611
|
+
focus: colors.primary
|
|
612
|
+
},
|
|
613
|
+
color: {
|
|
614
|
+
"default": colors.white,
|
|
615
|
+
hover: colors.white,
|
|
616
|
+
pressed: colors.white,
|
|
617
|
+
disabled: colors.disabled,
|
|
618
|
+
focus: colors.white
|
|
619
|
+
}
|
|
634
620
|
},
|
|
635
|
-
|
|
636
|
-
backgroundColor:
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
focusBorderColor: 'rgba(0, 0, 0, 0.8)'
|
|
621
|
+
revert: {
|
|
622
|
+
backgroundColor: {
|
|
623
|
+
"default": colors.white,
|
|
624
|
+
hover: deepPurpleColorPalette['white-alpha.80'],
|
|
625
|
+
pressed: deepPurpleColorPalette['white-alpha.80'],
|
|
626
|
+
disabled: deepPurpleColorPalette['grey.3'],
|
|
627
|
+
focus: colors.white
|
|
628
|
+
},
|
|
629
|
+
color: {
|
|
630
|
+
"default": colors.black,
|
|
631
|
+
hover: colors.black,
|
|
632
|
+
pressed: colors.black,
|
|
633
|
+
disabled: colors.disabled,
|
|
634
|
+
focus: colors.black
|
|
635
|
+
}
|
|
651
636
|
}
|
|
652
637
|
},
|
|
653
|
-
|
|
638
|
+
secondary: {
|
|
654
639
|
"default": {
|
|
655
|
-
backgroundColor:
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
640
|
+
backgroundColor: {
|
|
641
|
+
"default": deepPurpleColorPalette['beige-alpha.25'],
|
|
642
|
+
hover: deepPurpleColorPalette['beige-alpha.40'],
|
|
643
|
+
pressed: deepPurpleColorPalette['beige-alpha.40'],
|
|
644
|
+
disabled: colors.disabled,
|
|
645
|
+
focus: deepPurpleColorPalette['beige-alpha.25']
|
|
646
|
+
},
|
|
647
|
+
color: {
|
|
648
|
+
"default": colors.black,
|
|
649
|
+
hover: colors.black,
|
|
650
|
+
pressed: colors.black,
|
|
651
|
+
disabled: deepPurpleColorPalette['grey.3'],
|
|
652
|
+
focus: colors.black
|
|
653
|
+
}
|
|
659
654
|
},
|
|
660
|
-
|
|
661
|
-
backgroundColor:
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
focusBorderColor: 'rgba(76, 52, 224, 0.2)',
|
|
676
|
-
color: colors.primary,
|
|
677
|
-
hoverColor: 'rgba(76, 52, 224, 0.8)',
|
|
678
|
-
activeColor: 'rgba(76, 52, 224, 0.8)'
|
|
679
|
-
}
|
|
680
|
-
},
|
|
681
|
-
'subtle-dark': {
|
|
682
|
-
"default": {
|
|
683
|
-
backgroundColor: colors.transparent,
|
|
684
|
-
pressedBackgroundColor: colors.transparent,
|
|
685
|
-
hoverBackgroundColor: colors.transparent,
|
|
686
|
-
focusBorderColor: 'rgba(0, 0, 0, 0.1)',
|
|
687
|
-
color: colors.black,
|
|
688
|
-
hoverColor: 'rgba(0, 0, 0, 0.8)',
|
|
689
|
-
activeColor: 'rgba(0, 0, 0, 0.8)'
|
|
655
|
+
revert: {
|
|
656
|
+
backgroundColor: {
|
|
657
|
+
"default": deepPurpleColorPalette['white-alpha.10'],
|
|
658
|
+
hover: deepPurpleColorPalette['white-alpha.20'],
|
|
659
|
+
pressed: deepPurpleColorPalette['white-alpha.20'],
|
|
660
|
+
disabled: colors.disabled,
|
|
661
|
+
focus: deepPurpleColorPalette['white-alpha.10']
|
|
662
|
+
},
|
|
663
|
+
color: {
|
|
664
|
+
"default": colors.white,
|
|
665
|
+
hover: deepPurpleColorPalette['white-alpha.80'],
|
|
666
|
+
pressed: deepPurpleColorPalette['white-alpha.80'],
|
|
667
|
+
disabled: deepPurpleColorPalette['grey.3'],
|
|
668
|
+
focus: colors.white
|
|
669
|
+
}
|
|
690
670
|
}
|
|
691
671
|
},
|
|
692
|
-
|
|
672
|
+
tertiary: {
|
|
693
673
|
"default": {
|
|
694
|
-
backgroundColor:
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
674
|
+
backgroundColor: {
|
|
675
|
+
"default": 'transparent',
|
|
676
|
+
hover: 'transparent',
|
|
677
|
+
pressed: 'transparent',
|
|
678
|
+
disabled: 'transparent',
|
|
679
|
+
focus: 'transparent'
|
|
680
|
+
},
|
|
681
|
+
color: {
|
|
682
|
+
"default": colors.black,
|
|
683
|
+
hover: colors.blackAnthracite,
|
|
684
|
+
pressed: colors.blackAnthracite,
|
|
685
|
+
disabled: deepPurpleColorPalette['grey.3'],
|
|
686
|
+
focus: colors.black
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
revert: {
|
|
690
|
+
backgroundColor: {
|
|
691
|
+
"default": 'transparent',
|
|
692
|
+
hover: 'transparent',
|
|
693
|
+
pressed: 'transparent',
|
|
694
|
+
disabled: 'transparent',
|
|
695
|
+
focus: 'transparent'
|
|
696
|
+
},
|
|
697
|
+
color: {
|
|
698
|
+
"default": colors.white,
|
|
699
|
+
hover: deepPurpleColorPalette['white-alpha.80'],
|
|
700
|
+
pressed: deepPurpleColorPalette['white-alpha.80'],
|
|
701
|
+
disabled: deepPurpleColorPalette['white-alpha.20'],
|
|
702
|
+
focus: colors.white
|
|
703
|
+
}
|
|
701
704
|
}
|
|
702
705
|
},
|
|
703
|
-
|
|
706
|
+
'tertiary-danger': {
|
|
704
707
|
"default": {
|
|
705
|
-
backgroundColor:
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
708
|
+
backgroundColor: {
|
|
709
|
+
"default": 'transparent',
|
|
710
|
+
hover: 'transparent',
|
|
711
|
+
pressed: 'transparent',
|
|
712
|
+
disabled: 'transparent',
|
|
713
|
+
focus: 'transparent'
|
|
714
|
+
},
|
|
715
|
+
color: {
|
|
716
|
+
"default": colors.danger,
|
|
717
|
+
hover: deepPurpleColorPalette['red.2'],
|
|
718
|
+
pressed: deepPurpleColorPalette['red.2'],
|
|
719
|
+
disabled: deepPurpleColorPalette['grey.3'],
|
|
720
|
+
focus: colors.danger
|
|
721
|
+
}
|
|
710
722
|
}
|
|
711
723
|
}
|
|
712
724
|
};
|
|
713
725
|
|
|
714
726
|
var buttonBadge = {
|
|
715
|
-
backgroundColor:
|
|
727
|
+
backgroundColor: {
|
|
728
|
+
"default": colors.danger,
|
|
729
|
+
disabled: colors.blackLight
|
|
730
|
+
},
|
|
716
731
|
dimensions: {
|
|
717
732
|
withBadge: {
|
|
718
|
-
width:
|
|
719
|
-
height:
|
|
733
|
+
width: 8,
|
|
734
|
+
height: 8
|
|
720
735
|
},
|
|
721
736
|
badgeCount: {
|
|
722
737
|
width: 20,
|
|
@@ -1913,14 +1928,13 @@ var iconButton = {
|
|
|
1913
1928
|
},
|
|
1914
1929
|
disabled: {
|
|
1915
1930
|
scale: 1,
|
|
1916
|
-
backgroundColor: button.
|
|
1917
|
-
borderColor: button.disabled["default"].borderColor
|
|
1931
|
+
backgroundColor: button.primary["default"].backgroundColor.disabled
|
|
1918
1932
|
},
|
|
1919
1933
|
"default": {
|
|
1920
|
-
pressedBackgroundColor: button["default"]
|
|
1934
|
+
pressedBackgroundColor: button.primary["default"].backgroundColor.disabled
|
|
1921
1935
|
},
|
|
1922
1936
|
ghost: {
|
|
1923
|
-
pressedBackgroundColor: button["default"].
|
|
1937
|
+
pressedBackgroundColor: button.primary["default"].backgroundColor.disabled
|
|
1924
1938
|
},
|
|
1925
1939
|
primary: {
|
|
1926
1940
|
pressedBackgroundColor: deepPurpleColorPalette['beige.1']
|
|
@@ -2814,31 +2828,27 @@ function createResponsiveStyleFromProp(responsiveBooleanValue, valueIfTrue, valu
|
|
|
2814
2828
|
return responsiveValue;
|
|
2815
2829
|
}
|
|
2816
2830
|
|
|
2817
|
-
function warn(message) {
|
|
2818
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2819
|
-
console.warn(message);
|
|
2820
|
-
}
|
|
2821
|
-
}
|
|
2822
|
-
function deprecatedMessage(symbol, deprecation, replaceBy) {
|
|
2823
|
-
var replaceMessage = replaceBy === undefined ? '' : ", please use ".concat(replaceBy, " instead");
|
|
2824
|
-
warn("[Deprecation] in ".concat(symbol, ": ").concat(deprecation, " is deprecated").concat(replaceMessage, "."));
|
|
2825
|
-
}
|
|
2826
|
-
function deprecatedInComponent(component, deprecation, replaceBy) {
|
|
2827
|
-
deprecatedMessage("<".concat(component, " />"), deprecation, replaceBy);
|
|
2828
|
-
}
|
|
2829
|
-
|
|
2830
2831
|
function getCurrentBackgroundColorForNativeBaseTheme(_ref) {
|
|
2831
2832
|
var type = _ref.type,
|
|
2832
2833
|
variant = _ref.variant,
|
|
2833
2834
|
isDisabled = _ref.isDisabled,
|
|
2834
2835
|
isHovered = _ref.isHovered,
|
|
2835
|
-
isPressed = _ref.isPressed
|
|
2836
|
-
|
|
2837
|
-
var baseKey = "kitt.button.".concat(type, ".").concat(variant);
|
|
2838
|
-
if (
|
|
2839
|
-
return "".concat(baseKey, ".
|
|
2836
|
+
isPressed = _ref.isPressed,
|
|
2837
|
+
isFocused = _ref.isFocused;
|
|
2838
|
+
var baseKey = "kitt.button.".concat(type, ".").concat(variant, ".backgroundColor");
|
|
2839
|
+
if (isDisabled) {
|
|
2840
|
+
return "".concat(baseKey, ".disabled");
|
|
2840
2841
|
}
|
|
2841
|
-
|
|
2842
|
+
if (isHovered) {
|
|
2843
|
+
return "".concat(baseKey, ".hover");
|
|
2844
|
+
}
|
|
2845
|
+
if (isPressed) {
|
|
2846
|
+
return "".concat(baseKey, ".pressed");
|
|
2847
|
+
}
|
|
2848
|
+
if (isFocused) {
|
|
2849
|
+
return "".concat(baseKey, ".focused");
|
|
2850
|
+
}
|
|
2851
|
+
return "".concat(baseKey, ".default");
|
|
2842
2852
|
}
|
|
2843
2853
|
|
|
2844
2854
|
function AnimatedContainer$2(_ref) {
|
|
@@ -2915,7 +2925,7 @@ var getTypographyFamilyWithAncestorValue = function (type, typographyFamilyInCon
|
|
|
2915
2925
|
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
2916
2926
|
};
|
|
2917
2927
|
|
|
2918
|
-
var _excluded$S = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"
|
|
2928
|
+
var _excluded$S = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
2919
2929
|
var TypographyFamilyContext = /*#__PURE__*/createContext(null);
|
|
2920
2930
|
var TypographyTypeContext = /*#__PURE__*/createContext(null);
|
|
2921
2931
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
@@ -3042,7 +3052,6 @@ function Typography(_ref2) {
|
|
|
3042
3052
|
} : _ref2$type,
|
|
3043
3053
|
variant = _ref2.variant,
|
|
3044
3054
|
color = _ref2.color,
|
|
3045
|
-
underline = _ref2.underline,
|
|
3046
3055
|
otherProps = _objectWithoutProperties(_ref2, _excluded$S);
|
|
3047
3056
|
var sx = useSx();
|
|
3048
3057
|
var typographyFamilyInContext = useContext(TypographyFamilyContext);
|
|
@@ -3074,21 +3083,14 @@ function Typography(_ref2) {
|
|
|
3074
3083
|
}
|
|
3075
3084
|
});
|
|
3076
3085
|
}
|
|
3077
|
-
var text = /*#__PURE__*/jsx(Text, _objectSpread(_objectSpread(
|
|
3086
|
+
var text = /*#__PURE__*/jsx(Text, _objectSpread(_objectSpread({
|
|
3078
3087
|
accessibilityRole: accessibilityRole || undefined,
|
|
3079
3088
|
fontSize: fontSizeForNativeBase,
|
|
3080
3089
|
lineHeight: hasTypographyAncestor ? undefined : fontSizeForNativeBase,
|
|
3081
3090
|
fontWeight: webFontWeight,
|
|
3082
3091
|
fontFamily: nativeFontFamily,
|
|
3083
|
-
borderBottomWidth: underline ? 1 : undefined,
|
|
3084
|
-
borderBottomColor: underline ? currentColorValue : undefined,
|
|
3085
3092
|
textTransform: typographyFamily === 'contentCaps' ? 'uppercase' : undefined
|
|
3086
|
-
}, colorStyles), otherProps)
|
|
3087
|
-
// The property text-underline-offset is not on native.
|
|
3088
|
-
// To add an underline with an offset, we use a custom borderBottomWidth and color.
|
|
3089
|
-
// and we set underline to undefined to avoid a double underline
|
|
3090
|
-
underline: undefined
|
|
3091
|
-
}));
|
|
3093
|
+
}, colorStyles), otherProps));
|
|
3092
3094
|
var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(TypographyFamilyContext.Provider, {
|
|
3093
3095
|
value: typographyFamily,
|
|
3094
3096
|
children: /*#__PURE__*/jsx(TypographyTypeContext.Provider, {
|
|
@@ -3137,12 +3139,14 @@ Typography.Header6 = createHeading(6);
|
|
|
3137
3139
|
|
|
3138
3140
|
function ButtonBadge(_ref) {
|
|
3139
3141
|
var withBadge = _ref.withBadge,
|
|
3140
|
-
badgeCount = _ref.badgeCount
|
|
3142
|
+
badgeCount = _ref.badgeCount,
|
|
3143
|
+
disabled = _ref.disabled;
|
|
3144
|
+
var backgroundColor = disabled ? 'kitt.buttonBadge.backgroundColor.disabled' : 'kitt.buttonBadge.backgroundColor.default';
|
|
3141
3145
|
if (withBadge) {
|
|
3142
3146
|
return /*#__PURE__*/jsx(View, {
|
|
3143
3147
|
height: "kitt.buttonBadge.dimensions.withBadge.height",
|
|
3144
3148
|
width: "kitt.buttonBadge.dimensions.withBadge.width",
|
|
3145
|
-
backgroundColor:
|
|
3149
|
+
backgroundColor: backgroundColor,
|
|
3146
3150
|
borderRadius: "kitt.buttonBadge.borderRadius.withBadge"
|
|
3147
3151
|
});
|
|
3148
3152
|
}
|
|
@@ -3152,7 +3156,7 @@ function ButtonBadge(_ref) {
|
|
|
3152
3156
|
justifyContent: "center",
|
|
3153
3157
|
height: "kitt.buttonBadge.dimensions.badgeCount.height",
|
|
3154
3158
|
width: "kitt.buttonBadge.dimensions.badgeCount.width",
|
|
3155
|
-
backgroundColor:
|
|
3159
|
+
backgroundColor: backgroundColor,
|
|
3156
3160
|
borderRadius: "kitt.buttonBadge.borderRadius.badgeCount",
|
|
3157
3161
|
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
3158
3162
|
base: "body-xs",
|
|
@@ -3240,115 +3244,93 @@ function TypographyIcon(_ref2) {
|
|
|
3240
3244
|
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
|
|
3241
3245
|
}
|
|
3242
3246
|
|
|
3243
|
-
var getButtonTextColorByType = function (type, variant, isHovered, isPressed) {
|
|
3244
|
-
var
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
case 'danger':
|
|
3251
|
-
return 'danger';
|
|
3252
|
-
case 'subtle':
|
|
3253
|
-
return isButtonInteractedWith ? 'primary-light' : 'primary';
|
|
3254
|
-
case 'subtle-dark':
|
|
3255
|
-
return isButtonInteractedWith ? 'black-light' : 'black';
|
|
3256
|
-
case 'subtle-revert':
|
|
3257
|
-
return 'white';
|
|
3258
|
-
case 'default':
|
|
3259
|
-
return variant === 'ghost' ? 'white' : 'black';
|
|
3260
|
-
default:
|
|
3261
|
-
return 'black';
|
|
3247
|
+
var getButtonTextColorByType = function (type, variant, isHovered, isPressed, isDisabled) {
|
|
3248
|
+
var baseKey = "kitt.button.".concat(type, ".").concat(variant, ".color");
|
|
3249
|
+
if (isDisabled) {
|
|
3250
|
+
return "".concat(baseKey, ".disabled");
|
|
3251
|
+
}
|
|
3252
|
+
if (isHovered || isPressed) {
|
|
3253
|
+
return "".concat(baseKey, ".hover");
|
|
3262
3254
|
}
|
|
3255
|
+
return "".concat(baseKey, ".default");
|
|
3263
3256
|
};
|
|
3264
3257
|
|
|
3265
|
-
var _excluded$Q = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing"];
|
|
3266
|
-
function
|
|
3267
|
-
var
|
|
3268
|
-
|
|
3258
|
+
var _excluded$Q = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing", "size"];
|
|
3259
|
+
function ButtonContentChildren(_ref) {
|
|
3260
|
+
var type = _ref.type,
|
|
3261
|
+
icon = _ref.icon,
|
|
3269
3262
|
iconPosition = _ref.iconPosition,
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
}
|
|
3281
|
-
function ButtonContentChildren(_ref2) {
|
|
3282
|
-
var type = _ref2.type,
|
|
3283
|
-
icon = _ref2.icon,
|
|
3284
|
-
iconPosition = _ref2.iconPosition,
|
|
3285
|
-
innerSpacing = _ref2.innerSpacing,
|
|
3286
|
-
withBadge = _ref2.withBadge,
|
|
3287
|
-
badgeCount = _ref2.badgeCount,
|
|
3288
|
-
color = _ref2.color,
|
|
3289
|
-
children = _ref2.children;
|
|
3263
|
+
innerSpacing = _ref.innerSpacing,
|
|
3264
|
+
isDisabled = _ref.isDisabled,
|
|
3265
|
+
withBadge = _ref.withBadge,
|
|
3266
|
+
badgeCount = _ref.badgeCount,
|
|
3267
|
+
color = _ref.color,
|
|
3268
|
+
children = _ref.children,
|
|
3269
|
+
isPressed = _ref.isPressed,
|
|
3270
|
+
isHovered = _ref.isHovered,
|
|
3271
|
+
_ref$size = _ref.size,
|
|
3272
|
+
size = _ref$size === void 0 ? 'default' : _ref$size;
|
|
3290
3273
|
if ((process.env.NODE_ENV !== "production")) {
|
|
3291
3274
|
if (!(children || icon)) {
|
|
3292
3275
|
throw new Error('kitt(Button): You should provide at least a children or a icon');
|
|
3293
3276
|
}
|
|
3294
3277
|
}
|
|
3295
|
-
if (!children) {
|
|
3296
|
-
return /*#__PURE__*/jsx(TypographyIcon
|
|
3297
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3298
|
-
, {
|
|
3278
|
+
if (!children && icon) {
|
|
3279
|
+
return /*#__PURE__*/jsx(TypographyIcon, {
|
|
3299
3280
|
icon: icon,
|
|
3300
3281
|
color: color
|
|
3301
3282
|
});
|
|
3302
3283
|
}
|
|
3303
|
-
var buttonIconSharedProps = {
|
|
3304
|
-
type: type,
|
|
3305
|
-
iconPosition: iconPosition,
|
|
3306
|
-
color: color
|
|
3307
|
-
};
|
|
3308
|
-
|
|
3309
3284
|
// Make the multilines case work properly on native - Breaks the web implem
|
|
3310
3285
|
var sharedNativeStyle = {
|
|
3311
3286
|
flexShrink: 1
|
|
3312
3287
|
};
|
|
3313
|
-
return /*#__PURE__*/jsxs(
|
|
3288
|
+
return /*#__PURE__*/jsxs(HStack$1, {
|
|
3314
3289
|
alignItems: "center",
|
|
3315
3290
|
justifyContent: innerSpacing,
|
|
3316
|
-
|
|
3317
|
-
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(
|
|
3291
|
+
space: "kitt.2",
|
|
3292
|
+
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(TypographyIcon, _objectSpread(_objectSpread({}, {
|
|
3293
|
+
type: type,
|
|
3294
|
+
color: color
|
|
3295
|
+
}), {}, {
|
|
3318
3296
|
testID: "button.ButtonContent.leftButtonIcon",
|
|
3319
|
-
icon: icon
|
|
3297
|
+
icon: icon,
|
|
3298
|
+
color: color,
|
|
3299
|
+
size: "kitt.button.icon.".concat(size, ".size")
|
|
3320
3300
|
})) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
3321
3301
|
/* On native code, this is the only way to ensure that the text is centered */
|
|
3322
3302
|
textAlign: "center",
|
|
3323
3303
|
_android: sharedNativeStyle,
|
|
3324
3304
|
_ios: sharedNativeStyle,
|
|
3325
|
-
base: "
|
|
3326
|
-
variant: "
|
|
3305
|
+
base: "label-large",
|
|
3306
|
+
variant: "semibold",
|
|
3307
|
+
underline: (type === 'tertiary' || type === 'tertiary-danger') && !isHovered && !isPressed,
|
|
3327
3308
|
color: color,
|
|
3328
3309
|
children: children
|
|
3329
|
-
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(
|
|
3330
|
-
icon: icon
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3310
|
+
}), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(TypographyIcon, {
|
|
3311
|
+
icon: icon,
|
|
3312
|
+
color: color,
|
|
3313
|
+
size: "kitt.button.icon.".concat(size, ".size")
|
|
3314
|
+
}) : null, withBadge || badgeCount && badgeCount > 0 ? /*#__PURE__*/jsx(ButtonBadge, {
|
|
3315
|
+
disabled: isDisabled,
|
|
3316
|
+
withBadge: withBadge,
|
|
3317
|
+
badgeCount: badgeCount
|
|
3337
3318
|
}) : null]
|
|
3338
3319
|
});
|
|
3339
3320
|
}
|
|
3340
|
-
function ButtonContent(
|
|
3341
|
-
var type =
|
|
3342
|
-
variant =
|
|
3343
|
-
isDisabled =
|
|
3344
|
-
icon =
|
|
3345
|
-
children =
|
|
3346
|
-
isHovered =
|
|
3347
|
-
isPressed =
|
|
3348
|
-
|
|
3349
|
-
var innerSpacing =
|
|
3350
|
-
|
|
3351
|
-
|
|
3321
|
+
function ButtonContent(_ref2) {
|
|
3322
|
+
var type = _ref2.type,
|
|
3323
|
+
variant = _ref2.variant,
|
|
3324
|
+
isDisabled = _ref2.isDisabled,
|
|
3325
|
+
icon = _ref2.icon,
|
|
3326
|
+
children = _ref2.children,
|
|
3327
|
+
isHovered = _ref2.isHovered,
|
|
3328
|
+
isPressed = _ref2.isPressed;
|
|
3329
|
+
_ref2.isFocused;
|
|
3330
|
+
var innerSpacing = _ref2.innerSpacing,
|
|
3331
|
+
size = _ref2.size,
|
|
3332
|
+
props = _objectWithoutProperties(_ref2, _excluded$Q);
|
|
3333
|
+
var color = getButtonTextColorByType(type, variant, isHovered, isPressed, isDisabled);
|
|
3352
3334
|
return /*#__PURE__*/jsx(View, {
|
|
3353
3335
|
_web: {
|
|
3354
3336
|
// Make the multilines case work properly on web
|
|
@@ -3362,65 +3344,45 @@ function ButtonContent(_ref3) {
|
|
|
3362
3344
|
type: type,
|
|
3363
3345
|
isDisabled: isDisabled,
|
|
3364
3346
|
color: color,
|
|
3365
|
-
innerSpacing: innerSpacing
|
|
3347
|
+
innerSpacing: innerSpacing,
|
|
3348
|
+
isHovered: isHovered,
|
|
3349
|
+
isPressed: isPressed,
|
|
3350
|
+
size: size
|
|
3366
3351
|
}, props), {}, {
|
|
3367
3352
|
children: children
|
|
3368
3353
|
}))
|
|
3369
3354
|
});
|
|
3370
3355
|
}
|
|
3371
3356
|
|
|
3372
|
-
function
|
|
3373
|
-
var
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
return 'default';
|
|
3377
|
-
}
|
|
3378
|
-
function ButtonPadding(_ref2) {
|
|
3379
|
-
var children = _ref2.children,
|
|
3380
|
-
size = _ref2.size,
|
|
3381
|
-
hasBadge = _ref2.hasBadge;
|
|
3382
|
-
var currentPaddingKey = getCurrentPaddingConfig({
|
|
3383
|
-
size: size
|
|
3384
|
-
});
|
|
3357
|
+
function ButtonPadding(_ref) {
|
|
3358
|
+
var children = _ref.children,
|
|
3359
|
+
size = _ref.size;
|
|
3360
|
+
_ref.hasBadge;
|
|
3385
3361
|
return /*#__PURE__*/jsx(View, {
|
|
3386
3362
|
position: "relative",
|
|
3387
3363
|
flexDirection: "row",
|
|
3388
3364
|
alignItems: "center",
|
|
3389
3365
|
justifyContent: "center",
|
|
3390
|
-
paddingX: "kitt.button.padding.".concat(
|
|
3391
|
-
paddingY: "kitt.button.padding.".concat(
|
|
3392
|
-
paddingRight: hasBadge ? "kitt.button.padding.".concat(currentPaddingKey, ".hasBadge.right") : undefined,
|
|
3366
|
+
paddingX: "kitt.button.padding.".concat(size, ".horizontal"),
|
|
3367
|
+
paddingY: "kitt.button.padding.".concat(size, ".vertical"),
|
|
3393
3368
|
minHeight: "kitt.button.minHeight",
|
|
3394
3369
|
children: children
|
|
3395
3370
|
});
|
|
3396
3371
|
}
|
|
3397
3372
|
|
|
3398
|
-
function DisabledBorder() {
|
|
3399
|
-
return /*#__PURE__*/jsx(View, {
|
|
3400
|
-
position: "absolute",
|
|
3401
|
-
top: 0,
|
|
3402
|
-
left: 0,
|
|
3403
|
-
right: 0,
|
|
3404
|
-
bottom: 0,
|
|
3405
|
-
borderWidth: "kitt.button.borderWidth.disabled",
|
|
3406
|
-
borderColor: "kitt.button.disabled.default.borderColor",
|
|
3407
|
-
borderRadius: "kitt.button.borderRadius"
|
|
3408
|
-
});
|
|
3409
|
-
}
|
|
3410
|
-
|
|
3411
3373
|
function FocusBorder(_ref) {
|
|
3412
|
-
var
|
|
3413
|
-
variant = _ref.variant,
|
|
3414
|
-
isFocused = _ref.isFocused,
|
|
3374
|
+
var isFocused = _ref.isFocused,
|
|
3415
3375
|
isHovered = _ref.isHovered,
|
|
3416
3376
|
isPressed = _ref.isPressed;
|
|
3417
3377
|
var _useTheme = useTheme(),
|
|
3418
3378
|
buttonTheme = _useTheme.kitt.button;
|
|
3379
|
+
var outerBorderRadius = buttonTheme.borderRadius + buttonTheme.borderWidth.focus;
|
|
3380
|
+
var innerBorderRadius = buttonTheme.borderRadius;
|
|
3419
3381
|
return /*#__PURE__*/jsx(View, {
|
|
3420
3382
|
_web: {
|
|
3421
3383
|
style: {
|
|
3422
|
-
width: "calc(100% + ".concat(buttonTheme.
|
|
3423
|
-
height: "calc(100% + ".concat(buttonTheme.
|
|
3384
|
+
width: "calc(100% + ".concat(buttonTheme.borderRadius, "px)"),
|
|
3385
|
+
height: "calc(100% + ".concat(buttonTheme.borderRadius, "px)"),
|
|
3424
3386
|
transitionProperty: 'opacity',
|
|
3425
3387
|
transitionDuration: buttonTheme.transition.duration,
|
|
3426
3388
|
transitionTimingFunction: buttonTheme.transition.timingFunction
|
|
@@ -3428,25 +3390,15 @@ function FocusBorder(_ref) {
|
|
|
3428
3390
|
},
|
|
3429
3391
|
opacity: isFocused && !(isPressed || isHovered) ? 1 : 0,
|
|
3430
3392
|
position: "absolute",
|
|
3431
|
-
left: -buttonTheme.borderWidth.focus,
|
|
3432
|
-
top: -buttonTheme.borderWidth.focus,
|
|
3433
3393
|
borderWidth: "kitt.button.borderWidth.focus",
|
|
3434
|
-
borderColor: "kitt.button.
|
|
3435
|
-
borderRadius:
|
|
3394
|
+
borderColor: "kitt.button.focusBorderColor",
|
|
3395
|
+
borderRadius: outerBorderRadius,
|
|
3396
|
+
children: /*#__PURE__*/jsx(View, {
|
|
3397
|
+
borderRadius: innerBorderRadius
|
|
3398
|
+
})
|
|
3436
3399
|
});
|
|
3437
3400
|
}
|
|
3438
3401
|
|
|
3439
|
-
var hasVariant = function (button, variant) {
|
|
3440
|
-
return variant in button;
|
|
3441
|
-
};
|
|
3442
|
-
function getVariantValuesIfExist(theme, type, variant) {
|
|
3443
|
-
var button = theme.kitt.button[type];
|
|
3444
|
-
if (hasVariant(button, variant)) {
|
|
3445
|
-
return button[variant];
|
|
3446
|
-
}
|
|
3447
|
-
return theme.kitt.button[type]["default"];
|
|
3448
|
-
}
|
|
3449
|
-
|
|
3450
3402
|
var useNativeAnimation$5 = function (_ref) {
|
|
3451
3403
|
var type = _ref.type,
|
|
3452
3404
|
variant = _ref.variant,
|
|
@@ -3454,13 +3406,10 @@ var useNativeAnimation$5 = function (_ref) {
|
|
|
3454
3406
|
var theme = useTheme();
|
|
3455
3407
|
var pressed = useSharedValue(isPressedInternal ? 1 : 0);
|
|
3456
3408
|
var color = useSharedValue(0);
|
|
3457
|
-
var _getVariantValuesIfEx = getVariantValuesIfExist(theme, type, variant),
|
|
3458
|
-
backgroundColor = _getVariantValuesIfEx.backgroundColor,
|
|
3459
|
-
pressedBackgroundColor = _getVariantValuesIfEx.pressedBackgroundColor;
|
|
3460
3409
|
var scale = theme.kitt.button.scale;
|
|
3461
3410
|
var animatedStyles = useAnimatedStyle(function () {
|
|
3462
3411
|
return {
|
|
3463
|
-
backgroundColor: interpolateColor(color.value, [0, 1], [backgroundColor,
|
|
3412
|
+
backgroundColor: interpolateColor(color.value, [0, 1], [type === 'tertiary-danger' ? theme.kitt.button['tertiary-danger']["default"].backgroundColor["default"] : theme.kitt.button[type][variant].backgroundColor["default"], type === 'tertiary-danger' ? theme.kitt.button['tertiary-danger']["default"].backgroundColor.pressed : theme.kitt.button[type][variant].backgroundColor.pressed]),
|
|
3464
3413
|
transform: [{
|
|
3465
3414
|
scale: withSpring(pressed.value ? scale.base.active : scale.base["default"])
|
|
3466
3415
|
}]
|
|
@@ -3479,28 +3428,17 @@ var useNativeAnimation$5 = function (_ref) {
|
|
|
3479
3428
|
};
|
|
3480
3429
|
};
|
|
3481
3430
|
|
|
3482
|
-
var getButtonSize = function (_ref) {
|
|
3483
|
-
var large = _ref.large,
|
|
3484
|
-
xLarge = _ref.xLarge,
|
|
3485
|
-
size = _ref.size;
|
|
3486
|
-
if (large) return 'large';
|
|
3487
|
-
if (xLarge) return 'xLarge';
|
|
3488
|
-
return size;
|
|
3489
|
-
};
|
|
3490
|
-
|
|
3491
|
-
var allowedGhostTypes = ['primary', 'default', 'danger'];
|
|
3492
3431
|
var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
3493
3432
|
var _children = _ref.children,
|
|
3494
3433
|
_ref$type = _ref.type,
|
|
3495
|
-
type = _ref$type === void 0 ? '
|
|
3434
|
+
type = _ref$type === void 0 ? 'secondary' : _ref$type,
|
|
3496
3435
|
_ref$variant = _ref.variant,
|
|
3497
3436
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
3498
3437
|
disabled = _ref.disabled,
|
|
3499
3438
|
stretch = _ref.stretch,
|
|
3500
|
-
large = _ref.large,
|
|
3501
|
-
xLarge = _ref.xLarge,
|
|
3502
3439
|
icon = _ref.icon,
|
|
3503
|
-
|
|
3440
|
+
_ref$size = _ref.size,
|
|
3441
|
+
size = _ref$size === void 0 ? 'default' : _ref$size,
|
|
3504
3442
|
_ref$iconPosition = _ref.iconPosition,
|
|
3505
3443
|
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
|
|
3506
3444
|
testID = _ref.testID,
|
|
@@ -3527,18 +3465,9 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3527
3465
|
onPressIn = _useNativeAnimation.onPressIn,
|
|
3528
3466
|
onPressOut = _useNativeAnimation.onPressOut,
|
|
3529
3467
|
animatedStyles = _useNativeAnimation.animatedStyles;
|
|
3530
|
-
if (
|
|
3531
|
-
throw new Error('variant
|
|
3468
|
+
if (process.env.NODE_ENV !== 'production' && variant === 'revert' && type === 'tertiary-danger') {
|
|
3469
|
+
throw new Error('Invalid revert variant for tertiary-danger button type. Only default variant is allowed.');
|
|
3532
3470
|
}
|
|
3533
|
-
if (large || xLarge) {
|
|
3534
|
-
var deprecatedProp = large ? 'large' : 'xLarge';
|
|
3535
|
-
deprecatedInComponent('Button', "".concat(deprecatedProp, " prop"), 'size');
|
|
3536
|
-
}
|
|
3537
|
-
var size = getButtonSize({
|
|
3538
|
-
large: large,
|
|
3539
|
-
xLarge: xLarge,
|
|
3540
|
-
size: sizeProp
|
|
3541
|
-
});
|
|
3542
3471
|
return /*#__PURE__*/jsx(Pressable, {
|
|
3543
3472
|
ref: ref,
|
|
3544
3473
|
disabled: disabled,
|
|
@@ -3550,6 +3479,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3550
3479
|
alignSelf: createResponsiveStyleFromProp(stretch, undefined, 'flex-start'),
|
|
3551
3480
|
minWidth: "kitt.button.minWidth",
|
|
3552
3481
|
maxWidth: createResponsiveStyleFromProp(stretch, '100%', 'kitt.button.maxWidth'),
|
|
3482
|
+
maxHeight: "kitt.button.maxHeight",
|
|
3553
3483
|
width: createResponsiveStyleFromProp(stretch, '100%', 'auto'),
|
|
3554
3484
|
onPress: onPress,
|
|
3555
3485
|
onPressIn: onPressIn,
|
|
@@ -3585,10 +3515,9 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3585
3515
|
isPressed: isPressed,
|
|
3586
3516
|
isFocused: isFocused,
|
|
3587
3517
|
innerSpacing: innerSpacing,
|
|
3518
|
+
size: size,
|
|
3588
3519
|
children: _children
|
|
3589
|
-
}),
|
|
3590
|
-
type: type,
|
|
3591
|
-
variant: variant,
|
|
3520
|
+
}), /*#__PURE__*/jsx(FocusBorder, {
|
|
3592
3521
|
isFocused: isFocused || isFocusedInternal,
|
|
3593
3522
|
isHovered: isHovered,
|
|
3594
3523
|
isPressed: isPressed
|
|
@@ -3782,7 +3711,7 @@ function Actions(_ref) {
|
|
|
3782
3711
|
flexGrow: 1,
|
|
3783
3712
|
reversed: isReversed
|
|
3784
3713
|
}, props), {}, {
|
|
3785
|
-
space: "kitt.
|
|
3714
|
+
space: "kitt.2",
|
|
3786
3715
|
children: children
|
|
3787
3716
|
}));
|
|
3788
3717
|
}
|
|
@@ -8935,7 +8864,8 @@ function InfoCard(_ref) {
|
|
|
8935
8864
|
icon: /*#__PURE__*/jsx(CaretRightRegularIcon, {})
|
|
8936
8865
|
}) : /*#__PURE__*/jsx(View$1, {
|
|
8937
8866
|
children: /*#__PURE__*/jsx(Button, {
|
|
8938
|
-
type:
|
|
8867
|
+
type: "tertiary",
|
|
8868
|
+
variant: isContrastReversed ? 'revert' : undefined,
|
|
8939
8869
|
onPress: onPress,
|
|
8940
8870
|
children: action === null || action === void 0 ? void 0 : action.label
|
|
8941
8871
|
})
|
|
@@ -9477,14 +9407,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9477
9407
|
}
|
|
9478
9408
|
},
|
|
9479
9409
|
button: {
|
|
9480
|
-
"default": theme.button["default"],
|
|
9481
|
-
dark: theme.button.dark,
|
|
9482
9410
|
primary: theme.button.primary,
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
'
|
|
9486
|
-
|
|
9487
|
-
disabled: theme.button.disabled
|
|
9411
|
+
secondary: theme.button.secondary,
|
|
9412
|
+
tertiary: theme.button.tertiary,
|
|
9413
|
+
'tertiary-danger': theme.button['tertiary-danger'],
|
|
9414
|
+
focusBorderColor: theme.button.focusBorderColor
|
|
9488
9415
|
},
|
|
9489
9416
|
choices: {
|
|
9490
9417
|
item: {
|
|
@@ -9913,7 +9840,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
9913
9840
|
iconButton: {
|
|
9914
9841
|
borderColor: theme.iconButton.borderColor,
|
|
9915
9842
|
disabled: {
|
|
9916
|
-
borderColor: theme.iconButton.disabled.borderColor,
|
|
9917
9843
|
backgroundColor: theme.iconButton.disabled.backgroundColor
|
|
9918
9844
|
},
|
|
9919
9845
|
black: {
|
|
@@ -10463,7 +10389,16 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10463
10389
|
button: {
|
|
10464
10390
|
minWidth: theme.button.minWidth,
|
|
10465
10391
|
maxWidth: theme.button.maxWidth,
|
|
10466
|
-
minHeight: theme.button.minHeight
|
|
10392
|
+
minHeight: theme.button.minHeight,
|
|
10393
|
+
maxHeight: theme.button.maxHeight,
|
|
10394
|
+
icon: {
|
|
10395
|
+
"default": {
|
|
10396
|
+
size: theme.button.icon["default"].size
|
|
10397
|
+
},
|
|
10398
|
+
medium: {
|
|
10399
|
+
size: theme.button.icon.medium.size
|
|
10400
|
+
}
|
|
10401
|
+
}
|
|
10467
10402
|
},
|
|
10468
10403
|
buttonBadge: {
|
|
10469
10404
|
dimensions: {
|
|
@@ -10856,7 +10791,10 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10856
10791
|
}
|
|
10857
10792
|
},
|
|
10858
10793
|
button: {
|
|
10859
|
-
padding:
|
|
10794
|
+
padding: {
|
|
10795
|
+
"default": theme.button.padding["default"],
|
|
10796
|
+
medium: theme.button.padding.medium
|
|
10797
|
+
}
|
|
10860
10798
|
},
|
|
10861
10799
|
cardModal: {
|
|
10862
10800
|
overlayPadding: theme.cardModal.overlayPadding
|