@ornikar/kitt-universal 27.0.1-canary.01819bc93ab006bfbaa4e1335cd8afa2380068a0.0 → 27.1.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 +3 -13
- 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 +7 -19
- 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 +352 -414
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +322 -370
- 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 +131 -117
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +131 -117
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +28 -28
- 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.web.js
CHANGED
|
@@ -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:
|
|
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
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
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:
|
|
587
|
-
},
|
|
588
|
-
large: {
|
|
589
|
-
hasBadge: {
|
|
590
|
-
right: 12
|
|
591
|
-
},
|
|
592
|
-
horizontal: 24,
|
|
593
|
-
vertical: 11
|
|
588
|
+
vertical: 8
|
|
594
589
|
},
|
|
595
|
-
|
|
596
|
-
hasBadge: {
|
|
597
|
-
right: 12
|
|
598
|
-
},
|
|
590
|
+
medium: {
|
|
599
591
|
horizontal: 24,
|
|
600
|
-
vertical:
|
|
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
|
-
|
|
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:
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
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
|
-
|
|
632
|
-
backgroundColor:
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
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
|
-
|
|
634
|
+
secondary: {
|
|
650
635
|
"default": {
|
|
651
|
-
backgroundColor:
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
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
|
-
|
|
657
|
-
backgroundColor:
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
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
|
-
|
|
668
|
+
tertiary: {
|
|
689
669
|
"default": {
|
|
690
|
-
backgroundColor:
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
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
|
-
|
|
702
|
+
'tertiary-danger': {
|
|
700
703
|
"default": {
|
|
701
|
-
backgroundColor:
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
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:
|
|
723
|
+
backgroundColor: {
|
|
724
|
+
"default": colors.danger,
|
|
725
|
+
disabled: colors.blackLight
|
|
726
|
+
},
|
|
712
727
|
dimensions: {
|
|
713
728
|
withBadge: {
|
|
714
|
-
width:
|
|
715
|
-
height:
|
|
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.
|
|
1913
|
-
borderColor: button.disabled["default"].borderColor
|
|
1927
|
+
backgroundColor: button.primary["default"].backgroundColor.disabled
|
|
1914
1928
|
},
|
|
1915
1929
|
"default": {
|
|
1916
|
-
pressedBackgroundColor: button["default"]
|
|
1930
|
+
pressedBackgroundColor: button.primary["default"].backgroundColor.disabled
|
|
1917
1931
|
},
|
|
1918
1932
|
ghost: {
|
|
1919
|
-
pressedBackgroundColor: button["default"].
|
|
1933
|
+
pressedBackgroundColor: button.primary["default"].backgroundColor.disabled
|
|
1920
1934
|
},
|
|
1921
1935
|
primary: {
|
|
1922
1936
|
pressedBackgroundColor: deepPurpleColorPalette['beige.1']
|
|
@@ -2460,7 +2474,7 @@ var breakpoints = {
|
|
|
2460
2474
|
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2461
2475
|
var theme = {
|
|
2462
2476
|
spacing: spacing,
|
|
2463
|
-
getSpacing: function (multiplier) {
|
|
2477
|
+
getSpacing: function getSpacing(multiplier) {
|
|
2464
2478
|
return spacing * multiplier;
|
|
2465
2479
|
},
|
|
2466
2480
|
colors: colors,
|
|
@@ -2647,7 +2661,7 @@ var ActionCardPressable = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
2647
2661
|
onPress: onPress,
|
|
2648
2662
|
onHoverIn: onHoverIn,
|
|
2649
2663
|
onHoverOut: onHoverOut,
|
|
2650
|
-
children: function (_ref3) {
|
|
2664
|
+
children: function children(_ref3) {
|
|
2651
2665
|
var isHovered = _ref3.isHovered,
|
|
2652
2666
|
isPressed = _ref3.isPressed,
|
|
2653
2667
|
isFocused = _ref3.isFocused;
|
|
@@ -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
|
-
|
|
2833
|
-
var baseKey = "kitt.button.".concat(type, ".").concat(variant);
|
|
2834
|
-
if (
|
|
2835
|
-
return "".concat(baseKey, ".
|
|
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");
|
|
2837
|
+
}
|
|
2838
|
+
if (isHovered) {
|
|
2839
|
+
return "".concat(baseKey, ".hover");
|
|
2840
|
+
}
|
|
2841
|
+
if (isPressed) {
|
|
2842
|
+
return "".concat(baseKey, ".pressed");
|
|
2836
2843
|
}
|
|
2837
|
-
|
|
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"
|
|
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(
|
|
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:
|
|
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:
|
|
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
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
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");
|
|
3288
|
+
}
|
|
3289
|
+
if (isHovered || isPressed) {
|
|
3290
|
+
return "".concat(baseKey, ".hover");
|
|
3299
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
|
|
3304
|
-
var
|
|
3305
|
-
|
|
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
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
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(
|
|
3325
|
+
return /*#__PURE__*/jsxs(HStack$1, {
|
|
3351
3326
|
alignItems: "center",
|
|
3352
3327
|
justifyContent: innerSpacing,
|
|
3353
|
-
|
|
3354
|
-
children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(
|
|
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: "
|
|
3363
|
-
variant: "
|
|
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(
|
|
3367
|
-
icon: icon
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
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(
|
|
3378
|
-
var type =
|
|
3379
|
-
variant =
|
|
3380
|
-
isDisabled =
|
|
3381
|
-
icon =
|
|
3382
|
-
children =
|
|
3383
|
-
isHovered =
|
|
3384
|
-
isPressed =
|
|
3385
|
-
|
|
3386
|
-
var innerSpacing =
|
|
3387
|
-
|
|
3388
|
-
|
|
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
|
|
3410
|
-
var
|
|
3411
|
-
|
|
3412
|
-
|
|
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(
|
|
3428
|
-
paddingY: "kitt.button.padding.".concat(
|
|
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
|
|
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.
|
|
3460
|
-
height: "calc(100% + ".concat(buttonTheme.
|
|
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.
|
|
3472
|
-
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 ? '
|
|
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
|
-
|
|
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 (
|
|
3530
|
-
throw new Error('variant
|
|
3531
|
-
}
|
|
3532
|
-
if (large || xLarge) {
|
|
3533
|
-
var deprecatedProp = large ? 'large' : 'xLarge';
|
|
3534
|
-
deprecatedInComponent('Button', "".concat(deprecatedProp, " prop"), 'size');
|
|
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.');
|
|
3535
3483
|
}
|
|
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,
|
|
@@ -3557,7 +3501,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3557
3501
|
onHoverOut: onHoverOut,
|
|
3558
3502
|
onFocus: onFocus,
|
|
3559
3503
|
onBlur: onBlur,
|
|
3560
|
-
children: function (_ref2) {
|
|
3504
|
+
children: function children(_ref2) {
|
|
3561
3505
|
var isHovered = _ref2.isHovered,
|
|
3562
3506
|
isPressed = _ref2.isPressed,
|
|
3563
3507
|
isFocused = _ref2.isFocused;
|
|
@@ -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
|
-
}),
|
|
3589
|
-
type: type,
|
|
3590
|
-
variant: variant,
|
|
3533
|
+
}), /*#__PURE__*/jsx(FocusBorder, {
|
|
3591
3534
|
isFocused: isFocused || isFocusedInternal,
|
|
3592
3535
|
isHovered: isHovered,
|
|
3593
3536
|
isPressed: isPressed
|
|
@@ -3653,7 +3596,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3653
3596
|
stretch: stretch,
|
|
3654
3597
|
disabled: isLoading ? true : disabled,
|
|
3655
3598
|
icon: isLoading ? /*#__PURE__*/jsx(LoaderIcon, {}) : icon,
|
|
3656
|
-
onPress: function (e) {
|
|
3599
|
+
onPress: function handlePress(e) {
|
|
3657
3600
|
var callPressAndUpdateLoadingState = /*#__PURE__*/function () {
|
|
3658
3601
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3659
3602
|
return _regeneratorRuntime().wrap(function (_context) {
|
|
@@ -3755,7 +3698,7 @@ function Actions(_ref) {
|
|
|
3755
3698
|
flexGrow: 1,
|
|
3756
3699
|
reversed: isReversed
|
|
3757
3700
|
}, props), {}, {
|
|
3758
|
-
space: "kitt.
|
|
3701
|
+
space: "kitt.2",
|
|
3759
3702
|
children: children
|
|
3760
3703
|
}));
|
|
3761
3704
|
}
|
|
@@ -3982,7 +3925,7 @@ function CloseButton(_ref) {
|
|
|
3982
3925
|
onPress = _ref.onPress;
|
|
3983
3926
|
var onCloseContextCallback = useOnCloseModalBehaviour();
|
|
3984
3927
|
return /*#__PURE__*/cloneElement(children, {
|
|
3985
|
-
onPress: function () {
|
|
3928
|
+
onPress: function handleClose() {
|
|
3986
3929
|
if (onPress) onPress();
|
|
3987
3930
|
onCloseContextCallback();
|
|
3988
3931
|
}
|
|
@@ -4132,7 +4075,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4132
4075
|
onClose: onClose,
|
|
4133
4076
|
children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4134
4077
|
visible: visible,
|
|
4135
|
-
onExited: function () {
|
|
4078
|
+
onExited: function handleExitAnimationDone() {
|
|
4136
4079
|
if (onExited) onExited();
|
|
4137
4080
|
setIsModalBehaviourVisible(false);
|
|
4138
4081
|
},
|
|
@@ -4331,8 +4274,8 @@ function AnimatedChoiceItemView(_ref) {
|
|
|
4331
4274
|
|
|
4332
4275
|
var useNativeAnimation$4 = function () {
|
|
4333
4276
|
return {
|
|
4334
|
-
onPressIn: function () {},
|
|
4335
|
-
onPressOut: function () {},
|
|
4277
|
+
onPressIn: function onPressIn() {},
|
|
4278
|
+
onPressOut: function onPressOut() {},
|
|
4336
4279
|
backgroundStyles: undefined
|
|
4337
4280
|
};
|
|
4338
4281
|
};
|
|
@@ -4389,7 +4332,7 @@ function ChoiceItem(_ref) {
|
|
|
4389
4332
|
style: style,
|
|
4390
4333
|
onBlur: onBlur,
|
|
4391
4334
|
onFocus: onFocus,
|
|
4392
|
-
onPress: function (e) {
|
|
4335
|
+
onPress: function handlePress(e) {
|
|
4393
4336
|
if (onFocus) onFocus(e);
|
|
4394
4337
|
if (onPress) onPress();
|
|
4395
4338
|
handleChange();
|
|
@@ -4397,7 +4340,7 @@ function ChoiceItem(_ref) {
|
|
|
4397
4340
|
},
|
|
4398
4341
|
onPressIn: onPressIn,
|
|
4399
4342
|
onPressOut: onPressOut,
|
|
4400
|
-
children: function (_ref2) {
|
|
4343
|
+
children: function children(_ref2) {
|
|
4401
4344
|
var isHovered = _ref2.isHovered,
|
|
4402
4345
|
isPressed = _ref2.isPressed;
|
|
4403
4346
|
return /*#__PURE__*/jsxs(AnimatedChoiceItemView, {
|
|
@@ -4493,7 +4436,7 @@ function Choices(_ref2) {
|
|
|
4493
4436
|
disabled: disabled,
|
|
4494
4437
|
variant: variant,
|
|
4495
4438
|
onPress: !isForm ? onPress : undefined,
|
|
4496
|
-
onChange: isForm ? function (newValue) {
|
|
4439
|
+
onChange: isForm ? function handleChange(newValue) {
|
|
4497
4440
|
setCurrentValue(newValue);
|
|
4498
4441
|
if (onChange) onChange(newValue);
|
|
4499
4442
|
} : undefined,
|
|
@@ -4630,7 +4573,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4630
4573
|
},
|
|
4631
4574
|
children: /*#__PURE__*/jsx(DialogModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4632
4575
|
visible: visible,
|
|
4633
|
-
onExited: function () {
|
|
4576
|
+
onExited: function handleExitAnimationDone() {
|
|
4634
4577
|
if (onExited) onExited();
|
|
4635
4578
|
setIsModalBehaviourVisible(false);
|
|
4636
4579
|
},
|
|
@@ -5077,7 +5020,7 @@ function isReactElement(element) {
|
|
|
5077
5020
|
return _typeof(element) === 'object' && element !== null && 'type' in element && 'props' in element;
|
|
5078
5021
|
}
|
|
5079
5022
|
function Autocomplete(_ref) {
|
|
5080
|
-
var
|
|
5023
|
+
var _children = _ref.children,
|
|
5081
5024
|
name = _ref.name,
|
|
5082
5025
|
disabled = _ref.disabled,
|
|
5083
5026
|
placeholder = _ref.placeholder,
|
|
@@ -5104,7 +5047,7 @@ function Autocomplete(_ref) {
|
|
|
5104
5047
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5105
5048
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5106
5049
|
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
5107
|
-
var childrenArray = Children.toArray(
|
|
5050
|
+
var childrenArray = Children.toArray(_children);
|
|
5108
5051
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5109
5052
|
return {
|
|
5110
5053
|
child: child,
|
|
@@ -5115,12 +5058,12 @@ function Autocomplete(_ref) {
|
|
|
5115
5058
|
defaultIsOpen: isInitialOpen,
|
|
5116
5059
|
initialSelectedItem: initialValue,
|
|
5117
5060
|
initialInputValue: initialValue ? itemToString(initialValue) : undefined,
|
|
5118
|
-
itemToString: function (item) {
|
|
5061
|
+
itemToString: function handleItemToString(item) {
|
|
5119
5062
|
// Prevents returning null values
|
|
5120
5063
|
if (!itemToString) return '';
|
|
5121
5064
|
return itemToString(item || undefined);
|
|
5122
5065
|
},
|
|
5123
|
-
stateReducer: function (state, changes) {
|
|
5066
|
+
stateReducer: function stateReducer(state, changes) {
|
|
5124
5067
|
switch (changes.type) {
|
|
5125
5068
|
case Downshift.stateChangeTypes.changeInput:
|
|
5126
5069
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
@@ -5130,7 +5073,7 @@ function Autocomplete(_ref) {
|
|
|
5130
5073
|
return changes;
|
|
5131
5074
|
}
|
|
5132
5075
|
},
|
|
5133
|
-
onChange: function (selectedItem, stateAndHelpers) {
|
|
5076
|
+
onChange: function onChange(selectedItem, stateAndHelpers) {
|
|
5134
5077
|
if (_onChange) {
|
|
5135
5078
|
_onChange(selectedItem, stateAndHelpers);
|
|
5136
5079
|
}
|
|
@@ -5138,7 +5081,7 @@ function Autocomplete(_ref) {
|
|
|
5138
5081
|
onSelect: onSelectItem,
|
|
5139
5082
|
onOuterClick: onOuterPress,
|
|
5140
5083
|
onInputValueChange: onInputChange,
|
|
5141
|
-
children: function (_ref2) {
|
|
5084
|
+
children: function children(_ref2) {
|
|
5142
5085
|
var getRootProps = _ref2.getRootProps,
|
|
5143
5086
|
getInputProps = _ref2.getInputProps,
|
|
5144
5087
|
getMenuProps = _ref2.getMenuProps,
|
|
@@ -5190,20 +5133,20 @@ function Autocomplete(_ref) {
|
|
|
5190
5133
|
right: right || (canDisplayCollapseButton ? /*#__PURE__*/jsx(InputPressable, _objectSpread(_objectSpread({}, toggleProps), {}, {
|
|
5191
5134
|
testID: "kitt.Autocomplete.listToggle",
|
|
5192
5135
|
hitSlop: 40,
|
|
5193
|
-
onPress: function (e) {
|
|
5136
|
+
onPress: function handleTogglePress(e) {
|
|
5194
5137
|
onClickToggle(e);
|
|
5195
5138
|
},
|
|
5196
5139
|
children: /*#__PURE__*/jsx(InputIcon, {
|
|
5197
5140
|
icon: isCurrentlyOpen ? /*#__PURE__*/jsx(CaretUpFillIcon, {}) : /*#__PURE__*/jsx(CaretDownFillIcon, {})
|
|
5198
5141
|
})
|
|
5199
5142
|
})) : null),
|
|
5200
|
-
onFocus: function (e) {
|
|
5143
|
+
onFocus: function onFocus(e) {
|
|
5201
5144
|
openMenu();
|
|
5202
5145
|
/** @ts-expect-error onFocus wants web events */
|
|
5203
5146
|
if (onSearchInputFocus) onSearchInputFocus(e);
|
|
5204
5147
|
if (_onFocus) _onFocus(e);
|
|
5205
5148
|
},
|
|
5206
|
-
onBlur: function (e) {
|
|
5149
|
+
onBlur: function onBlur(e) {
|
|
5207
5150
|
/** @ts-expect-error onBlur wants web events */
|
|
5208
5151
|
if (onSearchInputBlur) onSearchInputBlur(e);
|
|
5209
5152
|
|
|
@@ -5239,10 +5182,10 @@ function Autocomplete(_ref) {
|
|
|
5239
5182
|
selected: ariaSelected
|
|
5240
5183
|
},
|
|
5241
5184
|
disabled: disabled,
|
|
5242
|
-
onPress: function (e) {
|
|
5185
|
+
onPress: function onPress(e) {
|
|
5243
5186
|
if (onClick) onClick(e);
|
|
5244
5187
|
},
|
|
5245
|
-
children: function (_ref5) {
|
|
5188
|
+
children: function children(_ref5) {
|
|
5246
5189
|
var isHovered = _ref5.isHovered,
|
|
5247
5190
|
isFocused = _ref5.isFocused,
|
|
5248
5191
|
isPressed = _ref5.isPressed;
|
|
@@ -5332,12 +5275,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5332
5275
|
disabled: disabled
|
|
5333
5276
|
},
|
|
5334
5277
|
disabled: disabled,
|
|
5335
|
-
onPress: function (e) {
|
|
5278
|
+
onPress: function handlePress(e) {
|
|
5336
5279
|
if (onFocus) onFocus();
|
|
5337
5280
|
if (onChange) onChange(!checked, e);
|
|
5338
5281
|
if (onBlur) onBlur();
|
|
5339
5282
|
},
|
|
5340
|
-
children: function (_ref2) {
|
|
5283
|
+
children: function children(_ref2) {
|
|
5341
5284
|
var isHovered = _ref2.isHovered,
|
|
5342
5285
|
isPressed = _ref2.isPressed,
|
|
5343
5286
|
isFocused = _ref2.isFocused;
|
|
@@ -6146,10 +6089,10 @@ var GoogleMapsAutocompleteContext = /*#__PURE__*/createContext({
|
|
|
6146
6089
|
isLoadingResultDetails: false,
|
|
6147
6090
|
shouldDisplayEmptyStateWhenNoResults: false
|
|
6148
6091
|
},
|
|
6149
|
-
onInputChange: function () {
|
|
6092
|
+
onInputChange: function onInputChange() {
|
|
6150
6093
|
return Promise.resolve();
|
|
6151
6094
|
},
|
|
6152
|
-
onSelectItem: function () {}
|
|
6095
|
+
onSelectItem: function onSelectItem() {}
|
|
6153
6096
|
});
|
|
6154
6097
|
function GoogleMapsAutocompleteProvider(_ref) {
|
|
6155
6098
|
var children = _ref.children,
|
|
@@ -6402,7 +6345,7 @@ function InputAddress(_ref) {
|
|
|
6402
6345
|
return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
|
|
6403
6346
|
itemToString: itemToString,
|
|
6404
6347
|
initialValue: formattedInitialValue,
|
|
6405
|
-
checkSelectedItem: function (selectedItem, item) {
|
|
6348
|
+
checkSelectedItem: function checkSelectedItem(selectedItem, item) {
|
|
6406
6349
|
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.place_id) === item.place_id;
|
|
6407
6350
|
},
|
|
6408
6351
|
right: state.isLoadingSearch || state.isLoadingResultDetails ? /*#__PURE__*/jsx(Icon, {
|
|
@@ -6411,10 +6354,10 @@ function InputAddress(_ref) {
|
|
|
6411
6354
|
}) : undefined,
|
|
6412
6355
|
errorElement: state.hasSearchError || state.hasSelectResultError ? errorElement : null,
|
|
6413
6356
|
emptyResultsElement: state.items.length === 0 ? emptyResultsElement : null,
|
|
6414
|
-
onInputChange: function (v) {
|
|
6357
|
+
onInputChange: function onInputChange(v) {
|
|
6415
6358
|
_onInputChange(v);
|
|
6416
6359
|
},
|
|
6417
|
-
onChange: function (v) {
|
|
6360
|
+
onChange: function onChange(v) {
|
|
6418
6361
|
onSelectItem(v, _onChange);
|
|
6419
6362
|
},
|
|
6420
6363
|
children: state.items.map(function (item) {
|
|
@@ -6496,7 +6439,7 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6496
6439
|
ref: ref
|
|
6497
6440
|
}, props), {}, {
|
|
6498
6441
|
inputMode: "numeric",
|
|
6499
|
-
onChange: function (event) {
|
|
6442
|
+
onChange: function handleChange(event) {
|
|
6500
6443
|
if (!onChange) return;
|
|
6501
6444
|
var value = parseFloat(event.nativeEvent.text);
|
|
6502
6445
|
|
|
@@ -6528,7 +6471,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6528
6471
|
testID: "kitt.InputPassword.passwordToggle",
|
|
6529
6472
|
hitSlop: 20,
|
|
6530
6473
|
accessibilityRole: "button",
|
|
6531
|
-
onPress: function () {
|
|
6474
|
+
onPress: function onPress() {
|
|
6532
6475
|
return setIsVisible(function (prev) {
|
|
6533
6476
|
return !prev;
|
|
6534
6477
|
});
|
|
@@ -6563,7 +6506,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6563
6506
|
enterKeyHint: currentEnterKeyHint,
|
|
6564
6507
|
autoComplete: autoComplete,
|
|
6565
6508
|
textContentType: "telephoneNumber",
|
|
6566
|
-
onChange: function (event) {
|
|
6509
|
+
onChange: function handleChange(event) {
|
|
6567
6510
|
var number = parseNumber(event.nativeEvent.text);
|
|
6568
6511
|
|
|
6569
6512
|
// When intl phone number is valid :
|
|
@@ -6755,14 +6698,14 @@ function Radio(_ref, ref) {
|
|
|
6755
6698
|
focusable: checked && !disabled,
|
|
6756
6699
|
flexDirection: "row",
|
|
6757
6700
|
alignItems: "center",
|
|
6758
|
-
onPress: function (event) {
|
|
6701
|
+
onPress: function handlePress(event) {
|
|
6759
6702
|
if (onFocus) onFocus();
|
|
6760
6703
|
if (onChange) onChange(value, event);
|
|
6761
6704
|
if (onBlur) onBlur();
|
|
6762
6705
|
},
|
|
6763
6706
|
onFocus: onFocus,
|
|
6764
6707
|
onBlur: onBlur,
|
|
6765
|
-
children: function (_ref2) {
|
|
6708
|
+
children: function children(_ref2) {
|
|
6766
6709
|
var isHovered = _ref2.isHovered,
|
|
6767
6710
|
isPressed = _ref2.isPressed,
|
|
6768
6711
|
isFocused = _ref2.isFocused;
|
|
@@ -6938,7 +6881,7 @@ function RadioButton(_ref) {
|
|
|
6938
6881
|
flexShrink: createResponsiveStyleFromProp(stretch, 1, undefined),
|
|
6939
6882
|
flexBasis: createResponsiveStyleFromProp(stretch, 0),
|
|
6940
6883
|
disabled: disabled,
|
|
6941
|
-
onPress: function (e) {
|
|
6884
|
+
onPress: function handlePress(e) {
|
|
6942
6885
|
if (onFocus) onFocus(e);
|
|
6943
6886
|
if (onChange) onChange(value);
|
|
6944
6887
|
if (onBlur) onBlur(e);
|
|
@@ -6947,7 +6890,7 @@ function RadioButton(_ref) {
|
|
|
6947
6890
|
onPressOut: onPressOut,
|
|
6948
6891
|
onFocus: onFocus,
|
|
6949
6892
|
onBlur: onBlur,
|
|
6950
|
-
children: function (_ref2) {
|
|
6893
|
+
children: function children(_ref2) {
|
|
6951
6894
|
var isHovered = _ref2.isHovered,
|
|
6952
6895
|
isPressed = _ref2.isPressed,
|
|
6953
6896
|
isFocused = _ref2.isFocused;
|
|
@@ -7066,7 +7009,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7066
7009
|
textAlignVertical: "top",
|
|
7067
7010
|
minHeight: "kitt.forms.textArea.minHeight"
|
|
7068
7011
|
}, props), {}, {
|
|
7069
|
-
onChange: function (e) {
|
|
7012
|
+
onChange: function handleOnChange(e) {
|
|
7070
7013
|
if (!limit || e.nativeEvent.text.length <= limit) {
|
|
7071
7014
|
var _props$onChange;
|
|
7072
7015
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, e);
|
|
@@ -7229,10 +7172,10 @@ function Toggle(_ref) {
|
|
|
7229
7172
|
children: [/*#__PURE__*/jsx(Pressable, {
|
|
7230
7173
|
accessibilityRole: "togglebutton",
|
|
7231
7174
|
disabled: isDisabled,
|
|
7232
|
-
onPress: function () {
|
|
7175
|
+
onPress: function handlePress() {
|
|
7233
7176
|
onChange(!value);
|
|
7234
7177
|
},
|
|
7235
|
-
children: function (_ref2) {
|
|
7178
|
+
children: function children(_ref2) {
|
|
7236
7179
|
var isHovered = _ref2.isHovered,
|
|
7237
7180
|
isPressed = _ref2.isPressed,
|
|
7238
7181
|
isFocused = _ref2.isFocused;
|
|
@@ -7397,7 +7340,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
7397
7340
|
onClose: onClose,
|
|
7398
7341
|
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
7399
7342
|
visible: visible,
|
|
7400
|
-
onExited: function () {
|
|
7343
|
+
onExited: function handleExitAnimationDone() {
|
|
7401
7344
|
if (onExited) onExited();
|
|
7402
7345
|
setIsModalBehaviourVisible(false);
|
|
7403
7346
|
},
|
|
@@ -7692,13 +7635,13 @@ function Highlight(_ref) {
|
|
|
7692
7635
|
});
|
|
7693
7636
|
}
|
|
7694
7637
|
return /*#__PURE__*/jsx(Pressable, {
|
|
7695
|
-
onPress: function () {
|
|
7638
|
+
onPress: function handlePress() {
|
|
7696
7639
|
setIsExpanded(!isExpanded);
|
|
7697
7640
|
setIsInitialRender(false);
|
|
7698
7641
|
},
|
|
7699
7642
|
onPressIn: onPressIn,
|
|
7700
7643
|
onPressOut: onPressOut,
|
|
7701
|
-
children: function (_ref2) {
|
|
7644
|
+
children: function children(_ref2) {
|
|
7702
7645
|
var isHovered = _ref2.isHovered;
|
|
7703
7646
|
return /*#__PURE__*/jsxs(AnimatedContainer, {
|
|
7704
7647
|
isHovered: isHovered,
|
|
@@ -7861,8 +7804,8 @@ function useNativeAnimation$1() {
|
|
|
7861
7804
|
return {
|
|
7862
7805
|
opacityStyles: undefined,
|
|
7863
7806
|
scaleStyles: undefined,
|
|
7864
|
-
onPressIn: function () {},
|
|
7865
|
-
onPressOut: function () {}
|
|
7807
|
+
onPressIn: function onPressIn() {},
|
|
7808
|
+
onPressOut: function onPressOut() {}
|
|
7866
7809
|
};
|
|
7867
7810
|
}
|
|
7868
7811
|
|
|
@@ -7936,7 +7879,7 @@ function IconButton(_ref) {
|
|
|
7936
7879
|
onPress: onPress,
|
|
7937
7880
|
onPressIn: onPressIn,
|
|
7938
7881
|
onPressOut: onPressOut,
|
|
7939
|
-
children: function (_ref2) {
|
|
7882
|
+
children: function children(_ref2) {
|
|
7940
7883
|
var isHovered = _ref2.isHovered,
|
|
7941
7884
|
isPressed = _ref2.isPressed,
|
|
7942
7885
|
isFocused = _ref2.isFocused;
|
|
@@ -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:
|
|
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
|
})
|
|
@@ -8348,7 +8292,7 @@ function MapMarker(_ref2) {
|
|
|
8348
8292
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
8349
8293
|
testID: testID,
|
|
8350
8294
|
onPress: onPress,
|
|
8351
|
-
children: function (_ref3) {
|
|
8295
|
+
children: function children(_ref3) {
|
|
8352
8296
|
var isHovered = _ref3.isHovered;
|
|
8353
8297
|
return /*#__PURE__*/jsx(StaticMapMarker$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
8354
8298
|
isHovered: isHovered
|
|
@@ -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
|
-
|
|
8631
|
-
|
|
8632
|
-
'
|
|
8633
|
-
|
|
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:
|
|
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
|
|
@@ -10928,19 +10880,19 @@ function NavigationModalBehaviour(_ref) {
|
|
|
10928
10880
|
children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
10929
10881
|
appear: shouldAppear,
|
|
10930
10882
|
visible: visible,
|
|
10931
|
-
onEnter: function () {
|
|
10883
|
+
onEnter: function handleEnter() {
|
|
10932
10884
|
if (onEnter) onEnter();
|
|
10933
10885
|
|
|
10934
10886
|
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
10935
10887
|
setShouldAppear(false);
|
|
10936
10888
|
},
|
|
10937
|
-
onExit: function () {
|
|
10889
|
+
onExit: function handleExit() {
|
|
10938
10890
|
if (onExit) onExit();
|
|
10939
10891
|
|
|
10940
10892
|
// Reset appear value to its original value for future modal display
|
|
10941
10893
|
setShouldAppear(appear);
|
|
10942
10894
|
},
|
|
10943
|
-
onExited: function () {
|
|
10895
|
+
onExited: function handleExitAnimationDone() {
|
|
10944
10896
|
if (onExited) onExited();
|
|
10945
10897
|
setIsModalBehaviourVisible(false);
|
|
10946
10898
|
},
|
|
@@ -11206,18 +11158,18 @@ function Picker(_ref) {
|
|
|
11206
11158
|
items: items,
|
|
11207
11159
|
initialSelectedItem: initialValueIndex > -1 ? items[initialValueIndex] : undefined,
|
|
11208
11160
|
initialIsOpen: isInitialOpen,
|
|
11209
|
-
stateReducer: function (state, actionAndChanges) {
|
|
11161
|
+
stateReducer: function stateReducer(state, actionAndChanges) {
|
|
11210
11162
|
return webUseSelectReducer(state, actionAndChanges, {
|
|
11211
11163
|
keepOpenOnChange: keepOpenOnChange
|
|
11212
11164
|
});
|
|
11213
11165
|
},
|
|
11214
11166
|
selectedItem: syncStateWithSourceValue ? sourceValue : undefined,
|
|
11215
|
-
onIsOpenChange: function (changes) {
|
|
11167
|
+
onIsOpenChange: function onIsOpenChange(changes) {
|
|
11216
11168
|
if (changes.isOpen === false) {
|
|
11217
11169
|
if (onClose) onClose();
|
|
11218
11170
|
}
|
|
11219
11171
|
},
|
|
11220
|
-
onSelectedItemChange: function (changes) {
|
|
11172
|
+
onSelectedItemChange: function onSelectedItemChange(changes) {
|
|
11221
11173
|
if (!onChange) return;
|
|
11222
11174
|
if (changes.selectedItem === null) {
|
|
11223
11175
|
onChange(undefined);
|
|
@@ -11436,7 +11388,7 @@ function Skeleton(_ref) {
|
|
|
11436
11388
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
11437
11389
|
overflow: "hidden",
|
|
11438
11390
|
style: style,
|
|
11439
|
-
onLayout: function (_ref2) {
|
|
11391
|
+
onLayout: function onLayout(_ref2) {
|
|
11440
11392
|
var nativeEvent = _ref2.nativeEvent;
|
|
11441
11393
|
return setWidth(nativeEvent.layout.width);
|
|
11442
11394
|
},
|
|
@@ -11662,7 +11614,7 @@ function StaticMap(_ref) {
|
|
|
11662
11614
|
position: "relative",
|
|
11663
11615
|
maxWidth: mapBoxMaxPictureWidth,
|
|
11664
11616
|
height: height,
|
|
11665
|
-
onLayout: function (event) {
|
|
11617
|
+
onLayout: function handleParentLayout(event) {
|
|
11666
11618
|
var nativeEvent = event.nativeEvent;
|
|
11667
11619
|
var rangedMapWidth = getPictureWidth(nativeEvent.layout.width);
|
|
11668
11620
|
setCurrentWidth(rangedMapWidth);
|
|
@@ -11674,11 +11626,11 @@ function StaticMap(_ref) {
|
|
|
11674
11626
|
width: currentWidth,
|
|
11675
11627
|
height: height,
|
|
11676
11628
|
alt: alt,
|
|
11677
|
-
onLoadEnd: function () {
|
|
11629
|
+
onLoadEnd: function handleImageLoadEnd() {
|
|
11678
11630
|
setIsLoading(false);
|
|
11679
11631
|
if (onLoaded) onLoaded();
|
|
11680
11632
|
},
|
|
11681
|
-
onError: function () {
|
|
11633
|
+
onError: function handleError() {
|
|
11682
11634
|
setHasError(true);
|
|
11683
11635
|
if (onError) onError();
|
|
11684
11636
|
}
|
|
@@ -11703,7 +11655,7 @@ function StaticMap(_ref) {
|
|
|
11703
11655
|
width: "100%",
|
|
11704
11656
|
height: "100%",
|
|
11705
11657
|
children: /*#__PURE__*/jsx(StaticMapError, {
|
|
11706
|
-
onReload: function () {
|
|
11658
|
+
onReload: function handleReload() {
|
|
11707
11659
|
setHasError(false);
|
|
11708
11660
|
setIsLoading(true);
|
|
11709
11661
|
setCurrentMapKey(function (prev) {
|
|
@@ -11945,7 +11897,7 @@ function StoryContainer(_ref) {
|
|
|
11945
11897
|
var StoryDecorator = makeDecorator({
|
|
11946
11898
|
name: 'StoryDecorator',
|
|
11947
11899
|
parameterName: 'storyDecorator',
|
|
11948
|
-
wrapper: function (storyFn, context) {
|
|
11900
|
+
wrapper: function wrapper(storyFn, context) {
|
|
11949
11901
|
var story = storyFn(context);
|
|
11950
11902
|
if (context.parameters.disableStoryContainer) {
|
|
11951
11903
|
return story;
|
|
@@ -12126,7 +12078,7 @@ function TabBar(_ref) {
|
|
|
12126
12078
|
return /*#__PURE__*/jsx(View, {
|
|
12127
12079
|
children: /*#__PURE__*/cloneElement(child, {
|
|
12128
12080
|
color: color,
|
|
12129
|
-
onPress: function (event) {
|
|
12081
|
+
onPress: function onPress(event) {
|
|
12130
12082
|
var _child$props$onPress, _child$props;
|
|
12131
12083
|
onChangeTab({
|
|
12132
12084
|
tab: tabs[index],
|
|
@@ -12304,7 +12256,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12304
12256
|
isFocusedInternal: isFocusedInternal,
|
|
12305
12257
|
isPressedInternal: isPressedInternal
|
|
12306
12258
|
}),
|
|
12307
|
-
onChange: function (event) {
|
|
12259
|
+
onChange: function handleInputChange(event) {
|
|
12308
12260
|
var currentValue = event.nativeEvent.text;
|
|
12309
12261
|
if (currentValue.length === 0) {
|
|
12310
12262
|
setInputValue(currentValue);
|
|
@@ -12354,7 +12306,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12354
12306
|
setInputValue(sanitizedValue);
|
|
12355
12307
|
handleChange(sanitizedValue);
|
|
12356
12308
|
},
|
|
12357
|
-
onBlur: function () {
|
|
12309
|
+
onBlur: function handleBlur() {
|
|
12358
12310
|
if (inputValue.indexOf(':') === 1) {
|
|
12359
12311
|
setInputValue("0".concat(inputValue));
|
|
12360
12312
|
}
|
|
@@ -12909,7 +12861,7 @@ function KittThemeProvider(_ref) {
|
|
|
12909
12861
|
var KittThemeDecorator = makeDecorator({
|
|
12910
12862
|
name: 'ThemeDecorator',
|
|
12911
12863
|
parameterName: 'theme',
|
|
12912
|
-
wrapper: function (storyFn, context, _ref2) {
|
|
12864
|
+
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
12913
12865
|
var _parameters$isSSR;
|
|
12914
12866
|
var _ref2$options = _ref2.options,
|
|
12915
12867
|
options = _ref2$options === void 0 ? {} : _ref2$options,
|