@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.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']
|
|
@@ -2464,7 +2478,7 @@ var breakpoints = {
|
|
|
2464
2478
|
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2465
2479
|
var theme = {
|
|
2466
2480
|
spacing: spacing,
|
|
2467
|
-
getSpacing: function (multiplier) {
|
|
2481
|
+
getSpacing: function getSpacing(multiplier) {
|
|
2468
2482
|
return spacing * multiplier;
|
|
2469
2483
|
},
|
|
2470
2484
|
colors: colors,
|
|
@@ -2651,7 +2665,7 @@ var ActionCardPressable = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
2651
2665
|
onPress: onPress,
|
|
2652
2666
|
onHoverIn: onHoverIn,
|
|
2653
2667
|
onHoverOut: onHoverOut,
|
|
2654
|
-
children: function (_ref3) {
|
|
2668
|
+
children: function children(_ref3) {
|
|
2655
2669
|
var isHovered = _ref3.isHovered,
|
|
2656
2670
|
isPressed = _ref3.isPressed,
|
|
2657
2671
|
isFocused = _ref3.isFocused;
|
|
@@ -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
|
-
return variant === 'ghost' ? 'primary' : 'white';
|
|
3248
|
-
case 'dark':
|
|
3249
|
-
return 'white';
|
|
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");
|
|
3262
3251
|
}
|
|
3252
|
+
if (isHovered || isPressed) {
|
|
3253
|
+
return "".concat(baseKey, ".hover");
|
|
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,24 +3406,21 @@ 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
|
}]
|
|
3467
3416
|
};
|
|
3468
3417
|
});
|
|
3469
3418
|
return {
|
|
3470
|
-
onPressIn: function () {
|
|
3419
|
+
onPressIn: function handlePressIn() {
|
|
3471
3420
|
color.value = withSpring(1);
|
|
3472
3421
|
pressed.value = 1;
|
|
3473
3422
|
},
|
|
3474
|
-
onPressOut: function () {
|
|
3423
|
+
onPressOut: function handlePressOut() {
|
|
3475
3424
|
color.value = withSpring(0);
|
|
3476
3425
|
pressed.value = 0;
|
|
3477
3426
|
},
|
|
@@ -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,
|
|
@@ -3558,7 +3488,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3558
3488
|
onHoverOut: onHoverOut,
|
|
3559
3489
|
onFocus: onFocus,
|
|
3560
3490
|
onBlur: onBlur,
|
|
3561
|
-
children: function (_ref2) {
|
|
3491
|
+
children: function children(_ref2) {
|
|
3562
3492
|
var isHovered = _ref2.isHovered,
|
|
3563
3493
|
isPressed = _ref2.isPressed,
|
|
3564
3494
|
isFocused = _ref2.isFocused;
|
|
@@ -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
|
|
@@ -3680,7 +3609,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3680
3609
|
stretch: stretch,
|
|
3681
3610
|
disabled: isLoading ? true : disabled,
|
|
3682
3611
|
icon: isLoading ? /*#__PURE__*/jsx(LoaderIcon, {}) : icon,
|
|
3683
|
-
onPress: function (e) {
|
|
3612
|
+
onPress: function handlePress(e) {
|
|
3684
3613
|
var callPressAndUpdateLoadingState = /*#__PURE__*/function () {
|
|
3685
3614
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3686
3615
|
return _regeneratorRuntime().wrap(function (_context) {
|
|
@@ -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
|
}
|
|
@@ -3952,10 +3881,10 @@ function BottomSheetComp(_ref, ref) {
|
|
|
3952
3881
|
borderRadius: 4,
|
|
3953
3882
|
backgroundColor: theme.kitt.bottomSheet.handle.backgroundColor
|
|
3954
3883
|
},
|
|
3955
|
-
handleComponent: function (props) {
|
|
3884
|
+
handleComponent: function handleComponent(props) {
|
|
3956
3885
|
return hasHandle ? /*#__PURE__*/jsx(BottomSheetHandle, _objectSpread({}, props)) : null;
|
|
3957
3886
|
},
|
|
3958
|
-
backdropComponent: function (props) {
|
|
3887
|
+
backdropComponent: function backdropComponent(props) {
|
|
3959
3888
|
return hasBackdrop ? /*#__PURE__*/jsx(BottomSheetBackdrop, _objectSpread(_objectSpread({}, props), {}, {
|
|
3960
3889
|
opacity: 0.25,
|
|
3961
3890
|
appearsOnIndex: 0,
|
|
@@ -3964,7 +3893,7 @@ function BottomSheetComp(_ref, ref) {
|
|
|
3964
3893
|
}
|
|
3965
3894
|
}, rest), {}, {
|
|
3966
3895
|
topInset: top,
|
|
3967
|
-
children: function (props) {
|
|
3896
|
+
children: function children(props) {
|
|
3968
3897
|
return /*#__PURE__*/jsx(Wrapper, {
|
|
3969
3898
|
children: typeof Content === 'function' ? /*#__PURE__*/jsx(Content, _objectSpread({}, props === null || props === void 0 ? void 0 : props.data)) : Content
|
|
3970
3899
|
});
|
|
@@ -4040,7 +3969,7 @@ function CloseButton(_ref) {
|
|
|
4040
3969
|
onPress = _ref.onPress;
|
|
4041
3970
|
var onCloseContextCallback = useOnCloseModalBehaviour();
|
|
4042
3971
|
return /*#__PURE__*/cloneElement(children, {
|
|
4043
|
-
onPress: function () {
|
|
3972
|
+
onPress: function handleClose() {
|
|
4044
3973
|
if (onPress) onPress();
|
|
4045
3974
|
onCloseContextCallback();
|
|
4046
3975
|
}
|
|
@@ -4218,11 +4147,11 @@ function CardModalAnimation(_ref) {
|
|
|
4218
4147
|
transparent: true,
|
|
4219
4148
|
supportedOrientations: ['landscape', 'portrait'],
|
|
4220
4149
|
visible: isModalVisible,
|
|
4221
|
-
onShow: function () {
|
|
4150
|
+
onShow: function onShow() {
|
|
4222
4151
|
if (onEnter) onEnter();
|
|
4223
4152
|
setIsContentVisible(true);
|
|
4224
4153
|
},
|
|
4225
|
-
onDismiss: function () {
|
|
4154
|
+
onDismiss: function onDismiss() {
|
|
4226
4155
|
if (onExited) onExited();
|
|
4227
4156
|
},
|
|
4228
4157
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -4269,7 +4198,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4269
4198
|
onClose: onClose,
|
|
4270
4199
|
children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4271
4200
|
visible: visible,
|
|
4272
|
-
onExited: function () {
|
|
4201
|
+
onExited: function handleExitAnimationDone() {
|
|
4273
4202
|
if (onExited) onExited();
|
|
4274
4203
|
setIsModalBehaviourVisible(false);
|
|
4275
4204
|
},
|
|
@@ -4491,10 +4420,10 @@ var useNativeAnimation$4 = function (_ref) {
|
|
|
4491
4420
|
};
|
|
4492
4421
|
});
|
|
4493
4422
|
return {
|
|
4494
|
-
onPressIn: function () {
|
|
4423
|
+
onPressIn: function onPressIn() {
|
|
4495
4424
|
pressed.value = true;
|
|
4496
4425
|
},
|
|
4497
|
-
onPressOut: function () {
|
|
4426
|
+
onPressOut: function onPressOut() {
|
|
4498
4427
|
pressed.value = false;
|
|
4499
4428
|
},
|
|
4500
4429
|
backgroundStyles: backgroundStyles
|
|
@@ -4557,7 +4486,7 @@ function ChoiceItem(_ref) {
|
|
|
4557
4486
|
style: style,
|
|
4558
4487
|
onBlur: onBlur,
|
|
4559
4488
|
onFocus: onFocus,
|
|
4560
|
-
onPress: function (e) {
|
|
4489
|
+
onPress: function handlePress(e) {
|
|
4561
4490
|
if (onFocus) onFocus(e);
|
|
4562
4491
|
if (onPress) onPress();
|
|
4563
4492
|
handleChange();
|
|
@@ -4565,7 +4494,7 @@ function ChoiceItem(_ref) {
|
|
|
4565
4494
|
},
|
|
4566
4495
|
onPressIn: onPressIn,
|
|
4567
4496
|
onPressOut: onPressOut,
|
|
4568
|
-
children: function (_ref2) {
|
|
4497
|
+
children: function children(_ref2) {
|
|
4569
4498
|
var isHovered = _ref2.isHovered,
|
|
4570
4499
|
isPressed = _ref2.isPressed;
|
|
4571
4500
|
return /*#__PURE__*/jsxs(AnimatedChoiceItemView, {
|
|
@@ -4661,7 +4590,7 @@ function Choices(_ref2) {
|
|
|
4661
4590
|
disabled: disabled,
|
|
4662
4591
|
variant: variant,
|
|
4663
4592
|
onPress: !isForm ? onPress : undefined,
|
|
4664
|
-
onChange: isForm ? function (newValue) {
|
|
4593
|
+
onChange: isForm ? function handleChange(newValue) {
|
|
4665
4594
|
setCurrentValue(newValue);
|
|
4666
4595
|
if (onChange) onChange(newValue);
|
|
4667
4596
|
} : undefined,
|
|
@@ -4819,11 +4748,11 @@ function DialogModalAnimation(_ref) {
|
|
|
4819
4748
|
transparent: true,
|
|
4820
4749
|
supportedOrientations: ['landscape', 'portrait'],
|
|
4821
4750
|
visible: isModalVisible,
|
|
4822
|
-
onShow: function () {
|
|
4751
|
+
onShow: function onShow() {
|
|
4823
4752
|
if (onEnter) onEnter();
|
|
4824
4753
|
setIsContentVisible(true);
|
|
4825
4754
|
},
|
|
4826
|
-
onDismiss: function () {
|
|
4755
|
+
onDismiss: function onDismiss() {
|
|
4827
4756
|
if (onExited) onExited();
|
|
4828
4757
|
},
|
|
4829
4758
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -4877,7 +4806,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4877
4806
|
},
|
|
4878
4807
|
children: /*#__PURE__*/jsx(DialogModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4879
4808
|
visible: visible,
|
|
4880
|
-
onExited: function () {
|
|
4809
|
+
onExited: function handleExitAnimationDone() {
|
|
4881
4810
|
if (onExited) onExited();
|
|
4882
4811
|
setIsModalBehaviourVisible(false);
|
|
4883
4812
|
},
|
|
@@ -5140,7 +5069,7 @@ function ExternalLink(_ref) {
|
|
|
5140
5069
|
var openExternalLink = useOpenExternalLink();
|
|
5141
5070
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5142
5071
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
5143
|
-
onPress: function (e) {
|
|
5072
|
+
onPress: function handleOnPress(e) {
|
|
5144
5073
|
if (onPress) {
|
|
5145
5074
|
onPress(e);
|
|
5146
5075
|
if (e.defaultPrevented) return;
|
|
@@ -5364,14 +5293,14 @@ var _excluded$z = ["children", "name", "disabled", "placeholder", "isInitialOpen
|
|
|
5364
5293
|
function patchNativeEvent(event) {
|
|
5365
5294
|
return event || {
|
|
5366
5295
|
preventDownshiftDefault: false,
|
|
5367
|
-
preventDefault: function () {}
|
|
5296
|
+
preventDefault: function preventDefault() {}
|
|
5368
5297
|
};
|
|
5369
5298
|
}
|
|
5370
5299
|
function isReactElement(element) {
|
|
5371
5300
|
return _typeof(element) === 'object' && element !== null && 'type' in element && 'props' in element;
|
|
5372
5301
|
}
|
|
5373
5302
|
function Autocomplete(_ref) {
|
|
5374
|
-
var
|
|
5303
|
+
var _children = _ref.children,
|
|
5375
5304
|
name = _ref.name,
|
|
5376
5305
|
disabled = _ref.disabled,
|
|
5377
5306
|
placeholder = _ref.placeholder,
|
|
@@ -5398,7 +5327,7 @@ function Autocomplete(_ref) {
|
|
|
5398
5327
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5399
5328
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5400
5329
|
props = _objectWithoutProperties(_ref, _excluded$z);
|
|
5401
|
-
var childrenArray = Children.toArray(
|
|
5330
|
+
var childrenArray = Children.toArray(_children);
|
|
5402
5331
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5403
5332
|
return {
|
|
5404
5333
|
child: child,
|
|
@@ -5409,12 +5338,12 @@ function Autocomplete(_ref) {
|
|
|
5409
5338
|
defaultIsOpen: isInitialOpen,
|
|
5410
5339
|
initialSelectedItem: initialValue,
|
|
5411
5340
|
initialInputValue: initialValue ? itemToString(initialValue) : undefined,
|
|
5412
|
-
itemToString: function (item) {
|
|
5341
|
+
itemToString: function handleItemToString(item) {
|
|
5413
5342
|
// Prevents returning null values
|
|
5414
5343
|
if (!itemToString) return '';
|
|
5415
5344
|
return itemToString(item || undefined);
|
|
5416
5345
|
},
|
|
5417
|
-
stateReducer: function (state, changes) {
|
|
5346
|
+
stateReducer: function stateReducer(state, changes) {
|
|
5418
5347
|
switch (changes.type) {
|
|
5419
5348
|
case Downshift.stateChangeTypes.changeInput:
|
|
5420
5349
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
@@ -5424,7 +5353,7 @@ function Autocomplete(_ref) {
|
|
|
5424
5353
|
return changes;
|
|
5425
5354
|
}
|
|
5426
5355
|
},
|
|
5427
|
-
onChange: function (selectedItem, stateAndHelpers) {
|
|
5356
|
+
onChange: function onChange(selectedItem, stateAndHelpers) {
|
|
5428
5357
|
if (_onChange) {
|
|
5429
5358
|
_onChange(selectedItem, stateAndHelpers);
|
|
5430
5359
|
}
|
|
@@ -5432,7 +5361,7 @@ function Autocomplete(_ref) {
|
|
|
5432
5361
|
onSelect: onSelectItem,
|
|
5433
5362
|
onOuterClick: onOuterPress,
|
|
5434
5363
|
onInputValueChange: onInputChange,
|
|
5435
|
-
children: function (_ref2) {
|
|
5364
|
+
children: function children(_ref2) {
|
|
5436
5365
|
var getRootProps = _ref2.getRootProps,
|
|
5437
5366
|
getInputProps = _ref2.getInputProps,
|
|
5438
5367
|
getMenuProps = _ref2.getMenuProps,
|
|
@@ -5484,7 +5413,7 @@ function Autocomplete(_ref) {
|
|
|
5484
5413
|
right: right || (canDisplayCollapseButton ? /*#__PURE__*/jsx(InputPressable, _objectSpread(_objectSpread({}, toggleProps), {}, {
|
|
5485
5414
|
testID: "kitt.Autocomplete.listToggle",
|
|
5486
5415
|
hitSlop: 40,
|
|
5487
|
-
onPress: function (e) {
|
|
5416
|
+
onPress: function handleTogglePress(e) {
|
|
5488
5417
|
if (Platform.OS === 'web') {
|
|
5489
5418
|
onClickToggle(e);
|
|
5490
5419
|
return;
|
|
@@ -5495,13 +5424,13 @@ function Autocomplete(_ref) {
|
|
|
5495
5424
|
icon: isCurrentlyOpen ? /*#__PURE__*/jsx(CaretUpFillIcon, {}) : /*#__PURE__*/jsx(CaretDownFillIcon, {})
|
|
5496
5425
|
})
|
|
5497
5426
|
})) : null),
|
|
5498
|
-
onFocus: function (e) {
|
|
5427
|
+
onFocus: function onFocus(e) {
|
|
5499
5428
|
openMenu();
|
|
5500
5429
|
/** @ts-expect-error onFocus wants web events */
|
|
5501
5430
|
if (Platform.OS !== 'android' && onSearchInputFocus) onSearchInputFocus(e);
|
|
5502
5431
|
if (_onFocus) _onFocus(e);
|
|
5503
5432
|
},
|
|
5504
|
-
onBlur: function (e) {
|
|
5433
|
+
onBlur: function onBlur(e) {
|
|
5505
5434
|
/** @ts-expect-error onBlur wants web events */
|
|
5506
5435
|
if (Platform.OS === 'web' && onSearchInputBlur) onSearchInputBlur(e);
|
|
5507
5436
|
|
|
@@ -5537,14 +5466,14 @@ function Autocomplete(_ref) {
|
|
|
5537
5466
|
selected: ariaSelected
|
|
5538
5467
|
},
|
|
5539
5468
|
disabled: disabled,
|
|
5540
|
-
onPress: function (e) {
|
|
5469
|
+
onPress: function onPress(e) {
|
|
5541
5470
|
if (Platform.OS === 'web') {
|
|
5542
5471
|
if (onClick) onClick(e);
|
|
5543
5472
|
return;
|
|
5544
5473
|
}
|
|
5545
5474
|
if (_onPress) _onPress(patchNativeEvent(e));
|
|
5546
5475
|
},
|
|
5547
|
-
children: function (_ref5) {
|
|
5476
|
+
children: function children(_ref5) {
|
|
5548
5477
|
var isHovered = _ref5.isHovered,
|
|
5549
5478
|
isFocused = _ref5.isFocused,
|
|
5550
5479
|
isPressed = _ref5.isPressed;
|
|
@@ -5634,12 +5563,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5634
5563
|
disabled: disabled
|
|
5635
5564
|
},
|
|
5636
5565
|
disabled: disabled,
|
|
5637
|
-
onPress: function (e) {
|
|
5566
|
+
onPress: function handlePress(e) {
|
|
5638
5567
|
if (onFocus) onFocus();
|
|
5639
5568
|
if (onChange) onChange(!checked, e);
|
|
5640
5569
|
if (onBlur) onBlur();
|
|
5641
5570
|
},
|
|
5642
|
-
children: function (_ref2) {
|
|
5571
|
+
children: function children(_ref2) {
|
|
5643
5572
|
var isHovered = _ref2.isHovered,
|
|
5644
5573
|
isPressed = _ref2.isPressed,
|
|
5645
5574
|
isFocused = _ref2.isFocused;
|
|
@@ -6194,7 +6123,7 @@ var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6194
6123
|
DateTimePickerAndroid.open({
|
|
6195
6124
|
testID: pickerUITestID,
|
|
6196
6125
|
value: currentValue || pickerDefaultDate || new Date(Date.now()),
|
|
6197
|
-
onChange: function (e) {
|
|
6126
|
+
onChange: function onChange(e) {
|
|
6198
6127
|
setIsFocused(false);
|
|
6199
6128
|
var timestamp = e.nativeEvent.timestamp;
|
|
6200
6129
|
if (timestamp) {
|
|
@@ -6246,7 +6175,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
6246
6175
|
minimumDate: minimuDate,
|
|
6247
6176
|
display: displayMode
|
|
6248
6177
|
}, iosProps), {}, {
|
|
6249
|
-
onChange: function (_event, date) {
|
|
6178
|
+
onChange: function onChange(_event, date) {
|
|
6250
6179
|
return _onChange(date);
|
|
6251
6180
|
}
|
|
6252
6181
|
}));
|
|
@@ -6280,7 +6209,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6280
6209
|
|
|
6281
6210
|
return /*#__PURE__*/jsx(CardModal.ModalBehaviour, {
|
|
6282
6211
|
visible: Boolean(isVisible),
|
|
6283
|
-
onClose: function () {
|
|
6212
|
+
onClose: function handleClose() {
|
|
6284
6213
|
setCurrentValue(value);
|
|
6285
6214
|
onClose();
|
|
6286
6215
|
},
|
|
@@ -6291,7 +6220,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6291
6220
|
}) : null, /*#__PURE__*/jsx(CardModal.Body, {
|
|
6292
6221
|
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
|
|
6293
6222
|
value: currentValue,
|
|
6294
|
-
onChange: function (newDate) {
|
|
6223
|
+
onChange: function handleChange(newDate) {
|
|
6295
6224
|
setCurrentValue(function (prev) {
|
|
6296
6225
|
return newDate || prev;
|
|
6297
6226
|
});
|
|
@@ -6301,7 +6230,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6301
6230
|
children: /*#__PURE__*/jsx(Button, {
|
|
6302
6231
|
stretch: true,
|
|
6303
6232
|
type: "primary",
|
|
6304
|
-
onPress: function () {
|
|
6233
|
+
onPress: function handleSubmit() {
|
|
6305
6234
|
onChange(currentValue);
|
|
6306
6235
|
},
|
|
6307
6236
|
children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
|
|
@@ -6355,7 +6284,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6355
6284
|
isFocusedInternal: isFocused || isFocusedInternal,
|
|
6356
6285
|
isHoveredInternal: isHoveredInternal,
|
|
6357
6286
|
isPressedInternal: isPressedInternal,
|
|
6358
|
-
onPress: function () {
|
|
6287
|
+
onPress: function handleModalOpen() {
|
|
6359
6288
|
if (onFocus) onFocus();
|
|
6360
6289
|
setIsPickerUIVisible(true);
|
|
6361
6290
|
setIsFocused(true);
|
|
@@ -6368,7 +6297,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6368
6297
|
validateButtonLabel: pickerUIValidateButtonLabel,
|
|
6369
6298
|
defaultDate: pickerDefaultDate,
|
|
6370
6299
|
onClose: handleModalClose,
|
|
6371
|
-
onChange: function (newDate) {
|
|
6300
|
+
onChange: function handleChange(newDate) {
|
|
6372
6301
|
setCurrentValue(newDate);
|
|
6373
6302
|
onChange(newDate);
|
|
6374
6303
|
handleModalClose();
|
|
@@ -6684,7 +6613,7 @@ function FilePicker(_ref) {
|
|
|
6684
6613
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
6685
6614
|
children: [/*#__PURE__*/cloneElement(childElement, {
|
|
6686
6615
|
// ensure that the press event is not prevented by Button component
|
|
6687
|
-
onPress: function () {
|
|
6616
|
+
onPress: function onPress() {
|
|
6688
6617
|
var _childElement$props$o, _childElement$props, _bottomSheetRef$curre;
|
|
6689
6618
|
if (disabled) return;
|
|
6690
6619
|
(_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
|
|
@@ -6985,10 +6914,10 @@ var GoogleMapsAutocompleteContext = /*#__PURE__*/createContext({
|
|
|
6985
6914
|
isLoadingResultDetails: false,
|
|
6986
6915
|
shouldDisplayEmptyStateWhenNoResults: false
|
|
6987
6916
|
},
|
|
6988
|
-
onInputChange: function () {
|
|
6917
|
+
onInputChange: function onInputChange() {
|
|
6989
6918
|
return Promise.resolve();
|
|
6990
6919
|
},
|
|
6991
|
-
onSelectItem: function () {}
|
|
6920
|
+
onSelectItem: function onSelectItem() {}
|
|
6992
6921
|
});
|
|
6993
6922
|
function GoogleMapsAutocompleteProvider(_ref) {
|
|
6994
6923
|
var children = _ref.children,
|
|
@@ -7241,7 +7170,7 @@ function InputAddress(_ref) {
|
|
|
7241
7170
|
return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
|
|
7242
7171
|
itemToString: itemToString,
|
|
7243
7172
|
initialValue: formattedInitialValue,
|
|
7244
|
-
checkSelectedItem: function (selectedItem, item) {
|
|
7173
|
+
checkSelectedItem: function checkSelectedItem(selectedItem, item) {
|
|
7245
7174
|
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.place_id) === item.place_id;
|
|
7246
7175
|
},
|
|
7247
7176
|
right: state.isLoadingSearch || state.isLoadingResultDetails ? /*#__PURE__*/jsx(Icon, {
|
|
@@ -7250,10 +7179,10 @@ function InputAddress(_ref) {
|
|
|
7250
7179
|
}) : undefined,
|
|
7251
7180
|
errorElement: state.hasSearchError || state.hasSelectResultError ? errorElement : null,
|
|
7252
7181
|
emptyResultsElement: state.items.length === 0 ? emptyResultsElement : null,
|
|
7253
|
-
onInputChange: function (v) {
|
|
7182
|
+
onInputChange: function onInputChange(v) {
|
|
7254
7183
|
_onInputChange(v);
|
|
7255
7184
|
},
|
|
7256
|
-
onChange: function (v) {
|
|
7185
|
+
onChange: function onChange(v) {
|
|
7257
7186
|
onSelectItem(v, _onChange);
|
|
7258
7187
|
},
|
|
7259
7188
|
children: state.items.map(function (item) {
|
|
@@ -7335,7 +7264,7 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7335
7264
|
ref: ref
|
|
7336
7265
|
}, props), {}, {
|
|
7337
7266
|
inputMode: "numeric",
|
|
7338
|
-
onChange: function (event) {
|
|
7267
|
+
onChange: function handleChange(event) {
|
|
7339
7268
|
if (!onChange) return;
|
|
7340
7269
|
var value = parseFloat(event.nativeEvent.text);
|
|
7341
7270
|
|
|
@@ -7367,7 +7296,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7367
7296
|
testID: "kitt.InputPassword.passwordToggle",
|
|
7368
7297
|
hitSlop: 20,
|
|
7369
7298
|
accessibilityRole: "button",
|
|
7370
|
-
onPress: function () {
|
|
7299
|
+
onPress: function onPress() {
|
|
7371
7300
|
return setIsVisible(function (prev) {
|
|
7372
7301
|
return !prev;
|
|
7373
7302
|
});
|
|
@@ -7402,7 +7331,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7402
7331
|
enterKeyHint: currentEnterKeyHint,
|
|
7403
7332
|
autoComplete: autoComplete,
|
|
7404
7333
|
textContentType: "telephoneNumber",
|
|
7405
|
-
onChange: function (event) {
|
|
7334
|
+
onChange: function handleChange(event) {
|
|
7406
7335
|
var number = parseNumber(event.nativeEvent.text);
|
|
7407
7336
|
|
|
7408
7337
|
// When intl phone number is valid :
|
|
@@ -7595,14 +7524,14 @@ function Radio(_ref, ref) {
|
|
|
7595
7524
|
focusable: checked && !disabled,
|
|
7596
7525
|
flexDirection: "row",
|
|
7597
7526
|
alignItems: "center",
|
|
7598
|
-
onPress: function (event) {
|
|
7527
|
+
onPress: function handlePress(event) {
|
|
7599
7528
|
if (onFocus) onFocus();
|
|
7600
7529
|
if (onChange) onChange(value, event);
|
|
7601
7530
|
if (onBlur) onBlur();
|
|
7602
7531
|
},
|
|
7603
7532
|
onFocus: onFocus,
|
|
7604
7533
|
onBlur: onBlur,
|
|
7605
|
-
children: function (_ref2) {
|
|
7534
|
+
children: function children(_ref2) {
|
|
7606
7535
|
var isHovered = _ref2.isHovered,
|
|
7607
7536
|
isPressed = _ref2.isPressed,
|
|
7608
7537
|
isFocused = _ref2.isFocused;
|
|
@@ -7721,11 +7650,11 @@ var useNativeAnimation$3 = function (_ref) {
|
|
|
7721
7650
|
};
|
|
7722
7651
|
});
|
|
7723
7652
|
return {
|
|
7724
|
-
onPressIn: function () {
|
|
7653
|
+
onPressIn: function handlePressIn() {
|
|
7725
7654
|
color.value = withSpring(1);
|
|
7726
7655
|
pressed.value = 1;
|
|
7727
7656
|
},
|
|
7728
|
-
onPressOut: function () {
|
|
7657
|
+
onPressOut: function handlePressOut() {
|
|
7729
7658
|
color.value = withSpring(0);
|
|
7730
7659
|
pressed.value = 0;
|
|
7731
7660
|
},
|
|
@@ -7778,7 +7707,7 @@ function RadioButton(_ref) {
|
|
|
7778
7707
|
flexShrink: createResponsiveStyleFromProp(stretch, 1, undefined),
|
|
7779
7708
|
flexBasis: createResponsiveStyleFromProp(stretch, 0),
|
|
7780
7709
|
disabled: disabled,
|
|
7781
|
-
onPress: function (e) {
|
|
7710
|
+
onPress: function handlePress(e) {
|
|
7782
7711
|
if (onFocus) onFocus(e);
|
|
7783
7712
|
if (onChange) onChange(value);
|
|
7784
7713
|
if (onBlur) onBlur(e);
|
|
@@ -7787,7 +7716,7 @@ function RadioButton(_ref) {
|
|
|
7787
7716
|
onPressOut: onPressOut,
|
|
7788
7717
|
onFocus: onFocus,
|
|
7789
7718
|
onBlur: onBlur,
|
|
7790
|
-
children: function (_ref2) {
|
|
7719
|
+
children: function children(_ref2) {
|
|
7791
7720
|
var isHovered = _ref2.isHovered,
|
|
7792
7721
|
isPressed = _ref2.isPressed,
|
|
7793
7722
|
isFocused = _ref2.isFocused;
|
|
@@ -7906,7 +7835,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7906
7835
|
textAlignVertical: "top",
|
|
7907
7836
|
minHeight: "kitt.forms.textArea.minHeight"
|
|
7908
7837
|
}, props), {}, {
|
|
7909
|
-
onChange: function (e) {
|
|
7838
|
+
onChange: function handleOnChange(e) {
|
|
7910
7839
|
if (!limit || e.nativeEvent.text.length <= limit) {
|
|
7911
7840
|
var _props$onChange;
|
|
7912
7841
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, e);
|
|
@@ -8069,10 +7998,10 @@ function Toggle(_ref) {
|
|
|
8069
7998
|
children: [/*#__PURE__*/jsx(Pressable, {
|
|
8070
7999
|
accessibilityRole: "togglebutton",
|
|
8071
8000
|
disabled: isDisabled,
|
|
8072
|
-
onPress: function () {
|
|
8001
|
+
onPress: function handlePress() {
|
|
8073
8002
|
onChange(!value);
|
|
8074
8003
|
},
|
|
8075
|
-
children: function (_ref2) {
|
|
8004
|
+
children: function children(_ref2) {
|
|
8076
8005
|
var isHovered = _ref2.isHovered,
|
|
8077
8006
|
isPressed = _ref2.isPressed,
|
|
8078
8007
|
isFocused = _ref2.isFocused;
|
|
@@ -8261,11 +8190,11 @@ function FullscreenModalAnimation(_ref) {
|
|
|
8261
8190
|
transparent: true,
|
|
8262
8191
|
supportedOrientations: ['landscape', 'portrait'],
|
|
8263
8192
|
visible: isModalVisible,
|
|
8264
|
-
onShow: function () {
|
|
8193
|
+
onShow: function onShow() {
|
|
8265
8194
|
if (onEnter) onEnter();
|
|
8266
8195
|
setIsContentVisible(true);
|
|
8267
8196
|
},
|
|
8268
|
-
onDismiss: function () {
|
|
8197
|
+
onDismiss: function onDismiss() {
|
|
8269
8198
|
if (onExited) onExited();
|
|
8270
8199
|
},
|
|
8271
8200
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -8312,7 +8241,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
8312
8241
|
onClose: onClose,
|
|
8313
8242
|
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
8314
8243
|
visible: visible,
|
|
8315
|
-
onExited: function () {
|
|
8244
|
+
onExited: function handleExitAnimationDone() {
|
|
8316
8245
|
if (onExited) onExited();
|
|
8317
8246
|
setIsModalBehaviourVisible(false);
|
|
8318
8247
|
},
|
|
@@ -8539,11 +8468,11 @@ var useNativeAnimation$2 = function (_ref) {
|
|
|
8539
8468
|
};
|
|
8540
8469
|
});
|
|
8541
8470
|
return {
|
|
8542
|
-
onPressIn: function () {
|
|
8471
|
+
onPressIn: function handleHoverIn() {
|
|
8543
8472
|
color.value = withTiming(1, withTimingConfig);
|
|
8544
8473
|
translate.value = withTiming(2, withTimingConfig);
|
|
8545
8474
|
},
|
|
8546
|
-
onPressOut: function () {
|
|
8475
|
+
onPressOut: function handleHoverOut() {
|
|
8547
8476
|
color.value = withTiming(0, withTimingConfig);
|
|
8548
8477
|
translate.value = withTiming(0, withTimingConfig);
|
|
8549
8478
|
},
|
|
@@ -8635,13 +8564,13 @@ function Highlight(_ref) {
|
|
|
8635
8564
|
});
|
|
8636
8565
|
}
|
|
8637
8566
|
return /*#__PURE__*/jsx(Pressable, {
|
|
8638
|
-
onPress: function () {
|
|
8567
|
+
onPress: function handlePress() {
|
|
8639
8568
|
setIsExpanded(!isExpanded);
|
|
8640
8569
|
setIsInitialRender(false);
|
|
8641
8570
|
},
|
|
8642
8571
|
onPressIn: onPressIn,
|
|
8643
8572
|
onPressOut: onPressOut,
|
|
8644
|
-
children: function (_ref2) {
|
|
8573
|
+
children: function children(_ref2) {
|
|
8645
8574
|
var isHovered = _ref2.isHovered;
|
|
8646
8575
|
return /*#__PURE__*/jsxs(AnimatedContainer, {
|
|
8647
8576
|
isHovered: isHovered,
|
|
@@ -8790,10 +8719,10 @@ function useNativeAnimation$1(_ref) {
|
|
|
8790
8719
|
return {
|
|
8791
8720
|
opacityStyles: opacityStyles,
|
|
8792
8721
|
scaleStyles: scaleStyles,
|
|
8793
|
-
onPressIn: function () {
|
|
8722
|
+
onPressIn: function handlePressIn() {
|
|
8794
8723
|
pressed.value = true;
|
|
8795
8724
|
},
|
|
8796
|
-
onPressOut: function () {
|
|
8725
|
+
onPressOut: function handlePressOut() {
|
|
8797
8726
|
pressed.value = false;
|
|
8798
8727
|
}
|
|
8799
8728
|
};
|
|
@@ -8872,7 +8801,7 @@ function IconButton(_ref) {
|
|
|
8872
8801
|
onPress: onPress,
|
|
8873
8802
|
onPressIn: onPressIn,
|
|
8874
8803
|
onPressOut: onPressOut,
|
|
8875
|
-
children: function (_ref2) {
|
|
8804
|
+
children: function children(_ref2) {
|
|
8876
8805
|
var isHovered = _ref2.isHovered,
|
|
8877
8806
|
isPressed = _ref2.isPressed,
|
|
8878
8807
|
isFocused = _ref2.isFocused;
|
|
@@ -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
|
})
|
|
@@ -9201,7 +9131,7 @@ function MapMarker(_ref2) {
|
|
|
9201
9131
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
9202
9132
|
testID: testID,
|
|
9203
9133
|
onPress: onPress,
|
|
9204
|
-
children: function (_ref3) {
|
|
9134
|
+
children: function children(_ref3) {
|
|
9205
9135
|
var isHovered = _ref3.isHovered;
|
|
9206
9136
|
return /*#__PURE__*/jsx(StaticMapMarker$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
9207
9137
|
isHovered: isHovered
|
|
@@ -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
|
|
@@ -11804,19 +11742,19 @@ function NavigationModalBehaviour(_ref) {
|
|
|
11804
11742
|
children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
11805
11743
|
appear: shouldAppear,
|
|
11806
11744
|
visible: visible,
|
|
11807
|
-
onEnter: function () {
|
|
11745
|
+
onEnter: function handleEnter() {
|
|
11808
11746
|
if (onEnter) onEnter();
|
|
11809
11747
|
|
|
11810
11748
|
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
11811
11749
|
setShouldAppear(false);
|
|
11812
11750
|
},
|
|
11813
|
-
onExit: function () {
|
|
11751
|
+
onExit: function handleExit() {
|
|
11814
11752
|
if (onExit) onExit();
|
|
11815
11753
|
|
|
11816
11754
|
// Reset appear value to its original value for future modal display
|
|
11817
11755
|
setShouldAppear(appear);
|
|
11818
11756
|
},
|
|
11819
|
-
onExited: function () {
|
|
11757
|
+
onExited: function handleExitAnimationDone() {
|
|
11820
11758
|
if (onExited) onExited();
|
|
11821
11759
|
setIsModalBehaviourVisible(false);
|
|
11822
11760
|
},
|
|
@@ -12177,7 +12115,7 @@ function Picker(_ref) {
|
|
|
12177
12115
|
isOpen: state.isOpen,
|
|
12178
12116
|
selectedItem: state.currentValue,
|
|
12179
12117
|
disabled: disabled,
|
|
12180
|
-
onPress: function () {
|
|
12118
|
+
onPress: function handlePressTrigger() {
|
|
12181
12119
|
if (syncStateWithSourceValue) {
|
|
12182
12120
|
dispatch({
|
|
12183
12121
|
type: 'open-modal-with-value',
|
|
@@ -12231,7 +12169,7 @@ function Picker(_ref) {
|
|
|
12231
12169
|
accessibilityState: {
|
|
12232
12170
|
selected: isSelected
|
|
12233
12171
|
},
|
|
12234
|
-
onPress: function () {
|
|
12172
|
+
onPress: function onPress() {
|
|
12235
12173
|
handleInternalChange(item.props.value);
|
|
12236
12174
|
},
|
|
12237
12175
|
children: function (_ref2) {
|
|
@@ -12252,7 +12190,7 @@ function Picker(_ref) {
|
|
|
12252
12190
|
children: /*#__PURE__*/jsx(Button, {
|
|
12253
12191
|
stretch: true,
|
|
12254
12192
|
type: "primary",
|
|
12255
|
-
onPress: function () {
|
|
12193
|
+
onPress: function handleChange() {
|
|
12256
12194
|
if (onChange) onChange(state.internalValue);
|
|
12257
12195
|
dispatch({
|
|
12258
12196
|
type: 'change-value'
|
|
@@ -12389,7 +12327,7 @@ function Skeleton(_ref) {
|
|
|
12389
12327
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
12390
12328
|
overflow: "hidden",
|
|
12391
12329
|
style: style,
|
|
12392
|
-
onLayout: function (_ref2) {
|
|
12330
|
+
onLayout: function onLayout(_ref2) {
|
|
12393
12331
|
var nativeEvent = _ref2.nativeEvent;
|
|
12394
12332
|
return setWidth(nativeEvent.layout.width);
|
|
12395
12333
|
},
|
|
@@ -12611,7 +12549,7 @@ function StaticMap(_ref) {
|
|
|
12611
12549
|
position: "relative",
|
|
12612
12550
|
maxWidth: mapBoxMaxPictureWidth,
|
|
12613
12551
|
height: height,
|
|
12614
|
-
onLayout: function (event) {
|
|
12552
|
+
onLayout: function handleParentLayout(event) {
|
|
12615
12553
|
var nativeEvent = event.nativeEvent;
|
|
12616
12554
|
var rangedMapWidth = getPictureWidth(nativeEvent.layout.width);
|
|
12617
12555
|
setCurrentWidth(rangedMapWidth);
|
|
@@ -12623,11 +12561,11 @@ function StaticMap(_ref) {
|
|
|
12623
12561
|
width: currentWidth,
|
|
12624
12562
|
height: height,
|
|
12625
12563
|
alt: alt,
|
|
12626
|
-
onLoadEnd: function () {
|
|
12564
|
+
onLoadEnd: function handleImageLoadEnd() {
|
|
12627
12565
|
setIsLoading(false);
|
|
12628
12566
|
if (onLoaded) onLoaded();
|
|
12629
12567
|
},
|
|
12630
|
-
onError: function () {
|
|
12568
|
+
onError: function handleError() {
|
|
12631
12569
|
setHasError(true);
|
|
12632
12570
|
if (onError) onError();
|
|
12633
12571
|
}
|
|
@@ -12652,7 +12590,7 @@ function StaticMap(_ref) {
|
|
|
12652
12590
|
width: "100%",
|
|
12653
12591
|
height: "100%",
|
|
12654
12592
|
children: /*#__PURE__*/jsx(StaticMapError, {
|
|
12655
|
-
onReload: function () {
|
|
12593
|
+
onReload: function handleReload() {
|
|
12656
12594
|
setHasError(false);
|
|
12657
12595
|
setIsLoading(true);
|
|
12658
12596
|
setCurrentMapKey(function (prev) {
|
|
@@ -12893,7 +12831,7 @@ function StoryContainer(_ref) {
|
|
|
12893
12831
|
var StoryDecorator = makeDecorator({
|
|
12894
12832
|
name: 'StoryDecorator',
|
|
12895
12833
|
parameterName: 'storyDecorator',
|
|
12896
|
-
wrapper: function (storyFn, context) {
|
|
12834
|
+
wrapper: function wrapper(storyFn, context) {
|
|
12897
12835
|
var story = storyFn(context);
|
|
12898
12836
|
if (context.parameters.disableStoryContainer) {
|
|
12899
12837
|
return story;
|
|
@@ -13078,7 +13016,7 @@ function TabBar(_ref) {
|
|
|
13078
13016
|
return /*#__PURE__*/jsx(View, {
|
|
13079
13017
|
children: /*#__PURE__*/cloneElement(child, {
|
|
13080
13018
|
color: color,
|
|
13081
|
-
onPress: function (event) {
|
|
13019
|
+
onPress: function onPress(event) {
|
|
13082
13020
|
var _child$props$onPress, _child$props;
|
|
13083
13021
|
onChangeTab({
|
|
13084
13022
|
tab: tabs[index],
|
|
@@ -13227,7 +13165,7 @@ function ModalDateTimePicker(_ref) {
|
|
|
13227
13165
|
stretch: true,
|
|
13228
13166
|
testID: "timePicker.ModalDateTimePicker.submitButton",
|
|
13229
13167
|
type: "primary",
|
|
13230
|
-
onPress: function () {
|
|
13168
|
+
onPress: function handleSubmit() {
|
|
13231
13169
|
onChange(currentValue);
|
|
13232
13170
|
},
|
|
13233
13171
|
children: buttonContent
|
|
@@ -13274,7 +13212,7 @@ var TimePickerPressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13274
13212
|
width: createResponsiveStyleFromProp(stretch, '100%', 'kitt.forms.timePicker.minWidth'),
|
|
13275
13213
|
pointerEvents: "box-only",
|
|
13276
13214
|
onPress: onPress,
|
|
13277
|
-
children: function (_ref2) {
|
|
13215
|
+
children: function children(_ref2) {
|
|
13278
13216
|
var isHovered = _ref2.isHovered,
|
|
13279
13217
|
isFocused = _ref2.isFocused,
|
|
13280
13218
|
isPressed = _ref2.isPressed;
|
|
@@ -13351,7 +13289,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13351
13289
|
isHoveredInternal: isHoveredInternal,
|
|
13352
13290
|
isFocusedInternal: isFocusedInternal,
|
|
13353
13291
|
isPressedInternal: isPressedInternal,
|
|
13354
|
-
onPress: function () {
|
|
13292
|
+
onPress: function handlePress() {
|
|
13355
13293
|
setIsPickerVisible(true);
|
|
13356
13294
|
}
|
|
13357
13295
|
}), Platform.OS === 'android' && isPickerVisible ? /*#__PURE__*/jsx(DateTimePicker, {
|
|
@@ -13375,7 +13313,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13375
13313
|
value: pickerValue,
|
|
13376
13314
|
validateButtonLabel: validateButtonLabel,
|
|
13377
13315
|
onChange: handleChange,
|
|
13378
|
-
onClose: function () {
|
|
13316
|
+
onClose: function handleClose() {
|
|
13379
13317
|
setIsPickerVisible(false);
|
|
13380
13318
|
}
|
|
13381
13319
|
}) : null]
|
|
@@ -13738,7 +13676,7 @@ function Tooltip(_ref) {
|
|
|
13738
13676
|
ref: reference,
|
|
13739
13677
|
children: renderPressable({
|
|
13740
13678
|
ref: getPressableRect,
|
|
13741
|
-
onPress: function () {
|
|
13679
|
+
onPress: function handlePress() {
|
|
13742
13680
|
if (onToggle) onToggle(!!pressed.value);
|
|
13743
13681
|
pressed.value = !pressed.value;
|
|
13744
13682
|
},
|
|
@@ -13757,7 +13695,7 @@ function Tooltip(_ref) {
|
|
|
13757
13695
|
left: customShiftData.left,
|
|
13758
13696
|
right: customShiftData.right,
|
|
13759
13697
|
zIndex: zIndex,
|
|
13760
|
-
onLayout: function (_ref2) {
|
|
13698
|
+
onLayout: function onLayout(_ref2) {
|
|
13761
13699
|
var nativeEvent = _ref2.nativeEvent;
|
|
13762
13700
|
return setFloatingWidth(nativeEvent.layout.width);
|
|
13763
13701
|
},
|
|
@@ -13920,7 +13858,7 @@ function KittThemeProvider(_ref) {
|
|
|
13920
13858
|
var KittThemeDecorator = makeDecorator({
|
|
13921
13859
|
name: 'ThemeDecorator',
|
|
13922
13860
|
parameterName: 'theme',
|
|
13923
|
-
wrapper: function (storyFn, context, _ref2) {
|
|
13861
|
+
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
13924
13862
|
var _parameters$isSSR;
|
|
13925
13863
|
var _ref2$options = _ref2.options,
|
|
13926
13864
|
options = _ref2$options === void 0 ? {} : _ref2$options,
|