@ornikar/kitt-universal 25.48.1-canary.430f6cd109998511d4c4ad7369a24908547c62f4.0 → 25.50.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 +11 -4
- package/dist/definitions/BottomSheet/BottomSheet.d.ts +2 -3
- package/dist/definitions/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModal.d.ts +2 -3
- package/dist/definitions/CardModal/CardModal.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/FullscreenModal.d.ts +2 -3
- package/dist/definitions/FullscreenModal/FullscreenModal.d.ts.map +1 -1
- package/dist/definitions/NavigationModal/NavigationModal.d.ts +1 -1
- package/dist/definitions/NavigationModal/NavigationModal.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +0 -6
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +175 -933
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +175 -933
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +108 -863
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.cjs.web.css +0 -8
- package/dist/index-node-20.10.cjs.web.js +64 -747
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +109 -861
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index-node-20.10.es.web.css +0 -8
- package/dist/index-node-20.10.es.web.mjs +66 -746
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +177 -946
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +152 -837
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +11 -11
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +11 -11
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.js +11 -11
- package/dist/linaria-themes-node-20.10.cjs.js.map +1 -1
- package/dist/linaria-themes-node-20.10.cjs.web.js +11 -11
- package/dist/linaria-themes-node-20.10.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-20.10.es.mjs +11 -11
- package/dist/linaria-themes-node-20.10.es.mjs.map +1 -1
- package/dist/linaria-themes-node-20.10.es.web.mjs +11 -11
- package/dist/linaria-themes-node-20.10.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +11 -11
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +11 -11
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/styles.css +0 -8
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/definitions/CardModal2/CardModal2.d.ts +0 -19
- package/dist/definitions/CardModal2/CardModal2.d.ts.map +0 -1
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.d.ts +0 -8
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.d.ts.map +0 -1
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.web.d.ts +0 -4
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.web.d.ts.map +0 -1
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2RotationContainer.d.ts +0 -7
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2RotationContainer.d.ts.map +0 -1
- package/dist/definitions/CardModal2/components/CardModal2Animation/NativeOpacityAnimation.d.ts +0 -8
- package/dist/definitions/CardModal2/components/CardModal2Animation/NativeOpacityAnimation.d.ts.map +0 -1
- package/dist/definitions/CardModal2/components/CardModal2Animation/NativeRotationAnimation.d.ts +0 -11
- package/dist/definitions/CardModal2/components/CardModal2Animation/NativeRotationAnimation.d.ts.map +0 -1
- package/dist/definitions/CardModal2/components/CardModal2Behaviour.d.ts +0 -8
- package/dist/definitions/CardModal2/components/CardModal2Behaviour.d.ts.map +0 -1
- package/dist/definitions/CardModal2/components/CardModal2Body.d.ts +0 -7
- package/dist/definitions/CardModal2/components/CardModal2Body.d.ts.map +0 -1
- package/dist/definitions/CardModal2/components/CardModal2Footer.d.ts +0 -7
- package/dist/definitions/CardModal2/components/CardModal2Footer.d.ts.map +0 -1
- package/dist/definitions/CardModal2/components/CardModal2Header.d.ts +0 -20
- package/dist/definitions/CardModal2/components/CardModal2Header.d.ts.map +0 -1
- package/dist/definitions/FullscreenModal2/FullscreenModal2.d.ts +0 -18
- package/dist/definitions/FullscreenModal2/FullscreenModal2.d.ts.map +0 -1
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Animation.d.ts +0 -8
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Animation.d.ts.map +0 -1
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Behaviour.d.ts +0 -8
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Behaviour.d.ts.map +0 -1
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Body.d.ts +0 -9
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Body.d.ts.map +0 -1
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Container.d.ts +0 -8
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Container.d.ts.map +0 -1
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Footer.d.ts +0 -8
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Footer.d.ts.map +0 -1
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Header.d.ts +0 -22
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Header.d.ts.map +0 -1
- package/dist/definitions/FullscreenModal2/components/NativeOpacityAnimation.d.ts +0 -7
- package/dist/definitions/FullscreenModal2/components/NativeOpacityAnimation.d.ts.map +0 -1
- package/dist/definitions/FullscreenModal2/components/NativeSlideInAnimation.d.ts +0 -10
- package/dist/definitions/FullscreenModal2/components/NativeSlideInAnimation.d.ts.map +0 -1
- package/dist/definitions/NavigationModal2/NavigationModal2.d.ts +0 -23
- package/dist/definitions/NavigationModal2/NavigationModal2.d.ts.map +0 -1
- package/dist/definitions/NavigationModal2/components/NavigationModal2Behaviour.d.ts +0 -8
- package/dist/definitions/NavigationModal2/components/NavigationModal2Behaviour.d.ts.map +0 -1
- package/dist/definitions/NavigationModal2/components/NavigationModal2Body.d.ts +0 -7
- package/dist/definitions/NavigationModal2/components/NavigationModal2Body.d.ts.map +0 -1
- package/dist/definitions/NavigationModal2/components/NavigationModal2Footer.d.ts +0 -7
- package/dist/definitions/NavigationModal2/components/NavigationModal2Footer.d.ts.map +0 -1
- package/dist/definitions/NavigationModal2/components/NavigationModal2Header.d.ts +0 -7
- package/dist/definitions/NavigationModal2/components/NavigationModal2Header.d.ts.map +0 -1
- package/dist/definitions/utils/IdentityComponent.d.ts +0 -15
- package/dist/definitions/utils/IdentityComponent.d.ts.map +0 -1
|
@@ -5,7 +5,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
5
5
|
import { SpinnerGapRegularIcon, UserRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, XRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import { CSSTransition } from 'react-transition-group';
|
|
8
|
-
import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2,
|
|
8
|
+
import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
9
9
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
10
10
|
import { parse } from '@twemoji/parser';
|
|
11
11
|
import Downshift, { useSelect } from 'downshift';
|
|
@@ -721,19 +721,19 @@ const button = {
|
|
|
721
721
|
},
|
|
722
722
|
danger: {
|
|
723
723
|
default: {
|
|
724
|
-
backgroundColor: lateOceanColorPalette.
|
|
725
|
-
pressedBackgroundColor: lateOceanColorPalette.
|
|
726
|
-
hoverBackgroundColor: lateOceanColorPalette.
|
|
727
|
-
focusBorderColor: lateOceanColorPalette.
|
|
724
|
+
backgroundColor: lateOceanColorPalette['coral.3'],
|
|
725
|
+
pressedBackgroundColor: lateOceanColorPalette['coral.4'],
|
|
726
|
+
hoverBackgroundColor: lateOceanColorPalette['coral.4'],
|
|
727
|
+
focusBorderColor: lateOceanColorPalette['coral.4']
|
|
728
728
|
},
|
|
729
729
|
ghost: {
|
|
730
730
|
backgroundColor: colors.uiBackgroundLight,
|
|
731
|
-
pressedBackgroundColor:
|
|
732
|
-
hoverBackgroundColor:
|
|
733
|
-
focusBorderColor: 'rgba(255, 255, 255, 0.
|
|
734
|
-
color: lateOceanColorPalette.
|
|
735
|
-
hoverColor: lateOceanColorPalette.
|
|
736
|
-
activeColor: lateOceanColorPalette.
|
|
731
|
+
pressedBackgroundColor: colors.uiBackground,
|
|
732
|
+
hoverBackgroundColor: colors.hover,
|
|
733
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.4)',
|
|
734
|
+
color: lateOceanColorPalette['coral.9'],
|
|
735
|
+
hoverColor: lateOceanColorPalette['coral.9'],
|
|
736
|
+
activeColor: lateOceanColorPalette['coral.9']
|
|
737
737
|
}
|
|
738
738
|
},
|
|
739
739
|
subtle: {
|
|
@@ -2086,7 +2086,7 @@ const typography = {
|
|
|
2086
2086
|
'primary-light': colors.primaryLight,
|
|
2087
2087
|
accent: colors.accent,
|
|
2088
2088
|
success: colors.success,
|
|
2089
|
-
danger:
|
|
2089
|
+
danger: lateOceanColorPalette['coral.9'],
|
|
2090
2090
|
warning: colors.warning
|
|
2091
2091
|
},
|
|
2092
2092
|
types: {
|
|
@@ -3811,24 +3811,6 @@ function useStaticBottomSheet(Content) {
|
|
|
3811
3811
|
};
|
|
3812
3812
|
}
|
|
3813
3813
|
|
|
3814
|
-
/**
|
|
3815
|
-
* A utility component that returns its children without any modifications.
|
|
3816
|
-
*
|
|
3817
|
-
* This component acts as an identity function for React elements - it simply returns
|
|
3818
|
-
* whatever children are passed to it. It can be useful in conditional rendering patterns,
|
|
3819
|
-
* component composition, or as a placeholder in component hierarchies.
|
|
3820
|
-
*
|
|
3821
|
-
* @returns The children as they were passed in, without any wrapper elements
|
|
3822
|
-
*
|
|
3823
|
-
* @example
|
|
3824
|
-
* See CardModal and FullscreenModal for usage examples.
|
|
3825
|
-
*/
|
|
3826
|
-
function IdentityComponent({
|
|
3827
|
-
children
|
|
3828
|
-
}) {
|
|
3829
|
-
return children;
|
|
3830
|
-
}
|
|
3831
|
-
|
|
3832
3814
|
const overflowHidden = "kitt-u_overflowHidden_otm3u3";
|
|
3833
3815
|
function useBlockBodyScroll(shouldBlockScroll, isInitialRender) {
|
|
3834
3816
|
useEffect(() => {
|
|
@@ -3936,253 +3918,10 @@ function CardModalRotationContainer(props) {
|
|
|
3936
3918
|
});
|
|
3937
3919
|
}
|
|
3938
3920
|
|
|
3939
|
-
const contentAnimationEnter$
|
|
3940
|
-
const contentAnimatioEnterActive$
|
|
3941
|
-
const contentAnimatioExit$
|
|
3942
|
-
const contentAnimatioExitActive$
|
|
3943
|
-
const contentAnimationClassNames$2 = {
|
|
3944
|
-
appear: contentAnimationEnter$2,
|
|
3945
|
-
appearActive: contentAnimatioEnterActive$2,
|
|
3946
|
-
enter: contentAnimationEnter$2,
|
|
3947
|
-
enterActive: contentAnimatioEnterActive$2,
|
|
3948
|
-
exit: contentAnimatioExit$2,
|
|
3949
|
-
exitActive: contentAnimatioExitActive$2
|
|
3950
|
-
};
|
|
3951
|
-
const opacityEnter$3 = "kitt-u_opacityEnter_o1ae40dx";
|
|
3952
|
-
const opacityEnterActive$3 = "kitt-u_opacityEnterActive_o1t4vl7b";
|
|
3953
|
-
const opacityExit$3 = "kitt-u_opacityExit_ogyytm1";
|
|
3954
|
-
const opacityExitActive$3 = "kitt-u_opacityExitActive_o18xvk52";
|
|
3955
|
-
const opacityClassNames$3 = {
|
|
3956
|
-
appear: opacityEnter$3,
|
|
3957
|
-
appearActive: opacityEnterActive$3,
|
|
3958
|
-
enter: opacityEnter$3,
|
|
3959
|
-
enterActive: opacityEnterActive$3,
|
|
3960
|
-
exit: opacityExit$3,
|
|
3961
|
-
exitActive: opacityExitActive$3
|
|
3962
|
-
};
|
|
3963
|
-
function CardModalAnimation({
|
|
3964
|
-
children,
|
|
3965
|
-
appear = true,
|
|
3966
|
-
visible,
|
|
3967
|
-
unmountOnExit = true,
|
|
3968
|
-
isAnimationEnabled = true,
|
|
3969
|
-
onEnter,
|
|
3970
|
-
onEntered,
|
|
3971
|
-
onExit,
|
|
3972
|
-
onExited,
|
|
3973
|
-
onClose,
|
|
3974
|
-
...props
|
|
3975
|
-
}) {
|
|
3976
|
-
const theme = useTheme();
|
|
3977
|
-
const {
|
|
3978
|
-
animation
|
|
3979
|
-
} = theme.kitt.cardModal;
|
|
3980
|
-
const sharedProps = {
|
|
3981
|
-
in: visible,
|
|
3982
|
-
appear,
|
|
3983
|
-
unmountOnExit
|
|
3984
|
-
};
|
|
3985
|
-
return /*#__PURE__*/jsxs(View, {
|
|
3986
|
-
...props,
|
|
3987
|
-
height: "100%",
|
|
3988
|
-
justifyContent: "center",
|
|
3989
|
-
children: [/*#__PURE__*/jsx(CSSTransition, {
|
|
3990
|
-
...sharedProps,
|
|
3991
|
-
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
3992
|
-
classNames: opacityClassNames$3,
|
|
3993
|
-
children: /*#__PURE__*/jsx(Overlay, {
|
|
3994
|
-
onPress: onClose
|
|
3995
|
-
})
|
|
3996
|
-
}), /*#__PURE__*/jsx(CSSTransition, {
|
|
3997
|
-
...sharedProps,
|
|
3998
|
-
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
3999
|
-
classNames: contentAnimationClassNames$2,
|
|
4000
|
-
onEnter: onEnter,
|
|
4001
|
-
onEntered: onEntered,
|
|
4002
|
-
onExit: onExit,
|
|
4003
|
-
onExited: onExited,
|
|
4004
|
-
children: /*#__PURE__*/jsx(CardModalRotationContainer, {
|
|
4005
|
-
alignItems: "center",
|
|
4006
|
-
margin: "auto",
|
|
4007
|
-
children: children
|
|
4008
|
-
})
|
|
4009
|
-
})]
|
|
4010
|
-
});
|
|
4011
|
-
}
|
|
4012
|
-
|
|
4013
|
-
function CardModalBehaviour({
|
|
4014
|
-
children,
|
|
4015
|
-
visible,
|
|
4016
|
-
onClose,
|
|
4017
|
-
onExited,
|
|
4018
|
-
...props
|
|
4019
|
-
}) {
|
|
4020
|
-
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
4021
|
-
useEffect(() => {
|
|
4022
|
-
if (visible === true) {
|
|
4023
|
-
setIsModalBehaviourVisible(true);
|
|
4024
|
-
}
|
|
4025
|
-
}, [visible]);
|
|
4026
|
-
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
4027
|
-
visible: isModalBehaviourVisible,
|
|
4028
|
-
onClose: onClose,
|
|
4029
|
-
children: /*#__PURE__*/jsx(CardModalAnimation, {
|
|
4030
|
-
...props,
|
|
4031
|
-
visible: visible,
|
|
4032
|
-
onExited: () => {
|
|
4033
|
-
if (onExited) onExited();
|
|
4034
|
-
setIsModalBehaviourVisible(false);
|
|
4035
|
-
},
|
|
4036
|
-
onClose: onClose,
|
|
4037
|
-
children: children
|
|
4038
|
-
})
|
|
4039
|
-
});
|
|
4040
|
-
}
|
|
4041
|
-
|
|
4042
|
-
function CardModalBody({
|
|
4043
|
-
children,
|
|
4044
|
-
paddingX = {
|
|
4045
|
-
base: 'kitt.4',
|
|
4046
|
-
medium: 'kitt.6'
|
|
4047
|
-
},
|
|
4048
|
-
paddingY = 'kitt.4',
|
|
4049
|
-
...props
|
|
4050
|
-
}) {
|
|
4051
|
-
return /*#__PURE__*/jsx(ScrollView, {
|
|
4052
|
-
showsVerticalScrollIndicator: false,
|
|
4053
|
-
_contentContainerStyle: {
|
|
4054
|
-
paddingX,
|
|
4055
|
-
paddingY
|
|
4056
|
-
},
|
|
4057
|
-
...props,
|
|
4058
|
-
children: children
|
|
4059
|
-
});
|
|
4060
|
-
}
|
|
4061
|
-
|
|
4062
|
-
function CardModalFooter({
|
|
4063
|
-
children,
|
|
4064
|
-
padding = {
|
|
4065
|
-
base: 'kitt.4',
|
|
4066
|
-
medium: 'kitt.2'
|
|
4067
|
-
},
|
|
4068
|
-
hasSeparator = true,
|
|
4069
|
-
...props
|
|
4070
|
-
}) {
|
|
4071
|
-
return /*#__PURE__*/jsx(View, {
|
|
4072
|
-
...props,
|
|
4073
|
-
marginTop: "kitt.2",
|
|
4074
|
-
padding: padding,
|
|
4075
|
-
borderTopWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4076
|
-
borderColor: "kitt.separator",
|
|
4077
|
-
alignItems: {
|
|
4078
|
-
base: undefined,
|
|
4079
|
-
medium: 'flex-end'
|
|
4080
|
-
},
|
|
4081
|
-
children: children
|
|
4082
|
-
});
|
|
4083
|
-
}
|
|
4084
|
-
|
|
4085
|
-
function CardModalHeader({
|
|
4086
|
-
children,
|
|
4087
|
-
title,
|
|
4088
|
-
paddingBottom = {
|
|
4089
|
-
base: 'kitt.4',
|
|
4090
|
-
medium: 'kitt.2'
|
|
4091
|
-
},
|
|
4092
|
-
hasSeparator = true,
|
|
4093
|
-
right,
|
|
4094
|
-
left,
|
|
4095
|
-
...props
|
|
4096
|
-
}) {
|
|
4097
|
-
const defaultContainerPadding = {
|
|
4098
|
-
base: 'kitt.4',
|
|
4099
|
-
medium: 'kitt.6'
|
|
4100
|
-
};
|
|
4101
|
-
return /*#__PURE__*/jsx(View, {
|
|
4102
|
-
...props,
|
|
4103
|
-
padding: paddingBottom,
|
|
4104
|
-
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4105
|
-
borderColor: "kitt.separator",
|
|
4106
|
-
justifyContent: "center",
|
|
4107
|
-
width: "100%",
|
|
4108
|
-
height: "kitt.cardModal.header.height",
|
|
4109
|
-
paddingRight: right ? 'kitt.2' : defaultContainerPadding,
|
|
4110
|
-
paddingLeft: left ? 'kitt.2' : defaultContainerPadding,
|
|
4111
|
-
children: /*#__PURE__*/jsxs(View, {
|
|
4112
|
-
alignItems: "center",
|
|
4113
|
-
flexDirection: "row",
|
|
4114
|
-
justifyContent: !children && !left ? 'flex-end' : 'space-between',
|
|
4115
|
-
children: [left ? /*#__PURE__*/jsx(View, {
|
|
4116
|
-
width: "kitt.iconButton.width",
|
|
4117
|
-
children: left
|
|
4118
|
-
}) : null, /*#__PURE__*/jsxs(View, {
|
|
4119
|
-
flexGrow: "1",
|
|
4120
|
-
paddingRight: right ? 'kitt.2' : 0,
|
|
4121
|
-
paddingLeft: left ? 'kitt.2' : 0,
|
|
4122
|
-
children: [title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
4123
|
-
textAlign: !left && right ? 'left' : 'center',
|
|
4124
|
-
variant: "bold",
|
|
4125
|
-
children: title
|
|
4126
|
-
}) : null, children]
|
|
4127
|
-
}), right ? /*#__PURE__*/jsx(View, {
|
|
4128
|
-
width: "kitt.iconButton.width",
|
|
4129
|
-
children: right
|
|
4130
|
-
}) : null]
|
|
4131
|
-
})
|
|
4132
|
-
});
|
|
4133
|
-
}
|
|
4134
|
-
|
|
4135
|
-
function CardModal({
|
|
4136
|
-
backgroundColor = 'kitt.uiBackgroundLight',
|
|
4137
|
-
maxWidth = 'kitt.cardModal.maxWidth',
|
|
4138
|
-
withoutShadow,
|
|
4139
|
-
children,
|
|
4140
|
-
header,
|
|
4141
|
-
body,
|
|
4142
|
-
footer,
|
|
4143
|
-
contentContainer: ContentContainer = IdentityComponent,
|
|
4144
|
-
...props
|
|
4145
|
-
}) {
|
|
4146
|
-
return /*#__PURE__*/jsx(View, {
|
|
4147
|
-
...props,
|
|
4148
|
-
overflow: "hidden",
|
|
4149
|
-
backgroundColor: backgroundColor,
|
|
4150
|
-
shadow: withoutShadow ? undefined : 'kitt.cardModal.shadow',
|
|
4151
|
-
borderRadius: "kitt.cardModal.borderRadius",
|
|
4152
|
-
width: "100%",
|
|
4153
|
-
maxHeight: "100%",
|
|
4154
|
-
maxWidth: maxWidth,
|
|
4155
|
-
minHeight: "kitt.cardModal.minHeight",
|
|
4156
|
-
children: /*#__PURE__*/jsx(ContentContainer, {
|
|
4157
|
-
children: children || /*#__PURE__*/jsxs(Fragment, {
|
|
4158
|
-
children: [header || null, body || null, footer || null]
|
|
4159
|
-
})
|
|
4160
|
-
})
|
|
4161
|
-
});
|
|
4162
|
-
}
|
|
4163
|
-
CardModal.Body = CardModalBody;
|
|
4164
|
-
CardModal.Header = CardModalHeader;
|
|
4165
|
-
CardModal.Footer = CardModalFooter;
|
|
4166
|
-
CardModal.ModalBehaviour = CardModalBehaviour;
|
|
4167
|
-
|
|
4168
|
-
function CardModal2RotationContainer(props) {
|
|
4169
|
-
return /*#__PURE__*/jsx(View, {
|
|
4170
|
-
paddingX: "kitt.cardModal.overlayPadding.horizontal",
|
|
4171
|
-
paddingY: "kitt.cardModal.overlayPadding.vertical",
|
|
4172
|
-
maxWidth: "kitt.cardModal.maxWidthWithPadding",
|
|
4173
|
-
width: "100%",
|
|
4174
|
-
maxHeight: "100%",
|
|
4175
|
-
_web: {
|
|
4176
|
-
maxHeight: '100svh'
|
|
4177
|
-
},
|
|
4178
|
-
...props
|
|
4179
|
-
});
|
|
4180
|
-
}
|
|
4181
|
-
|
|
4182
|
-
const contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c1qvsvvv";
|
|
4183
|
-
const contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_c1ka3ql7";
|
|
4184
|
-
const contentAnimatioExit$1 = "kitt-u_contentAnimatioExit_cn78c68";
|
|
4185
|
-
const contentAnimatioExitActive$1 = "kitt-u_contentAnimatioExitActive_c14lwu6p";
|
|
3921
|
+
const contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c11xxy4r";
|
|
3922
|
+
const contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_cl52117";
|
|
3923
|
+
const contentAnimatioExit$1 = "kitt-u_contentAnimatioExit_cyjczep";
|
|
3924
|
+
const contentAnimatioExitActive$1 = "kitt-u_contentAnimatioExitActive_cpsy3dt";
|
|
4186
3925
|
const contentAnimationClassNames$1 = {
|
|
4187
3926
|
appear: contentAnimationEnter$1,
|
|
4188
3927
|
appearActive: contentAnimatioEnterActive$1,
|
|
@@ -4191,10 +3930,10 @@ const contentAnimationClassNames$1 = {
|
|
|
4191
3930
|
exit: contentAnimatioExit$1,
|
|
4192
3931
|
exitActive: contentAnimatioExitActive$1
|
|
4193
3932
|
};
|
|
4194
|
-
const opacityEnter$2 = "kitt-
|
|
4195
|
-
const opacityEnterActive$2 = "kitt-
|
|
4196
|
-
const opacityExit$2 = "kitt-
|
|
4197
|
-
const opacityExitActive$2 = "kitt-
|
|
3933
|
+
const opacityEnter$2 = "kitt-u_opacityEnter_o1ae40dx";
|
|
3934
|
+
const opacityEnterActive$2 = "kitt-u_opacityEnterActive_o1t4vl7b";
|
|
3935
|
+
const opacityExit$2 = "kitt-u_opacityExit_ogyytm1";
|
|
3936
|
+
const opacityExitActive$2 = "kitt-u_opacityExitActive_o18xvk52";
|
|
4198
3937
|
const opacityClassNames$2 = {
|
|
4199
3938
|
appear: opacityEnter$2,
|
|
4200
3939
|
appearActive: opacityEnterActive$2,
|
|
@@ -4203,7 +3942,7 @@ const opacityClassNames$2 = {
|
|
|
4203
3942
|
exit: opacityExit$2,
|
|
4204
3943
|
exitActive: opacityExitActive$2
|
|
4205
3944
|
};
|
|
4206
|
-
function
|
|
3945
|
+
function CardModalAnimation({
|
|
4207
3946
|
children,
|
|
4208
3947
|
appear = true,
|
|
4209
3948
|
visible,
|
|
@@ -4244,7 +3983,7 @@ function CardModal2Animation({
|
|
|
4244
3983
|
onEntered: onEntered,
|
|
4245
3984
|
onExit: onExit,
|
|
4246
3985
|
onExited: onExited,
|
|
4247
|
-
children: /*#__PURE__*/jsx(
|
|
3986
|
+
children: /*#__PURE__*/jsx(CardModalRotationContainer, {
|
|
4248
3987
|
alignItems: "center",
|
|
4249
3988
|
margin: "auto",
|
|
4250
3989
|
children: children
|
|
@@ -4253,7 +3992,7 @@ function CardModal2Animation({
|
|
|
4253
3992
|
});
|
|
4254
3993
|
}
|
|
4255
3994
|
|
|
4256
|
-
function
|
|
3995
|
+
function CardModalBehaviour({
|
|
4257
3996
|
children,
|
|
4258
3997
|
visible,
|
|
4259
3998
|
onClose,
|
|
@@ -4269,7 +4008,7 @@ function CardModal2Behaviour({
|
|
|
4269
4008
|
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
4270
4009
|
visible: isModalBehaviourVisible,
|
|
4271
4010
|
onClose: onClose,
|
|
4272
|
-
children: /*#__PURE__*/jsx(
|
|
4011
|
+
children: /*#__PURE__*/jsx(CardModalAnimation, {
|
|
4273
4012
|
...props,
|
|
4274
4013
|
visible: visible,
|
|
4275
4014
|
onExited: () => {
|
|
@@ -4282,7 +4021,7 @@ function CardModal2Behaviour({
|
|
|
4282
4021
|
});
|
|
4283
4022
|
}
|
|
4284
4023
|
|
|
4285
|
-
function
|
|
4024
|
+
function CardModalBody({
|
|
4286
4025
|
children,
|
|
4287
4026
|
paddingX = {
|
|
4288
4027
|
base: 'kitt.4',
|
|
@@ -4302,7 +4041,7 @@ function CardModal2Body({
|
|
|
4302
4041
|
});
|
|
4303
4042
|
}
|
|
4304
4043
|
|
|
4305
|
-
function
|
|
4044
|
+
function CardModalFooter({
|
|
4306
4045
|
children,
|
|
4307
4046
|
padding = {
|
|
4308
4047
|
base: 'kitt.4',
|
|
@@ -4325,7 +4064,7 @@ function CardModal2Footer({
|
|
|
4325
4064
|
});
|
|
4326
4065
|
}
|
|
4327
4066
|
|
|
4328
|
-
function
|
|
4067
|
+
function CardModalHeader({
|
|
4329
4068
|
children,
|
|
4330
4069
|
title,
|
|
4331
4070
|
paddingBottom = {
|
|
@@ -4375,11 +4114,14 @@ function CardModal2Header({
|
|
|
4375
4114
|
});
|
|
4376
4115
|
}
|
|
4377
4116
|
|
|
4378
|
-
function
|
|
4117
|
+
function CardModal({
|
|
4379
4118
|
backgroundColor = 'kitt.uiBackgroundLight',
|
|
4380
4119
|
maxWidth = 'kitt.cardModal.maxWidth',
|
|
4381
4120
|
withoutShadow,
|
|
4382
4121
|
children,
|
|
4122
|
+
header,
|
|
4123
|
+
body,
|
|
4124
|
+
footer,
|
|
4383
4125
|
...props
|
|
4384
4126
|
}) {
|
|
4385
4127
|
return /*#__PURE__*/jsx(View, {
|
|
@@ -4392,13 +4134,15 @@ function CardModal2({
|
|
|
4392
4134
|
maxHeight: "100%",
|
|
4393
4135
|
maxWidth: maxWidth,
|
|
4394
4136
|
minHeight: "kitt.cardModal.minHeight",
|
|
4395
|
-
children: children
|
|
4137
|
+
children: children || /*#__PURE__*/jsxs(Fragment, {
|
|
4138
|
+
children: [header || null, body || null, footer || null]
|
|
4139
|
+
})
|
|
4396
4140
|
});
|
|
4397
4141
|
}
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4142
|
+
CardModal.Body = CardModalBody;
|
|
4143
|
+
CardModal.Header = CardModalHeader;
|
|
4144
|
+
CardModal.Footer = CardModalFooter;
|
|
4145
|
+
CardModal.ModalBehaviour = CardModalBehaviour;
|
|
4402
4146
|
|
|
4403
4147
|
function getBackgroundColor$6({
|
|
4404
4148
|
isDisabled,
|
|
@@ -7465,358 +7209,31 @@ function FullscreenModal({
|
|
|
7465
7209
|
body,
|
|
7466
7210
|
header,
|
|
7467
7211
|
footer,
|
|
7468
|
-
backgroundColor
|
|
7469
|
-
contentContainer: ContentContainer = IdentityComponent
|
|
7212
|
+
backgroundColor
|
|
7470
7213
|
}) {
|
|
7471
|
-
return /*#__PURE__*/
|
|
7214
|
+
return /*#__PURE__*/jsxs(FullscreenModalContainer, {
|
|
7472
7215
|
backgroundColor: backgroundColor,
|
|
7473
|
-
children: /*#__PURE__*/
|
|
7474
|
-
children:
|
|
7475
|
-
|
|
7476
|
-
}) : null, /*#__PURE__*/jsxs(View, {
|
|
7477
|
-
flexGrow: 1,
|
|
7478
|
-
flexShrink: 1,
|
|
7479
|
-
justifyContent: "space-between",
|
|
7480
|
-
children: [/*#__PURE__*/jsx(ScrollView$2, {
|
|
7481
|
-
bounces: false,
|
|
7482
|
-
contentContainerStyle: {
|
|
7483
|
-
flexGrow: 1,
|
|
7484
|
-
position: 'relative'
|
|
7485
|
-
},
|
|
7486
|
-
children: body
|
|
7487
|
-
}), footer || null]
|
|
7488
|
-
})]
|
|
7489
|
-
})
|
|
7490
|
-
});
|
|
7491
|
-
}
|
|
7492
|
-
FullscreenModal.Header = FullscreenModalHeader;
|
|
7493
|
-
FullscreenModal.Footer = FullscreenModalFooter;
|
|
7494
|
-
FullscreenModal.Body = FullscreenModalBody;
|
|
7495
|
-
FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
|
|
7496
|
-
|
|
7497
|
-
function NativeOpacityAnimation({
|
|
7498
|
-
visible,
|
|
7499
|
-
children
|
|
7500
|
-
}) {
|
|
7501
|
-
const theme = useTheme();
|
|
7502
|
-
const opacityStyle = useAnimatedStyle(() => {
|
|
7503
|
-
const {
|
|
7504
|
-
duration,
|
|
7505
|
-
easing
|
|
7506
|
-
} = theme.kitt.fullscreenModal.animation.overlay;
|
|
7507
|
-
const [x1, y1, x2, y2] = easing;
|
|
7508
|
-
return {
|
|
7509
|
-
opacity: withTiming(visible ? 1 : 0, {
|
|
7510
|
-
duration,
|
|
7511
|
-
easing: Easing.bezier(x1, y1, x2, y2)
|
|
7512
|
-
})
|
|
7513
|
-
};
|
|
7514
|
-
});
|
|
7515
|
-
return /*#__PURE__*/jsx(Animated.View, {
|
|
7516
|
-
style: [StyleSheet.absoluteFillObject, opacityStyle],
|
|
7517
|
-
children: children
|
|
7518
|
-
});
|
|
7519
|
-
}
|
|
7520
|
-
|
|
7521
|
-
function NativeSlideInAnimation({
|
|
7522
|
-
visible,
|
|
7523
|
-
children,
|
|
7524
|
-
onEntered,
|
|
7525
|
-
onExited
|
|
7526
|
-
}) {
|
|
7527
|
-
const theme = useTheme();
|
|
7528
|
-
const {
|
|
7529
|
-
height: wHeight
|
|
7530
|
-
} = useWindowDimensions();
|
|
7531
|
-
const hasRunAnimationRef = useRef(false);
|
|
7532
|
-
function handleAnimationFinished() {
|
|
7533
|
-
if (visible) {
|
|
7534
|
-
if (onEntered) onEntered();
|
|
7535
|
-
hasRunAnimationRef.current = true;
|
|
7536
|
-
}
|
|
7537
|
-
|
|
7538
|
-
// Since animation callback is called on component mount, we must make sure that the animation has been runed once to call it an exit
|
|
7539
|
-
if (!visible && hasRunAnimationRef.current) onExited();
|
|
7540
|
-
}
|
|
7541
|
-
const translateStyle = useAnimatedStyle(() => {
|
|
7542
|
-
const {
|
|
7543
|
-
duration,
|
|
7544
|
-
easing
|
|
7545
|
-
} = theme.kitt.fullscreenModal.animation.content;
|
|
7546
|
-
const [x1, y1, x2, y2] = easing;
|
|
7547
|
-
return {
|
|
7548
|
-
transform: [{
|
|
7549
|
-
translateY: withTiming(visible ? 0 : wHeight, {
|
|
7550
|
-
duration,
|
|
7551
|
-
easing: Easing.bezier(x1, y1, x2, y2)
|
|
7552
|
-
}, isFinished => {
|
|
7553
|
-
if (!isFinished) return;
|
|
7554
|
-
runOnJS(handleAnimationFinished)();
|
|
7555
|
-
})
|
|
7556
|
-
}]
|
|
7557
|
-
};
|
|
7558
|
-
});
|
|
7559
|
-
return /*#__PURE__*/jsx(Animated.View, {
|
|
7560
|
-
style: [{
|
|
7561
|
-
transform: [{
|
|
7562
|
-
translateY: wHeight
|
|
7563
|
-
}]
|
|
7564
|
-
}, translateStyle, {
|
|
7565
|
-
width: '100%',
|
|
7566
|
-
flex: 1
|
|
7567
|
-
}],
|
|
7568
|
-
children: children
|
|
7569
|
-
});
|
|
7570
|
-
}
|
|
7571
|
-
|
|
7572
|
-
function FullscreenModal2Animation({
|
|
7573
|
-
visible,
|
|
7574
|
-
children,
|
|
7575
|
-
onEnter,
|
|
7576
|
-
onEntered,
|
|
7577
|
-
onExit,
|
|
7578
|
-
onExited
|
|
7579
|
-
}) {
|
|
7580
|
-
const [isModalVisible, setIsModalVisible] = useState(visible);
|
|
7581
|
-
const [isContentVisible, setIsContentVisible] = useState(false);
|
|
7582
|
-
const handleAnimationExited = () => {
|
|
7583
|
-
setIsModalVisible(false);
|
|
7584
|
-
// Android doesn't handle the onDismiss callback on the modal, we need to call it manually
|
|
7585
|
-
};
|
|
7586
|
-
|
|
7587
|
-
// When parent visibility is set to false, in order to have our exit animation we must in this order :
|
|
7588
|
-
// 1 - run the exit animation
|
|
7589
|
-
// 2 - once it is done, unmount the Modal
|
|
7590
|
-
useEffect(() => {
|
|
7591
|
-
if (!(!visible && isContentVisible)) return;
|
|
7592
|
-
if (onExit) onExit();
|
|
7593
|
-
setIsContentVisible(false);
|
|
7594
|
-
}, [visible, isContentVisible, onExit]);
|
|
7595
|
-
return /*#__PURE__*/jsx(Modal, {
|
|
7596
|
-
transparent: true,
|
|
7597
|
-
supportedOrientations: ['landscape', 'portrait'],
|
|
7598
|
-
visible: isModalVisible,
|
|
7599
|
-
onShow: () => {
|
|
7600
|
-
if (onEnter) onEnter();
|
|
7601
|
-
setIsContentVisible(true);
|
|
7602
|
-
},
|
|
7603
|
-
onDismiss: () => {
|
|
7604
|
-
if (onExited) onExited();
|
|
7605
|
-
},
|
|
7606
|
-
children: /*#__PURE__*/jsxs(View, {
|
|
7607
|
-
position: "relative",
|
|
7216
|
+
children: [header ? /*#__PURE__*/jsx(View, {
|
|
7217
|
+
children: header
|
|
7218
|
+
}) : null, /*#__PURE__*/jsxs(View, {
|
|
7608
7219
|
flexGrow: 1,
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
children: [/*#__PURE__*/jsx(
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
onPress: handleAnimationExited
|
|
7615
|
-
})
|
|
7616
|
-
}), /*#__PURE__*/jsx(NativeSlideInAnimation, {
|
|
7617
|
-
visible: isContentVisible,
|
|
7618
|
-
onExited: handleAnimationExited,
|
|
7619
|
-
onEntered: onEntered,
|
|
7620
|
-
children: /*#__PURE__*/jsx(View, {
|
|
7220
|
+
flexShrink: 1,
|
|
7221
|
+
justifyContent: "space-between",
|
|
7222
|
+
children: [/*#__PURE__*/jsx(ScrollView$2, {
|
|
7223
|
+
bounces: false,
|
|
7224
|
+
contentContainerStyle: {
|
|
7621
7225
|
flexGrow: 1,
|
|
7622
|
-
|
|
7623
|
-
}
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
}
|
|
7628
|
-
|
|
7629
|
-
function FullscreenModal2Behaviour({
|
|
7630
|
-
children,
|
|
7631
|
-
visible,
|
|
7632
|
-
onClose,
|
|
7633
|
-
onExited,
|
|
7634
|
-
...props
|
|
7635
|
-
}) {
|
|
7636
|
-
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
7637
|
-
useEffect(() => {
|
|
7638
|
-
if (visible === true) {
|
|
7639
|
-
setIsModalBehaviourVisible(true);
|
|
7640
|
-
}
|
|
7641
|
-
}, [visible]);
|
|
7642
|
-
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
7643
|
-
visible: isModalBehaviourVisible,
|
|
7644
|
-
onClose: onClose,
|
|
7645
|
-
children: /*#__PURE__*/jsx(FullscreenModal2Animation, {
|
|
7646
|
-
...props,
|
|
7647
|
-
visible: visible,
|
|
7648
|
-
onExited: () => {
|
|
7649
|
-
if (onExited) onExited();
|
|
7650
|
-
setIsModalBehaviourVisible(false);
|
|
7651
|
-
},
|
|
7652
|
-
children: children
|
|
7653
|
-
})
|
|
7654
|
-
});
|
|
7655
|
-
}
|
|
7656
|
-
|
|
7657
|
-
function FullscreenModal2Body({
|
|
7658
|
-
children,
|
|
7659
|
-
shouldHandleBottomNotch,
|
|
7660
|
-
style,
|
|
7661
|
-
shouldHandleTopNotch,
|
|
7662
|
-
...props
|
|
7663
|
-
}) {
|
|
7664
|
-
const {
|
|
7665
|
-
bottom,
|
|
7666
|
-
top
|
|
7667
|
-
} = useSafeAreaInsets();
|
|
7668
|
-
const {
|
|
7669
|
-
kitt: {
|
|
7670
|
-
fullscreenModal: {
|
|
7671
|
-
body: {
|
|
7672
|
-
verticalPadding
|
|
7673
|
-
}
|
|
7674
|
-
}
|
|
7675
|
-
}
|
|
7676
|
-
} = useTheme();
|
|
7677
|
-
const paddingBottom = shouldHandleBottomNotch ? Math.max(bottom, verticalPadding) : verticalPadding;
|
|
7678
|
-
const paddingTop = shouldHandleTopNotch ? Math.max(top, verticalPadding) : verticalPadding;
|
|
7679
|
-
return /*#__PURE__*/jsx(View, {
|
|
7680
|
-
flexGrow: 1,
|
|
7681
|
-
flexShrink: 1,
|
|
7682
|
-
justifyContent: "space-between",
|
|
7683
|
-
children: /*#__PURE__*/jsx(ScrollView$1, {
|
|
7684
|
-
bounces: false,
|
|
7685
|
-
contentContainerStyle: {
|
|
7686
|
-
flexGrow: 1,
|
|
7687
|
-
position: 'relative'
|
|
7688
|
-
},
|
|
7689
|
-
children: /*#__PURE__*/jsx(View, {
|
|
7690
|
-
...props,
|
|
7691
|
-
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
7692
|
-
paddingTop: paddingTop,
|
|
7693
|
-
paddingBottom: paddingBottom,
|
|
7694
|
-
style: style,
|
|
7695
|
-
children: children
|
|
7696
|
-
})
|
|
7697
|
-
})
|
|
7698
|
-
});
|
|
7699
|
-
}
|
|
7700
|
-
|
|
7701
|
-
function FullscreenModal2Container({
|
|
7702
|
-
children,
|
|
7703
|
-
backgroundColor
|
|
7704
|
-
}) {
|
|
7705
|
-
return /*#__PURE__*/jsx(View, {
|
|
7706
|
-
position: "relative",
|
|
7707
|
-
flexGrow: 1,
|
|
7708
|
-
flexShrink: 1,
|
|
7709
|
-
flexBasis: "100%"
|
|
7710
|
-
/*
|
|
7711
|
-
Here we are setting the same min and max height because on web the content was overflowing and not scrolling
|
|
7712
|
-
minHeight is needed to make the modal fullscreen
|
|
7713
|
-
maxHeight limits the height to the viewport when the content is too long, this allows us to scroll inside
|
|
7714
|
-
We use svh instead of vh because vh is the total height of the viewport, including the address bar in mobile web browsers
|
|
7715
|
-
*/,
|
|
7716
|
-
_web: {
|
|
7717
|
-
minHeight: '100svh',
|
|
7718
|
-
maxHeight: '100svh'
|
|
7719
|
-
},
|
|
7720
|
-
backgroundColor: backgroundColor ?? 'kitt.uiBackgroundLight',
|
|
7721
|
-
children: children
|
|
7722
|
-
});
|
|
7723
|
-
}
|
|
7724
|
-
|
|
7725
|
-
function FullscreenModal2Footer({
|
|
7726
|
-
shouldHandleBottomNotch = true,
|
|
7727
|
-
hasSeparator = true,
|
|
7728
|
-
children,
|
|
7729
|
-
...props
|
|
7730
|
-
}) {
|
|
7731
|
-
const {
|
|
7732
|
-
bottom
|
|
7733
|
-
} = useSafeAreaInsets();
|
|
7734
|
-
return /*#__PURE__*/jsx(View, {
|
|
7735
|
-
borderTopColor: "kitt.separator",
|
|
7736
|
-
borderTopWidth: hasSeparator ? 1 : undefined,
|
|
7737
|
-
paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
|
|
7738
|
-
paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
|
|
7739
|
-
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
7740
|
-
...props,
|
|
7741
|
-
children: /*#__PURE__*/jsx(View, {
|
|
7742
|
-
paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
|
|
7743
|
-
children: children
|
|
7744
|
-
})
|
|
7745
|
-
});
|
|
7746
|
-
}
|
|
7747
|
-
|
|
7748
|
-
function FullscreenModal2Header({
|
|
7749
|
-
hasSeparator = true,
|
|
7750
|
-
isTransparent,
|
|
7751
|
-
title,
|
|
7752
|
-
children,
|
|
7753
|
-
right,
|
|
7754
|
-
left,
|
|
7755
|
-
shouldHandleTopNotch = true,
|
|
7756
|
-
...props
|
|
7757
|
-
}) {
|
|
7758
|
-
const {
|
|
7759
|
-
top
|
|
7760
|
-
} = useSafeAreaInsets();
|
|
7761
|
-
const hasRight = Boolean(right);
|
|
7762
|
-
const hasLeft = Boolean(left);
|
|
7763
|
-
const hasContent = Boolean(title || children);
|
|
7764
|
-
return /*#__PURE__*/jsx(View, {
|
|
7765
|
-
backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
|
|
7766
|
-
minHeight: "kitt.fullscreenModal.header.height",
|
|
7767
|
-
width: "100%",
|
|
7768
|
-
justifyContent: "center",
|
|
7769
|
-
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
7770
|
-
paddingRight: hasRight ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
7771
|
-
paddingLeft: hasLeft ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
7772
|
-
borderBottomColor: "kitt.separator",
|
|
7773
|
-
borderBottomWidth: hasSeparator ? 1 : undefined,
|
|
7774
|
-
...props,
|
|
7775
|
-
children: /*#__PURE__*/jsxs(View, {
|
|
7776
|
-
flexDirection: "row",
|
|
7777
|
-
alignItems: "center",
|
|
7778
|
-
justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
|
|
7779
|
-
children: [left ? /*#__PURE__*/jsx(View, {
|
|
7780
|
-
width: "kitt.iconButton.width",
|
|
7781
|
-
children: left
|
|
7782
|
-
}) : null, title ? /*#__PURE__*/jsx(View, {
|
|
7783
|
-
flexGrow: 1,
|
|
7784
|
-
flexShrink: 1,
|
|
7785
|
-
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
7786
|
-
paddingRight: hasRight ? 'kitt.2' : 0,
|
|
7787
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
7788
|
-
variant: "bold",
|
|
7789
|
-
textAlign: !hasLeft && hasRight ? 'left' : 'center',
|
|
7790
|
-
children: title
|
|
7791
|
-
})
|
|
7792
|
-
}) : null, children ? /*#__PURE__*/jsx(View, {
|
|
7793
|
-
flexGrow: 1,
|
|
7794
|
-
flexShrink: 1,
|
|
7795
|
-
alignItems: "center",
|
|
7796
|
-
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
7797
|
-
paddingRight: hasRight ? 'kitt.2' : undefined,
|
|
7798
|
-
children: children
|
|
7799
|
-
}) : null, right || left ? /*#__PURE__*/jsx(View, {
|
|
7800
|
-
width: "kitt.iconButton.width",
|
|
7801
|
-
children: right
|
|
7802
|
-
}) : null]
|
|
7803
|
-
})
|
|
7804
|
-
});
|
|
7805
|
-
}
|
|
7806
|
-
|
|
7807
|
-
function FullscreenModal2({
|
|
7808
|
-
backgroundColor,
|
|
7809
|
-
children
|
|
7810
|
-
}) {
|
|
7811
|
-
return /*#__PURE__*/jsx(FullscreenModal2Container, {
|
|
7812
|
-
backgroundColor: backgroundColor,
|
|
7813
|
-
children: children
|
|
7226
|
+
position: 'relative'
|
|
7227
|
+
},
|
|
7228
|
+
children: body
|
|
7229
|
+
}), footer || null]
|
|
7230
|
+
})]
|
|
7814
7231
|
});
|
|
7815
7232
|
}
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7233
|
+
FullscreenModal.Header = FullscreenModalHeader;
|
|
7234
|
+
FullscreenModal.Footer = FullscreenModalFooter;
|
|
7235
|
+
FullscreenModal.Body = FullscreenModalBody;
|
|
7236
|
+
FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
|
|
7820
7237
|
|
|
7821
7238
|
function GroupTags({
|
|
7822
7239
|
children,
|
|
@@ -11344,8 +10761,7 @@ function NavigationModal({
|
|
|
11344
10761
|
body,
|
|
11345
10762
|
backgroundColor,
|
|
11346
10763
|
footer,
|
|
11347
|
-
header
|
|
11348
|
-
contentContainer
|
|
10764
|
+
header
|
|
11349
10765
|
}) {
|
|
11350
10766
|
const Component = useBreakpointValue({
|
|
11351
10767
|
base: FullscreenModal,
|
|
@@ -11355,11 +10771,10 @@ function NavigationModal({
|
|
|
11355
10771
|
body: body,
|
|
11356
10772
|
backgroundColor: backgroundColor,
|
|
11357
10773
|
footer: footer,
|
|
11358
|
-
header: header
|
|
11359
|
-
contentContainer: contentContainer
|
|
10774
|
+
header: header
|
|
11360
10775
|
});
|
|
11361
10776
|
}
|
|
11362
|
-
function Header
|
|
10777
|
+
function Header(props) {
|
|
11363
10778
|
const Component = useBreakpointValue({
|
|
11364
10779
|
base: FullscreenModal.Header,
|
|
11365
10780
|
small: CardModal.Header
|
|
@@ -11368,7 +10783,7 @@ function Header$1(props) {
|
|
|
11368
10783
|
...props
|
|
11369
10784
|
});
|
|
11370
10785
|
}
|
|
11371
|
-
function Body
|
|
10786
|
+
function Body(props) {
|
|
11372
10787
|
const Component = useBreakpointValue({
|
|
11373
10788
|
base: FullscreenModal.Body,
|
|
11374
10789
|
small: CardModal.Body
|
|
@@ -11377,7 +10792,7 @@ function Body$1(props) {
|
|
|
11377
10792
|
...props
|
|
11378
10793
|
});
|
|
11379
10794
|
}
|
|
11380
|
-
function Footer
|
|
10795
|
+
function Footer(props) {
|
|
11381
10796
|
const Component = useBreakpointValue({
|
|
11382
10797
|
base: FullscreenModal.Footer,
|
|
11383
10798
|
small: CardModal.Footer
|
|
@@ -11386,106 +10801,11 @@ function Footer$1(props) {
|
|
|
11386
10801
|
...props
|
|
11387
10802
|
});
|
|
11388
10803
|
}
|
|
11389
|
-
NavigationModal.Header = Header
|
|
11390
|
-
NavigationModal.Body = Body
|
|
11391
|
-
NavigationModal.Footer = Footer
|
|
10804
|
+
NavigationModal.Header = Header;
|
|
10805
|
+
NavigationModal.Body = Body;
|
|
10806
|
+
NavigationModal.Footer = Footer;
|
|
11392
10807
|
NavigationModal.ModalBehaviour = NavigationModalBehaviour;
|
|
11393
10808
|
|
|
11394
|
-
function NavigationModal2Behaviour({
|
|
11395
|
-
children,
|
|
11396
|
-
visible,
|
|
11397
|
-
appear = true,
|
|
11398
|
-
onExited,
|
|
11399
|
-
onEnter,
|
|
11400
|
-
onExit,
|
|
11401
|
-
onClose,
|
|
11402
|
-
...props
|
|
11403
|
-
}) {
|
|
11404
|
-
const AnimationComponent = useBreakpointValue({
|
|
11405
|
-
base: FullscreenModal2Animation,
|
|
11406
|
-
small: CardModal2Animation
|
|
11407
|
-
});
|
|
11408
|
-
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
11409
|
-
const [shouldAppear, setShouldAppear] = useState(appear);
|
|
11410
|
-
useEffect(() => {
|
|
11411
|
-
if (visible === true) {
|
|
11412
|
-
setIsModalBehaviourVisible(true);
|
|
11413
|
-
}
|
|
11414
|
-
}, [visible]);
|
|
11415
|
-
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
11416
|
-
visible: isModalBehaviourVisible,
|
|
11417
|
-
onClose: onClose,
|
|
11418
|
-
children: /*#__PURE__*/jsx(AnimationComponent, {
|
|
11419
|
-
...props,
|
|
11420
|
-
appear: shouldAppear,
|
|
11421
|
-
visible: visible,
|
|
11422
|
-
onEnter: () => {
|
|
11423
|
-
if (onEnter) onEnter();
|
|
11424
|
-
|
|
11425
|
-
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
11426
|
-
setShouldAppear(false);
|
|
11427
|
-
},
|
|
11428
|
-
onExit: () => {
|
|
11429
|
-
if (onExit) onExit();
|
|
11430
|
-
|
|
11431
|
-
// Reset appear value to its original value for future modal display
|
|
11432
|
-
setShouldAppear(appear);
|
|
11433
|
-
},
|
|
11434
|
-
onExited: () => {
|
|
11435
|
-
if (onExited) onExited();
|
|
11436
|
-
setIsModalBehaviourVisible(false);
|
|
11437
|
-
},
|
|
11438
|
-
onClose: onClose,
|
|
11439
|
-
children: children
|
|
11440
|
-
})
|
|
11441
|
-
});
|
|
11442
|
-
}
|
|
11443
|
-
|
|
11444
|
-
function NavigationModal2({
|
|
11445
|
-
backgroundColor,
|
|
11446
|
-
children
|
|
11447
|
-
}) {
|
|
11448
|
-
const Component = useBreakpointValue({
|
|
11449
|
-
base: FullscreenModal2,
|
|
11450
|
-
small: CardModal2
|
|
11451
|
-
});
|
|
11452
|
-
return /*#__PURE__*/jsx(Component, {
|
|
11453
|
-
backgroundColor: backgroundColor,
|
|
11454
|
-
children: children
|
|
11455
|
-
});
|
|
11456
|
-
}
|
|
11457
|
-
function Header(props) {
|
|
11458
|
-
const Component = useBreakpointValue({
|
|
11459
|
-
base: FullscreenModal2.Header,
|
|
11460
|
-
small: CardModal2.Header
|
|
11461
|
-
});
|
|
11462
|
-
return /*#__PURE__*/jsx(Component, {
|
|
11463
|
-
...props
|
|
11464
|
-
});
|
|
11465
|
-
}
|
|
11466
|
-
function Body(props) {
|
|
11467
|
-
const Component = useBreakpointValue({
|
|
11468
|
-
base: FullscreenModal2.Body,
|
|
11469
|
-
small: CardModal2.Body
|
|
11470
|
-
});
|
|
11471
|
-
return /*#__PURE__*/jsx(Component, {
|
|
11472
|
-
...props
|
|
11473
|
-
});
|
|
11474
|
-
}
|
|
11475
|
-
function Footer(props) {
|
|
11476
|
-
const Component = useBreakpointValue({
|
|
11477
|
-
base: FullscreenModal2.Footer,
|
|
11478
|
-
small: CardModal2.Footer
|
|
11479
|
-
});
|
|
11480
|
-
return /*#__PURE__*/jsx(Component, {
|
|
11481
|
-
...props
|
|
11482
|
-
});
|
|
11483
|
-
}
|
|
11484
|
-
NavigationModal2.Header = Header;
|
|
11485
|
-
NavigationModal2.Body = Body;
|
|
11486
|
-
NavigationModal2.Footer = Footer;
|
|
11487
|
-
NavigationModal2.ModalBehaviour = NavigationModal2Behaviour;
|
|
11488
|
-
|
|
11489
10809
|
function Notification({
|
|
11490
10810
|
type,
|
|
11491
10811
|
children,
|
|
@@ -13703,5 +13023,5 @@ function VerticalSteps({
|
|
|
13703
13023
|
VerticalSteps.Step = Step;
|
|
13704
13024
|
VerticalSteps.BorderlessStep = BorderlessStep;
|
|
13705
13025
|
|
|
13706
|
-
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal,
|
|
13026
|
+
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, NativeOnlyFlatList, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
|
|
13707
13027
|
//# sourceMappingURL=index-node-20.10.es.web.mjs.map
|